diff --git a/AUTHORS b/AUTHORS index 7706729d..b2a4a628 100644 --- a/AUTHORS +++ b/AUTHORS @@ -45,7 +45,7 @@ SplashScreens: Marion Klein Ram� Lamana Villar -TDevTabBar, bug fixes, Gideon Release: +KDevTabBar, bug fixes, Gideon Release: Caleb Tennis PartExplorer, (bugs for) CvsPart: diff --git a/CMakeLists.txt b/CMakeLists.txt index 442ab2ab..254c6ba4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,7 +82,7 @@ option( WITH_VCS_SUBVERSION "Enable subversion support" ${WITH_VCS_ALL} ) ##### components ################################ option( BUILD_ALL "Build all components" OFF ) -option( BUILD_TDEVDESIGNER "Build tdevdesigner" ${BUILD_ALL} ) +option( BUILD_KDEVDESIGNER "Build kdevdesigner" ${BUILD_ALL} ) option( BUILD_VISUALBOYADVANCE "Build embedded/visualboyadvance" ${BUILD_ALL} ) option( BUILD_DOC "Build doc" ${BUILD_ALL} ) @@ -150,13 +150,11 @@ set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" ) ##### install data ############################## install( FILES - tdevelop.desktop tdevassistant.desktop tdevelop_ruby.desktop - tdevelop_c_cpp.desktop tdevelop_tde_cpp.desktop + tdevelop.desktop kdevassistant.desktop tdevelop_ruby.desktop + tdevelop_c_cpp.desktop tdevelop_kde_cpp.desktop tdevelop_scripting.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) -install( FILES tde_app_devel.desktop DESTINATION ${APPS_INSTALL_DIR}/.hidden ) - install( FILES tde-development-tdevelop.directory DESTINATION ${XDG_DIRECTORY_INSTALL_DIR} ) @@ -166,7 +164,7 @@ install( FILES DESTINATION ${MIME_INSTALL_DIR}/application ) install( PROGRAMS - tdevprj2tdevelop + kdevprj2tdevelop DESTINATION ${BIN_INSTALL_DIR} ) @@ -182,7 +180,7 @@ add_subdirectory( mimetypes ) add_subdirectory( pics ) add_subdirectory( vcs ) add_subdirectory( embedded ) -tde_conditional_add_subdirectory( BUILD_TDEVDESIGNER tdevdesigner ) +tde_conditional_add_subdirectory( BUILD_KDEVDESIGNER kdevdesigner ) tde_conditional_add_subdirectory( BUILD_DOC doc ) diff --git a/Doxyfile b/Doxyfile index 5abfb6b9..8e293249 100644 --- a/Doxyfile +++ b/Doxyfile @@ -124,7 +124,7 @@ EXCLUDE_PATTERNS = *.moc.* \ *face_skel.cpp \ *.ui.h EXAMPLE_PATH = languages/cpp/app_templates/khello \ - languages/cpp/app_templates/tdevpart + languages/cpp/app_templates/kdevpart EXAMPLE_PATTERNS = EXAMPLE_RECURSIVE = NO IMAGE_PATH = ./doc/api diff --git a/Makefile.am b/Makefile.am index b3bf5d78..25b1050d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -2,19 +2,16 @@ COMPILE_FIRST = lib src parts EXTRA_DIST = AUTHORS COPYING COPYING.LIB NEWS ChangeLog INSTALL README TODO HACKING HACKING.language admin configure.in.bot -xdg_apps_DATA = tdevelop.desktop tdevassistant.desktop tdevelop_ruby.desktop \ - tdevelop_c_cpp.desktop tdevelop_tde_cpp.desktop tdevelop_scripting.desktop +xdg_apps_DATA = tdevelop.desktop kdevassistant.desktop tdevelop_ruby.desktop \ + tdevelop_c_cpp.desktop tdevelop_kde_cpp.desktop tdevelop_scripting.desktop #appsdir = $(kde_appsdir)/Development -app_DATA = tde_app_devel.desktop -appdir = $(kde_appsdir)/.hidden - xdg_directory_DATA = tde-development-tdevelop.directory mime_DATA = x-tdevelop.desktop mimedir = $(kde_mimedir)/application -kde_bin_SCRIPTS = tdevprj2tdevelop +kde_bin_SCRIPTS = kdevprj2tdevelop $(top_srcdir)/acinclude.m4: $(top_srcdir)/tdevelop.m4.in @@ -51,7 +48,7 @@ include admin/deps.am DOXYGEN_SEARCHENGINE = YES DOXYGEN_EMPTY = YES -DOXYGEN_PROJECTNAME = TDevelop Platform API +DOXYGEN_PROJECTNAME = KDevelop Platform API include Doxyfile.am SUBDIRS=$(TOPSUBDIRS) -#tdevelop: lib src parts buildtools doc editors embedded tdevdesigner languages mimetypes pics vcs +#tdevelop: lib src parts buildtools doc editors embedded kdevdesigner languages mimetypes pics vcs diff --git a/buildtools/ada/CMakeLists.txt b/buildtools/ada/CMakeLists.txt index 0cf08117..8d0fd4ae 100644 --- a/buildtools/ada/CMakeLists.txt +++ b/buildtools/ada/CMakeLists.txt @@ -28,17 +28,17 @@ link_directories( ##### other data ################################ -install( FILES tdevadaproject.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevadaproject.rc DESTINATION ${DATA_INSTALL_DIR}/tdevadaproject ) +install( FILES kdevadaproject.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevadaproject.rc DESTINATION ${DATA_INSTALL_DIR}/kdevadaproject ) -##### libtdevadaproject (module) ################ +##### libkdevadaproject (module) ################ -tde_add_kpart( libtdevadaproject AUTOMOC +tde_add_kpart( libkdevadaproject AUTOMOC SOURCES adaproject_part.cpp adaproject_widget.cpp adaproject_optionsdlgbase.ui adaprojectoptionsdlg.cpp adaglobaloptionsdlg.cpp service.cpp - LINK tdevbuildbase-shared + LINK kdevbuildbase-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/buildtools/ada/Makefile.am b/buildtools/ada/Makefile.am index 7997b18c..2b2614ec 100644 --- a/buildtools/ada/Makefile.am +++ b/buildtools/ada/Makefile.am @@ -2,17 +2,17 @@ INCLUDES = -I$(top_srcdir)/buildtools/lib/base -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/interfaces/external \ -I$(top_srcdir)/lib/interfaces/extras -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevadaproject.la -libtdevadaproject_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevadaproject_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/buildtools/lib/base/libtdevbuildbase.la $(top_builddir)/lib/interfaces/extras/libtdevextras.la +kde_module_LTLIBRARIES = libkdevadaproject.la +libkdevadaproject_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevadaproject_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/buildtools/lib/base/libkdevbuildbase.la $(top_builddir)/lib/interfaces/extras/libkdevextras.la -libtdevadaproject_la_SOURCES = adaproject_part.cpp adaproject_widget.cpp adaproject_optionsdlgbase.ui adaprojectoptionsdlg.cpp adaglobaloptionsdlg.cpp service.cpp +libkdevadaproject_la_SOURCES = adaproject_part.cpp adaproject_widget.cpp adaproject_optionsdlgbase.ui adaprojectoptionsdlg.cpp adaglobaloptionsdlg.cpp service.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevadaproject.desktop +service_DATA = kdevadaproject.desktop -rcdir = $(kde_datadir)/tdevadaproject -rc_DATA = tdevadaproject.rc +rcdir = $(kde_datadir)/kdevadaproject +rc_DATA = kdevadaproject.rc diff --git a/buildtools/ada/adaglobaloptionsdlg.cpp b/buildtools/ada/adaglobaloptionsdlg.cpp index 791c23ae..cea68bdc 100644 --- a/buildtools/ada/adaglobaloptionsdlg.cpp +++ b/buildtools/ada/adaglobaloptionsdlg.cpp @@ -15,7 +15,7 @@ #include #include -#include "tdevcompileroptions.h" +#include "kdevcompileroptions.h" #include "service.h" #include "adaproject_part.h" @@ -61,7 +61,7 @@ AdaGlobalOptionsDlg::~AdaGlobalOptionsDlg() void AdaGlobalOptionsDlg::optionsButtonClicked() { TQString name = ServiceComboBox::currentText(compiler_box, service_names); - TDevCompilerOptions *plugin = m_part->createCompilerOptions(name); + KDevCompilerOptions *plugin = m_part->createCompilerOptions(name); if (plugin) { TQString flags = plugin->exec(this, options_edit->text()); diff --git a/buildtools/ada/adaproject_part.cpp b/buildtools/ada/adaproject_part.cpp index 195e2889..32833dfd 100644 --- a/buildtools/ada/adaproject_part.cpp +++ b/buildtools/ada/adaproject_part.cpp @@ -28,29 +28,29 @@ #include #include "domutil.h" -#include "tdevcore.h" -#include "tdevmainwindow.h" -#include "tdevmakefrontend.h" -#include "tdevappfrontend.h" -#include "tdevpartcontroller.h" -#include "tdevlanguagesupport.h" -#include "tdevcompileroptions.h" -#include "tdevgenericfactory.h" -#include +#include "kdevcore.h" +#include "kdevmainwindow.h" +#include "kdevmakefrontend.h" +#include "kdevappfrontend.h" +#include "kdevpartcontroller.h" +#include "kdevlanguagesupport.h" +#include "kdevcompileroptions.h" +#include "kdevgenericfactory.h" +#include #include "adaproject_widget.h" #include "adaprojectoptionsdlg.h" #include "adaglobaloptionsdlg.h" -typedef TDevGenericFactory AdaProjectFactory; -static const TDevPluginInfo data("tdevadaproject"); -K_EXPORT_COMPONENT_FACTORY( libtdevadaproject, AdaProjectFactory( data ) ) +typedef KDevGenericFactory AdaProjectFactory; +static const KDevPluginInfo data("kdevadaproject"); +K_EXPORT_COMPONENT_FACTORY( libkdevadaproject, AdaProjectFactory( data ) ) AdaProjectPart::AdaProjectPart(TQObject *parent, const char *name, const TQStringList& ) - :TDevBuildTool(&data, parent, name ? name : "AdaProjectPart" ) + :KDevBuildTool(&data, parent, name ? name : "AdaProjectPart" ) { setInstance(AdaProjectFactory::instance()); - setXMLFile("tdevadaproject.rc"); + setXMLFile("kdevadaproject.rc"); TDEAction *action; action = new TDEAction( i18n("&Build Project"), "make_tdevelop", Key_F8, @@ -70,7 +70,7 @@ AdaProjectPart::AdaProjectPart(TQObject *parent, const char *name, const TQStrin // TQWhatsThis::add(m_widget, i18n("WHAT DOES THIS PART DO?")); - // now you decide what should happen to the widget. Take a look at tdevcore.h + // now you decide what should happen to the widget. Take a look at kdevcore.h // or at other plugins how to embed it. // if you want to embed your widget as an outputview, simply uncomment @@ -109,8 +109,8 @@ void AdaProjectPart::openProject(const TQString &dirName, const TQString &projec TQDomDocument &dom = *projectDom(); // Set the default directory radio to "executable" - if (DomUtil::readEntry(dom, "/tdevadaproject/run/directoryradio") == "" ) { - DomUtil::writeEntry(dom, "/tdevadaproject/run/directoryradio", "executable"); + if (DomUtil::readEntry(dom, "/kdevadaproject/run/directoryradio") == "" ) { + DomUtil::writeEntry(dom, "/kdevadaproject/run/directoryradio", "executable"); } loadProjectConfig(); @@ -165,7 +165,7 @@ void AdaProjectPart::openProject(const TQString &dirName, const TQString &projec } } while (!s.isEmpty()); - TDevProject::openProject( dirName, projectName ); + KDevProject::openProject( dirName, projectName ); } void AdaProjectPart::closeProject() @@ -175,7 +175,7 @@ void AdaProjectPart::closeProject() /** Retuns a PairList with the run environment variables */ DomUtil::PairList AdaProjectPart::runEnvironmentVars() const { - return DomUtil::readPairListEntry(*projectDom(), "/tdevadaproject/run/envvars", "envvar", "name", "value"); + return DomUtil::readPairListEntry(*projectDom(), "/kdevadaproject/run/envvars", "envvar", "name", "value"); } @@ -190,7 +190,7 @@ DomUtil::PairList AdaProjectPart::runEnvironmentVars() const */ TQString AdaProjectPart::runDirectory() const { - TQString cwd = defaultRunDirectory("tdevadaproject"); + TQString cwd = defaultRunDirectory("kdevadaproject"); if (cwd.isEmpty()) cwd = buildDirectory(); return cwd; @@ -212,7 +212,7 @@ TQString AdaProjectPart::mainProgram() const if ( !dom ) return TQString(); - TQString DomMainProgram = DomUtil::readEntry( *dom, "/tdevadaproject/run/mainprogram"); + TQString DomMainProgram = DomUtil::readEntry( *dom, "/kdevadaproject/run/mainprogram"); if ( DomMainProgram.isEmpty() ) return TQString(); @@ -231,14 +231,14 @@ TQString AdaProjectPart::mainProgram() const /** Retuns a TQString with the run command line arguments */ TQString AdaProjectPart::debugArguments() const { - return DomUtil::readEntry(*projectDom(), "/tdevadaproject/run/globaldebugarguments"); + return DomUtil::readEntry(*projectDom(), "/kdevadaproject/run/globaldebugarguments"); } /** Retuns a TQString with the run command line arguments */ TQString AdaProjectPart::runArguments() const { - return DomUtil::readEntry(*projectDom(), "/tdevadaproject/run/programargs"); + return DomUtil::readEntry(*projectDom(), "/kdevadaproject/run/programargs"); } TQString AdaProjectPart::mainSource() const @@ -361,12 +361,12 @@ void AdaProjectPart::slotExecute() void AdaProjectPart::changedFiles( const TQStringList & fileList ) { - TDevProject::changedFiles(fileList); + KDevProject::changedFiles(fileList); } void AdaProjectPart::changedFile( const TQString & fileName ) { - TDevProject::changedFile(fileName); + KDevProject::changedFile(fileName); } void AdaProjectPart::projectConfigWidget( KDialogBase * dlg ) @@ -382,10 +382,10 @@ void AdaProjectPart::loadProjectConfig( ) { TQDomDocument &dom = *(projectDom()); - TQString config = DomUtil::readEntry(dom, "/tdevadaproject/general/useconfiguration", "default"); - m_mainSource = DomUtil::readEntry(dom, TQString("/tdevadaproject/configurations/") + config + TQString("/mainsource") ); - m_compilerOpts = DomUtil::readEntry(dom, TQString("/tdevadaproject/configurations/") + config + TQString("/compileroptions")); - m_compilerExec = DomUtil::readEntry(dom, TQString("/tdevadaproject/configurations/") + config + TQString("/compilerexec")); + TQString config = DomUtil::readEntry(dom, "/kdevadaproject/general/useconfiguration", "default"); + m_mainSource = DomUtil::readEntry(dom, TQString("/kdevadaproject/configurations/") + config + TQString("/mainsource") ); + m_compilerOpts = DomUtil::readEntry(dom, TQString("/kdevadaproject/configurations/") + config + TQString("/compileroptions")); + m_compilerExec = DomUtil::readEntry(dom, TQString("/kdevadaproject/configurations/") + config + TQString("/compilerexec")); if (m_compilerExec.isEmpty()) { @@ -408,7 +408,7 @@ void AdaProjectPart::configWidget( KDialogBase * dlg ) connect( dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept()) ); } -TDevCompilerOptions *AdaProjectPart::createCompilerOptions(const TQString &name) +KDevCompilerOptions *AdaProjectPart::createCompilerOptions(const TQString &name) { KService::Ptr service = KService::serviceByDesktopName(name); if (!service) { @@ -430,13 +430,13 @@ TDevCompilerOptions *AdaProjectPart::createCompilerOptions(const TQString &name) args = TQStringList::split(" ", prop.toString()); TQObject *obj = factory->create(this, service->name().latin1(), - "TDevCompilerOptions", args); + "KDevCompilerOptions", args); - if (!obj->inherits("TDevCompilerOptions")) { - kdDebug() << "AdaProjectPart::createCompilerOptions: component does not inherit TDevCompilerOptions" << endl; + if (!obj->inherits("KDevCompilerOptions")) { + kdDebug() << "AdaProjectPart::createCompilerOptions: component does not inherit KDevCompilerOptions" << endl; return 0; } - TDevCompilerOptions *dlg = (TDevCompilerOptions*) obj; + KDevCompilerOptions *dlg = (KDevCompilerOptions*) obj; return dlg; } diff --git a/buildtools/ada/adaproject_part.h b/buildtools/ada/adaproject_part.h index 46b328c4..5511da78 100644 --- a/buildtools/ada/adaproject_part.h +++ b/buildtools/ada/adaproject_part.h @@ -6,18 +6,18 @@ * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. */ -#ifndef __TDEVPART_ADAPROJECT_H__ -#define __TDEVPART_ADAPROJECT_H__ +#ifndef __KDEVPART_ADAPROJECT_H__ +#define __KDEVPART_ADAPROJECT_H__ #include -#include "tdevbuildtool.h" +#include "kdevbuildtool.h" class AdaProjectWidget; class KDialogBase; -class TDevCompilerOptions; +class KDevCompilerOptions; -class AdaProjectPart : public TDevBuildTool +class AdaProjectPart : public KDevBuildTool { Q_OBJECT @@ -59,7 +59,7 @@ public: virtual void changedFiles( const TQStringList & fileList ); virtual void changedFile( const TQString & fileName ); - TDevCompilerOptions *createCompilerOptions(const TQString &name); + KDevCompilerOptions *createCompilerOptions(const TQString &name); virtual TQString defaultOptions(const TQString compiler); TQStringList distFiles() const; diff --git a/buildtools/ada/adaproject_widget.cpp b/buildtools/ada/adaproject_widget.cpp index 3eaba244..f5016e8c 100644 --- a/buildtools/ada/adaproject_widget.cpp +++ b/buildtools/ada/adaproject_widget.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include "adaproject_part.h" #include "adaproject_widget.h" diff --git a/buildtools/ada/adaproject_widget.h b/buildtools/ada/adaproject_widget.h index c89fc511..6bbab369 100644 --- a/buildtools/ada/adaproject_widget.h +++ b/buildtools/ada/adaproject_widget.h @@ -4,7 +4,7 @@ #include #include -class TDevProject; +class KDevProject; class AdaProjectPart; class AdaProjectWidget : public TQWidget diff --git a/buildtools/ada/adaprojectoptionsdlg.cpp b/buildtools/ada/adaprojectoptionsdlg.cpp index 6cced020..28549efc 100644 --- a/buildtools/ada/adaprojectoptionsdlg.cpp +++ b/buildtools/ada/adaprojectoptionsdlg.cpp @@ -18,7 +18,7 @@ #include #include "domutil.h" -#include "tdevcompileroptions.h" +#include "kdevcompileroptions.h" #include "service.h" #include "adaproject_part.h" @@ -43,7 +43,7 @@ AdaProjectOptionsDlg::AdaProjectOptionsDlg(AdaProjectPart *part, TQWidget* paren TQDomDocument &dom = *(m_part->projectDom()); currentConfig = TQString(); - configChanged(DomUtil::readEntry(dom, "/tdevadaproject/general/useconfiguration", "default")); + configChanged(DomUtil::readEntry(dom, "/kdevadaproject/general/useconfiguration", "default")); } AdaProjectOptionsDlg::~AdaProjectOptionsDlg() @@ -57,7 +57,7 @@ TQStringList AdaProjectOptionsDlg::allBuildConfigs() TQStringList allConfigs; allConfigs.append("default"); - TQDomNode node = dom.documentElement().namedItem("tdevadaproject").namedItem("configurations"); + TQDomNode node = dom.documentElement().namedItem("kdevadaproject").namedItem("configurations"); TQDomElement childEl = node.firstChild().toElement(); while (!childEl.isNull()) { TQString config = childEl.tagName(); @@ -72,7 +72,7 @@ TQStringList AdaProjectOptionsDlg::allBuildConfigs() void AdaProjectOptionsDlg::accept() { - DomUtil::writeEntry(*m_part->projectDom(), "/tdevadaproject/general/useconfiguration", currentConfig); + DomUtil::writeEntry(*m_part->projectDom(), "/kdevadaproject/general/useconfiguration", currentConfig); if (dirty) { saveConfig(currentConfig); @@ -88,7 +88,7 @@ void AdaProjectOptionsDlg::compiler_box_activated( const TQString& /*s*/ ) void AdaProjectOptionsDlg::saveConfig( TQString config ) { TQDomDocument dom = *m_part->projectDom(); - TQString prefix = "/tdevadaproject/configurations/" + config + "/"; + TQString prefix = "/kdevadaproject/configurations/" + config + "/"; DomUtil::writeEntry(dom, prefix + "compiler", ServiceComboBox::currentText(compiler_box, service_names)); @@ -100,7 +100,7 @@ void AdaProjectOptionsDlg::saveConfig( TQString config ) void AdaProjectOptionsDlg::readConfig( TQString config ) { TQDomDocument dom = *m_part->projectDom(); - TQString prefix = "/tdevadaproject/configurations/" + config + "/"; + TQString prefix = "/kdevadaproject/configurations/" + config + "/"; TQString compiler = DomUtil::readEntry(dom, prefix + "compiler", ""); @@ -171,7 +171,7 @@ void AdaProjectOptionsDlg::configRemoved() TQString config = config_combo->currentText(); TQDomDocument dom = *m_part->projectDom(); - TQDomNode node = dom.documentElement().namedItem("tdevadaproject").namedItem("configurations"); + TQDomNode node = dom.documentElement().namedItem("kdevadaproject").namedItem("configurations"); node.removeChild(node.namedItem(config)); allConfigs.remove(config); @@ -185,7 +185,7 @@ void AdaProjectOptionsDlg::configRemoved() void AdaProjectOptionsDlg::optionsButtonClicked( ) { TQString name = ServiceComboBox::currentText(compiler_box, service_names); - TDevCompilerOptions *plugin = m_part->createCompilerOptions(name); + KDevCompilerOptions *plugin = m_part->createCompilerOptions(name); if (plugin) { TQString flags = plugin->exec(this, options_edit->text()); diff --git a/buildtools/ada/adaprojectoptionsdlg.h b/buildtools/ada/adaprojectoptionsdlg.h index 0f6c0262..569f06c9 100644 --- a/buildtools/ada/adaprojectoptionsdlg.h +++ b/buildtools/ada/adaprojectoptionsdlg.h @@ -14,7 +14,7 @@ #include "adaproject_optionsdlgbase.h" class AdaProjectPart; -class TDevCompilerOptions; +class KDevCompilerOptions; class AdaProjectOptionsDlg : public AdaProjectOptionsDlgBase { diff --git a/buildtools/ada/kdevadaproject.desktop b/buildtools/ada/kdevadaproject.desktop new file mode 100644 index 00000000..882b0f64 --- /dev/null +++ b/buildtools/ada/kdevadaproject.desktop @@ -0,0 +1,100 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Ada Project +Comment[br]=Raktres Ada +Comment[ca]=Projecte Ada +Comment[cs]=Ada projekt +Comment[da]=Ada-projekt +Comment[de]=Ada-Projekt für TDevelop +Comment[el]=Έργο Ada +Comment[es]=Proyecto Ada +Comment[et]=Ada projekt +Comment[eu]=Ada proiektua +Comment[fa]=پروژۀ آدا +Comment[fr]=Projet en Ada +Comment[ga]=Tionscadal Ada +Comment[gl]=Proxecto Ada +Comment[hi]=एडीए परियोजना +Comment[hu]=Ada-projekt +Comment[is]=Ada verkefni +Comment[it]=Progetto Ada +Comment[ja]=Ada プロジェクト +Comment[ms]=Projek Ada +Comment[nds]=Ada-Projekt +Comment[ne]=एडा परियोजना +Comment[nl]=Ada-project +Comment[pa]=Ada ਪ੍ਰੋਜੈਕਟ +Comment[pl]=Projekt: Ada +Comment[pt]=Projecto Ada +Comment[pt_BR]=Projeto Ada +Comment[ro]=Proiect Ada +Comment[ru]=Проект Ada +Comment[sk]=Ada projekt +Comment[sl]=Projekt Ada +Comment[sr]=Ada пројекат +Comment[sr@Latn]=Ada projekat +Comment[sv]=Ada-projekt +Comment[ta]=அடா பிராஜக்ட் +Comment[tg]=Лоиҳаи Ada +Comment[tr]=Ada Projesi +Comment[uz]=Ada loyihasi +Comment[uz@cyrillic]=Ada лойиҳаси +Comment[zh_CN]=Ada 工程 +Comment[zh_TW]=Ada 專案 +Name=KDevAdaProject +Name[da]=TDevelop Ada-projekt +Name[de]=Ada-Projekt (TDevelop) +Name[fr]=Projet Ada pour TDevelop +Name[hi]=के-डेव-एडीए-परियोजना +Name[nds]=Ada-Projekt (TDevelop) +Name[ne]=केडीई विकास एडा परियोजना +Name[pl]=KDevProjektAda +Name[sk]=KDevAdaProjekt +Name[sv]=TDevelop Ada-projekt +Name[ta]=கெடெவ் அடா பிராஜக்ட் +Name[tg]=Лоиҳаи KDevAda +Name[zh_TW]=TDevelop Ada 專案 +GenericName=Ada Project +GenericName[br]=Raktres Ada +GenericName[ca]=Projecte Ada +GenericName[da]=Ada-projekt +GenericName[de]=Ada-Projekt +GenericName[el]=Έργο Ada +GenericName[es]=Proyecto Ada +GenericName[et]=Ada projekt +GenericName[eu]=Ada proiektua +GenericName[fa]=پروژۀ آدا +GenericName[fr]=Projet en Ada +GenericName[ga]=Tionscadal Ada +GenericName[gl]=Proxecto Ada +GenericName[hi]=एडीए परियोजना +GenericName[hu]=Ada-projekt +GenericName[is]=Ada verkefni +GenericName[it]=Project con Ada +GenericName[ja]=Ada プロジェクト +GenericName[ms]=Projek Ada +GenericName[nds]=Ada-Projekt +GenericName[ne]=एडा परियोजना +GenericName[nl]=Ada-project +GenericName[pa]=Ada ਪ੍ਰੋਜੈਕਟ +GenericName[pl]=Projekt: Ada +GenericName[pt]=Projecto Ada +GenericName[pt_BR]=Projeto Ada +GenericName[ru]=Проект Ada +GenericName[sk]=Ada projekt +GenericName[sl]=Projekt Ada +GenericName[sr]=Ada пројекат +GenericName[sr@Latn]=Ada projekat +GenericName[sv]=Ada-projekt +GenericName[ta]=அடா பிராஜக்ட் +GenericName[tg]=Лоиҳаи Ada +GenericName[tr]=Ada Projesi +GenericName[uz]=Ada loyihasi +GenericName[uz@cyrillic]=Ada лойиҳаси +GenericName[zh_CN]=Ada 工程 +GenericName[zh_TW]=Ada 專案 +ServiceTypes=TDevelop/Project +X-TDE-Library=libkdevadaproject +X-TDevelop-Version=5 +X-TDevelop-Language=Ada diff --git a/buildtools/ada/tdevadaproject.rc b/buildtools/ada/kdevadaproject.rc similarity index 100% rename from buildtools/ada/tdevadaproject.rc rename to buildtools/ada/kdevadaproject.rc diff --git a/buildtools/ada/tdevadaproject.desktop b/buildtools/ada/tdevadaproject.desktop deleted file mode 100644 index 91206fd4..00000000 --- a/buildtools/ada/tdevadaproject.desktop +++ /dev/null @@ -1,100 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Ada Project -Comment[br]=Raktres Ada -Comment[ca]=Projecte Ada -Comment[cs]=Ada projekt -Comment[da]=Ada-projekt -Comment[de]=Ada-Projekt für TDevelop -Comment[el]=Έργο Ada -Comment[es]=Proyecto Ada -Comment[et]=Ada projekt -Comment[eu]=Ada proiektua -Comment[fa]=پروژۀ آدا -Comment[fr]=Projet en Ada -Comment[ga]=Tionscadal Ada -Comment[gl]=Proxecto Ada -Comment[hi]=एडीए परियोजना -Comment[hu]=Ada-projekt -Comment[is]=Ada verkefni -Comment[it]=Progetto Ada -Comment[ja]=Ada プロジェクト -Comment[ms]=Projek Ada -Comment[nds]=Ada-Projekt -Comment[ne]=एडा परियोजना -Comment[nl]=Ada-project -Comment[pa]=Ada ਪ੍ਰੋਜੈਕਟ -Comment[pl]=Projekt: Ada -Comment[pt]=Projecto Ada -Comment[pt_BR]=Projeto Ada -Comment[ro]=Proiect Ada -Comment[ru]=Проект Ada -Comment[sk]=Ada projekt -Comment[sl]=Projekt Ada -Comment[sr]=Ada пројекат -Comment[sr@Latn]=Ada projekat -Comment[sv]=Ada-projekt -Comment[ta]=அடா பிராஜக்ட் -Comment[tg]=Лоиҳаи Ada -Comment[tr]=Ada Projesi -Comment[uz]=Ada loyihasi -Comment[uz@cyrillic]=Ada лойиҳаси -Comment[zh_CN]=Ada 工程 -Comment[zh_TW]=Ada 專案 -Name=KDevAdaProject -Name[da]=TDevelop Ada-projekt -Name[de]=Ada-Projekt (TDevelop) -Name[fr]=Projet Ada pour TDevelop -Name[hi]=के-डेव-एडीए-परियोजना -Name[nds]=Ada-Projekt (TDevelop) -Name[ne]=केडीई विकास एडा परियोजना -Name[pl]=KDevProjektAda -Name[sk]=KDevAdaProjekt -Name[sv]=TDevelop Ada-projekt -Name[ta]=கெடெவ் அடா பிராஜக்ட் -Name[tg]=Лоиҳаи KDevAda -Name[zh_TW]=TDevelop Ada 專案 -GenericName=Ada Project -GenericName[br]=Raktres Ada -GenericName[ca]=Projecte Ada -GenericName[da]=Ada-projekt -GenericName[de]=Ada-Projekt -GenericName[el]=Έργο Ada -GenericName[es]=Proyecto Ada -GenericName[et]=Ada projekt -GenericName[eu]=Ada proiektua -GenericName[fa]=پروژۀ آدا -GenericName[fr]=Projet en Ada -GenericName[ga]=Tionscadal Ada -GenericName[gl]=Proxecto Ada -GenericName[hi]=एडीए परियोजना -GenericName[hu]=Ada-projekt -GenericName[is]=Ada verkefni -GenericName[it]=Project con Ada -GenericName[ja]=Ada プロジェクト -GenericName[ms]=Projek Ada -GenericName[nds]=Ada-Projekt -GenericName[ne]=एडा परियोजना -GenericName[nl]=Ada-project -GenericName[pa]=Ada ਪ੍ਰੋਜੈਕਟ -GenericName[pl]=Projekt: Ada -GenericName[pt]=Projecto Ada -GenericName[pt_BR]=Projeto Ada -GenericName[ru]=Проект Ada -GenericName[sk]=Ada projekt -GenericName[sl]=Projekt Ada -GenericName[sr]=Ada пројекат -GenericName[sr@Latn]=Ada projekat -GenericName[sv]=Ada-projekt -GenericName[ta]=அடா பிராஜக்ட் -GenericName[tg]=Лоиҳаи Ada -GenericName[tr]=Ada Projesi -GenericName[uz]=Ada loyihasi -GenericName[uz@cyrillic]=Ada лойиҳаси -GenericName[zh_CN]=Ada 工程 -GenericName[zh_TW]=Ada 專案 -ServiceTypes=TDevelop/Project -X-TDE-Library=libtdevadaproject -X-TDevelop-Version=5 -X-TDevelop-Language=Ada diff --git a/buildtools/ant/CMakeLists.txt b/buildtools/ant/CMakeLists.txt index 48858d7f..1b7cfd98 100644 --- a/buildtools/ant/CMakeLists.txt +++ b/buildtools/ant/CMakeLists.txt @@ -26,15 +26,15 @@ link_directories( ##### other data ################################ -install( FILES tdevantproject.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevantproject.rc DESTINATION ${DATA_INSTALL_DIR}/tdevantproject ) +install( FILES kdevantproject.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevantproject.rc DESTINATION ${DATA_INSTALL_DIR}/kdevantproject ) -##### libtdevantproject (module) ################ +##### libkdevantproject (module) ################ -tde_add_kpart( libtdevantproject AUTOMOC +tde_add_kpart( libkdevantproject AUTOMOC SOURCES antprojectpart.cpp antoptionswidget.ui classpathwidget.ui - LINK tdevbuildbase-shared + LINK kdevbuildbase-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/buildtools/ant/Makefile.am b/buildtools/ant/Makefile.am index 6f3e23e6..30f314b8 100644 --- a/buildtools/ant/Makefile.am +++ b/buildtools/ant/Makefile.am @@ -5,17 +5,17 @@ INCLUDES = -I$(top_srcdir)/buildtools/lib/base \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util -I$(top_builddir)/buildtools/lib/widgets \ $(all_includes) -kde_module_LTLIBRARIES = libtdevantproject.la -libtdevantproject_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevantproject_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/buildtools/lib/widgets/libtdevbuildtoolswidgets.la $(top_builddir)/buildtools/lib/base/libtdevbuildbase.la +kde_module_LTLIBRARIES = libkdevantproject.la +libkdevantproject_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevantproject_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/buildtools/lib/widgets/libkdevbuildtoolswidgets.la $(top_builddir)/buildtools/lib/base/libkdevbuildbase.la -libtdevantproject_la_SOURCES = antprojectpart.cpp antoptionswidget.ui classpathwidget.ui +libkdevantproject_la_SOURCES = antprojectpart.cpp antoptionswidget.ui classpathwidget.ui METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevantproject.desktop +service_DATA = kdevantproject.desktop -rcdir = $(kde_datadir)/tdevantproject -rc_DATA = tdevantproject.rc +rcdir = $(kde_datadir)/kdevantproject +rc_DATA = kdevantproject.rc diff --git a/buildtools/ant/antprojectpart.cpp b/buildtools/ant/antprojectpart.cpp index fcbdd630..902055ec 100644 --- a/buildtools/ant/antprojectpart.cpp +++ b/buildtools/ant/antprojectpart.cpp @@ -11,7 +11,7 @@ #include -#include +#include #include #include #include @@ -21,10 +21,10 @@ #include #include -#include +#include -#include -#include +#include +#include #include @@ -34,9 +34,9 @@ -typedef TDevGenericFactory AntProjectFactory; -static const TDevPluginInfo data("tdevantproject"); -K_EXPORT_COMPONENT_FACTORY(libtdevantproject, AntProjectFactory( data )) +typedef KDevGenericFactory AntProjectFactory; +static const KDevPluginInfo data("kdevantproject"); +K_EXPORT_COMPONENT_FACTORY(libkdevantproject, AntProjectFactory( data )) AntOptions::AntOptions() @@ -46,11 +46,11 @@ AntOptions::AntOptions() AntProjectPart::AntProjectPart(TQObject *parent, const char *name, const TQStringList &) - : TDevBuildTool(&data, parent, name ? name : "AntProjectPart") + : KDevBuildTool(&data, parent, name ? name : "AntProjectPart") { setInstance(AntProjectFactory::instance()); - setXMLFile("tdevantproject.rc"); + setXMLFile("kdevantproject.rc"); m_buildProjectAction = new TDEAction(i18n("&Build Project"), "make_tdevelop", Key_F8, this, TQT_SLOT(slotBuild()), @@ -111,7 +111,7 @@ void AntProjectPart::openProject(const TQString &dirName, const TQString &projec else populateProject(); - TDevProject::openProject( dirName, projectName ); + KDevProject::openProject( dirName, projectName ); } diff --git a/buildtools/ant/antprojectpart.h b/buildtools/ant/antprojectpart.h index f6203c55..e3b325d2 100644 --- a/buildtools/ant/antprojectpart.h +++ b/buildtools/ant/antprojectpart.h @@ -16,7 +16,7 @@ class Context; class ClassPathWidget; -#include "tdevbuildtool.h" +#include "kdevbuildtool.h" class AntOptionsWidget; @@ -40,7 +40,7 @@ public: }; -class AntProjectPart : public TDevBuildTool +class AntProjectPart : public KDevBuildTool { Q_OBJECT diff --git a/buildtools/ant/kdevantproject.desktop b/buildtools/ant/kdevantproject.desktop new file mode 100644 index 00000000..e2880101 --- /dev/null +++ b/buildtools/ant/kdevantproject.desktop @@ -0,0 +1,96 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Ant Project +Comment[br]=Raktres Ant +Comment[ca]=Projecte Ant +Comment[cs]=Ant projekt +Comment[da]=Ant-projekt +Comment[de]=Ant-Projekt für TDevelop +Comment[el]=Έργο Ant +Comment[es]=Proyecto Ant +Comment[et]=Ant projekt +Comment[eu]=Ant proiektua +Comment[fa]=پروژۀ Ant +Comment[fr]=Projet avec Ant +Comment[ga]=Comhad tionscadail Ant +Comment[gl]=Proxecto Ant +Comment[hi]=एएनटी परियोजना +Comment[hu]=Ant-projekt +Comment[is]=Ant verkefni +Comment[it]=Progetto Ant +Comment[ja]=Ant プロジェクト +Comment[ms]=Projek Ant +Comment[nds]=Ant-Projekt +Comment[ne]=एन्ट परियोजना +Comment[nl]=Ant-project +Comment[pa]=Ant ਪ੍ਰੋਜੈਕਟ +Comment[pl]=Projekt: Ant +Comment[pt]=Projecto Ant +Comment[pt_BR]=Projeto Ant +Comment[ru]=Проект Ant +Comment[sk]=Ant projekt +Comment[sl]=Projekt Ant +Comment[sr]=Ant пројекат +Comment[sr@Latn]=Ant projekat +Comment[sv]=Ant-projekt +Comment[ta]=ஆன்ட்பிராஜக்ட் +Comment[tg]=Лоиҳаи Ant +Comment[tr]=Ant Projesi +Comment[uz]=Ant loyihasi +Comment[uz@cyrillic]=Ant лойиҳаси +Comment[zh_CN]=Ant 工程 +Comment[zh_TW]=Ant 專案 +Name=KDevAntProject +Name[da]=TDevelop Ant-projekt +Name[de]=Ant-Projekt (TDevelop) +Name[hi]=के-डेव-एएनटी-परियोजना +Name[nds]=Ant-Projekt (TDevelop) +Name[ne]=केडीई विकास एन्ट परियोजना +Name[pl]=KDevProjektAnt +Name[sk]=KDevAntProjekt +Name[sv]=TDevelop Ant-projekt +Name[ta]=கெடெவ்ஆன்ட் பிராஜக்ட் +Name[tg]=Лоиҳаи KDevAnt +Name[zh_TW]=TDevelop Ant 專案 +GenericName=Ant Project +GenericName[br]=Raktres Ant +GenericName[ca]=Projecte Ant +GenericName[da]=Ant-projekt +GenericName[de]=Ant-Projekt +GenericName[el]=Έργο Ant +GenericName[es]=Proyecto Ant +GenericName[et]=Ant projekt +GenericName[eu]=Ant proiektua +GenericName[fa]=پروژۀ Ant +GenericName[fr]=Projet avec Ant +GenericName[ga]=Comhad tionscadail Ant +GenericName[gl]=Proxecto Ant +GenericName[hi]=एएनटी परियोजना +GenericName[hu]=Ant-projekt +GenericName[it]=Project con Ant +GenericName[ja]=Ant プロジェクト +GenericName[ms]=Projek Ant +GenericName[nds]=Ant-Projekt +GenericName[ne]=एन्ट परियोजना +GenericName[nl]=Ant-project +GenericName[pl]=Projekt: Ant +GenericName[pt]=Projecto Ant +GenericName[pt_BR]=Projeto Ant +GenericName[ru]=Проект Ant +GenericName[sk]=Ant projekt +GenericName[sl]=Projekt Ant +GenericName[sr]=Ant пројекат +GenericName[sr@Latn]=Ant projekat +GenericName[sv]=Ant-projekt +GenericName[ta]=ஆன்ட்பிராஜக்ட் +GenericName[tg]=Лоиҳаи Ant +GenericName[tr]=Ant Projesi +GenericName[uz]=Ant loyihasi +GenericName[uz@cyrillic]=Ant лойиҳаси +GenericName[zh_CN]=Ant 工程 +GenericName[zh_TW]=Ant 專案 +ServiceTypes=TDevelop/Project +X-TDE-Library=libkdevantproject +X-TDevelop-Version=5 +X-TDevelop-Args= diff --git a/buildtools/ant/tdevantproject.rc b/buildtools/ant/kdevantproject.rc similarity index 100% rename from buildtools/ant/tdevantproject.rc rename to buildtools/ant/kdevantproject.rc diff --git a/buildtools/ant/tdevantproject.desktop b/buildtools/ant/tdevantproject.desktop deleted file mode 100644 index bbca6555..00000000 --- a/buildtools/ant/tdevantproject.desktop +++ /dev/null @@ -1,96 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Ant Project -Comment[br]=Raktres Ant -Comment[ca]=Projecte Ant -Comment[cs]=Ant projekt -Comment[da]=Ant-projekt -Comment[de]=Ant-Projekt für TDevelop -Comment[el]=Έργο Ant -Comment[es]=Proyecto Ant -Comment[et]=Ant projekt -Comment[eu]=Ant proiektua -Comment[fa]=پروژۀ Ant -Comment[fr]=Projet avec Ant -Comment[ga]=Comhad tionscadail Ant -Comment[gl]=Proxecto Ant -Comment[hi]=एएनटी परियोजना -Comment[hu]=Ant-projekt -Comment[is]=Ant verkefni -Comment[it]=Progetto Ant -Comment[ja]=Ant プロジェクト -Comment[ms]=Projek Ant -Comment[nds]=Ant-Projekt -Comment[ne]=एन्ट परियोजना -Comment[nl]=Ant-project -Comment[pa]=Ant ਪ੍ਰੋਜੈਕਟ -Comment[pl]=Projekt: Ant -Comment[pt]=Projecto Ant -Comment[pt_BR]=Projeto Ant -Comment[ru]=Проект Ant -Comment[sk]=Ant projekt -Comment[sl]=Projekt Ant -Comment[sr]=Ant пројекат -Comment[sr@Latn]=Ant projekat -Comment[sv]=Ant-projekt -Comment[ta]=ஆன்ட்பிராஜக்ட் -Comment[tg]=Лоиҳаи Ant -Comment[tr]=Ant Projesi -Comment[uz]=Ant loyihasi -Comment[uz@cyrillic]=Ant лойиҳаси -Comment[zh_CN]=Ant 工程 -Comment[zh_TW]=Ant 專案 -Name=KDevAntProject -Name[da]=TDevelop Ant-projekt -Name[de]=Ant-Projekt (TDevelop) -Name[hi]=के-डेव-एएनटी-परियोजना -Name[nds]=Ant-Projekt (TDevelop) -Name[ne]=केडीई विकास एन्ट परियोजना -Name[pl]=KDevProjektAnt -Name[sk]=KDevAntProjekt -Name[sv]=TDevelop Ant-projekt -Name[ta]=கெடெவ்ஆன்ட் பிராஜக்ட் -Name[tg]=Лоиҳаи KDevAnt -Name[zh_TW]=TDevelop Ant 專案 -GenericName=Ant Project -GenericName[br]=Raktres Ant -GenericName[ca]=Projecte Ant -GenericName[da]=Ant-projekt -GenericName[de]=Ant-Projekt -GenericName[el]=Έργο Ant -GenericName[es]=Proyecto Ant -GenericName[et]=Ant projekt -GenericName[eu]=Ant proiektua -GenericName[fa]=پروژۀ Ant -GenericName[fr]=Projet avec Ant -GenericName[ga]=Comhad tionscadail Ant -GenericName[gl]=Proxecto Ant -GenericName[hi]=एएनटी परियोजना -GenericName[hu]=Ant-projekt -GenericName[it]=Project con Ant -GenericName[ja]=Ant プロジェクト -GenericName[ms]=Projek Ant -GenericName[nds]=Ant-Projekt -GenericName[ne]=एन्ट परियोजना -GenericName[nl]=Ant-project -GenericName[pl]=Projekt: Ant -GenericName[pt]=Projecto Ant -GenericName[pt_BR]=Projeto Ant -GenericName[ru]=Проект Ant -GenericName[sk]=Ant projekt -GenericName[sl]=Projekt Ant -GenericName[sr]=Ant пројекат -GenericName[sr@Latn]=Ant projekat -GenericName[sv]=Ant-projekt -GenericName[ta]=ஆன்ட்பிராஜக்ட் -GenericName[tg]=Лоиҳаи Ant -GenericName[tr]=Ant Projesi -GenericName[uz]=Ant loyihasi -GenericName[uz@cyrillic]=Ant лойиҳаси -GenericName[zh_CN]=Ant 工程 -GenericName[zh_TW]=Ant 專案 -ServiceTypes=TDevelop/Project -X-TDE-Library=libtdevantproject -X-TDevelop-Version=5 -X-TDevelop-Args= diff --git a/buildtools/autotools/CMakeLists.txt b/buildtools/autotools/CMakeLists.txt index e33d897c..f7af5bc6 100644 --- a/buildtools/autotools/CMakeLists.txt +++ b/buildtools/autotools/CMakeLists.txt @@ -32,13 +32,13 @@ link_directories( ##### other data ################################ -install( FILES tdevautoproject.desktop tdevtdeautoproject.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevautoproject.rc DESTINATION ${DATA_INSTALL_DIR}/tdevautoproject ) +install( FILES kdevautoproject.desktop kdevtdeautoproject.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevautoproject.rc DESTINATION ${DATA_INSTALL_DIR}/kdevautoproject ) -##### libtdevautoproject (module) ############### +##### libkdevautoproject (module) ############### -tde_add_kpart( libtdevautoproject AUTOMOC +tde_add_kpart( libkdevautoproject AUTOMOC SOURCES autoprojectpart.cpp autoprojectwidget.cpp configureoptionswidget.cpp configureoptionswidgetbase.ui @@ -60,6 +60,6 @@ tde_add_kpart( libtdevautoproject AUTOMOC autolistviewitems.cpp managecustomcommandsbase.ui managecustomcommand.cpp autoprojectviewbase.ui autotoolsaction.cpp makefilehandler.cpp - LINK tdevautotoolsparser-static tdevbuildbase-shared tdevbuildtoolswidgets-shared + LINK kdevautotoolsparser-static kdevbuildbase-shared kdevbuildtoolswidgets-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/buildtools/autotools/Makefile.am b/buildtools/autotools/Makefile.am index a704eb29..98f3ad51 100644 --- a/buildtools/autotools/Makefile.am +++ b/buildtools/autotools/Makefile.am @@ -7,14 +7,14 @@ INCLUDES = -I$(top_srcdir)/buildtools/lib -I$(top_srcdir)/buildtools/lib/base \ -I$(top_builddir)/buildtools/lib/widgets -kde_module_LTLIBRARIES = libtdevautoproject.la -libtdevautoproject_la_LDFLAGS = $(all_libraries) $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEPARTS) $(KDE_PLUGIN) -libtdevautoproject_la_LIBADD = \ - $(top_builddir)/buildtools/lib/base/libtdevbuildbase.la \ - $(top_builddir)/buildtools/lib/parsers/autotools/libtdevautotoolsparser.la $(top_builddir)/buildtools/lib/widgets/libtdevbuildtoolswidgets.la \ - $(top_builddir)/lib/interfaces/extras/libtdevextras.la $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevautoproject.la +libkdevautoproject_la_LDFLAGS = $(all_libraries) $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEPARTS) $(KDE_PLUGIN) +libkdevautoproject_la_LIBADD = \ + $(top_builddir)/buildtools/lib/base/libkdevbuildbase.la \ + $(top_builddir)/buildtools/lib/parsers/autotools/libkdevautotoolsparser.la $(top_builddir)/buildtools/lib/widgets/libkdevbuildtoolswidgets.la \ + $(top_builddir)/lib/interfaces/extras/libkdevextras.la $(top_builddir)/lib/libtdevelop.la -libtdevautoproject_la_SOURCES = autoprojectpart.cpp autoprojectwidget.cpp \ +libkdevautoproject_la_SOURCES = autoprojectpart.cpp autoprojectwidget.cpp \ configureoptionswidget.cpp configureoptionswidgetbase.ui subprojectoptionsdlg.cpp \ subprojectoptionsdlgbase.ui targetoptionsdlg.cpp targetoptionsdlgbase.ui addservicedlg.cpp \ addservicedlgbase.ui addapplicationdlg.cpp addapplicationdlgbase.ui addtargetdlg.cpp \ @@ -30,9 +30,9 @@ libtdevautoproject_la_SOURCES = autoprojectpart.cpp autoprojectwidget.cpp \ METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevautoproject.desktop tdevtdeautoproject.desktop +service_DATA = kdevautoproject.desktop kdevtdeautoproject.desktop -rcdir = $(kde_datadir)/tdevautoproject -rc_DATA = tdevautoproject.rc +rcdir = $(kde_datadir)/kdevautoproject +rc_DATA = kdevautoproject.rc noinst_HEADERS = managecustomcommand.h autotoolsaction.h makefilehandler.h diff --git a/buildtools/autotools/addfiledlg.cpp b/buildtools/autotools/addfiledlg.cpp index 18bf87a8..d3f71637 100644 --- a/buildtools/autotools/addfiledlg.cpp +++ b/buildtools/autotools/addfiledlg.cpp @@ -36,7 +36,7 @@ #include "autoprojectpart.h" #include "autoprojectwidget.h" -#include "tdevpartcontroller.h" +#include "kdevpartcontroller.h" AddFileDialog::AddFileDialog(AutoProjectPart *part, AutoProjectWidget *widget, SubprojectItem *spitem, TargetItem *item, diff --git a/buildtools/autotools/addsubprojectdlg.cpp b/buildtools/autotools/addsubprojectdlg.cpp index fa64c506..59cebc53 100644 --- a/buildtools/autotools/addsubprojectdlg.cpp +++ b/buildtools/autotools/addsubprojectdlg.cpp @@ -25,7 +25,7 @@ #include "autolistviewitems.h" -#include "tdevmakefrontend.h" +#include "kdevmakefrontend.h" #include "misc.h" #include "autoprojectpart.h" #include "autosubprojectview.h" diff --git a/buildtools/autotools/autodetailsview.cpp b/buildtools/autotools/autodetailsview.cpp index 34060b61..91b6d75c 100644 --- a/buildtools/autotools/autodetailsview.cpp +++ b/buildtools/autotools/autodetailsview.cpp @@ -32,13 +32,13 @@ #include /** KDevelop */ -#include "tdevappfrontend.h" -#include "tdevcore.h" -#include "tdevmainwindow.h" -#include "tdevpartcontroller.h" -#include "tdevcreatefile.h" -#include "tdevlanguagesupport.h" -#include "tdevmakefrontend.h" +#include "kdevappfrontend.h" +#include "kdevcore.h" +#include "kdevmainwindow.h" +#include "kdevpartcontroller.h" +#include "kdevcreatefile.h" +#include "kdevlanguagesupport.h" +#include "kdevmakefrontend.h" #include "urlutil.h" #include "domutil.h" @@ -294,13 +294,13 @@ void AutoDetailsView::slotAddNewFile() if ( !titem ) return; - TDevCreateFile * createFileSupport = m_part->extension("TDevelop/CreateFile"); + KDevCreateFile * createFileSupport = m_part->extension("TDevelop/CreateFile"); if (createFileSupport) { - TDevCreateFile::CreatedFile crFile = + KDevCreateFile::CreatedFile crFile = createFileSupport->createNewFile(TQString(), m_widget->selectedSubproject()->path); -/* if (crFile.status == TDevCreateFile::CreatedFile::STATUS_OK) +/* if (crFile.status == KDevCreateFile::CreatedFile::STATUS_OK) { FileItem *fitem = m_widget->createFileItem(crFile.filename, m_widget->selectedSubproject()); titem->sources.append(fitem); diff --git a/buildtools/autotools/autoprojectpart.cpp b/buildtools/autotools/autoprojectpart.cpp index ae5453bc..6b408bd0 100644 --- a/buildtools/autotools/autoprojectpart.cpp +++ b/buildtools/autotools/autoprojectpart.cpp @@ -45,34 +45,34 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include #include -#include +#include #include #define CONFIGURE_OPTIONS 1 #define RUN_OPTIONS 2 #define MAKE_OPTIONS 3 -static const TDevPluginInfo data("tdevautoproject"); +static const KDevPluginInfo data("kdevautoproject"); -K_EXPORT_COMPONENT_FACTORY( libtdevautoproject, AutoProjectFactory( data ) ) +K_EXPORT_COMPONENT_FACTORY( libkdevautoproject, AutoProjectFactory( data ) ) AutoProjectPart::AutoProjectPart(TQObject *parent, const char *name, const TQStringList &args) - : TDevBuildTool(&data, parent, name ? name : "AutoProjectPart") + : KDevBuildTool(&data, parent, name ? name : "AutoProjectPart") , m_lastCompilationFailed(false) { setInstance(AutoProjectFactory::instance()); - setXMLFile("tdevautoproject.rc"); + setXMLFile("kdevautoproject.rc"); m_executeAfterBuild = false; m_isKDE = (args[0] == "kde"); @@ -310,7 +310,7 @@ void AutoProjectPart::openProject(const TQString &dirName, const TQString &proje "Project -> Project Options -> Run Options"), i18n("No active target specified"), "tdevelop_open_project_no_active_target"); } - TDevProject::openProject( dirName, projectName ); + KDevProject::openProject( dirName, projectName ); } @@ -358,7 +358,7 @@ TQString AutoProjectPart::runDirectory() const TQString cwd; if( DomUtil::readBoolEntry(dom, "/kdevautoproject/run/useglobalprogram", false) || !m_widget->activeTarget() ) { - cwd = defaultRunDirectory("tdevautoproject"); + cwd = defaultRunDirectory("kdevautoproject"); }else { cwd = DomUtil::readEntry( dom, "/kdevautoproject/run/cwd/"+m_widget->activeTarget()->name ); @@ -585,7 +585,7 @@ TQStringList AutoProjectPart::allBuildConfigs() const TQStringList allConfigs; allConfigs.append("default"); - TQDomNode node = dom.documentElement().namedItem("tdevautoproject").namedItem("configurations"); + TQDomNode node = dom.documentElement().namedItem("kdevautoproject").namedItem("configurations"); TQDomElement childEl = node.firstChild().toElement(); while (!childEl.isNull()) { @@ -1075,7 +1075,7 @@ TQString AutoProjectPart::updateAdminDirectoryCommand() const // Find the admin tarball TDEStandardDirs dirs; - dirs.addResourceType("apptemplates", TDEStandardDirs::kde_default("data") + "tdevappwizard/template-common/"); + dirs.addResourceType("apptemplates", TDEStandardDirs::kde_default("data") + "kdevappwizard/template-common/"); source = dirs.findResource("apptemplates", "admin.tar.gz"); if (source != "") { TQString cmdline = "rm -rf admin && tar -xzvf "; @@ -1453,7 +1453,7 @@ bool AutoProjectPart::isKDE() const return m_isKDE; } -TDevProject::Options AutoProjectPart::options() const +KDevProject::Options AutoProjectPart::options() const { return UsesAutotoolsBuildSystem; } diff --git a/buildtools/autotools/autoprojectpart.h b/buildtools/autotools/autoprojectpart.h index 08d83719..83066c3c 100644 --- a/buildtools/autotools/autoprojectpart.h +++ b/buildtools/autotools/autoprojectpart.h @@ -20,8 +20,8 @@ #include #include #include -#include -#include "tdevbuildtool.h" +#include +#include "kdevbuildtool.h" class TQDomElement; class TQStringList; @@ -31,7 +31,7 @@ class TDESelectAction; class TargetItem; class ConfigWidgetProxy; -class AutoProjectPart : public TDevBuildTool +class AutoProjectPart : public KDevBuildTool { Q_OBJECT @@ -41,7 +41,7 @@ public: virtual ~AutoProjectPart(); /** - * Implementation of the TDevProject interface. + * Implementation of the KDevProject interface. */ virtual TQString projectDirectory() const; virtual TQString projectName() const; @@ -61,7 +61,7 @@ public: virtual Options options() const; /** - * Implementation of the TDevPlugin interface. + * Implementation of the KDevPlugin interface. */ virtual void restorePartialProjectSession ( const TQDomElement* el ); virtual void savePartialProjectSession ( TQDomElement* el ); @@ -85,7 +85,7 @@ public: protected: /** - * Reimplemented from TDevProject. These methods are only + * Reimplemented from KDevProject. These methods are only * for use by the application core. */ virtual void openProject( const TQString &dirName, const TQString &projectName ); @@ -151,7 +151,7 @@ private: bool queueInternalLibDependenciesBuild( TargetItem* titem, TQStringList& list ); }; -typedef TDevGenericFactory AutoProjectFactory; +typedef KDevGenericFactory AutoProjectFactory; #endif // kate: indent-mode csands; tab-width 4; diff --git a/buildtools/autotools/autoprojectwidget.cpp b/buildtools/autotools/autoprojectwidget.cpp index c41a60dc..a558a593 100644 --- a/buildtools/autotools/autoprojectwidget.cpp +++ b/buildtools/autotools/autoprojectwidget.cpp @@ -42,7 +42,7 @@ #include #include -#include "tdevcore.h" +#include "kdevcore.h" #include "domutil.h" #include "misc.h" #include "choosetargetdialog.h" diff --git a/buildtools/autotools/autosubprojectview.cpp b/buildtools/autotools/autosubprojectview.cpp index 0eecfe4b..8353e2ea 100644 --- a/buildtools/autotools/autosubprojectview.cpp +++ b/buildtools/autotools/autosubprojectview.cpp @@ -34,10 +34,10 @@ #include /** KDevelop */ -#include -#include -#include -#include +#include +#include +#include +#include #include /** AutoProject */ diff --git a/buildtools/autotools/choosetargetdialog.cpp b/buildtools/autotools/choosetargetdialog.cpp index fad399f3..8b59545f 100644 --- a/buildtools/autotools/choosetargetdialog.cpp +++ b/buildtools/autotools/choosetargetdialog.cpp @@ -43,7 +43,7 @@ #include "autoprojectwidget.h" #include "autoprojectpart.h" -#include "tdevpartcontroller.h" +#include "kdevpartcontroller.h" class ChooseTargetDialog::Private { diff --git a/buildtools/autotools/configureoptionswidget.cpp b/buildtools/autotools/configureoptionswidget.cpp index c991d15d..cc39aa07 100644 --- a/buildtools/autotools/configureoptionswidget.cpp +++ b/buildtools/autotools/configureoptionswidget.cpp @@ -29,7 +29,7 @@ #include #include -#include "tdevcompileroptions.h" +#include "kdevcompileroptions.h" #include "autoprojectpart.h" #include "environmentvariableswidget.h" @@ -310,7 +310,7 @@ void ConfigureOptionsWidget::configRemoved() TQString config = config_combo->currentText(); TQDomDocument dom = *m_part->projectDom(); - TQDomNode node = dom.documentElement().namedItem("tdevautoproject").namedItem("configurations"); + TQDomNode node = dom.documentElement().namedItem("kdevautoproject").namedItem("configurations"); node.removeChild(node.namedItem(config)); allConfigs.remove(config); @@ -348,7 +348,7 @@ void ConfigureOptionsWidget::f77serviceChanged() void ConfigureOptionsWidget::cflagsClicked() { TQString name = ServiceComboBox::currentText(cservice_combo, cservice_names); - TDevCompilerOptions *plugin = createCompilerOptions(name); + KDevCompilerOptions *plugin = createCompilerOptions(name); if (plugin) { TQString flags = plugin->exec(this, cflags_edit->text()); @@ -361,7 +361,7 @@ void ConfigureOptionsWidget::cflagsClicked() void ConfigureOptionsWidget::cxxflagsClicked() { TQString name = ServiceComboBox::currentText(cxxservice_combo, cxxservice_names); - TDevCompilerOptions *plugin = createCompilerOptions(name); + KDevCompilerOptions *plugin = createCompilerOptions(name); if (plugin) { TQString flags = plugin->exec(this, cxxflags_edit->text()); @@ -374,7 +374,7 @@ void ConfigureOptionsWidget::cxxflagsClicked() void ConfigureOptionsWidget::f77flagsClicked() { TQString name = ServiceComboBox::currentText(f77service_combo, f77service_names); - TDevCompilerOptions *plugin = createCompilerOptions(name); + KDevCompilerOptions *plugin = createCompilerOptions(name); if (plugin) { TQString flags = plugin->exec(this, f77flags_edit->text()); @@ -384,7 +384,7 @@ void ConfigureOptionsWidget::f77flagsClicked() } -TDevCompilerOptions *ConfigureOptionsWidget::createCompilerOptions(const TQString &name) +KDevCompilerOptions *ConfigureOptionsWidget::createCompilerOptions(const TQString &name) { KService::Ptr service = KService::serviceByDesktopName(name); if (!service) { @@ -406,13 +406,13 @@ TDevCompilerOptions *ConfigureOptionsWidget::createCompilerOptions(const TQStrin args = TQStringList::split(" ", prop.toString()); TQObject *obj = factory->create(TQT_TQOBJECT(this), service->name().latin1(), - "TDevCompilerOptions", args); + "KDevCompilerOptions", args); - if (!obj->inherits("TDevCompilerOptions")) { - kdDebug(9020) << "Component does not inherit TDevCompilerOptions" << endl; + if (!obj->inherits("KDevCompilerOptions")) { + kdDebug(9020) << "Component does not inherit KDevCompilerOptions" << endl; return 0; } - TDevCompilerOptions *dlg = (TDevCompilerOptions*) obj; + KDevCompilerOptions *dlg = (KDevCompilerOptions*) obj; return dlg; } diff --git a/buildtools/autotools/configureoptionswidget.h b/buildtools/autotools/configureoptionswidget.h index dfab95cc..e40874de 100644 --- a/buildtools/autotools/configureoptionswidget.h +++ b/buildtools/autotools/configureoptionswidget.h @@ -18,7 +18,7 @@ #include "domutil.h" -class TDevCompilerOptions; +class KDevCompilerOptions; class AutoProjectPart; class EnvironmentVariablesWidget; @@ -53,7 +53,7 @@ private: void readSettings( const TQString &config ); void saveSettings( const TQString &config ); - TDevCompilerOptions *createCompilerOptions( const TQString &lang ); + KDevCompilerOptions *createCompilerOptions( const TQString &lang ); TDETrader::OfferList coffers, cxxoffers, f77offers; TQStringList cservice_names, cservice_execs; TQStringList cxxservice_names, cxxservice_execs; diff --git a/buildtools/autotools/fileselectorwidget.cpp b/buildtools/autotools/fileselectorwidget.cpp index afd09d4b..c10db050 100644 --- a/buildtools/autotools/fileselectorwidget.cpp +++ b/buildtools/autotools/fileselectorwidget.cpp @@ -43,7 +43,7 @@ #include "autoprojectwidget.h" #include "autoprojectpart.h" -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" #include "tdefilednddetailview.h" #include "tdefiledndiconview.h" @@ -140,7 +140,7 @@ FileSelectorWidget::FileSelectorWidget(AutoProjectPart* part, KFile::Mode mode, /* read the file patterns from the project DOM */ TQDomElement docEl = m_part->projectDom()->documentElement(); - TQDomElement fileviewEl = docEl.namedItem("tdevfileview").toElement(); + TQDomElement fileviewEl = docEl.namedItem("kdevfileview").toElement(); TQDomElement groupsEl = fileviewEl.namedItem("groups").toElement(); TQDomElement groupEl = groupsEl.firstChild().toElement(); diff --git a/buildtools/autotools/kdevautoproject.desktop b/buildtools/autotools/kdevautoproject.desktop new file mode 100644 index 00000000..a149c870 --- /dev/null +++ b/buildtools/autotools/kdevautoproject.desktop @@ -0,0 +1,97 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Automake Project +Comment[br]=Raktres Automake +Comment[ca]=Projecte Automake +Comment[da]=Automake-projekt +Comment[de]=Automake-Projekt für TDevelop +Comment[el]=Έργο Automake +Comment[es]=Proyecto de Automake +Comment[et]=Automake'i project +Comment[eu]=Automake proiektua +Comment[fa]=پروژۀ Automake +Comment[fr]=Projet avec Automake +Comment[ga]=Comhad tionscadail Automake +Comment[gl]=Proxecto Automake +Comment[hi]=ऑटोमेक परियोजना +Comment[hu]=Automake-projekt +Comment[is]=Automake verkefni +Comment[it]=Progetto per automake +Comment[ja]=Automake プロジェクト +Comment[ms]=Projek Automake +Comment[nds]=Automake-Projekt +Comment[ne]=स्वत: निर्माण परियोजना +Comment[nl]=Automake-project +Comment[pa]=ਆਟੋਮੈਕ ਪ੍ਰੋਜੈਕਟ +Comment[pl]=Projekt: Automake +Comment[pt]=Projecto Automake +Comment[pt_BR]=Projeto Automake +Comment[ru]=Проект Automake +Comment[sk]=Automake projekt +Comment[sl]=Projekt automake +Comment[sr]=Automake пројекат +Comment[sr@Latn]=Automake projekat +Comment[sv]=Automake-projekt +Comment[ta]=ஆட்டோமேக் பிராஜக்ட் +Comment[tg]=Лоиҳаи Automake +Comment[tr]=Automake Projesi +Comment[uz]=Automake loyihasi +Comment[uz@cyrillic]=Automake лойиҳаси +Comment[zh_CN]=Automake 工程 +Comment[zh_TW]=Automake 專案 +Name=KDevAutoProject +Name[da]=TDevelop Automake-projekt +Name[de]=Automake-Projekt (TDevelop) +Name[hi]=के-डेव-ऑटो-परियोजना +Name[nds]=Automake-Projekt (TDevelop) +Name[ne]=केडीई विकास स्वत: परियोजना +Name[pl]=KDevProjektAuto +Name[pt_BR]=KDevAutoProjeto +Name[sk]=KDevAutoProjekt +Name[sv]=TDevelop autoprojekt +Name[ta]=கெடெவ்ஆட்டோ பிராஜக்ட் +Name[tg]=Лоиҳаи KDevAuto +Name[zh_TW]=TDevelop Automake 專案 +GenericName=Automake Project +GenericName[br]=Raktres Automake +GenericName[ca]=Projecte Automake +GenericName[da]=Automake-projekt +GenericName[de]=Automake-Projekt +GenericName[el]=Έργο Automake +GenericName[es]=Proyecto de Automake +GenericName[et]=Automake'i projekt +GenericName[eu]=Automake proiektua +GenericName[fa]=پروژۀ Automake +GenericName[fr]=Projet avec Automake +GenericName[ga]=Comhad tionscadail Automake +GenericName[gl]=Proxecto Automake +GenericName[hi]=ऑटोमेक परियोजना +GenericName[hu]=Automake-projekt +GenericName[it]=Progetto Automake +GenericName[ja]=Automake プロジェクト +GenericName[ms]=Projek Automake +GenericName[nds]=Automake-Projekt +GenericName[ne]=स्वत: निर्माण परियोजना +GenericName[nl]=Automake-project +GenericName[pl]=Projekt: Automake +GenericName[pt]=Projecto de Automake +GenericName[pt_BR]=Projeto Automake +GenericName[ru]=Проект Automake +GenericName[sk]=Automake projekt +GenericName[sl]=Projekt automake +GenericName[sr]=Automake пројекат +GenericName[sr@Latn]=Automake projekat +GenericName[sv]=Automake-projekt +GenericName[ta]=ஆட்டோமேக் பிராஜக்ட் +GenericName[tg]=Лоиҳаи Automake +GenericName[tr]=Automake Projesi +GenericName[uz]=Automake loyihasi +GenericName[uz@cyrillic]=Automake лойиҳаси +GenericName[zh_CN]=Automake 工程 +GenericName[zh_TW]=Automake 專案 +ServiceTypes=TDevelop/Project +Icon=make +X-TDE-Library=libkdevautoproject +X-TDevelop-Version=5 +X-TDevelop-Args= diff --git a/buildtools/autotools/tdevautoproject.rc b/buildtools/autotools/kdevautoproject.rc similarity index 100% rename from buildtools/autotools/tdevautoproject.rc rename to buildtools/autotools/kdevautoproject.rc diff --git a/buildtools/autotools/kdevtdeautoproject.desktop b/buildtools/autotools/kdevtdeautoproject.desktop new file mode 100644 index 00000000..b9b6abd8 --- /dev/null +++ b/buildtools/autotools/kdevtdeautoproject.desktop @@ -0,0 +1,92 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=TDE Automake Project +Comment[br]=Raktres TDE Automake +Comment[ca]=Projecte Automake per al TDE +Comment[da]=TDE Automake-projekt +Comment[de]=TDE-Automake-Projekt für TDevelop +Comment[el]=Έργο TDE Automake +Comment[es]=Proyecto de Automake de TDE +Comment[et]=TDE automake'i projekt +Comment[eu]=TDE automake proiektua +Comment[fa]=پروژۀ TDE Automake +Comment[fr]=Projet Automake pour TDE +Comment[ga]=Tionscadal Automake TDE +Comment[gl]=Proxecto Automake de TDE +Comment[hi]=केडीई ऑटोमेक परियोजना +Comment[hu]=TDE Automake-projekt +Comment[is]=TDE Automake verkefni +Comment[it]=Progetto TDE per automake +Comment[ja]=TDE Automake プロジェクト +Comment[ms]=Projek Automake TDE +Comment[nds]=Automake-Projekt vun TDE +Comment[ne]=केडीई स्वत: निर्माण परियोजना +Comment[nl]=TDE Automake-project +Comment[pt]=Projecto Automake do TDE +Comment[pt_BR]=Projeto Automake do TDE +Comment[ru]=Проект TDE Automake +Comment[sk]=TDE Automake projekt +Comment[sl]=Projekt TDE Automake +Comment[sr]=TDE-ов Automake пројекат +Comment[sr@Latn]=TDE-ov Automake projekat +Comment[sv]=TDE Automake-projekt +Comment[ta]=TDE ஆட்டோமேக் பிராஜக்ட் +Comment[tg]=Лоиҳаи TDE Automake +Comment[tr]=TDE Automake Projesi +Comment[zh_CN]=TDE Automake 工程 +Comment[zh_TW]=TDE Automake 專案 +Name=KDevTDEAutoProject +Name[da]=TDevelop TDE Automake-projekt +Name[de]=TDE-Automake-Projekt (TDevelop) +Name[hi]=के-डेव-केडीई-ऑटो-परियोजना +Name[nds]=Automake-Projekt (TDE/TDevelop) +Name[ne]=केडीई विकास केडीई स्वत: परियोजना +Name[pl]=KDevProjektTDEAuto +Name[pt_BR]=KDevTDEAutoProjeto +Name[sk]=KDevAutoProjekt +Name[sv]=TDevelop TDE-autoprojekt +Name[ta]=கெடெவ்ஆட்டோ பிராஜக்ட் +Name[tg]=Лоиҳаи худкори KDevTDEAuto +Name[zh_TW]=TDevelop TDE Automake 專案 +GenericName=TDE Automake Project +GenericName[br]=Raktres TDE Automake +GenericName[ca]=Projecte Automake per al TDE +GenericName[cs]=TDE Automake projekt +GenericName[da]=TDE Automake-projekt +GenericName[de]=TDE-Automake-Projekt +GenericName[el]=Έργο TDE Automake +GenericName[es]=Proyecto de Automake de TDE +GenericName[et]=TDE automake'i projekt +GenericName[eu]=TDE automake proiektua +GenericName[fa]=پروژۀ TDE Automake +GenericName[fr]=Projet avec Automake pour TDE +GenericName[ga]=Tionscadal Automake TDE +GenericName[gl]=Proxecto Automake de TDE +GenericName[hi]=केडीई ऑटोमेक परियोजना +GenericName[hu]=TDE Automake-projekt +GenericName[it]=Progetto TDE Automake +GenericName[ja]=TDE Automake プロジェクト +GenericName[ms]=Projek Automake TDE +GenericName[nds]=Automake-Projekt vun TDE +GenericName[ne]=केडीई स्वत: निर्माण परियोजना +GenericName[nl]=TDE Automake-project +GenericName[pl]=Projekt: TDE Automake +GenericName[pt]=Projecto TDE com Automake +GenericName[pt_BR]=Projeto Automake do TDE +GenericName[ru]=Проект TDE Automake +GenericName[sk]=TDE Automake projekt +GenericName[sl]=Projekt TDE Automake +GenericName[sr]=TDE-ов Automake пројекат +GenericName[sr@Latn]=TDE-ov Automake projekat +GenericName[sv]=TDE Automake-projekt +GenericName[ta]=TDE ஆட்டோமேக் பிராஜக்ட் +GenericName[tg]=Лоиҳаи TDE Automake +GenericName[tr]=TDE Automake Projesi +GenericName[zh_CN]=TDE Automake 工程 +GenericName[zh_TW]=TDE Automake 專案 +ServiceTypes=TDevelop/Project +Icon=make +X-TDE-Library=libkdevautoproject +X-TDevelop-Version=5 +X-TDevelop-Args=kde diff --git a/buildtools/autotools/misc.cpp b/buildtools/autotools/misc.cpp index f1174b21..ec58b54c 100644 --- a/buildtools/autotools/misc.cpp +++ b/buildtools/autotools/misc.cpp @@ -21,10 +21,10 @@ #include "misc.h" -#include "tdevcompileroptions.h" +#include "kdevcompileroptions.h" -static TDevCompilerOptions *createCompilerOptions( const TQString &name, TQObject *parent ) +static KDevCompilerOptions *createCompilerOptions( const TQString &name, TQObject *parent ) { KService::Ptr service = KService::serviceByDesktopName( name ); if ( !service ) @@ -48,13 +48,13 @@ static TDevCompilerOptions *createCompilerOptions( const TQString &name, TQObjec args = TQStringList::split(" ", prop.toString()); TQObject *obj = factory->create(parent, service->name().latin1(), - "TDevCompilerOptions", args); + "KDevCompilerOptions", args); - if (!obj->inherits("TDevCompilerOptions")) { - kdDebug(9020) << "Component does not inherit TDevCompilerOptions" << endl; + if (!obj->inherits("KDevCompilerOptions")) { + kdDebug(9020) << "Component does not inherit KDevCompilerOptions" << endl; return 0; } - TDevCompilerOptions *dlg = (TDevCompilerOptions*) obj; + KDevCompilerOptions *dlg = (KDevCompilerOptions*) obj; return dlg; @@ -65,14 +65,14 @@ static TDevCompilerOptions *createCompilerOptions( const TQString &name, TQObjec args = TQStringList::split( " ", prop.toString() ); return KParts::ComponentFactory - ::createInstanceFromService( service, parent, + ::createInstanceFromService( service, parent, service->name().latin1(), args );*/ } TQString AutoProjectTool::execFlagsDialog( const TQString &compiler, const TQString &flags, TQWidget *parent ) { - TDevCompilerOptions * plugin = createCompilerOptions( compiler, TQT_TQOBJECT(parent) ); + KDevCompilerOptions * plugin = createCompilerOptions( compiler, TQT_TQOBJECT(parent) ); if ( plugin ) { diff --git a/buildtools/autotools/removefiledlg.cpp b/buildtools/autotools/removefiledlg.cpp index 6508d126..e265a969 100644 --- a/buildtools/autotools/removefiledlg.cpp +++ b/buildtools/autotools/removefiledlg.cpp @@ -155,7 +155,7 @@ void RemoveFileDialog::accept() TQDomDocument &dom = *(m_part->projectDom()); TQDomElement el = dom.documentElement(); - TQDomNode el2 = el.namedItem("tdevautoproject"); + TQDomNode el2 = el.namedItem("kdevautoproject"); TQDomNode el3 = el2.namedItem("subclassing"); TQDomNode n = el3.firstChild(); diff --git a/buildtools/autotools/tdevautoproject.desktop b/buildtools/autotools/tdevautoproject.desktop deleted file mode 100644 index ad164259..00000000 --- a/buildtools/autotools/tdevautoproject.desktop +++ /dev/null @@ -1,97 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Automake Project -Comment[br]=Raktres Automake -Comment[ca]=Projecte Automake -Comment[da]=Automake-projekt -Comment[de]=Automake-Projekt für TDevelop -Comment[el]=Έργο Automake -Comment[es]=Proyecto de Automake -Comment[et]=Automake'i project -Comment[eu]=Automake proiektua -Comment[fa]=پروژۀ Automake -Comment[fr]=Projet avec Automake -Comment[ga]=Comhad tionscadail Automake -Comment[gl]=Proxecto Automake -Comment[hi]=ऑटोमेक परियोजना -Comment[hu]=Automake-projekt -Comment[is]=Automake verkefni -Comment[it]=Progetto per automake -Comment[ja]=Automake プロジェクト -Comment[ms]=Projek Automake -Comment[nds]=Automake-Projekt -Comment[ne]=स्वत: निर्माण परियोजना -Comment[nl]=Automake-project -Comment[pa]=ਆਟੋਮੈਕ ਪ੍ਰੋਜੈਕਟ -Comment[pl]=Projekt: Automake -Comment[pt]=Projecto Automake -Comment[pt_BR]=Projeto Automake -Comment[ru]=Проект Automake -Comment[sk]=Automake projekt -Comment[sl]=Projekt automake -Comment[sr]=Automake пројекат -Comment[sr@Latn]=Automake projekat -Comment[sv]=Automake-projekt -Comment[ta]=ஆட்டோமேக் பிராஜக்ட் -Comment[tg]=Лоиҳаи Automake -Comment[tr]=Automake Projesi -Comment[uz]=Automake loyihasi -Comment[uz@cyrillic]=Automake лойиҳаси -Comment[zh_CN]=Automake 工程 -Comment[zh_TW]=Automake 專案 -Name=KDevAutoProject -Name[da]=TDevelop Automake-projekt -Name[de]=Automake-Projekt (TDevelop) -Name[hi]=के-डेव-ऑटो-परियोजना -Name[nds]=Automake-Projekt (TDevelop) -Name[ne]=केडीई विकास स्वत: परियोजना -Name[pl]=KDevProjektAuto -Name[pt_BR]=KDevAutoProjeto -Name[sk]=KDevAutoProjekt -Name[sv]=TDevelop autoprojekt -Name[ta]=கெடெவ்ஆட்டோ பிராஜக்ட் -Name[tg]=Лоиҳаи KDevAuto -Name[zh_TW]=TDevelop Automake 專案 -GenericName=Automake Project -GenericName[br]=Raktres Automake -GenericName[ca]=Projecte Automake -GenericName[da]=Automake-projekt -GenericName[de]=Automake-Projekt -GenericName[el]=Έργο Automake -GenericName[es]=Proyecto de Automake -GenericName[et]=Automake'i projekt -GenericName[eu]=Automake proiektua -GenericName[fa]=پروژۀ Automake -GenericName[fr]=Projet avec Automake -GenericName[ga]=Comhad tionscadail Automake -GenericName[gl]=Proxecto Automake -GenericName[hi]=ऑटोमेक परियोजना -GenericName[hu]=Automake-projekt -GenericName[it]=Progetto Automake -GenericName[ja]=Automake プロジェクト -GenericName[ms]=Projek Automake -GenericName[nds]=Automake-Projekt -GenericName[ne]=स्वत: निर्माण परियोजना -GenericName[nl]=Automake-project -GenericName[pl]=Projekt: Automake -GenericName[pt]=Projecto de Automake -GenericName[pt_BR]=Projeto Automake -GenericName[ru]=Проект Automake -GenericName[sk]=Automake projekt -GenericName[sl]=Projekt automake -GenericName[sr]=Automake пројекат -GenericName[sr@Latn]=Automake projekat -GenericName[sv]=Automake-projekt -GenericName[ta]=ஆட்டோமேக் பிராஜக்ட் -GenericName[tg]=Лоиҳаи Automake -GenericName[tr]=Automake Projesi -GenericName[uz]=Automake loyihasi -GenericName[uz@cyrillic]=Automake лойиҳаси -GenericName[zh_CN]=Automake 工程 -GenericName[zh_TW]=Automake 專案 -ServiceTypes=TDevelop/Project -Icon=make -X-TDE-Library=libtdevautoproject -X-TDevelop-Version=5 -X-TDevelop-Args= diff --git a/buildtools/autotools/tdevtdeautoproject.desktop b/buildtools/autotools/tdevtdeautoproject.desktop deleted file mode 100644 index 5ed348d1..00000000 --- a/buildtools/autotools/tdevtdeautoproject.desktop +++ /dev/null @@ -1,92 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=TDE Automake Project -Comment[br]=Raktres TDE Automake -Comment[ca]=Projecte Automake per al TDE -Comment[da]=TDE Automake-projekt -Comment[de]=TDE-Automake-Projekt für TDevelop -Comment[el]=Έργο TDE Automake -Comment[es]=Proyecto de Automake de TDE -Comment[et]=TDE automake'i projekt -Comment[eu]=TDE automake proiektua -Comment[fa]=پروژۀ TDE Automake -Comment[fr]=Projet Automake pour TDE -Comment[ga]=Tionscadal Automake TDE -Comment[gl]=Proxecto Automake de TDE -Comment[hi]=केडीई ऑटोमेक परियोजना -Comment[hu]=TDE Automake-projekt -Comment[is]=TDE Automake verkefni -Comment[it]=Progetto TDE per automake -Comment[ja]=TDE Automake プロジェクト -Comment[ms]=Projek Automake TDE -Comment[nds]=Automake-Projekt vun TDE -Comment[ne]=केडीई स्वत: निर्माण परियोजना -Comment[nl]=TDE Automake-project -Comment[pt]=Projecto Automake do TDE -Comment[pt_BR]=Projeto Automake do TDE -Comment[ru]=Проект TDE Automake -Comment[sk]=TDE Automake projekt -Comment[sl]=Projekt TDE Automake -Comment[sr]=TDE-ов Automake пројекат -Comment[sr@Latn]=TDE-ov Automake projekat -Comment[sv]=TDE Automake-projekt -Comment[ta]=TDE ஆட்டோமேக் பிராஜக்ட் -Comment[tg]=Лоиҳаи TDE Automake -Comment[tr]=TDE Automake Projesi -Comment[zh_CN]=TDE Automake 工程 -Comment[zh_TW]=TDE Automake 專案 -Name=KDevTDEAutoProject -Name[da]=TDevelop TDE Automake-projekt -Name[de]=TDE-Automake-Projekt (TDevelop) -Name[hi]=के-डेव-केडीई-ऑटो-परियोजना -Name[nds]=Automake-Projekt (TDE/TDevelop) -Name[ne]=केडीई विकास केडीई स्वत: परियोजना -Name[pl]=KDevProjektTDEAuto -Name[pt_BR]=KDevTDEAutoProjeto -Name[sk]=KDevAutoProjekt -Name[sv]=TDevelop TDE-autoprojekt -Name[ta]=கெடெவ்ஆட்டோ பிராஜக்ட் -Name[tg]=Лоиҳаи худкори KDevTDEAuto -Name[zh_TW]=TDevelop TDE Automake 專案 -GenericName=TDE Automake Project -GenericName[br]=Raktres TDE Automake -GenericName[ca]=Projecte Automake per al TDE -GenericName[cs]=TDE Automake projekt -GenericName[da]=TDE Automake-projekt -GenericName[de]=TDE-Automake-Projekt -GenericName[el]=Έργο TDE Automake -GenericName[es]=Proyecto de Automake de TDE -GenericName[et]=TDE automake'i projekt -GenericName[eu]=TDE automake proiektua -GenericName[fa]=پروژۀ TDE Automake -GenericName[fr]=Projet avec Automake pour TDE -GenericName[ga]=Tionscadal Automake TDE -GenericName[gl]=Proxecto Automake de TDE -GenericName[hi]=केडीई ऑटोमेक परियोजना -GenericName[hu]=TDE Automake-projekt -GenericName[it]=Progetto TDE Automake -GenericName[ja]=TDE Automake プロジェクト -GenericName[ms]=Projek Automake TDE -GenericName[nds]=Automake-Projekt vun TDE -GenericName[ne]=केडीई स्वत: निर्माण परियोजना -GenericName[nl]=TDE Automake-project -GenericName[pl]=Projekt: TDE Automake -GenericName[pt]=Projecto TDE com Automake -GenericName[pt_BR]=Projeto Automake do TDE -GenericName[ru]=Проект TDE Automake -GenericName[sk]=TDE Automake projekt -GenericName[sl]=Projekt TDE Automake -GenericName[sr]=TDE-ов Automake пројекат -GenericName[sr@Latn]=TDE-ov Automake projekat -GenericName[sv]=TDE Automake-projekt -GenericName[ta]=TDE ஆட்டோமேக் பிராஜக்ட் -GenericName[tg]=Лоиҳаи TDE Automake -GenericName[tr]=TDE Automake Projesi -GenericName[zh_CN]=TDE Automake 工程 -GenericName[zh_TW]=TDE Automake 專案 -ServiceTypes=TDevelop/Project -Icon=make -X-TDE-Library=libtdevautoproject -X-TDevelop-Version=5 -X-TDevelop-Args=kde diff --git a/buildtools/custommakefiles/CMakeLists.txt b/buildtools/custommakefiles/CMakeLists.txt index 8327a38d..55036324 100644 --- a/buildtools/custommakefiles/CMakeLists.txt +++ b/buildtools/custommakefiles/CMakeLists.txt @@ -30,15 +30,15 @@ link_directories( ##### other data ################################ -install( FILES tdevcustomproject.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevcustomproject.rc DESTINATION ${DATA_INSTALL_DIR}/tdevcustomproject ) +install( FILES kdevcustomproject.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevcustomproject.rc DESTINATION ${DATA_INSTALL_DIR}/kdevcustomproject ) -##### libtdevcustomproject (module) ############# +##### libkdevcustomproject (module) ############# -tde_add_kpart( libtdevcustomproject AUTOMOC +tde_add_kpart( libkdevcustomproject AUTOMOC SOURCES selectnewfilesdialog.cpp selectnewfilesdialogbase.ui custombuildoptionswidget.cpp @@ -46,6 +46,6 @@ tde_add_kpart( libtdevcustomproject AUTOMOC custommakeconfigwidgetbase.ui custommanagerwidget.cpp custommanagerwidgetbase.ui customotherconfigwidget.cpp customotherconfigwidgetbase.ui customprojectpart.cpp - LINK tdevbuildbase-shared tdevbuildtoolswidgets-shared + LINK kdevbuildbase-shared kdevbuildtoolswidgets-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/buildtools/custommakefiles/Makefile.am b/buildtools/custommakefiles/Makefile.am index 618f8794..087ab001 100644 --- a/buildtools/custommakefiles/Makefile.am +++ b/buildtools/custommakefiles/Makefile.am @@ -5,12 +5,12 @@ INCLUDES = -I$(top_srcdir)/buildtools/lib/base \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util $(all_includes) \ -I$(top_builddir)/buildtools/lib/widgets -kde_module_LTLIBRARIES = libtdevcustomproject.la -libtdevcustomproject_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevcustomproject_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/buildtools/lib/widgets/libtdevbuildtoolswidgets.la $(top_builddir)/buildtools/lib/base/libtdevbuildbase.la +kde_module_LTLIBRARIES = libkdevcustomproject.la +libkdevcustomproject_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevcustomproject_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/buildtools/lib/widgets/libkdevbuildtoolswidgets.la $(top_builddir)/buildtools/lib/base/libkdevbuildbase.la -libtdevcustomproject_la_SOURCES = selectnewfilesdialog.cpp selectnewfilesdialogbase.ui \ +libkdevcustomproject_la_SOURCES = selectnewfilesdialog.cpp selectnewfilesdialogbase.ui \ custombuildoptionswidget.cpp custombuildoptionswidgetbase.ui custommakeconfigwidget.cpp \ custommakeconfigwidgetbase.ui custommanagerwidget.cpp custommanagerwidgetbase.ui \ customotherconfigwidget.cpp customotherconfigwidgetbase.ui customprojectpart.cpp @@ -18,9 +18,9 @@ libtdevcustomproject_la_SOURCES = selectnewfilesdialog.cpp selectnewfilesdialogb METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevcustomproject.desktop +service_DATA = kdevcustomproject.desktop -rcdir = $(kde_datadir)/tdevcustomproject -rc_DATA = tdevcustomproject.rc +rcdir = $(kde_datadir)/kdevcustomproject +rc_DATA = kdevcustomproject.rc noinst_HEADERS = selectnewfilesdialog.h custommanagerwidget.h \ customotherconfigwidget.h diff --git a/buildtools/custommakefiles/customprojectpart.cpp b/buildtools/custommakefiles/customprojectpart.cpp index c9cc482d..5b41080e 100644 --- a/buildtools/custommakefiles/customprojectpart.cpp +++ b/buildtools/custommakefiles/customprojectpart.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +#include #include #include #include @@ -42,11 +42,11 @@ #include #include "domutil.h" -#include "tdevcore.h" -#include "tdevmainwindow.h" -#include "tdevmakefrontend.h" -#include "tdevappfrontend.h" -#include "tdevpartcontroller.h" +#include "kdevcore.h" +#include "kdevmainwindow.h" +#include "kdevmakefrontend.h" +#include "kdevappfrontend.h" +#include "kdevpartcontroller.h" #include "runoptionswidget.h" #include "makeoptionswidget.h" #include "custombuildoptionswidget.h" @@ -59,18 +59,18 @@ #include "selectnewfilesdialog.h" -#include +#include -typedef TDevGenericFactory CustomProjectFactory; -static const TDevPluginInfo data( "tdevcustomproject" ); -K_EXPORT_COMPONENT_FACTORY( libtdevcustomproject, CustomProjectFactory( data ) ) +typedef KDevGenericFactory CustomProjectFactory; +static const KDevPluginInfo data( "kdevcustomproject" ); +K_EXPORT_COMPONENT_FACTORY( libkdevcustomproject, CustomProjectFactory( data ) ) CustomProjectPart::CustomProjectPart( TQObject *parent, const char *name, const TQStringList & ) - : TDevBuildTool( &data, parent, name ? name : "CustomProjectPart" ) + : KDevBuildTool( &data, parent, name ? name : "CustomProjectPart" ) , m_lastCompilationFailed( false ), m_recursive( false ), m_first_recursive( false ) { setInstance( CustomProjectFactory::instance() ); - setXMLFile( "tdevcustomproject.rc" ); + setXMLFile( "kdevcustomproject.rc" ); m_executeAfterBuild = false; @@ -477,7 +477,7 @@ void CustomProjectPart::openProject( const TQString &dirName, const TQString &pr el.setTagName( "default" ); envs.appendChild( el ); } - TDevProject::openProject( dirName, projectName ); + KDevProject::openProject( dirName, projectName ); } @@ -632,7 +632,7 @@ DomUtil::PairList CustomProjectPart::runEnvironmentVars() const */ TQString CustomProjectPart::runDirectory() const { - TQString cwd = defaultRunDirectory( "tdevcustomproject" ); + TQString cwd = defaultRunDirectory( "kdevcustomproject" ); if ( cwd.isEmpty() ) cwd = buildDirectory(); return cwd; diff --git a/buildtools/custommakefiles/customprojectpart.h b/buildtools/custommakefiles/customprojectpart.h index db46d576..67223e92 100644 --- a/buildtools/custommakefiles/customprojectpart.h +++ b/buildtools/custommakefiles/customprojectpart.h @@ -20,7 +20,7 @@ #include #include -#include +#include class TQListViewItem; class TQPopupMenu; @@ -30,7 +30,7 @@ class CustomProjectWidget; class Context; class TDESelectAction; -class CustomProjectPart : public TDevBuildTool +class CustomProjectPart : public KDevBuildTool { Q_OBJECT diff --git a/buildtools/custommakefiles/kdevcustomproject.desktop b/buildtools/custommakefiles/kdevcustomproject.desktop new file mode 100644 index 00000000..9f81a3d6 --- /dev/null +++ b/buildtools/custommakefiles/kdevcustomproject.desktop @@ -0,0 +1,91 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Custom Project +Comment[br]=Raktres diouzhoc'h +Comment[ca]=Projecte a mida +Comment[cs]=Vlastní projekt +Comment[da]=Brugerdefineret projekt +Comment[de]=Benutzerdefiniertes Projekt für TDevelop +Comment[el]=Προσαρμοσμένo έργο +Comment[es]=Proyecto personalizado +Comment[et]=Kohandatav projekt +Comment[eu]=Proiektu pertsonalizatua +Comment[fa]=پروژۀ سفارشی +Comment[fr]=Projet personnalisé +Comment[ga]=Tionscadal Saincheaptha +Comment[gl]=Proxecto persoalizado +Comment[hi]=कस्टम परियोजना +Comment[hu]=Egyedi projekt +Comment[is]=Sérsniðið verkefni +Comment[it]=Progetto personalizzato +Comment[ja]=カスタムプロジェクト +Comment[ms]=Projek Tersendiri +Comment[nds]=Egen Projekt +Comment[ne]=अनुकूल परियोजना +Comment[nl]=Aangepast project +Comment[pl]=Własny projekt +Comment[pt]=Projecto Personalizado +Comment[pt_BR]=Projeto Personalizado +Comment[ru]=Особый проект +Comment[sk]=Vlastný projekt +Comment[sl]=Poljuben projekt +Comment[sr]=Произвољан пројекат +Comment[sr@Latn]=Proizvoljan projekat +Comment[sv]=Eget projekt +Comment[ta]=தனிப்பயன் பிராஜக்ட் +Comment[tg]=Лоиҳаи оддӣ +Comment[tr]=Özel Proje +Comment[zh_CN]=自定义工程 +Comment[zh_TW]=自訂專案 +Name=KDevCustomProject +Name[da]=TDevelop brugerdefineret projekt +Name[de]=Benutzerdefiniertes Projekt (TDevelop) +Name[hi]=के-डेव-कस्टम-परियोजना +Name[nds]=Egen Projekt (TDevelop) +Name[ne]=केडीई विकास अनुकूल परियोजना +Name[pl]=KDevWłasnyProjekt +Name[sk]=KDevVlastnýProjekt +Name[sv]=TDevelop eget projekt +Name[ta]=கெடெவ் தனிப்பயன் பிராஜக்ட் +Name[tg]=Лоиҳаи оддӣKDev +Name[zh_TW]=TDevelop 自訂專案 +GenericName=Custom Project +GenericName[br]=Raktres diouzhoc'h +GenericName[ca]=Projecte a mida +GenericName[da]=Brugerdefineret projekt +GenericName[de]=Benutzerdefiniertes Projekt +GenericName[el]=Προσαρμοσμένο έργο +GenericName[es]=Proyecto personalizado +GenericName[et]=Kohandatav projekt +GenericName[eu]=Proiektu pertsonalizatua +GenericName[fa]=پروژۀ سفارشی +GenericName[fr]=Projet personnalisé +GenericName[ga]=Tionscadal Saincheaptha +GenericName[gl]=Proxecto persoalizado +GenericName[hi]=कस्टम परियोजना +GenericName[hu]=Egyedi projekt +GenericName[it]=Progetto personalizzato +GenericName[ja]=カスタムプロジェクト +GenericName[ms]=Projek Tersendiri +GenericName[nds]=Egen Projekt +GenericName[ne]=अनुकूल परियोजना +GenericName[nl]=Aangepast project +GenericName[pl]=Projekt: własny +GenericName[pt]=Projecto Personalizado +GenericName[pt_BR]=Projeto Personalizado +GenericName[ru]=Особый проект +GenericName[sk]=Vlastný projekt +GenericName[sl]=Poljuben projekt +GenericName[sr]=Произвољан пројекат +GenericName[sr@Latn]=Proizvoljan projekat +GenericName[sv]=Eget projekt +GenericName[ta]=தனிப்பயன் பிராஜக்ட் +GenericName[tg]=Лоиҳаи оддӣ +GenericName[tr]=Özel Proje +GenericName[zh_CN]=自定义工程 +GenericName[zh_TW]=自訂專案 +ServiceTypes=TDevelop/Project +X-TDE-Library=libkdevcustomproject +X-TDevelop-Version=5 +X-TDevelop-Args= diff --git a/buildtools/custommakefiles/kdevcustomproject.rc b/buildtools/custommakefiles/kdevcustomproject.rc new file mode 100644 index 00000000..c744b4be --- /dev/null +++ b/buildtools/custommakefiles/kdevcustomproject.rc @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/buildtools/custommakefiles/tdevcustomproject.desktop b/buildtools/custommakefiles/tdevcustomproject.desktop deleted file mode 100644 index 0ea2c3bc..00000000 --- a/buildtools/custommakefiles/tdevcustomproject.desktop +++ /dev/null @@ -1,91 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Custom Project -Comment[br]=Raktres diouzhoc'h -Comment[ca]=Projecte a mida -Comment[cs]=Vlastní projekt -Comment[da]=Brugerdefineret projekt -Comment[de]=Benutzerdefiniertes Projekt für TDevelop -Comment[el]=Προσαρμοσμένo έργο -Comment[es]=Proyecto personalizado -Comment[et]=Kohandatav projekt -Comment[eu]=Proiektu pertsonalizatua -Comment[fa]=پروژۀ سفارشی -Comment[fr]=Projet personnalisé -Comment[ga]=Tionscadal Saincheaptha -Comment[gl]=Proxecto persoalizado -Comment[hi]=कस्टम परियोजना -Comment[hu]=Egyedi projekt -Comment[is]=Sérsniðið verkefni -Comment[it]=Progetto personalizzato -Comment[ja]=カスタムプロジェクト -Comment[ms]=Projek Tersendiri -Comment[nds]=Egen Projekt -Comment[ne]=अनुकूल परियोजना -Comment[nl]=Aangepast project -Comment[pl]=Własny projekt -Comment[pt]=Projecto Personalizado -Comment[pt_BR]=Projeto Personalizado -Comment[ru]=Особый проект -Comment[sk]=Vlastný projekt -Comment[sl]=Poljuben projekt -Comment[sr]=Произвољан пројекат -Comment[sr@Latn]=Proizvoljan projekat -Comment[sv]=Eget projekt -Comment[ta]=தனிப்பயன் பிராஜக்ட் -Comment[tg]=Лоиҳаи оддӣ -Comment[tr]=Özel Proje -Comment[zh_CN]=自定义工程 -Comment[zh_TW]=自訂專案 -Name=TDevCustomProject -Name[da]=TDevelop brugerdefineret projekt -Name[de]=Benutzerdefiniertes Projekt (TDevelop) -Name[hi]=के-डेव-कस्टम-परियोजना -Name[nds]=Egen Projekt (TDevelop) -Name[ne]=केडीई विकास अनुकूल परियोजना -Name[pl]=KDevWłasnyProjekt -Name[sk]=KDevVlastnýProjekt -Name[sv]=TDevelop eget projekt -Name[ta]=கெடெவ் தனிப்பயன் பிராஜக்ட் -Name[tg]=Лоиҳаи оддӣKDev -Name[zh_TW]=TDevelop 自訂專案 -GenericName=Custom Project -GenericName[br]=Raktres diouzhoc'h -GenericName[ca]=Projecte a mida -GenericName[da]=Brugerdefineret projekt -GenericName[de]=Benutzerdefiniertes Projekt -GenericName[el]=Προσαρμοσμένο έργο -GenericName[es]=Proyecto personalizado -GenericName[et]=Kohandatav projekt -GenericName[eu]=Proiektu pertsonalizatua -GenericName[fa]=پروژۀ سفارشی -GenericName[fr]=Projet personnalisé -GenericName[ga]=Tionscadal Saincheaptha -GenericName[gl]=Proxecto persoalizado -GenericName[hi]=कस्टम परियोजना -GenericName[hu]=Egyedi projekt -GenericName[it]=Progetto personalizzato -GenericName[ja]=カスタムプロジェクト -GenericName[ms]=Projek Tersendiri -GenericName[nds]=Egen Projekt -GenericName[ne]=अनुकूल परियोजना -GenericName[nl]=Aangepast project -GenericName[pl]=Projekt: własny -GenericName[pt]=Projecto Personalizado -GenericName[pt_BR]=Projeto Personalizado -GenericName[ru]=Особый проект -GenericName[sk]=Vlastný projekt -GenericName[sl]=Poljuben projekt -GenericName[sr]=Произвољан пројекат -GenericName[sr@Latn]=Proizvoljan projekat -GenericName[sv]=Eget projekt -GenericName[ta]=தனிப்பயன் பிராஜக்ட் -GenericName[tg]=Лоиҳаи оддӣ -GenericName[tr]=Özel Proje -GenericName[zh_CN]=自定义工程 -GenericName[zh_TW]=自訂專案 -ServiceTypes=TDevelop/Project -X-TDE-Library=libtdevcustomproject -X-TDevelop-Version=5 -X-TDevelop-Args= diff --git a/buildtools/custommakefiles/tdevcustomproject.rc b/buildtools/custommakefiles/tdevcustomproject.rc deleted file mode 100644 index 08079774..00000000 --- a/buildtools/custommakefiles/tdevcustomproject.rc +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/buildtools/lib/base/CMakeLists.txt b/buildtools/lib/base/CMakeLists.txt index a429be6c..f3585669 100644 --- a/buildtools/lib/base/CMakeLists.txt +++ b/buildtools/lib/base/CMakeLists.txt @@ -26,14 +26,14 @@ link_directories( ##### headers ################################### install( FILES - tdevbuildtool.h + kdevbuildtool.h DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/buildtools/base ) -##### tdevbuildbase (shared) #################### +##### kdevbuildbase (shared) #################### -tde_add_library( tdevbuildbase SHARED AUTOMOC - SOURCES tdevbuildtool.cpp +tde_add_library( kdevbuildbase SHARED AUTOMOC + SOURCES kdevbuildtool.cpp VERSION 0.0.0 LINK tdevelop-shared DESTINATION ${LIB_INSTALL_DIR} diff --git a/buildtools/lib/base/Mainpage.dox b/buildtools/lib/base/Mainpage.dox index 8a85d338..3e16d2d8 100644 --- a/buildtools/lib/base/Mainpage.dox +++ b/buildtools/lib/base/Mainpage.dox @@ -8,8 +8,8 @@ This library contains base classes for KDevelop builtool support plugins. Include path: -I\$(kde_includes)/tdevelop/buildtools/base \section btbaseoverview Overview -This library is created to provide TDevBuildTool compat class which can be used -as drop-in replacement of TDevProject class for buildtool support plugins +This library is created to provide KDevBuildTool compat class which can be used +as drop-in replacement of KDevProject class for buildtool support plugins written for old KDevelop architecture (before version 3.2). Nevertheless, it can be useful for new buildtool plugins as well because it provides diff --git a/buildtools/lib/base/Makefile.am b/buildtools/lib/base/Makefile.am index 6532398d..7e1083ef 100644 --- a/buildtools/lib/base/Makefile.am +++ b/buildtools/lib/base/Makefile.am @@ -2,14 +2,14 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util -I$(top_srcdir)/lib/widgets/propeditor \ $(all_includes) METASOURCES = AUTO -lib_LTLIBRARIES = libtdevbuildbase.la -libtdevbuildbase_la_LDFLAGS = $(all_libraries) -libtdevbuildbase_la_LIBADD = $(top_builddir)/lib/interfaces/libtdevinterfaces.la $(LIB_QT) $(LIB_TDEUI) -libtdevbuildbase_la_SOURCES = tdevbuildtool.cpp +lib_LTLIBRARIES = libkdevbuildbase.la +libkdevbuildbase_la_LDFLAGS = $(all_libraries) +libkdevbuildbase_la_LIBADD = $(top_builddir)/lib/interfaces/libkdevinterfaces.la $(LIB_QT) $(LIB_TDEUI) +libkdevbuildbase_la_SOURCES = kdevbuildtool.cpp tdevelopbuildtoolsincludedir = $(includedir)/tdevelop/buildtools/base -tdevelopbuildtoolsinclude_HEADERS = tdevbuildtool.h +tdevelopbuildtoolsinclude_HEADERS = kdevbuildtool.h -DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils tdevutil tdevinterfaces tdevextensions -DOXYGEN_PROJECTNAME = TDevelop Buildtool Base Library -DOXYGEN_DOCDIRPREFIX = tdevbt +DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils kdevutil kdevinterfaces kdevextensions +DOXYGEN_PROJECTNAME = KDevelop Buildtool Base Library +DOXYGEN_DOCDIRPREFIX = kdevbt include ../../../Doxyfile.am diff --git a/buildtools/lib/base/kdevbuildtool.cpp b/buildtools/lib/base/kdevbuildtool.cpp new file mode 100644 index 00000000..618f02d9 --- /dev/null +++ b/buildtools/lib/base/kdevbuildtool.cpp @@ -0,0 +1,38 @@ +/* This file is part of the KDE project + 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. +*/ +#include "kdevbuildtool.h" + +#include +#include + +KDevBuildTool::KDevBuildTool(const KDevPluginInfo* info, TQObject* parent, const char* name) + :KDevProject(info, parent, name) +{ +} + +KDevMakeFrontend * KDevBuildTool::makeFrontend() +{ + return extension("TDevelop/MakeFrontend"); +} + +KDevAppFrontend * KDevBuildTool::appFrontend() +{ + return extension("TDevelop/AppFrontend"); +} + diff --git a/buildtools/lib/base/kdevbuildtool.h b/buildtools/lib/base/kdevbuildtool.h new file mode 100644 index 00000000..ff1abcc0 --- /dev/null +++ b/buildtools/lib/base/kdevbuildtool.h @@ -0,0 +1,41 @@ +/* This file is part of the KDE project + Copyright (C) 1999-2001 Bernd Gehrmann + 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 KDEVBUILDTOOL_H +#define KDEVBUILDTOOL_H + +#include + +class KDevMakeFrontend; +class KDevAppFrontend; + +/**Base class for KDevelop build tool support plugins.*/ +class KDevBuildTool: public KDevProject +{ +public: + KDevBuildTool(const KDevPluginInfo* info, TQObject* parent, const char* name); + + /**@return The make frontend.*/ + KDevMakeFrontend *makeFrontend(); + /**@return The application frontend.*/ + KDevAppFrontend *appFrontend(); + +}; + +#endif diff --git a/buildtools/lib/base/tdevbuildtool.cpp b/buildtools/lib/base/tdevbuildtool.cpp deleted file mode 100644 index aa901bb7..00000000 --- a/buildtools/lib/base/tdevbuildtool.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/* This file is part of the KDE project - 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. -*/ -#include "tdevbuildtool.h" - -#include -#include - -TDevBuildTool::TDevBuildTool(const TDevPluginInfo* info, TQObject* parent, const char* name) - :TDevProject(info, parent, name) -{ -} - -TDevMakeFrontend * TDevBuildTool::makeFrontend() -{ - return extension("TDevelop/MakeFrontend"); -} - -TDevAppFrontend * TDevBuildTool::appFrontend() -{ - return extension("TDevelop/AppFrontend"); -} - diff --git a/buildtools/lib/base/tdevbuildtool.h b/buildtools/lib/base/tdevbuildtool.h deleted file mode 100644 index b6899f9b..00000000 --- a/buildtools/lib/base/tdevbuildtool.h +++ /dev/null @@ -1,41 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 1999-2001 Bernd Gehrmann - 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 TDEVBUILDTOOL_H -#define TDEVBUILDTOOL_H - -#include - -class TDevMakeFrontend; -class TDevAppFrontend; - -/**Base class for KDevelop build tool support plugins.*/ -class TDevBuildTool: public TDevProject -{ -public: - TDevBuildTool(const TDevPluginInfo* info, TQObject* parent, const char* name); - - /**@return The make frontend.*/ - TDevMakeFrontend *makeFrontend(); - /**@return The application frontend.*/ - TDevAppFrontend *appFrontend(); - -}; - -#endif diff --git a/buildtools/lib/parsers/autotools/CMakeLists.txt b/buildtools/lib/parsers/autotools/CMakeLists.txt index 5bc97247..8226e963 100644 --- a/buildtools/lib/parsers/autotools/CMakeLists.txt +++ b/buildtools/lib/parsers/autotools/CMakeLists.txt @@ -16,9 +16,9 @@ include_directories( ) -##### tdevautotoolsparser (static) ############## +##### kdevautotoolsparser (static) ############## -tde_add_library( tdevautotoolsparser STATIC_PIC +tde_add_library( kdevautotoolsparser STATIC_PIC SOURCES autotoolsast.cpp autotoolsdriver.cpp autotools_yacc.cpp ) diff --git a/buildtools/lib/parsers/autotools/Makefile.am b/buildtools/lib/parsers/autotools/Makefile.am index 47234583..340d0e38 100644 --- a/buildtools/lib/parsers/autotools/Makefile.am +++ b/buildtools/lib/parsers/autotools/Makefile.am @@ -6,9 +6,9 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util -I$(top_srcdir)/lib/widgets/propeditor \ $(all_includes) METASOURCES = AUTO -noinst_LTLIBRARIES = libtdevautotoolsparser.la -libtdevautotoolsparser_la_LDFLAGS = $(all_libraries) $(LIB_TDEIO) -libtdevautotoolsparser_la_SOURCES = autotoolsast.cpp autotoolsdriver.cpp autotools_yacc.cpp +noinst_LTLIBRARIES = libkdevautotoolsparser.la +libkdevautotoolsparser_la_LDFLAGS = $(all_libraries) $(LIB_TDEIO) +libkdevautotoolsparser_la_SOURCES = autotoolsast.cpp autotoolsdriver.cpp autotools_yacc.cpp parser: cd $(srcdir) ; \ @@ -19,6 +19,6 @@ parser: EXTRA_DIST = autotools.yy autotools.ll DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils -DOXYGEN_PROJECTNAME = TDevelop AutoTools Parser -DOXYGEN_DOCDIRPREFIX = tdevparser +DOXYGEN_PROJECTNAME = KDevelop AutoTools Parser +DOXYGEN_DOCDIRPREFIX = kdevparser include ../../../../Doxyfile.am diff --git a/buildtools/lib/parsers/autotools/tests/Makefile.am b/buildtools/lib/parsers/autotools/tests/Makefile.am index 00c2baba..30c67288 100644 --- a/buildtools/lib/parsers/autotools/tests/Makefile.am +++ b/buildtools/lib/parsers/autotools/tests/Makefile.am @@ -13,9 +13,9 @@ METASOURCES = AUTO check_PROGRAMS = runner viewer runner_LDFLAGS = $(all_libraries) $(LIB_TDECORE) $(KDE_RPATH) -runner_LDADD = $(top_builddir)/buildtools/lib/parsers/autotools/libtdevautotoolsparser.la +runner_LDADD = $(top_builddir)/buildtools/lib/parsers/autotools/libkdevautotoolsparser.la runner_SOURCES = runner.cpp viewer_LDFLAGS = $(all_libraries) $(LIB_TDECORE) $(KDE_RPATH) -viewer_LDADD = $(top_builddir)/buildtools/lib/parsers/autotools/libtdevautotoolsparser.la +viewer_LDADD = $(top_builddir)/buildtools/lib/parsers/autotools/libkdevautotoolsparser.la viewer_SOURCES = viewer.cpp viewer_main.cpp viewerbase.ui diff --git a/buildtools/lib/parsers/qmake/CMakeLists.txt b/buildtools/lib/parsers/qmake/CMakeLists.txt index 6ffebfa6..b8328a84 100644 --- a/buildtools/lib/parsers/qmake/CMakeLists.txt +++ b/buildtools/lib/parsers/qmake/CMakeLists.txt @@ -27,9 +27,9 @@ install( FILES DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/buildtools/parsers/qmake ) -##### tdevqmakeparser (shared) ################## +##### kdevqmakeparser (shared) ################## -tde_add_library( tdevqmakeparser SHARED +tde_add_library( kdevqmakeparser SHARED SOURCES qmake_lex.cpp qmake_yacc.cpp qmakeast.cpp qmakeastvisitor.cpp qmakedriver.cpp diff --git a/buildtools/lib/parsers/qmake/Makefile.am b/buildtools/lib/parsers/qmake/Makefile.am index 9e14382a..ff3f175b 100644 --- a/buildtools/lib/parsers/qmake/Makefile.am +++ b/buildtools/lib/parsers/qmake/Makefile.am @@ -8,9 +8,9 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util -I$(top_srcdir)/lib/widgets/propeditor \ $(all_includes) METASOURCES = AUTO -lib_LTLIBRARIES = libtdevqmakeparser.la -libtdevqmakeparser_la_LDFLAGS = -no-undefined $(all_libraries) $(LIB_TDEIO) -libtdevqmakeparser_la_SOURCES = qmake_lex.cpp qmake_yacc.cpp qmakeast.cpp \ +lib_LTLIBRARIES = libkdevqmakeparser.la +libkdevqmakeparser_la_LDFLAGS = -no-undefined $(all_libraries) $(LIB_TDEIO) +libkdevqmakeparser_la_SOURCES = qmake_lex.cpp qmake_yacc.cpp qmakeast.cpp \ qmakeastvisitor.cpp qmakedriver.cpp tdevelopbuildtoolsincludedir = $(includedir)/tdevelop/buildtools/parsers/qmake @@ -24,8 +24,8 @@ parser: EXTRA_DIST = qmake.yy qmake.ll DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils -DOXYGEN_PROJECTNAME = TDevelop QMake parser -DOXYGEN_DOCDIRPREFIX = tdevparser +DOXYGEN_PROJECTNAME = KDevelop QMake parser +DOXYGEN_DOCDIRPREFIX = kdevparser include ../../../../Doxyfile.am noinst_HEADERS = qmake.ll qmake.yy qmake_lex.h diff --git a/buildtools/lib/parsers/qmake/tests/Makefile.am b/buildtools/lib/parsers/qmake/tests/Makefile.am index 74935269..e1932f7e 100644 --- a/buildtools/lib/parsers/qmake/tests/Makefile.am +++ b/buildtools/lib/parsers/qmake/tests/Makefile.am @@ -13,9 +13,9 @@ METASOURCES = AUTO noinst_PROGRAMS = runner viewer runner_LDFLAGS = $(all_libraries) $(LIB_TDECORE) $(KDE_RPATH) -runner_LDADD = $(top_builddir)/buildtools/lib/parsers/qmake/libtdevqmakeparser.la +runner_LDADD = $(top_builddir)/buildtools/lib/parsers/qmake/libkdevqmakeparser.la runner_SOURCES = runner.cpp viewer_LDFLAGS = --no-undefined $(all_libraries) $(LIB_TDECORE) $(KDE_RPATH) -viewer_LDADD = $(top_builddir)/buildtools/lib/parsers/qmake/libtdevqmakeparser.la +viewer_LDADD = $(top_builddir)/buildtools/lib/parsers/qmake/libkdevqmakeparser.la viewer_SOURCES = viewer.cpp viewer_main.cpp viewerbase.ui diff --git a/buildtools/lib/widgets/CMakeLists.txt b/buildtools/lib/widgets/CMakeLists.txt index 0349f6d3..d86d0c66 100644 --- a/buildtools/lib/widgets/CMakeLists.txt +++ b/buildtools/lib/widgets/CMakeLists.txt @@ -36,9 +36,9 @@ install( FILES DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/buildtools/widgets ) -##### tdevbuildtoolswidgets (shared) ############ +##### kdevbuildtoolswidgets (shared) ############ -tde_add_library( tdevbuildtoolswidgets SHARED AUTOMOC +tde_add_library( kdevbuildtoolswidgets SHARED AUTOMOC SOURCES addenvvardlg.cpp addfilesdialog.cpp environmentdisplaydialog.cpp diff --git a/buildtools/lib/widgets/Makefile.am b/buildtools/lib/widgets/Makefile.am index 718bbb04..6042ea06 100644 --- a/buildtools/lib/widgets/Makefile.am +++ b/buildtools/lib/widgets/Makefile.am @@ -5,11 +5,11 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util \ -I$(top_srcdir)/lib/widgets/propeditor $(all_includes) -lib_LTLIBRARIES = libtdevbuildtoolswidgets.la -libtdevbuildtoolswidgets_la_LDFLAGS = $(all_libraries) -libtdevbuildtoolswidgets_la_LIBADD = $(top_builddir)/lib/interfaces/libtdevinterfaces.la \ +lib_LTLIBRARIES = libkdevbuildtoolswidgets.la +libkdevbuildtoolswidgets_la_LDFLAGS = $(all_libraries) +libkdevbuildtoolswidgets_la_LIBADD = $(top_builddir)/lib/interfaces/libkdevinterfaces.la \ $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEIO) -ltdetexteditor -libtdevbuildtoolswidgets_la_SOURCES = addenvvardlg.cpp addfilesdialog.cpp \ +libkdevbuildtoolswidgets_la_SOURCES = addenvvardlg.cpp addfilesdialog.cpp \ environmentdisplaydialog.cpp environmentdisplaydialogbase.ui environmentvariableswidget.cpp \ environmentvariableswidgetbase.ui envvartools.cpp makeoptionswidget.cpp makeoptionswidgetbase.ui \ removesubprojectdialog.cpp removesubprojectdlgbase.ui runoptionswidget.cpp runoptionswidgetbase.ui \ @@ -23,8 +23,8 @@ tdevelopbuildtoolsinclude_HEADERS = addenvvardlg.h addfilesdialog.h \ makeoptionswidgetbase.h removesubprojectdialog.h removesubprojectdlgbase.h runoptionswidget.h \ runoptionswidgetbase.h subclassesdlg.h subclassesdlgbase.h -DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils tdevutil tdevinterfaces tdevutil -DOXYGEN_PROJECTNAME = TDevelop Buildtool Widgets Library -DOXYGEN_DOCDIRPREFIX = tdevbt +DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils kdevutil kdevinterfaces kdevutil +DOXYGEN_PROJECTNAME = KDevelop Buildtool Widgets Library +DOXYGEN_DOCDIRPREFIX = kdevbt include ../../../Doxyfile.am noinst_HEADERS = environmentdisplaydialog.h diff --git a/buildtools/pascal/CMakeLists.txt b/buildtools/pascal/CMakeLists.txt index f43f27b2..b10a6bec 100644 --- a/buildtools/pascal/CMakeLists.txt +++ b/buildtools/pascal/CMakeLists.txt @@ -30,17 +30,17 @@ link_directories( ##### other data ################################ -install( FILES tdevpascalproject.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevpascalproject.rc DESTINATION ${DATA_INSTALL_DIR}/tdevpascalproject ) +install( FILES kdevpascalproject.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevpascalproject.rc DESTINATION ${DATA_INSTALL_DIR}/kdevpascalproject ) -##### libtdevpascalproject (module) ############# +##### libkdevpascalproject (module) ############# -tde_add_kpart( libtdevpascalproject AUTOMOC +tde_add_kpart( libkdevpascalproject AUTOMOC SOURCES pascalproject_part.cpp pascalproject_widget.cpp pascalproject_optionsdlgbase.ui pascalprojectoptionsdlg.cpp pascalglobaloptionsdlg.cpp service.cpp - LINK tdevbuildbase-shared tdevbuildtoolswidgets-shared + LINK kdevbuildbase-shared kdevbuildtoolswidgets-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/buildtools/pascal/Makefile.am b/buildtools/pascal/Makefile.am index f822bd6d..9bf4fc90 100644 --- a/buildtools/pascal/Makefile.am +++ b/buildtools/pascal/Makefile.am @@ -4,20 +4,20 @@ INCLUDES = -I$(top_srcdir)/buildtools/lib/base \ -I$(top_srcdir)/lib/interfaces/extras -I$(top_srcdir)/lib/util -I$(top_builddir)/buildtools/lib/widgets \ $(all_includes) -kde_module_LTLIBRARIES = libtdevpascalproject.la -libtdevpascalproject_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevpascalproject_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/buildtools/lib/widgets/libtdevbuildtoolswidgets.la $(top_builddir)/buildtools/lib/base/libtdevbuildbase.la +kde_module_LTLIBRARIES = libkdevpascalproject.la +libkdevpascalproject_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevpascalproject_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/buildtools/lib/widgets/libkdevbuildtoolswidgets.la $(top_builddir)/buildtools/lib/base/libkdevbuildbase.la -libtdevpascalproject_la_SOURCES = pascalproject_part.cpp pascalproject_widget.cpp pascalproject_optionsdlgbase.ui pascalprojectoptionsdlg.cpp pascalglobaloptionsdlg.cpp service.cpp +libkdevpascalproject_la_SOURCES = pascalproject_part.cpp pascalproject_widget.cpp pascalproject_optionsdlgbase.ui pascalprojectoptionsdlg.cpp pascalglobaloptionsdlg.cpp service.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevpascalproject.desktop +service_DATA = kdevpascalproject.desktop -rcdir = $(kde_datadir)/tdevpascalproject -rc_DATA = tdevpascalproject.rc +rcdir = $(kde_datadir)/kdevpascalproject +rc_DATA = kdevpascalproject.rc diff --git a/buildtools/pascal/kdevpascalproject.desktop b/buildtools/pascal/kdevpascalproject.desktop new file mode 100644 index 00000000..cde3c21d --- /dev/null +++ b/buildtools/pascal/kdevpascalproject.desktop @@ -0,0 +1,93 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Pascal Project +Comment[br]=Raktres Pascal +Comment[ca]=Projecte Pascal +Comment[da]=Pascal projekt +Comment[de]=Pascal-Projekt für TDevelop +Comment[el]=Έργο Pascal +Comment[es]=Proyecto de Pascal +Comment[et]=Pascali projekt +Comment[eu]=Pascal proiektua +Comment[fa]=پروژۀ پاسکال +Comment[fr]=Projet en langage PASCAL +Comment[ga]=Tionscadal Pascal +Comment[gl]=Proxecto Pascal +Comment[hi]=पास्कल परियोजना +Comment[hu]=Pascal-projekt +Comment[is]=Pascal verkefni +Comment[it]=Progetto per Pascal +Comment[ja]=Pascal プロジェクト +Comment[ms]=Projek Pascal +Comment[nds]=Pascal-Projekt +Comment[ne]=पास्कल परियोजना +Comment[nl]=Pascal-project +Comment[pa]=ਪਾਸਕਲ ਪ੍ਰੋਜੈਕਟ +Comment[pl]=Projekt: Pascal +Comment[pt]=Projecto de Pascal +Comment[pt_BR]=Projeto Pascal +Comment[ru]=Проект Pascal +Comment[sk]=Pascal projekt +Comment[sl]=Projekt Pascal +Comment[sr]=Pascal пројекат +Comment[sr@Latn]=Pascal projekat +Comment[sv]=Pascal-projekt +Comment[ta]=பாஸ்கல் பிராஜக்ட் +Comment[tg]=Лоиҳаи Pascal +Comment[tr]=Pascal Projesi +Comment[uz]=Pascal loyihasi +Comment[uz@cyrillic]=Pascal лойиҳаси +Comment[zh_CN]=Pascal 工程 +Comment[zh_TW]=Pascal 專案 +Name=KDevPascalProject +Name[da]=TDevelop Pascal-projekt +Name[de]=Pascal-Projekt (TDevelop) +Name[hi]=के-डेव-पास्कल-परियोजना +Name[nds]=Pascal-Projekt (TDevelop) +Name[ne]=केडीई विकास पास्कल परियोजना +Name[pl]=KDevProjektPascal +Name[sk]=KDevPascalProjekt +Name[sv]=TDevelop Pascal-projekt +Name[ta]=கெடெவ் பாஸ்கல் பிராஜக்ட் +Name[tg]=Лоиҳаи ПаскалKDev +Name[zh_TW]=TDevelop Pascal 專案 +GenericName=Pascal Project +GenericName[br]=Raktres Pascal +GenericName[ca]=Projecte Pascal +GenericName[da]=Pascal projekt +GenericName[de]=Pascal-Projekt +GenericName[el]=Έργο Pascal +GenericName[es]=Proyecto de Pascal +GenericName[et]=Pascali projekt +GenericName[eu]=Pascal proiektua +GenericName[fa]=پروژۀ پاسکال +GenericName[fr]=Projet en langage PASCAL +GenericName[ga]=Tionscadal Pascal +GenericName[gl]=Proxecto Pascal +GenericName[hi]=पास्कल परियोजना +GenericName[hu]=Pascal-projekt +GenericName[it]=Progetto in Pascal +GenericName[ja]=Pascal プロジェクト +GenericName[ms]=Projek Pascal +GenericName[nds]=Pascal-Projekt +GenericName[ne]=पास्कल परियोजना +GenericName[nl]=Pascal-project +GenericName[pl]=Projekt: Pascal +GenericName[pt]=Projecto de Pascal +GenericName[pt_BR]=Projeto Pascal +GenericName[ru]=Проект Pascal +GenericName[sk]=Pascal projekt +GenericName[sl]=Projekt Pascal +GenericName[sr]=Pascal пројекат +GenericName[sr@Latn]=Pascal projekat +GenericName[sv]=Pascal-projekt +GenericName[ta]=பாஸ்கல் பிராஜக்ட் +GenericName[tr]=Pascal Projesi +GenericName[uz]=Pascal loyihasi +GenericName[uz@cyrillic]=Pascal лойиҳаси +GenericName[zh_CN]=Pascal 工程 +GenericName[zh_TW]=Pascal 專案 +ServiceTypes=TDevelop/Project +X-TDE-Library=libkdevpascalproject +X-TDevelop-Version=5 diff --git a/buildtools/pascal/tdevpascalproject.rc b/buildtools/pascal/kdevpascalproject.rc similarity index 100% rename from buildtools/pascal/tdevpascalproject.rc rename to buildtools/pascal/kdevpascalproject.rc diff --git a/buildtools/pascal/pascalglobaloptionsdlg.cpp b/buildtools/pascal/pascalglobaloptionsdlg.cpp index b55ae62f..ccbf8dc1 100644 --- a/buildtools/pascal/pascalglobaloptionsdlg.cpp +++ b/buildtools/pascal/pascalglobaloptionsdlg.cpp @@ -17,7 +17,7 @@ #include #include -#include "tdevcompileroptions.h" +#include "kdevcompileroptions.h" #include "service.h" #include "pascalproject_part.h" @@ -64,7 +64,7 @@ PascalGlobalOptionsDlg::~PascalGlobalOptionsDlg() void PascalGlobalOptionsDlg::optionsButtonClicked() { TQString name = ServiceComboBox::currentText(compiler_box, service_names); - TDevCompilerOptions *plugin = m_part->createCompilerOptions(name); + KDevCompilerOptions *plugin = m_part->createCompilerOptions(name); if (plugin) { TQString flags = plugin->exec(this, options_edit->text()); diff --git a/buildtools/pascal/pascalproject_part.cpp b/buildtools/pascal/pascalproject_part.cpp index 42864e23..01b0734a 100644 --- a/buildtools/pascal/pascalproject_part.cpp +++ b/buildtools/pascal/pascalproject_part.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include @@ -32,13 +32,13 @@ #include #include "domutil.h" -#include "tdevcore.h" -#include "tdevmainwindow.h" -#include "tdevmakefrontend.h" -#include "tdevappfrontend.h" -#include "tdevpartcontroller.h" -#include "tdevlanguagesupport.h" -#include "tdevcompileroptions.h" +#include "kdevcore.h" +#include "kdevmainwindow.h" +#include "kdevmakefrontend.h" +#include "kdevappfrontend.h" +#include "kdevpartcontroller.h" +#include "kdevlanguagesupport.h" +#include "kdevcompileroptions.h" #include "runoptionswidget.h" #include "envvartools.h" @@ -46,17 +46,17 @@ #include "pascalprojectoptionsdlg.h" #include "pascalglobaloptionsdlg.h" -#include +#include -typedef TDevGenericFactory PascalProjectFactory; -static const TDevPluginInfo data("tdevpascalproject"); -K_EXPORT_COMPONENT_FACTORY( libtdevpascalproject, PascalProjectFactory( data ) ) +typedef KDevGenericFactory PascalProjectFactory; +static const KDevPluginInfo data("kdevpascalproject"); +K_EXPORT_COMPONENT_FACTORY( libkdevpascalproject, PascalProjectFactory( data ) ) PascalProjectPart::PascalProjectPart(TQObject *parent, const char *name, const TQStringList& ) - :TDevBuildTool(&data, parent, name ? name : "PascalProjectPart" ) + :KDevBuildTool(&data, parent, name ? name : "PascalProjectPart" ) { setInstance(PascalProjectFactory::instance()); - setXMLFile("tdevpascalproject.rc"); + setXMLFile("kdevpascalproject.rc"); TDEAction *action; action = new TDEAction( i18n("&Build Project"), "make_tdevelop", Key_F8, @@ -82,7 +82,7 @@ PascalProjectPart::PascalProjectPart(TQObject *parent, const char *name, const T // TQWhatsThis::add(m_widget, i18n("WHAT DOES THIS PART DO?")); - // now you decide what should happen to the widget. Take a look at tdevcore.h + // now you decide what should happen to the widget. Take a look at kdevcore.h // or at other plugins how to embed it. // if you want to embed your widget as an outputview, simply uncomment @@ -172,7 +172,7 @@ void PascalProjectPart::openProject(const TQString &dirName, const TQString &pro } } while (!s.isEmpty()); - TDevProject::openProject( dirName, projectName ); + KDevProject::openProject( dirName, projectName ); } void PascalProjectPart::closeProject() @@ -197,7 +197,7 @@ DomUtil::PairList PascalProjectPart::runEnvironmentVars() const */ TQString PascalProjectPart::runDirectory() const { - TQString cwd = defaultRunDirectory("tdevpascalproject"); + TQString cwd = defaultRunDirectory("kdevpascalproject"); if (cwd.isEmpty()) cwd = buildDirectory(); return cwd; @@ -384,12 +384,12 @@ void PascalProjectPart::slotExecute() void PascalProjectPart::changedFiles( const TQStringList & fileList ) { - TDevProject::changedFiles(fileList); + KDevProject::changedFiles(fileList); } void PascalProjectPart::changedFile( const TQString & fileName ) { - TDevProject::changedFile(fileName); + KDevProject::changedFile(fileName); } void PascalProjectPart::projectConfigWidget( KDialogBase * dlg ) @@ -436,7 +436,7 @@ void PascalProjectPart::configWidget( KDialogBase * dlg ) connect( dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept()) ); } -TDevCompilerOptions *PascalProjectPart::createCompilerOptions(const TQString &name) +KDevCompilerOptions *PascalProjectPart::createCompilerOptions(const TQString &name) { KService::Ptr service = KService::serviceByDesktopName(name); if (!service) { @@ -458,13 +458,13 @@ TDevCompilerOptions *PascalProjectPart::createCompilerOptions(const TQString &na args = TQStringList::split(" ", prop.toString()); TQObject *obj = factory->create(this, service->name().latin1(), - "TDevCompilerOptions", args); + "KDevCompilerOptions", args); - if (!obj->inherits("TDevCompilerOptions")) { - kdDebug() << "Component does not inherit TDevCompilerOptions" << endl; + if (!obj->inherits("KDevCompilerOptions")) { + kdDebug() << "Component does not inherit KDevCompilerOptions" << endl; return 0; } - TDevCompilerOptions *dlg = (TDevCompilerOptions*) obj; + KDevCompilerOptions *dlg = (KDevCompilerOptions*) obj; return dlg; } diff --git a/buildtools/pascal/pascalproject_part.h b/buildtools/pascal/pascalproject_part.h index 8f46817b..54d09b2e 100644 --- a/buildtools/pascal/pascalproject_part.h +++ b/buildtools/pascal/pascalproject_part.h @@ -8,18 +8,18 @@ * (at your option) any later version. * * * ***************************************************************************/ -#ifndef __TDEVPART_PASCALPROJECT_H__ -#define __TDEVPART_PASCALPROJECT_H__ +#ifndef __KDEVPART_PASCALPROJECT_H__ +#define __KDEVPART_PASCALPROJECT_H__ #include -#include "tdevbuildtool.h" +#include "kdevbuildtool.h" class PascalProjectWidget; class KDialogBase; -class TDevCompilerOptions; +class KDevCompilerOptions; -class PascalProjectPart : public TDevBuildTool +class PascalProjectPart : public KDevBuildTool { Q_OBJECT @@ -61,7 +61,7 @@ public: virtual void changedFiles( const TQStringList & fileList ); virtual void changedFile( const TQString & fileName ); - TDevCompilerOptions *createCompilerOptions(const TQString &name); + KDevCompilerOptions *createCompilerOptions(const TQString &name); virtual TQString defaultOptions(const TQString compiler) const; TQStringList distFiles() const; diff --git a/buildtools/pascal/pascalproject_widget.cpp b/buildtools/pascal/pascalproject_widget.cpp index 9ce95c47..a8671023 100644 --- a/buildtools/pascal/pascalproject_widget.cpp +++ b/buildtools/pascal/pascalproject_widget.cpp @@ -4,7 +4,7 @@ #include -#include +#include #include "pascalproject_part.h" diff --git a/buildtools/pascal/pascalproject_widget.h b/buildtools/pascal/pascalproject_widget.h index 5e104856..252c7500 100644 --- a/buildtools/pascal/pascalproject_widget.h +++ b/buildtools/pascal/pascalproject_widget.h @@ -6,7 +6,7 @@ #include -class TDevProject; +class KDevProject; class PascalProjectPart; diff --git a/buildtools/pascal/pascalprojectoptionsdlg.cpp b/buildtools/pascal/pascalprojectoptionsdlg.cpp index 1593656a..9c7c2518 100644 --- a/buildtools/pascal/pascalprojectoptionsdlg.cpp +++ b/buildtools/pascal/pascalprojectoptionsdlg.cpp @@ -20,7 +20,7 @@ #include #include "domutil.h" -#include "tdevcompileroptions.h" +#include "kdevcompileroptions.h" #include "service.h" #include "pascalproject_part.h" @@ -59,7 +59,7 @@ TQStringList PascalProjectOptionsDlg::allBuildConfigs() TQStringList allConfigs; allConfigs.append("default"); - TQDomNode node = dom.documentElement().namedItem("tdevpascalproject").namedItem("configurations"); + TQDomNode node = dom.documentElement().namedItem("kdevpascalproject").namedItem("configurations"); TQDomElement childEl = node.firstChild().toElement(); while (!childEl.isNull()) { TQString config = childEl.tagName(); @@ -173,7 +173,7 @@ void PascalProjectOptionsDlg::configRemoved() TQString config = config_combo->currentText(); TQDomDocument dom = *m_part->projectDom(); - TQDomNode node = dom.documentElement().namedItem("tdevpascalproject").namedItem("configurations"); + TQDomNode node = dom.documentElement().namedItem("kdevpascalproject").namedItem("configurations"); node.removeChild(node.namedItem(config)); allConfigs.remove(config); @@ -187,7 +187,7 @@ void PascalProjectOptionsDlg::configRemoved() void PascalProjectOptionsDlg::optionsButtonClicked( ) { TQString name = ServiceComboBox::currentText(compiler_box, service_names); - TDevCompilerOptions *plugin = m_part->createCompilerOptions(name); + KDevCompilerOptions *plugin = m_part->createCompilerOptions(name); if (plugin) { TQString flags = plugin->exec(this, options_edit->text()); diff --git a/buildtools/pascal/pascalprojectoptionsdlg.h b/buildtools/pascal/pascalprojectoptionsdlg.h index c641faf3..acedb14d 100644 --- a/buildtools/pascal/pascalprojectoptionsdlg.h +++ b/buildtools/pascal/pascalprojectoptionsdlg.h @@ -16,7 +16,7 @@ #include "pascalproject_optionsdlgbase.h" class PascalProjectPart; -class TDevCompilerOptions; +class KDevCompilerOptions; class PascalProjectOptionsDlg : public PascalProjectOptionsDlgBase { diff --git a/buildtools/pascal/tdevpascalproject.desktop b/buildtools/pascal/tdevpascalproject.desktop deleted file mode 100644 index 36143f24..00000000 --- a/buildtools/pascal/tdevpascalproject.desktop +++ /dev/null @@ -1,93 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Pascal Project -Comment[br]=Raktres Pascal -Comment[ca]=Projecte Pascal -Comment[da]=Pascal projekt -Comment[de]=Pascal-Projekt für TDevelop -Comment[el]=Έργο Pascal -Comment[es]=Proyecto de Pascal -Comment[et]=Pascali projekt -Comment[eu]=Pascal proiektua -Comment[fa]=پروژۀ پاسکال -Comment[fr]=Projet en langage PASCAL -Comment[ga]=Tionscadal Pascal -Comment[gl]=Proxecto Pascal -Comment[hi]=पास्कल परियोजना -Comment[hu]=Pascal-projekt -Comment[is]=Pascal verkefni -Comment[it]=Progetto per Pascal -Comment[ja]=Pascal プロジェクト -Comment[ms]=Projek Pascal -Comment[nds]=Pascal-Projekt -Comment[ne]=पास्कल परियोजना -Comment[nl]=Pascal-project -Comment[pa]=ਪਾਸਕਲ ਪ੍ਰੋਜੈਕਟ -Comment[pl]=Projekt: Pascal -Comment[pt]=Projecto de Pascal -Comment[pt_BR]=Projeto Pascal -Comment[ru]=Проект Pascal -Comment[sk]=Pascal projekt -Comment[sl]=Projekt Pascal -Comment[sr]=Pascal пројекат -Comment[sr@Latn]=Pascal projekat -Comment[sv]=Pascal-projekt -Comment[ta]=பாஸ்கல் பிராஜக்ட் -Comment[tg]=Лоиҳаи Pascal -Comment[tr]=Pascal Projesi -Comment[uz]=Pascal loyihasi -Comment[uz@cyrillic]=Pascal лойиҳаси -Comment[zh_CN]=Pascal 工程 -Comment[zh_TW]=Pascal 專案 -Name=KDevPascalProject -Name[da]=TDevelop Pascal-projekt -Name[de]=Pascal-Projekt (TDevelop) -Name[hi]=के-डेव-पास्कल-परियोजना -Name[nds]=Pascal-Projekt (TDevelop) -Name[ne]=केडीई विकास पास्कल परियोजना -Name[pl]=KDevProjektPascal -Name[sk]=KDevPascalProjekt -Name[sv]=TDevelop Pascal-projekt -Name[ta]=கெடெவ் பாஸ்கல் பிராஜக்ட் -Name[tg]=Лоиҳаи ПаскалKDev -Name[zh_TW]=TDevelop Pascal 專案 -GenericName=Pascal Project -GenericName[br]=Raktres Pascal -GenericName[ca]=Projecte Pascal -GenericName[da]=Pascal projekt -GenericName[de]=Pascal-Projekt -GenericName[el]=Έργο Pascal -GenericName[es]=Proyecto de Pascal -GenericName[et]=Pascali projekt -GenericName[eu]=Pascal proiektua -GenericName[fa]=پروژۀ پاسکال -GenericName[fr]=Projet en langage PASCAL -GenericName[ga]=Tionscadal Pascal -GenericName[gl]=Proxecto Pascal -GenericName[hi]=पास्कल परियोजना -GenericName[hu]=Pascal-projekt -GenericName[it]=Progetto in Pascal -GenericName[ja]=Pascal プロジェクト -GenericName[ms]=Projek Pascal -GenericName[nds]=Pascal-Projekt -GenericName[ne]=पास्कल परियोजना -GenericName[nl]=Pascal-project -GenericName[pl]=Projekt: Pascal -GenericName[pt]=Projecto de Pascal -GenericName[pt_BR]=Projeto Pascal -GenericName[ru]=Проект Pascal -GenericName[sk]=Pascal projekt -GenericName[sl]=Projekt Pascal -GenericName[sr]=Pascal пројекат -GenericName[sr@Latn]=Pascal projekat -GenericName[sv]=Pascal-projekt -GenericName[ta]=பாஸ்கல் பிராஜக்ட் -GenericName[tr]=Pascal Projesi -GenericName[uz]=Pascal loyihasi -GenericName[uz@cyrillic]=Pascal лойиҳаси -GenericName[zh_CN]=Pascal 工程 -GenericName[zh_TW]=Pascal 專案 -ServiceTypes=TDevelop/Project -X-TDE-Library=libtdevpascalproject -X-TDevelop-Version=5 diff --git a/buildtools/qmake/CMakeLists.txt b/buildtools/qmake/CMakeLists.txt index e2b877f5..fa281096 100644 --- a/buildtools/qmake/CMakeLists.txt +++ b/buildtools/qmake/CMakeLists.txt @@ -31,13 +31,13 @@ link_directories( ##### other data ################################ -install( FILES tdevtrollproject.desktop tdevtmakeproject.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevtrollproject.rc DESTINATION ${DATA_INSTALL_DIR}/tdevtrollproject ) +install( FILES kdevtrollproject.desktop kdevtmakeproject.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevtrollproject.rc DESTINATION ${DATA_INSTALL_DIR}/kdevtrollproject ) -##### libtdevtrollproject (module) ############## +##### libkdevtrollproject (module) ############## -tde_add_kpart( libtdevtrollproject AUTOMOC +tde_add_kpart( libkdevtrollproject AUTOMOC SOURCES choosesubprojectdlg.cpp choosesubprojectdlgbase.ui createscopedlg.cpp createscopedlgbase.ui @@ -48,6 +48,6 @@ tde_add_kpart( libtdevtrollproject AUTOMOC qmakeoptionswidgetbase.ui qmakescopeitem.cpp scope.cpp trolllistview.cpp trollprojectpart.cpp trollprojectwidget.cpp - LINK tdevqmakeparser-shared tdevbuildbase-shared tdevbuildtoolswidgets-shared + LINK kdevqmakeparser-shared kdevbuildbase-shared kdevbuildtoolswidgets-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/buildtools/qmake/Makefile.am b/buildtools/qmake/Makefile.am index 68adba76..b50fc775 100644 --- a/buildtools/qmake/Makefile.am +++ b/buildtools/qmake/Makefile.am @@ -8,14 +8,14 @@ INCLUDES = -I$(top_srcdir)/buildtools/lib/base \ -I$(top_builddir)/buildtools/lib/widgets $(all_includes) -kde_module_LTLIBRARIES = libtdevtrollproject.la -libtdevtrollproject_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevtrollproject_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/lib/util/libtdevutil.la $(top_builddir)/buildtools/lib/widgets/libtdevbuildtoolswidgets.la \ - $(top_builddir)/buildtools/lib/base/libtdevbuildbase.la \ - $(top_builddir)/buildtools/lib/parsers/qmake/libtdevqmakeparser.la - -libtdevtrollproject_la_SOURCES = choosesubprojectdlg.cpp \ +kde_module_LTLIBRARIES = libkdevtrollproject.la +libkdevtrollproject_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevtrollproject_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/lib/util/libkdevutil.la $(top_builddir)/buildtools/lib/widgets/libkdevbuildtoolswidgets.la \ + $(top_builddir)/buildtools/lib/base/libkdevbuildbase.la \ + $(top_builddir)/buildtools/lib/parsers/qmake/libkdevqmakeparser.la + +libkdevtrollproject_la_SOURCES = choosesubprojectdlg.cpp \ choosesubprojectdlgbase.ui createscopedlg.cpp createscopedlgbase.ui disablesubprojectdlg.cpp \ disablesubprojectdlgbase.ui newwidgetdlg.cpp newwidgetdlgbase.ui \ projectconfigurationdlg.cpp projectconfigurationdlgbase.ui qmakedefaultopts.cpp \ @@ -26,9 +26,9 @@ libtdevtrollproject_la_SOURCES = choosesubprojectdlg.cpp \ METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevtrollproject.desktop tdevtmakeproject.desktop +service_DATA = kdevtrollproject.desktop kdevtmakeproject.desktop -rcdir = $(kde_datadir)/tdevtrollproject -rc_DATA = tdevtrollproject.rc +rcdir = $(kde_datadir)/kdevtrollproject +rc_DATA = kdevtrollproject.rc noinst_HEADERS = createscopedlg.h disablesubprojectdlg.h qmakedefaultopts.h \ qmakeoptionswidget.h qmakescopeitem.h trolllistview.h diff --git a/buildtools/qmake/kdevtmakeproject.desktop b/buildtools/qmake/kdevtmakeproject.desktop new file mode 100644 index 00000000..97b4b528 --- /dev/null +++ b/buildtools/qmake/kdevtmakeproject.desktop @@ -0,0 +1,91 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=TMake Project +Comment[br]=Rektras TMake +Comment[ca]=Projecte TMake +Comment[da]=TMake-projekt +Comment[de]=TMake-Projekt für TDevelop +Comment[el]=Έργο TMake +Comment[es]=Proyecto TMake +Comment[et]=TMake projekt +Comment[eu]=TMake proiektua +Comment[fa]=پروژۀ TMake +Comment[fr]=Projet avec TMake +Comment[ga]=Comhad tionscadail TMake +Comment[gl]=Proxecto TMake +Comment[hi]=टी-मेक परियोजना +Comment[hu]=TMake-projekt +Comment[is]=TMake verkefni +Comment[it]=Progetto per TMake +Comment[ja]=TMake プロジェクト +Comment[ms]=Projek TMake +Comment[nds]=TMake-Projekt +Comment[ne]=TMake परियोजना +Comment[nl]=TMake-project +Comment[pl]=Projekt: TMake +Comment[pt]=Projecto TMake +Comment[pt_BR]=Projeto TMake +Comment[ru]=Проект TMake +Comment[sk]=TMake projekt +Comment[sl]=Projekt TMake +Comment[sr]=TMake пројекат +Comment[sr@Latn]=TMake projekat +Comment[sv]=Tmake-projekt +Comment[ta]=டிமேக் பிராஜக்ட் +Comment[tg]=Лоиҳаи TMake +Comment[tr]=TMake Projesi +Comment[zh_CN]=TMake 工程 +Comment[zh_TW]=TMake 專案 +Name=KDevTMakeProject +Name[da]=TDevelop TMake-projekt +Name[de]=TMake-Projekt (TDevelop) +Name[hi]=के-डेव-टी-मेक-परियोजना +Name[nds]=TMake-Projekt (TDevelop) +Name[ne]=KDevTMake परियोजना +Name[pl]=KDevProjektTMake +Name[sk]=KDevTMakeProjekt +Name[sv]=TDevelop Tmake-projekt +Name[ta]=கெடெவ் டிமேக் பிராஜக்ட் +Name[tg]=KDevTСохтани лоиҳа +Name[zh_TW]=TDevelop TMake 專案 +GenericName=TMake Project +GenericName[br]=Raktres TMake +GenericName[ca]=Projecte TMake +GenericName[da]=TMake-projekt +GenericName[de]=TMake-Projekt +GenericName[el]=Έργο TMake +GenericName[es]=Proyecto TMake +GenericName[et]=TMake projekt +GenericName[eu]=TMake proiektua +GenericName[fa]=پروژۀ TMake +GenericName[fr]=Projet avec TMake +GenericName[ga]=Tionscadal TMake +GenericName[gl]=Proxecto TMake +GenericName[hi]=टी-मेक परियोजना +GenericName[hu]=TMake-projekt +GenericName[it]=Progetto per TMake +GenericName[ja]=TMake プロジェクト +GenericName[ms]=Projek TMake +GenericName[nds]=TMake-Projekt +GenericName[ne]=TMake परियोजना +GenericName[nl]=TMake-project +GenericName[pl]=Projekt: TMake +GenericName[pt]=Projecto TMake +GenericName[pt_BR]=Projeto TMake +GenericName[ru]=Проект TMake +GenericName[sk]=TMake projekt +GenericName[sl]=Projekt TMake +GenericName[sr]=TMake пројекат +GenericName[sr@Latn]=TMake projekat +GenericName[sv]=Tmake-projekt +GenericName[ta]=டிமேக் பிராஜக்ட் +GenericName[tg]=Лоиҳаи TMake +GenericName[tr]=TMake Projesi +GenericName[zh_CN]=TMake 工程 +GenericName[zh_TW]=TMake 專案 +ServiceTypes=TDevelop/Project +X-TDE-Library=libkdevtrollproject +X-TDevelop-Version=5 +X-TDevelop-Args=TMake + diff --git a/buildtools/qmake/kdevtrollproject.desktop b/buildtools/qmake/kdevtrollproject.desktop new file mode 100644 index 00000000..bf118c56 --- /dev/null +++ b/buildtools/qmake/kdevtrollproject.desktop @@ -0,0 +1,95 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=QMake Project +Comment[br]=Raktres QMake +Comment[ca]=Projecte QMake +Comment[da]=QMake-projekt +Comment[de]=QMake-Projekt für TDevelop +Comment[el]=Έργο QMake +Comment[es]=Proyecto QMake +Comment[et]=QMake projekt +Comment[eu]=QMake proiektua +Comment[fa]=پروژۀ QMake +Comment[fr]=Projet avec QMake +Comment[ga]=Tionscadal QMake +Comment[gl]=Proxecto QMake +Comment[hi]=क्यू-मेक परियोजना +Comment[hu]=QMake-projekt +Comment[is]=QMake verkefni +Comment[it]=Progetto per QMake +Comment[ja]=QMake プロジェクト +Comment[ms]=Projek QMake +Comment[nds]=QMake-Projekt +Comment[ne]=QMake परियोजना +Comment[nl]=QMake-project +Comment[pa]=QMake ਪ੍ਰੋਜੈਕਟ +Comment[pl]=Projekt: QMake +Comment[pt]=Projecto QMake +Comment[pt_BR]=Projeto QMake +Comment[ru]=Проект QMake +Comment[sk]=QMake projekt +Comment[sl]=Projekt QMake +Comment[sr]=QMake пројекат +Comment[sr@Latn]=QMake projekat +Comment[sv]=Qmake-projekt +Comment[ta]=க்யுமேக் பிராஜக்ட் +Comment[tg]=Лоиҳаи QMake +Comment[tr]=QMake Projesi +Comment[uz]=QMake loyihasi +Comment[uz@cyrillic]=QMake лойиҳаси +Comment[zh_CN]=QMake 工程 +Comment[zh_TW]=QMake 專案 +Name=KDevTrollProject +Name[da]=TDevelop Troll-projekt +Name[de]=QMake-Projekt (TDevelop) +Name[hi]=के-डेव-ट्रॉल-परियोजना +Name[nds]=QMake-Projekt (TDevelop) +Name[ne]=KDevTroll परियोजना +Name[pl]=KDevProjektTroll +Name[sk]=KDevTrollProjekt +Name[sv]=TDevelop Troll-projekt +Name[ta]=கெடெவ் டிரால் பிராஜக்ட் +Name[zh_TW]=TDevelop Troll 專案 +GenericName=QMake Project +GenericName[br]=Raktres QMake +GenericName[ca]=Projecte QMake +GenericName[da]=QMake-projekt +GenericName[de]=QMake-Projekt +GenericName[el]=Έργο QMake +GenericName[es]=Proyecto QMake +GenericName[et]=QMake projekt +GenericName[eu]=QMake proiektua +GenericName[fa]=پروژۀ QMake +GenericName[fr]=Projet avec QMake +GenericName[ga]=Tionscadal QMake +GenericName[gl]=Proxecto QMake +GenericName[hi]=क्यू-मेक परियोजना +GenericName[hu]=QMake-projekt +GenericName[it]=Progetto per QMake +GenericName[ja]=QMake プロジェクト +GenericName[ms]=Projek QMake +GenericName[nds]=QMake-Projekt +GenericName[ne]=QMake परियोजना +GenericName[nl]=QMake-project +GenericName[pa]=QMake ਪ੍ਰੋਜੈਕਟ +GenericName[pl]=Projekt: QMake +GenericName[pt]=Projecto QMake +GenericName[pt_BR]=Projeto QMake +GenericName[ru]=Проект QMake +GenericName[sk]=QMake projekt +GenericName[sl]=Projekt QMake +GenericName[sr]=QMake пројекат +GenericName[sr@Latn]=QMake projekat +GenericName[sv]=Qmake-projekt +GenericName[ta]=க்யுமேக் பிராஜக்ட் +GenericName[tg]=Лоиҳаи QMake +GenericName[tr]=QMake Projesi +GenericName[uz]=QMake loyihasi +GenericName[uz@cyrillic]=QMake лойиҳаси +GenericName[zh_CN]=QMake 工程 +GenericName[zh_TW]=QMake 專案 +ServiceTypes=TDevelop/Project +X-TDE-Library=libkdevtrollproject +X-TDevelop-Version=5 +X-TDevelop-Args= diff --git a/buildtools/qmake/tdevtrollproject.rc b/buildtools/qmake/kdevtrollproject.rc similarity index 100% rename from buildtools/qmake/tdevtrollproject.rc rename to buildtools/qmake/kdevtrollproject.rc diff --git a/buildtools/qmake/tdevtmakeproject.desktop b/buildtools/qmake/tdevtmakeproject.desktop deleted file mode 100644 index a5b729d5..00000000 --- a/buildtools/qmake/tdevtmakeproject.desktop +++ /dev/null @@ -1,91 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=TMake Project -Comment[br]=Rektras TMake -Comment[ca]=Projecte TMake -Comment[da]=TMake-projekt -Comment[de]=TMake-Projekt für TDevelop -Comment[el]=Έργο TMake -Comment[es]=Proyecto TMake -Comment[et]=TMake projekt -Comment[eu]=TMake proiektua -Comment[fa]=پروژۀ TMake -Comment[fr]=Projet avec TMake -Comment[ga]=Comhad tionscadail TMake -Comment[gl]=Proxecto TMake -Comment[hi]=टी-मेक परियोजना -Comment[hu]=TMake-projekt -Comment[is]=TMake verkefni -Comment[it]=Progetto per TMake -Comment[ja]=TMake プロジェクト -Comment[ms]=Projek TMake -Comment[nds]=TMake-Projekt -Comment[ne]=TMake परियोजना -Comment[nl]=TMake-project -Comment[pl]=Projekt: TMake -Comment[pt]=Projecto TMake -Comment[pt_BR]=Projeto TMake -Comment[ru]=Проект TMake -Comment[sk]=TMake projekt -Comment[sl]=Projekt TMake -Comment[sr]=TMake пројекат -Comment[sr@Latn]=TMake projekat -Comment[sv]=Tmake-projekt -Comment[ta]=டிமேக் பிராஜக்ட் -Comment[tg]=Лоиҳаи TMake -Comment[tr]=TMake Projesi -Comment[zh_CN]=TMake 工程 -Comment[zh_TW]=TMake 專案 -Name=KDevTMakeProject -Name[da]=TDevelop TMake-projekt -Name[de]=TMake-Projekt (TDevelop) -Name[hi]=के-डेव-टी-मेक-परियोजना -Name[nds]=TMake-Projekt (TDevelop) -Name[ne]=KDevTMake परियोजना -Name[pl]=KDevProjektTMake -Name[sk]=KDevTMakeProjekt -Name[sv]=TDevelop Tmake-projekt -Name[ta]=கெடெவ் டிமேக் பிராஜக்ட் -Name[tg]=KDevTСохтани лоиҳа -Name[zh_TW]=TDevelop TMake 專案 -GenericName=TMake Project -GenericName[br]=Raktres TMake -GenericName[ca]=Projecte TMake -GenericName[da]=TMake-projekt -GenericName[de]=TMake-Projekt -GenericName[el]=Έργο TMake -GenericName[es]=Proyecto TMake -GenericName[et]=TMake projekt -GenericName[eu]=TMake proiektua -GenericName[fa]=پروژۀ TMake -GenericName[fr]=Projet avec TMake -GenericName[ga]=Tionscadal TMake -GenericName[gl]=Proxecto TMake -GenericName[hi]=टी-मेक परियोजना -GenericName[hu]=TMake-projekt -GenericName[it]=Progetto per TMake -GenericName[ja]=TMake プロジェクト -GenericName[ms]=Projek TMake -GenericName[nds]=TMake-Projekt -GenericName[ne]=TMake परियोजना -GenericName[nl]=TMake-project -GenericName[pl]=Projekt: TMake -GenericName[pt]=Projecto TMake -GenericName[pt_BR]=Projeto TMake -GenericName[ru]=Проект TMake -GenericName[sk]=TMake projekt -GenericName[sl]=Projekt TMake -GenericName[sr]=TMake пројекат -GenericName[sr@Latn]=TMake projekat -GenericName[sv]=Tmake-projekt -GenericName[ta]=டிமேக் பிராஜக்ட் -GenericName[tg]=Лоиҳаи TMake -GenericName[tr]=TMake Projesi -GenericName[zh_CN]=TMake 工程 -GenericName[zh_TW]=TMake 專案 -ServiceTypes=TDevelop/Project -X-TDE-Library=libtdevtrollproject -X-TDevelop-Version=5 -X-TDevelop-Args=TMake - diff --git a/buildtools/qmake/tdevtrollproject.desktop b/buildtools/qmake/tdevtrollproject.desktop deleted file mode 100644 index 24ef620e..00000000 --- a/buildtools/qmake/tdevtrollproject.desktop +++ /dev/null @@ -1,95 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=QMake Project -Comment[br]=Raktres QMake -Comment[ca]=Projecte QMake -Comment[da]=QMake-projekt -Comment[de]=QMake-Projekt für TDevelop -Comment[el]=Έργο QMake -Comment[es]=Proyecto QMake -Comment[et]=QMake projekt -Comment[eu]=QMake proiektua -Comment[fa]=پروژۀ QMake -Comment[fr]=Projet avec QMake -Comment[ga]=Tionscadal QMake -Comment[gl]=Proxecto QMake -Comment[hi]=क्यू-मेक परियोजना -Comment[hu]=QMake-projekt -Comment[is]=QMake verkefni -Comment[it]=Progetto per QMake -Comment[ja]=QMake プロジェクト -Comment[ms]=Projek QMake -Comment[nds]=QMake-Projekt -Comment[ne]=QMake परियोजना -Comment[nl]=QMake-project -Comment[pa]=QMake ਪ੍ਰੋਜੈਕਟ -Comment[pl]=Projekt: QMake -Comment[pt]=Projecto QMake -Comment[pt_BR]=Projeto QMake -Comment[ru]=Проект QMake -Comment[sk]=QMake projekt -Comment[sl]=Projekt QMake -Comment[sr]=QMake пројекат -Comment[sr@Latn]=QMake projekat -Comment[sv]=Qmake-projekt -Comment[ta]=க்யுமேக் பிராஜக்ட் -Comment[tg]=Лоиҳаи QMake -Comment[tr]=QMake Projesi -Comment[uz]=QMake loyihasi -Comment[uz@cyrillic]=QMake лойиҳаси -Comment[zh_CN]=QMake 工程 -Comment[zh_TW]=QMake 專案 -Name=KDevTrollProject -Name[da]=TDevelop Troll-projekt -Name[de]=QMake-Projekt (TDevelop) -Name[hi]=के-डेव-ट्रॉल-परियोजना -Name[nds]=QMake-Projekt (TDevelop) -Name[ne]=KDevTroll परियोजना -Name[pl]=KDevProjektTroll -Name[sk]=KDevTrollProjekt -Name[sv]=TDevelop Troll-projekt -Name[ta]=கெடெவ் டிரால் பிராஜக்ட் -Name[zh_TW]=TDevelop Troll 專案 -GenericName=QMake Project -GenericName[br]=Raktres QMake -GenericName[ca]=Projecte QMake -GenericName[da]=QMake-projekt -GenericName[de]=QMake-Projekt -GenericName[el]=Έργο QMake -GenericName[es]=Proyecto QMake -GenericName[et]=QMake projekt -GenericName[eu]=QMake proiektua -GenericName[fa]=پروژۀ QMake -GenericName[fr]=Projet avec QMake -GenericName[ga]=Tionscadal QMake -GenericName[gl]=Proxecto QMake -GenericName[hi]=क्यू-मेक परियोजना -GenericName[hu]=QMake-projekt -GenericName[it]=Progetto per QMake -GenericName[ja]=QMake プロジェクト -GenericName[ms]=Projek QMake -GenericName[nds]=QMake-Projekt -GenericName[ne]=QMake परियोजना -GenericName[nl]=QMake-project -GenericName[pa]=QMake ਪ੍ਰੋਜੈਕਟ -GenericName[pl]=Projekt: QMake -GenericName[pt]=Projecto QMake -GenericName[pt_BR]=Projeto QMake -GenericName[ru]=Проект QMake -GenericName[sk]=QMake projekt -GenericName[sl]=Projekt QMake -GenericName[sr]=QMake пројекат -GenericName[sr@Latn]=QMake projekat -GenericName[sv]=Qmake-projekt -GenericName[ta]=க்யுமேக் பிராஜக்ட் -GenericName[tg]=Лоиҳаи QMake -GenericName[tr]=QMake Projesi -GenericName[uz]=QMake loyihasi -GenericName[uz@cyrillic]=QMake лойиҳаси -GenericName[zh_CN]=QMake 工程 -GenericName[zh_TW]=QMake 專案 -ServiceTypes=TDevelop/Project -X-TDE-Library=libtdevtrollproject -X-TDevelop-Version=5 -X-TDevelop-Args= diff --git a/buildtools/qmake/trollprojectpart.cpp b/buildtools/qmake/trollprojectpart.cpp index 738e2534..c71afc30 100644 --- a/buildtools/qmake/trollprojectpart.cpp +++ b/buildtools/qmake/trollprojectpart.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include @@ -41,11 +41,11 @@ #include "domutil.h" -#include "tdevcore.h" -#include "tdevmainwindow.h" -#include "tdevmakefrontend.h" -#include "tdevappfrontend.h" -#include "tdevpartcontroller.h" +#include "kdevcore.h" +#include "kdevmainwindow.h" +#include "kdevmakefrontend.h" +#include "kdevappfrontend.h" +#include "kdevpartcontroller.h" #include "trollprojectwidget.h" #include "runoptionswidget.h" #include "config.h" @@ -53,15 +53,15 @@ #include "qmakeoptionswidget.h" #include "scope.h" -#include +#include #include -typedef TDevGenericFactory TrollProjectFactory; -static const TDevPluginInfo data("tdevtrollproject"); -K_EXPORT_COMPONENT_FACTORY( libtdevtrollproject, TrollProjectFactory( data ) ) +typedef KDevGenericFactory TrollProjectFactory; +static const KDevPluginInfo data("kdevtrollproject"); +K_EXPORT_COMPONENT_FACTORY( libkdevtrollproject, TrollProjectFactory( data ) ) TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQStringList& args ) - : TDevBuildTool(&data, parent, name ? name : "TrollProjectPart") + : KDevBuildTool(&data, parent, name ? name : "TrollProjectPart") { setInstance(TrollProjectFactory::instance()); @@ -70,7 +70,7 @@ TrollProjectPart::TrollProjectPart(TQObject *parent, const char *name, const TQS else m_tmakeProject = false; - setXMLFile("tdevtrollproject.rc"); + setXMLFile("kdevtrollproject.rc"); m_executeProjectAfterBuild = false; m_executeTargetAfterBuild = false; @@ -405,7 +405,7 @@ void TrollProjectPart::openProject(const TQString &dirName, const TQString &proj DomUtil::writeEntry(dom, "/kdevtrollproject/run/directoryradio", "executable"); } - TDevProject::openProject( dirName, projectName ); + KDevProject::openProject( dirName, projectName ); } @@ -475,7 +475,7 @@ TQString TrollProjectPart::runDirectory() const TQString cwd; if( DomUtil::readBoolEntry(dom, "/kdevtrollproject/run/useglobalprogram", true) ) { - cwd = defaultRunDirectory("tdevtrollproject"); + cwd = defaultRunDirectory("kdevtrollproject"); }else { TQString name = m_widget->getCurrentOutputFilename(); @@ -788,7 +788,7 @@ bool TrollProjectPart::isDirty() return false; } -TDevProject::Options TrollProjectPart::options( ) const +KDevProject::Options TrollProjectPart::options( ) const { return UsesTQMakeBuildSystem; } diff --git a/buildtools/qmake/trollprojectpart.h b/buildtools/qmake/trollprojectpart.h index 2b673b59..e36ef202 100644 --- a/buildtools/qmake/trollprojectpart.h +++ b/buildtools/qmake/trollprojectpart.h @@ -21,14 +21,14 @@ #include #include -#include "tdevbuildtool.h" +#include "kdevbuildtool.h" class KDialogBase; class TrollProjectWidget; class KDirWatch; class TQMakeDefaultOpts; -class TrollProjectPart : public TDevBuildTool +class TrollProjectPart : public KDevBuildTool { Q_OBJECT diff --git a/buildtools/qmake/trollprojectwidget.cpp b/buildtools/qmake/trollprojectwidget.cpp index 12d814a5..68dfad8e 100644 --- a/buildtools/qmake/trollprojectwidget.cpp +++ b/buildtools/qmake/trollprojectwidget.cpp @@ -60,14 +60,14 @@ #include #include -#include "tdevcore.h" -#include "tdevpartcontroller.h" -#include "tdevmainwindow.h" +#include "kdevcore.h" +#include "kdevpartcontroller.h" +#include "kdevmainwindow.h" #include "trollprojectpart.h" -#include "tdevappfrontend.h" -#include "tdevmakefrontend.h" -#include "tdevlanguagesupport.h" -#include "tdevcreatefile.h" +#include "kdevappfrontend.h" +#include "kdevmakefrontend.h" +#include "kdevlanguagesupport.h" +#include "kdevcreatefile.h" #include "subclassesdlg.h" #include "addfilesdialog.h" #include "urlutil.h" @@ -1403,7 +1403,7 @@ void TrollProjectWidget::slotNewFile() return ; } } - TDevCreateFile * createFileSupport = m_part->extension( "TDevelop/CreateFile" ); + KDevCreateFile * createFileSupport = m_part->extension( "TDevelop/CreateFile" ); TQString fcext; if( gitem ) { @@ -1437,7 +1437,7 @@ void TrollProjectWidget::slotNewFile() fcext = TQString(); } } - TDevCreateFile::CreatedFile crFile = + KDevCreateFile::CreatedFile crFile = createFileSupport->createNewFile( fcext, projectDirectory() + TQString(TQChar(TQDir::separator()))+ m_shownSubproject->relativePath() ); } @@ -1683,7 +1683,7 @@ void TrollProjectWidget::slotDetailsContextMenu( TDEListView *, TQListViewItem * } else if ( r == idInsNewFile ) { - TDevCreateFile * createFileSupport = m_part->extension( "TDevelop/CreateFile" ); + KDevCreateFile * createFileSupport = m_part->extension( "TDevelop/CreateFile" ); TQString fcext; switch ( titem->groupType ) { @@ -1714,7 +1714,7 @@ void TrollProjectWidget::slotDetailsContextMenu( TDEListView *, TQListViewItem * default: fcext = TQString(); } - TDevCreateFile::CreatedFile crFile = + KDevCreateFile::CreatedFile crFile = createFileSupport->createNewFile( fcext, cleanSubprojectPath ); } diff --git a/buildtools/script/CMakeLists.txt b/buildtools/script/CMakeLists.txt index c30a403d..d3f97540 100644 --- a/buildtools/script/CMakeLists.txt +++ b/buildtools/script/CMakeLists.txt @@ -27,16 +27,16 @@ link_directories( ##### other data ################################ -install( FILES tdevscriptproject.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevscriptproject.rc DESTINATION ${DATA_INSTALL_DIR}/tdevscriptproject ) +install( FILES kdevscriptproject.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevscriptproject.rc DESTINATION ${DATA_INSTALL_DIR}/kdevscriptproject ) -##### libtdevscriptproject (module) ############# +##### libkdevscriptproject (module) ############# -tde_add_kpart( libtdevscriptproject AUTOMOC +tde_add_kpart( libkdevscriptproject AUTOMOC SOURCES scriptprojectpart.cpp scriptoptionswidget.cpp scriptoptionswidgetbase.ui scriptnewfiledlg.cpp - LINK tdevbuildbase-shared + LINK kdevbuildbase-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/buildtools/script/Makefile.am b/buildtools/script/Makefile.am index a3d7652a..542b1a69 100644 --- a/buildtools/script/Makefile.am +++ b/buildtools/script/Makefile.am @@ -10,17 +10,17 @@ INCLUDES = -I$(top_srcdir)/buildtools/lib/base \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/interfaces/external -I$(top_srcdir)/lib/util \ -I$(top_srcdir)/lib/external_interfaces $(all_includes) -kde_module_LTLIBRARIES = libtdevscriptproject.la -libtdevscriptproject_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevscriptproject_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/buildtools/lib/widgets/libtdevbuildtoolswidgets.la $(top_builddir)/buildtools/lib/base/libtdevbuildbase.la +kde_module_LTLIBRARIES = libkdevscriptproject.la +libkdevscriptproject_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevscriptproject_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/buildtools/lib/widgets/libkdevbuildtoolswidgets.la $(top_builddir)/buildtools/lib/base/libkdevbuildbase.la -libtdevscriptproject_la_SOURCES = scriptprojectpart.cpp scriptoptionswidget.cpp scriptoptionswidgetbase.ui scriptnewfiledlg.cpp +libkdevscriptproject_la_SOURCES = scriptprojectpart.cpp scriptoptionswidget.cpp scriptoptionswidgetbase.ui scriptnewfiledlg.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevscriptproject.desktop +service_DATA = kdevscriptproject.desktop -rcdir = $(kde_datadir)/tdevscriptproject -rc_DATA = tdevscriptproject.rc +rcdir = $(kde_datadir)/kdevscriptproject +rc_DATA = kdevscriptproject.rc diff --git a/buildtools/script/kdevscriptproject.desktop b/buildtools/script/kdevscriptproject.desktop new file mode 100644 index 00000000..6e135c16 --- /dev/null +++ b/buildtools/script/kdevscriptproject.desktop @@ -0,0 +1,87 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Scripting Language Project +Comment[ca]=Projecte de llenguatge escrivint scripts +Comment[da]=Scriptsprog-projekt +Comment[de]=Skriptsprachen-Projekt für TDevelop +Comment[el]=Έργο γλώσσας γραφής σεναρίων +Comment[es]=Proyecto de lenguaje de guiones +Comment[et]=Skriptikeele projekt +Comment[eu]=Script lengoai proiektua +Comment[fa]=پروژۀ زبان دست‌نوشته‌ای +Comment[fr]=Projet avec les langages de scripts +Comment[ga]=Tionscadal i dTeanga Scriptithe +Comment[gl]=Proxecto de linguaxe de scripting +Comment[hi]=स्क्रिप्टिंग भाषा परियोजना +Comment[hu]=Szkript-projekt +Comment[is]=Skriftumálsverkefni +Comment[it]=Progetto con linguaggio di scripting +Comment[ja]=スクリプト言語プロジェクト +Comment[ms]=Projek Bahasa Penskrip +Comment[nds]=Skriptspraak-Projekt +Comment[ne]=स्क्रिप्टिङ भाषा परियोजना +Comment[nl]=Scripttaal-project +Comment[pl]=Projekt w języku skryptowym +Comment[pt]=Projecto de uma Linguagem de 'Scripting' +Comment[pt_BR]=Projeto de Linguagem de Script +Comment[ru]=Проект скриптового языка +Comment[sk]=Skriptovací jazyk projekt +Comment[sl]=Projekt skriptnega jezika +Comment[sr]=Пројекат скриптног језика +Comment[sr@Latn]=Projekat skriptnog jezika +Comment[sv]=Projekt för skriptspråk +Comment[ta]=ஸ்கிரிப்டிங் மொழி பிராஜக்ட் +Comment[tg]=Лоиҳа бо забони ғарчкунӣ +Comment[tr]=Betik Dili Projesi +Comment[zh_CN]=脚本语言工程 +Comment[zh_TW]=文稿語言專案 +Name=KDevScriptProject +Name[da]=TDevelop script-projekt +Name[de]=Skriptsprachen-Projekt (TDevelop) +Name[hi]=के-डेव-स्क्रिप्ट-परियोजना +Name[nds]=Skriptspraak-Projekt (TDevelop) +Name[ne]=केडीई विकास स्क्रिप्ट परियोजना +Name[pl]=KDevProjektSkrypt +Name[sk]=KDevSkriptProjekt +Name[sv]=TDevelop skriptprojekt +Name[ta]=கெடெவ் ஸ்கிரிப்ட் பிராஜக்ட் +Name[tg]=KDevЛоиҳаи скрипт +Name[zh_TW]=TDevelop 文稿專案 +GenericName=Scripting Language Project +GenericName[ca]=Projecte de llenguatge escrivint scripts +GenericName[da]=Scriptsprog-projekt +GenericName[de]=Skriptsprachen-Projekt +GenericName[el]=Έργο γλώσσας γραφής σεναρίων +GenericName[es]=Proyecto de lenguaje de guiones +GenericName[et]=Skriptikeele projekt +GenericName[eu]=Script lengoaia proiektua +GenericName[fa]=پروژۀ زبان دست‌نوشته‌ای +GenericName[fr]=Projet avec les langages de scripts +GenericName[ga]=Tionscadal i dTeanga Scriptithe +GenericName[gl]=Proxecto de linguaxe de scripting +GenericName[hi]=स्क्रिप्टिंग भाषा परियोजना +GenericName[hu]=Szkript-projekt +GenericName[it]=Progetto con linguaggio di scripting +GenericName[ja]=スクリプト言語プロジェクト +GenericName[nds]=Skriptspraak-Projekt +GenericName[ne]=स्क्रिप्टिङ भाषा परियोजना +GenericName[nl]=Scripttaal-project +GenericName[pl]=Projekt w języku skryptowym +GenericName[pt]=Projecto de uma Linguagem de 'Scripting' +GenericName[pt_BR]=Projeto de Linguagem de Script +GenericName[ru]=Проект скриптового языка +GenericName[sk]=Skriptovací jazyk projekt +GenericName[sl]=Projekt skriptnega jezika +GenericName[sr]=Пројекат скриптног језика +GenericName[sr@Latn]=Projekat skriptnog jezika +GenericName[sv]=Projekt för skriptspråk +GenericName[ta]=ஸ்கிரிப்டிங் மொழி பிராஜக்ட் +GenericName[tg]=Лоиҳа бо забони ғарчкунӣ +GenericName[tr]=Betik Dili Projesi +GenericName[zh_CN]=脚本语言工程 +GenericName[zh_TW]=文稿語言專案 +ServiceTypes=TDevelop/Project +Icon=tdevelop +X-TDE-Library=libkdevscriptproject +X-TDevelop-Version=5 diff --git a/buildtools/script/kdevscriptproject.rc b/buildtools/script/kdevscriptproject.rc new file mode 100644 index 00000000..651b10b4 --- /dev/null +++ b/buildtools/script/kdevscriptproject.rc @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/buildtools/script/scriptnewfiledlg.cpp b/buildtools/script/scriptnewfiledlg.cpp index f254680e..9308792a 100644 --- a/buildtools/script/scriptnewfiledlg.cpp +++ b/buildtools/script/scriptnewfiledlg.cpp @@ -81,7 +81,7 @@ void ScriptNewFileDialog::accept() return; } - TDevProject *project = m_part->project(); + KDevProject *project = m_part->project(); if (!project->activeDirectory().isEmpty()) fileName.prepend(project->activeDirectory() + "/"); TQString destpath = project->projectDirectory() + "/" + fileName; diff --git a/buildtools/script/scriptoptionswidget.cpp b/buildtools/script/scriptoptionswidget.cpp index 13049699..d80cd501 100644 --- a/buildtools/script/scriptoptionswidget.cpp +++ b/buildtools/script/scriptoptionswidget.cpp @@ -16,10 +16,10 @@ #include #include #include "domutil.h" -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" -ScriptOptionsWidget::ScriptOptionsWidget(TDevPlugin *part, +ScriptOptionsWidget::ScriptOptionsWidget(KDevPlugin *part, TQWidget *parent, const char *name) : ScriptOptionsWidgetBase(parent, name) { diff --git a/buildtools/script/scriptoptionswidget.h b/buildtools/script/scriptoptionswidget.h index 086186cc..8f136d75 100644 --- a/buildtools/script/scriptoptionswidget.h +++ b/buildtools/script/scriptoptionswidget.h @@ -14,7 +14,7 @@ #include "scriptoptionswidgetbase.h" -class TDevPlugin; +class KDevPlugin; class ScriptOptionsWidget : public ScriptOptionsWidgetBase @@ -23,14 +23,14 @@ class ScriptOptionsWidget : public ScriptOptionsWidgetBase public: - ScriptOptionsWidget( TDevPlugin *part, TQWidget *parent=0, const char *name=0 ); + ScriptOptionsWidget( KDevPlugin *part, TQWidget *parent=0, const char *name=0 ); ~ScriptOptionsWidget(); public slots: void accept(); private: - TDevPlugin *m_part; + KDevPlugin *m_part; }; #endif diff --git a/buildtools/script/scriptprojectpart.cpp b/buildtools/script/scriptprojectpart.cpp index ef4fb16f..8f6b5fb4 100644 --- a/buildtools/script/scriptprojectpart.cpp +++ b/buildtools/script/scriptprojectpart.cpp @@ -23,32 +23,32 @@ #include #include #include -#include -#include +#include +#include #include #include "domutil.h" -#include "tdevcore.h" -#include "tdevmainwindow.h" -#include "tdevpartcontroller.h" -#include "tdevlanguagesupport.h" +#include "kdevcore.h" +#include "kdevmainwindow.h" +#include "kdevpartcontroller.h" +#include "kdevlanguagesupport.h" #include "scriptoptionswidget.h" #include "scriptnewfiledlg.h" -#include "tdevplugininfo.h" +#include "kdevplugininfo.h" -typedef TDevGenericFactory ScriptProjectFactory; -static const TDevPluginInfo data("tdevscriptproject"); -K_EXPORT_COMPONENT_FACTORY( libtdevscriptproject, ScriptProjectFactory( data ) ) +typedef KDevGenericFactory ScriptProjectFactory; +static const KDevPluginInfo data("kdevscriptproject"); +K_EXPORT_COMPONENT_FACTORY( libkdevscriptproject, ScriptProjectFactory( data ) ) ScriptProjectPart::ScriptProjectPart(TQObject *parent, const char *name, const TQStringList &) - : TDevBuildTool(&data, parent, name ? name : "ScriptProjectPart") + : KDevBuildTool(&data, parent, name ? name : "ScriptProjectPart") { setInstance(ScriptProjectFactory::instance()); - setXMLFile("tdevscriptproject.rc"); + setXMLFile("kdevscriptproject.rc"); // only create new file action if file creation part not available - if (!extension("TDevelop/CreateFile")) { + if (!extension("TDevelop/CreateFile")) { TDEAction *action; action = new TDEAction( i18n("New File..."), 0, this, TQT_SLOT(slotNewFile()), @@ -148,7 +148,7 @@ void ScriptProjectPart::openProject(const TQString &dirName, const TQString &pro } } while (!s.isEmpty()); - TDevProject::openProject( dirName, projectName ); + KDevProject::openProject( dirName, projectName ); } @@ -192,7 +192,7 @@ DomUtil::PairList ScriptProjectPart::runEnvironmentVars() const */ TQString ScriptProjectPart::runDirectory() const { - TQString cwd = defaultRunDirectory("tdevscriptproject"); + TQString cwd = defaultRunDirectory("kdevscriptproject"); if (cwd.isEmpty()) cwd = buildDirectory(); return cwd; diff --git a/buildtools/script/scriptprojectpart.h b/buildtools/script/scriptprojectpart.h index 2c3023ad..92087991 100644 --- a/buildtools/script/scriptprojectpart.h +++ b/buildtools/script/scriptprojectpart.h @@ -15,14 +15,14 @@ #include #include -#include "tdevbuildtool.h" +#include "kdevbuildtool.h" class TQListViewItem; class TQStringList; class KDialogBase; class ScriptProjectWidget; -class ScriptProjectPart : public TDevBuildTool +class ScriptProjectPart : public KDevBuildTool { Q_OBJECT diff --git a/buildtools/script/tdevscriptproject.desktop b/buildtools/script/tdevscriptproject.desktop deleted file mode 100644 index 9ba87c9f..00000000 --- a/buildtools/script/tdevscriptproject.desktop +++ /dev/null @@ -1,87 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Scripting Language Project -Comment[ca]=Projecte de llenguatge escrivint scripts -Comment[da]=Scriptsprog-projekt -Comment[de]=Skriptsprachen-Projekt für TDevelop -Comment[el]=Έργο γλώσσας γραφής σεναρίων -Comment[es]=Proyecto de lenguaje de guiones -Comment[et]=Skriptikeele projekt -Comment[eu]=Script lengoai proiektua -Comment[fa]=پروژۀ زبان دست‌نوشته‌ای -Comment[fr]=Projet avec les langages de scripts -Comment[ga]=Tionscadal i dTeanga Scriptithe -Comment[gl]=Proxecto de linguaxe de scripting -Comment[hi]=स्क्रिप्टिंग भाषा परियोजना -Comment[hu]=Szkript-projekt -Comment[is]=Skriftumálsverkefni -Comment[it]=Progetto con linguaggio di scripting -Comment[ja]=スクリプト言語プロジェクト -Comment[ms]=Projek Bahasa Penskrip -Comment[nds]=Skriptspraak-Projekt -Comment[ne]=स्क्रिप्टिङ भाषा परियोजना -Comment[nl]=Scripttaal-project -Comment[pl]=Projekt w języku skryptowym -Comment[pt]=Projecto de uma Linguagem de 'Scripting' -Comment[pt_BR]=Projeto de Linguagem de Script -Comment[ru]=Проект скриптового языка -Comment[sk]=Skriptovací jazyk projekt -Comment[sl]=Projekt skriptnega jezika -Comment[sr]=Пројекат скриптног језика -Comment[sr@Latn]=Projekat skriptnog jezika -Comment[sv]=Projekt för skriptspråk -Comment[ta]=ஸ்கிரிப்டிங் மொழி பிராஜக்ட் -Comment[tg]=Лоиҳа бо забони ғарчкунӣ -Comment[tr]=Betik Dili Projesi -Comment[zh_CN]=脚本语言工程 -Comment[zh_TW]=文稿語言專案 -Name=KDevScriptProject -Name[da]=TDevelop script-projekt -Name[de]=Skriptsprachen-Projekt (TDevelop) -Name[hi]=के-डेव-स्क्रिप्ट-परियोजना -Name[nds]=Skriptspraak-Projekt (TDevelop) -Name[ne]=केडीई विकास स्क्रिप्ट परियोजना -Name[pl]=KDevProjektSkrypt -Name[sk]=KDevSkriptProjekt -Name[sv]=TDevelop skriptprojekt -Name[ta]=கெடெவ் ஸ்கிரிப்ட் பிராஜக்ட் -Name[tg]=KDevЛоиҳаи скрипт -Name[zh_TW]=TDevelop 文稿專案 -GenericName=Scripting Language Project -GenericName[ca]=Projecte de llenguatge escrivint scripts -GenericName[da]=Scriptsprog-projekt -GenericName[de]=Skriptsprachen-Projekt -GenericName[el]=Έργο γλώσσας γραφής σεναρίων -GenericName[es]=Proyecto de lenguaje de guiones -GenericName[et]=Skriptikeele projekt -GenericName[eu]=Script lengoaia proiektua -GenericName[fa]=پروژۀ زبان دست‌نوشته‌ای -GenericName[fr]=Projet avec les langages de scripts -GenericName[ga]=Tionscadal i dTeanga Scriptithe -GenericName[gl]=Proxecto de linguaxe de scripting -GenericName[hi]=स्क्रिप्टिंग भाषा परियोजना -GenericName[hu]=Szkript-projekt -GenericName[it]=Progetto con linguaggio di scripting -GenericName[ja]=スクリプト言語プロジェクト -GenericName[nds]=Skriptspraak-Projekt -GenericName[ne]=स्क्रिप्टिङ भाषा परियोजना -GenericName[nl]=Scripttaal-project -GenericName[pl]=Projekt w języku skryptowym -GenericName[pt]=Projecto de uma Linguagem de 'Scripting' -GenericName[pt_BR]=Projeto de Linguagem de Script -GenericName[ru]=Проект скриптового языка -GenericName[sk]=Skriptovací jazyk projekt -GenericName[sl]=Projekt skriptnega jezika -GenericName[sr]=Пројекат скриптног језика -GenericName[sr@Latn]=Projekat skriptnog jezika -GenericName[sv]=Projekt för skriptspråk -GenericName[ta]=ஸ்கிரிப்டிங் மொழி பிராஜக்ட் -GenericName[tg]=Лоиҳа бо забони ғарчкунӣ -GenericName[tr]=Betik Dili Projesi -GenericName[zh_CN]=脚本语言工程 -GenericName[zh_TW]=文稿語言專案 -ServiceTypes=TDevelop/Project -Icon=tdevelop -X-TDE-Library=libtdevscriptproject -X-TDevelop-Version=5 diff --git a/buildtools/script/tdevscriptproject.rc b/buildtools/script/tdevscriptproject.rc deleted file mode 100644 index d15c3dc2..00000000 --- a/buildtools/script/tdevscriptproject.rc +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/configure.in.bot b/configure.in.bot index 6ee60dff..9b006e9e 100644 --- a/configure.in.bot +++ b/configure.in.bot @@ -1,7 +1,7 @@ if test "$DOT_FOUND" = "no"; then echo "" echo "You're missing the dot program." - echo "It is still possible to run and use TDevelop without it, but you will " + echo "It is still possible to run and use KDevelop without it, but you will " echo "not be able to use the new graphical classbrowser. In order to get " echo "a dot copy, go to www.graphviz.org and download the graphviz package." fi @@ -18,7 +18,7 @@ fi if test -n "$VCSCOMPAT" -a -z "$SVN_SUBDIR"; then echo "" echo "You're missing Subversion libraries (1.x)" - echo "TDevelop subversion support will not work without it," + echo "KDevelop subversion support will not work without it," echo "consider installing it." echo "" fi diff --git a/configure.in.in b/configure.in.in index 769baa0c..0e9fa12a 100644 --- a/configure.in.in +++ b/configure.in.in @@ -124,4 +124,4 @@ esac dnl AC_CHECK_FILE([$qt_includes/qassistantclient.h], [],[AC_MSG_ERROR([The qassistantclient.h header from Qt3 is needed to build tdevelop, on some systems this header is in a separate package called qt3-apps-dev])]) -KDE_INIT_DOXYGEN([TDevelop], [Version $VERSION]) +KDE_INIT_DOXYGEN([KDevelop], [Version $VERSION]) diff --git a/doc/Makefile.am b/doc/Makefile.am index 440f3684..8275eb30 100644 --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -1,2 +1,2 @@ -SUBDIRS = tdevelop std extras tde_app_devel tdevdesigner +SUBDIRS = tdevelop std extras kde_app_devel kdevdesigner diff --git a/doc/api/Architecture.dox b/doc/api/Architecture.dox index 52c1447a..ae4ef73d 100644 --- a/doc/api/Architecture.dox +++ b/doc/api/Architecture.dox @@ -40,7 +40,7 @@ parts to distinguish, mainly: - src = The core part of KDevelop - lib/interfaces = Plugin handler interface classes - - parts = The various parts using the KParts framework ( TDevPlugin children ) + - parts = The various parts using the KParts framework ( KDevPlugin children ) - languages = \ref language-parts - buildtools = \ref buildtool-parts - vcs = \ref vcs-parts @@ -67,12 +67,12 @@ There are two types of possible main window objects: pre-arranged access tabs around user areas. . -Both main window classes inherit from the TDevMainWindow class which provides +Both main window classes inherit from the KDevMainWindow class which provides access to common window features. \subsubsection toplevel The TopLevel Object -There is only one toplevel object of class TDevMainWindow in KDevelop. It can +There is only one toplevel object of class KDevMainWindow in KDevelop. It can be accessed through the static function TopLevel::getInstance() (see the TopLevel class). @@ -83,7 +83,7 @@ be viewed according to their functionalities as follows. \subsubsection language-parts Programming Language Support Parts -These parts implement a TDevLanguageSupport Class interface. +These parts implement a KDevLanguageSupport Class interface. To add support for a new programming language check the \ref howToAddProgrammingLanguages page (doc/api/HowToAddProgrammingLanguages.dox file). Take a look at \ref LangSupportStatus (doc/api/LangSupportStatus.dox file) to see the current status/features of the programming languages currently supported by KDevelop. @@ -135,7 +135,7 @@ Take a look at \ref LangSupportStatus (doc/api/LangSupportStatus.dox file) to se \subsubsection buildtool-parts Build tools Parts -These parts implement a TDevProject Class interface. +These parts implement a KDevProject Class interface. - buildtools/ada = Ada build tool - (see AdaProjectPart) @@ -166,7 +166,7 @@ These parts implement a TDevProject Class interface. \subsubsection vcs-parts VCS (Version Control System) Parts -These parts implement a TDevVersionControl Class interface. +These parts implement a KDevVersionControl Class interface. - vcs/cervisia = Cervisia Support - (see CervisiaPlugin) @@ -211,7 +211,7 @@ Take a look at \ref EditorsSupportStatus (doc/api/EditorsSupportStatus.dox file) Some of the parts are considered global - that is, they effect the entire operation of KDevelop. -These parts implement a TDevPlugin Class interface. +These parts implement a KDevPlugin Class interface. - parts/appwizard = New Project Wizard - see AppWizardPart @@ -264,7 +264,7 @@ These parts implement a TDevPlugin Class interface. \subsubsection project-specific-parts Project Specific Parts -These parts implement a TDevPlugin Class interface. +These parts implement a KDevPlugin Class interface. - parts/astyle = Source code formatter - (see AStylePart) diff --git a/doc/api/FutureTasks.dox b/doc/api/FutureTasks.dox index 763537f3..1d7f7f26 100644 --- a/doc/api/FutureTasks.dox +++ b/doc/api/FutureTasks.dox @@ -129,7 +129,7 @@ the same border as other items (impossible) - Browser tool bar should truncate long menu entries so it doesn't take so much space (already implemented?) - - Extend TDevPlugin-API in order to have a preferred border for at + - Extend KDevPlugin-API in order to have a preferred border for at least the selection parts (Automake Manager, Class Browser, File Groups, etc...) diff --git a/doc/api/HighPriTasks.dox b/doc/api/HighPriTasks.dox index 7bcbaf1f..062b3b06 100644 --- a/doc/api/HighPriTasks.dox +++ b/doc/api/HighPriTasks.dox @@ -12,7 +12,7 @@ This way the .tdevelop file can be shared in teams of developers. -\section TDevelop2compat KDevelop 2 compatibility +\section KDevelop2compat KDevelop 2 compatibility (These are things that must be accomplished before we can say that KDevelop 3 >= tdevelop 2.x UI-wise and functionality-wise!) diff --git a/doc/api/HowToAddApplicationTemplates.dox b/doc/api/HowToAddApplicationTemplates.dox index 1da5a3e5..f53ce4f8 100644 --- a/doc/api/HowToAddApplicationTemplates.dox +++ b/doc/api/HowToAddApplicationTemplates.dox @@ -27,7 +27,7 @@ applications like kedit as well as plugins for example for tdevelop or noatun.\n \section templates_1 I. Example: How To Create a Simple KDE Application Template "KHello" -You can find this template in $TDEDIR/share/apps/tdevappwizard/template-khello. +You can find this template in $TDEDIR/share/apps/kdevappwizard/template-khello. \subsection templates_1_1 I.1. Step 1: Basic Skeleton @@ -64,7 +64,7 @@ wizard will replace: - \%{YEAR} ........ by the year . -All this can be found in $TDEDIR/share/apps/tdevappwizard/template-common/tdevelop.pm. +All this can be found in $TDEDIR/share/apps/kdevappwizard/template-common/tdevelop.pm. \subsubsection templates_1_2a I.2.1. The Source Files The files template-khello/app.cpp, template-khello/app.h and @@ -135,22 +135,22 @@ if [ `id -u` = 0 ]; then # we are root so install the template into the global kde directory kde_dir=`tde-config --prefix` else - # we are a user so install it into $HOME/.trinity/share/apps/tdevappwizard directory + # we are a user so install it into $HOME/.trinity/share/apps/kdevappwizard directory kde_dir=`tde-config --localprefix` echo "Note: It would be better to install as root. Press CTRL+C to abort" fi # use usual path or another one? -echo "Install dir [${kde_dir}/share/apps/tdevappwizard]:" +echo "Install dir [${kde_dir}/share/apps/kdevappwizard]:" read newdir -if [ "$newdir"a = a ]; then newdir="${kde_dir}/share/apps/tdevappwizard/"; fi +if [ "$newdir"a = a ]; then newdir="${kde_dir}/share/apps/kdevappwizard/"; fi # make sure the directories exist if [ ! -e "${newdir}/template-khello" ]; then mkdir -p "${newdir}/template-khello" ; fi; if [ ! -e "${newdir}/templates" ]; then mkdir -p "${newdir}/templates" ; fi; if [ ! -e "${newdir}" ]; then mkdir -p "$newdir" ; fi; -if [ ! -e "${newdir}/template-common" ]; then ln -s "${kde_prefix}/share/apps/tdevappwizard/template-common" "${newdir}/template-common" ; fi; +if [ ! -e "${newdir}/template-common" ]; then ln -s "${kde_prefix}/share/apps/kdevappwizard/template-common" "${newdir}/template-common" ; fi; # install now cp -R --target-directory "$newdir" template-khello diff --git a/doc/api/HowToAddGenericBuildTools.dox b/doc/api/HowToAddGenericBuildTools.dox index d713082a..b073cf0f 100644 --- a/doc/api/HowToAddGenericBuildTools.dox +++ b/doc/api/HowToAddGenericBuildTools.dox @@ -6,7 +6,7 @@ This part offers build tool facilities using project files in xml format (dtd is located in buildtools/generic/kdevxmlproject.dtd). Those xml files can be converted into makefiles, ant xml files or simply shell scripts using build system plugins. -Build system plugin is an object that implements TDevBuildSystem interface. +Build system plugin is an object that implements KDevBuildSystem interface. Build system plugins are located in buildtools/generic/buildsystem. \section sectionStep1 Step 1: Make your plugin loadable diff --git a/doc/api/HowToAddPlugins.dox b/doc/api/HowToAddPlugins.dox index b0b282db..fa7f74e2 100644 --- a/doc/api/HowToAddPlugins.dox +++ b/doc/api/HowToAddPlugins.dox @@ -8,7 +8,7 @@ For a plugin foo, create a file foo.desktop which contains KDevelop/Part in its list of ServiceTypes. - - See parts/doctreeview/tdevdoctreeview.desktop for an example. + - See parts/doctreeview/kdevdoctreeview.desktop for an example. . If you install this file into \$(kde_servicesdir), your plugin will automatically be loaded. @@ -80,9 +80,9 @@ See parts/doctreeview/doctreeviewfactory.cpp for an example. \section implementPart Step 3: Implement your part. -Your part must be derived from TDevPlugin. +Your part must be derived from KDevPlugin. - - TDevPlugin takes two arguments: + - KDevPlugin takes two arguments: - 1) A parent argument. This also comes from createPartObject(). - 2) A name, which in turn is given to the QObject @@ -93,7 +93,7 @@ Your part must be derived from TDevPlugin. \subsection accessIDE How to access other IDE components A part can access other components of the IDE via some accessors -of TDevPlugin: +of KDevPlugin: - The application core via core(), - the build tools via project(), @@ -155,7 +155,7 @@ to write it back. \subsection sessionAccess Project session file (*.kdevses) -The base class of all TDevelop plugins is TDevPlugin. It provides two virtual methods +The base class of all TDevelop plugins is KDevPlugin. It provides two virtual methods restorePartialProjectSession(..) and savePartialProjectSession(..) that you should reimplement in your special plugin to attach to session loading and saving. diff --git a/doc/api/HowToAddProgrammingLanguages.dox b/doc/api/HowToAddProgrammingLanguages.dox index 5dd44fda..a5840885 100644 --- a/doc/api/HowToAddProgrammingLanguages.dox +++ b/doc/api/HowToAddProgrammingLanguages.dox @@ -6,7 +6,7 @@ \section LSupport List of things to have "complete" support of a given language in KDevelop - - Implement interface TDevLanguageSupport + - Implement interface KDevLanguageSupport - \ref sectionClassWizard - \ref sectionAttributeMethodWizard - \ref sectionQtUiSubclassing - (if the language has Qt bindings) @@ -43,7 +43,7 @@ Take a look at \ref LangSupportStatus (doc/api/LangSupportStatus.dox file) to se \section sectionLanguageSupport Language Support Any language support should be written as a tdevelop part and implement -TDevLanguageSupport interface (lib/interfaces/tdevlanguagesupport.h). +KDevLanguageSupport interface (lib/interfaces/kdevlanguagesupport.h). Implementing methods: - virtual Features features(); @@ -54,7 +54,7 @@ Should be enough for a language support to start working. KDevelop ships with KDevLang project template. It is a simple language support prototype that can be used when developing language support plugins with KDevelop. To use it, start a New Project and select: C++->KDevelop->KDevelop Language Support Plugin in the application wizard. -The template is located in languages/cpp/app_templates/tdevlang, you can change it there if you need. +The template is located in languages/cpp/app_templates/kdevlang, you can change it there if you need. You should look at languages/ruby for a simple language support @@ -177,7 +177,7 @@ write a Debugger . KDevelop already provides GDB support \subsection sectionCompilerPlugins Compiler plugins There is an ability to create compiler plugin for KDevelop. Compiler plugin provides the compiler configuration dialog which implements command line compiler options. -Compiler plugins must implement TDevCompilerOptions interface. +Compiler plugins must implement KDevCompilerOptions interface. \section MiscInf Other Info @@ -226,7 +226,7 @@ currently provides several build tools. They are: - see GenericProjectPart at buildtools/generic - Offers build tool facilities using project files in xml format (dtd is located in buildtools/generic/kdevxmlproject.dtd). Those xml files can be converted into makefiles, ant xml files or simply shell scripts using build system plugins. - Build system plugin is an object that implements TDevBuildSystem interface. Build system plugins are located in buildtools/generic/buildsystem. + Build system plugin is an object that implements KDevBuildSystem interface. Build system plugins are located in buildtools/generic/buildsystem. . - QMake build tool - see TrollProjectPart at buildtools/qmake diff --git a/doc/api/HowToDocument.dox b/doc/api/HowToDocument.dox index 65cd7c31..d606a8bf 100644 --- a/doc/api/HowToDocument.dox +++ b/doc/api/HowToDocument.dox @@ -3,7 +3,7 @@ */ /** \page howToDocument How to document KDevelop parts -You should add a README and a README.dox file to your part (TDevPlugin). +You should add a README and a README.dox file to your part (KDevPlugin). On the README file put this text: \verbatim @@ -31,7 +31,7 @@ implements your part. On the area marked with ... you can add optional informations. Here is an example of that: -\verbinclude languages/cpp/app_templates/tdevpart/README.dox +\verbinclude languages/cpp/app_templates/kdevpart/README.dox All these infos are optional and you should only add the link to the bugzilla database if YOUR_COMPONENT_NAME has been defined in that database. diff --git a/doc/extras/CMakeLists.txt b/doc/extras/CMakeLists.txt index a358cf07..dd7c977f 100644 --- a/doc/extras/CMakeLists.txt +++ b/doc/extras/CMakeLists.txt @@ -14,5 +14,5 @@ add_subdirectory( w3c ) install( FILES sdl.toc opengl.toc - DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation/tocs + DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation/tocs ) diff --git a/doc/extras/Makefile.am b/doc/extras/Makefile.am index deb28a1a..0e7893c4 100644 --- a/doc/extras/Makefile.am +++ b/doc/extras/Makefile.am @@ -1,6 +1,6 @@ SUBDIRS=w3c -tocdir = ${kde_datadir}/tdevdocumentation/tocs +tocdir = ${kde_datadir}/kdevdocumentation/tocs toc_DATA = sdl.toc opengl.toc #indexdir = ${kde_datadir}/devdoctreeview/indices diff --git a/doc/extras/w3c/CMakeLists.txt b/doc/extras/w3c/CMakeLists.txt index 9681021f..7424e5fd 100644 --- a/doc/extras/w3c/CMakeLists.txt +++ b/doc/extras/w3c/CMakeLists.txt @@ -12,5 +12,5 @@ install( FILES w3c-dom-level2-html.toc w3c-svg.toc w3c-uaag10.toc - DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation/tocs + DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation/tocs ) diff --git a/doc/extras/w3c/Makefile.am b/doc/extras/w3c/Makefile.am index 68a489f8..19518e8d 100644 --- a/doc/extras/w3c/Makefile.am +++ b/doc/extras/w3c/Makefile.am @@ -1,3 +1,3 @@ -tocdir = ${kde_datadir}/tdevdocumentation/tocs +tocdir = ${kde_datadir}/kdevdocumentation/tocs toc_DATA = w3c-dom-level2-html.toc w3c-svg.toc w3c-uaag10.toc diff --git a/doc/kde_app_devel/CMakeLists.txt b/doc/kde_app_devel/CMakeLists.txt new file mode 100644 index 00000000..243887d5 --- /dev/null +++ b/doc/kde_app_devel/CMakeLists.txt @@ -0,0 +1,12 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +tde_create_handbook( DESTINATION kde_app_devel ) diff --git a/doc/tdevassistant/Makefile.am b/doc/kde_app_devel/Makefile.am similarity index 100% rename from doc/tdevassistant/Makefile.am rename to doc/kde_app_devel/Makefile.am diff --git a/doc/tde_app_devel/appwizard.png b/doc/kde_app_devel/appwizard.png similarity index 100% rename from doc/tde_app_devel/appwizard.png rename to doc/kde_app_devel/appwizard.png diff --git a/doc/kde_app_devel/index.docbook b/doc/kde_app_devel/index.docbook new file mode 100644 index 00000000..2d913c0b --- /dev/null +++ b/doc/kde_app_devel/index.docbook @@ -0,0 +1,1549 @@ + +KDevelop"> + + + +]> + + + + +The &tdevelop; Programming Handbook + +2002-12-05 +2.0 + + + +Ralf +Nolden +
Ralf.Nolden@post.rwth-aachen.de
+
+ +Caleb +Tennis +
caleb@aei-tech.com
+
+
+ + +1999 +Ralf Nolden + + +2002 +Caleb Tennis + + + + +&FDLNotice; + + +The User Guide to C++ Application Design for the Trinity Desktop Environment (TDE) with +the &tdevelop; IDE + + + +KDE +KDevelop +IDE +development +programming + + +
+ + +Introduction + +As Unix Systems are becoming more and more popular to even beginners working with computer machines +due to its advantages in regards of stability and functionality, most are somehow disappointed, because +those applications don't have a consistent look and each one behaves different from another. With KDE, +developers have an almost perfect way to create first-class applications for Unix desktop systems to get +a wider user community by the mere quality their applications have to offer. Therefore, KDE becomes more +and more popular as a base for programming design, and developers want to take advantage of the +possibilities that the system has to offer. + + + +What you should know already + +For making the best use of this programming handbook, we assume that you already know about the +C++ programming language; if not, you should make yourself familiar with that first. Information about +C++ is available through various sources either in printed form at your local bookstore or by tutorials +found on the Internet. Knowledge about the design of Graphical User Interfaces is not required, as this +handbook tries to cover the application design for KDE programs, which also includes an introduction into +the Qt toolkit as well as the KDE libraries and the design of User Interfaces. Also, you should have made +yourself comfortable with &tdevelop; by reading The User Manual to &tdevelop;, which contains a descriptive +review of the functionality provided by the IDE. + + + + +About this Handbook + +This handbook has been written to give developers an introduction into KDE application development by +using the KDevelop Integrated Development Environment. + + +The following chapters therefore give an introduction on how to create projects, explains the sourcecode +already generated and shows how to extend the given sources on various topics such as toolbars, menu bars +and view areas. + + +Then the dialogeditor is discussed in detail, explaining how widgets are created and covers widget +properties settings in detail for all provided widgets. + + +Finally, you will learn about several topics that will complete your knowledge in regards of project design +and helps you work out additional issues besides coding such as adding API documentation and extending +online-manuals. + + +In the next chapter + +We'll take a look at the Qt and KDE libraries, showing basic concepts and why things are the way they are. +Also, we will discuss how to create the tutorial applications provided with the Qt toolkit by using +tdevelop;, so beginners can already see first results with a few steps, and thereby will learn how to make +use of some of &tdevelop;'s best features. + + + + +In the following chapters + +You will learn how to: + +create an application with the KAppWizard +What the project skeleton already provides +What the code already create means +How to create your own views +How to extend your application's functionality by dialog, menu bars, and toolbars +How to make your application user friendly by providing help functions +How to write online documentation + + + + + + + +Additional Information + +Additional information about Qt/KDE programming is available by various sources: + +Programming with Qt by Matthias Kalle Dalheimer +The User Manual to KDevelop, provided with the TDevelop IDE +The Online Reference to the Qt library +The KDE Developer web site + + + +Additionally, you should look for help by subscribing to the various mailing lists, whose addresses +are available on the mentioned web sites, and on the Usenet newsgroups dedicated to users of KDE and +Unix Systems as well as about the C and C++ programming language. + + +For obtaining help about the TDevelop IDE, you should send requests to our mailinglist at +kdevelop@kdevelop.org. Mind that the KDevelop team is dedicated to provide the means to enable you to +program applications and therefore is not intended as a technical support team in cases where the +applications you're developing don't work due to implementation errors or misconfigurations of your +operating system. By this, we ask all users to take advantage of the mailinglist in any case you're running +into problems with the use of the IDE itself, as well as for bug reports and suggestions for improving the +functionality of the development environment. + + + + + + +The KDE and Qt Libraries + +The Norwegian company TrollTech (http://www.trolltech.com) +provides a so-called GUI toolkit, named Qt. GUI means "Graphical User Interface", and therefore, Qt-based +applications represent themselves with buttons, windows etc, allowing user input by visualizing the functions +an application provides. Such a toolkit is needed for developing graphical applications that run on the X-Window +interface on Unix Systems, because X does not contain a pre-defined user interface itself. Although other +toolkits are also available to create User Interfaces, Qt offers some technical advantages that make +application design very easy. Additionally, the Qt toolkit is also available for Microsoft Windows systems, +which allows developers to provide their applications for both platforms. + + +The KDE Team (http://www.kde.org) joined together with the goal +to make using Unix Systems more friendly, and decided to use the Qt toolkit for the development of a window +manager on X-Windows, plus a variety of tools included with the KDE packages. The K Desktop Environment +therefore contains the window manager kwm, the file manager kfm and the launch panel kpanel as the main +components plus a variety of first-class utilities and applications. After KDE was out, a lot of developers +turned their eyes towards the new environment and what it has to offer them. The KDE libraries are providing +essential methods and classes that make all applications designed with them look similar and consistent, +so the user has the great advantage that he only has to get accustomed with an application's specific +usage, not with handling dialogs or buttons. Also, KDE programs integrate themselves into the desktop and +are able to interact with the file manager via drag'n drop, offer session management and many more, if all +features offered by the KDE libraries are used. Both, the Qt toolkit and the KDE libraries, are implemented +in the C++ programming language; therefore applications that make use of these libraries are also mostly +written in C++. In the following chapter, we'll make a short trip through the libraries to see what already +is provided and how Qt and TDE applications are created in general. + + +Both, the Qt toolkit and the KDE libraries, are implemented in the C++ programming language; +therefore applications that make use of these libraries are also mostly written in C++. In the following +chapter, we'll make a short trip through the libraries to see what already is provided and how Qt and KDE +applications are created in general. + + + +The Qt GUI Toolkit + +As said, the Qt library is a toolkit that offers graphical elements that are used for creating GUI +applications and are needed for X-Window programming. Additionally, the toolkit offers: + +A complete set of classes and methods ready to use even for non-graphical programming issues +A good solution towards user interaction by virtual methods and the signal/slot mechanism +A set of predefined GUI-elements, called "widgets", that can be used easily for creating the visible elements +Additional completely pre-defined dialogs that are often used in applications such as progress and file dialogs + + + +Therefore knowing the Qt classes is very essential, even if you only want to program KDE-applications. +To have an impression on the basic concept how GUI-applications are constructed and compiled, we'll first +have a look at a sample Qt-only program; then we'll extend it to a KDE program. + + + +The first Qt Application + +As usual, programs in C++ have to contain a main() function, which is the starting point for application +execution. As we want them to be graphically visible in windows and offering user interaction, +we first have to know, how they can show themselves to the user. For an example, we'll have a look +at the first tutorial included with the Qt Online Reference Documentation and explain the basic execution +steps; also why and how the application window appears: + +#include <qapplication.h> +#include <qpushbutton.h> + +int main( int argc, char **argv ) +{ +QApplication a( argc, argv ); + +QPushButton hello( "Hello world!", 0 ); +hello.resize( 100, 30 ); + +a.setMainWidget( &hello ); +hello.show(); +return a.exec(); +} + + + +This application merely paints a window containing a button with "Hello world" as its text. As for +all Qt-based applications, you first have to create an instance of the class QApplication, represented by +variable a. + + +Next, the program creates an instance of the class QPushButton called hello, this will be the button. +The constructor of hello gets a string as a parameter, which is the contents of the widget visible as +the buttons text. + + +Then the resize() method is called on the hello button. This changes the default size a widget +(which is in this case the QPushButton) has when created to the length of 100 pixels and the height of +30 pixels. Finally, the setMainWidget() method is called for a and the show() method for hello. The +QApplication is finally executed by a.exec(), enters the main event loop and waits until it has to return +an integer value to the overlaying Operating System signaling that the application is exited. + + + + +The Reference Documentation for Qt + +Now, let's have a quick look at the reference documentation of the Qt library. To do this, start +&tdevelop; and select "Qt" from the tree in the Documentation tab. The documentation browser opens +and shows you the start page of the Qt reference. This will be your first place to get information +about Qt, it's classes and the available functions they provide. Also, the above program is the first +that is included in the tutorials section. To get to the classes we want to have a look at, +QApplication and QPushButton, select "Alphabetical Class List" +and search for the according names. Follow either of them to have a look at the class documentation. + + +Alternatively, you can use the online documentation from Trolltech's Qt Documentation + + +For QApplication, you will see the constructor and all other methods that this +class provides. If you follow a link, you will get more information about the usage and meaning of the +methods, which is very useful when you sometimes can't detect the correct use or want to have an example. +This also counts for the KDE library documentation, which uses a similar documentation type; therefore +this is almost all you have to know about using the class-references with the documentation browser. + + +Interpretation of the Sample + +Starting with QApplication, you will find all the methods used in our first example: + +the constructor QApplication() +the setMainWidget() method +the exec() method + + + +The interpretation why we use these methods is very simple: + +Create an instance of the class QApplication with the constructor, +so we can make use of the GUI elements provided by Qt +Create a widget which will be the contents of our program window +Set the widget as the main widget for a +Execute the a instance of QApplication + + + +The second object of our program is the pushbutton, an instance of the class QPushButton. +From the two constructors given to create an instance, we used the second: this accepts a text, +which is the label contents of the button; here, it is the string "Hello world!". Then we called the +resize() method to change the size of the button according to it's contents - +the button has to be larger to make the string completely visible. + + +But what about the show() method? Now, you see that like most other widgets, +QPushButton is based on a single inheritance, the documentation says, Inherits +QButton. Follow the link to the QButton class. +This shows you a lot of other widgets that are inherited by QPushButton, +which we'll use later to explain the signal/slot mechanism. Anyway, the show() +method is not listed, therefore, it must be a method that is provided by inheritance as well. The class +that QButton inherits is QWidget. Just follow the link +again, and you will see a whole bunch of methods that the QWidget class provides; including +the show() method. Now we understand what was done in the sample with the button: + +Create an instance of QPushButton, use the second constructor to set the button text +Resize the widget to its contents +Set the widget as the main widget of the QApplication instance a +Tell the widget to display itself on the screen by calling show(), an inherited method from QWidget + + + +After calling the exec() method, the application is visible to the user, +showing a window with the button showing "Hello world!". Note: GUI programs behave somewhat differently +than procedural applications. The main thing here is that the application enters a so-called +"main event loop". This means that the program has to wait for user actions and then react to it, also +that for a Qt application, the program has to be in the main event loop to start the event handling. +The next section tells you in short what this means to the programmer and what Qt offers to process +user events. + + +For already advanced users: The button has no parent declared in the constructor, therefore it +is a top-level widget alone and runs in a local event loop which doesn't need to wait for the main +event loop. See the QWidget class documentation and The KDE Library Reference Guide + + + + + + +User Interaction + +After reading the last sections, you should already know: + +What the Qt-library provides in terms of GUI applications +How a program using Qt is created and +Where and how to find information about classes that you want to use with the documentation browser + + + +Now we'll turn to give the application "life" by processing user events. Generally, the user has two ways +to interact with a program: the mouse and the keyboard. For both ways, a graphical user interface has to +provide methods that detect actions and methods that do something as a reaction to these actions. + + +The Window system therefore sends all interaction events to the according application. The +QApplication then sends them to the active window as a QEvent +and the widgets themselves have to decide what to do with them. A widget receives the event and processes +QWidget::event(QEvent*), which then decides which event has been executed +and how to react; event() is therefore the main event handler. Then, +the event() method passes the event to so-called event filters +that determine what happened and what to do with the event. If no filter signs responsible for the +event, the specialized event handlers are called. Thereby we can decide between: + + +Keyboard events -- TAB and Shift-TAB keys: + +virtual void focusInEvent(QFocusEvent *) +virtual void focusOutEvent(QFocusEvent *) + + + + +All other keyboard input: + +virtual void keyPressEvent(QKeyEvent *) +virtual void keyReleaseEvent(QKeyEvent *) + + + + +Mouse movements: + +virtual void mouseMoveEvent(QMouseEvent *) +virtual void enterEvent(QEvent *) +virtual void leaveEvent(QEvent *) + + + + +Mouse button actions + +virtual void mousePressEvent(QMouseEvent *) +virtual void mouseReleaseEvent(QMouseEvent *) +virtual void mouseDoubleClickEvent(QMouseEvent *) + + + + +Window events containing the widget + +virtual void moveEvent(QMoveEvent *) +virtual void resizeEvent(QResizeEvent *) +virtual void closeEvent(QCloseEvent *) + + + + + + +Note that all event functions are virtual and protected; therefore you can re-implement the events +that you need in your own widgets and specify how your widget has to react. QWidget +also contains some other virtual methods that can be useful in your programs; anyway, it is sufficient +to know about QWidget very well. + + + +Object Interaction by Signals and Slots + +Now we're coming to the most obvious advantages of the Qt toolkit: the signal/slot mechanism. +This offers a very handy and useful solution to object interaction, which usually is solved by +callback functions for X-Window toolkits. As this communication requires a strict programming and +sometimes makes user interface creation very difficult (as referred by the Qt documentation and explained +in Programming with Qt by K.Dalheimer), Troll Tech invented a new system where objects can emit signals +that can be connected to methods declared as slots. For the C++ part of the programmer, he only has to know +some things about this mechanism: + + +the class declaration of a class using signals/slots has to contain the Q_OBJECT macro at the beginning +(without a semicolon); and have to be derved from the QObject class + + +a signal can be emitted by the keyword emit, e.g. emit signal(parameters); from within any member function +of a class that allows signals/slots + + + +all signals used by the classes that are not inherited have to be added to the class declaration by a +signals section + + +all methods that can be connected with a signal are declared in sections with the additional keyword slot, +e.g. public slots: within the class declaration + + +the meta-object compiler moc has to run over the header file to expand the macros and to produce the +implementation (which is not necessary to know). The output files of moc are compiled also by the C++ compiler. + + + + +Another way to use signals without deriving from QObject is to use the +QSignal class- see the reference documentation for more information and example +usage. In the following, we assume you're deriving from QObject. + + +This way, your class is able to send signals anywhere and to provide slots that signals can connect +to. By using the signals, you don't have to care about who's receiving it- you just have to emit the +signal and whatever slot you want to connect to it can react to the emission. Also the slots can be used +as normal methods during implementation. + + +Now, to connect a signal to a slot, you have to use the connect() methods that +are provided by QObject or, where available, special methods that objects provide +to set the connection for a certain signal. + + + +Sample Usage + +To explain the way how to set up object-interaction, we'll take our first example again and extend it by a +simple connection: + +#include <qapplication.h> +#include <qpushbutton.h> + +int main( int argc, char **argv ) +{ +QApplication a( argc, argv ); + +QPushButton hello( "Hello world!" , 0); +hello.resize( 100, 30 ); + +a.setMainWidget( &hello ); + +QObject::connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )); + +hello.show(); +return a.exec(); +} + + + +You see, the only addition to give the button more interaction is to use a connect() + method: connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )); +is all you have to add. What is the meaning now? The class declaration of QObject says about the +connect() method: + + +bool connect ( const QObject * sender, const char * signal, const QObject * receiver, const char * member ) + + +This means you have to specify a QObject instance pointer that is the sender +of the signal, meaning that it can emit this signal as first parameter; then you have to specify the signal +that you want to connect to. The last two parameters are the receiver object that provides a slot, followed +by the member function which actually is the slot that will be executed on signal emission. + + +By using signals and slots, your program's objects can interact with each other easily without explicitly +depending on the type of the receiver object. You will learn more about using this mechanism for productive +usage later in this handbook. More information about the Signals/Slot mechanism can also be found in +The KDE Library Reference Guide +and the Qt online reference. + + + + + + +What KDE provides + +The KDE 3.x libraries + +The main KDE libraries you'll be using for creating your own TDE applications are: + + +the tdecore library, containing all classes that are non-visible elements to provide application functionality + + +the tdeui library, containing user interface elements like menubars, toolbars, etc. + + +the tdefile library, containing the file selection dialogs + + + + +Additionally, for specific solutions KDE offers the following libraries: + + +the tdefx library, containing pixmaps, image effects the TDEStyle extension to QStyle + + +the tdehtml library, containing KDE's html component + + +the kjs library, containing KDE's Javascript support + + +the tdeio library, containing low level access to network files + + +the tdeparts library, containing support for re-usable embeddable extendable applications + + + + +Next we'll have a look at what is needed to turn out first Qt Application into a KDE one. + + + +Example KDE Application + +In the following, you will see that writing a KDE application is not much more difficult than a +Qt application. For the use of KDE's features, you just have to use some other classes, and you're almost +done. As an example, we'll discuss the changed version of the Qt example from above: + +#include <tdeapplication.h> +#include <qpushbutton.h> + +int main( int argc, char **argv ) +{ +TDEApplication a( argc, argv ); + +QPushButton hello( "Hello world!", 0 ); +hello.resize( 100, 30 ); + +a.setTopWidget( &hello ); + +QObject::connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )); + +hello.show(); +return a.exec(); +} + + + +You see that first we have changed from QApplication to TDEApplication +. Further, we had to change the previously used setMainWidget() method +to setTopWidget, which TDEApplication uses to set the main +widget. That's it! Your first KDE application is ready - you only have to tell the compiler the KDE +include path and the linker to link in the tdecore library with -ltdecore. + + +As you now know what at least the main() function provides generally and how an +application gets visible and allows user and object interaction, we'll go on with the next chapter, +where our first application is made with &tdevelop;. There you can also test everything which was +mentioned before and see the effects. + + +What you should have looked into additionally until now is the reference documentation for Qt, +especially the QApplication, QWidget and QObject + class and the tdecore library documentation for the TDEApplication class. +The KDE Library Reference handbook +also covers a complete description about the invocation of the QApplication and +TDEApplication constructors including command-line argument processing. + + + + + + + +Creating New Applications + + +The Application Wizard + +&tdevelop;'s Application Wizard is intended to let you start working on new project with &tdevelop;. Therefore +all of your projects are first created by the wizard, and then you can start building them and extend what is +already provided by the source skeleton. You can choose from several project types according to your project goals: + + +KDE Application Framework: includes source code for a complete frame structre of a standard KDE application + + +QMake Project: Creates an application framework based around Trolltech's qmake configuration system + + +Simple hello world program: Creates a C++ terminal based program with no GUI support + + +A multitude of other program skeletons + + + + +In this chapter we'll see how the Application Wizard can be invoked and what has to be done to generate +a KDE application project. This will also be the initial step of our coverage, where we will create the +initial version of a sample project. For all other project types the steps are usualyl the same, but you +may not have as many options available. + + + + +Invoking the Application Wizard and Project Generation + +Starting the Application Wizard and the First Page + +To start with your KDE application, open &tdevelop;. From the Project menu, selection New Project. The +Application Wizard starts, and you'll see the selection tree on the first page containing available project +types that can be created. Choose the C++ subtree, then KDE, then Application Framework. + + +For our sample project, we are going to create the application KScribble. Enter this as the application +name, and change any other information at the bottom of this screen that may need it. Then, select Next. + + +Application Wizard + + + + +Version control information + +On this screen you have the ability to decide if your project will use a version control system like +CVS. For our sample project we will not use source control, so make sure the selection box reads None +and select Next. + + + +Header and Source Templates + +The next two pages show example headers that will go at the top of each of the header and source files that +you create using &tdevelop;. For now, just leave these as the default, and select Next, then Finish. If the +Finish button is not activated, you haven't set all of the options correct. Use the Back button to return +to earlier menus and correct any mistakes. + + + +Finishing Up + +Upon completion, the Application Wizard should close and the messages window should popup displaying +information about the tasks that &tdevelop; is currently doing. At the end of all of the tasks, you +should see **** Success *****. This means the application framework was successfully loaded. + + + + + +The First Build + +After our project is generated, we'll first make a trip through the source code to get a general understanding +of how the application framework looks. This won't only help us get started, but we'll know where to change +what in later steps. + + +This chapter makes the assumption that you understand the basic navigation of &tdevelop;. Consult the +KDevelop User Manual for information if you need it. + + +The Automake manager shows the project files as follows: + + +Files in our project + + + +Before diving into the sources, we'll let &tdevelop; build an run our new application. To do this, select +Build Project from the Build menu, or press F8. The output window opens and displays output messages during +the compilation phase. + +1 cd /home/caleb/kscribble && WANT_AUTOCONF_2_5=1 WANT_AUTOMAKE_1_6=1 gmake k +2 gmake all-recursive +3 gmake[1]: Entering directory `/home/caleb/kscribble' +4 Making all in doc +5 gmake[2]: Entering directory `/home/caleb/kscribble/doc' +6 Making all in . +7 gmake[3]: Entering directory `/home/caleb/kscribble/doc' +8 gmake[3]: Nothing to be done for `all-am'. +9 gmake[3]: Leaving directory `/home/caleb/kscribble/doc' +10 Making all in en +11 gmake[3]: Entering directory `/home/caleb/kscribble/doc/en' +12 /usr/local/trinity/bin/meinproc --check --cache index.cache.bz2 /home/caleb/kscribble/doc/en/index.docbook +13 gmake[3]: Leaving directory `/home/caleb/kscribble/doc/en' +14 gmake[2]: Leaving directory `/home/caleb/kscribble/doc' +15 Making all in po +16 gmake[2]: Entering directory `/home/caleb/kscribble/po' +17 gmake[2]: Nothing to be done for `all'. +18 gmake[2]: Leaving directory `/home/caleb/kscribble/po' +19 Making all in src +20 gmake[2]: Entering directory `/home/caleb/kscribble/src' +21 source='main.cpp' object='main.o' libtool=no \ +22 depfile='.deps/main.Po' tmpdepfile='.deps/main.TPo' \ +23 depmode=gcc3 /bin/sh /home/caleb/kscribble/admin/depcomp \ +24 g++ -DHAVE_CONFIG_H -I. -I/home/caleb/kscribble/src -I.. -I/usr/local/trinity/include + -I/usr/lib/qt/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor + -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings + -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new + -c -o main.o `test -f 'main.cpp' || echo '/home/caleb/kscribble/src/'`main.cpp +25 /usr/lib/qt/bin/moc /home/caleb/kscribble/src/kscribble.h -o kscribble.moc +26 source='kscribble.cpp' object='kscribble.o' libtool=no \ +27 depfile='.deps/kscribble.Po' tmpdepfile='.deps/kscribble.TPo' \ +28 depmode=gcc3 /bin/sh /home/caleb/kscribble/admin/depcomp \ +29 g++ -DHAVE_CONFIG_H -I. -I/home/caleb/kscribble/src -I.. -I/usr/local/trinity/include + -I/usr/lib/qt/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor + -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings + -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new + -c -o kscribble.o `test -f 'kscribble.cpp' || echo '/home/caleb/kscribble/src/'`kscribble.cpp +30 kscribble.cpp: In member function `void KScribble::setupActions()' +31 kscribble.cpp:107: warning: unused variable `TDEAction*custom' +32 /usr/lib/qt/bin/moc /home/caleb/kscribble/src/kscribbleview.h -o kscribbleview.moc +33 source='kscribbleview.cpp' object='kscribbleview.o' libtool=no \ +34 depfile='.deps/kscribbleview.Po' tmpdepfile='.deps/kscribbleview.TPo' \ +35 depmode=gcc3 /bin/sh /home/caleb/kscribble/admin/depcomp \ +36 g++ -DHAVE_CONFIG_H -I. -I/home/caleb/kscribble/src -I.. -I/usr/local/trinity/include + -I/usr/lib/qt/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor + -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi + -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new -c + -o kscribbleview.o `test -f 'kscribbleview.cpp' || echo '/home/caleb/kscribble/src/'`kscribbleview.cpp +37 kscribbleview.cpp: In member function `void KScribbleView::print(QPainter*, +38 int, int)': +39 kscribbleview.cpp:79: warning: unused parameter `QPainter*p' +40 kscribbleview.cpp:79: warning: unused parameter `int height' +41 kscribbleview.cpp:79: warning: unused parameter `int width' +42 /usr/lib/qt/bin/moc /home/caleb/kscribble/src/pref.h -o pref.moc +43 source='pref.cpp' object='pref.o' libtool=no \ +44 depfile='.deps/pref.Po' tmpdepfile='.deps/pref.TPo' \ +45 depmode=gcc3 /bin/sh /home/caleb/kscribble/admin/depcomp \ +46 g++ -DHAVE_CONFIG_H -I. -I/home/caleb/kscribble/src -I.. -I/usr/local/trinity/include + -I/usr/lib/qt/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor + -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings + -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new + -c -o pref.o `test -f 'pref.cpp' || echo '/home/caleb/kscribble/src/'`pref.cpp +47 /usr/local/trinity/bin/dcopidl /home/caleb/kscribble/src/kscribbleiface.h > kscribbleiface.kidl || + ( rm -f kscribbleiface.kidl ; /bin/false ) +48 /usr/local/trinity/bin/dcopidl2cpp --c++-suffix cpp --no-signals --no-stub kscribbleiface.kidl +49 source='kscribbleiface_skel.cpp' object='kscribbleiface_skel.o' libtool=no \ +50 depfile='.deps/kscribbleiface_skel.Po' tmpdepfile='.deps/kscribbleiface_skel.TPo' \ +51 depmode=gcc3 /bin/sh /home/caleb/kscribble/admin/depcomp \ +52 g++ -DHAVE_CONFIG_H -I. -I/home/caleb/kscribble/src -I.. -I/usr/local/trinity/include + -I/usr/lib/qt/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor + -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings + -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new + -c -o kscribbleiface_skel.o `test -f 'kscribbleiface_skel.cpp' || + echo '/home/caleb/kscribble/src/'`kscribbleiface_skel.cpp +53 /bin/sh ../libtool --silent --mode=link --tag=CXX g++ -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall + -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 + -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new -o kscribble -R + /usr/local/trinity/lib -R /usr/lib/qt/lib -R /usr/X11R6/lib -L/usr/X11R6/lib -L/usr/lib/qt/lib + -L/usr/local/trinity/lib main.o kscribble.o kscribbleview.o pref.o kscribbleiface_skel.o -ltdeio +54 source='kscribble_client.cpp' object='kscribble_client.o' libtool=no \ +55 depfile='.deps/kscribble_client.Po' tmpdepfile='.deps/kscribble_client.TPo' \ +56 depmode=gcc3 /bin/sh /home/caleb/kscribble/admin/depcomp \ +57 g++ -DHAVE_CONFIG_H -I. -I/home/caleb/kscribble/src -I.. -I/usr/local/trinity/include + -I/usr/lib/qt/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor + -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings + -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new + -c -o kscribble_client.o `test -f 'kscribble_client.cpp' || echo + '/home/caleb/kscribble/src/'`kscribble_client.cpp +58 /bin/sh ../libtool --silent --mode=link --tag=CXX g++ -Wnon-virtual-dtor -Wno-long-long -Wundef + -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 + -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new -o kscribble_client -R + /usr/local/trinity/lib -R /usr/lib/qt/lib -R /usr/X11R6/lib -L/usr/X11R6/lib -L/usr/lib/qt/lib + -L/usr/local/trinity/lib kscribble_client.o -ltdecore +59 gmake[2]: Leaving directory `/home/caleb/kscribble/src' +60 gmake[2]: Entering directory `/home/caleb/kscribble' +61 gmake[2]: Nothing to be done for `all-am'. +62 gmake[2]: Leaving directory `/home/caleb/kscribble' +63 gmake[1]: Leaving directory `/home/caleb/kscribble' +64 *** Success *** + + + +As you can see, we've put line numbers in front of each line which won't appear on your output but it makes it +easier to describe what is happening during the build. First of all, gmake works recursively. This means +that it starts from the directory it is invoked and goes into the subdirectories first, one at a time, then +returns to the directory it was started, processes it, then finishes. + + +Our first line of interest is 24. Notice on this line that g++, which is our C++ compiler, gets called by make +to compile the first source code file in our project - in this case main.cpp. Many extra command line options +are also being used with the g++ compiler; some of which are defaults and some of which can be configured +via &tdevelop;. + + +Before the next file (kscribble.cpp, line 29) is compiled, the moc (meta object compiler) is first +invoked on kscribble.h (line 25). This is because KScribble classes use signals/slots, so the +Q_OBJECT macro must be expanded, and the moc does this for us. The resultant file, kscribble.moc, is +used by kscribble.cpp via an #include statement inside of the file. + + + + +The source skeleton + +To conceptualize how a KDE application works, we'll first have a very close look at the source +skeleton already provided by the Application Wizard. As we already saw, we're having a set of source +and header files that build the initial code for the application and make it ready-to-run. Therefore, +the easiest way to explain the code is to follow the implementation line by line as it is processed +during executing the program until it enters the main event loop and is ready to accept user input. +Then, we'll have a look at the functionality that enables user interaction and how certain things work. +This is probably the best way to explain the framework and, as it is similar to almost all KDE +applications, will enable you to read source codes from other projects as well; additionally, you will +know where to change what part of the code to make your applications behave the way they are designed for. + + + +The main() function + +As the application begins its execution with entering the main() function, +this will be the start for our code examination. The main() function of +KScribble is implemented in the file main.cpp and can also be found using the Class Browser +by selecting the "Global Functions" folder. + +1 int main(int argc, char **argv) +2 { +3 TDEAboutData about("kscribble", I18N_NOOP("KScribble"), version, description, +4 TDEAboutData::License_GPL, "(C) 2002 Your Name", 0, 0, "you@you.com"); +5 about.addAuthor( "Your Name", 0, "you@you.com" ); +6 TDECmdLineArgs::init(argc, argv, &about); +7 TDECmdLineArgs::addCmdLineOptions(options); +8 TDEApplication app; +9 +10 // register ourselves as a dcop client +11 app.dcopClient()->registerAs(app.name(), false); +12 +13 // see if we are starting with session management +14 if (app.isRestored()) +15 RESTORE(KScribble) +16 else +17 { +18 // no session.. just start up normally +19 TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); +20 if (args->count() == 0) +21 { +22 KScribble *widget = new KScribble; +23 widget->show(); +24 } +25 else +26 { +27 int i = 0; +28 for (; i < args->count(); i++) +29 { +30 KScribble *widget = new KScribble; +31 widget->show(); +32 widget->load(args->url(i)); +33 } +34 } +35 args->clear(); +36 } +37 +38 return app.exec(); +39 } + + + +Now, what happens first is the usual creation of a TDEApplication object, but we've +added some KDE methods that set program and author information for this application. + + + +User Application Start + +... (not written yet) + + + +The Constructor + +Let's have a look at the constructor and see how this instance is called + +1 KScribble::KScribble() +2 : TDEMainWindow( 0, "KScribble" ), +3 m_view(new KScribbleView(this)), +4 m_printer(0) +5 { +6 // accept dnd +7 setAcceptDrops(true); +8 +9 // tell the TDEMainWindow that this is indeed the main widget +10 setCentralWidget(m_view); +11 +12 // then, setup our actions +13 setupActions(); +14 +15 // and a status bar +16 statusBar()->show(); +17 +18 // allow the view to change the statusbar and caption +19 connect(m_view, SIGNAL(signalChangeStatusbar(const QString&)), +20 this, SLOT(changeStatusbar(const QString&))); +21 connect(m_view, SIGNAL(signalChangeCaption(const QString&)), +22 this, SLOT(changeCaption(const QString&))); +23 +24 } + + + +Notice that KScribble inherits the TDEMainWindow class - a +commonly used base class for TDE applications. We initialize a class called KScribbleView +as our central widget, create a KStatusBar via the statusBar() +method (line 16), and connect some signals and slots together. + + + + + + + +Application View Design + +Introduction + +When developing an application with a graphical user interface, the main work takes place in +providing a so-called "view" for the application. A view generally is a widget that displays the data +of a document and provides methods to manipulate the document contents. This can be done by the user via +the events he emits by the keyboard or the mouse; more complex operations are often processed by toolbars +and menubars which interact with the view and the document. The statusbar then provides information about +the document, view or application status. As an example, we look at how an editor is constructed and where +we can find which part. + + +An editor generally is supposed to provide an interface to view and/or change the contents of a text +document for the user. If you start Kate, you see the visual interface as the following: + + +The menubar: providing complex operations as well as opening, saving and closing files and +exiting the application. + + +The toolbar: offers icons which allow quicker access for most needed functions, + + +The statusbar: displays the status of the cursor position by the current row and column, + + +The view in the center of the window, displaying a document and offering a cursor connected to +the keyboard and the mouse to operate on the data. + + + + +Now it's easy to understand that a view is the most unique part of the application and the design +of the view decides about the usability and acceptability of an application. This means that one of +the first steps in development is to determine the purpose of the application and what kind of view +design would match best to allow any user to work with the application with a minimum of work +learning how to handle the user interface. + + +For some purposes like text editing and displaying HTML files, views are provided by the Qt and KDE +libraries; we will discuss certain aspects of these high-level widgets in the next section. +But for most applications new widgets have to be designed and implemented. It is that what makes a +programmer also a designer and where his abilities on creativity are asked. Nevertheless, you should +watch for intuitivity first. Remember, a lot of users won't accept an application that isn't: + + +graphically nice. + + +offering a lot of features + + +easy to handle + + +fast to learn how to use it + + + + +Needless to say that stability is a major design goal. Nobody can prevent bugs, but a minimum can +be reached at least by clever design goals and wide use of object-oriented design. C++ makes programming +a joy if you know how to exploit it's capabilities- inheritance, information hiding and reusablitity of +already existing code. + + +When creating a KDE or Qt project, you always have to have a view that inherits QWidget, either by +direct inheritance or because the library widget you want to use inherits QWidget. Therefore, the +Application Wizard already constructed a view that is an instance of a class yourappView, which +inherits QWidget already. + + +This chapter therefore describes how to use library widgets for creating views of KDE or +Qt applications that are generated with &tdevelop;, then we look at the libraries and what kind of +views are already offered. + + + +Using Library Views + +When your application design has been set up, you first should look for already existing code that +will make your life a lot easier. A part of this search is to look for a widget that can be used as +a view or at least as a part of it; either directly or by inheritance. The KDE and Qt libraries already +contain a set of widgets that can be used for this purpose. To use them, you have two options: + + +Remove the new view class and create an instance of a library widget; then set this as the view, + + +Change the inheritance of the provided view class to the class of the library widget to use. + + + + +In either way, it is important to know that if the application framework is currently not linked +against the library that contains the widget, the linker will fail. After you decided to use a +certain widget, look for the library to link to; then open "Project"->"Options" from the &tdevelop; +menubar. Switch to the "Linker Options" page and look for the checkmarks indicating the libraries +that are currently used. If the library of your view widget is already checked, you can leave the +project options untouched and start doing the necessary changes due to your choice. If not, and the +linker options offer to add the library by a check box, check it and press "OK" to leave the project +options dialog again. In any other case, add the library in the edit line below with the -l option. +For libraries that your application has to search for before preparing the Makefiles by the +configure script on the end-user machine, add the according search macro to the configure.in file +located at the root directory of your project and add the macro to the edit line. Mind that you have +to run "Build"->"Autoconf and automake" and "Build"->"Configure" before the Makefiles contain the +correct expansion for the library macro. + + +Also, if the include files for the library to add are not in the current include path +(which can be seen by the -I options in the output window on "Make"), you have to add the path to the +Project Options dialog -"Compiler Options" page with the -I option or the according automake macro at +the edit line for "Additional Options". + + +Qt Views + +Looking at the first page of the Qt online documentation, you will find a link to +"Widget Screenshots" where you can have a look at how the widgets Qt contains look like. +These are ready to use and can be combined together to form complex widgets to create application +views or dialogs. In the following, we'll discuss some of these which are very usable for creating +application views, but keep in mind that the KDE libraries sometimes contain other widgets for the +same purpose; those will be reviewed in the next section. + + +Here are a set of hints for what purpose you could use which Qt component: + + +If your view area isn't big enough to display all your data, the user must be enabled to scroll +over the document with bars on the left and bottom of the view. For this, Qt provides the class +QScrollView, which offers a scrollable child area. As explained, you could +inherit your own widget from QScrollView or use an instance to manage your +document's view widget. + + +to create a ScrollView yourself, inherit the View widget from QWidget +and add vertical and horizontal QScrollBars . +(This is done by KDE`s TDEHTMLView widget.) + + +For text processing, use QTextEdit. This class provides a complete +text editor widget that is already capable to cut, copy and paste text and is managed by a scrollview. + + +Use QTable to display data that is arranged in a table. +As QTable is managed by scrollbars as well, it offers a good solution for +table calculation applications. + + +To display two different widgets or two widget instances at the same time, use QSplitter +. This allows to tile views by horizontal or vertical dividers. +KMail is a good example what this would look like- the main view is separated by a +splitter vertically, the right window then is divided again horizontally. + + +QListView displays information in a list and tree. +This is useful for creating file trees or any other hierarchical information you want to interact with. + + + + +You see that Qt alone offers a whole set of widgets which are ready to use so you don't have to invent +new solutions if these match your needs. The sideffect when using standard widgets is that users already +know how to handle them and only have to concentrate on the displayed data. + + + +KDE Views + +The KDE libraries were invented to make designing applications for the K Desktop Environment easier +and capable of more functionality than what Qt alone is offering. The tdeui library offers: + + +TDEListView: a more powerful version of QListView + + +TDEIconView: a graphical viewer of icon files + + + + +The tdehtml library, on the other hand, offers a complete HTML-interpreting widget that is ready to use. +It is scrollable already, so you don't even have to take care for that. A possible use could be to +integrate it as a preview widget for an HTML editor; used by applications such as Konqueror to display HTML files. + + + + +Creating your own Views + +Not yet written + + + + + +Configuring Menubars and Toolbars + +Introduction + +Menubars and toolbars are one of the most important parts of an application to provide methods to +work with a document structure. As a general rule, you should make all functions available by the menubar. +Those methods that should not be available at a current stage of the application process should be +disabled. + + +Further, an application can only contain one menubar, but several toolbars. +Toolbars on the other hand should contain only the most frequently used commands by pixmap +icons or provide quick access methods like combos to select values. + + + +How does it work? + +Our application inherits the TDEMainWindow class, which automatically handles creating +a menu bar and tool bars for us. In the KScribble::setupActions() method there is +a call to TDEMainWindow::createGUI(). This method loads a resource file, in this +case kscribbleui.rc, to initialize menus at startup. Note that kscribbleui.rc is listed as one of the +project files in the Automake Manager. Opening that file up reveals this: + +1 <!DOCTYPE kpartgui SYSTEM "kpartgui.dtd"> +2 <kpartgui name="kscribble" version="1"> +3 <MenuBar> +4 <Menu name="custom"><text>C&ustom</text> +5 <Action name="custom_action" /> +6 </Menu> +7 </MenuBar> +8 </kpartgui> + + + +Explanation... + + +Another way to modify the contents of the menu and tool bars is to directly manipulate them through the +methods provided by their class. For example, the menuBar() method returns the +KMenuBar widget that the menubar for our program. Looking at the documentation for +KMenuBar and its inheritor class QMenuBar, you will find +a large number of insertItem() methods which allow you to add items to the +menu bar. + + +TDEMainWindow's methods statusBar() and +toolBar() will also provide you with applicable widgets. + + + +Keyboard Accelerator Configuration + +A very professional thing you should always add to your application are keyboard accelerators. +Those are mainly used by experienced users that want to work fast with their applications and +are willing to learn shortcuts. For this, the KDE libraries provide the class +TDEAction, which provides the keyboard accelerator keys and access to global configured +standard keyboard accelerators. + + +By default, frame applications generated by &tdevelop; only use standard keyboard accelerators +such as F1 for accessing online-help, Ctrl+N for New File etc. + + +If your application contains a lot of accelerators, you should make them configurable +by an Options-menu; either it could be combined with other application configuration in a QWidget +or stand alone. The KDE library already provides a KKeyChooser +for use in tab dialogs, whereas KKeyDialog provides a ready-to use +key-configuration dialog. + + + + + + + +Help Functions + +Introduction + +A very important part of the development process is to provide help functionality to the user +wherever possible. Most developers tend to delay this, but you should remember that a normal user +isn't necessarily a Unix expert. He may come from the the dark side of computer software usage offering +all sweets that a user may need to work himself into using an application even without ever touching the +manuals. Therefore, the KDE and Qt library provide all means usually considered making an application +professional in the eyes of the normal user by help functions that are ready to use. +Within the application, those are: + +Tool-Tips +Statusbar help +What's this...? buttons + + +Additionally, the application should provide means to access a HTML-based online manual directly +using the standard help key F1. This context based help system is provided automatically through the +TDEMainWindow class, though as the author you must provide the content. + + +As &tdevelop; also offers all types of help as well as the KDE framework generated by the +application wizard already contains support for this, this chapter will help you find out where +and how to add your help functionality. + +During the development of your application you should try to be consistent whatever you're doing; +therefore you should do the necessary steps directly while extending the code. This will prevent you +from diving into the code again and figuring out what your application does or what you intended by +certain parts of the code. + + + + +Tool-Tips + +A very easy means of providing help are tool-tips. Those are small help messages popping up while +the user moves the mouse over a widget that provides a tool-tip and disappears when the mouse moves away. +The most popular usage of tool-tips is made in toolbars where your tool-tips should be kept as small +as possible because toolbars can be configured to display their contents in various ways: +either displaying the button, button with text on the right, button with text below, text only. +This possibility should be made configurable by the user, but isn't a must-be. The text is shown +as a tool-tip anyway and a toolbar usually consists of buttons and other widgets like lineedits and +combo boxes. For a complete reference, see the TDEToolBar class reference located +in the tdeui library. + + +As an example, we have a look at the "New File" button in a generic application: + + +There, the part i18n("New File") provides a tool-tip message. It is enclosed by the i18n() +macro provided by kapp.h to translate the tool-tip towards the currently selected language. + + +Tool-tips can also be added to any custom widget by using the QToolTip +provided by Qt. An example of that would be: + + + +Extending the Statusbar + +As the applications that inherit TDEMainWindow contain a statusbar as well, +it also offers a set of statusbar messages already for all menu and toolbar items. A statusbar +help message is a short message that extends the meaning of a tool-tip or can be seen as a replacement +for a tool-tip over menubar items and is (as the name suggests) displayed in the statusbar when the user +enters a menu and highlights the menu entry. + + + +The <guibutton>What's This...?</guibutton> Button + +The What's This...? button provides help windows with the intention +that the user wants to get help about a certain widget within the working view or a toolbar item. +It is placed in the toolbar and gets activated once the user hits the button. The cursor changes +to an arrow cursor with a question mark like the button itself looks like. The the user can press on +a visible widget item and gets a help window. As an exercise, you could try this behavior with the +What's this...? button within &tdevelop;. + + +To add the What's This...? help to one of your widgets, use the static method +QWhatsThis::add(QWidget *widget, const QString &text) + + + + + +Documentation + +Introduction + +Due to the fact that projects often lack a complete set of user documentation, +all &tdevelop; projects contain a pre-build handbook that can be easily adapted; +therefore fulfiling another goal of KDE: providing enough online-help to support users that +are not familiar with an application. This chapter therefore introduces you on how to extend +the provided documentation template and what you have to do to make it available to the user. + + + +User Documentation + +The documentation for your project lies in projectdir/doc/en, or perhaps another directory if English +isn't your native language. Therein lies a file, index.docbook, in which the documentation is stored. +The format for editing this file is explained on +KDE's documentation website. + + + +Programmer Documentation + +Another important part of the documentation is including a descriptive help for your class interfaces. +This will allow you and other programmers to use your classes by reading the HTML class documentation +that can be created with KDoc. &tdevelop; supports the use of KDoc completely by creating the +KDE-library documentation, also your application frameworks are already documented. To work yourself +into the provided code, it would be a good start to read the included documentation online. +The following describes what to do to get the API documentation, where &tdevelop; helps you add it +and what kind of special tags KDoc provides. + + + + + +Internationalization + +Introdction + +i18n is an internationalization system that is used to offer internationalized versions of an +application or project. The difficulty with writing applications is that they only support the +language they originally are composed with; visually this can be seen on labels, menu entries and the +like. The goal of the internationalization is to provide applications and library functions in the +language of the user; therefore enabling users that are not native speakers the original language to make +use of the provided functionality and feel more comfortable. + + + + + + +Credits + + +(... to be written ...) + + + + + + + +Bibliography + + + +<ulink url="info://make/Top">GNU Make Manual</ulink> + +Richard M.Stallman +RolandMcGrath + + + + +<ulink url="info://automake/Top">GNU Automake</ulink> + +DavidMacKenzie +TomTromey + + + + +<ulink url="info://autoconf/Top">GNU Autoconf</ulink> + +DavidMacKenzie +BenElliston + + + + +<ulink url="info://gcc/Top">Using the GNU Compiler Collection</ulink> +Richard M.Stallman + + + +<ulink url="info://libtool/Top">GNU Libtool</ulink> + +GordonMatzigkeit +AlexandreOliva +ThomasTanner +Gary V.Vaughan + + + + +GNU Autoconf, Automake, and Libtool +1st edition +October 2000 + +Gary V.Vaughan +BenElliston +TomTromey +Ian LanceTaylor + +New Riders Publishing +ISBN 1578701902 + + + + +Advanced Programming in the UNIX(R) Environment +1st edition +June 1992 +W. RichardStevens +Addison-Wesley Pub Co +ISBN 0201563177 + + + +Thinking in C++, Volume 1: Introduction to Standard C++ +2nd Edition +April 15, 2000 +BruceEckel +Prentice Hall +ISBN 0139798099 + + + +Open Source Development with CVS +2nd Edition +October 12, 2001 + +KarlFogel +MosheBar + +The Coriolis Group +ISBN 158880173X + + + +Programming PHP +1st edition +March 2002 + +RasmusLerdorf +KevinTatroe + +O'Reilly & Associates +ISBN 1565926102 + + + +Programming Python +2nd Edition +March 2001 +MarkLutz +O'Reilly & Associates +ISBN 0596000855 + + + +Gui Programming With Python : Using the Qt Toolkit +Bk&Cd-r edition +January 2002 +BoudewijnRempt +Opendocs Llc +ISBN 0970033044 + + + +Programming Perl +The Camel book +3rd Edition +July 2000 + +LarryWall +TomChristiansen +JonOrwant + +O'Reilly & Associates +ISBN 0596000278 + + + +Learning Perl +The Lama book +3rd Edition +July 15, 2001 + +Randal L.Schwartz +TomPhoenix + +O'Reilly & Associates +ISBN 0596001320 + + + + +&underFDL; + + + + +
diff --git a/doc/tde_app_devel/kscribblefiles.png b/doc/kde_app_devel/kscribblefiles.png similarity index 100% rename from doc/tde_app_devel/kscribblefiles.png rename to doc/kde_app_devel/kscribblefiles.png diff --git a/doc/tde_app_devel/Makefile.am b/doc/kdearch/Makefile.am similarity index 100% rename from doc/tde_app_devel/Makefile.am rename to doc/kdearch/Makefile.am diff --git a/doc/tdearch/affine-general.png b/doc/kdearch/affine-general.png similarity index 100% rename from doc/tdearch/affine-general.png rename to doc/kdearch/affine-general.png diff --git a/doc/tdearch/affine-rotate.png b/doc/kdearch/affine-rotate.png similarity index 100% rename from doc/tdearch/affine-rotate.png rename to doc/kdearch/affine-rotate.png diff --git a/doc/tdearch/affine-scale.png b/doc/kdearch/affine-scale.png similarity index 100% rename from doc/tdearch/affine-scale.png rename to doc/kdearch/affine-scale.png diff --git a/doc/tdearch/affine-shear.png b/doc/kdearch/affine-shear.png similarity index 100% rename from doc/tdearch/affine-shear.png rename to doc/kdearch/affine-shear.png diff --git a/doc/tdearch/affine-translate.png b/doc/kdearch/affine-translate.png similarity index 100% rename from doc/tdearch/affine-translate.png rename to doc/kdearch/affine-translate.png diff --git a/doc/tdearch/brushstyles.png b/doc/kdearch/brushstyles.png similarity index 100% rename from doc/tdearch/brushstyles.png rename to doc/kdearch/brushstyles.png diff --git a/doc/tdearch/canvas.png b/doc/kdearch/canvas.png similarity index 100% rename from doc/tdearch/canvas.png rename to doc/kdearch/canvas.png diff --git a/doc/tdearch/capflat.png b/doc/kdearch/capflat.png similarity index 100% rename from doc/tdearch/capflat.png rename to doc/kdearch/capflat.png diff --git a/doc/tdearch/capround.png b/doc/kdearch/capround.png similarity index 100% rename from doc/tdearch/capround.png rename to doc/kdearch/capround.png diff --git a/doc/tdearch/capsquare.png b/doc/kdearch/capsquare.png similarity index 100% rename from doc/tdearch/capsquare.png rename to doc/kdearch/capsquare.png diff --git a/doc/kdearch/index.docbook b/doc/kdearch/index.docbook new file mode 100644 index 00000000..97dee33d --- /dev/null +++ b/doc/kdearch/index.docbook @@ -0,0 +1,3337 @@ + + + +]> + + + + +KDE Architecture Overview + + + + + + +Bernd +Gehrmann +
bernd@kdevelop.org
+
+
+ + +2001 +2002 +Bernd Gehrmann + + +&FDLNotice; + + +This documentation gives an overview of the KDE Development Platform + + + +KDE +architecture +development +programming + + +
+ + +Library structure + + +Libraries by name + + + + +tdecore + +The tdecore library is the basic application framework for every KDE based +program. It provides access to the configuration system, command line +handling, icon loading and manipulation, some special kinds inter-process +communication, file handling and various other utilities. + + + + +tdeui + +The tdeui library provides many widgets and standard +dialogs which Qt doesn't have or which have more features than their Qt +counterparts. It also includes several widgets which are subclassed +from Qt ones and are better integrated with the KDE desktop by +respecting user preferences. + + + + +tdeio + +The tdeio library contains facilities for asynchronous, +network transparent I/O and access to mimetype handling. It also provides the +KDE file dialog and its helper classes. + + + + +kjs + +The kjs library provides an implementation of JavaScript. + + + + +tdehtml + +The tdehtml library contains the TDEHTML part, a HTML browsing +widget, DOM API and parser, including interfaces to Java and JavaScript. + + + + + + + + + +Grouped classes + + +Core application skeleton - classes needed by almost every application. + + + + + +<ulink url="kdeapi:tdecore/TDEApplication">TDEApplication</ulink> + +Initializes and controls a KDE application. + + + + +<ulink url="kdeapi:tdecore/KUniqueApplication">KUniqueApplication</ulink> + +Makes sure only one instance of an application can run simultaneously. + + + +<ulink url="kdeapi:tdecore/TDEAboutData">TDEAboutData</ulink> + +Holds information for the about box. + + + +<ulink url="kdeapi:tdecore/TDECmdLineArgs">TDECmdLineArgs</ulink> + +Command line argument processing. + + + + + + +Configuration settings - access to KDE's hierarchical configuration +database, global settings and application resources. + + + + +<ulink url="kdeapi:tdecore/TDEConfig">TDEConfig</ulink> + +Provides access to KDE's configuration database. + + + +<ulink url="kdeapi:tdecore/KSimpleConfig">KSimpleConfig</ulink> + +Access to simple, non-hierarchical configuration files. + + + +<ulink url="kdeapi:tdecore/KDesktopFile">KDesktopFile</ulink> + +Access to .desktop files. + + + +<ulink url="kdeapi:tdecore/TDEGlobalSettings">TDEGlobalSettings</ulink> + +Convenient access to not application-specific settings. + + + + + + +File and URL handling - decoding of URLs, temporary files etc. + + + + +<ulink url="kdeapi:tdecore/KURL">KURL</ulink> + +Represents and parses URLs. + + + +<ulink url="kdeapi:tdecore/KTempFile">KTempFile</ulink> + +Creates unique files for temporary data. + + + +<ulink url="kdeapi:tdecore/KSaveFile">KSaveFile</ulink> + +Allows to save files atomically. + + + + + + +Interprocess communication - DCOP helper classes and subprocess invocation. + + + + +<ulink url="kdeapi:tdecore/TDEProcess">TDEProcess</ulink> + +Invokes and controls child processes. + + + +<ulink url="kdeapi:tdecore/KShellProcess">KShellProcess</ulink> + +Invokes child processes via a shell. + + + +<ulink url="kdeapi:tdesu/PtyProcess">PtyProcess</ulink> + +Communication with a child processes through a pseudo terminal. + + + +<ulink url="kdeapi:tdecore/KIPC">KIPC</ulink> + +Simple IPC mechanism using X11 ClientMessages. + + + +<ulink url="kdeapi:dcop/DCOPClient">DCOPClient</ulink> + +DCOP messaging. + + + +<ulink url="kdeapi:tdecore/KDCOPPropertyProxy">KDCOPPropertyProxy</ulink> + +A proxy class publishing Qt properties through DCOP. + + + +<ulink url="kdeapi:tdeui/KDCOPActionProxy">KDCOPActionProxy</ulink> + +A proxy class publishing a DCOP interface for actions. + + + + + + +Utility classes - memory management, regular expressions, string manipulation, +random numbers + + + + +<ulink url="kdeapi:tdecore/KRegExp">KRegExp</ulink> + +POSIX regular expression matching. + + + +<ulink url="kdeapi:tdecore/KStringHandler">KStringHandler</ulink> + +An extravagant interface for string manipulation. + + + +<ulink url="kdeapi:tdecore/TDEZoneAllocator">TDEZoneAllocator</ulink> + +Efficient memory allocator for large groups of small objects. + + + +<ulink url="kdeapi:tdecore/KRandomSequence">KRandomSequence</ulink> + +Pseudo random number generator. + + + + + + +Keyboard accelerators - classes helping to establish consistent key bindings +throughout the desktop. + + + + +<ulink url="kdeapi:tdecore/TDEAccel">TDEAccel</ulink> + +Collection of keyboard shortcuts. + + + +<ulink url="kdeapi:tdecore/TDEStdAccel">TDEStdAccel</ulink> + +Easy access to the common keyboard shortcut keys. + + + +<ulink url="kdeapi:tdecore/TDEGlobalAccel"></ulink> + +Collection of system-wide keyboard shortcuts. + + + + + + +Image processing - icon loading and manipulating. + + + + +<ulink url="kdeapi:tdecore/TDEIconLoader">TDEIconLoader</ulink> + +Loads icons in a theme-conforming way. + + + +<ulink url="kdeapi:tdecore/TDEIconTheme">TDEIconTheme</ulink> + +Helper classes for TDEIconLoader. + + + +<ulink url="kdeapi:tdecore/KPixmap">KPixmap</ulink> + +A pixmap class with extended dithering capabilities. + + + +<ulink url="kdeapi:tdeui/KPixmapEffect">KPixmapEffect</ulink> + +Pixmap effects like gradients and patterns. + + + +<ulink url="kdeapi:tdeui/KPixmapIO">KPixmapIO</ulink> + +Fast QImage to QPixmap conversion. + + + + + + +Drag and Drop - drag objects for colors and URLs. + + + + +<ulink url="kdeapi:tdecore/KURLDrag">KURLDrag</ulink> + +A drag object for URLs. + + + +<ulink url="kdeapi:tdeui/KColorDrag">KColorDrag</ulink> + +A drag object for colors. + + + +<ulink url="kdeapi:tdecore/KMultipleDrag">KMultipleDrag</ulink> + +Allows to construct drag objects from several others. + + + + + + +Auto-Completion + + + + +<ulink url="kdeapi:tdecore/TDECompletion">TDECompletion</ulink> + +Generic auto-completion of strings. + + + +<ulink url="kdeapi:tdeio/KURLCompletion">KURLCompletion</ulink> + +Auto-completion of URLs. + + + +<ulink url="kdeapi:tdeio/KShellCompletion">KShellCompletion</ulink> + +Auto-completion of executables. + + + + + + +Widgets - widget classes for list views, rules, color selection etc. + + + + +<ulink url="kdeapi:tdeui/TDEListView">TDEListView</ulink> + +A variant of QListView that honors KDE's system-wide settings. + + + +<ulink url="kdeapi:tdeui/TDEListView">TDEListBox</ulink> + +A variant of QListBox that honors KDE's system-wide settings. + + + +<ulink url="kdeapi:tdeui/TDEListView">TDEIconView</ulink> + +A variant of QIconView that honors KDE's system-wide settings. + + + +<ulink url="kdeapi:tdeui/TDEListView">KLineEdit</ulink> + +A variant of QLineEdit with completion support. + + + +<ulink url="kdeapi:tdeui/KComboBox">KComboBox</ulink> + +A variant of QComboBox with completion support. + + + +<ulink url="kdeapi:tdeui/TDEFontCombo">TDEFontCombo</ulink> + +A combo box for selecting fonts. + + + +<ulink url="kdeapi:tdeui/KColorCombo">KColorCombo</ulink> + +A combo box for selecting colors. + + + +<ulink url="kdeapi:tdeui/KColorButton">KColorButton</ulink> + +A button for selecting colors. + + + +<ulink url="kdeapi:tdeui/KURLCombo">KURLCombo</ulink> + +A combo box for selecting file names and URLs. + + + +<ulink url="kdeapi:tdefile/KURLRequester">KURLRequester</ulink> + +A line edit for selecting file names and URLs. + + + +<ulink url="kdeapi:tdeui/KRuler">KRuler</ulink> + +A ruler widget. + + + +<ulink +url="kdeapi:tdeui/KAnimWidget">KAnimWidget</ulink> + +animations. + + + +<ulink url="kdeapi:tdeui/KNumInput">KNumInput</ulink> + +A widget for inputting numbers. + + + +<ulink url="kdeapi:tdeui/KPasswordEdit">KPasswordEdit</ulink> + +A widget for inputting passwords. + + + + + + +Dialogs - full-featured dialogs for file, color and font selection. + + + + +<ulink url="kdeapi:tdefile/KFileDialog">KFileDialog</ulink> + +A file selection dialog. + + + +<ulink url="kdeapi:tdeui/KColorDialog">KColorDialog</ulink> + +A color selection dialog. + + + +<ulink url="kdeapi:tdeui/TDEFontDialog">TDEFontDialog</ulink> + +A font selection dialog. + + + +<ulink url="kdeapi:tdefile/TDEIconDialog">TDEIconDialog</ulink> + +An icon selection dialog. + + + +<ulink url="kdeapi:tdeui/KKeyDialog">KKeyDialog</ulink> + +A dialog for editing keyboard bindings. + + + +<ulink url="kdeapi:tdeui/KEditToolBar">KEditToolBar</ulink> + +A dialog for editing toolbars. + + + +<ulink url="kdeapi:tdeui/KTipDialog">KTipDialog</ulink> + +A Tip-of-the-day dialog. + + + +<ulink url="kdeapi:tdeui/TDEAboutDialog">TDEAboutDialog</ulink> + +An about dialog. + + + +<ulink url="kdeapi:tdeui/KLineEditDlg">KLineEditDlg</ulink> + +A simple dialog for entering text. + + + +<ulink url="kdeapi:tdefile/KURLRequesterDlg">KURLRequesterDlg</ulink> + +A simple dialog for entering URLs. + + + +<ulink url="kdeapi:tdeui/KMessageBox">KMessageBox</ulink> + +A dialog for signaling errors and warnings. + + + +<ulink url="kdeapi:tdeui/KPasswordDialog">KPasswordDialog</ulink> + +A dialog for inputting passwords. + + + + + + +Actions and XML GUI + + + + +<ulink url="kdeapi:tdeui/TDEAction">TDEAction</ulink> + +Abstraction for an action that can be plugged into menu bars and tool bars. + + + +<ulink url="kdeapi:tdeui/TDEActionCollection">TDEActionCollection</ulink> + +A set of actions. + + + +<ulink url="kdeapi:tdeui/KXMLGUIClient">KXMLGUIClient</ulink> + +A GUI fragment consisting of an action collection and a DOM tree representing their location in the GUI. + + + +<ulink url="kdeapi:tdeparts/KPartManager">KPartManager</ulink> + +Manages the activation of XMLGUI clients. + + + + + + +Plugins and Components + + + + +<ulink url="kdeapi:tdecore/KLibrary">KLibrary</ulink> + +Represents a dynamically loaded library. + + + +<ulink url="kdeapi:tdecore/KLibrary">KLibLoader</ulink> + +Shared library loading. + + + +<ulink url="kdeapi:tdecore/KLibFactory">KLibFactory</ulink> + +Object factory in plugins. + + + +<ulink url="kdeapi:tdeio/KServiceType">KServiceType</ulink> + +Represents a service type. + + + +<ulink url="kdeapi:tdeio/KService">KService</ulink> + +Represents a service. + + + +<ulink url="kdeapi:tdeio/KMimeType">KMimeType</ulink> + +Represents a MIME type. + + + +<ulink url="kdeapi:tdeio/KServiceTypeProfile">KServiceTypeProfile</ulink> + +User preferences for MIME type mappings. + + + +<ulink url="kdeapi:tdeio/KServiceTypeProfile">TDETrader</ulink> + +Querying for services. + + + + + + + + + + + + +Graphics + + +Low-level graphics with QPainter + + +Rendering with QPainter + + +Qt's low level imaging model is based on the capabilities provided by X11 and +other windowing systems for which Qt ports exist. But it also extends these by +implementing additional features such as arbitrary affine transformations for +text and pixmaps. + + + +The central graphics class for 2D painting with Qt is +QPainter. It can +draw on a +QPaintDevice. +There are three possible paint devices implemented: One is +QWidget +which represents a widget on the screen. The second is +QPrinter which +represents a printer and produces Postscript output. The third it +the class +QPicture which +records paint commands and can save them on disk and play them back +later. A possible storage format for paint commands is the W3C standard +SVG. + + + +So, it is possible to reuse the rendering code you use for displaying a +widget for printing, with the same features supported. Of course, in +practice, the code is used in a slightly different context. Drawing +on a widget is almost exclusively done in the paintEvent() method +of a widget class. + + + +void FooWidget::paintEvent() +{ + QPainter p(this); + // Setup painter + // Use painter +} + + + +When drawing on a printer, you have to make sure to use QPrinter::newPage() +to finish with a page and begin a new one - something that naturally is not +relevant for painting widgets. Also, when printing, you may want to use the +device metrics +in order to compute coordinates. + + + + + + +Transformations + + +By default, when using QPainter, it draws in the natural coordinate +system of the device used. This means, if you draw a line along the horizontal +axis with a length of 10 units, it will be painted as a horizontal line +on the screen with a length of 10 pixels. However, QPainter can apply arbitrary +affine transformations before actually rendering shapes and curves. An +affine transformation maps the x and y coordinates linearly into x' and +y' according to + + + + + + + +The 3x3 matrix in this equation can be set with QPainter::setWorldMatrix() and +is of type QWMatrix. +Normally, this is the identity matrix, i.e. m11 and m22 are one, and the +other parameters are zero. There are basically three different groups of +transformations: + + + + + +Translations + +These move all points of an object by a fixed amount in +some direction. A translation matrix can be obtained by calling +method m.translate(dx, dy) for a QWMatrix. This corresponds to the +matrix + + + + + + + + + + +Scaling + +These stretch or shrink the coordinates of an object, making +it bigger or smaller without distorting it. A scaling transformation +can be applied to a QWMatrix by calling m.scale(sx, sy). This corresponds +to the matrix + + + + + + + + +By setting one of the parameters to a negative value, one can +achieve a mirroring of the coordinate system. + + + + + +Shearing + +A distortion of the coordinate system with two +parameters. A shearing transformation can be applied by calling +m.shear(sh, sv), corresponding to the matrix + + + + + + + + + + +Rotating + +This rotates an object. A rotation transformation can be +applied by calling m.rotate(alpha). Note that the angle has to be given +in degrees, not as mathematical angle! The corresponding matrix is + + + + + + + + +Note that a rotation is equivalent with a combination of +scaling and shearing. + + + + + + + +Here are some pictures that show the effect of the elementary +transformation to our masquot: + + + + + + + + + + + + + + + + + + + + +a) Normal +b) Rotated by 30 degrees +c) Sheared by 0.4 +d) Mirrored + + + + + + +Transformations can be combined by multiplying elementary matrices. Note that +matrix operations are not commutative in general, and therefore the combined +effect of of a concatenation depends on the order in which the matrices are +multiplied. + + + + + + +Setting stroking attributes + + +The rendering of lines, curves and outlines of polygons can be modified by +setting a special pen with QPainter::setPen(). The argument of this function is a +QPen object. The properties +stored in it are a style, a color, a join style and a cap style. + + + +The pen style is member of the enum +Qt::PenStyle. +and can take one of the following values: + + + + + + + +The join style is a member of the enum +Qt::PenJoinStyle. +It specifies how the junction between multiple lines which are attached to each +other is drawn. It takes one of the following values: + + + + + + + + + + + + + + + + + +a) MiterJoin +c) BevelJoin +b) RoundJoin + + + + + + +The cap style is a member of the enum +Qt::PenCapStyleand specifies how the end points of lines are drawn. It takes one of the values +from the following table: + + + + + + + + + + + + + + + + + +a) FlatCap +b) SquareCap +c) RoundCap + + + + + + + + + +Setting fill attributes + + +The fill style of polygons, circles or rectangles can be modified by setting +a special brush with QPainter::setBrush(). This function takes a +QBrush object as argument. +Brushes can be constructed in four different ways: + + + + +QBrush::QBrush() - This creates a brush that does not fill shapes. + + +QBrush::QBrush(BrushStyle) - This creates a black brush with one of the default +patterns shown below. + + +QBrush::QBrush(const QColor &, BrushStyle) - This creates a colored brush +with one of the patterns shown below. + + +QBrush::QBrush(const QColor &, const QPixmap) - This creates a colored +brush with the custom pattern you give as second parameter. + + + + +A default brush style is from the enum +Qt::BrushStyle. +Here is a picture of all predefined patterns: + + + + + + + +A further way to customize the brush behavior is to use the function +QPainter::setBrushOrigin(). + + + + + + +Color + + +Colors play a role both when stroking curves and when filling shapes. In Qt, +colors are represented by the class +QColor. Qt does not support +advanced graphics features like ICC color profiles and color correction. Colors +are usually constructed by specifying their red, green and blue components, as +the RGB model is the way pixels are composed of on a monitor. + + + +It is also possible to use hue, saturation and value. This HSV representation is +what you use in the Gtk color dialog, e.g. in GIMP. There, the hue corresponds +to the angle on the color wheel, while the saturation corresponds to the +distance from the center of the circle. The value can be chosen with a separate +slider. + + + + + + +Other settings + + +Normally, when you paint on a paint device, the pixels you draw replace those +that were there previously. This means, if you paint a certain region with +a red color and paint the same region with a blue color afterwards, only +the blue color will be visible. Qt's imaging model does not support +transparency, i.e. a way to blend the painted foreground with the background. +However, there is a simple way to combine background and foreground with +boolean operators. The method QPainter::setRasterOp() sets the used operator, +which comes from the enum +RasterOp. + + + +The default is CopyROP which ignores the background. Another popular choice is +XorROP. If you paint a black line with this operator on a colored image, then +the covered area will be inverted. This effect is for example used to create +the rubberband selections in image manipulation programs known as +"marching ants". + + + + + + +Drawing graphics primitives + + +In the following we list the elementary graphics elements supported by +QPainter. Most of them exist in several overloaded versions which take a +different number of arguments. For example, methods that deal with rectangles +usually either take a +QRect as argument or a set +of four integers. + + + + +Drawing a single point - drawPoint(). + + +Drawing lines - drawLine(), drawLineSegments() and drawPolyLine(). + + +Drawing and filling rectangles - drawRect(), drawRoundRect(), +fillRect() and eraseRect(). + + +Drawing and filling circles, ellipses and parts or them - +drawEllipse(), drawArc(), drawPie and drawChord(). + + +Drawing and filling general polygons - drawPolygon(). + + +Drawing bezier curves - drawQuadBezier() [drawCubicBezier in Qt 3.0]. + + + + + + + +Drawing pixmaps and images + + +Qt provides two very different classes to represent images. + + + +QPixmap directly corresponds +to the pixmap objects in X11. Pixmaps are server-side objects and may - on a +modern graphics card - even be stored directly in the card's memory. This makes +it very efficient to transfer pixmaps to the screen. Pixmaps also act as +an off-screen equivalent of widgets - the QPixmap class is a subclass of +QPaintDevice, so you can draw on it with a QPainter. Elementary drawing +operations are usually accelerated by modern graphics. Therefore, a common usage +pattern is to use pixmaps for double buffering. This means, instead of painting +directly on a widget, you paint on a temporary pixmap object and use the +bitBlt +function to transfer the pixmap to the widget. For complex repaints, this helps +to avoid flicker. + + + +In contrast, QImage objects +live on the client side. Their emphasis in on providing direct access to the +pixels of the image. This makes them of use for image manipulation, and things +like loading and saving to disk (QPixmap's load() method takes QImage as +intermediate step). On the other hand, painting an image on a widget is a +relatively expensive operation, as it implies a transfer to the X server, +which can take some time, especially for large images and for remote servers. +Depending on the color depth, the conversion from QImage to QPixmap may also +require dithering. + + + + + + +Drawing text + + +Text can be drawn with one of the overloaded variants of the method +QPainter::drawText(). These draw a QString either at a given point or in a given +rectangle, using the font set by QPainter::setFont(). There is also a parameter +which takes an ORed combination of some flags from the enums +Qt::AlignmentFlags +and +Qt::TextFlags + + + +Beginning with version 3.0, Qt takes care of the complete text layout even for +languages written from right to left. + + + +A more advanced way to display marked up text is the +QSimpleRichText +class. Objects of this class can be constructed with a piece of text using +a subset of the HTML tags, which is quite rich and provides even tables. +The text style can be customized by using a +QStyleSheet (the +documentation of the tags can also be found here). Once the rich text object has +been constructed, it can be rendered on a widget or another paint device with +the QSimpleRichText::draw() method. + + + + + + + + +Structured graphics with QCanvas + + +QPainter offers a powerful imaging model for painting on widgets and pixmaps. +However, it can also be cumbersome to use. Each time your widget receives +a paint event, it has to analyze the QPaintEvent::region() or +QPaintEvent::rect() which has to be redrawn. Then it has to setup a +QPainter and paint all objects which overlap with that region. For example, +image a vector graphics program which allows to drag objects like polygons, +circles and groups of them around. Each time those objects move a bit, the +widget's mouse event handler triggers a paint event for the whole area covered +by the objects in their old position and in their new position. Figuring +out the necessary redraws and doing them in an efficient way can be difficult, +and it may also conflict with the object-oriented structure of the program's +source code. + + + +As an alternative, Qt contains the class +QCanvas in which +you put graphical objects like polygons, text, pixmaps. You may also provide +additional items by subclassing +QCanvasItem or +one of its more specialized subclasses. A canvas can be shown on the screen by +one or more widgets of the class +QCanvasView which +you have to subclass in order to handle user interactions. Qt takes care of +all repaints of objects in the view, whether they are caused by the widget +being exposed, new objects being created or modified or other things. By using +double buffering, this can be done in an efficient and flicker-free way. + + + +Canvas items can overlap each other. In this case, the visible one depends on +the z order which can be assigned by QCanvasItem::setZ(). Items can also be +made visible or invisible. You can also provide a background to be drawn +"behind" all items and a foreground. For associating mouse events with objects, +in the canvas, there is the method QCanvas::collisions() which returns a list +of items overlapping with a given point. Here we show a screenshot of a canvas +view in action: + + + + + + + +Here, the mesh is drawn in the background. Furthermore, there is a +QCanvasText item and a violet QCanvasPolygon. The butterfly is a +QCanvasPixmap. It has transparent areas, so you can see the underlying +items through it. + + + +A tutorial on using QCanvas for writing sprite-based games can be +found here. + + + + + + +3D graphics with OpenGL + + +Low-level interface + + +The de facto standard for rendering 3D graphics today is +OpenGL. Implementations of this +specification come with Microsoft Windows, Mac OS X and XFree86 and often +support the hardware acceleration features offered by modern graphics cards. +OpenGL itself only deals with rendering on a specified area of the framebuffer +through a GL context and does not have any interactions +with the toolkit of the environment + + + +Qt offers the widget QGLWidget +which encapsulates a window with an associated GL context. Basically, you use it +by subclassing it and reimplementing some methods. + + + + + +Instead of reimplementing paintEvent() and using QPainter to draw the widget's +contents, you override paintGL() and use GL commands to render a scene. QLWidget +will take care of making its GL context the current one before paintGL() is +called, and it will flush afterwards. + + + +The virtual method initializeGL() is called once before the first time resizeGL() +or paintGL() are called. This can be used to construct display lists for objects, +and make any initializations. + + + +Instead of reimplementing resizeEvent(), you override resizeGL(). This can +be used to set the viewport appropriately. + + + +Instead of calling update() when the state of the scene has changed - for example +when you animate it with a timer -, you should call updateGL(). This will trigger +a repaint. + + + + + +In general, QGLWidget behaves just like any other widget, i.e. for example +you can process mouse events as usual, resize the widget and combine it with +others in a layout. + + + + + + + +Qt contains some examples of QGLWidget usage in its demo +example. A collection of tutorials can be found +here, +and more information and a reference of OpenGL is available on the +OpenGL homepage. + + + + + + +High-level interfaces + + +OpenGL is a relatively low-level interface for drawing 3D graphics. In the same +way QCanvas gives the programmer a higher-level interface which details with +objects and their properties, there are also high-level interfaces for 3D graphics. +One of the most popular is Open Inventor. Originally a technology developed by SGI, +there is today also the open source implementation +Coin, complemented by a toolkit binding to Qt +called SoQt. + + + +The basic concept of Open Inventor is that of a scene. +A scene can be loaded from disk and saved in a special format closely related +to VRML. A scene consists of a +collection of objects called nodes. Inventor already +provides a rich collection of reusable nodes, such as cubes, cylinders and +meshes, furthermore light sources, materials, cameras etc. Nodes are +represented by C++ classes and can be combined and subclassed. + + + +An introduction to Inventor can be found +here +(in general, you can substitute all mentions of SoXt by SoQt in this article). + + + + + + + + + + + +User interface + + +The action pattern + + + + + + + +Defining menus and toolbars in XML + + +Introduction + + +While the action pattern +allows to encapsulate actions triggered by the user in an object which can be +"plugged" somewhere in the menu bars or toolbars, it does not by itself solve +the problem of constructing the menus themselves. In particular, you have to +build all popup menus in C++ code and explicitly insert the actions in a +certain order, under consideration of the style guide for standard actions. +This makes it pretty difficult to allow the user to customize the menus or +change shortcuts to fit his needs, without changing the source code. + + + +This problem is solved by a set of classes called XMLGUI. +Basically, this separates actions (coded in C++) from their appearance in menu +bars and tool bars (coded in XML). Without modifying any source code, menus +can be simply customized by adjusting an XML file. Furthermore, it helps +to make sure that standard actions (such as +FileOpen +or HelpAbout) +appear in the locations suggested by the style guide. XMLGUI is especially +important for modular programs, where the items appearing in the menu bar may +come from many different plugins or parts. + + + +KDE's class for toplevel windows, +TDEMainWindow, +inherits +KXMLGUIClient +and therefore supports XMLGUI out of the box. All actions created within it must +have the client's actionCollection() as parent. A call to +createGUI() will then build the whole set of menu and tool +bars defined the applications XML file (conventionally with the suffix +ui.rc). + + + + + + +An example: Menu in KView + + +In the following, we take KDE's image view KView as +example. It has a ui.rc file named +kviewui.rc which is installed with the +Makefile.am snippet + + + +rcdir = $(kde_datadir)/kview +rc_DATA = kviewui.rc + + + +Here is an excerpt from the kviewui.rc file. For +simplicity, we show only the definition of the View menu. + + + +<!DOCTYPE kpartgui> +<kpartgui name="kview"> + <MenuBar> + <Menu name="view" > + <Action name="zoom50" /> + <Action name="zoom100" /> + <Action name="zoom200" /> + <Action name="zoomMaxpect" /> + <Separator/> + <Action name="fullscreen" /> + </Menu> + </MenuBar> +</kpartgui> + + + +The corresponding part of the setup in C++ is: + + + + KStdAction::zoomIn ( this, SLOT(slotZoomIn()), actionCollection() ); + KStdAction::zoomOut ( this, SLOT(slotZoomOut()), actionCollection() ); + KStdAction::zoom ( this, SLOT(slotZoom()), actionCollection() ); + new TDEAction ( i18n("&Half size"), ALT+Key_0, + this, SLOT(slotHalfSize()), + actionCollection(), "zoom50" ); + new TDEAction ( i18n("&Normal size"), ALT+Key_1, + this, SLOT(slotDoubleSize()), + actionCollection(), "zoom100" ); + new TDEAction ( i18n("&Double size"), ALT+Key_2, + this, SLOT(slotDoubleSize()), + actionCollection(), "zoom200" ); + new TDEAction ( i18n("&Fill Screen"), ALT+Key_3, + this, SLOT(slotFillScreen()), + actionCollection(), "zoomMaxpect" ); + new TDEAction ( i18n("Fullscreen &Mode"), CTRL+SHIFT+Key_F, + this, SLOT(slotFullScreen()), + actionCollection(), "fullscreen" ); + + + +The View menu resulting from this GUI definition looks like +in this screenshot: + + + + + + + +The XML file begins with a document type declaration. The DTD for kpartgui can +be found in the tdelibs sources in tdeui/kpartgui.dtd. The +outermost element of the file contains the instance name of the application as +attribute. It can also contain a version number in the form "version=2". This +is useful when you release new versions of an application with a changed menu +structure, e.g. with more features. If you bump up the version number of the +ui.rc file, KDE makes sure that any customized version of +the file is discarded and the new file is used instead. + + + +The next line, <MenuBar>, contains a declaration of a +menu bar. You can also insert any number of <ToolBar> +declarations in order to create some tool bars. The menu contains a submenu +with the name "view". This name is already predefined, and thus you see a +translated version of the word "View" in the screenshot. If you declare your +own submenus, you have to add the title explicitly. For example, +KView has a submenu with the title "Image" which is +declared as follows: + + + +<Menu name="image" > + <text>&amp;Image</text> + ... +</Menu> + + + +In KDE's automake framework, such titles are automatically extracted and put +into the application's .po +file , so it is considered by translators. Note that you have to write the +accelerator marker "&" in the form XML compliant form "&amp;". + + + +Let us come back to the example. KView's +View menu contains a couple of custom actions: +zoom50, zoom100, +zoom200, zoomMaxpect and +fullscreen, declared with a +<Action> element. The separator in the +screenshots corresponds to the <Separator> element. + + + +You will note that some menu items do not not have a corresponding element in +the XML file. These are standard actions. Standard +actions are created by the class +KStdAction. +When you create such actions in your application (such as in the C++ example +above), they will automatically be inserted in a prescribed position, and +possibly with an icon and a shortcut key. You can look up these locations in +the file tdeui/ui_standards.rc in the tdelibs sources. + + + + + + +An example: Toolbars in Konqueror + + +For the discussion of toolbars, we switch to +Konqueror's GUI definition. This excerpt defines +the location bar, which contains the input field for URLs. + + + +<ToolBar name="locationToolBar" fullWidth="true" newline="true" > + <text>Location Toolbar</text> + <Action name="clear_location" /> + <Action name="location_label" /> + <Action name="toolbar_url_combo" /> + <Action name="go_url" /> +</ToolBar> + + + +The first thing we notice is that there are a lot more attributes than for +menu bars. These include: + + + + + +fullWidth: Tells XMLGUI that the toolbar has the same width as the + toplevel window. Af this is "false", the toolbar only takes as much space as + necessary, and further toolbars are put in the same row. + + + +newline: This is related to the option above. If newline is "true", +the toolbar starts a new row. Otherwise it may be put in the row together +with the previous toolbar. + + + +noEdit: Normally toolbars can be customized by the user, +e.g. in SettingsConfigure +Toolbars in +Konqueror. Setting this option to "true" marks this +toolbar as not editable. This is important for toolbars which are filled with +items at runtime, e.g. Konqueror's bookmark toolbar. + + + +iconText: Tells XMLGUI to show the text of the action next to the +icon. Normally, the text is only shown as a tooltip when the mouse cursor +remains over the icon for a while. Possible values for this attribute are +"icononly" (shows only the icon), "textonly" (shows only the text), +"icontextright" (shows the text on the right side of the icon) and +"icontextbottom" (shows the text beneath the icon). + + + + +hidden: If this is "true", the toolbar is not visible initially +and must be activated by some menu item. + + + + +position: The default for this attribute is "top", meaning that the +toolbar is positioned under the menu bar. For programs with many tools, +such as graphics programs, it may be interesting to replace this with +"left", "right" or "bottom". + + + + + + + + +Dynamical menus + + +Obviously, an XML can only contain a static description of a user interface. +Often, there are menus which change at runtime. For example, +Konqueror's Location menu +contains a set of items Open with Foo with the +applications able to load a file with a given MIME type. Each time the +document shown changes, the list of menu items is updated. XMLGUI is prepared +to handle such cases with the notion of action lists. +An action list is declared as one item in the XML file, but consists of +several actions which are plugged into the menu at runtime. The above example +is implemented with the following declaration in +Konqueror's XML file: + + + +<Menu name="file"> + <text>&amp;Location</text> + ... + <ActionList name="openwith"> + ... +</Menu> + + + +The function KXMLGUIClient::plugActionList() is then used +to add actions to be displayed, whereas the function +KXMLGuiClient::unplugActionList() removes all +plugged actions. The routine responsible for updating looks as follows: + + + +void MainWindow::updateOpenWithActions() +{ + unplugActionList("openwith"); + openWithActions.clear(); + for ( /* iterate over the relevant services */ ) { + TDEAction *action = new TDEAction( ...); + openWithActions.append(action); + } + plugActionList("openwith", openWithActions); +} + + + +Note that in contrast to the static actions, the ones created here are +not constructed with the action collection as parent, and +you are responsible for deleting them for yourself. The simplest way to achievethis +is by using openWithActions.setAutoDelete(true) in the above +example. + + + + + + +Context menus + + +The examples above only contained cases where a main window's menubar and +toolbars were created. In the cases, the processes of constructing these +containers is completely hidden from you behind the +createGUI() call (except if you have custom containers). +However, there are cases, where you want to construct other containers and +populate them with GUI definitions from the XML file. One such example are +context menus. In order to get a pointer to a context menu, you have to +ask the client's factory for it: + + + +void MainWindow::popupRequested() +{ + QWidget *w = factory()->container("context_popup", this); + QPopupMenu *popup = static_cast<QPopupMenu *>(w); + popup->exec(QCursor::pos()); +} + + + +The method KXMLGUIFactory::container() used above looks +whether it finds a container in the XML file with the given name. Thus, a +possible definition could look as follows: + + + +... +<Menu name="context_popup"> + <Action name="file_add"/> + <Action name="file_remove"/> +</Menu> +... + + + + + + + + +Providing online help + + +Making a program easy and intuitive to use involves a wide range of +facilities which are usually called online help. Online help has several, +partially conflicting goals: on the one, it should give the user answers +to the question "How can I do a certain task?", on the other hand it +should help the user exploring the application and finding features he +doesn't yet know about. It is important to recognize that this can only +be achieved by offering several levels of help: + + + + + +Tooltips are tiny labels that pop up over user interface elements when +the mouse remains there longer. They are especially important for tool- +bars, where icons are not always sufficient to explain the purpose of +a button. + + + +"What's this?" help is usually a longer and richer explanation of a widget +or a menu item. It is also more clunky to use: In dialogs, it can be invoked +in two ways: either by pressing +ShiftF1 or by clicking +on the question mark in the title bar (where the support of the latter depends +on the window manager). The mouse pointer then turns into an arrow with a +question mark, and the help window appears when a user interfact element has +been clicked. "What's this?" help for menu items is usually activated by a +button in the toolbar which contains an arrow and a question mark. + + + +The problem with this approach is that the user can't see whether a widget +provides help or not. When the user activates the question mark button and +doesn't get any help window when clicking on a user interface element, he +will get frustrated very quickly. + + + +The advantage of "What's this?" help windows as provided by Qt and KDE is that +they can contain rich text, +i.e. the may contain different fonts, bold and italic text and even images and tables. + + + +An example of "What's this?" help: + + + + + + + + + +Finally, every program should have a manual. A manual is normally viewed in +KHelpCenter by activating the +Help menu. That means, a complete additional application +pops up and diverts the user from his work. Consequently, consulting the +manual should only be necessary if other facilities like tooltips and what's +this help are not sufficient. Of course, a manual has the advantage that it +does not explain single, isolated aspects of the user interface. Instead, it +can explain aspects of the application in a greater context. Manuals for KDE +are written using the DocBook markup +language. + + + + + +From the programmer's point of view, Qt provides an easy to use API for online +help. To assign a tooltip to widget, use the +QToolTip class. + + + +QToolTip::add(w, i18n("This widget does something.")) + + + +If the menu bars and tool bars are created using the +action pattern, the string used as tooltip is derived from the first argument +of the TDEAction constructor: + + + +action = new TDEAction(i18n("&Delete"), "editdelete", + SHIFT+Key_Delete, actionCollection(), "del") + + + +Here it is also possible to assign a text which is shown in the status bar when the +respective menu item is highlighted: + + + +action->setStatusText(i18n("Deletes the marked file")) + + + +The API for "What's this?' help is very similar. In dialogs, use the following +code: + + + +QWhatsThis::add(w, i18n("<qt>This demonstrates <b>Qt</b>'s" + " rich text engine.<ul>" + "<li>Foo</li>" + "<li>Bar</li>" + "</ul></qt>")) + + + +For menu items, use + + + +action->setWhatsThis(i18n("Deletes the marked file")) + + + +The invocation of KHelpCenter is encapsulated in the +TDEApplication +class. In order to show the manual of your application, just use + + + +kapp->invokeHelp() + + + +This displays the first page with the table of contents. When you want to +display only a certain section of the manual, you can give an additional +argument to invokeHelp() determining the anchor which +the browser jumps to. + + + + + + + + + +Components and services + + +KDE services + + +What are KDE services? + + +The notion of a service is a central concept in KDE's +modular architecture. There is no strict technical implementation connected +with this term - services can be plugins in the form of shared libraries, +or they can be programs controlled via DCOP. +By claiming to be of a certain service type, a service +promises to implement certain APIs or features. In C++ terms, one can think +of a service type as an abstract class, and a service as an implementation +of that interface. + + + +The advantage of this separation is clear: An application utilizing a service +type does not have to know about possible implementations of it. It just uses +the APIs associated with the service type. In this way, the used service can be +changed without affecting the application. Also, the user can configure which +services he prefers for certain features. + + + +Some examples: + + + + + +The HTML rendering engine used in Konqueror is an +embedable component that implements the service types +KParts/ReadOnlyPart and Browser/View. + + +In TDevelop HEAD, most functionality is packaged in +plugins with the service type TDevelop/Part. At startup, +all services with this type are loaded, such that you can extend the IDE in a +very flexible way. + + +In the icon view, Konqueror displays - if enabled - +thumbnail pictures of images, HTML pages, PDF and text files. This ability can +be extended. If you want it to display preview pictures of your own data files +with some MIME type, you can implement a service with service type +ThumbCreator. + + + + + +Obviously, a service is not only characterized by the service types it +implements, but also by some properties. For example, a +ThumbCreator does not only claim to implement the C++ class with the type +ThumbCreator, it also has a list of MIME types it is +responsible for. Similarly, TDevelop parts have the programming language they +support as a property. When an application requests a service type, it can +also list constraints on the properties of the service. In the above example, +when TDevelop loads the plugins for a Java project, it asks only for the +plugins which have Java as the programming language property. For this +purpose, KDE contains a full-blown CORBA-like trader with +a complex query language. + + + + + + +Defining service types + + +New service types are added by installing a description of them into the +directory TDEDIR/share/servicetypes. In an automake +framework, this can be done with this Makefile.am +snippet: + + + +kde_servicetypesdir_DATA = tdeveloppart.desktop +EXTRA_DIST = $(kde_servicetypesdir_DATA) + + + +The definition tdeveloppart.desktop of a +TDevelop part looks as follows: + + + +[Desktop Entry] +Type=ServiceType +X-TDE-ServiceType=TDevelop/Part +Name=TDevelop Part + +[PropertyDef::X-TDevelop-Scope] +Type=QString + +[PropertyDef::X-TDevelop-ProgrammingLanguages] +Type=QStringList + +[PropertyDef::X-TDevelop-Args] +Type=QString + + + +In addition to the usual entries, this example demonstrates how you declare +that a service has some properties. Each property definition corresponds +to a group [PropertyDef::name] in the configuration file. In +this group, the Type entry declares the type of the property. +Possible types are everything that can be stored in a +QVariant. + + + + + + +Defining shared library services + + +Service definitions are stored in the directory +TDEDIR/share/services: + + + +kde_servicesdir_DATA = kdevdoxygen.desktop +EXTRA_DIST = $(kde_servicesdir_DATA) + + + +The content of the following example file +kdevdoxygen.desktop defines the +KDevDoxygen plugin with the service type +TDevelop/Part: + + + +[Desktop Entry] +Type=Service +Comment=Doxygen +Name=KDevDoxygen +ServiceTypes=TDevelop/Part +X-TDE-Library=libkdevdoxygen +X-TDevelop-ProgrammingLanguages=C,C++,Java +X-TDevelop-Scope=Project + + + +In addition to the usual declarations, an important entry is +X-TDE-Library. This contains the name of the libtool +library (without the .la extension). It also fixes +(with the prefix init_ prepended) the name of the exported +symbol in the library which returns an object factory. For the above example, +the library must contain the following function: + + + +extern "C" { + void *init_libkdevdoxygen() + { + return new DoxygenFactory; + } +}; + + + +The type of the factory class DoxygenFactory depends on +the specific service type the service implements. In our example of a TDevelop +plugin, the factory must be a KDevFactory (which +inherits KLibFactory). More common examples are +KParts::Factory +which is supposed to produce +KParts::ReadOnlyPart +objects or in most cases the generic +KLibFactory. + + + + + + +Using shared library services + + +In order to use a shared library service in an application, you need to obtain a +KService object +representing it. This is discussed in the +section about MIME types (and in a section about the +trader to be written :-) + + + +With the KService object at hand, you can very simply +load the library and get a pointer to its factory object: + + + +KService *service = ... +QString libName = QFile::encodeName(service->library()); +KLibFactory *factory = KLibLoader::self()->factory(libName); +if (!factory) { + QString name = service->name(); + QString errorMessage = KLibLoader::self()->lastErrorMessage(); + KMessageBox::error(0, i18n("There was an error loading service %1.\n" + "The diagnostics from libtool is:\n%2") + .arg(name).arg(errorMessage); +} + + + +From this point, the further proceeding depends again on the service type. For +generic plugins, you create objects with the method +KLibFactory::create(). +For KParts, you must cast the factory pointer to the more specific KParts::Factory and use +its create() method: + + + +if (factory->inherits("KParts::Factory")) { + KParts::Factory *partFactory = static_cast<KParts::Factory*>(factory); + QObject *obj = partFactory->createPart(parentWidget, widgetName, + parent, name, "KParts::ReadOnlyPart"); + ... +} else { + cout << "Service does not implement the right factory" << endl; +} + + + + + + +Defining DCOP services + + +A DCOP service is usually implemented as a program that is started up when it is +needed. It then goes into a loop and listens for DCOP connections. The program +may be an interactive one, but it may also run completely or for a part of its +lifetime as a daemon in the background without the user noticing it. An example +for such a daemon is tdeio_uiserver, which implements user interaction +such as progress dialog for the TDEIO library. The advantage of such a centralized +daemon in this context is that e.g. the download progress for several different +files can be shown in one window, even if those downloads were initiated from +different applications. + + + +A DCOP service is defined differently from a shared library service. Of course, +it doesn't specify a library, but instead an executable. Also, DCOP services +do not specify a ServiceType line, because usually they are started by their +name. As additional properties, it contains two lines: + + + +X-DCOP-ServiceType specifies the way the service is +started. The value Unique says that the service must not be +started more than once. This means, if you try to start this service (e.g. via + +TDEApplication::startServiceByName(), KDE looks whether it is already +registered with DCOP and uses the running service. If it is not registered yet, +KDE will start it up and wait until is registered. Thus, you can immediately +send DCOP calls to the service. In such a case, the service should be implemented +as a +KUniqueApplication. + + + +The value Multi for X-DCOP-ServiceType says that multiple +instances of the service can coexist, so every attempt to start the service +will create another process. As a last possibility the value None +can be used. In this case, a start of the service will not wait until it +is registered with DCOP. + + + +X-TDE-StartupNotify should normally be set to false. Otherwise, when +the program is started, the task bar will show a startup notification, or, depending +on the user's settings, the cursor will be changed. + + + +Here is the definition of tdeio_uiserver: + + + +[Desktop Entry] +Type=Service +Name=tdeio_uiserver +Exec=tdeio_uiserver +X-DCOP-ServiceType=Unique +X-TDE-StartupNotify=false + + + + + + +Using DCOP services + + +A DCOP service is started with one of several methods in the TDEApplication +class: + + + +DCOPClient *client = kapp->dcopClient(); +client->attach(); +if (!client->isApplicationRegistered("tdeio_uiserver")) { + QString error; + if (TDEApplication::startServiceByName("tdeio_uiserver", QStringList(), &error)) + cout << "Starting kioserver failed with message " << error << endl; +} +... +QByteArray data, replyData; +QCString replyType; +QDataStream arg(data, IO_WriteOnly); +arg << true; +if (!client->call("tdeio_uiserver", "UIServer", "setListMode(bool)", + data, replyType, replyData)) + cout << "Call to tdeio_uiserver failed" << endl; +... + + + +Note that the example of a DCOP call given here uses explicit marshalling +of arguments. Often you will want to use a stub generated by dcopidl2cpp +instead, because it is much simpler and less error prone. + + + +In the example given here, the service was started "by name", i.e. the +first argument to TDEApplication::startServiceByName() is +the name is appearing in the Name line of the desktop +file. An alternative is to use +TDEApplication::startServiceByDesktopName(), which takes +the file name of its desktop file as argument, i.e. in this case +"tdeio_uiserver.desktop". + + + +All these calls take a list of URLs as a second argument, which is given +to the service on the command line. The third argument is a pointer to a +QString. If starting the service fails, this argument +is set to a translated error message. + + + + + + + + +MIME types + + +What are MIME types? + + +MIME types are used to describe the content type of files or data +chunks. Originally they were introduced in order to allow sending around image +or sound files etc. by e-mail (MIME stands for "Multipurpose Internet Mail +Extensions"). Later this system was also used by web browsers to determine how +to present data sent by a web server to the user. For example, an HTML page +has a MIME type "text/html", a postscript file "application/postscript". In +KDE, this concept is used at a variety of places: + + + + + +In Konqueror's icon view, files are represented by +icons. Each MIME type has a certain associated icon shown here. + + + +When you click onto a file icon or a file name in +Konqueror, either the file is shown in an embedded +view, or an application associated with the file type is opened. + + + +When you drag and drop some data from one application to another (or +within the same application), the drop target may choose to accept only +certain data types. Furthermore, it will handle image data different +from textual data. + + + +Clipboard data has a MIME type. Traditionally, X programs only handle +pixmaps or texts, but with Qt, there are no restrictions on the data type. + + + + + +From the above examples, it is clear that MIME handling is a complex issue. +First, it is necessary to establish a mapping from file names to MIME types. +KDE goes one step further in allowing even file contents to be mapped to +MIME types, for cases in which the file name is not available. Second, it +is necessary to map MIME types to applications or libraries which can view +or edit a file with a certain type, or create a thumbnail picture for it. + + + +There is a variety of APIs to figure out the MIME type of data or files. In +general, there is a certain speed/reliability trade-off you have to make. You +can find out the type of a file by examining only its file name (i.e. in most +cases the file name extension). For example, a file +foo.jpg is normally "image/jpeg". In cases where the +extension is stripped off this is not safe, and you actually have to look at +the contents of the file. This is of course slower, in particular for files +that have to be downloaded via HTTP first. The content-based method is based +on the file TDEDIR/share/mimelnk/magic and therefore +difficult to extend. But in general, MIME type information can easily be made +available to the system by installing a .desktop file, and +it is efficiently and conveniently available through the KDE libraries. + + + + + + +Defining MIME types + + +Let us define a type "application/x-foo" for our new +foobar program. To this end, you have to write a +file foo.desktop and install it into +TDEDIR/share/mimelnk/application. (This is the usual +location, which may differ between distributions). This can be done by adding +this to the Makefile.am: + + + +mimedir = $(kde_mimedir)/application +mime_DATA = foo.desktop +EXTRA_DIST = $(mime_DATA) + + + +The file foo.desktop should look as follows: + + + +[Desktop Entry] +Type=MimeType +MimeType=application/x-foo +Icon=fooicon +Patterns=*.foo; +DefaultApp=foobar +Comment=Foo Data File +Comment[de]=Foo Datei + + + +The "Comment" entry is supposed to be translated. Since the +.desktop file specifies an icon, you should also install +an icon fooicon.png, which represents the file e.g. in +Konqueror. + + + +In the KDE libraries, such a type definition is mapped to an instance of the +class KMimeType. +Use this like in the following example: + + + +KMimeType::Ptr type = KMimeType::mimeType("application/x-foo"); +cout << "Type: " << type->name() < endl; +cout << "Icon: " << type->icon() < endl; +cout << "Comment: " << type->icon() < endl; +QStringList patterns = type->patterns(); +QStringList::ConstIterator it; +for (it = patterns.begin(); it != patterns.end(); ++it) + cout << "Pattern: " << (*it) << endl; + + + + + + +Determining the MIME type of data + + +The fast method for determining the type of a file is +KMimeType::findByURL(). This looks for the URL string and +in most cases determines the type from the extension. For certain protocols +(e.g. http, man, info), this mechanism is not used. For example, CGI scripts +on web servers written in Perl often have the extension +.pl, which would indicate a +"text/x-perl" type. However, we file delivered by the +server is the output of this script, which is normally HTML. For such a case, +KMimeType::findByURL() returns the MIME type +"application/octet-stream" (available through +KMimeType::defaultMimeType()), which indicates a failure +to find out the type. + + + +KMimeType::Ptr type = KMimeType::findByURL("/home/bernd/foobar.jpg"); +if (type->name() == KMimeType::defaultMimeType()) + cout << "Could not find out type" << endl; +else + cout << "Type: " << type->name() << endl; + + + +(this method has some more arguments, but these are undocumented, so simply +forget about them.) + + + +You may want to find out a MIME from the contents of file instead of +the file name. This is more reliable, but also slower, as it requires +reading a part of the file. This is done with the +KMimeMagic +class, which has different error handling: + + + +KMimeMagicResult *result = KMimeMagic::self()->findFileType("/home/bernd/foobar.jpg"); +if (!result || !result->isValid()) + cout << "Could not find out type" << endl; +else + cout << "Type: " << result->mimeType() << endl; + + + +As a variant of this function, you can also determine the type of a memory +chunk. This is e.g. used in Kate in order to find +out the highlighting mode: + + + +QByteArray array; +... +KMimeMagicResult *result = KMimeMagic::self()->findBufferType(array); +if (!result || !result->isValid()) + cout << "Could not find out type" << endl; +else + cout << "Type: " << result->mimeType() << endl; + + + +Of course, even KMimeMagic is only able to determine a file type from the +contents of a local file. For remote files, there is a further possibility: + + + +KURL url("http://developer.kde.org/favicon.ico"); +QString type = TDEIO::NetAccess::mimetype(url); +if (type == KMimeType::defaultMimeType()) + cout << "Could not find out type" << endl; +else + cout << "Type: " << type << endl; + + + +This starts a TDEIO job to download a part of the file and check this. +Note that this function is perhaps quite slow and blocks the program. Normally +you will only want to use this if KMimeType::findByURL() +has returned "application/octet-stream". + + + +On the other hand, if you do not want to block your application, you can also +explicitly start the TDEIO job and connect to some of its signals: + + + +void FooClass::findType() +{ + KURL url("http://developer.kde.org/favicon.ico"); + TDEIO::MimetypeJob *job = TDEIO::mimetype(url); + connect( job, SIGNAL(result(TDEIO::Job*)), + this, SLOT(mimeResult(TDEIO::Job*)) ); +} + +void FooClass::mimeResult(TDEIO::Job *job) +{ + if (job->error()) + job->showErrorDialog(); + else + cout << "MIME type: " << ((TDEIO::MimetypeJob *)job)->mimetype() << endl; +} + + + + + + +Mapping a MIME type to an application or service + + +When an application is installed, it installs a .desktop +file which contains a list of MIME types this application can load. Similarly, +components like KParts make this information available by their service +.desktop files. So in general, there are several programs +and components which can process a given MIME type. You can obtain such a list +from the class KServiceTypeProfile: + + + +KService::OfferList offers = KServiceTypeProfile::offers("text/html", "Application"); +KService::OfferList::ConstIterator it; +for (it = offers.begin(); it != offers.end(); ++it) { + KService::Ptr service = (*it); + cout << "Name: " << service->name() << endl; +} + + + +The return value of this function is a list of service offers. A +KServiceOffer object packages a KService::Ptr together +with a preference number. The list returned by +KServiceTypeProfile::offers() is ordered by the user's +preference. The user can change this by calling "keditfiletype +text/html" or choosing Edit File Type on +Konqueror's context menu on a HTML file. + + + +In the above example, an offer list of the applications supporting +text/html was requested. This will - among others - contain +HTML editors like Quanta Plus. You can also replace +the second argument "Application" by +"KParts::ReadOnlyPart". In that case, you get a list of +embedable components for presenting HTML content, for example TDEHTML. + + + +In most cases, you are not interested in the list of all service offers +for a combination of MIME type and service type. There is a convenience +function which gives you only the service offer with the highest preference: + + + +KService::Ptr offer = KServiceTypeProfile::preferredService("text/html", "Application"); +if (offer) + cout << "Name: " << service->name() << endl; +else + cout << "No appropriate service found" << endl; + + + +For even more complex queries, there is a full-blown CORBA-like +trader. + + + +In order to run an application service with some URLs, use +KRun: + + + +KURL::List urlList; +urlList << "http://www.ietf.org/rfc/rfc1341.txt?number=1341"; +urlList << "http://www.ietf.org/rfc/rfc2046.txt?number=2046"; +KRun::run(offer.service(), urlList); + + + + + + +Miscellaneous + + +In this section, we want to list some APIs which are loosely related +to the previous discussion. + + + +Getting an icon for a URL. This looks for the type of the URL +and returns the associated icon. + + + +KURL url("ftp://ftp.kde.org/pub/incoming/wibble.c"); +QString icon = KMimeType::iconForURL(url); + + + +Running a URL. This looks for the type of the URL and starts the +user's preferred program associated with this type. + + + +KURL url("http://dot.kde.org"); +new KRun(url); + + + + + + + + +Network transparency + + +Introduction + + +In the age of the world wide web, it is of essential importance that desktop +applications can access resources over the internet: they should be able to +download files from a web server, write files to an ftp server or read mails +from a web server. Often, the ability to access files regardless of their +location is called network transparency. + + + +In the past, different approaches to this goals were implemented. The old NFS +file system is an attempt to implement network transparency on the level of +the POSIX API. While this approach works quite well in local, closely coupled +networks, it does not scale for resources to which access is unreliable and +possibly slow. Here, asynchronicity is important. While +you are waiting for your web browser to download a page, the user interface +should not block. Also, the page rendering should not begin when the page is +completely available, but should updated regularly as data comes in. + + + +In the KDE libraries, network transparency is implemented in the TDEIO API. The +central concept of this architecture is an IO job. A job +may copy, or delete files or similar things. Once a job is started, it works +in the background and does not block the application. Any communication from +the job back to the application - like delivering data or progress information +- is done integrated with the Qt event loop. + + + +Background operation is achieved by starting ioslaves to +perform certain tasks. ioslaves are started as separate processes and are +communicated with through UNIX domain sockets. In this way, no multi-threading +is necessary and unstable slaves can not crash the application that uses them. + + + +File locations are expressed by the widely used URLs. But in KDE, URLs do not +only expand the range of addressable files beyond the local file system. It +also goes in the opposite direction - e.g. you can browse into tar archives. +This is achieved by nesting URLs. For example, a file in a tar archive on +a http server could have the URL + + + +http://www-com.physik.hu-berlin.de/~bernd/article.tgz#tar:/paper.tex + + + + + + +Using TDEIO + + +In most cases, jobs are created by calling functions in the TDEIO namespace. +These functions take one or two URLs as arguments, and possible other +necessary parameters. When the job is finished, it emits the signal +result(TDEIO::Job*). After this signal has been emitted, the job +deletes itself. Thus, a typical use case will look like this: + + + +void FooClass::makeDirectory() +{ + SimpleJob *job = TDEIO::mkdir(KURL("file:/home/bernd/tdeiodir")); + connect( job, SIGNAL(result(TDEIO::Job*)), + this, SLOT(mkdirResult(TDEIO::Job*)) ); +} + +void FooClass::mkdirResult(TDEIO::Job *job) +{ + if (job->error()) + job->showErrorDialog(); + else + cout << "mkdir went fine" << endl; +} + + + +Depending on the type of the job, you may connect also to other +signals. + + + +Here is an overview over the possible functions: + + + + +TDEIO::mkdir(const KURL &url, int permission) + +Creates a directory, optionally with certain permissions. + + + +TDEIO::rmdir(const KURL &url) + +Removes a directory. + + + +TDEIO::chmod(const KURL &url, int permissions) + +Changes the permissions of a file. + + + +TDEIO::rename(const KURL &src, const KURL &dest, + bool overwrite) + +Renames a file. + + + +TDEIO::symlink(const QString &target, const KURL &dest, + bool overwrite, bool showProgressInfo) + +Creates a symbolic link. + + + +TDEIO::stat(const KURL &url, bool showProgressInfo) + +Finds out certain information about the file, such as size, modification +time and permissions. The information can be obtained from +TDEIO::StatJob::statResult() after the job has finished. + + + +TDEIO::get(const KURL &url, bool reload, bool showProgressInfo) + +Transfers data from a URL. + + + +TDEIO::put(const KURL &url, int permissions, bool overwrite, + bool resume, bool showProgressInfo) + +Transfers data to a URL. + + + +TDEIO::http_post(const KURL &url, const QByteArray &data, + bool showProgressInfo) +Posts data. Special for HTTP. + + + +TDEIO::mimetype(const KURL &url, bool showProgressInfo) + +Tries to find the MIME type of the URL. The type can be obtained from +TDEIO::MimetypeJob::mimetype() after the job has finished. + + + +TDEIO::file_copy(const KURL &src, const KURL &dest, int permissions, + bool overwrite, bool resume, bool showProgressInfo) + +Copies a single file. + + + +TDEIO::file_move(const KURL &src, const KURL &dest, int permissions, + bool overwrite, bool resume, bool showProgressInfo) + +Renames or moves a single file. + + + +TDEIO::file_delete(const KURL &url, bool showProgressInfo) + +Deletes a single file. + + + +TDEIO::listDir(const KURL &url, bool showProgressInfo) + +Lists the contents of a directory. Each time some new entries are known, the +signal TDEIO::ListJob::entries() is emitted. + + + +TDEIO::listRecursive(const KURL &url, bool showProgressInfo) + +Similar to the listDir() function, but this one is recursive. + + + +TDEIO::copy(const KURL &src, const KURL &dest, bool showProgressInfo) + +Copies a file or directory. Directories are copied recursively. + + + +TDEIO::move(const KURL &src, const KURL &dest, bool showProgressInfo) + +Moves or renames a file or directory. + + + +TDEIO::del(const KURL &src, bool shred, bool showProgressInfo) + +Deletes a file or directory. + + + + + + + + + +Directory entries + + +Both the TDEIO::stat() and TDEIO::listDir() jobs return their results as a type +UDSEntry, UDSEntryList resp. The latter is defined as QValueList<UDSEntry>. +The acronym UDS stands for "Universal directory service". The principle behind +it is that the a directory entry only carries the information which an ioslave +can provide, not more. For example, the http slave does not provide any +information about access permissions or file owners. +Instead, a UDSEntry is a list of UDSAtoms. Each atom provides a specific piece +of information. It consists of a type stored in m_uds and either an integer +value in m_long or a string value in m_str, depending on the type. + + + +The following types are currently defined: + + + + + +UDS_SIZE (integer) - Size of the file. + + + +UDS_USER (string) - User owning the file. + + + +UDS_GROUP (string) - Group owning the file. + + + +UDS_NAME (string) - File name. + + + +UDS_ACCESS (integer) - Permission rights of the file, as e.g. stored +by the libc function stat() in the st_mode field. + + + +UDS_FILE_TYPE (integer) - The file type, as e.g. stored by stat() in the +st_mode field. Therefore you can use the usual libc macros like S_ISDIR to +test this value. Note that the data provided by ioslaves corresponds to +stat(), not lstat(), i.e. in case of symbolic links, the file type here is +the type of the file pointed to by the link, not the link itself. + + + +UDS_LINK_DEST (string) - In case of a symbolic link, the name of the file +pointed to. + + + +UDS_MODIFICATION_TIME (integer) - The time (as in the type time_t) when the +file was last modified, as e.g. stored by stat() in the st_mtime field. + + + +UDS_ACCESS_TIME (integer) - The time when the file was last accessed, as +e.g. stored by stat() in the st_atime field. + + + +UDS_CREATION_TIME (integer) - The time when the file was created, as e.g. +stored by stat() in the st_ctime field. + + + +UDS_URL (string) - Provides a URL of a file, if it is not simply the +the concatenation of directory URL and file name. + + + +UDS_MIME_TYPE (string) - MIME type of the file + + + +UDS_GUESSED_MIME_TYPE (string) - MIME type of the file as guessed by the +slave. The difference to the previous type is that the one provided here +should not be taken as reliable (because determining it in a reliable way +would be too expensive). For example, the KRun class explicitly checks the +MIME type if it does not have reliable information. + + + + + +Although the way of storing information about files in a +UDSEntry is flexible and practical from the ioslave +point of view, it is a mess to use for the application programmer. For +example, in order to find out the MIME type of the file, you have to iterate +over all atoms and test whether m_uds is +UDS_MIME_TYPE. Fortunately, there is an API which is a lot +easier to use: the class KFileItem. + + + + + + +Synchronous usage + + +Often, the asynchronous API of TDEIO is too complex to use and therefore +implementing full asynchronicity is not a priority. For example, in a program +that can only handle one document file at a time, there is little that can be +done while the program is downloading a file anyway. For these simple cases, +there is a mucher simpler API in the form of a set of static functions in +TDEIO::NetAccess. For example, in order to copy a file, use + + + +KURL source, target; +source = ...; +target = ... +TDEIO::NetAccess::copy(source, target); + + + +The function will return after the complete copying process has finished. Still, +this method provides a progress dialog, and it makes sure that the application +processes repaint events. + + + +A particularly interesting combination of functions is +download() in combination with +removeTempFile(). The former downloads a file from given +URL and stores it in a temporary file with a unique name. The name is stored +in the second argument. If the URL is local, the file is +not downloaded, and instead the second argument is set to the local file +name. The function removeTempFile() deletes the file +given by its argument if the file is the result of a former download. If that +is not the case, it does nothing. Thus, a very easy to use way of loading +files regardless of their location is the following code snippet: + + + +KURL url; +url = ...; +QString tempFile; +if (TDEIO::NetAccess::download(url, tempFile) { + // load the file with the name tempFile + TDEIO::NetAccess::removeTempFile(tempFile); +} + + + + + + +Meta data + + +As can be seen above, the interface to IO jobs is quite abstract and does not +consider any exchange of information between application and IO slave that +is protocol specific. This is not always appropriate. For example, you may give +certain parameters to the HTTP slave to control its caching behavior or +send a bunch of cookies with the request. For this need, the concept of meta +data has been introduced. When a job is created, you can configure it by adding +meta data to it. Each item of meta data consists of a key/value pair. For +example, in order to prevent the HTTP slave from loading a web page from its +cache, you can use: + + + +void FooClass::reloadPage() +{ + KURL url("http://www.kdevelop.org/index.html"); + TDEIO::TransferJob *job = TDEIO::get(url, true, false); + job->addMetaData("cache", "reload"); + ... +} + + + +The same technique is used in the other direction, i.e. for communication from +the slave to the application. The method +Job::queryMetaData() asks for the value of the certain +key delivered by the slave. For the HTTP slave, one such example is the key +"modified", which contains a (stringified representation of) +the date when the web page was last modified. An example how you can use this +is the following: + + + +void FooClass::printModifiedDate() +{ + KURL url("http://developer.kde.org/documentation/kde2arch/index.html"); + TDEIO::TransferJob *job = TDEIO::get(url, true, false); + connect( job, SIGNAL(result(TDEIO::Job*)), + this, SLOT(transferResult(TDEIO::Job*)) ); +} + +void FooClass::transferResult(TDEIO::Job *job) +{ + QString mimetype; + if (job->error()) + job->showErrorDialog(); + else { + TDEIO::TransferJob *transferJob = (TDEIO::TransferJob*) job; + QString modified = transferJob->queryMetaData("modified"); + cout << "Last modified: " << modified << endl; +} + + + + + + +Scheduling + + +When using the TDEIO API, you usually do not have to cope with the details of +starting IO slaves and communicating with them. The normal use case is to +start a job and with some parameters and handle the signals the jobs emits. + + + +Behind the curtains, the scenario is a lot more complicated. When you create a +job, it is put in a queue. When the application goes back to the event loop, +TDEIO allocates slave processes for the jobs in the queue. For the first jobs +started, this is trivial: an IO slave for the appropriate protocol is started. +However, after the job (like a download from an http server) has finished, it +is not immediately killed. Instead, it is put in a pool of idle slaves and +killed after a certain time of inactivity (current 3 minutes). If a new request +for the same protocol and host arrives, the slave is reused. The obvious +advantage is that for a series of jobs for the same host, the cost for creating +new processes and possibly going through an authentication handshake is saved. + + + +Of course, reusing is only possible when the existing slave has already finished +its previous job. when a new request arrives while an existing slave process is +still running, a new process must be started and used. In the API usage in the +examples above, there are no limitation for creating new slave processes: if you +start a consecutive series of downloads for 20 different files, then TDEIO will +start 20 slave processes. This scheme of assigning slaves to jobs is called +direct. It not always the most appropriate scheme, as it +may need much memory and put a high load on both the client and server machines. + + + +So there is a different way. You can schedule jobs. If +you do this, only a limited number (currently 3) of slave processes for a +protocol will be created. If you create more jobs than that, they are put in a +queue and are processed when a slave process becomes idle. This is done as +follows: + + + +KURL url("http://developer.kde.org/documentation/kde2arch/index.html"); +TDEIO::TransferJob *job = TDEIO::get(url, true, false); +TDEIO::Scheduler::scheduleJob(job); + + + +A third possibility is connection oriented. For example, +for the IMAP slave, it does not make any sense to start multiple processes for +the same server. Only one IMAP connection at a time should be enforced. In +this case, the application must explicitly deal with the notion of a slave. It +has to deallocate a slave for a certain connection and then assign all jobs +which should go through the same connection to the same slave. This can again +be easily achieved by using the TDEIO::Scheduler: + + + +KURL baseUrl("imap://bernd@albert.physik.hu-berlin.de"); +TDEIO::Slave *slave = TDEIO::Scheduler::getConnectedSlave(baseUrl); + +TDEIO::TransferJob *job1 = TDEIO::get(KURL(baseUrl, "/INBOX;UID=79374")); +TDEIO::Scheduler::assignJobToSlave(slave, job1); + +TDEIO::TransferJob *job2 = TDEIO::get(KURL(baseUrl, "/INBOX;UID=86793")); +TDEIO::Scheduler::assignJobToSlave(slave, job2); + +... + +TDEIO::Scheduler::disconnectSlave(slave); + + + +You may only disconnect the slave after all jobs assigned to it are guaranteed +to be finished. + + + + + + +Defining an ioslave + + +In the following we discuss how you can add a new ioslave to the system. +In analogy to services, new ioslaves are advertised to the system by +installing a little configuration file. The following Makefile.am +snippet installs the ftp protocol: + + + +protocoldir = $(kde_servicesdir) +protocol_DATA = ftp.protocol +EXTRA_DIST = $(mime_DATA) + + + +The contents of the file ftp.protocol is as follows: + + + +[Protocol] +exec=tdeio_ftp +protocol=ftp +input=none +output=filesystem +listing=Name,Type,Size,Date,Access,Owner,Group,Link, +reading=true +writing=true +makedir=true +deleting=true +Icon=ftp + + + +The "protocol" entry defines for which protocol this slave +is responsible. "exec" is (in contrast what you would +expect naively) the name of the library that implements the slave. When the +slave is supposed to start, the "tdeinit" executable is +started which in turn loads this library into its address space. So in +practice, you can think of the running slave as a separate process although it +is implemented as library. The advantage of this mechanism is that it saves a +lot of memory and reduces the time needed by the runtime linker. + + + +The "input" and "output" lines are not used currently. + + + +The remaining lines in the .protocol file define which +abilities the slave has. In general, the features a slave must implement are +much simpler than the features the TDEIO API provides for the application. The +reason for this is that complex jobs are scheduled to a couple of subjobs. For +example, in order to list a directory recursively, one job will be started for +the toplevel directory. Then for each subdirectory reported back, new subjobs +are started. A scheduler in TDEIO makes sure that not too many jobs are active +at the same time. Similarly, in order to copy a file within a protocol that +does not support copying directly (like the ftp: protocol), +TDEIO can read the source file and then write the data to the destination +file. For this to work, the .protocol must advertise the +actions its slave supports. + + + +Since slaves are loaded as shared libraries, but constitute standalone programs, +their code framework looks a bit different from normal shared library plugins. +The function which is called to start the slave is called +kdemain(). This function does some initializations and +then goes into an event loop and waits for requests by the application using +it. This looks as follows: + + + +extern "C" { int kdemain(int argc, char **argv); } + +int kdemain(int argc, char **argv) +{ + TDELocale::setMainCatalogue("tdelibs"); + TDEInstance instance("tdeio_ftp"); + (void) TDEGlobal::locale(); + + if (argc != 4) { + fprintf(stderr, "Usage: tdeio_ftp protocol " + "domain-socket1 domain-socket2\n"); + exit(-1); + } + + FtpSlave slave(argv[2], argv[3]); + slave.dispatchLoop(); + return 0; +} + + + + + + +Implementing an ioslave + + +Slaves are implemented as subclasses of TDEIO::SlaveBase +(FtpSlave in the above example). Thus, the actions listed in the +.protocol correspond to certain virtual functions in +TDEIO::SlaveBase the slave implementation must +reimplement. Here is a list of possible actions and the corresponding virtual +functions: + + + + +reading - Reads data from a URL +void get(const KURL &url) + +writing - Writes data to a URL and create the file if it does not exist yet. +void put(const KURL &url, int permissions, bool overwrite, bool resume) + +moving - Renames a file. +void rename(const KURL &src, const KURL &dest, bool overwrite) + +deleting - Deletes a file or directory. +void del(const KURL &url, bool isFile) + +listing - Lists the contents of a directory. +void listDir(const KURL &url) + +makedir - Creates a directory. +void mkdir(const KURL &url, int permissions) + + + + +Additionally, there are reimplementable functions not listed in the .protocol +file. For these operations, TDEIO automatically determines whether they are supported +or not (i.e. the default implementation returns an error). + + + + +Delivers information about a file, similar to the C function stat(). +void stat(const KURL &url) + +Changes the access permissions of a file. +void chmod(const KURL &url, int permissions) + +Determines the MIME type of a file. +void mimetype(const KURL &url) + +Copies a file. +copy(const KURL &url, const KURL &dest, int permissions, bool overwrite) + +Creates a symbolic link. +void symlink(const QString &target, const KURL &dest, bool overwrite) + + + + +All these implementation should end with one of two calls: If the operation +was successful, they should call finished(). If an error has occurred, +error() should be called with an error code as first argument and a +string in the second. Possible error codes are listed as enum +TDEIO::Error. The second argument is usually the URL in +question. It is used e.g. in TDEIO::Job::showErrorDialog() +in order to parameterize the human-readable error message. + + + +For slaves that correspond to network protocols, it might be interesting to +reimplement the method SlaveBase::setHost(). This is +called to tell the slave process about the host and port, and the user name +and password to log in. In general, meta data set by the application can be +queried by SlaveBase::metaData(). You can check for the +existence of meta data of a certain key with +SlaveBase::hasMetaData(). + + + + + + +Communicating back to the application + + +Various actions implemented in a slave need some way to communicate data back +to the application using the slave process: + + + + + +get() sends blocks of data. This is done with +data(), which takes a QByteArray +as argument. Of course, you do not need to send all data at once. If you send +a large file, call data() with smaller data blocks, so +the application can process them. Call finished() when +the transfer is finished. + + + +listDir() reports information about the entries of a +directory. For this purpose, call listEntries() with a +TDEIO::UDSEntryList as argument. Analogously to +data(), you can call this several times. When you are +finished, call listEntry() with the second argument set +to true. You may also call totalSize() to report the +total number of directory entries, if known. + + + +stat() reports information about a file like size, MIME +type, etc. Such information is packaged in a +TDEIO::UDSEntry, which will be discussed below. Use +statEntry() to send such an item to the application. + + + +mimetype() calls mimeType() with a +string argument. + + + +get() and copy() may want to provide +progress information. This is done with the methods +totalSize(), processedSize(), +speed(). The total size and processed size are reported +as bytes, the speed as bytes per second. + + + +You can send arbitrary key/value pairs of meta data with +setMetaData(). + + + + + + + + +Interacting with the user + + +Sometimes a slave has to interact with the user. Examples include informational +messages, authentication dialogs and confirmation dialogs when a file is about +to be overwritten. + + + + + +infoMessage() - This is for informational feedback, such +as the message "Retrieving data from <host>" from the http slave, which +is often displayed in the status bar of the program. On the application side, +this method corresponds to the signal +TDEIO::Job::infoMessage(). + + + +warning() - Displays a warning in a message box with +KMessageBox::information(). If a message box is still +open from a former call of warning() from the same slave process, nothing +happens. + + + +messageBox() - This is richer than the previous +method. It allows to open a message box with text and caption and some +buttons. See the enum SlaveBase::MessageBoxType for reference. + + + +openPassDlg() - Opens a dialog for the input of user name +and password. + + + + + + + + + + + + + +Licensing + +&underFDL; +&underGPL; + + + +
diff --git a/doc/tdearch/joinbevel.png b/doc/kdearch/joinbevel.png similarity index 100% rename from doc/tdearch/joinbevel.png rename to doc/kdearch/joinbevel.png diff --git a/doc/tdearch/joinmiter.png b/doc/kdearch/joinmiter.png similarity index 100% rename from doc/tdearch/joinmiter.png rename to doc/kdearch/joinmiter.png diff --git a/doc/tdearch/joinround.png b/doc/kdearch/joinround.png similarity index 100% rename from doc/tdearch/joinround.png rename to doc/kdearch/joinround.png diff --git a/doc/tdearch/konqi-mirrored.png b/doc/kdearch/konqi-mirrored.png similarity index 100% rename from doc/tdearch/konqi-mirrored.png rename to doc/kdearch/konqi-mirrored.png diff --git a/doc/tdearch/konqi-normal.png b/doc/kdearch/konqi-normal.png similarity index 100% rename from doc/tdearch/konqi-normal.png rename to doc/kdearch/konqi-normal.png diff --git a/doc/tdearch/konqi-rotated.png b/doc/kdearch/konqi-rotated.png similarity index 100% rename from doc/tdearch/konqi-rotated.png rename to doc/kdearch/konqi-rotated.png diff --git a/doc/tdearch/konqi-sheared.png b/doc/kdearch/konqi-sheared.png similarity index 100% rename from doc/tdearch/konqi-sheared.png rename to doc/kdearch/konqi-sheared.png diff --git a/doc/tdearch/kview-menu.png b/doc/kdearch/kview-menu.png similarity index 100% rename from doc/tdearch/kview-menu.png rename to doc/kdearch/kview-menu.png diff --git a/doc/tdearch/opengl.png b/doc/kdearch/opengl.png similarity index 100% rename from doc/tdearch/opengl.png rename to doc/kdearch/opengl.png diff --git a/doc/tdearch/penstyles.png b/doc/kdearch/penstyles.png similarity index 100% rename from doc/tdearch/penstyles.png rename to doc/kdearch/penstyles.png diff --git a/doc/tdearch/whatsthis.png b/doc/kdearch/whatsthis.png similarity index 100% rename from doc/tdearch/whatsthis.png rename to doc/kdearch/whatsthis.png diff --git a/doc/kdevdesigner/CMakeLists.txt b/doc/kdevdesigner/CMakeLists.txt new file mode 100644 index 00000000..db314d97 --- /dev/null +++ b/doc/kdevdesigner/CMakeLists.txt @@ -0,0 +1,9 @@ +################################################# +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +tde_create_handbook( DESTINATION kdevdesigner ) diff --git a/doc/tdevdesigner/Makefile.am b/doc/kdevdesigner/Makefile.am similarity index 100% rename from doc/tdevdesigner/Makefile.am rename to doc/kdevdesigner/Makefile.am diff --git a/doc/kdevdesigner/index.docbook b/doc/kdevdesigner/index.docbook new file mode 100644 index 00000000..c903aa65 --- /dev/null +++ b/doc/kdevdesigner/index.docbook @@ -0,0 +1,65 @@ + +KDevDesigner"> + + + +]> + + + + + +
+The &kdevdesigner; Handbook + + +The &kdevdesigner; Handbook + + +&tde-authors; + + + +&tde-release-version; +Reviewed: &tde-release-date; + + +&tde-copyright-date; +&tde-team; + + + + + + +&kdevdesigner; is a GUI designer environment for &tde;. + + + + +TDE + + + + + +We Apologize +No documentation has yet been written for &kdevdesigner;. + +If you need help, please check The &tde; +web site, submit questions to the +&tde; mail lists, or file a bug report at the +&tde; bug tracker. + +If you are interested in helping, please consider writing the help file. +Submitting a basic text file is acceptable as the &tde-team; will convert the text. + +Thank you for helping and thank you for your patience. + +&underFDL; + + + +&documentation.index; +
diff --git a/doc/platform/Mainpage.dox b/doc/platform/Mainpage.dox index ae377ddf..29f6deb0 100644 --- a/doc/platform/Mainpage.dox +++ b/doc/platform/Mainpage.dox @@ -81,11 +81,11 @@ KDevelop Technotes. \section langapi Programming Language Support API -- Language Support Interfaces Library - (classes)\n +- Language Support Interfaces Library + (classes)\n Interfaces for KDevelop language support facilities. -- Debugger Support Library - (classes)\n +- Debugger Support Library + (classes)\n Classes to implement debugger support for a programming language. . @@ -110,8 +110,8 @@ KDevelop Technotes. \section shellapi Shell API -- Generic Shell - (classes)\n +- Generic Shell + (classes)\n The Shell - a profile-based implementation of TDevelop plugin architecture. - Shell Profiles Library (classes)\n diff --git a/doc/std/CMakeLists.txt b/doc/std/CMakeLists.txt index edb0d2a8..3c034ee5 100644 --- a/doc/std/CMakeLists.txt +++ b/doc/std/CMakeLists.txt @@ -11,6 +11,6 @@ install( FILES - tdev3api.toc - DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation/tocs + kdev3api.toc + DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation/tocs ) diff --git a/doc/std/Makefile.am b/doc/std/Makefile.am index 7b636e47..07f12cde 100644 --- a/doc/std/Makefile.am +++ b/doc/std/Makefile.am @@ -1,5 +1,5 @@ -tocdir = ${kde_datadir}/tdevdocumentation/tocs -toc_DATA = tdev3api.toc +tocdir = ${kde_datadir}/kdevdocumentation/tocs +toc_DATA = kdev3api.toc #indexdir = ${kde_datadir}/devdoctreeview/indices #index_DATA = diff --git a/doc/std/tdev3api.toc b/doc/std/kdev3api.toc similarity index 100% rename from doc/std/tdev3api.toc rename to doc/std/kdev3api.toc diff --git a/doc/tde_app_devel/CMakeLists.txt b/doc/tde_app_devel/CMakeLists.txt deleted file mode 100644 index 83e96ce9..00000000 --- a/doc/tde_app_devel/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -tde_create_handbook( DESTINATION tde_app_devel ) diff --git a/doc/tde_app_devel/index.docbook b/doc/tde_app_devel/index.docbook deleted file mode 100644 index e212e4e6..00000000 --- a/doc/tde_app_devel/index.docbook +++ /dev/null @@ -1,1549 +0,0 @@ - -TDevelop"> - - - -]> - - - - -The &tdevelop; Programming Handbook - -2002-12-05 -2.0 - - - -Ralf -Nolden -
Ralf.Nolden@post.rwth-aachen.de
-
- -Caleb -Tennis -
caleb@aei-tech.com
-
-
- - -1999 -Ralf Nolden - - -2002 -Caleb Tennis - - - - -&FDLNotice; - - -The User Guide to C++ Application Design for the Trinity Desktop Environment (TDE) with -the &tdevelop; IDE - - - -KDE -TDevelop -IDE -development -programming - - -
- - -Introduction - -As Unix Systems are becoming more and more popular to even beginners working with computer machines -due to its advantages in regards of stability and functionality, most are somehow disappointed, because -those applications don't have a consistent look and each one behaves different from another. With KDE, -developers have an almost perfect way to create first-class applications for Unix desktop systems to get -a wider user community by the mere quality their applications have to offer. Therefore, KDE becomes more -and more popular as a base for programming design, and developers want to take advantage of the -possibilities that the system has to offer. - - - -What you should know already - -For making the best use of this programming handbook, we assume that you already know about the -C++ programming language; if not, you should make yourself familiar with that first. Information about -C++ is available through various sources either in printed form at your local bookstore or by tutorials -found on the Internet. Knowledge about the design of Graphical User Interfaces is not required, as this -handbook tries to cover the application design for KDE programs, which also includes an introduction into -the Qt toolkit as well as the KDE libraries and the design of User Interfaces. Also, you should have made -yourself comfortable with &tdevelop; by reading The User Manual to &tdevelop;, which contains a descriptive -review of the functionality provided by the IDE. - - - - -About this Handbook - -This handbook has been written to give developers an introduction into KDE application development by -using the TDevelop Integrated Development Environment. - - -The following chapters therefore give an introduction on how to create projects, explains the sourcecode -already generated and shows how to extend the given sources on various topics such as toolbars, menu bars -and view areas. - - -Then the dialogeditor is discussed in detail, explaining how widgets are created and covers widget -properties settings in detail for all provided widgets. - - -Finally, you will learn about several topics that will complete your knowledge in regards of project design -and helps you work out additional issues besides coding such as adding API documentation and extending -online-manuals. - - -In the next chapter - -We'll take a look at the Qt and KDE libraries, showing basic concepts and why things are the way they are. -Also, we will discuss how to create the tutorial applications provided with the Qt toolkit by using -tdevelop;, so beginners can already see first results with a few steps, and thereby will learn how to make -use of some of &tdevelop;'s best features. - - - - -In the following chapters - -You will learn how to: - -create an application with the KAppWizard -What the project skeleton already provides -What the code already create means -How to create your own views -How to extend your application's functionality by dialog, menu bars, and toolbars -How to make your application user friendly by providing help functions -How to write online documentation - - - - - - - -Additional Information - -Additional information about Qt/KDE programming is available by various sources: - -Programming with Qt by Matthias Kalle Dalheimer -The User Manual to TDevelop, provided with the TDevelop IDE -The Online Reference to the Qt library -The KDE Developer web site - - - -Additionally, you should look for help by subscribing to the various mailing lists, whose addresses -are available on the mentioned web sites, and on the Usenet newsgroups dedicated to users of KDE and -Unix Systems as well as about the C and C++ programming language. - - -For obtaining help about the TDevelop IDE, you should send requests to our mailinglist at -kdevelop@kdevelop.org. Mind that the TDevelop team is dedicated to provide the means to enable you to -program applications and therefore is not intended as a technical support team in cases where the -applications you're developing don't work due to implementation errors or misconfigurations of your -operating system. By this, we ask all users to take advantage of the mailinglist in any case you're running -into problems with the use of the IDE itself, as well as for bug reports and suggestions for improving the -functionality of the development environment. - - - - - - -The KDE and Qt Libraries - -The Norwegian company TrollTech (http://www.trolltech.com) -provides a so-called GUI toolkit, named Qt. GUI means "Graphical User Interface", and therefore, Qt-based -applications represent themselves with buttons, windows etc, allowing user input by visualizing the functions -an application provides. Such a toolkit is needed for developing graphical applications that run on the X-Window -interface on Unix Systems, because X does not contain a pre-defined user interface itself. Although other -toolkits are also available to create User Interfaces, Qt offers some technical advantages that make -application design very easy. Additionally, the Qt toolkit is also available for Microsoft Windows systems, -which allows developers to provide their applications for both platforms. - - -The KDE Team (http://www.kde.org) joined together with the goal -to make using Unix Systems more friendly, and decided to use the Qt toolkit for the development of a window -manager on X-Windows, plus a variety of tools included with the KDE packages. The K Desktop Environment -therefore contains the window manager kwm, the file manager kfm and the launch panel kpanel as the main -components plus a variety of first-class utilities and applications. After KDE was out, a lot of developers -turned their eyes towards the new environment and what it has to offer them. The KDE libraries are providing -essential methods and classes that make all applications designed with them look similar and consistent, -so the user has the great advantage that he only has to get accustomed with an application's specific -usage, not with handling dialogs or buttons. Also, KDE programs integrate themselves into the desktop and -are able to interact with the file manager via drag'n drop, offer session management and many more, if all -features offered by the KDE libraries are used. Both, the Qt toolkit and the KDE libraries, are implemented -in the C++ programming language; therefore applications that make use of these libraries are also mostly -written in C++. In the following chapter, we'll make a short trip through the libraries to see what already -is provided and how Qt and TDE applications are created in general. - - -Both, the Qt toolkit and the KDE libraries, are implemented in the C++ programming language; -therefore applications that make use of these libraries are also mostly written in C++. In the following -chapter, we'll make a short trip through the libraries to see what already is provided and how Qt and KDE -applications are created in general. - - - -The Qt GUI Toolkit - -As said, the Qt library is a toolkit that offers graphical elements that are used for creating GUI -applications and are needed for X-Window programming. Additionally, the toolkit offers: - -A complete set of classes and methods ready to use even for non-graphical programming issues -A good solution towards user interaction by virtual methods and the signal/slot mechanism -A set of predefined GUI-elements, called "widgets", that can be used easily for creating the visible elements -Additional completely pre-defined dialogs that are often used in applications such as progress and file dialogs - - - -Therefore knowing the Qt classes is very essential, even if you only want to program KDE-applications. -To have an impression on the basic concept how GUI-applications are constructed and compiled, we'll first -have a look at a sample Qt-only program; then we'll extend it to a KDE program. - - - -The first Qt Application - -As usual, programs in C++ have to contain a main() function, which is the starting point for application -execution. As we want them to be graphically visible in windows and offering user interaction, -we first have to know, how they can show themselves to the user. For an example, we'll have a look -at the first tutorial included with the Qt Online Reference Documentation and explain the basic execution -steps; also why and how the application window appears: - -#include <qapplication.h> -#include <qpushbutton.h> - -int main( int argc, char **argv ) -{ -QApplication a( argc, argv ); - -QPushButton hello( "Hello world!", 0 ); -hello.resize( 100, 30 ); - -a.setMainWidget( &hello ); -hello.show(); -return a.exec(); -} - - - -This application merely paints a window containing a button with "Hello world" as its text. As for -all Qt-based applications, you first have to create an instance of the class QApplication, represented by -variable a. - - -Next, the program creates an instance of the class QPushButton called hello, this will be the button. -The constructor of hello gets a string as a parameter, which is the contents of the widget visible as -the buttons text. - - -Then the resize() method is called on the hello button. This changes the default size a widget -(which is in this case the QPushButton) has when created to the length of 100 pixels and the height of -30 pixels. Finally, the setMainWidget() method is called for a and the show() method for hello. The -QApplication is finally executed by a.exec(), enters the main event loop and waits until it has to return -an integer value to the overlaying Operating System signaling that the application is exited. - - - - -The Reference Documentation for Qt - -Now, let's have a quick look at the reference documentation of the Qt library. To do this, start -&tdevelop; and select "Qt" from the tree in the Documentation tab. The documentation browser opens -and shows you the start page of the Qt reference. This will be your first place to get information -about Qt, it's classes and the available functions they provide. Also, the above program is the first -that is included in the tutorials section. To get to the classes we want to have a look at, -QApplication and QPushButton, select "Alphabetical Class List" -and search for the according names. Follow either of them to have a look at the class documentation. - - -Alternatively, you can use the online documentation from Trolltech's Qt Documentation - - -For QApplication, you will see the constructor and all other methods that this -class provides. If you follow a link, you will get more information about the usage and meaning of the -methods, which is very useful when you sometimes can't detect the correct use or want to have an example. -This also counts for the KDE library documentation, which uses a similar documentation type; therefore -this is almost all you have to know about using the class-references with the documentation browser. - - -Interpretation of the Sample - -Starting with QApplication, you will find all the methods used in our first example: - -the constructor QApplication() -the setMainWidget() method -the exec() method - - - -The interpretation why we use these methods is very simple: - -Create an instance of the class QApplication with the constructor, -so we can make use of the GUI elements provided by Qt -Create a widget which will be the contents of our program window -Set the widget as the main widget for a -Execute the a instance of QApplication - - - -The second object of our program is the pushbutton, an instance of the class QPushButton. -From the two constructors given to create an instance, we used the second: this accepts a text, -which is the label contents of the button; here, it is the string "Hello world!". Then we called the -resize() method to change the size of the button according to it's contents - -the button has to be larger to make the string completely visible. - - -But what about the show() method? Now, you see that like most other widgets, -QPushButton is based on a single inheritance, the documentation says, Inherits -QButton. Follow the link to the QButton class. -This shows you a lot of other widgets that are inherited by QPushButton, -which we'll use later to explain the signal/slot mechanism. Anyway, the show() -method is not listed, therefore, it must be a method that is provided by inheritance as well. The class -that QButton inherits is QWidget. Just follow the link -again, and you will see a whole bunch of methods that the QWidget class provides; including -the show() method. Now we understand what was done in the sample with the button: - -Create an instance of QPushButton, use the second constructor to set the button text -Resize the widget to its contents -Set the widget as the main widget of the QApplication instance a -Tell the widget to display itself on the screen by calling show(), an inherited method from QWidget - - - -After calling the exec() method, the application is visible to the user, -showing a window with the button showing "Hello world!". Note: GUI programs behave somewhat differently -than procedural applications. The main thing here is that the application enters a so-called -"main event loop". This means that the program has to wait for user actions and then react to it, also -that for a Qt application, the program has to be in the main event loop to start the event handling. -The next section tells you in short what this means to the programmer and what Qt offers to process -user events. - - -For already advanced users: The button has no parent declared in the constructor, therefore it -is a top-level widget alone and runs in a local event loop which doesn't need to wait for the main -event loop. See the QWidget class documentation and The KDE Library Reference Guide - - - - - - -User Interaction - -After reading the last sections, you should already know: - -What the Qt-library provides in terms of GUI applications -How a program using Qt is created and -Where and how to find information about classes that you want to use with the documentation browser - - - -Now we'll turn to give the application "life" by processing user events. Generally, the user has two ways -to interact with a program: the mouse and the keyboard. For both ways, a graphical user interface has to -provide methods that detect actions and methods that do something as a reaction to these actions. - - -The Window system therefore sends all interaction events to the according application. The -QApplication then sends them to the active window as a QEvent -and the widgets themselves have to decide what to do with them. A widget receives the event and processes -QWidget::event(QEvent*), which then decides which event has been executed -and how to react; event() is therefore the main event handler. Then, -the event() method passes the event to so-called event filters -that determine what happened and what to do with the event. If no filter signs responsible for the -event, the specialized event handlers are called. Thereby we can decide between: - - -Keyboard events -- TAB and Shift-TAB keys: - -virtual void focusInEvent(QFocusEvent *) -virtual void focusOutEvent(QFocusEvent *) - - - - -All other keyboard input: - -virtual void keyPressEvent(QKeyEvent *) -virtual void keyReleaseEvent(QKeyEvent *) - - - - -Mouse movements: - -virtual void mouseMoveEvent(QMouseEvent *) -virtual void enterEvent(QEvent *) -virtual void leaveEvent(QEvent *) - - - - -Mouse button actions - -virtual void mousePressEvent(QMouseEvent *) -virtual void mouseReleaseEvent(QMouseEvent *) -virtual void mouseDoubleClickEvent(QMouseEvent *) - - - - -Window events containing the widget - -virtual void moveEvent(QMoveEvent *) -virtual void resizeEvent(QResizeEvent *) -virtual void closeEvent(QCloseEvent *) - - - - - - -Note that all event functions are virtual and protected; therefore you can re-implement the events -that you need in your own widgets and specify how your widget has to react. QWidget -also contains some other virtual methods that can be useful in your programs; anyway, it is sufficient -to know about QWidget very well. - - - -Object Interaction by Signals and Slots - -Now we're coming to the most obvious advantages of the Qt toolkit: the signal/slot mechanism. -This offers a very handy and useful solution to object interaction, which usually is solved by -callback functions for X-Window toolkits. As this communication requires a strict programming and -sometimes makes user interface creation very difficult (as referred by the Qt documentation and explained -in Programming with Qt by K.Dalheimer), Troll Tech invented a new system where objects can emit signals -that can be connected to methods declared as slots. For the C++ part of the programmer, he only has to know -some things about this mechanism: - - -the class declaration of a class using signals/slots has to contain the Q_OBJECT macro at the beginning -(without a semicolon); and have to be derved from the QObject class - - -a signal can be emitted by the keyword emit, e.g. emit signal(parameters); from within any member function -of a class that allows signals/slots - - - -all signals used by the classes that are not inherited have to be added to the class declaration by a -signals section - - -all methods that can be connected with a signal are declared in sections with the additional keyword slot, -e.g. public slots: within the class declaration - - -the meta-object compiler moc has to run over the header file to expand the macros and to produce the -implementation (which is not necessary to know). The output files of moc are compiled also by the C++ compiler. - - - - -Another way to use signals without deriving from QObject is to use the -QSignal class- see the reference documentation for more information and example -usage. In the following, we assume you're deriving from QObject. - - -This way, your class is able to send signals anywhere and to provide slots that signals can connect -to. By using the signals, you don't have to care about who's receiving it- you just have to emit the -signal and whatever slot you want to connect to it can react to the emission. Also the slots can be used -as normal methods during implementation. - - -Now, to connect a signal to a slot, you have to use the connect() methods that -are provided by QObject or, where available, special methods that objects provide -to set the connection for a certain signal. - - - -Sample Usage - -To explain the way how to set up object-interaction, we'll take our first example again and extend it by a -simple connection: - -#include <qapplication.h> -#include <qpushbutton.h> - -int main( int argc, char **argv ) -{ -QApplication a( argc, argv ); - -QPushButton hello( "Hello world!" , 0); -hello.resize( 100, 30 ); - -a.setMainWidget( &hello ); - -QObject::connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )); - -hello.show(); -return a.exec(); -} - - - -You see, the only addition to give the button more interaction is to use a connect() - method: connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )); -is all you have to add. What is the meaning now? The class declaration of QObject says about the -connect() method: - - -bool connect ( const QObject * sender, const char * signal, const QObject * receiver, const char * member ) - - -This means you have to specify a QObject instance pointer that is the sender -of the signal, meaning that it can emit this signal as first parameter; then you have to specify the signal -that you want to connect to. The last two parameters are the receiver object that provides a slot, followed -by the member function which actually is the slot that will be executed on signal emission. - - -By using signals and slots, your program's objects can interact with each other easily without explicitly -depending on the type of the receiver object. You will learn more about using this mechanism for productive -usage later in this handbook. More information about the Signals/Slot mechanism can also be found in -The KDE Library Reference Guide -and the Qt online reference. - - - - - - -What KDE provides - -The KDE 3.x libraries - -The main KDE libraries you'll be using for creating your own TDE applications are: - - -the tdecore library, containing all classes that are non-visible elements to provide application functionality - - -the tdeui library, containing user interface elements like menubars, toolbars, etc. - - -the tdefile library, containing the file selection dialogs - - - - -Additionally, for specific solutions KDE offers the following libraries: - - -the tdefx library, containing pixmaps, image effects the TDEStyle extension to QStyle - - -the tdehtml library, containing KDE's html component - - -the kjs library, containing KDE's Javascript support - - -the tdeio library, containing low level access to network files - - -the tdeparts library, containing support for re-usable embeddable extendable applications - - - - -Next we'll have a look at what is needed to turn out first Qt Application into a KDE one. - - - -Example KDE Application - -In the following, you will see that writing a KDE application is not much more difficult than a -Qt application. For the use of KDE's features, you just have to use some other classes, and you're almost -done. As an example, we'll discuss the changed version of the Qt example from above: - -#include <tdeapplication.h> -#include <qpushbutton.h> - -int main( int argc, char **argv ) -{ -TDEApplication a( argc, argv ); - -QPushButton hello( "Hello world!", 0 ); -hello.resize( 100, 30 ); - -a.setTopWidget( &hello ); - -QObject::connect(&hello, SIGNAL( clicked() ), &a, SLOT( quit() )); - -hello.show(); -return a.exec(); -} - - - -You see that first we have changed from QApplication to TDEApplication -. Further, we had to change the previously used setMainWidget() method -to setTopWidget, which TDEApplication uses to set the main -widget. That's it! Your first KDE application is ready - you only have to tell the compiler the KDE -include path and the linker to link in the tdecore library with -ltdecore. - - -As you now know what at least the main() function provides generally and how an -application gets visible and allows user and object interaction, we'll go on with the next chapter, -where our first application is made with &tdevelop;. There you can also test everything which was -mentioned before and see the effects. - - -What you should have looked into additionally until now is the reference documentation for Qt, -especially the QApplication, QWidget and QObject - class and the tdecore library documentation for the TDEApplication class. -The KDE Library Reference handbook -also covers a complete description about the invocation of the QApplication and -TDEApplication constructors including command-line argument processing. - - - - - - - -Creating New Applications - - -The Application Wizard - -&tdevelop;'s Application Wizard is intended to let you start working on new project with &tdevelop;. Therefore -all of your projects are first created by the wizard, and then you can start building them and extend what is -already provided by the source skeleton. You can choose from several project types according to your project goals: - - -KDE Application Framework: includes source code for a complete frame structre of a standard KDE application - - -QMake Project: Creates an application framework based around Trolltech's qmake configuration system - - -Simple hello world program: Creates a C++ terminal based program with no GUI support - - -A multitude of other program skeletons - - - - -In this chapter we'll see how the Application Wizard can be invoked and what has to be done to generate -a KDE application project. This will also be the initial step of our coverage, where we will create the -initial version of a sample project. For all other project types the steps are usualyl the same, but you -may not have as many options available. - - - - -Invoking the Application Wizard and Project Generation - -Starting the Application Wizard and the First Page - -To start with your KDE application, open &tdevelop;. From the Project menu, selection New Project. The -Application Wizard starts, and you'll see the selection tree on the first page containing available project -types that can be created. Choose the C++ subtree, then KDE, then Application Framework. - - -For our sample project, we are going to create the application KScribble. Enter this as the application -name, and change any other information at the bottom of this screen that may need it. Then, select Next. - - -Application Wizard - - - - -Version control information - -On this screen you have the ability to decide if your project will use a version control system like -CVS. For our sample project we will not use source control, so make sure the selection box reads None -and select Next. - - - -Header and Source Templates - -The next two pages show example headers that will go at the top of each of the header and source files that -you create using &tdevelop;. For now, just leave these as the default, and select Next, then Finish. If the -Finish button is not activated, you haven't set all of the options correct. Use the Back button to return -to earlier menus and correct any mistakes. - - - -Finishing Up - -Upon completion, the Application Wizard should close and the messages window should popup displaying -information about the tasks that &tdevelop; is currently doing. At the end of all of the tasks, you -should see **** Success *****. This means the application framework was successfully loaded. - - - - - -The First Build - -After our project is generated, we'll first make a trip through the source code to get a general understanding -of how the application framework looks. This won't only help us get started, but we'll know where to change -what in later steps. - - -This chapter makes the assumption that you understand the basic navigation of &tdevelop;. Consult the -TDevelop User Manual for information if you need it. - - -The Automake manager shows the project files as follows: - - -Files in our project - - - -Before diving into the sources, we'll let &tdevelop; build an run our new application. To do this, select -Build Project from the Build menu, or press F8. The output window opens and displays output messages during -the compilation phase. - -1 cd /home/caleb/kscribble && WANT_AUTOCONF_2_5=1 WANT_AUTOMAKE_1_6=1 gmake k -2 gmake all-recursive -3 gmake[1]: Entering directory `/home/caleb/kscribble' -4 Making all in doc -5 gmake[2]: Entering directory `/home/caleb/kscribble/doc' -6 Making all in . -7 gmake[3]: Entering directory `/home/caleb/kscribble/doc' -8 gmake[3]: Nothing to be done for `all-am'. -9 gmake[3]: Leaving directory `/home/caleb/kscribble/doc' -10 Making all in en -11 gmake[3]: Entering directory `/home/caleb/kscribble/doc/en' -12 /usr/local/trinity/bin/meinproc --check --cache index.cache.bz2 /home/caleb/kscribble/doc/en/index.docbook -13 gmake[3]: Leaving directory `/home/caleb/kscribble/doc/en' -14 gmake[2]: Leaving directory `/home/caleb/kscribble/doc' -15 Making all in po -16 gmake[2]: Entering directory `/home/caleb/kscribble/po' -17 gmake[2]: Nothing to be done for `all'. -18 gmake[2]: Leaving directory `/home/caleb/kscribble/po' -19 Making all in src -20 gmake[2]: Entering directory `/home/caleb/kscribble/src' -21 source='main.cpp' object='main.o' libtool=no \ -22 depfile='.deps/main.Po' tmpdepfile='.deps/main.TPo' \ -23 depmode=gcc3 /bin/sh /home/caleb/kscribble/admin/depcomp \ -24 g++ -DHAVE_CONFIG_H -I. -I/home/caleb/kscribble/src -I.. -I/usr/local/trinity/include - -I/usr/lib/qt/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor - -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings - -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new - -c -o main.o `test -f 'main.cpp' || echo '/home/caleb/kscribble/src/'`main.cpp -25 /usr/lib/qt/bin/moc /home/caleb/kscribble/src/kscribble.h -o kscribble.moc -26 source='kscribble.cpp' object='kscribble.o' libtool=no \ -27 depfile='.deps/kscribble.Po' tmpdepfile='.deps/kscribble.TPo' \ -28 depmode=gcc3 /bin/sh /home/caleb/kscribble/admin/depcomp \ -29 g++ -DHAVE_CONFIG_H -I. -I/home/caleb/kscribble/src -I.. -I/usr/local/trinity/include - -I/usr/lib/qt/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor - -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings - -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new - -c -o kscribble.o `test -f 'kscribble.cpp' || echo '/home/caleb/kscribble/src/'`kscribble.cpp -30 kscribble.cpp: In member function `void KScribble::setupActions()' -31 kscribble.cpp:107: warning: unused variable `TDEAction*custom' -32 /usr/lib/qt/bin/moc /home/caleb/kscribble/src/kscribbleview.h -o kscribbleview.moc -33 source='kscribbleview.cpp' object='kscribbleview.o' libtool=no \ -34 depfile='.deps/kscribbleview.Po' tmpdepfile='.deps/kscribbleview.TPo' \ -35 depmode=gcc3 /bin/sh /home/caleb/kscribble/admin/depcomp \ -36 g++ -DHAVE_CONFIG_H -I. -I/home/caleb/kscribble/src -I.. -I/usr/local/trinity/include - -I/usr/lib/qt/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor - -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi - -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new -c - -o kscribbleview.o `test -f 'kscribbleview.cpp' || echo '/home/caleb/kscribble/src/'`kscribbleview.cpp -37 kscribbleview.cpp: In member function `void KScribbleView::print(QPainter*, -38 int, int)': -39 kscribbleview.cpp:79: warning: unused parameter `QPainter*p' -40 kscribbleview.cpp:79: warning: unused parameter `int height' -41 kscribbleview.cpp:79: warning: unused parameter `int width' -42 /usr/lib/qt/bin/moc /home/caleb/kscribble/src/pref.h -o pref.moc -43 source='pref.cpp' object='pref.o' libtool=no \ -44 depfile='.deps/pref.Po' tmpdepfile='.deps/pref.TPo' \ -45 depmode=gcc3 /bin/sh /home/caleb/kscribble/admin/depcomp \ -46 g++ -DHAVE_CONFIG_H -I. -I/home/caleb/kscribble/src -I.. -I/usr/local/trinity/include - -I/usr/lib/qt/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor - -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings - -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new - -c -o pref.o `test -f 'pref.cpp' || echo '/home/caleb/kscribble/src/'`pref.cpp -47 /usr/local/trinity/bin/dcopidl /home/caleb/kscribble/src/kscribbleiface.h > kscribbleiface.kidl || - ( rm -f kscribbleiface.kidl ; /bin/false ) -48 /usr/local/trinity/bin/dcopidl2cpp --c++-suffix cpp --no-signals --no-stub kscribbleiface.kidl -49 source='kscribbleiface_skel.cpp' object='kscribbleiface_skel.o' libtool=no \ -50 depfile='.deps/kscribbleiface_skel.Po' tmpdepfile='.deps/kscribbleiface_skel.TPo' \ -51 depmode=gcc3 /bin/sh /home/caleb/kscribble/admin/depcomp \ -52 g++ -DHAVE_CONFIG_H -I. -I/home/caleb/kscribble/src -I.. -I/usr/local/trinity/include - -I/usr/lib/qt/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor - -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings - -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new - -c -o kscribbleiface_skel.o `test -f 'kscribbleiface_skel.cpp' || - echo '/home/caleb/kscribble/src/'`kscribbleiface_skel.cpp -53 /bin/sh ../libtool --silent --mode=link --tag=CXX g++ -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall - -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 - -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new -o kscribble -R - /usr/local/trinity/lib -R /usr/lib/qt/lib -R /usr/X11R6/lib -L/usr/X11R6/lib -L/usr/lib/qt/lib - -L/usr/local/trinity/lib main.o kscribble.o kscribbleview.o pref.o kscribbleiface_skel.o -ltdeio -54 source='kscribble_client.cpp' object='kscribble_client.o' libtool=no \ -55 depfile='.deps/kscribble_client.Po' tmpdepfile='.deps/kscribble_client.TPo' \ -56 depmode=gcc3 /bin/sh /home/caleb/kscribble/admin/depcomp \ -57 g++ -DHAVE_CONFIG_H -I. -I/home/caleb/kscribble/src -I.. -I/usr/local/trinity/include - -I/usr/lib/qt/include -I/usr/X11R6/include -DQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor - -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings - -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new - -c -o kscribble_client.o `test -f 'kscribble_client.cpp' || echo - '/home/caleb/kscribble/src/'`kscribble_client.cpp -58 /bin/sh ../libtool --silent --mode=link --tag=CXX g++ -Wnon-virtual-dtor -Wno-long-long -Wundef - -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 - -D_BSD_SOURCE -Wcast-align -Wconversion -O2 -fno-exceptions -fno-check-new -o kscribble_client -R - /usr/local/trinity/lib -R /usr/lib/qt/lib -R /usr/X11R6/lib -L/usr/X11R6/lib -L/usr/lib/qt/lib - -L/usr/local/trinity/lib kscribble_client.o -ltdecore -59 gmake[2]: Leaving directory `/home/caleb/kscribble/src' -60 gmake[2]: Entering directory `/home/caleb/kscribble' -61 gmake[2]: Nothing to be done for `all-am'. -62 gmake[2]: Leaving directory `/home/caleb/kscribble' -63 gmake[1]: Leaving directory `/home/caleb/kscribble' -64 *** Success *** - - - -As you can see, we've put line numbers in front of each line which won't appear on your output but it makes it -easier to describe what is happening during the build. First of all, gmake works recursively. This means -that it starts from the directory it is invoked and goes into the subdirectories first, one at a time, then -returns to the directory it was started, processes it, then finishes. - - -Our first line of interest is 24. Notice on this line that g++, which is our C++ compiler, gets called by make -to compile the first source code file in our project - in this case main.cpp. Many extra command line options -are also being used with the g++ compiler; some of which are defaults and some of which can be configured -via &tdevelop;. - - -Before the next file (kscribble.cpp, line 29) is compiled, the moc (meta object compiler) is first -invoked on kscribble.h (line 25). This is because KScribble classes use signals/slots, so the -Q_OBJECT macro must be expanded, and the moc does this for us. The resultant file, kscribble.moc, is -used by kscribble.cpp via an #include statement inside of the file. - - - - -The source skeleton - -To conceptualize how a KDE application works, we'll first have a very close look at the source -skeleton already provided by the Application Wizard. As we already saw, we're having a set of source -and header files that build the initial code for the application and make it ready-to-run. Therefore, -the easiest way to explain the code is to follow the implementation line by line as it is processed -during executing the program until it enters the main event loop and is ready to accept user input. -Then, we'll have a look at the functionality that enables user interaction and how certain things work. -This is probably the best way to explain the framework and, as it is similar to almost all KDE -applications, will enable you to read source codes from other projects as well; additionally, you will -know where to change what part of the code to make your applications behave the way they are designed for. - - - -The main() function - -As the application begins its execution with entering the main() function, -this will be the start for our code examination. The main() function of -KScribble is implemented in the file main.cpp and can also be found using the Class Browser -by selecting the "Global Functions" folder. - -1 int main(int argc, char **argv) -2 { -3 TDEAboutData about("kscribble", I18N_NOOP("KScribble"), version, description, -4 TDEAboutData::License_GPL, "(C) 2002 Your Name", 0, 0, "you@you.com"); -5 about.addAuthor( "Your Name", 0, "you@you.com" ); -6 TDECmdLineArgs::init(argc, argv, &about); -7 TDECmdLineArgs::addCmdLineOptions(options); -8 TDEApplication app; -9 -10 // register ourselves as a dcop client -11 app.dcopClient()->registerAs(app.name(), false); -12 -13 // see if we are starting with session management -14 if (app.isRestored()) -15 RESTORE(KScribble) -16 else -17 { -18 // no session.. just start up normally -19 TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); -20 if (args->count() == 0) -21 { -22 KScribble *widget = new KScribble; -23 widget->show(); -24 } -25 else -26 { -27 int i = 0; -28 for (; i < args->count(); i++) -29 { -30 KScribble *widget = new KScribble; -31 widget->show(); -32 widget->load(args->url(i)); -33 } -34 } -35 args->clear(); -36 } -37 -38 return app.exec(); -39 } - - - -Now, what happens first is the usual creation of a TDEApplication object, but we've -added some KDE methods that set program and author information for this application. - - - -User Application Start - -... (not written yet) - - - -The Constructor - -Let's have a look at the constructor and see how this instance is called - -1 KScribble::KScribble() -2 : TDEMainWindow( 0, "KScribble" ), -3 m_view(new KScribbleView(this)), -4 m_printer(0) -5 { -6 // accept dnd -7 setAcceptDrops(true); -8 -9 // tell the TDEMainWindow that this is indeed the main widget -10 setCentralWidget(m_view); -11 -12 // then, setup our actions -13 setupActions(); -14 -15 // and a status bar -16 statusBar()->show(); -17 -18 // allow the view to change the statusbar and caption -19 connect(m_view, SIGNAL(signalChangeStatusbar(const QString&)), -20 this, SLOT(changeStatusbar(const QString&))); -21 connect(m_view, SIGNAL(signalChangeCaption(const QString&)), -22 this, SLOT(changeCaption(const QString&))); -23 -24 } - - - -Notice that KScribble inherits the TDEMainWindow class - a -commonly used base class for TDE applications. We initialize a class called KScribbleView -as our central widget, create a KStatusBar via the statusBar() -method (line 16), and connect some signals and slots together. - - - - - - - -Application View Design - -Introduction - -When developing an application with a graphical user interface, the main work takes place in -providing a so-called "view" for the application. A view generally is a widget that displays the data -of a document and provides methods to manipulate the document contents. This can be done by the user via -the events he emits by the keyboard or the mouse; more complex operations are often processed by toolbars -and menubars which interact with the view and the document. The statusbar then provides information about -the document, view or application status. As an example, we look at how an editor is constructed and where -we can find which part. - - -An editor generally is supposed to provide an interface to view and/or change the contents of a text -document for the user. If you start Kate, you see the visual interface as the following: - - -The menubar: providing complex operations as well as opening, saving and closing files and -exiting the application. - - -The toolbar: offers icons which allow quicker access for most needed functions, - - -The statusbar: displays the status of the cursor position by the current row and column, - - -The view in the center of the window, displaying a document and offering a cursor connected to -the keyboard and the mouse to operate on the data. - - - - -Now it's easy to understand that a view is the most unique part of the application and the design -of the view decides about the usability and acceptability of an application. This means that one of -the first steps in development is to determine the purpose of the application and what kind of view -design would match best to allow any user to work with the application with a minimum of work -learning how to handle the user interface. - - -For some purposes like text editing and displaying HTML files, views are provided by the Qt and KDE -libraries; we will discuss certain aspects of these high-level widgets in the next section. -But for most applications new widgets have to be designed and implemented. It is that what makes a -programmer also a designer and where his abilities on creativity are asked. Nevertheless, you should -watch for intuitivity first. Remember, a lot of users won't accept an application that isn't: - - -graphically nice. - - -offering a lot of features - - -easy to handle - - -fast to learn how to use it - - - - -Needless to say that stability is a major design goal. Nobody can prevent bugs, but a minimum can -be reached at least by clever design goals and wide use of object-oriented design. C++ makes programming -a joy if you know how to exploit it's capabilities- inheritance, information hiding and reusablitity of -already existing code. - - -When creating a KDE or Qt project, you always have to have a view that inherits QWidget, either by -direct inheritance or because the library widget you want to use inherits QWidget. Therefore, the -Application Wizard already constructed a view that is an instance of a class yourappView, which -inherits QWidget already. - - -This chapter therefore describes how to use library widgets for creating views of KDE or -Qt applications that are generated with &tdevelop;, then we look at the libraries and what kind of -views are already offered. - - - -Using Library Views - -When your application design has been set up, you first should look for already existing code that -will make your life a lot easier. A part of this search is to look for a widget that can be used as -a view or at least as a part of it; either directly or by inheritance. The KDE and Qt libraries already -contain a set of widgets that can be used for this purpose. To use them, you have two options: - - -Remove the new view class and create an instance of a library widget; then set this as the view, - - -Change the inheritance of the provided view class to the class of the library widget to use. - - - - -In either way, it is important to know that if the application framework is currently not linked -against the library that contains the widget, the linker will fail. After you decided to use a -certain widget, look for the library to link to; then open "Project"->"Options" from the &tdevelop; -menubar. Switch to the "Linker Options" page and look for the checkmarks indicating the libraries -that are currently used. If the library of your view widget is already checked, you can leave the -project options untouched and start doing the necessary changes due to your choice. If not, and the -linker options offer to add the library by a check box, check it and press "OK" to leave the project -options dialog again. In any other case, add the library in the edit line below with the -l option. -For libraries that your application has to search for before preparing the Makefiles by the -configure script on the end-user machine, add the according search macro to the configure.in file -located at the root directory of your project and add the macro to the edit line. Mind that you have -to run "Build"->"Autoconf and automake" and "Build"->"Configure" before the Makefiles contain the -correct expansion for the library macro. - - -Also, if the include files for the library to add are not in the current include path -(which can be seen by the -I options in the output window on "Make"), you have to add the path to the -Project Options dialog -"Compiler Options" page with the -I option or the according automake macro at -the edit line for "Additional Options". - - -Qt Views - -Looking at the first page of the Qt online documentation, you will find a link to -"Widget Screenshots" where you can have a look at how the widgets Qt contains look like. -These are ready to use and can be combined together to form complex widgets to create application -views or dialogs. In the following, we'll discuss some of these which are very usable for creating -application views, but keep in mind that the KDE libraries sometimes contain other widgets for the -same purpose; those will be reviewed in the next section. - - -Here are a set of hints for what purpose you could use which Qt component: - - -If your view area isn't big enough to display all your data, the user must be enabled to scroll -over the document with bars on the left and bottom of the view. For this, Qt provides the class -QScrollView, which offers a scrollable child area. As explained, you could -inherit your own widget from QScrollView or use an instance to manage your -document's view widget. - - -to create a ScrollView yourself, inherit the View widget from QWidget -and add vertical and horizontal QScrollBars . -(This is done by KDE`s TDEHTMLView widget.) - - -For text processing, use QTextEdit. This class provides a complete -text editor widget that is already capable to cut, copy and paste text and is managed by a scrollview. - - -Use QTable to display data that is arranged in a table. -As QTable is managed by scrollbars as well, it offers a good solution for -table calculation applications. - - -To display two different widgets or two widget instances at the same time, use QSplitter -. This allows to tile views by horizontal or vertical dividers. -KMail is a good example what this would look like- the main view is separated by a -splitter vertically, the right window then is divided again horizontally. - - -QListView displays information in a list and tree. -This is useful for creating file trees or any other hierarchical information you want to interact with. - - - - -You see that Qt alone offers a whole set of widgets which are ready to use so you don't have to invent -new solutions if these match your needs. The sideffect when using standard widgets is that users already -know how to handle them and only have to concentrate on the displayed data. - - - -KDE Views - -The KDE libraries were invented to make designing applications for the K Desktop Environment easier -and capable of more functionality than what Qt alone is offering. The tdeui library offers: - - -TDEListView: a more powerful version of QListView - - -TDEIconView: a graphical viewer of icon files - - - - -The tdehtml library, on the other hand, offers a complete HTML-interpreting widget that is ready to use. -It is scrollable already, so you don't even have to take care for that. A possible use could be to -integrate it as a preview widget for an HTML editor; used by applications such as Konqueror to display HTML files. - - - - -Creating your own Views - -Not yet written - - - - - -Configuring Menubars and Toolbars - -Introduction - -Menubars and toolbars are one of the most important parts of an application to provide methods to -work with a document structure. As a general rule, you should make all functions available by the menubar. -Those methods that should not be available at a current stage of the application process should be -disabled. - - -Further, an application can only contain one menubar, but several toolbars. -Toolbars on the other hand should contain only the most frequently used commands by pixmap -icons or provide quick access methods like combos to select values. - - - -How does it work? - -Our application inherits the TDEMainWindow class, which automatically handles creating -a menu bar and tool bars for us. In the KScribble::setupActions() method there is -a call to TDEMainWindow::createGUI(). This method loads a resource file, in this -case kscribbleui.rc, to initialize menus at startup. Note that kscribbleui.rc is listed as one of the -project files in the Automake Manager. Opening that file up reveals this: - -1 <!DOCTYPE kpartgui SYSTEM "kpartgui.dtd"> -2 <kpartgui name="kscribble" version="1"> -3 <MenuBar> -4 <Menu name="custom"><text>C&ustom</text> -5 <Action name="custom_action" /> -6 </Menu> -7 </MenuBar> -8 </kpartgui> - - - -Explanation... - - -Another way to modify the contents of the menu and tool bars is to directly manipulate them through the -methods provided by their class. For example, the menuBar() method returns the -KMenuBar widget that the menubar for our program. Looking at the documentation for -KMenuBar and its inheritor class QMenuBar, you will find -a large number of insertItem() methods which allow you to add items to the -menu bar. - - -TDEMainWindow's methods statusBar() and -toolBar() will also provide you with applicable widgets. - - - -Keyboard Accelerator Configuration - -A very professional thing you should always add to your application are keyboard accelerators. -Those are mainly used by experienced users that want to work fast with their applications and -are willing to learn shortcuts. For this, the KDE libraries provide the class -TDEAction, which provides the keyboard accelerator keys and access to global configured -standard keyboard accelerators. - - -By default, frame applications generated by &tdevelop; only use standard keyboard accelerators -such as F1 for accessing online-help, Ctrl+N for New File etc. - - -If your application contains a lot of accelerators, you should make them configurable -by an Options-menu; either it could be combined with other application configuration in a QWidget -or stand alone. The KDE library already provides a KKeyChooser -for use in tab dialogs, whereas KKeyDialog provides a ready-to use -key-configuration dialog. - - - - - - - -Help Functions - -Introduction - -A very important part of the development process is to provide help functionality to the user -wherever possible. Most developers tend to delay this, but you should remember that a normal user -isn't necessarily a Unix expert. He may come from the the dark side of computer software usage offering -all sweets that a user may need to work himself into using an application even without ever touching the -manuals. Therefore, the KDE and Qt library provide all means usually considered making an application -professional in the eyes of the normal user by help functions that are ready to use. -Within the application, those are: - -Tool-Tips -Statusbar help -What's this...? buttons - - -Additionally, the application should provide means to access a HTML-based online manual directly -using the standard help key F1. This context based help system is provided automatically through the -TDEMainWindow class, though as the author you must provide the content. - - -As &tdevelop; also offers all types of help as well as the KDE framework generated by the -application wizard already contains support for this, this chapter will help you find out where -and how to add your help functionality. - -During the development of your application you should try to be consistent whatever you're doing; -therefore you should do the necessary steps directly while extending the code. This will prevent you -from diving into the code again and figuring out what your application does or what you intended by -certain parts of the code. - - - - -Tool-Tips - -A very easy means of providing help are tool-tips. Those are small help messages popping up while -the user moves the mouse over a widget that provides a tool-tip and disappears when the mouse moves away. -The most popular usage of tool-tips is made in toolbars where your tool-tips should be kept as small -as possible because toolbars can be configured to display their contents in various ways: -either displaying the button, button with text on the right, button with text below, text only. -This possibility should be made configurable by the user, but isn't a must-be. The text is shown -as a tool-tip anyway and a toolbar usually consists of buttons and other widgets like lineedits and -combo boxes. For a complete reference, see the TDEToolBar class reference located -in the tdeui library. - - -As an example, we have a look at the "New File" button in a generic application: - - -There, the part i18n("New File") provides a tool-tip message. It is enclosed by the i18n() -macro provided by kapp.h to translate the tool-tip towards the currently selected language. - - -Tool-tips can also be added to any custom widget by using the QToolTip -provided by Qt. An example of that would be: - - - -Extending the Statusbar - -As the applications that inherit TDEMainWindow contain a statusbar as well, -it also offers a set of statusbar messages already for all menu and toolbar items. A statusbar -help message is a short message that extends the meaning of a tool-tip or can be seen as a replacement -for a tool-tip over menubar items and is (as the name suggests) displayed in the statusbar when the user -enters a menu and highlights the menu entry. - - - -The <guibutton>What's This...?</guibutton> Button - -The What's This...? button provides help windows with the intention -that the user wants to get help about a certain widget within the working view or a toolbar item. -It is placed in the toolbar and gets activated once the user hits the button. The cursor changes -to an arrow cursor with a question mark like the button itself looks like. The the user can press on -a visible widget item and gets a help window. As an exercise, you could try this behavior with the -What's this...? button within &tdevelop;. - - -To add the What's This...? help to one of your widgets, use the static method -QWhatsThis::add(QWidget *widget, const QString &text) - - - - - -Documentation - -Introduction - -Due to the fact that projects often lack a complete set of user documentation, -all &tdevelop; projects contain a pre-build handbook that can be easily adapted; -therefore fulfiling another goal of KDE: providing enough online-help to support users that -are not familiar with an application. This chapter therefore introduces you on how to extend -the provided documentation template and what you have to do to make it available to the user. - - - -User Documentation - -The documentation for your project lies in projectdir/doc/en, or perhaps another directory if English -isn't your native language. Therein lies a file, index.docbook, in which the documentation is stored. -The format for editing this file is explained on -KDE's documentation website. - - - -Programmer Documentation - -Another important part of the documentation is including a descriptive help for your class interfaces. -This will allow you and other programmers to use your classes by reading the HTML class documentation -that can be created with KDoc. &tdevelop; supports the use of KDoc completely by creating the -KDE-library documentation, also your application frameworks are already documented. To work yourself -into the provided code, it would be a good start to read the included documentation online. -The following describes what to do to get the API documentation, where &tdevelop; helps you add it -and what kind of special tags KDoc provides. - - - - - -Internationalization - -Introdction - -i18n is an internationalization system that is used to offer internationalized versions of an -application or project. The difficulty with writing applications is that they only support the -language they originally are composed with; visually this can be seen on labels, menu entries and the -like. The goal of the internationalization is to provide applications and library functions in the -language of the user; therefore enabling users that are not native speakers the original language to make -use of the provided functionality and feel more comfortable. - - - - - - -Credits - - -(... to be written ...) - - - - - - - -Bibliography - - - -<ulink url="info://make/Top">GNU Make Manual</ulink> - -Richard M.Stallman -RolandMcGrath - - - - -<ulink url="info://automake/Top">GNU Automake</ulink> - -DavidMacKenzie -TomTromey - - - - -<ulink url="info://autoconf/Top">GNU Autoconf</ulink> - -DavidMacKenzie -BenElliston - - - - -<ulink url="info://gcc/Top">Using the GNU Compiler Collection</ulink> -Richard M.Stallman - - - -<ulink url="info://libtool/Top">GNU Libtool</ulink> - -GordonMatzigkeit -AlexandreOliva -ThomasTanner -Gary V.Vaughan - - - - -GNU Autoconf, Automake, and Libtool -1st edition -October 2000 - -Gary V.Vaughan -BenElliston -TomTromey -Ian LanceTaylor - -New Riders Publishing -ISBN 1578701902 - - - - -Advanced Programming in the UNIX(R) Environment -1st edition -June 1992 -W. RichardStevens -Addison-Wesley Pub Co -ISBN 0201563177 - - - -Thinking in C++, Volume 1: Introduction to Standard C++ -2nd Edition -April 15, 2000 -BruceEckel -Prentice Hall -ISBN 0139798099 - - - -Open Source Development with CVS -2nd Edition -October 12, 2001 - -KarlFogel -MosheBar - -The Coriolis Group -ISBN 158880173X - - - -Programming PHP -1st edition -March 2002 - -RasmusLerdorf -KevinTatroe - -O'Reilly & Associates -ISBN 1565926102 - - - -Programming Python -2nd Edition -March 2001 -MarkLutz -O'Reilly & Associates -ISBN 0596000855 - - - -Gui Programming With Python : Using the Qt Toolkit -Bk&Cd-r edition -January 2002 -BoudewijnRempt -Opendocs Llc -ISBN 0970033044 - - - -Programming Perl -The Camel book -3rd Edition -July 2000 - -LarryWall -TomChristiansen -JonOrwant - -O'Reilly & Associates -ISBN 0596000278 - - - -Learning Perl -The Lama book -3rd Edition -July 15, 2001 - -Randal L.Schwartz -TomPhoenix - -O'Reilly & Associates -ISBN 0596001320 - - - - -&underFDL; - - - - -
diff --git a/doc/tdearch/Makefile.am b/doc/tdearch/Makefile.am deleted file mode 100644 index 171f575c..00000000 --- a/doc/tdearch/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -KDE_LANG = en -KDE_DOCS = AUTO diff --git a/doc/tdearch/index.docbook b/doc/tdearch/index.docbook deleted file mode 100644 index 3bc09158..00000000 --- a/doc/tdearch/index.docbook +++ /dev/null @@ -1,3337 +0,0 @@ - - - -]> - - - - -KDE Architecture Overview - - - - - - -Bernd -Gehrmann -
bernd@kdevelop.org
-
-
- - -2001 -2002 -Bernd Gehrmann - - -&FDLNotice; - - -This documentation gives an overview of the KDE Development Platform - - - -KDE -architecture -development -programming - - -
- - -Library structure - - -Libraries by name - - - - -tdecore - -The tdecore library is the basic application framework for every KDE based -program. It provides access to the configuration system, command line -handling, icon loading and manipulation, some special kinds inter-process -communication, file handling and various other utilities. - - - - -tdeui - -The tdeui library provides many widgets and standard -dialogs which Qt doesn't have or which have more features than their Qt -counterparts. It also includes several widgets which are subclassed -from Qt ones and are better integrated with the KDE desktop by -respecting user preferences. - - - - -tdeio - -The tdeio library contains facilities for asynchronous, -network transparent I/O and access to mimetype handling. It also provides the -KDE file dialog and its helper classes. - - - - -kjs - -The kjs library provides an implementation of JavaScript. - - - - -tdehtml - -The tdehtml library contains the TDEHTML part, a HTML browsing -widget, DOM API and parser, including interfaces to Java and JavaScript. - - - - - - - - - -Grouped classes - - -Core application skeleton - classes needed by almost every application. - - - - - -<ulink url="kdeapi:tdecore/TDEApplication">TDEApplication</ulink> - -Initializes and controls a KDE application. - - - - -<ulink url="kdeapi:tdecore/KUniqueApplication">KUniqueApplication</ulink> - -Makes sure only one instance of an application can run simultaneously. - - - -<ulink url="kdeapi:tdecore/TDEAboutData">TDEAboutData</ulink> - -Holds information for the about box. - - - -<ulink url="kdeapi:tdecore/TDECmdLineArgs">TDECmdLineArgs</ulink> - -Command line argument processing. - - - - - - -Configuration settings - access to KDE's hierarchical configuration -database, global settings and application resources. - - - - -<ulink url="kdeapi:tdecore/TDEConfig">TDEConfig</ulink> - -Provides access to KDE's configuration database. - - - -<ulink url="kdeapi:tdecore/KSimpleConfig">KSimpleConfig</ulink> - -Access to simple, non-hierarchical configuration files. - - - -<ulink url="kdeapi:tdecore/KDesktopFile">KDesktopFile</ulink> - -Access to .desktop files. - - - -<ulink url="kdeapi:tdecore/TDEGlobalSettings">TDEGlobalSettings</ulink> - -Convenient access to not application-specific settings. - - - - - - -File and URL handling - decoding of URLs, temporary files etc. - - - - -<ulink url="kdeapi:tdecore/KURL">KURL</ulink> - -Represents and parses URLs. - - - -<ulink url="kdeapi:tdecore/KTempFile">KTempFile</ulink> - -Creates unique files for temporary data. - - - -<ulink url="kdeapi:tdecore/KSaveFile">KSaveFile</ulink> - -Allows to save files atomically. - - - - - - -Interprocess communication - DCOP helper classes and subprocess invocation. - - - - -<ulink url="kdeapi:tdecore/TDEProcess">TDEProcess</ulink> - -Invokes and controls child processes. - - - -<ulink url="kdeapi:tdecore/KShellProcess">KShellProcess</ulink> - -Invokes child processes via a shell. - - - -<ulink url="kdeapi:tdesu/PtyProcess">PtyProcess</ulink> - -Communication with a child processes through a pseudo terminal. - - - -<ulink url="kdeapi:tdecore/KIPC">KIPC</ulink> - -Simple IPC mechanism using X11 ClientMessages. - - - -<ulink url="kdeapi:dcop/DCOPClient">DCOPClient</ulink> - -DCOP messaging. - - - -<ulink url="kdeapi:tdecore/KDCOPPropertyProxy">KDCOPPropertyProxy</ulink> - -A proxy class publishing Qt properties through DCOP. - - - -<ulink url="kdeapi:tdeui/KDCOPActionProxy">KDCOPActionProxy</ulink> - -A proxy class publishing a DCOP interface for actions. - - - - - - -Utility classes - memory management, regular expressions, string manipulation, -random numbers - - - - -<ulink url="kdeapi:tdecore/KRegExp">KRegExp</ulink> - -POSIX regular expression matching. - - - -<ulink url="kdeapi:tdecore/KStringHandler">KStringHandler</ulink> - -An extravagant interface for string manipulation. - - - -<ulink url="kdeapi:tdecore/TDEZoneAllocator">TDEZoneAllocator</ulink> - -Efficient memory allocator for large groups of small objects. - - - -<ulink url="kdeapi:tdecore/KRandomSequence">KRandomSequence</ulink> - -Pseudo random number generator. - - - - - - -Keyboard accelerators - classes helping to establish consistent key bindings -throughout the desktop. - - - - -<ulink url="kdeapi:tdecore/TDEAccel">TDEAccel</ulink> - -Collection of keyboard shortcuts. - - - -<ulink url="kdeapi:tdecore/TDEStdAccel">TDEStdAccel</ulink> - -Easy access to the common keyboard shortcut keys. - - - -<ulink url="kdeapi:tdecore/TDEGlobalAccel"></ulink> - -Collection of system-wide keyboard shortcuts. - - - - - - -Image processing - icon loading and manipulating. - - - - -<ulink url="kdeapi:tdecore/TDEIconLoader">TDEIconLoader</ulink> - -Loads icons in a theme-conforming way. - - - -<ulink url="kdeapi:tdecore/TDEIconTheme">TDEIconTheme</ulink> - -Helper classes for TDEIconLoader. - - - -<ulink url="kdeapi:tdecore/KPixmap">KPixmap</ulink> - -A pixmap class with extended dithering capabilities. - - - -<ulink url="kdeapi:tdeui/KPixmapEffect">KPixmapEffect</ulink> - -Pixmap effects like gradients and patterns. - - - -<ulink url="kdeapi:tdeui/KPixmapIO">KPixmapIO</ulink> - -Fast QImage to QPixmap conversion. - - - - - - -Drag and Drop - drag objects for colors and URLs. - - - - -<ulink url="kdeapi:tdecore/KURLDrag">KURLDrag</ulink> - -A drag object for URLs. - - - -<ulink url="kdeapi:tdeui/KColorDrag">KColorDrag</ulink> - -A drag object for colors. - - - -<ulink url="kdeapi:tdecore/KMultipleDrag">KMultipleDrag</ulink> - -Allows to construct drag objects from several others. - - - - - - -Auto-Completion - - - - -<ulink url="kdeapi:tdecore/TDECompletion">TDECompletion</ulink> - -Generic auto-completion of strings. - - - -<ulink url="kdeapi:tdeio/KURLCompletion">KURLCompletion</ulink> - -Auto-completion of URLs. - - - -<ulink url="kdeapi:tdeio/KShellCompletion">KShellCompletion</ulink> - -Auto-completion of executables. - - - - - - -Widgets - widget classes for list views, rules, color selection etc. - - - - -<ulink url="kdeapi:tdeui/TDEListView">TDEListView</ulink> - -A variant of QListView that honors KDE's system-wide settings. - - - -<ulink url="kdeapi:tdeui/TDEListView">TDEListBox</ulink> - -A variant of QListBox that honors KDE's system-wide settings. - - - -<ulink url="kdeapi:tdeui/TDEListView">TDEIconView</ulink> - -A variant of QIconView that honors KDE's system-wide settings. - - - -<ulink url="kdeapi:tdeui/TDEListView">KLineEdit</ulink> - -A variant of QLineEdit with completion support. - - - -<ulink url="kdeapi:tdeui/KComboBox">KComboBox</ulink> - -A variant of QComboBox with completion support. - - - -<ulink url="kdeapi:tdeui/TDEFontCombo">TDEFontCombo</ulink> - -A combo box for selecting fonts. - - - -<ulink url="kdeapi:tdeui/KColorCombo">KColorCombo</ulink> - -A combo box for selecting colors. - - - -<ulink url="kdeapi:tdeui/KColorButton">KColorButton</ulink> - -A button for selecting colors. - - - -<ulink url="kdeapi:tdeui/KURLCombo">KURLCombo</ulink> - -A combo box for selecting file names and URLs. - - - -<ulink url="kdeapi:tdefile/KURLRequester">KURLRequester</ulink> - -A line edit for selecting file names and URLs. - - - -<ulink url="kdeapi:tdeui/KRuler">KRuler</ulink> - -A ruler widget. - - - -<ulink -url="kdeapi:tdeui/KAnimWidget">KAnimWidget</ulink> - -animations. - - - -<ulink url="kdeapi:tdeui/KNumInput">KNumInput</ulink> - -A widget for inputting numbers. - - - -<ulink url="kdeapi:tdeui/KPasswordEdit">KPasswordEdit</ulink> - -A widget for inputting passwords. - - - - - - -Dialogs - full-featured dialogs for file, color and font selection. - - - - -<ulink url="kdeapi:tdefile/KFileDialog">KFileDialog</ulink> - -A file selection dialog. - - - -<ulink url="kdeapi:tdeui/KColorDialog">KColorDialog</ulink> - -A color selection dialog. - - - -<ulink url="kdeapi:tdeui/TDEFontDialog">TDEFontDialog</ulink> - -A font selection dialog. - - - -<ulink url="kdeapi:tdefile/TDEIconDialog">TDEIconDialog</ulink> - -An icon selection dialog. - - - -<ulink url="kdeapi:tdeui/KKeyDialog">KKeyDialog</ulink> - -A dialog for editing keyboard bindings. - - - -<ulink url="kdeapi:tdeui/KEditToolBar">KEditToolBar</ulink> - -A dialog for editing toolbars. - - - -<ulink url="kdeapi:tdeui/KTipDialog">KTipDialog</ulink> - -A Tip-of-the-day dialog. - - - -<ulink url="kdeapi:tdeui/TDEAboutDialog">TDEAboutDialog</ulink> - -An about dialog. - - - -<ulink url="kdeapi:tdeui/KLineEditDlg">KLineEditDlg</ulink> - -A simple dialog for entering text. - - - -<ulink url="kdeapi:tdefile/KURLRequesterDlg">KURLRequesterDlg</ulink> - -A simple dialog for entering URLs. - - - -<ulink url="kdeapi:tdeui/KMessageBox">KMessageBox</ulink> - -A dialog for signaling errors and warnings. - - - -<ulink url="kdeapi:tdeui/KPasswordDialog">KPasswordDialog</ulink> - -A dialog for inputting passwords. - - - - - - -Actions and XML GUI - - - - -<ulink url="kdeapi:tdeui/TDEAction">TDEAction</ulink> - -Abstraction for an action that can be plugged into menu bars and tool bars. - - - -<ulink url="kdeapi:tdeui/TDEActionCollection">TDEActionCollection</ulink> - -A set of actions. - - - -<ulink url="kdeapi:tdeui/KXMLGUIClient">KXMLGUIClient</ulink> - -A GUI fragment consisting of an action collection and a DOM tree representing their location in the GUI. - - - -<ulink url="kdeapi:tdeparts/KPartManager">KPartManager</ulink> - -Manages the activation of XMLGUI clients. - - - - - - -Plugins and Components - - - - -<ulink url="kdeapi:tdecore/KLibrary">KLibrary</ulink> - -Represents a dynamically loaded library. - - - -<ulink url="kdeapi:tdecore/KLibrary">KLibLoader</ulink> - -Shared library loading. - - - -<ulink url="kdeapi:tdecore/KLibFactory">KLibFactory</ulink> - -Object factory in plugins. - - - -<ulink url="kdeapi:tdeio/KServiceType">KServiceType</ulink> - -Represents a service type. - - - -<ulink url="kdeapi:tdeio/KService">KService</ulink> - -Represents a service. - - - -<ulink url="kdeapi:tdeio/KMimeType">KMimeType</ulink> - -Represents a MIME type. - - - -<ulink url="kdeapi:tdeio/KServiceTypeProfile">KServiceTypeProfile</ulink> - -User preferences for MIME type mappings. - - - -<ulink url="kdeapi:tdeio/KServiceTypeProfile">TDETrader</ulink> - -Querying for services. - - - - - - - - - - - - -Graphics - - -Low-level graphics with QPainter - - -Rendering with QPainter - - -Qt's low level imaging model is based on the capabilities provided by X11 and -other windowing systems for which Qt ports exist. But it also extends these by -implementing additional features such as arbitrary affine transformations for -text and pixmaps. - - - -The central graphics class for 2D painting with Qt is -QPainter. It can -draw on a -QPaintDevice. -There are three possible paint devices implemented: One is -QWidget -which represents a widget on the screen. The second is -QPrinter which -represents a printer and produces Postscript output. The third it -the class -QPicture which -records paint commands and can save them on disk and play them back -later. A possible storage format for paint commands is the W3C standard -SVG. - - - -So, it is possible to reuse the rendering code you use for displaying a -widget for printing, with the same features supported. Of course, in -practice, the code is used in a slightly different context. Drawing -on a widget is almost exclusively done in the paintEvent() method -of a widget class. - - - -void FooWidget::paintEvent() -{ - QPainter p(this); - // Setup painter - // Use painter -} - - - -When drawing on a printer, you have to make sure to use QPrinter::newPage() -to finish with a page and begin a new one - something that naturally is not -relevant for painting widgets. Also, when printing, you may want to use the -device metrics -in order to compute coordinates. - - - - - - -Transformations - - -By default, when using QPainter, it draws in the natural coordinate -system of the device used. This means, if you draw a line along the horizontal -axis with a length of 10 units, it will be painted as a horizontal line -on the screen with a length of 10 pixels. However, QPainter can apply arbitrary -affine transformations before actually rendering shapes and curves. An -affine transformation maps the x and y coordinates linearly into x' and -y' according to - - - - - - - -The 3x3 matrix in this equation can be set with QPainter::setWorldMatrix() and -is of type QWMatrix. -Normally, this is the identity matrix, i.e. m11 and m22 are one, and the -other parameters are zero. There are basically three different groups of -transformations: - - - - - -Translations - -These move all points of an object by a fixed amount in -some direction. A translation matrix can be obtained by calling -method m.translate(dx, dy) for a QWMatrix. This corresponds to the -matrix - - - - - - - - - - -Scaling - -These stretch or shrink the coordinates of an object, making -it bigger or smaller without distorting it. A scaling transformation -can be applied to a QWMatrix by calling m.scale(sx, sy). This corresponds -to the matrix - - - - - - - - -By setting one of the parameters to a negative value, one can -achieve a mirroring of the coordinate system. - - - - - -Shearing - -A distortion of the coordinate system with two -parameters. A shearing transformation can be applied by calling -m.shear(sh, sv), corresponding to the matrix - - - - - - - - - - -Rotating - -This rotates an object. A rotation transformation can be -applied by calling m.rotate(alpha). Note that the angle has to be given -in degrees, not as mathematical angle! The corresponding matrix is - - - - - - - - -Note that a rotation is equivalent with a combination of -scaling and shearing. - - - - - - - -Here are some pictures that show the effect of the elementary -transformation to our masquot: - - - - - - - - - - - - - - - - - - - - -a) Normal -b) Rotated by 30 degrees -c) Sheared by 0.4 -d) Mirrored - - - - - - -Transformations can be combined by multiplying elementary matrices. Note that -matrix operations are not commutative in general, and therefore the combined -effect of of a concatenation depends on the order in which the matrices are -multiplied. - - - - - - -Setting stroking attributes - - -The rendering of lines, curves and outlines of polygons can be modified by -setting a special pen with QPainter::setPen(). The argument of this function is a -QPen object. The properties -stored in it are a style, a color, a join style and a cap style. - - - -The pen style is member of the enum -Qt::PenStyle. -and can take one of the following values: - - - - - - - -The join style is a member of the enum -Qt::PenJoinStyle. -It specifies how the junction between multiple lines which are attached to each -other is drawn. It takes one of the following values: - - - - - - - - - - - - - - - - - -a) MiterJoin -c) BevelJoin -b) RoundJoin - - - - - - -The cap style is a member of the enum -Qt::PenCapStyleand specifies how the end points of lines are drawn. It takes one of the values -from the following table: - - - - - - - - - - - - - - - - - -a) FlatCap -b) SquareCap -c) RoundCap - - - - - - - - - -Setting fill attributes - - -The fill style of polygons, circles or rectangles can be modified by setting -a special brush with QPainter::setBrush(). This function takes a -QBrush object as argument. -Brushes can be constructed in four different ways: - - - - -QBrush::QBrush() - This creates a brush that does not fill shapes. - - -QBrush::QBrush(BrushStyle) - This creates a black brush with one of the default -patterns shown below. - - -QBrush::QBrush(const QColor &, BrushStyle) - This creates a colored brush -with one of the patterns shown below. - - -QBrush::QBrush(const QColor &, const QPixmap) - This creates a colored -brush with the custom pattern you give as second parameter. - - - - -A default brush style is from the enum -Qt::BrushStyle. -Here is a picture of all predefined patterns: - - - - - - - -A further way to customize the brush behavior is to use the function -QPainter::setBrushOrigin(). - - - - - - -Color - - -Colors play a role both when stroking curves and when filling shapes. In Qt, -colors are represented by the class -QColor. Qt does not support -advanced graphics features like ICC color profiles and color correction. Colors -are usually constructed by specifying their red, green and blue components, as -the RGB model is the way pixels are composed of on a monitor. - - - -It is also possible to use hue, saturation and value. This HSV representation is -what you use in the Gtk color dialog, e.g. in GIMP. There, the hue corresponds -to the angle on the color wheel, while the saturation corresponds to the -distance from the center of the circle. The value can be chosen with a separate -slider. - - - - - - -Other settings - - -Normally, when you paint on a paint device, the pixels you draw replace those -that were there previously. This means, if you paint a certain region with -a red color and paint the same region with a blue color afterwards, only -the blue color will be visible. Qt's imaging model does not support -transparency, i.e. a way to blend the painted foreground with the background. -However, there is a simple way to combine background and foreground with -boolean operators. The method QPainter::setRasterOp() sets the used operator, -which comes from the enum -RasterOp. - - - -The default is CopyROP which ignores the background. Another popular choice is -XorROP. If you paint a black line with this operator on a colored image, then -the covered area will be inverted. This effect is for example used to create -the rubberband selections in image manipulation programs known as -"marching ants". - - - - - - -Drawing graphics primitives - - -In the following we list the elementary graphics elements supported by -QPainter. Most of them exist in several overloaded versions which take a -different number of arguments. For example, methods that deal with rectangles -usually either take a -QRect as argument or a set -of four integers. - - - - -Drawing a single point - drawPoint(). - - -Drawing lines - drawLine(), drawLineSegments() and drawPolyLine(). - - -Drawing and filling rectangles - drawRect(), drawRoundRect(), -fillRect() and eraseRect(). - - -Drawing and filling circles, ellipses and parts or them - -drawEllipse(), drawArc(), drawPie and drawChord(). - - -Drawing and filling general polygons - drawPolygon(). - - -Drawing bezier curves - drawQuadBezier() [drawCubicBezier in Qt 3.0]. - - - - - - - -Drawing pixmaps and images - - -Qt provides two very different classes to represent images. - - - -QPixmap directly corresponds -to the pixmap objects in X11. Pixmaps are server-side objects and may - on a -modern graphics card - even be stored directly in the card's memory. This makes -it very efficient to transfer pixmaps to the screen. Pixmaps also act as -an off-screen equivalent of widgets - the QPixmap class is a subclass of -QPaintDevice, so you can draw on it with a QPainter. Elementary drawing -operations are usually accelerated by modern graphics. Therefore, a common usage -pattern is to use pixmaps for double buffering. This means, instead of painting -directly on a widget, you paint on a temporary pixmap object and use the -bitBlt -function to transfer the pixmap to the widget. For complex repaints, this helps -to avoid flicker. - - - -In contrast, QImage objects -live on the client side. Their emphasis in on providing direct access to the -pixels of the image. This makes them of use for image manipulation, and things -like loading and saving to disk (QPixmap's load() method takes QImage as -intermediate step). On the other hand, painting an image on a widget is a -relatively expensive operation, as it implies a transfer to the X server, -which can take some time, especially for large images and for remote servers. -Depending on the color depth, the conversion from QImage to QPixmap may also -require dithering. - - - - - - -Drawing text - - -Text can be drawn with one of the overloaded variants of the method -QPainter::drawText(). These draw a QString either at a given point or in a given -rectangle, using the font set by QPainter::setFont(). There is also a parameter -which takes an ORed combination of some flags from the enums -Qt::AlignmentFlags -and -Qt::TextFlags - - - -Beginning with version 3.0, Qt takes care of the complete text layout even for -languages written from right to left. - - - -A more advanced way to display marked up text is the -QSimpleRichText -class. Objects of this class can be constructed with a piece of text using -a subset of the HTML tags, which is quite rich and provides even tables. -The text style can be customized by using a -QStyleSheet (the -documentation of the tags can also be found here). Once the rich text object has -been constructed, it can be rendered on a widget or another paint device with -the QSimpleRichText::draw() method. - - - - - - - - -Structured graphics with QCanvas - - -QPainter offers a powerful imaging model for painting on widgets and pixmaps. -However, it can also be cumbersome to use. Each time your widget receives -a paint event, it has to analyze the QPaintEvent::region() or -QPaintEvent::rect() which has to be redrawn. Then it has to setup a -QPainter and paint all objects which overlap with that region. For example, -image a vector graphics program which allows to drag objects like polygons, -circles and groups of them around. Each time those objects move a bit, the -widget's mouse event handler triggers a paint event for the whole area covered -by the objects in their old position and in their new position. Figuring -out the necessary redraws and doing them in an efficient way can be difficult, -and it may also conflict with the object-oriented structure of the program's -source code. - - - -As an alternative, Qt contains the class -QCanvas in which -you put graphical objects like polygons, text, pixmaps. You may also provide -additional items by subclassing -QCanvasItem or -one of its more specialized subclasses. A canvas can be shown on the screen by -one or more widgets of the class -QCanvasView which -you have to subclass in order to handle user interactions. Qt takes care of -all repaints of objects in the view, whether they are caused by the widget -being exposed, new objects being created or modified or other things. By using -double buffering, this can be done in an efficient and flicker-free way. - - - -Canvas items can overlap each other. In this case, the visible one depends on -the z order which can be assigned by QCanvasItem::setZ(). Items can also be -made visible or invisible. You can also provide a background to be drawn -"behind" all items and a foreground. For associating mouse events with objects, -in the canvas, there is the method QCanvas::collisions() which returns a list -of items overlapping with a given point. Here we show a screenshot of a canvas -view in action: - - - - - - - -Here, the mesh is drawn in the background. Furthermore, there is a -QCanvasText item and a violet QCanvasPolygon. The butterfly is a -QCanvasPixmap. It has transparent areas, so you can see the underlying -items through it. - - - -A tutorial on using QCanvas for writing sprite-based games can be -found here. - - - - - - -3D graphics with OpenGL - - -Low-level interface - - -The de facto standard for rendering 3D graphics today is -OpenGL. Implementations of this -specification come with Microsoft Windows, Mac OS X and XFree86 and often -support the hardware acceleration features offered by modern graphics cards. -OpenGL itself only deals with rendering on a specified area of the framebuffer -through a GL context and does not have any interactions -with the toolkit of the environment - - - -Qt offers the widget QGLWidget -which encapsulates a window with an associated GL context. Basically, you use it -by subclassing it and reimplementing some methods. - - - - - -Instead of reimplementing paintEvent() and using QPainter to draw the widget's -contents, you override paintGL() and use GL commands to render a scene. QLWidget -will take care of making its GL context the current one before paintGL() is -called, and it will flush afterwards. - - - -The virtual method initializeGL() is called once before the first time resizeGL() -or paintGL() are called. This can be used to construct display lists for objects, -and make any initializations. - - - -Instead of reimplementing resizeEvent(), you override resizeGL(). This can -be used to set the viewport appropriately. - - - -Instead of calling update() when the state of the scene has changed - for example -when you animate it with a timer -, you should call updateGL(). This will trigger -a repaint. - - - - - -In general, QGLWidget behaves just like any other widget, i.e. for example -you can process mouse events as usual, resize the widget and combine it with -others in a layout. - - - - - - - -Qt contains some examples of QGLWidget usage in its demo -example. A collection of tutorials can be found -here, -and more information and a reference of OpenGL is available on the -OpenGL homepage. - - - - - - -High-level interfaces - - -OpenGL is a relatively low-level interface for drawing 3D graphics. In the same -way QCanvas gives the programmer a higher-level interface which details with -objects and their properties, there are also high-level interfaces for 3D graphics. -One of the most popular is Open Inventor. Originally a technology developed by SGI, -there is today also the open source implementation -Coin, complemented by a toolkit binding to Qt -called SoQt. - - - -The basic concept of Open Inventor is that of a scene. -A scene can be loaded from disk and saved in a special format closely related -to VRML. A scene consists of a -collection of objects called nodes. Inventor already -provides a rich collection of reusable nodes, such as cubes, cylinders and -meshes, furthermore light sources, materials, cameras etc. Nodes are -represented by C++ classes and can be combined and subclassed. - - - -An introduction to Inventor can be found -here -(in general, you can substitute all mentions of SoXt by SoQt in this article). - - - - - - - - - - - -User interface - - -The action pattern - - - - - - - -Defining menus and toolbars in XML - - -Introduction - - -While the action pattern -allows to encapsulate actions triggered by the user in an object which can be -"plugged" somewhere in the menu bars or toolbars, it does not by itself solve -the problem of constructing the menus themselves. In particular, you have to -build all popup menus in C++ code and explicitly insert the actions in a -certain order, under consideration of the style guide for standard actions. -This makes it pretty difficult to allow the user to customize the menus or -change shortcuts to fit his needs, without changing the source code. - - - -This problem is solved by a set of classes called XMLGUI. -Basically, this separates actions (coded in C++) from their appearance in menu -bars and tool bars (coded in XML). Without modifying any source code, menus -can be simply customized by adjusting an XML file. Furthermore, it helps -to make sure that standard actions (such as -FileOpen -or HelpAbout) -appear in the locations suggested by the style guide. XMLGUI is especially -important for modular programs, where the items appearing in the menu bar may -come from many different plugins or parts. - - - -KDE's class for toplevel windows, -TDEMainWindow, -inherits -KXMLGUIClient -and therefore supports XMLGUI out of the box. All actions created within it must -have the client's actionCollection() as parent. A call to -createGUI() will then build the whole set of menu and tool -bars defined the applications XML file (conventionally with the suffix -ui.rc). - - - - - - -An example: Menu in KView - - -In the following, we take KDE's image view KView as -example. It has a ui.rc file named -kviewui.rc which is installed with the -Makefile.am snippet - - - -rcdir = $(kde_datadir)/kview -rc_DATA = kviewui.rc - - - -Here is an excerpt from the kviewui.rc file. For -simplicity, we show only the definition of the View menu. - - - -<!DOCTYPE kpartgui> -<kpartgui name="kview"> - <MenuBar> - <Menu name="view" > - <Action name="zoom50" /> - <Action name="zoom100" /> - <Action name="zoom200" /> - <Action name="zoomMaxpect" /> - <Separator/> - <Action name="fullscreen" /> - </Menu> - </MenuBar> -</kpartgui> - - - -The corresponding part of the setup in C++ is: - - - - KStdAction::zoomIn ( this, SLOT(slotZoomIn()), actionCollection() ); - KStdAction::zoomOut ( this, SLOT(slotZoomOut()), actionCollection() ); - KStdAction::zoom ( this, SLOT(slotZoom()), actionCollection() ); - new TDEAction ( i18n("&Half size"), ALT+Key_0, - this, SLOT(slotHalfSize()), - actionCollection(), "zoom50" ); - new TDEAction ( i18n("&Normal size"), ALT+Key_1, - this, SLOT(slotDoubleSize()), - actionCollection(), "zoom100" ); - new TDEAction ( i18n("&Double size"), ALT+Key_2, - this, SLOT(slotDoubleSize()), - actionCollection(), "zoom200" ); - new TDEAction ( i18n("&Fill Screen"), ALT+Key_3, - this, SLOT(slotFillScreen()), - actionCollection(), "zoomMaxpect" ); - new TDEAction ( i18n("Fullscreen &Mode"), CTRL+SHIFT+Key_F, - this, SLOT(slotFullScreen()), - actionCollection(), "fullscreen" ); - - - -The View menu resulting from this GUI definition looks like -in this screenshot: - - - - - - - -The XML file begins with a document type declaration. The DTD for kpartgui can -be found in the tdelibs sources in tdeui/kpartgui.dtd. The -outermost element of the file contains the instance name of the application as -attribute. It can also contain a version number in the form "version=2". This -is useful when you release new versions of an application with a changed menu -structure, e.g. with more features. If you bump up the version number of the -ui.rc file, KDE makes sure that any customized version of -the file is discarded and the new file is used instead. - - - -The next line, <MenuBar>, contains a declaration of a -menu bar. You can also insert any number of <ToolBar> -declarations in order to create some tool bars. The menu contains a submenu -with the name "view". This name is already predefined, and thus you see a -translated version of the word "View" in the screenshot. If you declare your -own submenus, you have to add the title explicitly. For example, -KView has a submenu with the title "Image" which is -declared as follows: - - - -<Menu name="image" > - <text>&amp;Image</text> - ... -</Menu> - - - -In KDE's automake framework, such titles are automatically extracted and put -into the application's .po -file , so it is considered by translators. Note that you have to write the -accelerator marker "&" in the form XML compliant form "&amp;". - - - -Let us come back to the example. KView's -View menu contains a couple of custom actions: -zoom50, zoom100, -zoom200, zoomMaxpect and -fullscreen, declared with a -<Action> element. The separator in the -screenshots corresponds to the <Separator> element. - - - -You will note that some menu items do not not have a corresponding element in -the XML file. These are standard actions. Standard -actions are created by the class -KStdAction. -When you create such actions in your application (such as in the C++ example -above), they will automatically be inserted in a prescribed position, and -possibly with an icon and a shortcut key. You can look up these locations in -the file tdeui/ui_standards.rc in the tdelibs sources. - - - - - - -An example: Toolbars in Konqueror - - -For the discussion of toolbars, we switch to -Konqueror's GUI definition. This excerpt defines -the location bar, which contains the input field for URLs. - - - -<ToolBar name="locationToolBar" fullWidth="true" newline="true" > - <text>Location Toolbar</text> - <Action name="clear_location" /> - <Action name="location_label" /> - <Action name="toolbar_url_combo" /> - <Action name="go_url" /> -</ToolBar> - - - -The first thing we notice is that there are a lot more attributes than for -menu bars. These include: - - - - - -fullWidth: Tells XMLGUI that the toolbar has the same width as the - toplevel window. Af this is "false", the toolbar only takes as much space as - necessary, and further toolbars are put in the same row. - - - -newline: This is related to the option above. If newline is "true", -the toolbar starts a new row. Otherwise it may be put in the row together -with the previous toolbar. - - - -noEdit: Normally toolbars can be customized by the user, -e.g. in SettingsConfigure -Toolbars in -Konqueror. Setting this option to "true" marks this -toolbar as not editable. This is important for toolbars which are filled with -items at runtime, e.g. Konqueror's bookmark toolbar. - - - -iconText: Tells XMLGUI to show the text of the action next to the -icon. Normally, the text is only shown as a tooltip when the mouse cursor -remains over the icon for a while. Possible values for this attribute are -"icononly" (shows only the icon), "textonly" (shows only the text), -"icontextright" (shows the text on the right side of the icon) and -"icontextbottom" (shows the text beneath the icon). - - - - -hidden: If this is "true", the toolbar is not visible initially -and must be activated by some menu item. - - - - -position: The default for this attribute is "top", meaning that the -toolbar is positioned under the menu bar. For programs with many tools, -such as graphics programs, it may be interesting to replace this with -"left", "right" or "bottom". - - - - - - - - -Dynamical menus - - -Obviously, an XML can only contain a static description of a user interface. -Often, there are menus which change at runtime. For example, -Konqueror's Location menu -contains a set of items Open with Foo with the -applications able to load a file with a given MIME type. Each time the -document shown changes, the list of menu items is updated. XMLGUI is prepared -to handle such cases with the notion of action lists. -An action list is declared as one item in the XML file, but consists of -several actions which are plugged into the menu at runtime. The above example -is implemented with the following declaration in -Konqueror's XML file: - - - -<Menu name="file"> - <text>&amp;Location</text> - ... - <ActionList name="openwith"> - ... -</Menu> - - - -The function KXMLGUIClient::plugActionList() is then used -to add actions to be displayed, whereas the function -KXMLGuiClient::unplugActionList() removes all -plugged actions. The routine responsible for updating looks as follows: - - - -void MainWindow::updateOpenWithActions() -{ - unplugActionList("openwith"); - openWithActions.clear(); - for ( /* iterate over the relevant services */ ) { - TDEAction *action = new TDEAction( ...); - openWithActions.append(action); - } - plugActionList("openwith", openWithActions); -} - - - -Note that in contrast to the static actions, the ones created here are -not constructed with the action collection as parent, and -you are responsible for deleting them for yourself. The simplest way to achievethis -is by using openWithActions.setAutoDelete(true) in the above -example. - - - - - - -Context menus - - -The examples above only contained cases where a main window's menubar and -toolbars were created. In the cases, the processes of constructing these -containers is completely hidden from you behind the -createGUI() call (except if you have custom containers). -However, there are cases, where you want to construct other containers and -populate them with GUI definitions from the XML file. One such example are -context menus. In order to get a pointer to a context menu, you have to -ask the client's factory for it: - - - -void MainWindow::popupRequested() -{ - QWidget *w = factory()->container("context_popup", this); - QPopupMenu *popup = static_cast<QPopupMenu *>(w); - popup->exec(QCursor::pos()); -} - - - -The method KXMLGUIFactory::container() used above looks -whether it finds a container in the XML file with the given name. Thus, a -possible definition could look as follows: - - - -... -<Menu name="context_popup"> - <Action name="file_add"/> - <Action name="file_remove"/> -</Menu> -... - - - - - - - - -Providing online help - - -Making a program easy and intuitive to use involves a wide range of -facilities which are usually called online help. Online help has several, -partially conflicting goals: on the one, it should give the user answers -to the question "How can I do a certain task?", on the other hand it -should help the user exploring the application and finding features he -doesn't yet know about. It is important to recognize that this can only -be achieved by offering several levels of help: - - - - - -Tooltips are tiny labels that pop up over user interface elements when -the mouse remains there longer. They are especially important for tool- -bars, where icons are not always sufficient to explain the purpose of -a button. - - - -"What's this?" help is usually a longer and richer explanation of a widget -or a menu item. It is also more clunky to use: In dialogs, it can be invoked -in two ways: either by pressing -ShiftF1 or by clicking -on the question mark in the title bar (where the support of the latter depends -on the window manager). The mouse pointer then turns into an arrow with a -question mark, and the help window appears when a user interfact element has -been clicked. "What's this?" help for menu items is usually activated by a -button in the toolbar which contains an arrow and a question mark. - - - -The problem with this approach is that the user can't see whether a widget -provides help or not. When the user activates the question mark button and -doesn't get any help window when clicking on a user interface element, he -will get frustrated very quickly. - - - -The advantage of "What's this?" help windows as provided by Qt and KDE is that -they can contain rich text, -i.e. the may contain different fonts, bold and italic text and even images and tables. - - - -An example of "What's this?" help: - - - - - - - - - -Finally, every program should have a manual. A manual is normally viewed in -KHelpCenter by activating the -Help menu. That means, a complete additional application -pops up and diverts the user from his work. Consequently, consulting the -manual should only be necessary if other facilities like tooltips and what's -this help are not sufficient. Of course, a manual has the advantage that it -does not explain single, isolated aspects of the user interface. Instead, it -can explain aspects of the application in a greater context. Manuals for KDE -are written using the DocBook markup -language. - - - - - -From the programmer's point of view, Qt provides an easy to use API for online -help. To assign a tooltip to widget, use the -QToolTip class. - - - -QToolTip::add(w, i18n("This widget does something.")) - - - -If the menu bars and tool bars are created using the -action pattern, the string used as tooltip is derived from the first argument -of the TDEAction constructor: - - - -action = new TDEAction(i18n("&Delete"), "editdelete", - SHIFT+Key_Delete, actionCollection(), "del") - - - -Here it is also possible to assign a text which is shown in the status bar when the -respective menu item is highlighted: - - - -action->setStatusText(i18n("Deletes the marked file")) - - - -The API for "What's this?' help is very similar. In dialogs, use the following -code: - - - -QWhatsThis::add(w, i18n("<qt>This demonstrates <b>Qt</b>'s" - " rich text engine.<ul>" - "<li>Foo</li>" - "<li>Bar</li>" - "</ul></qt>")) - - - -For menu items, use - - - -action->setWhatsThis(i18n("Deletes the marked file")) - - - -The invocation of KHelpCenter is encapsulated in the -TDEApplication -class. In order to show the manual of your application, just use - - - -kapp->invokeHelp() - - - -This displays the first page with the table of contents. When you want to -display only a certain section of the manual, you can give an additional -argument to invokeHelp() determining the anchor which -the browser jumps to. - - - - - - - - - -Components and services - - -KDE services - - -What are KDE services? - - -The notion of a service is a central concept in KDE's -modular architecture. There is no strict technical implementation connected -with this term - services can be plugins in the form of shared libraries, -or they can be programs controlled via DCOP. -By claiming to be of a certain service type, a service -promises to implement certain APIs or features. In C++ terms, one can think -of a service type as an abstract class, and a service as an implementation -of that interface. - - - -The advantage of this separation is clear: An application utilizing a service -type does not have to know about possible implementations of it. It just uses -the APIs associated with the service type. In this way, the used service can be -changed without affecting the application. Also, the user can configure which -services he prefers for certain features. - - - -Some examples: - - - - - -The HTML rendering engine used in Konqueror is an -embedable component that implements the service types -KParts/ReadOnlyPart and Browser/View. - - -In TDevelop HEAD, most functionality is packaged in -plugins with the service type TDevelop/Part. At startup, -all services with this type are loaded, such that you can extend the IDE in a -very flexible way. - - -In the icon view, Konqueror displays - if enabled - -thumbnail pictures of images, HTML pages, PDF and text files. This ability can -be extended. If you want it to display preview pictures of your own data files -with some MIME type, you can implement a service with service type -ThumbCreator. - - - - - -Obviously, a service is not only characterized by the service types it -implements, but also by some properties. For example, a -ThumbCreator does not only claim to implement the C++ class with the type -ThumbCreator, it also has a list of MIME types it is -responsible for. Similarly, TDevelop parts have the programming language they -support as a property. When an application requests a service type, it can -also list constraints on the properties of the service. In the above example, -when TDevelop loads the plugins for a Java project, it asks only for the -plugins which have Java as the programming language property. For this -purpose, KDE contains a full-blown CORBA-like trader with -a complex query language. - - - - - - -Defining service types - - -New service types are added by installing a description of them into the -directory TDEDIR/share/servicetypes. In an automake -framework, this can be done with this Makefile.am -snippet: - - - -kde_servicetypesdir_DATA = tdeveloppart.desktop -EXTRA_DIST = $(kde_servicetypesdir_DATA) - - - -The definition tdeveloppart.desktop of a -TDevelop part looks as follows: - - - -[Desktop Entry] -Type=ServiceType -X-TDE-ServiceType=TDevelop/Part -Name=TDevelop Part - -[PropertyDef::X-TDevelop-Scope] -Type=QString - -[PropertyDef::X-TDevelop-ProgrammingLanguages] -Type=QStringList - -[PropertyDef::X-TDevelop-Args] -Type=QString - - - -In addition to the usual entries, this example demonstrates how you declare -that a service has some properties. Each property definition corresponds -to a group [PropertyDef::name] in the configuration file. In -this group, the Type entry declares the type of the property. -Possible types are everything that can be stored in a -QVariant. - - - - - - -Defining shared library services - - -Service definitions are stored in the directory -TDEDIR/share/services: - - - -kde_servicesdir_DATA = kdevdoxygen.desktop -EXTRA_DIST = $(kde_servicesdir_DATA) - - - -The content of the following example file -tdevdoxygen.desktop defines the -KDevDoxygen plugin with the service type -TDevelop/Part: - - - -[Desktop Entry] -Type=Service -Comment=Doxygen -Name=KDevDoxygen -ServiceTypes=TDevelop/Part -X-TDE-Library=libtdevdoxygen -X-TDevelop-ProgrammingLanguages=C,C++,Java -X-TDevelop-Scope=Project - - - -In addition to the usual declarations, an important entry is -X-TDE-Library. This contains the name of the libtool -library (without the .la extension). It also fixes -(with the prefix init_ prepended) the name of the exported -symbol in the library which returns an object factory. For the above example, -the library must contain the following function: - - - -extern "C" { - void *init_libtdevdoxygen() - { - return new DoxygenFactory; - } -}; - - - -The type of the factory class DoxygenFactory depends on -the specific service type the service implements. In our example of a TDevelop -plugin, the factory must be a KDevFactory (which -inherits KLibFactory). More common examples are -KParts::Factory -which is supposed to produce -KParts::ReadOnlyPart -objects or in most cases the generic -KLibFactory. - - - - - - -Using shared library services - - -In order to use a shared library service in an application, you need to obtain a -KService object -representing it. This is discussed in the -section about MIME types (and in a section about the -trader to be written :-) - - - -With the KService object at hand, you can very simply -load the library and get a pointer to its factory object: - - - -KService *service = ... -QString libName = QFile::encodeName(service->library()); -KLibFactory *factory = KLibLoader::self()->factory(libName); -if (!factory) { - QString name = service->name(); - QString errorMessage = KLibLoader::self()->lastErrorMessage(); - KMessageBox::error(0, i18n("There was an error loading service %1.\n" - "The diagnostics from libtool is:\n%2") - .arg(name).arg(errorMessage); -} - - - -From this point, the further proceeding depends again on the service type. For -generic plugins, you create objects with the method -KLibFactory::create(). -For KParts, you must cast the factory pointer to the more specific KParts::Factory and use -its create() method: - - - -if (factory->inherits("KParts::Factory")) { - KParts::Factory *partFactory = static_cast<KParts::Factory*>(factory); - QObject *obj = partFactory->createPart(parentWidget, widgetName, - parent, name, "KParts::ReadOnlyPart"); - ... -} else { - cout << "Service does not implement the right factory" << endl; -} - - - - - - -Defining DCOP services - - -A DCOP service is usually implemented as a program that is started up when it is -needed. It then goes into a loop and listens for DCOP connections. The program -may be an interactive one, but it may also run completely or for a part of its -lifetime as a daemon in the background without the user noticing it. An example -for such a daemon is tdeio_uiserver, which implements user interaction -such as progress dialog for the TDEIO library. The advantage of such a centralized -daemon in this context is that e.g. the download progress for several different -files can be shown in one window, even if those downloads were initiated from -different applications. - - - -A DCOP service is defined differently from a shared library service. Of course, -it doesn't specify a library, but instead an executable. Also, DCOP services -do not specify a ServiceType line, because usually they are started by their -name. As additional properties, it contains two lines: - - - -X-DCOP-ServiceType specifies the way the service is -started. The value Unique says that the service must not be -started more than once. This means, if you try to start this service (e.g. via - -TDEApplication::startServiceByName(), KDE looks whether it is already -registered with DCOP and uses the running service. If it is not registered yet, -KDE will start it up and wait until is registered. Thus, you can immediately -send DCOP calls to the service. In such a case, the service should be implemented -as a -KUniqueApplication. - - - -The value Multi for X-DCOP-ServiceType says that multiple -instances of the service can coexist, so every attempt to start the service -will create another process. As a last possibility the value None -can be used. In this case, a start of the service will not wait until it -is registered with DCOP. - - - -X-TDE-StartupNotify should normally be set to false. Otherwise, when -the program is started, the task bar will show a startup notification, or, depending -on the user's settings, the cursor will be changed. - - - -Here is the definition of tdeio_uiserver: - - - -[Desktop Entry] -Type=Service -Name=tdeio_uiserver -Exec=tdeio_uiserver -X-DCOP-ServiceType=Unique -X-TDE-StartupNotify=false - - - - - - -Using DCOP services - - -A DCOP service is started with one of several methods in the TDEApplication -class: - - - -DCOPClient *client = kapp->dcopClient(); -client->attach(); -if (!client->isApplicationRegistered("tdeio_uiserver")) { - QString error; - if (TDEApplication::startServiceByName("tdeio_uiserver", QStringList(), &error)) - cout << "Starting kioserver failed with message " << error << endl; -} -... -QByteArray data, replyData; -QCString replyType; -QDataStream arg(data, IO_WriteOnly); -arg << true; -if (!client->call("tdeio_uiserver", "UIServer", "setListMode(bool)", - data, replyType, replyData)) - cout << "Call to tdeio_uiserver failed" << endl; -... - - - -Note that the example of a DCOP call given here uses explicit marshalling -of arguments. Often you will want to use a stub generated by dcopidl2cpp -instead, because it is much simpler and less error prone. - - - -In the example given here, the service was started "by name", i.e. the -first argument to TDEApplication::startServiceByName() is -the name is appearing in the Name line of the desktop -file. An alternative is to use -TDEApplication::startServiceByDesktopName(), which takes -the file name of its desktop file as argument, i.e. in this case -"tdeio_uiserver.desktop". - - - -All these calls take a list of URLs as a second argument, which is given -to the service on the command line. The third argument is a pointer to a -QString. If starting the service fails, this argument -is set to a translated error message. - - - - - - - - -MIME types - - -What are MIME types? - - -MIME types are used to describe the content type of files or data -chunks. Originally they were introduced in order to allow sending around image -or sound files etc. by e-mail (MIME stands for "Multipurpose Internet Mail -Extensions"). Later this system was also used by web browsers to determine how -to present data sent by a web server to the user. For example, an HTML page -has a MIME type "text/html", a postscript file "application/postscript". In -KDE, this concept is used at a variety of places: - - - - - -In Konqueror's icon view, files are represented by -icons. Each MIME type has a certain associated icon shown here. - - - -When you click onto a file icon or a file name in -Konqueror, either the file is shown in an embedded -view, or an application associated with the file type is opened. - - - -When you drag and drop some data from one application to another (or -within the same application), the drop target may choose to accept only -certain data types. Furthermore, it will handle image data different -from textual data. - - - -Clipboard data has a MIME type. Traditionally, X programs only handle -pixmaps or texts, but with Qt, there are no restrictions on the data type. - - - - - -From the above examples, it is clear that MIME handling is a complex issue. -First, it is necessary to establish a mapping from file names to MIME types. -KDE goes one step further in allowing even file contents to be mapped to -MIME types, for cases in which the file name is not available. Second, it -is necessary to map MIME types to applications or libraries which can view -or edit a file with a certain type, or create a thumbnail picture for it. - - - -There is a variety of APIs to figure out the MIME type of data or files. In -general, there is a certain speed/reliability trade-off you have to make. You -can find out the type of a file by examining only its file name (i.e. in most -cases the file name extension). For example, a file -foo.jpg is normally "image/jpeg". In cases where the -extension is stripped off this is not safe, and you actually have to look at -the contents of the file. This is of course slower, in particular for files -that have to be downloaded via HTTP first. The content-based method is based -on the file TDEDIR/share/mimelnk/magic and therefore -difficult to extend. But in general, MIME type information can easily be made -available to the system by installing a .desktop file, and -it is efficiently and conveniently available through the KDE libraries. - - - - - - -Defining MIME types - - -Let us define a type "application/x-foo" for our new -foobar program. To this end, you have to write a -file foo.desktop and install it into -TDEDIR/share/mimelnk/application. (This is the usual -location, which may differ between distributions). This can be done by adding -this to the Makefile.am: - - - -mimedir = $(kde_mimedir)/application -mime_DATA = foo.desktop -EXTRA_DIST = $(mime_DATA) - - - -The file foo.desktop should look as follows: - - - -[Desktop Entry] -Type=MimeType -MimeType=application/x-foo -Icon=fooicon -Patterns=*.foo; -DefaultApp=foobar -Comment=Foo Data File -Comment[de]=Foo Datei - - - -The "Comment" entry is supposed to be translated. Since the -.desktop file specifies an icon, you should also install -an icon fooicon.png, which represents the file e.g. in -Konqueror. - - - -In the KDE libraries, such a type definition is mapped to an instance of the -class KMimeType. -Use this like in the following example: - - - -KMimeType::Ptr type = KMimeType::mimeType("application/x-foo"); -cout << "Type: " << type->name() < endl; -cout << "Icon: " << type->icon() < endl; -cout << "Comment: " << type->icon() < endl; -QStringList patterns = type->patterns(); -QStringList::ConstIterator it; -for (it = patterns.begin(); it != patterns.end(); ++it) - cout << "Pattern: " << (*it) << endl; - - - - - - -Determining the MIME type of data - - -The fast method for determining the type of a file is -KMimeType::findByURL(). This looks for the URL string and -in most cases determines the type from the extension. For certain protocols -(e.g. http, man, info), this mechanism is not used. For example, CGI scripts -on web servers written in Perl often have the extension -.pl, which would indicate a -"text/x-perl" type. However, we file delivered by the -server is the output of this script, which is normally HTML. For such a case, -KMimeType::findByURL() returns the MIME type -"application/octet-stream" (available through -KMimeType::defaultMimeType()), which indicates a failure -to find out the type. - - - -KMimeType::Ptr type = KMimeType::findByURL("/home/bernd/foobar.jpg"); -if (type->name() == KMimeType::defaultMimeType()) - cout << "Could not find out type" << endl; -else - cout << "Type: " << type->name() << endl; - - - -(this method has some more arguments, but these are undocumented, so simply -forget about them.) - - - -You may want to find out a MIME from the contents of file instead of -the file name. This is more reliable, but also slower, as it requires -reading a part of the file. This is done with the -KMimeMagic -class, which has different error handling: - - - -KMimeMagicResult *result = KMimeMagic::self()->findFileType("/home/bernd/foobar.jpg"); -if (!result || !result->isValid()) - cout << "Could not find out type" << endl; -else - cout << "Type: " << result->mimeType() << endl; - - - -As a variant of this function, you can also determine the type of a memory -chunk. This is e.g. used in Kate in order to find -out the highlighting mode: - - - -QByteArray array; -... -KMimeMagicResult *result = KMimeMagic::self()->findBufferType(array); -if (!result || !result->isValid()) - cout << "Could not find out type" << endl; -else - cout << "Type: " << result->mimeType() << endl; - - - -Of course, even KMimeMagic is only able to determine a file type from the -contents of a local file. For remote files, there is a further possibility: - - - -KURL url("http://developer.kde.org/favicon.ico"); -QString type = TDEIO::NetAccess::mimetype(url); -if (type == KMimeType::defaultMimeType()) - cout << "Could not find out type" << endl; -else - cout << "Type: " << type << endl; - - - -This starts a TDEIO job to download a part of the file and check this. -Note that this function is perhaps quite slow and blocks the program. Normally -you will only want to use this if KMimeType::findByURL() -has returned "application/octet-stream". - - - -On the other hand, if you do not want to block your application, you can also -explicitly start the TDEIO job and connect to some of its signals: - - - -void FooClass::findType() -{ - KURL url("http://developer.kde.org/favicon.ico"); - TDEIO::MimetypeJob *job = TDEIO::mimetype(url); - connect( job, SIGNAL(result(TDEIO::Job*)), - this, SLOT(mimeResult(TDEIO::Job*)) ); -} - -void FooClass::mimeResult(TDEIO::Job *job) -{ - if (job->error()) - job->showErrorDialog(); - else - cout << "MIME type: " << ((TDEIO::MimetypeJob *)job)->mimetype() << endl; -} - - - - - - -Mapping a MIME type to an application or service - - -When an application is installed, it installs a .desktop -file which contains a list of MIME types this application can load. Similarly, -components like KParts make this information available by their service -.desktop files. So in general, there are several programs -and components which can process a given MIME type. You can obtain such a list -from the class KServiceTypeProfile: - - - -KService::OfferList offers = KServiceTypeProfile::offers("text/html", "Application"); -KService::OfferList::ConstIterator it; -for (it = offers.begin(); it != offers.end(); ++it) { - KService::Ptr service = (*it); - cout << "Name: " << service->name() << endl; -} - - - -The return value of this function is a list of service offers. A -KServiceOffer object packages a KService::Ptr together -with a preference number. The list returned by -KServiceTypeProfile::offers() is ordered by the user's -preference. The user can change this by calling "keditfiletype -text/html" or choosing Edit File Type on -Konqueror's context menu on a HTML file. - - - -In the above example, an offer list of the applications supporting -text/html was requested. This will - among others - contain -HTML editors like Quanta Plus. You can also replace -the second argument "Application" by -"KParts::ReadOnlyPart". In that case, you get a list of -embedable components for presenting HTML content, for example TDEHTML. - - - -In most cases, you are not interested in the list of all service offers -for a combination of MIME type and service type. There is a convenience -function which gives you only the service offer with the highest preference: - - - -KService::Ptr offer = KServiceTypeProfile::preferredService("text/html", "Application"); -if (offer) - cout << "Name: " << service->name() << endl; -else - cout << "No appropriate service found" << endl; - - - -For even more complex queries, there is a full-blown CORBA-like -trader. - - - -In order to run an application service with some URLs, use -KRun: - - - -KURL::List urlList; -urlList << "http://www.ietf.org/rfc/rfc1341.txt?number=1341"; -urlList << "http://www.ietf.org/rfc/rfc2046.txt?number=2046"; -KRun::run(offer.service(), urlList); - - - - - - -Miscellaneous - - -In this section, we want to list some APIs which are loosely related -to the previous discussion. - - - -Getting an icon for a URL. This looks for the type of the URL -and returns the associated icon. - - - -KURL url("ftp://ftp.kde.org/pub/incoming/wibble.c"); -QString icon = KMimeType::iconForURL(url); - - - -Running a URL. This looks for the type of the URL and starts the -user's preferred program associated with this type. - - - -KURL url("http://dot.kde.org"); -new KRun(url); - - - - - - - - -Network transparency - - -Introduction - - -In the age of the world wide web, it is of essential importance that desktop -applications can access resources over the internet: they should be able to -download files from a web server, write files to an ftp server or read mails -from a web server. Often, the ability to access files regardless of their -location is called network transparency. - - - -In the past, different approaches to this goals were implemented. The old NFS -file system is an attempt to implement network transparency on the level of -the POSIX API. While this approach works quite well in local, closely coupled -networks, it does not scale for resources to which access is unreliable and -possibly slow. Here, asynchronicity is important. While -you are waiting for your web browser to download a page, the user interface -should not block. Also, the page rendering should not begin when the page is -completely available, but should updated regularly as data comes in. - - - -In the KDE libraries, network transparency is implemented in the TDEIO API. The -central concept of this architecture is an IO job. A job -may copy, or delete files or similar things. Once a job is started, it works -in the background and does not block the application. Any communication from -the job back to the application - like delivering data or progress information -- is done integrated with the Qt event loop. - - - -Background operation is achieved by starting ioslaves to -perform certain tasks. ioslaves are started as separate processes and are -communicated with through UNIX domain sockets. In this way, no multi-threading -is necessary and unstable slaves can not crash the application that uses them. - - - -File locations are expressed by the widely used URLs. But in KDE, URLs do not -only expand the range of addressable files beyond the local file system. It -also goes in the opposite direction - e.g. you can browse into tar archives. -This is achieved by nesting URLs. For example, a file in a tar archive on -a http server could have the URL - - - -http://www-com.physik.hu-berlin.de/~bernd/article.tgz#tar:/paper.tex - - - - - - -Using TDEIO - - -In most cases, jobs are created by calling functions in the TDEIO namespace. -These functions take one or two URLs as arguments, and possible other -necessary parameters. When the job is finished, it emits the signal -result(TDEIO::Job*). After this signal has been emitted, the job -deletes itself. Thus, a typical use case will look like this: - - - -void FooClass::makeDirectory() -{ - SimpleJob *job = TDEIO::mkdir(KURL("file:/home/bernd/tdeiodir")); - connect( job, SIGNAL(result(TDEIO::Job*)), - this, SLOT(mkdirResult(TDEIO::Job*)) ); -} - -void FooClass::mkdirResult(TDEIO::Job *job) -{ - if (job->error()) - job->showErrorDialog(); - else - cout << "mkdir went fine" << endl; -} - - - -Depending on the type of the job, you may connect also to other -signals. - - - -Here is an overview over the possible functions: - - - - -TDEIO::mkdir(const KURL &url, int permission) - -Creates a directory, optionally with certain permissions. - - - -TDEIO::rmdir(const KURL &url) - -Removes a directory. - - - -TDEIO::chmod(const KURL &url, int permissions) - -Changes the permissions of a file. - - - -TDEIO::rename(const KURL &src, const KURL &dest, - bool overwrite) - -Renames a file. - - - -TDEIO::symlink(const QString &target, const KURL &dest, - bool overwrite, bool showProgressInfo) - -Creates a symbolic link. - - - -TDEIO::stat(const KURL &url, bool showProgressInfo) - -Finds out certain information about the file, such as size, modification -time and permissions. The information can be obtained from -TDEIO::StatJob::statResult() after the job has finished. - - - -TDEIO::get(const KURL &url, bool reload, bool showProgressInfo) - -Transfers data from a URL. - - - -TDEIO::put(const KURL &url, int permissions, bool overwrite, - bool resume, bool showProgressInfo) - -Transfers data to a URL. - - - -TDEIO::http_post(const KURL &url, const QByteArray &data, - bool showProgressInfo) -Posts data. Special for HTTP. - - - -TDEIO::mimetype(const KURL &url, bool showProgressInfo) - -Tries to find the MIME type of the URL. The type can be obtained from -TDEIO::MimetypeJob::mimetype() after the job has finished. - - - -TDEIO::file_copy(const KURL &src, const KURL &dest, int permissions, - bool overwrite, bool resume, bool showProgressInfo) - -Copies a single file. - - - -TDEIO::file_move(const KURL &src, const KURL &dest, int permissions, - bool overwrite, bool resume, bool showProgressInfo) - -Renames or moves a single file. - - - -TDEIO::file_delete(const KURL &url, bool showProgressInfo) - -Deletes a single file. - - - -TDEIO::listDir(const KURL &url, bool showProgressInfo) - -Lists the contents of a directory. Each time some new entries are known, the -signal TDEIO::ListJob::entries() is emitted. - - - -TDEIO::listRecursive(const KURL &url, bool showProgressInfo) - -Similar to the listDir() function, but this one is recursive. - - - -TDEIO::copy(const KURL &src, const KURL &dest, bool showProgressInfo) - -Copies a file or directory. Directories are copied recursively. - - - -TDEIO::move(const KURL &src, const KURL &dest, bool showProgressInfo) - -Moves or renames a file or directory. - - - -TDEIO::del(const KURL &src, bool shred, bool showProgressInfo) - -Deletes a file or directory. - - - - - - - - - -Directory entries - - -Both the TDEIO::stat() and TDEIO::listDir() jobs return their results as a type -UDSEntry, UDSEntryList resp. The latter is defined as QValueList<UDSEntry>. -The acronym UDS stands for "Universal directory service". The principle behind -it is that the a directory entry only carries the information which an ioslave -can provide, not more. For example, the http slave does not provide any -information about access permissions or file owners. -Instead, a UDSEntry is a list of UDSAtoms. Each atom provides a specific piece -of information. It consists of a type stored in m_uds and either an integer -value in m_long or a string value in m_str, depending on the type. - - - -The following types are currently defined: - - - - - -UDS_SIZE (integer) - Size of the file. - - - -UDS_USER (string) - User owning the file. - - - -UDS_GROUP (string) - Group owning the file. - - - -UDS_NAME (string) - File name. - - - -UDS_ACCESS (integer) - Permission rights of the file, as e.g. stored -by the libc function stat() in the st_mode field. - - - -UDS_FILE_TYPE (integer) - The file type, as e.g. stored by stat() in the -st_mode field. Therefore you can use the usual libc macros like S_ISDIR to -test this value. Note that the data provided by ioslaves corresponds to -stat(), not lstat(), i.e. in case of symbolic links, the file type here is -the type of the file pointed to by the link, not the link itself. - - - -UDS_LINK_DEST (string) - In case of a symbolic link, the name of the file -pointed to. - - - -UDS_MODIFICATION_TIME (integer) - The time (as in the type time_t) when the -file was last modified, as e.g. stored by stat() in the st_mtime field. - - - -UDS_ACCESS_TIME (integer) - The time when the file was last accessed, as -e.g. stored by stat() in the st_atime field. - - - -UDS_CREATION_TIME (integer) - The time when the file was created, as e.g. -stored by stat() in the st_ctime field. - - - -UDS_URL (string) - Provides a URL of a file, if it is not simply the -the concatenation of directory URL and file name. - - - -UDS_MIME_TYPE (string) - MIME type of the file - - - -UDS_GUESSED_MIME_TYPE (string) - MIME type of the file as guessed by the -slave. The difference to the previous type is that the one provided here -should not be taken as reliable (because determining it in a reliable way -would be too expensive). For example, the KRun class explicitly checks the -MIME type if it does not have reliable information. - - - - - -Although the way of storing information about files in a -UDSEntry is flexible and practical from the ioslave -point of view, it is a mess to use for the application programmer. For -example, in order to find out the MIME type of the file, you have to iterate -over all atoms and test whether m_uds is -UDS_MIME_TYPE. Fortunately, there is an API which is a lot -easier to use: the class KFileItem. - - - - - - -Synchronous usage - - -Often, the asynchronous API of TDEIO is too complex to use and therefore -implementing full asynchronicity is not a priority. For example, in a program -that can only handle one document file at a time, there is little that can be -done while the program is downloading a file anyway. For these simple cases, -there is a mucher simpler API in the form of a set of static functions in -TDEIO::NetAccess. For example, in order to copy a file, use - - - -KURL source, target; -source = ...; -target = ... -TDEIO::NetAccess::copy(source, target); - - - -The function will return after the complete copying process has finished. Still, -this method provides a progress dialog, and it makes sure that the application -processes repaint events. - - - -A particularly interesting combination of functions is -download() in combination with -removeTempFile(). The former downloads a file from given -URL and stores it in a temporary file with a unique name. The name is stored -in the second argument. If the URL is local, the file is -not downloaded, and instead the second argument is set to the local file -name. The function removeTempFile() deletes the file -given by its argument if the file is the result of a former download. If that -is not the case, it does nothing. Thus, a very easy to use way of loading -files regardless of their location is the following code snippet: - - - -KURL url; -url = ...; -QString tempFile; -if (TDEIO::NetAccess::download(url, tempFile) { - // load the file with the name tempFile - TDEIO::NetAccess::removeTempFile(tempFile); -} - - - - - - -Meta data - - -As can be seen above, the interface to IO jobs is quite abstract and does not -consider any exchange of information between application and IO slave that -is protocol specific. This is not always appropriate. For example, you may give -certain parameters to the HTTP slave to control its caching behavior or -send a bunch of cookies with the request. For this need, the concept of meta -data has been introduced. When a job is created, you can configure it by adding -meta data to it. Each item of meta data consists of a key/value pair. For -example, in order to prevent the HTTP slave from loading a web page from its -cache, you can use: - - - -void FooClass::reloadPage() -{ - KURL url("http://www.kdevelop.org/index.html"); - TDEIO::TransferJob *job = TDEIO::get(url, true, false); - job->addMetaData("cache", "reload"); - ... -} - - - -The same technique is used in the other direction, i.e. for communication from -the slave to the application. The method -Job::queryMetaData() asks for the value of the certain -key delivered by the slave. For the HTTP slave, one such example is the key -"modified", which contains a (stringified representation of) -the date when the web page was last modified. An example how you can use this -is the following: - - - -void FooClass::printModifiedDate() -{ - KURL url("http://developer.kde.org/documentation/kde2arch/index.html"); - TDEIO::TransferJob *job = TDEIO::get(url, true, false); - connect( job, SIGNAL(result(TDEIO::Job*)), - this, SLOT(transferResult(TDEIO::Job*)) ); -} - -void FooClass::transferResult(TDEIO::Job *job) -{ - QString mimetype; - if (job->error()) - job->showErrorDialog(); - else { - TDEIO::TransferJob *transferJob = (TDEIO::TransferJob*) job; - QString modified = transferJob->queryMetaData("modified"); - cout << "Last modified: " << modified << endl; -} - - - - - - -Scheduling - - -When using the TDEIO API, you usually do not have to cope with the details of -starting IO slaves and communicating with them. The normal use case is to -start a job and with some parameters and handle the signals the jobs emits. - - - -Behind the curtains, the scenario is a lot more complicated. When you create a -job, it is put in a queue. When the application goes back to the event loop, -TDEIO allocates slave processes for the jobs in the queue. For the first jobs -started, this is trivial: an IO slave for the appropriate protocol is started. -However, after the job (like a download from an http server) has finished, it -is not immediately killed. Instead, it is put in a pool of idle slaves and -killed after a certain time of inactivity (current 3 minutes). If a new request -for the same protocol and host arrives, the slave is reused. The obvious -advantage is that for a series of jobs for the same host, the cost for creating -new processes and possibly going through an authentication handshake is saved. - - - -Of course, reusing is only possible when the existing slave has already finished -its previous job. when a new request arrives while an existing slave process is -still running, a new process must be started and used. In the API usage in the -examples above, there are no limitation for creating new slave processes: if you -start a consecutive series of downloads for 20 different files, then TDEIO will -start 20 slave processes. This scheme of assigning slaves to jobs is called -direct. It not always the most appropriate scheme, as it -may need much memory and put a high load on both the client and server machines. - - - -So there is a different way. You can schedule jobs. If -you do this, only a limited number (currently 3) of slave processes for a -protocol will be created. If you create more jobs than that, they are put in a -queue and are processed when a slave process becomes idle. This is done as -follows: - - - -KURL url("http://developer.kde.org/documentation/kde2arch/index.html"); -TDEIO::TransferJob *job = TDEIO::get(url, true, false); -TDEIO::Scheduler::scheduleJob(job); - - - -A third possibility is connection oriented. For example, -for the IMAP slave, it does not make any sense to start multiple processes for -the same server. Only one IMAP connection at a time should be enforced. In -this case, the application must explicitly deal with the notion of a slave. It -has to deallocate a slave for a certain connection and then assign all jobs -which should go through the same connection to the same slave. This can again -be easily achieved by using the TDEIO::Scheduler: - - - -KURL baseUrl("imap://bernd@albert.physik.hu-berlin.de"); -TDEIO::Slave *slave = TDEIO::Scheduler::getConnectedSlave(baseUrl); - -TDEIO::TransferJob *job1 = TDEIO::get(KURL(baseUrl, "/INBOX;UID=79374")); -TDEIO::Scheduler::assignJobToSlave(slave, job1); - -TDEIO::TransferJob *job2 = TDEIO::get(KURL(baseUrl, "/INBOX;UID=86793")); -TDEIO::Scheduler::assignJobToSlave(slave, job2); - -... - -TDEIO::Scheduler::disconnectSlave(slave); - - - -You may only disconnect the slave after all jobs assigned to it are guaranteed -to be finished. - - - - - - -Defining an ioslave - - -In the following we discuss how you can add a new ioslave to the system. -In analogy to services, new ioslaves are advertised to the system by -installing a little configuration file. The following Makefile.am -snippet installs the ftp protocol: - - - -protocoldir = $(kde_servicesdir) -protocol_DATA = ftp.protocol -EXTRA_DIST = $(mime_DATA) - - - -The contents of the file ftp.protocol is as follows: - - - -[Protocol] -exec=tdeio_ftp -protocol=ftp -input=none -output=filesystem -listing=Name,Type,Size,Date,Access,Owner,Group,Link, -reading=true -writing=true -makedir=true -deleting=true -Icon=ftp - - - -The "protocol" entry defines for which protocol this slave -is responsible. "exec" is (in contrast what you would -expect naively) the name of the library that implements the slave. When the -slave is supposed to start, the "tdeinit" executable is -started which in turn loads this library into its address space. So in -practice, you can think of the running slave as a separate process although it -is implemented as library. The advantage of this mechanism is that it saves a -lot of memory and reduces the time needed by the runtime linker. - - - -The "input" and "output" lines are not used currently. - - - -The remaining lines in the .protocol file define which -abilities the slave has. In general, the features a slave must implement are -much simpler than the features the TDEIO API provides for the application. The -reason for this is that complex jobs are scheduled to a couple of subjobs. For -example, in order to list a directory recursively, one job will be started for -the toplevel directory. Then for each subdirectory reported back, new subjobs -are started. A scheduler in TDEIO makes sure that not too many jobs are active -at the same time. Similarly, in order to copy a file within a protocol that -does not support copying directly (like the ftp: protocol), -TDEIO can read the source file and then write the data to the destination -file. For this to work, the .protocol must advertise the -actions its slave supports. - - - -Since slaves are loaded as shared libraries, but constitute standalone programs, -their code framework looks a bit different from normal shared library plugins. -The function which is called to start the slave is called -kdemain(). This function does some initializations and -then goes into an event loop and waits for requests by the application using -it. This looks as follows: - - - -extern "C" { int kdemain(int argc, char **argv); } - -int kdemain(int argc, char **argv) -{ - TDELocale::setMainCatalogue("tdelibs"); - TDEInstance instance("tdeio_ftp"); - (void) TDEGlobal::locale(); - - if (argc != 4) { - fprintf(stderr, "Usage: tdeio_ftp protocol " - "domain-socket1 domain-socket2\n"); - exit(-1); - } - - FtpSlave slave(argv[2], argv[3]); - slave.dispatchLoop(); - return 0; -} - - - - - - -Implementing an ioslave - - -Slaves are implemented as subclasses of TDEIO::SlaveBase -(FtpSlave in the above example). Thus, the actions listed in the -.protocol correspond to certain virtual functions in -TDEIO::SlaveBase the slave implementation must -reimplement. Here is a list of possible actions and the corresponding virtual -functions: - - - - -reading - Reads data from a URL -void get(const KURL &url) - -writing - Writes data to a URL and create the file if it does not exist yet. -void put(const KURL &url, int permissions, bool overwrite, bool resume) - -moving - Renames a file. -void rename(const KURL &src, const KURL &dest, bool overwrite) - -deleting - Deletes a file or directory. -void del(const KURL &url, bool isFile) - -listing - Lists the contents of a directory. -void listDir(const KURL &url) - -makedir - Creates a directory. -void mkdir(const KURL &url, int permissions) - - - - -Additionally, there are reimplementable functions not listed in the .protocol -file. For these operations, TDEIO automatically determines whether they are supported -or not (i.e. the default implementation returns an error). - - - - -Delivers information about a file, similar to the C function stat(). -void stat(const KURL &url) - -Changes the access permissions of a file. -void chmod(const KURL &url, int permissions) - -Determines the MIME type of a file. -void mimetype(const KURL &url) - -Copies a file. -copy(const KURL &url, const KURL &dest, int permissions, bool overwrite) - -Creates a symbolic link. -void symlink(const QString &target, const KURL &dest, bool overwrite) - - - - -All these implementation should end with one of two calls: If the operation -was successful, they should call finished(). If an error has occurred, -error() should be called with an error code as first argument and a -string in the second. Possible error codes are listed as enum -TDEIO::Error. The second argument is usually the URL in -question. It is used e.g. in TDEIO::Job::showErrorDialog() -in order to parameterize the human-readable error message. - - - -For slaves that correspond to network protocols, it might be interesting to -reimplement the method SlaveBase::setHost(). This is -called to tell the slave process about the host and port, and the user name -and password to log in. In general, meta data set by the application can be -queried by SlaveBase::metaData(). You can check for the -existence of meta data of a certain key with -SlaveBase::hasMetaData(). - - - - - - -Communicating back to the application - - -Various actions implemented in a slave need some way to communicate data back -to the application using the slave process: - - - - - -get() sends blocks of data. This is done with -data(), which takes a QByteArray -as argument. Of course, you do not need to send all data at once. If you send -a large file, call data() with smaller data blocks, so -the application can process them. Call finished() when -the transfer is finished. - - - -listDir() reports information about the entries of a -directory. For this purpose, call listEntries() with a -TDEIO::UDSEntryList as argument. Analogously to -data(), you can call this several times. When you are -finished, call listEntry() with the second argument set -to true. You may also call totalSize() to report the -total number of directory entries, if known. - - - -stat() reports information about a file like size, MIME -type, etc. Such information is packaged in a -TDEIO::UDSEntry, which will be discussed below. Use -statEntry() to send such an item to the application. - - - -mimetype() calls mimeType() with a -string argument. - - - -get() and copy() may want to provide -progress information. This is done with the methods -totalSize(), processedSize(), -speed(). The total size and processed size are reported -as bytes, the speed as bytes per second. - - - -You can send arbitrary key/value pairs of meta data with -setMetaData(). - - - - - - - - -Interacting with the user - - -Sometimes a slave has to interact with the user. Examples include informational -messages, authentication dialogs and confirmation dialogs when a file is about -to be overwritten. - - - - - -infoMessage() - This is for informational feedback, such -as the message "Retrieving data from <host>" from the http slave, which -is often displayed in the status bar of the program. On the application side, -this method corresponds to the signal -TDEIO::Job::infoMessage(). - - - -warning() - Displays a warning in a message box with -KMessageBox::information(). If a message box is still -open from a former call of warning() from the same slave process, nothing -happens. - - - -messageBox() - This is richer than the previous -method. It allows to open a message box with text and caption and some -buttons. See the enum SlaveBase::MessageBoxType for reference. - - - -openPassDlg() - Opens a dialog for the input of user name -and password. - - - - - - - - - - - - - -Licensing - -&underFDL; -&underGPL; - - - -
diff --git a/doc/tdevassistant/CMakeLists.txt b/doc/tdevassistant/CMakeLists.txt deleted file mode 100644 index caa4d7b8..00000000 --- a/doc/tdevassistant/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -################################################# -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -tde_create_handbook( DESTINATION tdevassistant ) diff --git a/doc/tdevassistant/index.docbook b/doc/tdevassistant/index.docbook deleted file mode 100644 index 065276f9..00000000 --- a/doc/tdevassistant/index.docbook +++ /dev/null @@ -1,65 +0,0 @@ - -TDevAssistant"> - - - -]> - - - - - -
-The &tdevassistant; Handbook - - -The &tdevassistant; Handbook - - -&tde-authors; - - - -&tde-release-version; -Reviewed: &tde-release-date; - - -&tde-copyright-date; -&tde-team; - - - - - - -&tdevassistant; is a development documentation viewer for &tde;. - - - - -TDE - - - - - -We Apologize -No documentation has yet been written for &tdevassistant;. - -If you need help, please check The &tde; -web site, submit questions to the -&tde; mail lists, or file a bug report at the -&tde; bug tracker. - -If you are interested in helping, please consider writing the help file. -Submitting a basic text file is acceptable as the &tde-team; will convert the text. - -Thank you for helping and thank you for your patience. - -&underFDL; - - - -&documentation.index; -
diff --git a/doc/tdevdesigner/CMakeLists.txt b/doc/tdevdesigner/CMakeLists.txt deleted file mode 100644 index d8d93cbb..00000000 --- a/doc/tdevdesigner/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -################################################# -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -tde_create_handbook( DESTINATION tdevdesigner ) diff --git a/doc/tdevdesigner/index.docbook b/doc/tdevdesigner/index.docbook deleted file mode 100644 index 3bfdf384..00000000 --- a/doc/tdevdesigner/index.docbook +++ /dev/null @@ -1,65 +0,0 @@ - -TDevDesigner"> - - - -]> - - - - - -
-The &tdevdesigner; Handbook - - -The &tdevdesigner; Handbook - - -&tde-authors; - - - -&tde-release-version; -Reviewed: &tde-release-date; - - -&tde-copyright-date; -&tde-team; - - - - - - -&tdevdesigner; is a GUI designer environment for &tde;. - - - - -TDE - - - - - -We Apologize -No documentation has yet been written for &tdevdesigner;. - -If you need help, please check The &tde; -web site, submit questions to the -&tde; mail lists, or file a bug report at the -&tde; bug tracker. - -If you are interested in helping, please consider writing the help file. -Submitting a basic text file is acceptable as the &tde-team; will convert the text. - -Thank you for helping and thank you for your patience. - -&underFDL; - - - -&documentation.index; -
diff --git a/doc/tdevelop/app-files.docbook b/doc/tdevelop/app-files.docbook index 736baf16..547010ec 100644 --- a/doc/tdevelop/app-files.docbook +++ b/doc/tdevelop/app-files.docbook @@ -56,7 +56,7 @@ Most &tdevelop; features are provided by KParts. These are basically application -There are quite a lot of default configuration subdirectories in $TDEDIR/share/apps/ whose names all start with a tdev sequence. Most of them are for &tdevelop; internal use only. They might be deliberately grouped for readability as: +There are quite a lot of default configuration subdirectories in $TDEDIR/share/apps/ whose names all start with a kdev sequence. Most of them are for &tdevelop; internal use only. They might be deliberately grouped for readability as: Stand-alone Applications Task Specific Parts @@ -76,25 +76,25 @@ There are quite a lot of default configuration subdirectories in profiles/ — contains default plugin profile settings. (Currently there is only a tiny profile provided which defines a minimum set of active &tdevelop; plugins.) eventsrc — holds a lot of Process successful localization strings. tdevelopui.rc — provides the basic menu and tool bar entries &tdevelop; uses. - tdevhtml_partui.rc — provides a Print... entry in the File menu, a Copy entry in the Edit menu, and Back and Forward arrows in the Browser Toolbar in case a &HTML; file is browsed from the Documentation plugin. + kdevhtml_partui.rc — provides a Print... entry in the File menu, a Copy entry in the Edit menu, and Back and Forward arrows in the Browser Toolbar in case a &HTML; file is browsed from the Documentation plugin. - tdevassistant/ — provides the menu and tool bars of the stand-alone &tdevelop; Assistant documentation browser. - tdevdesigner/ and tdevdesignerpart/ — provide menu bar and tool bars of the stand-alone &tdevelop; user interface designer. + kdevassistant/ — provides the menu and tool bars of the stand-alone &tdevelop; Assistant documentation browser. + kdevdesigner/ and kdevdesignerpart/ — provide menu bar and tool bars of the stand-alone &tdevelop; user interface designer. Task Specific Parts - tdevabbrev/ — contains files used by the Abbreviation Expansion plugin: + kdevabbrev/ — contains files used by the Abbreviation Expansion plugin: sources/ — contains keyword definition files used by the Expand Text command. templates/ — contains template definition files used by the Expand Abbreviation command. - tdevabbrev.rc — provides the Expand Text and Expand Abbreviation entries in the Edit menu. + kdevabbrev.rc — provides the Expand Text and Expand Abbreviation entries in the Edit menu. - tdevappwizard/ — contains files used by the &appwizard; part: + kdevappwizard/ — contains files used by the &appwizard; part: importfiles/ — contains .tdevelop project files which control the initialization of a new project. imports/ — contains templates to set up project specific .desktop files. @@ -104,89 +104,89 @@ There are quite a lot of default configuration subdirectories in *.tar.gz — tarballs containing the source files to be included in a new generated project directory. - tdevastyle/ — provides the Reformat Source entry in the Edit menu. - tdevautoproject/ — provides most of the entries in the Build menu and the Build Toolbar (&tdevelop;) toolbar. + kdevastyle/ — provides the Reformat Source entry in the Edit menu. + kdevautoproject/ — provides most of the entries in the Build menu and the Build Toolbar (&tdevelop;) toolbar. - tdevclassview/ — contains files used by the Class View project plugin: + kdevclassview/ — contains files used by the Class View project plugin: pics/ — contains the icons used in the Classes classview tree. - tdevclassview.tc — provides the Class Inheritance Diagram entry in the Projects menu as well as the classes navigation combo box in the Browser Toolbar. + kdevclassview.tc — provides the Class Inheritance Diagram entry in the Projects menu as well as the classes navigation combo box in the Browser Toolbar. - tdevcloser/ — provides the Windows menu close entries. - tdevctags/ — provides the CTags entry in the Tools menu for the CTags Frontend project plugin. - tdevcvsservice/ — provides the icon used by the CvsService tab and a short shell script used to add a new entry to the &cvs; repository, both used by the CVS Integration project plugin. - tdevdebugger/ — provides the Debug menu entries for the Debugger Frontend project plugin. - tdevdiff/ — provides the Difference Viewer entry in the Tools menu. - tdevdistpart/ — provides the Distribution & Publishing entry in the Project menu for the Final Packaging Support project plugin. + kdevcloser/ — provides the Windows menu close entries. + kdevctags/ — provides the CTags entry in the Tools menu for the CTags Frontend project plugin. + kdevcvsservice/ — provides the icon used by the CvsService tab and a short shell script used to add a new entry to the &cvs; repository, both used by the CVS Integration project plugin. + kdevdebugger/ — provides the Debug menu entries for the Debugger Frontend project plugin. + kdevdiff/ — provides the Difference Viewer entry in the Tools menu. + kdevdistpart/ — provides the Distribution & Publishing entry in the Project menu for the Final Packaging Support project plugin. - tdevdocumentation/ — contains files used by the Documentation plugin: + kdevdocumentation/ — contains files used by the Documentation plugin: en/ and pics/ — contain files used by the htdig search tool. tocs/ — contain the default &tdevelop; documentation content description files (see the description in Basic Structure of &tdevelop; TOC Files). - tdevpart_documentation.rc — provides the search related entries in the Help menu. + kdevpart_documentation.rc — provides the search related entries in the Help menu. - tdevdoxygen/ — provides the menu entries for the Doxygen Support project plugin. + kdevdoxygen/ — provides the menu entries for the Doxygen Support project plugin. - tdevfilecreate/ — contains files used by the New File Wizard: + kdevfilecreate/ — contains files used by the New File Wizard: file-templates/ — provides the initial text contents to be put into the new source file of a given type. - tdevpart_filecreate.rc — provides the New entry in the File menu. + kdevpart_filecreate.rc — provides the New entry in the File menu. template-info.xml — contains descriptions of the available file types to be displayed in the New File tool view. - tdevfilter/ — provides the Execute Command... and Filter Selection Through Command... entries in the Tools menu used by the Shell Filtering and Insertion plugin. - tdevfullscreen/ — provides the Full Screen Mode entry in the View menu and the according tool bar icon. - tdevgrepview/ — provides the Find in Files...entry in the Edit menu used by the Grep Frontend plugin. - tdevhistory/ — provides the Back and Forward entries in the View menu. - tdevjavadebugger/ — provides a Java Debug menu in order to debug a &Java; application. - tdevoutputviews/ — provides the Next Error and Previous Error entries in the View menu. - tdevpartexplorer/ — provides the Part Explorer entry in the Tools menu used by the Part Explorer Tool plugin. - tdevquickopen/ — provides the Quick Open File.. entry in the File menu and the Quick Open Class... and Quick Open Method entries in the Tools menu used by the Quick Open project plugin. - tdevregexptest/ — provides the Debug Regular Expression... entry in the Tools menu used by the Regular Expression Tester plugin. - tdevreplace/ — provides the Find-Select-Replace... entry in the Edit menu used by the Replace Part plugin. - tdevtipofday/ — provides the Tip of the Day entry in the Help menu as well as a HTML-File containing the available tips. - tdevtools/ — controls various menu entries ceated by Tools Menu and External Tools Menu settings provided by the Tools Menu Addition plugin. - tdevvalgrind/ — provides the Valgrind Memory Leak Check and Profile with KCachegrind entries in the Debug menu used by the Valgrind Frontend plugin. + kdevfilter/ — provides the Execute Command... and Filter Selection Through Command... entries in the Tools menu used by the Shell Filtering and Insertion plugin. + kdevfullscreen/ — provides the Full Screen Mode entry in the View menu and the according tool bar icon. + kdevgrepview/ — provides the Find in Files...entry in the Edit menu used by the Grep Frontend plugin. + kdevhistory/ — provides the Back and Forward entries in the View menu. + kdevjavadebugger/ — provides a Java Debug menu in order to debug a &Java; application. + kdevoutputviews/ — provides the Next Error and Previous Error entries in the View menu. + kdevpartexplorer/ — provides the Part Explorer entry in the Tools menu used by the Part Explorer Tool plugin. + kdevquickopen/ — provides the Quick Open File.. entry in the File menu and the Quick Open Class... and Quick Open Method entries in the Tools menu used by the Quick Open project plugin. + kdevregexptest/ — provides the Debug Regular Expression... entry in the Tools menu used by the Regular Expression Tester plugin. + kdevreplace/ — provides the Find-Select-Replace... entry in the Edit menu used by the Replace Part plugin. + kdevtipofday/ — provides the Tip of the Day entry in the Help menu as well as a HTML-File containing the available tips. + kdevtools/ — controls various menu entries ceated by Tools Menu and External Tools Menu settings provided by the Tools Menu Addition plugin. + kdevvalgrind/ — provides the Valgrind Memory Leak Check and Profile with KCachegrind entries in the Debug menu used by the Valgrind Frontend plugin. Project Generation Parts - tdevadaproject/ — provides entries for the Build menu and according tool bar icons to build an Ada application. - tdevantproject/ — provides entries for the Build menu when the Ant project generator is used. - tdevautoproject/ — provides entries for the Build menu and according tool bar icons when working with the &GNU; Tools based &automake; project generator. Additionally provides the Add Translation and Build Configuration entries to the Project menu. - tdevcustomproject/ — provides entries for the Build menu and according tool bar icons when the project is based on custom Makefils. - tdevgenericproject/ — contains menu definitions for an experimental generic project generator. Currently (version 3.1.0) unused. - tdevhaskellproject/ — provides entries for the Build menu and according tool bar icons to build a Haskell application. - tdevpascalproject/ — provides entries for the Build menu and according tool bar icons to build a Pascal application. - tdevtrollproject/ — provides entries for the Build menu and according tool bar icons to build an application using the &Qt; QMake project manager. + kdevadaproject/ — provides entries for the Build menu and according tool bar icons to build an Ada application. + kdevantproject/ — provides entries for the Build menu when the Ant project generator is used. + kdevautoproject/ — provides entries for the Build menu and according tool bar icons when working with the &GNU; Tools based &automake; project generator. Additionally provides the Add Translation and Build Configuration entries to the Project menu. + kdevcustomproject/ — provides entries for the Build menu and according tool bar icons when the project is based on custom Makefils. + kdevgenericproject/ — contains menu definitions for an experimental generic project generator. Currently (version 3.1.0) unused. + kdevhaskellproject/ — provides entries for the Build menu and according tool bar icons to build a Haskell application. + kdevpascalproject/ — provides entries for the Build menu and according tool bar icons to build a Pascal application. + kdevtrollproject/ — provides entries for the Build menu and according tool bar icons to build an application using the &Qt; QMake project manager. Language Specific Parts - tdevadasupport/ — provides entries in the Tools menu and according tool bar icons needed to develop Ada applications. - tdevbashsupport/ — provides entries in the Build menu and according tool bar icons needed to develop Bash scripts. + kdevadasupport/ — provides entries in the Tools menu and according tool bar icons needed to develop Ada applications. + kdevbashsupport/ — provides entries in the Build menu and according tool bar icons needed to develop Bash scripts. - tdevcppsupport/ — contains files used by the &appwizard; to build C++ applications: + kdevcppsupport/ — contains files used by the &appwizard; to build C++ applications: newclass/ — contains header and source templates from which the &appwizard; builds the according source files. subclassing/ — contains templates which the &appwizard; uses to set up initial class declarations/definitions in the source files. templates — contains templates from which the &appwizard; sets up the default header and source template files to be used by the &nfwizard;. configuration — dummy template to add macros. - tdevcppsupport.rc — provides the Complete Text and Make Member entries fo the Edit menu, the Switch Header/Implementation entry for the View menu, and the New Class entry for the Project menu as well as a New Class icon for the Browser Toolbar. + kdevcppsupport.rc — provides the Complete Text and Make Member entries fo the Edit menu, the Switch Header/Implementation entry for the View menu, and the New Class entry for the Project menu as well as a New Class icon for the Browser Toolbar. - tdevfortransupport/ — provides entries in the Build menu needed to develop Fortran applications. - tdevhaskellsupport/ — provides entries in the Build menu and according tool bar icons needed to develop Haskell applications. - tdevjavasupport/ — contains the UI definition needed to develop &Java; applications. - tdevpascalsupport/ — contains the UI definition needed to develop Pascal applications. - tdevperlsupport/ — provides Project and Help menu entries needed to develop Perl scripts. - tdevphpsupport/ — contains UI and PHP function definition files needed to develop PHP scripts. - tdevpythonsupport/ — provides Build and Help menu entries and according tool bar icons needed to develop Python scripts. - tdevrubysupport/ — provides Build menu entries and according tool bar icons needed to develop Ruby scripts. - tdevscriptproject/ — provides th UI definitions needed to develop custom projects. Currently (version 3.1.0) unused. - tdevsqlsupport/ — provides th UI definitions needed to develop SQL projects. Currently (version 3.1.0) unused. + kdevfortransupport/ — provides entries in the Build menu needed to develop Fortran applications. + kdevhaskellsupport/ — provides entries in the Build menu and according tool bar icons needed to develop Haskell applications. + kdevjavasupport/ — contains the UI definition needed to develop &Java; applications. + kdevpascalsupport/ — contains the UI definition needed to develop Pascal applications. + kdevperlsupport/ — provides Project and Help menu entries needed to develop Perl scripts. + kdevphpsupport/ — contains UI and PHP function definition files needed to develop PHP scripts. + kdevpythonsupport/ — provides Build and Help menu entries and according tool bar icons needed to develop Python scripts. + kdevrubysupport/ — provides Build menu entries and according tool bar icons needed to develop Ruby scripts. + kdevscriptproject/ — provides th UI definitions needed to develop custom projects. Currently (version 3.1.0) unused. + kdevsqlsupport/ — provides th UI definitions needed to develop SQL projects. Currently (version 3.1.0) unused. @@ -212,7 +212,7 @@ All information about user defined settings is kept in two subdirectories of Application Specific Configuration -Any user changes to the &tdevelop; Default Configuration settings as well as user specific settings which are not kept in any of the Resource Configuration Files are found in tdev... subdirectories of the $TDEHOME/share/apps/ directory. +Any user changes to the &tdevelop; Default Configuration settings as well as user specific settings which are not kept in any of the Resource Configuration Files are found in kdev... subdirectories of the $TDEHOME/share/apps/ directory. Most of these configuration files are however used by various &tdevelop; plugins in order to provide some specific menu and/or toolbar entries. Thus they are of interest only in case something went really wrong with the user interface. @@ -223,30 +223,30 @@ In case the contents of these directories mirror those of the Default Configurat - tdevabbrev/ — contains files used by the Abbreviation Expansion plugin: + kdevabbrev/ — contains files used by the Abbreviation Expansion plugin: sources/ — currently empty; &tdevelop; uses the default keyword definition files for Expand Text commands. templates/ — contains the user modified template definition files used by the Expand Abbreviation command. - tdevabbrev.rc — provides the Expand Text and Expand Abbreviation entries in the Edit menu. + kdevabbrev.rc — provides the Expand Text and Expand Abbreviation entries in the Edit menu. - tdevappwizard/ — only provides the New Project... and Import Existing Project... entries in the Projects menu. The &appwizard; will use the default configuration settings for its actual works. + kdevappwizard/ — only provides the New Project... and Import Existing Project... entries in the Projects menu. The &appwizard; will use the default configuration settings for its actual works. - tdevastyle/ — provides the actual Reformat Source entry in the Edit menu. + kdevastyle/ — provides the actual Reformat Source entry in the Edit menu. - tdevautoproject/ — provides the actual entries in the Build menu and the Build Toolbar (TDevelop) toolbar. + kdevautoproject/ — provides the actual entries in the Build menu and the Build Toolbar (KDevelop) toolbar. - tdevclassview/ — provides the Class Inheritance Diagram entry in the Project menu and the class browser combo box in the Browser Toolbar by the Class View project plugin. + kdevclassview/ — provides the Class Inheritance Diagram entry in the Project menu and the class browser combo box in the Browser Toolbar by the Class View project plugin. - tdevcloser/ — provides the Close Selected Windows... entry in the Windows menu. + kdevcloser/ — provides the Close Selected Windows... entry in the Windows menu. - tdevcppsupport/ — holds the acual configuration used by the &appwizard; to build C++ applications. The &appwizard; however uses its main bulk of configuration information directly from the default configuration directory. See there for more detail. + kdevcppsupport/ — holds the acual configuration used by the &appwizard; to build C++ applications. The &appwizard; however uses its main bulk of configuration information directly from the default configuration directory. See there for more detail. newclass/ — contains the actual header and source templates from which the &appwizard; builds the according source files. @@ -255,22 +255,22 @@ In case the contents of these directories mirror those of the Default Configurat pcs/ — contains database files &tdevelop; uses build the actual Persistent Code Store (.pcs) file of a &kde; C++ project. - tdevcppsupport.rc — provides the Complete Text and Make Member entries fo the Edit menu, the Switch Header/Implementation entry for the View menu, and the New Class entry for the Project menu as well as a New Class icon for the Browser Toolbar. + kdevcppsupport.rc — provides the Complete Text and Make Member entries fo the Edit menu, the Switch Header/Implementation entry for the View menu, and the New Class entry for the Project menu as well as a New Class icon for the Browser Toolbar. - tdevctags/ — provides the CTags entry in the Tools menu for the CTags Frontend project plugin. + kdevctags/ — provides the CTags entry in the Tools menu for the CTags Frontend project plugin. - tdevdebugger/ — provides the Debug menu entries for the Debugger Frontend project plugin. + kdevdebugger/ — provides the Debug menu entries for the Debugger Frontend project plugin. - tdevdiff/ — provides the Difference Viewer entry in the Tools menu. + kdevdiff/ — provides the Difference Viewer entry in the Tools menu. - tdevdocumentation/ — contains the actual files used by the Documentation plugin in addition to the default configuration files. See there for more detail. - The directories in tdevdocumentation/ mainly hold actual bookkeeping information. The actually set up documentation files are kept in doc...pluginrc files in the $TDEHOME/share/config/ directory. + kdevdocumentation/ — contains the actual files used by the Documentation plugin in addition to the default configuration files. See there for more detail. + The directories in kdevdocumentation/ mainly hold actual bookkeeping information. The actually set up documentation files are kept in doc...pluginrc files in the $TDEHOME/share/config/ directory. bookmarks/ — maintains the entries in the Bookmarks tab of the &tdevelop; Documentation plugin. @@ -282,12 +282,12 @@ In case the contents of these directories mirror those of the Default Configurat search/ — contains files used by the htdig search tool which serves search calls from the Search tab of the Documentation plugin. - tdevpart_documentation.rc — provides the search related entries in the Help menu. + kdevpart_documentation.rc — provides the search related entries in the Help menu. - tdevdoxygen/ — provides the menu entries for the Doxygen Support project plugin. + kdevdoxygen/ — provides the menu entries for the Doxygen Support project plugin. tdevelop/ — contains some actual settings &tdevelop; uses for its basic setup: @@ -297,45 +297,45 @@ In case the contents of these directories mirror those of the Default Configurat - tdevfilecreate/ — contains files used by the New File Wizard: + kdevfilecreate/ — contains files used by the New File Wizard: file-templates/ — provides the actually used text contents to be put into the new source file of a given type. More file templates are found in the default configuration files directory. - tdevpart_filecreate.rc — provides the New entry in the File menu. + kdevpart_filecreate.rc — provides the New entry in the File menu. template-info.xml — contains descriptions of the available file types to be displayed in the New File tool view. - tdevfilter/ — provides the Execute Command... and Filter Selection Through Command... entries in the Tools menu used by the Shell Filtering and Insertion plugin. + kdevfilter/ — provides the Execute Command... and Filter Selection Through Command... entries in the Tools menu used by the Shell Filtering and Insertion plugin. - tdevfullscreen/ — provides the Full Screen Mode entry in the View menu and the according tool bar icon. + kdevfullscreen/ — provides the Full Screen Mode entry in the View menu and the according tool bar icon. - tdevgrepview/ — provides the Find in Files...entry in the Edit menu used by the Grep Frontend plugin. + kdevgrepview/ — provides the Find in Files...entry in the Edit menu used by the Grep Frontend plugin. - tdevoutputviews/ — provides the Next Error and Previous Error entries in the View menu. + kdevoutputviews/ — provides the Next Error and Previous Error entries in the View menu. - tdevpartexplorer/ — provides the Part Explorer entry in the Tools menu used by the Part Explorer Tool plugin. + kdevpartexplorer/ — provides the Part Explorer entry in the Tools menu used by the Part Explorer Tool plugin. - tdevquickopen/ — provides the Quick Open File.. entry in the File menu and the Quick Open Class... and Quick Open Method entries in the Tools menu used by the Quick Open project plugin. + kdevquickopen/ — provides the Quick Open File.. entry in the File menu and the Quick Open Class... and Quick Open Method entries in the Tools menu used by the Quick Open project plugin. - tdevregexptest/ — provides the Debug Regular Expression... entry in the Tools menu used by the Regular Expression Tester plugin. + kdevregexptest/ — provides the Debug Regular Expression... entry in the Tools menu used by the Regular Expression Tester plugin. - tdevreplace/ — provides the Find-Select-Replace... entry in the Edit menu used by the Replace Part plugin. + kdevreplace/ — provides the Find-Select-Replace... entry in the Edit menu used by the Replace Part plugin. - tdevtipofday/ —provides the Tip of the Day entry in the Help menu. The HTML-File containing the available tips is provided as a default configuration file only. + kdevtipofday/ —provides the Tip of the Day entry in the Help menu. The HTML-File containing the available tips is provided as a default configuration file only. - tdevtools/ — controls various menu entries ceated by Tools Menu and External Tools Menu settings provided by the Tools Menu Addition plugin. + kdevtools/ — controls various menu entries ceated by Tools Menu and External Tools Menu settings provided by the Tools Menu Addition plugin. - tdevvalgrind/ — provides the Valgrind Memory Leak Check and Profile with KCachegrind entries in the Debug menu used by the Valgrind Frontend plugin. + kdevvalgrind/ — provides the Valgrind Memory Leak Check and Profile with KCachegrind entries in the Debug menu used by the Valgrind Frontend plugin. @@ -348,35 +348,35 @@ In case the contents of these directories mirror those of the Default Configurat There are two groups of &tdevelop; configuration files in the $TDEHOME/share/config/ directory, distiguished by their surrounding character sequences: doc...pluginrc denotes files used by the documentation plugin. - tdev...rc denotes configuration files used by &tdevelop; itself and its available plugins. + kdev...rc denotes configuration files used by &tdevelop; itself and its available plugins. Configuration Files Used by &tdevelop; - tdevabbrevrc — holds the current state of the Abbreviations configuration provided by the Abbreviation Expansion plugin. + kdevabbrevrc — holds the current state of the Abbreviations configuration provided by the Abbreviation Expansion plugin. This only records whether the abbreviations will be used or not. The actual definitions of new abbreviations will go into the $TDEHOME/share/apps/kdevabbrev/templates/templates file. - tdevassistantrc — holds some configuration states specific of the stand-alone &tdevelop; Assistant documentation browser. + kdevassistantrc — holds some configuration states specific of the stand-alone &tdevelop; Assistant documentation browser. Most common configuration settings are shared with the &tdevelop; IDE tdeveloprc file. - tdevassistantuimode4rc — holds the current MDI configuration states (dock positions &etc;) of the stand-alone &tdevelop; Assistant documentation browser. + kdevassistantuimode4rc — holds the current MDI configuration states (dock positions &etc;) of the stand-alone &tdevelop; Assistant documentation browser. - tdevclassviewrc — holds the View Mode setting of the Classes class browser tab provided by the Class View project plugin. + kdevclassviewrc — holds the View Mode setting of the Classes class browser tab provided by the Class View project plugin. This is a global setting, although the Class View plugin may be disabled on a per project basis. Any change in this setting will be globally updated whenever the current project is closed and thus affect all subsequently loaded projects. - tdevcppsupportrc — holds some settings used to set up CPP source files. In particular you will find the settings made on the C++ Class Generator configuration dialog in here. - tdevdocumentationrc — holds actual settings the Documentation plugin uses. + kdevcppsupportrc — holds some settings used to set up CPP source files. In particular you will find the settings made on the C++ Class Generator configuration dialog in here. + kdevdocumentationrc — holds actual settings the Documentation plugin uses. tdeveloprc — holds the global settings the &tdevelop; IDE and the &tdevelop; Assistant stand-alone documentation browser will use. tdevelopuimode4rc — holds the current MDI configuration states (dock positions &etc;) of the &tdevelop; IDE. - tdevfileselectorrc — holds actual settings the File Selector plugin uses. - tdevfileviewrc — holds the actual filename color settings the CVS Integration (Cervisia) project plugin uses for display. - tdevfilterrc — holds actual settings the Shell Filtering and Insertion plugin uses. - tdevgrepviewrc — holds actual settings the Grep Frontend plugin uses. - tdevsnippetrc — holds actual settings the Code Snippets plugin uses. - tdevtoolsrc — holds actual settings the Tools Menu Addition plugin uses. + kdevfileselectorrc — holds actual settings the File Selector plugin uses. + kdevfileviewrc — holds the actual filename color settings the CVS Integration (Cervisia) project plugin uses for display. + kdevfilterrc — holds actual settings the Shell Filtering and Insertion plugin uses. + kdevgrepviewrc — holds actual settings the Grep Frontend plugin uses. + kdevsnippetrc — holds actual settings the Code Snippets plugin uses. + kdevtoolsrc — holds actual settings the Tools Menu Addition plugin uses. @@ -385,7 +385,7 @@ There are two groups of &tdevelop; configuration files in the the Filter plugin. +the Filter plugin. @@ -1840,10 +1840,10 @@ Configure Editor... Settings -Configure TDevelop... +Configure KDevelop... -Configure TDevelop... +Configure KDevelop... @@ -1866,7 +1866,7 @@ Configure TDevelop... Help -TDevelop Handbook +KDevelop Handbook View this document. @@ -1960,10 +1960,10 @@ Info Page... Help -About TDevelop... +About KDevelop... Display some brief information about -TDevelop's version number, authors and license agreement. +KDevelop's version number, authors and license agreement. diff --git a/doc/tdevelop/getting-started.docbook b/doc/tdevelop/getting-started.docbook index 39d7c4de..a805f393 100644 --- a/doc/tdevelop/getting-started.docbook +++ b/doc/tdevelop/getting-started.docbook @@ -77,7 +77,7 @@ already did switch to another user interface mode some items may not be there as described or will behave slightly different. If in doubt which user interface mode your &tdevelop; currently uses, check with the Settings Configure -TDevelop... User Interface +KDevelop... User Interface dialog. @@ -416,7 +416,7 @@ and plugged-in tools to extend the basic &IDE; capabilities. The The upper set of Tools menu entries will be provided by the editor plugin which is in use. You may select your favorite editor via Settings Configure -TDevelop... Editor. Once an +KDevelop... Editor. Once an editable document file is selected, the upper part of the Tools menu will provide advanced editing commands specific to the editor part in use. @@ -452,10 +452,10 @@ Also, you can configure shortcuts, toolbars, notifications, the editor and Help -Here you can open this TDevelop manual, look up terms in various +Here you can open this KDevelop manual, look up terms in various documentation files, open man pages (the traditional UNIX manual format) and info pages (the GNU manual format). Furthermore you can report bugs here or get -some info about your current TDevelop version and its authors. +some info about your current KDevelop version and its authors. @@ -497,7 +497,7 @@ different main purpose. actual work. More tools to work on that project will be available then. The actual number of tool views depends on the Plugin Tools being currently available to &tdevelop;. You will find more on this -topic in the Configuring TDevelop chapter. +topic in the Configuring KDevelop chapter. Currently, with no project open and the default number of plugin tools loaded, you will find the following tool views. Clicking on a tab will open @@ -627,7 +627,7 @@ adjusted. If you want to know more about &tdevelop; configuration, have a look at -the Configuring TDevelop chapter. +the Configuring KDevelop chapter. @@ -635,8 +635,8 @@ the Configuring TDevelop chapter. To configure &tdevelop;, click the Settings menu and select -Configure TDevelop.... The -Configure TDevelop dialog will pop up, showing the +Configure KDevelop.... The +Configure KDevelop dialog will pop up, showing the following General settings page to the right. @@ -770,7 +770,7 @@ mandatory that the KDELibs Apidocs were present when perform the identifier lookup examples later in this chapter, make sure that this documentation exists and is accessible to &tdevelop;. See Installing -TDevelop fore more detail. +KDevelop fore more detail. @@ -1127,7 +1127,7 @@ and hello.kdevses. Of particular importance in each project is the xxx.tdevelop (where xxx denotes the project -name) file. It is the main TDevelop 3 Project File and +name) file. It is the main KDevelop 3 Project File and needed if you later want load this project into the &IDE;. @@ -1789,7 +1789,7 @@ this behavior. Select Settings Configure -TDevelop... +KDevelop... In the left hand icon bar on the dialog popup click the User diff --git a/doc/tdevelop/index.docbook b/doc/tdevelop/index.docbook index 9e83802d..d412dc35 100644 --- a/doc/tdevelop/index.docbook +++ b/doc/tdevelop/index.docbook @@ -76,7 +76,7 @@ Entries which require special treatment are marked with comments starting with ' - &tdevelop; Handbook + &tdevelop; User Manual 2006-06-19 &kdevrelease; diff --git a/doc/tdevelop/tdevdesigner.png b/doc/tdevelop/kdevdesigner.png similarity index 100% rename from doc/tdevelop/tdevdesigner.png rename to doc/tdevelop/kdevdesigner.png diff --git a/doc/tdevelop/nutshell.docbook b/doc/tdevelop/nutshell.docbook index 93db1506..ca0a4276 100644 --- a/doc/tdevelop/nutshell.docbook +++ b/doc/tdevelop/nutshell.docbook @@ -37,7 +37,7 @@ smaller tool view tabs in IDEAl Mode By default &tdevelop; starts with large text-based tool tip tabs around the work area. You may change this look to ⪚ save space in the &tdevelop; configuration dialog (Settings -Configure TDevelop... User +Configure KDevelop... User Interface). If you use an older &tdevelop; 3 version, this configuration dialog may not be available. To change the toolview tabs display manually, place a diff --git a/doc/tdevelop/plugin-tools.docbook b/doc/tdevelop/plugin-tools.docbook index 174767e2..ad10fb16 100644 --- a/doc/tdevelop/plugin-tools.docbook +++ b/doc/tdevelop/plugin-tools.docbook @@ -14,11 +14,11 @@ For example, in the file menu there is a Quick Open feature, but only if it's enabled in the Project - Project Options dialog. -Technically, plugins are based on the TDevPlugin class defined in +Technically, plugins are based on the KDevPlugin class defined in lib/interfaces/kdevplugin.h. The following is taken from a comment from there. -TDevPlugin is the base class for all TDevelop plugins. +KDevPlugin is the base class for all TDevelop plugins. A plugin is a component which is loaded into TDevelop shell at startup or by request. A plugin has a scope that can be either: @@ -32,7 +32,7 @@ A plugin has a scope that can be either: are not selectable by user in plugin configuration pages. Global plugins are plugins which require only shell to be loaded and do not operate on -TDevProject interface and/or do not use project wide information. +KDevProject interface and/or do not use project wide information. For example, the uimode plugin allows a developer to select which user interface they wish to use. @@ -43,13 +43,13 @@ The Automake Manager, for example, only needs to be active when an Automake base As stated above, core plugins cannot be disabled. Global plugins can be enabled/disabled in Settings -Configure TDevelop... +Configure KDevelop... under Plugins. Project plugins can be enabled/disabled in Project Project Options... under Plugins. -Active plugins can have many effects on TDevelop. +Active plugins can have many effects on KDevelop. Depending on their function, they may add extra menus, extra menu items, extra tool buttons, etc. @@ -67,13 +67,13 @@ it is because the plugin authors made them this way. Scope: Core - + Application Wizard Application Wizard - + Difference Viewer Difference Viewer - + FileCreate FileCreate @@ -85,7 +85,7 @@ it is because the plugin authors made them this way. User-Interface Selection Provides a dialog for UI-mode selection. - + VCSManager Version Control System Manager @@ -95,13 +95,13 @@ it is because the plugin authors made them this way. Abbreviation Expansion Provides support for customizable abbreviations - short words which expand into commonly needed code structures. - + Documentation The Documentation plugin offers browsing and searching in local and online documentation with support for multiple documentation systems. FileList Provides a list of all currently open files. (Handy when the tab bar is not quite wide enough.) - + File Selector Powerful network transparent file browser utility. @@ -109,14 +109,14 @@ it is because the plugin authors made them this way. Provides a way of manipulating editor text using commandline tools. Appears in the Tools menu. Grep Frontend -Integrates "find|grep" in TDevelop - allows fast searching of multiple files using patterns or regular expressions. +Integrates "find|grep" in KDevelop - allows fast searching of multiple files using patterns or regular expressions. Embedded Konsole -This plugin gives TDevelop an embedded konsole for quick and easy command line access. +This plugin gives KDevelop an embedded konsole for quick and easy command line access. "Open with" Menu Addon -This plugin provides additional "open" alternatives for various context menus in TDevelop. - +This plugin provides additional "open" alternatives for various context menus in KDevelop. + Part Explorer Tool A Graphical tool for performing TDETrader-like queries about registered services @@ -127,7 +127,7 @@ it is because the plugin authors made them this way. This plugin is an interactive projectwide "Search and Replace" tool. Search using string or regexp matching, and select the replacements to be made from a preview before the action is finalized. When loaded it appears in the Edit menu. Scripting -The Scripting plugin offers KScript based scripting of the TDevelop application +The Scripting plugin offers KScript based scripting of the KDevelop application Code Snippets This plugin allows you to store code snippets and add them to your code @@ -242,13 +242,13 @@ templates than for &Java;. The set of code templates is configurable. If the plugin is enabled, you can see which ones are available in the Settings -Configure TDevelop... +Configure KDevelop... dialog under Abbreviations. - + The <command>filter</command> Plugin filter diff --git a/doc/tdevelop/project-advanced.docbook b/doc/tdevelop/project-advanced.docbook index 81c0e4a6..a87b1658 100644 --- a/doc/tdevelop/project-advanced.docbook +++ b/doc/tdevelop/project-advanced.docbook @@ -42,10 +42,10 @@ -Converting Old TDevelop Project Files +Converting Old KDevelop Project Files -&tdevelop; allows you to open old TDevelop 2.x project files and convert them to &tdevelop; files. To do so go to Open Project... and select TDevelop 2 project files in the Filter:. Then select project file you want to open. The project gets converted to &tdevelop; and saved as a &tdevelop; project file. +&tdevelop; allows you to open old KDevelop 2.x project files and convert them to &tdevelop; files. To do so go to Open Project... and select KDevelop 2 project files in the Filter:. Then select project file you want to open. The project gets converted to &tdevelop; and saved as a &tdevelop; project file. diff --git a/doc/tdevelop/setup.docbook b/doc/tdevelop/setup.docbook index 2c448945..0c078a3b 100644 --- a/doc/tdevelop/setup.docbook +++ b/doc/tdevelop/setup.docbook @@ -271,14 +271,14 @@ This let you choose the way you want .ui files to be displa This uses &tdevelop; own designer embedded within &tdevelop; Run &tdevelop;'s designer as a separate application - The TDevDesigner application will be run separately in its own window. + The KDevDesigner application will be run separately in its own window. - + - TDevDesigner in its own window + KDevDesigner in its own window @@ -294,7 +294,7 @@ Run Qt Designer Terminal Emulation -You choose here which terminal you want to be integrated within TDevelop. +You choose here which terminal you want to be integrated within KDevelop. @@ -349,7 +349,7 @@ A typical example of this user interface mode is Borland Delphi 6.0. -To switch the user interface mode select Settings Configure &tdevelop;... from the menus. The Customize TDevelop dialog will pop up, where you have to select User Interface in the left hand tree. This will display the following settings dialog to the right. +To switch the user interface mode select Settings Configure &tdevelop;... from the menus. The Customize KDevelop dialog will pop up, where you have to select User Interface in the left hand tree. This will display the following settings dialog to the right. @@ -524,7 +524,7 @@ The active toolview window must be shown fixed (non-overlap mode), sharing the w Selecting an Editor -&tdevelop; allows you to select your favorite text editor tool. Mark the Editor entry in the left hand side selections tree of the Configure TDevelop window. The following dialog will be displayed to the right. +&tdevelop; allows you to select your favorite text editor tool. Mark the Editor entry in the left hand side selections tree of the Configure KDevelop window. The following dialog will be displayed to the right. @@ -568,7 +568,7 @@ Changing the editor will not effect already open files. There are two possibilit -TDevelop lets you use editor interfaces which have registered with &kde; and that provide a KatePart interface. If you miss one one of the selections shown above check your &kde; installation if the corresponding KPart was correctly installed. +KDevelop lets you use editor interfaces which have registered with &kde; and that provide a KatePart interface. If you miss one one of the selections shown above check your &kde; installation if the corresponding KPart was correctly installed. What to do if the file has been changed externally: @@ -663,7 +663,7 @@ The reformat source feature is currently available for C, C++, and &Java; only. -To set up a specific format style, select Settings Configure &tdevelop;.. from the menubar. The Customize TDevelop dialog will pop up, where you have to select Source Formatter in the left hand tree. This will display a series of three settings dialog tabs to the right, namely a General Formatting Setup, a Indentation Style Setup, and a Other Formatting Setup. +To set up a specific format style, select Settings Configure &tdevelop;.. from the menubar. The Customize KDevelop dialog will pop up, where you have to select Source Formatter in the left hand tree. This will display a series of three settings dialog tabs to the right, namely a General Formatting Setup, a Indentation Style Setup, and a Other Formatting Setup. @@ -997,7 +997,7 @@ split a long line apart. For C/C++ code this can be controlled here. Setting Up the Code Snippets Tool -When editing in &tdevelop; you can store often used parts of code as Code Snippets. To configure the capabilities of the code snippets part select Settings Configure &tdevelop;.. from the menubar. The Customize TDevelop dialog will pop up, where you have to select Code Snippets in the left hand tree. This will show the following dialog in the right hand side. +When editing in &tdevelop; you can store often used parts of code as Code Snippets. To configure the capabilities of the code snippets part select Settings Configure &tdevelop;.. from the menubar. The Customize KDevelop dialog will pop up, where you have to select Code Snippets in the left hand tree. This will show the following dialog in the right hand side. @@ -1089,7 +1089,7 @@ system. The behaviour of the File Selector can be highly configured. Select Settings Configure &tdevelop;.. from the -menubar. The Customize TDevelop dialog will pop up, +menubar. The Customize KDevelop dialog will pop up, where you have to select File Selector in the left hand tree. This will show the following dialog in the right hand side. @@ -1330,7 +1330,7 @@ If &tdevelop; was automatically restarted by the &kde; session manager the chang -You may set up contents and behaviour of the various parts of this documentation window if you select Settings Configure &tdevelop;.. from the menubar. The Customize TDevelop dialog will pop up, where you have to select Documentation in the left hand window. +You may set up contents and behaviour of the various parts of this documentation window if you select Settings Configure &tdevelop;.. from the menubar. The Customize KDevelop dialog will pop up, where you have to select Documentation in the left hand window. @@ -1662,10 +1662,10 @@ You must put the &API; of your current project into this Doxygen Docum -Handling Structured Documentation (TDevelopTOC Files) +Handling Structured Documentation (KDevelopTOC Files) -The main bulk of the &tdevelop; documentation facility provides immediate access to structured documentation, local as well as remote ones. You can configure this on the TDevelopTOC Documentation Collection page. +The main bulk of the &tdevelop; documentation facility provides immediate access to structured documentation, local as well as remote ones. You can configure this on the KDevelopTOC Documentation Collection page. @@ -1674,17 +1674,17 @@ The main bulk of the &tdevelop; documentation facility provides immediate access - Providing TDevelopTOC structured documentation access + Providing KDevelopTOC structured documentation access -&tdevelop; comes with a bunch of predefined TDevelopTOC files which are automatically entered in the table at installation time. To keep the display manageable only the most often used will initially be marked for display. If you want to see another documentation, mark the TOC check box in the setup table. +&tdevelop; comes with a bunch of predefined KDevelopTOC files which are automatically entered in the table at installation time. To keep the display manageable only the most often used will initially be marked for display. If you want to see another documentation, mark the TOC check box in the setup table. -TDevelopTOC files cannot be indexed to perform a full text search because they usually point to a remote location. On the other hand, such a .toc file can have an index manually defined, using the <index> tag. Thus the Index check box will be enabled ony when &tdevelop; finds an <index> tag in the .toc file. (For more detail see the description below in the &tdevelop; TOC Files section.) +KDevelopTOC files cannot be indexed to perform a full text search because they usually point to a remote location. On the other hand, such a .toc file can have an index manually defined, using the <index> tag. Thus the Index check box will be enabled ony when &tdevelop; finds an <index> tag in the .toc file. (For more detail see the description below in the &tdevelop; TOC Files section.) The Search check box in the setup table will alway be disabled. @@ -1720,7 +1720,7 @@ Such structured access is made possible through the use of special table Standard Directory of &tdevelop; TOC Files -When &tdevelop; was installed usually a series of predefined .toc files has been put into the $TDEDIR/share/apps/tdevdocumentation/tocs directory. These are fairly simple, structured text files. You may look at them using a text editor or other text display facility. +When &tdevelop; was installed usually a series of predefined .toc files has been put into the $TDEDIR/share/apps/kdevdocumentation/tocs directory. These are fairly simple, structured text files. You may look at them using a text editor or other text display facility. diff --git a/doc/tdevelop/survey-manual.docbook b/doc/tdevelop/survey-manual.docbook index 93c1fd63..0bd59c8d 100644 --- a/doc/tdevelop/survey-manual.docbook +++ b/doc/tdevelop/survey-manual.docbook @@ -198,7 +198,7 @@ necessary and why you need an &IDE;. --> -TDevelop User Interface Mode Examples +KDevelop User Interface Mode Examples Shows user interface modes. diff --git a/doc/tdevelop/tdevelop-install.docbook b/doc/tdevelop/tdevelop-install.docbook index 663d9d08..14f7236b 100644 --- a/doc/tdevelop/tdevelop-install.docbook +++ b/doc/tdevelop/tdevelop-install.docbook @@ -699,7 +699,7 @@ The tdebuildsycoca command does not run from within the root. API is the short form of Application Program Interface. Actually such an API cotains a series of descriptions (&ie; calling conventions) by which an application program can access the operating system and other services. In our context, however, a broader definition was adopted. The API of a &kde; or &Qt; application is an abstract of the classes and methods interfaces, a synopsis to be used like a dictionary to navigate the sources. -There is a version of the most current API available at the TDevelop-Home website. It will be automatically updated every 24 hours so you can keep up. +There is a version of the most current API available at the KDevelop-Home website. It will be automatically updated every 24 hours so you can keep up. Alas, this version is best used read-only over the internet. If you do not always have internet access you may as well build your own API documentation from the &tdevelop; sources. To do so, you must tell the automake system where to find the KDELIBS API in your system. This is accomplished by the special option in the configure command when you prepare to compile the &tdevelop; sources: diff --git a/doc/tdevelop/tdevelop-scripting.docbook b/doc/tdevelop/tdevelop-scripting.docbook index 1cb8a294..1b722f2d 100644 --- a/doc/tdevelop/tdevelop-scripting.docbook +++ b/doc/tdevelop/tdevelop-scripting.docbook @@ -7,12 +7,12 @@ -Using Scripts in TDevelop +Using Scripts in KDevelop Running Scripts - To access a script that is available to &tdevelop; use the ToolsScripts menu. If there there is no such menu item then there are no installed scripts available to TDevelop. + To access a script that is available to &tdevelop; use the ToolsScripts menu. If there there is no such menu item then there are no installed scripts available to KDevelop. diff --git a/doc/tdevelop/tdevelop-survey.docbook b/doc/tdevelop/tdevelop-survey.docbook index 7aca28a9..0f117958 100644 --- a/doc/tdevelop/tdevelop-survey.docbook +++ b/doc/tdevelop/tdevelop-survey.docbook @@ -145,7 +145,7 @@ switch UI modes -To switch the user interface mode select Settings Configure TDevelop... from the menus. The Customize TDevelop dialog will pop up, where you have to select User Interface in the left hand tree. This will display the settings page shown below. +To switch the user interface mode select Settings Configure KDevelop... from the menus. The Customize KDevelop dialog will pop up, where you have to select User Interface in the left hand tree. This will display the settings page shown below. diff --git a/editors/editor-chooser/CMakeLists.txt b/editors/editor-chooser/CMakeLists.txt index c3d37efb..90d6d070 100644 --- a/editors/editor-chooser/CMakeLists.txt +++ b/editors/editor-chooser/CMakeLists.txt @@ -24,12 +24,12 @@ link_directories( ##### other data ################################ -install( FILES tdeveditorchooser.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdeveditorchooser.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdeveditorchooser (module) ############# +##### libkdeveditorchooser (module) ############# -tde_add_kpart( libtdeveditorchooser AUTOMOC +tde_add_kpart( libkdeveditorchooser AUTOMOC SOURCES editorchooser_part.cpp editchooser.ui editorchooser_widget.cpp LINK tdevelop-shared diff --git a/editors/editor-chooser/Makefile.am b/editors/editor-chooser/Makefile.am index 7b12d2db..f95ca61c 100644 --- a/editors/editor-chooser/Makefile.am +++ b/editors/editor-chooser/Makefile.am @@ -1,13 +1,13 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdeveditorchooser.la -libtdeveditorchooser_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdeveditorchooser_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdeveditorchooser.la +libkdeveditorchooser_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdeveditorchooser_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdeveditorchooser_la_SOURCES = editorchooser_part.cpp editchooser.ui editorchooser_widget.cpp +libkdeveditorchooser_la_SOURCES = editorchooser_part.cpp editchooser.ui editorchooser_widget.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdeveditorchooser.desktop +service_DATA = kdeveditorchooser.desktop diff --git a/editors/editor-chooser/editorchooser_part.cpp b/editors/editor-chooser/editorchooser_part.cpp index 33f9cb0e..a9a4339a 100644 --- a/editors/editor-chooser/editorchooser_part.cpp +++ b/editors/editor-chooser/editorchooser_part.cpp @@ -4,20 +4,20 @@ #include #include #include -#include +#include -#include -#include +#include +#include #include "editorchooser_part.h" #include "editorchooser_widget.h" -typedef TDevGenericFactory EditorChooserFactory; -static const TDevPluginInfo data("tdeveditorchooser"); -K_EXPORT_COMPONENT_FACTORY( libtdeveditorchooser, EditorChooserFactory( data ) ) +typedef KDevGenericFactory EditorChooserFactory; +static const KDevPluginInfo data("kdeveditorchooser"); +K_EXPORT_COMPONENT_FACTORY( libkdeveditorchooser, EditorChooserFactory( data ) ) EditorChooserPart::EditorChooserPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin(&data, parent, name ? name : "EditorChooserPart") + : KDevPlugin(&data, parent, name ? name : "EditorChooserPart") { setInstance(EditorChooserFactory::instance()); diff --git a/editors/editor-chooser/editorchooser_part.h b/editors/editor-chooser/editorchooser_part.h index ab892677..d7a9dbd1 100644 --- a/editors/editor-chooser/editorchooser_part.h +++ b/editors/editor-chooser/editorchooser_part.h @@ -3,17 +3,17 @@ */ -#ifndef __TDEVPART_EDITORCHOOSER_H__ -#define __TDEVPART_EDITORCHOOSER_H__ +#ifndef __KDEVPART_EDITORCHOOSER_H__ +#define __KDEVPART_EDITORCHOOSER_H__ class KDialogBase; -#include +#include -class EditorChooserPart : public TDevPlugin +class EditorChooserPart : public KDevPlugin { Q_OBJECT diff --git a/editors/editor-chooser/kdeveditorchooser.desktop b/editors/editor-chooser/kdeveditorchooser.desktop new file mode 100644 index 00000000..94f06903 --- /dev/null +++ b/editors/editor-chooser/kdeveditorchooser.desktop @@ -0,0 +1,91 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Provides a dialog for Editor selection. +Comment[ca]=Proporciona un diàleg per a la selecció de l'Editor. +Comment[da]=Sørger for en dialog til editor-valg. +Comment[de]=Editor-Auswahl für TDevelop. +Comment[el]=Παρέχει ένα διάλογο για επιλογή επεξεργαστή. +Comment[en_GB]=Provides a dialogue for Editor selection. +Comment[es]=Proporciona un diálogo para la selección de un editor. +Comment[et]=Dialoog redaktori valimiseks. +Comment[eu]=Editorearen hautapenerako elkarrizketa-koadroa eskeintzen du. +Comment[fa]=محاوره‌ای برای گزینش ویرایشگر فراهم می‌کند. +Comment[fr]=Fournit une boîte de dialogue pour la sélection de l'éditeur. +Comment[ga]=Soláthraíonn sé dialóg roghnaithe eagarthóra. +Comment[gl]=Proporciona un diálogo para a selección dun editor. +Comment[hi]=संपादक चयन के लिए एक संवाद उपलब्ध कराता है. +Comment[hu]=A szövegszerkesztő komponens kiválasztását teszi lehetővé. +Comment[is]=Útvegar samtalsglugga fyrir val á ritli +Comment[it]=Fornisce a una finestra per la selezione dell'editor. +Comment[ja]=エディタを選択するためのダイアログを提供します。 +Comment[ms]=Menyediakan dialog untuk pemilihan Penyunting. +Comment[nds]=Stellt en Dialoog för de Editor-Utwahl praat. +Comment[ne]=सम्पादन चयनका लागि संवाद प्रदान गर्दछ +Comment[nl]=Biedt een dialoog om een editor te kiezen. +Comment[pl]=Okno dialogowe do wyboru edytora. +Comment[pt]=Fornece um diálogo para a selecção de Editor. +Comment[pt_BR]=Provê um diálogo para seleção do Editor. +Comment[ru]=Предоставляет диалог выбора редактора. +Comment[sk]=Poskytuje dialógové okno pre voľbu editora. +Comment[sl]=Ponuja pogovorno okno za izbiro urejevalnika +Comment[sr]=Обезбеђује прозор за избор уређивача. +Comment[sr@Latn]=Obezbeđuje prozor za izbor uređivača. +Comment[sv]=Tillhandahåller en dialogruta för val av editor. +Comment[ta]=தொகுப்பாளர் தேர்விற்கான உரையாடலைத் தரும் +Comment[tg]=Ба ихтиёр гузоштани гуфтугӯи интихоби муҳаррир. +Comment[tr]=Düzenleyici seçimi için bir pencere sağlar +Comment[zh_CN]=提供编辑器选择对话框 +Comment[zh_TW]=提供對話框以編輯選擇。 +Name=KDevEditorChooser +Name[da]=TDevelop Editorvælger +Name[de]=Editor-Auswahl (TDevelop) +Name[hi]=के-डेव-एडिटर-चूसर +Name[nds]=TDevelop-Editorutwahl +Name[ne]=केडीई विकास सम्पादक छनोटकर्ता +Name[pl]=KDevWybórEdytora +Name[sk]=KDevEditorVolič +Name[sv]=TDevelop editorväljare +Name[ta]=கெடெவ் தொகுப்பாளர் தேர்வாளர் +Name[tg]=KDevМуҳаррирИнтихобкунанда +Name[zh_TW]=TDevelop 編輯器選擇器 +GenericName=Editor Selection +GenericName[ca]=Selecció de l'Editor +GenericName[da]=Editorvalg +GenericName[de]=Editor-Auswahl +GenericName[el]=Επιλογή επεξεργαστή +GenericName[es]=Selección de un editor +GenericName[et]=Redaktori valimine +GenericName[eu]=Editore-hautapena +GenericName[fa]=گزینش ویرایشگر +GenericName[fr]=Sélection de l'éditeur +GenericName[ga]=Roghnú Eagarthóra +GenericName[gl]=Selección de editor +GenericName[hi]=संपादक चयन +GenericName[hu]=Szerkesztőkomponens-választás +GenericName[it]=Selezione Editor +GenericName[ja]=エディタの選択 +GenericName[ms]=Pemilih Penyunting +GenericName[nds]=Editor-Utwahl +GenericName[ne]=सम्पादक चयन +GenericName[nl]=Editorkiezer +GenericName[pl]=Wybór edytora +GenericName[pt]=Selecção de Editor +GenericName[pt_BR]=Seleção de Editor +GenericName[ru]=Выбор редактора +GenericName[sk]=Voľba editora +GenericName[sl]=Izbira urejevalnika +GenericName[sr]=Избор уређивача +GenericName[sr@Latn]=Izbor uređivača +GenericName[sv]=Val av editor +GenericName[ta]=தொகுப்பாளர் தேர்வு +GenericName[tg]=Интихоби муҳаррир +GenericName[tr]=Düzenleyici Seçimi +GenericName[zh_CN]=编辑器选择 +GenericName[zh_TW]=編輯器選擇 +Icon=tdevelop +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdeveditorchooser +X-TDevelop-Version=5 +X-TDevelop-Scope=Core +X-TDevelop-Properties=EditorChooser diff --git a/editors/editor-chooser/tdeveditorchooser.desktop b/editors/editor-chooser/tdeveditorchooser.desktop deleted file mode 100644 index f56f0416..00000000 --- a/editors/editor-chooser/tdeveditorchooser.desktop +++ /dev/null @@ -1,91 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Provides a dialog for Editor selection. -Comment[ca]=Proporciona un diàleg per a la selecció de l'Editor. -Comment[da]=Sørger for en dialog til editor-valg. -Comment[de]=Editor-Auswahl für TDevelop. -Comment[el]=Παρέχει ένα διάλογο για επιλογή επεξεργαστή. -Comment[en_GB]=Provides a dialogue for Editor selection. -Comment[es]=Proporciona un diálogo para la selección de un editor. -Comment[et]=Dialoog redaktori valimiseks. -Comment[eu]=Editorearen hautapenerako elkarrizketa-koadroa eskeintzen du. -Comment[fa]=محاوره‌ای برای گزینش ویرایشگر فراهم می‌کند. -Comment[fr]=Fournit une boîte de dialogue pour la sélection de l'éditeur. -Comment[ga]=Soláthraíonn sé dialóg roghnaithe eagarthóra. -Comment[gl]=Proporciona un diálogo para a selección dun editor. -Comment[hi]=संपादक चयन के लिए एक संवाद उपलब्ध कराता है. -Comment[hu]=A szövegszerkesztő komponens kiválasztását teszi lehetővé. -Comment[is]=Útvegar samtalsglugga fyrir val á ritli -Comment[it]=Fornisce a una finestra per la selezione dell'editor. -Comment[ja]=エディタを選択するためのダイアログを提供します。 -Comment[ms]=Menyediakan dialog untuk pemilihan Penyunting. -Comment[nds]=Stellt en Dialoog för de Editor-Utwahl praat. -Comment[ne]=सम्पादन चयनका लागि संवाद प्रदान गर्दछ -Comment[nl]=Biedt een dialoog om een editor te kiezen. -Comment[pl]=Okno dialogowe do wyboru edytora. -Comment[pt]=Fornece um diálogo para a selecção de Editor. -Comment[pt_BR]=Provê um diálogo para seleção do Editor. -Comment[ru]=Предоставляет диалог выбора редактора. -Comment[sk]=Poskytuje dialógové okno pre voľbu editora. -Comment[sl]=Ponuja pogovorno okno za izbiro urejevalnika -Comment[sr]=Обезбеђује прозор за избор уређивача. -Comment[sr@Latn]=Obezbeđuje prozor za izbor uređivača. -Comment[sv]=Tillhandahåller en dialogruta för val av editor. -Comment[ta]=தொகுப்பாளர் தேர்விற்கான உரையாடலைத் தரும் -Comment[tg]=Ба ихтиёр гузоштани гуфтугӯи интихоби муҳаррир. -Comment[tr]=Düzenleyici seçimi için bir pencere sağlar -Comment[zh_CN]=提供编辑器选择对话框 -Comment[zh_TW]=提供對話框以編輯選擇。 -Name=TDevEditorChooser -Name[da]=TDevelop Editorvælger -Name[de]=Editor-Auswahl (TDevelop) -Name[hi]=के-डेव-एडिटर-चूसर -Name[nds]=TDevelop-Editorutwahl -Name[ne]=केडीई विकास सम्पादक छनोटकर्ता -Name[pl]=KDevWybórEdytora -Name[sk]=TDevEditorVolič -Name[sv]=TDevelop editorväljare -Name[ta]=கெடெவ் தொகுப்பாளர் தேர்வாளர் -Name[tg]=KDevМуҳаррирИнтихобкунанда -Name[zh_TW]=TDevelop 編輯器選擇器 -GenericName=Editor Selection -GenericName[ca]=Selecció de l'Editor -GenericName[da]=Editorvalg -GenericName[de]=Editor-Auswahl -GenericName[el]=Επιλογή επεξεργαστή -GenericName[es]=Selección de un editor -GenericName[et]=Redaktori valimine -GenericName[eu]=Editore-hautapena -GenericName[fa]=گزینش ویرایشگر -GenericName[fr]=Sélection de l'éditeur -GenericName[ga]=Roghnú Eagarthóra -GenericName[gl]=Selección de editor -GenericName[hi]=संपादक चयन -GenericName[hu]=Szerkesztőkomponens-választás -GenericName[it]=Selezione Editor -GenericName[ja]=エディタの選択 -GenericName[ms]=Pemilih Penyunting -GenericName[nds]=Editor-Utwahl -GenericName[ne]=सम्पादक चयन -GenericName[nl]=Editorkiezer -GenericName[pl]=Wybór edytora -GenericName[pt]=Selecção de Editor -GenericName[pt_BR]=Seleção de Editor -GenericName[ru]=Выбор редактора -GenericName[sk]=Voľba editora -GenericName[sl]=Izbira urejevalnika -GenericName[sr]=Избор уређивача -GenericName[sr@Latn]=Izbor uređivača -GenericName[sv]=Val av editor -GenericName[ta]=தொகுப்பாளர் தேர்வு -GenericName[tg]=Интихоби муҳаррир -GenericName[tr]=Düzenleyici Seçimi -GenericName[zh_CN]=编辑器选择 -GenericName[zh_TW]=編輯器選擇 -Icon=tdevelop -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdeveditorchooser -X-TDevelop-Version=5 -X-TDevelop-Scope=Core -X-TDevelop-Properties=EditorChooser diff --git a/embedded/visualboyadvance/CMakeLists.txt b/embedded/visualboyadvance/CMakeLists.txt index cd281f67..be7cf42f 100644 --- a/embedded/visualboyadvance/CMakeLists.txt +++ b/embedded/visualboyadvance/CMakeLists.txt @@ -23,9 +23,9 @@ link_directories( ) -##### tdevvisualboyadvance (module) ############# +##### kdevvisualboyadvance (module) ############# -tde_add_kpart( libtdevvisualboyadvance AUTOMOC +tde_add_kpart( libkdevvisualboyadvance AUTOMOC SOURCES visualboyadvance_part.cpp vbaconfigwidgetbase.ui vbaconfigwidget.cpp LINK tdevelop-shared @@ -36,11 +36,11 @@ tde_add_kpart( libtdevvisualboyadvance AUTOMOC ##### other data ################################ install( - FILES tdevvisualboyadvance.desktop + FILES kdevvisualboyadvance.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) install( - FILES tdevpart_visualboyadvance.rc - DESTINATION ${DATA_INSTALL_DIR}/tdevvisualboyadvance + FILES kdevpart_visualboyadvance.rc + DESTINATION ${DATA_INSTALL_DIR}/kdevvisualboyadvance ) diff --git a/embedded/visualboyadvance/Makefile.am b/embedded/visualboyadvance/Makefile.am index 16fac82e..a866fd79 100644 --- a/embedded/visualboyadvance/Makefile.am +++ b/embedded/visualboyadvance/Makefile.am @@ -1,17 +1,17 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevvisualboyadvance.la -libtdevvisualboyadvance_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevvisualboyadvance_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevvisualboyadvance.la +libkdevvisualboyadvance_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevvisualboyadvance_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevvisualboyadvance_la_SOURCES = visualboyadvance_part.cpp vbaconfigwidgetbase.ui vbaconfigwidget.cpp +libkdevvisualboyadvance_la_SOURCES = visualboyadvance_part.cpp vbaconfigwidgetbase.ui vbaconfigwidget.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevvisualboyadvance.desktop +service_DATA = kdevvisualboyadvance.desktop -rcdir = $(kde_datadir)/tdevvisualboyadvance -rc_DATA = tdevpart_visualboyadvance.rc +rcdir = $(kde_datadir)/kdevvisualboyadvance +rc_DATA = kdevpart_visualboyadvance.rc diff --git a/embedded/visualboyadvance/tdevpart_visualboyadvance.rc b/embedded/visualboyadvance/kdevpart_visualboyadvance.rc similarity index 100% rename from embedded/visualboyadvance/tdevpart_visualboyadvance.rc rename to embedded/visualboyadvance/kdevpart_visualboyadvance.rc diff --git a/embedded/visualboyadvance/kdevvisualboyadvance.desktop b/embedded/visualboyadvance/kdevvisualboyadvance.desktop new file mode 100644 index 00000000..292fe6de --- /dev/null +++ b/embedded/visualboyadvance/kdevvisualboyadvance.desktop @@ -0,0 +1,86 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=VisualBoyAdvance is a GameBoyAdvance emulator. http://vboy.emuhq.com/ +Comment[ca]=VisualBoyAdvance és un emulador de GameBoyAdvance. http://vboy.emuhq.com/ +Comment[da]=VisualBoyAdvance er en GameBoyAdvance emulator. http://vboy.emuhq.com/ +Comment[de]=VisualBoy Advance ist ein Emulator für den GameBoy Advance (http://vboy.emuhq.com/) +Comment[el]=Το VisualBoyAdvance είναι ένας εξομοιωτής του GameBoyAdvance. http://vboy.emuhq.com/ +Comment[es]=VisualBoyAdvance es un emulador de GameBoyAdvance. http://vboy.emuhq.com/ +Comment[et]=VisualBoyAdvance on GameBoyAdvance emulaator. http://vboy.emuhq.com/ +Comment[eu]=VisualBoyAdvance GameBoyAdvance-en emulatzaile bat da. http://vboy.emuhq.com/ +Comment[fa]=VisualBoyAdvance یک مقلد GameBoyAdvanc است. http://vboy.emuhq.com/ +Comment[fr]=VisualBoyAdvance est un émulateur de GameBoyAdvance. http://vboy.emuhq.com/ +Comment[ga]=Is aithriseoir GameBoyAdvance é VisualBoyAdvance. Féach ar http://vboy.emuhq.com/ +Comment[gl]=VisualBoyAdvance é un emulador de GameBoyAdvance. http://vboy.emuhq.com/ +Comment[hi]=विज़ुअल-बॉय-एडवांस एक गेम-बॉय-एडवांस एमुलेटर है. http://vboy.emuhq.com/ +Comment[hu]=A VisualBoyAdvance egy emulátor a Game Boy Advance-hoz - http://vboy.emuhq.com/ +Comment[is]=VisualBoyAdvance er GameBoyAdvance hermir. http://vboy.emuhq.com/ +Comment[it]=VisualBoyAdvance è un emulatore per GameBoyAdvance. http://vboy.emuhq.com/ +Comment[ja]=VisualBoyAdvance は、ゲームボーイアドバンスエミュレータです。http://vboy.emuhq.com/ +Comment[ms]=VisualBoyAdvance adalah emulator GameBoyAdvance. http://vboy.emuhq.com/ +Comment[nds]=VisualBoy Advance is en GameBoy-Advance-Emulator (http://vboy.emuhq.com/) +Comment[ne]=VisualBoyAdvance एउटा GameBoyAdvance इमुलेटर हो । http://vboy.emuhq.com/ +Comment[nl]=VisualBoyAdvance is een GameBoyAdvance-emulator (http://vboy.emuhq.com/ +Comment[pl]=VisualBoyAdvance to emulator GameBoyAdvance. http://vboy.emuhq.com/ +Comment[pt]=O VisualBoyAdvance é um emulador do GameBoyAdvance. http://vboy.emuhq.com/ +Comment[pt_BR]=VisualBoyAdvance é um emulador do GameBoyAdvance. http://vboy.emuhq.com/ +Comment[ru]=VisualBoyAdvance - эмулятор GameBoyAdvance. http://vboy.emuhq.com/ +Comment[sk]=VisualBoyAdvance je emulátor GameBoyAdvance. http://vboy.emuhq.com/ +Comment[sl]=VisualBoyAdvance je emulator GameBoyAdvance. http://vboy.emuhq.com/ +Comment[sr]=VisualBoyAdvance je емулатор GameBoyAdvance-а. http://vboy.emuhq.com/ +Comment[sr@Latn]=VisualBoyAdvance je emulator GameBoyAdvance-a. http://vboy.emuhq.com/ +Comment[sv]=VisualBoyAdvance är en emulator för GameBoyAdvance. http://vboy.emuhq.com/ +Comment[ta]=கெடெவ் காட்சியாக்க பாய் அட்வான்ஸ் பொன்மி.. http://vboy.emuhq.com/ +Comment[tg]=VisualBoyAdvance-ин эмулятори GameBoyAdvance мебошад. http://vboy.emuhq.com/ +Comment[tr]=VisualBoyAdvance bir GameBoyAdvance emülatörüdür: http://vboy.emuhq.com/ +Comment[zh_CN]=VisualBoyAdvance 是 GameBoyAdvance 的模拟器。http://vboy.emuhq.com/ +Comment[zh_TW]=VisualBoyAdvance 是一個 GameBoyAdvance 模擬器。http://vboy.emuhq.com/ +Name=KDevVisualBoyAdvance +Name[da]=TDevelop VisualBoyAdvance +Name[de]=VisualBoy Advance (TDevelop) +Name[hi]=के-डेव-विज़ुअल-बॉय-एडवांस +Name[nds]=VisualBoy Advance för TDevelop +Name[sv]=TDevelop Visual Boy Advance +Name[ta]=கெடெவ் காட்சியாக்க பாய் அட்வான்ஸ் +Name[zh_TW]=TDevelop VisualBoyAdvance +GenericName=VisualBoyAdvance Support +GenericName[ca]=Suport per a VisualBoyAdvance +GenericName[da]=VisualBoyAdvance understøttelse +GenericName[de]=Unterstützung für VisualBoy Advance +GenericName[el]=Υποστήριξη VisualBoyAdvance +GenericName[es]=Soporte para VisualBoyAdvance +GenericName[et]=VisualBoyAdvance toetus +GenericName[eu]=VisualBoyAdvance euskarria +GenericName[fa]=پشتیبانی VisualBoyAdvance +GenericName[fr]=Prise en charge de VisualBoyAdvance +GenericName[ga]=Tacaíocht VisualBoyAdvance +GenericName[gl]=Soporte de VisualBoyAdvance +GenericName[hu]=VisualBoyAdvance-támogatás +GenericName[it]=Supporto per VisualBoyAdvance +GenericName[ja]=VisualBoyAdvance サポート +GenericName[ms]=Sokongan VisualBoyAdvance +GenericName[nds]=Unnerstütten för VisualBoy Advance +GenericName[ne]=VisualBoyAdvance समर्थन +GenericName[nl]=Ondersteuning voor VisualBoyAdvance +GenericName[pl]=Obsługa VisualBoyAdvance +GenericName[pt]=Suporte a VisualBoyAdvance +GenericName[pt_BR]=Suporte ao VisualBoyAdvance +GenericName[ru]=Поддержка VisualBoyAdvance +GenericName[sk]=VisualBoyAdvance podpora +GenericName[sl]=Podpora VisualBoyAdvance +GenericName[sr]=Подршка за VisualBoyAdvance +GenericName[sr@Latn]=Podrška za VisualBoyAdvance +GenericName[sv]=Stöd för Visual Boy Advance +GenericName[ta]=காட்சியாக்க பாய் அட்வான்ஸ் ஆதரவு +GenericName[tg]=Ёри намудан ба VisualBoyAdvance +GenericName[tr]=VisualBoyAdvance Desteği +GenericName[zh_CN]=VisualBoyAdvance 支持 +GenericName[zh_TW]=VisualBoyAdvance 支援 +Icon=tdevelop +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevvisualboyadvance +X-TDevelop-Version=5 +X-TDevelop-Scope=Project +Keywords=GBA +Keywords[hi]=जीबीए diff --git a/embedded/visualboyadvance/tdevvisualboyadvance.desktop b/embedded/visualboyadvance/tdevvisualboyadvance.desktop deleted file mode 100644 index a50ec24f..00000000 --- a/embedded/visualboyadvance/tdevvisualboyadvance.desktop +++ /dev/null @@ -1,86 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=VisualBoyAdvance is a GameBoyAdvance emulator. http://vboy.emuhq.com/ -Comment[ca]=VisualBoyAdvance és un emulador de GameBoyAdvance. http://vboy.emuhq.com/ -Comment[da]=VisualBoyAdvance er en GameBoyAdvance emulator. http://vboy.emuhq.com/ -Comment[de]=VisualBoy Advance ist ein Emulator für den GameBoy Advance (http://vboy.emuhq.com/) -Comment[el]=Το VisualBoyAdvance είναι ένας εξομοιωτής του GameBoyAdvance. http://vboy.emuhq.com/ -Comment[es]=VisualBoyAdvance es un emulador de GameBoyAdvance. http://vboy.emuhq.com/ -Comment[et]=VisualBoyAdvance on GameBoyAdvance emulaator. http://vboy.emuhq.com/ -Comment[eu]=VisualBoyAdvance GameBoyAdvance-en emulatzaile bat da. http://vboy.emuhq.com/ -Comment[fa]=VisualBoyAdvance یک مقلد GameBoyAdvanc است. http://vboy.emuhq.com/ -Comment[fr]=VisualBoyAdvance est un émulateur de GameBoyAdvance. http://vboy.emuhq.com/ -Comment[ga]=Is aithriseoir GameBoyAdvance é VisualBoyAdvance. Féach ar http://vboy.emuhq.com/ -Comment[gl]=VisualBoyAdvance é un emulador de GameBoyAdvance. http://vboy.emuhq.com/ -Comment[hi]=विज़ुअल-बॉय-एडवांस एक गेम-बॉय-एडवांस एमुलेटर है. http://vboy.emuhq.com/ -Comment[hu]=A VisualBoyAdvance egy emulátor a Game Boy Advance-hoz - http://vboy.emuhq.com/ -Comment[is]=VisualBoyAdvance er GameBoyAdvance hermir. http://vboy.emuhq.com/ -Comment[it]=VisualBoyAdvance è un emulatore per GameBoyAdvance. http://vboy.emuhq.com/ -Comment[ja]=VisualBoyAdvance は、ゲームボーイアドバンスエミュレータです。http://vboy.emuhq.com/ -Comment[ms]=VisualBoyAdvance adalah emulator GameBoyAdvance. http://vboy.emuhq.com/ -Comment[nds]=VisualBoy Advance is en GameBoy-Advance-Emulator (http://vboy.emuhq.com/) -Comment[ne]=VisualBoyAdvance एउटा GameBoyAdvance इमुलेटर हो । http://vboy.emuhq.com/ -Comment[nl]=VisualBoyAdvance is een GameBoyAdvance-emulator (http://vboy.emuhq.com/ -Comment[pl]=VisualBoyAdvance to emulator GameBoyAdvance. http://vboy.emuhq.com/ -Comment[pt]=O VisualBoyAdvance é um emulador do GameBoyAdvance. http://vboy.emuhq.com/ -Comment[pt_BR]=VisualBoyAdvance é um emulador do GameBoyAdvance. http://vboy.emuhq.com/ -Comment[ru]=VisualBoyAdvance - эмулятор GameBoyAdvance. http://vboy.emuhq.com/ -Comment[sk]=VisualBoyAdvance je emulátor GameBoyAdvance. http://vboy.emuhq.com/ -Comment[sl]=VisualBoyAdvance je emulator GameBoyAdvance. http://vboy.emuhq.com/ -Comment[sr]=VisualBoyAdvance je емулатор GameBoyAdvance-а. http://vboy.emuhq.com/ -Comment[sr@Latn]=VisualBoyAdvance je emulator GameBoyAdvance-a. http://vboy.emuhq.com/ -Comment[sv]=VisualBoyAdvance är en emulator för GameBoyAdvance. http://vboy.emuhq.com/ -Comment[ta]=கெடெவ் காட்சியாக்க பாய் அட்வான்ஸ் பொன்மி.. http://vboy.emuhq.com/ -Comment[tg]=VisualBoyAdvance-ин эмулятори GameBoyAdvance мебошад. http://vboy.emuhq.com/ -Comment[tr]=VisualBoyAdvance bir GameBoyAdvance emülatörüdür: http://vboy.emuhq.com/ -Comment[zh_CN]=VisualBoyAdvance 是 GameBoyAdvance 的模拟器。http://vboy.emuhq.com/ -Comment[zh_TW]=VisualBoyAdvance 是一個 GameBoyAdvance 模擬器。http://vboy.emuhq.com/ -Name=KDevVisualBoyAdvance -Name[da]=TDevelop VisualBoyAdvance -Name[de]=VisualBoy Advance (TDevelop) -Name[hi]=के-डेव-विज़ुअल-बॉय-एडवांस -Name[nds]=VisualBoy Advance för TDevelop -Name[sv]=TDevelop Visual Boy Advance -Name[ta]=கெடெவ் காட்சியாக்க பாய் அட்வான்ஸ் -Name[zh_TW]=TDevelop VisualBoyAdvance -GenericName=VisualBoyAdvance Support -GenericName[ca]=Suport per a VisualBoyAdvance -GenericName[da]=VisualBoyAdvance understøttelse -GenericName[de]=Unterstützung für VisualBoy Advance -GenericName[el]=Υποστήριξη VisualBoyAdvance -GenericName[es]=Soporte para VisualBoyAdvance -GenericName[et]=VisualBoyAdvance toetus -GenericName[eu]=VisualBoyAdvance euskarria -GenericName[fa]=پشتیبانی VisualBoyAdvance -GenericName[fr]=Prise en charge de VisualBoyAdvance -GenericName[ga]=Tacaíocht VisualBoyAdvance -GenericName[gl]=Soporte de VisualBoyAdvance -GenericName[hu]=VisualBoyAdvance-támogatás -GenericName[it]=Supporto per VisualBoyAdvance -GenericName[ja]=VisualBoyAdvance サポート -GenericName[ms]=Sokongan VisualBoyAdvance -GenericName[nds]=Unnerstütten för VisualBoy Advance -GenericName[ne]=VisualBoyAdvance समर्थन -GenericName[nl]=Ondersteuning voor VisualBoyAdvance -GenericName[pl]=Obsługa VisualBoyAdvance -GenericName[pt]=Suporte a VisualBoyAdvance -GenericName[pt_BR]=Suporte ao VisualBoyAdvance -GenericName[ru]=Поддержка VisualBoyAdvance -GenericName[sk]=VisualBoyAdvance podpora -GenericName[sl]=Podpora VisualBoyAdvance -GenericName[sr]=Подршка за VisualBoyAdvance -GenericName[sr@Latn]=Podrška za VisualBoyAdvance -GenericName[sv]=Stöd för Visual Boy Advance -GenericName[ta]=காட்சியாக்க பாய் அட்வான்ஸ் ஆதரவு -GenericName[tg]=Ёри намудан ба VisualBoyAdvance -GenericName[tr]=VisualBoyAdvance Desteği -GenericName[zh_CN]=VisualBoyAdvance 支持 -GenericName[zh_TW]=VisualBoyAdvance 支援 -Icon=tdevelop -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevvisualboyadvance -X-TDevelop-Version=5 -X-TDevelop-Scope=Project -Keywords=GBA -Keywords[hi]=जीबीए diff --git a/embedded/visualboyadvance/visualboyadvance_part.cpp b/embedded/visualboyadvance/visualboyadvance_part.cpp index a3b842f4..873cd01d 100644 --- a/embedded/visualboyadvance/visualboyadvance_part.cpp +++ b/embedded/visualboyadvance/visualboyadvance_part.cpp @@ -4,30 +4,30 @@ #include #include -#include +#include #include #include -#include "tdevcore.h" -#include "tdevproject.h" -#include "tdevappfrontend.h" +#include "kdevcore.h" +#include "kdevproject.h" +#include "kdevappfrontend.h" #include "domutil.h" -#include "tdevplugininfo.h" +#include "kdevplugininfo.h" #include "vbaconfigwidget.h" using namespace VisualBoyAdvance; -typedef TDevGenericFactory VisualBoyAdvanceFactory; -static const TDevPluginInfo data("tdevvisualboyadvance"); -K_EXPORT_COMPONENT_FACTORY( libtdevvisualboyadvance, VisualBoyAdvanceFactory( data ) ) +typedef KDevGenericFactory VisualBoyAdvanceFactory; +static const KDevPluginInfo data("kdevvisualboyadvance"); +K_EXPORT_COMPONENT_FACTORY( libkdevvisualboyadvance, VisualBoyAdvanceFactory( data ) ) VisualBoyAdvancePart::VisualBoyAdvancePart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin(&data, parent, name){ + : KDevPlugin(&data, parent, name){ setInstance(VisualBoyAdvanceFactory::instance()); - setXMLFile("tdevpart_visualboyadvance.rc"); + setXMLFile("kdevpart_visualboyadvance.rc"); TDEAction *action; action = new TDEAction( i18n("Execute Program"), "exec", Key_F9, @@ -44,7 +44,7 @@ VisualBoyAdvancePart::~VisualBoyAdvancePart() } void VisualBoyAdvancePart::slotExecute(){ - TDevProject* prj = project(); + KDevProject* prj = project(); TQDomDocument &doc = *projectDom(); TQString binary = DomUtil::readEntry(doc, "/kdevvisualadvance/binary"); TQString emulator = DomUtil::readEntry(doc, "/kdevvisualadvance/emulator"); @@ -62,7 +62,7 @@ void VisualBoyAdvancePart::slotExecute(){ program += prj->projectDirectory() + "/" + binary; - if (TDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) + if (KDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) appFrontend->startAppCommand(TQString(), program, terminal); } diff --git a/embedded/visualboyadvance/visualboyadvance_part.h b/embedded/visualboyadvance/visualboyadvance_part.h index 17a2ade8..941e0ff2 100644 --- a/embedded/visualboyadvance/visualboyadvance_part.h +++ b/embedded/visualboyadvance/visualboyadvance_part.h @@ -3,15 +3,15 @@ */ -#ifndef __TDEVPART_VISUALBOYADVANCE_H__ -#define __TDEVPART_VISUALBOYADVANCE_H__ +#ifndef __KDEVPART_VISUALBOYADVANCE_H__ +#define __KDEVPART_VISUALBOYADVANCE_H__ #include -#include +#include #include namespace VisualBoyAdvance { - class VisualBoyAdvancePart : public TDevPlugin + class VisualBoyAdvancePart : public KDevPlugin { Q_OBJECT diff --git a/kdevassistant.desktop b/kdevassistant.desktop new file mode 100644 index 00000000..0e8192cf --- /dev/null +++ b/kdevassistant.desktop @@ -0,0 +1,73 @@ +[Desktop Entry] +Type=Application +Exec=kdevassistant %u +Icon=tdevelop +DocPath=tdevelop/index.html +Terminal=false +Name=TDevelop Assistant +Name[br]=Skoazeller TDevelop +Name[ca]=Assistent per a TDevelop +Name[cy]=Cymhorthwr TDevelop +Name[da]=TDevelop assistent +Name[de]=TDevelop-Assistent +Name[el]=Βοηθός TDevelop +Name[es]=Asistente de TDevelop +Name[et]=TDevelopi abiline +Name[eu]=TDevelop laguntzailea +Name[fa]=دستیار TDevelop +Name[fr]=Assistant de TDevelop +Name[it]=Assistente di TDevelop +Name[ja]=TDevelop アシスタント +Name[ms]=Pembantu TDevelop +Name[nds]=TDevelop-Hölper +Name[ne]=केडीई विकास सहायक +Name[nl]=TDevelop Assistent +Name[pl]=Asystent TDevelop +Name[pt]=Assistente do TDevelop +Name[pt_BR]=Assistente do TDevelop +Name[sk]=TDevelop asistent +Name[sl]=Pomočnik za TDevelop +Name[sr]=TDevelop-ов асистент +Name[sr@Latn]=TDevelop-ov asistent +Name[sv]=TDevelop assistent +Name[ta]=Kஉருவாக்கு உதவி +Name[tg]=TDevelop Ассистент +Name[zh_CN]=TDevelop 助手 +Name[zh_TW]=TDevelop 助理 +GenericName=Documentation Viewer +GenericName[br]=Gweler an teuliadur +GenericName[ca]=Visor de documentació +GenericName[da]=Dokumentationsfremviser +GenericName[de]=Dokumentationsbetrachter +GenericName[el]=Προβολέας τεκμηρίωσης +GenericName[es]=Visor de documentación +GenericName[et]=Dokumentatsiooninäitaja +GenericName[eu]=Documentazio ikustailea +GenericName[fa]=مشاهده‌گر مستندات +GenericName[fr]=Afficheur de documentation +GenericName[ga]=Amharcán Doiciméadithe +GenericName[gl]=Visor de documentación +GenericName[hu]=Dokumentációmegjelenítő +GenericName[it]=Visualizzatore documentazione +GenericName[ja]=ドキュメンテーションビューア +GenericName[ms]=Pelihat Dokumentasi +GenericName[nds]=Dokmentatschoonkieker +GenericName[ne]=मिलिसीकरण दृश्यकर्ता +GenericName[nl]=Documentatie Browser +GenericName[pa]=ਦਸਤਾਵੇਜ਼ ਦਰਸ਼ਕ +GenericName[pl]=Przeglądarka dokumentacji +GenericName[pt]=Visualizador de Documentação +GenericName[pt_BR]=Visualizador de Documentação +GenericName[ru]=Просмотр документации +GenericName[sk]=Prezerač dokumentácie +GenericName[sl]=Pregledovalnik dokumentacije +GenericName[sr]=Приказивач документације +GenericName[sr@Latn]=Prikazivač dokumentacije +GenericName[sv]=Dokumentationsvisning +GenericName[ta]=ஆவணமாக்கல் காட்சியமைப்பாளர் +GenericName[tg]=Аз назар бо ҳуҷҷатнок гузарондан +GenericName[tr]=Belge Gösterici +GenericName[zh_CN]=文档查看器 +GenericName[zh_TW]=文件檢視器 +X-DCOP-ServiceType=Multi +Categories=Qt;TDE;Development;Documentation;X-TDE-TDevelopIDE; diff --git a/kdevdesigner/AUTHORS b/kdevdesigner/AUTHORS new file mode 100644 index 00000000..40d295ec --- /dev/null +++ b/kdevdesigner/AUTHORS @@ -0,0 +1,4 @@ +KDevDesigner: Alexander Dymo +Qt Designer Copyright: (C) 2000-2003 Trolltech AS All Rights Reserved + + diff --git a/tdevdesigner/CMakeLists.txt b/kdevdesigner/CMakeLists.txt similarity index 100% rename from tdevdesigner/CMakeLists.txt rename to kdevdesigner/CMakeLists.txt diff --git a/tdevdesigner/LICENSE.GPL b/kdevdesigner/LICENSE.GPL similarity index 100% rename from tdevdesigner/LICENSE.GPL rename to kdevdesigner/LICENSE.GPL diff --git a/tdevdesigner/Makefile.am b/kdevdesigner/Makefile.am similarity index 100% rename from tdevdesigner/Makefile.am rename to kdevdesigner/Makefile.am diff --git a/tdevdesigner/NEWS b/kdevdesigner/NEWS similarity index 100% rename from tdevdesigner/NEWS rename to kdevdesigner/NEWS diff --git a/kdevdesigner/README b/kdevdesigner/README new file mode 100644 index 00000000..99b55648 --- /dev/null +++ b/kdevdesigner/README @@ -0,0 +1,25 @@ +KDevDesigner is a port of Qt Designer (code taken from Qt 3.3 distribution) to KDE technologies: +1) XML GUI +2) KParts +3) KFileDialog +4) TDEIconLoader + +KDevDesigner consists of a part and a shell. +Part can be used in Konqueror and KDevelop to edit and view ui files and projects. +Shell loads a part with "in shell" argument so that the part can create projects and ui files. + +Other important notes: +KDevDesignerPart is Read/Write part which ignores readonly mode. +Designer Editor plugins are not loaded. +Available in system designer plugins are loaded if possible (tested with Qt 3.3 version). + +KDevDesignerPart integration: +KDevDesignerPart implements KInterfaceDesigner interface (defined in tdevelop/lib/external_interfaces). + +WARNING: +If you want to modify this code, try to introduce as few modifications to original Qt Designer code as possible. +Write your own classes and wrappers instead. The goal is to ease syncronization between the port and original Qt Designer. +Feel free to modify kdevdesigner_part.h(cpp) though. + +FUTURE: +Trolltech promises that Qt 4 will have easilly embeddable designer. If that happens, this port will be dropped for KDevelop 4. diff --git a/tdevdesigner/TODO b/kdevdesigner/TODO similarity index 100% rename from tdevdesigner/TODO rename to kdevdesigner/TODO diff --git a/kdevdesigner/designer/CMakeLists.txt b/kdevdesigner/designer/CMakeLists.txt new file mode 100644 index 00000000..4cdcea2b --- /dev/null +++ b/kdevdesigner/designer/CMakeLists.txt @@ -0,0 +1,107 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +add_definitions( -DDESIGNER -UQT_NO_ASCII_CAST ) + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/kdevdesigner/shared + ${CMAKE_SOURCE_DIR}/lib/interfaces/external + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### other data ################################ + +install( FILES + kdevdesigner_part.desktop + DESTINATION ${SERVICES_INSTALL_DIR} ) + +install( FILES + kdevdesigner_part.rc kdevdesigner_part_sh.rc + DESTINATION ${DATA_INSTALL_DIR}/kdevdesignerpart ) + +add_subdirectory( pics ) + + +##### libkdevdesignerpart (module) ############## + +set( SRCS + about.ui dbconnection.ui gotolinedialog.ui + newform.ui actionlistview.cpp asciivalidator.cpp + command.cpp connectionitems.cpp connectiontable.cpp + customwidgeteditor.ui formsettings.ui + multilineeditor.ui customwidgeteditorimpl.cpp + database.cpp dbconnectioneditor.ui iconvieweditor.ui + paletteeditor.ui dbconnectionimpl.cpp dbconnectionsimpl.cpp + dbconnections.ui listboxeditor.ui paletteeditoradvanced.ui + defs.cpp designerapp.cpp designerappiface.cpp + editfunctionsimpl.cpp filechooser.cpp formfile.cpp + formsettingsimpl.cpp formwindow.cpp hierarchyview.cpp + iconvieweditorimpl.cpp layout.cpp listboxdnd.cpp + kdevdesigner_part.cpp actiondnd.cpp actioneditorimpl.cpp + listboxeditorimpl.cpp listboxrename.cpp listdnd.cpp + listeditor.ui pixmapcollectioneditor.ui listviewdnd.cpp + listvieweditorimpl.cpp mainwindow.cpp listvieweditor.ui + pixmapfunction.ui startdialog.ui mainwindowactions.cpp + menubareditor.cpp metadatabase.cpp multilineeditorimpl.cpp + newformimpl.cpp orderindicator.cpp myiconloader.cpp + outputwindow.cpp paletteeditoradvancedimpl.cpp + paletteeditorimpl.cpp pixmapchooser.cpp + pixmapcollection.cpp popupmenueditor.cpp previewframe.cpp + preferences.ui tableeditor.ui designeraction.cpp + previewwidget.ui variabledialog.ui actioneditor.ui + previewwidgetimpl.cpp project.cpp projectsettingsimpl.cpp + projectsettings.ui wizardeditor.ui configtoolboxdialog.ui + propertyeditor.cpp propertyobject.cpp qcompletionedit.cpp + replacedialog.ui connectiondialog.ui editfunctions.ui + resource.cpp sizehandle.cpp sourceeditor.cpp + richtextfontdialog.ui createtemplate.ui finddialog.ui + sourcefile.cpp startdialogimpl.cpp styledbutton.cpp + syntaxhighlighter_html.cpp tableeditorimpl.cpp + timestamp.cpp variabledialogimpl.cpp widgetaction.cpp + widgetfactory.cpp wizardeditorimpl.cpp workspace.cpp +) + +tde_moc( SRCS + actiondnd.h actioneditorimpl.h actionlistview.h + asciivalidator.h command.h connectionitems.h + connectiontable.h customwidgeteditorimpl.h database.h + dbconnectionimpl.h dbconnectionsimpl.h editfunctionsimpl.h + filechooser.h formfile.h formsettingsimpl.h + formwindow.h hierarchyview.h iconvieweditorimpl.h + layout.h listboxdnd.h listboxeditorimpl.h listboxrename.h + listdnd.h listviewdnd.h listvieweditorimpl.h mainwindow.h + menubareditor.h multilineeditorimpl.h newformimpl.h + orderindicator.h outputwindow.h paletteeditoradvancedimpl.h + paletteeditorimpl.h pixmapchooser.h popupmenueditor.h + previewframe.h previewwidgetimpl.h project.h + projectsettingsimpl.h propertyeditor.h qcompletionedit.h + sizehandle.h sourceeditor.h sourcefile.h startdialogimpl.h + styledbutton.h tableeditorimpl.h timestamp.h + variabledialogimpl.h widgetaction.h widgetfactory.h + wizardeditorimpl.h workspace.h + ) + + +tde_add_kpart( libkdevdesignerpart AUTOMOC + SOURCES ${SRCS} + LINK + kdevqui-static shared-static kinterfacedesigner-shared + tdeio-shared tdeparts-shared tqassistantclient + DESTINATION ${PLUGIN_INSTALL_DIR} +) diff --git a/kdevdesigner/designer/Makefile.am b/kdevdesigner/designer/Makefile.am new file mode 100644 index 00000000..1857de19 --- /dev/null +++ b/kdevdesigner/designer/Makefile.am @@ -0,0 +1,21 @@ +SUBDIRS = pics + +AM_CXXFLAGS=-DDESIGNER +KDE_CXXFLAGS=-UQT_NO_ASCII_CAST +INCLUDES = -I$(top_srcdir)/kdevdesigner/shared \ + -I$(top_srcdir)/lib/interfaces/external $(all_includes) +METASOURCES = AUTO +kde_module_LTLIBRARIES = libkdevdesignerpart.la +libkdevdesignerpart_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) +libkdevdesignerpart_la_LIBADD = \ + $(top_builddir)/kdevdesigner/uilib/libkdevqui.la $(top_builddir)/kdevdesigner/shared/libshared.la \ + $(top_builddir)/lib/interfaces/external/libkinterfacedesigner.la $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) -ltqassistantclient $(LIB_TDEFILE) $(LIB_TDEPARTS) +libkdevdesignerpart_la_SOURCES = kdevdesigner_part.cpp actiondnd.cpp actioneditorimpl.cpp actionlistview.cpp asciivalidator.cpp command.cpp connectionitems.cpp connectiontable.cpp customwidgeteditorimpl.cpp database.cpp dbconnectionimpl.cpp dbconnectionsimpl.cpp defs.cpp designerapp.cpp designerappiface.cpp editfunctionsimpl.cpp filechooser.cpp formfile.cpp formsettingsimpl.cpp formwindow.cpp hierarchyview.cpp iconvieweditorimpl.cpp layout.cpp listboxdnd.cpp listboxeditorimpl.cpp listboxrename.cpp listdnd.cpp listviewdnd.cpp listvieweditorimpl.cpp mainwindow.cpp mainwindowactions.cpp menubareditor.cpp metadatabase.cpp multilineeditorimpl.cpp newformimpl.cpp orderindicator.cpp outputwindow.cpp paletteeditoradvancedimpl.cpp paletteeditorimpl.cpp pixmapchooser.cpp pixmapcollection.cpp popupmenueditor.cpp previewframe.cpp previewwidgetimpl.cpp project.cpp projectsettingsimpl.cpp propertyeditor.cpp propertyobject.cpp qcompletionedit.cpp resource.cpp sizehandle.cpp sourceeditor.cpp sourcefile.cpp startdialogimpl.cpp styledbutton.cpp syntaxhighlighter_html.cpp tableeditorimpl.cpp timestamp.cpp variabledialogimpl.cpp widgetaction.cpp widgetfactory.cpp wizardeditorimpl.cpp workspace.cpp about.ui dbconnection.ui gotolinedialog.ui newform.ui previewwidget.ui variabledialog.ui actioneditor.ui dbconnectioneditor.ui iconvieweditor.ui paletteeditor.ui projectsettings.ui wizardeditor.ui configtoolboxdialog.ui dbconnections.ui listboxeditor.ui paletteeditoradvanced.ui replacedialog.ui connectiondialog.ui editfunctions.ui listeditor.ui pixmapcollectioneditor.ui richtextfontdialog.ui createtemplate.ui finddialog.ui listvieweditor.ui pixmapfunction.ui startdialog.ui customwidgeteditor.ui formsettings.ui multilineeditor.ui preferences.ui tableeditor.ui designeraction.cpp myiconloader.cpp +partrcdir = $(kde_datadir)/kdevdesignerpart +partdesktopdir = $(kde_servicesdir) +partdesktop_DATA = kdevdesigner_part.desktop +partrc_DATA = kdevdesigner_part.rc kdevdesigner_part_sh.rc +noinst_HEADERS = kdevdesigner_part.h designeraction.h myiconloader.h +picsdirdir = $(kde_datadir)/kdevdesignerpart/pics + +KDE_OPTIONS=nofinal diff --git a/tdevdesigner/designer/about.ui b/kdevdesigner/designer/about.ui similarity index 100% rename from tdevdesigner/designer/about.ui rename to kdevdesigner/designer/about.ui diff --git a/tdevdesigner/designer/actiondnd.cpp b/kdevdesigner/designer/actiondnd.cpp similarity index 100% rename from tdevdesigner/designer/actiondnd.cpp rename to kdevdesigner/designer/actiondnd.cpp diff --git a/tdevdesigner/designer/actiondnd.h b/kdevdesigner/designer/actiondnd.h similarity index 100% rename from tdevdesigner/designer/actiondnd.h rename to kdevdesigner/designer/actiondnd.h diff --git a/tdevdesigner/designer/actioneditor.ui b/kdevdesigner/designer/actioneditor.ui similarity index 100% rename from tdevdesigner/designer/actioneditor.ui rename to kdevdesigner/designer/actioneditor.ui diff --git a/tdevdesigner/designer/actioneditorimpl.cpp b/kdevdesigner/designer/actioneditorimpl.cpp similarity index 100% rename from tdevdesigner/designer/actioneditorimpl.cpp rename to kdevdesigner/designer/actioneditorimpl.cpp diff --git a/tdevdesigner/designer/actioneditorimpl.h b/kdevdesigner/designer/actioneditorimpl.h similarity index 100% rename from tdevdesigner/designer/actioneditorimpl.h rename to kdevdesigner/designer/actioneditorimpl.h diff --git a/tdevdesigner/designer/actionlistview.cpp b/kdevdesigner/designer/actionlistview.cpp similarity index 100% rename from tdevdesigner/designer/actionlistview.cpp rename to kdevdesigner/designer/actionlistview.cpp diff --git a/tdevdesigner/designer/actionlistview.h b/kdevdesigner/designer/actionlistview.h similarity index 100% rename from tdevdesigner/designer/actionlistview.h rename to kdevdesigner/designer/actionlistview.h diff --git a/tdevdesigner/designer/asciivalidator.cpp b/kdevdesigner/designer/asciivalidator.cpp similarity index 100% rename from tdevdesigner/designer/asciivalidator.cpp rename to kdevdesigner/designer/asciivalidator.cpp diff --git a/tdevdesigner/designer/asciivalidator.h b/kdevdesigner/designer/asciivalidator.h similarity index 100% rename from tdevdesigner/designer/asciivalidator.h rename to kdevdesigner/designer/asciivalidator.h diff --git a/kdevdesigner/designer/command.cpp b/kdevdesigner/designer/command.cpp new file mode 100644 index 00000000..b9b97827 --- /dev/null +++ b/kdevdesigner/designer/command.cpp @@ -0,0 +1,2475 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ +#include "command.h" +#include "formwindow.h" +#include "widgetfactory.h" +#include "propertyeditor.h" +#include "metadatabase.h" +#include +#include "mainwindow.h" +#include "hierarchyview.h" +#include "workspace.h" +#include "actioneditorimpl.h" +#include "actiondnd.h" +#include "formfile.h" +#include "../interfaces/languageinterface.h" +#include "menubareditor.h" +#include "popupmenueditor.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef TQT_NO_TABLE +#include +#endif +#include + +#include "kdevdesigner_part.h" + +#include + +CommandHistory::CommandHistory( int s ) + : current( -1 ), steps( s ), savedAt( -1 ) +{ + history.setAutoDelete( TRUE ); + modified = FALSE; + compressedCommand = 0; +} + +void CommandHistory::addCommand( Command *cmd, bool tryCompress ) +{ + if ( tryCompress ) { + if ( !compressedCommand || + compressedCommand->type() != cmd->type() || + !compressedCommand->canMerge( cmd ) ) { + checkCompressedCommand(); + compressedCommand = 0; + } + + if ( compressedCommand ) { + compressedCommand->merge( cmd ); + modified = TRUE; + modificationChanged( modified ); + return; + } + compressedCommand = cmd; + } else { + checkCompressedCommand(); + } + + if ( current < (int)history.count() - 1 ) { + if ( current < savedAt ) + savedAt = -2; + + TQPtrList commands; + commands.setAutoDelete( FALSE ); + + for( int i = 0; i <= current; ++i ) { + commands.insert( i, history.at( 0 ) ); + history.take( 0 ); + } + + commands.append( cmd ); + history.clear(); + history = commands; + history.setAutoDelete( TRUE ); + } else { + history.append( cmd ); + } + + if ( (int)history.count() > steps ) { + savedAt--; + history.removeFirst(); + } else { + ++current; + } + + emitUndoRedo(); + modified = TRUE; + modificationChanged( modified ); +} + +void CommandHistory::undo() +{ + checkCompressedCommand(); + compressedCommand = 0; + if ( current > -1 ) { + history.at( current )->unexecute(); + --current; + } + emitUndoRedo(); + modified = savedAt != current; + modificationChanged( modified ); +} + +void CommandHistory::redo() +{ + checkCompressedCommand(); + compressedCommand = 0; + if ( current > -1 ) { + if ( current < (int)history.count() - 1 ) { + ++current; + history.at( current )->execute(); + } + } else { + if ( history.count() > 0 ) { + ++current; + history.at( current )->execute(); + } + } + emitUndoRedo(); + modified = savedAt != current; + modificationChanged( modified ); +} + +void CommandHistory::emitUndoRedo() +{ + Command *undoCmd = 0; + Command *redoCmd = 0; + + if ( current >= 0 && current < (int)history.count() ) + undoCmd = history.at( current ); + if ( current + 1 >= 0 && current + 1 < (int)history.count() ) + redoCmd = history.at( current + 1 ); + + bool ua = (undoCmd != 0); + TQString uc; + if ( ua ) + uc = undoCmd->name(); + bool ra = (redoCmd != 0); + TQString rc; + if ( ra ) + rc = redoCmd->name(); + emit undoRedoChanged( ua, ra, uc, rc ); +} + +void CommandHistory::setModified( bool m ) +{ + modified = m; + if ( !modified ) + savedAt = current; + modificationChanged( modified ); +} + +bool CommandHistory::isModified() const +{ + return modified; +} + +void CommandHistory::checkCompressedCommand() +{ + if ( compressedCommand && compressedCommand->type() == Command::SetProperty ) { + Command *c = compressedCommand; + compressedCommand = 0; + if ( !( (SetPropertyCommand*)c )->checkProperty() ) { + history.remove( current ); + --current; + emitUndoRedo(); + } + } +} + +// ------------------------------------------------------------ + +Command::Command( const TQString &n, FormWindow *fw ) + : cmdName( n ), formWin( fw ) +{ +} + +Command::~Command() +{ +} + +TQString Command::name() const +{ + return cmdName; +} + +FormWindow *Command::formWindow() const +{ + return formWin; +} + +void Command::merge( Command * ) +{ +} + +bool Command::canMerge( Command * ) +{ + return FALSE; +} + +// ------------------------------------------------------------ + +ResizeCommand::ResizeCommand( const TQString &n, FormWindow *fw, + TQWidget *w, const TQRect &oldr, const TQRect &nr ) + : Command( n, fw ), widget( w ), oldRect( oldr ), newRect( nr ) +{ +} + +void ResizeCommand::execute() +{ + widget->setGeometry( newRect ); + formWindow()->updateSelection( widget ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(widget) ); + if ( WidgetFactory::layoutType( widget ) != WidgetFactory::NoLayout ) + formWindow()->updateChildSelections( widget ); +} + +void ResizeCommand::unexecute() +{ + widget->setGeometry( oldRect ); + formWindow()->updateSelection( widget ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(widget) ); + if ( WidgetFactory::layoutType( widget ) != WidgetFactory::NoLayout ) + formWindow()->updateChildSelections( widget ); +} + +// ------------------------------------------------------------ + +InsertCommand::InsertCommand( const TQString &n, FormWindow *fw, + TQWidget *w, const TQRect &g ) + : Command( n, fw ), widget( w ), geometry( g ) +{ +} + +void InsertCommand::execute() +{ + if ( geometry.size() == TQSize( 0, 0 ) ) { + widget->move( geometry.topLeft() ); + widget->adjustSize(); + } else { + TQSize s = geometry.size().expandedTo( widget->minimumSize() ); + s = s.expandedTo( widget->minimumSizeHint() ); + TQRect r( geometry.topLeft(), s ); + widget->setGeometry( r ); + } + widget->show(); + formWindow()->widgets()->insert( widget, widget ); + formWindow()->clearSelection( FALSE ); + formWindow()->selectWidget( TQT_TQOBJECT(widget) ); + formWindow()->mainWindow()->objectHierarchy()->widgetInserted( widget ); +} + +void InsertCommand::unexecute() +{ + widget->hide(); + formWindow()->selectWidget( TQT_TQOBJECT(widget), FALSE ); + formWindow()->widgets()->remove( TQT_TQOBJECT(widget) ); + formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( widget ); + } + +// ------------------------------------------------------------ + +MoveCommand::MoveCommand( const TQString &n, FormWindow *fw, + const TQWidgetList &w, + const TQValueList op, + const TQValueList np, + TQWidget *opr, TQWidget *npr ) + : Command( n, fw ), widgets( w ), oldPos( op ), newPos( np ), + oldParent( opr ), newParent( npr ) +{ + widgets.setAutoDelete( FALSE ); +} + +void MoveCommand::merge( Command *c ) +{ + MoveCommand *cmd = (MoveCommand*)c; + newPos = cmd->newPos; +} + +bool MoveCommand::canMerge( Command *c ) +{ + MoveCommand *cmd = (MoveCommand*)c; + return widgets == cmd->widgets; +} + + +void MoveCommand::execute() +{ + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { + if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) { + if ( newParent && oldParent && newParent != oldParent ) { + TQPoint pos = newParent->mapFromGlobal( w->mapToGlobal( TQPoint( 0,0 ) ) ); + w->reparent( newParent, pos, TRUE ); + formWindow()->raiseSelection( w ); + formWindow()->raiseChildSelections( w ); + formWindow()->widgetChanged( TQT_TQOBJECT(w) ); + formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w ); + formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w ); + } + w->move( newPos[ widgets.at() ] ); + } + formWindow()->updateSelection( w ); + formWindow()->updateChildSelections( w ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(w) ); + } +} + +void MoveCommand::unexecute() +{ + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { + if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) { + if ( newParent && oldParent && newParent != oldParent ) { + TQPoint pos = oldParent->mapFromGlobal( w->mapToGlobal( TQPoint( 0,0 ) ) ); + w->reparent( oldParent, pos, TRUE ); + formWindow()->raiseSelection( w ); + formWindow()->raiseChildSelections( w ); + formWindow()->widgetChanged( TQT_TQOBJECT(w) ); + formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w ); + formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w ); + } + w->move( oldPos[ widgets.at() ] ); + } + formWindow()->updateSelection( w ); + formWindow()->updateChildSelections( w ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(w) ); + } +} + +// ------------------------------------------------------------ + +DeleteCommand::DeleteCommand( const TQString &n, FormWindow *fw, + const TQWidgetList &wl ) + : Command( n, fw ), widgets( wl ) +{ + widgets.setAutoDelete( FALSE ); + TQWidgetList copyOfWidgets = widgets; + copyOfWidgets.setAutoDelete(FALSE); + + // Include the children of the selected items when deleting + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { + TQObjectList *children = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); + for ( TQWidget *c = (TQWidget *)children->first(); c; c = (TQWidget *)children->next() ) { + if ( copyOfWidgets.find( c ) == -1 && formWindow()->widgets()->find( c ) ) { + widgets.insert(widgets.at() + 1, c); + widgets.prev(); + copyOfWidgets.append(c); + } + } + delete children; + } +} + +void DeleteCommand::execute() +{ + formWindow()->setPropertyShowingBlocked( TRUE ); + connections.clear(); + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { + w->hide(); + TQString s = w->name(); + s.prepend( "qt_dead_widget_" ); + w->setName( s ); + formWindow()->selectWidget( TQT_TQOBJECT(w), FALSE ); + formWindow()->widgets()->remove( w ); + TQValueList conns = MetaDataBase::connections( TQT_TQOBJECT(formWindow()), TQT_TQOBJECT(w) ); + connections.insert( w, conns ); + TQValueList::Iterator it = conns.begin(); + for ( ; it != conns.end(); ++it ) { + MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), (*it).sender, + (*it).signal, (*it).receiver, (*it).slot ); + } + } + formWindow()->setPropertyShowingBlocked( FALSE ); + formWindow()->emitShowProperties(); + formWindow()->mainWindow()->objectHierarchy()->widgetsRemoved( widgets ); + +} + +void DeleteCommand::unexecute() +{ + formWindow()->setPropertyShowingBlocked( TRUE ); + formWindow()->clearSelection( FALSE ); + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { + w->show(); + TQString s = w->name(); + s.remove( 0, TQString( "qt_dead_widget_" ).length() ); + w->setName( s ); + formWindow()->widgets()->insert( w, w ); + formWindow()->selectWidget( TQT_TQOBJECT(w) ); + TQValueList conns = *connections.find( w ); + TQValueList::Iterator it = conns.begin(); + for ( ; it != conns.end(); ++it ) { + MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), (*it).sender, + (*it).signal, (*it).receiver, (*it).slot ); + } + } + formWindow()->setPropertyShowingBlocked( FALSE ); + formWindow()->emitShowProperties(); + formWindow()->mainWindow()->objectHierarchy()->widgetsInserted( widgets ); +} + +// ------------------------------------------------------------ + +SetPropertyCommand::SetPropertyCommand( const TQString &n, FormWindow *fw, + TQObject *w, PropertyEditor *e, + const TQString &pn, const TQVariant &ov, + const TQVariant &nv, const TQString &ncut, + const TQString &ocut, bool reset ) + : Command( n, fw ), widget( w ), editor( e ), propName( pn ), + oldValue( ov ), newValue( nv ), oldCurrentItemText( ocut ), newCurrentItemText( ncut ), + wasChanged( TRUE ), isResetCommand( reset ) +{ + wasChanged = MetaDataBase::isPropertyChanged( w, propName ); + if ( oldCurrentItemText.isNull() ) + oldCurrentItemText = ""; + if ( newCurrentItemText.isNull() ) + newCurrentItemText = ""; +} + + +void SetPropertyCommand::execute() +{ + if ( !wasChanged ) + MetaDataBase::setPropertyChanged( widget, propName, TRUE ); + if ( isResetCommand ) { + MetaDataBase::setPropertyChanged( widget, propName, FALSE ); + if ( WidgetFactory::resetProperty( widget, propName ) ) { + if ( !formWindow()->isWidgetSelected( widget ) && TQT_TQOBJECT(formWindow()) != TQT_TQOBJECT(widget) ) + formWindow()->selectWidget( TQT_TQOBJECT(widget) ); + if ( editor->widget() != widget ) + editor->setWidget( widget, formWindow() ); + editor->propertyList()->setCurrentProperty( propName ); + PropertyItem *i = (PropertyItem*)editor->propertyList()->currentItem(); + if ( !i ) + return; + i->setValue( widget->property( propName ) ); + i->setChanged( FALSE ); + editor->refetchData(); + editor->emitWidgetChanged(); + return; + } + } + setProperty( newValue, newCurrentItemText ); +} + +void SetPropertyCommand::unexecute() +{ + if ( !wasChanged ) + MetaDataBase::setPropertyChanged( widget, propName, FALSE ); + if ( isResetCommand ) + MetaDataBase::setPropertyChanged( widget, propName, TRUE ); + setProperty( oldValue, oldCurrentItemText ); +} + +bool SetPropertyCommand::canMerge( Command *c ) +{ + SetPropertyCommand *cmd = (SetPropertyCommand*)c; + if ( !widget ) + return FALSE; + const TQMetaProperty *p = + widget->metaObject()->property( widget->metaObject()->findProperty( propName, TRUE ), TRUE ); + if ( !p ) { + if ( propName == "toolTip" || propName == "whatsThis" ) + return TRUE; + if ( ::tqqt_cast((TQObject *)widget) ) { + MetaDataBase::CustomWidget *cw = ((CustomWidget*)(TQObject*)widget)->customWidget(); + if ( !cw ) + return FALSE; + for ( TQValueList::Iterator it = cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) { + if ( TQString( (*it ).property ) == propName ) { + if ( (*it).type == "String" || (*it).type == "CString" || (*it).type == "Int" || (*it).type == "UInt" ) + return TRUE; + } + } + } + return FALSE; + } + TQVariant::Type t = TQVariant::nameToType( p->type() ); + return ( cmd->propName == propName && + t == TQVariant::String || t == TQVariant::CString || t == TQVariant::Int || t == TQVariant::UInt ); +} + +void SetPropertyCommand::merge( Command *c ) +{ + SetPropertyCommand *cmd = (SetPropertyCommand*)c; + newValue = cmd->newValue; + newCurrentItemText = cmd->newCurrentItemText; +} + +bool SetPropertyCommand::checkProperty() +{ + if ( propName == "name" /*|| propName == "itemName"*/ ) { // ### fix that + TQString s = newValue.toString(); + if ( !formWindow()->unify( widget, s, FALSE ) ) { + TQMessageBox::information( formWindow()->mainWindow(), + i18n( "Set 'name' Property" ), + i18n( "The name of a widget must be unique.\n" + "'%1' is already used in form '%2',\n" + "so the name has been reverted to '%3'." ). + arg( newValue.toString() ). + arg( formWindow()->name() ). + arg( oldValue.toString() )); + setProperty( oldValue, oldCurrentItemText, FALSE ); + return FALSE; + } + if ( s.isEmpty() ) { + TQMessageBox::information( formWindow()->mainWindow(), + i18n( "Set 'name' Property" ), + i18n( "The name of a widget must not be null.\n" + "The name has been reverted to '%1'." ). + arg( oldValue.toString() )); + setProperty( oldValue, oldCurrentItemText, FALSE ); + return FALSE; + } + + if ( ::tqqt_cast(widget->parent()) ) + formWindow()->mainWindow()->formNameChanged( (FormWindow*)((TQWidget*)(TQObject*)widget)->parentWidget() ); + } + return TRUE; +} + +void SetPropertyCommand::setProperty( const TQVariant &v, const TQString ¤tItemText, bool select ) +{ + if ( !widget ) + return; + + if ( !formWindow()->isWidgetSelected( widget ) && !formWindow()->isMainContainer( widget ) && select ) + formWindow()->selectWidget( TQT_TQOBJECT(widget) ); + if ( editor->widget() != widget && select ) + editor->setWidget( widget, formWindow() ); + if ( select ) + editor->propertyList()->setCurrentProperty( propName ); + const TQMetaProperty *p = + widget->metaObject()->property( widget->metaObject()->findProperty( propName, TRUE ), TRUE ); + if ( !p ) { + if ( propName == "hAlign" ) { + p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", TRUE ), TRUE ); + int align = widget->property( "alignment" ).toInt(); + align &= ~( AlignHorizontal_Mask ); + align |= p->keyToValue( currentItemText ); + widget->setProperty( "alignment", TQVariant( align ) ); + } else if ( propName == "vAlign" ) { + p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", TRUE ), TRUE ); + int align = widget->property( "alignment" ).toInt(); + align &= ~( AlignVertical_Mask ); + align |= p->keyToValue( currentItemText ); + widget->setProperty( "alignment", TQVariant( align ) ); + } else if ( propName == "wordwrap" ) { + int align = widget->property( "alignment" ).toInt(); + align &= ~WordBreak; + if ( v.toBool() ) + align |= WordBreak; + widget->setProperty( "alignment", TQVariant( align ) ); + } else if ( propName == "layoutSpacing" ) { + TQVariant val = v; + if ( val.toString() == "default" ) + val = -1; + MetaDataBase::setSpacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), val.toInt() ); + } else if ( propName == "layoutMargin" ) { + TQVariant val = v; + if ( val.toString() == "default" ) + val = -1; + MetaDataBase::setMargin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), val.toInt() ); + } else if ( propName == "resizeMode" ) { + MetaDataBase::setResizeMode( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), currentItemText ); + } else if ( propName == "toolTip" || propName == "whatsThis" || propName == "database" || propName == "frameworkCode" ) { + MetaDataBase::setFakeProperty( editor->widget(), propName, v ); + } else if ( ::tqqt_cast(editor->widget()) ) { + MetaDataBase::CustomWidget *cw = ((CustomWidget *)(TQObject *)widget)->customWidget(); + if ( cw ) { + MetaDataBase::setFakeProperty( editor->widget(), propName, v ); + } + } + editor->refetchData(); + editor->emitWidgetChanged(); + ( ( PropertyItem* )editor->propertyList()->currentItem() )->setChanged( MetaDataBase::isPropertyChanged( widget, propName ) ); +#ifndef TQT_NO_SQL + if ( propName == "database" ) { + formWindow()->mainWindow()->objectHierarchy()->databasePropertyChanged( (TQWidget*)((TQObject *)widget), MetaDataBase::fakeProperty( widget, "database" ).toStringList() ); + } +#endif + return; + } + + if ( p->isSetType() ) { + TQStrList strlst; + TQStringList lst = TQStringList::split( "|", currentItemText ); + TQValueListConstIterator it = lst.begin(); + for ( ; it != lst.end(); ++it ) + strlst.append( (*it).latin1() ); + widget->setProperty( propName, p->keysToValue( strlst ) ); + } else if ( p->isEnumType() ) { + widget->setProperty( propName, p->keyToValue( currentItemText ) ); + } else if ( qstrcmp( p->name(), "buddy" ) == 0 ) { + widget->setProperty( propName, currentItemText ); + } else { + TQVariant ov; + if ( propName == "name" || propName == "itemName" ) + ov = widget->property( propName ); + int oldSerNum = -1; + if ( v.type() == TQVariant::Pixmap ) + oldSerNum = v.toPixmap().serialNumber(); + widget->setProperty( propName, v ); + if ( oldSerNum != -1 && oldSerNum != widget->property( propName ).toPixmap().serialNumber() ) + MetaDataBase::setPixmapKey( TQT_TQOBJECT(formWindow()), + widget->property( propName ).toPixmap().serialNumber(), + MetaDataBase::pixmapKey( TQT_TQOBJECT(formWindow()), oldSerNum ) ); + if ( propName == "cursor" ) { + MetaDataBase::setCursor( (TQWidget*)((TQObject *)widget), v.toCursor() ); + } + if ( propName == "name" && widget->isWidgetType() ) { + formWindow()->mainWindow()->objectHierarchy()->namePropertyChanged( ((TQWidget*)(TQObject *)widget), ov ); + if ( formWindow()->isMainContainer( widget ) ) + formWindow()->setName( v.toCString() ); + } + if ( propName == "name" && ::tqqt_cast((TQObject *)widget) && ::tqqt_cast(formWindow()->mainContainer()) ) { + formWindow()->mainWindow()->actioneditor()->updateActionName( (TQAction*)(TQObject *)widget ); + } + if ( propName == "iconSet" && ::tqqt_cast((TQObject *)widget) && ::tqqt_cast(formWindow()->mainContainer()) ) { + formWindow()->mainWindow()->actioneditor()->updateActionIcon( (TQAction*)(TQObject *)widget ); + } + if ( propName == "caption" ) { + if ( formWindow()->isMainContainer( widget ) ) + formWindow()->setCaption( v.toString() ); + } + if ( propName == "icon" ) { + if ( formWindow()->isMainContainer( widget ) ) + formWindow()->setIcon( v.toPixmap() ); + } + } + editor->refetchData(); + if ( editor->propertyList()->currentItem() && select ) { + ( ( PropertyItem* )editor->propertyList()->currentItem() )->showEditor(); + ( ( PropertyItem* )editor->propertyList()->currentItem() )->setChanged( MetaDataBase::isPropertyChanged( widget, propName ) ); + } + editor->emitWidgetChanged(); + formWindow()->killAccels( TQT_TQOBJECT(widget) ); +} + +// ------------------------------------------------------------ + +LayoutHorizontalCommand::LayoutHorizontalCommand( const TQString &n, FormWindow *fw, + TQWidget *parent, TQWidget *layoutBase, + const TQWidgetList &wl ) + : Command( n, fw ), layout( wl, parent, fw, layoutBase ) +{ +} + +void LayoutHorizontalCommand::execute() +{ + formWindow()->clearSelection( FALSE ); + layout.doLayout(); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +void LayoutHorizontalCommand::unexecute() +{ + formWindow()->clearSelection( FALSE ); + layout.undoLayout(); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +// ------------------------------------------------------------ + +LayoutHorizontalSplitCommand::LayoutHorizontalSplitCommand( const TQString &n, FormWindow *fw, + TQWidget *parent, TQWidget *layoutBase, + const TQWidgetList &wl ) + : Command( n, fw ), layout( wl, parent, fw, layoutBase, TRUE, TRUE ) +{ +} + +void LayoutHorizontalSplitCommand::execute() +{ + formWindow()->clearSelection( FALSE ); + layout.doLayout(); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +void LayoutHorizontalSplitCommand::unexecute() +{ + formWindow()->clearSelection( FALSE ); + layout.undoLayout(); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +// ------------------------------------------------------------ + +LayoutVerticalCommand::LayoutVerticalCommand( const TQString &n, FormWindow *fw, + TQWidget *parent, TQWidget *layoutBase, + const TQWidgetList &wl ) + : Command( n, fw ), layout( wl, parent, fw, layoutBase ) +{ +} + +void LayoutVerticalCommand::execute() +{ + formWindow()->clearSelection( FALSE ); + layout.doLayout(); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +void LayoutVerticalCommand::unexecute() +{ + formWindow()->clearSelection( FALSE ); + layout.undoLayout(); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +// ------------------------------------------------------------ + +LayoutVerticalSplitCommand::LayoutVerticalSplitCommand( const TQString &n, FormWindow *fw, + TQWidget *parent, TQWidget *layoutBase, + const TQWidgetList &wl ) + : Command( n, fw ), layout( wl, parent, fw, layoutBase, TRUE, TRUE ) +{ +} + +void LayoutVerticalSplitCommand::execute() +{ + formWindow()->clearSelection( FALSE ); + layout.doLayout(); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +void LayoutVerticalSplitCommand::unexecute() +{ + formWindow()->clearSelection( FALSE ); + layout.undoLayout(); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +// ------------------------------------------------------------ + +LayoutGridCommand::LayoutGridCommand( const TQString &n, FormWindow *fw, + TQWidget *parent, TQWidget *layoutBase, + const TQWidgetList &wl, int xres, int yres ) + : Command( n, fw ), layout( wl, parent, fw, layoutBase, TQSize( TQMAX(5,xres), TQMAX(5,yres) ) ) +{ +} + +void LayoutGridCommand::execute() +{ + formWindow()->clearSelection( FALSE ); + layout.doLayout(); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +void LayoutGridCommand::unexecute() +{ + formWindow()->clearSelection( FALSE ); + layout.undoLayout(); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +// ------------------------------------------------------------ + +BreakLayoutCommand::BreakLayoutCommand( const TQString &n, FormWindow *fw, + TQWidget *layoutBase, const TQWidgetList &wl ) + : Command( n, fw ), lb( layoutBase ), widgets( wl ) +{ + WidgetFactory::LayoutType lay = WidgetFactory::layoutType( layoutBase ); + spacing = MetaDataBase::spacing( TQT_TQOBJECT(layoutBase) ); + margin = MetaDataBase::margin( TQT_TQOBJECT(layoutBase) ); + layout = 0; + if ( lay == WidgetFactory::HBox ) + layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqqt_cast(layoutBase) != 0 ); + else if ( lay == WidgetFactory::VBox ) + layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqqt_cast(layoutBase) != 0 ); + else if ( lay == WidgetFactory::Grid ) + layout = new GridLayout( wl, layoutBase, fw, layoutBase, TQSize( TQMAX( 5, fw->grid().x()), TQMAX( 5, fw->grid().y()) ), FALSE ); +} + +void BreakLayoutCommand::execute() +{ + if ( !layout ) + return; + formWindow()->clearSelection( FALSE ); + layout->breakLayout(); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) + w->resize( TQMAX( 16, w->width() ), TQMAX( 16, w->height() ) ); +} + +void BreakLayoutCommand::unexecute() +{ + if ( !layout ) + return; + formWindow()->clearSelection( FALSE ); + layout->doLayout(); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); + MetaDataBase::setSpacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( lb )), spacing ); + MetaDataBase::setMargin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( lb )), margin ); +} + +// ------------------------------------------------------------ + +MacroCommand::MacroCommand( const TQString &n, FormWindow *fw, + const TQPtrList &cmds ) + : Command( n, fw ), commands( cmds ) +{ +} + +void MacroCommand::execute() +{ + for ( Command *c = commands.first(); c; c = commands.next() ) + c->execute(); +} + +void MacroCommand::unexecute() +{ + for ( Command *c = commands.last(); c; c = commands.prev() ) + c->unexecute(); +} + +// ------------------------------------------------------------ + +AddTabPageCommand::AddTabPageCommand( const TQString &n, FormWindow *fw, + TQTabWidget *tw, const TQString &label ) + : Command( n, fw ), tabWidget( tw ), tabLabel( label ) +{ + tabPage = new QDesignerWidget( formWindow(), tabWidget, "TabPage" ); + tabPage->hide(); + index = -1; + MetaDataBase::addEntry( TQT_TQOBJECT(tabPage) ); +} + +void AddTabPageCommand::execute() +{ + if ( index == -1 ) + index = ( (QDesignerTabWidget*)tabWidget )->count(); + tabWidget->insertTab( tabPage, tabLabel, index ); + tabWidget->showPage( tabPage ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); +} + +void AddTabPageCommand::unexecute() +{ + tabWidget->removePage( tabPage ); + tabPage->hide(); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); +} + +// ------------------------------------------------------------ + +MoveTabPageCommand::MoveTabPageCommand( const TQString &n, FormWindow *fw, + TQTabWidget *tw, TQWidget* page, const TQString& label, int nIndex, int oIndex ) + : Command( n, fw ), tabWidget( tw ), tabPage( page ), tabLabel( label ) +{ + newIndex = nIndex; + oldIndex = oIndex; +} + +void MoveTabPageCommand::execute() +{ + ((QDesignerTabWidget*)tabWidget )->removePage( tabPage ); + ((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, newIndex ); + ((QDesignerTabWidget*)tabWidget )->showPage( tabPage ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); +} + +void MoveTabPageCommand::unexecute() +{ + ((QDesignerTabWidget*)tabWidget )->removePage( tabPage ); + ((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, oldIndex ); + ((QDesignerTabWidget*)tabWidget )->showPage( tabPage ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); +} + +// ------------------------------------------------------------ + +DeleteTabPageCommand::DeleteTabPageCommand( const TQString &n, FormWindow *fw, + TQTabWidget *tw, TQWidget *page ) + : Command( n, fw ), tabWidget( tw ), tabPage( page ) +{ + tabLabel = ( (QDesignerTabWidget*)tabWidget )->pageTitle(); + index = ( (QDesignerTabWidget*)tabWidget )->currentPage(); +} + +void DeleteTabPageCommand::execute() +{ + tabWidget->removePage( tabPage ); + tabPage->hide(); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); +} + +void DeleteTabPageCommand::unexecute() +{ + tabWidget->insertTab( tabPage, tabLabel, index ); + tabWidget->showPage( tabPage ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); +} + +// ------------------------------------------------------------ + +AddWidgetStackPageCommand::AddWidgetStackPageCommand( const TQString &n, FormWindow *fw, + QDesignerWidgetStack *ws ) + : Command( n, fw ), widgetStack( ws ) +{ + stackPage = new QDesignerWidget( formWindow(), widgetStack, "WStackPage" ); + stackPage->hide(); + index = -1; + MetaDataBase::addEntry( TQT_TQOBJECT(stackPage) ); +} + +void AddWidgetStackPageCommand::execute() +{ + index = widgetStack->insertPage( stackPage, index ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->tabsChanged( 0 ); +} + +void AddWidgetStackPageCommand::unexecute() +{ + index = widgetStack->removePage( stackPage ); + stackPage->hide(); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->tabsChanged( 0 ); +} + +DeleteWidgetStackPageCommand::DeleteWidgetStackPageCommand( const TQString &n, FormWindow *fw, + QDesignerWidgetStack *ws, TQWidget *page ) + : Command( n, fw), widgetStack( ws ), stackPage( page ) +{ + index = -1; +} + +void DeleteWidgetStackPageCommand::execute() +{ + index = widgetStack->removePage( stackPage ); + stackPage->hide(); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( stackPage ); +} + +void DeleteWidgetStackPageCommand::unexecute() +{ + index = widgetStack->insertPage( stackPage, index ); + widgetStack->raiseWidget( stackPage ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->widgetInserted( stackPage ); +} + +// ------------------------------------------------------------ + +AddWizardPageCommand::AddWizardPageCommand( const TQString &n, FormWindow *fw, + TQWizard *w, const TQString &label, int i, bool s ) + : Command( n, fw ), wizard( w ), pageLabel( label ) +{ + page = new QDesignerWidget( formWindow(), wizard, "WizardPage" ); + page->hide(); + index = i; + show = s; + MetaDataBase::addEntry( TQT_TQOBJECT(page) ); +} + +void AddWizardPageCommand::execute() +{ + if ( index == -1 ) + index = wizard->pageCount(); + wizard->insertPage( page, pageLabel, index ); + if ( show ) + ( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); +} + +void AddWizardPageCommand::unexecute() +{ + wizard->removePage( page ); + page->hide(); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); +} + +// ------------------------------------------------------------ + +DeleteWizardPageCommand::DeleteWizardPageCommand( const TQString &n, FormWindow *fw, + TQWizard *w, int i, bool s ) + : Command( n, fw ), wizard( w ), index( i ) +{ + show = s; +} + +void DeleteWizardPageCommand::execute() +{ + page = wizard->page( index ); + pageLabel = wizard->title( page ); + wizard->removePage( page ); + page->hide(); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); +} + +void DeleteWizardPageCommand::unexecute() +{ + wizard->insertPage( page, pageLabel, index ); + if ( show ) + ( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); +} + +// ------------------------------------------------------------ + +RenameWizardPageCommand::RenameWizardPageCommand( const TQString &n, FormWindow *fw, + TQWizard *w, int i, const TQString& name ) + : Command( n, fw ), wizard( w ), index( i ), label( name ) +{ + +} + +void RenameWizardPageCommand::execute() +{ + page = wizard->page( index ); + TQString oldLabel = wizard->title( page ); + + wizard->setTitle( page, label ); + label = oldLabel; + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); +} + +void RenameWizardPageCommand::unexecute() +{ + execute(); +} + +// ------------------------------------------------------------ + +SwapWizardPagesCommand::SwapWizardPagesCommand( const TQString &n, FormWindow *fw, TQWizard *w, int i1, int i2 ) + : Command( n, fw ), wizard( w ), index1( i1 ), index2( i2 ) +{ +} + +void SwapWizardPagesCommand::execute() +{ + TQWidget *page1 = wizard->page( index1 ); + TQWidget *page2 = wizard->page( index2 ); + TQString page1Label = wizard->title( page1 ); + TQString page2Label = wizard->title( page2 ); + wizard->removePage( page1 ); + wizard->removePage( page2 ); + wizard->insertPage( page1, page1Label, index2 ); + wizard->insertPage( page2, page2Label, index1 ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); +} + +void SwapWizardPagesCommand::unexecute() +{ + execute(); +} + +// ------------------------------------------------------------ + +MoveWizardPageCommand::MoveWizardPageCommand( const TQString &n, FormWindow *fw, TQWizard *w, int i1, int i2 ) + : Command( n, fw ), wizard( w ), index1( i1 ), index2( i2 ) +{ +} + +void MoveWizardPageCommand::execute() +{ + TQWidget *page = wizard->page( index1 ); + TQString pageLabel = wizard->title( page ); + wizard->removePage( page ); + wizard->insertPage( page, pageLabel, index2 ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); +} + +void MoveWizardPageCommand::unexecute() +{ + // ###FIX: index1 may be the wrong place + TQWidget *page = wizard->page( index2 ); + TQString pageLabel = wizard->title( page ); + wizard->removePage( page ); + wizard->insertPage( page, pageLabel, index1 ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); +} + +// ------------------------------------------------------------ + +AddConnectionCommand::AddConnectionCommand( const TQString &name, FormWindow *fw, + MetaDataBase::Connection c ) + : Command( name, fw ), connection( c ) +{ +} + +void AddConnectionCommand::execute() +{ + MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), connection.sender, + connection.signal, connection.receiver, connection.slot ); + if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) ) + formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); +} + +void AddConnectionCommand::unexecute() +{ + MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), connection.sender, + connection.signal, connection.receiver, connection.slot ); + if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) ) + formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); +} + +// ------------------------------------------------------------ + +RemoveConnectionCommand::RemoveConnectionCommand( const TQString &name, FormWindow *fw, + MetaDataBase::Connection c ) + : Command( name, fw ), connection( c ) +{ +} + +void RemoveConnectionCommand::execute() +{ + MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), connection.sender, + connection.signal, connection.receiver, connection.slot ); + if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) ) + formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); +} + +void RemoveConnectionCommand::unexecute() +{ + MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), connection.sender, + connection.signal, connection.receiver, connection.slot ); + if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) ) + formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); +} + +// ------------------------------------------------------------ + +AddFunctionCommand::AddFunctionCommand( const TQString &name, FormWindow *fw, const TQCString &f, + const TQString& spec, const TQString &a, const TQString &t, + const TQString &l, const TQString &rt ) + : Command( name, fw ), function( f ), specifier( spec ), access( a ), functionType( t ), language( l ), + returnType( rt ) +{ +} + +void AddFunctionCommand::execute() +{ + MetaDataBase::addFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType ); + formWindow()->mainWindow()->functionsChanged(); + + //integration (add - execute) + KInterfaceDesigner::Function f; + f.returnType = returnType; + f.function = function; + f.specifier = specifier; + f.access = access; + f.type = (functionType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; + formWindow()->clearSelection(false); + formWindow()->mainWindow()->part()->emitAddedFunction(formWindow()->fileName(), f); + + if ( formWindow()->formFile() ) + formWindow()->formFile()->setModified( TRUE ); +} + +void AddFunctionCommand::unexecute() +{ + MetaDataBase::removeFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType ); + formWindow()->mainWindow()->functionsChanged(); + + //integration (add - unexecute) + KInterfaceDesigner::Function f; + f.returnType = returnType; + f.function = function; + f.specifier = specifier; + f.access = access; + f.type = (functionType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; + formWindow()->mainWindow()->part()->emitRemovedFunction(formWindow()->fileName(), f); + + if ( formWindow()->formFile() ) + formWindow()->formFile()->setModified( TRUE ); +} + +// ------------------------------------------------------------ + +ChangeFunctionAttribCommand::ChangeFunctionAttribCommand( const TQString &name, FormWindow *fw, MetaDataBase::Function f, + const TQString &on, const TQString &os, + const TQString &oa, const TQString &ot, const TQString &ol, + const TQString &ort ) + : Command( name, fw ), oldName( on ), oldSpec( os ), oldAccess( oa ), + oldType( ot ), oldLang( ol ), oldReturnType( ort ) +{ + newName = f.function; + newSpec = f.specifier; + newAccess = f.access; + newType = f.type; + newLang = f.language; + newReturnType = f.returnType; +} + +void ChangeFunctionAttribCommand::execute() +{ + MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formWindow()), oldName, newName, newSpec, newAccess, + newType, newLang, newReturnType ); + formWindow()->formFile()->functionNameChanged( oldName, newName ); + formWindow()->formFile()->functionRetTypeChanged( newName, oldReturnType, newReturnType ); + formWindow()->mainWindow()->functionsChanged(); + + //integration (edit - execute) + KInterfaceDesigner::Function f; + f.returnType = newReturnType; + f.function = newName; + f.specifier = newSpec; + f.access = newAccess; + f.type = (newType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; + KInterfaceDesigner::Function of; + f.returnType = oldReturnType; + f.function = oldName; + f.specifier = oldSpec; + f.access = oldAccess; + f.type = (oldType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; + formWindow()->mainWindow()->part()->emitEditedFunction(formWindow()->fileName(), of, f); + + if ( formWindow()->formFile() ) + formWindow()->formFile()->setModified( TRUE ); +} + +void ChangeFunctionAttribCommand::unexecute() +{ + MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formWindow()), newName, oldName, oldSpec, oldAccess, + oldType, oldLang, oldReturnType ); + formWindow()->formFile()->functionNameChanged( newName, oldName ); + formWindow()->formFile()->functionRetTypeChanged( oldName, newReturnType, oldReturnType ); + formWindow()->mainWindow()->functionsChanged(); + + //integration (edit - execute) + KInterfaceDesigner::Function f; + f.returnType = newReturnType; + f.function = newName; + f.specifier = newSpec; + f.access = newAccess; + f.type = (newType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; + KInterfaceDesigner::Function of; + f.returnType = oldReturnType; + f.function = oldName; + f.specifier = oldSpec; + f.access = oldAccess; + f.type = (oldType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; + formWindow()->mainWindow()->part()->emitEditedFunction(formWindow()->fileName(), f, of); + + if ( formWindow()->formFile() ) + formWindow()->formFile()->setModified( TRUE ); +} + +// ------------------------------------------------------------ + +RemoveFunctionCommand::RemoveFunctionCommand( const TQString &name, FormWindow *fw, const TQCString &f, + const TQString& spec, const TQString &a, const TQString &t, + const TQString &l, const TQString &rt ) + : Command( name, fw ), function( f ), specifier( spec ), access( a ), functionType( t ), language( l ), + returnType( rt ) +{ + if ( spec.isNull() ) { + TQValueList lst = MetaDataBase::functionList( TQT_TQOBJECT(fw) ); + for ( TQValueList::Iterator it = lst.begin(); it != lst.end(); ++it ) { + if ( MetaDataBase::normalizeFunction( (*it).function ) == + MetaDataBase::normalizeFunction( function ) ) { + specifier = (*it).specifier; + access = (*it).access; + functionType = (*it).type; + returnType = (*it).returnType; + language = (*it).language; + break; + } + } + } +} + +void RemoveFunctionCommand::execute() +{ + MetaDataBase::removeFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType ); + formWindow()->mainWindow()->functionsChanged(); + + //integration (remove - execute) + KInterfaceDesigner::Function f; + f.returnType = returnType; + f.function = function; + f.specifier = specifier; + f.access = access; + f.type = (functionType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; + formWindow()->mainWindow()->part()->emitRemovedFunction(formWindow()->fileName(), f); + + if ( formWindow()->formFile() ) + formWindow()->formFile()->setModified( TRUE ); +} + +void RemoveFunctionCommand::unexecute() +{ + if ( MetaDataBase::hasFunction( TQT_TQOBJECT(formWindow()), function ) ) + return; + MetaDataBase::addFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType ); + formWindow()->mainWindow()->functionsChanged(); + + //integration (remove - unexecute) + KInterfaceDesigner::Function f; + f.returnType = returnType; + f.function = function; + f.specifier = specifier; + f.access = access; + f.type = (functionType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; + formWindow()->clearSelection(false); + formWindow()->mainWindow()->part()->emitAddedFunction(formWindow()->fileName(), f); + + if ( formWindow()->formFile() ) + formWindow()->formFile()->setModified( TRUE ); +} + +// ------------------------------------------------------------ + +AddVariableCommand::AddVariableCommand( const TQString &name, FormWindow *fw, const TQString &vn, const TQString &a ) + : Command( name, fw ), varName( vn ), access( a ) +{ +} + +void AddVariableCommand::execute() +{ + MetaDataBase::addVariable( TQT_TQOBJECT(formWindow()), varName, access ); + formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); + if ( formWindow()->formFile() ) + formWindow()->formFile()->setModified( TRUE ); +} + +void AddVariableCommand::unexecute() +{ + MetaDataBase::removeVariable( TQT_TQOBJECT(formWindow()), varName ); + formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); + if ( formWindow()->formFile() ) + formWindow()->formFile()->setModified( TRUE ); +} + +// ------------------------------------------------------------ + +SetVariablesCommand::SetVariablesCommand( const TQString &name, FormWindow *fw, + TQValueList lst ) + : Command( name, fw ), newList( lst ) +{ + oldList = MetaDataBase::variables( TQT_TQOBJECT(formWindow()) ); +} + +void SetVariablesCommand::execute() +{ + MetaDataBase::setVariables( TQT_TQOBJECT(formWindow()), newList ); + formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); + if ( formWindow()->formFile() ) + formWindow()->formFile()->setModified( TRUE ); +} + +void SetVariablesCommand::unexecute() +{ + MetaDataBase::setVariables( TQT_TQOBJECT(formWindow()), oldList ); + formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); + if ( formWindow()->formFile() ) + formWindow()->formFile()->setModified( TRUE ); +} + +// ------------------------------------------------------------ + +RemoveVariableCommand::RemoveVariableCommand( const TQString &name, FormWindow *fw, const TQString &vn ) + : Command( name, fw ), varName( vn ) +{ + TQValueList lst = MetaDataBase::variables( TQT_TQOBJECT(fw) ); + for ( TQValueList::Iterator it = lst.begin(); it != lst.end(); ++it ) { + if ( (*it).varName == varName ) { + access = (*it).varAccess; + break; + } + } +} + +void RemoveVariableCommand::execute() +{ + MetaDataBase::removeVariable( TQT_TQOBJECT(formWindow()), varName ); + formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); + if ( formWindow()->formFile() ) + formWindow()->formFile()->setModified( TRUE ); +} + +void RemoveVariableCommand::unexecute() +{ + MetaDataBase::addVariable( TQT_TQOBJECT(formWindow()), varName, access ); + formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); + if ( formWindow()->formFile() ) + formWindow()->formFile()->setModified( TRUE ); +} + +// ------------------------------------------------------------ + +EditDefinitionsCommand::EditDefinitionsCommand( const TQString &name, FormWindow *fw, LanguageInterface *lf, + const TQString &n, const TQStringList &nl ) + : Command( name, fw ), lIface( lf ), defName( n ), newList( nl ) +{ + oldList = lIface->definitionEntries( defName, formWindow()->mainWindow()->designerInterface() ); +} + +void EditDefinitionsCommand::execute() +{ + lIface->setDefinitionEntries( defName, newList, formWindow()->mainWindow()->designerInterface() ); + lIface->release(); + formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); + if ( formWindow()->formFile() ) + formWindow()->formFile()->setModified( TRUE ); +} + +void EditDefinitionsCommand::unexecute() +{ + lIface->setDefinitionEntries( defName, oldList, formWindow()->mainWindow()->designerInterface() ); + lIface->release(); + formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); + if ( formWindow()->formFile() ) + formWindow()->formFile()->setModified( TRUE ); +} + +// ------------------------------------------------------------ + +LowerCommand::LowerCommand( const TQString &name, FormWindow *fw, const TQWidgetList &w ) + : Command( name, fw ), widgets( w ) +{ +} + +void LowerCommand::execute() +{ + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { + w->lower(); + formWindow()->raiseSelection( w ); + } + +} + +void LowerCommand::unexecute() +{ + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { + w->raise(); + formWindow()->raiseSelection( w ); + } +} + +// ------------------------------------------------------------ + +RaiseCommand::RaiseCommand( const TQString &name, FormWindow *fw, const TQWidgetList &w ) + : Command( name, fw ), widgets( w ) +{ +} + +void RaiseCommand::execute() +{ + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { + w->raise(); + formWindow()->raiseSelection( w ); + } + +} + +void RaiseCommand::unexecute() +{ + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { + w->lower(); + formWindow()->raiseSelection( w ); + } +} + +// ------------------------------------------------------------ + +PasteCommand::PasteCommand( const TQString &n, FormWindow *fw, + const TQWidgetList &w ) + : Command( n, fw ), widgets( w ) +{ +} + +void PasteCommand::execute() +{ + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { + w->show(); + formWindow()->selectWidget( TQT_TQOBJECT(w) ); + formWindow()->widgets()->insert( w, w ); + formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w ); + } +} + +void PasteCommand::unexecute() +{ + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { + w->hide(); + formWindow()->selectWidget( TQT_TQOBJECT(w), FALSE ); + formWindow()->widgets()->remove( w ); + formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w ); + } + } + +// ------------------------------------------------------------ + +TabOrderCommand::TabOrderCommand( const TQString &n, FormWindow *fw, + const TQWidgetList &ol, const TQWidgetList &nl ) + : Command( n, fw ), oldOrder( ol ), newOrder( nl ) +{ +} + +void TabOrderCommand::merge( Command *c ) +{ + TabOrderCommand *cmd = (TabOrderCommand*)c; + newOrder = cmd->newOrder; +} + +bool TabOrderCommand::canMerge( Command * ) +{ + return TRUE; +} + +void TabOrderCommand::execute() +{ + MetaDataBase::setTabOrder( formWindow(), newOrder ); +} + +void TabOrderCommand::unexecute() +{ + MetaDataBase::setTabOrder( formWindow(), oldOrder ); +} + +// ------------------------------------------------------------ + +PopulateListBoxCommand::PopulateListBoxCommand( const TQString &n, FormWindow *fw, + TQListBox *lb, const TQValueList &items ) + : Command( n, fw ), newItems( items ), listbox( lb ) +{ + TQListBoxItem *i = 0; + for ( i = listbox->firstItem(); i; i = i->next() ) { + Item item; + if ( i->pixmap() ) + item.pix = *i->pixmap(); + item.text = i->text(); + oldItems.append( item ); + } +} + +void PopulateListBoxCommand::execute() +{ + listbox->clear(); + for ( TQValueList::Iterator it = newItems.begin(); it != newItems.end(); ++it ) { + Item i = *it; + if ( !i.pix.isNull() ) + (void)new TQListBoxPixmap( listbox, i.pix, i.text ); + else + (void)new TQListBoxText( listbox, i.text ); + } + formWindow()->mainWindow()->propertyeditor()->refetchData(); +} + +void PopulateListBoxCommand::unexecute() +{ + listbox->clear(); + for ( TQValueList::Iterator it = oldItems.begin(); it != oldItems.end(); ++it ) { + Item i = *it; + if ( !i.pix.isNull() ) + (void)new TQListBoxPixmap( listbox, i.pix, i.text ); + else + (void)new TQListBoxText( listbox, i.text ); + } + formWindow()->mainWindow()->propertyeditor()->refetchData(); +} + +// ------------------------------------------------------------ + +PopulateIconViewCommand::PopulateIconViewCommand( const TQString &n, FormWindow *fw, + TQIconView *iv, const TQValueList &items ) + : Command( n, fw ), newItems( items ), iconview( iv ) +{ +#ifndef TQT_NO_ICONVIEW + TQIconViewItem *i = 0; + for ( i = iconview->firstItem(); i; i = i->nextItem() ) { + Item item; + if ( i->pixmap() ) + item.pix = *i->pixmap(); + item.text = i->text(); + oldItems.append( item ); + } +#endif +} + +void PopulateIconViewCommand::execute() +{ +#ifndef TQT_NO_ICONVIEW + iconview->clear(); + for ( TQValueList::Iterator it = newItems.begin(); it != newItems.end(); ++it ) { + Item i = *it; + (void)new TQIconViewItem( iconview, i.text, i.pix ); + } +#endif +} + +void PopulateIconViewCommand::unexecute() +{ +#ifndef TQT_NO_ICONVIEW + iconview->clear(); + for ( TQValueList::Iterator it = oldItems.begin(); it != oldItems.end(); ++it ) { + Item i = *it; + (void)new TQIconViewItem( iconview, i.text, i.pix ); + } +#endif +} + +// ------------------------------------------------------------ + +PopulateListViewCommand::PopulateListViewCommand( const TQString &n, FormWindow *fw, + TQListView *lv, TQListView *from ) + : Command( n, fw ), listview( lv ) +{ + newItems = new TQListView(); + newItems->hide(); + transferItems( from, newItems ); + oldItems = new TQListView(); + oldItems->hide(); + transferItems( listview, oldItems ); +} + +void PopulateListViewCommand::execute() +{ + listview->clear(); + transferItems( newItems, listview ); +} + +void PopulateListViewCommand::unexecute() +{ + listview->clear(); + transferItems( oldItems, listview ); +} + +void PopulateListViewCommand::transferItems( TQListView *from, TQListView *to ) +{ + TQHeader *header = to->header(); + while ( header->count() ) + to->removeColumn( 0 ); + TQHeader *h2 = from->header(); + for ( int i = 0; i < h2->count(); ++i ) { + to->addColumn( h2->label( i ) ); + if ( h2->iconSet( i ) && !h2->iconSet( i )->pixmap().isNull() ) + header->setLabel( i, *h2->iconSet( i ), h2->label( i ) ); + header->setResizeEnabled( h2->isResizeEnabled( i ), i ); + header->setClickEnabled( h2->isClickEnabled( i ), i ); + } + + TQListViewItemIterator it( from ); + TQPtrStack fromParents, toParents; + fromParents.push( 0 ); + toParents.push( 0 ); + TQPtrStack toLasts; + TQListViewItem *fromLast = 0; + toLasts.push( 0 ); + int cols = from->columns(); + to->setSorting( -1 ); + from->setSorting( -1 ); + for ( ; it.current(); ++it ) { + TQListViewItem *i = it.current(); + if ( i->parent() == fromParents.top() ) { + TQListViewItem *pi = toParents.top(); + TQListViewItem *ni = 0; + if ( pi ) + ni = new TQListViewItem( pi, toLasts.top() ); + else + ni = new TQListViewItem( to, toLasts.top() ); + for ( int c = 0; c < cols; ++c ) { + ni->setText( c, i->text( c ) ); + if ( i->pixmap( c ) ) + ni->setPixmap( c, *i->pixmap( c ) ); + } + toLasts.pop(); + toLasts.push( ni ); + if ( pi ) + pi->setOpen( TRUE ); + } else { + if ( i->parent() == fromLast ) { + fromParents.push( fromLast ); + toParents.push( toLasts.top() ); + toLasts.push( 0 ); + TQListViewItem *pi = toParents.top(); + TQListViewItem *ni = 0; + if ( pi ) + ni = new TQListViewItem( pi ); + else + ni = new TQListViewItem( to ); + for ( int c = 0; c < cols; ++c ) { + ni->setText( c, i->text( c ) ); + if ( i->pixmap( c ) ) + ni->setPixmap( c, *i->pixmap( c ) ); + } + toLasts.pop(); + toLasts.push( ni ); + if ( pi ) + pi->setOpen( TRUE ); + } else { + while ( fromParents.top() != i->parent() ) { + fromParents.pop(); + toParents.pop(); + toLasts.pop(); + } + + TQListViewItem *pi = toParents.top(); + TQListViewItem *ni = 0; + if ( pi ) + ni = new TQListViewItem( pi, toLasts.top() ); + else + ni = new TQListViewItem( to, toLasts.top() ); + for ( int c = 0; c < cols; ++c ) { + ni->setText( c, i->text( c ) ); + if ( i->pixmap( c ) ) + ni->setPixmap( c, *i->pixmap( c ) ); + } + if ( pi ) + pi->setOpen( TRUE ); + toLasts.pop(); + toLasts.push( ni ); + } + } + fromLast = i; + } +} + + + +// ------------------------------------------------------------ + +PopulateMultiLineEditCommand::PopulateMultiLineEditCommand( const TQString &n, FormWindow *fw, + TQTextEdit *mle, const TQString &txt ) + : Command( n, fw ), newText( txt ), mlined( mle ) +{ + oldText = mlined->text(); + wasChanged = MetaDataBase::isPropertyChanged( TQT_TQOBJECT(mlined), "text" ); +} + +void PopulateMultiLineEditCommand::execute() +{ + mlined->setText( newText ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(mlined), "text", TRUE ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(mlined) ); +} + +void PopulateMultiLineEditCommand::unexecute() +{ + mlined->setText( oldText ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(mlined), "text", wasChanged ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(mlined) ); +} + +// ------------------------------------------------------------ + +PopulateTableCommand::PopulateTableCommand( const TQString &n, FormWindow *fw, TQTable *t, + const TQValueList &rows, + const TQValueList &columns ) + : Command( n, fw ), newRows( rows ), newColumns( columns ), table( t ) +{ +#ifndef TQT_NO_TABLE + int i = 0; + TQMap columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(table) ); + for ( i = 0; i < table->horizontalHeader()->count(); ++i ) { + PopulateTableCommand::Column col; + col.text = table->horizontalHeader()->label( i ); + if ( table->horizontalHeader()->iconSet( i ) ) + col.pix = table->horizontalHeader()->iconSet( i )->pixmap(); + col.field = *columnFields.find( col.text ); + oldColumns.append( col ); + } + for ( i = 0; i < table->verticalHeader()->count(); ++i ) { + PopulateTableCommand::Row row; + row.text = table->verticalHeader()->label( i ); + if ( table->verticalHeader()->iconSet( i ) ) + row.pix = table->verticalHeader()->iconSet( i )->pixmap(); + oldRows.append( row ); + } +#endif +} + +void PopulateTableCommand::execute() +{ +#ifndef TQT_NO_TABLE + TQMap columnFields; + table->setNumCols( newColumns.count() ); + int i = 0; + for ( TQValueList::Iterator cit = newColumns.begin(); cit != newColumns.end(); ++cit, ++i ) { + table->horizontalHeader()->setLabel( i, (*cit).pix, (*cit).text ); + if ( !(*cit).field.isEmpty() ) + columnFields.insert( (*cit).text, (*cit).field ); + } + MetaDataBase::setColumnFields( TQT_TQOBJECT(table), columnFields ); + table->setNumRows( newRows.count() ); + i = 0; + for ( TQValueList::Iterator rit = newRows.begin(); rit != newRows.end(); ++rit, ++i ) + table->verticalHeader()->setLabel( i, (*rit).pix, (*rit).text ); +#endif +} + +void PopulateTableCommand::unexecute() +{ +#ifndef TQT_NO_TABLE + TQMap columnFields; + table->setNumCols( oldColumns.count() ); + int i = 0; + for ( TQValueList::Iterator cit = oldColumns.begin(); cit != oldColumns.end(); ++cit, ++i ) { + table->horizontalHeader()->setLabel( i, (*cit).pix, (*cit).text ); + if ( !(*cit).field.isEmpty() ) + columnFields.insert( (*cit).text, (*cit).field ); + } + MetaDataBase::setColumnFields( TQT_TQOBJECT(table), columnFields ); + table->setNumRows( oldRows.count() ); + i = 0; + for ( TQValueList::Iterator rit = oldRows.begin(); rit != oldRows.end(); ++rit, ++i ) + table->verticalHeader()->setLabel( i, (*rit).pix, (*rit).text ); +#endif +} + +// ------------------------------------------------------------ + +AddActionToToolBarCommand::AddActionToToolBarCommand( const TQString &n, FormWindow *fw, + TQAction *a, QDesignerToolBar *tb, int idx ) + : Command( n, fw ), action( a ), toolBar( tb ), index( idx ) +{ +} + +void AddActionToToolBarCommand::execute() +{ + action->addTo( toolBar ); + + if ( ::tqqt_cast(action) ) { + TQString s = ( (QDesignerAction*)action )->widget()->name(); + if ( s.startsWith( "qt_dead_widget_" ) ) { + s.remove( 0, TQString( "qt_dead_widget_" ).length() ); + ( (QDesignerAction*)action )->widget()->setName( s ); + } + toolBar->insertAction( ( (QDesignerAction*)action )->widget(), action ); + ( (QDesignerAction*)action )->widget()->installEventFilter( toolBar ); + } else if ( ::tqqt_cast(action) ) { + if ( ( (QDesignerActionGroup*)action )->usesDropDown() ) { + toolBar->insertAction( ( (QDesignerActionGroup*)action )->widget(), action ); + ( (QDesignerActionGroup*)action )->widget()->installEventFilter( toolBar ); + } + } else if ( ::tqqt_cast(action) ) { + toolBar->insertAction( ( (QSeparatorAction*)action )->widget(), action ); + ( (QSeparatorAction*)action )->widget()->installEventFilter( toolBar ); + } + if ( !::tqqt_cast(action) || ( (TQActionGroup*)action )->usesDropDown()) { + if ( index == -1 ) + toolBar->appendAction( action ); + else + toolBar->insertAction( index, action ); + toolBar->reInsert(); + TQObject::connect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) ); + } else { + TQObjectList clo = action->childrenListObject(); + if ( !clo.isEmpty() ) { + TQObjectListIt it( clo ); + int i = 0; + while ( it.current() ) { + TQObject *o = it.current(); + ++it; + if ( !::tqqt_cast(o) ) + continue; + // ### fix it for nested actiongroups + if ( ::tqqt_cast(o) ) { + QDesignerAction *ac = (QDesignerAction*)o; + toolBar->insertAction( ac->widget(), ac ); + ac->widget()->installEventFilter( toolBar ); + if ( index == -1 ) + toolBar->appendAction( ac ); + else + toolBar->insertAction( index + (i++), ac ); + } + TQObject::connect( o, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) ); + } + } + toolBar->reInsert(); + TQObject::connect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) ); + } + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +void AddActionToToolBarCommand::unexecute() +{ + if ( ::tqqt_cast(action) ) { + TQString s = ( (QDesignerAction*)action )->widget()->name(); + s.prepend( "qt_dead_widget_" ); + ( (QDesignerAction*)action )->widget()->setName( s ); + } + + toolBar->removeAction( action ); + action->removeFrom( toolBar ); + TQObject::disconnect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) ); + if ( !::tqqt_cast(action) || ( (TQActionGroup*)action )->usesDropDown()) { + action->removeEventFilter( toolBar ); + } else { + TQObjectList clo = action->childrenListObject(); + if ( !clo.isEmpty() ) { + TQObjectListIt it( clo ); + while ( it.current() ) { + TQObject *o = it.current(); + ++it; + if ( !::tqqt_cast(o) ) + continue; + if ( ::tqqt_cast(o) ) { + o->removeEventFilter( toolBar ); + toolBar->removeAction( (TQAction*)o ); + } + TQObject::disconnect( o, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) ); + } + } + } + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +// ------------------------------------------------------------ + +AddToolBarCommand::AddToolBarCommand( const TQString &n, FormWindow *fw, TQMainWindow *mw ) + : Command( n, fw ), toolBar( 0 ), mainWindow( mw ) +{ +} + +void AddToolBarCommand::execute() +{ + if ( !toolBar ) { + toolBar = new QDesignerToolBar( mainWindow ); + TQString n = "Toolbar"; + formWindow()->unify( TQT_TQOBJECT(toolBar), n, TRUE ); + toolBar->setName( n ); + mainWindow->addToolBar( toolBar, n ); + } else { + toolBar->show(); + TQString s = toolBar->name(); + s.remove( 0, TQString( "qt_dead_widget_" ).length() ); + toolBar->setName( s ); + } + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +void AddToolBarCommand::unexecute() +{ + toolBar->hide(); + TQString s = toolBar->name(); + s.prepend( "qt_dead_widget_" ); + toolBar->setName( s ); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +// ------------------------------------------------------------ + +#ifdef TQT_CONTAINER_CUSTOM_WIDGETS +AddContainerPageCommand::AddContainerPageCommand( const TQString &n, FormWindow *fw, + TQWidget *c, const TQString &label ) + : Command( n, fw ), container( c ), index( -1 ), pageLabel( label ), page( 0 ) +{ + WidgetInterface *iface = 0; + widgetManager()->queryInterface( WidgetFactory::classNameOf( container ), &iface ); + if ( !iface ) + return; + iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&wiface ); + if ( !wiface ) + return; + wClassName = WidgetFactory::classNameOf( container ); +} + +AddContainerPageCommand::~AddContainerPageCommand() +{ + if ( wiface ) + wiface->release(); +} + +void AddContainerPageCommand::execute() +{ + if ( !wiface || !wiface->supportsPages( wClassName ) ) + return; + if ( index == -1 ) + index = wiface->count( wClassName, container ); + if ( !page ) + page = wiface->addPage( wClassName, container, pageLabel, index ); + else + wiface->insertPage( wClassName, container, pageLabel, index, page ); + + MetaDataBase::addEntry( page ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + // #### show and update pages in object hierarchy view +} + +void AddContainerPageCommand::unexecute() +{ + if ( !wiface || !wiface->supportsPages( wClassName ) ) + return; + wiface->removePage( wClassName, container, index ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + // #### show and update pages in object hierarchy view +} + +// ------------------------------------------------------------ + +DeleteContainerPageCommand::DeleteContainerPageCommand( const TQString &n, FormWindow *fw, + TQWidget *c, int idx ) + : Command( n, fw ), container( c ), index( idx ) +{ + WidgetInterface *iface = 0; + widgetManager()->queryInterface( WidgetFactory::classNameOf( container ), &iface ); + if ( !iface ) + return; + iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&wiface ); + if ( !wiface ) + return; + wClassName = WidgetFactory::classNameOf( container ); + page = wiface->page( wClassName, container, index ); + pageLabel = wiface->pageLabel( wClassName, container, index ); +} + +DeleteContainerPageCommand::~DeleteContainerPageCommand() +{ + if ( wiface ) + wiface->release(); +} + +void DeleteContainerPageCommand::execute() +{ + if ( !wiface || !wiface->supportsPages( wClassName ) ) + return; + + wiface->removePage( wClassName, container, index ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + // #### show and update pages in object hierarchy view +} + +void DeleteContainerPageCommand::unexecute() +{ + if ( !wiface || !wiface->supportsPages( wClassName ) ) + return; + if ( index == -1 ) + index = wiface->count( wClassName, container ); + + wiface->insertPage( wClassName, container, pageLabel, index, page ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + // #### show and update pages in object hierarchy view +} + +// ------------------------------------------------------------ + +RenameContainerPageCommand::RenameContainerPageCommand( const TQString &n, FormWindow *fw, + TQWidget *c, int idx, + const TQString &label ) + : Command( n, fw ), container( c ), index( idx ), newLabel( label ) +{ + WidgetInterface *iface = 0; + widgetManager()->queryInterface( WidgetFactory::classNameOf( container ), &iface ); + if ( !iface ) + return; + iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&wiface ); + if ( !wiface ) + return; + wClassName = WidgetFactory::classNameOf( container ); + oldLabel = wiface->pageLabel( wClassName, container, index ); +} + +RenameContainerPageCommand::~RenameContainerPageCommand() +{ + if ( wiface ) + wiface->release(); +} + +void RenameContainerPageCommand::execute() +{ + if ( !wiface || !wiface->supportsPages( wClassName ) ) + return; + wiface->renamePage( wClassName, container, index, newLabel ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + // #### show and update pages in object hierarchy view +} + +void RenameContainerPageCommand::unexecute() +{ + if ( !wiface || !wiface->supportsPages( wClassName ) ) + return; + wiface->renamePage( wClassName, container, index, oldLabel ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + // #### show and update pages in object hierarchy view +} +#endif // TQT_CONTAINER_CUSTOM_WIDGETS +// ------------------------------------------------------------ + +AddActionToPopupCommand::AddActionToPopupCommand( const TQString &n, + FormWindow *fw, + PopupMenuEditor *m, + PopupMenuEditorItem *i, + int idx ) + : Command( n, fw ), menu( m ), item( i ), index( idx ) +{ } + +void AddActionToPopupCommand::execute() +{ + menu->insert( item, index ); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +void AddActionToPopupCommand::unexecute() +{ + item->hideMenu(); + int i = menu->find( item->action() ); + menu->remove( i ); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +// ------------------------------------------------------------ + +RemoveActionFromPopupCommand::RemoveActionFromPopupCommand( const TQString &n, + FormWindow *fw, + PopupMenuEditor *m, + int idx ) + : AddActionToPopupCommand( n, fw, m, 0, idx ) +{ + item = menu->at( index ); +} + +void RemoveActionFromPopupCommand::execute() +{ + AddActionToPopupCommand::unexecute(); +} + +void RemoveActionFromPopupCommand::unexecute() +{ + AddActionToPopupCommand::execute(); +} + +// ------------------------------------------------------------ + +ExchangeActionInPopupCommand::ExchangeActionInPopupCommand( const TQString &n, + FormWindow *fw, + PopupMenuEditor *m, + int a, + int b ) + : Command( n, fw ), menu( m ), c( a ), d( b ) +{ } + +void ExchangeActionInPopupCommand::execute() +{ + menu->exchange( c, d ); +} + +void ExchangeActionInPopupCommand::unexecute() +{ + execute(); +} + +// ------------------------------------------------------------ + +ActionEditor *ActionCommand::actionEditor() +{ + // FIXME: handle multiple action editors + return (ActionEditor *) formWindow()->mainWindow()->child( 0, "ActionEditor" ); +} + +// ------------------------------------------------------------ + +RenameActionCommand::RenameActionCommand( const TQString &n, + FormWindow *fw, + TQAction *a, + PopupMenuEditor *m, + TQString nm ) + : ActionCommand( n, fw, a ), menu( m ), newName( nm ) +{ + oldName = action->menuText(); +} + +void RenameActionCommand::execute() +{ + TQString actionText = newName; + actionText.replace("&&", "&"); + TQString menuText = newName; + action->setText( actionText ); + action->setMenuText( menuText ); + + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +void RenameActionCommand::unexecute() +{ + action->setMenuText( oldName ); + action->setText( oldName ); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +// ------------------------------------------------------------ + +SetActionIconsCommand::SetActionIconsCommand( const TQString &n, + FormWindow *fw, + TQAction *a, + PopupMenuEditor *m, + TQIconSet &icons ) + : ActionCommand( n, fw, a ), menu( m ), newIcons( icons ) +{ + oldIcons = a->iconSet(); +} + +void SetActionIconsCommand::execute() +{ + action->setIconSet( newIcons ); + ActionEditor *ae = actionEditor(); + if ( ae ) + ae->updateActionIcon( action ); + MetaDataBase::setPropertyChanged( action, "iconSet", TRUE ); +} + +void SetActionIconsCommand::unexecute() +{ + action->setIconSet( oldIcons ); + ActionEditor *ae = actionEditor(); + if ( ae ) + ae->updateActionIcon( action ); + MetaDataBase::setPropertyChanged( action, "iconSet", TRUE ); +} + +// ------------------------------------------------------------ + +AddMenuCommand::AddMenuCommand( const TQString &n, + FormWindow *fw, + MenuBarEditor *b, + MenuBarEditorItem *i, + int idx ) + : Command( n, fw ), mb( b ), item( i ), name( 0 ), index( idx ) +{ } + +AddMenuCommand::AddMenuCommand( const TQString &n, + FormWindow *fw, + TQMainWindow *mw, + const TQString &nm ) + : Command( n, fw ), mb( 0 ), item( 0 ), name( nm ), index( -1 ) +{ + if ( mw ) + mb = (MenuBarEditor *)mw->child( 0, "MenuBarEditor" ); +} + +void AddMenuCommand::execute() +{ + TQString n; + TQMainWindow *mw = (TQMainWindow*)formWindow()->mainContainer(); + if ( !mb ) { + mb = new MenuBarEditor( formWindow(), mw ); + mb->setName( "MenuBarEditor" ); + formWindow()->insertWidget( mb, TRUE ); + } + if ( !item ) { + PopupMenuEditor *popup = new PopupMenuEditor( formWindow(), mw ); + popup->setName( "PopupMenuEditor" ); + formWindow()->insertWidget( popup, TRUE ); + mb->insertItem( name, popup, index ); + index = mb->findItem( popup ); + item = mb->item( index ); + } else { + PopupMenuEditor *popup = item->menu(); + popup->setName( item->menuText() ); + formWindow()->insertWidget( popup, TRUE ); + mb->insertItem( item, index ); + } + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +void AddMenuCommand::unexecute() +{ + if ( !item ) { + tqWarning( "The AddMenuCommand was created without a menu item." ); + return; + } + item->menu()->hide(); + int i = mb->findItem( item ); + formWindow()->removeWidget( item->menu() ); + mb->removeItemAt( i ); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +// ------------------------------------------------------------ + +RemoveMenuCommand::RemoveMenuCommand( const TQString &n, + FormWindow *fw, + MenuBarEditor *b, + int idx ) + : AddMenuCommand( n, fw, b, 0, idx ) +{ + item = mb->item( index ); +} + +void RemoveMenuCommand::execute() +{ + mb->hideItem( index ); + AddMenuCommand::unexecute(); +} + +void RemoveMenuCommand::unexecute() +{ + AddMenuCommand::execute(); +} + +// ------------------------------------------------------------ + +ExchangeMenuCommand::ExchangeMenuCommand( const TQString &n, + FormWindow *fw, + MenuBarEditor *b, + int i, + int j ) + : Command( n, fw ), bar( b ), k( i ), l( j ) +{ } + +void ExchangeMenuCommand::execute() +{ + bar->exchange( k, l ); +} + +void ExchangeMenuCommand::unexecute() +{ + execute(); +} + +// ------------------------------------------------------------ + +MoveMenuCommand::MoveMenuCommand( const TQString &n, + FormWindow *fw, + MenuBarEditor *b, + int i, + int j ) + : Command( n, fw ), bar( b ), from( i ), to( j ) +{ } + +void MoveMenuCommand::execute() +{ + bar->hideItem( from ); + MenuBarEditorItem * i = bar->item( from ); + bar->removeItemAt( from ); + int t = ( from > to ? to : to - 1 ); + bar->insertItem( i, t ); +} + +void MoveMenuCommand::unexecute() +{ + bar->hideItem( to ); + int t = ( from > to ? to : to - 1 ); + MenuBarEditorItem * i = bar->item( t ); + bar->removeItemAt( t ); + bar->insertItem( i, from ); +} + +// ------------------------------------------------------------ + +RenameMenuCommand::RenameMenuCommand( const TQString &n, + FormWindow *fw, + MenuBarEditor *b, + TQString nm, + MenuBarEditorItem *i ) + : Command( n, fw ), bar( b ), item( i ), newName( nm ) +{ + oldName = item->menu()->name(); +} + +TQString RenameMenuCommand::makeLegal( const TQString &str ) +{ + // remove illegal characters + TQString d; + char c = 0, i = 0; + while ( !str.at(i).isNull() ) { + c = str.at(i).latin1(); + if ( c == '-' || c == ' ' ) + d += '_'; + else if ( ( c >= '0' && c <= '9') || ( c >= 'A' && c <= 'Z' ) + || c == '_' || ( c >= 'a' && c <= 'z' ) ) + d += c; + ++i; + } + return d; +} + +void RenameMenuCommand::execute() +{ + PopupMenuEditor *popup = item->menu(); + item->setMenuText( newName ); + TQString legal = makeLegal( newName ); + formWindow()->unify( TQT_TQOBJECT(popup), legal, TRUE ); + popup->setName( legal ); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +void RenameMenuCommand::unexecute() +{ + PopupMenuEditor *popup = item->menu(); + item->setMenuText( oldName ); + popup->setName( oldName ); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +// ------------------------------------------------------------ + +AddToolBoxPageCommand::AddToolBoxPageCommand( const TQString &n, FormWindow *fw, + TQToolBox *tw, const TQString &label ) + : Command( n, fw ), toolBox( tw ), toolBoxLabel( label ) +{ + toolBoxPage = new QDesignerWidget( formWindow(), toolBox, "page" ); + toolBoxPage->hide(); + index = -1; + MetaDataBase::addEntry( TQT_TQOBJECT(toolBoxPage) ); +} + +void AddToolBoxPageCommand::execute() +{ + index = toolBox->insertItem( index, toolBoxPage, toolBoxLabel); + toolBox->setCurrentIndex( index ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +void AddToolBoxPageCommand::unexecute() +{ + toolBox->removeItem( toolBoxPage ); + toolBoxPage->hide(); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +// ------------------------------------------------------------ + +DeleteToolBoxPageCommand::DeleteToolBoxPageCommand( const TQString &n, FormWindow *fw, + TQToolBox *tw, TQWidget *page ) + : Command( n, fw ), toolBox( tw ), toolBoxPage( page ) +{ + toolBoxLabel = toolBox->itemLabel( toolBox->currentIndex() ); + index = toolBox->currentIndex(); +} + +void DeleteToolBoxPageCommand::execute() +{ + toolBox->removeItem( toolBoxPage ); + toolBoxPage->hide(); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} + +void DeleteToolBoxPageCommand::unexecute() +{ + index = toolBox->insertItem( index, toolBoxPage, toolBoxLabel ); + toolBox->setCurrentIndex( index ); + formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); + formWindow()->mainWindow()->objectHierarchy()->rebuild(); +} diff --git a/tdevdesigner/designer/command.h b/kdevdesigner/designer/command.h similarity index 100% rename from tdevdesigner/designer/command.h rename to kdevdesigner/designer/command.h diff --git a/tdevdesigner/designer/configtoolboxdialog.ui b/kdevdesigner/designer/configtoolboxdialog.ui similarity index 100% rename from tdevdesigner/designer/configtoolboxdialog.ui rename to kdevdesigner/designer/configtoolboxdialog.ui diff --git a/tdevdesigner/designer/configtoolboxdialog.ui.h b/kdevdesigner/designer/configtoolboxdialog.ui.h similarity index 100% rename from tdevdesigner/designer/configtoolboxdialog.ui.h rename to kdevdesigner/designer/configtoolboxdialog.ui.h diff --git a/tdevdesigner/designer/connectiondialog.ui b/kdevdesigner/designer/connectiondialog.ui similarity index 100% rename from tdevdesigner/designer/connectiondialog.ui rename to kdevdesigner/designer/connectiondialog.ui diff --git a/tdevdesigner/designer/connectiondialog.ui.h b/kdevdesigner/designer/connectiondialog.ui.h similarity index 100% rename from tdevdesigner/designer/connectiondialog.ui.h rename to kdevdesigner/designer/connectiondialog.ui.h diff --git a/tdevdesigner/designer/connectionitems.cpp b/kdevdesigner/designer/connectionitems.cpp similarity index 100% rename from tdevdesigner/designer/connectionitems.cpp rename to kdevdesigner/designer/connectionitems.cpp diff --git a/tdevdesigner/designer/connectionitems.h b/kdevdesigner/designer/connectionitems.h similarity index 100% rename from tdevdesigner/designer/connectionitems.h rename to kdevdesigner/designer/connectionitems.h diff --git a/tdevdesigner/designer/connectiontable.cpp b/kdevdesigner/designer/connectiontable.cpp similarity index 100% rename from tdevdesigner/designer/connectiontable.cpp rename to kdevdesigner/designer/connectiontable.cpp diff --git a/tdevdesigner/designer/connectiontable.h b/kdevdesigner/designer/connectiontable.h similarity index 100% rename from tdevdesigner/designer/connectiontable.h rename to kdevdesigner/designer/connectiontable.h diff --git a/tdevdesigner/designer/createtemplate.ui b/kdevdesigner/designer/createtemplate.ui similarity index 100% rename from tdevdesigner/designer/createtemplate.ui rename to kdevdesigner/designer/createtemplate.ui diff --git a/tdevdesigner/designer/customwidgeteditor.ui b/kdevdesigner/designer/customwidgeteditor.ui similarity index 100% rename from tdevdesigner/designer/customwidgeteditor.ui rename to kdevdesigner/designer/customwidgeteditor.ui diff --git a/tdevdesigner/designer/customwidgeteditorimpl.cpp b/kdevdesigner/designer/customwidgeteditorimpl.cpp similarity index 100% rename from tdevdesigner/designer/customwidgeteditorimpl.cpp rename to kdevdesigner/designer/customwidgeteditorimpl.cpp diff --git a/tdevdesigner/designer/customwidgeteditorimpl.h b/kdevdesigner/designer/customwidgeteditorimpl.h similarity index 100% rename from tdevdesigner/designer/customwidgeteditorimpl.h rename to kdevdesigner/designer/customwidgeteditorimpl.h diff --git a/tdevdesigner/designer/database.cpp b/kdevdesigner/designer/database.cpp similarity index 100% rename from tdevdesigner/designer/database.cpp rename to kdevdesigner/designer/database.cpp diff --git a/tdevdesigner/designer/database.h b/kdevdesigner/designer/database.h similarity index 100% rename from tdevdesigner/designer/database.h rename to kdevdesigner/designer/database.h diff --git a/tdevdesigner/designer/dbconnection.ui b/kdevdesigner/designer/dbconnection.ui similarity index 100% rename from tdevdesigner/designer/dbconnection.ui rename to kdevdesigner/designer/dbconnection.ui diff --git a/tdevdesigner/designer/dbconnectioneditor.ui b/kdevdesigner/designer/dbconnectioneditor.ui similarity index 100% rename from tdevdesigner/designer/dbconnectioneditor.ui rename to kdevdesigner/designer/dbconnectioneditor.ui diff --git a/tdevdesigner/designer/dbconnectionimpl.cpp b/kdevdesigner/designer/dbconnectionimpl.cpp similarity index 100% rename from tdevdesigner/designer/dbconnectionimpl.cpp rename to kdevdesigner/designer/dbconnectionimpl.cpp diff --git a/tdevdesigner/designer/dbconnectionimpl.h b/kdevdesigner/designer/dbconnectionimpl.h similarity index 100% rename from tdevdesigner/designer/dbconnectionimpl.h rename to kdevdesigner/designer/dbconnectionimpl.h diff --git a/tdevdesigner/designer/dbconnections.ui b/kdevdesigner/designer/dbconnections.ui similarity index 100% rename from tdevdesigner/designer/dbconnections.ui rename to kdevdesigner/designer/dbconnections.ui diff --git a/tdevdesigner/designer/dbconnectionsimpl.cpp b/kdevdesigner/designer/dbconnectionsimpl.cpp similarity index 100% rename from tdevdesigner/designer/dbconnectionsimpl.cpp rename to kdevdesigner/designer/dbconnectionsimpl.cpp diff --git a/tdevdesigner/designer/dbconnectionsimpl.h b/kdevdesigner/designer/dbconnectionsimpl.h similarity index 100% rename from tdevdesigner/designer/dbconnectionsimpl.h rename to kdevdesigner/designer/dbconnectionsimpl.h diff --git a/tdevdesigner/designer/defs.cpp b/kdevdesigner/designer/defs.cpp similarity index 100% rename from tdevdesigner/designer/defs.cpp rename to kdevdesigner/designer/defs.cpp diff --git a/tdevdesigner/designer/defs.h b/kdevdesigner/designer/defs.h similarity index 100% rename from tdevdesigner/designer/defs.h rename to kdevdesigner/designer/defs.h diff --git a/tdevdesigner/designer/designer_pch.h b/kdevdesigner/designer/designer_pch.h similarity index 100% rename from tdevdesigner/designer/designer_pch.h rename to kdevdesigner/designer/designer_pch.h diff --git a/tdevdesigner/designer/designeraction.cpp b/kdevdesigner/designer/designeraction.cpp similarity index 100% rename from tdevdesigner/designer/designeraction.cpp rename to kdevdesigner/designer/designeraction.cpp diff --git a/tdevdesigner/designer/designeraction.h b/kdevdesigner/designer/designeraction.h similarity index 100% rename from tdevdesigner/designer/designeraction.h rename to kdevdesigner/designer/designeraction.h diff --git a/tdevdesigner/designer/designerapp.cpp b/kdevdesigner/designer/designerapp.cpp similarity index 100% rename from tdevdesigner/designer/designerapp.cpp rename to kdevdesigner/designer/designerapp.cpp diff --git a/tdevdesigner/designer/designerapp.h b/kdevdesigner/designer/designerapp.h similarity index 100% rename from tdevdesigner/designer/designerapp.h rename to kdevdesigner/designer/designerapp.h diff --git a/tdevdesigner/designer/designerappiface.cpp b/kdevdesigner/designer/designerappiface.cpp similarity index 100% rename from tdevdesigner/designer/designerappiface.cpp rename to kdevdesigner/designer/designerappiface.cpp diff --git a/tdevdesigner/designer/designerappiface.h b/kdevdesigner/designer/designerappiface.h similarity index 100% rename from tdevdesigner/designer/designerappiface.h rename to kdevdesigner/designer/designerappiface.h diff --git a/tdevdesigner/designer/editfunctions.ui b/kdevdesigner/designer/editfunctions.ui similarity index 100% rename from tdevdesigner/designer/editfunctions.ui rename to kdevdesigner/designer/editfunctions.ui diff --git a/kdevdesigner/designer/editfunctionsimpl.cpp b/kdevdesigner/designer/editfunctionsimpl.cpp new file mode 100644 index 00000000..5681f00b --- /dev/null +++ b/kdevdesigner/designer/editfunctionsimpl.cpp @@ -0,0 +1,534 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "editfunctionsimpl.h" +#include "formwindow.h" +#include "metadatabase.h" +#include "asciivalidator.h" +#include "mainwindow.h" +#include "hierarchyview.h" +#include "project.h" + +#include +#include +#include "kdevdesigner_part.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots ) + : EditFunctionsBase( parent, 0, TRUE ), formWindow( fw ) +{ + connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + + id = 0; + functList.clear(); + + TQValueList functionList = MetaDataBase::functionList( TQT_TQOBJECT(fw) ); + for ( TQValueList::Iterator it = functionList.begin(); it != functionList.end(); ++it ) { + TQListViewItem *i = new TQListViewItem( functionListView ); + + i->setPixmap( 0, SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance()) ); + i->setText( 0, (*it).function ); + i->setText( 1, (*it).returnType ); + i->setText( 2, (*it).specifier ); + i->setText( 3, (*it).access ); + i->setText( 4, (*it).type ); + + FunctItem fui; + fui.id = id; + fui.oldName = (*it).function; + fui.newName = fui.oldName; + fui.oldRetTyp = (*it).returnType; + fui.retTyp = fui.oldRetTyp; + fui.oldSpec = (*it).specifier; + fui.spec = fui.oldSpec; + fui.oldAccess = (*it).access; + fui.access = fui.oldAccess; + fui.oldType = (*it).type; + fui.type = fui.oldType; + functList.append( fui ); + + functionIds.insert( i, id ); + id++; + + if ( (*it).type == "slot" ) { + if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), MetaDataBase::normalizeFunction( (*it).function ).latin1() ) ) + i->setText( 5, i18n( "Yes" ) ); + else + i->setText( 5, i18n( "No" ) ); + } else { + i->setText( 5, "---" ); + } + } + + boxProperties->setEnabled( FALSE ); + functionName->setValidator( new AsciiValidator( TRUE, TQT_TQOBJECT(functionName) ) ); + + if ( functionListView->firstChild() ) + functionListView->setCurrentItem( functionListView->firstChild() ); + + showOnlySlots->setChecked( justSlots ); + lastType = "function"; + + // Enable rename for all TQListViewItems + TQListViewItemIterator lvit = functionListView->firstChild(); + for ( ; *lvit; lvit++ ) + (*lvit)->setRenameEnabled( 0, TRUE ); + + // Connect listview signal to signal-relay + TQObject::connect( functionListView, + TQT_SIGNAL( itemRenamed( TQListViewItem*, int, const TQString & ) ), + this, + TQT_SLOT( emitItemRenamed(TQListViewItem*, int, const TQString&) ) ); + + // Connect signal-relay to TQLineEdit "functionName" + TQObjectList *l = parent->queryList( TQLINEEDIT_OBJECT_NAME_STRING, "functionName" ); + TQObject *obj; + TQObjectListIt itemsLineEditIt( *l ); + while ( (obj = itemsLineEditIt.current()) != 0 ) { + ++itemsLineEditIt; + TQObject::connect( this, + TQT_SIGNAL( itemRenamed( const TQString & ) ), + obj, + TQT_SLOT( setText( const TQString & ) ) ); + } + delete l; +} + +void EditFunctions::okClicked() +{ + TQValueList functionList = MetaDataBase::functionList( TQT_TQOBJECT(formWindow) ); + TQString n = i18n( "Add/Remove functions of '%1'" ).arg( formWindow->name() ); + TQPtrList commands; + TQValueList::Iterator fit; + if ( !functionList.isEmpty() ) { + for ( fit = functionList.begin(); fit != functionList.end(); ++fit ) { + bool functionFound = FALSE; + TQValueList::Iterator it = functList.begin(); + for ( ; it != functList.end(); ++it ) { + if ( MetaDataBase::normalizeFunction( (*it).oldName ) == + MetaDataBase::normalizeFunction( (*fit).function ) ) { + functionFound = TRUE; + break; + } + } + if ( !functionFound ) + commands.append( new RemoveFunctionCommand( i18n( "Remove Function" ), + formWindow, (*fit).function, (*fit).specifier, + (*fit).access, + (*fit).type, + formWindow->project()->language(), + (*fit).returnType ) ); + } + } + + bool invalidFunctions = FALSE; + TQValueList invalidItems; + + if ( !functList.isEmpty() ) { + TQStrList lst; + TQValueList::Iterator it = functList.begin(); + for ( ; it != functList.end(); ++it ) { + MetaDataBase::Function function; + function.function = (*it).newName; + function.returnType = (*it).retTyp; + function.specifier = (*it).spec; + function.access = (*it).access; + function.type = (*it).type; + function.language = formWindow->project()->language(); + if ( function.returnType.isEmpty() ) + function.returnType = "void"; + TQString s = function.function; + s = s.simplifyWhiteSpace(); + bool startNum = s[ 0 ] >= '0' && s[ 0 ] <= '9'; + bool noParens = s.contains( '(' ) != 1 || s.contains( ')' ) != 1; + bool illegalSpace = s.find( ' ' ) != -1 && s.find( ' ' ) < s.find( '(' ); + + if ( startNum || noParens || illegalSpace || lst.find( function.function ) != -1 ) { + invalidFunctions = TRUE; + invalidItems.append( (*it) ); + continue; + } + bool functionFound = FALSE; + for ( fit = functionList.begin(); fit != functionList.end(); ++fit ) { + if ( MetaDataBase::normalizeFunction( (*fit).function ) == + MetaDataBase::normalizeFunction( (*it).oldName ) ) { + functionFound = TRUE; + break; + } + } + if ( !functionFound ) + commands.append( new AddFunctionCommand( i18n( "Add Function" ), + formWindow, function.function, function.specifier, + function.access, + function.type, formWindow->project()->language(), + function.returnType ) ); + if ( MetaDataBase::normalizeFunction( (*it).newName ) != MetaDataBase::normalizeFunction( (*it).oldName ) || + (*it).spec != (*it).oldSpec || (*it).access != (*it).oldAccess || (*it).type != (*it).oldType || + (*it).retTyp != (*it).oldRetTyp ) { + TQString normalizedOldName = MetaDataBase::normalizeFunction( (*it).oldName ); + if ((*it).oldName.endsWith("const")) // make sure we get the 'const' when we remove the old name + normalizedOldName += " const"; + commands.append( new ChangeFunctionAttribCommand( i18n( "Change Function Attributes" ), + formWindow, function, normalizedOldName, + (*it).oldSpec, (*it).oldAccess, (*it).oldType, + formWindow->project()->language(), (*it).oldRetTyp ) ); + } + lst.append( function.function ); + } + } + + if ( invalidFunctions ) { + if ( TQMessageBox::information( this, i18n( "Edit Functions" ), + i18n( "Some syntactically incorrect functions have been defined.\n" + "Remove these functions?" ), i18n( "&Yes" ), i18n( "&No" ) ) == 0 ) { + TQValueList::Iterator it = functList.begin(); + while ( it != functList.end() ) { + bool found = FALSE; + TQValueList::Iterator vit = invalidItems.begin(); + for ( ; vit != invalidItems.end(); ++vit ) { + if ( (*vit).newName == (*it).newName ) { + invalidItems.remove( vit ); + found = TRUE; + break; + } + } + if ( found ) { + int delId = (*it).id; + it = functList.remove( it ); + TQMap::Iterator fit = functionIds.begin(); + while ( fit != functionIds.end() ) { + if ( *fit == delId ) { + TQListViewItem *litem = fit.key(); + functionIds.remove( fit ); + delete litem; + if ( functionListView->currentItem() ) + functionListView->setSelected( functionListView->currentItem(), TRUE ); + currentItemChanged( functionListView->currentItem() ); + break; + } + ++fit; + } + } + else + ++it; + } + if ( functionListView->firstChild() ) { + functionListView->setCurrentItem( functionListView->firstChild() ); + functionListView->setSelected( functionListView->firstChild(), TRUE ); + } + } + formWindow->mainWindow()->objectHierarchy()->updateFormDefinitionView(); + return; + } + + if ( !commands.isEmpty() ) { + MacroCommand *cmd = new MacroCommand( n, formWindow, commands ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); + } + + formWindow->mainWindow()->objectHierarchy()->updateFormDefinitionView(); + accept(); +} + +void EditFunctions::functionAdd( const TQString &access, const TQString &type ) +{ + TQListViewItem *i = new TQListViewItem( functionListView ); + i->setPixmap( 0, SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance()) ); + i->setRenameEnabled( 0, TRUE ); + i->setText( 1, "void" ); + i->setText( 2, "virtual" ); + + if ( access.isEmpty() ) + i->setText( 3, "public" ); + else + i->setText( 3, access ); + + if( type.isEmpty() ) { + if ( showOnlySlots->isChecked() ) + i->setText( 4, "slot" ); + else { + i->setText( 4, lastType ); + } + } else { + i->setText( 4, type ); + } + + if ( i->text( 4 ) == "slot" ) { + i->setText( 0, "newSlot()" ); + if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), "newSlot()" ) ) + i->setText( 5, i18n( "Yes" ) ); + else + i->setText( 5, i18n( "No" ) ); + } else { + i->setText( 0, "newFunction()" ); + i->setText( 5, "---" ); + } + + functionListView->setCurrentItem( i ); + functionListView->setSelected( i, TRUE ); + functionListView->ensureItemVisible( i ); + functionName->setFocus(); + functionName->selectAll(); + + FunctItem fui; + fui.id = id; + fui.oldName = i->text( 0 ); + fui.newName = fui.oldName; + fui.oldRetTyp = i->text( 1 ); + fui.retTyp = fui.oldRetTyp; + fui.oldSpec = i->text ( 2 ); + fui.spec = fui.oldSpec; + fui.oldAccess = i->text( 3 ); + fui.access = fui.oldAccess; + fui.oldType = i->text( 4 ); + fui.type = fui.oldType; + lastType = fui.oldType; + functList.append( fui ); + functionIds.insert( i, id ); + id++; +} + +void EditFunctions::functionRemove() +{ + if ( !functionListView->currentItem() ) + return; + + functionListView->blockSignals( TRUE ); + removedFunctions << MetaDataBase::normalizeFunction( functionListView->currentItem()->text( 0 ) ); + int delId = functionIds[ functionListView->currentItem() ]; + TQValueList::Iterator it = functList.begin(); + while ( it != functList.end() ) { + if ( (*it).id == delId ) { + functList.remove( it ); + break; + } + ++it; + } + functionIds.remove( functionListView->currentItem() ); + delete functionListView->currentItem(); + if ( functionListView->currentItem() ) + functionListView->setSelected( functionListView->currentItem(), TRUE ); + functionListView->blockSignals( FALSE ); + currentItemChanged( functionListView->currentItem() ); +} + +void EditFunctions::currentItemChanged( TQListViewItem *i ) +{ + functionName->blockSignals( TRUE ); + functionName->setText( "" ); + functionAccess->setCurrentItem( 0 ); + functionName->blockSignals( FALSE ); + + if ( !i ) { + boxProperties->setEnabled( FALSE ); + return; + } + + functionName->blockSignals( TRUE ); + functionName->setText( i->text( 0 ) ); + editType->setText( i->text( 1 ) ); + TQString specifier = i->text( 2 ); + TQString access = i->text( 3 ); + TQString type = i->text( 4 ); + if ( specifier == "pure virtual" ) + functionSpecifier->setCurrentItem( 2 ); + else if ( specifier == "non virtual" ) + functionSpecifier->setCurrentItem( 0 ); + else if ( specifier == "virtual" ) + functionSpecifier->setCurrentItem( 1 ); + else + functionSpecifier->setCurrentItem( 3 ); + if ( access == "private" ) + functionAccess->setCurrentItem( 2 ); + else if ( access == "protected" ) + functionAccess->setCurrentItem( 1 ); + else + functionAccess->setCurrentItem( 0 ); + if ( type == "slot" ) + functionType->setCurrentItem( 0 ); + else + functionType->setCurrentItem( 1 ); + + functionName->blockSignals( FALSE ); + boxProperties->setEnabled( TRUE ); +} + +void EditFunctions::currentTextChanged( const TQString &txt ) +{ + if ( !functionListView->currentItem() ) + return; + + changeItem( functionListView->currentItem(), Name, txt ); + functionListView->currentItem()->setText( 0, txt ); + + if ( functionListView->currentItem()->text( 4 ) == "slot" ) { + if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), MetaDataBase::normalizeFunction( txt.latin1() ).latin1() ) ) + functionListView->currentItem()->setText( 5, i18n( "Yes" ) ); + else + functionListView->currentItem()->setText( 5, i18n( "No" ) ); + } else { + functionListView->currentItem()->setText( 5, "---" ); + } +} + +void EditFunctions::currentSpecifierChanged( const TQString& s ) +{ + if ( !functionListView->currentItem() ) + return; + + changeItem( functionListView->currentItem(), Specifier, s ); + functionListView->currentItem()->setText( 2, s ); +} + +void EditFunctions::currentAccessChanged( const TQString& a ) +{ + if ( !functionListView->currentItem() ) + return; + changeItem( functionListView->currentItem(), Access, a ); + functionListView->currentItem()->setText( 3, a ); +} + + +void EditFunctions::currentReturnTypeChanged( const TQString &type ) +{ + if ( !functionListView->currentItem() ) + return; + changeItem( functionListView->currentItem(), ReturnType, type ); + functionListView->currentItem()->setText( 1, type ); +} + +void EditFunctions::currentTypeChanged( const TQString &type ) +{ + if ( !functionListView->currentItem() ) + return; + changeItem( functionListView->currentItem(), Type, type ); + lastType = type; + functionListView->currentItem()->setText( 4, type ); + if ( type == "slot" ) { + if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), + MetaDataBase::normalizeFunction( functionListView->currentItem()->text( 0 ).latin1() ).latin1() ) ) + functionListView->currentItem()->setText( 5, i18n( "Yes" ) ); + else + functionListView->currentItem()->setText( 5, i18n( "No" ) ); + } else { + functionListView->currentItem()->setText( 5, "---" ); + } +} + +void EditFunctions::changeItem( TQListViewItem *item, Attribute a, const TQString &nV ) +{ + int itemId; + TQMap::Iterator fit = functionIds.find( item ); + if ( fit != functionIds.end() ) + itemId = *fit; + else + return; + + TQValueList::Iterator it = functList.begin(); + for ( ; it != functList.end(); ++it ) { + if ( (*it).id == itemId ) { + switch( a ) { + case Name: + (*it).newName = nV; + break; + case Specifier: + (*it).spec = nV; + break; + case Access: + (*it).access = nV; + break; + case ReturnType: + (*it).retTyp = nV; + break; + case Type: + (*it).type = nV; + break; + } + } + } +} + +void EditFunctions::setCurrentFunction( const TQString &function ) +{ + TQListViewItemIterator it( functionListView ); + while ( it.current() ) { + if ( MetaDataBase::normalizeFunction( it.current()->text( 0 ) ) == function ) { + functionListView->setCurrentItem( it.current() ); + functionListView->setSelected( it.current(), TRUE ); + currentItemChanged( it.current() ); + return; + } + ++it; + } +} + +void EditFunctions::displaySlots( bool justSlots ) +{ + functionIds.clear(); + functionListView->clear(); + for ( TQValueList::Iterator it = functList.begin(); it != functList.end(); ++it ) { + if ( (*it).type == "function" && justSlots ) + continue; + TQListViewItem *i = new TQListViewItem( functionListView ); + functionIds.insert( i, (*it).id ); + i->setPixmap( 0, SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance()) ); + i->setText( 0, (*it).newName ); + i->setText( 1, (*it).retTyp ); + i->setText( 2, (*it).spec ); + i->setText( 3, (*it).access ); + i->setText( 4, (*it).type ); + + if ( (*it).type == "slot" ) { + if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), MetaDataBase::normalizeFunction( (*it).newName ).latin1() ) ) + i->setText( 5, i18n( "Yes" ) ); + else + i->setText( 5, i18n( "No" ) ); + } else { + i->setText( 5, "---" ); + } + } + + if ( functionListView->firstChild() ) + functionListView->setSelected( functionListView->firstChild(), TRUE ); +} + +void EditFunctions::emitItemRenamed( TQListViewItem *, int, const TQString & text ) +{ + emit itemRenamed( text ); // Relay signal ( to TQLineEdit ) +} diff --git a/tdevdesigner/designer/editfunctionsimpl.h b/kdevdesigner/designer/editfunctionsimpl.h similarity index 100% rename from tdevdesigner/designer/editfunctionsimpl.h rename to kdevdesigner/designer/editfunctionsimpl.h diff --git a/tdevdesigner/designer/filechooser.cpp b/kdevdesigner/designer/filechooser.cpp similarity index 100% rename from tdevdesigner/designer/filechooser.cpp rename to kdevdesigner/designer/filechooser.cpp diff --git a/tdevdesigner/designer/filechooser.h b/kdevdesigner/designer/filechooser.h similarity index 100% rename from tdevdesigner/designer/filechooser.h rename to kdevdesigner/designer/filechooser.h diff --git a/tdevdesigner/designer/finddialog.ui b/kdevdesigner/designer/finddialog.ui similarity index 100% rename from tdevdesigner/designer/finddialog.ui rename to kdevdesigner/designer/finddialog.ui diff --git a/tdevdesigner/designer/finddialog.ui.h b/kdevdesigner/designer/finddialog.ui.h similarity index 100% rename from tdevdesigner/designer/finddialog.ui.h rename to kdevdesigner/designer/finddialog.ui.h diff --git a/kdevdesigner/designer/formfile.cpp b/kdevdesigner/designer/formfile.cpp new file mode 100644 index 00000000..4ba5b7c7 --- /dev/null +++ b/kdevdesigner/designer/formfile.cpp @@ -0,0 +1,905 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "formfile.h" +#include "timestamp.h" +#include "project.h" +#include "formwindow.h" +#include "command.h" +#include "sourceeditor.h" +#include "mainwindow.h" +#include "../interfaces/languageinterface.h" +#include "resource.h" +#include "workspace.h" +#include +#include +#include +#include "propertyeditor.h" +#include +#include +#include "designerappiface.h" +#include + +#include +#include +#include "kdevdesigner_part.h" + +static TQString make_func_pretty( const TQString &s ) +{ + TQString res = s; + if ( res.find( ")" ) - res.find( "(" ) == 1 ) + return res; + res.replace( "(", "( " ); + res.replace( ")", " )" ); + res.replace( "&", " &" ); + res.replace( "*", " *" ); + res.replace( ",", ", " ); + res.replace( ":", " : " ); + res = res.simplifyWhiteSpace(); + res.replace( " : : ", "::" ); + res.replace( ">>", "> >" ); + return res; +} + +FormFile::FormFile( const TQString &fn, bool temp, Project *p, const char *name ) + : filename( fn ), fileNameTemp( temp ), pro( p ), fw( 0 ), ed( 0 ), + timeStamp( 0, fn + codeExtension() ), codeEdited( FALSE ), pkg( FALSE ), + cm( FALSE ), codeFileStat( None ) +{ + MetaDataBase::addEntry( this ); + fake = qstrcmp( name, "qt_fakewindow" ) == 0; + //codeFileStat = FormFile::None; + pro->addFormFile( this ); + loadCode(); + if ( !temp ) + checkFileName( FALSE ); + + connect(this, TQT_SIGNAL(somethingChanged(FormFile* )), this, TQT_SLOT(emitNewStatus(FormFile* ))); +} + +FormFile::~FormFile() +{ + pro->removeFormFile( this ); + if ( TQT_TQOBJECT(formWindow()) ) + formWindow()->setFormFile( 0 ); +} + +void FormFile::setFormWindow( FormWindow *f ) +{ + if ( f == fw ) + return; + if ( fw ) + fw->setFormFile( 0 ); + fw = f; + if ( fw ) + fw->setFormFile( this ); + parseCode( cod, FALSE ); + TQTimer::singleShot( 0, this, TQT_SLOT( notifyFormWindowChange() ) ); +} + +void FormFile::setEditor( SourceEditor *e ) +{ + ed = e; +} + +void FormFile::setFileName( const TQString &fn ) +{ + if ( fn == filename ) + return; + if ( fn.isEmpty() ) { + fileNameTemp = TRUE; + if ( filename.find( "unnamed" ) != 0 ) + filename = createUnnamedFileName(); + return; + } else { + fileNameTemp = FALSE; + } + filename = fn; + timeStamp.setFileName( filename + codeExtension() ); + cod = ""; + loadCode(); +} + +void FormFile::setCode( const TQString &c ) +{ + cod = c; +} + +FormWindow *FormFile::formWindow() const +{ + return fw; +} + +SourceEditor *FormFile::editor() const +{ + return ed; +} + +TQString FormFile::fileName() const +{ + return filename; +} + +TQString FormFile::absFileName() const +{ + return pro->makeAbsolute( filename ); +} + +TQString FormFile::codeFile() const +{ + TQString codeExt = codeExtension(); + if ( codeExt.isEmpty() ) + return ""; + return filename + codeExt; +} + +TQString FormFile::code() +{ + return cod; +} + +bool FormFile::save( bool withMsgBox, bool ignoreModified ) +{ + if ( fileNameTemp ) + return saveAs(); + if ( !ignoreModified && !isModified() ) + return TRUE; + if ( ed ) + ed->save(); + + if ( TQT_TQOBJECT(formWindow()) && isModified( WFormWindow ) ) { + if ( withMsgBox ) { + if ( !formWindow()->checkCustomWidgets() ) + return FALSE; + } + + if ( TQFile::exists( pro->makeAbsolute( filename ) ) ) { + TQString fn( pro->makeAbsolute( filename ) ); +#if defined(Q_OS_WIN32) + fn += ".bak"; +#else + fn += "~"; +#endif + TQFile f( pro->makeAbsolute( filename ) ); + if ( f.open( IO_ReadOnly ) ) { + TQFile f2( fn ); + if ( f2.open( IO_WriteOnly | IO_Translate ) ) { + TQCString data( f.size() ); + f.readBlock( data.data(), f.size() ); + f2.writeBlock( data ); + } else { + TQMessageBox::warning( MainWindow::self, i18n( "Save" ), + i18n( "The file %1 could not be saved" ).arg( codeFile() ) ); + } + } + } + } + + if ( isModified( WFormCode ) ) { + if ( TQFile::exists( pro->makeAbsolute( codeFile() ) ) ) { + TQString fn( pro->makeAbsolute( codeFile() ) ); +#if defined(Q_OS_WIN32) + fn += ".bak"; +#else + fn += "~"; +#endif + TQFile f( pro->makeAbsolute( codeFile() ) ); + if ( f.open( IO_ReadOnly ) ) { + TQFile f2( fn ); + if ( f2.open( IO_WriteOnly | IO_Translate) ) { + TQCString data( f.size() ); + f.readBlock( data.data(), f.size() ); + f2.writeBlock( data ); + } else if ( tqApp->type() != TQApplication::Tty ) { + TQMessageBox::warning( MainWindow::self, i18n( "Save" ), + i18n( "The file %1 could not be saved" ).arg( codeFile() ) ); + } + } + } + } + + if ( TQT_TQOBJECT(formWindow()) ) { + Resource resource( MainWindow::self ); + resource.setWidget( formWindow() ); + bool formCodeOnly = isModified( WFormCode ) && !isModified( WFormWindow ); + if ( !resource.save( pro->makeAbsolute( filename ), formCodeOnly ) ) { + if ( MainWindow::self ) + MainWindow::self->statusMessage( i18n( "Failed to save file '%1'.").arg( formCodeOnly ? codeFile(): filename ) ); + if ( formCodeOnly ) + return FALSE; + return saveAs(); + } + if ( MainWindow::self ) + MainWindow::self->statusMessage( i18n( "'%1' saved."). + arg( formCodeOnly ? codeFile() : filename )); + } else { + if ( !Resource::saveFormCode(this, MetaDataBase::languageInterface(pro->language())) ) + return FALSE; + } + timeStamp.update(); + setModified( FALSE ); + return TRUE; +} + +bool FormFile::saveAs( bool ignoreModified ) +{ + TQString f = pro->makeAbsolute( fileName() ); + if ( fileNameTemp && TQT_TQOBJECT(formWindow()) ) { + f = TQString( formWindow()->name() ).lower(); + f.replace( "::", "_" ); + f = pro->makeAbsolute( f + ".ui" ); + } + bool saved = FALSE; + if ( ignoreModified ) { + TQString dir = TQStringList::split( ':', pro->iFace()->customSetting( "QTSCRIPT_PACKAGES" ) ).first(); + f = TQFileInfo( f ).fileName(); + f.prepend( dir + "/" ); + } + TQString fn; + while ( !saved ) { + fn = KFileDialog::getSaveFileName( f, + i18n( "*.ui|TQt User-Interface Files" ) + "\n" + + i18n( "*|All Files" ), MainWindow::self, /*0,*/ + i18n( "Save Form '%1' As").arg( formName() )/*, + MainWindow::self ? &MainWindow::self->lastSaveFilter : 0*/ ); + if ( fn.isEmpty() ) + return FALSE; + TQFileInfo fi( fn ); + if ( fi.extension() != "ui" ) + fn += ".ui"; + fileNameTemp = FALSE; + filename = pro->makeRelative( fn ); + TQFileInfo relfi( filename ); + if ( relfi.exists() ) { + if ( TQMessageBox::warning( MainWindow::self, i18n( "File Already Exists" ), + i18n( "The file already exists. Do you wish to overwrite it?" ), + TQMessageBox::Yes, + TQMessageBox::No ) == TQMessageBox::Yes ) { + saved = TRUE; + } else { + filename = f; + } + + } else { + saved = TRUE; + } + } + if ( !checkFileName( TRUE ) ) { + filename = f; + return FALSE; + } + pro->setModified( TRUE ); + timeStamp.setFileName( pro->makeAbsolute( codeFile() ) ); + if ( ed && TQT_TQOBJECT(formWindow()) ) + ed->setCaption( i18n( "Edit %1" ).arg( formWindow()->name() ) ); + setModified( TRUE ); + if ( pro->isDummy() ) + fw->mainWindow()->addRecentlyOpenedFile( fn ); + return save( TRUE, ignoreModified ); +} + +bool FormFile::close() +{ + if ( editor() ) { + editor()->save(); + editor()->close(); + } + if ( TQT_TQOBJECT(formWindow()) ) + return formWindow()->close(); + return TRUE; +} + +bool FormFile::closeEvent() +{ + if ( !isModified() && fileNameTemp ) { + pro->removeFormFile( this ); + return TRUE; + } + + if ( !isModified() ) + return TRUE; + + if ( editor() ) + editor()->save(); + + switch ( TQMessageBox::warning( MainWindow::self, i18n( "Save Form" ), + i18n( "Save changes to form '%1'?" ).arg( filename ), + i18n( "&Yes" ), i18n( "&No" ), i18n( "&Cancel" ), 0, 2 ) ) { + case 0: // save + if ( !save() ) + return FALSE; + case 1: // don't save + loadCode(); + if ( ed ) + ed->editorInterface()->setText( cod ); + if ( fileNameTemp ) + pro->removeFormFile( this ); + if ( MainWindow::self ) + MainWindow::self->workspace()->update(); + break; + case 2: // cancel + return FALSE; + default: + break; + } + + setModified( FALSE ); + if ( MainWindow::self ) + MainWindow::self->updateFunctionList(); + setCodeEdited( FALSE ); + return TRUE; +} + +void FormFile::setModified( bool m, int who ) +{ + if ( ( who & WFormWindow ) == WFormWindow ) + setFormWindowModified( m ); + if ( ( who & WFormCode ) == WFormCode ) + setCodeModified( m ); +} + +bool FormFile::isModified( int who ) +{ + if ( who == WFormWindow ) + return isFormWindowModified(); + if ( who == WFormCode ) + return isCodeModified(); + return isCodeModified() || isFormWindowModified(); +} + +bool FormFile::isFormWindowModified() const +{ + if ( !TQT_TQOBJECT(formWindow()) || !formWindow()->commandHistory() ) + return FALSE; + return formWindow()->commandHistory()->isModified(); +} + +bool FormFile::isCodeModified() const +{ + if ( !editor() ) + return cm; + return editor()->isModified(); +} + +void FormFile::setFormWindowModified( bool m ) +{ + bool b = isFormWindowModified(); + if ( m == b ) + return; + if ( !TQT_TQOBJECT(formWindow()) || !formWindow()->commandHistory() ) + return; + formWindow()->commandHistory()->setModified( m ); + emit somethingChanged( this ); +} + +void FormFile::setCodeModified( bool m ) +{ + bool b = isCodeModified(); + if ( m == b ) + return; + emit somethingChanged( this ); + cm = m; + if ( !editor() ) + return; + editor()->setModified( m ); +} + +void FormFile::showFormWindow() +{ + if ( !MainWindow::self ) + return; + if ( TQT_TQOBJECT(formWindow()) ) { + if ( ( formWindow()->hasFocus() || + TQT_BASE_OBJECT(MainWindow::self->qWorkspace()->activeWindow()) == TQT_BASE_OBJECT(formWindow()) ) && + TQT_BASE_OBJECT(MainWindow::self->propertyeditor()->formWindow()) != TQT_BASE_OBJECT(formWindow()) ) { + MainWindow::self->propertyeditor()->setWidget( TQT_TQOBJECT(formWindow()->currentWidget()), formWindow() ); + MainWindow::self->objectHierarchy()->setFormWindow( formWindow(), + TQT_TQOBJECT(formWindow()->currentWidget()) ); + } + formWindow()->setFocus(); + return; + } + MainWindow::self->openFormWindow( pro->makeAbsolute( filename ), TRUE, this ); +} + +bool FormFile::setupUihFile( bool askForUih ) +{ + if ( !pro->isCpp() || !askForUih ) { + if ( !hasFormCode() ) { + createFormCode(); + setModified( TRUE ); + } + codeFileStat = FormFile::Ok; + return TRUE; + } + if ( codeFileStat != FormFile::Ok && !ed ) { + if ( hasFormCode() ) { + int i = TQMessageBox::information( MainWindow::self, i18n( "Using ui.h File" ), + i18n( "An \"ui.h\" file for this form already exists.\n" + "Do you want to use it or create a new one?" ), + i18n( "Use Existing" ), i18n( "Create New" ), + i18n( "Cancel" ), 2, 2 ); + if ( i == 2 ) + return FALSE; + if ( i == 1 ) + createFormCode(); + } else { + if ( TQMessageBox::Yes != TQMessageBox::information( MainWindow::self, i18n( "Creating ui.h file" ), + i18n( "Do you want to create an new \"ui.h\" file?" ), + TQMessageBox::Yes, TQMessageBox::No ) ) + return FALSE; + createFormCode(); + } + setModified( TRUE ); + } + codeFileStat = FormFile::Ok; + return TRUE; +} + +SourceEditor *FormFile::showEditor( bool askForUih ) +{ + if ( !MainWindow::self ) + return 0; + showFormWindow(); + //emit signal to the embedding IDE if there is one and return 0 because + //no source editing is possible + emit fw->mainWindow()->part()->emitEditSource(fw->fileName()); + return 0; +/* if ( !setupUihFile( askForUih ) ) + return 0; + return MainWindow::self->openSourceEditor();*/ +} + +static int ui_counter = 0; +TQString FormFile::createUnnamedFileName() +{ + return TQString( "unnamed" ) + TQString::number( ++ui_counter ) + TQString( ".ui" ); +} + +TQString FormFile::codeExtension() const +{ + LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); + if ( iface ) + return iface->formCodeExtension(); + return ""; +} + +TQString FormFile::codeComment() const +{ + return TQString( "/****************************************************************************\n" + "** ui.h extension file, included from the uic-generated form implementation.\n" + "**\n" + "** If you want to add, delete, or rename functions or slots, use\n" + "** TQt Designer to update this file, preserving your code.\n" + "**\n" + "** You should not define a constructor or destructor in this file.\n" + "** Instead, write your code in functions called init() and destroy().\n" + "** These will automatically be called by the form's constructor and\n" + "** destructor.\n" + "*****************************************************************************/\n" ); +} + +bool FormFile::hasFormCode() const +{ + return !cod.isEmpty() && cod != TQString( codeComment() ); +} + +int FormFile::codeFileState() const +{ + return hasFormCode() ? codeFileStat : None; +} + +void FormFile::setCodeFileState( UihState s ) +{ + codeFileStat = s; +} + +void FormFile::createFormCode() +{ + if ( !TQT_TQOBJECT(formWindow()) ) + return; + LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); + if ( !iface ) + return; + if ( pro->isCpp() ) + cod = codeComment(); + TQValueList functionList = MetaDataBase::functionList( TQT_TQOBJECT(formWindow()) ); + for ( TQValueList::Iterator it = functionList.begin(); it != functionList.end(); ++it ) { + cod += (!cod.isEmpty() ? "\n\n" : "") + + iface->createFunctionStart( formWindow()->name(), make_func_pretty((*it).function), + (*it).returnType.isEmpty() ? + TQString( "void" ) : + (*it).returnType, (*it).access ) + + "\n" + iface->createEmptyFunction(); + } + parseCode( cod, FALSE ); +} + +void FormFile::load() +{ + showFormWindow(); + code(); +} + +bool FormFile::loadCode() +{ + TQFile f( pro->makeAbsolute( codeFile() ) ); + if ( !f.open( IO_ReadOnly ) ) { + cod = ""; + setCodeFileState( FormFile::None ); + return FALSE; + } + TQTextStream ts( &f ); + cod = ts.read(); + parseCode( cod, FALSE ); + if ( hasFormCode() && codeFileStat != FormFile::Ok ) + setCodeFileState( FormFile::Deleted ); + timeStamp.update(); + return TRUE; +} + +bool FormFile::isCodeEdited() const +{ + return codeEdited; +} + +void FormFile::setCodeEdited( bool b ) +{ + codeEdited = b; +} + +void FormFile::parseCode( const TQString &txt, bool allowModify ) +{ + if ( !TQT_TQOBJECT(formWindow()) ) + return; + LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); + if ( !iface ) + return; + TQValueList functions; + TQValueList newFunctions, oldFunctions; + oldFunctions = MetaDataBase::functionList( TQT_TQOBJECT(formWindow()) ); + iface->functions( txt, &functions ); + TQMap funcs; + for ( TQValueList::Iterator it = functions.begin(); + it != functions.end(); ++it ) { + bool found = FALSE; + for ( TQValueList::Iterator fit = oldFunctions.begin(); + fit != oldFunctions.end(); ++fit ) { + TQString f( (*fit).function ); + if ( MetaDataBase::normalizeFunction( f ) == + MetaDataBase::normalizeFunction( (*it).name ) ) { + found = TRUE; + MetaDataBase::Function function; + function.function = make_func_pretty( (*it).name ); + function.specifier = (*fit).specifier; + function.type = (*fit).type; + if ( !pro->isCpp() ) + function.access = (*it).access; + else + function.access = (*fit).access; + function.language = (*fit).language; + function.returnType = (*it).returnType; + newFunctions << function; + funcs.insert( (*it).name, (*it).body ); + oldFunctions.remove( fit ); + break; + } + } + if ( !found ) { + MetaDataBase::Function function; + function.function = make_func_pretty( (*it).name ); + function.specifier = "virtual"; + function.access = "public"; + function.language = pro->language(); + function.returnType = (*it).returnType; + if ( function.returnType == "void" ) + function.type = "slot"; + else + function.type = "function"; + if ( function.function == "init()" || function.function == "destroy()" ) { + function.type = "function"; + function.access = "private"; + function.specifier = "non virtual"; + } + newFunctions << function; + funcs.insert( (*it).name, (*it).body ); + if ( allowModify ) + setFormWindowModified( TRUE ); + } + } + + if ( allowModify && oldFunctions.count() > 0 ) + setFormWindowModified( TRUE ); + + MetaDataBase::setFunctionList( TQT_TQOBJECT(formWindow()), newFunctions ); +} + +void FormFile::syncCode() +{ + if ( !editor() ) + return; + parseCode( editor()->editorInterface()->text(), TRUE ); + cod = editor()->editorInterface()->text(); +} + +void FormFile::checkTimeStamp() +{ + if ( timeStamp.isUpToDate() ) + return; + timeStamp.update(); + if ( codeEdited ) { + if ( TQMessageBox::information( MainWindow::self, i18n( "TQt Designer" ), + i18n( "File '%1' has been changed outside TQt Designer.\n" + "Do you want to reload it?" ).arg( timeStamp.fileName() ), + i18n( "&Yes" ), i18n( "&No" ) ) == 0 ) { + TQFile f( timeStamp.fileName() ); + if ( f.open( IO_ReadOnly ) ) { + TQTextStream ts( &f ); + editor()->editorInterface()->setText( ts.read() ); + editor()->save(); + if ( MainWindow::self ) + MainWindow::self->functionsChanged(); + } + } + } else { + loadCode(); + } +} + +bool FormFile::isUihFileUpToDate() +{ + if ( timeStamp.isUpToDate() ) + return TRUE; + if ( !editor() ) { + MainWindow::self->editSource(); + tqDebug( "parse Code" ); + parseCode( editor()->editorInterface()->text(), TRUE ); + } + checkTimeStamp(); + return FALSE; +} + +void FormFile::addFunctionCode( MetaDataBase::Function function ) +{ + if ( pro->isCpp() && !hasFormCode() && !codeEdited ) + return; + LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); + if ( !iface ) + return; + + TQValueList funcs; + iface->functions( cod, &funcs ); + bool hasFunc = FALSE; + for ( TQValueList::Iterator it = funcs.begin(); + it != funcs.end(); ++it ) { + if ( MetaDataBase::normalizeFunction( (*it).name ) == MetaDataBase::normalizeFunction( function.function ) ) { + hasFunc = TRUE; + break; + } + } + + if ( !hasFunc ) { + if ( !codeEdited && !timeStamp.isUpToDate() ) + loadCode(); + MetaDataBase::MetaInfo mi = MetaDataBase::metaInfo( TQT_TQOBJECT(formWindow()) ); + TQString cn; + if ( mi.classNameChanged ) + cn = mi.className; + if ( cn.isEmpty() ) + cn = formWindow()->name(); + TQString body = "\n\n" + iface->createFunctionStart( cn, + make_func_pretty( function.function ), + function.returnType.isEmpty() ? + TQString( "void" ) : + function.returnType, function.access ) + + "\n" + iface->createEmptyFunction(); + cod += body; + if ( codeEdited ) { + setModified( TRUE ); + emit somethingChanged( this ); + } + } +} + +void FormFile::removeFunctionCode( MetaDataBase::Function function ) +{ + if ( pro->isCpp() && !hasFormCode() && !codeEdited ) + return; + + LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); + if ( !iface ) + return; + + checkTimeStamp(); + TQString sourceCode = code(); + if ( sourceCode.isEmpty() ) + return; + TQValueList functions; + iface->functions( sourceCode, &functions ); + TQString fu = MetaDataBase::normalizeFunction( function.function ); + for ( TQValueList::Iterator fit = functions.begin(); fit != functions.end(); ++fit ) { + if ( MetaDataBase::normalizeFunction( (*fit).name ) == fu ) { + int line = 0; + int start = 0; + while ( line < (*fit).start - 1 ) { + start = sourceCode.find( '\n', start ); + if ( start == -1 ) + return; + start++; + line++; + } + if ( start == -1 ) + return; + int end = start; + while ( line < (*fit).end + 1 ) { + end = sourceCode.find( '\n', end ); + if ( end == -1 ) { + if ( line <= (*fit).end ) + end = sourceCode.length() - 1; + else + return; + } + end++; + line++; + } + if ( end < start ) + return; + sourceCode.remove( start, end - start ); + setCode( sourceCode ); + } + } +} + +void FormFile::functionNameChanged( const TQString &oldName, const TQString &newName ) +{ + if ( !cod.isEmpty() ) { + TQString funcStart = TQString( formWindow()->name() ) + TQString( "::" ); + int i = cod.find( funcStart + oldName ); + if ( i != -1 ) { + cod.remove( i + funcStart.length(), oldName.length() ); + cod.insert( i + funcStart.length(), newName ); + } + } +} + +void FormFile::functionRetTypeChanged( const TQString &fuName, const TQString &oldType, const TQString &newType ) +{ + if ( !cod.isEmpty() ) { + TQString oldFunct = oldType + " " + TQString( formWindow()->name() ) + "::" + fuName; + TQString newFunct = newType + " " + TQString( formWindow()->name() ) + "::" + fuName; + + int i = cod.find( oldFunct ); + if ( i != -1 ) { + cod.remove( i, oldFunct.length() ); + cod.insert( i, newFunct ); + } + } +} + +TQString FormFile::formName() const +{ + FormFile* that = (FormFile*) this; + if ( TQT_TQOBJECT(formWindow()) ) { + that->cachedFormName = formWindow()->name(); + return cachedFormName; + } + if ( !cachedFormName.isNull() ) + return cachedFormName; + TQFile f( pro->makeAbsolute( filename ) ); + if ( f.open( IO_ReadOnly ) ) { + TQTextStream ts( &f ); + TQString line; + TQString className; + while ( !ts.eof() ) { + line = ts.readLine(); + if ( !className.isEmpty() ) { + int end = line.find( "" ); + if ( end == -1 ) { + className += line; + } else { + className += line.left( end ); + break; + } + continue; + } + int start; + if ( ( start = line.find( "" ) ) != -1 ) { + int end = line.find( "" ); + if ( end == -1 ) { + className = line.mid( start + 7 ); + } else { + className = line.mid( start + 7, end - ( start + 7 ) ); + break; + } + } + } + that->cachedFormName = className; + } + if ( cachedFormName.isEmpty() ) + that->cachedFormName = filename; + return cachedFormName; +} + +void FormFile::formWindowChangedSomehow() +{ + emit somethingChanged( this ); +} + +bool FormFile::checkFileName( bool allowBreak ) +{ + FormFile *ff = pro->findFormFile( filename, this ); + if ( ff ) + TQMessageBox::warning( MainWindow::self, i18n( "Invalid Filename" ), + i18n( "The project already contains a form with a\n" + "filename of '%1'. Please choose a new filename." ).arg( filename ) ); + while ( ff ) { + TQString fn; + while ( fn.isEmpty() ) { + fn = KFileDialog::getSaveFileName( pro->makeAbsolute( fileName() ), + i18n( "*.ui|TQt User-Interface Files" ) + "\n" + + i18n( "*|All Files" ), MainWindow::self,/* 0,*/ + i18n( "Save Form '%1' As"). + arg( formWindow()->name() )/*, + MainWindow::self ? &MainWindow::self->lastSaveFilter : 0 */); + if ( allowBreak && fn.isEmpty() ) + return FALSE; + } + filename = pro->makeRelative( fn ); + ff = pro->findFormFile( filename, this ); + } + return TRUE; +} + +void FormFile::addConnection( const TQString &sender, const TQString &signal, + const TQString &receiver, const TQString &slot ) +{ + LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); + if ( iface ) + iface->addConnection( sender, signal, receiver, slot, &cod ); + if ( ed ) + ed->editorInterface()->setText( cod ); +} + +void FormFile::removeConnection( const TQString &sender, const TQString &signal, + const TQString &receiver, const TQString &slot ) +{ + LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); + if ( iface ) + iface->removeConnection( sender, signal, receiver, slot, &cod ); + if ( ed ) + ed->editorInterface()->setText( cod ); +} + +void FormFile::notifyFormWindowChange() +{ + if ( fw ) + pro->formOpened( fw ); +} + +void FormFile::emitNewStatus(FormFile *file) +{ + fw->mainWindow()->part()->emitNewStatus(fileName(), isModified()); +} diff --git a/tdevdesigner/designer/formfile.h b/kdevdesigner/designer/formfile.h similarity index 100% rename from tdevdesigner/designer/formfile.h rename to kdevdesigner/designer/formfile.h diff --git a/tdevdesigner/designer/formsettings.ui b/kdevdesigner/designer/formsettings.ui similarity index 100% rename from tdevdesigner/designer/formsettings.ui rename to kdevdesigner/designer/formsettings.ui diff --git a/tdevdesigner/designer/formsettingsimpl.cpp b/kdevdesigner/designer/formsettingsimpl.cpp similarity index 100% rename from tdevdesigner/designer/formsettingsimpl.cpp rename to kdevdesigner/designer/formsettingsimpl.cpp diff --git a/tdevdesigner/designer/formsettingsimpl.h b/kdevdesigner/designer/formsettingsimpl.h similarity index 100% rename from tdevdesigner/designer/formsettingsimpl.h rename to kdevdesigner/designer/formsettingsimpl.h diff --git a/kdevdesigner/designer/formwindow.cpp b/kdevdesigner/designer/formwindow.cpp new file mode 100644 index 00000000..4e5bc09d --- /dev/null +++ b/kdevdesigner/designer/formwindow.cpp @@ -0,0 +1,2773 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "formwindow.h" +#include "defs.h" +#include "mainwindow.h" +#include "widgetfactory.h" +#include "sizehandle.h" +#include "metadatabase.h" +#include "resource.h" +#include "tqlayout.h" +#include "connectiondialog.h" +#include +#include "pixmapchooser.h" +#include "orderindicator.h" +#include "hierarchyview.h" +#include "designerappiface.h" +#include "menubareditor.h" +#define NO_STATIC_COLORS +#include "globaldefs.h" + +#include + +#include +#include +#include "kdevdesigner_part.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// FormWindow should be able to work to some limited degree +// (existance, loading) without a MainWindow. Functions which require +// a MainWindow in theory should never be called if no MainWindow +// exists. These macros are used to let us know if that happens anyway +// and to ensure that we don't crash +#define CHECK_MAINWINDOW Q_ASSERT( mainWindow() ); if ( !mainWindow() ) return +#define CHECK_MAINWINDOW_VALUE( v ) Q_ASSERT( mainWindow() ); if ( !mainWindow() ) return v + +static void setCursorToAll( const TQCursor &c, TQWidget *start ) +{ + start->setCursor( c ); + TQObjectList l = start->childrenListObject(); + if ( !l.isEmpty() ) { + for ( TQObject *o = l.first(); o; o = l.next() ) { + if ( o->isWidgetType() && !::tqqt_cast(o) ) + setCursorToAll( c, ( (TQWidget*)o ) ); + } + } +} + +static void restoreCursors( TQWidget *start, FormWindow *fw ) +{ + if ( fw->widgets()->find( start ) ) + start->setCursor( MetaDataBase::cursor( start ) ); + else + start->setCursor( TQt::ArrowCursor ); + TQObjectList l = start->childrenListObject(); + if ( !l.isEmpty() ) { + for ( TQObject *o = l.first(); o; o = l.next() ) { + if ( o->isWidgetType() && !::tqqt_cast(o) ) + restoreCursors( ( (TQWidget*)o ), fw ); + } + } +} + +#if defined(TQ_WS_WIN32) // #### needed for the workaround for repaint problem on windows +#include +static void flickerfree_update( TQWidget *w ) +{ + InvalidateRect( w->winId(), 0, FALSE ); +} +#endif + +/*! + \class FormWindow formwindow.h + \brief Editor window for a form + + The FormWindow is the widget which is used as editor for forms. It + handles inserting, deleting, moving, resizing, etc. of widgets. + + Normally multiple formwindows are used at the same time in the + Designer. So each formwindow has its own undo/redo buffer, etc. + + Also the formwindow has some signals to inform e.g. about selection + changes which is interesting for the PropertyEditor. + + For handling the events of the child widgets (moving, etc.) the + handleMousePress(), etc. functions are called from the application + event filter which is implemented in MainWindow::eventFilter(). +*/ + +FormWindow::FormWindow( FormFile *f, MainWindow *mw, TQWidget *parent, const char *name ) + : TQWidget( parent, name, WDestructiveClose ), mainwindow( mw ), + commands( 100 ), pixInline( TRUE ), pixProject( FALSE ) +{ + ff = f; + init(); + initSlots(); +} + +FormWindow::FormWindow( FormFile *f, TQWidget *parent, const char *name ) + : TQWidget( parent, name, WDestructiveClose ), mainwindow( 0 ), + commands( 100 ), pixInline( TRUE ) +{ + ff = f; + init(); +} + +void FormWindow::init() +{ + setWFlags(getWFlags() & TQt::WStyle_Maximize); + + fake = qstrcmp( name(), "qt_fakewindow" ) == 0; + MetaDataBase::addEntry( TQT_TQOBJECT(this) ); + ff->setFormWindow( this ); + iface = 0; + proj = 0; + propertyWidget = 0; + toolFixed = FALSE; + checkedSelectionsForMove = FALSE; + mContainer = 0; + startWidget = endWidget = 0; + currTool = POINTER_TOOL; + unclippedPainter = 0; + widgetPressed = FALSE; + drawRubber = FALSE; + setFocusPolicy( TQ_ClickFocus ); + sizePreviewLabel = 0; + checkSelectionsTimer = new TQTimer( this, "checkSelectionsTimer" ); + connect( checkSelectionsTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( invalidCheckedSelections() ) ); + updatePropertiesTimer = new TQTimer( this ); + connect( updatePropertiesTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( updatePropertiesTimerDone() ) ); + showPropertiesTimer = new TQTimer( this ); + //!!!! + connect( showPropertiesTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( showPropertiesTimerDone() ) ); + selectionChangedTimer = new TQTimer( this ); + connect( selectionChangedTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( selectionChangedTimerDone() ) ); + windowsRepaintWorkaroundTimer = new TQTimer( this ); + connect( windowsRepaintWorkaroundTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( windowsRepaintWorkaroundTimerTimeout() ) ); + insertParent = 0; + connect( &commands, TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ), + this, TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ) ); + propShowBlocked = FALSE; + + setIcon( SmallIcon( "designer_form.png" , KDevDesignerPartFactory::instance()) ); + + connect( &commands, TQT_SIGNAL( modificationChanged( bool ) ), + this, TQT_SLOT( modificationChanged( bool ) ) ); + buffer = 0; + + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQFRAME_OBJECT_NAME_STRING ), this ); + setMainContainer( w ); + propertyWidget = TQT_TQOBJECT(w); + targetContainer = 0; + hadOwnPalette = FALSE; + + defSpacing = BOXLAYOUT_DEFAULT_SPACING; + defMargin = BOXLAYOUT_DEFAULT_MARGIN; + hasLayoutFunc = FALSE; +} + +void FormWindow::setMainWindow( MainWindow *w ) +{ + mainwindow = w; + MetaDataBase::addEntry( TQT_TQOBJECT(this) ); + initSlots(); +} + +void FormWindow::initSlots() +{ + if ( isFake() ) + return; + Q_ASSERT( project() || MainWindow::self ); + if ( !project() && !MainWindow::self ) + return; + Project *p = project() ? project() : MainWindow::self->currProject(); + if ( p && p->isCpp() ) { + TQString code = formFile()->code(); + if ( code.isEmpty() ) + formFile()->setCode( formFile()->codeComment() ); + } +} + +FormWindow::~FormWindow() +{ + if ( MainWindow::self && MainWindow::self->objectHierarchy()->formWindow() == this ) + MainWindow::self->objectHierarchy()->setFormWindow( 0, 0 ); + + MetaDataBase::clear( TQT_TQOBJECT(this) ); + if ( ff ) + ff->setFormWindow( 0 ); + delete iface; +} + +void FormWindow::closeEvent( TQCloseEvent *e ) +{ + TQGuardedPtr that = this; + if ( ff->closeEvent() && ( !that || ( mainwindow && mainwindow->unregisterClient( this ) ) ) ) + e->accept(); + else + e->ignore(); +} + +void FormWindow::paintGrid( TQWidget *w, TQPaintEvent *e ) +{ + if ( !mainWindow() || !mainWindow()->showGrid() ) + return; + TQPixmap grid; + TQString grid_name; + grid_name.sprintf("FormWindowGrid_%d_%d", mainWindow()->grid().x(), mainWindow()->grid().y()); + if( !TQPixmapCache::find( grid_name, grid ) ) { + grid = TQPixmap( 350 + ( 350 % mainWindow()->grid().x() ), 350 + ( 350 % mainWindow()->grid().y() ) ); + grid.fill( colorGroup().color( TQColorGroup::Foreground ) ); + TQBitmap mask( grid.width(), grid.height() ); + mask.fill( color0 ); + TQPainter p( &mask ); + p.setPen( color1 ); + for ( int y = 0; y < grid.width(); y += mainWindow()->grid().y()) { + for ( int x = 0; x < grid.height(); x += mainWindow()->grid().x() ) { + p.drawPoint( x, y ); + } + } + grid.setMask( mask ); + TQPixmapCache::insert( grid_name, grid ); + } + TQPainter p( w ); + p.setClipRegion( e->rect() ); + p.drawTiledPixmap( TQRect( 0, 0, width(), height() ), grid ); +} + +/*! For operations like drawing a rubber band or drawing the rect + when inserting a new widget, a unclipped painter (which draws also + on child widgets) is needed. This method does all the initialization. +*/ + +void FormWindow::beginUnclippedPainter( bool doNot ) +{ + endUnclippedPainter(); + bool unclipped = testWFlags( WPaintUnclipped ); + setWFlags( WPaintUnclipped ); + unclippedPainter = new TQPainter; + unclippedPainter->begin( this ); + if ( !unclipped ) + clearWFlags( WPaintUnclipped ); + if ( doNot ) { + unclippedPainter->setPen( TQPen( color0, 2 ) ); + unclippedPainter->setRasterOp( NotROP ); + } +} + +/*! + Gets rid of an open unclipped painter. + + \sa beginUnclippedPainter() +*/ + +void FormWindow::endUnclippedPainter() +{ + if ( unclippedPainter ) + unclippedPainter->end(); + delete unclippedPainter; + unclippedPainter = 0; +} + +TQPoint FormWindow::gridPoint( const TQPoint &p ) +{ + return TQPoint( ( p.x() / grid().x() ) * grid().x(), + ( p.y() / grid().y() ) * grid().y() ); +} + +void FormWindow::drawSizePreview( const TQPoint &pos, const TQString& text ) +{ + unclippedPainter->save(); + unclippedPainter->setPen( TQPen( colorGroup().foreground(), 1 )); + unclippedPainter->setRasterOp( CopyROP ); + if ( !sizePreviewPixmap.isNull() ) + unclippedPainter->drawPixmap( sizePreviewPos, sizePreviewPixmap ); + if ( text.isNull() ) { + sizePreviewPixmap = TQPixmap(); // set null again + unclippedPainter->restore(); + return; + } + TQRect r = fontMetrics().boundingRect( 0, 0, 0, 0, AlignCenter, text ); + r = TQRect( pos + TQPoint( 10, 10 ), r.size() + TQSize( 5, 5 ) ); + + checkPreviewGeometry( r ); + + sizePreviewPos = r.topLeft(); + sizePreviewPixmap = TQPixmap::grabWindow( winId(), r.x(), r.y(), r.width(), r.height() ); + unclippedPainter->setBrush( TQColor( 255, 255, 128 ) ); + unclippedPainter->drawRect( r ); + unclippedPainter->drawText( r, AlignCenter, text ); + unclippedPainter->restore(); +} + +void FormWindow::insertWidget() +{ + CHECK_MAINWINDOW; + if ( !insertParent ) + return; + + if ( currTool == POINTER_TOOL ) + return; + + bool useSizeHint = !oldRectValid || ( currRect.width() < 2 && currRect.height() < 2 ); + Qt::Orientation orient =Qt::Horizontal; + TQString n = WidgetDatabase::className( currTool ); + if ( useSizeHint && ( n == "Spacer" || n == TQSLIDER_OBJECT_NAME_STRING || n == "Line" || n == TQSCROLLBAR_OBJECT_NAME_STRING ) ) { + TQPopupMenu m( mainWindow() ); + m.insertItem( i18n( "&Horizontal" ) ); + int ver = m.insertItem( i18n( "&Vertical" ) ); + int r = m.exec( TQCursor::pos() ); + if ( r == ver ) + orient =Qt::Vertical; + } + + + TQWidget *w = WidgetFactory::create( currTool, insertParent, 0, TRUE, &currRect, orient ); + if ( !w ) + return; + + if ( !savePixmapInline() && currTool == WidgetDatabase::idFromClassName( "PixmapLabel" ) ) { // ### what to do for pixmaps in project + TQPixmap pix; + // we have to force the pixmap to get a new and unique serial number. Unfortunately detatch() doesn't do that + pix.convertFromImage( SmallIcon( "designer_image.png" , KDevDesignerPartFactory::instance()).convertToImage() ); + ( (TQLabel*)w )->setPixmap( pix ); + } + int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(TQT_TQOBJECT(w)) ); + if ( WidgetDatabase::isCustomWidget( id ) ) { + TQWhatsThis::add( w, i18n("A %1 (custom widget) " + "

Click Edit Custom Widgets... in the Tools|Custom " + "menu to add and change custom widgets. You can add " + "properties as well as signals and slots to integrate custom widgets into " + "TQt Designer, and provide a pixmap which will be used to represent " + "the widget on the form.

") + .arg(WidgetDatabase::toolTip( id )) ); + TQToolTip::add( w, i18n("A %1 (custom widget)").arg(WidgetDatabase::toolTip( id )) ); + } else { + TQString tt = WidgetDatabase::toolTip( id ); + TQString wt = WidgetDatabase::whatsThis( id ); + if ( !wt.isEmpty() && !tt.isEmpty() ) + TQWhatsThis::add( w, TQString("A %1

%2

").arg( tt ).arg( wt ) ); + } + + TQString s = w->name(); + unify( TQT_TQOBJECT(w), s, TRUE ); + w->setName( s ); + insertWidget( w ); + TQRect r( currRect ); + if ( !oldRectValid || + ( currRect.width() < 2 && currRect.height() < 2 ) ) + r = TQRect( rectAnchor, TQSize( 0, 0 ) ); + + TQPoint p = r.topLeft(); + p = mapToGlobal( p ); + p = insertParent->mapFromGlobal( p ); + r = TQRect( p, r.size() ); + + if ( useSizeHint ) { + if ( n == "Spacer" ) { + if ( orient ==Qt::Vertical ) { + r.setWidth( 20 ); + r.setHeight( 40 ); + } else { + r.setWidth( 40 ); + r.setHeight( 20 ); + } + } else { + r.setWidth( w->sizeHint().width() ); + r.setHeight( w->sizeHint().height() ); + } + } + + if ( r.width() < 2 * grid().x() ) + r.setWidth( 2 * grid().x() ); + if ( r.height() < 2 * grid().y() ) + r.setHeight( 2 * grid().y() ); + + const TQObjectList l = insertParent->childrenListObject(); + TQObjectListIt it( l ); + TQWidgetList lst; + if ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) { + for ( ; it.current(); ) { + TQObject *o = it.current(); + ++it; + if ( o->isWidgetType() && + ( (TQWidget*)o )->isVisibleTo( this ) && + insertedWidgets.find( TQT_TQWIDGET(o) ) && TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(w) ) { + TQRect r2( ( (TQWidget*)o )->pos(), + ( (TQWidget*)o )->size() ); + if ( r.contains( r2 ) ) + lst.append( (TQWidget*)o ); + } + } + } + + if ( !lst.isEmpty() ) { + TQWidget *pw = WidgetFactory::containerOfWidget( w ); + if (pw) { + TQValueList op, np; + for ( TQWidget *i = lst.first(); i; i = lst.next() ) { + op.append( i->pos() ); + TQPoint pos = pw->mapFromGlobal( i->mapToGlobal( TQPoint( 0, 0 ) ) ); + pos -= r.topLeft(); + np.append( pos ); + } + + MoveCommand *mv = new MoveCommand( i18n( "Reparent Widgets" ), this, + lst, op, np, insertParent, pw ); + + if ( !toolFixed ) + mainwindow->resetTool(); + else + setCursorToAll( CrossCursor, w ); + + InsertCommand *cmd = new InsertCommand( i18n( "Insert %1" ).arg( w->name() ), this, w, r ); + + TQPtrList commands; + commands.append( mv ); + commands.append( cmd ); + + MacroCommand *mc = new MacroCommand( i18n( "Insert %1" ).arg( w->name() ), this, commands ); + commandHistory()->addCommand( mc ); + mc->execute(); + } + } else { + if ( !toolFixed ) + mainwindow->resetTool(); + else + setCursorToAll( CrossCursor, w ); + + InsertCommand *cmd = new InsertCommand( i18n( "Insert %1" ).arg( w->name() ), this, w, r ); + commandHistory()->addCommand( cmd ); + cmd->execute(); + } + + TemplateWizardInterface *iface = mainWindow()->templateWizardInterface( w->className() ); + if ( iface ) { + iface->setup( w->className(), w, iFace(), mainWindow()->designerInterface() ); + iface->release(); + } +} + +void FormWindow::insertWidget( TQWidget *w, bool checkName ) +{ + if ( !w ) + return; + if ( checkName ) { + TQString s = w->name(); + unify( TQT_TQOBJECT(w), s, TRUE ); + w->setName( s ); + } + + MetaDataBase::addEntry( TQT_TQOBJECT(w) ); + int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(TQT_TQOBJECT(w)) ); + if ( WidgetDatabase::isCustomWidget( id ) ) { + TQWhatsThis::add( w, i18n("A %1 (custom widget) " + "

Click Edit Custom Widgets... in the Tools|Custom " + "menu to add and change custom widgets. You can add " + "properties as well as signals and slots to integrate custom widgets into " + "TQt Designer, and provide a pixmap which will be used to represent " + "the widget on the form.

") + .arg(WidgetDatabase::toolTip( id )) ); + TQToolTip::add( w, i18n("A %1 (custom widget)").arg(WidgetDatabase::toolTip( id )) ); + } else { + TQString tt = WidgetDatabase::toolTip( id ); + TQString wt = WidgetDatabase::whatsThis( id ); + if ( !wt.isEmpty() && !tt.isEmpty() ) + TQWhatsThis::add( w, TQString("A %1

%2

").arg( tt ).arg( wt ) ); + } + + restoreCursors( w, this ); + widgets()->insert( w, w ); + w->show(); +} + +void FormWindow::removeWidget( TQWidget *w ) +{ + MetaDataBase::removeEntry( TQT_TQOBJECT(w) ); + widgets()->take( w ); +} + +void FormWindow::handleContextMenu( TQContextMenuEvent *e, TQWidget *w ) +{ + CHECK_MAINWINDOW; + switch ( currTool ) { + case POINTER_TOOL: { + if ( !isMainContainer( TQT_TQOBJECT(w) ) && qstrcmp( w->name(), "central widget" ) != 0 ) { // press on a child widget + raiseChildSelections( w ); // raise selections and select widget + selectWidget( TQT_TQOBJECT(w) ); + // if widget is laid out, find the first non-laid out super-widget + TQWidget *realWidget = w; // but store the original one + while ( w->parentWidget() && + ( WidgetFactory::layoutType( w->parentWidget()) != WidgetFactory::NoLayout || + !insertedWidgets.find(w) ) ) + w = w->parentWidget(); + if ( ::tqqt_cast(mainContainer()) && ((TQMainWindow*)mainContainer())->centralWidget() == realWidget ) { + e->accept(); + mainwindow->popupFormWindowMenu( e->globalPos(), this ); + } else { + e->accept(); + mainwindow->popupWidgetMenu( e->globalPos(), this, realWidget); + } + } else { + e->accept(); + clearSelection(); + mainwindow->popupFormWindowMenu( e->globalPos(), this ); + } + break; } + default: + break; + } +} + +void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) +{ + CHECK_MAINWINDOW; + checkedSelectionsForMove = FALSE; + checkSelectionsTimer->stop(); + if ( !sizePreviewLabel ) { + sizePreviewLabel = new TQLabel( this ); + sizePreviewLabel->hide(); + sizePreviewLabel->setBackgroundColor( TQColor( 255, 255, 128 ) ); + sizePreviewLabel->setFrameStyle( TQFrame::Plain | TQFrame::Box ); + } + + switch ( currTool ) { + case POINTER_TOOL: + if ( !isMainContainer( TQT_TQOBJECT(w) ) && qstrcmp( w->name(), "central widget" ) != 0 ) { // press on a child widget + // if the clicked widget is not in a layout, raise it + if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) + w->raise(); + if ( ( e->state() & ControlButton ) ) { // with control pressed, always start rubber band selection + drawRubber = TRUE; + currRect = TQRect( 0, 0, -1, -1 ); + startRectDraw( mapFromGlobal( e->globalPos() ), e->globalPos(), this, Rubber ); + break; + } + + bool sel = isWidgetSelected( TQT_TQOBJECT(w) ); + if ( !( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) ) { // control not pressed... + if ( !sel ) { // ...and widget no selectted: unselect all + clearSelection( FALSE ); + } else { // ...widget selected + // only if widget has a layout (it is a layout meta widget or a laid out container!), unselect its childs + if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout ) { + TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); + setPropertyShowingBlocked( TRUE ); + for ( TQObject *o = l->first(); o; o = l->next() ) { + if ( !o->isWidgetType() ) + continue; + if ( insertedWidgets.find( (TQWidget*)o ) ) + selectWidget( TQT_TQOBJECT(o), FALSE ); + } + setPropertyShowingBlocked( FALSE ); + delete l; + } + } + tqApp->processEvents(); + } + if ( ( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) && + sel && e->button() == Qt::LeftButton ) { // control pressed and selected, unselect widget + selectWidget( TQT_TQOBJECT(w), FALSE ); + break; + } + + raiseChildSelections( w ); // raise selections and select widget + selectWidget( TQT_TQOBJECT(w) ); + + // if widget is laid out, find the first non-laid out super-widget + while ( w->parentWidget() && + ( WidgetFactory::layoutType( w->parentWidget()) != WidgetFactory::NoLayout || !insertedWidgets.find(w) ) ) + w = w->parentWidget(); + + if ( e->button() == Qt::LeftButton ) { // left button: store original geometry and more as the widget might start moving + widgetPressed = TRUE; + widgetGeom = TQRect( w->pos(), w->size() ); + oldPressPos = w->mapFromGlobal( e->globalPos() ); + origPressPos = oldPressPos; + checkedSelectionsForMove = FALSE; + moving.clear(); + if ( w->parentWidget() && !isMainContainer( TQT_TQOBJECT(w->parentWidget()) ) && !isCentralWidget( TQT_TQOBJECT(w->parentWidget()) ) ) { + targetContainer = w->parentWidget(); + hadOwnPalette = w->parentWidget()->ownPalette(); + restorePalette = w->parentWidget()->palette(); + } + } + } else { // press was on the formwindow + if ( e->button() == Qt::LeftButton ) { // left button: start rubber selection and show formwindow properties + drawRubber = TRUE; + if ( !( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) ) { + clearSelection( FALSE ); + TQObject *opw = propertyWidget; + propertyWidget = TQT_TQOBJECT(mainContainer()); + if ( opw->isWidgetType() ) + repaintSelection( (TQWidget*)opw ); + } + currRect = TQRect( 0, 0, -1, -1 ); + startRectDraw( mapFromGlobal( e->globalPos() ), e->globalPos(), this, Rubber ); + } + } + break; + case CONNECT_TOOL: + case BUDDY_TOOL: + if ( e->button() != Qt::LeftButton ) + break; + validForBuddy = FALSE; + if ( currTool == BUDDY_TOOL ) { + if ( !::tqqt_cast(w) ) + break; + clearSelection( FALSE ); + validForBuddy = TRUE; + mainWindow()->statusMessage( i18n( "Set buddy for '%1' to..." ).arg( w->name() ) ); + } else { + mainWindow()->statusMessage( i18n( "Connect '%1' with..." ).arg( w->name() ) ); + } + saveBackground(); + startPos = mapFromGlobal( e->globalPos() ); + currentPos = startPos; + startWidget = designerWidget( TQT_TQOBJECT(w) ); + endWidget = startWidget; + beginUnclippedPainter( FALSE ); + drawConnectionLine(); + break; + case ORDER_TOOL: + if ( !isMainContainer( TQT_TQOBJECT(w) ) ) { // press on a child widget + orderedWidgets.removeRef( w ); + orderedWidgets.append( w ); + for ( TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev() ) { + int i = stackedWidgets.findRef( wid ); + if ( i != -1 ) { + stackedWidgets.removeRef( wid ); + stackedWidgets.insert( 0, wid ); + } + } + TQWidgetList oldl = MetaDataBase::tabOrder( this ); + TabOrderCommand *cmd = new TabOrderCommand( i18n( "Change Tab Order" ), this, oldl, stackedWidgets ); + cmd->execute(); + commandHistory()->addCommand( cmd, TRUE ); + updateOrderIndicators(); + } + break; + default: // any insert widget tool + if ( e->button() == Qt::LeftButton ) { + insertParent = WidgetFactory::containerOfWidget( mainContainer() ); // default parent for new widget is the formwindow + if ( !isMainContainer( TQT_TQOBJECT(w) ) ) { // press was not on formwindow, check if we can find another parent + TQWidget *wid = w; + for (;;) { + int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(wid) ) ); + if ( ( WidgetDatabase::isContainer( id ) || wid == mainContainer() ) && + !::tqqt_cast(wid) && !::tqqt_cast(wid) ) { + insertParent = WidgetFactory::containerOfWidget( wid ); // found another parent, store it + break; + } else { + wid = wid->parentWidget(); + if ( !wid ) + break; + } + } + } + startRectDraw( w->mapFromGlobal( e->globalPos() ), e->globalPos(), w, Insert ); + } + break; + } +} + +void FormWindow::handleMouseDblClick( TQMouseEvent *, TQWidget *w ) +{ + CHECK_MAINWINDOW; + switch ( currTool ) { + case ORDER_TOOL: + if ( !isMainContainer( TQT_TQOBJECT(w) ) ) { // press on a child widget + orderedWidgets.clear(); + orderedWidgets.append( w ); + for ( TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev() ) { + int i = stackedWidgets.findRef( wid ); + if ( i != -1 ) { + stackedWidgets.removeRef( wid ); + stackedWidgets.insert( 0, wid ); + } + } + TQWidgetList oldl = MetaDataBase::tabOrder( this ); + TabOrderCommand *cmd = new TabOrderCommand( i18n( "Change Tab Order" ), this, oldl, stackedWidgets ); + cmd->execute(); + commandHistory()->addCommand( cmd, TRUE ); + updateOrderIndicators(); + } + default: + if ( !WidgetFactory::isPassiveInteractor( TQT_TQOBJECT(w) ) && + ( isMainContainer( TQT_TQOBJECT(w) ) || TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(this) ) ) + mainWindow()->editSource(); + break; + } +} + +void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) +{ + CHECK_MAINWINDOW; + if ( ( e->state() & Qt::LeftButton ) != Qt::LeftButton ) + return; + + TQWidget *newendWidget = endWidget, *oldendWidget = endWidget, *wid; + bool drawRecRect; + switch ( currTool ) { + case POINTER_TOOL: + if ( widgetPressed && allowMove( w ) ) { // we are prepated for a move + + // if widget is laid out, find the first non-laid out super-widget + while ( w->parentWidget() && + ( WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout || !insertedWidgets.find(w ) ) ) + w = w->parentWidget(); + + // calc correct position + TQPoint pos = w->mapFromGlobal( e->globalPos() ); + +#if 0 + TQPoint mpos = w->mapToParent( pos ); + // check if we are not outside the visible area, else correct coords + if ( mpos.x() < 0 ) + pos.setX( w->mapFromParent( TQPoint( 0, mpos.y() ) ).x() ); + if ( mpos.y() < 0 ) + pos.setY( w->mapFromParent( TQPoint( mpos.x(), 0 ) ).y() ); + if ( mpos.x() > w->parentWidget()->width() ) + pos.setX( w->mapFromParent( TQPoint( w->parentWidget()->width(), mpos.y() ) ).x() ); + if ( mpos.y() > w->parentWidget()->height() ) + pos.setY( w->mapFromParent( TQPoint( mpos.x(), w->parentWidget()->height() ) ).y() ); +#endif + + // calc move distance and store it + TQPoint d = oldPressPos - pos; + if ( TQABS( d.x() ) < grid().x() ) + d.setX( 0 ); + if ( TQABS( d.y() ) < grid().y() ) + d.setY( 0 ); + if ( d.x() == 0 ) + pos.setX( oldPressPos.x() ); + if ( d.y() == 0 ) + pos.setY( oldPressPos.y() ); + oldPressPos = pos; + + // snap to grid + int x = widgetGeom.x() - d.x(); + widgetGeom.setX( x ); + x = ( x / grid().x() ) * grid().x(); + int y = widgetGeom.y() - d.y(); + widgetGeom.setY( y ); + y = ( y / grid().y() ) * grid().y(); + TQPoint p = w->pos(); + + if ( x - p.x() != 0 || y - p.y() != 0 ) { // if we actually have to move + if ( !checkedSelectionsForMove ) { // if not checked yet, check if the correct widget are selected... + if ( !isWidgetSelected( TQT_TQOBJECT(w) ) ) { // and unselect others. Only siblings can be moved at the same time + setPropertyShowingBlocked( TRUE ); + selectWidget( TQT_TQOBJECT(w) ); + setPropertyShowingBlocked( FALSE ); + } + checkSelectionsForMove( w ); + } + + // check whether we would have to reparent the selection and highlight the possible new parent container + TQMapConstIterator it = moving.begin(); + TQWidget* wa = containerAt( e->globalPos(), it.key() ); + if ( wa && !isMainContainer( TQT_TQOBJECT(wa) ) && !isCentralWidget( TQT_TQOBJECT(wa) ) ) { + wa = WidgetFactory::containerOfWidget( wa ); + // ok, looks like we moved onto a container + + if ( wa != targetContainer ) { + if ( targetContainer ) { + if ( hadOwnPalette ) + targetContainer->setPalette( restorePalette ); + else + targetContainer->unsetPalette(); + } + targetContainer = wa; + hadOwnPalette = wa->ownPalette(); + restorePalette = wa->palette(); + wa->setPaletteBackgroundColor( wa->colorGroup().midlight() ); + } + } + else if ( targetContainer ) { + if( hadOwnPalette ) + targetContainer->setPalette( restorePalette ); + else + targetContainer->unsetPalette(); + targetContainer = 0; + } + + // finally move the selected widgets and show/update preview label + moveSelectedWidgets( x - p.x(), y - p.y() ); + sizePreviewLabel->setText( i18n( "%1/%2" ).arg( w->pos().x() ).arg( w->pos().y() ) ); + sizePreviewLabel->adjustSize(); + TQRect lg( mapFromGlobal( e->globalPos() ) + TQPoint( 16, 16 ), sizePreviewLabel->size() ); + checkPreviewGeometry( lg ); + sizePreviewLabel->setGeometry( lg ); + sizePreviewLabel->raise(); + sizePreviewLabel->show(); +#if defined(TQ_WS_WIN32) + windowsRepaintWorkaroundTimer->start( 100, TRUE ); +#endif + } else { // if we don't need to move, do some indication + TQRect lg( mapFromGlobal( e->globalPos() ) + TQPoint( 16, 16 ), sizePreviewLabel->size() ); + checkPreviewGeometry( lg ); + sizePreviewLabel->move( lg.x(), lg.y() ); + } + + oldPressPos += ( p - w->pos() ); + } else if ( drawRubber ) { // draw rubber if we are in rubber-selection mode + continueRectDraw( mapFromGlobal( e->globalPos() ), e->globalPos(), this, Rubber ); + } + break; + case CONNECT_TOOL: + restoreConnectionLine(); + wid = tqApp->widgetAt( e->globalPos(), TRUE ); + if ( wid ) + wid = designerWidget( TQT_TQOBJECT(wid) ); + if ( wid && ( isMainContainer( TQT_TQOBJECT(wid) ) || insertedWidgets.find( wid ) ) && wid->isVisibleTo( this ) ) + newendWidget = wid; + if ( ::tqqt_cast(newendWidget) || ::tqqt_cast(newendWidget) ) + newendWidget = (TQWidget*)endWidget; + drawRecRect = newendWidget != endWidget; + if ( newendWidget && + ( isMainContainer( TQT_TQOBJECT(newendWidget) ) || insertedWidgets.find( newendWidget ) ) && !isCentralWidget( TQT_TQOBJECT(newendWidget) ) ) + endWidget = newendWidget; + mainWindow()->statusMessage( i18n( "Connect '%1' to '%2'" ).arg( startWidget->name() ). + arg( endWidget->name() ) ); + currentPos = mapFromGlobal( e->globalPos() ); + tqApp->processEvents(); + if ( drawRecRect ) + restoreRect( TQRect( mapToForm( ( (TQWidget*)oldendWidget )->parentWidget(), ( (TQWidget*)oldendWidget )->pos() ), + ( (TQWidget*)oldendWidget )->size() ) ); + drawConnectionLine(); + break; + case BUDDY_TOOL: + if ( !validForBuddy ) + break; + restoreConnectionLine(); + wid = tqApp->widgetAt( e->globalPos(), TRUE ); + if ( wid ) + wid = designerWidget( TQT_TQOBJECT(wid) ); + if ( wid && canBeBuddy( wid ) && wid->isVisibleTo( this ) ) + newendWidget = wid; + else + newendWidget = 0; + if ( ::tqqt_cast(newendWidget) || ::tqqt_cast(newendWidget) ) + newendWidget = (TQWidget*)endWidget; + drawRecRect = newendWidget != endWidget; + if ( !newendWidget ) + endWidget = newendWidget; + else if ( insertedWidgets.find( newendWidget ) && !isCentralWidget( TQT_TQOBJECT(newendWidget) ) ) + endWidget = newendWidget; + if ( endWidget ) + mainWindow()->statusMessage( i18n( "Set buddy '%1' to '%2'" ).arg( startWidget->name() ). + arg( endWidget->name() ) ); + else + mainWindow()->statusMessage( i18n( "Set buddy '%1' to ..." ).arg( startWidget->name() ) ); + currentPos = mapFromGlobal( e->globalPos() ); + tqApp->processEvents(); + if ( drawRecRect && oldendWidget ) + restoreRect( TQRect( mapToForm( ( (TQWidget*)oldendWidget )->parentWidget(), ( (TQWidget*)oldendWidget )->pos() ), + ( (TQWidget*)oldendWidget )->size() ) ); + drawConnectionLine(); + break; + case ORDER_TOOL: + break; + default: // we are in an insert-widget tool + if ( insertParent ) // draw insert rect + continueRectDraw( w->mapFromGlobal( e->globalPos() ), e->globalPos(), w, Insert ); + break; + } +} + +void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w ) +{ + CHECK_MAINWINDOW; + if ( e->button() != Qt::LeftButton ) + return; + + switch ( currTool ) { + case POINTER_TOOL: + if ( widgetPressed && allowMove( w ) ) { // we moved the widget + sizePreviewLabel->hide(); + + if ( moving.isEmpty() || w->pos() == *moving.find(w) ) + break; + + // restore targetContainer + if ( targetContainer ) { + if( hadOwnPalette ) + targetContainer->setPalette( restorePalette ); + else + targetContainer->unsetPalette(); + } + + // tell property editor to update + if ( propertyWidget && propertyWidget->isWidgetType() && !isMainContainer( propertyWidget ) ) + emitUpdateProperties( propertyWidget ); + + TQMapConstIterator it = moving.begin(); + TQWidget *oldParent = it.key()->parentWidget(); + TQWidget *newParent = oldParent; + // check whether we have to reparent the selection + TQWidget* wa = containerAt( e->globalPos(), it.key() ); + if ( wa ) { + wa = WidgetFactory::containerOfWidget( wa ); + // ok, looks like we moved onto a container + + // check whether we really have different parents. + if ( wa == it.key()->parentWidget() ) + goto make_move_command; + + // break layout if necessary + if ( WidgetFactory::layoutType( wa ) != WidgetFactory::NoLayout ) { + if ( TQMessageBox::information( mainWindow(), i18n( "Inserting Widget" ), + i18n( "You tried to insert a widget into the " + "layout Container Widget '%1'.\n" + "This is not possible. " + "In order to insert the widget, the layout of '%1'\n" + "must first be broken.\n" + "Break the layout or cancel the operation?" ). + arg( wa->name() ). + arg( wa->name() ), i18n( "&Break Layout" ), i18n( "&Cancel" ) ) ) + goto make_move_command; // cancel + breakLayout( wa ); + } + + // doesn't need to be a command, the MoveCommand does reparenting too + bool emitSelChanged = FALSE; + for ( TQMap::Iterator it = moving.begin(); it != moving.end(); ++it ) { + TQWidget *i = it.key(); + if ( !emitSelChanged && ::tqqt_cast(i) ) { + if ( ::tqqt_cast(i->parentWidget()) || ::tqqt_cast(wa) ) + emitSelChanged = TRUE; + if ( !::tqqt_cast(wa) ) { + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(i), "buttonGroupId", FALSE ); + if ( ::tqqt_cast(i->parentWidget()) ) + ( (TQButtonGroup*)i->parentWidget() )->remove( (TQButton*)i ); + } + } + TQPoint pos = wa->mapFromGlobal( i->mapToGlobal( TQPoint(0,0) ) ); + i->reparent( wa, pos, TRUE ); + raiseSelection( i ); + raiseChildSelections( i ); + widgetChanged( TQT_TQOBJECT(i) ); + mainWindow()->objectHierarchy()->widgetRemoved( i ); + mainWindow()->objectHierarchy()->widgetInserted( i ); + } + if ( emitSelChanged ) { + emit showProperties( TQT_TQOBJECT(wa) ); + emit showProperties( propertyWidget ); + } + newParent = wa; + } + + make_move_command: + TQWidgetList widgets; // collect the widgets and its old and new positions which have been moved + TQValueList oldPos, newPos; + for ( it = moving.begin(); it != moving.end(); ++it ) { + widgets.append( it.key() ); + oldPos.append( *it ); + newPos.append( it.key()->pos() ); + } + // add move command, don't execute it, this is just a summary of the operations we did during the move-event handling + commandHistory()->addCommand( new MoveCommand( i18n( "Move" ), + this, widgets, + oldPos, newPos, oldParent, newParent ) ); + } else if ( drawRubber ) { // we were drawing a rubber selection + endRectDraw(); // get rid of the rectangle + blockSignals( TRUE ); + selectWidgets(); // select widgets which intersect the rect + blockSignals( FALSE ); + emitSelectionChanged(); // inform about selection changes + if ( propertyWidget ) + emitShowProperties( propertyWidget ); + } + break; + case CONNECT_TOOL: + case BUDDY_TOOL: + restoreConnectionLine(); + if ( startWidget ) + restoreRect( TQRect( mapToForm( ( (TQWidget*)startWidget )->parentWidget(), + ( (TQWidget*)startWidget )->pos() ), + ((TQWidget*)startWidget )->size() ) ); + if ( endWidget ) + restoreRect( TQRect( mapToForm( ( (TQWidget*)endWidget )->parentWidget(), + ( (TQWidget*)endWidget )->pos() ), + ( (TQWidget*)endWidget )->size() ) ); + endUnclippedPainter(); + tqApp->processEvents(); + + if ( startWidget && endWidget ) { + if ( currTool == CONNECT_TOOL ) + editConnections(); + else if ( currTool == BUDDY_TOOL && validForBuddy && startWidget != endWidget ) { + TQString oldBuddy = startWidget->property( "buddy" ).toString(); + if ( oldBuddy.isNull() ) + oldBuddy = ""; + SetPropertyCommand *cmd = new SetPropertyCommand( i18n( "Set Buddy for %1" ).arg( startWidget->name() ), + this, TQT_TQOBJECT(startWidget), mainWindow()->propertyeditor(), + "buddy", startWidget->property( "buddy" ), + endWidget->name(), endWidget->name(), + oldBuddy ); + commandHistory()->addCommand( cmd, TRUE ); + cmd->execute(); + emitUpdateProperties( TQT_TQOBJECT(startWidget) ); + } + } + if ( !toolFixed ) + mainwindow->resetTool(); + startWidget = endWidget = 0; + mainWindow()->statusBar()->clear(); + break; + case ORDER_TOOL: + break; + default: // any insert widget tool is active + if ( insertParent ) { // we should insert the new widget now + endRectDraw(); + if ( WidgetFactory::layoutType( insertParent ) != WidgetFactory::NoLayout ) { + if ( TQMessageBox::information( mainWindow(), i18n( "Inserting Widget" ), + i18n( "You tried to insert a widget into the " + "layout Container Widget '%1'.\n" + "This is not possible. " + "In order to insert the widget, the layout of '%1'\n" + "must first be broken.\n" + "Break the layout or cancel the operation?" ). + arg( insertParent->name() ). + arg( insertParent->name() ), i18n( "&Break Layout" ), i18n( "&Cancel" ) ) == 0 ) { + breakLayout( insertParent ); + } else { + if ( !toolFixed ) + mainWindow()->resetTool(); + break; + } + } + insertWidget(); // so do it + } + break; + } + widgetPressed = FALSE; + drawRubber = FALSE; + insertParent = 0; + delete buffer; + buffer = 0; +} + +void FormWindow::handleKeyPress( TQKeyEvent *e, TQWidget *w ) +{ + CHECK_MAINWINDOW; + e->ignore(); + checkSelectionsTimer->stop(); + if ( !checkedSelectionsForMove && + ( e->key() == Key_Left || + e->key() == Key_Right || + e->key() == Key_Up || + e->key() == Key_Down ) && + propertyWidget->isWidgetType() ) + checkSelectionsForMove( (TQWidget*)propertyWidget ); + checkSelectionsTimer->start( 1000, TRUE ); + if ( e->key() == Key_Left || e->key() == Key_Right || + e->key() == Key_Up || e->key() == Key_Down ) { + TQWidgetList widgets; + TQValueList oldPos, newPos; + for ( WidgetSelection *s = selections.first(); s; s = selections.next() ) { + if ( s->isUsed() ) { + int dx = 0, dy = 0; + bool control = e->state() & ControlButton; + + switch ( e->key() ) { + case Key_Left: { + e->accept(); + if ( control ) + dx = -1; + else + dx = -grid().x(); + } break; + case Key_Right: { + e->accept(); + if ( control ) + dx = 1; + else + dx = grid().x(); + } break; + case Key_Up: { + e->accept(); + if ( control ) + dy = -1; + else + dy = -grid().y(); + } break; + case Key_Down: { + e->accept(); + if ( control ) + dy = 1; + else + dy = grid().y(); + } break; + default: + break; + } + + widgets.append( s->widget() ); + oldPos.append( s->widget()->pos() ); + newPos.append( s->widget()->pos() + TQPoint( dx, dy ) ); + } + } + if ( !widgets.isEmpty() ) { + MoveCommand *cmd = new MoveCommand( i18n( "Move" ), this, + widgets, oldPos, newPos, 0, 0 ); + commandHistory()->addCommand( cmd, TRUE ); + cmd->execute(); + } + } + if ( !e->isAccepted() ) { + TQObjectList *l = queryList( TQWIDGET_OBJECT_NAME_STRING ); + if ( !l ) + return; + if ( l->find( TQT_TQOBJECT(w) ) != -1 ) + e->accept(); + delete l; + } + +} + +void FormWindow::handleKeyRelease( TQKeyEvent *e, TQWidget * ) +{ + e->ignore(); +} + +void FormWindow::selectWidget( TQObject *o, bool select ) +{ + CHECK_MAINWINDOW; + if ( !o->isWidgetType() ) { + // ########### do TQObject stuff + return; + } + + TQWidget *w = (TQWidget*)o; + + if ( isMainContainer( TQT_TQOBJECT(w) ) ) { + TQObject *opw = propertyWidget; + propertyWidget = TQT_TQOBJECT(mainContainer()); + if ( opw->isWidgetType() ) + repaintSelection( (TQWidget*)opw ); + emitShowProperties( propertyWidget ); + return; + } + + if ( ::tqqt_cast(mainContainer()) && w == ( (TQMainWindow*)mainContainer() )->centralWidget() ) { + TQObject *opw = propertyWidget; + propertyWidget = TQT_TQOBJECT(mainContainer()); + if ( opw->isWidgetType() ) + repaintSelection( (TQWidget*)opw ); + emitShowProperties( propertyWidget ); + return; + } + + if ( ::tqqt_cast(o) ) + return; + + if ( select ) { + TQObject *opw = propertyWidget; + propertyWidget = TQT_TQOBJECT(w); + if ( opw->isWidgetType() ) + repaintSelection( (TQWidget*)opw ); + if ( !isPropertyShowingBlocked() ) + emitShowProperties( propertyWidget ); + WidgetSelection *s = usedSelections.find( w ); + if ( s ) { + s->show(); + return; + } + + for ( WidgetSelection *s2 = selections.first(); s2; s2 = selections.next() ) { + if ( !s2->isUsed() ) { + s = s2; + } + } + + if ( !s ) { + s = new WidgetSelection( this, &usedSelections ); + selections.append( s ); + } + + s->setWidget( w ); + emitSelectionChanged(); + } else { + WidgetSelection *s = usedSelections.find( w ); + if ( s ) + s->setWidget( 0 ); + TQObject *opw = propertyWidget; + if ( !usedSelections.isEmpty() ) + propertyWidget = TQT_TQOBJECT(TQPtrDictIterator( usedSelections ).current()->widget()); + else + propertyWidget = TQT_TQOBJECT(mainContainer()); + if ( opw->isWidgetType() ) + repaintSelection( (TQWidget*)opw ); + if ( !isPropertyShowingBlocked() ) + emitShowProperties( propertyWidget ); + emitSelectionChanged(); + } +} + +TQPoint FormWindow::grid() const +{ + if ( !mainWindow() || !mainWindow()->snapGrid() ) + return TQPoint( 1, 1 ); + return mainWindow()->grid(); +} + +void FormWindow::updateSelection( TQWidget *w ) +{ + WidgetSelection *s = usedSelections.find( w ); + if ( !w->isVisibleTo( this ) ) + selectWidget( TQT_TQOBJECT(w), FALSE ); + else if ( s ) + s->updateGeometry(); +} + +void FormWindow::raiseSelection( TQWidget *w ) +{ + WidgetSelection *s = usedSelections.find( w ); + if ( s ) + s->show(); +} + +void FormWindow::repaintSelection( TQWidget *w ) +{ + WidgetSelection *s = usedSelections.find( w ); + if ( s ) + s->update(); +} + +void FormWindow::clearSelection( bool changePropertyDisplay ) +{ + TQPtrDictIterator it( usedSelections ); + for ( ; it.current(); ++it ) + it.current()->setWidget( 0, FALSE ); + + usedSelections.clear(); + if ( changePropertyDisplay ) { + TQObject *opw = propertyWidget; + propertyWidget = TQT_TQOBJECT(mainContainer()); + if ( opw->isWidgetType() ) + repaintSelection( (TQWidget*)opw ); + emitShowProperties( propertyWidget ); + } + emitSelectionChanged(); +} + +void FormWindow::startRectDraw( const TQPoint &p, const TQPoint &global, TQWidget *, RectType t ) +{ + TQPoint pos( p ); + pos = mapFromGlobal( global ); + oldRectValid = FALSE; + beginUnclippedPainter( TRUE ); + if ( t == Rubber ) + unclippedPainter->setPen( TQPen( color0, 1 ) ); + if ( t == Insert ) + rectAnchor = gridPoint( pos ); + else if ( t == Rubber ) + rectAnchor = pos; + currRect = TQRect( rectAnchor, TQPoint( 0, 0 ) ); + if ( t == Insert ) + drawSizePreview( pos, i18n("Use Size Hint") ); +} + +void FormWindow::continueRectDraw( const TQPoint &p, const TQPoint &global, TQWidget *, RectType t ) +{ + TQPoint pos =p; + pos = mapFromGlobal( global ); + TQPoint p2; + if ( t == Insert ) + p2 = gridPoint( pos ); + else if ( t == Rubber ) + p2 = pos; + TQRect r( rectAnchor, p2 ); + r = r.normalize(); + + if ( currRect == r ) { + TQString t = i18n( "%1/%2" ); + t = t.arg( r.width() - 1 ).arg( r.height() - 1 ); + drawSizePreview( pos, t ); + return; + } + + if ( oldRectValid ) + unclippedPainter->drawRect( currRect ); + if ( r.width() > 1 || r.height() > 1 ) { + oldRectValid = TRUE; + currRect = r; + if ( t == Insert ) { + TQString t = i18n( "%1/%2" ); + t = t.arg( r.width() - 1 ).arg( r.height() - 1 ); + drawSizePreview( pos, t ); + } + unclippedPainter->setClipRegion( TQRegion( rect() ).subtract( TQRect( sizePreviewPos, sizePreviewPixmap.size() ) ) ); + unclippedPainter->drawRect( currRect ); + unclippedPainter->setClipping( FALSE ); + } else { + oldRectValid = FALSE; + if ( t == Insert ) + drawSizePreview( pos, i18n("Use Size Hint") ); + } +} + +void FormWindow::endRectDraw() +{ + if ( !unclippedPainter ) + return; + + if ( oldRectValid ) + unclippedPainter->drawRect( currRect ); + drawSizePreview( TQPoint(-1,-1), TQString() ); + endUnclippedPainter(); +} + +void FormWindow::selectWidgets() +{ + TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING ); + if ( l ) { + for ( TQObject *o = l->first(); o; o = l->next() ) { + if ( ( (TQWidget*)o )->isVisibleTo( this ) && + insertedWidgets[ (void*)o ] ) { + TQPoint p = ( (TQWidget*)o )->mapToGlobal( TQPoint(0,0) ); + p = mapFromGlobal( p ); + TQRect r( p, ( (TQWidget*)o )->size() ); + if ( r.intersects( currRect ) && !r.contains( currRect ) ) + selectWidget( TQT_TQOBJECT(o) ); + } + } + delete l; + } + emitSelectionChanged(); +} + +bool FormWindow::isWidgetSelected( TQObject *w ) +{ + if ( w->isWidgetType() ) + return usedSelections.find( (TQWidget*)w ) != 0; + return FALSE; // #### do stuff for TQObjects +} + +void FormWindow::moveSelectedWidgets( int dx, int dy ) +{ + TQPtrDictIterator it( usedSelections ); + for ( ; it.current(); ++it ) { + WidgetSelection *s = it.current(); + TQWidget *w = s->widget(); + if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) + continue; + w->move( w->x() + dx, w->y() + dy ); + s->updateGeometry(); + updateChildSelections( w ); + } +} + +CommandHistory *FormWindow::commandHistory() +{ + return &commands; +} + +void FormWindow::undo() +{ + commandHistory()->undo(); +} + +void FormWindow::redo() +{ + commandHistory()->redo(); +} + +void FormWindow::raiseChildSelections( TQWidget *w ) +{ + TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); + if ( !l || !l->first() ) { + delete l; + return; + } + + TQPtrDictIterator it( usedSelections ); + for ( ; it.current(); ++it ) { + if ( l->findRef( TQT_TQOBJECT(it.current()->widget()) ) != -1 ) + it.current()->show(); + } + delete l; +} + +void FormWindow::updateChildSelections( TQWidget *w ) +{ + TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); + if ( l ) { + for ( TQObject *o = l->first(); o; o = l->next() ) { + if ( o->isWidgetType() && + insertedWidgets.find( (TQWidget*)o ) ) + updateSelection( (TQWidget*)o ); + } + delete l; + } +} + +void FormWindow::checkSelectionsForMove( TQWidget *w ) +{ + checkedSelectionsForMove = TRUE; + + TQObjectList *l = w->parentWidget()->queryList( TQWIDGET_OBJECT_NAME_STRING, 0, FALSE, FALSE ); + moving.clear(); + if ( l ) { + TQPtrDictIterator it( usedSelections ); + WidgetSelection *sel; + while ( ( sel = it.current() ) != 0 ) { + if ( it.current()->widget() == mainContainer() ) + continue; + ++it; + if ( l->find( TQT_TQOBJECT(sel->widget()) ) == -1 ) { + if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) + sel->setWidget( 0 ); + } else { + if ( WidgetFactory::layoutType( sel->widget()->parentWidget() ) == WidgetFactory::NoLayout ) { + moving.insert( sel->widget(), sel->widget()->pos() ); + sel->widget()->raise(); + raiseChildSelections( sel->widget() ); + raiseSelection( sel->widget() ); + } + } + } + delete l; + } +} + +void FormWindow::deleteWidgets() +{ + CHECK_MAINWINDOW; + TQWidgetList widgets; + TQPtrDictIterator it( usedSelections ); + for ( ; it.current(); ++it ) { + TQWidget *tb = 0; + if ( !( tb = mainWindow()->isAToolBarChild( TQT_TQOBJECT(it.current()->widget()) ) ) ) + widgets.append( it.current()->widget() ); + else + ( (QDesignerToolBar*)tb )->removeWidget( it.current()->widget() ); + } + + if ( widgets.isEmpty() ) + return; + + DeleteCommand *cmd = new DeleteCommand( i18n( "Delete" ), this, widgets ); + commandHistory()->addCommand( cmd ); + cmd->execute(); +} + +void FormWindow::editAdjustSize() +{ + TQPtrList commands; + TQWidgetList widgets = selectedWidgets(); + if ( widgets.isEmpty() ) { + TQRect oldr = geometry(); + mainContainer()->adjustSize(); + resize( mainContainer()->size() ); + // check whether our own size constraint hit us + if ( size() != mainContainer()->size() ) + mainContainer()->resize( size() ); + TQRect nr = geometry(); + if ( oldr != nr ) { + ResizeCommand *cmd = new ResizeCommand( i18n( "Adjust Size" ), this, this, oldr, nr ); + commandHistory()->addCommand( cmd ); + } + return; + } + for ( TQWidget* w = widgets.first(); w; w = widgets.next() ) { + if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) + continue; + TQRect oldr = w->geometry(); + w->adjustSize(); + TQRect nr = w->geometry(); + if ( oldr != nr ) + commands.append( new ResizeCommand( i18n("Adjust Size"), this, w, oldr, nr ) ); + } + + if ( commands.isEmpty() ) + return; + for ( WidgetSelection *s = selections.first(); s; s = selections.next() ) + s->updateGeometry(); + + MacroCommand *cmd = new MacroCommand( i18n( "Adjust Size" ), this, commands ); + commandHistory()->addCommand( cmd ); +} + + +TQWidgetList FormWindow::selectedWidgets() const +{ + TQWidgetList widgets; + TQPtrDictIterator it( usedSelections ); + for ( ; it.current(); ++it ) + widgets.append( it.current()->widget() ); + return widgets; +} + +void FormWindow::widgetChanged( TQObject *w ) +{ + if ( w->isWidgetType() ) + updateSelection( (TQWidget*)w ); + // ########## do TQObject stuff +} + +TQLabel *FormWindow::sizePreview() const +{ + if ( !sizePreviewLabel ) { + ( (FormWindow*)this )->sizePreviewLabel = new TQLabel( (FormWindow*)this ); + ( (FormWindow*)this )->sizePreviewLabel->hide(); + ( (FormWindow*)this )->sizePreviewLabel->setBackgroundColor( TQColor( 255, 255, 128 ) ); + ( (FormWindow*)this )->sizePreviewLabel->setFrameStyle( TQFrame::Plain | TQFrame::Box ); + } + return sizePreviewLabel; +} + +void FormWindow::invalidCheckedSelections() +{ + checkedSelectionsForMove = FALSE; +} + +void FormWindow::checkPreviewGeometry( TQRect &r ) +{ + if ( !TQT_TQRECT_OBJECT(rect()).contains( r ) ) { + if ( r.left() < rect().left() ) + r.moveTopLeft( TQPoint( 0, r.top() ) ); + if ( r.right() > rect().right() ) + r.moveBottomRight( TQPoint( rect().right(), r.bottom() ) ); + if ( r.top() < rect().top() ) + r.moveTopLeft( TQPoint( r.left(), rect().top() ) ); + if ( r.bottom() > rect().bottom() ) + r.moveBottomRight( TQPoint( r.right(), rect().bottom() ) ); + } +} + +void FormWindow::focusInEvent( TQFocusEvent * ){ + + if (ff) + ff->checkTimeStamp(); +} + +void FormWindow::focusOutEvent( TQFocusEvent * ) +{ + if ( propertyWidget && !isMainContainer( propertyWidget ) && !isWidgetSelected( propertyWidget ) ) { + TQObject *opw = propertyWidget; + propertyWidget = TQT_TQOBJECT(mainContainer()); + if ( opw->isWidgetType() ) + repaintSelection( (TQWidget*)opw ); + } +} + +void FormWindow::resizeEvent( TQResizeEvent *e ) +{ + TQWidget::resizeEvent( e ); + if ( currTool == ORDER_TOOL ) + repositionOrderIndicators(); + if ( isVisible() ) + formFile()->setModified( TRUE, FormFile::WFormWindow ); + +#if defined(TQ_WS_WIN32) + windowsRepaintWorkaroundTimer->start( 100, TRUE ); +#endif +} + +void FormWindow::windowsRepaintWorkaroundTimerTimeout() +{ +#if defined(TQ_WS_WIN32) + TQObjectList *l = queryList( TQWIDGET_OBJECT_NAME_STRING ); + for ( TQObject *o = l->first(); o; o = l->next() ) { + flickerfree_update( (TQWidget*)o ); + } + flickerfree_update( this ); + delete l; +#endif +} + +TQPtrDict *FormWindow::widgets() +{ + return &insertedWidgets; +} + +TQWidget *FormWindow::designerWidget( TQObject *o ) const +{ + if ( !o || !o->isWidgetType() ) + return 0; + TQWidget *w = (TQWidget*)o; + while ( w && !isMainContainer( TQT_TQOBJECT(w) ) && !insertedWidgets[ (void*)w ] || isCentralWidget( TQT_TQOBJECT(w) ) ) + w = (TQWidget*)w->parent(); + return w; +} + +void FormWindow::emitShowProperties( TQObject *w ) +{ + if ( w ) { + TQObject *opw = propertyWidget; + propertyWidget = w; + if ( opw->isWidgetType() ) + repaintSelection( (TQWidget*)opw ); + } + showPropertiesTimer->stop(); +// showPropertiesTimer->start( 0, TRUE ); + showPropertiesTimerDone(); +} + +void FormWindow::emitUpdateProperties( TQObject *w ) +{ + if ( w == propertyWidget ) { + updatePropertiesTimer->stop(); + updatePropertiesTimer->start( 0, TRUE ); + } +} + +void FormWindow::emitSelectionChanged() +{ + selectionChangedTimer->stop(); + selectionChangedTimer->start( 0, TRUE ); +} + +void FormWindow::updatePropertiesTimerDone() +{ + CHECK_MAINWINDOW; + if ( propertyWidget && mainWindow()->formWindow() == this ) + emit updateProperties( propertyWidget ); +} + +void FormWindow::showPropertiesTimerDone() +{ + CHECK_MAINWINDOW; + if ( propertyWidget && mainWindow()->formWindow() == this ) + emit showProperties( propertyWidget ); +} + +void FormWindow::selectionChangedTimerDone() +{ + emit selectionChanged(); +} + +void FormWindow::currentToolChanged() +{ + CHECK_MAINWINDOW; + toolFixed = FALSE; + int t = mainwindow->currentTool(); + if ( currTool == t && t != ORDER_TOOL ) + return; + + // tool cleanup + switch ( currTool ) { + case ORDER_TOOL: + hideOrderIndicators(); + break; + case CONNECT_TOOL: + case BUDDY_TOOL: + restoreConnectionLine(); + if ( startWidget ) + restoreRect( TQRect( mapToForm( ( (TQWidget*)startWidget )->parentWidget(), + ( (TQWidget*)startWidget )->pos() ), + ( (TQWidget*)startWidget )->size() ) ); + if ( endWidget ) + restoreRect( TQRect( mapToForm( ( (TQWidget*)endWidget )->parentWidget(), + ( (TQWidget*)endWidget )->pos() ), + ( (TQWidget*)endWidget )->size() ) ); + endUnclippedPainter(); + break; + case POINTER_TOOL: + break; + default: + if ( insertParent ) + endRectDraw(); + break; + } + + startWidget = endWidget = 0; + widgetPressed = FALSE; + drawRubber = FALSE; + insertParent = 0; + delete buffer; + buffer = 0; + + currTool = t; + + if ( hasFocus() ) + clearSelection( FALSE ); + + mainWindow()->statusBar()->clear(); + + // tool setup + switch ( currTool ) { + case POINTER_TOOL: + if ( propertyWidget && !isMainContainer( propertyWidget ) && !isWidgetSelected( propertyWidget ) ) + emitShowProperties( TQT_TQOBJECT(mainContainer()) ); + restoreCursors( this, this ); + break; + case ORDER_TOOL: + if ( mainWindow()->formWindow() == this ) { + mainWindow()->statusMessage( i18n( "Click widgets to change the tab order...") ); + orderedWidgets.clear(); + showOrderIndicators(); + if ( mainWindow()->formWindow() == this ) + emitShowProperties( TQT_TQOBJECT(mainContainer()) ); + setCursorToAll( ArrowCursor, this ); + } + break; + case CONNECT_TOOL: + case BUDDY_TOOL: + if ( currTool == CONNECT_TOOL ) + mainWindow()->statusMessage( i18n( "Drag a line to create a connection...") ); + else + mainWindow()->statusMessage( i18n( "Drag a line to set a buddy...") ); + setCursorToAll( CrossCursor, this ); + if ( mainWindow()->formWindow() == this ) + emitShowProperties( TQT_TQOBJECT(mainContainer()) ); + break; + default: + mainWindow()->statusMessage( i18n( "Click on the form to insert a %1..." ).arg( WidgetDatabase::toolTip( currTool ).lower() ) ); + setCursorToAll( CrossCursor, this ); + if ( mainWindow()->formWindow() == this ) + emitShowProperties( TQT_TQOBJECT(mainContainer()) ); + break; + } +} + +void FormWindow::showOrderIndicators() +{ + hideOrderIndicators(); + orderIndicators.setAutoDelete( TRUE ); + TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING ); + stackedWidgets = MetaDataBase::tabOrder( this ); + if ( l ) { + int order = 1; + for ( TQObject *o = l->first(); o; o = l->next() ) { + TQWidget* w = (TQWidget*) o; + if ( w->isShown() && + insertedWidgets[ (void*)w ] && + w->focusPolicy() != TQ_NoFocus ) { + OrderIndicator* ind = new OrderIndicator( order++, w, this ); + orderIndicators.append( ind ); + if ( stackedWidgets.findRef( w ) == -1 ) + stackedWidgets.append( w ); + } + } + delete l; + } + updateOrderIndicators(); +} + +void FormWindow::hideOrderIndicators() +{ + orderIndicators.clear(); +} + +void FormWindow::updateOrderIndicators() +{ + int order = 1; + for ( TQWidget *w = stackedWidgets.first(); w; w = stackedWidgets.next() ) { + for ( OrderIndicator* i = orderIndicators.first(); i; i = orderIndicators.next() ) + i->setOrder( order, w ); + order++; + } +} + +void FormWindow::repositionOrderIndicators() +{ + for ( OrderIndicator* i = orderIndicators.first(); i; i = orderIndicators.next() ) + i->reposition(); +} + + +void FormWindow::updateUndoInfo() +{ + commandHistory()->emitUndoRedo(); +} + +bool FormWindow::checkCustomWidgets() +{ + TQStringList missingCustomWidgets; + TQPtrDictIterator it( insertedWidgets ); + for ( ; it.current(); ++it ) { + if ( it.current()->isA( "CustomWidget" ) ) { + TQString className = WidgetFactory::classNameOf( TQT_TQOBJECT(it.current()) ); + if ( !MetaDataBase::hasCustomWidget( className ) ) + missingCustomWidgets << className; + } + } + + if ( !missingCustomWidgets.isEmpty() ) { + TQString txt = i18n( "The following custom widgets are used in '%1',\n" + "but are not known to TQt Designer:\n" ).arg( name() ); + for ( TQStringList::Iterator sit = missingCustomWidgets.begin(); sit != missingCustomWidgets.end(); ++sit ) + txt += " " + *sit + "\n"; + txt += i18n( "If you save this form and generate code for it using uic, \n" + "the generated code will not compile.\n" + "Do you want to save this form now?" ); + if ( TQMessageBox::information( mainWindow(), i18n( "Save Form" ), txt ) == 1 ) + return FALSE; + } + return TRUE; +} + +void FormWindow::setPropertyShowingBlocked( bool b ) +{ + propShowBlocked = b; +} + +bool FormWindow::isPropertyShowingBlocked() const +{ + return propShowBlocked; +} + +int FormWindow::numSelectedWidgets() const +{ + return usedSelections.count(); +} + +TQString FormWindow::copy() +{ + CHECK_MAINWINDOW_VALUE( TQString() ); + Resource resource( mainWindow() ); + resource.setWidget( this ); + return resource.copy(); +} + +void FormWindow::lowerWidgets() +{ + TQWidgetList widgets; + TQPtrDictIterator it( usedSelections ); + for ( ; it.current(); ++it ) + widgets.append( it.current()->widget() ); + + LowerCommand *cmd = new LowerCommand( i18n( "Lower" ), this, widgets ); + cmd->execute(); + commandHistory()->addCommand( cmd ); +} + +void find_accel( const TQString &txt, TQMap &accels, TQWidget *w ) +{ + int i = txt.find( "&" ); + if ( i == -1 ) + return; + TQChar c = txt[ i + 1 ]; + if ( c.isNull() || c == '&' ) + return; + c = c.lower(); + TQMap::Iterator it = accels.find( c ); + if ( it == accels.end() ) { + TQWidgetList wl; + wl.append( w ); + accels.insert( c, wl ); + } else { + TQWidgetList *wl = &*it; + wl->append( w ); + } +} + +void FormWindow::checkAccels() +{ + CHECK_MAINWINDOW; + TQMap accels; + TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING ); + if ( l ) { + for ( TQObject *o = l->first(); o; o = l->next() ) { + if ( ( (TQWidget*)o )->isVisibleTo( this ) && + insertedWidgets[ (void*)o ] ) { + TQWidget *w = (TQWidget*)o; + const TQMetaProperty* text = + w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE ); + const TQMetaProperty* title = + w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), TRUE ); + const TQMetaProperty* pageTitle = + w->metaObject()->property( w->metaObject()->findProperty( "pageTitle", TRUE ), TRUE ); + if ( text ) + find_accel( w->property( "text" ).toString(), accels, w ); + if ( title ) + find_accel( w->property( "title" ).toString(), accels, w ); + if ( pageTitle ) + find_accel( w->property( "pageTitle" ).toString(), accels, w ); + } else if ( ::tqqt_cast(o) ) { + ((MenuBarEditor *)o)->checkAccels( accels ); + } + } + delete l; + } + + bool ok = TRUE; + TQWidget *wid; + for ( TQMap::Iterator it = accels.begin(); it != accels.end(); ++it ) { + if ( (*it).count() > 1 ) { + ok = FALSE; + switch ( TQMessageBox::information( mainWindow(), i18n( "Check Accelerators" ), + i18n( "Accelerator '%1' is used once.", "Accelerator '%1' is used %n times.", (*it).count() + ).arg( it.key().upper() ), + i18n( "&Select" ), + i18n( "&Cancel" ), TQString(), 2 ) ) { + case 0: // select + clearSelection( FALSE ); + for ( wid = (*it).first(); wid; wid = (*it).next() ) + selectWidget( TQT_TQOBJECT(wid), TRUE ); + return; + case 1: // cancel + return; + } + } + } + + if ( ok ) + TQMessageBox::information( mainWindow(), i18n( "Check Accelerators" ), + i18n( "No accelerator is used more than once." ) ); +} + +void FormWindow::raiseWidgets() +{ + TQWidgetList widgets; + TQPtrDictIterator it( usedSelections ); + for ( ; it.current(); ++it ) + widgets.append( it.current()->widget() ); + + RaiseCommand *cmd = new RaiseCommand( i18n( "Raise" ), this, widgets ); + cmd->execute(); + commandHistory()->addCommand( cmd ); +} + +void FormWindow::paste( const TQString &cb, TQWidget *parent ) +{ + CHECK_MAINWINDOW; + Resource resource( mainWindow() ); + resource.setWidget( this ); + resource.paste( cb, parent ); +} + +void FormWindow::selectAll() +{ + checkedSelectionsForMove = FALSE; + blockSignals( TRUE ); + TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING ); + if ( l ) { + for ( TQObject *o = l->first(); o; o = l->next() ) { + if ( ( (TQWidget*)o )->isVisibleTo( this ) && + insertedWidgets[ (void*)o ] ) { + selectWidget( TQT_TQOBJECT(o) ); + } + } + delete l; + } + + blockSignals( FALSE ); + emitSelectionChanged(); + if ( propertyWidget ) + emitShowProperties( propertyWidget ); + emitSelectionChanged(); +} + +void FormWindow::layoutHorizontal() +{ + TQWidgetList widgets( selectedWidgets() ); + LayoutHorizontalCommand *cmd = new LayoutHorizontalCommand( i18n( "Lay OutQt::Horizontally" ), + this, mainContainer(), 0, widgets ); + clearSelection( FALSE ); + commandHistory()->addCommand( cmd ); + cmd->execute(); +} + +void FormWindow::layoutVertical() +{ + TQWidgetList widgets( selectedWidgets() ); + LayoutVerticalCommand *cmd = new LayoutVerticalCommand( i18n( "Lay OutQt::Vertically" ), + this, mainContainer(), 0, widgets ); + clearSelection( FALSE ); + commandHistory()->addCommand( cmd ); + cmd->execute(); +} + +void FormWindow::layoutHorizontalSplit() +{ + TQWidgetList widgets( selectedWidgets() ); + LayoutHorizontalSplitCommand *cmd = new LayoutHorizontalSplitCommand( i18n( "Lay OutQt::Horizontally (in splitter)" ), + this, mainContainer(), 0, widgets ); + clearSelection( FALSE ); + commandHistory()->addCommand( cmd ); + cmd->execute(); +} + +void FormWindow::layoutVerticalSplit() +{ + TQWidgetList widgets( selectedWidgets() ); + LayoutVerticalSplitCommand *cmd = new LayoutVerticalSplitCommand( i18n( "Lay OutQt::Vertically (in splitter)" ), + this, mainContainer(), 0, widgets ); + clearSelection( FALSE ); + commandHistory()->addCommand( cmd ); + cmd->execute(); +} + +void FormWindow::layoutGrid() +{ + int xres = grid().x(); + int yres = grid().y(); + + TQWidgetList widgets( selectedWidgets() ); + LayoutGridCommand *cmd = new LayoutGridCommand( i18n( "Lay Out in a Grid" ), + this, mainContainer(), 0, widgets, xres, yres ); + clearSelection( FALSE ); + commandHistory()->addCommand( cmd ); + cmd->execute(); +} + +void FormWindow::layoutHorizontalContainer( TQWidget *w ) +{ + if ( w == this ) + w = mainContainer(); + TQObjectList l = WidgetFactory::containerOfWidget(w)->childrenListObject(); + if ( l.isEmpty() ) + return; + TQWidgetList widgets; + for ( TQObject *o = l.first(); o; o = l.next() ) { + if ( o->isWidgetType() && + ( (TQWidget*)o )->isVisibleTo( this ) && + insertedWidgets.find( (TQWidget*)o ) ) + widgets.append( (TQWidget*)o ); + } + LayoutHorizontalCommand *cmd = new LayoutHorizontalCommand( i18n( "Lay Out ChildrenQt::Horizontally" ), + this, mainContainer(), w, widgets ); + clearSelection( FALSE ); + commandHistory()->addCommand( cmd ); + cmd->execute(); +} + +void FormWindow::layoutVerticalContainer( TQWidget *w ) +{ + if ( w == this ) + w = mainContainer(); + TQObjectList l = WidgetFactory::containerOfWidget(w)->childrenListObject(); + if ( l.isEmpty() ) + return; + TQWidgetList widgets; + for ( TQObject *o = l.first(); o; o = l.next() ) { + if ( o->isWidgetType() && + ( (TQWidget*)o )->isVisibleTo( this ) && + insertedWidgets.find( (TQWidget*)o ) ) + widgets.append( (TQWidget*)o ); + } + LayoutVerticalCommand *cmd = new LayoutVerticalCommand( i18n( "Lay Out ChildrenQt::Vertically" ), + this, mainContainer(), w, widgets ); + clearSelection( FALSE ); + commandHistory()->addCommand( cmd ); + cmd->execute(); +} + +void FormWindow::layoutGridContainer( TQWidget *w ) +{ + if ( w == this ) + w = mainContainer(); + int xres = grid().x(); + int yres = grid().y(); + + TQObjectList l = WidgetFactory::containerOfWidget(w)->childrenListObject(); + if ( l.isEmpty() ) + return; + TQWidgetList widgets; + for ( TQObject *o = l.first(); o; o = l.next() ) { + if ( o->isWidgetType() && + ( (TQWidget*)o )->isVisibleTo( this ) && + insertedWidgets.find( (TQWidget*)o ) ) + widgets.append( (TQWidget*)o ); + } + LayoutGridCommand *cmd = new LayoutGridCommand( i18n( "Lay Out Children in a Grid" ), + this, mainContainer(), w, widgets, xres, yres ); + clearSelection( FALSE ); + commandHistory()->addCommand( cmd ); + cmd->execute(); +} + +void FormWindow::breakLayout( TQWidget *w ) +{ + if ( w == this ) + w = mainContainer(); + w = WidgetFactory::containerOfWidget( w ); + TQPtrList commands; + + for (;;) { + if ( !w || w == this ) + break; + if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout && + WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) { + Command *cmd = breakLayoutCommand( w ); + if ( cmd ) + commands.insert( 0, cmd ); + if ( !::tqqt_cast(w) && !::tqqt_cast(w) ) + break; + } + w = w->parentWidget(); + } + + if ( commands.isEmpty() ) + return; + + clearSelection( FALSE ); + MacroCommand *cmd = new MacroCommand( i18n( "Break Layout" ), this, commands ); + commandHistory()->addCommand( cmd ); + cmd->execute(); +} + +BreakLayoutCommand *FormWindow::breakLayoutCommand( TQWidget *w ) +{ + CHECK_MAINWINDOW_VALUE( 0 ); + TQObjectList l = w->childrenListObject(); + if ( l.isEmpty() ) + return 0; + + TQWidgetList widgets; + for ( TQObject *o = l.first(); o; o = l.next() ) { + if ( o->isWidgetType() && + !mainWindow()->isAToolBarChild( TQT_TQOBJECT(o) ) && + ( (TQWidget*)o )->isVisibleTo( this ) && + insertedWidgets.find( (TQWidget*)o ) ) + widgets.append( (TQWidget*)o ); + } + return new BreakLayoutCommand( i18n( "Break Layout" ), this, WidgetFactory::widgetOfContainer( w ), widgets ); +} + +int FormWindow::numVisibleWidgets() const +{ + TQPtrDictIterator it( insertedWidgets ); + int visible = 0; + for ( ; it.current(); ++it ) { + if ( it.current()->isVisibleTo( (FormWindow*)this ) ) + visible++; + } + return visible; +} + +bool FormWindow::hasInsertedChildren( TQWidget *w ) const +{ + if ( !w ) + return FALSE; + w = WidgetFactory::containerOfWidget( w ); + if ( !w ) + return FALSE; + TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); + if ( !l || !l->first() ) { + delete l; + return FALSE; + } + + for ( TQObject *o = l->first(); o; o = l->next() ) { + if ( o->isWidgetType() && + ( (TQWidget*)o )->isVisibleTo( (FormWindow*)this ) && + insertedWidgets.find( (TQWidget*)o ) ) { + delete l; + return TRUE; + } + } + + delete l; + return FALSE; +} + +bool FormWindow::allowMove( TQWidget *w ) +{ + w = w->parentWidget(); + while ( w ) { + if ( ( isMainContainer( TQT_TQOBJECT(w) ) || insertedWidgets.find( w ) ) && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) + return TRUE; + w = w->parentWidget(); + } + return FALSE; +} + + +void FormWindow::editConnections() +{ + CHECK_MAINWINDOW; + buffer = 0; + if ( !startWidget || !endWidget ) + return; + + ConnectionDialog dlg( mainwindow ); + mainWindow()->statusMessage( i18n( "Edit connections...") ); + dlg.addConnection( TQT_TQOBJECT(startWidget), TQT_TQOBJECT(endWidget), TQString(), TQString() ); + TQTimer::singleShot( 0, &dlg, TQT_SLOT(ensureConnectionVisible()) ); + dlg.exec(); +} + +void FormWindow::saveBackground() +{ + if ( buffer ) + delete buffer; + buffer = new TQPixmap( width(), height() ); + *buffer = TQPixmap::grabWindow( winId() ); +} + +void FormWindow::restoreConnectionLine() +{ + if (!unclippedPainter || !buffer) // designer will occasionally crash if buffer is not tested to be non-zero + return; + + int a =TQABS( startPos.x() - currentPos.x() ); + int b = TQABS( startPos.y() - currentPos.y() ); + TQRect r( startPos, currentPos ); + + if ( a < 32 || b < 32 ) { // special case: vertical or horizontal line + r = r.normalize(); + unclippedPainter->drawPixmap( r.x() - 2, r.y() - 2, *buffer, + r.x() - 2, r.y() - 2, r.width() + 4, r.height() + 4 ); + return; + } + + if ( a <= 0 ) + a = 1; + if ( b <= 0 ) + b = 1; + int w, h; + if ( b > a ) { + h = 64; + w = ( a * h ) / b; + } else { + w = 64; + h = ( b * w ) / a; + } + + int dx = 2 * w / 3; + int dy = 2 * h / 3; + TQPoint p( startPos ); + + if ( r.x() > r.right() ) { + dx = dx * -1; + p.setX( p.x() - 64 ); + r.moveBy( -64, 0 ); + } + if ( r.y() > r.bottom() ) { + dy = dy * -1; + p.setY( p.y() - 64 ); + r.moveBy( 0, -64 ); + } + + w = h = 64; + r = r.normalize(); + while ( r.contains( p ) ) { + unclippedPainter->drawPixmap( p, *buffer, TQRect( p, TQSize( w, h ) ) ); + unclippedPainter->setPen( red ); + p.setX( p.x() + dx ); + p.setY( p.y() + dy ); + } + + unclippedPainter->drawPixmap( startPos.x() - 10, startPos.y() - 10, *buffer, + startPos.x() - 10, startPos.y() - 10, 20, 20 ); +} + +void FormWindow::restoreRect( const TQRect &rect ) +{ + if (!unclippedPainter || !buffer) + return; + + TQRect r( rect ); + r = r.normalize(); + + r = TQRect( r.x() + 2, r.y() + 2, r.width() - 4, r.height() - 4 ); + + unclippedPainter->drawPixmap( r.x() - 2, r.y() - 2, *buffer, r.x() - 2, r.y() - 2, r.width() + 4, 4 ); + unclippedPainter->drawPixmap( r.x() - 2, r.y() - 2, *buffer, r.x() - 2, r.y() - 2, 4, r.height() + 4 ); + unclippedPainter->drawPixmap( r.x() - 2, r.y() + r.height() - 3, *buffer, r.x() - 2, r.y() + r.height() - 3, r.width() + 4, 5 ); + unclippedPainter->drawPixmap( r.x() + r.width() - 2, r.y(), *buffer, r.x() + r.width() - 2, r.y(), 4, r.height() + 4 ); +} + +void FormWindow::drawConnectionLine() +{ + if ( !unclippedPainter ) + return; + + unclippedPainter->setPen( TQPen( white, 2 ) ); + unclippedPainter->drawLine( startPos, currentPos ); + if ( validForBuddy ) + unclippedPainter->setPen( TQPen( darkRed, 1 ) ); + else + unclippedPainter->setPen( TQPen( darkCyan, 1 ) ); + unclippedPainter->drawLine( startPos, currentPos ); + + if ( validForBuddy ) + unclippedPainter->setPen( TQPen( darkGreen, 1 ) ); + else + unclippedPainter->setPen( TQPen( magenta, 1 ) ); + if ( startWidget ) { + TQWidget *s = (TQWidget*)startWidget; + TQPoint p = mapToForm( s, TQPoint(0,0) ); + unclippedPainter->drawRect( TQRect( p + TQPoint( 2, 2 ), s->size() - TQSize( 4, 4 ) ) ); + } + if ( endWidget ) { + TQWidget *e = (TQWidget*)endWidget; + TQPoint p = mapToForm( e, TQPoint(0,0) ); + unclippedPainter->drawRect( TQRect( p + TQPoint( 2, 2 ), e->size() - TQSize( 4, 4 ) ) ); + } +} + +TQString FormWindow::fileName() const +{ + return ff->absFileName(); +} + +void FormWindow::setFileName( const TQString &fn ) +{ + ff->setFileName( fn ); + emit fileNameChanged( ff->fileName(), this ); +} + +void FormWindow::modificationChanged( bool m ) +{ + emit modificationChanged( m, this ); + emit modificationChanged( m, ff->fileName() ); +} + +bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt ) +{ + bool found = !isMainContainer( w ) && qstrcmp( name(), s.latin1() ) == 0; + if ( !found ) { + TQString orig = s; + int num = 1; + TQPtrDictIterator it( insertedWidgets ); + for ( ; it.current();) { + if ( TQT_BASE_OBJECT(it.current()) != TQT_BASE_OBJECT(w) && + qstrcmp( it.current()->name(), s.latin1() ) == 0 ) { + found = TRUE; + if ( !changeIt ) + break; + s = orig + "_" + TQString::number( ++num ); + it.toFirst(); + } else { + ++it; + } + } + if ( !found ) { + TQPtrList al; + TQAction *a = 0; + for ( a = actions.first(); a; a = actions.next() ) { + TQObjectList *l = a->queryList( TQACTION_OBJECT_NAME_STRING ); + al.append( a ); + for ( TQObject *ao = l->first(); ao; ao = l->next() ) + al.append( (TQAction*)ao ); + delete l; + } + for ( a = al.first(); a; a = al.next() ) { + if ( a != w && + qstrcmp( a->name(), s.latin1() ) == 0 ) { + found = TRUE; + if ( !changeIt ) + break; + s = orig + "_" + TQString::number( ++num ); + a = actions.first(); + } + } + } + if ( ::tqqt_cast(mainContainer()) && !found ) { + TQObjectList *l = mainContainer()->queryList( "PopupMenuEditor" ); + for ( TQObject *o = l->first(); o; o = l->next() ) { + if ( o != w && + qstrcmp ( o->name(), s.latin1() ) == 0 ) { + found = TRUE; + if ( !changeIt ) + break; + s = orig + "_" + TQString::number( ++num ); + o = l->first(); + } + } + delete l; + } + if ( ::tqqt_cast(mainContainer()) ) { + if ( !found ) { + TQObjectList *l = mainContainer()->queryList( TQDOCKWINDOW_OBJECT_NAME_STRING, 0, TRUE ); + for ( TQObject *o = l->first(); o; o = l->next() ) { + if ( o != w && + qstrcmp( o->name(), s.latin1() ) == 0 ) { + found = TRUE; + if ( !changeIt ) + break; + s = orig + "_" + TQString::number( ++num ); + o = l->first(); + } + } + delete l; + } + } + } + + if ( !found ) + return TRUE; + return FALSE; +} + +bool FormWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *w ) +{ + TQPtrDictIterator it( insertedWidgets ); + for ( ; it.current(); ++it ) { + if ( it.current()->isA( "CustomWidget" ) ) { + if ( qstrcmp( WidgetFactory::classNameOf( TQT_TQOBJECT(it.current()) ), w->className.utf8() ) == 0 ) + return TRUE; + } + } + + return FALSE; +} + +bool FormWindow::isDatabaseWidgetUsed() const +{ +#ifndef TQT_NO_SQL + TQStringList dbClasses; + dbClasses << TQDATATABLE_OBJECT_NAME_STRING; // add more here + TQPtrDictIterator it( insertedWidgets ); + for ( ; it.current(); ++it ) { + TQString c( it.current()->className() ); + if ( dbClasses.contains( c ) > 0 ) { + return TRUE; + } + } +#endif + return FALSE; +} + +bool FormWindow::isDatabaseAware() const +{ +#ifndef TQT_NO_SQL + if ( TQString(mContainer->className()) == "QDesignerDataBrowser" || TQString(mContainer->className()) == "QDesignerDataView" ) + return TRUE; + return isDatabaseWidgetUsed(); +#else + return FALSE; +#endif +} + +void FormWindow::visibilityChanged() +{ + if ( currTool != ORDER_TOOL ) { + emitUpdateProperties( TQT_TQOBJECT(currentWidget()) ); + } else { + updateOrderIndicators(); + repositionOrderIndicators(); + } +} + + +/*! + Maps \a pos in \a w's coordinates to the form's coordinate system. + + This is the equivalent to mapFromGlobal(w->mapToGlobal(pos) ) but + avoids the two roundtrips to the X-Server on Unix/X11. + */ +TQPoint FormWindow::mapToForm( const TQWidget* w, const TQPoint& pos ) const +{ + TQPoint p = pos; + const TQWidget* i = w; + while ( i && !i->isTopLevel() && !isMainContainer( TQT_TQOBJECT(const_cast(i)) ) ) { + p = i->mapToParent( p ); + i = i->parentWidget(); + } + return mapFromGlobal( w->mapToGlobal( pos ) ); +} + +static int widgetDepth( TQWidget *w ) +{ + int d = -1; + while ( w && !w->isTopLevel() ) { + d++; + w = w->parentWidget(); + } + + return d; +} + +static bool isChildOf( TQWidget *c, TQWidget *p ) +{ + while ( c && !c->isTopLevel() ) { + if ( c == p ) + return TRUE; + c = c->parentWidget(); + } + return FALSE; +} + +TQWidget *FormWindow::containerAt( const TQPoint &pos, TQWidget *notParentOf ) +{ + TQPtrDictIterator it( insertedWidgets ); + TQWidget *container = 0; + int depth = -1; + TQWidgetList selected = selectedWidgets(); + if ( TQT_TQRECT_OBJECT(rect()).contains( mapFromGlobal( pos ) ) ) { + container = mainContainer(); + depth = widgetDepth( container ); + } + + for ( ; it.current(); ++it ) { + if ( ::tqqt_cast(it.current()) + || ::tqqt_cast(it.current()) ) + continue; + if ( !it.current()->isVisibleTo( this ) ) + continue; + if ( selected.find( it.current() ) != -1 ) + continue; + if ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(it.current()) ) ) ) && + it.current() != mainContainer() ) + continue; + + // the rectangles of all ancestors of the container must contain the insert position + TQWidget *w = it.current(); + while ( w && !w->isTopLevel() ) { + if ( !TQT_TQRECT_OBJECT(w->rect()).contains( ( w->mapFromGlobal( pos ) ) ) ) + break; + w = w->parentWidget(); + } + if ( !( w == 0 || w->isTopLevel() ) ) continue; // we did not get through the full while loop + + int wd = widgetDepth( it.current() ); + if ( wd == depth && container ) { + if ( ( it.current()->parentWidget()->childrenListObject() ).find( TQT_TQOBJECT(it.current()) ) > + ( container->parentWidget()->childrenListObject() ).find( TQT_TQOBJECT(container) ) ) + wd++; + } + if ( wd > depth && !isChildOf( it.current(), notParentOf ) ) { + depth = wd; + container = it.current(); + } + } + + return container; +} + +bool FormWindow::isMainContainer( TQObject *w ) const +{ + return w && w->isWidgetType() && ( TQT_BASE_OBJECT(w) == this || TQT_BASE_OBJECT(w) == mainContainer() ); +} + +void FormWindow::setMainContainer( TQWidget *w ) +{ + bool resetPropertyWidget = isMainContainer( propertyWidget ); + if ( mContainer ) + insertedWidgets.remove( mContainer ); + if ( TQT_BASE_OBJECT(propertyWidget) == TQT_BASE_OBJECT(mContainer) ) + propertyWidget = 0; + delete mContainer; + mContainer = w; + insertedWidgets.insert( mContainer, mContainer ); + delete layout(); + TQHBoxLayout *l = new TQHBoxLayout( this ); + l->addWidget( w ); + if ( resetPropertyWidget ) { + TQObject *opw = propertyWidget; + propertyWidget = TQT_TQOBJECT(mContainer); + if ( opw && opw->isWidgetType() ) + repaintSelection( (TQWidget*)opw ); + } + if ( project() ) { + LanguageInterface *iface = MetaDataBase::languageInterface( project()->language() ); + if ( iface && !project()->isCpp() && !isFake() ) { + if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(this), "init()" ) ) + MetaDataBase::addFunction( TQT_TQOBJECT(this), "init()", "", "private", "function", + project()->language(), "void" ); + if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(this), "destroy()" ) ) + MetaDataBase::addFunction( TQT_TQOBJECT(this), "destroy()", "", "private", "function", + project()->language(), "void" ); + if ( !MetaDataBase::hasConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "shown()", TQT_TQOBJECT(mainContainer()), "init" ) ) + MetaDataBase::addConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "shown()", TQT_TQOBJECT(mainContainer()), "init" ); + if ( !MetaDataBase::hasConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "destroyed()", TQT_TQOBJECT(mainContainer()), "destroy" ) ) + MetaDataBase::addConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "destroyed()", + TQT_TQOBJECT(mainContainer()), "destroy" ); + } + } +} + +bool FormWindow::savePixmapInline() const +{ + return pixInline; +} + +bool FormWindow::savePixmapInProject() const +{ + return pixProject; +} + +TQString FormWindow::pixmapLoaderFunction() const +{ + return pixLoader; +} + +void FormWindow::setSavePixmapInline( bool b ) +{ + pixInline = b; + if ( b ) + pixProject = FALSE; +} + +void FormWindow::setSavePixmapInProject( bool b ) +{ + pixProject = b; + if ( b ) + pixInline = FALSE; +} + +void FormWindow::setPixmapLoaderFunction( const TQString &func ) +{ + pixLoader = func; +} + +void FormWindow::setActiveObject( TQObject *o ) +{ + emitShowProperties( o ); + propertyWidget = o; +} + +void FormWindow::setProject( Project *pro ) +{ + proj = pro; +} + +Project *FormWindow::project() const +{ + return proj; +} + +TQAction *FormWindow::findAction( const TQString &name ) +{ + for ( TQAction *a = actionList().first(); a; a = actionList().next() ) { + if ( TQString( a->name() ) == name ) + return a; + TQAction *ac = (TQAction*)a->child( name.latin1(), TQACTION_OBJECT_NAME_STRING ); + if ( ac ) + return ac; + } + return 0; +} + +void FormWindow::killAccels( TQObject *top ) +{ + TQObjectList *l = top->queryList( TQACCEL_OBJECT_NAME_STRING ); + if ( !l ) + return; + for ( TQObject *o = l->first(); o; o = l->next() ) + ( (TQAccel*)o )->setEnabled( FALSE ); + delete l; +} + +DesignerFormWindow *FormWindow::iFace() +{ + if ( !iface ) + iface = new DesignerFormWindowImpl( this ); + return iface; +} + +bool FormWindow::isCentralWidget( TQObject *w ) const +{ + if ( !::tqqt_cast(mainContainer()) ) + return FALSE; + return TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(( (TQMainWindow*)mainContainer() )->centralWidget()); +} + +int FormWindow::layoutDefaultSpacing() const +{ + return defSpacing; +} + +int FormWindow::layoutDefaultMargin() const +{ + return defMargin; +} + +void FormWindow::setLayoutDefaultSpacing( int s ) +{ + defSpacing = s; +} + +void FormWindow::setLayoutDefaultMargin( int s ) +{ + defMargin = s; +} + +void FormWindow::setSpacingFunction( const TQString &funct ) +{ + spacFunction = funct; +} + +TQString FormWindow::spacingFunction() const +{ + return spacFunction; +} + +void FormWindow::hasLayoutFunctions( bool b ) +{ + hasLayoutFunc = b; +} + +bool FormWindow::hasLayoutFunctions() const +{ + return hasLayoutFunc; +} + +void FormWindow::setMarginFunction( const TQString &funct ) +{ + margFunction = funct; +} + +TQString FormWindow::marginFunction() const +{ + return margFunction; +} + +FormFile *FormWindow::formFile() const +{ + return ff; +} + +void FormWindow::setFormFile( FormFile *f ) +{ + ff = f; + if ( ff ) + connect( this, TQT_SIGNAL( modificationChanged(bool, const TQString&) ), ff, TQT_SLOT( formWindowChangedSomehow() ) ); +} + +bool FormWindow::canBeBuddy( const TQWidget *w ) const +{ + return w->focusPolicy() != TQ_NoFocus; +} + +bool FormWindow::event( TQEvent *e ) +{ + if (e->type() == TQEvent::ShowMaximized) + { + if ( isMaximized() ) + setWindowState( windowState() & ~WindowMaximized | WindowActive); + return true; + } + return TQWidget::event(e); +} diff --git a/tdevdesigner/designer/formwindow.h b/kdevdesigner/designer/formwindow.h similarity index 100% rename from tdevdesigner/designer/formwindow.h rename to kdevdesigner/designer/formwindow.h diff --git a/tdevdesigner/designer/gotolinedialog.ui b/kdevdesigner/designer/gotolinedialog.ui similarity index 100% rename from tdevdesigner/designer/gotolinedialog.ui rename to kdevdesigner/designer/gotolinedialog.ui diff --git a/tdevdesigner/designer/gotolinedialog.ui.h b/kdevdesigner/designer/gotolinedialog.ui.h similarity index 100% rename from tdevdesigner/designer/gotolinedialog.ui.h rename to kdevdesigner/designer/gotolinedialog.ui.h diff --git a/kdevdesigner/designer/hierarchyview.cpp b/kdevdesigner/designer/hierarchyview.cpp new file mode 100644 index 00000000..c6433cd0 --- /dev/null +++ b/kdevdesigner/designer/hierarchyview.cpp @@ -0,0 +1,1508 @@ +/********************************************************************** +** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "hierarchyview.h" +#include "formwindow.h" +#include "globaldefs.h" +#include "mainwindow.h" +#include "command.h" +#include "widgetfactory.h" +#include "widgetdatabase.h" +#include "project.h" +#include "sourceeditor.h" +#include "propertyeditor.h" +#include "editfunctionsimpl.h" +#include "listeditor.h" +#include "actiondnd.h" +#include "actioneditorimpl.h" +#include "variabledialogimpl.h" +#include "popupmenueditor.h" +#include "menubareditor.h" + +#include +#include "kdevdesigner_part.h" +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "../interfaces/languageinterface.h" +#include +#include +#include + +#include + +TQListViewItem *newItem = 0; + +static TQPluginManager *classBrowserInterfaceManager = 0; + +HierarchyItem::HierarchyItem( Type type, TQListViewItem *parent, TQListViewItem *after, + const TQString &txt1, const TQString &txt2, const TQString &txt3 ) + : TQListViewItem( parent, after, txt1, txt2, txt3 ), typ( type ) +{ +} + +HierarchyItem::HierarchyItem( Type type, TQListView *parent, TQListViewItem *after, + const TQString &txt1, const TQString &txt2, const TQString &txt3 ) + : TQListViewItem( parent, after, txt1, txt2, txt3 ), typ( type ) +{ +} + +void HierarchyItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ) +{ + TQColorGroup g( cg ); + g.setColor( TQColorGroup::Base, backgroundColor() ); + g.setColor( TQColorGroup::Foreground, TQt::black ); + g.setColor( TQColorGroup::Text, TQt::black ); + TQString txt = text( 0 ); + if ( rtti() == Function && + MainWindow::self->currProject()->isCpp() && + ( txt == "init()" || txt == "destroy()" ) ) { + listView()->setUpdatesEnabled( FALSE ); + if ( txt == "init()" ) + setText( 0, txt + " " + "(Constructor)" ); + else + setText( 0, txt + " " + "(Destructor)" ); + TQListViewItem::paintCell( p, g, column, width, align ); + setText( 0, txt ); + listView()->setUpdatesEnabled( TRUE ); + } else { + TQListViewItem::paintCell( p, g, column, width, align ); + } + p->save(); + p->setPen( TQPen( cg.dark(), 1 ) ); + if ( column == 0 ) + p->drawLine( 0, 0, 0, height() - 1 ); + if ( listView()->firstChild() != this ) { + if ( nextSibling() != itemBelow() && itemBelow()->depth() < depth() ) { + int d = depth() - itemBelow()->depth(); + p->drawLine( -listView()->treeStepSize() * d, height() - 1, 0, height() - 1 ); + } + } + p->drawLine( 0, height() - 1, width, height() - 1 ); + p->drawLine( width - 1, 0, width - 1, height() ); + p->restore(); +} + +TQColor HierarchyItem::backgroundColor() +{ + updateBackColor(); + return backColor; +} + +void HierarchyItem::updateBackColor() +{ + if ( listView()->firstChild() == this ) { + backColor = *backColor1; + return; + } + + TQListViewItemIterator it( this ); + --it; + if ( it.current() ) { + if ( ( ( HierarchyItem*)it.current() )->backColor == *backColor1 ) + backColor = *backColor2; + else + backColor = *backColor1; + } else { + backColor = *backColor1; + } +} + +void HierarchyItem::setObject( TQObject *o ) +{ + obj = o; +} + +TQObject *HierarchyItem::object() const +{ + return obj; +} + +void HierarchyItem::okRename( int col ) +{ + if ( newItem == this ) + newItem = 0; + TQListViewItem::okRename( col ); +} + +void HierarchyItem::cancelRename( int col ) +{ + if ( newItem == this ) { + newItem = 0; + TQListViewItem::cancelRename( col ); + delete this; + return; + } + TQListViewItem::cancelRename( col ); +} + + + + +HierarchyList::HierarchyList( TQWidget *parent, FormWindow *fw, bool doConnects ) + : TQListView( parent ), formWindow( fw ) +{ + DesignerFormPix = SmallIcon( "designer_form.png" , KDevDesignerPartFactory::instance()); + DesignerLayoutPix = SmallIcon( "designer_layout.png" , KDevDesignerPartFactory::instance()); + DesignerFolderPix = SmallIcon( "designer_folder.png" , KDevDesignerPartFactory::instance()); + DesignerEditSlotsPix = SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance()); + + init_colors(); + + setDefaultRenameAction( Accept ); + header()->setMovingEnabled( FALSE ); + header()->setStretchEnabled( TRUE ); + normalMenu = 0; + tabWidgetMenu = 0; + addColumn( i18n( "Name" ) ); + addColumn( i18n( "Class" ) ); + TQPalette p( palette() ); + p.setColor( TQColorGroup::Base, TQColor( *backColor2 ) ); + (void)*selectedBack; // hack + setPalette( p ); + disconnect( header(), TQT_SIGNAL( sectionClicked( int ) ), + this, TQT_SLOT( changeSortColumn( int ) ) ); + setSorting( -1 ); + setHScrollBarMode( AlwaysOff ); + setVScrollBarMode( AlwaysOn ); + if ( doConnects ) { + connect( this, TQT_SIGNAL( clicked( TQListViewItem * ) ), + this, TQT_SLOT( objectClicked( TQListViewItem * ) ) ); + connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), + this, TQT_SLOT( objectDoubleClicked( TQListViewItem * ) ) ); + connect( this, TQT_SIGNAL( returnPressed( TQListViewItem * ) ), + this, TQT_SLOT( objectClicked( TQListViewItem * ) ) ); + connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint&, int ) ), + this, TQT_SLOT( showRMBMenu( TQListViewItem *, const TQPoint & ) ) ); + } + deselect = TRUE; + setColumnWidthMode( 1, Manual ); +} + +void HierarchyList::keyPressEvent( TQKeyEvent *e ) +{ + if ( e->key() == Key_Shift || e->key() == Key_Control ) + deselect = FALSE; + else + deselect = TRUE; + TQListView::keyPressEvent( e ); +} + +void HierarchyList::keyReleaseEvent( TQKeyEvent *e ) +{ + deselect = TRUE; + TQListView::keyReleaseEvent( e ); +} + +void HierarchyList::viewportMousePressEvent( TQMouseEvent *e ) +{ + if ( e->state() & ShiftButton || e->state() & ControlButton ) + deselect = FALSE; + else + deselect = TRUE; + TQListView::viewportMousePressEvent( e ); +} + +void HierarchyList::viewportMouseReleaseEvent( TQMouseEvent *e ) +{ + TQListView::viewportMouseReleaseEvent( e ); +} + +TQObject *HierarchyList::handleObjectClick( TQListViewItem *i ) +{ + if ( !i ) + return 0; + + TQObject *o = findObject( i ); + if ( !o ) + return 0; + if ( TQT_BASE_OBJECT(formWindow) == TQT_BASE_OBJECT(o) ) { + if ( deselect ) + formWindow->clearSelection( FALSE ); + formWindow->emitShowProperties( TQT_TQOBJECT(formWindow) ); + return 0; + } + if ( o->isWidgetType() ) { + TQWidget *w = (TQWidget*)o; + if ( !formWindow->widgets()->find( w ) ) { + if ( ::tqqt_cast(w->parent()) ) { + if (::tqqt_cast(w->parent()->parent()) ) { + ((TQTabWidget*)w->parent()->parent())->showPage( w ); + o = TQT_TQOBJECT((TQWidget*)w->parent()->parent()); + formWindow->emitUpdateProperties( TQT_TQOBJECT(formWindow->currentWidget()) ); + } else if ( ::tqqt_cast(w->parent()->parent()) ) { + ((QDesignerWizard*)w->parent()->parent())-> + setCurrentPage( ( (QDesignerWizard*)w->parent()->parent() )->pageNum( w ) ); + o = TQT_TQOBJECT((TQWidget*)w->parent()->parent()); + formWindow->emitUpdateProperties( TQT_TQOBJECT(formWindow->currentWidget()) ); + } else { + ( (TQWidgetStack*)w->parent() )->raiseWidget( w ); + if ( (TQWidgetStack*)w->parent()->isA( "QDesignerWidgetStack" ) ) + ( (QDesignerWidgetStack*)w->parent() )->updateButtons(); + } + } else if ( ::tqqt_cast(w) || ::tqqt_cast(w) ) { + formWindow->setActiveObject( TQT_TQOBJECT(w) ); + } else if ( ::tqqt_cast(w) ) { + return 0; // ### we could try to find our menu bar and change the currentMenu to our index + } else { + return 0; + } + } + } else if ( ::tqqt_cast(o) ) { + MainWindow::self->actioneditor()->setCurrentAction( (TQAction*)o ); + deselect = TRUE; + } + + if ( deselect ) + formWindow->clearSelection( FALSE ); + + return o; +} + + +void HierarchyList::objectDoubleClicked( TQListViewItem *i ) +{ + TQObject *o = handleObjectClick( i ); + if ( !o ) + return; + if ( o->isWidgetType() && ( (TQWidget*)o )->isVisibleTo( formWindow ) ) { + TQWidget *w = (TQWidget*)o; + if ( !w->parentWidget() || + WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) + w->raise(); + formWindow->selectWidget( TQT_TQOBJECT(w), TRUE ); + } +} + +void HierarchyList::objectClicked( TQListViewItem *i ) +{ + TQObject *o = handleObjectClick( i ); + if ( !o ) + return; + if ( o->isWidgetType() && ( (TQWidget*)o )->isVisibleTo( formWindow ) ) { + TQWidget *w = (TQWidget*)o; + formWindow->selectWidget( TQT_TQOBJECT(w), TRUE ); + } +} + +TQObject *HierarchyList::findObject( TQListViewItem *i ) +{ + return ( (HierarchyItem*)i )->object(); +} + +TQListViewItem *HierarchyList::findItem( TQObject *o ) +{ + TQListViewItemIterator it( this ); + while ( it.current() ) { + if ( ( (HierarchyItem*)it.current() )->object() == o ) + return it.current(); + ++it; + } + return 0; +} + +TQObject *HierarchyList::current() const +{ + if ( currentItem() ) + return ( (HierarchyItem*)currentItem() )->object(); + return 0; +} + +void HierarchyList::changeNameOf( TQObject *o, const TQString &name ) +{ + TQListViewItem *item = findItem( o ); + if ( !item ) + return; + item->setText( 0, name ); +} + + +void HierarchyList::changeDatabaseOf( TQObject *o, const TQString &info ) +{ +#ifndef TQT_NO_SQL + if ( !formWindow->isDatabaseAware() ) + return; + TQListViewItem *item = findItem( o ); + if ( !item ) + return; + item->setText( 2, info ); +#endif +} + +static TQPtrList *widgetStacks = 0; + +void HierarchyList::setup() +{ + if ( !formWindow || formWindow->isFake() ) + return; + clear(); + TQWidget *w = formWindow->mainContainer(); +#ifndef TQT_NO_SQL + if ( formWindow->isDatabaseAware() ) { + if ( columns() == 2 ) { + addColumn( i18n( "Database" ) ); + header()->resizeSection( 0, 1 ); + header()->resizeSection( 1, 1 ); + header()->resizeSection( 2, 1 ); + header()->adjustHeaderSize(); + } + } else { + if ( columns() == 3 ) { + removeColumn( 2 ); + } + } +#endif + if ( !widgetStacks ) + widgetStacks = new TQPtrList; + if ( w ) + insertObject( TQT_TQOBJECT(w), 0 ); + widgetStacks->clear(); +} + +void HierarchyList::setOpen( TQListViewItem *i, bool b ) +{ + TQListView::setOpen( i, b ); +} + +void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) +{ + if ( TQString( o->name() ).startsWith( "qt_dead_widget_" ) ) + return; + bool fakeMainWindow = FALSE; + if ( ::tqqt_cast(o) ) { + TQObject *cw = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); + if ( cw ) { + o = cw; + fakeMainWindow = TRUE; + } + } + TQListViewItem *item = 0; + TQString className = WidgetFactory::classNameOf( o ); + if ( ::tqqt_cast(o) ) { + switch ( WidgetFactory::layoutType( (TQWidget*)o ) ) { + case WidgetFactory::HBox: + className = "HBox"; + break; + case WidgetFactory::VBox: + className = "VBox"; + break; + case WidgetFactory::Grid: + className = "Grid"; + break; + default: + break; + } + } + + TQString dbInfo; +#ifndef TQT_NO_SQL + dbInfo = MetaDataBase::fakeProperty( o, "database" ).toStringList().join("."); +#endif + + TQString name = o->name(); + if ( ::tqqt_cast(o->parent()) ) { + if ( ::tqqt_cast(o->parent()->parent()) ) + name = ( (TQTabWidget*)o->parent()->parent() )->tabLabel( (TQWidget*)o ); + else if ( ::tqqt_cast(o->parent()->parent()) ) + name = ( (TQWizard*)o->parent()->parent() )->title( (TQWidget*)o ); + } + + TQToolBox *tb; + if ( o->parent() && o->parent()->parent() && + (tb = ::tqqt_cast(o->parent()->parent()->parent())) ) + name = tb->itemLabel( tb->indexOf((TQWidget*)o) ); + + if ( fakeMainWindow ) { + name = o->parent()->name(); + className = TQMAINWINDOW_OBJECT_NAME_STRING; + } + + if ( !parent ) + item = new HierarchyItem( HierarchyItem::Widget, this, 0, name, className, dbInfo ); + else + item = new HierarchyItem( HierarchyItem::Widget, parent, 0, name, className, dbInfo ); + item->setOpen( TRUE ); + if ( !parent ) + item->setPixmap( 0, DesignerFormPix ); + else if ( ::tqqt_cast(o) ) + item->setPixmap( 0, DesignerLayoutPix ); + else + item->setPixmap( 0, WidgetDatabase::iconSet( + WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( o ) ) ). + pixmap( TQIconSet::Small, TQIconSet::Normal ) ); + if ( ::tqqt_cast(o) ) + item->setPixmap( 0, ( (TQAction*)o )->iconSet().pixmap() ); + + ( (HierarchyItem*)item )->setObject( o ); + TQObjectList l = o->childrenListObject(); + if ( ::tqqt_cast(o) ) + l.clear(); + if ( !l.isEmpty() ) { + TQObjectListIt it( l ); + it.toLast(); + for ( ; it.current(); --it ) { + if ( !it.current()->isWidgetType() || + ( (TQWidget*)it.current() )->isHidden() ) + continue; + if ( !formWindow->widgets()->find( (TQWidget*)it.current() ) ) { + if ( ::tqqt_cast(it.current()->parent()) || + ::tqqt_cast(it.current()) ) { + TQObject *obj = it.current(); + QDesignerTabWidget *tw = ::tqqt_cast(it.current()->parent()); + QDesignerWizard *dw = ::tqqt_cast(it.current()->parent()); + TQWidgetStack *stack = 0; + if ( dw || tw || ::tqqt_cast(obj) ) + stack = (TQWidgetStack*)obj; + else + stack = (TQWidgetStack*)obj->parent(); + if ( widgetStacks->findRef( stack ) != -1 ) + continue; + widgetStacks->append( stack ); + TQObjectList *l2 = stack->queryList( TQWIDGET_OBJECT_NAME_STRING, 0, TRUE, FALSE ); + for ( obj = l2->last(); obj; obj = l2->prev() ) { + if ( qstrcmp( obj->className(), + "TQWidgetStackPrivate::Invisible" ) == 0 || + ( tw && !tw->tabBar()->tab( stack->id( (TQWidget*)obj ) ) ) || + ( dw && dw->isPageRemoved( (TQWidget*)obj ) ) ) + continue; + if ( qstrcmp( obj->name(), "designer_wizardstack_button" ) == 0 ) + continue; + if ( stack->id( (TQWidget*)obj ) == -1 ) + continue; + insertObject( obj, item ); + } + delete l2; + } else if ( ::tqqt_cast(it.current()->parent()) ) { + if ( !::tqqt_cast(it.current()) ) + continue; + TQToolBox *tb = (TQToolBox*)it.current()->parent(); + for ( int i = tb->count() - 1; i >= 0; --i ) + insertObject( TQT_TQOBJECT(tb->item( i )), item ); + } + continue; + } + insertObject( it.current(), item ); + } + } + + if ( fakeMainWindow ) { + TQObjectList *l = o->parent()->queryList( "QDesignerToolBar" ); + TQObject *obj; + for ( obj = l->first(); obj; obj = l->next() ) + insertObject( obj, item ); + delete l; + l = o->parent()->queryList( "MenuBarEditor" ); + for ( obj = l->first(); obj; obj = l->next() ) + insertObject( obj, item ); + delete l; + } else if ( ::tqqt_cast(o) || ::tqqt_cast(o) ) { + TQPtrList actions; + if ( ::tqqt_cast(o) ) + actions = ( (QDesignerToolBar*)o )->insertedActions(); + else + ( (PopupMenuEditor*)o )->insertedActions( actions ); + + TQPtrListIterator it( actions ); + it.toLast(); + while ( it.current() ) { + TQAction *a = it.current(); + if ( ::tqqt_cast(a) ) { + QDesignerAction *da = (QDesignerAction*)a; + if ( da->supportsMenu() ) + insertObject( da, item ); + else + insertObject( TQT_TQOBJECT(da->widget()), item ); + } else if ( ::tqqt_cast(a) ) { + insertObject( a, item ); + } + --it; + } + } else if ( ::tqqt_cast(o) && !o->childrenListObject().isEmpty() ) { + TQObjectList l = o->childrenListObject(); + for ( TQObject *obj = l.last(); obj; obj = l.prev() ) { + if ( ::tqqt_cast(obj) ) { + QDesignerAction *da = (QDesignerAction*)obj; + if ( da->supportsMenu() ) + insertObject( da, item ); + else + insertObject( TQT_TQOBJECT(da->widget()), item ); + } else if ( ::tqqt_cast(obj) ) { + insertObject( obj, item ); + } + } + } else if ( ::tqqt_cast(o) ) { + MenuBarEditor *mb = (MenuBarEditor*)o; + for ( int i = mb->count() -1; i >= 0; --i ) { + MenuBarEditorItem *md = mb->item( i ); + if ( !md || !md->menu() ) + continue; + insertObject( TQT_TQOBJECT(md->menu()), item ); + } + } +} + +void HierarchyList::setCurrent( TQObject *o ) +{ + TQListViewItemIterator it( this ); + while ( it.current() ) { + if ( ( (HierarchyItem*)it.current() )->object() == o ) { + blockSignals( TRUE ); + setCurrentItem( it.current() ); + ensureItemVisible( it.current() ); + blockSignals( FALSE ); + return; + } + ++it; + } +} + +void HierarchyList::showRMBMenu( TQListViewItem *i, const TQPoint & p ) +{ + if ( !i ) + return; + + TQObject *o = findObject( i ); + if ( !o ) + return; + + if ( !o->isWidgetType() || + ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(formWindow) && !formWindow->widgets()->find( (TQWidget*)o ) ) ) + return; + + TQWidget *w = (TQWidget*)o; + if ( w->isVisibleTo( formWindow ) ) { + if ( !::tqqt_cast(w) && !::tqqt_cast(w) ) { + if ( !normalMenu ) + normalMenu = formWindow->mainWindow()->setupNormalHierarchyMenu( this ); + normalMenu->popup( p ); + } else { + if ( !tabWidgetMenu ) + tabWidgetMenu = + formWindow->mainWindow()->setupTabWidgetHierarchyMenu( + this, TQT_SLOT( addTabPage() ), + TQT_SLOT( removeTabPage() ) ); + tabWidgetMenu->popup( p ); + } + } +} + +void HierarchyList::addTabPage() +{ + TQObject *o = current(); + if ( !o || !o->isWidgetType() ) + return; + TQWidget *w = (TQWidget*)o; + if ( ::tqqt_cast(w) ) { + TQTabWidget *tw = (TQTabWidget*)w; + AddTabPageCommand *cmd = new AddTabPageCommand( i18n( "Add Page to %1" ). + arg( tw->name() ), formWindow, + tw, "Tab" ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); + } else if ( ::tqqt_cast(w) ) { + TQWizard *wiz = (TQWizard*)formWindow->mainContainer(); + AddWizardPageCommand *cmd = new AddWizardPageCommand( i18n( "Add Page to %1" ). + arg( wiz->name() ), formWindow, + wiz, "Page" ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); + } +} + +void HierarchyList::removeTabPage() +{ + TQObject *o = current(); + if ( !o || !o->isWidgetType() ) + return; + TQWidget *w = (TQWidget*)o; + if ( ::tqqt_cast(w) ) { + TQTabWidget *tw = (TQTabWidget*)w; + if ( tw->currentPage() ) { + QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw; + DeleteTabPageCommand *cmd = + new DeleteTabPageCommand( i18n( "Delete Page %1 of %2" ). + arg( dtw->pageTitle() ).arg( tw->name() ), + formWindow, tw, tw->currentPage() ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); + } + } else if ( ::tqqt_cast(w) ) { + TQWizard *wiz = (TQWizard*)formWindow->mainContainer(); + if ( wiz->currentPage() ) { + QDesignerWizard *dw = (QDesignerWizard*)wiz; + DeleteWizardPageCommand *cmd = + new DeleteWizardPageCommand( i18n( "Delete Page %1 of %2" ). + arg( dw->pageTitle() ).arg( wiz->name() ), + formWindow, wiz, + wiz->indexOf( wiz->currentPage() ), TRUE ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); + } + } +} + +// ------------------------------------------------------------ + +FormDefinitionView::FormDefinitionView( TQWidget *parent, FormWindow *fw ) + : HierarchyList( parent, fw, TRUE ) +{ + header()->hide(); + removeColumn( 1 ); + connect( this, TQT_SIGNAL( itemRenamed( TQListViewItem *, int, const TQString & ) ), + this, TQT_SLOT( renamed( TQListViewItem * ) ) ); + popupOpen = FALSE; +} + +void FormDefinitionView::setup() +{ + if ( popupOpen || !formWindow ) + return; + if ( !formWindow->project()->isCpp() ) + return; + TQListViewItem *i = firstChild(); + while ( i ) { + if ( i->rtti() == HierarchyItem::DefinitionParent ) { + TQListViewItem *a = i; + i = i->nextSibling(); + delete a; + continue; + } + i = i->nextSibling(); + } + + LanguageInterface *lIface = MetaDataBase::languageInterface( formWindow->project()->language() ); + if ( lIface ) { + TQStringList defs = lIface->definitions(); + for ( TQStringList::Iterator dit = defs.begin(); dit != defs.end(); ++dit ) { + HierarchyItem *itemDef = new HierarchyItem( HierarchyItem::DefinitionParent, this, 0, + i18n( *dit ), TQString(), TQString() ); + itemDef->setPixmap( 0, DesignerFolderPix ); + itemDef->setOpen( TRUE ); + TQStringList entries = + lIface->definitionEntries( *dit, formWindow->mainWindow()->designerInterface() ); + HierarchyItem *item = 0; + for ( TQStringList::Iterator eit = entries.begin(); eit != entries.end(); ++eit ) { + item = new HierarchyItem( HierarchyItem::Definition, + itemDef, item, *eit, TQString(), TQString() ); + item->setRenameEnabled( 0, TRUE ); + } + } + lIface->release(); + } + setupVariables(); + refresh(); +} + +void FormDefinitionView::setupVariables() +{ + bool pubOpen, protOpen, privOpen; + pubOpen = protOpen = privOpen = TRUE; + TQListViewItem *i = firstChild(); + while ( i ) { + if ( i->rtti() == HierarchyItem::VarParent ) { + TQListViewItem *a = i; + i = i->firstChild(); + while ( i ) { + if ( i->rtti() == HierarchyItem::VarPublic ) + pubOpen = i->isOpen(); + else if ( i->rtti() == HierarchyItem::VarProtected ) + protOpen = i->isOpen(); + else if ( i->rtti() == HierarchyItem::VarPrivate ) + privOpen = i->isOpen(); + i = i->nextSibling(); + } + delete a; + break; + } + i = i->nextSibling(); + } + + HierarchyItem *itemVar = new HierarchyItem( HierarchyItem::VarParent, this, 0, i18n( "Class Variables" ), + TQString(), TQString() ); + itemVar->setPixmap( 0, DesignerFolderPix ); + itemVar->setOpen( TRUE ); + + itemVarPriv = new HierarchyItem( HierarchyItem::VarPrivate, itemVar, 0, i18n( "private" ), + TQString(), TQString() ); + itemVarProt = new HierarchyItem( HierarchyItem::VarProtected, itemVar, 0, i18n( "protected" ), + TQString(), TQString() ); + itemVarPubl = new HierarchyItem( HierarchyItem::VarPublic, itemVar, 0, i18n( "public" ), + TQString(), TQString() ); + + TQValueList varList = MetaDataBase::variables( TQT_TQOBJECT(formWindow) ); + TQValueList::Iterator it = --( varList.end() ); + if ( !varList.isEmpty() && itemVar ) { + for (;;) { + TQListViewItem *item = 0; + if ( (*it).varAccess == "public" ) + item = new HierarchyItem( HierarchyItem::Variable, itemVarPubl, 0, (*it).varName, + TQString(), TQString() ); + else if ( (*it).varAccess == "private" ) + item = new HierarchyItem( HierarchyItem::Variable, itemVarPriv, 0, (*it).varName, + TQString(), TQString() ); + else // default is protected + item = new HierarchyItem( HierarchyItem::Variable, itemVarProt, 0, (*it).varName, + TQString(), TQString() ); + item->setPixmap( 0, DesignerEditSlotsPix ); + if ( it == varList.begin() ) + break; + --it; + } + } + itemVar->setOpen( TRUE ); + itemVarPriv->setOpen( privOpen ); + itemVarProt->setOpen( protOpen ); + itemVarPubl->setOpen( pubOpen ); +} + +void FormDefinitionView::refresh() +{ + if ( popupOpen || !formWindow || !formWindow->project()->isCpp() ) + return; + + bool fuPub, fuProt, fuPriv, slPub, slProt, slPriv; + fuPub = fuProt = fuPriv = slPub = slProt = slPriv = TRUE; + TQListViewItem *i = firstChild(); + while ( i ) { + if ( i->rtti() == HierarchyItem::SlotParent || + i->rtti() == HierarchyItem::FunctParent ) { + TQListViewItem *a = i; + i = i->firstChild(); + while ( i ) { + switch( i->rtti() ) { + case HierarchyItem::FunctPublic: + fuPub = i->isOpen(); + case HierarchyItem::FunctProtected: + fuProt = i->isOpen(); + break; + case HierarchyItem::FunctPrivate: + fuPriv = i->isOpen(); + break; + case HierarchyItem::SlotPublic: + slPub = i->isOpen(); + if ( slPub ) + break; + case HierarchyItem::SlotProtected: + slProt = i->isOpen(); + break; + case HierarchyItem::SlotPrivate: + slPriv = i->isOpen(); + } + i = i->nextSibling(); + } + i = a->nextSibling(); + delete a; + continue; + } + i = i->nextSibling(); + } + + + itemFunct = new HierarchyItem( HierarchyItem::FunctParent, + this, 0, i18n( "Functions" ), TQString(), TQString() ); + itemFunct->moveItem( i ); + itemFunct->setPixmap( 0, DesignerFolderPix ); + itemFunctPriv = new HierarchyItem( HierarchyItem::FunctPrivate, itemFunct, 0, + i18n( "private" ), TQString(), TQString() ); + itemFunctProt = new HierarchyItem( HierarchyItem::FunctProtected, itemFunct, 0, + i18n( "protected" ), TQString(), TQString() ); + itemFunctPubl = new HierarchyItem( HierarchyItem::FunctPublic, itemFunct, 0, + i18n( "public" ), TQString(), TQString() ); + + itemSlots = new HierarchyItem( HierarchyItem::SlotParent, + this, 0, i18n( "Slots" ), TQString(), TQString() ); + itemSlots->setPixmap( 0, DesignerFolderPix ); + itemPrivate = new HierarchyItem( HierarchyItem::SlotPrivate, itemSlots, 0, i18n( "private" ), + TQString(), TQString() ); + itemProtected = new HierarchyItem( HierarchyItem::SlotProtected, itemSlots, 0, i18n( "protected" ), + TQString(), TQString() ); + itemPublic = new HierarchyItem( HierarchyItem::SlotPublic, itemSlots, 0, i18n( "public" ), + TQString(), TQString() ); + + TQValueList functionList = MetaDataBase::functionList( TQT_TQOBJECT(formWindow) ); + TQValueList::Iterator it = --( functionList.end() ); + if ( !functionList.isEmpty() && itemFunct ) { + for (;;) { + TQListViewItem *item = 0; + if ( (*it).type == "slot" ) { + if ( (*it).access == "protected" ) + item = new HierarchyItem( HierarchyItem::Slot, itemProtected, 0, (*it).function, + TQString(), TQString() ); + else if ( (*it).access == "private" ) + item = new HierarchyItem( HierarchyItem::Slot, itemPrivate, 0, (*it).function, + TQString(), TQString() ); + else // default is public + item = new HierarchyItem( HierarchyItem::Slot, itemPublic, 0, (*it).function, + TQString(), TQString() ); + } else { + if ( (*it).access == "protected" ) + item = new HierarchyItem( HierarchyItem::Function, itemFunctProt, 0, (*it).function, + TQString(), TQString() ); + else if ( (*it).access == "private" ) + item = new HierarchyItem( HierarchyItem::Function, itemFunctPriv, 0, (*it).function, + TQString(), TQString() ); + else // default is public + item = new HierarchyItem( HierarchyItem::Function, itemFunctPubl, 0, (*it).function, + TQString(), TQString() ); + } + item->setPixmap( 0, DesignerEditSlotsPix ); + if ( it == functionList.begin() ) + break; + --it; + } + } + + itemFunct->setOpen( TRUE ); + itemFunctPubl->setOpen( fuPub ); + itemFunctProt->setOpen( fuProt ); + itemFunctPriv->setOpen( fuPriv ); + + itemSlots->setOpen( TRUE ); + itemPublic->setOpen( slPub ); + itemProtected->setOpen( slProt ); + itemPrivate->setOpen( slPriv ); +} + + +void FormDefinitionView::setCurrent( TQWidget * ) +{ +} + +void FormDefinitionView::objectClicked( TQListViewItem *i ) +{ + if ( !i ) + return; + if ( (i->rtti() == HierarchyItem::Slot) || (i->rtti() == HierarchyItem::Function) ) + { + formWindow->clearSelection(false); + formWindow->mainWindow()->part()->emitEditFunction(formWindow->fileName(), i->text( 0 )); + } +// formWindow->mainWindow()->editFunction( i->text( 0 ) ); +} + +static HierarchyItem::Type getChildType( int type ) +{ + switch ( (HierarchyItem::Type)type ) { + case HierarchyItem::Widget: + tqWarning( "getChildType: Inserting childs dynamically to Widget or SlotParent is not allowed!" ); + break; + case HierarchyItem::SlotParent: + case HierarchyItem::SlotPublic: + case HierarchyItem::SlotProtected: + case HierarchyItem::SlotPrivate: + case HierarchyItem::Slot: + return HierarchyItem::Slot; + case HierarchyItem::DefinitionParent: + case HierarchyItem::Definition: + return HierarchyItem::Definition; + case HierarchyItem::Event: + case HierarchyItem::EventFunction: + return HierarchyItem::Event; + case HierarchyItem::FunctParent: + case HierarchyItem::FunctPublic: + case HierarchyItem::FunctProtected: + case HierarchyItem::FunctPrivate: + case HierarchyItem::Function: + return HierarchyItem::Function; + case HierarchyItem::VarParent: + case HierarchyItem::VarPublic: + case HierarchyItem::VarProtected: + case HierarchyItem::VarPrivate: + case HierarchyItem::Variable: + return HierarchyItem::Variable; + } + return (HierarchyItem::Type)type; +} + +void HierarchyList::insertEntry( TQListViewItem *i, const TQPixmap &pix, const TQString &s ) +{ + TQListViewItem *after = i->firstChild(); + while ( after && after->nextSibling() ) + after = after->nextSibling(); + HierarchyItem *item = new HierarchyItem( getChildType( i->rtti() ), i, after, s, + TQString(), TQString() ); + if ( !pix.isNull() ) + item->setPixmap( 0, pix ); + item->setRenameEnabled( 0, TRUE ); + setCurrentItem( item ); + ensureItemVisible( item ); + tqApp->processEvents(); + newItem = item; + item->startRename( 0 ); +} + +void FormDefinitionView::contentsMouseDoubleClickEvent( TQMouseEvent *e ) +{ + TQListViewItem *i = itemAt( contentsToViewport( e->pos() ) ); + if ( !i ) + return; + + if ( i->rtti() == HierarchyItem::SlotParent || i->rtti() == HierarchyItem::FunctParent || + i->rtti() == HierarchyItem::VarParent ) + return; + + HierarchyItem::Type t = getChildType( i->rtti() ); + if ( (int)t == i->rtti() ) + i = i->parent(); + + if ( formWindow->project()->isCpp() ) + switch( i->rtti() ) { + case HierarchyItem::FunctPublic: + execFunctionDialog( "public", "function", TRUE ); + break; + case HierarchyItem::FunctProtected: + execFunctionDialog( "protected", "function", TRUE ); + break; + case HierarchyItem::FunctPrivate: + execFunctionDialog( "private", "function", TRUE ); + break; + case HierarchyItem::SlotPublic: + execFunctionDialog( "public", "slot", TRUE ); + break; + case HierarchyItem::SlotProtected: + execFunctionDialog( "protected", "slot", TRUE ); + break; + case HierarchyItem::SlotPrivate: + execFunctionDialog( "private", "slot", TRUE ); + break; + case HierarchyItem::VarPublic: + case HierarchyItem::VarProtected: + case HierarchyItem::VarPrivate: { + VariableDialog varDia( formWindow, this ); + TQListViewItem *i = selectedItem(); + if ( i ) + varDia.setCurrentItem( i->text( 0 ) ); + varDia.exec(); + break; + } + default: + insertEntry( i ); + } else + insertEntry( i ); +} + +void FormDefinitionView::execFunctionDialog( const TQString &access, const TQString &type, bool addFunc ) +{ + FormFile *formFile = formWindow->formFile(); + if ( !formFile || !formFile->isUihFileUpToDate() ) + return; + + // refresh the functions list in the metadatabase + SourceEditor *editor = formFile->editor(); + if ( editor ) + editor->refresh( TRUE ); + + EditFunctions dlg( this, formWindow ); + if ( addFunc ) + dlg.functionAdd( access, type ); + dlg.exec(); +} + +void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos ) +{ + if ( !i ) + return; + + const int EDIT = 1; + const int NEW = 2; + const int DEL = 3; + const int PROPS = 4; + const int GOIMPL = 5; + + TQPopupMenu menu; + bool insertDelete = FALSE; + + if ( i->rtti() == HierarchyItem::FunctParent || i->rtti() == HierarchyItem::SlotParent || + i->rtti() == HierarchyItem::VarParent ) { + menu.insertItem( SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance()), i18n( "Edit..." ), EDIT ); + } else + menu.insertItem( SmallIcon( "designer_filenew.png" , KDevDesignerPartFactory::instance()), i18n( "New..." ), NEW ); + if ( i->rtti() == HierarchyItem::DefinitionParent || i->rtti() == HierarchyItem::Variable || + i->rtti() == HierarchyItem::Definition ) { + menu.insertItem( SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance()), i18n( "Edit..." ), EDIT ); + } + if ( i->rtti() == HierarchyItem::Function || i->rtti() == HierarchyItem::Slot ) { + if ( formWindow->project()->isCpp() ) + menu.insertItem( SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance()), i18n( "Properties" ), PROPS ); + if ( MetaDataBase::hasEditor( formWindow->project()->language() ) ) + menu.insertItem( i18n( "Goto Implementation" ), GOIMPL ); + insertDelete = TRUE; + } + if ( insertDelete || i->rtti() == HierarchyItem::Variable || + i->rtti() == HierarchyItem::Function || i->rtti() == HierarchyItem::Slot || + i->rtti() == HierarchyItem::Definition ) { + menu.insertSeparator(); + menu.insertItem( SmallIcon( "designer_editcut.png" , KDevDesignerPartFactory::instance()), i18n( "Delete" ), DEL ); + } + popupOpen = TRUE; + int res = menu.exec( pos ); + popupOpen = FALSE; + if ( res == -1 ) + return; + + if ( res == EDIT ) { + switch( i->rtti() ) { + case HierarchyItem::FunctParent: + execFunctionDialog( "public", "function", FALSE ); + break; + case HierarchyItem::SlotParent: + execFunctionDialog( "public", "slot", FALSE ); + break; + case HierarchyItem::VarParent: + case HierarchyItem::VarPublic: + case HierarchyItem::VarProtected: + case HierarchyItem::VarPrivate: + case HierarchyItem::Variable: { + VariableDialog varDia( formWindow, this ); + TQListViewItem *i = selectedItem(); + if ( i ) + varDia.setCurrentItem( i->text( 0 ) ); + if ( varDia.exec() == TQDialog::Accepted ) + formWindow->commandHistory()->setModified( TRUE ); + break; + } + case HierarchyItem::Definition: + case HierarchyItem::DefinitionParent: + LanguageInterface *lIface = MetaDataBase::languageInterface( formWindow->project()->language() ); + if ( !lIface ) + return; + if ( i->rtti() == HierarchyItem::Definition ) + i = i->parent(); + ListEditor dia( this, 0, TRUE ); + dia.setCaption( i18n( "Edit %1" ).arg( i->text( 0 ) ) ); + TQStringList entries = lIface->definitionEntries( i->text( 0 ), MainWindow::self->designerInterface() ); + dia.setList( entries ); + dia.exec(); + Command *cmd = new EditDefinitionsCommand( i18n( "Edit %1" ).arg( i->text( 0 )), formWindow, + lIface, i->text( 0 ), dia.items() ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); + } + } else if ( res == NEW ) { + HierarchyItem::Type t = getChildType( i->rtti() ); + if ( (int)t == i->rtti() ) + i = i->parent(); + switch( i->rtti() ) { + case HierarchyItem::SlotPublic: + execFunctionDialog( "public", "slot", TRUE ); + break; + case HierarchyItem::SlotProtected: + execFunctionDialog( "protected", "slot", TRUE ); + break; + case HierarchyItem::SlotPrivate: + execFunctionDialog( "private" , "slot", TRUE ); + break; + case HierarchyItem::FunctPublic: + execFunctionDialog( "public", "function", TRUE ); + break; + case HierarchyItem::FunctProtected: + execFunctionDialog( "protected", "function", TRUE ); + break; + case HierarchyItem::FunctPrivate: + execFunctionDialog( "private" , "function", TRUE ); + break; + default: + insertEntry( i ); + } + } else if ( res == DEL ) { + if ( i->rtti() == HierarchyItem::Slot || i->rtti() == HierarchyItem::Function ) { + + TQCString funct( MetaDataBase::normalizeFunction( i->text( 0 ) ).latin1() ); + Command *cmd = new RemoveFunctionCommand( i18n( "Remove Function" ), formWindow, funct, + TQString(), TQString(), TQString(), + TQString(), formWindow->project()->language() ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); + formWindow->mainWindow()->objectHierarchy()->updateFormDefinitionView(); + } else if ( i->rtti() == HierarchyItem::Variable ) { + Command *cmd = new RemoveVariableCommand( i18n( "Remove Variable" ), formWindow, + i->text( 0 ) ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); + } else { + TQListViewItem *p = i->parent(); + delete i; + save( p, 0 ); + } + } else if ( res == PROPS ) { + if ( i->rtti() == HierarchyItem::Slot || + i->rtti() == HierarchyItem::Function ) { + EditFunctions dlg( this, formWindow ); + dlg.setCurrentFunction( MetaDataBase::normalizeFunction( i->text( 0 ) ) ); + dlg.exec(); + } + } else if ( res == GOIMPL ) { + if ( i->rtti() == HierarchyItem::Slot || + i->rtti() == HierarchyItem::Function ) { + formWindow->clearSelection(false); + formWindow->mainWindow()->part()->emitEditFunction(formWindow->fileName(), i->text( 0 )); +// formWindow->mainWindow()->editFunction( i->text( 0 ) ); + } + } +} + +void FormDefinitionView::renamed( TQListViewItem *i ) +{ + if ( newItem == i ) + newItem = 0; + if ( !i->parent() ) + return; + save( i->parent(), i ); +} + + +void FormDefinitionView::save( TQListViewItem *p, TQListViewItem *i ) +{ + if ( i && i->text( 0 ).isEmpty() ) { + delete i; + return; + } + + if ( i && i->rtti() == HierarchyItem::Variable ) { + i->setRenameEnabled( 0, FALSE ); + TQString varName = i->text( 0 ); + varName = varName.simplifyWhiteSpace(); + if ( varName[(int)varName.length() - 1] != ';' ) + varName += ";"; + if ( MetaDataBase::hasVariable( TQT_TQOBJECT(formWindow), varName ) ) { + TQMessageBox::information( this, i18n( "Edit Variables" ), + i18n( "This variable has already been declared." ) ); + } else { + if ( p->rtti() == HierarchyItem::VarPublic ) + addVariable( varName, "public" ); + else if ( p->rtti() == HierarchyItem::VarProtected ) + addVariable( varName, "protected" ); + else if ( p->rtti() == HierarchyItem::VarPrivate ) + addVariable( varName, "private" ); + } + } else { + LanguageInterface *lIface = MetaDataBase::languageInterface( formWindow->project()->language() ); + if ( !lIface ) + return; + TQStringList lst; + i = p->firstChild(); + while ( i ) { + lst << i->text( 0 ); + i = i->nextSibling(); + } + Command *cmd = new EditDefinitionsCommand( i18n( "Edit %1" ).arg( p->text( 0 ) ), formWindow, + lIface, p->text( 0 ), lst ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); + } +} + +void FormDefinitionView::addVariable( const TQString &varName, const TQString &access ) +{ + Command *cmd = new AddVariableCommand( i18n( "Add Variable" ), formWindow, + varName, access ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); +} + +// ------------------------------------------------------------ + +HierarchyView::HierarchyView( TQWidget *parent ) + : TQTabWidget( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | + WStyle_Tool |WStyle_MinMax | WStyle_SysMenu ) +{ + formwindow = 0; + editor = 0; + listview = new HierarchyList( this, formWindow() ); + fView = new FormDefinitionView( this, formWindow() ); + if ( !MainWindow::self->singleProjectMode() ) { + addTab( listview, i18n( "Objects" ) ); + setTabToolTip( listview, i18n( "List of all widgets and objects of the current form in hierarchical order" ) ); + addTab( fView, i18n( "Members" ) ); + setTabToolTip( fView, i18n( "List of all members of the current form" ) ); + } else { + listview->hide(); + fView->hide(); + } + + if ( !classBrowserInterfaceManager ) { + classBrowserInterfaceManager = + new TQPluginManager( IID_ClassBrowser, TQApplication::libraryPaths(), + MainWindow::self->pluginDirectory() ); + } + + classBrowsers = new TQMap(); + TQStringList langs = MetaDataBase::languages(); + for ( TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it ) { + TQInterfacePtr ciface = 0; + classBrowserInterfaceManager->queryInterface( *it, &ciface ); + if ( ciface ) { + ClassBrowser cb( ciface->createClassBrowser( this ), ciface ); + addTab( cb.lv, i18n( "Class Declarations" ) ); + setTabToolTip( cb.lv, i18n( "List of all classes and its declarations of the current source file" ) ); + ciface->onClick( TQT_TQOBJECT(this), TQT_SLOT( jumpTo( const TQString &, const TQString &, int ) ) ); + classBrowsers->insert( *it, cb ); + setTabEnabled( cb.lv, FALSE ); + } + } +} + +HierarchyView::~HierarchyView() +{ +} + +void HierarchyView::clear() +{ + listview->clear(); + fView->clear(); + for ( TQMap::Iterator it = classBrowsers->begin(); + it != classBrowsers->end(); ++it ) { + (*it).iface->clear(); + } +} + +void HierarchyView::setFormWindow( FormWindow *fw, TQObject *o ) +{ + bool fake = fw && qstrcmp( fw->name(), "qt_fakewindow" ) == 0; + if ( fw == 0 || o == 0 ) { + listview->clear(); + fView->clear(); + listview->setFormWindow( fw ); + fView->setFormWindow( fw ); + formwindow = 0; + editor = 0; + } + + setTabEnabled( listview, TRUE ); + setTabEnabled( fView, fw && fw->project()->isCpp() ); + + if ( fw == formwindow ) { + if ( fw ) { + if ( !fake ) + listview->setCurrent( TQT_TQOBJECT(o) ); + else + listview->clear(); + if ( MainWindow::self->qWorkspace()->activeWindow() == fw ) + showPage( listview ); + else if ( fw->project()->isCpp() ) + showPage( fView ); + else + showClasses( fw->formFile()->editor() ); + } + } + + formwindow = fw; + if ( !fake ) { + listview->setFormWindow( fw ); + } else { + listview->setFormWindow( 0 ); + listview->clear(); + } + + fView->setFormWindow( fw ); + if ( !fake ) { + listview->setup(); + listview->setCurrent( TQT_TQOBJECT(o) ); + } + fView->setup(); + + for ( TQMap::Iterator it = classBrowsers->begin(); + it != classBrowsers->end(); ++it ) { + (*it).iface->clear(); + setTabEnabled( (*it).lv, fw && !fw->project()->isCpp() ); + } + + if ( MainWindow::self->qWorkspace()->activeWindow() == fw ) + showPage( listview ); + else if ( fw && fw->project()->isCpp() ) + showPage( fView ); + else if ( fw ) + showClasses( fw->formFile()->editor() ); + + editor = 0; +} + +void HierarchyView::showClasses( SourceEditor *se ) +{ + if ( !se->object() ) + return; + + lastSourceEditor = se; + TQTimer::singleShot( 100, this, TQT_SLOT( showClassesTimeout() ) ); +} + +void HierarchyView::showClassesTimeout() +{ + if ( !lastSourceEditor ) + return; + SourceEditor *se = (SourceEditor*)lastSourceEditor; + if ( !se->object() ) + return; + if ( se->formWindow() && se->formWindow()->project()->isCpp() ) { + setFormWindow( se->formWindow(), TQT_TQOBJECT(se->formWindow()->currentWidget()) ); + MainWindow::self->propertyeditor()->setWidget( TQT_TQOBJECT(se->formWindow()->currentWidget()), + se->formWindow() ); + return; + } + + setTabEnabled( listview, !!se->formWindow() && !se->formWindow()->isFake() ); + setTabEnabled( fView, FALSE ); + + formwindow = 0; + listview->setFormWindow( 0 ); + fView->setFormWindow( 0 ); + listview->clear(); + fView->clear(); + if ( !se->formWindow() ) + MainWindow::self->propertyeditor()->setWidget( 0, 0 ); + editor = se; + + for ( TQMap::Iterator it = classBrowsers->begin(); + it != classBrowsers->end(); ++it ) { + if ( it.key() == se->project()->language() ) { + (*it).iface->update( se->text() ); + setTabEnabled( (*it).lv, TRUE ); + showPage( (*it).lv ); + } else { + setTabEnabled( (*it).lv, FALSE ); + (*it).iface->clear(); + } + } +} + +void HierarchyView::updateClassBrowsers() +{ + if ( !editor ) + return; + for ( TQMap::Iterator it = classBrowsers->begin(); + it != classBrowsers->end(); ++it ) { + if ( it.key() == editor->project()->language() ) + (*it).iface->update( editor->text() ); + else + (*it).iface->clear(); + } +} + +FormWindow *HierarchyView::formWindow() const +{ + return formwindow; +} + +void HierarchyView::closeEvent( TQCloseEvent *e ) +{ + emit hidden(); + e->accept(); +} + +void HierarchyView::widgetInserted( TQWidget * ) +{ + listview->setup(); +} + +void HierarchyView::widgetRemoved( TQWidget * ) +{ + listview->setup(); +} + +void HierarchyView::widgetsInserted( const TQWidgetList & ) +{ + listview->setup(); +} + +void HierarchyView::widgetsRemoved( const TQWidgetList & ) +{ + listview->setup(); +} + +void HierarchyView::namePropertyChanged( TQWidget *w, const TQVariant & ) +{ + TQWidget *w2 = w; + if ( ::tqqt_cast(w) ) + w2 = ( (TQMainWindow*)w )->centralWidget(); + listview->changeNameOf( TQT_TQOBJECT(w2), w->name() ); +} + + +void HierarchyView::databasePropertyChanged( TQWidget *w, const TQStringList& info ) +{ +#ifndef TQT_NO_SQL + TQString i = info.join( "." ); + listview->changeDatabaseOf( TQT_TQOBJECT(w), i ); +#endif +} + + +void HierarchyView::tabsChanged( TQTabWidget * ) +{ + listview->setup(); +} + +void HierarchyView::pagesChanged( TQWizard * ) +{ + listview->setup(); +} + +void HierarchyView::rebuild() +{ + listview->setup(); +} + +void HierarchyView::closed( FormWindow *fw ) +{ + if ( fw == formwindow ) { + listview->clear(); + fView->clear(); + } +} + +void HierarchyView::updateFormDefinitionView() +{ + fView->setup(); +} + +void HierarchyView::jumpTo( const TQString &func, const TQString &clss, int type ) +{ + if ( !editor ) + return; + if ( type == ClassBrowserInterface::Class ) + editor->setClass( func ); + else + editor->setFunction( func, clss ); +} + +HierarchyView::ClassBrowser::ClassBrowser( TQListView *l, ClassBrowserInterface *i ) + : lv( l ), iface( i ) +{ +} + +HierarchyView::ClassBrowser::~ClassBrowser() +{ +} diff --git a/tdevdesigner/designer/hierarchyview.h b/kdevdesigner/designer/hierarchyview.h similarity index 100% rename from tdevdesigner/designer/hierarchyview.h rename to kdevdesigner/designer/hierarchyview.h diff --git a/tdevdesigner/designer/iconvieweditor.ui b/kdevdesigner/designer/iconvieweditor.ui similarity index 100% rename from tdevdesigner/designer/iconvieweditor.ui rename to kdevdesigner/designer/iconvieweditor.ui diff --git a/tdevdesigner/designer/iconvieweditorimpl.cpp b/kdevdesigner/designer/iconvieweditorimpl.cpp similarity index 100% rename from tdevdesigner/designer/iconvieweditorimpl.cpp rename to kdevdesigner/designer/iconvieweditorimpl.cpp diff --git a/tdevdesigner/designer/iconvieweditorimpl.h b/kdevdesigner/designer/iconvieweditorimpl.h similarity index 100% rename from tdevdesigner/designer/iconvieweditorimpl.h rename to kdevdesigner/designer/iconvieweditorimpl.h diff --git a/kdevdesigner/designer/kdevdesigner_part.cpp b/kdevdesigner/designer/kdevdesigner_part.cpp new file mode 100644 index 00000000..ac966d00 --- /dev/null +++ b/kdevdesigner/designer/kdevdesigner_part.cpp @@ -0,0 +1,565 @@ +/*************************************************************************** + * Copyright (C) 2004 by Alexander Dymo * + * cloudtemple@mksat.net * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +#include "kdevdesigner_part.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include "mainwindow.h" +#include "designeraction.h" +#include "formwindow.h" + +KDevDesignerPart::KDevDesignerPart( TQWidget *parentWidget, const char *// widgetName + , + TQObject *parent, const char *name, const TQStringList &args ) + : KInterfaceDesigner::Designer(parent, name) +{ + setInstance( KDevDesignerPartFactory::instance() ); + + m_widget = new MainWindow( this, true ); + m_widget->reparent(parentWidget, TQPoint(0,0)); + setupDesignerWindow(); + + setWidget(m_widget); + + setupActions(); + if (args.contains("in shell")) + setXMLFile("kdevdesigner_part_sh.rc"); + else + setXMLFile("kdevdesigner_part.rc"); + + setReadWrite(true); + setModified(false); + + connect(m_widget, TQT_SIGNAL(formModified(bool )), this, TQT_SLOT(formModified(bool))); +} + +void KDevDesignerPart::setupDesignerWindow() +{ + m_widget->menuBar()->hide(); + m_widget->layoutToolBar->hide(); + m_widget->projectToolBar->hide(); + m_widget->toolsToolBar->hide(); + m_widget->statusBar()->hide(); +} + +static TQIconSet createPartIconSet( const TQString &name ) +{ + TQIconSet ic( BarIcon( "" + name, KDevDesignerPartFactory::instance() ) ); + TQString prefix = "designer_"; + int right = name.length() - prefix.length(); + ic.setPixmap( BarIcon( prefix + "d_" + name.right( right ), KDevDesignerPartFactory::instance() ), + TQIconSet::Small, TQIconSet::Disabled ); + return ic; +} + +void KDevDesignerPart::setupActions( ) +{ + TDEAction *action; + action = KStdAction::openNew(this, TQT_SLOT(fileNew()), actionCollection()); + action = KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection()); + action = KStdAction::close(this, TQT_SLOT(fileClose()), actionCollection()); + stateSync(action, m_widget->actionFileClose); + action = KStdAction::save(this, TQT_SLOT(save()), actionCollection()); + stateSync(action, m_widget->actionFileSave); + action = KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection()); + stateSync(action, m_widget->actionFileSaveAs); + action = new TDEAction(i18n("Save Al&l"), 0, this, TQT_SLOT(fileSaveAs()), actionCollection(), "file_saveall"); + stateSync(action, m_widget->actionFileSaveAll); + new TDEAction(i18n("Create &Template..."), 0, this, TQT_SLOT(fileCreateTemplate()), actionCollection(), "file_createtemplate"); + + action = KStdAction::undo(this, TQT_SLOT(editUndo()), actionCollection()); + stateSync(action, m_widget->actionEditUndo); + action = KStdAction::redo(this, TQT_SLOT(editRedo()), actionCollection()); + stateSync(action, m_widget->actionEditRedo); + action = KStdAction::cut(this, TQT_SLOT(editCut()), actionCollection()); + stateSync(action, m_widget->actionEditCut); + action = KStdAction::copy(this, TQT_SLOT(editCopy()), actionCollection()); + stateSync(action, m_widget->actionEditCopy); + action = KStdAction::paste(this, TQT_SLOT(editPaste()), actionCollection()); + stateSync(action, m_widget->actionEditPaste); + action = new TDEAction(i18n("&Delete"), Key_Delete, this, TQT_SLOT(editDelete()), actionCollection(), "edit_delete"); + stateSync(action, m_widget->actionEditDelete); + action = KStdAction::selectAll(this, TQT_SLOT(editSelectAll()), actionCollection()); + stateSync(action, m_widget->actionEditSelectAll); + action = new TDEAction(i18n("Chec&k Accelerators"), ALT + Key_R, this, TQT_SLOT(editAccels()), actionCollection(), "edit_accels"); + stateSync(action, m_widget->actionEditAccels); + action = new TDEAction(i18n("S&lots..."), createPartIconSet("designer_editslots.png"), 0, this, TQT_SLOT(editFunctions()), actionCollection(), "edit_functions"); + stateSync(action, m_widget->actionEditFunctions); + action = new TDEAction(i18n("Co&nnections..."), createPartIconSet("designer_connecttool.png"), 0, this, TQT_SLOT(editConnections()), actionCollection(), "edit_connections"); + stateSync(action, m_widget->actionEditConnections); + action = new TDEAction(i18n("&Form Settings..."), 0, this, TQT_SLOT(editFormSettings()), actionCollection(), "edit_formsettings"); + stateSync(action, m_widget->actionEditFormSettings); + + action = new TDEAction(i18n("&Add File..."), 0, this, TQT_SLOT(projectAddFile()), actionCollection(), "project_addfile"); + stateSync(action, m_widget->actionProjectAddFile); + action = new TDEAction(i18n("&Image Collection..."), 0, this, TQT_SLOT(projectImageCollection()), actionCollection(), "project_imagecollection"); + stateSync(action, m_widget->actionEditPixmapCollection); + action = new TDEAction(i18n("&Database Connections..."), 0, this, TQT_SLOT(projectDatabaseCollections()), actionCollection(), "project_databasecollections"); + stateSync(action, m_widget->actionEditDatabaseConnections); + action = new TDEAction(i18n("&Designer Project Settings..."), 0, this, TQT_SLOT(projectSettings()), actionCollection(), "project_settings"); + stateSync(action, m_widget->actionEditProjectSettings); + + TDERadioAction *toggle; + toggle = new TDERadioAction(i18n("&Pointer"), createPartIconSet("designer_pointer.png"), Key_F2, actionCollection(), "tools_pointer"); + setupToolsAction(toggle, m_widget->actionPointerTool); + pointerAction = toggle; + toggle = new TDERadioAction(i18n("&Connect Signal/Slots"), createPartIconSet("designer_connecttool.png"), Key_F3, actionCollection(), "tools_connect"); + setupToolsAction(toggle, m_widget->actionConnectTool); + toggle = new TDERadioAction(i18n("Tab &Order"), createPartIconSet("designer_ordertool.png"), Key_F4, actionCollection(), "tools_taborder"); + setupToolsAction(toggle, m_widget->actionOrderTool); + toggle = new TDERadioAction(i18n("Set &Buddy"), createPartIconSet("designer_setbuddy.png"), Key_F12, actionCollection(), "tools_setbuddy"); + setupToolsAction(toggle, m_widget->actionBuddyTool); + new TDEAction(i18n("Configure Toolbox..."), 0, this, TQT_SLOT(toolsConfigureToolbox()), actionCollection(), "tools_toolbox"); + new TDEAction(i18n("Edit &Custom Widgets..."), 0, this, TQT_SLOT(toolsEditCustomWidgets()), actionCollection(), "tools_editcustomwidgets"); + + action = new TDEAction(i18n("Adjust &Size"), createPartIconSet("designer_adjustsize.png"), CTRL + Key_J, this, TQT_SLOT(layoutAdjustSize()), actionCollection(), "layout_adjustsize"); + stateSync(action, m_widget->actionEditAdjustSize); + action = new TDEAction(i18n("Lay Out &Horizontally"), createPartIconSet("designer_edithlayout.png"), CTRL + Key_H, this, TQT_SLOT(layoutHLayout()), actionCollection(), "layout_h"); + stateSync(action, m_widget->actionEditHLayout); + action = new TDEAction(i18n("Lay Out &Vertically"), createPartIconSet("designer_editvlayout.png"), CTRL + Key_V, this, TQT_SLOT(layoutVLayout()), actionCollection(), "layout_v"); + stateSync(action, m_widget->actionEditVLayout); + action = new TDEAction(i18n("Lay Out in &Grid"), createPartIconSet("designer_editgrid.png"), CTRL + Key_G, this, TQT_SLOT(layoutGridLayout()), actionCollection(), "layout_grid"); + stateSync(action, m_widget->actionEditGridLayout); + action = new TDEAction(i18n("Lay OutQt::Horizontally (in S&plitter)"), createPartIconSet("designer_editvlayoutsplit.png"), 0, this, TQT_SLOT(layoutSplitHLayout()), actionCollection(), "layout_splith"); + stateSync(action, m_widget->actionEditSplitHorizontal); + action = new TDEAction(i18n("Lay OutQt::Vertically (in Sp&litter)"), createPartIconSet("designer_edithlayoutsplit.png"), 0, this, TQT_SLOT(layoutSplitVLayout()), actionCollection(), "layout_splitv"); + stateSync(action, m_widget->actionEditSplitVertical); + action = new TDEAction(i18n("&Break Layout"), createPartIconSet("designer_editbreaklayout.png"), CTRL + Key_B, this, TQT_SLOT(layoutBreak()), actionCollection(), "layout_break"); + stateSync(action, m_widget->actionEditBreakLayout); + toggle = new TDERadioAction(i18n("Add Spacer"), createPartIconSet("designer_spacer.png"), 0, actionCollection(), "layout_spacer"); + setupToolsAction(toggle, m_widget->actionInsertSpacer); + + action = new TDEAction(i18n("Preview &Form"), CTRL + Key_T, this, TQT_SLOT(windowPreview()), actionCollection(), "window_preview"); + stateSync(action, m_widget->actionPreview); + action = new TDEAction(i18n("Ne&xt Form"), CTRL + Key_F6, this, TQT_SLOT(windowNext()), actionCollection(), "window_next"); + stateSync(action, m_widget->actionWindowNext); + action = new TDEAction(i18n("Pre&vious Form"), CTRL + SHIFT + Key_F6, this, TQT_SLOT(windowPrev()), actionCollection(), "window_prev"); + stateSync(action, m_widget->actionWindowPrevious); + + action = KStdAction::preferences(this, TQT_SLOT(editPreferences()), actionCollection()); + action->setText(i18n("Configure &KDevDesigner...")); + stateSync(action, m_widget->actionEditPreferences); +} + +KDevDesignerPart::~KDevDesignerPart() +{ +} + +void KDevDesignerPart::setReadWrite(bool rw) +{ + ReadWritePart::setReadWrite(rw); +} + +void KDevDesignerPart::setModified(bool modified) +{ +/* TDEAction *save = actionCollection()->action(KStdAction::stdName(KStdAction::Save)); + if (!save) + return; + if (modified) + save->setEnabled(true); + else + save->setEnabled(false);*/ + + ReadWritePart::setModified(modified); +} + +bool KDevDesignerPart::openFile() +{ + m_widget->fileOpen("", "", m_file); + return true; +} + +bool KDevDesignerPart::saveFile() +{ + if (isReadWrite() == false) + return false; + m_widget->actionFileSaveAll->activate(); + return true; +} + +void KDevDesignerPart::stateSync( TDEAction * tdeaction, TQAction * qaction ) +{ + if (!qaction) + return; + tdeaction->setEnabled(qaction->isEnabled()); + DesignerAction *ac = dynamic_cast(qaction); + if (!ac) + return; + connect(ac, TQT_SIGNAL(actionEnabled(bool )), tdeaction, TQT_SLOT(setEnabled(bool ))); +} + +void KDevDesignerPart::setupToolsAction( TDERadioAction * toggle, TQAction * action ) +{ + if (!action) + return; + + toggle->setGroup("tools"); + toggle->setExclusiveGroup("tools"); + connect(action, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(setToggleActionChecked(bool ))); + connect(toggle, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setToggleActionOn(bool))); + toggle->setChecked(action->isOn()); + m_actionMap[action] = toggle; + m_actionMap2[toggle] = action; +} + + +// It's usually safe to leave the factory code alone.. with the +// notable exception of the TDEAboutData data +#include +#include + +TDEInstance* KDevDesignerPartFactory::s_instance = 0L; +TDEAboutData* KDevDesignerPartFactory::s_about = 0L; + +KDevDesignerPartFactory::KDevDesignerPartFactory() + : KParts::Factory() +{ +} + +KDevDesignerPartFactory::~KDevDesignerPartFactory() +{ + delete s_instance; + delete s_about; + + s_instance = 0L; +} + +KParts::Part* KDevDesignerPartFactory::createPartObject( TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name, + const char *classname, const TQStringList &args ) +{ + // Create an instance of our Part + KDevDesignerPart* obj = new KDevDesignerPart( parentWidget, widgetName, parent, name, args ); + + // See if we are to be read-write or not + if (TQCString(classname) == "KParts::ReadOnlyPart") + obj->setReadWrite(false); + + return obj; +} + +TDEInstance* KDevDesignerPartFactory::instance() +{ + if( !s_instance ) + { + s_about = new TDEAboutData("kdevdesignerpart", I18N_NOOP("KDevDesignerPart"), "0.1"); + s_about->addAuthor("Alexander Dymo", 0, "cloudtemple@mksat.net"); + s_about->addAuthor("Trolltech AS", 0, "info@trolltech.com"); + s_instance = new TDEInstance(s_about); + } + return s_instance; +} + +extern "C" +{ + void* init_libkdevdesignerpart() + { + return new KDevDesignerPartFactory; + } +} + +//actions + +void KDevDesignerPart::fileNew( ) +{ + if (!m_widget->actionNewFile) + { + tqWarning("wrong m_widget->actionNewFile"); + return; + } + m_widget->actionNewFile->activate(); +} + +void KDevDesignerPart::fileOpen() +{ + m_widget->fileOpen(); +} + +void KDevDesignerPart::fileSaveAs() +{ + m_widget->actionFileSaveAs->activate(); +} + +void KDevDesignerPart::fileClose( ) +{ + m_widget->actionFileClose->activate(); +} + +void KDevDesignerPart::fileCreateTemplate( ) +{ + m_widget->fileCreateTemplate(); +} + +void KDevDesignerPart::editUndo( ) +{ + m_widget->actionEditUndo->activate(); +} + +void KDevDesignerPart::editRedo( ) +{ + m_widget->actionEditRedo->activate(); +} + +void KDevDesignerPart::editCut( ) +{ + m_widget->actionEditCut->activate(); +} + +void KDevDesignerPart::editPaste( ) +{ + m_widget->actionEditPaste->activate(); +} + +void KDevDesignerPart::editCopy( ) +{ + m_widget->actionEditCopy->activate(); +} + +void KDevDesignerPart::editDelete( ) +{ + m_widget->actionEditDelete->activate(); +} + +void KDevDesignerPart::editSelectAll( ) +{ + m_widget->actionEditSelectAll->activate(); +} + +void KDevDesignerPart::editAccels( ) +{ + m_widget->actionEditAccels->activate(); +} + +void KDevDesignerPart::editFunctions( ) +{ + m_widget->actionEditFunctions->activate(); +} + +void KDevDesignerPart::editConnections( ) +{ + m_widget->actionEditConnections->activate(); +} + +void KDevDesignerPart::editFormSettings( ) +{ + m_widget->actionEditFormSettings->activate(); +} + +void KDevDesignerPart::editPreferences( ) +{ + m_widget->actionEditPreferences->activate(); +} + +void KDevDesignerPart::projectAddFile( ) +{ + m_widget->actionProjectAddFile->activate(); +} + +void KDevDesignerPart::projectImageCollection( ) +{ + m_widget->actionEditPixmapCollection->activate(); +} + +void KDevDesignerPart::projectDatabaseCollections( ) +{ + m_widget->actionEditDatabaseConnections->activate(); +} + +void KDevDesignerPart::projectSettings( ) +{ + m_widget->actionEditProjectSettings->activate(); +} + +void KDevDesignerPart::toolsConfigureToolbox( ) +{ + m_widget->toolsConfigure(); +} + +void KDevDesignerPart::layoutAdjustSize( ) +{ + m_widget->actionEditAdjustSize->activate(); +} + +void KDevDesignerPart::layoutHLayout( ) +{ + m_widget->actionEditHLayout->activate(); +} + +void KDevDesignerPart::layoutVLayout( ) +{ + m_widget->actionEditVLayout->activate(); +} + +void KDevDesignerPart::layoutGridLayout( ) +{ + m_widget->actionEditGridLayout->activate(); +} + +void KDevDesignerPart::layoutSplitHLayout( ) +{ + m_widget->actionEditSplitHorizontal->activate(); +} + +void KDevDesignerPart::layoutSplitVLayout( ) +{ + m_widget->actionEditSplitVertical->activate(); +} + +void KDevDesignerPart::layoutBreak( ) +{ + m_widget->actionEditBreakLayout->activate(); +} + +void KDevDesignerPart::windowPreview( ) +{ + m_widget->actionPreview->activate(); +} + +void KDevDesignerPart::windowNext( ) +{ + m_widget->actionWindowNext->activate(); +} + +void KDevDesignerPart::windowPrev( ) +{ + m_widget->actionWindowPrevious->activate(); +} + +void KDevDesignerPart::statusMessage( const TQString & msg ) +{ + emit setStatusBarText(msg); +} + +void KDevDesignerPart::setToggleActionChecked( bool b) +{ + if (!sender()) + return; + const TQAction *action = dynamic_cast(sender()); + if (!action) + return; + if (b) + { + if (action == m_widget->actionPointerTool) + pointerAction->setChecked(true); + return; + } + TDERadioAction *tdeaction = m_actionMap[action]; + if (!tdeaction) + return; +// kdDebug() << "untoggle action: " << tdeaction->text() << endl; + tdeaction->blockSignals(true); + tdeaction->setChecked(b); + tdeaction->blockSignals(false); +} + +void KDevDesignerPart::setToggleActionOn( bool b ) +{ + if (!sender()) + return; + const TDERadioAction *action = dynamic_cast(sender()); + if (!action) + return; +// kdDebug() << (b?TQString("toggle"):TQString("untoggle")) << " action: " << action->text() << endl; + TQAction *qaction = m_actionMap2[action]; + if (!qaction) + return; + disconnect(qaction, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(setToggleActionChecked(bool ))); + qaction->setOn(b); + connect(qaction, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(setToggleActionChecked(bool ))); +} + +void KDevDesignerPart::openProject( const TQString & // projectFile + ) +{ + //TODO: implement + return; +} + +KInterfaceDesigner::DesignerType KDevDesignerPart::designerType( ) +{ + return KInterfaceDesigner::TQtDesigner; +} + +void KDevDesignerPart::emitAddedFunction( const TQString & form, KInterfaceDesigner::Function func ) +{ + kdDebug() << "KDevDesignerPart::emitAddedFunction: form " << form << ", function: " << func.function << endl; + emit addedFunction(designerType(), form, func); +} + +void KDevDesignerPart::emitRemovedFunction( const TQString & form, KInterfaceDesigner::Function func ) +{ + kdDebug() << "KDevDesignerPart::emitRemovedFunction: form " << form << ", function: " << func.function << endl; + emit removedFunction(designerType(), form, func); +} + +void KDevDesignerPart::emitEditedFunction( const TQString & form, KInterfaceDesigner::Function oldFunc, KInterfaceDesigner::Function func ) +{ + kdDebug() << "KDevDesignerPart::emitEditedFunction: form " << form + << ", old function: " << oldFunc.function + << ", function: " << func.function << endl; + +// m_widget->formWindow()->clearSelection(false); + emit editedFunction(designerType(), form, oldFunc, func); +} + +void KDevDesignerPart::emitEditFunction(const TQString &formName, const TQString &functionName) +{ + kdDebug() << "KDevDesignerPart::emitEditedFunction: form " << formName + << ", function: " << functionName << endl; + emit editFunction(designerType(), formName, functionName); +} + +void KDevDesignerPart::formModified(bool b) +{ + kdDebug() << "KDevDesignerPart::formModified " << b << endl; + setModified(b); +} + +void KDevDesignerPart::emitEditSource(const TQString &formName) +{ + emit editSource(designerType(), formName); +} + +void KDevDesignerPart::emitNewStatus(const TQString &formName, int status) +{ + emit newStatus(formName, status); +} + +void KDevDesignerPart::toolsEditCustomWidgets( ) +{ + m_widget->toolsCustomWidget(); +} + +#include "kdevdesigner_part.moc" diff --git a/kdevdesigner/designer/kdevdesigner_part.desktop b/kdevdesigner/designer/kdevdesigner_part.desktop new file mode 100644 index 00000000..2928a8ad --- /dev/null +++ b/kdevdesigner/designer/kdevdesigner_part.desktop @@ -0,0 +1,16 @@ +[Desktop Entry] +Name=KDevDesignerPart +Name[da]=TDevelop Designer-part +Name[el]=ΤμήμαKDevDesigner +Name[nds]=Kdevelop-Makerkomponent +Name[ne]=केडीई विकास डिजाइनर भाग +Name[sv]=TDevelop designerdel +Name[ta]=கேமேம்பாட்டு வடிவமைப்பாளர் பகுதி +Name[tg]=KDevҚисми дизайнгар +Name[zh_TW]=TDevelop 設計元件 +MimeType=application/x-designer +ServiceTypes=KParts/ReadOnlyPart,KParts/ReadWritePart +X-TDE-Library=libkdevdesignerpart +Type=Service +InitialPreference=10 + diff --git a/kdevdesigner/designer/kdevdesigner_part.h b/kdevdesigner/designer/kdevdesigner_part.h new file mode 100644 index 00000000..3006c600 --- /dev/null +++ b/kdevdesigner/designer/kdevdesigner_part.h @@ -0,0 +1,148 @@ +/*************************************************************************** + * Copyright (C) 2004 by Alexander Dymo * + * cloudtemple@mksat.net * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +#ifndef _KDEVDESIGNERPART_H_ +#define _KDEVDESIGNERPART_H_ + +#include + +#include +#include + +#include "designer.h" + +class TQWidget; +class TQPainter; +class KURL; +class MainWindow; +class TDEAction; +class TQAction; +class TDERadioAction; + +class KDevDesignerPart : public KInterfaceDesigner::Designer +{ + Q_OBJECT + +public: + KDevDesignerPart(TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name, const TQStringList &args); + virtual ~KDevDesignerPart(); + + virtual void setReadWrite(bool rw); + virtual void setModified(bool modified); + + void statusMessage(const TQString &msg); + + //KInterfaceDesigner::Designer methods + virtual void openProject(const TQString &projectFile); + virtual KInterfaceDesigner::DesignerType designerType(); + + void emitAddedFunction(const TQString &form, KInterfaceDesigner::Function func); + void emitEditedFunction(const TQString &form, KInterfaceDesigner::Function oldFunc, KInterfaceDesigner::Function func); + void emitRemovedFunction(const TQString &form, KInterfaceDesigner::Function func); + + void emitEditFunction(const TQString &formName, const TQString &functionName); + void emitEditSource(const TQString &formName); + + void emitNewStatus(const TQString &formName, int status); + +protected: + virtual bool openFile(); + virtual bool saveFile(); + + void setupDesignerWindow(); + void setupActions(); + + void stateSync(TDEAction *tdeaction, TQAction *qaction); + void setupToolsAction(TDERadioAction *toggle, TQAction *action); + +protected slots: + void setToggleActionChecked(bool b); + void setToggleActionOn(bool b); + + void fileNew(); + void fileOpen(); + void fileClose(); + void fileSaveAs(); + void fileCreateTemplate(); + + void editUndo(); + void editRedo(); + void editCut(); + void editCopy(); + void editPaste(); + void editDelete(); + void editSelectAll(); + void editAccels(); + void editFunctions(); + void editConnections(); + void editFormSettings(); + void editPreferences(); + + void projectAddFile(); + void projectImageCollection(); + void projectDatabaseCollections(); + void projectSettings(); + + void toolsConfigureToolbox(); + void toolsEditCustomWidgets(); + + void layoutAdjustSize(); + void layoutHLayout(); + void layoutVLayout(); + void layoutGridLayout(); + void layoutSplitHLayout(); + void layoutSplitVLayout(); + void layoutBreak(); + + void windowPreview(); + void windowNext(); + void windowPrev(); + + void formModified(bool b); +private: + MainWindow *m_widget; + + TQMap m_actionMap; + TQMap m_actionMap2; + TDERadioAction* pointerAction; +}; + +class TDEInstance; +class TDEAboutData; + +class KDevDesignerPartFactory : public KParts::Factory +{ + Q_OBJECT + +public: + KDevDesignerPartFactory(); + virtual ~KDevDesignerPartFactory(); + virtual KParts::Part* createPartObject( TQWidget *parentWidget, const char *widgetName, + TQObject *parent, const char *name, + const char *classname, const TQStringList &args ); + static TDEInstance* instance(); + +private: + static TDEInstance* s_instance; + static TDEAboutData* s_about; +}; + +#endif // _KDEVDESIGNERPART_H_ diff --git a/kdevdesigner/designer/kdevdesigner_part.rc b/kdevdesigner/designer/kdevdesigner_part.rc new file mode 100644 index 00000000..71adcdc9 --- /dev/null +++ b/kdevdesigner/designer/kdevdesigner_part.rc @@ -0,0 +1,121 @@ + + + + &File + + + + + + &Edit + + + + + + + + + + + + + + + + + + + &Project + + + + + + + + &Tools + + + + + + + + + + &Layout + + + + + + + + + + + + + &Settings + + + + &Window + + + + + + + + + + +Main Toolbar + + + + + + + + + + + + +Layout Toolbar + + + + + + + + + + + + +Tools Toolbar + + + + + + + diff --git a/kdevdesigner/designer/kdevdesigner_part_sh.rc b/kdevdesigner/designer/kdevdesigner_part_sh.rc new file mode 100644 index 00000000..eb6b503b --- /dev/null +++ b/kdevdesigner/designer/kdevdesigner_part_sh.rc @@ -0,0 +1,116 @@ + + + + &File + + + + + + + + + + + + + + &Edit + + + + + + + + + + + + + + + + + + &Project + + + + + + + + &Tools + + + + + + + + + + &Layout + + + + + + + + + + + + + &Settings + + + + &Window + + + + + + + + +File Toolbar + + + + + +Edit Toolbar + + + + + + + + +Layout Toolbar + + + + + + + + + + + + +Tools Toolbar + + + + + + + diff --git a/tdevdesigner/designer/layout.cpp b/kdevdesigner/designer/layout.cpp similarity index 100% rename from tdevdesigner/designer/layout.cpp rename to kdevdesigner/designer/layout.cpp diff --git a/tdevdesigner/designer/layout.h b/kdevdesigner/designer/layout.h similarity index 100% rename from tdevdesigner/designer/layout.h rename to kdevdesigner/designer/layout.h diff --git a/tdevdesigner/designer/listboxdnd.cpp b/kdevdesigner/designer/listboxdnd.cpp similarity index 100% rename from tdevdesigner/designer/listboxdnd.cpp rename to kdevdesigner/designer/listboxdnd.cpp diff --git a/tdevdesigner/designer/listboxdnd.h b/kdevdesigner/designer/listboxdnd.h similarity index 100% rename from tdevdesigner/designer/listboxdnd.h rename to kdevdesigner/designer/listboxdnd.h diff --git a/tdevdesigner/designer/listboxeditor.ui b/kdevdesigner/designer/listboxeditor.ui similarity index 100% rename from tdevdesigner/designer/listboxeditor.ui rename to kdevdesigner/designer/listboxeditor.ui diff --git a/tdevdesigner/designer/listboxeditorimpl.cpp b/kdevdesigner/designer/listboxeditorimpl.cpp similarity index 100% rename from tdevdesigner/designer/listboxeditorimpl.cpp rename to kdevdesigner/designer/listboxeditorimpl.cpp diff --git a/tdevdesigner/designer/listboxeditorimpl.h b/kdevdesigner/designer/listboxeditorimpl.h similarity index 100% rename from tdevdesigner/designer/listboxeditorimpl.h rename to kdevdesigner/designer/listboxeditorimpl.h diff --git a/tdevdesigner/designer/listboxrename.cpp b/kdevdesigner/designer/listboxrename.cpp similarity index 100% rename from tdevdesigner/designer/listboxrename.cpp rename to kdevdesigner/designer/listboxrename.cpp diff --git a/tdevdesigner/designer/listboxrename.h b/kdevdesigner/designer/listboxrename.h similarity index 100% rename from tdevdesigner/designer/listboxrename.h rename to kdevdesigner/designer/listboxrename.h diff --git a/tdevdesigner/designer/listdnd.cpp b/kdevdesigner/designer/listdnd.cpp similarity index 100% rename from tdevdesigner/designer/listdnd.cpp rename to kdevdesigner/designer/listdnd.cpp diff --git a/tdevdesigner/designer/listdnd.h b/kdevdesigner/designer/listdnd.h similarity index 100% rename from tdevdesigner/designer/listdnd.h rename to kdevdesigner/designer/listdnd.h diff --git a/tdevdesigner/designer/listeditor.ui b/kdevdesigner/designer/listeditor.ui similarity index 100% rename from tdevdesigner/designer/listeditor.ui rename to kdevdesigner/designer/listeditor.ui diff --git a/tdevdesigner/designer/listeditor.ui.h b/kdevdesigner/designer/listeditor.ui.h similarity index 100% rename from tdevdesigner/designer/listeditor.ui.h rename to kdevdesigner/designer/listeditor.ui.h diff --git a/tdevdesigner/designer/listviewdnd.cpp b/kdevdesigner/designer/listviewdnd.cpp similarity index 100% rename from tdevdesigner/designer/listviewdnd.cpp rename to kdevdesigner/designer/listviewdnd.cpp diff --git a/tdevdesigner/designer/listviewdnd.h b/kdevdesigner/designer/listviewdnd.h similarity index 100% rename from tdevdesigner/designer/listviewdnd.h rename to kdevdesigner/designer/listviewdnd.h diff --git a/tdevdesigner/designer/listvieweditor.ui b/kdevdesigner/designer/listvieweditor.ui similarity index 100% rename from tdevdesigner/designer/listvieweditor.ui rename to kdevdesigner/designer/listvieweditor.ui diff --git a/tdevdesigner/designer/listvieweditorimpl.cpp b/kdevdesigner/designer/listvieweditorimpl.cpp similarity index 100% rename from tdevdesigner/designer/listvieweditorimpl.cpp rename to kdevdesigner/designer/listvieweditorimpl.cpp diff --git a/tdevdesigner/designer/listvieweditorimpl.h b/kdevdesigner/designer/listvieweditorimpl.h similarity index 100% rename from tdevdesigner/designer/listvieweditorimpl.h rename to kdevdesigner/designer/listvieweditorimpl.h diff --git a/kdevdesigner/designer/mainwindow.cpp b/kdevdesigner/designer/mainwindow.cpp new file mode 100644 index 00000000..3d900532 --- /dev/null +++ b/kdevdesigner/designer/mainwindow.cpp @@ -0,0 +1,3784 @@ + /********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "designerappiface.h" +#include "designerapp.h" + +#include "mainwindow.h" +#include "defs.h" +#include "globaldefs.h" +#include "formwindow.h" +#include "widgetdatabase.h" +#include "widgetfactory.h" +#include "propertyeditor.h" +#include "metadatabase.h" +#include "resource.h" +#include "hierarchyview.h" +#include "newformimpl.h" +#include "workspace.h" +#include "about.h" +#include "multilineeditorimpl.h" +#include "wizardeditorimpl.h" +#include "outputwindow.h" +#include "actioneditorimpl.h" +#include "actiondnd.h" +#include "project.h" +#include "projectsettingsimpl.h" +#include "tqwidgetfactory.h" +#include "pixmapcollection.h" +#include "qcompletionedit.h" +#include "sourcefile.h" +#include "orderindicator.h" +#include +#include "widgetaction.h" +#include "propertyobject.h" +#include "popupmenueditor.h" +#include "menubareditor.h" + +#include "startdialog.h" +#include "createtemplate.h" +#include "editfunctions.h" +//#include "connectionviewer.h" +#include "formsettings.h" +#include "preferences.h" +#include "pixmapcollectioneditor.h" +#ifndef TQT_NO_SQL +#include "dbconnectionimpl.h" +#endif +//#include "connectioneditor.h" +#include "customwidgeteditorimpl.h" +#include "paletteeditorimpl.h" +#include "listboxeditorimpl.h" +#include "listvieweditorimpl.h" +#include "iconvieweditorimpl.h" +#include "tableeditorimpl.h" +#include "multilineeditor.h" +#include "finddialog.h" +#include "replacedialog.h" +#include "gotolinedialog.h" +#include "designeraction.h" + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "kdevdesigner_part.h" + +static bool mblockNewForms = FALSE; +extern TQMap *qwf_forms; +extern TQString *qwf_language; +extern bool qwf_execute_code; +extern bool qwf_stays_on_top; +extern void set_splash_status( const TQString &txt ); +extern TQObject* qwf_form_object; +extern TQString *qwf_plugin_dir; + +MainWindow *MainWindow::self = 0; + +TQString assistantPath() +{ + TQString path = TQDir::cleanDirPath( TQString( tqInstallPathBins() ) + + TQDir::separator() ); + return path; +} + + +static TQString textNoAccel( const TQString& text) +{ + TQString t = text; + int i; + while ( (i = t.find('&') )>= 0 ) { + t.remove(i,1); + } + return t; +} + + +MainWindow::MainWindow( KDevDesignerPart *part, bool asClient, bool single, const TQString &plgDir ) + : TQMainWindow( 0, "designer_mainwindow"/*, WType_TopLevel | (single ? 0 : WDestructiveClose) | WGroupLeader*/ ), + grd( 10, 10 ), sGrid( TRUE ), snGrid( TRUE ), restoreConfig( TRUE ), splashScreen( TRUE ), + fileFilter( i18n( "TQt User-Interface Files (*.ui)" ) ), client( asClient ), + previewing( FALSE ), databaseAutoEdit( FALSE ), autoSaveEnabled( FALSE ), autoSaveInterval( 1800 ), m_part(part) +{ +// extern void qInitImages_designercore(); +// qInitImages_designercore(); + + self = this; + setPluginDirectory( plgDir ); + customWidgetToolBar = customWidgetToolBar2 = 0; + guiStuffVisible = TRUE; + editorsReadOnly = FALSE; + sSignalHandlers = TRUE; + init_colors(); + shStartDialog = FALSE; + + desInterface = new DesignerInterfaceImpl( this ); + desInterface->addRef(); + inDebugMode = FALSE; + savePluginPaths = FALSE; + + updateFunctionsTimer = new TQTimer( this ); + connect( updateFunctionsTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( doFunctionsChanged() ) ); + + autoSaveTimer = new TQTimer( this ); + connect( autoSaveTimer, TQT_SIGNAL( timeout() ), + this, TQT_SLOT( fileSaveAll() ) ); + + set_splash_status( "Loading Plugins..." ); + setupPluginManagers(); + +/* if ( !single ) + tqApp->setMainWidget( this );*/ + TQWidgetFactory::addWidgetFactory( new CustomWidgetFactory ); +#ifndef TQ_WS_MACX + setIcon( BarIcon( "designer_appicon.png", KDevDesignerPartFactory::instance() ) ); +#endif + + actionGroupTools = 0; + prefDia = 0; + windowMenu = 0; + hierarchyView = 0; + actionEditor = 0; + currentProject = 0; + wspace = 0; + oWindow = 0; + singleProject = single; + + statusBar()->clear(); +#if defined(TQT_NON_COMMERCIAL) + statusBar()->addWidget( new TQLabel(i18n("Ready - This is the non-commercial version of TQt - " + "For commercial evaluations, use the help menu to register with Trolltech."), statusBar()), 1 ); +#else + statusBar()->addWidget( new TQLabel("Ready", statusBar()), 1 ); +#endif + + + set_splash_status( "Setting up GUI..." ); + setupMDI(); + setupMenuBar(); + + setupToolbox(); + + setupFileActions(); + setupEditActions(); + setupProjectActions(); + setupSearchActions(); + layoutToolBar = new TQToolBar( this, "Layout" ); + layoutToolBar->setCloseMode( TQDockWindow::Undocked ); + addToolBar( layoutToolBar, i18n( "Layout" ) ); + interpreterPluginManager = 0; + setupToolActions(); + setupLayoutActions(); + setupPreviewActions(); + setupOutputWindow(); + setupActionManager(); + setupWindowActions(); + + setupWorkspace(); + setupHierarchyView(); + setupPropertyEditor(); + setupActionEditor(); + + setupHelpActions(); + + setupRMBMenus(); + + connect( this, TQT_SIGNAL( projectChanged() ), this, TQT_SLOT( emitProjectSignals() ) ); + connect( this, TQT_SIGNAL( hasActiveWindow(bool) ), this, TQT_SLOT( emitProjectSignals() ) ); + + emit hasActiveForm( FALSE ); + emit hasActiveWindow( FALSE ); + + lastPressWidget = 0; + tqApp->installEventFilter( this ); + + TQSize as( tqApp->desktop()->size() ); + as -= TQSize( 30, 30 ); + resize( TQSize( 1200, 1000 ).boundedTo( as ) ); + + connect( tqApp->clipboard(), TQT_SIGNAL( dataChanged() ), + this, TQT_SLOT( clipboardChanged() ) ); + clipboardChanged(); + layoutChilds = FALSE; + layoutSelected = FALSE; + breakLayout = FALSE; + backPix = TRUE; + + set_splash_status( "Loading User Settings..." ); + readConfig(); + // hack to make WidgetFactory happy (so it knows TQWidget and TQDialog for resetting properties) + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQWIDGET_OBJECT_NAME_STRING ), this, 0, FALSE ); + delete w; + w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQDIALOG_OBJECT_NAME_STRING ), this, 0, FALSE ); + delete w; + w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQLABEL_OBJECT_NAME_STRING ), this, 0, FALSE ); + delete w; + w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQTABWIDGET_OBJECT_NAME_STRING ), this, 0, FALSE ); + delete w; + w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQFRAME_OBJECT_NAME_STRING ), this, 0, FALSE ); + delete w; + setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), FALSE ); + actionEditor->parentWidget()->hide(); + + assistant = new TQAssistantClient( assistantPath(), TQT_TQOBJECT(this) ); + + statusBar()->setSizeGripEnabled( TRUE ); + set_splash_status( "Initialization Done." ); +/* if ( shStartDialog ) + TQTimer::singleShot( 0, this, TQT_SLOT( showStartDialog() ));*/ + + if ( autoSaveEnabled ) + autoSaveTimer->start( autoSaveInterval * 1000 ); + + setFocusPolicy( TQ_StrongFocus ); +} + +MainWindow::~MainWindow() +{ + TQValueList::Iterator tit; + for ( tit = preferenceTabs.begin(); tit != preferenceTabs.end(); ++tit ) { + Tab t = *tit; + delete t.w; + } + for ( tit = projectTabs.begin(); tit != projectTabs.end(); ++tit ) { + Tab t = *tit; + delete t.w; + } + + TQMap< TQAction*, Project* >::Iterator it = projects.begin(); + while ( it != projects.end() ) { + Project *p = *it; + ++it; + delete p; + } + projects.clear(); + + delete oWindow; + oWindow = 0; + + desInterface->release(); + desInterface = 0; + + delete actionPluginManager; + delete preferencePluginManager; + delete projectSettingsPluginManager; + delete interpreterPluginManager; + delete templateWizardPluginManager; + delete editorPluginManager; + delete sourceTemplatePluginManager; + + MetaDataBase::clearDataBase(); + if(self == this) + self = 0; +} + +void MainWindow::setupMDI() +{ + TQVBox *vbox = new TQVBox( this ); + setCentralWidget( vbox ); + vbox->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); + vbox->setMargin( 1 ); + vbox->setLineWidth( 1 ); + qworkspace = new TQWorkspace( vbox ); + qworkspace->setPaletteBackgroundPixmap( UserIcon( "designer_background.png", KDevDesignerPartFactory::instance() ) ); + qworkspace->setScrollBarsEnabled( TRUE ); + connect( qworkspace, TQT_SIGNAL( windowActivated( TQWidget * ) ), + this, TQT_SLOT( activeWindowChanged( TQWidget * ) ) ); + lastActiveFormWindow = 0; + qworkspace->setAcceptDrops( TRUE ); +} + +void MainWindow::setupMenuBar() +{ + menubar = menuBar(); +} + +void MainWindow::setupPropertyEditor() +{ + TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); + dw->setResizeEnabled( TRUE ); + dw->setCloseMode( TQDockWindow::Always ); + propertyEditor = new PropertyEditor( dw ); + addToolBar( dw, TQt::DockRight ); + dw->setWidget( propertyEditor ); + dw->setFixedExtentWidth( 250 ); + dw->setCaption( i18n( "Property Editor/Signal Handlers" ) ); + TQWhatsThis::add( propertyEditor, + i18n("The Property Editor" + "

You can change the appearance and behavior of the selected widget in the " + "property editor.

" + "

You can set properties for components and forms at design time and see the " + "immediately see the effects of the changes. " + "Each property has its own editor which (depending on the property) can be used " + "to enter " + "new values, open a special dialog, or to select values from a predefined list. " + "Click F1 to get detailed help for the selected property.

" + "

You can resize the columns of the editor by dragging the separators in the " + "list's header.

" + "

Signal Handlers

" + "

In the Signal Handlers tab you can define connections between " + "the signals emitted by widgets and the slots in the form. " + "(These connections can also be made using the connection tool.)" ) ); + dw->show(); +} + +void MainWindow::setupOutputWindow() +{ + TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); + dw->setResizeEnabled( TRUE ); + dw->setCloseMode( TQDockWindow::Always ); + addToolBar( dw, TQt::DockBottom ); + oWindow = new OutputWindow( dw ); + dw->setWidget( oWindow ); + dw->setFixedExtentHeight( 150 ); + dw->setCaption( i18n( "Output Window" ) ); +} + +void MainWindow::setupHierarchyView() +{ + if ( hierarchyView ) + return; + TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); + dw->setResizeEnabled( TRUE ); + dw->setCloseMode( TQDockWindow::Always ); + hierarchyView = new HierarchyView( dw ); + addToolBar( dw, TQt::DockRight ); + dw->setWidget( hierarchyView ); + + dw->setCaption( i18n( "Object Explorer" ) ); + dw->setFixedExtentWidth( 250 ); + TQWhatsThis::add( hierarchyView, + i18n("The Object Explorer" + "

The Object Explorer provides an overview of the relationships " + "between the widgets in a form. You can use the clipboard functions using " + "a context menu for each item in the view. It is also useful for selecting widgets " + "in forms that have complex layouts.

" + "

The columns can be resized by dragging the separator in the list's header.

" + "

The second tab shows all the form's slots, class variables, includes, etc.

") ); + dw->show(); +} + +void MainWindow::setupWorkspace() +{ + TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); + dw->setResizeEnabled( TRUE ); + dw->setCloseMode( TQDockWindow::Always ); + TQVBox *vbox = new TQVBox( dw ); + QCompletionEdit *edit = new QCompletionEdit( vbox ); + TQToolTip::add( edit, i18n( "Start typing the buffer you want to switch to here (ALT+B)" ) ); + TQAccel *a = new TQAccel( this ); + a->connectItem( a->insertItem( ALT + Key_B ), edit, TQT_SLOT( setFocus() ) ); + wspace = new Workspace( vbox, this ); + wspace->setBufferEdit( edit ); + wspace->setCurrentProject( currentProject ); + addToolBar( dw, TQt::DockRight ); + dw->setWidget( vbox ); + + dw->setCaption( i18n( "Project Overview" ) ); + TQWhatsThis::add( wspace, i18n("The Project Overview Window" + "

The Project Overview Window displays all the current " + "project, including forms and source files.

" + "

Use the search field to rapidly switch between files.

")); + dw->setFixedExtentHeight( 100 ); + dw->show(); +} + +void MainWindow::setupActionEditor() +{ + TQDockWindow *dw = new TQDockWindow( TQDockWindow::OutsideDock, this, 0 ); + addDockWindow( dw, TQt::DockTornOff ); + dw->setResizeEnabled( TRUE ); + dw->setCloseMode( TQDockWindow::Always ); + actionEditor = new ActionEditor( dw ); + dw->setWidget( actionEditor ); + actionEditor->show(); + dw->setCaption( i18n( "Action Editor" ) ); + TQWhatsThis::add( actionEditor, i18n("The Action Editor" + "

The Action Editor is used to add actions and action groups to " + "a form, and to connect actions to slots. Actions and action " + "groups can be dragged into menus and into toolbars, and may " + "feature keyboard shortcuts and tooltips. If actions have pixmaps " + "these are displayed on toolbar buttons and besides their names in " + "menus.

" ) ); + dw->hide(); + setAppropriate( dw, FALSE ); +} + +void MainWindow::setupToolbox() +{ + TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); + dw->setResizeEnabled( TRUE ); + dw->setCloseMode( TQDockWindow::Always ); + addToolBar( dw, TQt::DockLeft ); + toolBox = new TQToolBox( dw ); + dw->setWidget( toolBox ); + dw->setFixedExtentWidth( 160 ); + dw->setCaption( i18n( "Toolbox" ) ); + dw->show(); + setDockEnabled( dw, TQt::DockTop, FALSE ); + setDockEnabled( dw, TQt::DockBottom, FALSE ); + commonWidgetsToolBar = new TQToolBar( "Common Widgets", 0, toolBox, FALSE, "Common Widgets" ); + commonWidgetsToolBar->setFrameStyle( TQFrame::NoFrame ); + commonWidgetsToolBar->setOrientation( Qt::Vertical ); + commonWidgetsToolBar->setBackgroundMode(PaletteBase); + toolBox->addItem( commonWidgetsToolBar, "Common Widgets" ); +} + +void MainWindow::setupRMBMenus() +{ + rmbWidgets = new TQPopupMenu( this ); + actionEditCut->addTo( rmbWidgets ); + actionEditCopy->addTo( rmbWidgets ); + actionEditPaste->addTo( rmbWidgets ); + actionEditDelete->addTo( rmbWidgets ); +#if 0 + rmbWidgets->insertSeparator(); + actionEditLower->addTo( rmbWidgets ); + actionEditRaise->addTo( rmbWidgets ); +#endif + rmbWidgets->insertSeparator(); + actionEditAdjustSize->addTo( rmbWidgets ); + actionEditHLayout->addTo( rmbWidgets ); + actionEditVLayout->addTo( rmbWidgets ); + actionEditGridLayout->addTo( rmbWidgets ); + actionEditSplitHorizontal->addTo( rmbWidgets ); + actionEditSplitVertical->addTo( rmbWidgets ); + actionEditBreakLayout->addTo( rmbWidgets ); + rmbWidgets->insertSeparator(); + if ( !singleProjectMode() ) + actionEditConnections->addTo( rmbWidgets ); + actionEditSource->addTo( rmbWidgets ); + + rmbFormWindow = new TQPopupMenu( this ); + actionEditPaste->addTo( rmbFormWindow ); + actionEditSelectAll->addTo( rmbFormWindow ); + actionEditAccels->addTo( rmbFormWindow ); + rmbFormWindow->insertSeparator(); + actionEditAdjustSize->addTo( rmbFormWindow ); + actionEditHLayout->addTo( rmbFormWindow ); + actionEditVLayout->addTo( rmbFormWindow ); + actionEditGridLayout->addTo( rmbFormWindow ); + actionEditBreakLayout->addTo( rmbFormWindow ); + rmbFormWindow->insertSeparator(); + if ( !singleProjectMode() ) { + actionEditFunctions->addTo( rmbFormWindow ); + actionEditConnections->addTo( rmbFormWindow ); + } + actionEditSource->addTo( rmbFormWindow ); + rmbFormWindow->insertSeparator(); + actionEditFormSettings->addTo( rmbFormWindow ); +} + +void MainWindow::toolSelected( TQAction* action ) +{ + actionCurrentTool = action; + emit currentToolChanged(); + if ( formWindow() ) + formWindow()->commandHistory()->emitUndoRedo(); +} + +int MainWindow::currentTool() const +{ + if ( !actionCurrentTool ) + return POINTER_TOOL; + return TQString::fromLatin1(actionCurrentTool->name()).toInt(); +} + +void MainWindow::runProjectPrecondition() +{ + for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { + e->save(); + e->saveBreakPoints(); + } + fileSaveProject(); + + if ( currentTool() == ORDER_TOOL ) + resetTool(); + oWindow->clearErrorMessages(); + oWindow->clearDebug(); + oWindow->showDebugTab(); + previewing = TRUE; +} + +void MainWindow::runProjectPostcondition( TQObjectList *l ) +{ + inDebugMode = TRUE; + debuggingForms = *l; + enableAll( FALSE ); + for ( SourceEditor *e2 = sourceEditors.first(); e2; e2 = sourceEditors.next() ) { + if ( e2->project() == currentProject ) + e2->editorInterface()->setMode( EditorInterface::Debugging ); + } +} + +TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet ) +{ + qwf_execute_code = FALSE; + for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) + e->save(); + if ( currentTool() == ORDER_TOOL ) + resetTool(); + + FormWindow *fw = formWindow(); + if ( !fw ) + return 0; + + TQStringList databases; + TQPtrDictIterator wit( *fw->widgets() ); + while ( wit.current() ) { + TQStringList lst = MetaDataBase::fakeProperty( TQT_TQOBJECT(wit.current()), "database" ).toStringList(); + if ( !lst.isEmpty() ) + databases << lst [ 0 ]; + ++wit; + } + + if ( fw->project() ) { + TQStringList::ConstIterator it; + for ( it = databases.begin(); it != databases.end(); ++it ) + fw->project()->openDatabase( *it, FALSE ); + } + TQApplication::setOverrideCursor( WaitCursor ); + + TQCString s; + TQBuffer buffer( s ); + buffer.open( IO_WriteOnly ); + Resource resource( this ); + resource.setWidget( fw ); + TQValueList images; + resource.save( TQT_TQIODEVICE(&buffer) ); + + buffer.close(); + buffer.open( IO_ReadOnly ); + + TQWidget *w = TQWidgetFactory::create( TQT_TQIODEVICE(&buffer) ); + if ( w ) { + previewedForm = w; + if ( palet ) { + if ( style ) + style->polish( *palet ); + w->setPalette( *palet ); + } + + if ( style ) + w->setStyle( style ); + + TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); + for ( TQObject *o = l->first(); o; o = l->next() ) { + if ( style ) + ( (TQWidget*)o )->setStyle( style ); + } + delete l; + + w->move( fw->mapToGlobal( TQPoint(0,0) ) ); + ((MainWindow*)w )->setWFlags( WDestructiveClose ); + previewing = TRUE; + w->show(); + previewing = FALSE; + TQApplication::restoreOverrideCursor(); + return w; + } + TQApplication::restoreOverrideCursor(); + return 0; +} + +void MainWindow::previewForm() +{ + TQWidget* w = previewFormInternal(); + if ( w ) + w->show(); +} + +void MainWindow::previewForm( const TQString & style ) +{ + TQStyle* st = TQStyleFactory::create( style ); + TQWidget* w = 0; + if ( style == "Motif" ) { + TQPalette p( TQColor( 192, 192, 192 ) ); + w = previewFormInternal( st, &p ); + } else if ( style == "Windows" ) { + TQPalette p( TQColor( 212, 208, 200 ) ); + w = previewFormInternal( st, &p ); + } else if ( style == "Platinum" ) { + TQPalette p( TQColor( 220, 220, 220 ) ); + w = previewFormInternal( st, &p ); + } else if ( style == "CDE" ) { + TQPalette p( TQColor( 75, 123, 130 ) ); + p.setColor( TQPalette::Active, TQColorGroup::Base, TQColor( 55, 77, 78 ) ); + p.setColor( TQPalette::Inactive, TQColorGroup::Base, TQColor( 55, 77, 78 ) ); + p.setColor( TQPalette::Disabled, TQColorGroup::Base, TQColor( 55, 77, 78 ) ); + p.setColor( TQPalette::Active, TQColorGroup::Highlight, TQt::white ); + p.setColor( TQPalette::Active, TQColorGroup::HighlightedText, TQColor( 55, 77, 78 ) ); + p.setColor( TQPalette::Inactive, TQColorGroup::Highlight, TQt::white ); + p.setColor( TQPalette::Inactive, TQColorGroup::HighlightedText, TQColor( 55, 77, 78 ) ); + p.setColor( TQPalette::Disabled, TQColorGroup::Highlight, TQt::white ); + p.setColor( TQPalette::Disabled, TQColorGroup::HighlightedText, TQColor( 55, 77, 78 ) ); + p.setColor( TQPalette::Active, TQColorGroup::Foreground, TQt::white ); + p.setColor( TQPalette::Active, TQColorGroup::Text, TQt::white ); + p.setColor( TQPalette::Active, TQColorGroup::ButtonText, TQt::white ); + p.setColor( TQPalette::Inactive, TQColorGroup::Foreground, TQt::white ); + p.setColor( TQPalette::Inactive, TQColorGroup::Text, TQt::white ); + p.setColor( TQPalette::Inactive, TQColorGroup::ButtonText, TQt::white ); + p.setColor( TQPalette::Disabled, TQColorGroup::Foreground, TQt::lightGray ); + p.setColor( TQPalette::Disabled, TQColorGroup::Text, TQt::lightGray ); + p.setColor( TQPalette::Disabled, TQColorGroup::ButtonText, TQt::lightGray ); + + w = previewFormInternal( st, &p ); + } else if ( style == "SGI" ) { + TQPalette p( TQColor( 220, 220, 220 ) ); + w = previewFormInternal( st, &p ); + } else if ( style == "MotifPlus" ) { + TQColor gtkfg(0x00, 0x00, 0x00); + TQColor gtkdf(0x75, 0x75, 0x75); + TQColor gtksf(0xff, 0xff, 0xff); + TQColor gtkbs(0xff, 0xff, 0xff); + TQColor gtkbg(0xd6, 0xd6, 0xd6); + TQColor gtksl(0x00, 0x00, 0x9c); + TQColorGroup active(gtkfg, // foreground + gtkbg, // button + gtkbg.light(), // light + gtkbg.dark(142), // dark + gtkbg.dark(110), // mid + gtkfg, // text + gtkfg, // bright text + gtkbs, // base + gtkbg), // background + disabled(gtkdf, // foreground + gtkbg, // button + gtkbg.light(), // light + gtkbg.dark(156), // dark + gtkbg.dark(110), // mid + gtkdf, // text + gtkdf, // bright text + gtkbs, // base + gtkbg); // background + + TQPalette pal(active, disabled, active); + + pal.setColor(TQPalette::Active, TQColorGroup::Highlight, + gtksl); + pal.setColor(TQPalette::Active, TQColorGroup::HighlightedText, + gtksf); + pal.setColor(TQPalette::Inactive, TQColorGroup::Highlight, + gtksl); + pal.setColor(TQPalette::Inactive, TQColorGroup::HighlightedText, + gtksf); + pal.setColor(TQPalette::Disabled, TQColorGroup::Highlight, + gtksl); + pal.setColor(TQPalette::Disabled, TQColorGroup::HighlightedText, + gtkdf); + w = previewFormInternal( st, &pal ); + } else { + w = previewFormInternal( st ); + } + + if ( !w ) + return; + w->insertChild( TQT_TQOBJECT(st) ); + w->show(); +} + +void MainWindow::helpContents() +{ + TQWidget *focusWidget = tqApp->focusWidget(); + bool showClassDocu = TRUE; + while ( focusWidget ) { + if ( focusWidget->isA( "PropertyList" ) ) { + showClassDocu = FALSE; + break; + } + focusWidget = focusWidget->parentWidget(); + } + + TQString source = "designer-manual.html"; + if ( propertyDocumentation.isEmpty() ) { + TQString indexFile = documentationPath() + "/propertyindex"; + TQFile f( indexFile ); + if ( f.open( IO_ReadOnly ) ) { + TQTextStream ts( &f ); + while ( !ts.eof() ) { + TQString s = ts.readLine(); + int from = s.find( "\"" ); + if ( from == -1 ) + continue; + int to = s.findRev( "\"" ); + if ( to == -1 ) + continue; + propertyDocumentation[ s.mid( from + 1, to - from - 1 ) ] = s.mid( to + 2 ) + "-prop"; + } + f.close(); + } + } + + if ( propertyEditor->widget() && !showClassDocu ) { + if ( !propertyEditor->currentProperty().isEmpty() ) { + TQMetaObject* mo = propertyEditor->metaObjectOfCurrentProperty(); + TQString s; + TQString cp = propertyEditor->currentProperty(); + if ( cp == "layoutMargin" ) { + source = propertyDocumentation[ "TQLayout/margin" ]; + } else if ( cp == "layoutSpacing" ) { + source = propertyDocumentation[ "TQLayout/spacing" ]; + } else if ( cp == "toolTip" ) { + source = "tqtooltip.html#details"; + } else if ( mo && qstrcmp( mo->className(), "Spacer" ) == 0 ) { + if ( cp != "name" ) + source = "tqsizepolicy.html#SizeType"; + else + source = propertyDocumentation[ "TQObject/name" ]; + } else { + while ( mo && !propertyDocumentation.contains( ( s = TQString( mo->className() ) + "/" + cp ) ) ) + mo = mo->superClass(); + if ( mo ) + source = "p:" + propertyDocumentation[s]; + } + } + + TQString classname = WidgetFactory::classNameOf( propertyEditor->widget() ); + if ( source.isEmpty() || source == "designer-manual.html" ) { + if ( classname.lower() == "spacer" ) + source = "qspaceritem.html#details"; + else if ( classname == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) + source = "layout.html"; + else + source = TQString( WidgetFactory::classNameOf( propertyEditor->widget() ) ).lower() + ".html#details"; + } + } else if ( propertyEditor->widget() ) { + source = TQString( WidgetFactory::classNameOf( propertyEditor->widget() ) ).lower() + ".html#details"; + } + + if ( !source.isEmpty() ) + assistant->showPage( documentationPath() + source ); +} + +void MainWindow::helpManual() +{ + assistant->showPage( documentationPath() + "/designer-manual.html" ); +} + +void MainWindow::helpAbout() +{ + AboutDialog dlg( this, 0, TRUE ); + if ( singleProjectMode() ) { + dlg.aboutPixmap->setText( "" ); + dlg.aboutVersion->setText( "" ); + dlg.aboutCopyright->setText( "" ); + LanguageInterface *iface = MetaDataBase::languageInterface( eProject->language() ); + dlg.aboutLicense->setText( iface->aboutText() ); + } + dlg.aboutVersion->setText(TQString("Version ") + TQString(TQT_VERSION_STR)); + dlg.resize( dlg.width(), dlg.layout()->heightForWidth(dlg.width()) ); + dlg.exec(); +} + +void MainWindow::helpAboutQt() +{ + TQMessageBox::aboutTQt( this, "TQt Designer" ); +} + +#if defined(_WS_WIN_) +#include +#include +#endif + +void MainWindow::helpRegister() +{ +#if defined(_WS_WIN_) + HKEY key; + HKEY subkey; + long res; + DWORD type; + DWORD size = 255; + TQString command; + TQString sub( "htmlfile\\shell" ); +#if defined(UNICODE) + if ( TQApplication::winVersion() & TQt::WV_NT_based ) { + unsigned char data[256]; + res = RegOpenKeyExW( HKEY_CLASSES_ROOT, NULL, 0, KEY_READ, &key ); + res = RegOpenKeyExW( key, (TCHAR*)sub.ucs2(), 0, KEY_READ, &subkey ); + res = RegQueryValueExW( subkey, NULL, NULL, &type, data, &size ); + command = qt_winTQString( data ) + "\\command"; + size = 255; + res = RegOpenKeyExW( subkey, (TCHAR*)command.ucs2(), 0, KEY_READ, &subkey ); + res = RegQueryValueExW( subkey, NULL, NULL, &type, data, &size ); + command = qt_winTQString( data ); + } else +#endif + { + unsigned char data[256]; + res = RegOpenKeyExA( HKEY_CLASSES_ROOT, NULL, 0, KEY_READ, &key ); + res = RegOpenKeyExA( key, sub.local8Bit(), 0, KEY_READ, &subkey ); + res = RegQueryValueExA( subkey, NULL, NULL, &type, data, &size ); + command = TQString::fromLocal8Bit( (const char*) data ) + "\\command"; + size = 255; + res = RegOpenKeyExA( subkey, command.local8Bit(), 0, KEY_READ, &subkey ); + res = RegQueryValueExA( subkey, NULL, NULL, &type, data, &size ); + command = TQString::fromLocal8Bit( (const char*) data ); + } + + res = RegCloseKey( subkey ); + res = RegCloseKey( key ); + + TQProcess process( command + " www.trolltech.com/products/download/eval/evaluation.html" ); + if ( !process.start() ) + TQMessageBox::information( this, "Register TQt", "Launching your web browser failed.\n" + "To register TQt, point your browser to www.trolltech.com/products/download/eval/evaluation.html" ); +#endif +} + +void MainWindow::showProperties( TQObject *o ) +{ + if ( !o->isWidgetType() ) { + propertyEditor->setWidget( o, lastActiveFormWindow ); + if ( lastActiveFormWindow ) + hierarchyView->setFormWindow( lastActiveFormWindow, TQT_TQOBJECT(lastActiveFormWindow->mainContainer()) ); + else + hierarchyView->setFormWindow( 0, 0 ); + return; + } + TQWidget *w = (TQWidget*)o; + setupHierarchyView(); + FormWindow *fw = (FormWindow*)isAFormWindowChild( TQT_TQOBJECT(w) ); + if ( fw ) { + if ( fw->numSelectedWidgets() > 1 ) { + TQWidgetList wl = fw->selectedWidgets(); + if ( wl.first() != w ) { + wl.removeRef( w ); + wl.insert( 0, w ); + } + propertyEditor->setWidget( new PropertyObject( wl ), fw ); + } else { + propertyEditor->setWidget( TQT_TQOBJECT(w), fw ); + } + hierarchyView->setFormWindow( fw, TQT_TQOBJECT(w) ); + } else { + propertyEditor->setWidget( 0, 0 ); + hierarchyView->setFormWindow( 0, 0 ); + } + + if ( currentTool() == POINTER_TOOL && fw && + ( !qworkspace->activeWindow() || !::tqqt_cast(qworkspace->activeWindow()) ) ) + fw->setFocus(); +} + +void MainWindow::resetTool() +{ + actionPointerTool->setOn( TRUE ); +} + +void MainWindow::updateProperties( TQObject * ) +{ + if ( propertyEditor ) + propertyEditor->refetchData(); +} + +bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) +{ + if ( ::tqqt_cast(o) || ::tqqt_cast(o) || + ( o && + ( ::tqqt_cast(o->parent()) || + ::tqqt_cast(o->parent()) ) ) ) { + + if ( e->type() == TQEvent::Accel && ::tqqt_cast(o) ) { + return TRUE; // consume accel events + } else if ( e->type() == TQEvent::MouseButtonPress && ::tqqt_cast(o) ) { + TQPoint pos = ((TQMouseEvent*)e)->pos(); + MenuBarEditor *m = ::tqqt_cast(o); + showProperties( o ); + if ( m->findItem( pos ) >= m->count() ) + m->setFocus(); + } else if ( e->type() == TQEvent::MouseButtonPress && ::tqqt_cast(o) ) { + PopupMenuEditor *m = ::tqqt_cast(o); + PopupMenuEditorItem *i = m->at( ((TQMouseEvent*)e)->pos() ); + if ( m->find( i->action() ) != -1 && !i->isSeparator() ) + showProperties( i->action() ); + } + return TQMainWindow::eventFilter( o, e ); + } + + if ( !o || !e || !o->isWidgetType() ) + return TQMainWindow::eventFilter( o, e ); + + TQWidget *w = 0; + bool passiveInteractor; + switch ( e->type() ) { + case TQEvent::AccelOverride: + if ( ( (TQKeyEvent*)e )->key() == Key_F1 && + ( ( (TQKeyEvent*)e )->state() & ShiftButton ) != ShiftButton ) { + w = (TQWidget*)o; + while ( w ) { + if ( ::tqqt_cast(w) ) + break; + w = w->parentWidget( TRUE ); + } + if ( w ) { + propertyEditor->propertyList()->showCurrentWhatsThis(); + ( (TQKeyEvent*)e )->accept(); + return TRUE; + } + } + break; + case TQEvent::Accel: + if ( ( ( (TQKeyEvent*)e )->key() == Key_A || + ( (TQKeyEvent*)e )->key() == Key_E ) && + ( (TQKeyEvent*)e )->state() & ControlButton ) { + if ( qWorkspace()->activeWindow() && + ::tqqt_cast(qWorkspace()->activeWindow()) ) { + ( (TQKeyEvent*)e )->ignore(); + return TRUE; + } + } + break; + case TQEvent::ContextMenu: + case TQEvent::MouseButtonPress: + if ( o && currentTool() == POINTER_TOOL && + ( ::tqqt_cast(o) || + ::tqqt_cast(o) || + ::tqqt_cast(o) || + ( ::tqqt_cast(o) || + ::tqqt_cast(o) || + ::tqqt_cast(o) ) && + o->parent() + && ( ::tqqt_cast(o->parent()) + || ::tqqt_cast(o->parent())) ) ) { + TQWidget *w = (TQWidget*)o; + if ( ::tqqt_cast(w) || + ::tqqt_cast(w) || + ::tqqt_cast(w) || + ::tqqt_cast(w) ) + w = w->parentWidget(); + TQWidget *pw = w->parentWidget(); + while ( pw ) { + if ( ::tqqt_cast(pw) ) { + ( (FormWindow*)pw )->emitShowProperties( TQT_TQOBJECT(w) ); + if ( !::tqqt_cast(o) ) + return ( !::tqqt_cast(o) && + !::tqqt_cast(o) && + !::tqqt_cast(o) && + !::tqqt_cast(o) ); + } + pw = pw->parentWidget(); + } + } + if ( o && ( ::tqqt_cast(o) || o->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) ) + && e->type() == TQEvent::ContextMenu ) + break; + if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL ) + break; + if ( ::tqqt_cast(o) ) + break; + if ( !( w = isAFormWindowChild( o ) ) || + ::tqqt_cast(o) || + ::tqqt_cast(o) ) + break; + if ( !w->hasFocus() ) + w->setFocus(); + passiveInteractor = WidgetFactory::isPassiveInteractor( o ); + if ( !passiveInteractor || currentTool() != ORDER_TOOL ) { + if( e->type() == TQEvent::ContextMenu ) { + ( (FormWindow*)w )->handleContextMenu( (TQContextMenuEvent*)e, + ( (FormWindow*)w )->designerWidget( o ) ); + return TRUE; + } else { + ( (FormWindow*)w )->handleMousePress( (TQMouseEvent*)e, + ( (FormWindow*)w )->designerWidget( o ) ); + } + } + lastPressWidget = (TQWidget*)o; + if ( passiveInteractor ) + TQTimer::singleShot( 0, formWindow(), TQT_SLOT( visibilityChanged() ) ); + if ( currentTool() == CONNECT_TOOL || currentTool() == BUDDY_TOOL ) + return TRUE; + return !passiveInteractor; + case TQEvent::MouseButtonRelease: + lastPressWidget = 0; + if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL ) + break; + if ( ::tqqt_cast(o) ) + break; + if ( !( w = isAFormWindowChild( o ) ) || + ::tqqt_cast(o) || + ::tqqt_cast(o) ) + break; + passiveInteractor = WidgetFactory::isPassiveInteractor( o ); + if ( !passiveInteractor ) + ( (FormWindow*)w )->handleMouseRelease( (TQMouseEvent*)e, + ( (FormWindow*)w )->designerWidget( o ) ); + if ( passiveInteractor ) { + TQTimer::singleShot( 0, this, TQT_SLOT( selectionChanged() ) ); + TQTimer::singleShot( 0, formWindow(), TQT_SLOT( visibilityChanged() ) ); + } + return !passiveInteractor; + case TQEvent::MouseMove: + if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL ) + break; + w = isAFormWindowChild( o ); + if ( lastPressWidget != (TQWidget*)o && w && + !::tqqt_cast(o) && !::tqqt_cast(o) && + !::tqqt_cast(o) && !::tqqt_cast(o) && + !::tqqt_cast(o) ) + return TRUE; + if ( o && ::tqqt_cast(o) ) + break; + if ( lastPressWidget != (TQWidget*)o || + ( !w || ::tqqt_cast(o) ) || + ::tqqt_cast(o) ) + break; + passiveInteractor = WidgetFactory::isPassiveInteractor( o ); + if ( !passiveInteractor ) + ( (FormWindow*)w )->handleMouseMove( (TQMouseEvent*)e, + ( (FormWindow*)w )->designerWidget( o ) ); + return !passiveInteractor; + case TQEvent::KeyPress: + if ( ( (TQKeyEvent*)e )->key() == Key_Escape && currentTool() != POINTER_TOOL ) { + resetTool(); + return FALSE; + } + if ( ( (TQKeyEvent*)e )->key() == Key_Escape && incrementalSearch->hasFocus() ) { + if ( ::tqqt_cast(qWorkspace()->activeWindow()) ) { + qWorkspace()->activeWindow()->setFocus(); + return TRUE; + } + } + if ( !( w = isAFormWindowChild( o ) ) || + ::tqqt_cast(o) || + ::tqqt_cast(o) ) + break; + ( (FormWindow*)w )->handleKeyPress( (TQKeyEvent*)e, ( (FormWindow*)w )->designerWidget( o ) ); + if ( ((TQKeyEvent*)e)->isAccepted() ) + return TRUE; + break; + case TQEvent::MouseButtonDblClick: + if ( !( w = isAFormWindowChild( o ) ) || + ::tqqt_cast(o) || + ::tqqt_cast(o) ) { + if ( ::tqqt_cast(o) && ((TQToolButton*)o)->isOn() && + o->parent() && ::tqqt_cast(o->parent()) && formWindow() ) + formWindow()->setToolFixed(); + break; + } + if ( currentTool() == ORDER_TOOL ) { + ( (FormWindow*)w )->handleMouseDblClick( (TQMouseEvent*)e, + ( (FormWindow*)w )->designerWidget( o ) ); + return TRUE; + } + if ( !WidgetFactory::isPassiveInteractor( o ) && ( (FormWindow*)w )->formFile() ) + return openEditor( ( (FormWindow*)w )->designerWidget( o ), (FormWindow*)w ); + return TRUE; + case TQEvent::KeyRelease: + if ( !( w = isAFormWindowChild( o ) ) || + ::tqqt_cast(o) || + ::tqqt_cast(o) ) + break; + ( (FormWindow*)w )->handleKeyRelease( (TQKeyEvent*)e, ( (FormWindow*)w )->designerWidget( o ) ); + if ( ((TQKeyEvent*)e)->isAccepted() ) + return TRUE; + break; + case TQEvent::Hide: + if ( !( w = isAFormWindowChild( o ) ) || + ::tqqt_cast(o) || + ::tqqt_cast(o) ) + break; + if ( ( (FormWindow*)w )->isWidgetSelected( TQT_TQOBJECT(o) ) ) + ( (FormWindow*)w )->selectWidget( TQT_TQOBJECT(o), FALSE ); + break; + case TQEvent::Enter: + case TQEvent::Leave: + if ( !( w = isAFormWindowChild( o ) ) || + ::tqqt_cast(o) || + ::tqqt_cast(o) || + ::tqqt_cast(o) ) + break; + return TRUE; + case TQEvent::Resize: + case TQEvent::Move: + if ( !( w = isAFormWindowChild( o ) ) || + ::tqqt_cast(o) || + ::tqqt_cast(o) ) + break; + if ( WidgetFactory::layoutType( (TQWidget*)o->parent() ) != WidgetFactory::NoLayout ) { + ( (FormWindow*)w )->updateSelection( (TQWidget*)o ); + if ( e->type() != TQEvent::Resize ) + ( (FormWindow*)w )->updateChildSelections( (TQWidget*)o ); + } + break; + case TQEvent::Close: + if ( o->isWidgetType() && (TQWidget*)o == (TQWidget*)previewedForm ) { + if ( lastActiveFormWindow && lastActiveFormWindow->project() ) { + TQStringList lst = + MetaDataBase::fakeProperty( TQT_TQOBJECT(lastActiveFormWindow), "database" ).toStringList(); + lastActiveFormWindow->project()->closeDatabase( lst[ 0 ] ); + } + } + break; + case TQEvent::DragEnter: + if ( TQT_BASE_OBJECT(o) == qWorkspace() || TQT_BASE_OBJECT(o) == workspace() || TQT_BASE_OBJECT(o) == workspace()->viewport() ) { + workspace()->contentsDragEnterEvent( (TQDragEnterEvent*)e ); + return TRUE; + } + break; + case TQEvent::DragMove: + if ( TQT_BASE_OBJECT(o) == qWorkspace() || TQT_BASE_OBJECT(o) == workspace() || TQT_BASE_OBJECT(o) == workspace()->viewport() ) { + workspace()->contentsDragMoveEvent( (TQDragMoveEvent*)e ); + return TRUE; + } + break; + case TQEvent::Drop: + if ( TQT_BASE_OBJECT(o) == qWorkspace() || TQT_BASE_OBJECT(o) == workspace() || TQT_BASE_OBJECT(o) == workspace()->viewport() ) { + workspace()->contentsDropEvent( (TQDropEvent*)e ); + return TRUE; + } + break; + case TQEvent::Show: + if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this) ) + break; + if ( ((TQShowEvent*)e)->spontaneous() ) + break; + TQApplication::sendPostedEvents( qworkspace, TQEvent::ChildInserted ); + showEvent( (TQShowEvent*)e ); + checkTempFiles(); + return TRUE; + case TQEvent::Wheel: + if ( !( w = isAFormWindowChild( o ) ) || + ::tqqt_cast(o) || + ::tqqt_cast(o) ) + break; + return TRUE; + case TQEvent::FocusIn: + if ( !::tqqt_cast(o) && isAFormWindowChild( o ) ) + return TRUE; //FIXME + if ( hierarchyView->formDefinitionView()->isRenaming() + && ( o->inherits( "Editor" ) || ::tqqt_cast(o) ) ) + TQApplication::sendPostedEvents(); + if ( o->inherits( "Editor" ) ) { + TQWidget *w = (TQWidget*)o; + while ( w ) { + if ( ::tqqt_cast(w) ) + break; + w = w->parentWidget( TRUE ); + } + if ( ::tqqt_cast(w) ) + ( (SourceEditor*)w )->checkTimeStamp(); + } else if ( ::tqqt_cast(o) ) { + FormWindow *fw = (FormWindow*)o; + if ( fw->formFile() && fw->formFile()->editor() ) + fw->formFile()->editor()->checkTimeStamp(); + } + break; + case TQEvent::FocusOut: + if ( !::tqqt_cast(o) && isAFormWindowChild( o ) ) + return TRUE; + break; + default: + return TQMainWindow::eventFilter( o, e ); + } + + return TQMainWindow::eventFilter( o, e ); +} + +TQWidget *MainWindow::isAFormWindowChild( TQObject *o ) const +{ + if ( ::tqqt_cast(o->parent()) && !::tqqt_cast(o) ) + return 0; + while ( o ) { + if ( ::tqqt_cast(o) ) + return (TQWidget*)o; + o = o->parent(); + } + return 0; +} + +TQWidget *MainWindow::isAToolBarChild( TQObject *o ) const +{ + while ( o ) { + if ( ::tqqt_cast(o) ) + return (TQWidget*)o; + if ( ::tqqt_cast(o) ) + return 0; + o = o->parent(); + } + return 0; +} + +FormWindow *MainWindow::formWindow() +{ + if ( qworkspace->activeWindow() ) { + FormWindow *fw = 0; + if ( ::tqqt_cast(qworkspace->activeWindow()) ) + fw = (FormWindow*)qworkspace->activeWindow(); + else if ( lastActiveFormWindow && + qworkspace->windowList().find( lastActiveFormWindow ) != -1) + fw = lastActiveFormWindow; + return fw; + } + return 0; +} + +void MainWindow::emitProjectSignals() +{ + emit hasNonDummyProject( !currentProject->isDummy() ); + emit hasActiveWindowOrProject( !!qworkspace->activeWindow() || !currentProject->isDummy() ); +} + +void MainWindow::insertFormWindow( FormWindow *fw ) +{ + if ( fw ) + TQWhatsThis::add( fw, i18n( "The Form Window" + "

Use the various tools to add widgets or to change the layout " + "and behavior of the components in the form. Select one or multiple " + "widgets to move them or lay them out. If a single widget is chosen it can " + "be resized using the resize handles.

" + "

Changes in the Property Editor are visible at design time, " + "and you can preview the form in different styles.

" + "

You can change the grid resolution, or turn the grid off in the " + "Preferences dialog in the Edit menu." + "

You can have several forms open, and all open forms are listed " + "in the Form List.") ); + + connect( fw, TQT_SIGNAL( showProperties( TQObject * ) ), + this, TQT_SLOT( showProperties( TQObject * ) ) ); + connect( fw, TQT_SIGNAL( updateProperties( TQObject * ) ), + this, TQT_SLOT( updateProperties( TQObject * ) ) ); + connect( this, TQT_SIGNAL( currentToolChanged() ), + fw, TQT_SLOT( currentToolChanged() ) ); + connect( fw, TQT_SIGNAL( selectionChanged() ), + this, TQT_SLOT( selectionChanged() ) ); + connect( fw, TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ), + this, TQT_SLOT( updateUndoRedo( bool, bool, const TQString &, const TQString & ) ) ); + + if ( !mblockNewForms ) { + } else { + fw->setProject( currentProject ); + } + fw->show(); + fw->currentToolChanged(); + if ( fw->caption().isEmpty() && tqstrlen( fw->name() ) ) + fw->setCaption( fw->name() ); + fw->mainContainer()->setCaption( fw->caption() ); + WidgetFactory::saveDefaultProperties( TQT_TQOBJECT(fw->mainContainer()), + WidgetDatabase:: + idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(fw->mainContainer()) ) ) ); + activeWindowChanged( fw ); + emit formWindowsChanged(); + for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { + if ( e->project() == fw->project() ) + e->resetContext(); + } +} + +void MainWindow::createNewProject( const TQString &lang ) +{ + Project *pro = new Project( "", "", projectSettingsPluginManager ); + pro->setLanguage( lang ); + + + if ( !openProjectSettings( pro ) ) { + delete pro; + return; + } + + if ( !pro->isValid() ) { + TQMessageBox::information( this, i18n("New Project"), i18n( "Cannot create an invalid project." ) ); + delete pro; + return; + } + + TQAction *a = new TQAction( pro->makeRelative( pro->fileName() ), + pro->makeRelative( pro->fileName() ), 0, actionGroupProjects, 0, TRUE ); + projects.insert( a, pro ); + addRecentlyOpened( pro->makeAbsolute( pro->fileName() ), recentlyProjects ); + projectSelected( a ); +} + + +bool MainWindow::unregisterClient( FormWindow *w ) +{ + propertyEditor->closed( w ); + objectHierarchy()->closed( w ); + if ( w == lastActiveFormWindow ) + lastActiveFormWindow = 0; + + TQPtrList waitingForDelete; + waitingForDelete.setAutoDelete( TRUE ); + for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { + if ( TQT_BASE_OBJECT(e->object()) == TQT_BASE_OBJECT(w) ) + waitingForDelete.append( e ); + } + + if ( actionEditor->form() == w ) { + actionEditor->setFormWindow( 0 ); + actionEditor->parentWidget()->hide(); + } + + return TRUE; +} + +void MainWindow::activeWindowChanged( TQWidget *w ) +{ + TQWidget *old = formWindow(); + if ( ::tqqt_cast(w) ) { + FormWindow *fw = (FormWindow*)w; + FormWindow *ofw = lastActiveFormWindow; + lastActiveFormWindow = fw; + lastActiveFormWindow->updateUndoInfo(); + emit hasActiveForm( TRUE ); + if ( formWindow() ) { + formWindow()->emitShowProperties(); + emit formModified( formWindow()->commandHistory()->isModified() ); + if ( currentTool() != POINTER_TOOL ) + formWindow()->clearSelection(); + } + workspace()->activeFormChanged( fw ); + setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), + ::tqqt_cast(lastActiveFormWindow->mainContainer()) ); + if ( appropriate( (TQDockWindow*)actionEditor->parentWidget() ) ) { + if ( actionEditor->wantToBeShown() ) + actionEditor->parentWidget()->show(); + } else { + TQWidget *mc = 0; + if ( ofw && (mc = ofw->mainContainer()) && ::tqqt_cast(mc) ) + actionEditor->setWantToBeShown( !actionEditor->parentWidget()->isHidden() ); + actionEditor->parentWidget()->hide(); + } + + actionEditor->setFormWindow( lastActiveFormWindow ); + if ( wspace && fw->project() && fw->project() != currentProject ) { + for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) { + if ( *it == fw->project() ) { + projectSelected( it.key() ); + break; + } + } + } + emit formWindowChanged(); + + } else if ( w == propertyEditor ) { + propertyEditor->resetFocus(); + } else if ( !lastActiveFormWindow ) { + emit formWindowChanged(); + emit hasActiveForm( FALSE ); + actionEditUndo->setEnabled( FALSE ); + actionEditRedo->setEnabled( FALSE ); + } + + if ( !w ) { + emit formWindowChanged(); + emit hasActiveForm( FALSE ); + propertyEditor->clear(); + hierarchyView->clear(); + updateUndoRedo( FALSE, FALSE, TQString(), TQString() ); + } + + selectionChanged(); + + if ( ::tqqt_cast(w) ) { + SourceEditor *se = (SourceEditor*)w; + TQGuardedPtr fw = se->formWindow(); + if ( se->formWindow() && + lastActiveFormWindow != fw ) { + activeWindowChanged( se->formWindow() ); + } + actionSearchFind->setEnabled( TRUE ); + actionSearchIncremetal->setEnabled( TRUE ); + actionSearchReplace->setEnabled( TRUE ); + actionSearchGotoLine->setEnabled( TRUE ); + incrementalSearch->setEnabled( TRUE ); + + actionEditUndo->setEnabled( FALSE ); + actionEditRedo->setEnabled( FALSE ); + actionEditCut->setEnabled( TRUE ); + actionEditCopy->setEnabled( TRUE ); + actionEditPaste->setEnabled( TRUE ); + actionEditSelectAll->setEnabled( TRUE ); + actionEditUndo->setMenuText( i18n( "&Undo" ) ); + actionEditUndo->setToolTip( textNoAccel( actionEditUndo->menuText()) ); + actionEditRedo->setMenuText( i18n( "&Redo" ) ); + actionEditRedo->setToolTip( textNoAccel( actionEditRedo->menuText()) ); + if ( hierarchyView->sourceEditor() != w ) + hierarchyView->showClasses( se ); + actionEditor->setFormWindow( 0 ); + if ( wspace && se->project() && se->project() != currentProject ) { + for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) { + if ( *it == se->project() ) { + projectSelected( it.key() ); + break; + } + } + } + workspace()->activeEditorChanged( se ); + } else { + actionSearchFind->setEnabled( FALSE ); + actionSearchIncremetal->setEnabled( FALSE ); + actionSearchReplace->setEnabled( FALSE ); + actionSearchGotoLine->setEnabled( FALSE ); + incrementalSearch->setEnabled( FALSE ); + } + + if ( currentTool() == ORDER_TOOL && w != old ) + emit currentToolChanged(); + + emit hasActiveWindow( !!qworkspace->activeWindow() ); +} + +void MainWindow::updateUndoRedo( bool undoAvailable, bool redoAvailable, + const TQString &undoCmd, const TQString &redoCmd ) +{ + if ( qWorkspace()->activeWindow() && + ::tqqt_cast(qWorkspace()->activeWindow()) ) + return; // do not set a formWindow related command + actionEditUndo->setEnabled( undoAvailable ); + actionEditRedo->setEnabled( redoAvailable ); + if ( !undoCmd.isEmpty() ) + actionEditUndo->setMenuText( i18n( "&Undo: %1" ).arg( undoCmd ) ); + else + actionEditUndo->setMenuText( i18n( "&Undo: Not Available" ) ); + if ( !redoCmd.isEmpty() ) + actionEditRedo->setMenuText( i18n( "&Redo: %1" ).arg( redoCmd ) ); + else + actionEditRedo->setMenuText( i18n( "&Redo: Not Available" ) ); + + actionEditUndo->setToolTip( textNoAccel( actionEditUndo->menuText()) ); + actionEditRedo->setToolTip( textNoAccel( actionEditRedo->menuText()) ); + + if ( currentTool() == ORDER_TOOL ) { + actionEditUndo->setEnabled( FALSE ); + actionEditRedo->setEnabled( FALSE ); + } +} + +void MainWindow::updateEditorUndoRedo() +{ + if ( !qWorkspace()->activeWindow() || + !::tqqt_cast(qWorkspace()->activeWindow()) ) + return; + SourceEditor *editor = (SourceEditor*)qWorkspace()->activeWindow(); + actionEditUndo->setEnabled( editor->editIsUndoAvailable() ); + actionEditRedo->setEnabled( editor->editIsRedoAvailable() ); +} + +TQWorkspace *MainWindow::qWorkspace() const +{ + return qworkspace; +} + +void MainWindow::popupFormWindowMenu( const TQPoint & gp, FormWindow *fw ) +{ + TQValueList ids; + TQMap commands; + + setupRMBSpecialCommands( ids, commands, fw ); + setupRMBProperties( ids, commands, fw ); + + tqApp->processEvents(); + int r = rmbFormWindow->exec( gp ); + + handleRMBProperties( r, commands, fw ); + handleRMBSpecialCommands( r, commands, fw ); + + for ( TQValueList::ConstIterator i = ids.begin(); i != ids.end(); ++i ) + rmbFormWindow->removeItem( *i ); +} + +void MainWindow::popupWidgetMenu( const TQPoint &gp, FormWindow * /*fw*/, TQWidget * w) +{ + TQValueList ids; + TQMap commands; + + setupRMBSpecialCommands( ids, commands, w ); + setupRMBProperties( ids, commands, w ); + + tqApp->processEvents(); + int r = rmbWidgets->exec( gp ); + + handleRMBProperties( r, commands, w ); + handleRMBSpecialCommands( r, commands, w ); + + for ( TQValueList::ConstIterator i = ids.begin(); i != ids.end(); ++i ) + rmbWidgets->removeItem( *i ); +} + +void MainWindow::setupRMBProperties( TQValueList &ids, TQMap &props, TQWidget *w ) +{ + const TQMetaProperty* text = w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE ); + if ( text && qstrcmp( text->type(), TQSTRING_OBJECT_NAME_STRING) != 0 ) + text = 0; + const TQMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), TRUE ); + if ( title && qstrcmp( title->type(), TQSTRING_OBJECT_NAME_STRING) != 0 ) + title = 0; + const TQMetaProperty* pagetitle = + w->metaObject()->property( w->metaObject()->findProperty( "pageTitle", TRUE ), TRUE ); + if ( pagetitle && qstrcmp( pagetitle->type(), TQSTRING_OBJECT_NAME_STRING) != 0 ) + pagetitle = 0; + const TQMetaProperty* pixmap = + w->metaObject()->property( w->metaObject()->findProperty( "pixmap", TRUE ), TRUE ); + if ( pixmap && qstrcmp( pixmap->type(), TQPIXMAP_OBJECT_NAME_STRING) != 0 ) + pixmap = 0; + + if ( text && text->designable(w) || + title && title->designable(w) || + pagetitle && pagetitle->designable(w) || + pixmap && pixmap->designable(w) ) { + int id = 0; + if ( ids.isEmpty() ) + ids << rmbWidgets->insertSeparator(0); + if ( pixmap && pixmap->designable(w) ) { + ids << ( id = rmbWidgets->insertItem( i18n("Choose Pixmap..."), -1, 0) ); + props.insert( "pixmap", id ); + } + if ( text && text->designable(w) && !::tqqt_cast(w) ) { + ids << ( id = rmbWidgets->insertItem( i18n("Edit Text..."), -1, 0) ); + props.insert( "text", id ); + } + if ( title && title->designable(w) ) { + ids << ( id = rmbWidgets->insertItem( i18n("Edit Title..."), -1, 0) ); + props.insert( "title", id ); + } + if ( pagetitle && pagetitle->designable(w) ) { + ids << ( id = rmbWidgets->insertItem( i18n("Edit Page Title..."), -1, 0) ); + props.insert( "pagetitle", id ); + } + } +} + +#ifdef TQT_CONTAINER_CUSTOM_WIDGETS +static TQWidgetContainerInterfacePrivate *containerWidgetInterface( TQWidget *w ) +{ + WidgetInterface *iface = 0; + widgetManager()->queryInterface( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ), &iface ); + if ( !iface ) + return 0; + TQWidgetContainerInterfacePrivate *iface2 = 0; + iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 ); + if ( !iface2 ) + return 0; + iface->release(); + return iface2; +} +#endif + +void MainWindow::setupRMBSpecialCommands( TQValueList &ids, + TQMap &commands, TQWidget *w ) +{ + int id; + + if ( ::tqqt_cast(w) ) { + if ( ids.isEmpty() ) + ids << rmbWidgets->insertSeparator( 0 ); + if ( ( (QDesignerTabWidget*)w )->count() > 1) { + ids << ( id = rmbWidgets->insertItem( i18n("Delete Page"), -1, 0 ) ); + commands.insert( "remove", id ); + } + ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) ); + commands.insert( "add", id ); + } else if ( ::tqqt_cast(w) ) { + if ( ids.isEmpty() ) + ids << rmbWidgets->insertSeparator( 0 ); + if ( ( (QDesignerWidgetStack*)w )->count() > 1) { + ids << ( id = rmbWidgets->insertItem( i18n("Previous Page"), -1, 0 ) ); + commands.insert( "prevpage", id ); + ids << ( id = rmbWidgets->insertItem( i18n("Next Page"), -1, 0 ) ); + ids << rmbWidgets->insertSeparator( 0 ); + commands.insert( "nextpage", id ); + ids << ( id = rmbWidgets->insertItem( i18n("Delete Page"), -1, 0 ) ); + commands.insert( "remove", id ); + } + ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) ); + commands.insert( "add", id ); + } else if ( ::tqqt_cast(w) ) { + if ( ids.isEmpty() ) + ids << rmbWidgets->insertSeparator( 0 ); + if ( ( (TQToolBox*)w )->count() > 1 ) { + ids << ( id = rmbWidgets->insertItem( i18n("Delete Page"), -1, 0 ) ); + commands.insert( "remove", id ); + } + ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) ); + commands.insert( "add", id ); +#ifdef TQT_CONTAINER_CUSTOM_WIDGETS + } else if ( WidgetDatabase:: + isCustomPluginWidget( WidgetDatabase:: + idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) { + TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w ); + if ( iface && iface->supportsPages( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) { + if ( ids.isEmpty() ) + ids << rmbWidgets->insertSeparator( 0 ); + + if ( iface->count( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ), w ) > 1 ) { + ids << ( id = rmbWidgets->insertItem( i18n( "Delete Page" ), -1, 0 ) ); + commands.insert( "remove", id ); + } + ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) ); + commands.insert( "add", id ); + if ( iface->currentIndex( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ), w ) != -1 ) { + ids << ( id = rmbWidgets->insertItem( i18n("Rename Current Page..."), -1, 0 ) ); + commands.insert( "rename", id ); + } + } + if ( iface ) + iface->release(); +#endif // TQT_CONTAINER_CUSTOM_WIDGETS + } + + if ( WidgetFactory::hasSpecialEditor( WidgetDatabase:: + idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) { + if ( ids.isEmpty() ) + ids << rmbWidgets->insertSeparator( 0 ); + ids << ( id = rmbWidgets->insertItem( i18n("Edit..."), -1, 0 ) ); + commands.insert( "edit", id ); + } +} + +void MainWindow::setupRMBSpecialCommands( TQValueList &ids, + TQMap &commands, FormWindow *fw ) +{ + int id; + + if ( ::tqqt_cast(fw->mainContainer()) ) { + if ( ids.isEmpty() ) + ids << rmbFormWindow->insertSeparator( 0 ); + + if ( ( (TQWizard*)fw->mainContainer() )->pageCount() > 1) { + ids << ( id = rmbFormWindow->insertItem( i18n("Delete Page"), -1, 0 ) ); + commands.insert( "remove", id ); + } + + ids << ( id = rmbFormWindow->insertItem( i18n("Add Page"), -1, 0 ) ); + commands.insert( "add", id ); + + ids << ( id = rmbFormWindow->insertItem( i18n("Edit Page Title..."), -1, 0 ) ); + commands.insert( "rename", id ); + + ids << ( id = rmbFormWindow->insertItem( i18n("Edit Pages..."), -1, 0 ) ); + commands.insert( "edit", id ); + + } else if ( ::tqqt_cast(fw->mainContainer()) ) { + if ( ids.isEmpty() ) + ids << rmbFormWindow->insertSeparator( 0 ); + ids << ( id = rmbFormWindow->insertItem( i18n( "Add Menu Item" ), -1, 0 ) ); + commands.insert( "add_menu_item", id ); + ids << ( id = rmbFormWindow->insertItem( i18n( "Add Toolbar" ), -1, 0 ) ); + commands.insert( "add_toolbar", id ); + } +} + +void MainWindow::handleRMBProperties( int id, TQMap &props, TQWidget *w ) +{ + if ( id == props[ "text" ] ) { + bool ok = FALSE; + bool oldDoWrap = FALSE; + if ( ::tqqt_cast(w) ) { + int align = w->property( "alignment" ).toInt(); + if ( align & WordBreak ) + oldDoWrap = TRUE; + } + bool doWrap = oldDoWrap; + + TQString text; + if ( ::tqqt_cast(w) || ::tqqt_cast(w) || ::tqqt_cast(w) ) { + text = MultiLineEditor::getText( this, w->property( "text" ).toString(), !::tqqt_cast(w), &doWrap ); + ok = !text.isNull(); + } else { + text = TQInputDialog::getText( i18n("Text"), i18n( "New text" ), + TQLineEdit::Normal, w->property("text").toString(), &ok, this ); + } + if ( ok ) { + if ( oldDoWrap != doWrap ) { + TQString pn( i18n( "Set 'wordwrap' of '%1'" ).arg( w->name() ) ); + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + "wordwrap", TQVariant( oldDoWrap, 0 ), + TQVariant( doWrap, 0 ), TQString(), TQString() ); + cmd->execute(); + formWindow()->commandHistory()->addCommand( cmd ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "wordwrap", TRUE ); + } + + TQString pn( i18n( "Set the 'text' of '%1'" ).arg( w->name() ) ); + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + "text", w->property( "text" ), + text, TQString(), TQString() ); + cmd->execute(); + formWindow()->commandHistory()->addCommand( cmd ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "text", TRUE ); + } + } else if ( id == props[ "title" ] ) { + bool ok = FALSE; + TQString title = TQInputDialog::getText( i18n("Title"), i18n( "New title" ), + TQLineEdit::Normal, w->property("title").toString(), &ok, this ); + if ( ok ) { + TQString pn( i18n( "Set the 'title' of '%2'" ).arg( w->name() ) ); + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + "title", w->property( "title" ), + title, TQString(), TQString() ); + cmd->execute(); + formWindow()->commandHistory()->addCommand( cmd ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "title", TRUE ); + } + } else if ( id == props[ "pagetitle" ] ) { + bool ok = FALSE; + TQString text = TQInputDialog::getText( i18n("Page Title"), i18n( "New page title" ), + TQLineEdit::Normal, w->property("pageTitle").toString(), &ok, this ); + if ( ok ) { + TQString pn( i18n( "Set the 'pageTitle' of '%2'" ).arg( w->name() ) ); + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + "pageTitle", + w->property( "pageTitle" ), + text, TQString(), TQString() ); + cmd->execute(); + formWindow()->commandHistory()->addCommand( cmd ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "pageTitle", TRUE ); + } + } else if ( id == props[ "pixmap" ] ) { + TQPixmap oldPix = TQVariant(w->property( "pixmap" )).toPixmap(); + TQPixmap pix = qChoosePixmap( this, formWindow(), oldPix ); + if ( !pix.isNull() ) { + TQString pn( i18n( "Set the 'pixmap' of '%2'" ).arg( w->name() ) ); + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + "pixmap", w->property( "pixmap" ), + pix, TQString(), TQString() ); + cmd->execute(); + formWindow()->commandHistory()->addCommand( cmd ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "pixmap", TRUE ); + } + } +} + +void MainWindow::handleRMBSpecialCommands( int id, TQMap &commands, TQWidget *w ) +{ + if ( ::tqqt_cast(w) ) { + TQTabWidget *tw = (TQTabWidget*)w; + if ( id == commands[ "add" ] ) { + AddTabPageCommand *cmd = + new AddTabPageCommand( i18n( "Add Page to %1" ).arg( tw->name() ), formWindow(), + tw, "Tab" ); + formWindow()->commandHistory()->addCommand( cmd ); + cmd->execute(); + } else if ( id == commands[ "remove" ] ) { + if ( tw->currentPage() ) { + QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw; + DeleteTabPageCommand *cmd = + new DeleteTabPageCommand( i18n( "Delete Page %1 of %2" ). + arg( dtw->pageTitle() ).arg( tw->name() ), + formWindow(), tw, tw->currentPage() ); + formWindow()->commandHistory()->addCommand( cmd ); + cmd->execute(); + } + } + } else if ( ::tqqt_cast(w) ) { + TQToolBox *tb = (TQToolBox*)w; + if ( id == commands[ "add" ] ) { + AddToolBoxPageCommand *cmd = + new AddToolBoxPageCommand( i18n( "Add Page to %1" ).arg( tb->name() ), + formWindow(), + tb, "Page" ); + formWindow()->commandHistory()->addCommand( cmd ); + cmd->execute(); + } else if ( id == commands[ "remove" ] ) { + if ( tb->currentItem() ) { + DeleteToolBoxPageCommand *cmd = + new DeleteToolBoxPageCommand( i18n( "Delete Page %1 of %2" ). + arg( tb->itemLabel( tb->currentIndex() ) ). + arg( tb->name() ), + formWindow(), tb, tb->currentItem() ); + formWindow()->commandHistory()->addCommand( cmd ); + cmd->execute(); + } + } + } else if ( ::tqqt_cast(w) ) { + QDesignerWidgetStack *ws = (QDesignerWidgetStack*)w; + if ( id == commands[ "add" ] ) { + AddWidgetStackPageCommand *cmd = + new AddWidgetStackPageCommand( i18n( "Add Page to %1" ).arg( ws->name() ), + formWindow(), ws ); + formWindow()->commandHistory()->addCommand( cmd ); + cmd->execute(); + } else if ( id == commands[ "remove" ] ) { + if ( ws->visibleWidget() ) { + DeleteWidgetStackPageCommand *cmd = + new DeleteWidgetStackPageCommand( i18n( "Delete Page %1 of %2" ). + arg( ws->currentPage() ).arg( ws->name() ), + formWindow(), ws, ws->visibleWidget() ); + formWindow()->commandHistory()->addCommand( cmd ); + cmd->execute(); + } + } else if ( id == commands[ "nextpage" ] ) { + int currentPage = w->property( "currentPage" ).toInt(); + TQString pn( i18n( "Raise next page of '%2'" ).arg( w->name() ) ); + SetPropertyCommand *cmd = + new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + "currentPage", currentPage, + currentPage + 1, TQString(), TQString() ); + cmd->execute(); + formWindow()->commandHistory()->addCommand( cmd ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "currentPage", TRUE ); + } else if ( id == commands[ "prevpage" ] ) { + int currentPage = w->property( "currentPage" ).toInt(); + TQString pn( i18n( "Raise previous page of '%2'" ).arg( w->name() ) ); + SetPropertyCommand *cmd = + new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + "currentPage", currentPage, + currentPage -1, TQString(), TQString() ); + cmd->execute(); + formWindow()->commandHistory()->addCommand( cmd ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "currentPage", TRUE ); + } +#ifdef TQT_CONTAINER_CUSTOM_WIDGETS + } else if ( WidgetDatabase:: + isCustomPluginWidget( WidgetDatabase:: + idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) { + if ( id == commands[ "add" ] ) { + AddContainerPageCommand *cmd = + new AddContainerPageCommand( i18n( "Add Page to %1" ).arg( w->name() ), + formWindow(), w, "Page" ); + formWindow()->commandHistory()->addCommand( cmd ); + cmd->execute(); + } else if ( id == commands[ "remove" ] ) { + TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w ); + if ( iface ) { + TQString wClassName = WidgetFactory::classNameOf( TQT_TQOBJECT(w) ); + int index = iface->currentIndex( wClassName, w ); + DeleteContainerPageCommand *cmd = + new DeleteContainerPageCommand( i18n( "Delete Page %1 of %2" ). + arg( iface->pageLabel( wClassName, + w, index ) ). + arg( w->name() ), + formWindow(), w, index ); + formWindow()->commandHistory()->addCommand( cmd ); + cmd->execute(); + iface->release(); + } + } else if ( id == commands[ "rename" ] ) { + TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w ); + if ( iface ) { + bool ok = FALSE; + TQString wClassName = WidgetFactory::classNameOf( TQT_TQOBJECT(w) ); + int index = iface->currentIndex( wClassName, w ); + TQString text = TQInputDialog::getText( i18n("Page Title"), i18n( "New page title" ), + TQLineEdit::Normal, + iface->pageLabel( wClassName, w, + index ), + &ok, this ); + if ( ok ) { + RenameContainerPageCommand *cmd = + new RenameContainerPageCommand( i18n( "Rename Page %1 to %2" ). + arg( iface-> + pageLabel( wClassName, w, + index ) ). + arg( text ), formWindow(), + w, index, text ); + formWindow()->commandHistory()->addCommand( cmd ); + cmd->execute(); + } + iface->release(); + } + } +#endif // TQT_CONTAINER_CUSTOM_WIDGETS + } + + if ( WidgetFactory::hasSpecialEditor( WidgetDatabase:: + idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) { + if ( id == commands[ "edit" ] ) + WidgetFactory::editWidget( WidgetDatabase:: + idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), this, w, formWindow() ); + } +} + +void MainWindow::handleRMBSpecialCommands( int id, TQMap &commands, FormWindow *fw ) +{ + if ( ::tqqt_cast(fw->mainContainer()) ) { + TQWizard *wiz = (TQWizard*)fw->mainContainer(); + if ( id == commands[ "add" ] ) { + AddWizardPageCommand *cmd = + new AddWizardPageCommand( i18n( "Add Page to %1" ).arg( wiz->name() ), + formWindow(), wiz, "WizardPage" ); + formWindow()->commandHistory()->addCommand( cmd ); + cmd->execute(); + } else if ( id == commands[ "remove" ] ) { + if ( wiz->currentPage() ) { + QDesignerWizard *dw = (QDesignerWizard*)wiz; + DeleteWizardPageCommand *cmd = + new DeleteWizardPageCommand( i18n( "Delete Page %1 of %2" ). + arg( dw->pageTitle() ).arg( wiz->name() ), + formWindow(), wiz, + wiz->indexOf( wiz->currentPage() ) ); + formWindow()->commandHistory()->addCommand( cmd ); + cmd->execute(); + } + } else if ( id == commands[ "edit" ] ) { + WizardEditor *e = new WizardEditor( this, wiz, fw ); + e->exec(); + delete e; + } else if ( id == commands[ "rename" ] ) { + + bool ok = FALSE; + QDesignerWizard *dw = (QDesignerWizard*)wiz; + TQString text = TQInputDialog::getText( i18n("Page Title"), i18n( "New page title" ), + TQLineEdit::Normal, dw->pageTitle(), &ok, this ); + if ( ok ) { + TQString pn( i18n( "Rename page %1 of %2" ).arg( dw->pageTitle() ).arg( wiz->name() ) ); + RenameWizardPageCommand *cmd = + new RenameWizardPageCommand( pn, formWindow() + , wiz, wiz->indexOf( wiz->currentPage() ), text ); + formWindow()->commandHistory()->addCommand( cmd ); + cmd->execute(); + } + } + } else if ( ::tqqt_cast(fw->mainContainer()) ) { + TQMainWindow *mw = (TQMainWindow*)fw->mainContainer(); + if ( id == commands[ "add_toolbar" ] ) { + AddToolBarCommand *cmd = + new AddToolBarCommand( i18n( "Add Toolbar to '%1'" ).arg( formWindow()->name() ), + formWindow(), mw ); + formWindow()->commandHistory()->addCommand( cmd ); + cmd->execute(); + } else if ( id == commands[ "add_menu_item" ] ) { + AddMenuCommand *cmd = + new AddMenuCommand( i18n( "Add Menu to '%1'" ).arg( formWindow()->name() ), + formWindow(), mw ); + formWindow()->commandHistory()->addCommand( cmd ); + cmd->execute(); + } + } +} + +void MainWindow::clipboardChanged() +{ + TQString text( tqApp->clipboard()->text() ); + TQString start( "" ); + actionEditPaste->setEnabled( text.left( start.length() ) == start ); +} + +void MainWindow::selectionChanged() +{ + layoutChilds = FALSE; + layoutSelected = FALSE; + breakLayout = FALSE; + if ( !formWindow() ) { + actionEditCut->setEnabled( FALSE ); + actionEditCopy->setEnabled( FALSE ); + actionEditDelete->setEnabled( FALSE ); + actionEditAdjustSize->setEnabled( FALSE ); + actionEditHLayout->setEnabled( FALSE ); + actionEditVLayout->setEnabled( FALSE ); + actionEditSplitHorizontal->setEnabled( FALSE ); + actionEditSplitVertical->setEnabled( FALSE ); + actionEditGridLayout->setEnabled( FALSE ); + actionEditBreakLayout->setEnabled( FALSE ); + actionEditLower->setEnabled( FALSE ); + actionEditRaise->setEnabled( FALSE ); + actionEditAdjustSize->setEnabled( FALSE ); + return; + } + + int selectedWidgets = formWindow()->numSelectedWidgets(); + bool enable = selectedWidgets > 0; + actionEditCut->setEnabled( enable ); + actionEditCopy->setEnabled( enable ); + actionEditDelete->setEnabled( enable ); + actionEditLower->setEnabled( enable ); + actionEditRaise->setEnabled( enable ); + + actionEditAdjustSize->setEnabled( FALSE ); + actionEditSplitHorizontal->setEnabled( FALSE ); + actionEditSplitVertical->setEnabled( FALSE ); + + enable = FALSE; + TQWidgetList widgets = formWindow()->selectedWidgets(); + if ( selectedWidgets > 1 ) { + int unlaidout = 0; + int laidout = 0; + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { + if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) + unlaidout++; + else + laidout++; + } + actionEditHLayout->setEnabled( unlaidout > 1 ); + actionEditVLayout->setEnabled( unlaidout > 1 ); + actionEditSplitHorizontal->setEnabled( unlaidout > 1 ); + actionEditSplitVertical->setEnabled( unlaidout > 1 ); + actionEditGridLayout->setEnabled( unlaidout > 1 ); + actionEditBreakLayout->setEnabled( laidout > 0 ); + actionEditAdjustSize->setEnabled( laidout > 0 ); + layoutSelected = unlaidout > 1; + breakLayout = laidout > 0; + } else if ( selectedWidgets == 1 ) { + TQWidget *w = widgets.first(); + bool isContainer = WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) || + w == formWindow()->mainContainer(); + actionEditAdjustSize->setEnabled( !w->parentWidget() || + WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ); + + if ( !isContainer ) { + actionEditHLayout->setEnabled( FALSE ); + actionEditVLayout->setEnabled( FALSE ); + actionEditGridLayout->setEnabled( FALSE ); + if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) { + actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) ); + breakLayout = TRUE; + } else { + actionEditBreakLayout->setEnabled( FALSE ); + } + } else { + if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) { + if ( !formWindow()->hasInsertedChildren( w ) ) { + actionEditHLayout->setEnabled( FALSE ); + actionEditVLayout->setEnabled( FALSE ); + actionEditGridLayout->setEnabled( FALSE ); + actionEditBreakLayout->setEnabled( FALSE ); + } else { + actionEditHLayout->setEnabled( TRUE ); + actionEditVLayout->setEnabled( TRUE ); + actionEditGridLayout->setEnabled( TRUE ); + actionEditBreakLayout->setEnabled( FALSE ); + layoutChilds = TRUE; + } + if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) { + actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) ); + breakLayout = TRUE; + } + } else { + actionEditHLayout->setEnabled( FALSE ); + actionEditVLayout->setEnabled( FALSE ); + actionEditGridLayout->setEnabled( FALSE ); + actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) ); + breakLayout = TRUE; + } + } + } else if ( selectedWidgets == 0 ) { + actionEditAdjustSize->setEnabled( TRUE ); + TQWidget *w = formWindow()->mainContainer(); + if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) { + if ( !formWindow()->hasInsertedChildren( w ) ) { + actionEditHLayout->setEnabled( FALSE ); + actionEditVLayout->setEnabled( FALSE ); + actionEditGridLayout->setEnabled( FALSE ); + actionEditBreakLayout->setEnabled( FALSE ); + } else { + actionEditHLayout->setEnabled( TRUE ); + actionEditVLayout->setEnabled( TRUE ); + actionEditGridLayout->setEnabled( TRUE ); + actionEditBreakLayout->setEnabled( FALSE ); + layoutChilds = TRUE; + } + } else { + actionEditHLayout->setEnabled( FALSE ); + actionEditVLayout->setEnabled( FALSE ); + actionEditGridLayout->setEnabled( FALSE ); + actionEditBreakLayout->setEnabled( TRUE ); + breakLayout = TRUE; + } + } else { + actionEditHLayout->setEnabled( FALSE ); + actionEditVLayout->setEnabled( FALSE ); + actionEditGridLayout->setEnabled( FALSE ); + actionEditBreakLayout->setEnabled( FALSE ); + } +} + +static TQString fixArgs( const TQString &s2 ) +{ + TQString s = s2; + return s.replace( ',', ';' ); +} + +void MainWindow::writeConfig() +{ + TQSettings config; + + // No search path for unix, only needs application name + config.insertSearchPath( TQSettings::Windows, "/Trolltech" ); + + TQString keybase = DesignerApplication::settingsKey(); + + if (savePluginPaths) { + TQStringList pluginPaths = TQApplication::libraryPaths(); + config.writeEntry( keybase + "PluginPaths", pluginPaths ); + } + config.writeEntry( keybase + "RestoreWorkspace", restoreConfig ); + config.writeEntry( keybase + "SplashScreen", splashScreen ); + config.writeEntry( keybase + "ShowStartDialog", shStartDialog ); + config.writeEntry( keybase + "FileFilter", fileFilter ); + config.writeEntry( keybase + "TemplatePath", templPath ); + config.writeEntry( keybase + "RecentlyOpenedFiles", recentlyFiles ); + config.writeEntry( keybase + "RecentlyOpenedProjects", recentlyProjects ); + config.writeEntry( keybase + "DatabaseAutoEdit", databaseAutoEdit ); + + config.writeEntry( keybase + "AutoSave/Enabled", autoSaveEnabled ); + config.writeEntry( keybase + "AutoSave/Interval", autoSaveInterval ); + + config.writeEntry( keybase + "Grid/Snap", snGrid ); + config.writeEntry( keybase + "Grid/Show", sGrid ); + config.writeEntry( keybase + "Grid/x", grid().x() ); + config.writeEntry( keybase + "Grid/y", grid().y() ); + config.writeEntry( keybase + "LastToolPage", + toolBox->itemLabel( toolBox->currentIndex() ) ); + + config.writeEntry( keybase + "Background/UsePixmap", backPix ); + config.writeEntry( keybase + "Background/Color", (int)qworkspace->backgroundColor().rgb() ); + if ( qworkspace->backgroundPixmap() ) + qworkspace->backgroundPixmap()->save( TQDir::home().absPath() + "/.designer/" + "background.xpm", "PNG" ); + + config.writeEntry( keybase + "Geometries/MainwindowX", x() ); + config.writeEntry( keybase + "Geometries/MainwindowY", y() ); + config.writeEntry( keybase + "Geometries/MainwindowWidth", width() ); + config.writeEntry( keybase + "Geometries/MainwindowHeight", height() ); + config.writeEntry( keybase + "Geometries/MainwindowMaximized", isMaximized() ); + config.writeEntry( keybase + "Geometries/PropertyEditorX", propertyEditor->parentWidget()->x() ); + config.writeEntry( keybase + "Geometries/PropertyEditorY", propertyEditor->parentWidget()->y() ); + config.writeEntry( keybase + "Geometries/PropertyEditorWidth", propertyEditor->parentWidget()->width() ); + config.writeEntry( keybase + "Geometries/PropertyEditorHeight", propertyEditor->parentWidget()->height() ); + config.writeEntry( keybase + "Geometries/HierarchyViewX", hierarchyView->parentWidget()->x() ); + config.writeEntry( keybase + "Geometries/HierarchyViewY", hierarchyView->parentWidget()->y() ); + config.writeEntry( keybase + "Geometries/HierarchyViewWidth", hierarchyView->parentWidget()->width() ); + config.writeEntry( keybase + "Geometries/HierarchyViewHeight", hierarchyView->parentWidget()->height() ); + config.writeEntry( keybase + "Geometries/WorkspaceX", wspace->parentWidget()->x() ); + config.writeEntry( keybase + "Geometries/WorkspaceY", wspace->parentWidget()->y() ); + config.writeEntry( keybase + "Geometries/WorkspaceWidth", wspace->parentWidget()->width() ); + config.writeEntry( keybase + "Geometries/WorkspaceHeight", wspace->parentWidget()->height() ); + + config.writeEntry( keybase + "View/TextLabels", usesTextLabel() ); + config.writeEntry( keybase + "View/BigIcons", usesBigPixmaps() ); + + TQString mwlKey = "MainwindowLayout"; + if ( singleProjectMode() ) + mwlKey += "S"; + TQString mainWindowLayout; + TQTextStream ts( &mainWindowLayout, IO_WriteOnly ); + ts << *this; + config.writeEntry( keybase + mwlKey, mainWindowLayout ); + + + TQPtrList *lst = MetaDataBase::customWidgets(); + config.writeEntry( keybase + "CustomWidgets/num", (int)lst->count() ); + int j = 0; + TQDir::home().mkdir( ".designer" ); + for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) { + TQStringList l; + l << w->className; + l << w->includeFile; + l << TQString::number( (int)w->includePolicy ); + l << TQString::number( w->sizeHint.width() ); + l << TQString::number( w->sizeHint.height() ); + l << TQString::number( w->lstSignals.count() ); + for ( TQValueList::ConstIterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it ) + l << TQString( fixArgs( *it ) ); + l << TQString::number( w->lstSlots.count() ); + for ( TQValueList::ConstIterator it2 = w->lstSlots.begin(); it2 != w->lstSlots.end(); ++it2 ) { + l << fixArgs( (*it2).function ); + l << (*it2).access; + } + l << TQString::number( w->lstProperties.count() ); + for ( TQValueList::ConstIterator it3 = w->lstProperties.begin(); it3 != w->lstProperties.end(); ++it3 ) { + l << (*it3).property; + l << (*it3).type; + } + l << TQString::number( size_type_to_int( w->sizePolicy.horData() ) ); + l << TQString::number( size_type_to_int( w->sizePolicy.verData() ) ); + l << TQString::number( (int)w->isContainer ); + config.writeEntry( keybase + "CustomWidgets/Widget" + TQString::number( j++ ), l, ',' ); + w->pixmap->save( TQDir::home().absPath() + "/.designer/" + w->className, "XPM" ); + } + + TQStringList l; + for ( TQAction *a = commonWidgetsPage.first(); a; a = commonWidgetsPage.next() ) + l << a->text(); + config.writeEntry( keybase + "ToolBox/CommonWidgets", l ); +} + +static TQString fixArgs2( const TQString &s2 ) +{ + TQString s = s2; + return s.replace( ';', ',' ); +} + +void MainWindow::readConfig() +{ + TQString keybase = DesignerApplication::settingsKey(); + TQSettings config; + config.insertSearchPath( TQSettings::Windows, "/Trolltech" ); + + bool ok; + bool readPreviousConfig = FALSE; + TQString backPixName( TQDir::home().absPath() + "/.designer/" + "background.xpm" ); + restoreConfig = config.readBoolEntry( keybase + "RestoreWorkspace", TRUE, &ok ); + if ( !ok ) { + keybase = DesignerApplication::oldSettingsKey(); + restoreConfig = config.readBoolEntry( keybase + "RestoreWorkspace", TRUE, &ok ); + if ( !ok ) { + if ( oWindow ) { + oWindow->shuttingDown(); + ( (TQDockWindow*)oWindow->parent() )->hide(); + } + TQPixmap pix; + pix.load( backPixName ); + if ( !pix.isNull() ) + qworkspace->setBackgroundPixmap( pix ); + return; + } + readPreviousConfig = TRUE; + } + if ( !readPreviousConfig ) { + fileFilter = config.readEntry( keybase + "FileFilter", fileFilter ); + templPath = config.readEntry( keybase + "TemplatePath", TQString() ); + databaseAutoEdit = config.readBoolEntry( keybase + "DatabaseAutoEdit", databaseAutoEdit ); + shStartDialog = config.readBoolEntry( keybase + "ShowStartDialog", shStartDialog ); + autoSaveEnabled = config.readBoolEntry( keybase + "AutoSave/Enabled", autoSaveEnabled ); + autoSaveInterval = config.readNumEntry( keybase + "AutoSave/Interval", autoSaveInterval ); + } + + if ( restoreConfig || readPreviousConfig ) { + TQString s = config.readEntry( keybase + "LastToolPage" ); + for ( int i = 0; i < toolBox->count(); ++i ) { + if ( toolBox->itemLabel(i) == s ) { + toolBox->setCurrentIndex( i ); + break; + } + } + // We know that the oldSettingsKey() will return 3.1 + if ( keybase == DesignerApplication::oldSettingsKey() ) { + if (keybase.contains("3.1")) + recentlyFiles = config.readListEntry( keybase + "RecentlyOpenedFiles", ',' ); + else + recentlyFiles = config.readListEntry(keybase + "RecentlyOpenedFiles"); + + if ( recentlyFiles.count() == 1 && recentlyFiles[0].isNull() ) + recentlyFiles.clear(); + if (keybase.contains("3.1")) + recentlyProjects = config.readListEntry( keybase + "RecentlyOpenedProjects", ',' ); + else + recentlyProjects = config.readListEntry( keybase + "RecentlyOpenedProjects"); + if ( recentlyProjects.count() == 1 && recentlyProjects[0].isNull() ) + recentlyProjects.clear(); + } else { + recentlyFiles = config.readListEntry( keybase + "RecentlyOpenedFiles" ); + recentlyProjects = config.readListEntry( keybase + "RecentlyOpenedProjects" ); + } + + backPix = config.readBoolEntry( keybase + "Background/UsePixmap", TRUE ) | readPreviousConfig; + if ( backPix ) { + TQPixmap pix; + pix.load( backPixName ); + if ( !pix.isNull() ) + qworkspace->setBackgroundPixmap( pix ); + } else { + qworkspace->setBackgroundColor( TQColor( (TQRgb)config.readNumEntry( keybase + "Background/Color" ) ) ); + } + + if ( !readPreviousConfig ) { + splashScreen = config.readBoolEntry( keybase + "SplashScreen", TRUE ); + + sGrid = config.readBoolEntry( keybase + "Grid/Show", TRUE ); + snGrid = config.readBoolEntry( keybase + "Grid/Snap", TRUE ); + grd.setX( config.readNumEntry( keybase + "Grid/x", 10 ) ); + grd.setY( config.readNumEntry( keybase + "Grid/y", 10 ) ); + + if ( !config.readBoolEntry( DesignerApplication::settingsKey() + "Geometries/MainwindowMaximized", FALSE ) ) { + TQRect r( pos(), size() ); + r.setX( config.readNumEntry( keybase + "Geometries/MainwindowX", r.x() ) ); + r.setY( config.readNumEntry( keybase + "Geometries/MainwindowY", r.y() ) ); + r.setWidth( config.readNumEntry( keybase + "Geometries/MainwindowWidth", r.width() ) ); + r.setHeight( config.readNumEntry( keybase + "Geometries/MainwindowHeight", r.height() ) ); + + TQRect desk = TQApplication::desktop()->geometry(); + TQRect inter = desk.intersect( r ); + resize( r.size() ); + if ( inter.width() * inter.height() > ( r.width() * r.height() / 20 ) ) { + move( r.topLeft() ); + } + } + setUsesTextLabel( config.readBoolEntry( keybase + "View/TextLabels", FALSE ) ); + setUsesBigPixmaps( FALSE /*config.readBoolEntry( "BigIcons", FALSE )*/ ); // ### disabled for now + } + } + int num = config.readNumEntry( keybase + "CustomWidgets/num" ); + for ( int j = 0; j < num; ++j ) { + MetaDataBase::CustomWidget *w = new MetaDataBase::CustomWidget; + TQStringList l = config.readListEntry( keybase + "CustomWidgets/Widget" + TQString::number( j ), ',' ); + w->className = l[ 0 ]; + w->includeFile = l[ 1 ]; + w->includePolicy = (MetaDataBase::CustomWidget::IncludePolicy)l[ 2 ].toInt(); + w->sizeHint.setWidth( l[ 3 ].toInt() ); + w->sizeHint.setHeight( l[ 4 ].toInt() ); + uint c = 5; + if ( l.count() > c ) { + int numSignals = l[ c ].toInt(); + c++; + for ( int i = 0; i < numSignals; ++i, c++ ) + w->lstSignals.append( fixArgs2( l[ c ] ).latin1() ); + } + if ( l.count() > c ) { + int numSlots = l[ c ].toInt(); + c++; + for ( int i = 0; i < numSlots; ++i ) { + MetaDataBase::Function slot; + slot.function = fixArgs2( l[ c ] ); + c++; + slot.access = l[ c ]; + c++; + w->lstSlots.append( slot ); + } + } + if ( l.count() > c ) { + int numProperties = l[ c ].toInt(); + c++; + for ( int i = 0; i < numProperties; ++i ) { + MetaDataBase::Property prop; + prop.property = l[ c ]; + c++; + prop.type = l[ c ]; + c++; + w->lstProperties.append( prop ); + } + } if ( l.count() > c ) { + TQSizePolicy::SizeType h, v; + h = int_to_size_type( l[ c++ ].toInt() ); + v = int_to_size_type( l[ c++ ].toInt() ); + w->sizePolicy = TQSizePolicy( h, v ); + } + if ( l.count() > c ) { + w->isContainer = (bool)l[ c++ ].toInt(); + } + w->pixmap = new TQPixmap( BarIcon( TQDir::home().absPath() + "/.designer/" + w->className , KDevDesignerPartFactory::instance()) ); + MetaDataBase::addCustomWidget( w ); + } + if ( num > 0 ) + rebuildCustomWidgetGUI(); + + if ( !restoreConfig ) + return; + +#ifndef TQ_WS_MAC + /* I'm sorry to make this not happen on the Mac, but it seems to hang somewhere deep + in TQLayout, it gets into a very large loop - and seems it has to do with clever + things the designer does ###Sam */ + TQApplication::sendPostedEvents(); +#endif + + if ( !readPreviousConfig ) { + TQString mwlKey = "MainwindowLayout"; + if ( singleProjectMode() ) + mwlKey += "S"; + TQString mainWindowLayout = config.readEntry( keybase + mwlKey ); + TQTextStream ts( &mainWindowLayout, IO_ReadOnly ); + ts >> *this; + } + if ( readPreviousConfig && oWindow ) { + oWindow->shuttingDown(); + ( (TQDockWindow*)oWindow->parent() )->hide(); + } + + rebuildCustomWidgetGUI(); + + TQStringList l = config.readListEntry( keybase + "ToolBox/CommonWidgets" ); + if ( !l.isEmpty() ) { + TQPtrList lst; + commonWidgetsPage.clear(); + for ( TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) { + for ( TQAction *a = toolActions.first(); a; a = toolActions.next() ) { + if ( *it == a->text() ) { + lst.append( a ); + break; + } + } + } + if ( lst != commonWidgetsPage ) { + commonWidgetsPage = lst; + rebuildCommonWidgetsToolBoxPage(); + } + } +} + +HierarchyView *MainWindow::objectHierarchy() const +{ + if ( !hierarchyView ) + ( (MainWindow*)this )->setupHierarchyView(); + return hierarchyView; +} + +TQPopupMenu *MainWindow::setupNormalHierarchyMenu( TQWidget *parent ) +{ + TQPopupMenu *menu = new TQPopupMenu( parent ); + + actionEditCut->addTo( menu ); + actionEditCopy->addTo( menu ); + actionEditPaste->addTo( menu ); + actionEditDelete->addTo( menu ); + + return menu; +} + +TQPopupMenu *MainWindow::setupTabWidgetHierarchyMenu( TQWidget *parent, const char *addSlot, const char *removeSlot ) +{ + TQPopupMenu *menu = new TQPopupMenu( parent ); + + menu->insertItem( i18n( "Add Page" ), parent, addSlot ); + menu->insertItem( i18n( "Delete Page" ), parent, removeSlot ); + menu->insertSeparator(); + actionEditCut->addTo( menu ); + actionEditCopy->addTo( menu ); + actionEditPaste->addTo( menu ); + actionEditDelete->addTo( menu ); + + return menu; +} + +void MainWindow::closeEvent( TQCloseEvent *e ) +{ + if ( singleProject ) { + hide(); + e->ignore(); + return; + } + + TQWidgetList windows = qWorkspace()->windowList(); + TQWidgetListIt wit( windows ); + while ( wit.current() ) { + TQWidget *w = wit.current(); + ++wit; + if ( ::tqqt_cast(w) ) { + if ( ( (FormWindow*)w )->formFile()->editor() ) + windows.removeRef( ( (FormWindow*)w )->formFile()->editor() ); + if ( ( (FormWindow*)w )->formFile()->formWindow() ) + windows.removeRef( ( (FormWindow*)w )->formFile()->formWindow() ); + if ( !( (FormWindow*)w )->formFile()->close() ) { + e->ignore(); + return; + } + } else if ( ::tqqt_cast(w) ) { + if ( !( (SourceEditor*)w )->close() ) { + e->ignore(); + return; + } + } + w->close(); + } + + TQMapConstIterator it = projects.begin(); + while( it != projects.end() ) { + Project *pro = it.data(); + ++it; + if ( pro->isModified() ) { + switch ( TQMessageBox::warning( this, i18n( "Save Project Settings" ), + i18n( "Save changes to '%1'?" ).arg( pro->fileName() ), + i18n( "&Yes" ), i18n( "&No" ), i18n( "&Cancel" ), 0, 2 ) ) { + case 0: // save + pro->save(); + break; + case 1: // don't save + break; + case 2: // cancel + e->ignore(); + return; + default: + break; + } + } + } + + writeConfig(); + hide(); + e->accept(); + + if ( client ) { + TQDir home( TQDir::homeDirPath() ); + home.remove( ".designerpid" ); + } +} + +Workspace *MainWindow::workspace() const +{ + if ( !wspace ) + ( (MainWindow*)this )->setupWorkspace(); + return wspace; +} + +PropertyEditor *MainWindow::propertyeditor() const +{ + if ( !propertyEditor ) + ( (MainWindow*)this )->setupPropertyEditor(); + return propertyEditor; +} + +ActionEditor *MainWindow::actioneditor() const +{ + if ( !actionEditor ) + ( (MainWindow*)this )->setupActionEditor(); + return actionEditor; +} + +bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) +{ + if ( f && !f->project()->isCpp() && !WidgetFactory::isPassiveInteractor( TQT_TQOBJECT(w) ) ) { + TQString defSignal = WidgetFactory::defaultSignal( TQT_TQOBJECT(w) ); + if ( defSignal.isEmpty() ) { + editSource(); + } else { + TQString s = TQString( w->name() ) + "_" + defSignal; + LanguageInterface *iface = MetaDataBase::languageInterface( f->project()->language() ); + if ( iface ) { + TQStrList sigs = iface->signalNames( TQT_TQOBJECT(w) ); + TQString fullSignal; + for ( int i = 0; i < (int)sigs.count(); ++i ) { + TQString sig = sigs.at( i ); + if ( sig.left( sig.find( '(' ) ) == defSignal ) { + fullSignal = sig; + break; + } + } + + if ( !fullSignal.isEmpty() ) { + TQString signl = fullSignal; + fullSignal = fullSignal.mid( fullSignal.find( '(' ) + 1 ); + fullSignal.remove( (int)fullSignal.length() - 1, 1 ); + fullSignal = iface->createArguments( fullSignal.simplifyWhiteSpace() ); + s += "(" + fullSignal + ")"; + if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(f), s.latin1() ) ) + MetaDataBase::addFunction( TQT_TQOBJECT(f), s.latin1(), "", "public", "slot", + f->project()->language(), "void" ); + s = s.left( s.find( '(' ) ).latin1(); + if ( !MetaDataBase::hasConnection( TQT_TQOBJECT(f), TQT_TQOBJECT(w), defSignal.latin1(), TQT_TQOBJECT(f->mainContainer()), s.latin1() ) ) { + MetaDataBase::Connection conn; + conn.sender = TQT_TQOBJECT(w); + conn.receiver = TQT_TQOBJECT(f->mainContainer()); + conn.signal = signl; + conn.slot = s; + AddConnectionCommand *cmd = + new AddConnectionCommand( i18n( "Add Connection" ), f, conn ); + f->commandHistory()->addCommand( cmd ); + cmd->execute(); + f->formFile()->setModified( TRUE ); + } + } + } + editFunction( s, TRUE ); + } + return TRUE; + } + if ( WidgetFactory::hasSpecialEditor( WidgetDatabase:: + idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) { + statusMessage( i18n( "Edit %1..." ).arg( w->className() ) ); + WidgetFactory::editWidget( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), + this, w, formWindow() ); + statusBar()->clear(); + return TRUE; + } + + const TQMetaProperty* text = w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE ); + const TQMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), TRUE ); + if ( text && text->designable(w) ) { + bool ok = FALSE; + bool oldDoWrap = FALSE; + if ( ::tqqt_cast(w) ) { + int align = w->property( "alignment" ).toInt(); + if ( align & WordBreak ) + oldDoWrap = TRUE; + } + bool doWrap = oldDoWrap; + + TQString text; + if ( ::tqqt_cast(w) || ::tqqt_cast(w) || ::tqqt_cast(w) ) { + text = MultiLineEditor::getText( this, w->property( "text" ).toString(), + !::tqqt_cast(w), &doWrap ); + ok = !text.isNull(); + } else { + text = TQInputDialog::getText( i18n("Text"), i18n( "New text" ), + TQLineEdit::Normal, w->property("text").toString(), &ok, this ); + } + if ( ok ) { + if ( oldDoWrap != doWrap ) { + TQString pn( i18n( "Set 'wordwrap' of '%1'" ).arg( w->name() ) ); + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + "wordwrap", TQVariant( oldDoWrap, 0 ), + TQVariant( doWrap, 0 ), TQString(), TQString() ); + cmd->execute(); + formWindow()->commandHistory()->addCommand( cmd ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "wordwrap", TRUE ); + } + + TQString pn( i18n( "Set the 'text' of '%1'" ).arg( w->name() ) ); + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + "text", w->property( "text" ), + text, TQString(), TQString() ); + cmd->execute(); + formWindow()->commandHistory()->addCommand( cmd ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "text", TRUE ); + } + return TRUE; + } + if ( title && title->designable(w) ) { + bool ok = FALSE; + TQString text; + text = TQInputDialog::getText( i18n("Title"), i18n( "New title" ), TQLineEdit::Normal, w->property("title").toString(), &ok, this ); + if ( ok ) { + TQString pn( i18n( "Set the 'title' of '%2'" ).arg( w->name() ) ); + SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, + "title", w->property( "title" ), + text, TQString(), TQString() ); + cmd->execute(); + formWindow()->commandHistory()->addCommand( cmd ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "title", TRUE ); + } + return TRUE; + } + + if ( !WidgetFactory::isPassiveInteractor( TQT_TQOBJECT(w) ) ) + editSource(); + + return TRUE; +} + +void MainWindow::rebuildCustomWidgetGUI() +{ + customWidgetToolBar->clear(); + customWidgetMenu->clear(); + customWidgetToolBar2->clear(); + int count = 0; + + TQPtrListIterator it( toolActions ); + TQAction *action; + while ( ( action = it.current() ) ) { + ++it; + if ( ( (WidgetAction*)action )->group() == "Custom Widgets" ) + delete action; + } + + TQPtrList *lst = MetaDataBase::customWidgets(); + + actionToolsCustomWidget->addTo( customWidgetMenu ); + customWidgetMenu->insertSeparator(); + + for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) { + WidgetAction* a = new WidgetAction( "Custom Widgets", actionGroupTools, TQString::number( w->id ).latin1() ); + a->setToggleAction( TRUE ); + a->setText( w->className ); + a->setIconSet( *w->pixmap ); + a->setStatusTip( i18n( "Insert a %1 (custom widget)" ).arg( w->className ) ); + a->setWhatsThis( i18n("%1 (custom widget)" + "

Click Edit Custom Widgets... in the Tools|Custom menu to " + "add and change custom widgets. You can add properties as well as " + "signals and slots to integrate them into TQt Designer, " + "and provide a pixmap which will be used to represent the widget on the form.

").arg( w->className ) ); + + a->addTo( customWidgetToolBar ); + a->addTo( customWidgetToolBar2 ); + a->addTo( customWidgetMenu ); + count++; + } + TQWidget *wid; + customWidgetToolBar2->setStretchableWidget( ( wid = new TQWidget( customWidgetToolBar2 ) ) ); + wid->setBackgroundMode( customWidgetToolBar2->backgroundMode() ); + + if ( count == 0 ) + customWidgetToolBar->hide(); + else if ( customWidgetToolBar->isVisible() ) + customWidgetToolBar->show(); +} + +void MainWindow::rebuildCommonWidgetsToolBoxPage() +{ + toolBox->setUpdatesEnabled( FALSE ); + commonWidgetsToolBar->setUpdatesEnabled( FALSE ); + commonWidgetsToolBar->clear(); + for ( TQAction *a = commonWidgetsPage.first(); a; a = commonWidgetsPage.next() ) + a->addTo( commonWidgetsToolBar ); + TQWidget *w; + commonWidgetsToolBar->setStretchableWidget( ( w = new TQWidget( commonWidgetsToolBar ) ) ); + w->setBackgroundMode( commonWidgetsToolBar->backgroundMode() ); + toolBox->setUpdatesEnabled( TRUE ); + commonWidgetsToolBar->setUpdatesEnabled( TRUE ); +} + +bool MainWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *wid ) +{ + TQWidgetList windows = qWorkspace()->windowList(); + for ( TQWidget *w = windows.first(); w; w = windows.next() ) { + if ( ::tqqt_cast(w) ) { + if ( ( (FormWindow*)w )->isCustomWidgetUsed( wid ) ) + return TRUE; + } + } + return FALSE; +} + +void MainWindow::setGrid( const TQPoint &p ) +{ + if ( p == grd ) + return; + grd = p; + TQWidgetList windows = qWorkspace()->windowList(); + for ( TQWidget *w = windows.first(); w; w = windows.next() ) { + if ( !::tqqt_cast(w) ) + continue; + ( (FormWindow*)w )->mainContainer()->update(); + } +} + +void MainWindow::setShowGrid( bool b ) +{ + if ( b == sGrid ) + return; + sGrid = b; + TQWidgetList windows = qWorkspace()->windowList(); + for ( TQWidget *w = windows.first(); w; w = windows.next() ) { + if ( !::tqqt_cast(w) ) + continue; + ( (FormWindow*)w )->mainContainer()->update(); + } +} + +void MainWindow::setSnapGrid( bool b ) +{ + if ( b == snGrid ) + return; + snGrid = b; +} + +TQString MainWindow::documentationPath() const +{ + return TQString( tqInstallPathDocs() ) + "/html/"; +} + +void MainWindow::windowsMenuActivated( int id ) +{ + TQWidget* w = qworkspace->windowList().at( id ); + if ( w ) + w->setFocus(); +} + +void MainWindow::projectSelected( TQAction *a ) +{ + a->setOn( TRUE ); + if ( currentProject ) + currentProject->setActive( FALSE ); + Project *p = *projects.find( a ); + p->setActive( TRUE ); + if ( currentProject == p ) + return; + currentProject = p; + if ( wspace ) + wspace->setCurrentProject( currentProject ); +} + +void MainWindow::openProject( const TQString &fn ) +{ + for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) { + if ( (*it)->fileName() == fn ) { + projectSelected( it.key() ); + return; + } + } + TQApplication::setOverrideCursor( waitCursor ); + Project *pro = new Project( fn, "", projectSettingsPluginManager ); + pro->setModified( FALSE ); + TQAction *a = new TQAction( pro->projectName(), pro->projectName(), 0, actionGroupProjects, 0, TRUE ); + projects.insert( a, pro ); + projectSelected( a ); + TQApplication::restoreOverrideCursor(); +} + +void MainWindow::checkTempFiles() +{ + TQString s = TQDir::homeDirPath() + "/.designer"; + TQString baseName = s+ "/saved-form-"; + if ( !TQFile::exists( baseName + "1.ui" ) ) + return; + DesignerApplication::closeSplash(); + TQDir d( s ); + d.setNameFilter( "*.ui" ); + TQStringList lst = d.entryList(); + TQApplication::restoreOverrideCursor(); + bool load = TQMessageBox::information( this, i18n( "Restoring Last Session" ), + i18n( "TQt Designer found some temporary saved files, which were\n" + "written when TQt Designer crashed last time. Do you want to\n" + "load these files?" ), i18n( "&Yes" ), i18n( "&No" ) ) == 0; + TQApplication::setOverrideCursor( waitCursor ); + for ( TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { + if ( load ) + openFormWindow( s + "/" + *it, FALSE ); + d.remove( *it ); + } +} + +void MainWindow::showDialogHelp() +{ + TQWidget *w = (TQWidget*)sender(); + w = w->topLevelWidget(); + + TQString link = documentationPath() + "/designer-manual-13.html#"; + + if ( ::tqqt_cast(w) || ::tqqt_cast(w) ) // own doc for startdialog? + link += "dialog-file-new"; + else if ( ::tqqt_cast(w) ) + link += "dialog-file-create-template"; + else if ( ::tqqt_cast(w) ) + link += "dialog-edit-functions"; +// else if ( ::tqqt_cast(w) ) + else if ( w->inherits("ConnectionViewerBase") ) + link += "dialog-view-connections"; + else if ( ::tqqt_cast(w) ) + link += "dialog-edit-form-settings"; + else if ( ::tqqt_cast(w) ) + link += "dialog-edit-preferences"; + else if ( ::tqqt_cast(w) ) + link += "dialog-image-collection"; +// else if ( ::tqqt_cast(w) ) + else if ( w->inherits( "DatabaseConnectionBase" ) ) + link += "dialog-edit-database-connections"; + else if ( ::tqqt_cast(w) ) + link += "dialog-project-settings"; + else if ( ::tqqt_cast(w) ) + link += "dialog-find-text"; + else if ( ::tqqt_cast(w) ) + link += "dialog-replace-text"; + else if ( ::tqqt_cast(w) ) + link += "dialog-go-to-line"; +// else if ( ::tqqt_cast(w) ) + else if ( w->inherits("ConnectionEditorBase") ) + link += "dialog-edit-connections"; + else if ( ::tqqt_cast(w) ) + link += "dialog-edit-custom-widgets"; + else if ( ::tqqt_cast(w) ) + link += "dialog-edit-palette"; + else if ( ::tqqt_cast(w) ) + link += "dialog-edit-listbox"; + else if ( ::tqqt_cast(w) ) + link += "dialog-edit-listview"; + else if ( ::tqqt_cast(w) ) + link += "dialog-edit-iconview"; + else if ( ::tqqt_cast(w) ) + link += "dialog-edit-table"; + else if ( ::tqqt_cast(w) ) + link += "dialog-text"; + + else { + TQMessageBox::information( this, i18n( "Help" ), + i18n( "There is no help available for this dialog at the moment." ) ); + return; + } + + assistant->showPage( link ); +} + +void MainWindow::setupActionManager() +{ + actionPluginManager = new TQPluginManager( IID_Action, TQApplication::libraryPaths(), pluginDirectory() ); + + TQStringList lst = actionPluginManager->featureList(); + for ( TQStringList::ConstIterator ait = lst.begin(); ait != lst.end(); ++ait ) { + ActionInterface *iface = 0; + actionPluginManager->queryInterface( *ait, &iface ); + if ( !iface ) + continue; + + iface->connectTo( desInterface ); + TQAction *a = iface->create( *ait, TQT_TQOBJECT(this) ); + if ( !a ) + continue; + + TQString grp = iface->group( *ait ); + if ( grp.isEmpty() ) + grp = "3rd party actions"; + TQPopupMenu *menu = 0; + TQToolBar *tb = 0; + + if ( !( menu = (TQPopupMenu*)child( grp.latin1(), TQPOPUPMENU_OBJECT_NAME_STRING ) ) ) { + menu = new TQPopupMenu( this, grp.latin1() ); + menuBar()->insertItem( i18n( grp ), menu ); + } + if ( !( tb = (TQToolBar*)child( grp.latin1(), TQTOOLBAR_OBJECT_NAME_STRING ) ) ) { + tb = new TQToolBar( this, grp.latin1() ); + tb->setCloseMode( TQDockWindow::Undocked ); + addToolBar( tb, grp ); + } + + if ( iface->location( *ait, ActionInterface::Menu ) ) + a->addTo( menu ); + if ( iface->location( *ait, ActionInterface::Toolbar ) ) + a->addTo( tb ); + + iface->release(); + } +} + +void MainWindow::editFunction( const TQString &func, bool rereadSource ) +{ + if ( !formWindow() ) + return; + + if ( formWindow()->formFile()->codeFileState() != FormFile::Ok ) + if ( !formWindow()->formFile()->setupUihFile(FALSE) ) + return; + + TQString lang = currentProject->language(); + if ( !MetaDataBase::hasEditor( lang ) ) { + TQMessageBox::information( this, i18n( "Edit Source" ), + i18n( "There is no plugin for editing %1 code installed.\n" + "Note: Plugins are not available in static TQt configurations." ).arg( lang ) ); + return; + } + + for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { + if ( e->language() == lang && e->formWindow() == formWindow() ) { + e->show(); + e->setFunction( func ); + return; + } + } + + createSourceEditor( TQT_TQOBJECT(formWindow()), formWindow()->project(), lang, func, rereadSource ); +} + +void MainWindow::setupRecentlyFilesMenu() +{ + recentlyFilesMenu->clear(); + int id = 0; + for ( TQStringList::ConstIterator it = recentlyFiles.begin(); it != recentlyFiles.end(); ++it ) { + recentlyFilesMenu->insertItem( *it, id ); + id++; + } +} + +void MainWindow::setupRecentlyProjectsMenu() +{ + recentlyProjectsMenu->clear(); + int id = 0; + for ( TQStringList::ConstIterator it = recentlyProjects.begin(); it != recentlyProjects.end(); ++it ) { + recentlyProjectsMenu->insertItem( *it, id ); + id++; + } +} + +TQPtrList MainWindow::projectList() const +{ + TQPtrList list; + TQMapConstIterator it = projects.begin(); + + while( it != projects.end() ) { + Project *p = it.data(); + ++it; + list.append( p->iFace() ); + } + + return list; +} + +TQStringList MainWindow::projectNames() const +{ + TQStringList res; + for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) + res << (*it)->projectName(); + return res; +} + +TQStringList MainWindow::projectFileNames() const +{ + TQStringList res; + for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) + res << (*it)->makeRelative( (*it)->fileName() ); + return res; +} + +Project *MainWindow::findProject( const TQString &projectName ) const +{ + for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) { + if ( (*it)->projectName() == projectName ) + return *it; + } + return 0; +} + +void MainWindow::setCurrentProject( Project *pro ) +{ + for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) { + if ( *it == pro ) { + projectSelected( it.key() ); + return; + } + } +} + +void MainWindow::setCurrentProjectByFilename( const TQString& proFilename ) +{ + for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) { + if ( (*it)->makeRelative( (*it)->fileName() ) == proFilename ) { + projectSelected( it.key() ); + return; + } + } +} + + +void MainWindow::recentlyFilesMenuActivated( int id ) +{ + if ( id != -1 ) { + if ( !TQFile::exists( *recentlyFiles.at( id ) ) ) { + TQMessageBox::warning( this, i18n( "Open File" ), + i18n( "Could not open '%1'. File does not exist." ). + arg( *recentlyFiles.at( id ) ) ); + recentlyFiles.remove( recentlyFiles.at( id ) ); + return; + } + fileOpen( "", "", *recentlyFiles.at( id ) ); + TQString fn( *recentlyFiles.at( id ) ); + addRecentlyOpened( fn, recentlyFiles ); + } +} + +void MainWindow::recentlyProjectsMenuActivated( int id ) +{ + if ( id != -1 ) { + if ( !TQFile::exists( *recentlyProjects.at( id ) ) ) { + TQMessageBox::warning( this, i18n( "Open Project" ), + i18n( "Could not open '%1'. File does not exist." ). + arg( *recentlyProjects.at( id ) ) ); + recentlyProjects.remove( recentlyProjects.at( id ) ); + return; + } + openProject( *recentlyProjects.at( id ) ); + TQString fn( *recentlyProjects.at( id ) ); + addRecentlyOpened( fn, recentlyProjects ); + } +} + +void MainWindow::addRecentlyOpened( const TQString &fn, TQStringList &lst ) +{ + TQFileInfo fi( fn ); + fi.convertToAbs(); + TQString f = fi.filePath(); + if ( lst.find( f ) != lst.end() ) + lst.remove( f ); + if ( lst.count() >= 10 ) + lst.pop_back(); + lst.prepend( f ); +} + +TemplateWizardInterface * MainWindow::templateWizardInterface( const TQString& className ) +{ + TemplateWizardInterface* iface = 0; + templateWizardPluginManager->queryInterface( className, & iface ); + return iface; +} + +void MainWindow::setupPluginManagers() +{ + editorPluginManager = new TQPluginManager( IID_Editor, TQApplication::libraryPaths(), "/kdevdesigner" ); + MetaDataBase::setEditor( editorPluginManager->featureList() ); + + templateWizardPluginManager = + new TQPluginManager( IID_TemplateWizard, TQApplication::libraryPaths(), pluginDirectory() ); + + MetaDataBase::setupInterfaceManagers( "/designer" ); + preferencePluginManager = + new TQPluginManager( IID_Preference, TQApplication::libraryPaths(), pluginDirectory() ); + projectSettingsPluginManager = + new TQPluginManager( IID_ProjectSettings, TQApplication::libraryPaths(), pluginDirectory() ); + sourceTemplatePluginManager = + new TQPluginManager( IID_SourceTemplate, TQApplication::libraryPaths(), pluginDirectory() ); + + if ( preferencePluginManager ) { + TQStringList lst = preferencePluginManager->featureList(); + for ( TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { + PreferenceInterface *i = 0; + preferencePluginManager->queryInterface( *it, &i ); + if ( !i ) + continue; + i->connectTo( designerInterface() ); + PreferenceInterface::Preference *pf = i->preference(); + if ( pf ) + addPreferencesTab( pf->tab, pf->title, pf->receiver, pf->init_slot, pf->accept_slot ); + i->deletePreferenceObject( pf ); + + i->release(); + } + } + if ( projectSettingsPluginManager ) { + TQStringList lst = projectSettingsPluginManager->featureList(); + for ( TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { + ProjectSettingsInterface *i = 0; + projectSettingsPluginManager->queryInterface( *it, &i ); + if ( !i ) + continue; + i->connectTo( designerInterface() ); + + ProjectSettingsInterface::ProjectSettings *pf = i->projectSetting(); + if ( pf ) + addProjectTab( pf->tab, pf->title, pf->receiver, pf->init_slot, pf->accept_slot ); + i->deleteProjectSettingsObject( pf ); + i->release(); + } + } +} + +void MainWindow::addPreferencesTab( TQWidget *tab, const TQString &title, TQObject *receiver, const char *init_slot, const char *accept_slot ) +{ + Tab t; + t.w = tab; + t.title = title; + t.receiver = receiver; + t.init_slot = init_slot; + t.accept_slot = accept_slot; + preferenceTabs << t; +} + +void MainWindow::addProjectTab( TQWidget *tab, const TQString &title, TQObject *receiver, const char *init_slot, const char *accept_slot ) +{ + Tab t; + t.w = tab; + t.title = title; + t.receiver = receiver; + t.init_slot = init_slot; + t.accept_slot = accept_slot; + projectTabs << t; +} + +void MainWindow::setModified( bool b, TQWidget *window ) +{ + TQWidget *w = window; + while ( w ) { + if ( ::tqqt_cast(w) ) { + ( (FormWindow*)w )->modificationChanged( b ); + return; + } else if ( ::tqqt_cast(w) ) { + FormWindow *fw = ( (SourceEditor*)w )->formWindow(); + if ( fw && !fw->isFake() ) { + //fw->commandHistory()->setModified( b ); + //fw->modificationChanged( b ); + fw->formFile()->setModified( b, FormFile::WFormCode ); + wspace->update( fw->formFile() ); + } else { + wspace->update(); + } + return; + } + w = w->parentWidget( TRUE ); + } +} + +void MainWindow::editorClosed( SourceEditor *e ) +{ + sourceEditors.take( sourceEditors.findRef( e ) ); +} + +void MainWindow::functionsChanged() +{ + updateFunctionsTimer->start( 0, TRUE ); +} + +void MainWindow::doFunctionsChanged() +{ + for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) + e->refresh( FALSE ); + hierarchyView->formDefinitionView()->refresh(); +} + +void MainWindow::updateFunctionList() +{ + if ( !qWorkspace()->activeWindow() || !::tqqt_cast(qWorkspace()->activeWindow()) ) + return; + SourceEditor *se = (SourceEditor*)qWorkspace()->activeWindow(); + se->save(); + hierarchyView->formDefinitionView()->refresh(); + if ( !currentProject->isCpp() && se->formWindow() ) { + LanguageInterface *iface = MetaDataBase::languageInterface( currentProject->language() ); + if ( !iface ) + return; + TQValueList conns; + iface->connections( se->text(), &conns ); + MetaDataBase::setupConnections( TQT_TQOBJECT(se->formWindow()), conns ); + propertyEditor->eventList()->setup(); + } +} + +void MainWindow::updateWorkspace() +{ + wspace->setCurrentProject( currentProject ); +} + +void MainWindow::showDebugStep( TQObject *o, int line ) +{ + for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) + e->clearStep(); + if ( !o || line == -1 ) + return; + showSourceLine( o, line, Step ); +} + +void MainWindow::showStackFrame( TQObject *o, int line ) +{ + if ( !o || line == -1 ) + return; + showSourceLine( o, line, StackFrame ); +} + +void MainWindow::showErrorMessage( TQObject *o, int errorLine, const TQString &errorMessage ) +{ + if ( o ) { + errorLine--; // ###### + TQValueList l; + l << ( errorLine + 1 ); + TQStringList l2; + l2 << errorMessage; + TQObjectList ol; + ol.append( o ); + TQStringList ll; + ll << currentProject->locationOfObject( o ); + oWindow->setErrorMessages( l2, l, TRUE, ll, ol ); + showSourceLine( o, errorLine, Error ); + } +} + +void MainWindow::finishedRun() +{ + inDebugMode = FALSE; + previewing = FALSE; + debuggingForms.clear(); + enableAll( TRUE ); + for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { + if ( e->project() == currentProject ) + e->editorInterface()->setMode( EditorInterface::Editing ); + e->clearStackFrame(); + } + outputWindow()->clearErrorMessages(); +} + +void MainWindow::enableAll( bool enable ) +{ + menuBar()->setEnabled( enable ); + TQObjectList *l = queryList( TQDOCKWINDOW_OBJECT_NAME_STRING ); + for ( TQObject *o = l->first(); o; o = l->next() ) { + if ( TQT_BASE_OBJECT(o) == wspace->parentWidget() || + TQT_BASE_OBJECT(o) == oWindow->parentWidget() || + TQT_BASE_OBJECT(o) == hierarchyView->parentWidget() ) + continue; + ( (TQWidget*)o )->setEnabled( enable ); + } + delete l; +} + +void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm ) +{ + TQWidgetList windows = qworkspace->windowList(); + for ( TQWidget *w = windows.first(); w; w = windows.next() ) { + FormWindow *fw = 0; + SourceEditor *se = 0; + SourceFile *sf = 0; + if ( ::tqqt_cast(w) ) { + fw = (FormWindow*)w; + } else if ( ::tqqt_cast(w) ) { + se = (SourceEditor*)w; + if ( !se->object() ) + continue; + if ( se->formWindow() ) + fw = se->formWindow(); + else + sf = se->sourceFile(); + } + + if ( fw ) { + if ( fw->project() != currentProject ) + continue; + if ( qstrcmp( fw->name(), o->name() ) == 0 || + fw->isFake() && currentProject->objectForFakeForm( fw ) == o ) { + if ( se ) { + switch ( lm ) { + case Error: + se->editorInterface()->setError( line ); + break; + case Step: + se->editorInterface()->setStep( line ); + break; + case StackFrame: + se->editorInterface()->setStackFrame( line ); + break; + } + return; + } else { + fw->showNormal(); + fw->setFocus(); + lastActiveFormWindow = fw; + tqApp->processEvents(); + se = editSource(); + if ( se ) { + switch ( lm ) { + case Error: + se->editorInterface()->setError( line ); + break; + case Step: + se->editorInterface()->setStep( line ); + break; + case StackFrame: + se->editorInterface()->setStackFrame( line ); + break; + } + return; + } + } + } + } else if ( se ) { + if ( o != sf ) + continue; + switch ( lm ) { + case Error: + se->editorInterface()->setError( line ); + break; + case Step: + se->editorInterface()->setStep( line ); + break; + case StackFrame: + se->editorInterface()->setStackFrame( line ); + break; + } + return; + } + } + + if ( ::tqqt_cast(o) ) { + for ( TQPtrListIterator sources = currentProject->sourceFiles(); + sources.current(); ++sources ) { + SourceFile* f = sources.current(); + if ( f == o ) { + SourceEditor *se = editSource( f ); + if ( se ) { + switch ( lm ) { + case Error: + se->editorInterface()->setError( line ); + break; + case Step: + se->editorInterface()->setStep( line ); + break; + case StackFrame: + se->editorInterface()->setStackFrame( line ); + break; + } + } + return; + } + } + } + + FormFile *ff = currentProject->fakeFormFileFor( o ); + FormWindow *fw = 0; + if ( ff ) + fw = ff->formWindow(); + + if ( !fw && !qwf_forms ) { + tqWarning( "MainWindow::showSourceLine: qwf_forms is NULL!" ); + return; + } + + mblockNewForms = TRUE; + if ( !fw ) + openFormWindow( currentProject->makeAbsolute( *qwf_forms->find( (TQWidget*)o ) ) ); + else + fw->formFile()->showEditor( FALSE ); + tqApp->processEvents(); // give all views the chance to get the formwindow + SourceEditor *se = editSource(); + if ( se ) { + switch ( lm ) { + case Error: + se->editorInterface()->setError( line ); + break; + case Step: + se->editorInterface()->setStep( line ); + break; + case StackFrame: + se->editorInterface()->setStackFrame( line ); + break; + } + } + mblockNewForms = FALSE; +} + + +TQObject *MainWindow::findRealObject( TQObject *o ) +{ + TQWidgetList windows = qWorkspace()->windowList(); + for ( TQWidget *w = windows.first(); w; w = windows.next() ) { + if ( ::tqqt_cast(w) && TQString( w->name() ) == TQString( o->name() ) ) + return TQT_TQOBJECT(w); + else if ( ::tqqt_cast(w) && ( (SourceEditor*)w )->formWindow() && + TQString( ( (SourceEditor*)w )->formWindow()->name() ) == TQString( o->name() ) ) + return TQT_TQOBJECT(w); + else if ( ::tqqt_cast(w) && ( (SourceEditor*)w )->sourceFile() && + ( (SourceEditor*)w )->sourceFile() == o ) + return o; + } + return 0; +} + +void MainWindow::formNameChanged( FormWindow *fw ) +{ + for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { + if ( TQT_BASE_OBJECT(e->object()) == TQT_BASE_OBJECT(fw) ) + e->refresh( TRUE ); + if ( e->project() == fw->project() ) + e->resetContext(); + } +} + +void MainWindow::breakPointsChanged() +{ + if ( !inDebugMode ) + return; + if ( !qWorkspace()->activeWindow() || !::tqqt_cast(qWorkspace()->activeWindow()) ) + return; + SourceEditor *e = (SourceEditor*)qWorkspace()->activeWindow(); + if ( !e->object() || !e->project() ) + return; + if ( e->project() != currentProject ) + return; + + if ( !interpreterPluginManager ) { + interpreterPluginManager = + new TQPluginManager( IID_Interpreter, + TQApplication::libraryPaths(), + "/qsa" ); + } + + InterpreterInterface *iiface = 0; + if ( interpreterPluginManager ) { + TQString lang = currentProject->language(); + iiface = 0; + interpreterPluginManager->queryInterface( lang, &iiface ); + if ( !iiface ) + return; + } + + e->saveBreakPoints(); + + for ( TQObject *o = debuggingForms.first(); o; o = debuggingForms.next() ) { + if ( qstrcmp( o->name(), e->object()->name() ) == 0 ) { + iiface->setBreakPoints( o, MetaDataBase::breakPoints( e->object() ) ); + break; + } + } + + for ( e = sourceEditors.first(); e; e = sourceEditors.next() ) { + if ( e->project() == currentProject && e->sourceFile() ) { + TQValueList bps = MetaDataBase::breakPoints( e->sourceFile() ); + iiface->setBreakPoints( e->object(), bps ); + } + } + + iiface->release(); +} + +int MainWindow::currentLayoutDefaultSpacing() const +{ + if ( ( (MainWindow*)this )->formWindow() ) + return ( (MainWindow*)this )->formWindow()->layoutDefaultSpacing(); + return BOXLAYOUT_DEFAULT_SPACING; +} + +int MainWindow::currentLayoutDefaultMargin() const +{ + if ( ( (MainWindow*)this )->formWindow() ) + return ( (MainWindow*)this )->formWindow()->layoutDefaultMargin(); + return BOXLAYOUT_DEFAULT_MARGIN; +} + +void MainWindow::saveAllBreakPoints() +{ + for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { + e->save(); + e->saveBreakPoints(); + } +} + +void MainWindow::resetBreakPoints() +{ + for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) + e->resetBreakPoints(); +} + +SourceFile *MainWindow::sourceFile() +{ + for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { + if ( qworkspace->activeWindow() == e ) { + if ( e->sourceFile() ) + return e->sourceFile(); + } + } + return 0; +} + +bool MainWindow::openProjectSettings( Project *pro ) +{ + ProjectSettings dia( pro, this, 0, TRUE ); + SenderObject *senderObject = new SenderObject( designerInterface() ); + TQValueList::ConstIterator it; + for ( it = projectTabs.begin(); it != projectTabs.end(); ++it ) { + Tab t = *it; + if ( t.title != pro->language() ) + continue; + dia.tabWidget->addTab( t.w, t.title ); + if ( t.receiver ) { + connect( dia.buttonOk, TQT_SIGNAL( clicked() ), senderObject, TQT_SLOT( emitAcceptSignal() ) ); + connect( senderObject, TQT_SIGNAL( acceptSignal( TQUnknownInterface * ) ), t.receiver, t.accept_slot ); + connect( senderObject, TQT_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot ); + senderObject->emitInitSignal(); + disconnect( senderObject, TQT_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot ); + } + } + + if ( singleProject ) + dia.tabWidget->setTabEnabled( dia.tabSettings, FALSE ); + + int res = dia.exec(); + + delete senderObject; + + for ( it = projectTabs.begin(); it != projectTabs.end(); ++it ) { + Tab t = *it; + dia.tabWidget->removePage( t.w ); + t.w->reparent( 0, TQPoint(0,0), FALSE ); + } + + return res == TQDialog::Accepted; +} + +void MainWindow::popupProjectMenu( const TQPoint &pos ) +{ + projectMenu->exec( pos ); +} + +TQStringList MainWindow::sourceTemplates() const +{ + return sourceTemplatePluginManager->featureList(); +} + +SourceTemplateInterface* MainWindow::sourceTemplateInterface( const TQString& templ ) +{ + SourceTemplateInterface *iface = 0; + sourceTemplatePluginManager->queryInterface( templ, &iface); + return iface; +} + +TQString MainWindow::whatsThisFrom( const TQString &key ) +{ + if ( menuHelpFile.isEmpty() ) { + TQString fn( documentationPath() ); + fn += "/designer-manual-11.html"; + TQFile f( fn ); + if ( f.open( IO_ReadOnly ) ) { + TQTextStream ts( &f ); + menuHelpFile = ts.read(); + } + } + + int i = menuHelpFile.find( key ); + if ( i == -1 ) + return TQString(); + int start = i; + int end = i; + start = menuHelpFile.findRev( "
  • ", i ) + 4; + end = menuHelpFile.find( '\n', i ) - 1; + return menuHelpFile.mid( start, end - start + 1 ); +} + +void MainWindow::setSingleProject( Project *pro ) +{ + if ( eProject ) { + Project *pro = eProject; + pro->save(); + TQWidgetList windows = qWorkspace()->windowList(); + qWorkspace()->blockSignals( TRUE ); + TQWidgetListIt wit( windows ); + while ( wit.current() ) { + TQWidget *w = wit.current(); + ++wit; + if ( ::tqqt_cast(w) ) { + if ( ( (FormWindow*)w )->project() == pro ) { + if ( ( (FormWindow*)w )->formFile()->editor() ) + windows.removeRef( ( (FormWindow*)w )->formFile()->editor() ); + ( (FormWindow*)w )->formFile()->close(); + } + } else if ( ::tqqt_cast(w) ) { + ( (SourceEditor*)w )->close(); + } + } + hierarchyView->clear(); + windows = qWorkspace()->windowList(); + qWorkspace()->blockSignals( FALSE ); + currentProject = 0; + updateUndoRedo( FALSE, FALSE, TQString(), TQString() ); + } + + singleProject = TRUE; + projects.clear(); + TQAction *a = new TQAction( i18n( pro->name() ), i18n( pro->name() ), 0, + actionGroupProjects, 0, TRUE ); + eProject = pro; + projects.insert( a, eProject ); + a->setOn( TRUE ); + actionGroupProjects->removeFrom( projectMenu ); + actionGroupProjects->removeFrom( projectToolBar ); + currentProject = eProject; + currentProject->designerCreated(); +} + +void MainWindow::shuttingDown() +{ + outputWindow()->shuttingDown(); +} + +void MainWindow::showGUIStuff( bool b ) +{ + if ( (bool)guiStuffVisible == b ) + return; + guiStuffVisible = b; + if ( !b ) { + setAppropriate( (TQDockWindow*)toolBox->parentWidget(), FALSE ); + toolBox->parentWidget()->hide(); + for ( TQToolBar *tb = widgetToolBars.first(); tb; tb = widgetToolBars.next() ) { + tb->hide(); + setAppropriate( tb, FALSE ); + } + propertyEditor->setPropertyEditorEnabled( FALSE ); + setAppropriate( layoutToolBar, FALSE ); + layoutToolBar->hide(); + setAppropriate( toolsToolBar, FALSE ); + toolsToolBar->hide(); + menubar->removeItem( toolsMenuId ); + menubar->removeItem( toolsMenuId + 1 ); + menubar->removeItem( toolsMenuId + 2 ); + disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) ); + disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) ); + disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQT_SLOT( setEnabled(bool) ) ); + disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQT_SLOT( setEnabled(bool) ) ); + disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQT_SLOT( setEnabled(bool) ) ); + actionEditFormSettings->setEnabled( FALSE ); + actionEditSource->setEnabled( FALSE ); + actionEditConnections->setEnabled( FALSE ); + actionEditFunctions->setEnabled( FALSE ); + actionEditAccels->setEnabled( FALSE ); + ( (TQDockWindow*)propertyEditor->parentWidget() )-> + setCaption( i18n( "Signal Handlers" ) ); + actionGroupNew->removeFrom( fileMenu ); + actionGroupNew->removeFrom( projectToolBar ); + actionFileSave->removeFrom( fileMenu ); + actionFileSave->removeFrom( projectToolBar ); + actionFileExit->removeFrom( fileMenu ); + actionNewFile->addTo( fileMenu ); + actionNewFile->addTo( projectToolBar ); + actionFileSave->addTo( fileMenu ); + actionFileSave->addTo( projectToolBar ); + actionFileExit->addTo( fileMenu ); + } else { + setAppropriate( (TQDockWindow*)toolBox->parentWidget(), TRUE ); + toolBox->parentWidget()->show(); + for ( TQToolBar *tb = widgetToolBars.first(); tb; tb = widgetToolBars.next() ) { + setAppropriate( tb, TRUE ); + tb->hide(); + } + propertyEditor->setPropertyEditorEnabled( TRUE ); + setAppropriate( layoutToolBar, TRUE ); + layoutToolBar->show(); + setAppropriate( toolsToolBar, TRUE ); + toolsToolBar->show(); + menubar->insertItem( i18n( "&Tools" ), toolsMenu, toolsMenuId, toolsMenuIndex ); + menubar->insertItem( i18n( "&Layout" ), layoutMenu, toolsMenuId + 1, toolsMenuIndex + 1 ); + menubar->insertItem( i18n( "&Preview" ), previewMenu, toolsMenuId + 2, toolsMenuIndex + 2 ); + connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) ); + connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) ); + connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQT_SLOT( setEnabled(bool) ) ); + connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQT_SLOT( setEnabled(bool) ) ); + connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQT_SLOT( setEnabled(bool) ) ); + actionEditFormSettings->setEnabled( TRUE ); + actionEditSource->setEnabled( TRUE ); + actionEditConnections->setEnabled( TRUE ); + actionEditFunctions->setEnabled( TRUE ); + actionEditAccels->setEnabled( TRUE ); + ( (TQDockWindow*)propertyEditor->parentWidget() )-> + setCaption( i18n( "Property Editor/Signal Handlers" ) ); + actionFileSave->removeFrom( fileMenu ); + actionFileSave->removeFrom( projectToolBar ); + actionFileExit->removeFrom( fileMenu ); + actionGroupNew->addTo( fileMenu ); + actionGroupNew->addTo( projectToolBar ); + actionFileSave->addTo( fileMenu ); + actionFileSave->addTo( projectToolBar ); + actionFileExit->addTo( fileMenu ); + } +} + +void MainWindow::setEditorsReadOnly( bool b ) +{ + editorsReadOnly = b; +} + +void MainWindow::setPluginDirectory( const TQString &pd ) +{ + pluginDir = pd; + if ( !qwf_plugin_dir ) + qwf_plugin_dir = new TQString( pd ); + else + *qwf_plugin_dir = pd; +} + +void MainWindow::toggleSignalHandlers( bool show ) +{ + if ( sSignalHandlers == show ) + return; + sSignalHandlers = show; + propertyEditor->setSignalHandlersEnabled( show ); +} + +void MainWindow::statusMessage( const TQString &msg ) +{ + m_part->statusMessage(msg); +} diff --git a/kdevdesigner/designer/mainwindow.h b/kdevdesigner/designer/mainwindow.h new file mode 100644 index 00000000..1b68c14d --- /dev/null +++ b/kdevdesigner/designer/mainwindow.h @@ -0,0 +1,513 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include "metadatabase.h" +#include "../interfaces/actioninterface.h" // for GCC 2.7.* compatibility +#include "../interfaces/editorinterface.h" +#include "../interfaces/templatewizardiface.h" +#include "../interfaces/languageinterface.h" +#include "../interfaces/filterinterface.h" +#include "../interfaces/interpreterinterface.h" +#include "../interfaces/preferenceinterface.h" +#include "../interfaces/projectsettingsiface.h" +#include "../interfaces/sourcetemplateiface.h" +#include "sourceeditor.h" + +#include +#include +#include +#include +#include +#include + +class TQToolBox; +class PropertyEditor; +class TQWorkspace; +class TQMenuBar; +class FormWindow; +class TQPopupMenu; +class HierarchyView; +class TQCloseEvent; +class Workspace; +class ActionEditor; +class Project; +class OutputWindow; +class TQTimer; +class FindDialog; +struct DesignerProject; +class ReplaceDialog; +class GotoLineDialog; +class SourceFile; +class FormFile; +class TQAssistantClient; +class DesignerAction; + +#if defined(TQ_FULL_TEMPLATE_INSTANTIATION) +#include +#else +class TQToolBar; +#endif +class Preferences; + +class KDevDesignerPart; + +class MainWindow : public TQMainWindow +{ + Q_OBJECT + + +public: + enum LineMode { Error, Step, StackFrame }; + + MainWindow( KDevDesignerPart *part, bool asClient, bool single = FALSE, const TQString &plgDir = "/designer" ); + ~MainWindow(); + + HierarchyView *objectHierarchy() const; + Workspace *workspace() const; + PropertyEditor *propertyeditor() const; + ActionEditor *actioneditor() const; + + void resetTool(); + int currentTool() const; + + FormWindow *formWindow(); + + bool unregisterClient( FormWindow *w ); + void editorClosed( SourceEditor *e ); + TQWidget *isAFormWindowChild( TQObject *o ) const; + TQWidget *isAToolBarChild( TQObject *o ) const; + + void insertFormWindow( FormWindow *fw ); + TQWorkspace *qWorkspace() const; + + void popupFormWindowMenu( const TQPoint &gp, FormWindow *fw ); + void popupWidgetMenu( const TQPoint &gp, FormWindow *fw, TQWidget *w ); + + TQPopupMenu *setupNormalHierarchyMenu( TQWidget *parent ); + TQPopupMenu *setupTabWidgetHierarchyMenu( TQWidget *parent, const char *addSlot, const char *removeSlot ); + + FormWindow *openFormWindow( const TQString &fn, bool validFileName = TRUE, FormFile *ff = 0 ); + bool isCustomWidgetUsed( MetaDataBase::CustomWidget *w ); + + void setGrid( const TQPoint &p ); + void setShowGrid( bool b ); + void setSnapGrid( bool b ); + TQPoint grid() const { return grd; } + bool showGrid() const { return sGrid; } + bool snapGrid() const { return snGrid && sGrid; } + + TQString documentationPath() const; + + static MainWindow *self; + + TQString templatePath() const { return templPath; } + + void editFunction( const TQString &func, bool rereadSource = FALSE ); + + bool isPreviewing() const { return previewing; } + + Project *currProject() const { return currentProject; } + + FormWindow *activeForm() const { return lastActiveFormWindow; } + + TemplateWizardInterface* templateWizardInterface( const TQString& className ); + TQStringList sourceTemplates() const; + SourceTemplateInterface* sourceTemplateInterface( const TQString& templ ); + TQUnknownInterface* designerInterface() const { return desInterface; } + TQPtrList projectList() const; + TQStringList projectNames() const; + TQStringList projectFileNames() const; + Project *findProject( const TQString &projectName ) const; + void setCurrentProject( Project *pro ); + void setCurrentProjectByFilename( const TQString& proFilename ); + OutputWindow *outputWindow() const { return oWindow; } + void addPreferencesTab( TQWidget *tab, const TQString &title, TQObject *receiver, const char *init_slot, const char *accept_slot ); + void addProjectTab( TQWidget *tab, const TQString &title, TQObject *receiver, const char *init_slot, const char *accept_slot ); + void setModified( bool b, TQWidget *window ); + void functionsChanged(); + void updateFunctionList(); + void updateWorkspace(); + void runProjectPrecondition(); + void runProjectPostcondition( TQObjectList *l ); + + void formNameChanged( FormWindow *fw ); + + int currentLayoutDefaultSpacing() const; + int currentLayoutDefaultMargin() const; + + void saveAllBreakPoints(); + void resetBreakPoints(); + + SourceFile *sourceFile(); + void createNewProject( const TQString &lang ); + + void popupProjectMenu( const TQPoint &pos ); + TQObject *findRealObject( TQObject *o ); + + void setSingleProject( Project *pro ); + bool singleProjectMode() const { return singleProject; } + + void showSourceLine( TQObject *o, int line, LineMode lm ); + + void shuttingDown(); + void showGUIStuff( bool b ); + void setEditorsReadOnly( bool b ); + bool areEditorsReadOnly() const { return editorsReadOnly; } + void toggleSignalHandlers( bool show ); + bool showSignalHandlers() const { return sSignalHandlers; } + void writeConfig(); + + void openProject( const TQString &fn ); + void setPluginDirectory( const TQString &pd ); + TQString pluginDirectory() const { return pluginDir; } + + TQAssistantClient* assistantClient() const { return assistant; } + + void addRecentlyOpenedFile( const TQString &fn ) { addRecentlyOpened( fn, recentlyFiles ); } + + void statusMessage(const TQString &msg); + + //integration + KDevDesignerPart *part() const { return m_part; } + +public slots: + void showProperties( TQObject *w ); + void updateProperties( TQObject *w ); + void showDialogHelp(); + void showDebugStep( TQObject *o, int line ); + void showStackFrame( TQObject *o, int line ); + void showErrorMessage( TQObject *o, int line, const TQString &errorMessage ); + void finishedRun(); + void breakPointsChanged(); + +signals: + void currentToolChanged(); + void hasActiveForm( bool ); + void hasActiveWindow( bool ); + void hasActiveWindowOrProject( bool ); + void hasNonDummyProject( bool ); + void formModified( bool ); + void formWindowsChanged(); + void formWindowChanged(); + void projectChanged(); + void editorChanged(); + +protected: + bool eventFilter( TQObject *o, TQEvent *e ); + void closeEvent( TQCloseEvent *e ); + +public slots: + void fileNew(); + void fileNewDialog(); + void fileNewFile(); + void fileClose(); + void fileQuit(); + void fileCloseProject(); // not visible in menu, called from fileClose + void fileOpen(); + void fileOpen( const TQString &filter, const TQString &extension, const TQString &filename = "" , bool inProject = TRUE ); + bool fileSave(); + bool fileSaveForm(); // not visible in menu, called from fileSave + bool fileSaveProject(); // not visible in menu, called from fileSaveProject + bool fileSaveAs(); + void fileSaveAll(); + void fileCreateTemplate(); + +public slots: + void editUndo(); + void editRedo(); + void editCut(); + void editCopy(); + void editPaste(); + void editDelete(); + void editSelectAll(); + void editLower(); + void editRaise(); + void editAdjustSize(); + void editLayoutHorizontal(); + void editLayoutVertical(); + void editLayoutHorizontalSplit(); + void editLayoutVerticalSplit(); + void editLayoutGrid(); + void editLayoutContainerHorizontal(); + void editLayoutContainerVertical(); + void editLayoutContainerGrid(); + void editBreakLayout(); + void editAccels(); + void editFunctions(); + void editConnections(); + SourceEditor *editSource(); + SourceEditor *editSource( SourceFile *f ); + SourceEditor *openSourceEditor(); + SourceEditor *createSourceEditor( TQObject *object, Project *project, + const TQString &lang = TQString(), + const TQString &func = TQString(), + bool rereadSource = FALSE ); + void editFormSettings(); + void editProjectSettings(); + void editPixmapCollection(); + void editDatabaseConnections(); + void editPreferences(); + + void projectInsertFile(); + + void searchFind(); + void searchIncremetalFindMenu(); + void searchIncremetalFind(); + void searchIncremetalFindNext(); + void searchReplace(); + void searchGotoLine(); + + void previewForm(); + void previewForm( const TQString& ); + + void toolsCustomWidget(); + void toolsConfigure(); + + void helpContents(); + void helpManual(); + void helpAbout(); + void helpAboutQt(); + void helpRegister(); + +private slots: + void activeWindowChanged( TQWidget *w ); + void updateUndoRedo( bool, bool, const TQString &, const TQString & ); + void updateEditorUndoRedo(); + + void toolSelected( TQAction* ); + + void clipboardChanged(); + void selectionChanged(); + + void windowsMenuActivated( int id ); + void setupWindowActions(); + + void createNewTemplate(); + void projectSelected( TQAction *a ); + + void setupRecentlyFilesMenu(); + void setupRecentlyProjectsMenu(); + void recentlyFilesMenuActivated( int id ); + void recentlyProjectsMenuActivated( int id ); + + void emitProjectSignals(); + + void showStartDialog(); + +private: + void setupMDI(); + void setupMenuBar(); + void setupEditActions(); + void setupProjectActions(); + void setupSearchActions(); + void setupToolActions(); + void setupLayoutActions(); + void setupFileActions(); + void setupPreviewActions(); + void setupHelpActions(); + void setupRMBMenus(); + + void setupPropertyEditor(); + void setupHierarchyView(); + void setupWorkspace(); + void setupActionEditor(); + void setupOutputWindow(); + void setupToolbox(); + + void setupActionManager(); + void setupPluginManagers(); + + void enableAll( bool enable ); + + TQWidget* previewFormInternal( TQStyle* style = 0, TQPalette* pal = 0 ); + + void readConfig(); + + void setupRMBProperties( TQValueList &ids, TQMap &props, TQWidget *w ); + void handleRMBProperties( int id, TQMap &props, TQWidget *w ); + void setupRMBSpecialCommands( TQValueList &ids, TQMap &commands, TQWidget *w ); + void handleRMBSpecialCommands( int id, TQMap &commands, TQWidget *w ); + void setupRMBSpecialCommands( TQValueList &ids, TQMap &commands, FormWindow *w ); + void handleRMBSpecialCommands( int id, TQMap &commands, FormWindow *w ); + bool openEditor( TQWidget *w, FormWindow *fw ); + void rebuildCustomWidgetGUI(); + void rebuildCommonWidgetsToolBoxPage(); + void checkTempFiles(); + + void addRecentlyOpened( const TQString &fn, TQStringList &lst ); + + TQString whatsThisFrom( const TQString &key ); + +private slots: + void doFunctionsChanged(); + bool openProjectSettings( Project *pro ); + +private: + struct Tab + { + TQWidget *w; + TQString title; + TQObject *receiver; + const char *init_slot, *accept_slot; + TQ_DUMMY_COMPARISON_OPERATOR( Tab ) + }; + +private: + PropertyEditor *propertyEditor; + HierarchyView *hierarchyView; + Workspace *wspace; + TQWidget *lastPressWidget; + TQWorkspace *qworkspace; + TQMenuBar *menubar; + TQGuardedPtr lastActiveFormWindow; + bool breakLayout, layoutChilds, layoutSelected; + TQPoint grd; + bool sGrid, snGrid; + bool restoreConfig; + bool backPix; + bool splashScreen; + TQString fileFilter; + + TQMap projects; + DesignerAction *actionEditUndo, *actionEditRedo, *actionEditCut, *actionEditCopy, + *actionEditPaste, *actionEditDelete, + *actionEditAdjustSize, + *actionEditHLayout, *actionEditVLayout, *actionEditGridLayout, + *actionEditSplitHorizontal, *actionEditSplitVertical, + *actionEditSelectAll, *actionEditBreakLayout, *actionEditFunctions, *actionEditConnections, + *actionEditLower, *actionEditRaise; + TQAction *actionInsertSpacer; + TQActionGroup *actionGroupTools, *actionGroupProjects; + TQAction* actionPointerTool, *actionConnectTool, *actionOrderTool, *actionBuddyTool; + TQAction* actionCurrentTool; + DesignerAction *actionHelpContents, *actionHelpAbout, *actionHelpAboutTQt, *actionHelpWhatsThis; + DesignerAction *actionHelpManual; +#if defined(TQT_NON_COMMERCIAL) + DesignerAction *actionHelpRegister; +#endif + DesignerAction *actionToolsCustomWidget, *actionEditPreferences; + DesignerAction *actionWindowTile, *actionWindowCascade, *actionWindowClose, *actionWindowCloseAll; + DesignerAction *actionWindowNext, *actionWindowPrevious; + DesignerAction *actionEditFormSettings, *actionEditAccels; + DesignerAction *actionEditSource, *actionNewFile, *actionFileSave, *actionFileExit; + DesignerAction *actionFileClose, *actionFileSaveAs, *actionFileSaveAll; + DesignerAction *actionSearchFind, *actionSearchIncremetal, *actionSearchReplace, *actionSearchGotoLine; + DesignerAction *actionProjectAddFile, *actionEditPixmapCollection, *actionEditDatabaseConnections, + *actionEditProjectSettings, *actionPreview; + TQActionGroup *actionGroupNew; + + TQPopupMenu *rmbWidgets; + TQPopupMenu *rmbFormWindow; + TQPopupMenu *customWidgetMenu, *windowMenu, *fileMenu, *recentlyFilesMenu, *recentlyProjectsMenu; + TQPopupMenu *toolsMenu, *layoutMenu, *previewMenu; + TQToolBar *customWidgetToolBar, *layoutToolBar, *projectToolBar, *customWidgetToolBar2, *toolsToolBar; + TQToolBar *commonWidgetsToolBar; + TQPtrList widgetToolBars; + + Preferences *prefDia; + TQMap propertyDocumentation; + bool client; + TQString templPath; + ActionEditor *actionEditor; + Project *currentProject; + TQPluginManager *actionPluginManager; + TQPluginManager *editorPluginManager; + TQPluginManager *templateWizardPluginManager; + TQPluginManager *interpreterPluginManager; + TQPluginManager *preferencePluginManager; + TQPluginManager *projectSettingsPluginManager; + TQPluginManager *sourceTemplatePluginManager; + TQPtrList sourceEditors; + bool previewing; + TQUnknownInterface *desInterface; + TQStringList recentlyFiles; + TQStringList recentlyProjects; + OutputWindow *oWindow; + TQValueList preferenceTabs; + TQValueList projectTabs; + bool databaseAutoEdit; + TQTimer *updateFunctionsTimer; + TQTimer *autoSaveTimer; + bool autoSaveEnabled; + int autoSaveInterval; + TQLineEdit *incrementalSearch; + TQGuardedPtr findDialog; + TQGuardedPtr replaceDialog; + TQGuardedPtr gotoLineDialog; + Project *eProject; + bool inDebugMode; + TQObjectList debuggingForms; + TQString lastOpenFilter; + TQGuardedPtr previewedForm; + TQPopupMenu *projectMenu; + TQString menuHelpFile; + bool singleProject; + TQToolBox *toolBox; + int toolsMenuId, toolsMenuIndex; + uint guiStuffVisible : 1; + uint editorsReadOnly : 1; + uint savePluginPaths : 1; + TQAssistantClient *assistant; + bool shStartDialog; + TQString pluginDir; + bool sSignalHandlers; + + KDevDesignerPart *m_part; + +public: + TQString lastSaveFilter; + TQPtrList toolActions; + TQPtrList commonWidgetsPage; + +friend class KDevDesignerPart; +}; + +class SenderObject : public TQObject +{ + Q_OBJECT + + +public: + SenderObject( TQUnknownInterface *i ) : iface( i ) { iface->addRef(); } + ~SenderObject() { iface->release(); } + +public slots: + void emitInitSignal() { emit initSignal( iface ); } + void emitAcceptSignal() { emit acceptSignal( iface ); } + +signals: + void initSignal( TQUnknownInterface * ); + void acceptSignal( TQUnknownInterface * ); + +private: + TQUnknownInterface *iface; + +}; + +#endif diff --git a/kdevdesigner/designer/mainwindowactions.cpp b/kdevdesigner/designer/mainwindowactions.cpp new file mode 100644 index 00000000..7fa1d1f7 --- /dev/null +++ b/kdevdesigner/designer/mainwindowactions.cpp @@ -0,0 +1,2067 @@ +/********************************************************************** +** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "mainwindow.h" + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "defs.h" +#include "project.h" +#include "widgetdatabase.h" +#include "widgetfactory.h" +#include "preferences.h" +#include "formwindow.h" +#include "newformimpl.h" +#include "resource.h" +#include "projectsettingsimpl.h" +#include "workspace.h" +#include "createtemplate.h" +#include "hierarchyview.h" +#include "editfunctionsimpl.h" +#include "finddialog.h" +#include "replacedialog.h" +#include "gotolinedialog.h" +#include "formsettingsimpl.h" +#include "pixmapcollectioneditor.h" +#include "styledbutton.h" +#include "customwidgeteditorimpl.h" +#ifndef TQT_NO_SQL +#include "dbconnectionsimpl.h" +#include "dbconnectionimpl.h" +#endif +#include "widgetaction.h" +#include +#include "startdialogimpl.h" +#include "designerappiface.h" +#include "connectiondialog.h" +#include "configtoolboxdialog.h" +#include "designeraction.h" + +#include "kdevdesigner_part.h" + +static const char * whatsthis_image[] = { + "16 16 3 1", + " c None", + "o c #000000", + "a c #000080", + "o aaaaa ", + "oo aaa aaa ", + "ooo aaa aaa", + "oooo aa aa", + "ooooo aa aa", + "oooooo a aaa", + "ooooooo aaa ", + "oooooooo aaa ", + "ooooooooo aaa ", + "ooooo aaa ", + "oo ooo ", + "o ooo aaa ", + " ooo aaa ", + " ooo ", + " ooo ", + " ooo "}; + +const TQString toolbarHelp = "

    Toolbars contain a number of buttons to " +"provide quick access to often used functions.%1" +"
    Click on the toolbar handle to hide the toolbar, " +"or drag and place the toolbar to a different location.

    "; + +static TQIconSet createIconSet( const TQString &name ) +{ + TQIconSet ic( BarIcon( "" + name, KDevDesignerPartFactory::instance() ) ); + TQString prefix = "designer_"; + int right = name.length() - prefix.length(); + ic.setPixmap( BarIcon( prefix + "d_" + name.right( right ), KDevDesignerPartFactory::instance() ), + TQIconSet::Small, TQIconSet::Disabled ); + return ic; +} + +void MainWindow::setupEditActions() +{ + actionEditUndo = new DesignerAction( i18n("Undo"), createIconSet( "designer_undo.png" ),i18n("&Undo: Not Available"), CTRL + Key_Z, TQT_TQOBJECT(this), 0 ); + actionEditUndo->setStatusTip( i18n( "Undoes the last action" ) ); + actionEditUndo->setWhatsThis( whatsThisFrom( "Edit|Undo" ) ); + connect( actionEditUndo, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editUndo() ) ); + actionEditUndo->setEnabled( FALSE ); + + actionEditRedo = new DesignerAction( i18n( "Redo" ), createIconSet("designer_redo.png"), i18n( "&Redo: Not Available" ), CTRL + Key_Y, TQT_TQOBJECT(this), 0 ); + actionEditRedo->setStatusTip( i18n( "Redoes the last undone operation") ); + actionEditRedo->setWhatsThis( whatsThisFrom( "Edit|Redo" ) ); + connect( actionEditRedo, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editRedo() ) ); + actionEditRedo->setEnabled( FALSE ); + + actionEditCut = new DesignerAction( i18n( "Cut" ), createIconSet("designer_editcut.png"), i18n( "Cu&t" ), CTRL + Key_X, TQT_TQOBJECT(this), 0 ); + actionEditCut->setStatusTip( i18n( "Cuts the selected widgets and puts them on the clipboard" ) ); + actionEditCut->setWhatsThis( whatsThisFrom( "Edit|Cut" ) ); + connect( actionEditCut, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editCut() ) ); + actionEditCut->setEnabled( FALSE ); + + actionEditCopy = new DesignerAction( i18n( "Copy" ), createIconSet("designer_editcopy.png"), i18n( "&Copy" ), CTRL + Key_C, TQT_TQOBJECT(this), 0 ); + actionEditCopy->setStatusTip( i18n( "Copies the selected widgets to the clipboard" ) ); + actionEditCopy->setWhatsThis( whatsThisFrom( "Edit|Copy" ) ); + connect( actionEditCopy, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editCopy() ) ); + actionEditCopy->setEnabled( FALSE ); + + actionEditPaste = new DesignerAction( i18n( "Paste" ), createIconSet("designer_editpaste.png"), i18n( "&Paste" ), CTRL + Key_V, TQT_TQOBJECT(this), 0 ); + actionEditPaste->setStatusTip( i18n( "Pastes the clipboard's contents" ) ); + actionEditPaste->setWhatsThis( whatsThisFrom( "Edit|Paste" ) ); + connect( actionEditPaste, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editPaste() ) ); + actionEditPaste->setEnabled( FALSE ); + + actionEditDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Delete, TQT_TQOBJECT(this), 0 ); + actionEditDelete->setStatusTip( i18n( "Deletes the selected widgets" ) ); + actionEditDelete->setWhatsThis( whatsThisFrom( "Edit|Delete" ) ); + connect( actionEditDelete, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editDelete() ) ); + actionEditDelete->setEnabled( FALSE ); +#ifdef TQ_WS_MAC + TQAction *macDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Backspace, TQT_TQOBJECT(this), 0 ); + connect( macDelete, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editDelete() ) ); +#endif + + actionEditSelectAll = new DesignerAction( i18n( "Select All" ), TQPixmap(), i18n( "Select &All" ), CTRL + Key_A, TQT_TQOBJECT(this), 0 ); + actionEditSelectAll->setStatusTip( i18n( "Selects all widgets" ) ); + actionEditSelectAll->setWhatsThis( whatsThisFrom( "Edit|Select All" ) ); + connect( actionEditSelectAll, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editSelectAll() ) ); + actionEditSelectAll->setEnabled( TRUE ); + + actionEditRaise = new DesignerAction( i18n( "Bring to Front" ), createIconSet("designer_editraise.png"), i18n( "Bring to &Front" ), 0, TQT_TQOBJECT(this), 0 ); + actionEditRaise->setStatusTip( i18n( "Raises the selected widgets" ) ); + actionEditRaise->setWhatsThis( i18n( "Raises the selected widgets" ) ); + connect( actionEditRaise, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editRaise() ) ); + actionEditRaise->setEnabled( FALSE ); + + actionEditLower = new DesignerAction( i18n( "Send to Back" ), createIconSet("designer_editlower.png"), i18n( "Send to &Back" ), 0, TQT_TQOBJECT(this), 0 ); + actionEditLower->setStatusTip( i18n( "Lowers the selected widgets" ) ); + actionEditLower->setWhatsThis( i18n( "Lowers the selected widgets" ) ); + connect( actionEditLower, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLower() ) ); + actionEditLower->setEnabled( FALSE ); + + actionEditAccels = new DesignerAction( i18n( "Check Accelerators" ), TQPixmap(), + i18n( "Chec&k Accelerators" ), ALT + Key_R, TQT_TQOBJECT(this), 0 ); + actionEditAccels->setStatusTip( i18n("Checks if the accelerators used in the form are unique") ); + actionEditAccels->setWhatsThis( whatsThisFrom( "Edit|Check Accelerator" ) ); + connect( actionEditAccels, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editAccels() ) ); + connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) ); + + actionEditFunctions = new DesignerAction( i18n( "Slots" ), createIconSet("designer_editslots.png"), + i18n( "S&lots..." ), 0, TQT_TQOBJECT(this), 0 ); + actionEditFunctions->setStatusTip( i18n("Opens a dialog for editing slots") ); + actionEditFunctions->setWhatsThis( whatsThisFrom( "Edit|Slots" ) ); + connect( actionEditFunctions, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editFunctions() ) ); + connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) ); + + actionEditConnections = new DesignerAction( i18n( "Connections" ), createIconSet("designer_connecttool.png"), + i18n( "Co&nnections..." ), 0, TQT_TQOBJECT(this), 0 ); + actionEditConnections->setStatusTip( i18n("Opens a dialog for editing connections") ); + actionEditConnections->setWhatsThis( whatsThisFrom( "Edit|Connections" ) ); + connect( actionEditConnections, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editConnections() ) ); + connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQT_SLOT( setEnabled(bool) ) ); + + actionEditSource = new DesignerAction( i18n( "Source" ), TQIconSet(), + i18n( "&Source..." ), CTRL + Key_E, TQT_TQOBJECT(this), 0 ); + actionEditSource->setStatusTip( i18n("Opens an editor to edit the form's source code") ); + actionEditSource->setWhatsThis( whatsThisFrom( "Edit|Source" ) ); + connect( actionEditSource, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editSource() ) ); + connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQT_SLOT( setEnabled(bool) ) ); + + actionEditFormSettings = new DesignerAction( i18n( "Form Settings" ), TQPixmap(), + i18n( "&Form Settings..." ), 0, TQT_TQOBJECT(this), 0 ); + actionEditFormSettings->setStatusTip( i18n("Opens a dialog to change the form's settings") ); + actionEditFormSettings->setWhatsThis( whatsThisFrom( "Edit|Form Settings" ) ); + connect( actionEditFormSettings, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editFormSettings() ) ); + connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQT_SLOT( setEnabled(bool) ) ); + + actionEditPreferences = new DesignerAction( i18n( "Preferences" ), TQPixmap(), + i18n( "Preferences..." ), 0, TQT_TQOBJECT(this), 0 ); + actionEditPreferences->setStatusTip( i18n("Opens a dialog to change preferences") ); + actionEditPreferences->setWhatsThis( whatsThisFrom( "Edit|Preferences" ) ); + connect( actionEditPreferences, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editPreferences() ) ); + +/* TQToolBar *tb = new TQToolBar( this, "Edit" ); + tb->setCloseMode( TQDockWindow::Undocked ); + TQWhatsThis::add( tb, i18n( "The Edit toolbar%1").arg(i18n(toolbarHelp).arg("")) ); + addToolBar( tb, i18n( "Edit" ) ); + actionEditUndo->addTo( tb ); + actionEditRedo->addTo( tb ); + tb->addSeparator(); + actionEditCut->addTo( tb ); + actionEditCopy->addTo( tb ); + actionEditPaste->addTo( tb );*/ +#if 0 + tb->addSeparator(); + actionEditLower->addTo( tb ); + actionEditRaise->addTo( tb ); +#endif + + TQPopupMenu *menu = new TQPopupMenu( this, "Edit" ); + connect( menu, TQT_SIGNAL( aboutToShow() ), TQT_TQOBJECT(this), TQT_SLOT( updateEditorUndoRedo() ) ); + menubar->insertItem( i18n( "&Edit" ), menu ); + actionEditUndo->addTo( menu ); + actionEditRedo->addTo( menu ); + menu->insertSeparator(); + actionEditCut->addTo( menu ); + actionEditCopy->addTo( menu ); + actionEditPaste->addTo( menu ); + actionEditDelete->addTo( menu ); + actionEditSelectAll->addTo( menu ); + actionEditAccels->addTo( menu ); +#if 0 + menu->insertSeparator(); + actionEditLower->addTo( menu ); + actionEditRaise->addTo( menu ); +#endif + menu->insertSeparator(); + if ( !singleProjectMode() ) { + actionEditFunctions->addTo( menu ); + actionEditConnections->addTo( menu ); + } + actionEditFormSettings->addTo( menu ); + menu->insertSeparator(); + actionEditPreferences->addTo( menu ); +} + +void MainWindow::setupSearchActions() +{ + actionSearchFind = new DesignerAction( i18n( "Find" ), createIconSet( "designer_searchfind.png" ), + i18n( "&Find..." ), CTRL + Key_F, TQT_TQOBJECT(this), 0 ); + connect( actionSearchFind, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchFind() ) ); + actionSearchFind->setEnabled( FALSE ); + actionSearchFind->setWhatsThis( whatsThisFrom( "Search|Find" ) ); + + actionSearchIncremetal = new DesignerAction( i18n( "Find Incremental" ), TQIconSet(), + i18n( "Find &Incremental" ), ALT + Key_I, TQT_TQOBJECT(this), 0 ); + connect( actionSearchIncremetal, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchIncremetalFindMenu() ) ); + actionSearchIncremetal->setEnabled( FALSE ); + actionSearchIncremetal->setWhatsThis( whatsThisFrom( "Search|Find Incremental" ) ); + + actionSearchReplace = new DesignerAction( i18n( "Replace" ), TQIconSet(), + i18n( "&Replace..." ), CTRL + Key_R, TQT_TQOBJECT(this), 0 ); + connect( actionSearchReplace, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchReplace() ) ); + actionSearchReplace->setEnabled( FALSE ); + actionSearchReplace->setWhatsThis( whatsThisFrom( "Search|Replace" ) ); + + actionSearchGotoLine = new DesignerAction( i18n( "Goto Line" ), TQIconSet(), + i18n( "&Goto Line..." ), ALT + Key_G, TQT_TQOBJECT(this), 0 ); + connect( actionSearchGotoLine, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchGotoLine() ) ); + actionSearchGotoLine->setEnabled( FALSE ); + actionSearchGotoLine->setWhatsThis( whatsThisFrom( "Search|Goto line" ) ); + +/* TQToolBar *tb = new TQToolBar( this, "Search" ); + tb->setCloseMode( TQDockWindow::Undocked ); + addToolBar( tb, i18n( "Search" ) ); + + actionSearchFind->addTo( tb );*/ + incrementalSearch = new TQLineEdit( 0 ); + incrementalSearch->hide(); + TQToolTip::add( incrementalSearch, i18n( "Incremental search (Alt+I)" ) ); + connect( incrementalSearch, TQT_SIGNAL( textChanged( const TQString & ) ), + this, TQT_SLOT( searchIncremetalFind() ) ); + connect( incrementalSearch, TQT_SIGNAL( returnPressed() ), + this, TQT_SLOT( searchIncremetalFindNext() ) ); + incrementalSearch->setEnabled( FALSE ); + + TQPopupMenu *menu = new TQPopupMenu( this, "Search" ); + menubar->insertItem( i18n( "&Search" ), menu ); + actionSearchFind->addTo( menu ); + actionSearchIncremetal->addTo( menu ); + actionSearchReplace->addTo( menu ); + menu->insertSeparator(); + actionSearchGotoLine->addTo( menu ); +} + +void MainWindow::setupLayoutActions() +{ + if ( !actionGroupTools ) { + actionGroupTools = new TQActionGroup( this ); + actionGroupTools->setExclusive( TRUE ); + connect( actionGroupTools, TQT_SIGNAL( selected(TQAction*) ), TQT_TQOBJECT(this), TQT_SLOT( toolSelected(TQAction*) ) ); + } + + actionEditAdjustSize = new DesignerAction( i18n( "Adjust Size" ), createIconSet("designer_adjustsize.png"), + i18n( "Adjust &Size" ), CTRL + Key_J, TQT_TQOBJECT(this), 0 ); + actionEditAdjustSize->setStatusTip(i18n("Adjusts the size of the selected widget") ); + actionEditAdjustSize->setWhatsThis( whatsThisFrom( "Layout|Adjust Size" ) ); + connect( actionEditAdjustSize, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editAdjustSize() ) ); + actionEditAdjustSize->setEnabled( FALSE ); + + actionEditHLayout = new DesignerAction( i18n( "Lay OutQt::Horizontally" ), createIconSet("designer_edithlayout.png"), + i18n( "Lay Out &Horizontally" ), CTRL + Key_H, TQT_TQOBJECT(this), 0 ); + actionEditHLayout->setStatusTip(i18n("Lays out the selected widgets horizontally") ); + actionEditHLayout->setWhatsThis( whatsThisFrom( "Layout|Lay OutQt::Horizontally" ) ); + connect( actionEditHLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutHorizontal() ) ); + actionEditHLayout->setEnabled( FALSE ); + + actionEditVLayout = new DesignerAction( i18n( "Lay OutQt::Vertically" ), createIconSet("designer_editvlayout.png"), + i18n( "Lay Out &Vertically" ), CTRL + Key_L, TQT_TQOBJECT(this), 0 ); + actionEditVLayout->setStatusTip(i18n("Lays out the selected widgets vertically") ); + actionEditVLayout->setWhatsThis( whatsThisFrom( "Layout|Lay OutQt::Vertically" ) ); + connect( actionEditVLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutVertical() ) ); + actionEditVLayout->setEnabled( FALSE ); + + actionEditGridLayout = new DesignerAction( i18n( "Lay Out in a Grid" ), createIconSet("designer_editgrid.png"), + i18n( "Lay Out in a &Grid" ), CTRL + Key_G, TQT_TQOBJECT(this), 0 ); + actionEditGridLayout->setStatusTip(i18n("Lays out the selected widgets in a grid") ); + actionEditGridLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out in a Grid" ) ); + connect( actionEditGridLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutGrid() ) ); + actionEditGridLayout->setEnabled( FALSE ); + + actionEditSplitHorizontal = new DesignerAction( i18n( "Lay OutQt::Horizontally (in Splitter)" ), createIconSet("designer_editvlayoutsplit.png"), + i18n( "Lay OutQt::Horizontally (in S&plitter)" ), 0, TQT_TQOBJECT(this), 0 ); + actionEditSplitHorizontal->setStatusTip(i18n("Lays out the selected widgets horizontally in a splitter") ); + actionEditSplitHorizontal->setWhatsThis( whatsThisFrom( "Layout|Lay OutQt::Horizontally (in Splitter)" ) ); + connect( actionEditSplitHorizontal, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutHorizontalSplit() ) ); + actionEditSplitHorizontal->setEnabled( FALSE ); + + actionEditSplitVertical = new DesignerAction( i18n( "Lay OutQt::Vertically (in Splitter)" ), createIconSet("designer_edithlayoutsplit.png"), + i18n( "Lay OutQt::Vertically (in Sp&litter)" ), 0, TQT_TQOBJECT(this), 0 ); + actionEditSplitVertical->setStatusTip(i18n("Lays out the selected widgets vertically in a splitter") ); + actionEditSplitVertical->setWhatsThis( whatsThisFrom( "Layout|Lay OutQt::Vertically (in Splitter)" ) ); + connect( actionEditSplitVertical, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutVerticalSplit() ) ); + actionEditSplitVertical->setEnabled( FALSE ); + + actionEditBreakLayout = new DesignerAction( i18n( "Break Layout" ), createIconSet("designer_editbreaklayout.png"), + i18n( "&Break Layout" ), CTRL + Key_B, TQT_TQOBJECT(this), 0 ); + actionEditBreakLayout->setStatusTip(i18n("Breaks the selected layout") ); + actionEditBreakLayout->setWhatsThis( whatsThisFrom( "Layout|Break Layout" ) ); + connect( actionEditBreakLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editBreakLayout() ) ); + actionEditBreakLayout->setEnabled( FALSE ); + + int id = WidgetDatabase::idFromClassName( "Spacer" ); + actionInsertSpacer = new WidgetAction( i18n( "Layout" ), actionGroupTools, TQString::number( id ).latin1() ); + actionInsertSpacer->setToggleAction( TRUE ); + actionInsertSpacer->setText( WidgetDatabase::className( id ) ); + actionInsertSpacer->setMenuText( i18n( "Add %1").arg( WidgetDatabase::className( id ) ) ); + actionInsertSpacer->setIconSet( WidgetDatabase::iconSet( id ) ); + actionInsertSpacer->setToolTip( WidgetDatabase::toolTip( id ) ); + actionInsertSpacer->setStatusTip( i18n( "Insert a %1").arg(WidgetDatabase::toolTip( id )) ); + actionInsertSpacer->setWhatsThis( i18n("A %1

    %2

    " + "

    Click to insert a single %3," + "or double click to keep the tool selected.") + .arg(WidgetDatabase::toolTip( id )) + .arg(WidgetDatabase::whatsThis( id )) + .arg(WidgetDatabase::toolTip( id ) )); + + actionInsertSpacer->addTo( commonWidgetsToolBar ); + commonWidgetsPage.append( actionInsertSpacer ); + TQWidget *w; + commonWidgetsToolBar->setStretchableWidget( ( w = new TQWidget( commonWidgetsToolBar ) ) ); + w->setBackgroundMode( commonWidgetsToolBar->backgroundMode() ); + TQWhatsThis::add( layoutToolBar, i18n( "The Layout toolbar%1" ).arg(i18n(toolbarHelp).arg("")) ); + actionEditAdjustSize->addTo( layoutToolBar ); + layoutToolBar->addSeparator(); + actionEditHLayout->addTo( layoutToolBar ); + actionEditVLayout->addTo( layoutToolBar ); + actionEditGridLayout->addTo( layoutToolBar ); + actionEditSplitHorizontal->addTo( layoutToolBar ); + actionEditSplitVertical->addTo( layoutToolBar ); + actionEditBreakLayout->addTo( layoutToolBar ); + layoutToolBar->addSeparator(); + actionInsertSpacer->addTo( layoutToolBar ); + + TQPopupMenu *menu = new TQPopupMenu( this, "Layout" ); + layoutMenu = menu; + menubar->insertItem( i18n( "&Layout" ), menu, toolsMenuId + 1 ); + actionEditAdjustSize->addTo( menu ); + menu->insertSeparator(); + actionEditHLayout->addTo( menu ); + actionEditVLayout->addTo( menu ); + actionEditGridLayout->addTo( menu ); + actionEditSplitHorizontal->addTo( menu ); + actionEditSplitVertical->addTo( menu ); + actionEditBreakLayout->addTo( menu ); + menu->insertSeparator(); + actionInsertSpacer->addTo( menu ); +} + +void MainWindow::setupToolActions() +{ + if ( !actionGroupTools ) { + actionGroupTools = new TQActionGroup( this ); + actionGroupTools->setExclusive( TRUE ); + connect( actionGroupTools, TQT_SIGNAL( selected(TQAction*) ), + this, TQT_SLOT( toolSelected(TQAction*) ) ); + } + + actionPointerTool = new DesignerAction( i18n("Pointer"), createIconSet("designer_pointer.png"), + i18n("&Pointer"), Key_F2, + actionGroupTools, + TQString::number(POINTER_TOOL).latin1(), TRUE ); + actionPointerTool->setStatusTip( i18n("Selects the pointer tool") ); + actionPointerTool->setWhatsThis( whatsThisFrom( "Tools|Pointer" ) ); + + actionConnectTool = new DesignerAction( i18n("Connect Signal/Slots"), + createIconSet("designer_connecttool.png"), + i18n("&Connect Signal/Slots"), + singleProjectMode() ? 0 : Key_F3, + actionGroupTools, + TQString::number(CONNECT_TOOL).latin1(), TRUE ); + actionConnectTool->setStatusTip( i18n("Selects the connection tool") ); + actionConnectTool->setWhatsThis( whatsThisFrom( "Tools|Connect Signals and Slots" ) ); + + actionOrderTool = new DesignerAction( i18n("Tab Order"), createIconSet("designer_ordertool.png"), + i18n("Tab &Order"), Key_F4, + actionGroupTools, + TQString::number(ORDER_TOOL).latin1(), TRUE ); + actionOrderTool->setStatusTip( i18n("Selects the tab order tool") ); + actionOrderTool->setWhatsThis( whatsThisFrom( "Tools|Tab Order" ) ); + + actionBuddyTool = new DesignerAction( i18n( "Set Buddy" ), createIconSet( "designer_setbuddy.png" ), + i18n( "Set &Buddy" ), Key_F12, + actionGroupTools, TQString::number( BUDDY_TOOL ).latin1(), + TRUE ); + actionBuddyTool->setStatusTip( i18n( "Sets a buddy to a label" ) ); + actionBuddyTool->setWhatsThis( whatsThisFrom( "Tools|Set Buddy" ) ); + + TQToolBar *tb = new TQToolBar( this, "Tools" ); + tb->setCloseMode( TQDockWindow::Undocked ); + toolsToolBar = tb; + TQWhatsThis::add( tb, i18n( "The Tools toolbar%1" ).arg(i18n(toolbarHelp).arg("")) ); + + addToolBar( tb, i18n( "Tools" ), TQMainWindow::DockTop, FALSE ); + actionPointerTool->addTo( tb ); + if ( !singleProjectMode() ) + actionConnectTool->addTo( tb ); + actionOrderTool->addTo( tb ); + actionBuddyTool->addTo( tb ); + + TQPopupMenu *mmenu = new TQPopupMenu( this, "Tools" ); + toolsMenu = mmenu; + toolsMenuId = 100; + menubar->insertItem( i18n( "&Tools" ), mmenu, toolsMenuId ); + toolsMenuIndex = menubar->indexOf( toolsMenuId ); + actionPointerTool->addTo( mmenu ); + if ( !singleProjectMode() ) + actionConnectTool->addTo( mmenu ); + actionOrderTool->addTo( mmenu ); + actionBuddyTool->addTo( mmenu ); + mmenu->insertSeparator(); + + customWidgetToolBar = 0; + customWidgetMenu = 0; + + actionToolsCustomWidget = new DesignerAction( i18n("Custom Widgets"), + createIconSet( "designer_customwidget.png" ), + i18n("Edit &Custom Widgets..."), 0, TQT_TQOBJECT(this), 0 ); + actionToolsCustomWidget->setStatusTip( i18n("Opens a dialog to add and change " + "custom widgets") ); + actionToolsCustomWidget->setWhatsThis( whatsThisFrom( "Tools|Custom|Edit Custom" + "Widgets" ) ); + connect( actionToolsCustomWidget, TQT_SIGNAL( activated() ), + this, TQT_SLOT( toolsCustomWidget() ) ); + + for ( int j = 0; j < WidgetDatabase::numWidgetGroups(); ++j ) { + TQString grp = WidgetDatabase::widgetGroup( j ); + if ( !WidgetDatabase::isGroupVisible( grp ) || + WidgetDatabase::isGroupEmpty( grp ) ) + continue; + TQToolBar *tb = new TQToolBar( this, grp.latin1() ); + tb->setCloseMode( TQDockWindow::Undocked ); + widgetToolBars.append( tb ); + bool plural = grp[(int)grp.length()-1] == 's'; + if ( plural ) { + TQWhatsThis::add( tb, i18n( "The %1%2" ).arg(grp).arg(i18n(toolbarHelp). + arg( i18n(" Click on a button to insert a single widget, " + "or double click to insert multiple %1.") ).arg(grp)) ); + } else { + TQWhatsThis::add( tb, i18n( "The %1 Widgets%2" ).arg(grp).arg(i18n(toolbarHelp). + arg( i18n(" Click on a button to insert a single %1 widget, " + "or double click to insert multiple widgets.") ).arg(grp)) ); + } + addToolBar( tb, grp ); + tb->hide(); + TQPopupMenu *menu = new TQPopupMenu( this, grp.latin1() ); + mmenu->insertItem( grp, menu ); + + TQToolBar *tb2 = new TQToolBar( grp, 0, toolBox, FALSE, grp.latin1() ); + tb2->setFrameStyle( TQFrame::NoFrame ); + tb2->setOrientation( Qt::Vertical ); + tb2->setBackgroundMode( PaletteBase ); + toolBox->addItem( tb2, grp ); + + if ( grp == "Custom" ) { + if ( !customWidgetMenu ) + actionToolsCustomWidget->addTo( menu ); + else + menu->insertSeparator(); + customWidgetMenu = menu; + customWidgetToolBar = tb; + } + + for ( int i = 0; i < WidgetDatabase::count(); ++i ) { + if ( WidgetDatabase::group( i ) != grp ) + continue; // only widgets, i.e. not forms and temp stuff + WidgetAction* a = + new WidgetAction( grp, actionGroupTools, TQString::number( i ).latin1() ); + a->setToggleAction( TRUE ); + TQString atext = WidgetDatabase::className( i ); + if ( atext[0] == 'Q' ) + atext = atext.mid(1); + while ( atext.length() && atext[0] >= 'a' && atext[0] <= 'z' ) + atext = atext.mid(1); + if ( atext.isEmpty() ) + atext = WidgetDatabase::className( i ); + a->setText( atext ); + TQString ttip = WidgetDatabase::toolTip( i ); + a->setIconSet( WidgetDatabase::iconSet( i ) ); + a->setToolTip( ttip ); + if ( !WidgetDatabase::isWhatsThisLoaded() ) + WidgetDatabase::loadWhatsThis( documentationPath() ); + a->setStatusTip( i18n( "Insert a %1").arg(WidgetDatabase::className( i )) ); + + TQString whats = i18n("A %1").arg( WidgetDatabase::className( i ) ); + if ( !WidgetDatabase::whatsThis( i ).isEmpty() ) + whats += TQString("

    %1

    ").arg(WidgetDatabase::whatsThis( i )); + a->setWhatsThis( whats+ i18n("

    Double click on this tool to keep it selected.

    ") ); + + if ( grp != "KDE" ) + a->addTo( tb ); + a->addTo( menu ); + a->addTo( tb2 ); + if ( WidgetDatabase::isCommon( i ) ) { + a->addTo( commonWidgetsToolBar ); + commonWidgetsPage.append( a ); + } + } + TQWidget *w; + tb2->setStretchableWidget( ( w = new TQWidget( tb2 ) ) ); + w->setBackgroundMode( tb2->backgroundMode() ); + } + + if ( !customWidgetToolBar ) { + TQToolBar *tb = new TQToolBar( this, "Custom Widgets" ); + tb->setCloseMode( TQDockWindow::Undocked ); + TQWhatsThis::add( tb, i18n( "The Custom Widgets toolbar%1" + "

    Click Edit Custom Widgets..." + "in the Tools|Custom menu to " + "add and change custom widgets

    " ). + arg(i18n(toolbarHelp). + arg( i18n(" Click on the buttons to insert a single widget, " + "or double click to insert multiple widgets.") )) ); + addToolBar( tb, i18n( "Custom" ) ); + tb->hide(); + widgetToolBars.append( tb ); + customWidgetToolBar = tb; + TQPopupMenu *menu = new TQPopupMenu( this, "Custom Widgets" ); + mmenu->insertItem( "Custom", menu ); + customWidgetMenu = menu; + customWidgetToolBar->hide(); + actionToolsCustomWidget->addTo( customWidgetMenu ); + customWidgetMenu->insertSeparator(); + TQToolBar *tb2 = new TQToolBar( "Custom Widgets", 0, + toolBox, FALSE, "Custom Widgets" ); + tb2->setBackgroundMode(PaletteBase); + tb2->setOrientation( Qt::Vertical ); + tb2->setFrameStyle( TQFrame::NoFrame ); + toolBox->addItem( tb2, "Custom Widgets" ); + customWidgetToolBar2 = tb2; + } + + TQAction *a = new DesignerAction( i18n( "Configure Toolbox" ), i18n( "Configure Toolbox..." ), 0, TQT_TQOBJECT(this) ); + a->setStatusTip( i18n( "Opens a dialog to configure the common " + "widgets page of the toolbox") ); + connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( toolsConfigure() ) ); + mmenu->insertSeparator(); + a->addTo( mmenu ); + resetTool(); +} + +void MainWindow::setupFileActions() +{ + TQToolBar* tb = new TQToolBar( this, "File" ); + tb->setCloseMode( TQDockWindow::Undocked ); + projectToolBar = tb; + + TQWhatsThis::add( tb, i18n( "The File toolbar%1" ).arg(i18n(toolbarHelp).arg("")) ); + addToolBar( tb, i18n( "File" ) ); + fileMenu = new TQPopupMenu( this, "File" ); + menubar->insertItem( i18n( "&File" ), fileMenu ); + + DesignerAction *a = 0; + + if ( !singleProject ) { + DesignerAction *a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + a->setText( i18n( "New" ) ); + a->setToolTip( i18n( "New dialog or file" ) ); + a->setMenuText( i18n( "&New..." ) ); + a->setIconSet( createIconSet("designer_filenew.png") ); + a->setAccel( CTRL + Key_N ); + a->setStatusTip( i18n( "Creates a new project, form or source file." ) ); + a->setWhatsThis( whatsThisFrom( "File|New" ) ); + connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileNew() ) ); + a->addTo( tb ); + a->addTo( fileMenu ); + actionNewFile = a; + } else { + actionGroupNew = new TQActionGroup( this, 0, FALSE ); + TQActionGroup* a = actionGroupNew; + ( (TQActionGroup*)a )->setUsesDropDown( TRUE ); + a->setText( i18n( "New" ) ); + a->setMenuText( i18n( "&New..." ) ); + a->setIconSet( createIconSet("designer_form.png") ); + a->setStatusTip( i18n( "Creates a new dialog or file" ) ); + a->setWhatsThis( whatsThisFrom( "File|New" ) ); + + TQAction *newForm = new DesignerAction( a, 0 ); + newForm->setText( i18n( "New Dialog" ) ); + newForm->setMenuText( i18n( "&Dialog..." ) ); + newForm->setIconSet( createIconSet("designer_form.png") ); + newForm->setAccel( CTRL + Key_N ); + newForm->setStatusTip( i18n( "Creates a new dialog." ) ); + connect( newForm, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileNewDialog() ) ); + + DesignerAction *newFile = new DesignerAction( TQT_TQOBJECT(a), 0 ); + newFile->setText( i18n( "New File" ) ); + newFile->setMenuText( i18n( "&File..." ) ); + newFile->setIconSet( createIconSet("designer_filenew.png") ); + newFile->setAccel( ALT + Key_N ); + newFile->setStatusTip( i18n( "Creates a new file." ) ); + connect( newFile, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileNewFile() ) ); + actionNewFile = newFile; + + a->addTo( tb ); + a->addTo( fileMenu ); + + fileMenu->insertSeparator(); + } + + a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + a->setText( i18n( "Open" ) ); + a->setMenuText( i18n( "&Open..." ) ); + a->setIconSet( createIconSet("designer_fileopen.png") ); + a->setAccel( CTRL + Key_O ); + a->setStatusTip( i18n( "Opens an existing project, form or source file ") ); + a->setWhatsThis( whatsThisFrom( "File|Open" ) ); + connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileOpen() ) ); + if ( !singleProject ) { + a->addTo( tb ); + a->addTo( fileMenu ); + fileMenu->insertSeparator(); + } + + + a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + actionFileClose = a; + a->setText( i18n( "Close" ) ); + a->setMenuText( i18n( "&Close" ) ); + a->setStatusTip( i18n( "Closes the current project or document" ) ); + a->setWhatsThis(whatsThisFrom( "File|Close" ) ); + connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileClose() ) ); + connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); + if ( !singleProject ) { + a->addTo( fileMenu ); + fileMenu->insertSeparator(); + } + + a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + actionFileSave = a; + a->setText( i18n( "Save" ) ); + a->setMenuText( i18n( "&Save" ) ); + a->setIconSet( createIconSet("designer_filesave.png") ); + a->setAccel( CTRL + Key_S ); + a->setStatusTip( i18n( "Saves the current project or document" ) ); + a->setWhatsThis(whatsThisFrom( "File|Save" ) ); + connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileSave() ) ); + connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); + a->addTo( tb ); + a->addTo( fileMenu ); + + a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + actionFileSaveAs = a; + a->setText( i18n( "Save As" ) ); + a->setMenuText( i18n( "Save &As..." ) ); + a->setStatusTip( i18n( "Saves the current form with a new filename" ) ); + a->setWhatsThis( whatsThisFrom( "File|Save As" ) ); + connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileSaveAs() ) ); + connect( this, TQT_SIGNAL( hasActiveWindow(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); + if ( !singleProject ) + a->addTo( fileMenu ); + + a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + actionFileSaveAll = a; + a->setText( i18n( "Save All" ) ); + a->setMenuText( i18n( "Sa&ve All" ) ); + a->setStatusTip( i18n( "Saves all open documents" ) ); + a->setWhatsThis( whatsThisFrom( "File|Save All" ) ); + connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileSaveAll() ) ); + connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); + if ( !singleProject ) { + a->addTo( fileMenu ); + fileMenu->insertSeparator(); + } + + a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + a->setText( i18n( "Create Template" ) ); + a->setMenuText( i18n( "Create &Template..." ) ); + a->setStatusTip( i18n( "Creates a new template" ) ); + a->setWhatsThis( whatsThisFrom( "File|Create Template" ) ); + connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileCreateTemplate() ) ); + if ( !singleProject ) + a->addTo( fileMenu ); + + if ( !singleProject ) + fileMenu->insertSeparator(); + + recentlyFilesMenu = new TQPopupMenu( this ); + recentlyProjectsMenu = new TQPopupMenu( this ); + + if ( !singleProject ) { + fileMenu->insertItem( i18n( "Recently Opened Files " ), recentlyFilesMenu ); + fileMenu->insertItem( i18n( "Recently Opened Projects" ), recentlyProjectsMenu ); + } + + connect( recentlyFilesMenu, TQT_SIGNAL( aboutToShow() ), + this, TQT_SLOT( setupRecentlyFilesMenu() ) ); + connect( recentlyProjectsMenu, TQT_SIGNAL( aboutToShow() ), + this, TQT_SLOT( setupRecentlyProjectsMenu() ) ); + connect( recentlyFilesMenu, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( recentlyFilesMenuActivated( int ) ) ); + connect( recentlyProjectsMenu, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( recentlyProjectsMenuActivated( int ) ) ); + + if ( !singleProject ) + fileMenu->insertSeparator(); + + a = new DesignerAction( TQT_TQOBJECT(this), 0 ); + actionFileExit = a; + if ( !singleProjectMode() ) { + a->setText( i18n( "Exit" ) ); + a->setMenuText( i18n( "E&xit" ) ); + a->setStatusTip( i18n( "Quits the application and prompts to save any changed forms, source files or project settings" ) ); + a->setWhatsThis( whatsThisFrom( "File|Exit" ) ); + } else { + a->setText( i18n( "Close" ) ); + a->setMenuText( i18n( "&Close" ) ); + } + connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileQuit() ) ); + a->addTo( fileMenu ); +} + +void MainWindow::setupProjectActions() +{ + projectMenu = new TQPopupMenu( this, "Project" ); + menubar->insertItem( i18n( "Pr&oject" ), projectMenu ); + + TQActionGroup *ag = new TQActionGroup( this, 0 ); + ag->setText( i18n( "Active Project" ) ); + ag->setMenuText( i18n( "Active Project" ) ); + ag->setExclusive( TRUE ); + ag->setUsesDropDown( TRUE ); + connect( ag, TQT_SIGNAL( selected( TQAction * ) ), TQT_TQOBJECT(this), TQT_SLOT( projectSelected( TQAction * ) ) ); + connect( ag, TQT_SIGNAL( selected( TQAction * ) ), TQT_TQOBJECT(this), TQT_SIGNAL( projectChanged() ) ); + DesignerAction *a = new DesignerAction( i18n( "" ), i18n( "" ), 0, ag, 0, TRUE ); + eProject = new Project( "", i18n( "" ), projectSettingsPluginManager, TRUE ); + projects.insert( a, eProject ); + a->setOn( TRUE ); + ag->addTo( projectMenu ); + ag->addTo( projectToolBar ); + actionGroupProjects = ag; + + if ( !singleProject ) + projectMenu->insertSeparator(); + + a = new DesignerAction( i18n( "Add File" ), TQPixmap(), i18n( "&Add File..." ), 0, TQT_TQOBJECT(this), 0 ); + actionProjectAddFile = a; + a->setStatusTip( i18n("Adds a file to the current project") ); + a->setWhatsThis( whatsThisFrom( "Project|Add File" ) ); + connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( projectInsertFile() ) ); + a->setEnabled( FALSE ); + connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); + if ( !singleProject ) + a->addTo( projectMenu ); + + actionEditPixmapCollection = new DesignerAction( i18n( "Image Collection..." ), TQPixmap(), + i18n( "&Image Collection..." ), 0, TQT_TQOBJECT(this), 0 ); + actionEditPixmapCollection->setStatusTip( i18n("Opens a dialog for editing the current project's image collection") ); + actionEditPixmapCollection->setWhatsThis( whatsThisFrom( "Project|Image Collection" ) ); + connect( actionEditPixmapCollection, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editPixmapCollection() ) ); + actionEditPixmapCollection->setEnabled( FALSE ); + connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditPixmapCollection, TQT_SLOT( setEnabled(bool) ) ); + actionEditPixmapCollection->addTo( projectMenu ); + +#ifndef TQT_NO_SQL + actionEditDatabaseConnections = new DesignerAction( i18n( "Database Connections..." ), TQPixmap(), + i18n( "&Database Connections..." ), 0, TQT_TQOBJECT(this), 0 ); + actionEditDatabaseConnections->setStatusTip( i18n("Opens a dialog for editing the current project's database connections") ); + actionEditDatabaseConnections->setWhatsThis( whatsThisFrom( "Project|Database Connections" ) ); + connect( actionEditDatabaseConnections, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editDatabaseConnections() ) ); + //actionEditDatabaseConnections->setEnabled( FALSE ); + //connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditDatabaseConnections, TQT_SLOT( setEnabled(bool) ) ); + if ( !singleProject ) + actionEditDatabaseConnections->addTo( projectMenu ); +#endif + + actionEditProjectSettings = new DesignerAction( i18n( "Project Settings..." ), TQPixmap(), + i18n( "&Project Settings..." ), 0, TQT_TQOBJECT(this), 0 ); + actionEditProjectSettings->setStatusTip( i18n("Opens a dialog to change the project's settings") ); + actionEditProjectSettings->setWhatsThis( whatsThisFrom( "Project|Project Settings" ) ); + connect( actionEditProjectSettings, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editProjectSettings() ) ); + actionEditProjectSettings->setEnabled( FALSE ); + connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditProjectSettings, TQT_SLOT( setEnabled(bool) ) ); + actionEditProjectSettings->addTo( projectMenu ); + +} + +void MainWindow::setupPreviewActions() +{ + DesignerAction* a = 0; + TQPopupMenu *menu = new TQPopupMenu( this, "Preview" ); + layoutMenu = menu; + menubar->insertItem( i18n( "&Preview" ), menu, toolsMenuId + 2 ); + + a = new DesignerAction( i18n( "Preview Form" ), TQPixmap(), i18n( "Preview &Form" ), 0, TQT_TQOBJECT(this), 0 ); + actionPreview = a; + a->setAccel( CTRL + Key_T ); + a->setStatusTip( i18n("Opens a preview") ); + a->setWhatsThis( whatsThisFrom( "Preview|Preview Form" ) ); + connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( previewForm() ) ); + connect( this, TQT_SIGNAL( hasActiveForm(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); + a->addTo( menu ); + + menu->insertSeparator(); + + TQSignalMapper *mapper = new TQSignalMapper( TQT_TQOBJECT(this) ); + connect( mapper, TQT_SIGNAL(mapped(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(previewForm(const TQString&)) ); + TQStringList styles = TQStyleFactory::keys(); + for ( TQStringList::Iterator it = styles.begin(); it != styles.end(); ++it ) { + TQString info; + if ( *it == "Motif" ) + info = i18n( "The preview will use the Motif look and feel which is used as the default style on most UNIX systems." ); + else if ( *it == "Windows" ) + info = i18n( "The preview will use the Windows look and feel." ); + else if ( *it == "Platinum" ) + info = i18n( "The preview will use the Platinum look and feel which is similar to the Macintosh GUI style." ); + else if ( *it == "CDE" ) + info = i18n( "The preview will use the CDE look and feel which is similar to some versions of the Common Desktop Environment." ); + else if ( *it == "SGI" ) + info = i18n( "The preview will use the Motif look and feel which is used as the default style on SGI systems." ); + else if ( *it == "MotifPlus" ) + info = i18n( "The preview will use the advanced Motif look and feel used by the GIMP toolkit (GTK) on Linux." ); + + a = new DesignerAction( i18n( "Preview Form in %1 Style" ).arg( *it ), TQPixmap(), + i18n( "... in %1 Style" ).arg( *it ), 0, TQT_TQOBJECT(this), 0 ); + a->setStatusTip( i18n("Opens a preview in %1 style").arg( *it ) ); + a->setWhatsThis( i18n("Open a preview in %1 style." + "

    Use the preview to test the design and " + "signal-slot connections of the current form. %2

    ").arg( *it ).arg( info ) ); + mapper->setMapping( a, *it ); + connect( a, TQT_SIGNAL(activated()), mapper, TQT_SLOT(map()) ); + connect( this, TQT_SIGNAL( hasActiveForm(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); + a->addTo( menu ); + } +} + +void MainWindow::setupWindowActions() +{ +/* static bool windowActionsSetup = FALSE; + if ( !windowActionsSetup ) { + windowActionsSetup = TRUE; +*/ + actionWindowTile = new DesignerAction( i18n( "Tile" ), i18n( "&Tile" ), 0, TQT_TQOBJECT(this) ); + actionWindowTile->setStatusTip( i18n("Tiles the windows so that they are all visible") ); + actionWindowTile->setWhatsThis( whatsThisFrom( "Window|Tile" ) ); + connect( actionWindowTile, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( tile() ) ); + actionWindowCascade = new DesignerAction( i18n( "Cascade" ), i18n( "&Cascade" ), 0, TQT_TQOBJECT(this) ); + actionWindowCascade->setStatusTip( i18n("Cascades the windows so that all their title bars are visible") ); + actionWindowCascade->setWhatsThis( whatsThisFrom( "Window|Cascade" ) ); + connect( actionWindowCascade, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( cascade() ) ); + + actionWindowClose = new DesignerAction( i18n( "Close" ), i18n( "Cl&ose" ), CTRL + Key_F4, TQT_TQOBJECT(this) ); + actionWindowClose->setStatusTip( i18n( "Closes the active window") ); + actionWindowClose->setWhatsThis( whatsThisFrom( "Window|Close" ) ); + connect( actionWindowClose, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( closeActiveWindow() ) ); + + actionWindowCloseAll = new DesignerAction( i18n( "Close All" ), i18n( "Close Al&l" ), 0, TQT_TQOBJECT(this) ); + actionWindowCloseAll->setStatusTip( i18n( "Closes all form windows") ); + actionWindowCloseAll->setWhatsThis( whatsThisFrom( "Window|Close All" ) ); + connect( actionWindowCloseAll, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( closeAllWindows() ) ); + + actionWindowNext = new DesignerAction( i18n( "Next" ), i18n( "Ne&xt" ), CTRL + Key_F6, TQT_TQOBJECT(this) ); + actionWindowNext->setStatusTip( i18n( "Activates the next window" ) ); + actionWindowNext->setWhatsThis( whatsThisFrom( "Window|Next" ) ); + connect( actionWindowNext, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( activateNextWindow() ) ); + + actionWindowPrevious = new DesignerAction( i18n( "Previous" ), i18n( "Pre&vious" ), CTRL + SHIFT + Key_F6, TQT_TQOBJECT(this) ); + actionWindowPrevious->setStatusTip( i18n( "Activates the previous window" ) ); + actionWindowPrevious->setWhatsThis( whatsThisFrom( "Window|Previous" ) ); + connect( actionWindowPrevious, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( activatePreviousWindow() ) ); + // } + + if ( !windowMenu ) { + windowMenu = new TQPopupMenu( this, "Window" ); + menubar->insertItem( i18n( "&Window" ), windowMenu ); + connect( windowMenu, TQT_SIGNAL( aboutToShow() ), + this, TQT_SLOT( setupWindowActions() ) ); + } else { + windowMenu->clear(); + } + + actionWindowClose->addTo( windowMenu ); + actionWindowCloseAll->addTo( windowMenu ); + windowMenu->insertSeparator(); + actionWindowNext->addTo( windowMenu ); + actionWindowPrevious->addTo( windowMenu ); + windowMenu->insertSeparator(); + actionWindowTile->addTo( windowMenu ); + actionWindowCascade->addTo( windowMenu ); + windowMenu->insertSeparator(); + windowMenu->insertItem( i18n( "Vie&ws" ), createDockWindowMenu( NoToolBars ) ); + windowMenu->insertItem( i18n( "Tool&bars" ), createDockWindowMenu( OnlyToolBars ) ); + TQWidgetList windows = qworkspace->windowList(); + if ( windows.count() && formWindow() ) + windowMenu->insertSeparator(); + int j = 0; + for ( int i = 0; i < int( windows.count() ); ++i ) { + TQWidget *w = windows.at( i ); + if ( !::tqqt_cast(w) && !::tqqt_cast(w) ) + continue; + if ( ::tqqt_cast(w) && ( ( (FormWindow*)w )->isFake() ) ) + continue; + j++; + TQString itemText; + if ( j < 10 ) + itemText = TQString("&%1 ").arg( j ); + if ( ::tqqt_cast(w) ) + itemText += w->name(); + else + itemText += w->caption(); + + int id = windowMenu->insertItem( itemText, TQT_TQOBJECT(this), TQT_SLOT( windowsMenuActivated( int ) ) ); + windowMenu->setItemParameter( id, i ); + windowMenu->setItemChecked( id, qworkspace->activeWindow() == windows.at( i ) ); + } +} + +void MainWindow::setupHelpActions() +{ + actionHelpContents = new DesignerAction( i18n( "Contents" ), i18n( "&Contents" ), Key_F1, TQT_TQOBJECT(this), 0 ); + actionHelpContents->setStatusTip( i18n("Opens the online help") ); + actionHelpContents->setWhatsThis( whatsThisFrom( "Help|Contents" ) ); + connect( actionHelpContents, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpContents() ) ); + + actionHelpManual = new DesignerAction( i18n( "Manual" ), i18n( "&Manual" ), CTRL + Key_M, TQT_TQOBJECT(this), 0 ); + actionHelpManual->setStatusTip( i18n("Opens the TQt Designer manual") ); + actionHelpManual->setWhatsThis( whatsThisFrom( "Help|Manual" ) ); + connect( actionHelpManual, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpManual() ) ); + + actionHelpAbout = new DesignerAction( i18n("About"), TQPixmap(), i18n("&About"), 0, TQT_TQOBJECT(this), 0 ); + actionHelpAbout->setStatusTip( i18n("Displays information about TQt Designer") ); + actionHelpAbout->setWhatsThis( whatsThisFrom( "Help|About" ) ); + connect( actionHelpAbout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpAbout() ) ); + + actionHelpAboutTQt = new DesignerAction( i18n("About TQt"), TQPixmap(), i18n("About &TQt"), 0, TQT_TQOBJECT(this), 0 ); + actionHelpAboutTQt->setStatusTip( i18n("Displays information about the TQt Toolkit") ); + actionHelpAboutTQt->setWhatsThis( whatsThisFrom( "Help|About TQt" ) ); + connect( actionHelpAboutTQt, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpAboutTQt() ) ); + +#if 0 //defined(TQT_NON_COMMERCIAL) + // ### not used anymore -- should be deleted? + actionHelpRegister = new DesignerAction( i18n("Register TQt"), TQPixmap(), i18n("&Register TQt..."), 0, TQT_TQOBJECT(this), 0 ); + actionHelpRegister->setStatusTip( i18n("Opens a web browser at the evaluation form on www.trolltech.com") ); + actionHelpRegister->setWhatsThis( i18n("Register with Trolltech") ); + connect( actionHelpRegister, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpRegister() ) ); +#endif + + actionHelpWhatsThis = new DesignerAction( i18n("What's This?"), TQIconSet( whatsthis_image, whatsthis_image ), + i18n("What's This?"), SHIFT + Key_F1, TQT_TQOBJECT(this), 0 ); + actionHelpWhatsThis->setStatusTip( i18n("\"What's This?\" context sensitive help") ); + actionHelpWhatsThis->setWhatsThis( whatsThisFrom( "Help|What's This?" ) ); + connect( actionHelpWhatsThis, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( whatsThis() ) ); + +/* TQToolBar *tb = new TQToolBar( this, "Help" ); + tb->setCloseMode( TQDockWindow::Undocked ); + TQWhatsThis::add( tb, i18n( "The Help toolbar%1" ).arg(i18n(toolbarHelp).arg("") )); + addToolBar( tb, i18n( "Help" ) ); + actionHelpWhatsThis->addTo( tb );*/ + + TQPopupMenu *menu = new TQPopupMenu( this, "Help" ); + menubar->insertSeparator(); + menubar->insertItem( i18n( "&Help" ), menu ); + actionHelpContents->addTo( menu ); + actionHelpManual->addTo( menu ); + menu->insertSeparator(); + actionHelpAbout->addTo( menu ); + actionHelpAboutTQt->addTo( menu ); +#if 0 //defined(TQT_NON_COMMERCIAL) + // ### not used anymore -- should be deleted? + actionHelpRegister->addTo( menu ); +#endif + + menu->insertSeparator(); + actionHelpWhatsThis->addTo( menu ); +} + +void MainWindow::fileNew() +{ + statusMessage( i18n( "Create a new project, form or source file...") ); + NewForm dlg( this, projectNames(), currentProject->projectName(), templatePath() ); + dlg.exec(); + statusBar()->clear(); +} + +void MainWindow::fileNewDialog() +{ + static int forms = 0; + TQString n = "Dialog" + TQString::number( ++forms ); + while ( currentProject->findFormFile( n + ".ui" ) ) + n = "Dialog" + TQString::number( ++forms ); + FormWindow *fw = 0; + FormFile *ff = new FormFile( n + ".ui", FALSE, currentProject ); + fw = new FormWindow( ff, MainWindow::self, MainWindow::self->qWorkspace(), n ); + ff->setModified( TRUE ); + currentProject->setModified( TRUE ); + workspace()->update(); + fw->setProject( currentProject ); + MetaDataBase::addEntry( TQT_TQOBJECT(fw) ); + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQDIALOG_OBJECT_NAME_STRING ), fw, n.latin1() ); + fw->setMainContainer( w ); + fw->setCaption( n ); + fw->resize( 600, 480 ); + insertFormWindow( fw ); + fw->killAccels( TQT_TQOBJECT(fw) ); + fw->project()->setModified( TRUE ); + fw->setFocus(); + fw->setSavePixmapInProject( TRUE ); + fw->setSavePixmapInline( FALSE ); +} + +void MainWindow::fileNewFile() +{ + TQString name = TQInputDialog::getText( i18n( "Name of File" ), i18n( "Enter the name of the new source file:" ) ); + if ( name.isEmpty() ) + return; + if ( name.right( 3 ) != ".qs" ) + name += ".qs"; + SourceFile *f = new SourceFile( name, FALSE, currentProject ); + MainWindow::self->editSource( f ); + f->setModified( TRUE ); + currentProject->setModified( TRUE ); + workspace()->update(); +} + +void MainWindow::fileQuit() +{ + close(); + if ( !singleProjectMode() ) + tqApp->closeAllWindows(); +} + +void MainWindow::fileClose() +{ + if ( !currentProject->isDummy() ) { + fileCloseProject(); + } else { + TQWidget *w = qworkspace->activeWindow(); + if ( w ) { + if ( ::tqqt_cast(w) ) + ( (FormWindow*)w )->formFile()->close(); + else if ( ::tqqt_cast(w) ) + ( (SourceEditor*)w )->close(); + } + } +} + + +void MainWindow::fileCloseProject() +{ + if ( currentProject->isDummy() ) + return; + Project *pro = currentProject; + TQAction* a = 0; + TQAction* lastValid = 0; + for ( TQMap::Iterator it = projects.begin(); it != projects.end(); ++it ) { + if ( it.data() == pro ) { + a = it.key(); + if ( lastValid ) + break; + } + lastValid = it.key(); + } + if ( a ) { + if ( pro->isModified() ) { + switch ( TQMessageBox::warning( this, i18n( "Save Project Settings" ), + i18n( "Save changes to '%1'?" ).arg( pro->fileName() ), + i18n( "&Yes" ), i18n( "&No" ), i18n( "&Cancel" ), 0, 2 ) ) { + case 0: // save + pro->save(); + break; + case 1: // don't save + break; + case 2: // cancel + return; + default: + break; + } + } + + TQWidgetList windows = qWorkspace()->windowList(); + qWorkspace()->blockSignals( TRUE ); + TQWidgetListIt wit( windows ); + while ( wit.current() ) { + TQWidget *w = wit.current(); + ++wit; + if ( ::tqqt_cast(w) ) { + if ( ( (FormWindow*)w )->project() == pro ) { + if ( ( (FormWindow*)w )->formFile()->editor() ) + windows.removeRef( ( (FormWindow*)w )->formFile()->editor() ); + if ( !( (FormWindow*)w )->formFile()->close() ) + return; + } + } else if ( ::tqqt_cast(w) ) { + if ( !( (SourceEditor*)w )->close() ) + return; + } + } + hierarchyView->clear(); + windows = qWorkspace()->windowList(); + qWorkspace()->blockSignals( FALSE ); + actionGroupProjects->removeChild( a ); + projects.remove( a ); + delete a; + currentProject = 0; + if ( lastValid ) { + projectSelected( lastValid ); + statusMessage( i18n( "Selected project '%1'" ).arg( currentProject->projectName() ) ); + } + if ( !windows.isEmpty() ) { + for ( TQWidget *w = windows.first(); w; w = windows.next() ) { + if ( !::tqqt_cast(w) ) + continue; + w->setFocus(); + activeWindowChanged( w ); + break; + } + } else { + emit hasActiveWindow( FALSE ); + emit hasActiveForm( FALSE ); + updateUndoRedo( FALSE, FALSE, TQString(), TQString() ); + } + } +} + +void MainWindow::fileOpen() // as called by the menu +{ + fileOpen( "", "", "", FALSE ); +} + +void MainWindow::projectInsertFile() +{ + fileOpen( "", "" ); +} + +void MainWindow::fileOpen( const TQString &filter, const TQString &extension, const TQString &fn, bool inProject ) +{ + statusMessage( i18n( "Open a file...") ); + + TQPluginManager manager( IID_ImportFilter, TQApplication::libraryPaths(), pluginDirectory() ); + + Project* project = inProject ? currentProject : eProject; + + TQStringList additionalSources; + + { + TQStringList filterlist; + if ( filter.isEmpty() ) { + if ( !inProject ) + filterlist << i18n( "*.ui *.pro|Designer Files" ); + filterlist << i18n( "*.ui|TQt User-Interface Files" ); + if ( !inProject ) + filterlist << i18n( "*.pro|TQMAKE Project Files" ); + TQStringList list = manager.featureList(); + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) + filterlist << *it; + LanguageInterface *iface = MetaDataBase::languageInterface( project->language() ); + if ( iface ) { + filterlist += iface->fileFilterList(); + additionalSources += iface->fileExtensionList(); + } + filterlist << i18n( "*|All Files" ); + } else { + filterlist << filter; + } + + TQString filters = filterlist.join( "\n" ); + + TQStringList filenames; + if ( fn.isEmpty() ) { + if ( !inProject ) { + TQString f = KFileDialog::getOpenFileName( TQString(), filters, this, /*0,*/ + i18n("Open" )/*, &lastOpenFilter */); + filenames << f; + } else { + filenames = KFileDialog::getOpenFileNames( TQString(), filters, this, /*0,*/ + i18n("Add")/*, &lastOpenFilter */); + } + } else { + filenames << fn; + } + + for ( TQStringList::Iterator fit = filenames.begin(); fit != filenames.end(); ++fit ) { + TQString filename = *fit; + if ( !filename.isEmpty() ) { + TQFileInfo fi( filename ); + + if ( fi.extension( FALSE ) == "pro" && ( extension.isEmpty() || extension.find( ";pro" ) != -1 ) ) { + addRecentlyOpened( filename, recentlyProjects ); + openProject( filename ); + } else if ( fi.extension( FALSE ) == "ui" && ( extension.isEmpty() || extension.find( ";ui" ) != -1 ) ) { + if ( !inProject ) + setCurrentProject( eProject ); + openFormWindow( filename ); + addRecentlyOpened( filename, recentlyFiles ); + } else if ( !extension.isEmpty() && extension.find( ";" + fi.extension( FALSE ) ) != -1 || + additionalSources.find( fi.extension( FALSE ) ) != additionalSources.end() ) { + SourceFile *sf = project->findSourceFile( project->makeRelative( filename ) ); + if ( !sf ) + sf = new SourceFile( project->makeRelative( filename ), FALSE, project ); + editSource( sf ); + } else if ( extension.isEmpty() ) { + TQString filter; + for ( TQStringList::Iterator it2 = filterlist.begin(); it2 != filterlist.end(); ++it2 ) { + if ( (*it2).contains( "." + fi.extension( FALSE ), FALSE ) ) { + filter = *it2; + break; + } + } + + ImportFilterInterface* iface = 0; + manager.queryInterface( filter, &iface ); + if ( !iface ) { + statusMessage( i18n( "No import filter is available to import '%1'"). + arg( filename )/*, 3000*/ ); + return; + } + statusMessage( i18n( "Importing '%1' using import filter ...").arg( filename ) ); + TQStringList list = iface->import( filter, filename ); + iface->release(); + if ( list.isEmpty() ) { + statusMessage( i18n( "Nothing to load in '%1'").arg( filename )/*, 3000*/ ); + return; + } + if ( !inProject ) + setCurrentProject( eProject ); + addRecentlyOpened( filename, recentlyFiles ); + for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { + openFormWindow( *it, FALSE ); + TQFile::remove( *it ); + } + statusBar()->clear(); + } + } + } + } +} + +FormWindow *MainWindow::openFormWindow( const TQString &filename, bool validFileName, FormFile *ff ) +{ + if ( filename.isEmpty() ) + return 0; + + bool makeNew = FALSE; + + if ( !TQFile::exists( filename ) ) { + makeNew = TRUE; + } else { + TQFile f( filename ); + f.open( IO_ReadOnly ); + TQTextStream ts( &f ); + makeNew = ts.read().length() < 2; + } + if ( makeNew ) { + fileNew(); + if ( formWindow() ) + formWindow()->setFileName( filename ); + return formWindow(); + } + + statusMessage( i18n( "Reading file '%1'...").arg( filename ) ); + FormFile *ff2 = currentProject->findFormFile( currentProject->makeRelative(filename) ); + if ( ff2 && ff2->formWindow() ) { + ff2->formWindow()->setFocus(); + return ff2->formWindow(); + } + + if ( ff2 ) + ff = ff2; + TQApplication::setOverrideCursor( WaitCursor ); + Resource resource( this ); + if ( !ff ) + ff = new FormFile( currentProject->makeRelative( filename ), FALSE, currentProject ); + bool b = resource.load( ff ) && (FormWindow*)resource.widget(); + if ( !validFileName && resource.widget() ) + ( (FormWindow*)resource.widget() )->setFileName( TQString() ); + TQApplication::restoreOverrideCursor(); + if ( b ) { + rebuildCustomWidgetGUI(); + statusMessage( i18n( "Loaded file '%1'").arg( filename )/*, 3000 */); + } else { + statusMessage( i18n( "Failed to load file '%1'").arg( filename )/*, 5000 */); + TQMessageBox::information( this, i18n("Load File"), i18n("Could not load file '%1'.").arg( filename ) ); + delete ff; + } + return (FormWindow*)resource.widget(); +} + +bool MainWindow::fileSave() +{ + + if ( !currentProject->isDummy() ) + return fileSaveProject(); + return fileSaveForm(); +} + +bool MainWindow::fileSaveForm() +{ + for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { + if ( TQT_BASE_OBJECT(e->object()) == formWindow() || e == qWorkspace()->activeWindow() ) { + e->save(); + } + } + + FormWindow *fw = 0; + + TQWidget *w = qWorkspace()->activeWindow(); + if ( w ) { + if ( ::tqqt_cast(w) ) { + SourceEditor *se = (SourceEditor*)w; + if ( se->formWindow() ) + fw = se->formWindow(); + else if ( se->sourceFile() ) { + se->sourceFile()->save(); + return TRUE; + } + } + } + + if ( !fw ) + fw = formWindow(); + if ( !fw || !fw->formFile()->save() ) + return FALSE; + TQApplication::restoreOverrideCursor(); + return TRUE; +} + +bool MainWindow::fileSaveProject() +{ + currentProject->save(); + statusMessage( i18n( "Project '%1' saved.").arg( currentProject->projectName() )/*, 3000 */); + return TRUE; +} + +bool MainWindow::fileSaveAs() +{ + statusMessage( i18n( "Enter a filename..." ) ); + + TQWidget *w = qworkspace->activeWindow(); + if ( !w ) + return TRUE; + if ( ::tqqt_cast(w) ) + return ( (FormWindow*)w )->formFile()->saveAs(); + else if ( ::tqqt_cast(w) ) + return ( (SourceEditor*)w )->saveAs(); + return FALSE; +} + +void MainWindow::fileSaveAll() +{ + for ( TQMap::Iterator it = projects.begin(); it != projects.end(); ++it ) + (*it)->save(); +} + +void MainWindow::fileCreateTemplate() +{ + CreateTemplate dia( this, 0, TRUE ); + + int i = 0; + for ( i = 0; i < WidgetDatabase::count(); ++i ) { + if ( WidgetDatabase::isForm( i ) && WidgetDatabase::group( i ) != "Temp") { + dia.listClass->insertItem( WidgetDatabase::className( i ) ); + } + } + for ( i = 0; i < WidgetDatabase::count(); ++i ) { + if ( WidgetDatabase::isContainer( i ) && !WidgetDatabase::isForm(i) && + WidgetDatabase::className( i ) != TQTABWIDGET_OBJECT_NAME_STRING && WidgetDatabase::group( i ) != "Temp" ) { + dia.listClass->insertItem( WidgetDatabase::className( i ) ); + } + } + + TQPtrList *lst = MetaDataBase::customWidgets(); + for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) { + if ( w->isContainer ) + dia.listClass->insertItem( w->className ); + } + + dia.editName->setText( i18n( "NewTemplate" ) ); + connect( dia.buttonCreate, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( createNewTemplate() ) ); + dia.exec(); +} + +void MainWindow::createNewTemplate() +{ + CreateTemplate *dia = (CreateTemplate*)TQT_TQOBJECT(const_cast(sender()))->parent(); + TQString fn = dia->editName->text(); + TQString cn = dia->listClass->currentText(); + if ( fn.isEmpty() || cn.isEmpty() ) { + TQMessageBox::information( this, i18n( "Create Template" ), i18n( "Could not create the template." ) ); + return; + } + + TQStringList templRoots; + const char *qtdir = getenv( "QTDIR" ); + if(qtdir) + templRoots << qtdir; + templRoots << tqInstallPathData(); + if(qtdir) //try the tools/designer directory last! + templRoots << (TQString(qtdir) + "/tools/designer"); + TQFile f; + for ( TQStringList::Iterator it = templRoots.begin(); it != templRoots.end(); ++it ) { + if ( TQFile::exists( (*it) + "/templates/" )) { + TQString tmpfn = (*it) + "/templates/" + fn + ".ui"; + f.setName(tmpfn); + if(f.open(IO_WriteOnly)) + break; + } + } + if ( !f.isOpen() ) { + TQMessageBox::information( this, i18n( "Create Template" ), i18n( "Could not create the template." ) ); + return; + } + TQTextStream ts( &f ); + + ts << "" << endl; + ts << "" << endl; + ts << "" << cn << "" << endl; + ts << "" << endl; + ts << " name" << endl; + ts << " " << cn << "Form" << endl; + ts << "" << endl; + ts << "" << endl; + ts << " geometry" << endl; + ts << " " << endl; + ts << " 300" << endl; + ts << " 400" << endl; + ts << " " << endl; + ts << "" << endl; + ts << "" << endl; + ts << "" << endl; + + dia->editName->setText( i18n( "NewTemplate" ) ); + + f.close(); +} + +void MainWindow::editUndo() +{ + if ( qWorkspace()->activeWindow() && + ::tqqt_cast(qWorkspace()->activeWindow()) ) { + ( (SourceEditor*)qWorkspace()->activeWindow() )->editUndo(); + return; + } + if ( formWindow() ) + formWindow()->undo(); +} + +void MainWindow::editRedo() +{ + if ( qWorkspace()->activeWindow() && + ::tqqt_cast(qWorkspace()->activeWindow()) ) { + ( (SourceEditor*)qWorkspace()->activeWindow() )->editRedo(); + return; + } + if ( formWindow() ) + formWindow()->redo(); +} + +void MainWindow::editCut() +{ + if ( qWorkspace()->activeWindow() && + ::tqqt_cast(qWorkspace()->activeWindow()) ) { + ( (SourceEditor*)qWorkspace()->activeWindow() )->editCut(); + return; + } + editCopy(); + editDelete(); +} + +void MainWindow::editCopy() +{ + if ( qWorkspace()->activeWindow() && + ::tqqt_cast(qWorkspace()->activeWindow()) ) { + ( (SourceEditor*)qWorkspace()->activeWindow() )->editCopy(); + return; + } + if ( formWindow() ) + tqApp->clipboard()->setText( formWindow()->copy() ); +} + +void MainWindow::editPaste() +{ + if ( qWorkspace()->activeWindow() && + ::tqqt_cast(qWorkspace()->activeWindow()) ) { + ( (SourceEditor*)qWorkspace()->activeWindow() )->editPaste(); + return; + } + if ( !formWindow() ) + return; + + TQWidget *w = formWindow()->mainContainer(); + TQWidgetList l( formWindow()->selectedWidgets() ); + if ( l.count() == 1 ) { + w = l.first(); + if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout || + ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) && + w != formWindow()->mainContainer() ) ) + w = formWindow()->mainContainer(); + } + + if ( w && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) { + formWindow()->paste( tqApp->clipboard()->text(), WidgetFactory::containerOfWidget( w ) ); + hierarchyView->widgetInserted( 0 ); + formWindow()->commandHistory()->setModified( TRUE ); + } else { + TQMessageBox::information( this, i18n( "Paste Error" ), + i18n( "Cannot paste widgets. Designer could not find a container\n" + "to paste into which does not contain a layout. Break the layout\n" + "of the container you want to paste into and select this container\n" + "and then paste again." ) ); + } +} + +void MainWindow::editDelete() +{ + if ( formWindow() ) + formWindow()->deleteWidgets(); +} + +void MainWindow::editSelectAll() +{ + if ( qWorkspace()->activeWindow() && + ::tqqt_cast(qWorkspace()->activeWindow()) ) { + ( (SourceEditor*)qWorkspace()->activeWindow() )->editSelectAll(); + return; + } + if ( formWindow() ) + formWindow()->selectAll(); +} + + +void MainWindow::editLower() +{ + if ( formWindow() ) + formWindow()->lowerWidgets(); +} + +void MainWindow::editRaise() +{ + if ( formWindow() ) + formWindow()->raiseWidgets(); +} + +void MainWindow::editAdjustSize() +{ + if ( formWindow() ) + formWindow()->editAdjustSize(); +} + +void MainWindow::editLayoutHorizontal() +{ + if ( layoutChilds ) + editLayoutContainerHorizontal(); + else if ( layoutSelected && formWindow() ) + formWindow()->layoutHorizontal(); +} + +void MainWindow::editLayoutVertical() +{ + if ( layoutChilds ) + editLayoutContainerVertical(); + else if ( layoutSelected && formWindow() ) + formWindow()->layoutVertical(); +} + +void MainWindow::editLayoutHorizontalSplit() +{ + if ( layoutChilds ) + ; // no way to do that + else if ( layoutSelected && formWindow() ) + formWindow()->layoutHorizontalSplit(); +} + +void MainWindow::editLayoutVerticalSplit() +{ + if ( layoutChilds ) + ; // no way to do that + else if ( layoutSelected && formWindow() ) + formWindow()->layoutVerticalSplit(); +} + +void MainWindow::editLayoutGrid() +{ + if ( layoutChilds ) + editLayoutContainerGrid(); + else if ( layoutSelected && formWindow() ) + formWindow()->layoutGrid(); +} + +void MainWindow::editLayoutContainerVertical() +{ + if ( !formWindow() ) + return; + TQWidget *w = formWindow()->mainContainer(); + TQWidgetList l( formWindow()->selectedWidgets() ); + if ( l.count() == 1 ) + w = l.first(); + if ( w ) + formWindow()->layoutVerticalContainer( w ); +} + +void MainWindow::editLayoutContainerHorizontal() +{ + if ( !formWindow() ) + return; + TQWidget *w = formWindow()->mainContainer(); + TQWidgetList l( formWindow()->selectedWidgets() ); + if ( l.count() == 1 ) + w = l.first(); + if ( w ) + formWindow()->layoutHorizontalContainer( w ); +} + +void MainWindow::editLayoutContainerGrid() +{ + if ( !formWindow() ) + return; + TQWidget *w = formWindow()->mainContainer(); + TQWidgetList l( formWindow()->selectedWidgets() ); + if ( l.count() == 1 ) + w = l.first(); + if ( w ) + formWindow()->layoutGridContainer( w ); +} + +void MainWindow::editBreakLayout() +{ + if ( !formWindow() || !breakLayout ) + return; + TQWidget *w = formWindow()->mainContainer(); + if ( formWindow()->currentWidget() ) + w = formWindow()->currentWidget(); + if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout || + w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) { + formWindow()->breakLayout( w ); + return; + } else { + TQWidgetList widgets = formWindow()->selectedWidgets(); + for ( w = widgets.first(); w; w = widgets.next() ) { + if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout || + w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) + break; + } + if ( w ) { + formWindow()->breakLayout( w ); + return; + } + } + + w = formWindow()->mainContainer(); + if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout || + w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) + formWindow()->breakLayout( w ); +} + +void MainWindow::editAccels() +{ + if ( !formWindow() ) + return; + formWindow()->checkAccels(); +} + +void MainWindow::editFunctions() +{ + if ( !formWindow() ) + return; + + statusMessage( i18n( "Edit the current form's slots..." ) ); + EditFunctions dlg( this, formWindow(), TRUE ); + dlg.exec(); + statusBar()->clear(); +} + +void MainWindow::editConnections() +{ + if ( !formWindow() ) + return; + + statusMessage( i18n( "Edit the current form's connections..." ) ); + ConnectionDialog dlg( this ); + dlg.exec(); + + statusBar()->clear(); +} + +SourceEditor *MainWindow::editSource() +{ + if ( !formWindow() ) + return 0; + return formWindow()->formFile()->showEditor(); +} + +SourceEditor *MainWindow::openSourceEditor() +{ + if ( !formWindow() ) + return 0; + + TQString lang = currentProject->language(); + if ( !MetaDataBase::hasEditor( lang ) ) { + TQMessageBox::information( this, i18n( "Edit Source" ), + i18n( "There is no plugin for editing %1 code installed.\n" + "Note: Plugins are not available in static TQt configurations." ).arg( lang ) ); + return 0; + } + + SourceEditor *editor = 0; + for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { + if ( e->language() == lang && e->formWindow() == formWindow() ) { + editor = e; + break; + } + } + + if ( !editor ) +editor = createSourceEditor( TQT_TQOBJECT(formWindow()), formWindow()->project(), lang ); + return editor; +} + +SourceEditor *MainWindow::editSource( SourceFile *f ) +{ + TQString lang = currentProject->language(); + if ( !MetaDataBase::hasEditor( lang ) ) { + TQMessageBox::information( this, i18n( "Edit Source" ), + i18n( "There is no plugin for editing %1 code installed.\n" + "Note: Plugins are not available in static TQt configurations." ).arg( lang ) ); + return 0; + } + + SourceEditor *editor = 0; + if ( f ) + editor = f->editor(); + if ( !editor ) + editor = createSourceEditor( f, currentProject, lang ); + editor->setActiveWindow(); + editor->setFocus(); + return editor; +} + +SourceEditor *MainWindow::createSourceEditor( TQObject *object, Project *project, + const TQString &lang, const TQString &func, + bool rereadSource ) +{ + SourceEditor *editor = 0; + EditorInterface *eIface = 0; + editorPluginManager->queryInterface( lang, &eIface ); + if ( !eIface ) + return 0; + LanguageInterface *lIface = MetaDataBase::languageInterface( lang ); + if ( !lIface ) + return 0; + TQApplication::setOverrideCursor( WaitCursor ); + editor = new SourceEditor( qWorkspace(), eIface, lIface ); + eIface->release(); + lIface->release(); + + editor->setLanguage( lang ); + sourceEditors.append( editor ); + TQApplication::restoreOverrideCursor(); + + if ( editor->object() != object ) + editor->setObject( object, project ); + else if ( rereadSource ) + editor->refresh( FALSE ); + + editor->show(); + editor->setFocus(); + if ( !func.isEmpty() ) + editor->setFunction( func ); + emit editorChanged(); + + return editor; +} + +void MainWindow::editFormSettings() +{ + if ( !formWindow() ) + return; + + statusMessage( i18n( "Edit the current form's settings..." ) ); + FormSettings dlg( this, formWindow() ); + dlg.exec(); + statusBar()->clear(); +} + +void MainWindow::editProjectSettings() +{ + openProjectSettings( currentProject ); + wspace->setCurrentProject( currentProject ); +} + +void MainWindow::editPixmapCollection() +{ + PixmapCollectionEditor dia( this, 0, TRUE ); + dia.setProject( currentProject ); + dia.exec(); +} + +void MainWindow::editDatabaseConnections() +{ +#ifndef TQT_NO_SQL + DatabaseConnectionsEditor dia( currentProject, this, 0, TRUE ); + dia.exec(); +#endif +} + +void MainWindow::editPreferences() +{ + statusMessage( i18n( "Edit preferences..." ) ); + Preferences *dia = new Preferences( this, 0, TRUE ); + prefDia = dia; + connect( dia->helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + dia->buttonColor->setEditor( StyledButton::ColorEditor ); + dia->buttonPixmap->setEditor( StyledButton::PixmapEditor ); + dia->groupBoxGrid->setChecked( sGrid ); + dia->checkBoxSnapGrid->setChecked( snGrid ); + dia->spinGridX->setValue( grid().x() ); + dia->spinGridY->setValue( grid().y() ); + dia->checkBoxWorkspace->setChecked( restoreConfig ); + dia->checkBoxTextLabels->setChecked( usesTextLabel() ); + dia->buttonColor->setColor( qworkspace->backgroundColor() ); + TQString pluginPaths = TQApplication::libraryPaths().join("\n"); + dia->textEditPluginPaths->setText(pluginPaths); + if ( qworkspace->backgroundPixmap() ) + dia->buttonPixmap->setPixmap( *qworkspace->backgroundPixmap() ); + if ( backPix ) + dia->radioPixmap->setChecked( TRUE ); + else + dia->radioColor->setChecked( TRUE ); + dia->checkBoxSplash->setChecked( splashScreen ); + dia->checkAutoEdit->setChecked( !databaseAutoEdit ); + dia->checkBoxStartDialog->setChecked( shStartDialog ); + dia->checkBoxAutoSave->setChecked( autoSaveEnabled ); + int h = autoSaveInterval / 3600; + int m = ( autoSaveInterval - h * 3600 ) / 60; + int s = autoSaveInterval - ( h * 3600 + m * 60 ); + TQTime t( h, m, s ); + dia->timeEditAutoSave->setTime( t ); + + SenderObject *senderObject = new SenderObject( designerInterface() ); + TQValueList::Iterator it; + for ( it = preferenceTabs.begin(); it != preferenceTabs.end(); ++it ) { + Tab t = *it; + dia->tabWidget->addTab( t.w, t.title ); + if ( t.receiver ) { + connect( dia->buttonOk, TQT_SIGNAL( clicked() ), senderObject, TQT_SLOT( emitAcceptSignal() ) ); + connect( senderObject, TQT_SIGNAL( acceptSignal( TQUnknownInterface * ) ), t.receiver, t.accept_slot ); + connect( senderObject, TQT_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot ); + senderObject->emitInitSignal(); + disconnect( senderObject, TQT_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot ); + } + } + + if ( dia->exec() == TQDialog::Accepted ) { + setSnapGrid( dia->checkBoxSnapGrid->isChecked() ); + setShowGrid( dia->groupBoxGrid->isChecked() ); + setGrid( TQPoint( dia->spinGridX->value(), + dia->spinGridY->value() ) ); + restoreConfig = dia->checkBoxWorkspace->isChecked(); + setUsesTextLabel( dia->checkBoxTextLabels->isChecked() ); + if (dia->textEditPluginPaths->isModified()) { + pluginPaths = dia->textEditPluginPaths->text(); + TQApplication::setLibraryPaths(TQStringList::split("\n", pluginPaths)); + savePluginPaths = TRUE; + } + + if ( dia->radioPixmap->isChecked() && dia->buttonPixmap->pixmap() ) { + qworkspace->setBackgroundPixmap( *dia->buttonPixmap->pixmap() ); + backPix = TRUE; + } else { + qworkspace->setBackgroundColor( dia->buttonColor->color() ); + backPix = FALSE; + } + splashScreen = dia->checkBoxSplash->isChecked(); + databaseAutoEdit = !dia->checkAutoEdit->isChecked(); + shStartDialog = dia->checkBoxStartDialog->isChecked(); + autoSaveEnabled = dia->checkBoxAutoSave->isChecked(); + TQTime time = dia->timeEditAutoSave->time(); + autoSaveInterval = time.hour() * 3600 + time.minute() * 60 + time.second(); + if ( autoSaveEnabled ) + autoSaveTimer->start( autoSaveInterval * 1000 ); + else + autoSaveTimer->stop(); + } + delete senderObject; + for ( it = preferenceTabs.begin(); it != preferenceTabs.end(); ++it ) { + Tab t = *it; + dia->tabWidget->removePage( t.w ); + t.w->reparent( 0, TQPoint(0,0), FALSE ); + } + + for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) + e->configChanged(); + + delete dia; + prefDia = 0; + statusBar()->clear(); +} + +void MainWindow::searchFind() +{ + if ( !qWorkspace()->activeWindow() || + !::tqqt_cast(qWorkspace()->activeWindow()) ) + return; + + if ( !findDialog ) + findDialog = new FindDialog( this, 0, FALSE ); + findDialog->show(); + findDialog->raise(); + findDialog->setEditor( ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface(), + ( (SourceEditor*)qWorkspace()->activeWindow() )->object() ); + findDialog->comboFind->setFocus(); + findDialog->comboFind->lineEdit()->selectAll(); +} + +void MainWindow::searchIncremetalFindMenu() +{ + incrementalSearch->selectAll(); + incrementalSearch->setFocus(); +} + +void MainWindow::searchIncremetalFind() +{ + if ( !qWorkspace()->activeWindow() || + !::tqqt_cast(qWorkspace()->activeWindow()) ) + return; + + ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->find( incrementalSearch->text(), + FALSE, FALSE, TRUE, FALSE ); +} + +void MainWindow::searchIncremetalFindNext() +{ + if ( !qWorkspace()->activeWindow() || + !::tqqt_cast(qWorkspace()->activeWindow()) ) + return; + + ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->find( incrementalSearch->text(), + FALSE, FALSE, TRUE, TRUE ); +} + +void MainWindow::searchReplace() +{ + if ( !qWorkspace()->activeWindow() || + !::tqqt_cast(qWorkspace()->activeWindow()) ) + return; + + if ( !replaceDialog ) + replaceDialog = new ReplaceDialog( this, 0, FALSE ); + replaceDialog->show(); + replaceDialog->raise(); + replaceDialog->setEditor( ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface(), + ( (SourceEditor*)qWorkspace()->activeWindow() )->object() ); + replaceDialog->comboFind->setFocus(); + replaceDialog->comboFind->lineEdit()->selectAll(); +} + +void MainWindow::searchGotoLine() +{ + if ( !qWorkspace()->activeWindow() || + !::tqqt_cast(qWorkspace()->activeWindow()) ) + return; + + if ( !gotoLineDialog ) + gotoLineDialog = new GotoLineDialog( this, 0, FALSE ); + gotoLineDialog->show(); + gotoLineDialog->raise(); + gotoLineDialog->setEditor( ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface() ); + gotoLineDialog->spinLine->setFocus(); + gotoLineDialog->spinLine->setMinValue( 1 ); + gotoLineDialog->spinLine->setMaxValue( ( (SourceEditor*)qWorkspace()->activeWindow() )->numLines() ); + gotoLineDialog->spinLine->selectAll(); +} + +void MainWindow::toolsCustomWidget() +{ + statusMessage( i18n( "Edit custom widgets..." ) ); + CustomWidgetEditor edit( this, this ); + edit.exec(); + rebuildCustomWidgetGUI(); + statusBar()->clear(); +} + +void MainWindow::toolsConfigure() +{ + ConfigToolboxDialog dlg( this ); + if ( dlg.exec() != TQDialog::Accepted ) + return; + rebuildCommonWidgetsToolBoxPage(); +} + +void MainWindow::showStartDialog() +{ + if ( singleProjectMode() ) + return; + for ( int i = 1; i < tqApp->argc(); ++i ) { + TQString arg = tqApp->argv()[i]; + if ( arg[0] != '-' ) + return; + } + StartDialog *sd = new StartDialog( this, templatePath() ); + sd->setRecentlyFiles( recentlyFiles ); + sd->setRecentlyProjects( recentlyProjects ); + sd->exec(); + shStartDialog = sd->showDialogInFuture(); +} diff --git a/tdevdesigner/designer/menubareditor.cpp b/kdevdesigner/designer/menubareditor.cpp similarity index 100% rename from tdevdesigner/designer/menubareditor.cpp rename to kdevdesigner/designer/menubareditor.cpp diff --git a/tdevdesigner/designer/menubareditor.h b/kdevdesigner/designer/menubareditor.h similarity index 100% rename from tdevdesigner/designer/menubareditor.h rename to kdevdesigner/designer/menubareditor.h diff --git a/kdevdesigner/designer/metadatabase.cpp b/kdevdesigner/designer/metadatabase.cpp new file mode 100644 index 00000000..7aa004d7 --- /dev/null +++ b/kdevdesigner/designer/metadatabase.cpp @@ -0,0 +1,1692 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "metadatabase.h" +#include "widgetfactory.h" +#include "formwindow.h" +#include "parser.h" +#include "widgetdatabase.h" +#include "formfile.h" +#include "propertyobject.h" +#include "project.h" +#include "mainwindow.h" + +#include "kdevdesigner_part.h" + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +class MetaDataBaseRecord +{ +public: + TQObject *object; + TQStringList changedProperties; + TQMap fakeProperties; + TQMap propertyComments; + int spacing, margin; + TQString resizeMode; + TQValueList connections; + TQValueList functionList; + TQValueList includes; + TQValueList variables; + TQStringList forwards, sigs; + TQWidgetList tabOrder; + MetaDataBase::MetaInfo metaInfo; + TQCursor cursor; + TQMap pixmapArguments; + TQMap pixmapKeys; + TQMap columnFields; + TQValueList breakPoints; + TQMap breakPointConditions; + TQString exportMacro; +}; + +static TQPtrDict *db = 0; +static TQPtrList *cWidgets = 0; +static bool doUpdate = TRUE; +static TQStringList langList; +static TQStringList editorLangList; +static TQPluginManager *languageInterfaceManager = 0; + +/*! + \class MetaDataBase metadatabase.h + \brief Database which stores meta data of widgets + + The MetaDataBase stores meta information of widgets, which are not + stored directly in widgets (properties). This is e.g. the + information which properties have been modified. +*/ + +MetaDataBase::MetaDataBase() +{ +} + +inline void setupDataBase() +{ + if ( !db || !cWidgets ) { + db = new TQPtrDict( 1481 ); + db->setAutoDelete( TRUE ); + cWidgets = new TQPtrList; + cWidgets->setAutoDelete( TRUE ); + } +} + +void MetaDataBase::clearDataBase() +{ + delete db; + db = 0; + delete cWidgets; + cWidgets = 0; +} + +void MetaDataBase::addEntry( TQObject *o ) +{ + if ( !o ) + return; + setupDataBase(); + if ( db->find( o ) ) + return; + MetaDataBaseRecord *r = new MetaDataBaseRecord; + r->object = o; + r->spacing = r->margin = -1; + db->insert( (void*)o, r ); + + WidgetFactory::initChangedProperties( o ); +} + +void MetaDataBase::removeEntry( TQObject *o ) +{ + setupDataBase(); + db->remove( o ); +} + +void MetaDataBase::setPropertyChanged( TQObject *o, const TQString &property, bool changed ) +{ + setupDataBase(); + if ( o->isA( "PropertyObject" ) ) { + ( (PropertyObject*)o )->mdPropertyChanged( property, changed ); + return; + } + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + if ( changed ) { + if ( r->changedProperties.findIndex( property ) == -1 ) + r->changedProperties.append( property ); + } else { + if ( r->changedProperties.findIndex( property ) != -1 ) + r->changedProperties.remove( property ); + } + + if ( doUpdate && + ( property == "hAlign" || property == "vAlign" || property == "wordwrap" ) ) { + doUpdate = FALSE; + setPropertyChanged( o, "alignment", changed || + isPropertyChanged( o, "hAlign" ) || + isPropertyChanged( o, "vAlign" ) || + isPropertyChanged( o, "wordwrap" ) ); + doUpdate = TRUE; + } + + if ( doUpdate && property == "alignment" ) { + doUpdate = FALSE; + setPropertyChanged( o, "hAlign", changed ); + setPropertyChanged( o, "vAlign", changed ); + setPropertyChanged( o, "wordwrap", changed ); + doUpdate = TRUE; + } +} + +bool MetaDataBase::isPropertyChanged( TQObject *o, const TQString &property ) +{ + setupDataBase(); + if ( o->isA( "PropertyObject" ) ) + return ( (PropertyObject*)o )->mdIsPropertyChanged( property ); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return FALSE; + } + + return r->changedProperties.findIndex( property ) != -1; +} + +TQStringList MetaDataBase::changedProperties( TQObject *o ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQStringList(); + } + + TQStringList lst( r->changedProperties ); + return lst; +} + +void MetaDataBase::setPropertyComment( TQObject *o, const TQString &property, const TQString &comment ) +{ + setupDataBase(); + if ( o->isA( "PropertyObject" ) ) { + ( (PropertyObject*)o )->mdSetPropertyComment( property, comment ); + return; + } + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->propertyComments.insert( property, comment ); +} + +TQString MetaDataBase::propertyComment( TQObject *o, const TQString &property ) +{ + setupDataBase(); + if ( o->isA( "PropertyObject" ) ) + return ( (PropertyObject*)o )->mdPropertyComment( property ); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQString(); + } + + return *r->propertyComments.find( property ); +} + +void MetaDataBase::setFakeProperty( TQObject *o, const TQString &property, const TQVariant& value ) +{ + setupDataBase(); + if ( o->isA( "PropertyObject" ) ) { + ( (PropertyObject*)o )->mdSetFakeProperty( property, value ); + return; + } + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + r->fakeProperties[property] = value; +} + +TQVariant MetaDataBase::fakeProperty( TQObject * o, const TQString &property) +{ + setupDataBase(); + if ( o->isA( "PropertyObject" ) ) + return ( (PropertyObject*)o )->mdFakeProperty( property ); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQVariant(); + } + TQMap::Iterator it = r->fakeProperties.find( property ); + if ( it != r->fakeProperties.end() ) + return r->fakeProperties[property]; + return WidgetFactory::defaultValue( o, property ); + +} + +TQMap* MetaDataBase::fakeProperties( TQObject* o ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return 0; + } + return &r->fakeProperties; +} + +void MetaDataBase::setSpacing( TQObject *o, int spacing ) +{ + if ( !o ) + return; + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r || !o->isWidgetType() ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->spacing = spacing; + TQLayout * layout = 0; + WidgetFactory::layoutType( (TQWidget*)o, layout ); + if ( layout ) { + int spadef = 6; + if ( MainWindow::self->formWindow() ) + spadef = MainWindow::self->formWindow()->layoutDefaultSpacing(); + if ( spacing == -1 ) + layout->setSpacing( spadef ); + else + layout->setSpacing( spacing ); + } +} + +int MetaDataBase::spacing( TQObject *o ) +{ + if ( !o ) + return -1; + setupDataBase(); + if ( ::tqqt_cast(o) ) + o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r || !o->isWidgetType() ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return -1; + } + + return r->spacing; +} + +void MetaDataBase::setMargin( TQObject *o, int margin ) +{ + if ( !o ) + return; + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r || !o->isWidgetType() ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->margin = margin; + TQLayout * layout = 0; + WidgetFactory::layoutType( (TQWidget*)o, layout ); + + bool isInnerLayout = TRUE; + + TQWidget *widget = (TQWidget*)o; + if ( widget && !::tqqt_cast(widget) && + ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ) ) || + widget && widget->parentWidget() && ::tqqt_cast(widget->parentWidget()) ) ) + isInnerLayout = FALSE; + + + if ( layout ) { + int mardef = 11; + if ( MainWindow::self->formWindow() ) + mardef = MainWindow::self->formWindow()->layoutDefaultMargin(); + if ( margin == -1 ) { + if ( isInnerLayout ) + layout->setMargin( 1 ); + else + layout->setMargin( TQMAX( 1, mardef ) ); + } + else + layout->setMargin( TQMAX( 1, margin ) ); + } +} + +int MetaDataBase::margin( TQObject *o ) +{ + if ( !o ) + return -1; + setupDataBase(); + if ( ::tqqt_cast(o) ) + o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r || !o->isWidgetType() ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return -1; + } + return r->margin; +} + +void MetaDataBase::setResizeMode( TQObject *o, const TQString &mode ) +{ + if ( !o ) + return; + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r || !o->isWidgetType() ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->resizeMode = mode; +} + +TQString MetaDataBase::resizeMode( TQObject *o ) +{ + if ( !o ) + return TQString(); + setupDataBase(); + if ( ::tqqt_cast(o) ) + o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r || !o->isWidgetType() ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQString(); + } + return r->resizeMode; +} + +void MetaDataBase::addConnection( TQObject *o, TQObject *sender, const TQCString &signal, + TQObject *receiver, const TQCString &slot, bool addCode ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + if ( !(sender && receiver) ) + return; + Connection conn; + conn.sender = sender; + conn.signal = signal; + conn.receiver = receiver; + conn.slot = slot; + r->connections.append( conn ); + if ( addCode ) { + TQString rec = receiver->name(); + if ( ::tqqt_cast(o) && TQT_BASE_OBJECT(receiver) ==( (FormWindow*)o )->mainContainer() ) + rec = "this"; + TQString sen = sender->name(); + if ( ::tqqt_cast(o) && TQT_BASE_OBJECT(sender) ==( (FormWindow*)o )->mainContainer() ) + sen = "this"; + FormFile *ff = 0; + if ( ::tqqt_cast(o) ) + ff = (FormFile*)o; + else if ( ::tqqt_cast(o) ) + ff = ( (FormWindow*)o )->formFile(); + ff->addConnection( sen, signal, rec, slot ); + } +} + +void MetaDataBase::removeConnection( TQObject *o, TQObject *sender, const TQCString &signal, + TQObject *receiver, const TQCString &slot ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + if ( !(sender && receiver) ) + return; + for ( TQValueList::Iterator it = r->connections.begin(); it != r->connections.end(); ++it ) { + Connection conn = *it; + if ( TQT_BASE_OBJECT(conn.sender) ==sender && + conn.signal == signal && + TQT_BASE_OBJECT(conn.receiver) ==receiver && + conn.slot == slot ) { + r->connections.remove( it ); + break; + } + } + if ( ::tqqt_cast(o) ) { + TQString rec = receiver->name(); + if ( TQT_BASE_OBJECT(receiver) ==( (FormWindow*)o )->mainContainer() ) + rec = "this"; + ( (FormWindow*)o )->formFile()->removeConnection( sender->name(), signal, rec, slot ); + } +} + +void MetaDataBase::setupConnections( TQObject *o, const TQValueList &conns ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + if ( !::tqqt_cast(o) ) + return; + + FormFile *formfile = (FormFile*)o; + + r->connections.clear(); + + for ( TQValueList::ConstIterator cit = conns.begin(); + cit != conns.end(); ++cit ) { + // #### get the correct sender object out of Bla.Blub.sender + TQString senderName = (*cit).sender; + if ( senderName.find( '.' ) != -1 ) + senderName = senderName.mid( senderName.findRev( '.' ) + 1 ); + TQObject *sender = 0; + if ( formfile->formWindow() ) + sender = formfile->formWindow()->child( senderName ); + if ( !sender && formfile->isFake() ) + sender = formfile->project()->objectForFakeFormFile( formfile ); + if ( !sender && senderName == "this" ) + sender = formfile->formWindow() ? + TQT_TQOBJECT(formfile->formWindow()->mainContainer()) : + TQT_TQOBJECT(formfile->project()->objectForFakeFormFile( formfile )); + if ( !sender ) + continue; + MetaDataBase::addConnection( formfile->formWindow() ? + (TQObject*)formfile->formWindow() : + (TQObject*)formfile, + sender, + (*cit).signal.latin1(), + formfile->formWindow() ? + TQT_TQOBJECT(formfile->formWindow()->mainContainer()) : + TQT_TQOBJECT(formfile->project()->objectForFakeFormFile( formfile )), + (*cit).slot.latin1(), + FALSE ); + } +} + +bool MetaDataBase::hasConnection( TQObject *o, TQObject *sender, const TQCString &signal, + TQObject *receiver, const TQCString &slot ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return FALSE; + } + + for ( TQValueList::Iterator it = r->connections.begin(); it != r->connections.end(); ++it ) { + Connection conn = *it; + if ( TQT_BASE_OBJECT(conn.sender) ==sender && + conn.signal == signal && + TQT_BASE_OBJECT(conn.receiver) ==receiver && + conn.slot == slot ) + return TRUE; + } + return FALSE; +} + + +TQValueList MetaDataBase::connections( TQObject *o ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQValueList(); + } + return r->connections; +} + +TQValueList MetaDataBase::connections( TQObject *o, TQObject *sender, + TQObject *receiver ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQValueList(); + } + TQValueList::Iterator it = r->connections.begin(); + TQValueList ret; + TQValueList::Iterator conn; + while ( ( conn = it ) != r->connections.end() ) { + ++it; + if ( TQT_BASE_OBJECT((*conn).sender) ==sender && + TQT_BASE_OBJECT((*conn).receiver) ==receiver ) + ret << *conn; + } + + return ret; +} + +TQValueList MetaDataBase::connections( TQObject *o, TQObject *object ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQValueList(); + } + TQValueList::Iterator it = r->connections.begin(); + TQValueList ret; + TQValueList::Iterator conn; + while ( ( conn = it ) != r->connections.end() ) { + ++it; + if ( TQT_BASE_OBJECT((*conn).sender) ==object || + TQT_BASE_OBJECT((*conn).receiver) ==object ) + ret << *conn; + } + return ret; +} + +void MetaDataBase::doConnections( TQObject *o ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + TQObject *sender = 0, *receiver = 0; + TQObjectList *l = 0; + TQValueList::Iterator it = r->connections.begin(); + for ( ; it != r->connections.end(); ++it ) { + Connection conn = *it; + if ( qstrcmp( conn.sender->name(), o->name() ) == 0 ) { + sender = o; + } else { + l = o->queryList( 0, conn.sender->name(), FALSE ); + if ( !l || !l->first() ) { + delete l; + continue; + } + sender = l->first(); + delete l; + } + if ( qstrcmp( conn.receiver->name(), o->name() ) == 0 ) { + receiver = o; + } else { + l = o->queryList( 0, conn.receiver->name(), FALSE ); + if ( !l || !l->first() ) { + delete l; + continue; + } + receiver = l->first(); + delete l; + } + TQString s = "2""%1"; + s = s.arg( conn.signal.data() ); + TQString s2 = "1""%1"; + s2 = s2.arg( conn.slot.data() ); + + TQStrList signalList = sender->metaObject()->signalNames( TRUE ); + TQStrList slotList = receiver->metaObject()->slotNames( TRUE ); + + // avoid warnings + if ( signalList.find( conn.signal ) == -1 || + slotList.find( conn.slot ) == -1 ) + continue; + + TQObject::connect( sender, s, receiver, s2 ); + } +} + +bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return FALSE; + } + + if ( !onlyCustom ) { + TQStrList slotList = o->metaObject()->slotNames( TRUE ); + if ( slotList.find( slot ) != -1 ) + return TRUE; + + if ( ::tqqt_cast(o) ) { + o = TQT_TQOBJECT(( (FormWindow*)o )->mainContainer()); + slotList = o->metaObject()->slotNames( TRUE ); + if ( slotList.find( slot ) != -1 ) + return TRUE; + } + + //if ( ::tqqt_cast(o) ) { + if ( o->inherits( "CustomWidget" ) ) { + MetaDataBase::CustomWidget *w = ( (::CustomWidget*)o )->customWidget(); + for ( TQValueList::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) { + TQCString s = (*it).function; + if ( !s.data() ) + continue; + if ( s == slot ) + return TRUE; + } + } + } + + for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { + Function f = *it; + if ( normalizeFunction( f.function ) == normalizeFunction( slot ) && f.type == "slot" ) + return TRUE; + } + + return FALSE; +} + +bool MetaDataBase::isSlotUsed( TQObject *o, const TQCString &slot ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return FALSE; + } + + TQValueList conns = connections( o ); + for ( TQValueList::Iterator it = conns.begin(); it != conns.end(); ++it ) { + if ( (*it).slot == slot ) + return TRUE; + } + return FALSE; +} + + +void MetaDataBase::addFunction( TQObject *o, const TQCString &function, const TQString &specifier, + const TQString &access, const TQString &type, const TQString &language, + const TQString &returnType ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + Function f; + f.function = function; + f.specifier = specifier; + f.access = access; + f.type = type; + f.language = language; + f.returnType = returnType; + TQValueList::Iterator it = r->functionList.find( f ); + if ( it != r->functionList.end() ) + r->functionList.remove( it ); + r->functionList.append( f ); + ( (FormWindow*)o )->formFile()->addFunctionCode( f ); +} + +void MetaDataBase::setFunctionList( TQObject *o, const TQValueList &functionList ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + r->functionList = functionList; +} + +void MetaDataBase::removeFunction( TQObject *o, const TQCString &function, const TQString &specifier, + const TQString &access, const TQString &type, const TQString &language, + const TQString &returnType ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { + if ( MetaDataBase::normalizeFunction( (*it).function ) == + MetaDataBase::normalizeFunction( function ) && + (*it).specifier == specifier && + (*it).access == access && + (*it).type == type && + ( language.isEmpty() || (*it).language == language ) && + ( returnType.isEmpty() || (*it).returnType == returnType ) ) { + ( (FormWindow*)o )->formFile()->removeFunctionCode( *it ); + r->functionList.remove( it ); + break; + } + } +} + +void MetaDataBase::removeFunction( TQObject *o, const TQString &function ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { + if ( normalizeFunction( (*it).function ) == normalizeFunction( function ) ) { + ( (FormWindow*)o )->formFile()->removeFunctionCode( *it ); + r->functionList.remove( it ); + break; + } + } +} + +TQValueList MetaDataBase::functionList( TQObject *o, bool onlyFunctions ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQValueList(); + } + if ( !onlyFunctions ) + return r->functionList; + TQValueList fList; + for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { + if ( (*it).type == "function" ) + fList.append( *it ); + } + return fList; +} + +TQValueList MetaDataBase::slotList( TQObject *o ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQValueList(); + } + TQValueList slotList; + for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { + if ( (*it).type == "slot" ) + slotList.append( *it ); + } + return slotList; +} + +void MetaDataBase::changeFunction( TQObject *o, const TQString &function, const TQString &newName, + const TQString &returnType ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { + Function f = *it; + if ( normalizeFunction( f.function ) == normalizeFunction( function ) ) { + (*it).function = newName; + if ( !returnType.isNull() ) + (*it).returnType = returnType; + return; + } + } +} + +void MetaDataBase::changeFunctionAttributes( TQObject *o, const TQString &oldName, const TQString &newName, + const TQString &specifier, const TQString &access, + const TQString &type, const TQString &language, + const TQString &returnType ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { + Function f = *it; + if ( normalizeFunction( f.function ) == normalizeFunction( oldName ) ) { + (*it).function = newName; + (*it).specifier = specifier; + (*it).access = access; + (*it).type = type; + (*it).language = language; + (*it).returnType = returnType; + return; + } + } +} + +bool MetaDataBase::hasFunction( TQObject *o, const TQCString &function, bool onlyCustom ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return FALSE; + } + + if ( !onlyCustom ) { + TQStrList functionList = o->metaObject()->slotNames( TRUE ); + if ( functionList.find( function ) != -1 ) + return TRUE; + + if ( ::tqqt_cast(o) ) { + o = TQT_TQOBJECT(( (FormWindow*)o )->mainContainer()); + functionList = o->metaObject()->slotNames( TRUE ); + if ( functionList.find( function ) != -1 ) + return TRUE; + } + + //if ( ::tqqt_cast(o) ) { + if ( o->inherits( "CustomWidget" ) ) { + MetaDataBase::CustomWidget *w = ( (::CustomWidget*)o )->customWidget(); + for ( TQValueList::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) { + TQCString s = (*it).function; + if ( !s.data() ) + continue; + if ( s == function ) + return TRUE; + } + } + } + + for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { + Function f = *it; + if ( normalizeFunction( f.function ) == normalizeFunction( function ) ) + return TRUE; + } + + return FALSE; +} + +TQString MetaDataBase::languageOfFunction( TQObject *o, const TQCString &function ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQString(); + } + + TQString fu = normalizeFunction( function ); + for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { + if ( fu == normalizeFunction( (*it).function ) ) + return (*it).language; + } + return TQString(); +} + +bool MetaDataBase::addCustomWidget( CustomWidget *wid ) +{ + setupDataBase(); + + for ( CustomWidget *w = cWidgets->first(); w; w = cWidgets->next() ) { + if ( *wid == *w ) { + for ( TQValueList::ConstIterator it = wid->lstSignals.begin(); it != wid->lstSignals.end(); ++it ) { + if ( !w->hasSignal( *it ) ) + w->lstSignals.append( *it ); + } + for ( TQValueList::ConstIterator it2 = wid->lstSlots.begin(); it2 != wid->lstSlots.end(); ++it2 ) { + if ( !w->hasSlot( MetaDataBase::normalizeFunction( (*it2).function ).latin1() ) ) + w->lstSlots.append( *it2 ); + } + for ( TQValueList::ConstIterator it3 = wid->lstProperties.begin(); it3 != wid->lstProperties.end(); ++it3 ) { + if ( !w->hasProperty( (*it3).property ) ) + w->lstProperties.append( *it3 ); + } + delete wid; + return FALSE; + } + } + + + WidgetDatabaseRecord *r = new WidgetDatabaseRecord; + r->name = wid->className; + r->group = WidgetDatabase::widgetGroup( "Custom" ); + r->toolTip = wid->className; + r->icon = new TQIconSet( *wid->pixmap, *wid->pixmap ); + r->isContainer = wid->isContainer; + wid->id = WidgetDatabase::addCustomWidget( r ); + cWidgets->append( wid ); + return TRUE; +} + +void MetaDataBase::removeCustomWidget( CustomWidget *w ) +{ + cWidgets->removeRef( w ); +} + +TQPtrList *MetaDataBase::customWidgets() +{ + setupDataBase(); + return cWidgets; +} + +MetaDataBase::CustomWidget *MetaDataBase::customWidget( int id ) +{ + for ( CustomWidget *w = cWidgets->first(); w; w = cWidgets->next() ) { + if ( id == w->id ) + return w; + } + return 0; +} + +bool MetaDataBase::isWidgetNameUsed( CustomWidget *wid ) +{ + for ( CustomWidget *w = cWidgets->first(); w; w = cWidgets->next() ) { + if ( w == wid ) + continue; + if ( wid->className == w->className ) + return TRUE; + } + return FALSE; +} + +bool MetaDataBase::hasCustomWidget( const TQString &className ) +{ + for ( CustomWidget *w = cWidgets->first(); w; w = cWidgets->next() ) { + if ( w->className == className ) + return TRUE; + } + return FALSE; +} + +void MetaDataBase::setTabOrder( TQWidget *w, const TQWidgetList &order ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*) w ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + w, w->name(), w->className() ); + return; + } + + r->tabOrder = order; +} + +TQWidgetList MetaDataBase::tabOrder( TQWidget *w ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*) w ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + w, w->name(), w->className() ); + return TQWidgetList(); + } + + return r->tabOrder; +} + +void MetaDataBase::setIncludes( TQObject *o, const TQValueList &incs ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->includes = incs; +} + +TQValueList MetaDataBase::includes( TQObject *o ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQValueList(); + } + + return r->includes; +} + +void MetaDataBase::setForwards( TQObject *o, const TQStringList &fwds ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->forwards = fwds; +} + +TQStringList MetaDataBase::forwards( TQObject *o ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQStringList(); + } + + return r->forwards; +} + +void MetaDataBase::setVariables( TQObject *o, const TQValueList &vars ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->variables = vars; +} + +void MetaDataBase::addVariable( TQObject *o, const TQString &name, const TQString &access ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + Variable v; + v.varName = name; + v.varAccess = access; + r->variables << v; +} + +void MetaDataBase::removeVariable( TQObject *o, const TQString &name ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + TQValueList::Iterator it = r->variables.begin(); + for ( ; it != r->variables.end(); ++it ) { + if ( (*it).varName == name ) { + r->variables.remove( it ); + break; + } + } +} + +TQValueList MetaDataBase::variables( TQObject *o ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQValueList(); + } + + return r->variables; +} + +bool MetaDataBase::hasVariable( TQObject *o, const TQString &name ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return FALSE; + } + + TQValueList::Iterator it = r->variables.begin(); + for ( ; it != r->variables.end(); ++it ) { + if ( extractVariableName( name ) == extractVariableName( (*it).varName ) ) + return TRUE; + } + return FALSE; +} + +TQString MetaDataBase::extractVariableName( const TQString &name ) +{ + TQString n = name.right( name.length() - name.findRev( ' ' ) - 1 ); + if ( n[ 0 ] == '*' || n[ 0 ] == '&' ) + n[ 0 ] = ' '; + if ( n[ (int)n.length() - 1 ] == ';' ) + n[ (int)n.length() - 1 ] = ' '; + return n.simplifyWhiteSpace(); +} + +void MetaDataBase::setSignalList( TQObject *o, const TQStringList &sigs ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->sigs.clear(); + + for ( TQStringList::ConstIterator it = sigs.begin(); it != sigs.end(); ++it ) { + TQString s = (*it).simplifyWhiteSpace(); + bool hasSemicolon = s.endsWith( ";" ); + if ( hasSemicolon ) + s = s.left( s.length() - 1 ); + int p = s.find( '(' ); + if ( p < 0 ) + p = s.length(); + int sp = s.find( ' ' ); + if ( sp >= 0 && sp < p ) { + s = s.mid( sp+1 ); + p -= sp + 1; + } + if ( p == (int) s.length() ) + s += "()"; + if ( hasSemicolon ) + s += ";"; + r->sigs << s; + } +} + +TQStringList MetaDataBase::signalList( TQObject *o ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQStringList(); + } + + return r->sigs; +} + +void MetaDataBase::setMetaInfo( TQObject *o, MetaInfo mi ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->metaInfo = mi; +} + +MetaDataBase::MetaInfo MetaDataBase::metaInfo( TQObject *o ) +{ + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return MetaInfo(); + } + + return r->metaInfo; +} + + + + +MetaDataBase::CustomWidget::CustomWidget() +{ + className = "MyCustomWidget"; + includeFile = "mywidget.h"; + includePolicy = Local; + sizeHint = TQSize( -1, -1 ); + pixmap = new TQPixmap( BarIcon( "designer_customwidget.png", KDevDesignerPartFactory::instance() ) ); + id = -1; + sizePolicy = TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred ); + isContainer = FALSE; +} + +MetaDataBase::CustomWidget::CustomWidget( const CustomWidget &w ) +{ + className = w.className; + includeFile = w.includeFile; + includePolicy = w.includePolicy; + sizeHint = w.sizeHint; + if ( w.pixmap ) + pixmap = new TQPixmap( *w.pixmap ); + else + pixmap = 0; + id = w.id; + isContainer = w.isContainer; +} + +void MetaDataBase::setCursor( TQWidget *w, const TQCursor &c ) +{ + setupDataBase(); + if ( w->isA( "PropertyObject" ) ) { + ( (PropertyObject*)w )->mdSetCursor( c ); + return; + } + MetaDataBaseRecord *r = db->find( (void*)w ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + w, w->name(), w->className() ); + return; + } + + r->cursor = c; +} + +TQCursor MetaDataBase::cursor( TQWidget *w ) +{ + setupDataBase(); + if ( w->isA( "PropertyObject" ) ) + return ( (PropertyObject*)w )->mdCursor(); + MetaDataBaseRecord *r = db->find( (void*)w ); + if ( !r ) { + w->unsetCursor(); + return w->cursor(); + } + + return r->cursor; +} + +bool MetaDataBase::CustomWidget::operator==( const CustomWidget &w ) const +{ + return className == w.className; +} + +MetaDataBase::CustomWidget &MetaDataBase::CustomWidget::operator=( const CustomWidget &w ) +{ + delete pixmap; + className = w.className; + includeFile = w.includeFile; + includePolicy = w.includePolicy; + sizeHint = w.sizeHint; + if ( w.pixmap ) + pixmap = new TQPixmap( *w.pixmap ); + else + pixmap = 0; + lstSignals = w.lstSignals; + lstSlots = w.lstSlots; + lstProperties = w.lstProperties; + id = w.id; + isContainer = w.isContainer; + return *this; +} + +bool MetaDataBase::CustomWidget::hasSignal( const TQCString &signal ) const +{ + TQStrList sigList = TQWidget::staticMetaObject()->signalNames( TRUE ); + if ( sigList.find( signal ) != -1 ) + return TRUE; + for ( TQValueList::ConstIterator it = lstSignals.begin(); it != lstSignals.end(); ++it ) { + if ( normalizeFunction( *it ) == normalizeFunction( signal ) ) + return TRUE; + } + return FALSE; +} + +bool MetaDataBase::CustomWidget::hasSlot( const TQCString &slot ) const +{ + TQStrList slotList = TQWidget::staticMetaObject()->slotNames( TRUE ); + if ( slotList.find( normalizeFunction( slot ) ) != -1 ) + return TRUE; + + for ( TQValueList::ConstIterator it = lstSlots.begin(); it != lstSlots.end(); ++it ) { + if ( normalizeFunction( (*it).function ) == normalizeFunction( slot ) ) + return TRUE; + } + return FALSE; +} + +bool MetaDataBase::CustomWidget::hasProperty( const TQCString &prop ) const +{ + TQStrList propList = TQWidget::staticMetaObject()->propertyNames( TRUE ); + if ( propList.find( prop ) != -1 ) + return TRUE; + + for ( TQValueList::ConstIterator it = lstProperties.begin(); it != lstProperties.end(); ++it ) { + if ( (*it).property == prop ) + return TRUE; + } + return FALSE; +} + +void MetaDataBase::setPixmapArgument( TQObject *o, int pixmap, const TQString &arg ) +{ + if ( !o ) + return; + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->pixmapArguments.remove( pixmap ); + r->pixmapArguments.insert( pixmap, arg ); +} + +TQString MetaDataBase::pixmapArgument( TQObject *o, int pixmap ) +{ + if ( !o ) + return TQString(); + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQString(); + } + + return *r->pixmapArguments.find( pixmap ); +} + +void MetaDataBase::clearPixmapArguments( TQObject *o ) +{ + if ( !o ) + return; + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->pixmapArguments.clear(); +} + + +void MetaDataBase::setPixmapKey( TQObject *o, int pixmap, const TQString &arg ) +{ + if ( !o ) + return; + setupDataBase(); + if ( o->isA( "PropertyObject" ) ) { + ( (PropertyObject*)o )->mdSetPixmapKey( pixmap, arg ); + return; + } + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->pixmapKeys.remove( pixmap ); + r->pixmapKeys.insert( pixmap, arg ); +} + +TQString MetaDataBase::pixmapKey( TQObject *o, int pixmap ) +{ + if ( !o ) + return TQString(); + setupDataBase(); + if ( o->isA( "PropertyObject" ) ) + return ( (PropertyObject*)o )->mdPixmapKey( pixmap ); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQString(); + } + + TQString s = *r->pixmapKeys.find( pixmap ); + if ( !s.isNull() ) + return s; + if ( !o->isWidgetType() ) + return s; + TQWidget *w = (TQWidget*)o; + if ( w->icon() ) + return *r->pixmapKeys.find( w->icon()->serialNumber() ); + return s; +} + +void MetaDataBase::clearPixmapKeys( TQObject *o ) +{ + if ( !o ) + return; + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->pixmapKeys.clear(); +} + + + +void MetaDataBase::setColumnFields( TQObject *o, const TQMap &columnFields ) +{ + if ( !o ) + return; + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->columnFields = columnFields; +} + +TQMap MetaDataBase::columnFields( TQObject *o ) +{ + if ( !o ) + return TQMap(); + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQMap(); + } + + return r->columnFields; +} + +void MetaDataBase::setEditor( const TQStringList &langs ) +{ + editorLangList = langs; +} + +bool MetaDataBase::hasEditor( const TQString &lang ) +{ + return editorLangList.find( lang ) != editorLangList.end(); +} + +void MetaDataBase::setupInterfaceManagers( const TQString &plugDir ) +{ + if ( !languageInterfaceManager ) { + languageInterfaceManager = + new TQPluginManager( IID_Language, + TQApplication::libraryPaths(), +// kapp->dirs()->resourceDirs("qtplugins"), + plugDir ); + + langList = languageInterfaceManager->featureList(); + langList.remove( "C++" ); + langList << "C++"; + } +} + +TQStringList MetaDataBase::languages() +{ + return langList; +} + +TQString MetaDataBase::normalizeFunction( const TQString &f ) +{ + return Parser::cleanArgs( f ); +} + +LanguageInterface *MetaDataBase::languageInterface( const TQString &lang ) +{ + LanguageInterface* iface = 0; + languageInterfaceManager->queryInterface( lang, &iface ); + return iface; +} + +void MetaDataBase::clear( TQObject *o ) +{ + if ( !o ) + return; + setupDataBase(); + db->remove( (void*)o ); + for ( TQPtrDictIterator it( *( (FormWindow*)o )->widgets() ); it.current(); ++it ) + db->remove( (void*)it.current() ); +} + +void MetaDataBase::setBreakPoints( TQObject *o, const TQValueList &l ) +{ + if ( !o ) + return; + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->breakPoints = l; + + TQMap::Iterator it = r->breakPointConditions.begin(); + while ( it != r->breakPointConditions.end() ) { + int line = it.key(); + ++it; + if ( r->breakPoints.find( line ) == r->breakPoints.end() ) + r->breakPointConditions.remove( r->breakPointConditions.find( line ) ); + } +} + +TQValueList MetaDataBase::breakPoints( TQObject *o ) +{ + if ( !o ) + return TQValueList(); + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQValueList(); + } + + return r->breakPoints; +} + +void MetaDataBase::setBreakPointCondition( TQObject *o, int line, const TQString &condition ) +{ + if ( !o ) + return; + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + r->breakPointConditions.replace( line, condition ); +} + +TQString MetaDataBase::breakPointCondition( TQObject *o, int line ) +{ + if ( !o ) + return TQString(); + setupDataBase(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return TQString(); + } + TQMap::Iterator it = r->breakPointConditions.find( line ); + if ( it == r->breakPointConditions.end() ) + return TQString(); + return *it; +} + +void MetaDataBase::setExportMacro( TQObject *o, const TQString ¯o ) +{ + if ( !o ) + return; + setupDataBase(); + if ( o->isA( "PropertyObject" ) ) { + ( (PropertyObject*)o )->mdSetExportMacro( macro ); + return; + } + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return; + } + + r->exportMacro = macro; +} + +TQString MetaDataBase::exportMacro( TQObject *o ) +{ + if ( !o ) + return ""; + setupDataBase(); + if ( o->isA( "PropertyObject" ) ) + return ( (PropertyObject*)o )->mdExportMacro(); + MetaDataBaseRecord *r = db->find( (void*)o ); + if ( !r ) { + tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", + o, o->name(), o->className() ); + return ""; + } + + return r->exportMacro; +} + +bool MetaDataBase::hasObject( TQObject *o ) +{ + return !!db->find( o ); +} diff --git a/tdevdesigner/designer/metadatabase.h b/kdevdesigner/designer/metadatabase.h similarity index 100% rename from tdevdesigner/designer/metadatabase.h rename to kdevdesigner/designer/metadatabase.h diff --git a/tdevdesigner/designer/multilineeditor.ui b/kdevdesigner/designer/multilineeditor.ui similarity index 100% rename from tdevdesigner/designer/multilineeditor.ui rename to kdevdesigner/designer/multilineeditor.ui diff --git a/kdevdesigner/designer/multilineeditorimpl.cpp b/kdevdesigner/designer/multilineeditorimpl.cpp new file mode 100644 index 00000000..ef06f77b --- /dev/null +++ b/kdevdesigner/designer/multilineeditorimpl.cpp @@ -0,0 +1,415 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "multilineeditorimpl.h" +#include "formwindow.h" +#include "command.h" +#include "mainwindow.h" +#include "richtextfontdialog.h" +#include "syntaxhighlighter_html.h" +#include "widgetfactory.h" + +#include +#include "kdevdesigner_part.h" + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +ToolBarItem::ToolBarItem( TQWidget *parent, TQWidget *toolBar, + const TQString &label, const TQString &tagstr, + const TQIconSet &icon, const TQKeySequence &key ) + : TQAction( parent ) +{ + setIconSet( icon ); + setText( label ); + setAccel( key ); + addTo( toolBar ); + tag = tagstr; + connect( this, TQT_SIGNAL( activated() ), this, TQT_SLOT( wasActivated() ) ); +} + +ToolBarItem::~ToolBarItem() +{ + +} + +void ToolBarItem::wasActivated() +{ + emit clicked( tag ); +} + +TextEdit::TextEdit( TQWidget *parent, const char *name ) + : TQTextEdit( parent, name ) +{ + setTextFormat( TQt::PlainText ); +} + +TQTextParagraph* TextEdit::paragraph() +{ + TQTextCursor *tc = new TQTextCursor( TQTextEdit::document() ); + return tc->paragraph(); +} + + +MultiLineEditor::MultiLineEditor( bool call_static, bool richtextMode, TQWidget *parent, TQWidget *editWidget, + FormWindow *fw, const TQString &text ) + : MultiLineEditorBase( parent, 0, WType_Dialog | WShowModal ), formwindow( fw ), doWrap( FALSE ) +{ + callStatic = call_static; + + if ( callStatic ) + applyButton->hide(); + + textEdit = new TextEdit( centralWidget(), "textedit" ); + Layout4->insertWidget( 0, textEdit ); + + if ( richtextMode ) { + TQPopupMenu *stylesMenu = new TQPopupMenu( this ); + menuBar->insertItem( i18n( "&Styles" ), stylesMenu ); + + basicToolBar = new TQToolBar( i18n( "Basics" ), this, DockTop ); + + ToolBarItem *it = new ToolBarItem( this, basicToolBar, i18n( "Italic" ), + "i", BarIcon( "designer_textitalic.png", KDevDesignerPartFactory::instance() ), CTRL+Key_I ); + it->addTo( stylesMenu ); + connect( it, TQT_SIGNAL( clicked( const TQString& ) ), + this, TQT_SLOT( insertTags( const TQString& ))); + + ToolBarItem *b = new ToolBarItem( this, basicToolBar, i18n( "Bold" ), + "b", BarIcon( "designer_textbold.png", KDevDesignerPartFactory::instance() ), CTRL+Key_B ); + b->addTo( stylesMenu ); + connect( b, TQT_SIGNAL( clicked( const TQString& ) ), + this, TQT_SLOT( insertTags( const TQString& ))); + + ToolBarItem *ul = new ToolBarItem( this, basicToolBar, i18n( "Underline" ), + "u", BarIcon( "designer_textunderline.png" , KDevDesignerPartFactory::instance()), CTRL+Key_U ); + ul->addTo( stylesMenu ); + connect( ul, TQT_SIGNAL( clicked( const TQString& ) ), + this, TQT_SLOT( insertTags( const TQString& ))); + + ToolBarItem *tt = new ToolBarItem( this, basicToolBar, i18n( "Typewriter" ), + "tt", BarIcon( "designer_textteletext.png", KDevDesignerPartFactory::instance() ) ); + tt->addTo( stylesMenu ); + connect( tt, TQT_SIGNAL( clicked( const TQString& ) ), + this, TQT_SLOT( insertTags( const TQString& ))); + + basicToolBar->addSeparator(); + + TQPopupMenu *layoutMenu = new TQPopupMenu( this ); + menuBar->insertItem( i18n( "&Layout" ), layoutMenu ); + + TQAction *brAction = new TQAction( this ); + brAction->setIconSet( BarIcon( "designer_textlinebreak.png", KDevDesignerPartFactory::instance() ) ); + brAction->setText( i18n("Break" ) ); + brAction->addTo( basicToolBar ); + brAction->addTo( layoutMenu ); + connect( brAction, TQT_SIGNAL( activated() ) , this, TQT_SLOT( insertBR() ) ); + + ToolBarItem *p = new ToolBarItem( this, basicToolBar, i18n( "Paragraph" ), + "p", BarIcon( "designer_textparagraph.png", KDevDesignerPartFactory::instance() ) ); + p->addTo( layoutMenu ); + connect( p, TQT_SIGNAL( clicked( const TQString& ) ), + this, TQT_SLOT( insertTags( const TQString& ))); + layoutMenu->insertSeparator(); + basicToolBar->addSeparator(); + + ToolBarItem *al = new ToolBarItem( this, basicToolBar, i18n( "Align left" ), + "p align=\"left\"", BarIcon( "designer_textleft.png", KDevDesignerPartFactory::instance() ) ); + al->addTo( layoutMenu ); + connect( al, TQT_SIGNAL( clicked( const TQString& ) ), + this, TQT_SLOT( insertTags( const TQString& ))); + + ToolBarItem *ac = new ToolBarItem( this, basicToolBar, i18n( "Align center" ), + "p align=\"center\"", BarIcon( "designer_textcenter.png", KDevDesignerPartFactory::instance() ) ); + ac->addTo( layoutMenu ); + connect( ac, TQT_SIGNAL( clicked( const TQString& ) ), + this, TQT_SLOT( insertTags( const TQString& ))); + + ToolBarItem *ar = new ToolBarItem( this, basicToolBar, i18n( "Align right" ), + "p align=\"right\"", BarIcon( "designer_textright.png", KDevDesignerPartFactory::instance() ) ); + ar->addTo( layoutMenu ); + connect( ar, TQT_SIGNAL( clicked( const TQString& ) ), + this, TQT_SLOT( insertTags( const TQString& ))); + + ToolBarItem *block = new ToolBarItem( this, basicToolBar, i18n( "Blockquote" ), + "blockquote", BarIcon( "designer_textjustify.png", KDevDesignerPartFactory::instance() ) ); + block->addTo( layoutMenu ); + connect( block, TQT_SIGNAL( clicked( const TQString& ) ), + this, TQT_SLOT( insertTags( const TQString& ))); + + + TQPopupMenu *fontMenu = new TQPopupMenu( this ); + menuBar->insertItem( i18n( "&Font" ), fontMenu ); + + fontToolBar = new TQToolBar( "Fonts", this, DockTop ); + + TQAction *fontAction = new TQAction( this ); + fontAction->setIconSet( BarIcon( "designer_textfont.png", KDevDesignerPartFactory::instance() ) ); + fontAction->setText( i18n("Font" ) ); + fontAction->addTo( fontToolBar ); + fontAction->addTo( fontMenu ); + connect( fontAction, TQT_SIGNAL( activated() ) , this, TQT_SLOT( showFontDialog() ) ); + + + ToolBarItem *fp1 = new ToolBarItem( this, fontToolBar, i18n( "Fontsize +1" ), + "font size=\"+1\"", BarIcon( "designer_textlarger.png", KDevDesignerPartFactory::instance() ) ); + connect( fp1, TQT_SIGNAL( clicked( const TQString& ) ), + this, TQT_SLOT( insertTags( const TQString& ))); + + ToolBarItem *fm1 = new ToolBarItem( this, fontToolBar, i18n( "Fontsize -1" ), + "font size=\"-1\"", BarIcon( "designer_textsmaller.png", KDevDesignerPartFactory::instance() ) ); + connect( fm1, TQT_SIGNAL( clicked( const TQString& ) ), + this, TQT_SLOT( insertTags( const TQString& ))); + + ToolBarItem *h1 = new ToolBarItem( this, fontToolBar, i18n( "Headline 1" ), + "h1", BarIcon( "designer_texth1.png", KDevDesignerPartFactory::instance() ) ); + connect( h1, TQT_SIGNAL( clicked( const TQString& ) ), + this, TQT_SLOT( insertTags( const TQString& ))); + + ToolBarItem *h2 = new ToolBarItem( this, fontToolBar, i18n( "Headline 2" ), + "h2", BarIcon( "designer_texth2.png", KDevDesignerPartFactory::instance() ) ); + connect( h2, TQT_SIGNAL( clicked( const TQString& ) ), + this, TQT_SLOT( insertTags( const TQString& ))); + + ToolBarItem *h3 = new ToolBarItem( this, fontToolBar, i18n( "Headline 3" ), + "h3", BarIcon( "designer_texth3.png", KDevDesignerPartFactory::instance() ) ); + connect( h3, TQT_SIGNAL( clicked( const TQString& ) ), + this, TQT_SLOT( insertTags( const TQString& ))); + + TQPopupMenu *optionsMenu = new TQPopupMenu( this ); + menuBar->insertItem( i18n( "O&ptions" ), optionsMenu ); + + optionsToolBar = new TQToolBar( "Options", this, DockTop ); + wrapAction = new TQAction( this ); + wrapAction->setToggleAction( TRUE ); + wrapAction->setIconSet( BarIcon( "designer_wordwrap.png", KDevDesignerPartFactory::instance() ) ); + wrapAction->setText( i18n( "Word Wrapping" ) ); + wrapAction->addTo( optionsToolBar ); + wrapAction->addTo( optionsMenu ); + connect( wrapAction, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( changeWrapMode( bool ) ) ); + + oldDoWrap = doWrap; + wrapAction->setOn( doWrap ); + + connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + textEdit->document()->setFormatter( new TQTextFormatterBreakInWords ); + textEdit->document()->setUseFormatCollection( FALSE ); + textEdit->document()->setPreProcessor( new SyntaxHighlighter_HTML ); + + if ( !callStatic && ::tqqt_cast(editWidget) ) { + mlined = (TQTextEdit*)editWidget; + mlined->setReadOnly( TRUE ); + + const TQMetaProperty *wordWrap = mlined->metaObject()->property( + mlined->metaObject()->findProperty( "wordWrap", TRUE ), TRUE ); + oldWrapMode = 0; + oldWrapString = "NoWrap"; + if ( wordWrap ) { + oldWrapMode = mlined->property( "wordWrap" ); + oldWrapString = TQString( wordWrap->valueToKey( oldWrapMode.toInt() ) ); + if ( oldWrapString != "NoWrap" ) + doWrap = TRUE; + } + textEdit->setAlignment( mlined->alignment() ); + textEdit->setWordWrap( mlined->wordWrap() ); + textEdit->setWrapColumnOrWidth( mlined->wrapColumnOrWidth() ); + textEdit->setWrapPolicy( mlined->wrapPolicy() ); + textEdit->setText( mlined->text() ); + if ( !mlined->text().isEmpty() ) + textEdit->selectAll(); + } else { + textEdit->setText( text ); + textEdit->selectAll(); + } + } else { + textEdit->setText( text ); + textEdit->selectAll(); + } + textEdit->setFocus(); +} + +int MultiLineEditor::exec() +{ + res = 1; + show(); + tqApp->enter_loop(); + return res; +} + +void MultiLineEditor::okClicked() +{ + applyClicked(); + close(); +} + +void MultiLineEditor::applyClicked() +{ + if ( !callStatic ) { + PopulateMultiLineEditCommand *cmd = new PopulateMultiLineEditCommand( i18n( "Set the Text of '%1'" ).arg( mlined->name() ), + formwindow, mlined, textEdit->text() ); + cmd->execute(); + formwindow->commandHistory()->addCommand( cmd ); + + if ( oldDoWrap != doWrap ) { + TQString pn( i18n( "Set 'wordWrap' of '%2'" ).arg( mlined->name() ) ); + SetPropertyCommand *propcmd; + if ( doWrap ) + propcmd = new SetPropertyCommand( pn, formwindow, + TQT_TQOBJECT(mlined), MainWindow::self->propertyeditor(), + "wordWrap", WidgetFactory::property( TQT_TQOBJECT(mlined), "wordWrap" ), + TQVariant( 1 ), "WidgetWidth", oldWrapString ); + else + propcmd = new SetPropertyCommand( pn, formwindow, + TQT_TQOBJECT(mlined), MainWindow::self->propertyeditor(), + "wordWrap", WidgetFactory::property( TQT_TQOBJECT(mlined), "wordWrap" ), + TQVariant( 0 ), "NoWrap", oldWrapString ); + + propcmd->execute(); + formwindow->commandHistory()->addCommand( propcmd, TRUE ); + } + textEdit->setFocus(); + } + else { + staticText = textEdit->text(); + } +} + +void MultiLineEditor::cancelClicked() +{ + res = 0; + close(); +} + +void MultiLineEditor::closeEvent( TQCloseEvent *e ) +{ + tqApp->exit_loop(); + MultiLineEditorBase::closeEvent( e ); +} + +void MultiLineEditor::insertTags( const TQString &tag ) +{ + int pfrom, pto, ifrom, ito; + TQString tagend( tag.simplifyWhiteSpace() ); + tagend.remove( tagend.find( ' ', 0 ), tagend.length() ); + if ( textEdit->hasSelectedText() ) { + textEdit->getSelection( &pfrom, &ifrom, &pto, &ito ); + TQString buf = textEdit->selectedText(); + buf = TQString( "<%1>%3" ).arg( tag ).arg( tagend ).arg( buf ); + textEdit->removeSelectedText(); + textEdit->insertAt( buf, pfrom, ifrom ); + textEdit->setCursorPosition( pto, ito + 2 + tag.length() ); + } + else { + int para, index; + textEdit->getCursorPosition( ¶, &index ); + textEdit->insert( TQString( "<%1>" ).arg( tag ).arg( tagend ) ); + index += 2 + tag.length(); + textEdit->setCursorPosition( para, index ); + } +} + +void MultiLineEditor::insertBR() +{ + textEdit->insert( "
    " ); +} + +void MultiLineEditor::showFontDialog() +{ + bool selText = FALSE; + int pfrom, pto, ifrom, ito; + if ( textEdit->hasSelectedText() ) { + textEdit->getSelection( &pfrom, &ifrom, &pto, &ito ); + selText = TRUE; + } + RichTextFontDialog *fd = new RichTextFontDialog( this ); + if ( fd->exec() == TQDialog::Accepted ) { + TQString size, font; + if ( fd->getSize() != "0" ) + size = "size=\"" + fd->getSize() + "\""; + TQString color; + if ( !fd->getColor().isEmpty() && fd->getColor() != "#000000" ) + color = "color=\"" + fd->getColor() + "\""; + if ( fd->getFont() != "default" ) + font = "face=\"" + fd->getFont() + "\""; + TQString tag( TQString( "font %1 %2 %3" ) + .arg( color ).arg( size ).arg( font ) ); + + if ( selText ) + textEdit->setSelection( pfrom, ifrom, pto, ito ); + insertTags( tag.simplifyWhiteSpace() ); + } + else if ( selText ) + textEdit->setSelection( pfrom, ifrom, pto, ito ); +} + +TQString MultiLineEditor::getStaticText() +{ + return staticText.stripWhiteSpace(); +} + +TQString MultiLineEditor::getText( TQWidget *parent, const TQString &text, bool richtextMode, bool *useWrap ) +{ + MultiLineEditor medit( TRUE, richtextMode, parent, 0, 0, text ); + if ( richtextMode ) + medit.setUseWrapping( *useWrap ); + if ( medit.exec() == TQDialog::Accepted ) { + *useWrap = medit.useWrapping(); + return medit.getStaticText(); + } + return TQString(); +} + +void MultiLineEditor::changeWrapMode( bool b ) +{ + doWrap = b; + if ( doWrap && !callStatic ) { + if ( oldDoWrap ) + textEdit->setProperty( "wordWrap", oldWrapMode ); + else + textEdit->setWordWrap( TQTextEdit::WidgetWidth ); + } else { + textEdit->setWordWrap( TQTextEdit::NoWrap ); + } +} + +bool MultiLineEditor::useWrapping() const +{ + return doWrap; +} + +void MultiLineEditor::setUseWrapping( bool b ) +{ + doWrap = b; + wrapAction->setOn( doWrap ); +} diff --git a/tdevdesigner/designer/multilineeditorimpl.h b/kdevdesigner/designer/multilineeditorimpl.h similarity index 100% rename from tdevdesigner/designer/multilineeditorimpl.h rename to kdevdesigner/designer/multilineeditorimpl.h diff --git a/kdevdesigner/designer/myiconloader.cpp b/kdevdesigner/designer/myiconloader.cpp new file mode 100644 index 00000000..80bbc5ba --- /dev/null +++ b/kdevdesigner/designer/myiconloader.cpp @@ -0,0 +1,32 @@ +/*************************************************************************** + * Copyright (C) 2004 by Alexander Dymo * + * cloudtemple@mksat.net * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ +#include "myiconloader.h" +#include "kdevdesigner_part.h" +#include + +TQPixmap BarIcon2( const TQString & name ) +{ + return BarIcon(name, KDevDesignerPartFactory::instance()); +} + +TQPixmap SmallIcon2( const TQString & name) +{ + return SmallIcon(name, KDevDesignerPartFactory::instance()); +} diff --git a/tdevdesigner/designer/myiconloader.h b/kdevdesigner/designer/myiconloader.h similarity index 100% rename from tdevdesigner/designer/myiconloader.h rename to kdevdesigner/designer/myiconloader.h diff --git a/tdevdesigner/designer/newform.ui b/kdevdesigner/designer/newform.ui similarity index 100% rename from tdevdesigner/designer/newform.ui rename to kdevdesigner/designer/newform.ui diff --git a/kdevdesigner/designer/newformimpl.cpp b/kdevdesigner/designer/newformimpl.cpp new file mode 100644 index 00000000..0cdc738b --- /dev/null +++ b/kdevdesigner/designer/newformimpl.cpp @@ -0,0 +1,414 @@ +/********************************************************************** +** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "newformimpl.h" +#include "mainwindow.h" +#include "metadatabase.h" +#include "project.h" +#include "formwindow.h" +#include "widgetfactory.h" +#include "widgetdatabase.h" +#include "actioneditorimpl.h" +#include "hierarchyview.h" +#include "resource.h" +#include "projectsettingsimpl.h" +#include "sourcefile.h" + +#include +#include "kdevdesigner_part.h" +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static int forms = 0; + +ProjectItem::ProjectItem( TQIconView *view, const TQString &text ) + : NewItem( view, text ) +{ +} + +void ProjectItem::insert( Project * ) +{ + MainWindow::self->createNewProject( lang ); +} + + + +FormItem::FormItem( TQIconView *view, const TQString &text ) + : NewItem( view, text ) +{ +} + +void FormItem::insert( Project *pro ) +{ + TQString n = "Form" + TQString::number( ++forms ); + FormWindow *fw = 0; + FormFile *ff = new FormFile( FormFile::createUnnamedFileName(), TRUE, pro ); + fw = new FormWindow( ff, MainWindow::self, MainWindow::self->qWorkspace(), n ); + fw->setProject( pro ); + MetaDataBase::addEntry( TQT_TQOBJECT(fw) ); + if ( fType == Widget ) { + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQWIDGET_OBJECT_NAME_STRING ), + fw, n.latin1() ); + fw->setMainContainer( w ); + } else if ( fType == Dialog ) { + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQDIALOG_OBJECT_NAME_STRING ), fw, n.latin1() ); + fw->setMainContainer( w ); + } else if ( fType == Wizard ) { + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQWIZARD_OBJECT_NAME_STRING ), + fw, n.latin1() ); + fw->setMainContainer( w ); + } else if ( fType == MainWindow ) { + TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQMAINWINDOW_OBJECT_NAME_STRING ), + fw, n.latin1() ); + fw->setMainContainer( w ); + } + + fw->setCaption( n ); + fw->resize( 600, 480 ); + MainWindow::self->insertFormWindow( fw ); + + TemplateWizardInterface *iface = + MainWindow::self->templateWizardInterface( fw->mainContainer()->className() ); + if ( iface ) { + iface->setup( fw->mainContainer()->className(), fw->mainContainer(), + fw->iFace(), MainWindow::self->designerInterface() ); + iface->release(); + } + + // the wizard might have changed a lot, lets update everything + MainWindow::self->actioneditor()->setFormWindow( fw ); + MainWindow::self->objectHierarchy()->setFormWindow( fw, TQT_TQOBJECT(fw) ); + MainWindow::self->objectHierarchy()->formDefinitionView()->refresh(); + MainWindow::self->objectHierarchy()->rebuild(); + fw->killAccels( TQT_TQOBJECT(fw) ); + fw->project()->setModified( TRUE ); + fw->setFocus(); + if ( !pro->isDummy() ) { + fw->setSavePixmapInProject( TRUE ); + fw->setSavePixmapInline( FALSE ); + } +} + + + +CustomFormItem::CustomFormItem( TQIconView *view, const TQString &text ) + : NewItem( view, text ) +{ +} + +static void unifyFormName( FormWindow *fw, TQWorkspace *qworkspace ) +{ + TQStringList lst; + TQWidgetList windows = qworkspace->windowList(); + for ( TQWidget *w =windows.first(); w; w = windows.next() ) { + if ( w == fw ) + continue; + lst << w->name(); + } + + if ( lst.findIndex( fw->name() ) == -1 ) + return; + TQString origName = fw->name(); + TQString n = origName; + int i = 1; + while ( lst.findIndex( n ) != -1 ) { + n = origName + TQString::number( i++ ); + } + fw->setName( n ); + fw->setCaption( n ); +} + +void CustomFormItem::insert( Project *pro ) +{ + TQString filename = templateFileName(); + if ( !filename.isEmpty() && TQFile::exists( filename ) ) { + Resource resource( MainWindow::self ); + FormFile *ff = new FormFile( filename, TRUE, pro ); + if ( !resource.load( ff ) ) { + TQMessageBox::information( MainWindow::self, i18n("Load Template"), + i18n("Could not load form description from template '%1'" ).arg( filename ) ); + delete ff; + return; + } + ff->setFileName( TQString() ); + if ( MainWindow::self->formWindow() ) { + MainWindow::self->formWindow()->setFileName( TQString() ); + unifyFormName( MainWindow::self->formWindow(), MainWindow::self->qWorkspace() ); + if ( !pro->isDummy() ) { + MainWindow::self->formWindow()->setSavePixmapInProject( TRUE ); + MainWindow::self->formWindow()->setSavePixmapInline( FALSE ); + } + } + } +} + + + +SourceFileItem::SourceFileItem( TQIconView *view, const TQString &text ) + : NewItem( view, text ), visible( TRUE ) +{ +} + +void SourceFileItem::insert( Project *pro ) +{ + SourceFile *f = new SourceFile( SourceFile::createUnnamedFileName( ext ), TRUE, pro ); + MainWindow::self->editSource( f ); +} + +void SourceFileItem::setProject( Project *pro ) +{ + TQIconView *iv = iconView(); + bool v = lang == pro->language(); + if ( !iv || v == visible ) + return; + visible = v; + if ( !visible ) + iv->takeItem( this ); + else + iv->insertItem( this ); +} + + + +SourceTemplateItem::SourceTemplateItem( TQIconView *view, const TQString &text ) + : NewItem( view, text ), visible( TRUE ) +{ +} + +void SourceTemplateItem::insert( Project *pro ) +{ + SourceTemplateInterface *siface = MainWindow::self->sourceTemplateInterface( text() ); + if ( !siface ) + return; + SourceTemplateInterface::Source src = siface->create( text(), MainWindow::self->designerInterface() ); + SourceFile *f = 0; + if ( src.type == SourceTemplateInterface::Source::Invalid ) + return; + if ( src.type == SourceTemplateInterface::Source::FileName ) + f = new SourceFile( src.filename, FALSE, pro ); + else + f = new SourceFile( SourceFile::createUnnamedFileName( src.extension ), TRUE, pro ); + if ( f->isAccepted()) { + f->setText( src.code ); + MainWindow::self->editSource( f ); + f->setModified( TRUE ); + } else { + delete f; + } +} + +void SourceTemplateItem::setProject( Project *pro ) +{ + TQIconView *iv = iconView(); + bool v = !pro->isDummy() && lang == pro->language(); + if ( !iv || v == visible ) + return; + visible = v; + if ( !visible ) + iv->takeItem( this ); + else + iv->insertItem( this ); +} + +void NewForm::insertTemplates( TQIconView *tView, + const TQString &templatePath ) +{ + TQStringList::Iterator it; + TQStringList languages = MetaDataBase::languages(); + if ( !MainWindow::self->singleProjectMode() ) { + for ( it = languages.begin(); it != languages.end(); ++it ) { + ProjectItem *pi = new ProjectItem( tView, i18n("%1 Project" ).arg( *it ) ); + allItems.append( pi ); + pi->setLanguage( *it ); + pi->setPixmap( BarIcon( "designer_project.png" , KDevDesignerPartFactory::instance()) ); + pi->setDragEnabled( FALSE ); + } + } + TQIconViewItem *cur = 0; + FormItem *fi = new FormItem( tView,i18n( "Dialog" ) ); + allItems.append( fi ); + fi->setFormType( FormItem::Dialog ); + fi->setPixmap( BarIcon( "designer_newform.png" , KDevDesignerPartFactory::instance()) ); + fi->setDragEnabled( FALSE ); + cur = fi; + if ( !MainWindow::self->singleProjectMode() ) { + fi = new FormItem( tView,i18n( "Wizard" ) ); + allItems.append( fi ); + fi->setFormType( FormItem::Wizard ); + fi->setPixmap( BarIcon( "designer_newform.png" , KDevDesignerPartFactory::instance()) ); + fi->setDragEnabled( FALSE ); + fi = new FormItem( tView, i18n( "Widget" ) ); + allItems.append( fi ); + fi->setFormType( FormItem::Widget ); + fi->setPixmap( BarIcon( "designer_newform.png" , KDevDesignerPartFactory::instance()) ); + fi->setDragEnabled( FALSE ); + fi = new FormItem( tView, i18n( "Main Window" ) ); + allItems.append( fi ); + fi->setFormType( FormItem::MainWindow ); + fi->setPixmap( BarIcon( "designer_newform.png" , KDevDesignerPartFactory::instance()) ); + fi->setDragEnabled( FALSE ); + + TQString templPath = templatePath; + TQStringList templRoots; + const char *qtdir = getenv( "QTDIR" ); + if(qtdir) + templRoots << qtdir; + templRoots << tqInstallPathData(); + if(qtdir) //try the tools/designer directory last! + templRoots << (TQString(qtdir) + "/tools/designer"); + for ( TQStringList::Iterator it = templRoots.begin(); it != templRoots.end(); ++it ) { + TQString path = (*it) + "/templates"; + if ( TQFile::exists( path )) { + templPath = path; + break; + } + } + if ( !templPath.isEmpty() ) { + TQDir dir( templPath ); + const TQFileInfoList *filist = dir.entryInfoList( TQDir::DefaultFilter, TQDir::DirsFirst | TQDir::Name ); + if ( filist ) { + TQFileInfoListIterator it( *filist ); + TQFileInfo *fi; + while ( ( fi = it.current() ) != 0 ) { + ++it; + if ( !fi->isFile() || fi->extension() != "ui" ) + continue; + TQString name = fi->baseName(); + name = name.replace( '_', ' ' ); + CustomFormItem *ci = new CustomFormItem( tView, name ); + allItems.append( ci ); + ci->setDragEnabled( FALSE ); + ci->setPixmap( BarIcon( "designer_newform.png" , KDevDesignerPartFactory::instance()) ); + ci->setTemplateFile( fi->absFilePath() ); + } + } + } + } + + for ( it = languages.begin(); it != languages.end(); ++it ) { + LanguageInterface *iface = MetaDataBase::languageInterface( *it ); + if ( iface ) { + TQMap extensionMap; + iface->preferedExtensions( extensionMap ); + for ( TQMap::Iterator eit = extensionMap.begin(); + eit != extensionMap.end(); ++eit ) { + SourceFileItem * si = new SourceFileItem( tView, *eit ); + allItems.append( si ); + si->setExtension( eit.key() ); + si->setLanguage( *it ); + si->setPixmap( BarIcon( "designer_filenew.png", KDevDesignerPartFactory::instance() ) ); + si->setDragEnabled( FALSE ); + } + iface->release(); + } + } + + if ( !MainWindow::self->singleProjectMode() ) { + TQStringList sourceTemplates = MainWindow::self->sourceTemplates(); + for ( TQStringList::Iterator sit = sourceTemplates.begin(); sit != sourceTemplates.end(); ++sit ) { + SourceTemplateInterface *siface = MainWindow::self->sourceTemplateInterface( *sit ); + if ( !siface ) + continue; + SourceTemplateItem * si = new SourceTemplateItem( tView, *sit ); + allItems.append( si ); + si->setTemplate( *sit ); + si->setLanguage( siface->language( *sit ) ); + si->setPixmap( BarIcon( "designer_filenew.png", KDevDesignerPartFactory::instance() ) ); + si->setDragEnabled( FALSE ); + siface->release(); + } + } + + tView->viewport()->setFocus(); + tView->setCurrentItem( cur ); + + if ( MainWindow::self->singleProjectMode() ) + adjustSize(); +} + +NewForm::NewForm( TQIconView *templateView, const TQString &templatePath ) +{ + insertTemplates( templateView, templatePath ); + projectChanged( i18n( "" ) ); +} + +NewForm::NewForm( TQWidget *parent, const TQStringList& projects, + const TQString& currentProject, const TQString &templatePath ) + : NewFormBase( parent, 0, TRUE ) +{ + connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + + projectCombo->insertStringList( projects ); + projectCombo->setCurrentText( currentProject ); + + insertTemplates( templateView, templatePath ); + + projectChanged( projectCombo->currentText() ); +} + +void NewForm::accept() +{ + if ( !templateView->currentItem() ) + return; + Project *pro = MainWindow::self->findProject( projectCombo->currentText() ); + if ( !pro ) + return; + MainWindow::self->setCurrentProject( pro ); + NewFormBase::accept(); + ( (NewItem*)templateView->currentItem() )->insert( pro ); +} + +void NewForm::projectChanged( const TQString &project ) +{ + Project *pro = MainWindow::self->findProject( project ); + if ( !pro ) + return; + TQIconViewItem *i; + for ( i = allItems.first(); i; i = allItems.next() ) + ( (NewItem*)i )->setProject( pro ); + templateView->setCurrentItem( templateView->firstItem() ); + templateView->arrangeItemsInGrid( TRUE ); +} + +void NewForm::itemChanged( TQIconViewItem *item ) +{ + labelProject->setEnabled( item->rtti() != NewItem::ProjectType ); + projectCombo->setEnabled( item->rtti() != NewItem::ProjectType ); +} + +TQPtrList NewForm::allViewItems() +{ + return allItems; +} diff --git a/tdevdesigner/designer/newformimpl.h b/kdevdesigner/designer/newformimpl.h similarity index 100% rename from tdevdesigner/designer/newformimpl.h rename to kdevdesigner/designer/newformimpl.h diff --git a/tdevdesigner/designer/orderindicator.cpp b/kdevdesigner/designer/orderindicator.cpp similarity index 100% rename from tdevdesigner/designer/orderindicator.cpp rename to kdevdesigner/designer/orderindicator.cpp diff --git a/tdevdesigner/designer/orderindicator.h b/kdevdesigner/designer/orderindicator.h similarity index 100% rename from tdevdesigner/designer/orderindicator.h rename to kdevdesigner/designer/orderindicator.h diff --git a/tdevdesigner/designer/outputwindow.cpp b/kdevdesigner/designer/outputwindow.cpp similarity index 100% rename from tdevdesigner/designer/outputwindow.cpp rename to kdevdesigner/designer/outputwindow.cpp diff --git a/tdevdesigner/designer/outputwindow.h b/kdevdesigner/designer/outputwindow.h similarity index 100% rename from tdevdesigner/designer/outputwindow.h rename to kdevdesigner/designer/outputwindow.h diff --git a/tdevdesigner/designer/paletteeditor.ui b/kdevdesigner/designer/paletteeditor.ui similarity index 100% rename from tdevdesigner/designer/paletteeditor.ui rename to kdevdesigner/designer/paletteeditor.ui diff --git a/tdevdesigner/designer/paletteeditoradvanced.ui b/kdevdesigner/designer/paletteeditoradvanced.ui similarity index 100% rename from tdevdesigner/designer/paletteeditoradvanced.ui rename to kdevdesigner/designer/paletteeditoradvanced.ui diff --git a/tdevdesigner/designer/paletteeditoradvancedimpl.cpp b/kdevdesigner/designer/paletteeditoradvancedimpl.cpp similarity index 100% rename from tdevdesigner/designer/paletteeditoradvancedimpl.cpp rename to kdevdesigner/designer/paletteeditoradvancedimpl.cpp diff --git a/tdevdesigner/designer/paletteeditoradvancedimpl.h b/kdevdesigner/designer/paletteeditoradvancedimpl.h similarity index 100% rename from tdevdesigner/designer/paletteeditoradvancedimpl.h rename to kdevdesigner/designer/paletteeditoradvancedimpl.h diff --git a/tdevdesigner/designer/paletteeditorimpl.cpp b/kdevdesigner/designer/paletteeditorimpl.cpp similarity index 100% rename from tdevdesigner/designer/paletteeditorimpl.cpp rename to kdevdesigner/designer/paletteeditorimpl.cpp diff --git a/tdevdesigner/designer/paletteeditorimpl.h b/kdevdesigner/designer/paletteeditorimpl.h similarity index 100% rename from tdevdesigner/designer/paletteeditorimpl.h rename to kdevdesigner/designer/paletteeditorimpl.h diff --git a/kdevdesigner/designer/pics/CMakeLists.txt b/kdevdesigner/designer/pics/CMakeLists.txt new file mode 100644 index 00000000..3b6367c0 --- /dev/null +++ b/kdevdesigner/designer/pics/CMakeLists.txt @@ -0,0 +1,85 @@ +################################################# +# +# (C) 2012 Slavek Banko +# slavek (DOT) banko (AT) axis.cz +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +install( + FILES + designer_adjustsize.png designer_appicon.png designer_arrow.png + designer_background.png designer_book.png designer_buttongroup.png + designer_checkbox.png designer_combobox.png designer_connecttool.png + designer_cross.png designer_customwidget.png designer_d_adjustsize.png + designer_d_book.png designer_d_buttongroup.png designer_d_checkbox.png + designer_d_combobox.png designer_d_connecttool.png designer_d_customwidget.png + designer_d_databrowser.png designer_d_datatable.png designer_d_dataview.png + designer_d_dateedit.png designer_d_datetimeedit.png designer_d_dial.png + designer_d_down.png designer_d_editbreaklayout.png designer_d_editcopy.png + designer_d_editcut.png designer_d_editdelete.png designer_d_editgrid.png + designer_d_edithlayout.png designer_d_edithlayoutsplit.png + designer_d_editlower.png designer_d_editpaste.png designer_d_editraise.png + designer_d_editslots.png designer_d_editvlayout.png + designer_d_editvlayoutsplit.png designer_d_filenew.png designer_d_fileopen.png + designer_d_filesave.png designer_d_folder.png designer_d_form.png + designer_d_frame.png designer_d_groupbox.png designer_d_help.png + designer_d_home.png designer_d_iconview.png designer_d_image.png + designer_d_label.png designer_d_layout.png designer_d_lcdnumber.png + designer_d_left.png designer_d_line.png designer_d_lineedit.png + designer_d_listbox.png designer_d_listview.png designer_d_multilineedit.png + designer_d_newform.png designer_d_ordertool.png designer_d_pixlabel.png + designer_d_pointer.png designer_d_print.png designer_d_progress.png + designer_d_project.png designer_d_pushbutton.png designer_d_radiobutton.png + designer_d_redo.png designer_d_richtextedit.png designer_d_right.png + designer_d_scrollbar.png designer_d_searchfind.png designer_d_setbuddy.png + designer_d_slider.png designer_d_spacer.png designer_d_spinbox.png + designer_d_table.png designer_d_tabwidget.png designer_d_textbold.png + designer_d_textbrowser.png designer_d_textcenter.png designer_d_textedit.png + designer_d_textfont.png designer_d_texth1.png designer_d_texth2.png + designer_d_texth3.png designer_d_textitalic.png designer_d_textjustify.png + designer_d_textlarger.png designer_d_textleft.png designer_d_textlinebreak.png + designer_d_textparagraph.png designer_d_textright.png designer_d_textsmaller.png + designer_d_textteletext.png designer_d_textunderline.png designer_d_textview.png + designer_d_timeedit.png designer_d_toolbox.png designer_d_toolbutton.png + designer_d_undo.png designer_d_up.png designer_d_widgetstack.png + designer_d_wizarddata.png designer_d_wizarddialog.png designer_d_wordwrap.png + designer_databrowser.png designer_datatable.png designer_dataview.png + designer_dateedit.png designer_datetimeedit.png designer_dial.png + designer_down.png designer_editbreaklayout.png designer_editcopy.png + designer_editcut.png designer_editdelete.png designer_editgrid.png + designer_edithlayout.png designer_edithlayoutsplit.png designer_editlower.png + designer_editpaste.png designer_editraise.png designer_editslots.png + designer_editvlayout.png designer_editvlayoutsplit.png designer_filenew.png + designer_fileopen.png designer_filesave.png designer_folder.png + designer_form.png designer_frame.png designer_groupbox.png designer_hand.png + designer_help.png designer_home.png designer_hsplit.png designer_ibeam.png + designer_iconview.png designer_image.png designer_label.png designer_layout.png + designer_lcdnumber.png designer_left.png designer_line.png designer_lineedit.png + designer_listbox.png designer_listview.png designer_multilineedit.png + designer_newform.png designer_no.png designer_object.png designer_ordertool.png + designer_pixlabel.png designer_pointer.png designer_print.png + designer_progress.png designer_project.png designer_pushbutton.png + designer_qtlogo.png designer_radiobutton.png designer_redo.png + designer_resetproperty.png designer_richtextedit.png designer_right.png + designer_s_down.png designer_s_editcut.png designer_s_left.png + designer_s_right.png designer_s_up.png designer_scrollbar.png + designer_searchfind.png designer_setbuddy.png designer_sizeall.png + designer_sizeb.png designer_sizef.png designer_sizeh.png designer_sizev.png + designer_slider.png designer_spacer.png designer_spinbox.png designer_splash.png + designer_table.png designer_tabwidget.png designer_textbold.png + designer_textbrowser.png designer_textcenter.png designer_textedit.png + designer_textfont.png designer_texth1.png designer_texth2.png + designer_texth3.png designer_textitalic.png designer_textjustify.png + designer_textlarger.png designer_textleft.png designer_textlinebreak.png + designer_textparagraph.png designer_textright.png designer_textsmaller.png + designer_textteletext.png designer_textunderline.png designer_textview.png + designer_timeedit.png designer_toolbox.png designer_toolbutton.png + designer_undo.png designer_up.png designer_uparrow.png designer_vsplit.png + designer_wait.png designer_widgetstack.png designer_wizarddata.png + designer_wizarddialog.png designer_wordwrap.png + DESTINATION ${DATA_INSTALL_DIR}/kdevdesignerpart/pics +) diff --git a/kdevdesigner/designer/pics/Makefile.am b/kdevdesigner/designer/pics/Makefile.am new file mode 100644 index 00000000..8749186b --- /dev/null +++ b/kdevdesigner/designer/pics/Makefile.am @@ -0,0 +1,2 @@ +picsdirdir = $(kde_datadir)/kdevdesignerpart/pics +picsdir_DATA = designer_adjustsize.png designer_appicon.png designer_arrow.png designer_background.png designer_book.png designer_buttongroup.png designer_checkbox.png designer_combobox.png designer_connecttool.png designer_cross.png designer_customwidget.png designer_d_adjustsize.png designer_d_book.png designer_d_buttongroup.png designer_d_checkbox.png designer_d_combobox.png designer_d_connecttool.png designer_d_customwidget.png designer_d_databrowser.png designer_d_datatable.png designer_d_dataview.png designer_d_dateedit.png designer_d_datetimeedit.png designer_d_dial.png designer_d_down.png designer_d_editbreaklayout.png designer_d_editcopy.png designer_d_editcut.png designer_d_editdelete.png designer_d_editgrid.png designer_d_edithlayout.png designer_d_edithlayoutsplit.png designer_d_editlower.png designer_d_editpaste.png designer_d_editraise.png designer_d_editslots.png designer_d_editvlayout.png designer_d_editvlayoutsplit.png designer_d_filenew.png designer_d_fileopen.png designer_d_filesave.png designer_d_folder.png designer_d_form.png designer_d_frame.png designer_d_groupbox.png designer_d_help.png designer_d_home.png designer_d_iconview.png designer_d_image.png designer_d_label.png designer_d_layout.png designer_d_lcdnumber.png designer_d_left.png designer_d_line.png designer_d_lineedit.png designer_d_listbox.png designer_d_listview.png designer_d_multilineedit.png designer_d_newform.png designer_d_ordertool.png designer_d_pixlabel.png designer_d_pointer.png designer_d_print.png designer_d_progress.png designer_d_project.png designer_d_pushbutton.png designer_d_radiobutton.png designer_d_redo.png designer_d_richtextedit.png designer_d_right.png designer_d_scrollbar.png designer_d_searchfind.png designer_d_setbuddy.png designer_d_slider.png designer_d_spacer.png designer_d_spinbox.png designer_d_table.png designer_d_tabwidget.png designer_d_textbold.png designer_d_textbrowser.png designer_d_textcenter.png designer_d_textedit.png designer_d_textfont.png designer_d_texth1.png designer_d_texth2.png designer_d_texth3.png designer_d_textitalic.png designer_d_textjustify.png designer_d_textlarger.png designer_d_textleft.png designer_d_textlinebreak.png designer_d_textparagraph.png designer_d_textright.png designer_d_textsmaller.png designer_d_textteletext.png designer_d_textunderline.png designer_d_textview.png designer_d_timeedit.png designer_d_toolbox.png designer_d_toolbutton.png designer_d_undo.png designer_d_up.png designer_d_widgetstack.png designer_d_wizarddata.png designer_d_wizarddialog.png designer_d_wordwrap.png designer_databrowser.png designer_datatable.png designer_dataview.png designer_dateedit.png designer_datetimeedit.png designer_dial.png designer_down.png designer_editbreaklayout.png designer_editcopy.png designer_editcut.png designer_editdelete.png designer_editgrid.png designer_edithlayout.png designer_edithlayoutsplit.png designer_editlower.png designer_editpaste.png designer_editraise.png designer_editslots.png designer_editvlayout.png designer_editvlayoutsplit.png designer_filenew.png designer_fileopen.png designer_filesave.png designer_folder.png designer_form.png designer_frame.png designer_groupbox.png designer_hand.png designer_help.png designer_home.png designer_hsplit.png designer_ibeam.png designer_iconview.png designer_image.png designer_label.png designer_layout.png designer_lcdnumber.png designer_left.png designer_line.png designer_lineedit.png designer_listbox.png designer_listview.png designer_multilineedit.png designer_newform.png designer_no.png designer_object.png designer_ordertool.png designer_pixlabel.png designer_pointer.png designer_print.png designer_progress.png designer_project.png designer_pushbutton.png designer_qtlogo.png designer_radiobutton.png designer_redo.png designer_resetproperty.png designer_richtextedit.png designer_right.png designer_s_down.png designer_s_editcut.png designer_s_left.png designer_s_right.png designer_s_up.png designer_scrollbar.png designer_searchfind.png designer_setbuddy.png designer_sizeall.png designer_sizeb.png designer_sizef.png designer_sizeh.png designer_sizev.png designer_slider.png designer_spacer.png designer_spinbox.png designer_splash.png designer_table.png designer_tabwidget.png designer_textbold.png designer_textbrowser.png designer_textcenter.png designer_textedit.png designer_textfont.png designer_texth1.png designer_texth2.png designer_texth3.png designer_textitalic.png designer_textjustify.png designer_textlarger.png designer_textleft.png designer_textlinebreak.png designer_textparagraph.png designer_textright.png designer_textsmaller.png designer_textteletext.png designer_textunderline.png designer_textview.png designer_timeedit.png designer_toolbox.png designer_toolbutton.png designer_undo.png designer_up.png designer_uparrow.png designer_vsplit.png designer_wait.png designer_widgetstack.png designer_wizarddata.png designer_wizarddialog.png designer_wordwrap.png diff --git a/tdevdesigner/designer/pics/designer_adjustsize.png b/kdevdesigner/designer/pics/designer_adjustsize.png similarity index 100% rename from tdevdesigner/designer/pics/designer_adjustsize.png rename to kdevdesigner/designer/pics/designer_adjustsize.png diff --git a/tdevdesigner/designer/pics/designer_appicon.png b/kdevdesigner/designer/pics/designer_appicon.png similarity index 100% rename from tdevdesigner/designer/pics/designer_appicon.png rename to kdevdesigner/designer/pics/designer_appicon.png diff --git a/tdevdesigner/designer/pics/designer_arrow.png b/kdevdesigner/designer/pics/designer_arrow.png similarity index 100% rename from tdevdesigner/designer/pics/designer_arrow.png rename to kdevdesigner/designer/pics/designer_arrow.png diff --git a/tdevdesigner/designer/pics/designer_background.png b/kdevdesigner/designer/pics/designer_background.png similarity index 100% rename from tdevdesigner/designer/pics/designer_background.png rename to kdevdesigner/designer/pics/designer_background.png diff --git a/tdevdesigner/designer/pics/designer_book.png b/kdevdesigner/designer/pics/designer_book.png similarity index 100% rename from tdevdesigner/designer/pics/designer_book.png rename to kdevdesigner/designer/pics/designer_book.png diff --git a/tdevdesigner/designer/pics/designer_buttongroup.png b/kdevdesigner/designer/pics/designer_buttongroup.png similarity index 100% rename from tdevdesigner/designer/pics/designer_buttongroup.png rename to kdevdesigner/designer/pics/designer_buttongroup.png diff --git a/tdevdesigner/designer/pics/designer_checkbox.png b/kdevdesigner/designer/pics/designer_checkbox.png similarity index 100% rename from tdevdesigner/designer/pics/designer_checkbox.png rename to kdevdesigner/designer/pics/designer_checkbox.png diff --git a/tdevdesigner/designer/pics/designer_combobox.png b/kdevdesigner/designer/pics/designer_combobox.png similarity index 100% rename from tdevdesigner/designer/pics/designer_combobox.png rename to kdevdesigner/designer/pics/designer_combobox.png diff --git a/tdevdesigner/designer/pics/designer_connecttool.png b/kdevdesigner/designer/pics/designer_connecttool.png similarity index 100% rename from tdevdesigner/designer/pics/designer_connecttool.png rename to kdevdesigner/designer/pics/designer_connecttool.png diff --git a/tdevdesigner/designer/pics/designer_cross.png b/kdevdesigner/designer/pics/designer_cross.png similarity index 100% rename from tdevdesigner/designer/pics/designer_cross.png rename to kdevdesigner/designer/pics/designer_cross.png diff --git a/tdevdesigner/designer/pics/designer_customwidget.png b/kdevdesigner/designer/pics/designer_customwidget.png similarity index 100% rename from tdevdesigner/designer/pics/designer_customwidget.png rename to kdevdesigner/designer/pics/designer_customwidget.png diff --git a/tdevdesigner/designer/pics/designer_d_adjustsize.png b/kdevdesigner/designer/pics/designer_d_adjustsize.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_adjustsize.png rename to kdevdesigner/designer/pics/designer_d_adjustsize.png diff --git a/tdevdesigner/designer/pics/designer_d_book.png b/kdevdesigner/designer/pics/designer_d_book.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_book.png rename to kdevdesigner/designer/pics/designer_d_book.png diff --git a/tdevdesigner/designer/pics/designer_d_buttongroup.png b/kdevdesigner/designer/pics/designer_d_buttongroup.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_buttongroup.png rename to kdevdesigner/designer/pics/designer_d_buttongroup.png diff --git a/tdevdesigner/designer/pics/designer_d_checkbox.png b/kdevdesigner/designer/pics/designer_d_checkbox.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_checkbox.png rename to kdevdesigner/designer/pics/designer_d_checkbox.png diff --git a/tdevdesigner/designer/pics/designer_d_combobox.png b/kdevdesigner/designer/pics/designer_d_combobox.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_combobox.png rename to kdevdesigner/designer/pics/designer_d_combobox.png diff --git a/tdevdesigner/designer/pics/designer_d_connecttool.png b/kdevdesigner/designer/pics/designer_d_connecttool.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_connecttool.png rename to kdevdesigner/designer/pics/designer_d_connecttool.png diff --git a/tdevdesigner/designer/pics/designer_d_customwidget.png b/kdevdesigner/designer/pics/designer_d_customwidget.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_customwidget.png rename to kdevdesigner/designer/pics/designer_d_customwidget.png diff --git a/tdevdesigner/designer/pics/designer_d_databrowser.png b/kdevdesigner/designer/pics/designer_d_databrowser.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_databrowser.png rename to kdevdesigner/designer/pics/designer_d_databrowser.png diff --git a/tdevdesigner/designer/pics/designer_d_datatable.png b/kdevdesigner/designer/pics/designer_d_datatable.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_datatable.png rename to kdevdesigner/designer/pics/designer_d_datatable.png diff --git a/tdevdesigner/designer/pics/designer_d_dataview.png b/kdevdesigner/designer/pics/designer_d_dataview.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_dataview.png rename to kdevdesigner/designer/pics/designer_d_dataview.png diff --git a/tdevdesigner/designer/pics/designer_d_dateedit.png b/kdevdesigner/designer/pics/designer_d_dateedit.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_dateedit.png rename to kdevdesigner/designer/pics/designer_d_dateedit.png diff --git a/tdevdesigner/designer/pics/designer_d_datetimeedit.png b/kdevdesigner/designer/pics/designer_d_datetimeedit.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_datetimeedit.png rename to kdevdesigner/designer/pics/designer_d_datetimeedit.png diff --git a/tdevdesigner/designer/pics/designer_d_dial.png b/kdevdesigner/designer/pics/designer_d_dial.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_dial.png rename to kdevdesigner/designer/pics/designer_d_dial.png diff --git a/tdevdesigner/designer/pics/designer_d_down.png b/kdevdesigner/designer/pics/designer_d_down.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_down.png rename to kdevdesigner/designer/pics/designer_d_down.png diff --git a/tdevdesigner/designer/pics/designer_d_editbreaklayout.png b/kdevdesigner/designer/pics/designer_d_editbreaklayout.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_editbreaklayout.png rename to kdevdesigner/designer/pics/designer_d_editbreaklayout.png diff --git a/tdevdesigner/designer/pics/designer_d_editcopy.png b/kdevdesigner/designer/pics/designer_d_editcopy.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_editcopy.png rename to kdevdesigner/designer/pics/designer_d_editcopy.png diff --git a/tdevdesigner/designer/pics/designer_d_editcut.png b/kdevdesigner/designer/pics/designer_d_editcut.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_editcut.png rename to kdevdesigner/designer/pics/designer_d_editcut.png diff --git a/tdevdesigner/designer/pics/designer_d_editdelete.png b/kdevdesigner/designer/pics/designer_d_editdelete.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_editdelete.png rename to kdevdesigner/designer/pics/designer_d_editdelete.png diff --git a/tdevdesigner/designer/pics/designer_d_editgrid.png b/kdevdesigner/designer/pics/designer_d_editgrid.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_editgrid.png rename to kdevdesigner/designer/pics/designer_d_editgrid.png diff --git a/tdevdesigner/designer/pics/designer_d_edithlayout.png b/kdevdesigner/designer/pics/designer_d_edithlayout.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_edithlayout.png rename to kdevdesigner/designer/pics/designer_d_edithlayout.png diff --git a/tdevdesigner/designer/pics/designer_d_edithlayoutsplit.png b/kdevdesigner/designer/pics/designer_d_edithlayoutsplit.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_edithlayoutsplit.png rename to kdevdesigner/designer/pics/designer_d_edithlayoutsplit.png diff --git a/tdevdesigner/designer/pics/designer_d_editlower.png b/kdevdesigner/designer/pics/designer_d_editlower.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_editlower.png rename to kdevdesigner/designer/pics/designer_d_editlower.png diff --git a/tdevdesigner/designer/pics/designer_d_editpaste.png b/kdevdesigner/designer/pics/designer_d_editpaste.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_editpaste.png rename to kdevdesigner/designer/pics/designer_d_editpaste.png diff --git a/tdevdesigner/designer/pics/designer_d_editraise.png b/kdevdesigner/designer/pics/designer_d_editraise.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_editraise.png rename to kdevdesigner/designer/pics/designer_d_editraise.png diff --git a/tdevdesigner/designer/pics/designer_d_editslots.png b/kdevdesigner/designer/pics/designer_d_editslots.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_editslots.png rename to kdevdesigner/designer/pics/designer_d_editslots.png diff --git a/tdevdesigner/designer/pics/designer_d_editvlayout.png b/kdevdesigner/designer/pics/designer_d_editvlayout.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_editvlayout.png rename to kdevdesigner/designer/pics/designer_d_editvlayout.png diff --git a/tdevdesigner/designer/pics/designer_d_editvlayoutsplit.png b/kdevdesigner/designer/pics/designer_d_editvlayoutsplit.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_editvlayoutsplit.png rename to kdevdesigner/designer/pics/designer_d_editvlayoutsplit.png diff --git a/tdevdesigner/designer/pics/designer_d_filenew.png b/kdevdesigner/designer/pics/designer_d_filenew.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_filenew.png rename to kdevdesigner/designer/pics/designer_d_filenew.png diff --git a/tdevdesigner/designer/pics/designer_d_fileopen.png b/kdevdesigner/designer/pics/designer_d_fileopen.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_fileopen.png rename to kdevdesigner/designer/pics/designer_d_fileopen.png diff --git a/tdevdesigner/designer/pics/designer_d_filesave.png b/kdevdesigner/designer/pics/designer_d_filesave.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_filesave.png rename to kdevdesigner/designer/pics/designer_d_filesave.png diff --git a/tdevdesigner/designer/pics/designer_d_folder.png b/kdevdesigner/designer/pics/designer_d_folder.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_folder.png rename to kdevdesigner/designer/pics/designer_d_folder.png diff --git a/tdevdesigner/designer/pics/designer_d_form.png b/kdevdesigner/designer/pics/designer_d_form.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_form.png rename to kdevdesigner/designer/pics/designer_d_form.png diff --git a/tdevdesigner/designer/pics/designer_d_frame.png b/kdevdesigner/designer/pics/designer_d_frame.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_frame.png rename to kdevdesigner/designer/pics/designer_d_frame.png diff --git a/tdevdesigner/designer/pics/designer_d_groupbox.png b/kdevdesigner/designer/pics/designer_d_groupbox.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_groupbox.png rename to kdevdesigner/designer/pics/designer_d_groupbox.png diff --git a/tdevdesigner/designer/pics/designer_d_help.png b/kdevdesigner/designer/pics/designer_d_help.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_help.png rename to kdevdesigner/designer/pics/designer_d_help.png diff --git a/tdevdesigner/designer/pics/designer_d_home.png b/kdevdesigner/designer/pics/designer_d_home.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_home.png rename to kdevdesigner/designer/pics/designer_d_home.png diff --git a/tdevdesigner/designer/pics/designer_d_iconview.png b/kdevdesigner/designer/pics/designer_d_iconview.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_iconview.png rename to kdevdesigner/designer/pics/designer_d_iconview.png diff --git a/tdevdesigner/designer/pics/designer_d_image.png b/kdevdesigner/designer/pics/designer_d_image.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_image.png rename to kdevdesigner/designer/pics/designer_d_image.png diff --git a/tdevdesigner/designer/pics/designer_d_label.png b/kdevdesigner/designer/pics/designer_d_label.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_label.png rename to kdevdesigner/designer/pics/designer_d_label.png diff --git a/tdevdesigner/designer/pics/designer_d_layout.png b/kdevdesigner/designer/pics/designer_d_layout.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_layout.png rename to kdevdesigner/designer/pics/designer_d_layout.png diff --git a/tdevdesigner/designer/pics/designer_d_lcdnumber.png b/kdevdesigner/designer/pics/designer_d_lcdnumber.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_lcdnumber.png rename to kdevdesigner/designer/pics/designer_d_lcdnumber.png diff --git a/tdevdesigner/designer/pics/designer_d_left.png b/kdevdesigner/designer/pics/designer_d_left.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_left.png rename to kdevdesigner/designer/pics/designer_d_left.png diff --git a/tdevdesigner/designer/pics/designer_d_line.png b/kdevdesigner/designer/pics/designer_d_line.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_line.png rename to kdevdesigner/designer/pics/designer_d_line.png diff --git a/tdevdesigner/designer/pics/designer_d_lineedit.png b/kdevdesigner/designer/pics/designer_d_lineedit.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_lineedit.png rename to kdevdesigner/designer/pics/designer_d_lineedit.png diff --git a/tdevdesigner/designer/pics/designer_d_listbox.png b/kdevdesigner/designer/pics/designer_d_listbox.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_listbox.png rename to kdevdesigner/designer/pics/designer_d_listbox.png diff --git a/tdevdesigner/designer/pics/designer_d_listview.png b/kdevdesigner/designer/pics/designer_d_listview.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_listview.png rename to kdevdesigner/designer/pics/designer_d_listview.png diff --git a/tdevdesigner/designer/pics/designer_d_multilineedit.png b/kdevdesigner/designer/pics/designer_d_multilineedit.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_multilineedit.png rename to kdevdesigner/designer/pics/designer_d_multilineedit.png diff --git a/tdevdesigner/designer/pics/designer_d_newform.png b/kdevdesigner/designer/pics/designer_d_newform.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_newform.png rename to kdevdesigner/designer/pics/designer_d_newform.png diff --git a/tdevdesigner/designer/pics/designer_d_ordertool.png b/kdevdesigner/designer/pics/designer_d_ordertool.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_ordertool.png rename to kdevdesigner/designer/pics/designer_d_ordertool.png diff --git a/tdevdesigner/designer/pics/designer_d_pixlabel.png b/kdevdesigner/designer/pics/designer_d_pixlabel.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_pixlabel.png rename to kdevdesigner/designer/pics/designer_d_pixlabel.png diff --git a/tdevdesigner/designer/pics/designer_d_pointer.png b/kdevdesigner/designer/pics/designer_d_pointer.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_pointer.png rename to kdevdesigner/designer/pics/designer_d_pointer.png diff --git a/tdevdesigner/designer/pics/designer_d_print.png b/kdevdesigner/designer/pics/designer_d_print.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_print.png rename to kdevdesigner/designer/pics/designer_d_print.png diff --git a/tdevdesigner/designer/pics/designer_d_progress.png b/kdevdesigner/designer/pics/designer_d_progress.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_progress.png rename to kdevdesigner/designer/pics/designer_d_progress.png diff --git a/tdevdesigner/designer/pics/designer_d_project.png b/kdevdesigner/designer/pics/designer_d_project.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_project.png rename to kdevdesigner/designer/pics/designer_d_project.png diff --git a/tdevdesigner/designer/pics/designer_d_pushbutton.png b/kdevdesigner/designer/pics/designer_d_pushbutton.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_pushbutton.png rename to kdevdesigner/designer/pics/designer_d_pushbutton.png diff --git a/tdevdesigner/designer/pics/designer_d_radiobutton.png b/kdevdesigner/designer/pics/designer_d_radiobutton.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_radiobutton.png rename to kdevdesigner/designer/pics/designer_d_radiobutton.png diff --git a/tdevdesigner/designer/pics/designer_d_redo.png b/kdevdesigner/designer/pics/designer_d_redo.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_redo.png rename to kdevdesigner/designer/pics/designer_d_redo.png diff --git a/tdevdesigner/designer/pics/designer_d_richtextedit.png b/kdevdesigner/designer/pics/designer_d_richtextedit.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_richtextedit.png rename to kdevdesigner/designer/pics/designer_d_richtextedit.png diff --git a/tdevdesigner/designer/pics/designer_d_right.png b/kdevdesigner/designer/pics/designer_d_right.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_right.png rename to kdevdesigner/designer/pics/designer_d_right.png diff --git a/tdevdesigner/designer/pics/designer_d_scrollbar.png b/kdevdesigner/designer/pics/designer_d_scrollbar.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_scrollbar.png rename to kdevdesigner/designer/pics/designer_d_scrollbar.png diff --git a/tdevdesigner/designer/pics/designer_d_searchfind.png b/kdevdesigner/designer/pics/designer_d_searchfind.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_searchfind.png rename to kdevdesigner/designer/pics/designer_d_searchfind.png diff --git a/tdevdesigner/designer/pics/designer_d_setbuddy.png b/kdevdesigner/designer/pics/designer_d_setbuddy.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_setbuddy.png rename to kdevdesigner/designer/pics/designer_d_setbuddy.png diff --git a/tdevdesigner/designer/pics/designer_d_slider.png b/kdevdesigner/designer/pics/designer_d_slider.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_slider.png rename to kdevdesigner/designer/pics/designer_d_slider.png diff --git a/tdevdesigner/designer/pics/designer_d_spacer.png b/kdevdesigner/designer/pics/designer_d_spacer.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_spacer.png rename to kdevdesigner/designer/pics/designer_d_spacer.png diff --git a/tdevdesigner/designer/pics/designer_d_spinbox.png b/kdevdesigner/designer/pics/designer_d_spinbox.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_spinbox.png rename to kdevdesigner/designer/pics/designer_d_spinbox.png diff --git a/tdevdesigner/designer/pics/designer_d_table.png b/kdevdesigner/designer/pics/designer_d_table.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_table.png rename to kdevdesigner/designer/pics/designer_d_table.png diff --git a/tdevdesigner/designer/pics/designer_d_tabwidget.png b/kdevdesigner/designer/pics/designer_d_tabwidget.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_tabwidget.png rename to kdevdesigner/designer/pics/designer_d_tabwidget.png diff --git a/tdevdesigner/designer/pics/designer_d_textbold.png b/kdevdesigner/designer/pics/designer_d_textbold.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_textbold.png rename to kdevdesigner/designer/pics/designer_d_textbold.png diff --git a/tdevdesigner/designer/pics/designer_d_textbrowser.png b/kdevdesigner/designer/pics/designer_d_textbrowser.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_textbrowser.png rename to kdevdesigner/designer/pics/designer_d_textbrowser.png diff --git a/tdevdesigner/designer/pics/designer_d_textcenter.png b/kdevdesigner/designer/pics/designer_d_textcenter.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_textcenter.png rename to kdevdesigner/designer/pics/designer_d_textcenter.png diff --git a/tdevdesigner/designer/pics/designer_d_textedit.png b/kdevdesigner/designer/pics/designer_d_textedit.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_textedit.png rename to kdevdesigner/designer/pics/designer_d_textedit.png diff --git a/tdevdesigner/designer/pics/designer_d_textfont.png b/kdevdesigner/designer/pics/designer_d_textfont.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_textfont.png rename to kdevdesigner/designer/pics/designer_d_textfont.png diff --git a/tdevdesigner/designer/pics/designer_d_texth1.png b/kdevdesigner/designer/pics/designer_d_texth1.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_texth1.png rename to kdevdesigner/designer/pics/designer_d_texth1.png diff --git a/tdevdesigner/designer/pics/designer_d_texth2.png b/kdevdesigner/designer/pics/designer_d_texth2.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_texth2.png rename to kdevdesigner/designer/pics/designer_d_texth2.png diff --git a/tdevdesigner/designer/pics/designer_d_texth3.png b/kdevdesigner/designer/pics/designer_d_texth3.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_texth3.png rename to kdevdesigner/designer/pics/designer_d_texth3.png diff --git a/tdevdesigner/designer/pics/designer_d_textitalic.png b/kdevdesigner/designer/pics/designer_d_textitalic.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_textitalic.png rename to kdevdesigner/designer/pics/designer_d_textitalic.png diff --git a/tdevdesigner/designer/pics/designer_d_textjustify.png b/kdevdesigner/designer/pics/designer_d_textjustify.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_textjustify.png rename to kdevdesigner/designer/pics/designer_d_textjustify.png diff --git a/tdevdesigner/designer/pics/designer_d_textlarger.png b/kdevdesigner/designer/pics/designer_d_textlarger.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_textlarger.png rename to kdevdesigner/designer/pics/designer_d_textlarger.png diff --git a/tdevdesigner/designer/pics/designer_d_textleft.png b/kdevdesigner/designer/pics/designer_d_textleft.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_textleft.png rename to kdevdesigner/designer/pics/designer_d_textleft.png diff --git a/tdevdesigner/designer/pics/designer_d_textlinebreak.png b/kdevdesigner/designer/pics/designer_d_textlinebreak.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_textlinebreak.png rename to kdevdesigner/designer/pics/designer_d_textlinebreak.png diff --git a/tdevdesigner/designer/pics/designer_d_textparagraph.png b/kdevdesigner/designer/pics/designer_d_textparagraph.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_textparagraph.png rename to kdevdesigner/designer/pics/designer_d_textparagraph.png diff --git a/tdevdesigner/designer/pics/designer_d_textright.png b/kdevdesigner/designer/pics/designer_d_textright.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_textright.png rename to kdevdesigner/designer/pics/designer_d_textright.png diff --git a/tdevdesigner/designer/pics/designer_d_textsmaller.png b/kdevdesigner/designer/pics/designer_d_textsmaller.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_textsmaller.png rename to kdevdesigner/designer/pics/designer_d_textsmaller.png diff --git a/tdevdesigner/designer/pics/designer_d_textteletext.png b/kdevdesigner/designer/pics/designer_d_textteletext.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_textteletext.png rename to kdevdesigner/designer/pics/designer_d_textteletext.png diff --git a/tdevdesigner/designer/pics/designer_d_textunderline.png b/kdevdesigner/designer/pics/designer_d_textunderline.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_textunderline.png rename to kdevdesigner/designer/pics/designer_d_textunderline.png diff --git a/tdevdesigner/designer/pics/designer_d_textview.png b/kdevdesigner/designer/pics/designer_d_textview.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_textview.png rename to kdevdesigner/designer/pics/designer_d_textview.png diff --git a/tdevdesigner/designer/pics/designer_d_timeedit.png b/kdevdesigner/designer/pics/designer_d_timeedit.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_timeedit.png rename to kdevdesigner/designer/pics/designer_d_timeedit.png diff --git a/tdevdesigner/designer/pics/designer_d_toolbox.png b/kdevdesigner/designer/pics/designer_d_toolbox.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_toolbox.png rename to kdevdesigner/designer/pics/designer_d_toolbox.png diff --git a/tdevdesigner/designer/pics/designer_d_toolbutton.png b/kdevdesigner/designer/pics/designer_d_toolbutton.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_toolbutton.png rename to kdevdesigner/designer/pics/designer_d_toolbutton.png diff --git a/tdevdesigner/designer/pics/designer_d_undo.png b/kdevdesigner/designer/pics/designer_d_undo.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_undo.png rename to kdevdesigner/designer/pics/designer_d_undo.png diff --git a/tdevdesigner/designer/pics/designer_d_up.png b/kdevdesigner/designer/pics/designer_d_up.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_up.png rename to kdevdesigner/designer/pics/designer_d_up.png diff --git a/tdevdesigner/designer/pics/designer_d_widgetstack.png b/kdevdesigner/designer/pics/designer_d_widgetstack.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_widgetstack.png rename to kdevdesigner/designer/pics/designer_d_widgetstack.png diff --git a/tdevdesigner/designer/pics/designer_d_wizarddata.png b/kdevdesigner/designer/pics/designer_d_wizarddata.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_wizarddata.png rename to kdevdesigner/designer/pics/designer_d_wizarddata.png diff --git a/tdevdesigner/designer/pics/designer_d_wizarddialog.png b/kdevdesigner/designer/pics/designer_d_wizarddialog.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_wizarddialog.png rename to kdevdesigner/designer/pics/designer_d_wizarddialog.png diff --git a/tdevdesigner/designer/pics/designer_d_wordwrap.png b/kdevdesigner/designer/pics/designer_d_wordwrap.png similarity index 100% rename from tdevdesigner/designer/pics/designer_d_wordwrap.png rename to kdevdesigner/designer/pics/designer_d_wordwrap.png diff --git a/tdevdesigner/designer/pics/designer_databrowser.png b/kdevdesigner/designer/pics/designer_databrowser.png similarity index 100% rename from tdevdesigner/designer/pics/designer_databrowser.png rename to kdevdesigner/designer/pics/designer_databrowser.png diff --git a/tdevdesigner/designer/pics/designer_datatable.png b/kdevdesigner/designer/pics/designer_datatable.png similarity index 100% rename from tdevdesigner/designer/pics/designer_datatable.png rename to kdevdesigner/designer/pics/designer_datatable.png diff --git a/tdevdesigner/designer/pics/designer_dataview.png b/kdevdesigner/designer/pics/designer_dataview.png similarity index 100% rename from tdevdesigner/designer/pics/designer_dataview.png rename to kdevdesigner/designer/pics/designer_dataview.png diff --git a/tdevdesigner/designer/pics/designer_dateedit.png b/kdevdesigner/designer/pics/designer_dateedit.png similarity index 100% rename from tdevdesigner/designer/pics/designer_dateedit.png rename to kdevdesigner/designer/pics/designer_dateedit.png diff --git a/tdevdesigner/designer/pics/designer_datetimeedit.png b/kdevdesigner/designer/pics/designer_datetimeedit.png similarity index 100% rename from tdevdesigner/designer/pics/designer_datetimeedit.png rename to kdevdesigner/designer/pics/designer_datetimeedit.png diff --git a/tdevdesigner/designer/pics/designer_dial.png b/kdevdesigner/designer/pics/designer_dial.png similarity index 100% rename from tdevdesigner/designer/pics/designer_dial.png rename to kdevdesigner/designer/pics/designer_dial.png diff --git a/tdevdesigner/designer/pics/designer_down.png b/kdevdesigner/designer/pics/designer_down.png similarity index 100% rename from tdevdesigner/designer/pics/designer_down.png rename to kdevdesigner/designer/pics/designer_down.png diff --git a/tdevdesigner/designer/pics/designer_editbreaklayout.png b/kdevdesigner/designer/pics/designer_editbreaklayout.png similarity index 100% rename from tdevdesigner/designer/pics/designer_editbreaklayout.png rename to kdevdesigner/designer/pics/designer_editbreaklayout.png diff --git a/tdevdesigner/designer/pics/designer_editcopy.png b/kdevdesigner/designer/pics/designer_editcopy.png similarity index 100% rename from tdevdesigner/designer/pics/designer_editcopy.png rename to kdevdesigner/designer/pics/designer_editcopy.png diff --git a/tdevdesigner/designer/pics/designer_editcut.png b/kdevdesigner/designer/pics/designer_editcut.png similarity index 100% rename from tdevdesigner/designer/pics/designer_editcut.png rename to kdevdesigner/designer/pics/designer_editcut.png diff --git a/tdevdesigner/designer/pics/designer_editdelete.png b/kdevdesigner/designer/pics/designer_editdelete.png similarity index 100% rename from tdevdesigner/designer/pics/designer_editdelete.png rename to kdevdesigner/designer/pics/designer_editdelete.png diff --git a/tdevdesigner/designer/pics/designer_editgrid.png b/kdevdesigner/designer/pics/designer_editgrid.png similarity index 100% rename from tdevdesigner/designer/pics/designer_editgrid.png rename to kdevdesigner/designer/pics/designer_editgrid.png diff --git a/tdevdesigner/designer/pics/designer_edithlayout.png b/kdevdesigner/designer/pics/designer_edithlayout.png similarity index 100% rename from tdevdesigner/designer/pics/designer_edithlayout.png rename to kdevdesigner/designer/pics/designer_edithlayout.png diff --git a/tdevdesigner/designer/pics/designer_edithlayoutsplit.png b/kdevdesigner/designer/pics/designer_edithlayoutsplit.png similarity index 100% rename from tdevdesigner/designer/pics/designer_edithlayoutsplit.png rename to kdevdesigner/designer/pics/designer_edithlayoutsplit.png diff --git a/tdevdesigner/designer/pics/designer_editlower.png b/kdevdesigner/designer/pics/designer_editlower.png similarity index 100% rename from tdevdesigner/designer/pics/designer_editlower.png rename to kdevdesigner/designer/pics/designer_editlower.png diff --git a/tdevdesigner/designer/pics/designer_editpaste.png b/kdevdesigner/designer/pics/designer_editpaste.png similarity index 100% rename from tdevdesigner/designer/pics/designer_editpaste.png rename to kdevdesigner/designer/pics/designer_editpaste.png diff --git a/tdevdesigner/designer/pics/designer_editraise.png b/kdevdesigner/designer/pics/designer_editraise.png similarity index 100% rename from tdevdesigner/designer/pics/designer_editraise.png rename to kdevdesigner/designer/pics/designer_editraise.png diff --git a/tdevdesigner/designer/pics/designer_editslots.png b/kdevdesigner/designer/pics/designer_editslots.png similarity index 100% rename from tdevdesigner/designer/pics/designer_editslots.png rename to kdevdesigner/designer/pics/designer_editslots.png diff --git a/tdevdesigner/designer/pics/designer_editvlayout.png b/kdevdesigner/designer/pics/designer_editvlayout.png similarity index 100% rename from tdevdesigner/designer/pics/designer_editvlayout.png rename to kdevdesigner/designer/pics/designer_editvlayout.png diff --git a/tdevdesigner/designer/pics/designer_editvlayoutsplit.png b/kdevdesigner/designer/pics/designer_editvlayoutsplit.png similarity index 100% rename from tdevdesigner/designer/pics/designer_editvlayoutsplit.png rename to kdevdesigner/designer/pics/designer_editvlayoutsplit.png diff --git a/tdevdesigner/designer/pics/designer_filenew.png b/kdevdesigner/designer/pics/designer_filenew.png similarity index 100% rename from tdevdesigner/designer/pics/designer_filenew.png rename to kdevdesigner/designer/pics/designer_filenew.png diff --git a/tdevdesigner/designer/pics/designer_fileopen.png b/kdevdesigner/designer/pics/designer_fileopen.png similarity index 100% rename from tdevdesigner/designer/pics/designer_fileopen.png rename to kdevdesigner/designer/pics/designer_fileopen.png diff --git a/tdevdesigner/designer/pics/designer_filesave.png b/kdevdesigner/designer/pics/designer_filesave.png similarity index 100% rename from tdevdesigner/designer/pics/designer_filesave.png rename to kdevdesigner/designer/pics/designer_filesave.png diff --git a/tdevdesigner/designer/pics/designer_folder.png b/kdevdesigner/designer/pics/designer_folder.png similarity index 100% rename from tdevdesigner/designer/pics/designer_folder.png rename to kdevdesigner/designer/pics/designer_folder.png diff --git a/tdevdesigner/designer/pics/designer_form.png b/kdevdesigner/designer/pics/designer_form.png similarity index 100% rename from tdevdesigner/designer/pics/designer_form.png rename to kdevdesigner/designer/pics/designer_form.png diff --git a/tdevdesigner/designer/pics/designer_frame.png b/kdevdesigner/designer/pics/designer_frame.png similarity index 100% rename from tdevdesigner/designer/pics/designer_frame.png rename to kdevdesigner/designer/pics/designer_frame.png diff --git a/tdevdesigner/designer/pics/designer_groupbox.png b/kdevdesigner/designer/pics/designer_groupbox.png similarity index 100% rename from tdevdesigner/designer/pics/designer_groupbox.png rename to kdevdesigner/designer/pics/designer_groupbox.png diff --git a/tdevdesigner/designer/pics/designer_hand.png b/kdevdesigner/designer/pics/designer_hand.png similarity index 100% rename from tdevdesigner/designer/pics/designer_hand.png rename to kdevdesigner/designer/pics/designer_hand.png diff --git a/tdevdesigner/designer/pics/designer_help.png b/kdevdesigner/designer/pics/designer_help.png similarity index 100% rename from tdevdesigner/designer/pics/designer_help.png rename to kdevdesigner/designer/pics/designer_help.png diff --git a/tdevdesigner/designer/pics/designer_home.png b/kdevdesigner/designer/pics/designer_home.png similarity index 100% rename from tdevdesigner/designer/pics/designer_home.png rename to kdevdesigner/designer/pics/designer_home.png diff --git a/tdevdesigner/designer/pics/designer_hsplit.png b/kdevdesigner/designer/pics/designer_hsplit.png similarity index 100% rename from tdevdesigner/designer/pics/designer_hsplit.png rename to kdevdesigner/designer/pics/designer_hsplit.png diff --git a/tdevdesigner/designer/pics/designer_ibeam.png b/kdevdesigner/designer/pics/designer_ibeam.png similarity index 100% rename from tdevdesigner/designer/pics/designer_ibeam.png rename to kdevdesigner/designer/pics/designer_ibeam.png diff --git a/tdevdesigner/designer/pics/designer_iconview.png b/kdevdesigner/designer/pics/designer_iconview.png similarity index 100% rename from tdevdesigner/designer/pics/designer_iconview.png rename to kdevdesigner/designer/pics/designer_iconview.png diff --git a/tdevdesigner/designer/pics/designer_image.png b/kdevdesigner/designer/pics/designer_image.png similarity index 100% rename from tdevdesigner/designer/pics/designer_image.png rename to kdevdesigner/designer/pics/designer_image.png diff --git a/tdevdesigner/designer/pics/designer_label.png b/kdevdesigner/designer/pics/designer_label.png similarity index 100% rename from tdevdesigner/designer/pics/designer_label.png rename to kdevdesigner/designer/pics/designer_label.png diff --git a/tdevdesigner/designer/pics/designer_layout.png b/kdevdesigner/designer/pics/designer_layout.png similarity index 100% rename from tdevdesigner/designer/pics/designer_layout.png rename to kdevdesigner/designer/pics/designer_layout.png diff --git a/tdevdesigner/designer/pics/designer_lcdnumber.png b/kdevdesigner/designer/pics/designer_lcdnumber.png similarity index 100% rename from tdevdesigner/designer/pics/designer_lcdnumber.png rename to kdevdesigner/designer/pics/designer_lcdnumber.png diff --git a/tdevdesigner/designer/pics/designer_left.png b/kdevdesigner/designer/pics/designer_left.png similarity index 100% rename from tdevdesigner/designer/pics/designer_left.png rename to kdevdesigner/designer/pics/designer_left.png diff --git a/tdevdesigner/designer/pics/designer_line.png b/kdevdesigner/designer/pics/designer_line.png similarity index 100% rename from tdevdesigner/designer/pics/designer_line.png rename to kdevdesigner/designer/pics/designer_line.png diff --git a/tdevdesigner/designer/pics/designer_lineedit.png b/kdevdesigner/designer/pics/designer_lineedit.png similarity index 100% rename from tdevdesigner/designer/pics/designer_lineedit.png rename to kdevdesigner/designer/pics/designer_lineedit.png diff --git a/tdevdesigner/designer/pics/designer_listbox.png b/kdevdesigner/designer/pics/designer_listbox.png similarity index 100% rename from tdevdesigner/designer/pics/designer_listbox.png rename to kdevdesigner/designer/pics/designer_listbox.png diff --git a/tdevdesigner/designer/pics/designer_listview.png b/kdevdesigner/designer/pics/designer_listview.png similarity index 100% rename from tdevdesigner/designer/pics/designer_listview.png rename to kdevdesigner/designer/pics/designer_listview.png diff --git a/tdevdesigner/designer/pics/designer_multilineedit.png b/kdevdesigner/designer/pics/designer_multilineedit.png similarity index 100% rename from tdevdesigner/designer/pics/designer_multilineedit.png rename to kdevdesigner/designer/pics/designer_multilineedit.png diff --git a/tdevdesigner/designer/pics/designer_newform.png b/kdevdesigner/designer/pics/designer_newform.png similarity index 100% rename from tdevdesigner/designer/pics/designer_newform.png rename to kdevdesigner/designer/pics/designer_newform.png diff --git a/tdevdesigner/designer/pics/designer_no.png b/kdevdesigner/designer/pics/designer_no.png similarity index 100% rename from tdevdesigner/designer/pics/designer_no.png rename to kdevdesigner/designer/pics/designer_no.png diff --git a/tdevdesigner/designer/pics/designer_object.png b/kdevdesigner/designer/pics/designer_object.png similarity index 100% rename from tdevdesigner/designer/pics/designer_object.png rename to kdevdesigner/designer/pics/designer_object.png diff --git a/tdevdesigner/designer/pics/designer_ordertool.png b/kdevdesigner/designer/pics/designer_ordertool.png similarity index 100% rename from tdevdesigner/designer/pics/designer_ordertool.png rename to kdevdesigner/designer/pics/designer_ordertool.png diff --git a/tdevdesigner/designer/pics/designer_pixlabel.png b/kdevdesigner/designer/pics/designer_pixlabel.png similarity index 100% rename from tdevdesigner/designer/pics/designer_pixlabel.png rename to kdevdesigner/designer/pics/designer_pixlabel.png diff --git a/tdevdesigner/designer/pics/designer_pointer.png b/kdevdesigner/designer/pics/designer_pointer.png similarity index 100% rename from tdevdesigner/designer/pics/designer_pointer.png rename to kdevdesigner/designer/pics/designer_pointer.png diff --git a/tdevdesigner/designer/pics/designer_print.png b/kdevdesigner/designer/pics/designer_print.png similarity index 100% rename from tdevdesigner/designer/pics/designer_print.png rename to kdevdesigner/designer/pics/designer_print.png diff --git a/tdevdesigner/designer/pics/designer_progress.png b/kdevdesigner/designer/pics/designer_progress.png similarity index 100% rename from tdevdesigner/designer/pics/designer_progress.png rename to kdevdesigner/designer/pics/designer_progress.png diff --git a/tdevdesigner/designer/pics/designer_project.png b/kdevdesigner/designer/pics/designer_project.png similarity index 100% rename from tdevdesigner/designer/pics/designer_project.png rename to kdevdesigner/designer/pics/designer_project.png diff --git a/tdevdesigner/designer/pics/designer_pushbutton.png b/kdevdesigner/designer/pics/designer_pushbutton.png similarity index 100% rename from tdevdesigner/designer/pics/designer_pushbutton.png rename to kdevdesigner/designer/pics/designer_pushbutton.png diff --git a/tdevdesigner/designer/pics/designer_qtlogo.png b/kdevdesigner/designer/pics/designer_qtlogo.png similarity index 100% rename from tdevdesigner/designer/pics/designer_qtlogo.png rename to kdevdesigner/designer/pics/designer_qtlogo.png diff --git a/tdevdesigner/designer/pics/designer_radiobutton.png b/kdevdesigner/designer/pics/designer_radiobutton.png similarity index 100% rename from tdevdesigner/designer/pics/designer_radiobutton.png rename to kdevdesigner/designer/pics/designer_radiobutton.png diff --git a/tdevdesigner/designer/pics/designer_redo.png b/kdevdesigner/designer/pics/designer_redo.png similarity index 100% rename from tdevdesigner/designer/pics/designer_redo.png rename to kdevdesigner/designer/pics/designer_redo.png diff --git a/tdevdesigner/designer/pics/designer_resetproperty.png b/kdevdesigner/designer/pics/designer_resetproperty.png similarity index 100% rename from tdevdesigner/designer/pics/designer_resetproperty.png rename to kdevdesigner/designer/pics/designer_resetproperty.png diff --git a/tdevdesigner/designer/pics/designer_richtextedit.png b/kdevdesigner/designer/pics/designer_richtextedit.png similarity index 100% rename from tdevdesigner/designer/pics/designer_richtextedit.png rename to kdevdesigner/designer/pics/designer_richtextedit.png diff --git a/tdevdesigner/designer/pics/designer_right.png b/kdevdesigner/designer/pics/designer_right.png similarity index 100% rename from tdevdesigner/designer/pics/designer_right.png rename to kdevdesigner/designer/pics/designer_right.png diff --git a/tdevdesigner/designer/pics/designer_s_down.png b/kdevdesigner/designer/pics/designer_s_down.png similarity index 100% rename from tdevdesigner/designer/pics/designer_s_down.png rename to kdevdesigner/designer/pics/designer_s_down.png diff --git a/tdevdesigner/designer/pics/designer_s_editcut.png b/kdevdesigner/designer/pics/designer_s_editcut.png similarity index 100% rename from tdevdesigner/designer/pics/designer_s_editcut.png rename to kdevdesigner/designer/pics/designer_s_editcut.png diff --git a/tdevdesigner/designer/pics/designer_s_left.png b/kdevdesigner/designer/pics/designer_s_left.png similarity index 100% rename from tdevdesigner/designer/pics/designer_s_left.png rename to kdevdesigner/designer/pics/designer_s_left.png diff --git a/tdevdesigner/designer/pics/designer_s_right.png b/kdevdesigner/designer/pics/designer_s_right.png similarity index 100% rename from tdevdesigner/designer/pics/designer_s_right.png rename to kdevdesigner/designer/pics/designer_s_right.png diff --git a/tdevdesigner/designer/pics/designer_s_up.png b/kdevdesigner/designer/pics/designer_s_up.png similarity index 100% rename from tdevdesigner/designer/pics/designer_s_up.png rename to kdevdesigner/designer/pics/designer_s_up.png diff --git a/tdevdesigner/designer/pics/designer_scrollbar.png b/kdevdesigner/designer/pics/designer_scrollbar.png similarity index 100% rename from tdevdesigner/designer/pics/designer_scrollbar.png rename to kdevdesigner/designer/pics/designer_scrollbar.png diff --git a/tdevdesigner/designer/pics/designer_searchfind.png b/kdevdesigner/designer/pics/designer_searchfind.png similarity index 100% rename from tdevdesigner/designer/pics/designer_searchfind.png rename to kdevdesigner/designer/pics/designer_searchfind.png diff --git a/tdevdesigner/designer/pics/designer_setbuddy.png b/kdevdesigner/designer/pics/designer_setbuddy.png similarity index 100% rename from tdevdesigner/designer/pics/designer_setbuddy.png rename to kdevdesigner/designer/pics/designer_setbuddy.png diff --git a/tdevdesigner/designer/pics/designer_sizeall.png b/kdevdesigner/designer/pics/designer_sizeall.png similarity index 100% rename from tdevdesigner/designer/pics/designer_sizeall.png rename to kdevdesigner/designer/pics/designer_sizeall.png diff --git a/tdevdesigner/designer/pics/designer_sizeb.png b/kdevdesigner/designer/pics/designer_sizeb.png similarity index 100% rename from tdevdesigner/designer/pics/designer_sizeb.png rename to kdevdesigner/designer/pics/designer_sizeb.png diff --git a/tdevdesigner/designer/pics/designer_sizef.png b/kdevdesigner/designer/pics/designer_sizef.png similarity index 100% rename from tdevdesigner/designer/pics/designer_sizef.png rename to kdevdesigner/designer/pics/designer_sizef.png diff --git a/tdevdesigner/designer/pics/designer_sizeh.png b/kdevdesigner/designer/pics/designer_sizeh.png similarity index 100% rename from tdevdesigner/designer/pics/designer_sizeh.png rename to kdevdesigner/designer/pics/designer_sizeh.png diff --git a/tdevdesigner/designer/pics/designer_sizev.png b/kdevdesigner/designer/pics/designer_sizev.png similarity index 100% rename from tdevdesigner/designer/pics/designer_sizev.png rename to kdevdesigner/designer/pics/designer_sizev.png diff --git a/tdevdesigner/designer/pics/designer_slider.png b/kdevdesigner/designer/pics/designer_slider.png similarity index 100% rename from tdevdesigner/designer/pics/designer_slider.png rename to kdevdesigner/designer/pics/designer_slider.png diff --git a/tdevdesigner/designer/pics/designer_spacer.png b/kdevdesigner/designer/pics/designer_spacer.png similarity index 100% rename from tdevdesigner/designer/pics/designer_spacer.png rename to kdevdesigner/designer/pics/designer_spacer.png diff --git a/tdevdesigner/designer/pics/designer_spinbox.png b/kdevdesigner/designer/pics/designer_spinbox.png similarity index 100% rename from tdevdesigner/designer/pics/designer_spinbox.png rename to kdevdesigner/designer/pics/designer_spinbox.png diff --git a/tdevdesigner/designer/pics/designer_splash.png b/kdevdesigner/designer/pics/designer_splash.png similarity index 100% rename from tdevdesigner/designer/pics/designer_splash.png rename to kdevdesigner/designer/pics/designer_splash.png diff --git a/tdevdesigner/designer/pics/designer_table.png b/kdevdesigner/designer/pics/designer_table.png similarity index 100% rename from tdevdesigner/designer/pics/designer_table.png rename to kdevdesigner/designer/pics/designer_table.png diff --git a/tdevdesigner/designer/pics/designer_tabwidget.png b/kdevdesigner/designer/pics/designer_tabwidget.png similarity index 100% rename from tdevdesigner/designer/pics/designer_tabwidget.png rename to kdevdesigner/designer/pics/designer_tabwidget.png diff --git a/tdevdesigner/designer/pics/designer_textbold.png b/kdevdesigner/designer/pics/designer_textbold.png similarity index 100% rename from tdevdesigner/designer/pics/designer_textbold.png rename to kdevdesigner/designer/pics/designer_textbold.png diff --git a/tdevdesigner/designer/pics/designer_textbrowser.png b/kdevdesigner/designer/pics/designer_textbrowser.png similarity index 100% rename from tdevdesigner/designer/pics/designer_textbrowser.png rename to kdevdesigner/designer/pics/designer_textbrowser.png diff --git a/tdevdesigner/designer/pics/designer_textcenter.png b/kdevdesigner/designer/pics/designer_textcenter.png similarity index 100% rename from tdevdesigner/designer/pics/designer_textcenter.png rename to kdevdesigner/designer/pics/designer_textcenter.png diff --git a/tdevdesigner/designer/pics/designer_textedit.png b/kdevdesigner/designer/pics/designer_textedit.png similarity index 100% rename from tdevdesigner/designer/pics/designer_textedit.png rename to kdevdesigner/designer/pics/designer_textedit.png diff --git a/tdevdesigner/designer/pics/designer_textfont.png b/kdevdesigner/designer/pics/designer_textfont.png similarity index 100% rename from tdevdesigner/designer/pics/designer_textfont.png rename to kdevdesigner/designer/pics/designer_textfont.png diff --git a/tdevdesigner/designer/pics/designer_texth1.png b/kdevdesigner/designer/pics/designer_texth1.png similarity index 100% rename from tdevdesigner/designer/pics/designer_texth1.png rename to kdevdesigner/designer/pics/designer_texth1.png diff --git a/tdevdesigner/designer/pics/designer_texth2.png b/kdevdesigner/designer/pics/designer_texth2.png similarity index 100% rename from tdevdesigner/designer/pics/designer_texth2.png rename to kdevdesigner/designer/pics/designer_texth2.png diff --git a/tdevdesigner/designer/pics/designer_texth3.png b/kdevdesigner/designer/pics/designer_texth3.png similarity index 100% rename from tdevdesigner/designer/pics/designer_texth3.png rename to kdevdesigner/designer/pics/designer_texth3.png diff --git a/tdevdesigner/designer/pics/designer_textitalic.png b/kdevdesigner/designer/pics/designer_textitalic.png similarity index 100% rename from tdevdesigner/designer/pics/designer_textitalic.png rename to kdevdesigner/designer/pics/designer_textitalic.png diff --git a/tdevdesigner/designer/pics/designer_textjustify.png b/kdevdesigner/designer/pics/designer_textjustify.png similarity index 100% rename from tdevdesigner/designer/pics/designer_textjustify.png rename to kdevdesigner/designer/pics/designer_textjustify.png diff --git a/tdevdesigner/designer/pics/designer_textlarger.png b/kdevdesigner/designer/pics/designer_textlarger.png similarity index 100% rename from tdevdesigner/designer/pics/designer_textlarger.png rename to kdevdesigner/designer/pics/designer_textlarger.png diff --git a/tdevdesigner/designer/pics/designer_textleft.png b/kdevdesigner/designer/pics/designer_textleft.png similarity index 100% rename from tdevdesigner/designer/pics/designer_textleft.png rename to kdevdesigner/designer/pics/designer_textleft.png diff --git a/tdevdesigner/designer/pics/designer_textlinebreak.png b/kdevdesigner/designer/pics/designer_textlinebreak.png similarity index 100% rename from tdevdesigner/designer/pics/designer_textlinebreak.png rename to kdevdesigner/designer/pics/designer_textlinebreak.png diff --git a/tdevdesigner/designer/pics/designer_textparagraph.png b/kdevdesigner/designer/pics/designer_textparagraph.png similarity index 100% rename from tdevdesigner/designer/pics/designer_textparagraph.png rename to kdevdesigner/designer/pics/designer_textparagraph.png diff --git a/tdevdesigner/designer/pics/designer_textright.png b/kdevdesigner/designer/pics/designer_textright.png similarity index 100% rename from tdevdesigner/designer/pics/designer_textright.png rename to kdevdesigner/designer/pics/designer_textright.png diff --git a/tdevdesigner/designer/pics/designer_textsmaller.png b/kdevdesigner/designer/pics/designer_textsmaller.png similarity index 100% rename from tdevdesigner/designer/pics/designer_textsmaller.png rename to kdevdesigner/designer/pics/designer_textsmaller.png diff --git a/tdevdesigner/designer/pics/designer_textteletext.png b/kdevdesigner/designer/pics/designer_textteletext.png similarity index 100% rename from tdevdesigner/designer/pics/designer_textteletext.png rename to kdevdesigner/designer/pics/designer_textteletext.png diff --git a/tdevdesigner/designer/pics/designer_textunderline.png b/kdevdesigner/designer/pics/designer_textunderline.png similarity index 100% rename from tdevdesigner/designer/pics/designer_textunderline.png rename to kdevdesigner/designer/pics/designer_textunderline.png diff --git a/tdevdesigner/designer/pics/designer_textview.png b/kdevdesigner/designer/pics/designer_textview.png similarity index 100% rename from tdevdesigner/designer/pics/designer_textview.png rename to kdevdesigner/designer/pics/designer_textview.png diff --git a/tdevdesigner/designer/pics/designer_timeedit.png b/kdevdesigner/designer/pics/designer_timeedit.png similarity index 100% rename from tdevdesigner/designer/pics/designer_timeedit.png rename to kdevdesigner/designer/pics/designer_timeedit.png diff --git a/tdevdesigner/designer/pics/designer_toolbox.png b/kdevdesigner/designer/pics/designer_toolbox.png similarity index 100% rename from tdevdesigner/designer/pics/designer_toolbox.png rename to kdevdesigner/designer/pics/designer_toolbox.png diff --git a/tdevdesigner/designer/pics/designer_toolbutton.png b/kdevdesigner/designer/pics/designer_toolbutton.png similarity index 100% rename from tdevdesigner/designer/pics/designer_toolbutton.png rename to kdevdesigner/designer/pics/designer_toolbutton.png diff --git a/tdevdesigner/designer/pics/designer_undo.png b/kdevdesigner/designer/pics/designer_undo.png similarity index 100% rename from tdevdesigner/designer/pics/designer_undo.png rename to kdevdesigner/designer/pics/designer_undo.png diff --git a/tdevdesigner/designer/pics/designer_up.png b/kdevdesigner/designer/pics/designer_up.png similarity index 100% rename from tdevdesigner/designer/pics/designer_up.png rename to kdevdesigner/designer/pics/designer_up.png diff --git a/tdevdesigner/designer/pics/designer_uparrow.png b/kdevdesigner/designer/pics/designer_uparrow.png similarity index 100% rename from tdevdesigner/designer/pics/designer_uparrow.png rename to kdevdesigner/designer/pics/designer_uparrow.png diff --git a/tdevdesigner/designer/pics/designer_vsplit.png b/kdevdesigner/designer/pics/designer_vsplit.png similarity index 100% rename from tdevdesigner/designer/pics/designer_vsplit.png rename to kdevdesigner/designer/pics/designer_vsplit.png diff --git a/tdevdesigner/designer/pics/designer_wait.png b/kdevdesigner/designer/pics/designer_wait.png similarity index 100% rename from tdevdesigner/designer/pics/designer_wait.png rename to kdevdesigner/designer/pics/designer_wait.png diff --git a/tdevdesigner/designer/pics/designer_widgetstack.png b/kdevdesigner/designer/pics/designer_widgetstack.png similarity index 100% rename from tdevdesigner/designer/pics/designer_widgetstack.png rename to kdevdesigner/designer/pics/designer_widgetstack.png diff --git a/tdevdesigner/designer/pics/designer_wizarddata.png b/kdevdesigner/designer/pics/designer_wizarddata.png similarity index 100% rename from tdevdesigner/designer/pics/designer_wizarddata.png rename to kdevdesigner/designer/pics/designer_wizarddata.png diff --git a/tdevdesigner/designer/pics/designer_wizarddialog.png b/kdevdesigner/designer/pics/designer_wizarddialog.png similarity index 100% rename from tdevdesigner/designer/pics/designer_wizarddialog.png rename to kdevdesigner/designer/pics/designer_wizarddialog.png diff --git a/tdevdesigner/designer/pics/designer_wordwrap.png b/kdevdesigner/designer/pics/designer_wordwrap.png similarity index 100% rename from tdevdesigner/designer/pics/designer_wordwrap.png rename to kdevdesigner/designer/pics/designer_wordwrap.png diff --git a/kdevdesigner/designer/pixmapchooser.cpp b/kdevdesigner/designer/pixmapchooser.cpp new file mode 100644 index 00000000..92d68ac1 --- /dev/null +++ b/kdevdesigner/designer/pixmapchooser.cpp @@ -0,0 +1,231 @@ +/********************************************************************** +** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include // HP-UX compiler needs this here + +#include +#include +#include +#include +#include + +#include "kdevdesigner_part.h" + +#include "pixmapchooser.h" +#include "formwindow.h" +#if defined(DESIGNER) && !defined(RESOURCE) +#include "pixmapfunction.h" +#endif +#include "metadatabase.h" +#include "mainwindow.h" +#include "pixmapcollectioneditor.h" +#include "pixmapcollection.h" +#include "project.h" + +#include +#include +#include +#include +#include +#include + +#if defined(DESIGNER) +static ImageIconProvider *imageIconProvider = 0; +#endif + +PixmapView::PixmapView( TQWidget *parent ) + : TQScrollView( parent ) +{ + viewport()->setBackgroundMode( PaletteBase ); +} + +void PixmapView::setPixmap( const TQPixmap &pix ) +{ + pixmap = pix; + resizeContents( pixmap.size().width(), pixmap.size().height() ); + viewport()->repaint( FALSE ); +} + +void PixmapView::drawContents( TQPainter *p, int cx, int cy, int cw, int ch ) +{ + p->fillRect( cx, cy, cw, ch, colorGroup().brush( TQColorGroup::Base ) ); + p->drawPixmap( 0, 0, pixmap ); +} + +void PixmapView::previewUrl( const TQUrl &u ) +{ + if ( u.isLocalFile() ) { + TQString path = u.path(); + TQPixmap pix( path ); + if ( !pix.isNull() ) + setPixmap( pix ); + } else { + tqWarning( "Previewing remote files not supported." ); + } +} + +static void buildImageFormatList( TQString &filter, TQString &all ) +{ + all = tqApp->translate( "qChoosePixmap", "All Pixmaps (" ); + for ( uint i = 0; i < TQImageIO::outputFormats().count(); i++ ) { + TQString outputFormat = TQImageIO::outputFormats().at( i ); + TQString outputExtension; + if ( outputFormat != "JPEG" ) + outputExtension = outputFormat.lower(); + else + outputExtension = "jpg;*.jpeg"; + filter += TQString(tqApp->translate( "qChoosePixmap", "%1-Pixmaps (%2)\n" )). + arg( outputFormat ).arg( "*." + outputExtension); + all += "*." + outputExtension + ";"; + } + filter.prepend( all + tqApp->translate( "qChoosePixmap", ")\n" ) ); + filter += tqApp->translate( "qChoosePixmap", "All Files (*)" ); + +} +TQStringList qChoosePixmaps( TQWidget *parent ) +{ +/* if ( !imageIconProvider && !TQFileDialog::iconProvider() ) + TQFileDialog::setIconProvider( ( imageIconProvider = new ImageIconProvider ) ); + + TQString filter; + TQString all; + buildImageFormatList( filter, all ); + + TQFileDialog fd( TQString(), filter, parent, 0, TRUE ); + fd.setMode( TQFileDialog::ExistingFiles ); + fd.setContentsPreviewEnabled( TRUE ); + PixmapView *pw = new PixmapView( &fd ); + fd.setContentsPreview( pw, pw ); + fd.setViewMode( TQFileDialog::List ); + fd.setPreviewMode( TQFileDialog::Contents ); + fd.setCaption( tqApp->translate( "qChoosePixmap", "Choose Images..." ) ); + if ( fd.exec() == TQDialog::Accepted ) + return fd.selectedFiles(); + return TQStringList();*/ + TQStringList mimetypes = KImageIO::mimeTypes( KImageIO::Reading ); + KFileDialog dlg(TQString(), mimetypes.join(" "), parent, "filedialog", true); + dlg.setOperationMode( KFileDialog::Opening ); + dlg.setCaption( tqApp->translate( "qChoosePixmap", "Choose Images..." ) ); + dlg.setMode( KFile::Files ); + KImageFilePreview *ip = new KImageFilePreview( &dlg ); + dlg.setPreviewWidget( ip ); + if (dlg.exec()) + return dlg.selectedFiles(); + return TQStringList(); +} + +TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, TQString *fn ) +{ +#if defined(DESIGNER) + if ( !fw || fw->savePixmapInline() ) { +/* if ( !imageIconProvider && !TQFileDialog::iconProvider() ) + TQFileDialog::setIconProvider( ( imageIconProvider = new ImageIconProvider ) ); + + TQString filter; + TQString all; + buildImageFormatList( filter, all ); + + TQFileDialog fd( TQString(), filter, parent, 0, TRUE ); + fd.setContentsPreviewEnabled( TRUE ); + PixmapView *pw = new PixmapView( &fd ); + fd.setContentsPreview( pw, pw ); + fd.setViewMode( TQFileDialog::List ); + fd.setPreviewMode( TQFileDialog::Contents ); + fd.setCaption( tqApp->translate( "qChoosePixmap", "Choose Pixmap" ) ); + if ( fd.exec() == TQDialog::Accepted ) { + TQPixmap pix( fd.selectedFile() ); + if ( fn ) + *fn = fd.selectedFile(); + MetaDataBase::setPixmapArgument( fw, pix.serialNumber(), fd.selectedFile() ); + return pix; + }*/ + TQStringList mimetypes = KImageIO::mimeTypes( KImageIO::Reading ); + KFileDialog dlg(TQString(), mimetypes.join(" "), parent, "filedialog", true); + dlg.setOperationMode( KFileDialog::Opening ); + dlg.setCaption( tqApp->translate( "qChoosePixmap", "Choose Pixmap" ) ); + dlg.setMode( KFile::File ); + KImageFilePreview *ip = new KImageFilePreview( &dlg ); + dlg.setPreviewWidget( ip ); + if (dlg.exec()) + { + TQPixmap pix( dlg.selectedURL().path() ); + if ( fn ) + *fn = dlg.selectedURL().path(); + MetaDataBase::setPixmapArgument( TQT_TQOBJECT(fw), pix.serialNumber(), dlg.selectedURL().path() ); + return pix; + } + } else if ( fw && fw->savePixmapInProject() ) { + PixmapCollectionEditor dia( parent, 0, TRUE ); + dia.setProject( fw->project() ); + dia.setChooserMode( TRUE ); + dia.setCurrentItem( MetaDataBase::pixmapKey( TQT_TQOBJECT(fw), old.serialNumber() ) ); + if ( dia.exec() == TQDialog::Accepted ) { + TQPixmap pix( fw->project()->pixmapCollection()->pixmap( dia.viewPixmaps->currentItem()->text() ) ); + MetaDataBase::setPixmapKey( TQT_TQOBJECT(fw), pix.serialNumber(), dia.viewPixmaps->currentItem()->text() ); + return pix; + } + } else { + PixmapFunction dia( parent, 0, TRUE ); + TQObject::connect( dia.helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + dia.labelFunction->setText( fw->pixmapLoaderFunction() + "(" ); + dia.editArguments->setText( MetaDataBase::pixmapArgument( TQT_TQOBJECT(fw), old.serialNumber() ) ); + dia.editArguments->setFocus(); + if ( dia.exec() == TQDialog::Accepted ) { + TQPixmap pix; + // we have to force the pixmap to get a new and unique serial number. Unfortunately detatch() doesn't do that + pix.convertFromImage( BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() ).convertToImage() ); + + MetaDataBase::setPixmapArgument( TQT_TQOBJECT(fw), pix.serialNumber(), dia.editArguments->text() ); + return pix; + } + } +#else + Q_UNUSED( parent ); + Q_UNUSED( fw ); + Q_UNUSED( old ); +#endif + return TQPixmap(); +} + +ImageIconProvider::ImageIconProvider( TQWidget *parent, const char *name ) + : TQFileIconProvider( TQT_TQOBJECT(parent), name ), imagepm( BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() ) ) +{ + fmts = TQImage::inputFormats(); +} + +ImageIconProvider::~ImageIconProvider() +{ +} + +const TQPixmap * ImageIconProvider::pixmap( const TQFileInfo &fi ) +{ + TQString ext = fi.extension().upper(); + if ( fmts.contains( ext ) ) { + return &imagepm; + } else { + return TQFileIconProvider::pixmap( fi ); + } +} diff --git a/tdevdesigner/designer/pixmapchooser.h b/kdevdesigner/designer/pixmapchooser.h similarity index 100% rename from tdevdesigner/designer/pixmapchooser.h rename to kdevdesigner/designer/pixmapchooser.h diff --git a/tdevdesigner/designer/pixmapcollection.cpp b/kdevdesigner/designer/pixmapcollection.cpp similarity index 100% rename from tdevdesigner/designer/pixmapcollection.cpp rename to kdevdesigner/designer/pixmapcollection.cpp diff --git a/tdevdesigner/designer/pixmapcollection.h b/kdevdesigner/designer/pixmapcollection.h similarity index 100% rename from tdevdesigner/designer/pixmapcollection.h rename to kdevdesigner/designer/pixmapcollection.h diff --git a/tdevdesigner/designer/pixmapcollectioneditor.ui b/kdevdesigner/designer/pixmapcollectioneditor.ui similarity index 100% rename from tdevdesigner/designer/pixmapcollectioneditor.ui rename to kdevdesigner/designer/pixmapcollectioneditor.ui diff --git a/tdevdesigner/designer/pixmapcollectioneditor.ui.h b/kdevdesigner/designer/pixmapcollectioneditor.ui.h similarity index 100% rename from tdevdesigner/designer/pixmapcollectioneditor.ui.h rename to kdevdesigner/designer/pixmapcollectioneditor.ui.h diff --git a/tdevdesigner/designer/pixmapfunction.ui b/kdevdesigner/designer/pixmapfunction.ui similarity index 100% rename from tdevdesigner/designer/pixmapfunction.ui rename to kdevdesigner/designer/pixmapfunction.ui diff --git a/tdevdesigner/designer/popupmenueditor.cpp b/kdevdesigner/designer/popupmenueditor.cpp similarity index 100% rename from tdevdesigner/designer/popupmenueditor.cpp rename to kdevdesigner/designer/popupmenueditor.cpp diff --git a/tdevdesigner/designer/popupmenueditor.h b/kdevdesigner/designer/popupmenueditor.h similarity index 100% rename from tdevdesigner/designer/popupmenueditor.h rename to kdevdesigner/designer/popupmenueditor.h diff --git a/tdevdesigner/designer/preferences.ui b/kdevdesigner/designer/preferences.ui similarity index 100% rename from tdevdesigner/designer/preferences.ui rename to kdevdesigner/designer/preferences.ui diff --git a/tdevdesigner/designer/previewframe.cpp b/kdevdesigner/designer/previewframe.cpp similarity index 100% rename from tdevdesigner/designer/previewframe.cpp rename to kdevdesigner/designer/previewframe.cpp diff --git a/tdevdesigner/designer/previewframe.h b/kdevdesigner/designer/previewframe.h similarity index 100% rename from tdevdesigner/designer/previewframe.h rename to kdevdesigner/designer/previewframe.h diff --git a/tdevdesigner/designer/previewwidget.ui b/kdevdesigner/designer/previewwidget.ui similarity index 100% rename from tdevdesigner/designer/previewwidget.ui rename to kdevdesigner/designer/previewwidget.ui diff --git a/tdevdesigner/designer/previewwidgetimpl.cpp b/kdevdesigner/designer/previewwidgetimpl.cpp similarity index 100% rename from tdevdesigner/designer/previewwidgetimpl.cpp rename to kdevdesigner/designer/previewwidgetimpl.cpp diff --git a/tdevdesigner/designer/previewwidgetimpl.h b/kdevdesigner/designer/previewwidgetimpl.h similarity index 100% rename from tdevdesigner/designer/previewwidgetimpl.h rename to kdevdesigner/designer/previewwidgetimpl.h diff --git a/tdevdesigner/designer/project.cpp b/kdevdesigner/designer/project.cpp similarity index 100% rename from tdevdesigner/designer/project.cpp rename to kdevdesigner/designer/project.cpp diff --git a/tdevdesigner/designer/project.h b/kdevdesigner/designer/project.h similarity index 100% rename from tdevdesigner/designer/project.h rename to kdevdesigner/designer/project.h diff --git a/tdevdesigner/designer/projectsettings.ui b/kdevdesigner/designer/projectsettings.ui similarity index 100% rename from tdevdesigner/designer/projectsettings.ui rename to kdevdesigner/designer/projectsettings.ui diff --git a/tdevdesigner/designer/projectsettingsimpl.cpp b/kdevdesigner/designer/projectsettingsimpl.cpp similarity index 100% rename from tdevdesigner/designer/projectsettingsimpl.cpp rename to kdevdesigner/designer/projectsettingsimpl.cpp diff --git a/tdevdesigner/designer/projectsettingsimpl.h b/kdevdesigner/designer/projectsettingsimpl.h similarity index 100% rename from tdevdesigner/designer/projectsettingsimpl.h rename to kdevdesigner/designer/projectsettingsimpl.h diff --git a/kdevdesigner/designer/propertyeditor.cpp b/kdevdesigner/designer/propertyeditor.cpp new file mode 100644 index 00000000..e7a5d387 --- /dev/null +++ b/kdevdesigner/designer/propertyeditor.cpp @@ -0,0 +1,4332 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include // HP-UX compiler needs this here + +#include "propertyeditor.h" +#include "formwindow.h" +#include "command.h" +#include "metadatabase.h" +#include "propertyobject.h" +#include +#include "widgetfactory.h" +#include "globaldefs.h" +#include "defs.h" +#include "asciivalidator.h" +#include "paletteeditorimpl.h" +#include "multilineeditorimpl.h" +#include "mainwindow.h" +#include "project.h" +#include "hierarchyview.h" +#include "database.h" +#include "menubareditor.h" + +#include +#include +#include +#include "kdevdesigner_part.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include // FIXME: obsolete +#include +#include +#include + +#include + + +static TQFontDatabase *fontDataBase = 0; +TQString assistantPath(); + +#ifdef TQ_WS_MAC +#include +static void setupStyle(TQWidget *w) +{ + static TQStyle *windowsStyle = 0; + if(!windowsStyle) + windowsStyle = new TQWindowsStyle; + w->setStyle(windowsStyle); +} +#else +#define setupStyle(x) +#endif + +static void cleanupFontDatabase() +{ + delete fontDataBase; + fontDataBase = 0; +} + +static TQStringList getFontList() +{ + if ( !fontDataBase ) { + fontDataBase = new TQFontDatabase; + tqAddPostRoutine( cleanupFontDatabase ); + } + return fontDataBase->families(); +} + + +class PropertyWhatsThis : public TQWhatsThis +{ +public: + PropertyWhatsThis( PropertyList *l ); + TQString text( const TQPoint &pos ); + bool clicked( const TQString& href ); + +private: + PropertyList *propertyList; + +}; + +PropertyWhatsThis::PropertyWhatsThis( PropertyList *l ) + : TQWhatsThis( l->viewport() ), propertyList( l ) +{ +} + +TQString PropertyWhatsThis::text( const TQPoint &pos ) +{ + return propertyList->whatsThisAt( pos ); +} + +bool PropertyWhatsThis::clicked( const TQString& href ) +{ + if ( !href.isEmpty() ) { + TQAssistantClient *ac = MainWindow::self->assistantClient(); + ac->showPage( TQString( tqInstallPathDocs() ) + "/html/" + href ); + } + return FALSE; // do not hide window +} + + +/*! + \class PropertyItem propertyeditor.h + \brief Base class for all property items + + This is the base class for each property item for the + PropertyList. A simple property item has just a name and a value to + provide an editor for a datatype. But more complex datatypes might + provide an expandable item for editing single parts of the + datatype. See hasSubItems(), initChildren() for that. +*/ + +/*! If this item should be a child of another property item, specify + \a prop as the parent item. +*/ + +PropertyItem::PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) + : TQListViewItem( l, after ), listview( l ), property( prop ), propertyName( propName ) +{ + setSelectable( FALSE ); + open = FALSE; + setText( 0, propertyName ); + changed = FALSE; + setText( 1, "" ); + resetButton = 0; +} + +PropertyItem::~PropertyItem() +{ + if ( resetButton ) + delete resetButton->parentWidget(); + resetButton = 0; +} + +void PropertyItem::toggle() +{ +} + +void PropertyItem::updateBackColor() +{ + if ( itemAbove() && this != listview->firstChild() ) { + if ( ( ( PropertyItem*)itemAbove() )->backColor == *backColor1 ) + backColor = *backColor2; + else + backColor = *backColor1; + } else { + backColor = *backColor1; + } + if ( listview->firstChild() == this ) + backColor = *backColor1; +} + +TQColor PropertyItem::backgroundColor() +{ + updateBackColor(); + if ( (TQListViewItem*)this == listview->currentItem() ) + return *selectedBack; + return backColor; +} + +/*! If a subclass is a expandable item, this is called when the child +items should be created. +*/ + +void PropertyItem::createChildren() +{ +} + +/*! If a subclass is a expandable item, this is called when the child +items should be initialized. +*/ + +void PropertyItem::initChildren() +{ +} + +void PropertyItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ) +{ + TQColorGroup g( cg ); + g.setColor( TQColorGroup::Base, backgroundColor() ); + g.setColor( TQColorGroup::Foreground, TQt::black ); + g.setColor( TQColorGroup::Text, TQt::black ); + int indent = 0; + if ( column == 0 ) { + indent = 20 + ( property ? 20 : 0 ); + p->fillRect( 0, 0, width, height(), backgroundColor() ); + p->save(); + p->translate( indent, 0 ); + } + + if ( isChanged() && column == 0 ) { + p->save(); + TQFont f = p->font(); + f.setBold( TRUE ); + p->setFont( f ); + } + + if ( !hasCustomContents() || column != 1 ) { + TQListViewItem::paintCell( p, g, column, width - indent, align ); + } else { + p->fillRect( 0, 0, width, height(), backgroundColor() ); + drawCustomContents( p, TQRect( 0, 0, width, height() ) ); + } + + if ( isChanged() && column == 0 ) + p->restore(); + if ( column == 0 ) + p->restore(); + if ( hasSubItems() && column == 0 ) { + p->save(); + p->setPen( cg.foreground() ); + p->setBrush( cg.base() ); + p->drawRect( 5, height() / 2 - 4, 9, 9 ); + p->drawLine( 7, height() / 2, 11, height() / 2 ); + if ( !isOpen() ) + p->drawLine( 9, height() / 2 - 2, 9, height() / 2 + 2 ); + p->restore(); + } + p->save(); + p->setPen( TQPen( cg.dark(), 1 ) ); + p->drawLine( 0, height() - 1, width, height() - 1 ); + p->drawLine( width - 1, 0, width - 1, height() ); + p->restore(); + + if ( listview->currentItem() == this && column == 0 && + !listview->hasFocus() && !listview->viewport()->hasFocus() ) + paintFocus( p, cg, TQRect( 0, 0, width, height() ) ); +} + +void PropertyItem::paintBranches( TQPainter * p, const TQColorGroup & cg, + int w, int y, int h ) +{ + TQColorGroup g( cg ); + g.setColor( TQColorGroup::Base, backgroundColor() ); + TQListViewItem::paintBranches( p, g, w, y, h ); +} + +void PropertyItem::paintFocus( TQPainter *p, const TQColorGroup &cg, const TQRect &r ) +{ + p->save(); + TQApplication::style().tqdrawPrimitive(TQStyle::PE_Panel, p, r, cg, + TQStyle::Style_Sunken, TQStyleOption(1,1) ); + p->restore(); +} + +/*! Subclasses which are expandable items have to return TRUE + here. Default is FALSE. +*/ + +bool PropertyItem::hasSubItems() const +{ + return FALSE; +} + +/*! Returns the parent property item here if this is a child or 0 + otherwise. + */ + +PropertyItem *PropertyItem::propertyParent() const +{ + return property; +} + +bool PropertyItem::isOpen() const +{ + return open; +} + +void PropertyItem::setOpen( bool b ) +{ + if ( b == open ) + return; + open = b; + + if ( !open ) { + children.setAutoDelete( TRUE ); + children.clear(); + children.setAutoDelete( FALSE ); + tqApp->processEvents(); + listview->updateEditorSize(); + return; + } + + createChildren(); + initChildren(); + tqApp->processEvents(); + listview->updateEditorSize(); +} + +/*! Subclasses have to show the editor of the item here +*/ + +void PropertyItem::showEditor() +{ + createResetButton(); + resetButton->parentWidget()->show(); +} + +/*! Subclasses have to hide the editor of the item here +*/ + +void PropertyItem::hideEditor() +{ + createResetButton(); + resetButton->parentWidget()->hide(); +} + +/*! This is called to init the value of the item. Reimplement in + subclasses to init the editor +*/ + +void PropertyItem::setValue( const TQVariant &v ) +{ + val = v; +} + +TQVariant PropertyItem::value() const +{ + return val; +} + +bool PropertyItem::isChanged() const +{ + return changed; +} + +void PropertyItem::setChanged( bool b, bool updateDb ) +{ + if ( propertyParent() ) + return; + if ( changed == b ) + return; + changed = b; + repaint(); + if ( updateDb ) { + MetaDataBase::setPropertyChanged( listview->propertyEditor()->widget(), name(), changed ); + } + updateResetButtonState(); +} + +TQString PropertyItem::name() const +{ + return propertyName; +} + +void PropertyItem::createResetButton() +{ + if ( resetButton ) { + resetButton->parentWidget()->lower(); + return; + } + const TQPixmap DesignerResetPix = SmallIcon( "designer_resetproperty.png" , KDevDesignerPartFactory::instance()); + + TQHBox *hbox = new TQHBox( listview->viewport() ); + hbox->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); + hbox->setLineWidth( 1 ); + resetButton = new TQPushButton( hbox ); + setupStyle( resetButton ); + resetButton->setPixmap( DesignerResetPix ); + resetButton->setFixedWidth( resetButton->sizeHint().width() ); + hbox->layout()->setAlignment( TQt::AlignRight ); + listview->addChild( hbox ); + hbox->hide(); + TQObject::connect( resetButton, TQT_SIGNAL( clicked() ), + listview, TQT_SLOT( resetProperty() ) ); + TQToolTip::add( resetButton, i18n( "Reset the property to its default value" ) ); + TQWhatsThis::add( resetButton, i18n( "Click this button to reset the property to its default value" ) ); + updateResetButtonState(); +} + +void PropertyItem::updateResetButtonState() +{ + if ( !resetButton ) + return; + if ( propertyParent() || !WidgetFactory::canResetProperty( listview->propertyEditor()->widget(), name() ) ) + resetButton->setEnabled( FALSE ); + else + resetButton->setEnabled( isChanged() ); +} + +/*! Call this to place/resize the item editor correctly (normally + call it from showEditor()) +*/ + +void PropertyItem::placeEditor( TQWidget *w ) +{ + createResetButton(); + TQRect r = listview->itemRect( this ); + if ( !r.size().isValid() ) { + listview->ensureItemVisible( this ); +#if defined(TQ_WS_WIN) + listview->repaintContents( FALSE ); +#endif + r = listview->itemRect( this ); + } + r.setX( listview->header()->sectionPos( 1 ) ); + r.setWidth( listview->header()->sectionSize( 1 ) - 1 ); + r.setWidth( r.width() - resetButton->width() - 2 ); + r = TQRect( listview->viewportToContents( r.topLeft() ), r.size() ); + w->resize( r.size() ); + listview->moveChild( w, r.x(), r.y() ); + resetButton->parentWidget()->resize( resetButton->sizeHint().width() + 10, r.height() ); + listview->moveChild( resetButton->parentWidget(), r.x() + r.width() - 8, r.y() ); + resetButton->setFixedHeight( TQMAX( 0, r.height() - 3 ) ); +} + +/*! This should be called by subclasses if the user changed the value + of the property and this value should be applied to the widget property +*/ + +void PropertyItem::notifyValueChange() +{ + if ( !propertyParent() ) { + listview->valueChanged( this ); + setChanged( TRUE ); + if ( hasSubItems() ) + initChildren(); + } else { + propertyParent()->childValueChanged( this ); + setChanged( TRUE ); + } +} + +/*! If a subclass is a expandable item reimplement this as this is + always called if a child item changed its value. So update the + display of the item here then. +*/ + +void PropertyItem::childValueChanged( PropertyItem * ) +{ +} + +/*! When adding a child item, call this (normally from addChildren() +*/ + +void PropertyItem::addChild( PropertyItem *i ) +{ + children.append( i ); +} + +int PropertyItem::childCount() const +{ + return children.count(); +} + +PropertyItem *PropertyItem::child( int i ) const +{ + // ARRRRRRRRG + return ( (PropertyItem*)this )->children.at( i ); +} + +/*! If the contents of the item is not displayable with a text, but + you want to draw it yourself (using drawCustomContents()), return + TRUE here. +*/ + +bool PropertyItem::hasCustomContents() const +{ + return FALSE; +} + +/*! + \sa hasCustomContents() +*/ + +void PropertyItem::drawCustomContents( TQPainter *, const TQRect & ) +{ +} + +TQString PropertyItem::currentItem() const +{ + return TQString(); +} + +int PropertyItem::currentIntItem() const +{ + return -1; +} + +void PropertyItem::setCurrentItem( const TQString & ) +{ +} + +void PropertyItem::setCurrentItem( int ) +{ +} + +int PropertyItem::currentIntItemFromObject() const +{ + return -1; +} + +TQString PropertyItem::currentItemFromObject() const +{ + return TQString(); +} + +void PropertyItem::setFocus( TQWidget *w ) +{ + if ( !tqApp->focusWidget() || + listview->propertyEditor()->formWindow() && + ( !MainWindow::self->isAFormWindowChild( TQT_TQOBJECT(tqApp->focusWidget()) ) && + !tqApp->focusWidget()->inherits( "Editor" ) ) ) + w->setFocus(); +} + +void PropertyItem::setText( int col, const TQString &t ) +{ + TQString txt( t ); + if ( col == 1 ) + txt = txt.replace( "\n", " " ); + TQListViewItem::setText( col, txt ); +} + +// -------------------------------------------------------------- + +PropertyTextItem::PropertyTextItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName, bool comment, bool multiLine, bool ascii, bool a ) + : PropertyItem( l, after, prop, propName ), withComment( comment ), + hasMultiLines( multiLine ), asciiOnly( ascii ), accel( a ) +{ + lin = 0; + box = 0; +} + +TQLineEdit *PropertyTextItem::lined() +{ + if ( lin ) + return lin; + if ( hasMultiLines ) { + box = new TQHBox( listview->viewport() ); + box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); + box->setLineWidth( 2 ); + box->hide(); + } + + lin = 0; + if ( hasMultiLines ) + lin = new TQLineEdit( box ); + else + lin = new TQLineEdit( listview->viewport() ); + + if ( asciiOnly ) { + if ( PropertyItem::name() == "name" ) { + lin->setValidator( new AsciiValidator( TQString(":"), TQT_TQOBJECT(lin), "ascii_validator" ) ); + if ( listview->propertyEditor()->formWindow()->isFake() ) + lin->setEnabled( FALSE ); + } else { + lin->setValidator( new AsciiValidator( TQString("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~" + "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9" + "\xaa\xab\xac\xad\xae\xaf\xb1\xb2\xb3" + "\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc" + "\xbd\xbe\xbf"), TQT_TQOBJECT(lin), "ascii_validator" ) ); + } + } if ( !hasMultiLines ) { + lin->hide(); + } else { + button = new TQPushButton( "...", box ); + setupStyle( button ); + button->setFixedWidth( 20 ); + connect( button, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( getText() ) ); + lin->setFrame( FALSE ); + } + connect( lin, TQT_SIGNAL( returnPressed() ), + this, TQT_SLOT( setValue() ) ); + connect( lin, TQT_SIGNAL( textChanged( const TQString & ) ), + this, TQT_SLOT( setValue() ) ); + if ( PropertyItem::name() == "name" || PropertyItem::name() == "itemName" ) + connect( lin, TQT_SIGNAL( returnPressed() ), + listview->propertyEditor()->formWindow()->commandHistory(), + TQT_SLOT( checkCompressedCommand() ) ); + lin->installEventFilter( listview ); + return lin; +} + +PropertyTextItem::~PropertyTextItem() +{ + delete (TQLineEdit*)lin; + lin = 0; + delete (TQHBox*)box; + box = 0; +} + +void PropertyTextItem::setChanged( bool b, bool updateDb ) +{ + PropertyItem::setChanged( b, updateDb ); + if ( withComment && childCount() > 0 ) + ( (PropertyTextItem*)PropertyItem::child( 0 ) )->lined()->setEnabled( b ); +} + +bool PropertyTextItem::hasSubItems() const +{ + return withComment; +} + +void PropertyTextItem::childValueChanged( PropertyItem *child ) +{ + if ( PropertyItem::name() != "name" ) + MetaDataBase::setPropertyComment( listview->propertyEditor()->widget(), + PropertyItem::name(), child->value().toString() ); + else + MetaDataBase::setExportMacro( listview->propertyEditor()->widget(), child->value().toString() ); + listview->propertyEditor()->formWindow()->commandHistory()->setModified( TRUE ); +} + +void PropertyTextItem::showEditor() +{ + PropertyItem::showEditor(); + if ( !lin || lin->text().length() == 0 ) { + lined()->blockSignals( TRUE ); + lined()->setText( value().toString() ); + lined()->blockSignals( FALSE ); + } + + TQWidget* w; + if ( hasMultiLines ) + w = box; + else + w= lined(); + + placeEditor( w ); + if ( !w->isVisible() || !lined()->hasFocus() ) { + w->show(); + setFocus( lined() ); + } +} + +void PropertyTextItem::createChildren() +{ + PropertyTextItem *i = new PropertyTextItem( listview, this, this, + PropertyItem::name() == "name" ? + "export macro" : "comment", FALSE, FALSE, + PropertyItem::name() == "name" ); + i->lined()->setEnabled( isChanged() ); + addChild( i ); +} + +void PropertyTextItem::initChildren() +{ + if ( !childCount() ) + return; + PropertyItem *item = PropertyItem::child( 0 ); + if ( item ) { + if ( PropertyItem::name() != "name" ) + item->setValue( MetaDataBase::propertyComment( listview->propertyEditor()->widget(), + PropertyItem::name() ) ); + else + item->setValue( MetaDataBase::exportMacro( listview->propertyEditor()->widget() ) ); + } +} + +void PropertyTextItem::hideEditor() +{ + PropertyItem::hideEditor(); + TQWidget* w; + if ( hasMultiLines ) + w = box; + else + w = lined(); + + w->hide(); +} + +void PropertyTextItem::setValue( const TQVariant &v ) +{ + if ( ( !hasSubItems() || !isOpen() ) + && value() == v ) + return; + if ( lin ) { + lined()->blockSignals( TRUE ); + int oldCursorPos; + oldCursorPos = lin->cursorPosition(); + lined()->setText( v.toString() ); + if ( oldCursorPos < (int)lin->text().length() ) + lin->setCursorPosition( oldCursorPos ); + lined()->blockSignals( FALSE ); + } + setText( 1, v.toString() ); + PropertyItem::setValue( v ); +} + +void PropertyTextItem::setValue() +{ + setText( 1, lined()->text() ); + TQVariant v; + if ( accel ) { + v = TQVariant( TQKeySequence( lined()->text() ) ); + if ( v.toString().isNull() ) + return; // not yet valid input + } else { + v = lined()->text(); + } + PropertyItem::setValue( v ); + notifyValueChange(); +} + +void PropertyTextItem::getText() +{ + bool richText = !::tqqt_cast(listview->propertyEditor()->widget()) || + ( text( 0 ) == "whatsThis" ); + bool doWrap = FALSE; + TQString txt = MultiLineEditor::getText( listview, value().toString(), richText, &doWrap ); + if ( !txt.isEmpty() ) { + setText( 1, txt ); + PropertyItem::setValue( txt ); + notifyValueChange(); + lined()->blockSignals( TRUE ); + lined()->setText( txt ); + lined()->blockSignals( FALSE ); + } +} + +// -------------------------------------------------------------- + +PropertyDoubleItem::PropertyDoubleItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName ) + : PropertyItem( l, after, prop, propName ) +{ + lin = 0; +} + +TQLineEdit *PropertyDoubleItem::lined() +{ + if ( lin ) + return lin; + lin = new TQLineEdit( listview->viewport() ); + lin->setValidator( new TQDoubleValidator( TQT_TQOBJECT(lin), "double_validator" ) ); + + connect( lin, TQT_SIGNAL( returnPressed() ), + this, TQT_SLOT( setValue() ) ); + connect( lin, TQT_SIGNAL( textChanged( const TQString & ) ), + this, TQT_SLOT( setValue() ) ); + lin->installEventFilter( listview ); + return lin; +} + +PropertyDoubleItem::~PropertyDoubleItem() +{ + delete (TQLineEdit*)lin; + lin = 0; +} + +void PropertyDoubleItem::showEditor() +{ + PropertyItem::showEditor(); + if ( !lin ) { + lined()->blockSignals( TRUE ); + lined()->setText( TQString::number( value().toDouble() ) ); + lined()->blockSignals( FALSE ); + } + TQWidget* w = lined(); + + placeEditor( w ); + if ( !w->isVisible() || !lined()->hasFocus() ) { + w->show(); + setFocus( lined() ); + } +} + + +void PropertyDoubleItem::hideEditor() +{ + PropertyItem::hideEditor(); + TQWidget* w = lined(); + w->hide(); +} + +void PropertyDoubleItem::setValue( const TQVariant &v ) +{ + if ( value() == v ) + return; + if ( lin ) { + lined()->blockSignals( TRUE ); + int oldCursorPos; + oldCursorPos = lin->cursorPosition(); + lined()->setText( TQString::number( v.toDouble() ) ); + if ( oldCursorPos < (int)lin->text().length() ) + lin->setCursorPosition( oldCursorPos ); + lined()->blockSignals( FALSE ); + } + setText( 1, TQString::number( v.toDouble() ) ); + PropertyItem::setValue( v ); +} + +void PropertyDoubleItem::setValue() +{ + setText( 1, lined()->text() ); + TQVariant v = lined()->text().toDouble(); + PropertyItem::setValue( v ); + notifyValueChange(); +} + + +// -------------------------------------------------------------- + +PropertyDateItem::PropertyDateItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) + : PropertyItem( l, after, prop, propName ) +{ + lin = 0; +} + +TQDateEdit *PropertyDateItem::lined() +{ + if ( lin ) + return lin; + lin = new TQDateEdit( listview->viewport() ); + TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); + for ( TQObject *o = l->first(); o; o = l->next() ) + o->installEventFilter( listview ); + delete l; + connect( lin, TQT_SIGNAL( valueChanged( const TQDate & ) ), + this, TQT_SLOT( setValue() ) ); + return lin; +} + +PropertyDateItem::~PropertyDateItem() +{ + delete (TQDateEdit*)lin; + lin = 0; +} + +void PropertyDateItem::showEditor() +{ + PropertyItem::showEditor(); + if ( !lin ) { + lined()->blockSignals( TRUE ); + lined()->setDate( value().toDate() ); + lined()->blockSignals( FALSE ); + } + placeEditor( lin ); + if ( !lin->isVisible() ) { + lin->show(); + setFocus( lin ); + } +} + +void PropertyDateItem::hideEditor() +{ + PropertyItem::hideEditor(); + if ( lin ) + lin->hide(); +} + +void PropertyDateItem::setValue( const TQVariant &v ) +{ + if ( ( !hasSubItems() || !isOpen() ) + && value() == v ) + return; + + if ( lin ) { + lined()->blockSignals( TRUE ); + if ( lined()->date() != v.toDate() ) + lined()->setDate( v.toDate() ); + lined()->blockSignals( FALSE ); + } + setText( 1, v.toDate().toString( ::Qt::ISODate ) ); + PropertyItem::setValue( v ); +} + +void PropertyDateItem::setValue() +{ + setText( 1, lined()->date().toString( ::Qt::ISODate ) ); + TQVariant v; + v = lined()->date(); + PropertyItem::setValue( v ); + notifyValueChange(); +} + +// -------------------------------------------------------------- + +PropertyTimeItem::PropertyTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) + : PropertyItem( l, after, prop, propName ) +{ + lin = 0; +} + +TQTimeEdit *PropertyTimeItem::lined() +{ + if ( lin ) + return lin; + lin = new TQTimeEdit( listview->viewport() ); + connect( lin, TQT_SIGNAL( valueChanged( const TQTime & ) ), + this, TQT_SLOT( setValue() ) ); + TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); + for ( TQObject *o = l->first(); o; o = l->next() ) + o->installEventFilter( listview ); + delete l; + return lin; +} + +PropertyTimeItem::~PropertyTimeItem() +{ + delete (TQTimeEdit*)lin; + lin = 0; +} + +void PropertyTimeItem::showEditor() +{ + PropertyItem::showEditor(); + if ( !lin ) { + lined()->blockSignals( TRUE ); + lined()->setTime( value().toTime() ); + lined()->blockSignals( FALSE ); + } + placeEditor( lin ); + if ( !lin->isVisible() ) { + lin->show(); + setFocus( lin ); + } +} + +void PropertyTimeItem::hideEditor() +{ + PropertyItem::hideEditor(); + if ( lin ) + lin->hide(); +} + +void PropertyTimeItem::setValue( const TQVariant &v ) +{ + if ( ( !hasSubItems() || !isOpen() ) + && value() == v ) + return; + + if ( lin ) { + lined()->blockSignals( TRUE ); + if ( lined()->time() != v.toTime() ) + lined()->setTime( v.toTime() ); + lined()->blockSignals( FALSE ); + } + setText( 1, v.toTime().toString( ::Qt::ISODate ) ); + PropertyItem::setValue( v ); +} + +void PropertyTimeItem::setValue() +{ + setText( 1, lined()->time().toString( ::Qt::ISODate ) ); + TQVariant v; + v = lined()->time(); + PropertyItem::setValue( v ); + notifyValueChange(); +} + +// -------------------------------------------------------------- + +PropertyDateTimeItem::PropertyDateTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) + : PropertyItem( l, after, prop, propName ) +{ + lin = 0; +} + +TQDateTimeEdit *PropertyDateTimeItem::lined() +{ + if ( lin ) + return lin; + lin = new TQDateTimeEdit( listview->viewport() ); + connect( lin, TQT_SIGNAL( valueChanged( const TQDateTime & ) ), + this, TQT_SLOT( setValue() ) ); + TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); + for ( TQObject *o = l->first(); o; o = l->next() ) + o->installEventFilter( listview ); + delete l; + return lin; +} + +PropertyDateTimeItem::~PropertyDateTimeItem() +{ + delete (TQDateTimeEdit*)lin; + lin = 0; +} + +void PropertyDateTimeItem::showEditor() +{ + PropertyItem::showEditor(); + if ( !lin ) { + lined()->blockSignals( TRUE ); + lined()->setDateTime( value().toDateTime() ); + lined()->blockSignals( FALSE ); + } + placeEditor( lin ); + if ( !lin->isVisible() ) { + lin->show(); + setFocus( lin ); + } +} + +void PropertyDateTimeItem::hideEditor() +{ + PropertyItem::hideEditor(); + if ( lin ) + lin->hide(); +} + +void PropertyDateTimeItem::setValue( const TQVariant &v ) +{ + if ( ( !hasSubItems() || !isOpen() ) + && value() == v ) + return; + + if ( lin ) { + lined()->blockSignals( TRUE ); + if ( lined()->dateTime() != v.toDateTime() ) + lined()->setDateTime( v.toDateTime() ); + lined()->blockSignals( FALSE ); + } + setText( 1, v.toDateTime().toString( ::Qt::ISODate ) ); + PropertyItem::setValue( v ); +} + +void PropertyDateTimeItem::setValue() +{ + setText( 1, lined()->dateTime().toString( ::Qt::ISODate ) ); + TQVariant v; + v = lined()->dateTime(); + PropertyItem::setValue( v ); + notifyValueChange(); +} + +// -------------------------------------------------------------- + +PropertyBoolItem::PropertyBoolItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) + : PropertyItem( l, after, prop, propName ) +{ + comb = 0; +} + +TQComboBox *PropertyBoolItem::combo() +{ + if ( comb ) + return comb; + comb = new TQComboBox( FALSE, listview->viewport() ); + comb->hide(); + comb->insertItem( i18n( "False" ) ); + comb->insertItem( i18n( "True" ) ); + connect( comb, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( setValue() ) ); + comb->installEventFilter( listview ); + return comb; +} + +PropertyBoolItem::~PropertyBoolItem() +{ + delete (TQComboBox*)comb; + comb = 0; +} + +void PropertyBoolItem::toggle() +{ + bool b = value().toBool(); + setValue( TQVariant( !b, 0 ) ); + setValue(); +} + +void PropertyBoolItem::showEditor() +{ + PropertyItem::showEditor(); + if ( !comb ) { + combo()->blockSignals( TRUE ); + if ( value().toBool() ) + combo()->setCurrentItem( 1 ); + else + combo()->setCurrentItem( 0 ); + combo()->blockSignals( FALSE ); + } + placeEditor( combo() ); + if ( !combo()->isVisible() || !combo()->hasFocus() ) { + combo()->show(); + setFocus( combo() ); + } +} + +void PropertyBoolItem::hideEditor() +{ + PropertyItem::hideEditor(); + combo()->hide(); +} + +void PropertyBoolItem::setValue( const TQVariant &v ) +{ + if ( ( !hasSubItems() || !isOpen() ) + && value() == v ) + return; + + if ( comb ) { + combo()->blockSignals( TRUE ); + if ( v.toBool() ) + combo()->setCurrentItem( 1 ); + else + combo()->setCurrentItem( 0 ); + combo()->blockSignals( FALSE ); + } + TQString tmp = i18n( "True" ); + if ( !v.toBool() ) + tmp = i18n( "False" ); + setText( 1, tmp ); + PropertyItem::setValue( v ); +} + +void PropertyBoolItem::setValue() +{ + if ( !comb ) + return; + setText( 1, combo()->currentText() ); + bool b = combo()->currentItem() == 0 ? (bool)FALSE : (bool)TRUE; + PropertyItem::setValue( TQVariant( b, 0 ) ); + notifyValueChange(); +} + +// -------------------------------------------------------------- + +PropertyIntItem::PropertyIntItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName, bool s ) + : PropertyItem( l, after, prop, propName ), signedValue( s ) +{ + spinBx = 0; +} + +TQSpinBox *PropertyIntItem::spinBox() +{ + if ( spinBx ) + return spinBx; + if ( signedValue ) + spinBx = new TQSpinBox( -INT_MAX, INT_MAX, 1, listview->viewport() ); + else + spinBx = new TQSpinBox( 0, INT_MAX, 1, listview->viewport() ); + spinBx->hide(); + spinBx->installEventFilter( listview ); + TQObjectList *ol = spinBx->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); + if ( ol && ol->first() ) + ol->first()->installEventFilter( listview ); + delete ol; + connect( spinBx, TQT_SIGNAL( valueChanged( int ) ), + this, TQT_SLOT( setValue() ) ); + return spinBx; +} + +PropertyIntItem::~PropertyIntItem() +{ + delete (TQSpinBox*)spinBx; + spinBx = 0; +} + +void PropertyIntItem::showEditor() +{ + PropertyItem::showEditor(); + if ( !spinBx ) { + spinBox()->blockSignals( TRUE ); + if ( signedValue ) + spinBox()->setValue( value().toInt() ); + else + spinBox()->setValue( value().toUInt() ); + spinBox()->blockSignals( FALSE ); + } + placeEditor( spinBox() ); + if ( !spinBox()->isVisible() || !spinBox()->hasFocus() ) { + spinBox()->show(); + setFocus( spinBox() ); + } +} + +void PropertyIntItem::hideEditor() +{ + PropertyItem::hideEditor(); + spinBox()->hide(); +} + +void PropertyIntItem::setValue( const TQVariant &v ) +{ + if ( ( !hasSubItems() || !isOpen() ) + && value() == v ) + return; + + if ( spinBx ) { + spinBox()->blockSignals( TRUE ); + if ( signedValue ) + spinBox()->setValue( v.toInt() ); + else + spinBox()->setValue( v.toUInt() ); + spinBox()->blockSignals( FALSE ); + } + + if ( signedValue ) + setText( 1, TQString::number( v.toInt() ) ); + else + setText( 1, TQString::number( v.toUInt() ) ); + PropertyItem::setValue( v ); +} + +void PropertyIntItem::setValue() +{ + if ( !spinBx ) + return; + setText( 1, TQString::number( spinBox()->value() ) ); + if ( signedValue ) + PropertyItem::setValue( spinBox()->value() ); + else + PropertyItem::setValue( (uint)spinBox()->value() ); + notifyValueChange(); +} + +// -------------------------------------------------------------- + +PropertyLayoutItem::PropertyLayoutItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName ) + : PropertyItem( l, after, prop, propName ) +{ + spinBx = 0; +} + +PropertyLayoutItem::~PropertyLayoutItem() +{ + delete (TQSpinBox*)spinBx; + spinBx = 0; +} + +TQSpinBox* PropertyLayoutItem::spinBox() +{ + if ( spinBx ) + return spinBx; + spinBx = new TQSpinBox( -1, INT_MAX, 1, listview->viewport() ); + spinBx->setSpecialValueText( i18n( "default" ) ); + spinBx->hide(); + spinBx->installEventFilter( listview ); + TQObjectList *ol = spinBx->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); + if ( ol && ol->first() ) + ol->first()->installEventFilter( listview ); + delete ol; + connect( spinBx, TQT_SIGNAL( valueChanged( int ) ), + this, TQT_SLOT( setValue() ) ); + return spinBx; +} + +void PropertyLayoutItem::showEditor() +{ + PropertyItem::showEditor(); + if ( !spinBx ) { + spinBox()->blockSignals( TRUE ); + spinBox()->setValue( value().toInt() ); + spinBox()->blockSignals( TRUE ); + } + placeEditor( spinBox() ); + if ( !spinBox()->isVisible() || !spinBox()->hasFocus() ) { + spinBox()->show(); + setFocus( spinBox() ); + } +} + +void PropertyLayoutItem::hideEditor() +{ + PropertyItem::hideEditor(); + spinBox()->hide(); +} + +void PropertyLayoutItem::setValue( const TQVariant &v ) +{ + if ( spinBx ) { + spinBox()->blockSignals( TRUE ); + spinBox()->setValue( v.toInt() ); + spinBox()->blockSignals( FALSE ); + } + TQString s = v.toString(); + if ( v.toInt() == -1 ) + s = spinBox()->specialValueText(); + setText( 1, s ); + PropertyItem::setValue( v ); +} + +void PropertyLayoutItem::setValue() +{ + if ( !spinBx ) + return; + PropertyItem::setValue( spinBox()->value() ); + notifyValueChange(); +} + + +// -------------------------------------------------------------- + +PropertyListItem::PropertyListItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName, bool e ) + : PropertyItem( l, after, prop, propName ), editable( e ) +{ + comb = 0; + oldInt = -1; +} + +TQComboBox *PropertyListItem::combo() +{ + if ( comb ) + return comb; + comb = new TQComboBox( editable, listview->viewport() ); + comb->hide(); + connect( comb, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( setValue() ) ); + comb->installEventFilter( listview ); + if ( editable ) { + TQObjectList *ol = comb->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); + if ( ol && ol->first() ) + ol->first()->installEventFilter( listview ); + delete ol; + } + return comb; +} + +PropertyListItem::~PropertyListItem() +{ + delete (TQComboBox*)comb; + comb = 0; +} + +void PropertyListItem::showEditor() +{ + PropertyItem::showEditor(); + if ( !comb ) { + combo()->blockSignals( TRUE ); + combo()->clear(); + combo()->insertStringList( value().toStringList() ); + combo()->blockSignals( FALSE ); + } + placeEditor( combo() ); + if ( !combo()->isVisible() || !combo()->hasFocus() ) { + combo()->show(); + setFocus( combo() ); + } +} + +void PropertyListItem::hideEditor() +{ + PropertyItem::hideEditor(); + combo()->hide(); +} + +void PropertyListItem::setValue( const TQVariant &v ) +{ + if ( comb ) { + combo()->blockSignals( TRUE ); + combo()->clear(); + combo()->insertStringList( v.toStringList() ); + combo()->blockSignals( FALSE ); + } + setText( 1, v.toStringList().first() ); + PropertyItem::setValue( v ); +} + +void PropertyListItem::setValue() +{ + if ( !comb ) + return; + setText( 1, combo()->currentText() ); + TQStringList lst; + for ( uint i = 0; i < combo()->listBox()->count(); ++i ) + lst << combo()->listBox()->item( i )->text(); + PropertyItem::setValue( lst ); + notifyValueChange(); + oldInt = currentIntItem(); + oldString = currentItem(); +} + +TQString PropertyListItem::currentItem() const +{ + return ( (PropertyListItem*)this )->combo()->currentText(); +} + +void PropertyListItem::setCurrentItem( const TQString &s ) +{ + if ( comb && currentItem().lower() == s.lower() ) + return; + + if ( !comb ) { + combo()->blockSignals( TRUE ); + combo()->clear(); + combo()->insertStringList( value().toStringList() ); + combo()->blockSignals( FALSE ); + } + for ( uint i = 0; i < combo()->listBox()->count(); ++i ) { + if ( combo()->listBox()->item( i )->text().lower() == s.lower() ) { + combo()->setCurrentItem( i ); + setText( 1, combo()->currentText() ); + break; + } + } + oldInt = currentIntItem(); + oldString = currentItem(); +} + +void PropertyListItem::addItem( const TQString &s ) +{ + combo()->insertItem( s ); +} + +void PropertyListItem::setCurrentItem( int i ) +{ + if ( comb && i == combo()->currentItem() ) + return; + + if ( !comb ) { + combo()->blockSignals( TRUE ); + combo()->clear(); + combo()->insertStringList( value().toStringList() ); + combo()->blockSignals( FALSE ); + } + combo()->setCurrentItem( i ); + setText( 1, combo()->currentText() ); + oldInt = currentIntItem(); + oldString = currentItem(); +} + +int PropertyListItem::currentIntItem() const +{ + return ( (PropertyListItem*)this )->combo()->currentItem(); +} + +int PropertyListItem::currentIntItemFromObject() const +{ + return oldInt; +} + +TQString PropertyListItem::currentItemFromObject() const +{ + return oldString; +} + +// -------------------------------------------------------------- + +PropertyCoordItem::PropertyCoordItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName, Type t ) + : PropertyItem( l, after, prop, propName ), typ( t ) +{ + lin = 0; + +} + +TQLineEdit *PropertyCoordItem::lined() +{ + if ( lin ) + return lin; + lin = new TQLineEdit( listview->viewport() ); + lin->setReadOnly( TRUE ); + lin->installEventFilter( listview ); + lin->hide(); + return lin; +} + +void PropertyCoordItem::createChildren() +{ + PropertyItem *i = this; + if ( typ == Rect || typ == Point ) { + i = new PropertyIntItem( listview, i, this, i18n( "x" ), TRUE ); + addChild( i ); + i = new PropertyIntItem( listview, i, this, i18n( "y" ), TRUE ); + addChild( i ); + } + if ( typ == Rect || typ == Size ) { + i = new PropertyIntItem( listview, i, this, i18n( "width" ), TRUE ); + addChild( i ); + i = new PropertyIntItem( listview, i, this, i18n( "height" ), TRUE ); + addChild( i ); + } +} + +void PropertyCoordItem::initChildren() +{ + PropertyItem *item = 0; + for ( int i = 0; i < childCount(); ++i ) { + item = PropertyItem::child( i ); + if ( item->name() == i18n( "x" ) ) { + if ( typ == Rect ) + item->setValue( val.toRect().x() ); + else if ( typ == Point ) + item->setValue( val.toPoint().x() ); + } else if ( item->name() == i18n( "y" ) ) { + if ( typ == Rect ) + item->setValue( val.toRect().y() ); + else if ( typ == Point ) + item->setValue( val.toPoint().y() ); + } else if ( item->name() == i18n( "width" ) ) { + if ( typ == Rect ) + item->setValue( val.toRect().width() ); + else if ( typ == Size ) + item->setValue( val.toSize().width() ); + } else if ( item->name() == i18n( "height" ) ) { + if ( typ == Rect ) + item->setValue( val.toRect().height() ); + else if ( typ == Size ) + item->setValue( val.toSize().height() ); + } + } +} + +PropertyCoordItem::~PropertyCoordItem() +{ + delete (TQLineEdit*)lin; + lin = 0; +} + +void PropertyCoordItem::showEditor() +{ + PropertyItem::showEditor(); + if ( !lin ) + lined()->setText( text( 1 ) ); + placeEditor( lined() ); + if ( !lined()->isVisible() || !lined()->hasFocus() ) { + lined()->show(); + setFocus( lined() ); + } +} + +void PropertyCoordItem::hideEditor() +{ + PropertyItem::hideEditor(); + lined()->hide(); +} + +void PropertyCoordItem::setValue( const TQVariant &v ) +{ + if ( ( !hasSubItems() || !isOpen() ) + && value() == v ) + return; + + TQString s; + if ( typ == Rect ) + s = "[ " + TQString::number( v.toRect().x() ) + ", " + TQString::number( v.toRect().y() ) + ", " + + TQString::number( v.toRect().width() ) + ", " + TQString::number( v.toRect().height() ) + " ]"; + else if ( typ == Point ) + s = "[ " + TQString::number( v.toPoint().x() ) + ", " + + TQString::number( v.toPoint().y() ) + " ]"; + else if ( typ == Size ) + s = "[ " + TQString::number( v.toSize().width() ) + ", " + + TQString::number( v.toSize().height() ) + " ]"; + setText( 1, s ); + if ( lin ) + lined()->setText( s ); + PropertyItem::setValue( v ); +} + +bool PropertyCoordItem::hasSubItems() const +{ + return TRUE; +} + +void PropertyCoordItem::childValueChanged( PropertyItem *child ) +{ + if ( typ == Rect ) { + TQRect r = value().toRect(); + if ( child->name() == i18n( "x" ) ) + r.moveBy( -r.x() + child->value().toInt(), 0 ); + else if ( child->name() == i18n( "y" ) ) + r.moveBy( 0, -r.y() + child->value().toInt() ); + else if ( child->name() == i18n( "width" ) ) + r.setWidth( child->value().toInt() ); + else if ( child->name() == i18n( "height" ) ) + r.setHeight( child->value().toInt() ); + setValue( r ); + } else if ( typ == Point ) { + TQPoint r = value().toPoint(); + if ( child->name() == i18n( "x" ) ) + r.setX( child->value().toInt() ); + else if ( child->name() == i18n( "y" ) ) + r.setY( child->value().toInt() ); + setValue( r ); + } else if ( typ == Size ) { + TQSize r = value().toSize(); + if ( child->name() == i18n( "width" ) ) + r.setWidth( child->value().toInt() ); + else if ( child->name() == i18n( "height" ) ) + r.setHeight( child->value().toInt() ); + setValue( r ); + } + notifyValueChange(); +} + +// -------------------------------------------------------------- + +PropertyPixmapItem::PropertyPixmapItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName, Type t ) + : PropertyItem( l, after, prop, propName ), type( t ) +{ + box = new TQHBox( listview->viewport() ); + box->hide(); + pixPrev = new TQLabel( box ); + pixPrev->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Minimum ) ); + pixPrev->setBackgroundColor( pixPrev->colorGroup().color( TQColorGroup::Base ) ); + button = new TQPushButton( "...", box ); + setupStyle( button ); + button->setFixedWidth( 20 ); + box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); + box->setLineWidth( 2 ); + pixPrev->setFrameStyle( TQFrame::NoFrame ); + box->installEventFilter( listview ); + connect( button, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( getPixmap() ) ); +} + +PropertyPixmapItem::~PropertyPixmapItem() +{ + delete (TQHBox*)box; +} + +void PropertyPixmapItem::showEditor() +{ + PropertyItem::showEditor(); + placeEditor( box ); + if ( !box->isVisible() ) { + box->show(); + listView()->viewport()->setFocus(); + } +} + +void PropertyPixmapItem::hideEditor() +{ + PropertyItem::hideEditor(); + box->hide(); +} + +void PropertyPixmapItem::setValue( const TQVariant &v ) +{ + TQString s; + if ( type == Pixmap ) + pixPrev->setPixmap( v.toPixmap() ); + else if ( type == IconSet ) + pixPrev->setPixmap( v.toIconSet().pixmap() ); + else + pixPrev->setPixmap( v.toImage() ); + PropertyItem::setValue( v ); + repaint(); +} + +void PropertyPixmapItem::getPixmap() +{ + TQPixmap pix = qChoosePixmap( listview, listview->propertyEditor()->formWindow(), value().toPixmap() ); + if ( !pix.isNull() ) { + if ( type == Pixmap ) + setValue( pix ); + else if ( type == IconSet ) + setValue( TQIconSet( pix ) ); + else + setValue( pix.convertToImage() ); + + notifyValueChange(); + } +} + +bool PropertyPixmapItem::hasCustomContents() const +{ + return TRUE; +} + +void PropertyPixmapItem::drawCustomContents( TQPainter *p, const TQRect &r ) +{ + TQPixmap pix; + if ( type == Pixmap ) + pix = value().toPixmap(); + else if ( type == IconSet ) + pix = value().toIconSet().pixmap(); + else + pix = value().toImage(); + + if ( !pix.isNull() ) { + p->save(); + p->setClipRect( TQRect( TQPoint( (int)(p->worldMatrix().dx() + r.x()), + (int)(p->worldMatrix().dy() + r.y()) ), + r.size() ) ); + p->drawPixmap( r.x(), r.y() + ( r.height() - pix.height() ) / 2, pix ); + p->restore(); + } +} + + +// -------------------------------------------------------------- + +PropertyColorItem::PropertyColorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName, bool children ) + : PropertyItem( l, after, prop, propName ), withChildren( children ) +{ + box = new TQHBox( listview->viewport() ); + box->hide(); + colorPrev = new TQFrame( box ); + button = new TQPushButton( "...", box ); + setupStyle( button ); + button->setFixedWidth( 20 ); + box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); + box->setLineWidth( 2 ); + colorPrev->setFrameStyle( TQFrame::Plain | TQFrame::Box ); + colorPrev->setLineWidth( 2 ); + TQPalette pal = colorPrev->palette(); + TQColorGroup cg = pal.active(); + cg.setColor( TQColorGroup::Foreground, cg.color( TQColorGroup::Base ) ); + pal.setActive( cg ); + pal.setInactive( cg ); + pal.setDisabled( cg ); + colorPrev->setPalette( pal ); + box->installEventFilter( listview ); + connect( button, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( getColor() ) ); +} + +void PropertyColorItem::createChildren() +{ + PropertyItem *i = this; + i = new PropertyIntItem( listview, i, this, i18n( "Red" ), TRUE ); + addChild( i ); + i = new PropertyIntItem( listview, i, this, i18n( "Green" ), TRUE ); + addChild( i ); + i = new PropertyIntItem( listview, i, this, i18n( "Blue" ), TRUE ); + addChild( i ); +} + +void PropertyColorItem::initChildren() +{ + PropertyItem *item = 0; + for ( int i = 0; i < childCount(); ++i ) { + item = PropertyItem::child( i ); + if ( item->name() == i18n( "Red" ) ) + item->setValue( val.toColor().red() ); + else if ( item->name() == i18n( "Green" ) ) + item->setValue( val.toColor().green() ); + else if ( item->name() == i18n( "Blue" ) ) + item->setValue( val.toColor().blue() ); + } +} + +PropertyColorItem::~PropertyColorItem() +{ + delete (TQHBox*)box; +} + +void PropertyColorItem::showEditor() +{ + PropertyItem::showEditor(); + placeEditor( box ); + if ( !box->isVisible() ) { + box->show(); + listView()->viewport()->setFocus(); + } +} + +void PropertyColorItem::hideEditor() +{ + PropertyItem::hideEditor(); + box->hide(); +} + +void PropertyColorItem::setValue( const TQVariant &v ) +{ + if ( ( !hasSubItems() || !isOpen() ) + && value() == v ) + return; + + TQString s; + setText( 1, v.toColor().name() ); + colorPrev->setBackgroundColor( v.toColor() ); + PropertyItem::setValue( v ); +} + +bool PropertyColorItem::hasSubItems() const +{ + return withChildren; +} + +void PropertyColorItem::childValueChanged( PropertyItem *child ) +{ + TQColor c( val.toColor() ); + if ( child->name() == i18n( "Red" ) ) + c.setRgb( child->value().toInt(), c.green(), c.blue() ); + else if ( child->name() == i18n( "Green" ) ) + c.setRgb( c.red(), child->value().toInt(), c.blue() ); + else if ( child->name() == i18n( "Blue" ) ) + c.setRgb( c.red(), c.green(), child->value().toInt() ); + setValue( c ); + notifyValueChange(); +} + +void PropertyColorItem::getColor() +{ + TQColor c = TQColorDialog::getColor( val.asColor(), listview ); + if ( c.isValid() ) { + setValue( c ); + notifyValueChange(); + } +} + +bool PropertyColorItem::hasCustomContents() const +{ + return TRUE; +} + +void PropertyColorItem::drawCustomContents( TQPainter *p, const TQRect &r ) +{ + p->save(); + p->setPen( TQPen( black, 1 ) ); + p->setBrush( val.toColor() ); + p->drawRect( r.x() + 2, r.y() + 2, r.width() - 5, r.height() - 5 ); + p->restore(); +} + +// -------------------------------------------------------------- + +PropertyFontItem::PropertyFontItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) + : PropertyItem( l, after, prop, propName ) +{ + box = new TQHBox( listview->viewport() ); + box->hide(); + lined = new TQLineEdit( box ); + button = new TQPushButton( "...", box ); + setupStyle( button ); + button->setFixedWidth( 20 ); + box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); + box->setLineWidth( 2 ); + lined->setFrame( FALSE ); + lined->setReadOnly( TRUE ); + box->setFocusProxy( lined ); + box->installEventFilter( listview ); + lined->installEventFilter( listview ); + button->installEventFilter( listview ); + connect( button, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( getFont() ) ); +} + +void PropertyFontItem::createChildren() +{ + PropertyItem *i = this; + i = new PropertyListItem( listview, i, this, i18n( "Family" ), FALSE ); + addChild( i ); + i = new PropertyIntItem( listview, i, this, i18n( "Point Size" ), TRUE ); + addChild( i ); + i = new PropertyBoolItem( listview, i, this, i18n( "Bold" ) ); + addChild( i ); + i = new PropertyBoolItem( listview, i, this, i18n( "Italic" ) ); + addChild( i ); + i = new PropertyBoolItem( listview, i, this, i18n( "Underline" ) ); + addChild( i ); + i = new PropertyBoolItem( listview, i, this, i18n( "Strikeout" ) ); + addChild( i ); +} + +void PropertyFontItem::initChildren() +{ + PropertyItem *item = 0; + for ( int i = 0; i < childCount(); ++i ) { + item = PropertyItem::child( i ); + if ( item->name() == i18n( "Family" ) ) { + ( (PropertyListItem*)item )->setValue( getFontList() ); + ( (PropertyListItem*)item )->setCurrentItem( val.toFont().family() ); + } else if ( item->name() == i18n( "Point Size" ) ) + item->setValue( val.toFont().pointSize() ); + else if ( item->name() == i18n( "Bold" ) ) + item->setValue( TQVariant( val.toFont().bold(), 0 ) ); + else if ( item->name() == i18n( "Italic" ) ) + item->setValue( TQVariant( val.toFont().italic(), 0 ) ); + else if ( item->name() == i18n( "Underline" ) ) + item->setValue( TQVariant( val.toFont().underline(), 0 ) ); + else if ( item->name() == i18n( "Strikeout" ) ) + item->setValue( TQVariant( val.toFont().strikeOut(), 0 ) ); + } +} + +PropertyFontItem::~PropertyFontItem() +{ + delete (TQHBox*)box; +} + +void PropertyFontItem::showEditor() +{ + PropertyItem::showEditor(); + placeEditor( box ); + if ( !box->isVisible() || !lined->hasFocus() ) { + box->show(); + setFocus( lined ); + } +} + +void PropertyFontItem::hideEditor() +{ + PropertyItem::hideEditor(); + box->hide(); +} + +void PropertyFontItem::setValue( const TQVariant &v ) +{ + if ( value() == v ) + return; + + setText( 1, v.toFont().family() + "-" + TQString::number( v.toFont().pointSize() ) ); + lined->setText( v.toFont().family() + "-" + TQString::number( v.toFont().pointSize() ) ); + PropertyItem::setValue( v ); +} + +void PropertyFontItem::getFont() +{ + bool ok = FALSE; + TQFont f = TQFontDialog::getFont( &ok, val.toFont(), listview ); + if ( ok && f != val.toFont() ) { + setValue( f ); + notifyValueChange(); + } +} + +bool PropertyFontItem::hasSubItems() const +{ + return TRUE; +} + +void PropertyFontItem::childValueChanged( PropertyItem *child ) +{ + TQFont f = val.toFont(); + if ( child->name() == i18n( "Family" ) ) + f.setFamily( ( (PropertyListItem*)child )->currentItem() ); + else if ( child->name() == i18n( "Point Size" ) ) + f.setPointSize( child->value().toInt() ); + else if ( child->name() == i18n( "Bold" ) ) + f.setBold( child->value().toBool() ); + else if ( child->name() == i18n( "Italic" ) ) + f.setItalic( child->value().toBool() ); + else if ( child->name() == i18n( "Underline" ) ) + f.setUnderline( child->value().toBool() ); + else if ( child->name() == i18n( "Strikeout" ) ) + f.setStrikeOut( child->value().toBool() ); + setValue( f ); + notifyValueChange(); +} + +// -------------------------------------------------------------- + +PropertyDatabaseItem::PropertyDatabaseItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName, bool wField ) + : PropertyItem( l, after, prop, propName ), withField( wField ) +{ + box = new TQHBox( listview->viewport() ); + box->hide(); + lined = new TQLineEdit( box ); + button = new TQPushButton( "...", box ); + setupStyle( button ); + button->setFixedWidth( 20 ); + box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); + box->setLineWidth( 2 ); + lined->setFrame( FALSE ); + lined->setReadOnly( TRUE ); + box->setFocusProxy( lined ); + box->installEventFilter( listview ); + lined->installEventFilter( listview ); + button->installEventFilter( listview ); +} + +void PropertyDatabaseItem::createChildren() +{ + PropertyItem *i = this; + i = new PropertyListItem( listview, i, this, i18n( "Connection" ), TRUE ); + addChild( i ); + i = new PropertyListItem( listview, i, this, i18n( "Table" ), TRUE ); + addChild( i ); + if ( withField ) { + i = new PropertyListItem( listview, i, this, i18n( "Field" ), TRUE ); + addChild( i ); + } +} + +void PropertyDatabaseItem::initChildren() +{ +#ifndef TQT_NO_SQL + PropertyItem *item = 0; + TQStringList lst = value().toStringList(); + TQString conn, table; + for ( int i = 0; i < childCount(); ++i ) { + item = PropertyItem::child( i ); + if ( item->name() == i18n( "Connection" ) ) { + TQStringList cl = listview->propertyEditor()->formWindow()->project()->databaseConnectionList(); + if ( !cl.isEmpty() ) + item->setValue( cl ); + else if ( lst.count() > 0 ) + item->setValue( TQStringList( lst[ 0 ] ) ); + else if ( withField ) + item->setValue( TQStringList( MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()), + "database" ).toStringList()[ 0 ] ) ); + + if ( lst.count() > 0 && !lst[ 0 ].isEmpty() ) + item->setCurrentItem( lst[ 0 ] ); + else if ( !isChanged() && withField ) + item->setCurrentItem( MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()), + "database" ).toStringList()[ 0 ] ); + else + item->setCurrentItem( 0 ); + conn = item->currentItem(); + } else if ( item->name() == i18n( "Table" ) ) { + TQStringList cl = listview->propertyEditor()->formWindow()->project()->databaseTableList( conn ); + if ( !cl.isEmpty() ) + item->setValue( cl ); + else if ( lst.count() > 1 ) + item->setValue( TQStringList( lst[ 1 ] ) ); + else if ( withField ) { + TQStringList fakeLst = MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()), "database" ).toStringList(); + if ( fakeLst.count() > 1 ) + item->setValue( fakeLst[ 1 ] ); + } + + if ( lst.count() > 1 && !lst[ 1 ].isEmpty() ) + item->setCurrentItem( lst[ 1 ] ); + else if ( !isChanged() && withField ) { + TQStringList fakeLst = MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()), "database" ).toStringList(); + if ( fakeLst.count() > 1 ) + item->setCurrentItem( fakeLst[ 1 ] ); + else + item->setCurrentItem( 0 ); + } else + item->setCurrentItem( 0 ); + table = item->currentItem(); + } else if ( item->name() == i18n( "Field" ) ) { + TQStringList cl = listview->propertyEditor()->formWindow()->project()->databaseFieldList( conn, table ); + if ( !cl.isEmpty() ) + item->setValue( cl ); + else if ( lst.count() > 2 ) + item->setValue( TQStringList( lst[ 2 ] ) ); + if ( lst.count() > 2 && !lst[ 2 ].isEmpty() ) + item->setCurrentItem( lst[ 2 ] ); + else + item->setCurrentItem( 0 ); + } + } +#endif +} + +PropertyDatabaseItem::~PropertyDatabaseItem() +{ + delete (TQHBox*)box; +} + +void PropertyDatabaseItem::showEditor() +{ + PropertyItem::showEditor(); + placeEditor( box ); + if ( !box->isVisible() || !lined->hasFocus() ) { + box->show(); + setFocus( lined ); + } +} + +void PropertyDatabaseItem::hideEditor() +{ + PropertyItem::hideEditor(); + box->hide(); +} + +void PropertyDatabaseItem::setValue( const TQVariant &v ) +{ + if ( value() == v ) + return; + + TQStringList lst = v.toStringList(); + TQString s = lst.join( "." ); + setText( 1, s ); + lined->setText( s ); + PropertyItem::setValue( v ); +} + +bool PropertyDatabaseItem::hasSubItems() const +{ + return TRUE; +} + +void PropertyDatabaseItem::childValueChanged( PropertyItem *c ) +{ +#ifndef TQT_NO_SQL + TQStringList lst; + lst << ( (PropertyListItem*)PropertyItem::child( 0 ) )->currentItem() + << ( (PropertyListItem*)PropertyItem::child( 1 ) )->currentItem(); + if ( withField ) + lst << ( (PropertyListItem*)PropertyItem::child( 2 ) )->currentItem(); + if ( c == PropertyItem::child( 0 ) ) { // if the connection changed + lst[ 0 ] = ( (PropertyListItem*)c )->currentItem(); + PropertyItem::child( 1 )->setValue( listview->propertyEditor()->formWindow()->project()->databaseTableList( lst[ 0 ] ) ); + if ( withField ) + PropertyItem::child( 2 )->setValue( listview->propertyEditor()->formWindow()->project()->databaseFieldList( lst[ 0 ], lst[ 1 ] ) ); + } else if ( withField && c == PropertyItem::child( 1 ) ) { // if the table changed + lst[ 1 ] = ( (PropertyListItem*)c )->currentItem(); + if ( withField ) + PropertyItem::child( 2 )->setValue( listview->propertyEditor()->formWindow()->project()->databaseFieldList( lst[ 0 ], lst[ 1 ] ) ); + } + lst.clear(); + lst << ( (PropertyListItem*)PropertyItem::child( 0 ) )->currentItem() + << ( (PropertyListItem*)PropertyItem::child( 1 ) )->currentItem(); + if ( withField ) + lst << ( (PropertyListItem*)PropertyItem::child( 2 ) )->currentItem(); + setValue( lst ); + notifyValueChange(); +#else + Q_UNUSED( c ); +#endif +} + +// -------------------------------------------------------------- + +PropertySizePolicyItem::PropertySizePolicyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName ) + : PropertyItem( l, after, prop, propName ) +{ + lin = 0; +} + +TQLineEdit *PropertySizePolicyItem::lined() +{ + if ( lin ) + return lin; + lin = new TQLineEdit( listview->viewport() ); + lin->hide(); + lin->setReadOnly( TRUE ); + return lin; +} + +void PropertySizePolicyItem::createChildren() +{ + TQStringList lst; + lst << "Fixed" << "Minimum" << "Maximum" << "Preferred" << "MinimumExpanding" << "Expanding" << "Ignored"; + + PropertyItem *i = this; + i = new PropertyListItem( listview, i, this, i18n( "hSizeType" ), FALSE ); + i->setValue( lst ); + addChild( i ); + i = new PropertyListItem( listview, i, this, i18n( "vSizeType" ), FALSE ); + i->setValue( lst ); + addChild( i ); + i = new PropertyIntItem( listview, i, this, i18n( "horizontalStretch" ), TRUE ); + addChild( i ); + i = new PropertyIntItem( listview, i, this, i18n( "verticalStretch" ), TRUE ); + addChild( i ); +} + +void PropertySizePolicyItem::initChildren() +{ + PropertyItem *item = 0; + TQSizePolicy sp = val.toSizePolicy(); + for ( int i = 0; i < childCount(); ++i ) { + item = PropertyItem::child( i ); + if ( item->name() == i18n( "hSizeType" ) ) + ( (PropertyListItem*)item )->setCurrentItem( size_type_to_int( sp.horData() ) ); + else if ( item->name() == i18n( "vSizeType" ) ) + ( (PropertyListItem*)item )->setCurrentItem( size_type_to_int( sp.verData() ) ); + else if ( item->name() == i18n( "horizontalStretch" ) ) + ( (PropertyIntItem*)item )->setValue( sp.horStretch() ); + else if ( item->name() == i18n( "verticalStretch" ) ) + ( (PropertyIntItem*)item )->setValue( sp.verStretch() ); + } +} + +PropertySizePolicyItem::~PropertySizePolicyItem() +{ + delete (TQLineEdit*)lin; +} + +void PropertySizePolicyItem::showEditor() +{ + PropertyItem::showEditor(); + placeEditor( lined() ); + if ( !lined()->isVisible() || !lined()->hasFocus() ) { + lined()->show(); + listView()->viewport()->setFocus(); + } +} + +void PropertySizePolicyItem::hideEditor() +{ + PropertyItem::hideEditor(); + lined()->hide(); +} + +void PropertySizePolicyItem::setValue( const TQVariant &v ) +{ + if ( value() == v ) + return; + + TQString s = i18n( "%1/%2/%3/%4" ); + s = s.arg( size_type_to_string( v.toSizePolicy().horData() ) ). + arg( size_type_to_string( v.toSizePolicy().verData() ) ). + arg( v.toSizePolicy().horStretch() ). + arg( v.toSizePolicy().verStretch() ); + setText( 1, s ); + lined()->setText( s ); + PropertyItem::setValue( v ); +} + +void PropertySizePolicyItem::childValueChanged( PropertyItem *child ) +{ + TQSizePolicy sp = val.toSizePolicy(); + if ( child->name() == i18n( "hSizeType" ) ) + sp.setHorData( int_to_size_type( ( ( PropertyListItem*)child )->currentIntItem() ) ); + else if ( child->name() == i18n( "vSizeType" ) ) + sp.setVerData( int_to_size_type( ( ( PropertyListItem*)child )->currentIntItem() ) ); + else if ( child->name() == i18n( "horizontalStretch" ) ) + sp.setHorStretch( ( ( PropertyIntItem*)child )->value().toInt() ); + else if ( child->name() == i18n( "verticalStretch" ) ) + sp.setVerStretch( ( ( PropertyIntItem*)child )->value().toInt() ); + setValue( sp ); + notifyValueChange(); +} + +bool PropertySizePolicyItem::hasSubItems() const +{ + return TRUE; +} + +// -------------------------------------------------------------- + +PropertyPaletteItem::PropertyPaletteItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName ) + : PropertyItem( l, after, prop, propName ) +{ + box = new TQHBox( listview->viewport() ); + box->hide(); + palettePrev = new TQLabel( box ); + button = new TQPushButton( "...", box ); + setupStyle( button ); + button->setFixedWidth( 20 ); + box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); + box->setLineWidth( 2 ); + palettePrev->setFrameStyle( TQFrame::NoFrame ); + box->installEventFilter( listview ); + connect( button, TQT_SIGNAL( clicked() ), + this, TQT_SLOT( getPalette() ) ); +} +PropertyPaletteItem::~PropertyPaletteItem() +{ + delete (TQHBox*)box; +} + +void PropertyPaletteItem::showEditor() +{ + PropertyItem::showEditor(); + placeEditor( box ); + if ( !box->isVisible() ) { + box->show(); + listView()->viewport()->setFocus(); + } +} + +void PropertyPaletteItem::hideEditor() +{ + PropertyItem::hideEditor(); + box->hide(); +} + +void PropertyPaletteItem::setValue( const TQVariant &v ) +{ + TQString s; + palettePrev->setPalette( v.toPalette() ); + PropertyItem::setValue( v ); + repaint(); +} + +void PropertyPaletteItem::getPalette() +{ + if ( !listview->propertyEditor()->widget()->isWidgetType() ) + return; + bool ok = FALSE; + TQWidget *w = (TQWidget*)listview->propertyEditor()->widget(); + if ( ::tqqt_cast(w) ) + w = ( (TQScrollView*)w )->viewport(); + TQPalette pal = PaletteEditor::getPalette( &ok, val.toPalette(), +#if defined(TQT_NON_COMMERCIAL) + w->backgroundMode(), listview->topLevelWidget(), +#else + w->backgroundMode(), listview, +#endif + "choose_palette", listview->propertyEditor()->formWindow() ); + if ( !ok ) + return; + setValue( pal ); + notifyValueChange(); +} + +bool PropertyPaletteItem::hasCustomContents() const +{ + return TRUE; +} + +void PropertyPaletteItem::drawCustomContents( TQPainter *p, const TQRect &r ) +{ + TQPalette pal( value().toPalette() ); + p->save(); + p->setClipRect( TQRect( TQPoint( (int)(p->worldMatrix().dx() + r.x()), + (int)(p->worldMatrix().dy() + r.y()) ), + r.size() ) ); + TQRect r2( r ); + r2.setX( r2.x() + 2 ); + r2.setY( r2.y() + 2 ); + r2.setWidth( r2.width() - 3 ); + r2.setHeight( r2.height() - 3 ); + p->setPen( TQPen( black, 1 ) ); + p->setBrush( pal.active().background() ); + p->drawRect( r2 ); + p->restore(); +} + +// -------------------------------------------------------------- + +PropertyCursorItem::PropertyCursorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, + const TQString &propName ) + : PropertyItem( l, after, prop, propName ) +{ + comb = 0; +} + +TQComboBox *PropertyCursorItem::combo() +{ + if ( comb ) + return comb; + comb = new TQComboBox( FALSE, listview->viewport() ); + comb->hide(); + TQBitmap cur; + + const TQPixmap ArrowPix = SmallIcon( "designer_arrow.png" , KDevDesignerPartFactory::instance()); + const TQPixmap UpArrowPix = SmallIcon( "designer_uparrow.png" , KDevDesignerPartFactory::instance()); + const TQPixmap CrossPix = SmallIcon( "designer_cross.png" , KDevDesignerPartFactory::instance()); + const TQPixmap WaitPix = SmallIcon( "designer_wait.png" , KDevDesignerPartFactory::instance()); + const TQPixmap IBeamPix = SmallIcon( "designer_ibeam.png" , KDevDesignerPartFactory::instance()); + const TQPixmap SizeVPix = SmallIcon( "designer_sizev.png" , KDevDesignerPartFactory::instance()); + const TQPixmap SizeHPix = SmallIcon( "designer_sizeh.png" , KDevDesignerPartFactory::instance()); + const TQPixmap SizeFPix = SmallIcon( "designer_sizef.png" , KDevDesignerPartFactory::instance()); + const TQPixmap SizeBPix = SmallIcon( "designer_sizeb.png" , KDevDesignerPartFactory::instance()); + const TQPixmap SizeAllPix = SmallIcon( "designer_sizeall.png" , KDevDesignerPartFactory::instance()); + const TQPixmap VSplitPix = SmallIcon( "designer_vsplit.png" , KDevDesignerPartFactory::instance()); + const TQPixmap HSplitPix = SmallIcon( "designer_hsplit.png" , KDevDesignerPartFactory::instance()); + const TQPixmap HandPix = SmallIcon( "designer_hand.png" , KDevDesignerPartFactory::instance()); + const TQPixmap NoPix = SmallIcon( "designer_no.png" , KDevDesignerPartFactory::instance()); + + comb->insertItem( ArrowPix, i18n("Arrow"), TQObject::ArrowCursor); + comb->insertItem( UpArrowPix, i18n("Up-Arrow"), TQObject::UpArrowCursor ); + comb->insertItem( CrossPix, i18n("Cross"), TQObject::CrossCursor ); + comb->insertItem( WaitPix, i18n("Waiting"), TQObject::WaitCursor ); + comb->insertItem( IBeamPix, i18n("iBeam"), TQObject::IbeamCursor ); + comb->insertItem( SizeVPix, i18n("SizeQt::Vertical"), TQObject::SizeVerCursor ); + comb->insertItem( SizeHPix, i18n("SizeQt::Horizontal"), TQObject::SizeHorCursor ); + comb->insertItem( SizeFPix, i18n("Size Slash"), TQObject::SizeBDiagCursor ); + comb->insertItem( SizeBPix, i18n("Size Backslash"), TQObject::SizeFDiagCursor ); + comb->insertItem( SizeAllPix, i18n("Size All"), TQObject::SizeAllCursor ); + cur = TQBitmap( 25, 25, 1 ); + cur.setMask( cur ); + comb->insertItem( cur, i18n("Blank"), TQObject::BlankCursor ); + comb->insertItem( VSplitPix, i18n("SplitQt::Vertical"), TQObject::SplitVCursor ); + comb->insertItem( HSplitPix, i18n("SplitQt::Horizontal"), TQObject::SplitHCursor ); + comb->insertItem( HandPix, i18n("Pointing Hand"), TQObject::PointingHandCursor ); + comb->insertItem( NoPix, i18n("Forbidden"), TQObject::ForbiddenCursor ); + + connect( comb, TQT_SIGNAL( activated( int ) ), + this, TQT_SLOT( setValue() ) ); + comb->installEventFilter( listview ); + return comb; +} + +PropertyCursorItem::~PropertyCursorItem() +{ + delete (TQComboBox*)comb; +} + +void PropertyCursorItem::showEditor() +{ + PropertyItem::showEditor(); + if ( !comb ) { + combo()->blockSignals( TRUE ); + combo()->setCurrentItem( (int)value().toCursor().shape() ); + combo()->blockSignals( FALSE ); + } + placeEditor( combo() ); + if ( !combo()->isVisible() || !combo()->hasFocus() ) { + combo()->show(); + setFocus( combo() ); + } +} + +void PropertyCursorItem::hideEditor() +{ + PropertyItem::hideEditor(); + combo()->hide(); +} + +void PropertyCursorItem::setValue( const TQVariant &v ) +{ + if ( ( !hasSubItems() || !isOpen() ) + && value() == v ) + return; + + combo()->blockSignals( TRUE ); + combo()->setCurrentItem( (int)v.toCursor().shape() ); + combo()->blockSignals( FALSE ); + setText( 1, combo()->currentText() ); + PropertyItem::setValue( v ); +} + +void PropertyCursorItem::setValue() +{ + if ( !comb ) + return; + if ( TQVariant( TQCursor( combo()->currentItem() ) ) == val ) + return; + setText( 1, combo()->currentText() ); + PropertyItem::setValue( TQCursor( combo()->currentItem() ) ); + notifyValueChange(); +} + +// -------------------------------------------------------------- + +PropertyKeysequenceItem::PropertyKeysequenceItem( PropertyList *l, + PropertyItem *after, + PropertyItem *prop, + const TQString &propName ) + : PropertyItem( l, after, prop, propName ), + k1( 0 ), k2( 0 ), k3( 0 ), k4( 0 ), num( 0 ), mouseEnter( FALSE ) +{ + box = new TQHBox( listview->viewport() ); + box->hide(); + sequence = new TQLineEdit( box ); + connect( sequence, TQT_SIGNAL(textChanged( const TQString & )), + this, TQT_SLOT(setValue()) ); + sequence->installEventFilter( this ); +} + +PropertyKeysequenceItem::~PropertyKeysequenceItem() +{ + delete (TQHBox*)box; +} + +void PropertyKeysequenceItem::showEditor() +{ + PropertyItem::showEditor(); + placeEditor( box ); + if ( !box->isVisible() ) { + box->show(); + sequence->setFocus(); + } +} + +void PropertyKeysequenceItem::hideEditor() +{ + PropertyItem::hideEditor(); + box->hide(); +} + +bool PropertyKeysequenceItem::eventFilter( TQObject *o, TQEvent *e ) +{ + Q_UNUSED( o ); + if ( e->type() == TQEvent::KeyPress ) { + TQKeyEvent *k = (TQKeyEvent *)e; + if ( !mouseEnter && + (k->key() == TQObject::Key_Up || + k->key() == TQObject::Key_Down) ) + return FALSE; + handleKeyEvent( k ); + return TRUE; + } else if ( (e->type() == TQEvent::FocusIn) || + (e->type() == TQEvent::MouseButtonPress) ) { + mouseEnter = ( listview->lastEvent() == PropertyList::MouseEvent ) || + (e->type() == TQEvent::MouseButtonPress); + return TRUE; + } + + // Lets eat accelerators now.. + if ( e->type() == TQEvent::Accel || + e->type() == TQEvent::AccelOverride || + e->type() == TQEvent::KeyRelease ) + return TRUE; + return FALSE; +} + +void PropertyKeysequenceItem::handleKeyEvent( TQKeyEvent *e ) +{ + int nextKey = e->key(); + + if ( num > 3 || + nextKey == TQObject::Key_Control || + nextKey == TQObject::Key_Shift || + nextKey == TQObject::Key_Meta || + nextKey == TQObject::Key_Alt ) + return; + + nextKey |= translateModifiers( e->state() ); + switch( num ) { + case 0: + k1 = nextKey; + break; + case 1: + k2 = nextKey; + break; + case 2: + k3 = nextKey; + break; + case 3: + k4 = nextKey; + break; + default: + break; + } + num++; + TQKeySequence ks( k1, k2, k3, k4 ); + sequence->setText( ks ); +} + +int PropertyKeysequenceItem::translateModifiers( int state ) +{ + int result = 0; + if ( state & TQObject::ShiftButton ) + result |= TQObject::SHIFT; + if ( state & TQObject::ControlButton ) + result |= TQObject::CTRL; + if ( state & TQObject::MetaButton ) + result |= TQObject::META; + if ( state & TQObject::AltButton ) + result |= TQObject::ALT; + return result; +} + +void PropertyKeysequenceItem::setValue() +{ + TQVariant v; + v = TQVariant( TQKeySequence(sequence->text()) ); + if ( v.toString().isNull() ) + return; + setText( 1, sequence->text() ); + PropertyItem::setValue( v ); + if ( sequence->hasFocus() ) + notifyValueChange(); + setChanged( TRUE ); +} + +void PropertyKeysequenceItem::setValue( const TQVariant &v ) +{ + TQKeySequence ks = v.toKeySequence(); + if ( sequence ) { + sequence->setText( ks ); + } + num = ks.count(); + k1 = ks[0]; + k2 = ks[1]; + k3 = ks[2]; + k4 = ks[3]; + setText( 1, ks ); + PropertyItem::setValue( v ); +} + +// -------------------------------------------------------------- + +EnumPopup::EnumPopup( TQWidget *parent, const char *name, WFlags f ) + : TQFrame( parent, name, f ) +{ + setLineWidth( 1 ); + setFrameStyle( Panel | Plain ); + setPaletteBackgroundColor( TQt::white ); + popLayout = new TQVBoxLayout( this, 3 ); + checkBoxList.setAutoDelete( TRUE ); +} + +EnumPopup::~EnumPopup() +{ +} + +void EnumPopup::insertEnums( TQValueList lst ) +{ + while ( checkBoxList.count() ) + checkBoxList.removeFirst(); + + itemList = lst; + TQCheckBox *cb; + TQValueListConstIterator it = itemList.begin(); + for ( ; it != itemList.end(); ++it ) { + cb = new TQCheckBox( this ); + cb->setText( (*it).key ); + cb->setChecked( (*it).selected ); + if ( it == itemList.begin() ) + cb->setFocus(); + checkBoxList.append( cb ); + cb->resize( width(), cb->height() ); + popLayout->addWidget( cb ); + } +} + +void EnumPopup::keyPressEvent( TQKeyEvent *e ) +{ + if ( e->key() == Key_Escape ) { + hide(); + emit hidden(); + } else if ( e->key() == Key_Enter || e->key() == Key_Return ) { + closeWidget(); + } +} + +void EnumPopup::closeWidget() +{ + TQPtrListIterator it( checkBoxList ); + int i = 0; + while ( it.current() != 0 ) { + itemList[i].selected = (*it)->isChecked(); + ++it; + ++i; + } + close(); + emit closed(); +} + +TQValueList EnumPopup::enumList() const +{ + return itemList; +} + +EnumBox::EnumBox( TQWidget *parent, const char *name ) + : TQComboBox( parent, name ) +{ + pop = new EnumPopup( this, "popup", TQObject::WType_Popup ); + connect( pop, TQT_SIGNAL( hidden() ), this, TQT_SLOT( popupHidden() ) ); + connect( pop, TQT_SIGNAL( closed() ), this, TQT_SLOT( popupClosed() ) ); + popupShown = FALSE; + arrowDown = FALSE; +} + +void EnumBox::popupHidden() +{ + popupShown = FALSE; +} + +void EnumBox::popupClosed() +{ + popupShown = FALSE; + emit valueChanged(); +} + +void EnumBox::paintEvent( TQPaintEvent * ) +{ + TQPainter p( this ); + const TQColorGroup & g = colorGroup(); + p.setPen(g.text()); + + TQStyle::SFlags flags = TQStyle::Style_Default; + if (isEnabled()) + flags |= TQStyle::Style_Enabled; + if (hasFocus()) + flags |= TQStyle::Style_HasFocus; + + if ( width() < 5 || height() < 5 ) { + qDrawShadePanel( &p, rect().x(), rect().y(), rect().width(), rect().height(), g, FALSE, 2, + &g.brush( TQColorGroup::Button ) ); + return; + } + style().drawComplexControl( TQStyle::CC_ComboBox, &p, this, rect(), g, + flags, TQStyle::SC_All, + (arrowDown ? + TQStyle::SC_ComboBoxArrow : + TQStyle::SC_None )); + + TQRect re = style().querySubControlMetrics( TQStyle::CC_ComboBox, this, + TQStyle::SC_ComboBoxEditField ); + re = TQStyle::visualRect(re, this); + p.setClipRect( re ); + + if ( !str.isNull() ) { + p.save(); + p.setFont(font()); + TQFontMetrics fm(font()); + int x = re.x(), y = re.y() + fm.ascent(); + p.drawText( x, y, str ); + p.restore(); + } +} + +void EnumBox::insertEnums( TQValueList lst ) +{ + pop->insertEnums( lst ); +} + +TQValueList EnumBox::enumList() const +{ + return pop->enumList(); +} + +void EnumBox::popup() +{ + if ( popupShown ) { + pop->closeWidget(); + popupShown = FALSE; + return; + } + pop->move( ((TQWidget*)parent())->mapToGlobal( geometry().bottomLeft() ) ); + pop->setMinimumWidth( width() ); + emit aboutToShowPopup(); + pop->show(); + popupShown = TRUE; +} + +void EnumBox::mousePressEvent( TQMouseEvent *e ) +{ + if ( e->button() != Qt::LeftButton ) + return; + + TQRect arrowRect = style().querySubControlMetrics( TQStyle::CC_ComboBox, this, + TQStyle::SC_ComboBoxArrow); + arrowRect = TQStyle::visualRect(arrowRect, this); + + arrowRect.setHeight( TQMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) ); + + if ( arrowRect.contains( e->pos() ) ) { + arrowDown = TRUE; + repaint( FALSE ); + } + + popup(); + TQTimer::singleShot( 100, this, TQT_SLOT( restoreArrow() ) ); +} + +void EnumBox::keyPressEvent( TQKeyEvent *e ) +{ + if ( e->key() == Key_Space ) { + popup(); + TQTimer::singleShot( 100, this, TQT_SLOT( restoreArrow() ) ); + } else if ( e->key() == Key_Enter || e->key() == Key_Return ) { + popup(); + } +} + +void EnumBox::restoreArrow() +{ + arrowDown = FALSE; + repaint( FALSE ); +} + +void EnumBox::setText( const TQString &text ) +{ + str = text; + repaint( FALSE ); +} + + + +PropertyEnumItem::PropertyEnumItem( PropertyList *l, + PropertyItem *after, + PropertyItem *prop, + const TQString &propName ) + : PropertyItem( l, after, prop, propName ) +{ + box = new EnumBox( listview->viewport() ); + box->hide(); + box->installEventFilter( listview ); + connect( box, TQT_SIGNAL( aboutToShowPopup() ), this, TQT_SLOT( insertEnums() ) ); + connect( box, TQT_SIGNAL( valueChanged() ), this, TQT_SLOT( setValue() ) ); +} + +PropertyEnumItem::~PropertyEnumItem() +{ + delete (EnumBox*)box; +} + +void PropertyEnumItem::showEditor() +{ + PropertyItem::showEditor(); + placeEditor( box ); + if ( !box->isVisible() ) { + box->show(); + box->setText( enumString ); + listView()->viewport()->setFocus(); + } + box->setFocus(); +} + +void PropertyEnumItem::hideEditor() +{ + PropertyItem::hideEditor(); + box->hide(); +} + +void PropertyEnumItem::setValue( const TQVariant &v ) +{ + enumString = ""; + enumList.clear(); + TQStringList lst = v.toStringList(); + TQValueListConstIterator it = lst.begin(); + for ( ; it != lst.end(); ++it ) + enumList.append( EnumItem( *it, FALSE ) ); + enumList.first().selected = TRUE; + enumString = enumList.first().key; + box->setText( enumString ); + setText( 1, enumString ); + PropertyItem::setValue( v ); +} + +void PropertyEnumItem::insertEnums() +{ + box->insertEnums( enumList ); +} + +void PropertyEnumItem::setValue() +{ + enumList = box->enumList(); + enumString = ""; + TQValueListConstIterator it = enumList.begin(); + for ( ; it != enumList.end(); ++it ) { + if ( (*it).selected ) + enumString += "|" + (*it).key; + } + if ( !enumString.isEmpty() ) + enumString.replace( 0, 1, "" ); + + box->setText( enumString ); + setText( 1, enumString ); + notifyValueChange(); +} + +void PropertyEnumItem::setCurrentValues( TQStrList lst ) +{ + enumString =""; + TQStrList::ConstIterator it = lst.begin(); + TQValueList::Iterator eit = enumList.begin(); + for ( ; eit != enumList.end(); ++eit ) { + (*eit).selected = FALSE; + for ( it = lst.begin(); it != lst.end(); ++it ) { + if ( TQString( *it ) == (*eit).key ) { + (*eit).selected = TRUE; + enumString += "|" + (*eit).key; + break; + } + } + } + if ( !enumString.isEmpty() ) + enumString.replace( 0, 1, "" ); + box->setText( enumString ); + setText( 1, enumString ); +} + +TQString PropertyEnumItem::currentItem() const +{ + return enumString; +} + +TQString PropertyEnumItem::currentItemFromObject() const +{ + return enumString; +} + +// -------------------------------------------------------------- + +/*! + \class PropertyList propertyeditor.h + \brief PropertyList is a TQListView derived class which is used for editing widget properties + + This class is used for widget properties. It has to be child of a + PropertyEditor. + + To initialize it for editing a widget call setupProperties() which + iterates through the properties of the current widget (see + PropertyEditor::widget()) and builds the list. + + To update the item values, refetchData() can be called. + + If the value of an item has been changed by the user, and this + change should be applied to the widget's property, valueChanged() + has to be called. + + To set the value of an item, setPropertyValue() has to be called. +*/ + +PropertyList::PropertyList( PropertyEditor *e ) + : TQListView( e ), editor( e ) +{ + init_colors(); + + whatsThis = new PropertyWhatsThis( this ); + showSorted = FALSE; + header()->setMovingEnabled( FALSE ); + header()->setStretchEnabled( TRUE ); + setResizePolicy( TQScrollView::Manual ); + viewport()->setAcceptDrops( TRUE ); + viewport()->installEventFilter( this ); + addColumn( i18n( "Property" ) ); + addColumn( i18n( "Value" ) ); + connect( header(), TQT_SIGNAL( sizeChange( int, int, int ) ), + this, TQT_SLOT( updateEditorSize() ) ); + disconnect( header(), TQT_SIGNAL( sectionClicked( int ) ), + this, TQT_SLOT( changeSortColumn( int ) ) ); + connect( header(), TQT_SIGNAL( sectionClicked( int ) ), + this, TQT_SLOT( toggleSort() ) ); + connect( this, TQT_SIGNAL( pressed( TQListViewItem *, const TQPoint &, int ) ), + this, TQT_SLOT( itemPressed( TQListViewItem *, const TQPoint &, int ) ) ); + connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), + this, TQT_SLOT( toggleOpen( TQListViewItem * ) ) ); + setSorting( -1 ); + setHScrollBarMode( AlwaysOff ); + setVScrollBarMode( AlwaysOn ); + setColumnWidthMode( 1, Manual ); + mousePressed = FALSE; + pressItem = 0; + theLastEvent = MouseEvent; + header()->installEventFilter( this ); +} + +void PropertyList::toggleSort() +{ + showSorted = !showSorted; + editor->clear(); + editor->setup(); +} + +void PropertyList::resizeEvent( TQResizeEvent *e ) +{ + TQListView::resizeEvent( e ); + if ( currentItem() ) + ( ( PropertyItem* )currentItem() )->showEditor(); +} + +static TQVariant::Type type_to_variant( const TQString &s ) +{ + if ( s == "Invalid " ) + return TQVariant::Invalid; + if ( s == "Map" ) + return TQVariant::Map; + if ( s == "List" ) + return TQVariant::List; + if ( s == "String" ) + return TQVariant::String; + if ( s == "StringList" ) + return TQVariant::StringList; + if ( s == "Font" ) + return TQVariant::Font; + if ( s == "Pixmap" ) + return TQVariant::Pixmap; + if ( s == "Brush" ) + return TQVariant::Brush; + if ( s == "Rect" ) + return TQVariant::Rect; + if ( s == "Size" ) + return TQVariant::Size; + if ( s == "Color" ) + return TQVariant::Color; + if ( s == "Palette" ) + return TQVariant::Palette; + if ( s == "ColorGroup" ) + return TQVariant::ColorGroup; + if ( s == "IconSet" ) + return TQVariant::IconSet; + if ( s == "Point" ) + return TQVariant::Point; + if ( s == "Image" ) + return TQVariant::Image; + if ( s == "Int" ) + return TQVariant::Int; + if ( s == "UInt" ) + return TQVariant::UInt; + if ( s == "Bool" ) + return TQVariant::Bool; + if ( s == "Double" ) + return TQVariant::Double; + if ( s == "CString" ) + return TQVariant::CString; + if ( s == "PointArray" ) + return TQVariant::PointArray; + if ( s == "Region" ) + return TQVariant::Region; + if ( s == "Bitmap" ) + return TQVariant::Bitmap; + if ( s == "Cursor" ) + return TQVariant::Cursor; + if ( s == "SizePolicy" ) + return TQVariant::SizePolicy; + if ( s == "Date" ) + return TQVariant::Date; + if ( s == "Time" ) + return TQVariant::Time; + if ( s == "DateTime" ) + return TQVariant::DateTime; + return TQVariant::Invalid; +} + +#ifndef TQT_NO_SQL +static bool parent_is_data_aware( TQWidget *w ) +{ + TQWidget *p = w ? w->parentWidget() : 0; + while ( p && !p->isTopLevel() ) { + if ( ::tqqt_cast(p) || ::tqqt_cast(p) ) + return TRUE; + p = p->parentWidget(); + } + return FALSE; +} +#endif + +/*! Sets up the property list by adding an item for each designable +property of the widget which is just edited. +*/ + +void PropertyList::setupProperties() +{ + if ( !editor->widget() ) + return; + bool allProperties = !::tqqt_cast(editor->widget()); + TQStrList lst = editor->widget()->metaObject()->propertyNames( allProperties ); + PropertyItem *item = 0; + TQMap unique; + TQObject *w = editor->widget(); + TQStringList valueSet; + bool parentHasLayout = + w->isWidgetType() && + !editor->formWindow()->isMainContainer( TQT_TQOBJECT(w) ) && ( (TQWidget*)w )->parentWidget() && + WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout; + for ( TQPtrListIterator it( lst ); it.current(); ++it ) { + const TQMetaProperty* p = + editor->widget()->metaObject()-> + property( editor->widget()->metaObject()->findProperty( it.current(), allProperties), allProperties ); + if ( !p ) + continue; + if ( unique.contains( TQString::fromLatin1( it.current() ) ) ) + continue; + if ( ::tqqt_cast(editor->widget()) || + ::tqqt_cast(editor->widget()) ) { + if ( qstrcmp( p->name(), "minimumHeight" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "minimumWidth" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "maximumHeight" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "maximumWidth" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "geometry" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "sizePolicy" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "minimumSize" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "maximumSize" ) == 0 ) + continue; + } + unique.insert( TQString::fromLatin1( it.current() ), TRUE ); + if ( editor->widget()->isWidgetType() && + editor->formWindow()->isMainContainer( TQT_TQOBJECT(editor->widget()) ) ) { + if ( qstrcmp( p->name(), "geometry" ) == 0 ) + continue; + } else { // hide some toplevel-only stuff + if ( qstrcmp( p->name(), "icon" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "iconText" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "caption" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "sizeIncrement" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "baseSize" ) == 0 ) + continue; + if ( parentHasLayout && qstrcmp( p->name(), "geometry" ) == 0 ) + continue; + if ( ::tqqt_cast(w) || ::tqqt_cast(w) ) { + if ( qstrcmp( p->name(), "sizePolicy" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "minimumHeight" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "minimumWidth" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "maximumHeight" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "maximumWidth" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "geometry" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "minimumSize" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "maximumSize" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "enabled" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "paletteForegroundColor" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "paletteBackgroundColor" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "paletteBackgroundPixmap" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "palette" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "font" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "cursor" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "mouseTracking" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "focusPolicy" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "acceptDrops" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "autoMask" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "backgroundOrigin" ) == 0 ) + continue; + } + } + if ( ::tqqt_cast(w) ) { + if ( qstrcmp( p->name(), "usesDropDown" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "toggleAction" ) == 0 ) + continue; + } + if ( qstrcmp( p->name(), "minimumHeight" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "minimumWidth" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "maximumHeight" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "maximumWidth" ) == 0 ) + continue; + if ( qstrcmp( p->name(), "buttonGroupId" ) == 0 ) { // #### remove this when designable in TQ_PROPERTY can take a function (isInButtonGroup() in this case) + if ( !editor->widget()->isWidgetType() || + !editor->widget()->parent() || + !::tqqt_cast(editor->widget()->parent()) ) + continue; + } + + bool isPropertyObject = w->isA( "PropertyObject" ); + + if ( ( p->designable(w) || + isPropertyObject && p->designable( ( (PropertyObject*)w )->widgetList().first() ) ) && + ( !isPropertyObject || qstrcmp( p->name(), "name" ) != 0 ) ) { + if ( p->isSetType() ) { + if ( TQString( p->name() ) == "alignment" ) { + TQStringList lst; + lst << p->valueToKey( AlignAuto ) + << p->valueToKey( AlignLeft ) + << p->valueToKey( AlignHCenter ) + << p->valueToKey( AlignRight ) + << p->valueToKey( AlignJustify ); + item = new PropertyListItem( this, item, 0, "hAlign", FALSE ); + item->setValue( lst ); + setPropertyValue( item ); + if ( MetaDataBase::isPropertyChanged( editor->widget(), "hAlign" ) ) + item->setChanged( TRUE, FALSE ); + if ( !::tqqt_cast(editor->widget()) ) { + lst.clear(); + lst << p->valueToKey( AlignTop ) + << p->valueToKey( AlignVCenter ) + << p->valueToKey( AlignBottom ); + item = new PropertyListItem( this, item, 0, "vAlign", FALSE ); + item->setValue( lst ); + setPropertyValue( item ); + if ( MetaDataBase::isPropertyChanged( editor->widget(), "vAlign" ) ) + item->setChanged( TRUE, FALSE ); + item = new PropertyBoolItem( this, item, 0, "wordwrap" ); + if ( ::tqqt_cast(w) ) + item->setVisible( FALSE ); + setPropertyValue( item ); + if ( MetaDataBase::isPropertyChanged( editor->widget(), "wordwrap" ) ) + item->setChanged( TRUE, FALSE ); + } + } else { + TQStrList lst( p->enumKeys() ); + TQStringList l; + TQPtrListIterator it( lst ); + while ( it.current() != 0 ) { + l << TQString(*it); + ++it; + } + item = new PropertyEnumItem( this, item, 0, p->name() ); + item->setValue( l ); + setPropertyValue( item ); + if ( MetaDataBase::isPropertyChanged( editor->widget(), p->name() ) ) + item->setChanged( TRUE, FALSE ); + } + } else if ( p->isEnumType() ) { + TQStrList l = p->enumKeys(); + TQStringList lst; + for ( uint i = 0; i < l.count(); ++i ) { + TQString k = l.at( i ); + // filter out enum-masks + if ( k[0] == 'M' && k[1].category() == TQChar::Letter_Uppercase ) + continue; + lst << k; + } + item = new PropertyListItem( this, item, 0, p->name(), FALSE ); + item->setValue( lst ); + } else { + TQVariant::Type t = TQVariant::nameToType( p->type() ); + if ( !addPropertyItem( item, p->name(), t ) ) + continue; + } + } + if ( item && !p->isSetType() ) { + if ( valueSet.findIndex( item->name() ) == -1 ) { + setPropertyValue( item ); + valueSet << item->name(); + } + if ( MetaDataBase::isPropertyChanged( editor->widget(), p->name() ) ) + item->setChanged( TRUE, FALSE ); + } + } + + if ( !::tqqt_cast(w) && !::tqqt_cast(w) && !::tqqt_cast(w) && + w->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) { + item = new PropertyLayoutItem( this, item, 0, "layoutSpacing" ); + setPropertyValue( item ); + if ( MetaDataBase::isPropertyChanged( editor->widget(), "layoutSpacing" ) + || MetaDataBase::spacing( editor->widget() ) != -1 ) + layoutInitValue( item, TRUE ); + else + layoutInitValue( item ); + item = new PropertyLayoutItem( this, item, 0, "layoutMargin" ); + setPropertyValue( item ); + if ( MetaDataBase::isPropertyChanged( editor->widget(), "layoutMargin" ) + || MetaDataBase::margin( editor->widget() ) != -1 ) + layoutInitValue( item, TRUE ); + else + layoutInitValue( item ); + TQWidget *widget = (TQWidget*)w; + if ( ( !::tqqt_cast(widget) && + widget->parentWidget() && ::tqqt_cast(widget->parentWidget()) ) ) { + item = new PropertyListItem( this, item, 0, "resizeMode", FALSE ); + TQStringList lst; + lst << "Auto" << "FreeResize" << "Minimum" << "Fixed"; + item->setValue( lst ); + setPropertyValue( item ); + TQString resizeMod = MetaDataBase::resizeMode( editor->widget() ); + if ( !resizeMod.isEmpty() && + resizeMod != WidgetFactory::defaultCurrentItem( editor->widget(), "resizeMode" ) ) { + item->setChanged( TRUE, FALSE ); + MetaDataBase::setPropertyChanged( editor->widget(), "resizeMode", TRUE ); + } + } + } + + if ( !::tqqt_cast(w) && !::tqqt_cast(w) && + !::tqqt_cast(w) && !::tqqt_cast(w) ) { + item = new PropertyTextItem( this, item, 0, "toolTip", TRUE, FALSE ); + setPropertyValue( item ); + if ( MetaDataBase::isPropertyChanged( editor->widget(), "toolTip" ) ) + item->setChanged( TRUE, FALSE ); + item = new PropertyTextItem( this, item, 0, "whatsThis", TRUE, TRUE ); + setPropertyValue( item ); + if ( MetaDataBase::isPropertyChanged( editor->widget(), "whatsThis" ) ) + item->setChanged( TRUE, FALSE ); + } + +#ifndef TQT_NO_SQL + if ( !::tqqt_cast(editor->widget()) && !::tqqt_cast(editor->widget()) && + !::tqqt_cast(editor->widget()) && parent_is_data_aware( ::tqqt_cast(editor->widget()) ) ) { + item = new PropertyDatabaseItem( this, item, 0, "database", TQT_BASE_OBJECT(editor->formWindow()->mainContainer()) != TQT_BASE_OBJECT(w) ); + setPropertyValue( item ); + if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) ) + item->setChanged( TRUE, FALSE ); + } + + if ( ::tqqt_cast(editor->widget()) || ::tqqt_cast(editor->widget()) || + ::tqqt_cast(editor->widget()) ) { + item = new PropertyDatabaseItem( this, item, 0, "database", FALSE ); + setPropertyValue( item ); + if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) ) + item->setChanged( TRUE, FALSE ); + item = new PropertyBoolItem( this, item, 0, "frameworkCode" ); + setPropertyValue( item ); + if ( MetaDataBase::isPropertyChanged( editor->widget(), "frameworkCode" ) ) + item->setChanged( TRUE, FALSE ); + } +#endif + + if ( w->isA("PropertyObject") ) { + const TQWidgetList wl = ( (PropertyObject*)w )->widgetList(); + TQPtrListIterator wIt( wl ); + while ( *wIt ) { + if ( (*wIt)->inherits("CustomWidget") ) { + MetaDataBase::CustomWidget *cw = ( (CustomWidget*)*wIt )->customWidget(); + setupCusWidgetProperties( cw, unique, item ); + } + ++wIt; + } + } else if ( w->inherits( "CustomWidget" ) ) { + MetaDataBase::CustomWidget *cw = ( (CustomWidget*)w )->customWidget(); + setupCusWidgetProperties( cw, unique, item ); + } + + setCurrentItem( firstChild() ); + + if ( showSorted ) { + setSorting( 0 ); + sort(); + setSorting( -1 ); + setCurrentItem( firstChild() ); + tqApp->processEvents(); + } + + updateEditorSize(); +} + +void PropertyList::setupCusWidgetProperties( MetaDataBase::CustomWidget *cw, + TQMap &unique, + PropertyItem *&item ) +{ + if ( !cw ) + return; + + for ( TQValueList::Iterator it = + cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) { + if ( unique.contains( TQString( (*it).property ) ) ) + continue; + unique.insert( TQString( (*it).property ), TRUE ); + addPropertyItem( item, (*it).property, type_to_variant( (*it).type ) ); + setPropertyValue( item ); + if ( MetaDataBase::isPropertyChanged( editor->widget(), (*it).property ) ) + item->setChanged( TRUE, FALSE ); + } +} + +bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name, TQVariant::Type t ) +{ + if ( name == "buddy" ) { + PropertyListItem *itm = new PropertyListItem( this, item, 0, name, TRUE ); + TQPtrDict *widgets = editor->formWindow()->widgets(); + TQPtrDictIterator it( *widgets ); + TQStringList l; + l << ""; + while ( it.current() ) { + if ( editor->formWindow()->canBeBuddy( it.current() ) ) { + if ( l.find( it.current()->name() ) == l.end() ) + l << it.current()->name(); + } + ++it; + } + l.sort(); + itm->setValue( l ); + item = itm; + return TRUE; + } + + switch ( t ) { + case TQVariant::String: + item = new PropertyTextItem( this, item, 0, name, TRUE, + ::tqqt_cast(editor->widget()) || + ::tqqt_cast(editor->widget()) || + ::tqqt_cast(editor->widget()) ); + break; + case TQVariant::CString: + item = new PropertyTextItem( this, item, 0, + name, name == "name" && + TQT_BASE_OBJECT(editor->widget()) == TQT_BASE_OBJECT(editor->formWindow()->mainContainer()), + FALSE, TRUE ); + break; + case TQVariant::Bool: + item = new PropertyBoolItem( this, item, 0, name ); + break; + case TQVariant::Font: + item = new PropertyFontItem( this, item, 0, name ); + break; + case TQVariant::Int: + if ( name == "accel" ) + item = new PropertyTextItem( this, item, 0, name, FALSE, FALSE, FALSE, TRUE ); + else if ( name == "layoutSpacing" || name == "layoutMargin" ) + item = new PropertyLayoutItem( this, item, 0, name ); + else if ( name == "resizeMode" ) + item = new PropertyListItem( this, item, 0, name, TRUE ); + else + item = new PropertyIntItem( this, item, 0, name, TRUE ); + break; + case TQVariant::Double: + item = new PropertyDoubleItem( this, item, 0, name ); + break; + case TQVariant::KeySequence: + item = new PropertyKeysequenceItem( this, item, 0, name ); + break; + case TQVariant::UInt: + item = new PropertyIntItem( this, item, 0, name, FALSE ); + break; + case TQVariant::StringList: + item = new PropertyListItem( this, item, 0, name, TRUE ); + break; + case TQVariant::Rect: + item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Rect ); + break; + case TQVariant::Point: + item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Point ); + break; + case TQVariant::Size: + item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Size ); + break; + case TQVariant::Color: + item = new PropertyColorItem( this, item, 0, name, TRUE ); + break; + case TQVariant::Pixmap: + item = new PropertyPixmapItem( this, item, 0, name, PropertyPixmapItem::Pixmap ); + break; + case TQVariant::IconSet: + item = new PropertyPixmapItem( this, item, 0, name, PropertyPixmapItem::IconSet ); + break; + case TQVariant::Image: + item = new PropertyPixmapItem( this, item, 0, name, PropertyPixmapItem::Image ); + break; + case TQVariant::SizePolicy: + item = new PropertySizePolicyItem( this, item, 0, name ); + break; + case TQVariant::Palette: + item = new PropertyPaletteItem( this, item, 0, name ); + break; + case TQVariant::Cursor: + item = new PropertyCursorItem( this, item, 0, name ); + break; + case TQVariant::Date: + item = new PropertyDateItem( this, item, 0, name ); + break; + case TQVariant::Time: + item = new PropertyTimeItem( this, item, 0, name ); + break; + case TQVariant::DateTime: + item = new PropertyDateTimeItem( this, item, 0, name ); + break; + default: + return FALSE; + } + return TRUE; +} + +void PropertyList::paintEmptyArea( TQPainter *p, const TQRect &r ) +{ + p->fillRect( r, *backColor2 ); +} + +void PropertyList::setCurrentItem( TQListViewItem *i ) +{ + if ( !i ) + return; + + if ( currentItem() ) + ( (PropertyItem*)currentItem() )->hideEditor(); + TQListView::setCurrentItem( i ); + ( (PropertyItem*)currentItem() )->showEditor(); +} + +void PropertyList::updateEditorSize() +{ + if ( currentItem() ) + ( ( PropertyItem* )currentItem() )->showEditor(); +} + +/*! This has to be called if the value if \a i should be set as + property to the currently edited widget. +*/ + +void PropertyList::valueChanged( PropertyItem *i ) +{ + if ( !editor->widget() ) + return; + TQString pn( i18n( "Set '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) ); + SetPropertyCommand *cmd = new SetPropertyCommand( pn, editor->formWindow(), + editor->widget(), editor, + i->name(), WidgetFactory::property( editor->widget(), i->name() ), + i->value(), i->currentItem(), i->currentItemFromObject() ); + + cmd->execute(); + editor->formWindow()->commandHistory()->addCommand( cmd, TRUE ); +} + +void PropertyList::layoutInitValue( PropertyItem *i, bool changed ) +{ + if ( !editor->widget() ) + return; + TQString pn( i18n( "Set '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) ); + SetPropertyCommand *cmd = new SetPropertyCommand( pn, editor->formWindow(), + editor->widget(), editor, + i->name(), WidgetFactory::property( editor->widget(), i->name() ), + i->value(), i->currentItem(), i->currentItemFromObject() ); + cmd->execute(); + if ( i->value().toString() != "-1" ) + changed = TRUE; + i->setChanged( changed ); +} + +void PropertyList::itemPressed( TQListViewItem *i, const TQPoint &p, int c ) +{ + if ( !i ) + return; + PropertyItem *pi = (PropertyItem*)i; + if ( !pi->hasSubItems() ) + return; + + if ( c == 0 && viewport()->mapFromGlobal( p ).x() < 20 ) + toggleOpen( i ); +} + +void PropertyList::toggleOpen( TQListViewItem *i ) +{ + if ( !i ) + return; + PropertyItem *pi = (PropertyItem*)i; + if ( pi->hasSubItems() ) { + pi->setOpen( !pi->isOpen() ); + } else { + pi->toggle(); + } +} + +bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) +{ + if ( !o || !e ) + return TRUE; + + PropertyItem *i = (PropertyItem*)currentItem(); + if ( e->type() == TQEvent::KeyPress ) + theLastEvent = KeyEvent; + else if ( e->type() == TQEvent::MouseButtonPress ) + theLastEvent = MouseEvent; + + if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this) &&e->type() == TQEvent::KeyPress ) { + TQKeyEvent *ke = (TQKeyEvent*)e; + if ( ( ke->key() == Key_Up || ke->key() == Key_Down ) && + ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this) || TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(viewport()) ) && + !( ke->state() & ControlButton ) ) { + TQApplication::sendEvent( this, (TQKeyEvent*)e ); + return TRUE; + } else if ( ( !::tqqt_cast(o) || + ( ::tqqt_cast(o) && ( (TQLineEdit*)o )->isReadOnly() ) ) && + i && i->hasSubItems() ) { + if ( !i->isOpen() && + ( ke->key() == Key_Plus || + ke->key() == Key_Right )) + i->setOpen( TRUE ); + else if ( i->isOpen() && + ( ke->key() == Key_Minus || + ke->key() == Key_Left ) ) + i->setOpen( FALSE ); + } else if ( ( ke->key() == Key_Return || ke->key() == Key_Enter ) && ::tqqt_cast(o) ) { + TQKeyEvent ke2( TQEvent::KeyPress, Key_Space, 0, 0 ); + TQApplication::sendEvent( o, &ke2 ); + return TRUE; + } + } else if ( e->type() == TQEvent::FocusOut && ::tqqt_cast(o) && editor->formWindow() ) { + TQTimer::singleShot( 100, editor->formWindow()->commandHistory(), TQT_SLOT( checkCompressedCommand() ) ); + } else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(viewport()) ) { + TQMouseEvent *me; + PropertyListItem* i; + switch ( e->type() ) { + case TQEvent::MouseButtonPress: + me = (TQMouseEvent*)e; + i = (PropertyListItem*) itemAt( me->pos() ); + if ( i && ( ::tqqt_cast(i) || ::tqqt_cast(i) ) ) { + pressItem = i; + pressPos = me->pos(); + mousePressed = TRUE; + } + break; + case TQEvent::MouseMove: + me = (TQMouseEvent*)e; + if ( me && me->state() & Qt::LeftButton && mousePressed) { + + i = (PropertyListItem*) itemAt( me->pos() ); + if ( i && i == pressItem ) { + + if (( pressPos - me->pos() ).manhattanLength() > TQApplication::startDragDistance() ){ + if ( ::tqqt_cast(i) ) { + TQColor col = i->value().asColor(); + TQColorDrag *drg = new TQColorDrag( col, this ); + TQPixmap pix( 25, 25 ); + pix.fill( col ); + TQPainter p( &pix ); + p.drawRect( 0, 0, pix.width(), pix.height() ); + p.end(); + drg->setPixmap( pix ); + mousePressed = FALSE; + drg->dragCopy(); + } + else if ( ::tqqt_cast(i) ) { + TQPixmap pix = i->value().asPixmap(); + if( !pix.isNull() ) { + TQImage img = pix.convertToImage(); + TQImageDrag *drg = new TQImageDrag( img, this ); + drg->setPixmap( pix ); + mousePressed = FALSE; + drg->dragCopy(); + } + } + } + } + } + break; + default: + break; + } + } else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(header()) ) { + if ( e->type() == TQEvent::ContextMenu ) { + ((TQContextMenuEvent *)e)->accept(); + TQPopupMenu menu( 0 ); + menu.setCheckable( TRUE ); + const int cat_id = 1; + const int alpha_id = 2; + menu.insertItem( i18n( "Sort &Categorized" ), cat_id ); + int alpha = menu.insertItem( i18n( "Sort &Alphabetically" ), alpha_id ); + if ( showSorted ) + menu.setItemChecked( alpha_id, TRUE ); + else + menu.setItemChecked( cat_id, TRUE ); + int res = menu.exec( ( (TQContextMenuEvent*)e )->globalPos() ); + if ( res != -1 ) { + bool newShowSorted = ( res == alpha ); + if ( showSorted != newShowSorted ) { + showSorted = newShowSorted; + editor->clear(); + editor->setup(); + } + } + return TRUE; + } + } + + return TQListView::eventFilter( o, e ); +} + +/*! This method re-initializes each item of the property list. +*/ + +void PropertyList::refetchData() +{ + TQListViewItemIterator it( this ); + for ( ; it.current(); ++it ) { + PropertyItem *i = (PropertyItem*)it.current(); + if ( !i->propertyParent() ) + setPropertyValue( i ); + if ( i->hasSubItems() ) + i->initChildren(); + bool changed = MetaDataBase::isPropertyChanged( editor->widget(), i->name() ); + if ( ( i->name() == "layoutSpacing" || i->name() == "layoutMargin" ) ) { + if ( i->value().toString() != "-1" ) + i->setChanged( TRUE, FALSE ); + else + i->setChanged( FALSE, FALSE ); + } + else if ( changed != i->isChanged() ) + i->setChanged( changed, FALSE ); + } + updateEditorSize(); +} + +static void clearAlignList( TQStrList &l ) +{ + if ( l.count() == 1 ) + return; + if ( l.find( "AlignAuto" ) != -1 ) + l.remove( "AlignAuto" ); + if ( l.find( "WordBreak" ) != -1 ) + l.remove( "WordBreak" ); +} + +/*! This method initializes the value of the item \a i to the value + of the corresponding property. +*/ + +void PropertyList::setPropertyValue( PropertyItem *i ) +{ + const TQMetaProperty *p = + editor->widget()->metaObject()-> + property( editor->widget()->metaObject()->findProperty( i->name(), TRUE), TRUE ); + if ( !p ) { + if ( i->name() == "hAlign" ) { + int align = editor->widget()->property( "alignment" ).toInt(); + p = editor->widget()->metaObject()-> + property( editor->widget()->metaObject()->findProperty( "alignment", TRUE ), TRUE ); + align &= ~AlignVertical_Mask; + TQStrList l = p->valueToKeys( align ); + clearAlignList( l ); + ( (PropertyListItem*)i )->setCurrentItem( l.last() ); + } else if ( i->name() == "vAlign" ) { + int align = editor->widget()->property( "alignment" ).toInt(); + p = editor->widget()->metaObject()-> + property( editor->widget()->metaObject()->findProperty( "alignment", TRUE ), TRUE ); + align &= ~AlignHorizontal_Mask; + ( (PropertyListItem*)i )->setCurrentItem( p->valueToKeys( align ).last() ); + } else if ( i->name() == "wordwrap" ) { + int align = editor->widget()->property( "alignment" ).toInt(); + if ( align & WordBreak ) + i->setValue( TQVariant( TRUE, 0 ) ); + else + i->setValue( TQVariant( FALSE, 0 ) ); + } else if ( i->name() == "layoutSpacing" ) { + ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::spacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) ) ) )); + } else if ( i->name() == "layoutMargin" ) { + ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::margin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) ) ) )); + } else if ( i->name() == "resizeMode" ) { + ( (PropertyListItem*)i )->setCurrentItem( MetaDataBase::resizeMode( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) ) )) ); + } else if ( i->name() == "toolTip" || i->name() == "whatsThis" || i->name() == "database" || i->name() == "frameworkCode" ) { + i->setValue( MetaDataBase::fakeProperty( editor->widget(), i->name() ) ); + } else if ( editor->widget()->inherits( "CustomWidget" ) ) { + MetaDataBase::CustomWidget *cw = ( (CustomWidget*)editor->widget() )->customWidget(); + if ( !cw ) + return; + i->setValue( MetaDataBase::fakeProperty( editor->widget(), i->name() ) ); + } + return; + } + if ( p->isSetType() ) + ( (PropertyEnumItem*)i )->setCurrentValues( p->valueToKeys( editor->widget()->property( i->name() ).toInt() ) ); + else if ( p->isEnumType() ) + ( (PropertyListItem*)i )->setCurrentItem( p->valueToKey( editor->widget()->property( i->name() ).toInt() ) ); + else if ( qstrcmp( p->name(), "buddy" ) == 0 ) + ( (PropertyListItem*)i )->setCurrentItem( editor->widget()->property( i->name() ).toString() ); + else + i->setValue( editor->widget()->property( i->name() ) ); +} + +void PropertyList::setCurrentProperty( const TQString &n ) +{ + if ( currentItem() && currentItem()->text( 0 ) == n || + currentItem() && ( (PropertyItem*)currentItem() )->propertyParent() && + ( (PropertyItem*)currentItem() )->propertyParent()->text( 0 ) == n ) + return; + + TQListViewItemIterator it( this ); + for ( ; it.current(); ++it ) { + if ( it.current()->text( 0 ) == n ) { + setCurrentItem( it.current() ); + break; + } + } +} + +PropertyEditor *PropertyList::propertyEditor() const +{ + return editor; +} + +void PropertyList::resetProperty() +{ + if ( !currentItem() ) + return; + PropertyItem *i = (PropertyItem*)currentItem(); + if ( !MetaDataBase::isPropertyChanged( editor->widget(), i->PropertyItem::name() ) ) + return; + TQString pn( i18n( "Reset '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) ); + SetPropertyCommand *cmd = new SetPropertyCommand( pn, editor->formWindow(), + editor->widget(), editor, + i->name(), i->value(), + WidgetFactory::defaultValue( editor->widget(), i->name() ), + WidgetFactory::defaultCurrentItem( editor->widget(), i->name() ), + i->currentItem(), TRUE ); + cmd->execute(); + editor->formWindow()->commandHistory()->addCommand( cmd, FALSE ); + if ( i->hasSubItems() ) + i->initChildren(); +} + +void PropertyList::viewportDragEnterEvent( TQDragEnterEvent *e ) +{ + PropertyListItem *i = (PropertyListItem*) itemAt( e->pos() ); + if( !i ) { + e->ignore(); + return; + } + + if ( ::tqqt_cast(i) && TQColorDrag::canDecode( e ) ) + e->accept(); + else if ( ::tqqt_cast(i) && TQImageDrag::canDecode( e ) ) + e->accept(); + else + e->ignore(); +} + +void PropertyList::viewportDragMoveEvent ( TQDragMoveEvent *e ) +{ + PropertyListItem *i = (PropertyListItem*) itemAt( e->pos() ); + if( !i ) { + e->ignore(); + return; + } + + if ( ::tqqt_cast(i) && TQColorDrag::canDecode( e ) ) + e->accept(); + else if ( ::tqqt_cast(i) && TQImageDrag::canDecode( e ) ) + e->accept(); + else + e->ignore(); +} + +void PropertyList::viewportDropEvent ( TQDropEvent *e ) +{ + PropertyListItem *i = (PropertyListItem*) itemAt( e->pos() ); + if( !i ) { + e->ignore(); + return; + } + + if ( ::tqqt_cast(i) && TQColorDrag::canDecode( e ) ) { + TQColor color; + TQColorDrag::decode( e, color ); + i->setValue( TQVariant( color ) ); + valueChanged( i ); + e->accept(); + } + else if ( ::tqqt_cast(i) && TQImageDrag::canDecode( e ) ) { + TQImage img; + TQImageDrag::decode( e, img ); + TQPixmap pm; + pm.convertFromImage( img ); + i->setValue( TQVariant( pm ) ); + valueChanged( i ); + e->accept(); + } + else + e->ignore(); +} + +TQString PropertyList::whatsThisAt( const TQPoint &p ) +{ + return whatsThisText( itemAt( p ) ); +} + +void PropertyList::showCurrentWhatsThis() +{ + if ( !currentItem() ) + return; + TQPoint p( 0, currentItem()->itemPos() ); + p = viewport()->mapToGlobal( contentsToViewport( p ) ); + TQWhatsThis::display( whatsThisText( currentItem() ), p, viewport() ); +} + +TQString PropertyList::whatsThisText( TQListViewItem *i ) +{ + if ( !i || !editor->widget() ) + return TQString(); + readPropertyDocs(); + if ( ( (PropertyItem*)i )->propertyParent() ) + i = ( (PropertyItem*)i )->propertyParent(); + + const TQMetaObject *mo = editor->widget()->metaObject(); + TQString prop = ( (PropertyItem*)i )->name(); + while ( mo ) { + TQString s; + s = TQString( mo->className() ) + "::" + prop; + TQMap::Iterator it; + if ( ( it = propertyDocs.find( s ) ) != propertyDocs.end() ) { + return *it; + } + mo = mo->superClass(); + } + + return i18n( "

    TQWidget::%1

    There is no documentation available for this property.

    " ).arg( prop ); +} + +void PropertyList::readPropertyDocs() +{ + if ( !propertyDocs.isEmpty() ) + return; + + TQString docFile = MainWindow::self->documentationPath() + "/propertydocs"; + TQFile f( docFile ); + if ( !f.open( IO_ReadOnly ) ) + return; + TQDomDocument doc; + TQString errMsg; + int errLine; + if ( !doc.setContent( &f, &errMsg, &errLine ) ) + return; + TQDomElement e = doc.firstChild().toElement().firstChild().toElement(); + + for ( ; !e.isNull(); e = e.nextSibling().toElement() ) { + TQDomElement n = e.firstChild().toElement(); + TQString name; + TQString doc; + for ( ; !n.isNull(); n = n.nextSibling().toElement() ) { + if ( n.tagName() == "name" ) + name = n.firstChild().toText().data(); + else if ( n.tagName() == "doc" ) + doc = n.firstChild().toText().data(); + } + doc.insert( 0, "

    " + name + "

    " ); + propertyDocs.insert( name, doc ); + } +} + +PropertyList::LastEventType PropertyList::lastEvent() +{ + return theLastEvent; +} +// ------------------------------------------------------------ + +EventList::EventList( TQWidget *parent, FormWindow *fw, PropertyEditor *e ) + : HierarchyList( parent, fw, TRUE ), editor( e ) +{ + header()->hide(); + removeColumn( 1 ); + setRootIsDecorated( TRUE ); + connect( this, TQT_SIGNAL( itemRenamed( TQListViewItem *, int, const TQString & ) ), + this, TQT_SLOT( renamed( TQListViewItem * ) ) ); +} + +TQString clean_arguments( const TQString &s ) +{ + TQString slot = s; + TQString arg = slot.mid( slot.find( '(' ) + 1 ); + arg = arg.left( arg.findRev( ')' ) ); + TQStringList args = TQStringList::split( ',', arg ); + slot = slot.left( slot.find( '(' ) + 1 ); + int num = 0; + for ( TQStringList::Iterator it = args.begin(); it != args.end(); ++it, ++num ) { + TQString a = *it; + int i; + if ( ( i =a.find( ':' ) ) == -1 ) + slot += a.simplifyWhiteSpace(); + else + slot += a.mid( i + 1 ).simplifyWhiteSpace(); + if ( num < (int)args.count() - 1 ) + slot += ","; + } + + slot += ")"; + + return slot; +} + + +void EventList::setup() +{ + clear(); + + if ( !formWindow ) + return; + LanguageInterface *iface = MetaDataBase::languageInterface( formWindow->project()->language() ); + const TQPixmap DesignerEditSlotsPix = SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance()); + TQStrList sigs; + if ( iface ) + { + sigs = iface->signalNames( editor->widget() ); + } + TQStrListIterator it( sigs ); + while ( it.current() ) { + HierarchyItem *eventItem = new HierarchyItem( HierarchyItem::Event, this, (HierarchyItem*)0, + it.current(), TQString(), TQString() ); + eventItem->setOpen( TRUE ); + TQValueList conns = + MetaDataBase::connections( TQT_TQOBJECT(formWindow), TQT_TQOBJECT(editor->widget()), TQT_TQOBJECT(formWindow->mainContainer()) ); + HierarchyItem *item = 0; + for ( TQValueList::Iterator cit = conns.begin(); + cit != conns.end(); ++cit ) { + TQString s = it.current(); + if ( MetaDataBase::normalizeFunction( clean_arguments( TQString( (*cit).signal ) ) ) != + MetaDataBase::normalizeFunction( clean_arguments( s ) ) ) + continue; + item = new HierarchyItem( HierarchyItem::EventFunction, eventItem, item, + (*cit).slot, TQString(), TQString() ); + item->setPixmap( 0, DesignerEditSlotsPix ); + } + ++it; + } +} + +extern TQListViewItem *newItem; + +void EventList::contentsMouseDoubleClickEvent( TQMouseEvent *e ) +{ + TQListViewItem *i = itemAt( contentsToViewport( e->pos() ) ); + if ( !i || i->parent() ) + return; + TQString s; + if ( !formWindow->project()->isCpp() ) { + TQString s1 = i->text( 0 ); + int pt = s1.find( "(" ); + if ( pt != -1 ) + s1 = s1.left( pt ); + s = TQString( editor->widget()->name() ) + "_" + s1; + } else { + s = TQString( editor->widget()->name() ) + "_" + i->text( 0 ); + } + + const TQPixmap DesignerEditSlotsPix = SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance()); + insertEntry( i, DesignerEditSlotsPix , s ); +} + +void EventList::setCurrent( TQWidget * ) +{ +} + +void EventList::objectClicked( TQListViewItem *i ) +{ + if ( !i || !i->parent() ) + return; +// formWindow->clearSelection(false); + formWindow->mainWindow()->part()->emitEditFunction(formWindow->fileName(), i->text( 0 )); +// formWindow->mainWindow()->editFunction( i->text( 0 ) ); +} + +void EventList::showRMBMenu( TQListViewItem *i, const TQPoint &pos ) +{ + if ( !i ) + return; + TQPopupMenu menu; + const int NEW_ITEM = 1; + const int DEL_ITEM = 2; + menu.insertItem( SmallIcon( "designer_filenew.png" , KDevDesignerPartFactory::instance()), i18n( "New Signal Handler" ), NEW_ITEM ); + menu.insertItem( SmallIcon( "designer_editcut.png" , KDevDesignerPartFactory::instance()), i18n( "Delete Signal Handler" ), DEL_ITEM ); + int res = menu.exec( pos ); + if ( res == NEW_ITEM ) { + TQString s; + if ( !formWindow->project()->isCpp() ) { + TQString s1 = ( i->parent() ? i->parent() : i )->text( 0 ); + int pt = s1.find( "(" ); + if ( pt != -1 ) + s1 = s1.left( pt ); + s = TQString( editor->widget()->name() ) + "_" + s1; + } else { + s = TQString( editor->widget()->name() ) + "_" + ( i->parent() ? i->parent() : i )->text( 0 ); + } + insertEntry( i->parent() ? i->parent() : i, SmallIcon( "designer_editslots.png" , KDevDesignerPartFactory::instance()), s ); + } else if ( res == DEL_ITEM && i->parent() ) { + MetaDataBase::Connection conn; + conn.sender = editor->widget(); + conn.receiver = TQT_TQOBJECT(formWindow->mainContainer()); + conn.signal = i->parent()->text( 0 ); + conn.slot = i->text( 0 ); + delete i; + RemoveConnectionCommand *cmd = new RemoveConnectionCommand( i18n( "Remove Connection" ), + formWindow, + conn ); + formWindow->commandHistory()->addCommand( cmd ); + cmd->execute(); + editor->formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); + } +} + +void EventList::renamed( TQListViewItem *i ) +{ + if ( newItem == i ) + newItem = 0; + if ( !i->parent() ) + return; + TQListViewItem *itm = i->parent()->firstChild(); + bool del = FALSE; + while ( itm ) { + if ( itm != i && itm->text( 0 ) == i->text( 0 ) ) { + del = TRUE; + break; + } + itm = itm->nextSibling(); + } + i->setRenameEnabled( 0, FALSE ); + if ( del ) { + delete i; + } else { + MetaDataBase::Connection conn; + conn.sender = editor->widget(); + conn.receiver = TQT_TQOBJECT(formWindow->mainContainer()); + conn.signal = i->parent()->text( 0 ); + conn.slot = i->text( 0 ); + AddConnectionCommand *cmd = new AddConnectionCommand( i18n( "Add Connection" ), + formWindow, + conn ); + formWindow->commandHistory()->addCommand( cmd ); + // #### we should look if the specified slot already + // exists and if we can connect to this one + TQString funcname = i->text( 0 ).latin1(); + if ( funcname.find( '(' ) == -1 ) { // try to create a signature + TQString sig = i->parent()->text( 0 ); + sig = sig.mid( sig.find( '(' ) + 1 ); + sig.remove( (int)sig.length() - 1, 1 ); + LanguageInterface *iface = MetaDataBase::languageInterface( formWindow->project()->language() ); + if ( iface ) + sig = iface->createArguments( sig.simplifyWhiteSpace() ); + funcname += "(" + sig + ")"; + } + + //normally add a function in kdevdesigner + AddFunctionCommand *cmd2 = new AddFunctionCommand( i18n( "Add Function" ), + formWindow, funcname.latin1(), "virtual", + "public", + "slot", formWindow->project()->language(), + "void" ); + +/* MetaDataBase::addFunction( formWindow, funcname.latin1(), "virtual", "public", + "slot", formWindow->project()->language(), "void" ); + editor->formWindow()->mainWindow()-> + editFunction( i->text( 0 ).left( i->text( 0 ).find( "(" ) ), TRUE );*/ + cmd->execute(); + cmd2->execute(); + editor->formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); + editor->formWindow()->formFile()->setModified( TRUE ); + } +} + +void EventList::save( TQListViewItem *p ) +{ + TQStringList lst; + TQListViewItem *i = p->firstChild(); + while ( i ) { + lst << i->text( 0 ); + i = i->nextSibling(); + } +} + +// -------------------------------------------------------------- + +/*! + \class PropertyEditor propertyeditor.h + \brief PropertyEdior toplevel window + + This is the toplevel window of the property editor which contains a + listview for editing properties. +*/ + +PropertyEditor::PropertyEditor( TQWidget *parent ) + : TQTabWidget( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | + WStyle_StaysOnTop | WStyle_Tool |WStyle_MinMax | WStyle_SysMenu ) +{ + setCaption( i18n( "Property Editor" ) ); + wid = 0; + formwindow = 0; + listview = new PropertyList( this ); + addTab( listview, i18n( "P&roperties" ) ); + eList = new EventList( this, formWindow(), this ); + addTab( eList, i18n( "Signa&l Handlers" ) ); +} + +TQObject *PropertyEditor::widget() const +{ + return wid; +} + +void PropertyEditor::setWidget( TQObject *w, FormWindow *fw ) +{ + if ( fw && fw->isFake() ) + w = fw->project()->objectForFakeForm( fw ); + eList->setFormWindow( fw ); + if ( w && w == wid ) { + // if there is no properties displayed then we really should show them. + // to do this check the number of properties in the list. + bool ret = (listview->childCount() > 0) ? TRUE : FALSE; + if ( wid->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)wid ) != WidgetFactory::NoLayout ) { + TQListViewItemIterator it( listview ); + ret = FALSE; + while ( it.current() ) { + if ( it.current()->text( 0 ) == "layoutSpacing" || it.current()->text( 0 ) == "layoutMargin" ) { + ret = TRUE; + break; + } + ++it; + } + } + if ( ret ) + return; + } + + if ( !w || !fw ) { + setCaption( i18n( "Property Editor" ) ); + clear(); + wid = 0; + formwindow = 0; + return; + } + + wid = w; + formwindow = fw; + setCaption( i18n( "Property Editor (%1)" ).arg( formwindow->name() ) ); + listview->viewport()->setUpdatesEnabled( FALSE ); + listview->setUpdatesEnabled( FALSE ); + clear(); + listview->viewport()->setUpdatesEnabled( TRUE ); + listview->setUpdatesEnabled( TRUE ); + setup(); +} + +void PropertyEditor::clear() +{ + listview->setContentsPos( 0, 0 ); + listview->clear(); + eList->setContentsPos( 0, 0 ); + eList->clear(); +} + +void PropertyEditor::setup() +{ + if ( !formwindow || !wid ) + return; + listview->viewport()->setUpdatesEnabled( FALSE ); + listview->setupProperties(); + listview->viewport()->setUpdatesEnabled( TRUE ); + listview->updateEditorSize(); + + if ( !wid->isA( "PropertyObject" ) ) { + eList->viewport()->setUpdatesEnabled( FALSE ); + eList->setup(); + eList->viewport()->setUpdatesEnabled( TRUE ); + } +} + +void PropertyEditor::refetchData() +{ + listview->refetchData(); +} + +void PropertyEditor::emitWidgetChanged() +{ + if ( formwindow && wid ) + formwindow->widgetChanged( wid ); +} + +void PropertyEditor::closed( FormWindow *w ) +{ + if ( w == formwindow ) { + formwindow = 0; + wid = 0; + clear(); + } +} + +void PropertyEditor::closeEvent( TQCloseEvent *e ) +{ + emit hidden(); + e->accept(); +} + +PropertyList *PropertyEditor::propertyList() const +{ + return listview; +} + +FormWindow *PropertyEditor::formWindow() const +{ + return formwindow; +} + +TQString PropertyEditor::currentProperty() const +{ + if ( !wid ) + return TQString(); + if ( ( (PropertyItem*)listview->currentItem() )->propertyParent() ) + return ( (PropertyItem*)listview->currentItem() )->propertyParent()->name(); + return ( (PropertyItem*)listview->currentItem() )->name(); +} + +TQString PropertyEditor::classOfCurrentProperty() const +{ + if ( !wid ) + return TQString(); + TQObject *o = wid; + TQString curr = currentProperty(); + TQMetaObject *mo = o->metaObject(); + while ( mo ) { + TQStrList props = mo->propertyNames( FALSE ); + if ( props.find( curr.latin1() ) != -1 ) + return mo->className(); + mo = mo->superClass(); + } + return TQString(); +} + +TQMetaObject* PropertyEditor::metaObjectOfCurrentProperty() const +{ + if ( !wid ) + return 0; + return wid->metaObject(); +} + +void PropertyEditor::resetFocus() +{ + if ( listview->currentItem() ) + ( (PropertyItem*)listview->currentItem() )->showEditor(); +} + +EventList *PropertyEditor::eventList() const +{ + return eList; +} + +void PropertyEditor::setPropertyEditorEnabled( bool b ) +{ + if ( !b ) + removePage( listview ); + else + insertTab( listview, i18n( "Property Editor" ), 0 ); + updateWindow(); +} + +void PropertyEditor::setSignalHandlersEnabled( bool b ) +{ + if ( !b ) + removePage( eList ); + else + insertTab( eList, i18n( "Signal Handlers" ), 0 ); + updateWindow(); +} + +void PropertyEditor::updateWindow() +{ + if ( isHidden() && count() ) { + parentWidget()->show(); + MainWindow::self->setAppropriate( (TQDockWindow*)parentWidget(), TRUE ); + } else if ( isShown() && !count() ) { + parentWidget()->hide(); + MainWindow::self->setAppropriate( (TQDockWindow*)parentWidget(), FALSE ); + } +} diff --git a/tdevdesigner/designer/propertyeditor.h b/kdevdesigner/designer/propertyeditor.h similarity index 100% rename from tdevdesigner/designer/propertyeditor.h rename to kdevdesigner/designer/propertyeditor.h diff --git a/tdevdesigner/designer/propertyobject.cpp b/kdevdesigner/designer/propertyobject.cpp similarity index 100% rename from tdevdesigner/designer/propertyobject.cpp rename to kdevdesigner/designer/propertyobject.cpp diff --git a/tdevdesigner/designer/propertyobject.h b/kdevdesigner/designer/propertyobject.h similarity index 100% rename from tdevdesigner/designer/propertyobject.h rename to kdevdesigner/designer/propertyobject.h diff --git a/tdevdesigner/designer/qcompletionedit.cpp b/kdevdesigner/designer/qcompletionedit.cpp similarity index 100% rename from tdevdesigner/designer/qcompletionedit.cpp rename to kdevdesigner/designer/qcompletionedit.cpp diff --git a/tdevdesigner/designer/qcompletionedit.h b/kdevdesigner/designer/qcompletionedit.h similarity index 100% rename from tdevdesigner/designer/qcompletionedit.h rename to kdevdesigner/designer/qcompletionedit.h diff --git a/tdevdesigner/designer/replacedialog.ui b/kdevdesigner/designer/replacedialog.ui similarity index 100% rename from tdevdesigner/designer/replacedialog.ui rename to kdevdesigner/designer/replacedialog.ui diff --git a/tdevdesigner/designer/replacedialog.ui.h b/kdevdesigner/designer/replacedialog.ui.h similarity index 100% rename from tdevdesigner/designer/replacedialog.ui.h rename to kdevdesigner/designer/replacedialog.ui.h diff --git a/kdevdesigner/designer/resource.cpp b/kdevdesigner/designer/resource.cpp new file mode 100644 index 00000000..a6285db5 --- /dev/null +++ b/kdevdesigner/designer/resource.cpp @@ -0,0 +1,3328 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "actiondnd.h" +#include "command.h" +#ifndef TQT_NO_SQL +#include "database.h" +#endif +#include "formfile.h" +#include "formwindow.h" +#include "mainwindow.h" +#include "menubareditor.h" +#include "metadatabase.h" +#include "pixmapcollection.h" +#include "popupmenueditor.h" +#include "project.h" +#include "resource.h" +#include "widgetfactory.h" + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef TQT_NO_TABLE +#include +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "kdevdesigner_part.h" + +static TQString makeIndent( int indent ) +{ + TQString s; + s.fill( ' ', indent * 4 ); + return s; +} + +static TQString entitize( const TQString &s, bool attribute = FALSE ) +{ + TQString s2 = s; + s2 = s2.replace( "&", "&" ); + s2 = s2.replace( ">", ">" ); + s2 = s2.replace( "<", "<" ); + if ( attribute ) { + s2 = s2.replace( "\"", """ ); + s2 = s2.replace( "'", "'" ); + } + return s2; +} + +#ifdef TQ_WS_MACX +static struct { + int key; + const char* name; +} keyname[] = { + { TQt::Key_Space, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Space" ) }, + { TQt::Key_Escape, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Esc" ) }, + { TQt::Key_Tab, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Tab" ) }, + { TQt::Key_Backtab, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Backtab" ) }, + { TQt::Key_Backspace, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Backspace" ) }, + { TQt::Key_Return, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Return" ) }, + { TQt::Key_Enter, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Enter" ) }, + { TQt::Key_Insert, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Ins" ) }, + { TQt::Key_Delete, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Del" ) }, + { TQt::Key_Pause, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Pause" ) }, + { TQt::Key_Print, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Print" ) }, + { TQt::Key_SysReq, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "SysReq" ) }, + { TQt::Key_Home, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Home" ) }, + { TQt::Key_End, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "End" ) }, + { TQt::Key_Left, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Left" ) }, + { TQt::Key_Up, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Up" ) }, + { TQt::Key_Right, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Right" ) }, + { TQt::Key_Down, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Down" ) }, + { TQt::Key_Prior, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "PgUp" ) }, + { TQt::Key_Next, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "PgDown" ) }, + { TQt::Key_CapsLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "CapsLock" ) }, + { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "NumLock" ) }, + { TQt::Key_ScrollLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "ScrollLock" ) }, + { TQt::Key_Menu, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Menu" ) }, + { TQt::Key_Help, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Help" ) }, + + // Multimedia keys + { TQt::Key_Back, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Back" ) }, + { TQt::Key_Forward, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Forward" ) }, + { TQt::Key_Stop, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Stop" ) }, + { TQt::Key_Refresh, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Refresh" ) }, + { TQt::Key_VolumeDown, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Volume Down" ) }, + { TQt::Key_VolumeMute, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Volume Mute" ) }, + { TQt::Key_VolumeUp, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Volume Up" ) }, + { TQt::Key_BassBoost, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Bass Boost" ) }, + { TQt::Key_BassUp, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Bass Up" ) }, + { TQt::Key_BassDown, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Bass Down" ) }, + { TQt::Key_TrebleUp, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Treble Up" ) }, + { TQt::Key_TrebleDown, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Treble Down" ) }, + { TQt::Key_MediaPlay, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Play" ) }, + { TQt::Key_MediaStop, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Stop" ) }, + { TQt::Key_MediaPrev, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Previous" ) }, + { TQt::Key_MediaNext, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Next" ) }, + { TQt::Key_MediaRecord, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Record" ) }, + { TQt::Key_HomePage, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Home" ) }, + { TQt::Key_Favorites, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Favorites" ) }, + { TQt::Key_Search, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Search" ) }, + { TQt::Key_Standby, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Standby" ) }, + { TQt::Key_OpenUrl, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Open URL" ) }, + { TQt::Key_LaunchMail, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch Mail" ) }, + { TQt::Key_LaunchMedia, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch Media" ) }, + { TQt::Key_Launch0, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (0)" ) }, + { TQt::Key_Launch1, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (1)" ) }, + { TQt::Key_Launch2, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (2)" ) }, + { TQt::Key_Launch3, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (3)" ) }, + { TQt::Key_Launch4, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (4)" ) }, + { TQt::Key_Launch5, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (5)" ) }, + { TQt::Key_Launch6, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (6)" ) }, + { TQt::Key_Launch7, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (7)" ) }, + { TQt::Key_Launch8, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (8)" ) }, + { TQt::Key_Launch9, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (9)" ) }, + { TQt::Key_LaunchA, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (A)" ) }, + { TQt::Key_LaunchB, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (B)" ) }, + { TQt::Key_LaunchC, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (C)" ) }, + { TQt::Key_LaunchD, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (D)" ) }, + { TQt::Key_LaunchE, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (E)" ) }, + { TQt::Key_LaunchF, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (F)" ) }, + + // -------------------------------------------------------------- + // More consistent namings + { TQt::Key_Print, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Print Screen" ) }, + { TQt::Key_Prior, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Page Up" ) }, + { TQt::Key_Next, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Page Down" ) }, + { TQt::Key_CapsLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Caps Lock" ) }, + { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Num Lock" ) }, + { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Number Lock" ) }, + { TQt::Key_ScrollLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Scroll Lock" ) }, + { TQt::Key_Insert, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Insert" ) }, + { TQt::Key_Delete, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Delete" ) }, + { TQt::Key_Escape, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Escape" ) }, + { TQt::Key_SysReq, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "System Request" ) }, + + { 0, 0 } +}; +#endif +static TQString platformNeutralKeySequence(const TQKeySequence &ks) +{ +#ifndef TQ_WS_MACX + return TQString(ks); +#else + uint k; + TQString str; + TQString p; + for (k = 0; k < ks.count(); ++k) { + int keycombo = ks[k]; + int basekey = keycombo & ~(TQt::SHIFT | TQt::CTRL | TQt::ALT | TQt::META); + if (keycombo & TQt::CTRL) + str += "Ctrl+"; + if (keycombo & TQt::ALT) + str += "Alt+"; + if (keycombo & TQt::META) + str += "Meta+"; + if (keycombo & TQt::SHIFT) + str += "Shift+"; + + // begin copy and paste from TQKeySequence :( + if (basekey & TQt::UNICODE_ACCEL) { + // Note: This character should NOT be upper()'ed, since + // the encoded string should indicate EXACTLY what the + // key represents! Hence a 'Ctrl+Shift+c' is posible to + // represent, but is clearly impossible to trigger... + p = TQChar(basekey & 0xffff); + } else if ( basekey >= TQt::Key_F1 && basekey <= TQt::Key_F35 ) { + p = TQAccel::tr( "F%1" ).arg(basekey - TQt::Key_F1 + 1); + } else if ( basekey > TQt::Key_Space && basekey <= TQt::Key_AsciiTilde ) { + p.sprintf( "%c", basekey ); + } else { + int i = 0; + while (keyname[i].name) { + if (basekey == keyname[i].key) { + p = TQAccel::tr(keyname[i].name); + break; + } + ++i; + } + // If we can't find the actual translatable keyname, + // fall back on the unicode representation of it... + // Or else characters like Key_aring may not get displayed + // ( Really depends on you locale ) + if ( !keyname[i].name ) + // Note: This character should NOT be upper()'ed, see above! + p = TQChar(basekey & 0xffff); + } + // end copy... + str += p + ", "; + } + str.truncate(str.length() - 2); + return str; +#endif +} + +static TQString mkBool( bool b ) +{ + return b? "true" : "false"; +} + +/*! + \class Resource resource.h + \brief Class for saving/loading, etc. forms + + This class is used for saving and loading forms, code generation, + transferring data of widgets over the clipboard, etc.. + +*/ + + +Resource::Resource() +{ + mainwindow = 0; + formwindow = 0; + toplevel = 0; + copying = FALSE; + pasting = FALSE; + hadGeometry = FALSE; + langIface = 0; + hasFunctions = FALSE; +} + +Resource::Resource( MainWindow* mw ) + : mainwindow( mw ) +{ + formwindow = 0; + toplevel = 0; + copying = FALSE; + pasting = FALSE; + hadGeometry = FALSE; + langIface = 0; + hasFunctions = FALSE; +} + +Resource::~Resource() +{ + if ( langIface ) + langIface->release(); +} + +void Resource::setWidget( FormWindow *w ) +{ + formwindow = w; + toplevel = w; +} + +TQWidget *Resource::widget() const +{ + return toplevel; +} + +bool Resource::load( FormFile *ff, Project *defProject ) +{ + if ( !ff || ff->absFileName().isEmpty() ) + return FALSE; + currFileName = ff->absFileName(); + mainContainerSet = FALSE; + + TQFile f( ff->absFileName() ); + f.open( IO_ReadOnly | IO_Translate ); + + bool b = load( ff, TQT_TQIODEVICE(&f), defProject ); + f.close(); + + return b; +} + +#undef signals +#undef slots + +bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject ) +{ + TQDomDocument doc; + TQString errMsg; + int errLine; + if ( !doc.setContent( dev, &errMsg, &errLine ) ) { + return FALSE; + } + + DomTool::fixDocument( doc ); + + TQWidget *p = mainwindow ? mainwindow->qWorkspace() : 0; + toplevel = formwindow = new FormWindow( ff, p, 0 ); + if ( defProject ) + formwindow->setProject( defProject ); + else if ( MainWindow::self ) + formwindow->setProject( MainWindow::self->currProject() ); + if ( mainwindow ) + formwindow->setMainWindow( mainwindow ); + MetaDataBase::addEntry( TQT_TQOBJECT(formwindow) ); + + if ( !langIface ) { + TQString lang = "TQt Script"; + if ( mainwindow ) + lang = mainwindow->currProject()->language(); + langIface = MetaDataBase::languageInterface( lang ); + if ( langIface ) + langIface->addRef(); + } + + uiFileVersion = doc.firstChild().toElement().attribute("version"); + TQDomElement e = doc.firstChild().toElement().firstChild().toElement(); + + TQDomElement forwards = e; + while ( forwards.tagName() != "forwards" && !forwards.isNull() ) + forwards = forwards.nextSibling().toElement(); + + TQDomElement includes = e; + while ( includes.tagName() != "includes" && !includes.isNull() ) + includes = includes.nextSibling().toElement(); + + TQDomElement variables = e; + while ( variables.tagName() != "variables" && !variables.isNull() ) + variables = variables.nextSibling().toElement(); + + TQDomElement signals = e; + while ( signals.tagName() != "signals" && !signals.isNull() ) + signals = signals.nextSibling().toElement(); + + TQDomElement slots = e; + while ( slots.tagName() != "slots" && !slots.isNull() ) + slots = slots.nextSibling().toElement(); + + TQDomElement functions = e; + while ( functions.tagName() != "functions" && !functions.isNull() ) + functions = functions.nextSibling().toElement(); + + TQDomElement connections = e; + while ( connections.tagName() != "connections" && !connections.isNull() ) + connections = connections.nextSibling().toElement(); + + TQDomElement imageCollection = e; + images.clear(); + while ( imageCollection.tagName() != "images" && !imageCollection.isNull() ) + imageCollection = imageCollection.nextSibling().toElement(); + + TQDomElement customWidgets = e; + while ( customWidgets.tagName() != "customwidgets" && !customWidgets.isNull() ) + customWidgets = customWidgets.nextSibling().toElement(); + + TQDomElement tabOrder = e; + while ( tabOrder.tagName() != "tabstops" && !tabOrder.isNull() ) + tabOrder = tabOrder.nextSibling().toElement(); + + TQDomElement actions = e; + while ( actions.tagName() != "actions" && !actions.isNull() ) + actions = actions.nextSibling().toElement(); + + TQDomElement toolbars = e; + while ( toolbars.tagName() != "toolbars" && !toolbars.isNull() ) + toolbars = toolbars.nextSibling().toElement(); + + TQDomElement menubar = e; + while ( menubar.tagName() != "menubar" && !menubar.isNull() ) + menubar = menubar.nextSibling().toElement(); + + TQDomElement widget; + while ( !e.isNull() ) { + if ( e.tagName() == "widget" ) { + widgets.clear(); + widget = e; + } else if ( e.tagName() == "include" ) { // compatibility with 2.x + MetaDataBase::Include inc; + inc.location = "global"; + if ( e.attribute( "location" ) == "local" ) + inc.location = "local"; + inc.implDecl = "in declaration"; + if ( e.attribute( "impldecl" ) == "in implementation" ) + inc.implDecl = "in implementation"; + inc.header = e.firstChild().toText().data(); + if ( inc.header.right( 5 ) != ".ui.h" ) { + metaIncludes.append( inc ); + } else { + if ( formwindow->formFile() ) + formwindow->formFile()->setCodeFileState( FormFile::Ok ); + } + } else if ( e.tagName() == "comment" ) { + metaInfo.comment = e.firstChild().toText().data(); + } else if ( e.tagName() == "forward" ) { // compatibility with old betas + metaForwards << e.firstChild().toText().data(); + } else if ( e.tagName() == "variable" ) { // compatibility with old betas + MetaDataBase::Variable v; + v.varName = e.firstChild().toText().data(); + v.varAccess = "protected"; + metaVariables << v; + } else if ( e.tagName() == "author" ) { + metaInfo.author = e.firstChild().toText().data(); + } else if ( e.tagName() == "class" ) { + metaInfo.className = e.firstChild().toText().data(); + } else if ( e.tagName() == "pixmapfunction" ) { + if ( formwindow ) { + formwindow->setSavePixmapInline( FALSE ); + formwindow->setSavePixmapInProject( FALSE ); + formwindow->setPixmapLoaderFunction( e.firstChild().toText().data() ); + } + } else if ( e.tagName() == "pixmapinproject" ) { + if ( formwindow ) { + formwindow->setSavePixmapInline( FALSE ); + formwindow->setSavePixmapInProject( TRUE ); + } + } else if ( e.tagName() == "exportmacro" ) { + exportMacro = e.firstChild().toText().data(); + } else if ( e.tagName() == "layoutdefaults" ) { + formwindow->setLayoutDefaultSpacing( e.attribute( "spacing", TQString::number( formwindow->layoutDefaultSpacing() ) ).toInt() ); + formwindow->setLayoutDefaultMargin( e.attribute( "margin", TQString::number( formwindow->layoutDefaultMargin() ) ).toInt() ); + } else if ( e.tagName() == "layoutfunctions" ) { + formwindow->setSpacingFunction( e.attribute( "spacing" ) ); + formwindow->setMarginFunction( e.attribute( "margin" ) ); + if ( !formwindow->marginFunction().isEmpty() || !formwindow->spacingFunction().isEmpty() ) + formwindow->hasLayoutFunctions( TRUE ); + } + + e = e.nextSibling().toElement(); + } + + if ( !imageCollection.isNull() ) + loadImageCollection( imageCollection ); + if ( !customWidgets.isNull() ) + loadCustomWidgets( customWidgets, this ); + +#if defined (TQT_NON_COMMERCIAL) + bool previewMode = MainWindow::self ? MainWindow::self->isPreviewing() : FALSE; + TQWidget *w = (TQWidget*)createObject( widget, !previewMode ? (TQWidget*)formwindow : MainWindow::self ); + if ( !w ) + return FALSE; + if ( previewMode ) + w->reparent( MainWindow::self, TQt::WType_TopLevel, w->pos(), TRUE ); +#else + if ( !createObject( widget, formwindow) ) + return FALSE; +#endif + + if ( !forwards.isNull() ) { + for ( TQDomElement n = forwards.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) + if ( n.tagName() == "forward" ) + metaForwards << n.firstChild().toText().data(); + } + + if ( !includes.isNull() ) { + for ( TQDomElement n = includes.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) + if ( n.tagName() == "include" ) { + if ( n.tagName() == "include" ) { + MetaDataBase::Include inc; + inc.location = "global"; + if ( n.attribute( "location" ) == "local" ) + inc.location = "local"; + inc.implDecl = "in declaration"; + if ( n.attribute( "impldecl" ) == "in implementation" ) + inc.implDecl = "in implementation"; + inc.header = n.firstChild().toText().data(); + if ( inc.header.right( 5 ) != ".ui.h" ) { + metaIncludes.append( inc ); + } else { + if ( formwindow->formFile() ) + formwindow->formFile()->setCodeFileState( FormFile::Ok ); + } + } + } + } + + if ( !variables.isNull() ) { + for ( TQDomElement n = variables.firstChild().toElement(); !n.isNull(); + n = n.nextSibling().toElement() ) { + if ( n.tagName() == "variable" ) { + MetaDataBase::Variable v; + v.varName = n.firstChild().toText().data(); + v.varAccess = n.attribute( "access", "protected" ); + if ( v.varAccess.isEmpty() ) + v.varAccess = "protected"; + metaVariables << v; + } + } + } + if ( !signals.isNull() ) { + for ( TQDomElement n = signals.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) + if ( n.tagName() == "signal" ) + metaSignals << n.firstChild().toText().data(); + } + if ( !slots.isNull() ) { + for ( TQDomElement n = slots.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) + if ( n.tagName() == "slot" ) { + MetaDataBase::Function function; + function.specifier = n.attribute( "specifier", "virtual" ); + if ( function.specifier.isEmpty() ) + function.specifier = "virtual"; + function.access = n.attribute( "access", "public" ); + if ( function.access.isEmpty() ) + function.access = "public"; + function.language = n.attribute( "language", "C++" ); + function.returnType = n.attribute( "returnType", "void" ); + if ( function.returnType.isEmpty() ) + function.returnType = "void"; + function.type = "slot"; + function.function = n.firstChild().toText().data(); + if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(formwindow), function.function, TRUE ) ) + MetaDataBase::addFunction( TQT_TQOBJECT(formwindow), function.function, function.specifier, + function.access, "slot", function.language, function.returnType ); + else + MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formwindow), function.function, function.function, + function.specifier, function.access, + "slot", function.language, + function.returnType ); + } + } + + if ( !functions.isNull() ) { + for ( TQDomElement n = functions.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { + if ( n.tagName() == "function" ) { + MetaDataBase::Function function; + function.specifier = n.attribute( "specifier", "virtual" ); + if ( function.specifier.isEmpty() ) + function.specifier = "virtual"; + function.access = n.attribute( "access", "public" ); + if ( function.access.isEmpty() ) + function.access = "public"; + function.type = n.attribute( "type", "function" ); + function.type = "function"; + function.language = n.attribute( "language", "C++" ); + function.returnType = n.attribute( "returnType", "void" ); + if ( function.returnType.isEmpty() ) + function.returnType = "void"; + function.function = n.firstChild().toText().data(); + if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(formwindow), function.function, TRUE ) ) + MetaDataBase::addFunction( TQT_TQOBJECT(formwindow), function.function, function.specifier, + function.access, function.type, function.language, + function.returnType ); + else + MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formwindow), function.function, function.function, + function.specifier, function.access, + function.type, function.language, function.returnType ); + } + } + } + + if ( !actions.isNull() ) + loadActions( actions ); + if ( !toolbars.isNull() ) + loadToolBars( toolbars ); + if ( !menubar.isNull() ) + loadMenuBar( menubar ); + + if ( !connections.isNull() ) + loadConnections( connections ); + + if ( !tabOrder.isNull() ) + loadTabOrder( tabOrder ); + + if ( formwindow ) { + MetaDataBase::setIncludes( TQT_TQOBJECT(formwindow), metaIncludes ); + MetaDataBase::setForwards( TQT_TQOBJECT(formwindow), metaForwards ); + MetaDataBase::setVariables( TQT_TQOBJECT(formwindow), metaVariables ); + MetaDataBase::setSignalList( TQT_TQOBJECT(formwindow), metaSignals ); + metaInfo.classNameChanged = metaInfo.className != TQString( formwindow->name() ); + MetaDataBase::setMetaInfo( TQT_TQOBJECT(formwindow), metaInfo ); + MetaDataBase::setExportMacro( TQT_TQOBJECT(formwindow->mainContainer()), exportMacro ); + } + + loadExtraSource( formwindow->formFile(), currFileName, langIface, hasFunctions ); + + if ( mainwindow && formwindow ) + mainwindow->insertFormWindow( formwindow ); + + if ( formwindow ) { + formwindow->killAccels( TQT_TQOBJECT(formwindow) ); + if ( formwindow->layout() ) + formwindow->layout()->activate(); + if ( hadGeometry ) + formwindow->resize( formwindow->size().expandedTo( formwindow->minimumSize(). + expandedTo( formwindow->minimumSizeHint() ) ) ); + else + formwindow->resize( formwindow->size().expandedTo( formwindow->sizeHint() ) ); + } + + return TRUE; +} + +static bool saveCode( const TQString &filename, const TQString &code ) +{ + TQFile f( filename ); + if ( f.open(IO_WriteOnly | IO_Translate) ) { + TQTextStream ts( &f ); + ts << code; + return TRUE; + } + return FALSE; +} + +bool Resource::save( const TQString& filename, bool formCodeOnly ) +{ + if ( !formwindow || filename.isEmpty() ) + return FALSE; + if (!langIface) { + TQString lang = "TQt Script"; + if ( mainwindow ) + lang = mainwindow->currProject()->language(); + langIface = MetaDataBase::languageInterface( lang ); + if ( langIface ) + langIface->addRef(); + } + if ( formCodeOnly && langIface ) { + if ( saveFormCode(formwindow->formFile(), langIface) ) + return TRUE; + bool breakout = FALSE; + FormFile *ff = formwindow->formFile(); + TQString codeFile = ff->project()->makeAbsolute( ff->codeFile() ); + TQString filter = langIface->fileFilterList().join("\n"); + while ( !breakout ) { + TQString fn = KFileDialog::getSaveFileName( codeFile, filter ); + breakout = fn.isEmpty(); + if ( !breakout ) { + if ( saveCode(fn, ff->code()) ) + return TRUE; + } + } + } + currFileName = filename; + + TQFile f( filename ); + if ( !f.open( IO_WriteOnly | IO_Translate ) ) + return FALSE; + bool b = save( TQT_TQIODEVICE(&f) ); + f.close(); + return b; +} + +bool Resource::save( TQIODevice* dev ) +{ + if ( !formwindow ) + return FALSE; + + if ( !langIface ) { + TQString lang = "C++"; + if ( mainwindow ) + lang = mainwindow->currProject()->language(); + langIface = MetaDataBase::languageInterface( lang ); + if ( langIface ) + langIface->addRef(); + } + + TQTextStream ts( dev ); + ts.setCodec( TQTextCodec::codecForName( "UTF-8" ) ); + + ts << "" << endl; + saveMetaInfoBefore( ts, 0 ); + saveObject( TQT_TQOBJECT(formwindow->mainContainer()), 0, ts, 0 ); + if ( ::tqqt_cast(formwindow->mainContainer()) ) { + saveMenuBar( (TQMainWindow*)formwindow->mainContainer(), ts, 0 ); + saveToolBars( (TQMainWindow*)formwindow->mainContainer(), ts, 0 ); + } + if ( !MetaDataBase::customWidgets()->isEmpty() && !usedCustomWidgets.isEmpty() ) + saveCustomWidgets( ts, 0 ); + if ( ::tqqt_cast(formwindow->mainContainer()) ) + saveActions( formwindow->actionList(), ts, 0 ); + if ( !images.isEmpty() ) + saveImageCollection( ts, 0 ); + if ( !MetaDataBase::connections( TQT_TQOBJECT(formwindow) ).isEmpty() || + !MetaDataBase::slotList( TQT_TQOBJECT(formwindow) ).isEmpty() ) + saveConnections( ts, 0 ); + saveTabOrder( ts, 0 ); + saveMetaInfoAfter( ts, 0 ); + saveIncludeHints( ts, 0 ); + ts << "" << endl; + bool ok = saveFormCode( formwindow->formFile(), langIface ); + images.clear(); + + return ok; +} + +TQString Resource::copy() +{ + if ( !formwindow ) + return TQString(); + + copying = TRUE; + TQString s; + TQTextOStream ts( &s ); + + ts << "" << endl; + TQWidgetList widgets = formwindow->selectedWidgets(); + TQWidgetList tmp( widgets ); + for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { + TQWidget *p = w->parentWidget(); + bool save = TRUE; + while ( p ) { + if ( tmp.findRef( p ) != -1 ) { + save = FALSE; + break; + } + p = p->parentWidget(); + } + if ( save ) + saveObject( TQT_TQOBJECT(w), 0, ts, 0 ); + } + if ( !MetaDataBase::customWidgets()->isEmpty() && !usedCustomWidgets.isEmpty() ) + saveCustomWidgets( ts, 0 ); + if ( !images.isEmpty() ) + saveImageCollection( ts, 0 ); + ts << "" << endl; + + return s; +} + + +void Resource::paste( const TQString &cb, TQWidget *parent ) +{ + if ( !formwindow ) + return; + mainContainerSet = TRUE; + + pasting = TRUE; + TQDomDocument doc; + TQString errMsg; + int errLine; + doc.setContent( cb, &errMsg, &errLine ); + + TQDomElement firstWidget = doc.firstChild().toElement().firstChild().toElement(); + + TQDomElement imageCollection = firstWidget; + images.clear(); + while ( imageCollection.tagName() != "images" && !imageCollection.isNull() ) + imageCollection = imageCollection.nextSibling().toElement(); + + TQDomElement customWidgets = firstWidget; + while ( customWidgets.tagName() != "customwidgets" && !customWidgets.isNull() ) + customWidgets = customWidgets.nextSibling().toElement(); + + if ( !imageCollection.isNull() ) + loadImageCollection( imageCollection ); + if ( !customWidgets.isNull() ) + loadCustomWidgets( customWidgets, this ); + + TQWidgetList widgets; + formwindow->clearSelection( FALSE ); + formwindow->setPropertyShowingBlocked( TRUE ); + formwindow->clearSelection( FALSE ); + while ( !firstWidget.isNull() ) { + if ( firstWidget.tagName() == "widget" ) { + TQWidget *w = (TQWidget*)createObject( firstWidget, parent, 0 ); + if ( !w ) + continue; + widgets.append( w ); + int x = w->x() + formwindow->grid().x(); + int y = w->y() + formwindow->grid().y(); + if ( w->x() + w->width() > parent->width() ) + x = TQMAX( 0, parent->width() - w->width() ); + if ( w->y() + w->height() > parent->height() ) + y = TQMAX( 0, parent->height() - w->height() ); + if ( x != w->x() || y != w->y() ) + w->move( x, y ); + formwindow->selectWidget( TQT_TQOBJECT(w) ); + } else if ( firstWidget.tagName() == "spacer" ) { + TQWidget *w = createSpacer( firstWidget, parent, 0, firstWidget.tagName() == "vspacer" ? Qt::Vertical : Qt::Horizontal ); + if ( !w ) + continue; + widgets.append( w ); + int x = w->x() + formwindow->grid().x(); + int y = w->y() + formwindow->grid().y(); + if ( w->x() + w->width() > parent->width() ) + x = TQMAX( 0, parent->width() - w->width() ); + if ( w->y() + w->height() > parent->height() ) + y = TQMAX( 0, parent->height() - w->height() ); + if ( x != w->x() || y != w->y() ) + w->move( x, y ); + formwindow->selectWidget( TQT_TQOBJECT(w) ); + } + firstWidget = firstWidget.nextSibling().toElement(); + } + formwindow->setPropertyShowingBlocked( FALSE ); + formwindow->emitShowProperties(); + + PasteCommand *cmd = new PasteCommand( i18n( "Paste" ), formwindow, widgets ); + formwindow->commandHistory()->addCommand( cmd ); +} + +void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStream &ts, int indent ) +{ + if ( obj && obj->isWidgetType() && ( (TQWidget*)obj )->isHidden() ) + return; + TQString closeTag; + const char* className = WidgetFactory::classNameOf( obj ); + int classID = WidgetDatabase::idFromClassName( className ); + bool isPlugin = WidgetDatabase::isCustomPluginWidget( classID ); + if ( obj->isWidgetType() ) { + if ( obj->isA("CustomWidget") || isPlugin ) { + usedCustomWidgets << TQString( className ); + includeHints << WidgetDatabase::includeFile( classID ); + } + + if ( TQT_BASE_OBJECT(obj) != TQT_BASE_OBJECT(formwindow) && !formwindow->widgets()->find( (TQWidget*)obj ) ) + return; // we don't know anything about this thing + + TQString attributes; + if ( grid ) { + QDesignerGridLayout::Item item = grid->items[ (TQWidget*)obj ]; + attributes += TQString(" row=\"") + TQString::number(item.row) + "\""; + attributes += TQString(" column=\"") + TQString::number(item.column) + "\""; + if ( item.rowspan * item.colspan != 1 ) { + attributes += TQString(" rowspan=\"") + TQString::number(item.rowspan) + "\""; + attributes += TQString(" colspan=\"") + TQString::number(item.colspan) + "\""; + } + } + + if ( qstrcmp( className, "Spacer" ) == 0 ) { + closeTag = makeIndent( indent ) + "\n"; + ts << makeIndent( indent ) << "" << endl; + ++indent; + } else { + closeTag = makeIndent( indent ) + "\n"; + ts << makeIndent( indent ) << "" << endl; + ++indent; + } + if ( WidgetFactory::hasItems(classID, obj) ) + saveItems( obj, ts, indent ); + saveObjectProperties( obj, ts, indent ); + } else { + // test for other objects we created. Nothing so far. + return; + } + + QDesignerWidgetStack* ws = 0; + + if ( ::tqqt_cast(obj) ) { + TQTabWidget* tw = (TQTabWidget*) obj; + TQObjectList* tmpl = tw->queryList( TQWIDGETSTACK_OBJECT_NAME_STRING ); + TQWidgetStack *ws = (TQWidgetStack*)tmpl->first(); + TQTabBar *tb = ( (QDesignerTabWidget*)obj )->tabBar(); + for ( int i = 0; i < tb->count(); ++i ) { + TQTab *t = tb->tabAt( i ); + if ( !t ) + continue; + TQWidget *w = ws->widget( t->identifier() ); + if ( !w ) + continue; + if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(TQT_TQOBJECT(w)) ) == -1 ) + continue; // we don't know this widget + ts << makeIndent( indent ) << "" << endl; + ++indent; + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << entitize( w->name() ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << entitize( t->text() ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + saveChildrenOf( TQT_TQOBJECT(w), ts, indent ); + --indent; + ts << makeIndent( indent ) << "" << endl; + } + delete tmpl; + } else if ( (ws = ::tqqt_cast(obj)) != 0 ) { + for ( int i = 0; i < ws->count(); ++i ) { + TQWidget *w = ws->page( i ); + if ( !w ) + continue; + if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))) == -1 ) + continue; // we don't know this widget + ts << makeIndent( indent ) << "" << endl; + ++indent; + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << entitize( w->name() ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << TQString::number(i) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + saveChildrenOf( TQT_TQOBJECT(w), ts, indent ); + --indent; + ts << makeIndent( indent ) << "" << endl; + } + } else if ( ::tqqt_cast(obj) ) { + TQToolBox* tb = (TQToolBox*)obj; + for ( int i = 0; i < tb->count(); ++i ) { + TQWidget *w = tb->item( i ); + if ( !w ) + continue; + if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))) == -1 ) + continue; // we don't know this widget + ts << makeIndent( indent ) << "" << endl; + ++indent; + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << entitize( w->name() ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + ts << makeIndent( indent ) << "" << endl; + indent++; + saveEnumProperty( TQT_TQOBJECT(w), "backgroundMode", TQVariant::Invalid, ts, indent ); + indent--; + ts << makeIndent( indent ) << "" << endl; + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << entitize( tb->itemLabel( tb->indexOf(w) ) ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + saveChildrenOf( TQT_TQOBJECT(w), ts, indent ); + --indent; + ts << makeIndent( indent ) << "" << endl; + } + } else if ( ::tqqt_cast(obj) ) { + TQWizard* wiz = (TQWizard*)obj; + for ( int i = 0; i < wiz->pageCount(); ++i ) { + TQWidget *w = wiz->page( i ); + if ( !w ) + continue; + if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))) == -1 ) + continue; // we don't know this widget + ts << makeIndent( indent ) << "" << endl; + ++indent; + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << entitize( w->name() ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << entitize( wiz->title( w ) ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + saveChildrenOf( TQT_TQOBJECT(w), ts, indent ); + --indent; + ts << makeIndent( indent ) << "" << endl; + } + } else if ( ::tqqt_cast(obj) ) { + saveChildrenOf( TQT_TQOBJECT(( (TQMainWindow*)obj )->centralWidget()), ts, indent ); + } else { + bool saved = FALSE; +#ifdef TQT_CONTAINER_CUSTOM_WIDGETS + if ( isPlugin ) { + WidgetInterface *iface = 0; + widgetManager()->queryInterface( className, &iface ); + if ( iface ) { + TQWidgetContainerInterfacePrivate *iface2 = 0; + iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 ); + if ( iface2 ) { + if ( iface2->supportsPages( className ) ) { + TQWidgetList containers = iface2->pages( className, (TQWidget*)obj ); + if ( !containers.isEmpty() ) { + saved = TRUE; + int i = 0; + for ( TQWidget *w = containers.first(); w; w = containers.next(), ++i ) { + if ( WidgetDatabase:: + idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) == -1 ) + continue; // we don't know this widget + ts << makeIndent( indent ) << "" << endl; + ++indent; + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << entitize( w->name() ) + << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" + << entitize( iface2->pageLabel( className, (TQWidget*)obj, i ) ) + << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + saveChildrenOf( w, ts, indent ); + --indent; + ts << makeIndent( indent ) << "" << endl; + } + } + } else { + saved = TRUE; + TQWidget *w = iface2->containerOfWidget( className, (TQWidget*)obj ); + if ( obj != w ) { + ts << makeIndent( indent ) << "" << endl; + ++indent; + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << entitize( w->name() ) + << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + saveChildrenOf( w, ts, indent ); + --indent; + ts << makeIndent( indent ) << "" << endl; + } + // Create a custom widget and then store it in the database + // so we can save the custom widgets. + MetaDataBase::CustomWidget *cw = new MetaDataBase::CustomWidget; + cw->className = className; + cw->includeFile = WidgetDatabase::includeFile( classID ); + TQStrList lst = w->metaObject()->signalNames( TRUE ); + for ( TQPtrListIterator it(lst); it.current(); ++it ) + cw->lstSignals.append(it.current()); + + int i; + int total = w->metaObject()->numProperties( TRUE ); + for ( i = 0; i < total; i++ ) { + const TQMetaProperty *p = w->metaObject()->property( i, TRUE ); + if ( p->designable(w) ) { + MetaDataBase::Property prop; + prop.property = p->name(); + TQString pType = p->type(); + // *sigh* designer types are not normal types + // Handle most cases, the ones it misses are + // probably too difficult to deal with anyway... + if ( pType.startsWith("Q") ) { + pType = pType.right( pType.length() - 1 ); + } else { + pType[0] = pType[0].upper(); + } + prop.type = pType; + cw->lstProperties.append( prop ); + } + } + + total = w->metaObject()->numSlots( TRUE ); + for ( i = 0; i < total; i++ ) { + const TQMetaData *md = w->metaObject()->slot( i, TRUE ); + MetaDataBase::Function funky; + // Find out if we have a return type. + if ( md->method->count > 0 ) { + const TQUParameter p = md->method->parameters[0]; + if ( p.inOut == TQUParameter::InOut ) + funky.returnType = p.type->desc(); + } + + funky.function = md->name; + funky.language = "C++"; + switch ( md->access ) { + case TQMetaData::Public: + funky.access = "public"; + break; + case TQMetaData::Protected: + funky.access = "protected"; + break; + case TQMetaData::Private: + funky.access = "private"; + break; + } + cw->lstSlots.append( funky ); + } + MetaDataBase::addCustomWidget( cw ); + } + iface2->release(); + } + iface->release(); + } + } +#endif // TQT_CONTAINER_CUSTOM_WIDGETS + if ( !saved ) + saveChildrenOf( obj, ts, indent ); + } + + indent--; + ts << closeTag; +} + +void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent ) +{ + if ( ::tqqt_cast(obj) || ::tqqt_cast(obj) ) { + TQListBox *lb = 0; + if ( ::tqqt_cast(obj) ) + lb = (TQListBox*)obj; + else + lb = ( (TQComboBox*)obj )->listBox(); + + TQListBoxItem *i = lb->firstItem(); + for ( ; i; i = i->next() ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + TQStringList text; + text << i->text(); + TQPtrList pixmaps; + if ( i->pixmap() ) + pixmaps.append( i->pixmap() ); + saveItem( text, pixmaps, ts, indent ); + indent--; + ts << makeIndent( indent ) << "" << endl; + } + } else if ( ::tqqt_cast(obj) ) { + TQIconView *iv = (TQIconView*)obj; + + TQIconViewItem *i = iv->firstItem(); + for ( ; i; i = i->nextItem() ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + TQStringList text; + text << i->text(); + TQPtrList pixmaps; + if ( i->pixmap() ) + pixmaps.append( i->pixmap() ); + saveItem( text, pixmaps, ts, indent ); + indent--; + ts << makeIndent( indent ) << "" << endl; + } + } else if ( ::tqqt_cast(obj) ) { + TQListView *lv = (TQListView*)obj; + int i; + for ( i = 0; i < lv->header()->count(); ++i ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + TQStringList l; + l << lv->header()->label( i ); + TQPtrList pix; + pix.setAutoDelete( TRUE ); + if ( lv->header()->iconSet( i ) ) + pix.append( new TQPixmap( lv->header()->iconSet( i )->pixmap() ) ); + saveItem( l, pix, ts, indent ); + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << mkBool( lv->header()->isClickEnabled( i ) )<< "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << mkBool( lv->header()->isResizeEnabled( i ) ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + } + saveItem( lv->firstChild(), ts, indent - 1 ); + } +#if !defined (TQT_NO_TABLE) + else if ( ::tqqt_cast(obj) ) { + TQTable *table = (TQTable*)obj; + int i; + TQMap columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(table) ); +# ifndef TQT_NO_SQL + bool isDataTable = ::tqqt_cast(table); +# else + bool isDataTable = false; +# endif + for ( i = 0; i < table->horizontalHeader()->count(); ++i ) { + if ( !table->horizontalHeader()->label( i ).isNull() && + table->horizontalHeader()->label( i ).toInt() != i + 1 || + table->horizontalHeader()->iconSet( i ) || + isDataTable ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + TQStringList l; + l << table->horizontalHeader()->label( i ); + TQPtrList pix; + pix.setAutoDelete( TRUE ); + if ( table->horizontalHeader()->iconSet( i ) ) + pix.append( new TQPixmap( table->horizontalHeader()->iconSet( i )->pixmap() ) ); + saveItem( l, pix, ts, indent ); + if ( isDataTable && !columnFields.isEmpty() ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << entitize( *columnFields.find( l[ 0 ] ) ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + } + indent--; + ts << makeIndent( indent ) << "" << endl; + } + } + for ( i = 0; i < table->verticalHeader()->count(); ++i ) { + if ( !table->verticalHeader()->label( i ).isNull() && + table->verticalHeader()->label( i ).toInt() != i + 1 || + table->verticalHeader()->iconSet( i ) ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + TQStringList l; + l << table->verticalHeader()->label( i ); + TQPtrList pix; + pix.setAutoDelete( TRUE ); + if ( table->verticalHeader()->iconSet( i ) ) + pix.append( new TQPixmap( table->verticalHeader()->iconSet( i )->pixmap() ) ); + saveItem( l, pix, ts, indent ); + indent--; + ts << makeIndent( indent ) << "" << endl; + } + } + } +#endif +} + +void Resource::saveItem( TQListViewItem *i, TQTextStream &ts, int indent ) +{ + TQListView *lv = i->listView(); + while ( i ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + + TQPtrList pixmaps; + TQStringList textes; + for ( int c = 0; c < lv->columns(); ++c ) { + pixmaps.append( i->pixmap( c ) ); + textes << i->text( c ); + } + saveItem( textes, pixmaps, ts, indent ); + + if ( i->firstChild() ) + saveItem( i->firstChild(), ts, indent ); + + indent--; + ts << makeIndent( indent ) << "" << endl; + i = i->nextSibling(); + } +} + +void Resource::savePixmap( const TQPixmap &p, TQTextStream &ts, int indent, const TQString &tagname ) +{ + if ( p.isNull() ) { + ts << makeIndent( indent ) << "<" << tagname << ">" << endl; + return; + } + + if ( formwindow && formwindow->savePixmapInline() ) + ts << makeIndent( indent ) << "<" << tagname << ">" << saveInCollection( p ) << "" << endl; + else if ( formwindow && formwindow->savePixmapInProject() ) + ts << makeIndent( indent ) << "<" << tagname << ">" << MetaDataBase::pixmapKey( TQT_TQOBJECT(formwindow), p.serialNumber() ) + << "" << endl; + else + ts << makeIndent( indent ) << "<" << tagname << ">" << MetaDataBase::pixmapArgument( TQT_TQOBJECT(formwindow), p.serialNumber() ) + << "" << endl; +} + +TQPixmap Resource::loadPixmap( const TQDomElement &e, const TQString &/*tagname*/ ) +{ + TQString arg = e.firstChild().toText().data(); + + if ( formwindow && formwindow->savePixmapInline() ) { + TQImage img = loadFromCollection( arg ); + TQPixmap pix; + pix.convertFromImage( img ); + MetaDataBase::setPixmapArgument( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg ); + return pix; + } else if ( formwindow && formwindow->savePixmapInProject() ) { + TQPixmap pix; + if ( mainwindow && mainwindow->currProject() ) { + pix = mainwindow->currProject()->pixmapCollection()->pixmap( arg ); + } else { + pix = BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() ); + // we have to force the pixmap to get a new and unique serial number. Unfortunately detatch() doesn't do that + pix.convertFromImage( pix.convertToImage() ); + } + + MetaDataBase::setPixmapKey( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg ); + return pix; + } + TQPixmap pix = BarIcon( "designer_image.png", KDevDesignerPartFactory::instance() ); + // we have to force the pixmap to get a new and unique serial number. Unfortunately detatch() doesn't do that + pix.convertFromImage( pix.convertToImage() ); + MetaDataBase::setPixmapArgument( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg ); + return pix; +} + +void Resource::saveItem( const TQStringList &text, + const TQPtrList &pixmaps, TQTextStream &ts, + int indent ) +{ + TQStringList::ConstIterator it = text.begin(); + for ( ; it != text.end(); ++it ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << entitize( *it ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + } + + for ( int i = 0; i < (int)pixmaps.count(); ++i ) { + TQPixmap *p = ( (TQPtrList)pixmaps ).at( i ); + ts << makeIndent( indent ) << "" << endl; + indent++; + if ( p ) + savePixmap( *p, ts, indent ); + else + savePixmap( TQPixmap(), ts, indent ); + indent--; + ts << makeIndent( indent ) << "" << endl; + } +} + +void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent ) +{ + const TQObjectList l = obj->childrenListObject(); + if ( l.isEmpty() ) + return; // no children to save + + TQString closeTag; + // if the widget has a layout we pretend that all widget's childs are childs of the layout - makes the structure nicer + TQLayout *layout = 0; + QDesignerGridLayout* grid = 0; + if ( !::tqqt_cast(obj) && + WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( obj ) ) ) && + obj->isWidgetType() && + WidgetFactory::layoutType( (TQWidget*)obj, layout ) != WidgetFactory::NoLayout ) { + WidgetFactory::LayoutType lay = WidgetFactory::layoutType( (TQWidget*)obj, layout ); + switch ( lay ) { + case WidgetFactory::HBox: + closeTag = makeIndent( indent ) + ""; + ts << makeIndent( indent ) << "" << endl; + ++indent; + break; + case WidgetFactory::VBox: + closeTag = makeIndent( indent ) + ""; + ts << makeIndent( indent ) << "" << endl; + ++indent; + break; + case WidgetFactory::Grid: + closeTag = makeIndent( indent ) + ""; + ts << makeIndent( indent ) << "" << endl; + ++indent; + grid = (QDesignerGridLayout*) layout; + break; + default: + break; + } + + // save properties of layout + if ( lay != WidgetFactory::NoLayout ) + saveObjectProperties( TQT_TQOBJECT(layout), ts, indent ); + + } + + TQObject *o = 0; + for ( TQPtrListIterator it ( l ); ( o = it.current() ); ++it ) + if ( !TQString( o->name() ).startsWith( "qt_dead_widget_" ) ) + saveObject( o, grid, ts, indent ); + if ( !closeTag.isEmpty() ) { + indent--; + ts << closeTag << endl; + } +} + +void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) +{ + TQStringList saved; + TQStringList changed; + changed = MetaDataBase::changedProperties( w ); + if ( w->isWidgetType() ) { + if ( ::tqqt_cast(w) ) { + if ( !changed.contains( "sizeHint" ) ) + changed << "sizeHint"; + if ( !changed.contains( "geometry" ) ) + changed << "geometry"; + } else { + TQToolButton *tb = ::tqqt_cast(w); + if ( tb && !tb->iconSet().isNull() ) { + changed << "iconSet"; + } + } + } else if ( ::tqqt_cast(w) ) { + if ( MetaDataBase::spacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) > -1 ) + changed << "spacing"; + if ( MetaDataBase::margin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) > -1 ) + changed << "margin"; + if ( MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) != "Auto" + && !MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ).isEmpty() ) + changed << "resizeMode"; + } + + if ( TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(formwindow->mainContainer()) ) { + if ( changed.findIndex( "geometry" ) == -1 ) + changed << "geometry"; + if ( changed.findIndex( "caption" ) == -1 ) + changed << "caption"; + } + + if ( changed.isEmpty() ) + return; + + bool inLayout = TQT_BASE_OBJECT(w) != TQT_BASE_OBJECT(formwindow->mainContainer()) && !copying && w->isWidgetType() && ( (TQWidget*)w )->parentWidget() && + WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout; + + TQStrList lst = w->metaObject()->propertyNames( !::tqqt_cast(w) ); + for ( TQPtrListIterator it( lst ); it.current(); ++it ) { + if ( changed.find( TQString::fromLatin1( it.current() ) ) == changed.end() ) + continue; + if ( saved.find( TQString::fromLatin1( it.current() ) ) != saved.end() ) + continue; + saved << TQString::fromLatin1( it.current() ); + const TQMetaProperty* p = w->metaObject()-> + property( w->metaObject()->findProperty( it.current(), TRUE ), TRUE ); + if ( !p || !p->stored( w ) || ( inLayout && qstrcmp( p->name(), "geometry" ) == 0 ) ) + continue; + if ( ::tqqt_cast(w) && qstrcmp( p->name(), "pixmap" ) == 0 && + ( !( (TQLabel*)w )->pixmap() || ( (TQLabel*)w )->pixmap()->isNull() ) ) + continue; + if ( ::tqqt_cast(w) && + ( qstrcmp( p->name(), "itemName" ) == 0 || qstrcmp( p->name(), "itemNumber" ) == 0 || + qstrcmp( p->name(), "itemText" ) == 0 ) ) + continue; + if ( qstrcmp( p->name(), "name" ) == 0 ) + knownNames << w->property( "name" ).toString(); + if ( !p->isSetType() && !p->isEnumType() && !w->property( p->name() ).isValid() ) + continue; + ts << makeIndent( indent ) << "stdSet() ) + ts << " stdset=\"0\""; + ts << ">" << endl; + indent++; + if ( strcmp( it.current(), "resizeMode" ) == 0 && ::tqqt_cast(w) ) { + saveProperty( w, it.current(), "", TQVariant::String, ts, indent ); + } else if ( p->isSetType() ) { + saveSetProperty( w, it.current(), TQVariant::nameToType( p->type() ), ts, indent ); + } else if ( p->isEnumType() ) { + saveEnumProperty( w, it.current(), TQVariant::nameToType( p->type() ), ts, indent ); + } else { + saveProperty( w, it.current(), w->property( p->name() ), TQVariant::nameToType( p->type() ), ts, indent ); + } + indent--; + ts << makeIndent( indent ) << "
    " << endl; + } + + if ( w->isWidgetType() && MetaDataBase::fakeProperties( w ) ) { + TQMap* fakeProperties = MetaDataBase::fakeProperties( w ); + for ( TQMap::Iterator fake = fakeProperties->begin(); + fake != fakeProperties->end(); ++fake ) { + if ( MetaDataBase::isPropertyChanged( w, fake.key() ) ) { + if ( w->inherits("CustomWidget") ) { + MetaDataBase::CustomWidget *cw = ( (CustomWidget*)w )->customWidget(); + if ( cw && !cw->hasProperty( fake.key().latin1() ) && fake.key() != "toolTip" && fake.key() != "whatsThis" ) + continue; + } + + ts << makeIndent( indent ) << "" << endl; + indent++; + saveProperty( w, fake.key(), *fake, (*fake).type(), ts, indent ); + indent--; + ts << makeIndent( indent ) << "" << endl; + } + } + } +} + +void Resource::saveSetProperty( TQObject *w, const TQString &name, TQVariant::Type, TQTextStream &ts, int indent ) +{ + const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, TRUE ), TRUE ); + TQStrList l( p->valueToKeys( w->property( name ).toInt() ) ); + TQString v; + for ( uint i = 0; i < l.count(); ++i ) { + v += l.at( i ); + if ( i < l.count() - 1 ) + v += "|"; + } + ts << makeIndent( indent ) << "" << v << "" << endl; +} + +void Resource::saveEnumProperty( TQObject *w, const TQString &name, TQVariant::Type, TQTextStream &ts, int indent ) +{ + const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, TRUE ), TRUE ); + ts << makeIndent( indent ) << "" << p->valueToKey( w->property( name ).toInt() ) << "" << endl; +} + +void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant &value, TQVariant::Type t, TQTextStream &ts, int indent ) +{ + if ( name == "hAlign" || name =="vAlign" || name == "wordwrap" || + name == "layoutMargin" || name =="layoutSpacing" ) + return; + int num; + uint unum; + double dob; + TQString comment; + if ( w && formwindow->widgets()->find( (TQWidget*)w ) || formwindow->actionList().find( (TQAction*)w ) ) + comment = MetaDataBase::propertyComment( w, name ); + switch ( t ) { + case TQVariant::String: + if ( name == "resizeMode" ) { + TQString resmod = MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ); + if ( !resmod.isNull() && resmod != "Auto" ) { + ts << makeIndent( indent ) << ""; + ts << resmod; + ts << "" << endl; + } + + } else { + ts << makeIndent( indent ) << "" << entitize( value.toString() ) << "" << endl; + if ( !comment.isEmpty() ) + ts << makeIndent( indent ) << "" << entitize( comment ) << "" << endl; + } + break; + case TQVariant::CString: + ts << makeIndent( indent ) << "" << entitize( value.toCString() ).latin1() << "" << endl; + break; + case TQVariant::Bool: + ts << makeIndent( indent ) << "" << mkBool( value.toBool() ) << "" << endl; + break; + case TQVariant::Int: + if ( ::tqqt_cast(w) ) { + num = -1; + if ( name == "spacing" ) + num = MetaDataBase::spacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ); + else if ( name == "margin" ) + num = MetaDataBase::margin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ); + if ( num != -1 ) + ts << makeIndent( indent ) << "" << TQString::number( num ) << "" << endl; + } else { + num = value.toInt(); + ts << makeIndent( indent ) << "" << TQString::number( num ) << "" << endl; + } + break; + case TQVariant::Double: + dob = value.toDouble(); + ts << makeIndent( indent ) << "" << TQString::number( dob ) << "" << endl; + break; + case TQVariant::KeySequence: + ts << makeIndent( indent ) << "" + << entitize(platformNeutralKeySequence(value.toKeySequence())) << "" << endl; + break; + case TQVariant::UInt: + unum = value.toUInt(); + ts << makeIndent( indent ) << "" << TQString::number( unum ) << "" << endl; + break; + case TQVariant::Rect: { + TQVariant v( value ); + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << TQString::number( v.toRect().x() ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( v.toRect().y() ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( v.toRect().width() ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( v.toRect().height() ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + } break; + case TQVariant::Point: { + TQVariant v( value ); + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << TQString::number( v.toPoint().x() ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( v.toPoint().y() ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + } break; + case TQVariant::Size: { + TQVariant v( value ); + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << TQString::number( v.toSize().width() ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( v.toSize().height() ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + } break; + case TQVariant::Color: { + TQVariant v( value ); + ts << makeIndent( indent ) << "" << endl; + indent++; + saveColor( ts, indent, v.toColor() ); + indent--; + ts << makeIndent( indent ) << "" << endl; + } break; + case TQVariant::Font: { + TQVariant v( value ); + ts << makeIndent( indent ) << "" << endl; + TQFont f( tqApp->font() ); + if ( w && w->isWidgetType() && ((TQWidget*)w)->parentWidget() ) + f = ((TQWidget*)w)->parentWidget()->font(); + TQFont f2( v.toFont() ); + indent++; + if ( f.family() != f2.family() ) + ts << makeIndent( indent ) << "" << f2.family() << "" << endl; + if ( f.pointSize() != f2.pointSize() ) + ts << makeIndent( indent ) << "" << TQString::number( f2.pointSize() ) << "" << endl; + if ( f.bold() != f2.bold() ) + ts << makeIndent( indent ) << "" << TQString::number( (int)f2.bold() ) << "" << endl; + if ( f.italic() != f2.italic() ) + ts << makeIndent( indent ) << "" << TQString::number( (int)f2.italic() ) << "" << endl; + if ( f.underline() != f2.underline() ) + ts << makeIndent( indent ) << "" << TQString::number( (int)f2.underline() ) << "" << endl; + if ( f.strikeOut() != f2.strikeOut() ) + ts << makeIndent( indent ) << "" << TQString::number( (int)f2.strikeOut() ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + } break; + case TQVariant::SizePolicy: { + TQSizePolicy sp( value.toSizePolicy() ); + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << (int)sp.horData() << "" << endl; + ts << makeIndent( indent ) << "" << (int)sp.verData() << "" << endl; + ts << makeIndent( indent ) << "" << (int)sp.horStretch() << "" << endl; + ts << makeIndent( indent ) << "" << (int)sp.verStretch() << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + break; + } + case TQVariant::Pixmap: + savePixmap( value.toPixmap(), ts, indent ); + break; + case TQVariant::IconSet: + savePixmap( value.toIconSet().pixmap(), ts, indent, "iconset" ); + break; + case TQVariant::Image: + ts << makeIndent( indent ) << "" << saveInCollection( value.toImage() ) << "" << endl; + break; + case TQVariant::Palette: { + TQPalette p( value.toPalette() ); + ts << makeIndent( indent ) << "" << endl; + indent++; + + ts << makeIndent( indent ) << "" << endl; + indent++; + saveColorGroup( ts, indent, p.active() ); + indent--; + ts << makeIndent( indent ) << "" << endl; + + ts << makeIndent( indent ) << "" << endl; + indent++; + saveColorGroup( ts, indent, p.disabled() ); + indent--; + ts << makeIndent( indent ) << "" << endl; + + ts << makeIndent( indent ) << "" << endl; + indent++; + saveColorGroup( ts, indent, p.inactive() ); + indent--; + ts << makeIndent( indent ) << "" << endl; + + indent--; + ts << makeIndent( indent ) << "" << endl; + } break; + case TQVariant::Cursor: + ts << makeIndent( indent ) << "" << value.toCursor().shape() << "" << endl; + break; + case TQVariant::StringList: { + TQStringList lst = value.toStringList(); + uint i = 0; + ts << makeIndent( indent ) << "" << endl; + indent++; + if ( !lst.isEmpty() ) { + for ( i = 0; i < lst.count(); ++i ) + ts << makeIndent( indent ) << "" << entitize( lst[ i ] ) << "" << endl; + } + indent--; + ts << makeIndent( indent ) << "" << endl; + } break; + case TQVariant::Date: { + TQDate d = value.toDate(); + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << d.year() << "" << endl; + ts << makeIndent( indent ) << "" << d.month() << "" << endl; + ts << makeIndent( indent ) << "" << d.day() << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + break; + } + case TQVariant::Time: { + TQTime t = value.toTime(); + ts << makeIndent( indent ) << "" << endl; + break; + } + case TQVariant::DateTime: { + TQDateTime dt = value.toDateTime(); + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << dt.date().year() << "" << endl; + ts << makeIndent( indent ) << "" << dt.date().month() << "" << endl; + ts << makeIndent( indent ) << "" << dt.date().day() << "" << endl; + ts << makeIndent( indent ) << "" << dt.time().hour() << "" << endl; + ts << makeIndent( indent ) << "" << dt.time().minute() << "" << endl; + ts << makeIndent( indent ) << "" << dt.time().second() << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + break; + } + default: + tqWarning( "saving the property %s of type %d not supported yet", name.latin1(), (int)t ); + } +} + +void Resource::saveColorGroup( TQTextStream &ts, int indent, const TQColorGroup &cg ) +{ + for( int r = 0 ; r < TQColorGroup::NColorRoles ; r++ ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + saveColor( ts, indent, cg.color( (TQColorGroup::ColorRole)r ) ); + indent--; + ts << makeIndent( indent ) << "" << endl; + TQPixmap* pm = cg.brush( (TQColorGroup::ColorRole)r ).pixmap(); + if ( pm && !pm->isNull() ) + savePixmap( *pm, ts, indent ); + } +} + +void Resource::saveColor( TQTextStream &ts, int indent, const TQColor &c ) +{ + ts << makeIndent( indent ) << "" << TQString::number( c.red() ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( c.green() ) << "" << endl; + ts << makeIndent( indent ) << "" << TQString::number( c.blue() ) << "" << endl; +} + +TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLayout* layout ) +{ + lastItem = 0; + TQDomElement n = e.firstChild().toElement(); + TQWidget *w = 0; // the widget that got created + TQObject *obj = 0; // gets the properties + + int row = e.attribute( "row" ).toInt(); + int col = e.attribute( "column" ).toInt(); + int rowspan = e.attribute( "rowspan" ).toInt(); + int colspan = e.attribute( "colspan" ).toInt(); + if ( rowspan < 1 ) + rowspan = 1; + if ( colspan < 1 ) + colspan = 1; + + TQString className = e.attribute( "class", TQWIDGET_OBJECT_NAME_STRING ); +#ifdef TQT_CONTAINER_CUSTOM_WIDGETS + TQString parentClassName = WidgetFactory::classNameOf( parent ); + bool isPlugin = + WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( parentClassName ) ); + if ( isPlugin ) + tqWarning( "####### loading custom container widgets without page support not implemented!" ); + // ### TODO loading for custom container widgets without pages +#endif + if ( !className.isNull() ) { + obj = TQT_TQOBJECT(WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, 0, FALSE )); + if ( !obj ) { + TQMessageBox::critical( MainWindow::self, i18n( "Loading File" ), + i18n( "Error loading %1.\n" + "The widget %2 could not be created." ). + arg( currFileName ).arg( className ) ); + return 0; + } + if ( !mainContainerSet ) { + if ( formwindow ) + formwindow->setMainContainer( (TQWidget*)obj ); + mainContainerSet = TRUE; + } + w = (TQWidget*)obj; + if ( ::tqqt_cast(w) ) + w = ( (TQMainWindow*)w )->centralWidget(); + if ( layout ) { + switch ( WidgetFactory::layoutType( layout ) ) { + case WidgetFactory::HBox: + ( (TQHBoxLayout*)layout )->addWidget( w ); + break; + case WidgetFactory::VBox: + ( (TQVBoxLayout*)layout )->addWidget( w ); + break; + case WidgetFactory::Grid: + ( (QDesignerGridLayout*)layout )->addMultiCellWidget( w, row, row + rowspan - 1, + col, col + colspan - 1 ); + break; + default: + break; + } + } + + if ( !toplevel ) + toplevel = w; + layout = 0; + + if ( w && formwindow ) { + if ( !parent || + ( !::tqqt_cast(parent) && + !::tqqt_cast(parent) && + !::tqqt_cast(parent) && + !::tqqt_cast(parent) +#ifdef TQT_CONTAINER_CUSTOM_WIDGETS + && !isPlugin +#endif + ) ) + formwindow->insertWidget( w, pasting ); + else if ( parent && + ( ::tqqt_cast(parent) || + ::tqqt_cast(parent) || + ::tqqt_cast(parent) || + ::tqqt_cast(parent) +#ifdef TQT_CONTAINER_CUSTOM_WIDGETS + || isPlugin +#endif + ) ) + MetaDataBase::addEntry( TQT_TQOBJECT(w) ); + } + } + + TQDomElement sizePolicyElement; + TQObject *sizePolicyObject = 0; + + while ( !n.isNull() ) { + if ( n.tagName() == "spacer" ) { + createSpacer( n, w, layout, Qt::Horizontal ); + } else if ( n.tagName() == "widget" ) { + createObject( n, w, layout ); + } else if ( n.tagName() == "hbox" ) { + layout = WidgetFactory::createLayout( w, layout, WidgetFactory::HBox ); + obj = TQT_TQOBJECT(layout); + n = n.firstChild().toElement(); + continue; + } else if ( n.tagName() == "grid" ) { + layout = WidgetFactory::createLayout( w, layout, WidgetFactory::Grid ); + obj = TQT_TQOBJECT(layout); + n = n.firstChild().toElement(); + continue; + } else if ( n.tagName() == "vbox" ) { + layout = WidgetFactory::createLayout( w, layout, WidgetFactory::VBox ); + obj = TQT_TQOBJECT(layout); + n = n.firstChild().toElement(); + continue; + } else if ( n.tagName() == "property" && obj ) { + if ( n.attribute( "name" ) == "sizePolicy" ) { + // ### Evil hack ### Delay setting sizePolicy so it won't be overridden by other properties. + sizePolicyElement = n; + sizePolicyObject = obj; + } else { + setObjectProperty( obj, n.attribute( "name" ), n.firstChild().toElement() ); + } + } else if ( n.tagName() == "attribute" && w ) { + TQString attrib = n.attribute( "name" ); + TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); + if ( ::tqqt_cast(parent) ) { + if ( attrib == "title" ) + ( (TQTabWidget*)parent )->insertTab( w, v.toString() ); + } else if ( ::tqqt_cast(parent) ) { + if ( attrib == "id" ) + ( (QDesignerWidgetStack*)parent )->insertPage( w, v.toInt() ); + } else if ( ::tqqt_cast(parent) ) { + if ( attrib == "label" ) + ( (TQToolBox*)parent )->addItem( w, v.toString() ); + } else if ( ::tqqt_cast(parent) ) { + if ( attrib == "title" ) + ( (TQWizard*)parent )->addPage( w, v.toString() ); +#ifdef TQT_CONTAINER_CUSTOM_WIDGETS + } else if ( isPlugin ) { + if ( attrib == "label" ) { + WidgetInterface *iface = 0; + widgetManager()->queryInterface( parentClassName, &iface ); + if ( iface ) { + TQWidgetContainerInterfacePrivate *iface2 = 0; + iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 ); + if ( iface2 ) { + iface2->insertPage( parentClassName, + (TQWidget*)parent, v.toString(), -1, w ); + iface2->release(); + } + iface->release(); + } + } +#endif // TQT_CONTAINER_CUSTOM_WIDGETS + } + } else if ( n.tagName() == "item" ) { + createItem( n, w ); + } else if ( n.tagName() == "column" || n.tagName() =="row" ) { + createColumn( n, w ); + } + + n = n.nextSibling().toElement(); + } + + // ### Evil hack ### See description above. + if ( !sizePolicyElement.isNull() ) { + setObjectProperty( sizePolicyObject, + sizePolicyElement.attribute( "name" ), + sizePolicyElement.firstChild().toElement() ); + } + + if ( w->isWidgetType() ) + widgets.insert( w->name(), w ); + + return TQT_TQOBJECT(w); +} + +void Resource::createColumn( const TQDomElement &e, TQWidget *widget ) +{ + if ( !widget ) + return; + + if ( ::tqqt_cast(widget) && e.tagName() == "column" ) { + TQListView *lv = (TQListView*)widget; + TQDomElement n = e.firstChild().toElement(); + TQPixmap pix; + bool hasPixmap = FALSE; + TQString txt; + bool clickable = TRUE, resizable = TRUE; + while ( !n.isNull() ) { + if ( n.tagName() == "property" ) { + TQString attrib = n.attribute( "name" ); + TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); + if ( attrib == "text" ) + txt = v.toString(); + else if ( attrib == "pixmap" ) { + pix = loadPixmap( n.firstChild().toElement().toElement() ); + hasPixmap = !pix.isNull(); + } else if ( attrib == "clickable" ) + clickable = v.toBool(); + else if ( attrib == "resizable" ) + resizable = v.toBool(); + } + n = n.nextSibling().toElement(); + } + lv->addColumn( txt ); + int i = lv->header()->count() - 1; + if ( hasPixmap ) { + lv->header()->setLabel( i, pix, txt ); + } + if ( !clickable ) + lv->header()->setClickEnabled( clickable, i ); + if ( !resizable ) + lv->header()->setResizeEnabled( resizable, i ); + } +#ifndef TQT_NO_TABLE + else if ( ::tqqt_cast(widget) ) { + TQTable *table = (TQTable*)widget; + bool isRow; + if ( ( isRow = e.tagName() == "row" ) ) + table->setNumRows( table->numRows() + 1 ); + else + table->setNumCols( table->numCols() + 1 ); + + TQDomElement n = e.firstChild().toElement(); + TQPixmap pix; + bool hasPixmap = FALSE; + TQString txt; + TQString field; + TQMap fieldMap = MetaDataBase::columnFields( TQT_TQOBJECT(table) ); + while ( !n.isNull() ) { + if ( n.tagName() == "property" ) { + TQString attrib = n.attribute( "name" ); + TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); + if ( attrib == "text" ) + txt = v.toString(); + else if ( attrib == "pixmap" ) { + hasPixmap = !n.firstChild().firstChild().toText().data().isEmpty(); + if ( hasPixmap ) + pix = loadPixmap( n.firstChild().toElement() ); + } else if ( attrib == "field" ) + field = v.toString(); + } + n = n.nextSibling().toElement(); + } + + int i = isRow ? table->numRows() - 1 : table->numCols() - 1; + TQHeader *h = !isRow ? table->horizontalHeader() : table->verticalHeader(); + if ( hasPixmap ) + h->setLabel( i, pix, txt ); + else + h->setLabel( i, txt ); + if ( !isRow && !field.isEmpty() ) + fieldMap.insert( txt, field ); + MetaDataBase::setColumnFields( TQT_TQOBJECT(table), fieldMap ); + } +#endif +} + +void Resource::loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bool &hasPixmap ) +{ + TQDomElement n = e; + hasPixmap = FALSE; + while ( !n.isNull() ) { + if ( n.tagName() == "property" ) { + TQString attrib = n.attribute( "name" ); + TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); + if ( attrib == "text" ) + txt = v.toString(); + else if ( attrib == "pixmap" ) { + pix = loadPixmap( n.firstChild().toElement() ); + hasPixmap = !pix.isNull(); + } + } + n = n.nextSibling().toElement(); + } +} + +void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i ) +{ + if ( !widget || !WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ), TQT_TQOBJECT(widget) ) ) + return; + + if ( ::tqqt_cast(widget) || ::tqqt_cast(widget) ) { + TQDomElement n = e.firstChild().toElement(); + TQPixmap pix; + bool hasPixmap = FALSE; + TQString txt; + loadItem( n, pix, txt, hasPixmap ); + TQListBox *lb = 0; + if ( ::tqqt_cast(widget) ) + lb = (TQListBox*)widget; + else + lb = ( (TQComboBox*)widget)->listBox(); + if ( hasPixmap ) { + new TQListBoxPixmap( lb, pix, txt ); + } else { + new TQListBoxText( lb, txt ); + } + } else if ( ::tqqt_cast(widget) ) { + TQDomElement n = e.firstChild().toElement(); + TQPixmap pix; + bool hasPixmap = FALSE; + TQString txt; + loadItem( n, pix, txt, hasPixmap ); + TQIconView *iv = (TQIconView*)widget; + if ( hasPixmap ) + new TQIconViewItem( iv, txt, pix ); + else + new TQIconViewItem( iv, txt ); + } else if ( ::tqqt_cast(widget) ) { + TQDomElement n = e.firstChild().toElement(); + TQPixmap pix; + TQValueList pixmaps; + TQStringList textes; + TQListViewItem *item = 0; + TQListView *lv = (TQListView*)widget; + if ( i ) + item = new TQListViewItem( i, lastItem ); + else + item = new TQListViewItem( lv, lastItem ); + while ( !n.isNull() ) { + if ( n.tagName() == "property" ) { + TQString attrib = n.attribute( "name" ); + TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); + if ( attrib == "text" ) + textes << v.toString(); + else if ( attrib == "pixmap" ) { + TQString s = v.toString(); + if ( s.isEmpty() ) { + pixmaps << TQPixmap(); + } else { + pix = loadPixmap( n.firstChild().toElement() ); + pixmaps << pix; + } + } + } else if ( n.tagName() == "item" ) { + item->setOpen( TRUE ); + createItem( n, widget, item ); + } + + n = n.nextSibling().toElement(); + } + + for ( int i = 0; i < lv->columns(); ++i ) { + item->setText( i, textes[ i ] ); + item->setPixmap( i, pixmaps[ i ] ); + } + lastItem = item; + } +} + +TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLayout *layout, Qt::Orientation o ) +{ + TQDomElement n = e.firstChild().toElement(); + int row = e.attribute( "row" ).toInt(); + int col = e.attribute( "column" ).toInt(); + int rowspan = e.attribute( "rowspan" ).toInt(); + int colspan = e.attribute( "colspan" ).toInt(); + if ( rowspan < 1 ) + rowspan = 1; + if ( colspan < 1 ) + colspan = 1; + + Spacer *spacer = (Spacer*) WidgetFactory::create( WidgetDatabase::idFromClassName("Spacer"), + parent, "spacer", FALSE); + spacer->setOrientation( o ); + spacer->setInteraciveMode( FALSE ); + while ( !n.isNull() ) { + if ( n.tagName() == "property" ) + setObjectProperty( TQT_TQOBJECT(spacer), n.attribute( "name" ), n.firstChild().toElement() ); + n = n.nextSibling().toElement(); + } + spacer->setInteraciveMode( TRUE ); + if ( formwindow ) + formwindow->insertWidget( spacer, pasting ); + if ( layout ) { + if ( ::tqqt_cast(layout) ) + ( (TQBoxLayout*)layout )->addWidget( spacer, 0, spacer->alignment() ); + else + ( (QDesignerGridLayout*)layout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1, + spacer->alignment() ); + } + return spacer; +} + +/*! + Attention: this function has to be in sync with Uic::setObjectProperty(). If you change one, change both. +*/ +void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQDomElement &e ) +{ + const TQMetaProperty *p = obj->metaObject()->property( obj->metaObject()->findProperty( prop, TRUE ), TRUE ); + + if ( !::tqqt_cast(obj) ) {// no layouts in metadatabase... (RS) + if ( obj->inherits( "CustomWidget" ) ) { + MetaDataBase::CustomWidget *cw = ( (CustomWidget*)obj )->customWidget(); + if ( cw && !cw->hasProperty( prop.latin1() ) && !p && prop != "toolTip" && prop != "whatsThis" ) + return; + } + MetaDataBase::setPropertyChanged( obj, prop, TRUE ); + } + + TQVariant defVarient; + if ( e.tagName() == "font" ) { + TQFont f( tqApp->font() ); + if ( obj->isWidgetType() && ( (TQWidget*)obj )->parentWidget() ) + f = ( (TQWidget*)obj )->parentWidget()->font(); + defVarient = TQVariant( f ); + } + + TQString comment; + TQVariant v( DomTool::elementToVariant( e, defVarient, comment ) ); + + if ( !comment.isEmpty() ) { + MetaDataBase::addEntry( obj ); + MetaDataBase::setPropertyComment( obj, prop, comment ); + } + + if ( e.tagName() == "pixmap" ) { + TQPixmap pix = loadPixmap( e ); + if ( pix.isNull() ) + return; + v = TQVariant( pix ); + } else if ( e.tagName() == "iconset" ) { + TQPixmap pix = loadPixmap( e, "iconset" ); + if ( pix.isNull() ) + return; + v = TQVariant( TQIconSet( pix ) ); + } else if ( e.tagName() == "image" ) { + v = TQVariant( loadFromCollection( v.toString() ) ); + } + + if ( !p ) { + MetaDataBase::setFakeProperty( obj, prop, v ); + if ( obj->isWidgetType() ) { + if ( prop == "database" && TQT_TQOBJECT(obj) != TQT_TQOBJECT(toplevel) ) { + TQStringList lst = MetaDataBase::fakeProperty( obj, "database" ).toStringList(); + if ( lst.count() > 2 ) + dbControls.insert( obj->name(), lst[ 2 ] ); + else if ( lst.count() == 2 ) + dbTables.insert( obj->name(), lst ); + } + return; + } + } + + if ( e.tagName() == "palette" ) { + TQDomElement n = e.firstChild().toElement(); + TQPalette p; + while ( !n.isNull() ) { + TQColorGroup cg; + if ( n.tagName() == "active" ) { + cg = loadColorGroup( n ); + p.setActive( cg ); + } else if ( n.tagName() == "inactive" ) { + cg = loadColorGroup( n ); + p.setInactive( cg ); + } else if ( n.tagName() == "disabled" ) { + cg = loadColorGroup( n ); + p.setDisabled( cg ); + } + n = n.nextSibling().toElement(); + } + v = TQPalette( p ); + } else if ( e.tagName() == "enum" && p && p->isEnumType() && prop != "resizeMode" ) { + TQString key( v.toString() ); + int vi = p->keyToValue( key ); + if ( p->valueToKey( vi ) != key ) + return; // ignore invalid properties + v = TQVariant( vi ); + } else if ( e.tagName() == "set" && p && p->isSetType() ) { + TQString keys( v.toString() ); + TQStringList lst = TQStringList::split( '|', keys ); + TQStrList l; + for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) + l.append( *it ); + v = TQVariant( p->keysToValue( l ) ); + } + + if ( prop == "caption" ) { + TQCString s1 = v.toCString(); + TQString s2 = v.toString(); + if ( !s2.isEmpty() ) + formwindow->setCaption( s2 ); + else if ( !s1.isEmpty() ) + formwindow->setCaption( s1 ); + } + if ( prop == "icon" ) { + formwindow->setIcon( v.toPixmap() ); + TQString pmk = MetaDataBase::pixmapKey( TQT_TQOBJECT(formwindow), v.toPixmap().serialNumber() ); + MetaDataBase::setPixmapKey( TQT_TQOBJECT(formwindow), + formwindow->icon()->serialNumber(), pmk ); + } + + if ( prop == "geometry" ) { + if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(toplevel) ) { + hadGeometry = TRUE; + toplevel->resize( v.toRect().size() ); + return; + } else if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(formwindow->mainContainer()) ) { + hadGeometry = TRUE; + formwindow->resize( v.toRect().size() ); + return; + } + } + + if ( ::tqqt_cast(obj) ) { + if ( prop == "spacing" ) { + MetaDataBase::setSpacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) ), v.toInt() ); + return; + } else if ( prop == "margin" ) { + MetaDataBase::setMargin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) ), v.toInt() ); + return; + } else if ( e.tagName() == "enum" && prop == "resizeMode" ) { + MetaDataBase::setResizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) ), v.toString() ); + return; + } + } + + if ( prop == "name" ) { + if ( pasting ) { + TQString s = v.toString(); + formwindow->unify( TQT_TQOBJECT(obj), s, TRUE ); + obj->setName( s ); + return; + } else if ( formwindow && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(formwindow->mainContainer()) ) { + formwindow->setName( v.toCString() ); + } + } + + if ( prop == "sizePolicy" ) { + TQSizePolicy sp = v.toSizePolicy(); + sp.setHeightForWidth( ( (TQWidget*)obj )->sizePolicy().hasHeightForWidth() ); + } + + if ( prop == "cursor" ) + MetaDataBase::setCursor( (TQWidget*)obj, v.toCursor() ); + + obj->setProperty( prop, v ); +} + + +TQString Resource::saveInCollection( const TQImage &img ) +{ + TQString imgName = "none"; + TQValueList::Iterator it = images.begin(); + for ( ; it != images.end(); ++it ) { + if ( img == ( *it ).img ) { + imgName = ( *it ).name; + break; + } + } + + if ( imgName == "none" ) { + Image i; + imgName = "image" + TQString::number( images.count() ); + i.name = imgName; + i.img = img; + images.append( i ); + } + return imgName; +} + +void Resource::saveImageData( const TQImage &img, TQTextStream &ts, int indent ) +{ + TQByteArray ba; + TQBuffer buf( ba ); + buf.open( IO_WriteOnly | IO_Translate ); + TQString format; + bool compress = FALSE; + if (img.hasAlphaBuffer()) { + format = "PNG"; + } else { + format = img.depth() > 1 ? "XPM" : "XBM"; + compress = TRUE; + } + TQImageIO iio( &buf, format ); + iio.setImage( img ); + iio.write(); + buf.close(); + TQByteArray bazip = ba; + int i = 0; + if (compress) { + bazip = tqCompress( ba ); + format += ".GZ"; + // The first 4 bytes in tqCompress() are the length of the unzipped + // format. The XPM.GZ format does not use these. + i = 4; + } + ulong len = bazip.size(); + ts << makeIndent( indent ) << ""; + static const char hexchars[] = "0123456789abcdef"; + for (; i < (int)len; ++i ) { + uchar s = (uchar) bazip[i]; + ts << hexchars[s >> 4]; + ts << hexchars[s & 0x0f]; + } + ts << "" << endl; +} + +void Resource::saveImageCollection( TQTextStream &ts, int indent ) +{ + ts << makeIndent( indent ) << "" << endl; + indent++; + + TQValueList::Iterator it = images.begin(); + for ( ; it != images.end(); ++it ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + saveImageData( (*it).img, ts, indent ); + indent--; + ts << makeIndent( indent ) << "" << endl; + } + + indent--; + ts << makeIndent( indent ) << "" << endl; +} + +static TQImage loadImageData( TQDomElement &n2 ) +{ + TQImage img; + TQString data = n2.firstChild().toText().data(); + const int lengthOffset = 4; + int baSize = data.length() / 2 + lengthOffset; + uchar *ba = new uchar[ baSize ]; + for ( int i = lengthOffset; i < baSize; ++i ) { + char h = data[ 2 * (i-lengthOffset) ].latin1(); + char l = data[ 2 * (i-lengthOffset) + 1 ].latin1(); + uchar r = 0; + if ( h <= '9' ) + r += h - '0'; + else + r += h - 'a' + 10; + r = r << 4; + if ( l <= '9' ) + r += l - '0'; + else + r += l - 'a' + 10; + ba[ i ] = r; + } + TQString format = n2.attribute( "format", "PNG" ); + if ( format == "XPM.GZ" || format == "XBM.GZ" ) { + ulong len = n2.attribute( "length" ).toULong(); + if ( len < data.length() * 5 ) + len = data.length() * 5; + // tqUncompress() expects the first 4 bytes to be the expected length of + // the uncompressed data + ba[0] = ( len & 0xff000000 ) >> 24; + ba[1] = ( len & 0x00ff0000 ) >> 16; + ba[2] = ( len & 0x0000ff00 ) >> 8; + ba[3] = ( len & 0x000000ff ); + TQByteArray baunzip = tqUncompress( ba, baSize ); + img.loadFromData( (const uchar*)baunzip.data(), baunzip.size(), format.left(format.find('.')) ); + } else { + img.loadFromData( (const uchar*)ba+lengthOffset, baSize-lengthOffset, format ); + } + delete [] ba; + return img; +} + +void Resource::loadImageCollection( const TQDomElement &e ) +{ + TQDomElement n = e.firstChild().toElement(); + while ( !n.isNull() ) { + if ( n.tagName() == "image" ) { + Image img; + img.name = n.attribute( "name" ); + TQDomElement n2 = n.firstChild().toElement(); + while ( !n2.isNull() ) { + if ( n2.tagName() == "data" ) + img.img = loadImageData( n2 ); + n2 = n2.nextSibling().toElement(); + } + images.append( img ); + n = n.nextSibling().toElement(); + } + } +} + +TQImage Resource::loadFromCollection( const TQString &name ) +{ + TQValueList::Iterator it = images.begin(); + for ( ; it != images.end(); ++it ) { + if ( ( *it ).name == name ) + return ( *it ).img; + } + return TQImage(); +} + +void Resource::saveConnections( TQTextStream &ts, int indent ) +{ + TQValueList connections = MetaDataBase::connections( TQT_TQOBJECT(formwindow) ); + if ( connections.isEmpty() ) + return; + ts << makeIndent( indent ) << "" << endl; + indent++; + TQValueList::Iterator it = connections.begin(); + for ( ; it != connections.end(); ++it ) { + MetaDataBase::Connection conn = *it; + if ( ( knownNames.findIndex( TQString( conn.sender->name() ) ) == -1 && + qstrcmp( conn.sender->name(), "this" ) != 0 ) || + ( knownNames.findIndex( TQString( conn.receiver->name() ) ) == -1 && + qstrcmp( conn.receiver->name(), "this" ) != 0 ) ) + continue; + if ( formwindow->isMainContainer( TQT_TQOBJECT((*it).receiver) ) && + !MetaDataBase::hasSlot( TQT_TQOBJECT(formwindow), MetaDataBase::normalizeFunction( (*it).slot ).latin1() ) ) + continue; + + if ( conn.sender->inherits( "CustomWidget" ) ) { + MetaDataBase::CustomWidget *cw = ( (CustomWidget*)conn.sender )->customWidget(); + if ( cw && !cw->hasSignal( conn.signal ) ) + continue; + } + + if ( conn.receiver->inherits( "CustomWidget" ) && !formwindow->isMainContainer( conn.receiver ) ) { + MetaDataBase::CustomWidget *cw = ( (CustomWidget*)conn.receiver )->customWidget(); + if ( cw && !cw->hasSlot( MetaDataBase::normalizeFunction( conn.slot ).latin1() ) ) + continue; + } + + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << entitize( conn.sender->name() ) << "" << endl; + ts << makeIndent( indent ) << "" << entitize( conn.signal ) << "" << endl; + ts << makeIndent( indent ) << "" << entitize( conn.receiver->name() ) << "" << endl; + ts << makeIndent( indent ) << "" << entitize( MetaDataBase::normalizeFunction( conn.slot ) ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + } + + TQString lang = formwindow->project()->language(); + indent--; + ts << makeIndent( indent ) << "" << endl; +} + +void Resource::loadConnections( const TQDomElement &e ) +{ + TQDomElement n = e.firstChild().toElement(); + while ( !n.isNull() ) { + if ( n.tagName() == "connection" ) { + TQString lang = n.attribute( "language", "C++" ); + TQDomElement n2 = n.firstChild().toElement(); + MetaDataBase::Connection conn; + while ( !n2.isNull() ) { + if ( n2.tagName() == "sender" ) { + conn.sender = 0; + TQString name = n2.firstChild().toText().data(); + if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) { + conn.sender = TQT_TQOBJECT(toplevel); + } else { + if ( name == "this" ) + name = toplevel->name(); + TQObjectList *l = toplevel->queryList( 0, name, FALSE ); + if ( l ) { + if ( l->first() ) + conn.sender = l->first(); + delete l; + l = 0; + } + if ( !conn.sender ) + conn.sender = formwindow->findAction( name ); + } + } else if ( n2.tagName() == "signal" ) { + conn.signal = n2.firstChild().toText().data(); + } else if ( n2.tagName() == "receiver" ) { + conn.receiver = 0; + TQString name = n2.firstChild().toText().data(); + if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) { + conn.receiver = TQT_TQOBJECT(toplevel); + } else { + TQObjectList *l = toplevel->queryList( 0, name, FALSE ); + if ( l ) { + if ( l->first() ) + conn.receiver = l->first(); + delete l; + l = 0; + } + if ( !conn.receiver ) + conn.receiver = formwindow->findAction( name ); + } + } else if ( n2.tagName() == "slot" ) { + conn.slot = n2.firstChild().toText().data(); + } + n2 = n2.nextSibling().toElement(); + } + if ( formwindow ) { + if ( TQT_BASE_OBJECT(conn.sender) == TQT_BASE_OBJECT(formwindow) ) + conn.sender = TQT_TQOBJECT(formwindow->mainContainer()); + if ( TQT_BASE_OBJECT(conn.receiver) == TQT_BASE_OBJECT(formwindow) ) + conn.receiver = TQT_TQOBJECT(formwindow->mainContainer()); + } + if ( conn.sender && conn.receiver ) { + if ( lang == "C++" ) { + MetaDataBase::addConnection( TQT_TQOBJECT(formwindow ? formwindow : toplevel), + conn.sender, conn.signal, conn.receiver, conn.slot ); + } + } + } else if ( n.tagName() == "slot" ) { // compatibility with 2.x + MetaDataBase::Function slot; + slot.specifier = n.attribute( "specifier", "virtual" ); + if ( slot.specifier.isEmpty() ) + slot.specifier = "virtual"; + slot.access = n.attribute( "access", "public" ); + if ( slot.access.isEmpty() ) + slot.access = "public"; + slot.language = n.attribute( "language", "C++" ); + slot.returnType = n.attribute( "returnType", "void" ); + if ( slot.returnType.isEmpty() ) + slot.returnType = "void"; + slot.function = n.firstChild().toText().data(); + if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(formwindow), slot.function, TRUE ) ) + MetaDataBase::addFunction( TQT_TQOBJECT(formwindow), slot.function, slot.specifier, + slot.access, "slot", slot.language, slot.returnType ); + else + MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formwindow), slot.function, slot.function, + slot.specifier, slot.access, + "slot", slot.language, slot.returnType ); + } + n = n.nextSibling().toElement(); + } +} + +void Resource::saveCustomWidgets( TQTextStream &ts, int indent ) +{ + ts << makeIndent( indent ) << "" << endl; + indent++; + + TQPtrList *lst = MetaDataBase::customWidgets(); + for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) { + if ( usedCustomWidgets.findIndex( w->className ) == -1 ) + continue; + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << w->className << "" << endl; + ts << makeIndent( indent ) << "
    includePolicy == MetaDataBase::CustomWidget::Local ? "local" : "global" ) + << "\">" << w->includeFile << "
    " << endl; + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << w->sizeHint.width() << "" << endl; + ts << makeIndent( indent ) << "" << w->sizeHint.height() << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + ts << makeIndent( indent ) << "" << (int)w->isContainer << "" << endl; + ts << makeIndent( indent ) << "" << endl; + indent++; + ts << makeIndent( indent ) << "" << (int)w->sizePolicy.horData() << "" << endl; + ts << makeIndent( indent ) << "" << (int)w->sizePolicy.verData() << "" << endl; + ts << makeIndent( indent ) << "" << (int)w->sizePolicy.horStretch() << "" << endl; + ts << makeIndent( indent ) << "" << (int)w->sizePolicy.verStretch() << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + ts << makeIndent( indent ) << "" << saveInCollection( w->pixmap->convertToImage() ) << "" << endl; + if ( !w->lstSignals.isEmpty() ) { + for ( TQValueList::Iterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it ) + ts << makeIndent( indent ) << "" << entitize( *it ) << "" << endl; + } + if ( !w->lstSlots.isEmpty() ) { + for ( TQValueList::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) + ts << makeIndent( indent ) << "" << entitize( (*it).function ) << "" << endl; + } + if ( !w->lstProperties.isEmpty() ) { + for ( TQValueList::Iterator it = w->lstProperties.begin(); it != w->lstProperties.end(); ++it ) + ts << makeIndent( indent ) << "" << entitize( (*it).property ) << "" << endl; + } + indent--; + ts << makeIndent( indent ) << "
    " << endl; + } + + + indent--; + ts << makeIndent( indent ) << "
    " << endl; +} + +void Resource::loadCustomWidgets( const TQDomElement &e, Resource *r ) +{ + TQDomElement n = e.firstChild().toElement(); + while ( !n.isNull() ) { + if ( n.tagName() == "customwidget" ) { + TQDomElement n2 = n.firstChild().toElement(); + MetaDataBase::CustomWidget *w = new MetaDataBase::CustomWidget; + while ( !n2.isNull() ) { + if ( n2.tagName() == "class" ) { + w->className = n2.firstChild().toText().data(); + } else if ( n2.tagName() == "header" ) { + w->includeFile = n2.firstChild().toText().data(); + TQString s = n2.attribute( "location" ); + if ( s != "local" ) + w->includePolicy = MetaDataBase::CustomWidget::Global; + else + w->includePolicy = MetaDataBase::CustomWidget::Local; + } else if ( n2.tagName() == "sizehint" ) { + TQDomElement n3 = n2.firstChild().toElement(); + while ( !n3.isNull() ) { + if ( n3.tagName() == "width" ) + w->sizeHint.setWidth( n3.firstChild().toText().data().toInt() ); + else if ( n3.tagName() == "height" ) + w->sizeHint.setHeight( n3.firstChild().toText().data().toInt() ); + n3 = n3.nextSibling().toElement(); + } + } else if ( n2.tagName() == "sizepolicy" ) { + TQDomElement n3 = n2.firstChild().toElement(); + while ( !n3.isNull() ) { + if ( n3.tagName() == "hordata" ) + w->sizePolicy.setHorData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() ); + else if ( n3.tagName() == "verdata" ) + w->sizePolicy.setVerData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() ); + else if ( n3.tagName() == "horstretch" ) + w->sizePolicy.setHorStretch( n3.firstChild().toText().data().toInt() ); + else if ( n3.tagName() == "verstretch" ) + w->sizePolicy.setVerStretch( n3.firstChild().toText().data().toInt() ); + n3 = n3.nextSibling().toElement(); + } + } else if ( n2.tagName() == "pixmap" ) { + TQPixmap pix; + if ( r ) { + pix = r->loadPixmap( n2 ); + } else { + TQDomElement n3 = n2.firstChild().toElement(); + TQImage img; + while ( !n3.isNull() ) { + if ( n3.tagName() == "data" ) { + img = loadImageData( n3 ); + } + n3 = n3.nextSibling().toElement(); + } + pix.convertFromImage( img ); + } + w->pixmap = new TQPixmap( pix ); + } else if ( n2.tagName() == "signal" ) { + w->lstSignals.append( n2.firstChild().toText().data().latin1() ); + } else if ( n2.tagName() == "container" ) { + w->isContainer = (bool)n2.firstChild().toText().data().toInt(); + } else if ( n2.tagName() == "slot" ) { + MetaDataBase::Function function; + function.function = n2.firstChild().toText().data().latin1(); + function.access = n2.attribute( "access" ); + function.type = "slot"; + w->lstSlots.append( function ); + } else if ( n2.tagName() == "property" ) { + MetaDataBase::Property property; + property.property = n2.firstChild().toText().data().latin1(); + property.type = n2.attribute( "type" ); + w->lstProperties.append( property ); + } + n2 = n2.nextSibling().toElement(); + } + MetaDataBase::addCustomWidget( w ); + } + n = n.nextSibling().toElement(); + } +} + +void Resource::saveTabOrder( TQTextStream &ts, int indent ) +{ + TQWidgetList l = MetaDataBase::tabOrder( toplevel ); + if ( l.isEmpty() ) + return; + + ts << makeIndent( indent ) << "" << endl; + indent++; + + for ( TQWidget *w = l.first(); w; w = l.next() ) { + if ( w->testWState( TQt::WState_ForceHide ) || knownNames.findIndex( w->name() ) == -1 ) + continue; + ts << makeIndent( indent ) << "" << w->name() << "" << endl; + } + + indent--; + ts << makeIndent( indent ) << "" << endl; +} + +void Resource::loadTabOrder( const TQDomElement &e ) +{ + TQWidget *last = 0; + TQDomElement n = e.firstChild().toElement(); + TQWidgetList widgets; + while ( !n.isNull() ) { + if ( n.tagName() == "tabstop" ) { + TQString name = n.firstChild().toText().data(); + if ( name.isEmpty() ) + continue; + TQObjectList *l = toplevel->queryList( 0, name, FALSE ); + if ( l ) { + if ( l->first() ) { + TQWidget *w = (TQWidget*)l->first(); + widgets.append( w ); + if ( last ) + toplevel->setTabOrder( last, w ); + last = w; + } + delete l; + } + } + n = n.nextSibling().toElement(); + } + + if ( !widgets.isEmpty() ) + MetaDataBase::setTabOrder( toplevel, widgets ); +} + +void Resource::saveMetaInfoBefore( TQTextStream &ts, int indent ) +{ + MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( TQT_TQOBJECT(formwindow) ); + TQString cn; + if ( info.classNameChanged && !info.className.isEmpty() ) + cn = info.className; + else + cn = formwindow->name(); + ts << makeIndent( indent ) << "" << entitize( cn ) << "" << endl; + if ( !info.comment.isEmpty() ) + ts << makeIndent( indent ) << "" << entitize( info.comment ) << "" << endl; + if ( !info.author.isEmpty() ) + ts << makeIndent( indent ) << "" << entitize( info.author ) << "" << endl; +} + +void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent ) +{ + MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( TQT_TQOBJECT(formwindow) ); + if ( !langIface || formwindow->project()->isCpp() ) { + TQValueList includes = MetaDataBase::includes( TQT_TQOBJECT(formwindow) ); + TQString extensionInclude; + bool needExtensionInclude = FALSE; + if ( langIface && + formwindow->formFile()->hasFormCode() && + formwindow->formFile()->codeFileState() != FormFile::Deleted ) { + extensionInclude = TQFileInfo( currFileName ).fileName() + langIface->formCodeExtension(); + needExtensionInclude = TRUE; + } + if ( !includes.isEmpty() || needExtensionInclude ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + + for ( TQValueList::Iterator it = includes.begin(); it != includes.end(); ++it ) { + ts << makeIndent( indent ) << "" << (*it).header << "" << endl; + if ( needExtensionInclude ) + needExtensionInclude = (*it).header != extensionInclude; + } + + if ( needExtensionInclude ) + ts << makeIndent( indent ) << "" + << extensionInclude << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + } + + TQStringList forwards = MetaDataBase::forwards( TQT_TQOBJECT(formwindow) ); + if ( !forwards.isEmpty() ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + for ( TQStringList::Iterator it2 = forwards.begin(); it2 != forwards.end(); ++it2 ) + ts << makeIndent( indent ) << "" << entitize( *it2 ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + } + TQValueList varLst = MetaDataBase::variables( TQT_TQOBJECT(formwindow) ); + if ( !varLst.isEmpty() ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + + TQValueList::Iterator it = varLst.begin(); + for ( ; it != varLst.end(); ++it ) { + ts << makeIndent( indent ) << "" << entitize( (*it).varName ) << "" << endl; + } + indent--; + ts << makeIndent( indent ) << "" << endl; + } + TQStringList sigs = MetaDataBase::signalList( TQT_TQOBJECT(formwindow) ); + if ( !sigs.isEmpty() ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + for ( TQStringList::Iterator it3 = sigs.begin(); it3 != sigs.end(); ++it3 ) + ts << makeIndent( indent ) << "" << entitize( *it3 ) << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; + } + + TQValueList slotList = MetaDataBase::slotList( TQT_TQOBJECT(formwindow) ); + if ( !slotList.isEmpty() ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + TQString lang = formwindow->project()->language(); + TQValueList::Iterator it = slotList.begin(); + for ( ; it != slotList.end(); ++it ) { + MetaDataBase::Function function = *it; + ts << makeIndent( indent ) << "" << entitize( function.function ) << "" << endl; + } + indent--; + ts << makeIndent( indent ) << "" << endl; + } + + TQValueList functionList = MetaDataBase::functionList( TQT_TQOBJECT(formwindow), TRUE ); + if ( !functionList.isEmpty() ) { + ts << makeIndent( indent ) << "" << endl; + indent++; + TQString lang = formwindow->project()->language(); + TQValueList::Iterator it = functionList.begin(); + for ( ; it != functionList.end(); ++it ) { + MetaDataBase::Function function = *it; + ts << makeIndent( indent ) << "" << entitize( function.function ) << "
    " << endl; + } + indent--; + ts << makeIndent( indent ) << "" << endl; + } + } + + if ( formwindow && formwindow->savePixmapInline() ) + ; + else if ( formwindow && formwindow->savePixmapInProject() ) + ts << makeIndent( indent ) << "" << endl; + else + ts << makeIndent( indent ) << "" << formwindow->pixmapLoaderFunction() << "" << endl; + if ( !( exportMacro = MetaDataBase::exportMacro( TQT_TQOBJECT(formwindow->mainContainer()) ) ).isEmpty() ) + ts << makeIndent( indent ) << "" << exportMacro << "" << endl; + if ( formwindow ) { + ts << makeIndent( indent ) << "layoutDefaultSpacing() + << "\" margin=\"" << formwindow->layoutDefaultMargin() << "\"/>" << endl; + if ( formwindow->hasLayoutFunctions() ) { + TQString s = ""; + TQString m = ""; + if ( !formwindow->spacingFunction().isEmpty() ) + s = TQString( " spacing=\"%1\"" ).arg( formwindow->spacingFunction() ); + if ( !formwindow->marginFunction().isEmpty() ) + m = TQString( " margin=\"%1\"" ).arg( formwindow->marginFunction() ); + ts << makeIndent( indent ) << "" << endl; + } + } +} + +void Resource::saveIncludeHints( TQTextStream &ts, int indent ) +{ + if ( includeHints.isEmpty() ) + return; + ts << makeIndent( indent ) << "" << endl; + indent++; + for ( TQStringList::Iterator it = includeHints.begin(); it != includeHints.end(); ++it ) + ts << makeIndent( indent ) << "" << *it << "" << endl; + indent--; + ts << makeIndent( indent ) << "" << endl; +} + +TQColorGroup Resource::loadColorGroup( const TQDomElement &e ) +{ + TQColorGroup cg; + int r = -1; + TQDomElement n = e.firstChild().toElement(); + TQColor col; + while ( !n.isNull() ) { + if ( n.tagName() == "color" ) { + r++; + cg.setColor( (TQColorGroup::ColorRole)r, (col = DomTool::readColor( n ) ) ); + } else if ( n.tagName() == "pixmap" ) { + TQPixmap pix = loadPixmap( n ); + cg.setBrush( (TQColorGroup::ColorRole)r, TQBrush( col, pix ) ); + } + n = n.nextSibling().toElement(); + } + return cg; +} + +void Resource::saveChildActions( TQAction *a, TQTextStream &ts, int indent ) +{ + TQObjectList clo = a->childrenListObject(); + if ( clo.isEmpty() ) + return; + TQObjectListIt it( clo ); + while ( it.current() ) { + TQObject *o = it.current(); + ++it; + if ( !::tqqt_cast(o) ) + continue; + TQAction *ac = (TQAction*)o; + bool isGroup = ::tqqt_cast(ac); + if ( isGroup ) + ts << makeIndent( indent ) << "" << endl; + else + ts << makeIndent( indent ) << "" << endl; + indent++; + saveObjectProperties( ac, ts, indent ); + indent--; + if ( isGroup ) { + indent++; + saveChildActions( ac, ts, indent ); + indent--; + } + if ( isGroup ) + ts << makeIndent( indent ) << "" << endl; + else + ts << makeIndent( indent ) << "" << endl; + } +} + +void Resource::saveActions( const TQPtrList &actions, TQTextStream &ts, int indent ) +{ + if ( actions.isEmpty() ) + return; + ts << makeIndent( indent ) << "" << endl; + indent++; + TQPtrListIterator it( actions ); + while ( it.current() ) { + TQAction *a = it.current(); + bool isGroup = ::tqqt_cast(a); + if ( isGroup ) + ts << makeIndent( indent ) << "" << endl; + else + ts << makeIndent( indent ) << "" << endl; + indent++; + saveObjectProperties( a, ts, indent ); + indent--; + if ( isGroup ) { + indent++; + saveChildActions( a, ts, indent ); + indent--; + } + if ( isGroup ) + ts << makeIndent( indent ) << "" << endl; + else + ts << makeIndent( indent ) << "" << endl; + ++it; + } + indent--; + ts << makeIndent( indent ) << "" << endl; +} + +void Resource::loadChildAction( TQObject *parent, const TQDomElement &e ) +{ + TQDomElement n = e; + TQAction *a = 0; + if ( n.tagName() == "action" ) { + a = new QDesignerAction( parent ); + MetaDataBase::addEntry( a ); + TQDomElement n2 = n.firstChild().toElement(); + bool hasMenuText = FALSE; + while ( !n2.isNull() ) { + if ( n2.tagName() == "property" ) { + TQDomElement n3(n2); // don't modify n2 + TQString prop = n3.attribute( "name" ); + if (prop == "menuText") + hasMenuText = TRUE; + TQDomElement value(n3.firstChild().toElement()); + setObjectProperty( a, prop, value ); + if (!hasMenuText && uiFileVersion < "3.3" && prop == "text") + setObjectProperty( a, "menuText", value ); + } + n2 = n2.nextSibling().toElement(); + } + if ( !::tqqt_cast(parent) ) + formwindow->actionList().append( a ); + } else if ( n.tagName() == "actiongroup" ) { + a = new QDesignerActionGroup( parent ); + MetaDataBase::addEntry( a ); + TQDomElement n2 = n.firstChild().toElement(); + bool hasMenuText = FALSE; + while ( !n2.isNull() ) { + if ( n2.tagName() == "property" ) { + TQDomElement n3(n2); // don't modify n2 + TQString prop = n3.attribute( "name" ); + if (prop == "menuText") + hasMenuText = TRUE; + TQDomElement value = n3.firstChild().toElement(); + setObjectProperty( a, prop, value ); + if (!hasMenuText && uiFileVersion < "3.3" && prop == "text") + setObjectProperty( a, "menuText", value ); + } else if ( n2.tagName() == "action" || + n2.tagName() == "actiongroup" ) { + loadChildAction( a, n2 ); + } + n2 = n2.nextSibling().toElement(); + } + if ( !::tqqt_cast(parent) ) + formwindow->actionList().append( a ); + } +} + +void Resource::loadActions( const TQDomElement &e ) +{ + TQDomElement n = e.firstChild().toElement(); + while ( !n.isNull() ) { + if ( n.tagName() == "action" ) { + loadChildAction( TQT_TQOBJECT(formwindow), n ); + } else if ( n.tagName() == "actiongroup" ) { + loadChildAction( TQT_TQOBJECT(formwindow), n ); + } + n = n.nextSibling().toElement(); + } +} + +void Resource::saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent ) +{ + ts << makeIndent( indent ) << "" << endl; + indent++; + + TQPtrList tbList; + for ( int i = 0; i <= (int)TQt::DockMinimized; ++i ) { + tbList = mw->toolBars( (TQt::Dock)i ); + if ( tbList.isEmpty() ) + continue; + for ( TQToolBar *tb = tbList.first(); tb; tb = tbList.next() ) { + if ( tb->isHidden() ) + continue; + ts << makeIndent( indent ) << "" << endl; + indent++; + saveObjectProperties( TQT_TQOBJECT(tb), ts, indent ); + TQPtrList actionList = ( (QDesignerToolBar*)tb )->insertedActions(); + for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { + if ( ::tqqt_cast(a) ) { + ts << makeIndent( indent ) << "" << endl; + } else { + if ( ::tqqt_cast(a) && !( (QDesignerAction*)a )->supportsMenu() ) { + TQWidget *w = ( (QDesignerAction*)a )->widget(); + ts << makeIndent( indent ) << "" << endl; + indent++; + const char *className = WidgetFactory::classNameOf( TQT_TQOBJECT(w) ); + if ( w->isA( "CustomWidget" ) ) + usedCustomWidgets << TQString( className ); + if ( WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) + saveItems( TQT_TQOBJECT(w), ts, indent ); + saveObjectProperties( TQT_TQOBJECT(w), ts, indent ); + indent--; + ts << makeIndent( indent ) << "" << endl; + } else { + ts << makeIndent( indent ) << "name() << "\"/>" << endl; + } + } + } + indent--; + ts << makeIndent( indent ) << "" << endl; + } + } + indent--; + ts << makeIndent( indent ) << "" << endl; +} + +void Resource::saveMenuBar( TQMainWindow *mw, TQTextStream &ts, int indent ) +{ + MenuBarEditor *mb = (MenuBarEditor *)mw->child( 0, "MenuBarEditor" ); + if ( !mb ) + return; + ts << makeIndent( indent ) << "" << endl; + indent++; + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(mb), "name", TRUE ); // FIXME: remove + saveObjectProperties( TQT_TQOBJECT(mb), ts, indent ); + + for ( int i = 0; i < (int)mb->count(); ++i ) { + MenuBarEditorItem *m = mb->item( i ); + if ( !m ) + continue; + if ( m->isSeparator() ) { + ts << makeIndent( indent ) << "" << endl; + } else { + ts << makeIndent( indent ) << "menuText() ) + << "\" name=\"" << entitize( m->menu()->name() ) << "\">" << endl; + indent++; + savePopupMenu( m->menu(), mw, ts, indent ); + indent--; + ts << makeIndent( indent ) << "" << endl; + } + } + indent--; + ts << makeIndent( indent ) << "" << endl; +} + +void Resource::savePopupMenu( PopupMenuEditor *pm, TQMainWindow *mw, TQTextStream &ts, int indent ) +{ + for ( PopupMenuEditorItem *i = pm->items()->first(); i; i = pm->items()->next() ) { + TQAction *a = i->action(); + if ( ::tqqt_cast(a) ) + ts << makeIndent( indent ) << "" << endl; + else if ( ::tqqt_cast(a) ) + ts << makeIndent( indent ) << "name() << "\"/>" << endl; + else if ( ::tqqt_cast(a) ) + ts << makeIndent( indent ) << "name() << "\"/>" << endl; + PopupMenuEditor *s = i->subMenu(); + if ( s && s->count() ) { + TQString n = s->name(); + ts << makeIndent( indent ) << "menuText() ) + << "\" name=\"" << entitize( n ) + << "\" accel=\"" << entitize( a->accel() ) + << "\">" << endl; + indent++; + savePopupMenu( s, mw, ts, indent ); + indent--; + ts << makeIndent( indent ) << "" << endl; + } + } +} + +void Resource::loadToolBars( const TQDomElement &e ) +{ + TQDomElement n = e.firstChild().toElement(); + TQMainWindow *mw = ( (TQMainWindow*)formwindow->mainContainer() ); + QDesignerToolBar *tb = 0; + while ( !n.isNull() ) { + if ( n.tagName() == "toolbar" ) { + TQt::Dock dock = (TQt::Dock)n.attribute( "dock" ).toInt(); + tb = new QDesignerToolBar( mw, dock ); + TQDomElement n2 = n.firstChild().toElement(); + while ( !n2.isNull() ) { + if ( n2.tagName() == "action" ) { + TQAction *a = formwindow->findAction( n2.attribute( "name" ) ); + if ( a ) { + a->addTo( tb ); + tb->addAction( a ); + } + } else if ( n2.tagName() == "separator" ) { + TQAction *a = new QSeparatorAction( 0 ); + a->addTo( tb ); + tb->addAction( a ); + } else if ( n2.tagName() == "widget" ) { + TQWidget *w = (TQWidget*)createObject( n2, tb ); + QDesignerAction *a = new QDesignerAction( w, TQT_TQOBJECT(tb) ); + a->addTo( tb ); + tb->addAction( a ); + tb->installEventFilters( w ); + } else if ( n2.tagName() == "property" ) { + setObjectProperty( TQT_TQOBJECT(tb), n2.attribute( "name" ), n2.firstChild().toElement() ); + } + n2 = n2.nextSibling().toElement(); + } + } + n = n.nextSibling().toElement(); + } +} + +void Resource::loadMenuBar( const TQDomElement &e ) +{ + TQDomElement n = e.firstChild().toElement(); + TQMainWindow *mw = (TQMainWindow*)formwindow->mainContainer(); + MenuBarEditor *mb = new MenuBarEditor( formwindow, mw ); + MetaDataBase::addEntry( TQT_TQOBJECT(mb) ); + while ( !n.isNull() ) { + if ( n.tagName() == "item" ) { + PopupMenuEditor * popup = new PopupMenuEditor( formwindow, mw ); + loadPopupMenu( popup, n ); + popup->setName( n.attribute( "name" ) ); + mb->insertItem( n.attribute( "text" ), popup ); + MetaDataBase::addEntry( TQT_TQOBJECT(popup) ); + } else if ( n.tagName() == "property" ) { + setObjectProperty( TQT_TQOBJECT(mb), n.attribute( "name" ), n.firstChild().toElement() ); + } else if ( n.tagName() == "separator" ) { + mb->insertSeparator(); + } + n = n.nextSibling().toElement(); + } +} + +void Resource::loadPopupMenu( PopupMenuEditor *p, const TQDomElement &e ) +{ + MetaDataBase::addEntry( TQT_TQOBJECT(p) ); + TQDomElement n = e.firstChild().toElement(); + TQAction *a = 0; + while ( !n.isNull() ) { + if ( n.tagName() == "action" || n.tagName() == "actiongroup") { + a = formwindow->findAction( n.attribute( "name" ) ); + if ( a ) + p->insert( a ); + } + if ( n.tagName() == "item" ) { + PopupMenuEditorItem *i = p->at( p->find( a ) ); + if ( i ) { + TQString name = n.attribute( "name" ); + formwindow->unify( i, name, TRUE ); + i->setName( name ); + MetaDataBase::addEntry( i ); + loadPopupMenu( i->subMenu(), n ); + } + } else if ( n.tagName() == "separator" ) { + a = new QSeparatorAction( 0 ); + p->insert( a ); + } + n = n.nextSibling().toElement(); + } +} + +bool Resource::saveFormCode( FormFile *formfile, LanguageInterface * /*langIface*/ ) +{ + TQString lang = formfile->project()->language(); + if ( formfile->hasTempFileName() || + formfile->code().isEmpty() || + !formfile->hasFormCode() || + !formfile->isModified(FormFile::WFormCode) ) + return TRUE; // There is no code to be saved. + return saveCode( formfile->project()->makeAbsolute(formfile->codeFile()), + formfile->code() ); +} + +void Resource::loadExtraSource( FormFile *formfile, const TQString &currFileName, + LanguageInterface *langIface, bool hasFunctions ) +{ + TQString lang = "TQt Script"; + if ( MainWindow::self ) + lang = MainWindow::self->currProject()->language(); + LanguageInterface *iface = langIface; + if ( hasFunctions || !iface ) + return; + TQValueList functions; + TQStringList forwards; + TQStringList includesImpl; + TQStringList includesDecl; + TQStringList vars; + TQValueList connections; + + iface->loadFormCode( formfile->formName(), + currFileName + iface->formCodeExtension(), + functions, + vars, + connections ); + + TQFile f( formfile->project()->makeAbsolute( formfile->codeFile() ) ); + TQString code; + if ( f.open( IO_ReadOnly ) ) { + TQTextStream ts( &f ); + code = ts.read(); + } + formfile->setCode( code ); + + if ( !MainWindow::self || !MainWindow::self->currProject()->isCpp() ) + MetaDataBase::setupConnections( formfile, connections ); + + for ( TQValueList::Iterator fit = functions.begin(); + fit != functions.end(); ++fit ) { + + if ( MetaDataBase::hasFunction( formfile->formWindow() ? + (TQObject*)formfile->formWindow() : + (TQObject*)formfile, + (*fit).name.latin1() ) ) { + TQString access = (*fit).access; + if ( !MainWindow::self || !MainWindow::self->currProject()->isCpp() ) + MetaDataBase::changeFunction( formfile->formWindow() ? + (TQObject*)formfile->formWindow() : + (TQObject*)formfile, + (*fit).name, + (*fit).name, + TQString() ); + } else { + TQString access = (*fit).access; + if ( access.isEmpty() ) + access = "protected"; + TQString type = "function"; + if ( (*fit).returnType == "void" ) + type = "slot"; + MetaDataBase::addFunction( formfile->formWindow() ? + (TQObject*)formfile->formWindow() : + (TQObject*)formfile, + (*fit).name.latin1(), "virtual", (*fit).access, + type, lang, (*fit).returnType ); + } + } +} diff --git a/tdevdesigner/designer/resource.h b/kdevdesigner/designer/resource.h similarity index 100% rename from tdevdesigner/designer/resource.h rename to kdevdesigner/designer/resource.h diff --git a/tdevdesigner/designer/richtextfontdialog.ui b/kdevdesigner/designer/richtextfontdialog.ui similarity index 100% rename from tdevdesigner/designer/richtextfontdialog.ui rename to kdevdesigner/designer/richtextfontdialog.ui diff --git a/tdevdesigner/designer/richtextfontdialog.ui.h b/kdevdesigner/designer/richtextfontdialog.ui.h similarity index 100% rename from tdevdesigner/designer/richtextfontdialog.ui.h rename to kdevdesigner/designer/richtextfontdialog.ui.h diff --git a/tdevdesigner/designer/sizehandle.cpp b/kdevdesigner/designer/sizehandle.cpp similarity index 100% rename from tdevdesigner/designer/sizehandle.cpp rename to kdevdesigner/designer/sizehandle.cpp diff --git a/tdevdesigner/designer/sizehandle.h b/kdevdesigner/designer/sizehandle.h similarity index 100% rename from tdevdesigner/designer/sizehandle.h rename to kdevdesigner/designer/sizehandle.h diff --git a/kdevdesigner/designer/sourceeditor.cpp b/kdevdesigner/designer/sourceeditor.cpp new file mode 100644 index 00000000..2850e20e --- /dev/null +++ b/kdevdesigner/designer/sourceeditor.cpp @@ -0,0 +1,320 @@ +/********************************************************************** +** Copyright (C) 2000 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ +#include + +#include "sourceeditor.h" + +#include "formwindow.h" +#include "metadatabase.h" +#include "project.h" +#include "mainwindow.h" +#include "../interfaces/languageinterface.h" +#include +#include "project.h" +#include "sourcefile.h" +#include "hierarchyview.h" +#include +#include +#include "kdevdesigner_part.h" + +SourceEditor::SourceEditor( TQWidget *parent, EditorInterface *iface, LanguageInterface *liface ) + : TQVBox( parent, 0, WDestructiveClose ), iFace( iface ), lIface( liface ), obj( 0 ), pro( 0 ) +{ + iFace->addRef(); + lIface->addRef(); + editor = iFace->editor( MainWindow::self->areEditorsReadOnly(), + this, MainWindow::self->designerInterface() ); + iFace->onBreakPointChange( TQT_TQOBJECT(MainWindow::self), TQT_SLOT( breakPointsChanged() ) ); + resize( 600, 400 ); + setIcon( SmallIcon( "designer_filenew.png" , KDevDesignerPartFactory::instance()) ); +} + +SourceEditor::~SourceEditor() +{ + saveBreakPoints(); + editor = 0; + if ( formWindow() ) { + formWindow()->formFile()->setCodeEdited( FALSE ); + formWindow()->formFile()->setEditor( 0 ); + } else if ( sourceFile() ) { + sourceFile()->setEditor( 0 ); + if ( MainWindow::self->objectHierarchy()->sourceEditor() == this ) + MainWindow::self->objectHierarchy()->setFormWindow( 0, 0 ); + } + iFace->release(); + lIface->release(); + MainWindow::self->editorClosed( this ); +} + +void SourceEditor::setObject( TQObject *o, Project *p ) +{ + if ( sourceFile() ) + sourceFile()->setEditor( 0 ); + if ( formWindow() ) { + formWindow()->formFile()->setCodeEdited( FALSE ); + formWindow()->formFile()->setEditor( 0 ); + } + if ( ::tqqt_cast(o) ) + ( (FormWindow*)o )->formFile()->setCodeEdited( TRUE ); + save(); + bool changed = FALSE; + if ( &(*obj) != o ) { + saveBreakPoints(); + changed = TRUE; + } + obj = o; + pro = p; + if ( formWindow() ) { + if ( formWindow()->isFake() ) + setCaption( formWindow()->project()->objectForFakeForm( formWindow() )->name() ); + else + setCaption( obj->name() ); + } else { + setCaption( sourceFile()->fileName() ); + } + if ( sourceFile() ) + sourceFile()->setEditor( this ); + else if ( formWindow() ) + formWindow()->formFile()->setEditor( this ); + iFace->setText( sourceOfObject( obj, lang, iFace, lIface ) ); + if ( pro && formWindow() ) { + if ( formWindow()->isFake() ) + iFace->setContext( pro->objectForFakeFormFile( formWindow()->formFile() ) ); + else + iFace->setContext( TQT_TQOBJECT(formWindow()->mainContainer()) ); + } else { + iFace->setContext( 0 ); + } + if ( changed || sourceFile() ) + iFace->setBreakPoints( MetaDataBase::breakPoints( o ) ); + MainWindow::self->objectHierarchy()->showClasses( this ); +} + +TQString SourceEditor::sourceOfObject( TQObject *o, const TQString &, + EditorInterface *, LanguageInterface * ) +{ + TQString txt; + if ( !o ) + return txt; + if ( ::tqqt_cast(o) ) + txt = ( (FormWindow*)o )->formFile()->code(); + else if ( ::tqqt_cast(o) ) + txt = ( (SourceFile*)o )->text(); + return txt; +} + +void SourceEditor::setFunction( const TQString &func, const TQString &clss ) +{ + iFace->scrollTo( lIface->createFunctionStart( obj->name(), func, "", "" ), clss ); +} + +void SourceEditor::setClass( const TQString &clss ) +{ + iFace->scrollTo( clss, TQString() ); +} + +void SourceEditor::closeEvent( TQCloseEvent *e ) +{ + e->accept(); + if ( !obj ) + return; + if ( formWindow() ) { + save(); + formWindow()->formFile()->cm = formWindow()->formFile()->isModified(); + } else { + if ( !sourceFile()->closeEvent() ) + e->ignore(); + } +} + +void SourceEditor::save() +{ + if ( !obj ) + return; + if ( formWindow() ) + formWindow()->formFile()->syncCode(); + else if ( sourceFile() && sourceFile()->editor() ) + sourceFile()->setText( iFace->text() ); +} + +TQString SourceEditor::language() const +{ + return lang; +} + +void SourceEditor::setLanguage( const TQString &l ) +{ + lang = l; +} + +void SourceEditor::editCut() +{ + iFace->cut(); +} + +void SourceEditor::editCopy() +{ + iFace->copy(); +} + +void SourceEditor::editPaste() +{ + iFace->paste(); +} + +bool SourceEditor::editIsUndoAvailable() +{ + return iFace->isUndoAvailable(); +} + +bool SourceEditor::editIsRedoAvailable() +{ + return iFace->isRedoAvailable(); +} + +void SourceEditor::editUndo() +{ + iFace->undo(); +} + +void SourceEditor::editRedo() +{ + iFace->redo(); +} + +void SourceEditor::editSelectAll() +{ + iFace->selectAll(); +} + +void SourceEditor::configChanged() +{ + iFace->readSettings(); +} + +void SourceEditor::setModified( bool b ) +{ + iFace->setModified( b ); +} + +void SourceEditor::refresh( bool allowSave ) +{ + if ( allowSave ) + save(); + bool oldMod = iFace->isModified(); + iFace->setText( sourceOfObject( obj, lang, iFace, lIface ) ); + iFace->setModified( oldMod ); +} + +void SourceEditor::resetContext() +{ + if ( pro && formWindow() ) { + if ( formWindow()->isFake() ) + iFace->setContext( pro->objectForFakeFormFile( formWindow()->formFile() ) ); + else + iFace->setContext( TQT_TQOBJECT(formWindow()->mainContainer()) ); + } else { + iFace->setContext( 0 ); + } +} + +void SourceEditor::setFocus() +{ + if ( formWindow() ) + formWindow()->formFile()->setCodeEdited( TRUE ); + if ( editor ) + editor->setFocus(); +} + +int SourceEditor::numLines() const +{ + return iFace->numLines(); +} + +void SourceEditor::saveBreakPoints() +{ + if ( !obj ) + return; + TQValueList l; + iFace->breakPoints( l ); + MetaDataBase::setBreakPoints( obj, l ); +} + +void SourceEditor::clearStep() +{ + iFace->clearStep(); +} + +void SourceEditor::clearStackFrame() +{ + iFace->clearStackFrame(); +} + +void SourceEditor::resetBreakPoints() +{ + iFace->setBreakPoints( MetaDataBase::breakPoints( obj ) ); +} + +TQString SourceEditor::text() const +{ + return iFace->text(); +} + +bool SourceEditor::isModified() const +{ + return iFace->isModified(); +} + +void SourceEditor::checkTimeStamp() +{ + if ( formWindow() ) + formWindow()->formFile()->checkTimeStamp(); + else if ( sourceFile() ) + sourceFile()->checkTimeStamp(); +} + +bool SourceEditor::saveAs() +{ + if ( formWindow() ) + return formWindow()->formFile()->saveAs(); + else if ( sourceFile() ) + return sourceFile()->saveAs(); + return FALSE; +} + +SourceFile *SourceEditor::sourceFile() const +{ + if ( !::tqqt_cast((TQObject *)obj) ) + return 0; + return (SourceFile*)(TQObject*)obj; +} + +FormWindow *SourceEditor::formWindow() const +{ + if ( !::tqqt_cast((TQObject *)obj) ) + return 0; + return (FormWindow*)(TQObject*)obj; +} diff --git a/tdevdesigner/designer/sourceeditor.h b/kdevdesigner/designer/sourceeditor.h similarity index 100% rename from tdevdesigner/designer/sourceeditor.h rename to kdevdesigner/designer/sourceeditor.h diff --git a/tdevdesigner/designer/sourcefile.cpp b/kdevdesigner/designer/sourcefile.cpp similarity index 100% rename from tdevdesigner/designer/sourcefile.cpp rename to kdevdesigner/designer/sourcefile.cpp diff --git a/tdevdesigner/designer/sourcefile.h b/kdevdesigner/designer/sourcefile.h similarity index 100% rename from tdevdesigner/designer/sourcefile.h rename to kdevdesigner/designer/sourcefile.h diff --git a/tdevdesigner/designer/startdialog.ui b/kdevdesigner/designer/startdialog.ui similarity index 100% rename from tdevdesigner/designer/startdialog.ui rename to kdevdesigner/designer/startdialog.ui diff --git a/kdevdesigner/designer/startdialogimpl.cpp b/kdevdesigner/designer/startdialogimpl.cpp new file mode 100644 index 00000000..adff44fd --- /dev/null +++ b/kdevdesigner/designer/startdialogimpl.cpp @@ -0,0 +1,182 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "kdevdesigner_part.h" + +#include "mainwindow.h" +#include "startdialogimpl.h" +#include "designerapp.h" + +#include + +FileDialog::FileDialog( const TQString &dir, TQWidget *parent ) + : TQFileDialog( dir, TQString(), parent ) +{ +} + +void FileDialog::accept() +{ + emit fileSelected(); +} + + +StartDialog::StartDialog( TQWidget *parent, const TQString &templatePath ) + : StartDialogBase( parent, 0 ) +{ + newForm = new NewForm( templateView, templatePath ); + recentFiles.clear(); + initFileOpen(); + showInFuture = TRUE; + + connect( buttonHelp, TQT_SIGNAL( clicked() ), + MainWindow::self, TQT_SLOT( showDialogHelp() ) ); + connect( recentView, TQT_SIGNAL( doubleClicked(TQIconViewItem*) ), + this, TQT_SLOT( accept() ) ); + connect( recentView, TQT_SIGNAL( returnPressed(TQIconViewItem*) ), + this, TQT_SLOT( accept() ) ); + connect( fd, TQT_SIGNAL( fileSelected() ), this, TQT_SLOT( accept() ) ); +} + +void StartDialog::accept() +{ + hide(); + showInFuture = !checkShowInFuture->isChecked(); // means don't show it anymore + + int tabindex = tabWidget->currentPageIndex(); + TQString filename; + if( !tabindex ) { + if ( !templateView->currentItem() ) + return; + Project *pro = MainWindow::self->findProject( i18n( "" ) ); + if ( !pro ) + return; + MainWindow::self->setCurrentProject( pro ); + ( (NewItem*)templateView->currentItem() )->insert( pro ); + } else if ( tabindex == 1 ) { + filename = fd->selectedFile(); + } else if ( tabindex == 2 ) { + filename = recentFiles[recentView->currentItem()->index()]; + } + if ( tabindex ) { + if ( !filename.isEmpty() ) { + TQFileInfo fi( filename ); + if ( fi.extension() == "pro" ) + MainWindow::self->openProject( filename ); + else + MainWindow::self->fileOpen( "", "", filename ); + } + } + + done( Accepted ); +} + +void StartDialog::reject() +{ + done( Rejected ); +} + +void StartDialog::recentItemChanged( TQIconViewItem *item ) +{ + TQString msg( recentFiles[item->index()] ); + TQFileInfo f( recentFiles[item->index()] ); + uint s = f.size(); + TQString unit( "B" ); + if( s > 1024 ) { + s /= 1024; + unit = "KB"; + } + if ( s > 1024 ) { + s /= 1024; + unit = "MB"; + } + TQDateTime dt( f.lastModified() ); + TQString date( dt.toString( "MMMM dd hh:mm" )); + msg = TQString( "%1 (%2 %3) %4" ).arg(msg).arg(s).arg(unit).arg(date); + fileInfoLabel->setText( msg ); +} + +void StartDialog::clearFileInfo() +{ + fileInfoLabel->clear(); +} + +void StartDialog::setRecentlyFiles( TQStringList &files ) +{ + insertRecentItems( files, FALSE ); +} + +void StartDialog::setRecentlyProjects( TQStringList &projects ) +{ + insertRecentItems( projects, TRUE ); +} + +void StartDialog::insertRecentItems( TQStringList &files, bool isProject ) +{ + TQString iconName = "designer_newform.png"; + if ( isProject ) + iconName = "designer_project.png"; + TQIconViewItem *item; + TQStringList::iterator it = files.begin(); + for( ; it != files.end(); ++it ) { + TQFileInfo fi( *it ); + item = new TQIconViewItem( recentView, fi.fileName() ); + recentFiles[recentView->index( item )] = *it; + item->setPixmap( BarIcon( iconName, KDevDesignerPartFactory::instance() ) ); + item->setDragEnabled( FALSE ); + } +} + +void StartDialog::initFileOpen() +{ + TQString encode = TQDir::currentDirPath(); + TQUrl::encode( encode ); + fd = new FileDialog( encode, this ); + TQPoint point( 0, 0 ); + fd->reparent( tab, point ); + + TQObjectList *l = fd->queryList( TQPUSHBUTTON_OBJECT_NAME_STRING ); + TQObjectListIt it( *l ); + TQObject *obj; + while ( (obj = it.current()) != 0 ) { + ++it; + ((TQPushButton*)obj)->hide(); + } + delete l; + + fd->setSizeGripEnabled ( FALSE ); + tabLayout->addWidget( fd ); + + TQPluginManager manager( IID_ImportFilter, TQApplication::libraryPaths(), + MainWindow::self->pluginDirectory() ); + TQStringList filterlist; + filterlist << i18n( "Designer Files (*.ui *.pro)" ); + filterlist << i18n( "TQt User-Interface Files (*.ui)" ); + filterlist << i18n( "QMAKE Project Files (*.pro)" ); + + TQStringList list = manager.featureList(); + for ( TQStringList::Iterator it2 = list.begin(); it2 != list.end(); ++it2 ) + filterlist << *it2; + + filterlist << i18n( "All Files (*)" ); + TQString filters = filterlist.join( ";;" ); + fd->setFilters( filters ); + + fd->show(); +} diff --git a/tdevdesigner/designer/startdialogimpl.h b/kdevdesigner/designer/startdialogimpl.h similarity index 100% rename from tdevdesigner/designer/startdialogimpl.h rename to kdevdesigner/designer/startdialogimpl.h diff --git a/tdevdesigner/designer/styledbutton.cpp b/kdevdesigner/designer/styledbutton.cpp similarity index 100% rename from tdevdesigner/designer/styledbutton.cpp rename to kdevdesigner/designer/styledbutton.cpp diff --git a/tdevdesigner/designer/styledbutton.h b/kdevdesigner/designer/styledbutton.h similarity index 100% rename from tdevdesigner/designer/styledbutton.h rename to kdevdesigner/designer/styledbutton.h diff --git a/tdevdesigner/designer/syntaxhighlighter_html.cpp b/kdevdesigner/designer/syntaxhighlighter_html.cpp similarity index 100% rename from tdevdesigner/designer/syntaxhighlighter_html.cpp rename to kdevdesigner/designer/syntaxhighlighter_html.cpp diff --git a/tdevdesigner/designer/syntaxhighlighter_html.h b/kdevdesigner/designer/syntaxhighlighter_html.h similarity index 100% rename from tdevdesigner/designer/syntaxhighlighter_html.h rename to kdevdesigner/designer/syntaxhighlighter_html.h diff --git a/tdevdesigner/designer/tableeditor.ui b/kdevdesigner/designer/tableeditor.ui similarity index 100% rename from tdevdesigner/designer/tableeditor.ui rename to kdevdesigner/designer/tableeditor.ui diff --git a/tdevdesigner/designer/tableeditorimpl.cpp b/kdevdesigner/designer/tableeditorimpl.cpp similarity index 100% rename from tdevdesigner/designer/tableeditorimpl.cpp rename to kdevdesigner/designer/tableeditorimpl.cpp diff --git a/tdevdesigner/designer/tableeditorimpl.h b/kdevdesigner/designer/tableeditorimpl.h similarity index 100% rename from tdevdesigner/designer/tableeditorimpl.h rename to kdevdesigner/designer/tableeditorimpl.h diff --git a/tdevdesigner/designer/timestamp.cpp b/kdevdesigner/designer/timestamp.cpp similarity index 100% rename from tdevdesigner/designer/timestamp.cpp rename to kdevdesigner/designer/timestamp.cpp diff --git a/tdevdesigner/designer/timestamp.h b/kdevdesigner/designer/timestamp.h similarity index 100% rename from tdevdesigner/designer/timestamp.h rename to kdevdesigner/designer/timestamp.h diff --git a/tdevdesigner/designer/variabledialog.ui b/kdevdesigner/designer/variabledialog.ui similarity index 100% rename from tdevdesigner/designer/variabledialog.ui rename to kdevdesigner/designer/variabledialog.ui diff --git a/tdevdesigner/designer/variabledialogimpl.cpp b/kdevdesigner/designer/variabledialogimpl.cpp similarity index 100% rename from tdevdesigner/designer/variabledialogimpl.cpp rename to kdevdesigner/designer/variabledialogimpl.cpp diff --git a/tdevdesigner/designer/variabledialogimpl.h b/kdevdesigner/designer/variabledialogimpl.h similarity index 100% rename from tdevdesigner/designer/variabledialogimpl.h rename to kdevdesigner/designer/variabledialogimpl.h diff --git a/tdevdesigner/designer/widgetaction.cpp b/kdevdesigner/designer/widgetaction.cpp similarity index 100% rename from tdevdesigner/designer/widgetaction.cpp rename to kdevdesigner/designer/widgetaction.cpp diff --git a/tdevdesigner/designer/widgetaction.h b/kdevdesigner/designer/widgetaction.h similarity index 100% rename from tdevdesigner/designer/widgetaction.h rename to kdevdesigner/designer/widgetaction.h diff --git a/kdevdesigner/designer/widgetfactory.cpp b/kdevdesigner/designer/widgetfactory.cpp new file mode 100644 index 00000000..9d04535a --- /dev/null +++ b/kdevdesigner/designer/widgetfactory.cpp @@ -0,0 +1,1805 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include // HP-UX compiler need this here +#include "widgetfactory.h" +#include +#include "metadatabase.h" +#include "mainwindow.h" +#include "formwindow.h" +#include "propertyeditor.h" +#include "tqlayout.h" +#include "listboxeditorimpl.h" +#include "listvieweditorimpl.h" +#include "iconvieweditorimpl.h" +#include "formwindow.h" +#include "multilineeditorimpl.h" +#include "../interfaces/widgetinterface.h" +#ifndef TQT_NO_TABLE +#include "tableeditorimpl.h" +#endif +#include "project.h" +#include "menubareditor.h" +#include "popupmenueditor.h" + +#include "kdevdesigner_part.h" + +#include + +#include + +#include +#include +#include +#ifndef TQT_NO_TABLE +#include +#endif +#ifndef TQT_NO_SQL +#include +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#ifndef TQT_NO_SQL +#include "database.h" +#endif + +#define NO_STATIC_COLORS +#include +#include + +#include + +FormWindow *find_formwindow( TQWidget *w ) +{ + if ( !w ) + return 0; + for (;;) { + if ( ::tqqt_cast(w) ) + return (FormWindow*)w; + if ( !w->parentWidget() ) + return 0; + w = w->parentWidget(); + } +} + +void TQLayoutWidget::paintEvent( TQPaintEvent* ) +{ + TQPainter p ( this ); + p.setPen( red ); + p.drawRect( rect() ); +} + + +QDesignerTabWidget::QDesignerTabWidget( TQWidget *parent, const char *name ) + : TQTabWidget( parent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( FALSE ) +{ + tabBar()->setAcceptDrops( TRUE ); + tabBar()->installEventFilter( this ); +} + +int QDesignerTabWidget::currentPage() const +{ + return tabBar()->currentTab(); +} + +void QDesignerTabWidget::setCurrentPage( int i ) +{ + tabBar()->setCurrentTab( i ); +} + +TQString QDesignerTabWidget::pageTitle() const +{ + return ((TQTabWidget*)this)->tabLabel( TQTabWidget::currentPage() ); +} + +void QDesignerTabWidget::setPageTitle( const TQString& title ) +{ + changeTab( TQTabWidget::currentPage(), title ); +} + +void QDesignerTabWidget::setPageName( const TQCString& name ) +{ + if ( TQTabWidget::currentPage() ) + TQTabWidget::currentPage()->setName( name ); +} + +TQCString QDesignerTabWidget::pageName() const +{ + if ( !TQTabWidget::currentPage() ) + return 0; + return TQTabWidget::currentPage()->name(); +} + +int QDesignerTabWidget::count() const +{ + return tabBar()->count(); +} + +bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e ) +{ + if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(tabBar()) ) return FALSE; + + switch ( e->type() ) { + case TQEvent::MouseButtonPress: { + mousePressed = TRUE; + TQMouseEvent *me = (TQMouseEvent*)e; + pressPoint = me->pos(); + } + break; + case TQEvent::MouseMove: { + TQMouseEvent *me = (TQMouseEvent*)e; + if ( mousePressed && ( pressPoint - me->pos()).manhattanLength() > TQApplication::startDragDistance() ) { + TQTextDrag *drg = new TQTextDrag( TQString::number( (long) this ) , this ); + mousePressed = FALSE; + dragPage = TQTabWidget::currentPage(); + dragLabel = TQTabWidget::tabLabel( dragPage ); + + int index = indexOf( dragPage ); + + removePage( dragPage ); + if ( !drg->dragMove() ) { + insertTab( dragPage, dragLabel, index ); + showPage( dragPage ); + } + if ( dropIndicator ) + dropIndicator->hide(); + } + } + break; + case TQEvent::DragLeave: { + if ( dropIndicator ) + dropIndicator->hide(); + } + break; + case TQEvent::DragMove: { + TQDragEnterEvent *de = (TQDragEnterEvent*) e; + if ( TQTextDrag::canDecode( de ) ) { + TQString text; + TQTextDrag::decode( de, text ); + if ( text == TQString::number( (long)this ) ) + de->accept(); + else + return FALSE; + } + + int index = 0; + TQRect rect; + for ( ; index < tabBar()->count(); index++ ) { + if ( tabBar()->tabAt( index )->rect().contains( de->pos() ) ) { + rect = tabBar()->tabAt( index )->rect(); + break; + } + } + + if ( index == tabBar()->count() -1 ) { + TQRect rect2 = rect; + rect2.setLeft( rect2.left() + rect2.width() / 2 ); + if ( rect2.contains( de->pos() ) ) + index++; + } + + if ( ! dropIndicator ) { + dropIndicator = new TQWidget( this ); + dropIndicator->setBackgroundColor( red ); + } + + TQPoint pos; + if ( index == tabBar()->count() ) + pos = tabBar()->mapToParent( TQPoint( rect.x() + rect.width(), rect.y() ) ); + else + pos = tabBar()->mapToParent( TQPoint( rect.x(), rect.y() ) ); + + dropIndicator->setGeometry( pos.x(), pos.y() , 3, rect.height() ); + dropIndicator->show(); + } + break; + case TQEvent::Drop: { + TQDragEnterEvent *de = (TQDragEnterEvent*) e; + if ( TQTextDrag::canDecode( de ) ) { + TQString text; + TQTextDrag::decode( de, text ); + if ( text == TQString::number( (long)this ) ) { + + int newIndex = 0; + for ( ; newIndex < tabBar()->count(); newIndex++ ) { + if ( tabBar()->tabAt( newIndex )->rect().contains( de->pos() ) ) + break; + } + + if ( newIndex == tabBar()->count() -1 ) { + TQRect rect2 = tabBar()->tabAt( newIndex )->rect(); + rect2.setLeft( rect2.left() + rect2.width() / 2 ); + if ( rect2.contains( de->pos() ) ) + newIndex++; + } + + int oldIndex = 0; + for ( ; oldIndex < tabBar()->count(); oldIndex++ ) { + if ( tabBar()->tabAt( oldIndex )->rect().contains( pressPoint ) ) + break; + } + + FormWindow *fw = find_formwindow( this ); + MoveTabPageCommand *cmd = + new MoveTabPageCommand( i18n( "Move Tab Page" ), fw, this, + dragPage, dragLabel, newIndex, oldIndex ); + fw->commandHistory()->addCommand( cmd ); + cmd->execute(); + de->accept(); + } + } + } + break; + default: + break; + } + return FALSE; +} + + +QDesignerWidgetStack::QDesignerWidgetStack( TQWidget *parent, const char *name ) + : TQWidgetStack( parent, name ) +{ + prev = new TQToolButton( TQt::LeftArrow, this, "designer_wizardstack_button" ); + prev->setAutoRaise( TRUE ); + prev->setAutoRepeat( TRUE ); + prev->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored ) ); + next = new TQToolButton( TQt::RightArrow, this, "designer_wizardstack_button" ); + next->setAutoRaise( TRUE ); + next->setAutoRepeat( TRUE ); + next->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored ) ); + connect( prev, TQT_SIGNAL( clicked() ), this, TQT_SLOT( prevPage() ) ); + connect( next, TQT_SIGNAL( clicked() ), this, TQT_SLOT( nextPage() ) ); + updateButtons(); +} + +void QDesignerWidgetStack::updateButtons() +{ + prev->setGeometry( width() - 31, 1, 15, 15 ); + next->setGeometry( width() - 16, 1, 15, 15 ); + prev->show(); + next->show(); + prev->raise(); + next->raise(); +} + +void QDesignerWidgetStack::prevPage() +{ + setCurrentPage( currentPage() - 1 ); +} + +void QDesignerWidgetStack::nextPage() +{ + setCurrentPage( currentPage() + 1 ); +} + +int QDesignerWidgetStack::currentPage() const +{ + QDesignerWidgetStack* that = (QDesignerWidgetStack*) this; + return that->pages.find( visibleWidget() ); +} + +void QDesignerWidgetStack::setCurrentPage( int i ) +{ + // help next/prev page commands + if ( i < 0 ) + i += count(); + if ( i >= count() ) + i -= count(); + + if ( i < 0 || i >= count() ) + return; + raiseWidget( pages.at( i ) ); + updateButtons(); +} + +TQCString QDesignerWidgetStack::pageName() const +{ + if ( !visibleWidget() ) + return 0; + return visibleWidget()->name(); +} + +void QDesignerWidgetStack::setPageName( const TQCString& name ) +{ + if ( visibleWidget() ) + visibleWidget()->setName( name ); +} + +int QDesignerWidgetStack::count() const +{ + return pages.count(); +} + +TQWidget* QDesignerWidgetStack::page( int i ) const +{ + if ( i < 0 || i >= count() ) + return 0; + QDesignerWidgetStack* that = (QDesignerWidgetStack*) this; + return that->pages.at( i ); +} + + +int QDesignerWidgetStack::insertPage( TQWidget *p, int i ) +{ + if ( i < 0 ) + pages.append( p ); + else + pages.insert( (uint) i, p ); + addWidget( p ); + p->show(); + raiseWidget( p ); + TQApplication::sendPostedEvents(); + updateButtons(); + return pages.find( p ); +} + +int QDesignerWidgetStack::removePage( TQWidget *p ) +{ + int i = pages.find( p ); + pages.remove( p ); + removeWidget( p ); + setCurrentPage( 0 ); + updateButtons(); + return i; +} + + +int QDesignerWizard::currentPageNum() const +{ + for ( int i = 0; i < pageCount(); ++i ) { + if ( page( i ) == currentPage() ) + return i; + } + return 0; +} + + + + + +void QDesignerWizard::setCurrentPage( int i ) +{ + if ( i < currentPageNum() ) { + while ( i < currentPageNum() ) { + if ( currentPageNum() == 0 ) + break; + back(); + } + + } else { + while ( i > currentPageNum() ) { + if ( currentPageNum() == pageCount() - 1 ) + break; + next(); + } + } +} + +TQString QDesignerWizard::pageTitle() const +{ + return title( currentPage() ); +} + +void QDesignerWizard::setPageTitle( const TQString& title ) +{ + setTitle( currentPage(), title ); +} + +void QDesignerWizard::setPageName( const TQCString& name ) +{ + if ( TQWizard::currentPage() ) + TQWizard::currentPage()->setName( name ); +} + +TQCString QDesignerWizard::pageName() const +{ + if ( !TQWizard::currentPage() ) + return 0; + return TQWizard::currentPage()->name(); +} + +int QDesignerWizard::pageNum( TQWidget *p ) +{ + for ( int i = 0; i < pageCount(); ++i ) { + if ( page( i ) == p ) + return i; + } + return -1; +} + +void QDesignerWizard::addPage( TQWidget *p, const TQString &t ) +{ + TQWizard::addPage( p, t ); + if ( removedPages.find( p ) ) + removedPages.remove( p ); +} + +void QDesignerWizard::removePage( TQWidget *p ) +{ + TQWizard::removePage( p ); + removedPages.insert( p, p ); +} + +void QDesignerWizard::insertPage( TQWidget *p, const TQString &t, int index ) +{ + TQWizard::insertPage( p, t, index ); + if ( removedPages.find( p ) ) + removedPages.remove( p ); +} + +TQMap< int, TQMap< TQString, TQVariant> > *defaultProperties = 0; +TQMap< int, TQStringList > *changedProperties = 0; + +/*! + \class WidgetFactory widgetfactory.h + \brief Set of static functions for creating widgets, layouts and do other stuff + + The widget factory offers functions to create widgets, create and + delete layouts find out other details - all based on the + WidgetDatabase's data. So the functions that use ids use the same + ids as in the WidgetDatabase. +*/ + + +void WidgetFactory::saveDefaultProperties( TQObject *w, int id ) +{ + TQMap< TQString, TQVariant> propMap; + TQStrList lst = w->metaObject()->propertyNames( TRUE ); + for ( uint i = 0; i < lst.count(); ++i ) { + TQVariant var = w->property( lst.at( i ) ); + if ( !var.isValid() && qstrcmp( "pixmap", lst.at( i ) ) == 0 ) + var = TQVariant( TQPixmap() ); + else if ( !var.isValid() && qstrcmp( "iconSet", lst.at( i ) ) == 0 ) + var = TQVariant( TQIconSet() ); + propMap.replace( lst.at( i ), var ); + } + defaultProperties->replace( id, propMap ); +} + +void WidgetFactory::saveChangedProperties( TQObject *w, int id ) +{ + TQStringList l = MetaDataBase::changedProperties( w ); + changedProperties->insert( id, l ); +} + +/*! Creates a widget of the type which is registered as \a id as + child of \a parent. The \a name is optional. If \a init is TRUE, the + widget is initialized with some defaults, else the plain widget is + created. +*/ + +TQWidget *WidgetFactory::create( int id, TQWidget *parent, const char *name, bool init, const TQRect *r, Qt::Orientation orient ) +{ + TQString n = WidgetDatabase::className( id ); + if ( n.isEmpty() ) + return 0; + + if ( !defaultProperties ) { + defaultProperties = new TQMap< int, TQMap< TQString, TQVariant> >(); + changedProperties = new TQMap< int, TQStringList >(); + } + + TQWidget *w = 0; + TQString str = WidgetDatabase::createWidgetName( id ); + const char *s = str.latin1(); + w = createWidget( n, parent, name ? name : s, init, r, orient ); + if ( ::tqqt_cast(w) ) + ( (TQScrollView*)w )->disableSizeHintCaching(); + if ( !w && WidgetDatabase::isCustomWidget( id ) ) + w = createCustomWidget( parent, name ? name : s, MetaDataBase::customWidget( id ) ); + if ( !w ) + return 0; + MetaDataBase::addEntry( TQT_TQOBJECT(w) ); + + if ( !defaultProperties->contains( id ) ) + saveDefaultProperties( TQT_TQOBJECT(w), id ); + if ( !changedProperties->contains( id ) ) + saveChangedProperties( TQT_TQOBJECT(w), id ); + + return w; +} + +/*! Creates a layout on the widget \a widget of the type \a type + which can be \c HBox, \c VBox or \c Grid. +*/ + +TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, LayoutType type ) +{ + int spacing = MainWindow::self->currentLayoutDefaultSpacing(); + int margin = 0; + + int metaspacing = MetaDataBase::spacing( TQT_TQOBJECT(widget) ); + int metamargin = MetaDataBase::margin( TQT_TQOBJECT(widget) ); + + if ( ::tqqt_cast(widget) && + ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ) ) || + widget && ::tqqt_cast(widget->parentWidget()) ) ) + margin = MainWindow::self->currentLayoutDefaultMargin(); + + if ( !layout && ::tqqt_cast(widget) ) + widget = ((TQTabWidget*)widget)->currentPage(); + + if ( !layout && ::tqqt_cast(widget) ) + widget = ((TQWizard*)widget)->currentPage(); + + if ( !layout && ::tqqt_cast(widget) ) + widget = ((TQMainWindow*)widget)->centralWidget(); + + if ( !layout && ::tqqt_cast(widget) ) + widget = ((TQWidgetStack*)widget)->visibleWidget(); + + if ( !layout && ::tqqt_cast(widget) ) + widget = ((TQToolBox*)widget)->currentItem(); + + MetaDataBase::addEntry( TQT_TQOBJECT(widget) ); + + TQLayout *l = 0; + int align = 0; + if ( !layout && ::tqqt_cast(widget) ) { + TQGroupBox *gb = (TQGroupBox*)widget; + gb->setColumnLayout( 0, Qt::Vertical ); + layout = gb->layout(); + layout->setMargin( 0 ); + layout->setSpacing( 0 ); + switch ( type ) { + case HBox: + l = new TQHBoxLayout( layout ); + break; + case VBox: + l = new TQVBoxLayout( layout ); + break; + case Grid: + l = new QDesignerGridLayout( layout ); + break; + default: + return 0; + } + align = TQt::AlignTop; + MetaDataBase::setMargin( TQT_TQOBJECT(gb), metamargin ); + MetaDataBase::setSpacing( TQT_TQOBJECT(gb), metaspacing ); + } else { + if ( layout ) { + switch ( type ) { + case HBox: + l = new TQHBoxLayout( layout ); + break; + case VBox: + l = new TQVBoxLayout( layout ); + break; + case Grid: + l = new QDesignerGridLayout( layout ); + break; + default: + return 0; + } + MetaDataBase::addEntry( TQT_TQOBJECT(l) ); + l->setSpacing( spacing ); + l->setMargin( margin ); + } else { + switch ( type ) { + case HBox: + l = new TQHBoxLayout( widget ); + break; + case VBox: + l = new TQVBoxLayout( widget ); + break; + case Grid: + l = new QDesignerGridLayout( widget ); + break; + default: + return 0; + } + MetaDataBase::addEntry( TQT_TQOBJECT(l) ); + if ( widget ) { + MetaDataBase::setMargin( TQT_TQOBJECT(widget), metamargin ); + MetaDataBase::setSpacing( TQT_TQOBJECT(widget), metaspacing ); + } else { + l->setMargin( margin ); + l->setSpacing( spacing ); + } + } + } + l->setAlignment( align ); + MetaDataBase::addEntry( TQT_TQOBJECT(l) ); + return l; +} + +void WidgetFactory::deleteLayout( TQWidget *widget ) +{ + if ( !widget ) + return; + + if ( ::tqqt_cast(widget) ) + widget = ((TQTabWidget*)widget)->currentPage(); + if ( ::tqqt_cast(widget) ) + widget = ((TQWizard*)widget)->currentPage(); + if ( ::tqqt_cast(widget) ) + widget = ((TQMainWindow*)widget)->centralWidget(); + if ( ::tqqt_cast(widget) ) + widget = ((TQWidgetStack*)widget)->visibleWidget(); + if ( ::tqqt_cast(widget) ) + widget = ((TQToolBox*)widget)->currentItem(); + delete widget->layout(); +} + +/*! Factory functions for creating a widget of the type \a className + as child of \a parent with the name \a name. + + If \a init is TRUE, some initial default properties are set. This + has to be in sync with the initChangedProperties() function! +*/ + +TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *parent, const char *name, bool init, + const TQRect *r, Qt::Orientation orient ) +{ + if ( className == TQPUSHBUTTON_OBJECT_NAME_STRING ) { + TQPushButton *b = 0; + if ( init ) { + b = new QDesignerPushButton( parent, name ); + b->setText( TQString::fromLatin1( name ) ); + } else { + b = new QDesignerPushButton( parent, name ); + } + TQWidget *w = find_formwindow( b ); + b->setAutoDefault( w && ::tqqt_cast(((FormWindow*)w)->mainContainer()) ); + return b; + } else if ( className == TQTOOLBUTTON_OBJECT_NAME_STRING ) { + if ( init ) { + QDesignerToolButton *tb = new QDesignerToolButton( parent, name ); + if ( ::tqqt_cast(widgetOfContainer(parent))) { + tb->setUsesTextLabel(TRUE); + tb->setTextLabel("..."); + tb->setAutoRaise(TRUE); + tb->setTextPosition(TQToolButton::BesideIcon); + } else { + tb->setText( "..." ); + } + return tb; + } + return new QDesignerToolButton( parent, name ); + } else if ( className == TQCHECKBOX_OBJECT_NAME_STRING ) { + if ( init ) { + QDesignerCheckBox *cb = new QDesignerCheckBox( parent, name ); + cb->setText( TQString::fromLatin1( name ) ); + return cb; + } + return new QDesignerCheckBox( parent, name ); + } else if ( className == TQRADIOBUTTON_OBJECT_NAME_STRING ) { + if ( init ) { + QDesignerRadioButton *rb = new QDesignerRadioButton( parent, name ); + rb->setText( TQString::fromLatin1( name ) ); + return rb; + } + return new QDesignerRadioButton( parent, name ); + } else if ( className == TQGROUPBOX_OBJECT_NAME_STRING ) { + if ( init ) + return new TQGroupBox( TQString::fromLatin1( name ), parent, name ); + return new TQGroupBox( parent, name ); + } else if ( className == TQBUTTONGROUP_OBJECT_NAME_STRING ) { + if ( init ) + return new TQButtonGroup( TQString::fromLatin1( name ), parent, name ); + return new TQButtonGroup( parent, name ); + } else if ( className == TQICONVIEW_OBJECT_NAME_STRING ) { +#if !defined(TQT_NO_ICONVIEW) + TQIconView* iv = new TQIconView( parent, name ); + if ( init ) + (void) new TQIconViewItem( iv, i18n( "New Item" ) ); + return iv; +#else + return 0; +#endif + } else if ( className == TQTABLE_OBJECT_NAME_STRING ) { +#if !defined(TQT_NO_TABLE) + if ( init ) + return new TQTable( 3, 3, parent, name ); + return new TQTable( parent, name ); +#else + return 0; +#endif +#ifndef TQT_NO_SQL + } else if ( className == TQDATATABLE_OBJECT_NAME_STRING ) { + return new TQDataTable( parent, name ); +#endif //TQT_NO_SQL + } else if ( className == TQDATEEDIT_OBJECT_NAME_STRING ) { + return new TQDateEdit( parent, name ); + } else if ( className == TQTIMEEDIT_OBJECT_NAME_STRING ) { + return new TQTimeEdit( parent, name ); + } else if ( className == TQDATETIMEEDIT_OBJECT_NAME_STRING ) { + return new TQDateTimeEdit( parent, name ); + } + else if ( className == TQLISTBOX_OBJECT_NAME_STRING ) { + TQListBox* lb = new TQListBox( parent, name ); + if ( init ) { + lb->insertItem( i18n( "New Item" ) ); + lb->setCurrentItem( 0 ); + } + return lb; + } else if ( className == TQLISTVIEW_OBJECT_NAME_STRING ) { + TQListView *lv = new TQListView( parent, name ); + lv->setSorting( -1 ); + if ( init ) { + lv->addColumn( i18n( "Column 1" ) ); + lv->setCurrentItem( new TQListViewItem( lv, i18n( "New Item" ) ) ); + } + return lv; + } else if ( className == TQLINEEDIT_OBJECT_NAME_STRING ) + return new TQLineEdit( parent, name ); + else if ( className == TQSPINBOX_OBJECT_NAME_STRING ) + return new TQSpinBox( parent, name ); + else if ( className == TQSPLITTER_OBJECT_NAME_STRING ) + return new TQSplitter( parent, name ); + else if ( className == TQMULTILINEEDIT_OBJECT_NAME_STRING ) + return new TQMultiLineEdit( parent, name ); + else if ( className == TQTEXTEDIT_OBJECT_NAME_STRING ) + return new TQTextEdit( parent, name ); + else if ( className == TQLABEL_OBJECT_NAME_STRING || className == "TextLabel" ) { + QDesignerLabel *l = new QDesignerLabel( parent, name ); + if ( init ) { + l->setText( TQString::fromLatin1( name ) ); + MetaDataBase::addEntry( TQT_TQOBJECT(l) ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "text", TRUE ); + } + return l; + } else if ( className == "PixmapLabel" ) { + QDesignerLabel *l = new QDesignerLabel( parent, name ); + if ( init ) { + l->setPixmap( BarIcon( "designer_qtlogo.png", KDevDesignerPartFactory::instance() ) ); + l->setScaledContents( TRUE ); + MetaDataBase::addEntry( TQT_TQOBJECT(l) ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "pixmap", TRUE ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "scaledContents", TRUE ); + } + return l; + } else if ( className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) + return new TQLayoutWidget( parent, name ); + else if ( className == TQTABWIDGET_OBJECT_NAME_STRING ) { + TQTabWidget *tw = new QDesignerTabWidget( parent, name ); + if ( init ) { + FormWindow *fw = find_formwindow( parent ); + TQWidget *w = fw ? new QDesignerWidget( fw, tw, "tab" ) : new TQWidget( tw, "tab" ); + tw->addTab( w, i18n("Tab 1") ); + MetaDataBase::addEntry( TQT_TQOBJECT(w) ); + w = fw ? new QDesignerWidget( fw, tw, "tab" ) : new TQWidget( tw, "tab" ); + tw->addTab( w, i18n("Tab 2") ); + MetaDataBase::addEntry( TQT_TQOBJECT(tw) ); + MetaDataBase::addEntry( TQT_TQOBJECT(w) ); + } + return tw; + } else if ( className == TQWIDGETSTACK_OBJECT_NAME_STRING ) { + QDesignerWidgetStack *ws = new QDesignerWidgetStack( parent, name ); + if ( init ) { + FormWindow *fw = find_formwindow( parent ); + TQWidget *w = fw ? new QDesignerWidget( fw, ws, "WStackPage" ) : new TQWidget( ws, "WStackPage" ); + ws->insertPage( w ); + MetaDataBase::addEntry( TQT_TQOBJECT(w) ); + MetaDataBase::addEntry( TQT_TQOBJECT(ws) ); + } + return ws; + } else if ( className == TQCOMBOBOX_OBJECT_NAME_STRING ) { + return new TQComboBox( FALSE, parent, name ); + } else if ( className == TQWIDGET_OBJECT_NAME_STRING ) { + if ( parent && + ( ::tqqt_cast(parent) || + ::tqqt_cast(parent) || + ::tqqt_cast(parent) || + ::tqqt_cast(parent) || + ::tqqt_cast(parent) || + ::tqqt_cast(parent) ) ) { + FormWindow *fw = find_formwindow( parent ); + if ( fw ) { + QDesignerWidget *dw = new QDesignerWidget( fw, parent, name ); + MetaDataBase::addEntry( TQT_TQOBJECT(dw) ); + return dw; + } + } + return new TQWidget( parent, name ); + } else if ( className == TQDIALOG_OBJECT_NAME_STRING ) { + TQDialog *dia = 0; + if ( ::tqqt_cast(parent) ) + dia = new QDesignerDialog( (FormWindow*)parent, parent, name ); + else + dia = new TQDialog( parent, name ); +#if defined(TQT_NON_COMMERCIAL) + if ( ::tqqt_cast(parent) ) +#else + if ( parent ) +#endif + dia->reparent( parent, TQPoint( 0, 0 ), TRUE ); + return dia; + } else if ( className == TQWIZARD_OBJECT_NAME_STRING ) { + TQWizard *wiz = new QDesignerWizard( parent, name ); +#if defined(TQT_NON_COMMERCIAL) + if ( ::tqqt_cast(parent) ) +#else + if ( parent ) +#endif + wiz->reparent( parent, TQPoint( 0, 0 ), TRUE ); + if ( init && ::tqqt_cast(parent) ) { + QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)parent, wiz, "WizardPage" ); + MetaDataBase::addEntry( TQT_TQOBJECT(dw) ); + wiz->addPage( dw, i18n( "Page" ) ); + TQTimer::singleShot( 0, wiz, TQT_SLOT( next() ) ); + } + return wiz; + } else if ( className == "Spacer" ) { + Spacer *s = new Spacer( parent, name ); + MetaDataBase::addEntry( TQT_TQOBJECT(s) ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "orientation", TRUE ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "sizeType", TRUE ); + if ( !r ) + return s; + if ( !r->isValid() || r->width() < 2 && r->height() < 2 ) + s->setOrientation( orient ); + else if ( r->width() < r->height() ) + s->setOrientation( Qt::Vertical ); + else + s->setOrientation( Qt::Horizontal ); + return s; + } else if ( className == TQLCDNUMBER_OBJECT_NAME_STRING ) + return new TQLCDNumber( parent, name ); + else if ( className == TQPROGRESSBAR_OBJECT_NAME_STRING ) + return new TQProgressBar( parent, name ); + else if ( className == TQTEXTVIEW_OBJECT_NAME_STRING ) + return new TQTextView( parent, name ); + else if ( className == TQTEXTBROWSER_OBJECT_NAME_STRING ) + return new TQTextBrowser( parent, name ); + else if ( className == TQDIAL_OBJECT_NAME_STRING ) + return new TQDial( parent, name ); + else if ( className == TQSLIDER_OBJECT_NAME_STRING ) { + TQSlider *s = new TQSlider( parent, name ); + if ( !r ) + return s; + if ( !r->isValid() || r->width() < 2 && r->height() < 2 ) + s->setOrientation( orient ); + else if ( r->width() > r->height() ) + s->setOrientation( Qt::Horizontal ); + MetaDataBase::addEntry( TQT_TQOBJECT(s) ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "orientation", TRUE ); + return s; + } else if ( className == TQSCROLLBAR_OBJECT_NAME_STRING ) { + TQScrollBar *s = new TQScrollBar( parent, name ); + if ( !r ) + return s; + if ( !r->isValid() || r->width() < 2 && r->height() < 2 ) + s->setOrientation( orient ); + else if ( r->width() > r->height() ) + s->setOrientation( Qt::Horizontal ); + MetaDataBase::addEntry( TQT_TQOBJECT(s) ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "orientation", TRUE ); + return s; + } else if ( className == TQFRAME_OBJECT_NAME_STRING ) { + if ( !init ) + return new TQFrame( parent, name ); + TQFrame *f = new TQFrame( parent, name ); + f->setFrameStyle( TQFrame::StyledPanel | TQFrame::Raised ); + return f; + } else if ( className == "Line" ) { + Line *l = new Line( parent, name ); + MetaDataBase::addEntry( TQT_TQOBJECT(l) ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "orientation", TRUE ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "frameShadow", TRUE ); + MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "frameShape", TRUE ); + if ( !r ) + return l; + if ( !r->isValid() || r->width() < 2 && r->height() < 2 ) + l->setOrientation( orient ); + else if ( r->width() < r->height() ) + l->setOrientation( Qt::Vertical ); + return l; + } else if ( className == TQMAINWINDOW_OBJECT_NAME_STRING ) { + TQMainWindow *mw = new TQMainWindow( parent, name, 0 ); + mw->setDockEnabled( TQt::DockMinimized, FALSE ); + QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)parent, mw, "central widget" ); + mw->setDockMenuEnabled( FALSE ); + MetaDataBase::addEntry( TQT_TQOBJECT(dw) ); + mw->setCentralWidget( dw ); + (void)mw->statusBar(); + dw->show(); + return mw; + } else if ( className == TQTOOLBOX_OBJECT_NAME_STRING ) { + if ( !init ) + return new QDesignerToolBox( parent, name ); + TQToolBox *tb = new QDesignerToolBox( parent, name ); + FormWindow *fw = find_formwindow( parent ); + TQWidget *w = fw ? new QDesignerWidget( fw, tb, "page1" ) : + new TQWidget( tb, "page1" ); + tb->addItem( w, i18n("Page 1") ); + MetaDataBase::addEntry( TQT_TQOBJECT(w) ); + w = fw ? new QDesignerWidget( fw, tb, "page2" ) : new TQWidget( tb, "page2" ); + tb->addItem( w, i18n("Page 2") ); + MetaDataBase::addEntry( TQT_TQOBJECT(tb) ); + MetaDataBase::addEntry( TQT_TQOBJECT(w) ); + return tb; + } +#ifndef TQT_NO_SQL + else if ( className == TQDATABROWSER_OBJECT_NAME_STRING ) { + TQWidget *w = new QDesignerDataBrowser( parent, name ); + if ( parent ) + w->reparent( parent, TQPoint( 0, 0 ), TRUE ); + return w; + } else if ( className == TQDATAVIEW_OBJECT_NAME_STRING ) { + TQWidget *w = new QDesignerDataView( parent, name ); + if ( parent ) + w->reparent( parent, TQPoint( 0, 0 ), TRUE ); + return w; + } +#endif + + WidgetInterface *iface = 0; + widgetManager()->queryInterface( className, &iface ); + if ( !iface ) + return 0; + + TQWidget *w = iface->create( className, parent, name ); +#ifdef TQT_CONTAINER_CUSTOM_WIDGETS + if ( init && WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( className ) ) ) { + TQWidgetContainerInterfacePrivate *iface2 = 0; + iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 ); + if ( iface2 ) { + iface2->addPage( className, w, "Page", -1 ); + iface2->release(); + } + } +#endif // TQT_CONTAINER_CUSTOM_WIDGETS + iface->release(); + return w; +} + + + +/*! Find out which type the layout of the widget is. Returns \c HBox, + \c VBox, \c Grid or \c NoLayout. \a layout points to this + TQWidget::layout() of \a w or to 0 after the function call. +*/ + +WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&layout ) +{ + layout = 0; + + if ( ::tqqt_cast(w) ) + w = ((TQTabWidget*)w)->currentPage(); + if ( ::tqqt_cast(w) ) + w = ((TQWizard*)w)->currentPage(); + if ( ::tqqt_cast(w) ) + w = ((TQMainWindow*)w)->centralWidget(); + if ( ::tqqt_cast(w) ) + w = ((TQWidgetStack*)w)->visibleWidget(); + if ( ::tqqt_cast(w) ) + w = ((TQToolBox*)w)->currentItem(); + + if ( ::tqqt_cast(w) ) + return ( (TQSplitter*)w )->orientation() ==Qt::Horizontal ? HBox : VBox; + + if ( !w || !w->layout() ) + return NoLayout; + TQLayout *lay = w->layout(); + + if ( ::tqqt_cast(w) ) { + TQObjectList *l = TQT_TQOBJECT(lay)->queryList( TQLAYOUT_OBJECT_NAME_STRING ); + if ( l && l->first() ) + lay = (TQLayout*)l->first(); + delete l; + } + layout = lay; + + if ( ::tqqt_cast(lay) ) + return HBox; + else if ( ::tqqt_cast(lay) ) + return VBox; + else if ( ::tqqt_cast(lay) ) + return Grid; + return NoLayout; +} + +/*! + \overload +*/ +WidgetFactory::LayoutType WidgetFactory::layoutType( TQLayout *layout ) +{ + if ( ::tqqt_cast(layout) ) + return HBox; + else if ( ::tqqt_cast(layout) ) + return VBox; + else if ( ::tqqt_cast(layout) ) + return Grid; + return NoLayout; +} + +/*! + \overload +*/ +WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w ) +{ + TQLayout *l = 0; + return layoutType( w, l ); +} + + +TQWidget *WidgetFactory::layoutParent( TQLayout *layout ) +{ + TQObject *o = TQT_TQOBJECT(layout); + while ( o ) { + if ( o->isWidgetType() ) + return (TQWidget*)o; + o = o->parent(); + } + return 0; +} + +/*! Returns the widget into which children should be inserted when \a + w is a container known to the designer. + + Usually that is \a w itself, sometimes it is different (e.g. a + tabwidget is known to the designer as a container but the child + widgets should be inserted into the current page of the + tabwidget. So in this case this function returns the current page of + the tabwidget.) + */ +TQWidget* WidgetFactory::containerOfWidget( TQWidget *w ) +{ + if ( !w ) + return w; + if ( ::tqqt_cast(w) ) + return ((TQTabWidget*)w)->currentPage(); + if ( ::tqqt_cast(w) ) + return ((TQWizard*)w)->currentPage(); + if ( ::tqqt_cast(w) ) + return ((TQWidgetStack*)w)->visibleWidget(); + if ( ::tqqt_cast(w) ) + return ((TQToolBox*)w)->currentItem(); + if ( ::tqqt_cast(w) ) + return ((TQMainWindow*)w)->centralWidget(); +#ifdef TQT_CONTAINER_CUSTOM_WIDGETS + if ( !WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) ) + return w; + WidgetInterface *iface = 0; + widgetManager()->queryInterface( classNameOf( w ), &iface ); + if ( !iface ) + return w; + TQWidgetContainerInterfacePrivate *iface2 = 0; + iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 ); + if ( !iface2 ) + return w; + TQWidget *c = iface2->containerOfWidget( w->className(), w ); + iface2->release(); + iface->release(); + if ( c ) + return c; +#endif // TQT_CONTAINER_CUSTOM_WIDGETS + return w; +} + +/*! Returns the actual designer widget of the container \a w. This is + normally \a w itself, but might be a parent or grand parent of \a w + (e.g. when working with a tabwidget and \a w is the container which + contains and layouts childs, but the actual widget known to the + designer is the tabwidget which is the parent of \a w. So this + function returns the tabwidget then.) +*/ + +TQWidget* WidgetFactory::widgetOfContainer( TQWidget *w ) +{ + if ( w && ::tqqt_cast(w->parentWidget()) ) + w = w->parentWidget(); + if ( w->parentWidget() && w->parentWidget()->parentWidget() && + w->parentWidget()->parentWidget()->parentWidget() && + ::tqqt_cast(w->parentWidget()->parentWidget()->parentWidget()) ) + return w->parentWidget()->parentWidget()->parentWidget(); + while ( w ) { + int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ); + if ( WidgetDatabase::isContainer( id ) || + w && ::tqqt_cast(w->parentWidget()) ) + return w; + w = w->parentWidget(); + } + return w; +} + +/*! + Returns whether \a o is a passive interactor or not. + */ + +bool WidgetFactory::lastWasAPassiveInteractor = FALSE; +TQGuardedPtr *WidgetFactory::lastPassiveInteractor = new TQGuardedPtr(); + +bool WidgetFactory::isPassiveInteractor( TQObject* o ) +{ + if ( lastPassiveInteractor && *lastPassiveInteractor && (TQObject*)(*lastPassiveInteractor) == o ) + return lastWasAPassiveInteractor; + lastWasAPassiveInteractor = FALSE; + (*lastPassiveInteractor) = o; + if ( TQApplication::activePopupWidget() ) // if a popup is open, we have to make sure that this one is closed, else X might do funny things + return ( lastWasAPassiveInteractor = TRUE ); + + if ( ::tqqt_cast(o) ) + return ( lastWasAPassiveInteractor = TRUE ); + else if ( ::tqqt_cast(o) ) + return ( lastWasAPassiveInteractor = TRUE ); + else if ( ::tqqt_cast(o) && + ( ::tqqt_cast(o->parent()) || ::tqqt_cast(o->parent()) ) ) + return ( lastWasAPassiveInteractor = TRUE ); + else if ( ::tqqt_cast(o) && ::tqqt_cast(o->parent()) ) + return ( lastWasAPassiveInteractor = TRUE ); + else if ( ::tqqt_cast(o) && ::tqqt_cast(o->parent()) ) + return ( lastWasAPassiveInteractor = TRUE ); +// else if ( ::tqqt_cast(o) ) + else if ( o->inherits( TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING ) ) + return ( lastWasAPassiveInteractor = TRUE ); +// else if ( ::tqqt_cast(o) ) + else if ( o->inherits( TQHIDEDOCK_OBJECT_NAME_STRING ) ) + return ( lastWasAPassiveInteractor = TRUE ); + else if ( qstrcmp( o->name(), "designer_wizardstack_button" ) == 0 ) + return ( lastWasAPassiveInteractor = TRUE ); +#ifdef TQT_CONTAINER_CUSTOM_WIDGETS + if ( !o->isWidgetType() ) + return ( lastWasAPassiveInteractor = FALSE ); + WidgetInterface *iface = 0; + TQWidget *w = (TQWidget*)o; + while ( !iface && w && !::tqqt_cast(w) ) { + widgetManager()->queryInterface( classNameOf( w ), &iface ); + w = w->parentWidget(); + } + if ( !iface ) + return ( lastWasAPassiveInteractor = FALSE ); + TQWidgetContainerInterfacePrivate *iface2 = 0; + iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 ); + if ( !iface2 ) + return ( lastWasAPassiveInteractor = FALSE ); + TQWidget *fw = MainWindow::self->isAFormWindowChild( (TQWidget*)o ); + if ( !fw ) + return ( lastWasAPassiveInteractor = FALSE ); + TQWidget *dw = ( (FormWindow*)fw )->designerWidget( (TQWidget*)o ); + if ( !dw ) + return ( lastWasAPassiveInteractor = FALSE ); + lastWasAPassiveInteractor = iface2->isPassiveInteractor( dw->className(), (TQWidget*)o ); + iface2->release(); + iface->release(); +#endif // TQT_CONTAINER_CUSTOM_WIDGETS + return lastWasAPassiveInteractor; +} + + +/*! + Returns the class name of object \a o that should be used for externally (i.e. for saving) + */ +const char* WidgetFactory::classNameOf( TQObject* o ) +{ + if ( o->isA( "PropertyObject" ) ) + return o->className(); + if (WidgetDatabase::isCustomPluginWidget(WidgetDatabase::idFromClassName(o->className()))) + return o->className(); + else if ( ::tqqt_cast(o) ) + return TQTABWIDGET_OBJECT_NAME_STRING; + else if ( ::tqqt_cast(o) ) + return TQWIDGETSTACK_OBJECT_NAME_STRING; + else if ( ::tqqt_cast(o) ) + return "TQWeDoNotWantToBreakTabWidget"; + else if ( ::tqqt_cast(o) ) + return TQDIALOG_OBJECT_NAME_STRING; + else if ( ::tqqt_cast(o) ) + return TQWIDGET_OBJECT_NAME_STRING; + else if ( o->inherits( "CustomWidget" ) ) + return ( (CustomWidget*)o )->realClassName().latin1(); + else if ( ::tqqt_cast(o) ) + return TQLABEL_OBJECT_NAME_STRING; + else if ( ::tqqt_cast(o) ) + return TQWIZARD_OBJECT_NAME_STRING; + else if ( ::tqqt_cast(o) ) + return TQPUSHBUTTON_OBJECT_NAME_STRING; + else if ( ::tqqt_cast(o) ) + return TQTOOLBUTTON_OBJECT_NAME_STRING; + else if ( ::tqqt_cast(o) ) + return TQRADIOBUTTON_OBJECT_NAME_STRING; + else if ( ::tqqt_cast(o) ) + return TQCHECKBOX_OBJECT_NAME_STRING; + else if ( ::tqqt_cast(o) ) + return TQMENUBAR_OBJECT_NAME_STRING; + else if ( ::tqqt_cast(o) ) + return TQTOOLBAR_OBJECT_NAME_STRING; + else if ( ::tqqt_cast(o) ) + return TQACTION_OBJECT_NAME_STRING; + else if ( ::tqqt_cast(o) ) + return TQACTIONGROUP_OBJECT_NAME_STRING; + else if ( ::tqqt_cast(o) ) + return TQPOPUPMENU_OBJECT_NAME_STRING; + else if ( ::tqqt_cast(o) ) + return TQTOOLBOX_OBJECT_NAME_STRING; +#ifndef TQT_NO_SQL + else if ( ::tqqt_cast(o) ) + return TQDATABROWSER_OBJECT_NAME_STRING; + else if ( ::tqqt_cast(o) ) + return TQDATAVIEW_OBJECT_NAME_STRING; +#endif + return o->className(); +} + +TQString WidgetFactory::defaultSignal( TQObject *w ) +{ + if ( ::tqqt_cast(w) || ::tqqt_cast(w) ) + return "toggled"; + else if ( ::tqqt_cast(w) || ::tqqt_cast(w) ) + return "clicked"; + else if ( ::tqqt_cast(w) ) + return "linkClicked"; + else if ( ::tqqt_cast(w) || ::tqqt_cast(w) ) + return "textChanged"; + else if ( ::tqqt_cast(w) || ::tqqt_cast(w) || + ::tqqt_cast(w) || ::tqqt_cast(w) ) + return "selectionChanged"; + else if ( ::tqqt_cast(w) ) + return "selected"; + else if ( ::tqqt_cast(w) ) + return "currentChanged"; + else if ( ::tqqt_cast(w) ) + return "aboutToShow"; + else if ( ::tqqt_cast(w) || ::tqqt_cast(w) || + ::tqqt_cast(w) || ::tqqt_cast(w) || + ::tqqt_cast(w) || ::tqqt_cast(w) || + ::tqqt_cast(w) ) + return "valueChanged"; + else if ( ::tqqt_cast(w) ) + return "activated"; + return TQString(); +} + +/*! As some properties are set by default when creating a widget this + functions markes this properties as changed. Has to be in sync with + createWidget()! +*/ + +void WidgetFactory::initChangedProperties( TQObject *o ) +{ + if ( MainWindow::self && MainWindow::self->currProject() && + MainWindow::self->currProject()->fakeFormFileFor( o ) ) + return; + MetaDataBase::setPropertyChanged( o, "name", TRUE ); + if ( !::tqqt_cast(o) && !::tqqt_cast(o) ) + MetaDataBase::setPropertyChanged( o, "geometry", TRUE ); + + if ( ::tqqt_cast(o) || + ::tqqt_cast(o) || + ::tqqt_cast(o) || + ::tqqt_cast(o) ) { + if (::tqqt_cast(o) && ::tqqt_cast(widgetOfContainer((TQWidget*)o->parent()))) { + MetaDataBase::setPropertyChanged( o, "usesTextLabel", TRUE ); + MetaDataBase::setPropertyChanged( o, "textLabel", TRUE ); + MetaDataBase::setPropertyChanged( o, "autoRaise", TRUE ); + MetaDataBase::setPropertyChanged( o, "textPosition", TRUE ); + } else { + MetaDataBase::setPropertyChanged( o, "text", TRUE ); + } + } + else if ( ::tqqt_cast(o) ) + MetaDataBase::setPropertyChanged( o, "title", TRUE ); + else if ( o->isA( TQFRAME_OBJECT_NAME_STRING ) ) { + MetaDataBase::setPropertyChanged( o, "frameShadow", TRUE ); + MetaDataBase::setPropertyChanged( o, "frameShape", TRUE ); + } else if ( ::tqqt_cast(o) || ::tqqt_cast(o) ) { + MetaDataBase::setPropertyChanged( o, "pageTitle", TRUE ); + MetaDataBase::setPropertyChanged( o, "pageName", TRUE ); + MetaDataBase::setPropertyChanged( o, "currentPage", TRUE ); + } else if ( ::tqqt_cast(o) ) { + MetaDataBase::setPropertyChanged( o, "currentPage", TRUE ); + MetaDataBase::setPropertyChanged( o, "pageName", TRUE ); + } else if ( ::tqqt_cast(o) ) { + MetaDataBase::setPropertyChanged( o, "currentIndex", TRUE ); + MetaDataBase::setPropertyChanged( o, "itemName", TRUE ); + MetaDataBase::setPropertyChanged( o, "itemLabel", TRUE ); + MetaDataBase::setPropertyChanged( o, "itemIconSet", TRUE ); + MetaDataBase::setPropertyChanged( o, "itemToolTip", TRUE ); + MetaDataBase::setPropertyChanged( o, "itemBackgroundMode", TRUE ); +#ifndef TQT_NO_TABLE + } else if ( ::tqqt_cast(o) ) { +# ifndef TQT_NO_SQL + if (!::tqqt_cast(o) ) +# endif + { + MetaDataBase::setPropertyChanged( o, "numRows", TRUE ); + MetaDataBase::setPropertyChanged( o, "numCols", TRUE ); + TQTable *t = (TQTable*)o; + for ( int i = 0; i < 3; ++i ) { + t->horizontalHeader()->setLabel( i, TQString::number( i + 1 ) ); + t->verticalHeader()->setLabel( i, TQString::number( i + 1 ) ); + } + } +#endif + } else if ( ::tqqt_cast(o) ) { + MetaDataBase::setPropertyChanged( o, "orientation", TRUE ); + } else if ( ::tqqt_cast(o) ) { + MetaDataBase::setPropertyChanged( o, "label", TRUE ); + } else if ( ::tqqt_cast(o) ) { + MetaDataBase::setPropertyChanged( o, "itemName", TRUE ); + MetaDataBase::setPropertyChanged( o, "itemNumber", TRUE ); + MetaDataBase::setPropertyChanged( o, "itemText", TRUE ); + } +} + +bool WidgetFactory::hasSpecialEditor( int id, TQObject *editorWidget ) +{ + TQString className = WidgetDatabase::className( id ); + + if ( className.contains( "ListBox" ) ) + return TRUE; + if ( className.contains( "ComboBox" ) ) + return TRUE; + if ( className.contains( "ListView" ) ) + return TRUE; + if ( className.contains( "IconView" ) ) + return TRUE; + if ( className == TQTEXTEDIT_OBJECT_NAME_STRING || className == TQMULTILINEEDIT_OBJECT_NAME_STRING ) + return TRUE; + if ( ::tqqt_cast(editorWidget) != 0 ) + return TRUE; + + return FALSE; +} + +bool WidgetFactory::hasItems( int id, TQObject *editorWidget ) +{ + TQString className = WidgetDatabase::className( id ); + + if ( className.contains( "ListBox" ) || className.contains( "ListView" ) || + className.contains( "IconView" ) || className.contains( "ComboBox" ) || + ::tqqt_cast(editorWidget) != 0 ) + return TRUE; + + return FALSE; +} + +void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, FormWindow *fw ) +{ + TQString className = WidgetDatabase::className( id ); + + if ( className.contains( "ListBox" ) ) { + if ( !::tqqt_cast(editWidget) ) + return; + ListBoxEditor *e = new ListBoxEditor( parent, editWidget, fw ); + e->exec(); + delete e; + return; + } + + if ( className.contains( "ComboBox" ) ) { + if ( !::tqqt_cast(editWidget) ) + return; + TQComboBox *cb = (TQComboBox*)editWidget; + ListBoxEditor *e = new ListBoxEditor( parent, cb->listBox(), fw ); + e->exec(); + delete e; + cb->update(); + return; + } + + if ( className.contains( "ListView" ) ) { + if ( !::tqqt_cast(editWidget) ) + return; + TQListView *lv = (TQListView*)editWidget; + ListViewEditor *e = new ListViewEditor( parent, lv, fw ); + e->exec(); + delete e; + return; + } + + if ( className.contains( "IconView" ) ) { + if ( !::tqqt_cast(editWidget) ) + return; + IconViewEditor *e = new IconViewEditor( parent, editWidget, fw ); + e->exec(); + delete e; + return; + } + + if ( className == TQMULTILINEEDIT_OBJECT_NAME_STRING || className == TQTEXTEDIT_OBJECT_NAME_STRING ) { + MultiLineEditor *e = new MultiLineEditor( FALSE, TRUE, parent, editWidget, fw ); + e->exec(); + delete e; + return; + } +#ifndef TQT_NO_TABLE + if (::tqqt_cast(editWidget) != 0) { + TableEditor *e = new TableEditor( parent, editWidget, fw ); + e->exec(); + delete e; + return; + } +#endif +} + +bool WidgetFactory::canResetProperty( TQObject *w, const TQString &propName ) +{ + if ( propName == "name" || propName == "geometry" ) + return FALSE; + TQStringList l = *changedProperties->find( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ); + return l.findIndex( propName ) == -1; +} + +bool WidgetFactory::resetProperty( TQObject *w, const TQString &propName ) +{ + const TQMetaProperty *p = w->metaObject()->property( w->metaObject()-> + findProperty( propName, TRUE ), TRUE ); + if (!p ) + return FALSE; + return p->reset( w ); +} + +TQVariant WidgetFactory::defaultValue( TQObject *w, const TQString &propName ) +{ + if ( propName == "wordwrap" ) { + int v = defaultValue( w, "alignment" ).toInt(); + return TQVariant( ( v & WordBreak ) == WordBreak, 0 ); + } else if ( propName == "toolTip" || propName == "whatsThis" ) { + return TQVariant( TQString::fromLatin1( "" ) ); + } else if ( w->inherits( "CustomWidget" ) ) { + return TQVariant(); + } else if ( propName == "frameworkCode" ) { + return TQVariant( TRUE, 0 ); + } else if ( propName == "layoutMargin" || propName == "layoutSpacing" ) { + return TQVariant( -1 ); + } + + return *( *defaultProperties->find( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) ).find( propName ); +} + +TQString WidgetFactory::defaultCurrentItem( TQObject *w, const TQString &propName ) +{ + const TQMetaProperty *p = w->metaObject()-> + property( w->metaObject()->findProperty( propName, TRUE ), TRUE ); + if ( !p ) { + int v = defaultValue( w, "alignment" ).toInt(); + if ( propName == "hAlign" ) { + if ( ( v & AlignAuto ) == AlignAuto ) + return "AlignAuto"; + if ( ( v & AlignLeft ) == AlignLeft ) + return "AlignLeft"; + if ( ( v & AlignCenter ) == AlignCenter || ( v & AlignHCenter ) == AlignHCenter ) + return "AlignHCenter"; + if ( ( v & AlignRight ) == AlignRight ) + return "AlignRight"; + if ( ( v & AlignJustify ) == AlignJustify ) + return "AlignJustify"; + } else if ( propName == "vAlign" ) { + if ( ( v & AlignTop ) == AlignTop ) + return "AlignTop"; + if ( ( v & AlignCenter ) == AlignCenter || ( v & AlignVCenter ) == AlignVCenter ) + return "AlignVCenter"; + if ( ( v & AlignBottom ) == AlignBottom ) + return "AlignBottom"; + } else if ( propName == "resizeMode" ) { + return "Auto"; + } + return TQString(); + + } + return p->valueToKey( defaultValue( w, propName ).toInt() ); +} + +TQWidget *WidgetFactory::createCustomWidget( TQWidget *parent, const char *name, MetaDataBase::CustomWidget *w ) +{ + if ( !w ) + return 0; + return new CustomWidget( parent, name, w ); +} + +TQVariant WidgetFactory::property( TQObject *w, const char *name ) +{ + int id = w->metaObject()->findProperty( name, TRUE ); + const TQMetaProperty* p = w->metaObject()->property( id, TRUE ); + if ( !p || !p->isValid() ) + return MetaDataBase::fakeProperty( w, name ); + return w->property( name ); +} + +void QDesignerLabel::updateBuddy() +{ + + if ( myBuddy.isEmpty() ) + return; + + TQObjectList *l = topLevelWidget()->queryList( TQWIDGET_OBJECT_NAME_STRING, myBuddy, FALSE, TRUE ); + if ( !l || !l->first() ) { + delete l; + return; + } + + TQLabel::setBuddy( (TQWidget*)l->first() ); + delete l; +} + + +void QDesignerWidget::resizeEvent( TQResizeEvent* e) +{ + if ( need_frame ) { + TQPainter p(this); + p.setPen( backgroundColor() ); + p.drawRect( TQRect( TQPoint(0,0), e->oldSize() ) ); + } +} + +void QDesignerWidget::paintEvent( TQPaintEvent *e ) +{ + if ( need_frame ) { + TQPainter p(this); + p.setPen( backgroundColor().dark() ); + p.drawRect( rect() ); + } + formwindow->paintGrid( this, e ); +} + +void QDesignerDialog::paintEvent( TQPaintEvent *e ) +{ + formwindow->paintGrid( this, e ); +} + +TQSizePolicy TQLayoutWidget::sizePolicy() const +{ + return sp; +} + +bool TQLayoutWidget::event( TQEvent *e ) +{ + if ( e && ( e->type() == TQEvent::ChildInserted || + e->type() == TQEvent::ChildRemoved || + e->type() == TQEvent::LayoutHint || + e->type() == TQEvent::Reparent ) ) + updateSizePolicy(); + return TQWidget::event( e ); +} + +/* + This function must be called on TQLayoutWidget creation and whenever + the TQLayoutWidget's parent layout changes (e.g., from a TQHBoxLayout + to a TQVBoxLayout), because of the (illogical) way layouting works. +*/ +void TQLayoutWidget::updateSizePolicy() +{ + if ( childrenListObject().isEmpty() || childrenListObject().count() == 0 ) { + sp = TQWidget::sizePolicy(); + return; + } + + /* + TQSizePolicy::MayShrink & friends are private. Here we assume the + following: + + Fixed = 0 + Maximum = MayShrink + Minimum = MayGrow + Preferred = MayShrink | MayGrow + */ + + int ht = (int) TQSizePolicy::Preferred; + int vt = (int) TQSizePolicy::Preferred; + + if ( layout() ) { + /* + parentLayout is set to the parent layout if there is one and if it is + top level, in which case layouting is illogical. + */ + TQLayout *parentLayout = 0; + if ( parent() && parent()->isWidgetType() ) { + parentLayout = ((TQWidget *)parent())->layout(); + if ( parentLayout && + ::tqqt_cast(parentLayout->mainWidget()) ) + parentLayout = 0; + } + + TQObjectListIt it( childrenListObject() ); + TQObject *o; + + if ( ::tqqt_cast(layout()) ) { + if ( ::tqqt_cast(parentLayout) ) + vt = TQSizePolicy::Minimum; + else + vt = TQSizePolicy::Fixed; + + while ( ( o = it.current() ) ) { + ++it; + if ( !o->isWidgetType() || ( (TQWidget*)o )->testWState( WState_ForceHide ) ) + continue; + TQWidget *w = (TQWidget*)o; + + if ( !w->sizePolicy().mayGrowHorizontally() ) + ht &= ~TQSizePolicy::Minimum; + if ( !w->sizePolicy().mayShrinkHorizontally() ) + ht &= ~TQSizePolicy::Maximum; + if ( w->sizePolicy().mayGrowVertically() ) + vt |= TQSizePolicy::Minimum; + if ( w->sizePolicy().mayShrinkVertically() ) + vt |= TQSizePolicy::Maximum; + } + } else if ( ::tqqt_cast(layout()) ) { + if ( ::tqqt_cast(parentLayout) ) + ht = TQSizePolicy::Minimum; + else + ht = TQSizePolicy::Fixed; + + while ( ( o = it.current() ) ) { + ++it; + if ( !o->isWidgetType() || ( (TQWidget*)o )->testWState( WState_ForceHide ) ) + continue; + TQWidget *w = (TQWidget*)o; + + if ( w->sizePolicy().mayGrowHorizontally() ) + ht |= TQSizePolicy::Minimum; + if ( w->sizePolicy().mayShrinkHorizontally() ) + ht |= TQSizePolicy::Maximum; + if ( !w->sizePolicy().mayGrowVertically() ) + vt &= ~TQSizePolicy::Minimum; + if ( !w->sizePolicy().mayShrinkVertically() ) + vt &= ~TQSizePolicy::Maximum; + } + } else if ( ::tqqt_cast(layout()) ) { + ht = TQSizePolicy::Fixed; + vt = TQSizePolicy::Fixed; + if ( parentLayout ) { + if ( ::tqqt_cast(parentLayout) ) + ht = TQSizePolicy::Minimum; + else if ( ::tqqt_cast(parentLayout) ) + vt = TQSizePolicy::Minimum; + } + + while ( ( o = it.current() ) ) { + ++it; + if ( !o->isWidgetType() || ( (TQWidget*)o )->testWState( WState_ForceHide ) ) + continue; + TQWidget *w = (TQWidget*)o; + + if ( w->sizePolicy().mayGrowHorizontally() ) + ht |= TQSizePolicy::Minimum; + if ( w->sizePolicy().mayShrinkHorizontally() ) + ht |= TQSizePolicy::Maximum; + if ( w->sizePolicy().mayGrowVertically() ) + vt |= TQSizePolicy::Minimum; + if ( w->sizePolicy().mayShrinkVertically() ) + vt |= TQSizePolicy::Maximum; + } + } +#ifdef USE_QT4 + if ( layout()->expanding() & TQSizePolicy::Horizontally ) +#else // USE_QT4 + if ( layout()->expanding() & TQSizePolicy::Horizontally ) +#endif // USE_QT4 + ht = TQSizePolicy::Expanding; +#ifdef USE_QT4 + if ( layout()->expanding() & TQSizePolicy::Vertically ) +#else // USE_QT4 + if ( layout()->expanding() & TQSizePolicy::Vertically ) +#endif // USE_QT4 + vt = TQSizePolicy::Expanding; + + layout()->invalidate(); + } + + sp = TQSizePolicy( (TQSizePolicy::SizeType) ht, (TQSizePolicy::SizeType) vt ); + updateGeometry(); +} + +void CustomWidget::paintEvent( TQPaintEvent *e ) +{ + if ( ::tqqt_cast(parentWidget()) ) { + ( (FormWindow*)parentWidget() )->paintGrid( this, e ); + } else { + TQPainter p( this ); + p.fillRect( rect(), colorGroup().dark() ); + p.setPen( colorGroup().light() ); + p.drawText( 2, 2, width() - 4, height() - 4, TQt::AlignAuto | TQt::AlignTop, cusw->className ); + p.drawPixmap( ( width() - cusw->pixmap->width() ) / 2, + ( height() - cusw->pixmap->height() ) / 2, + *cusw->pixmap ); + } +} + + +CustomWidgetFactory::CustomWidgetFactory() +{ +} + +TQWidget *CustomWidgetFactory::createWidget( const TQString &className, TQWidget *parent, const char *name ) const +{ + MetaDataBase::CustomWidget *w = MetaDataBase::customWidget( WidgetDatabase::idFromClassName( className ) ); + if ( !w ) + return 0; + return WidgetFactory::createCustomWidget( parent, name, w ); +} + + +QDesignerToolBox::QDesignerToolBox( TQWidget *parent, const char *name ) + : TQToolBox( parent, name ) +{ +} + +TQString QDesignerToolBox::itemLabel() const +{ + return TQToolBox::itemLabel( currentIndex() ); +} + +void QDesignerToolBox::setItemLabel( const TQString &l ) +{ + TQToolBox::setItemLabel( currentIndex(), l ); +} + +TQCString QDesignerToolBox::itemName() const +{ + return currentItem() ? currentItem()->name() : 0; +} + +void QDesignerToolBox::setItemName( const TQCString &n ) +{ + if (currentItem()) + currentItem()->setName( n ); +} + + +TQt::BackgroundMode QDesignerToolBox::itemBackgroundMode() const +{ + return (item(0) ? item(0)->backgroundMode() : PaletteBackground); +} + +void QDesignerToolBox::setItemBackgroundMode( BackgroundMode bmode ) +{ + for (int i = 0; i < count(); ++i) { + TQWidget *w = item(i); + w->setBackgroundMode( bmode ); + w->update(); + } +} + +void QDesignerToolBox::itemInserted( int index ) +{ + if (count() > 1) + item(index)->setBackgroundMode(item(index>0?0:1)->backgroundMode()); +} diff --git a/tdevdesigner/designer/widgetfactory.h b/kdevdesigner/designer/widgetfactory.h similarity index 100% rename from tdevdesigner/designer/widgetfactory.h rename to kdevdesigner/designer/widgetfactory.h diff --git a/tdevdesigner/designer/wizardeditor.ui b/kdevdesigner/designer/wizardeditor.ui similarity index 100% rename from tdevdesigner/designer/wizardeditor.ui rename to kdevdesigner/designer/wizardeditor.ui diff --git a/tdevdesigner/designer/wizardeditorimpl.cpp b/kdevdesigner/designer/wizardeditorimpl.cpp similarity index 100% rename from tdevdesigner/designer/wizardeditorimpl.cpp rename to kdevdesigner/designer/wizardeditorimpl.cpp diff --git a/tdevdesigner/designer/wizardeditorimpl.h b/kdevdesigner/designer/wizardeditorimpl.h similarity index 100% rename from tdevdesigner/designer/wizardeditorimpl.h rename to kdevdesigner/designer/wizardeditorimpl.h diff --git a/kdevdesigner/designer/workspace.cpp b/kdevdesigner/designer/workspace.cpp new file mode 100644 index 00000000..b806cc6c --- /dev/null +++ b/kdevdesigner/designer/workspace.cpp @@ -0,0 +1,711 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include // HP-UX compiler needs this here +#include "workspace.h" +#include "formwindow.h" +#include "mainwindow.h" +#include "globaldefs.h" +#include "command.h" +#include "project.h" +#include "pixmapcollection.h" +#include "sourcefile.h" +#include "sourceeditor.h" +#include "propertyeditor.h" + +#include +#include "kdevdesigner_part.h" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "qcompletionedit.h" + +#include + +WorkspaceItem::WorkspaceItem( TQListView *parent, Project* p ) + : TQListViewItem( parent ) +{ + init(); + project = p; + t = ProjectType; + setPixmap( 0, SmallIcon( "designer_folder.png" , KDevDesignerPartFactory::instance()) ); + setExpandable( FALSE ); +} + +WorkspaceItem::WorkspaceItem( TQListViewItem *parent, SourceFile* sf ) + : TQListViewItem( parent ) +{ + init(); + sourceFile = sf; + t = SourceFileType; + setPixmap( 0, SmallIcon( "designer_filenew.png" , KDevDesignerPartFactory::instance()) ); +} + +WorkspaceItem::WorkspaceItem( TQListViewItem *parent, TQObject *o, Project *p ) + : TQListViewItem( parent ) +{ + init(); + object = o; + project = p; + t = ObjectType; + setPixmap( 0, SmallIcon( "designer_object.png" , KDevDesignerPartFactory::instance()) ); + TQObject::connect( p->fakeFormFileFor( o ), TQT_SIGNAL( somethingChanged(FormFile*) ), + listView(), TQT_SLOT( update() ) ); +} + +WorkspaceItem::WorkspaceItem( TQListViewItem *parent, FormFile* ff, Type type ) + : TQListViewItem( parent ) +{ + init(); + formFile = ff; + t = type; + if ( type == FormFileType ) { + setPixmap( 0, SmallIcon( "designer_form.png" , KDevDesignerPartFactory::instance()) ); + TQObject::connect( ff, TQT_SIGNAL( somethingChanged(FormFile*) ), listView(), TQT_SLOT( update(FormFile*) ) ); + if ( formFile->supportsCodeFile() ) { + (void) new WorkspaceItem( this, formFile, FormSourceType ); + } + } else if ( type == FormSourceType ) { + setPixmap( 0, SmallIcon( "designer_filenew.png" , KDevDesignerPartFactory::instance()) ); + } +} + + +void WorkspaceItem::init() +{ + autoOpen = FALSE; + useOddColor = FALSE; + project = 0; + sourceFile = 0; + formFile = 0; +} + +void WorkspaceItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ) +{ + TQColorGroup g( cg ); + g.setColor( TQColorGroup::Base, backgroundColor() ); + g.setColor( TQColorGroup::Foreground, TQt::black ); + + if ( type() == FormSourceType && + ( !formFile->hasFormCode() || ( formFile->codeFileState() == FormFile::Deleted && formFile->formWindow() ) ) && + parent() && parent()->parent() && ( (WorkspaceItem*)parent()->parent() )->project && + ( (WorkspaceItem*)parent()->parent() )->project->isCpp() ) { + g.setColor( TQColorGroup::Text, listView()->palette().disabled().color( TQColorGroup::Text) ); + g.setColor( TQColorGroup::HighlightedText, listView()->palette().disabled().color( TQColorGroup::Text) ); + } else { + g.setColor( TQColorGroup::Text, TQt::black ); + } + p->save(); + + if ( isModified() ) { + TQFont f = p->font(); + f.setBold( TRUE ); + p->setFont( f ); + } + + TQListViewItem::paintCell( p, g, column, width, align ); + p->setPen( TQPen( cg.dark(), 1 ) ); + if ( column == 0 ) + p->drawLine( 0, 0, 0, height() - 1 ); + if ( listView()->firstChild() != this ) { + if ( nextSibling() != itemBelow() && itemBelow()->depth() < depth() ) { + int d = depth() - itemBelow()->depth(); + p->drawLine( -listView()->treeStepSize() * d, height() - 1, 0, height() - 1 ); + } + } + p->drawLine( 0, height() - 1, width, height() - 1 ); + p->drawLine( width - 1, 0, width - 1, height() ); + p->restore(); +} + +TQString WorkspaceItem::text( int column ) const +{ + if ( column != 0 ) + return TQListViewItem::text( column ); + switch( t ) { + case ProjectType: + if ( project->isDummy() ) { + return i18n("" ); + } else if ( MainWindow::self->singleProjectMode() ) { + return TQFileInfo( project->fileName() ).baseName(); + } + return project->makeRelative( project->fileName() ); + case FormFileType: + if ( !MainWindow::self->singleProjectMode() ) + return formFile->formName() + ": " + formFile->fileName(); + return formFile->formName(); + case FormSourceType: + if ( !MainWindow::self->singleProjectMode() ) + return formFile->codeFile(); + return formFile->formName() + " [Source]"; + case SourceFileType: + return sourceFile->fileName(); + case ObjectType: + if ( !project->hasParentObject( object ) ) + return object->name(); + return project->qualifiedName( object ); + } + + return TQString(); // shut up compiler +} + +void WorkspaceItem::fillCompletionList( TQStringList& completion ) +{ + switch( t ) { + case ProjectType: + break; + case FormFileType: + completion += formFile->formName(); + completion += formFile->fileName(); + break; + case FormSourceType: + completion += formFile->codeFile(); + break; + case SourceFileType: + completion += sourceFile->fileName(); + break; + case ObjectType: + completion += object->name(); + } +} + +bool WorkspaceItem::checkCompletion( const TQString& completion ) +{ + switch( t ) { + case ProjectType: + break; + case FormFileType: + return completion == formFile->formName() + || completion == formFile->fileName(); + case FormSourceType: + return completion == formFile->codeFile(); + case SourceFileType: + return completion == sourceFile->fileName(); + case ObjectType: + return completion == object->name(); + } + return FALSE; +} + + +bool WorkspaceItem::isModified() const +{ + switch( t ) { + case ProjectType: + return project->isModified(); + case FormFileType: + return formFile->isModified( FormFile::WFormWindow ); + case FormSourceType: + return formFile->isModified( FormFile::WFormCode ); + case SourceFileType: + return sourceFile->isModified(); + case ObjectType: + return project->fakeFormFileFor( object )->isModified(); + break; + } + return FALSE; // shut up compiler +} + +TQString WorkspaceItem::key( int column, bool ) const +{ + TQString key = text( column ); + if ( t == FormFileType ) + key.prepend( "0" ); + else if ( t == ObjectType ) + key.prepend( "a" ); + else + key.prepend( "A" ); + return key; +} + +TQColor WorkspaceItem::backgroundColor() +{ + bool b = useOddColor; + if ( t == FormSourceType && parent() ) + b = ( ( WorkspaceItem*)parent() )->useOddColor; + return b ? *backColor2 : *backColor1; +} + + +void WorkspaceItem::setOpen( bool b ) +{ + TQListViewItem::setOpen( b ); + autoOpen = FALSE; +} + +void WorkspaceItem::setAutoOpen( bool b ) +{ + TQListViewItem::setOpen( b ); + autoOpen = b; +} + +Workspace::Workspace( TQWidget *parent, MainWindow *mw ) + : TQListView( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | + WStyle_Tool | WStyle_MinMax | WStyle_SysMenu ), mainWindow( mw ), + project( 0 ), completionDirty( FALSE ) +{ + init_colors(); + + setDefaultRenameAction( Accept ); + blockNewForms = FALSE; + bufferEdit = 0; + header()->setStretchEnabled( TRUE ); + header()->hide(); + setSorting( 0 ); + setResizePolicy( TQScrollView::Manual ); +#ifndef TQ_WS_MAC + TQPalette p( palette() ); + p.setColor( TQColorGroup::Base, TQColor( *backColor2 ) ); + (void)*selectedBack; // hack + setPalette( p ); +#endif + addColumn( i18n( "Files" ) ); + setAllColumnsShowFocus( TRUE ); + connect( this, TQT_SIGNAL( mouseButtonClicked( int, TQListViewItem *, const TQPoint &, int ) ), + this, TQT_SLOT( itemClicked( int, TQListViewItem *, const TQPoint& ) ) ), + connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), + this, TQT_SLOT( itemDoubleClicked( TQListViewItem * ) ) ), + connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint &, int ) ), + this, TQT_SLOT( rmbClicked( TQListViewItem *, const TQPoint& ) ) ), + setHScrollBarMode( AlwaysOff ); + setVScrollBarMode( AlwaysOn ); + viewport()->setAcceptDrops( TRUE ); + setAcceptDrops( TRUE ); + setColumnWidthMode( 1, Manual ); +} + + +void Workspace::projectDestroyed( TQObject* o ) +{ + if ( o == project ) { + project = 0; + clear(); + } +} + +void Workspace::setCurrentProject( Project *pro ) +{ + if ( project == pro ) + return; + if ( project ) { + disconnect( project, TQT_SIGNAL( sourceFileAdded(SourceFile*) ), this, TQT_SLOT( sourceFileAdded(SourceFile*) ) ); + disconnect( project, TQT_SIGNAL( sourceFileRemoved(SourceFile*) ), this, TQT_SLOT( sourceFileRemoved(SourceFile*) ) ); + disconnect( project, TQT_SIGNAL( formFileAdded(FormFile*) ), this, TQT_SLOT( formFileAdded(FormFile*) ) ); + disconnect( project, TQT_SIGNAL( formFileRemoved(FormFile*) ), this, TQT_SLOT( formFileRemoved(FormFile*) ) ); + disconnect( project, TQT_SIGNAL( objectAdded(TQObject*) ), this, TQT_SLOT( objectAdded(TQObject*) ) ); + disconnect( project, TQT_SIGNAL( objectRemoved(TQObject*) ), this, TQT_SLOT( objectRemoved(TQObject*) ) ); + disconnect( project, TQT_SIGNAL( projectModified() ), this, TQT_SLOT( update() ) ); + } + project = pro; + connect( project, TQT_SIGNAL( sourceFileAdded(SourceFile*) ), this, TQT_SLOT( sourceFileAdded(SourceFile*) ) ); + connect( project, TQT_SIGNAL( sourceFileRemoved(SourceFile*) ), this, TQT_SLOT( sourceFileRemoved(SourceFile*) ) ); + connect( project, TQT_SIGNAL( formFileAdded(FormFile*) ), this, TQT_SLOT( formFileAdded(FormFile*) ) ); + connect( project, TQT_SIGNAL( formFileRemoved(FormFile*) ), this, TQT_SLOT( formFileRemoved(FormFile*) ) ); + connect( project, TQT_SIGNAL( destroyed(TQObject*) ), this, TQT_SLOT( projectDestroyed(TQObject*) ) ); + connect( project, TQT_SIGNAL( objectAdded(TQObject*) ), this, TQT_SLOT( objectAdded(TQObject*) ) ); + connect( project, TQT_SIGNAL( objectRemoved(TQObject*) ), this, TQT_SLOT( objectRemoved(TQObject*) ) ); + connect( project, TQT_SIGNAL( projectModified() ), this, TQT_SLOT( update() ) ); + clear(); + + if ( bufferEdit ) + bufferEdit->clear(); + + projectItem = new WorkspaceItem( this, project ); + + projectItem->setOpen( TRUE ); + + for ( TQPtrListIterator sources = project->sourceFiles(); + sources.current(); ++sources ) { + SourceFile* f = sources.current(); + (void) new WorkspaceItem( projectItem, f ); + } + + for ( TQPtrListIterator forms = project->formFiles(); + forms.current(); ++forms ) { + FormFile* f = forms.current(); + if ( f->isFake() ) + continue; + + (void) new WorkspaceItem( projectItem, f ); + } + + TQObjectList l = project->objects(); + TQObjectListIt objs( l ); + for ( ;objs.current(); ++objs ) { + TQObject* o = objs.current(); + (void) new WorkspaceItem( projectItem, o, project ); + } + + updateColors(); + completionDirty = TRUE; +} + +void Workspace::sourceFileAdded( SourceFile* sf ) +{ + (void) new WorkspaceItem( projectItem, sf ); + updateColors(); +} + +void Workspace::sourceFileRemoved( SourceFile* sf ) +{ + delete findItem( sf ); + updateColors(); +} + +void Workspace::formFileAdded( FormFile* ff ) +{ + if ( ff->isFake() ) + return; + (void) new WorkspaceItem( projectItem, ff ); + updateColors(); +} + +void Workspace::formFileRemoved( FormFile* ff ) +{ + delete findItem( ff ); + updateColors(); +} + +void Workspace::objectAdded( TQObject *o ) +{ + (void) new WorkspaceItem( projectItem, o, project ); + updateColors(); +} + +void Workspace::objectRemoved( TQObject *o ) +{ + delete findItem( o ); + updateColors(); +} + +void Workspace::update() +{ + completionDirty = TRUE; + triggerUpdate(); +} + +void Workspace::update( FormFile* ff ) +{ + TQListViewItem* i = findItem( ff ); + if ( i ) { + i->repaint(); + if ( (i = i->firstChild()) ) + i->repaint(); + } +} + + +void Workspace::activeFormChanged( FormWindow *fw ) +{ + WorkspaceItem *i = findItem( fw->formFile() ); + if ( i ) { + setCurrentItem( i ); + setSelected( i, TRUE ); + if ( !i->isOpen() ) + i->setAutoOpen( TRUE ); + } + + closeAutoOpenItems(); + +} + +void Workspace::activeEditorChanged( SourceEditor *se ) +{ + if ( !se->object() ) + return; + + if ( se->formWindow() ) { + WorkspaceItem *i = findItem( se->formWindow()->formFile() ); + if ( i && i->firstChild() ) { + if ( !i->isOpen() ) + i->setAutoOpen( TRUE ); + setCurrentItem( i->firstChild() ); + setSelected( i->firstChild(), TRUE ); + } + } else { + WorkspaceItem *i = findItem( se->sourceFile() ); + if ( i ) { + setCurrentItem( i ); + setSelected( i, TRUE ); + } + } + + closeAutoOpenItems(); +} + +WorkspaceItem *Workspace::findItem( FormFile* ff) +{ + TQListViewItemIterator it( this ); + for ( ; it.current(); ++it ) { + if ( ( (WorkspaceItem*)it.current() )->formFile == ff ) + return (WorkspaceItem*)it.current(); + } + return 0; +} + +WorkspaceItem *Workspace::findItem( SourceFile *sf ) +{ + TQListViewItemIterator it( this ); + for ( ; it.current(); ++it ) { + if ( ( (WorkspaceItem*)it.current() )->sourceFile == sf ) + return (WorkspaceItem*)it.current(); + } + return 0; +} + +WorkspaceItem *Workspace::findItem( TQObject *o ) +{ + TQListViewItemIterator it( this ); + for ( ; it.current(); ++it ) { + if ( ( (WorkspaceItem*)it.current() )->object == o ) + return (WorkspaceItem*)it.current(); + } + return 0; +} + +void Workspace::closeAutoOpenItems() +{ + TQListViewItemIterator it( this ); + for ( ; it.current(); ++it ) { + WorkspaceItem* i = (WorkspaceItem*) it.current(); + WorkspaceItem* ip = (WorkspaceItem*) i->parent(); + if ( i->type() == WorkspaceItem::FormSourceType ) { + if ( !i->isSelected() && !ip->isSelected() + && ip->isAutoOpen() ) { + ip->setAutoOpen( FALSE ); + } + } + } +} + + +void Workspace::closeEvent( TQCloseEvent *e ) +{ + e->accept(); +} + +void Workspace::itemDoubleClicked( TQListViewItem *i ) +{ + if ( ( (WorkspaceItem*)i)->type()== WorkspaceItem::ProjectType ) + i->setOpen( TRUE ); +} + +void Workspace::itemClicked( int button, TQListViewItem *i, const TQPoint& ) +{ + if ( !i || button != Qt::LeftButton ) + return; + + closeAutoOpenItems(); + + WorkspaceItem* wi = (WorkspaceItem*)i; + switch( wi->type() ) { + case WorkspaceItem::ProjectType: + break; // ### TODO + case WorkspaceItem::FormFileType: + wi->formFile->showFormWindow(); + break; + case WorkspaceItem::FormSourceType: + wi->formFile->showEditor( FALSE ); + break; + case WorkspaceItem::SourceFileType: + mainWindow->editSource( wi->sourceFile ); + break; + case WorkspaceItem::ObjectType: + project->fakeFormFileFor( wi->object )->formWindow()->setFocus(); + mainWindow->propertyeditor()->setWidget( wi->object, + project->fakeFormFileFor( wi->object )->formWindow() ); + mainWindow->objectHierarchy()-> + setFormWindow( project->fakeFormFileFor( wi->object )->formWindow(), wi->object ); + project->fakeFormFileFor( wi->object )->showEditor(); + break; + } +} + +void Workspace::contentsDropEvent( TQDropEvent *e ) +{ + if ( !TQUriDrag::canDecode( e ) ) { + e->ignore(); + } else { + TQStringList files; + TQUriDrag::decodeLocalFiles( e, files ); + if ( !files.isEmpty() ) { + for ( TQStringList::Iterator it = files.begin(); it != files.end(); ++it ) { + TQString fn = *it; + mainWindow->fileOpen( "", "", fn ); + } + } + } +} + +void Workspace::contentsDragEnterEvent( TQDragEnterEvent *e ) +{ + if ( !TQUriDrag::canDecode( e ) ) + e->ignore(); + else + e->accept(); +} + +void Workspace::contentsDragMoveEvent( TQDragMoveEvent *e ) +{ + if ( !TQUriDrag::canDecode( e ) ) + e->ignore(); + else + e->accept(); +} + +void Workspace::rmbClicked( TQListViewItem *i, const TQPoint& pos ) +{ + if ( !i ) + return; + WorkspaceItem* wi = (WorkspaceItem*)i; + enum { OPEN_SOURCE, REMOVE_SOURCE, OPEN_FORM, REMOVE_FORM, + OPEN_FORM_SOURCE, REMOVE_FORM_SOURCE, OPEN_OBJECT_SOURCE }; + TQPopupMenu menu( this ); + menu.setCheckable( TRUE ); + switch ( wi->type() ) { + case WorkspaceItem::SourceFileType: + menu.insertItem( i18n( "&Open Source File" ), OPEN_SOURCE ); + menu.insertSeparator(); + menu.insertItem( SmallIcon( "designer_editcut.png" , KDevDesignerPartFactory::instance()), + i18n( "&Remove Source File From Project" ), REMOVE_SOURCE ); + break; + case WorkspaceItem::FormFileType: + menu.insertItem( i18n( "&Open Form" ), OPEN_FORM ); + menu.insertSeparator(); + menu.insertItem( SmallIcon( "designer_editcut.png" , KDevDesignerPartFactory::instance()), + i18n( "&Remove Form From Project" ), REMOVE_FORM ); + break; + case WorkspaceItem::FormSourceType: + menu.insertItem( i18n( "&Open Form Source" ), OPEN_FORM_SOURCE ); + menu.insertSeparator(); + if ( project->isCpp() ) + menu.insertItem( SmallIcon( "designer_editcut.png" , KDevDesignerPartFactory::instance()), + i18n( "&Remove Source File From Form" ), REMOVE_FORM_SOURCE ); + else + menu.insertItem( SmallIcon( "designer_editcut.png" , KDevDesignerPartFactory::instance()), + i18n( "&Remove Form From Project" ), REMOVE_FORM ); + break; + case WorkspaceItem::ProjectType: + MainWindow::self->popupProjectMenu( pos ); + return; + case WorkspaceItem::ObjectType: + menu.insertItem( i18n( "&Open Source" ), OPEN_OBJECT_SOURCE ); + break; + } + + switch ( menu.exec( pos ) ) { + case REMOVE_SOURCE: + project->removeSourceFile( wi->sourceFile ); + break; + case REMOVE_FORM: + project->removeFormFile( wi->formFile ); + break; + case REMOVE_FORM_SOURCE: + ( (WorkspaceItem*)i )->formFile->setModified( TRUE ); + ( (WorkspaceItem*)i )->formFile->setCodeFileState( FormFile::Deleted ); + delete ( (WorkspaceItem*)i )->formFile->editor(); + break; + case OPEN_OBJECT_SOURCE: + case OPEN_SOURCE: + case OPEN_FORM: + case OPEN_FORM_SOURCE: + itemClicked( Qt::LeftButton, i, pos ); + break; + } +} + +bool Workspace::eventFilter( TQObject *o, TQEvent * e ) +{ + // Reggie, on what type of events do we have to execute updateBufferEdit() + if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(bufferEdit) && e->type() != TQEvent::ChildRemoved ) + updateBufferEdit(); + return TQListView::eventFilter( o, e ); +} + +void Workspace::setBufferEdit( QCompletionEdit *edit ) +{ + bufferEdit = edit; + connect( bufferEdit, TQT_SIGNAL( chosen( const TQString & ) ), + this, TQT_SLOT( bufferChosen( const TQString & ) ) ); + bufferEdit->installEventFilter( this ); +} + +void Workspace::updateBufferEdit() +{ + if ( !bufferEdit || !completionDirty || !MainWindow::self) + return; + completionDirty = FALSE; + TQStringList completion = MainWindow::self->projectFileNames(); + TQListViewItemIterator it( this ); + while ( it.current() ) { + ( (WorkspaceItem*)it.current())->fillCompletionList( completion ); + ++it; + } + completion.sort(); + bufferEdit->setCompletionList( completion ); +} + +void Workspace::bufferChosen( const TQString &buffer ) +{ + if ( bufferEdit ) + bufferEdit->setText( "" ); + + if ( MainWindow::self->projectFileNames().contains( buffer ) ) { + MainWindow::self->setCurrentProjectByFilename( buffer ); + return; + } + + TQListViewItemIterator it( this ); + while ( it.current() ) { + if ( ( (WorkspaceItem*)it.current())->checkCompletion( buffer ) ) { + itemClicked( Qt::LeftButton, it.current(), TQPoint() ); + break; + } + ++it; + } +} + +void Workspace::updateColors() +{ + TQListViewItem* i = firstChild(); + if ( i ) + i = i->firstChild(); + bool b = TRUE; + while ( i ) { + WorkspaceItem* wi = ( WorkspaceItem*) i; + i = i->nextSibling(); + wi->useOddColor = b; + b = !b; + } +} diff --git a/tdevdesigner/designer/workspace.h b/kdevdesigner/designer/workspace.h similarity index 100% rename from tdevdesigner/designer/workspace.h rename to kdevdesigner/designer/workspace.h diff --git a/tdevdesigner/interfaces/actioninterface.h b/kdevdesigner/interfaces/actioninterface.h similarity index 100% rename from tdevdesigner/interfaces/actioninterface.h rename to kdevdesigner/interfaces/actioninterface.h diff --git a/tdevdesigner/interfaces/classbrowserinterface.h b/kdevdesigner/interfaces/classbrowserinterface.h similarity index 100% rename from tdevdesigner/interfaces/classbrowserinterface.h rename to kdevdesigner/interfaces/classbrowserinterface.h diff --git a/tdevdesigner/interfaces/designerinterface.h b/kdevdesigner/interfaces/designerinterface.h similarity index 100% rename from tdevdesigner/interfaces/designerinterface.h rename to kdevdesigner/interfaces/designerinterface.h diff --git a/tdevdesigner/interfaces/editorinterface.h b/kdevdesigner/interfaces/editorinterface.h similarity index 100% rename from tdevdesigner/interfaces/editorinterface.h rename to kdevdesigner/interfaces/editorinterface.h diff --git a/tdevdesigner/interfaces/filterinterface.h b/kdevdesigner/interfaces/filterinterface.h similarity index 100% rename from tdevdesigner/interfaces/filterinterface.h rename to kdevdesigner/interfaces/filterinterface.h diff --git a/tdevdesigner/interfaces/interpreterinterface.h b/kdevdesigner/interfaces/interpreterinterface.h similarity index 100% rename from tdevdesigner/interfaces/interpreterinterface.h rename to kdevdesigner/interfaces/interpreterinterface.h diff --git a/tdevdesigner/interfaces/languageinterface.h b/kdevdesigner/interfaces/languageinterface.h similarity index 100% rename from tdevdesigner/interfaces/languageinterface.h rename to kdevdesigner/interfaces/languageinterface.h diff --git a/tdevdesigner/interfaces/preferenceinterface.h b/kdevdesigner/interfaces/preferenceinterface.h similarity index 100% rename from tdevdesigner/interfaces/preferenceinterface.h rename to kdevdesigner/interfaces/preferenceinterface.h diff --git a/tdevdesigner/interfaces/projectsettingsiface.h b/kdevdesigner/interfaces/projectsettingsiface.h similarity index 100% rename from tdevdesigner/interfaces/projectsettingsiface.h rename to kdevdesigner/interfaces/projectsettingsiface.h diff --git a/tdevdesigner/interfaces/sourcetemplateiface.h b/kdevdesigner/interfaces/sourcetemplateiface.h similarity index 100% rename from tdevdesigner/interfaces/sourcetemplateiface.h rename to kdevdesigner/interfaces/sourcetemplateiface.h diff --git a/tdevdesigner/interfaces/templatewizardiface.h b/kdevdesigner/interfaces/templatewizardiface.h similarity index 100% rename from tdevdesigner/interfaces/templatewizardiface.h rename to kdevdesigner/interfaces/templatewizardiface.h diff --git a/tdevdesigner/interfaces/widgetinterface.h b/kdevdesigner/interfaces/widgetinterface.h similarity index 100% rename from tdevdesigner/interfaces/widgetinterface.h rename to kdevdesigner/interfaces/widgetinterface.h diff --git a/kdevdesigner/plugins/Makefile.am b/kdevdesigner/plugins/Makefile.am new file mode 100644 index 00000000..defe80c4 --- /dev/null +++ b/kdevdesigner/plugins/Makefile.am @@ -0,0 +1,8 @@ +INCLUDES = -I$(top_srcdir)/interfaces $(all_includes) +METASOURCES = AUTO +kdevdesignerdir = $(kde_moduledir)/plugins/kdevdesigner +kdevdesigner_LTLIBRARIES = libkdevdesigner_lang.la +libkdevdesigner_lang_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) +libkdevdesigner_lang_la_SOURCES = languageinterfaceimpl.cpp +libkdevdesigner_lang_la_LIBADD = $(LIB_QT) + diff --git a/tdevdesigner/plugins/languageinterfaceimpl.cpp b/kdevdesigner/plugins/languageinterfaceimpl.cpp similarity index 100% rename from tdevdesigner/plugins/languageinterfaceimpl.cpp rename to kdevdesigner/plugins/languageinterfaceimpl.cpp diff --git a/tdevdesigner/plugins/languageinterfaceimpl.h b/kdevdesigner/plugins/languageinterfaceimpl.h similarity index 100% rename from tdevdesigner/plugins/languageinterfaceimpl.h rename to kdevdesigner/plugins/languageinterfaceimpl.h diff --git a/tdevdesigner/shared/CMakeLists.txt b/kdevdesigner/shared/CMakeLists.txt similarity index 100% rename from tdevdesigner/shared/CMakeLists.txt rename to kdevdesigner/shared/CMakeLists.txt diff --git a/tdevdesigner/shared/Makefile.am b/kdevdesigner/shared/Makefile.am similarity index 100% rename from tdevdesigner/shared/Makefile.am rename to kdevdesigner/shared/Makefile.am diff --git a/tdevdesigner/shared/domtool.cpp b/kdevdesigner/shared/domtool.cpp similarity index 100% rename from tdevdesigner/shared/domtool.cpp rename to kdevdesigner/shared/domtool.cpp diff --git a/tdevdesigner/shared/domtool.h b/kdevdesigner/shared/domtool.h similarity index 100% rename from tdevdesigner/shared/domtool.h rename to kdevdesigner/shared/domtool.h diff --git a/tdevdesigner/shared/globaldefs.h b/kdevdesigner/shared/globaldefs.h similarity index 100% rename from tdevdesigner/shared/globaldefs.h rename to kdevdesigner/shared/globaldefs.h diff --git a/tdevdesigner/shared/parser.cpp b/kdevdesigner/shared/parser.cpp similarity index 100% rename from tdevdesigner/shared/parser.cpp rename to kdevdesigner/shared/parser.cpp diff --git a/tdevdesigner/shared/parser.h b/kdevdesigner/shared/parser.h similarity index 100% rename from tdevdesigner/shared/parser.h rename to kdevdesigner/shared/parser.h diff --git a/tdevdesigner/shared/ui2uib.cpp b/kdevdesigner/shared/ui2uib.cpp similarity index 100% rename from tdevdesigner/shared/ui2uib.cpp rename to kdevdesigner/shared/ui2uib.cpp diff --git a/tdevdesigner/shared/ui2uib.h b/kdevdesigner/shared/ui2uib.h similarity index 100% rename from tdevdesigner/shared/ui2uib.h rename to kdevdesigner/shared/ui2uib.h diff --git a/tdevdesigner/shared/uib.cpp b/kdevdesigner/shared/uib.cpp similarity index 100% rename from tdevdesigner/shared/uib.cpp rename to kdevdesigner/shared/uib.cpp diff --git a/tdevdesigner/shared/uib.h b/kdevdesigner/shared/uib.h similarity index 100% rename from tdevdesigner/shared/uib.h rename to kdevdesigner/shared/uib.h diff --git a/kdevdesigner/shared/widgetdatabase.cpp b/kdevdesigner/shared/widgetdatabase.cpp new file mode 100644 index 00000000..be4b6091 --- /dev/null +++ b/kdevdesigner/shared/widgetdatabase.cpp @@ -0,0 +1,960 @@ +/********************************************************************** +** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. +** +** This file is part of TQt Designer. +** +** This file may be distributed and/or modified under the terms of the +** GNU General Public License version 2 as published by the Free Software +** Foundation and appearing in the file LICENSE.GPL included in the +** packaging of this file. +** +** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition +** licenses may use this file in accordance with the TQt Commercial License +** Agreement provided with the Software. +** +** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE +** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. +** +** See http://www.trolltech.com/gpl/ for GPL licensing information. +** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for +** information about TQt Commercial License Agreements. +** +** Contact info@trolltech.com if any conditions of this licensing are +** not clear to you. +** +**********************************************************************/ + +#include "widgetdatabase.h" +#include "../interfaces/widgetinterface.h" + +#include "../designer/kdevdesigner_part.h" + +#include +#include + +#include +#define NO_STATIC_COLORS +#include +#include +#include +#include +#include +#include +#include + +#include + +#include + +const int dbsize = 300; +const int dbcustom = 200; +const int dbdictsize = 211; +static WidgetDatabaseRecord* db[ dbsize ]; +static TQDict *className2Id = 0; +static int dbcount = 0; +static int dbcustomcount = 200; +static TQStrList *wGroups; +static TQStrList *invisibleGroups; +static bool whatsThisLoaded = FALSE; +static TQPluginManager *widgetPluginManager = 0; +static bool plugins_set_up = FALSE; +static bool was_in_setup = FALSE; + +TQCleanupHandler > cleanup_manager; + +WidgetDatabaseRecord::WidgetDatabaseRecord() +{ + isForm = FALSE; + isContainer = FALSE; + icon = 0; + nameCounter = 0; + isCommon = FALSE; + isPlugin = FALSE; +} + +WidgetDatabaseRecord::~WidgetDatabaseRecord() +{ + delete icon; +} + + +/*! + \class WidgetDatabase widgetdatabase.h + \brief The WidgetDatabase class holds information about widgets + + The WidgetDatabase holds information about widgets like toolTip(), + iconSet(), ... It works Id-based, so all access functions take the + widget id as parameter. To get the id for a widget (classname), use + idFromClassName(). + + All access functions are static. Having multiple widgetdatabases in + one application doesn't make sense anyway and so you don't need more + than an instance of the widgetdatabase. + + For creating widgets, layouts, etc. see WidgetFactory. +*/ + +/*! + Creates widget database. Does nothing. +*/ + +WidgetDatabase::WidgetDatabase() +{ +} + +/*! Sets up the widget database. If the static widgetdatabase already + exists, the functions returns immediately. +*/ + +void WidgetDatabase::setupDataBase( int id ) +{ + was_in_setup = TRUE; +#ifndef UIC + Q_UNUSED( id ) + if ( dbcount ) + return; +#else + if ( dbcount && id != -2 ) + return; + if ( dbcount && !plugins_set_up ) { + setupPlugins(); + return; + } + if ( dbcount && plugins_set_up) + return; +#endif + + wGroups = new TQStrList; + invisibleGroups = new TQStrList; + invisibleGroups->append( "Forms" ); + invisibleGroups->append( "Temp" ); + className2Id = new TQDict( dbdictsize ); + className2Id->setAutoDelete( TRUE ); + + WidgetDatabaseRecord *r = 0; + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_pushbutton.png"; + r->name = TQPUSHBUTTON_OBJECT_NAME_STRING; + r->group = widgetGroup( "Buttons" ); + r->toolTip = "Push Button"; + r->isCommon = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_toolbutton.png"; + r->name = TQTOOLBUTTON_OBJECT_NAME_STRING; + r->group = widgetGroup( "Buttons" ); + r->toolTip = "Tool Button"; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_radiobutton.png"; + r->name = TQRADIOBUTTON_OBJECT_NAME_STRING; + r->group = widgetGroup( "Buttons" ); + r->toolTip = "Radio Button"; + r->isCommon = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_checkbox.png"; + r->name = TQCHECKBOX_OBJECT_NAME_STRING; + r->group = widgetGroup( "Buttons" ); + r->toolTip = "Check Box"; + r->isCommon = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_groupbox.png"; + r->name = TQGROUPBOX_OBJECT_NAME_STRING; + r->group = widgetGroup( "Containers" ); + r->toolTip = "Group Box"; + r->isContainer = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_buttongroup.png"; + r->name = TQBUTTONGROUP_OBJECT_NAME_STRING; + r->group = widgetGroup( "Containers" ); + r->toolTip = "Button Group"; + r->isContainer = TRUE; + r->isCommon = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_frame.png"; + r->name = TQFRAME_OBJECT_NAME_STRING; + r->group = widgetGroup( "Containers" ); + r->toolTip = "Frame"; + r->isContainer = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_tabwidget.png"; + r->name = TQTABWIDGET_OBJECT_NAME_STRING; + r->group = widgetGroup( "Containers" ); + r->toolTip = "Tabwidget"; + r->isContainer = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_widgetstack.png"; + r->name = TQWIDGETSTACK_OBJECT_NAME_STRING; + r->group = widgetGroup( "Containers" ); + r->toolTip = "Widget Stack"; + r->isContainer = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_toolbox.png"; + r->name = TQTOOLBOX_OBJECT_NAME_STRING; + r->group = widgetGroup( "Containers" ); + r->toolTip = "Tool Box"; + r->isContainer = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_listbox.png"; + r->name = TQLISTBOX_OBJECT_NAME_STRING; + r->group = widgetGroup( "Views" ); + r->toolTip = "List Box"; + r->isCommon = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_listview.png"; + r->name = TQLISTVIEW_OBJECT_NAME_STRING; + r->group = widgetGroup( "Views" ); + r->toolTip = "List View"; + + append( r ); + +#if !defined(TQT_NO_ICONVIEW) || defined(UIC) + r = new WidgetDatabaseRecord; + r->iconSet = "designer_iconview.png"; + r->name = TQICONVIEW_OBJECT_NAME_STRING; + r->group = widgetGroup( "Views" ); + r->toolTip = "Icon View"; + + append( r ); +#endif + +#if !defined(TQT_NO_TABLE) + r = new WidgetDatabaseRecord; + r->iconSet = "designer_table.png"; + r->name = TQTABLE_OBJECT_NAME_STRING; + r->group = widgetGroup( "Views" ); + r->toolTip = "Table"; + + append( r ); +#endif + +#if !defined(TQT_NO_SQL) + r = new WidgetDatabaseRecord; + r->iconSet = "designer_datatable.png"; + r->includeFile = "tqdatatable.h"; + r->name = TQDATATABLE_OBJECT_NAME_STRING; + r->group = widgetGroup( "Database" ); + r->toolTip = "Data Table"; + + append( r ); +#endif + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_lineedit.png"; + r->name = TQLINEEDIT_OBJECT_NAME_STRING; + r->group = widgetGroup( "Input" ); + r->toolTip = "Line Edit"; + r->isCommon = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_spinbox.png"; + r->name = TQSPINBOX_OBJECT_NAME_STRING; + r->group = widgetGroup( "Input" ); + r->toolTip = "Spin Box"; + r->isCommon = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_dateedit.png"; + r->name = TQDATEEDIT_OBJECT_NAME_STRING; + r->group = widgetGroup( "Input" ); + r->toolTip = "Date Edit"; + r->includeFile = "tqdatetimeedit.h"; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_timeedit.png"; + r->name = TQTIMEEDIT_OBJECT_NAME_STRING; + r->group = widgetGroup( "Input" ); + r->toolTip = "Time Edit"; + r->includeFile = "tqdatetimeedit.h"; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_datetimeedit.png"; + r->name = TQDATETIMEEDIT_OBJECT_NAME_STRING; + r->group = widgetGroup( "Input" ); + r->toolTip = "Date-Time Edit"; + r->includeFile = "tqdatetimeedit.h"; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_multilineedit.png"; + r->name = TQMULTILINEEDIT_OBJECT_NAME_STRING; + r->group = widgetGroup( "Temp" ); + r->toolTip = "Multi Line Edit"; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_richtextedit.png"; + r->name = TQTEXTEDIT_OBJECT_NAME_STRING; + r->group = widgetGroup( "Input" ); + r->toolTip = "Rich Text Edit"; + r->isCommon = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_combobox.png"; + r->name = TQCOMBOBOX_OBJECT_NAME_STRING; + r->group = widgetGroup( "Input" ); + r->toolTip = "Combo Box"; + r->isCommon = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_slider.png"; + r->name = TQSLIDER_OBJECT_NAME_STRING; + r->group = widgetGroup( "Input" ); + r->toolTip = "Slider"; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_scrollbar.png"; + r->name = TQSCROLLBAR_OBJECT_NAME_STRING; + r->group = widgetGroup( "Input" ); + r->toolTip = "Scrollbar"; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_dial.png"; + r->name = TQDIAL_OBJECT_NAME_STRING; + r->group = widgetGroup( "Input" ); + r->toolTip = "Dial"; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_label.png"; + r->name = TQLABEL_OBJECT_NAME_STRING; + r->group = widgetGroup( "Temp" ); + r->toolTip = "Label"; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_label.png"; + r->name = "TextLabel"; + r->group = widgetGroup( "Display" ); + r->toolTip = "Text Label"; + r->whatsThis = "The Text Label provides a widget to display static text."; + r->isCommon = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_pixlabel.png"; + r->name = "PixmapLabel"; + r->group = widgetGroup( "Display" ); + r->toolTip = "Pixmap Label"; + r->whatsThis = "The Pixmap Label provides a widget to display pixmaps."; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_lcdnumber.png"; + r->name = TQLCDNUMBER_OBJECT_NAME_STRING; + r->group = widgetGroup( "Display" ); + r->toolTip = "LCD Number"; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_line.png"; + r->name = "Line"; + r->group = widgetGroup( "Display" ); + r->toolTip = "Line"; + r->includeFile = "tqframe.h"; + r->whatsThis = "The Line widget provides horizontal and vertical lines."; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_progress.png"; + r->name = TQPROGRESSBAR_OBJECT_NAME_STRING; + r->group = widgetGroup( "Display" ); + r->toolTip = "Progress Bar"; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_textview.png"; + r->name = TQTEXTVIEW_OBJECT_NAME_STRING; + r->group = widgetGroup( "Temp" ); + r->toolTip = "Text View"; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_textbrowser.png"; + r->name = TQTEXTBROWSER_OBJECT_NAME_STRING; + r->group = widgetGroup( "Display" ); + r->toolTip = "Text Browser"; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_spacer.png"; + r->name = "Spacer"; + r->group = widgetGroup( "Temp" ); + r->toolTip = "Spacer"; + r->whatsThis = "The Spacer provides horizontal and vertical spacing to be able to manipulate the behaviour of layouts."; + + append( r ); + + r = new WidgetDatabaseRecord; + r->name = TQWIDGET_OBJECT_NAME_STRING; + r->isForm = TRUE; + r->group = widgetGroup( "Forms" ); + + append( r ); + + r = new WidgetDatabaseRecord; + r->name = TQDIALOG_OBJECT_NAME_STRING; + r->group = widgetGroup( "Forms" ); + r->isForm = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->name = TQWIZARD_OBJECT_NAME_STRING; + r->group = widgetGroup( "Forms" ); + r->isContainer = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->name = "TQDesignerWizard"; + r->group = widgetGroup( "Forms" ); + r->isContainer = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->name = TQLAYOUTWIDGET_OBJECT_NAME_STRING; + r->group = widgetGroup( "Temp" ); + r->includeFile = ""; + r->isContainer = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->name = TQSPLITTER_OBJECT_NAME_STRING; + r->group = widgetGroup( "Temp" ); + r->includeFile = "tqsplitter.h"; + r->isContainer = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_tabwidget.png"; + r->name = "TQDesignerTabWidget"; + r->group = widgetGroup( "Temp" ); + r->isContainer = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_tabwidget.png"; + r->name = "TQDesignerWidget"; + r->group = widgetGroup( "Temp" ); + r->isContainer = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = "designer_tabwidget.png"; + r->name = "TQDesignerDialog"; + r->group = widgetGroup( "Temp" ); + r->isContainer = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = ""; + r->name = TQMAINWINDOW_OBJECT_NAME_STRING; + r->includeFile = "tqmainwindow.h"; + r->group = widgetGroup( "Temp" ); + r->isContainer = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = ""; + r->name = "TQDesignerAction"; + r->includeFile = "tqaction.h"; + r->group = widgetGroup( "Temp" ); + r->isContainer = FALSE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = ""; + r->name = "TQDesignerActionGroup"; + r->includeFile = "tqaction.h"; + r->group = widgetGroup( "Temp" ); + r->isContainer = FALSE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = ""; + r->name = TQSCROLLVIEW_OBJECT_NAME_STRING; + r->includeFile = "tqscrollview.h"; + r->group = widgetGroup( "Temp" ); + r->isContainer = TRUE; + + append( r ); + +#ifndef TQT_NO_SQL + r = new WidgetDatabaseRecord; + r->iconSet = ""; + r->name = TQDATABROWSER_OBJECT_NAME_STRING; + r->includeFile = "tqdatabrowser.h"; + r->group = widgetGroup( "Database" ); + r->toolTip = "Data Browser"; + r->iconSet = "designer_databrowser.png"; + r->isContainer = TRUE; + + append( r ); + + r = new WidgetDatabaseRecord; + r->iconSet = ""; + r->name = TQDATAVIEW_OBJECT_NAME_STRING; + r->includeFile = "tqdataview.h"; + r->group = widgetGroup( "Database" ); + r->toolTip = "Data View"; + r->iconSet = "designer_dataview.png"; + r->isContainer = TRUE; + + append( r ); +#endif + +#ifndef UIC + setupPlugins(); +#endif +} + +void WidgetDatabase::setupPlugins() +{ + if ( plugins_set_up ) + return; + plugins_set_up = TRUE; + TQStringList widgets = widgetManager()->featureList(); + for ( TQStringList::Iterator it = widgets.begin(); it != widgets.end(); ++it ) { + if ( hasWidget( *it ) ) + continue; + WidgetDatabaseRecord *r = new WidgetDatabaseRecord; + WidgetInterface *iface = 0; + widgetManager()->queryInterface( *it, &iface ); + if ( !iface ) + continue; + +#ifndef UIC + TQIconSet icon = iface->iconSet( *it ); + if ( !icon.pixmap().isNull() ) + r->icon = new TQIconSet( icon ); +#endif + TQString grp = iface->group( *it ); + if ( grp.isEmpty() ) + grp = "3rd party widgets"; + r->group = widgetGroup( grp ); + r->toolTip = iface->toolTip( *it ); + r->whatsThis = iface->whatsThis( *it ); + r->includeFile = iface->includeFile( *it ); + r->isContainer = iface->isContainer( *it ); + r->name = *it; + r->isPlugin = TRUE; + append( r ); + iface->release(); + } +} + +/*! + Returns the number of elements in the widget database. +*/ + +int WidgetDatabase::count() +{ + setupDataBase( -1 ); + return dbcount; +} + +/*! + Returns the id at which the ids of custom widgets start. +*/ + +int WidgetDatabase::startCustom() +{ + setupDataBase( -1 ); + return dbcustom; +} + +/*! + Returns the iconset which represents the class registered as \a id. +*/ + +TQIconSet WidgetDatabase::iconSet( int id ) +{ + setupDataBase( id ); + WidgetDatabaseRecord *r = at( id ); + if ( !r ) + return TQIconSet(); +#if !defined(UIC) && !defined(RESOURCE) + if ( !r->icon ) { + if ( r->iconSet.isEmpty() ) + return TQIconSet(); + TQPixmap pix = BarIcon( r->iconSet, KDevDesignerPartFactory::instance() ); + if ( pix.isNull() ) + pix = TQPixmap( r->iconSet ); + r->icon = new TQIconSet( pix ); + } + return *r->icon; +#else + return TQIconSet(); +#endif +} + +/*! + Returns the classname of the widget which is registered as \a id. +*/ + +TQString WidgetDatabase::className( int id ) +{ + setupDataBase( id ); + WidgetDatabaseRecord *r = at( id ); + if ( !r ) + return TQString(); + return r->name; +} + +/*! + Returns the group the widget registered as \a id belongs to. +*/ + +TQString WidgetDatabase::group( int id ) +{ + setupDataBase( id ); + WidgetDatabaseRecord *r = at( id ); + if ( !r ) + return TQString(); + return r->group; +} + +/*! + Returns the tooltip text of the widget which is registered as \a id. +*/ + +TQString WidgetDatabase::toolTip( int id ) +{ + setupDataBase( id ); + WidgetDatabaseRecord *r = at( id ); + if ( !r ) + return TQString(); + return r->toolTip; +} + +/*! + Returns the what's this? text of the widget which is registered as \a id. +*/ + +TQString WidgetDatabase::whatsThis( int id ) +{ + setupDataBase( id ); + WidgetDatabaseRecord *r = at( id ); + if ( !r ) + return TQString(); + return r->whatsThis; +} + +/*! + Returns the include file if the widget which is registered as \a id. +*/ + +TQString WidgetDatabase::includeFile( int id ) +{ + setupDataBase( id ); + WidgetDatabaseRecord *r = at( id ); + if ( !r ) + return TQString(); + if ( r->includeFile.isNull() ) + return r->name.lower() + ".h"; + return r->includeFile; +} + +/*! Returns whether the widget registered as \a id is a form. +*/ +bool WidgetDatabase::isForm( int id ) +{ + setupDataBase( id ); + WidgetDatabaseRecord *r = at( id ); + if ( !r ) + return FALSE; + return r->isForm; +} + +/*! Returns whether the widget registered as \a id can have children. +*/ + +bool WidgetDatabase::isContainer( int id ) +{ + setupDataBase( id ); + WidgetDatabaseRecord *r = at( id ); + if ( !r ) + return FALSE; + return r->isContainer || r->isForm; +} + +bool WidgetDatabase::isCommon( int id ) +{ + setupDataBase( id ); + WidgetDatabaseRecord *r = at( id ); + if ( !r ) + return FALSE; + return r->isCommon; +} + +TQString WidgetDatabase::createWidgetName( int id ) +{ + setupDataBase( id ); + TQString n = className( id ); + if ( n == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) + n = "Layout"; + if ( n[ 0 ] == 'Q' && n[ 1 ].lower() != n[ 1 ] ) + n = n.mid( 1 ); + int colonColon = n.findRev( "::" ); + if ( colonColon != -1 ) + n = n.mid( colonColon + 2 ); + + WidgetDatabaseRecord *r = at( id ); + if ( !r ) + return n; + n += TQString::number( ++r->nameCounter ); + n[0] = n[0].lower(); + return n; +} + +/*! Returns the id for \a name or -1 if \a name is unknown. + */ +int WidgetDatabase::idFromClassName( const TQString &name ) +{ + setupDataBase( -1 ); + if ( name.isEmpty() ) + return 0; + int *i = className2Id->find( name ); + if ( i ) + return *i; + if ( name == "FormWindow" ) + return idFromClassName( TQLAYOUTWIDGET_OBJECT_NAME_STRING ); +#ifdef UIC + setupDataBase( -2 ); + i = className2Id->find( name ); + if ( i ) + return *i; +#endif + return -1; +} + +bool WidgetDatabase::hasWidget( const TQString &name ) +{ + return className2Id->find( name ) != 0; +} + +WidgetDatabaseRecord *WidgetDatabase::at( int index ) +{ + if ( index < 0 ) + return 0; + if ( index >= dbcustom && index < dbcustomcount ) + return db[ index ]; + if ( index < dbcount ) + return db[ index ]; + return 0; +} + +void WidgetDatabase::insert( int index, WidgetDatabaseRecord *r ) +{ + if ( index < 0 || index >= dbsize ) + return; + db[ index ] = r; + className2Id->insert( r->name, new int( index ) ); + if ( index < dbcustom ) + dbcount = TQMAX( dbcount, index ); +} + +void WidgetDatabase::append( WidgetDatabaseRecord *r ) +{ + if ( !was_in_setup ) + setupDataBase( -1 ); + insert( dbcount++, r ); +} + +TQString WidgetDatabase::widgetGroup( const TQString &g ) +{ + if ( wGroups->find( g.ascii() ) == -1 ) + wGroups->append( g.ascii() ); + return g; +} + +bool WidgetDatabase::isGroupEmpty( const TQString &grp ) +{ + WidgetDatabaseRecord *r = 0; + for ( int i = 0; i < dbcount; ++i ) { + if ( !( r = db[ i ] ) ) + continue; + if ( r->group == grp ) + return FALSE; + } + return TRUE; +} + +TQString WidgetDatabase::widgetGroup( int i ) +{ + setupDataBase( -1 ); + if ( i >= 0 && i < (int)wGroups->count() ) + return wGroups->at( i ); + return TQString(); +} + +int WidgetDatabase::numWidgetGroups() +{ + setupDataBase( -1 ); + return wGroups->count(); +} + +bool WidgetDatabase::isGroupVisible( const TQString &g ) +{ + setupDataBase( -1 ); + return invisibleGroups->find( g.ascii() ) == -1; +} + +int WidgetDatabase::addCustomWidget( WidgetDatabaseRecord *r ) +{ + insert( dbcustomcount++, r ); + return dbcustomcount - 1; +} + +void WidgetDatabase::customWidgetClassNameChanged( const TQString &oldName, + const TQString &newName ) +{ + int id = idFromClassName( oldName ); + if ( id == -1 ) + return; + WidgetDatabaseRecord *r = db[ id ]; + r->name = newName; + className2Id->remove( oldName ); + className2Id->insert( newName, new int( id ) ); +} + +bool WidgetDatabase::isCustomWidget( int id ) +{ + if ( id >= dbcustom && id < dbcustomcount ) + return TRUE; + return FALSE; +} + +bool WidgetDatabase::isCustomPluginWidget( int id ) +{ + setupDataBase( id ); + WidgetDatabaseRecord *r = at( id ); + if ( !r ) + return FALSE; + return r->isPlugin; +} + +bool WidgetDatabase::isWhatsThisLoaded() +{ + return whatsThisLoaded; +} + +void WidgetDatabase::loadWhatsThis( const TQString &docPath ) +{ + TQString whatsthisFile = docPath + "/whatsthis"; + TQFile f( whatsthisFile ); + if ( !f.open( IO_ReadOnly ) ) + return; + TQTextStream ts( &f ); + while ( !ts.atEnd() ) { + TQString s = ts.readLine(); + TQStringList l = TQStringList::split( " | ", s ); + int id = idFromClassName( l[ 1 ] ); + WidgetDatabaseRecord *r = at( id ); + if ( r ) + r->whatsThis = l[ 0 ]; + } + whatsThisLoaded = TRUE; +} + + +// ### TQt 3.1: make these publically accessible via TQWidgetDatabase API +#if defined(UIC) +bool dbnounload = FALSE; +TQStringList *dbpaths = 0; +#else +extern TQString *qwf_plugin_dir; +#endif + + +TQPluginManager *widgetManager() +{ + if ( !widgetPluginManager ) { + TQString pluginDir = "/designer"; +#if !defined(UIC) + if ( qwf_plugin_dir ) + pluginDir = *qwf_plugin_dir; +#endif + widgetPluginManager = new TQPluginManager( IID_Widget, TQApplication::libraryPaths(), pluginDir ); + cleanup_manager.add( &widgetPluginManager ); +#if defined(UIC) + if ( dbnounload ) + widgetPluginManager->setAutoUnload( FALSE ); + if ( dbpaths ) { + TQStringList::ConstIterator it = dbpaths->begin(); + for ( ; it != dbpaths->end(); ++it ) + widgetPluginManager->addLibraryPath( *it ); + } +#endif + } + return widgetPluginManager; +} diff --git a/tdevdesigner/shared/widgetdatabase.h b/kdevdesigner/shared/widgetdatabase.h similarity index 100% rename from tdevdesigner/shared/widgetdatabase.h rename to kdevdesigner/shared/widgetdatabase.h diff --git a/kdevdesigner/src/CMakeLists.txt b/kdevdesigner/src/CMakeLists.txt new file mode 100644 index 00000000..c232cd2f --- /dev/null +++ b/kdevdesigner/src/CMakeLists.txt @@ -0,0 +1,36 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_BINARY_DIR} + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### other data ################################ + +install( FILES kdevdesigner.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) +install( FILES kdevdesigner_shell.rc DESTINATION ${DATA_INSTALL_DIR}/kdevdesigner ) + + +##### kdevdesigner (executable) ################# + +tde_add_executable( kdevdesigner AUTOMOC + SOURCES main.cpp kdevdesigner.cpp + LINK tdeparts-shared + DESTINATION ${BIN_INSTALL_DIR} +) diff --git a/kdevdesigner/src/Makefile.am b/kdevdesigner/src/Makefile.am new file mode 100644 index 00000000..e5e68a98 --- /dev/null +++ b/kdevdesigner/src/Makefile.am @@ -0,0 +1,47 @@ +# set the include path for X, qt and KDE +INCLUDES = $(all_includes) + +# these are the headers for your project +noinst_HEADERS = kdevdesigner.h + +# let automoc handle all of the meta source files (moc) +METASOURCES = AUTO + +messages: rc.cpp + $(XGETTEXT) *.cpp -o $(podir)/kdevdesigner.pot + + +# this Makefile creates both a KPart application and a KPart +######################################################################### +# APPLICATION SECTION +######################################################################### +# this is the program that gets installed. it's name is used for all +# of the other Makefile.am variables +bin_PROGRAMS = kdevdesigner + +# the application source, library search path, and link libraries +kdevdesigner_SOURCES = main.cpp kdevdesigner.cpp +kdevdesigner_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor +kdevdesigner_LDADD = $(LIB_TDEPARTS) + +# this is where the desktop file will go +#shelldesktopdir = $(kde_appsdir)/Development +#shelldesktop_DATA = kdevdesigner.desktop +xdg_apps_DATA = kdevdesigner.desktop + +# this is where the shell's XML-GUI resource file goes +shellrcdir = $(kde_datadir)/kdevdesigner +shellrc_DATA = kdevdesigner_shell.rc + +######################################################################### +# KPART SECTION +######################################################################### + +# the Part's source, library search path, and link libraries + + +# this is where the desktop file will go +partdesktopdir = $(kde_servicesdir) + +# this is where the part's XML-GUI resource file goes +partrcdir = $(kde_datadir)/kdevdesignerpart diff --git a/kdevdesigner/src/kdevdesigner.cpp b/kdevdesigner/src/kdevdesigner.cpp new file mode 100644 index 00000000..f846e99b --- /dev/null +++ b/kdevdesigner/src/kdevdesigner.cpp @@ -0,0 +1,216 @@ +/*************************************************************************** + * Copyright (C) 2004 by Alexander Dymo * + * cloudtemple@mksat.net * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +#include "kdevdesigner.h" + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include + +#include +#include +#include +#include + +KDevDesigner::KDevDesigner() + : KParts::MainWindow( 0L, "KDevDesigner" ) +{ + // set the shell's ui resource file + setXMLFile("kdevdesigner_shell.rc"); + + // then, setup our actions + setupActions(); + + // and a status bar + statusBar()->show(); + + // this routine will find and load our Part. it finds the Part by + // name which is a bad idea usually.. but it's alright in this + // case since our Part is made for this Shell + KLibFactory *factory = KLibLoader::self()->factory("libkdevdesignerpart"); + if (factory) + { + // now that the Part is loaded, we cast it to a Part to get + // our hands on it + TQStringList args; + args.append("in shell"); + m_part = static_cast(factory->create(TQT_TQOBJECT(this), + "kdevdesigner_part", "KParts::ReadWritePart", args)); + + if (m_part) + { + // tell the KParts::MainWindow that this is indeed the main widget + setCentralWidget(m_part->widget()); + + // and integrate the part's GUI with the shell's + createGUI(m_part); + } + } + else + { + // if we couldn't find our Part, we exit since the Shell by + // itself can't do anything useful + KMessageBox::error(this, i18n("Could not find the KDevDesigner part.")); + kapp->quit(); + // we return here, cause kapp->quit() only means "exit the + // next time we enter the event loop... + return; + } + + // apply the saved mainwindow settings, if any, and ask the mainwindow + // to automatically save settings if changed: window size, toolbar + // position, icon size, etc. + setAutoSaveSettings(); +} + +KDevDesigner::~KDevDesigner() +{ +} + +void KDevDesigner::load(const KURL& url) +{ + m_part->openURL( url ); +} + +void KDevDesigner::setupActions() +{ +/* KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(fileNew()), actionCollection()); + KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(fileOpen()), actionCollection());*/ + + KStdAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT(quit()), actionCollection()); + + m_toolbarAction = KStdAction::showToolbar(TQT_TQOBJECT(this), TQT_SLOT(optionsShowToolbar()), actionCollection()); + m_statusbarAction = KStdAction::showStatusbar(TQT_TQOBJECT(this), TQT_SLOT(optionsShowStatusbar()), actionCollection()); + + KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureKeys()), actionCollection()); + KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureToolbars()), actionCollection()); +} + +void KDevDesigner::saveProperties(TDEConfig* /*config*/) +{ + // the 'config' object points to the session managed + // config file. anything you write here will be available + // later when this app is restored +} + +void KDevDesigner::readProperties(TDEConfig* /*config*/) +{ + // the 'config' object points to the session managed + // config file. this function is automatically called whenever + // the app is being restored. read in here whatever you wrote + // in 'saveProperties' +} + +void KDevDesigner::fileNew() +{ + // this slot is called whenever the File->New menu is selected, + // the New shortcut is pressed (usually CTRL+N) or the New toolbar + // button is clicked + + // About this function, the style guide ( + // http://developer.kde.org/documentation/standards/kde/style/basics/index.html ) + // says that it should open a new window if the document is _not_ + // in its initial state. This is what we do here.. + if ( ! m_part->url().isEmpty() || m_part->isModified() ) + { + (new KDevDesigner)->show(); + }; +} + + +void KDevDesigner::optionsShowToolbar() +{ + // this is all very cut and paste code for showing/hiding the + // toolbar + if (m_toolbarAction->isChecked()) + toolBar()->show(); + else + toolBar()->hide(); +} + +void KDevDesigner::optionsShowStatusbar() +{ + // this is all very cut and paste code for showing/hiding the + // statusbar + if (m_statusbarAction->isChecked()) + statusBar()->show(); + else + statusBar()->hide(); +} + +void KDevDesigner::optionsConfigureKeys() +{ + KKeyDialog::configureKeys(m_part->actionCollection(), "kdevdesigner_part.rc"); +} + +void KDevDesigner::optionsConfigureToolbars() +{ + saveMainWindowSettings(TDEGlobal::config(), autoSaveGroup()); + + // use the standard toolbar editor + KEditToolbar dlg(factory()); + connect(&dlg, TQT_SIGNAL(newToolbarConfig()), + this, TQT_SLOT(applyNewToolbarConfig())); + dlg.exec(); +} + +void KDevDesigner::applyNewToolbarConfig() +{ + applyMainWindowSettings(TDEGlobal::config(), autoSaveGroup()); +} + +void KDevDesigner::fileOpen() +{ + // this slot is called whenever the File->Open menu is selected, + // the Open shortcut is pressed (usually CTRL+O) or the Open toolbar + // button is clicked + KURL url = + KFileDialog::getOpenURL( TQString(), TQString(), this ); + + if (url.isEmpty() == false) + { + // About this function, the style guide ( + // http://developer.kde.org/documentation/standards/kde/style/basics/index.html ) + // says that it should open a new window if the document is _not_ + // in its initial state. This is what we do here.. + if ( m_part->url().isEmpty() && ! m_part->isModified() ) + { + // we open the file in this window... + load( url ); + } + else + { + // we open the file in a new window... + KDevDesigner* newWin = new KDevDesigner; + newWin->load( url ); + newWin->show(); + } + } +} + +#include "kdevdesigner.moc" diff --git a/kdevdesigner/src/kdevdesigner.desktop b/kdevdesigner/src/kdevdesigner.desktop new file mode 100644 index 00000000..1cd245f1 --- /dev/null +++ b/kdevdesigner/src/kdevdesigner.desktop @@ -0,0 +1,96 @@ +[Desktop Entry] +Name=TDevelop Designer +Name[el]=Σχεδιαστής TDevelop +Name[es]=Diseñador de TDevelop +Name[et]=TDevelopi Disainer +Name[eu]=TDevelop disenatzailea +Name[fa]=طراح TDevelop +Name[fr]=Concepteur TDevelop +Name[ga]=Dearthóir TDevelop +Name[it]=Designer di TDevelop +Name[ja]=TDevelop デザイナー +Name[ms]=Pereka TDevelop +Name[nds]=TDevelop-Maker +Name[ne]=केडीई विकास डिजाइनर +Name[pl]=Projektant TDevelop +Name[pt]=Desenhador do TDevelop +Name[pt_BR]=Designer do TDevelop +Name[sk]=TDevelop Dizajnér +Name[sl]=Snovalnik TDevelop +Name[sv]=TDevelop designer +Name[ta]=கேமேம்பாட்டு வடிவமைப்பாளர் +Name[tg]=Дизайнгари TDevelop +Name[zh_CN]=TDevelop 设计师 +Name[zh_TW]=TDevelop 設計器 +GenericName=Interface Designer +GenericName[br]=Ergrafer etrefas +GenericName[ca]=Dissenyador de interfícies +GenericName[cy]=Dylunydd Rhyngwyneb +GenericName[de]=Oberflächen-Designer +GenericName[el]=Σχεδιαστής διασυνδέσεων +GenericName[es]=Diseñador de interfaces +GenericName[et]=Liidesedisainer +GenericName[eu]=Interfazeen diseinatzailea +GenericName[fa]=طراح واسط +GenericName[fr]=Concepteur d'interfaces graphiques +GenericName[ga]=Dearthóir Comhéadain +GenericName[gl]=Deseñador de interfaces +GenericName[hu]=Felülettervező +GenericName[it]=Interfaccia del Designer +GenericName[ja]=インターフェースデザイナー +GenericName[lt]=Sąsajos redaktorius +GenericName[ms]=Pereka Antaramuka +GenericName[nds]=Böversietmaker +GenericName[ne]=इन्टरफेस डिजाइनर +GenericName[pl]=Projektowanie interfejsu +GenericName[pt]=Editor de Interfaces +GenericName[pt_BR]=Desenhador de Interface +GenericName[ru]=Дизайнер пользовательского интерфейса +GenericName[rw]=Umuhanzi w'Imigaragarire +GenericName[sk]=Interface Dizajnér +GenericName[sl]=Snovalnik vmesnikov +GenericName[sr]=Дизајнер интерфејса +GenericName[sr@Latn]=Dizajner interfejsa +GenericName[sv]=Gränssnittsdesign +GenericName[tr]=Arayüz Tasarlayıcısı +GenericName[zh_CN]=界面设计师 +GenericName[zh_TW]=介面設計器 +Exec=kdevdesigner %i -caption "%c" +Icon=kdevdesigner +Type=Application +DocPath=kdevdesigner/index.html +Comment=GUI Designer for Qt/TDE +Comment[ca]=Dissenyador de IGU per Qt/TDE +Comment[da]=Grafisk brugerfladedesigner til Qt/TDE +Comment[de]=Auf Qt-Designer basierender GUI-Designer +Comment[el]=Σχεδιαστής GUI για Qt/TDE +Comment[es]=Diseñador de interfaces para Qt/TDE +Comment[et]=Qt/TDE graafilise kasutajaliidese disainer +Comment[eu]=GUI diseinatzailea Qt/TDE-rako +Comment[fa]=طراح ونک برای Qt/TDE +Comment[fr]=Concepteur d'interfaces graphiques pour Qt / TDE +Comment[ga]=Dearthóir Comhéadan Grafach le haghaidh Qt/TDE +Comment[gl]=Deseñador GUI para Qt/TDE +Comment[hu]=Qt/TDE felülettervező +Comment[it]=Designer di GUI per Qt/TDE +Comment[ja]=Qt/TDE のための GUI デザイナー +Comment[ms]=Pereka GUI untuk Qt/TDE +Comment[nds]=Böversietmaker för Qt/TDE +Comment[ne]=Qt/TDE का लागि जी यू आई डिजाइनर +Comment[nl]=GUI Designer voor Qt/TDE +Comment[pl]=Projektant graficznego interfejsu użytkownika dla Qt/TDE +Comment[pt]=Editor de Interfaces para Qt/TDE +Comment[pt_BR]=Designer de GUI para o Qt/TDE +Comment[ru]=Среда создания графических форм Qt/TDE +Comment[sk]=GUI Dizajnér pre Qt/TDE +Comment[sl]=Snovalnik grafičnega vmesnika za Qt/TDE +Comment[sr]=Дизајнер GUI-ја за Qt/TDE +Comment[sr@Latn]=Dizajner GUI-ja za Qt/TDE +Comment[sv]=Grafisk gränssnittsdesign för Qt och TDE +Comment[ta]=Qtக்கான GUI வடிவமைப்பாளர் +Comment[tg]=Муҳит барои сохтани Qt/TDE ба шакли графикӣ +Comment[tr]=Qt/TDE için Arayüz Tasarlayıcısı +Comment[zh_CN]=Qt/TDE 的 GUI 设计师 +Comment[zh_TW]=Qt/TDE 的使用者介面設計器 +Terminal=false +Categories=Qt;TDE;Development;GUIDesigner;X-TDE-TDevelopIDE; diff --git a/kdevdesigner/src/kdevdesigner.h b/kdevdesigner/src/kdevdesigner.h new file mode 100644 index 00000000..a497dc5c --- /dev/null +++ b/kdevdesigner/src/kdevdesigner.h @@ -0,0 +1,97 @@ +/*************************************************************************** + * Copyright (C) 2004 by Alexander Dymo * + * cloudtemple@mksat.net * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ + +#ifndef _KDEVDESIGNER_H_ +#define _KDEVDESIGNER_H_ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include + +class TDEToggleAction; + +/** + * This is the application "Shell". It has a menubar, toolbar, and + * statusbar but relies on the "Part" to do all the real work. + * + * @short Application Shell + * @author Alexander Dymo + * @version 0.1 + */ +class KDevDesigner : public KParts::MainWindow +{ + Q_OBJECT + +public: + /** + * Default Constructor + */ + KDevDesigner(); + + /** + * Default Destructor + */ + virtual ~KDevDesigner(); + + /** + * Use this method to load whatever file/URL you have + */ + void load(const KURL& url); + +protected: + /** + * This method is called when it is time for the app to save its + * properties for session management purposes. + */ + void saveProperties(TDEConfig *); + + /** + * This method is called when this app is restored. The TDEConfig + * object points to the session management config file that was saved + * with @ref saveProperties + */ + void readProperties(TDEConfig *); + +private slots: + void fileNew(); + void fileOpen(); + void optionsShowToolbar(); + void optionsShowStatusbar(); + void optionsConfigureKeys(); + void optionsConfigureToolbars(); + + void applyNewToolbarConfig(); + +private: + void setupAccel(); + void setupActions(); + +private: + KParts::ReadWritePart *m_part; + + TDEToggleAction *m_toolbarAction; + TDEToggleAction *m_statusbarAction; +}; + +#endif // _KDEVDESIGNER_H_ diff --git a/kdevdesigner/src/kdevdesigner_shell.rc b/kdevdesigner/src/kdevdesigner_shell.rc new file mode 100644 index 00000000..1bb33a25 --- /dev/null +++ b/kdevdesigner/src/kdevdesigner_shell.rc @@ -0,0 +1,37 @@ + + + + &File + + + + + &Edit + + + &Project + + + &Tools + + + &Layout + + + &Window + + + + &Settings + + + + + + + + + + + + diff --git a/kdevdesigner/src/main.cpp b/kdevdesigner/src/main.cpp new file mode 100644 index 00000000..f70b9285 --- /dev/null +++ b/kdevdesigner/src/main.cpp @@ -0,0 +1,94 @@ +/*************************************************************************** + * Copyright (C) 2004 by Alexander Dymo * + * cloudtemple@mksat.net * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ +#include + +#include +#include "kdevdesigner.h" +#include +#include +#include +#include +#include + +static const char description[] = + I18N_NOOP("TDE GUI Designer"); + +static const char version[] = "0.2"; + +static TDECmdLineOptions options[] = +{ + { "+[URL]", I18N_NOOP( "Document to open" ), 0 }, + TDECmdLineLastOption +}; + +int main(int argc, char **argv) +{ + TDEAboutData about("kdevdesigner", I18N_NOOP("KDevDesigner"), version, description, + TDEAboutData::License_GPL, "KDevDesigner Copyright: (C) 2004-2005 Alexander Dymo\nTQt Designer Copyright: (C) 2000-2005 Trolltech AS All Rights Reserved", 0, 0); + about.addAuthor( "Trolltech AS", "TQt Designer code (Free Edition)" ); + about.addAuthor( "Alexander Dymo", "Port to KDE, partification", "adymo@kdevelop.org" ); + TDECmdLineArgs::init(argc, argv, &about); + TDECmdLineArgs::addCmdLineOptions( options ); + TDEApplication app; + + // see if we are starting with session management + if (app.isRestored()) + { + RESTORE(KDevDesigner); + } + else + { + // no session.. just start up normally + TQSplashScreen * splash = 0; + TQString splashFile = locate("data", "tdevelop/pics/kdevdesigner-splash.png"); + if (!splashFile.isNull()) + { + TQPixmap pm; + pm.load(splashFile); + splash = new TQSplashScreen( pm ); + splash->show(); + } + + app.processEvents(); + + TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); + + if ( args->count() == 0 ) + { + KDevDesigner *widget = new KDevDesigner; + widget->show(); + } + else + { + int i = 0; + for (; i < args->count(); i++ ) + { + KDevDesigner *widget = new KDevDesigner; + widget->show(); + widget->load( args->url( i ) ); + } + } + args->clear(); + if (splash) + delete splash; + } + + return app.exec(); +} diff --git a/kdevdesigner/uilib/CMakeLists.txt b/kdevdesigner/uilib/CMakeLists.txt new file mode 100644 index 00000000..3aa1c78f --- /dev/null +++ b/kdevdesigner/uilib/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 +# +################################################# + +include_directories( + ${CMAKE_SOURCE_DIR}/kdevdesigner/shared + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + + +##### kdevqui (static) ########################## + +set( SRCS database.cpp qwidgetfactory.cpp ) + +tde_moc( SRCS database2.h ) + +tde_add_library( kdevqui STATIC_PIC + SOURCES ${SRCS} +) diff --git a/kdevdesigner/uilib/Makefile.am b/kdevdesigner/uilib/Makefile.am new file mode 100644 index 00000000..0480cd50 --- /dev/null +++ b/kdevdesigner/uilib/Makefile.am @@ -0,0 +1,9 @@ +KDE_CXXFLAGS=-UQT_NO_ASCII_CAST + +INCLUDES = -I$(top_srcdir)/kdevdesigner/shared $(all_includes) +METASOURCES = AUTO + +noinst_LTLIBRARIES = libkdevqui.la +libkdevqui_la_SOURCES = database.cpp qwidgetfactory.cpp + +libkdevqui_la_LDFLAGS = $(all_libraries) diff --git a/tdevdesigner/uilib/database.cpp b/kdevdesigner/uilib/database.cpp similarity index 100% rename from tdevdesigner/uilib/database.cpp rename to kdevdesigner/uilib/database.cpp diff --git a/tdevdesigner/uilib/database2.h b/kdevdesigner/uilib/database2.h similarity index 100% rename from tdevdesigner/uilib/database2.h rename to kdevdesigner/uilib/database2.h diff --git a/tdevdesigner/uilib/qwidgetfactory.cpp b/kdevdesigner/uilib/qwidgetfactory.cpp similarity index 100% rename from tdevdesigner/uilib/qwidgetfactory.cpp rename to kdevdesigner/uilib/qwidgetfactory.cpp diff --git a/tdevdesigner/uilib/qwidgetfactory.h b/kdevdesigner/uilib/qwidgetfactory.h similarity index 100% rename from tdevdesigner/uilib/qwidgetfactory.h rename to kdevdesigner/uilib/qwidgetfactory.h diff --git a/kdevprj2tdevelop b/kdevprj2tdevelop new file mode 100755 index 00000000..09d3ebaa --- /dev/null +++ b/kdevprj2tdevelop @@ -0,0 +1,299 @@ +#!/usr/bin/perl + +if ($#ARGV != 0) { + die "Need one argument"; +} + +$filename = $ARGV[0]; +unless ($filename =~ /\.kdevprj/) { + die "Not a .kdevprj file"; +} + + +$ingeneral = 0; +$inlfvgroups = 0; + +open(FILE, "<$filename") || die "File not found"; +while () { + if (/\[General\]/) { + $ingeneral = 1; + $inlfvgroups = 0; + $inbin = 0; + } elsif (/\[LFV Groups\]/) { + $ingeneral = 0; + $inlfvgroups = 1; + $inbin = 0; + } elsif (/\[Config for BinMakefileAm\]/) { + $ingeneral = 0; + $inlfvgroups = 0; + $inbin = 1; + } elsif (/\[(.*)\]/) { + push(@sourcefiles, $1); + $ingeneral = 0; + $inlfvgroups = 0; + $inbin = 0; + } + + if ($ingeneral) { + if (/^author=(.*)/) { + $author = $1; + } elsif (/^configure_args=(.*)/) { + $configure_args = $1; + } elsif (/^email=(.*)/) { + $email = $1; + } elsif (/^make_options=(.*)/) { + $make_options = $1; + if ($makeoptions =~ /-n/) { + $dontact = "true"; + } + if ($makeoptions =~ /-j([0-9]+)/) { + $numberofjobs = $1; + } + if ($makeoptions =~ /-f/) { + $abortonerror = "true"; + } + } elsif (/^project_name=(.*)/) { + $project_name = $1; + } elsif (/^project_type=(.*)/) { + $project_type = $1; + } elsif (/^sub_dir=([^\/]*)/) { + $subdir = $1; + } + } + + if ($inlfvgroups) { + if (/^groups=(.*)/) { + $lfvgroups = $1; + } elsif (/(.*)=(.*)/) { + $group = $1; + $pattern = $2; + $pattern =~ s/^(.*),$/$1/; + $lfvgrouppattern{$group} = $pattern; + } + } + + if ($inbin) { + if (/^bin_program=(.*)/) { + $bin_program = $1; + } elsif (/^path_to_bin_program=(.*)/) { + $path_to_bin_program = $1; + $path_to_bin_program =~ s#^\./(.*)$#$1#; + $path_to_bin_program =~ s#^(.*)/#$1#; + $path_to_bin_program = $path_to_bin_program . "/"; + } elsif (/^cflags=(.*)/) { + $cflags = $1; + } elsif (/^cxxflags=(.*)/) { + $cxxflags = $1; + } + } + +} +close FILE; + +# Choose language support +$primarylanguage = "C++"; +if ($project_type eq "normal_c" + || $project_type eq "normal_gnome") { + $primarylanguage = "C"; +} + +# Choose project management +$projectmanagement = "KDevCustomProject"; +if ($project_type =~ /normal_kde|mini_kde|normalogl_kde|normal_kde2|mini_kde2|mdi_kde2/ + || $project_type =~ /kde2_normal|kicker_app|tdeio_slave|kc_module|kpart_plugin|ktheme/) { + $projectmanagement = "KDevTDEAutoProject"; +} +if ($project_type =~ /normal_cpp/) { + $projectmanagement = "KDevAutoProject"; +} + +# Keywords +if ($project_type =~ /normal_kde|mini_kde|normalogl_kde|normal_kde2|mini_kde2|mdi_kde2/ + || $project_type =~ /kde2_normal|kicker_app|tdeio_slave|kc_module|kpart_plugin|ktheme/) { + $keywords = $keywords . ",KDE"; +} +if ($project_type =~ /normal_kde|mini_kde|normalogl_kde|normal_kde2|mini_kde2|mdi_kde2/ + || $project_type =~ /kde2_normal|kicker_app|tdeio_slave|kc_module|kpart_plugin|ktheme/ + || $project_type =~ /normal_qt|normal_qt2|mdi_qt2|mdi_qextmdi/) { + $keywords = $keywords . ",Qt"; +} + + +## +## Let's go: write project file +## + +$projectfilename = $filename; +$projectfilename =~ s/^(.*)\.kdevprj$/$1.tdevelop/; +open(FILE, ">$projectfilename"); + +print FILE < + + + $author + $email + $projectmanagement + $primarylanguage + +EOF + +foreach $key (split(/,/, $keywords)) { + next if ($key eq ""); + print FILE <$key +EOF +} + +print FILE < + +EOF + +# auto project specific + +if ($projectmanagement eq "KDevAutoProject" || $projectmanagement eq "KDevTDEAutoProject") { + print FILE < + + $path_to_bin_program$bin_program + + + $configure_args + + + $abortonerror + $numberofjobs + $dontact + + + + $cflags + $cxxflags + + +EOF +} + +if ($project_management eq "KDevCustomProject") { + print FILE < + + $path_to_bin_program/$bin_program + + + $abortonerror + $numberofjobs + $dontact + + + +EOF +} + + +# file view +print FILE < + +EOF + +for $group (split /,/, $lfvgroups) { + next if ($group eq ""); + $pattern = $lfvgrouppattern{$group}; + $pattern =~ s/,/;/g; + print FILE < +EOF +} + +print FILE < + + + + gtk + gnustep + python + php + perl + + +EOF + +if ($projectmanagement eq "KDevAutoProject" + || $projectmanagement eq "KDevTDEAutoProject") { + print FILE < + + libtool + + +EOF +} + +print FILE < +EOF +close FILE; + + +## +## Write file list +## + +if ($projectmanagement eq "KDevCustomProject") { + $filelistfilename = $filename; + $filelistfilename =~ s/^(.*).kdevprj$/$1.filelist/; + open(FILE, ">$filelistfilename"); + for $file (@sourcefiles) { + print FILE "$file\n"; + } + close FILE; +} + + +## +## Convert templates +## + +$projectdir = ""; +if ($filename =~ m#(.*/)[^/]*#) { + $projectdir = $1; +} + +$oldtemplatedir = "${projectdir}$subdir/templates"; + +if (open(FILE, "$oldtemplatedir/cpp_template")) { + mkdir "${projectdir}templates"; + if (open(OFILE, ">${projectdir}templates/cpp")) { + while() { + s/\|EMAIL\|/\$EMAIL\$/; + s/\|AUTHOR\|/\$AUTHOR\$/; + s/\|VERSION\|/\$VERSION\$/; + s/\|DATE\|/\$DATE\$/; + s/\|YEAR\|/\$YEAR\$/; + s/\|FILENAME\|/\$FILENAME\$/; + print OFILE $_; + } + close OFILE; + } + close FILE; +} + +if (open(FILE, "$oldtemplatedir/header_template")) { + mkdir "${projectdir}templates"; + if (open(OFILE, ">${projectdir}templates/h")) { + while() { + s/\|EMAIL\|/\$EMAIL\$/; + s/\|AUTHOR\|/\$AUTHOR\$/; + s/\|VERSION\|/\$VERSION\$/; + s/\|DATE\|/\$DATE\$/; + s/\|YEAR\|/\$YEAR\$/; + s/\|FILENAME\|/\$FILENAME\$/; + print OFILE $_; + } + close OFILE; + } + close FILE; +} diff --git a/languages/ada/CMakeLists.txt b/languages/ada/CMakeLists.txt index 5b5d412b..e8d351b9 100644 --- a/languages/ada/CMakeLists.txt +++ b/languages/ada/CMakeLists.txt @@ -33,13 +33,13 @@ link_directories( ##### other data ################################ -install( FILES tdevadasupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevadasupport.rc DESTINATION ${DATA_INSTALL_DIR}/tdevadasupport ) +install( FILES kdevadasupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevadasupport.rc DESTINATION ${DATA_INSTALL_DIR}/kdevadasupport ) -##### libtdevadasupport (module) ################ +##### libkdevadasupport (module) ################ -tde_add_kpart( libtdevadasupport AUTOMOC +tde_add_kpart( libkdevadasupport AUTOMOC SOURCES adasupportpart.cpp problemreporter.cpp backgroundparser.cpp addclassdlg.ui addclass.cpp configproblemreporter.ui diff --git a/languages/ada/Makefile.am b/languages/ada/Makefile.am index 61536e92..d45a2add 100644 --- a/languages/ada/Makefile.am +++ b/languages/ada/Makefile.am @@ -7,11 +7,11 @@ INCLUDES = -I$(top_srcdir)/lib/antlr -I$(top_srcdir)/lib/interfaces \ SUBDIRS = app_templates file_templates doc -kde_module_LTLIBRARIES = libtdevadasupport.la -libtdevadasupport_la_LDFLAGS = $(LEXLIB) $(all_libraries) $(KDE_PLUGIN) -libtdevadasupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/antlr/src/libantlr.la +kde_module_LTLIBRARIES = libkdevadasupport.la +libkdevadasupport_la_LDFLAGS = $(LEXLIB) $(all_libraries) $(KDE_PLUGIN) +libkdevadasupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/antlr/src/libantlr.la -libtdevadasupport_la_SOURCES = adasupportpart.cpp problemreporter.cpp backgroundparser.cpp addclassdlg.ui addclass.cpp configproblemreporter.ui ada_utils.cpp adasupport.cpp AdaLexer.cpp AdaParser.cpp AdaTreeParserSuper.cpp AdaStoreWalker.cpp +libkdevadasupport_la_SOURCES = adasupportpart.cpp problemreporter.cpp backgroundparser.cpp addclassdlg.ui addclass.cpp configproblemreporter.ui ada_utils.cpp adasupport.cpp AdaLexer.cpp AdaParser.cpp AdaTreeParserSuper.cpp AdaStoreWalker.cpp METASOURCES = AUTO @@ -33,9 +33,9 @@ genparser: antlr ada.g && antlr ada.tree.g && antlr -glib ada.tree.g ada.store.g servicedir = $(kde_servicesdir) -service_DATA = tdevadasupport.desktop +service_DATA = kdevadasupport.desktop -rcdir = $(kde_datadir)/tdevadasupport -rc_DATA = tdevadasupport.rc +rcdir = $(kde_datadir)/kdevadasupport +rc_DATA = kdevadasupport.rc KDE_OPTIONS = nofinal diff --git a/languages/ada/adasupportpart.cpp b/languages/ada/adasupportpart.cpp index 53c4af48..aac02610 100644 --- a/languages/ada/adasupportpart.cpp +++ b/languages/ada/adasupportpart.cpp @@ -18,11 +18,11 @@ #include #include -#include "tdevgenericfactory.h" -#include "tdevcore.h" -#include "tdevproject.h" -#include "tdevmainwindow.h" -#include "tdevpartcontroller.h" +#include "kdevgenericfactory.h" +#include "kdevcore.h" +#include "kdevproject.h" +#include "kdevmainwindow.h" +#include "kdevpartcontroller.h" #include "codemodel.h" #include "adasupportpart.h" #include "problemreporter.h" @@ -33,15 +33,15 @@ #include "AdaStoreWalker.hpp" #include "AdaAST.hpp" -#include +#include enum { KDEV_DB_VERSION = 6 }; enum { KDEV_PCS_VERSION = 6 }; -typedef TDevGenericFactory AdaSupportPartFactory; +typedef KDevGenericFactory AdaSupportPartFactory; -static const TDevPluginInfo data("tdevadasupport"); -K_EXPORT_COMPONENT_FACTORY (libtdevadasupport, AdaSupportPartFactory (data)) +static const KDevPluginInfo data("kdevadasupport"); +K_EXPORT_COMPONENT_FACTORY (libkdevadasupport, AdaSupportPartFactory (data)) struct AdaSupportPartData { @@ -51,7 +51,7 @@ struct AdaSupportPartData { }; AdaSupportPart::AdaSupportPart (TQObject *parent, const char *name, const TQStringList &) - : TDevLanguageSupport (&data, parent, name ? name : "AdaSupportPart"), d (new AdaSupportPartData()) + : KDevLanguageSupport (&data, parent, name ? name : "AdaSupportPart"), d (new AdaSupportPartData()) { setInstance (AdaSupportPartFactory::instance ()); @@ -93,9 +93,9 @@ AdaSupportPart::~AdaSupportPart () } -TDevLanguageSupport::Features AdaSupportPart::features () +KDevLanguageSupport::Features AdaSupportPart::features () { - return TDevLanguageSupport::Features + return KDevLanguageSupport::Features ( // TBD: Classes | Functions | Namespaces); } diff --git a/languages/ada/adasupportpart.h b/languages/ada/adasupportpart.h index 32160b38..eb9e2630 100644 --- a/languages/ada/adasupportpart.h +++ b/languages/ada/adasupportpart.h @@ -2,7 +2,7 @@ #ifndef __ADASUPPORTPART_H__ #define __ADASUPPORTPART_H__ -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" #include @@ -10,7 +10,7 @@ class AdaSupportPartData; class KDialogBase; class TQStringList; -class AdaSupportPart : public TDevLanguageSupport +class AdaSupportPart : public KDevLanguageSupport { Q_OBJECT diff --git a/languages/ada/app_templates/adahello/CMakeLists.txt b/languages/ada/app_templates/adahello/CMakeLists.txt index ba3a3eb5..cbd00e6e 100644 --- a/languages/ada/app_templates/adahello/CMakeLists.txt +++ b/languages/ada/app_templates/adahello/CMakeLists.txt @@ -15,8 +15,8 @@ add_custom_target( adahello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/adahello.tar.gz adahello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - adahello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + adahello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/ada/app_templates/adahello/Makefile.am b/languages/ada/app_templates/adahello/Makefile.am index 5cc49953..5a970c91 100644 --- a/languages/ada/app_templates/adahello/Makefile.am +++ b/languages/ada/app_templates/adahello/Makefile.am @@ -1,10 +1,10 @@ dataFiles = main.adb app.tdevelop ada-Makefile app.tdevelop.filelist ### no need to change below: -template_DATA = adahello.tdevtemplate +template_DATA = adahello.kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard adahello.tar.gz: $(TAR) -cf adahello.tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 adahello.tar diff --git a/languages/ada/app_templates/adahello/adahello.kdevtemplate b/languages/ada/app_templates/adahello/adahello.kdevtemplate new file mode 100644 index 00000000..0cc09da2 --- /dev/null +++ b/languages/ada/app_templates/adahello/adahello.kdevtemplate @@ -0,0 +1,132 @@ +# KDE Config File +[General] +Name=Simple Hello world program +Name[ca]=Simple programa Hello world +Name[da]=Simpelt Goddag verden program +Name[de]=Ein einfaches "Hello World"-Programm +Name[el]=Απλό πρόγραμμα Γεια σου Κόσμε +Name[es]=Programa «Hola mundo» sencillo +Name[et]=Lihtne "Tere, maailm" programm +Name[eu]="Kaixo mundua" programa sinplea +Name[fa]=برنامۀ سادۀ Hello world +Name[fr]=Programme « Bonjour monde » simple +Name[ga]=Ríomhchlár simplí "Hello World" +Name[gl]=Programa sinxelo Ola mundo +Name[hu]=Egyszerű Hello world program +Name[it]=Semplice programma di "Hello world" +Name[ja]=簡単な Hello world プログラム +Name[ms]=Program Hello World mudah +Name[nds]=En eenfach "Moin Welt"-Programm +Name[ne]=साधारण हेल्लो वोल्ड कार्यक्रम +Name[nl]=Eenvoudig 'Hello World' programma +Name[pl]=Prosty program witaj świecie +Name[pt]=Programa simples Olá Mundo +Name[pt_BR]=Programa simples Olá Mundo +Name[ru]=Простая программа Hello world +Name[sk]=Jednoduchý "Ahoj svet" program +Name[sl]=Preprost program Hello world +Name[sr]=Једноставан „Здраво свете“ програм +Name[sr@Latn]=Jednostavan „Zdravo svete“ program +Name[sv]=Enkelt Hello world-program +Name[tr]=Basit Merhaba dünya programı +Name[zh_CN]=简单的 Hello world 程序 +Name[zh_TW]=簡單的 Hello world 程式 +Icon=adahello.png +Category=Ada +Comment=Generates a simple Hello world program in Ada +Comment[ca]=Genera un simple programa de Hello world en Ada +Comment[da]=Genererer et simpelt Goddag verden program i Ada +Comment[de]=Erstellt ein einfaches "Hello World"-Program in Ada +Comment[el]=Δημιουργεί ένα απλό πρόγραμμα Γεια σου Κόσμε σε Ada +Comment[es]=Genera un programa «Hola mundo» sencillo en Ada +Comment[et]=Lihtsa "Tere, maailm" programmi loomine ADA-s +Comment[eu]="Kaixo mundua" programa sinple bat sortzen du Adan +Comment[fa]=یک برنامۀ سادۀ Hello world در آدا تولید می‌کند +Comment[fr]=Génère un programme « Bonjour monde » simple en Ada +Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí "Hello World" in Ada +Comment[gl]=Xera un programa sinxelo Hello world en Ada +Comment[hu]=Létrehoz egy egyszerű Hello world programot ADA nyelven +Comment[it]=Genera un semplice programma di "Hello world" in Ada +Comment[ja]=Ada で簡単な Hello world プログラムを作成します +Comment[ms]=Menjana program Hello World mudah dalam Ada +Comment[nds]=Stellt in Ada en eenfach "Moin Welt"-Programm op +Comment[ne]=एडामा साधारण हेल्लो वोल्ड कार्यक्रम उत्पन्न गर्दछ +Comment[nl]=Genereert een eenvoudig Hello World programma in Ada +Comment[pl]=Generuje prosty program Witaj świecie w Adzie +Comment[pt]=Gera um programa simples de Olá Mundo em Ada +Comment[pt_BR]=Gera um programa simples de Olá Mundo em Ada +Comment[ru]=Создание простой программы Hello world на Ada +Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program v Ada +Comment[sl]=Ustvari preprost program Hello world v Adi +Comment[sr]=Прави једноставан „Здраво свете“ у Ada-и +Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ u Ada-i +Comment[sv]=Skapar ett enkelt Hello world-program i Ada +Comment[tr]=Ada dilinde basit bir Merhaba Dünya programı üretir. +Comment[zh_CN]=以 Ada 语言生成简单的 Hello world 程序 +Comment[zh_TW]=產生 Ada 的 Hello world 程式 +FileTemplates=adb,AdaStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.adb +Archive=adahello.tar.gz + +[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=%{src}/ada-Makefile +Dest=%{dest}/Makefile + +[FILE3] +Type=install +Source=%{src}/app.tdevelop.filelist +Dest=%{dest}/%{APPNAMELC}.tdevelop.filelist + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE4] +Type=install +Source=%{src}/main.adb +Dest=%{dest}/src/%{APPNAMELC}.adb + +[MSG] +Type=message +Comment=A simple "Hello world" program in ADA was created in %{dest} +Comment[ca]=Un simple programa de "Hello world" en ADA ha estat creat en %{dest} +Comment[da]=Et simpelt "Goddag verden" program i ADA blev oprettet i %{dest} +Comment[de]=Ein einfaches "Hello world" Programm in Ada wurde in %{dest} erstellt +Comment[el]=Ένα απλό πρόγραμμα "Γεια σου Κόσμε" σε ADA δημιουργήθηκε στο %{dest} +Comment[es]=Un programa «Hola mundo» sencillo en ADA ha sido creado en %{dest} +Comment[et]=Lihtne "Tere, maailm" programm ADA-s loodi asukohta %{dest} +Comment[eu]="Kaixo mundua" programa sinple bat sortu da ADAn hemen: %{dest} +Comment[fa]=یک برنامۀ سادۀ «Hello world» در آدا در %{dest} ایجاد شد +Comment[fr]=Un programme « Bonjour monde » simple en ADA a été créé dans %{dest} +Comment[ga]=Cruthaíodh ríomhchlár simplí "Hello World" ADA i %{dest} +Comment[gl]=Creouse un programa sinxelo "Ola mundo" en ADA en %{dest} +Comment[hu]=Létrejött egy egyszerű Hello world program ADA nyelven itt: %{dest} +Comment[it]=È stato creato un semplice programma di "Hello world" in ADA in %{dest} +Comment[ja]=Ada で記述された "Hello world" プログラムを %{dest} に作成しました +Comment[ms]=Program "Hello World" mudah dalam ada telah dicipta dalam %{dest} +Comment[nds]=In %{dest} wöör en eenfach "Moin Welt"-Programm in Ada opstellt +Comment[ne]=एउटा साधारण "हेल्लो वोल्ड" कार्यक्रम एडामा %{dest} सिर्जना गरिएको थियो +Comment[nl]=Een eenvoudig "Hello World" programma in Ada is aangemaakt in %{dest} +Comment[pl]=Prosty program "Witaj świecie" w języku ADA został utworzony w %{dest} +Comment[pt]=Foi criado um programa simples "Olá mundo" em ADA em %{dest} +Comment[pt_BR]=Foi criado um programa simples "Olá mundo" em ADA em %{dest} +Comment[ru]=Простая программа "Hello world" на ADA создана в %{dest} +Comment[sk]=Jednoduchý "Ahoj svet" program v Ada bol vytvorený v %{dest} +Comment[sl]=Preprost program »Hello world« v jeziku ADA je bil ustvarjen v %{dest} +Comment[sr]=Једноставан „Здраво свете“ програм у Ada-и је направљен у %{dest} +Comment[sr@Latn]=Jednostavan „Zdravo svete“ program u Ada-i je napravljen u %{dest} +Comment[sv]=Ett enkelt "Hello world"-program in Ada skapades i %{dest} +Comment[tr]=ADA'da basit bir "Merhaba Dünya" programı %{dest} içinde yaratılmıştır. +Comment[zh_CN]=在 %{dest} 中创建了 Ada 语言的“Hello world”程序 +Comment[zh_TW]=Ada 的 Hello world 程式已產生在 ${dest} diff --git a/languages/ada/app_templates/adahello/adahello.tdevtemplate b/languages/ada/app_templates/adahello/adahello.tdevtemplate deleted file mode 100644 index 810315a6..00000000 --- a/languages/ada/app_templates/adahello/adahello.tdevtemplate +++ /dev/null @@ -1,132 +0,0 @@ -# KDE Config File -[General] -Name=Simple Hello world program -Name[ca]=Simple programa Hello world -Name[da]=Simpelt Goddag verden program -Name[de]=Ein einfaches "Hello World"-Programm -Name[el]=Απλό πρόγραμμα Γεια σου Κόσμε -Name[es]=Programa «Hola mundo» sencillo -Name[et]=Lihtne "Tere, maailm" programm -Name[eu]="Kaixo mundua" programa sinplea -Name[fa]=برنامۀ سادۀ Hello world -Name[fr]=Programme « Bonjour monde » simple -Name[ga]=Ríomhchlár simplí "Hello World" -Name[gl]=Programa sinxelo Ola mundo -Name[hu]=Egyszerű Hello world program -Name[it]=Semplice programma di "Hello world" -Name[ja]=簡単な Hello world プログラム -Name[ms]=Program Hello World mudah -Name[nds]=En eenfach "Moin Welt"-Programm -Name[ne]=साधारण हेल्लो वोल्ड कार्यक्रम -Name[nl]=Eenvoudig 'Hello World' programma -Name[pl]=Prosty program witaj świecie -Name[pt]=Programa simples Olá Mundo -Name[pt_BR]=Programa simples Olá Mundo -Name[ru]=Простая программа Hello world -Name[sk]=Jednoduchý "Ahoj svet" program -Name[sl]=Preprost program Hello world -Name[sr]=Једноставан „Здраво свете“ програм -Name[sr@Latn]=Jednostavan „Zdravo svete“ program -Name[sv]=Enkelt Hello world-program -Name[tr]=Basit Merhaba dünya programı -Name[zh_CN]=简单的 Hello world 程序 -Name[zh_TW]=簡單的 Hello world 程式 -Icon=adahello.png -Category=Ada -Comment=Generates a simple Hello world program in Ada -Comment[ca]=Genera un simple programa de Hello world en Ada -Comment[da]=Genererer et simpelt Goddag verden program i Ada -Comment[de]=Erstellt ein einfaches "Hello World"-Program in Ada -Comment[el]=Δημιουργεί ένα απλό πρόγραμμα Γεια σου Κόσμε σε Ada -Comment[es]=Genera un programa «Hola mundo» sencillo en Ada -Comment[et]=Lihtsa "Tere, maailm" programmi loomine ADA-s -Comment[eu]="Kaixo mundua" programa sinple bat sortzen du Adan -Comment[fa]=یک برنامۀ سادۀ Hello world در آدا تولید می‌کند -Comment[fr]=Génère un programme « Bonjour monde » simple en Ada -Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí "Hello World" in Ada -Comment[gl]=Xera un programa sinxelo Hello world en Ada -Comment[hu]=Létrehoz egy egyszerű Hello world programot ADA nyelven -Comment[it]=Genera un semplice programma di "Hello world" in Ada -Comment[ja]=Ada で簡単な Hello world プログラムを作成します -Comment[ms]=Menjana program Hello World mudah dalam Ada -Comment[nds]=Stellt in Ada en eenfach "Moin Welt"-Programm op -Comment[ne]=एडामा साधारण हेल्लो वोल्ड कार्यक्रम उत्पन्न गर्दछ -Comment[nl]=Genereert een eenvoudig Hello World programma in Ada -Comment[pl]=Generuje prosty program Witaj świecie w Adzie -Comment[pt]=Gera um programa simples de Olá Mundo em Ada -Comment[pt_BR]=Gera um programa simples de Olá Mundo em Ada -Comment[ru]=Создание простой программы Hello world на Ada -Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program v Ada -Comment[sl]=Ustvari preprost program Hello world v Adi -Comment[sr]=Прави једноставан „Здраво свете“ у Ada-и -Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ u Ada-i -Comment[sv]=Skapar ett enkelt Hello world-program i Ada -Comment[tr]=Ada dilinde basit bir Merhaba Dünya programı üretir. -Comment[zh_CN]=以 Ada 语言生成简单的 Hello world 程序 -Comment[zh_TW]=產生 Ada 的 Hello world 程式 -FileTemplates=adb,AdaStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.adb -Archive=adahello.tar.gz - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/ada-Makefile -Dest=%{dest}/Makefile - -[FILE3] -Type=install -Source=%{src}/app.tdevelop.filelist -Dest=%{dest}/%{APPNAMELC}.tdevelop.filelist - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE4] -Type=install -Source=%{src}/main.adb -Dest=%{dest}/src/%{APPNAMELC}.adb - -[MSG] -Type=message -Comment=A simple "Hello world" program in ADA was created in %{dest} -Comment[ca]=Un simple programa de "Hello world" en ADA ha estat creat en %{dest} -Comment[da]=Et simpelt "Goddag verden" program i ADA blev oprettet i %{dest} -Comment[de]=Ein einfaches "Hello world" Programm in Ada wurde in %{dest} erstellt -Comment[el]=Ένα απλό πρόγραμμα "Γεια σου Κόσμε" σε ADA δημιουργήθηκε στο %{dest} -Comment[es]=Un programa «Hola mundo» sencillo en ADA ha sido creado en %{dest} -Comment[et]=Lihtne "Tere, maailm" programm ADA-s loodi asukohta %{dest} -Comment[eu]="Kaixo mundua" programa sinple bat sortu da ADAn hemen: %{dest} -Comment[fa]=یک برنامۀ سادۀ «Hello world» در آدا در %{dest} ایجاد شد -Comment[fr]=Un programme « Bonjour monde » simple en ADA a été créé dans %{dest} -Comment[ga]=Cruthaíodh ríomhchlár simplí "Hello World" ADA i %{dest} -Comment[gl]=Creouse un programa sinxelo "Ola mundo" en ADA en %{dest} -Comment[hu]=Létrejött egy egyszerű Hello world program ADA nyelven itt: %{dest} -Comment[it]=È stato creato un semplice programma di "Hello world" in ADA in %{dest} -Comment[ja]=Ada で記述された "Hello world" プログラムを %{dest} に作成しました -Comment[ms]=Program "Hello World" mudah dalam ada telah dicipta dalam %{dest} -Comment[nds]=In %{dest} wöör en eenfach "Moin Welt"-Programm in Ada opstellt -Comment[ne]=एउटा साधारण "हेल्लो वोल्ड" कार्यक्रम एडामा %{dest} सिर्जना गरिएको थियो -Comment[nl]=Een eenvoudig "Hello World" programma in Ada is aangemaakt in %{dest} -Comment[pl]=Prosty program "Witaj świecie" w języku ADA został utworzony w %{dest} -Comment[pt]=Foi criado um programa simples "Olá mundo" em ADA em %{dest} -Comment[pt_BR]=Foi criado um programa simples "Olá mundo" em ADA em %{dest} -Comment[ru]=Простая программа "Hello world" на ADA создана в %{dest} -Comment[sk]=Jednoduchý "Ahoj svet" program v Ada bol vytvorený v %{dest} -Comment[sl]=Preprost program »Hello world« v jeziku ADA je bil ustvarjen v %{dest} -Comment[sr]=Једноставан „Здраво свете“ програм у Ada-и је направљен у %{dest} -Comment[sr@Latn]=Jednostavan „Zdravo svete“ program u Ada-i je napravljen u %{dest} -Comment[sv]=Ett enkelt "Hello world"-program in Ada skapades i %{dest} -Comment[tr]=ADA'da basit bir "Merhaba Dünya" programı %{dest} içinde yaratılmıştır. -Comment[zh_CN]=在 %{dest} 中创建了 Ada 语言的“Hello world”程序 -Comment[zh_TW]=Ada 的 Hello world 程式已產生在 ${dest} diff --git a/languages/ada/app_templates/adahello/app.tdevelop b/languages/ada/app_templates/adahello/app.tdevelop index 83815aa1..a94f7e34 100644 --- a/languages/ada/app_templates/adahello/app.tdevelop +++ b/languages/ada/app_templates/adahello/app.tdevelop @@ -4,14 +4,14 @@ %{AUTHOR} %{EMAIL} %{VERSION} - TDevCustomProject + KDevCustomProject Ada Ada Code - + build / @@ -25,8 +25,8 @@ make - - + + bash bash_bugs @@ -73,12 +73,12 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/languages/ada/doc/CMakeLists.txt b/languages/ada/doc/CMakeLists.txt index 32d4281c..62b3ef26 100644 --- a/languages/ada/doc/CMakeLists.txt +++ b/languages/ada/doc/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES ada.toc ada_bugs_gcc.toc - DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation/tocs ) + DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation/tocs ) diff --git a/languages/ada/doc/Makefile.am b/languages/ada/doc/Makefile.am index da0655f6..ff5f8a32 100644 --- a/languages/ada/doc/Makefile.am +++ b/languages/ada/doc/Makefile.am @@ -1,4 +1,4 @@ -tocdir = ${kde_datadir}/tdevdocumentation/tocs +tocdir = ${kde_datadir}/kdevdocumentation/tocs toc_DATA = ada.toc ada_bugs_gcc.toc #indexdir = ${kde_datadir}/devdoctreeview/indices diff --git a/languages/ada/file_templates/CMakeLists.txt b/languages/ada/file_templates/CMakeLists.txt index 7eb47fdc..21d16b69 100644 --- a/languages/ada/file_templates/CMakeLists.txt +++ b/languages/ada/file_templates/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES adb ads - DESTINATION ${DATA_INSTALL_DIR}/tdevfilecreate/file-templates ) + DESTINATION ${DATA_INSTALL_DIR}/kdevfilecreate/file-templates ) diff --git a/languages/ada/file_templates/Makefile.am b/languages/ada/file_templates/Makefile.am index 4635979e..58bbd907 100644 --- a/languages/ada/file_templates/Makefile.am +++ b/languages/ada/file_templates/Makefile.am @@ -1,3 +1,3 @@ -templatedir = $(kde_datadir)/tdevfilecreate/file-templates +templatedir = $(kde_datadir)/kdevfilecreate/file-templates template_DATA = adb ads diff --git a/languages/ada/kdevadasupport.desktop b/languages/ada/kdevadasupport.desktop new file mode 100644 index 00000000..f1ae3bf1 --- /dev/null +++ b/languages/ada/kdevadasupport.desktop @@ -0,0 +1,87 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Ada Language Support +Comment[ca]=Suport per al llenguatge Ada +Comment[da]=Ada sprogunderstøttelse +Comment[de]=Sprachunterstützung für Ada +Comment[el]=Υποστήριξη γλώσσας Ada +Comment[es]=Soporte para lenguaje Ada +Comment[et]=ADA keele toetus +Comment[eu]=Ada lenguaiaren euskarria +Comment[fa]=پشتیبانی زبان آدا +Comment[fr]=Prise en charge du langage ADA +Comment[ga]=Tacaíocht Ada +Comment[gl]=Soporte da linguaxe Ada +Comment[hi]=एडीए भाषा समर्थन +Comment[hu]=Ada nyelvi támogatás +Comment[is]=Stuðningur við Ada forritunarmálið +Comment[it]=Supporto al linguaggio Ada +Comment[ja]=Ada 言語サポート +Comment[ms]=Sokongan Bahasa Ada +Comment[nds]=Spraakünnerstütten för Ada +Comment[ne]=एडा भाषा समर्थन +Comment[nl]=Ondersteuning voor Ada +Comment[pl]=Obsługa języka Ada +Comment[pt]=Suporte à Linguagem Ada +Comment[pt_BR]=Suporte à Linguagem Ada +Comment[ru]=Поддержка языка Ada +Comment[sk]=Podpora jazyka Ada +Comment[sl]=Podpora jeziku ada +Comment[sr]=Ada језичка подршка +Comment[sr@Latn]=Ada jezička podrška +Comment[sv]=Stöd för språket Ada +Comment[ta]=அடா மொழி ஆதரவு +Comment[tg]=Ёри намудани забони Ada +Comment[tr]=Ada Dil Desteği +Comment[zh_CN]=Ada 语言支持 +Comment[zh_TW]=Ada 語言支援 +Name=KDevAdaSupport +Name[da]=TDevelop Ada-understøttelse +Name[de]=Unterstützung für Ada (TDevelop) +Name[hi]=के-डेव-एडीए-समर्थन +Name[nds]=Ada-Ünnerstütten för TDevelop +Name[ne]=केडीई विकास एडा समर्थन +Name[pl]=KDevObsługaAdy +Name[sk]=KDevAdaPodpora +Name[sv]=TDevelop Ada-stöd +Name[ta]=கெடெவ் அடா ஆதரவு +Name[zh_TW]=TDevelop Ada 支援 +GenericName=Ada Language Support +GenericName[ca]=Suport per al llenguatge Ada +GenericName[da]=Ada sprogunderstøttelse +GenericName[de]=Sprachunterstützung für Ada +GenericName[el]=Υποστήριξη γλώσσας Ada +GenericName[es]=Soporte para lenguaje Ada +GenericName[et]=ADA keele toetus +GenericName[eu]=Ada lenguaiaren euskarria +GenericName[fa]=پشتیبانی زبان آدا +GenericName[fr]=Prise en charge du langage ADA +GenericName[ga]=Tacaíocht Ada +GenericName[gl]=Soporte da linguaxe Ada +GenericName[hi]=एडीए भाषा समर्थन +GenericName[hu]=Ada-támogatás +GenericName[it]=Supporto al linguaggio Ada +GenericName[ja]=Ada 言語サポート +GenericName[ms]=Sokongan Bahasa Ada +GenericName[nds]=Ünnerstütten för de Spraak Ada +GenericName[ne]=एडा भाषा समर्थन +GenericName[nl]=Ondersteuning voor Ada +GenericName[pl]=Obsługa języka Ada +GenericName[pt]=Suporte à Linguagem Ada +GenericName[pt_BR]=Suporte à Linguagem Ada +GenericName[ru]=Поддержка языка Ada +GenericName[sk]=Podpora jazyka Ada +GenericName[sl]=Podpora jeziku ada +GenericName[sr]=Ada језичка подршка +GenericName[sr@Latn]=Ada jezička podrška +GenericName[sv]=Stöd för språket Ada +GenericName[ta]=அடா மொழி ஆதரவு +GenericName[tg]=Ёри намудани забони Ada +GenericName[tr]=Ada Dil Desteği +GenericName[zh_CN]=Ada 语言支持 +GenericName[zh_TW]=Ada 語言支援 +ServiceTypes=TDevelop/LanguageSupport +X-TDE-Library=libkdevadasupport +X-TDevelop-Version=5 +X-TDevelop-Language=Ada diff --git a/languages/ada/tdevadasupport.rc b/languages/ada/kdevadasupport.rc similarity index 100% rename from languages/ada/tdevadasupport.rc rename to languages/ada/kdevadasupport.rc diff --git a/languages/ada/problemreporter.cpp b/languages/ada/problemreporter.cpp index cfd9acc7..6bac0253 100644 --- a/languages/ada/problemreporter.cpp +++ b/languages/ada/problemreporter.cpp @@ -19,8 +19,8 @@ #include "problemreporter.h" #include "adasupportpart.h" -#include "tdevpartcontroller.h" -#include "tdevmainwindow.h" +#include "kdevpartcontroller.h" +#include "kdevmainwindow.h" #include "configproblemreporter.h" #include "backgroundparser.h" diff --git a/languages/ada/tdevadasupport.desktop b/languages/ada/tdevadasupport.desktop deleted file mode 100644 index 6bee2461..00000000 --- a/languages/ada/tdevadasupport.desktop +++ /dev/null @@ -1,87 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Ada Language Support -Comment[ca]=Suport per al llenguatge Ada -Comment[da]=Ada sprogunderstøttelse -Comment[de]=Sprachunterstützung für Ada -Comment[el]=Υποστήριξη γλώσσας Ada -Comment[es]=Soporte para lenguaje Ada -Comment[et]=ADA keele toetus -Comment[eu]=Ada lenguaiaren euskarria -Comment[fa]=پشتیبانی زبان آدا -Comment[fr]=Prise en charge du langage ADA -Comment[ga]=Tacaíocht Ada -Comment[gl]=Soporte da linguaxe Ada -Comment[hi]=एडीए भाषा समर्थन -Comment[hu]=Ada nyelvi támogatás -Comment[is]=Stuðningur við Ada forritunarmálið -Comment[it]=Supporto al linguaggio Ada -Comment[ja]=Ada 言語サポート -Comment[ms]=Sokongan Bahasa Ada -Comment[nds]=Spraakünnerstütten för Ada -Comment[ne]=एडा भाषा समर्थन -Comment[nl]=Ondersteuning voor Ada -Comment[pl]=Obsługa języka Ada -Comment[pt]=Suporte à Linguagem Ada -Comment[pt_BR]=Suporte à Linguagem Ada -Comment[ru]=Поддержка языка Ada -Comment[sk]=Podpora jazyka Ada -Comment[sl]=Podpora jeziku ada -Comment[sr]=Ada језичка подршка -Comment[sr@Latn]=Ada jezička podrška -Comment[sv]=Stöd för språket Ada -Comment[ta]=அடா மொழி ஆதரவு -Comment[tg]=Ёри намудани забони Ada -Comment[tr]=Ada Dil Desteği -Comment[zh_CN]=Ada 语言支持 -Comment[zh_TW]=Ada 語言支援 -Name=KDevAdaSupport -Name[da]=TDevelop Ada-understøttelse -Name[de]=Unterstützung für Ada (TDevelop) -Name[hi]=के-डेव-एडीए-समर्थन -Name[nds]=Ada-Ünnerstütten för TDevelop -Name[ne]=केडीई विकास एडा समर्थन -Name[pl]=KDevObsługaAdy -Name[sk]=KDevAdaPodpora -Name[sv]=TDevelop Ada-stöd -Name[ta]=கெடெவ் அடா ஆதரவு -Name[zh_TW]=TDevelop Ada 支援 -GenericName=Ada Language Support -GenericName[ca]=Suport per al llenguatge Ada -GenericName[da]=Ada sprogunderstøttelse -GenericName[de]=Sprachunterstützung für Ada -GenericName[el]=Υποστήριξη γλώσσας Ada -GenericName[es]=Soporte para lenguaje Ada -GenericName[et]=ADA keele toetus -GenericName[eu]=Ada lenguaiaren euskarria -GenericName[fa]=پشتیبانی زبان آدا -GenericName[fr]=Prise en charge du langage ADA -GenericName[ga]=Tacaíocht Ada -GenericName[gl]=Soporte da linguaxe Ada -GenericName[hi]=एडीए भाषा समर्थन -GenericName[hu]=Ada-támogatás -GenericName[it]=Supporto al linguaggio Ada -GenericName[ja]=Ada 言語サポート -GenericName[ms]=Sokongan Bahasa Ada -GenericName[nds]=Ünnerstütten för de Spraak Ada -GenericName[ne]=एडा भाषा समर्थन -GenericName[nl]=Ondersteuning voor Ada -GenericName[pl]=Obsługa języka Ada -GenericName[pt]=Suporte à Linguagem Ada -GenericName[pt_BR]=Suporte à Linguagem Ada -GenericName[ru]=Поддержка языка Ada -GenericName[sk]=Podpora jazyka Ada -GenericName[sl]=Podpora jeziku ada -GenericName[sr]=Ada језичка подршка -GenericName[sr@Latn]=Ada jezička podrška -GenericName[sv]=Stöd för språket Ada -GenericName[ta]=அடா மொழி ஆதரவு -GenericName[tg]=Ёри намудани забони Ada -GenericName[tr]=Ada Dil Desteği -GenericName[zh_CN]=Ada 语言支持 -GenericName[zh_TW]=Ada 語言支援 -ServiceTypes=TDevelop/LanguageSupport -X-TDE-Library=libtdevadasupport -X-TDevelop-Version=5 -X-TDevelop-Language=Ada diff --git a/languages/bash/CMakeLists.txt b/languages/bash/CMakeLists.txt index eca8c096..9998693d 100644 --- a/languages/bash/CMakeLists.txt +++ b/languages/bash/CMakeLists.txt @@ -29,13 +29,13 @@ link_directories( ##### other data ################################ -install( FILES tdevbashsupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevbashsupport.rc DESTINATION ${DATA_INSTALL_DIR}/tdevbashsupport ) +install( FILES kdevbashsupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevbashsupport.rc DESTINATION ${DATA_INSTALL_DIR}/kdevbashsupport ) -##### libtdevbashsupport (module) ############### +##### libkdevbashsupport (module) ############### -tde_add_kpart( libtdevbashsupport AUTOMOC +tde_add_kpart( libkdevbashsupport AUTOMOC SOURCES bashsupport_part.cpp LINK tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} diff --git a/languages/bash/Makefile.am b/languages/bash/Makefile.am index 2f750d63..5916563a 100644 --- a/languages/bash/Makefile.am +++ b/languages/bash/Makefile.am @@ -5,16 +5,16 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ $(all_includes) SUBDIRS = app_templates doc -kde_module_LTLIBRARIES = libtdevbashsupport.la -libtdevbashsupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevbashsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevbashsupport.la +libkdevbashsupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevbashsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevbashsupport_la_SOURCES = bashsupport_part.cpp +libkdevbashsupport_la_SOURCES = bashsupport_part.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevbashsupport.desktop +service_DATA = kdevbashsupport.desktop -rcdir = $(kde_datadir)/tdevbashsupport -rc_DATA = tdevbashsupport.rc +rcdir = $(kde_datadir)/kdevbashsupport +rc_DATA = kdevbashsupport.rc diff --git a/languages/bash/app_templates/bashhello/CMakeLists.txt b/languages/bash/app_templates/bashhello/CMakeLists.txt index 0c002f83..69abf15c 100644 --- a/languages/bash/app_templates/bashhello/CMakeLists.txt +++ b/languages/bash/app_templates/bashhello/CMakeLists.txt @@ -15,8 +15,8 @@ add_custom_target( bashhello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/bashhello.tar.gz bashhello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - bashhello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + bashhello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/bash/app_templates/bashhello/Makefile.am b/languages/bash/app_templates/bashhello/Makefile.am index ed84d271..b26692b4 100644 --- a/languages/bash/app_templates/bashhello/Makefile.am +++ b/languages/bash/app_templates/bashhello/Makefile.am @@ -2,10 +2,10 @@ dataFiles = app.sh app.tdevelop templateName = bashhello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/bash/app_templates/bashhello/app.tdevelop b/languages/bash/app_templates/bashhello/app.tdevelop index bbc04992..cab08799 100644 --- a/languages/bash/app_templates/bashhello/app.tdevelop +++ b/languages/bash/app_templates/bashhello/app.tdevelop @@ -11,22 +11,22 @@ KDevdistpart - TDevDebugger + KDevDebugger - + src *.sh *~ - - + + - - + + ada ada_bugs_gcc @@ -73,10 +73,10 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/languages/bash/app_templates/bashhello/bashhello.tdevtemplate b/languages/bash/app_templates/bashhello/bashhello.kdevtemplate similarity index 100% rename from languages/bash/app_templates/bashhello/bashhello.tdevtemplate rename to languages/bash/app_templates/bashhello/bashhello.kdevtemplate diff --git a/languages/bash/bashsupport_part.cpp b/languages/bash/bashsupport_part.cpp index 7cfd9889..9f1be201 100644 --- a/languages/bash/bashsupport_part.cpp +++ b/languages/bash/bashsupport_part.cpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include #include #include @@ -22,25 +22,25 @@ #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include -typedef TDevGenericFactory BashSupportFactory; -static const TDevPluginInfo data("tdevbashsupport"); -K_EXPORT_COMPONENT_FACTORY( libtdevbashsupport, BashSupportFactory( data ) ) +typedef KDevGenericFactory BashSupportFactory; +static const KDevPluginInfo data("kdevbashsupport"); +K_EXPORT_COMPONENT_FACTORY( libkdevbashsupport, BashSupportFactory( data ) ) BashSupportPart::BashSupportPart(TQObject *parent, const char *name, const TQStringList& ) -: TDevLanguageSupport (&data, parent, name ? name : "BashSupportPart" ) +: KDevLanguageSupport (&data, parent, name ? name : "BashSupportPart" ) { setInstance(BashSupportFactory::instance()); - setXMLFile("tdevbashsupport.rc"); + setXMLFile("kdevbashsupport.rc"); TDEAction *action; action = new TDEAction( i18n("&Run"), "exec",Key_F9,this, TQT_SLOT(slotRun()),actionCollection(), "build_execute" ); @@ -182,12 +182,12 @@ void BashSupportPart::savedFile(const KURL &fileName) void BashSupportPart::startApplication(const TQString &program) { kdDebug() << "starting application" << program << endl; - if (TDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) + if (KDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) appFrontend->startAppCommand(TQString(), program, TRUE); } -TDevLanguageSupport::Features BashSupportPart::features() +KDevLanguageSupport::Features BashSupportPart::features() { return Features(Variables | Functions); } diff --git a/languages/bash/bashsupport_part.h b/languages/bash/bashsupport_part.h index b1fff80e..284e4f4c 100644 --- a/languages/bash/bashsupport_part.h +++ b/languages/bash/bashsupport_part.h @@ -3,8 +3,8 @@ */ -#ifndef __TDEVPART_BASHSUPPORT_H__ -#define __TDEVPART_BASHSUPPORT_H__ +#ifndef __KDEVPART_BASHSUPPORT_H__ +#define __KDEVPART_BASHSUPPORT_H__ #include @@ -13,8 +13,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -47,7 +47,7 @@ class BashCodeCompletion : TQObject KTextEditor::ViewCursorInterface *m_cursorInterface; }; -class BashSupportPart : public TDevLanguageSupport +class BashSupportPart : public KDevLanguageSupport { Q_OBJECT diff --git a/languages/bash/doc/CMakeLists.txt b/languages/bash/doc/CMakeLists.txt index 09ad4e33..0d2d2a83 100644 --- a/languages/bash/doc/CMakeLists.txt +++ b/languages/bash/doc/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES bash.toc bash_bugs.toc - DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation/tocs ) + DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation/tocs ) diff --git a/languages/bash/doc/Makefile.am b/languages/bash/doc/Makefile.am index ab1c4f52..1474d939 100644 --- a/languages/bash/doc/Makefile.am +++ b/languages/bash/doc/Makefile.am @@ -1,4 +1,4 @@ -tocdir = ${kde_datadir}/tdevdocumentation/tocs +tocdir = ${kde_datadir}/kdevdocumentation/tocs toc_DATA = bash.toc bash_bugs.toc #indexdir = ${kde_datadir}/devdoctreeview/indices diff --git a/languages/bash/kdevbashsupport.desktop b/languages/bash/kdevbashsupport.desktop new file mode 100644 index 00000000..91a98e3e --- /dev/null +++ b/languages/bash/kdevbashsupport.desktop @@ -0,0 +1,85 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Bash Support +Comment[ca]=Suport per a Bash +Comment[da]=Bash understøttelse +Comment[de]=Unterstützung für Bash +Comment[el]=Υποστήριξη Bash +Comment[es]=Soporte para Bash +Comment[et]=Bash'i toetus +Comment[eu]=Bash-en euskarria +Comment[fa]=پشتیبانی Bash +Comment[fr]=Prise en charge de BASH +Comment[ga]=Tacaíocht Bash +Comment[gl]=Soporte de Bash +Comment[hi]=बैश समर्थन +Comment[hu]=Bash-támogatás +Comment[is]=Bash stuðnigur +Comment[it]=Supporto per Bash +Comment[ja]=Bash サポート +Comment[nds]=Bash-Ünnerstütten +Comment[ne]=ब्यास समर्थन +Comment[nl]=Ondersteuning voor Bash +Comment[pl]=Obsługa bash-a +Comment[pt]=Suporte a Bash +Comment[pt_BR]=Suporte ao Bash +Comment[ru]=Поддержка языка Bash +Comment[sk]=Podpora Bash +Comment[sl]=Podpora bash +Comment[sr]=Bash подршка +Comment[sr@Latn]=Bash podrška +Comment[sv]=Bash-stöd +Comment[ta]=பாஷ் ஆதரவு +Comment[tg]=Ёри намудани забони Bash +Comment[tr]=Bash Desteği +Comment[zh_CN]=Bash 支持 +Comment[zh_TW]=Bash 支援 +Name=KDevBashSupport +Name[da]=TDevelop Bash-understøttelse +Name[de]=Unterstützung für Bash (TDevelop) +Name[hi]=के-डेव-बैश-समर्थन +Name[nds]=Bash-Ünnerstütten för TDevelop +Name[ne]=केडीई विकास ब्यास समर्थन +Name[pl]=KDevObsługaBasha +Name[sk]=KDevBashPodpora +Name[sv]=TDevelop Bash-stöd +Name[ta]=கெடெவ்பாஷ் ஆதரவு +Name[zh_TW]=TDevelop Bash 支援 +GenericName=Bash Support +GenericName[ca]=Suport per a Bash +GenericName[da]=Bash-understøttelse +GenericName[de]=Unterstützung für Bash +GenericName[el]=Υποστήριξη Bash +GenericName[es]=Soporte para Bash +GenericName[et]=Bash'i toetus +GenericName[eu]=Bash-en euskarria +GenericName[fa]=پشتیبانی Bash +GenericName[fr]=Prise en charge de BASH +GenericName[ga]=Tacaíocht Bash +GenericName[gl]=Soporte de Bash +GenericName[hi]=बैश समर्थन +GenericName[hu]=Bash-támogatás +GenericName[it]=Supporto Bash +GenericName[ja]=Bash サポート +GenericName[nds]=Ünnerstütten för Bash +GenericName[ne]=ब्यास समर्थन +GenericName[nl]=Ondersteuning voor Bash +GenericName[pl]=Obsługa bash-a +GenericName[pt]=Suporte de Bash +GenericName[pt_BR]=Suporte ao Bash +GenericName[ru]=Поддержка языка Bash +GenericName[sk]=Podpora Bash +GenericName[sl]=Podpora bash +GenericName[sr]=Bash подршка +GenericName[sr@Latn]=Bash podrška +GenericName[sv]=Bash-stöd +GenericName[ta]=பாஷ் ஆதரவு +GenericName[tg]=Ёри намудани забони Bash +GenericName[tr]=Bash Desteği +GenericName[zh_CN]=Bash 支持 +GenericName[zh_TW]=Bash 支援 +ServiceTypes=TDevelop/LanguageSupport +X-TDE-Library=libkdevbashsupport +X-TDevelop-Version=5 +X-TDevelop-Language=Bash diff --git a/languages/bash/tdevbashsupport.rc b/languages/bash/kdevbashsupport.rc similarity index 100% rename from languages/bash/tdevbashsupport.rc rename to languages/bash/kdevbashsupport.rc diff --git a/languages/bash/tdevbashsupport.desktop b/languages/bash/tdevbashsupport.desktop deleted file mode 100644 index 854201e7..00000000 --- a/languages/bash/tdevbashsupport.desktop +++ /dev/null @@ -1,85 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Bash Support -Comment[ca]=Suport per a Bash -Comment[da]=Bash understøttelse -Comment[de]=Unterstützung für Bash -Comment[el]=Υποστήριξη Bash -Comment[es]=Soporte para Bash -Comment[et]=Bash'i toetus -Comment[eu]=Bash-en euskarria -Comment[fa]=پشتیبانی Bash -Comment[fr]=Prise en charge de BASH -Comment[ga]=Tacaíocht Bash -Comment[gl]=Soporte de Bash -Comment[hi]=बैश समर्थन -Comment[hu]=Bash-támogatás -Comment[is]=Bash stuðnigur -Comment[it]=Supporto per Bash -Comment[ja]=Bash サポート -Comment[nds]=Bash-Ünnerstütten -Comment[ne]=ब्यास समर्थन -Comment[nl]=Ondersteuning voor Bash -Comment[pl]=Obsługa bash-a -Comment[pt]=Suporte a Bash -Comment[pt_BR]=Suporte ao Bash -Comment[ru]=Поддержка языка Bash -Comment[sk]=Podpora Bash -Comment[sl]=Podpora bash -Comment[sr]=Bash подршка -Comment[sr@Latn]=Bash podrška -Comment[sv]=Bash-stöd -Comment[ta]=பாஷ் ஆதரவு -Comment[tg]=Ёри намудани забони Bash -Comment[tr]=Bash Desteği -Comment[zh_CN]=Bash 支持 -Comment[zh_TW]=Bash 支援 -Name=KDevBashSupport -Name[da]=TDevelop Bash-understøttelse -Name[de]=Unterstützung für Bash (TDevelop) -Name[hi]=के-डेव-बैश-समर्थन -Name[nds]=Bash-Ünnerstütten för TDevelop -Name[ne]=केडीई विकास ब्यास समर्थन -Name[pl]=KDevObsługaBasha -Name[sk]=KDevBashPodpora -Name[sv]=TDevelop Bash-stöd -Name[ta]=கெடெவ்பாஷ் ஆதரவு -Name[zh_TW]=TDevelop Bash 支援 -GenericName=Bash Support -GenericName[ca]=Suport per a Bash -GenericName[da]=Bash-understøttelse -GenericName[de]=Unterstützung für Bash -GenericName[el]=Υποστήριξη Bash -GenericName[es]=Soporte para Bash -GenericName[et]=Bash'i toetus -GenericName[eu]=Bash-en euskarria -GenericName[fa]=پشتیبانی Bash -GenericName[fr]=Prise en charge de BASH -GenericName[ga]=Tacaíocht Bash -GenericName[gl]=Soporte de Bash -GenericName[hi]=बैश समर्थन -GenericName[hu]=Bash-támogatás -GenericName[it]=Supporto Bash -GenericName[ja]=Bash サポート -GenericName[nds]=Ünnerstütten för Bash -GenericName[ne]=ब्यास समर्थन -GenericName[nl]=Ondersteuning voor Bash -GenericName[pl]=Obsługa bash-a -GenericName[pt]=Suporte de Bash -GenericName[pt_BR]=Suporte ao Bash -GenericName[ru]=Поддержка языка Bash -GenericName[sk]=Podpora Bash -GenericName[sl]=Podpora bash -GenericName[sr]=Bash подршка -GenericName[sr@Latn]=Bash podrška -GenericName[sv]=Bash-stöd -GenericName[ta]=பாஷ் ஆதரவு -GenericName[tg]=Ёри намудани забони Bash -GenericName[tr]=Bash Desteği -GenericName[zh_CN]=Bash 支持 -GenericName[zh_TW]=Bash 支援 -ServiceTypes=TDevelop/LanguageSupport -X-TDE-Library=libtdevbashsupport -X-TDevelop-Version=5 -X-TDevelop-Language=Bash diff --git a/languages/cpp/CMakeLists.txt b/languages/cpp/CMakeLists.txt index 3da1e579..8d1c569a 100644 --- a/languages/cpp/CMakeLists.txt +++ b/languages/cpp/CMakeLists.txt @@ -45,17 +45,17 @@ link_directories( ##### other data ################################ -install( FILES tdevcppsupport.desktop tdevcsupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevcppsupport.rc DESTINATION ${DATA_INSTALL_DIR}/tdevcppsupport ) -install( FILES cpptemplates DESTINATION ${DATA_INSTALL_DIR}/tdevabbrev/templates ) -install( FILES configuration DESTINATION ${DATA_INSTALL_DIR}/tdevcppsupport ) +install( FILES kdevcppsupport.desktop kdevcsupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevcppsupport.rc DESTINATION ${DATA_INSTALL_DIR}/kdevcppsupport ) +install( FILES cpptemplates DESTINATION ${DATA_INSTALL_DIR}/kdevabbrev/templates ) +install( FILES configuration DESTINATION ${DATA_INSTALL_DIR}/kdevcppsupport ) -##### libtdevcppsupport (module) ################ +##### libkdevcppsupport (module) ################ -tde_add_kpart( libtdevcppsupport AUTOMOC +tde_add_kpart( libkdevcppsupport AUTOMOC SOURCES - TDevCppSupportIface.cpp TDevCppSupportIface.skel + KDevCppSupportIface.cpp KDevCppSupportIface.skel addattributedialog.cpp addattributedialogbase.ui addmethoddialog.cpp addmethoddialogbase.ui ast_utils.cpp backgroundparser.cpp ccconfigwidget.cpp @@ -72,7 +72,7 @@ tde_add_kpart( libtdevcppsupport AUTOMOC creategettersetterdialog.cpp creategettersetterdialog.h createpcsdialog.cpp createpcsdialogbase.ui doxydoc.cpp includefiles.cpp includepathresolver.cpp - tdevdriver.cpp problemreporter.cpp qtbuildconfig.cpp + kdevdriver.cpp problemreporter.cpp qtbuildconfig.cpp qtdesignercppintegration.cpp setuphelper.cpp simplecontext.cpp simpletype.cpp simpletypecatalog.cpp simpletypefunction.cpp simpletypenamespace.cpp @@ -80,7 +80,7 @@ tde_add_kpart( libtdevcppsupport AUTOMOC subclassingdlg.cpp subclassingdlgbase.ui tag_creator.cpp typedesc.cpp LINK - lang_interfaces-shared tdevcppparser-shared - tdevcatalog-shared designerintegration-shared + lang_interfaces-shared kdevcppparser-shared + kdevcatalog-shared designerintegration-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/languages/cpp/KDevCppSupportIface.cpp b/languages/cpp/KDevCppSupportIface.cpp new file mode 100644 index 00000000..793516ca --- /dev/null +++ b/languages/cpp/KDevCppSupportIface.cpp @@ -0,0 +1,24 @@ + +#include "KDevCppSupportIface.h" +#include "cppsupportpart.h" + +KDevCppSupportIface::KDevCppSupportIface( CppSupportPart* cppSupport ) + : TQObject( cppSupport ), DCOPObject( "KDevCppSupport" ), m_cppSupport( cppSupport ) +{ +} + +KDevCppSupportIface::~KDevCppSupportIface() +{ +} + +void KDevCppSupportIface::addClass() +{ + m_cppSupport->slotNewClass(); +} + +void KDevCppSupportIface::parseProject() +{ + m_cppSupport->parseProject(); +} + +#include "KDevCppSupportIface.moc" diff --git a/languages/cpp/KDevCppSupportIface.h b/languages/cpp/KDevCppSupportIface.h new file mode 100644 index 00000000..cbf8b4f9 --- /dev/null +++ b/languages/cpp/KDevCppSupportIface.h @@ -0,0 +1,28 @@ + +#ifndef KDEVCPPSUPPORTIFACE_H +#define KDEVCPPSUPPORTIFACE_H + +#include +#include + +class CppSupportPart; + +class KDevCppSupportIface : public TQObject, public DCOPObject +{ + Q_OBJECT +// + K_DCOP +public: + KDevCppSupportIface( CppSupportPart* cppSupport ); + ~KDevCppSupportIface(); + +k_dcop: + void addClass(); + void parseProject(); + +private: + CppSupportPart* m_cppSupport; +}; + +#endif +// kate: indent-mode csands; tab-width 4; diff --git a/languages/cpp/Makefile.am b/languages/cpp/Makefile.am index dc4974c3..7c506ac1 100644 --- a/languages/cpp/Makefile.am +++ b/languages/cpp/Makefile.am @@ -10,14 +10,14 @@ INCLUDES = -I$(top_srcdir)/languages/lib/designer_integration \ -I$(top_builddir)/languages/lib/designer_integration -I$(top_builddir)/bdb/build_unix -I$(top_srcdir)/bdb/include \ $(all_includes) -kde_module_LTLIBRARIES = libtdevcppsupport.la -libtdevcppsupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevcppsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/lib/catalog/libtdevcatalog.la $(top_builddir)/lib/cppparser/libtdevcppparser.la \ +kde_module_LTLIBRARIES = libkdevcppsupport.la +libkdevcppsupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevcppsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/lib/catalog/libkdevcatalog.la $(top_builddir)/lib/cppparser/libkdevcppparser.la \ $(top_builddir)/languages/lib/interfaces/liblang_interfaces.la \ - $(top_builddir)/languages/lib/designer_integration/libdesignerintegration.la $(top_builddir)/lib/interfaces/libtdevinterfaces.la + $(top_builddir)/languages/lib/designer_integration/libdesignerintegration.la $(top_builddir)/lib/interfaces/libkdevinterfaces.la -libtdevcppsupport_la_SOURCES = TDevCppSupportIface.cpp TDevCppSupportIface.skel \ +libkdevcppsupport_la_SOURCES = KDevCppSupportIface.cpp KDevCppSupportIface.skel \ addattributedialog.cpp addattributedialogbase.ui addmethoddialog.cpp addmethoddialogbase.ui \ ast_utils.cpp backgroundparser.cpp ccconfigwidget.cpp ccconfigwidgetbase.ui \ classgeneratorconfig.cpp classgeneratorconfigbase.ui codeinformationrepository.cpp \ @@ -27,7 +27,7 @@ libtdevcppsupport_la_SOURCES = TDevCppSupportIface.cpp TDevCppSupportIface.skel cppsupportfactory.cpp cppsupportpart.cpp creategettersetter.ui \ creategettersetterconfiguration.cpp creategettersetterconfiguration.h creategettersetterdialog.cpp \ creategettersetterdialog.h createpcsdialog.cpp createpcsdialogbase.ui doxydoc.cpp includefiles.cpp \ - includepathresolver.cpp tdevdriver.cpp problemreporter.cpp qtbuildconfig.cpp \ + includepathresolver.cpp kdevdriver.cpp problemreporter.cpp qtbuildconfig.cpp \ qtdesignercppintegration.cpp setuphelper.cpp simplecontext.cpp simpletype.cpp simpletypecatalog.cpp \ simpletypefunction.cpp simpletypenamespace.cpp store_walker.cpp storeconverter.cpp \ stringhelpers.cpp subclassingdlg.cpp subclassingdlgbase.ui tag_creator.cpp typedesc.cpp @@ -35,15 +35,15 @@ libtdevcppsupport_la_SOURCES = TDevCppSupportIface.cpp TDevCppSupportIface.skel METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevcppsupport.desktop tdevcsupport.desktop +service_DATA = kdevcppsupport.desktop kdevcsupport.desktop -rcdir = $(kde_datadir)/tdevcppsupport -rc_DATA = tdevcppsupport.rc +rcdir = $(kde_datadir)/kdevcppsupport +rc_DATA = kdevcppsupport.rc -templatedir = ${kde_datadir}/tdevabbrev/templates +templatedir = ${kde_datadir}/kdevabbrev/templates template_DATA = cpptemplates -configurationdir = ${kde_datadir}/tdevcppsupport +configurationdir = ${kde_datadir}/kdevcppsupport configuration_DATA = configuration AM_CXXFLAGS = -DAST_DEBUG @@ -51,8 +51,8 @@ AM_CXXFLAGS = -DAST_DEBUG #bin_PROGRAMS = r++ #r___LDFLAGS = $(all_libraries) #r___SOURCES = main.cpp -#r___DEPENDENCIES = libtdevcppsupport.la -#r___LDADD = libtdevcppsupport.la $(top_builddir)/lib/catalog/libtdevcatalog.la $(top_builddir)/lib/cppparser/libtdevcppparser.la +#r___DEPENDENCIES = libkdevcppsupport.la +#r___LDADD = libkdevcppsupport.la $(top_builddir)/lib/catalog/libkdevcatalog.la $(top_builddir)/lib/cppparser/libkdevcppparser.la noinst_HEADERS = cppevaluation.h cppimplementationwidget.h \ cppsplitheadersourceconfig.h declarationinfo.h expressioninfo.h includefiles.h includepathresolver.h \ qtdesignercppintegration.h setuphelper.h simplecontext.h simpletypecatalog.h simpletypefunction.h \ diff --git a/languages/cpp/README.dox b/languages/cpp/README.dox index 527e50ab..460c4cc7 100644 --- a/languages/cpp/README.dox +++ b/languages/cpp/README.dox @@ -4,7 +4,7 @@ Provides C/C++ language support for KDevelop. Well the first thing you should read is lib/catalog it contains the source of the persistant class store after that languages/cpp/tag_creator.* it is the component that stores the informations collected by the c++ parser into the PCS -then you can play with TDevPCSImporter the code of the dialog is in languages/cpp/createpcsdialog* and languages/cpp/pcsimporter/* +then you can play with KDevPCSImporter the code of the dialog is in languages/cpp/createpcsdialog* and languages/cpp/pcsimporter/* and of course lib/interfaces/kdevpcsimporter.* and if you want play with the c++ parser go to lib/cppparser/, the best is to start to read driver.* diff --git a/languages/cpp/TDevCppSupportIface.cpp b/languages/cpp/TDevCppSupportIface.cpp deleted file mode 100644 index 54977c4c..00000000 --- a/languages/cpp/TDevCppSupportIface.cpp +++ /dev/null @@ -1,24 +0,0 @@ - -#include "TDevCppSupportIface.h" -#include "cppsupportpart.h" - -TDevCppSupportIface::TDevCppSupportIface( CppSupportPart* cppSupport ) - : TQObject( cppSupport ), DCOPObject( "TDevCppSupport" ), m_cppSupport( cppSupport ) -{ -} - -TDevCppSupportIface::~TDevCppSupportIface() -{ -} - -void TDevCppSupportIface::addClass() -{ - m_cppSupport->slotNewClass(); -} - -void TDevCppSupportIface::parseProject() -{ - m_cppSupport->parseProject(); -} - -#include "TDevCppSupportIface.moc" diff --git a/languages/cpp/TDevCppSupportIface.h b/languages/cpp/TDevCppSupportIface.h deleted file mode 100644 index c94509ba..00000000 --- a/languages/cpp/TDevCppSupportIface.h +++ /dev/null @@ -1,28 +0,0 @@ - -#ifndef TDEVCPPSUPPORTIFACE_H -#define TDEVCPPSUPPORTIFACE_H - -#include -#include - -class CppSupportPart; - -class TDevCppSupportIface : public TQObject, public DCOPObject -{ - Q_OBJECT -// - K_DCOP -public: - TDevCppSupportIface( CppSupportPart* cppSupport ); - ~TDevCppSupportIface(); - -k_dcop: - void addClass(); - void parseProject(); - -private: - CppSupportPart* m_cppSupport; -}; - -#endif -// kate: indent-mode csands; tab-width 4; diff --git a/languages/cpp/addattributedialog.cpp b/languages/cpp/addattributedialog.cpp index 705678cd..6a9a1fbc 100644 --- a/languages/cpp/addattributedialog.cpp +++ b/languages/cpp/addattributedialog.cpp @@ -23,7 +23,7 @@ #include "backgroundparser.h" #include "cppsupport_utils.h" -#include +#include #include diff --git a/languages/cpp/addmethoddialog.cpp b/languages/cpp/addmethoddialog.cpp index f9e9c602..c9593844 100644 --- a/languages/cpp/addmethoddialog.cpp +++ b/languages/cpp/addmethoddialog.cpp @@ -24,8 +24,8 @@ #include "cppsupport_utils.h" #include "domutil.h" -#include -#include +#include +#include #include #include @@ -236,7 +236,7 @@ void AddMethodDialog::accept() TQFileInfo fileInfo( implementationFile ); if ( !TQFile::exists( fileInfo.absFilePath() ) ) { - if ( TDevCreateFile * createFileSupp = m_cppSupport->extension( "TDevelop/CreateFile" ) ) + if ( KDevCreateFile * createFileSupp = m_cppSupport->extension( "TDevelop/CreateFile" ) ) createFileSupp->createNewFile( fileInfo.extension(), fileInfo.dirPath( true ), fileInfo.baseName() ); } diff --git a/languages/cpp/app_templates/CMakeLists.txt b/languages/cpp/app_templates/CMakeLists.txt index 2ed5ec56..52229fc6 100644 --- a/languages/cpp/app_templates/CMakeLists.txt +++ b/languages/cpp/app_templates/CMakeLists.txt @@ -9,14 +9,14 @@ # ################################################# -add_subdirectory( tdeapp ) +add_subdirectory( kapp ) add_subdirectory( kpartapp ) add_subdirectory( kpartplugin ) add_subdirectory( tdecmodule ) add_subdirectory( kicker ) add_subdirectory( tdeioslave ) -add_subdirectory( tdevpart ) -add_subdirectory( tdevpart2 ) +add_subdirectory( kdevpart ) +add_subdirectory( kdevpart2 ) add_subdirectory( chello ) add_subdirectory( cpphello ) add_subdirectory( tdescreensaver ) @@ -32,11 +32,11 @@ add_subdirectory( khello2 ) add_subdirectory( kateplugin ) add_subdirectory( kateplugin2 ) add_subdirectory( qtopiaapp ) -add_subdirectory( tdedcop ) +add_subdirectory( kdedcop ) add_subdirectory( wxhello ) add_subdirectory( cppsdlhello ) add_subdirectory( tdeconfig35 ) -add_subdirectory( tdevlang ) +add_subdirectory( kdevlang ) add_subdirectory( noatunvisual ) add_subdirectory( noatunui ) add_subdirectory( kmod ) @@ -64,7 +64,7 @@ add_subdirectory( qmakeempty ) add_subdirectory( automakeempty ) add_subdirectory( makefileempty ) add_subdirectory( qtopia4app ) -add_subdirectory( tde4app ) +add_subdirectory( kde4app ) install( FILES c.appwizard @@ -75,5 +75,5 @@ install( FILES DESTINATION ${DATA_INSTALL_DIR}/tdevelop/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE ) install( FILES - tdecpp.appwizard + kdecpp.appwizard DESTINATION ${DATA_INSTALL_DIR}/tdevelop/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/TDECppIDE ) diff --git a/languages/cpp/app_templates/Makefile.am b/languages/cpp/app_templates/Makefile.am index e594ce4e..8350118d 100644 --- a/languages/cpp/app_templates/Makefile.am +++ b/languages/cpp/app_templates/Makefile.am @@ -1,4 +1,4 @@ -SUBDIRS = tdeapp kpartapp kpartplugin tdecmodule kicker tdeioslave tdevpart tdevpart2 chello cpphello tdescreensaver kofficepart chello_gba dcopservice konqnavpanel qmakesimple qmakeapp qt4makeapp khello khello2 kateplugin kateplugin2 qtopiaapp tdedcop wxhello cppsdlhello tdeconfig35 tdevlang noatunvisual noatunui kmod tdefileplugin clanlib opieapp opieapplet opieinput opiemenu opienet opietoday kxt gtk2mmapp cppcurseshello win32hello win32gui cmakesimple cmakesimplec cmakelibcpp cmakelibc kscons_kxt kscons_tdemdi qt4hello qmakeempty automakeempty makefileempty qtopia4app tde4app +SUBDIRS = kapp kpartapp kpartplugin tdecmodule kicker tdeioslave kdevpart kdevpart2 chello cpphello tdescreensaver kofficepart chello_gba dcopservice konqnavpanel qmakesimple qmakeapp qt4makeapp khello khello2 kateplugin kateplugin2 qtopiaapp kdedcop wxhello cppsdlhello tdeconfig35 kdevlang noatunvisual noatunui kmod tdefileplugin clanlib opieapp opieapplet opieinput opiemenu opienet opietoday kxt gtk2mmapp cppcurseshello win32hello win32gui cmakesimple cmakesimplec cmakelibcpp cmakelibc kscons_kxt kscons_tdemdi qt4hello qmakeempty automakeempty makefileempty qtopia4app kde4app profilescdir = $(kde_datadir)/tdevelop/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CIDE profilesc_DATA = c.appwizard @@ -6,5 +6,5 @@ profilesc_DATA = c.appwizard profilescppdir = $(kde_datadir)/tdevelop/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE profilescpp_DATA = cpp.appwizard -profilestdecppdir = $(kde_datadir)/tdevelop/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/TDECppIDE -profilestdecpp_DATA = tdecpp.appwizard +profileskdecppdir = $(kde_datadir)/tdevelop/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/TDECppIDE +profileskdecpp_DATA = kdecpp.appwizard diff --git a/languages/cpp/app_templates/automakeempty/CMakeLists.txt b/languages/cpp/app_templates/automakeempty/CMakeLists.txt index 8757cdce..6785106a 100644 --- a/languages/cpp/app_templates/automakeempty/CMakeLists.txt +++ b/languages/cpp/app_templates/automakeempty/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( automakeempty.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/automakeempty.tar.gz automakeempty.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - automakeempty.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + automakeempty.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/automakeempty/Makefile.am b/languages/cpp/app_templates/automakeempty/Makefile.am index 8c6ceb16..06f9a94c 100644 --- a/languages/cpp/app_templates/automakeempty/Makefile.am +++ b/languages/cpp/app_templates/automakeempty/Makefile.am @@ -3,10 +3,10 @@ dataFiles = automakeempty-Makefile.am automakeempty-Makefile.cvs \ templateName = automakeempty ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/automakeempty/app.tdevelop b/languages/cpp/app_templates/automakeempty/app.tdevelop index f30a3dfc..ab12095d 100644 --- a/languages/cpp/app_templates/automakeempty/app.tdevelop +++ b/languages/cpp/app_templates/automakeempty/app.tdevelop @@ -11,7 +11,7 @@ Code - + @@ -33,8 +33,8 @@ -O0 -g3 - - + + ada ada_bugs_gcc @@ -79,23 +79,23 @@ TDE Libraries (Doxygen) - - + + - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/automakeempty/automakeempty.kdevtemplate b/languages/cpp/app_templates/automakeempty/automakeempty.kdevtemplate new file mode 100644 index 00000000..a1ced086 --- /dev/null +++ b/languages/cpp/app_templates/automakeempty/automakeempty.kdevtemplate @@ -0,0 +1,99 @@ +# TDE Config File +[General] +Name=Empty Autotools Template +Name[ca]=Plantilla Autotools buida +Name[da]=Tom Autotools-skabelon +Name[de]=Leere Autotools-Vorlage +Name[el]=Κενό πρότυπο των Autotools +Name[es]=Plantilla Autotools vacía +Name[et]=Tühi autotoolsi mall +Name[hu]=Üres Autotools sablon +Name[it]=Modello di autotools vuoto +Name[nds]=Leddig Vörlaag för Automake un sien Kanuten +Name[nl]=Leeg Autotools-sjabloon +Name[pl]=Pusty szablon Autotools +Name[pt]=Modelo de Autotools Vazio +Name[pt_BR]=Modelo de Autotools Vazio +Name[ru]=Пустой шаблон autotools +Name[sk]=Prázdna šablóna Autotools +Name[sr]=Празан шаблон Autotools-а +Name[sr@Latn]=Prazan šablon Autotools-a +Name[sv]=Tom mall för Autotools +Name[zh_TW]=空的 Autotools 樣板 +Icon=automakeempty.png +Category=C++/Automake project +Comment=Generate an empty Automake based application +Comment[ca]=Genera una aplicació buida basada en Automake +Comment[da]=Opretter et tomt Automake-baseret program +Comment[de]=Erstellt eine leere auf Automake basierende Anwendung +Comment[el]=Δημιουργία μίας κενής εφαρμογής βασισμένης στο Automake +Comment[es]=Genera una aplicación vacía basada en Automake +Comment[et]=Tühja rakenduse loomine Automake'i põhjal +Comment[hu]=Létrehoz egy üres Automake-alapú alkalmazást +Comment[it]=Genera un'applicazione basata su un Automake vuoto +Comment[nds]=Stellt en leddig Programm op, dat op Automake opbuut +Comment[nl]=Genereer een leeg op Automake gebaseerd programma +Comment[pl]=Generuje pusty program używający Automake +Comment[pt]=Gera uma aplicação vazia baseada no Automake +Comment[pt_BR]=Gera uma aplicação vazia baseada no Automake +Comment[ru]=Создать пустое приложение, использующее Automake +Comment[sk]=Vygeneruje prázdnu aplikáciu založenú na Automake +Comment[sr]=Прави празан програм на основу Automake-а +Comment[sr@Latn]=Pravi prazan program na osnovu Automake-a +Comment[sv]=Skapar ett tomt Automake-baserat program +Comment[zh_TW]=產生一個空的使用 Automake 的應用程式 +FileTemplates=h,CStyle,cpp,CStyle +Archive=automakeempty.tar.gz + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[INCADMIN] +Type=include +File=%{tdevelop}/template-common/incadmin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE2] +Type=install +Source=%{src}/automakeempty-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE3] +Type=install +Source=%{src}/automakeempty-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE4] +Type=install +Source=%{src}/configure.in +Dest=%{dest}/configure.in + +[MSG] +Type=message +Comment=An Automake based application was created in %{dest} +Comment[ca]=S'ha creat una aplicació basada en Automake en %{dest} +Comment[da]=Et Automake-baseret program blev oprettet i %{dest} +Comment[de]=Eine auf Automake basierende Anwendung wurde in %{dest} erstellt. +Comment[el]=Μία εφαρμογή βασισμένη στο Automake δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación basada en Automake ha sido creada en %{dest} +Comment[et]=Rakendus Automake'i põhjal loodi asukohta %{dest} +Comment[hu]=Létrejött egy Automake-alapú alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione basata su automake in %{dest} +Comment[nds]=In %{dest} wöör en op Automake opbuut Programm opstellt +Comment[nl]=Een Automake-gebaseerd programma is aangemaakt in %{dest} +Comment[pl]=Program używający Automake został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação baseada no Automake em %{dest} +Comment[pt_BR]=Foi criada uma aplicação baseada no Automake em %{dest} +Comment[ru]=Использующее Automake приложение создано в %{dest} +Comment[sk]=Aplikácia založená na Automake bola vytvorená v %{dest} +Comment[sr]=Програм на основи Automake-а направљен је у %{dest} +Comment[sr@Latn]=Program na osnovi Automake-a napravljen je u %{dest} +Comment[sv]=Ett Automake-baserat program skapades i %{dest} +Comment[zh_TW]=一個以 Automake 為基礎的應用程式已建立於 %{dest} + diff --git a/languages/cpp/app_templates/automakeempty/automakeempty.tdevtemplate b/languages/cpp/app_templates/automakeempty/automakeempty.tdevtemplate deleted file mode 100644 index 6581b4fa..00000000 --- a/languages/cpp/app_templates/automakeempty/automakeempty.tdevtemplate +++ /dev/null @@ -1,99 +0,0 @@ -# TDE Config File -[General] -Name=Empty Autotools Template -Name[ca]=Plantilla Autotools buida -Name[da]=Tom Autotools-skabelon -Name[de]=Leere Autotools-Vorlage -Name[el]=Κενό πρότυπο των Autotools -Name[es]=Plantilla Autotools vacía -Name[et]=Tühi autotoolsi mall -Name[hu]=Üres Autotools sablon -Name[it]=Modello di autotools vuoto -Name[nds]=Leddig Vörlaag för Automake un sien Kanuten -Name[nl]=Leeg Autotools-sjabloon -Name[pl]=Pusty szablon Autotools -Name[pt]=Modelo de Autotools Vazio -Name[pt_BR]=Modelo de Autotools Vazio -Name[ru]=Пустой шаблон autotools -Name[sk]=Prázdna šablóna Autotools -Name[sr]=Празан шаблон Autotools-а -Name[sr@Latn]=Prazan šablon Autotools-a -Name[sv]=Tom mall för Autotools -Name[zh_TW]=空的 Autotools 樣板 -Icon=automakeempty.png -Category=C++/Automake project -Comment=Generate an empty Automake based application -Comment[ca]=Genera una aplicació buida basada en Automake -Comment[da]=Opretter et tomt Automake-baseret program -Comment[de]=Erstellt eine leere auf Automake basierende Anwendung -Comment[el]=Δημιουργία μίας κενής εφαρμογής βασισμένης στο Automake -Comment[es]=Genera una aplicación vacía basada en Automake -Comment[et]=Tühja rakenduse loomine Automake'i põhjal -Comment[hu]=Létrehoz egy üres Automake-alapú alkalmazást -Comment[it]=Genera un'applicazione basata su un Automake vuoto -Comment[nds]=Stellt en leddig Programm op, dat op Automake opbuut -Comment[nl]=Genereer een leeg op Automake gebaseerd programma -Comment[pl]=Generuje pusty program używający Automake -Comment[pt]=Gera uma aplicação vazia baseada no Automake -Comment[pt_BR]=Gera uma aplicação vazia baseada no Automake -Comment[ru]=Создать пустое приложение, использующее Automake -Comment[sk]=Vygeneruje prázdnu aplikáciu založenú na Automake -Comment[sr]=Прави празан програм на основу Automake-а -Comment[sr@Latn]=Pravi prazan program na osnovu Automake-a -Comment[sv]=Skapar ett tomt Automake-baserat program -Comment[zh_TW]=產生一個空的使用 Automake 的應用程式 -FileTemplates=h,CStyle,cpp,CStyle -Archive=automakeempty.tar.gz - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[INCADMIN] -Type=include -File=%{tdevelop}/template-common/incadmin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE2] -Type=install -Source=%{src}/automakeempty-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE3] -Type=install -Source=%{src}/automakeempty-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE4] -Type=install -Source=%{src}/configure.in -Dest=%{dest}/configure.in - -[MSG] -Type=message -Comment=An Automake based application was created in %{dest} -Comment[ca]=S'ha creat una aplicació basada en Automake en %{dest} -Comment[da]=Et Automake-baseret program blev oprettet i %{dest} -Comment[de]=Eine auf Automake basierende Anwendung wurde in %{dest} erstellt. -Comment[el]=Μία εφαρμογή βασισμένη στο Automake δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación basada en Automake ha sido creada en %{dest} -Comment[et]=Rakendus Automake'i põhjal loodi asukohta %{dest} -Comment[hu]=Létrejött egy Automake-alapú alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione basata su automake in %{dest} -Comment[nds]=In %{dest} wöör en op Automake opbuut Programm opstellt -Comment[nl]=Een Automake-gebaseerd programma is aangemaakt in %{dest} -Comment[pl]=Program używający Automake został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação baseada no Automake em %{dest} -Comment[pt_BR]=Foi criada uma aplicação baseada no Automake em %{dest} -Comment[ru]=Использующее Automake приложение создано в %{dest} -Comment[sk]=Aplikácia založená na Automake bola vytvorená v %{dest} -Comment[sr]=Програм на основи Automake-а направљен је у %{dest} -Comment[sr@Latn]=Program na osnovi Automake-a napravljen je u %{dest} -Comment[sv]=Ett Automake-baserat program skapades i %{dest} -Comment[zh_TW]=一個以 Automake 為基礎的應用程式已建立於 %{dest} - diff --git a/languages/cpp/app_templates/chello/CMakeLists.txt b/languages/cpp/app_templates/chello/CMakeLists.txt index 9df341e8..5d792072 100644 --- a/languages/cpp/app_templates/chello/CMakeLists.txt +++ b/languages/cpp/app_templates/chello/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( chello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/chello.tar.gz chello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - chello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + chello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/chello/Makefile.am b/languages/cpp/app_templates/chello/Makefile.am index 3c77d4fb..0a51e6fd 100644 --- a/languages/cpp/app_templates/chello/Makefile.am +++ b/languages/cpp/app_templates/chello/Makefile.am @@ -4,10 +4,10 @@ dataFiles = main.c src-Makefile.am c-Makefile.am c-Makefile.cvs \ templateName = chello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} ${dataFiles} ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/chello/app.tdevelop b/languages/cpp/app_templates/chello/app.tdevelop index 825cf9a3..41866d9f 100644 --- a/languages/cpp/app_templates/chello/app.tdevelop +++ b/languages/cpp/app_templates/chello/app.tdevelop @@ -11,7 +11,7 @@ Code - + src/%{APPNAMELC} debug @@ -37,8 +37,8 @@ -O0 -g3 %{CFLAGS} - - + + ada ada_bugs_gcc @@ -85,23 +85,23 @@ TDE Libraries (Doxygen) - - + + - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/chello/chello.kdevtemplate b/languages/cpp/app_templates/chello/chello.kdevtemplate new file mode 100644 index 00000000..6dc5fb77 --- /dev/null +++ b/languages/cpp/app_templates/chello/chello.kdevtemplate @@ -0,0 +1,253 @@ +# TDE Config File +[General] +Name=Simple Hello world program +Name[ca]=Simple programa Hello world +Name[da]=Simpelt Goddag verden program +Name[de]=Ein einfaches "Hello World"-Programm +Name[el]=Απλό πρόγραμμα Γεια σου Κόσμε +Name[es]=Programa «Hola mundo» sencillo +Name[et]=Lihtne "Tere, maailm" programm +Name[eu]="Kaixo mundua" programa sinplea +Name[fa]=برنامۀ سادۀ Hello world +Name[fr]=Programme « Bonjour monde » simple +Name[ga]=Ríomhchlár simplí "Hello World" +Name[gl]=Programa sinxelo Ola mundo +Name[hu]=Egyszerű Hello world program +Name[it]=Semplice programma di "Hello world" +Name[ja]=簡単な Hello world プログラム +Name[ms]=Program Hello World mudah +Name[nds]=En eenfach "Moin Welt"-Programm +Name[ne]=साधारण हेल्लो वोल्ड कार्यक्रम +Name[nl]=Eenvoudig 'Hello World' programma +Name[pl]=Prosty program witaj świecie +Name[pt]=Programa simples Olá Mundo +Name[pt_BR]=Programa simples Olá Mundo +Name[ru]=Простая программа Hello world +Name[sk]=Jednoduchý "Ahoj svet" program +Name[sl]=Preprost program Hello world +Name[sr]=Једноставан „Здраво свете“ програм +Name[sr@Latn]=Jednostavan „Zdravo svete“ program +Name[sv]=Enkelt Hello world-program +Name[tr]=Basit Merhaba dünya programı +Name[zh_CN]=简单的 Hello world 程序 +Name[zh_TW]=簡單的 Hello world 程式 +Icon=chello.png +Category=C +Comment=Generates a simple Hello world program in C +Comment[ca]=Genera un simple programa de Hello world en C +Comment[da]=Genererer et simpelt Goddag verden program i C +Comment[de]=Erstellt ein einfaches "Hello World"-Programm in C +Comment[el]=Δημιουργεί ένα απλό πρόγραμμα Γεια σου Κόσμε σε C +Comment[es]=Genera un sencillo programa «Hola mundo» en C +Comment[et]=Lihtsa "Tere, maailm" programmi loomine C-s +Comment[eu]="Kaixo mundua" programa sinplea bat sortzen du C lengoaian +Comment[fa]=یک برنامۀ سادۀ Hello world در سی تولید می‌کند +Comment[fr]=Génère un programme « Bonjour monde » simple en C +Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí "Hello World" i C +Comment[gl]=Xera un programa sinxelo Ola mundo en C +Comment[hu]=Létrehoz egy egyszerű Hello world programot C nyelven +Comment[it]=Genera un semplice programma di "Hello world" in C +Comment[ja]=簡単な Hello world プログラムを C で記述します +Comment[nds]=Stellt en eenfach "Moin Welt"-Programm in C op +Comment[ne]=सी मा साधारण हेल्लो वोल्ड कार्यक्रम उत्पन्न गर्दछ +Comment[nl]=Genereert een eenvoudig Hello World programma in C +Comment[pl]=Tworzy prosty program 'Witaj świecie' w języku C +Comment[pt]=Gera um programa simples de Olá mundo em C +Comment[pt_BR]=Gera um programa simples de Olá mundo em C +Comment[ru]=Создание простого приложения Hello world на C +Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program v C +Comment[sl]=Ustvari preprost program Hello world v C-ju +Comment[sr]=Прави једноставан „Здраво свете“ програм у C-у +Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program u C-u +Comment[sv]=Skapar ett enkelt Hello world-program i C +Comment[tr]=C'de basit bir Merhaba Dünya programı yaratır. +Comment[zh_CN]=生成 C 语言的 Hello world 程序 +Comment[zh_TW]=產生 C 語言的 Hello world 程式 +FileTemplates=h,CStyle,c,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.c +Archive=chello.tar.gz + +[LIBS] +Type = value +ValueType=QString +Value= OPT_LIBS +Comment= Optional libraries to link to. +Comment[ca]= Biblioteques opcionals per enllaçar. +Comment[da]= Mulige biblioteker at linke til. +Comment[de]= Optionale Bibliotheken, die eingebunden werden sollen. +Comment[el]= Προαιρετικές βιβλιοθήκες για σύνδεση με αυτές. +Comment[es]=Bibliotecas opcionales para enlazar. +Comment[et]=Täiendavad lingitavad teegid. +Comment[eu]= Estekatzeko aukerako liburutegiak. +Comment[fa]= کتابخانه‌های اختیاری برای پیوند کردن. +Comment[fr]=Bibliothèques optionnelles à lier. +Comment[ga]= Comhadlanna roghnacha ar féidir nascadh leo. +Comment[gl]= Librerías opcionais a enlazar. +Comment[hu]=Linkelési programkönyvtárak (opcionális). +Comment[it]= librerie opzionali da collegare. +Comment[ja]=リンクする他のライブラリ +Comment[nds]= Optschonaal Bibliotheken, na de linkt warrn schall +Comment[ne]= लिङ्क सिर्जना गर्न वैकल्पिक लाइब्रेरी +Comment[nl]=Optionele bibliotheken om naar te linken +Comment[pl]= Opcjonalne biblioteki, z którymi ma być łączony. +Comment[pt]= Bibliotecas opcionais com as quais compilar. +Comment[pt_BR]= Bibliotecas opcionais com as quais compilar. +Comment[ru]=Дополнительные библиотеки для сборки. +Comment[sk]=Voliteľné knižnice pre linkovanie. +Comment[sl]=Dodatne knjižnice, do katerih se naj poveže. +Comment[sr]=Опционе библиотеке за повезивање. +Comment[sr@Latn]=Opcione biblioteke za povezivanje. +Comment[sv]= Valfria bibliotek att länka till. +Comment[tr]=Bağlanılacak isteğe bağlı kütüphaneler. +Comment[zh_CN]=可选的链接库。 +Comment[zh_TW]=要連結的函式庫 +Default= -lm + +[INCLUDES] +Type = value +ValueType=QString +Value= OPT_INCS +Comment= Optional include path. +Comment[ca]= Ruta opcional per a incloure. +Comment[da]= Mulig include-sti. +Comment[de]= Optionaler Include-Pfad. +Comment[el]= Προαιρετική διαδρομή ενσωμάτωσης. +Comment[es]=Ruta opcional para incluir. +Comment[et]=Täiendavate päisefailide asukoht. +Comment[eu]= Aukerako goiburuen bide-izena. +Comment[fa]=include path اختیاری. +Comment[fr]=Chemin d'inclusion optionnel. +Comment[ga]= Conair roghnach ceanntásca. +Comment[gl]= Ruta opcional de cabeceiras. +Comment[hu]=Include fájlok könyvtárai (opcionális). +Comment[it]= percorso opzionale di inclusione. +Comment[ja]=ヘッダファイルを読み込む他のパス +Comment[nds]= Optschonaal Koppdatei-Padd +Comment[ne]= मार्ग सहितको विकल्प +Comment[nl]=Optioneel Include-pad +Comment[pl]= Opcjonalna ścieżka do plików dołączanych. +Comment[pt]= Localização opcional dos ficheiros de inclusão. +Comment[pt_BR]= Localização opcional dos ficheiros de inclusão. +Comment[ru]=Дополнительные пути для заголовочных файлов. +Comment[sk]=Voliteľná cesta pre include. +Comment[sl]=Neobvezna pot za vstavke. +Comment[sr]=Опциона путања за укључивања. +Comment[sr@Latn]=Opciona putanja za uključivanja. +Comment[sv]= Valfri sökväg till deklarationsfiler. +Comment[tr]=İsteğe bağlı include yolu. +Comment[zh_CN]=可选的包含路径。 +Comment[zh_TW]=引入檔路徑 +Default= -I/usr/include + +[CFLAGS] +Type = value +ValueType=QString +Value= CFLAGS +Comment= Optional CFLAGS to define in the makefile. +Comment[ca]= CFLAGS opcionals per a definir en el fitxer de make. +Comment[da]= Mulige CFLAGS at definere i makefile. +Comment[de]= Optionale CFLAGS, die im Makefile definiert werden. +Comment[el]= Προαιρετικές CFLAGS για ορισμό μέσα στο makefile. +Comment[es]=CFLAGS opcionales a definir en el makefile. +Comment[et]=Täiendavad Makefile'is defineeritavad CFLAGS'id. +Comment[eu]= Aukerako makefile-ean definitzeko CFLAGS-ak. +Comment[fa]= CFLAGS اختیاری برای تعریف در makefile. +Comment[fr]=CFLAGS optionnels à définir dans le Makefile. +Comment[ga]= CFLAGS roghnacha le socrú sa makefile. +Comment[gl]= CFLAGS opcionais a definir no makefile. +Comment[hu]=A Makefile-hoz definiálható CFLAGS információ (opcionális). +Comment[it]= CFLAGS opzionale da definire nel makefile. +Comment[ja]=Makefile に定義する他の CFLAGS +Comment[nds]= Optschonaal CFLAGS, de in de "Make"-Datei fastleggt warrt. +Comment[ne]= मेकफाइलमा परिभाषित गर्न CFLAGS विकल्प +Comment[nl]=Optionele CFLAGS om te definiëren in het makefile. +Comment[pl]= Opcjonalna wartość zmiennej CFLAGS do zdefiniowania w pliku makefile. +Comment[pt]= CFLAGS opcionais a definir na Makefile. +Comment[pt_BR]= CFLAGS opcionais a definir na Makefile. +Comment[ru]=Дополнительные параметры CFLAGS для Makefile. +Comment[sk]=Voliteľné nastavenie CFLAGS v makefile. +Comment[sl]=Dodaten CFLAGS za definicijo v datoteki makefile. +Comment[sr]=Опциона CFLAGS дефинисана у справифајлу. +Comment[sr@Latn]=Opciona CFLAGS definisana u spravifajlu. +Comment[sv]= Valfria CFLAGS att definiera i byggfilen. +Comment[tr]=Makefile'da tanımlanacak isteğe bağlı CFLAGS değerleri +Comment[zh_CN]=在 Makefile 中定义的可选 CFLAGS。 +Comment[zh_TW]=makefile 中定義的 CFLAGS +Default= + +[MGS] +Type=message +Comment=A simple C project was created in %{dest}. +Comment[ca]=A simple projecte en C ha estat creat en %{dest}. +Comment[da]=Et simpelt C projekt blev oprette i %{dest}. +Comment[de]=Ein einfaches C-Project wurde in %{dest} erstellt. +Comment[el]=Ένα απλό έργο C δημιουργήθηκε στο %{dest}. +Comment[es]=Un sencillo proyecto de C ha sido creado en %{dest}. +Comment[et]=Lihtne C-projekt loodi asukohta %{dest}. +Comment[eu]=C proiektu sinple bat sortu da hemen: %{dest}. +Comment[fa]=یک پروژۀ سادۀ سی در %{dest} ایجاد شد. +Comment[fr]=Un projet en langage C simple a été créé dans %{dest}. +Comment[ga]=Cruthaíodh tionscadal simplí C i %{dest} +Comment[gl]=Creouse un proxecto sinxelo en C en %{dest}. +Comment[hu]=Létrejött egy egyszerű C-projekt itt: %{dest}. +Comment[it]=È stato creato un semplice progetto C in %{dest}. +Comment[ja]=簡単な C プロジェクトを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en eenfach C-Projekt opstellt. +Comment[ne]=एउटा साधारण सी परियोजना %{dest} मा सिर्जना गरियो +Comment[nl]=Een eenvoudig C-project is aangemaakt in %{dest}. +Comment[pl]=Prosty projekt w języku C został utworzony w %{dest}. +Comment[pt]=Foi criado um programa simples "Olá mundo" em C em %{dest}. +Comment[pt_BR]=Foi criado um programa simples "Olá mundo" em C em %{dest}. +Comment[ru]=Простое приложение "Hello world" на C создано в %{dest} +Comment[sk]=Jednoduchý C projekt bol vytvorený v %{dest}. +Comment[sl]=Preprost projekt v C-ju je bil ustvarjen v %{dest}. +Comment[sr]=Једноставан пројекат у C-у направљен је у %{dest}. +Comment[sr@Latn]=Jednostavan projekat u C-u napravljen je u %{dest}. +Comment[sv]=Ett enkelt C-projekt skapades i %{dest}. +Comment[tr]=Basit bir C projesi %{dest} içinde oluşturuldu. +Comment[zh_CN]=在 %{dest} 中创建了简单的 C 工程。 +Comment[zh_TW]=一個簡單的 C 專案已建立在 %{dest}。 +Archive=chello.tar.gz + +[INCADMIN] +Type=include +File=%{tdevelop}/template-common/incadmin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/c-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE3] +Type=install +Source=%{src}/c-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE4] +Type=install +Source=%{src}/configure.in +Dest=%{dest}/configure.in + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE5] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE6] +Type=install +Source=%{src}/main.c +Dest=%{dest}/src/%{APPNAMELC}.c + diff --git a/languages/cpp/app_templates/chello/chello.tdevtemplate b/languages/cpp/app_templates/chello/chello.tdevtemplate deleted file mode 100644 index 1368d851..00000000 --- a/languages/cpp/app_templates/chello/chello.tdevtemplate +++ /dev/null @@ -1,253 +0,0 @@ -# TDE Config File -[General] -Name=Simple Hello world program -Name[ca]=Simple programa Hello world -Name[da]=Simpelt Goddag verden program -Name[de]=Ein einfaches "Hello World"-Programm -Name[el]=Απλό πρόγραμμα Γεια σου Κόσμε -Name[es]=Programa «Hola mundo» sencillo -Name[et]=Lihtne "Tere, maailm" programm -Name[eu]="Kaixo mundua" programa sinplea -Name[fa]=برنامۀ سادۀ Hello world -Name[fr]=Programme « Bonjour monde » simple -Name[ga]=Ríomhchlár simplí "Hello World" -Name[gl]=Programa sinxelo Ola mundo -Name[hu]=Egyszerű Hello world program -Name[it]=Semplice programma di "Hello world" -Name[ja]=簡単な Hello world プログラム -Name[ms]=Program Hello World mudah -Name[nds]=En eenfach "Moin Welt"-Programm -Name[ne]=साधारण हेल्लो वोल्ड कार्यक्रम -Name[nl]=Eenvoudig 'Hello World' programma -Name[pl]=Prosty program witaj świecie -Name[pt]=Programa simples Olá Mundo -Name[pt_BR]=Programa simples Olá Mundo -Name[ru]=Простая программа Hello world -Name[sk]=Jednoduchý "Ahoj svet" program -Name[sl]=Preprost program Hello world -Name[sr]=Једноставан „Здраво свете“ програм -Name[sr@Latn]=Jednostavan „Zdravo svete“ program -Name[sv]=Enkelt Hello world-program -Name[tr]=Basit Merhaba dünya programı -Name[zh_CN]=简单的 Hello world 程序 -Name[zh_TW]=簡單的 Hello world 程式 -Icon=chello.png -Category=C -Comment=Generates a simple Hello world program in C -Comment[ca]=Genera un simple programa de Hello world en C -Comment[da]=Genererer et simpelt Goddag verden program i C -Comment[de]=Erstellt ein einfaches "Hello World"-Programm in C -Comment[el]=Δημιουργεί ένα απλό πρόγραμμα Γεια σου Κόσμε σε C -Comment[es]=Genera un sencillo programa «Hola mundo» en C -Comment[et]=Lihtsa "Tere, maailm" programmi loomine C-s -Comment[eu]="Kaixo mundua" programa sinplea bat sortzen du C lengoaian -Comment[fa]=یک برنامۀ سادۀ Hello world در سی تولید می‌کند -Comment[fr]=Génère un programme « Bonjour monde » simple en C -Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí "Hello World" i C -Comment[gl]=Xera un programa sinxelo Ola mundo en C -Comment[hu]=Létrehoz egy egyszerű Hello world programot C nyelven -Comment[it]=Genera un semplice programma di "Hello world" in C -Comment[ja]=簡単な Hello world プログラムを C で記述します -Comment[nds]=Stellt en eenfach "Moin Welt"-Programm in C op -Comment[ne]=सी मा साधारण हेल्लो वोल्ड कार्यक्रम उत्पन्न गर्दछ -Comment[nl]=Genereert een eenvoudig Hello World programma in C -Comment[pl]=Tworzy prosty program 'Witaj świecie' w języku C -Comment[pt]=Gera um programa simples de Olá mundo em C -Comment[pt_BR]=Gera um programa simples de Olá mundo em C -Comment[ru]=Создание простого приложения Hello world на C -Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program v C -Comment[sl]=Ustvari preprost program Hello world v C-ju -Comment[sr]=Прави једноставан „Здраво свете“ програм у C-у -Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program u C-u -Comment[sv]=Skapar ett enkelt Hello world-program i C -Comment[tr]=C'de basit bir Merhaba Dünya programı yaratır. -Comment[zh_CN]=生成 C 语言的 Hello world 程序 -Comment[zh_TW]=產生 C 語言的 Hello world 程式 -FileTemplates=h,CStyle,c,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.c -Archive=chello.tar.gz - -[LIBS] -Type = value -ValueType=QString -Value= OPT_LIBS -Comment= Optional libraries to link to. -Comment[ca]= Biblioteques opcionals per enllaçar. -Comment[da]= Mulige biblioteker at linke til. -Comment[de]= Optionale Bibliotheken, die eingebunden werden sollen. -Comment[el]= Προαιρετικές βιβλιοθήκες για σύνδεση με αυτές. -Comment[es]=Bibliotecas opcionales para enlazar. -Comment[et]=Täiendavad lingitavad teegid. -Comment[eu]= Estekatzeko aukerako liburutegiak. -Comment[fa]= کتابخانه‌های اختیاری برای پیوند کردن. -Comment[fr]=Bibliothèques optionnelles à lier. -Comment[ga]= Comhadlanna roghnacha ar féidir nascadh leo. -Comment[gl]= Librerías opcionais a enlazar. -Comment[hu]=Linkelési programkönyvtárak (opcionális). -Comment[it]= librerie opzionali da collegare. -Comment[ja]=リンクする他のライブラリ -Comment[nds]= Optschonaal Bibliotheken, na de linkt warrn schall -Comment[ne]= लिङ्क सिर्जना गर्न वैकल्पिक लाइब्रेरी -Comment[nl]=Optionele bibliotheken om naar te linken -Comment[pl]= Opcjonalne biblioteki, z którymi ma być łączony. -Comment[pt]= Bibliotecas opcionais com as quais compilar. -Comment[pt_BR]= Bibliotecas opcionais com as quais compilar. -Comment[ru]=Дополнительные библиотеки для сборки. -Comment[sk]=Voliteľné knižnice pre linkovanie. -Comment[sl]=Dodatne knjižnice, do katerih se naj poveže. -Comment[sr]=Опционе библиотеке за повезивање. -Comment[sr@Latn]=Opcione biblioteke za povezivanje. -Comment[sv]= Valfria bibliotek att länka till. -Comment[tr]=Bağlanılacak isteğe bağlı kütüphaneler. -Comment[zh_CN]=可选的链接库。 -Comment[zh_TW]=要連結的函式庫 -Default= -lm - -[INCLUDES] -Type = value -ValueType=QString -Value= OPT_INCS -Comment= Optional include path. -Comment[ca]= Ruta opcional per a incloure. -Comment[da]= Mulig include-sti. -Comment[de]= Optionaler Include-Pfad. -Comment[el]= Προαιρετική διαδρομή ενσωμάτωσης. -Comment[es]=Ruta opcional para incluir. -Comment[et]=Täiendavate päisefailide asukoht. -Comment[eu]= Aukerako goiburuen bide-izena. -Comment[fa]=include path اختیاری. -Comment[fr]=Chemin d'inclusion optionnel. -Comment[ga]= Conair roghnach ceanntásca. -Comment[gl]= Ruta opcional de cabeceiras. -Comment[hu]=Include fájlok könyvtárai (opcionális). -Comment[it]= percorso opzionale di inclusione. -Comment[ja]=ヘッダファイルを読み込む他のパス -Comment[nds]= Optschonaal Koppdatei-Padd -Comment[ne]= मार्ग सहितको विकल्प -Comment[nl]=Optioneel Include-pad -Comment[pl]= Opcjonalna ścieżka do plików dołączanych. -Comment[pt]= Localização opcional dos ficheiros de inclusão. -Comment[pt_BR]= Localização opcional dos ficheiros de inclusão. -Comment[ru]=Дополнительные пути для заголовочных файлов. -Comment[sk]=Voliteľná cesta pre include. -Comment[sl]=Neobvezna pot za vstavke. -Comment[sr]=Опциона путања за укључивања. -Comment[sr@Latn]=Opciona putanja za uključivanja. -Comment[sv]= Valfri sökväg till deklarationsfiler. -Comment[tr]=İsteğe bağlı include yolu. -Comment[zh_CN]=可选的包含路径。 -Comment[zh_TW]=引入檔路徑 -Default= -I/usr/include - -[CFLAGS] -Type = value -ValueType=QString -Value= CFLAGS -Comment= Optional CFLAGS to define in the makefile. -Comment[ca]= CFLAGS opcionals per a definir en el fitxer de make. -Comment[da]= Mulige CFLAGS at definere i makefile. -Comment[de]= Optionale CFLAGS, die im Makefile definiert werden. -Comment[el]= Προαιρετικές CFLAGS για ορισμό μέσα στο makefile. -Comment[es]=CFLAGS opcionales a definir en el makefile. -Comment[et]=Täiendavad Makefile'is defineeritavad CFLAGS'id. -Comment[eu]= Aukerako makefile-ean definitzeko CFLAGS-ak. -Comment[fa]= CFLAGS اختیاری برای تعریف در makefile. -Comment[fr]=CFLAGS optionnels à définir dans le Makefile. -Comment[ga]= CFLAGS roghnacha le socrú sa makefile. -Comment[gl]= CFLAGS opcionais a definir no makefile. -Comment[hu]=A Makefile-hoz definiálható CFLAGS információ (opcionális). -Comment[it]= CFLAGS opzionale da definire nel makefile. -Comment[ja]=Makefile に定義する他の CFLAGS -Comment[nds]= Optschonaal CFLAGS, de in de "Make"-Datei fastleggt warrt. -Comment[ne]= मेकफाइलमा परिभाषित गर्न CFLAGS विकल्प -Comment[nl]=Optionele CFLAGS om te definiëren in het makefile. -Comment[pl]= Opcjonalna wartość zmiennej CFLAGS do zdefiniowania w pliku makefile. -Comment[pt]= CFLAGS opcionais a definir na Makefile. -Comment[pt_BR]= CFLAGS opcionais a definir na Makefile. -Comment[ru]=Дополнительные параметры CFLAGS для Makefile. -Comment[sk]=Voliteľné nastavenie CFLAGS v makefile. -Comment[sl]=Dodaten CFLAGS za definicijo v datoteki makefile. -Comment[sr]=Опциона CFLAGS дефинисана у справифајлу. -Comment[sr@Latn]=Opciona CFLAGS definisana u spravifajlu. -Comment[sv]= Valfria CFLAGS att definiera i byggfilen. -Comment[tr]=Makefile'da tanımlanacak isteğe bağlı CFLAGS değerleri -Comment[zh_CN]=在 Makefile 中定义的可选 CFLAGS。 -Comment[zh_TW]=makefile 中定義的 CFLAGS -Default= - -[MGS] -Type=message -Comment=A simple C project was created in %{dest}. -Comment[ca]=A simple projecte en C ha estat creat en %{dest}. -Comment[da]=Et simpelt C projekt blev oprette i %{dest}. -Comment[de]=Ein einfaches C-Project wurde in %{dest} erstellt. -Comment[el]=Ένα απλό έργο C δημιουργήθηκε στο %{dest}. -Comment[es]=Un sencillo proyecto de C ha sido creado en %{dest}. -Comment[et]=Lihtne C-projekt loodi asukohta %{dest}. -Comment[eu]=C proiektu sinple bat sortu da hemen: %{dest}. -Comment[fa]=یک پروژۀ سادۀ سی در %{dest} ایجاد شد. -Comment[fr]=Un projet en langage C simple a été créé dans %{dest}. -Comment[ga]=Cruthaíodh tionscadal simplí C i %{dest} -Comment[gl]=Creouse un proxecto sinxelo en C en %{dest}. -Comment[hu]=Létrejött egy egyszerű C-projekt itt: %{dest}. -Comment[it]=È stato creato un semplice progetto C in %{dest}. -Comment[ja]=簡単な C プロジェクトを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en eenfach C-Projekt opstellt. -Comment[ne]=एउटा साधारण सी परियोजना %{dest} मा सिर्जना गरियो -Comment[nl]=Een eenvoudig C-project is aangemaakt in %{dest}. -Comment[pl]=Prosty projekt w języku C został utworzony w %{dest}. -Comment[pt]=Foi criado um programa simples "Olá mundo" em C em %{dest}. -Comment[pt_BR]=Foi criado um programa simples "Olá mundo" em C em %{dest}. -Comment[ru]=Простое приложение "Hello world" на C создано в %{dest} -Comment[sk]=Jednoduchý C projekt bol vytvorený v %{dest}. -Comment[sl]=Preprost projekt v C-ju je bil ustvarjen v %{dest}. -Comment[sr]=Једноставан пројекат у C-у направљен је у %{dest}. -Comment[sr@Latn]=Jednostavan projekat u C-u napravljen je u %{dest}. -Comment[sv]=Ett enkelt C-projekt skapades i %{dest}. -Comment[tr]=Basit bir C projesi %{dest} içinde oluşturuldu. -Comment[zh_CN]=在 %{dest} 中创建了简单的 C 工程。 -Comment[zh_TW]=一個簡單的 C 專案已建立在 %{dest}。 -Archive=chello.tar.gz - -[INCADMIN] -Type=include -File=%{tdevelop}/template-common/incadmin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/c-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE3] -Type=install -Source=%{src}/c-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE4] -Type=install -Source=%{src}/configure.in -Dest=%{dest}/configure.in - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE5] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE6] -Type=install -Source=%{src}/main.c -Dest=%{dest}/src/%{APPNAMELC}.c - diff --git a/languages/cpp/app_templates/chello_gba/CMakeLists.txt b/languages/cpp/app_templates/chello_gba/CMakeLists.txt index 6810ed53..b11230fe 100644 --- a/languages/cpp/app_templates/chello_gba/CMakeLists.txt +++ b/languages/cpp/app_templates/chello_gba/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( chellogba.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/chellogba.tar.gz chellogba.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - chellogba.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + chellogba.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/chello_gba/Makefile.am b/languages/cpp/app_templates/chello_gba/Makefile.am index afaf8c0b..fbc6c2b4 100644 --- a/languages/cpp/app_templates/chello_gba/Makefile.am +++ b/languages/cpp/app_templates/chello_gba/Makefile.am @@ -4,10 +4,10 @@ dataFiles = main.c font.raw.c master.pal.c src-Makefile.am c-Makefile.am \ templateName = chellogba ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/chello_gba/app.tdevelop b/languages/cpp/app_templates/chello_gba/app.tdevelop index 3c38bcf4..2f59c978 100644 --- a/languages/cpp/app_templates/chello_gba/app.tdevelop +++ b/languages/cpp/app_templates/chello_gba/app.tdevelop @@ -11,10 +11,10 @@ GBA - TDevDebugger + KDevDebugger - + src/%{APPNAMELC} @@ -33,11 +33,11 @@ -nostartfiles - - + + src/%{APPNAMELC}.gba - - + + ada ada_bugs_gcc @@ -84,17 +84,17 @@ TDE Libraries (Doxygen) - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/chello_gba/chellogba.kdevtemplate b/languages/cpp/app_templates/chello_gba/chellogba.kdevtemplate new file mode 100644 index 00000000..ef89357f --- /dev/null +++ b/languages/cpp/app_templates/chello_gba/chellogba.kdevtemplate @@ -0,0 +1,173 @@ +# TDE Config File +[General] +Name=Hello world program +Name[ca]=Programa Hello world +Name[da]=Goddag verden program +Name[de]="Hello World"-Programm +Name[el]=Πρόγραμμα Γεια σου Κόσμε +Name[es]=Programa «Hola mundo» +Name[et]="Tere,maailm" programm +Name[eu]="Kaixo mundua" programa +Name[fa]=برنامۀ Hello world +Name[fr]=Programme « Bonjour monde » +Name[ga]=Ríomhchlár "Hello world" +Name[gl]=Programa Ola mundo +Name[it]=Programma di "Hello world" +Name[ja]=Hello world プログラム +Name[nds]="Moin Welt"-Programm +Name[ne]=हेल्डो वोल्ड कार्यक्रम +Name[nl]=Hello World-programma +Name[pl]=Program 'Witaj świecie' +Name[pt]=Programa 'Olá mundo' +Name[pt_BR]=Programa 'Olá mundo' +Name[ru]=Программа Hello world +Name[sk]=Ahoj svet program +Name[sl]=Program Hello world +Name[sr]=Програм „Здраво свете“ +Name[sr@Latn]=Program „Zdravo svete“ +Name[sv]=Hello world-program +Name[tr]=Merhaba Dünya Programı +Name[zh_CN]=Hello world 程序 +Name[zh_TW]=Hello world 程式 +Icon=chellogba.png +Category=C/GBA +Comment=Generates a simple "Hello world" program for the Gameboy Advance. You will need the "devkitadvance" to compile it. See README.devel for more details. +Comment[ca]=Genera un simple programa de "Hello world" per a la Gameboy Advance. Necessitareu "devkitadvance" per a compilar-lo. Consulteu el README.devel per a més detalls. +Comment[da]=Genererer et simpelt "Goddag verden" program for Gameboy Advance. Du vil skulle bruge "devkitadvance" for at kompilere det. Se README.devel for flere detaljer. +Comment[de]=Erstellt ein einfaches "Hello world"-Programm für den Gameboy Advance. Sie benötigen zum Kompilieren das "devkitadvance". Weitere Einzelheiten finden Sie in der Datei README.devel. +Comment[el]=Δημιουργεί ένα απλό πρόγραμμα "Γεια σου κόσμε" για το Gameboy Advance. Θα χρειαστείτε το "devkitadvance" για τη μεταγλώττισή του. Ανατρέξτε στο README.devel για περισσότερες πληροφορίες. +Comment[es]=Genera un sencillo programa «Hola mundo» para Gameboy Advance. Necesitará «devkitadvance» para compilarlo. Vea README.devel para más detalles. +Comment[et]=Lihtsa "Tere, maailm" programmi loomine Gameboy Advance'i jaoks. Kompileerimiseks on vajalik "devkitadvance". Täpsemalt räägib sellest fail README.devel. +Comment[eu]="Kaixo mundua" programa sinple bat sortzen du Gameboy Advance-erako. "devkitadvance" behar duzu konpilatzeko. Ikusi README.devel xehetasun gehiagorako. +Comment[fa]=یک برنامۀ سادۀ «Hello world» برای Gameboy Advance تولید می‌کند. برای ترجمۀ آن به »devkitadvance« نیاز دارید. برای جزئیات بیشتر، README.devel را ببینید. +Comment[fr]=Génère un programme « Bonjour monde » simple pour la Gameboy Advance. Vous aurez besoin de « devkitadvance » pour le compiler. Consultez le fichier README.devel pour plus de détails. +Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí "Hello World" le haghaidh an Gameboy Advance. Tá gá le "devkitadvance" chun é a thiomsú. Féach ar README.devel chun tuilleadh sonraí a fháil. +Comment[gl]=Xera un programa sinxelo "Ola mundo" para Gameboy Advance. Necesitará "devkitadvance" para compilalo. Consulte README.devel para máis detalles. +Comment[hu]=Létrehoz egy egyszerű Hello world programot a Gameboy Advance-hoz. Lefordításához szükség van a "devkitadvance" csomag telepítésére. További információ a README.devel fájlban található. +Comment[it]=Genera un semplice programma di "Hello world" per il Gameboy Advance. Serve il "devkitadvance" per compilarlo. Guarda un po' README.devel per ulteriori dettagli. +Comment[ja]=Gameboy Advance のための Hello world プログラムを作成します。コンパイルするには devkitadvance が必要です。詳しくは README.devel をご覧ください。 +Comment[nds]=Stellt en eenfach "Moin Welt"-Programm för "Gameboy Advance" op. För't Kompileren deit "devkitadvance" noot. Mehr Enkelheiten laat sik binnen "README.devel" finnen. +Comment[ne]=गेमब्याए एडभान्सका लागि साधारण "हेल्लो वोल्ड नमस्कार" उत्पन्न गर्दछ । यसलाई कम्पाइल गर्न तपाईँलाई "devkitadvance" आवश्यक पर्दछ । बढी जानकारीका लागि README.devel हेर्नुहोस् । +Comment[nl]=Genereert een eenvoudig "Hello World" programma voor de Gameboy Advance. U hebt "devkitadvance" nodig om het te kunnen compileren. Zie het bestand README.devel voor meer informatie. +Comment[pl]=Generuje prosty program "Witaj świecie" na konsolę Gameboy Advance. Do skompilowania go potrzebny jest "devkitadvance". Więcej informacji można znaleźć w pliku README.devel. +Comment[pt]=Gera um programa simples "Olá mundo" para o Gameboy Advance. Irá necessitar do "devkitadvance" para o compilar. Veja o README.devel para mais detalhes. +Comment[pt_BR]=Gera um programa simples "Olá mundo" para o Gameboy Advance. Irá necessitar do "devkitadvance" para o compilar. Veja o README.devel para mais detalhes. +Comment[ru]=Создание простой программы "Hello world" на Gameboy Advance. Вам необходима программа "devkitadvance" для её сборки. Прочтите файл README.devel. +Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program pre Gameboy Advance.Budete potrebovať "devkitadvance" na to, aby ste ho skompilovali.Pozrite súbor README.devel pre viac detailov. +Comment[sl]=Ustvari preprost program »Pozdravljen svet« za Gameboy Advance. Za prevajanje boste potrebovali »devkitadvance«. Podrobnosti si lahko ogledate v README.devel. +Comment[sr]=Прави једноставан „Здраво свете“ програм за Gameboy Advance. Требаће вам „devkitadvance“ да бисте га превели. Погледајте README.devel за више детаља. +Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program za Gameboy Advance. Trebaće vam „devkitadvance“ da biste ga preveli. Pogledajte README.devel za više detalja. +Comment[sv]=Skapar ett enkelt "Hello world"-program för Gameboy Advance. Du behöver "devkitadvance" för att kompilera det. Se filen README.devel för mer information. +Comment[tr]=Gameboy Advance için basit bir "Merhaba Dünya" programı üretir. Derlemek için "devkitadvance" paketine ihtiyacınız olacak. Daha fazla bilgi için README.devel dosyasına bakın. +Comment[zh_CN]=生成 Gameboy Advance 下的“Hello world”程序。您需要“devkitadvane”才能编译。请查看 README.devel 中的细节。 +Comment[zh_TW]=產生一個簡單的 Gameboy Advance 的 Hello world 程式。您需要 "devkitadvance" 來編譯。詳情請參考 README.devel。 +ShowFileAfterGeneration=README.devel +FileTemplates=h,CStyle,c,CStyle +ShowFilesAfterGeneration=%{dest}/src/main.c +Archive=chellogba.tar.gz + +[INCADMIN] +Type=include +File=%{tdevelop}/template-common/incadmin.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=%{src}/README.devel +Dest=%{dest}/README.devel + +[FILE3] +Type=install +Source=%{src}/c-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE4] +Type=install +Source=%{src}/c-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE5] +Type=install +Source=%{src}/configure.in +Dest=%{dest}/configure.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}/main.c +Dest=%{dest}/src/main.c + +[FILE8] +Type=install +Source=%{src}/main.h +Dest=%{dest}/src/main.h + +[FILE9] +Type=install +Source=%{src}/gba.h +Dest=%{dest}/src/gba.h + +[FILE10] +Type=install +Source=%{src}/font.bmp +Dest=%{dest}/src/font.bmp + +[FILE11] +Type=install +Source=%{src}/font.raw.c +Dest=%{dest}/src/font.raw.c + +[FILE12] +Type=install +Source=%{src}/master.pal.c +Dest=%{dest}/src/master.pal.c + +[MSG] +Type=message +Comment=A Hello World program was created in %{dest} +Comment[ca]=A programa de Hello World ha estat creat en %{dest} +Comment[da]=Et Goddag verden program blev oprettet i %{dest} +Comment[de]=Ein "Hello World"-Programm wurde in %{dest} erstellt. +Comment[el]=Ένα πρόγραμμα Γεια σου Κόσμε δημιουργήθηκε στο %{dest} +Comment[es]=Un programa «Hola mundo» ha sido creado en %{dest} +Comment[et]="Tere, maailm" programm loodi asukohta %{dest} +Comment[eu]="Kaixo mundua" programa bat sortu da hemen: %{dest} +Comment[fa]=یک برنامۀ Hello World در %{dest} ایجاد شد +Comment[fr]=Un programme « Bonjour monde » a été créé dans %{dest} +Comment[ga]=Cruthaíodh ríomhchlár "Hello World" i %{dest} +Comment[gl]=Creouse un programa Ola mundo en %{dest} +Comment[hu]=Létrejött egy Hello World program itt: %{dest} +Comment[it]=È stato creato un programma di "Hello World" in %{dest} +Comment[ja]=Hello World プログラムを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en "Moin Welt"-Programm opstellt +Comment[ne]=एउटा हेल्लो वोल्ड कार्यक्रम %{dest} मा सिर्जना गरियो +Comment[nl]=Een Hello World-programma is aangemaakt in %{dest} +Comment[pl]=Program 'Witaj świecie' utworzony w %{dest}. +Comment[pt]=Foi criado um programa Olá Mundo em %{dest} +Comment[pt_BR]=Foi criado um programa Olá Mundo em %{dest} +Comment[ru]=Простое приложение Hello World создано в %{dest} +Comment[sk]=Ahoj svet program bol vytvorený v %{dest} +Comment[sl]=Program »Pozdravljen svet« je bil ustvarjen v %{dest} +Comment[sr]=„Здраво свете“ је направљен у %{dest} +Comment[sr@Latn]=„Zdravo svete“ je napravljen u %{dest} +Comment[sv]=Ett Hello World-program skapades i %{dest} +Comment[tr]=Bir Merhaba Dünya programı %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个 Hello world 程序 +Comment[zh_TW]=一個 Hello World 程式已經建立在 %{dest} diff --git a/languages/cpp/app_templates/chello_gba/chellogba.tdevtemplate b/languages/cpp/app_templates/chello_gba/chellogba.tdevtemplate deleted file mode 100644 index e6ea8c90..00000000 --- a/languages/cpp/app_templates/chello_gba/chellogba.tdevtemplate +++ /dev/null @@ -1,173 +0,0 @@ -# TDE Config File -[General] -Name=Hello world program -Name[ca]=Programa Hello world -Name[da]=Goddag verden program -Name[de]="Hello World"-Programm -Name[el]=Πρόγραμμα Γεια σου Κόσμε -Name[es]=Programa «Hola mundo» -Name[et]="Tere,maailm" programm -Name[eu]="Kaixo mundua" programa -Name[fa]=برنامۀ Hello world -Name[fr]=Programme « Bonjour monde » -Name[ga]=Ríomhchlár "Hello world" -Name[gl]=Programa Ola mundo -Name[it]=Programma di "Hello world" -Name[ja]=Hello world プログラム -Name[nds]="Moin Welt"-Programm -Name[ne]=हेल्डो वोल्ड कार्यक्रम -Name[nl]=Hello World-programma -Name[pl]=Program 'Witaj świecie' -Name[pt]=Programa 'Olá mundo' -Name[pt_BR]=Programa 'Olá mundo' -Name[ru]=Программа Hello world -Name[sk]=Ahoj svet program -Name[sl]=Program Hello world -Name[sr]=Програм „Здраво свете“ -Name[sr@Latn]=Program „Zdravo svete“ -Name[sv]=Hello world-program -Name[tr]=Merhaba Dünya Programı -Name[zh_CN]=Hello world 程序 -Name[zh_TW]=Hello world 程式 -Icon=chellogba.png -Category=C/GBA -Comment=Generates a simple "Hello world" program for the Gameboy Advance. You will need the "devkitadvance" to compile it. See README.devel for more details. -Comment[ca]=Genera un simple programa de "Hello world" per a la Gameboy Advance. Necessitareu "devkitadvance" per a compilar-lo. Consulteu el README.devel per a més detalls. -Comment[da]=Genererer et simpelt "Goddag verden" program for Gameboy Advance. Du vil skulle bruge "devkitadvance" for at kompilere det. Se README.devel for flere detaljer. -Comment[de]=Erstellt ein einfaches "Hello world"-Programm für den Gameboy Advance. Sie benötigen zum Kompilieren das "devkitadvance". Weitere Einzelheiten finden Sie in der Datei README.devel. -Comment[el]=Δημιουργεί ένα απλό πρόγραμμα "Γεια σου κόσμε" για το Gameboy Advance. Θα χρειαστείτε το "devkitadvance" για τη μεταγλώττισή του. Ανατρέξτε στο README.devel για περισσότερες πληροφορίες. -Comment[es]=Genera un sencillo programa «Hola mundo» para Gameboy Advance. Necesitará «devkitadvance» para compilarlo. Vea README.devel para más detalles. -Comment[et]=Lihtsa "Tere, maailm" programmi loomine Gameboy Advance'i jaoks. Kompileerimiseks on vajalik "devkitadvance". Täpsemalt räägib sellest fail README.devel. -Comment[eu]="Kaixo mundua" programa sinple bat sortzen du Gameboy Advance-erako. "devkitadvance" behar duzu konpilatzeko. Ikusi README.devel xehetasun gehiagorako. -Comment[fa]=یک برنامۀ سادۀ «Hello world» برای Gameboy Advance تولید می‌کند. برای ترجمۀ آن به »devkitadvance« نیاز دارید. برای جزئیات بیشتر، README.devel را ببینید. -Comment[fr]=Génère un programme « Bonjour monde » simple pour la Gameboy Advance. Vous aurez besoin de « devkitadvance » pour le compiler. Consultez le fichier README.devel pour plus de détails. -Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí "Hello World" le haghaidh an Gameboy Advance. Tá gá le "devkitadvance" chun é a thiomsú. Féach ar README.devel chun tuilleadh sonraí a fháil. -Comment[gl]=Xera un programa sinxelo "Ola mundo" para Gameboy Advance. Necesitará "devkitadvance" para compilalo. Consulte README.devel para máis detalles. -Comment[hu]=Létrehoz egy egyszerű Hello world programot a Gameboy Advance-hoz. Lefordításához szükség van a "devkitadvance" csomag telepítésére. További információ a README.devel fájlban található. -Comment[it]=Genera un semplice programma di "Hello world" per il Gameboy Advance. Serve il "devkitadvance" per compilarlo. Guarda un po' README.devel per ulteriori dettagli. -Comment[ja]=Gameboy Advance のための Hello world プログラムを作成します。コンパイルするには devkitadvance が必要です。詳しくは README.devel をご覧ください。 -Comment[nds]=Stellt en eenfach "Moin Welt"-Programm för "Gameboy Advance" op. För't Kompileren deit "devkitadvance" noot. Mehr Enkelheiten laat sik binnen "README.devel" finnen. -Comment[ne]=गेमब्याए एडभान्सका लागि साधारण "हेल्लो वोल्ड नमस्कार" उत्पन्न गर्दछ । यसलाई कम्पाइल गर्न तपाईँलाई "devkitadvance" आवश्यक पर्दछ । बढी जानकारीका लागि README.devel हेर्नुहोस् । -Comment[nl]=Genereert een eenvoudig "Hello World" programma voor de Gameboy Advance. U hebt "devkitadvance" nodig om het te kunnen compileren. Zie het bestand README.devel voor meer informatie. -Comment[pl]=Generuje prosty program "Witaj świecie" na konsolę Gameboy Advance. Do skompilowania go potrzebny jest "devkitadvance". Więcej informacji można znaleźć w pliku README.devel. -Comment[pt]=Gera um programa simples "Olá mundo" para o Gameboy Advance. Irá necessitar do "devkitadvance" para o compilar. Veja o README.devel para mais detalhes. -Comment[pt_BR]=Gera um programa simples "Olá mundo" para o Gameboy Advance. Irá necessitar do "devkitadvance" para o compilar. Veja o README.devel para mais detalhes. -Comment[ru]=Создание простой программы "Hello world" на Gameboy Advance. Вам необходима программа "devkitadvance" для её сборки. Прочтите файл README.devel. -Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program pre Gameboy Advance.Budete potrebovať "devkitadvance" na to, aby ste ho skompilovali.Pozrite súbor README.devel pre viac detailov. -Comment[sl]=Ustvari preprost program »Pozdravljen svet« za Gameboy Advance. Za prevajanje boste potrebovali »devkitadvance«. Podrobnosti si lahko ogledate v README.devel. -Comment[sr]=Прави једноставан „Здраво свете“ програм за Gameboy Advance. Требаће вам „devkitadvance“ да бисте га превели. Погледајте README.devel за више детаља. -Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program za Gameboy Advance. Trebaće vam „devkitadvance“ da biste ga preveli. Pogledajte README.devel za više detalja. -Comment[sv]=Skapar ett enkelt "Hello world"-program för Gameboy Advance. Du behöver "devkitadvance" för att kompilera det. Se filen README.devel för mer information. -Comment[tr]=Gameboy Advance için basit bir "Merhaba Dünya" programı üretir. Derlemek için "devkitadvance" paketine ihtiyacınız olacak. Daha fazla bilgi için README.devel dosyasına bakın. -Comment[zh_CN]=生成 Gameboy Advance 下的“Hello world”程序。您需要“devkitadvane”才能编译。请查看 README.devel 中的细节。 -Comment[zh_TW]=產生一個簡單的 Gameboy Advance 的 Hello world 程式。您需要 "devkitadvance" 來編譯。詳情請參考 README.devel。 -ShowFileAfterGeneration=README.devel -FileTemplates=h,CStyle,c,CStyle -ShowFilesAfterGeneration=%{dest}/src/main.c -Archive=chellogba.tar.gz - -[INCADMIN] -Type=include -File=%{tdevelop}/template-common/incadmin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/README.devel -Dest=%{dest}/README.devel - -[FILE3] -Type=install -Source=%{src}/c-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE4] -Type=install -Source=%{src}/c-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE5] -Type=install -Source=%{src}/configure.in -Dest=%{dest}/configure.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}/main.c -Dest=%{dest}/src/main.c - -[FILE8] -Type=install -Source=%{src}/main.h -Dest=%{dest}/src/main.h - -[FILE9] -Type=install -Source=%{src}/gba.h -Dest=%{dest}/src/gba.h - -[FILE10] -Type=install -Source=%{src}/font.bmp -Dest=%{dest}/src/font.bmp - -[FILE11] -Type=install -Source=%{src}/font.raw.c -Dest=%{dest}/src/font.raw.c - -[FILE12] -Type=install -Source=%{src}/master.pal.c -Dest=%{dest}/src/master.pal.c - -[MSG] -Type=message -Comment=A Hello World program was created in %{dest} -Comment[ca]=A programa de Hello World ha estat creat en %{dest} -Comment[da]=Et Goddag verden program blev oprettet i %{dest} -Comment[de]=Ein "Hello World"-Programm wurde in %{dest} erstellt. -Comment[el]=Ένα πρόγραμμα Γεια σου Κόσμε δημιουργήθηκε στο %{dest} -Comment[es]=Un programa «Hola mundo» ha sido creado en %{dest} -Comment[et]="Tere, maailm" programm loodi asukohta %{dest} -Comment[eu]="Kaixo mundua" programa bat sortu da hemen: %{dest} -Comment[fa]=یک برنامۀ Hello World در %{dest} ایجاد شد -Comment[fr]=Un programme « Bonjour monde » a été créé dans %{dest} -Comment[ga]=Cruthaíodh ríomhchlár "Hello World" i %{dest} -Comment[gl]=Creouse un programa Ola mundo en %{dest} -Comment[hu]=Létrejött egy Hello World program itt: %{dest} -Comment[it]=È stato creato un programma di "Hello World" in %{dest} -Comment[ja]=Hello World プログラムを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en "Moin Welt"-Programm opstellt -Comment[ne]=एउटा हेल्लो वोल्ड कार्यक्रम %{dest} मा सिर्जना गरियो -Comment[nl]=Een Hello World-programma is aangemaakt in %{dest} -Comment[pl]=Program 'Witaj świecie' utworzony w %{dest}. -Comment[pt]=Foi criado um programa Olá Mundo em %{dest} -Comment[pt_BR]=Foi criado um programa Olá Mundo em %{dest} -Comment[ru]=Простое приложение Hello World создано в %{dest} -Comment[sk]=Ahoj svet program bol vytvorený v %{dest} -Comment[sl]=Program »Pozdravljen svet« je bil ustvarjen v %{dest} -Comment[sr]=„Здраво свете“ је направљен у %{dest} -Comment[sr@Latn]=„Zdravo svete“ je napravljen u %{dest} -Comment[sv]=Ett Hello World-program skapades i %{dest} -Comment[tr]=Bir Merhaba Dünya programı %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个 Hello world 程序 -Comment[zh_TW]=一個 Hello World 程式已經建立在 %{dest} diff --git a/languages/cpp/app_templates/clanlib/CMakeLists.txt b/languages/cpp/app_templates/clanlib/CMakeLists.txt index c8fdfe2d..e0b99cc2 100644 --- a/languages/cpp/app_templates/clanlib/CMakeLists.txt +++ b/languages/cpp/app_templates/clanlib/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( clanlib.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/clanlib.tar.gz clanlib.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - clanlib.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + clanlib.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/clanlib/Makefile.am b/languages/cpp/app_templates/clanlib/Makefile.am index b6aa9150..84e0459b 100644 --- a/languages/cpp/app_templates/clanlib/Makefile.am +++ b/languages/cpp/app_templates/clanlib/Makefile.am @@ -3,10 +3,10 @@ dataFiles = src-Makefile.am app-Makefile.am main.cpp app.tdevelop \ templateName = clanlib ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/clanlib/app.tdevelop b/languages/cpp/app_templates/clanlib/app.tdevelop index 15418279..d2e9e430 100644 --- a/languages/cpp/app_templates/clanlib/app.tdevelop +++ b/languages/cpp/app_templates/clanlib/app.tdevelop @@ -12,7 +12,7 @@ ClanLib - + src/%{APPNAMELC} debug @@ -43,8 +43,8 @@ - - + + ada ada_bugs_gcc @@ -90,17 +90,17 @@ TDE Libraries (Doxygen) - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/clanlib/clanlib.kdevtemplate b/languages/cpp/app_templates/clanlib/clanlib.kdevtemplate new file mode 100644 index 00000000..1b39badc --- /dev/null +++ b/languages/cpp/app_templates/clanlib/clanlib.kdevtemplate @@ -0,0 +1,138 @@ +# TDE Config File +[General] +Name=Simple ClanLib application +Name[ca]=Una simple aplicació de ClanLib +Name[da]=Simpelt ClanLib program +Name[de]=Eine einfache ClanLib-Anwendung +Name[el]=Μια απλή εφαρμογή ClanLib +Name[es]=Una sencilla aplicación de ClanLib +Name[et]=Lihtne ClanLib rakendus +Name[eu]=ClanLib aplikazio simple bat +Name[fa]=کاربرد سادۀ ClanLib +Name[fr]=Application ClanLib simple +Name[ga]=Feidhmchlár simplí ClanLib +Name[gl]=Aplicación sinxela ClanLib +Name[hu]=Egyszerű Clanlib-alkalmazás +Name[it]=semplice applicazione ClanLib +Name[ja]=簡単な ClanLib アプリケーション +Name[nds]=En eenfach ClanLib-Programm +Name[ne]=साधारण ClanLib अनुप्रयोग +Name[nl]=Eenvoudige ClanLib-toepassing +Name[pl]=Prosty program używający ClanLib +Name[pt]=Aplicação simples da ClanLib +Name[pt_BR]=Aplicação simples da ClanLib +Name[ru]=Простое приложение ClanLib +Name[sk]=Jednoduchá ClanLib aplikácia +Name[sl]=Preprost program ClanLib +Name[sr]=Једноставан ClanLib програм +Name[sr@Latn]=Jednostavan ClanLib program +Name[sv]=Enkelt ClanLib-program +Name[tr]=Basit ClanLib uygulaması +Name[zh_CN]=简单的 ClanLib 应用程序 +Name[zh_TW]=簡單的 ClanLib 應用程式 +Category=C++ +Icon=clanlib.png +Comment=Generates a simple ClanLib application. +Comment[ca]=Genera una simple aplicació de ClanLib. +Comment[da]=Genererer et simpelt ClanLib program +Comment[de]=Erstellt eine einfache ClanLib-Anwendung. +Comment[el]=Δημιουργεί μια απλή εφαρμογή ClanLib. +Comment[es]=Genera una sencilla aplicación de ClanLib. +Comment[et]=Lihtsa ClanLib'i rakenduse loomine. +Comment[eu]=ClanLib aplikazio simple bat sortzen du. +Comment[fa]=یک کاربرد سادۀ ClanLib تولید می‌کند. +Comment[fr]=Génère une application ClanLib simple. +Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí ClanLib. +Comment[gl]=Xera una aplicación sinxela ClanLib. +Comment[hu]=Létrehoz egy egyszerű Clanlib-alkalmazást. +Comment[it]=Genera una semplice applicazione ClanLib. +Comment[ja]=簡単な ClanLib アプリケーションを作成します +Comment[nds]=Stellt en eenfach ClanLib-Programm op. +Comment[ne]=साधारण ClanLib अनुप्रयोग सिर्जना गर्दछ । +Comment[nl]=Genereert een eenvoudige ClanLib-toepassing +Comment[pl]=Generuje prosty program używający ClanLib. +Comment[pt]=Gera uma aplicação simples com o ClanLib. +Comment[pt_BR]=Gera uma aplicação simples com o ClanLib. +Comment[ru]=Создание простого приложения ClanLib. +Comment[sk]=Vygeneruje jednoduchú ClanLib aplikáciu. +Comment[sl]=Ustvari preprost program ClanLib. +Comment[sr]=Прави једноставан ClanLib програм. +Comment[sr@Latn]=Pravi jednostavan ClanLib program. +Comment[sv]=Skapar ett enkelt ClanLib-program. +Comment[tr]=Basit bir ClanLib uygulaması yaratır. +Comment[zh_CN]=生成简单的 ClanLib 应用程序。 +Comment[zh_TW]=產生簡單的 ClanLib 應用程式。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/main.cpp +Archive=clanlib.tar.gz + +[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=%{src}/app-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE3] +Type=install +Source=%{src}/app-configure.in +Dest=%{dest}/configure.in + +[FILE4] +Type=install +Source=%{src}/app-autogen.sh +Dest=%{dest}/autogen.sh + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE5] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE6] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/main.cpp + +[MSG] +Type=message +Comment=A simple clanlib application was created in %{dest} +Comment[ca]=Una simple aplicació de clanlib ha estat creada en %{dest} +Comment[da]=Et simpelt clanlib program blev oprettet i %{dest} +Comment[de]=Eine einfache ClanLib-Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια απλή εφαρμογή clanlib δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación de ClanLib sencilla ha sido creada en %{dest} +Comment[et]=Lihtne ClanLib'i rakendus loodi asukohta %{dest} +Comment[eu]=clanlib aplikazio simple bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد سادۀ clanlib در %{dest} ایجاد شد +Comment[fr]=Une application Clanlib simple a été créée dans %{dest} +Comment[ga]=Cruthaíodh feidhmchlár simplí clanlib i %{dest} +Comment[gl]=Creouse una apliación sinxela clanlib en %{dest} +Comment[hu]=Létrejött egy egyszerű Clanlib-alkalmazás itt: %{dest} +Comment[it]=È stata creata una semplice applicazione clanlib in %{dest} +Comment[ja]=簡単な clanlib アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en eenfach ClanLib-Programm opstellt +Comment[ne]=साधारण clanlib अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een voorbeeld ClanLib-toepassing is aangemaakt in %{dest} +Comment[pl]=Prosty program używający ClanLib został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação simples da ClanLib em %{dest} +Comment[pt_BR]=Foi criada uma aplicação simples da ClanLib em %{dest} +Comment[ru]=Простое приложение ClanLib создано в %{dest} +Comment[sk]=Jednoduchá ClanLib aplikácia bola vytvorená v %{dest} +Comment[sl]=Preprost program clanlib je bil ustvarjen v %{dest} +Comment[sr]=Једноставан clanlib програм је направљен у %{dest} +Comment[sr@Latn]=Jednostavan clanlib program je napravljen u %{dest} +Comment[sv]=Ett enkelt ClanLib-program skapades i %{dest} +Comment[zh_CN]=在 %{dest} 中创建了一个简单的 clanlib 程序 +Comment[zh_TW]=一個簡單的 clanlib 應用程式已經建立在 %{dest} diff --git a/languages/cpp/app_templates/clanlib/clanlib.tdevtemplate b/languages/cpp/app_templates/clanlib/clanlib.tdevtemplate deleted file mode 100644 index 89243557..00000000 --- a/languages/cpp/app_templates/clanlib/clanlib.tdevtemplate +++ /dev/null @@ -1,138 +0,0 @@ -# TDE Config File -[General] -Name=Simple ClanLib application -Name[ca]=Una simple aplicació de ClanLib -Name[da]=Simpelt ClanLib program -Name[de]=Eine einfache ClanLib-Anwendung -Name[el]=Μια απλή εφαρμογή ClanLib -Name[es]=Una sencilla aplicación de ClanLib -Name[et]=Lihtne ClanLib rakendus -Name[eu]=ClanLib aplikazio simple bat -Name[fa]=کاربرد سادۀ ClanLib -Name[fr]=Application ClanLib simple -Name[ga]=Feidhmchlár simplí ClanLib -Name[gl]=Aplicación sinxela ClanLib -Name[hu]=Egyszerű Clanlib-alkalmazás -Name[it]=semplice applicazione ClanLib -Name[ja]=簡単な ClanLib アプリケーション -Name[nds]=En eenfach ClanLib-Programm -Name[ne]=साधारण ClanLib अनुप्रयोग -Name[nl]=Eenvoudige ClanLib-toepassing -Name[pl]=Prosty program używający ClanLib -Name[pt]=Aplicação simples da ClanLib -Name[pt_BR]=Aplicação simples da ClanLib -Name[ru]=Простое приложение ClanLib -Name[sk]=Jednoduchá ClanLib aplikácia -Name[sl]=Preprost program ClanLib -Name[sr]=Једноставан ClanLib програм -Name[sr@Latn]=Jednostavan ClanLib program -Name[sv]=Enkelt ClanLib-program -Name[tr]=Basit ClanLib uygulaması -Name[zh_CN]=简单的 ClanLib 应用程序 -Name[zh_TW]=簡單的 ClanLib 應用程式 -Category=C++ -Icon=clanlib.png -Comment=Generates a simple ClanLib application. -Comment[ca]=Genera una simple aplicació de ClanLib. -Comment[da]=Genererer et simpelt ClanLib program -Comment[de]=Erstellt eine einfache ClanLib-Anwendung. -Comment[el]=Δημιουργεί μια απλή εφαρμογή ClanLib. -Comment[es]=Genera una sencilla aplicación de ClanLib. -Comment[et]=Lihtsa ClanLib'i rakenduse loomine. -Comment[eu]=ClanLib aplikazio simple bat sortzen du. -Comment[fa]=یک کاربرد سادۀ ClanLib تولید می‌کند. -Comment[fr]=Génère une application ClanLib simple. -Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí ClanLib. -Comment[gl]=Xera una aplicación sinxela ClanLib. -Comment[hu]=Létrehoz egy egyszerű Clanlib-alkalmazást. -Comment[it]=Genera una semplice applicazione ClanLib. -Comment[ja]=簡単な ClanLib アプリケーションを作成します -Comment[nds]=Stellt en eenfach ClanLib-Programm op. -Comment[ne]=साधारण ClanLib अनुप्रयोग सिर्जना गर्दछ । -Comment[nl]=Genereert een eenvoudige ClanLib-toepassing -Comment[pl]=Generuje prosty program używający ClanLib. -Comment[pt]=Gera uma aplicação simples com o ClanLib. -Comment[pt_BR]=Gera uma aplicação simples com o ClanLib. -Comment[ru]=Создание простого приложения ClanLib. -Comment[sk]=Vygeneruje jednoduchú ClanLib aplikáciu. -Comment[sl]=Ustvari preprost program ClanLib. -Comment[sr]=Прави једноставан ClanLib програм. -Comment[sr@Latn]=Pravi jednostavan ClanLib program. -Comment[sv]=Skapar ett enkelt ClanLib-program. -Comment[tr]=Basit bir ClanLib uygulaması yaratır. -Comment[zh_CN]=生成简单的 ClanLib 应用程序。 -Comment[zh_TW]=產生簡單的 ClanLib 應用程式。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/main.cpp -Archive=clanlib.tar.gz - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/app-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE3] -Type=install -Source=%{src}/app-configure.in -Dest=%{dest}/configure.in - -[FILE4] -Type=install -Source=%{src}/app-autogen.sh -Dest=%{dest}/autogen.sh - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE5] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE6] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/main.cpp - -[MSG] -Type=message -Comment=A simple clanlib application was created in %{dest} -Comment[ca]=Una simple aplicació de clanlib ha estat creada en %{dest} -Comment[da]=Et simpelt clanlib program blev oprettet i %{dest} -Comment[de]=Eine einfache ClanLib-Anwendung wurde in %{dest} erstellt. -Comment[el]=Μια απλή εφαρμογή clanlib δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación de ClanLib sencilla ha sido creada en %{dest} -Comment[et]=Lihtne ClanLib'i rakendus loodi asukohta %{dest} -Comment[eu]=clanlib aplikazio simple bat sortu da hemen: %{dest} -Comment[fa]=یک کاربرد سادۀ clanlib در %{dest} ایجاد شد -Comment[fr]=Une application Clanlib simple a été créée dans %{dest} -Comment[ga]=Cruthaíodh feidhmchlár simplí clanlib i %{dest} -Comment[gl]=Creouse una apliación sinxela clanlib en %{dest} -Comment[hu]=Létrejött egy egyszerű Clanlib-alkalmazás itt: %{dest} -Comment[it]=È stata creata una semplice applicazione clanlib in %{dest} -Comment[ja]=簡単な clanlib アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en eenfach ClanLib-Programm opstellt -Comment[ne]=साधारण clanlib अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een voorbeeld ClanLib-toepassing is aangemaakt in %{dest} -Comment[pl]=Prosty program używający ClanLib został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação simples da ClanLib em %{dest} -Comment[pt_BR]=Foi criada uma aplicação simples da ClanLib em %{dest} -Comment[ru]=Простое приложение ClanLib создано в %{dest} -Comment[sk]=Jednoduchá ClanLib aplikácia bola vytvorená v %{dest} -Comment[sl]=Preprost program clanlib je bil ustvarjen v %{dest} -Comment[sr]=Једноставан clanlib програм је направљен у %{dest} -Comment[sr@Latn]=Jednostavan clanlib program je napravljen u %{dest} -Comment[sv]=Ett enkelt ClanLib-program skapades i %{dest} -Comment[zh_CN]=在 %{dest} 中创建了一个简单的 clanlib 程序 -Comment[zh_TW]=一個簡單的 clanlib 應用程式已經建立在 %{dest} diff --git a/languages/cpp/app_templates/cmakelibc/CMakeLists.txt b/languages/cpp/app_templates/cmakelibc/CMakeLists.txt index df6ec7b7..841853d8 100644 --- a/languages/cpp/app_templates/cmakelibc/CMakeLists.txt +++ b/languages/cpp/app_templates/cmakelibc/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( cmakelibc.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/cmakelibc.tar.gz cmakelibc.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - cmakelibc.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + cmakelibc.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/cmakelibc/Makefile.am b/languages/cpp/app_templates/cmakelibc/Makefile.am index f4fb8bb2..c10e704a 100644 --- a/languages/cpp/app_templates/cmakelibc/Makefile.am +++ b/languages/cpp/app_templates/cmakelibc/Makefile.am @@ -2,10 +2,10 @@ dataFiles = test.c lib.h lib.c cmakelibc.png CMakeLists.txt CMakeLists.txt.src templateName = cmakelibc ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/cmakelibc/cmakelibc.tdevtemplate b/languages/cpp/app_templates/cmakelibc/cmakelibc.kdevtemplate similarity index 100% rename from languages/cpp/app_templates/cmakelibc/cmakelibc.tdevtemplate rename to languages/cpp/app_templates/cmakelibc/cmakelibc.kdevtemplate diff --git a/languages/cpp/app_templates/cmakelibcpp/CMakeLists.txt b/languages/cpp/app_templates/cmakelibcpp/CMakeLists.txt index cbd6bd5f..26d7f3e2 100644 --- a/languages/cpp/app_templates/cmakelibcpp/CMakeLists.txt +++ b/languages/cpp/app_templates/cmakelibcpp/CMakeLists.txt @@ -18,10 +18,10 @@ add_custom_target( cmakelibcpp.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/cmakelibcpp.tar.gz cmakelibcpp.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - cmakelibcpp.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + cmakelibcpp.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/cmakelibcpp/Makefile.am b/languages/cpp/app_templates/cmakelibcpp/Makefile.am index 0c3b275e..395bb107 100644 --- a/languages/cpp/app_templates/cmakelibcpp/Makefile.am +++ b/languages/cpp/app_templates/cmakelibcpp/Makefile.am @@ -2,10 +2,10 @@ dataFiles = test.cpp lib.h lib.cpp cmakelibcpp.png CMakeLists.txt CMakeLists.txt templateName = cmakelibcpp ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/cmakelibcpp/cmakelibcpp.tdevtemplate b/languages/cpp/app_templates/cmakelibcpp/cmakelibcpp.kdevtemplate similarity index 100% rename from languages/cpp/app_templates/cmakelibcpp/cmakelibcpp.tdevtemplate rename to languages/cpp/app_templates/cmakelibcpp/cmakelibcpp.kdevtemplate diff --git a/languages/cpp/app_templates/cmakeqt3app/CMakeLists.txt b/languages/cpp/app_templates/cmakeqt3app/CMakeLists.txt index 88bb2d36..b69d898f 100644 --- a/languages/cpp/app_templates/cmakeqt3app/CMakeLists.txt +++ b/languages/cpp/app_templates/cmakeqt3app/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( cmakeqt3app.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/cmakeqt3app.tar.gz cmakeqt3app.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - cmakeqt3app.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + cmakeqt3app.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/cmakeqt3app/Makefile.am b/languages/cpp/app_templates/cmakeqt3app/Makefile.am index e42bdcbf..24bd6c35 100644 --- a/languages/cpp/app_templates/cmakeqt3app/Makefile.am +++ b/languages/cpp/app_templates/cmakeqt3app/Makefile.am @@ -4,10 +4,10 @@ dataFiles = main.cpp cmakeqt3app.cpp cmakeqt3app.h cmakeqt3app.png \ templateName = cmakeqt3app ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.tdevtemplate b/languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.kdevtemplate similarity index 100% rename from languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.tdevtemplate rename to languages/cpp/app_templates/cmakeqt3app/cmakeqt3app.kdevtemplate diff --git a/languages/cpp/app_templates/cmakesimple/CMakeLists.txt b/languages/cpp/app_templates/cmakesimple/CMakeLists.txt index d5e417c3..621dd48a 100644 --- a/languages/cpp/app_templates/cmakesimple/CMakeLists.txt +++ b/languages/cpp/app_templates/cmakesimple/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( cmakesimple.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/cmakesimple.tar.gz cmakesimple.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - cmakesimple.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + cmakesimple.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/cmakesimple/Makefile.am b/languages/cpp/app_templates/cmakesimple/Makefile.am index e6ff1e4d..243ed01d 100644 --- a/languages/cpp/app_templates/cmakesimple/Makefile.am +++ b/languages/cpp/app_templates/cmakesimple/Makefile.am @@ -2,10 +2,10 @@ dataFiles = main.cpp cmakesimple.png CMakeLists.txt README templateName = cmakesimple ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/cmakesimple/cmakesimple.tdevtemplate b/languages/cpp/app_templates/cmakesimple/cmakesimple.kdevtemplate similarity index 100% rename from languages/cpp/app_templates/cmakesimple/cmakesimple.tdevtemplate rename to languages/cpp/app_templates/cmakesimple/cmakesimple.kdevtemplate diff --git a/languages/cpp/app_templates/cmakesimplec/CMakeLists.txt b/languages/cpp/app_templates/cmakesimplec/CMakeLists.txt index 70e65075..4d07a4d6 100644 --- a/languages/cpp/app_templates/cmakesimplec/CMakeLists.txt +++ b/languages/cpp/app_templates/cmakesimplec/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( cmakesimplec.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/cmakesimplec.tar.gz cmakesimplec.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - cmakesimplec.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + cmakesimplec.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/cmakesimplec/Makefile.am b/languages/cpp/app_templates/cmakesimplec/Makefile.am index df69719d..f5a1c3e7 100644 --- a/languages/cpp/app_templates/cmakesimplec/Makefile.am +++ b/languages/cpp/app_templates/cmakesimplec/Makefile.am @@ -2,10 +2,10 @@ dataFiles = main.c cmakesimplec.png CMakeLists.txt templateName = cmakesimplec ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/cmakesimplec/cmakesimplec.tdevtemplate b/languages/cpp/app_templates/cmakesimplec/cmakesimplec.kdevtemplate similarity index 100% rename from languages/cpp/app_templates/cmakesimplec/cmakesimplec.tdevtemplate rename to languages/cpp/app_templates/cmakesimplec/cmakesimplec.kdevtemplate diff --git a/languages/cpp/app_templates/cppcurseshello/CMakeLists.txt b/languages/cpp/app_templates/cppcurseshello/CMakeLists.txt index bfdd6d10..ccb2dd4a 100644 --- a/languages/cpp/app_templates/cppcurseshello/CMakeLists.txt +++ b/languages/cpp/app_templates/cppcurseshello/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( cppcurseshello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/cppcurseshello.tar.gz cppcurseshello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - cppcurseshello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + cppcurseshello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/cppcurseshello/Makefile.am b/languages/cpp/app_templates/cppcurseshello/Makefile.am index 17175bfa..ef3623f6 100644 --- a/languages/cpp/app_templates/cppcurseshello/Makefile.am +++ b/languages/cpp/app_templates/cppcurseshello/Makefile.am @@ -3,10 +3,10 @@ dataFiles = main.cpp src-Makefile.am cpp-Makefile.am cpp-Makefile.cvs\ templateName = cppcurseshello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/cppcurseshello/app.tdevelop b/languages/cpp/app_templates/cppcurseshello/app.tdevelop index d771aedf..98919071 100644 --- a/languages/cpp/app_templates/cppcurseshello/app.tdevelop +++ b/languages/cpp/app_templates/cppcurseshello/app.tdevelop @@ -11,7 +11,7 @@ Code - + src/%{APPNAMELC} debug @@ -37,8 +37,8 @@ -O0 -g3 - - + + ada ada_bugs_gcc @@ -83,23 +83,23 @@ TDE Libraries (Doxygen) - - + + - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/cppcurseshello/cppcurseshello.kdevtemplate b/languages/cpp/app_templates/cppcurseshello/cppcurseshello.kdevtemplate new file mode 100644 index 00000000..27f85c21 --- /dev/null +++ b/languages/cpp/app_templates/cppcurseshello/cppcurseshello.kdevtemplate @@ -0,0 +1,143 @@ +# TDE Config File +[General] +Name=Simple ncurses Hello world program +Name[ca]=Simple programa de Hello world per a ncurses +Name[da]=Simpelt ncurses Goddag verden program +Name[de]=Einfaches auf NCurses basierendes "Hello World"-Programm +Name[el]=Απλό ncurses πρόγραμμα Γεια σου κόσμε +Name[es]=Programa «Hola mundo» sencillo en ncurses +Name[et]=Lihtne "Tere, maailm" programm ncurses'i põhjal +Name[eu]=ncurses-en oinarritako "Kaixo mundua" programa sinple bat +Name[fa]=برنامۀ سادۀ ncurses Hello world +Name[fr]=Programme « Bonjour monde » simple en ncurses +Name[ga]=Ríomhchlár simplí "Hello World" le ncurses +Name[gl]=Programa sinxelo ncurses Ola mundo +Name[hu]=Egyszerű, Ncurses-alapú Hello world program +Name[it]=Semplice programma "Hello world" realizzato con ncurses +Name[ja]=ncurses を使った簡単な Hello World プログラム +Name[nds]=Eenfach ncurses-"Moin Welt"-Programm +Name[ne]=साधारण ncurses हेल्लो वोल्ड कार्यक्रम +Name[nl]=Een eenvoudig ncurses Hello World-programma +Name[pl]=Prosty program 'Witaj świecie' używający ncurses +Name[pt]=Programa simples Olá Mundo em ncurses +Name[pt_BR]=Programa simples Olá Mundo em ncurses +Name[ru]=Простое приложение Hello world на ncurses +Name[sk]=Jednoduchý "Ahoj svet" ncurses program +Name[sl]=Preprost program Hello world na osnovi ncurses +Name[sr]=Једноставан „Здраво свете“ програм за ncurses +Name[sr@Latn]=Jednostavan „Zdravo svete“ program za ncurses +Name[sv]=Enkelt ncurses Hello world-program +Name[tr]=Basit ncurses Merhaba Dünya programı +Name[zh_CN]=简单的 ncurses Hello world 程序 +Name[zh_TW]=簡單的 ncurses Hello world 程式 +Icon= +Category=C++ +Comment=Generates a simple ncurses based Hello world program in C++ +Comment[ca]=Genera un simple programa de Hello world en C++ i basat en ncurses +Comment[da]=Genererer et simpelt ncurses baseret Goddag verden program in C++ +Comment[de]=Erstellt ein einfaches, auf NCurses basierendes "Hello World"-Programm in C++ +Comment[el]=Δημιουργεί ένα απλό βασισμένο σε ncurses πρόγραμμα Γεια σου κόσμε σε C++ +Comment[es]=Genera un sencillo programa «Hola mundo» en C++ basado en ncurses +Comment[et]=Lihtsa "Tere, maailm" programmi loomine ncurses'i põhjal C++-s +Comment[eu]=ncurses-en oinarritako "Kaixo mundua" programa sinple bat C++ lengoaian +Comment[fa]=یک برنامۀ سادۀ Hello world در C++ بر مبنای ncurses تولید می‌کند +Comment[fr]=Génère un programme « Bonjour monde » simple basé sur ncurses en C++ +Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí "Hello World" bunaithe ar ncurses, i C++ +Comment[gl]=Xera un programa sinxelo Ola mundo baseado en ncurses en C++ +Comment[hu]=Létrehoz egy egyszerű, Ncurses-alapú Hello world programot C++-ban +Comment[it]=Genera un semplice programma di "Hello world" in C++ realizzato con ncurses +Comment[ja]=ncurses を使った簡単な Hello World プログラムを C++ で作成します +Comment[nds]=Stellt en eenfach op "ncurses" opbuut "Moin Welt"-Programm in C++ op +Comment[ne]=C++ मा हेल्लो वोल्ड कार्यक्रम आधारित साधारण ncurses उत्पन्न गर्दछ +Comment[nl]=Genereert een eenvoudig ncurses-gebaseerd Hello World-programma in C++ +Comment[pl]=Generuje prosty program 'Witaj świecie' używający ncurses i języka C++. +Comment[pt]=Gera um programa simples Olá Mundo em C++, baseado no 'ncurses' +Comment[pt_BR]=Gera um programa simples Olá Mundo em C++, baseado no 'ncurses' +Comment[ru]=Создание простого приложения Hello world на ncurses и C++ +Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" ncurses program v C++ +Comment[sl]=Ustvari preprost program Hello world na osnovi ncurses v C++ +Comment[sr]=Прави једноставан „Здраво свете“ програм на основу ncurses, у C++-у +Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program na osnovu ncurses, u C++-u +Comment[sv]=Skapar ett enkelt ncurses-baserat Hello world-program i C++ +Comment[tr]=C++'da ncurses tabanlı basit bir Merhaba Dünya programı yaratır. +Comment[zh_CN]=生成一个基于 ncurses 的 C++ Hello world 程序 +Comment[zh_TW]=產生一個簡單的用 C++ 語言與 ncurses 函式庫的 Hello world 程式 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=cppcurseshello.tar.gz + +[INCADMIN] +Type=include +File=%{tdevelop}/template-common/incadmin.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=%{src}/cpp-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE3] +Type=install +Source=%{src}/cpp-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE4] +Type=install +Source=%{src}/app-configure.in +Dest=%{dest}/configure.in + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE5] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE6] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[MSG] +Type=message +Comment=A simple hello world program using ncurses was created in %{dest} +Comment[ca]=Un simple programa de hello world usant ncurses ha estat creat en %{dest} +Comment[da]=Et simpelt Goddag verden program ved brug af ncurses blev oprettet i %{dest} +Comment[de]=Ein einfaches "Hello World"-Programm unter Verwendung von NCurses wurde in %{dest} erstellt. +Comment[el]=Ένα απλό πρόγραμμα Γεια σου Κόσμε χρησιμοποιώντας το ncurses δημιουργήθηκε στο %{dest} +Comment[es]=Un sencillo programa «Hola mundo» que usa ncurses ha sido creado en %{dest} +Comment[et]=Lihtne "Tere, maailm" programm ncurses'i põhjas loodi asukohta %{dest} +Comment[eu]=ncurses-en oinarritako "Kaixo mundua" programa sinple bat sortu da hemen: %{dest} +Comment[fa]=یک برنامۀ سادۀ hello world با استفاده از ncurses در %{dest} ایجاد شد +Comment[fr]=Un programme « Bonjour monde » simple utilisant ncurses a été créé dans %{dest} +Comment[ga]=Cruthaíodh ríomhchlár simplí "Hello World" le ncurses i %{dest} +Comment[gl]=Creouse un programa sinxelo ola mundo usando ncurses en in %{dest} +Comment[hu]=Létrejött egy egyszerű, Ncurses-alapú Hello world program itt: %{dest} +Comment[it]=È stato creato un programma di "hello world" che usa ncurses in %{dest} +Comment[ja]=ncurses を使った簡単な Hello World プログラムを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en eenfach "Moin Welt"-Programm opstellt, dat "ncurses" bruukt +Comment[ne]=ncurses प्रयोग गरेर एउटा हेल्लो वोल्ड कार्यक्रम %{dest} मा सिर्जना गरियो +Comment[nl]=Een eenvoudig Hallo Wereld-programma gebruikmakend van ncurses is aangemaakt in %{dest} +Comment[pl]=Prosty program 'Witaj świecie' używający ncurses został utworzony w %{dest} +Comment[pt]=Foi criado um programa simples Olá Mundo que usa o ncurses em %{dest} +Comment[pt_BR]=Foi criado um programa simples Olá Mundo que usa o ncurses em %{dest} +Comment[ru]=Простое приложение Hello world на ncurses создано в %{dest} +Comment[sk]=Jednoduchý "Ahoj svet" ncurses program bol vytvorený v %{dest} +Comment[sl]=Preprost program Hello world na osnovi ncurses je bil ustvarjen v %{dest} +Comment[sr]=Једноставан „Здраво свете“ на основу ncurses направљен је у %{dest} +Comment[sr@Latn]=Jednostavan „Zdravo svete“ na osnovu ncurses napravljen je u %{dest} +Comment[sv]=Ett enkelt Hello world-program som använder ncurses skapades i %{dest} +Comment[tr]=ncurses kullanan basit bir merhaba dünya programı %{dest} içinde yaratılmıştır. +Comment[zh_CN]=在 %{dest} 中创建了一个使用 ncurses 的 hello world 程序 +Comment[zh_TW]=一個簡單的使用 ncurses 函式庫的 hello world 程式已建立在 %{dest} diff --git a/languages/cpp/app_templates/cppcurseshello/cppcurseshello.tdevtemplate b/languages/cpp/app_templates/cppcurseshello/cppcurseshello.tdevtemplate deleted file mode 100644 index 5bd7ebe2..00000000 --- a/languages/cpp/app_templates/cppcurseshello/cppcurseshello.tdevtemplate +++ /dev/null @@ -1,143 +0,0 @@ -# TDE Config File -[General] -Name=Simple ncurses Hello world program -Name[ca]=Simple programa de Hello world per a ncurses -Name[da]=Simpelt ncurses Goddag verden program -Name[de]=Einfaches auf NCurses basierendes "Hello World"-Programm -Name[el]=Απλό ncurses πρόγραμμα Γεια σου κόσμε -Name[es]=Programa «Hola mundo» sencillo en ncurses -Name[et]=Lihtne "Tere, maailm" programm ncurses'i põhjal -Name[eu]=ncurses-en oinarritako "Kaixo mundua" programa sinple bat -Name[fa]=برنامۀ سادۀ ncurses Hello world -Name[fr]=Programme « Bonjour monde » simple en ncurses -Name[ga]=Ríomhchlár simplí "Hello World" le ncurses -Name[gl]=Programa sinxelo ncurses Ola mundo -Name[hu]=Egyszerű, Ncurses-alapú Hello world program -Name[it]=Semplice programma "Hello world" realizzato con ncurses -Name[ja]=ncurses を使った簡単な Hello World プログラム -Name[nds]=Eenfach ncurses-"Moin Welt"-Programm -Name[ne]=साधारण ncurses हेल्लो वोल्ड कार्यक्रम -Name[nl]=Een eenvoudig ncurses Hello World-programma -Name[pl]=Prosty program 'Witaj świecie' używający ncurses -Name[pt]=Programa simples Olá Mundo em ncurses -Name[pt_BR]=Programa simples Olá Mundo em ncurses -Name[ru]=Простое приложение Hello world на ncurses -Name[sk]=Jednoduchý "Ahoj svet" ncurses program -Name[sl]=Preprost program Hello world na osnovi ncurses -Name[sr]=Једноставан „Здраво свете“ програм за ncurses -Name[sr@Latn]=Jednostavan „Zdravo svete“ program za ncurses -Name[sv]=Enkelt ncurses Hello world-program -Name[tr]=Basit ncurses Merhaba Dünya programı -Name[zh_CN]=简单的 ncurses Hello world 程序 -Name[zh_TW]=簡單的 ncurses Hello world 程式 -Icon= -Category=C++ -Comment=Generates a simple ncurses based Hello world program in C++ -Comment[ca]=Genera un simple programa de Hello world en C++ i basat en ncurses -Comment[da]=Genererer et simpelt ncurses baseret Goddag verden program in C++ -Comment[de]=Erstellt ein einfaches, auf NCurses basierendes "Hello World"-Programm in C++ -Comment[el]=Δημιουργεί ένα απλό βασισμένο σε ncurses πρόγραμμα Γεια σου κόσμε σε C++ -Comment[es]=Genera un sencillo programa «Hola mundo» en C++ basado en ncurses -Comment[et]=Lihtsa "Tere, maailm" programmi loomine ncurses'i põhjal C++-s -Comment[eu]=ncurses-en oinarritako "Kaixo mundua" programa sinple bat C++ lengoaian -Comment[fa]=یک برنامۀ سادۀ Hello world در C++ بر مبنای ncurses تولید می‌کند -Comment[fr]=Génère un programme « Bonjour monde » simple basé sur ncurses en C++ -Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí "Hello World" bunaithe ar ncurses, i C++ -Comment[gl]=Xera un programa sinxelo Ola mundo baseado en ncurses en C++ -Comment[hu]=Létrehoz egy egyszerű, Ncurses-alapú Hello world programot C++-ban -Comment[it]=Genera un semplice programma di "Hello world" in C++ realizzato con ncurses -Comment[ja]=ncurses を使った簡単な Hello World プログラムを C++ で作成します -Comment[nds]=Stellt en eenfach op "ncurses" opbuut "Moin Welt"-Programm in C++ op -Comment[ne]=C++ मा हेल्लो वोल्ड कार्यक्रम आधारित साधारण ncurses उत्पन्न गर्दछ -Comment[nl]=Genereert een eenvoudig ncurses-gebaseerd Hello World-programma in C++ -Comment[pl]=Generuje prosty program 'Witaj świecie' używający ncurses i języka C++. -Comment[pt]=Gera um programa simples Olá Mundo em C++, baseado no 'ncurses' -Comment[pt_BR]=Gera um programa simples Olá Mundo em C++, baseado no 'ncurses' -Comment[ru]=Создание простого приложения Hello world на ncurses и C++ -Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" ncurses program v C++ -Comment[sl]=Ustvari preprost program Hello world na osnovi ncurses v C++ -Comment[sr]=Прави једноставан „Здраво свете“ програм на основу ncurses, у C++-у -Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program na osnovu ncurses, u C++-u -Comment[sv]=Skapar ett enkelt ncurses-baserat Hello world-program i C++ -Comment[tr]=C++'da ncurses tabanlı basit bir Merhaba Dünya programı yaratır. -Comment[zh_CN]=生成一个基于 ncurses 的 C++ Hello world 程序 -Comment[zh_TW]=產生一個簡單的用 C++ 語言與 ncurses 函式庫的 Hello world 程式 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=cppcurseshello.tar.gz - -[INCADMIN] -Type=include -File=%{tdevelop}/template-common/incadmin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/cpp-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE3] -Type=install -Source=%{src}/cpp-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE4] -Type=install -Source=%{src}/app-configure.in -Dest=%{dest}/configure.in - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE5] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE6] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[MSG] -Type=message -Comment=A simple hello world program using ncurses was created in %{dest} -Comment[ca]=Un simple programa de hello world usant ncurses ha estat creat en %{dest} -Comment[da]=Et simpelt Goddag verden program ved brug af ncurses blev oprettet i %{dest} -Comment[de]=Ein einfaches "Hello World"-Programm unter Verwendung von NCurses wurde in %{dest} erstellt. -Comment[el]=Ένα απλό πρόγραμμα Γεια σου Κόσμε χρησιμοποιώντας το ncurses δημιουργήθηκε στο %{dest} -Comment[es]=Un sencillo programa «Hola mundo» que usa ncurses ha sido creado en %{dest} -Comment[et]=Lihtne "Tere, maailm" programm ncurses'i põhjas loodi asukohta %{dest} -Comment[eu]=ncurses-en oinarritako "Kaixo mundua" programa sinple bat sortu da hemen: %{dest} -Comment[fa]=یک برنامۀ سادۀ hello world با استفاده از ncurses در %{dest} ایجاد شد -Comment[fr]=Un programme « Bonjour monde » simple utilisant ncurses a été créé dans %{dest} -Comment[ga]=Cruthaíodh ríomhchlár simplí "Hello World" le ncurses i %{dest} -Comment[gl]=Creouse un programa sinxelo ola mundo usando ncurses en in %{dest} -Comment[hu]=Létrejött egy egyszerű, Ncurses-alapú Hello world program itt: %{dest} -Comment[it]=È stato creato un programma di "hello world" che usa ncurses in %{dest} -Comment[ja]=ncurses を使った簡単な Hello World プログラムを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en eenfach "Moin Welt"-Programm opstellt, dat "ncurses" bruukt -Comment[ne]=ncurses प्रयोग गरेर एउटा हेल्लो वोल्ड कार्यक्रम %{dest} मा सिर्जना गरियो -Comment[nl]=Een eenvoudig Hallo Wereld-programma gebruikmakend van ncurses is aangemaakt in %{dest} -Comment[pl]=Prosty program 'Witaj świecie' używający ncurses został utworzony w %{dest} -Comment[pt]=Foi criado um programa simples Olá Mundo que usa o ncurses em %{dest} -Comment[pt_BR]=Foi criado um programa simples Olá Mundo que usa o ncurses em %{dest} -Comment[ru]=Простое приложение Hello world на ncurses создано в %{dest} -Comment[sk]=Jednoduchý "Ahoj svet" ncurses program bol vytvorený v %{dest} -Comment[sl]=Preprost program Hello world na osnovi ncurses je bil ustvarjen v %{dest} -Comment[sr]=Једноставан „Здраво свете“ на основу ncurses направљен је у %{dest} -Comment[sr@Latn]=Jednostavan „Zdravo svete“ na osnovu ncurses napravljen je u %{dest} -Comment[sv]=Ett enkelt Hello world-program som använder ncurses skapades i %{dest} -Comment[tr]=ncurses kullanan basit bir merhaba dünya programı %{dest} içinde yaratılmıştır. -Comment[zh_CN]=在 %{dest} 中创建了一个使用 ncurses 的 hello world 程序 -Comment[zh_TW]=一個簡單的使用 ncurses 函式庫的 hello world 程式已建立在 %{dest} diff --git a/languages/cpp/app_templates/cpphello/CMakeLists.txt b/languages/cpp/app_templates/cpphello/CMakeLists.txt index 9227cfcd..d77effea 100644 --- a/languages/cpp/app_templates/cpphello/CMakeLists.txt +++ b/languages/cpp/app_templates/cpphello/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( cpphello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/cpphello.tar.gz cpphello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - cpphello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + cpphello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/cpphello/Makefile.am b/languages/cpp/app_templates/cpphello/Makefile.am index 930a46e5..2ba017c2 100644 --- a/languages/cpp/app_templates/cpphello/Makefile.am +++ b/languages/cpp/app_templates/cpphello/Makefile.am @@ -3,10 +3,10 @@ dataFiles = main.cpp src-Makefile.am cpp-Makefile.am cpp-Makefile.cvs \ templateName = cpphello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/cpphello/app.tdevelop b/languages/cpp/app_templates/cpphello/app.tdevelop index d771aedf..98919071 100644 --- a/languages/cpp/app_templates/cpphello/app.tdevelop +++ b/languages/cpp/app_templates/cpphello/app.tdevelop @@ -11,7 +11,7 @@ Code - + src/%{APPNAMELC} debug @@ -37,8 +37,8 @@ -O0 -g3 - - + + ada ada_bugs_gcc @@ -83,23 +83,23 @@ TDE Libraries (Doxygen) - - + + - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/cpphello/cpphello.kdevtemplate b/languages/cpp/app_templates/cpphello/cpphello.kdevtemplate new file mode 100644 index 00000000..ee529159 --- /dev/null +++ b/languages/cpp/app_templates/cpphello/cpphello.kdevtemplate @@ -0,0 +1,145 @@ +# TDE Config File +[General] +Name=Simple Hello world program +Name[ca]=Simple programa Hello world +Name[da]=Simpelt Goddag verden program +Name[de]=Ein einfaches "Hello World"-Programm +Name[el]=Απλό πρόγραμμα Γεια σου Κόσμε +Name[es]=Programa «Hola mundo» sencillo +Name[et]=Lihtne "Tere, maailm" programm +Name[eu]="Kaixo mundua" programa sinplea +Name[fa]=برنامۀ سادۀ Hello world +Name[fr]=Programme « Bonjour monde » simple +Name[ga]=Ríomhchlár simplí "Hello World" +Name[gl]=Programa sinxelo Ola mundo +Name[hu]=Egyszerű Hello world program +Name[it]=Semplice programma di "Hello world" +Name[ja]=簡単な Hello world プログラム +Name[ms]=Program Hello World mudah +Name[nds]=En eenfach "Moin Welt"-Programm +Name[ne]=साधारण हेल्लो वोल्ड कार्यक्रम +Name[nl]=Eenvoudig 'Hello World' programma +Name[pl]=Prosty program witaj świecie +Name[pt]=Programa simples Olá Mundo +Name[pt_BR]=Programa simples Olá Mundo +Name[ru]=Простая программа Hello world +Name[sk]=Jednoduchý "Ahoj svet" program +Name[sl]=Preprost program Hello world +Name[sr]=Једноставан „Здраво свете“ програм +Name[sr@Latn]=Jednostavan „Zdravo svete“ program +Name[sv]=Enkelt Hello world-program +Name[tr]=Basit Merhaba dünya programı +Name[zh_CN]=简单的 Hello world 程序 +Name[zh_TW]=簡單的 Hello world 程式 +Icon=cpphello.png +Category=C++ +Comment=Generates a simple Hello world program in C++ +Comment[ca]=Genera un simple programa de Hello world en C++ +Comment[da]=Genererer et simpelt Goddag verden program in C++ +Comment[de]=Erstellt ein einfaches "Hello World"-Programm in C++ +Comment[el]=Δημιουργεί ένα απλό πρόγραμμα Γεια σου Κόσμε σε C++ +Comment[es]=Genera un sencillo programa «Hola mundo» en C++ +Comment[et]=Lihtsa "Tere, maailm" programmi loomine C++-s +Comment[eu]="Kaixo mundua" programa sinple bat sortzen du C++ lengoaian +Comment[fa]=یک برنامۀ سادۀ Hello world در C++ تولید می‌کند +Comment[fr]=Génère un programme « Bonjour monde » simple en C++ +Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí "Hello World" i C++ +Comment[gl]=Xera un programa sinxelo Ola mundo en C++ +Comment[hu]=Létrehoz egy egyszerű Hello world programot C++-ban +Comment[it]=Genera un semplice programma di "Hello world" in C++ +Comment[ja]=簡単な Hello World プログラムを C++ で作成します +Comment[nds]=Stellt en eenfach "Moin Welt"-Programm in C++ op +Comment[ne]=C++ मा एउटा साधारण हेल्लो वोल्ड कार्यक्रम उत्पन्न गर्दछ +Comment[nl]=Genereert een eenvoudig Hello World-programma in C++ +Comment[pl]=Generuje prosty program 'Witaj świecie' w języku C++ +Comment[pt]=Gera um programa simples Olá Mundo em C++ +Comment[pt_BR]=Gera um programa simples Olá Mundo em C++ +Comment[ru]=Создание простого приложения Hello world на C++ +Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program v C++ +Comment[sl]=Ustvari preprost program Hello world v C++ +Comment[sr]=Прави једноставан „Здраво свете“ програм у C++-у +Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program u C++-u +Comment[sv]=Skapar ett enkelt Hello world-program i C++ +Comment[tr]=C++'da basit bir Merhaba Dünya programı yaratır. +Comment[zh_CN]=生成 C++ 的 Hello world 程序 +Comment[zh_TW]=產生一個簡單的 C++ 的 Hello world 程式 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=cpphello.tar.gz + +[INCADMIN] +Type=include +File=%{tdevelop}/template-common/incadmin.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=%{src}/cpp-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE3] +Type=install +Source=%{src}/cpp-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE4] +Type=install +Source=%{src}/configure.in +Dest=%{dest}/configure.in + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE5] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE6] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[MSG] +Type=message +Comment=A Simple Hello World program was created in %{dest} +Comment[ca]=Un simple programa de Hello World ha estat creat en %{dest} +Comment[da]=Et simpelt Goddag verden program blev oprettet i %{dest} +Comment[de]=Ein einfaches "Hello World"-Programm wurde in %{dest} erstellt. +Comment[el]=Ένα απλό πρόγραμμα Γεια σου Κόσμε δημιουργήθηκε στο %{dest} +Comment[es]=Un sencillo programa «Hola mundo» ha sido creado en %{dest} +Comment[et]=Lihtne "Tere, maailm" programm loodi asukohta %{dest} +Comment[eu]="Kaixo mundua" programa sinple bat sortu da hemen: %{dest} +Comment[fa]=یک برنامۀ سادۀ Hello World در %{dest} ایجاد شد +Comment[fr]=Un programme « Bonjour monde » simple a été créé dans %{dest} +Comment[ga]=Cruthaíodh ríomhchlár simplí "Hello World" i %{dest} +Comment[gl]=Creouse un programa sinxelo Ola mundo en %{dest} +Comment[hu]=Létrejött egy egyszerű Hello world program itt: %{dest} +Comment[it]=È stato creato un semplice programma di "Hello World" in %{dest} +Comment[ja]=簡単な Hello World プログラムを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en eenfach "Moin Welt"-Programm opstellt +Comment[ne]=एउटा साधारण हेल्लो वोल्ड कार्यक्रम %{dest} मा सिर्जना गरियो +Comment[nl]=Een eenvoudig Hello World-programma is aangemaakt in %{dest} +Comment[pl]=Prosty program 'Witaj świecie' został utworzony w %{dest} +Comment[pt]=Foi criado um programa simples Olá Mundo em %{dest} +Comment[pt_BR]=Foi criado um programa simples Olá Mundo em %{dest} +Comment[ru]=Простое приложение Hello world на C++ создано в %{dest} +Comment[sk]=Jednoduchý "Ahoj svet" program bol vytvorený v %{dest} +Comment[sl]=Preprost program Hello World je bil ustvarjen v %{dest} +Comment[sr]=Једноставан „Здраво свете“ програм направљен је у %{dest} +Comment[sr@Latn]=Jednostavan „Zdravo svete“ program napravljen je u %{dest} +Comment[sv]=Ett enkelt Hello world-program skapades i %{dest} +Comment[tr]=Basit bir Merhaba Dünya programı %{dest} içinde yaratılmıştır. +Comment[zh_CN]=在 %{dest} 中创建了 Hello world 程序 +Comment[zh_TW]=一個簡單的 Hello World 程式已建立於 %{dest} + diff --git a/languages/cpp/app_templates/cpphello/cpphello.tdevtemplate b/languages/cpp/app_templates/cpphello/cpphello.tdevtemplate deleted file mode 100644 index 1b4fc2fc..00000000 --- a/languages/cpp/app_templates/cpphello/cpphello.tdevtemplate +++ /dev/null @@ -1,145 +0,0 @@ -# TDE Config File -[General] -Name=Simple Hello world program -Name[ca]=Simple programa Hello world -Name[da]=Simpelt Goddag verden program -Name[de]=Ein einfaches "Hello World"-Programm -Name[el]=Απλό πρόγραμμα Γεια σου Κόσμε -Name[es]=Programa «Hola mundo» sencillo -Name[et]=Lihtne "Tere, maailm" programm -Name[eu]="Kaixo mundua" programa sinplea -Name[fa]=برنامۀ سادۀ Hello world -Name[fr]=Programme « Bonjour monde » simple -Name[ga]=Ríomhchlár simplí "Hello World" -Name[gl]=Programa sinxelo Ola mundo -Name[hu]=Egyszerű Hello world program -Name[it]=Semplice programma di "Hello world" -Name[ja]=簡単な Hello world プログラム -Name[ms]=Program Hello World mudah -Name[nds]=En eenfach "Moin Welt"-Programm -Name[ne]=साधारण हेल्लो वोल्ड कार्यक्रम -Name[nl]=Eenvoudig 'Hello World' programma -Name[pl]=Prosty program witaj świecie -Name[pt]=Programa simples Olá Mundo -Name[pt_BR]=Programa simples Olá Mundo -Name[ru]=Простая программа Hello world -Name[sk]=Jednoduchý "Ahoj svet" program -Name[sl]=Preprost program Hello world -Name[sr]=Једноставан „Здраво свете“ програм -Name[sr@Latn]=Jednostavan „Zdravo svete“ program -Name[sv]=Enkelt Hello world-program -Name[tr]=Basit Merhaba dünya programı -Name[zh_CN]=简单的 Hello world 程序 -Name[zh_TW]=簡單的 Hello world 程式 -Icon=cpphello.png -Category=C++ -Comment=Generates a simple Hello world program in C++ -Comment[ca]=Genera un simple programa de Hello world en C++ -Comment[da]=Genererer et simpelt Goddag verden program in C++ -Comment[de]=Erstellt ein einfaches "Hello World"-Programm in C++ -Comment[el]=Δημιουργεί ένα απλό πρόγραμμα Γεια σου Κόσμε σε C++ -Comment[es]=Genera un sencillo programa «Hola mundo» en C++ -Comment[et]=Lihtsa "Tere, maailm" programmi loomine C++-s -Comment[eu]="Kaixo mundua" programa sinple bat sortzen du C++ lengoaian -Comment[fa]=یک برنامۀ سادۀ Hello world در C++ تولید می‌کند -Comment[fr]=Génère un programme « Bonjour monde » simple en C++ -Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí "Hello World" i C++ -Comment[gl]=Xera un programa sinxelo Ola mundo en C++ -Comment[hu]=Létrehoz egy egyszerű Hello world programot C++-ban -Comment[it]=Genera un semplice programma di "Hello world" in C++ -Comment[ja]=簡単な Hello World プログラムを C++ で作成します -Comment[nds]=Stellt en eenfach "Moin Welt"-Programm in C++ op -Comment[ne]=C++ मा एउटा साधारण हेल्लो वोल्ड कार्यक्रम उत्पन्न गर्दछ -Comment[nl]=Genereert een eenvoudig Hello World-programma in C++ -Comment[pl]=Generuje prosty program 'Witaj świecie' w języku C++ -Comment[pt]=Gera um programa simples Olá Mundo em C++ -Comment[pt_BR]=Gera um programa simples Olá Mundo em C++ -Comment[ru]=Создание простого приложения Hello world на C++ -Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program v C++ -Comment[sl]=Ustvari preprost program Hello world v C++ -Comment[sr]=Прави једноставан „Здраво свете“ програм у C++-у -Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program u C++-u -Comment[sv]=Skapar ett enkelt Hello world-program i C++ -Comment[tr]=C++'da basit bir Merhaba Dünya programı yaratır. -Comment[zh_CN]=生成 C++ 的 Hello world 程序 -Comment[zh_TW]=產生一個簡單的 C++ 的 Hello world 程式 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=cpphello.tar.gz - -[INCADMIN] -Type=include -File=%{tdevelop}/template-common/incadmin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/cpp-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE3] -Type=install -Source=%{src}/cpp-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE4] -Type=install -Source=%{src}/configure.in -Dest=%{dest}/configure.in - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE5] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE6] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[MSG] -Type=message -Comment=A Simple Hello World program was created in %{dest} -Comment[ca]=Un simple programa de Hello World ha estat creat en %{dest} -Comment[da]=Et simpelt Goddag verden program blev oprettet i %{dest} -Comment[de]=Ein einfaches "Hello World"-Programm wurde in %{dest} erstellt. -Comment[el]=Ένα απλό πρόγραμμα Γεια σου Κόσμε δημιουργήθηκε στο %{dest} -Comment[es]=Un sencillo programa «Hola mundo» ha sido creado en %{dest} -Comment[et]=Lihtne "Tere, maailm" programm loodi asukohta %{dest} -Comment[eu]="Kaixo mundua" programa sinple bat sortu da hemen: %{dest} -Comment[fa]=یک برنامۀ سادۀ Hello World در %{dest} ایجاد شد -Comment[fr]=Un programme « Bonjour monde » simple a été créé dans %{dest} -Comment[ga]=Cruthaíodh ríomhchlár simplí "Hello World" i %{dest} -Comment[gl]=Creouse un programa sinxelo Ola mundo en %{dest} -Comment[hu]=Létrejött egy egyszerű Hello world program itt: %{dest} -Comment[it]=È stato creato un semplice programma di "Hello World" in %{dest} -Comment[ja]=簡単な Hello World プログラムを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en eenfach "Moin Welt"-Programm opstellt -Comment[ne]=एउटा साधारण हेल्लो वोल्ड कार्यक्रम %{dest} मा सिर्जना गरियो -Comment[nl]=Een eenvoudig Hello World-programma is aangemaakt in %{dest} -Comment[pl]=Prosty program 'Witaj świecie' został utworzony w %{dest} -Comment[pt]=Foi criado um programa simples Olá Mundo em %{dest} -Comment[pt_BR]=Foi criado um programa simples Olá Mundo em %{dest} -Comment[ru]=Простое приложение Hello world на C++ создано в %{dest} -Comment[sk]=Jednoduchý "Ahoj svet" program bol vytvorený v %{dest} -Comment[sl]=Preprost program Hello World je bil ustvarjen v %{dest} -Comment[sr]=Једноставан „Здраво свете“ програм направљен је у %{dest} -Comment[sr@Latn]=Jednostavan „Zdravo svete“ program napravljen je u %{dest} -Comment[sv]=Ett enkelt Hello world-program skapades i %{dest} -Comment[tr]=Basit bir Merhaba Dünya programı %{dest} içinde yaratılmıştır. -Comment[zh_CN]=在 %{dest} 中创建了 Hello world 程序 -Comment[zh_TW]=一個簡單的 Hello World 程式已建立於 %{dest} - diff --git a/languages/cpp/app_templates/cppsdlhello/CMakeLists.txt b/languages/cpp/app_templates/cppsdlhello/CMakeLists.txt index 46e4a57f..b5e16259 100644 --- a/languages/cpp/app_templates/cppsdlhello/CMakeLists.txt +++ b/languages/cpp/app_templates/cppsdlhello/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( cppsdlhello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/cppsdlhello.tar.gz cppsdlhello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - cppsdlhello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + cppsdlhello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/cppsdlhello/Makefile.am b/languages/cpp/app_templates/cppsdlhello/Makefile.am index 3743cf77..c0357370 100644 --- a/languages/cpp/app_templates/cppsdlhello/Makefile.am +++ b/languages/cpp/app_templates/cppsdlhello/Makefile.am @@ -2,10 +2,10 @@ dataFiles = main.cpp src-Makefile.am cpp-Makefile.am cpp-Makefile.cvs configur templateName = cppsdlhello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/cppsdlhello/app.tdevelop b/languages/cpp/app_templates/cppsdlhello/app.tdevelop index 39760184..3a60526f 100644 --- a/languages/cpp/app_templates/cppsdlhello/app.tdevelop +++ b/languages/cpp/app_templates/cppsdlhello/app.tdevelop @@ -12,7 +12,7 @@ SDL - + src/%{APPNAMELC} debug @@ -43,8 +43,8 @@ -lSDL - - + + ada ada_bugs_gcc @@ -87,17 +87,17 @@ TDE Libraries (Doxygen) - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/cppsdlhello/cppsdlhello.kdevtemplate b/languages/cpp/app_templates/cppsdlhello/cppsdlhello.kdevtemplate new file mode 100644 index 00000000..5e559acb --- /dev/null +++ b/languages/cpp/app_templates/cppsdlhello/cppsdlhello.kdevtemplate @@ -0,0 +1,150 @@ +# TDE Config File +[General] +Name=Simple SDL program +Name[ca]=Simple programa per a SDL +Name[da]=Simpelt SDL-program +Name[de]=Einfaches SDL-Programm +Name[el]=Απλό πρόγραμμα SDL +Name[es]=Programa SDL sencillo +Name[et]=Lihtne SDL programm +Name[eu]=SDL programa sinplea +Name[fa]=برنامۀ سادۀ SDL +Name[fr]=Programme SDL simple +Name[ga]=Ríomhchlár simplí SDL +Name[gl]=Programa sinxelo SDL +Name[hu]=Egyszerű SDL-alkalmazás +Name[it]=Semplice programma SDL +Name[ja]=簡単な SDL プログラム +Name[nds]=Eenfach SDL-Programm +Name[ne]=साधारण SDL कार्यक्रम +Name[nl]=Eenvoudig SDL-programma +Name[pl]=Prosty program używający SDL +Name[pt]=Programa simples do SDL +Name[pt_BR]=Programa simples do SDL +Name[ru]=Простое приложение SDL +Name[sk]=Jednoduchý SDL program +Name[sl]=Preprost program SDL +Name[sr]=Једноставан SDL програм +Name[sr@Latn]=Jednostavan SDL program +Name[sv]=Enkelt SDL-program +Name[tg]=Барноманависии SDL +Name[tr]=Basit bir SDL Programı +Name[zh_CN]=简单的 SDL 程序 +Name[zh_TW]=簡單的 SDL 程式 +Icon=cppsdl.png +Category=C++ +Comment=Generates a simple SDL program in C++ +Comment[ca]=Genera un simple programa en SDL en C++ +Comment[da]=Genererer et simpelt SDL program i C++ +Comment[de]=Erstellt ein einfaches SDL-Programm in C++ +Comment[el]=Δημιουργεί ένα απλό πρόγραμμα SDL σε C++ +Comment[es]=Genera un sencillo programa SDL en C++ +Comment[et]=Lihtsa SDL programmi loomise C++-s +Comment[eu]=SDL programa sinple bat sortzen du C++ lengoaian +Comment[fa]=یک برنامۀ سادۀ SDL در C++ تولید می‌کند +Comment[fr]=Génère un programme SDL simple en C++ +Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí SDL i C++ +Comment[gl]=Xera un programa sinxelo SDL en C++ +Comment[hu]=Létrehoz egy egyszerű SDL-alkalmazást C++-ban +Comment[it]=Genera un semplice programma SDL in C++ +Comment[ja]=簡単な SDL プログラムを C++ で作成します +Comment[nds]=Stellt en eenfach SDL-Programm in C++ op +Comment[ne]= C++ मा साधारण SDL कार्यक्रम उत्पन्न गर्दछ +Comment[nl]=Genereert een eenvoudig SDL-programma in C++ +Comment[pl]=Generuje prosty program używający SDL w C++ +Comment[pt]=Gera um programa simples de SDL em C++ +Comment[pt_BR]=Gera um programa simples de SDL em C++ +Comment[ru]=Создание простого приложения SDL на C++ +Comment[sk]=Vygeneruje jednoduchý SDL program v C++ +Comment[sl]=Ustvari preprost program SDL v C++ +Comment[sr]=Прави једноставан SDL програм у C++-у +Comment[sr@Latn]=Pravi jednostavan SDL program u C++-u +Comment[sv]=Skapar ett enkelt SDL-program i C++ +Comment[tr]=C++'da basit bir SDL programı yaratır +Comment[zh_CN]=生成 C++ 的简单 SDL 程序 +Comment[zh_TW]=產生一個簡單的 C++ SDL 程式 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=cppsdlhello.tar.gz + +[INCADMIN] +Type=include +File=%{tdevelop}/template-common/incadmin.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=%{src}/cpp-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE3] +Type=install +Source=%{src}/cpp-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE4] +Type=install +Source=%{src}/configure.in +Dest=%{dest}/configure.in + +[FILE5] +Type=install +Source=%{src}/acinclude.m4 +Dest=%{dest}/acinclude.m4 + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE6] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE7] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + + +[MSG] +Type=message +Comment=A simple SDL program was created in %{dest} +Comment[ca]=Un simple programa en SDL ha estat creat en %{dest} +Comment[da]=Et simpelt SDL-program blev oprettet i %{dest} +Comment[de]=Ein einfaches SDL-Programm wurde in %{dest} erstellt. +Comment[el]=Ένα απλό πρόγραμμα SDL δημιουργήθηκε στο %{dest} +Comment[es]=Un sencillo programa SDL ha sido creado en %{dest} +Comment[et]=Lihtne SDL programm loodi asukohta %{dest} +Comment[eu]=SDL programa sinple bat soru da hemen: %{dest} +Comment[fa]=یک برنامۀ سادۀ SDL در %{dest} ایجاد شد +Comment[fr]=Un programme SDL simple a été créé dans %{dest} +Comment[ga]=Cruthaíodh ríomhchlár simplí SDL i %{dest} +Comment[gl]=Creouse un programa sinxelo SDL en %{dest} +Comment[hu]=Létrejött egy egyszerű SDL-alkalmazás itt: %{dest} +Comment[it]=È stato creato un semplice programma SDL in %{dest} +Comment[ja]=簡単な SDL プログラムを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en eenfach SDL-Programm opstellt +Comment[ne]=एउटा साधारण SDL कार्यक्रम %{dest} मा सिर्जना गरियो +Comment[nl]=Een eenvoudig SDL-programma is aangemaakt in %{dest} +Comment[pl]=Prosty program używający SDL został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação simples em SDL em %{dest} +Comment[pt_BR]=Foi criada uma aplicação simples em SDL em %{dest} +Comment[ru]=Простое приложение SDL создано в %{dest} +Comment[sk]=Jednoduchý SDL program bol vytvorený v %{dest} +Comment[sl]=Preprost program SDL je bil ustvarjen v %{dest} +Comment[sr]=Једноставан SDL програм направљен је у %{dest} +Comment[sr@Latn]=Jednostavan SDL program napravljen je u %{dest} +Comment[sv]=Ett enkelt SDL-program skapades i %{dest} +Comment[tr]=Basit bir SDL programı %{dest} içinde yaratılmıştır. +Comment[zh_CN]=在 %{dest} 中创建了简单的 SDL 程序 +Comment[zh_TW]=一個簡單的 SDL 程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/cppsdlhello/cppsdlhello.tdevtemplate b/languages/cpp/app_templates/cppsdlhello/cppsdlhello.tdevtemplate deleted file mode 100644 index e99f52ab..00000000 --- a/languages/cpp/app_templates/cppsdlhello/cppsdlhello.tdevtemplate +++ /dev/null @@ -1,150 +0,0 @@ -# TDE Config File -[General] -Name=Simple SDL program -Name[ca]=Simple programa per a SDL -Name[da]=Simpelt SDL-program -Name[de]=Einfaches SDL-Programm -Name[el]=Απλό πρόγραμμα SDL -Name[es]=Programa SDL sencillo -Name[et]=Lihtne SDL programm -Name[eu]=SDL programa sinplea -Name[fa]=برنامۀ سادۀ SDL -Name[fr]=Programme SDL simple -Name[ga]=Ríomhchlár simplí SDL -Name[gl]=Programa sinxelo SDL -Name[hu]=Egyszerű SDL-alkalmazás -Name[it]=Semplice programma SDL -Name[ja]=簡単な SDL プログラム -Name[nds]=Eenfach SDL-Programm -Name[ne]=साधारण SDL कार्यक्रम -Name[nl]=Eenvoudig SDL-programma -Name[pl]=Prosty program używający SDL -Name[pt]=Programa simples do SDL -Name[pt_BR]=Programa simples do SDL -Name[ru]=Простое приложение SDL -Name[sk]=Jednoduchý SDL program -Name[sl]=Preprost program SDL -Name[sr]=Једноставан SDL програм -Name[sr@Latn]=Jednostavan SDL program -Name[sv]=Enkelt SDL-program -Name[tg]=Барноманависии SDL -Name[tr]=Basit bir SDL Programı -Name[zh_CN]=简单的 SDL 程序 -Name[zh_TW]=簡單的 SDL 程式 -Icon=cppsdl.png -Category=C++ -Comment=Generates a simple SDL program in C++ -Comment[ca]=Genera un simple programa en SDL en C++ -Comment[da]=Genererer et simpelt SDL program i C++ -Comment[de]=Erstellt ein einfaches SDL-Programm in C++ -Comment[el]=Δημιουργεί ένα απλό πρόγραμμα SDL σε C++ -Comment[es]=Genera un sencillo programa SDL en C++ -Comment[et]=Lihtsa SDL programmi loomise C++-s -Comment[eu]=SDL programa sinple bat sortzen du C++ lengoaian -Comment[fa]=یک برنامۀ سادۀ SDL در C++ تولید می‌کند -Comment[fr]=Génère un programme SDL simple en C++ -Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí SDL i C++ -Comment[gl]=Xera un programa sinxelo SDL en C++ -Comment[hu]=Létrehoz egy egyszerű SDL-alkalmazást C++-ban -Comment[it]=Genera un semplice programma SDL in C++ -Comment[ja]=簡単な SDL プログラムを C++ で作成します -Comment[nds]=Stellt en eenfach SDL-Programm in C++ op -Comment[ne]= C++ मा साधारण SDL कार्यक्रम उत्पन्न गर्दछ -Comment[nl]=Genereert een eenvoudig SDL-programma in C++ -Comment[pl]=Generuje prosty program używający SDL w C++ -Comment[pt]=Gera um programa simples de SDL em C++ -Comment[pt_BR]=Gera um programa simples de SDL em C++ -Comment[ru]=Создание простого приложения SDL на C++ -Comment[sk]=Vygeneruje jednoduchý SDL program v C++ -Comment[sl]=Ustvari preprost program SDL v C++ -Comment[sr]=Прави једноставан SDL програм у C++-у -Comment[sr@Latn]=Pravi jednostavan SDL program u C++-u -Comment[sv]=Skapar ett enkelt SDL-program i C++ -Comment[tr]=C++'da basit bir SDL programı yaratır -Comment[zh_CN]=生成 C++ 的简单 SDL 程序 -Comment[zh_TW]=產生一個簡單的 C++ SDL 程式 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=cppsdlhello.tar.gz - -[INCADMIN] -Type=include -File=%{tdevelop}/template-common/incadmin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/cpp-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE3] -Type=install -Source=%{src}/cpp-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE4] -Type=install -Source=%{src}/configure.in -Dest=%{dest}/configure.in - -[FILE5] -Type=install -Source=%{src}/acinclude.m4 -Dest=%{dest}/acinclude.m4 - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE6] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE7] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - - -[MSG] -Type=message -Comment=A simple SDL program was created in %{dest} -Comment[ca]=Un simple programa en SDL ha estat creat en %{dest} -Comment[da]=Et simpelt SDL-program blev oprettet i %{dest} -Comment[de]=Ein einfaches SDL-Programm wurde in %{dest} erstellt. -Comment[el]=Ένα απλό πρόγραμμα SDL δημιουργήθηκε στο %{dest} -Comment[es]=Un sencillo programa SDL ha sido creado en %{dest} -Comment[et]=Lihtne SDL programm loodi asukohta %{dest} -Comment[eu]=SDL programa sinple bat soru da hemen: %{dest} -Comment[fa]=یک برنامۀ سادۀ SDL در %{dest} ایجاد شد -Comment[fr]=Un programme SDL simple a été créé dans %{dest} -Comment[ga]=Cruthaíodh ríomhchlár simplí SDL i %{dest} -Comment[gl]=Creouse un programa sinxelo SDL en %{dest} -Comment[hu]=Létrejött egy egyszerű SDL-alkalmazás itt: %{dest} -Comment[it]=È stato creato un semplice programma SDL in %{dest} -Comment[ja]=簡単な SDL プログラムを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en eenfach SDL-Programm opstellt -Comment[ne]=एउटा साधारण SDL कार्यक्रम %{dest} मा सिर्जना गरियो -Comment[nl]=Een eenvoudig SDL-programma is aangemaakt in %{dest} -Comment[pl]=Prosty program używający SDL został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação simples em SDL em %{dest} -Comment[pt_BR]=Foi criada uma aplicação simples em SDL em %{dest} -Comment[ru]=Простое приложение SDL создано в %{dest} -Comment[sk]=Jednoduchý SDL program bol vytvorený v %{dest} -Comment[sl]=Preprost program SDL je bil ustvarjen v %{dest} -Comment[sr]=Једноставан SDL програм направљен је у %{dest} -Comment[sr@Latn]=Jednostavan SDL program napravljen je u %{dest} -Comment[sv]=Ett enkelt SDL-program skapades i %{dest} -Comment[tr]=Basit bir SDL programı %{dest} içinde yaratılmıştır. -Comment[zh_CN]=在 %{dest} 中创建了简单的 SDL 程序 -Comment[zh_TW]=一個簡單的 SDL 程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/dcopservice/CMakeLists.txt b/languages/cpp/app_templates/dcopservice/CMakeLists.txt index d2e5458b..c3a2397b 100644 --- a/languages/cpp/app_templates/dcopservice/CMakeLists.txt +++ b/languages/cpp/app_templates/dcopservice/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( dcopservice.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/dcopservice.tar.gz dcopservice.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - dcopservice.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + dcopservice.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/dcopservice/Makefile.am b/languages/cpp/app_templates/dcopservice/Makefile.am index 35b114d2..dddb4916 100644 --- a/languages/cpp/app_templates/dcopservice/Makefile.am +++ b/languages/cpp/app_templates/dcopservice/Makefile.am @@ -4,10 +4,10 @@ dataFiles = dcopservice.desktop dcopservice.png dcopservice.h \ templateName = dcopservice ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/dcopservice/dcopservice.kdevtemplate b/languages/cpp/app_templates/dcopservice/dcopservice.kdevtemplate new file mode 100644 index 00000000..a4c08a28 --- /dev/null +++ b/languages/cpp/app_templates/dcopservice/dcopservice.kdevtemplate @@ -0,0 +1,202 @@ +# TDE Config File +[General] +Name=TDE DCOP Service +Name[br]=Servij DCOP TDE +Name[ca]=Servei DCOP per al TDE +Name[da]=TDE DCOP-service +Name[de]=TDE-DCOP-Dienst +Name[el]=Υπηρεσία TDE DCOP +Name[es]=Servicio DCOP de TDE +Name[et]=TDE DCOP-teenus +Name[eu]=TDE-ren DCOP zerbitzua +Name[fa]=خدمت TDE DCOP +Name[fr]=Service DCOP TDE +Name[ga]=Seirbhís DCOP TDE +Name[gl]=Servicio DCOP de TDE +Name[hu]=TDE DCOP-szolgáltatás +Name[it]=Servizio DCOP di TDE +Name[ja]=TDE DCOP サービス +Name[nds]=TDE-DCOP-Deenst +Name[ne]=TDE DCOP सेवा +Name[nl]=TDE DCOP-service +Name[pl]=Usługa TDE DCOP +Name[pt]=Serviço de DCOP do TDE +Name[pt_BR]=Serviço de DCOP do TDE +Name[ru]=Сервис DCOP +Name[sk]=TDE DCOP služba +Name[sl]=Storitev DCOP za TDE +Name[sr]=TDE DCOP сервис +Name[sr@Latn]=TDE DCOP servis +Name[sv]=TDE:s DCOP-tjänst +Name[tg]=Хизмати TDE DCOP +Name[tr]=TDE DCOP Hizmeti +Name[zh_CN]=TDE DCOP 服务 +Name[zh_TW]=TDE DCOP 服務 +Icon=kdcop.png +Category=C++/TDE +Comment=Generates a framework for a TDE DCOP service and client access library. +Comment[ca]=Genera una infraestructura per a un servei DCOP de TDE i la biblioteca d'accés del client. +Comment[da]=Genererer et skelet for en TDE dcop-tjeneste og klientadgangsbibliotek. +Comment[de]=Erstellt das Grundgerüst für einen TDE-DCOP-Dienst und eine Bibliothek für den Client-Zugriff. +Comment[el]=Δημιουργεί ένα πλαίσιο για μια υπηρεσία TDE DCOP και μια βιβλιοθήκη πρόσβασης πελάτη. +Comment[es]=Genera una infraestructura para un servicio DCOP de TDE y una biblioteca de acceso cliente. +Comment[et]=TDE DCOP-teenuse raamistiku ja kliendi ligipääsu teegi loomine. +Comment[eu]=TDE-ren DCOP zerbitzu baterako lan-marko bat eta bezero liburutegi bat sortzen ditu. +Comment[fa]=چارچوبی برای خدمت TDE DCOP و کتابخانۀ دستیابی کارخواه تولید می‌کند. +Comment[fr]=Génère une infrastructure pour un service DCOP TDE et une bibliothèque d'accès client. +Comment[ga]=Cruthaigh creatlach do sheirbhís DCOP TDE agus leabharlann rochtana cliaint. +Comment[gl]=Xera un contorno de traballo para un servizo DCOP de TDE e unha biblioteca de acceso para clientes. +Comment[hu]=Létrehoz egy alap TDE DCOP-szolgáltatást és klienselérési programkönyvtárat. +Comment[it]=Genera l'infrastruttura per un servizio DCOP di TDE e una libreria per l'accesso da client. +Comment[ja]=TDE DCOP サービスとクライアントアクセスライブラリのためのフレームワークを作成します +Comment[nds]=Stellt en Rahmenwark för en TDE-DCOP-Deenst un en Clienttogriep-Bibliotheek op. +Comment[ne]=TDE DCOP सेवा र ग्राहक पहुँच लाइब्रेरीका लागि फ्रेमवर्क उत्पन्न गर्दछ । +Comment[nl]=Genereert een framework voor een TDE DCOP-service- en client-bibliotheek. +Comment[pl]=Generuje schemat dla usługi TDE DCOP i biblioteki dostępu użytkownika. +Comment[pt]=Gera a plataforma para um serviço de DCOP do TDE e a biblioteca de acesso dos clientes. +Comment[pt_BR]=Gera a plataforma para um serviço de DCOP do TDE e a biblioteca de acesso dos clientes. +Comment[ru]=Создание сервиса DCOP и библиотеки клиента. +Comment[sk]=Vygeneruje framework pre TDE DCOP službu a klientskú prístupovú knižnicu. +Comment[sr]=Прави једноставан радни оквир за TDE DCOP сервис и приступну библиотеку клијента. +Comment[sr@Latn]=Pravi jednostavan radni okvir za TDE DCOP servis i pristupnu biblioteku klijenta. +Comment[sv]=Skapar ett ramverk för en TDE DCOP-tjänst och klientåtkomstbibliotek. +Comment[tr]=Bir TDE DCOP hizmeti ve istemci erişim kütüphanesi için bir çatı yaratır. +Comment[zh_CN]=生成一个 TDE DCOP 服务和客户访问库的框架。 +Comment[zh_TW]=產生一個 TDE DCOP 服務的架構,以及客戶端存取的函式庫。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=dcopservice.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/dcopservice.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[FILE10] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE11] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE12] +Type=install +Source=%{src}/dcopservice.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE13] +Type=install +Source=%{src}/dcopservice.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE14] +Type=install +Source=%{src}/dcopservice.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE15] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/main.cpp + +[MSG] +Type=message +Comment=A TDE DCOP Service was created in %{dest} +Comment[ca]=Un servei DCOP de TDE ha estat creada en %{dest} +Comment[da]=En TDE DCOP tjeneste blev oprettet i %{dest} +Comment[de]=Ein TDE-DCOP-Dienst wurde in %{dest} erstellt. +Comment[el]=Μια υπηρεσία TDE DCOP δημιουργήθηκε στο %{dest} +Comment[es]=Un servicio DCOP de TDE ha sido creado en %{dest} +Comment[et]=TDE DCOP-teenus loodi asukohta %{dest} +Comment[eu]=TDE-ren DCOP zerbitzu bat sortu da hemen: %{dest} +Comment[fa]=یک خدمت TDE DCOP در %{dest} ایجاد شد +Comment[fr]=Un service DCOP TDE a été créé dans %{dest} +Comment[ga]=Cruthaíodh Seirbhís DCOP TDE i %{dest} +Comment[gl]=Creouse un servizo DCOP de TDE en %{dest} +Comment[hu]=Létrejött egy TDE DCOP-szolgáltatás itt: %{dest} +Comment[it]=È stato creato un servizio DCOP di TDE in %{dest} +Comment[ja]=TDE DCOP サービスを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en TDE-DCOP-Deenst opstellt +Comment[ne]=TDE DCOP सेवा %{dest} मा सिर्जना गरियो +Comment[nl]=Een DCOP-service is aangemaakt in %{dest} +Comment[pl]=Usługa TDE DCOP została utworzona w %{dest} +Comment[pt]=Foi criado um serviço de DCOP do TDE em %{dest} +Comment[pt_BR]=Foi criado um serviço de DCOP do TDE em %{dest} +Comment[ru]=Сервис DCOP создан в %{dest} +Comment[sk]=TDE DCOP služba bola vytvorená v %{dest} +Comment[sl]=Storitev DCOP za TDE je bila ustvarjena v %{dest} +Comment[sr]=TDE DCOP сервис направљен је у %{dest} +Comment[sr@Latn]=TDE DCOP servis napravljen je u %{dest} +Comment[sv]=En TDE DCOP-tjänst skapades i %{dest} +Comment[tr]=Bir TDE DCOP Hizmeti %{dest} içinde yaratılmıştır. +Comment[zh_CN]=在 %{dest} 中创建了一个 TDE DCOP 服务 +Comment[zh_TW]=TDE DCOP 服務已建立於 %{dest} diff --git a/languages/cpp/app_templates/dcopservice/dcopservice.tdevelop b/languages/cpp/app_templates/dcopservice/dcopservice.tdevelop index dfdea3b8..59569583 100644 --- a/languages/cpp/app_templates/dcopservice/dcopservice.tdevelop +++ b/languages/cpp/app_templates/dcopservice/dcopservice.tdevelop @@ -14,15 +14,15 @@ tdeioslave - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - - + + debug @@ -43,15 +43,15 @@ -O0 -g3 - - + + - - + + ada ada_bugs_gcc @@ -88,22 +88,22 @@ qmake User Guide - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/dcopservice/dcopservice.tdevtemplate b/languages/cpp/app_templates/dcopservice/dcopservice.tdevtemplate deleted file mode 100644 index 0174747d..00000000 --- a/languages/cpp/app_templates/dcopservice/dcopservice.tdevtemplate +++ /dev/null @@ -1,202 +0,0 @@ -# TDE Config File -[General] -Name=TDE DCOP Service -Name[br]=Servij DCOP TDE -Name[ca]=Servei DCOP per al TDE -Name[da]=TDE DCOP-service -Name[de]=TDE-DCOP-Dienst -Name[el]=Υπηρεσία TDE DCOP -Name[es]=Servicio DCOP de TDE -Name[et]=TDE DCOP-teenus -Name[eu]=TDE-ren DCOP zerbitzua -Name[fa]=خدمت TDE DCOP -Name[fr]=Service DCOP TDE -Name[ga]=Seirbhís DCOP TDE -Name[gl]=Servicio DCOP de TDE -Name[hu]=TDE DCOP-szolgáltatás -Name[it]=Servizio DCOP di TDE -Name[ja]=TDE DCOP サービス -Name[nds]=TDE-DCOP-Deenst -Name[ne]=TDE DCOP सेवा -Name[nl]=TDE DCOP-service -Name[pl]=Usługa TDE DCOP -Name[pt]=Serviço de DCOP do TDE -Name[pt_BR]=Serviço de DCOP do TDE -Name[ru]=Сервис DCOP -Name[sk]=TDE DCOP služba -Name[sl]=Storitev DCOP za TDE -Name[sr]=TDE DCOP сервис -Name[sr@Latn]=TDE DCOP servis -Name[sv]=TDE:s DCOP-tjänst -Name[tg]=Хизмати TDE DCOP -Name[tr]=TDE DCOP Hizmeti -Name[zh_CN]=TDE DCOP 服务 -Name[zh_TW]=TDE DCOP 服務 -Icon=kdcop.png -Category=C++/TDE -Comment=Generates a framework for a TDE DCOP service and client access library. -Comment[ca]=Genera una infraestructura per a un servei DCOP de TDE i la biblioteca d'accés del client. -Comment[da]=Genererer et skelet for en TDE dcop-tjeneste og klientadgangsbibliotek. -Comment[de]=Erstellt das Grundgerüst für einen TDE-DCOP-Dienst und eine Bibliothek für den Client-Zugriff. -Comment[el]=Δημιουργεί ένα πλαίσιο για μια υπηρεσία TDE DCOP και μια βιβλιοθήκη πρόσβασης πελάτη. -Comment[es]=Genera una infraestructura para un servicio DCOP de TDE y una biblioteca de acceso cliente. -Comment[et]=TDE DCOP-teenuse raamistiku ja kliendi ligipääsu teegi loomine. -Comment[eu]=TDE-ren DCOP zerbitzu baterako lan-marko bat eta bezero liburutegi bat sortzen ditu. -Comment[fa]=چارچوبی برای خدمت TDE DCOP و کتابخانۀ دستیابی کارخواه تولید می‌کند. -Comment[fr]=Génère une infrastructure pour un service DCOP TDE et une bibliothèque d'accès client. -Comment[ga]=Cruthaigh creatlach do sheirbhís DCOP TDE agus leabharlann rochtana cliaint. -Comment[gl]=Xera un contorno de traballo para un servizo DCOP de TDE e unha biblioteca de acceso para clientes. -Comment[hu]=Létrehoz egy alap TDE DCOP-szolgáltatást és klienselérési programkönyvtárat. -Comment[it]=Genera l'infrastruttura per un servizio DCOP di TDE e una libreria per l'accesso da client. -Comment[ja]=TDE DCOP サービスとクライアントアクセスライブラリのためのフレームワークを作成します -Comment[nds]=Stellt en Rahmenwark för en TDE-DCOP-Deenst un en Clienttogriep-Bibliotheek op. -Comment[ne]=TDE DCOP सेवा र ग्राहक पहुँच लाइब्रेरीका लागि फ्रेमवर्क उत्पन्न गर्दछ । -Comment[nl]=Genereert een framework voor een TDE DCOP-service- en client-bibliotheek. -Comment[pl]=Generuje schemat dla usługi TDE DCOP i biblioteki dostępu użytkownika. -Comment[pt]=Gera a plataforma para um serviço de DCOP do TDE e a biblioteca de acesso dos clientes. -Comment[pt_BR]=Gera a plataforma para um serviço de DCOP do TDE e a biblioteca de acesso dos clientes. -Comment[ru]=Создание сервиса DCOP и библиотеки клиента. -Comment[sk]=Vygeneruje framework pre TDE DCOP službu a klientskú prístupovú knižnicu. -Comment[sr]=Прави једноставан радни оквир за TDE DCOP сервис и приступну библиотеку клијента. -Comment[sr@Latn]=Pravi jednostavan radni okvir za TDE DCOP servis i pristupnu biblioteku klijenta. -Comment[sv]=Skapar ett ramverk för en TDE DCOP-tjänst och klientåtkomstbibliotek. -Comment[tr]=Bir TDE DCOP hizmeti ve istemci erişim kütüphanesi için bir çatı yaratır. -Comment[zh_CN]=生成一个 TDE DCOP 服务和客户访问库的框架。 -Comment[zh_TW]=產生一個 TDE DCOP 服務的架構,以及客戶端存取的函式庫。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=dcopservice.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/dcopservice.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[FILE10] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE11] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE12] -Type=install -Source=%{src}/dcopservice.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE13] -Type=install -Source=%{src}/dcopservice.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE14] -Type=install -Source=%{src}/dcopservice.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE15] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/main.cpp - -[MSG] -Type=message -Comment=A TDE DCOP Service was created in %{dest} -Comment[ca]=Un servei DCOP de TDE ha estat creada en %{dest} -Comment[da]=En TDE DCOP tjeneste blev oprettet i %{dest} -Comment[de]=Ein TDE-DCOP-Dienst wurde in %{dest} erstellt. -Comment[el]=Μια υπηρεσία TDE DCOP δημιουργήθηκε στο %{dest} -Comment[es]=Un servicio DCOP de TDE ha sido creado en %{dest} -Comment[et]=TDE DCOP-teenus loodi asukohta %{dest} -Comment[eu]=TDE-ren DCOP zerbitzu bat sortu da hemen: %{dest} -Comment[fa]=یک خدمت TDE DCOP در %{dest} ایجاد شد -Comment[fr]=Un service DCOP TDE a été créé dans %{dest} -Comment[ga]=Cruthaíodh Seirbhís DCOP TDE i %{dest} -Comment[gl]=Creouse un servizo DCOP de TDE en %{dest} -Comment[hu]=Létrejött egy TDE DCOP-szolgáltatás itt: %{dest} -Comment[it]=È stato creato un servizio DCOP di TDE in %{dest} -Comment[ja]=TDE DCOP サービスを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en TDE-DCOP-Deenst opstellt -Comment[ne]=TDE DCOP सेवा %{dest} मा सिर्जना गरियो -Comment[nl]=Een DCOP-service is aangemaakt in %{dest} -Comment[pl]=Usługa TDE DCOP została utworzona w %{dest} -Comment[pt]=Foi criado um serviço de DCOP do TDE em %{dest} -Comment[pt_BR]=Foi criado um serviço de DCOP do TDE em %{dest} -Comment[ru]=Сервис DCOP создан в %{dest} -Comment[sk]=TDE DCOP služba bola vytvorená v %{dest} -Comment[sl]=Storitev DCOP za TDE je bila ustvarjena v %{dest} -Comment[sr]=TDE DCOP сервис направљен је у %{dest} -Comment[sr@Latn]=TDE DCOP servis napravljen je u %{dest} -Comment[sv]=En TDE DCOP-tjänst skapades i %{dest} -Comment[tr]=Bir TDE DCOP Hizmeti %{dest} içinde yaratılmıştır. -Comment[zh_CN]=在 %{dest} 中创建了一个 TDE DCOP 服务 -Comment[zh_TW]=TDE DCOP 服務已建立於 %{dest} diff --git a/languages/cpp/app_templates/generichello/Makefile.am b/languages/cpp/app_templates/generichello/Makefile.am index 5f5bf6ed..75bad862 100644 --- a/languages/cpp/app_templates/generichello/Makefile.am +++ b/languages/cpp/app_templates/generichello/Makefile.am @@ -5,10 +5,10 @@ templateName = cppgenerichello # png-filename differs from archive file name ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/generichello/app.prj b/languages/cpp/app_templates/generichello/app.prj index c6466824..a1eeca82 100644 --- a/languages/cpp/app_templates/generichello/app.prj +++ b/languages/cpp/app_templates/generichello/app.prj @@ -1,8 +1,8 @@ - + gcc -o %{APPNAMELC} %{APPNAMELC}.cpp - + diff --git a/languages/cpp/app_templates/generichello/app.tdevelop b/languages/cpp/app_templates/generichello/app.tdevelop index a719a726..63f5ce16 100644 --- a/languages/cpp/app_templates/generichello/app.tdevelop +++ b/languages/cpp/app_templates/generichello/app.tdevelop @@ -4,14 +4,14 @@ %{AUTHOR} %{EMAIL} %{VERSION} - TDevGenericProject + KDevGenericProject C++ C++ Code - + ShellScript %{APPNAMELC}.prj @@ -39,23 +39,23 @@ -O0 -g3 - - + + - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/generichello/generichello.kdevtemplate b/languages/cpp/app_templates/generichello/generichello.kdevtemplate new file mode 100644 index 00000000..f30eea5b --- /dev/null +++ b/languages/cpp/app_templates/generichello/generichello.kdevtemplate @@ -0,0 +1,92 @@ +# TDE Config File +[General] +Name=C++ program (shell script build system) +Name[ca]=Programa C++ (sistema de construcció basat en scripts de shell) +Name[da]=C++ program (skalscript byggesystem) +Name[de]=C++-Programm (Shell-Skript basiertes Erstellungssystem) +Name[el]=Πρόγραμμα C++ (σύστημα κατασκευής σενάριο κελύφους) +Name[es]=Programa en C++ (con sistema de construcción basado en guión de órdenes) +Name[et]=C++ programm (shelliskripti ehitussüsteem) +Name[eu]=C++ programa (shell script-en bidez eraikia) +Name[fa]=برنامۀ ++C )سیستم ساخت دست‌نوشتۀ پوسته( +Name[fr]=Programme C++ (système de construction en script shell) +Name[ga]=Ríomhchlár C++ (córas tógála bunaithe ar scripteanna blaoisce +Name[gl]=Programa C++ (sistema de compilación shell script) +Name[hu]=C++-program (parancssoros fordítási szkripttel) +Name[it]=Programma C++ (sistema di compilazione con script di shell) +Name[ja]=C++ プログラム (シェルスクリプトベースのビルドシステム) +Name[nds]=C++-Programm (Konsoolskript-Opstellsystem) +Name[ne]=C++ कार्यक्रम (शेल स्क्रिप्ट निर्माण प्रणाली) +Name[nl]=C++-programma (shellscript build system) +Name[pl]=Program w C++ (system budowania za pomocą skryptów powłoki) +Name[pt]=Programa em C++ (sistema de compilação em 'shell script') +Name[pt_BR]=Programa em C++ (sistema de compilação em 'shell script') +Name[ru]=Приложение C++ (сборка на скриптах командной оболочки) +Name[sk]=C++ program (shell skript build system) +Name[sl]=Program v C++ (sistem grajenja lupinskega skripta) +Name[sr]=C++ програм (скрипта шкољке као систем за градњу) +Name[sr@Latn]=C++ program (skripta školjke kao sistem za gradnju) +Name[sv]=C++ program (skalskript byggsystem) +Name[tr]=C++ programı (kabuk betiği kurulum sistemi) +Name[zh_CN]=C++ 程序(Shell 脚本创建系统) +Name[zh_TW]=C++ 程式(shell 文稿建立系統) +Icon=cpphello.png +Category=C++/Generic +Comment=Generates a simple Hello world program in C++ +Comment[ca]=Genera un simple programa de Hello world en C++ +Comment[da]=Genererer et simpelt Goddag verden program in C++ +Comment[de]=Erstellt ein einfaches "Hello World"-Programm in C++ +Comment[el]=Δημιουργεί ένα απλό πρόγραμμα Γεια σου Κόσμε σε C++ +Comment[es]=Genera un sencillo programa «Hola mundo» en C++ +Comment[et]=Lihtsa "Tere, maailm" programmi loomine C++-s +Comment[eu]="Kaixo mundua" programa sinple bat sortzen du C++ lengoaian +Comment[fa]=یک برنامۀ سادۀ Hello world در C++ تولید می‌کند +Comment[fr]=Génère un programme « Bonjour monde » simple en C++ +Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí "Hello World" i C++ +Comment[gl]=Xera un programa sinxelo Ola mundo en C++ +Comment[hu]=Létrehoz egy egyszerű Hello world programot C++-ban +Comment[it]=Genera un semplice programma di "Hello world" in C++ +Comment[ja]=簡単な Hello World プログラムを C++ で作成します +Comment[nds]=Stellt en eenfach "Moin Welt"-Programm in C++ op +Comment[ne]=C++ मा एउटा साधारण हेल्लो वोल्ड कार्यक्रम उत्पन्न गर्दछ +Comment[nl]=Genereert een eenvoudig Hello World-programma in C++ +Comment[pl]=Generuje prosty program 'Witaj świecie' w języku C++ +Comment[pt]=Gera um programa simples Olá Mundo em C++ +Comment[pt_BR]=Gera um programa simples Olá Mundo em C++ +Comment[ru]=Создание простого приложения Hello world на C++ +Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program v C++ +Comment[sl]=Ustvari preprost program Hello world v C++ +Comment[sr]=Прави једноставан „Здраво свете“ програм у C++-у +Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program u C++-u +Comment[sv]=Skapar ett enkelt Hello world-program i C++ +Comment[tr]=C++'da basit bir Merhaba Dünya programı yaratır. +Comment[zh_CN]=生成 C++ 的 Hello world 程序 +Comment[zh_TW]=產生一個簡單的 C++ 的 Hello world 程式 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=generichello.tar.gz + +[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=%{src}/app.prj +Dest=%{dest}/%{APPNAMELC}.prj + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE3] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + diff --git a/languages/cpp/app_templates/generichello/generichello.tdevtemplate b/languages/cpp/app_templates/generichello/generichello.tdevtemplate deleted file mode 100644 index 27f78afe..00000000 --- a/languages/cpp/app_templates/generichello/generichello.tdevtemplate +++ /dev/null @@ -1,92 +0,0 @@ -# TDE Config File -[General] -Name=C++ program (shell script build system) -Name[ca]=Programa C++ (sistema de construcció basat en scripts de shell) -Name[da]=C++ program (skalscript byggesystem) -Name[de]=C++-Programm (Shell-Skript basiertes Erstellungssystem) -Name[el]=Πρόγραμμα C++ (σύστημα κατασκευής σενάριο κελύφους) -Name[es]=Programa en C++ (con sistema de construcción basado en guión de órdenes) -Name[et]=C++ programm (shelliskripti ehitussüsteem) -Name[eu]=C++ programa (shell script-en bidez eraikia) -Name[fa]=برنامۀ ++C )سیستم ساخت دست‌نوشتۀ پوسته( -Name[fr]=Programme C++ (système de construction en script shell) -Name[ga]=Ríomhchlár C++ (córas tógála bunaithe ar scripteanna blaoisce -Name[gl]=Programa C++ (sistema de compilación shell script) -Name[hu]=C++-program (parancssoros fordítási szkripttel) -Name[it]=Programma C++ (sistema di compilazione con script di shell) -Name[ja]=C++ プログラム (シェルスクリプトベースのビルドシステム) -Name[nds]=C++-Programm (Konsoolskript-Opstellsystem) -Name[ne]=C++ कार्यक्रम (शेल स्क्रिप्ट निर्माण प्रणाली) -Name[nl]=C++-programma (shellscript build system) -Name[pl]=Program w C++ (system budowania za pomocą skryptów powłoki) -Name[pt]=Programa em C++ (sistema de compilação em 'shell script') -Name[pt_BR]=Programa em C++ (sistema de compilação em 'shell script') -Name[ru]=Приложение C++ (сборка на скриптах командной оболочки) -Name[sk]=C++ program (shell skript build system) -Name[sl]=Program v C++ (sistem grajenja lupinskega skripta) -Name[sr]=C++ програм (скрипта шкољке као систем за градњу) -Name[sr@Latn]=C++ program (skripta školjke kao sistem za gradnju) -Name[sv]=C++ program (skalskript byggsystem) -Name[tr]=C++ programı (kabuk betiği kurulum sistemi) -Name[zh_CN]=C++ 程序(Shell 脚本创建系统) -Name[zh_TW]=C++ 程式(shell 文稿建立系統) -Icon=cpphello.png -Category=C++/Generic -Comment=Generates a simple Hello world program in C++ -Comment[ca]=Genera un simple programa de Hello world en C++ -Comment[da]=Genererer et simpelt Goddag verden program in C++ -Comment[de]=Erstellt ein einfaches "Hello World"-Programm in C++ -Comment[el]=Δημιουργεί ένα απλό πρόγραμμα Γεια σου Κόσμε σε C++ -Comment[es]=Genera un sencillo programa «Hola mundo» en C++ -Comment[et]=Lihtsa "Tere, maailm" programmi loomine C++-s -Comment[eu]="Kaixo mundua" programa sinple bat sortzen du C++ lengoaian -Comment[fa]=یک برنامۀ سادۀ Hello world در C++ تولید می‌کند -Comment[fr]=Génère un programme « Bonjour monde » simple en C++ -Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí "Hello World" i C++ -Comment[gl]=Xera un programa sinxelo Ola mundo en C++ -Comment[hu]=Létrehoz egy egyszerű Hello world programot C++-ban -Comment[it]=Genera un semplice programma di "Hello world" in C++ -Comment[ja]=簡単な Hello World プログラムを C++ で作成します -Comment[nds]=Stellt en eenfach "Moin Welt"-Programm in C++ op -Comment[ne]=C++ मा एउटा साधारण हेल्लो वोल्ड कार्यक्रम उत्पन्न गर्दछ -Comment[nl]=Genereert een eenvoudig Hello World-programma in C++ -Comment[pl]=Generuje prosty program 'Witaj świecie' w języku C++ -Comment[pt]=Gera um programa simples Olá Mundo em C++ -Comment[pt_BR]=Gera um programa simples Olá Mundo em C++ -Comment[ru]=Создание простого приложения Hello world на C++ -Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program v C++ -Comment[sl]=Ustvari preprost program Hello world v C++ -Comment[sr]=Прави једноставан „Здраво свете“ програм у C++-у -Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ program u C++-u -Comment[sv]=Skapar ett enkelt Hello world-program i C++ -Comment[tr]=C++'da basit bir Merhaba Dünya programı yaratır. -Comment[zh_CN]=生成 C++ 的 Hello world 程序 -Comment[zh_TW]=產生一個簡單的 C++ 的 Hello world 程式 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=generichello.tar.gz - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/app.prj -Dest=%{dest}/%{APPNAMELC}.prj - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE3] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - diff --git a/languages/cpp/app_templates/gnome2mmapp/Makefile.am b/languages/cpp/app_templates/gnome2mmapp/Makefile.am index a0d9505e..9d73ddd6 100644 --- a/languages/cpp/app_templates/gnome2mmapp/Makefile.am +++ b/languages/cpp/app_templates/gnome2mmapp/Makefile.am @@ -7,10 +7,10 @@ dataFiles = acconfig.h autogen.sh gnome2mm.glade main_window.cc \ templateName = gnome2mmapp ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/gnome2mmapp/app.tdevelop b/languages/cpp/app_templates/gnome2mmapp/app.tdevelop index 177611f0..19fbacb7 100644 --- a/languages/cpp/app_templates/gnome2mmapp/app.tdevelop +++ b/languages/cpp/app_templates/gnome2mmapp/app.tdevelop @@ -12,7 +12,7 @@ GNOME - + src/%{APPNAMELC} debug @@ -39,8 +39,8 @@ -O0 -g3 - - + + @@ -48,22 +48,22 @@ - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/gnome2mmapp/gnome2mmapp.kdevtemplate b/languages/cpp/app_templates/gnome2mmapp/gnome2mmapp.kdevtemplate new file mode 100644 index 00000000..f692d342 --- /dev/null +++ b/languages/cpp/app_templates/gnome2mmapp/gnome2mmapp.kdevtemplate @@ -0,0 +1,186 @@ +# TDE Config File +[General] +Name=GNOME-- Application framework +Name[ca]=Infraestructura d'aplicació per a GNOME +Name[da]=GNOME-- Programskelet +Name[de]="GNOME--"-Anwendungsgrundgerüst +Name[el]=GNOME-- Πλαίσιο εφαρμογής +Name[es]=Infraestructura para aplicación GNOME-- +Name[et]=GNOME-- rakenduse raamistik +Name[eu]=GNOME-- Aplikazioen lan-markoa +Name[fa]=چارچوب کاربرد GNOME-- +Name[fr]=Infrastructure d'application GNOME-- +Name[ga]=Creatlach feidhmchláir GNOME-- +Name[gl]=Entorno de traballo para aplicación GNOME +Name[hu]=GNOME - Alkalmazás-keretrendszer +Name[it]=Infrastruttura per applicazioni GNOME-- +Name[ja]=GNOME-- アプリケーションフレームワーク +Name[nds]=Programmrahmenwark för "GNOME--" +Name[ne]=GNOME-- अनुप्रयोग फ्रेमवर्क +Name[nl]=GNOME-- Applicationframework +Name[pl]=GNOME-- Szablon programu +Name[pt]=Plataforma de aplicações GNOME-- +Name[pt_BR]=Plataforma de aplicações GNOME-- +Name[ru]=Приложение GNOME-- +Name[sk]=GNOME-- aplikačný framework +Name[sl]=Ogrodje programa za GNOME-- +Name[sr]=Радни оквир GNOME-- програма +Name[sr@Latn]=Radni okvir GNOME-- programa +Name[sv]=GNOME-- programramverk +Name[tr]=GNOME-- Uygulama Çatısı +Name[zh_CN]=GNOME-- 应用程序框架 +Name[zh_TW]=GNOME-- 應用程式框架 +Category=C++/GTK+ +Icon=gnome2mmapp.png +Comment=Generates a simple GNOME-- application. Gnomemm, Gtkmm >= 1.2.8 and < 1.3.0 should be installed. To edit glade file glade-- (http://home.wtal.de/petig/Gtk/) is required. +Comment[ca]=Genera una simple aplicació GNOME. Gnomemm, Gtkmm >= 1.2.8 i < 1.3.0 haurien d'estar instal·lats. Per editar el fitxer glade es requereix (http://home.wtal.de/petig/Gtk/). +Comment[da]=Genererer et simpelt GNOME-- program. Gnomemm, Gtkmm >= 1.2.8 og < 1.3.0 skal være installeret. For at redigere glade file glade-- kræves (http://home.wtal.de/petig/Gtk/). +Comment[de]=Erstellt eine einfache GNOME-Anwendung. Gnomemm, Gtkmm >= 1.2.8 und < 1.3.0 sollten installiert sein. Zum Bearbeiten der glade-Datei ist glade-- (http://home.wtal.de/petig/Gtk/) erforderlich. +Comment[el]=Δημιουργεί μια απλή εφαρμογή GNOME. Τα Gnomemm, Gtkmm >= 1.2.8 και < 1.3.0 πρέπει να είναι εγκατεστημένα. Για την επεξεργασία του αρχείου glade απαιτείται το glade (http://home.wtal.de/petig/Gtk/). +Comment[es]=Genera una sencilla aplicación GNOME--. Debe tener instalados Gnomemm, Gtkmm >= 1.2.8 y < 1.3.0. Para editar archivos glade se necesita glade-- (http://home.wtal.de/petig/Gtk/). +Comment[et]=Lihtsa GNOME-- rakenduse loomine. Paigaldatud peavad olema Gnomemm, Gtkmm >= 1.2.8 ja < 1.3.0. Glade-faili redigeerimiseks on vajalik glade-- (http://home.wtal.de/petig/Gtk/). +Comment[eu]=GNOME-- applicazio sinple bat sortzen du. Gnomemm, Gtkmm >= 1.2.8 and < 1.3.0 instalatu behar dira. Glade fitxategia editatzeko glade-- (http://home.wtal.de/petig/Gtk/) behar da. +Comment[fa]=یک کاربرد سادۀ GNOME-- تولید می‌کند. Gnomemm، Gtkmm >= ۱.۲.۸ و < ۱.۳.۰ باید نصب شده باشد. برای ویرایش پروندۀ glade، glade-- (http://home.wtal.de/petig/Gtk/) نیاز است. +Comment[fr]=Génère une application GNOME-- simple. Gnomemm et Gtkmm >= 1.2.8 et < 1.3.0 devront être installés. Pour modifier le fichier glade, glade-- (http://home.wtal.de/petig/Gtk/) est requis. +Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí GNOME--. Ba chóir Gnomemm, Gtkmm >= 1.2.8 agus < 1.3.0 a bheith suiteáilte. Chun comhad glade a chur in eagar, tá glade-- (http://home.wtal.de/petig/Gtk/) de dhíth ort. +Comment[gl]=Xera una aplicación sinxela GNOME. Gnomemm, Gtkmm >= 1.2.8 e < 1.3.0 deben estar instalados. Para editar un arquivo glade é necesario glade-- (http://home.wtal.de/petig/Gtk/). +Comment[hu]=Létrehoz egy egyszerű GNOME--os -alkalmazást. A Gnomemm, a Gtkmm (>= 1.2.8 és < 1.3.0) szükséges hozzá. Glade-fájl szerkesztéséhez a glade-- (http://home.wtal.de/petig/Gtk/) is szükséges. +Comment[it]=Genera una semplice applicazione GNOME--. Gnomemm, Gtkmm >= 1.2.8 e < 1.3.0 dovrebbero essere installati. Si richiede glade per modificare i file di glade -- (http://home.wtal.de/petig/Gtk/). +Comment[ja]=簡単な GNOME-- アプリケーションを作成します。Gnomemm, Gtkmm >= 1.2.8 かつ < 1.3.0 が必要です。glade ファイルを編集するには glade-- (http://home.wtal.de/petig/Gtk/) が必要です。 +Comment[nds]=Stellt en eenfach "GNOME--"-Programm op. "Gnomemm", "Gtkmm" >= 1.2.8 un < 1.3.0 schöölt installeert wesen. För't Bewerken vun de glade-Datei deit "glade--" (http://home.wtal.de/petig/Gtk/) noot. +Comment[ne]=साधारण जिनोम-- अनुप्रयोग उत्पन्न गर्दछ । Gnomemm, Gtkmm >= 1.2.8 र < 1.3.0 स्थापना गर्नु पर्दछ । ग्लेड फाइल सम्पादन गर्नका लागि ग्लेड-- (http://home.wtal.de/petig/Gtk/) आवश्यक पर्दछ । +Comment[nl]=Genereert een eenvoudige GNOME-- toepassing. Gnomemm, Gtkmm >= 1.2.8 en < 1.3.0 dienen te zijn geïnstalleerd. Voor het bewerken van glade file is glade-- (http://home.wtal.de/petig/Gtk/) nodig. +Comment[pl]=Generuje prosty program dla środowiska GNOME--. Gnomemm i Gtkmm w wersji >= 1.2.8 i < 1.3.0 powinny być zainstalowane. Do edycji pliku glade konieczny jest program glade-- (http://home.wtal.de/petig/Gtk/). +Comment[pt]=Gera uma aplicação simples em GNOME--. Deverão estar instalados o Gnomemm, Gtkmm >= 1.2.8 e < 1.3.0. Para editar o ficheiro do Glade,, é necessário o glade-- (http://home.wtal.de/petig/Gtk/). +Comment[pt_BR]=Gera uma aplicação simples em GNOME--. Deverão estar instalados o Gnomemm, Gtkmm >= 1.2.8 e < 1.3.0. Para editar o ficheiro do Glade,, é necessário o glade-- (http://home.wtal.de/petig/Gtk/). +Comment[ru]=Создание простого приложения GNOME--. Требуются Gnomemm, Gtkmm >= 1.2.8 и < 1.3.0. Для редактирования файла glade нужна соответствующая программа (http://home.wtal.de/petig/Gtk/). +Comment[sk]=Vygeneruje jednoduchú GNOME-- aplikáciu. Vyžaduje nainštalovanéGnomemm, Gtkmm >= 1.2.8 a < 1.3.0. Na editovanie glade súboru he potrebnýglade-- (http://home.wtal.de/petig/Gtk/). +Comment[sr]=Прави једноставан GNOME-- програм. Gnomemm, Gtkmm >= 1.2.8 и < 1.3.0 требало би да су инсталирани. Да бисте уређивали glade фајл, неопходан је glade-- (http://home.wtal.de/petig/Gtk/). +Comment[sr@Latn]=Pravi jednostavan GNOME-- program. Gnomemm, Gtkmm >= 1.2.8 i < 1.3.0 trebalo bi da su instalirani. Da biste uređivali glade fajl, neophodan je glade-- (http://home.wtal.de/petig/Gtk/). +Comment[sv]=Skapar ett enkelt GNOME-- program. Gnomemm, Gtkmm >= 1.2.8 och < 1.3.0 måste vara installerat. För att redigera glade-filer krävs glade-- (http://home.wtal.de/petig/Gtk/). +Comment[tr]=Basit bir GNOME-- uygulaması yaratır. Gnomemm, Gtkmm>=1.28 ve <1.3.0 yüklü olmalıdır. Glade dosyasını düzenlemek için glade-- (http://home.wtal.de/petig/Gtk/) gereklidir. +Comment[zh_CN]=生成简单的 GNOME-- 应用程序。必须安装 Gnomemm、1.2.8 到 1.3.0 之间的 Gtkmm。要编辑 glade 文件,需要使用 glade-- (http://home.wtal.de/petig/Gtk/)。 +Comment[zh_TW]=產生一個簡單的 GNOME-- 應用程式。要先安裝 Gnomemm,Gtkmm 版本 >= 1.2.8 且 < 1.3.0。要編輯 glade 檔則要先安裝 glade-- (http://home.wtal.de/petig/Gtk/)。 +FileTemplates=hh,CStyle,cc,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=gnome2mmapp.tar.gz + +[INCADMIN] +Type=include +File=%{tdevelop}/template-common/incadmin.kdevtemplate + +[GNOME2] +Type=include +File=%{tdevelop}/template-common/gnome2.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=%{src}/app-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE3] +Type=install +Source=%{src}/configure.in +Dest=%{dest}/configure.in + +[FILE4] +Type=install +Source=%{src}/acconfig.h +Dest=%{dest}/acconfig.h + +[FILE5] +Type=install +Source=%{src}/config.h +Dest=%{dest}/config.h + +[FILE6] +Type=install +Source=%{src}/autogen.sh +Dest=%{dest}/autogen.sh + +[FILE7] +Type=install +Source=%{src}/gnome2mm.glade +Dest=%{dest}/%{APPNAMELC}.glade + +[FILE8] +Type=install +Source=%{src}/gnome2mm.gladep +Dest=%{dest}/%{APPNAMELC}.gladep + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE9] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE10] +Type=install +Source=%{src}/gnome2mm.cc +Dest=%{dest}/src/%{APPNAMELC}.cc + +[FILE11] +Type=install +Source=%{src}/main_window.hh +Dest=%{dest}/src/main_window.hh + +[FILE12] +Type=install +Source=%{src}/main_window.cc +Dest=%{dest}/src/main_window.cc + +[FILE13] +Type=install +Source=%{src}/main_window_glade.hh +Dest=%{dest}/src/main_window_glade.hh + +[FILE14] +Type=install +Source=%{src}/main_window_glade.cc +Dest=%{dest}/src/main_window_glade.cc + +[MSG] +Type=message +Comment=A GNOME-- application framework was created in %{dest} +Comment[ca]=Una infraestructura d'aplicació per a GNOME ha estat creada en %{dest} +Comment[da]=Et GNOME-- programskelet blev oprettet i %{dest} +Comment[de]=Ein GNOME-Anwendungsgerüst wurde in %{dest} erstellt. +Comment[el]=Ένα πλαίσιο εφαρμογής GNOME δημιουργήθηκε στο %{dest} +Comment[es]=Una infraestructura de aplicación GNOME-- ha sido creada en %{dest} +Comment[et]=GNOME-- rakenduse raamistik loodi asukohta %{dest} +Comment[eu]=GNOME-- applicazioen lan-marko bat sortu da hemen: %{dest} +Comment[fa]=یک چارچوب کاربرد GNOME-- در %{dest} ایجاد شد +Comment[fr]=Une infrastructure d'application GNOME-- a été créée dans %{dest} +Comment[ga]=Cruthaíodh creatlach feidhmchláir GNOME-- i %{dest} +Comment[gl]=Creouse un contorno de traballo para aplicación GNOME en %{dest} +Comment[hu]=Létrejött egy GNOME-s alkalmazás-keretrendszer itt: %{dest} +Comment[it]=È stato creata l'infrastruttura per un'applicazione GNOME in %{dest} +Comment[ja]=GNOME-- アプリケーションフレームワークを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Programmrahmenwark för "GNOME--" opstellt +Comment[ne]= जिनोम-- अनुप्रयोग फ्रेमवर्क %{dest} मा सिर्जना गरियो +Comment[nl]=Een GNOME-- applicationframework is aangemaakt in %{dest} +Comment[pl]=Szablon programu dla GNOME-- został utworzony w %{dest} +Comment[pt]=Foi criada a plataforma de uma aplicação GNOME-- em %{dest} +Comment[pt_BR]=Foi criada a plataforma de uma aplicação GNOME-- em %{dest} +Comment[ru]=Простое приложение GNOME-- создано в %{dest} +Comment[sk]=GNOME-- aplikačný framework bol vytvorený v %{dest} +Comment[sl]=Ogrodje programa za GNOME-- je bilo ustvarjeno v %{dest} +Comment[sr]=Радни оквир GNOME-- програма направљен је у %{dest} +Comment[sr@Latn]=Radni okvir GNOME-- programa napravljen je u %{dest} +Comment[sv]=Ett GNOME-- programramverk skapades i %{dest} +Comment[tr]=Bir GNOME-- uygulama çatısı %{dest} içinde yaratılmıştır. +Comment[zh_CN]=在 %{dest} 中创建了 GNOME-- 应用程序框架 +Comment[zh_TW]=GNOME-- 應用程式框架已建立於 %{dest} diff --git a/languages/cpp/app_templates/gnome2mmapp/gnome2mmapp.tdevtemplate b/languages/cpp/app_templates/gnome2mmapp/gnome2mmapp.tdevtemplate deleted file mode 100644 index 363ffd5a..00000000 --- a/languages/cpp/app_templates/gnome2mmapp/gnome2mmapp.tdevtemplate +++ /dev/null @@ -1,186 +0,0 @@ -# TDE Config File -[General] -Name=GNOME-- Application framework -Name[ca]=Infraestructura d'aplicació per a GNOME -Name[da]=GNOME-- Programskelet -Name[de]="GNOME--"-Anwendungsgrundgerüst -Name[el]=GNOME-- Πλαίσιο εφαρμογής -Name[es]=Infraestructura para aplicación GNOME-- -Name[et]=GNOME-- rakenduse raamistik -Name[eu]=GNOME-- Aplikazioen lan-markoa -Name[fa]=چارچوب کاربرد GNOME-- -Name[fr]=Infrastructure d'application GNOME-- -Name[ga]=Creatlach feidhmchláir GNOME-- -Name[gl]=Entorno de traballo para aplicación GNOME -Name[hu]=GNOME - Alkalmazás-keretrendszer -Name[it]=Infrastruttura per applicazioni GNOME-- -Name[ja]=GNOME-- アプリケーションフレームワーク -Name[nds]=Programmrahmenwark för "GNOME--" -Name[ne]=GNOME-- अनुप्रयोग फ्रेमवर्क -Name[nl]=GNOME-- Applicationframework -Name[pl]=GNOME-- Szablon programu -Name[pt]=Plataforma de aplicações GNOME-- -Name[pt_BR]=Plataforma de aplicações GNOME-- -Name[ru]=Приложение GNOME-- -Name[sk]=GNOME-- aplikačný framework -Name[sl]=Ogrodje programa za GNOME-- -Name[sr]=Радни оквир GNOME-- програма -Name[sr@Latn]=Radni okvir GNOME-- programa -Name[sv]=GNOME-- programramverk -Name[tr]=GNOME-- Uygulama Çatısı -Name[zh_CN]=GNOME-- 应用程序框架 -Name[zh_TW]=GNOME-- 應用程式框架 -Category=C++/GTK+ -Icon=gnome2mmapp.png -Comment=Generates a simple GNOME-- application. Gnomemm, Gtkmm >= 1.2.8 and < 1.3.0 should be installed. To edit glade file glade-- (http://home.wtal.de/petig/Gtk/) is required. -Comment[ca]=Genera una simple aplicació GNOME. Gnomemm, Gtkmm >= 1.2.8 i < 1.3.0 haurien d'estar instal·lats. Per editar el fitxer glade es requereix (http://home.wtal.de/petig/Gtk/). -Comment[da]=Genererer et simpelt GNOME-- program. Gnomemm, Gtkmm >= 1.2.8 og < 1.3.0 skal være installeret. For at redigere glade file glade-- kræves (http://home.wtal.de/petig/Gtk/). -Comment[de]=Erstellt eine einfache GNOME-Anwendung. Gnomemm, Gtkmm >= 1.2.8 und < 1.3.0 sollten installiert sein. Zum Bearbeiten der glade-Datei ist glade-- (http://home.wtal.de/petig/Gtk/) erforderlich. -Comment[el]=Δημιουργεί μια απλή εφαρμογή GNOME. Τα Gnomemm, Gtkmm >= 1.2.8 και < 1.3.0 πρέπει να είναι εγκατεστημένα. Για την επεξεργασία του αρχείου glade απαιτείται το glade (http://home.wtal.de/petig/Gtk/). -Comment[es]=Genera una sencilla aplicación GNOME--. Debe tener instalados Gnomemm, Gtkmm >= 1.2.8 y < 1.3.0. Para editar archivos glade se necesita glade-- (http://home.wtal.de/petig/Gtk/). -Comment[et]=Lihtsa GNOME-- rakenduse loomine. Paigaldatud peavad olema Gnomemm, Gtkmm >= 1.2.8 ja < 1.3.0. Glade-faili redigeerimiseks on vajalik glade-- (http://home.wtal.de/petig/Gtk/). -Comment[eu]=GNOME-- applicazio sinple bat sortzen du. Gnomemm, Gtkmm >= 1.2.8 and < 1.3.0 instalatu behar dira. Glade fitxategia editatzeko glade-- (http://home.wtal.de/petig/Gtk/) behar da. -Comment[fa]=یک کاربرد سادۀ GNOME-- تولید می‌کند. Gnomemm، Gtkmm >= ۱.۲.۸ و < ۱.۳.۰ باید نصب شده باشد. برای ویرایش پروندۀ glade، glade-- (http://home.wtal.de/petig/Gtk/) نیاز است. -Comment[fr]=Génère une application GNOME-- simple. Gnomemm et Gtkmm >= 1.2.8 et < 1.3.0 devront être installés. Pour modifier le fichier glade, glade-- (http://home.wtal.de/petig/Gtk/) est requis. -Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí GNOME--. Ba chóir Gnomemm, Gtkmm >= 1.2.8 agus < 1.3.0 a bheith suiteáilte. Chun comhad glade a chur in eagar, tá glade-- (http://home.wtal.de/petig/Gtk/) de dhíth ort. -Comment[gl]=Xera una aplicación sinxela GNOME. Gnomemm, Gtkmm >= 1.2.8 e < 1.3.0 deben estar instalados. Para editar un arquivo glade é necesario glade-- (http://home.wtal.de/petig/Gtk/). -Comment[hu]=Létrehoz egy egyszerű GNOME--os -alkalmazást. A Gnomemm, a Gtkmm (>= 1.2.8 és < 1.3.0) szükséges hozzá. Glade-fájl szerkesztéséhez a glade-- (http://home.wtal.de/petig/Gtk/) is szükséges. -Comment[it]=Genera una semplice applicazione GNOME--. Gnomemm, Gtkmm >= 1.2.8 e < 1.3.0 dovrebbero essere installati. Si richiede glade per modificare i file di glade -- (http://home.wtal.de/petig/Gtk/). -Comment[ja]=簡単な GNOME-- アプリケーションを作成します。Gnomemm, Gtkmm >= 1.2.8 かつ < 1.3.0 が必要です。glade ファイルを編集するには glade-- (http://home.wtal.de/petig/Gtk/) が必要です。 -Comment[nds]=Stellt en eenfach "GNOME--"-Programm op. "Gnomemm", "Gtkmm" >= 1.2.8 un < 1.3.0 schöölt installeert wesen. För't Bewerken vun de glade-Datei deit "glade--" (http://home.wtal.de/petig/Gtk/) noot. -Comment[ne]=साधारण जिनोम-- अनुप्रयोग उत्पन्न गर्दछ । Gnomemm, Gtkmm >= 1.2.8 र < 1.3.0 स्थापना गर्नु पर्दछ । ग्लेड फाइल सम्पादन गर्नका लागि ग्लेड-- (http://home.wtal.de/petig/Gtk/) आवश्यक पर्दछ । -Comment[nl]=Genereert een eenvoudige GNOME-- toepassing. Gnomemm, Gtkmm >= 1.2.8 en < 1.3.0 dienen te zijn geïnstalleerd. Voor het bewerken van glade file is glade-- (http://home.wtal.de/petig/Gtk/) nodig. -Comment[pl]=Generuje prosty program dla środowiska GNOME--. Gnomemm i Gtkmm w wersji >= 1.2.8 i < 1.3.0 powinny być zainstalowane. Do edycji pliku glade konieczny jest program glade-- (http://home.wtal.de/petig/Gtk/). -Comment[pt]=Gera uma aplicação simples em GNOME--. Deverão estar instalados o Gnomemm, Gtkmm >= 1.2.8 e < 1.3.0. Para editar o ficheiro do Glade,, é necessário o glade-- (http://home.wtal.de/petig/Gtk/). -Comment[pt_BR]=Gera uma aplicação simples em GNOME--. Deverão estar instalados o Gnomemm, Gtkmm >= 1.2.8 e < 1.3.0. Para editar o ficheiro do Glade,, é necessário o glade-- (http://home.wtal.de/petig/Gtk/). -Comment[ru]=Создание простого приложения GNOME--. Требуются Gnomemm, Gtkmm >= 1.2.8 и < 1.3.0. Для редактирования файла glade нужна соответствующая программа (http://home.wtal.de/petig/Gtk/). -Comment[sk]=Vygeneruje jednoduchú GNOME-- aplikáciu. Vyžaduje nainštalovanéGnomemm, Gtkmm >= 1.2.8 a < 1.3.0. Na editovanie glade súboru he potrebnýglade-- (http://home.wtal.de/petig/Gtk/). -Comment[sr]=Прави једноставан GNOME-- програм. Gnomemm, Gtkmm >= 1.2.8 и < 1.3.0 требало би да су инсталирани. Да бисте уређивали glade фајл, неопходан је glade-- (http://home.wtal.de/petig/Gtk/). -Comment[sr@Latn]=Pravi jednostavan GNOME-- program. Gnomemm, Gtkmm >= 1.2.8 i < 1.3.0 trebalo bi da su instalirani. Da biste uređivali glade fajl, neophodan je glade-- (http://home.wtal.de/petig/Gtk/). -Comment[sv]=Skapar ett enkelt GNOME-- program. Gnomemm, Gtkmm >= 1.2.8 och < 1.3.0 måste vara installerat. För att redigera glade-filer krävs glade-- (http://home.wtal.de/petig/Gtk/). -Comment[tr]=Basit bir GNOME-- uygulaması yaratır. Gnomemm, Gtkmm>=1.28 ve <1.3.0 yüklü olmalıdır. Glade dosyasını düzenlemek için glade-- (http://home.wtal.de/petig/Gtk/) gereklidir. -Comment[zh_CN]=生成简单的 GNOME-- 应用程序。必须安装 Gnomemm、1.2.8 到 1.3.0 之间的 Gtkmm。要编辑 glade 文件,需要使用 glade-- (http://home.wtal.de/petig/Gtk/)。 -Comment[zh_TW]=產生一個簡單的 GNOME-- 應用程式。要先安裝 Gnomemm,Gtkmm 版本 >= 1.2.8 且 < 1.3.0。要編輯 glade 檔則要先安裝 glade-- (http://home.wtal.de/petig/Gtk/)。 -FileTemplates=hh,CStyle,cc,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=gnome2mmapp.tar.gz - -[INCADMIN] -Type=include -File=%{tdevelop}/template-common/incadmin.tdevtemplate - -[GNOME2] -Type=include -File=%{tdevelop}/template-common/gnome2.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/app-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE3] -Type=install -Source=%{src}/configure.in -Dest=%{dest}/configure.in - -[FILE4] -Type=install -Source=%{src}/acconfig.h -Dest=%{dest}/acconfig.h - -[FILE5] -Type=install -Source=%{src}/config.h -Dest=%{dest}/config.h - -[FILE6] -Type=install -Source=%{src}/autogen.sh -Dest=%{dest}/autogen.sh - -[FILE7] -Type=install -Source=%{src}/gnome2mm.glade -Dest=%{dest}/%{APPNAMELC}.glade - -[FILE8] -Type=install -Source=%{src}/gnome2mm.gladep -Dest=%{dest}/%{APPNAMELC}.gladep - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE9] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE10] -Type=install -Source=%{src}/gnome2mm.cc -Dest=%{dest}/src/%{APPNAMELC}.cc - -[FILE11] -Type=install -Source=%{src}/main_window.hh -Dest=%{dest}/src/main_window.hh - -[FILE12] -Type=install -Source=%{src}/main_window.cc -Dest=%{dest}/src/main_window.cc - -[FILE13] -Type=install -Source=%{src}/main_window_glade.hh -Dest=%{dest}/src/main_window_glade.hh - -[FILE14] -Type=install -Source=%{src}/main_window_glade.cc -Dest=%{dest}/src/main_window_glade.cc - -[MSG] -Type=message -Comment=A GNOME-- application framework was created in %{dest} -Comment[ca]=Una infraestructura d'aplicació per a GNOME ha estat creada en %{dest} -Comment[da]=Et GNOME-- programskelet blev oprettet i %{dest} -Comment[de]=Ein GNOME-Anwendungsgerüst wurde in %{dest} erstellt. -Comment[el]=Ένα πλαίσιο εφαρμογής GNOME δημιουργήθηκε στο %{dest} -Comment[es]=Una infraestructura de aplicación GNOME-- ha sido creada en %{dest} -Comment[et]=GNOME-- rakenduse raamistik loodi asukohta %{dest} -Comment[eu]=GNOME-- applicazioen lan-marko bat sortu da hemen: %{dest} -Comment[fa]=یک چارچوب کاربرد GNOME-- در %{dest} ایجاد شد -Comment[fr]=Une infrastructure d'application GNOME-- a été créée dans %{dest} -Comment[ga]=Cruthaíodh creatlach feidhmchláir GNOME-- i %{dest} -Comment[gl]=Creouse un contorno de traballo para aplicación GNOME en %{dest} -Comment[hu]=Létrejött egy GNOME-s alkalmazás-keretrendszer itt: %{dest} -Comment[it]=È stato creata l'infrastruttura per un'applicazione GNOME in %{dest} -Comment[ja]=GNOME-- アプリケーションフレームワークを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Programmrahmenwark för "GNOME--" opstellt -Comment[ne]= जिनोम-- अनुप्रयोग फ्रेमवर्क %{dest} मा सिर्जना गरियो -Comment[nl]=Een GNOME-- applicationframework is aangemaakt in %{dest} -Comment[pl]=Szablon programu dla GNOME-- został utworzony w %{dest} -Comment[pt]=Foi criada a plataforma de uma aplicação GNOME-- em %{dest} -Comment[pt_BR]=Foi criada a plataforma de uma aplicação GNOME-- em %{dest} -Comment[ru]=Простое приложение GNOME-- создано в %{dest} -Comment[sk]=GNOME-- aplikačný framework bol vytvorený v %{dest} -Comment[sl]=Ogrodje programa za GNOME-- je bilo ustvarjeno v %{dest} -Comment[sr]=Радни оквир GNOME-- програма направљен је у %{dest} -Comment[sr@Latn]=Radni okvir GNOME-- programa napravljen je u %{dest} -Comment[sv]=Ett GNOME-- programramverk skapades i %{dest} -Comment[tr]=Bir GNOME-- uygulama çatısı %{dest} içinde yaratılmıştır. -Comment[zh_CN]=在 %{dest} 中创建了 GNOME-- 应用程序框架 -Comment[zh_TW]=GNOME-- 應用程式框架已建立於 %{dest} diff --git a/languages/cpp/app_templates/gtk2mmapp/CMakeLists.txt b/languages/cpp/app_templates/gtk2mmapp/CMakeLists.txt index 75d52e80..45544ac9 100644 --- a/languages/cpp/app_templates/gtk2mmapp/CMakeLists.txt +++ b/languages/cpp/app_templates/gtk2mmapp/CMakeLists.txt @@ -21,9 +21,9 @@ add_custom_target( gtk2mmapp.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/gtk2mmapp.tar.gz gtk2mmapp.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - gtk2mmapp.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + gtk2mmapp.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/gtk2mmapp/Makefile.am b/languages/cpp/app_templates/gtk2mmapp/Makefile.am index 422f7b00..c44ba568 100644 --- a/languages/cpp/app_templates/gtk2mmapp/Makefile.am +++ b/languages/cpp/app_templates/gtk2mmapp/Makefile.am @@ -7,10 +7,10 @@ dataFiles = acconfig.h autogen.sh gtk2mm.glade main_window.cc \ templateName = gtk2mmapp ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/gtk2mmapp/app.tdevelop b/languages/cpp/app_templates/gtk2mmapp/app.tdevelop index f9335dad..6f691439 100644 --- a/languages/cpp/app_templates/gtk2mmapp/app.tdevelop +++ b/languages/cpp/app_templates/gtk2mmapp/app.tdevelop @@ -12,7 +12,7 @@ GTK - + src/%{APPNAMELC} debug @@ -39,8 +39,8 @@ -O0 -g3 - - + + @@ -48,8 +48,8 @@ - - + + ada ada_bugs_gcc @@ -92,22 +92,22 @@ TDE Libraries (Doxygen) - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/gtk2mmapp/gtk2mmapp.kdevtemplate b/languages/cpp/app_templates/gtk2mmapp/gtk2mmapp.kdevtemplate new file mode 100644 index 00000000..a8948d26 --- /dev/null +++ b/languages/cpp/app_templates/gtk2mmapp/gtk2mmapp.kdevtemplate @@ -0,0 +1,174 @@ +# TDE Config File +[General] +Name=Gtk-- Application framework +Name[ca]=Infraestructura d'aplicació per a Gtk-- +Name[da]=Gtk-- programskelet +Name[de]="Gtk--"-Anwendungsgrundgerüst +Name[el]=Gtk-- πλαίσιο εφαρμογής +Name[es]=Infraestructura de aplicación Gtk-- +Name[et]=Gtk-- rakenduse raamistik +Name[eu]=Gtk-- Applicazioen lan-markoa +Name[fa]=چارچوب کاربرد Gtk-- +Name[fr]=Infrastructure d'application Gtk-- +Name[ga]=Creatlach feidhmchláir Gtk-- +Name[hu]=Gtk-- - alkalmazás-keretrendszer +Name[it]=Infrastruttura per un'applicazione Gtk-- +Name[ja]=Gtk-- アプリケーションフレームワーク +Name[nds]="Gtk--"-Programmrahmenwark +Name[ne]=Gtk-- अनुप्रयोग फ्रेमवर्क +Name[nl]=Gtk-- Applicationframework +Name[pl]=Szablon programu Gtk-- +Name[pt]=Plataforma de aplicações em Gtk-- +Name[pt_BR]=Plataforma de aplicações em Gtk-- +Name[ru]=Приложение Gtk-- +Name[sk]=Gtk-- aplikačný framework +Name[sl]=Ogrodje programa za Gtk-- +Name[sr]=Радни оквир Gtk-- програма +Name[sr@Latn]=Radni okvir Gtk-- programa +Name[sv]=Gtk-- programramverk +Name[tr]=Gtk-- Uygulama Çatısı +Name[zh_CN]=Gtk-- 应用程序框架 +Name[zh_TW]=Gtk-- 應用程式框架 +Category=C++/GTK+ +Icon=gtk2mmapp.png +Comment=Generates a simple Gtk-- application. Gtkmm >= 2.8.0 should be installed. To edit glade file glade-- (http://home.wtal.de/petig/Gtk/) is required. +Comment[ca]=Genera una simple aplicació Gtk. Gtkmm >= 2.8.0 hauria d'estar instal·lat. Per editar el fitxer glade es requereix glade-- (http://home.wtal.de/petig/Gtk/). +Comment[da]=Genererer et simpelt Gtk-- program. Gtkmm >= 2.8.0 skal være installeret. For at redigere glade file glade-- kræves (http://home.wtal.de/petig/Gtk/). +Comment[de]=Erstellt eine einfache Gtk-Anwendung. Gtkmm >= 1.2.8 und < 1.3.0 sollte installiert sein. Zum Bearbeiten der glade-Datei ist glade-- (http://home.wtal.de/petig/Gtk/) erforderlich. +Comment[el]=Δημιουργεί μια απλή εφαρμογή Gtk. Το Gtkmm >= 2.8.0 πρέπει να είναι εγκατεστημένο. Για την επεξεργασία του αρχείου glade απαιτείται το glade (http://home.wtal.de/petig/Gtk/). +Comment[es]=Genera una sencilla aplicación Gtk--. Debe tener instalado Gtkmm >= 2.8.0. Para editar archivos glade se necesita glade-- (http://home.wtal.de/petig/Gtk/). +Comment[et]=Lihtsa Gtk-- rakenduse loomine. Paigaldatud peab olema Gtkmm >= 2.8.0. Glade-faili redigeerimiseks on vajalik glade-- (http://home.wtal.de/petig/Gtk/). +Comment[fr]=Génère une application Gtk-- simple. Gtkmm >= 2.8.0 devra être installé. Pour modifier le fichier glade, glade-- (http://home.wtal.de/petig/Gtk/) est requis. +Comment[hu]=Létrehoz egy egyszerű Gtk---alapú alkalmazást. Gtkmm >= 2.8.0 szükséges hozzá. Glade-fájl szerkesztéséhez glade-- (http://home.wtal.de/petig/Gtk/) szükséges. +Comment[it]=Genera una semplice applicazione Gtk--. Dovrebbe essere installato Gtkmm >= 2.8.0. Per modificare il file di glade bisogna avere glade-- installato (http://home.wtal.de/petig/Gtk/). +Comment[ja]=簡単な Gtk-- アプリケーションを作成します。Gtkmm >= 2.8.0 が必要です。Glade ファイルを編集するには glade (http://home.wtal.de/petig/Gtk/) が必要です。 +Comment[nds]=Stellt en eenfach "Gtk--"-Programm op. Gtkmm >= 2.8.0 schull installeert wesen. För't Bewerken vun de glade-Datei deit "glade--" (http://home.wtal.de/petig/Gtk/) noot. +Comment[nl]=Genereert een eenvoudige Gtk-- toepassing. Gtkmm >= 2.8.0 dient te zijn geïnstalleerd. Om het glade-bestand te kunnen bewerken hebt u glade-- (http://home.wtal.de/petig/Gtk/) nodig. +Comment[pl]=Generuje prosty program Gtk--. Powinno być zainstalowane Gtkmm w wersji >= 2.8.0. Do modyfikacji plików glade konieczne jest glade-- (http://home.wtal.de/petig/Gtk/). +Comment[pt]=Gera uma aplicação simples em Gtk--. Deverá estar instalado o Gtkmm >= 2.8.0. Para editar o ficheiro do Glade,, é necessário o glade-- (http://home.wtal.de/petig/Gtk/). +Comment[pt_BR]=Gera uma aplicação simples em Gtk--. Deverá estar instalado o Gtkmm >= 2.8.0. Para editar o ficheiro do Glade,, é necessário o glade-- (http://home.wtal.de/petig/Gtk/). +Comment[ru]=Создание простого приложения Gtk--. Требуется Gtkmm >= 1.2.8 и < 1.3.0. Для редактирования файла glade нужна соответствующая программа (http://home.wtal.de/petig/Gtk/). +Comment[sk]=Vygeneruje jednoduchú Gtk-- aplikáciu. Vyžaduje nainštalované Gtkmm >= 2.8.0. Na editovanie glade súboru he potrebný glade-- (http://home.wtal.de/petig/Gtk/). +Comment[sr]=Прави једноставан Gtk-- програм. Gtkmm >= 2.8.0 требало би да је инсталиран. Да бисте уређивали glade фајл, неопходан је glade-- (http://home.wtal.de/petig/Gtk/). +Comment[sr@Latn]=Pravi jednostavan Gtk-- program. Gtkmm >= 2.8.0 trebalo bi da je instaliran. Da biste uređivali glade fajl, neophodan je glade-- (http://home.wtal.de/petig/Gtk/). +Comment[sv]=Skapar ett enkelt Gtk-- program. Gtkmm >= 2.8.0 måste vara installerat. För att redigera glade-filer krävs glade-- (http://home.wtal.de/petig/Gtk/). +Comment[zh_TW]=產生一個簡單的 Gtk-- 應用程式。要先安裝 Gtkmm 版本 >= 2.8.0。要編輯 glade 檔則要先安裝 glade-- (http://home.wtal.de/petig/Gtk/)。 +FileTemplates=hh,CStyle,cc,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=gtk2mmapp.tar.gz + +[INCADMIN] +Type=include +File=%{tdevelop}/template-common/incadmin.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=%{src}/app-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE3] +Type=install +Source=%{src}/configure.in +Dest=%{dest}/configure.in + +[FILE4] +Type=install +Source=%{src}/acconfig.h +Dest=%{dest}/acconfig.h + +[FILE5] +Type=install +Source=%{src}/config.h +Dest=%{dest}/config.h + +[FILE6] +Type=install +Source=%{src}/autogen.sh +Dest=%{dest}/autogen.sh + +[FILE7] +Type=install +Source=%{src}/gtk2mm.glade +Dest=%{dest}/%{APPNAMELC}.glade + +[FILE8] +Type=install +Source=%{src}/gtk2mm.gladep +Dest=%{dest}/%{APPNAMELC}.gladep + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE9] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE10] +Type=install +Source=%{src}/gtk2mm.cc +Dest=%{dest}/src/%{APPNAMELC}.cc + +[FILE11] +Type=install +Source=%{src}/main_window.hh +Dest=%{dest}/src/main_window.hh + +[FILE12] +Type=install +Source=%{src}/main_window.cc +Dest=%{dest}/src/main_window.cc + +[FILE13] +Type=install +Source=%{src}/main_window_glade.hh +Dest=%{dest}/src/main_window_glade.hh + +[FILE14] +Type=install +Source=%{src}/main_window_glade.cc +Dest=%{dest}/src/main_window_glade.cc + +[MSG] +Type=message +Comment=A Gtk-- application framework was created in %{dest} +Comment[ca]=Una infraestructura d'aplicació Gtk-- ha estat creada en %{dest} +Comment[da]=Et Gtk-- programskelet blev oprettet i %{dest} +Comment[de]=Ein Gtk-Anwendungsgerüst wurde in %{dest} erstellt. +Comment[el]=Ένα πλαίσιο εφαρμογής Gtk δημιουργήθηκε στο %{dest} +Comment[es]=Una infraestructura de aplicación Gtk-- ha sido creada en %{dest} +Comment[et]=Gtk-- rakenduse raamistik loodi asukohta %{dest} +Comment[eu]=Gtk-- aplikazioen lan-marko bat sortu da hemen: %{dest} +Comment[fa]=یک چارچوب کاربرد Gtk-- در %{dest} ایجاد شد +Comment[fr]=Une infrastructure d'application Gtk-- a été créée dans %{dest} +Comment[ga]=Cruthaíodh creatlach feidhmchláir Gtk-- i %{dest} +Comment[gl]=Creouse un contorno de traballo para aplicación Gtk en %{dest} +Comment[hu]=Létrejött egy Gtk-s alkalmazás-keretrendszer itt: %{dest} +Comment[it]=È stata creata l'infrastruttura per un'applicazione Gtk-- in %{dest} +Comment[ja]=Gtk-- アプリケーションフレームワークを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en "Gtk-- "-Programmrahmenwark opstellt +Comment[ne]=Gtk-- अनुप्रयोग फ्रेमवर्क %{dest} मा सिर्जना गरियो +Comment[nl]=Een Gtk-- toepassing is aangemaakt in %{dest} +Comment[pl]=Szablon programu Gtk-- został utworzony w %{dest} +Comment[pt]=Foi criada a plataforma de uma aplicação Gtk-- em %{dest} +Comment[pt_BR]=Foi criada a plataforma de uma aplicação Gtk-- em %{dest} +Comment[ru]=Приложение Gtk-- создано в %{dest} +Comment[sk]=Gtk-- aplikačný framework bol vytvorený v %{dest} +Comment[sl]=Ogrodje za program v Gtk-- je bil ustvarjen v %{dest} +Comment[sr]=Радни оквир Gtk-- програма направљен је у %{dest} +Comment[sr@Latn]=Radni okvir Gtk-- programa napravljen je u %{dest} +Comment[sv]=Ett Gtk-- programramverk skapades i %{dest} +Comment[tr]=Bir Gtk-- uygulama çatısı %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 创建了一个 Gtk-- 应用程序框架 +Comment[zh_TW]=一個 Gtk-- 應用程式框架已建立於 %{dest} diff --git a/languages/cpp/app_templates/gtk2mmapp/gtk2mmapp.tdevtemplate b/languages/cpp/app_templates/gtk2mmapp/gtk2mmapp.tdevtemplate deleted file mode 100644 index 4559f2d8..00000000 --- a/languages/cpp/app_templates/gtk2mmapp/gtk2mmapp.tdevtemplate +++ /dev/null @@ -1,174 +0,0 @@ -# TDE Config File -[General] -Name=Gtk-- Application framework -Name[ca]=Infraestructura d'aplicació per a Gtk-- -Name[da]=Gtk-- programskelet -Name[de]="Gtk--"-Anwendungsgrundgerüst -Name[el]=Gtk-- πλαίσιο εφαρμογής -Name[es]=Infraestructura de aplicación Gtk-- -Name[et]=Gtk-- rakenduse raamistik -Name[eu]=Gtk-- Applicazioen lan-markoa -Name[fa]=چارچوب کاربرد Gtk-- -Name[fr]=Infrastructure d'application Gtk-- -Name[ga]=Creatlach feidhmchláir Gtk-- -Name[hu]=Gtk-- - alkalmazás-keretrendszer -Name[it]=Infrastruttura per un'applicazione Gtk-- -Name[ja]=Gtk-- アプリケーションフレームワーク -Name[nds]="Gtk--"-Programmrahmenwark -Name[ne]=Gtk-- अनुप्रयोग फ्रेमवर्क -Name[nl]=Gtk-- Applicationframework -Name[pl]=Szablon programu Gtk-- -Name[pt]=Plataforma de aplicações em Gtk-- -Name[pt_BR]=Plataforma de aplicações em Gtk-- -Name[ru]=Приложение Gtk-- -Name[sk]=Gtk-- aplikačný framework -Name[sl]=Ogrodje programa za Gtk-- -Name[sr]=Радни оквир Gtk-- програма -Name[sr@Latn]=Radni okvir Gtk-- programa -Name[sv]=Gtk-- programramverk -Name[tr]=Gtk-- Uygulama Çatısı -Name[zh_CN]=Gtk-- 应用程序框架 -Name[zh_TW]=Gtk-- 應用程式框架 -Category=C++/GTK+ -Icon=gtk2mmapp.png -Comment=Generates a simple Gtk-- application. Gtkmm >= 2.8.0 should be installed. To edit glade file glade-- (http://home.wtal.de/petig/Gtk/) is required. -Comment[ca]=Genera una simple aplicació Gtk. Gtkmm >= 2.8.0 hauria d'estar instal·lat. Per editar el fitxer glade es requereix glade-- (http://home.wtal.de/petig/Gtk/). -Comment[da]=Genererer et simpelt Gtk-- program. Gtkmm >= 2.8.0 skal være installeret. For at redigere glade file glade-- kræves (http://home.wtal.de/petig/Gtk/). -Comment[de]=Erstellt eine einfache Gtk-Anwendung. Gtkmm >= 1.2.8 und < 1.3.0 sollte installiert sein. Zum Bearbeiten der glade-Datei ist glade-- (http://home.wtal.de/petig/Gtk/) erforderlich. -Comment[el]=Δημιουργεί μια απλή εφαρμογή Gtk. Το Gtkmm >= 2.8.0 πρέπει να είναι εγκατεστημένο. Για την επεξεργασία του αρχείου glade απαιτείται το glade (http://home.wtal.de/petig/Gtk/). -Comment[es]=Genera una sencilla aplicación Gtk--. Debe tener instalado Gtkmm >= 2.8.0. Para editar archivos glade se necesita glade-- (http://home.wtal.de/petig/Gtk/). -Comment[et]=Lihtsa Gtk-- rakenduse loomine. Paigaldatud peab olema Gtkmm >= 2.8.0. Glade-faili redigeerimiseks on vajalik glade-- (http://home.wtal.de/petig/Gtk/). -Comment[fr]=Génère une application Gtk-- simple. Gtkmm >= 2.8.0 devra être installé. Pour modifier le fichier glade, glade-- (http://home.wtal.de/petig/Gtk/) est requis. -Comment[hu]=Létrehoz egy egyszerű Gtk---alapú alkalmazást. Gtkmm >= 2.8.0 szükséges hozzá. Glade-fájl szerkesztéséhez glade-- (http://home.wtal.de/petig/Gtk/) szükséges. -Comment[it]=Genera una semplice applicazione Gtk--. Dovrebbe essere installato Gtkmm >= 2.8.0. Per modificare il file di glade bisogna avere glade-- installato (http://home.wtal.de/petig/Gtk/). -Comment[ja]=簡単な Gtk-- アプリケーションを作成します。Gtkmm >= 2.8.0 が必要です。Glade ファイルを編集するには glade (http://home.wtal.de/petig/Gtk/) が必要です。 -Comment[nds]=Stellt en eenfach "Gtk--"-Programm op. Gtkmm >= 2.8.0 schull installeert wesen. För't Bewerken vun de glade-Datei deit "glade--" (http://home.wtal.de/petig/Gtk/) noot. -Comment[nl]=Genereert een eenvoudige Gtk-- toepassing. Gtkmm >= 2.8.0 dient te zijn geïnstalleerd. Om het glade-bestand te kunnen bewerken hebt u glade-- (http://home.wtal.de/petig/Gtk/) nodig. -Comment[pl]=Generuje prosty program Gtk--. Powinno być zainstalowane Gtkmm w wersji >= 2.8.0. Do modyfikacji plików glade konieczne jest glade-- (http://home.wtal.de/petig/Gtk/). -Comment[pt]=Gera uma aplicação simples em Gtk--. Deverá estar instalado o Gtkmm >= 2.8.0. Para editar o ficheiro do Glade,, é necessário o glade-- (http://home.wtal.de/petig/Gtk/). -Comment[pt_BR]=Gera uma aplicação simples em Gtk--. Deverá estar instalado o Gtkmm >= 2.8.0. Para editar o ficheiro do Glade,, é necessário o glade-- (http://home.wtal.de/petig/Gtk/). -Comment[ru]=Создание простого приложения Gtk--. Требуется Gtkmm >= 1.2.8 и < 1.3.0. Для редактирования файла glade нужна соответствующая программа (http://home.wtal.de/petig/Gtk/). -Comment[sk]=Vygeneruje jednoduchú Gtk-- aplikáciu. Vyžaduje nainštalované Gtkmm >= 2.8.0. Na editovanie glade súboru he potrebný glade-- (http://home.wtal.de/petig/Gtk/). -Comment[sr]=Прави једноставан Gtk-- програм. Gtkmm >= 2.8.0 требало би да је инсталиран. Да бисте уређивали glade фајл, неопходан је glade-- (http://home.wtal.de/petig/Gtk/). -Comment[sr@Latn]=Pravi jednostavan Gtk-- program. Gtkmm >= 2.8.0 trebalo bi da je instaliran. Da biste uređivali glade fajl, neophodan je glade-- (http://home.wtal.de/petig/Gtk/). -Comment[sv]=Skapar ett enkelt Gtk-- program. Gtkmm >= 2.8.0 måste vara installerat. För att redigera glade-filer krävs glade-- (http://home.wtal.de/petig/Gtk/). -Comment[zh_TW]=產生一個簡單的 Gtk-- 應用程式。要先安裝 Gtkmm 版本 >= 2.8.0。要編輯 glade 檔則要先安裝 glade-- (http://home.wtal.de/petig/Gtk/)。 -FileTemplates=hh,CStyle,cc,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=gtk2mmapp.tar.gz - -[INCADMIN] -Type=include -File=%{tdevelop}/template-common/incadmin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/app-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE3] -Type=install -Source=%{src}/configure.in -Dest=%{dest}/configure.in - -[FILE4] -Type=install -Source=%{src}/acconfig.h -Dest=%{dest}/acconfig.h - -[FILE5] -Type=install -Source=%{src}/config.h -Dest=%{dest}/config.h - -[FILE6] -Type=install -Source=%{src}/autogen.sh -Dest=%{dest}/autogen.sh - -[FILE7] -Type=install -Source=%{src}/gtk2mm.glade -Dest=%{dest}/%{APPNAMELC}.glade - -[FILE8] -Type=install -Source=%{src}/gtk2mm.gladep -Dest=%{dest}/%{APPNAMELC}.gladep - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE9] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE10] -Type=install -Source=%{src}/gtk2mm.cc -Dest=%{dest}/src/%{APPNAMELC}.cc - -[FILE11] -Type=install -Source=%{src}/main_window.hh -Dest=%{dest}/src/main_window.hh - -[FILE12] -Type=install -Source=%{src}/main_window.cc -Dest=%{dest}/src/main_window.cc - -[FILE13] -Type=install -Source=%{src}/main_window_glade.hh -Dest=%{dest}/src/main_window_glade.hh - -[FILE14] -Type=install -Source=%{src}/main_window_glade.cc -Dest=%{dest}/src/main_window_glade.cc - -[MSG] -Type=message -Comment=A Gtk-- application framework was created in %{dest} -Comment[ca]=Una infraestructura d'aplicació Gtk-- ha estat creada en %{dest} -Comment[da]=Et Gtk-- programskelet blev oprettet i %{dest} -Comment[de]=Ein Gtk-Anwendungsgerüst wurde in %{dest} erstellt. -Comment[el]=Ένα πλαίσιο εφαρμογής Gtk δημιουργήθηκε στο %{dest} -Comment[es]=Una infraestructura de aplicación Gtk-- ha sido creada en %{dest} -Comment[et]=Gtk-- rakenduse raamistik loodi asukohta %{dest} -Comment[eu]=Gtk-- aplikazioen lan-marko bat sortu da hemen: %{dest} -Comment[fa]=یک چارچوب کاربرد Gtk-- در %{dest} ایجاد شد -Comment[fr]=Une infrastructure d'application Gtk-- a été créée dans %{dest} -Comment[ga]=Cruthaíodh creatlach feidhmchláir Gtk-- i %{dest} -Comment[gl]=Creouse un contorno de traballo para aplicación Gtk en %{dest} -Comment[hu]=Létrejött egy Gtk-s alkalmazás-keretrendszer itt: %{dest} -Comment[it]=È stata creata l'infrastruttura per un'applicazione Gtk-- in %{dest} -Comment[ja]=Gtk-- アプリケーションフレームワークを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en "Gtk-- "-Programmrahmenwark opstellt -Comment[ne]=Gtk-- अनुप्रयोग फ्रेमवर्क %{dest} मा सिर्जना गरियो -Comment[nl]=Een Gtk-- toepassing is aangemaakt in %{dest} -Comment[pl]=Szablon programu Gtk-- został utworzony w %{dest} -Comment[pt]=Foi criada a plataforma de uma aplicação Gtk-- em %{dest} -Comment[pt_BR]=Foi criada a plataforma de uma aplicação Gtk-- em %{dest} -Comment[ru]=Приложение Gtk-- создано в %{dest} -Comment[sk]=Gtk-- aplikačný framework bol vytvorený v %{dest} -Comment[sl]=Ogrodje za program v Gtk-- je bil ustvarjen v %{dest} -Comment[sr]=Радни оквир Gtk-- програма направљен је у %{dest} -Comment[sr@Latn]=Radni okvir Gtk-- programa napravljen je u %{dest} -Comment[sv]=Ett Gtk-- programramverk skapades i %{dest} -Comment[tr]=Bir Gtk-- uygulama çatısı %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 创建了一个 Gtk-- 应用程序框架 -Comment[zh_TW]=一個 Gtk-- 應用程式框架已建立於 %{dest} diff --git a/languages/cpp/app_templates/kapp/CMakeLists.txt b/languages/cpp/app_templates/kapp/CMakeLists.txt new file mode 100644 index 00000000..bfe6d93d --- /dev/null +++ b/languages/cpp/app_templates/kapp/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( kapp.tar.gz ALL + COMMAND tar zcf kapp.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} + app.cpp app.h pref.cpp pref.h appview.cpp appview.h + appiface.h app_client.cpp main.cpp appui.rc src-Makefile.am + kapp.png app.tdevelop subdirs README +) + + +install( FILES + ${CMAKE_CURRENT_BINARY_DIR}/kapp.tar.gz kapp.png + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) + + +install( FILES + kapp.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kapp/Makefile.am b/languages/cpp/app_templates/kapp/Makefile.am new file mode 100644 index 00000000..145551d3 --- /dev/null +++ b/languages/cpp/app_templates/kapp/Makefile.am @@ -0,0 +1,19 @@ +dataFiles = app.cpp app.h pref.cpp pref.h appview.cpp appview.h \ + appiface.h app_client.cpp main.cpp appui.rc src-Makefile.am \ + kapp.png app.tdevelop subdirs README + +templateName = kapp + +### 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/tdeapp/README b/languages/cpp/app_templates/kapp/README similarity index 100% rename from languages/cpp/app_templates/tdeapp/README rename to languages/cpp/app_templates/kapp/README diff --git a/languages/cpp/app_templates/tdeapp/app.cpp b/languages/cpp/app_templates/kapp/app.cpp similarity index 100% rename from languages/cpp/app_templates/tdeapp/app.cpp rename to languages/cpp/app_templates/kapp/app.cpp diff --git a/languages/cpp/app_templates/tdeapp/app.desktop b/languages/cpp/app_templates/kapp/app.desktop similarity index 100% rename from languages/cpp/app_templates/tdeapp/app.desktop rename to languages/cpp/app_templates/kapp/app.desktop diff --git a/languages/cpp/app_templates/tdeapp/app.h b/languages/cpp/app_templates/kapp/app.h similarity index 100% rename from languages/cpp/app_templates/tdeapp/app.h rename to languages/cpp/app_templates/kapp/app.h diff --git a/languages/cpp/app_templates/tdeapp/app.tdevses b/languages/cpp/app_templates/kapp/app.kdevses similarity index 100% rename from languages/cpp/app_templates/tdeapp/app.tdevses rename to languages/cpp/app_templates/kapp/app.kdevses diff --git a/languages/cpp/app_templates/kapp/app.tdevelop b/languages/cpp/app_templates/kapp/app.tdevelop new file mode 100644 index 00000000..6a53f237 --- /dev/null +++ b/languages/cpp/app_templates/kapp/app.tdevelop @@ -0,0 +1,168 @@ + + + + %{AUTHOR} + %{EMAIL} + %{VERSION} + KDevTDEAutoProject + C++ + + C++ + Code + Qt + TDE + + . + false + + + + + + 3 + true + 3 + EmbeddedKDevDesigner + + + + + src/%{APPNAMELC} + debug + + + src/%{APPNAMELC} + false + + + + + + + false + 1 + false + + + + + optimized + kdevgccoptions + kdevgppoptions + kdevg77options + -O2 -g0 + + + --enable-debug=full + debug + kdevgccoptions + kdevgppoptions + kdevg77options + -O0 -g3 + + + + + + + + + + + + + false + *.o,*.lo,CVS + + + + + 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 + + + true + false + false + true + + + false + true + + + + + + + + + + + + -f + + -dP + + -f + -u3 -p + + + + + + + false + + + .h + .cpp + true + + + + true + 2 + + + + Doxygen Documentation Collection + %{APPNAMELC}.tag + + + diff --git a/languages/cpp/app_templates/tdeapp/app_client.cpp b/languages/cpp/app_templates/kapp/app_client.cpp similarity index 100% rename from languages/cpp/app_templates/tdeapp/app_client.cpp rename to languages/cpp/app_templates/kapp/app_client.cpp diff --git a/languages/cpp/app_templates/tdeapp/appiface.h b/languages/cpp/app_templates/kapp/appiface.h similarity index 100% rename from languages/cpp/app_templates/tdeapp/appiface.h rename to languages/cpp/app_templates/kapp/appiface.h diff --git a/languages/cpp/app_templates/tdeapp/appui.rc b/languages/cpp/app_templates/kapp/appui.rc similarity index 100% rename from languages/cpp/app_templates/tdeapp/appui.rc rename to languages/cpp/app_templates/kapp/appui.rc diff --git a/languages/cpp/app_templates/tdeapp/appview.cpp b/languages/cpp/app_templates/kapp/appview.cpp similarity index 100% rename from languages/cpp/app_templates/tdeapp/appview.cpp rename to languages/cpp/app_templates/kapp/appview.cpp diff --git a/languages/cpp/app_templates/tdeapp/appview.h b/languages/cpp/app_templates/kapp/appview.h similarity index 100% rename from languages/cpp/app_templates/tdeapp/appview.h rename to languages/cpp/app_templates/kapp/appview.h diff --git a/languages/cpp/app_templates/kapp/kapp.kdevtemplate b/languages/cpp/app_templates/kapp/kapp.kdevtemplate new file mode 100644 index 00000000..86675a50 --- /dev/null +++ b/languages/cpp/app_templates/kapp/kapp.kdevtemplate @@ -0,0 +1,253 @@ +# TDE Config File +[General] +Name=Application framework +Name[ca]=Infraestructura d'aplicacions +Name[da]=Programskelet +Name[de]=Anwendungsgrundgerüst +Name[el]=Πλαίσιο εφαρμογής +Name[es]=Infraestructura de aplicación +Name[et]=Rakenduse raamistik +Name[eu]=Aplikazioen lan-markoa +Name[fa]=چارچوب کاربرد +Name[fr]=Infrastructure d'application +Name[ga]=Creatlach feidhmchláir +Name[gl]=Entorno de traballo para aplicación +Name[hu]=Alkalmazás-keretrendszer +Name[it]=Infrastruttura applicativa +Name[ja]=アプリケーションフレームワーク +Name[nds]=Programmrahmenwark +Name[ne]=अनुप्रयोग फ्रेमवर्क +Name[nl]=Applicationframework +Name[pl]=Szablon programu +Name[pt]=Plataforma de aplicações +Name[pt_BR]=Plataforma de aplicações +Name[ru]=Приложение TDE +Name[sk]=Aplikačný framework +Name[sl]=Ogrodje programa +Name[sr]=Радни оквир програма +Name[sr@Latn]=Radni okvir programa +Name[sv]=Programramverk +Name[tr]=Uygulama Çatısı +Name[zh_CN]=应用程序框架 +Name[zh_TW]=應用程式框架 +Icon=kapp.png +Category=C++/TDE +Comment=Generates a simple TDE application with one toplevel window, menus and toolbars. A DCOP interface is also provided, so that your application can provide a scripting interface +Comment[ca]=Genera una simple aplicació per al TDE amb una finestra principal, menús i barres d'eines. També es proveeix la interfície DCOP, de manera que la vostra aplicació podrà proveir d'una interfície per a scripts +Comment[da]=Genererer et simpelt TDE program med et vindue på topniveau, menuer og værktøjslinjer. Der sørges også for en DCOP-grænseflade, så dit program kan sørge for en script-grænseflade +Comment[de]=Erstellt eine einfache TDE-Anwendung mit einem Toplevel-Fenster, Menüs und Werkzeugleisten. Dazu kommt eine DCOP-Schnittstelle, so dass Ihre Anwendung eine Schnittstelle für Skripte anbieten kann. +Comment[el]=Δημιουργεί μια απλή εφαρμογή TDE με ένα ανώτερο παράθυρο, μενού και γραμμές εργαλείων. Μια διασύνδεση DCOP προσφέρεται επίσης, έτσι ώστε η εφαρμογή σας να προσφέρει ένα περιβάλλον γραφής σεναρίων +Comment[es]=Genera una sencilla aplicación de TDE con una ventana de nivel superior, menús y barras de herramientas. También se proporciona una interfaz DCOP para que su aplicación pueda proporcionar una interfaz para guiones de órdenes. +Comment[et]=Lihtsa TDE rakenduse loomine ühe tipptaseme akna, menüüde ja tööriistaribadega. Lisatakse ka DCOP-liides, mis võimaldab pakkuda rakenduses ka skriptikeelte tuge. +Comment[eu]=TDE aplikazio sinple bat sortzen du menu eta tresna-barradun goi-mailako lehio batekin. DCOP interfaze bat ere eskeintzen zaio aplikazioari, zure aplikazioak script interfaze bat izan dezan +Comment[fa]=یک کاربرد سادۀ TDE با یک پنجرۀ سطح بالا، گزینگان و میله ابزارها تولید می‌کند. همچنین یک واسط DCOP فراهم است. بنابراین، کاربرد شما یک واسط دست‌نوشته‌ای را می‌تواند فراهم کند +Comment[fr]=Génère une application TDE simple comprenant une fenêtre de premier niveau, des menus et des barres d'outils. Une interface DCOP est également prévue, afin que votre application puisse offrir une interface de scriptage +Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí TDE le príomhfhuinneog amháin, roghchláir agus barraí uirlisí. Soláthraítear comhéadan DCOP freisin, d'fhonn is féidir comhéadan scriptithe a chur ar fáil +Comment[gl]=Xera unha aplicación TDE sinxela cunha xanela principal, menús e barras de ferramentas. Tamén se proporciona unha interface DCOP de modo que a súa aplicación poida proveer unha interface de scripting. +Comment[hu]=Létrehoz egy egyszerű TDE-alkalmazást egy főablakkal, menükkel és eszköztárakkal. DCOP-felület is létre lesz hozva, ezért az alkalmazás szkriptelési felületet is biztosíthat. +Comment[it]=Genera una semplice applicazione TDE con una finestra toplevel, menu e barre degli strumenti. È anche fornita un'interfaccia DCOP così l'applicazione avrà un'interfaccia per lo scripting +Comment[ja]=簡単な TDE アプリケーションを作成します。アプリケーションには、トップレベルのウィンドウ、メニュー、ツールバーがあります。スクリプト化をサポートするために DCOP のインターフェースも用意してあります。 +Comment[nds]=Stellt en eenfach TDE-Programm mit een böverst Finster, Menüs un Warktüüchbalkens op. Ok warrt noch en DCOP-Koppelsteed praatstellt, so dat Dien Programm en Skriptkoppelsteed anbeden kann +Comment[ne]=एउटा उच्चतह सञ्झ्याल, मेनु र उपकरणपट्टीसँग साधारण केडीई अनुप्रयोग उत्पन्न गर्दछ । DCOP पनि प्रदान गरिन्छ, जसले गर्दा तपाईँको अनुप्रयोगले स्क्रिप्टिङ इन्टरफेस प्रदान गर्न सक्दछ +Comment[nl]=Genereert een eenvoudige TDE-toepassing met één toplevel window, menu's en toolbars. Er wordt ook een DCOP-interface aangeleverd, zodat uw toepassing een scripting interface kan aanleveren. +Comment[pl]=Generuje prosty program dla TDE z oknem, menu i paskami narzędzi. Dostępny jest także interfejs DCOP, więc Twoje programy mogą zawierać interfejs do skryptów +Comment[pt]=Gera uma aplicação simples do TDE com uma janela de topo, menus e barras de ferramentas. Também é oferecida uma interface de DCOP, para que a sua aplicação possa fornecer uma interface de programação +Comment[pt_BR]=Gera uma aplicação simples do TDE com uma janela de topo, menus e barras de ferramentas. Também é oferecida uma interface de DCOP, para que a sua aplicação possa fornecer uma interface de programação +Comment[ru]=Создание простого приложения TDE с окном, меню и панелями инструментов. Кроме того, в нём содержится интерфейс DCOP для автоматизации работы с помощью пользовательских скриптов +Comment[sk]=Vygenruje jednoduchú TDE aplikáciu s jedným oknom, menu apanelom nástrojov. Taktiež bude poskytnuté DCOP rozhranie, takže aj aplikáciamôže poskytnúť skriptovacie rozhranie +Comment[sr]=Прави једноставан TDE програм, са једним прозором највишег нивоа, менијима и тракама са алатом. Дат је и DCOP интерфејс, тако да ваш програм може да омогући скриптовање +Comment[sr@Latn]=Pravi jednostavan TDE program, sa jednim prozorom najvišeg nivoa, menijima i trakama sa alatom. Dat je i DCOP interfejs, tako da vaš program može da omogući skriptovanje +Comment[sv]=Skapar ett enkelt TDE-program med ett toppnivåfönster, menyer och verktygsrader. Ett DCOP-gränssnitt tillhandahålls också, så att programmet kan tillhandahålla ett skriptgränssnitt. +Comment[tr]=Bir üst seviye penceresi, menüleri ve araç çubukları olan basit bir TDE uygulaması yaratır. Bir DCOP arayüzü sağlanır, böylece uygulama bir betik arayüzü sağlayabilir. +Comment[zh_CN]=生成一个带一个顶层窗口、菜单和工具栏的简单 TDE 应用程序。另外还提供了 DCOP 接口,这样您的应用也可同时提供脚本接口。 +Comment[zh_TW]=產生一個簡單的 TDE 應用程式,內含頂層視窗、選單與工具列。另外提供一個 DCOP 介面,讓您的應用程式可以提供文稿介面。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}view.cpp,%{dest}/src/README +Archive=kapp.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/tde-app.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[FILE10] +Type=install +Source=%{tdevelop}/template-common/hi16-app-app.png +Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png +Process=false + +[FILE11] +Type=install +Source=%{tdevelop}/template-common/hi32-app-app.png +Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png +Process=false + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE12] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE13] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE14] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE15] +Type=install +Source=%{src}/app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE16] +Type=install +Source=%{src}/app.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE17] +Type=install +Source=%{src}/appview.cpp +Dest=%{dest}/src/%{APPNAMELC}view.cpp + +[FILE18] +Type=install +Source=%{src}/appview.h +Dest=%{dest}/src/%{APPNAMELC}view.h + +[FILE19] +Type=install +Source=%{src}/appiface.h +Dest=%{dest}/src/%{APPNAMELC}iface.h + +[FILE20] +Type=install +Source=%{src}/app_client.cpp +Dest=%{dest}/src/%{APPNAMELC}_client.cpp + +[FILE21] +Type=install +Source=%{src}/pref.cpp +Dest=%{dest}/src/pref.cpp + +[FILE22] +Type=install +Source=%{src}/pref.h +Dest=%{dest}/src/pref.h + +[FILE23] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/main.cpp + +[FILE24] +Type=install +EscapeXML=true +Source=%{src}/appui.rc +Dest=%{dest}/src/%{APPNAMELC}ui.rc + +[FILE25] +Type=install +Source=%{src}/README +Dest=%{dest}/src/README + +[MSG] +Type=message +Comment=A TDE Application was created at %{dest} +Comment[ca]=Una aplicació per al TDE ha estat creada a %{dest} +Comment[da]=Et TDE program blev oprettet i %{dest} +Comment[de]=Eine TDE-Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή TDE δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación de TDE ha sido creada en %{dest} +Comment[et]=TDE rakendus loodi asukohta %{dest} +Comment[eu]=A TDE aplikazio bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد TDE در %{dest} فراهم شد +Comment[fr]=Une application TDE a été créée dans %{dest} +Comment[ga]=Cruthaíodh Feidhmchlár TDE ag %{dest} +Comment[gl]=Creouse unha aplicación TDE en %{dest} +Comment[hu]=Létrejött egy TDE-s alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione TDE in %{dest} +Comment[ja]=TDE アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en TDE-Programm opstellt +Comment[ne]=TDE अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een TDE-toepassing is aangemaakt in %{dest} +Comment[pl]=Program dla TDE został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação do TDE em %{dest} +Comment[pt_BR]=Foi criada uma aplicação do TDE em %{dest} +Comment[ru]=Приложение TDE создано в %{dest} +Comment[sk]=TDE aplikácia bola vytvorená v %{dest} +Comment[sl]=Program za TDE je bil ustvarjen v %{dest} +Comment[sr]=TDE програм је направљен у %{dest} +Comment[sr@Latn]=TDE program je napravljen u %{dest} +Comment[sv]=Ett TDE-program skapades i %{dest} +Comment[tr]=Bir TDE Uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个 TDE 应用程序 +Comment[zh_TW]=一個 TDE 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/tde4app/tde4app.png b/languages/cpp/app_templates/kapp/kapp.png similarity index 100% rename from languages/cpp/app_templates/tde4app/tde4app.png rename to languages/cpp/app_templates/kapp/kapp.png diff --git a/languages/cpp/app_templates/tdeapp/main.cpp b/languages/cpp/app_templates/kapp/main.cpp similarity index 100% rename from languages/cpp/app_templates/tdeapp/main.cpp rename to languages/cpp/app_templates/kapp/main.cpp diff --git a/languages/cpp/app_templates/tdeapp/pref.cpp b/languages/cpp/app_templates/kapp/pref.cpp similarity index 100% rename from languages/cpp/app_templates/tdeapp/pref.cpp rename to languages/cpp/app_templates/kapp/pref.cpp diff --git a/languages/cpp/app_templates/tdeapp/pref.h b/languages/cpp/app_templates/kapp/pref.h similarity index 100% rename from languages/cpp/app_templates/tdeapp/pref.h rename to languages/cpp/app_templates/kapp/pref.h diff --git a/languages/cpp/app_templates/tdeapp/src-Makefile.am b/languages/cpp/app_templates/kapp/src-Makefile.am similarity index 100% rename from languages/cpp/app_templates/tdeapp/src-Makefile.am rename to languages/cpp/app_templates/kapp/src-Makefile.am diff --git a/languages/cpp/app_templates/tdeapp/subdirs b/languages/cpp/app_templates/kapp/subdirs similarity index 100% rename from languages/cpp/app_templates/tdeapp/subdirs rename to languages/cpp/app_templates/kapp/subdirs diff --git a/languages/cpp/app_templates/kateplugin/CMakeLists.txt b/languages/cpp/app_templates/kateplugin/CMakeLists.txt index 2361b5e9..354218ad 100644 --- a/languages/cpp/app_templates/kateplugin/CMakeLists.txt +++ b/languages/cpp/app_templates/kateplugin/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( kateplugin.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kateplugin.tar.gz kateplugin.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - kateplugin.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + kateplugin.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kateplugin/Makefile.am b/languages/cpp/app_templates/kateplugin/Makefile.am index 75b44829..81c1a586 100644 --- a/languages/cpp/app_templates/kateplugin/Makefile.am +++ b/languages/cpp/app_templates/kateplugin/Makefile.am @@ -5,10 +5,10 @@ dataFiles = src-Makefile.am plugin_app.cpp plugin_app.h\ plugin.tdevelop subdirs plugin.desktop ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/kateplugin/kateplugin.kdevtemplate b/languages/cpp/app_templates/kateplugin/kateplugin.kdevtemplate new file mode 100644 index 00000000..3c308223 --- /dev/null +++ b/languages/cpp/app_templates/kateplugin/kateplugin.kdevtemplate @@ -0,0 +1,213 @@ +# TDE Config File +[General] +Name=Kate plugin +Name[br]=Lugent Kate +Name[ca]=Connector per a Kate +Name[de]=Kate-Modul +Name[el]=Πρόσθετο Kate +Name[es]=Complemento para Kate +Name[eu]=Kate plugina +Name[fa]=وصلۀ Kate +Name[fr]=Module externe pour Kate +Name[ga]=Breiseán Kate +Name[gl]=Extensión para Kate +Name[hu]=Kate-bővítőmodul +Name[it]=Plugin per Kate +Name[ja]=Kate プラグイン +Name[nds]=Kate-Moduul +Name[ne]=केट प्लगइन +Name[nl]=Kate-plugin +Name[pl]=Wtyczka do Kate +Name[pt]='Plugin' do Kate +Name[pt_BR]='Plugin' do Kate +Name[ru]=Модуль Kate +Name[sk]=Kate modul +Name[sl]=Vstavek za Kate +Name[sr]=Прикључак за Kate +Name[sr@Latn]=Priključak za Kate +Name[sv]=Kate-insticksprogram +Name[tr]=Kate eklentisi +Name[zh_CN]=Kate 插件 +Name[zh_TW]=Kate 外掛程式 +Icon=kateplugin.png +Category=C++/TDE +Comment=Generates a plugin for Kate the text editor. +Comment[ca]=Genera un connector per a l'editor de text Kate. +Comment[da]=Genererer et plugin for teksteditoren kate +Comment[de]=Erstellt ein Modul für den Texteditor Kate +Comment[el]=Δημιουργεί ένα πρόσθετο για το Kate τον επεξεργαστή κειμένου. +Comment[es]=Genera un complemento para el editor de texto Kate. +Comment[et]=Plugina loomine tekstiredaktorile Kate. +Comment[eu]=Plugin bat sortzen du Kate testu-editorearentzat. +Comment[fa]=وصله‌ای برای ویرایشگر متن Kate تولید می‌کند. +Comment[fr]=Génère un module externe pour l'éditeur de texte Kate. +Comment[ga]=Cruthaíonn sé seo breiseán le haghaidh eagarthóir téacs Kate. +Comment[gl]=Xera unha extensión para o editor de textos Kate. +Comment[hu]=Létrehoz egy bővítőmodult a Kate szövegszerkesztőhöz. +Comment[it]=Genera un plugin per l'editor di testo Kate. +Comment[ja]=Kate テキストエディタのためのプラグインを作成します +Comment[nds]=Stellt en Moduul för den Texteditor "Kate" op. +Comment[ne]=केट पाठ सम्पादकका लागि प्लगइन उत्पन्न गर्दछ । +Comment[nl]=Genereert een plugin voor de Kate-teksteditor +Comment[pl]=Generuje wtyczkę do edytora tekstu Kate +Comment[pt]=Gera um 'plugin' para o Kate, o editor de texto. +Comment[pt_BR]=Gera um 'plugin' para o Kate, o editor de texto. +Comment[ru]=Создание модуля для текстового редактора Kate. +Comment[sk]=Vygeneruje modul pre textový editor Kate. +Comment[sl]=Ustvari vstavek za urejevalnik besedil Kate. +Comment[sr]=Прави прикључак за уређивач текста Kate. +Comment[sr@Latn]=Pravi priključak za uređivač teksta Kate. +Comment[sv]=Skapar ett insticksprogram för texteditorn Kate. +Comment[tr]=Kate metin düzenleyicisi için bir eklenti yaratır. +Comment[zh_CN]=生成 Kate 文本编辑器的插件。 +Comment[zh_TW]=產生一個 Kate 文字編輯器的外掛程式 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/plugin_%{APPNAMELC}.cpp +Archive=kateplugin.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/plugin.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE10] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE11] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE12] +Type=install +Source=%{src}/plugin.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE13] +Type=install +Source=%{src}/plugin_app.cpp +Dest=%{dest}/src/plugin_%{APPNAMELC}.cpp + +[FILE14] +Type=install +Source=%{src}/plugin_app.h +Dest=%{dest}/src/plugin_%{APPNAMELC}.h + +[FILE15] +Type=install +EscapeXML=true +Source=%{src}/plugin_app.rc +Dest=%{dest}/src/plugin_%{APPNAMELC}.rc + +[FILE16] +Type=install +Source=%{src}/hi16-action-plugin.png +Dest=%{dest}/src/hi16-action-plugin.png +Process=false + +[FILE17] +Type=install +Source=%{src}/hi22-action-plugin.png +Dest=%{dest}/src/hi32-action-plugin.png +Process=false + +[MSG] +Type=message +Comment=A plugin for Kate was created at %{dest} +Comment[ca]=Un connector per a Kate ha estat creat a %{dest} +Comment[da]=Et plugin for Kate blev oprettet på %{dest} +Comment[de]=Ein Modul für Kate wurde in %{dest} erstellt. +Comment[el]=Ένα πρόσθετο για το Kate δημιουργήθηκε στο %{dest} +Comment[es]=Un complemento para Kate ha sido creado en %{dest} +Comment[et]=Kate plugin loodi asukohta %{dest} +Comment[eu]=Kate plugin bat sortu da hemen: %{dest} +Comment[fa]=وصله‌ای برای Kate در %{dest} ایجاد شد +Comment[fr]=Un module externe pour Kate a été créé dans %{dest} +Comment[ga]=Cruthaíodh breiseán Kate ag %{dest} +Comment[gl]=Creouse unha extensión para Kate en %{dest} +Comment[hu]=Létrejött egy Kate-bővítőmodul itt: %{dest} +Comment[it]=È stato creato un plugin per Kate in %{dest} +Comment[ja]=Kate のプラグインを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Moduul för "Kate" opstellt +Comment[ne]=केटका लागि प्लगइन %{dest} मा सिर्जना गरियो +Comment[nl]=Een plugin voor Kate is aangemaakt in %{dest} +Comment[pl]=Wtyczka dla Kate została utworzona w %{dest} +Comment[pt]=Foi criado um 'plugin' para o Kate em %{dest} +Comment[pt_BR]=Foi criado um 'plugin' para o Kate em %{dest} +Comment[ru]=Модуль Kate создан в %{dest} +Comment[sk]=Modul pre Kate bol vytvorený v %{dest} +Comment[sl]=Vstavek za Kate je bil ustvarjen v %{dest} +Comment[sr]=Прикључак за Kate направљен је у %{dest} +Comment[sr@Latn]=Priključak za Kate napravljen je u %{dest} +Comment[sv]=Ett insticksprogram för Kate skapades i %{dest} +Comment[tr]=Kate için bir eklenti %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个 Kate 的插件 +Comment[zh_TW]=一個 Kate 外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kateplugin/kateplugin.tdevtemplate b/languages/cpp/app_templates/kateplugin/kateplugin.tdevtemplate deleted file mode 100644 index a3dc2dc8..00000000 --- a/languages/cpp/app_templates/kateplugin/kateplugin.tdevtemplate +++ /dev/null @@ -1,213 +0,0 @@ -# TDE Config File -[General] -Name=Kate plugin -Name[br]=Lugent Kate -Name[ca]=Connector per a Kate -Name[de]=Kate-Modul -Name[el]=Πρόσθετο Kate -Name[es]=Complemento para Kate -Name[eu]=Kate plugina -Name[fa]=وصلۀ Kate -Name[fr]=Module externe pour Kate -Name[ga]=Breiseán Kate -Name[gl]=Extensión para Kate -Name[hu]=Kate-bővítőmodul -Name[it]=Plugin per Kate -Name[ja]=Kate プラグイン -Name[nds]=Kate-Moduul -Name[ne]=केट प्लगइन -Name[nl]=Kate-plugin -Name[pl]=Wtyczka do Kate -Name[pt]='Plugin' do Kate -Name[pt_BR]='Plugin' do Kate -Name[ru]=Модуль Kate -Name[sk]=Kate modul -Name[sl]=Vstavek za Kate -Name[sr]=Прикључак за Kate -Name[sr@Latn]=Priključak za Kate -Name[sv]=Kate-insticksprogram -Name[tr]=Kate eklentisi -Name[zh_CN]=Kate 插件 -Name[zh_TW]=Kate 外掛程式 -Icon=kateplugin.png -Category=C++/TDE -Comment=Generates a plugin for Kate the text editor. -Comment[ca]=Genera un connector per a l'editor de text Kate. -Comment[da]=Genererer et plugin for teksteditoren kate -Comment[de]=Erstellt ein Modul für den Texteditor Kate -Comment[el]=Δημιουργεί ένα πρόσθετο για το Kate τον επεξεργαστή κειμένου. -Comment[es]=Genera un complemento para el editor de texto Kate. -Comment[et]=Plugina loomine tekstiredaktorile Kate. -Comment[eu]=Plugin bat sortzen du Kate testu-editorearentzat. -Comment[fa]=وصله‌ای برای ویرایشگر متن Kate تولید می‌کند. -Comment[fr]=Génère un module externe pour l'éditeur de texte Kate. -Comment[ga]=Cruthaíonn sé seo breiseán le haghaidh eagarthóir téacs Kate. -Comment[gl]=Xera unha extensión para o editor de textos Kate. -Comment[hu]=Létrehoz egy bővítőmodult a Kate szövegszerkesztőhöz. -Comment[it]=Genera un plugin per l'editor di testo Kate. -Comment[ja]=Kate テキストエディタのためのプラグインを作成します -Comment[nds]=Stellt en Moduul för den Texteditor "Kate" op. -Comment[ne]=केट पाठ सम्पादकका लागि प्लगइन उत्पन्न गर्दछ । -Comment[nl]=Genereert een plugin voor de Kate-teksteditor -Comment[pl]=Generuje wtyczkę do edytora tekstu Kate -Comment[pt]=Gera um 'plugin' para o Kate, o editor de texto. -Comment[pt_BR]=Gera um 'plugin' para o Kate, o editor de texto. -Comment[ru]=Создание модуля для текстового редактора Kate. -Comment[sk]=Vygeneruje modul pre textový editor Kate. -Comment[sl]=Ustvari vstavek za urejevalnik besedil Kate. -Comment[sr]=Прави прикључак за уређивач текста Kate. -Comment[sr@Latn]=Pravi priključak za uređivač teksta Kate. -Comment[sv]=Skapar ett insticksprogram för texteditorn Kate. -Comment[tr]=Kate metin düzenleyicisi için bir eklenti yaratır. -Comment[zh_CN]=生成 Kate 文本编辑器的插件。 -Comment[zh_TW]=產生一個 Kate 文字編輯器的外掛程式 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/plugin_%{APPNAMELC}.cpp -Archive=kateplugin.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/plugin.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE10] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE11] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE12] -Type=install -Source=%{src}/plugin.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE13] -Type=install -Source=%{src}/plugin_app.cpp -Dest=%{dest}/src/plugin_%{APPNAMELC}.cpp - -[FILE14] -Type=install -Source=%{src}/plugin_app.h -Dest=%{dest}/src/plugin_%{APPNAMELC}.h - -[FILE15] -Type=install -EscapeXML=true -Source=%{src}/plugin_app.rc -Dest=%{dest}/src/plugin_%{APPNAMELC}.rc - -[FILE16] -Type=install -Source=%{src}/hi16-action-plugin.png -Dest=%{dest}/src/hi16-action-plugin.png -Process=false - -[FILE17] -Type=install -Source=%{src}/hi22-action-plugin.png -Dest=%{dest}/src/hi32-action-plugin.png -Process=false - -[MSG] -Type=message -Comment=A plugin for Kate was created at %{dest} -Comment[ca]=Un connector per a Kate ha estat creat a %{dest} -Comment[da]=Et plugin for Kate blev oprettet på %{dest} -Comment[de]=Ein Modul für Kate wurde in %{dest} erstellt. -Comment[el]=Ένα πρόσθετο για το Kate δημιουργήθηκε στο %{dest} -Comment[es]=Un complemento para Kate ha sido creado en %{dest} -Comment[et]=Kate plugin loodi asukohta %{dest} -Comment[eu]=Kate plugin bat sortu da hemen: %{dest} -Comment[fa]=وصله‌ای برای Kate در %{dest} ایجاد شد -Comment[fr]=Un module externe pour Kate a été créé dans %{dest} -Comment[ga]=Cruthaíodh breiseán Kate ag %{dest} -Comment[gl]=Creouse unha extensión para Kate en %{dest} -Comment[hu]=Létrejött egy Kate-bővítőmodul itt: %{dest} -Comment[it]=È stato creato un plugin per Kate in %{dest} -Comment[ja]=Kate のプラグインを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Moduul för "Kate" opstellt -Comment[ne]=केटका लागि प्लगइन %{dest} मा सिर्जना गरियो -Comment[nl]=Een plugin voor Kate is aangemaakt in %{dest} -Comment[pl]=Wtyczka dla Kate została utworzona w %{dest} -Comment[pt]=Foi criado um 'plugin' para o Kate em %{dest} -Comment[pt_BR]=Foi criado um 'plugin' para o Kate em %{dest} -Comment[ru]=Модуль Kate создан в %{dest} -Comment[sk]=Modul pre Kate bol vytvorený v %{dest} -Comment[sl]=Vstavek za Kate je bil ustvarjen v %{dest} -Comment[sr]=Прикључак за Kate направљен је у %{dest} -Comment[sr@Latn]=Priključak za Kate napravljen je u %{dest} -Comment[sv]=Ett insticksprogram för Kate skapades i %{dest} -Comment[tr]=Kate için bir eklenti %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个 Kate 的插件 -Comment[zh_TW]=一個 Kate 外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kateplugin/plugin.tdevelop b/languages/cpp/app_templates/kateplugin/plugin.tdevelop index c96d48cc..799ac6d5 100644 --- a/languages/cpp/app_templates/kateplugin/plugin.tdevelop +++ b/languages/cpp/app_templates/kateplugin/plugin.tdevelop @@ -13,15 +13,15 @@ TDE - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - - + + src/lib%{APPNAMELC}plugin.la debug @@ -43,8 +43,8 @@ -O0 -g3 - - + + @@ -52,8 +52,8 @@ - - + + ada ada_bugs_gcc @@ -90,24 +90,24 @@ qmake User Guide - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/kateplugin2/CMakeLists.txt b/languages/cpp/app_templates/kateplugin2/CMakeLists.txt index 1546b2b7..c4a47fba 100644 --- a/languages/cpp/app_templates/kateplugin2/CMakeLists.txt +++ b/languages/cpp/app_templates/kateplugin2/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( kateplugin2.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kateplugin2.tar.gz kateplugin2.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - kateplugin2.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + kateplugin2.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kateplugin2/Makefile.am b/languages/cpp/app_templates/kateplugin2/Makefile.am index 99969725..b12a6477 100644 --- a/languages/cpp/app_templates/kateplugin2/Makefile.am +++ b/languages/cpp/app_templates/kateplugin2/Makefile.am @@ -5,10 +5,10 @@ dataFiles = src-Makefile.am plugin_app.cpp plugin_app.h \ templateName = kateplugin2 ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/kateplugin2/kateplugin2.kdevtemplate b/languages/cpp/app_templates/kateplugin2/kateplugin2.kdevtemplate new file mode 100644 index 00000000..3da42f23 --- /dev/null +++ b/languages/cpp/app_templates/kateplugin2/kateplugin2.kdevtemplate @@ -0,0 +1,214 @@ +# TDE Config File +[General] +Name=Kate plugin with config page +Name[ca]=Connector per a Kate amb pàgina de configuració +Name[da]=Kate plugin med indstillingsside +Name[de]=Kate-Modul mit Einstellungsseite +Name[el]=Πρόσθετο Kate με σελίδα ρύθμισης +Name[es]=Complemento para Kate con página de configuración +Name[et]=Kate plugin seadistustedialoogiga +Name[eu]=Konfigurazio orridun Kate plugina +Name[fa]=وصلۀ Kate با صفحۀ پیکربندی +Name[fr]=Module externe pour Kate comprenant une page de configuration +Name[ga]=Breiseán Kate le leathanach cumraíochta +Name[gl]=Extensión para Kate con páxina de configuración +Name[hu]=Kate-bővítőmodul beállítólappal +Name[it]=Plugin per Kate con pagina di configurazione +Name[ja]=設定ページのある Kate プラグイン +Name[nds]=Kate-Moduul mit Instellensiet +Name[ne]=कन्फिग पृष्ठसँग केट प्लगइन +Name[nl]=Kate-plugin met config page +Name[pl]=Wtyczka do Kate ze stroną konfiguracyjną +Name[pt]='Plugin' do Kate com página de configuração +Name[pt_BR]='Plugin' do Kate com página de configuração +Name[ru]=Модуль Kate с диалогом настройки +Name[sk]=Kate modul s konfiguračnou stránkou +Name[sl]=Vstavek z nastavitveno stranjo za Kate +Name[sr]=Прикључак за Kate са страном за подешавања +Name[sr@Latn]=Priključak za Kate sa stranom za podešavanja +Name[sv]=Kate-insticksprogram med inställningssida +Name[tr]=Ayar sayfası olan bir Kate eklentisi +Name[zh_CN]=带配置页的 Kate 插件 +Name[zh_TW]=Kate 外掛程式,內含設定頁面 +Icon=kateplugin2.png +Category=C++/TDE +Comment=Generates a plugin with config page for Kate the text editor. +Comment[ca]=Genera un connector amb pàgina de configuració per a l'editor de text Kate. +Comment[da]=Generere et plugin med indstillingsside for teksteditoren Kate. +Comment[de]=Erstellt ein Modul mit Konfigurationsseite für den Texteditor Kate. +Comment[el]=Δημιουργεί ένα πρόσθετο με σελίδα ρύθμισης για το Kate τον επεξεργαστή κειμένου. +Comment[es]=Genera un complemento con página de configuración para el editor de texto Kate. +Comment[et]=Seadistustedialoogiga plugina loomine tekstiredaktorile Kate. +Comment[eu]=Konfigurazio orridun Kate plugin bat sortzen du. +Comment[fa]=وصله‌ای با صفحۀ پیکربندی ویرایشگر متن Kate تولید می‌کند. +Comment[fr]=Génère un module externe comprenant une page de configuration pour l'éditeur de texte Kate. +Comment[ga]=Cruthaíodh breiseán le leathanach cumraíochta le haghaidh eagarthóra téacs Kate. +Comment[gl]=Xera unha extensión con páxina de configuración para o editor de textos Kate. +Comment[hu]=Létrehoz egy bővítőmodult beállítólappal a Kate szövegszerkesztőhöz. +Comment[it]=Genera un plugin con pagina di configurazione per l'editor di testo Kate. +Comment[ja]=テキストエディタ Kate のための設定ページのあるプラグインを作成します。 +Comment[nds]=Stellt en Moduul mit Instellensiet för den Texteditor "Kate" op. +Comment[ne]=केट पाठ सम्पादकका लागि कन्फिग पृष्ठसँग प्लगइन उत्पन्न गर्दछ । +Comment[nl]=Genereert een plugin met een config page voor de Kate-teksteditor +Comment[pl]=Generuje wtyczke wraz ze stroną konfiguracyjną do edytora tekstu Kate. +Comment[pt]=Gera um 'plugin' com uma página de configuração para o Kate, o editor de texto. +Comment[pt_BR]=Gera um 'plugin' com uma página de configuração para o Kate, o editor de texto. +Comment[ru]=Создание модуля для текстового редактора Kate с диалогом настройки. +Comment[sk]=Vygeneruje modul s konfiguračnou stránkou pre textový editor Kate. +Comment[sl]=Ustvari vstavek z nastavitveno stranjo za urejevalnik besedil Kate. +Comment[sr]=Прави прикључак са страном за подешавање за уређивач текста Kate. +Comment[sr@Latn]=Pravi priključak sa stranom za podešavanje za uređivač teksta Kate. +Comment[sv]=Skapar ett insticksprogram för texteditorn Kate med en inställningssida. +Comment[tr]=Kate metin düzenleyicisi için ayar sayfası olan bir eklenti yaratır. +Comment[zh_CN]=生成带配置页的 Kate 文本编辑器插件。 +Comment[zh_TW]=產生一個 Kate 文字編輯器的外掛程式,內含設定頁面。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/plugin_%{APPNAMELC}.cpp +Archive=kateplugin2.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/plugin.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE10] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE11] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE12] +Type=install +Source=%{src}/plugin.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE13] +Type=install +Source=%{src}/plugin_app.cpp +Dest=%{dest}/src/plugin_%{APPNAMELC}.cpp + +[FILE14] +Type=install +Source=%{src}/plugin_app.h +Dest=%{dest}/src/plugin_%{APPNAMELC}.h + +[FILE15] +Type=install +EscapeXML=true +Source=%{src}/plugin_app.rc +Dest=%{dest}/src/plugin_%{APPNAMELC}.rc + +[FILE16] +Type=install +Source=%{src}/hi16-action-plugin.png +Dest=%{dest}/src/hi16-action-plugin.png +Process=false + +[FILE17] +Type=install +Source=%{src}/hi22-action-plugin.png +Dest=%{dest}/src/hi32-action-plugin.png +Process=false + +[MSG] +Type=message +Comment=A plugin for Kate with a config page was created in %{dest} +Comment[ca]=Un connector per a Kate amb pàgina de configuració ha estat creat en %{dest} +Comment[da]=Et plugin for Kate med en indstillingsside blev oprettet i %{dest} +Comment[de]=Ein Modul für Kate mit Konfigurationsseite wurde in %{dest} erstellt. +Comment[el]=Ένα πρόσθετο για το Kate με μια σελίδα ρύθμισης δημιουργήθηκε στο %{dest} +Comment[es]=Un complemento para Kate con una página de configuración ha sido creado en %{dest} +Comment[et]=Seadistustedialoogiga Kate plugin loodi asukohta %{dest} +Comment[eu]=Konfigurazio orridun Kate plugin bat sortu da hemen:%{dest} +Comment[fa]=وصله‌ای برای Kate با یک صفحۀ پیکربندی در %{dest} ایجاد شد +Comment[fr]=Un module externe pour Kate comprenant une page de configuration a été créé dans %{dest} +Comment[ga]=Cruthaíodh breiseán Kate le leathanach cumraíochta i %{dest} +Comment[gl]=Creouse unha extensión para Kate con páxina de configuración en %{dest} +Comment[hu]=Létrejött egy Kate-bővítőmodul (beállítólappal) itt: %{dest} +Comment[it]=È stato creato un plugin per Kate con pagina di configurazione in %{dest} +Comment[ja]=設定ページのある Kate プラグインを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Moduul för Kate mit Instellensiet opstellt +Comment[ne]=कन्फिग पृष्ठसँग केटका लागि प्लगइन %{dest} मा सिर्जना गरियो +Comment[nl]=Een plugin voor Kate met een config page is aangemaakt in %{dest} +Comment[pl]=Wtyczka do Kate wraz ze stroną konfiguracyjną została utworzona w %{dest} +Comment[pt]=Foi criado um 'plugin' para o Kate, com uma página de configuração, em %{dest} +Comment[pt_BR]=Foi criado um 'plugin' para o Kate, com uma página de configuração, em %{dest} +Comment[ru]=Модуль Kate с диалогом настройки создан в %{dest} +Comment[sk]=Modul pre Kate s konfiguračnou stránkou bol vytvorený v %{dest} +Comment[sl]=Vstavek z nastavitveno stranjo za Kate je bil ustvarjen v %{dest} +Comment[sr]=Прикључак за Kate са страном за подешавања направљен је у %{dest} +Comment[sr@Latn]=Priključak za Kate sa stranom za podešavanja napravljen je u %{dest} +Comment[sv]=Ett insticksprogram för Kate med en inställningssida skapades i %{dest} +Comment[tr]=Kate için ayar sayfası olan bir eklenti %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个带配置页的 Kate 插件 +Comment[zh_TW]=一個內含設定頁面的 Kate 外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kateplugin2/kateplugin2.tdevtemplate b/languages/cpp/app_templates/kateplugin2/kateplugin2.tdevtemplate deleted file mode 100644 index 236c6a9a..00000000 --- a/languages/cpp/app_templates/kateplugin2/kateplugin2.tdevtemplate +++ /dev/null @@ -1,214 +0,0 @@ -# TDE Config File -[General] -Name=Kate plugin with config page -Name[ca]=Connector per a Kate amb pàgina de configuració -Name[da]=Kate plugin med indstillingsside -Name[de]=Kate-Modul mit Einstellungsseite -Name[el]=Πρόσθετο Kate με σελίδα ρύθμισης -Name[es]=Complemento para Kate con página de configuración -Name[et]=Kate plugin seadistustedialoogiga -Name[eu]=Konfigurazio orridun Kate plugina -Name[fa]=وصلۀ Kate با صفحۀ پیکربندی -Name[fr]=Module externe pour Kate comprenant une page de configuration -Name[ga]=Breiseán Kate le leathanach cumraíochta -Name[gl]=Extensión para Kate con páxina de configuración -Name[hu]=Kate-bővítőmodul beállítólappal -Name[it]=Plugin per Kate con pagina di configurazione -Name[ja]=設定ページのある Kate プラグイン -Name[nds]=Kate-Moduul mit Instellensiet -Name[ne]=कन्फिग पृष्ठसँग केट प्लगइन -Name[nl]=Kate-plugin met config page -Name[pl]=Wtyczka do Kate ze stroną konfiguracyjną -Name[pt]='Plugin' do Kate com página de configuração -Name[pt_BR]='Plugin' do Kate com página de configuração -Name[ru]=Модуль Kate с диалогом настройки -Name[sk]=Kate modul s konfiguračnou stránkou -Name[sl]=Vstavek z nastavitveno stranjo za Kate -Name[sr]=Прикључак за Kate са страном за подешавања -Name[sr@Latn]=Priključak za Kate sa stranom za podešavanja -Name[sv]=Kate-insticksprogram med inställningssida -Name[tr]=Ayar sayfası olan bir Kate eklentisi -Name[zh_CN]=带配置页的 Kate 插件 -Name[zh_TW]=Kate 外掛程式,內含設定頁面 -Icon=kateplugin2.png -Category=C++/TDE -Comment=Generates a plugin with config page for Kate the text editor. -Comment[ca]=Genera un connector amb pàgina de configuració per a l'editor de text Kate. -Comment[da]=Generere et plugin med indstillingsside for teksteditoren Kate. -Comment[de]=Erstellt ein Modul mit Konfigurationsseite für den Texteditor Kate. -Comment[el]=Δημιουργεί ένα πρόσθετο με σελίδα ρύθμισης για το Kate τον επεξεργαστή κειμένου. -Comment[es]=Genera un complemento con página de configuración para el editor de texto Kate. -Comment[et]=Seadistustedialoogiga plugina loomine tekstiredaktorile Kate. -Comment[eu]=Konfigurazio orridun Kate plugin bat sortzen du. -Comment[fa]=وصله‌ای با صفحۀ پیکربندی ویرایشگر متن Kate تولید می‌کند. -Comment[fr]=Génère un module externe comprenant une page de configuration pour l'éditeur de texte Kate. -Comment[ga]=Cruthaíodh breiseán le leathanach cumraíochta le haghaidh eagarthóra téacs Kate. -Comment[gl]=Xera unha extensión con páxina de configuración para o editor de textos Kate. -Comment[hu]=Létrehoz egy bővítőmodult beállítólappal a Kate szövegszerkesztőhöz. -Comment[it]=Genera un plugin con pagina di configurazione per l'editor di testo Kate. -Comment[ja]=テキストエディタ Kate のための設定ページのあるプラグインを作成します。 -Comment[nds]=Stellt en Moduul mit Instellensiet för den Texteditor "Kate" op. -Comment[ne]=केट पाठ सम्पादकका लागि कन्फिग पृष्ठसँग प्लगइन उत्पन्न गर्दछ । -Comment[nl]=Genereert een plugin met een config page voor de Kate-teksteditor -Comment[pl]=Generuje wtyczke wraz ze stroną konfiguracyjną do edytora tekstu Kate. -Comment[pt]=Gera um 'plugin' com uma página de configuração para o Kate, o editor de texto. -Comment[pt_BR]=Gera um 'plugin' com uma página de configuração para o Kate, o editor de texto. -Comment[ru]=Создание модуля для текстового редактора Kate с диалогом настройки. -Comment[sk]=Vygeneruje modul s konfiguračnou stránkou pre textový editor Kate. -Comment[sl]=Ustvari vstavek z nastavitveno stranjo za urejevalnik besedil Kate. -Comment[sr]=Прави прикључак са страном за подешавање за уређивач текста Kate. -Comment[sr@Latn]=Pravi priključak sa stranom za podešavanje za uređivač teksta Kate. -Comment[sv]=Skapar ett insticksprogram för texteditorn Kate med en inställningssida. -Comment[tr]=Kate metin düzenleyicisi için ayar sayfası olan bir eklenti yaratır. -Comment[zh_CN]=生成带配置页的 Kate 文本编辑器插件。 -Comment[zh_TW]=產生一個 Kate 文字編輯器的外掛程式,內含設定頁面。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/plugin_%{APPNAMELC}.cpp -Archive=kateplugin2.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/plugin.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE10] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE11] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE12] -Type=install -Source=%{src}/plugin.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE13] -Type=install -Source=%{src}/plugin_app.cpp -Dest=%{dest}/src/plugin_%{APPNAMELC}.cpp - -[FILE14] -Type=install -Source=%{src}/plugin_app.h -Dest=%{dest}/src/plugin_%{APPNAMELC}.h - -[FILE15] -Type=install -EscapeXML=true -Source=%{src}/plugin_app.rc -Dest=%{dest}/src/plugin_%{APPNAMELC}.rc - -[FILE16] -Type=install -Source=%{src}/hi16-action-plugin.png -Dest=%{dest}/src/hi16-action-plugin.png -Process=false - -[FILE17] -Type=install -Source=%{src}/hi22-action-plugin.png -Dest=%{dest}/src/hi32-action-plugin.png -Process=false - -[MSG] -Type=message -Comment=A plugin for Kate with a config page was created in %{dest} -Comment[ca]=Un connector per a Kate amb pàgina de configuració ha estat creat en %{dest} -Comment[da]=Et plugin for Kate med en indstillingsside blev oprettet i %{dest} -Comment[de]=Ein Modul für Kate mit Konfigurationsseite wurde in %{dest} erstellt. -Comment[el]=Ένα πρόσθετο για το Kate με μια σελίδα ρύθμισης δημιουργήθηκε στο %{dest} -Comment[es]=Un complemento para Kate con una página de configuración ha sido creado en %{dest} -Comment[et]=Seadistustedialoogiga Kate plugin loodi asukohta %{dest} -Comment[eu]=Konfigurazio orridun Kate plugin bat sortu da hemen:%{dest} -Comment[fa]=وصله‌ای برای Kate با یک صفحۀ پیکربندی در %{dest} ایجاد شد -Comment[fr]=Un module externe pour Kate comprenant une page de configuration a été créé dans %{dest} -Comment[ga]=Cruthaíodh breiseán Kate le leathanach cumraíochta i %{dest} -Comment[gl]=Creouse unha extensión para Kate con páxina de configuración en %{dest} -Comment[hu]=Létrejött egy Kate-bővítőmodul (beállítólappal) itt: %{dest} -Comment[it]=È stato creato un plugin per Kate con pagina di configurazione in %{dest} -Comment[ja]=設定ページのある Kate プラグインを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Moduul för Kate mit Instellensiet opstellt -Comment[ne]=कन्फिग पृष्ठसँग केटका लागि प्लगइन %{dest} मा सिर्जना गरियो -Comment[nl]=Een plugin voor Kate met een config page is aangemaakt in %{dest} -Comment[pl]=Wtyczka do Kate wraz ze stroną konfiguracyjną została utworzona w %{dest} -Comment[pt]=Foi criado um 'plugin' para o Kate, com uma página de configuração, em %{dest} -Comment[pt_BR]=Foi criado um 'plugin' para o Kate, com uma página de configuração, em %{dest} -Comment[ru]=Модуль Kate с диалогом настройки создан в %{dest} -Comment[sk]=Modul pre Kate s konfiguračnou stránkou bol vytvorený v %{dest} -Comment[sl]=Vstavek z nastavitveno stranjo za Kate je bil ustvarjen v %{dest} -Comment[sr]=Прикључак за Kate са страном за подешавања направљен је у %{dest} -Comment[sr@Latn]=Priključak za Kate sa stranom za podešavanja napravljen je u %{dest} -Comment[sv]=Ett insticksprogram för Kate med en inställningssida skapades i %{dest} -Comment[tr]=Kate için ayar sayfası olan bir eklenti %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个带配置页的 Kate 插件 -Comment[zh_TW]=一個內含設定頁面的 Kate 外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kateplugin2/plugin.tdevelop b/languages/cpp/app_templates/kateplugin2/plugin.tdevelop index 01c48bfc..831365dc 100644 --- a/languages/cpp/app_templates/kateplugin2/plugin.tdevelop +++ b/languages/cpp/app_templates/kateplugin2/plugin.tdevelop @@ -13,15 +13,15 @@ TDE - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - - + + src/lib%{APPNAMELC}plugin.la @@ -44,8 +44,8 @@ -O0 -g3 - - + + @@ -53,8 +53,8 @@ - - + + ada ada_bugs_gcc @@ -91,24 +91,24 @@ qmake User Guide - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/kde4app/CMakeLists.txt b/languages/cpp/app_templates/kde4app/CMakeLists.txt new file mode 100644 index 00000000..0399f045 --- /dev/null +++ b/languages/cpp/app_templates/kde4app/CMakeLists.txt @@ -0,0 +1,29 @@ +################################################# +# +# (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( kde4app.tar.gz ALL + COMMAND tar zcf kde4app.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} + kapp4.cpp kapp4.h prefs_base.ui kapp4view.cpp + kapp4view.h kapp4view_base.ui main.cpp kde4appui.rc + kde4app-CMakeLists.txt kapp4.desktop kapp4.kcfg + settings.kcfgc kde4app.png README kde4app.tdevelop + kde4app.tdevelop.filelist +) + + +install( FILES + ${CMAKE_CURRENT_BINARY_DIR}/kde4app.tar.gz kde4app.png + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) + + +install( FILES + kde4app.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kde4app/Makefile.am b/languages/cpp/app_templates/kde4app/Makefile.am new file mode 100644 index 00000000..455acd8d --- /dev/null +++ b/languages/cpp/app_templates/kde4app/Makefile.am @@ -0,0 +1,19 @@ +dataFiles = kapp4.cpp kapp4.h prefs_base.ui kapp4view.cpp kapp4view.h kapp4view_base.ui \ + main.cpp kde4appui.rc CMakeLists.txt kapp4.desktop kapp4.kcfg settings.kcfgc \ + kde4app.png README kde4app.tdevelop kde4app.tdevelop.filelist + +templateName = kde4app + +### 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 diff --git a/languages/cpp/app_templates/tde4app/README b/languages/cpp/app_templates/kde4app/README similarity index 100% rename from languages/cpp/app_templates/tde4app/README rename to languages/cpp/app_templates/kde4app/README diff --git a/languages/cpp/app_templates/tde4app/tdeapp4.cpp b/languages/cpp/app_templates/kde4app/kapp4.cpp similarity index 100% rename from languages/cpp/app_templates/tde4app/tdeapp4.cpp rename to languages/cpp/app_templates/kde4app/kapp4.cpp diff --git a/languages/cpp/app_templates/kde4app/kapp4.desktop b/languages/cpp/app_templates/kde4app/kapp4.desktop new file mode 100644 index 00000000..18cdcbe5 --- /dev/null +++ b/languages/cpp/app_templates/kde4app/kapp4.desktop @@ -0,0 +1,30 @@ +[Desktop Entry] +Name=KApp4 +Name[nds]=KProg4 +Name[sv]=KDE 4-program +Name[zh_TW]=KApp4 程式 +Exec=kapp4 %i -caption "%c" +Icon=kapp4 +Type=Application +DocPath=kapp4/kapp4.html +GenericName=A KDE4 Application +GenericName[ca]=Una aplicació del KDE4 +GenericName[da]=Et KDE4-program +GenericName[de]=Eine KDE 4-Anwendung +GenericName[el]=Μία εφαρμογή του KDE4 +GenericName[es]=Una aplicación para KDE4 +GenericName[et]=KDE4 rakendus +GenericName[hu]=KDE4-alapú alkalmazás +GenericName[it]=Applicazione KDE4 +GenericName[nds]=En KDE4-Programm +GenericName[nl]=Een KDE4-programma +GenericName[pl]=Program dla KDE4 +GenericName[pt]=Uma Aplicação do KDE4 +GenericName[pt_BR]=Uma Aplicação do KDE4 +GenericName[ru]=Приложение KDE 4 +GenericName[sk]=KDE4 aplikácia +GenericName[sr]=KDE4 програм +GenericName[sr@Latn]=KDE4 program +GenericName[sv]=Ett KDE 4-program +GenericName[zh_TW]=KDE4 應用程式 +Terminal=false diff --git a/languages/cpp/app_templates/tde4app/tdeapp4.h b/languages/cpp/app_templates/kde4app/kapp4.h similarity index 100% rename from languages/cpp/app_templates/tde4app/tdeapp4.h rename to languages/cpp/app_templates/kde4app/kapp4.h diff --git a/languages/cpp/app_templates/tde4app/tdeapp4.kcfg b/languages/cpp/app_templates/kde4app/kapp4.kcfg similarity index 100% rename from languages/cpp/app_templates/tde4app/tdeapp4.kcfg rename to languages/cpp/app_templates/kde4app/kapp4.kcfg diff --git a/languages/cpp/app_templates/tde4app/tdeapp4view.cpp b/languages/cpp/app_templates/kde4app/kapp4view.cpp similarity index 100% rename from languages/cpp/app_templates/tde4app/tdeapp4view.cpp rename to languages/cpp/app_templates/kde4app/kapp4view.cpp diff --git a/languages/cpp/app_templates/tde4app/tdeapp4view.h b/languages/cpp/app_templates/kde4app/kapp4view.h similarity index 100% rename from languages/cpp/app_templates/tde4app/tdeapp4view.h rename to languages/cpp/app_templates/kde4app/kapp4view.h diff --git a/languages/cpp/app_templates/tde4app/tdeapp4view_base.ui b/languages/cpp/app_templates/kde4app/kapp4view_base.ui similarity index 100% rename from languages/cpp/app_templates/tde4app/tdeapp4view_base.ui rename to languages/cpp/app_templates/kde4app/kapp4view_base.ui diff --git a/languages/cpp/app_templates/tde4app/tde4app-CMakeLists.txt b/languages/cpp/app_templates/kde4app/kde4app-CMakeLists.txt similarity index 100% rename from languages/cpp/app_templates/tde4app/tde4app-CMakeLists.txt rename to languages/cpp/app_templates/kde4app/kde4app-CMakeLists.txt diff --git a/languages/cpp/app_templates/tde4app/tde4app.tdevtemplate b/languages/cpp/app_templates/kde4app/kde4app.kdevtemplate similarity index 100% rename from languages/cpp/app_templates/tde4app/tde4app.tdevtemplate rename to languages/cpp/app_templates/kde4app/kde4app.kdevtemplate diff --git a/languages/cpp/app_templates/tdeapp/tdeapp.png b/languages/cpp/app_templates/kde4app/kde4app.png similarity index 100% rename from languages/cpp/app_templates/tdeapp/tdeapp.png rename to languages/cpp/app_templates/kde4app/kde4app.png diff --git a/languages/cpp/app_templates/kde4app/kde4app.tdevelop b/languages/cpp/app_templates/kde4app/kde4app.tdevelop new file mode 100644 index 00000000..d332fa06 --- /dev/null +++ b/languages/cpp/app_templates/kde4app/kde4app.tdevelop @@ -0,0 +1,205 @@ + + + + %{AUTHOR} + %{EMAIL} + %{VERSION} + KDevCustomProject + C++ + + C++ + Code + Qt + KDE + + %{APPNAMELC} + . + false + + + + + + + + + + + + + false + *.o,*.lo,CVS + + + + + 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 + + + true + false + false + true + + + false + true + + + + + + + + + + + + -f + + -dP + + -f + -u3 -p + + + + + + + false + + + .h + .cpp + true + + + + + %{dest}/build/%{APPNAMELC} + + false + false + + + + + + + + + false + false + + true + %{dest} + executable + + + make + %{dest}/build + + + false + 1 + 0 + false + make + + + default + + + + + + + + + + + + + *.h + *.cpp + CMakeLists.txt + *.desktop + *.kcfg* + *.ui + Doxyfile + *.dox + *.rc + *.cmake + + + 0 + + + + default + + + + + + build + + + + + true + 4 + 4 + ExternalDesigner + /usr/bin/designer-qt4 + /usr/lib/qt4 + + + + true + 2 + + + + Doxygen Documentation Collection + %{APPNAMELC}.tag + + + diff --git a/languages/cpp/app_templates/kde4app/kde4app.tdevelop.filelist b/languages/cpp/app_templates/kde4app/kde4app.tdevelop.filelist new file mode 100644 index 00000000..5235563f --- /dev/null +++ b/languages/cpp/app_templates/kde4app/kde4app.tdevelop.filelist @@ -0,0 +1,13 @@ +# KDevelop Custom Project File List +CMakeLists.txt +main.cpp +prefs_base.ui +settings.kcfgc +%{APPNAMELC}.cpp +%{APPNAMELC}.desktop +%{APPNAMELC}.h +%{APPNAMELC}.kcfg +%{APPNAMELC}ui.rc +%{APPNAMELC}view.cpp +%{APPNAMELC}view.h +%{APPNAMELC}view_base.ui diff --git a/languages/cpp/app_templates/tde4app/tde4appui.rc b/languages/cpp/app_templates/kde4app/kde4appui.rc similarity index 100% rename from languages/cpp/app_templates/tde4app/tde4appui.rc rename to languages/cpp/app_templates/kde4app/kde4appui.rc diff --git a/languages/cpp/app_templates/tde4app/main.cpp b/languages/cpp/app_templates/kde4app/main.cpp similarity index 100% rename from languages/cpp/app_templates/tde4app/main.cpp rename to languages/cpp/app_templates/kde4app/main.cpp diff --git a/languages/cpp/app_templates/tde4app/prefs_base.ui b/languages/cpp/app_templates/kde4app/prefs_base.ui similarity index 100% rename from languages/cpp/app_templates/tde4app/prefs_base.ui rename to languages/cpp/app_templates/kde4app/prefs_base.ui diff --git a/languages/cpp/app_templates/tde4app/settings.kcfgc b/languages/cpp/app_templates/kde4app/settings.kcfgc similarity index 100% rename from languages/cpp/app_templates/tde4app/settings.kcfgc rename to languages/cpp/app_templates/kde4app/settings.kcfgc diff --git a/languages/cpp/app_templates/kdecpp.appwizard b/languages/cpp/app_templates/kdecpp.appwizard new file mode 100644 index 00000000..14bcbeaa --- /dev/null +++ b/languages/cpp/app_templates/kdecpp.appwizard @@ -0,0 +1,2 @@ +[General] +List=kdedcop,tdeioslave,kxt,kdevlang,kmake,kapp,tdeconfig35,kdevlang,kdevpart,kateplugin,kdevpart2,kopart,noatunui,kateplugin2,tdefileplugin,konqnavpanel,noatunvisual,dcopservice,khello,kpartapp,khello2,kpartplugin,tdecmodule,kicker,tdescreensaver,kscons_kxt,kscons_tdemdi diff --git a/languages/cpp/app_templates/kdedcop/CMakeLists.txt b/languages/cpp/app_templates/kdedcop/CMakeLists.txt new file mode 100644 index 00000000..0b7e9a3f --- /dev/null +++ b/languages/cpp/app_templates/kdedcop/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( kdedcop.tar.gz ALL + COMMAND tar zcf kdedcop.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} + app.cpp app.h app_iface.h app.tdevelop main.cpp + mainclass.cpp mainclass.h kdedcop.png src-Makefile.am + subdirs +) + + +install( FILES + ${CMAKE_CURRENT_BINARY_DIR}/kdedcop.tar.gz kdedcop.png + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) + + +install( FILES + kdedcop.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kdedcop/Makefile.am b/languages/cpp/app_templates/kdedcop/Makefile.am new file mode 100644 index 00000000..21c39778 --- /dev/null +++ b/languages/cpp/app_templates/kdedcop/Makefile.am @@ -0,0 +1,18 @@ +dataFiles = app.cpp app.h app_iface.h app.tdevelop main.cpp mainclass.cpp \ + mainclass.h kdedcop.png src-Makefile.am subdirs + +templateName = kdedcop + +### 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/tdedcop/app.cpp b/languages/cpp/app_templates/kdedcop/app.cpp similarity index 100% rename from languages/cpp/app_templates/tdedcop/app.cpp rename to languages/cpp/app_templates/kdedcop/app.cpp diff --git a/languages/cpp/app_templates/tdedcop/app.h b/languages/cpp/app_templates/kdedcop/app.h similarity index 100% rename from languages/cpp/app_templates/tdedcop/app.h rename to languages/cpp/app_templates/kdedcop/app.h diff --git a/languages/cpp/app_templates/kdedcop/app.tdevelop b/languages/cpp/app_templates/kdedcop/app.tdevelop new file mode 100644 index 00000000..991381c5 --- /dev/null +++ b/languages/cpp/app_templates/kdedcop/app.tdevelop @@ -0,0 +1,116 @@ + + + + %{AUTHOR} + %{EMAIL} + %{VERSION} + KDevTDEAutoProject + C++ + + C++ + Code + Qt + TDE + DCOP + + + + + 3 + true + 3 + EmbeddedKDevDesigner + + + + + + src/%{APPNAMELC} + debug + + + 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/tdedcop/app_iface.h b/languages/cpp/app_templates/kdedcop/app_iface.h similarity index 100% rename from languages/cpp/app_templates/tdedcop/app_iface.h rename to languages/cpp/app_templates/kdedcop/app_iface.h diff --git a/languages/cpp/app_templates/kdedcop/kdedcop.kdevtemplate b/languages/cpp/app_templates/kdedcop/kdedcop.kdevtemplate new file mode 100644 index 00000000..ff6a91c1 --- /dev/null +++ b/languages/cpp/app_templates/kdedcop/kdedcop.kdevtemplate @@ -0,0 +1,227 @@ +# TDE Config File +[General] +Name=Simple DCOP server +Name[ca]=Simple servidor DCOP +Name[da]=Simpel DCOP-server +Name[de]=Einfacher DCOP-Server +Name[el]=Απλός εξυπηρετητής DCOP +Name[es]=Sencillo servidor DCOP +Name[et]=Lihtne DCOP-server +Name[eu]=DCOP zerbitzari sinple bat +Name[fa]=کارساز سادۀ DCOP +Name[fr]=Serveur DCOP simple +Name[ga]=Freastalaí simplí DCOP +Name[gl]=Servidor sinxelo DCOP +Name[hu]=Egyszerű DCOP-kiszolgáló +Name[it]=Semplice server DCOP +Name[ja]=簡単な DCOP サーバ +Name[nds]=Eenfach DCOP-Server +Name[ne]=साधारण DCOP सर्भर +Name[nl]=Eenvoudige DCOP-server +Name[pl]=Prosty serwer DCOP +Name[pt]=Servidor de DCOP simples +Name[pt_BR]=Servidor de DCOP simples +Name[ru]=Сервер DCOP +Name[sk]=Jednoduchý DCOP server +Name[sl]=Preprost strežnik DCOP +Name[sr]=Једноставан DCOP сервер +Name[sr@Latn]=Jednostavan DCOP server +Name[sv]=Enkel DCOP-server +Name[tr]=Basit DCOP Sunucusu +Name[zh_CN]=简单的 DCOP 服务器 +Name[zh_TW]=簡單的 DCOP 伺服器 +Icon=kdedcop.png +Category=C++/TDE +Comment=Generates a basic TDE DCOP server. This is an ideal starting point for a DCOP server that does not require a GUI interface. +Comment[ca]=Genera un servidor bàsic DCOP per al TDE. Aquest és un idoni punt de partida per a un servidor DCOP que no requereixi d'una IGU. +Comment[da]=Genererer en basal TDE DCOP-server. Dette er et ideelt startpunkt for en DCOP-server der ikke kræver en GUI-grænseflade. +Comment[de]=Erstellt einen einfachen TDE-DCOP-Server. Dies ist ein idealer Ausgangspunkt für einen DCOP-Server, der keine Benutzeroberfläche erfordert. +Comment[el]=Δημιουργεί ένα βασικό εξυπηρετητή TDE DCOP. Αυτό είναι ένα ιδανικό σημείο αρχής για έναν εξυπηρετητή DCOP ο οποίος δε χρειάζεται ένα γραφικό περιβάλλον. +Comment[es]=Genera un servidor básico DCOP para TDE. Es un punto de comienzo ideal para un servidor DCOP que no requiera una interfaz gráfica. +Comment[et]=Lihtsa TDE DCOP-serveri loomine. See on ideaalne algus DCOP-serverile, mis ei eelda graafilist kasutajaliidest. +Comment[eu]=DCOP zerbitzari sinple bat sortzen du. Hau GUI interfazerik behar ez duen DCOP zerbitzari baterako hasierako puntu aparta da. +Comment[fa]=یک کارساز پایۀ TDE DCOP تولید می‌کند. این یک نقطۀ شروع دلخواه برای یک کارساز DCOP است، که نیازی به یک واسط ونک ندارد. +Comment[fr]=Génère un serveur DCOP TDE de base. C'est un bon point de départ pour un serveur DCOP qui ne requiert pas d'interface graphique. +Comment[gl]=Xera un servidor básico DCOP para TDE. Este é un punto de comezo ideal para un servidor DCOP que non require unha interface GUI. +Comment[hu]=Létrehoz egy egyszerű TDE DCOP-os kiszolgálót. Jó kiindulópont grafikus felület nélküli DCOP-kiszolgáló készítéséhez. +Comment[it]=Genera un semplice server DCOP per TDE. È un punto di partenza ideale per un server DCOP che non richiede un'interfaccia GUI. +Comment[ja]=基本的な TDE DCOP サーバを作成します。GUI を必要としない DCOP サーバの理想的な開始点です。 +Comment[nds]=Stellt en eenfach DCOP-Server op. Dat is en goot Anfang för en DCOP-Server ahn Böversiet. +Comment[ne]=आधारभूत TDE DCOP सर्भर उत्पन्न गर्दछ । यो DCOP सर्भरका लागि उपयुक्त सुरुआत बिन्दु हो जसलाई जी यू आई इन्टरफेस आवश्यक पर्दैन । +Comment[nl]=Genereert een basis TDE DCOP-server. Dit is een ideaal startpunt voor een DCOP-server die geen GUI-interface vereist. +Comment[pl]=Generuje prosty serwer TDE DCOP. Dobry punkt startu dla serwera DCOP, który nie potrzebuje interfejsu graficznego. +Comment[pt]=Gera um servidor básico de DCOP para o TDE. Este é um ponto de partida ideal para um servidor de DCOP que não necessite de uma interface gráfica. +Comment[pt_BR]=Gera um servidor básico de DCOP para o TDE. Este é um ponto de partida ideal para um servidor de DCOP que não necessite de uma interface gráfica. +Comment[ru]=Создание простого сервера DCOP. Идеальная стартовая точка для разработки сервера DCOP без графического интерфейса. +Comment[sk]=Vygeneruje základný TDE DCOP server. Toto je ideálny štartovací bod pre DCOP server, ktorý nepotrebuje GUI rozhranie. +Comment[sl]=Ustvari osnovni strežnik DCOP za TDE. To je idealno začetno mesto za strežnik DCOP, ki ne potrebuje grafičnega vmesnika. +Comment[sr]=Прави основан TDE DCOP сервер. Ово је идеална почетна тачка за DCOP сервер који не захтева GUI. +Comment[sr@Latn]=Pravi osnovan TDE DCOP server. Ovo je idealna početna tačka za DCOP server koji ne zahteva GUI. +Comment[sv]=Skapar en grundläggande TDE DCOP-server. Detta är en idealisk utgångspunkt för en DCOP-server som inte kräver ett grafiskt användargränssnitt. +Comment[tr]=Basit bir TDE DCOP sunucusu yaratır. Bu grafik arayüz gerektirmeyen bir DCOP sunucusuna başlamak için uygun bir noktadır. +Comment[zh_CN]=生成简单的 TDE DCOP 服务器。这是不需要图形界面的 DCOP 服务器的良好开端。 +Comment[zh_TW]=產生一個基本的 TDE DCOP 伺服器。這個是開發一個不需使用者介面的 DCOP 伺服器的一個好起點。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/main.cpp +Archive=kdedcop.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/tde-app.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[FILE10] +Type=install +Source=%{tdevelop}/template-common/hi16-app-app.png +Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png +Process=false + +[FILE11] +Type=install +Source=%{tdevelop}/template-common/hi32-app-app.png +Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png +Process=false + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE12] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE13] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE14] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE15] +Type=install +Source=%{src}/app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE16] +Type=install +Source=%{src}/app.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE17] +Type=install +Source=%{src}/mainclass.cpp +Dest=%{dest}/src/mainclass.cpp + +[FILE18] +Type=install +Source=%{src}/mainclass.h +Dest=%{dest}/src/mainclass.h + +[FILE19] +Type=install +Source=%{src}/app_iface.h +Dest=%{dest}/src/%{APPNAMELC}_iface.h + +[FILE20] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/main.cpp + +[MSG] +Type=message +Comment=A simple DCOP server was created in %{dest} +Comment[ca]=Un simple servidor DCOP ha estat creat en %{dest} +Comment[da]=En simpel DCOP-server blev oprettet i %{dest} +Comment[de]=Ein einfacher DCOP-Server wurde in %{dest} erstellt. +Comment[el]=Ένας απλός εξυπηρετητής DCOP δημιουργήθηκε στο %{dest} +Comment[es]=Un sencillo servidor DCOP ha sido creado en %{dest} +Comment[et]=Lihtne DCOP-server loodi asukohta %{dest} +Comment[eu]=DCOP zerbitzari sinple bat sortu da hemen: %{dest} +Comment[fa]=یک کارساز سادۀ DCOP در %{dest} ایجاد شد +Comment[fr]=Un serveur DCOP simple a été créé dans %{dest} +Comment[ga]=Cruthaíodh freastalaí simplí DCOP i %{dest} +Comment[gl]=Creouse un servidor DCOP sinxelo en %{dest} +Comment[hu]=Létrejött egy egyszerű DCOP-kiszolgáló itt: %{dest} +Comment[it]=È stato creato un semplice server DCOP in %{dest} +Comment[ja]=簡単な DCOP サーバを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en eenfach DCOP-Server opstellt +Comment[ne]=साधारण DCOP सर्भर %{dest} मा सिर्जना गरियो +Comment[nl]=Een eenvoudige DCOP-server is aangemaakt in %{dest} +Comment[pl]=Prosty serwer DCOP został utworzony w %{dest} +Comment[pt]=Foi criado um servidor de DCOP simples em %{dest} +Comment[pt_BR]=Foi criado um servidor de DCOP simples em %{dest} +Comment[ru]=Простой сервер DCOP создан в %{dest} +Comment[sk]=Jednoduchý DCOP server bol vytvorený v %{dest} +Comment[sl]=Preprost strežnik DCOP je bil ustvarjen v %{dest} +Comment[sr]=Једноставан DCOP сервер направљен је у %{dest} +Comment[sr@Latn]=Jednostavan DCOP server napravljen je u %{dest} +Comment[sv]=En enkel DCOP-server skapades i %{dest} +Comment[tr]=Basit bir DCOP sunucusu %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了简单的 DCOP 服务器 +Comment[zh_TW]=一個簡單的 DCOP 伺服器已建立於 %{dest} diff --git a/languages/cpp/app_templates/tdedcop/tdedcop.png b/languages/cpp/app_templates/kdedcop/kdedcop.png similarity index 100% rename from languages/cpp/app_templates/tdedcop/tdedcop.png rename to languages/cpp/app_templates/kdedcop/kdedcop.png diff --git a/languages/cpp/app_templates/tdedcop/main.cpp b/languages/cpp/app_templates/kdedcop/main.cpp similarity index 100% rename from languages/cpp/app_templates/tdedcop/main.cpp rename to languages/cpp/app_templates/kdedcop/main.cpp diff --git a/languages/cpp/app_templates/tdedcop/mainclass.cpp b/languages/cpp/app_templates/kdedcop/mainclass.cpp similarity index 100% rename from languages/cpp/app_templates/tdedcop/mainclass.cpp rename to languages/cpp/app_templates/kdedcop/mainclass.cpp diff --git a/languages/cpp/app_templates/tdedcop/mainclass.h b/languages/cpp/app_templates/kdedcop/mainclass.h similarity index 100% rename from languages/cpp/app_templates/tdedcop/mainclass.h rename to languages/cpp/app_templates/kdedcop/mainclass.h diff --git a/languages/cpp/app_templates/tdedcop/src-Makefile.am b/languages/cpp/app_templates/kdedcop/src-Makefile.am similarity index 100% rename from languages/cpp/app_templates/tdedcop/src-Makefile.am rename to languages/cpp/app_templates/kdedcop/src-Makefile.am diff --git a/languages/cpp/app_templates/tdedcop/subdirs b/languages/cpp/app_templates/kdedcop/subdirs similarity index 100% rename from languages/cpp/app_templates/tdedcop/subdirs rename to languages/cpp/app_templates/kdedcop/subdirs 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/tdevlang/README.dox b/languages/cpp/app_templates/kdevlang/README.dox similarity index 100% rename from languages/cpp/app_templates/tdevlang/README.dox rename to languages/cpp/app_templates/kdevlang/README.dox 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/tdevlang/tdevlang.png b/languages/cpp/app_templates/kdevlang/kdevlang.png similarity index 100% rename from languages/cpp/app_templates/tdevlang/tdevlang.png rename to languages/cpp/app_templates/kdevlang/kdevlang.png diff --git a/languages/cpp/app_templates/tdevlang/tdevlang.rc b/languages/cpp/app_templates/kdevlang/kdevlang.rc similarity index 100% rename from languages/cpp/app_templates/tdevlang/tdevlang.rc rename to languages/cpp/app_templates/kdevlang/kdevlang.rc 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 diff --git a/languages/cpp/app_templates/kdevpart/CMakeLists.txt b/languages/cpp/app_templates/kdevpart/CMakeLists.txt new file mode 100644 index 00000000..53293ea9 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart/CMakeLists.txt @@ -0,0 +1,29 @@ +################################################# +# +# (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( kdevpart.tar.gz ALL + COMMAND tar zcf kdevpart.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} + src-Makefile.am kdevpart_part.cpp kdevpart_part.h + kdevpart_widget.h kdevpart_widget.cpp kdevpart_part.rc + kdevpart.desktop app.tdevelop README.dox + globalconfigbase.ui globalconfig.h globalconfig.cpp + projectconfigbase.ui projectconfig.h projectconfig.cpp +) + + +install( FILES + ${CMAKE_CURRENT_BINARY_DIR}/kdevpart.tar.gz kdevpart.png + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) + + +install( FILES + kdevpart.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kdevpart/Makefile.am b/languages/cpp/app_templates/kdevpart/Makefile.am new file mode 100644 index 00000000..11c12dfe --- /dev/null +++ b/languages/cpp/app_templates/kdevpart/Makefile.am @@ -0,0 +1,19 @@ +dataFiles = src-Makefile.am kdevpart_part.cpp kdevpart_part.h \ + kdevpart_widget.h kdevpart_widget.cpp kdevpart_part.rc \ + kdevpart.desktop app.tdevelop README.dox globalconfigbase.ui globalconfig.h \ + globalconfig.cpp projectconfigbase.ui projectconfig.h projectconfig.cpp +templateName = kdevpart + +### 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/tdevpart/README.dox b/languages/cpp/app_templates/kdevpart/README.dox similarity index 100% rename from languages/cpp/app_templates/tdevpart/README.dox rename to languages/cpp/app_templates/kdevpart/README.dox diff --git a/languages/cpp/app_templates/kdevpart/app.tdevelop b/languages/cpp/app_templates/kdevpart/app.tdevelop new file mode 100644 index 00000000..d16492cd --- /dev/null +++ b/languages/cpp/app_templates/kdevpart/app.tdevelop @@ -0,0 +1,116 @@ + + + + %{AUTHOR} + %{EMAIL} + %{VERSION} + KDevTDEAutoProject + C++ + + C++ + Code + Qt + TDE + KDevelop + + + + + 3 + true + 3 + EmbeddedKDevDesigner + + + + + + src/%{APPNAMELC} + debug + + + 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/tdevpart/globalconfig.cpp b/languages/cpp/app_templates/kdevpart/globalconfig.cpp similarity index 100% rename from languages/cpp/app_templates/tdevpart/globalconfig.cpp rename to languages/cpp/app_templates/kdevpart/globalconfig.cpp diff --git a/languages/cpp/app_templates/tdevpart/globalconfig.h b/languages/cpp/app_templates/kdevpart/globalconfig.h similarity index 100% rename from languages/cpp/app_templates/tdevpart/globalconfig.h rename to languages/cpp/app_templates/kdevpart/globalconfig.h diff --git a/languages/cpp/app_templates/tdevpart/globalconfigbase.ui b/languages/cpp/app_templates/kdevpart/globalconfigbase.ui similarity index 100% rename from languages/cpp/app_templates/tdevpart/globalconfigbase.ui rename to languages/cpp/app_templates/kdevpart/globalconfigbase.ui diff --git a/languages/cpp/app_templates/kdevpart/kdevpart.desktop b/languages/cpp/app_templates/kdevpart/kdevpart.desktop new file mode 100644 index 00000000..a3029ac6 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart/kdevpart.desktop @@ -0,0 +1,83 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Name=KDev%{APPNAME} +Name[nds]=KDev%{ProgNaam} +Name[sv]=TDevelop %{APPNAME} +Name[ta]=கெடெவ்%{APPNAME} +GenericName=%{APPNAME} Plugin +GenericName[br]=Lugent %{APPNAME} +GenericName[ca]=Connector per a %{APPNAME} +GenericName[da]=%{APPNAME} plugin +GenericName[de]=%{APPNAME}-Modul +GenericName[el]=Πρόσθετο %{APPNAME} +GenericName[es]=Complemento %{APPNAME} +GenericName[et]=%{APPNAME} plugin +GenericName[eu]=%{APPNAME} plugina +GenericName[fa]=وصلۀ %{APPNAME} +GenericName[fr]=Module externe pour %{APPNAME} +GenericName[ga]=Breiseán %{APPNAME} +GenericName[gl]=Extensión %{APPNAME} +GenericName[hu]=%{APPNAME}-bővítőmodul +GenericName[it]=Plugin %{APPNAME} +GenericName[ja]=%{APPNAME} プラグイン +GenericName[nds]=%{APPNAME}-Moduul +GenericName[ne]=%{APPNAME} प्लगइन +GenericName[nl]=%{APPNAME}-plugin +GenericName[pl]=Wtyczka %{APPNAME} +GenericName[pt]='Plugin' %{APPNAME} +GenericName[pt_BR]=Plug-in do %{APPNAME} +GenericName[ru]=Модуль %{APPNAME} +GenericName[sk]=%{APPNAME} modul +GenericName[sl]=Vstavek za %{APPNAME} +GenericName[sr]=%{APPNAME} прикључак +GenericName[sr@Latn]=%{APPNAME} priključak +GenericName[sv]=%{APPNAME} insticksprogram +GenericName[tr]=%{APPNAME} Eklentisi +GenericName[zh_CN]=%{APPNAME} 插件 +GenericName[zh_TW]=%{APPNAME} 外掛程式 +Comment=%{APPNAME} Description +Comment[br]=Deskrivadur %{APPNAME} +Comment[ca]=Descripció per a %{APPNAME} +Comment[da]=%{APPNAME} beskrivelse +Comment[de]=%{APPNAME} Beschreibung +Comment[el]=Περιγραφή %{APPNAME} +Comment[es]=Descripción de %{APPNAME} +Comment[et]=%{APPNAME} kirjeldus +Comment[eu]=%{APPNAME} deskribapena +Comment[fa]=توصیف %{APPNAME} +Comment[fr]=Description pour %{APPNAME} +Comment[ga]=Cur Síos %{APPNAME} +Comment[gl]=Descripción de %{APPNAME} +Comment[hu]=%{APPNAME} leírása +Comment[it]=Descrizione %{APPNAME} +Comment[ja]=%{APPNAME} 概説 +Comment[nds]=%{APPNAME}-Beschrieven +Comment[ne]=%{APPNAME} वर्णन +Comment[nl]=%{APPNAME} omschrijving +Comment[pl]=Opis %{APPNAME} +Comment[pt]=Descrição de %{APPNAME$} +Comment[pt_BR]=Descrição do %{APPNAME} +Comment[ru]=Описание %{APPNAME} +Comment[sk]=%{APPNAME} popis +Comment[sl]=Opis za %{APPNAME} +Comment[sr]=Опис за %{APPNAME} +Comment[sr@Latn]=Opis za %{APPNAME} +Comment[sv]=%{APPNAME} beskrivning +Comment[tr]=%{APPNAME} Tanımı +Comment[zh_CN]=%{APPNAME} 描述 +Comment[zh_TW]=%{APPNAME} 描述 +Icon=tdevelop +ServiceTypes=TDevelop/Plugin + +X-TDevelop-Plugin-Version=1 +X-TDevelop-Plugin-Homepage= +X-TDevelop-Plugin-BugsEmailAddress=%{EMAIL} +X-TDevelop-Plugin-Copyright=(C) by %{AUTHOR} + +X-TDevelop-Args= + +X-TDevelop-Scope=%{SCOPE} +X-TDE-Library=libkdev%{APPNAMELC} +X-TDevelop-Version=3 +X-TDevelop-Properties=%{PROPS} diff --git a/languages/cpp/app_templates/kdevpart/kdevpart.kdevtemplate b/languages/cpp/app_templates/kdevpart/kdevpart.kdevtemplate new file mode 100644 index 00000000..c1860597 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart/kdevpart.kdevtemplate @@ -0,0 +1,242 @@ +# TDE Config File +[General] +Name=TDevelop Plugin (TDevelop source tree build) +Name[ca]=Connector per a TDevelop (de construcció a l'arbre de fonts de TDevelop) +Name[da]=TDevelop Plugin (TDevelop kildetræ bygning) +Name[de]=TDevelop-Modul (Erstellung im TDevelop-Quelltextbaum) +Name[el]=Πρόσθετο TDevelop (κατασκευή με το δέντρο πηγαίου κώδικα του TDevelop) +Name[es]=Complemento para TDevelop (construcción en árbol de código fuente de TDevelop) +Name[et]=TDevelopi plugin (Kdevelopi lähtekoodipuus) +Name[eu]=TDevelop plugina (TDevelop-en iturburu zuhaitzean erakitzeko) +Name[fa]=وصلۀ TDevelop )ساخت درخت منبع TDevelop( +Name[fr]=Module externe de TDevelop (construction dans l'arborescence des sources de TDevelop) +Name[gl]=Extensión para TDevelop (compilación na árbore de código de TDevelop) +Name[hu]=TDevelop-bővítőmodul (TDevelopos forráskönyvtáron belül) +Name[it]=Plugin di TDevelop (compila l'albero sorgente di TDevelop) +Name[ja]=TDevelop プラグイン (TDevelop ソースツリービルド) +Name[nds]=TDevelop-Moduul (TDevelop-Bornboomprogramm) +Name[ne]=केडीई विकास प्लगइन (केडीई विकास स्रोत ट्री निर्माण) +Name[nl]=TDevelop-plugin (TDevelop source tree build) +Name[pl]=Wtyczka TDevelopa (budowa w drzewie źródłowym TDevelopa) +Name[pt]='Plugin' do TDevelop (compilação na árvore de código do TDevelop) +Name[pt_BR]='Plugin' do TDevelop (compilação na árvore de código do TDevelop) +Name[ru]=Модуль TDevelop (в исходном коде TDevelop) +Name[sk]=TDevelop modul (TDevelop zdrojový strom build) +Name[sr]=Прикључак за TDevelop (градња у изворном стаблу TDevelop-а) +Name[sr@Latn]=Priključak za TDevelop (gradnja u izvornom stablu TDevelop-a) +Name[sv]=TDevelop-insticksprogram (att bygga i TDevelops källkodsträd) +Name[tr]=TDevelop Eklentisi (TDevelop kaynak ağacı kurulumu) +Name[zh_CN]=TDevelop 插件(TDevelop 源代码树编译) +Name[zh_TW]=TDevelop 外掛程式(TDevelop 程式源碼樹內建立) +Category=C++/TDevelop/ +Comment=This generates a plugin for TDevelop, for building within the TDevelop source tree +Comment[ca]=Genera un connector per a TDevelop, per a que es construeixi en l'arbre de fonts de TDevelop +Comment[da]=Dette genererer et plugin for TDevelop, til at bygges indenfor TDevelop's kildetræ +Comment[de]=Hiermit wird ein Modul für TDevelop erstellt, dessen Erstellung innerhalb des Quelltextbaumes von TDevelop erfolgt. +Comment[el]=Αυτό δημιουργεί ένα πρόσθετο για το TDevelop, για κατασκευή του μέσα στο δέντρο πηγαίου κώδικα του TDevelop +Comment[es]=Genera un complemento para TDevelop, para ser construido en el árbol de código fuente de TDevelop +Comment[et]=TDevelopi plugina loomine, mis ehitatakse TDevelopi lähtekoodipuus. +Comment[eu]=Honek TDevelop-erako plugin bat sortzen du, TDevelop-en iturburu-zuhaitzean eraikitzeko +Comment[fa]=وصله‌ای برای TDevelop، برای ساختن در درخت منبع TDevelop تولید می‌کند +Comment[fr]=Génère un module externe pour TDevelop, à construire dans l'arborescence des sources de TDevelop +Comment[gl]=Isto xera unha extensión para TDevelop que se compilará dentro da árbore de código de TDevelop +Comment[hu]=Létrehoz egy TDevelop-bővítőmodult, mely a TDevelopos forráskönyvtáron belül fordítható le +Comment[it]=Genera un plugin per TDevelop, per compilarlo assieme all'albero sorgente di TDevelop +Comment[nds]=Dit stellt en TDevelop-Moduul för't Kompileren binnen den TDevelop-Bornboom op +Comment[ne]=यसले केडीई विकास स्रोत ट्री भित्र निर्माण गर्न, केडीई विकासका लागि प्लगइन उत्पन्न गर्दछ +Comment[nl]=Dit genereert een plugin voor TDevelop, om te bouwen binnen de TDevelop sourcetree +Comment[pl]=Generuje wtyczkę do TDevelopa, która jest budowana w jego drzewie źródłowym +Comment[pt]=Isto gera um 'plugin' para o TDevelop, para uma compilação dentro da árvore de código do TDevelop +Comment[pt_BR]=Isto gera um 'plugin' para o TDevelop, para uma compilação dentro da árvore de código do TDevelop +Comment[ru]=Создание модуля TDevelop в исходном коде TDevelop +Comment[sk]=Vygeneruje modul pre TDevelop, ktorý sa bude kompilovať v rámci TDevelop zdrojového stromu +Comment[sr]=Ово прави прикључак за TDevelop, за градњу у оквиру TDevelop-овог изворног стабла +Comment[sr@Latn]=Ovo pravi priključak za TDevelop, za gradnju u okviru TDevelop-ovog izvornog stabla +Comment[sv]=Det här skapar ett insticksprogram för TDevelop, att byggas inne i TDevelops källkodsträd. +Comment[tr]=Bu TDevelop için, TDevelop kaynak ağacınında olacak, bir eklenti yaratır. +Comment[zh_CN]=这将生成 TDevelop 的插件,该插件需要与 TDevelop 源代码树一起编译 +Comment[zh_TW]=產生一個 TDevelop 外掛程式,建立於 TDevelop 程式源碼樹內。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}part.cpp +Archive=kdevpart.tar.gz + +[SCOPE] +Type = value +ValueType=QString +Value= SCOPE +Comment= The scope of a plugin (Global, Project, Core) +Comment[ca]= L'àmbit d'un connector (Global, Project, Core) +Comment[da]= Et plugins omfang (Globalt, Projekt, Kerne) +Comment[de]= Gültigkeitsbereich eines Moduls (Global, Projekt, Kern) +Comment[el]= Η εμβέλεια ενός πρόσθετου (Καθολική, Έργο, Πυρήνας) +Comment[es]=El alcance de un complemento (global, proyecto, núcleo) +Comment[et]=Plugina skoop (globaalne, projekt, tuum) +Comment[eu]= Pluginaren barrutia (Globala, Projektua, Nukleoa) +Comment[fa]=دامنۀ یک وصله )سراسری، پروژه، هسته( +Comment[fr]= La portée d'un module externe (globale, projet, core) +Comment[ga]= Scóip an bhreiseáin (Comhchoiteann, Tionscadal, Ceartlár) +Comment[gl]=Ámbito da extensión (Global, Proxecto, Núcleo) +Comment[hu]=A modul hatóköre (globális, projektszintű, alap) +Comment[it]=Il contesto di un plugin (Globale, Progetto, Core) +Comment[nds]= Dat Rebeet vun en Moduul (Globaal, Projekt, Karn) +Comment[ne]= प्लगइनको क्षेत्र (विश्वव्यापी, परियोजना, कोर) +Comment[nl]=Het bereik van een plugin (globaal, project, core) +Comment[pl]=Przynależność wtyczki (globalna, projekt, część główna) +Comment[pt]=O âmbito de um 'plugin' (Global, Projecto, Núcleo) +Comment[pt_BR]=O âmbito de um 'plugin' (Global, Projecto, Núcleo) +Comment[ru]=Тип модуля (Global, Project, Core) +Comment[sk]=Rozsah module (globálny, projektový, jadrový) +Comment[sr]=Опсег прикључка (глобални, пројекат, језгро) +Comment[sr@Latn]=Opseg priključka (globalni, projekat, jezgro) +Comment[sv]=Insticksprogrammets omfattning (Global, Projekt, Kärna) +Comment[tr]=Bir eklentinin alanı (Genel, Proje, İç) +Comment[zh_CN]=插件的范围(全局、工程、核心) +Comment[zh_TW]=外掛程式的範圍(全域、專案、核心) +Default= Global + +[PROPS] +Type = value +ValueType=QString +Value= PROPS +Comment= The list of supported TDevelop properties +Comment[ca]= La llista de propietats suportades del TDevelop +Comment[da]= Listen af understøttede TDevelop-egenskaber +Comment[de]= Die Liste der unterstützten TDevelop-Eigenschaften +Comment[el]= Η λίστα των υποστηριζόμενων ιδιοτήτων του TDevelop +Comment[es]=La lista de propiedades de TDevelop soportadas +Comment[et]= TDevelopi toetatud omaduste nimekiri +Comment[eu]= Onartzen diren TDevelop-en propietateen zerrenda +Comment[fa]=فهرست ویژگیهای پشتیبانی‌شدۀ TDevelop +Comment[fr]= La liste des propriétés de TDevelop prises en charge +Comment[ga]= Liosta d'airíonna TDevelop a dtacaítear leo +Comment[gl]=Lista das propiedades de TDevelop soportadas +Comment[hu]=A támogatott TDevelop-tulajdonságok +Comment[it]=Lista delle proprietà supportate da TDevelop +Comment[nds]= De List mit ünnerstütt TDevelop-Egenschappen +Comment[ne]= केडीई विकास समर्थन गर्ने गुणको सूची +Comment[nl]=De lijst met ondersteunde TDevelop-properties +Comment[pl]= Lista obsługiwanych właściwości TDevelopa +Comment[pt]= A lista de propriedades do TDevelop suportadas +Comment[pt_BR]= A lista de propriedades do TDevelop suportadas +Comment[ru]=Список поддерживаемых типов модулей для TDevelop +Comment[sk]=Zoznam podporovaných vlastností TDevelop +Comment[sl]=Seznam podprtih lastnosti TDevelop +Comment[sr]=Листа подржаних TDevelop-ових својстава +Comment[sr@Latn]=Lista podržanih TDevelop-ovih svojstava +Comment[sv]=Listan med egenskaper i TDevelop som stöds +Comment[tr]=Desteklenen TDevelop özellikleri +Comment[zh_CN]=列出支持的 TDevelop 属性 +Comment[zh_TW]=支援的 TDevelop 屬性列表 +Default= + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE3] +Type=install +Source=%{src}/kdevpart_part.cpp +Dest=%{dest}/%{APPNAMELC}part.cpp + +[FILE4] +Type=install +Source=%{src}/kdevpart_part.h +Dest=%{dest}/%{APPNAMELC}part.h + +[FILE5] +Type=install +Source=%{src}/kdevpart_widget.cpp +Dest=%{dest}/%{APPNAMELC}widget.cpp + +[FILE6] +Type=install +Source=%{src}/kdevpart_widget.h +Dest=%{dest}/%{APPNAMELC}widget.h + +[FILE7] +Type=install +EscapeXML=true +Source=%{src}/kdevpart_part.rc +Dest=%{dest}/kdev%{APPNAMELC}.rc + +[FILE71] +Type=install +EscapeXML=true +Source=%{src}/globalconfigbase.ui +Dest=%{dest}/%{APPNAMELC}globalconfigbase.ui + +[FILE711] +Type=install +Source=%{src}/globalconfig.h +Dest=%{dest}/%{APPNAMELC}globalconfig.h + +[FILE712] +Type=install +Source=%{src}/globalconfig.cpp +Dest=%{dest}/%{APPNAMELC}globalconfig.cpp + +[FILE72] +Type=install +EscapeXML=true +Source=%{src}/projectconfigbase.ui +Dest=%{dest}/%{APPNAMELC}projectconfigbase.ui + +[FILE721] +Type=install +Source=%{src}/projectconfig.h +Dest=%{dest}/%{APPNAMELC}projectconfig.h + +[FILE722] +Type=install +Source=%{src}/projectconfig.cpp +Dest=%{dest}/%{APPNAMELC}projectconfig.cpp + +[FILE8] +Type=install +Source=%{src}/kdevpart.desktop +Dest=%{dest}/kdev%{APPNAMELC}.desktop + +[FILE9] +Type=install +Source=%{src}/README.dox +Dest=%{dest}/README.dox + +[MSG] +Type=message +Comment=A TDevelop plugin was created in %{dest} +Comment[ca]=Un connector per a TDevelop ha estat creat en %{dest} +Comment[da]=Et TDevelop plugin blev oprettet i %{dest} +Comment[de]=Ein TDevelop-Modul wurde in %{dest} erstellt. +Comment[el]=Ένα πρόσθετο του TDevelop δημιουργήθηκε στο %{dest} +Comment[es]=Un complemento para TDevelop ha sido creado en %{dest} +Comment[et]=TDevelopi plugin loodi asukohta %{dest} +Comment[eu]=TDevelop plugin bat sortu da hemen: %{dest} +Comment[fa]=یک وصلۀ TDevelop در %{dest} ایجاد شد +Comment[fr]=Un module externe pour TDevelop a été créé dans %{dest} +Comment[ga]=Cruthaíodh breiseán TDevelop i %{dest} +Comment[gl]=Creouse unha extensión para TDevelop en %{dest} +Comment[hu]=Létrejött egy TDevelop-bővítőmodul itt: %{dest} +Comment[it]=È stato creato un plugin per TDevelop in %{dest} +Comment[ja]=TDevelop プラグインを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en TDevelop-Moduul opstellt +Comment[ne]=केडीई विकास प्लगइन %{dest} मा सिर्जना गरियो +Comment[nl]=Er is een TDevelop-plugin aangemaakt in %{dest} +Comment[pl]=Wtyczka do TDevelopa została utworzona w %{dest} +Comment[pt]=Foi criado um 'plugin' do TDevelop em %{dest} +Comment[pt_BR]=Foi criado um 'plugin' do TDevelop em %{dest} +Comment[ru]=Модуль TDevelop создан в %{dest} +Comment[sk]=TDevelop modul bol vytvorený v %{dest} +Comment[sl]=Vstavek za TDevelop je bil ustvarjen v %{dest} +Comment[sr]=Прикључак за TDevelop направљен је у %{dest} +Comment[sr@Latn]=Priključak za TDevelop napravljen je u %{dest} +Comment[sv]=Ett insticksprogram för TDevelop skapades i %{dest} +Comment[tr]=Bir TDevelop eklentisi %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了 TDevelop 插件 +Comment[zh_TW]=一個 TDevelop 外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/tdevpart/tdevpart.png b/languages/cpp/app_templates/kdevpart/kdevpart.png similarity index 100% rename from languages/cpp/app_templates/tdevpart/tdevpart.png rename to languages/cpp/app_templates/kdevpart/kdevpart.png diff --git a/languages/cpp/app_templates/kdevpart/kdevpart_part.cpp b/languages/cpp/app_templates/kdevpart/kdevpart_part.cpp new file mode 100644 index 00000000..aa950c8a --- /dev/null +++ b/languages/cpp/app_templates/kdevpart/kdevpart_part.cpp @@ -0,0 +1,183 @@ +%{CPP_TEMPLATE} +#include "%{APPNAMELC}part.h" + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "%{APPNAMELC}widget.h" +#include "%{APPNAMELC}globalconfig.h" +#include "%{APPNAMELC}projectconfig.h" + +typedef KDevGenericFactory<%{APPNAME}Part> %{APPNAME}Factory; +KDevPluginInfo data("kdev%{APPNAMELC}"); +K_EXPORT_COMPONENT_FACTORY( libkdev%{APPNAMELC}, %{APPNAME}Factory( data ) ); + +#define GLOBALDOC_OPTIONS 1 +#define PROJECTDOC_OPTIONS 2 + +%{APPNAME}Part::%{APPNAME}Part(TQObject *parent, const char *name, const TQStringList &/*args*/) + : KDevPlugin(&data, parent, name ? name : "%{APPNAME}Part") +{ + setInstance(%{APPNAME}Factory::instance()); + setXMLFile("kdev%{APPNAMELC}.rc"); + + m_widget = new %{APPNAME}Widget(this); + m_widget->setCaption("widget caption"); + m_widget->setIcon(SmallIcon(info()->icon())); + + TQWhatsThis::add(m_widget, i18n("WHAT DOES THIS PART DO?")); + + // now you decide what should happen to the widget. Take a look at kdevcore.h + // or at other plugins how to embed it. + + // if you want to embed your widget as an outputview, simply uncomment + // the following line. + // mainWindow()->embedOutputView( m_widget, "name that should appear", "enter a tooltip" ); + + // if you want to embed your widget as a selectview (at the left), simply uncomment + // the following line. + // mainWindow()->embedSelectView( m_widget, "name that should appear", "enter a tooltip" ); + + // if you want to embed your widget as a selectview (at the right), simply uncomment + // the following line. + // mainWindow()->embedSelectViewRight( m_widget, "name that should appear", "enter a tooltip" ); + + setupActions(); + + m_configProxy = new ConfigWidgetProxy(core()); + m_configProxy->createGlobalConfigPage(i18n("%{APPNAME}"), GLOBALDOC_OPTIONS, info()->icon()); + m_configProxy->createProjectConfigPage(i18n("%{APPNAME}"), PROJECTDOC_OPTIONS, info()->icon()); + connect(m_configProxy, TQT_SIGNAL(insertConfigWidget(const KDialogBase*, TQWidget*, unsigned int )), + this, TQT_SLOT(insertConfigWidget(const KDialogBase*, TQWidget*, unsigned int))); + + connect(core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), + this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *))); + connect(core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened())); + connect(core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed())); + + + TQTimer::singleShot(0, this, TQT_SLOT(init())); +} + +%{APPNAME}Part::~%{APPNAME}Part() +{ +// if you embed a widget, you need to tell the mainwindow when you remove it +// if ( m_widget ) +// { +// mainWindow()->removeView( m_widget ); +// } + delete m_widget; + delete m_configProxy; +} + +void %{APPNAME}Part::init() +{ +// delayed initialization stuff goes here +} + +void %{APPNAME}Part::setupActions() +{ +// create XMLGUI actions here + action = new TDEAction(i18n("&Do Something..."), 0, + this, TQT_SLOT(doSomething()), actionCollection(), "plugin_action" ); + action->setToolTip(i18n("Do something")); + action->setWhatsThis(i18n("Do something

    Describe here what does this action do.")); +} + +void %{APPNAME}Part::insertConfigWidget(const KDialogBase *dlg, TQWidget *page, unsigned int pageNo) +{ +// create configuraton dialogs here + switch (pageNo) + { + case GLOBALDOC_OPTIONS: + { + %{APPNAME}GlobalConfig *w = new %{APPNAME}GlobalConfig(this, page, "global config"); + connect(dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept())); + break; + } + case PROJECTDOC_OPTIONS: + { + %{APPNAME}ProjectConfig *w = new %{APPNAME}ProjectConfig(this, page, "project config"); + connect(dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept())); + break; + } + } +} + +void %{APPNAME}Part::contextMenu(TQPopupMenu *popup, const Context *context) +{ +// put actions into the context menu here + if (context->hasType(Context::EditorContext)) + { + // editor context menu + const EditorContext *econtext = static_cast(context); + + // use context and plug actions here + action->plug(popup); + + // or create menu items on the fly + // int id = -1; + // id = popup->insertItem(i18n("Do Something Here"), + // this, TQT_SLOT(doSomething()) ); + // popup->setWhatsThis(id, i18n("Do something here

    Describe here what does this action do." + } + else if (context->hasType(Context::FileContext)) + { + // file context menu + const FileContext *fcontext = static_cast(context); + + //use context and plug actions here + } + else if (context->hasType(Context::ProjectModelItemContext)) + { + // project tree context menu + const ProjectModelItemContext *pcontext = static_cast(context); + + // use context and plug actions here + } + else if (context->hasType(Context::CodeModelItemContext)) + { + // class tree context menu + const CodeModelItemContext *mcontext = static_cast(context); + + // use context and plug actions here + } + else if (context->hasType(Context::DocumentationContext)) + { + // documentation viewer context menu + const DocumentationContext *dcontext = static_cast(context); + + // use context and plug actions here + } +} + +void %{APPNAME}Part::projectOpened() +{ +// do something when the project is opened +} + +void %{APPNAME}Part::projectClosed() +{ +// do something when the project is closed +} + +void %{APPNAME}Part::doSomething() +{ +// do something useful here instead of showing the message box + KMessageBox::information(m_widget, i18n("This action does nothing."), i18n("%{APPNAME} Plugin")); +} + +#include "%{APPNAMELC}part.moc" diff --git a/languages/cpp/app_templates/kdevpart/kdevpart_part.h b/languages/cpp/app_templates/kdevpart/kdevpart_part.h new file mode 100644 index 00000000..9414d448 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart/kdevpart_part.h @@ -0,0 +1,46 @@ +%{H_TEMPLATE} +#ifndef TDEV%{APPNAMEUC}_H +#define TDEV%{APPNAMEUC}_H + +#include + +#include + +class TQPopupMenu; +class TDEAction; +class KDialogBase; +class Context; +class ConfigWidgetProxy; +class %{APPNAME}Widget; + +/** +Please read the README.dox file for more info about this part +*/ +class %{APPNAME}Part: public KDevPlugin +{ + Q_OBJECT + +public: + %{APPNAME}Part(TQObject *parent, const char *name, const TQStringList &args); + ~%{APPNAME}Part(); + +private slots: + void init(); + + void insertConfigWidget(const KDialogBase *dlg, TQWidget *page, unsigned int pageNo); + void contextMenu(TQPopupMenu *popup, const Context *context); + void projectOpened(); + void projectClosed(); + + void doSomething(); + +private: + void setupActions(); + + TDEAction *action; + + TQGuardedPtr<%{APPNAME}Widget> m_widget; + ConfigWidgetProxy *m_configProxy; +}; + +#endif diff --git a/languages/cpp/app_templates/tdevpart/tdevpart_part.rc b/languages/cpp/app_templates/kdevpart/kdevpart_part.rc similarity index 100% rename from languages/cpp/app_templates/tdevpart/tdevpart_part.rc rename to languages/cpp/app_templates/kdevpart/kdevpart_part.rc diff --git a/languages/cpp/app_templates/kdevpart/kdevpart_widget.cpp b/languages/cpp/app_templates/kdevpart/kdevpart_widget.cpp new file mode 100644 index 00000000..65bb996e --- /dev/null +++ b/languages/cpp/app_templates/kdevpart/kdevpart_widget.cpp @@ -0,0 +1,21 @@ +%{CPP_TEMPLATE} +#include "%{APPNAMELC}widget.h" + +#include +#include +#include + +#include + +#include "%{APPNAMELC}part.h" + +%{APPNAME}Widget::%{APPNAME}Widget(%{APPNAME}Part *part) + : TQWidget(0, "%{APPNAMELC} widget"), m_part(part) +{ +} + +%{APPNAME}Widget::~%{APPNAME}Widget() +{ +} + +#include "%{APPNAMELC}widget.moc" diff --git a/languages/cpp/app_templates/kdevpart/kdevpart_widget.h b/languages/cpp/app_templates/kdevpart/kdevpart_widget.h new file mode 100644 index 00000000..e54abd4d --- /dev/null +++ b/languages/cpp/app_templates/kdevpart/kdevpart_widget.h @@ -0,0 +1,24 @@ +%{H_TEMPLATE} +#ifndef %{APPNAMEUC}_WIDGET_H +#define %{APPNAMEUC}_WIDGET_H + +#include +#include + +class KDevProject; +class %{APPNAME}Part; + +class %{APPNAME}Widget: public TQWidget +{ + Q_OBJECT + +public: + %{APPNAME}Widget(%{APPNAME}Part *part); + ~%{APPNAME}Widget(); + +private: + %{APPNAME}Part *m_part; +}; + + +#endif diff --git a/languages/cpp/app_templates/tdevpart/projectconfig.cpp b/languages/cpp/app_templates/kdevpart/projectconfig.cpp similarity index 100% rename from languages/cpp/app_templates/tdevpart/projectconfig.cpp rename to languages/cpp/app_templates/kdevpart/projectconfig.cpp diff --git a/languages/cpp/app_templates/tdevpart/projectconfig.h b/languages/cpp/app_templates/kdevpart/projectconfig.h similarity index 100% rename from languages/cpp/app_templates/tdevpart/projectconfig.h rename to languages/cpp/app_templates/kdevpart/projectconfig.h diff --git a/languages/cpp/app_templates/tdevpart/projectconfigbase.ui b/languages/cpp/app_templates/kdevpart/projectconfigbase.ui similarity index 100% rename from languages/cpp/app_templates/tdevpart/projectconfigbase.ui rename to languages/cpp/app_templates/kdevpart/projectconfigbase.ui diff --git a/languages/cpp/app_templates/kdevpart/src-Makefile.am b/languages/cpp/app_templates/kdevpart/src-Makefile.am new file mode 100644 index 00000000..5fe18f43 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart/src-Makefile.am @@ -0,0 +1,20 @@ +INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) + +kde_module_LTLIBRARIES = libkdev%{APPNAMELC}.la +libkdev%{APPNAMELC}_la_LDFLAGS = -module -avoid-version -no-undefined $(all_libraries) $(KDE_PLUGIN) $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEPARTS) +libkdev%{APPNAMELC}_la_LIBADD = $(top_builddir)/lib/libtdevelop.la + +libkdev%{APPNAMELC}_la_SOURCES = %{APPNAMELC}part.cpp %{APPNAMELC}widget.cpp \ + %{APPNAMELC}globalconfigbase.ui %{APPNAMELC}globalconfig.cpp \ + %{APPNAMELC}projectconfigbase.ui %{APPNAMELC}projectconfig.cpp + +METASOURCES = AUTO + +appsharedir = $(kde_datadir)/kdev%{APPNAMELC} +appshare_DATA = + +servicedir = $(kde_servicesdir) +service_DATA = kdev%{APPNAMELC}.desktop + +rcdir = $(kde_datadir)/kdev%{APPNAMELC} +rc_DATA = kdev%{APPNAMELC}.rc diff --git a/languages/cpp/app_templates/kdevpart2/CMakeLists.txt b/languages/cpp/app_templates/kdevpart2/CMakeLists.txt new file mode 100644 index 00000000..080603a8 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart2/CMakeLists.txt @@ -0,0 +1,30 @@ +################################################# +# +# (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( kdevpart2.tar.gz ALL + COMMAND tar zcf kdevpart2.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} + src-Makefile.am kdevpart_part.cpp kdevpart_part.h + kdevpart_widget.h kdevpart_widget.cpp kdevpart_part.rc + kdevpart.desktop app.tdevelop kdevpart-configure.in.in + README.dox subdirs globalconfigbase.ui globalconfig.h + globalconfig.cpp projectconfigbase.ui projectconfig.h + projectconfig.cpp +) + + +install( FILES + ${CMAKE_CURRENT_BINARY_DIR}/kdevpart2.tar.gz kdevpart2.png + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) + + +install( FILES + kdevpart2.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kdevpart2/Makefile.am b/languages/cpp/app_templates/kdevpart2/Makefile.am new file mode 100644 index 00000000..436f919c --- /dev/null +++ b/languages/cpp/app_templates/kdevpart2/Makefile.am @@ -0,0 +1,21 @@ +dataFiles = src-Makefile.am kdevpart_part.cpp kdevpart_part.h\ + kdevpart_widget.h kdevpart_widget.cpp \ + kdevpart_part.rc kdevpart.desktop app.tdevelop \ + kdevpart-configure.in.in README.dox subdirs globalconfigbase.ui globalconfig.h \ + globalconfig.cpp projectconfigbase.ui projectconfig.h projectconfig.cpp + +templateName = kdevpart2 + +### 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/tdevpart2/README.dox b/languages/cpp/app_templates/kdevpart2/README.dox similarity index 100% rename from languages/cpp/app_templates/tdevpart2/README.dox rename to languages/cpp/app_templates/kdevpart2/README.dox diff --git a/languages/cpp/app_templates/kdevpart2/app.tdevelop b/languages/cpp/app_templates/kdevpart2/app.tdevelop new file mode 100644 index 00000000..1b7aab6e --- /dev/null +++ b/languages/cpp/app_templates/kdevpart2/app.tdevelop @@ -0,0 +1,148 @@ + + + + %{AUTHOR} + %{EMAIL} + %{VERSION} + KDevTDEAutoProject + C++ + + C++ + Code + Qt + TDE + KDevelop + + + + + src/%{APPNAMELC} + debug + + + src/%{APPNAMELC} + executable + + + + optimized + kdevgccoptions + kdevgppoptions + kdevg77options + -O2 -g0 + + + --enable-debug=full + debug + kdevgccoptions + kdevgppoptions + kdevg77options + -O0 -g3 + + + + + + + + + + + + + + + + + + + + false + true + + + + + 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 + + + + + + + + + + + + -f + + + + -dP + -f + -C -d -P + -u3 -p + + + + + 3 + true + 3 + EmbeddedKDevDesigner + + + true + true + true + false + true + true + 250 + 400 + + + + + Doxygen Documentation Collection + %{APPNAMELC}.tag + + + diff --git a/languages/cpp/app_templates/tdevpart2/globalconfig.cpp b/languages/cpp/app_templates/kdevpart2/globalconfig.cpp similarity index 100% rename from languages/cpp/app_templates/tdevpart2/globalconfig.cpp rename to languages/cpp/app_templates/kdevpart2/globalconfig.cpp diff --git a/languages/cpp/app_templates/tdevpart2/globalconfig.h b/languages/cpp/app_templates/kdevpart2/globalconfig.h similarity index 100% rename from languages/cpp/app_templates/tdevpart2/globalconfig.h rename to languages/cpp/app_templates/kdevpart2/globalconfig.h diff --git a/languages/cpp/app_templates/tdevpart2/globalconfigbase.ui b/languages/cpp/app_templates/kdevpart2/globalconfigbase.ui similarity index 100% rename from languages/cpp/app_templates/tdevpart2/globalconfigbase.ui rename to languages/cpp/app_templates/kdevpart2/globalconfigbase.ui diff --git a/languages/cpp/app_templates/kdevpart2/kdevpart-configure.in.in b/languages/cpp/app_templates/kdevpart2/kdevpart-configure.in.in new file mode 100644 index 00000000..55f2f614 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart2/kdevpart-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/interfaces/kdevcore.h]) +KDE_CHECK_LIB([tdevelop],main, + [LIBTDEVELOP="-ltdevelop"]) +AC_SUBST(LIBTDEVELOP) diff --git a/languages/cpp/app_templates/kdevpart2/kdevpart.desktop b/languages/cpp/app_templates/kdevpart2/kdevpart.desktop new file mode 100644 index 00000000..a3029ac6 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart2/kdevpart.desktop @@ -0,0 +1,83 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Name=KDev%{APPNAME} +Name[nds]=KDev%{ProgNaam} +Name[sv]=TDevelop %{APPNAME} +Name[ta]=கெடெவ்%{APPNAME} +GenericName=%{APPNAME} Plugin +GenericName[br]=Lugent %{APPNAME} +GenericName[ca]=Connector per a %{APPNAME} +GenericName[da]=%{APPNAME} plugin +GenericName[de]=%{APPNAME}-Modul +GenericName[el]=Πρόσθετο %{APPNAME} +GenericName[es]=Complemento %{APPNAME} +GenericName[et]=%{APPNAME} plugin +GenericName[eu]=%{APPNAME} plugina +GenericName[fa]=وصلۀ %{APPNAME} +GenericName[fr]=Module externe pour %{APPNAME} +GenericName[ga]=Breiseán %{APPNAME} +GenericName[gl]=Extensión %{APPNAME} +GenericName[hu]=%{APPNAME}-bővítőmodul +GenericName[it]=Plugin %{APPNAME} +GenericName[ja]=%{APPNAME} プラグイン +GenericName[nds]=%{APPNAME}-Moduul +GenericName[ne]=%{APPNAME} प्लगइन +GenericName[nl]=%{APPNAME}-plugin +GenericName[pl]=Wtyczka %{APPNAME} +GenericName[pt]='Plugin' %{APPNAME} +GenericName[pt_BR]=Plug-in do %{APPNAME} +GenericName[ru]=Модуль %{APPNAME} +GenericName[sk]=%{APPNAME} modul +GenericName[sl]=Vstavek za %{APPNAME} +GenericName[sr]=%{APPNAME} прикључак +GenericName[sr@Latn]=%{APPNAME} priključak +GenericName[sv]=%{APPNAME} insticksprogram +GenericName[tr]=%{APPNAME} Eklentisi +GenericName[zh_CN]=%{APPNAME} 插件 +GenericName[zh_TW]=%{APPNAME} 外掛程式 +Comment=%{APPNAME} Description +Comment[br]=Deskrivadur %{APPNAME} +Comment[ca]=Descripció per a %{APPNAME} +Comment[da]=%{APPNAME} beskrivelse +Comment[de]=%{APPNAME} Beschreibung +Comment[el]=Περιγραφή %{APPNAME} +Comment[es]=Descripción de %{APPNAME} +Comment[et]=%{APPNAME} kirjeldus +Comment[eu]=%{APPNAME} deskribapena +Comment[fa]=توصیف %{APPNAME} +Comment[fr]=Description pour %{APPNAME} +Comment[ga]=Cur Síos %{APPNAME} +Comment[gl]=Descripción de %{APPNAME} +Comment[hu]=%{APPNAME} leírása +Comment[it]=Descrizione %{APPNAME} +Comment[ja]=%{APPNAME} 概説 +Comment[nds]=%{APPNAME}-Beschrieven +Comment[ne]=%{APPNAME} वर्णन +Comment[nl]=%{APPNAME} omschrijving +Comment[pl]=Opis %{APPNAME} +Comment[pt]=Descrição de %{APPNAME$} +Comment[pt_BR]=Descrição do %{APPNAME} +Comment[ru]=Описание %{APPNAME} +Comment[sk]=%{APPNAME} popis +Comment[sl]=Opis za %{APPNAME} +Comment[sr]=Опис за %{APPNAME} +Comment[sr@Latn]=Opis za %{APPNAME} +Comment[sv]=%{APPNAME} beskrivning +Comment[tr]=%{APPNAME} Tanımı +Comment[zh_CN]=%{APPNAME} 描述 +Comment[zh_TW]=%{APPNAME} 描述 +Icon=tdevelop +ServiceTypes=TDevelop/Plugin + +X-TDevelop-Plugin-Version=1 +X-TDevelop-Plugin-Homepage= +X-TDevelop-Plugin-BugsEmailAddress=%{EMAIL} +X-TDevelop-Plugin-Copyright=(C) by %{AUTHOR} + +X-TDevelop-Args= + +X-TDevelop-Scope=%{SCOPE} +X-TDE-Library=libkdev%{APPNAMELC} +X-TDevelop-Version=3 +X-TDevelop-Properties=%{PROPS} diff --git a/languages/cpp/app_templates/kdevpart2/kdevpart2.kdevtemplate b/languages/cpp/app_templates/kdevpart2/kdevpart2.kdevtemplate new file mode 100644 index 00000000..5aeda5d1 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart2/kdevpart2.kdevtemplate @@ -0,0 +1,276 @@ +# TDE Config File +[General] +Name=TDevelop Plugin (Standalone build) +Name[ca]=Connector per a TDevelop (de construcció aïllada) +Name[da]=TDevelop plugin (Alenestående) +Name[de]=TDevelop-Modul (Unabhängige Erstellung) +Name[el]=Πρόσθετο TDevelop (Αυτόνομη κατασκευή) +Name[es]=Complemento para TDevelop (construcción independiente) +Name[et]=TDevelopi plugin (autonoomne) +Name[eu]=TDevelop plugin-a (eraikuntza autonomoak) +Name[fa]=وصلۀ TDevelop )ساخت خوداتکا( +Name[fr]=Module externe pour TDevelop (construction autonome) +Name[ga]=Breiseán TDevelop (Tógáil Shaorsheasaimh) +Name[gl]=Extensión para TDevelop (compilación independente) +Name[hu]=TDevelop-bővítőmodul (önálló) +Name[it]=Plugin di TDevelop (compilazione indipendente) +Name[ja]=TDevelop プラグイン (スタンダローンビルド) +Name[nds]=TDevelop-Moduul (Enkelprogramm) +Name[ne]=केडीई विकास प्लगइन (स्ट्यान्डअलोन निर्माण) +Name[nl]=TDevelop-plugin (standalone build) +Name[pl]=Wtyczka do TDevelopa (budowana oddzielnie) +Name[pt]='Plugin' do TDevelop (compilação autónoma) +Name[pt_BR]='Plugin' do TDevelop (compilação autónoma) +Name[ru]=Модуль TDevelop (внешний) +Name[sk]=TDevelop modul (samostatný build) +Name[sl]=Vstavek za TDevelop (samostojna izgradnja) +Name[sr]=Прикључак за TDevelop +Name[sr@Latn]=Priključak za TDevelop +Name[sv]=TDevelop-insticksprogram (att bygga fristående) +Name[tr]=TDevelop Eklentisi (Kendi başına çalışabilen) +Name[zh_CN]=TDevelop 插件(独立编译) +Name[zh_TW]=TDevelop 外掛程式(單獨建立) +Category=C++/TDevelop/ +Comment=This generates a KPart for TDevelop, to be built outside of the TDevelop source tree. +Comment[ca]=Genera una KPart per a TDevelop, per a que es construeixi fora de l'arbre de fonts de TDevelop. +Comment[da]=Dette genererer en KPart for TDevelop, til at bygges udenfor TDevelop's kildetræ. +Comment[de]=Hiermit wird eine Komponente (KPart) für TDevelop generiert, die außerhalb des Quelltextbaumes von TDevelop erstellt wird. +Comment[el]=Αυτό δημιουργεί ένα KPart για το TDevelop, για κατασκευή του έξω από το δέντρο πηγαίου κώδικα του TDevelop. +Comment[es]=Genera un KPart para TDevelop, para ser construido fuera del árbol de código fuente de TDevelop. +Comment[et]=TDevelopi KPart'i loomine, mida saab ehitada väljaspool TDevelopi lähtekoodipuud. +Comment[eu]=Honek TDevelop-en KPart bat sortzen du, TDevelop-en iturburu-zuhaitzetik at eraikitzeko. +Comment[fa]=یک KPart برای TDevelop، برای ساخته شدن در بیرون درخت منبع پروژه تولید می‌کند. +Comment[fr]=Génère un KPart pour TDevelop, à construire en dehors de l'arborescence des sources de TDevelop. +Comment[gl]=Isto xera un KPart para TDevelop que se compilará fóra da árbore de código de TDevelop. +Comment[hu]=Létrehoz egy TDevelop-bővítőmodult, mely a TDevelopos forráskönyvtáron kívül fordítható le. +Comment[it]=Genera un KPart per TDevelop, da compilare al di fuori dell'albero sorgente di TDevelop. +Comment[nds]=Dit stellt en KPart-Komponent för TDevelop op, dat buten den TDevelop-Bornboom kompileert warrt. +Comment[ne]=यसले केडीई विकास स्रोत ट्री बाहिर निर्माण हुने, केडीई विकासका लागि केडीई भाग उत्पन्न गर्दछ । +Comment[nl]=Dit genereert een KPart voor TDevelop, welke buiten de TDevelop sourcetree wordt gebouwd. +Comment[pl]=Generuje KPart dla TDevelopa budowane poza jego drzewem źródłowym. +Comment[pt]=Isto gera uma KPart para o TDevelop, de modo a ser compilada fora da árvore de código do TDevelop. +Comment[pt_BR]=Isto gera uma KPart para o TDevelop, de modo a ser compilada fora da árvore de código do TDevelop. +Comment[ru]=Создание компонента KPart для TDevelop со сборкой вне исходного кода TDevelop. +Comment[sk]=Vygenruje KPart pre TDevelop, tak aby ho bolo možné kompilovať mimo zdrojový strom TDevelop. +Comment[sr]=Ово прави KPart за TDevelop, за градњу изван TDevelop-овог изворног стабла. +Comment[sr@Latn]=Ovo pravi KPart za TDevelop, za gradnju izvan TDevelop-ovog izvornog stabla. +Comment[sv]=Detta skapar ett TDevelop-delprogram, att bygga utanför TDevelops källkodsträd. +Comment[tr]=Bu, TDevelop için, TDevelop kaynak ağacının dışında yapılacak, bir KPart yaratır. +Comment[zh_CN]=这将生成一个 TDevelop 的 KPart,可以在 TDevelop 源代码树之外编译。 +Comment[zh_TW]=產生一個 TDevelop 的 KPart 元件,建立在 TDevelop 程式源碼樹之外。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}_part.cpp +Archive=kdevpart2.tar.gz + +[SCOPE] +Type = value +ValueType=QString +Value= SCOPE +Comment= The scope of a plugin (Global, Project, Core) +Comment[ca]= L'àmbit d'un connector (Global, Project, Core) +Comment[da]= Et plugins omfang (Globalt, Projekt, Kerne) +Comment[de]= Gültigkeitsbereich eines Moduls (Global, Projekt, Kern) +Comment[el]= Η εμβέλεια ενός πρόσθετου (Καθολική, Έργο, Πυρήνας) +Comment[es]=El alcance de un complemento (global, proyecto, núcleo) +Comment[et]=Plugina skoop (globaalne, projekt, tuum) +Comment[eu]= Pluginaren barrutia (Globala, Projektua, Nukleoa) +Comment[fa]=دامنۀ یک وصله )سراسری، پروژه، هسته( +Comment[fr]= La portée d'un module externe (globale, projet, core) +Comment[ga]= Scóip an bhreiseáin (Comhchoiteann, Tionscadal, Ceartlár) +Comment[gl]=Ámbito da extensión (Global, Proxecto, Núcleo) +Comment[hu]=A modul hatóköre (globális, projektszintű, alap) +Comment[it]=Il contesto di un plugin (Globale, Progetto, Core) +Comment[nds]= Dat Rebeet vun en Moduul (Globaal, Projekt, Karn) +Comment[ne]= प्लगइनको क्षेत्र (विश्वव्यापी, परियोजना, कोर) +Comment[nl]=Het bereik van een plugin (globaal, project, core) +Comment[pl]=Przynależność wtyczki (globalna, projekt, część główna) +Comment[pt]=O âmbito de um 'plugin' (Global, Projecto, Núcleo) +Comment[pt_BR]=O âmbito de um 'plugin' (Global, Projecto, Núcleo) +Comment[ru]=Тип модуля (Global, Project, Core) +Comment[sk]=Rozsah module (globálny, projektový, jadrový) +Comment[sr]=Опсег прикључка (глобални, пројекат, језгро) +Comment[sr@Latn]=Opseg priključka (globalni, projekat, jezgro) +Comment[sv]=Insticksprogrammets omfattning (Global, Projekt, Kärna) +Comment[tr]=Bir eklentinin alanı (Genel, Proje, İç) +Comment[zh_CN]=插件的范围(全局、工程、核心) +Comment[zh_TW]=外掛程式的範圍(全域、專案、核心) +Default= Global + +[PROPS] +Type = value +ValueType=QString +Value= PROPS +Comment= The list of supported TDevelop properties +Comment[ca]= La llista de propietats suportades del TDevelop +Comment[da]= Listen af understøttede TDevelop-egenskaber +Comment[de]= Die Liste der unterstützten TDevelop-Eigenschaften +Comment[el]= Η λίστα των υποστηριζόμενων ιδιοτήτων του TDevelop +Comment[es]=La lista de propiedades de TDevelop soportadas +Comment[et]= TDevelopi toetatud omaduste nimekiri +Comment[eu]= Onartzen diren TDevelop-en propietateen zerrenda +Comment[fa]=فهرست ویژگیهای پشتیبانی‌شدۀ TDevelop +Comment[fr]= La liste des propriétés de TDevelop prises en charge +Comment[ga]= Liosta d'airíonna TDevelop a dtacaítear leo +Comment[gl]=Lista das propiedades de TDevelop soportadas +Comment[hu]=A támogatott TDevelop-tulajdonságok +Comment[it]=Lista delle proprietà supportate da TDevelop +Comment[nds]= De List mit ünnerstütt TDevelop-Egenschappen +Comment[ne]= केडीई विकास समर्थन गर्ने गुणको सूची +Comment[nl]=De lijst met ondersteunde TDevelop-properties +Comment[pl]= Lista obsługiwanych właściwości TDevelopa +Comment[pt]= A lista de propriedades do TDevelop suportadas +Comment[pt_BR]= A lista de propriedades do TDevelop suportadas +Comment[ru]=Список поддерживаемых типов модулей для TDevelop +Comment[sk]=Zoznam podporovaných vlastností TDevelop +Comment[sl]=Seznam podprtih lastnosti TDevelop +Comment[sr]=Листа подржаних TDevelop-ових својстава +Comment[sr@Latn]=Lista podržanih TDevelop-ovih svojstava +Comment[sv]=Listan med egenskaper i TDevelop som stöds +Comment[tr]=Desteklenen TDevelop özellikleri +Comment[zh_CN]=列出支持的 TDevelop 属性 +Comment[zh_TW]=支援的 TDevelop 屬性列表 +Default= + +[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 + +[FILE4] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE5] +Type=install +Source=%{src}/kdevpart-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}/kdevpart_part.cpp +Dest=%{dest}/src/%{APPNAMELC}part.cpp + +[FILE71] +Type=install +EscapeXML=true +Source=%{src}/globalconfigbase.ui +Dest=%{dest}/src/%{APPNAMELC}globalconfigbase.ui + +[FILE711] +Type=install +Source=%{src}/globalconfig.h +Dest=%{dest}/src/%{APPNAMELC}globalconfig.h + +[FILE712] +Type=install +Source=%{src}/globalconfig.cpp +Dest=%{dest}/src/%{APPNAMELC}globalconfig.cpp + +[FILE72] +Type=install +EscapeXML=true +Source=%{src}/projectconfigbase.ui +Dest=%{dest}/src/%{APPNAMELC}projectconfigbase.ui + +[FILE721] +Type=install +Source=%{src}/projectconfig.h +Dest=%{dest}/src/%{APPNAMELC}projectconfig.h + +[FILE722] +Type=install +Source=%{src}/projectconfig.cpp +Dest=%{dest}/src/%{APPNAMELC}projectconfig.cpp + +[FILE8] +Type=install +Source=%{src}/kdevpart_part.h +Dest=%{dest}/src/%{APPNAMELC}part.h + +[FILE9] +Type=install +Source=%{src}/kdevpart_widget.cpp +Dest=%{dest}/src/%{APPNAMELC}widget.cpp + +[FILE10] +Type=install +Source=%{src}/kdevpart_widget.h +Dest=%{dest}/src/%{APPNAMELC}widget.h + +[FILE11] +Type=install +EscapeXML=true +Source=%{src}/kdevpart_part.rc +Dest=%{dest}/src/kdev%{APPNAMELC}.rc + +[FILE12] +Type=install +Source=%{src}/kdevpart.desktop +Dest=%{dest}/src/kdev%{APPNAMELC}.desktop + +[FILE13] +Type=install +Source=%{src}/README.dox +Dest=%{dest}/src/README.dox + +[MSG] +Type=message +Comment=A TDevelop plugin was created in %{dest} +Comment[ca]=Un connector per a TDevelop ha estat creat en %{dest} +Comment[da]=Et TDevelop plugin blev oprettet i %{dest} +Comment[de]=Ein TDevelop-Modul wurde in %{dest} erstellt. +Comment[el]=Ένα πρόσθετο του TDevelop δημιουργήθηκε στο %{dest} +Comment[es]=Un complemento para TDevelop ha sido creado en %{dest} +Comment[et]=TDevelopi plugin loodi asukohta %{dest} +Comment[eu]=TDevelop plugin bat sortu da hemen: %{dest} +Comment[fa]=یک وصلۀ TDevelop در %{dest} ایجاد شد +Comment[fr]=Un module externe pour TDevelop a été créé dans %{dest} +Comment[ga]=Cruthaíodh breiseán TDevelop i %{dest} +Comment[gl]=Creouse unha extensión para TDevelop en %{dest} +Comment[hu]=Létrejött egy TDevelop-bővítőmodul itt: %{dest} +Comment[it]=È stato creato un plugin per TDevelop in %{dest} +Comment[ja]=TDevelop プラグインを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en TDevelop-Moduul opstellt +Comment[ne]=केडीई विकास प्लगइन %{dest} मा सिर्जना गरियो +Comment[nl]=Er is een TDevelop-plugin aangemaakt in %{dest} +Comment[pl]=Wtyczka do TDevelopa została utworzona w %{dest} +Comment[pt]=Foi criado um 'plugin' do TDevelop em %{dest} +Comment[pt_BR]=Foi criado um 'plugin' do TDevelop em %{dest} +Comment[ru]=Модуль TDevelop создан в %{dest} +Comment[sk]=TDevelop modul bol vytvorený v %{dest} +Comment[sl]=Vstavek za TDevelop je bil ustvarjen v %{dest} +Comment[sr]=Прикључак за TDevelop направљен је у %{dest} +Comment[sr@Latn]=Priključak za TDevelop napravljen je u %{dest} +Comment[sv]=Ett insticksprogram för TDevelop skapades i %{dest} +Comment[tr]=Bir TDevelop eklentisi %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了 TDevelop 插件 +Comment[zh_TW]=一個 TDevelop 外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/tdevpart2/tdevpart2.png b/languages/cpp/app_templates/kdevpart2/kdevpart2.png similarity index 100% rename from languages/cpp/app_templates/tdevpart2/tdevpart2.png rename to languages/cpp/app_templates/kdevpart2/kdevpart2.png diff --git a/languages/cpp/app_templates/kdevpart2/kdevpart_part.cpp b/languages/cpp/app_templates/kdevpart2/kdevpart_part.cpp new file mode 100644 index 00000000..aa950c8a --- /dev/null +++ b/languages/cpp/app_templates/kdevpart2/kdevpart_part.cpp @@ -0,0 +1,183 @@ +%{CPP_TEMPLATE} +#include "%{APPNAMELC}part.h" + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "%{APPNAMELC}widget.h" +#include "%{APPNAMELC}globalconfig.h" +#include "%{APPNAMELC}projectconfig.h" + +typedef KDevGenericFactory<%{APPNAME}Part> %{APPNAME}Factory; +KDevPluginInfo data("kdev%{APPNAMELC}"); +K_EXPORT_COMPONENT_FACTORY( libkdev%{APPNAMELC}, %{APPNAME}Factory( data ) ); + +#define GLOBALDOC_OPTIONS 1 +#define PROJECTDOC_OPTIONS 2 + +%{APPNAME}Part::%{APPNAME}Part(TQObject *parent, const char *name, const TQStringList &/*args*/) + : KDevPlugin(&data, parent, name ? name : "%{APPNAME}Part") +{ + setInstance(%{APPNAME}Factory::instance()); + setXMLFile("kdev%{APPNAMELC}.rc"); + + m_widget = new %{APPNAME}Widget(this); + m_widget->setCaption("widget caption"); + m_widget->setIcon(SmallIcon(info()->icon())); + + TQWhatsThis::add(m_widget, i18n("WHAT DOES THIS PART DO?")); + + // now you decide what should happen to the widget. Take a look at kdevcore.h + // or at other plugins how to embed it. + + // if you want to embed your widget as an outputview, simply uncomment + // the following line. + // mainWindow()->embedOutputView( m_widget, "name that should appear", "enter a tooltip" ); + + // if you want to embed your widget as a selectview (at the left), simply uncomment + // the following line. + // mainWindow()->embedSelectView( m_widget, "name that should appear", "enter a tooltip" ); + + // if you want to embed your widget as a selectview (at the right), simply uncomment + // the following line. + // mainWindow()->embedSelectViewRight( m_widget, "name that should appear", "enter a tooltip" ); + + setupActions(); + + m_configProxy = new ConfigWidgetProxy(core()); + m_configProxy->createGlobalConfigPage(i18n("%{APPNAME}"), GLOBALDOC_OPTIONS, info()->icon()); + m_configProxy->createProjectConfigPage(i18n("%{APPNAME}"), PROJECTDOC_OPTIONS, info()->icon()); + connect(m_configProxy, TQT_SIGNAL(insertConfigWidget(const KDialogBase*, TQWidget*, unsigned int )), + this, TQT_SLOT(insertConfigWidget(const KDialogBase*, TQWidget*, unsigned int))); + + connect(core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), + this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *))); + connect(core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened())); + connect(core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed())); + + + TQTimer::singleShot(0, this, TQT_SLOT(init())); +} + +%{APPNAME}Part::~%{APPNAME}Part() +{ +// if you embed a widget, you need to tell the mainwindow when you remove it +// if ( m_widget ) +// { +// mainWindow()->removeView( m_widget ); +// } + delete m_widget; + delete m_configProxy; +} + +void %{APPNAME}Part::init() +{ +// delayed initialization stuff goes here +} + +void %{APPNAME}Part::setupActions() +{ +// create XMLGUI actions here + action = new TDEAction(i18n("&Do Something..."), 0, + this, TQT_SLOT(doSomething()), actionCollection(), "plugin_action" ); + action->setToolTip(i18n("Do something")); + action->setWhatsThis(i18n("Do something

    Describe here what does this action do.")); +} + +void %{APPNAME}Part::insertConfigWidget(const KDialogBase *dlg, TQWidget *page, unsigned int pageNo) +{ +// create configuraton dialogs here + switch (pageNo) + { + case GLOBALDOC_OPTIONS: + { + %{APPNAME}GlobalConfig *w = new %{APPNAME}GlobalConfig(this, page, "global config"); + connect(dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept())); + break; + } + case PROJECTDOC_OPTIONS: + { + %{APPNAME}ProjectConfig *w = new %{APPNAME}ProjectConfig(this, page, "project config"); + connect(dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept())); + break; + } + } +} + +void %{APPNAME}Part::contextMenu(TQPopupMenu *popup, const Context *context) +{ +// put actions into the context menu here + if (context->hasType(Context::EditorContext)) + { + // editor context menu + const EditorContext *econtext = static_cast(context); + + // use context and plug actions here + action->plug(popup); + + // or create menu items on the fly + // int id = -1; + // id = popup->insertItem(i18n("Do Something Here"), + // this, TQT_SLOT(doSomething()) ); + // popup->setWhatsThis(id, i18n("Do something here

    Describe here what does this action do." + } + else if (context->hasType(Context::FileContext)) + { + // file context menu + const FileContext *fcontext = static_cast(context); + + //use context and plug actions here + } + else if (context->hasType(Context::ProjectModelItemContext)) + { + // project tree context menu + const ProjectModelItemContext *pcontext = static_cast(context); + + // use context and plug actions here + } + else if (context->hasType(Context::CodeModelItemContext)) + { + // class tree context menu + const CodeModelItemContext *mcontext = static_cast(context); + + // use context and plug actions here + } + else if (context->hasType(Context::DocumentationContext)) + { + // documentation viewer context menu + const DocumentationContext *dcontext = static_cast(context); + + // use context and plug actions here + } +} + +void %{APPNAME}Part::projectOpened() +{ +// do something when the project is opened +} + +void %{APPNAME}Part::projectClosed() +{ +// do something when the project is closed +} + +void %{APPNAME}Part::doSomething() +{ +// do something useful here instead of showing the message box + KMessageBox::information(m_widget, i18n("This action does nothing."), i18n("%{APPNAME} Plugin")); +} + +#include "%{APPNAMELC}part.moc" diff --git a/languages/cpp/app_templates/kdevpart2/kdevpart_part.h b/languages/cpp/app_templates/kdevpart2/kdevpart_part.h new file mode 100644 index 00000000..9414d448 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart2/kdevpart_part.h @@ -0,0 +1,46 @@ +%{H_TEMPLATE} +#ifndef TDEV%{APPNAMEUC}_H +#define TDEV%{APPNAMEUC}_H + +#include + +#include + +class TQPopupMenu; +class TDEAction; +class KDialogBase; +class Context; +class ConfigWidgetProxy; +class %{APPNAME}Widget; + +/** +Please read the README.dox file for more info about this part +*/ +class %{APPNAME}Part: public KDevPlugin +{ + Q_OBJECT + +public: + %{APPNAME}Part(TQObject *parent, const char *name, const TQStringList &args); + ~%{APPNAME}Part(); + +private slots: + void init(); + + void insertConfigWidget(const KDialogBase *dlg, TQWidget *page, unsigned int pageNo); + void contextMenu(TQPopupMenu *popup, const Context *context); + void projectOpened(); + void projectClosed(); + + void doSomething(); + +private: + void setupActions(); + + TDEAction *action; + + TQGuardedPtr<%{APPNAME}Widget> m_widget; + ConfigWidgetProxy *m_configProxy; +}; + +#endif diff --git a/languages/cpp/app_templates/tdevpart2/tdevpart_part.rc b/languages/cpp/app_templates/kdevpart2/kdevpart_part.rc similarity index 100% rename from languages/cpp/app_templates/tdevpart2/tdevpart_part.rc rename to languages/cpp/app_templates/kdevpart2/kdevpart_part.rc diff --git a/languages/cpp/app_templates/kdevpart2/kdevpart_widget.cpp b/languages/cpp/app_templates/kdevpart2/kdevpart_widget.cpp new file mode 100644 index 00000000..65bb996e --- /dev/null +++ b/languages/cpp/app_templates/kdevpart2/kdevpart_widget.cpp @@ -0,0 +1,21 @@ +%{CPP_TEMPLATE} +#include "%{APPNAMELC}widget.h" + +#include +#include +#include + +#include + +#include "%{APPNAMELC}part.h" + +%{APPNAME}Widget::%{APPNAME}Widget(%{APPNAME}Part *part) + : TQWidget(0, "%{APPNAMELC} widget"), m_part(part) +{ +} + +%{APPNAME}Widget::~%{APPNAME}Widget() +{ +} + +#include "%{APPNAMELC}widget.moc" diff --git a/languages/cpp/app_templates/kdevpart2/kdevpart_widget.h b/languages/cpp/app_templates/kdevpart2/kdevpart_widget.h new file mode 100644 index 00000000..e54abd4d --- /dev/null +++ b/languages/cpp/app_templates/kdevpart2/kdevpart_widget.h @@ -0,0 +1,24 @@ +%{H_TEMPLATE} +#ifndef %{APPNAMEUC}_WIDGET_H +#define %{APPNAMEUC}_WIDGET_H + +#include +#include + +class KDevProject; +class %{APPNAME}Part; + +class %{APPNAME}Widget: public TQWidget +{ + Q_OBJECT + +public: + %{APPNAME}Widget(%{APPNAME}Part *part); + ~%{APPNAME}Widget(); + +private: + %{APPNAME}Part *m_part; +}; + + +#endif diff --git a/languages/cpp/app_templates/tdevpart2/projectconfig.cpp b/languages/cpp/app_templates/kdevpart2/projectconfig.cpp similarity index 100% rename from languages/cpp/app_templates/tdevpart2/projectconfig.cpp rename to languages/cpp/app_templates/kdevpart2/projectconfig.cpp diff --git a/languages/cpp/app_templates/tdevpart2/projectconfig.h b/languages/cpp/app_templates/kdevpart2/projectconfig.h similarity index 100% rename from languages/cpp/app_templates/tdevpart2/projectconfig.h rename to languages/cpp/app_templates/kdevpart2/projectconfig.h diff --git a/languages/cpp/app_templates/tdevpart2/projectconfigbase.ui b/languages/cpp/app_templates/kdevpart2/projectconfigbase.ui similarity index 100% rename from languages/cpp/app_templates/tdevpart2/projectconfigbase.ui rename to languages/cpp/app_templates/kdevpart2/projectconfigbase.ui diff --git a/languages/cpp/app_templates/kdevpart2/src-Makefile.am b/languages/cpp/app_templates/kdevpart2/src-Makefile.am new file mode 100644 index 00000000..c5995af4 --- /dev/null +++ b/languages/cpp/app_templates/kdevpart2/src-Makefile.am @@ -0,0 +1,17 @@ +INCLUDES = -I$(kde_includes)/tdevelop/interfaces -I$(kde_includes)/tdevelop/util $(all_includes) + +kde_module_LTLIBRARIES = libkdev%{APPNAMELC}.la +libkdev%{APPNAMELC}_la_LDFLAGS = -module -avoid-version -no-undefined $(all_libraries) $(KDE_PLUGIN) +libkdev%{APPNAMELC}_la_LIBADD = -ltdevelop +libkdev%{APPNAMELC}_la_SOURCES = %{APPNAMELC}part.cpp %{APPNAMELC}widget.cpp %{APPNAMELC}globalconfigbase.ui %{APPNAMELC}globalconfig.cpp %{APPNAMELC}projectconfigbase.ui %{APPNAMELC}projectconfig.cpp + +METASOURCES = AUTO + +servicedir = $(kde_servicesdir) +service_DATA = kdev%{APPNAMELC}.desktop + +rcdir = $(kde_datadir)/kdev%{APPNAMELC} +rc_DATA = kdev%{APPNAMELC}.rc + +appsharedir = $(kde_datadir)/kdev%{APPNAMELC} +appshare_DATA = diff --git a/languages/cpp/app_templates/tdevpart2/subdirs b/languages/cpp/app_templates/kdevpart2/subdirs similarity index 100% rename from languages/cpp/app_templates/tdevpart2/subdirs rename to languages/cpp/app_templates/kdevpart2/subdirs diff --git a/languages/cpp/app_templates/khello/CMakeLists.txt b/languages/cpp/app_templates/khello/CMakeLists.txt index 3ed5e064..360e792e 100644 --- a/languages/cpp/app_templates/khello/CMakeLists.txt +++ b/languages/cpp/app_templates/khello/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( khello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/khello.tar.gz khello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - khello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + khello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/khello/Makefile.am b/languages/cpp/app_templates/khello/Makefile.am index 49feb06a..56df4792 100644 --- a/languages/cpp/app_templates/khello/Makefile.am +++ b/languages/cpp/app_templates/khello/Makefile.am @@ -4,10 +4,10 @@ dataFiles = src-Makefile.am app.cpp app.h main.cpp appui.rc app.tdevelop \ templateName = khello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/khello/app.tdevelop b/languages/cpp/app_templates/khello/app.tdevelop index 029288aa..9c25500e 100644 --- a/languages/cpp/app_templates/khello/app.tdevelop +++ b/languages/cpp/app_templates/khello/app.tdevelop @@ -13,16 +13,16 @@ TDE - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + src/%{APPNAMELC} debug @@ -47,8 +47,8 @@ -O0 -g3 - - + + @@ -56,8 +56,8 @@ - - + + ada ada_bugs_gcc @@ -92,24 +92,24 @@ qmake User Guide - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/khello/khello.kdevtemplate b/languages/cpp/app_templates/khello/khello.kdevtemplate new file mode 100644 index 00000000..81d20c5a --- /dev/null +++ b/languages/cpp/app_templates/khello/khello.kdevtemplate @@ -0,0 +1,220 @@ +# TDE Config File +[General] +Name=Simple TDE Application +Name[ca]=Una simple aplicació per al TDE +Name[da]=Et simpelt TDE program +Name[de]=Einfache TDE-Anwendung +Name[el]=Απλή εφαρμογή του TDE +Name[es]=Aplicación de TDE sencilla +Name[et]=Lihtne TDE rakendus +Name[eu]=TDE aplikazio simple bat +Name[fa]=کاربرد سادۀ TDE +Name[fr]=Application TDE simple +Name[ga]=Feidhmchlár Simplí TDE +Name[gl]=Aplicación TDE sinxela +Name[hu]=Egyszerű TDE-s alkalmazás +Name[it]=Una semplice applicazione TDE +Name[ja]=簡単な TDE アプリケーション +Name[nds]=Eenfach TDE-Programm +Name[ne]=साधारण केडीई अनुप्रयोग +Name[nl]=Eenvoudige TDE-toepassing +Name[pl]=Prosty program dla TDE +Name[pt]=Aplicação Simples do TDE +Name[pt_BR]=Aplicação Simples do TDE +Name[ru]=Простое приложение TDE +Name[sk]=Jednoduchá TDE aplikácia +Name[sl]=Preprost program za TDE +Name[sr]=Једноставан TDE програм +Name[sr@Latn]=Jednostavan TDE program +Name[sv]=Enkelt TDE-program +Name[tr]=Basit TDE Uygulaması +Name[zh_CN]=简单的 TDE 应用程序 +Name[zh_TW]=簡單的 TDE 應用程式 +Category=C++/TDE +Icon=khello.png +Comment=Generates a simple TDE application with one widget. +Comment[ca]=Genera una simple aplicació per al TDE amb un estri. +Comment[da]=Genererer et simpelt TDE program men en kontrol +Comment[de]=Erstellt eine einfache TDE-Anwendung mit einem Oberflächenelement +Comment[el]=Δημιουργεί μια απλή εφαρμογή TDE με ένα γραφικό συστατικό. +Comment[es]=Genera una sencilla aplicación para TDE con una ventana. +Comment[et]=Lihtsa TDE rakenduse loomine ühe vidinaga. +Comment[eu]=Trepeta bakarra duen TDE aplikazio simple bat sortzen du. +Comment[fa]=یک کاربرد سادۀ TDE با یک عنصر تولید می‌کند. +Comment[fr]=Génère une application TDE simple comprenant un seul élément graphique (widget). +Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí TDE le giuirléid amháin. +Comment[gl]=Xera unha aplicación TDE sinxela con un compoñente. +Comment[hu]=Létrehoz egy egyszerű TDE-s alkalmazást, egy grafikus elemmel. +Comment[it]=Genera una semplice applicazione TDE senza elementi grafici. +Comment[ja]=ウィジェットを一つ含んだ簡単な TDE アプリケーションを作成します。 +Comment[nds]=Stellt en eenfach TDE-Programm mit een Element op. +Comment[ne]=एउटा विगेटसँग साधारण केडीई अनुप्रयोग उत्पन्न गर्दछ । +Comment[nl]=Genereert een eenvoudige TDE-toepassing met één widget. +Comment[pl]=Generuje prosty program dla TDE z jednym widgetem. +Comment[pt]=Gera uma aplicação simples para o TDE com uma janela. +Comment[pt_BR]=Gera uma aplicação simples para o TDE com uma janela. +Comment[ru]=Создание простого приложения TDE с одним окном. +Comment[sk]=Vygeneruje jednoduchú TDE aplikáciu s jedným oknom. +Comment[sl]=Ustvari preprost program za TDE z enim gradnikom. +Comment[sr]=Прави једноставан TDE програм са једном контролом. +Comment[sr@Latn]=Pravi jednostavan TDE program sa jednom kontrolom. +Comment[sv]=Skapar ett enkelt TDE-program med en grafisk komponent. +Comment[tr]=Tek parçacıklı basit bir TDE uygulaması yaratır. +Comment[zh_CN]=生成只有一个部件的 TDE 应用程序。 +Comment[zh_TW]=產生一個簡單的 TDE 應用程式,內含一個元件 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=khello.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/po + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE9] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[MkDir4] +Type=mkdir +Dir=%{dest}/src + +[FILE10] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[FILE11] +Type=install +Source=%{tdevelop}/template-common/hi16-app-app.png +Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png +Process=false + +[FILE12] +Type=install +Source=%{tdevelop}/template-common/hi32-app-app.png +Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png +Process=false + +[FILE13] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE14] +Type=install +Source=%{src}/app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE15] +Type=install +Source=%{src}/app.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE16] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/main.cpp + +[FILE17] +Type=install +EscapeXML=true +Source=%{src}/appui.rc +Dest=%{dest}/src/%{APPNAMELC}ui.rc + +[FILE18] +Type=install +Source=%{src}/app.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[MSG] +Type=message +Comment=A TDE Hello world program was created in %{dest} +Comment[ca]=Un programa de Hello world per al TDE ha estat creat en %{dest} +Comment[da]=Et TDE Goddag verden program blev oprettet i %{dest} +Comment[de]=Ein TDE-"Hello World"-Programm wurde in %{dest} erstellt. +Comment[el]=Ένα πρόγραμμα Γεια σου Κόσμε του TDE δημιουργήθηκε στο %{dest} +Comment[es]=Un programa «Hola mundo» para TDE ha sido creado en %{dest} +Comment[et]=TDE "Tere, maailm" programm loodi asukohta %{dest} +Comment[eu]=TDE-ren "Kaixo mundua" programa bat sortu da hemen: %{dest} +Comment[fa]=یک برنامۀ TDE Hello world در %{dest} ایجاد شد +Comment[fr]=Un programme TDE « Bonjour monde » a été créé dans %{dest} +Comment[ga]=Cruthaíodh ríomhchlár "Hello World" TDE i %{dest} +Comment[gl]=Creouse un programa TDE Ola mundo en %{dest} +Comment[hu]=Létrejött egy TDE Hello world program itt: %{dest} +Comment[it]=È stato creato un semplice programma TDE di "Hello world" in %{dest} +Comment[ja]=TDE Hello world プログラムを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en "Moin Welt"-Programm för TDE opstellt +Comment[ne]=केडीई हेल्लो वोल्ड कार्यक्रम %{dest} मा सिर्जना गरियो +Comment[nl]=Een TDE Hello World-programma is aangemaakt in %{dest} +Comment[pl]=Program 'Witaj świecie' dla TDE został utworzony w %{dest} +Comment[pt]=Foi criado um programa Olá Mundo do TDE em %{dest} +Comment[pt_BR]=Foi criado um programa Olá Mundo do TDE em %{dest} +Comment[ru]=Приложение TDE Hello world создано в %{dest} +Comment[sk]=TDE Ahoj svet program bol vytvorený v %{dest} +Comment[sl]=Program Hello World za TDE je bil ustvarjen v %{dest} +Comment[sr]=TDE „Здраво свете“ програм направљен је у %{dest} +Comment[sr@Latn]=TDE „Zdravo svete“ program napravljen je u %{dest} +Comment[sv]=Ett TDE Hello world-program skapades i %{dest} +Comment[tr]=Bir TDE Merhaba Dünya programı %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了 TDE Hello world 程序 +Comment[zh_TW]=一個 TDE Hello World 程式已建立於 %{dest} + diff --git a/languages/cpp/app_templates/khello/khello.tdevtemplate b/languages/cpp/app_templates/khello/khello.tdevtemplate deleted file mode 100644 index 2bce3511..00000000 --- a/languages/cpp/app_templates/khello/khello.tdevtemplate +++ /dev/null @@ -1,220 +0,0 @@ -# TDE Config File -[General] -Name=Simple TDE Application -Name[ca]=Una simple aplicació per al TDE -Name[da]=Et simpelt TDE program -Name[de]=Einfache TDE-Anwendung -Name[el]=Απλή εφαρμογή του TDE -Name[es]=Aplicación de TDE sencilla -Name[et]=Lihtne TDE rakendus -Name[eu]=TDE aplikazio simple bat -Name[fa]=کاربرد سادۀ TDE -Name[fr]=Application TDE simple -Name[ga]=Feidhmchlár Simplí TDE -Name[gl]=Aplicación TDE sinxela -Name[hu]=Egyszerű TDE-s alkalmazás -Name[it]=Una semplice applicazione TDE -Name[ja]=簡単な TDE アプリケーション -Name[nds]=Eenfach TDE-Programm -Name[ne]=साधारण केडीई अनुप्रयोग -Name[nl]=Eenvoudige TDE-toepassing -Name[pl]=Prosty program dla TDE -Name[pt]=Aplicação Simples do TDE -Name[pt_BR]=Aplicação Simples do TDE -Name[ru]=Простое приложение TDE -Name[sk]=Jednoduchá TDE aplikácia -Name[sl]=Preprost program za TDE -Name[sr]=Једноставан TDE програм -Name[sr@Latn]=Jednostavan TDE program -Name[sv]=Enkelt TDE-program -Name[tr]=Basit TDE Uygulaması -Name[zh_CN]=简单的 TDE 应用程序 -Name[zh_TW]=簡單的 TDE 應用程式 -Category=C++/TDE -Icon=khello.png -Comment=Generates a simple TDE application with one widget. -Comment[ca]=Genera una simple aplicació per al TDE amb un estri. -Comment[da]=Genererer et simpelt TDE program men en kontrol -Comment[de]=Erstellt eine einfache TDE-Anwendung mit einem Oberflächenelement -Comment[el]=Δημιουργεί μια απλή εφαρμογή TDE με ένα γραφικό συστατικό. -Comment[es]=Genera una sencilla aplicación para TDE con una ventana. -Comment[et]=Lihtsa TDE rakenduse loomine ühe vidinaga. -Comment[eu]=Trepeta bakarra duen TDE aplikazio simple bat sortzen du. -Comment[fa]=یک کاربرد سادۀ TDE با یک عنصر تولید می‌کند. -Comment[fr]=Génère une application TDE simple comprenant un seul élément graphique (widget). -Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí TDE le giuirléid amháin. -Comment[gl]=Xera unha aplicación TDE sinxela con un compoñente. -Comment[hu]=Létrehoz egy egyszerű TDE-s alkalmazást, egy grafikus elemmel. -Comment[it]=Genera una semplice applicazione TDE senza elementi grafici. -Comment[ja]=ウィジェットを一つ含んだ簡単な TDE アプリケーションを作成します。 -Comment[nds]=Stellt en eenfach TDE-Programm mit een Element op. -Comment[ne]=एउटा विगेटसँग साधारण केडीई अनुप्रयोग उत्पन्न गर्दछ । -Comment[nl]=Genereert een eenvoudige TDE-toepassing met één widget. -Comment[pl]=Generuje prosty program dla TDE z jednym widgetem. -Comment[pt]=Gera uma aplicação simples para o TDE com uma janela. -Comment[pt_BR]=Gera uma aplicação simples para o TDE com uma janela. -Comment[ru]=Создание простого приложения TDE с одним окном. -Comment[sk]=Vygeneruje jednoduchú TDE aplikáciu s jedným oknom. -Comment[sl]=Ustvari preprost program za TDE z enim gradnikom. -Comment[sr]=Прави једноставан TDE програм са једном контролом. -Comment[sr@Latn]=Pravi jednostavan TDE program sa jednom kontrolom. -Comment[sv]=Skapar ett enkelt TDE-program med en grafisk komponent. -Comment[tr]=Tek parçacıklı basit bir TDE uygulaması yaratır. -Comment[zh_CN]=生成只有一个部件的 TDE 应用程序。 -Comment[zh_TW]=產生一個簡單的 TDE 應用程式,內含一個元件 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=khello.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/po - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE9] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[MkDir4] -Type=mkdir -Dir=%{dest}/src - -[FILE10] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[FILE11] -Type=install -Source=%{tdevelop}/template-common/hi16-app-app.png -Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png -Process=false - -[FILE12] -Type=install -Source=%{tdevelop}/template-common/hi32-app-app.png -Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png -Process=false - -[FILE13] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE14] -Type=install -Source=%{src}/app.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE15] -Type=install -Source=%{src}/app.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE16] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/main.cpp - -[FILE17] -Type=install -EscapeXML=true -Source=%{src}/appui.rc -Dest=%{dest}/src/%{APPNAMELC}ui.rc - -[FILE18] -Type=install -Source=%{src}/app.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[MSG] -Type=message -Comment=A TDE Hello world program was created in %{dest} -Comment[ca]=Un programa de Hello world per al TDE ha estat creat en %{dest} -Comment[da]=Et TDE Goddag verden program blev oprettet i %{dest} -Comment[de]=Ein TDE-"Hello World"-Programm wurde in %{dest} erstellt. -Comment[el]=Ένα πρόγραμμα Γεια σου Κόσμε του TDE δημιουργήθηκε στο %{dest} -Comment[es]=Un programa «Hola mundo» para TDE ha sido creado en %{dest} -Comment[et]=TDE "Tere, maailm" programm loodi asukohta %{dest} -Comment[eu]=TDE-ren "Kaixo mundua" programa bat sortu da hemen: %{dest} -Comment[fa]=یک برنامۀ TDE Hello world در %{dest} ایجاد شد -Comment[fr]=Un programme TDE « Bonjour monde » a été créé dans %{dest} -Comment[ga]=Cruthaíodh ríomhchlár "Hello World" TDE i %{dest} -Comment[gl]=Creouse un programa TDE Ola mundo en %{dest} -Comment[hu]=Létrejött egy TDE Hello world program itt: %{dest} -Comment[it]=È stato creato un semplice programma TDE di "Hello world" in %{dest} -Comment[ja]=TDE Hello world プログラムを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en "Moin Welt"-Programm för TDE opstellt -Comment[ne]=केडीई हेल्लो वोल्ड कार्यक्रम %{dest} मा सिर्जना गरियो -Comment[nl]=Een TDE Hello World-programma is aangemaakt in %{dest} -Comment[pl]=Program 'Witaj świecie' dla TDE został utworzony w %{dest} -Comment[pt]=Foi criado um programa Olá Mundo do TDE em %{dest} -Comment[pt_BR]=Foi criado um programa Olá Mundo do TDE em %{dest} -Comment[ru]=Приложение TDE Hello world создано в %{dest} -Comment[sk]=TDE Ahoj svet program bol vytvorený v %{dest} -Comment[sl]=Program Hello World za TDE je bil ustvarjen v %{dest} -Comment[sr]=TDE „Здраво свете“ програм направљен је у %{dest} -Comment[sr@Latn]=TDE „Zdravo svete“ program napravljen je u %{dest} -Comment[sv]=Ett TDE Hello world-program skapades i %{dest} -Comment[tr]=Bir TDE Merhaba Dünya programı %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了 TDE Hello world 程序 -Comment[zh_TW]=一個 TDE Hello World 程式已建立於 %{dest} - diff --git a/languages/cpp/app_templates/khello2/CMakeLists.txt b/languages/cpp/app_templates/khello2/CMakeLists.txt index 151fb079..8e9fdb9d 100644 --- a/languages/cpp/app_templates/khello2/CMakeLists.txt +++ b/languages/cpp/app_templates/khello2/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( khello2.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/khello2.tar.gz khello2.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - khello2.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + khello2.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/khello2/Makefile.am b/languages/cpp/app_templates/khello2/Makefile.am index 96774e3b..14445170 100644 --- a/languages/cpp/app_templates/khello2/Makefile.am +++ b/languages/cpp/app_templates/khello2/Makefile.am @@ -4,10 +4,10 @@ dataFiles = src-Makefile.am app.cpp app.h main.cpp appui.rc app.tdevelop \ templateName = khello2 ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/khello2/app.tdevelop b/languages/cpp/app_templates/khello2/app.tdevelop index b51226ee..a079670d 100644 --- a/languages/cpp/app_templates/khello2/app.tdevelop +++ b/languages/cpp/app_templates/khello2/app.tdevelop @@ -13,16 +13,16 @@ TDE - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + src/%{APPNAMELC} debug @@ -47,8 +47,8 @@ -O0 -g3 - - + + @@ -56,8 +56,8 @@ - - + + ada ada_bugs_gcc @@ -92,24 +92,24 @@ qmake User Guide - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/khello2/khello2.kdevtemplate b/languages/cpp/app_templates/khello2/khello2.kdevtemplate new file mode 100644 index 00000000..b85e11fb --- /dev/null +++ b/languages/cpp/app_templates/khello2/khello2.kdevtemplate @@ -0,0 +1,230 @@ +# TDE Config File +[General] +Name=Simple Designer based TDE Application +Name[ca]=Simple aplicació per al TDE basada en el dissenyador +Name[da]=Simpelt Designer-baseret TDE program +Name[de]=Einfache, auf Designer basierende TDE-Anwendung +Name[el]=Απλή εφαρμογή TDE βασισμένη στο σχεδιαστή +Name[es]=Aplicación para TDE sencilla basada en el diseñador +Name[et]=Lihtne TDE rakendus Disaineri põhjal +Name[eu]=Designer-en oinarritutako TDE aplikazio simple bat +Name[fa]=کاربرد TDE بر مبنای طراح ساده +Name[fr]=Application TDE simple basée sur Designer +Name[gl]=Aplicación TDE sinxela baseada no deseñador +Name[hu]=Egyszerű Qt Designer-alapú TDE-s alkalmazás +Name[it]=Una semplice applicazione TDE basata su designer +Name[ja]=Designer ベースの簡単な TDE アプリケーション +Name[nds]=Eenfach, op "Designer" opbuut TDE-Programm +Name[ne]=साधारण डिजाइनरमा आधारित केडीई अनुप्रयोग +Name[nl]=Eenvoudige Designer-gebaseerde TDE-toepassing +Name[pl]=Prosty program dla TDE wykonany w Designerze +Name[pt]=Aplicação Simples do TDE baseada no Qt Designer +Name[pt_BR]=Aplicação Simples do TDE baseada no Qt Designer +Name[ru]=Простое приложение TDE с формой +Name[sk]=Jednoduchý dizajnér založený na TDE aplikácii +Name[sr]=Једноставан TDE програм на основу Designer-а +Name[sr@Latn]=Jednostavan TDE program na osnovu Designer-a +Name[sv]=Enkelt TDE-program baserat på Designer +Name[tr]=Basit Designer tabanlı TDE Uygulaması +Name[zh_CN]=基于设计师的简单 TDE 应用程序 +Name[zh_TW]=簡單的設計器 TDE 應用程式 +Category=C++/TDE +Icon=khello2.png +Comment=Generates a simple TDE application with one Qt-designer based widget. +Comment[ca]=Genera una simple aplicació per al TDE basada en el dissenyador de Qt. +Comment[da]=Genererer et simpelt TDE program med en Qt-designer baseret kontrol. +Comment[de]=Erstellt eine einfache TDE-Anwendung mit einem auf Qt-Designer basierenden Widget. +Comment[el]=Δημιουργεί μια απλή εφαρμογή TDE με ένα γραφικό συστατικό βασισμένο στο σχεδιαστή Qt. +Comment[es]=Genera una sencilla aplicación para TDE con una ventana basada en Qt-designer. +Comment[et]=Lihtsa TDE rakenduse loomine ühe vidinaga Qt Disaineri põhjal. +Comment[eu]=Qt Designer-en oinarritutako trepeta bat duen TDE aplikazio sinple bat sortzen du. +Comment[fa]=یک کاربرد سادۀ TDE با یک عنصر مبنای طراح Qt تولید می‌کند. +Comment[fr]=Génère une application TDE simple comprenant un seul élément graphique (widget) basé sur Qt-designer. +Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí TDE le giuirléid amháin bunaithe ar Qt-Designer +Comment[gl]=Xera unha aplicación TDE sinxela cunha compoñente baseada en Qt-designer. +Comment[hu]=Létrehoz egy egyszerű TDE-s alkalmazást, mely egy Qt Designerrel készített grafikus elemre épül. +Comment[it]=Genera una semplice applicazione TDE con un elemento grafico basato su Qt-designer. +Comment[nds]=Stellt en eenfach TDE-Programm mit een op Qt-Designer opbuut Element op. +Comment[ne]=क्यू टी डिजाइनरमा आधारित विगेटसँग साधारण केडीई अनुप्रयोग उत्पन्न गर्दछ । +Comment[nl]=Genereert een eenvoudige TDE-toepassing met één Qt-Designer-gebaseerde widget. +Comment[pl]=Generuje prosty program dla TDE z jednym widgetem pochodzącym z Qt Designera. +Comment[pt]=Gera uma aplicação simples do TDE com uma interface baseada no Qt-designer. +Comment[pt_BR]=Gera uma aplicação simples do TDE com uma interface baseada no Qt-designer. +Comment[ru]=Создание простого приложения TDE с формой, созданной в Qt Designer. +Comment[sk]=Vygeneruje jednoduchú TDE aplikáciu s jedným oknom Qt dizajnéra. +Comment[sr]=Прави једноставан TDE програма са једном контролом на основу Qt-Designer-а. +Comment[sr@Latn]=Pravi jednostavan TDE programa sa jednom kontrolom na osnovu Qt-Designer-a. +Comment[sv]=Skapar ett enkelt TDE-program med en grafisk komponent baserad på Qt-Designer. +Comment[tr]=Qt-designer tabanlı bir parçacığı olan basit bir TDE uygulaması yaratır. +Comment[zh_CN]=生成一个带一个基于 Qt 设计师部件的简单 TDE 应用程序。 +Comment[zh_TW]=產生一個簡單的 TDE 應用程式,內含 Qt 設計器的元件 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=khello2.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/po + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE9] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[MkDir4] +Type=mkdir +Dir=%{dest}/src + +[FILE10] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[FILE11] +Type=install +Source=%{tdevelop}/template-common/hi16-app-app.png +Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png +Process=false + +[FILE12] +Type=install +Source=%{tdevelop}/template-common/hi32-app-app.png +Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png +Process=false + +[FILE13] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE14] +Type=install +Source=%{src}/app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE15] +Type=install +Source=%{src}/app.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE16] +Type=install +Source=%{src}/widget.cpp +Dest=%{dest}/src/%{APPNAMELC}widget.cpp + +[FILE17] +Type=install +Source=%{src}/widget.h +Dest=%{dest}/src/%{APPNAMELC}widget.h + +[FILE18] +Type=install +EscapeXML=true +Source=%{src}/widgetbase.ui +Dest=%{dest}/src/%{APPNAMELC}widgetbase.ui + +[FILE19] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/main.cpp + +[FILE20] +Type=install +EscapeXML=true +Source=%{src}/appui.rc +Dest=%{dest}/src/%{APPNAMELC}ui.rc + +[FILE21] +Type=install +Source=%{src}/app.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[MSG] +Type=message +Comment=A simple designer based TDE application was created in %{dest} +Comment[ca]=A simple aplicació per al TDE basada en el dissenyador ha estat creada en %{dest} +Comment[da]=Et simpelt designer-baseret TDE program blev oprettet i %{dest} +Comment[de]=Eine einfache, auf Designer basierende TDE-Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια απλή εφαρμογή TDE βασισμένη στο σχεδιαστή δημιουργήθηκε στο %{dest} +Comment[es]=Una sencilla aplicación para TDE basada en el diseñador ha sido creada en %{dest} +Comment[et]=Lihtne TDE rakendus Disaineri põhjal loodi asukohta %{dest} +Comment[eu]=Designer-en oinarritutako TDE aplikazio simple bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد ساده‌ای بر مبنای طراح در %{dest} ایجاد شد +Comment[fr]=Une application TDE simple basée sur Designer a été créée dans %{dest} +Comment[ga]=Cruthaíodh feidhmchlár simplí TDE bunaithe ar Qt-Designer i %{dest} +Comment[gl]=Creouse unha aplicación TDE baseada no deseñador en %{dest} +Comment[hu]=Létrejött egy egyszerű, Qt Designer-alapú TDE-s alkalmazás itt: %{dest} +Comment[it]=È stata creata una semplice applicazione TDE basata su designer +Comment[ja]=Designer ベースの簡単な TDE アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en eenfach op "Designer" opbuut TDE-Programm opstellt +Comment[ne]=साधारण डिजाइनरमा आधारित केडीई अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een eenvoudige Designer-gebaseerde TDE-toepassing is aangemaakt in %{dest} +Comment[pl]=Prosty program wykorzystujący Qt Designera został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação simples do TDE em %{dest} +Comment[pt_BR]=Foi criada uma aplicação simples do TDE em %{dest} +Comment[ru]=Простое приложение TDE с формой создано в %{dest} +Comment[sk]=Jednoduchý dizajnér založený na TDE aplikácii bol vytvorený v %{dest} +Comment[sr]=Једноставан TDE програм на основу Designer-а направљен је у %{dest} +Comment[sr@Latn]=Jednostavan TDE program na osnovu Designer-a napravljen je u %{dest} +Comment[sv]=Ett enkelt TDE-program baserat på Designer skapades i %{dest} +Comment[tr]=Designer tabanlı basit bir TDE uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个基于设计师的简单 TDE 应用程序 +Comment[zh_TW]=一個簡單的設計器 TDE 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/khello2/khello2.tdevtemplate b/languages/cpp/app_templates/khello2/khello2.tdevtemplate deleted file mode 100644 index 66666212..00000000 --- a/languages/cpp/app_templates/khello2/khello2.tdevtemplate +++ /dev/null @@ -1,230 +0,0 @@ -# TDE Config File -[General] -Name=Simple Designer based TDE Application -Name[ca]=Simple aplicació per al TDE basada en el dissenyador -Name[da]=Simpelt Designer-baseret TDE program -Name[de]=Einfache, auf Designer basierende TDE-Anwendung -Name[el]=Απλή εφαρμογή TDE βασισμένη στο σχεδιαστή -Name[es]=Aplicación para TDE sencilla basada en el diseñador -Name[et]=Lihtne TDE rakendus Disaineri põhjal -Name[eu]=Designer-en oinarritutako TDE aplikazio simple bat -Name[fa]=کاربرد TDE بر مبنای طراح ساده -Name[fr]=Application TDE simple basée sur Designer -Name[gl]=Aplicación TDE sinxela baseada no deseñador -Name[hu]=Egyszerű Qt Designer-alapú TDE-s alkalmazás -Name[it]=Una semplice applicazione TDE basata su designer -Name[ja]=Designer ベースの簡単な TDE アプリケーション -Name[nds]=Eenfach, op "Designer" opbuut TDE-Programm -Name[ne]=साधारण डिजाइनरमा आधारित केडीई अनुप्रयोग -Name[nl]=Eenvoudige Designer-gebaseerde TDE-toepassing -Name[pl]=Prosty program dla TDE wykonany w Designerze -Name[pt]=Aplicação Simples do TDE baseada no Qt Designer -Name[pt_BR]=Aplicação Simples do TDE baseada no Qt Designer -Name[ru]=Простое приложение TDE с формой -Name[sk]=Jednoduchý dizajnér založený na TDE aplikácii -Name[sr]=Једноставан TDE програм на основу Designer-а -Name[sr@Latn]=Jednostavan TDE program na osnovu Designer-a -Name[sv]=Enkelt TDE-program baserat på Designer -Name[tr]=Basit Designer tabanlı TDE Uygulaması -Name[zh_CN]=基于设计师的简单 TDE 应用程序 -Name[zh_TW]=簡單的設計器 TDE 應用程式 -Category=C++/TDE -Icon=khello2.png -Comment=Generates a simple TDE application with one Qt-designer based widget. -Comment[ca]=Genera una simple aplicació per al TDE basada en el dissenyador de Qt. -Comment[da]=Genererer et simpelt TDE program med en Qt-designer baseret kontrol. -Comment[de]=Erstellt eine einfache TDE-Anwendung mit einem auf Qt-Designer basierenden Widget. -Comment[el]=Δημιουργεί μια απλή εφαρμογή TDE με ένα γραφικό συστατικό βασισμένο στο σχεδιαστή Qt. -Comment[es]=Genera una sencilla aplicación para TDE con una ventana basada en Qt-designer. -Comment[et]=Lihtsa TDE rakenduse loomine ühe vidinaga Qt Disaineri põhjal. -Comment[eu]=Qt Designer-en oinarritutako trepeta bat duen TDE aplikazio sinple bat sortzen du. -Comment[fa]=یک کاربرد سادۀ TDE با یک عنصر مبنای طراح Qt تولید می‌کند. -Comment[fr]=Génère une application TDE simple comprenant un seul élément graphique (widget) basé sur Qt-designer. -Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí TDE le giuirléid amháin bunaithe ar Qt-Designer -Comment[gl]=Xera unha aplicación TDE sinxela cunha compoñente baseada en Qt-designer. -Comment[hu]=Létrehoz egy egyszerű TDE-s alkalmazást, mely egy Qt Designerrel készített grafikus elemre épül. -Comment[it]=Genera una semplice applicazione TDE con un elemento grafico basato su Qt-designer. -Comment[nds]=Stellt en eenfach TDE-Programm mit een op Qt-Designer opbuut Element op. -Comment[ne]=क्यू टी डिजाइनरमा आधारित विगेटसँग साधारण केडीई अनुप्रयोग उत्पन्न गर्दछ । -Comment[nl]=Genereert een eenvoudige TDE-toepassing met één Qt-Designer-gebaseerde widget. -Comment[pl]=Generuje prosty program dla TDE z jednym widgetem pochodzącym z Qt Designera. -Comment[pt]=Gera uma aplicação simples do TDE com uma interface baseada no Qt-designer. -Comment[pt_BR]=Gera uma aplicação simples do TDE com uma interface baseada no Qt-designer. -Comment[ru]=Создание простого приложения TDE с формой, созданной в Qt Designer. -Comment[sk]=Vygeneruje jednoduchú TDE aplikáciu s jedným oknom Qt dizajnéra. -Comment[sr]=Прави једноставан TDE програма са једном контролом на основу Qt-Designer-а. -Comment[sr@Latn]=Pravi jednostavan TDE programa sa jednom kontrolom na osnovu Qt-Designer-a. -Comment[sv]=Skapar ett enkelt TDE-program med en grafisk komponent baserad på Qt-Designer. -Comment[tr]=Qt-designer tabanlı bir parçacığı olan basit bir TDE uygulaması yaratır. -Comment[zh_CN]=生成一个带一个基于 Qt 设计师部件的简单 TDE 应用程序。 -Comment[zh_TW]=產生一個簡單的 TDE 應用程式,內含 Qt 設計器的元件 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=khello2.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/po - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE9] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[MkDir4] -Type=mkdir -Dir=%{dest}/src - -[FILE10] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[FILE11] -Type=install -Source=%{tdevelop}/template-common/hi16-app-app.png -Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png -Process=false - -[FILE12] -Type=install -Source=%{tdevelop}/template-common/hi32-app-app.png -Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png -Process=false - -[FILE13] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE14] -Type=install -Source=%{src}/app.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE15] -Type=install -Source=%{src}/app.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE16] -Type=install -Source=%{src}/widget.cpp -Dest=%{dest}/src/%{APPNAMELC}widget.cpp - -[FILE17] -Type=install -Source=%{src}/widget.h -Dest=%{dest}/src/%{APPNAMELC}widget.h - -[FILE18] -Type=install -EscapeXML=true -Source=%{src}/widgetbase.ui -Dest=%{dest}/src/%{APPNAMELC}widgetbase.ui - -[FILE19] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/main.cpp - -[FILE20] -Type=install -EscapeXML=true -Source=%{src}/appui.rc -Dest=%{dest}/src/%{APPNAMELC}ui.rc - -[FILE21] -Type=install -Source=%{src}/app.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[MSG] -Type=message -Comment=A simple designer based TDE application was created in %{dest} -Comment[ca]=A simple aplicació per al TDE basada en el dissenyador ha estat creada en %{dest} -Comment[da]=Et simpelt designer-baseret TDE program blev oprettet i %{dest} -Comment[de]=Eine einfache, auf Designer basierende TDE-Anwendung wurde in %{dest} erstellt. -Comment[el]=Μια απλή εφαρμογή TDE βασισμένη στο σχεδιαστή δημιουργήθηκε στο %{dest} -Comment[es]=Una sencilla aplicación para TDE basada en el diseñador ha sido creada en %{dest} -Comment[et]=Lihtne TDE rakendus Disaineri põhjal loodi asukohta %{dest} -Comment[eu]=Designer-en oinarritutako TDE aplikazio simple bat sortu da hemen: %{dest} -Comment[fa]=یک کاربرد ساده‌ای بر مبنای طراح در %{dest} ایجاد شد -Comment[fr]=Une application TDE simple basée sur Designer a été créée dans %{dest} -Comment[ga]=Cruthaíodh feidhmchlár simplí TDE bunaithe ar Qt-Designer i %{dest} -Comment[gl]=Creouse unha aplicación TDE baseada no deseñador en %{dest} -Comment[hu]=Létrejött egy egyszerű, Qt Designer-alapú TDE-s alkalmazás itt: %{dest} -Comment[it]=È stata creata una semplice applicazione TDE basata su designer -Comment[ja]=Designer ベースの簡単な TDE アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en eenfach op "Designer" opbuut TDE-Programm opstellt -Comment[ne]=साधारण डिजाइनरमा आधारित केडीई अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een eenvoudige Designer-gebaseerde TDE-toepassing is aangemaakt in %{dest} -Comment[pl]=Prosty program wykorzystujący Qt Designera został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação simples do TDE em %{dest} -Comment[pt_BR]=Foi criada uma aplicação simples do TDE em %{dest} -Comment[ru]=Простое приложение TDE с формой создано в %{dest} -Comment[sk]=Jednoduchý dizajnér založený na TDE aplikácii bol vytvorený v %{dest} -Comment[sr]=Једноставан TDE програм на основу Designer-а направљен је у %{dest} -Comment[sr@Latn]=Jednostavan TDE program na osnovu Designer-a napravljen je u %{dest} -Comment[sv]=Ett enkelt TDE-program baserat på Designer skapades i %{dest} -Comment[tr]=Designer tabanlı basit bir TDE uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个基于设计师的简单 TDE 应用程序 -Comment[zh_TW]=一個簡單的設計器 TDE 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kicker/CMakeLists.txt b/languages/cpp/app_templates/kicker/CMakeLists.txt index fba98f58..c1a1d7d5 100644 --- a/languages/cpp/app_templates/kicker/CMakeLists.txt +++ b/languages/cpp/app_templates/kicker/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( kicker.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kicker.tar.gz kicker.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - kicker.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + kicker.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kicker/Makefile.am b/languages/cpp/app_templates/kicker/Makefile.am index 254e5917..82095d72 100644 --- a/languages/cpp/app_templates/kicker/Makefile.am +++ b/languages/cpp/app_templates/kicker/Makefile.am @@ -3,10 +3,10 @@ dataFiles = applet.cpp applet.h applet.desktop applet.tdevelop \ templateName = kicker ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/kicker/applet.tdevelop b/languages/cpp/app_templates/kicker/applet.tdevelop index 88bf952d..929b3c49 100644 --- a/languages/cpp/app_templates/kicker/applet.tdevelop +++ b/languages/cpp/app_templates/kicker/applet.tdevelop @@ -14,16 +14,16 @@ Kicker - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + src/lib%{APPNAMELC}.la debug @@ -45,8 +45,8 @@ -O0 -g3 - - + + @@ -54,8 +54,8 @@ - - + + ada ada_bugs_gcc @@ -92,24 +92,24 @@ qmake User Guide - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/kicker/kicker.kdevtemplate b/languages/cpp/app_templates/kicker/kicker.kdevtemplate new file mode 100644 index 00000000..5185eb20 --- /dev/null +++ b/languages/cpp/app_templates/kicker/kicker.kdevtemplate @@ -0,0 +1,193 @@ +[General] +Name=Kicker Applet +Name[br]=Arloadig Kicker +Name[ca]=Una miniaplicació per a Kicker +Name[da]=Kicker-applet +Name[de]=Kicker-Miniprogramm +Name[el]=Μικροεφαρμογή Kicker +Name[es]=Applet para Kicker +Name[et]=Kickeri aplett +Name[eu]=Kicker applet-a +Name[fa]=برنامک Kicker +Name[fr]=Applet Kicker +Name[ga]=Feidhmchláirín Kicker +Name[gl]=Applet para Kicker +Name[hu]=Panel-kisalkalmazás +Name[it]=Applet di kicker +Name[ja]=Kicker アプレット +Name[nds]=Kicker-Lüttprogramm +Name[ne]=किकर एप्लेट +Name[nl]=Kicker-applet +Name[pl]=Aplet panelu +Name[pt]='Applet' do Kicker +Name[pt_BR]='Applet' do Kicker +Name[ru]=Аплет панели TDE +Name[sk]=Kicker applet +Name[sl]=Vstavek za Kicker +Name[sr]=Аплет за Kicker +Name[sr@Latn]=Aplet za Kicker +Name[sv]=Miniprogram för Kicker +Name[tr]=Kicker Küçük Uygulaması +Name[zh_CN]=Kicker 小程序 +Name[zh_TW]=Kicker 小程式 +Icon=kicker.png +Category=C++/TDE +Comment=Generates a framework for an applet that embeds into the TDE panel +Comment[ca]=Genera una infraestructura per a una miniaplicació encastada en el plafó de TDE +Comment[da]=Genererer et skelet for en applet der indlejres i TDE's panel +Comment[de]=Erstellt das Grundgerüst für ein Miniprogramm, das in die TDE-Kontrollleiste eingebettet wird. +Comment[el]=Δημιουργεί ένα πλαίσιο για μία μικροεφαρμογή που ενσωματώνεται στον πίνακα του TDE +Comment[es]=Genera una infraestructura para un applet empotrado en el panel de TDE +Comment[et]=Apleti raamistiku loomine, mida saab põimida TDE paneelile +Comment[eu]=TDE-ren panelean kapsulatzen den applet baten lan-marko bat sortzen du +Comment[fa]=چارچوبی برای برنامک نهفته‌شده در تابلوی TDEتولید می‌کند +Comment[fr]=Génère une infrastructure pour un applet qui s'intègre dans le tableau de bord de TDE +Comment[gl]=Xera un contorno de traballo para un applet que se incrusta no panel de TDE. +Comment[hu]=Létrehoz egy keretprogramot TDE-s panel-kisalkalmazás készítéséhez +Comment[it]=Genera l'infrastruttura per un'applet che si integra nel pannello di TDE +Comment[nds]=Stellt dat Rahmenwark för en Lüttprogramm op, dat sik na dat TDE-Paneel inbett +Comment[ne]=केडीई प्यानलमा सम्मिलित एप्लेटका लागि फ्रेमवर्क उत्पन्न गर्दछ +Comment[nl]=Genereert een framework voor een applet die kan worden ingebed in het TDE-paneel +Comment[pl]=Generuje szablon apletu, który można wstawić do panelu TDE +Comment[pt]=Gera a plataforma para uma 'applet' que se incorpore no painel do TDE +Comment[pt_BR]=Gera a plataforma para uma 'applet' que se incorpore no painel do TDE +Comment[ru]=Создание аплета панели TDE +Comment[sk]=Vygeneruje framework pre applet, ktorý sa bude dať vložiť do TDE panelu +Comment[sr]=Прави радни оквир за аплет који се уграђује у TDE-ов панел +Comment[sr@Latn]=Pravi radni okvir za aplet koji se ugrađuje u TDE-ov panel +Comment[sv]=Skapar ett ramverk för ett miniprogram som inbäddas i TDE:s panel +Comment[tr]=TDE paneline gömülen bir küçük uygulama için bir çatı oluşturur. +Comment[zh_CN]=生成一个可嵌入 TDE 面板的小程序框架 +Comment[zh_TW]=產生一個嵌入 TDE 面板的小程式框架 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=kicker.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/applet.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[FILE10] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE11] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE12] +Type=install +Source=%{src}/applet.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE13] +Type=install +Source=%{src}/applet.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE14] +Type=install +Source=%{src}/applet.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[MSG] +Type=message +Comment=A Kicker Applet was created in %{dest} +Comment[ca]=Una miniaplicació per a Kicker ha estat creat en %{dest} +Comment[da]=En Kicker applet blev oprettet i %{dest} +Comment[de]=Ein Miniprogramm für Kicker wurde in %{dest} erstellt. +Comment[el]=Μία μικροεφαρμογή Kicker δημιουργήθηκε στο %{dest} +Comment[es]=Un applet para Kicker ha sido creado en %{dest} +Comment[et]=Kickeri aplett loodi asukohta %{dest} +Comment[eu]=Kicker Applet bat sortu da hemen: %{dest} +Comment[fa]=یک برنامک Kicker در %{dest} ایجاد شد +Comment[fr]=Un applet Kicker a été créé dans %{dest} +Comment[ga]=Cruthaíodh feidhmchláirín Kicker i %{dest} +Comment[gl]=Creouse un applet para Kicker en %{dest} +Comment[hu]=Létrejött egy panel-kisalkalmazás itt: %{dest} +Comment[it]=È stata creata un'applet per kicker in %{dest} +Comment[ja]=Kicker アプレットを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Kicker-Lüttprogramm opstellt +Comment[ne]=किकर एप्लेट %{dest} मा सिर्जना गरियो +Comment[nl]=Een Kicker-applet is aangemaakt in %{dest} +Comment[pl]=Aplet panelu został utworzony w %{dest} +Comment[pt]=Foi criada uma 'applet' do Kicker em %{dest} +Comment[pt_BR]=Foi criada uma 'applet' do Kicker em %{dest} +Comment[ru]=Аплет панели TDE создан в %{dest} +Comment[sk]=Kicker applet bol vytvorený v %{dest} +Comment[sl]=Vstavek za Kicker je bil ustvarjen v %{dest} +Comment[sr]=Аплет за Kicker направљен је у %{dest} +Comment[sr@Latn]=Aplet za Kicker napravljen je u %{dest} +Comment[sv]=Ett miniprogram för Kicker skapades i %{dest} +Comment[tr]=Bir Kicker küçük uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个 Kicker 小程序 +Comment[zh_TW]=一個 Kicker 小程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kicker/kicker.tdevtemplate b/languages/cpp/app_templates/kicker/kicker.tdevtemplate deleted file mode 100644 index ba1252de..00000000 --- a/languages/cpp/app_templates/kicker/kicker.tdevtemplate +++ /dev/null @@ -1,193 +0,0 @@ -[General] -Name=Kicker Applet -Name[br]=Arloadig Kicker -Name[ca]=Una miniaplicació per a Kicker -Name[da]=Kicker-applet -Name[de]=Kicker-Miniprogramm -Name[el]=Μικροεφαρμογή Kicker -Name[es]=Applet para Kicker -Name[et]=Kickeri aplett -Name[eu]=Kicker applet-a -Name[fa]=برنامک Kicker -Name[fr]=Applet Kicker -Name[ga]=Feidhmchláirín Kicker -Name[gl]=Applet para Kicker -Name[hu]=Panel-kisalkalmazás -Name[it]=Applet di kicker -Name[ja]=Kicker アプレット -Name[nds]=Kicker-Lüttprogramm -Name[ne]=किकर एप्लेट -Name[nl]=Kicker-applet -Name[pl]=Aplet panelu -Name[pt]='Applet' do Kicker -Name[pt_BR]='Applet' do Kicker -Name[ru]=Аплет панели TDE -Name[sk]=Kicker applet -Name[sl]=Vstavek za Kicker -Name[sr]=Аплет за Kicker -Name[sr@Latn]=Aplet za Kicker -Name[sv]=Miniprogram för Kicker -Name[tr]=Kicker Küçük Uygulaması -Name[zh_CN]=Kicker 小程序 -Name[zh_TW]=Kicker 小程式 -Icon=kicker.png -Category=C++/TDE -Comment=Generates a framework for an applet that embeds into the TDE panel -Comment[ca]=Genera una infraestructura per a una miniaplicació encastada en el plafó de TDE -Comment[da]=Genererer et skelet for en applet der indlejres i TDE's panel -Comment[de]=Erstellt das Grundgerüst für ein Miniprogramm, das in die TDE-Kontrollleiste eingebettet wird. -Comment[el]=Δημιουργεί ένα πλαίσιο για μία μικροεφαρμογή που ενσωματώνεται στον πίνακα του TDE -Comment[es]=Genera una infraestructura para un applet empotrado en el panel de TDE -Comment[et]=Apleti raamistiku loomine, mida saab põimida TDE paneelile -Comment[eu]=TDE-ren panelean kapsulatzen den applet baten lan-marko bat sortzen du -Comment[fa]=چارچوبی برای برنامک نهفته‌شده در تابلوی TDEتولید می‌کند -Comment[fr]=Génère une infrastructure pour un applet qui s'intègre dans le tableau de bord de TDE -Comment[gl]=Xera un contorno de traballo para un applet que se incrusta no panel de TDE. -Comment[hu]=Létrehoz egy keretprogramot TDE-s panel-kisalkalmazás készítéséhez -Comment[it]=Genera l'infrastruttura per un'applet che si integra nel pannello di TDE -Comment[nds]=Stellt dat Rahmenwark för en Lüttprogramm op, dat sik na dat TDE-Paneel inbett -Comment[ne]=केडीई प्यानलमा सम्मिलित एप्लेटका लागि फ्रेमवर्क उत्पन्न गर्दछ -Comment[nl]=Genereert een framework voor een applet die kan worden ingebed in het TDE-paneel -Comment[pl]=Generuje szablon apletu, który można wstawić do panelu TDE -Comment[pt]=Gera a plataforma para uma 'applet' que se incorpore no painel do TDE -Comment[pt_BR]=Gera a plataforma para uma 'applet' que se incorpore no painel do TDE -Comment[ru]=Создание аплета панели TDE -Comment[sk]=Vygeneruje framework pre applet, ktorý sa bude dať vložiť do TDE panelu -Comment[sr]=Прави радни оквир за аплет који се уграђује у TDE-ов панел -Comment[sr@Latn]=Pravi radni okvir za aplet koji se ugrađuje u TDE-ov panel -Comment[sv]=Skapar ett ramverk för ett miniprogram som inbäddas i TDE:s panel -Comment[tr]=TDE paneline gömülen bir küçük uygulama için bir çatı oluşturur. -Comment[zh_CN]=生成一个可嵌入 TDE 面板的小程序框架 -Comment[zh_TW]=產生一個嵌入 TDE 面板的小程式框架 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=kicker.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/applet.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[FILE10] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE11] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE12] -Type=install -Source=%{src}/applet.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE13] -Type=install -Source=%{src}/applet.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE14] -Type=install -Source=%{src}/applet.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[MSG] -Type=message -Comment=A Kicker Applet was created in %{dest} -Comment[ca]=Una miniaplicació per a Kicker ha estat creat en %{dest} -Comment[da]=En Kicker applet blev oprettet i %{dest} -Comment[de]=Ein Miniprogramm für Kicker wurde in %{dest} erstellt. -Comment[el]=Μία μικροεφαρμογή Kicker δημιουργήθηκε στο %{dest} -Comment[es]=Un applet para Kicker ha sido creado en %{dest} -Comment[et]=Kickeri aplett loodi asukohta %{dest} -Comment[eu]=Kicker Applet bat sortu da hemen: %{dest} -Comment[fa]=یک برنامک Kicker در %{dest} ایجاد شد -Comment[fr]=Un applet Kicker a été créé dans %{dest} -Comment[ga]=Cruthaíodh feidhmchláirín Kicker i %{dest} -Comment[gl]=Creouse un applet para Kicker en %{dest} -Comment[hu]=Létrejött egy panel-kisalkalmazás itt: %{dest} -Comment[it]=È stata creata un'applet per kicker in %{dest} -Comment[ja]=Kicker アプレットを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Kicker-Lüttprogramm opstellt -Comment[ne]=किकर एप्लेट %{dest} मा सिर्जना गरियो -Comment[nl]=Een Kicker-applet is aangemaakt in %{dest} -Comment[pl]=Aplet panelu został utworzony w %{dest} -Comment[pt]=Foi criada uma 'applet' do Kicker em %{dest} -Comment[pt_BR]=Foi criada uma 'applet' do Kicker em %{dest} -Comment[ru]=Аплет панели TDE создан в %{dest} -Comment[sk]=Kicker applet bol vytvorený v %{dest} -Comment[sl]=Vstavek za Kicker je bil ustvarjen v %{dest} -Comment[sr]=Аплет за Kicker направљен је у %{dest} -Comment[sr@Latn]=Aplet za Kicker napravljen je u %{dest} -Comment[sv]=Ett miniprogram för Kicker skapades i %{dest} -Comment[tr]=Bir Kicker küçük uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个 Kicker 小程序 -Comment[zh_TW]=一個 Kicker 小程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kmake/Makefile.am b/languages/cpp/app_templates/kmake/Makefile.am index 35238c7e..b7bd96f9 100644 --- a/languages/cpp/app_templates/kmake/Makefile.am +++ b/languages/cpp/app_templates/kmake/Makefile.am @@ -2,10 +2,10 @@ dataFiles = appui.rc app.desktop app.cpp mainviewimp.cpp mainviewimp.h mainview. templateName = kmake ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/kmake/app.tdevelop b/languages/cpp/app_templates/kmake/app.tdevelop index ffcb6370..ba82ff4b 100644 --- a/languages/cpp/app_templates/kmake/app.tdevelop +++ b/languages/cpp/app_templates/kmake/app.tdevelop @@ -10,16 +10,16 @@ Qt - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + @@ -30,8 +30,8 @@ false *.o,*.lo,CVS - - + + bash bash_bugs @@ -68,8 +68,8 @@ TDE Libraries (Doxygen) - - + + @@ -84,28 +84,28 @@ true - - + + ./bin/%{APPNAMELC} - + - + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/kmake/kmake.tdevtemplate b/languages/cpp/app_templates/kmake/kmake.kdevtemplate similarity index 100% rename from languages/cpp/app_templates/kmake/kmake.tdevtemplate rename to languages/cpp/app_templates/kmake/kmake.kdevtemplate diff --git a/languages/cpp/app_templates/kmod/CMakeLists.txt b/languages/cpp/app_templates/kmod/CMakeLists.txt index ff891946..af575a10 100644 --- a/languages/cpp/app_templates/kmod/CMakeLists.txt +++ b/languages/cpp/app_templates/kmod/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( kmod.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kmod.tar.gz kmod.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - kmod.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + kmod.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kmod/Makefile.am b/languages/cpp/app_templates/kmod/Makefile.am index bae9772c..f4b1ec98 100644 --- a/languages/cpp/app_templates/kmod/Makefile.am +++ b/languages/cpp/app_templates/kmod/Makefile.am @@ -3,10 +3,10 @@ dataFiles = src-Makefile kmod.tdevelop kmod-driver.c templateName = kmod ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/kmod/kmod.kdevtemplate b/languages/cpp/app_templates/kmod/kmod.kdevtemplate new file mode 100644 index 00000000..069d5103 --- /dev/null +++ b/languages/cpp/app_templates/kmod/kmod.kdevtemplate @@ -0,0 +1,89 @@ +# TDE Config File +[General] +Name=Linux Kernel module +Name[br]=Mollad ar galon Linux +Name[ca]=Mòdul del nucli Linux +Name[da]=Linux kernemodul +Name[de]=Linux-Kernelmodul +Name[el]=Άρθρωμα πυρήνα Linux +Name[es]=Módulo para el núcleo de Linux +Name[et]=Linuxi kerneli moodul +Name[eu]=Linux Kernel modulua +Name[fa]=پیمانۀ هستۀ لینوکس +Name[fr]=Module de noyau Linux +Name[ga]=Modúl Eithne Linux +Name[gl]=Módulo para o kernel Linux +Name[hu]=Linuxos kernelmodul +Name[it]=Modulo del kernel Linux +Name[ja]=Linux カーネルモジュール +Name[nds]=Linux-Kernelmoduul +Name[ne]=लिनक्स कर्नेल मोड्युल +Name[nl]=Linux kernelmodule +Name[pl]=Moduł jądra Linuksa +Name[pt]=Módulo do 'kernel' do Linux +Name[pt_BR]=Módulo do 'kernel' do Linux +Name[ru]=Драйвер ядра Linux +Name[sk]=Linux kernel modul +Name[sr]=Модул језгра Linux-а +Name[sr@Latn]=Modul jezgra Linux-a +Name[sv]=Modul för Linux kärna +Name[tr]=Linux Çekirdek Birimi +Name[zh_CN]=Linux 内核模块 +Name[zh_TW]=Linux 核心模組 +Icon= +Category=C +Comment=Generates a template for a Linux kernel module. +Comment[ca]=Genera una plantilla per a un mòdul del nucli Linux. +Comment[da]=Genererer en skabelon for en Linux kernemodul. +Comment[de]=Erstellt eine Vorlage für ein Linux-Kernelmodul. +Comment[el]=Δημιουργεί ένα πρότυπο για ένα άρθρωμα του πυρήνα του Linux. +Comment[es]=Genera una plantilla para un módulo del núcleo de Linux. +Comment[et]=Linuxi kerneli mooduli malli loomine. +Comment[eu]=Linux kernel modulu batentzat txantiloi bat sortzen du. +Comment[fa]=قالبی برای پیمانۀ هستۀ لینوکس تولید می‌کند +Comment[fr]=Génère un modèle pour un module de noyau Linux. +Comment[gl]=Xera unha modelo dun módulo para o kernel Linux. +Comment[hu]=Létrehoz egy sablont linuxos kernelmodul készítéséhez. +Comment[it]=Genera un modello per un modulo del kernel Linux kernel. +Comment[ja]=Linux カーネルモジュール用のテンプレートを作成します +Comment[nds]=Stellt en Vörlaag för en Linux-Kernelmoduul op. +Comment[ne]=लिनक्स कर्नेल मोड्युलका लागि टेम्प्लेट उत्पन्न गर्दछ +Comment[nl]=Genereert een sjabloon voor een Linux kernelmodule +Comment[pl]=Generuje szablon dla modułu jądra Linuksa. +Comment[pt]=Gera um modelo para um módulo do 'kernel' do Linux. +Comment[pt_BR]=Gera um modelo para um módulo do 'kernel' do Linux. +Comment[ru]=Создание драйвера ядра Linux. +Comment[sk]=Vygeneruje šablónu pre Linux kernel modul +Comment[sr]=Прави шаблон за модул језгра Linux-а. +Comment[sr@Latn]=Pravi šablon za modul jezgra Linux-a. +Comment[sv]=Skapar en mall för en modul i Linux kärna. +Comment[tr]=Bir Linux çekirdek birimi için bir şablon yaratır. +Comment[zh_CN]=生成一个 Linux 内核模块的模板。 +Comment[zh_TW]=產生一個 Linux 核心模組的樣本 +FileTemplates=h,CStyle,c,CStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}-driver.c +Archive=kmod.tar.gz + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/kmod.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/src-Makefile +Dest=%{dest}/Makefile + +[FILE3] +Type=install +Source=%{src}/kmod-driver.c +Dest=%{dest}/%{APPNAMELC}-driver.c + +[MSG] +Type=message +Command=A linux kernel module was created in %{dest} diff --git a/languages/cpp/app_templates/kmod/kmod.tdevelop b/languages/cpp/app_templates/kmod/kmod.tdevelop index 55d6f2b6..6ce5f390 100644 --- a/languages/cpp/app_templates/kmod/kmod.tdevelop +++ b/languages/cpp/app_templates/kmod/kmod.tdevelop @@ -4,10 +4,10 @@ %{AUTHOR} %{EMAIL} %{VERSION} - TDevCustomProject + KDevCustomProject C - TDevDebugger + KDevDebugger C @@ -15,13 +15,13 @@ Kernel - + - - + + make @@ -35,8 +35,8 @@ - - + + ada ada_bugs_gcc @@ -83,11 +83,11 @@ TDE Libraries (Doxygen) - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/kmod/kmod.tdevtemplate b/languages/cpp/app_templates/kmod/kmod.tdevtemplate deleted file mode 100644 index c47912f8..00000000 --- a/languages/cpp/app_templates/kmod/kmod.tdevtemplate +++ /dev/null @@ -1,89 +0,0 @@ -# TDE Config File -[General] -Name=Linux Kernel module -Name[br]=Mollad ar galon Linux -Name[ca]=Mòdul del nucli Linux -Name[da]=Linux kernemodul -Name[de]=Linux-Kernelmodul -Name[el]=Άρθρωμα πυρήνα Linux -Name[es]=Módulo para el núcleo de Linux -Name[et]=Linuxi kerneli moodul -Name[eu]=Linux Kernel modulua -Name[fa]=پیمانۀ هستۀ لینوکس -Name[fr]=Module de noyau Linux -Name[ga]=Modúl Eithne Linux -Name[gl]=Módulo para o kernel Linux -Name[hu]=Linuxos kernelmodul -Name[it]=Modulo del kernel Linux -Name[ja]=Linux カーネルモジュール -Name[nds]=Linux-Kernelmoduul -Name[ne]=लिनक्स कर्नेल मोड्युल -Name[nl]=Linux kernelmodule -Name[pl]=Moduł jądra Linuksa -Name[pt]=Módulo do 'kernel' do Linux -Name[pt_BR]=Módulo do 'kernel' do Linux -Name[ru]=Драйвер ядра Linux -Name[sk]=Linux kernel modul -Name[sr]=Модул језгра Linux-а -Name[sr@Latn]=Modul jezgra Linux-a -Name[sv]=Modul för Linux kärna -Name[tr]=Linux Çekirdek Birimi -Name[zh_CN]=Linux 内核模块 -Name[zh_TW]=Linux 核心模組 -Icon= -Category=C -Comment=Generates a template for a Linux kernel module. -Comment[ca]=Genera una plantilla per a un mòdul del nucli Linux. -Comment[da]=Genererer en skabelon for en Linux kernemodul. -Comment[de]=Erstellt eine Vorlage für ein Linux-Kernelmodul. -Comment[el]=Δημιουργεί ένα πρότυπο για ένα άρθρωμα του πυρήνα του Linux. -Comment[es]=Genera una plantilla para un módulo del núcleo de Linux. -Comment[et]=Linuxi kerneli mooduli malli loomine. -Comment[eu]=Linux kernel modulu batentzat txantiloi bat sortzen du. -Comment[fa]=قالبی برای پیمانۀ هستۀ لینوکس تولید می‌کند -Comment[fr]=Génère un modèle pour un module de noyau Linux. -Comment[gl]=Xera unha modelo dun módulo para o kernel Linux. -Comment[hu]=Létrehoz egy sablont linuxos kernelmodul készítéséhez. -Comment[it]=Genera un modello per un modulo del kernel Linux kernel. -Comment[ja]=Linux カーネルモジュール用のテンプレートを作成します -Comment[nds]=Stellt en Vörlaag för en Linux-Kernelmoduul op. -Comment[ne]=लिनक्स कर्नेल मोड्युलका लागि टेम्प्लेट उत्पन्न गर्दछ -Comment[nl]=Genereert een sjabloon voor een Linux kernelmodule -Comment[pl]=Generuje szablon dla modułu jądra Linuksa. -Comment[pt]=Gera um modelo para um módulo do 'kernel' do Linux. -Comment[pt_BR]=Gera um modelo para um módulo do 'kernel' do Linux. -Comment[ru]=Создание драйвера ядра Linux. -Comment[sk]=Vygeneruje šablónu pre Linux kernel modul -Comment[sr]=Прави шаблон за модул језгра Linux-а. -Comment[sr@Latn]=Pravi šablon za modul jezgra Linux-a. -Comment[sv]=Skapar en mall för en modul i Linux kärna. -Comment[tr]=Bir Linux çekirdek birimi için bir şablon yaratır. -Comment[zh_CN]=生成一个 Linux 内核模块的模板。 -Comment[zh_TW]=產生一個 Linux 核心模組的樣本 -FileTemplates=h,CStyle,c,CStyle -ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}-driver.c -Archive=kmod.tar.gz - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/kmod.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/src-Makefile -Dest=%{dest}/Makefile - -[FILE3] -Type=install -Source=%{src}/kmod-driver.c -Dest=%{dest}/%{APPNAMELC}-driver.c - -[MSG] -Type=message -Command=A linux kernel module was created in %{dest} diff --git a/languages/cpp/app_templates/kofficepart/CMakeLists.txt b/languages/cpp/app_templates/kofficepart/CMakeLists.txt index 460b3293..955225bc 100644 --- a/languages/cpp/app_templates/kofficepart/CMakeLists.txt +++ b/languages/cpp/app_templates/kofficepart/CMakeLists.txt @@ -21,9 +21,9 @@ add_custom_target( kopart.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kopart.tar.gz kopart.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - kopart.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + kopart.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kofficepart/Makefile.am b/languages/cpp/app_templates/kofficepart/Makefile.am index d602a552..a38746b1 100644 --- a/languages/cpp/app_templates/kofficepart/Makefile.am +++ b/languages/cpp/app_templates/kofficepart/Makefile.am @@ -7,10 +7,10 @@ dataFiles = kopart.tdevelop kopart_aboutdata.h kopart_part.cpp kopart_view.h \ templateName = kopart ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/kofficepart/kopart.kdevtemplate b/languages/cpp/app_templates/kofficepart/kopart.kdevtemplate new file mode 100644 index 00000000..0273e0ca --- /dev/null +++ b/languages/cpp/app_templates/kofficepart/kopart.kdevtemplate @@ -0,0 +1,231 @@ +# TDE Config File +[General] +Name=KOffice Part +Name[br]=Perzh KOffice +Name[ca]=Part per a KOffice +Name[da]=KOffice part +Name[de]=KOffice-Komponente +Name[el]=Τμήμα KOffice +Name[es]=Part de KOffice +Name[et]=KOffice'i komponent +Name[eu]=KOffice zatia +Name[fa]=جزء KOffice +Name[fr]=Composant KOffice +Name[ga]=Páirt KOffice +Name[gl]='Part' para KOffice +Name[hu]=KOffice-objektum +Name[it]=Part di KOffice +Name[nds]=KOffice-Komponent +Name[ne]=केडीई अफिस भाग +Name[nl]=Koffice-part +Name[pt]=Componente do KOffice +Name[pt_BR]=Componente do KOffice +Name[ru]=Приложение KOffice +Name[sr]=KOffice део +Name[sr@Latn]=KOffice deo +Name[sv]=Koffice-delprogram +Name[tr]=KOffice Bileşeni +Name[zh_CN]=KOffice 部件 +Name[zh_TW]=KOffice 元件 +Icon=kopart.png +Category=C++/TDE +Comment=Generates a framework for a full KOffice Application. +Comment[ca]=Genera una infraestructura per a una completa aplicació de KOffice. +Comment[da]=Genererer et skelet for et fuldstændigt KOffice-program. +Comment[de]=Erstellt ein Grundgerüst für eine vollwertige KOffice-Anwendung +Comment[el]=Δημιουργεί ένα πλαίσιο για μια πλήρης εφαρμογή του KOffice. +Comment[es]=Genera una infraestructura para una aplicación completa de KOffice. +Comment[et]=KOffice'i rakenduse raamistiku loomine. +Comment[eu]=KOffice-en aplikazio batentzat lan-marko oso bat sortzen du. +Comment[fa]=چارچوبی را برای کاربرد کامل KOffice تولید می‌کند. +Comment[fr]=Génère une infrastructure pour une application KOffice complète. +Comment[gl]=Xera un contorno de traballo para unha aplicación KOffice completa. +Comment[hu]=Létrehoz egy kiindulási keretprogramot teljes KOffice-alkalmazás készítéséhez. +Comment[it]=Genera l'infrastruttura per un'applicazione completa di KOffice. +Comment[nds]=Stellt dat Rahmenwark för en heel KOffice-Programm op. +Comment[ne]=पूर्ण केडीई अफिस अनुप्रयोगका लागि फ्रेमवर्क उत्पन्न गर्दछ +Comment[nl]=Genereert een framework voor een volledige KOffice-toepassing +Comment[pl]=Generuje szablon pełnego programu KOffice. +Comment[pt]=Gera a plataforma para uma aplicação completa do KOffice. +Comment[pt_BR]=Gera a plataforma para uma aplicação completa do KOffice. +Comment[ru]=Создание приложения KOffice. +Comment[sk]=Vygeneruje framework pre kompletnú aplikáciu KOffice. +Comment[sl]=Ustvari ogrodje za poln program KOffice +Comment[sr]=Прави радни оквир за пуни KOffice програм. +Comment[sr@Latn]=Pravi radni okvir za puni KOffice program. +Comment[sv]=Skapar ett ramverk för ett fullständigt Koffice-program. +Comment[tr]=Tam bir KOffice Uygulaması için bir çatı yaratır. +Comment[zh_CN]=生成一个全功能的 KOffice 应用程序框架。 +Comment[zh_TW]=產生一個完整的 KOffice 應用程式的框架 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}_part.cpp +Archive=kopart.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/kopart.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE9] +Type=install +Source=%{src}/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[FILE10] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE11] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE12] +Type=install +Source=%{src}/kopart_view.cpp +Dest=%{dest}/src/%{APPNAMELC}_view.cpp + +[FILE13] +Type=install +Source=%{src}/kopart_view.h +Dest=%{dest}/src/%{APPNAMELC}_view.h + +[FILE14] +Type=install +Source=%{src}/kopart_part.cpp +Dest=%{dest}/src/%{APPNAMELC}_part.cpp + +[FILE15] +Type=install +Source=%{src}/kopart_part.h +Dest=%{dest}/src/%{APPNAMELC}_part.h + +[FILE16] +Type=install +Source=%{src}/kopart_factory.cpp +Dest=%{dest}/src/%{APPNAMELC}_factory.cpp + +[FILE17] +Type=install +Source=%{src}/kopart_factory.h +Dest=%{dest}/src/%{APPNAMELC}_factory.h + +[FILE18] +Type=install +Source=%{src}/kopart_aboutdata.h +Dest=%{dest}/src/%{APPNAMELC}_aboutdata.h + +[FILE19] +Type=install +EscapeXML=true +Source=%{src}/kopart.rc +Dest=%{dest}/src/%{APPNAMELC}.rc + +[FILE20] +Type=install +Source=%{src}/kopart.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE21] +Type=install +Source=%{src}/x-kopart.desktop +Dest=%{dest}/src/x-%{APPNAMELC}.desktop + +[FILE22] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[MSG] +Type=message +Comment=A KOffice part was created in %{dest} +Comment[ca]=Una part per a KOffice ha estat creada en %{dest} +Comment[da]=En KOffice part blev oprettet i %{dest} +Comment[de]=Eine KOffice-Komponente wurde in %{dest} erstellt. +Comment[el]=Ένα τμήμα του KOffice δημιουργήθηκε στο %{dest} +Comment[es]=Un Part de KOffice ha sido creado en %{dest} +Comment[et]=KOffice'i komponent loodi asukohta %{dest} +Comment[eu]=KOffice zati bat sortu da hemen: %{dest} +Comment[fa]=یک جزء KOffice در %{dest} ایجاد شد +Comment[fr]=Un composant KOffice a été créé dans %{dest} +Comment[ga]=Cruthaíodh páirt TDE i %{dest} +Comment[gl]=Creouse unha 'part' para KOffice en %{dest} +Comment[hu]=Létrejött egy KOffice-objektum itt: %{dest} +Comment[it]=È stata creata una part di KOffice in %{dest} +Comment[ja]=KOffice パートを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en KOffice-Komponent opstellt +Comment[ne]=केडीई अफिस भाग %{dest} मा सिर्जना गरियो +Comment[nl]=Een KOffice-part is aangemaakt in %{dest} +Comment[pl]=KOffice part została utworzona w %{dest} +Comment[pt]=Foi criado um componente do KOffice em %{dest} +Comment[pt_BR]=Foi criado um componente do KOffice em %{dest} +Comment[ru]=Приложение KOffice создано в %{dest} +Comment[sk]=KOffice Part bol vytvorený v %{dest} +Comment[sr]=KOffice део је направљен у %{dest} +Comment[sr@Latn]=KOffice deo je napravljen u %{dest} +Comment[sv]=Ett Koffice-delprogram skapades i %{dest} +Comment[tr]=Bir KOffice bileşeni %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个 KOffice 部件 +Comment[zh_TW]=一個 KOffice 元件已建立於 %{dest} diff --git a/languages/cpp/app_templates/kofficepart/kopart.tdevelop b/languages/cpp/app_templates/kofficepart/kopart.tdevelop index 7c4b0e4c..194157d7 100644 --- a/languages/cpp/app_templates/kofficepart/kopart.tdevelop +++ b/languages/cpp/app_templates/kofficepart/kopart.tdevelop @@ -14,16 +14,16 @@ tdeioslave - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + src/lib%{APPNAMELC}part.la debug @@ -45,15 +45,15 @@ -O0 -g3 - - + + - - + + ada ada_bugs_gcc @@ -90,24 +90,24 @@ qmake User Guide - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/kofficepart/kopart.tdevtemplate b/languages/cpp/app_templates/kofficepart/kopart.tdevtemplate deleted file mode 100644 index 076b650a..00000000 --- a/languages/cpp/app_templates/kofficepart/kopart.tdevtemplate +++ /dev/null @@ -1,231 +0,0 @@ -# TDE Config File -[General] -Name=KOffice Part -Name[br]=Perzh KOffice -Name[ca]=Part per a KOffice -Name[da]=KOffice part -Name[de]=KOffice-Komponente -Name[el]=Τμήμα KOffice -Name[es]=Part de KOffice -Name[et]=KOffice'i komponent -Name[eu]=KOffice zatia -Name[fa]=جزء KOffice -Name[fr]=Composant KOffice -Name[ga]=Páirt KOffice -Name[gl]='Part' para KOffice -Name[hu]=KOffice-objektum -Name[it]=Part di KOffice -Name[nds]=KOffice-Komponent -Name[ne]=केडीई अफिस भाग -Name[nl]=Koffice-part -Name[pt]=Componente do KOffice -Name[pt_BR]=Componente do KOffice -Name[ru]=Приложение KOffice -Name[sr]=KOffice део -Name[sr@Latn]=KOffice deo -Name[sv]=Koffice-delprogram -Name[tr]=KOffice Bileşeni -Name[zh_CN]=KOffice 部件 -Name[zh_TW]=KOffice 元件 -Icon=kopart.png -Category=C++/TDE -Comment=Generates a framework for a full KOffice Application. -Comment[ca]=Genera una infraestructura per a una completa aplicació de KOffice. -Comment[da]=Genererer et skelet for et fuldstændigt KOffice-program. -Comment[de]=Erstellt ein Grundgerüst für eine vollwertige KOffice-Anwendung -Comment[el]=Δημιουργεί ένα πλαίσιο για μια πλήρης εφαρμογή του KOffice. -Comment[es]=Genera una infraestructura para una aplicación completa de KOffice. -Comment[et]=KOffice'i rakenduse raamistiku loomine. -Comment[eu]=KOffice-en aplikazio batentzat lan-marko oso bat sortzen du. -Comment[fa]=چارچوبی را برای کاربرد کامل KOffice تولید می‌کند. -Comment[fr]=Génère une infrastructure pour une application KOffice complète. -Comment[gl]=Xera un contorno de traballo para unha aplicación KOffice completa. -Comment[hu]=Létrehoz egy kiindulási keretprogramot teljes KOffice-alkalmazás készítéséhez. -Comment[it]=Genera l'infrastruttura per un'applicazione completa di KOffice. -Comment[nds]=Stellt dat Rahmenwark för en heel KOffice-Programm op. -Comment[ne]=पूर्ण केडीई अफिस अनुप्रयोगका लागि फ्रेमवर्क उत्पन्न गर्दछ -Comment[nl]=Genereert een framework voor een volledige KOffice-toepassing -Comment[pl]=Generuje szablon pełnego programu KOffice. -Comment[pt]=Gera a plataforma para uma aplicação completa do KOffice. -Comment[pt_BR]=Gera a plataforma para uma aplicação completa do KOffice. -Comment[ru]=Создание приложения KOffice. -Comment[sk]=Vygeneruje framework pre kompletnú aplikáciu KOffice. -Comment[sl]=Ustvari ogrodje za poln program KOffice -Comment[sr]=Прави радни оквир за пуни KOffice програм. -Comment[sr@Latn]=Pravi radni okvir za puni KOffice program. -Comment[sv]=Skapar ett ramverk för ett fullständigt Koffice-program. -Comment[tr]=Tam bir KOffice Uygulaması için bir çatı yaratır. -Comment[zh_CN]=生成一个全功能的 KOffice 应用程序框架。 -Comment[zh_TW]=產生一個完整的 KOffice 應用程式的框架 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}_part.cpp -Archive=kopart.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/kopart.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE9] -Type=install -Source=%{src}/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[FILE10] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE11] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE12] -Type=install -Source=%{src}/kopart_view.cpp -Dest=%{dest}/src/%{APPNAMELC}_view.cpp - -[FILE13] -Type=install -Source=%{src}/kopart_view.h -Dest=%{dest}/src/%{APPNAMELC}_view.h - -[FILE14] -Type=install -Source=%{src}/kopart_part.cpp -Dest=%{dest}/src/%{APPNAMELC}_part.cpp - -[FILE15] -Type=install -Source=%{src}/kopart_part.h -Dest=%{dest}/src/%{APPNAMELC}_part.h - -[FILE16] -Type=install -Source=%{src}/kopart_factory.cpp -Dest=%{dest}/src/%{APPNAMELC}_factory.cpp - -[FILE17] -Type=install -Source=%{src}/kopart_factory.h -Dest=%{dest}/src/%{APPNAMELC}_factory.h - -[FILE18] -Type=install -Source=%{src}/kopart_aboutdata.h -Dest=%{dest}/src/%{APPNAMELC}_aboutdata.h - -[FILE19] -Type=install -EscapeXML=true -Source=%{src}/kopart.rc -Dest=%{dest}/src/%{APPNAMELC}.rc - -[FILE20] -Type=install -Source=%{src}/kopart.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE21] -Type=install -Source=%{src}/x-kopart.desktop -Dest=%{dest}/src/x-%{APPNAMELC}.desktop - -[FILE22] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[MSG] -Type=message -Comment=A KOffice part was created in %{dest} -Comment[ca]=Una part per a KOffice ha estat creada en %{dest} -Comment[da]=En KOffice part blev oprettet i %{dest} -Comment[de]=Eine KOffice-Komponente wurde in %{dest} erstellt. -Comment[el]=Ένα τμήμα του KOffice δημιουργήθηκε στο %{dest} -Comment[es]=Un Part de KOffice ha sido creado en %{dest} -Comment[et]=KOffice'i komponent loodi asukohta %{dest} -Comment[eu]=KOffice zati bat sortu da hemen: %{dest} -Comment[fa]=یک جزء KOffice در %{dest} ایجاد شد -Comment[fr]=Un composant KOffice a été créé dans %{dest} -Comment[ga]=Cruthaíodh páirt TDE i %{dest} -Comment[gl]=Creouse unha 'part' para KOffice en %{dest} -Comment[hu]=Létrejött egy KOffice-objektum itt: %{dest} -Comment[it]=È stata creata una part di KOffice in %{dest} -Comment[ja]=KOffice パートを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en KOffice-Komponent opstellt -Comment[ne]=केडीई अफिस भाग %{dest} मा सिर्जना गरियो -Comment[nl]=Een KOffice-part is aangemaakt in %{dest} -Comment[pl]=KOffice part została utworzona w %{dest} -Comment[pt]=Foi criado um componente do KOffice em %{dest} -Comment[pt_BR]=Foi criado um componente do KOffice em %{dest} -Comment[ru]=Приложение KOffice создано в %{dest} -Comment[sk]=KOffice Part bol vytvorený v %{dest} -Comment[sr]=KOffice део је направљен у %{dest} -Comment[sr@Latn]=KOffice deo je napravljen u %{dest} -Comment[sv]=Ett Koffice-delprogram skapades i %{dest} -Comment[tr]=Bir KOffice bileşeni %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个 KOffice 部件 -Comment[zh_TW]=一個 KOffice 元件已建立於 %{dest} diff --git a/languages/cpp/app_templates/konqnavpanel/CMakeLists.txt b/languages/cpp/app_templates/konqnavpanel/CMakeLists.txt index c683f536..e38fc279 100644 --- a/languages/cpp/app_templates/konqnavpanel/CMakeLists.txt +++ b/languages/cpp/app_templates/konqnavpanel/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( konqnavpanel.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/konqnavpanel.tar.gz konqnavpanel.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - konqnavpanel.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + konqnavpanel.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/konqnavpanel/Makefile.am b/languages/cpp/app_templates/konqnavpanel/Makefile.am index a901456b..6fccbf38 100644 --- a/languages/cpp/app_templates/konqnavpanel/Makefile.am +++ b/languages/cpp/app_templates/konqnavpanel/Makefile.am @@ -4,10 +4,10 @@ dataFiles = konqnavpanel.cpp konqnavpanel.h konqnavpanel.desktop \ templateName = konqnavpanel ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/konqnavpanel/konqnavpanel.kdevtemplate b/languages/cpp/app_templates/konqnavpanel/konqnavpanel.kdevtemplate new file mode 100644 index 00000000..e6f1a23e --- /dev/null +++ b/languages/cpp/app_templates/konqnavpanel/konqnavpanel.kdevtemplate @@ -0,0 +1,192 @@ +# TDE Config File +[General] +Name=Konqueror Navigation Panel Plugin +Name[br]=Lugent panell furchal Konqueror +Name[ca]=Un connector per al plafó de navegació de Konqueror +Name[da]=Konqueror navigationspanel plugin +Name[de]=Modul für den Navigationsbereich von Konqueror +Name[el]=Πρόσθετο πίνακα πλοήγησης του Konqueror +Name[es]=Un complemento para el panel de navegación de Konqueror +Name[et]=Konquerori liikumispaneeli plugin +Name[eu]=Konqueror arakatze-panel plugina +Name[fa]=وصلۀ تابلوی ناوش Konqueror +Name[fr]=Module externe pour le panneau de navigation de Konqueror +Name[ga]=Breiseán Painéil Nascleanúna Konqueror +Name[gl]=Extensión para o panel de navegación de Konqueror +Name[hu]=Konqueroros navigációs bővítőmodul +Name[it]=Plugin per il pannello di navigazione di Konqueror +Name[ja]=Konqueror ナビゲーションプラグイン +Name[nds]=En Sietpaneelmoduul för Konqueror +Name[ne]=कन्क्वेरर नेभिगेसन प्यानल प्लगइन +Name[nl]=Konqueror Navigatiepaneel-plugin +Name[pl]=Wtyczka panelu nawigacji Konquerora +Name[pt]='Plugin' do Painel de Navegação do Konqueror +Name[pt_BR]='Plugin' do Painel de Navegação do Konqueror +Name[ru]=Модуль панели навигации Konqueror +Name[sk]=Modul pre konqueror navigačný panel +Name[sr]=Кonqueror-ов прикључак за навигациони панел +Name[sr@Latn]=Konqueror-ov priključak za navigacioni panel +Name[sv]=Konqueror-insticksprogram för navigeringspanelen +Name[tr]=Konqueror Gezinme Paneli Eklentisi +Name[zh_CN]=Konqueror 导航面板插件 +Name[zh_TW]=Konqueror 導覽面板外掛程式 +Icon=konqnavpanel.png +Category=C++/TDE +Comment=Generates a framework for a plugin that embeds into Konqueror's navigation panel +Comment[ca]=Genera una infraestructura per a un connector que s'encasti al plafó de navegació de Konqueror +Comment[da]=Genererer et skelet for et plugin der indlejres i Konqueror's navigationspanel +Comment[de]=Erstellt das Gerüst für ein Modul, das in den Navigationsbereich von Konqueror eingebunden werden kann. +Comment[el]=Δημιουργεί ένα πλαίσιο για ένα πρόσθετο που ενσωματώνεται στον πίνακα πλοήγησης του Konqueror +Comment[es]=Genera una infraestructura para un complemento empotrado en el panel de navegación de Konqueror +Comment[et]=Plugina raamistiku loomine, mida saab põimida Konquerori liikumispaneelile. +Comment[eu]=Konqueror-en arakatze-panelean kapsulatzen den plugin batentzat lan-marko oso bat sortzen du +Comment[fa]=چارچوبی را برای یک وصله که در تابلوی ناوش Konqueror نهفته بود، تولید می‌کند +Comment[fr]=Génère une infrastructure pour un module externe qui s'intègre dans le panneau de navigation de Konqueror +Comment[gl]=Xera un contorno de traballo para unha extensión que se incrusta no panel de navegación de Konqueror +Comment[hu]=Létrehoz egy alapprogramot konqueroros navigációs panelmodul készítéséhez +Comment[it]=Genera l'infrastruttura per un plugin che si integra nel pannello di navigazione di Konqueror +Comment[nds]=Stellt dat Rahmenwark för en Moduul op, dat sik in't Sietpaneel vun Konqueror inbett +Comment[ne]=कन्क्वेररको नेभिगेसन प्यानलमा सम्मिलित हुने प्लगइनका लागि फ्रेमवर्क उत्पन्न गर्दछ +Comment[nl]=Genereert een framework voor een plugin die kan worden ingebed in Konqueror's navigatiepaneel. +Comment[pl]=Generuje wtyczkę, którą można osadzić w panelu nawigacyjnym Konquerora +Comment[pt]=Gera a plataforma para um 'plugin' que se incorpore no painel de navegação do Konqueror +Comment[pt_BR]=Gera a plataforma para um 'plugin' que se incorpore no painel de navegação do Konqueror +Comment[ru]=Создание модуля панели навигации Konqueror +Comment[sk]=Vygeneruje framework pre modul, ktorý sa bude dať vložiť do konqueror navigačného panelu +Comment[sr]=Прави радни оквир за прикључак који се уграђује у Konqueror-ов навигациони панел +Comment[sr@Latn]=Pravi radni okvir za priključak koji se ugrađuje u Konqueror-ov navigacioni panel +Comment[sv]=Skapar ett ramverk för ett insticksprogram som inbäddas i Konquerors navigeringspanel +Comment[tr]=Konqueror'un gezinme paneline gömülen bir eklenti için bir çatı oluşturur. +Comment[zh_CN]=生成可嵌入到 Konqueror 导航面板的插件框架 +Comment[zh_TW]=產生一個嵌入 Konqueror 導覽面板的外掛程式的框架 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=konqnavpanel.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/konqnavpanel.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[FILE10] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE11] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE12] +Type=install +Source=%{src}/konqnavpanel.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE13] +Type=install +Source=%{src}/konqnavpanel.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE14] +Type=install +Source=%{src}/konqnavpanel.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[MSG] +Type=message +Comment=A konqueror navigation panel plugin was created in %{dest} +Comment[ca]=Un connector per al plafó de navegació de Konqueror ha estat creada en %{dest} +Comment[da]=Et Konqueror navigationspanel plugin blev oprettet i %{dest} +Comment[de]=Ein Modul für den Navigationsbereich von Konqueror wurde in %{dest} erstellt. +Comment[el]=Ένα πρόσθετο του πίνακα πλοήγησης του konqueror δημιουργήθηκε στο %{dest} +Comment[es]=Un complemento para el panel de navegación de Konqueror ha sido creado en %{dest} +Comment[et]=Konquerori liikumispaneeli plugin loodi asukohta %{dest} +Comment[eu]=Konqueror-en arakatze-paneleko plugin bat sortu da hemen: %{dest} +Comment[fa]=یک وصلۀ تابلوی ناوش konqueror در %{dest} ایجاد شد +Comment[fr]=Un module externe pour le panneau de navigation de Konqueror a été créé dans %{dest} +Comment[ga]=Cruthaíodh breiseán painéil nascleanúna konqueror i %{dest} +Comment[gl]=Creouse unha extensión para o panel de navegación en %{dest} +Comment[hu]=Létrejött egy konqueroros navigációs modul itt: %{dest} +Comment[it]=È stato creato un plugin per il pannello di navigazione di Konqueror in %{dest} +Comment[ja]=Konqueror ナビゲーションプラグインを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Sietpaneelmoduul för Konqueror opstellt +Comment[ne]=कन्क्वेरर नेभिगेसन प्यानल प्लगइन %{dest} मा सिर्जना गरियो +Comment[nl]=Een Konqueror-navigatiepaneel-plugin is aangemaakt in %{dest} +Comment[pl]=Wtyczka do panelu nawigacyjnego Konquerora została utworzona w %{dest} +Comment[pt]=Um 'plugin' do painel de navegação do Konqueror foi criado em %{dest} +Comment[pt_BR]=Um 'plugin' do painel de navegação do Konqueror foi criado em %{dest} +Comment[ru]=Модуль панели навигации Konqueror создан в %{dest} +Comment[sk]=Modul pre konqueror navigačný panel bol vytvorený v %{dest} +Comment[sr]=Кonqueror-ов прикључак за навигациони панел направљен је у %{dest} +Comment[sr@Latn]=Konqueror-ov priključak za navigacioni panel napravljen je u %{dest} +Comment[sv]=Ett Konqueror-insticksprogram för navigeringspanelen skapades i %{dest} +Comment[tr]=Bir konqueror gezinme paneli eklentisi %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个 konqueror 导航器面板插件 +Comment[zh_TW]=一個 Konqueror 導覽面板外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/konqnavpanel/konqnavpanel.tdevelop b/languages/cpp/app_templates/konqnavpanel/konqnavpanel.tdevelop index 88bf952d..929b3c49 100644 --- a/languages/cpp/app_templates/konqnavpanel/konqnavpanel.tdevelop +++ b/languages/cpp/app_templates/konqnavpanel/konqnavpanel.tdevelop @@ -14,16 +14,16 @@ Kicker - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + src/lib%{APPNAMELC}.la debug @@ -45,8 +45,8 @@ -O0 -g3 - - + + @@ -54,8 +54,8 @@ - - + + ada ada_bugs_gcc @@ -92,24 +92,24 @@ qmake User Guide - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/konqnavpanel/konqnavpanel.tdevtemplate b/languages/cpp/app_templates/konqnavpanel/konqnavpanel.tdevtemplate deleted file mode 100644 index 01a924df..00000000 --- a/languages/cpp/app_templates/konqnavpanel/konqnavpanel.tdevtemplate +++ /dev/null @@ -1,192 +0,0 @@ -# TDE Config File -[General] -Name=Konqueror Navigation Panel Plugin -Name[br]=Lugent panell furchal Konqueror -Name[ca]=Un connector per al plafó de navegació de Konqueror -Name[da]=Konqueror navigationspanel plugin -Name[de]=Modul für den Navigationsbereich von Konqueror -Name[el]=Πρόσθετο πίνακα πλοήγησης του Konqueror -Name[es]=Un complemento para el panel de navegación de Konqueror -Name[et]=Konquerori liikumispaneeli plugin -Name[eu]=Konqueror arakatze-panel plugina -Name[fa]=وصلۀ تابلوی ناوش Konqueror -Name[fr]=Module externe pour le panneau de navigation de Konqueror -Name[ga]=Breiseán Painéil Nascleanúna Konqueror -Name[gl]=Extensión para o panel de navegación de Konqueror -Name[hu]=Konqueroros navigációs bővítőmodul -Name[it]=Plugin per il pannello di navigazione di Konqueror -Name[ja]=Konqueror ナビゲーションプラグイン -Name[nds]=En Sietpaneelmoduul för Konqueror -Name[ne]=कन्क्वेरर नेभिगेसन प्यानल प्लगइन -Name[nl]=Konqueror Navigatiepaneel-plugin -Name[pl]=Wtyczka panelu nawigacji Konquerora -Name[pt]='Plugin' do Painel de Navegação do Konqueror -Name[pt_BR]='Plugin' do Painel de Navegação do Konqueror -Name[ru]=Модуль панели навигации Konqueror -Name[sk]=Modul pre konqueror navigačný panel -Name[sr]=Кonqueror-ов прикључак за навигациони панел -Name[sr@Latn]=Konqueror-ov priključak za navigacioni panel -Name[sv]=Konqueror-insticksprogram för navigeringspanelen -Name[tr]=Konqueror Gezinme Paneli Eklentisi -Name[zh_CN]=Konqueror 导航面板插件 -Name[zh_TW]=Konqueror 導覽面板外掛程式 -Icon=konqnavpanel.png -Category=C++/TDE -Comment=Generates a framework for a plugin that embeds into Konqueror's navigation panel -Comment[ca]=Genera una infraestructura per a un connector que s'encasti al plafó de navegació de Konqueror -Comment[da]=Genererer et skelet for et plugin der indlejres i Konqueror's navigationspanel -Comment[de]=Erstellt das Gerüst für ein Modul, das in den Navigationsbereich von Konqueror eingebunden werden kann. -Comment[el]=Δημιουργεί ένα πλαίσιο για ένα πρόσθετο που ενσωματώνεται στον πίνακα πλοήγησης του Konqueror -Comment[es]=Genera una infraestructura para un complemento empotrado en el panel de navegación de Konqueror -Comment[et]=Plugina raamistiku loomine, mida saab põimida Konquerori liikumispaneelile. -Comment[eu]=Konqueror-en arakatze-panelean kapsulatzen den plugin batentzat lan-marko oso bat sortzen du -Comment[fa]=چارچوبی را برای یک وصله که در تابلوی ناوش Konqueror نهفته بود، تولید می‌کند -Comment[fr]=Génère une infrastructure pour un module externe qui s'intègre dans le panneau de navigation de Konqueror -Comment[gl]=Xera un contorno de traballo para unha extensión que se incrusta no panel de navegación de Konqueror -Comment[hu]=Létrehoz egy alapprogramot konqueroros navigációs panelmodul készítéséhez -Comment[it]=Genera l'infrastruttura per un plugin che si integra nel pannello di navigazione di Konqueror -Comment[nds]=Stellt dat Rahmenwark för en Moduul op, dat sik in't Sietpaneel vun Konqueror inbett -Comment[ne]=कन्क्वेररको नेभिगेसन प्यानलमा सम्मिलित हुने प्लगइनका लागि फ्रेमवर्क उत्पन्न गर्दछ -Comment[nl]=Genereert een framework voor een plugin die kan worden ingebed in Konqueror's navigatiepaneel. -Comment[pl]=Generuje wtyczkę, którą można osadzić w panelu nawigacyjnym Konquerora -Comment[pt]=Gera a plataforma para um 'plugin' que se incorpore no painel de navegação do Konqueror -Comment[pt_BR]=Gera a plataforma para um 'plugin' que se incorpore no painel de navegação do Konqueror -Comment[ru]=Создание модуля панели навигации Konqueror -Comment[sk]=Vygeneruje framework pre modul, ktorý sa bude dať vložiť do konqueror navigačného panelu -Comment[sr]=Прави радни оквир за прикључак који се уграђује у Konqueror-ов навигациони панел -Comment[sr@Latn]=Pravi radni okvir za priključak koji se ugrađuje u Konqueror-ov navigacioni panel -Comment[sv]=Skapar ett ramverk för ett insticksprogram som inbäddas i Konquerors navigeringspanel -Comment[tr]=Konqueror'un gezinme paneline gömülen bir eklenti için bir çatı oluşturur. -Comment[zh_CN]=生成可嵌入到 Konqueror 导航面板的插件框架 -Comment[zh_TW]=產生一個嵌入 Konqueror 導覽面板的外掛程式的框架 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=konqnavpanel.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/konqnavpanel.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[FILE10] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE11] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE12] -Type=install -Source=%{src}/konqnavpanel.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE13] -Type=install -Source=%{src}/konqnavpanel.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE14] -Type=install -Source=%{src}/konqnavpanel.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[MSG] -Type=message -Comment=A konqueror navigation panel plugin was created in %{dest} -Comment[ca]=Un connector per al plafó de navegació de Konqueror ha estat creada en %{dest} -Comment[da]=Et Konqueror navigationspanel plugin blev oprettet i %{dest} -Comment[de]=Ein Modul für den Navigationsbereich von Konqueror wurde in %{dest} erstellt. -Comment[el]=Ένα πρόσθετο του πίνακα πλοήγησης του konqueror δημιουργήθηκε στο %{dest} -Comment[es]=Un complemento para el panel de navegación de Konqueror ha sido creado en %{dest} -Comment[et]=Konquerori liikumispaneeli plugin loodi asukohta %{dest} -Comment[eu]=Konqueror-en arakatze-paneleko plugin bat sortu da hemen: %{dest} -Comment[fa]=یک وصلۀ تابلوی ناوش konqueror در %{dest} ایجاد شد -Comment[fr]=Un module externe pour le panneau de navigation de Konqueror a été créé dans %{dest} -Comment[ga]=Cruthaíodh breiseán painéil nascleanúna konqueror i %{dest} -Comment[gl]=Creouse unha extensión para o panel de navegación en %{dest} -Comment[hu]=Létrejött egy konqueroros navigációs modul itt: %{dest} -Comment[it]=È stato creato un plugin per il pannello di navigazione di Konqueror in %{dest} -Comment[ja]=Konqueror ナビゲーションプラグインを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Sietpaneelmoduul för Konqueror opstellt -Comment[ne]=कन्क्वेरर नेभिगेसन प्यानल प्लगइन %{dest} मा सिर्जना गरियो -Comment[nl]=Een Konqueror-navigatiepaneel-plugin is aangemaakt in %{dest} -Comment[pl]=Wtyczka do panelu nawigacyjnego Konquerora została utworzona w %{dest} -Comment[pt]=Um 'plugin' do painel de navegação do Konqueror foi criado em %{dest} -Comment[pt_BR]=Um 'plugin' do painel de navegação do Konqueror foi criado em %{dest} -Comment[ru]=Модуль панели навигации Konqueror создан в %{dest} -Comment[sk]=Modul pre konqueror navigačný panel bol vytvorený v %{dest} -Comment[sr]=Кonqueror-ов прикључак за навигациони панел направљен је у %{dest} -Comment[sr@Latn]=Konqueror-ov priključak za navigacioni panel napravljen je u %{dest} -Comment[sv]=Ett Konqueror-insticksprogram för navigeringspanelen skapades i %{dest} -Comment[tr]=Bir konqueror gezinme paneli eklentisi %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个 konqueror 导航器面板插件 -Comment[zh_TW]=一個 Konqueror 導覽面板外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kpartapp/CMakeLists.txt b/languages/cpp/app_templates/kpartapp/CMakeLists.txt index ab0ed3b0..9f3d8119 100644 --- a/languages/cpp/app_templates/kpartapp/CMakeLists.txt +++ b/languages/cpp/app_templates/kpartapp/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( kpartapp.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kpartapp.tar.gz kpartapp.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - kpartapp.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + kpartapp.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kpartapp/Makefile.am b/languages/cpp/app_templates/kpartapp/Makefile.am index 45c41564..bfb8ceed 100644 --- a/languages/cpp/app_templates/kpartapp/Makefile.am +++ b/languages/cpp/app_templates/kpartapp/Makefile.am @@ -3,10 +3,10 @@ dataFiles = src-Makefile.am app.cpp app.h app_part.cpp\ kpartapp.png app.tdevelop subdirs templateName = kpartapp ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/kpartapp/app.tdevelop b/languages/cpp/app_templates/kpartapp/app.tdevelop index 56e6f467..a8628fe3 100644 --- a/languages/cpp/app_templates/kpartapp/app.tdevelop +++ b/languages/cpp/app_templates/kpartapp/app.tdevelop @@ -13,16 +13,16 @@ TDE - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + src/%{APPNAMELC} debug @@ -47,8 +47,8 @@ -O0 -g3 - - + + @@ -56,8 +56,8 @@ - - + + ada ada_bugs_gcc @@ -92,24 +92,24 @@ qmake User Guide - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/kpartapp/kpartapp.kdevtemplate b/languages/cpp/app_templates/kpartapp/kpartapp.kdevtemplate new file mode 100644 index 00000000..773cc0d8 --- /dev/null +++ b/languages/cpp/app_templates/kpartapp/kpartapp.kdevtemplate @@ -0,0 +1,237 @@ +# TDE Config File +[General] +Name=Application framework (KParts) +Name[ca]=Infraestructura d'aplicació (KParts) +Name[da]=Programskelet (KParts) +Name[de]=Anwendungsgerüst (KParts) +Name[el]=Πλαίσιο εφαρμογής (KParts) +Name[es]=Infraestructura de aplicación (KParts) +Name[et]=Rakenduse raamistik (KParts) +Name[eu]=Aplikazioen lan-markoa (KParts) +Name[fa]=(KParts)چارچوب کاربرد +Name[fr]=Infrastructure d'application (KParts) +Name[ga]=Creatlach feidhmchláir (KParts) +Name[gl]=Entorno de traballo de aplicación (KParts) +Name[hu]=Alkalmazás-keretrendszer (objektumokkal) +Name[it]=Infrastruttura applicativa (KParts) +Name[ja]=アプリケーションフレームワーク (KParts) +Name[nds]=Programmrahmenwark (KParts) +Name[ne]=अनुप्रयोग फ्रेमवर्क (केडीई भाग) +Name[nl]=Toepassingframework (KParts) +Name[pl]=Szablon progamu (KParts) +Name[pt]=Plataforma de aplicações (KParts) +Name[pt_BR]=Plataforma de aplicações (KParts) +Name[ru]=Приложение KPart +Name[sk]=Aplikačný framework (KParts) +Name[sr]=Радни оквир програма (KParts) +Name[sr@Latn]=Radni okvir programa (KParts) +Name[sv]=Programramverk (KParts) +Name[tr]=Uygulama Çatısı (KParts) +Name[zh_CN]=应用程序框架(KParts) +Name[zh_TW]=應用程式框架(KParts) +Icon=kpartapp.png +Category=C++/TDE +Comment=Generates a complex TDE application with a KParts shell and a KPart component. +Comment[ca]=Genera una complexa aplicació per al TDE amb un intèrpret de comandaments KParts i un component KPart. +Comment[da]=Genererer et komplekst TDE-program med en KParts-skal og en KPart-komponent. +Comment[de]=Erstellt eine aufwändige TDE-Anwendung mit einer Shell für KParts und einer KPart-Komponente. +Comment[el]=Δημιουργεί μια πολύπλοκη εφαρμογή TDE με ένα κέλυφος KParts και ένα συστατικό KPart. +Comment[es]=Genera una aplicación TDE compleja con un contenedor KParts y un componente KPart. +Comment[et]=Keerulise TDE rakenduse loomine KParts-shelliga ja KPart-komponendiga. +Comment[eu]=TDE aplikazio konplexu bat sortzen du KParts shellbat eta KPart osagai batekin. +Comment[fa]=یک کاربرد پیچیدۀ TDE با یک پوستۀ KParts و یک مؤلفۀ KPart تولید می‌کند. +Comment[fr]=Génère une application TDE évoluée comprenant un shell KParts et un composant KPart. +Comment[ga]=Cruthaíonn sé seo feidhmchlár casta TDE le blaosc KParts agus comhpháirt KPart. +Comment[gl]=Xera unha aplicación TDE complexa cun terminal KPart e unha compoñente KPart. +Comment[hu]=Létrehoz egy komplex, objektumok használatát támogató TDE-s alkalmazást és egy KPart objektumot. +Comment[it]=Genera un'applicazione complessa di TDE con una shell di KParts e un componente KPart. +Comment[nds]=Stellt en vigeliensch TDE-Programm mit en Konsool för KPart un en KPart-Komponent op. +Comment[ne]=केडीई भाग शेल र केडीई भाग अवयवसँग जटिल केडीई अनुप्रयोग उत्पन्न गर्दछ । +Comment[nl]=Genereert een complexe TDE-toepassing met een KParts-shell en een KPart-component. +Comment[pl]=Generuje złożony program z powłoką KParts i komponentem KPart. +Comment[pt]=Gera uma aplicação complexa do TDE com uma infra-estrutura de KParts, bem como um componente KPart. +Comment[pt_BR]=Gera uma aplicação complexa do TDE com uma infra-estrutura de KParts, bem como um componente KPart. +Comment[ru]=Создание полноценного приложения TDE на базе компонента KPart. +Comment[sk]=Vygeneruje komplexnú TDE aplikáciu s KParts shell a s KPart komponentom. +Comment[sr]=Прави сложени TDE програм са KParts шкољком и KPart компонентом. +Comment[sr@Latn]=Pravi složeni TDE program sa KParts školjkom i KPart komponentom. +Comment[sv]=Skapar ett komplext TDE-program med ett KPart-skal och en KPart-komponent. +Comment[tr]=Bir KParts kabuğu ve KParts bileşeni olan karmaşık bir TDE uygulaması yaratır. +Comment[zh_CN]=生成一个带 KParts 外壳和 KPart 组件的复杂 TDE 应用程序。 +Comment[zh_TW]=產生一個複雜的 TDE 應用程式,內含 KParts shell 與 KPart 元件。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}_part.cpp +Archive=kpartapp.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/tde-part.desktop +Dest=%{dest}/src/%{APPNAMELC}_part.desktop + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/tde-app.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE10] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[FILE11] +Type=install +Source=%{tdevelop}/template-common/hi16-app-app.png +Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png +Process=false + +[FILE12] +Type=install +Source=%{tdevelop}/template-common/hi32-app-app.png +Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png +Process=false + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE13] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE14] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE15] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE16] +Type=install +Source=%{src}/app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE17] +Type=install +Source=%{src}/app.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE18] +Type=install +Source=%{src}/app_part.cpp +Dest=%{dest}/src/%{APPNAMELC}_part.cpp + +[FILE19] +Type=install +Source=%{src}/app_part.h +Dest=%{dest}/src/%{APPNAMELC}_part.h + +[FILE20] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/main.cpp + +[FILE21] +Type=install +EscapeXML=true +Source=%{src}/app_part.rc +Dest=%{dest}/src/%{APPNAMELC}_part.rc + +[FILE22] +Type=install +EscapeXML=true +Source=%{src}/app_shell.rc +Dest=%{dest}/src/%{APPNAMELC}_shell.rc + +[MSG] +Type=message +Comment=A complex TDE application using KParts was created in %{dest} +Comment[ca]=Una complexa aplicació per al TDE usant KParts ha estat creada en %{dest} +Comment[da]=Et komplekst TDE-program ved brug af KParts blev oprettet i %{dest} +Comment[de]=Eine aufwändige TDE-Anwendung, die KParts verwendet, wurde in %{dest} erstellt. +Comment[el]=Μια πολύπλοκη εφαρμογή TDE που χρησιμοποιεί το KParts δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación compleja para TDE que usa KParts ha sido creada en %{dest} +Comment[et]=KParts'i kasutav keeruline TDE rakendus loodi asukohta %{dest} +Comment[eu]=TDE aplikazio konplexu bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد پیچیدۀ TDE با استفاده از KParts در %{dest} ایجاد شد +Comment[fr]=Une application TDE évoluée utilisant KParts a été créée dans %{dest} +Comment[ga]=Cruthaíodh feidhmchlár casta TDE a úsáideann KParts i %{dest} +Comment[gl]=Creouse unha aplicación TDE complexa usando KParts en %{dest} +Comment[hu]=Létrejött egy komplex, objektumok használatát támogató TDE-s alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione TDE complessa usando KParts in %{dest} +Comment[ja]=KParts を使った複雑な TDE アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en vigeliensch TDE-Programm opstellt, dat "KParts" bruukt. +Comment[ne]=केडीई भाग प्रयोग गरेर जटिल केडीई अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een complexe TDE-toepassing gebruik makend van KParts is aangemaakt in %{dest} +Comment[pl]=Złożony program TDE używający KParts został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação complexa do TDE, que usa o KParts, em %{dest} +Comment[pt_BR]=Foi criada uma aplicação complexa do TDE, que usa o KParts, em %{dest} +Comment[ru]=Приложение TDE на базе компонента KPart создано в %{dest} +Comment[sk]=Komplexná TDE aplikácia používajúca KParts bola vytvorená v %{dest} +Comment[sr]=Сложени TDE програм на основу KParts направљен је у %{dest} +Comment[sr@Latn]=Složeni TDE program na osnovu KParts napravljen je u %{dest} +Comment[sv]=Ett komplext TDE-program som använder KParts skapades i %{dest} +Comment[tr]=KParts kullanan karmaşık bir TDE uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个使用 KParts 的复杂 TDE 应用程序 +Comment[zh_TW]=一個使用 KParts 的複雜 TDE 應用程式已建立於 %{dest} + diff --git a/languages/cpp/app_templates/kpartapp/kpartapp.tdevtemplate b/languages/cpp/app_templates/kpartapp/kpartapp.tdevtemplate deleted file mode 100644 index 11aaaabb..00000000 --- a/languages/cpp/app_templates/kpartapp/kpartapp.tdevtemplate +++ /dev/null @@ -1,237 +0,0 @@ -# TDE Config File -[General] -Name=Application framework (KParts) -Name[ca]=Infraestructura d'aplicació (KParts) -Name[da]=Programskelet (KParts) -Name[de]=Anwendungsgerüst (KParts) -Name[el]=Πλαίσιο εφαρμογής (KParts) -Name[es]=Infraestructura de aplicación (KParts) -Name[et]=Rakenduse raamistik (KParts) -Name[eu]=Aplikazioen lan-markoa (KParts) -Name[fa]=(KParts)چارچوب کاربرد -Name[fr]=Infrastructure d'application (KParts) -Name[ga]=Creatlach feidhmchláir (KParts) -Name[gl]=Entorno de traballo de aplicación (KParts) -Name[hu]=Alkalmazás-keretrendszer (objektumokkal) -Name[it]=Infrastruttura applicativa (KParts) -Name[ja]=アプリケーションフレームワーク (KParts) -Name[nds]=Programmrahmenwark (KParts) -Name[ne]=अनुप्रयोग फ्रेमवर्क (केडीई भाग) -Name[nl]=Toepassingframework (KParts) -Name[pl]=Szablon progamu (KParts) -Name[pt]=Plataforma de aplicações (KParts) -Name[pt_BR]=Plataforma de aplicações (KParts) -Name[ru]=Приложение KPart -Name[sk]=Aplikačný framework (KParts) -Name[sr]=Радни оквир програма (KParts) -Name[sr@Latn]=Radni okvir programa (KParts) -Name[sv]=Programramverk (KParts) -Name[tr]=Uygulama Çatısı (KParts) -Name[zh_CN]=应用程序框架(KParts) -Name[zh_TW]=應用程式框架(KParts) -Icon=kpartapp.png -Category=C++/TDE -Comment=Generates a complex TDE application with a KParts shell and a KPart component. -Comment[ca]=Genera una complexa aplicació per al TDE amb un intèrpret de comandaments KParts i un component KPart. -Comment[da]=Genererer et komplekst TDE-program med en KParts-skal og en KPart-komponent. -Comment[de]=Erstellt eine aufwändige TDE-Anwendung mit einer Shell für KParts und einer KPart-Komponente. -Comment[el]=Δημιουργεί μια πολύπλοκη εφαρμογή TDE με ένα κέλυφος KParts και ένα συστατικό KPart. -Comment[es]=Genera una aplicación TDE compleja con un contenedor KParts y un componente KPart. -Comment[et]=Keerulise TDE rakenduse loomine KParts-shelliga ja KPart-komponendiga. -Comment[eu]=TDE aplikazio konplexu bat sortzen du KParts shellbat eta KPart osagai batekin. -Comment[fa]=یک کاربرد پیچیدۀ TDE با یک پوستۀ KParts و یک مؤلفۀ KPart تولید می‌کند. -Comment[fr]=Génère une application TDE évoluée comprenant un shell KParts et un composant KPart. -Comment[ga]=Cruthaíonn sé seo feidhmchlár casta TDE le blaosc KParts agus comhpháirt KPart. -Comment[gl]=Xera unha aplicación TDE complexa cun terminal KPart e unha compoñente KPart. -Comment[hu]=Létrehoz egy komplex, objektumok használatát támogató TDE-s alkalmazást és egy KPart objektumot. -Comment[it]=Genera un'applicazione complessa di TDE con una shell di KParts e un componente KPart. -Comment[nds]=Stellt en vigeliensch TDE-Programm mit en Konsool för KPart un en KPart-Komponent op. -Comment[ne]=केडीई भाग शेल र केडीई भाग अवयवसँग जटिल केडीई अनुप्रयोग उत्पन्न गर्दछ । -Comment[nl]=Genereert een complexe TDE-toepassing met een KParts-shell en een KPart-component. -Comment[pl]=Generuje złożony program z powłoką KParts i komponentem KPart. -Comment[pt]=Gera uma aplicação complexa do TDE com uma infra-estrutura de KParts, bem como um componente KPart. -Comment[pt_BR]=Gera uma aplicação complexa do TDE com uma infra-estrutura de KParts, bem como um componente KPart. -Comment[ru]=Создание полноценного приложения TDE на базе компонента KPart. -Comment[sk]=Vygeneruje komplexnú TDE aplikáciu s KParts shell a s KPart komponentom. -Comment[sr]=Прави сложени TDE програм са KParts шкољком и KPart компонентом. -Comment[sr@Latn]=Pravi složeni TDE program sa KParts školjkom i KPart komponentom. -Comment[sv]=Skapar ett komplext TDE-program med ett KPart-skal och en KPart-komponent. -Comment[tr]=Bir KParts kabuğu ve KParts bileşeni olan karmaşık bir TDE uygulaması yaratır. -Comment[zh_CN]=生成一个带 KParts 外壳和 KPart 组件的复杂 TDE 应用程序。 -Comment[zh_TW]=產生一個複雜的 TDE 應用程式,內含 KParts shell 與 KPart 元件。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}_part.cpp -Archive=kpartapp.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/tde-part.desktop -Dest=%{dest}/src/%{APPNAMELC}_part.desktop - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/tde-app.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE10] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[FILE11] -Type=install -Source=%{tdevelop}/template-common/hi16-app-app.png -Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png -Process=false - -[FILE12] -Type=install -Source=%{tdevelop}/template-common/hi32-app-app.png -Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png -Process=false - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE13] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE14] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE15] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE16] -Type=install -Source=%{src}/app.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE17] -Type=install -Source=%{src}/app.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE18] -Type=install -Source=%{src}/app_part.cpp -Dest=%{dest}/src/%{APPNAMELC}_part.cpp - -[FILE19] -Type=install -Source=%{src}/app_part.h -Dest=%{dest}/src/%{APPNAMELC}_part.h - -[FILE20] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/main.cpp - -[FILE21] -Type=install -EscapeXML=true -Source=%{src}/app_part.rc -Dest=%{dest}/src/%{APPNAMELC}_part.rc - -[FILE22] -Type=install -EscapeXML=true -Source=%{src}/app_shell.rc -Dest=%{dest}/src/%{APPNAMELC}_shell.rc - -[MSG] -Type=message -Comment=A complex TDE application using KParts was created in %{dest} -Comment[ca]=Una complexa aplicació per al TDE usant KParts ha estat creada en %{dest} -Comment[da]=Et komplekst TDE-program ved brug af KParts blev oprettet i %{dest} -Comment[de]=Eine aufwändige TDE-Anwendung, die KParts verwendet, wurde in %{dest} erstellt. -Comment[el]=Μια πολύπλοκη εφαρμογή TDE που χρησιμοποιεί το KParts δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación compleja para TDE que usa KParts ha sido creada en %{dest} -Comment[et]=KParts'i kasutav keeruline TDE rakendus loodi asukohta %{dest} -Comment[eu]=TDE aplikazio konplexu bat sortu da hemen: %{dest} -Comment[fa]=یک کاربرد پیچیدۀ TDE با استفاده از KParts در %{dest} ایجاد شد -Comment[fr]=Une application TDE évoluée utilisant KParts a été créée dans %{dest} -Comment[ga]=Cruthaíodh feidhmchlár casta TDE a úsáideann KParts i %{dest} -Comment[gl]=Creouse unha aplicación TDE complexa usando KParts en %{dest} -Comment[hu]=Létrejött egy komplex, objektumok használatát támogató TDE-s alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione TDE complessa usando KParts in %{dest} -Comment[ja]=KParts を使った複雑な TDE アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en vigeliensch TDE-Programm opstellt, dat "KParts" bruukt. -Comment[ne]=केडीई भाग प्रयोग गरेर जटिल केडीई अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een complexe TDE-toepassing gebruik makend van KParts is aangemaakt in %{dest} -Comment[pl]=Złożony program TDE używający KParts został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação complexa do TDE, que usa o KParts, em %{dest} -Comment[pt_BR]=Foi criada uma aplicação complexa do TDE, que usa o KParts, em %{dest} -Comment[ru]=Приложение TDE на базе компонента KPart создано в %{dest} -Comment[sk]=Komplexná TDE aplikácia používajúca KParts bola vytvorená v %{dest} -Comment[sr]=Сложени TDE програм на основу KParts направљен је у %{dest} -Comment[sr@Latn]=Složeni TDE program na osnovu KParts napravljen je u %{dest} -Comment[sv]=Ett komplext TDE-program som använder KParts skapades i %{dest} -Comment[tr]=KParts kullanan karmaşık bir TDE uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个使用 KParts 的复杂 TDE 应用程序 -Comment[zh_TW]=一個使用 KParts 的複雜 TDE 應用程式已建立於 %{dest} - diff --git a/languages/cpp/app_templates/kpartplugin/CMakeLists.txt b/languages/cpp/app_templates/kpartplugin/CMakeLists.txt index a1d063b0..00f4c664 100644 --- a/languages/cpp/app_templates/kpartplugin/CMakeLists.txt +++ b/languages/cpp/app_templates/kpartplugin/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( kpartplugin.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kpartplugin.tar.gz kpartplugin.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - kpartplugin.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + kpartplugin.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kpartplugin/Makefile.am b/languages/cpp/app_templates/kpartplugin/Makefile.am index dd0a5612..057be667 100644 --- a/languages/cpp/app_templates/kpartplugin/Makefile.am +++ b/languages/cpp/app_templates/kpartplugin/Makefile.am @@ -5,10 +5,10 @@ dataFiles = src-Makefile.am plugin_app.cpp plugin_app.h \ templateName = kpartplugin ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/kpartplugin/kpartplugin.kdevtemplate b/languages/cpp/app_templates/kpartplugin/kpartplugin.kdevtemplate new file mode 100644 index 00000000..59ca51d8 --- /dev/null +++ b/languages/cpp/app_templates/kpartplugin/kpartplugin.kdevtemplate @@ -0,0 +1,204 @@ +# TDE Config File +[General] +Name=TDEHTMLPart plugin +Name[br]=Lugent TDEHTMLPart +Name[ca]=Connector per a TDEHTMLPart +Name[de]=TDEHTMLPart-Modul +Name[el]=Πρόσθετο TDEHTMLPart +Name[es]=Complemento para TDEHTMLPart +Name[eu]=TDEHTMLPart plugina +Name[fa]=وصلۀ TDEHTMLPart +Name[fr]=Module externe pour le composant TDEHTML +Name[ga]=Breiseán TDEHTMLPart +Name[gl]=Extensión para TDEHTMLPart +Name[hu]=TDEHTML-bővítőmodul +Name[it]=Plugin TDEHTMLPart +Name[ja]=TDEHTMLPart プラグイン +Name[nds]=TDEHTMLPart-Moduul +Name[ne]=TDEHTMLPart प्लगइन +Name[nl]=TDEHTMLPart-plugin +Name[pl]=Wtyczka do TDEHTMLPart +Name[pt]='Plugin' do TDEHTMLPart +Name[pt_BR]='Plugin' do TDEHTMLPart +Name[ru]=Модуль TDEHTMLPart +Name[sk]=TDEHTMLPart modul +Name[sl]=Vstavek za TDEHTMLPart +Name[sr]=Прикључак за део TDEHTML +Name[sr@Latn]=Priključak za deo TDEHTML +Name[sv]=Insticksprogram för TDEHTML-delprogram +Name[tr]=TDEHTMLPart Eklentisi +Name[zh_CN]=TDEHTMLPart 插件 +Name[zh_TW]=TDEHTMLPart 外掛程式 +Icon=kpartplugin.png +Category=C++/TDE +Comment=Generates a plugin for the TDEHTML part. +Comment[ca]=Genera un connector per a la part TDEHTML. +Comment[da]=Genererer et plugin for TDEHTML parten. +Comment[de]=Erstellt ein Modul für die Komponente TDEHTML +Comment[el]=Δημιουργεί ένα πρόσθετο για το τμήμα TDEHTML. +Comment[es]=Genera un complemento para TDEHTMLPart. +Comment[et]=TDEHTML-komponendi plugina loomine. +Comment[eu]=TDEHTML zatirako plugin bat sortzen du. +Comment[fa]=یک وصله برای جزء TDEHTML تولید می‌کند +Comment[fr]=Génère un module externe pour le composant TDEHTML. +Comment[gl]=Xera unha extensión para o 'part' TDEHTML. +Comment[hu]=Létrehoz egy TDEHTML-bővítőmodult. +Comment[it]=Genera un plugin per la part TDEHTML. +Comment[ja]=TDEHTML パートのためのプラグインを作成します +Comment[nds]=Stellt en Moduul för de Komponent TDEHTML op. +Comment[ne]=TDEHTML भागका लागि प्लगइन उत्पन्न गर्दछ । +Comment[nl]=Genereert een plugin voor de TDEHTML-part. +Comment[pl]=Generuje wtyczkę do TDEHTML part. +Comment[pt]=Gera um 'plugin' para a componente TDEHTML. +Comment[pt_BR]=Gera um 'plugin' para a componente TDEHTML. +Comment[ru]=Создание модуля для компонента TDEHTML. +Comment[sk]=Vygeneruje modul pre TDEHTML part. +Comment[sr]=Прави прикључак за део TDEHTML. +Comment[sr@Latn]=Pravi priključak za deo TDEHTML. +Comment[sv]=Skapar ett insticksprogram för TDEHTML-delprogrammet +Comment[zh_CN]=生成 TDEHTML 部件的插件。 +Comment[zh_TW]=產生一個 TDEHTML part 的外掛程式 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/plugin_%{APPNAMELC}.cpp +Archive=kpartplugin.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/plugin.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE10] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE11] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE12] +Type=install +Source=%{src}/plugin_app.cpp +Dest=%{dest}/src/plugin_%{APPNAMELC}.cpp + +[FILE13] +Type=install +Source=%{src}/plugin_app.h +Dest=%{dest}/src/plugin_%{APPNAMELC}.h + +[FILE14] +Type=install +EscapeXML=true +Source=%{src}/plugin_app.rc +Dest=%{dest}/src/plugin_%{APPNAMELC}.rc + +[FILE15] +Type=install +Source=%{src}/hi16-action-plugin.png +Dest=%{dest}/src/hi16-action-plugin.png +Process=false + +[FILE16] +Type=install +Source=%{src}/hi22-action-plugin.png +Dest=%{dest}/src/hi32-action-plugin.png +Process=false + +[MSG] +Type=message +Comment=A TDEHTMLPart plugin was created in %{dest} +Comment[ca]=Un connector per a TDEHTMLPart ha estat creat en %{dest} +Comment[da]=Et TDEHTMLPart plugin blev oprettet i %{dest} +Comment[de]=Ein Modul für die Komponente TDEHTML wurde in %{dest} erstellt. +Comment[el]=Ένα πρόσθετο τμήμα TDEHTML δημιουργήθηκε στο %{dest} +Comment[es]=Un complemento para TDEHTMLPart ha sido creado en %{dest} +Comment[et]=TDEHTMLPart plugin loodi asukohta %{dest} +Comment[eu]=TDEHTMLPart plugin bat sortu da hemen: %{dest} +Comment[fa]=یک وصلۀ جزء TDEHTML در %{dest} ایجاد شد +Comment[fr]=Un module externe pour TDEHTMLPart a été créé dans %{dest} +Comment[ga]=Cruthaíodh breiseán TDEHTMLPart i %{dest} +Comment[gl]=Creouse unha extensión para TDEHTMLPart en %{dest} +Comment[hu]=Létrejött egy TDEHTML-bővítőmodul itt: %{dest} +Comment[it]=È stato creato un plugin TDEHTMLPart in %{dest} +Comment[ja]=TDEHTMLPart プラグインを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en TDEHTMLPart-Moduul opstellt +Comment[ne]=TDEHTMLPart प्लगइन %{dest} मा सिर्जना गरियो +Comment[nl]=Een TDEHTMLPart-plugin is aangemaakt in %{dest} +Comment[pl]=Wtyczka do TDEHTMLPart została utworzona w %{dest} +Comment[pt]=Foi criado um 'plugin' TDEHTMLPart em %{dest} +Comment[pt_BR]=Foi criado um 'plugin' TDEHTMLPart em %{dest} +Comment[ru]=Модуль для компонента TDEHTML создан в %{dest} +Comment[sk]=TDEHTML modul bol vytvorený v %{dest} +Comment[sr]=Прикључак за део TDEHTML направљен је у %{dest} +Comment[sr@Latn]=Priključak za deo TDEHTML napravljen je u %{dest} +Comment[sv]=Ett insticksprogram för TDEHTML-delprogrammet skapades i %{dest} +Comment[tr]=Bir TDEHTMLPart eklentisi %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个 TDEHTMLPart 插件 +Comment[zh_TW]=一個 TDEHTML 外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kpartplugin/kpartplugin.tdevtemplate b/languages/cpp/app_templates/kpartplugin/kpartplugin.tdevtemplate deleted file mode 100644 index dc3b3e04..00000000 --- a/languages/cpp/app_templates/kpartplugin/kpartplugin.tdevtemplate +++ /dev/null @@ -1,204 +0,0 @@ -# TDE Config File -[General] -Name=TDEHTMLPart plugin -Name[br]=Lugent TDEHTMLPart -Name[ca]=Connector per a TDEHTMLPart -Name[de]=TDEHTMLPart-Modul -Name[el]=Πρόσθετο TDEHTMLPart -Name[es]=Complemento para TDEHTMLPart -Name[eu]=TDEHTMLPart plugina -Name[fa]=وصلۀ TDEHTMLPart -Name[fr]=Module externe pour le composant TDEHTML -Name[ga]=Breiseán TDEHTMLPart -Name[gl]=Extensión para TDEHTMLPart -Name[hu]=TDEHTML-bővítőmodul -Name[it]=Plugin TDEHTMLPart -Name[ja]=TDEHTMLPart プラグイン -Name[nds]=TDEHTMLPart-Moduul -Name[ne]=TDEHTMLPart प्लगइन -Name[nl]=TDEHTMLPart-plugin -Name[pl]=Wtyczka do TDEHTMLPart -Name[pt]='Plugin' do TDEHTMLPart -Name[pt_BR]='Plugin' do TDEHTMLPart -Name[ru]=Модуль TDEHTMLPart -Name[sk]=TDEHTMLPart modul -Name[sl]=Vstavek za TDEHTMLPart -Name[sr]=Прикључак за део TDEHTML -Name[sr@Latn]=Priključak za deo TDEHTML -Name[sv]=Insticksprogram för TDEHTML-delprogram -Name[tr]=TDEHTMLPart Eklentisi -Name[zh_CN]=TDEHTMLPart 插件 -Name[zh_TW]=TDEHTMLPart 外掛程式 -Icon=kpartplugin.png -Category=C++/TDE -Comment=Generates a plugin for the TDEHTML part. -Comment[ca]=Genera un connector per a la part TDEHTML. -Comment[da]=Genererer et plugin for TDEHTML parten. -Comment[de]=Erstellt ein Modul für die Komponente TDEHTML -Comment[el]=Δημιουργεί ένα πρόσθετο για το τμήμα TDEHTML. -Comment[es]=Genera un complemento para TDEHTMLPart. -Comment[et]=TDEHTML-komponendi plugina loomine. -Comment[eu]=TDEHTML zatirako plugin bat sortzen du. -Comment[fa]=یک وصله برای جزء TDEHTML تولید می‌کند -Comment[fr]=Génère un module externe pour le composant TDEHTML. -Comment[gl]=Xera unha extensión para o 'part' TDEHTML. -Comment[hu]=Létrehoz egy TDEHTML-bővítőmodult. -Comment[it]=Genera un plugin per la part TDEHTML. -Comment[ja]=TDEHTML パートのためのプラグインを作成します -Comment[nds]=Stellt en Moduul för de Komponent TDEHTML op. -Comment[ne]=TDEHTML भागका लागि प्लगइन उत्पन्न गर्दछ । -Comment[nl]=Genereert een plugin voor de TDEHTML-part. -Comment[pl]=Generuje wtyczkę do TDEHTML part. -Comment[pt]=Gera um 'plugin' para a componente TDEHTML. -Comment[pt_BR]=Gera um 'plugin' para a componente TDEHTML. -Comment[ru]=Создание модуля для компонента TDEHTML. -Comment[sk]=Vygeneruje modul pre TDEHTML part. -Comment[sr]=Прави прикључак за део TDEHTML. -Comment[sr@Latn]=Pravi priključak za deo TDEHTML. -Comment[sv]=Skapar ett insticksprogram för TDEHTML-delprogrammet -Comment[zh_CN]=生成 TDEHTML 部件的插件。 -Comment[zh_TW]=產生一個 TDEHTML part 的外掛程式 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/plugin_%{APPNAMELC}.cpp -Archive=kpartplugin.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/plugin.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE10] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE11] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE12] -Type=install -Source=%{src}/plugin_app.cpp -Dest=%{dest}/src/plugin_%{APPNAMELC}.cpp - -[FILE13] -Type=install -Source=%{src}/plugin_app.h -Dest=%{dest}/src/plugin_%{APPNAMELC}.h - -[FILE14] -Type=install -EscapeXML=true -Source=%{src}/plugin_app.rc -Dest=%{dest}/src/plugin_%{APPNAMELC}.rc - -[FILE15] -Type=install -Source=%{src}/hi16-action-plugin.png -Dest=%{dest}/src/hi16-action-plugin.png -Process=false - -[FILE16] -Type=install -Source=%{src}/hi22-action-plugin.png -Dest=%{dest}/src/hi32-action-plugin.png -Process=false - -[MSG] -Type=message -Comment=A TDEHTMLPart plugin was created in %{dest} -Comment[ca]=Un connector per a TDEHTMLPart ha estat creat en %{dest} -Comment[da]=Et TDEHTMLPart plugin blev oprettet i %{dest} -Comment[de]=Ein Modul für die Komponente TDEHTML wurde in %{dest} erstellt. -Comment[el]=Ένα πρόσθετο τμήμα TDEHTML δημιουργήθηκε στο %{dest} -Comment[es]=Un complemento para TDEHTMLPart ha sido creado en %{dest} -Comment[et]=TDEHTMLPart plugin loodi asukohta %{dest} -Comment[eu]=TDEHTMLPart plugin bat sortu da hemen: %{dest} -Comment[fa]=یک وصلۀ جزء TDEHTML در %{dest} ایجاد شد -Comment[fr]=Un module externe pour TDEHTMLPart a été créé dans %{dest} -Comment[ga]=Cruthaíodh breiseán TDEHTMLPart i %{dest} -Comment[gl]=Creouse unha extensión para TDEHTMLPart en %{dest} -Comment[hu]=Létrejött egy TDEHTML-bővítőmodul itt: %{dest} -Comment[it]=È stato creato un plugin TDEHTMLPart in %{dest} -Comment[ja]=TDEHTMLPart プラグインを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en TDEHTMLPart-Moduul opstellt -Comment[ne]=TDEHTMLPart प्लगइन %{dest} मा सिर्जना गरियो -Comment[nl]=Een TDEHTMLPart-plugin is aangemaakt in %{dest} -Comment[pl]=Wtyczka do TDEHTMLPart została utworzona w %{dest} -Comment[pt]=Foi criado um 'plugin' TDEHTMLPart em %{dest} -Comment[pt_BR]=Foi criado um 'plugin' TDEHTMLPart em %{dest} -Comment[ru]=Модуль для компонента TDEHTML создан в %{dest} -Comment[sk]=TDEHTML modul bol vytvorený v %{dest} -Comment[sr]=Прикључак за део TDEHTML направљен је у %{dest} -Comment[sr@Latn]=Priključak za deo TDEHTML napravljen je u %{dest} -Comment[sv]=Ett insticksprogram för TDEHTML-delprogrammet skapades i %{dest} -Comment[tr]=Bir TDEHTMLPart eklentisi %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个 TDEHTMLPart 插件 -Comment[zh_TW]=一個 TDEHTML 外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kpartplugin/plugin.tdevelop b/languages/cpp/app_templates/kpartplugin/plugin.tdevelop index 2a61c8d5..c94ba886 100644 --- a/languages/cpp/app_templates/kpartplugin/plugin.tdevelop +++ b/languages/cpp/app_templates/kpartplugin/plugin.tdevelop @@ -13,16 +13,16 @@ TDE - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + src/lib%{APPNAMELC}.la debug @@ -44,8 +44,8 @@ -O0 -g3 - - + + @@ -53,8 +53,8 @@ - - + + ada ada_bugs_gcc @@ -91,24 +91,24 @@ qmake User Guide - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/kscons_kxt/CMakeLists.txt b/languages/cpp/app_templates/kscons_kxt/CMakeLists.txt index 2aa03b98..bf1be9f6 100644 --- a/languages/cpp/app_templates/kscons_kxt/CMakeLists.txt +++ b/languages/cpp/app_templates/kscons_kxt/CMakeLists.txt @@ -21,9 +21,9 @@ add_custom_target( kscons_kxt.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kscons_kxt.tar.gz kscons_kxt.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - kscons_kxt.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + kscons_kxt.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kscons_kxt/Makefile.am b/languages/cpp/app_templates/kscons_kxt/Makefile.am index 5f00c212..59a58ee1 100644 --- a/languages/cpp/app_templates/kscons_kxt/Makefile.am +++ b/languages/cpp/app_templates/kscons_kxt/Makefile.am @@ -7,10 +7,10 @@ QUICKSTART INSTALL README templateName= kscons_kxt ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/kscons_kxt/app.tdevelop b/languages/cpp/app_templates/kscons_kxt/app.tdevelop index b32b6656..317a4cbc 100644 --- a/languages/cpp/app_templates/kscons_kxt/app.tdevelop +++ b/languages/cpp/app_templates/kscons_kxt/app.tdevelop @@ -17,16 +17,16 @@ - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + src/%{APPNAMELC} debug @@ -62,8 +62,8 @@ -O0 -g3 - - + + @@ -75,8 +75,8 @@ false *.o,*.lo,CVS - - + + ada ada_bugs_gcc @@ -111,8 +111,8 @@ qmake User Guide - - + + libtool @@ -126,16 +126,16 @@ false true - - + + - - + + -f -dP @@ -144,7 +144,7 @@ -u3 -p - + @@ -156,14 +156,14 @@ true - + true 2 - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/kscons_kxt/kscons_kxt.kdevtemplate b/languages/cpp/app_templates/kscons_kxt/kscons_kxt.kdevtemplate new file mode 100644 index 00000000..20d35070 --- /dev/null +++ b/languages/cpp/app_templates/kscons_kxt/kscons_kxt.kdevtemplate @@ -0,0 +1,253 @@ +# TDE Config File +[General] +Name=Scons-based TDE application +Name[ca]=Una aplicació per al TDE basada en Scons +Name[da]=Scons-baseret TDE program +Name[de]=Auf Scons basierende TDE-Anwendung +Name[el]=Μια εφαρμογή KMDI βασισμένης στο Scons +Name[es]=Aplicación para TDE basada en Scons +Name[et]=TDE rakendus Sconsi põhjal +Name[eu]=Scons-en oinarritutako TDE aplikazioa +Name[fa]=کاربرد TDE بر مبنای Scons +Name[fr]=Application TDE basée sur Scons +Name[ga]=Feidhmchlár TDE bunaithe ar Scons +Name[gl]=Aplicación TDE baseada en Scons +Name[hu]=Scons-alapú TDE-s alkalmazás +Name[it]=Un'applicazione TDE basata su scons +Name[ja]=Scons を使った TDE アプリケーション +Name[nds]=Op "Scons" opbuut TDE-Programm +Name[ne]=स्कोन-आधारित केडीई अनुप्रयोग +Name[nl]=Scons gebaseerde TDE-toepassing +Name[pl]=Program TDE wykorzystujący Scons +Name[pt]=Aplicação TDE usando Scons +Name[pt_BR]=Aplicação TDE usando Scons +Name[ru]=Приложение TDE на базе Scons +Name[sk]=TDE aplikácia založená na Scons +Name[sr]=TDE програм на основу Scons-а +Name[sr@Latn]=TDE program na osnovu Scons-a +Name[sv]=Scons-baserat TDE-program +Name[tr]=Scons-tabanlı TDE Uygulaması +Name[zh_CN]=基于 Scons 的 TDE 应用程序 +Name[zh_TW]=Scons 為基礎的 TDE 應用程式 +Category=C++/TDE +Icon=kscons_kxt.png +Comment=Generates a simple TDE application with one widget, a configuration dialog and a dcop interface. Scons scripts are provided for compiling and installing the application. +Comment[ca]=Genera una simple aplicació per al TDE amb un estri, un diàleg de configuració i una interfície dcop. Els scripts en Scons són proveïts per a compilar i instal·lar l'aplicació. +Comment[da]=Genererer et simpelt TDE program med en kontrol, en indstillingsdialog og en dcop-grænseflade. Der sørges for scons-scripter til at kompilere og installere programmet. +Comment[de]=Erstellt eine einfache TDE-Anwendung mit einem Widget, einem Einstellungsdialog und einer DCOP-Schnittstelle. Scons-Skripte zum Kompileren und Installieren der Anwendung werden zur Verfügung gestellt. +Comment[el]=Δημιουργεί μια απλή εφαρμογή TDE με ένα γραφικό συστατικό, ένα διάλογο ρύθμισης και μια διασύνδεση dcop. Προσφέρονται σενάρια Scons για τη μεταγλώττιση και εγκατάσταση της εφαρμογής. +Comment[en_GB]=Generates a simple TDE application with one widget, a configuration dialogue and a dcop interface. Scons scripts are provided for compiling and installing the application. +Comment[es]=Genera una sencilla aplicación para TDE con una ventana principal, un diálogo de configuración y una interfaz DCOP. Se proporcionan guiones en Scons para compilar e instalar la aplicación. +Comment[et]=Lihtsa TDE rakenduse loomine ühe vidina, seadistusdialoogi ja DCOP-liidesega. Luuakse ka Sconsi skriptid rakenduse kompileerimiseks ja paigaldamiseks. +Comment[eu]=TDE aplikazio sinple bat sortzen du trepeta bat, konfigurazio-elkarrizketa eta dcop interfaze batekin. Aplikazioa konpilatu eta instalatzeko Scons script-ak sortzen ditu. +Comment[fa]=یک کاربرد سادۀ TDE با یک عنصر، یک محاورۀ پیکربندی و یک واسط dcop تولید می‌کند. دست‌نوشته‌های Scons برای ترجمه و نصب کاربرد فراهم شده‌اند. +Comment[fr]=Génère une application TDE simple comprenant un seul élément graphique (widget), une boîte de dialogue de configuration et une interface DCOP. Des scripts Scons sont fournis pour compiler et installer l'application. +Comment[gl]=Xera unha aplicación sinxela TDE cunha compoñente, un diálogo de configuración e unha interface dcop. Os scripts scons proporciónanse para compilar e intalar a aplicación. +Comment[hu]=Létrehoz egy egyszerű TDE-alkalmazást egy főablakkal, beállítóablakkal és DCOP-felülettel. Az alkalmazás lefordításához és telepítéséhez Scons-szkriptek állnak rendelkezésre. +Comment[it]=Genera una semplice applicazione TDE con un elemento grafico, una finestra di configurazione e un'interfaccia DCOP. Gli script scons sono forniti per compilare e installare l'applicazione. +Comment[nds]=Stellt en eenfach TDE-Programm mit een Element, en Instelldialoog un en DCOP-Koppelsteed op. Stellt Scons-Skripten för't Kompileren un Installeren vun't Programm praat. +Comment[ne]=एउटा विगेट, कन्फिगरेसन संवाद र dcop इन्टरफेससँग एउटा साधारण केडीई अनुप्रयोग उत्पन्न गर्दछ । स्कोन स्क्रिप्टहरू अनुप्रयोग स्थापना र कम्पाइल गर्नका लागि प्रदान गरिन्छ । +Comment[nl]=Genereert een eenvoudige TDE-toepassing met één toplevel widget, een configuratievenster en een DCOP-interface. Scons-scripts worden aangemaakt voor compilatie en installatie. +Comment[pl]=Generuje prosty program dla TDE widgetem, oknem konfiguracyjnym i interfejsem dcop. Do kompilacji i instalacji programu wykorzystywane są skrypty Scons. +Comment[pt]=Gera uma aplicação simples do TDE com uma janela principal, uma de configuração e uma interface de DCOP. Os ficheiros do 'scons' são oferecidos para compilar e instalar a aplicação. +Comment[pt_BR]=Gera uma aplicação simples do TDE com uma janela principal, uma de configuração e uma interface de DCOP. Os ficheiros do 'scons' são oferecidos para compilar e instalar a aplicação. +Comment[ru]=Создание простого приложения TDE с одним виджетом, окном настройки и интерфейсом DCOP. Сборка и установка осуществляется с помощью скриптов Scons. +Comment[sk]=Vygeneruje jednoduchú TDE aplikáciu s jedným oknom, konfiguračným dial=ogom a DCOP rozhraním. K dispozícii je Scons skriptna kompiláciu a inštaláciu aplikácie. +Comment[sr]=Прави једноставан TDE програм са једном контролом, дијалогом за подешавање и DCOP интерфејсом. Дате су Scons скрипте за превођење и инсталирање програма. +Comment[sr@Latn]=Pravi jednostavan TDE program sa jednom kontrolom, dijalogom za podešavanje i DCOP interfejsom. Date su Scons skripte za prevođenje i instaliranje programa. +Comment[sv]=Skapar ett enkelt TDE-program med en grafisk komponent, en inställningsdialogruta och ett DCOP-gränssnitt. Scons-script tillhandahålls för att kompilera och installera programmet. +Comment[tr]=Bir parçacıklı, ayar pencereli ve bir dcop arayüzü olan basit bir TDE uygulaması yaratır. Uygulamayı derlemek ve kurmak için scons betikleri sağlanmıştır. +Comment[zh_CN]=生成一个带一个部件、一个配置对话框和一个 DCOP 接口的简单 TDE 应用程序。此时会提供 Scons 脚本以供编译并安装应用程序。 +Comment[zh_TW]=產生一個簡單的 TDE 應用程式,內含一個元件,一個設定對話框與一個 DCOP 介面。Scons 文稿可用於編譯與安裝應用程式。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/QUICKSTART +Archive=kscons_kxt.tar.gz + +[SCONS] +Type=include +File=%{tdevelop}/template-common/scons.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{src}/SConscript-doc +Dest=%{dest}/doc/SConscript + +[FILE2] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE3] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE4] +Type=install +Source=%{src}/SConstruct +Dest=%{dest}/SConstruct + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/tde-app.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/hi16-app-app.png +Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png +Process=false + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/hi32-app-app.png +Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png +Process=false + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE10] +Type=install +Source=%{src}/SConscript-src +Dest=%{dest}/src/SConscript + +[FILE11] +Type=install +Source=%{src}/app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE12] +Type=install +Source=%{src}/app.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE13] +Type=install +EscapeXML=true +Source=%{src}/appview_base.ui +Dest=%{dest}/src/%{APPNAMELC}view_base.ui + +[FILE14] +Type=install +Source=%{src}/appview.cpp +Dest=%{dest}/src/%{APPNAMELC}view.cpp + +[FILE15] +Type=install +Source=%{src}/appview.h +Dest=%{dest}/src/%{APPNAMELC}view.h + +[FILE16] +Type=install +EscapeXML=true +Source=%{src}/prefs-base.ui +Dest=%{dest}/src/prefs-base.ui + +[FILE17] +Type=install +Source=%{src}/prefs.cpp +Dest=%{dest}/src/prefs.cpp + +[FILE18] +Type=install +Source=%{src}/prefs.h +Dest=%{dest}/src/prefs.h + +[FILE19] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/main.cpp + +[FILE20] +Type=install +EscapeXML=true +Source=%{src}/appui.rc +Dest=%{dest}/src/%{APPNAMELC}ui.rc + +[FILE21] +Type=install +Source=%{src}/README +Dest=%{dest}/src/README + +[FILE22] +Type=install +Source=%{src}/app.kcfg +Dest=%{dest}/src/%{APPNAMELC}.kcfg + +[FILE23] +Type=install +Source=%{src}/settings.kcfgc +Dest=%{dest}/src/settings.kcfgc + +[FILE24] +Type=install +Source=%{src}/tips +Dest=%{dest}/src/tips + +[FILE26] +Type=install +Source=%{src}/VERSION +Dest=%{dest}/VERSION + +[FILE29] +Type=install +Source=%{src}/INSTALL +Dest=%{dest}/INSTALL + +[FILE30] +Type=install +Source=%{src}/QUICKSTART +Dest=%{dest}/QUICKSTART + +[FILE31] +Type=install +Source=%{src}/messages.sh +Dest=%{dest}/po/messages.sh + +[MSG] +Type=message +Comment=A TDE application with scons scripts was created in %{dest} +Comment[ca]=Una aplicació per al TDE amb scripts en Scons ha estat creada e n %{dest} +Comment[da]=Et TDE program med scons-scripter blev oprette i %{dest} +Comment[de]=Eine TDE-Anwendung mit Scons-Skripten wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή TDE με σενάρια scons δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación para TDE con guiones de Scons ha sido creada en %{dest} +Comment[et]=TDE rakendus Sconsi skriptidega loodi asukohta %{dest} +Comment[eu]=Scons script-dun TDE aplikazio bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد TDE با دست‌نوشته‌های scons در %{dest} ایجاد شد +Comment[fr]=Une application TDE comprenant des scripts Scons a été créée dans %{dest} +Comment[ga]=Cruthaíodh feidhmchlár TDE le scripteanna scons i %{dest} +Comment[gl]=Creouse unha aplicación TDE con scripts scons en %{dest} +Comment[hu]=Létrejött egy Scons-szkripteket használó TDE-alapú alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione TDE con gli script scons in %{dest} +Comment[ja]=Scons スクリプトを使った TDE アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en TDE-Programm mit scons-Skripten opstellt +Comment[ne]=स्कोन स्क्रिप्टसँग केडीई अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een TDE applicatie inclusief Scons-scripts is aangemaakt in %{dest} +Comment[pl]=Program TDE ze skryptami scons utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação do TDE com ficheiros do 'scons' em %{dest} +Comment[pt_BR]=Foi criada uma aplicação do TDE com ficheiros do 'scons' em %{dest} +Comment[ru]=Приложение TDE со скриптами Scons создано в %{dest} +Comment[sk]=TDE aplikácia so scons skriptom bola vytvorená v %{dest} +Comment[sr]=TDE програм са scons скриптама направљен је у %{dest} +Comment[sr@Latn]=TDE program sa scons skriptama napravljen je u %{dest} +Comment[sv]=Ett TDE-program med Scons-skript skapades i %{dest} +Comment[tr]=Scons betikleri olan bir TDE uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了带 scons 脚本的 TDE 应用程序 +Comment[zh_TW]=一個內含 scons 文稿的 TDE 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kscons_kxt/kscons_kxt.tdevtemplate b/languages/cpp/app_templates/kscons_kxt/kscons_kxt.tdevtemplate deleted file mode 100644 index fd709e79..00000000 --- a/languages/cpp/app_templates/kscons_kxt/kscons_kxt.tdevtemplate +++ /dev/null @@ -1,253 +0,0 @@ -# TDE Config File -[General] -Name=Scons-based TDE application -Name[ca]=Una aplicació per al TDE basada en Scons -Name[da]=Scons-baseret TDE program -Name[de]=Auf Scons basierende TDE-Anwendung -Name[el]=Μια εφαρμογή KMDI βασισμένης στο Scons -Name[es]=Aplicación para TDE basada en Scons -Name[et]=TDE rakendus Sconsi põhjal -Name[eu]=Scons-en oinarritutako TDE aplikazioa -Name[fa]=کاربرد TDE بر مبنای Scons -Name[fr]=Application TDE basée sur Scons -Name[ga]=Feidhmchlár TDE bunaithe ar Scons -Name[gl]=Aplicación TDE baseada en Scons -Name[hu]=Scons-alapú TDE-s alkalmazás -Name[it]=Un'applicazione TDE basata su scons -Name[ja]=Scons を使った TDE アプリケーション -Name[nds]=Op "Scons" opbuut TDE-Programm -Name[ne]=स्कोन-आधारित केडीई अनुप्रयोग -Name[nl]=Scons gebaseerde TDE-toepassing -Name[pl]=Program TDE wykorzystujący Scons -Name[pt]=Aplicação TDE usando Scons -Name[pt_BR]=Aplicação TDE usando Scons -Name[ru]=Приложение TDE на базе Scons -Name[sk]=TDE aplikácia založená na Scons -Name[sr]=TDE програм на основу Scons-а -Name[sr@Latn]=TDE program na osnovu Scons-a -Name[sv]=Scons-baserat TDE-program -Name[tr]=Scons-tabanlı TDE Uygulaması -Name[zh_CN]=基于 Scons 的 TDE 应用程序 -Name[zh_TW]=Scons 為基礎的 TDE 應用程式 -Category=C++/TDE -Icon=kscons_kxt.png -Comment=Generates a simple TDE application with one widget, a configuration dialog and a dcop interface. Scons scripts are provided for compiling and installing the application. -Comment[ca]=Genera una simple aplicació per al TDE amb un estri, un diàleg de configuració i una interfície dcop. Els scripts en Scons són proveïts per a compilar i instal·lar l'aplicació. -Comment[da]=Genererer et simpelt TDE program med en kontrol, en indstillingsdialog og en dcop-grænseflade. Der sørges for scons-scripter til at kompilere og installere programmet. -Comment[de]=Erstellt eine einfache TDE-Anwendung mit einem Widget, einem Einstellungsdialog und einer DCOP-Schnittstelle. Scons-Skripte zum Kompileren und Installieren der Anwendung werden zur Verfügung gestellt. -Comment[el]=Δημιουργεί μια απλή εφαρμογή TDE με ένα γραφικό συστατικό, ένα διάλογο ρύθμισης και μια διασύνδεση dcop. Προσφέρονται σενάρια Scons για τη μεταγλώττιση και εγκατάσταση της εφαρμογής. -Comment[en_GB]=Generates a simple TDE application with one widget, a configuration dialogue and a dcop interface. Scons scripts are provided for compiling and installing the application. -Comment[es]=Genera una sencilla aplicación para TDE con una ventana principal, un diálogo de configuración y una interfaz DCOP. Se proporcionan guiones en Scons para compilar e instalar la aplicación. -Comment[et]=Lihtsa TDE rakenduse loomine ühe vidina, seadistusdialoogi ja DCOP-liidesega. Luuakse ka Sconsi skriptid rakenduse kompileerimiseks ja paigaldamiseks. -Comment[eu]=TDE aplikazio sinple bat sortzen du trepeta bat, konfigurazio-elkarrizketa eta dcop interfaze batekin. Aplikazioa konpilatu eta instalatzeko Scons script-ak sortzen ditu. -Comment[fa]=یک کاربرد سادۀ TDE با یک عنصر، یک محاورۀ پیکربندی و یک واسط dcop تولید می‌کند. دست‌نوشته‌های Scons برای ترجمه و نصب کاربرد فراهم شده‌اند. -Comment[fr]=Génère une application TDE simple comprenant un seul élément graphique (widget), une boîte de dialogue de configuration et une interface DCOP. Des scripts Scons sont fournis pour compiler et installer l'application. -Comment[gl]=Xera unha aplicación sinxela TDE cunha compoñente, un diálogo de configuración e unha interface dcop. Os scripts scons proporciónanse para compilar e intalar a aplicación. -Comment[hu]=Létrehoz egy egyszerű TDE-alkalmazást egy főablakkal, beállítóablakkal és DCOP-felülettel. Az alkalmazás lefordításához és telepítéséhez Scons-szkriptek állnak rendelkezésre. -Comment[it]=Genera una semplice applicazione TDE con un elemento grafico, una finestra di configurazione e un'interfaccia DCOP. Gli script scons sono forniti per compilare e installare l'applicazione. -Comment[nds]=Stellt en eenfach TDE-Programm mit een Element, en Instelldialoog un en DCOP-Koppelsteed op. Stellt Scons-Skripten för't Kompileren un Installeren vun't Programm praat. -Comment[ne]=एउटा विगेट, कन्फिगरेसन संवाद र dcop इन्टरफेससँग एउटा साधारण केडीई अनुप्रयोग उत्पन्न गर्दछ । स्कोन स्क्रिप्टहरू अनुप्रयोग स्थापना र कम्पाइल गर्नका लागि प्रदान गरिन्छ । -Comment[nl]=Genereert een eenvoudige TDE-toepassing met één toplevel widget, een configuratievenster en een DCOP-interface. Scons-scripts worden aangemaakt voor compilatie en installatie. -Comment[pl]=Generuje prosty program dla TDE widgetem, oknem konfiguracyjnym i interfejsem dcop. Do kompilacji i instalacji programu wykorzystywane są skrypty Scons. -Comment[pt]=Gera uma aplicação simples do TDE com uma janela principal, uma de configuração e uma interface de DCOP. Os ficheiros do 'scons' são oferecidos para compilar e instalar a aplicação. -Comment[pt_BR]=Gera uma aplicação simples do TDE com uma janela principal, uma de configuração e uma interface de DCOP. Os ficheiros do 'scons' são oferecidos para compilar e instalar a aplicação. -Comment[ru]=Создание простого приложения TDE с одним виджетом, окном настройки и интерфейсом DCOP. Сборка и установка осуществляется с помощью скриптов Scons. -Comment[sk]=Vygeneruje jednoduchú TDE aplikáciu s jedným oknom, konfiguračným dial=ogom a DCOP rozhraním. K dispozícii je Scons skriptna kompiláciu a inštaláciu aplikácie. -Comment[sr]=Прави једноставан TDE програм са једном контролом, дијалогом за подешавање и DCOP интерфејсом. Дате су Scons скрипте за превођење и инсталирање програма. -Comment[sr@Latn]=Pravi jednostavan TDE program sa jednom kontrolom, dijalogom za podešavanje i DCOP interfejsom. Date su Scons skripte za prevođenje i instaliranje programa. -Comment[sv]=Skapar ett enkelt TDE-program med en grafisk komponent, en inställningsdialogruta och ett DCOP-gränssnitt. Scons-script tillhandahålls för att kompilera och installera programmet. -Comment[tr]=Bir parçacıklı, ayar pencereli ve bir dcop arayüzü olan basit bir TDE uygulaması yaratır. Uygulamayı derlemek ve kurmak için scons betikleri sağlanmıştır. -Comment[zh_CN]=生成一个带一个部件、一个配置对话框和一个 DCOP 接口的简单 TDE 应用程序。此时会提供 Scons 脚本以供编译并安装应用程序。 -Comment[zh_TW]=產生一個簡單的 TDE 應用程式,內含一個元件,一個設定對話框與一個 DCOP 介面。Scons 文稿可用於編譯與安裝應用程式。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/QUICKSTART -Archive=kscons_kxt.tar.gz - -[SCONS] -Type=include -File=%{tdevelop}/template-common/scons.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{src}/SConscript-doc -Dest=%{dest}/doc/SConscript - -[FILE2] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE3] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE4] -Type=install -Source=%{src}/SConstruct -Dest=%{dest}/SConstruct - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/tde-app.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/hi16-app-app.png -Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png -Process=false - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/hi32-app-app.png -Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png -Process=false - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE10] -Type=install -Source=%{src}/SConscript-src -Dest=%{dest}/src/SConscript - -[FILE11] -Type=install -Source=%{src}/app.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE12] -Type=install -Source=%{src}/app.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE13] -Type=install -EscapeXML=true -Source=%{src}/appview_base.ui -Dest=%{dest}/src/%{APPNAMELC}view_base.ui - -[FILE14] -Type=install -Source=%{src}/appview.cpp -Dest=%{dest}/src/%{APPNAMELC}view.cpp - -[FILE15] -Type=install -Source=%{src}/appview.h -Dest=%{dest}/src/%{APPNAMELC}view.h - -[FILE16] -Type=install -EscapeXML=true -Source=%{src}/prefs-base.ui -Dest=%{dest}/src/prefs-base.ui - -[FILE17] -Type=install -Source=%{src}/prefs.cpp -Dest=%{dest}/src/prefs.cpp - -[FILE18] -Type=install -Source=%{src}/prefs.h -Dest=%{dest}/src/prefs.h - -[FILE19] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/main.cpp - -[FILE20] -Type=install -EscapeXML=true -Source=%{src}/appui.rc -Dest=%{dest}/src/%{APPNAMELC}ui.rc - -[FILE21] -Type=install -Source=%{src}/README -Dest=%{dest}/src/README - -[FILE22] -Type=install -Source=%{src}/app.kcfg -Dest=%{dest}/src/%{APPNAMELC}.kcfg - -[FILE23] -Type=install -Source=%{src}/settings.kcfgc -Dest=%{dest}/src/settings.kcfgc - -[FILE24] -Type=install -Source=%{src}/tips -Dest=%{dest}/src/tips - -[FILE26] -Type=install -Source=%{src}/VERSION -Dest=%{dest}/VERSION - -[FILE29] -Type=install -Source=%{src}/INSTALL -Dest=%{dest}/INSTALL - -[FILE30] -Type=install -Source=%{src}/QUICKSTART -Dest=%{dest}/QUICKSTART - -[FILE31] -Type=install -Source=%{src}/messages.sh -Dest=%{dest}/po/messages.sh - -[MSG] -Type=message -Comment=A TDE application with scons scripts was created in %{dest} -Comment[ca]=Una aplicació per al TDE amb scripts en Scons ha estat creada e n %{dest} -Comment[da]=Et TDE program med scons-scripter blev oprette i %{dest} -Comment[de]=Eine TDE-Anwendung mit Scons-Skripten wurde in %{dest} erstellt. -Comment[el]=Μια εφαρμογή TDE με σενάρια scons δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación para TDE con guiones de Scons ha sido creada en %{dest} -Comment[et]=TDE rakendus Sconsi skriptidega loodi asukohta %{dest} -Comment[eu]=Scons script-dun TDE aplikazio bat sortu da hemen: %{dest} -Comment[fa]=یک کاربرد TDE با دست‌نوشته‌های scons در %{dest} ایجاد شد -Comment[fr]=Une application TDE comprenant des scripts Scons a été créée dans %{dest} -Comment[ga]=Cruthaíodh feidhmchlár TDE le scripteanna scons i %{dest} -Comment[gl]=Creouse unha aplicación TDE con scripts scons en %{dest} -Comment[hu]=Létrejött egy Scons-szkripteket használó TDE-alapú alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione TDE con gli script scons in %{dest} -Comment[ja]=Scons スクリプトを使った TDE アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en TDE-Programm mit scons-Skripten opstellt -Comment[ne]=स्कोन स्क्रिप्टसँग केडीई अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een TDE applicatie inclusief Scons-scripts is aangemaakt in %{dest} -Comment[pl]=Program TDE ze skryptami scons utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação do TDE com ficheiros do 'scons' em %{dest} -Comment[pt_BR]=Foi criada uma aplicação do TDE com ficheiros do 'scons' em %{dest} -Comment[ru]=Приложение TDE со скриптами Scons создано в %{dest} -Comment[sk]=TDE aplikácia so scons skriptom bola vytvorená v %{dest} -Comment[sr]=TDE програм са scons скриптама направљен је у %{dest} -Comment[sr@Latn]=TDE program sa scons skriptama napravljen je u %{dest} -Comment[sv]=Ett TDE-program med Scons-skript skapades i %{dest} -Comment[tr]=Scons betikleri olan bir TDE uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了带 scons 脚本的 TDE 应用程序 -Comment[zh_TW]=一個內含 scons 文稿的 TDE 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kscons_tdemdi/CMakeLists.txt b/languages/cpp/app_templates/kscons_tdemdi/CMakeLists.txt index d8af0f23..c05f1bb1 100644 --- a/languages/cpp/app_templates/kscons_tdemdi/CMakeLists.txt +++ b/languages/cpp/app_templates/kscons_tdemdi/CMakeLists.txt @@ -22,9 +22,9 @@ add_custom_target( kscons_tdemdi.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kscons_tdemdi.tar.gz kscons_tdemdi.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - kscons_tdemdi.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + kscons_tdemdi.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kscons_tdemdi/Makefile.am b/languages/cpp/app_templates/kscons_tdemdi/Makefile.am index b51e2bdb..191ea8ee 100644 --- a/languages/cpp/app_templates/kscons_tdemdi/Makefile.am +++ b/languages/cpp/app_templates/kscons_tdemdi/Makefile.am @@ -7,10 +7,10 @@ app_part.cpp app_part.h app_part.rc app_shell.rc templateName= kscons_tdemdi ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/kscons_tdemdi/app.tdevelop b/languages/cpp/app_templates/kscons_tdemdi/app.tdevelop index b32b6656..317a4cbc 100644 --- a/languages/cpp/app_templates/kscons_tdemdi/app.tdevelop +++ b/languages/cpp/app_templates/kscons_tdemdi/app.tdevelop @@ -17,16 +17,16 @@ - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + src/%{APPNAMELC} debug @@ -62,8 +62,8 @@ -O0 -g3 - - + + @@ -75,8 +75,8 @@ false *.o,*.lo,CVS - - + + ada ada_bugs_gcc @@ -111,8 +111,8 @@ qmake User Guide - - + + libtool @@ -126,16 +126,16 @@ false true - - + + - - + + -f -dP @@ -144,7 +144,7 @@ -u3 -p - + @@ -156,14 +156,14 @@ true - + true 2 - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/kscons_tdemdi/kscons_tdemdi.kdevtemplate b/languages/cpp/app_templates/kscons_tdemdi/kscons_tdemdi.kdevtemplate new file mode 100644 index 00000000..2a297d60 --- /dev/null +++ b/languages/cpp/app_templates/kscons_tdemdi/kscons_tdemdi.kdevtemplate @@ -0,0 +1,271 @@ +# TDE Config File +[General] +Name=Scons-based KMDI application +Name[ca]=Aplicació per a KMDI basada en Scons +Name[da]=Scons-baseret KMDI-program +Name[de]=Auf Scons basierende KMDI-Anwendung +Name[el]=Μια εφαρμογή KMDI βασισμένης στο Scons +Name[es]=Aplicación KMDI basada en Scons +Name[et]=KMDI rakendus Sconsi põhjal +Name[eu]=Scons-en oinarritutako KMDI aplikazioa +Name[fa]=کاربرد KMDI بر مبنای Scons +Name[fr]=Application KMDI basée sur Scons +Name[ga]=Feidhmchlár KMDI bunaithe ar Scons +Name[gl]=Aplicación KMDI baseada en Scons +Name[hu]=Scons-alapú KMDI-alkalmazás +Name[it]=Applicazione KMDI basata su scons +Name[ja]=Scons ベースの KMDI アプリケーション +Name[nds]=Op "scons" opbuut KMDI-Programm +Name[ne]=स्कोन-आधारित KMDI अनुप्रयोग +Name[nl]=Scons gebaseerde KMDI-toepassing +Name[pl]=Program KMDI wykorzystujący Scons +Name[pt]=Aplicação KMDI usando Scons +Name[pt_BR]=Aplicação KMDI usando Scons +Name[ru]=Многооконное приложение TDE на базе Scons +Name[sk]=KMDI aplikácia založená na Scons +Name[sr]=KMDI програм на основу Scons-а +Name[sr@Latn]=KMDI program na osnovu Scons-a +Name[sv]=Scons-baserat KMDI-program +Name[tr]=Scons tabanlı KMDI uygulaması +Name[zh_CN]=基于 Scons 的 KMDI 应用程序 +Name[zh_TW]=Scons 為基礎的 KMDI 應用程式 +Category=C++/TDE +Icon=kscons_tdemdi.png +Comment=Generates a complex KMDI application. Scons scripts are provided for compiling and installing the application. +Comment[ca]=Genera una complexa aplicació per a KMDI. Els scripts en Scons són proveïts per a compilar i instal·lar l'aplicació. +Comment[da]=Genererer et komplekst TDE-program. Der sørges for scons-scripter til at kompilere og installere programmet. +Comment[de]=Erstellt eine aufwändige KMDI-Anwendung. Scons-Skripte zum Kompilieren und Installieren der Anwendung werden zur Verfügung gestellt. +Comment[el]=Δημιουργεί μια πολύπλοκη εφαρμογή KMDI. Προσφέρονται σενάρια Scons για τη μεταγλώττιση και εγκατάσταση της εφαρμογής. +Comment[es]=Genera una aplicación KMDI compleja. Se proporcionan guiones en Scons para compilar e instalar la aplicación. +Comment[et]=Keerulise KMDI rakenduse loomine. Luuakse ka Sconsi skriptid rakenduse kompileerimiseks ja paigaldamiseks. +Comment[eu]=KMDI aplikazio konplexu bat sortzen du. Aplikazioak konpilatu eta aplikazioa instalatzeko Scons script-ak sortzen ditu. +Comment[fa]=یک کاربرد پیچیدۀ KMDI تولید می‌کند. دست‌نوشته‌های Scons برای ترجمه و نصب کاربرد فراهم می‌شوند. +Comment[fr]=Génère une application KMDI évoluée. Des scripts Scons sont fournis pour compiler et installer l'application. +Comment[gl]=Xera unha aplicación complexa KMDI. Os scripts Scons proporciónanse para compilar e instalar a aplicación. +Comment[hu]=Létrehoz egy komplex KMDI alkalmazást. Az alkalmazás lefordításához és telepítéséhez Scons-szkriptek állnak rendelkezésre. +Comment[it]=Genera una applicazione KMDI complessa. Gli script scons sono forniti per compilare e istallare l'applicazione. +Comment[nds]=Stellt en vigeliensch KMDI-Programm op. Stellt Scons-Skripten för't Kompileren un Installeren vun't Programm praat. +Comment[ne]=जटिल KMDI अनुप्रयोग उत्पन्न गर्दछ । स्कोन स्क्रिप्टहरू अनुप्रयोग स्थापना र कम्पाइल गर्नका लागि प्रदान गरिन्छ । +Comment[nl]=Genereert een complexe KMDI-applicatie. Scons-scripts worden gebruikt voor compilatie en installatie. +Comment[pl]=Generuje złożony program z powłoką KMDI. Do kompilacji i instalacji wykorzystywany jest skrypt Scons. +Comment[pt]=Gera uma aplicação complexa com KMDI. Os ficheiros do Scons são fornecidos para compilar e instalar a aplicação. +Comment[pt_BR]=Gera uma aplicação complexa com KMDI. Os ficheiros do Scons são fornecidos para compilar e instalar a aplicação. +Comment[ru]=Создание полноценного многооконного приложения TDE. Для сборки и установки этого приложения будут использованы скрипты Scons. +Comment[sk]=Vygeneruje komplexnú KMDI aplikáciu. K dispozícii je Scons skriptna kompiláciu a inštaláciu aplikácie. +Comment[sr]=Прави сложени KMDI програм. Дате су Scons скрипте за превођење и инсталирање програма. +Comment[sr@Latn]=Pravi složeni KMDI program. Date su Scons skripte za prevođenje i instaliranje programa. +Comment[sv]=Skapar ett komplext KMDI-program. Scons-skript tillhandahålls för att kompilera och installera programmet. +Comment[tr]=Karmaşık bir KMDI uygulaması yaratır. Uygulamayı derlemek ve kurmak için scons betikleri sağlanmıştır. +Comment[zh_CN]=生成一个复杂的 KMDI 应用程序。此时会提供 Scons 脚本以供编译并安装应用程序。 +Comment[zh_TW]=產生一個複雜的 KMDI 應用程式。Scons 文稿是用於編譯與安裝應用程式。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/QUICKSTART +Archive=kscons_tdemdi.tar.gz + +[SCONS] +Type=include +File=%{tdevelop}/template-common/scons.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{src}/SConscript-doc +Dest=%{dest}/doc/SConscript + +[FILE2] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE3] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE4] +Type=install +Source=%{src}/SConstruct +Dest=%{dest}/SConstruct + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/tde-app.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/hi16-app-app.png +Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png +Process=false + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/hi32-app-app.png +Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png +Process=false + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE10] +Type=install +Source=%{src}/SConscript-src +Dest=%{dest}/src/SConscript + +[FILE11] +Type=install +Source=%{src}/apptdemdi.cpp +Dest=%{dest}/src/%{APPNAMELC}tdemdi.cpp + +[FILE12] +Type=install +Source=%{src}/apptdemdi.h +Dest=%{dest}/src/%{APPNAMELC}tdemdi.h + +[FILE13] +Type=install +EscapeXML=true +Source=%{src}/prefs.ui +Dest=%{dest}/src/prefs.ui + +[FILE14] +Type=install +Source=%{src}/apptdemdiView.cpp +Dest=%{dest}/src/%{APPNAMELC}tdemdiView.cpp + +[FILE15] +Type=install +Source=%{src}/apptdemdiView.h +Dest=%{dest}/src/%{APPNAMELC}tdemdiView.h + +[FILE19] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/main.cpp + +[FILE20] +Type=install +EscapeXML=true +Source=%{src}/app_shell.rc +Dest=%{dest}/src/%{APPNAMELC}_shell.rc + +[FILE21] +Type=install +Source=%{src}/README +Dest=%{dest}/src/README + +[FILE22] +Type=install +Source=%{src}/app.kcfg +Dest=%{dest}/src/%{APPNAMELC}.kcfg + +[FILE23] +Type=install +Source=%{src}/settings.kcfgc +Dest=%{dest}/src/settings.kcfgc + +[FILE25] +Type=install +Source=%{src}/tips +Dest=%{dest}/src/tips + +[FILE27] +Type=install +Source=%{src}/VERSION +Dest=%{dest}/VERSION + +[FILE28] +Type=install +Source=%{src}/INSTALL +Dest=%{dest}/INSTALL + +[FILE29] +Type=install +Source=%{src}/QUICKSTART +Dest=%{dest}/QUICKSTART + +[FILE30] +Type=install +Source=%{src}/messages.sh +Dest=%{dest}/po/messages.sh + +[FILE31] +Type=install +Source=%{src}/tdemdikonsole.cpp +Dest=%{dest}/src/tdemdikonsole.cpp + +[FILE32] +Type=install +Source=%{src}/tdemdikonsole.h +Dest=%{dest}/src/tdemdikonsole.h + +[FILE34] +Type=install +Source=%{src}/app_part.cpp +Dest=%{dest}/src/%{APPNAMELC}_part.cpp + +[FILE35] +Type=install +Source=%{src}/app_part.h +Dest=%{dest}/src/%{APPNAMELC}_part.h + +[FILE36] +Type=install +Source=%{tdevelop}/template-common/tde-app.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE37] +Type=install +Source=%{tdevelop}/template-common/tde-part.desktop +Dest=%{dest}/src/%{APPNAMELC}_part.desktop + +[FILE38] +Type=install +Source=%{src}/app_part.rc +Dest=%{dest}/src/%{APPNAMELC}_part.rc + +[MSG] +Type=message +Comment=A TDE application with scons scripts was created in %{dest} +Comment[ca]=Una aplicació per al TDE amb scripts en Scons ha estat creada e n %{dest} +Comment[da]=Et TDE program med scons-scripter blev oprette i %{dest} +Comment[de]=Eine TDE-Anwendung mit Scons-Skripten wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή TDE με σενάρια scons δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación para TDE con guiones de Scons ha sido creada en %{dest} +Comment[et]=TDE rakendus Sconsi skriptidega loodi asukohta %{dest} +Comment[eu]=Scons script-dun TDE aplikazio bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد TDE با دست‌نوشته‌های scons در %{dest} ایجاد شد +Comment[fr]=Une application TDE comprenant des scripts Scons a été créée dans %{dest} +Comment[ga]=Cruthaíodh feidhmchlár TDE le scripteanna scons i %{dest} +Comment[gl]=Creouse unha aplicación TDE con scripts scons en %{dest} +Comment[hu]=Létrejött egy Scons-szkripteket használó TDE-alapú alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione TDE con gli script scons in %{dest} +Comment[ja]=Scons スクリプトを使った TDE アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en TDE-Programm mit scons-Skripten opstellt +Comment[ne]=स्कोन स्क्रिप्टसँग केडीई अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een TDE applicatie inclusief Scons-scripts is aangemaakt in %{dest} +Comment[pl]=Program TDE ze skryptami scons utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação do TDE com ficheiros do 'scons' em %{dest} +Comment[pt_BR]=Foi criada uma aplicação do TDE com ficheiros do 'scons' em %{dest} +Comment[ru]=Приложение TDE со скриптами Scons создано в %{dest} +Comment[sk]=TDE aplikácia so scons skriptom bola vytvorená v %{dest} +Comment[sr]=TDE програм са scons скриптама направљен је у %{dest} +Comment[sr@Latn]=TDE program sa scons skriptama napravljen je u %{dest} +Comment[sv]=Ett TDE-program med Scons-skript skapades i %{dest} +Comment[tr]=Scons betikleri olan bir TDE uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了带 scons 脚本的 TDE 应用程序 +Comment[zh_TW]=一個內含 scons 文稿的 TDE 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kscons_tdemdi/kscons_tdemdi.tdevtemplate b/languages/cpp/app_templates/kscons_tdemdi/kscons_tdemdi.tdevtemplate deleted file mode 100644 index 4b71d06c..00000000 --- a/languages/cpp/app_templates/kscons_tdemdi/kscons_tdemdi.tdevtemplate +++ /dev/null @@ -1,271 +0,0 @@ -# TDE Config File -[General] -Name=Scons-based KMDI application -Name[ca]=Aplicació per a KMDI basada en Scons -Name[da]=Scons-baseret KMDI-program -Name[de]=Auf Scons basierende KMDI-Anwendung -Name[el]=Μια εφαρμογή KMDI βασισμένης στο Scons -Name[es]=Aplicación KMDI basada en Scons -Name[et]=KMDI rakendus Sconsi põhjal -Name[eu]=Scons-en oinarritutako KMDI aplikazioa -Name[fa]=کاربرد KMDI بر مبنای Scons -Name[fr]=Application KMDI basée sur Scons -Name[ga]=Feidhmchlár KMDI bunaithe ar Scons -Name[gl]=Aplicación KMDI baseada en Scons -Name[hu]=Scons-alapú KMDI-alkalmazás -Name[it]=Applicazione KMDI basata su scons -Name[ja]=Scons ベースの KMDI アプリケーション -Name[nds]=Op "scons" opbuut KMDI-Programm -Name[ne]=स्कोन-आधारित KMDI अनुप्रयोग -Name[nl]=Scons gebaseerde KMDI-toepassing -Name[pl]=Program KMDI wykorzystujący Scons -Name[pt]=Aplicação KMDI usando Scons -Name[pt_BR]=Aplicação KMDI usando Scons -Name[ru]=Многооконное приложение TDE на базе Scons -Name[sk]=KMDI aplikácia založená na Scons -Name[sr]=KMDI програм на основу Scons-а -Name[sr@Latn]=KMDI program na osnovu Scons-a -Name[sv]=Scons-baserat KMDI-program -Name[tr]=Scons tabanlı KMDI uygulaması -Name[zh_CN]=基于 Scons 的 KMDI 应用程序 -Name[zh_TW]=Scons 為基礎的 KMDI 應用程式 -Category=C++/TDE -Icon=kscons_tdemdi.png -Comment=Generates a complex KMDI application. Scons scripts are provided for compiling and installing the application. -Comment[ca]=Genera una complexa aplicació per a KMDI. Els scripts en Scons són proveïts per a compilar i instal·lar l'aplicació. -Comment[da]=Genererer et komplekst TDE-program. Der sørges for scons-scripter til at kompilere og installere programmet. -Comment[de]=Erstellt eine aufwändige KMDI-Anwendung. Scons-Skripte zum Kompilieren und Installieren der Anwendung werden zur Verfügung gestellt. -Comment[el]=Δημιουργεί μια πολύπλοκη εφαρμογή KMDI. Προσφέρονται σενάρια Scons για τη μεταγλώττιση και εγκατάσταση της εφαρμογής. -Comment[es]=Genera una aplicación KMDI compleja. Se proporcionan guiones en Scons para compilar e instalar la aplicación. -Comment[et]=Keerulise KMDI rakenduse loomine. Luuakse ka Sconsi skriptid rakenduse kompileerimiseks ja paigaldamiseks. -Comment[eu]=KMDI aplikazio konplexu bat sortzen du. Aplikazioak konpilatu eta aplikazioa instalatzeko Scons script-ak sortzen ditu. -Comment[fa]=یک کاربرد پیچیدۀ KMDI تولید می‌کند. دست‌نوشته‌های Scons برای ترجمه و نصب کاربرد فراهم می‌شوند. -Comment[fr]=Génère une application KMDI évoluée. Des scripts Scons sont fournis pour compiler et installer l'application. -Comment[gl]=Xera unha aplicación complexa KMDI. Os scripts Scons proporciónanse para compilar e instalar a aplicación. -Comment[hu]=Létrehoz egy komplex KMDI alkalmazást. Az alkalmazás lefordításához és telepítéséhez Scons-szkriptek állnak rendelkezésre. -Comment[it]=Genera una applicazione KMDI complessa. Gli script scons sono forniti per compilare e istallare l'applicazione. -Comment[nds]=Stellt en vigeliensch KMDI-Programm op. Stellt Scons-Skripten för't Kompileren un Installeren vun't Programm praat. -Comment[ne]=जटिल KMDI अनुप्रयोग उत्पन्न गर्दछ । स्कोन स्क्रिप्टहरू अनुप्रयोग स्थापना र कम्पाइल गर्नका लागि प्रदान गरिन्छ । -Comment[nl]=Genereert een complexe KMDI-applicatie. Scons-scripts worden gebruikt voor compilatie en installatie. -Comment[pl]=Generuje złożony program z powłoką KMDI. Do kompilacji i instalacji wykorzystywany jest skrypt Scons. -Comment[pt]=Gera uma aplicação complexa com KMDI. Os ficheiros do Scons são fornecidos para compilar e instalar a aplicação. -Comment[pt_BR]=Gera uma aplicação complexa com KMDI. Os ficheiros do Scons são fornecidos para compilar e instalar a aplicação. -Comment[ru]=Создание полноценного многооконного приложения TDE. Для сборки и установки этого приложения будут использованы скрипты Scons. -Comment[sk]=Vygeneruje komplexnú KMDI aplikáciu. K dispozícii je Scons skriptna kompiláciu a inštaláciu aplikácie. -Comment[sr]=Прави сложени KMDI програм. Дате су Scons скрипте за превођење и инсталирање програма. -Comment[sr@Latn]=Pravi složeni KMDI program. Date su Scons skripte za prevođenje i instaliranje programa. -Comment[sv]=Skapar ett komplext KMDI-program. Scons-skript tillhandahålls för att kompilera och installera programmet. -Comment[tr]=Karmaşık bir KMDI uygulaması yaratır. Uygulamayı derlemek ve kurmak için scons betikleri sağlanmıştır. -Comment[zh_CN]=生成一个复杂的 KMDI 应用程序。此时会提供 Scons 脚本以供编译并安装应用程序。 -Comment[zh_TW]=產生一個複雜的 KMDI 應用程式。Scons 文稿是用於編譯與安裝應用程式。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/QUICKSTART -Archive=kscons_tdemdi.tar.gz - -[SCONS] -Type=include -File=%{tdevelop}/template-common/scons.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{src}/SConscript-doc -Dest=%{dest}/doc/SConscript - -[FILE2] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE3] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE4] -Type=install -Source=%{src}/SConstruct -Dest=%{dest}/SConstruct - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/tde-app.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/hi16-app-app.png -Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png -Process=false - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/hi32-app-app.png -Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png -Process=false - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE10] -Type=install -Source=%{src}/SConscript-src -Dest=%{dest}/src/SConscript - -[FILE11] -Type=install -Source=%{src}/apptdemdi.cpp -Dest=%{dest}/src/%{APPNAMELC}tdemdi.cpp - -[FILE12] -Type=install -Source=%{src}/apptdemdi.h -Dest=%{dest}/src/%{APPNAMELC}tdemdi.h - -[FILE13] -Type=install -EscapeXML=true -Source=%{src}/prefs.ui -Dest=%{dest}/src/prefs.ui - -[FILE14] -Type=install -Source=%{src}/apptdemdiView.cpp -Dest=%{dest}/src/%{APPNAMELC}tdemdiView.cpp - -[FILE15] -Type=install -Source=%{src}/apptdemdiView.h -Dest=%{dest}/src/%{APPNAMELC}tdemdiView.h - -[FILE19] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/main.cpp - -[FILE20] -Type=install -EscapeXML=true -Source=%{src}/app_shell.rc -Dest=%{dest}/src/%{APPNAMELC}_shell.rc - -[FILE21] -Type=install -Source=%{src}/README -Dest=%{dest}/src/README - -[FILE22] -Type=install -Source=%{src}/app.kcfg -Dest=%{dest}/src/%{APPNAMELC}.kcfg - -[FILE23] -Type=install -Source=%{src}/settings.kcfgc -Dest=%{dest}/src/settings.kcfgc - -[FILE25] -Type=install -Source=%{src}/tips -Dest=%{dest}/src/tips - -[FILE27] -Type=install -Source=%{src}/VERSION -Dest=%{dest}/VERSION - -[FILE28] -Type=install -Source=%{src}/INSTALL -Dest=%{dest}/INSTALL - -[FILE29] -Type=install -Source=%{src}/QUICKSTART -Dest=%{dest}/QUICKSTART - -[FILE30] -Type=install -Source=%{src}/messages.sh -Dest=%{dest}/po/messages.sh - -[FILE31] -Type=install -Source=%{src}/tdemdikonsole.cpp -Dest=%{dest}/src/tdemdikonsole.cpp - -[FILE32] -Type=install -Source=%{src}/tdemdikonsole.h -Dest=%{dest}/src/tdemdikonsole.h - -[FILE34] -Type=install -Source=%{src}/app_part.cpp -Dest=%{dest}/src/%{APPNAMELC}_part.cpp - -[FILE35] -Type=install -Source=%{src}/app_part.h -Dest=%{dest}/src/%{APPNAMELC}_part.h - -[FILE36] -Type=install -Source=%{tdevelop}/template-common/tde-app.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE37] -Type=install -Source=%{tdevelop}/template-common/tde-part.desktop -Dest=%{dest}/src/%{APPNAMELC}_part.desktop - -[FILE38] -Type=install -Source=%{src}/app_part.rc -Dest=%{dest}/src/%{APPNAMELC}_part.rc - -[MSG] -Type=message -Comment=A TDE application with scons scripts was created in %{dest} -Comment[ca]=Una aplicació per al TDE amb scripts en Scons ha estat creada e n %{dest} -Comment[da]=Et TDE program med scons-scripter blev oprette i %{dest} -Comment[de]=Eine TDE-Anwendung mit Scons-Skripten wurde in %{dest} erstellt. -Comment[el]=Μια εφαρμογή TDE με σενάρια scons δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación para TDE con guiones de Scons ha sido creada en %{dest} -Comment[et]=TDE rakendus Sconsi skriptidega loodi asukohta %{dest} -Comment[eu]=Scons script-dun TDE aplikazio bat sortu da hemen: %{dest} -Comment[fa]=یک کاربرد TDE با دست‌نوشته‌های scons در %{dest} ایجاد شد -Comment[fr]=Une application TDE comprenant des scripts Scons a été créée dans %{dest} -Comment[ga]=Cruthaíodh feidhmchlár TDE le scripteanna scons i %{dest} -Comment[gl]=Creouse unha aplicación TDE con scripts scons en %{dest} -Comment[hu]=Létrejött egy Scons-szkripteket használó TDE-alapú alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione TDE con gli script scons in %{dest} -Comment[ja]=Scons スクリプトを使った TDE アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en TDE-Programm mit scons-Skripten opstellt -Comment[ne]=स्कोन स्क्रिप्टसँग केडीई अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een TDE applicatie inclusief Scons-scripts is aangemaakt in %{dest} -Comment[pl]=Program TDE ze skryptami scons utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação do TDE com ficheiros do 'scons' em %{dest} -Comment[pt_BR]=Foi criada uma aplicação do TDE com ficheiros do 'scons' em %{dest} -Comment[ru]=Приложение TDE со скриптами Scons создано в %{dest} -Comment[sk]=TDE aplikácia so scons skriptom bola vytvorená v %{dest} -Comment[sr]=TDE програм са scons скриптама направљен је у %{dest} -Comment[sr@Latn]=TDE program sa scons skriptama napravljen je u %{dest} -Comment[sv]=Ett TDE-program med Scons-skript skapades i %{dest} -Comment[tr]=Scons betikleri olan bir TDE uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了带 scons 脚本的 TDE 应用程序 -Comment[zh_TW]=一個內含 scons 文稿的 TDE 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kxt/CMakeLists.txt b/languages/cpp/app_templates/kxt/CMakeLists.txt index c7de3e19..4b203750 100644 --- a/languages/cpp/app_templates/kxt/CMakeLists.txt +++ b/languages/cpp/app_templates/kxt/CMakeLists.txt @@ -20,9 +20,9 @@ add_custom_target( kxt.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kxt.tar.gz kxt.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - kxt.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + kxt.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/kxt/Makefile.am b/languages/cpp/app_templates/kxt/Makefile.am index 96333456..8321742a 100644 --- a/languages/cpp/app_templates/kxt/Makefile.am +++ b/languages/cpp/app_templates/kxt/Makefile.am @@ -5,10 +5,10 @@ dataFiles = src-Makefile.am app.cpp app.h main.cpp appui.rc app.tdevelop \ templateName= kxt ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/kxt/app.tdevelop b/languages/cpp/app_templates/kxt/app.tdevelop index b32b6656..317a4cbc 100644 --- a/languages/cpp/app_templates/kxt/app.tdevelop +++ b/languages/cpp/app_templates/kxt/app.tdevelop @@ -17,16 +17,16 @@ - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + src/%{APPNAMELC} debug @@ -62,8 +62,8 @@ -O0 -g3 - - + + @@ -75,8 +75,8 @@ false *.o,*.lo,CVS - - + + ada ada_bugs_gcc @@ -111,8 +111,8 @@ qmake User Guide - - + + libtool @@ -126,16 +126,16 @@ false true - - + + - - + + -f -dP @@ -144,7 +144,7 @@ -u3 -p - + @@ -156,14 +156,14 @@ true - + true 2 - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/kxt/kxt.kdevtemplate b/languages/cpp/app_templates/kxt/kxt.kdevtemplate new file mode 100644 index 00000000..79789759 --- /dev/null +++ b/languages/cpp/app_templates/kxt/kxt.kdevtemplate @@ -0,0 +1,269 @@ +# TDE Config File +[General] +Name=TDEConfig XT application +Name[ca]=Aplicació TDEConfig XT +Name[da]=TDEConfig XT program +Name[de]=TDEConfigXT-Anwendung +Name[el]=Εφαρμογή TDEConfig XT +Name[es]=Aplicación TDEConfig XT +Name[et]=TDEConfig XT rakendus +Name[eu]=TDEConfig XT aplikazioa +Name[fa]=کاربرد TDEConfig XT +Name[fr]=Application TDEConfig XT +Name[ga]=Feidhmchlár XT TDEConfig +Name[gl]=Aplicación TDEConfig XT +Name[hu]=TDEConfig XT-alapú alkalmazás +Name[it]=Applicazione TDEConfig XT +Name[ja]=TDEConfig XT アプリケーション +Name[nds]=TDEConfig-XT-Programm +Name[ne]=TDEConfig XT अनुप्रयोग +Name[nl]=TDEConfig XT-toepassing +Name[pl]=Program TDEConfig XT +Name[pt]=Aplicação do TDEConfig XT +Name[pt_BR]=Aplicação do TDEConfig XT +Name[ru]=Приложение TDE с TDEConfig XT +Name[sk]=TDEConfig XT aplikácia +Name[sr]=TDEConfig XT програм +Name[sr@Latn]=TDEConfig XT program +Name[sv]=TDEConfig XT-program +Name[tr]=TDEConfig XT uygulaması +Name[zh_CN]=TDEConfig XT 应用程序 +Name[zh_TW]=TDEConfig XT 應用程式 +Category=C++/TDE +Icon=kxt.png +Comment=Generates a simple TDE application with one widget and a configuration dialog +Comment[ca]=Genera una simple aplicació per al TDE amb un estri i un diàleg de configuració +Comment[da]=Genererer et simpelt TDE-program med en kontrol og en indstillingsdialog +Comment[de]=Erstellt eine einfache TDE-Anwendung mit einem Widget und einem Einstellungsdialog. +Comment[el]=Δημιουργεί μια απλή εφαρμογή TDE με ένα γραφικό συστατικό, ένα διάλογο ρύθμισης +Comment[en_GB]=Generates a simple TDE application with one widget and a configuration dialogue +Comment[es]=Genera una sencilla aplicación para TDE con una ventana y un diálogo de configuración +Comment[et]=Lihtsa TDE rakenduse loomine ühe vidina ja seadistustedialoogiga. +Comment[eu]=Trepeta bat eta konfigurazio elkarrizketa-koadro bat duen TDE aplikazio sinple bat sortzen du +Comment[fa]=یک کاربرد سادۀ TDE، با یک عنصر و یک محاورۀ پیکربندی تولید می‌کند +Comment[fr]=Génère une application TDE simple comprenant un seul élément graphique (widget) et une boîte de dialogue de configuration +Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí TDE le giuirléid amháin agus dialóg chumraíochta +Comment[gl]=Xera unha aplicación TDE sinxela cunha compoñente e un diálogo de configuración +Comment[hu]=Létrehoz egy egyszerű TDE-alkalmazást egy grafikus elemmel és egy beállítóablakkal +Comment[it]=Genera una semplice applicazione TDE con un elemento grafico e una finestra di configurazione +Comment[ja]=一つのウィジェットと設定ダイアログを含む簡単な TDE アプリケーションを作成します +Comment[nds]=Stellt en eenfach TDE-Programm mit een Element un en Instelldialoog op +Comment[ne]=एउटा विगेट र कन्फिगरेसन संवादसँग साधारण केडीई अनुप्रयोग उत्पन्न गर्दछ +Comment[nl]=Genereert een eenvoudige TDE-toepassing met één widget en een configuratiedialoog +Comment[pl]=Generuje prosty program TDE z jednym widgetem i oknem konfiguracyjnym +Comment[pt]=Gera uma aplicação simples do TDE com uma janela principal e outra para configuração +Comment[pt_BR]=Gera uma aplicação simples do TDE com uma janela principal e outra para configuração +Comment[ru]=Создание приложения TDE с окном конфигурации +Comment[sk]=Vygeneruje jednoduchú TDE aplikáciu s jedným oknom a konfiguračným dialógom +Comment[sr]=Прави једноставан TDE програм са једном контролом и дијалогом за подешавање +Comment[sr@Latn]=Pravi jednostavan TDE program sa jednom kontrolom i dijalogom za podešavanje +Comment[sv]=Skapar ett enkelt TDE-program med en grafisk komponent och en inställningsdialogruta +Comment[tr]=Bir parçacığı ve ayar penceresi olan basit bir TDE uygulaması yaratır. +Comment[zh_CN]=生成带一个部件和一个配置对话框的简单 TDE 应用程序 +Comment[zh_TW]=產生一個簡單的 TDE 應用程式,內含一個元件與一個設定對話框。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=kxt.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/tde-app.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[FILE10] +Type=install +Source=%{tdevelop}/template-common/hi16-app-app.png +Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png +Process=false + +[FILE11] +Type=install +Source=%{tdevelop}/template-common/hi32-app-app.png +Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png +Process=false + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE12] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE13] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE14] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE15] +Type=install +Source=%{src}/app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE16] +Type=install +Source=%{src}/app.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE17] +Type=install +EscapeXML=true +Source=%{src}/appview_base.ui +Dest=%{dest}/src/%{APPNAMELC}view_base.ui + +[FILE18] +Type=install +Source=%{src}/appview.cpp +Dest=%{dest}/src/%{APPNAMELC}view.cpp + +[FILE19] +Type=install +Source=%{src}/appview.h +Dest=%{dest}/src/%{APPNAMELC}view.h + +[FILE20] +Type=install +EscapeXML=true +Source=%{src}/prefs-base.ui +Dest=%{dest}/src/prefs-base.ui + +[FILE21] +Type=install +Source=%{src}/prefs.cpp +Dest=%{dest}/src/prefs.cpp + +[FILE22] +Type=install +Source=%{src}/prefs.h +Dest=%{dest}/src/prefs.h + +[FILE23] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/main.cpp + +[FILE24] +Type=install +EscapeXML=true +Source=%{src}/appui.rc +Dest=%{dest}/src/%{APPNAMELC}ui.rc + +[FILE25] +Type=install +Source=%{src}/README +Dest=%{dest}/src/README + +[FILE26] +Type=install +Source=%{src}/app.kcfg +Dest=%{dest}/src/%{APPNAMELC}.kcfg + +[FILE27] +Type=install +Source=%{src}/settings.kcfgc +Dest=%{dest}/src/settings.kcfgc + +[FILE28] +Type=install +Source=%{src}/src-configure.in.in +Dest=%{dest}/configure.in.in + +[MSG] +Type=message +Comment=A TDEConfig XT application was created in %{dest} +Comment[ca]=Una aplicació TDEConfig XT ha estat creada en %{dest} +Comment[da]=Et TDEConfig XT-program blev oprettet i %{dest} +Comment[de]=Eine TDEConfig-XT-Anwendung wurde in %{dest} erstellt +Comment[el]=Μια εφαρμογή TDEConfig XT δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación TDEConfig XT ha sido creada en %{dest} +Comment[et]=A TDEConfig XT rakendus loodi asukohta %{dest} +Comment[eu]=TDEConfig XT aplikazio bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد TDEConfig XT در %{dest} ایجاد شد +Comment[fr]=Une application TDEConfig XT a été créée dans %{dest} +Comment[ga]=Cruthaíodh feidhmchlár XT TDEConfig i %{dest} +Comment[gl]=Creouse unha aplicación TDEConfig XT en %{dest} +Comment[hu]=Létrejött egy TDEConfig XT-alapú alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione TDEConfig XT in %{dest} +Comment[ja]=TDEConfig XT アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en TDEConfig-XT-Programm opstellt +Comment[ne]=TDEConfig XT अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een TDEConfig XT-toepassing is aangemaakt in %{dest} +Comment[pl]=Program TDEConfig XT został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação do TDEConfig XT em %{dest} +Comment[pt_BR]=Foi criada uma aplicação do TDEConfig XT em %{dest} +Comment[ru]=Приложение TDE с TDEConfig XT создано в %{dest} +Comment[sk]=TDEConfig XT aplikácia bola vytvorená v %{dest} +Comment[sr]=TDEConfig XT програм је направљен у %{dest} +Comment[sr@Latn]=TDEConfig XT program je napravljen u %{dest} +Comment[sv]=Ett TDEConfig XT-program skapades i %{dest} +Comment[tr]=Bir TDEConfig XT uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了 TDEConfig XT 应用程序 +Comment[zh_TW]=一個 TDEConfig XT 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/kxt/kxt.tdevtemplate b/languages/cpp/app_templates/kxt/kxt.tdevtemplate deleted file mode 100644 index 7b6583f1..00000000 --- a/languages/cpp/app_templates/kxt/kxt.tdevtemplate +++ /dev/null @@ -1,269 +0,0 @@ -# TDE Config File -[General] -Name=TDEConfig XT application -Name[ca]=Aplicació TDEConfig XT -Name[da]=TDEConfig XT program -Name[de]=TDEConfigXT-Anwendung -Name[el]=Εφαρμογή TDEConfig XT -Name[es]=Aplicación TDEConfig XT -Name[et]=TDEConfig XT rakendus -Name[eu]=TDEConfig XT aplikazioa -Name[fa]=کاربرد TDEConfig XT -Name[fr]=Application TDEConfig XT -Name[ga]=Feidhmchlár XT TDEConfig -Name[gl]=Aplicación TDEConfig XT -Name[hu]=TDEConfig XT-alapú alkalmazás -Name[it]=Applicazione TDEConfig XT -Name[ja]=TDEConfig XT アプリケーション -Name[nds]=TDEConfig-XT-Programm -Name[ne]=TDEConfig XT अनुप्रयोग -Name[nl]=TDEConfig XT-toepassing -Name[pl]=Program TDEConfig XT -Name[pt]=Aplicação do TDEConfig XT -Name[pt_BR]=Aplicação do TDEConfig XT -Name[ru]=Приложение TDE с TDEConfig XT -Name[sk]=TDEConfig XT aplikácia -Name[sr]=TDEConfig XT програм -Name[sr@Latn]=TDEConfig XT program -Name[sv]=TDEConfig XT-program -Name[tr]=TDEConfig XT uygulaması -Name[zh_CN]=TDEConfig XT 应用程序 -Name[zh_TW]=TDEConfig XT 應用程式 -Category=C++/TDE -Icon=kxt.png -Comment=Generates a simple TDE application with one widget and a configuration dialog -Comment[ca]=Genera una simple aplicació per al TDE amb un estri i un diàleg de configuració -Comment[da]=Genererer et simpelt TDE-program med en kontrol og en indstillingsdialog -Comment[de]=Erstellt eine einfache TDE-Anwendung mit einem Widget und einem Einstellungsdialog. -Comment[el]=Δημιουργεί μια απλή εφαρμογή TDE με ένα γραφικό συστατικό, ένα διάλογο ρύθμισης -Comment[en_GB]=Generates a simple TDE application with one widget and a configuration dialogue -Comment[es]=Genera una sencilla aplicación para TDE con una ventana y un diálogo de configuración -Comment[et]=Lihtsa TDE rakenduse loomine ühe vidina ja seadistustedialoogiga. -Comment[eu]=Trepeta bat eta konfigurazio elkarrizketa-koadro bat duen TDE aplikazio sinple bat sortzen du -Comment[fa]=یک کاربرد سادۀ TDE، با یک عنصر و یک محاورۀ پیکربندی تولید می‌کند -Comment[fr]=Génère une application TDE simple comprenant un seul élément graphique (widget) et une boîte de dialogue de configuration -Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí TDE le giuirléid amháin agus dialóg chumraíochta -Comment[gl]=Xera unha aplicación TDE sinxela cunha compoñente e un diálogo de configuración -Comment[hu]=Létrehoz egy egyszerű TDE-alkalmazást egy grafikus elemmel és egy beállítóablakkal -Comment[it]=Genera una semplice applicazione TDE con un elemento grafico e una finestra di configurazione -Comment[ja]=一つのウィジェットと設定ダイアログを含む簡単な TDE アプリケーションを作成します -Comment[nds]=Stellt en eenfach TDE-Programm mit een Element un en Instelldialoog op -Comment[ne]=एउटा विगेट र कन्फिगरेसन संवादसँग साधारण केडीई अनुप्रयोग उत्पन्न गर्दछ -Comment[nl]=Genereert een eenvoudige TDE-toepassing met één widget en een configuratiedialoog -Comment[pl]=Generuje prosty program TDE z jednym widgetem i oknem konfiguracyjnym -Comment[pt]=Gera uma aplicação simples do TDE com uma janela principal e outra para configuração -Comment[pt_BR]=Gera uma aplicação simples do TDE com uma janela principal e outra para configuração -Comment[ru]=Создание приложения TDE с окном конфигурации -Comment[sk]=Vygeneruje jednoduchú TDE aplikáciu s jedným oknom a konfiguračným dialógom -Comment[sr]=Прави једноставан TDE програм са једном контролом и дијалогом за подешавање -Comment[sr@Latn]=Pravi jednostavan TDE program sa jednom kontrolom i dijalogom za podešavanje -Comment[sv]=Skapar ett enkelt TDE-program med en grafisk komponent och en inställningsdialogruta -Comment[tr]=Bir parçacığı ve ayar penceresi olan basit bir TDE uygulaması yaratır. -Comment[zh_CN]=生成带一个部件和一个配置对话框的简单 TDE 应用程序 -Comment[zh_TW]=產生一個簡單的 TDE 應用程式,內含一個元件與一個設定對話框。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=kxt.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/tde-app.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[FILE10] -Type=install -Source=%{tdevelop}/template-common/hi16-app-app.png -Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png -Process=false - -[FILE11] -Type=install -Source=%{tdevelop}/template-common/hi32-app-app.png -Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png -Process=false - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE12] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE13] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE14] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE15] -Type=install -Source=%{src}/app.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE16] -Type=install -Source=%{src}/app.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE17] -Type=install -EscapeXML=true -Source=%{src}/appview_base.ui -Dest=%{dest}/src/%{APPNAMELC}view_base.ui - -[FILE18] -Type=install -Source=%{src}/appview.cpp -Dest=%{dest}/src/%{APPNAMELC}view.cpp - -[FILE19] -Type=install -Source=%{src}/appview.h -Dest=%{dest}/src/%{APPNAMELC}view.h - -[FILE20] -Type=install -EscapeXML=true -Source=%{src}/prefs-base.ui -Dest=%{dest}/src/prefs-base.ui - -[FILE21] -Type=install -Source=%{src}/prefs.cpp -Dest=%{dest}/src/prefs.cpp - -[FILE22] -Type=install -Source=%{src}/prefs.h -Dest=%{dest}/src/prefs.h - -[FILE23] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/main.cpp - -[FILE24] -Type=install -EscapeXML=true -Source=%{src}/appui.rc -Dest=%{dest}/src/%{APPNAMELC}ui.rc - -[FILE25] -Type=install -Source=%{src}/README -Dest=%{dest}/src/README - -[FILE26] -Type=install -Source=%{src}/app.kcfg -Dest=%{dest}/src/%{APPNAMELC}.kcfg - -[FILE27] -Type=install -Source=%{src}/settings.kcfgc -Dest=%{dest}/src/settings.kcfgc - -[FILE28] -Type=install -Source=%{src}/src-configure.in.in -Dest=%{dest}/configure.in.in - -[MSG] -Type=message -Comment=A TDEConfig XT application was created in %{dest} -Comment[ca]=Una aplicació TDEConfig XT ha estat creada en %{dest} -Comment[da]=Et TDEConfig XT-program blev oprettet i %{dest} -Comment[de]=Eine TDEConfig-XT-Anwendung wurde in %{dest} erstellt -Comment[el]=Μια εφαρμογή TDEConfig XT δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación TDEConfig XT ha sido creada en %{dest} -Comment[et]=A TDEConfig XT rakendus loodi asukohta %{dest} -Comment[eu]=TDEConfig XT aplikazio bat sortu da hemen: %{dest} -Comment[fa]=یک کاربرد TDEConfig XT در %{dest} ایجاد شد -Comment[fr]=Une application TDEConfig XT a été créée dans %{dest} -Comment[ga]=Cruthaíodh feidhmchlár XT TDEConfig i %{dest} -Comment[gl]=Creouse unha aplicación TDEConfig XT en %{dest} -Comment[hu]=Létrejött egy TDEConfig XT-alapú alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione TDEConfig XT in %{dest} -Comment[ja]=TDEConfig XT アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en TDEConfig-XT-Programm opstellt -Comment[ne]=TDEConfig XT अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een TDEConfig XT-toepassing is aangemaakt in %{dest} -Comment[pl]=Program TDEConfig XT został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação do TDEConfig XT em %{dest} -Comment[pt_BR]=Foi criada uma aplicação do TDEConfig XT em %{dest} -Comment[ru]=Приложение TDE с TDEConfig XT создано в %{dest} -Comment[sk]=TDEConfig XT aplikácia bola vytvorená v %{dest} -Comment[sr]=TDEConfig XT програм је направљен у %{dest} -Comment[sr@Latn]=TDEConfig XT program je napravljen u %{dest} -Comment[sv]=Ett TDEConfig XT-program skapades i %{dest} -Comment[tr]=Bir TDEConfig XT uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了 TDEConfig XT 应用程序 -Comment[zh_TW]=一個 TDEConfig XT 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/makefileempty/CMakeLists.txt b/languages/cpp/app_templates/makefileempty/CMakeLists.txt index 25f86b01..48a6e3dd 100644 --- a/languages/cpp/app_templates/makefileempty/CMakeLists.txt +++ b/languages/cpp/app_templates/makefileempty/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( makefileempty.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/makefileempty.tar.gz makefileempty.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - makefileempty.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + makefileempty.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/makefileempty/Makefile.am b/languages/cpp/app_templates/makefileempty/Makefile.am index 60035c3d..ec381a04 100644 --- a/languages/cpp/app_templates/makefileempty/Makefile.am +++ b/languages/cpp/app_templates/makefileempty/Makefile.am @@ -3,10 +3,10 @@ dataFiles = makefileempty-Makefile \ templateName = makefileempty ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/makefileempty/app.tdevelop b/languages/cpp/app_templates/makefileempty/app.tdevelop index e3b8de97..da576369 100644 --- a/languages/cpp/app_templates/makefileempty/app.tdevelop +++ b/languages/cpp/app_templates/makefileempty/app.tdevelop @@ -4,14 +4,14 @@ %{AUTHOR} %{EMAIL} %{VERSION} - TDevCustomProject + KDevCustomProject C++ C++ Code - + @@ -33,8 +33,8 @@ -O0 -g3 - - + + ada ada_bugs_gcc @@ -79,23 +79,23 @@ TDE Libraries (Doxygen) - - + + - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/makefileempty/makefileempty.kdevtemplate b/languages/cpp/app_templates/makefileempty/makefileempty.kdevtemplate new file mode 100644 index 00000000..b69317d7 --- /dev/null +++ b/languages/cpp/app_templates/makefileempty/makefileempty.kdevtemplate @@ -0,0 +1,85 @@ +# TDE Config File +[General] +Name=Empty Custom Makefile Template +Name[ca]=Plantilla Makefile personalitzada buida +Name[da]=Tom brugertilpasset Makefile-skabelon +Name[de]=Leere Vorlage für benutzerdefiniertes Makefile +Name[el]=Κενό προσαρμοσμένο πρότυπο Makefile +Name[es]=Plantilla vacía para Makefile personalizado +Name[et]=Tühi kohandatud makefile'i mall +Name[hu]=Üres egyedi Makefile-ra épülő sablon +Name[it]=Modello di makefile personalizzato vuoto +Name[nds]=Egen leddig Makefile-Vörlaag +Name[nl]=Leeg aangepast Makefile-sjabloon +Name[pl]=Pusty własny szablon pliku Makefile +Name[pt]=Modelo de Makefile Personalizada Vazio +Name[pt_BR]=Modelo de Makefile Personalizada Vazio +Name[ru]=Пустой шаблон с пользовательским Makefile +Name[sk]=Prázdna šablóna pre vlastný Makefile +Name[sr]=Празан шаблон посебног справифајла +Name[sr@Latn]=Prazan šablon posebnog spravifajla +Name[sv]=Tom mall för egen byggfil +Name[zh_TW]=空的自訂 Makefile 樣板 +Icon=makefileempty.png +Category=C++ +Comment=Generate an empty Custom Makefile based application +Comment[ca]=Genera una aplicació personalitzada buida basada en Makefile +Comment[da]=Opretter et tomt brugertilpasset Makefile-baseret program +Comment[de]=Erstellt eine auf einem benutzerdefinierten Makefile basierende Anwendung +Comment[el]=Δημιουργία μίας κενής εφαρμογής βασισμένης σε προσαρμοσμένο Makefile +Comment[es]=Genera una aplicación vacía basada en un Makefile personalizado +Comment[et]=Tühja rakenduse loomine kohandatud makefile'i põhjal +Comment[hu]=Létrehoz egy egyedi Makefile-ra épülő alkalmazást +Comment[it]=Genera un'applicazione basata su makefile personalizzato +Comment[nds]=Stellt en leddig Programm op, dat op en egen Makefile opbuut +Comment[nl]=Genereer een leeg op een aangepast Makefile gebaseerd programma +Comment[pl]=Generuje pusty program z własnym plikiem Makefile +Comment[pt]=Gera uma aplicação baseada em Makefile's personalizadas +Comment[pt_BR]=Gera uma aplicação baseada em Makefile's personalizadas +Comment[ru]=Создание каркаса приложения, использующего пользовательский Makefile +Comment[sk]=Vygeneruje prázdnu aplikáciu založenú na vlastnom Makefile +Comment[sr]=Прави програм на основу посебног справифајла +Comment[sr@Latn]=Pravi program na osnovu posebnog spravifajla +Comment[sv]=Skapar ett tomt program baserat på en egen byggfil +Comment[zh_TW]=產生一個空的使用自訂 Makefile 的應用程式 +FileTemplates=h,CStyle,cpp,CStyle +Archive=makefileempty.tar.gz + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE2] +Type=install +Source=%{src}/makefileempty-Makefile +Dest=%{dest}/Makefile + +[MSG] +Type=message +Comment=A Custom Makefile based application was created in %{dest} +Comment[ca]=S'ha creat una aplicació basada en Makefile en %{dest} +Comment[da]=Et brugertilpasset Makefile-baseret program blev oprettet i %{dest} +Comment[de]=Eine auf einem benutzerdefinierten Makefile basierende Anwendung wurde in %{dest} erstellt. +Comment[el]=Δημιουργήθηκε μία εφαρμογή βασισμένη σε προσαρμοσμένο Makefile στο %{dest} +Comment[es]=Una aplicación basada en un Makefile personalizado ha sido creada en %{dest} +Comment[et]=Rakendus kohandatud makefile'i põhjal loodi asukohta %{dest} +Comment[hu]=Létrejött egy egyedi Makefile-ra épülő alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione basata su un makefile personalizzato in %{dest} +Comment[nds]=In %{dest} wöör en Programm opstellt, dat op en egen Makefile opbuut +Comment[nl]=Een op een aangepast Makefile gebaseerd programma is aangemaakt in %{dest} +Comment[pl]=Program używający własnego Makefile został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação baseada em Makefile's personalizadas em %{dest} +Comment[pt_BR]=Foi criada uma aplicação baseada em Makefile's personalizadas em %{dest} +Comment[ru]=Приложение с пользовательским Makefile создано в %{dest} +Comment[sk]=Aplikácia založená na vlastnom Makefile bola vytvorená v %{dest} +Comment[sr]=Програм на основу посебног справифајла направљен је у %{dest} +Comment[sr@Latn]=Program na osnovu posebnog spravifajla napravljen je u %{dest} +Comment[sv]=Ett program baserat på en egen byggfil skapades i %{dest} +Comment[zh_TW]=一個以自訂 Makefile 為基礎的應用程式已建立於 %{dest} + diff --git a/languages/cpp/app_templates/makefileempty/makefileempty.tdevtemplate b/languages/cpp/app_templates/makefileempty/makefileempty.tdevtemplate deleted file mode 100644 index 97c3f238..00000000 --- a/languages/cpp/app_templates/makefileempty/makefileempty.tdevtemplate +++ /dev/null @@ -1,85 +0,0 @@ -# TDE Config File -[General] -Name=Empty Custom Makefile Template -Name[ca]=Plantilla Makefile personalitzada buida -Name[da]=Tom brugertilpasset Makefile-skabelon -Name[de]=Leere Vorlage für benutzerdefiniertes Makefile -Name[el]=Κενό προσαρμοσμένο πρότυπο Makefile -Name[es]=Plantilla vacía para Makefile personalizado -Name[et]=Tühi kohandatud makefile'i mall -Name[hu]=Üres egyedi Makefile-ra épülő sablon -Name[it]=Modello di makefile personalizzato vuoto -Name[nds]=Egen leddig Makefile-Vörlaag -Name[nl]=Leeg aangepast Makefile-sjabloon -Name[pl]=Pusty własny szablon pliku Makefile -Name[pt]=Modelo de Makefile Personalizada Vazio -Name[pt_BR]=Modelo de Makefile Personalizada Vazio -Name[ru]=Пустой шаблон с пользовательским Makefile -Name[sk]=Prázdna šablóna pre vlastný Makefile -Name[sr]=Празан шаблон посебног справифајла -Name[sr@Latn]=Prazan šablon posebnog spravifajla -Name[sv]=Tom mall för egen byggfil -Name[zh_TW]=空的自訂 Makefile 樣板 -Icon=makefileempty.png -Category=C++ -Comment=Generate an empty Custom Makefile based application -Comment[ca]=Genera una aplicació personalitzada buida basada en Makefile -Comment[da]=Opretter et tomt brugertilpasset Makefile-baseret program -Comment[de]=Erstellt eine auf einem benutzerdefinierten Makefile basierende Anwendung -Comment[el]=Δημιουργία μίας κενής εφαρμογής βασισμένης σε προσαρμοσμένο Makefile -Comment[es]=Genera una aplicación vacía basada en un Makefile personalizado -Comment[et]=Tühja rakenduse loomine kohandatud makefile'i põhjal -Comment[hu]=Létrehoz egy egyedi Makefile-ra épülő alkalmazást -Comment[it]=Genera un'applicazione basata su makefile personalizzato -Comment[nds]=Stellt en leddig Programm op, dat op en egen Makefile opbuut -Comment[nl]=Genereer een leeg op een aangepast Makefile gebaseerd programma -Comment[pl]=Generuje pusty program z własnym plikiem Makefile -Comment[pt]=Gera uma aplicação baseada em Makefile's personalizadas -Comment[pt_BR]=Gera uma aplicação baseada em Makefile's personalizadas -Comment[ru]=Создание каркаса приложения, использующего пользовательский Makefile -Comment[sk]=Vygeneruje prázdnu aplikáciu založenú na vlastnom Makefile -Comment[sr]=Прави програм на основу посебног справифајла -Comment[sr@Latn]=Pravi program na osnovu posebnog spravifajla -Comment[sv]=Skapar ett tomt program baserat på en egen byggfil -Comment[zh_TW]=產生一個空的使用自訂 Makefile 的應用程式 -FileTemplates=h,CStyle,cpp,CStyle -Archive=makefileempty.tar.gz - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE2] -Type=install -Source=%{src}/makefileempty-Makefile -Dest=%{dest}/Makefile - -[MSG] -Type=message -Comment=A Custom Makefile based application was created in %{dest} -Comment[ca]=S'ha creat una aplicació basada en Makefile en %{dest} -Comment[da]=Et brugertilpasset Makefile-baseret program blev oprettet i %{dest} -Comment[de]=Eine auf einem benutzerdefinierten Makefile basierende Anwendung wurde in %{dest} erstellt. -Comment[el]=Δημιουργήθηκε μία εφαρμογή βασισμένη σε προσαρμοσμένο Makefile στο %{dest} -Comment[es]=Una aplicación basada en un Makefile personalizado ha sido creada en %{dest} -Comment[et]=Rakendus kohandatud makefile'i põhjal loodi asukohta %{dest} -Comment[hu]=Létrejött egy egyedi Makefile-ra épülő alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione basata su un makefile personalizzato in %{dest} -Comment[nds]=In %{dest} wöör en Programm opstellt, dat op en egen Makefile opbuut -Comment[nl]=Een op een aangepast Makefile gebaseerd programma is aangemaakt in %{dest} -Comment[pl]=Program używający własnego Makefile został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação baseada em Makefile's personalizadas em %{dest} -Comment[pt_BR]=Foi criada uma aplicação baseada em Makefile's personalizadas em %{dest} -Comment[ru]=Приложение с пользовательским Makefile создано в %{dest} -Comment[sk]=Aplikácia založená na vlastnom Makefile bola vytvorená v %{dest} -Comment[sr]=Програм на основу посебног справифајла направљен је у %{dest} -Comment[sr@Latn]=Program na osnovu posebnog spravifajla napravljen je u %{dest} -Comment[sv]=Ett program baserat på en egen byggfil skapades i %{dest} -Comment[zh_TW]=一個以自訂 Makefile 為基礎的應用程式已建立於 %{dest} - diff --git a/languages/cpp/app_templates/noatunui/CMakeLists.txt b/languages/cpp/app_templates/noatunui/CMakeLists.txt index 698684c1..332a960a 100644 --- a/languages/cpp/app_templates/noatunui/CMakeLists.txt +++ b/languages/cpp/app_templates/noatunui/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( noatunui.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/noatunui.tar.gz noatunui.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - noatunui.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + noatunui.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/noatunui/Makefile.am b/languages/cpp/app_templates/noatunui/Makefile.am index d72a928d..a222f235 100644 --- a/languages/cpp/app_templates/noatunui/Makefile.am +++ b/languages/cpp/app_templates/noatunui/Makefile.am @@ -3,10 +3,10 @@ dataFiles = src-Makefile.am plugin_app.cpp plugin_impl.cpp plugin_impl.h \ templateName = noatunui ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/noatunui/noatunui.kdevtemplate b/languages/cpp/app_templates/noatunui/noatunui.kdevtemplate new file mode 100644 index 00000000..a91349c3 --- /dev/null +++ b/languages/cpp/app_templates/noatunui/noatunui.kdevtemplate @@ -0,0 +1,195 @@ +# TDE Config File +[General] +Name=Noatun UI plugin +Name[ca]=Connector d'interfície d'usuari per a Noatun +Name[de]=Noatun-UI-Modul +Name[el]=Πρόσθετο Noatun UI +Name[es]=Complemento de interfaz de usuario para Noatun +Name[et]=Noatuni kasutajaliidese plugin +Name[eu]=Noatun UI plugina +Name[fa]=وصلۀ Noatun UI +Name[fr]=Module externe d'interface utilisateur pour Noatun +Name[ga]=Breiseán Chomhéadan Noatun +Name[gl]=Extensión para a IU de Noatun +Name[hu]=Noatun UI-modul +Name[it]=Plugin UI di noatun +Name[ja]=Noatun UI プラグイン +Name[nds]=Böversiet-Moduul för Noatun +Name[ne]=नोअटन UI plugin +Name[nl]=Noatun UI-plugin +Name[pl]=Wtyczka do interfejsu użytkownika Noatun +Name[pt]='Plugin' de UI do Noatun +Name[pt_BR]='Plugin' de UI do Noatun +Name[ru]=Модуль интерфейса Noatun +Name[sk]=Noatun UI modul +Name[sr]=UI прикључак за Noatun +Name[sr@Latn]=UI priključak za Noatun +Name[sv]=Noatun-insticksprogram för användargränssnitt +Name[tr]=Noatun Arayüz eklentisi +Name[zh_CN]=Noatun 界面插件 +Name[zh_TW]=Noatun 使用者介面外掛程式 +Icon=noatunui.png +Category=C++/TDE +Comment=Generates a simple user interface plugin for noatun. +Comment[ca]=Genera un simple connector d'interfície d'usuari per a Noatun. +Comment[da]=Genererer en simpel brugergrænseflade-plugin for noatun. +Comment[de]=Erstellt ein einfaches Oberflächen-Modul für Noatun +Comment[el]=Δημιουργεί ένα απλό πρόσθετο γραφικού περιβάλλοντος για το noatun. +Comment[es]=Genera un complemento de interfaz de usuario para Noatun. +Comment[et]=Noatuni lihtsa kasutajaliidese plugina loomine. +Comment[eu]=Noatun-entzat erabiltzaile-interfazerako plugin sinple bat sortzen du. +Comment[fa]=یک وصلۀ واسط کاربر ساده برای noatun تولید می‌کند. +Comment[fr]=Génère un module externe d'interface utilisateur simple pour Noatun. +Comment[gl]=Xera unha extensión sinxela para a interface de usuario de noatun. +Comment[hu]=Létrehoz egy egyszerű felületbővítő modult a Noatun programhoz. +Comment[it]=Genera un semplice plugin di interfaccia per noatun. +Comment[nds]=Stellt en eenfach Böversietmoduul för Noatun op. +Comment[ne]=नोअटनका लागि साधारण इन्टरफेस प्लगइन उत्पन्न गर्दछ । +Comment[nl]=Genereert een eenvoudige gebruikersinterfaceplugin voor Noatun. +Comment[pl]=Generuje prostą wtyczkę do interfejsu użytkownika programu Noatun. +Comment[pt]=Gera um 'plugin' simples para a interface de utilizador do Noatun. +Comment[pt_BR]=Gera um 'plugin' simples para a interface de utilizador do Noatun. +Comment[ru]=Создание простого интерфейса для Noatun. +Comment[sk]=Vygeneruje jednoduchý modul užívateľského rozhrania pre Noatun +Comment[sr]=Прави једноставан прикључак корисничког интерфејса за Noatun. +Comment[sr@Latn]=Pravi jednostavan priključak korisničkog interfejsa za Noatun. +Comment[sv]=Skapar ett enkelt insticksprogram för användargränssnitt till Noatun. +Comment[tr]=Noatun için basit bir kullanıcı arayüzü eklentisi yaratır. +Comment[zh_CN]=生成 noatun 的简单用户界面插件。 +Comment[zh_TW]=產生一個簡單的 noatun 的使用者介面外掛程式。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/plugin_%{APPNAMELC}_impl.cpp +Archive=noatunui.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/plugin.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE10] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE11] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE12] +Type=install +Source=%{src}/plugin_app.cpp +Dest=%{dest}/src/plugin_%{APPNAMELC}.cpp + +[FILE13] +Type=install +Source=%{src}/plugin_impl.cpp +Dest=%{dest}/src/plugin_%{APPNAMELC}_impl.cpp + +[FILE14] +Type=install +Source=%{src}/plugin_impl.h +Dest=%{dest}/src/plugin_%{APPNAMELC}_impl.h + +[FILE15] +Type=install +Source=%{src}/plugin.plugin +Dest=%{dest}/src/%{APPNAMELC}.plugin + +[MSG] +Type=message +Comment=A Noatun UI plugin was created in %{dest} +Comment[ca]=Un connector d'interfície d'usuari per a Noatun ha estat creat en %{dest} +Comment[da]=Et Noatun UI-plugin blev oprettet i %{dest} +Comment[de]=Ein Oberflächen-Modul für Noatun wurde in %{dest} erstellt. +Comment[el]=Ένα πρόσθετο Noatun UI δημιουργήθηκε στο %{dest} +Comment[es]=Un complemento de interfaz de usuario para Noatun ha sido creado en %{dest} +Comment[et]=Noatuni kasutajaliidese plugin loodi asukohta %{dest} +Comment[eu]=Noatun UI plugin bat sortu da hemen: %{dest} +Comment[fa]=یک وصلۀ Noatun UI در %{dest} ایجاد شد +Comment[fr]=Un module externe d'interface utilisateur pour Noatun a été créé dans %{dest} +Comment[ga]=Cruthaíodh breiseán chomhéadan Noatun i %{dest} +Comment[gl]=Creouse unha extensión para a IU de Noatun en %{dest} +Comment[hu]=Létrejött egy Noatun UI-modul itt: %{dest} +Comment[it]=È stato creato un plugin UI per noatun in %{dest} +Comment[ja]=Noatun UI プラグインを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Noatun-Böversietmoduul opstellt +Comment[ne]=नोअटन UI प्लगइन %{dest} मा सिर्जना गरियो +Comment[nl]=Een Noatun UI-plugin is aangemaakt in %{dest} +Comment[pl]=Wtyczka do interfejsu Noatun została utworzona w %{dest} +Comment[pt]=Foi criado um 'plugin' da UI do Noatun em %{dest} +Comment[pt_BR]=Foi criado um 'plugin' da UI do Noatun em %{dest} +Comment[ru]=Модуль интерфейса для Noatun создан в %{dest} +Comment[sk]=Noatun UI modul bol vytvorený v %{dest} +Comment[sr]=UI прикључак за Noatun направљен је у %{dest} +Comment[sr@Latn]=UI priključak za Noatun napravljen je u %{dest} +Comment[sv]=Ett Noatun-insticksprogram för användargränssnitt skapades i %{dest} +Comment[tr]=Bir Noatun Arayüz eklentisi %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个 Noatun 界面插件 +Comment[zh_TW]=一個 Noatun 使用者介面外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/noatunui/noatunui.tdevtemplate b/languages/cpp/app_templates/noatunui/noatunui.tdevtemplate deleted file mode 100644 index 3324640f..00000000 --- a/languages/cpp/app_templates/noatunui/noatunui.tdevtemplate +++ /dev/null @@ -1,195 +0,0 @@ -# TDE Config File -[General] -Name=Noatun UI plugin -Name[ca]=Connector d'interfície d'usuari per a Noatun -Name[de]=Noatun-UI-Modul -Name[el]=Πρόσθετο Noatun UI -Name[es]=Complemento de interfaz de usuario para Noatun -Name[et]=Noatuni kasutajaliidese plugin -Name[eu]=Noatun UI plugina -Name[fa]=وصلۀ Noatun UI -Name[fr]=Module externe d'interface utilisateur pour Noatun -Name[ga]=Breiseán Chomhéadan Noatun -Name[gl]=Extensión para a IU de Noatun -Name[hu]=Noatun UI-modul -Name[it]=Plugin UI di noatun -Name[ja]=Noatun UI プラグイン -Name[nds]=Böversiet-Moduul för Noatun -Name[ne]=नोअटन UI plugin -Name[nl]=Noatun UI-plugin -Name[pl]=Wtyczka do interfejsu użytkownika Noatun -Name[pt]='Plugin' de UI do Noatun -Name[pt_BR]='Plugin' de UI do Noatun -Name[ru]=Модуль интерфейса Noatun -Name[sk]=Noatun UI modul -Name[sr]=UI прикључак за Noatun -Name[sr@Latn]=UI priključak za Noatun -Name[sv]=Noatun-insticksprogram för användargränssnitt -Name[tr]=Noatun Arayüz eklentisi -Name[zh_CN]=Noatun 界面插件 -Name[zh_TW]=Noatun 使用者介面外掛程式 -Icon=noatunui.png -Category=C++/TDE -Comment=Generates a simple user interface plugin for noatun. -Comment[ca]=Genera un simple connector d'interfície d'usuari per a Noatun. -Comment[da]=Genererer en simpel brugergrænseflade-plugin for noatun. -Comment[de]=Erstellt ein einfaches Oberflächen-Modul für Noatun -Comment[el]=Δημιουργεί ένα απλό πρόσθετο γραφικού περιβάλλοντος για το noatun. -Comment[es]=Genera un complemento de interfaz de usuario para Noatun. -Comment[et]=Noatuni lihtsa kasutajaliidese plugina loomine. -Comment[eu]=Noatun-entzat erabiltzaile-interfazerako plugin sinple bat sortzen du. -Comment[fa]=یک وصلۀ واسط کاربر ساده برای noatun تولید می‌کند. -Comment[fr]=Génère un module externe d'interface utilisateur simple pour Noatun. -Comment[gl]=Xera unha extensión sinxela para a interface de usuario de noatun. -Comment[hu]=Létrehoz egy egyszerű felületbővítő modult a Noatun programhoz. -Comment[it]=Genera un semplice plugin di interfaccia per noatun. -Comment[nds]=Stellt en eenfach Böversietmoduul för Noatun op. -Comment[ne]=नोअटनका लागि साधारण इन्टरफेस प्लगइन उत्पन्न गर्दछ । -Comment[nl]=Genereert een eenvoudige gebruikersinterfaceplugin voor Noatun. -Comment[pl]=Generuje prostą wtyczkę do interfejsu użytkownika programu Noatun. -Comment[pt]=Gera um 'plugin' simples para a interface de utilizador do Noatun. -Comment[pt_BR]=Gera um 'plugin' simples para a interface de utilizador do Noatun. -Comment[ru]=Создание простого интерфейса для Noatun. -Comment[sk]=Vygeneruje jednoduchý modul užívateľského rozhrania pre Noatun -Comment[sr]=Прави једноставан прикључак корисничког интерфејса за Noatun. -Comment[sr@Latn]=Pravi jednostavan priključak korisničkog interfejsa za Noatun. -Comment[sv]=Skapar ett enkelt insticksprogram för användargränssnitt till Noatun. -Comment[tr]=Noatun için basit bir kullanıcı arayüzü eklentisi yaratır. -Comment[zh_CN]=生成 noatun 的简单用户界面插件。 -Comment[zh_TW]=產生一個簡單的 noatun 的使用者介面外掛程式。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/plugin_%{APPNAMELC}_impl.cpp -Archive=noatunui.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/plugin.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE10] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE11] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE12] -Type=install -Source=%{src}/plugin_app.cpp -Dest=%{dest}/src/plugin_%{APPNAMELC}.cpp - -[FILE13] -Type=install -Source=%{src}/plugin_impl.cpp -Dest=%{dest}/src/plugin_%{APPNAMELC}_impl.cpp - -[FILE14] -Type=install -Source=%{src}/plugin_impl.h -Dest=%{dest}/src/plugin_%{APPNAMELC}_impl.h - -[FILE15] -Type=install -Source=%{src}/plugin.plugin -Dest=%{dest}/src/%{APPNAMELC}.plugin - -[MSG] -Type=message -Comment=A Noatun UI plugin was created in %{dest} -Comment[ca]=Un connector d'interfície d'usuari per a Noatun ha estat creat en %{dest} -Comment[da]=Et Noatun UI-plugin blev oprettet i %{dest} -Comment[de]=Ein Oberflächen-Modul für Noatun wurde in %{dest} erstellt. -Comment[el]=Ένα πρόσθετο Noatun UI δημιουργήθηκε στο %{dest} -Comment[es]=Un complemento de interfaz de usuario para Noatun ha sido creado en %{dest} -Comment[et]=Noatuni kasutajaliidese plugin loodi asukohta %{dest} -Comment[eu]=Noatun UI plugin bat sortu da hemen: %{dest} -Comment[fa]=یک وصلۀ Noatun UI در %{dest} ایجاد شد -Comment[fr]=Un module externe d'interface utilisateur pour Noatun a été créé dans %{dest} -Comment[ga]=Cruthaíodh breiseán chomhéadan Noatun i %{dest} -Comment[gl]=Creouse unha extensión para a IU de Noatun en %{dest} -Comment[hu]=Létrejött egy Noatun UI-modul itt: %{dest} -Comment[it]=È stato creato un plugin UI per noatun in %{dest} -Comment[ja]=Noatun UI プラグインを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Noatun-Böversietmoduul opstellt -Comment[ne]=नोअटन UI प्लगइन %{dest} मा सिर्जना गरियो -Comment[nl]=Een Noatun UI-plugin is aangemaakt in %{dest} -Comment[pl]=Wtyczka do interfejsu Noatun została utworzona w %{dest} -Comment[pt]=Foi criado um 'plugin' da UI do Noatun em %{dest} -Comment[pt_BR]=Foi criado um 'plugin' da UI do Noatun em %{dest} -Comment[ru]=Модуль интерфейса для Noatun создан в %{dest} -Comment[sk]=Noatun UI modul bol vytvorený v %{dest} -Comment[sr]=UI прикључак за Noatun направљен је у %{dest} -Comment[sr@Latn]=UI priključak za Noatun napravljen je u %{dest} -Comment[sv]=Ett Noatun-insticksprogram för användargränssnitt skapades i %{dest} -Comment[tr]=Bir Noatun Arayüz eklentisi %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个 Noatun 界面插件 -Comment[zh_TW]=一個 Noatun 使用者介面外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/noatunui/plugin.tdevelop b/languages/cpp/app_templates/noatunui/plugin.tdevelop index bc17550d..66986f2a 100644 --- a/languages/cpp/app_templates/noatunui/plugin.tdevelop +++ b/languages/cpp/app_templates/noatunui/plugin.tdevelop @@ -13,16 +13,16 @@ TDE - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + src/noatun_%{APPNAMELC}plugin.la debug @@ -44,8 +44,8 @@ -O0 -g3 - - + + @@ -53,8 +53,8 @@ - - + + bash bash_bugs @@ -88,24 +88,24 @@ qmake User Guide - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/noatunvisual/CMakeLists.txt b/languages/cpp/app_templates/noatunvisual/CMakeLists.txt index adac7be4..8b5668ec 100644 --- a/languages/cpp/app_templates/noatunvisual/CMakeLists.txt +++ b/languages/cpp/app_templates/noatunvisual/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( noatunvisual.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/noatunvisual.tar.gz noatunvisual.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - noatunvisual.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + noatunvisual.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/noatunvisual/Makefile.am b/languages/cpp/app_templates/noatunvisual/Makefile.am index e32b274e..d7466e24 100644 --- a/languages/cpp/app_templates/noatunvisual/Makefile.am +++ b/languages/cpp/app_templates/noatunvisual/Makefile.am @@ -4,10 +4,10 @@ dataFiles = src-Makefile.am plugin_app.cpp plugin_app.h plugin_impl.cpp \ templateName = noatunvisual ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/noatunvisual/noatunvisual.kdevtemplate b/languages/cpp/app_templates/noatunvisual/noatunvisual.kdevtemplate new file mode 100644 index 00000000..c747925c --- /dev/null +++ b/languages/cpp/app_templates/noatunvisual/noatunvisual.kdevtemplate @@ -0,0 +1,205 @@ +# TDE Config File +[General] +Name=Noatun visualization plugin +Name[ca]=Connector de visualització per a Noatun +Name[da]=Noatun visualiserings-plugin +Name[de]=Noatun-Visualisierungs-Modul +Name[el]=Οπτικό πρόσθετο Noatun +Name[en_GB]=Noatun visualisation plugin +Name[es]=Complemento de visualización para Noatun +Name[et]=Noatuni visualiseerimisplugin +Name[eu]=Noatun bistaratze-plugina +Name[fa]=وصلۀ تجسم Noatun +Name[fr]=Module externe de visualisation pour Noatun +Name[ga]=Breiseán amharcléirithe Noatun +Name[gl]=Extensión de visualización para Noatun +Name[hu]=Noatun vizualizációs modul +Name[it]=Plugin di visualizzazione per noatun +Name[ja]=Noatun ビジュアライゼーションプラグイン +Name[nds]=Noatun-Filmmakermoduul +Name[ne]=नोअटन भिजुलाइजेसन प्लगइन +Name[nl]=Noatun visualisatieplugin +Name[pl]=Wtyczka wizualizacji do Noatun +Name[pt]='Plugin' de visualização do Noatun +Name[pt_BR]='Plugin' de visualização do Noatun +Name[ru]=Модуль визуализации Noatun +Name[sk]=Noatun vizualizačný modul +Name[sr]=Визуелизациони прикључак за Noatun +Name[sr@Latn]=Vizuelizacioni priključak za Noatun +Name[sv]=Noatun-insticksprogram för visningar +Name[tr]=Noatun görsellik eklentisi +Name[zh_CN]=Noatun 可视化插件 +Name[zh_TW]=Noatun 視覺化外掛程式 +Icon=noatunvisual.png +Category=C++/TDE +Comment=Generates a visualization plugin for noatun using SDL +Comment[ca]=Genera un connector de visualització per a Noatun usant SDL +Comment[da]=Generere et visualiserings-plugin for noatun ved brug af SDL +Comment[de]=Erstellt ein Visualisierungs-Modul für Noatun unter Verwendung der SDL. +Comment[el]=Δημιουργεί ένα οπτικό πρόσθετο για το noatun χρησιμοποιώντας το SDL +Comment[en_GB]=Generates a visualisation plugin for noatun using SDL +Comment[es]=Genera un complemento de visualización para Noatun que usa SDL +Comment[et]=Noatuni visualiseerimisplugina loomine SDL-i abil +Comment[eu]=SDL erabiliz, bistaratze-plugin bat sortzen du noatun-entzat +Comment[fa]=یک وصلۀ تجسم برای noatun با استفاده از SDL تولید می‌کند +Comment[fr]=Génère un module externe de visualisation pour Noatun utilisant SDL +Comment[ga]=Cruthaíonn sé seo breiseán amharcléirithe noatun le SDL +Comment[gl]=Xera unha extensión de visualización para noatun usando SDL +Comment[hu]=Létrehoz egy vizualizációs modult a Noatunhoz, SDL-ben +Comment[it]=Genera un plugin di visualizzazione per noatun usando SDL +Comment[nds]=Stellt mit SDL en Filmmakermoduul för Noatun op +Comment[ne]=SDL प्रयोग गरेर नोअटनका लागि भिजुलाइजेसन प्लगइन उत्पन्न गर्दछ +Comment[nl]=Genereert een visualisatieplugin voor Noatun met behulp van SDL +Comment[pl]=Generuje wtyczkę wizualizacji do Noatun. Używany jest SDL. +Comment[pt]=Gera um 'plugin' de visualização para o Noatun, que usa o SDL +Comment[pt_BR]=Gera um 'plugin' de visualização para o Noatun, que usa o SDL +Comment[ru]=Создание модуля визуализации для Noatun на основе SDL +Comment[sk]=Vygeneruje vizualizačný modul pre Noatun s použitím SDL +Comment[sr]=Прави визуелизациони прикључак за Noatun користећи SDL +Comment[sr@Latn]=Pravi vizuelizacioni priključak za Noatun koristeći SDL +Comment[sv]=Skapar ett Noatun-insticksprogram för visningar som använder SDL +Comment[tr]=SDL kullanarak noatun için bir görsellik eklentisi yaratır. +Comment[zh_CN]=使用 SDL 生成 noatun 的可视化插件 +Comment[zh_TW]=產生一個使用 SDL 的 Noatun 視覺化外掛程式 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/plugin_%{APPNAMELC}_impl.cpp +Archive=noatunvisual.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +Source=%{src}/plugin.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE7] +Type=install +Source=%{src}/noatunvisual-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE10] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE11] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE12] +Type=install +Source=%{src}/plugin_app.cpp +Dest=%{dest}/src/plugin_%{APPNAMELC}.cpp + +[FILE13] +Type=install +Source=%{src}/plugin_app.h +Dest=%{dest}/src/plugin_%{APPNAMELC}.h + +[FILE14] +Type=install +Source=%{src}/plugin_impl.cpp +Dest=%{dest}/src/plugin_%{APPNAMELC}_impl.cpp + +[FILE15] +Type=install +Source=%{src}/plugin_impl.h +Dest=%{dest}/src/plugin_%{APPNAMELC}_impl.h + +[FILE16] +Type=install +Source=%{src}/plugin.plugin +Dest=%{dest}/src/%{APPNAMELC}.plugin + +[MSG] +Type=message +Comment=A Noatun visualization plugin was created in %{dest} +Comment[ca]=Un connector de visualització per a Noatun ha estat creat en %{dest} +Comment[da]=Et Noatun visualiserings-plugin blev oprettet i %{dest} +Comment[de]=Ein Visualisierungs-Modul für Noatun wurde in %{dest} erstellt. +Comment[el]=Ένα οπτικό πρόσθετο Noatun δημιουργήθηκε στο %{dest} +Comment[en_GB]=A Noatun visualisation plugin was created in %{dest} +Comment[es]=Un complemento de visualización para Noatun ha sido creado en %{dest} +Comment[et]=Noatuni visualiseerimisplugin loodi asukohta %{dest} +Comment[eu]=Noatun-en bistaratze-plugin bat sortu da hemen: %{dest} +Comment[fa]=یک وصلۀ تجسم Noatun در %{dest} ایجاد شد +Comment[fr]=Un module externe de visualisation pour Noatun a été créé dans %{dest} +Comment[ga]=Cruthaíodh breiseán amharcléirithe Noatun i %{dest} +Comment[gl]=Creouse unha extensión de visualización para Noatun en %{dest} +Comment[hu]=Létrejött egy Noatun vizualizációs modul itt: %{dest} +Comment[it]=È stato creato un plugin di visualizzazione per noatun in %{dest} +Comment[ja]=Noatun ビジュアライゼーションプラグインを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Noatun-Filmmakermoduul opstellt +Comment[ne]=नोअटन भिजुलाइजेसन प्लगइन %{dest} मा सिर्जना गरियो +Comment[nl]=Een Noatun-visualisatieplugin is aangemaakt in %{dest} +Comment[pl]=Wtyczka wizualizacji została utworzona w %{dest} +Comment[pt]=Foi criado um 'plugin' de visualização do Noatun em %{dest} +Comment[pt_BR]=Foi criado um 'plugin' de visualização do Noatun em %{dest} +Comment[ru]=Модуль визуализации Noatun создан в %{dest} +Comment[sk]=Noatun vizualizačný modul bol vytvorený v %{dest} +Comment[sr]=Визуелизациони прикључак за Noatun направљен је у %{dest} +Comment[sr@Latn]=Vizuelizacioni priključak za Noatun napravljen je u %{dest} +Comment[sv]=Ett Noatun-insticksprogram för visningar skapades i %{dest} +Comment[tr]=Bir Noatun görsellik eklentisi %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了 Noatun 可视化插件 +Comment[zh_TW]=一個 Noatun 視覺化外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/noatunvisual/noatunvisual.tdevtemplate b/languages/cpp/app_templates/noatunvisual/noatunvisual.tdevtemplate deleted file mode 100644 index 0a91ba64..00000000 --- a/languages/cpp/app_templates/noatunvisual/noatunvisual.tdevtemplate +++ /dev/null @@ -1,205 +0,0 @@ -# TDE Config File -[General] -Name=Noatun visualization plugin -Name[ca]=Connector de visualització per a Noatun -Name[da]=Noatun visualiserings-plugin -Name[de]=Noatun-Visualisierungs-Modul -Name[el]=Οπτικό πρόσθετο Noatun -Name[en_GB]=Noatun visualisation plugin -Name[es]=Complemento de visualización para Noatun -Name[et]=Noatuni visualiseerimisplugin -Name[eu]=Noatun bistaratze-plugina -Name[fa]=وصلۀ تجسم Noatun -Name[fr]=Module externe de visualisation pour Noatun -Name[ga]=Breiseán amharcléirithe Noatun -Name[gl]=Extensión de visualización para Noatun -Name[hu]=Noatun vizualizációs modul -Name[it]=Plugin di visualizzazione per noatun -Name[ja]=Noatun ビジュアライゼーションプラグイン -Name[nds]=Noatun-Filmmakermoduul -Name[ne]=नोअटन भिजुलाइजेसन प्लगइन -Name[nl]=Noatun visualisatieplugin -Name[pl]=Wtyczka wizualizacji do Noatun -Name[pt]='Plugin' de visualização do Noatun -Name[pt_BR]='Plugin' de visualização do Noatun -Name[ru]=Модуль визуализации Noatun -Name[sk]=Noatun vizualizačný modul -Name[sr]=Визуелизациони прикључак за Noatun -Name[sr@Latn]=Vizuelizacioni priključak za Noatun -Name[sv]=Noatun-insticksprogram för visningar -Name[tr]=Noatun görsellik eklentisi -Name[zh_CN]=Noatun 可视化插件 -Name[zh_TW]=Noatun 視覺化外掛程式 -Icon=noatunvisual.png -Category=C++/TDE -Comment=Generates a visualization plugin for noatun using SDL -Comment[ca]=Genera un connector de visualització per a Noatun usant SDL -Comment[da]=Generere et visualiserings-plugin for noatun ved brug af SDL -Comment[de]=Erstellt ein Visualisierungs-Modul für Noatun unter Verwendung der SDL. -Comment[el]=Δημιουργεί ένα οπτικό πρόσθετο για το noatun χρησιμοποιώντας το SDL -Comment[en_GB]=Generates a visualisation plugin for noatun using SDL -Comment[es]=Genera un complemento de visualización para Noatun que usa SDL -Comment[et]=Noatuni visualiseerimisplugina loomine SDL-i abil -Comment[eu]=SDL erabiliz, bistaratze-plugin bat sortzen du noatun-entzat -Comment[fa]=یک وصلۀ تجسم برای noatun با استفاده از SDL تولید می‌کند -Comment[fr]=Génère un module externe de visualisation pour Noatun utilisant SDL -Comment[ga]=Cruthaíonn sé seo breiseán amharcléirithe noatun le SDL -Comment[gl]=Xera unha extensión de visualización para noatun usando SDL -Comment[hu]=Létrehoz egy vizualizációs modult a Noatunhoz, SDL-ben -Comment[it]=Genera un plugin di visualizzazione per noatun usando SDL -Comment[nds]=Stellt mit SDL en Filmmakermoduul för Noatun op -Comment[ne]=SDL प्रयोग गरेर नोअटनका लागि भिजुलाइजेसन प्लगइन उत्पन्न गर्दछ -Comment[nl]=Genereert een visualisatieplugin voor Noatun met behulp van SDL -Comment[pl]=Generuje wtyczkę wizualizacji do Noatun. Używany jest SDL. -Comment[pt]=Gera um 'plugin' de visualização para o Noatun, que usa o SDL -Comment[pt_BR]=Gera um 'plugin' de visualização para o Noatun, que usa o SDL -Comment[ru]=Создание модуля визуализации для Noatun на основе SDL -Comment[sk]=Vygeneruje vizualizačný modul pre Noatun s použitím SDL -Comment[sr]=Прави визуелизациони прикључак за Noatun користећи SDL -Comment[sr@Latn]=Pravi vizuelizacioni priključak za Noatun koristeći SDL -Comment[sv]=Skapar ett Noatun-insticksprogram för visningar som använder SDL -Comment[tr]=SDL kullanarak noatun için bir görsellik eklentisi yaratır. -Comment[zh_CN]=使用 SDL 生成 noatun 的可视化插件 -Comment[zh_TW]=產生一個使用 SDL 的 Noatun 視覺化外掛程式 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/plugin_%{APPNAMELC}_impl.cpp -Archive=noatunvisual.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -Source=%{src}/plugin.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE7] -Type=install -Source=%{src}/noatunvisual-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE10] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE11] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE12] -Type=install -Source=%{src}/plugin_app.cpp -Dest=%{dest}/src/plugin_%{APPNAMELC}.cpp - -[FILE13] -Type=install -Source=%{src}/plugin_app.h -Dest=%{dest}/src/plugin_%{APPNAMELC}.h - -[FILE14] -Type=install -Source=%{src}/plugin_impl.cpp -Dest=%{dest}/src/plugin_%{APPNAMELC}_impl.cpp - -[FILE15] -Type=install -Source=%{src}/plugin_impl.h -Dest=%{dest}/src/plugin_%{APPNAMELC}_impl.h - -[FILE16] -Type=install -Source=%{src}/plugin.plugin -Dest=%{dest}/src/%{APPNAMELC}.plugin - -[MSG] -Type=message -Comment=A Noatun visualization plugin was created in %{dest} -Comment[ca]=Un connector de visualització per a Noatun ha estat creat en %{dest} -Comment[da]=Et Noatun visualiserings-plugin blev oprettet i %{dest} -Comment[de]=Ein Visualisierungs-Modul für Noatun wurde in %{dest} erstellt. -Comment[el]=Ένα οπτικό πρόσθετο Noatun δημιουργήθηκε στο %{dest} -Comment[en_GB]=A Noatun visualisation plugin was created in %{dest} -Comment[es]=Un complemento de visualización para Noatun ha sido creado en %{dest} -Comment[et]=Noatuni visualiseerimisplugin loodi asukohta %{dest} -Comment[eu]=Noatun-en bistaratze-plugin bat sortu da hemen: %{dest} -Comment[fa]=یک وصلۀ تجسم Noatun در %{dest} ایجاد شد -Comment[fr]=Un module externe de visualisation pour Noatun a été créé dans %{dest} -Comment[ga]=Cruthaíodh breiseán amharcléirithe Noatun i %{dest} -Comment[gl]=Creouse unha extensión de visualización para Noatun en %{dest} -Comment[hu]=Létrejött egy Noatun vizualizációs modul itt: %{dest} -Comment[it]=È stato creato un plugin di visualizzazione per noatun in %{dest} -Comment[ja]=Noatun ビジュアライゼーションプラグインを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Noatun-Filmmakermoduul opstellt -Comment[ne]=नोअटन भिजुलाइजेसन प्लगइन %{dest} मा सिर्जना गरियो -Comment[nl]=Een Noatun-visualisatieplugin is aangemaakt in %{dest} -Comment[pl]=Wtyczka wizualizacji została utworzona w %{dest} -Comment[pt]=Foi criado um 'plugin' de visualização do Noatun em %{dest} -Comment[pt_BR]=Foi criado um 'plugin' de visualização do Noatun em %{dest} -Comment[ru]=Модуль визуализации Noatun создан в %{dest} -Comment[sk]=Noatun vizualizačný modul bol vytvorený v %{dest} -Comment[sr]=Визуелизациони прикључак за Noatun направљен је у %{dest} -Comment[sr@Latn]=Vizuelizacioni priključak za Noatun napravljen je u %{dest} -Comment[sv]=Ett Noatun-insticksprogram för visningar skapades i %{dest} -Comment[tr]=Bir Noatun görsellik eklentisi %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了 Noatun 可视化插件 -Comment[zh_TW]=一個 Noatun 視覺化外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/noatunvisual/plugin.tdevelop b/languages/cpp/app_templates/noatunvisual/plugin.tdevelop index 6833abad..78193361 100644 --- a/languages/cpp/app_templates/noatunvisual/plugin.tdevelop +++ b/languages/cpp/app_templates/noatunvisual/plugin.tdevelop @@ -13,16 +13,16 @@ TDE - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + src/noatun_%{APPNAMELC}plugin.la debug @@ -49,8 +49,8 @@ -lSDL - - + + @@ -58,8 +58,8 @@ - - + + bash bash_bugs @@ -95,24 +95,24 @@ qmake User Guide - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/opieapp/CMakeLists.txt b/languages/cpp/app_templates/opieapp/CMakeLists.txt index 45dc1b61..4f2b2824 100644 --- a/languages/cpp/app_templates/opieapp/CMakeLists.txt +++ b/languages/cpp/app_templates/opieapp/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( opieapp.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/opieapp.tar.gz opieapp.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - opieapp.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + opieapp.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/opieapp/Makefile.am b/languages/cpp/app_templates/opieapp/Makefile.am index 854f4c54..10a1f2a1 100644 --- a/languages/cpp/app_templates/opieapp/Makefile.am +++ b/languages/cpp/app_templates/opieapp/Makefile.am @@ -4,10 +4,10 @@ dataFiles = Example.png app.tdevelop example.desktop Makefile.am \ templateName = opieapp ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/opieapp/app.tdevelop b/languages/cpp/app_templates/opieapp/app.tdevelop index 94c86a45..9bdb127e 100644 --- a/languages/cpp/app_templates/opieapp/app.tdevelop +++ b/languages/cpp/app_templates/opieapp/app.tdevelop @@ -13,7 +13,7 @@ - + @@ -24,8 +24,8 @@ false *.o,*.lo,CVS - - + + gtk gnustep @@ -52,8 +52,8 @@ libbonobo libbonoboui - - + + -qws @@ -66,8 +66,8 @@ false true - - + + true @@ -93,15 +93,15 @@ -qws - - + + - + @@ -120,11 +120,11 @@ true - + true 2 - - + + -f -dP @@ -133,11 +133,11 @@ -u3 -p - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/opieapp/opieapp.tdevtemplate b/languages/cpp/app_templates/opieapp/opieapp.kdevtemplate similarity index 100% rename from languages/cpp/app_templates/opieapp/opieapp.tdevtemplate rename to languages/cpp/app_templates/opieapp/opieapp.kdevtemplate diff --git a/languages/cpp/app_templates/opieapplet/CMakeLists.txt b/languages/cpp/app_templates/opieapplet/CMakeLists.txt index 6c8edbbe..e4dc42f0 100644 --- a/languages/cpp/app_templates/opieapplet/CMakeLists.txt +++ b/languages/cpp/app_templates/opieapplet/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( opieapplet.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/opieapplet.tar.gz opieapplet.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - opieapplet.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + opieapplet.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/opieapplet/Makefile.am b/languages/cpp/app_templates/opieapplet/Makefile.am index 845411c7..6bbb09ac 100644 --- a/languages/cpp/app_templates/opieapplet/Makefile.am +++ b/languages/cpp/app_templates/opieapplet/Makefile.am @@ -4,10 +4,10 @@ dataFiles = Makefile.am Example.png app.tdevelop app.pro \ templateName = opieapplet ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/opieapplet/app.tdevelop b/languages/cpp/app_templates/opieapplet/app.tdevelop index da3b91d4..c5544656 100644 --- a/languages/cpp/app_templates/opieapplet/app.tdevelop +++ b/languages/cpp/app_templates/opieapplet/app.tdevelop @@ -13,7 +13,7 @@ - + @@ -24,8 +24,8 @@ false *.o,*.lo,CVS - - + + gtk gnustep @@ -52,8 +52,8 @@ libbonobo libbonoboui - - + + -qws @@ -66,8 +66,8 @@ false true - - + + true @@ -108,15 +108,15 @@ fi -qws - - + + - + @@ -135,11 +135,11 @@ fi true - + true 2 - - + + -f -dP @@ -148,11 +148,11 @@ fi -u3 -p - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/opieapplet/opieapplet.tdevtemplate b/languages/cpp/app_templates/opieapplet/opieapplet.kdevtemplate similarity index 100% rename from languages/cpp/app_templates/opieapplet/opieapplet.tdevtemplate rename to languages/cpp/app_templates/opieapplet/opieapplet.kdevtemplate diff --git a/languages/cpp/app_templates/opieinput/CMakeLists.txt b/languages/cpp/app_templates/opieinput/CMakeLists.txt index 5246ccdb..f7bba492 100644 --- a/languages/cpp/app_templates/opieinput/CMakeLists.txt +++ b/languages/cpp/app_templates/opieinput/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( opieinput.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/opieinput.tar.gz opieinput.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - opieinput.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + opieinput.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/opieinput/Makefile.am b/languages/cpp/app_templates/opieinput/Makefile.am index fee564a7..9a3e5ffd 100644 --- a/languages/cpp/app_templates/opieinput/Makefile.am +++ b/languages/cpp/app_templates/opieinput/Makefile.am @@ -3,10 +3,10 @@ dataFiles = Makefile.am Example.png app.tdevelop app.pro \ templateName = opieinput ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/opieinput/app.tdevelop b/languages/cpp/app_templates/opieinput/app.tdevelop index 9a81ebba..cc61122f 100644 --- a/languages/cpp/app_templates/opieinput/app.tdevelop +++ b/languages/cpp/app_templates/opieinput/app.tdevelop @@ -13,7 +13,7 @@ - + @@ -24,8 +24,8 @@ false *.o,*.lo,CVS - - + + gtk gnustep @@ -52,8 +52,8 @@ libbonobo libbonoboui - - + + -qws @@ -66,8 +66,8 @@ false true - - + + false @@ -109,15 +109,15 @@ fi -qws - - + + - + @@ -136,11 +136,11 @@ fi true - + true 2 - - + + -f -dP @@ -149,11 +149,11 @@ fi -u3 -p - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/opieinput/opieinput.tdevtemplate b/languages/cpp/app_templates/opieinput/opieinput.kdevtemplate similarity index 100% rename from languages/cpp/app_templates/opieinput/opieinput.tdevtemplate rename to languages/cpp/app_templates/opieinput/opieinput.kdevtemplate diff --git a/languages/cpp/app_templates/opiemenu/CMakeLists.txt b/languages/cpp/app_templates/opiemenu/CMakeLists.txt index 12eedcdc..c321604c 100644 --- a/languages/cpp/app_templates/opiemenu/CMakeLists.txt +++ b/languages/cpp/app_templates/opiemenu/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( opiemenu.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/opiemenu.tar.gz opiemenu.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - opiemenu.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + opiemenu.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/opiemenu/Makefile.am b/languages/cpp/app_templates/opiemenu/Makefile.am index 91d1c2ba..343a2bfa 100644 --- a/languages/cpp/app_templates/opiemenu/Makefile.am +++ b/languages/cpp/app_templates/opiemenu/Makefile.am @@ -4,10 +4,10 @@ dataFiles = Makefile.am Example.png app.tdevelop app.pro \ templateName = opiemenu ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/opiemenu/app.tdevelop b/languages/cpp/app_templates/opiemenu/app.tdevelop index da3b91d4..c5544656 100644 --- a/languages/cpp/app_templates/opiemenu/app.tdevelop +++ b/languages/cpp/app_templates/opiemenu/app.tdevelop @@ -13,7 +13,7 @@ - + @@ -24,8 +24,8 @@ false *.o,*.lo,CVS - - + + gtk gnustep @@ -52,8 +52,8 @@ libbonobo libbonoboui - - + + -qws @@ -66,8 +66,8 @@ false true - - + + true @@ -108,15 +108,15 @@ fi -qws - - + + - + @@ -135,11 +135,11 @@ fi true - + true 2 - - + + -f -dP @@ -148,11 +148,11 @@ fi -u3 -p - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/opiemenu/opiemenu.tdevtemplate b/languages/cpp/app_templates/opiemenu/opiemenu.kdevtemplate similarity index 100% rename from languages/cpp/app_templates/opiemenu/opiemenu.tdevtemplate rename to languages/cpp/app_templates/opiemenu/opiemenu.kdevtemplate diff --git a/languages/cpp/app_templates/opienet/CMakeLists.txt b/languages/cpp/app_templates/opienet/CMakeLists.txt index 19c969d3..a08e71be 100644 --- a/languages/cpp/app_templates/opienet/CMakeLists.txt +++ b/languages/cpp/app_templates/opienet/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( opienet.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/opienet.tar.gz opienet.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - opienet.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + opienet.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/opienet/Makefile.am b/languages/cpp/app_templates/opienet/Makefile.am index d23c835b..5245c17e 100644 --- a/languages/cpp/app_templates/opienet/Makefile.am +++ b/languages/cpp/app_templates/opienet/Makefile.am @@ -5,10 +5,10 @@ dataFiles = Makefile.am Example.png app.tdevelop app.pro \ templateName = opienet ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/opienet/app.tdevelop b/languages/cpp/app_templates/opienet/app.tdevelop index 1292af0e..7717a098 100644 --- a/languages/cpp/app_templates/opienet/app.tdevelop +++ b/languages/cpp/app_templates/opienet/app.tdevelop @@ -13,7 +13,7 @@ - + @@ -24,8 +24,8 @@ false *.o,*.lo,CVS - - + + gtk gnustep @@ -52,8 +52,8 @@ libbonobo libbonoboui - - + + -qws @@ -66,8 +66,8 @@ false true - - + + false @@ -93,15 +93,15 @@ -qws - - + + - + @@ -120,11 +120,11 @@ true - + true 2 - - + + -f -dP @@ -133,11 +133,11 @@ -u3 -p - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/opienet/opienet.tdevtemplate b/languages/cpp/app_templates/opienet/opienet.kdevtemplate similarity index 100% rename from languages/cpp/app_templates/opienet/opienet.tdevtemplate rename to languages/cpp/app_templates/opienet/opienet.kdevtemplate diff --git a/languages/cpp/app_templates/opietoday/CMakeLists.txt b/languages/cpp/app_templates/opietoday/CMakeLists.txt index 2f9e0dd1..6c7c4d66 100644 --- a/languages/cpp/app_templates/opietoday/CMakeLists.txt +++ b/languages/cpp/app_templates/opietoday/CMakeLists.txt @@ -20,9 +20,9 @@ add_custom_target( opietoday.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/opietoday.tar.gz opietoday.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - opietoday.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + opietoday.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/opietoday/Makefile.am b/languages/cpp/app_templates/opietoday/Makefile.am index 8c9ec514..6c999369 100644 --- a/languages/cpp/app_templates/opietoday/Makefile.am +++ b/languages/cpp/app_templates/opietoday/Makefile.am @@ -5,10 +5,10 @@ dataFiles = Makefile.am Example.png app.tdevelop app.pro exampleplugin.cpp \ templateName = opietoday ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/opietoday/app.tdevelop b/languages/cpp/app_templates/opietoday/app.tdevelop index 043326d3..c387911b 100644 --- a/languages/cpp/app_templates/opietoday/app.tdevelop +++ b/languages/cpp/app_templates/opietoday/app.tdevelop @@ -13,7 +13,7 @@ - + @@ -24,8 +24,8 @@ false *.o,*.lo,CVS - - + + gtk gnustep @@ -52,8 +52,8 @@ libbonobo libbonoboui - - + + -qws @@ -66,8 +66,8 @@ false true - - + + false @@ -93,15 +93,15 @@ -qws - - + + - + @@ -120,11 +120,11 @@ true - + true 2 - - + + -f -dP @@ -133,11 +133,11 @@ -u3 -p - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/opietoday/opietoday.tdevtemplate b/languages/cpp/app_templates/opietoday/opietoday.kdevtemplate similarity index 100% rename from languages/cpp/app_templates/opietoday/opietoday.tdevtemplate rename to languages/cpp/app_templates/opietoday/opietoday.kdevtemplate diff --git a/languages/cpp/app_templates/prc-tool/Makefile.am b/languages/cpp/app_templates/prc-tool/Makefile.am index ee4e2182..06f097a4 100644 --- a/languages/cpp/app_templates/prc-tool/Makefile.am +++ b/languages/cpp/app_templates/prc-tool/Makefile.am @@ -3,10 +3,10 @@ dataFiles = prc-tool.png src-Makefile prc-tool.tdevelop callback.h \ templateName = prc-tool ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/prc-tool/prc-tool.kdevtemplate b/languages/cpp/app_templates/prc-tool/prc-tool.kdevtemplate new file mode 100644 index 00000000..8cfea15f --- /dev/null +++ b/languages/cpp/app_templates/prc-tool/prc-tool.kdevtemplate @@ -0,0 +1,136 @@ +# TDE Config File +[General] +Name=Hello world program +Name[ca]=Programa Hello world +Name[da]=Goddag verden program +Name[de]="Hello World"-Programm +Name[el]=Πρόγραμμα Γεια σου Κόσμε +Name[es]=Programa «Hola mundo» +Name[et]="Tere,maailm" programm +Name[eu]="Kaixo mundua" programa +Name[fa]=برنامۀ Hello world +Name[fr]=Programme « Bonjour monde » +Name[ga]=Ríomhchlár "Hello world" +Name[gl]=Programa Ola mundo +Name[it]=Programma di "Hello world" +Name[ja]=Hello world プログラム +Name[nds]="Moin Welt"-Programm +Name[ne]=हेल्डो वोल्ड कार्यक्रम +Name[nl]=Hello World-programma +Name[pl]=Program 'Witaj świecie' +Name[pt]=Programa 'Olá mundo' +Name[pt_BR]=Programa 'Olá mundo' +Name[ru]=Программа Hello world +Name[sk]=Ahoj svet program +Name[sl]=Program Hello world +Name[sr]=Програм „Здраво свете“ +Name[sr@Latn]=Program „Zdravo svete“ +Name[sv]=Hello world-program +Name[tr]=Merhaba Dünya Programı +Name[zh_CN]=Hello world 程序 +Name[zh_TW]=Hello world 程式 +Icon= # got none +Category=C/PalmOS +Comment=Generates a template for palm application +Comment[ca]=Genera una plantilla d'aplicació per a Palm +Comment[da]=Genererer en skabelon for et palm-program +Comment[de]=Erstellt das Gerüst für eine Palm-Anwendung +Comment[el]=Δημιουργία ενός προτύπου εφαρμογής για palm +Comment[es]=Genera una plantilla para una aplicación Palm +Comment[et]=Palmi rakenduse malli loomine. +Comment[eu]=Palm aplikazio baten txantiloi bat sortzen du +Comment[fa]=قالبی برای کاربرد palm تولید می‌کند +Comment[fr]=Génère un modèle pour une application Palm +Comment[gl]=Xera un modelo para aplicación palm +Comment[hu]=Létrehoz egy Palm-os alkalmazássablont +Comment[it]=Genera un modello per un'applicazione palm +Comment[ja]=Palm アプリケーションのためのテンプレートを作成します +Comment[nds]=Stellt dat Rahmenwark för en Palm-Programm op +Comment[ne]=पाम अनुप्रयोगका लागि टेम्प्लेट उत्पन्न गर्दछ +Comment[nl]=Genereert een sjabloon voor een Palm-toepassing +Comment[pl]=Generuje szablon programu dla Palma +Comment[pt]=Gera um modelo para aplicações do Palm +Comment[pt_BR]=Gera um modelo para aplicações do Palm +Comment[ru]=Создание простого приложения Palm +Comment[sk]=Vygeneruje šablónu pre Palm aplikáciu +Comment[sr]=Прави шаблон за palm програм +Comment[sr@Latn]=Pravi šablon za palm program +Comment[sv]=Skapar en mall för ett Palm-program +Comment[tr]=Bir avuçiçi uygulaması için bir şablon yaratır +Comment[zh_CN]=生成一个 Palm 应用程序的模板 +Comment[zh_TW]=產生一個 palm 應用程式樣本 +FileTemplates=h,CStyle,c,CStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAME}.c +Archive=prc-tool.tar.gz + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/prc-tool.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE2] +Type=install +Source=%{src}/src-Makefile +Dest=%{dest}/Makefile + +[FILE3] +Type=install +Source=%{src}/palmhello.c +Dest=%{dest}/%{APPNAME}.c + +[FILE4] +Type=install +Source=%{src}/palmhello.pbitm +Dest=%{dest}/%{APPNAME}.pbitm + +[FILE5] +Type=install +Source=%{src}/palmhello.rcp +Dest=%{dest}/%{APPNAME}.rcp + +[FILE6] +Type=install +Source=%{src}/palmhelloRsc.h +Dest=%{dest}/%{APPNAME}Rsc.h + +[FILE7] +Type=install +Source=%{src}/callback.h +Dest=%{dest}/callback.h + +[MSG] +Type=message +Comment=A palm application was created in %{dest} +Comment[ca]=Una aplicació per a Palm ha estat creada en %{dest} +Comment[da]=Et palm-program blev oprettet i %{dest} +Comment[de]=Eine Palm-Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή palm δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación Palm ha sido creada en %{dest} +Comment[et]=Palmi rakendus loodi asukohta %{dest} +Comment[eu]=Palm aplikazio bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد palm در %{dest} ایجاد شد +Comment[fr]=Une application Palm a été créée dans %{dest} +Comment[ga]=Cruthaíodh feidhmchlár Palm i %{dest} +Comment[gl]=Creouse unha aplicación palm en %{dest} +Comment[hu]=Létrejött egy Palmos alkalmazássablon itt: %{dest} +Comment[it]=È stata creata un'applicazione palm in %{dest} +Comment[ja]=Palm アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Palm-Programm opstellt +Comment[ne]=पाम अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een Palm-toepassing is aangemaakt in %{dest} +Comment[pl]=Program dla Palma został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação do Palm em %{dest} +Comment[pt_BR]=Foi criada uma aplicação do Palm em %{dest} +Comment[ru]=Приложение Palm создано в %{dest} +Comment[sk]=Palm aplikácia bola vytvorená v %{dest} +Comment[sr]=Palm програм је направљен у %{dest} +Comment[sr@Latn]=Palm program je napravljen u %{dest} +Comment[sv]=Ett Palm-program skapades i %{dest} +Comment[tr]=Bir avuçiçi uygulaması %{dest} içinde yaratıldı +Comment[zh_CN]=在 %{dest} 中创建了一个 Palme 应用程序 +Comment[zh_TW]=一個 palm 應用程式樣本已建立於 %{dest} diff --git a/languages/cpp/app_templates/prc-tool/prc-tool.tdevelop b/languages/cpp/app_templates/prc-tool/prc-tool.tdevelop index cb31f8a1..9015718f 100644 --- a/languages/cpp/app_templates/prc-tool/prc-tool.tdevelop +++ b/languages/cpp/app_templates/prc-tool/prc-tool.tdevelop @@ -4,23 +4,23 @@ %{AUTHOR} %{EMAIL} %{VERSION} - TDevCustomProject + KDevCustomProject C - TDevDebugger + KDevDebugger C PalmOS - + - - + + make test @@ -40,12 +40,12 @@ - + - + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/prc-tool/prc-tool.tdevtemplate b/languages/cpp/app_templates/prc-tool/prc-tool.tdevtemplate deleted file mode 100644 index 23b0013e..00000000 --- a/languages/cpp/app_templates/prc-tool/prc-tool.tdevtemplate +++ /dev/null @@ -1,136 +0,0 @@ -# TDE Config File -[General] -Name=Hello world program -Name[ca]=Programa Hello world -Name[da]=Goddag verden program -Name[de]="Hello World"-Programm -Name[el]=Πρόγραμμα Γεια σου Κόσμε -Name[es]=Programa «Hola mundo» -Name[et]="Tere,maailm" programm -Name[eu]="Kaixo mundua" programa -Name[fa]=برنامۀ Hello world -Name[fr]=Programme « Bonjour monde » -Name[ga]=Ríomhchlár "Hello world" -Name[gl]=Programa Ola mundo -Name[it]=Programma di "Hello world" -Name[ja]=Hello world プログラム -Name[nds]="Moin Welt"-Programm -Name[ne]=हेल्डो वोल्ड कार्यक्रम -Name[nl]=Hello World-programma -Name[pl]=Program 'Witaj świecie' -Name[pt]=Programa 'Olá mundo' -Name[pt_BR]=Programa 'Olá mundo' -Name[ru]=Программа Hello world -Name[sk]=Ahoj svet program -Name[sl]=Program Hello world -Name[sr]=Програм „Здраво свете“ -Name[sr@Latn]=Program „Zdravo svete“ -Name[sv]=Hello world-program -Name[tr]=Merhaba Dünya Programı -Name[zh_CN]=Hello world 程序 -Name[zh_TW]=Hello world 程式 -Icon= # got none -Category=C/PalmOS -Comment=Generates a template for palm application -Comment[ca]=Genera una plantilla d'aplicació per a Palm -Comment[da]=Genererer en skabelon for et palm-program -Comment[de]=Erstellt das Gerüst für eine Palm-Anwendung -Comment[el]=Δημιουργία ενός προτύπου εφαρμογής για palm -Comment[es]=Genera una plantilla para una aplicación Palm -Comment[et]=Palmi rakenduse malli loomine. -Comment[eu]=Palm aplikazio baten txantiloi bat sortzen du -Comment[fa]=قالبی برای کاربرد palm تولید می‌کند -Comment[fr]=Génère un modèle pour une application Palm -Comment[gl]=Xera un modelo para aplicación palm -Comment[hu]=Létrehoz egy Palm-os alkalmazássablont -Comment[it]=Genera un modello per un'applicazione palm -Comment[ja]=Palm アプリケーションのためのテンプレートを作成します -Comment[nds]=Stellt dat Rahmenwark för en Palm-Programm op -Comment[ne]=पाम अनुप्रयोगका लागि टेम्प्लेट उत्पन्न गर्दछ -Comment[nl]=Genereert een sjabloon voor een Palm-toepassing -Comment[pl]=Generuje szablon programu dla Palma -Comment[pt]=Gera um modelo para aplicações do Palm -Comment[pt_BR]=Gera um modelo para aplicações do Palm -Comment[ru]=Создание простого приложения Palm -Comment[sk]=Vygeneruje šablónu pre Palm aplikáciu -Comment[sr]=Прави шаблон за palm програм -Comment[sr@Latn]=Pravi šablon za palm program -Comment[sv]=Skapar en mall för ett Palm-program -Comment[tr]=Bir avuçiçi uygulaması için bir şablon yaratır -Comment[zh_CN]=生成一个 Palm 应用程序的模板 -Comment[zh_TW]=產生一個 palm 應用程式樣本 -FileTemplates=h,CStyle,c,CStyle -ShowFilesAfterGeneration=%{dest}/%{APPNAME}.c -Archive=prc-tool.tar.gz - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/prc-tool.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/src-Makefile -Dest=%{dest}/Makefile - -[FILE3] -Type=install -Source=%{src}/palmhello.c -Dest=%{dest}/%{APPNAME}.c - -[FILE4] -Type=install -Source=%{src}/palmhello.pbitm -Dest=%{dest}/%{APPNAME}.pbitm - -[FILE5] -Type=install -Source=%{src}/palmhello.rcp -Dest=%{dest}/%{APPNAME}.rcp - -[FILE6] -Type=install -Source=%{src}/palmhelloRsc.h -Dest=%{dest}/%{APPNAME}Rsc.h - -[FILE7] -Type=install -Source=%{src}/callback.h -Dest=%{dest}/callback.h - -[MSG] -Type=message -Comment=A palm application was created in %{dest} -Comment[ca]=Una aplicació per a Palm ha estat creada en %{dest} -Comment[da]=Et palm-program blev oprettet i %{dest} -Comment[de]=Eine Palm-Anwendung wurde in %{dest} erstellt. -Comment[el]=Μια εφαρμογή palm δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación Palm ha sido creada en %{dest} -Comment[et]=Palmi rakendus loodi asukohta %{dest} -Comment[eu]=Palm aplikazio bat sortu da hemen: %{dest} -Comment[fa]=یک کاربرد palm در %{dest} ایجاد شد -Comment[fr]=Une application Palm a été créée dans %{dest} -Comment[ga]=Cruthaíodh feidhmchlár Palm i %{dest} -Comment[gl]=Creouse unha aplicación palm en %{dest} -Comment[hu]=Létrejött egy Palmos alkalmazássablon itt: %{dest} -Comment[it]=È stata creata un'applicazione palm in %{dest} -Comment[ja]=Palm アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Palm-Programm opstellt -Comment[ne]=पाम अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een Palm-toepassing is aangemaakt in %{dest} -Comment[pl]=Program dla Palma został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação do Palm em %{dest} -Comment[pt_BR]=Foi criada uma aplicação do Palm em %{dest} -Comment[ru]=Приложение Palm создано в %{dest} -Comment[sk]=Palm aplikácia bola vytvorená v %{dest} -Comment[sr]=Palm програм је направљен у %{dest} -Comment[sr@Latn]=Palm program je napravljen u %{dest} -Comment[sv]=Ett Palm-program skapades i %{dest} -Comment[tr]=Bir avuçiçi uygulaması %{dest} içinde yaratıldı -Comment[zh_CN]=在 %{dest} 中创建了一个 Palme 应用程序 -Comment[zh_TW]=一個 palm 應用程式樣本已建立於 %{dest} diff --git a/languages/cpp/app_templates/qmakeapp/CMakeLists.txt b/languages/cpp/app_templates/qmakeapp/CMakeLists.txt index f23ed602..4af3dc73 100644 --- a/languages/cpp/app_templates/qmakeapp/CMakeLists.txt +++ b/languages/cpp/app_templates/qmakeapp/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( qmakeapp.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/qmakeapp.tar.gz qmakeapp.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - qmakeapp.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + qmakeapp.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/qmakeapp/Makefile.am b/languages/cpp/app_templates/qmakeapp/Makefile.am index 11a39e79..233717d7 100644 --- a/languages/cpp/app_templates/qmakeapp/Makefile.am +++ b/languages/cpp/app_templates/qmakeapp/Makefile.am @@ -4,10 +4,10 @@ dataFiles = main.cpp qmakeapp.cpp qmakeapp.h qmakeapp.png qmakeapp.tdevelop \ templateName = qmakeapp ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/qmakeapp/qmakeapp.tdevtemplate b/languages/cpp/app_templates/qmakeapp/qmakeapp.kdevtemplate similarity index 100% rename from languages/cpp/app_templates/qmakeapp/qmakeapp.tdevtemplate rename to languages/cpp/app_templates/qmakeapp/qmakeapp.kdevtemplate diff --git a/languages/cpp/app_templates/qmakeapp/qmakeapp.tdevelop b/languages/cpp/app_templates/qmakeapp/qmakeapp.tdevelop index 04ec68cb..48a9bd99 100644 --- a/languages/cpp/app_templates/qmakeapp/qmakeapp.tdevelop +++ b/languages/cpp/app_templates/qmakeapp/qmakeapp.tdevelop @@ -10,7 +10,7 @@ Qt - + @@ -21,18 +21,18 @@ false *.o,*.lo,CVS - - + + true 3 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner %{QTDIR} %{QMAKE} - - + + bash bash_bugs @@ -69,8 +69,8 @@ TDE Libraries (Doxygen) - - + + @@ -85,28 +85,28 @@ true - - + + ./bin/%{APPNAMELC} - + - + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/qmakeempty/CMakeLists.txt b/languages/cpp/app_templates/qmakeempty/CMakeLists.txt index f8bba7c6..bc109590 100644 --- a/languages/cpp/app_templates/qmakeempty/CMakeLists.txt +++ b/languages/cpp/app_templates/qmakeempty/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( qmakeempty.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/qmakeempty.tar.gz qmakeempty.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - qmakeempty.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + qmakeempty.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/qmakeempty/Makefile.am b/languages/cpp/app_templates/qmakeempty/Makefile.am index 2eb31a4f..9d62ad0a 100644 --- a/languages/cpp/app_templates/qmakeempty/Makefile.am +++ b/languages/cpp/app_templates/qmakeempty/Makefile.am @@ -4,10 +4,10 @@ dataFiles = qmakeempty.tdevelop \ templateName = qmakeempty ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/qmakeempty/qmakeempty.tdevtemplate b/languages/cpp/app_templates/qmakeempty/qmakeempty.kdevtemplate similarity index 100% rename from languages/cpp/app_templates/qmakeempty/qmakeempty.tdevtemplate rename to languages/cpp/app_templates/qmakeempty/qmakeempty.kdevtemplate diff --git a/languages/cpp/app_templates/qmakeempty/qmakeempty.tdevelop b/languages/cpp/app_templates/qmakeempty/qmakeempty.tdevelop index c35d2fe9..3dc8acbb 100644 --- a/languages/cpp/app_templates/qmakeempty/qmakeempty.tdevelop +++ b/languages/cpp/app_templates/qmakeempty/qmakeempty.tdevelop @@ -10,7 +10,7 @@ Qt - + @@ -21,8 +21,8 @@ false *.o,*.lo,CVS - - + + true 4 @@ -31,8 +31,8 @@ %{QMAKE} %{DESIGNER} - - + + bash bash_bugs @@ -69,8 +69,8 @@ TDE Libraries (Doxygen) - - + + @@ -85,17 +85,17 @@ true - - + + ./bin/%{APPNAMELC} - + - + @@ -103,11 +103,11 @@ - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/qmakesimple/CMakeLists.txt b/languages/cpp/app_templates/qmakesimple/CMakeLists.txt index 71d9301b..64b3b0bd 100644 --- a/languages/cpp/app_templates/qmakesimple/CMakeLists.txt +++ b/languages/cpp/app_templates/qmakesimple/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( qmakesimple.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/qmakesimple.tar.gz qmakesimple.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - qmakesimple.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + qmakesimple.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/qmakesimple/Makefile.am b/languages/cpp/app_templates/qmakesimple/Makefile.am index 728d63ba..ac17219f 100644 --- a/languages/cpp/app_templates/qmakesimple/Makefile.am +++ b/languages/cpp/app_templates/qmakesimple/Makefile.am @@ -2,10 +2,10 @@ dataFiles = main.cpp qmakesimple.png app.tdevelop app.pro src.pro templateName = qmakesimple ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/qmakesimple/app.tdevelop b/languages/cpp/app_templates/qmakesimple/app.tdevelop index a8e39ca6..2af4f7ad 100644 --- a/languages/cpp/app_templates/qmakesimple/app.tdevelop +++ b/languages/cpp/app_templates/qmakesimple/app.tdevelop @@ -10,25 +10,25 @@ Qt - + - - + + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner %{QTDIR} %{QMAKE} - - + + ada ada_bugs_gcc @@ -66,8 +66,8 @@ TDE Libraries (Doxygen) - - + + /usr/bin/gdb @@ -76,25 +76,25 @@ false - - + + ./bin/%{APPNAMELC} - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/qmakesimple/qmakesimple.tdevtemplate b/languages/cpp/app_templates/qmakesimple/qmakesimple.kdevtemplate similarity index 100% rename from languages/cpp/app_templates/qmakesimple/qmakesimple.tdevtemplate rename to languages/cpp/app_templates/qmakesimple/qmakesimple.kdevtemplate diff --git a/languages/cpp/app_templates/qt4hello/CMakeLists.txt b/languages/cpp/app_templates/qt4hello/CMakeLists.txt index d1aee7bd..7ec55256 100644 --- a/languages/cpp/app_templates/qt4hello/CMakeLists.txt +++ b/languages/cpp/app_templates/qt4hello/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( qt4hello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/qt4hello.tar.gz qt4hello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - qt4hello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + qt4hello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/qt4hello/Makefile.am b/languages/cpp/app_templates/qt4hello/Makefile.am index 20edc902..3f735466 100644 --- a/languages/cpp/app_templates/qt4hello/Makefile.am +++ b/languages/cpp/app_templates/qt4hello/Makefile.am @@ -4,10 +4,10 @@ dataFiles = main.cpp qt4hello.png qt4hello.tdevelop \ templateName = qt4hello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/qt4hello/qt4hello.tdevtemplate b/languages/cpp/app_templates/qt4hello/qt4hello.kdevtemplate similarity index 100% rename from languages/cpp/app_templates/qt4hello/qt4hello.tdevtemplate rename to languages/cpp/app_templates/qt4hello/qt4hello.kdevtemplate diff --git a/languages/cpp/app_templates/qt4hello/qt4hello.tdevelop b/languages/cpp/app_templates/qt4hello/qt4hello.tdevelop index c35d2fe9..3dc8acbb 100644 --- a/languages/cpp/app_templates/qt4hello/qt4hello.tdevelop +++ b/languages/cpp/app_templates/qt4hello/qt4hello.tdevelop @@ -10,7 +10,7 @@ Qt - + @@ -21,8 +21,8 @@ false *.o,*.lo,CVS - - + + true 4 @@ -31,8 +31,8 @@ %{QMAKE} %{DESIGNER} - - + + bash bash_bugs @@ -69,8 +69,8 @@ TDE Libraries (Doxygen) - - + + @@ -85,17 +85,17 @@ true - - + + ./bin/%{APPNAMELC} - + - + @@ -103,11 +103,11 @@ - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/qt4makeapp/CMakeLists.txt b/languages/cpp/app_templates/qt4makeapp/CMakeLists.txt index 5fe14da0..422740dc 100644 --- a/languages/cpp/app_templates/qt4makeapp/CMakeLists.txt +++ b/languages/cpp/app_templates/qt4makeapp/CMakeLists.txt @@ -20,9 +20,9 @@ add_custom_target( qt4makeapp.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/qt4makeapp.tar.gz qt4makeapp.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - qt4makeapp.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + qt4makeapp.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/qt4makeapp/Makefile.am b/languages/cpp/app_templates/qt4makeapp/Makefile.am index 265a5cd9..68f78acb 100644 --- a/languages/cpp/app_templates/qt4makeapp/Makefile.am +++ b/languages/cpp/app_templates/qt4makeapp/Makefile.am @@ -5,10 +5,10 @@ dataFiles = main.cpp qt4makeapp.cpp qt4makeapp.h qt4makeapp.png qt4makeapp.tdeve templateName = qt4makeapp ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/qt4makeapp/qt4makeapp.tdevtemplate b/languages/cpp/app_templates/qt4makeapp/qt4makeapp.kdevtemplate similarity index 100% rename from languages/cpp/app_templates/qt4makeapp/qt4makeapp.tdevtemplate rename to languages/cpp/app_templates/qt4makeapp/qt4makeapp.kdevtemplate diff --git a/languages/cpp/app_templates/qt4makeapp/qt4makeapp.tdevelop b/languages/cpp/app_templates/qt4makeapp/qt4makeapp.tdevelop index c35d2fe9..3dc8acbb 100644 --- a/languages/cpp/app_templates/qt4makeapp/qt4makeapp.tdevelop +++ b/languages/cpp/app_templates/qt4makeapp/qt4makeapp.tdevelop @@ -10,7 +10,7 @@ Qt - + @@ -21,8 +21,8 @@ false *.o,*.lo,CVS - - + + true 4 @@ -31,8 +31,8 @@ %{QMAKE} %{DESIGNER} - - + + bash bash_bugs @@ -69,8 +69,8 @@ TDE Libraries (Doxygen) - - + + @@ -85,17 +85,17 @@ true - - + + ./bin/%{APPNAMELC} - + - + @@ -103,11 +103,11 @@ - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/qtopia4app/CMakeLists.txt b/languages/cpp/app_templates/qtopia4app/CMakeLists.txt index ef38e012..57849362 100644 --- a/languages/cpp/app_templates/qtopia4app/CMakeLists.txt +++ b/languages/cpp/app_templates/qtopia4app/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( qtopia4app.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/qtopia4app.tar.gz qtopia4app.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - qtopia4app.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + qtopia4app.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/qtopia4app/Makefile.am b/languages/cpp/app_templates/qtopia4app/Makefile.am index 8dcaa585..324291bb 100644 --- a/languages/cpp/app_templates/qtopia4app/Makefile.am +++ b/languages/cpp/app_templates/qtopia4app/Makefile.am @@ -5,10 +5,10 @@ dataFiles = Example.png app.tdevelop example.desktop \ templateName = qtopia4app ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} gzip -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/qtopia4app/app.tdevelop b/languages/cpp/app_templates/qtopia4app/app.tdevelop index 320ae4d7..b890135e 100644 --- a/languages/cpp/app_templates/qtopia4app/app.tdevelop +++ b/languages/cpp/app_templates/qtopia4app/app.tdevelop @@ -11,7 +11,7 @@ - + @@ -22,8 +22,8 @@ false *.o,*.lo,CVS - - + + ada ada_bugs_gcc @@ -61,8 +61,8 @@ TDE Libraries (Doxygen) - - + + libtool @@ -75,8 +75,8 @@ false true - - + + @@ -105,11 +105,11 @@ - - + + - + @@ -128,11 +128,11 @@ true - + true 2 - - + + -f -dP @@ -141,14 +141,14 @@ -u3 -p - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - - + + true 4 @@ -159,5 +159,5 @@ /opt/Qtopia/SDK/4.2.4/x86/bin/designer - + diff --git a/languages/cpp/app_templates/qtopia4app/qtopia4app.tdevtemplate b/languages/cpp/app_templates/qtopia4app/qtopia4app.kdevtemplate similarity index 100% rename from languages/cpp/app_templates/qtopia4app/qtopia4app.tdevtemplate rename to languages/cpp/app_templates/qtopia4app/qtopia4app.kdevtemplate diff --git a/languages/cpp/app_templates/qtopiaapp/CMakeLists.txt b/languages/cpp/app_templates/qtopiaapp/CMakeLists.txt index 74826ef3..424d19bc 100644 --- a/languages/cpp/app_templates/qtopiaapp/CMakeLists.txt +++ b/languages/cpp/app_templates/qtopiaapp/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( qtopiaapp.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/qtopiaapp.tar.gz qtopiaapp.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - qtopiaapp.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + qtopiaapp.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/qtopiaapp/Makefile.am b/languages/cpp/app_templates/qtopiaapp/Makefile.am index 342e2a96..afaaf294 100644 --- a/languages/cpp/app_templates/qtopiaapp/Makefile.am +++ b/languages/cpp/app_templates/qtopiaapp/Makefile.am @@ -5,10 +5,10 @@ dataFiles = Example.png app.tdevelop example.control example.desktop \ templateName = qtopiaapp ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/qtopiaapp/app.tdevelop b/languages/cpp/app_templates/qtopiaapp/app.tdevelop index 67916b05..962f4622 100644 --- a/languages/cpp/app_templates/qtopiaapp/app.tdevelop +++ b/languages/cpp/app_templates/qtopiaapp/app.tdevelop @@ -11,7 +11,7 @@ - + @@ -22,8 +22,8 @@ false *.o,*.lo,CVS - - + + ada ada_bugs_gcc @@ -61,8 +61,8 @@ TDE Libraries (Doxygen) - - + + libtool @@ -75,8 +75,8 @@ false true - - + + @@ -85,11 +85,11 @@ -qws - - + + - + @@ -108,11 +108,11 @@ true - + true 2 - - + + -f -dP @@ -121,11 +121,11 @@ -u3 -p - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/qtopiaapp/qtopiaapp.tdevtemplate b/languages/cpp/app_templates/qtopiaapp/qtopiaapp.kdevtemplate similarity index 100% rename from languages/cpp/app_templates/qtopiaapp/qtopiaapp.tdevtemplate rename to languages/cpp/app_templates/qtopiaapp/qtopiaapp.kdevtemplate diff --git a/languages/cpp/app_templates/tde4app/CMakeLists.txt b/languages/cpp/app_templates/tde4app/CMakeLists.txt deleted file mode 100644 index 29997b2c..00000000 --- a/languages/cpp/app_templates/tde4app/CMakeLists.txt +++ /dev/null @@ -1,29 +0,0 @@ -################################################# -# -# (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( tde4app.tar.gz ALL - COMMAND tar zcf tde4app.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} - tdeapp4.cpp tdeapp4.h prefs_base.ui tdeapp4view.cpp - tdeapp4view.h tdeapp4view_base.ui main.cpp tde4appui.rc - tde4app-CMakeLists.txt tdeapp4.desktop tdeapp4.kcfg - settings.kcfgc tde4app.png README tde4app.tdevelop - tde4app.tdevelop.filelist -) - - -install( FILES - ${CMAKE_CURRENT_BINARY_DIR}/tde4app.tar.gz tde4app.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) - - -install( FILES - tde4app.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) diff --git a/languages/cpp/app_templates/tde4app/Makefile.am b/languages/cpp/app_templates/tde4app/Makefile.am deleted file mode 100644 index 3fc82b7a..00000000 --- a/languages/cpp/app_templates/tde4app/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -dataFiles = tdeapp4.cpp tdeapp4.h prefs_base.ui tdeapp4view.cpp tdeapp4view.h tdeapp4view_base.ui \ - main.cpp tde4appui.rc CMakeLists.txt tdeapp4.desktop tdeapp4.kcfg settings.kcfgc \ - tde4app.png README tde4app.tdevelop tde4app.tdevelop.filelist - -templateName = tde4app - -### no need to change below: -template_DATA = $(templateName).tdevtemplate -templatedir = ${appwizarddatadir}/templates - -appwizarddatadir = ${kde_datadir}/tdevappwizard -$(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 diff --git a/languages/cpp/app_templates/tde4app/tde4app.tdevelop b/languages/cpp/app_templates/tde4app/tde4app.tdevelop deleted file mode 100644 index 87554ffc..00000000 --- a/languages/cpp/app_templates/tde4app/tde4app.tdevelop +++ /dev/null @@ -1,205 +0,0 @@ - - - - %{AUTHOR} - %{EMAIL} - %{VERSION} - TDevCustomProject - C++ - - C++ - Code - Qt - KDE - - %{APPNAMELC} - . - false - - - - - - - - - - - - - false - *.o,*.lo,CVS - - - - - 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 - - - true - false - false - true - - - false - true - - - - - - - - - - - - -f - - -dP - - -f - -u3 -p - - - - - - - false - - - .h - .cpp - true - - - - - %{dest}/build/%{APPNAMELC} - - false - false - - - - - - - - - false - false - - true - %{dest} - executable - - - make - %{dest}/build - - - false - 1 - 0 - false - make - - - default - - - - - - - - - - - - - *.h - *.cpp - CMakeLists.txt - *.desktop - *.kcfg* - *.ui - Doxyfile - *.dox - *.rc - *.cmake - - - 0 - - - - default - - - - - - build - - - - - true - 4 - 4 - ExternalDesigner - /usr/bin/designer-qt4 - /usr/lib/qt4 - - - - true - 2 - - - - Doxygen Documentation Collection - %{APPNAMELC}.tag - - - diff --git a/languages/cpp/app_templates/tde4app/tde4app.tdevelop.filelist b/languages/cpp/app_templates/tde4app/tde4app.tdevelop.filelist deleted file mode 100644 index 50a0a4f0..00000000 --- a/languages/cpp/app_templates/tde4app/tde4app.tdevelop.filelist +++ /dev/null @@ -1,13 +0,0 @@ -# TDevelop Custom Project File List -CMakeLists.txt -main.cpp -prefs_base.ui -settings.kcfgc -%{APPNAMELC}.cpp -%{APPNAMELC}.desktop -%{APPNAMELC}.h -%{APPNAMELC}.kcfg -%{APPNAMELC}ui.rc -%{APPNAMELC}view.cpp -%{APPNAMELC}view.h -%{APPNAMELC}view_base.ui diff --git a/languages/cpp/app_templates/tde4app/tdeapp4.desktop b/languages/cpp/app_templates/tde4app/tdeapp4.desktop deleted file mode 100644 index 63b359c5..00000000 --- a/languages/cpp/app_templates/tde4app/tdeapp4.desktop +++ /dev/null @@ -1,30 +0,0 @@ -[Desktop Entry] -Name=KApp4 -Name[nds]=KProg4 -Name[sv]=KDE 4-program -Name[zh_TW]=KApp4 程式 -Exec=tdeapp4 %i -caption "%c" -Icon=kapp4 -Type=Application -DocPath=kapp4/kapp4.html -GenericName=A KDE4 Application -GenericName[ca]=Una aplicació del KDE4 -GenericName[da]=Et KDE4-program -GenericName[de]=Eine KDE 4-Anwendung -GenericName[el]=Μία εφαρμογή του KDE4 -GenericName[es]=Una aplicación para KDE4 -GenericName[et]=KDE4 rakendus -GenericName[hu]=KDE4-alapú alkalmazás -GenericName[it]=Applicazione KDE4 -GenericName[nds]=En KDE4-Programm -GenericName[nl]=Een KDE4-programma -GenericName[pl]=Program dla KDE4 -GenericName[pt]=Uma Aplicação do KDE4 -GenericName[pt_BR]=Uma Aplicação do KDE4 -GenericName[ru]=Приложение KDE 4 -GenericName[sk]=KDE4 aplikácia -GenericName[sr]=KDE4 програм -GenericName[sr@Latn]=KDE4 program -GenericName[sv]=Ett KDE 4-program -GenericName[zh_TW]=KDE4 應用程式 -Terminal=false diff --git a/languages/cpp/app_templates/tdeapp/CMakeLists.txt b/languages/cpp/app_templates/tdeapp/CMakeLists.txt deleted file mode 100644 index 10c09f9f..00000000 --- a/languages/cpp/app_templates/tdeapp/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -################################################# -# -# (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( tdeapp.tar.gz ALL - COMMAND tar zcf tdeapp.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} - app.cpp app.h pref.cpp pref.h appview.cpp appview.h - appiface.h app_client.cpp main.cpp appui.rc src-Makefile.am - tdeapp.png app.tdevelop subdirs README -) - - -install( FILES - ${CMAKE_CURRENT_BINARY_DIR}/tdeapp.tar.gz tdeapp.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) - - -install( FILES - tdeapp.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) diff --git a/languages/cpp/app_templates/tdeapp/Makefile.am b/languages/cpp/app_templates/tdeapp/Makefile.am deleted file mode 100644 index 6adf4430..00000000 --- a/languages/cpp/app_templates/tdeapp/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -dataFiles = app.cpp app.h pref.cpp pref.h appview.cpp appview.h \ - appiface.h app_client.cpp main.cpp appui.rc src-Makefile.am \ - tdeapp.png app.tdevelop subdirs README - -templateName = tdeapp - -### no need to change below: -template_DATA = $(templateName).tdevtemplate -templatedir = ${appwizarddatadir}/templates - -appwizarddatadir = ${kde_datadir}/tdevappwizard -$(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/tdeapp/app.tdevelop b/languages/cpp/app_templates/tdeapp/app.tdevelop deleted file mode 100644 index e1523988..00000000 --- a/languages/cpp/app_templates/tdeapp/app.tdevelop +++ /dev/null @@ -1,168 +0,0 @@ - - - - %{AUTHOR} - %{EMAIL} - %{VERSION} - KDevTDEAutoProject - C++ - - C++ - Code - Qt - TDE - - . - false - - - - - - 3 - true - 3 - EmbeddedTDevDesigner - - - - - src/%{APPNAMELC} - debug - - - src/%{APPNAMELC} - false - - - - - - - false - 1 - false - - - - - optimized - kdevgccoptions - kdevgppoptions - kdevg77options - -O2 -g0 - - - --enable-debug=full - debug - kdevgccoptions - kdevgppoptions - kdevg77options - -O0 -g3 - - - - - - - - - - - - - false - *.o,*.lo,CVS - - - - - 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 - - - true - false - false - true - - - false - true - - - - - - - - - - - - -f - - -dP - - -f - -u3 -p - - - - - - - false - - - .h - .cpp - true - - - - true - 2 - - - - Doxygen Documentation Collection - %{APPNAMELC}.tag - - - diff --git a/languages/cpp/app_templates/tdeapp/tdeapp.tdevtemplate b/languages/cpp/app_templates/tdeapp/tdeapp.tdevtemplate deleted file mode 100644 index 0902455d..00000000 --- a/languages/cpp/app_templates/tdeapp/tdeapp.tdevtemplate +++ /dev/null @@ -1,253 +0,0 @@ -# TDE Config File -[General] -Name=Application framework -Name[ca]=Infraestructura d'aplicacions -Name[da]=Programskelet -Name[de]=Anwendungsgrundgerüst -Name[el]=Πλαίσιο εφαρμογής -Name[es]=Infraestructura de aplicación -Name[et]=Rakenduse raamistik -Name[eu]=Aplikazioen lan-markoa -Name[fa]=چارچوب کاربرد -Name[fr]=Infrastructure d'application -Name[ga]=Creatlach feidhmchláir -Name[gl]=Entorno de traballo para aplicación -Name[hu]=Alkalmazás-keretrendszer -Name[it]=Infrastruttura applicativa -Name[ja]=アプリケーションフレームワーク -Name[nds]=Programmrahmenwark -Name[ne]=अनुप्रयोग फ्रेमवर्क -Name[nl]=Applicationframework -Name[pl]=Szablon programu -Name[pt]=Plataforma de aplicações -Name[pt_BR]=Plataforma de aplicações -Name[ru]=Приложение TDE -Name[sk]=Aplikačný framework -Name[sl]=Ogrodje programa -Name[sr]=Радни оквир програма -Name[sr@Latn]=Radni okvir programa -Name[sv]=Programramverk -Name[tr]=Uygulama Çatısı -Name[zh_CN]=应用程序框架 -Name[zh_TW]=應用程式框架 -Icon=tdeapp.png -Category=C++/TDE -Comment=Generates a simple TDE application with one toplevel window, menus and toolbars. A DCOP interface is also provided, so that your application can provide a scripting interface -Comment[ca]=Genera una simple aplicació per al TDE amb una finestra principal, menús i barres d'eines. També es proveeix la interfície DCOP, de manera que la vostra aplicació podrà proveir d'una interfície per a scripts -Comment[da]=Genererer et simpelt TDE program med et vindue på topniveau, menuer og værktøjslinjer. Der sørges også for en DCOP-grænseflade, så dit program kan sørge for en script-grænseflade -Comment[de]=Erstellt eine einfache TDE-Anwendung mit einem Toplevel-Fenster, Menüs und Werkzeugleisten. Dazu kommt eine DCOP-Schnittstelle, so dass Ihre Anwendung eine Schnittstelle für Skripte anbieten kann. -Comment[el]=Δημιουργεί μια απλή εφαρμογή TDE με ένα ανώτερο παράθυρο, μενού και γραμμές εργαλείων. Μια διασύνδεση DCOP προσφέρεται επίσης, έτσι ώστε η εφαρμογή σας να προσφέρει ένα περιβάλλον γραφής σεναρίων -Comment[es]=Genera una sencilla aplicación de TDE con una ventana de nivel superior, menús y barras de herramientas. También se proporciona una interfaz DCOP para que su aplicación pueda proporcionar una interfaz para guiones de órdenes. -Comment[et]=Lihtsa TDE rakenduse loomine ühe tipptaseme akna, menüüde ja tööriistaribadega. Lisatakse ka DCOP-liides, mis võimaldab pakkuda rakenduses ka skriptikeelte tuge. -Comment[eu]=TDE aplikazio sinple bat sortzen du menu eta tresna-barradun goi-mailako lehio batekin. DCOP interfaze bat ere eskeintzen zaio aplikazioari, zure aplikazioak script interfaze bat izan dezan -Comment[fa]=یک کاربرد سادۀ TDE با یک پنجرۀ سطح بالا، گزینگان و میله ابزارها تولید می‌کند. همچنین یک واسط DCOP فراهم است. بنابراین، کاربرد شما یک واسط دست‌نوشته‌ای را می‌تواند فراهم کند -Comment[fr]=Génère une application TDE simple comprenant une fenêtre de premier niveau, des menus et des barres d'outils. Une interface DCOP est également prévue, afin que votre application puisse offrir une interface de scriptage -Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí TDE le príomhfhuinneog amháin, roghchláir agus barraí uirlisí. Soláthraítear comhéadan DCOP freisin, d'fhonn is féidir comhéadan scriptithe a chur ar fáil -Comment[gl]=Xera unha aplicación TDE sinxela cunha xanela principal, menús e barras de ferramentas. Tamén se proporciona unha interface DCOP de modo que a súa aplicación poida proveer unha interface de scripting. -Comment[hu]=Létrehoz egy egyszerű TDE-alkalmazást egy főablakkal, menükkel és eszköztárakkal. DCOP-felület is létre lesz hozva, ezért az alkalmazás szkriptelési felületet is biztosíthat. -Comment[it]=Genera una semplice applicazione TDE con una finestra toplevel, menu e barre degli strumenti. È anche fornita un'interfaccia DCOP così l'applicazione avrà un'interfaccia per lo scripting -Comment[ja]=簡単な TDE アプリケーションを作成します。アプリケーションには、トップレベルのウィンドウ、メニュー、ツールバーがあります。スクリプト化をサポートするために DCOP のインターフェースも用意してあります。 -Comment[nds]=Stellt en eenfach TDE-Programm mit een böverst Finster, Menüs un Warktüüchbalkens op. Ok warrt noch en DCOP-Koppelsteed praatstellt, so dat Dien Programm en Skriptkoppelsteed anbeden kann -Comment[ne]=एउटा उच्चतह सञ्झ्याल, मेनु र उपकरणपट्टीसँग साधारण केडीई अनुप्रयोग उत्पन्न गर्दछ । DCOP पनि प्रदान गरिन्छ, जसले गर्दा तपाईँको अनुप्रयोगले स्क्रिप्टिङ इन्टरफेस प्रदान गर्न सक्दछ -Comment[nl]=Genereert een eenvoudige TDE-toepassing met één toplevel window, menu's en toolbars. Er wordt ook een DCOP-interface aangeleverd, zodat uw toepassing een scripting interface kan aanleveren. -Comment[pl]=Generuje prosty program dla TDE z oknem, menu i paskami narzędzi. Dostępny jest także interfejs DCOP, więc Twoje programy mogą zawierać interfejs do skryptów -Comment[pt]=Gera uma aplicação simples do TDE com uma janela de topo, menus e barras de ferramentas. Também é oferecida uma interface de DCOP, para que a sua aplicação possa fornecer uma interface de programação -Comment[pt_BR]=Gera uma aplicação simples do TDE com uma janela de topo, menus e barras de ferramentas. Também é oferecida uma interface de DCOP, para que a sua aplicação possa fornecer uma interface de programação -Comment[ru]=Создание простого приложения TDE с окном, меню и панелями инструментов. Кроме того, в нём содержится интерфейс DCOP для автоматизации работы с помощью пользовательских скриптов -Comment[sk]=Vygenruje jednoduchú TDE aplikáciu s jedným oknom, menu apanelom nástrojov. Taktiež bude poskytnuté DCOP rozhranie, takže aj aplikáciamôže poskytnúť skriptovacie rozhranie -Comment[sr]=Прави једноставан TDE програм, са једним прозором највишег нивоа, менијима и тракама са алатом. Дат је и DCOP интерфејс, тако да ваш програм може да омогући скриптовање -Comment[sr@Latn]=Pravi jednostavan TDE program, sa jednim prozorom najvišeg nivoa, menijima i trakama sa alatom. Dat je i DCOP interfejs, tako da vaš program može da omogući skriptovanje -Comment[sv]=Skapar ett enkelt TDE-program med ett toppnivåfönster, menyer och verktygsrader. Ett DCOP-gränssnitt tillhandahålls också, så att programmet kan tillhandahålla ett skriptgränssnitt. -Comment[tr]=Bir üst seviye penceresi, menüleri ve araç çubukları olan basit bir TDE uygulaması yaratır. Bir DCOP arayüzü sağlanır, böylece uygulama bir betik arayüzü sağlayabilir. -Comment[zh_CN]=生成一个带一个顶层窗口、菜单和工具栏的简单 TDE 应用程序。另外还提供了 DCOP 接口,这样您的应用也可同时提供脚本接口。 -Comment[zh_TW]=產生一個簡單的 TDE 應用程式,內含頂層視窗、選單與工具列。另外提供一個 DCOP 介面,讓您的應用程式可以提供文稿介面。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}view.cpp,%{dest}/src/README -Archive=kapp.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/tde-app.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[FILE10] -Type=install -Source=%{tdevelop}/template-common/hi16-app-app.png -Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png -Process=false - -[FILE11] -Type=install -Source=%{tdevelop}/template-common/hi32-app-app.png -Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png -Process=false - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE12] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE13] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE14] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE15] -Type=install -Source=%{src}/app.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE16] -Type=install -Source=%{src}/app.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE17] -Type=install -Source=%{src}/appview.cpp -Dest=%{dest}/src/%{APPNAMELC}view.cpp - -[FILE18] -Type=install -Source=%{src}/appview.h -Dest=%{dest}/src/%{APPNAMELC}view.h - -[FILE19] -Type=install -Source=%{src}/appiface.h -Dest=%{dest}/src/%{APPNAMELC}iface.h - -[FILE20] -Type=install -Source=%{src}/app_client.cpp -Dest=%{dest}/src/%{APPNAMELC}_client.cpp - -[FILE21] -Type=install -Source=%{src}/pref.cpp -Dest=%{dest}/src/pref.cpp - -[FILE22] -Type=install -Source=%{src}/pref.h -Dest=%{dest}/src/pref.h - -[FILE23] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/main.cpp - -[FILE24] -Type=install -EscapeXML=true -Source=%{src}/appui.rc -Dest=%{dest}/src/%{APPNAMELC}ui.rc - -[FILE25] -Type=install -Source=%{src}/README -Dest=%{dest}/src/README - -[MSG] -Type=message -Comment=A TDE Application was created at %{dest} -Comment[ca]=Una aplicació per al TDE ha estat creada a %{dest} -Comment[da]=Et TDE program blev oprettet i %{dest} -Comment[de]=Eine TDE-Anwendung wurde in %{dest} erstellt. -Comment[el]=Μια εφαρμογή TDE δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación de TDE ha sido creada en %{dest} -Comment[et]=TDE rakendus loodi asukohta %{dest} -Comment[eu]=A TDE aplikazio bat sortu da hemen: %{dest} -Comment[fa]=یک کاربرد TDE در %{dest} فراهم شد -Comment[fr]=Une application TDE a été créée dans %{dest} -Comment[ga]=Cruthaíodh Feidhmchlár TDE ag %{dest} -Comment[gl]=Creouse unha aplicación TDE en %{dest} -Comment[hu]=Létrejött egy TDE-s alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione TDE in %{dest} -Comment[ja]=TDE アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en TDE-Programm opstellt -Comment[ne]=TDE अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een TDE-toepassing is aangemaakt in %{dest} -Comment[pl]=Program dla TDE został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação do TDE em %{dest} -Comment[pt_BR]=Foi criada uma aplicação do TDE em %{dest} -Comment[ru]=Приложение TDE создано в %{dest} -Comment[sk]=TDE aplikácia bola vytvorená v %{dest} -Comment[sl]=Program za TDE je bil ustvarjen v %{dest} -Comment[sr]=TDE програм је направљен у %{dest} -Comment[sr@Latn]=TDE program je napravljen u %{dest} -Comment[sv]=Ett TDE-program skapades i %{dest} -Comment[tr]=Bir TDE Uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个 TDE 应用程序 -Comment[zh_TW]=一個 TDE 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/tdecmodule/CMakeLists.txt b/languages/cpp/app_templates/tdecmodule/CMakeLists.txt index 40e12016..072f5f5e 100644 --- a/languages/cpp/app_templates/tdecmodule/CMakeLists.txt +++ b/languages/cpp/app_templates/tdecmodule/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( tdecmodule.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/tdecmodule.tar.gz tdecmodule.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - tdecmodule.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + tdecmodule.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/tdecmodule/Makefile.am b/languages/cpp/app_templates/tdecmodule/Makefile.am index 0938012d..b3b19611 100644 --- a/languages/cpp/app_templates/tdecmodule/Makefile.am +++ b/languages/cpp/app_templates/tdecmodule/Makefile.am @@ -3,10 +3,10 @@ dataFiles = module.cpp module.h module.desktop module.tdevelop \ templateName = tdecmodule ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/tdecmodule/module.tdevelop b/languages/cpp/app_templates/tdecmodule/module.tdevelop index 4f2d0606..7b5a57c0 100644 --- a/languages/cpp/app_templates/tdecmodule/module.tdevelop +++ b/languages/cpp/app_templates/tdecmodule/module.tdevelop @@ -13,15 +13,15 @@ TDE - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - - + + src/%{APPNAMELC} debug @@ -43,8 +43,8 @@ -O0 -g3 - - + + @@ -52,8 +52,8 @@ - - + + ada ada_bugs_gcc @@ -90,24 +90,24 @@ qmake User Guide - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/tdecmodule/tdecmodule.kdevtemplate b/languages/cpp/app_templates/tdecmodule/tdecmodule.kdevtemplate new file mode 100644 index 00000000..f646c242 --- /dev/null +++ b/languages/cpp/app_templates/tdecmodule/tdecmodule.kdevtemplate @@ -0,0 +1,197 @@ +# TDE Config File +[General] +Name=Control Center module +Name[ca]=Mòdul per al Centre de control +Name[da]=Kontrolcenter-modul +Name[de]=Kontrollzentrum-Modul +Name[el]=Άρθρωμα κέντρου ελέγχου +Name[en_GB]=Control Centre module +Name[es]=Módulo para el Centro de control +Name[et]=Juhtimiskeskuse moodul +Name[eu]=Kontrol-gunearen modulua +Name[fa]=پیمانۀ مرکز کنترل +Name[fr]=Module du centre de configuration +Name[ga]=Modúl Lárionad Rialaithe +Name[gl]=Módulo para Centro de control +Name[hu]=KControl-beállítómodul +Name[it]=Modulo del Centro di controllo +Name[ja]=コントロールセンターモジュール +Name[nds]=Kuntrullzentrum-Moduul +Name[ne]=नियन्त्रण केन्द्र मोड्युल +Name[nl]=Configuratiemodule +Name[pl]=Moduł Centrum Sterowania +Name[pt]=Módulo do Centro de Controlo +Name[pt_BR]=Módulo do Centro de Controlo +Name[ru]=Модуль Центра управления +Name[sk]=Control Center modul +Name[sl]=Modul nadzornega središča +Name[sr]=Модул Контролног центра +Name[sr@Latn]=Modul Kontrolnog centra +Name[sv]=Modul i inställningscentralen +Name[tr]=Kontrol Merkezi Birimi +Name[zh_CN]=控制中心模块 +Name[zh_TW]=控制中心模組 +Icon=tdecmodule.png +Category=C++/TDE +Comment=Generates a framework for a module which can be embedded into the TDE Control Center. +Comment[ca]=Genera una infraestructura per a un mòdul que es pugui encastar al Centre de control de TDE. +Comment[da]=Genererer et skelet for et modul som kan indlejres i TDE's kontrolcenter. +Comment[de]=Erstellt das Gerüst für ein Modul, das in das TDE-Kontrollzentrum integriert werden kann. +Comment[el]=Δημιουργεί ένα πλαίσιο για ένα άρθρωμα το οποίο μπορεί να ενσωματωθεί το κέντρο ελέγχου του TDE. +Comment[en_GB]=Generates a framework for a module which can be embedded into the TDE Control Centre. +Comment[es]=Genera una infraestructura para un módulo que se puede empotrar en el Centro de control de TDE. +Comment[et]=Mooduli raamistiku loomine, mida saab põimida TDE juhtimiskeskusse. +Comment[eu]=TDE-ren kontrol-gunean kapsula daitekeen modulu baten lan-marko bat sortzen du. +Comment[fa]=چارچوبی برای پیمانه‌ای که در مرکز کنترل TDE می‌تواند نهفته شود، تولید می‌کند. +Comment[fr]=Génère une infrastructure pour un module qui peut être intégré dans le centre de configuration de TDE. +Comment[ga]=Cruthaigh creatlach de mhodúl is féidir leabú i Lárionad Rialaithe TDE. +Comment[gl]=Xera un contorno de traballo para un módulo que pode incrustarse no Centro de control de TDE. +Comment[hu]=Létrehoz egy kiindulási TDE vezérlőpult-beállítómodult +Comment[it]=Genera l'infrastruttura per un modulo che può essere integrato nel Centro di controllo di TDE. +Comment[ja]=TDE のコントロールセンターに取り込めるモジュールのフレームワークを作成します。 +Comment[nds]=Stellt en Rahmenwark för en Moduul op, dat sik na dat TDE-Kuntrullzentrum inbetten lett. +Comment[ne]=केडीई नियन्त्रण केन्द्रमा सम्मिलित गर्न सकिने मोड्युलका लागि फ्रेमवर्क उत्पन्न गर्दछ । +Comment[nl]=Genereert een framework voor een module die kan worden ingebed in het configuratiecentrum van TDE. +Comment[pl]=Generuje szablon modułu, który może zostać włączony w Centrum Sterowania TDE. +Comment[pt]=Gera a plataforma para um módulo que possa ser incorporado no Centro de Controlo do TDE. +Comment[pt_BR]=Gera a plataforma para um módulo que possa ser incorporado no Centro de Controlo do TDE. +Comment[ru]=Создание модуля для Центра управления TDE. +Comment[sk]=Vygeneruje framework pre modul, ktorý môže byť vložený do TDE Control Center. +Comment[sr]=Прави радни оквир за модул који се може уградити у Контролни центар TDE-а. +Comment[sr@Latn]=Pravi radni okvir za modul koji se može ugraditi u Kontrolni centar TDE-a. +Comment[sv]=Skapar ett ramverk för en modul som kan inbäddas i TDE:s inställningscentral. +Comment[tr]=TDE Kontrol Merkezine gömülebilen bir birim için bir çatı yaratır. +Comment[zh_CN]=生成一个可嵌入 TDE 控制中心的模块框架。 +Comment[zh_TW]=產生一個可以嵌入 TDE 控制中心的模組框架。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=tdecmodule.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/module.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MkDir3] +Type=mkdir +Dir=%{dest}/po + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir4] +Type=mkdir +Dir=%{dest}/src + +[FILE9] +Type=install +Source=%{src}/module.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE10] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE11] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE12] +Type=install +Source=%{src}/module.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE13] +Type=install +Source=%{src}/module.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE14] +Type=install +Source=%{src}/module.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[MSG] +Type=message +Comment=A control center module was created in %{dest} +Comment[ca]=A mòdul per al centre de control ha estat creat en %{dest} +Comment[da]=Et kontrolcenter-modul blev oprettet i %{dest} +Comment[de]=Ein Kontrollzentrum-Modul wurde in %{dest} erstellt. +Comment[el]=Ένα άρθρωμα κέντρου ελέγχου δημιουργήθηκε στο %{dest} +Comment[en_GB]=A control centre module was created in %{dest} +Comment[es]=Un módulo para el Centro de control ha sido creado en %{dest} +Comment[et]=Juhtimiskeskuse moodul loodi asukohta %{dest} +Comment[eu]=Kontrol-gunearen modulu bat sortu da hemen: {dest} +Comment[fa]=یک پیمانۀ مرکز کنترل در %{dest} ایجاد شد +Comment[fr]=Un module du centre de configuration a été créé dans %{dest} +Comment[ga]=Cruthaíodh modúl lárionad rialaithe i %{dest} +Comment[gl]=Creouse un módulo para o centro de control en %{dest} +Comment[hu]=Létrejött egy KControl-beállítómodul itt: %{dest} +Comment[it]=È stato creato un modulo del Centro di controllo in %{dest} +Comment[ja]=コントロールセンターのモジュールを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Kuntrullzentrum-Moduul opstellt +Comment[ne]=नियन्त्रण केन्द्र मोड्युल %{dest} मा सिर्जना गरियो +Comment[nl]=Een configuratiemodule is aangemaakt in %{dest} +Comment[pl]=Moduł Centrum Sterowania został utworzony w %{dest} +Comment[pt]=Foi criado um módulo do Centro de Controlo em %{dest} +Comment[pt_BR]=Foi criado um módulo do Centro de Controlo em %{dest} +Comment[ru]=Модуль Центра управления TDE создан в %{dest} +Comment[sk]=Control center modul bol vytvorený v %{dest} +Comment[sl]=Modul nadzornega središča je bil ustvarjen v %{dest} +Comment[sr]=Модул Контролног центра направљен је у %{dest} +Comment[sr@Latn]=Modul Kontrolnog centra napravljen je u %{dest} +Comment[sv]=En modul i inställningscentralen skapades i %{dest} +Comment[zh_CN]=在 %{dest} 中创建了一个控制中心模块 +Comment[zh_TW]=一個控制中心模組已建立於 %{dest} diff --git a/languages/cpp/app_templates/tdecmodule/tdecmodule.tdevtemplate b/languages/cpp/app_templates/tdecmodule/tdecmodule.tdevtemplate deleted file mode 100644 index 06d6657a..00000000 --- a/languages/cpp/app_templates/tdecmodule/tdecmodule.tdevtemplate +++ /dev/null @@ -1,197 +0,0 @@ -# TDE Config File -[General] -Name=Control Center module -Name[ca]=Mòdul per al Centre de control -Name[da]=Kontrolcenter-modul -Name[de]=Kontrollzentrum-Modul -Name[el]=Άρθρωμα κέντρου ελέγχου -Name[en_GB]=Control Centre module -Name[es]=Módulo para el Centro de control -Name[et]=Juhtimiskeskuse moodul -Name[eu]=Kontrol-gunearen modulua -Name[fa]=پیمانۀ مرکز کنترل -Name[fr]=Module du centre de configuration -Name[ga]=Modúl Lárionad Rialaithe -Name[gl]=Módulo para Centro de control -Name[hu]=KControl-beállítómodul -Name[it]=Modulo del Centro di controllo -Name[ja]=コントロールセンターモジュール -Name[nds]=Kuntrullzentrum-Moduul -Name[ne]=नियन्त्रण केन्द्र मोड्युल -Name[nl]=Configuratiemodule -Name[pl]=Moduł Centrum Sterowania -Name[pt]=Módulo do Centro de Controlo -Name[pt_BR]=Módulo do Centro de Controlo -Name[ru]=Модуль Центра управления -Name[sk]=Control Center modul -Name[sl]=Modul nadzornega središča -Name[sr]=Модул Контролног центра -Name[sr@Latn]=Modul Kontrolnog centra -Name[sv]=Modul i inställningscentralen -Name[tr]=Kontrol Merkezi Birimi -Name[zh_CN]=控制中心模块 -Name[zh_TW]=控制中心模組 -Icon=tdecmodule.png -Category=C++/TDE -Comment=Generates a framework for a module which can be embedded into the TDE Control Center. -Comment[ca]=Genera una infraestructura per a un mòdul que es pugui encastar al Centre de control de TDE. -Comment[da]=Genererer et skelet for et modul som kan indlejres i TDE's kontrolcenter. -Comment[de]=Erstellt das Gerüst für ein Modul, das in das TDE-Kontrollzentrum integriert werden kann. -Comment[el]=Δημιουργεί ένα πλαίσιο για ένα άρθρωμα το οποίο μπορεί να ενσωματωθεί το κέντρο ελέγχου του TDE. -Comment[en_GB]=Generates a framework for a module which can be embedded into the TDE Control Centre. -Comment[es]=Genera una infraestructura para un módulo que se puede empotrar en el Centro de control de TDE. -Comment[et]=Mooduli raamistiku loomine, mida saab põimida TDE juhtimiskeskusse. -Comment[eu]=TDE-ren kontrol-gunean kapsula daitekeen modulu baten lan-marko bat sortzen du. -Comment[fa]=چارچوبی برای پیمانه‌ای که در مرکز کنترل TDE می‌تواند نهفته شود، تولید می‌کند. -Comment[fr]=Génère une infrastructure pour un module qui peut être intégré dans le centre de configuration de TDE. -Comment[ga]=Cruthaigh creatlach de mhodúl is féidir leabú i Lárionad Rialaithe TDE. -Comment[gl]=Xera un contorno de traballo para un módulo que pode incrustarse no Centro de control de TDE. -Comment[hu]=Létrehoz egy kiindulási TDE vezérlőpult-beállítómodult -Comment[it]=Genera l'infrastruttura per un modulo che può essere integrato nel Centro di controllo di TDE. -Comment[ja]=TDE のコントロールセンターに取り込めるモジュールのフレームワークを作成します。 -Comment[nds]=Stellt en Rahmenwark för en Moduul op, dat sik na dat TDE-Kuntrullzentrum inbetten lett. -Comment[ne]=केडीई नियन्त्रण केन्द्रमा सम्मिलित गर्न सकिने मोड्युलका लागि फ्रेमवर्क उत्पन्न गर्दछ । -Comment[nl]=Genereert een framework voor een module die kan worden ingebed in het configuratiecentrum van TDE. -Comment[pl]=Generuje szablon modułu, który może zostać włączony w Centrum Sterowania TDE. -Comment[pt]=Gera a plataforma para um módulo que possa ser incorporado no Centro de Controlo do TDE. -Comment[pt_BR]=Gera a plataforma para um módulo que possa ser incorporado no Centro de Controlo do TDE. -Comment[ru]=Создание модуля для Центра управления TDE. -Comment[sk]=Vygeneruje framework pre modul, ktorý môže byť vložený do TDE Control Center. -Comment[sr]=Прави радни оквир за модул који се може уградити у Контролни центар TDE-а. -Comment[sr@Latn]=Pravi radni okvir za modul koji se može ugraditi u Kontrolni centar TDE-a. -Comment[sv]=Skapar ett ramverk för en modul som kan inbäddas i TDE:s inställningscentral. -Comment[tr]=TDE Kontrol Merkezine gömülebilen bir birim için bir çatı yaratır. -Comment[zh_CN]=生成一个可嵌入 TDE 控制中心的模块框架。 -Comment[zh_TW]=產生一個可以嵌入 TDE 控制中心的模組框架。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=tdecmodule.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/module.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[MkDir3] -Type=mkdir -Dir=%{dest}/po - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir4] -Type=mkdir -Dir=%{dest}/src - -[FILE9] -Type=install -Source=%{src}/module.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE10] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE11] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE12] -Type=install -Source=%{src}/module.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE13] -Type=install -Source=%{src}/module.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE14] -Type=install -Source=%{src}/module.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[MSG] -Type=message -Comment=A control center module was created in %{dest} -Comment[ca]=A mòdul per al centre de control ha estat creat en %{dest} -Comment[da]=Et kontrolcenter-modul blev oprettet i %{dest} -Comment[de]=Ein Kontrollzentrum-Modul wurde in %{dest} erstellt. -Comment[el]=Ένα άρθρωμα κέντρου ελέγχου δημιουργήθηκε στο %{dest} -Comment[en_GB]=A control centre module was created in %{dest} -Comment[es]=Un módulo para el Centro de control ha sido creado en %{dest} -Comment[et]=Juhtimiskeskuse moodul loodi asukohta %{dest} -Comment[eu]=Kontrol-gunearen modulu bat sortu da hemen: {dest} -Comment[fa]=یک پیمانۀ مرکز کنترل در %{dest} ایجاد شد -Comment[fr]=Un module du centre de configuration a été créé dans %{dest} -Comment[ga]=Cruthaíodh modúl lárionad rialaithe i %{dest} -Comment[gl]=Creouse un módulo para o centro de control en %{dest} -Comment[hu]=Létrejött egy KControl-beállítómodul itt: %{dest} -Comment[it]=È stato creato un modulo del Centro di controllo in %{dest} -Comment[ja]=コントロールセンターのモジュールを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Kuntrullzentrum-Moduul opstellt -Comment[ne]=नियन्त्रण केन्द्र मोड्युल %{dest} मा सिर्जना गरियो -Comment[nl]=Een configuratiemodule is aangemaakt in %{dest} -Comment[pl]=Moduł Centrum Sterowania został utworzony w %{dest} -Comment[pt]=Foi criado um módulo do Centro de Controlo em %{dest} -Comment[pt_BR]=Foi criado um módulo do Centro de Controlo em %{dest} -Comment[ru]=Модуль Центра управления TDE создан в %{dest} -Comment[sk]=Control center modul bol vytvorený v %{dest} -Comment[sl]=Modul nadzornega središča je bil ustvarjen v %{dest} -Comment[sr]=Модул Контролног центра направљен је у %{dest} -Comment[sr@Latn]=Modul Kontrolnog centra napravljen je u %{dest} -Comment[sv]=En modul i inställningscentralen skapades i %{dest} -Comment[zh_CN]=在 %{dest} 中创建了一个控制中心模块 -Comment[zh_TW]=一個控制中心模組已建立於 %{dest} diff --git a/languages/cpp/app_templates/tdeconfig35/CMakeLists.txt b/languages/cpp/app_templates/tdeconfig35/CMakeLists.txt index 1025eb0b..32dd830c 100644 --- a/languages/cpp/app_templates/tdeconfig35/CMakeLists.txt +++ b/languages/cpp/app_templates/tdeconfig35/CMakeLists.txt @@ -20,9 +20,9 @@ add_custom_target( tdeconfig35.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/tdeconfig35.tar.gz tdeconfig35.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - tdeconfig35.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + tdeconfig35.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/tdeconfig35/Makefile.am b/languages/cpp/app_templates/tdeconfig35/Makefile.am index dc6c56d1..a172f05f 100644 --- a/languages/cpp/app_templates/tdeconfig35/Makefile.am +++ b/languages/cpp/app_templates/tdeconfig35/Makefile.am @@ -5,10 +5,10 @@ dataFiles = src-Makefile.am app.cpp app.h main.cpp appui.rc app.tdevelop \ templateName= tdeconfig35 ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/tdeconfig35/app.tdevelop b/languages/cpp/app_templates/tdeconfig35/app.tdevelop index e1523988..6a53f237 100644 --- a/languages/cpp/app_templates/tdeconfig35/app.tdevelop +++ b/languages/cpp/app_templates/tdeconfig35/app.tdevelop @@ -17,15 +17,15 @@ - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - - + + src/%{APPNAMELC} debug @@ -61,8 +61,8 @@ -O0 -g3 - - + + @@ -74,8 +74,8 @@ false *.o,*.lo,CVS - - + + ada ada_bugs_gcc @@ -110,8 +110,8 @@ qmake User Guide - - + + libtool @@ -125,16 +125,16 @@ false true - - + + - - + + -f -dP @@ -143,7 +143,7 @@ -u3 -p - + @@ -155,14 +155,14 @@ true - + true 2 - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/tdeconfig35/tdeconfig35.kdevtemplate b/languages/cpp/app_templates/tdeconfig35/tdeconfig35.kdevtemplate new file mode 100644 index 00000000..b9edfb7a --- /dev/null +++ b/languages/cpp/app_templates/tdeconfig35/tdeconfig35.kdevtemplate @@ -0,0 +1,245 @@ +# TDE Config File +[General] +Name=TDEConfig XT for TDE 3.5 +Name[ca]=TDEConfig XT per a TDE 3.5 +Name[de]=TDEConfigXT-Anwendung für TDE 3.5 +Name[el]=Εφαρμογή TDEConfig XT για το TDE 3.5 +Name[es]=TDEConfig XT para TDE 3.5 +Name[et]=TDEConfig XT TDE 3.5 jaoks +Name[fr]=Application TDEConfig XT pour TDE 3.5 +Name[hu]=TDEConfig XT a TDE 3.5-höz +Name[it]=TDEConfig XT per TDE 3.5 +Name[ja]=TDE 3.5 用 TDEConfig XT +Name[nds]=TDEConfig-XT-Programm för TDE 3.5 +Name[nl]=TDEConfig XT voor TDE 3.5 +Name[pl]=Program TDEConfig XT dla TDE 3.5 +Name[pt]=Aplicação do TDEConfig XT para o TDE 3.5 +Name[pt_BR]=Aplicação do TDEConfig XT para o TDE 3.5 +Name[ru]=Приложение TDE 3.5 с TDEConfig XT +Name[sk]=TDEConfig XT pre TDE 3.5 +Name[sr]=TDEConfig XT програм за TDE 3.5 +Name[sr@Latn]=TDEConfig XT program za TDE 3.5 +Name[sv]=TDEConfig XT för TDE 3.5 +Name[zh_TW]=TDE 3.5 的 TDEConfig XT 應用程式 +Category=C++/TDE +Icon=kxt.png +Comment=Generates a simple TDE application with one widget and a configuration dialog compatible with TDE 3.5 only +Comment[ca]=Genera una simple aplicació per al TDE amb un estri i un diàleg de configuració compatible només amb TDE 3.5. +Comment[da]=Genererer et simpelt TDE-program med en kontrol og en indstillingsdialog der kun er kompatibelt med TDE 3.5 +Comment[de]=Erstellt eine einfache TDE-Anwendung für TDE 3.5 mit einem Widget und einem Einstellungsdialog. +Comment[el]=Δημιουργεί μια απλή εφαρμογή TDE με ένα γραφικό συστατικό, ένα διάλογο ρύθμισης συμβατό μόνο με το TDE 3.5 +Comment[en_GB]=Generates a simple TDE application with one widget and a configuration dialogue compatible with TDE 3.5 only +Comment[es]=Genera una sencilla aplicación para TDE con un widget y un diálogo de configuración compatible solo con TDE 3.5 +Comment[et]=Lihtsa TDE rakenduse loomine ühe vidina ja vaid TDE 3.5-ga ühilduva seadistustedialoogiga. +Comment[fr]=Génère une application TDE simple comprenant un seul élément graphique et une boîte de dialogue de configuration compatible avec TDE 3.5 uniquement +Comment[hu]=Létrehoz egy egyszerű TDE-alkalmazást egy grafikus elemmel és egy beállítóablakkal, csak a TDE 3.5-tel kompatibilis +Comment[it]=Genera una semplice applicazione TDE con un elemento grafico e una finestra di configurazione compatibile solo con TDE 3.5 +Comment[ja]=一つのウィジェットと設定ダイアログを含む簡単な TDE アプリケーションを作成します (TDE 3.5 用) +Comment[nds]=Stellt en eenfach TDE-Programm mit een Element un en Instelldialoog op, de bloots mit TDE 3.5 kompatibel is. +Comment[nl]=Genereert een eenvoudige TDE-toepassing met één widget en een configuratiedialoog die alleen met TDE 3.5 compatible is +Comment[pl]=Generuje prosty program TDE z jednym widżetem i oknem konfiguracyjnym zgodnym z TDE 3.5 +Comment[pt]=Gera uma aplicação simples do TDE com uma janela principal e outra para configuração, apenas para o TDE 3.5 +Comment[pt_BR]=Gera uma aplicação simples do TDE com uma janela principal e outra para configuração, apenas para o TDE 3.5 +Comment[ru]=Создание простого приложения TDE с одним виджетом и диалогом конфигурации, совместимое только с TDE 3.5. +Comment[sk]=Vygeneruje jednoduchú TDE aplikáciu s jedným oknom a konfiguračným dialógom kompatibilnú len s TDE 3.5 +Comment[sr]=Прави једноставан TDE програм са једном контролом и дијалогом за подешавање, компатибилан само са TDE-ом 3.5 +Comment[sr@Latn]=Pravi jednostavan TDE program sa jednom kontrolom i dijalogom za podešavanje, kompatibilan samo sa TDE-om 3.5 +Comment[sv]=Skapar ett enkelt TDE-program med en grafisk komponent och en inställningsdialogruta, som bara fungerar med TDE 3.5 +Comment[zh_TW]=產生一個簡單的 TDE 3.5 上的應用程式,內含一個元件與一個設定對話框。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp,%{dest}/README +Archive=tdeconfig35.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/tde-app.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[FILE10] +Type=install +Source=%{tdevelop}/template-common/hi16-app-app.png +Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png + +[FILE11] +Type=install +Source=%{tdevelop}/template-common/hi32-app-app.png +Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE12] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE13] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE14] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE15] +Type=install +Source=%{src}/app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE16] +Type=install +Source=%{src}/app.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE17] +Type=install +EscapeXML=true +Source=%{src}/appview_base.ui +Dest=%{dest}/src/%{APPNAMELC}view_base.ui + +[FILE18] +Type=install +Source=%{src}/appview.cpp +Dest=%{dest}/src/%{APPNAMELC}view.cpp + +[FILE19] +Type=install +Source=%{src}/appview.h +Dest=%{dest}/src/%{APPNAMELC}view.h + +[FILE20] +Type=install +EscapeXML=true +Source=%{src}/prefs-base.ui +Dest=%{dest}/src/prefs-base.ui + +[FILE21] +Type=install +Source=%{src}/prefs.cpp +Dest=%{dest}/src/prefs.cpp + +[FILE22] +Type=install +Source=%{src}/prefs.h +Dest=%{dest}/src/prefs.h + +[FILE23] +Type=install +Source=%{src}/main.cpp +Dest=%{dest}/src/main.cpp + +[FILE24] +Type=install +EscapeXML=true +Source=%{src}/appui.rc +Dest=%{dest}/src/%{APPNAMELC}ui.rc + +[FILE25] +Type=install +Source=%{src}/README +Dest=%{dest}/README + +[FILE26] +Type=install +Source=%{src}/app.kcfg +Dest=%{dest}/src/%{APPNAMELC}.kcfg + +[FILE27] +Type=install +Source=%{src}/settings.kcfgc +Dest=%{dest}/src/settings.kcfgc + +[FILE28] +Type=install +Source=%{src}/src-configure.in.in +Dest=%{dest}/configure.in.in + +[MSG] +Type=message +Comment=A TDE 3.5 TDEConfig XT application was created in %{dest} +Comment[ca]=Una aplicació TDEConfig XT per al TDE ha estat creada en %{dest} +Comment[da]=Et TDE 3.5 TDEConfig XT-program blev oprettet i %{dest} +Comment[de]=Eine TDEConfig-XT-Anwendung für TDE 3.5 wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή TDEConfig XT του TDE 3.5 δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación TDEConfig XT para TDE 3.5 ha sido creada en %{dest} +Comment[et]=TDE 3.5 TDEConfig XT rakendus loodi asukohta %{dest} +Comment[fr]=Une application TDEConfig XT pour TDE 3.5 a été créée dans %{dest} +Comment[hu]=Létrejött egy TDEConfig XT-alapú TDE 3.5-alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione TDEConfig XT per TDE 3.5 in %{dest} +Comment[ja]=TDE 3.5 用 TDEConfig XT アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en TDEConfig-XT-Programm för TDE 3.5 opstellt +Comment[nl]=Een TDE 3.5 TDEConfig XT-toepassing is aangemaakt in %{dest} +Comment[pl]=Program TDEConfig XT dla TDE 3.5 został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação do TDEConfig XT para o TDE 3.5 em %{dest} +Comment[pt_BR]=Foi criada uma aplicação do TDEConfig XT para o TDE 3.5 em %{dest} +Comment[ru]=Приложение TDE с TDEConfig XT создано в %{dest} +Comment[sk]=TDEConfig XT pre TDE 3.5 bola vytvorená v %{dest} +Comment[sr]=TDEConfig XT програм за TDE 3.5 направљен је у %{dest} +Comment[sr@Latn]=TDEConfig XT program za TDE 3.5 napravljen je u %{dest} +Comment[sv]=Ett TDE 3.5 TDEConfig XT-program skapades i %{dest} +Comment[zh_TW]=一個 TDE 3.5 上的 TDEConfig XT 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/tdeconfig35/tdeconfig35.tdevtemplate b/languages/cpp/app_templates/tdeconfig35/tdeconfig35.tdevtemplate deleted file mode 100644 index 485b9eb9..00000000 --- a/languages/cpp/app_templates/tdeconfig35/tdeconfig35.tdevtemplate +++ /dev/null @@ -1,245 +0,0 @@ -# TDE Config File -[General] -Name=TDEConfig XT for TDE 3.5 -Name[ca]=TDEConfig XT per a TDE 3.5 -Name[de]=TDEConfigXT-Anwendung für TDE 3.5 -Name[el]=Εφαρμογή TDEConfig XT για το TDE 3.5 -Name[es]=TDEConfig XT para TDE 3.5 -Name[et]=TDEConfig XT TDE 3.5 jaoks -Name[fr]=Application TDEConfig XT pour TDE 3.5 -Name[hu]=TDEConfig XT a TDE 3.5-höz -Name[it]=TDEConfig XT per TDE 3.5 -Name[ja]=TDE 3.5 用 TDEConfig XT -Name[nds]=TDEConfig-XT-Programm för TDE 3.5 -Name[nl]=TDEConfig XT voor TDE 3.5 -Name[pl]=Program TDEConfig XT dla TDE 3.5 -Name[pt]=Aplicação do TDEConfig XT para o TDE 3.5 -Name[pt_BR]=Aplicação do TDEConfig XT para o TDE 3.5 -Name[ru]=Приложение TDE 3.5 с TDEConfig XT -Name[sk]=TDEConfig XT pre TDE 3.5 -Name[sr]=TDEConfig XT програм за TDE 3.5 -Name[sr@Latn]=TDEConfig XT program za TDE 3.5 -Name[sv]=TDEConfig XT för TDE 3.5 -Name[zh_TW]=TDE 3.5 的 TDEConfig XT 應用程式 -Category=C++/TDE -Icon=kxt.png -Comment=Generates a simple TDE application with one widget and a configuration dialog compatible with TDE 3.5 only -Comment[ca]=Genera una simple aplicació per al TDE amb un estri i un diàleg de configuració compatible només amb TDE 3.5. -Comment[da]=Genererer et simpelt TDE-program med en kontrol og en indstillingsdialog der kun er kompatibelt med TDE 3.5 -Comment[de]=Erstellt eine einfache TDE-Anwendung für TDE 3.5 mit einem Widget und einem Einstellungsdialog. -Comment[el]=Δημιουργεί μια απλή εφαρμογή TDE με ένα γραφικό συστατικό, ένα διάλογο ρύθμισης συμβατό μόνο με το TDE 3.5 -Comment[en_GB]=Generates a simple TDE application with one widget and a configuration dialogue compatible with TDE 3.5 only -Comment[es]=Genera una sencilla aplicación para TDE con un widget y un diálogo de configuración compatible solo con TDE 3.5 -Comment[et]=Lihtsa TDE rakenduse loomine ühe vidina ja vaid TDE 3.5-ga ühilduva seadistustedialoogiga. -Comment[fr]=Génère une application TDE simple comprenant un seul élément graphique et une boîte de dialogue de configuration compatible avec TDE 3.5 uniquement -Comment[hu]=Létrehoz egy egyszerű TDE-alkalmazást egy grafikus elemmel és egy beállítóablakkal, csak a TDE 3.5-tel kompatibilis -Comment[it]=Genera una semplice applicazione TDE con un elemento grafico e una finestra di configurazione compatibile solo con TDE 3.5 -Comment[ja]=一つのウィジェットと設定ダイアログを含む簡単な TDE アプリケーションを作成します (TDE 3.5 用) -Comment[nds]=Stellt en eenfach TDE-Programm mit een Element un en Instelldialoog op, de bloots mit TDE 3.5 kompatibel is. -Comment[nl]=Genereert een eenvoudige TDE-toepassing met één widget en een configuratiedialoog die alleen met TDE 3.5 compatible is -Comment[pl]=Generuje prosty program TDE z jednym widżetem i oknem konfiguracyjnym zgodnym z TDE 3.5 -Comment[pt]=Gera uma aplicação simples do TDE com uma janela principal e outra para configuração, apenas para o TDE 3.5 -Comment[pt_BR]=Gera uma aplicação simples do TDE com uma janela principal e outra para configuração, apenas para o TDE 3.5 -Comment[ru]=Создание простого приложения TDE с одним виджетом и диалогом конфигурации, совместимое только с TDE 3.5. -Comment[sk]=Vygeneruje jednoduchú TDE aplikáciu s jedným oknom a konfiguračným dialógom kompatibilnú len s TDE 3.5 -Comment[sr]=Прави једноставан TDE програм са једном контролом и дијалогом за подешавање, компатибилан само са TDE-ом 3.5 -Comment[sr@Latn]=Pravi jednostavan TDE program sa jednom kontrolom i dijalogom za podešavanje, kompatibilan samo sa TDE-om 3.5 -Comment[sv]=Skapar ett enkelt TDE-program med en grafisk komponent och en inställningsdialogruta, som bara fungerar med TDE 3.5 -Comment[zh_TW]=產生一個簡單的 TDE 3.5 上的應用程式,內含一個元件與一個設定對話框。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp,%{dest}/README -Archive=tdeconfig35.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/tde-app.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[FILE10] -Type=install -Source=%{tdevelop}/template-common/hi16-app-app.png -Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png - -[FILE11] -Type=install -Source=%{tdevelop}/template-common/hi32-app-app.png -Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE12] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE13] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE14] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE15] -Type=install -Source=%{src}/app.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE16] -Type=install -Source=%{src}/app.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE17] -Type=install -EscapeXML=true -Source=%{src}/appview_base.ui -Dest=%{dest}/src/%{APPNAMELC}view_base.ui - -[FILE18] -Type=install -Source=%{src}/appview.cpp -Dest=%{dest}/src/%{APPNAMELC}view.cpp - -[FILE19] -Type=install -Source=%{src}/appview.h -Dest=%{dest}/src/%{APPNAMELC}view.h - -[FILE20] -Type=install -EscapeXML=true -Source=%{src}/prefs-base.ui -Dest=%{dest}/src/prefs-base.ui - -[FILE21] -Type=install -Source=%{src}/prefs.cpp -Dest=%{dest}/src/prefs.cpp - -[FILE22] -Type=install -Source=%{src}/prefs.h -Dest=%{dest}/src/prefs.h - -[FILE23] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/main.cpp - -[FILE24] -Type=install -EscapeXML=true -Source=%{src}/appui.rc -Dest=%{dest}/src/%{APPNAMELC}ui.rc - -[FILE25] -Type=install -Source=%{src}/README -Dest=%{dest}/README - -[FILE26] -Type=install -Source=%{src}/app.kcfg -Dest=%{dest}/src/%{APPNAMELC}.kcfg - -[FILE27] -Type=install -Source=%{src}/settings.kcfgc -Dest=%{dest}/src/settings.kcfgc - -[FILE28] -Type=install -Source=%{src}/src-configure.in.in -Dest=%{dest}/configure.in.in - -[MSG] -Type=message -Comment=A TDE 3.5 TDEConfig XT application was created in %{dest} -Comment[ca]=Una aplicació TDEConfig XT per al TDE ha estat creada en %{dest} -Comment[da]=Et TDE 3.5 TDEConfig XT-program blev oprettet i %{dest} -Comment[de]=Eine TDEConfig-XT-Anwendung für TDE 3.5 wurde in %{dest} erstellt. -Comment[el]=Μια εφαρμογή TDEConfig XT του TDE 3.5 δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación TDEConfig XT para TDE 3.5 ha sido creada en %{dest} -Comment[et]=TDE 3.5 TDEConfig XT rakendus loodi asukohta %{dest} -Comment[fr]=Une application TDEConfig XT pour TDE 3.5 a été créée dans %{dest} -Comment[hu]=Létrejött egy TDEConfig XT-alapú TDE 3.5-alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione TDEConfig XT per TDE 3.5 in %{dest} -Comment[ja]=TDE 3.5 用 TDEConfig XT アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en TDEConfig-XT-Programm för TDE 3.5 opstellt -Comment[nl]=Een TDE 3.5 TDEConfig XT-toepassing is aangemaakt in %{dest} -Comment[pl]=Program TDEConfig XT dla TDE 3.5 został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação do TDEConfig XT para o TDE 3.5 em %{dest} -Comment[pt_BR]=Foi criada uma aplicação do TDEConfig XT para o TDE 3.5 em %{dest} -Comment[ru]=Приложение TDE с TDEConfig XT создано в %{dest} -Comment[sk]=TDEConfig XT pre TDE 3.5 bola vytvorená v %{dest} -Comment[sr]=TDEConfig XT програм за TDE 3.5 направљен је у %{dest} -Comment[sr@Latn]=TDEConfig XT program za TDE 3.5 napravljen je u %{dest} -Comment[sv]=Ett TDE 3.5 TDEConfig XT-program skapades i %{dest} -Comment[zh_TW]=一個 TDE 3.5 上的 TDEConfig XT 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/tdecpp.appwizard b/languages/cpp/app_templates/tdecpp.appwizard deleted file mode 100644 index c4f7b2ac..00000000 --- a/languages/cpp/app_templates/tdecpp.appwizard +++ /dev/null @@ -1,2 +0,0 @@ -[General] -List=kdedcop,tdeioslave,kxt,tdevlang,kmake,kapp,tdeconfig35,tdevlang,tdevpart,kateplugin,tdevpart2,kopart,noatunui,kateplugin2,tdefileplugin,konqnavpanel,noatunvisual,dcopservice,khello,kpartapp,khello2,kpartplugin,tdecmodule,kicker,tdescreensaver,kscons_kxt,kscons_tdemdi diff --git a/languages/cpp/app_templates/tdedcop/CMakeLists.txt b/languages/cpp/app_templates/tdedcop/CMakeLists.txt deleted file mode 100644 index f5556887..00000000 --- a/languages/cpp/app_templates/tdedcop/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -################################################# -# -# (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( tdedcop.tar.gz ALL - COMMAND tar zcf tdedcop.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} - app.cpp app.h app_iface.h app.tdevelop main.cpp - mainclass.cpp mainclass.h tdedcop.png src-Makefile.am - subdirs -) - - -install( FILES - ${CMAKE_CURRENT_BINARY_DIR}/tdedcop.tar.gz tdedcop.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) - - -install( FILES - tdedcop.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) diff --git a/languages/cpp/app_templates/tdedcop/Makefile.am b/languages/cpp/app_templates/tdedcop/Makefile.am deleted file mode 100644 index 8a21a2bd..00000000 --- a/languages/cpp/app_templates/tdedcop/Makefile.am +++ /dev/null @@ -1,18 +0,0 @@ -dataFiles = app.cpp app.h app_iface.h app.tdevelop main.cpp mainclass.cpp \ - mainclass.h tdedcop.png src-Makefile.am subdirs - -templateName = tdedcop - -### no need to change below: -template_DATA = $(templateName).tdevtemplate -templatedir = ${appwizarddatadir}/templates - -appwizarddatadir = ${kde_datadir}/tdevappwizard -$(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/tdedcop/app.tdevelop b/languages/cpp/app_templates/tdedcop/app.tdevelop deleted file mode 100644 index c37bd28d..00000000 --- a/languages/cpp/app_templates/tdedcop/app.tdevelop +++ /dev/null @@ -1,116 +0,0 @@ - - - - %{AUTHOR} - %{EMAIL} - %{VERSION} - KDevTDEAutoProject - C++ - - C++ - Code - Qt - TDE - DCOP - - - - - 3 - true - 3 - EmbeddedTDevDesigner - - - - - - src/%{APPNAMELC} - debug - - - 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/tdedcop/tdedcop.tdevtemplate b/languages/cpp/app_templates/tdedcop/tdedcop.tdevtemplate deleted file mode 100644 index 628fadd3..00000000 --- a/languages/cpp/app_templates/tdedcop/tdedcop.tdevtemplate +++ /dev/null @@ -1,227 +0,0 @@ -# TDE Config File -[General] -Name=Simple DCOP server -Name[ca]=Simple servidor DCOP -Name[da]=Simpel DCOP-server -Name[de]=Einfacher DCOP-Server -Name[el]=Απλός εξυπηρετητής DCOP -Name[es]=Sencillo servidor DCOP -Name[et]=Lihtne DCOP-server -Name[eu]=DCOP zerbitzari sinple bat -Name[fa]=کارساز سادۀ DCOP -Name[fr]=Serveur DCOP simple -Name[ga]=Freastalaí simplí DCOP -Name[gl]=Servidor sinxelo DCOP -Name[hu]=Egyszerű DCOP-kiszolgáló -Name[it]=Semplice server DCOP -Name[ja]=簡単な DCOP サーバ -Name[nds]=Eenfach DCOP-Server -Name[ne]=साधारण DCOP सर्भर -Name[nl]=Eenvoudige DCOP-server -Name[pl]=Prosty serwer DCOP -Name[pt]=Servidor de DCOP simples -Name[pt_BR]=Servidor de DCOP simples -Name[ru]=Сервер DCOP -Name[sk]=Jednoduchý DCOP server -Name[sl]=Preprost strežnik DCOP -Name[sr]=Једноставан DCOP сервер -Name[sr@Latn]=Jednostavan DCOP server -Name[sv]=Enkel DCOP-server -Name[tr]=Basit DCOP Sunucusu -Name[zh_CN]=简单的 DCOP 服务器 -Name[zh_TW]=簡單的 DCOP 伺服器 -Icon=kdedcop.png -Category=C++/TDE -Comment=Generates a basic TDE DCOP server. This is an ideal starting point for a DCOP server that does not require a GUI interface. -Comment[ca]=Genera un servidor bàsic DCOP per al TDE. Aquest és un idoni punt de partida per a un servidor DCOP que no requereixi d'una IGU. -Comment[da]=Genererer en basal TDE DCOP-server. Dette er et ideelt startpunkt for en DCOP-server der ikke kræver en GUI-grænseflade. -Comment[de]=Erstellt einen einfachen TDE-DCOP-Server. Dies ist ein idealer Ausgangspunkt für einen DCOP-Server, der keine Benutzeroberfläche erfordert. -Comment[el]=Δημιουργεί ένα βασικό εξυπηρετητή TDE DCOP. Αυτό είναι ένα ιδανικό σημείο αρχής για έναν εξυπηρετητή DCOP ο οποίος δε χρειάζεται ένα γραφικό περιβάλλον. -Comment[es]=Genera un servidor básico DCOP para TDE. Es un punto de comienzo ideal para un servidor DCOP que no requiera una interfaz gráfica. -Comment[et]=Lihtsa TDE DCOP-serveri loomine. See on ideaalne algus DCOP-serverile, mis ei eelda graafilist kasutajaliidest. -Comment[eu]=DCOP zerbitzari sinple bat sortzen du. Hau GUI interfazerik behar ez duen DCOP zerbitzari baterako hasierako puntu aparta da. -Comment[fa]=یک کارساز پایۀ TDE DCOP تولید می‌کند. این یک نقطۀ شروع دلخواه برای یک کارساز DCOP است، که نیازی به یک واسط ونک ندارد. -Comment[fr]=Génère un serveur DCOP TDE de base. C'est un bon point de départ pour un serveur DCOP qui ne requiert pas d'interface graphique. -Comment[gl]=Xera un servidor básico DCOP para TDE. Este é un punto de comezo ideal para un servidor DCOP que non require unha interface GUI. -Comment[hu]=Létrehoz egy egyszerű TDE DCOP-os kiszolgálót. Jó kiindulópont grafikus felület nélküli DCOP-kiszolgáló készítéséhez. -Comment[it]=Genera un semplice server DCOP per TDE. È un punto di partenza ideale per un server DCOP che non richiede un'interfaccia GUI. -Comment[ja]=基本的な TDE DCOP サーバを作成します。GUI を必要としない DCOP サーバの理想的な開始点です。 -Comment[nds]=Stellt en eenfach DCOP-Server op. Dat is en goot Anfang för en DCOP-Server ahn Böversiet. -Comment[ne]=आधारभूत TDE DCOP सर्भर उत्पन्न गर्दछ । यो DCOP सर्भरका लागि उपयुक्त सुरुआत बिन्दु हो जसलाई जी यू आई इन्टरफेस आवश्यक पर्दैन । -Comment[nl]=Genereert een basis TDE DCOP-server. Dit is een ideaal startpunt voor een DCOP-server die geen GUI-interface vereist. -Comment[pl]=Generuje prosty serwer TDE DCOP. Dobry punkt startu dla serwera DCOP, który nie potrzebuje interfejsu graficznego. -Comment[pt]=Gera um servidor básico de DCOP para o TDE. Este é um ponto de partida ideal para um servidor de DCOP que não necessite de uma interface gráfica. -Comment[pt_BR]=Gera um servidor básico de DCOP para o TDE. Este é um ponto de partida ideal para um servidor de DCOP que não necessite de uma interface gráfica. -Comment[ru]=Создание простого сервера DCOP. Идеальная стартовая точка для разработки сервера DCOP без графического интерфейса. -Comment[sk]=Vygeneruje základný TDE DCOP server. Toto je ideálny štartovací bod pre DCOP server, ktorý nepotrebuje GUI rozhranie. -Comment[sl]=Ustvari osnovni strežnik DCOP za TDE. To je idealno začetno mesto za strežnik DCOP, ki ne potrebuje grafičnega vmesnika. -Comment[sr]=Прави основан TDE DCOP сервер. Ово је идеална почетна тачка за DCOP сервер који не захтева GUI. -Comment[sr@Latn]=Pravi osnovan TDE DCOP server. Ovo je idealna početna tačka za DCOP server koji ne zahteva GUI. -Comment[sv]=Skapar en grundläggande TDE DCOP-server. Detta är en idealisk utgångspunkt för en DCOP-server som inte kräver ett grafiskt användargränssnitt. -Comment[tr]=Basit bir TDE DCOP sunucusu yaratır. Bu grafik arayüz gerektirmeyen bir DCOP sunucusuna başlamak için uygun bir noktadır. -Comment[zh_CN]=生成简单的 TDE DCOP 服务器。这是不需要图形界面的 DCOP 服务器的良好开端。 -Comment[zh_TW]=產生一個基本的 TDE DCOP 伺服器。這個是開發一個不需使用者介面的 DCOP 伺服器的一個好起點。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/main.cpp -Archive=kdedcop.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/tde-app.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[FILE10] -Type=install -Source=%{tdevelop}/template-common/hi16-app-app.png -Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png -Process=false - -[FILE11] -Type=install -Source=%{tdevelop}/template-common/hi32-app-app.png -Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png -Process=false - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE12] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE13] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE14] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE15] -Type=install -Source=%{src}/app.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE16] -Type=install -Source=%{src}/app.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE17] -Type=install -Source=%{src}/mainclass.cpp -Dest=%{dest}/src/mainclass.cpp - -[FILE18] -Type=install -Source=%{src}/mainclass.h -Dest=%{dest}/src/mainclass.h - -[FILE19] -Type=install -Source=%{src}/app_iface.h -Dest=%{dest}/src/%{APPNAMELC}_iface.h - -[FILE20] -Type=install -Source=%{src}/main.cpp -Dest=%{dest}/src/main.cpp - -[MSG] -Type=message -Comment=A simple DCOP server was created in %{dest} -Comment[ca]=Un simple servidor DCOP ha estat creat en %{dest} -Comment[da]=En simpel DCOP-server blev oprettet i %{dest} -Comment[de]=Ein einfacher DCOP-Server wurde in %{dest} erstellt. -Comment[el]=Ένας απλός εξυπηρετητής DCOP δημιουργήθηκε στο %{dest} -Comment[es]=Un sencillo servidor DCOP ha sido creado en %{dest} -Comment[et]=Lihtne DCOP-server loodi asukohta %{dest} -Comment[eu]=DCOP zerbitzari sinple bat sortu da hemen: %{dest} -Comment[fa]=یک کارساز سادۀ DCOP در %{dest} ایجاد شد -Comment[fr]=Un serveur DCOP simple a été créé dans %{dest} -Comment[ga]=Cruthaíodh freastalaí simplí DCOP i %{dest} -Comment[gl]=Creouse un servidor DCOP sinxelo en %{dest} -Comment[hu]=Létrejött egy egyszerű DCOP-kiszolgáló itt: %{dest} -Comment[it]=È stato creato un semplice server DCOP in %{dest} -Comment[ja]=簡単な DCOP サーバを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en eenfach DCOP-Server opstellt -Comment[ne]=साधारण DCOP सर्भर %{dest} मा सिर्जना गरियो -Comment[nl]=Een eenvoudige DCOP-server is aangemaakt in %{dest} -Comment[pl]=Prosty serwer DCOP został utworzony w %{dest} -Comment[pt]=Foi criado um servidor de DCOP simples em %{dest} -Comment[pt_BR]=Foi criado um servidor de DCOP simples em %{dest} -Comment[ru]=Простой сервер DCOP создан в %{dest} -Comment[sk]=Jednoduchý DCOP server bol vytvorený v %{dest} -Comment[sl]=Preprost strežnik DCOP je bil ustvarjen v %{dest} -Comment[sr]=Једноставан DCOP сервер направљен је у %{dest} -Comment[sr@Latn]=Jednostavan DCOP server napravljen je u %{dest} -Comment[sv]=En enkel DCOP-server skapades i %{dest} -Comment[tr]=Basit bir DCOP sunucusu %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了简单的 DCOP 服务器 -Comment[zh_TW]=一個簡單的 DCOP 伺服器已建立於 %{dest} diff --git a/languages/cpp/app_templates/tdefileplugin/CMakeLists.txt b/languages/cpp/app_templates/tdefileplugin/CMakeLists.txt index d6998c33..5462742c 100644 --- a/languages/cpp/app_templates/tdefileplugin/CMakeLists.txt +++ b/languages/cpp/app_templates/tdefileplugin/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( tdefileplugin.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/tdefileplugin.tar.gz tdefileplugin.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - tdefileplugin.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + tdefileplugin.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/tdefileplugin/Makefile.am b/languages/cpp/app_templates/tdefileplugin/Makefile.am index 2896e774..019d2d7c 100644 --- a/languages/cpp/app_templates/tdefileplugin/Makefile.am +++ b/languages/cpp/app_templates/tdefileplugin/Makefile.am @@ -4,10 +4,10 @@ dataFiles = README.devel tdefile_plugin.cpp tdefile_plugin.desktop \ templateName = tdefileplugin ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/tdefileplugin/plugin.tdevelop b/languages/cpp/app_templates/tdefileplugin/plugin.tdevelop index cb6caa43..f09030c1 100644 --- a/languages/cpp/app_templates/tdefileplugin/plugin.tdevelop +++ b/languages/cpp/app_templates/tdefileplugin/plugin.tdevelop @@ -13,16 +13,16 @@ TDE - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + src/tdefile_%{APPNAMELC}.la debug @@ -44,8 +44,8 @@ -O0 -g3 - - + + @@ -53,8 +53,8 @@ - - + + ada ada_bugs_gcc @@ -91,24 +91,24 @@ qmake User Guide - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/tdefileplugin/tdefileplugin.kdevtemplate b/languages/cpp/app_templates/tdefileplugin/tdefileplugin.kdevtemplate new file mode 100644 index 00000000..2e53acc7 --- /dev/null +++ b/languages/cpp/app_templates/tdefileplugin/tdefileplugin.kdevtemplate @@ -0,0 +1,166 @@ +# TDE Config File +[General] +Name=KFile plugin +Name[br]=Lugent KFile +Name[ca]=Connector KFile +Name[de]=KFile-Modul +Name[el]=Πρόσθετο KFile +Name[es]=Complemento para KFile +Name[et]=KFile'i plugin +Name[eu]=KFile plugin-a +Name[fa]=وصلۀ KFile +Name[fr]=Module externe KFile +Name[ga]=Breiseán KFile +Name[gl]=Extensión para KFile +Name[hu]=KFile-bővítőmodul +Name[it]=Plugin KFile +Name[ja]=KFile プラグイン +Name[nds]=KFile-Moduul +Name[ne]=केडीई फाइल प्लगइन +Name[nl]=KFile-plugin +Name[pl]=Wtyczka do KFile +Name[pt]='Plugin' do KFile +Name[pt_BR]='Plugin' do KFile +Name[ru]=Модуль KFile +Name[sk]=KFile modul +Name[sl]=Vstavek za KFile +Name[sr]=Прикључак за KFile +Name[sr@Latn]=Priključak za KFile +Name[sv]=KFile-insticksprogram +Name[tr]=KFile Eklentisi +Name[zh_CN]=KFile 插件 +Name[zh_TW]=KFile 外掛程式 +Icon=tdefileplugin.png +Category=C++/TDE +Comment=Generates a KFile plugin for konqueror to display meta information. +Comment[ca]=Genera un connector KFile per al konqueror per a mostrar meta informació. +Comment[da]=Genererer et KFile-plugin for konqueror til at vise meta-information. +Comment[de]=Erstellt ein KFile-Modul für Konqueror zur Anzeige von Meta-Daten. +Comment[el]=Δημιουργεί ένα πρόσθετο KFile για την εμφάνιση μεταπληροφοριών στον konqueror. +Comment[es]=Genera un complemento de KFile para Konqueror que muestra metainformación. +Comment[et]=Konquerori KFile'i plugina loomine, mis näitab metainfot. +Comment[eu]=Meta-informazioa bistaratzeko Konqueror-en KFile plugin bat sortzen du. +Comment[fa]=یک وصلۀ KFile برای konqueror جهت نمایش فرااطلاعات تولید می‌کند. +Comment[fr]=Génère un module externe KFile pour que Konqueror affiche des méta-informations. +Comment[gl]=Xera unha extensión para KFile para permitir a konqueror mostrar metainformación. +Comment[hu]=Létrehoz egy KFile-bővítőmodult, mellyel a Konquerorban dokumentumjellemzőket lehet megjeleníteni. +Comment[it]=Genera un plugin KFile per Konqueror per mostrare meta informazioni. +Comment[nds]=Stellt en KFile-Moduul för Konqueror op, dat Metadaten wiest. +Comment[ne]=मेटा सूचना देखाउन कन्क्वेररका लागि केडीई फाइल प्लगइन उत्पन्न गर्दछ । +Comment[nl]=Genereert een KFile-plugin voor konqueror voor het weergeven van meta-informatie. +Comment[pl]=Generuje wtyczkę KFile dla Konquerora do wyświetlania informacji meta. +Comment[pt]=Gera um 'plugin' do KFile para o Konqueror poder mostrar meta-informações. +Comment[pt_BR]=Gera um 'plugin' do KFile para o Konqueror poder mostrar meta-informações. +Comment[ru]=Создание модуля KFile для показа метаданных в Konqueror. +Comment[sk]=Vygeneruje KFile modul pre konqueror na zobrazenie meta informácií. +Comment[sr]=Прави прикључак за KFile за приказ метаинформација у Konqueror-у. +Comment[sr@Latn]=Pravi priključak za KFile za prikaz metainformacija u Konqueror-u. +Comment[sv]=Skapar ett KFile-insticksprogram till Konqueror för att visa metainformation. +Comment[tr]=Meta bilgisini göstermesi için Konqueror'a bir KFile eklentisi yaratır. +Comment[zh_CN]=生成一个可显示元信息的 Konqueror KFile 插件。 +Comment[zh_TW]=產生一個 Konqueror 的 KFile 外掛程式,顯示中繼資訊 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=${dest}/README.devel,%{dest}/src/tdefile_%{APPNAMELC}.cpp +Archive=tdefileplugin.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/plugin.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE10] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE11] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE12] +Type=install +Source=%{src}/tdefile_plugin.desktop +Dest=%{dest}/src/tdefile_%{APPNAMELC}.desktop + +[FILE13] +Type=install +Source=%{src}/tdefile_plugin.cpp +Dest=%{dest}/src/tdefile_%{APPNAMELC}.cpp + +[FILE14] +Type=install +Source=%{src}/tdefile_plugin.h +Dest=%{dest}/src/tdefile_%{APPNAMELC}.h + +[FILE15] +Type=install +Source=%{src}/README.devel +Dest=%{dest}/README.devel + diff --git a/languages/cpp/app_templates/tdefileplugin/tdefileplugin.tdevtemplate b/languages/cpp/app_templates/tdefileplugin/tdefileplugin.tdevtemplate deleted file mode 100644 index 4ef025de..00000000 --- a/languages/cpp/app_templates/tdefileplugin/tdefileplugin.tdevtemplate +++ /dev/null @@ -1,166 +0,0 @@ -# TDE Config File -[General] -Name=KFile plugin -Name[br]=Lugent KFile -Name[ca]=Connector KFile -Name[de]=KFile-Modul -Name[el]=Πρόσθετο KFile -Name[es]=Complemento para KFile -Name[et]=KFile'i plugin -Name[eu]=KFile plugin-a -Name[fa]=وصلۀ KFile -Name[fr]=Module externe KFile -Name[ga]=Breiseán KFile -Name[gl]=Extensión para KFile -Name[hu]=KFile-bővítőmodul -Name[it]=Plugin KFile -Name[ja]=KFile プラグイン -Name[nds]=KFile-Moduul -Name[ne]=केडीई फाइल प्लगइन -Name[nl]=KFile-plugin -Name[pl]=Wtyczka do KFile -Name[pt]='Plugin' do KFile -Name[pt_BR]='Plugin' do KFile -Name[ru]=Модуль KFile -Name[sk]=KFile modul -Name[sl]=Vstavek za KFile -Name[sr]=Прикључак за KFile -Name[sr@Latn]=Priključak za KFile -Name[sv]=KFile-insticksprogram -Name[tr]=KFile Eklentisi -Name[zh_CN]=KFile 插件 -Name[zh_TW]=KFile 外掛程式 -Icon=tdefileplugin.png -Category=C++/TDE -Comment=Generates a KFile plugin for konqueror to display meta information. -Comment[ca]=Genera un connector KFile per al konqueror per a mostrar meta informació. -Comment[da]=Genererer et KFile-plugin for konqueror til at vise meta-information. -Comment[de]=Erstellt ein KFile-Modul für Konqueror zur Anzeige von Meta-Daten. -Comment[el]=Δημιουργεί ένα πρόσθετο KFile για την εμφάνιση μεταπληροφοριών στον konqueror. -Comment[es]=Genera un complemento de KFile para Konqueror que muestra metainformación. -Comment[et]=Konquerori KFile'i plugina loomine, mis näitab metainfot. -Comment[eu]=Meta-informazioa bistaratzeko Konqueror-en KFile plugin bat sortzen du. -Comment[fa]=یک وصلۀ KFile برای konqueror جهت نمایش فرااطلاعات تولید می‌کند. -Comment[fr]=Génère un module externe KFile pour que Konqueror affiche des méta-informations. -Comment[gl]=Xera unha extensión para KFile para permitir a konqueror mostrar metainformación. -Comment[hu]=Létrehoz egy KFile-bővítőmodult, mellyel a Konquerorban dokumentumjellemzőket lehet megjeleníteni. -Comment[it]=Genera un plugin KFile per Konqueror per mostrare meta informazioni. -Comment[nds]=Stellt en KFile-Moduul för Konqueror op, dat Metadaten wiest. -Comment[ne]=मेटा सूचना देखाउन कन्क्वेररका लागि केडीई फाइल प्लगइन उत्पन्न गर्दछ । -Comment[nl]=Genereert een KFile-plugin voor konqueror voor het weergeven van meta-informatie. -Comment[pl]=Generuje wtyczkę KFile dla Konquerora do wyświetlania informacji meta. -Comment[pt]=Gera um 'plugin' do KFile para o Konqueror poder mostrar meta-informações. -Comment[pt_BR]=Gera um 'plugin' do KFile para o Konqueror poder mostrar meta-informações. -Comment[ru]=Создание модуля KFile для показа метаданных в Konqueror. -Comment[sk]=Vygeneruje KFile modul pre konqueror na zobrazenie meta informácií. -Comment[sr]=Прави прикључак за KFile за приказ метаинформација у Konqueror-у. -Comment[sr@Latn]=Pravi priključak za KFile za prikaz metainformacija u Konqueror-u. -Comment[sv]=Skapar ett KFile-insticksprogram till Konqueror för att visa metainformation. -Comment[tr]=Meta bilgisini göstermesi için Konqueror'a bir KFile eklentisi yaratır. -Comment[zh_CN]=生成一个可显示元信息的 Konqueror KFile 插件。 -Comment[zh_TW]=產生一個 Konqueror 的 KFile 外掛程式,顯示中繼資訊 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=${dest}/README.devel,%{dest}/src/tdefile_%{APPNAMELC}.cpp -Archive=tdefileplugin.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/plugin.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE10] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE11] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE12] -Type=install -Source=%{src}/tdefile_plugin.desktop -Dest=%{dest}/src/tdefile_%{APPNAMELC}.desktop - -[FILE13] -Type=install -Source=%{src}/tdefile_plugin.cpp -Dest=%{dest}/src/tdefile_%{APPNAMELC}.cpp - -[FILE14] -Type=install -Source=%{src}/tdefile_plugin.h -Dest=%{dest}/src/tdefile_%{APPNAMELC}.h - -[FILE15] -Type=install -Source=%{src}/README.devel -Dest=%{dest}/README.devel - diff --git a/languages/cpp/app_templates/tdeioslave/CMakeLists.txt b/languages/cpp/app_templates/tdeioslave/CMakeLists.txt index 730f65e2..584bdc19 100644 --- a/languages/cpp/app_templates/tdeioslave/CMakeLists.txt +++ b/languages/cpp/app_templates/tdeioslave/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( tdeioslave.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/tdeioslave.tar.gz tdeioslave.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - tdeioslave.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + tdeioslave.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/tdeioslave/Makefile.am b/languages/cpp/app_templates/tdeioslave/Makefile.am index 003040b4..bee7ddb6 100644 --- a/languages/cpp/app_templates/tdeioslave/Makefile.am +++ b/languages/cpp/app_templates/tdeioslave/Makefile.am @@ -3,10 +3,10 @@ dataFiles = slave.cpp slave.h slave.protocol slave.tdevelop \ templateName = tdeioslave ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/tdeioslave/slave.tdevelop b/languages/cpp/app_templates/tdeioslave/slave.tdevelop index 5cbbe5e0..cb257385 100644 --- a/languages/cpp/app_templates/tdeioslave/slave.tdevelop +++ b/languages/cpp/app_templates/tdeioslave/slave.tdevelop @@ -14,16 +14,16 @@ tdeioslave - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + src/lib%{APPNAMELC}.la debug @@ -45,15 +45,15 @@ -O0 -g3 - - + + - - + + bash bash_bugs @@ -91,23 +91,23 @@ Qt Designer Manual Qt Reference Documentation - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/tdeioslave/tdeioslave.kdevtemplate b/languages/cpp/app_templates/tdeioslave/tdeioslave.kdevtemplate new file mode 100644 index 00000000..2ff27786 --- /dev/null +++ b/languages/cpp/app_templates/tdeioslave/tdeioslave.kdevtemplate @@ -0,0 +1,183 @@ +# TDE Config File +[General] +Name=TDEIO slave +Name[br]=Sklav TDEIO +Name[ca]=Esclau TDEIO +Name[da]=TDEIO-slave +Name[de]=Ein-/Ausgabemodul +Name[el]=Υπηρέτης TDEIO +Name[es]=Esclavo TDEIO +Name[et]=TDEIO-moodul +Name[eu]=TDEIO morroia +Name[fr]=Esclave TDEIO +Name[ga]=Sclábhaí TDEIO +Name[gl]=Escravo TDEIO +Name[hu]=TDE-protokoll (KIOslave) +Name[it]=Slave TDEIO +Name[nds]=In-/Utgaavmoduul +Name[ne]=TDEIO स्लेभ +Name[nl]=TDEIO-slave +Name[pt]=TDEIO Slave +Name[sk]=TDEIO otrok +Name[sv]=I/O-slav +Icon=tdeioslave.png +Category=C++/TDE +Comment=Generates a framework for an IO slave +Comment[ca]=Genera una infraestructura per a un esclau IO +Comment[da]=Genererer et skelet for en IO-slave +Comment[de]=Erstellt das Grundgerüst für ein Ein-/Ausgabemodul. +Comment[el]=Δημιουργεί ένα πλαίσιο για έναν υπηρέτη IO +Comment[es]=Genera una infraestructura para un esclavo de E/S +Comment[et]=IO-mooduli raamistiku loomine +Comment[eu]=IO morroi baterako lan-marko bat sortzen du +Comment[fa]=چارچوبی برای یک IO slave تولید می‌کند +Comment[fr]=Génère une infrastructure pour un esclave d'entrée / sortie +Comment[ga]=Cruthaíonn sé seo creatlach le haghaidh sclábhaí IO +Comment[gl]=Xera un contorno de traballo para un escravo IO +Comment[hu]=Létrehoz egy kiindulási keretprogramot KIOslave készítéséhez +Comment[it]=Genera l'infrastruttura per uno slave di I/O +Comment[ja]=IO slave のフレームワークを作成します +Comment[nds]=Stellt dat Rahmenwark för en In-/Utgaavmoduul op +Comment[ne]=IO स्लेभका लागि फ्रेमवर्क उत्पन्न गर्दछ +Comment[nl]=Genereert een framework voor een IO-slave +Comment[pl]=Generuje szablon dla IO slave +Comment[pt]=Gera a plataforma para um 'IO slave' +Comment[pt_BR]=Gera a plataforma para um 'IO slave' +Comment[ru]=Создание канала IO slave для TDE +Comment[sk]=Vygeneruje framework pre IO otroka +Comment[sr]=Прави радни оквир за IO slave +Comment[sr@Latn]=Pravi radni okvir za IO slave +Comment[sv]=Skapar ett ramverk för en I/O-slav +Comment[zh_CN]=生成一个 IO slave 的框架 +Comment[zh_TW]=產生一個 IO slave 的框架 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=tdeioslave.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/slave.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[FILE10] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE11] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE12] +Type=install +Source=%{src}/slave.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE13] +Type=install +Source=%{src}/slave.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE14] +Type=install +Source=%{src}/slave.protocol +Dest=%{dest}/src/%{APPNAMELC}.protocol + +[MSG] +Type=message +Comment=A TDEIO slave was created in %{dest} +Comment[ca]=Un esclau TDEIO ha estat creat en %{dest} +Comment[da]=En TDEIO-slave blev oprettet i %{dest} +Comment[de]=Ein Ein-/Ausgabemodul wurde in %{dest} erstellt. +Comment[el]=Ένας υπηρέτης TDEIO δημιουργήθηκε στο %{dest} +Comment[es]=Un esclavo TDEIO ha sido creado en %{dest} +Comment[et]=TDEIO-moodul loodi asukohta %{dest} +Comment[eu]=TDEIO morroi bat sortu da hemen: %{dest} +Comment[fa]=یک TDEIO slave در %{dest} ایجاد شد +Comment[fr]=Un esclave d'entrée / sortie a été créé dans %{dest} +Comment[ga]=Cruthaíodh sclábhaí TDEIO i %{dest} +Comment[gl]=Creouse un escravo TDEIO en %{dest} +Comment[hu]=Létrejött egy KIOslave itt: %{dest} +Comment[it]=È stato generato un slave TDEIO in %{dest} +Comment[ja]=TDEIO slave を %{dest} に作成しました。 +Comment[nds]=In %{dest} wöör en In-/Utgaavmoduul opstellt +Comment[ne]=TDEIO स्लेभ %{dest} मा सिर्जना गरियो +Comment[nl]=Een TDEIO-slave is aangemaakt in %{dest} +Comment[pl]=TDEIO slave został utworzony w %{dest} +Comment[pt]=Foi criado um 'TDEIO slave' em %{dest} +Comment[pt_BR]=Foi criado um 'TDEIO slave' em %{dest} +Comment[ru]=Канал TDEIO slave создан в %{dest} +Comment[sk]=TDEIO otrok bol vytvorený v %{dest} +Comment[sr]=TDEIO slave је направљен у %{dest} +Comment[sr@Latn]=TDEIO slave je napravljen u %{dest} +Comment[sv]=En I/O-slav skapades i %{dest} +Comment[tr]=Bir TDEIO slave'i %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了一个 TDEIO slave +Comment[zh_TW]=一個 TDEIO slave 已建立於 %{dest} diff --git a/languages/cpp/app_templates/tdeioslave/tdeioslave.tdevtemplate b/languages/cpp/app_templates/tdeioslave/tdeioslave.tdevtemplate deleted file mode 100644 index 6ced25c6..00000000 --- a/languages/cpp/app_templates/tdeioslave/tdeioslave.tdevtemplate +++ /dev/null @@ -1,183 +0,0 @@ -# TDE Config File -[General] -Name=TDEIO slave -Name[br]=Sklav TDEIO -Name[ca]=Esclau TDEIO -Name[da]=TDEIO-slave -Name[de]=Ein-/Ausgabemodul -Name[el]=Υπηρέτης TDEIO -Name[es]=Esclavo TDEIO -Name[et]=TDEIO-moodul -Name[eu]=TDEIO morroia -Name[fr]=Esclave TDEIO -Name[ga]=Sclábhaí TDEIO -Name[gl]=Escravo TDEIO -Name[hu]=TDE-protokoll (KIOslave) -Name[it]=Slave TDEIO -Name[nds]=In-/Utgaavmoduul -Name[ne]=TDEIO स्लेभ -Name[nl]=TDEIO-slave -Name[pt]=TDEIO Slave -Name[sk]=TDEIO otrok -Name[sv]=I/O-slav -Icon=tdeioslave.png -Category=C++/TDE -Comment=Generates a framework for an IO slave -Comment[ca]=Genera una infraestructura per a un esclau IO -Comment[da]=Genererer et skelet for en IO-slave -Comment[de]=Erstellt das Grundgerüst für ein Ein-/Ausgabemodul. -Comment[el]=Δημιουργεί ένα πλαίσιο για έναν υπηρέτη IO -Comment[es]=Genera una infraestructura para un esclavo de E/S -Comment[et]=IO-mooduli raamistiku loomine -Comment[eu]=IO morroi baterako lan-marko bat sortzen du -Comment[fa]=چارچوبی برای یک IO slave تولید می‌کند -Comment[fr]=Génère une infrastructure pour un esclave d'entrée / sortie -Comment[ga]=Cruthaíonn sé seo creatlach le haghaidh sclábhaí IO -Comment[gl]=Xera un contorno de traballo para un escravo IO -Comment[hu]=Létrehoz egy kiindulási keretprogramot KIOslave készítéséhez -Comment[it]=Genera l'infrastruttura per uno slave di I/O -Comment[ja]=IO slave のフレームワークを作成します -Comment[nds]=Stellt dat Rahmenwark för en In-/Utgaavmoduul op -Comment[ne]=IO स्लेभका लागि फ्रेमवर्क उत्पन्न गर्दछ -Comment[nl]=Genereert een framework voor een IO-slave -Comment[pl]=Generuje szablon dla IO slave -Comment[pt]=Gera a plataforma para um 'IO slave' -Comment[pt_BR]=Gera a plataforma para um 'IO slave' -Comment[ru]=Создание канала IO slave для TDE -Comment[sk]=Vygeneruje framework pre IO otroka -Comment[sr]=Прави радни оквир за IO slave -Comment[sr@Latn]=Pravi radni okvir za IO slave -Comment[sv]=Skapar ett ramverk för en I/O-slav -Comment[zh_CN]=生成一个 IO slave 的框架 -Comment[zh_TW]=產生一個 IO slave 的框架 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=tdeioslave.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/slave.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[FILE10] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE11] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE12] -Type=install -Source=%{src}/slave.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE13] -Type=install -Source=%{src}/slave.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE14] -Type=install -Source=%{src}/slave.protocol -Dest=%{dest}/src/%{APPNAMELC}.protocol - -[MSG] -Type=message -Comment=A TDEIO slave was created in %{dest} -Comment[ca]=Un esclau TDEIO ha estat creat en %{dest} -Comment[da]=En TDEIO-slave blev oprettet i %{dest} -Comment[de]=Ein Ein-/Ausgabemodul wurde in %{dest} erstellt. -Comment[el]=Ένας υπηρέτης TDEIO δημιουργήθηκε στο %{dest} -Comment[es]=Un esclavo TDEIO ha sido creado en %{dest} -Comment[et]=TDEIO-moodul loodi asukohta %{dest} -Comment[eu]=TDEIO morroi bat sortu da hemen: %{dest} -Comment[fa]=یک TDEIO slave در %{dest} ایجاد شد -Comment[fr]=Un esclave d'entrée / sortie a été créé dans %{dest} -Comment[ga]=Cruthaíodh sclábhaí TDEIO i %{dest} -Comment[gl]=Creouse un escravo TDEIO en %{dest} -Comment[hu]=Létrejött egy KIOslave itt: %{dest} -Comment[it]=È stato generato un slave TDEIO in %{dest} -Comment[ja]=TDEIO slave を %{dest} に作成しました。 -Comment[nds]=In %{dest} wöör en In-/Utgaavmoduul opstellt -Comment[ne]=TDEIO स्लेभ %{dest} मा सिर्जना गरियो -Comment[nl]=Een TDEIO-slave is aangemaakt in %{dest} -Comment[pl]=TDEIO slave został utworzony w %{dest} -Comment[pt]=Foi criado um 'TDEIO slave' em %{dest} -Comment[pt_BR]=Foi criado um 'TDEIO slave' em %{dest} -Comment[ru]=Канал TDEIO slave создан в %{dest} -Comment[sk]=TDEIO otrok bol vytvorený v %{dest} -Comment[sr]=TDEIO slave је направљен у %{dest} -Comment[sr@Latn]=TDEIO slave je napravljen u %{dest} -Comment[sv]=En I/O-slav skapades i %{dest} -Comment[tr]=Bir TDEIO slave'i %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了一个 TDEIO slave -Comment[zh_TW]=一個 TDEIO slave 已建立於 %{dest} diff --git a/languages/cpp/app_templates/tdescreensaver/CMakeLists.txt b/languages/cpp/app_templates/tdescreensaver/CMakeLists.txt index eae96197..b1149d88 100644 --- a/languages/cpp/app_templates/tdescreensaver/CMakeLists.txt +++ b/languages/cpp/app_templates/tdescreensaver/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( tdescreensaver.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/tdescreensaver.tar.gz tdescreensaver.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - tdescreensaver.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + tdescreensaver.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/tdescreensaver/Makefile.am b/languages/cpp/app_templates/tdescreensaver/Makefile.am index 1f9e6179..bee93bbc 100644 --- a/languages/cpp/app_templates/tdescreensaver/Makefile.am +++ b/languages/cpp/app_templates/tdescreensaver/Makefile.am @@ -5,10 +5,10 @@ dataFiles = tdescreensaver.desktop tdescreensaver.png tdescreensaver.h \ templateName= tdescreensaver ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/tdescreensaver/tdescreensaver.kdevtemplate b/languages/cpp/app_templates/tdescreensaver/tdescreensaver.kdevtemplate new file mode 100644 index 00000000..91510f04 --- /dev/null +++ b/languages/cpp/app_templates/tdescreensaver/tdescreensaver.kdevtemplate @@ -0,0 +1,203 @@ +# TDE Config File +[General] +Name=TDE Screen Saver +Name[br]=Damanter skramm TDE +Name[ca]=Salvapantalles per al TDE +Name[da]=TDE pauseskærm +Name[de]=TDE-Bildschirmschoner +Name[el]=Προφύλαξη οθόνης του TDE +Name[es]=Salvapantallas para TDE +Name[et]=TDE ekraanisäästja +Name[eu]=TDE pantaila-babeslea +Name[fa]=محافظ صفحۀ TDE +Name[fr]=Écran de veille TDE +Name[ga]=Spárálaí Scáileáin TDE +Name[gl]=Salvapantallas TDE +Name[hu]=TDE-s képernyővédő +Name[it]=Salva schermo di TDE +Name[ja]=TDE スクリーンセーバー +Name[nds]=TDE-Pausschirm +Name[ne]=केडीई स्क्रिन सर्भर +Name[nl]=TDE-schermbeveiliging +Name[pl]=Wygaszacz ekranu TDE +Name[pt]=Protector de Ecrã do TDE +Name[pt_BR]=Protetor de tela do TDE +Name[ru]=Хранитель экрана для TDE +Name[sk]=TDE šetrič obrazovky +Name[sl]=Ohranjevalnik zaslona za TDE +Name[sr]=TDE чувар екрана +Name[sr@Latn]=TDE čuvar ekrana +Name[sv]=TDE-skärmsläckare +Name[tr]=TDE Ekran Koruyucusu +Name[zh_CN]= TDE 屏幕保护程序 +Name[zh_TW]=TDE 螢幕保護程式 +Icon=tdescreensaver.png +Category=C++/TDE +Comment=Generates a framework for a TDE screensaver. +Comment[ca]=Genera una infraestructura per a un salvapantalles de TDE. +Comment[da]=Genererer et skelet for en TDE-pauseskærm. +Comment[de]=Erstellt das Gerüst für einen TDE-Bildschirmschoner. +Comment[el]=Δημιουργεί ένα πλαίσιο για μια προφύλαξη οθόνης του TDE. +Comment[es]=Genera una infraestructura para un salvapantallas de TDE +Comment[et]=TDE ekraanisäästja raamistiku loomine. +Comment[eu]=TDE-ren pantaila-babesle baten lan-marko bat sortzen du. +Comment[fa]=چارچوبی برای محافظ صفحۀ TDE تولید می‌کند. +Comment[fr]=Génère une infrastructure pour un écran de veille TDE. +Comment[gl]=Xera un contorno de traballo para un salvapantallas TDE. +Comment[hu]=Létrehoz egy alap TDE-s képernyővédőt. +Comment[it]=Genera l'infrastruttura per un salvaschermo di TDE. +Comment[ja]=TDE スクリーンセーバーのフレームワークを作成します +Comment[nds]=Stellt dat Rahmenwark för en TDE-Pausschirm op. +Comment[ne]=केडीई स्क्रिनसेभरका लागि फ्रेमवर्क उत्पन्न गर्दछ +Comment[nl]=Genereert een framework voor een TDE-schermbeveiliging. +Comment[pl]=Generuje szablon wygaszacza ekranu dla TDE. +Comment[pt]=Gera a plataforma para um protector de ecrã do TDE. +Comment[pt_BR]=Gera a plataforma para um protector de ecrã do TDE. +Comment[ru]=Создание инфраструктуры хранителя экрана для TDE. +Comment[sk]=Vygeneruje framework pre TDE šetrič obrazovky. +Comment[sl]=Ustvari ogrodje ohranjevalnika zaslona za TDE. +Comment[sr]=Прави радни оквир за TDE чувар екрана. +Comment[sr@Latn]=Pravi radni okvir za TDE čuvar ekrana. +Comment[sv]=Skapar ett ramverk för en TDE-skärmsläckare +Comment[tr]=Bir TDE ekran koruyucusu için bir çatı oluşturulur. +Comment[zh_CN]=生成 TDE 屏幕保护程序框架。 +Comment[zh_TW]=產生一個 TDE 螢幕保護程式的框架 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=tdescreensaver.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/tdescreensaver.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[FILE10] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE11] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE12] +Type=install +Source=%{src}/tdescreensaver.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE13] +Type=install +Source=%{src}/tdescreensaver.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE14] +Type=install +Source=%{src}/tdescreensaver.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE15] +Type=install +EscapeXML=true +Source=%{src}/tdescreensaverui.ui +Dest=%{dest}/src/%{APPNAMELC}ui.ui + +[MSG] +Type=message +Comment=A screensaver application was created in %{dest} +Comment[ca]=Una aplicació de salvapantalles ha estat creada en %{dest} +Comment[da]=Et pauseskærmsprogram blev oprettet i %{dest} +Comment[de]=Ein Bildschirmschoner wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή προφύλαξης οθόνης δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación salvapantallas ha sido creada en %{dest} +Comment[et]=Ekraanisäästja rakendus loodi asukohta %{dest} +Comment[eu]=Pantaila-babesle baten aplikazioa sortu da hemen: %{dest} +Comment[fa]=یک کاربرد محافظ صفحه در %{dest} ایجاد شد +Comment[fr]=Une application écran de veille a été créé dans %{dest} +Comment[ga]=Cruthaíodh spárálaí scáileáin i %{dest} +Comment[gl]=Creouse unha aplicación salvapantallas en %{dest} +Comment[hu]=Létrejött egy alap képernyővédő program itt: %{dest} +Comment[it]=È stata creata un'applicazione salvaschermo in %{dest} +Comment[ja]=スクリーンセーバーアプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Pausschirm opstellt +Comment[ne]=स्क्रिनसेभर अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een schermbeveiligingstoepassing is aangemaakt in %{dest} +Comment[pl]=Program wygaszacza ekranu został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação protectora do ecrã em %{dest} +Comment[pt_BR]=Foi criada uma aplicação protectora do ecrã em %{dest} +Comment[ru]=Приложение хранителя экрана создано в %{dest} +Comment[sk]=Aplikácia šetriča obrazovky bola vytvorená v %{dest} +Comment[sl]=Program ohranjevalnika zaslona je bil ustvarjen v %{dest} +Comment[sr]=Програм чувара екрана направљен је у %{dest} +Comment[sr@Latn]=Program čuvara ekrana napravljen je u %{dest} +Comment[sv]=Ett skärmsläckarprogram skapades i %{dest} +Comment[tr]=Bir ekran koruyucusu uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 中创建了屏幕保护应用程序 +Comment[zh_TW]=一個螢幕保護程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/tdescreensaver/tdescreensaver.tdevelop b/languages/cpp/app_templates/tdescreensaver/tdescreensaver.tdevelop index c3ae15db..28e0a678 100644 --- a/languages/cpp/app_templates/tdescreensaver/tdescreensaver.tdevelop +++ b/languages/cpp/app_templates/tdescreensaver/tdescreensaver.tdevelop @@ -14,16 +14,16 @@ tdeioslave - + 3 true 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner - + - + src/lib%{APPNAMELC}.la debug @@ -45,15 +45,15 @@ -O0 -g3 - - + + - - + + ada ada_bugs_gcc @@ -90,24 +90,24 @@ qmake User Guide - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/tdescreensaver/tdescreensaver.tdevtemplate b/languages/cpp/app_templates/tdescreensaver/tdescreensaver.tdevtemplate deleted file mode 100644 index 0500fdd5..00000000 --- a/languages/cpp/app_templates/tdescreensaver/tdescreensaver.tdevtemplate +++ /dev/null @@ -1,203 +0,0 @@ -# TDE Config File -[General] -Name=TDE Screen Saver -Name[br]=Damanter skramm TDE -Name[ca]=Salvapantalles per al TDE -Name[da]=TDE pauseskærm -Name[de]=TDE-Bildschirmschoner -Name[el]=Προφύλαξη οθόνης του TDE -Name[es]=Salvapantallas para TDE -Name[et]=TDE ekraanisäästja -Name[eu]=TDE pantaila-babeslea -Name[fa]=محافظ صفحۀ TDE -Name[fr]=Écran de veille TDE -Name[ga]=Spárálaí Scáileáin TDE -Name[gl]=Salvapantallas TDE -Name[hu]=TDE-s képernyővédő -Name[it]=Salva schermo di TDE -Name[ja]=TDE スクリーンセーバー -Name[nds]=TDE-Pausschirm -Name[ne]=केडीई स्क्रिन सर्भर -Name[nl]=TDE-schermbeveiliging -Name[pl]=Wygaszacz ekranu TDE -Name[pt]=Protector de Ecrã do TDE -Name[pt_BR]=Protetor de tela do TDE -Name[ru]=Хранитель экрана для TDE -Name[sk]=TDE šetrič obrazovky -Name[sl]=Ohranjevalnik zaslona za TDE -Name[sr]=TDE чувар екрана -Name[sr@Latn]=TDE čuvar ekrana -Name[sv]=TDE-skärmsläckare -Name[tr]=TDE Ekran Koruyucusu -Name[zh_CN]= TDE 屏幕保护程序 -Name[zh_TW]=TDE 螢幕保護程式 -Icon=tdescreensaver.png -Category=C++/TDE -Comment=Generates a framework for a TDE screensaver. -Comment[ca]=Genera una infraestructura per a un salvapantalles de TDE. -Comment[da]=Genererer et skelet for en TDE-pauseskærm. -Comment[de]=Erstellt das Gerüst für einen TDE-Bildschirmschoner. -Comment[el]=Δημιουργεί ένα πλαίσιο για μια προφύλαξη οθόνης του TDE. -Comment[es]=Genera una infraestructura para un salvapantallas de TDE -Comment[et]=TDE ekraanisäästja raamistiku loomine. -Comment[eu]=TDE-ren pantaila-babesle baten lan-marko bat sortzen du. -Comment[fa]=چارچوبی برای محافظ صفحۀ TDE تولید می‌کند. -Comment[fr]=Génère une infrastructure pour un écran de veille TDE. -Comment[gl]=Xera un contorno de traballo para un salvapantallas TDE. -Comment[hu]=Létrehoz egy alap TDE-s képernyővédőt. -Comment[it]=Genera l'infrastruttura per un salvaschermo di TDE. -Comment[ja]=TDE スクリーンセーバーのフレームワークを作成します -Comment[nds]=Stellt dat Rahmenwark för en TDE-Pausschirm op. -Comment[ne]=केडीई स्क्रिनसेभरका लागि फ्रेमवर्क उत्पन्न गर्दछ -Comment[nl]=Genereert een framework voor een TDE-schermbeveiliging. -Comment[pl]=Generuje szablon wygaszacza ekranu dla TDE. -Comment[pt]=Gera a plataforma para um protector de ecrã do TDE. -Comment[pt_BR]=Gera a plataforma para um protector de ecrã do TDE. -Comment[ru]=Создание инфраструктуры хранителя экрана для TDE. -Comment[sk]=Vygeneruje framework pre TDE šetrič obrazovky. -Comment[sl]=Ustvari ogrodje ohranjevalnika zaslona za TDE. -Comment[sr]=Прави радни оквир за TDE чувар екрана. -Comment[sr@Latn]=Pravi radni okvir za TDE čuvar ekrana. -Comment[sv]=Skapar ett ramverk för en TDE-skärmsläckare -Comment[tr]=Bir TDE ekran koruyucusu için bir çatı oluşturulur. -Comment[zh_CN]=生成 TDE 屏幕保护程序框架。 -Comment[zh_TW]=產生一個 TDE 螢幕保護程式的框架 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=tdescreensaver.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/tdescreensaver.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[FILE10] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE11] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE12] -Type=install -Source=%{src}/tdescreensaver.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE13] -Type=install -Source=%{src}/tdescreensaver.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE14] -Type=install -Source=%{src}/tdescreensaver.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE15] -Type=install -EscapeXML=true -Source=%{src}/tdescreensaverui.ui -Dest=%{dest}/src/%{APPNAMELC}ui.ui - -[MSG] -Type=message -Comment=A screensaver application was created in %{dest} -Comment[ca]=Una aplicació de salvapantalles ha estat creada en %{dest} -Comment[da]=Et pauseskærmsprogram blev oprettet i %{dest} -Comment[de]=Ein Bildschirmschoner wurde in %{dest} erstellt. -Comment[el]=Μια εφαρμογή προφύλαξης οθόνης δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación salvapantallas ha sido creada en %{dest} -Comment[et]=Ekraanisäästja rakendus loodi asukohta %{dest} -Comment[eu]=Pantaila-babesle baten aplikazioa sortu da hemen: %{dest} -Comment[fa]=یک کاربرد محافظ صفحه در %{dest} ایجاد شد -Comment[fr]=Une application écran de veille a été créé dans %{dest} -Comment[ga]=Cruthaíodh spárálaí scáileáin i %{dest} -Comment[gl]=Creouse unha aplicación salvapantallas en %{dest} -Comment[hu]=Létrejött egy alap képernyővédő program itt: %{dest} -Comment[it]=È stata creata un'applicazione salvaschermo in %{dest} -Comment[ja]=スクリーンセーバーアプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Pausschirm opstellt -Comment[ne]=स्क्रिनसेभर अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een schermbeveiligingstoepassing is aangemaakt in %{dest} -Comment[pl]=Program wygaszacza ekranu został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação protectora do ecrã em %{dest} -Comment[pt_BR]=Foi criada uma aplicação protectora do ecrã em %{dest} -Comment[ru]=Приложение хранителя экрана создано в %{dest} -Comment[sk]=Aplikácia šetriča obrazovky bola vytvorená v %{dest} -Comment[sl]=Program ohranjevalnika zaslona je bil ustvarjen v %{dest} -Comment[sr]=Програм чувара екрана направљен је у %{dest} -Comment[sr@Latn]=Program čuvara ekrana napravljen je u %{dest} -Comment[sv]=Ett skärmsläckarprogram skapades i %{dest} -Comment[tr]=Bir ekran koruyucusu uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了屏幕保护应用程序 -Comment[zh_TW]=一個螢幕保護程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/tdevlang/CMakeLists.txt b/languages/cpp/app_templates/tdevlang/CMakeLists.txt deleted file mode 100644 index a5768a94..00000000 --- a/languages/cpp/app_templates/tdevlang/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -################################################# -# -# (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( tdevlang.tar.gz ALL - COMMAND tar zcf tdevlang.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} - src-Makefile.am tdevlang_part.cpp tdevlang_part.h - tdevlang.rc tdevlang.desktop app.tdevelop - tdevlang-configure.in.in README.dox -) - - -install( FILES - ${CMAKE_CURRENT_BINARY_DIR}/tdevlang.tar.gz tdevlang.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) - - -install( FILES - tdevlang.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) diff --git a/languages/cpp/app_templates/tdevlang/Makefile.am b/languages/cpp/app_templates/tdevlang/Makefile.am deleted file mode 100644 index d33ab103..00000000 --- a/languages/cpp/app_templates/tdevlang/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -dataFiles = src-Makefile.am tdevlang_part.cpp tdevlang_part.h tdevlang.rc \ - tdevlang.desktop app.tdevelop tdevlang-configure.in.in README.dox -templateName = tdevlang - -### no need to change below: -template_DATA = $(templateName).tdevtemplate -templatedir = ${appwizarddatadir}/templates - -appwizarddatadir = ${kde_datadir}/tdevappwizard -$(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/tdevlang/app.tdevelop b/languages/cpp/app_templates/tdevlang/app.tdevelop deleted file mode 100644 index d6648708..00000000 --- a/languages/cpp/app_templates/tdevlang/app.tdevelop +++ /dev/null @@ -1,115 +0,0 @@ - - - - %{AUTHOR} - %{EMAIL} - %{VERSION} - KDevTDEAutoProject - C++ - - C++ - Code - Qt - TDE - KDevelop - - - - - 3 - true - 3 - EmbeddedTDevDesigner - - - - - - 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/tdevlang/src-Makefile.am b/languages/cpp/app_templates/tdevlang/src-Makefile.am deleted file mode 100644 index 6de535df..00000000 --- a/languages/cpp/app_templates/tdevlang/src-Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -AM_CPPFLAGS = -I$(kde_includes)/tdevelop/interfaces -I$(kde_includes)/tdevelop/util -I$(kde_includes)/kinterfacedesigner $(all_includes) - -kde_module_LTLIBRARIES = libtdev%{APPNAMELC}.la -libtdev%{APPNAMELC}_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEPARTS) -libtdev%{APPNAMELC}_la_LIBADD = -ltdevelop -libtdev%{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 diff --git a/languages/cpp/app_templates/tdevlang/tdevlang-configure.in.in b/languages/cpp/app_templates/tdevlang/tdevlang-configure.in.in deleted file mode 100644 index a7e792f2..00000000 --- a/languages/cpp/app_templates/tdevlang/tdevlang-configure.in.in +++ /dev/null @@ -1,10 +0,0 @@ -#MIN_CONFIG(3.0.0) - -AM_INIT_AUTOMAKE(%{APPNAMELC}, %{VERSION}) -AC_C_BIGENDIAN -AC_CHECK_TDEMAXPATHLEN - -KDE_CHECK_HEADERS([tdevelop/tdevcore.h]) -KDE_CHECK_LIB([tdevelop],main, - [LIBTDEVELOP="-ltdevelop"]) -AC_SUBST(LIBTDEVELOP) diff --git a/languages/cpp/app_templates/tdevlang/tdevlang.desktop b/languages/cpp/app_templates/tdevlang/tdevlang.desktop deleted file mode 100644 index 78fac402..00000000 --- a/languages/cpp/app_templates/tdevlang/tdevlang.desktop +++ /dev/null @@ -1,14 +0,0 @@ -[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=libtdev%{APPNAMELC} -X-TDevelop-Version=3 diff --git a/languages/cpp/app_templates/tdevlang/tdevlang.tdevtemplate b/languages/cpp/app_templates/tdevlang/tdevlang.tdevtemplate deleted file mode 100644 index 8692af7e..00000000 --- a/languages/cpp/app_templates/tdevlang/tdevlang.tdevtemplate +++ /dev/null @@ -1,157 +0,0 @@ -# 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=tdevlang.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[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}/tdevlang-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}/tdevlang_part.cpp -Dest=%{dest}/src/%{APPNAMELC}_part.cpp - -[FILE8] -Type=install -Source=%{src}/tdevlang_part.h -Dest=%{dest}/src/%{APPNAMELC}_part.h - -[FILE9] -Type=install -EscapeXML=true -Source=%{src}/tdevlang.rc -Dest=%{dest}/src/kdev%{APPNAMELC}.rc - -[FILE10] -Type=install -Source=%{src}/tdevlang.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/tdevlang/tdevlang_part.cpp b/languages/cpp/app_templates/tdevlang/tdevlang_part.cpp deleted file mode 100644 index 488f494a..00000000 --- a/languages/cpp/app_templates/tdevlang/tdevlang_part.cpp +++ /dev/null @@ -1,154 +0,0 @@ -%{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( libtdev%{APPNAMELC}, %{APPNAME}Factory( "tdev%{APPNAMELC}" ) ); -static const TDevPluginInfo data("tdev%{APPNAMELC}"); - -%{APPNAME}Part::%{APPNAME}Part(TQObject *parent, const char *name, const TQStringList& ) -: TDevLanguageSupport(&data, parent, name ? name : "%{APPNAME}Part" ) -{ - setInstance(%{APPNAME}Factory::instance()); - setXMLFile("tdevlang_%{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; -} - -TDevLanguageSupport::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/tdevlang/tdevlang_part.h b/languages/cpp/app_templates/tdevlang/tdevlang_part.h deleted file mode 100644 index 9b0f2513..00000000 --- a/languages/cpp/app_templates/tdevlang/tdevlang_part.h +++ /dev/null @@ -1,44 +0,0 @@ -%{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 TDevLanguageSupport -{ - 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/tdevpart/CMakeLists.txt b/languages/cpp/app_templates/tdevpart/CMakeLists.txt deleted file mode 100644 index e952ce8a..00000000 --- a/languages/cpp/app_templates/tdevpart/CMakeLists.txt +++ /dev/null @@ -1,29 +0,0 @@ -################################################# -# -# (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( tdevpart.tar.gz ALL - COMMAND tar zcf tdevpart.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} - src-Makefile.am tdevpart_part.cpp tdevpart_part.h - tdevpart_widget.h tdevpart_widget.cpp tdevpart_part.rc - tdevpart.desktop app.tdevelop README.dox - globalconfigbase.ui globalconfig.h globalconfig.cpp - projectconfigbase.ui projectconfig.h projectconfig.cpp -) - - -install( FILES - ${CMAKE_CURRENT_BINARY_DIR}/tdevpart.tar.gz tdevpart.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) - - -install( FILES - tdevpart.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) diff --git a/languages/cpp/app_templates/tdevpart/Makefile.am b/languages/cpp/app_templates/tdevpart/Makefile.am deleted file mode 100644 index 6aa1f606..00000000 --- a/languages/cpp/app_templates/tdevpart/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -dataFiles = src-Makefile.am tdevpart_part.cpp tdevpart_part.h \ - tdevpart_widget.h tdevpart_widget.cpp tdevpart_part.rc \ - tdevpart.desktop app.tdevelop README.dox globalconfigbase.ui globalconfig.h \ - globalconfig.cpp projectconfigbase.ui projectconfig.h projectconfig.cpp -templateName = tdevpart - -### no need to change below: -template_DATA = $(templateName).tdevtemplate -templatedir = ${appwizarddatadir}/templates - -appwizarddatadir = ${kde_datadir}/tdevappwizard -$(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/tdevpart/app.tdevelop b/languages/cpp/app_templates/tdevpart/app.tdevelop deleted file mode 100644 index 473da16e..00000000 --- a/languages/cpp/app_templates/tdevpart/app.tdevelop +++ /dev/null @@ -1,116 +0,0 @@ - - - - %{AUTHOR} - %{EMAIL} - %{VERSION} - KDevTDEAutoProject - C++ - - C++ - Code - Qt - TDE - KDevelop - - - - - 3 - true - 3 - EmbeddedTDevDesigner - - - - - - src/%{APPNAMELC} - debug - - - 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/tdevpart/src-Makefile.am b/languages/cpp/app_templates/tdevpart/src-Makefile.am deleted file mode 100644 index e082adff..00000000 --- a/languages/cpp/app_templates/tdevpart/src-Makefile.am +++ /dev/null @@ -1,20 +0,0 @@ -INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) - -kde_module_LTLIBRARIES = libtdev%{APPNAMELC}.la -libtdev%{APPNAMELC}_la_LDFLAGS = -module -avoid-version -no-undefined $(all_libraries) $(KDE_PLUGIN) $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEPARTS) -libtdev%{APPNAMELC}_la_LIBADD = $(top_builddir)/lib/libtdevelop.la - -libtdev%{APPNAMELC}_la_SOURCES = %{APPNAMELC}part.cpp %{APPNAMELC}widget.cpp \ - %{APPNAMELC}globalconfigbase.ui %{APPNAMELC}globalconfig.cpp \ - %{APPNAMELC}projectconfigbase.ui %{APPNAMELC}projectconfig.cpp - -METASOURCES = AUTO - -appsharedir = $(kde_datadir)/kdev%{APPNAMELC} -appshare_DATA = - -servicedir = $(kde_servicesdir) -service_DATA = kdev%{APPNAMELC}.desktop - -rcdir = $(kde_datadir)/kdev%{APPNAMELC} -rc_DATA = kdev%{APPNAMELC}.rc diff --git a/languages/cpp/app_templates/tdevpart/tdevpart.desktop b/languages/cpp/app_templates/tdevpart/tdevpart.desktop deleted file mode 100644 index c3eb6a81..00000000 --- a/languages/cpp/app_templates/tdevpart/tdevpart.desktop +++ /dev/null @@ -1,83 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Name=KDev%{APPNAME} -Name[nds]=KDev%{ProgNaam} -Name[sv]=TDevelop %{APPNAME} -Name[ta]=கெடெவ்%{APPNAME} -GenericName=%{APPNAME} Plugin -GenericName[br]=Lugent %{APPNAME} -GenericName[ca]=Connector per a %{APPNAME} -GenericName[da]=%{APPNAME} plugin -GenericName[de]=%{APPNAME}-Modul -GenericName[el]=Πρόσθετο %{APPNAME} -GenericName[es]=Complemento %{APPNAME} -GenericName[et]=%{APPNAME} plugin -GenericName[eu]=%{APPNAME} plugina -GenericName[fa]=وصلۀ %{APPNAME} -GenericName[fr]=Module externe pour %{APPNAME} -GenericName[ga]=Breiseán %{APPNAME} -GenericName[gl]=Extensión %{APPNAME} -GenericName[hu]=%{APPNAME}-bővítőmodul -GenericName[it]=Plugin %{APPNAME} -GenericName[ja]=%{APPNAME} プラグイン -GenericName[nds]=%{APPNAME}-Moduul -GenericName[ne]=%{APPNAME} प्लगइन -GenericName[nl]=%{APPNAME}-plugin -GenericName[pl]=Wtyczka %{APPNAME} -GenericName[pt]='Plugin' %{APPNAME} -GenericName[pt_BR]=Plug-in do %{APPNAME} -GenericName[ru]=Модуль %{APPNAME} -GenericName[sk]=%{APPNAME} modul -GenericName[sl]=Vstavek za %{APPNAME} -GenericName[sr]=%{APPNAME} прикључак -GenericName[sr@Latn]=%{APPNAME} priključak -GenericName[sv]=%{APPNAME} insticksprogram -GenericName[tr]=%{APPNAME} Eklentisi -GenericName[zh_CN]=%{APPNAME} 插件 -GenericName[zh_TW]=%{APPNAME} 外掛程式 -Comment=%{APPNAME} Description -Comment[br]=Deskrivadur %{APPNAME} -Comment[ca]=Descripció per a %{APPNAME} -Comment[da]=%{APPNAME} beskrivelse -Comment[de]=%{APPNAME} Beschreibung -Comment[el]=Περιγραφή %{APPNAME} -Comment[es]=Descripción de %{APPNAME} -Comment[et]=%{APPNAME} kirjeldus -Comment[eu]=%{APPNAME} deskribapena -Comment[fa]=توصیف %{APPNAME} -Comment[fr]=Description pour %{APPNAME} -Comment[ga]=Cur Síos %{APPNAME} -Comment[gl]=Descripción de %{APPNAME} -Comment[hu]=%{APPNAME} leírása -Comment[it]=Descrizione %{APPNAME} -Comment[ja]=%{APPNAME} 概説 -Comment[nds]=%{APPNAME}-Beschrieven -Comment[ne]=%{APPNAME} वर्णन -Comment[nl]=%{APPNAME} omschrijving -Comment[pl]=Opis %{APPNAME} -Comment[pt]=Descrição de %{APPNAME$} -Comment[pt_BR]=Descrição do %{APPNAME} -Comment[ru]=Описание %{APPNAME} -Comment[sk]=%{APPNAME} popis -Comment[sl]=Opis za %{APPNAME} -Comment[sr]=Опис за %{APPNAME} -Comment[sr@Latn]=Opis za %{APPNAME} -Comment[sv]=%{APPNAME} beskrivning -Comment[tr]=%{APPNAME} Tanımı -Comment[zh_CN]=%{APPNAME} 描述 -Comment[zh_TW]=%{APPNAME} 描述 -Icon=tdevelop -ServiceTypes=TDevelop/Plugin - -X-TDevelop-Plugin-Version=1 -X-TDevelop-Plugin-Homepage= -X-TDevelop-Plugin-BugsEmailAddress=%{EMAIL} -X-TDevelop-Plugin-Copyright=(C) by %{AUTHOR} - -X-TDevelop-Args= - -X-TDevelop-Scope=%{SCOPE} -X-TDE-Library=libtdev%{APPNAMELC} -X-TDevelop-Version=3 -X-TDevelop-Properties=%{PROPS} diff --git a/languages/cpp/app_templates/tdevpart/tdevpart.tdevtemplate b/languages/cpp/app_templates/tdevpart/tdevpart.tdevtemplate deleted file mode 100644 index 8bdb87e3..00000000 --- a/languages/cpp/app_templates/tdevpart/tdevpart.tdevtemplate +++ /dev/null @@ -1,242 +0,0 @@ -# TDE Config File -[General] -Name=TDevelop Plugin (TDevelop source tree build) -Name[ca]=Connector per a TDevelop (de construcció a l'arbre de fonts de TDevelop) -Name[da]=TDevelop Plugin (TDevelop kildetræ bygning) -Name[de]=TDevelop-Modul (Erstellung im TDevelop-Quelltextbaum) -Name[el]=Πρόσθετο TDevelop (κατασκευή με το δέντρο πηγαίου κώδικα του TDevelop) -Name[es]=Complemento para TDevelop (construcción en árbol de código fuente de TDevelop) -Name[et]=TDevelopi plugin (Kdevelopi lähtekoodipuus) -Name[eu]=TDevelop plugina (TDevelop-en iturburu zuhaitzean erakitzeko) -Name[fa]=وصلۀ TDevelop )ساخت درخت منبع TDevelop( -Name[fr]=Module externe de TDevelop (construction dans l'arborescence des sources de TDevelop) -Name[gl]=Extensión para TDevelop (compilación na árbore de código de TDevelop) -Name[hu]=TDevelop-bővítőmodul (TDevelopos forráskönyvtáron belül) -Name[it]=Plugin di TDevelop (compila l'albero sorgente di TDevelop) -Name[ja]=TDevelop プラグイン (TDevelop ソースツリービルド) -Name[nds]=TDevelop-Moduul (TDevelop-Bornboomprogramm) -Name[ne]=केडीई विकास प्लगइन (केडीई विकास स्रोत ट्री निर्माण) -Name[nl]=TDevelop-plugin (TDevelop source tree build) -Name[pl]=Wtyczka TDevelopa (budowa w drzewie źródłowym TDevelopa) -Name[pt]='Plugin' do TDevelop (compilação na árvore de código do TDevelop) -Name[pt_BR]='Plugin' do TDevelop (compilação na árvore de código do TDevelop) -Name[ru]=Модуль TDevelop (в исходном коде TDevelop) -Name[sk]=TDevelop modul (TDevelop zdrojový strom build) -Name[sr]=Прикључак за TDevelop (градња у изворном стаблу TDevelop-а) -Name[sr@Latn]=Priključak za TDevelop (gradnja u izvornom stablu TDevelop-a) -Name[sv]=TDevelop-insticksprogram (att bygga i TDevelops källkodsträd) -Name[tr]=TDevelop Eklentisi (TDevelop kaynak ağacı kurulumu) -Name[zh_CN]=TDevelop 插件(TDevelop 源代码树编译) -Name[zh_TW]=TDevelop 外掛程式(TDevelop 程式源碼樹內建立) -Category=C++/TDevelop/ -Comment=This generates a plugin for TDevelop, for building within the TDevelop source tree -Comment[ca]=Genera un connector per a TDevelop, per a que es construeixi en l'arbre de fonts de TDevelop -Comment[da]=Dette genererer et plugin for TDevelop, til at bygges indenfor TDevelop's kildetræ -Comment[de]=Hiermit wird ein Modul für TDevelop erstellt, dessen Erstellung innerhalb des Quelltextbaumes von TDevelop erfolgt. -Comment[el]=Αυτό δημιουργεί ένα πρόσθετο για το TDevelop, για κατασκευή του μέσα στο δέντρο πηγαίου κώδικα του TDevelop -Comment[es]=Genera un complemento para TDevelop, para ser construido en el árbol de código fuente de TDevelop -Comment[et]=TDevelopi plugina loomine, mis ehitatakse TDevelopi lähtekoodipuus. -Comment[eu]=Honek TDevelop-erako plugin bat sortzen du, TDevelop-en iturburu-zuhaitzean eraikitzeko -Comment[fa]=وصله‌ای برای TDevelop، برای ساختن در درخت منبع TDevelop تولید می‌کند -Comment[fr]=Génère un module externe pour TDevelop, à construire dans l'arborescence des sources de TDevelop -Comment[gl]=Isto xera unha extensión para TDevelop que se compilará dentro da árbore de código de TDevelop -Comment[hu]=Létrehoz egy TDevelop-bővítőmodult, mely a TDevelopos forráskönyvtáron belül fordítható le -Comment[it]=Genera un plugin per TDevelop, per compilarlo assieme all'albero sorgente di TDevelop -Comment[nds]=Dit stellt en TDevelop-Moduul för't Kompileren binnen den TDevelop-Bornboom op -Comment[ne]=यसले केडीई विकास स्रोत ट्री भित्र निर्माण गर्न, केडीई विकासका लागि प्लगइन उत्पन्न गर्दछ -Comment[nl]=Dit genereert een plugin voor TDevelop, om te bouwen binnen de TDevelop sourcetree -Comment[pl]=Generuje wtyczkę do TDevelopa, która jest budowana w jego drzewie źródłowym -Comment[pt]=Isto gera um 'plugin' para o TDevelop, para uma compilação dentro da árvore de código do TDevelop -Comment[pt_BR]=Isto gera um 'plugin' para o TDevelop, para uma compilação dentro da árvore de código do TDevelop -Comment[ru]=Создание модуля TDevelop в исходном коде TDevelop -Comment[sk]=Vygeneruje modul pre TDevelop, ktorý sa bude kompilovať v rámci TDevelop zdrojového stromu -Comment[sr]=Ово прави прикључак за TDevelop, за градњу у оквиру TDevelop-овог изворног стабла -Comment[sr@Latn]=Ovo pravi priključak za TDevelop, za gradnju u okviru TDevelop-ovog izvornog stabla -Comment[sv]=Det här skapar ett insticksprogram för TDevelop, att byggas inne i TDevelops källkodsträd. -Comment[tr]=Bu TDevelop için, TDevelop kaynak ağacınında olacak, bir eklenti yaratır. -Comment[zh_CN]=这将生成 TDevelop 的插件,该插件需要与 TDevelop 源代码树一起编译 -Comment[zh_TW]=產生一個 TDevelop 外掛程式,建立於 TDevelop 程式源碼樹內。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}part.cpp -Archive=tdevpart.tar.gz - -[SCOPE] -Type = value -ValueType=QString -Value= SCOPE -Comment= The scope of a plugin (Global, Project, Core) -Comment[ca]= L'àmbit d'un connector (Global, Project, Core) -Comment[da]= Et plugins omfang (Globalt, Projekt, Kerne) -Comment[de]= Gültigkeitsbereich eines Moduls (Global, Projekt, Kern) -Comment[el]= Η εμβέλεια ενός πρόσθετου (Καθολική, Έργο, Πυρήνας) -Comment[es]=El alcance de un complemento (global, proyecto, núcleo) -Comment[et]=Plugina skoop (globaalne, projekt, tuum) -Comment[eu]= Pluginaren barrutia (Globala, Projektua, Nukleoa) -Comment[fa]=دامنۀ یک وصله )سراسری، پروژه، هسته( -Comment[fr]= La portée d'un module externe (globale, projet, core) -Comment[ga]= Scóip an bhreiseáin (Comhchoiteann, Tionscadal, Ceartlár) -Comment[gl]=Ámbito da extensión (Global, Proxecto, Núcleo) -Comment[hu]=A modul hatóköre (globális, projektszintű, alap) -Comment[it]=Il contesto di un plugin (Globale, Progetto, Core) -Comment[nds]= Dat Rebeet vun en Moduul (Globaal, Projekt, Karn) -Comment[ne]= प्लगइनको क्षेत्र (विश्वव्यापी, परियोजना, कोर) -Comment[nl]=Het bereik van een plugin (globaal, project, core) -Comment[pl]=Przynależność wtyczki (globalna, projekt, część główna) -Comment[pt]=O âmbito de um 'plugin' (Global, Projecto, Núcleo) -Comment[pt_BR]=O âmbito de um 'plugin' (Global, Projecto, Núcleo) -Comment[ru]=Тип модуля (Global, Project, Core) -Comment[sk]=Rozsah module (globálny, projektový, jadrový) -Comment[sr]=Опсег прикључка (глобални, пројекат, језгро) -Comment[sr@Latn]=Opseg priključka (globalni, projekat, jezgro) -Comment[sv]=Insticksprogrammets omfattning (Global, Projekt, Kärna) -Comment[tr]=Bir eklentinin alanı (Genel, Proje, İç) -Comment[zh_CN]=插件的范围(全局、工程、核心) -Comment[zh_TW]=外掛程式的範圍(全域、專案、核心) -Default= Global - -[PROPS] -Type = value -ValueType=QString -Value= PROPS -Comment= The list of supported TDevelop properties -Comment[ca]= La llista de propietats suportades del TDevelop -Comment[da]= Listen af understøttede TDevelop-egenskaber -Comment[de]= Die Liste der unterstützten TDevelop-Eigenschaften -Comment[el]= Η λίστα των υποστηριζόμενων ιδιοτήτων του TDevelop -Comment[es]=La lista de propiedades de TDevelop soportadas -Comment[et]= TDevelopi toetatud omaduste nimekiri -Comment[eu]= Onartzen diren TDevelop-en propietateen zerrenda -Comment[fa]=فهرست ویژگیهای پشتیبانی‌شدۀ TDevelop -Comment[fr]= La liste des propriétés de TDevelop prises en charge -Comment[ga]= Liosta d'airíonna TDevelop a dtacaítear leo -Comment[gl]=Lista das propiedades de TDevelop soportadas -Comment[hu]=A támogatott TDevelop-tulajdonságok -Comment[it]=Lista delle proprietà supportate da TDevelop -Comment[nds]= De List mit ünnerstütt TDevelop-Egenschappen -Comment[ne]= केडीई विकास समर्थन गर्ने गुणको सूची -Comment[nl]=De lijst met ondersteunde TDevelop-properties -Comment[pl]= Lista obsługiwanych właściwości TDevelopa -Comment[pt]= A lista de propriedades do TDevelop suportadas -Comment[pt_BR]= A lista de propriedades do TDevelop suportadas -Comment[ru]=Список поддерживаемых типов модулей для TDevelop -Comment[sk]=Zoznam podporovaných vlastností TDevelop -Comment[sl]=Seznam podprtih lastnosti TDevelop -Comment[sr]=Листа подржаних TDevelop-ових својстава -Comment[sr@Latn]=Lista podržanih TDevelop-ovih svojstava -Comment[sv]=Listan med egenskaper i TDevelop som stöds -Comment[tr]=Desteklenen TDevelop özellikleri -Comment[zh_CN]=列出支持的 TDevelop 属性 -Comment[zh_TW]=支援的 TDevelop 屬性列表 -Default= - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE3] -Type=install -Source=%{src}/tdevpart_part.cpp -Dest=%{dest}/%{APPNAMELC}part.cpp - -[FILE4] -Type=install -Source=%{src}/tdevpart_part.h -Dest=%{dest}/%{APPNAMELC}part.h - -[FILE5] -Type=install -Source=%{src}/tdevpart_widget.cpp -Dest=%{dest}/%{APPNAMELC}widget.cpp - -[FILE6] -Type=install -Source=%{src}/tdevpart_widget.h -Dest=%{dest}/%{APPNAMELC}widget.h - -[FILE7] -Type=install -EscapeXML=true -Source=%{src}/tdevpart_part.rc -Dest=%{dest}/kdev%{APPNAMELC}.rc - -[FILE71] -Type=install -EscapeXML=true -Source=%{src}/globalconfigbase.ui -Dest=%{dest}/%{APPNAMELC}globalconfigbase.ui - -[FILE711] -Type=install -Source=%{src}/globalconfig.h -Dest=%{dest}/%{APPNAMELC}globalconfig.h - -[FILE712] -Type=install -Source=%{src}/globalconfig.cpp -Dest=%{dest}/%{APPNAMELC}globalconfig.cpp - -[FILE72] -Type=install -EscapeXML=true -Source=%{src}/projectconfigbase.ui -Dest=%{dest}/%{APPNAMELC}projectconfigbase.ui - -[FILE721] -Type=install -Source=%{src}/projectconfig.h -Dest=%{dest}/%{APPNAMELC}projectconfig.h - -[FILE722] -Type=install -Source=%{src}/projectconfig.cpp -Dest=%{dest}/%{APPNAMELC}projectconfig.cpp - -[FILE8] -Type=install -Source=%{src}/tdevpart.desktop -Dest=%{dest}/kdev%{APPNAMELC}.desktop - -[FILE9] -Type=install -Source=%{src}/README.dox -Dest=%{dest}/README.dox - -[MSG] -Type=message -Comment=A TDevelop plugin was created in %{dest} -Comment[ca]=Un connector per a TDevelop ha estat creat en %{dest} -Comment[da]=Et TDevelop plugin blev oprettet i %{dest} -Comment[de]=Ein TDevelop-Modul wurde in %{dest} erstellt. -Comment[el]=Ένα πρόσθετο του TDevelop δημιουργήθηκε στο %{dest} -Comment[es]=Un complemento para TDevelop ha sido creado en %{dest} -Comment[et]=TDevelopi plugin loodi asukohta %{dest} -Comment[eu]=TDevelop plugin bat sortu da hemen: %{dest} -Comment[fa]=یک وصلۀ TDevelop در %{dest} ایجاد شد -Comment[fr]=Un module externe pour TDevelop a été créé dans %{dest} -Comment[ga]=Cruthaíodh breiseán TDevelop i %{dest} -Comment[gl]=Creouse unha extensión para TDevelop en %{dest} -Comment[hu]=Létrejött egy TDevelop-bővítőmodul itt: %{dest} -Comment[it]=È stato creato un plugin per TDevelop in %{dest} -Comment[ja]=TDevelop プラグインを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en TDevelop-Moduul opstellt -Comment[ne]=केडीई विकास प्लगइन %{dest} मा सिर्जना गरियो -Comment[nl]=Er is een TDevelop-plugin aangemaakt in %{dest} -Comment[pl]=Wtyczka do TDevelopa została utworzona w %{dest} -Comment[pt]=Foi criado um 'plugin' do TDevelop em %{dest} -Comment[pt_BR]=Foi criado um 'plugin' do TDevelop em %{dest} -Comment[ru]=Модуль TDevelop создан в %{dest} -Comment[sk]=TDevelop modul bol vytvorený v %{dest} -Comment[sl]=Vstavek za TDevelop je bil ustvarjen v %{dest} -Comment[sr]=Прикључак за TDevelop направљен је у %{dest} -Comment[sr@Latn]=Priključak za TDevelop napravljen je u %{dest} -Comment[sv]=Ett insticksprogram för TDevelop skapades i %{dest} -Comment[tr]=Bir TDevelop eklentisi %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了 TDevelop 插件 -Comment[zh_TW]=一個 TDevelop 外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/tdevpart/tdevpart_part.cpp b/languages/cpp/app_templates/tdevpart/tdevpart_part.cpp deleted file mode 100644 index 0d846d38..00000000 --- a/languages/cpp/app_templates/tdevpart/tdevpart_part.cpp +++ /dev/null @@ -1,183 +0,0 @@ -%{CPP_TEMPLATE} -#include "%{APPNAMELC}part.h" - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "%{APPNAMELC}widget.h" -#include "%{APPNAMELC}globalconfig.h" -#include "%{APPNAMELC}projectconfig.h" - -typedef TDevGenericFactory<%{APPNAME}Part> %{APPNAME}Factory; -TDevPluginInfo data("tdev%{APPNAMELC}"); -K_EXPORT_COMPONENT_FACTORY( libtdev%{APPNAMELC}, %{APPNAME}Factory( data ) ); - -#define GLOBALDOC_OPTIONS 1 -#define PROJECTDOC_OPTIONS 2 - -%{APPNAME}Part::%{APPNAME}Part(TQObject *parent, const char *name, const TQStringList &/*args*/) - : TDevPlugin(&data, parent, name ? name : "%{APPNAME}Part") -{ - setInstance(%{APPNAME}Factory::instance()); - setXMLFile("tdev%{APPNAMELC}.rc"); - - m_widget = new %{APPNAME}Widget(this); - m_widget->setCaption("widget caption"); - m_widget->setIcon(SmallIcon(info()->icon())); - - TQWhatsThis::add(m_widget, i18n("WHAT DOES THIS PART DO?")); - - // now you decide what should happen to the widget. Take a look at tdevcore.h - // or at other plugins how to embed it. - - // if you want to embed your widget as an outputview, simply uncomment - // the following line. - // mainWindow()->embedOutputView( m_widget, "name that should appear", "enter a tooltip" ); - - // if you want to embed your widget as a selectview (at the left), simply uncomment - // the following line. - // mainWindow()->embedSelectView( m_widget, "name that should appear", "enter a tooltip" ); - - // if you want to embed your widget as a selectview (at the right), simply uncomment - // the following line. - // mainWindow()->embedSelectViewRight( m_widget, "name that should appear", "enter a tooltip" ); - - setupActions(); - - m_configProxy = new ConfigWidgetProxy(core()); - m_configProxy->createGlobalConfigPage(i18n("%{APPNAME}"), GLOBALDOC_OPTIONS, info()->icon()); - m_configProxy->createProjectConfigPage(i18n("%{APPNAME}"), PROJECTDOC_OPTIONS, info()->icon()); - connect(m_configProxy, TQT_SIGNAL(insertConfigWidget(const KDialogBase*, TQWidget*, unsigned int )), - this, TQT_SLOT(insertConfigWidget(const KDialogBase*, TQWidget*, unsigned int))); - - connect(core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), - this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *))); - connect(core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened())); - connect(core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed())); - - - TQTimer::singleShot(0, this, TQT_SLOT(init())); -} - -%{APPNAME}Part::~%{APPNAME}Part() -{ -// if you embed a widget, you need to tell the mainwindow when you remove it -// if ( m_widget ) -// { -// mainWindow()->removeView( m_widget ); -// } - delete m_widget; - delete m_configProxy; -} - -void %{APPNAME}Part::init() -{ -// delayed initialization stuff goes here -} - -void %{APPNAME}Part::setupActions() -{ -// create XMLGUI actions here - action = new TDEAction(i18n("&Do Something..."), 0, - this, TQT_SLOT(doSomething()), actionCollection(), "plugin_action" ); - action->setToolTip(i18n("Do something")); - action->setWhatsThis(i18n("Do something

    Describe here what does this action do.")); -} - -void %{APPNAME}Part::insertConfigWidget(const KDialogBase *dlg, TQWidget *page, unsigned int pageNo) -{ -// create configuraton dialogs here - switch (pageNo) - { - case GLOBALDOC_OPTIONS: - { - %{APPNAME}GlobalConfig *w = new %{APPNAME}GlobalConfig(this, page, "global config"); - connect(dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept())); - break; - } - case PROJECTDOC_OPTIONS: - { - %{APPNAME}ProjectConfig *w = new %{APPNAME}ProjectConfig(this, page, "project config"); - connect(dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept())); - break; - } - } -} - -void %{APPNAME}Part::contextMenu(TQPopupMenu *popup, const Context *context) -{ -// put actions into the context menu here - if (context->hasType(Context::EditorContext)) - { - // editor context menu - const EditorContext *econtext = static_cast(context); - - // use context and plug actions here - action->plug(popup); - - // or create menu items on the fly - // int id = -1; - // id = popup->insertItem(i18n("Do Something Here"), - // this, TQT_SLOT(doSomething()) ); - // popup->setWhatsThis(id, i18n("Do something here

    Describe here what does this action do." - } - else if (context->hasType(Context::FileContext)) - { - // file context menu - const FileContext *fcontext = static_cast(context); - - //use context and plug actions here - } - else if (context->hasType(Context::ProjectModelItemContext)) - { - // project tree context menu - const ProjectModelItemContext *pcontext = static_cast(context); - - // use context and plug actions here - } - else if (context->hasType(Context::CodeModelItemContext)) - { - // class tree context menu - const CodeModelItemContext *mcontext = static_cast(context); - - // use context and plug actions here - } - else if (context->hasType(Context::DocumentationContext)) - { - // documentation viewer context menu - const DocumentationContext *dcontext = static_cast(context); - - // use context and plug actions here - } -} - -void %{APPNAME}Part::projectOpened() -{ -// do something when the project is opened -} - -void %{APPNAME}Part::projectClosed() -{ -// do something when the project is closed -} - -void %{APPNAME}Part::doSomething() -{ -// do something useful here instead of showing the message box - KMessageBox::information(m_widget, i18n("This action does nothing."), i18n("%{APPNAME} Plugin")); -} - -#include "%{APPNAMELC}part.moc" diff --git a/languages/cpp/app_templates/tdevpart/tdevpart_part.h b/languages/cpp/app_templates/tdevpart/tdevpart_part.h deleted file mode 100644 index 1d61dd0c..00000000 --- a/languages/cpp/app_templates/tdevpart/tdevpart_part.h +++ /dev/null @@ -1,46 +0,0 @@ -%{H_TEMPLATE} -#ifndef TDEV%{APPNAMEUC}_H -#define TDEV%{APPNAMEUC}_H - -#include - -#include - -class TQPopupMenu; -class TDEAction; -class KDialogBase; -class Context; -class ConfigWidgetProxy; -class %{APPNAME}Widget; - -/** -Please read the README.dox file for more info about this part -*/ -class %{APPNAME}Part: public TDevPlugin -{ - Q_OBJECT - -public: - %{APPNAME}Part(TQObject *parent, const char *name, const TQStringList &args); - ~%{APPNAME}Part(); - -private slots: - void init(); - - void insertConfigWidget(const KDialogBase *dlg, TQWidget *page, unsigned int pageNo); - void contextMenu(TQPopupMenu *popup, const Context *context); - void projectOpened(); - void projectClosed(); - - void doSomething(); - -private: - void setupActions(); - - TDEAction *action; - - TQGuardedPtr<%{APPNAME}Widget> m_widget; - ConfigWidgetProxy *m_configProxy; -}; - -#endif diff --git a/languages/cpp/app_templates/tdevpart/tdevpart_widget.cpp b/languages/cpp/app_templates/tdevpart/tdevpart_widget.cpp deleted file mode 100644 index 1f356afd..00000000 --- a/languages/cpp/app_templates/tdevpart/tdevpart_widget.cpp +++ /dev/null @@ -1,21 +0,0 @@ -%{CPP_TEMPLATE} -#include "%{APPNAMELC}widget.h" - -#include -#include -#include - -#include - -#include "%{APPNAMELC}part.h" - -%{APPNAME}Widget::%{APPNAME}Widget(%{APPNAME}Part *part) - : TQWidget(0, "%{APPNAMELC} widget"), m_part(part) -{ -} - -%{APPNAME}Widget::~%{APPNAME}Widget() -{ -} - -#include "%{APPNAMELC}widget.moc" diff --git a/languages/cpp/app_templates/tdevpart/tdevpart_widget.h b/languages/cpp/app_templates/tdevpart/tdevpart_widget.h deleted file mode 100644 index e9762de3..00000000 --- a/languages/cpp/app_templates/tdevpart/tdevpart_widget.h +++ /dev/null @@ -1,24 +0,0 @@ -%{H_TEMPLATE} -#ifndef %{APPNAMEUC}_WIDGET_H -#define %{APPNAMEUC}_WIDGET_H - -#include -#include - -class TDevProject; -class %{APPNAME}Part; - -class %{APPNAME}Widget: public TQWidget -{ - Q_OBJECT - -public: - %{APPNAME}Widget(%{APPNAME}Part *part); - ~%{APPNAME}Widget(); - -private: - %{APPNAME}Part *m_part; -}; - - -#endif diff --git a/languages/cpp/app_templates/tdevpart2/CMakeLists.txt b/languages/cpp/app_templates/tdevpart2/CMakeLists.txt deleted file mode 100644 index d48daf45..00000000 --- a/languages/cpp/app_templates/tdevpart2/CMakeLists.txt +++ /dev/null @@ -1,30 +0,0 @@ -################################################# -# -# (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( tdevpart2.tar.gz ALL - COMMAND tar zcf tdevpart2.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} - src-Makefile.am tdevpart_part.cpp tdevpart_part.h - tdevpart_widget.h tdevpart_widget.cpp tdevpart_part.rc - tdevpart.desktop app.tdevelop tdevpart-configure.in.in - README.dox subdirs globalconfigbase.ui globalconfig.h - globalconfig.cpp projectconfigbase.ui projectconfig.h - projectconfig.cpp -) - - -install( FILES - ${CMAKE_CURRENT_BINARY_DIR}/tdevpart2.tar.gz tdevpart2.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) - - -install( FILES - tdevpart2.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) diff --git a/languages/cpp/app_templates/tdevpart2/Makefile.am b/languages/cpp/app_templates/tdevpart2/Makefile.am deleted file mode 100644 index ae1df924..00000000 --- a/languages/cpp/app_templates/tdevpart2/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -dataFiles = src-Makefile.am tdevpart_part.cpp tdevpart_part.h\ - tdevpart_widget.h tdevpart_widget.cpp \ - tdevpart_part.rc tdevpart.desktop app.tdevelop \ - tdevpart-configure.in.in README.dox subdirs globalconfigbase.ui globalconfig.h \ - globalconfig.cpp projectconfigbase.ui projectconfig.h projectconfig.cpp - -templateName = tdevpart2 - -### no need to change below: -template_DATA = $(templateName).tdevtemplate -templatedir = ${appwizarddatadir}/templates - -appwizarddatadir = ${kde_datadir}/tdevappwizard -$(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/tdevpart2/app.tdevelop b/languages/cpp/app_templates/tdevpart2/app.tdevelop deleted file mode 100644 index ac470cdc..00000000 --- a/languages/cpp/app_templates/tdevpart2/app.tdevelop +++ /dev/null @@ -1,148 +0,0 @@ - - - - %{AUTHOR} - %{EMAIL} - %{VERSION} - KDevTDEAutoProject - C++ - - C++ - Code - Qt - TDE - KDevelop - - - - - src/%{APPNAMELC} - debug - - - src/%{APPNAMELC} - executable - - - - optimized - kdevgccoptions - kdevgppoptions - kdevg77options - -O2 -g0 - - - --enable-debug=full - debug - kdevgccoptions - kdevgppoptions - kdevg77options - -O0 -g3 - - - - - - - - - - - - - - - - - - - - false - true - - - - - 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 - - - - - - - - - - - - -f - - - - -dP - -f - -C -d -P - -u3 -p - - - - - 3 - true - 3 - EmbeddedTDevDesigner - - - true - true - true - false - true - true - 250 - 400 - - - - - Doxygen Documentation Collection - %{APPNAMELC}.tag - - - diff --git a/languages/cpp/app_templates/tdevpart2/src-Makefile.am b/languages/cpp/app_templates/tdevpart2/src-Makefile.am deleted file mode 100644 index 407d9565..00000000 --- a/languages/cpp/app_templates/tdevpart2/src-Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -INCLUDES = -I$(kde_includes)/tdevelop/interfaces -I$(kde_includes)/tdevelop/util $(all_includes) - -kde_module_LTLIBRARIES = libtdev%{APPNAMELC}.la -libtdev%{APPNAMELC}_la_LDFLAGS = -module -avoid-version -no-undefined $(all_libraries) $(KDE_PLUGIN) -libtdev%{APPNAMELC}_la_LIBADD = -ltdevelop -libtdev%{APPNAMELC}_la_SOURCES = %{APPNAMELC}part.cpp %{APPNAMELC}widget.cpp %{APPNAMELC}globalconfigbase.ui %{APPNAMELC}globalconfig.cpp %{APPNAMELC}projectconfigbase.ui %{APPNAMELC}projectconfig.cpp - -METASOURCES = AUTO - -servicedir = $(kde_servicesdir) -service_DATA = kdev%{APPNAMELC}.desktop - -rcdir = $(kde_datadir)/kdev%{APPNAMELC} -rc_DATA = kdev%{APPNAMELC}.rc - -appsharedir = $(kde_datadir)/kdev%{APPNAMELC} -appshare_DATA = diff --git a/languages/cpp/app_templates/tdevpart2/tdevpart-configure.in.in b/languages/cpp/app_templates/tdevpart2/tdevpart-configure.in.in deleted file mode 100644 index f08ae2b7..00000000 --- a/languages/cpp/app_templates/tdevpart2/tdevpart-configure.in.in +++ /dev/null @@ -1,10 +0,0 @@ -#MIN_CONFIG(3.0.0) - -AM_INIT_AUTOMAKE(%{APPNAMELC}, %{VERSION}) -AC_C_BIGENDIAN -AC_CHECK_TDEMAXPATHLEN - -KDE_CHECK_HEADERS([tdevelop/interfaces/tdevcore.h]) -KDE_CHECK_LIB([tdevelop],main, - [LIBTDEVELOP="-ltdevelop"]) -AC_SUBST(LIBTDEVELOP) diff --git a/languages/cpp/app_templates/tdevpart2/tdevpart.desktop b/languages/cpp/app_templates/tdevpart2/tdevpart.desktop deleted file mode 100644 index c3eb6a81..00000000 --- a/languages/cpp/app_templates/tdevpart2/tdevpart.desktop +++ /dev/null @@ -1,83 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Name=KDev%{APPNAME} -Name[nds]=KDev%{ProgNaam} -Name[sv]=TDevelop %{APPNAME} -Name[ta]=கெடெவ்%{APPNAME} -GenericName=%{APPNAME} Plugin -GenericName[br]=Lugent %{APPNAME} -GenericName[ca]=Connector per a %{APPNAME} -GenericName[da]=%{APPNAME} plugin -GenericName[de]=%{APPNAME}-Modul -GenericName[el]=Πρόσθετο %{APPNAME} -GenericName[es]=Complemento %{APPNAME} -GenericName[et]=%{APPNAME} plugin -GenericName[eu]=%{APPNAME} plugina -GenericName[fa]=وصلۀ %{APPNAME} -GenericName[fr]=Module externe pour %{APPNAME} -GenericName[ga]=Breiseán %{APPNAME} -GenericName[gl]=Extensión %{APPNAME} -GenericName[hu]=%{APPNAME}-bővítőmodul -GenericName[it]=Plugin %{APPNAME} -GenericName[ja]=%{APPNAME} プラグイン -GenericName[nds]=%{APPNAME}-Moduul -GenericName[ne]=%{APPNAME} प्लगइन -GenericName[nl]=%{APPNAME}-plugin -GenericName[pl]=Wtyczka %{APPNAME} -GenericName[pt]='Plugin' %{APPNAME} -GenericName[pt_BR]=Plug-in do %{APPNAME} -GenericName[ru]=Модуль %{APPNAME} -GenericName[sk]=%{APPNAME} modul -GenericName[sl]=Vstavek za %{APPNAME} -GenericName[sr]=%{APPNAME} прикључак -GenericName[sr@Latn]=%{APPNAME} priključak -GenericName[sv]=%{APPNAME} insticksprogram -GenericName[tr]=%{APPNAME} Eklentisi -GenericName[zh_CN]=%{APPNAME} 插件 -GenericName[zh_TW]=%{APPNAME} 外掛程式 -Comment=%{APPNAME} Description -Comment[br]=Deskrivadur %{APPNAME} -Comment[ca]=Descripció per a %{APPNAME} -Comment[da]=%{APPNAME} beskrivelse -Comment[de]=%{APPNAME} Beschreibung -Comment[el]=Περιγραφή %{APPNAME} -Comment[es]=Descripción de %{APPNAME} -Comment[et]=%{APPNAME} kirjeldus -Comment[eu]=%{APPNAME} deskribapena -Comment[fa]=توصیف %{APPNAME} -Comment[fr]=Description pour %{APPNAME} -Comment[ga]=Cur Síos %{APPNAME} -Comment[gl]=Descripción de %{APPNAME} -Comment[hu]=%{APPNAME} leírása -Comment[it]=Descrizione %{APPNAME} -Comment[ja]=%{APPNAME} 概説 -Comment[nds]=%{APPNAME}-Beschrieven -Comment[ne]=%{APPNAME} वर्णन -Comment[nl]=%{APPNAME} omschrijving -Comment[pl]=Opis %{APPNAME} -Comment[pt]=Descrição de %{APPNAME$} -Comment[pt_BR]=Descrição do %{APPNAME} -Comment[ru]=Описание %{APPNAME} -Comment[sk]=%{APPNAME} popis -Comment[sl]=Opis za %{APPNAME} -Comment[sr]=Опис за %{APPNAME} -Comment[sr@Latn]=Opis za %{APPNAME} -Comment[sv]=%{APPNAME} beskrivning -Comment[tr]=%{APPNAME} Tanımı -Comment[zh_CN]=%{APPNAME} 描述 -Comment[zh_TW]=%{APPNAME} 描述 -Icon=tdevelop -ServiceTypes=TDevelop/Plugin - -X-TDevelop-Plugin-Version=1 -X-TDevelop-Plugin-Homepage= -X-TDevelop-Plugin-BugsEmailAddress=%{EMAIL} -X-TDevelop-Plugin-Copyright=(C) by %{AUTHOR} - -X-TDevelop-Args= - -X-TDevelop-Scope=%{SCOPE} -X-TDE-Library=libtdev%{APPNAMELC} -X-TDevelop-Version=3 -X-TDevelop-Properties=%{PROPS} diff --git a/languages/cpp/app_templates/tdevpart2/tdevpart2.tdevtemplate b/languages/cpp/app_templates/tdevpart2/tdevpart2.tdevtemplate deleted file mode 100644 index b0431099..00000000 --- a/languages/cpp/app_templates/tdevpart2/tdevpart2.tdevtemplate +++ /dev/null @@ -1,276 +0,0 @@ -# TDE Config File -[General] -Name=TDevelop Plugin (Standalone build) -Name[ca]=Connector per a TDevelop (de construcció aïllada) -Name[da]=TDevelop plugin (Alenestående) -Name[de]=TDevelop-Modul (Unabhängige Erstellung) -Name[el]=Πρόσθετο TDevelop (Αυτόνομη κατασκευή) -Name[es]=Complemento para TDevelop (construcción independiente) -Name[et]=TDevelopi plugin (autonoomne) -Name[eu]=TDevelop plugin-a (eraikuntza autonomoak) -Name[fa]=وصلۀ TDevelop )ساخت خوداتکا( -Name[fr]=Module externe pour TDevelop (construction autonome) -Name[ga]=Breiseán TDevelop (Tógáil Shaorsheasaimh) -Name[gl]=Extensión para TDevelop (compilación independente) -Name[hu]=TDevelop-bővítőmodul (önálló) -Name[it]=Plugin di TDevelop (compilazione indipendente) -Name[ja]=TDevelop プラグイン (スタンダローンビルド) -Name[nds]=TDevelop-Moduul (Enkelprogramm) -Name[ne]=केडीई विकास प्लगइन (स्ट्यान्डअलोन निर्माण) -Name[nl]=TDevelop-plugin (standalone build) -Name[pl]=Wtyczka do TDevelopa (budowana oddzielnie) -Name[pt]='Plugin' do TDevelop (compilação autónoma) -Name[pt_BR]='Plugin' do TDevelop (compilação autónoma) -Name[ru]=Модуль TDevelop (внешний) -Name[sk]=TDevelop modul (samostatný build) -Name[sl]=Vstavek za TDevelop (samostojna izgradnja) -Name[sr]=Прикључак за TDevelop -Name[sr@Latn]=Priključak za TDevelop -Name[sv]=TDevelop-insticksprogram (att bygga fristående) -Name[tr]=TDevelop Eklentisi (Kendi başına çalışabilen) -Name[zh_CN]=TDevelop 插件(独立编译) -Name[zh_TW]=TDevelop 外掛程式(單獨建立) -Category=C++/TDevelop/ -Comment=This generates a KPart for TDevelop, to be built outside of the TDevelop source tree. -Comment[ca]=Genera una KPart per a TDevelop, per a que es construeixi fora de l'arbre de fonts de TDevelop. -Comment[da]=Dette genererer en KPart for TDevelop, til at bygges udenfor TDevelop's kildetræ. -Comment[de]=Hiermit wird eine Komponente (KPart) für TDevelop generiert, die außerhalb des Quelltextbaumes von TDevelop erstellt wird. -Comment[el]=Αυτό δημιουργεί ένα KPart για το TDevelop, για κατασκευή του έξω από το δέντρο πηγαίου κώδικα του TDevelop. -Comment[es]=Genera un KPart para TDevelop, para ser construido fuera del árbol de código fuente de TDevelop. -Comment[et]=TDevelopi KPart'i loomine, mida saab ehitada väljaspool TDevelopi lähtekoodipuud. -Comment[eu]=Honek TDevelop-en KPart bat sortzen du, TDevelop-en iturburu-zuhaitzetik at eraikitzeko. -Comment[fa]=یک KPart برای TDevelop، برای ساخته شدن در بیرون درخت منبع پروژه تولید می‌کند. -Comment[fr]=Génère un KPart pour TDevelop, à construire en dehors de l'arborescence des sources de TDevelop. -Comment[gl]=Isto xera un KPart para TDevelop que se compilará fóra da árbore de código de TDevelop. -Comment[hu]=Létrehoz egy TDevelop-bővítőmodult, mely a TDevelopos forráskönyvtáron kívül fordítható le. -Comment[it]=Genera un KPart per TDevelop, da compilare al di fuori dell'albero sorgente di TDevelop. -Comment[nds]=Dit stellt en KPart-Komponent för TDevelop op, dat buten den TDevelop-Bornboom kompileert warrt. -Comment[ne]=यसले केडीई विकास स्रोत ट्री बाहिर निर्माण हुने, केडीई विकासका लागि केडीई भाग उत्पन्न गर्दछ । -Comment[nl]=Dit genereert een KPart voor TDevelop, welke buiten de TDevelop sourcetree wordt gebouwd. -Comment[pl]=Generuje KPart dla TDevelopa budowane poza jego drzewem źródłowym. -Comment[pt]=Isto gera uma KPart para o TDevelop, de modo a ser compilada fora da árvore de código do TDevelop. -Comment[pt_BR]=Isto gera uma KPart para o TDevelop, de modo a ser compilada fora da árvore de código do TDevelop. -Comment[ru]=Создание компонента KPart для TDevelop со сборкой вне исходного кода TDevelop. -Comment[sk]=Vygenruje KPart pre TDevelop, tak aby ho bolo možné kompilovať mimo zdrojový strom TDevelop. -Comment[sr]=Ово прави KPart за TDevelop, за градњу изван TDevelop-овог изворног стабла. -Comment[sr@Latn]=Ovo pravi KPart za TDevelop, za gradnju izvan TDevelop-ovog izvornog stabla. -Comment[sv]=Detta skapar ett TDevelop-delprogram, att bygga utanför TDevelops källkodsträd. -Comment[tr]=Bu, TDevelop için, TDevelop kaynak ağacının dışında yapılacak, bir KPart yaratır. -Comment[zh_CN]=这将生成一个 TDevelop 的 KPart,可以在 TDevelop 源代码树之外编译。 -Comment[zh_TW]=產生一個 TDevelop 的 KPart 元件,建立在 TDevelop 程式源碼樹之外。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}_part.cpp -Archive=tdevpart2.tar.gz - -[SCOPE] -Type = value -ValueType=QString -Value= SCOPE -Comment= The scope of a plugin (Global, Project, Core) -Comment[ca]= L'àmbit d'un connector (Global, Project, Core) -Comment[da]= Et plugins omfang (Globalt, Projekt, Kerne) -Comment[de]= Gültigkeitsbereich eines Moduls (Global, Projekt, Kern) -Comment[el]= Η εμβέλεια ενός πρόσθετου (Καθολική, Έργο, Πυρήνας) -Comment[es]=El alcance de un complemento (global, proyecto, núcleo) -Comment[et]=Plugina skoop (globaalne, projekt, tuum) -Comment[eu]= Pluginaren barrutia (Globala, Projektua, Nukleoa) -Comment[fa]=دامنۀ یک وصله )سراسری، پروژه، هسته( -Comment[fr]= La portée d'un module externe (globale, projet, core) -Comment[ga]= Scóip an bhreiseáin (Comhchoiteann, Tionscadal, Ceartlár) -Comment[gl]=Ámbito da extensión (Global, Proxecto, Núcleo) -Comment[hu]=A modul hatóköre (globális, projektszintű, alap) -Comment[it]=Il contesto di un plugin (Globale, Progetto, Core) -Comment[nds]= Dat Rebeet vun en Moduul (Globaal, Projekt, Karn) -Comment[ne]= प्लगइनको क्षेत्र (विश्वव्यापी, परियोजना, कोर) -Comment[nl]=Het bereik van een plugin (globaal, project, core) -Comment[pl]=Przynależność wtyczki (globalna, projekt, część główna) -Comment[pt]=O âmbito de um 'plugin' (Global, Projecto, Núcleo) -Comment[pt_BR]=O âmbito de um 'plugin' (Global, Projecto, Núcleo) -Comment[ru]=Тип модуля (Global, Project, Core) -Comment[sk]=Rozsah module (globálny, projektový, jadrový) -Comment[sr]=Опсег прикључка (глобални, пројекат, језгро) -Comment[sr@Latn]=Opseg priključka (globalni, projekat, jezgro) -Comment[sv]=Insticksprogrammets omfattning (Global, Projekt, Kärna) -Comment[tr]=Bir eklentinin alanı (Genel, Proje, İç) -Comment[zh_CN]=插件的范围(全局、工程、核心) -Comment[zh_TW]=外掛程式的範圍(全域、專案、核心) -Default= Global - -[PROPS] -Type = value -ValueType=QString -Value= PROPS -Comment= The list of supported TDevelop properties -Comment[ca]= La llista de propietats suportades del TDevelop -Comment[da]= Listen af understøttede TDevelop-egenskaber -Comment[de]= Die Liste der unterstützten TDevelop-Eigenschaften -Comment[el]= Η λίστα των υποστηριζόμενων ιδιοτήτων του TDevelop -Comment[es]=La lista de propiedades de TDevelop soportadas -Comment[et]= TDevelopi toetatud omaduste nimekiri -Comment[eu]= Onartzen diren TDevelop-en propietateen zerrenda -Comment[fa]=فهرست ویژگیهای پشتیبانی‌شدۀ TDevelop -Comment[fr]= La liste des propriétés de TDevelop prises en charge -Comment[ga]= Liosta d'airíonna TDevelop a dtacaítear leo -Comment[gl]=Lista das propiedades de TDevelop soportadas -Comment[hu]=A támogatott TDevelop-tulajdonságok -Comment[it]=Lista delle proprietà supportate da TDevelop -Comment[nds]= De List mit ünnerstütt TDevelop-Egenschappen -Comment[ne]= केडीई विकास समर्थन गर्ने गुणको सूची -Comment[nl]=De lijst met ondersteunde TDevelop-properties -Comment[pl]= Lista obsługiwanych właściwości TDevelopa -Comment[pt]= A lista de propriedades do TDevelop suportadas -Comment[pt_BR]= A lista de propriedades do TDevelop suportadas -Comment[ru]=Список поддерживаемых типов модулей для TDevelop -Comment[sk]=Zoznam podporovaných vlastností TDevelop -Comment[sl]=Seznam podprtih lastnosti TDevelop -Comment[sr]=Листа подржаних TDevelop-ових својстава -Comment[sr@Latn]=Lista podržanih TDevelop-ovih svojstava -Comment[sv]=Listan med egenskaper i TDevelop som stöds -Comment[tr]=Desteklenen TDevelop özellikleri -Comment[zh_CN]=列出支持的 TDevelop 属性 -Comment[zh_TW]=支援的 TDevelop 屬性列表 -Default= - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[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 - -[FILE4] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE5] -Type=install -Source=%{src}/tdevpart-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}/tdevpart_part.cpp -Dest=%{dest}/src/%{APPNAMELC}part.cpp - -[FILE71] -Type=install -EscapeXML=true -Source=%{src}/globalconfigbase.ui -Dest=%{dest}/src/%{APPNAMELC}globalconfigbase.ui - -[FILE711] -Type=install -Source=%{src}/globalconfig.h -Dest=%{dest}/src/%{APPNAMELC}globalconfig.h - -[FILE712] -Type=install -Source=%{src}/globalconfig.cpp -Dest=%{dest}/src/%{APPNAMELC}globalconfig.cpp - -[FILE72] -Type=install -EscapeXML=true -Source=%{src}/projectconfigbase.ui -Dest=%{dest}/src/%{APPNAMELC}projectconfigbase.ui - -[FILE721] -Type=install -Source=%{src}/projectconfig.h -Dest=%{dest}/src/%{APPNAMELC}projectconfig.h - -[FILE722] -Type=install -Source=%{src}/projectconfig.cpp -Dest=%{dest}/src/%{APPNAMELC}projectconfig.cpp - -[FILE8] -Type=install -Source=%{src}/tdevpart_part.h -Dest=%{dest}/src/%{APPNAMELC}part.h - -[FILE9] -Type=install -Source=%{src}/tdevpart_widget.cpp -Dest=%{dest}/src/%{APPNAMELC}widget.cpp - -[FILE10] -Type=install -Source=%{src}/tdevpart_widget.h -Dest=%{dest}/src/%{APPNAMELC}widget.h - -[FILE11] -Type=install -EscapeXML=true -Source=%{src}/tdevpart_part.rc -Dest=%{dest}/src/kdev%{APPNAMELC}.rc - -[FILE12] -Type=install -Source=%{src}/tdevpart.desktop -Dest=%{dest}/src/kdev%{APPNAMELC}.desktop - -[FILE13] -Type=install -Source=%{src}/README.dox -Dest=%{dest}/src/README.dox - -[MSG] -Type=message -Comment=A TDevelop plugin was created in %{dest} -Comment[ca]=Un connector per a TDevelop ha estat creat en %{dest} -Comment[da]=Et TDevelop plugin blev oprettet i %{dest} -Comment[de]=Ein TDevelop-Modul wurde in %{dest} erstellt. -Comment[el]=Ένα πρόσθετο του TDevelop δημιουργήθηκε στο %{dest} -Comment[es]=Un complemento para TDevelop ha sido creado en %{dest} -Comment[et]=TDevelopi plugin loodi asukohta %{dest} -Comment[eu]=TDevelop plugin bat sortu da hemen: %{dest} -Comment[fa]=یک وصلۀ TDevelop در %{dest} ایجاد شد -Comment[fr]=Un module externe pour TDevelop a été créé dans %{dest} -Comment[ga]=Cruthaíodh breiseán TDevelop i %{dest} -Comment[gl]=Creouse unha extensión para TDevelop en %{dest} -Comment[hu]=Létrejött egy TDevelop-bővítőmodul itt: %{dest} -Comment[it]=È stato creato un plugin per TDevelop in %{dest} -Comment[ja]=TDevelop プラグインを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en TDevelop-Moduul opstellt -Comment[ne]=केडीई विकास प्लगइन %{dest} मा सिर्जना गरियो -Comment[nl]=Er is een TDevelop-plugin aangemaakt in %{dest} -Comment[pl]=Wtyczka do TDevelopa została utworzona w %{dest} -Comment[pt]=Foi criado um 'plugin' do TDevelop em %{dest} -Comment[pt_BR]=Foi criado um 'plugin' do TDevelop em %{dest} -Comment[ru]=Модуль TDevelop создан в %{dest} -Comment[sk]=TDevelop modul bol vytvorený v %{dest} -Comment[sl]=Vstavek za TDevelop je bil ustvarjen v %{dest} -Comment[sr]=Прикључак за TDevelop направљен је у %{dest} -Comment[sr@Latn]=Priključak za TDevelop napravljen je u %{dest} -Comment[sv]=Ett insticksprogram för TDevelop skapades i %{dest} -Comment[tr]=Bir TDevelop eklentisi %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 中创建了 TDevelop 插件 -Comment[zh_TW]=一個 TDevelop 外掛程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/tdevpart2/tdevpart_part.cpp b/languages/cpp/app_templates/tdevpart2/tdevpart_part.cpp deleted file mode 100644 index 0d846d38..00000000 --- a/languages/cpp/app_templates/tdevpart2/tdevpart_part.cpp +++ /dev/null @@ -1,183 +0,0 @@ -%{CPP_TEMPLATE} -#include "%{APPNAMELC}part.h" - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "%{APPNAMELC}widget.h" -#include "%{APPNAMELC}globalconfig.h" -#include "%{APPNAMELC}projectconfig.h" - -typedef TDevGenericFactory<%{APPNAME}Part> %{APPNAME}Factory; -TDevPluginInfo data("tdev%{APPNAMELC}"); -K_EXPORT_COMPONENT_FACTORY( libtdev%{APPNAMELC}, %{APPNAME}Factory( data ) ); - -#define GLOBALDOC_OPTIONS 1 -#define PROJECTDOC_OPTIONS 2 - -%{APPNAME}Part::%{APPNAME}Part(TQObject *parent, const char *name, const TQStringList &/*args*/) - : TDevPlugin(&data, parent, name ? name : "%{APPNAME}Part") -{ - setInstance(%{APPNAME}Factory::instance()); - setXMLFile("tdev%{APPNAMELC}.rc"); - - m_widget = new %{APPNAME}Widget(this); - m_widget->setCaption("widget caption"); - m_widget->setIcon(SmallIcon(info()->icon())); - - TQWhatsThis::add(m_widget, i18n("WHAT DOES THIS PART DO?")); - - // now you decide what should happen to the widget. Take a look at tdevcore.h - // or at other plugins how to embed it. - - // if you want to embed your widget as an outputview, simply uncomment - // the following line. - // mainWindow()->embedOutputView( m_widget, "name that should appear", "enter a tooltip" ); - - // if you want to embed your widget as a selectview (at the left), simply uncomment - // the following line. - // mainWindow()->embedSelectView( m_widget, "name that should appear", "enter a tooltip" ); - - // if you want to embed your widget as a selectview (at the right), simply uncomment - // the following line. - // mainWindow()->embedSelectViewRight( m_widget, "name that should appear", "enter a tooltip" ); - - setupActions(); - - m_configProxy = new ConfigWidgetProxy(core()); - m_configProxy->createGlobalConfigPage(i18n("%{APPNAME}"), GLOBALDOC_OPTIONS, info()->icon()); - m_configProxy->createProjectConfigPage(i18n("%{APPNAME}"), PROJECTDOC_OPTIONS, info()->icon()); - connect(m_configProxy, TQT_SIGNAL(insertConfigWidget(const KDialogBase*, TQWidget*, unsigned int )), - this, TQT_SLOT(insertConfigWidget(const KDialogBase*, TQWidget*, unsigned int))); - - connect(core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), - this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *))); - connect(core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened())); - connect(core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed())); - - - TQTimer::singleShot(0, this, TQT_SLOT(init())); -} - -%{APPNAME}Part::~%{APPNAME}Part() -{ -// if you embed a widget, you need to tell the mainwindow when you remove it -// if ( m_widget ) -// { -// mainWindow()->removeView( m_widget ); -// } - delete m_widget; - delete m_configProxy; -} - -void %{APPNAME}Part::init() -{ -// delayed initialization stuff goes here -} - -void %{APPNAME}Part::setupActions() -{ -// create XMLGUI actions here - action = new TDEAction(i18n("&Do Something..."), 0, - this, TQT_SLOT(doSomething()), actionCollection(), "plugin_action" ); - action->setToolTip(i18n("Do something")); - action->setWhatsThis(i18n("Do something

    Describe here what does this action do.")); -} - -void %{APPNAME}Part::insertConfigWidget(const KDialogBase *dlg, TQWidget *page, unsigned int pageNo) -{ -// create configuraton dialogs here - switch (pageNo) - { - case GLOBALDOC_OPTIONS: - { - %{APPNAME}GlobalConfig *w = new %{APPNAME}GlobalConfig(this, page, "global config"); - connect(dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept())); - break; - } - case PROJECTDOC_OPTIONS: - { - %{APPNAME}ProjectConfig *w = new %{APPNAME}ProjectConfig(this, page, "project config"); - connect(dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept())); - break; - } - } -} - -void %{APPNAME}Part::contextMenu(TQPopupMenu *popup, const Context *context) -{ -// put actions into the context menu here - if (context->hasType(Context::EditorContext)) - { - // editor context menu - const EditorContext *econtext = static_cast(context); - - // use context and plug actions here - action->plug(popup); - - // or create menu items on the fly - // int id = -1; - // id = popup->insertItem(i18n("Do Something Here"), - // this, TQT_SLOT(doSomething()) ); - // popup->setWhatsThis(id, i18n("Do something here

    Describe here what does this action do." - } - else if (context->hasType(Context::FileContext)) - { - // file context menu - const FileContext *fcontext = static_cast(context); - - //use context and plug actions here - } - else if (context->hasType(Context::ProjectModelItemContext)) - { - // project tree context menu - const ProjectModelItemContext *pcontext = static_cast(context); - - // use context and plug actions here - } - else if (context->hasType(Context::CodeModelItemContext)) - { - // class tree context menu - const CodeModelItemContext *mcontext = static_cast(context); - - // use context and plug actions here - } - else if (context->hasType(Context::DocumentationContext)) - { - // documentation viewer context menu - const DocumentationContext *dcontext = static_cast(context); - - // use context and plug actions here - } -} - -void %{APPNAME}Part::projectOpened() -{ -// do something when the project is opened -} - -void %{APPNAME}Part::projectClosed() -{ -// do something when the project is closed -} - -void %{APPNAME}Part::doSomething() -{ -// do something useful here instead of showing the message box - KMessageBox::information(m_widget, i18n("This action does nothing."), i18n("%{APPNAME} Plugin")); -} - -#include "%{APPNAMELC}part.moc" diff --git a/languages/cpp/app_templates/tdevpart2/tdevpart_part.h b/languages/cpp/app_templates/tdevpart2/tdevpart_part.h deleted file mode 100644 index 1d61dd0c..00000000 --- a/languages/cpp/app_templates/tdevpart2/tdevpart_part.h +++ /dev/null @@ -1,46 +0,0 @@ -%{H_TEMPLATE} -#ifndef TDEV%{APPNAMEUC}_H -#define TDEV%{APPNAMEUC}_H - -#include - -#include - -class TQPopupMenu; -class TDEAction; -class KDialogBase; -class Context; -class ConfigWidgetProxy; -class %{APPNAME}Widget; - -/** -Please read the README.dox file for more info about this part -*/ -class %{APPNAME}Part: public TDevPlugin -{ - Q_OBJECT - -public: - %{APPNAME}Part(TQObject *parent, const char *name, const TQStringList &args); - ~%{APPNAME}Part(); - -private slots: - void init(); - - void insertConfigWidget(const KDialogBase *dlg, TQWidget *page, unsigned int pageNo); - void contextMenu(TQPopupMenu *popup, const Context *context); - void projectOpened(); - void projectClosed(); - - void doSomething(); - -private: - void setupActions(); - - TDEAction *action; - - TQGuardedPtr<%{APPNAME}Widget> m_widget; - ConfigWidgetProxy *m_configProxy; -}; - -#endif diff --git a/languages/cpp/app_templates/tdevpart2/tdevpart_widget.cpp b/languages/cpp/app_templates/tdevpart2/tdevpart_widget.cpp deleted file mode 100644 index 1f356afd..00000000 --- a/languages/cpp/app_templates/tdevpart2/tdevpart_widget.cpp +++ /dev/null @@ -1,21 +0,0 @@ -%{CPP_TEMPLATE} -#include "%{APPNAMELC}widget.h" - -#include -#include -#include - -#include - -#include "%{APPNAMELC}part.h" - -%{APPNAME}Widget::%{APPNAME}Widget(%{APPNAME}Part *part) - : TQWidget(0, "%{APPNAMELC} widget"), m_part(part) -{ -} - -%{APPNAME}Widget::~%{APPNAME}Widget() -{ -} - -#include "%{APPNAMELC}widget.moc" diff --git a/languages/cpp/app_templates/tdevpart2/tdevpart_widget.h b/languages/cpp/app_templates/tdevpart2/tdevpart_widget.h deleted file mode 100644 index e9762de3..00000000 --- a/languages/cpp/app_templates/tdevpart2/tdevpart_widget.h +++ /dev/null @@ -1,24 +0,0 @@ -%{H_TEMPLATE} -#ifndef %{APPNAMEUC}_WIDGET_H -#define %{APPNAMEUC}_WIDGET_H - -#include -#include - -class TDevProject; -class %{APPNAME}Part; - -class %{APPNAME}Widget: public TQWidget -{ - Q_OBJECT - -public: - %{APPNAME}Widget(%{APPNAME}Part *part); - ~%{APPNAME}Widget(); - -private: - %{APPNAME}Part *m_part; -}; - - -#endif diff --git a/languages/cpp/app_templates/win32gui/CMakeLists.txt b/languages/cpp/app_templates/win32gui/CMakeLists.txt index 3e7bf9d0..09d0bc52 100644 --- a/languages/cpp/app_templates/win32gui/CMakeLists.txt +++ b/languages/cpp/app_templates/win32gui/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( win32gui.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/win32gui.tar.gz win32gui.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - win32gui.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + win32gui.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/win32gui/Makefile.am b/languages/cpp/app_templates/win32gui/Makefile.am index d315f718..a29fa6a8 100644 --- a/languages/cpp/app_templates/win32gui/Makefile.am +++ b/languages/cpp/app_templates/win32gui/Makefile.am @@ -4,10 +4,10 @@ dataFiles = app.cpp src-Makefile.am win32gui-Makefile.am win32gui-Makefile.cvs \ templateName = win32gui ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/win32gui/app.tdevelop b/languages/cpp/app_templates/win32gui/app.tdevelop index 53ec087b..eb9bbdbd 100644 --- a/languages/cpp/app_templates/win32gui/app.tdevelop +++ b/languages/cpp/app_templates/win32gui/app.tdevelop @@ -16,7 +16,7 @@ - + src/%{APPNAMELC} debug @@ -103,8 +103,8 @@ 0 - - + + clanlib opengl @@ -120,15 +120,15 @@ TDE Libraries (Doxygen) - - + + - - + + @@ -139,14 +139,14 @@ *.o,*.lo,CVS false - + .h .cpp - + true true @@ -164,8 +164,8 @@ TDElibs ksjembed - - + + @@ -182,11 +182,11 @@ true 10 - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/win32gui/win32gui.kdevtemplate b/languages/cpp/app_templates/win32gui/win32gui.kdevtemplate new file mode 100644 index 00000000..dec00262 --- /dev/null +++ b/languages/cpp/app_templates/win32gui/win32gui.kdevtemplate @@ -0,0 +1,137 @@ +# TDE Config File +[General] +Name=Simple Win32 GUI App. +Name[ca]=Simple aplicació per a Win32. +Name[da]=Simpelt Win32 GUI-program. +Name[de]=Einfache Win32-GUI-Anwendung +Name[el]=Απλή εφαρμογή γραφικού περιβάλλοντος Win32. +Name[es]=Aplicación sencilla para Win32 +Name[et]=Lihtne Win32 graafilise kasutajaliidese rakendus +Name[eu]=Win32 GUI aplikazio sinplea. +Name[fa]=کاربرد سادۀ ونک Win32 +Name[fr]=Interface graphique Win32 simple. +Name[ga]=Feidhmchlár Simplí Win32 le Comhéadan Grafach +Name[gl]=Aplicación sinxela Win32. +Name[hu]=Egyszerű Win32-alapú, grafikus felületű alkalmazás +Name[it]=Semplice applicazione GUI Win32. +Name[ja]=簡単な Win32 GUI アプリケーション +Name[nds]=Eenfach Win32-Böversietprogramm. +Name[ne]=साधारण Win32 GUI अनुप्रयोग +Name[nl]=Eenvoudige Win32 GUI-toepassing +Name[pl]=Prosty program Win32 +Name[pt]=Aplicação gráfica simples em Win32. +Name[pt_BR]=Aplicação gráfica simples em Win32. +Name[ru]=Простое графическое приложение Windows +Name[sk]=Jednoduchá Win32 GUI aplikácia +Name[sr]=Једноставан Win32 програм са GUI-јем. +Name[sr@Latn]=Jednostavan Win32 program sa GUI-jem. +Name[sv]=Enkelt Win32-program med grafiskt gränssnitt +Name[tr]=Basit Win32 Grafik Arayüz Uygulaması +Name[zh_CN]=简单的 Win32 GUI 应用程序 +Name[zh_TW]=簡單的 Win32 使用者介面應用程式 +Icon=win32gui.png +Category=C++ +Comment=Generates a shell project for crosscompiling Win32 projects. +Comment[ca]=Genera un projecte d'intèrpret de comandaments per a la compilació multi plataforma de projectes per a Win32. +Comment[da]=Genererer et skalprojekt for krydskompilering af Win32-projekter. +Comment[de]=Erstellt ein Shell-Projekt für plattformunabhängige Win32-Projekte. +Comment[el]=Δημιουργία ενός έργου κελύφους για μεταγλώττιση έργων Win32 σε διαφορετικές πλατφόρμες. +Comment[es]=Genera un proyecto de intérprete de órdenes para compilación multiplataforma de proyectos Win32. +Comment[et]=Shelliprojekti loomine Win32 projektide kompileerimiseks. +Comment[eu]=Win32 proiektuak konpilazio gurutzaturako shell proiektu bat sortzen du. +Comment[fa]=یک پروژۀ پوسته برای پروژه‌های Win32 ترجمۀ بین سکویی تولید می‌کند. +Comment[fr]=Génère un projet shell pour la compilation croisée de projets Win32. +Comment[gl]=Xera un proxecto shell para a compilación cruzada de proxectos Win32. +Comment[hu]=Létrehoz egy konzolos projektet Win32-projektek keresztfordításához. +Comment[it]=Genera un progetto di shell per progetti Win32 multi compilanti. +Comment[nds]=Stellt en Konsoolprojekt för't Krüüzkompileren vun Win32-Projekten op. +Comment[ne]=क्रसकम्पाइलिङ Win32 परियोजनाका लागि शेल परियोजना उत्पन्न गर्दछ +Comment[nl]=Genereert een shellproject voor crosscompilerende Win32-projecten. +Comment[pl]=Generuje powłokę do kompilacji projektów dla Win32. +Comment[pt]=Gera um projecto para poder compilar projectos em Win32. +Comment[pt_BR]=Gera um projecto para poder compilar projectos em Win32. +Comment[ru]=Создание проекта для кросс-компиляции проектов Win32. +Comment[sk]=Vygenruje shell projekt pre kompiláciu Win32 projektov. +Comment[sr]=Прави пројекат за прекопревођење Win32 пројеката. +Comment[sr@Latn]=Pravi projekat za prekoprevođenje Win32 projekata. +Comment[sv]=Skapar ett skalprojekt för korskompilering av Win32-projekt. +Comment[tr]=Win32 projelerini karşıderlemek için bir kabul projesi yarat. +Comment[zh_CN]=生成跨平台编译的 Win32 工程的外壳工程。 +Comment[zh_TW]=產生一個 shell 專案,可在 Win32 跨平台編譯。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=src/%{APPNAMELC}.cpp +Archive=win32gui.tar.gz + +[INCADMIN] +Type=include +File=%{tdevelop}/template-common/incadmin.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=%{src}/win32gui-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE3] +Type=install +Source=%{src}/win32gui-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE4] +Type=install +Source=%{src}/win32gui-configure.in +Dest=%{dest}/configure.in + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE5] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE6] +Type=install +Source=%{src}/app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[MSG] +Type=message +Comment=For this project to compile and run you need both Wine and MinGW installed. +Comment[ca]=Per a compilar i executar aquest projecte us caldrà instal·lar Wine i MinGW. +Comment[da]=For at dette projekt skal kompilere og køre har du brug for at have både Wine og MinGW installeret. +Comment[de]=Um dieses Projekt kompilieren und ausführen zu können, muss sowohl Wine als auch MinGW installiert sein. +Comment[el]=Για να μεταγλωττιστεί και να εκτελεστεί αυτό το έργο χρειάζεστε τόσο το Wine όσο και το MinGW εγκατεστημένα. +Comment[es]=Para compilar y ejecutar este proyecto necesitará tener instalados Wine y MinGW. +Comment[et]=Selle projekti kompileerimiseks ja käivitamiseks peab olema paigaldatud nii Wine kui MinGW. +Comment[eu]=Proiektu hau konpilatzeko eta exekutatzeko Wine eta MinGw instalatuta izan behar dituzu. +Comment[fa]=برای ترجمه و اجرای این پروژه، هم نیاز به نصب Wine و هم نیاز به MinGW دارید. +Comment[fr]=Pour que ce projet compile et s'exécute, vous devez installer Wine et MinGW. +Comment[gl]=Para poder compilar e executar este proxecto necesita ter instalados Wine e MinGW. +Comment[hu]=A projekt lefordításához és futtatásához szükség van a Wine és a MinGW telepítésére. +Comment[it]=Per compilare ed eseguire questo progetto dei avere sia Wine che MinGW installati. +Comment[nds]=Wine un MinGW mööt installeert wesen, wenn Du dit Projekt kompileren un utföhren wullt. +Comment[ne]=यो परियोजनाका लागि कम्पाइल गर्न र चलाउन तपाईँले वाइन र MinGW स्थापना गरेको हुनुपर्दछ । +Comment[nl]=Om dit project te kunnen compileren en uitvoeren hebt u Wine en MinGW nodig. +Comment[pl]=Do kompilacji takiego projektu potrzebne są Wine oraz MinGW. +Comment[pt]=Para este projecto poder ser compilado e executado é necessário ter tanto o Wine como o MinGW instalados. +Comment[pt_BR]=Para este projecto poder ser compilado e executado é necessário ter tanto o Wine como o MinGW instalados. +Comment[ru]=Для сборки и запуска этого проекта вам необходимо установить Wine и MinGW . +Comment[sk]=Na kompiláciu tohoto projektu potrebujete mať nainštalované Wine a MinGW. +Comment[sr]=Да би се овај пројекат превео и покренуо, и Wine и MinGW морају бити инсталирани. +Comment[sr@Latn]=Da bi se ovaj projekat preveo i pokrenuo, i Wine i MinGW moraju biti instalirani. +Comment[sv]=För att projektet ska kompileras och köras behöver du ha installerat både Wine och MinGW. +Comment[tr]=Bu projenin derlenmesi için Wine ve MinGW'nin kurulu olması lazım. +Comment[zh_CN]=要让此工程能够编译并运行,您需要同时安装 Wine 和 MinGW。 +Comment[zh_TW]=這個專案要編譯,您需要安裝 Wine 與 MinGW。 + diff --git a/languages/cpp/app_templates/win32gui/win32gui.tdevtemplate b/languages/cpp/app_templates/win32gui/win32gui.tdevtemplate deleted file mode 100644 index cd15f549..00000000 --- a/languages/cpp/app_templates/win32gui/win32gui.tdevtemplate +++ /dev/null @@ -1,137 +0,0 @@ -# TDE Config File -[General] -Name=Simple Win32 GUI App. -Name[ca]=Simple aplicació per a Win32. -Name[da]=Simpelt Win32 GUI-program. -Name[de]=Einfache Win32-GUI-Anwendung -Name[el]=Απλή εφαρμογή γραφικού περιβάλλοντος Win32. -Name[es]=Aplicación sencilla para Win32 -Name[et]=Lihtne Win32 graafilise kasutajaliidese rakendus -Name[eu]=Win32 GUI aplikazio sinplea. -Name[fa]=کاربرد سادۀ ونک Win32 -Name[fr]=Interface graphique Win32 simple. -Name[ga]=Feidhmchlár Simplí Win32 le Comhéadan Grafach -Name[gl]=Aplicación sinxela Win32. -Name[hu]=Egyszerű Win32-alapú, grafikus felületű alkalmazás -Name[it]=Semplice applicazione GUI Win32. -Name[ja]=簡単な Win32 GUI アプリケーション -Name[nds]=Eenfach Win32-Böversietprogramm. -Name[ne]=साधारण Win32 GUI अनुप्रयोग -Name[nl]=Eenvoudige Win32 GUI-toepassing -Name[pl]=Prosty program Win32 -Name[pt]=Aplicação gráfica simples em Win32. -Name[pt_BR]=Aplicação gráfica simples em Win32. -Name[ru]=Простое графическое приложение Windows -Name[sk]=Jednoduchá Win32 GUI aplikácia -Name[sr]=Једноставан Win32 програм са GUI-јем. -Name[sr@Latn]=Jednostavan Win32 program sa GUI-jem. -Name[sv]=Enkelt Win32-program med grafiskt gränssnitt -Name[tr]=Basit Win32 Grafik Arayüz Uygulaması -Name[zh_CN]=简单的 Win32 GUI 应用程序 -Name[zh_TW]=簡單的 Win32 使用者介面應用程式 -Icon=win32gui.png -Category=C++ -Comment=Generates a shell project for crosscompiling Win32 projects. -Comment[ca]=Genera un projecte d'intèrpret de comandaments per a la compilació multi plataforma de projectes per a Win32. -Comment[da]=Genererer et skalprojekt for krydskompilering af Win32-projekter. -Comment[de]=Erstellt ein Shell-Projekt für plattformunabhängige Win32-Projekte. -Comment[el]=Δημιουργία ενός έργου κελύφους για μεταγλώττιση έργων Win32 σε διαφορετικές πλατφόρμες. -Comment[es]=Genera un proyecto de intérprete de órdenes para compilación multiplataforma de proyectos Win32. -Comment[et]=Shelliprojekti loomine Win32 projektide kompileerimiseks. -Comment[eu]=Win32 proiektuak konpilazio gurutzaturako shell proiektu bat sortzen du. -Comment[fa]=یک پروژۀ پوسته برای پروژه‌های Win32 ترجمۀ بین سکویی تولید می‌کند. -Comment[fr]=Génère un projet shell pour la compilation croisée de projets Win32. -Comment[gl]=Xera un proxecto shell para a compilación cruzada de proxectos Win32. -Comment[hu]=Létrehoz egy konzolos projektet Win32-projektek keresztfordításához. -Comment[it]=Genera un progetto di shell per progetti Win32 multi compilanti. -Comment[nds]=Stellt en Konsoolprojekt för't Krüüzkompileren vun Win32-Projekten op. -Comment[ne]=क्रसकम्पाइलिङ Win32 परियोजनाका लागि शेल परियोजना उत्पन्न गर्दछ -Comment[nl]=Genereert een shellproject voor crosscompilerende Win32-projecten. -Comment[pl]=Generuje powłokę do kompilacji projektów dla Win32. -Comment[pt]=Gera um projecto para poder compilar projectos em Win32. -Comment[pt_BR]=Gera um projecto para poder compilar projectos em Win32. -Comment[ru]=Создание проекта для кросс-компиляции проектов Win32. -Comment[sk]=Vygenruje shell projekt pre kompiláciu Win32 projektov. -Comment[sr]=Прави пројекат за прекопревођење Win32 пројеката. -Comment[sr@Latn]=Pravi projekat za prekoprevođenje Win32 projekata. -Comment[sv]=Skapar ett skalprojekt för korskompilering av Win32-projekt. -Comment[tr]=Win32 projelerini karşıderlemek için bir kabul projesi yarat. -Comment[zh_CN]=生成跨平台编译的 Win32 工程的外壳工程。 -Comment[zh_TW]=產生一個 shell 專案,可在 Win32 跨平台編譯。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=src/%{APPNAMELC}.cpp -Archive=win32gui.tar.gz - -[INCADMIN] -Type=include -File=%{tdevelop}/template-common/incadmin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/win32gui-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE3] -Type=install -Source=%{src}/win32gui-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE4] -Type=install -Source=%{src}/win32gui-configure.in -Dest=%{dest}/configure.in - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE5] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE6] -Type=install -Source=%{src}/app.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[MSG] -Type=message -Comment=For this project to compile and run you need both Wine and MinGW installed. -Comment[ca]=Per a compilar i executar aquest projecte us caldrà instal·lar Wine i MinGW. -Comment[da]=For at dette projekt skal kompilere og køre har du brug for at have både Wine og MinGW installeret. -Comment[de]=Um dieses Projekt kompilieren und ausführen zu können, muss sowohl Wine als auch MinGW installiert sein. -Comment[el]=Για να μεταγλωττιστεί και να εκτελεστεί αυτό το έργο χρειάζεστε τόσο το Wine όσο και το MinGW εγκατεστημένα. -Comment[es]=Para compilar y ejecutar este proyecto necesitará tener instalados Wine y MinGW. -Comment[et]=Selle projekti kompileerimiseks ja käivitamiseks peab olema paigaldatud nii Wine kui MinGW. -Comment[eu]=Proiektu hau konpilatzeko eta exekutatzeko Wine eta MinGw instalatuta izan behar dituzu. -Comment[fa]=برای ترجمه و اجرای این پروژه، هم نیاز به نصب Wine و هم نیاز به MinGW دارید. -Comment[fr]=Pour que ce projet compile et s'exécute, vous devez installer Wine et MinGW. -Comment[gl]=Para poder compilar e executar este proxecto necesita ter instalados Wine e MinGW. -Comment[hu]=A projekt lefordításához és futtatásához szükség van a Wine és a MinGW telepítésére. -Comment[it]=Per compilare ed eseguire questo progetto dei avere sia Wine che MinGW installati. -Comment[nds]=Wine un MinGW mööt installeert wesen, wenn Du dit Projekt kompileren un utföhren wullt. -Comment[ne]=यो परियोजनाका लागि कम्पाइल गर्न र चलाउन तपाईँले वाइन र MinGW स्थापना गरेको हुनुपर्दछ । -Comment[nl]=Om dit project te kunnen compileren en uitvoeren hebt u Wine en MinGW nodig. -Comment[pl]=Do kompilacji takiego projektu potrzebne są Wine oraz MinGW. -Comment[pt]=Para este projecto poder ser compilado e executado é necessário ter tanto o Wine como o MinGW instalados. -Comment[pt_BR]=Para este projecto poder ser compilado e executado é necessário ter tanto o Wine como o MinGW instalados. -Comment[ru]=Для сборки и запуска этого проекта вам необходимо установить Wine и MinGW . -Comment[sk]=Na kompiláciu tohoto projektu potrebujete mať nainštalované Wine a MinGW. -Comment[sr]=Да би се овај пројекат превео и покренуо, и Wine и MinGW морају бити инсталирани. -Comment[sr@Latn]=Da bi se ovaj projekat preveo i pokrenuo, i Wine i MinGW moraju biti instalirani. -Comment[sv]=För att projektet ska kompileras och köras behöver du ha installerat både Wine och MinGW. -Comment[tr]=Bu projenin derlenmesi için Wine ve MinGW'nin kurulu olması lazım. -Comment[zh_CN]=要让此工程能够编译并运行,您需要同时安装 Wine 和 MinGW。 -Comment[zh_TW]=這個專案要編譯,您需要安裝 Wine 與 MinGW。 - diff --git a/languages/cpp/app_templates/win32hello/CMakeLists.txt b/languages/cpp/app_templates/win32hello/CMakeLists.txt index 9cc35db0..bc1c8d80 100644 --- a/languages/cpp/app_templates/win32hello/CMakeLists.txt +++ b/languages/cpp/app_templates/win32hello/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( win32hello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/win32hello.tar.gz win32hello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - win32hello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + win32hello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/win32hello/Makefile.am b/languages/cpp/app_templates/win32hello/Makefile.am index 813c591f..a55bcebc 100644 --- a/languages/cpp/app_templates/win32hello/Makefile.am +++ b/languages/cpp/app_templates/win32hello/Makefile.am @@ -4,10 +4,10 @@ dataFiles = app.cpp src-Makefile.am win32-Makefile.am win32-Makefile.cvs \ templateName = win32hello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/win32hello/app.tdevelop b/languages/cpp/app_templates/win32hello/app.tdevelop index 3ee2b1af..672646c4 100644 --- a/languages/cpp/app_templates/win32hello/app.tdevelop +++ b/languages/cpp/app_templates/win32hello/app.tdevelop @@ -16,7 +16,7 @@ - + src/%{APPNAMELC} default @@ -75,8 +75,8 @@ 0 - - + + clanlib opengl @@ -92,15 +92,15 @@ TDE Libraries (Doxygen) - - + + - - + + @@ -111,14 +111,14 @@ *.o,*.lo,CVS false - + .h .cpp - + true true @@ -136,8 +136,8 @@ TDElibs ksjembed - - + + @@ -154,11 +154,11 @@ true 10 - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/win32hello/win32hello.kdevtemplate b/languages/cpp/app_templates/win32hello/win32hello.kdevtemplate new file mode 100644 index 00000000..3b5f4f3e --- /dev/null +++ b/languages/cpp/app_templates/win32hello/win32hello.kdevtemplate @@ -0,0 +1,136 @@ +# TDE Config File +[General] +Name=Simple Win32 Hello World +Name[ca]=Simple Hello World per a Win32 +Name[da]=Simpelt Win32 Goddag verden +Name[de]=Einfaches Win32-"Hello World"-Programm +Name[el]=Απλό Γεια σου Κόσμε Win32 +Name[es]=Sencillo programa «Hola mundo» para Win32 +Name[et]=Lihtne Win32 "Tere, maailm" +Name[eu]=Win32 "Kaixo mundua" aplikazio sinple bat +Name[fa]=Hello World سادۀ Win32 +Name[fr]=« Bonjour monde » Win32 simple +Name[ga]=Ríomhchlár simplí "Hello World" le haghaidh Win32 +Name[gl]=Aplicación Win32 sinxela Ola mundo +Name[hu]=Win32-alapú Hello world program +Name[it]=Semplice "Hello World" Win32 +Name[nds]=Eenfach Win32-"Moin Welt"-Programm +Name[ne]=साधारण Win32 हेल्लो वोल्ड +Name[nl]=Eenvoudige Win32 Hello World +Name[pl]=Prosty program Witaj świecie dla Win32 +Name[pt]=Olá Mundo Simples em Win32 +Name[pt_BR]=Olá Mundo Simples em Win32 +Name[ru]=Простое приложение Hello World для Windows +Name[sk]=Jenoduchý Ahoj svet Win32 program +Name[sr]=Једноставан Win32 „Здраво свете“ +Name[sr@Latn]=Jednostavan Win32 „Zdravo svete“ +Name[sv]=Enkelt Win32 Hello World +Name[tr]=Basit Win32 Merhaba Dünya +Name[zh_CN]=简单的 Win32 Hello World +Name[zh_TW]=簡單的 Win32 Hello World +Icon=win32hello.png +Category=C++ +Comment=Generates a shell project for crosscompiling Win32 projects. +Comment[ca]=Genera un projecte d'intèrpret de comandaments per a la compilació multi plataforma de projectes per a Win32. +Comment[da]=Genererer et skalprojekt for krydskompilering af Win32-projekter. +Comment[de]=Erstellt ein Shell-Projekt für plattformunabhängige Win32-Projekte. +Comment[el]=Δημιουργία ενός έργου κελύφους για μεταγλώττιση έργων Win32 σε διαφορετικές πλατφόρμες. +Comment[es]=Genera un proyecto de intérprete de órdenes para compilación multiplataforma de proyectos Win32. +Comment[et]=Shelliprojekti loomine Win32 projektide kompileerimiseks. +Comment[eu]=Win32 proiektuak konpilazio gurutzaturako shell proiektu bat sortzen du. +Comment[fa]=یک پروژۀ پوسته برای پروژه‌های Win32 ترجمۀ بین سکویی تولید می‌کند. +Comment[fr]=Génère un projet shell pour la compilation croisée de projets Win32. +Comment[gl]=Xera un proxecto shell para a compilación cruzada de proxectos Win32. +Comment[hu]=Létrehoz egy konzolos projektet Win32-projektek keresztfordításához. +Comment[it]=Genera un progetto di shell per progetti Win32 multi compilanti. +Comment[nds]=Stellt en Konsoolprojekt för't Krüüzkompileren vun Win32-Projekten op. +Comment[ne]=क्रसकम्पाइलिङ Win32 परियोजनाका लागि शेल परियोजना उत्पन्न गर्दछ +Comment[nl]=Genereert een shellproject voor crosscompilerende Win32-projecten. +Comment[pl]=Generuje powłokę do kompilacji projektów dla Win32. +Comment[pt]=Gera um projecto para poder compilar projectos em Win32. +Comment[pt_BR]=Gera um projecto para poder compilar projectos em Win32. +Comment[ru]=Создание проекта для кросс-компиляции проектов Win32. +Comment[sk]=Vygenruje shell projekt pre kompiláciu Win32 projektov. +Comment[sr]=Прави пројекат за прекопревођење Win32 пројеката. +Comment[sr@Latn]=Pravi projekat za prekoprevođenje Win32 projekata. +Comment[sv]=Skapar ett skalprojekt för korskompilering av Win32-projekt. +Comment[tr]=Win32 projelerini karşıderlemek için bir kabul projesi yarat. +Comment[zh_CN]=生成跨平台编译的 Win32 工程的外壳工程。 +Comment[zh_TW]=產生一個 shell 專案,可在 Win32 跨平台編譯。 +FileTemplates=h,CStyle,cpp,CStyle +ShowFilesAfterGeneration=src/%{APPNAMELC}.cpp +Archive=win32hello.tar.gz + +[INCADMIN] +Type=include +File=%{tdevelop}/template-common/incadmin.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=%{src}/win32-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE3] +Type=install +Source=%{src}/win32-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE4] +Type=install +Source=%{src}/win32-configure.in +Dest=%{dest}/configure.in + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE5] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE6] +Type=install +Source=%{src}/app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[MSG] +Type=message +Comment=For this project to compile and run you need both Wine and MinGW installed. +Comment[ca]=Per a compilar i executar aquest projecte us caldrà instal·lar Wine i MinGW. +Comment[da]=For at dette projekt skal kompilere og køre har du brug for at have både Wine og MinGW installeret. +Comment[de]=Um dieses Projekt kompilieren und ausführen zu können, muss sowohl Wine als auch MinGW installiert sein. +Comment[el]=Για να μεταγλωττιστεί και να εκτελεστεί αυτό το έργο χρειάζεστε τόσο το Wine όσο και το MinGW εγκατεστημένα. +Comment[es]=Para compilar y ejecutar este proyecto necesitará tener instalados Wine y MinGW. +Comment[et]=Selle projekti kompileerimiseks ja käivitamiseks peab olema paigaldatud nii Wine kui MinGW. +Comment[eu]=Proiektu hau konpilatzeko eta exekutatzeko Wine eta MinGw instalatuta izan behar dituzu. +Comment[fa]=برای ترجمه و اجرای این پروژه، هم نیاز به نصب Wine و هم نیاز به MinGW دارید. +Comment[fr]=Pour que ce projet compile et s'exécute, vous devez installer Wine et MinGW. +Comment[gl]=Para poder compilar e executar este proxecto necesita ter instalados Wine e MinGW. +Comment[hu]=A projekt lefordításához és futtatásához szükség van a Wine és a MinGW telepítésére. +Comment[it]=Per compilare ed eseguire questo progetto dei avere sia Wine che MinGW installati. +Comment[nds]=Wine un MinGW mööt installeert wesen, wenn Du dit Projekt kompileren un utföhren wullt. +Comment[ne]=यो परियोजनाका लागि कम्पाइल गर्न र चलाउन तपाईँले वाइन र MinGW स्थापना गरेको हुनुपर्दछ । +Comment[nl]=Om dit project te kunnen compileren en uitvoeren hebt u Wine en MinGW nodig. +Comment[pl]=Do kompilacji takiego projektu potrzebne są Wine oraz MinGW. +Comment[pt]=Para este projecto poder ser compilado e executado é necessário ter tanto o Wine como o MinGW instalados. +Comment[pt_BR]=Para este projecto poder ser compilado e executado é necessário ter tanto o Wine como o MinGW instalados. +Comment[ru]=Для сборки и запуска этого проекта вам необходимо установить Wine и MinGW . +Comment[sk]=Na kompiláciu tohoto projektu potrebujete mať nainštalované Wine a MinGW. +Comment[sr]=Да би се овај пројекат превео и покренуо, и Wine и MinGW морају бити инсталирани. +Comment[sr@Latn]=Da bi se ovaj projekat preveo i pokrenuo, i Wine i MinGW moraju biti instalirani. +Comment[sv]=För att projektet ska kompileras och köras behöver du ha installerat både Wine och MinGW. +Comment[tr]=Bu projenin derlenmesi için Wine ve MinGW'nin kurulu olması lazım. +Comment[zh_CN]=要让此工程能够编译并运行,您需要同时安装 Wine 和 MinGW。 +Comment[zh_TW]=這個專案要編譯,您需要安裝 Wine 與 MinGW。 + diff --git a/languages/cpp/app_templates/win32hello/win32hello.tdevtemplate b/languages/cpp/app_templates/win32hello/win32hello.tdevtemplate deleted file mode 100644 index ce8804a7..00000000 --- a/languages/cpp/app_templates/win32hello/win32hello.tdevtemplate +++ /dev/null @@ -1,136 +0,0 @@ -# TDE Config File -[General] -Name=Simple Win32 Hello World -Name[ca]=Simple Hello World per a Win32 -Name[da]=Simpelt Win32 Goddag verden -Name[de]=Einfaches Win32-"Hello World"-Programm -Name[el]=Απλό Γεια σου Κόσμε Win32 -Name[es]=Sencillo programa «Hola mundo» para Win32 -Name[et]=Lihtne Win32 "Tere, maailm" -Name[eu]=Win32 "Kaixo mundua" aplikazio sinple bat -Name[fa]=Hello World سادۀ Win32 -Name[fr]=« Bonjour monde » Win32 simple -Name[ga]=Ríomhchlár simplí "Hello World" le haghaidh Win32 -Name[gl]=Aplicación Win32 sinxela Ola mundo -Name[hu]=Win32-alapú Hello world program -Name[it]=Semplice "Hello World" Win32 -Name[nds]=Eenfach Win32-"Moin Welt"-Programm -Name[ne]=साधारण Win32 हेल्लो वोल्ड -Name[nl]=Eenvoudige Win32 Hello World -Name[pl]=Prosty program Witaj świecie dla Win32 -Name[pt]=Olá Mundo Simples em Win32 -Name[pt_BR]=Olá Mundo Simples em Win32 -Name[ru]=Простое приложение Hello World для Windows -Name[sk]=Jenoduchý Ahoj svet Win32 program -Name[sr]=Једноставан Win32 „Здраво свете“ -Name[sr@Latn]=Jednostavan Win32 „Zdravo svete“ -Name[sv]=Enkelt Win32 Hello World -Name[tr]=Basit Win32 Merhaba Dünya -Name[zh_CN]=简单的 Win32 Hello World -Name[zh_TW]=簡單的 Win32 Hello World -Icon=win32hello.png -Category=C++ -Comment=Generates a shell project for crosscompiling Win32 projects. -Comment[ca]=Genera un projecte d'intèrpret de comandaments per a la compilació multi plataforma de projectes per a Win32. -Comment[da]=Genererer et skalprojekt for krydskompilering af Win32-projekter. -Comment[de]=Erstellt ein Shell-Projekt für plattformunabhängige Win32-Projekte. -Comment[el]=Δημιουργία ενός έργου κελύφους για μεταγλώττιση έργων Win32 σε διαφορετικές πλατφόρμες. -Comment[es]=Genera un proyecto de intérprete de órdenes para compilación multiplataforma de proyectos Win32. -Comment[et]=Shelliprojekti loomine Win32 projektide kompileerimiseks. -Comment[eu]=Win32 proiektuak konpilazio gurutzaturako shell proiektu bat sortzen du. -Comment[fa]=یک پروژۀ پوسته برای پروژه‌های Win32 ترجمۀ بین سکویی تولید می‌کند. -Comment[fr]=Génère un projet shell pour la compilation croisée de projets Win32. -Comment[gl]=Xera un proxecto shell para a compilación cruzada de proxectos Win32. -Comment[hu]=Létrehoz egy konzolos projektet Win32-projektek keresztfordításához. -Comment[it]=Genera un progetto di shell per progetti Win32 multi compilanti. -Comment[nds]=Stellt en Konsoolprojekt för't Krüüzkompileren vun Win32-Projekten op. -Comment[ne]=क्रसकम्पाइलिङ Win32 परियोजनाका लागि शेल परियोजना उत्पन्न गर्दछ -Comment[nl]=Genereert een shellproject voor crosscompilerende Win32-projecten. -Comment[pl]=Generuje powłokę do kompilacji projektów dla Win32. -Comment[pt]=Gera um projecto para poder compilar projectos em Win32. -Comment[pt_BR]=Gera um projecto para poder compilar projectos em Win32. -Comment[ru]=Создание проекта для кросс-компиляции проектов Win32. -Comment[sk]=Vygenruje shell projekt pre kompiláciu Win32 projektov. -Comment[sr]=Прави пројекат за прекопревођење Win32 пројеката. -Comment[sr@Latn]=Pravi projekat za prekoprevođenje Win32 projekata. -Comment[sv]=Skapar ett skalprojekt för korskompilering av Win32-projekt. -Comment[tr]=Win32 projelerini karşıderlemek için bir kabul projesi yarat. -Comment[zh_CN]=生成跨平台编译的 Win32 工程的外壳工程。 -Comment[zh_TW]=產生一個 shell 專案,可在 Win32 跨平台編譯。 -FileTemplates=h,CStyle,cpp,CStyle -ShowFilesAfterGeneration=src/%{APPNAMELC}.cpp -Archive=win32hello.tar.gz - -[INCADMIN] -Type=include -File=%{tdevelop}/template-common/incadmin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/win32-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE3] -Type=install -Source=%{src}/win32-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE4] -Type=install -Source=%{src}/win32-configure.in -Dest=%{dest}/configure.in - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE5] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE6] -Type=install -Source=%{src}/app.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[MSG] -Type=message -Comment=For this project to compile and run you need both Wine and MinGW installed. -Comment[ca]=Per a compilar i executar aquest projecte us caldrà instal·lar Wine i MinGW. -Comment[da]=For at dette projekt skal kompilere og køre har du brug for at have både Wine og MinGW installeret. -Comment[de]=Um dieses Projekt kompilieren und ausführen zu können, muss sowohl Wine als auch MinGW installiert sein. -Comment[el]=Για να μεταγλωττιστεί και να εκτελεστεί αυτό το έργο χρειάζεστε τόσο το Wine όσο και το MinGW εγκατεστημένα. -Comment[es]=Para compilar y ejecutar este proyecto necesitará tener instalados Wine y MinGW. -Comment[et]=Selle projekti kompileerimiseks ja käivitamiseks peab olema paigaldatud nii Wine kui MinGW. -Comment[eu]=Proiektu hau konpilatzeko eta exekutatzeko Wine eta MinGw instalatuta izan behar dituzu. -Comment[fa]=برای ترجمه و اجرای این پروژه، هم نیاز به نصب Wine و هم نیاز به MinGW دارید. -Comment[fr]=Pour que ce projet compile et s'exécute, vous devez installer Wine et MinGW. -Comment[gl]=Para poder compilar e executar este proxecto necesita ter instalados Wine e MinGW. -Comment[hu]=A projekt lefordításához és futtatásához szükség van a Wine és a MinGW telepítésére. -Comment[it]=Per compilare ed eseguire questo progetto dei avere sia Wine che MinGW installati. -Comment[nds]=Wine un MinGW mööt installeert wesen, wenn Du dit Projekt kompileren un utföhren wullt. -Comment[ne]=यो परियोजनाका लागि कम्पाइल गर्न र चलाउन तपाईँले वाइन र MinGW स्थापना गरेको हुनुपर्दछ । -Comment[nl]=Om dit project te kunnen compileren en uitvoeren hebt u Wine en MinGW nodig. -Comment[pl]=Do kompilacji takiego projektu potrzebne są Wine oraz MinGW. -Comment[pt]=Para este projecto poder ser compilado e executado é necessário ter tanto o Wine como o MinGW instalados. -Comment[pt_BR]=Para este projecto poder ser compilado e executado é necessário ter tanto o Wine como o MinGW instalados. -Comment[ru]=Для сборки и запуска этого проекта вам необходимо установить Wine и MinGW . -Comment[sk]=Na kompiláciu tohoto projektu potrebujete mať nainštalované Wine a MinGW. -Comment[sr]=Да би се овај пројекат превео и покренуо, и Wine и MinGW морају бити инсталирани. -Comment[sr@Latn]=Da bi se ovaj projekat preveo i pokrenuo, i Wine i MinGW moraju biti instalirani. -Comment[sv]=För att projektet ska kompileras och köras behöver du ha installerat både Wine och MinGW. -Comment[tr]=Bu projenin derlenmesi için Wine ve MinGW'nin kurulu olması lazım. -Comment[zh_CN]=要让此工程能够编译并运行,您需要同时安装 Wine 和 MinGW。 -Comment[zh_TW]=這個專案要編譯,您需要安裝 Wine 與 MinGW。 - diff --git a/languages/cpp/app_templates/wxhello/CMakeLists.txt b/languages/cpp/app_templates/wxhello/CMakeLists.txt index 48d382bd..f1a8ffec 100644 --- a/languages/cpp/app_templates/wxhello/CMakeLists.txt +++ b/languages/cpp/app_templates/wxhello/CMakeLists.txt @@ -18,9 +18,9 @@ add_custom_target( wxhello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/wxhello.tar.gz wxhello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - wxhello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + wxhello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/cpp/app_templates/wxhello/Makefile.am b/languages/cpp/app_templates/wxhello/Makefile.am index f0e0839e..c45b1d10 100644 --- a/languages/cpp/app_templates/wxhello/Makefile.am +++ b/languages/cpp/app_templates/wxhello/Makefile.am @@ -4,10 +4,10 @@ dataFiles = src-Makefile.am app.cpp app.h app.tdevelop subdirs \ templateName = wxhello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/cpp/app_templates/wxhello/app.tdevelop b/languages/cpp/app_templates/wxhello/app.tdevelop index 9a3f0821..9de4fa75 100644 --- a/languages/cpp/app_templates/wxhello/app.tdevelop +++ b/languages/cpp/app_templates/wxhello/app.tdevelop @@ -12,7 +12,7 @@ wxWidgets - + src/%{APPNAMELC} debug @@ -37,16 +37,16 @@ -O0 -g3 - - + + - - + + ada ada_bugs_gcc @@ -91,24 +91,24 @@ TDE Libraries (Doxygen) - - + + libtool - - + + - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/cpp/app_templates/wxhello/wxhello.kdevtemplate b/languages/cpp/app_templates/wxhello/wxhello.kdevtemplate new file mode 100644 index 00000000..ed1cbc6a --- /dev/null +++ b/languages/cpp/app_templates/wxhello/wxhello.kdevtemplate @@ -0,0 +1,192 @@ +# TDE Config File +[General] +Name=Simple Hello wxWidgets Application +Name[ca]=Simple aplicació de Hello per a wxWidgets +Name[da]=Simpelt Goddag wxWidgets program +Name[de]=Einfache wxWidgets-Anwendung +Name[el]=Απλή εφαρμογή Γεια σου wxWidgets +Name[es]=Una sencilla aplicación «Hola mundo» con wxWidgets +Name[et]=Lihtne wxWidgets'i tervitusrakendus +Name[eu]=wxWidgets-en "Kaixo mundua" aplikazio sinple bat +Name[fa]=کاربرد سادۀ Hello wxWidgets +Name[fr]=Application « Bonjour monde » simple avec wxWidgets +Name[gl]=Aplicación sinxela Ola en wxWidgets +Name[hu]=wxWidgets-alapú Hello world program +Name[it]=Semplice applicazione wxWidgets di "Hello" +Name[ja]=簡単な wxWidget アプリケーション +Name[nds]=Eenfach wxWidgets-Programm "Moin" +Name[ne]=साधारण हेल्लो wxWidgets अनुप्रयोग +Name[nl]=Eenvoudige Hello wxWidgets-toepassing +Name[pl]=Prosty program Witaj używający wxWidgets +Name[pt]=Aplicação Olá Mundo Simples do wxWidgets +Name[pt_BR]=Aplicação Olá Mundo Simples do wxWidgets +Name[ru]=Простое приложение wxWidgets +Name[sk]=Jednoduchá wxWidgets Ahoj svet aplikácia +Name[sr]=Једноставан „Здраво“ wxWidgets програм +Name[sr@Latn]=Jednostavan „Zdravo“ wxWidgets program +Name[sv]=Enkelt Hello-program för wxWidgets +Name[tr]=Basit Merhaba wxWidgets Uygulaması +Name[zh_CN]=一个简单的 wxWidgets 应用程序 +Name[zh_TW]=簡單的 Hello wxWidgets 應用程式 +Category=C++/wxWidgets +Comment=Generates a simple wxWidgets Hello application. +Comment[ca]=Genera una simple aplicació de Hello per a wxWidgets. +Comment[da]=Genererer et simpelt wxWidgets Goddag-program. +Comment[de]=Erstellt eine einfache wxWidgets-Anwendung +Comment[el]=Δημιουργεί μια απλή εφαρμογή Γεια σου wxWidgets. +Comment[es]=Genera una sencilla aplicación «Hola mundo» con wxWidgets +Comment[et]=Lihtsa wxWidgets'i tervitusrakenduse loomine. +Comment[eu]=wxWidgets-en "Kaixo mundua"aplikazio sinple bat sortzen du. +Comment[fa]=یک کاربرد سادۀ wxWidgets Hello تولید می‌کند. +Comment[fr]=Une application « Bonjour monde » simple avec wxWidgets. +Comment[gl]=Xera unha aplicación sinxela Ola en wxWidgets. +Comment[hu]=Létrehoz egy egyszerű wxWidgets-alkalmazást. +Comment[it]=Genera una semplice applicazione wxWidgets di "Hello". +Comment[ja]=簡単な wxWidget アプリケーションを作成します +Comment[nds]=Stellt mit wxWidgets en eenfach "Moin"-Programm op. +Comment[ne]=साधारण wxWidgets हेल्लो अनुप्रयोग उत्पन्न गर्दछ +Comment[nl]=Genereert een eenvoudige wxWidget Hello-toepassing. +Comment[pl]=Generuje prosty program Witaj wykorzystujący wxWidgets +Comment[pt]=Gera uma aplicação simples de Olá Mundo do wxWidgets. +Comment[pt_BR]=Gera uma aplicação simples de Olá Mundo do wxWidgets. +Comment[ru]=Создание простого приложения wxWidgets. +Comment[sk]=Vygeneruje jednoduchú wxWidgets Ahoj svet aplikáciu. +Comment[sr]=Прави једноставан „Здраво“ wxWidgets програм. +Comment[sr@Latn]=Pravi jednostavan „Zdravo“ wxWidgets program. +Comment[sv]=Skapar ett enkelt Hello-program för wxWidgets. +Comment[tr]=Basit bir wxWidgets Merhaba uygulaması yaratır. +Comment[zh_CN]=生成一个简单的 wxWidgets Hello 应用程序。 +Comment[zh_TW]=產生一個簡單的 wxWidgets Hello 應用程式。 +FileTemplates=h,CStyle,cpp,CStyle +Icon=wxhello.png +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp +Archive=wxhello.tar.gz + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[WXARCH] +Type=install archive +Source=%{tdevelop}/template-common/wxwidgets.tar.gz +Dest=%{dest} + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[WX] +Type=include +File=%{tdevelop}/template-common/wx.kdevtemplate + +[FILE4] +Type=install +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/wx-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/wx-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/wx-configure.in +Dest=%{dest}/configure.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/hi16-app-app.png +Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png +Process=false + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/hi32-app-app.png +Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png +Process=false + +#[FILE10] +#Type=install +#Source=%{src}/subdirs +#Dest=%{dest}/subdirs + +[FILE11] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE12] +Type=install +Source=%{src}/app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE13] +Type=install +Source=%{src}/app.h +Dest=%{dest}/src/%{APPNAMELC}.h + +[FILE14] +Type=install +Source=%{src}/app.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[MSG] +Type=message +Comment=Simple hello wxWidgets application was created in %{dest} +Comment[ca]=Simple aplicació de Hello per a wxWidgets ha estat creada en %{dest} +Comment[da]=Simpelt Goddag wxWidgets program blev oprettet i %{dest} +Comment[de]=Eine einfache wxWidgets-Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια απλή εφαρμογή Γεια σου wxWidgets δημιουργήθηκε στο %{dest} +Comment[es]=Una sencilla aplicación «Hola mundo» con wxWidgets ha sido creada en %{dest} +Comment[et]=Lihtne wxWidgets'i tervitusrakendus loodi asukohta %{dest} +Comment[eu]=wxWidgets "Kaixo mundua" aplikazio sinple bat sortu da hemen: %{dest} +Comment[fa]=کاربرد سادۀ hello wxWidgets در %{dest} ایجاد شد +Comment[fr]=Une application « Bonjour monde » simple en wxWidgets a été créée dans %{dest} +Comment[gl]=Creouse unha aplicación sinxela Ola en wxWidgets en %{dest} +Comment[hu]=Létrejött egy egyszerű wxWidgets-alkalmazás itt: %{dest} +Comment[it]=È stata creata una semplice applicazione wxWidgets di "hello" in %{dest} +Comment[ja]=簡単な wxWidget アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en eenfach wxWidgets-Programm opstellt +Comment[ne]=साधारण हेल्लो wxWidgets अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Eenvoudige hello wxWidget-toepassing is aangemaakt in %{dest} +Comment[pl]=Prosty program Witaj wykorzystujący wxWidgets został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação simples de wxWidgets em %{dest} +Comment[pt_BR]=Foi criada uma aplicação simples de wxWidgets em %{dest} +Comment[ru]=Простое приложение wxWidgets создано в %{dest} +Comment[sk]=Jedniduchá wxWidgets Ahoj svet aplikácia bola vytvorená v %{dest} +Comment[sr]=Једноставан „Здраво“ wxWidgets програм направљен је у %{dest} +Comment[sr@Latn]=Jednostavan „Zdravo“ wxWidgets program napravljen je u %{dest} +Comment[sv]=Ett enkelt Hello-program för wxWidgets.skapades i %{dest} +Comment[tr]=Basit merhaba wxWidgets uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 创建了一个简单的 wxWidgets Hello 应用程序 +Comment[zh_TW]=一個簡單的 hello wxWidgets 應用程式已建立於 %{dest} diff --git a/languages/cpp/app_templates/wxhello/wxhello.tdevtemplate b/languages/cpp/app_templates/wxhello/wxhello.tdevtemplate deleted file mode 100644 index dab3c253..00000000 --- a/languages/cpp/app_templates/wxhello/wxhello.tdevtemplate +++ /dev/null @@ -1,192 +0,0 @@ -# TDE Config File -[General] -Name=Simple Hello wxWidgets Application -Name[ca]=Simple aplicació de Hello per a wxWidgets -Name[da]=Simpelt Goddag wxWidgets program -Name[de]=Einfache wxWidgets-Anwendung -Name[el]=Απλή εφαρμογή Γεια σου wxWidgets -Name[es]=Una sencilla aplicación «Hola mundo» con wxWidgets -Name[et]=Lihtne wxWidgets'i tervitusrakendus -Name[eu]=wxWidgets-en "Kaixo mundua" aplikazio sinple bat -Name[fa]=کاربرد سادۀ Hello wxWidgets -Name[fr]=Application « Bonjour monde » simple avec wxWidgets -Name[gl]=Aplicación sinxela Ola en wxWidgets -Name[hu]=wxWidgets-alapú Hello world program -Name[it]=Semplice applicazione wxWidgets di "Hello" -Name[ja]=簡単な wxWidget アプリケーション -Name[nds]=Eenfach wxWidgets-Programm "Moin" -Name[ne]=साधारण हेल्लो wxWidgets अनुप्रयोग -Name[nl]=Eenvoudige Hello wxWidgets-toepassing -Name[pl]=Prosty program Witaj używający wxWidgets -Name[pt]=Aplicação Olá Mundo Simples do wxWidgets -Name[pt_BR]=Aplicação Olá Mundo Simples do wxWidgets -Name[ru]=Простое приложение wxWidgets -Name[sk]=Jednoduchá wxWidgets Ahoj svet aplikácia -Name[sr]=Једноставан „Здраво“ wxWidgets програм -Name[sr@Latn]=Jednostavan „Zdravo“ wxWidgets program -Name[sv]=Enkelt Hello-program för wxWidgets -Name[tr]=Basit Merhaba wxWidgets Uygulaması -Name[zh_CN]=一个简单的 wxWidgets 应用程序 -Name[zh_TW]=簡單的 Hello wxWidgets 應用程式 -Category=C++/wxWidgets -Comment=Generates a simple wxWidgets Hello application. -Comment[ca]=Genera una simple aplicació de Hello per a wxWidgets. -Comment[da]=Genererer et simpelt wxWidgets Goddag-program. -Comment[de]=Erstellt eine einfache wxWidgets-Anwendung -Comment[el]=Δημιουργεί μια απλή εφαρμογή Γεια σου wxWidgets. -Comment[es]=Genera una sencilla aplicación «Hola mundo» con wxWidgets -Comment[et]=Lihtsa wxWidgets'i tervitusrakenduse loomine. -Comment[eu]=wxWidgets-en "Kaixo mundua"aplikazio sinple bat sortzen du. -Comment[fa]=یک کاربرد سادۀ wxWidgets Hello تولید می‌کند. -Comment[fr]=Une application « Bonjour monde » simple avec wxWidgets. -Comment[gl]=Xera unha aplicación sinxela Ola en wxWidgets. -Comment[hu]=Létrehoz egy egyszerű wxWidgets-alkalmazást. -Comment[it]=Genera una semplice applicazione wxWidgets di "Hello". -Comment[ja]=簡単な wxWidget アプリケーションを作成します -Comment[nds]=Stellt mit wxWidgets en eenfach "Moin"-Programm op. -Comment[ne]=साधारण wxWidgets हेल्लो अनुप्रयोग उत्पन्न गर्दछ -Comment[nl]=Genereert een eenvoudige wxWidget Hello-toepassing. -Comment[pl]=Generuje prosty program Witaj wykorzystujący wxWidgets -Comment[pt]=Gera uma aplicação simples de Olá Mundo do wxWidgets. -Comment[pt_BR]=Gera uma aplicação simples de Olá Mundo do wxWidgets. -Comment[ru]=Создание простого приложения wxWidgets. -Comment[sk]=Vygeneruje jednoduchú wxWidgets Ahoj svet aplikáciu. -Comment[sr]=Прави једноставан „Здраво“ wxWidgets програм. -Comment[sr@Latn]=Pravi jednostavan „Zdravo“ wxWidgets program. -Comment[sv]=Skapar ett enkelt Hello-program för wxWidgets. -Comment[tr]=Basit bir wxWidgets Merhaba uygulaması yaratır. -Comment[zh_CN]=生成一个简单的 wxWidgets Hello 应用程序。 -Comment[zh_TW]=產生一個簡單的 wxWidgets Hello 應用程式。 -FileTemplates=h,CStyle,cpp,CStyle -Icon=wxhello.png -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.cpp -Archive=wxhello.tar.gz - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[WXARCH] -Type=install archive -Source=%{tdevelop}/template-common/wxwidgets.tar.gz -Dest=%{dest} - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[WX] -Type=include -File=%{tdevelop}/template-common/wx.tdevtemplate - -[FILE4] -Type=install -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/wx-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/wx-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/wx-configure.in -Dest=%{dest}/configure.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/hi16-app-app.png -Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png -Process=false - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/hi32-app-app.png -Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png -Process=false - -#[FILE10] -#Type=install -#Source=%{src}/subdirs -#Dest=%{dest}/subdirs - -[FILE11] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE12] -Type=install -Source=%{src}/app.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE13] -Type=install -Source=%{src}/app.h -Dest=%{dest}/src/%{APPNAMELC}.h - -[FILE14] -Type=install -Source=%{src}/app.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[MSG] -Type=message -Comment=Simple hello wxWidgets application was created in %{dest} -Comment[ca]=Simple aplicació de Hello per a wxWidgets ha estat creada en %{dest} -Comment[da]=Simpelt Goddag wxWidgets program blev oprettet i %{dest} -Comment[de]=Eine einfache wxWidgets-Anwendung wurde in %{dest} erstellt. -Comment[el]=Μια απλή εφαρμογή Γεια σου wxWidgets δημιουργήθηκε στο %{dest} -Comment[es]=Una sencilla aplicación «Hola mundo» con wxWidgets ha sido creada en %{dest} -Comment[et]=Lihtne wxWidgets'i tervitusrakendus loodi asukohta %{dest} -Comment[eu]=wxWidgets "Kaixo mundua" aplikazio sinple bat sortu da hemen: %{dest} -Comment[fa]=کاربرد سادۀ hello wxWidgets در %{dest} ایجاد شد -Comment[fr]=Une application « Bonjour monde » simple en wxWidgets a été créée dans %{dest} -Comment[gl]=Creouse unha aplicación sinxela Ola en wxWidgets en %{dest} -Comment[hu]=Létrejött egy egyszerű wxWidgets-alkalmazás itt: %{dest} -Comment[it]=È stata creata una semplice applicazione wxWidgets di "hello" in %{dest} -Comment[ja]=簡単な wxWidget アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en eenfach wxWidgets-Programm opstellt -Comment[ne]=साधारण हेल्लो wxWidgets अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Eenvoudige hello wxWidget-toepassing is aangemaakt in %{dest} -Comment[pl]=Prosty program Witaj wykorzystujący wxWidgets został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação simples de wxWidgets em %{dest} -Comment[pt_BR]=Foi criada uma aplicação simples de wxWidgets em %{dest} -Comment[ru]=Простое приложение wxWidgets создано в %{dest} -Comment[sk]=Jedniduchá wxWidgets Ahoj svet aplikácia bola vytvorená v %{dest} -Comment[sr]=Једноставан „Здраво“ wxWidgets програм направљен је у %{dest} -Comment[sr@Latn]=Jednostavan „Zdravo“ wxWidgets program napravljen je u %{dest} -Comment[sv]=Ett enkelt Hello-program för wxWidgets.skapades i %{dest} -Comment[tr]=Basit merhaba wxWidgets uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 创建了一个简单的 wxWidgets Hello 应用程序 -Comment[zh_TW]=一個簡單的 hello wxWidgets 應用程式已建立於 %{dest} diff --git a/languages/cpp/backgroundparser.cpp b/languages/cpp/backgroundparser.cpp index 51311dac..730a090f 100644 --- a/languages/cpp/backgroundparser.cpp +++ b/languages/cpp/backgroundparser.cpp @@ -15,8 +15,8 @@ #include "codeinformationrepository.h" #include "cppcodecompletion.h" #include "ast_utils.h" -#include "tdevdeepcopy.h" -#include "tdevdriver.h" +#include "kdevdeepcopy.h" +#include "kdevdriver.h" #include @@ -25,8 +25,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -39,9 +39,9 @@ #include -class BackgroundTDevDriver : public TDevDriver { +class BackgroundKDevDriver : public KDevDriver { public: - BackgroundTDevDriver( CppSupportPart* cppSupport, BackgroundParser* bp ) : TDevDriver( cppSupport, false ), m_backgroundParser(bp) { + BackgroundKDevDriver( CppSupportPart* cppSupport, BackgroundParser* bp ) : KDevDriver( cppSupport, false ), m_backgroundParser(bp) { } virtual void fileParsed( ParsedFile& fileName ); virtual void addDependence( const TQString& fileName, const Dependence& dep ); @@ -255,7 +255,7 @@ BackgroundParser::BackgroundParser( CppSupportPart* part, TQWaitCondition* consu : m_consumed( consumed ), m_cppSupport( part ), m_close( false ), m_saveMemory( false ) { m_fileList = new SynchronizedFileList(); - m_driver = new BackgroundTDevDriver( m_cppSupport, this ); + m_driver = new BackgroundKDevDriver( m_cppSupport, this ); m_driver->setSourceProvider( new KDevSourceProvider( m_cppSupport, m_mutex ) ); TQString conf_file_name = m_cppSupport->specialHeaderName(); @@ -347,14 +347,14 @@ void BackgroundParser::removeFile( const TQString& fileName ) m_isEmpty.wakeAll(); } -void BackgroundTDevDriver::addDependence( const TQString& fileName, const Dependence& dep ) { +void BackgroundKDevDriver::addDependence( const TQString& fileName, const Dependence& dep ) { //give waiting threads a chance to perform their actions m_backgroundParser->m_mutex.unlock(); m_backgroundParser->m_mutex.lock(); - TDevDriver::addDependence( fileName, dep ); + KDevDriver::addDependence( fileName, dep ); } -void BackgroundTDevDriver::fileParsed( ParsedFile& fileName ) { +void BackgroundKDevDriver::fileParsed( ParsedFile& fileName ) { m_backgroundParser->fileParsed( fileName ); } diff --git a/languages/cpp/backgroundparser.h b/languages/cpp/backgroundparser.h index bd21fd6f..f3cd86fd 100644 --- a/languages/cpp/backgroundparser.h +++ b/languages/cpp/backgroundparser.h @@ -24,7 +24,7 @@ class CppSupportPart; class TranslationUnitAST; class SynchronizedFileList; -class BackgroundTDevDriver; +class BackgroundKDevDriver; class Unit { public: @@ -94,14 +94,14 @@ public: virtual void run(); protected: - friend class BackgroundTDevDriver; + friend class BackgroundKDevDriver; void fileParsed( ParsedFile& fileName ); Unit* findUnit( const TQString& fileName ); void parseFile( const TQString& fileName, bool readFromDisk, bool lock = false ) ; private: - class TDevDriver* m_driver; + class KDevDriver* m_driver; TQString m_currentFile; TQWaitCondition m_canParse; TQWaitCondition m_isEmpty; diff --git a/languages/cpp/ccconfigwidget.cpp b/languages/cpp/ccconfigwidget.cpp index 6e285019..99a6db12 100644 --- a/languages/cpp/ccconfigwidget.cpp +++ b/languages/cpp/ccconfigwidget.cpp @@ -25,7 +25,7 @@ #include // kde includes -#include +#include #include #include #include @@ -41,9 +41,9 @@ #include // tdevelop includes #include -#include -#include -#include +#include +#include +#include #include // std includes #include @@ -440,11 +440,11 @@ void CCConfigWidget::initTQtTab() isExecutable( m_qmakePath->url() ); m_designerPath->setURL( c->designerPath() ); isExecutable( m_designerPath->url() ); - if ( c->designerIntegration() == "EmbeddedTDevDesigner" ) + if ( c->designerIntegration() == "EmbeddedKDevDesigner" ) { m_kdevembedded->setChecked( true ); } - else if ( c->designerIntegration() == "ExternalTDevDesigner" ) + else if ( c->designerIntegration() == "ExternalKDevDesigner" ) { m_kdevexternal->setChecked( true ); }else @@ -507,11 +507,11 @@ void CCConfigWidget::saveTQtTab() c->setDesignerPath( m_designerPath->url() ); if( m_kdevembedded->isChecked() ) { - c->setDesignerIntegration( "EmbeddedTDevDesigner" ); + c->setDesignerIntegration( "EmbeddedKDevDesigner" ); } else if ( m_kdevexternal->isChecked() ) { - c->setDesignerIntegration( "ExternalTDevDesigner" ); + c->setDesignerIntegration( "ExternalKDevDesigner" ); }else { c->setDesignerIntegration( "ExternalDesigner" ); diff --git a/languages/cpp/codeinformationrepository.cpp b/languages/cpp/codeinformationrepository.cpp index de256b00..a1ad79b0 100644 --- a/languages/cpp/codeinformationrepository.cpp +++ b/languages/cpp/codeinformationrepository.cpp @@ -12,7 +12,7 @@ #include "codeinformationrepository.h" #include "cpp_tags.h" -#include +#include #include /// @todo move in utils.cpp @@ -39,7 +39,7 @@ my_unique( const TQValueList& entryList ) return l; } -CodeInformationRepository::CodeInformationRepository( TDevCodeRepository* rep ) +CodeInformationRepository::CodeInformationRepository( KDevCodeRepository* rep ) : m_rep( rep ) {} diff --git a/languages/cpp/codeinformationrepository.h b/languages/cpp/codeinformationrepository.h index 4b46ce0e..54610e50 100644 --- a/languages/cpp/codeinformationrepository.h +++ b/languages/cpp/codeinformationrepository.h @@ -23,12 +23,12 @@ struct TypeProcessor { virtual TQString parentType() = 0; }; -class TDevCodeRepository; +class KDevCodeRepository; class CodeInformationRepository { public: - CodeInformationRepository( TDevCodeRepository* rep ); + CodeInformationRepository( KDevCodeRepository* rep ); virtual ~CodeInformationRepository(); static TQValueList toEntryList( const TQValueList& tags, @@ -46,7 +46,7 @@ public: private: TQValueList m_globalEntries; - TDevCodeRepository* m_rep; + KDevCodeRepository* m_rep; private: CodeInformationRepository( const CodeInformationRepository& source ); diff --git a/languages/cpp/compiler/Makefile.am b/languages/cpp/compiler/Makefile.am index ab237cd4..128e715f 100644 --- a/languages/cpp/compiler/Makefile.am +++ b/languages/cpp/compiler/Makefile.am @@ -1,6 +1,6 @@ # This is the collection of plugins. In contrast to the parts # directory, these are 'transient' in a sense and don't -# share the complete TDevComponent interface. +# share the complete KDevComponent interface. SUBDIRS = gccoptions diff --git a/languages/cpp/compiler/gccoptions/CMakeLists.txt b/languages/cpp/compiler/gccoptions/CMakeLists.txt index ed9b49d4..35c6159d 100644 --- a/languages/cpp/compiler/gccoptions/CMakeLists.txt +++ b/languages/cpp/compiler/gccoptions/CMakeLists.txt @@ -26,15 +26,15 @@ link_directories( ##### other data ################################ install( FILES - tdevgccoptions.desktop tdevgppoptions.desktop - tdevg77options.desktop + kdevgccoptions.desktop kdevgppoptions.desktop + kdevg77options.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevgccoptions (module) ################ +##### libkdevgccoptions (module) ################ -tde_add_kpart( libtdevgccoptions AUTOMOC +tde_add_kpart( libkdevgccoptions AUTOMOC SOURCES gccoptionsplugin.cpp - LINK tdevwidgets-shared tdevextras-shared + LINK kdevwidgets-shared kdevextras-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/languages/cpp/compiler/gccoptions/Makefile.am b/languages/cpp/compiler/gccoptions/Makefile.am index 23c8a752..e90edb63 100644 --- a/languages/cpp/compiler/gccoptions/Makefile.am +++ b/languages/cpp/compiler/gccoptions/Makefile.am @@ -3,17 +3,17 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/interfaces/extras \ -I$(top_srcdir)/lib/widgets $(all_includes) -kde_module_LTLIBRARIES = libtdevgccoptions.la -libtdevgccoptions_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) -libtdevgccoptions_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/lib/widgets/libtdevwidgets.la $(top_builddir)/lib/interfaces/extras/libtdevextras.la $(LIB_TDEHTML) +kde_module_LTLIBRARIES = libkdevgccoptions.la +libkdevgccoptions_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) +libkdevgccoptions_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/lib/widgets/libkdevwidgets.la $(top_builddir)/lib/interfaces/extras/libkdevextras.la $(LIB_TDEHTML) -libtdevgccoptions_la_SOURCES = gccoptionsplugin.cpp +libkdevgccoptions_la_SOURCES = gccoptionsplugin.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevgccoptions.desktop tdevgppoptions.desktop tdevg77options.desktop +service_DATA = kdevgccoptions.desktop kdevgppoptions.desktop kdevg77options.desktop diff --git a/languages/cpp/compiler/gccoptions/gccoptionsplugin.cpp b/languages/cpp/compiler/gccoptions/gccoptionsplugin.cpp index d43bf094..37470a49 100644 --- a/languages/cpp/compiler/gccoptions/gccoptionsplugin.cpp +++ b/languages/cpp/compiler/gccoptions/gccoptionsplugin.cpp @@ -24,7 +24,7 @@ #include "flagboxes.h" #include "gccoptionsplugin.h" -K_EXPORT_COMPONENT_FACTORY( libtdevgccoptions, KGenericFactory( "tdevgccoptions" ) ) +K_EXPORT_COMPONENT_FACTORY( libkdevgccoptions, KGenericFactory( "kdevgccoptions" ) ) class GeneralTab : public TQWidget { @@ -650,7 +650,7 @@ TQString GccOptionsDialog::flags() const GccOptionsPlugin::GccOptionsPlugin( TQObject *parent, const char *name, const TQStringList &args ) - : TDevCompilerOptions( parent, name ) + : KDevCompilerOptions( parent, name ) { gcctype = Unknown; diff --git a/languages/cpp/compiler/gccoptions/gccoptionsplugin.h b/languages/cpp/compiler/gccoptions/gccoptionsplugin.h index 3332809a..656bd289 100644 --- a/languages/cpp/compiler/gccoptions/gccoptionsplugin.h +++ b/languages/cpp/compiler/gccoptions/gccoptionsplugin.h @@ -14,7 +14,7 @@ #include -#include "tdevcompileroptions.h" +#include "kdevcompileroptions.h" class GeneralTab; @@ -24,7 +24,7 @@ class Warnings1Tab; class Warnings2Tab; -class GccOptionsPlugin : public TDevCompilerOptions +class GccOptionsPlugin : public KDevCompilerOptions { Q_OBJECT diff --git a/languages/cpp/compiler/gccoptions/kdevg77options.desktop b/languages/cpp/compiler/gccoptions/kdevg77options.desktop new file mode 100644 index 00000000..e2a806f5 --- /dev/null +++ b/languages/cpp/compiler/gccoptions/kdevg77options.desktop @@ -0,0 +1,56 @@ +[Desktop Entry] +Type=Service +Exec=g77 +Comment=GNU Fortran 77 Compiler +Comment[br]=Dastumer Fortran 77 GNU +Comment[ca]=Compilador Fortran 77 de GNU +Comment[da]=GNU Fortran 77 compiler +Comment[el]=Μεταγλωττιστής GNU Fortran 77 +Comment[es]=Compilador GNU de Fortran 77 +Comment[et]=GNU Fortran 77 kompilaator +Comment[eu]=GNU Fortran 77 konpiladorea +Comment[fa]=مترجم فرترن ۷۷ گنو +Comment[fr]=Compilateur pour Fortran 77 du GNU +Comment[ga]=Tiomsaitheoir Fortran 77 GNU +Comment[gl]=Compilador GNU Fortran 77 +Comment[hi]=जीएनयू फ़ोरट्रॉन 77 कम्पायलर +Comment[hu]=GNU Fortran 77 fordítóprogram +Comment[is]=GNU Fortran 77 þýðandi +Comment[it]=Compilatore per GNU Fortran 77 +Comment[ja]=GNU Fortran 77 コンパイラ +Comment[nds]=GNU Fortran 77-Kompilerer +Comment[ne]=GNU Fortran 77 कम्पाइलर +Comment[nl]=GNU Fortran 77-compiler +Comment[pl]=Kompilator GNU Fortran 77 +Comment[pt]=Compilador GNU Fortran 77 +Comment[pt_BR]=Compilador GNU Fortran 77 +Comment[ru]=Компилятор GNU Fortran 77 +Comment[sk]=GNU Fortran 77 kompilátor +Comment[sl]=Prevajalnik za GNU Fortran 77 +Comment[sr]=GNU-ов преводилац Fortran-а 77 +Comment[sr@Latn]=GNU-ov prevodilac Fortran-a 77 +Comment[sv]=GNU Fortran 77-compilator +Comment[ta]=GNU Fortran 77 தொகுப்பி +Comment[tg]=Талфифгари GNU Fortran 77 +Comment[tr]=GNU Fortran 77 Derleyicisi +Comment[zh_CN]=GNU Fortran 77 编译器 +Comment[zh_TW]=GNU Fortran 77 編譯器 +Name=G77Options +Name[de]=G77-Einstellungen (TDevelop) +Name[el]=G77Επιλογές +Name[hi]=जी77विकल्प +Name[nds]=G77-Optschonen (TDevelop) +Name[pl]=Opcje G77 +Name[sk]=G77 možnosti +Name[sl]=Možnosti G77 +Name[sv]=Alternativ för g77 +Name[ta]=G77விருப்பங்கள் +Name[tg]=G77Интихобҳо +Name[tr]=G77Seçenekleri +Name[zh_TW]=G77 選項 +ServiceTypes=TDevelop/CompilerOptions +X-TDE-Library=libkdevgccoptions +X-TDevelop-Version=5 +X-TDevelop-Language=Fortran +X-TDevelop-Args=g77 +X-TDevelop-Default=true diff --git a/languages/cpp/compiler/gccoptions/kdevgccoptions.desktop b/languages/cpp/compiler/gccoptions/kdevgccoptions.desktop new file mode 100644 index 00000000..14bc62df --- /dev/null +++ b/languages/cpp/compiler/gccoptions/kdevgccoptions.desktop @@ -0,0 +1,54 @@ +[Desktop Entry] +Type=Service +Exec=gcc +Comment=GNU C Compiler +Comment[br]=Dastumer C GNU +Comment[ca]=Compilador C de GNU +Comment[da]=GNU C compiler +Comment[el]=Μεταγλωττιστής GNU C +Comment[es]=Compilador GNU de C +Comment[et]=GNU C kompilaator +Comment[eu]=GNU C konpiladorea +Comment[fa]=مترجم سی گنو +Comment[fr]=Compilateur C du GNU +Comment[ga]=Tiomsaitheoir C GNU +Comment[gl]=Compilador GNU C +Comment[hi]=जीएनयू सी कम्पायलर +Comment[hu]=GNU C fordítóprogram +Comment[is]=GNU C þýðandi +Comment[it]=Compilatore GNU C +Comment[ja]=GNU C コンパイラ +Comment[nds]=GNU C-Kompilerer +Comment[ne]=GNU C कम्पाइलर +Comment[pl]=Kompilator GNU C +Comment[pt]=Compilador GNU C +Comment[pt_BR]=Compilador GNU C +Comment[ru]=Компилятор GNU C +Comment[sk]=GNU C kompilátor +Comment[sl]=Prevajalnik za GNU C +Comment[sr]=GNU-ов C преводилац +Comment[sr@Latn]=GNU-ov C prevodilac +Comment[sv]=GNU C-kompilator +Comment[ta]=GNU Cதொகுப்பி +Comment[tg]=Талфифгари GNU C +Comment[zh_CN]=GNU C 编译器 +Comment[zh_TW]=GNU C 編譯器 +Name=GccOptions +Name[de]=GCC-Einstellungen (TDevelop) +Name[el]=GccΕπιλογές +Name[hi]=जीसीसी-विकल्प +Name[nds]=GCC-Instellen +Name[pl]=Opcje Gcc +Name[sk]=Gcc možnosti +Name[sl]=Možnosti Gcc +Name[sv]=Alternativ för gcc +Name[ta]=Gccவிருப்பங்கள் +Name[tr]=GccSeçenekleri +Name[zh_TW]=Gcc 選項 +ServiceTypes=TDevelop/CompilerOptions +X-TDE-Library=libkdevgccoptions +X-TDevelop-Version=5 +X-TDevelop-Language=C +X-TDevelop-Args=gcc +X-TDevelop-Default=true + diff --git a/languages/cpp/compiler/gccoptions/kdevgppoptions.desktop b/languages/cpp/compiler/gccoptions/kdevgppoptions.desktop new file mode 100644 index 00000000..d8487596 --- /dev/null +++ b/languages/cpp/compiler/gccoptions/kdevgppoptions.desktop @@ -0,0 +1,56 @@ +[Desktop Entry] +Type=Service +Exec=g++ +Comment=GNU C++ Compiler +Comment[br]=Dastumer C++ GNU +Comment[ca]=Compilador C++ de GNU +Comment[da]=GNU C++ compiler +Comment[el]=Μεταγλωττιστής GNU C++ +Comment[es]=Compilador GNU de C++ +Comment[et]=GNU C++ kompilaator +Comment[eu]=GNU C++ konpiladorea +Comment[fa]=مترجم C++ گنو +Comment[fr]=Compilateur C++ de GNU +Comment[ga]=Tiomsaitheoir C++ GNU +Comment[gl]=Compilador GNU C++ +Comment[hi]=जीएनयू सी++ कम्पायलर +Comment[hu]=GNU C++ fordítóprogram +Comment[is]=GNU C++ þýðandi +Comment[it]=Compilatore GNU C++ +Comment[ja]=GNU C++ コンパイラ +Comment[nds]=GNU C++-Kompilerer +Comment[ne]=GNU C++ कम्पाइलर +Comment[nl]=GNU C++ compiler +Comment[pl]=Kompilator GNU C++ +Comment[pt]=Compilador GNU C++ +Comment[pt_BR]=Compilador GNU C++ +Comment[ru]=Компилятор GNU C++ +Comment[sk]=GNU C++ kompilátor +Comment[sl]=Prevajalnik za GNU C++ +Comment[sr]=GNU-ов C++ преводилац +Comment[sr@Latn]=GNU-ov C++ prevodilac +Comment[sv]=GNU C++ kompilator +Comment[ta]=GNU C++தொகுப்பி +Comment[tg]=Талфифгари GNU C++ +Comment[tr]=GNU C++ Derleyicisi +Comment[zh_CN]=GNU C++ 编译器 +Comment[zh_TW]=GNU C++ 編譯器 +Name=GppOptions +Name[de]=GPP-Einstellungen (TDevelop) +Name[el]=GppΕπιλογές +Name[hi]=जीपीपी-विकल्प +Name[nds]=GPP-Instellen +Name[pl]=Opcje Gpp +Name[sk]=Gpp možnosti +Name[sl]=Možnosti Gpp +Name[sv]=Alternativ för g++ +Name[ta]=Gppவிருப்பங்கள் +Name[tr]=GppSeçenekleri +Name[zh_TW]=Gpp 選項 +ServiceTypes=TDevelop/CompilerOptions +X-TDE-Library=libkdevgccoptions +X-TDevelop-Version=5 +X-TDevelop-Language=C++ +X-TDevelop-Args=g++ +X-TDevelop-Default=true + diff --git a/languages/cpp/compiler/gccoptions/tdevg77options.desktop b/languages/cpp/compiler/gccoptions/tdevg77options.desktop deleted file mode 100644 index bbe1f47c..00000000 --- a/languages/cpp/compiler/gccoptions/tdevg77options.desktop +++ /dev/null @@ -1,56 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=g77 -Comment=GNU Fortran 77 Compiler -Comment[br]=Dastumer Fortran 77 GNU -Comment[ca]=Compilador Fortran 77 de GNU -Comment[da]=GNU Fortran 77 compiler -Comment[el]=Μεταγλωττιστής GNU Fortran 77 -Comment[es]=Compilador GNU de Fortran 77 -Comment[et]=GNU Fortran 77 kompilaator -Comment[eu]=GNU Fortran 77 konpiladorea -Comment[fa]=مترجم فرترن ۷۷ گنو -Comment[fr]=Compilateur pour Fortran 77 du GNU -Comment[ga]=Tiomsaitheoir Fortran 77 GNU -Comment[gl]=Compilador GNU Fortran 77 -Comment[hi]=जीएनयू फ़ोरट्रॉन 77 कम्पायलर -Comment[hu]=GNU Fortran 77 fordítóprogram -Comment[is]=GNU Fortran 77 þýðandi -Comment[it]=Compilatore per GNU Fortran 77 -Comment[ja]=GNU Fortran 77 コンパイラ -Comment[nds]=GNU Fortran 77-Kompilerer -Comment[ne]=GNU Fortran 77 कम्पाइलर -Comment[nl]=GNU Fortran 77-compiler -Comment[pl]=Kompilator GNU Fortran 77 -Comment[pt]=Compilador GNU Fortran 77 -Comment[pt_BR]=Compilador GNU Fortran 77 -Comment[ru]=Компилятор GNU Fortran 77 -Comment[sk]=GNU Fortran 77 kompilátor -Comment[sl]=Prevajalnik za GNU Fortran 77 -Comment[sr]=GNU-ов преводилац Fortran-а 77 -Comment[sr@Latn]=GNU-ov prevodilac Fortran-a 77 -Comment[sv]=GNU Fortran 77-compilator -Comment[ta]=GNU Fortran 77 தொகுப்பி -Comment[tg]=Талфифгари GNU Fortran 77 -Comment[tr]=GNU Fortran 77 Derleyicisi -Comment[zh_CN]=GNU Fortran 77 编译器 -Comment[zh_TW]=GNU Fortran 77 編譯器 -Name=G77Options -Name[de]=G77-Einstellungen (TDevelop) -Name[el]=G77Επιλογές -Name[hi]=जी77विकल्प -Name[nds]=G77-Optschonen (TDevelop) -Name[pl]=Opcje G77 -Name[sk]=G77 možnosti -Name[sl]=Možnosti G77 -Name[sv]=Alternativ för g77 -Name[ta]=G77விருப்பங்கள் -Name[tg]=G77Интихобҳо -Name[tr]=G77Seçenekleri -Name[zh_TW]=G77 選項 -ServiceTypes=TDevelop/CompilerOptions -X-TDE-Library=libtdevgccoptions -X-TDevelop-Version=5 -X-TDevelop-Language=Fortran -X-TDevelop-Args=g77 -X-TDevelop-Default=true diff --git a/languages/cpp/compiler/gccoptions/tdevgccoptions.desktop b/languages/cpp/compiler/gccoptions/tdevgccoptions.desktop deleted file mode 100644 index ce01a066..00000000 --- a/languages/cpp/compiler/gccoptions/tdevgccoptions.desktop +++ /dev/null @@ -1,54 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=gcc -Comment=GNU C Compiler -Comment[br]=Dastumer C GNU -Comment[ca]=Compilador C de GNU -Comment[da]=GNU C compiler -Comment[el]=Μεταγλωττιστής GNU C -Comment[es]=Compilador GNU de C -Comment[et]=GNU C kompilaator -Comment[eu]=GNU C konpiladorea -Comment[fa]=مترجم سی گنو -Comment[fr]=Compilateur C du GNU -Comment[ga]=Tiomsaitheoir C GNU -Comment[gl]=Compilador GNU C -Comment[hi]=जीएनयू सी कम्पायलर -Comment[hu]=GNU C fordítóprogram -Comment[is]=GNU C þýðandi -Comment[it]=Compilatore GNU C -Comment[ja]=GNU C コンパイラ -Comment[nds]=GNU C-Kompilerer -Comment[ne]=GNU C कम्पाइलर -Comment[pl]=Kompilator GNU C -Comment[pt]=Compilador GNU C -Comment[pt_BR]=Compilador GNU C -Comment[ru]=Компилятор GNU C -Comment[sk]=GNU C kompilátor -Comment[sl]=Prevajalnik za GNU C -Comment[sr]=GNU-ов C преводилац -Comment[sr@Latn]=GNU-ov C prevodilac -Comment[sv]=GNU C-kompilator -Comment[ta]=GNU Cதொகுப்பி -Comment[tg]=Талфифгари GNU C -Comment[zh_CN]=GNU C 编译器 -Comment[zh_TW]=GNU C 編譯器 -Name=GccOptions -Name[de]=GCC-Einstellungen (TDevelop) -Name[el]=GccΕπιλογές -Name[hi]=जीसीसी-विकल्प -Name[nds]=GCC-Instellen -Name[pl]=Opcje Gcc -Name[sk]=Gcc možnosti -Name[sl]=Možnosti Gcc -Name[sv]=Alternativ för gcc -Name[ta]=Gccவிருப்பங்கள் -Name[tr]=GccSeçenekleri -Name[zh_TW]=Gcc 選項 -ServiceTypes=TDevelop/CompilerOptions -X-TDE-Library=libtdevgccoptions -X-TDevelop-Version=5 -X-TDevelop-Language=C -X-TDevelop-Args=gcc -X-TDevelop-Default=true - diff --git a/languages/cpp/compiler/gccoptions/tdevgppoptions.desktop b/languages/cpp/compiler/gccoptions/tdevgppoptions.desktop deleted file mode 100644 index b5fe552e..00000000 --- a/languages/cpp/compiler/gccoptions/tdevgppoptions.desktop +++ /dev/null @@ -1,56 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=g++ -Comment=GNU C++ Compiler -Comment[br]=Dastumer C++ GNU -Comment[ca]=Compilador C++ de GNU -Comment[da]=GNU C++ compiler -Comment[el]=Μεταγλωττιστής GNU C++ -Comment[es]=Compilador GNU de C++ -Comment[et]=GNU C++ kompilaator -Comment[eu]=GNU C++ konpiladorea -Comment[fa]=مترجم C++ گنو -Comment[fr]=Compilateur C++ de GNU -Comment[ga]=Tiomsaitheoir C++ GNU -Comment[gl]=Compilador GNU C++ -Comment[hi]=जीएनयू सी++ कम्पायलर -Comment[hu]=GNU C++ fordítóprogram -Comment[is]=GNU C++ þýðandi -Comment[it]=Compilatore GNU C++ -Comment[ja]=GNU C++ コンパイラ -Comment[nds]=GNU C++-Kompilerer -Comment[ne]=GNU C++ कम्पाइलर -Comment[nl]=GNU C++ compiler -Comment[pl]=Kompilator GNU C++ -Comment[pt]=Compilador GNU C++ -Comment[pt_BR]=Compilador GNU C++ -Comment[ru]=Компилятор GNU C++ -Comment[sk]=GNU C++ kompilátor -Comment[sl]=Prevajalnik za GNU C++ -Comment[sr]=GNU-ов C++ преводилац -Comment[sr@Latn]=GNU-ov C++ prevodilac -Comment[sv]=GNU C++ kompilator -Comment[ta]=GNU C++தொகுப்பி -Comment[tg]=Талфифгари GNU C++ -Comment[tr]=GNU C++ Derleyicisi -Comment[zh_CN]=GNU C++ 编译器 -Comment[zh_TW]=GNU C++ 編譯器 -Name=GppOptions -Name[de]=GPP-Einstellungen (TDevelop) -Name[el]=GppΕπιλογές -Name[hi]=जीपीपी-विकल्प -Name[nds]=GPP-Instellen -Name[pl]=Opcje Gpp -Name[sk]=Gpp možnosti -Name[sl]=Možnosti Gpp -Name[sv]=Alternativ för g++ -Name[ta]=Gppவிருப்பங்கள் -Name[tr]=GppSeçenekleri -Name[zh_TW]=Gpp 選項 -ServiceTypes=TDevelop/CompilerOptions -X-TDE-Library=libtdevgccoptions -X-TDevelop-Version=5 -X-TDevelop-Language=C++ -X-TDevelop-Args=g++ -X-TDevelop-Default=true - diff --git a/languages/cpp/configproblemreporter.ui.h b/languages/cpp/configproblemreporter.ui.h index 2b1ad2a3..97cc66e1 100644 --- a/languages/cpp/configproblemreporter.ui.h +++ b/languages/cpp/configproblemreporter.ui.h @@ -8,7 +8,7 @@ #include "cppsupportpart.h" -#include +#include #include #include diff --git a/languages/cpp/cppcodecompletion.cpp b/languages/cpp/cppcodecompletion.cpp index adfc1c7d..bf4bef5a 100644 --- a/languages/cpp/cppcodecompletion.cpp +++ b/languages/cpp/cppcodecompletion.cpp @@ -59,10 +59,10 @@ email : david.nolden.kdevelop@art-master.de #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -1470,7 +1470,7 @@ void CppCodeCompletion::popupDefinitionAction( int number ) { } void CppCodeCompletion::selectItem( ItemDom item ) { - Extensions::TDevCodeBrowserFrontend * f = m_pSupport->extension< Extensions::TDevCodeBrowserFrontend > ( "KDevelop/CodeBrowserFrontend" ); + Extensions::KDevCodeBrowserFrontend * f = m_pSupport->extension< Extensions::KDevCodeBrowserFrontend > ( "KDevelop/CodeBrowserFrontend" ); if ( f != 0 ) { ItemDom itemDom( &( *item ) ); diff --git a/languages/cpp/cppimplementationwidget.cpp b/languages/cpp/cppimplementationwidget.cpp index 5fc00da3..35069349 100644 --- a/languages/cpp/cppimplementationwidget.cpp +++ b/languages/cpp/cppimplementationwidget.cpp @@ -31,12 +31,12 @@ #include #include -#include -#include +#include +#include #include #include -CppImplementationWidget::CppImplementationWidget( TDevLanguageSupport *part, +CppImplementationWidget::CppImplementationWidget( KDevLanguageSupport *part, TQWidget *parent, const char *name, bool modal ) : ImplementationWidget( part, parent, name, modal ) {} @@ -45,7 +45,7 @@ TQStringList CppImplementationWidget::createClassFiles() { TQString template_h = "#ifndef $DEFTEXT$_H\n#define $DEFTEXT$_H\n\n#include \"$BASEINCLUDE$\"\n\nclass $CLASSNAME$: public $BASECLASSNAME$ {\nQ_OBJECT\n\npublic:\n $CLASSNAME$(TQWidget *parent = 0, const char *name = 0);\n};\n\n#endif\n"; TQString template_cpp = "#include \"$CLASSINCLUDE$\"\n\n$CLASSNAME$::$CLASSNAME$(TQWidget *parent, const char *name)\n :$BASECLASSNAME$(parent, name)\n{\n}\n"; - if ( m_part->project() ->options() == TDevProject::UsesAutotoolsBuildSystem ) + if ( m_part->project() ->options() == KDevProject::UsesAutotoolsBuildSystem ) template_cpp += "\n#include \"$MOCINCLUDE$\"\n"; TQFileInfo formInfo( m_formName ); diff --git a/languages/cpp/cppimplementationwidget.h b/languages/cpp/cppimplementationwidget.h index 6040cf69..c8569c03 100644 --- a/languages/cpp/cppimplementationwidget.h +++ b/languages/cpp/cppimplementationwidget.h @@ -32,7 +32,7 @@ class CppImplementationWidget : public ImplementationWidget Q_OBJECT public: - CppImplementationWidget( TDevLanguageSupport *part, TQWidget* parent = 0, const char* name = 0, bool modal = false ); + CppImplementationWidget( KDevLanguageSupport *part, TQWidget* parent = 0, const char* name = 0, bool modal = false ); protected: virtual TQStringList createClassFiles(); diff --git a/languages/cpp/cppnewclassdlg.cpp b/languages/cpp/cppnewclassdlg.cpp index 84c8fe4e..6289da44 100644 --- a/languages/cpp/cppnewclassdlg.cpp +++ b/languages/cpp/cppnewclassdlg.cpp @@ -40,10 +40,10 @@ #include #include "cppsupportpart.h" -#include "tdevproject.h" -#include "tdevsourceformatter.h" -#include "tdevcoderepository.h" -#include "tdevpartcontroller.h" +#include "kdevproject.h" +#include "kdevsourceformatter.h" +#include "kdevcoderepository.h" +#include "kdevpartcontroller.h" #include "backgroundparser.h" #include "domutil.h" #include "filetemplate.h" @@ -65,7 +65,7 @@ CppNewClassDialog::CppNewClassDialog( CppSupportPart *part, TQWidget *parent, co implementationModified = false; m_part = part; // read file template configuration - // TDevProject *project = part->project(); + // KDevProject *project = part->project(); TQDomDocument &dom = *part->projectDom(); interface_url = DomUtil::readEntry( dom, "/cppsupportpart/filetemplates/interfaceURL" ); implementation_url = DomUtil::readEntry( dom, "/cppsupportpart/filetemplates/implementationURL" ); @@ -1342,7 +1342,7 @@ bool CppNewClassDialog::ClassGenerator::validateInput() } /// \FIXME - if ( ( header.find( '/' ) != -1 || implementation.find( '/' ) != -1 ) && !( dlg.m_part->project() ->options() & TDevProject::UsesTQMakeBuildSystem) ) + if ( ( header.find( '/' ) != -1 || implementation.find( '/' ) != -1 ) && !( dlg.m_part->project() ->options() & KDevProject::UsesTQMakeBuildSystem) ) { KMessageBox::error( &dlg, i18n( "Generated files will always be added to the " "active directory, so you must not give an " @@ -1376,7 +1376,7 @@ bool CppNewClassDialog::ClassGenerator::generate() return false; } - if( ( dlg.m_part->project() ->options() & TDevProject::UsesTQMakeBuildSystem) ) + if( ( dlg.m_part->project() ->options() & KDevProject::UsesTQMakeBuildSystem) ) { TQDir dir( TQFileInfo( project->projectDirectory()+TQString( TQChar( TQDir::separator() ) )+project->activeDirectory() + TQString( TQChar( TQDir::separator() ) ) + header ).dirPath() ); kdDebug(9024) << "Dir for new file:" << dir.absPath() << endl; @@ -1818,7 +1818,7 @@ void CppNewClassDialog::ClassGenerator::gen_implementation() classImpl.replace( TQRegExp( "\\$NAMESPACEEND\\$" ), namespaceEnd ); classImpl.replace( TQRegExp( "\\$FILENAME\\$" ), implementation ); - if ( ( dlg.m_part->project() ) && ( childClass || qobject ) && ( dlg.m_part->project() ->options() & TDevProject::UsesAutotoolsBuildSystem ) ) + if ( ( dlg.m_part->project() ) && ( childClass || qobject ) && ( dlg.m_part->project() ->options() & KDevProject::UsesAutotoolsBuildSystem ) ) { TQString moc = header; moc.replace( TQRegExp( "\\..*" ), ".moc" ); diff --git a/languages/cpp/cppnewclassdlg.h b/languages/cpp/cppnewclassdlg.h index 30aed9e4..e7f969db 100644 --- a/languages/cpp/cppnewclassdlg.h +++ b/languages/cpp/cppnewclassdlg.h @@ -24,7 +24,7 @@ #include "cppnewclassdlgbase.h" class CppSupportPart; -class TDevProject; +class KDevProject; class TQPopupMenu; class TDECompletion; class CodeModel; @@ -257,7 +257,7 @@ private: TQString advConstructorsHeader; TQString advConstructorsSource; - TDevProject *project; + KDevProject *project; TQString subDir, headerPath, implementationPath; TQString doc; TQString namespaceStr; diff --git a/languages/cpp/cppsupport_events.h b/languages/cpp/cppsupport_events.h index b8d9909f..b40fc0ec 100644 --- a/languages/cpp/cppsupport_events.h +++ b/languages/cpp/cppsupport_events.h @@ -12,7 +12,7 @@ #ifndef __cppsupport_events_h #define __cppsupport_events_h -#include "tdevdeepcopy.h" +#include "kdevdeepcopy.h" #include #include diff --git a/languages/cpp/cppsupportfactory.cpp b/languages/cpp/cppsupportfactory.cpp index ca98f2f3..41335cdb 100644 --- a/languages/cpp/cppsupportfactory.cpp +++ b/languages/cpp/cppsupportfactory.cpp @@ -11,21 +11,21 @@ #include #include -#include +#include #include "cppsupportfactory.h" -K_EXPORT_COMPONENT_FACTORY( libtdevcppsupport, CppSupportFactory ) +K_EXPORT_COMPONENT_FACTORY( libkdevcppsupport, CppSupportFactory ) -static const TDevPluginInfo data("tdevcppsupport"); +static const KDevPluginInfo data("kdevcppsupport"); CppSupportFactory::CppSupportFactory() -: TDevGenericFactory( data ) +: KDevGenericFactory( data ) { } TDEInstance *CppSupportFactory::createInstance() { - TDEInstance *instance = TDevGenericFactory::createInstance(); + TDEInstance *instance = KDevGenericFactory::createInstance(); TDEStandardDirs *dirs = instance->dirs(); dirs->addResourceType( "newclasstemplates", TDEStandardDirs::kde_default("data") + "kdevcppsupport/newclass/" ); dirs->addResourceType( "pcs", TDEStandardDirs::kde_default( "data" ) + "kdevcppsupport/pcs/" ); @@ -33,7 +33,7 @@ TDEInstance *CppSupportFactory::createInstance() return instance; } -const TDevPluginInfo * CppSupportFactory::info() +const KDevPluginInfo * CppSupportFactory::info() { return &data; } diff --git a/languages/cpp/cppsupportfactory.h b/languages/cpp/cppsupportfactory.h index 0ece65e9..f543c4fc 100644 --- a/languages/cpp/cppsupportfactory.h +++ b/languages/cpp/cppsupportfactory.h @@ -12,17 +12,17 @@ #ifndef _CPPSUPPORTFACTORY_H_ #define _CPPSUPPORTFACTORY_H_ -#include +#include #include "cppsupportpart.h" -class TDevPluginInfo; +class KDevPluginInfo; -class CppSupportFactory : public TDevGenericFactory +class CppSupportFactory : public KDevGenericFactory { public: CppSupportFactory(); - static const TDevPluginInfo *info(); + static const KDevPluginInfo *info(); protected: virtual TDEInstance *createInstance(); diff --git a/languages/cpp/cppsupportpart.cpp b/languages/cpp/cppsupportpart.cpp index f02b967b..35739045 100644 --- a/languages/cpp/cppsupportpart.cpp +++ b/languages/cpp/cppsupportpart.cpp @@ -25,11 +25,11 @@ #include "ast_utils.h" #include "cppcodecompletion.h" #include "ccconfigwidget.h" -#include "TDevCppSupportIface.h" +#include "KDevCppSupportIface.h" #include "cppsupportfactory.h" #include "catalog.h" #include "cpp_tags.h" -#include "tdevdriver.h" +#include "kdevdriver.h" #include "cppcodecompletionconfig.h" #include "cppsplitheadersourceconfig.h" #include "tag_creator.h" @@ -37,10 +37,10 @@ #include "classgeneratorconfig.h" #include "urlutil.h" #include "creategettersetterconfiguration.h" -#include "tdevsourceformatter.h" -#include "tdevcreatefile.h" +#include "kdevsourceformatter.h" +#include "kdevcreatefile.h" #include "qtbuildconfig.h" -#include "tdeveditorutil.h" +#include "kdeveditorutil.h" #include #include // wizards @@ -93,14 +93,14 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include -#include +#include #include #include @@ -116,10 +116,10 @@ TQStringList CppSupportPart::m_headerMimeTypes = TQStringList() << "text/x-chdr" TQStringList CppSupportPart::m_sourceExtensions = TQStringList::split( ",", "c,C,cc,cpp,c++,cxx,m,mm,M" ); TQStringList CppSupportPart::m_headerExtensions = TQStringList::split( ",", "h,H,hh,h++,hxx,hpp,inl,tlh,diff,ui.h" ); -class CppDriver: public TDevDriver +class CppDriver: public KDevDriver { public: - CppDriver( CppSupportPart* cppSupport ) : TDevDriver( cppSupport, true ) + CppDriver( CppSupportPart* cppSupport ) : KDevDriver( cppSupport, true ) {} void fileParsed( ParsedFile& fileName ) @@ -192,7 +192,7 @@ public: CppSupportPart::CppSupportPart( TQObject *parent, const char *name, const TQStringList &args ) -: TDevLanguageSupport( CppSupportFactory::info(), parent, name ? name : "TDevCppSupport" ), m_backgroundParser(0), +: KDevLanguageSupport( CppSupportFactory::info(), parent, name ? name : "KDevCppSupport" ), m_backgroundParser(0), m_activeDocument( 0 ), m_activeView( 0 ), m_activeSelection( 0 ), m_activeEditor( 0 ), m_activeViewCursor( 0 ), m_projectClosed( true ), m_projectClosing( false ), m_valid( false ), m_isTyping( false ), m_hadErrors( false ), _jd(0) @@ -232,7 +232,7 @@ CppSupportPart::CppSupportPart( TQObject *parent, const char *name, const TQStri m_saveMemoryTimer->start( 240000, false ); //Free some memory every 4 minutes // connect( m_functionHintTimer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotFunctionHint()) ); - setXMLFile( "tdevcppsupport.rc" ); + setXMLFile( "kdevcppsupport.rc" ); m_catalogList.setAutoDelete( true ); @@ -309,7 +309,7 @@ CppSupportPart::CppSupportPart( TQObject *parent, const char *name, const TQStri connect( core( ), TQT_SIGNAL( projectConfigWidget( KDialogBase* ) ), this, TQT_SLOT( projectConfigWidget( KDialogBase* ) ) ); - new TDevCppSupportIface( this ); + new KDevCppSupportIface( this ); //(void) dcopClient(); m_lockupTester = new UIBlockTester( 100 ); @@ -611,7 +611,7 @@ void CppSupportPart::projectClosed( ) } DomUtil::writeListEntry( *project() ->projectDom(), "kdevcppsupport/references", "pcs", enabledPCSs ); - for ( TQMap::const_iterator it = m_designers.begin(); + for ( TQMap::const_iterator it = m_designers.begin(); it != m_designers.end(); ++it ) { kdDebug( 9007 ) << "calling save settings fro designer integration" << endl; @@ -840,7 +840,7 @@ void CppSupportPart::contextMenu( TQPopupMenu *popup, const Context *context ) { m_contextFileName = url.path(); int id = popup->insertItem( i18n( "Create or Select Implementation..." ), this, TQT_SLOT( slotCreateSubclass() ) ); - popup->setWhatsThis( id, i18n( "Create or select implementation

    Creates or selects a subclass of selected form for use with integrated TDevDesigner." ) ); + popup->setWhatsThis( id, i18n( "Create or select implementation

    Creates or selects a subclass of selected form for use with integrated KDevDesigner." ) ); } } } @@ -1342,7 +1342,7 @@ void CppSupportPart::jumpToCodeModelItem( const ItemDom& item, bool scrollOnly ) lastSyncedUrl = url; } -TDevLanguageSupport::Features CppSupportPart::features() +KDevLanguageSupport::Features CppSupportPart::features() { if ( withcpp ) return Features( Classes | Structs | Functions | Variables | Namespaces | Declarations @@ -2065,7 +2065,7 @@ void CppSupportPart::codeCompletionConfigStored( ) /* m_backgroundParser->updateParserConfiguration(); - TDevDriver* d = dynamic_cast( m_driver ); //The foreground-parse isn't used anymore, and could be removed + KDevDriver* d = dynamic_cast( m_driver ); //The foreground-parse isn't used anymore, and could be removed if( d ) { d->setup(); d->makeMacrosPersistent(); @@ -2144,7 +2144,7 @@ TQString CppSupportPart::formatModelItem( const CodeModelItem *item, bool shortD return arg.stripWhiteSpace(); } else - return TDevLanguageSupport::formatModelItem( item, shortDescription ); + return KDevLanguageSupport::formatModelItem( item, shortDescription ); } void CppSupportPart::addClass() @@ -2677,7 +2677,7 @@ void CppSupportPart::slotCursorPositionChanged() { unsigned int line = 0; unsigned int column = 0; - if ( TDevEditorUtil::currentPositionReal( &line, &column, dynamic_cast( partController()->activePart() ) ) ) + if ( KDevEditorUtil::currentPositionReal( &line, &column, dynamic_cast( partController()->activePart() ) ) ) { TQString typeInfoString = codeCompletion()->createTypeInfoString( line, column ); mainWindow()->statusBar()->message( typeInfoString ); @@ -2738,7 +2738,7 @@ void CppSupportPart::updateParserConfiguration() TQString conf_file_name = specialHeaderName(); m_driver->removeAllMacrosInFile( conf_file_name ); - dynamic_cast(m_driver)->setup(); + dynamic_cast(m_driver)->setup(); m_driver->parseFile( conf_file_name, true, true, true ); m_buildSafeFileSetTimer->start( 500, true ); @@ -2753,9 +2753,9 @@ Driver* CppSupportPart::driver() { return m_driver; } -TDevDesignerIntegration * CppSupportPart::designer( KInterfaceDesigner::DesignerType type ) +KDevDesignerIntegration * CppSupportPart::designer( KInterfaceDesigner::DesignerType type ) { - TDevDesignerIntegration * des = 0; + KDevDesignerIntegration * des = 0; switch ( type ) { case KInterfaceDesigner::Glade: @@ -2847,7 +2847,7 @@ void CppSupportPart::addMethod( ClassDom aClass, const TQString& name, const TQS TQFileInfo info( aClass->fileName() ); TQString implementationFile = info.dirPath( true ) + "/" + info.baseName() + ".cpp" ; TQFileInfo fileInfo( implementationFile ); - TDevCreateFile* createFileSupport = extension( "TDevelop/CreateFile" ); + KDevCreateFile* createFileSupport = extension( "TDevelop/CreateFile" ); if ( !TQFile::exists( fileInfo.absFilePath() ) && createFileSupport != 0 ) createFileSupport->createNewFile( fileInfo.extension(), fileInfo.dirPath( true ), fileInfo.baseName() ); diff --git a/languages/cpp/cppsupportpart.h b/languages/cpp/cppsupportpart.h index ec00cd9c..7de698c0 100644 --- a/languages/cpp/cppsupportpart.h +++ b/languages/cpp/cppsupportpart.h @@ -18,8 +18,8 @@ #ifndef _CPPSUPPORTPART_H_ #define _CPPSUPPORTPART_H_ -#include -#include +#include +#include #include #include @@ -153,7 +153,7 @@ private: SetType m_fileSet; }; -class CppSupportPart : public TDevLanguageSupport +class CppSupportPart : public KDevLanguageSupport { Q_OBJECT @@ -243,7 +243,7 @@ public: //uses the old simple algorithm to find the header TQString findHeaderSimple( const TQString &header ); - virtual TDevDesignerIntegration *designer( KInterfaceDesigner::DesignerType type ); + virtual KDevDesignerIntegration *designer( KInterfaceDesigner::DesignerType type ); void setTyping( bool typing ); @@ -284,7 +284,7 @@ signals: void synchronousParseReady( const TQString& file, ParsedFilePointer unit ); protected: - virtual TDevLanguageSupport::Features features(); + virtual KDevLanguageSupport::Features features(); virtual KMimeType::List mimeTypes(); virtual TQString formatClassName( const TQString &name ); virtual TQString unformatClassName( const TQString &name ); @@ -435,7 +435,7 @@ private: KTextEditor::ViewCursorInterface* m_activeViewCursor; TQString m_activeFileName; - TQMap m_designers; + TQMap m_designers; TQWaitCondition m_eventConsumed; bool m_projectClosed; @@ -623,7 +623,7 @@ private: static TQStringList m_sourceExtensions; static TQStringList m_headerExtensions; - friend class TDevCppSupportIface; + friend class KDevCppSupportIface; friend class CppDriver; // we need something to plug actions that are not in any menu diff --git a/languages/cpp/createpcsdialog.cpp b/languages/cpp/createpcsdialog.cpp index 0f390477..9cca7ef8 100644 --- a/languages/cpp/createpcsdialog.cpp +++ b/languages/cpp/createpcsdialog.cpp @@ -17,8 +17,8 @@ #include "setuphelper.h" #include -#include -#include +#include +#include #include @@ -132,12 +132,12 @@ private: class PCSListViewItem: public TDEListViewItem { public: - PCSListViewItem( KService::Ptr ptr, TDevPCSImporter* importer, TQListViewItem* parent ) + PCSListViewItem( KService::Ptr ptr, KDevPCSImporter* importer, TQListViewItem* parent ) : TDEListViewItem( parent ), m_importer( importer ) { init( ptr ); } - PCSListViewItem( KService::Ptr ptr, TDevPCSImporter* importer, TQListView* parent ) + PCSListViewItem( KService::Ptr ptr, KDevPCSImporter* importer, TQListView* parent ) : TDEListViewItem( parent ), m_importer( importer ) { init( ptr ); @@ -155,13 +155,13 @@ public: setPixmap( 0, SmallIcon( ptr->icon() ) ); } - TDevPCSImporter* importer() + KDevPCSImporter* importer() { return m_importer; } private: - TDevPCSImporter* m_importer; + KDevPCSImporter* m_importer; }; class CreatePCSDialog::PCSJobData @@ -212,7 +212,7 @@ CreatePCSDialog::CreatePCSDialog( CppSupportPart* part, TQWidget* parent, const KService::Ptr ptr = *it; int error = 0; - TDevPCSImporter* importer = KParts::ComponentFactory::createInstanceFromService( ptr, TQT_TQOBJECT(this), ptr->name().latin1(), TQStringList(), &error ); + KDevPCSImporter* importer = KParts::ComponentFactory::createInstanceFromService( ptr, TQT_TQOBJECT(this), ptr->name().latin1(), TQStringList(), &error ); if ( importer ) { new PCSListViewItem( ptr, importer, importerListView ); @@ -272,7 +272,7 @@ void CreatePCSDialog::slotSelected( const TQString & ) if ( m_settings ) delete( m_settings ); - TDevPCSImporter* importer = static_cast( importerListView->selectedItem() ) ->importer(); + KDevPCSImporter* importer = static_cast( importerListView->selectedItem() ) ->importer(); m_settings = importer->createSettingsPage( settingsPage ); setNextEnabled( currentPage(), false ); setHelpEnabled( currentPage(), false ); @@ -286,7 +286,7 @@ void CreatePCSDialog::slotSelected( const TQString & ) } else if ( currentPage() == descriptionPage ) { - TDevPCSImporter* importer = static_cast( importerListView->selectedItem() )->importer(); + KDevPCSImporter* importer = static_cast( importerListView->selectedItem() )->importer(); filename_edit->setText( importer->dbName() ); } else if ( currentPage() == finalPage ) @@ -294,7 +294,7 @@ void CreatePCSDialog::slotSelected( const TQString & ) setBackEnabled( currentPage(), false ); setNextEnabled( currentPage(), false ); - TDevPCSImporter* importer = static_cast( importerListView->selectedItem() )->importer(); + KDevPCSImporter* importer = static_cast( importerListView->selectedItem() )->importer(); TQStringList fileList = importer->fileList(); progressBar->setTotalSteps( fileList.size() ); progressBar->setPercentageVisible( true ); diff --git a/languages/cpp/debugger/CMakeLists.txt b/languages/cpp/debugger/CMakeLists.txt index d5b91df2..4b660c1d 100644 --- a/languages/cpp/debugger/CMakeLists.txt +++ b/languages/cpp/debugger/CMakeLists.txt @@ -33,13 +33,13 @@ link_directories( ##### other data ################################ tde_install_icons( ) -install( FILES tdevdebugger.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevdebugger.rc DESTINATION ${DATA_INSTALL_DIR}/tdevdebugger ) +install( FILES kdevdebugger.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevdebugger.rc DESTINATION ${DATA_INSTALL_DIR}/kdevdebugger ) -##### libtdevdebugger (module) ################## +##### libkdevdebugger (module) ################## -tde_add_kpart( libtdevdebugger AUTOMOC +tde_add_kpart( libkdevdebugger AUTOMOC SOURCES debuggerdcopinterface.skel debuggerpart.cpp dbgcontroller.cpp gdbcontroller.cpp gdbcommand.cpp @@ -50,6 +50,6 @@ tde_add_kpart( libtdevdebugger AUTOMOC debuggerconfigwidgetbase.ui debuggertracingdialogbase.ui gdboutputwidget.cpp gdbtable.cpp debuggertracingdialog.cpp label_with_double_click.cpp - LINK gdbmi_parser-shared lang_debugger-shared tdevwidgets-shared tdevelop-shared + LINK gdbmi_parser-shared lang_debugger-shared kdevwidgets-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/languages/cpp/debugger/Makefile.am b/languages/cpp/debugger/Makefile.am index 40aba33a..09c147ad 100644 --- a/languages/cpp/debugger/Makefile.am +++ b/languages/cpp/debugger/Makefile.am @@ -7,13 +7,13 @@ INCLUDES = -I$(top_srcdir)/languages/lib/debugger \ -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util \ -I$(top_srcdir)/lib/widgets $(all_includes) -kde_module_LTLIBRARIES = libtdevdebugger.la -libtdevdebugger_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevdebugger_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/widgets/libtdevwidgets.la $(LIB_TDEHTML) \ +kde_module_LTLIBRARIES = libkdevdebugger.la +libkdevdebugger_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevdebugger_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/widgets/libkdevwidgets.la $(LIB_TDEHTML) \ $(top_builddir)/languages/lib/debugger/liblang_debugger.la \ $(top_builddir)/languages/cpp/debugger/mi/libgdbmi_parser.la -libtdevdebugger_la_SOURCES = debuggerdcopinterface.skel debuggerpart.cpp \ +libkdevdebugger_la_SOURCES = debuggerdcopinterface.skel debuggerpart.cpp \ dbgcontroller.cpp gdbcontroller.cpp gdbcommand.cpp \ gdbparser.cpp stty.cpp breakpoint.cpp variablewidget.cpp \ gdbbreakpointwidget.cpp framestackwidget.cpp disassemblewidget.cpp \ @@ -26,8 +26,8 @@ METASOURCES = AUTO KDE_ICON = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevdebugger.desktop +service_DATA = kdevdebugger.desktop -rcdir = $(kde_datadir)/tdevdebugger -rc_DATA = tdevdebugger.rc +rcdir = $(kde_datadir)/kdevdebugger +rc_DATA = kdevdebugger.rc noinst_HEADERS = gdbtable.h diff --git a/languages/cpp/debugger/debuggerconfigwidget.cpp b/languages/cpp/debugger/debuggerconfigwidget.cpp index dab4486b..2b8523ae 100644 --- a/languages/cpp/debugger/debuggerconfigwidget.cpp +++ b/languages/cpp/debugger/debuggerconfigwidget.cpp @@ -14,7 +14,7 @@ #include "debuggerconfigwidget.h" #include "debuggerpart.h" -#include "tdevproject.h" +#include "kdevproject.h" #include "domutil.h" #include diff --git a/languages/cpp/debugger/debuggerpart.cpp b/languages/cpp/debugger/debuggerpart.cpp index f2379ccb..3cae3762 100644 --- a/languages/cpp/debugger/debuggerpart.cpp +++ b/languages/cpp/debugger/debuggerpart.cpp @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include @@ -37,12 +37,12 @@ #include #include -#include "tdevcore.h" -#include "tdevproject.h" -#include "tdevmainwindow.h" -#include "tdevappfrontend.h" -#include "tdevpartcontroller.h" -#include "tdevdebugger.h" +#include "kdevcore.h" +#include "kdevproject.h" +#include "kdevmainwindow.h" +#include "kdevappfrontend.h" +#include "kdevpartcontroller.h" +#include "kdevdebugger.h" #include "domutil.h" #include "variablewidget.h" #include "gdbbreakpointwidget.h" @@ -61,7 +61,7 @@ #include -#include +#include #include @@ -71,13 +71,13 @@ namespace GDBDebugger { -static const TDevPluginInfo data("tdevdebugger"); +static const KDevPluginInfo data("kdevdebugger"); -typedef TDevGenericFactory DebuggerFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevdebugger, DebuggerFactory( data ) ) +typedef KDevGenericFactory DebuggerFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevdebugger, DebuggerFactory( data ) ) DebuggerPart::DebuggerPart( TQObject *parent, const char *name, const TQStringList & ) : - TDevPlugin( &data, parent, name ? name : "DebuggerPart" ), + KDevPlugin( &data, parent, name ? name : "DebuggerPart" ), controller(0), previousDebuggerState_(s_dbgNotStarted), justRestarted_(false), needRebuild_(true), running_(false) @@ -85,7 +85,7 @@ DebuggerPart::DebuggerPart( TQObject *parent, const char *name, const TQStringLi setObjId("DebuggerInterface"); setInstance(DebuggerFactory::instance()); - setXMLFile("tdevdebugger.rc"); + setXMLFile("kdevdebugger.rc"); m_debugger = new Debugger( partController() ); @@ -333,8 +333,8 @@ DebuggerPart::DebuggerPart( TQObject *parent, const char *name, const TQStringLi connect( core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *)) ); - connect( core(), TQT_SIGNAL(stopButtonClicked(TDevPlugin*)), - this, TQT_SLOT(slotStop(TDevPlugin*)) ); + connect( core(), TQT_SIGNAL(stopButtonClicked(KDevPlugin*)), + this, TQT_SLOT(slotStop(KDevPlugin*)) ); connect( core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed()) ); @@ -858,7 +858,7 @@ void DebuggerPart::slotRun() if (rebuild) { disconnect(TQT_SIGNAL(buildProject())); - // The TDevProject has no method to build the project, + // The KDevProject has no method to build the project, // so try connecting to a slot has is present to all // existing project managers. // Note: this assumes that 'slotBuild' will save @@ -984,7 +984,7 @@ bool DebuggerPart::attachProcess(int pid) } -void DebuggerPart::slotStop(TDevPlugin* which) +void DebuggerPart::slotStop(KDevPlugin* which) { if( which != 0 && which != this ) return; @@ -1259,12 +1259,12 @@ bool DebuggerPart::haveModifiedFiles() } -TDevAppFrontend * GDBDebugger::DebuggerPart::appFrontend( ) +KDevAppFrontend * GDBDebugger::DebuggerPart::appFrontend( ) { - return extension("TDevelop/AppFrontend"); + return extension("TDevelop/AppFrontend"); } -TDevDebugger * GDBDebugger::DebuggerPart::debugger() +KDevDebugger * GDBDebugger::DebuggerPart::debugger() { return m_debugger; } diff --git a/languages/cpp/debugger/debuggerpart.h b/languages/cpp/debugger/debuggerpart.h index f1f27d23..50479249 100644 --- a/languages/cpp/debugger/debuggerpart.h +++ b/languages/cpp/debugger/debuggerpart.h @@ -15,8 +15,8 @@ #define _DEBUGGERPART_H_ #include -#include "tdevplugin.h" -#include "tdevcore.h" +#include "kdevplugin.h" +#include "kdevcore.h" #include "gdbcontroller.h" #include "debuggerdcopinterface.h" @@ -28,8 +28,8 @@ class TQPopupMenu; class KDialogBase; class ProcessWidget; class ProcessLineMaker; -class TDevAppFrontend; -class TDevDebugger; +class KDevAppFrontend; +class KDevDebugger; namespace GDBDebugger { @@ -44,7 +44,7 @@ class VariableWidget; class GDBOutputWidget; class ViewerWidget; -class DebuggerPart : public TDevPlugin, virtual public DebuggerDCOPInterface +class DebuggerPart : public KDevPlugin, virtual public DebuggerDCOPInterface { Q_OBJECT @@ -82,7 +82,7 @@ private slots: void slotExamineCore(); void slotAttachProcess(); void slotStopDebugger(); - void slotStop(TDevPlugin* which = 0); + void slotStop(KDevPlugin* which = 0); void slotPause(); void slotRunToCursor(); void slotJumpToCursor(); @@ -116,8 +116,8 @@ private slots: void slotEvent(GDBController::event_t); private: - TDevAppFrontend *appFrontend(); - TDevDebugger *debugger(); + KDevAppFrontend *appFrontend(); + KDevDebugger *debugger(); bool attachProcess(int pid); bool startDebugger(); @@ -139,7 +139,7 @@ private: TQString m_contextIdent; TQCString m_drkonqi; - TDevDebugger *m_debugger; + KDevDebugger *m_debugger; int previousDebuggerState_; // Set to true after each debugger restart // Currently used to auto-show variables view diff --git a/languages/cpp/debugger/kdevdebugger.desktop b/languages/cpp/debugger/kdevdebugger.desktop new file mode 100644 index 00000000..beaf17f3 --- /dev/null +++ b/languages/cpp/debugger/kdevdebugger.desktop @@ -0,0 +1,86 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=This plugin provides a frontend for GDB, a source-level debugger for C, C++ and more. http://sources.redhat.com/gdb/ +Comment[ca]=Aquest connector proveeix una interfície per a GDB, un depurador a nivell de codi per a C, C++ i d'altres. http://sources.redhat.com/gdb/ +Comment[da]=Dette plugin sørger for en brugerflade til GDB, en fejlretter til C, C++ og mere. http://sources.redhat.com/gdb/ +Comment[de]=Dieses Modul bietet eine Oberfläche für GDB, einen Quellcode-Debugger für C, C++ und andere Sprachen. http://sources.redhat.com/gdb/ +Comment[el]=Αυτό το πρόσθετο προσφέρει ένα πρόγραμμα για το GDB, έναν αποσφαλματωτή πηγαίου κώδικα για C, C++ και άλλες γλώσσες. http://sources.redhat.com/gdb/ +Comment[es]=Este complemento proporciona un entorno para GDB, un depurador a nivel de código para C, C++ y otros (http://sources.redhat.com/gdb/) +Comment[et]=See plugin pakub GDB kasutajaliidest. GDB on C, C++ ja veel mitme keele lähtekoodi tasandil tegutsev siluja. http://sources.redhat.com/gdb/ +Comment[eu]=Plugin honek GDB-rako interfaze bat eskeintzen du. GDB, C eta C++-rako iturburu-mailako araztaile bat da. http://sources.redhat.com/gdb/ +Comment[fa]=این وصله پایانه‌ای برای GDB، اشکال‌زدای سطح منبع برای سی، C++ و بیشتر تولید می‌کند. http://sources.redhat.com/gdb/ +Comment[fr]=Ce module externe fournit une interface pour GDB, un débogueur au niveau source pour C, C++ et autres. http://sources.redhat.com/gdb/ +Comment[gl]=Esta extensión proporciona un frontal para GDB, un depurador a nivel de código para C, C++ e outras linguaxes. http://sources.redhat.com/gdb/ +Comment[hi]=यह प्लगइन जीडीबी के लिए फ्रन्टएण्ड प्रदान करता है, जो सी, सी++ तथा और भी के लिए स्रोत-स्तर पर डिबगर हैhttp://sources.redhat.com/gdb/ +Comment[hu]=Ez a bővítőmodul grafikus felületet biztosít a GDB nyomkövető használatához, C/C++-hoz és más nyelvekhez, forrásszinten. http://sources.redhat.com/gdb/ +Comment[is]=Þetta íforrit útvegar framhlið fyrir GDB, frumkóða-aflúsara fyrir C, C++ og fleira. http://sources.redhat.com/gdb/ +Comment[it]=Questo plugin fornisce un'interfaccia per GDB, un debugger a livello sorgente per C, C++ e altro. http://sources.redhat.com/gdb/ +Comment[ja]=このプラグインは、C, C++ などのソースレベルデバッガ GDB のフロントエンドを提供します。http://sources.redhat.com/gdb/ +Comment[nds]=Dit Moduul stellt en Böversiet för GDB praat, en Bornkode-Fehlersöker för C, C++ un annerswat. http://sources.redhat.com/gdb/ +Comment[ne]=यो प्लगइनले C, C++ र बढीका लागि स्रोत-तह डिबगर,GDB का लागि फ्रन्टइन्ड प्रदान गर्दछ । http://sources.redhat.com/gdb/ +Comment[nl]=Deze plugin biedt een grafische schil voor GDB, een broncode-debugger voor C, C++ en meer. http://sources.redhat.com/gdb/ +Comment[pl]=Ta wtyczka udostępnia interfejs do GDB, debugera poziomu źródłowego dla C, C++ i innych. http://sources.redhat.com/gdb/ +Comment[pt]=Este 'plugin' oferece uma interface para o GDB, um depurador ao nível do código para C, C++ entre outros. http://sources.redhat.com/gdb/ +Comment[pt_BR]=Este plug-in fornece um frontend para o GDB, um depurador a nível de código para C, C++ e mais. http://sources.redhat.com/gdb/ +Comment[ru]=Этот модуль предоставляет интерфейс к GDB, отладчику исходного кода для C, C++ и других языков. http://sources.redhat.com/gdb/ +Comment[sk]=Tento modul poskytuje rozhranie pre GDB, debuger pre C, C++ a ďalšie. http://sources.redhat.com/gdb/ +Comment[sl]=Ta vstavek omogoča vmesnik za GDB, razhroščevalnik na ravni izvorne kode za C, C++ in več. http://sourcs.redhat.com/gdb/ +Comment[sr]=Овај прикључак обезбеђује интерфејс за GDB, исправљач на нивоу изворног кода за C, C++ и више. http://sources.redhat.com/gdb/ +Comment[sr@Latn]=Ovaj priključak obezbeđuje interfejs za GDB, ispravljač na nivou izvornog koda za C, C++ i više. http://sources.redhat.com/gdb/ +Comment[sv]=Insticksprogrammet tillhandahåller ett gränssnitt till GDB, en källkodsavlusare för C, C++ med mera. http://sources.redhat.com/gdb/ +Comment[ta]=GDB க்கு இந்த சொருகு ஒரு முன்நிறுத்தல் , C, C++ மற்றும் பலவற்றிற்கு ஒரு மூல-நிலை டிபக்கர் +Comment[tg]=Ин модул дар GDB интерфейсро ба ихтиёр мегузорад, созгузори код барои C, C++ ибтидоӣва барои дигар забонҳо. http://sources.redhat.com/gdb/ +Comment[tr]=Bu eklenti, C, C++ ve daha fazlası için bir kaynak-düzeyinde hata ayıklayıcı olan GDB için bir önucu sağlar. http://sources.redhat.com/gdb/ +Comment[zh_CN]=这个插件是一个 GDB 前端,一个 C、C++ 和其它语言的源代码调试器。http://sources.redhat.com/gdb/ +Comment[zh_TW]=這個外掛程式提供 GDB 的前端介面。GDB 是一個 C/C++ 還有其它語言的除錯器。http://sources.redhat.com/gdb/ +Name=KDevDebugger +Name[da]=TDevelop Debugger +Name[de]=Debugger (TDevelop) +Name[hi]=के-डेव-डिबगर +Name[nds]=TDevelop-Fehlersöker +Name[ne]=केडीई विकास डिबगर +Name[pl]=KDevDebuger +Name[sk]=KDev debuger +Name[sv]=TDevelop avlusare +Name[ta]=கெடெவ் டிபக்கர் +Name[zh_TW]=TDevelop 除錯器 +GenericName=Debugger Frontend +GenericName[ca]=Interfície per al depurador +GenericName[da]=Fejlsøgningsbrugerflade +GenericName[de]=Debugger-Oberfläche +GenericName[el]=Πρόγραμμα Αποσφαλματωτή +GenericName[es]=Entorno del depurador +GenericName[et]=Siluja kasutajaliides +GenericName[eu]=Araztaile-interfazea +GenericName[fa]=پایانۀ اشکال‌زدا +GenericName[fr]=Interface du débogueur +GenericName[ga]=Comhéadan Dífhabhtóra +GenericName[gl]=Frontal de depuración +GenericName[hi]=डिबगर फ्रन्टएण्ड +GenericName[hu]=Grafikus felület nyomkövetéshez +GenericName[it]=Interfaccia al debugger +GenericName[ja]=デバッガフロントエンド +GenericName[nds]=Fehlersöker-Böversiet +GenericName[ne]=डिबगर फ्रन्टइन्ड +GenericName[nl]=Grafische schil voor debugger +GenericName[pl]=Interfejs do debugera +GenericName[pt]=Interface de Depuração +GenericName[pt_BR]=Frontend do Depurador +GenericName[ru]=Интегрированный отладчик +GenericName[sk]=Debuger rozhranie +GenericName[sl]=Vmesnik razhroščevalnika +GenericName[sr]=Интерфејс исправљача +GenericName[sr@Latn]=Interfejs ispravljača +GenericName[sv]=Gränssnitt för avlusare +GenericName[ta]=டிபக்கர் பிரான்டட் +GenericName[tg]=Интеграл ёфтани созгузор +GenericName[tr]=Hata Ayıklayıcı Önucu +GenericName[zh_CN]=调试器前端 +GenericName[zh_TW]=除錯器前端 +Icon=debugger +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevdebugger +X-TDevelop-Version=5 +X-TDevelop-Scope=Project +X-TDevelop-Properties=CompiledDevelopment diff --git a/languages/cpp/debugger/kdevdebugger.rc b/languages/cpp/debugger/kdevdebugger.rc new file mode 100644 index 00000000..801cadb8 --- /dev/null +++ b/languages/cpp/debugger/kdevdebugger.rc @@ -0,0 +1,93 @@ + + + +

    + &Debug + + + + + + + + + + + + + + + + + + + + + + + + Debugger Toolbar + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/languages/cpp/debugger/tdevdebugger.desktop b/languages/cpp/debugger/tdevdebugger.desktop deleted file mode 100644 index 9db31510..00000000 --- a/languages/cpp/debugger/tdevdebugger.desktop +++ /dev/null @@ -1,86 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=This plugin provides a frontend for GDB, a source-level debugger for C, C++ and more. http://sources.redhat.com/gdb/ -Comment[ca]=Aquest connector proveeix una interfície per a GDB, un depurador a nivell de codi per a C, C++ i d'altres. http://sources.redhat.com/gdb/ -Comment[da]=Dette plugin sørger for en brugerflade til GDB, en fejlretter til C, C++ og mere. http://sources.redhat.com/gdb/ -Comment[de]=Dieses Modul bietet eine Oberfläche für GDB, einen Quellcode-Debugger für C, C++ und andere Sprachen. http://sources.redhat.com/gdb/ -Comment[el]=Αυτό το πρόσθετο προσφέρει ένα πρόγραμμα για το GDB, έναν αποσφαλματωτή πηγαίου κώδικα για C, C++ και άλλες γλώσσες. http://sources.redhat.com/gdb/ -Comment[es]=Este complemento proporciona un entorno para GDB, un depurador a nivel de código para C, C++ y otros (http://sources.redhat.com/gdb/) -Comment[et]=See plugin pakub GDB kasutajaliidest. GDB on C, C++ ja veel mitme keele lähtekoodi tasandil tegutsev siluja. http://sources.redhat.com/gdb/ -Comment[eu]=Plugin honek GDB-rako interfaze bat eskeintzen du. GDB, C eta C++-rako iturburu-mailako araztaile bat da. http://sources.redhat.com/gdb/ -Comment[fa]=این وصله پایانه‌ای برای GDB، اشکال‌زدای سطح منبع برای سی، C++ و بیشتر تولید می‌کند. http://sources.redhat.com/gdb/ -Comment[fr]=Ce module externe fournit une interface pour GDB, un débogueur au niveau source pour C, C++ et autres. http://sources.redhat.com/gdb/ -Comment[gl]=Esta extensión proporciona un frontal para GDB, un depurador a nivel de código para C, C++ e outras linguaxes. http://sources.redhat.com/gdb/ -Comment[hi]=यह प्लगइन जीडीबी के लिए फ्रन्टएण्ड प्रदान करता है, जो सी, सी++ तथा और भी के लिए स्रोत-स्तर पर डिबगर हैhttp://sources.redhat.com/gdb/ -Comment[hu]=Ez a bővítőmodul grafikus felületet biztosít a GDB nyomkövető használatához, C/C++-hoz és más nyelvekhez, forrásszinten. http://sources.redhat.com/gdb/ -Comment[is]=Þetta íforrit útvegar framhlið fyrir GDB, frumkóða-aflúsara fyrir C, C++ og fleira. http://sources.redhat.com/gdb/ -Comment[it]=Questo plugin fornisce un'interfaccia per GDB, un debugger a livello sorgente per C, C++ e altro. http://sources.redhat.com/gdb/ -Comment[ja]=このプラグインは、C, C++ などのソースレベルデバッガ GDB のフロントエンドを提供します。http://sources.redhat.com/gdb/ -Comment[nds]=Dit Moduul stellt en Böversiet för GDB praat, en Bornkode-Fehlersöker för C, C++ un annerswat. http://sources.redhat.com/gdb/ -Comment[ne]=यो प्लगइनले C, C++ र बढीका लागि स्रोत-तह डिबगर,GDB का लागि फ्रन्टइन्ड प्रदान गर्दछ । http://sources.redhat.com/gdb/ -Comment[nl]=Deze plugin biedt een grafische schil voor GDB, een broncode-debugger voor C, C++ en meer. http://sources.redhat.com/gdb/ -Comment[pl]=Ta wtyczka udostępnia interfejs do GDB, debugera poziomu źródłowego dla C, C++ i innych. http://sources.redhat.com/gdb/ -Comment[pt]=Este 'plugin' oferece uma interface para o GDB, um depurador ao nível do código para C, C++ entre outros. http://sources.redhat.com/gdb/ -Comment[pt_BR]=Este plug-in fornece um frontend para o GDB, um depurador a nível de código para C, C++ e mais. http://sources.redhat.com/gdb/ -Comment[ru]=Этот модуль предоставляет интерфейс к GDB, отладчику исходного кода для C, C++ и других языков. http://sources.redhat.com/gdb/ -Comment[sk]=Tento modul poskytuje rozhranie pre GDB, debuger pre C, C++ a ďalšie. http://sources.redhat.com/gdb/ -Comment[sl]=Ta vstavek omogoča vmesnik za GDB, razhroščevalnik na ravni izvorne kode za C, C++ in več. http://sourcs.redhat.com/gdb/ -Comment[sr]=Овај прикључак обезбеђује интерфејс за GDB, исправљач на нивоу изворног кода за C, C++ и више. http://sources.redhat.com/gdb/ -Comment[sr@Latn]=Ovaj priključak obezbeđuje interfejs za GDB, ispravljač na nivou izvornog koda za C, C++ i više. http://sources.redhat.com/gdb/ -Comment[sv]=Insticksprogrammet tillhandahåller ett gränssnitt till GDB, en källkodsavlusare för C, C++ med mera. http://sources.redhat.com/gdb/ -Comment[ta]=GDB க்கு இந்த சொருகு ஒரு முன்நிறுத்தல் , C, C++ மற்றும் பலவற்றிற்கு ஒரு மூல-நிலை டிபக்கர் -Comment[tg]=Ин модул дар GDB интерфейсро ба ихтиёр мегузорад, созгузори код барои C, C++ ибтидоӣва барои дигар забонҳо. http://sources.redhat.com/gdb/ -Comment[tr]=Bu eklenti, C, C++ ve daha fazlası için bir kaynak-düzeyinde hata ayıklayıcı olan GDB için bir önucu sağlar. http://sources.redhat.com/gdb/ -Comment[zh_CN]=这个插件是一个 GDB 前端,一个 C、C++ 和其它语言的源代码调试器。http://sources.redhat.com/gdb/ -Comment[zh_TW]=這個外掛程式提供 GDB 的前端介面。GDB 是一個 C/C++ 還有其它語言的除錯器。http://sources.redhat.com/gdb/ -Name=TDevDebugger -Name[da]=TDevelop Debugger -Name[de]=Debugger (TDevelop) -Name[hi]=के-डेव-डिबगर -Name[nds]=TDevelop-Fehlersöker -Name[ne]=केडीई विकास डिबगर -Name[pl]=KDevDebuger -Name[sk]=KDev debuger -Name[sv]=TDevelop avlusare -Name[ta]=கெடெவ் டிபக்கர் -Name[zh_TW]=TDevelop 除錯器 -GenericName=Debugger Frontend -GenericName[ca]=Interfície per al depurador -GenericName[da]=Fejlsøgningsbrugerflade -GenericName[de]=Debugger-Oberfläche -GenericName[el]=Πρόγραμμα Αποσφαλματωτή -GenericName[es]=Entorno del depurador -GenericName[et]=Siluja kasutajaliides -GenericName[eu]=Araztaile-interfazea -GenericName[fa]=پایانۀ اشکال‌زدا -GenericName[fr]=Interface du débogueur -GenericName[ga]=Comhéadan Dífhabhtóra -GenericName[gl]=Frontal de depuración -GenericName[hi]=डिबगर फ्रन्टएण्ड -GenericName[hu]=Grafikus felület nyomkövetéshez -GenericName[it]=Interfaccia al debugger -GenericName[ja]=デバッガフロントエンド -GenericName[nds]=Fehlersöker-Böversiet -GenericName[ne]=डिबगर फ्रन्टइन्ड -GenericName[nl]=Grafische schil voor debugger -GenericName[pl]=Interfejs do debugera -GenericName[pt]=Interface de Depuração -GenericName[pt_BR]=Frontend do Depurador -GenericName[ru]=Интегрированный отладчик -GenericName[sk]=Debuger rozhranie -GenericName[sl]=Vmesnik razhroščevalnika -GenericName[sr]=Интерфејс исправљача -GenericName[sr@Latn]=Interfejs ispravljača -GenericName[sv]=Gränssnitt för avlusare -GenericName[ta]=டிபக்கர் பிரான்டட் -GenericName[tg]=Интеграл ёфтани созгузор -GenericName[tr]=Hata Ayıklayıcı Önucu -GenericName[zh_CN]=调试器前端 -GenericName[zh_TW]=除錯器前端 -Icon=debugger -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevdebugger -X-TDevelop-Version=5 -X-TDevelop-Scope=Project -X-TDevelop-Properties=CompiledDevelopment diff --git a/languages/cpp/debugger/tdevdebugger.rc b/languages/cpp/debugger/tdevdebugger.rc deleted file mode 100644 index 99a10f3c..00000000 --- a/languages/cpp/debugger/tdevdebugger.rc +++ /dev/null @@ -1,93 +0,0 @@ - - - - - &Debug - - - - - - - - - - - - - - - - - - - - - - - - Debugger Toolbar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/languages/cpp/debugger/tests/breakpoints/breakpoints.tdevelop b/languages/cpp/debugger/tests/breakpoints/breakpoints.tdevelop index fc68be33..54214a1b 100644 --- a/languages/cpp/debugger/tests/breakpoints/breakpoints.tdevelop +++ b/languages/cpp/debugger/tests/breakpoints/breakpoints.tdevelop @@ -4,14 +4,14 @@ Vladimir Prus ghost@ghostwalk $VERSION$ - TDevCustomProject + KDevCustomProject C++ . false - + breakpoints executable @@ -38,8 +38,8 @@ - - + + @@ -56,8 +56,8 @@ true 10 - - + + ada ada_bugs_gcc @@ -102,16 +102,16 @@ KDE Libraries (Doxygen) - - + + - - + + true @@ -143,8 +143,8 @@ true Vertical - - + + false false @@ -153,7 +153,7 @@ *.o,*.lo,CVS false - + .h diff --git a/languages/cpp/debugger/tests/dll/dll.tdevelop b/languages/cpp/debugger/tests/dll/dll.tdevelop index b875ae48..f92f1d08 100644 --- a/languages/cpp/debugger/tests/dll/dll.tdevelop +++ b/languages/cpp/debugger/tests/dll/dll.tdevelop @@ -4,14 +4,14 @@ Vladimir Prus ghost@ghostwalk $VERSION$ - TDevCustomProject + KDevCustomProject C++ . false - + main executable @@ -38,8 +38,8 @@ - - + + @@ -56,8 +56,8 @@ true 10 - - + + ada ada_bugs_gcc @@ -102,22 +102,22 @@ KDE Libraries (Doxygen) - - + + - + .h .cpp - + false 3 @@ -144,8 +144,8 @@ true - - + + false false @@ -154,5 +154,5 @@ *.o,*.lo,CVS false - + diff --git a/languages/cpp/debugger/tests/infinite_loop/infinite_loop.tdevelop b/languages/cpp/debugger/tests/infinite_loop/infinite_loop.tdevelop index 3096faea..267a73d8 100644 --- a/languages/cpp/debugger/tests/infinite_loop/infinite_loop.tdevelop +++ b/languages/cpp/debugger/tests/infinite_loop/infinite_loop.tdevelop @@ -4,22 +4,22 @@ Vladimir Prus ghost@zigzag $VERSION$ - TDevCustomProject + KDevCustomProject C++ - + infinite_loop executable - - + + - - + + ada ada_bugs_gcc @@ -64,16 +64,16 @@ KDE Libraries (Doxygen) - - + + - - + + true @@ -95,8 +95,8 @@ true false - - + + false false @@ -105,5 +105,5 @@ *.o,*.lo,CVS false - + diff --git a/languages/cpp/debugger/tests/print_pointers/print_pointers.tdevelop b/languages/cpp/debugger/tests/print_pointers/print_pointers.tdevelop index fc7f4d19..a838d09d 100644 --- a/languages/cpp/debugger/tests/print_pointers/print_pointers.tdevelop +++ b/languages/cpp/debugger/tests/print_pointers/print_pointers.tdevelop @@ -4,7 +4,7 @@ Vladimir Prus ghost@cs.msu.su $VERSION$ - TDevCustomProject + KDevCustomProject C++ kdevsecurity @@ -18,7 +18,7 @@ print_pointers - + print_pointers executable @@ -62,8 +62,8 @@ CMakeLists.txt - - + + @@ -80,8 +80,8 @@ true 10 - - + + ada ada_bugs_gcc @@ -126,22 +126,22 @@ KDE Libraries (Doxygen) - - + + - + .h .cpp - + true true @@ -185,7 +185,7 @@ 3 /usr/share/qt3 3 - EmbeddedTDevDesigner + EmbeddedKDevDesigner /usr/bin/qmake-qt3 /usr/bin/designer @@ -195,8 +195,8 @@ true Vertical - - + + false false @@ -205,8 +205,8 @@ *.o,*.lo,CVS false - - + + VisualBoyAdvance @@ -214,5 +214,5 @@ false -f0 -1 - + diff --git a/languages/cpp/debugger/tests/segfault/segfault.tdevelop b/languages/cpp/debugger/tests/segfault/segfault.tdevelop index e48ed4e4..4eccf2e1 100644 --- a/languages/cpp/debugger/tests/segfault/segfault.tdevelop +++ b/languages/cpp/debugger/tests/segfault/segfault.tdevelop @@ -4,14 +4,14 @@ Vladimir Prus ghost@zigzag $VERSION$ - TDevCustomProject + KDevCustomProject C++ . false - + segfault executable @@ -38,8 +38,8 @@ - - + + @@ -56,8 +56,8 @@ true 10 - - + + ada ada_bugs_gcc @@ -102,16 +102,16 @@ KDE Libraries (Doxygen) - - + + - - + + true @@ -143,8 +143,8 @@ true Vertical - - + + false false @@ -153,7 +153,7 @@ *.o,*.lo,CVS false - + .h diff --git a/languages/cpp/debugger/tests/threads/threads.tdevelop b/languages/cpp/debugger/tests/threads/threads.tdevelop index c730bfc4..048b3aed 100644 --- a/languages/cpp/debugger/tests/threads/threads.tdevelop +++ b/languages/cpp/debugger/tests/threads/threads.tdevelop @@ -4,22 +4,22 @@ Vladimir Prus ghost@zigzag $VERSION$ - TDevCustomProject + KDevCustomProject C++ - + threads executable - - + + - - + + ada ada_bugs_gcc @@ -64,16 +64,16 @@ KDE Libraries (Doxygen) - - + + - - + + true @@ -87,8 +87,8 @@ 400 250 - - + + false false @@ -97,5 +97,5 @@ *.o,*.lo,CVS false - + diff --git a/languages/cpp/debugger/tests/tracing/tracing.tdevelop b/languages/cpp/debugger/tests/tracing/tracing.tdevelop index ab1846ef..56743de1 100644 --- a/languages/cpp/debugger/tests/tracing/tracing.tdevelop +++ b/languages/cpp/debugger/tests/tracing/tracing.tdevelop @@ -4,14 +4,14 @@ Vladimir Prus ghost@ghostwalk $VERSION$ - TDevCustomProject + KDevCustomProject C++ . false - + tracing executable @@ -38,8 +38,8 @@ - - + + @@ -56,8 +56,8 @@ true 10 - - + + ada ada_bugs_gcc @@ -102,16 +102,16 @@ KDE Libraries (Doxygen) - - + + - - + + true @@ -143,8 +143,8 @@ true Vertical - - + + false false @@ -153,7 +153,7 @@ *.o,*.lo,CVS false - + .h diff --git a/languages/cpp/debugger/tests/two_module/two_module.tdevelop b/languages/cpp/debugger/tests/two_module/two_module.tdevelop index e4a9ae33..a6d22c2a 100644 --- a/languages/cpp/debugger/tests/two_module/two_module.tdevelop +++ b/languages/cpp/debugger/tests/two_module/two_module.tdevelop @@ -4,14 +4,14 @@ Vladimir Prus ghost@ghostwalk $VERSION$ - TDevCustomProject + KDevCustomProject C++ . false - + two_module executable @@ -38,8 +38,8 @@ - - + + @@ -56,8 +56,8 @@ true 10 - - + + ada ada_bugs_gcc @@ -102,16 +102,16 @@ KDE Libraries (Doxygen) - - + + - - + + true @@ -143,8 +143,8 @@ true Vertical - - + + false false @@ -153,7 +153,7 @@ *.o,*.lo,CVS false - + .h diff --git a/languages/cpp/doc/CMakeLists.txt b/languages/cpp/doc/CMakeLists.txt index a6371ae2..9a2b4e11 100644 --- a/languages/cpp/doc/CMakeLists.txt +++ b/languages/cpp/doc/CMakeLists.txt @@ -10,8 +10,8 @@ ################################################# install( FILES - libc.toc libstdc++.toc tdetemplates.toc stl.toc - qt-tdev3.toc tde2book.toc gnustep.toc gnome1.toc + libc.toc libstdc++.toc kdetemplates.toc stl.toc + qt-kdev3.toc kde2book.toc gnustep.toc gnome1.toc clanlib.toc c++_bugs_gcc.toc gtk_bugs.toc wxwidgets_bugs.toc cppannotations.toc - DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation/tocs ) + DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation/tocs ) diff --git a/languages/cpp/doc/Makefile.am b/languages/cpp/doc/Makefile.am index cf1ecd60..55571124 100644 --- a/languages/cpp/doc/Makefile.am +++ b/languages/cpp/doc/Makefile.am @@ -1,5 +1,5 @@ -tocdir = ${kde_datadir}/tdevdocumentation/tocs -toc_DATA = libc.toc libstdc++.toc tdetemplates.toc stl.toc qt-tdev3.toc tde2book.toc \ +tocdir = ${kde_datadir}/kdevdocumentation/tocs +toc_DATA = libc.toc libstdc++.toc kdetemplates.toc stl.toc qt-kdev3.toc kde2book.toc \ gnustep.toc gnome1.toc clanlib.toc c++_bugs_gcc.toc gtk_bugs.toc wxwidgets_bugs.toc \ cppannotations.toc diff --git a/languages/cpp/doc/clanlib.toc b/languages/cpp/doc/clanlib.toc index 82cfe409..2cad8dcd 100644 --- a/languages/cpp/doc/clanlib.toc +++ b/languages/cpp/doc/clanlib.toc @@ -7,7 +7,7 @@ - + diff --git a/languages/cpp/doc/gnome1.toc b/languages/cpp/doc/gnome1.toc index 3cb995d3..577d61af 100644 --- a/languages/cpp/doc/gnome1.toc +++ b/languages/cpp/doc/gnome1.toc @@ -124,7 +124,7 @@ - + diff --git a/languages/cpp/doc/kde2book.toc b/languages/cpp/doc/kde2book.toc new file mode 100644 index 00000000..d806e440 --- /dev/null +++ b/languages/cpp/doc/kde2book.toc @@ -0,0 +1,2875 @@ + + +KDE2 Development Book (kde.org) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/languages/cpp/doc/tdetemplates.toc b/languages/cpp/doc/kdetemplates.toc similarity index 100% rename from languages/cpp/doc/tdetemplates.toc rename to languages/cpp/doc/kdetemplates.toc diff --git a/languages/cpp/doc/qt-kdev3.toc b/languages/cpp/doc/qt-kdev3.toc new file mode 100644 index 00000000..af086cf5 --- /dev/null +++ b/languages/cpp/doc/qt-kdev3.toc @@ -0,0 +1,39 @@ + + +Qt Designer-3 and KDevelop-3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/languages/cpp/doc/qt-tdev3.toc b/languages/cpp/doc/qt-tdev3.toc deleted file mode 100644 index 3f6ffff0..00000000 --- a/languages/cpp/doc/qt-tdev3.toc +++ /dev/null @@ -1,39 +0,0 @@ - - -Qt Designer-3 and TDevelop-3 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/languages/cpp/doc/tde2book.toc b/languages/cpp/doc/tde2book.toc deleted file mode 100644 index 79ceb137..00000000 --- a/languages/cpp/doc/tde2book.toc +++ /dev/null @@ -1,2875 +0,0 @@ - - -KDE2 Development Book (kde.org) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/languages/cpp/file_templates/CMakeLists.txt b/languages/cpp/file_templates/CMakeLists.txt index f7dbfda7..17909c7d 100644 --- a/languages/cpp/file_templates/CMakeLists.txt +++ b/languages/cpp/file_templates/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES c cpp h l ll y yy - DESTINATION ${DATA_INSTALL_DIR}/tdevfilecreate/file-templates ) + DESTINATION ${DATA_INSTALL_DIR}/kdevfilecreate/file-templates ) diff --git a/languages/cpp/file_templates/Makefile.am b/languages/cpp/file_templates/Makefile.am index 722d3091..d688d547 100644 --- a/languages/cpp/file_templates/Makefile.am +++ b/languages/cpp/file_templates/Makefile.am @@ -1,3 +1,3 @@ -templatedir = $(kde_datadir)/tdevfilecreate/file-templates +templatedir = $(kde_datadir)/kdevfilecreate/file-templates template_DATA = c cpp h l ll y yy diff --git a/languages/cpp/kdevcppsupport.desktop b/languages/cpp/kdevcppsupport.desktop new file mode 100644 index 00000000..cd638819 --- /dev/null +++ b/languages/cpp/kdevcppsupport.desktop @@ -0,0 +1,86 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=C++ Support +Comment[ca]=Suport per a C++ +Comment[da]=C++ understøttelse +Comment[de]=C++-Unterstützung für TDevelop +Comment[el]=Υποστήριξη C++ +Comment[es]=Soporte para C++ +Comment[et]=C++ toetus +Comment[eu]=C++ euskarria +Comment[fa]=پشتیبانی C++ +Comment[fr]=Prise en charge du langage C++ +Comment[ga]=Tacaíocht C++ +Comment[gl]=Soporte para C++ +Comment[hi]=सी++ समर्थन +Comment[hu]=C++-támogatás +Comment[is]=C++ stuðningur +Comment[it]=Supporto per C++ +Comment[ja]=C++ サポート +Comment[nds]=Ünnerstütten för C++ +Comment[ne]=C++ समर्थन +Comment[nl]=Ondersteuning voor C++ +Comment[pl]=Obsługa C++ +Comment[pt]=Suporte a C++ +Comment[pt_BR]=Suporte ao C++ +Comment[ru]=Поддержка языка C++ +Comment[sk]=C++ podpora +Comment[sl]=Podpora za C++ +Comment[sr]=Подршка за C++ +Comment[sr@Latn]=Podrška za C++ +Comment[sv]=C++ stöd +Comment[ta]=C++ ஆதரவு +Comment[tg]=Ёрӣ намудани забони C++ +Comment[tr]=C++ Desteği +Comment[zh_CN]=C++ 支持 +Comment[zh_TW]=C++ 支援 +Name=KDevCppSupport +Name[da]=TDevelop C++ understøttelse +Name[hi]=के-डेव-सीपीपी-समर्थन +Name[nds]=CPP-Ünnerstütten för TDevelop +Name[pl]=KDevObsługaCpp +Name[sk]=KDev C++ podpora +Name[sv]=TDevelop C++ stöd +Name[ta]=கெடெவ்சிபிபி ஆதரவு +Name[zh_TW]=TDevelop C++ 支援 +GenericName=C++ Support +GenericName[ca]=Suport per a C++ +GenericName[da]=C++ understøttelse +GenericName[de]=Unterstützung für C++ +GenericName[el]=Υποστήριξη C++ +GenericName[es]=Soporte para C++ +GenericName[et]=C++ toetus +GenericName[eu]=C++ euskarria +GenericName[fa]=پشتیبانی C++ +GenericName[fr]=Prise en charge du langage C++ +GenericName[ga]=Tacaíocht C++ +GenericName[gl]=Soporte para C++ +GenericName[hi]=सी++ समर्थन +GenericName[hu]=C++-támogatás +GenericName[it]=Supporto C++ +GenericName[ja]=C++ サポート +GenericName[nds]=Ünnerstütten för C++ +GenericName[ne]=C++ समर्थन +GenericName[nl]=Ondersteuning voor C++ +GenericName[pa]=C++ ਸਹਿਯੋਗ +GenericName[pl]=Obsługa C++ +GenericName[pt]=Suporte a C++ +GenericName[pt_BR]=Suporte ao C++ +GenericName[ru]=Поддержка языка C++ +GenericName[sk]=C++ podpora +GenericName[sl]=Podpora za C++ +GenericName[sr]=Подршка за C++ +GenericName[sr@Latn]=Podrška za C++ +GenericName[sv]=C++ stöd +GenericName[ta]=C++ ஆதரவு +GenericName[tg]=Ёрӣ намудани забони C++ +GenericName[tr]=C++ Desteği +GenericName[zh_CN]=C++ 支持 +GenericName[zh_TW]=C++ 支援 +ServiceTypes=TDevelop/LanguageSupport +Icon=source_cpp +X-TDE-Library=libkdevcppsupport +X-TDevelop-Version=5 +X-TDevelop-Language=C++ +X-TDevelop-Args=Cpp diff --git a/languages/cpp/kdevcppsupport.rc b/languages/cpp/kdevcppsupport.rc new file mode 100644 index 00000000..37e3fa3a --- /dev/null +++ b/languages/cpp/kdevcppsupport.rc @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/languages/cpp/kdevcsupport.desktop b/languages/cpp/kdevcsupport.desktop new file mode 100644 index 00000000..cc54dd73 --- /dev/null +++ b/languages/cpp/kdevcsupport.desktop @@ -0,0 +1,85 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=C Support +Comment[ca]=Suport per a C +Comment[da]=C understøttelse +Comment[de]=C-Unterstützung für TDevelop +Comment[el]=Υποστήριξη C +Comment[es]=Soporte para C +Comment[et]=C toetus +Comment[eu]=C euskarria +Comment[fa]=پشتیبانی سی +Comment[fr]=Prise en charge du langage C +Comment[ga]=Tacaíocht C +Comment[gl]=Soporte para C +Comment[hi]=सी समर्थन +Comment[hu]=C-támogatás +Comment[is]=C stuðningur +Comment[it]=Supporto per C +Comment[ja]=C サポート +Comment[nds]=Ünnerstütten för C +Comment[ne]=C समर्थन +Comment[nl]=Ondersteuning voor C +Comment[pa]=C ਸਹਿਯੋਗ +Comment[pl]=Obsługa C +Comment[pt]=Suporte a C +Comment[pt_BR]=Suporte ao C +Comment[ru]=Поддержка языка C +Comment[sk]=C podpora +Comment[sl]=Podpora za C +Comment[sr]=Подршка за C +Comment[sr@Latn]=Podrška za C +Comment[sv]=C-stöd +Comment[ta]=C ஆதரவு +Comment[tg]=Ёрӣ намудани забони C +Comment[tr]=C Desteği +Comment[zh_CN]=C 支持 +Comment[zh_TW]=C 支援 +Name=KDevCSupport +Name[da]=TDevelop C understøttelse +Name[nds]=C-Ünnerstütten för TDevelop +Name[pl]=KDevObsługaC +Name[sk]=KDev C podpora +Name[sv]=TDevelop C-stöd +Name[zh_TW]=TDevelop C 支援 +GenericName=C Support +GenericName[ca]=Suport per a C +GenericName[da]=C understøttelse +GenericName[de]=Unterstützung für C +GenericName[el]=Υποστήριξη C +GenericName[es]=Soporte para C +GenericName[et]=C toetus +GenericName[eu]=C euskarria +GenericName[fa]=پشتیبانی سی +GenericName[fr]=Prise en charge du langage C +GenericName[ga]=Tacaíocht C +GenericName[gl]=Soporte para C +GenericName[hi]=सी समर्थन +GenericName[hu]=C-támogatás +GenericName[it]=Supporto C +GenericName[ja]=C サポート +GenericName[nds]=Ünnerstütten för C +GenericName[ne]=C समर्थन +GenericName[nl]=Ondersteuning voor C +GenericName[pa]=C ਸਹਿਯੋਗ +GenericName[pl]=Obsługa C +GenericName[pt]=Suporte a C +GenericName[pt_BR]=Suporte ao C +GenericName[ru]=Поддержка языка C +GenericName[sk]=C podpora +GenericName[sl]=Podpora za C +GenericName[sr]=Подршка за C +GenericName[sr@Latn]=Podrška za C +GenericName[sv]=C-stöd +GenericName[ta]=C ஆதரவு +GenericName[tg]=Ёрӣ намудани забони C +GenericName[tr]=C Desteği +GenericName[zh_CN]=C 支持 +GenericName[zh_TW]=C 支援 +ServiceTypes=TDevelop/LanguageSupport +Icon=source_cpp +X-TDE-Library=libkdevcppsupport +X-TDevelop-Version=5 +X-TDevelop-Language=C +X-TDevelop-Args=C diff --git a/languages/cpp/kdevdeepcopy.h b/languages/cpp/kdevdeepcopy.h new file mode 100644 index 00000000..c29ee1e1 --- /dev/null +++ b/languages/cpp/kdevdeepcopy.h @@ -0,0 +1,14 @@ +#ifndef KDEVDEEPCOPY_H +#define KDEVDEEPCOPY_H + +#include + +inline TQString deepCopy( const TQString& s ) +{ + TQCString str = s.utf8(); + return TQString::fromUtf8( str, str.length() ); +} + +#endif +// kate: indent-mode csands; tab-width 4; + diff --git a/languages/cpp/kdevdriver.cpp b/languages/cpp/kdevdriver.cpp new file mode 100644 index 00000000..4a6c45ec --- /dev/null +++ b/languages/cpp/kdevdriver.cpp @@ -0,0 +1,206 @@ +#include "tdelocale.h" /* defines [function] i18n */ +#include + +#include "kdevdriver.h" +#include "cppcodecompletionconfig.h" +#include "setuphelper.h" +#include +#include "includepathresolver.h" + + +KDevDriver::KDevDriver( CppSupportPart* cppSupport, bool foreground ) +: m_cppSupport( cppSupport ), m_includePathResolver(0), m_foreground(foreground), m_shouldParseIncludedFiles(true) +{ + //setupProject(); + setup(); + +} + +KDevDriver::~KDevDriver() { + delete m_includePathResolver; +} + +CppSupportPart* KDevDriver::cppSupport() { return m_cppSupport; } + +void KDevDriver::setupProject() +{ + TQMap map; + + TQStringList fileList = m_cppSupport->project() ->allFiles(); + TQStringList::ConstIterator it = fileList.begin(); + while ( it != fileList.end() ) + { + TQFileInfo info( *it ); + ++it; + + map.insert( info.dirPath( true ), true ); + } + TQMap::Iterator mapit = map.begin(); + while ( mapit != map.end() ) + { + addIncludePath( mapit.key() ); + ++mapit; + } +} + +void KDevDriver::setupLexer( Lexer* lexer ) +{ + Driver::setupLexer( lexer ); + lexer->setReportMessages( true ); + lexer->setReportWarnings( true ); +} + +//! setup the preprocessor +//! code provided by Reginald Stadlbauer +void KDevDriver::setup() +{ + if( lexerCache() ) lexerCache()->clear(); ///Clear the lexer-cache so missing headers get a chance to be parsed + clearMacros(); + clearIncludePaths(); + + addMacro( Macro("KDEVELOP_PARSER", "3.4") ); + + bool ok; + TQString verboseGccOutput = SetupHelper::getVerboseGccIncludePath( &ok ); + TQStringList verboseGccLines = TQStringList::split( '\n', verboseGccOutput ); + if( verboseGccLines.count() > 3 ) { + ///Parse the output of gcc. It includes gcc's final include-path when parsing an empty c++-file(including dirs like /usr/include/c++/4.xx/...) + //what about order? + for( TQStringList::iterator it = verboseGccLines.begin(); it != verboseGccLines.end(); ++it ) { + if( (*it).startsWith(" ") && (*it).length() > 2 && (*it)[1] != ' ' ) { + //it is a potential include-file + TQString path = (*it).stripWhiteSpace(); + TQFileInfo info( path ); + if( info.exists() ) { + kdDebug( 9007 ) << "Adding include-path from gcc-output: \"" << path << "\" absolute: \"" << info.absFilePath() << "\"" << endl; + addIncludePath(info.absFilePath()); + } + } + } + } else { + ///Do some of the old stuff + addIncludePath( "/include" ); + addIncludePath( "/usr/include" ); + addIncludePath( "/usr/local/include" ); + + bool ok; + TQString includePath = SetupHelper::getGccIncludePath(&ok); + if (ok) { + TQStringList ls = TQStringList::split( "\n", includePath ); + for( TQStringList::const_iterator it = ls.begin(); it != ls.end(); ++it ) { + if( !(*it).isEmpty() ) + addIncludePath( *it ); + } + } + + addIncludePath( includePath ); + addIncludePath( "/usr/include/g++-3" ); + addIncludePath( "/usr/include/g++" ); + } + + addMacro( Macro( "__cplusplus", "1" ) ); + + ///@todo maybe remove the following? Is there any normal user who has his environment set up correctly so this is of any use? + TQString tdedir = getenv( "TDEDIR" ); + if( !tdedir.isNull() ) + addIncludePath( tdedir + "/include" ); + + TQString qmakespec = getenv( "QMAKESPEC" ); + if ( qmakespec.isNull() ) + qmakespec = "linux-g++"; + + TQString qtdir = getenv( "QTDIR" ); + if( !qtdir.isNull() ) { + addIncludePath( qtdir + "/include" ); + + // #### implement other mkspecs and find a better way to find the + // #### proper mkspec (althoigh this will be no fun :-) + + addIncludePath( qtdir + "/mkspecs/" + qmakespec ); + } + + TQStringList lines = SetupHelper::getGccMacros(&ok); + if (!ok) { + for (TQStringList::ConstIterator it = lines.constBegin(); it != lines.constEnd(); ++it) { + TQStringList lst = TQStringList::split( ' ', *it ); + if ( lst.count() != 3 ) + continue; + addMacro( Macro( lst[1], lst[2] ) ); + } + } + + addMacro( Macro( "__cplusplus", "1" ) ); + addMacro( Macro( "signals", "signals" ) ); + addMacro( Macro( "slots", "slots" ) ); + addMacro( Macro( "TQ_SCRIPTABLE", "" ) ); + + CppCodeCompletionConfig* cfg = m_cppSupport->codeCompletionConfig(); + TQString str = cfg->customIncludePaths(); + int pos = 0; + while( pos < str.length() ) { + int end = str.find( ';', pos ); + if( end == -1 ) { + end = str.length(); + } + + TQString s = str.mid( pos, end-pos ).stripWhiteSpace(); + if( !s.isEmpty() ) { + if( !s.startsWith( "/" ) && m_cppSupport->project() ) { + s = m_cppSupport->project()->projectDirectory() + "/" + s; + } + addIncludePath( s ); + } + + pos = end+1; + } + + setResolveDependencesEnabled( cfg->preProcessAllHeaders() | cfg->parseMissingHeaders() ); + + delete m_includePathResolver; + if( cfg->resolveIncludePaths() ) { + m_includePathResolver = new CppTools::IncludePathResolver( m_foreground ); + if( m_cppSupport && m_cppSupport->project() ) + m_includePathResolver->setOutOfSourceBuildSystem( m_cppSupport->project()->projectDirectory(), m_cppSupport->project()->buildDirectory() ); + } else + m_includePathResolver = 0; + + m_shouldParseIncludedFiles = cfg->parseMissingHeaders(); +} + +TQStringList KDevDriver::getCustomIncludePath( const TQString& file ) { + if( !file.startsWith("/") ) + kdDebug( 9007 ) << "KDevDriver::getCustomIncludePath(..): given file \"" << file << "\" is not absolute" << endl; + if( !m_includePathResolver ) + return includePaths(); + CppTools::PathResolutionResult res = m_includePathResolver->resolveIncludePath( file ); + + if( !res.success ) { + Problem p( i18n( "%1. Message: %2" ).arg( res.errorMessage ).arg( res.longErrorMessage ), 0, 0, Problem::Level_Warning ); + p.setFileName( file ); + addProblem( file, p ); + } + + return res.path + includePaths(); +} + +bool KDevDriver::shouldParseIncludedFile( const ParsedFilePointer& file ) { + TQString compoundString = file->fileName() + "||" + TQString("%1").arg(file->usedMacros().valueHash()) + "||" + TQString("%1").arg(file->usedMacros().idHash()); + + if( !m_shouldParseIncludedFiles ) + return false; + m_cppSupport->safeFileSet().contains( compoundString ); + + if( m_cppSupport->safeFileSet().contains( file->fileName()) ){ + return false; + } else if( m_cppSupport->safeFileSet().contains( compoundString ) ) { + //kdDebug( 9007 ) << "ALREADY IN FILE-SET: " << compoundString << endl; + return false; + } else { + m_cppSupport->safeFileSet().insert( compoundString ); //This is needed so the same instance of a file is not queued many times + //kdDebug( 9007 ) << "NOT IN FILE-SET, PARSING: " << compoundString << endl; + return true; + } + +} + +//kate: indent-mode csands; tab-width 4; space-indent off; diff --git a/languages/cpp/kdevdriver.h b/languages/cpp/kdevdriver.h new file mode 100644 index 00000000..8af87e0c --- /dev/null +++ b/languages/cpp/kdevdriver.h @@ -0,0 +1,58 @@ + +#ifndef __kdevdriver_h +#define __kdevdriver_h + +#include "cppsupportpart.h" +#include "driver.h" + +#include +#include + +#include +#include +#include + +class TDEProcess; +namespace CppTools { + class IncludePathResolver; +}; + +class KDevDriver: public Driver +{ +public: + ///When the driver is used in a background-thread, foreground MUST be false(else crash) + KDevDriver( CppSupportPart* cppSupport, bool foreground = false ); + ~KDevDriver(); + CppSupportPart* cppSupport(); + void setupProject(); + //! setup the preprocessor + //! code provided by Reginald Stadlbauer + void setup(); + + virtual void addMacro( const Macro& m ) + { + if ( m.name() == "signals" || m.name() == "slots" ) + return ; + Driver::addMacro( m ); + } + +protected: + void setupLexer( Lexer* lexer ); + + ///Returns the complete include-path for that file. Not constant because it may add Problem-items to the driver. Must be absolute path. + virtual TQStringList getCustomIncludePath( const TQString& file ); + + virtual bool shouldParseIncludedFile( const ParsedFilePointer& /*file*/ ); + +private: + + CppSupportPart* m_cppSupport; + CppTools::IncludePathResolver* m_includePathResolver; + bool m_foreground; + bool m_shouldParseIncludedFiles; +}; + +#endif +// kate: indent-mode csands; tab-width 4; + + diff --git a/languages/cpp/newclass_templates/CMakeLists.txt b/languages/cpp/newclass_templates/CMakeLists.txt index 7847d9a7..73b9bff5 100644 --- a/languages/cpp/newclass_templates/CMakeLists.txt +++ b/languages/cpp/newclass_templates/CMakeLists.txt @@ -12,4 +12,4 @@ install( FILES cpp_header cpp_source gtk_header gtk_source objc_header objc_source - DESTINATION ${DATA_INSTALL_DIR}/tdevcppsupport/newclass ) + DESTINATION ${DATA_INSTALL_DIR}/kdevcppsupport/newclass ) diff --git a/languages/cpp/newclass_templates/Makefile.am b/languages/cpp/newclass_templates/Makefile.am index 2b47443f..5b013d27 100644 --- a/languages/cpp/newclass_templates/Makefile.am +++ b/languages/cpp/newclass_templates/Makefile.am @@ -1,4 +1,4 @@ -cppsupportdatadir = ${kde_datadir}/tdevcppsupport +cppsupportdatadir = ${kde_datadir}/kdevcppsupport newclassdir = ${cppsupportdatadir}/newclass newclass_DATA = cpp_header cpp_source gtk_header gtk_source objc_header objc_source diff --git a/languages/cpp/pcsimporter/customimporter/CMakeLists.txt b/languages/cpp/pcsimporter/customimporter/CMakeLists.txt index 90652509..c2e07bdb 100644 --- a/languages/cpp/pcsimporter/customimporter/CMakeLists.txt +++ b/languages/cpp/pcsimporter/customimporter/CMakeLists.txt @@ -24,14 +24,14 @@ link_directories( ##### other data ################################ -install( FILES tdevpcscustomimporter.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevpcscustomimporter.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevcustompcsimporter (module) ######### +##### libkdevcustompcsimporter (module) ######### -tde_add_kpart( libtdevcustompcsimporter AUTOMOC +tde_add_kpart( libkdevcustompcsimporter AUTOMOC SOURCES - tdevcustomimporter.cpp settingsdialog.cpp + kdevcustomimporter.cpp settingsdialog.cpp settingsdialogbase.ui LINK lang_interfaces-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} diff --git a/languages/cpp/pcsimporter/customimporter/Makefile.am b/languages/cpp/pcsimporter/customimporter/Makefile.am index 1a6c1f1d..7e6a7093 100644 --- a/languages/cpp/pcsimporter/customimporter/Makefile.am +++ b/languages/cpp/pcsimporter/customimporter/Makefile.am @@ -1,12 +1,12 @@ INCLUDES = -I$(top_srcdir)/languages/lib/interfaces \ -I$(top_srcdir)/lib/interfaces $(all_includes) METASOURCES = AUTO -kde_module_LTLIBRARIES = libtdevcustompcsimporter.la +kde_module_LTLIBRARIES = libkdevcustompcsimporter.la -noinst_HEADERS = tdevcustomimporter.h -libtdevcustompcsimporter_la_SOURCES = tdevcustomimporter.cpp settingsdialog.cpp settingsdialogbase.ui -libtdevcustompcsimporter_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ +noinst_HEADERS = kdevcustomimporter.h +libkdevcustompcsimporter_la_SOURCES = kdevcustomimporter.cpp settingsdialog.cpp settingsdialogbase.ui +libkdevcustompcsimporter_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ $(top_builddir)/languages/lib/interfaces/liblang_interfaces.la -libtdevcustompcsimporter_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) -kde_services_DATA = tdevpcscustomimporter.desktop +libkdevcustompcsimporter_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) +kde_services_DATA = kdevpcscustomimporter.desktop diff --git a/languages/cpp/pcsimporter/customimporter/kdevcustomimporter.cpp b/languages/cpp/pcsimporter/customimporter/kdevcustomimporter.cpp new file mode 100644 index 00000000..38a41eb8 --- /dev/null +++ b/languages/cpp/pcsimporter/customimporter/kdevcustomimporter.cpp @@ -0,0 +1,118 @@ +/*************************************************************************** +* Copyright (C) 2003 by Alexander Dymo * +* cloudtemple@mksat.net * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +***************************************************************************/ +#include "kdevcustomimporter.h" + +#include "settingsdialog.h" + +#include +#include + +#include +#include + +K_EXPORT_COMPONENT_FACTORY( libkdevcustompcsimporter, KGenericFactory( "kdevcustompcsimporter" ) ) + +KDevCustomImporter::KDevCustomImporter( TQObject* parent, const char* name, const TQStringList & // args + ) + : KDevPCSImporter( parent, name ) +{} + + +KDevCustomImporter::~KDevCustomImporter() +{} + + +TQString KDevCustomImporter::dbName() const +{ + return m_settings->dbName(); +} + +TQStringList KDevCustomImporter::fileList( const TQString& path ) +{ + TQDir dir( path ); + if ( !dir.exists() ) + return TQStringList(); +// TQStringList lst = dir.entryList( "*.h;*.H;*.hh;*.hxx;*.hpp;*.tlh" ); + TQStringList lst = dir.entryList( m_settings->filePattern() ); + TQStringList fileList; + for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) + { + fileList.push_back( dir.absPath() + "/" + ( *it ) ); + } + return fileList; +} + +TQStringList KDevCustomImporter::fileList() +{ + if ( !m_settings ) + return TQStringList(); + + TQStringList lst = m_settings->dirs(); + TQStringList files; + for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) + { + if ( !m_settings->recursive() ) + files += fileList( *it ); + else + processDir( *it, files ); + } + + return files; +} + +TQStringList KDevCustomImporter::includePaths() +{ + if ( !m_settings ) + return TQStringList(); + + return m_settings->dirs(); +} + +TQWidget* KDevCustomImporter::createSettingsPage( TQWidget* parent, const char* name ) +{ + m_settings = new SettingsDialog( parent, name ); + return m_settings; +} + +void KDevCustomImporter::processDir( const TQString path, TQStringList & files ) +{ + TQValueStack s; + s.push( path ); + files += fileList( path ); + + TQDir dir; + do + { + dir.setPath( s.pop() ); + if (!dir.exists()) + continue; + kdDebug( 9015 ) << "Examining: " << dir.path() << endl; + const TQFileInfoList *dirEntries = dir.entryInfoList(); + if ( !dirEntries ) continue; + TQPtrListIterator it( *dirEntries ); + for ( ; dirEntries && it.current(); ++it ) + { + TQString fileName = it.current() ->fileName(); + if ( fileName == "." || fileName == ".." ) + continue; + if ( it.current() ->isDir() ) + { + TQString tmpPath = it.current() ->absFilePath(); + kdDebug( 9015 ) << "Pushing: " << tmpPath << endl; + s.push( tmpPath ); + files += fileList( tmpPath ); + } + } + } + while ( !s.isEmpty() ); +} + +#include "kdevcustomimporter.moc" +//kate: indent-mode csands; tab-width 4; space-indent off; diff --git a/languages/cpp/pcsimporter/customimporter/kdevcustomimporter.h b/languages/cpp/pcsimporter/customimporter/kdevcustomimporter.h new file mode 100644 index 00000000..884a033d --- /dev/null +++ b/languages/cpp/pcsimporter/customimporter/kdevcustomimporter.h @@ -0,0 +1,41 @@ +/*************************************************************************** +* Copyright (C) 2003 by Alexander Dymo * +* cloudtemple@mksat.net * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +***************************************************************************/ +#ifndef KDEVCUSTOMIMPORTER_H +#define KDEVCUSTOMIMPORTER_H + +#include "kdevpcsimporter.h" + +#include + +class SettingsDialog; + +class KDevCustomImporter : public KDevPCSImporter +{ +Q_OBJECT + +public: + KDevCustomImporter(TQObject* parent = 0, const char* name = 0, const TQStringList &args = TQStringList()); + + ~KDevCustomImporter(); + + virtual TQString dbName() const; + virtual TQStringList fileList(); + virtual TQStringList includePaths(); + virtual TQWidget* createSettingsPage(TQWidget* parent, const char* name); + +protected: + TQStringList fileList( const TQString& path ); + void processDir(const TQString path, TQStringList &files ); + +private: + TQGuardedPtr m_settings; +}; + +#endif diff --git a/languages/cpp/pcsimporter/customimporter/kdevpcscustomimporter.desktop b/languages/cpp/pcsimporter/customimporter/kdevpcscustomimporter.desktop new file mode 100644 index 00000000..b351a8e3 --- /dev/null +++ b/languages/cpp/pcsimporter/customimporter/kdevpcscustomimporter.desktop @@ -0,0 +1,44 @@ +[Desktop Entry] +Type=Service +Name=KDevPCSCustomImporter +Name[da]=TDevelop brugerdefineret PCS-importør +Name[nds]=EgenPCS-Import för TDevelop +Name[pl]=KDevWłasnyImportPCS +Name[sk]=KDev PCS vlastný import +Name[sv]=TDevelop egen import av PCS +Name[zh_TW]=TDevelop PCS 自訂匯入器 +Comment=TDevelop Custom Directory PCS Importer +Comment[ca]=Importador PCS de directori personalitzat per a TDevelop +Comment[da]=TDevelop brugerdefineret mappe-PCS-importør +Comment[de]=Import für persistenten Klassenspeicher aus benutzerdefinierten Ordnern +Comment[el]=Εισαγωγέας PCS προσαρμοσμένου καταλόγου του TDevelop +Comment[es]=Importador PCS de carpeta personalizada de TDevelop +Comment[et]=TDevelopi kohandatud kataloogi PCS importija +Comment[eu]=TDevelop-en direktorio pertsonalizatuko PCS inportatzailea +Comment[fa]=واردکنندۀ PCS فهرست سفارشی TDevelop +Comment[fr]=Importation PCS de dossiers personnalisés pour TDevelop +Comment[gl]=Importador PCS de directorios personalizados para TDevelop +Comment[hi]=के-डेवलप मनपसंद डिरेक्ट्री पीसीएस आयातक +Comment[hu]=TDevelop egyéni könyvtár PCS-importáló +Comment[it]=Cartella per l'importatore personalizzato PCS di TDevelop +Comment[ja]=TDevelop カスタムディレクトリ PCS インポータ +Comment[nds]=Import för duerhaftig Klassenspieker ut Bruker-Ornern +Comment[ne]=केडीई विकास अनुकूल डाइरेक्टरी PCS आयातकर्ता +Comment[nl]=TDevelop PCS Importer voor eigen mappen +Comment[pl]=Własny program do importowania PCS dla TDevelopa +Comment[pt]=Importador de PCS com Directoria Personalizada do TDevelop +Comment[pt_BR]=Importador de Diretório PCS Personalizado para o TDevelop +Comment[ru]=Загрузка символов из любого каталога в хранилище классов +Comment[sk]=TDevelop vlastný PCS import priečinkov +Comment[sr]=TDevelop-ов PCS увозник прилагођеног директоријума +Comment[sr@Latn]=TDevelop-ov PCS uvoznik prilagođenog direktorijuma +Comment[sv]=TDevelop PCS-import för egen katalog +Comment[ta]=கெடெவலப் கஸ்டம் டைரக்ட்ரி இறக்குமதியாளர் +Comment[tg]=Пурборкунии нишонаҳо аз анбори синфҳои каталог +Comment[tr]=TDevelop Özel Dizin PCS Aktarıcısı +Comment[zh_CN]=TDevelop 自定义目录的 PCS 导入器 +Comment[zh_TW]=TDevelop 自訂目錄 PCS 匯入器 +Icon=gear +ServiceTypes=TDevelop/PCSImporter +X-TDE-Library=libkdevcustompcsimporter +X-TDevelop-PCSImporter= diff --git a/languages/cpp/pcsimporter/customimporter/tdevcustomimporter.cpp b/languages/cpp/pcsimporter/customimporter/tdevcustomimporter.cpp deleted file mode 100644 index 33a2bf40..00000000 --- a/languages/cpp/pcsimporter/customimporter/tdevcustomimporter.cpp +++ /dev/null @@ -1,118 +0,0 @@ -/*************************************************************************** -* Copyright (C) 2003 by Alexander Dymo * -* cloudtemple@mksat.net * -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -***************************************************************************/ -#include "tdevcustomimporter.h" - -#include "settingsdialog.h" - -#include -#include - -#include -#include - -K_EXPORT_COMPONENT_FACTORY( libtdevcustompcsimporter, KGenericFactory( "tdevcustompcsimporter" ) ) - -TDevCustomImporter::TDevCustomImporter( TQObject* parent, const char* name, const TQStringList & // args - ) - : TDevPCSImporter( parent, name ) -{} - - -TDevCustomImporter::~TDevCustomImporter() -{} - - -TQString TDevCustomImporter::dbName() const -{ - return m_settings->dbName(); -} - -TQStringList TDevCustomImporter::fileList( const TQString& path ) -{ - TQDir dir( path ); - if ( !dir.exists() ) - return TQStringList(); -// TQStringList lst = dir.entryList( "*.h;*.H;*.hh;*.hxx;*.hpp;*.tlh" ); - TQStringList lst = dir.entryList( m_settings->filePattern() ); - TQStringList fileList; - for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) - { - fileList.push_back( dir.absPath() + "/" + ( *it ) ); - } - return fileList; -} - -TQStringList TDevCustomImporter::fileList() -{ - if ( !m_settings ) - return TQStringList(); - - TQStringList lst = m_settings->dirs(); - TQStringList files; - for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) - { - if ( !m_settings->recursive() ) - files += fileList( *it ); - else - processDir( *it, files ); - } - - return files; -} - -TQStringList TDevCustomImporter::includePaths() -{ - if ( !m_settings ) - return TQStringList(); - - return m_settings->dirs(); -} - -TQWidget* TDevCustomImporter::createSettingsPage( TQWidget* parent, const char* name ) -{ - m_settings = new SettingsDialog( parent, name ); - return m_settings; -} - -void TDevCustomImporter::processDir( const TQString path, TQStringList & files ) -{ - TQValueStack s; - s.push( path ); - files += fileList( path ); - - TQDir dir; - do - { - dir.setPath( s.pop() ); - if (!dir.exists()) - continue; - kdDebug( 9015 ) << "Examining: " << dir.path() << endl; - const TQFileInfoList *dirEntries = dir.entryInfoList(); - if ( !dirEntries ) continue; - TQPtrListIterator it( *dirEntries ); - for ( ; dirEntries && it.current(); ++it ) - { - TQString fileName = it.current() ->fileName(); - if ( fileName == "." || fileName == ".." ) - continue; - if ( it.current() ->isDir() ) - { - TQString tmpPath = it.current() ->absFilePath(); - kdDebug( 9015 ) << "Pushing: " << tmpPath << endl; - s.push( tmpPath ); - files += fileList( tmpPath ); - } - } - } - while ( !s.isEmpty() ); -} - -#include "tdevcustomimporter.moc" -//kate: indent-mode csands; tab-width 4; space-indent off; diff --git a/languages/cpp/pcsimporter/customimporter/tdevcustomimporter.h b/languages/cpp/pcsimporter/customimporter/tdevcustomimporter.h deleted file mode 100644 index 925e42f9..00000000 --- a/languages/cpp/pcsimporter/customimporter/tdevcustomimporter.h +++ /dev/null @@ -1,41 +0,0 @@ -/*************************************************************************** -* Copyright (C) 2003 by Alexander Dymo * -* cloudtemple@mksat.net * -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -***************************************************************************/ -#ifndef TDEVCUSTOMIMPORTER_H -#define TDEVCUSTOMIMPORTER_H - -#include "tdevpcsimporter.h" - -#include - -class SettingsDialog; - -class TDevCustomImporter : public TDevPCSImporter -{ -Q_OBJECT - -public: - TDevCustomImporter(TQObject* parent = 0, const char* name = 0, const TQStringList &args = TQStringList()); - - ~TDevCustomImporter(); - - virtual TQString dbName() const; - virtual TQStringList fileList(); - virtual TQStringList includePaths(); - virtual TQWidget* createSettingsPage(TQWidget* parent, const char* name); - -protected: - TQStringList fileList( const TQString& path ); - void processDir(const TQString path, TQStringList &files ); - -private: - TQGuardedPtr m_settings; -}; - -#endif diff --git a/languages/cpp/pcsimporter/customimporter/tdevpcscustomimporter.desktop b/languages/cpp/pcsimporter/customimporter/tdevpcscustomimporter.desktop deleted file mode 100644 index 50530ef8..00000000 --- a/languages/cpp/pcsimporter/customimporter/tdevpcscustomimporter.desktop +++ /dev/null @@ -1,44 +0,0 @@ -[Desktop Entry] -Type=Service -Name=TDevPCSCustomImporter -Name[da]=TDevelop brugerdefineret PCS-importør -Name[nds]=EgenPCS-Import för TDevelop -Name[pl]=KDevWłasnyImportPCS -Name[sk]=KDev PCS vlastný import -Name[sv]=TDevelop egen import av PCS -Name[zh_TW]=TDevelop PCS 自訂匯入器 -Comment=TDevelop Custom Directory PCS Importer -Comment[ca]=Importador PCS de directori personalitzat per a TDevelop -Comment[da]=TDevelop brugerdefineret mappe-PCS-importør -Comment[de]=Import für persistenten Klassenspeicher aus benutzerdefinierten Ordnern -Comment[el]=Εισαγωγέας PCS προσαρμοσμένου καταλόγου του TDevelop -Comment[es]=Importador PCS de carpeta personalizada de TDevelop -Comment[et]=TDevelopi kohandatud kataloogi PCS importija -Comment[eu]=TDevelop-en direktorio pertsonalizatuko PCS inportatzailea -Comment[fa]=واردکنندۀ PCS فهرست سفارشی TDevelop -Comment[fr]=Importation PCS de dossiers personnalisés pour TDevelop -Comment[gl]=Importador PCS de directorios personalizados para TDevelop -Comment[hi]=के-डेवलप मनपसंद डिरेक्ट्री पीसीएस आयातक -Comment[hu]=TDevelop egyéni könyvtár PCS-importáló -Comment[it]=Cartella per l'importatore personalizzato PCS di TDevelop -Comment[ja]=TDevelop カスタムディレクトリ PCS インポータ -Comment[nds]=Import för duerhaftig Klassenspieker ut Bruker-Ornern -Comment[ne]=केडीई विकास अनुकूल डाइरेक्टरी PCS आयातकर्ता -Comment[nl]=TDevelop PCS Importer voor eigen mappen -Comment[pl]=Własny program do importowania PCS dla TDevelopa -Comment[pt]=Importador de PCS com Directoria Personalizada do TDevelop -Comment[pt_BR]=Importador de Diretório PCS Personalizado para o TDevelop -Comment[ru]=Загрузка символов из любого каталога в хранилище классов -Comment[sk]=TDevelop vlastný PCS import priečinkov -Comment[sr]=TDevelop-ов PCS увозник прилагођеног директоријума -Comment[sr@Latn]=TDevelop-ov PCS uvoznik prilagođenog direktorijuma -Comment[sv]=TDevelop PCS-import för egen katalog -Comment[ta]=கெடெவலப் கஸ்டம் டைரக்ட்ரி இறக்குமதியாளர் -Comment[tg]=Пурборкунии нишонаҳо аз анбори синфҳои каталог -Comment[tr]=TDevelop Özel Dizin PCS Aktarıcısı -Comment[zh_CN]=TDevelop 自定义目录的 PCS 导入器 -Comment[zh_TW]=TDevelop 自訂目錄 PCS 匯入器 -Icon=gear -ServiceTypes=TDevelop/PCSImporter -X-TDE-Library=libtdevcustompcsimporter -X-TDevelop-PCSImporter= diff --git a/languages/cpp/pcsimporter/qt4importer/CMakeLists.txt b/languages/cpp/pcsimporter/qt4importer/CMakeLists.txt index 908c66fc..8e29fdec 100644 --- a/languages/cpp/pcsimporter/qt4importer/CMakeLists.txt +++ b/languages/cpp/pcsimporter/qt4importer/CMakeLists.txt @@ -24,14 +24,14 @@ link_directories( ##### other data ################################ -install( FILES tdevqt4importer.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevqt4importer.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevqt4importer (module) ############### +##### libkdevqt4importer (module) ############### -tde_add_kpart( libtdevqt4importer AUTOMOC +tde_add_kpart( libkdevqt4importer AUTOMOC SOURCES - tdevqt4importer.cpp settingsdialogbase.ui + kdevqt4importer.cpp settingsdialogbase.ui settingsdialog.cpp LINK lang_interfaces-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} diff --git a/languages/cpp/pcsimporter/qt4importer/Makefile.am b/languages/cpp/pcsimporter/qt4importer/Makefile.am index 935c7d49..12f12104 100644 --- a/languages/cpp/pcsimporter/qt4importer/Makefile.am +++ b/languages/cpp/pcsimporter/qt4importer/Makefile.am @@ -1,11 +1,11 @@ INCLUDES = -I$(top_srcdir)/languages/lib/interfaces \ -I$(top_srcdir)/lib/interfaces $(all_includes) METASOURCES = AUTO -kde_module_LTLIBRARIES = libtdevqt4importer.la +kde_module_LTLIBRARIES = libkdevqt4importer.la -noinst_HEADERS = tdevqt4importer.h settingsdialog.h -libtdevqt4importer_la_SOURCES = tdevqt4importer.cpp settingsdialogbase.ui settingsdialog.cpp -kde_services_DATA = tdevqt4importer.desktop -libtdevqt4importer_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ +noinst_HEADERS = kdevqt4importer.h settingsdialog.h +libkdevqt4importer_la_SOURCES = kdevqt4importer.cpp settingsdialogbase.ui settingsdialog.cpp +kde_services_DATA = kdevqt4importer.desktop +libkdevqt4importer_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ $(top_builddir)/languages/lib/interfaces/liblang_interfaces.la -libtdevqt4importer_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) +libkdevqt4importer_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) diff --git a/languages/cpp/pcsimporter/qt4importer/kdevqt4importer.cpp b/languages/cpp/pcsimporter/qt4importer/kdevqt4importer.cpp new file mode 100644 index 00000000..0289c7a4 --- /dev/null +++ b/languages/cpp/pcsimporter/qt4importer/kdevqt4importer.cpp @@ -0,0 +1,107 @@ +/*************************************************************************** + * Copyright (C) 2003 by Roberto Raggi * + * roberto@kdevelop.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "kdevqt4importer.h" +#include "kdevqt4importer.moc" +#include "settingsdialog.h" + +#include +#include +#include +#include + +#include +#include +#include + +K_EXPORT_COMPONENT_FACTORY( libkdevqt4importer, KGenericFactory( "kdevqt4importer" ) ) + +KDevQt4Importer::KDevQt4Importer( TQObject * parent, const char * name, const TQStringList& ) + : KDevPCSImporter( parent, name ) +{ + m_qtfile = 0; +} + +KDevQt4Importer::~KDevQt4Importer() +{ + if (m_qtfile) + delete m_qtfile; + + m_qtfile = 0; +} + +TQStringList KDevQt4Importer::fileList() +{ + if( !m_settings ) + return TQStringList(); + + if (m_qtfile) + delete m_qtfile; + + KTempFile ifile; + TQTextStream &is = *ifile.textStream(); + + is << "#include \n" + << "#undef slots\n#undef signals\n#undef slots\n#undef signals" + << "#define slots slots\n" + << "#define signals signals\n" + << "#include \n" + << "#include \n" + << "#include \n" + << "#include \n" + << "#include \n" + << "#include \n" + << "#include \n" + << "#include \n"; + + + + TDEProcess proc; + proc << "cpp" << "-nostdinc" << "-xc++"; + + m_qtfile = new KTempFile(); + + // include paths + TQStringList paths = includePaths(); + for (TQStringList::Iterator it = paths.begin(); it != paths.end(); ++it) + proc << "-I" << *it; + + ifile.close(); + + TQString o; + o += "-o"; + o += m_qtfile->name(); + + proc << ifile.name() << o; + proc.start(TDEProcess::Block); + + return m_qtfile->name(); +} + +TQStringList KDevQt4Importer::includePaths() +{ + if( !m_settings || !m_qtfile) + return TQStringList(); + + TQStringList includePaths; + includePaths.push_back( m_settings->qtDir() ); + includePaths.push_back( m_settings->qtDir() + "/TQt" ); + + /// @todo add mkspec + return includePaths; +} + +TQWidget * KDevQt4Importer::createSettingsPage( TQWidget * parent, const char * name ) +{ + m_settings = new SettingsDialog( parent, name ); + return m_settings; +} + diff --git a/languages/cpp/pcsimporter/qt4importer/kdevqt4importer.desktop b/languages/cpp/pcsimporter/qt4importer/kdevqt4importer.desktop new file mode 100644 index 00000000..5d91d917 --- /dev/null +++ b/languages/cpp/pcsimporter/qt4importer/kdevqt4importer.desktop @@ -0,0 +1,34 @@ +[Desktop Entry] +Type=Service +Name=KDevQt4Importer +Name[de]=Qt4-PCS-Import (TDevelop) +Name[fr]=KDevQtImporter +Name[nds]=Qt4-PCS-Import (TDevelop) +Name[ru]=KDevQt 4Importer +Name[sv]=TDevelop QT4-import +Comment=TDevelop Qt4 PCS Importer +Comment[ca]=Importador PCS de Qt4 per a TDevelop +Comment[da]=TDevelop Qt4 PCS importør +Comment[de]=Qt4-Import für persistenten Klassenspeicher +Comment[el]=Εισαγωγέας PCS TDevelop Qt4 +Comment[es]=Importador PCS de Qt4 de TDevelop +Comment[et]=TDevelopi Qt4 PCS importija +Comment[fr]=Importation PCS de Qt4 pour TDevelop +Comment[hu]=TDevelop Qt4 PCS-importáló +Comment[it]=Importatore PCS di Qt4 di TDevelop +Comment[ja]=TDevelop Qt4 PCS インポータ +Comment[nds]=Qt4-Import för duerhaftig Klassenspieker +Comment[pl]=TDevelop: importowanie PCS Qt4 +Comment[pt]=Importador de PCS para Qt4 do TDevelop +Comment[pt_BR]=Importador de PCS para Qt4 do TDevelop +Comment[ru]=Импорт Qt 4 PCS в TDevelop +Comment[sk]=TDevelop Qt4 PCS import +Comment[sr]=TDevelop-ов Qt4 PCS увозник +Comment[sr@Latn]=TDevelop-ov Qt4 PCS uvoznik +Comment[sv]=TDevelop QT4 PCS-import +Comment[zh_TW]=TDevelop Qt4 PCS 匯入器 +Icon=gear +ServiceTypes=TDevelop/PCSImporter +X-TDE-Library=libkdevqt4importer +X-TDevelop-PCSImporter= +X-TDevelop-Version=5 diff --git a/languages/cpp/pcsimporter/qt4importer/kdevqt4importer.h b/languages/cpp/pcsimporter/qt4importer/kdevqt4importer.h new file mode 100644 index 00000000..3b9563f3 --- /dev/null +++ b/languages/cpp/pcsimporter/qt4importer/kdevqt4importer.h @@ -0,0 +1,40 @@ +/*************************************************************************** + * Copyright (C) 2003 by Roberto Raggi * + * roberto@kdevelop.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef KDEVTQTIMPORTER_H +#define KDEVTQTIMPORTER_H + +#include +#include + +class SettingsDialog; +class KTempFile; + +class KDevQt4Importer : public KDevPCSImporter +{ + Q_OBJECT + +public: + KDevQt4Importer( TQObject* parent=0, const char* name=0, const TQStringList& args=TQStringList() ); + virtual ~KDevQt4Importer(); + + virtual TQString dbName() const { return TQString::fromLatin1("TQt4"); } + virtual TQStringList fileList(); + virtual TQStringList includePaths(); + + virtual TQWidget* createSettingsPage( TQWidget* parent, const char* name=0 ); + +private: + TQGuardedPtr m_settings; + KTempFile *m_qtfile; +}; + +#endif diff --git a/languages/cpp/pcsimporter/qt4importer/tdevqt4importer.cpp b/languages/cpp/pcsimporter/qt4importer/tdevqt4importer.cpp deleted file mode 100644 index fefa57ee..00000000 --- a/languages/cpp/pcsimporter/qt4importer/tdevqt4importer.cpp +++ /dev/null @@ -1,107 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2003 by Roberto Raggi * - * roberto@kdevelop.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#include "tdevqt4importer.h" -#include "tdevqt4importer.moc" -#include "settingsdialog.h" - -#include -#include -#include -#include - -#include -#include -#include - -K_EXPORT_COMPONENT_FACTORY( libtdevqt4importer, KGenericFactory( "tdevqt4importer" ) ) - -TDevQt4Importer::TDevQt4Importer( TQObject * parent, const char * name, const TQStringList& ) - : TDevPCSImporter( parent, name ) -{ - m_qtfile = 0; -} - -TDevQt4Importer::~TDevQt4Importer() -{ - if (m_qtfile) - delete m_qtfile; - - m_qtfile = 0; -} - -TQStringList TDevQt4Importer::fileList() -{ - if( !m_settings ) - return TQStringList(); - - if (m_qtfile) - delete m_qtfile; - - KTempFile ifile; - TQTextStream &is = *ifile.textStream(); - - is << "#include \n" - << "#undef slots\n#undef signals\n#undef slots\n#undef signals" - << "#define slots slots\n" - << "#define signals signals\n" - << "#include \n" - << "#include \n" - << "#include \n" - << "#include \n" - << "#include \n" - << "#include \n" - << "#include \n" - << "#include \n"; - - - - TDEProcess proc; - proc << "cpp" << "-nostdinc" << "-xc++"; - - m_qtfile = new KTempFile(); - - // include paths - TQStringList paths = includePaths(); - for (TQStringList::Iterator it = paths.begin(); it != paths.end(); ++it) - proc << "-I" << *it; - - ifile.close(); - - TQString o; - o += "-o"; - o += m_qtfile->name(); - - proc << ifile.name() << o; - proc.start(TDEProcess::Block); - - return m_qtfile->name(); -} - -TQStringList TDevQt4Importer::includePaths() -{ - if( !m_settings || !m_qtfile) - return TQStringList(); - - TQStringList includePaths; - includePaths.push_back( m_settings->qtDir() ); - includePaths.push_back( m_settings->qtDir() + "/TQt" ); - - /// @todo add mkspec - return includePaths; -} - -TQWidget * TDevQt4Importer::createSettingsPage( TQWidget * parent, const char * name ) -{ - m_settings = new SettingsDialog( parent, name ); - return m_settings; -} - diff --git a/languages/cpp/pcsimporter/qt4importer/tdevqt4importer.desktop b/languages/cpp/pcsimporter/qt4importer/tdevqt4importer.desktop deleted file mode 100644 index cf42c497..00000000 --- a/languages/cpp/pcsimporter/qt4importer/tdevqt4importer.desktop +++ /dev/null @@ -1,34 +0,0 @@ -[Desktop Entry] -Type=Service -Name=TDevQt4Importer -Name[de]=Qt4-PCS-Import (TDevelop) -Name[fr]=TDevQtImporter -Name[nds]=Qt4-PCS-Import (TDevelop) -Name[ru]=TDevQt 4Importer -Name[sv]=TDevelop QT4-import -Comment=TDevelop Qt4 PCS Importer -Comment[ca]=Importador PCS de Qt4 per a TDevelop -Comment[da]=TDevelop Qt4 PCS importør -Comment[de]=Qt4-Import für persistenten Klassenspeicher -Comment[el]=Εισαγωγέας PCS TDevelop Qt4 -Comment[es]=Importador PCS de Qt4 de TDevelop -Comment[et]=TDevelopi Qt4 PCS importija -Comment[fr]=Importation PCS de Qt4 pour TDevelop -Comment[hu]=TDevelop Qt4 PCS-importáló -Comment[it]=Importatore PCS di Qt4 di TDevelop -Comment[ja]=TDevelop Qt4 PCS インポータ -Comment[nds]=Qt4-Import för duerhaftig Klassenspieker -Comment[pl]=TDevelop: importowanie PCS Qt4 -Comment[pt]=Importador de PCS para Qt4 do TDevelop -Comment[pt_BR]=Importador de PCS para Qt4 do TDevelop -Comment[ru]=Импорт Qt 4 PCS в TDevelop -Comment[sk]=TDevelop Qt4 PCS import -Comment[sr]=TDevelop-ов Qt4 PCS увозник -Comment[sr@Latn]=TDevelop-ov Qt4 PCS uvoznik -Comment[sv]=TDevelop QT4 PCS-import -Comment[zh_TW]=TDevelop Qt4 PCS 匯入器 -Icon=gear -ServiceTypes=TDevelop/PCSImporter -X-TDE-Library=libtdevqt4importer -X-TDevelop-PCSImporter= -X-TDevelop-Version=5 diff --git a/languages/cpp/pcsimporter/qt4importer/tdevqt4importer.h b/languages/cpp/pcsimporter/qt4importer/tdevqt4importer.h deleted file mode 100644 index 53f6a18e..00000000 --- a/languages/cpp/pcsimporter/qt4importer/tdevqt4importer.h +++ /dev/null @@ -1,40 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2003 by Roberto Raggi * - * roberto@kdevelop.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef TDEVTQTIMPORTER_H -#define TDEVTQTIMPORTER_H - -#include -#include - -class SettingsDialog; -class KTempFile; - -class TDevQt4Importer : public TDevPCSImporter -{ - Q_OBJECT - -public: - TDevQt4Importer( TQObject* parent=0, const char* name=0, const TQStringList& args=TQStringList() ); - virtual ~TDevQt4Importer(); - - virtual TQString dbName() const { return TQString::fromLatin1("TQt4"); } - virtual TQStringList fileList(); - virtual TQStringList includePaths(); - - virtual TQWidget* createSettingsPage( TQWidget* parent, const char* name=0 ); - -private: - TQGuardedPtr m_settings; - KTempFile *m_qtfile; -}; - -#endif diff --git a/languages/cpp/pcsimporter/qtimporter/CMakeLists.txt b/languages/cpp/pcsimporter/qtimporter/CMakeLists.txt index 9af966d9..64e95d39 100644 --- a/languages/cpp/pcsimporter/qtimporter/CMakeLists.txt +++ b/languages/cpp/pcsimporter/qtimporter/CMakeLists.txt @@ -24,14 +24,14 @@ link_directories( ##### other data ################################ -install( FILES tdevqtimporter.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevqtimporter.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevqtimporter (module) ################ +##### libkdevqtimporter (module) ################ -tde_add_kpart( libtdevqtimporter AUTOMOC +tde_add_kpart( libkdevqtimporter AUTOMOC SOURCES - tdevqtimporter.cpp settingsdialogbase.ui settingsdialog.cpp + kdevqtimporter.cpp settingsdialogbase.ui settingsdialog.cpp LINK lang_interfaces-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/languages/cpp/pcsimporter/qtimporter/Makefile.am b/languages/cpp/pcsimporter/qtimporter/Makefile.am index 23a60885..80ccc8be 100644 --- a/languages/cpp/pcsimporter/qtimporter/Makefile.am +++ b/languages/cpp/pcsimporter/qtimporter/Makefile.am @@ -1,11 +1,11 @@ INCLUDES = -I$(top_srcdir)/languages/lib/interfaces \ -I$(top_srcdir)/lib/interfaces $(all_includes) METASOURCES = AUTO -kde_module_LTLIBRARIES = libtdevqtimporter.la +kde_module_LTLIBRARIES = libkdevqtimporter.la -noinst_HEADERS = tdevqtimporter.h settingsdialog.h -libtdevqtimporter_la_SOURCES = tdevqtimporter.cpp settingsdialogbase.ui settingsdialog.cpp -kde_services_DATA = tdevqtimporter.desktop -libtdevqtimporter_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ +noinst_HEADERS = kdevqtimporter.h settingsdialog.h +libkdevqtimporter_la_SOURCES = kdevqtimporter.cpp settingsdialogbase.ui settingsdialog.cpp +kde_services_DATA = kdevqtimporter.desktop +libkdevqtimporter_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ $(top_builddir)/languages/lib/interfaces/liblang_interfaces.la -libtdevqtimporter_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) +libkdevqtimporter_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) diff --git a/languages/cpp/pcsimporter/qtimporter/kdevqtimporter.cpp b/languages/cpp/pcsimporter/qtimporter/kdevqtimporter.cpp new file mode 100644 index 00000000..62eb38fd --- /dev/null +++ b/languages/cpp/pcsimporter/qtimporter/kdevqtimporter.cpp @@ -0,0 +1,73 @@ +/*************************************************************************** +* Copyright (C) 2003 by Roberto Raggi * +* roberto@kdevelop.org * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +* * +***************************************************************************/ + +#include "kdevqtimporter.h" +#include "kdevqtimporter.moc" +#include "settingsdialog.h" + +#include + +#include +#include + +K_EXPORT_COMPONENT_FACTORY( libkdevqtimporter, KGenericFactory( "kdevqtimporter" ) ) + +KDevQtImporter::KDevQtImporter( TQObject * parent, const char * name, const TQStringList& ) + : KDevPCSImporter( parent, name ) +{} + +KDevQtImporter::~KDevQtImporter() +{} + +TQStringList KDevQtImporter::fileList() +{ + if ( !m_settings ) + return TQStringList(); + + TQDir dir( m_settings->qtDir() ); + TQStringList lst = dir.entryList( "*.h" ); + TQStringList fileList; + for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) + { + if ( ( *it ).startsWith( "qconfig-" ) ) + { + if ( ( *it ).endsWith( m_settings->configuration() + ".h" ) ) + fileList.prepend( dir.absPath() + "/" + ( *it ) ); + } + else + { + fileList.push_back( dir.absPath() + "/" + ( *it ) ); + } + } + return fileList; +} + +TQStringList KDevQtImporter::includePaths() +{ + if ( !m_settings ) + return TQStringList(); + + TQStringList includePaths; + includePaths.push_back( m_settings->qtDir() ); + includePaths.push_back( m_settings->qtDir() + "/private" ); + includePaths.push_back( m_settings->qtDir() + "/default" ); + + /// @todo add mkspec + return includePaths; +} + +TQWidget * KDevQtImporter::createSettingsPage( TQWidget * parent, const char * name ) +{ + m_settings = new SettingsDialog( parent, name ); + return m_settings; +} + +//kate: indent-mode csands; tab-width 4; space-indent off; diff --git a/languages/cpp/pcsimporter/qtimporter/kdevqtimporter.desktop b/languages/cpp/pcsimporter/qtimporter/kdevqtimporter.desktop new file mode 100644 index 00000000..72161838 --- /dev/null +++ b/languages/cpp/pcsimporter/qtimporter/kdevqtimporter.desktop @@ -0,0 +1,37 @@ +[Desktop Entry] +Type=Service +Name=KDevQtImporter +Name[da]=TDevelop Qt-importør +Name[de]=Qt-PCS-Import (TDevelop) +Name[hi]=के-डेव-क्यूटी-आयातक +Name[nds]=Qt-PCS-Import (TDevelop) +Name[pl]=KDevImportQt +Name[sv]=TDevelop QT-import +Name[ta]=கெடெவ் க்யு இறக்குமதியாளர் +Name[zh_TW]=KDev Qt 匯入器 +Comment=TDevelop Qt3 PCS Importer +Comment[ca]=Importador PCS de Qt3 per a TDevelop +Comment[da]=TDevelop Qt3 PCS importør +Comment[de]=Qt3-Import für persistenten Klassenspeicher +Comment[el]=Εισαγωγέας PCS TDevelop Qt3 +Comment[es]=Importador PCS de Qt3 de TDevelop +Comment[et]=TDevelopi Qt3 PCS importija +Comment[fr]=Importation PCS de Qt3 pour TDevelop +Comment[hu]=TDevelop Qt3 PCS-importáló +Comment[it]=Importatore PCS di Qt3 di TDevelop +Comment[ja]=TDevelop Qt3 PCS インポータ +Comment[nds]=Qt3-Import för duerhaftig Klassenspieker +Comment[pl]=TDevelop: importowanie PCS Qt3 +Comment[pt]=Importador de PCS para Qt3 do TDevelop +Comment[pt_BR]=Importador de PCS para Qt3 do TDevelop +Comment[ru]=Импорт Qt 3 PCS в TDevelop +Comment[sk]=TDevelop Qt3 PCS import +Comment[sr]=TDevelop-ов Qt3 PCS увозник +Comment[sr@Latn]=TDevelop-ov Qt3 PCS uvoznik +Comment[sv]=TDevelop QT3 PCS-import +Comment[zh_TW]=TDevelop Qt3 PCS 匯入器 +Icon=gear +ServiceTypes=TDevelop/PCSImporter +X-TDE-Library=libkdevqtimporter +X-TDevelop-PCSImporter= +X-TDevelop-Version=5 diff --git a/languages/cpp/pcsimporter/qtimporter/kdevqtimporter.h b/languages/cpp/pcsimporter/qtimporter/kdevqtimporter.h new file mode 100644 index 00000000..bad9973e --- /dev/null +++ b/languages/cpp/pcsimporter/qtimporter/kdevqtimporter.h @@ -0,0 +1,38 @@ +/*************************************************************************** + * Copyright (C) 2003 by Roberto Raggi * + * roberto@kdevelop.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef KDEVTQTIMPORTER_H +#define KDEVTQTIMPORTER_H + +#include +#include + +class SettingsDialog; + +class KDevQtImporter : public KDevPCSImporter +{ + Q_OBJECT + +public: + KDevQtImporter( TQObject* parent=0, const char* name=0, const TQStringList& args=TQStringList() ); + virtual ~KDevQtImporter(); + + virtual TQString dbName() const { return TQString::fromLatin1("TQt"); } + virtual TQStringList fileList(); + virtual TQStringList includePaths(); + + virtual TQWidget* createSettingsPage( TQWidget* parent, const char* name=0 ); + +private: + TQGuardedPtr m_settings; +}; + +#endif diff --git a/languages/cpp/pcsimporter/qtimporter/tdevqtimporter.cpp b/languages/cpp/pcsimporter/qtimporter/tdevqtimporter.cpp deleted file mode 100644 index b3b94019..00000000 --- a/languages/cpp/pcsimporter/qtimporter/tdevqtimporter.cpp +++ /dev/null @@ -1,73 +0,0 @@ -/*************************************************************************** -* Copyright (C) 2003 by Roberto Raggi * -* roberto@kdevelop.org * -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - -#include "tdevqtimporter.h" -#include "tdevqtimporter.moc" -#include "settingsdialog.h" - -#include - -#include -#include - -K_EXPORT_COMPONENT_FACTORY( libtdevqtimporter, KGenericFactory( "tdevqtimporter" ) ) - -TDevQtImporter::TDevQtImporter( TQObject * parent, const char * name, const TQStringList& ) - : TDevPCSImporter( parent, name ) -{} - -TDevQtImporter::~TDevQtImporter() -{} - -TQStringList TDevQtImporter::fileList() -{ - if ( !m_settings ) - return TQStringList(); - - TQDir dir( m_settings->qtDir() ); - TQStringList lst = dir.entryList( "*.h" ); - TQStringList fileList; - for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) - { - if ( ( *it ).startsWith( "qconfig-" ) ) - { - if ( ( *it ).endsWith( m_settings->configuration() + ".h" ) ) - fileList.prepend( dir.absPath() + "/" + ( *it ) ); - } - else - { - fileList.push_back( dir.absPath() + "/" + ( *it ) ); - } - } - return fileList; -} - -TQStringList TDevQtImporter::includePaths() -{ - if ( !m_settings ) - return TQStringList(); - - TQStringList includePaths; - includePaths.push_back( m_settings->qtDir() ); - includePaths.push_back( m_settings->qtDir() + "/private" ); - includePaths.push_back( m_settings->qtDir() + "/default" ); - - /// @todo add mkspec - return includePaths; -} - -TQWidget * TDevQtImporter::createSettingsPage( TQWidget * parent, const char * name ) -{ - m_settings = new SettingsDialog( parent, name ); - return m_settings; -} - -//kate: indent-mode csands; tab-width 4; space-indent off; diff --git a/languages/cpp/pcsimporter/qtimporter/tdevqtimporter.desktop b/languages/cpp/pcsimporter/qtimporter/tdevqtimporter.desktop deleted file mode 100644 index f9b02306..00000000 --- a/languages/cpp/pcsimporter/qtimporter/tdevqtimporter.desktop +++ /dev/null @@ -1,37 +0,0 @@ -[Desktop Entry] -Type=Service -Name=TDevQtImporter -Name[da]=TDevelop Qt-importør -Name[de]=Qt-PCS-Import (TDevelop) -Name[hi]=के-डेव-क्यूटी-आयातक -Name[nds]=Qt-PCS-Import (TDevelop) -Name[pl]=KDevImportQt -Name[sv]=TDevelop QT-import -Name[ta]=கெடெவ் க்யு இறக்குமதியாளர் -Name[zh_TW]=KDev Qt 匯入器 -Comment=TDevelop Qt3 PCS Importer -Comment[ca]=Importador PCS de Qt3 per a TDevelop -Comment[da]=TDevelop Qt3 PCS importør -Comment[de]=Qt3-Import für persistenten Klassenspeicher -Comment[el]=Εισαγωγέας PCS TDevelop Qt3 -Comment[es]=Importador PCS de Qt3 de TDevelop -Comment[et]=TDevelopi Qt3 PCS importija -Comment[fr]=Importation PCS de Qt3 pour TDevelop -Comment[hu]=TDevelop Qt3 PCS-importáló -Comment[it]=Importatore PCS di Qt3 di TDevelop -Comment[ja]=TDevelop Qt3 PCS インポータ -Comment[nds]=Qt3-Import för duerhaftig Klassenspieker -Comment[pl]=TDevelop: importowanie PCS Qt3 -Comment[pt]=Importador de PCS para Qt3 do TDevelop -Comment[pt_BR]=Importador de PCS para Qt3 do TDevelop -Comment[ru]=Импорт Qt 3 PCS в TDevelop -Comment[sk]=TDevelop Qt3 PCS import -Comment[sr]=TDevelop-ов Qt3 PCS увозник -Comment[sr@Latn]=TDevelop-ov Qt3 PCS uvoznik -Comment[sv]=TDevelop QT3 PCS-import -Comment[zh_TW]=TDevelop Qt3 PCS 匯入器 -Icon=gear -ServiceTypes=TDevelop/PCSImporter -X-TDE-Library=libtdevqtimporter -X-TDevelop-PCSImporter= -X-TDevelop-Version=5 diff --git a/languages/cpp/pcsimporter/qtimporter/tdevqtimporter.h b/languages/cpp/pcsimporter/qtimporter/tdevqtimporter.h deleted file mode 100644 index 3f7d1ac8..00000000 --- a/languages/cpp/pcsimporter/qtimporter/tdevqtimporter.h +++ /dev/null @@ -1,38 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2003 by Roberto Raggi * - * roberto@kdevelop.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef TDEVTQTIMPORTER_H -#define TDEVTQTIMPORTER_H - -#include -#include - -class SettingsDialog; - -class TDevQtImporter : public TDevPCSImporter -{ - Q_OBJECT - -public: - TDevQtImporter( TQObject* parent=0, const char* name=0, const TQStringList& args=TQStringList() ); - virtual ~TDevQtImporter(); - - virtual TQString dbName() const { return TQString::fromLatin1("TQt"); } - virtual TQStringList fileList(); - virtual TQStringList includePaths(); - - virtual TQWidget* createSettingsPage( TQWidget* parent, const char* name=0 ); - -private: - TQGuardedPtr m_settings; -}; - -#endif diff --git a/languages/cpp/pcsimporter/tdelibsimporter/CMakeLists.txt b/languages/cpp/pcsimporter/tdelibsimporter/CMakeLists.txt index 4dbf0d0c..d48bad5a 100644 --- a/languages/cpp/pcsimporter/tdelibsimporter/CMakeLists.txt +++ b/languages/cpp/pcsimporter/tdelibsimporter/CMakeLists.txt @@ -24,14 +24,14 @@ link_directories( ##### other data ################################ -install( FILES tdevtdelibsimporter.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevtdelibsimporter.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevtdelibsimporter (module) ########### +##### libkdevtdelibsimporter (module) ########### -tde_add_kpart( libtdevtdelibsimporter AUTOMOC +tde_add_kpart( libkdevtdelibsimporter AUTOMOC SOURCES - tdevtdelibsimporter.cpp settingsdialogbase.ui + kdevtdelibsimporter.cpp settingsdialogbase.ui settingsdialog.cpp LINK lang_interfaces-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} diff --git a/languages/cpp/pcsimporter/tdelibsimporter/Makefile.am b/languages/cpp/pcsimporter/tdelibsimporter/Makefile.am index e7c846d4..14efcabc 100644 --- a/languages/cpp/pcsimporter/tdelibsimporter/Makefile.am +++ b/languages/cpp/pcsimporter/tdelibsimporter/Makefile.am @@ -1,11 +1,11 @@ INCLUDES = -I$(top_srcdir)/languages/lib/interfaces \ -I$(top_srcdir)/lib/interfaces $(all_includes) METASOURCES = AUTO -kde_module_LTLIBRARIES = libtdevtdelibsimporter.la +kde_module_LTLIBRARIES = libkdevtdelibsimporter.la -noinst_HEADERS = tdevtdelibsimporter.h settingsdialog.h -libtdevtdelibsimporter_la_SOURCES = tdevtdelibsimporter.cpp settingsdialogbase.ui settingsdialog.cpp -kde_services_DATA = tdevtdelibsimporter.desktop -libtdevtdelibsimporter_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ +noinst_HEADERS = kdevtdelibsimporter.h settingsdialog.h +libkdevtdelibsimporter_la_SOURCES = kdevtdelibsimporter.cpp settingsdialogbase.ui settingsdialog.cpp +kde_services_DATA = kdevtdelibsimporter.desktop +libkdevtdelibsimporter_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ $(top_builddir)/languages/lib/interfaces/liblang_interfaces.la -libtdevtdelibsimporter_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) +libkdevtdelibsimporter_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) diff --git a/languages/cpp/pcsimporter/tdelibsimporter/kdevtdelibsimporter.cpp b/languages/cpp/pcsimporter/tdelibsimporter/kdevtdelibsimporter.cpp new file mode 100644 index 00000000..d3f5795b --- /dev/null +++ b/languages/cpp/pcsimporter/tdelibsimporter/kdevtdelibsimporter.cpp @@ -0,0 +1,119 @@ +/*************************************************************************** +* Copyright (C) 2003 by Roberto Raggi * +* roberto@kdevelop.org * +* * +* This program is free software; you can redistribute it and/or modify * +* it under the terms of the GNU General Public License as published by * +* the Free Software Foundation; either version 2 of the License, or * +* (at your option) any later version. * +* * +***************************************************************************/ + +#include "kdevtdelibsimporter.h" +#include "kdevtdelibsimporter.moc" +#include "settingsdialog.h" + +#include +#include + +#include +#include +#include +#include + +K_EXPORT_COMPONENT_FACTORY( libkdevtdelibsimporter, KGenericFactory( "kdevtdelibsimporter" ) ) + +KDevKDELibsImporter::KDevKDELibsImporter( TQObject * parent, const char * name, const TQStringList& ) + : KDevPCSImporter( parent, name ) +{} + +KDevKDELibsImporter::~KDevKDELibsImporter() +{} + +TQStringList KDevKDELibsImporter::fileList( const TQString& path ) +{ + TQDir dir( path ); + TQStringList lst = dir.entryList( "*.h" ); + TQStringList fileList; + for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) + { + fileList.push_back( dir.absPath() + "/" + ( *it ) ); + } + return fileList; +} + + +TQStringList KDevKDELibsImporter::fileList() +{ + if ( !m_settings ) + return TQStringList(); + + TQStringList files; + int scope = m_settings->cbParsingScope->currentItem(); + if ( scope == 0 ) + { + files += fileList( m_settings->kdeDir() ); + files += fileList( m_settings->kdeDir() + "/arts" ); + files += fileList( m_settings->kdeDir() + "/artsc" ); + files += fileList( m_settings->kdeDir() + "/dcopc" ); + files += fileList( m_settings->kdeDir() + "/dom" ); + files += fileList( m_settings->kdeDir() + "/tdeabc" ); + files += fileList( m_settings->kdeDir() + "/tdeprint" ); + files += fileList( m_settings->kdeDir() + "/tdesu" ); + files += fileList( m_settings->kdeDir() + "/tdeio" ); + files += fileList( m_settings->kdeDir() + "/kjs" ); + files += fileList( m_settings->kdeDir() + "/tdeparts" ); + files += fileList( m_settings->kdeDir() + "/tdetexteditor" ); + } + else if ( scope == 1 ) + { + TQValueStack s; + s.push( m_settings->kdeDir() ); + files += fileList( m_settings->kdeDir() ); + + TQDir dir; + do + { + dir.setPath( s.pop() ); + kdDebug( 9015 ) << "Examining: " << dir.path() << endl; + const TQFileInfoList *dirEntries = dir.entryInfoList(); + if ( !dirEntries ) continue; + TQPtrListIterator it( *dirEntries ); + for ( ; it.current(); ++it ) + { + TQString fileName = it.current() ->fileName(); + if ( fileName == "." || fileName == ".." ) + continue; + TQString path = it.current() ->absFilePath(); + if ( it.current() ->isDir() ) + { + kdDebug( 9015 ) << "Pushing: " << path << endl; + s.push( path ); + files += fileList( path ); + } + } + } + while ( !s.isEmpty() ); + } + + return files; +} + +TQStringList KDevKDELibsImporter::includePaths() +{ + if ( !m_settings ) + return TQStringList(); + + TQStringList includePaths; + includePaths.push_back( m_settings->kdeDir() ); + return includePaths; +} + +TQWidget * KDevKDELibsImporter::createSettingsPage( TQWidget * parent, const char * name ) +{ + m_settings = new SettingsDialog( parent, name ); + return m_settings; +} +//kate: indent-mode csands; tab-width 4; space-indent off; + + diff --git a/languages/cpp/pcsimporter/tdelibsimporter/kdevtdelibsimporter.desktop b/languages/cpp/pcsimporter/tdelibsimporter/kdevtdelibsimporter.desktop new file mode 100644 index 00000000..7433518e --- /dev/null +++ b/languages/cpp/pcsimporter/tdelibsimporter/kdevtdelibsimporter.desktop @@ -0,0 +1,49 @@ +[Desktop Entry] +Type=Service +Name=KDevKDELibsImporter +Name[da]=TDevelop KDELibs-importør +Name[de]=KDELibs-PCS-Import (TDevelop) +Name[hi]=के-डेव-केडीई-लिब्स-इम्पोर्टर +Name[ja]=KDev KDE +Name[nds]=KDELibs-PCS-Import (TDevelop) +Name[pl]=KDevKDEImportBib +Name[sk]=KDev KDE import knižníc +Name[sv]=TDevelop KDE-biblioteksimport +Name[ta]=கெடெவ் கெடெலிப்ஸ் இறக்குமதியாளர் +Name[zh_TW]=TDevelop KDE 函式庫匯入器 +Comment=TDevelop KDELibs PCS Importer +Comment[ca]=Importador PCS de KDELibs per a TDevelop +Comment[da]=TDevelop KDELibs PCS importør +Comment[de]=KDELibs-Import für persistenten Klassenspeicher +Comment[el]=Εισαγωγέας PCS TDevelop KDELibs +Comment[es]=Importador PCS de KDELibs de TDevelop +Comment[et]=TDevelopi tdelibs PCS importija +Comment[eu]=TDevelop-en KDELibs PCS inportatzailea +Comment[fa]=واردکنندۀ TDevelop KDELibs PCS +Comment[fr]=Importation PCS de KDELibs pour TDevelop +Comment[gl]=Importador PCS de KDELibs para TDevelop +Comment[hi]=के-डेवलप केडीई-लिब्स पीसीएस आयातक +Comment[hu]=TDevelop KDELibs PCS-importáló +Comment[it]=Importatore per KDELibs PCS di TDevelop +Comment[ja]=TDevelop KDELibs PCS インポータ +Comment[nds]=KDELibs-Import för duerhaftig Klassenspieker +Comment[ne]=TDevelop KDELibs PCS आयातकर्ता +Comment[nl]=TDevelop PCS Importer voor KDELibs +Comment[pl]=TDevelop: importowanie PCS (KDELibs) +Comment[pt]=Importador de PCS das KDELibs do TDevelop +Comment[pt_BR]=Importador PCS do KDELibs para o TDevelop +Comment[ru]=Загрузка символов из библиотеки KDELibs в хранилище классов +Comment[sk]=TDevelop PCS import KDE knižníc +Comment[sr]=TDevelop-ов KDELibs PCS увозник +Comment[sr@Latn]=TDevelop-ov KDELibs PCS uvoznik +Comment[sv]=TDevelop KDE-bibliotek PCS-import +Comment[ta]=கெடெவலப் கெடெலிப்ஸ் பிசிஸ் இறக்குமதியாளர் +Comment[tg]=Пурборкунии нишонаҳо аз китобхонаи KDELibs дар синфҳои анборӣ +Comment[tr]=TDevelop KDELibs PCS Aktarıcısı +Comment[zh_CN]=TDevelop KDELibs PCS 导入器 +Comment[zh_TW]=TDevelop KDE 函式庫匯入器 +Icon=gear +ServiceTypes=TDevelop/PCSImporter +X-TDE-Library=libkdevtdelibsimporter +X-TDevelop-PCSImporter= +X-TDevelop-Version=5 diff --git a/languages/cpp/pcsimporter/tdelibsimporter/kdevtdelibsimporter.h b/languages/cpp/pcsimporter/tdelibsimporter/kdevtdelibsimporter.h new file mode 100644 index 00000000..14fb7cff --- /dev/null +++ b/languages/cpp/pcsimporter/tdelibsimporter/kdevtdelibsimporter.h @@ -0,0 +1,41 @@ +/*************************************************************************** + * Copyright (C) 2003 by Roberto Raggi * + * roberto@kdevelop.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef KDEVTQTIMPORTER_H +#define KDEVTQTIMPORTER_H + +#include +#include + +class SettingsDialog; + +class KDevKDELibsImporter : public KDevPCSImporter +{ + Q_OBJECT + +public: + KDevKDELibsImporter( TQObject* parent=0, const char* name=0, const TQStringList& args=TQStringList() ); + virtual ~KDevKDELibsImporter(); + + virtual TQString dbName() const { return TQString::fromLatin1("KDElibs"); } + virtual TQStringList fileList(); + virtual TQStringList includePaths(); + + virtual TQWidget* createSettingsPage( TQWidget* parent, const char* name=0 ); + +private: + TQStringList fileList( const TQString& path ); + +private: + TQGuardedPtr m_settings; +}; + +#endif diff --git a/languages/cpp/pcsimporter/tdelibsimporter/tdevtdelibsimporter.cpp b/languages/cpp/pcsimporter/tdelibsimporter/tdevtdelibsimporter.cpp deleted file mode 100644 index 6f83e483..00000000 --- a/languages/cpp/pcsimporter/tdelibsimporter/tdevtdelibsimporter.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/*************************************************************************** -* Copyright (C) 2003 by Roberto Raggi * -* roberto@kdevelop.org * -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU General Public License as published by * -* the Free Software Foundation; either version 2 of the License, or * -* (at your option) any later version. * -* * -***************************************************************************/ - -#include "tdevtdelibsimporter.h" -#include "tdevtdelibsimporter.moc" -#include "settingsdialog.h" - -#include -#include - -#include -#include -#include -#include - -K_EXPORT_COMPONENT_FACTORY( libtdevtdelibsimporter, KGenericFactory( "tdevtdelibsimporter" ) ) - -TDevTDELibsImporter::TDevTDELibsImporter( TQObject * parent, const char * name, const TQStringList& ) - : TDevPCSImporter( parent, name ) -{} - -TDevTDELibsImporter::~TDevTDELibsImporter() -{} - -TQStringList TDevTDELibsImporter::fileList( const TQString& path ) -{ - TQDir dir( path ); - TQStringList lst = dir.entryList( "*.h" ); - TQStringList fileList; - for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) - { - fileList.push_back( dir.absPath() + "/" + ( *it ) ); - } - return fileList; -} - - -TQStringList TDevTDELibsImporter::fileList() -{ - if ( !m_settings ) - return TQStringList(); - - TQStringList files; - int scope = m_settings->cbParsingScope->currentItem(); - if ( scope == 0 ) - { - files += fileList( m_settings->kdeDir() ); - files += fileList( m_settings->kdeDir() + "/arts" ); - files += fileList( m_settings->kdeDir() + "/artsc" ); - files += fileList( m_settings->kdeDir() + "/dcopc" ); - files += fileList( m_settings->kdeDir() + "/dom" ); - files += fileList( m_settings->kdeDir() + "/tdeabc" ); - files += fileList( m_settings->kdeDir() + "/tdeprint" ); - files += fileList( m_settings->kdeDir() + "/tdesu" ); - files += fileList( m_settings->kdeDir() + "/tdeio" ); - files += fileList( m_settings->kdeDir() + "/kjs" ); - files += fileList( m_settings->kdeDir() + "/tdeparts" ); - files += fileList( m_settings->kdeDir() + "/tdetexteditor" ); - } - else if ( scope == 1 ) - { - TQValueStack s; - s.push( m_settings->kdeDir() ); - files += fileList( m_settings->kdeDir() ); - - TQDir dir; - do - { - dir.setPath( s.pop() ); - kdDebug( 9015 ) << "Examining: " << dir.path() << endl; - const TQFileInfoList *dirEntries = dir.entryInfoList(); - if ( !dirEntries ) continue; - TQPtrListIterator it( *dirEntries ); - for ( ; it.current(); ++it ) - { - TQString fileName = it.current() ->fileName(); - if ( fileName == "." || fileName == ".." ) - continue; - TQString path = it.current() ->absFilePath(); - if ( it.current() ->isDir() ) - { - kdDebug( 9015 ) << "Pushing: " << path << endl; - s.push( path ); - files += fileList( path ); - } - } - } - while ( !s.isEmpty() ); - } - - return files; -} - -TQStringList TDevTDELibsImporter::includePaths() -{ - if ( !m_settings ) - return TQStringList(); - - TQStringList includePaths; - includePaths.push_back( m_settings->kdeDir() ); - return includePaths; -} - -TQWidget * TDevTDELibsImporter::createSettingsPage( TQWidget * parent, const char * name ) -{ - m_settings = new SettingsDialog( parent, name ); - return m_settings; -} -//kate: indent-mode csands; tab-width 4; space-indent off; - - diff --git a/languages/cpp/pcsimporter/tdelibsimporter/tdevtdelibsimporter.desktop b/languages/cpp/pcsimporter/tdelibsimporter/tdevtdelibsimporter.desktop deleted file mode 100644 index 54cd2996..00000000 --- a/languages/cpp/pcsimporter/tdelibsimporter/tdevtdelibsimporter.desktop +++ /dev/null @@ -1,49 +0,0 @@ -[Desktop Entry] -Type=Service -Name=TDevTDELibsImporter -Name[da]=TDevelop KDELibs-importør -Name[de]=KDELibs-PCS-Import (TDevelop) -Name[hi]=के-डेव-केडीई-लिब्स-इम्पोर्टर -Name[ja]=KDev KDE -Name[nds]=KDELibs-PCS-Import (TDevelop) -Name[pl]=TDevTDEImportBib -Name[sk]=KDev KDE import knižníc -Name[sv]=TDevelop KDE-biblioteksimport -Name[ta]=கெடெவ் கெடெலிப்ஸ் இறக்குமதியாளர் -Name[zh_TW]=TDevelop KDE 函式庫匯入器 -Comment=TDevelop KDELibs PCS Importer -Comment[ca]=Importador PCS de KDELibs per a TDevelop -Comment[da]=TDevelop KDELibs PCS importør -Comment[de]=KDELibs-Import für persistenten Klassenspeicher -Comment[el]=Εισαγωγέας PCS TDevelop KDELibs -Comment[es]=Importador PCS de KDELibs de TDevelop -Comment[et]=TDevelopi tdelibs PCS importija -Comment[eu]=TDevelop-en KDELibs PCS inportatzailea -Comment[fa]=واردکنندۀ TDevelop KDELibs PCS -Comment[fr]=Importation PCS de KDELibs pour TDevelop -Comment[gl]=Importador PCS de KDELibs para TDevelop -Comment[hi]=के-डेवलप केडीई-लिब्स पीसीएस आयातक -Comment[hu]=TDevelop KDELibs PCS-importáló -Comment[it]=Importatore per KDELibs PCS di TDevelop -Comment[ja]=TDevelop KDELibs PCS インポータ -Comment[nds]=KDELibs-Import för duerhaftig Klassenspieker -Comment[ne]=TDevelop KDELibs PCS आयातकर्ता -Comment[nl]=TDevelop PCS Importer voor KDELibs -Comment[pl]=TDevelop: importowanie PCS (KDELibs) -Comment[pt]=Importador de PCS das KDELibs do TDevelop -Comment[pt_BR]=Importador PCS do KDELibs para o TDevelop -Comment[ru]=Загрузка символов из библиотеки KDELibs в хранилище классов -Comment[sk]=TDevelop PCS import KDE knižníc -Comment[sr]=TDevelop-ов KDELibs PCS увозник -Comment[sr@Latn]=TDevelop-ov KDELibs PCS uvoznik -Comment[sv]=TDevelop KDE-bibliotek PCS-import -Comment[ta]=கெடெவலப் கெடெலிப்ஸ் பிசிஸ் இறக்குமதியாளர் -Comment[tg]=Пурборкунии нишонаҳо аз китобхонаи KDELibs дар синфҳои анборӣ -Comment[tr]=TDevelop KDELibs PCS Aktarıcısı -Comment[zh_CN]=TDevelop KDELibs PCS 导入器 -Comment[zh_TW]=TDevelop KDE 函式庫匯入器 -Icon=gear -ServiceTypes=TDevelop/PCSImporter -X-TDE-Library=libtdevtdelibsimporter -X-TDevelop-PCSImporter= -X-TDevelop-Version=5 diff --git a/languages/cpp/pcsimporter/tdelibsimporter/tdevtdelibsimporter.h b/languages/cpp/pcsimporter/tdelibsimporter/tdevtdelibsimporter.h deleted file mode 100644 index 0d772bba..00000000 --- a/languages/cpp/pcsimporter/tdelibsimporter/tdevtdelibsimporter.h +++ /dev/null @@ -1,41 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2003 by Roberto Raggi * - * roberto@kdevelop.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef TDEVTQTIMPORTER_H -#define TDEVTQTIMPORTER_H - -#include -#include - -class SettingsDialog; - -class TDevTDELibsImporter : public TDevPCSImporter -{ - Q_OBJECT - -public: - TDevTDELibsImporter( TQObject* parent=0, const char* name=0, const TQStringList& args=TQStringList() ); - virtual ~TDevTDELibsImporter(); - - virtual TQString dbName() const { return TQString::fromLatin1("KDElibs"); } - virtual TQStringList fileList(); - virtual TQStringList includePaths(); - - virtual TQWidget* createSettingsPage( TQWidget* parent, const char* name=0 ); - -private: - TQStringList fileList( const TQString& path ); - -private: - TQGuardedPtr m_settings; -}; - -#endif diff --git a/languages/cpp/problemreporter.cpp b/languages/cpp/problemreporter.cpp index bed0c9ae..eed7a5b6 100644 --- a/languages/cpp/problemreporter.cpp +++ b/languages/cpp/problemreporter.cpp @@ -21,9 +21,9 @@ #include "configproblemreporter.h" #include "backgroundparser.h" -#include -#include -#include +#include +#include +#include #include #include diff --git a/languages/cpp/qtbuildconfig.cpp b/languages/cpp/qtbuildconfig.cpp index 5c42ffb1..c5c87b1c 100644 --- a/languages/cpp/qtbuildconfig.cpp +++ b/languages/cpp/qtbuildconfig.cpp @@ -77,7 +77,7 @@ void QtBuildConfig::init( ) if( m_designerIntegration.isEmpty() ) { if ( m_version == 3 ) - m_designerIntegration = "EmbeddedTDevDesigner"; + m_designerIntegration = "EmbeddedKDevDesigner"; else m_designerIntegration = "ExternalDesigner"; } diff --git a/languages/cpp/qtbuildconfig.h b/languages/cpp/qtbuildconfig.h index 10da233d..118503b6 100644 --- a/languages/cpp/qtbuildconfig.h +++ b/languages/cpp/qtbuildconfig.h @@ -81,7 +81,7 @@ private: TQString m_designerPath; ///< The path including the binary name of TQt Designer TQString m_qmakePath; ///< The path including the binary name of TQMake TQStringList m_designerPluginPaths; ///< The Prefix for Designer - TQString m_designerIntegration; ///< The type of designer used, tdevdesigner or qt designer + TQString m_designerIntegration; ///< The type of designer used, kdevdesigner or qt designer static const TQString m_configRoot; ///< The root path of the configuration }; diff --git a/languages/cpp/qtdesignercppintegration.cpp b/languages/cpp/qtdesignercppintegration.cpp index 715da1a9..db6df895 100644 --- a/languages/cpp/qtdesignercppintegration.cpp +++ b/languages/cpp/qtdesignercppintegration.cpp @@ -32,15 +32,15 @@ #include #include -#include -#include +#include +#include #include "backgroundparser.h" #include "cppsupportpart.h" #include "codemodel_utils.h" #include "implementationwidget.h" -QtDesignerCppIntegration::QtDesignerCppIntegration( TDevLanguageSupport *part, +QtDesignerCppIntegration::QtDesignerCppIntegration( KDevLanguageSupport *part, ImplementationWidget *impl ) : QtDesignerIntegration( part, impl, true, 0 ) {} @@ -126,7 +126,7 @@ void QtDesignerCppIntegration::addFunctionToClass( KInterfaceDesigner::Function TQFileInfo fileInfo( implementationFile ); if ( !TQFile::exists( fileInfo.absFilePath() ) ) { - if ( TDevCreateFile * createFileSupp = m_part->extension( "TDevelop/CreateFile" ) ) + if ( KDevCreateFile * createFileSupp = m_part->extension( "TDevelop/CreateFile" ) ) createFileSupp->createNewFile( fileInfo.extension(), fileInfo.dirPath( true ), fileInfo.fileName() ); } diff --git a/languages/cpp/qtdesignercppintegration.h b/languages/cpp/qtdesignercppintegration.h index 143cf180..d156d276 100644 --- a/languages/cpp/qtdesignercppintegration.h +++ b/languages/cpp/qtdesignercppintegration.h @@ -27,7 +27,7 @@ class QtDesignerCppIntegration : public QtDesignerIntegration Q_OBJECT public: - QtDesignerCppIntegration( TDevLanguageSupport *part, ImplementationWidget *impl ); + QtDesignerCppIntegration( KDevLanguageSupport *part, ImplementationWidget *impl ); protected: virtual void addFunctionToClass( KInterfaceDesigner::Function function, ClassDom klass ); diff --git a/languages/cpp/simpletype.cpp b/languages/cpp/simpletype.cpp index ac905c33..db3f9c79 100644 --- a/languages/cpp/simpletype.cpp +++ b/languages/cpp/simpletype.cpp @@ -910,9 +910,9 @@ TQString SimpleTypeImpl::fullTypeResolved( int depth ) { TypeDesc t = desc(); if ( !scope().isEmpty() ) { if ( depth > 10 ) - return "TDeveParseError::ToDeep"; + return "KDevParseError::ToDeep"; if ( !safetyCounter ) - return "TDeveParseError::MaximumCountReached"; + return "KDevParseError::MaximumCountReached"; ifVerbose( dbg() << "fully resolving type " << t.fullName() << endl ); if ( scope().size() != 0 ) { diff --git a/languages/cpp/storeconverter.cpp b/languages/cpp/storeconverter.cpp index 670e69ff..6ad55925 100644 --- a/languages/cpp/storeconverter.cpp +++ b/languages/cpp/storeconverter.cpp @@ -14,7 +14,7 @@ #include -#include +#include #include "cppcodecompletion.h" #include "codeinformationrepository.h" diff --git a/languages/cpp/subclassing_template/CMakeLists.txt b/languages/cpp/subclassing_template/CMakeLists.txt index 4ee02817..3223a7d7 100644 --- a/languages/cpp/subclassing_template/CMakeLists.txt +++ b/languages/cpp/subclassing_template/CMakeLists.txt @@ -12,4 +12,4 @@ install( FILES subclass_template.h subclass_template.cpp subclass_qt4_template.h subclass_qt4_template.cpp - DESTINATION ${DATA_INSTALL_DIR}/tdevcppsupport/subclassing ) + DESTINATION ${DATA_INSTALL_DIR}/kdevcppsupport/subclassing ) diff --git a/languages/cpp/subclassing_template/Makefile.am b/languages/cpp/subclassing_template/Makefile.am index 850ec6b9..4e722ca0 100644 --- a/languages/cpp/subclassing_template/Makefile.am +++ b/languages/cpp/subclassing_template/Makefile.am @@ -1,4 +1,4 @@ -cppsupportdatadir = ${kde_datadir}/tdevcppsupport +cppsupportdatadir = ${kde_datadir}/kdevcppsupport subclassingdir = ${cppsupportdatadir}/subclassing subclassing_DATA = subclass_template.h subclass_template.cpp \ diff --git a/languages/cpp/subclassingdlg.cpp b/languages/cpp/subclassingdlg.cpp index 26758d09..0982226c 100644 --- a/languages/cpp/subclassingdlg.cpp +++ b/languages/cpp/subclassingdlg.cpp @@ -16,9 +16,9 @@ #include "backgroundparser.h" #include "store_walker.h" #include "cppsupportfactory.h" -#include "tdevsourceformatter.h" -#include "tdevapi.h" -#include "tdevproject.h" +#include "kdevsourceformatter.h" +#include "kdevapi.h" +#include "kdevproject.h" #include "filetemplate.h" #include "codemodel.h" @@ -475,7 +475,7 @@ void SubclassingDlg::accept() TQString basefilename = fi.baseName(true); buffer.replace(TQRegExp("\\$MODULE\\$"),module); buffer.replace(TQRegExp("\\$FILENAME\\$"),basefilename); - if ( (m_cppSupport->project()) && (m_cppSupport->project()->options() & TDevProject::UsesAutotoolsBuildSystem)) + if ( (m_cppSupport->project()) && (m_cppSupport->project()->options() & KDevProject::UsesAutotoolsBuildSystem)) buffer += "\n#include \"$NEWFILENAMELC$.moc\"\n"; } else diff --git a/languages/cpp/tdevcppsupport.desktop b/languages/cpp/tdevcppsupport.desktop deleted file mode 100644 index 93a99f59..00000000 --- a/languages/cpp/tdevcppsupport.desktop +++ /dev/null @@ -1,86 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=C++ Support -Comment[ca]=Suport per a C++ -Comment[da]=C++ understøttelse -Comment[de]=C++-Unterstützung für TDevelop -Comment[el]=Υποστήριξη C++ -Comment[es]=Soporte para C++ -Comment[et]=C++ toetus -Comment[eu]=C++ euskarria -Comment[fa]=پشتیبانی C++ -Comment[fr]=Prise en charge du langage C++ -Comment[ga]=Tacaíocht C++ -Comment[gl]=Soporte para C++ -Comment[hi]=सी++ समर्थन -Comment[hu]=C++-támogatás -Comment[is]=C++ stuðningur -Comment[it]=Supporto per C++ -Comment[ja]=C++ サポート -Comment[nds]=Ünnerstütten för C++ -Comment[ne]=C++ समर्थन -Comment[nl]=Ondersteuning voor C++ -Comment[pl]=Obsługa C++ -Comment[pt]=Suporte a C++ -Comment[pt_BR]=Suporte ao C++ -Comment[ru]=Поддержка языка C++ -Comment[sk]=C++ podpora -Comment[sl]=Podpora za C++ -Comment[sr]=Подршка за C++ -Comment[sr@Latn]=Podrška za C++ -Comment[sv]=C++ stöd -Comment[ta]=C++ ஆதரவு -Comment[tg]=Ёрӣ намудани забони C++ -Comment[tr]=C++ Desteği -Comment[zh_CN]=C++ 支持 -Comment[zh_TW]=C++ 支援 -Name=TDevCppSupport -Name[da]=TDevelop C++ understøttelse -Name[hi]=के-डेव-सीपीपी-समर्थन -Name[nds]=CPP-Ünnerstütten för TDevelop -Name[pl]=KDevObsługaCpp -Name[sk]=KDev C++ podpora -Name[sv]=TDevelop C++ stöd -Name[ta]=கெடெவ்சிபிபி ஆதரவு -Name[zh_TW]=TDevelop C++ 支援 -GenericName=C++ Support -GenericName[ca]=Suport per a C++ -GenericName[da]=C++ understøttelse -GenericName[de]=Unterstützung für C++ -GenericName[el]=Υποστήριξη C++ -GenericName[es]=Soporte para C++ -GenericName[et]=C++ toetus -GenericName[eu]=C++ euskarria -GenericName[fa]=پشتیبانی C++ -GenericName[fr]=Prise en charge du langage C++ -GenericName[ga]=Tacaíocht C++ -GenericName[gl]=Soporte para C++ -GenericName[hi]=सी++ समर्थन -GenericName[hu]=C++-támogatás -GenericName[it]=Supporto C++ -GenericName[ja]=C++ サポート -GenericName[nds]=Ünnerstütten för C++ -GenericName[ne]=C++ समर्थन -GenericName[nl]=Ondersteuning voor C++ -GenericName[pa]=C++ ਸਹਿਯੋਗ -GenericName[pl]=Obsługa C++ -GenericName[pt]=Suporte a C++ -GenericName[pt_BR]=Suporte ao C++ -GenericName[ru]=Поддержка языка C++ -GenericName[sk]=C++ podpora -GenericName[sl]=Podpora za C++ -GenericName[sr]=Подршка за C++ -GenericName[sr@Latn]=Podrška za C++ -GenericName[sv]=C++ stöd -GenericName[ta]=C++ ஆதரவு -GenericName[tg]=Ёрӣ намудани забони C++ -GenericName[tr]=C++ Desteği -GenericName[zh_CN]=C++ 支持 -GenericName[zh_TW]=C++ 支援 -ServiceTypes=TDevelop/LanguageSupport -Icon=source_cpp -X-TDE-Library=libtdevcppsupport -X-TDevelop-Version=5 -X-TDevelop-Language=C++ -X-TDevelop-Args=Cpp diff --git a/languages/cpp/tdevcppsupport.rc b/languages/cpp/tdevcppsupport.rc deleted file mode 100644 index 1bfcf5a8..00000000 --- a/languages/cpp/tdevcppsupport.rc +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/languages/cpp/tdevcsupport.desktop b/languages/cpp/tdevcsupport.desktop deleted file mode 100644 index 7c196ef0..00000000 --- a/languages/cpp/tdevcsupport.desktop +++ /dev/null @@ -1,85 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=C Support -Comment[ca]=Suport per a C -Comment[da]=C understøttelse -Comment[de]=C-Unterstützung für TDevelop -Comment[el]=Υποστήριξη C -Comment[es]=Soporte para C -Comment[et]=C toetus -Comment[eu]=C euskarria -Comment[fa]=پشتیبانی سی -Comment[fr]=Prise en charge du langage C -Comment[ga]=Tacaíocht C -Comment[gl]=Soporte para C -Comment[hi]=सी समर्थन -Comment[hu]=C-támogatás -Comment[is]=C stuðningur -Comment[it]=Supporto per C -Comment[ja]=C サポート -Comment[nds]=Ünnerstütten för C -Comment[ne]=C समर्थन -Comment[nl]=Ondersteuning voor C -Comment[pa]=C ਸਹਿਯੋਗ -Comment[pl]=Obsługa C -Comment[pt]=Suporte a C -Comment[pt_BR]=Suporte ao C -Comment[ru]=Поддержка языка C -Comment[sk]=C podpora -Comment[sl]=Podpora za C -Comment[sr]=Подршка за C -Comment[sr@Latn]=Podrška za C -Comment[sv]=C-stöd -Comment[ta]=C ஆதரவு -Comment[tg]=Ёрӣ намудани забони C -Comment[tr]=C Desteği -Comment[zh_CN]=C 支持 -Comment[zh_TW]=C 支援 -Name=KDevCSupport -Name[da]=TDevelop C understøttelse -Name[nds]=C-Ünnerstütten för TDevelop -Name[pl]=KDevObsługaC -Name[sk]=KDev C podpora -Name[sv]=TDevelop C-stöd -Name[zh_TW]=TDevelop C 支援 -GenericName=C Support -GenericName[ca]=Suport per a C -GenericName[da]=C understøttelse -GenericName[de]=Unterstützung für C -GenericName[el]=Υποστήριξη C -GenericName[es]=Soporte para C -GenericName[et]=C toetus -GenericName[eu]=C euskarria -GenericName[fa]=پشتیبانی سی -GenericName[fr]=Prise en charge du langage C -GenericName[ga]=Tacaíocht C -GenericName[gl]=Soporte para C -GenericName[hi]=सी समर्थन -GenericName[hu]=C-támogatás -GenericName[it]=Supporto C -GenericName[ja]=C サポート -GenericName[nds]=Ünnerstütten för C -GenericName[ne]=C समर्थन -GenericName[nl]=Ondersteuning voor C -GenericName[pa]=C ਸਹਿਯੋਗ -GenericName[pl]=Obsługa C -GenericName[pt]=Suporte a C -GenericName[pt_BR]=Suporte ao C -GenericName[ru]=Поддержка языка C -GenericName[sk]=C podpora -GenericName[sl]=Podpora za C -GenericName[sr]=Подршка за C -GenericName[sr@Latn]=Podrška za C -GenericName[sv]=C-stöd -GenericName[ta]=C ஆதரவு -GenericName[tg]=Ёрӣ намудани забони C -GenericName[tr]=C Desteği -GenericName[zh_CN]=C 支持 -GenericName[zh_TW]=C 支援 -ServiceTypes=TDevelop/LanguageSupport -Icon=source_cpp -X-TDE-Library=libtdevcppsupport -X-TDevelop-Version=5 -X-TDevelop-Language=C -X-TDevelop-Args=C diff --git a/languages/cpp/tdevdeepcopy.h b/languages/cpp/tdevdeepcopy.h deleted file mode 100644 index 3b5d6995..00000000 --- a/languages/cpp/tdevdeepcopy.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef TDEVDEEPCOPY_H -#define TDEVDEEPCOPY_H - -#include - -inline TQString deepCopy( const TQString& s ) -{ - TQCString str = s.utf8(); - return TQString::fromUtf8( str, str.length() ); -} - -#endif -// kate: indent-mode csands; tab-width 4; - diff --git a/languages/cpp/tdevdriver.cpp b/languages/cpp/tdevdriver.cpp deleted file mode 100644 index f2ac1ddb..00000000 --- a/languages/cpp/tdevdriver.cpp +++ /dev/null @@ -1,206 +0,0 @@ -#include "tdelocale.h" /* defines [function] i18n */ -#include - -#include "tdevdriver.h" -#include "cppcodecompletionconfig.h" -#include "setuphelper.h" -#include -#include "includepathresolver.h" - - -TDevDriver::TDevDriver( CppSupportPart* cppSupport, bool foreground ) -: m_cppSupport( cppSupport ), m_includePathResolver(0), m_foreground(foreground), m_shouldParseIncludedFiles(true) -{ - //setupProject(); - setup(); - -} - -TDevDriver::~TDevDriver() { - delete m_includePathResolver; -} - -CppSupportPart* TDevDriver::cppSupport() { return m_cppSupport; } - -void TDevDriver::setupProject() -{ - TQMap map; - - TQStringList fileList = m_cppSupport->project() ->allFiles(); - TQStringList::ConstIterator it = fileList.begin(); - while ( it != fileList.end() ) - { - TQFileInfo info( *it ); - ++it; - - map.insert( info.dirPath( true ), true ); - } - TQMap::Iterator mapit = map.begin(); - while ( mapit != map.end() ) - { - addIncludePath( mapit.key() ); - ++mapit; - } -} - -void TDevDriver::setupLexer( Lexer* lexer ) -{ - Driver::setupLexer( lexer ); - lexer->setReportMessages( true ); - lexer->setReportWarnings( true ); -} - -//! setup the preprocessor -//! code provided by Reginald Stadlbauer -void TDevDriver::setup() -{ - if( lexerCache() ) lexerCache()->clear(); ///Clear the lexer-cache so missing headers get a chance to be parsed - clearMacros(); - clearIncludePaths(); - - addMacro( Macro("KDEVELOP_PARSER", "3.4") ); - - bool ok; - TQString verboseGccOutput = SetupHelper::getVerboseGccIncludePath( &ok ); - TQStringList verboseGccLines = TQStringList::split( '\n', verboseGccOutput ); - if( verboseGccLines.count() > 3 ) { - ///Parse the output of gcc. It includes gcc's final include-path when parsing an empty c++-file(including dirs like /usr/include/c++/4.xx/...) - //what about order? - for( TQStringList::iterator it = verboseGccLines.begin(); it != verboseGccLines.end(); ++it ) { - if( (*it).startsWith(" ") && (*it).length() > 2 && (*it)[1] != ' ' ) { - //it is a potential include-file - TQString path = (*it).stripWhiteSpace(); - TQFileInfo info( path ); - if( info.exists() ) { - kdDebug( 9007 ) << "Adding include-path from gcc-output: \"" << path << "\" absolute: \"" << info.absFilePath() << "\"" << endl; - addIncludePath(info.absFilePath()); - } - } - } - } else { - ///Do some of the old stuff - addIncludePath( "/include" ); - addIncludePath( "/usr/include" ); - addIncludePath( "/usr/local/include" ); - - bool ok; - TQString includePath = SetupHelper::getGccIncludePath(&ok); - if (ok) { - TQStringList ls = TQStringList::split( "\n", includePath ); - for( TQStringList::const_iterator it = ls.begin(); it != ls.end(); ++it ) { - if( !(*it).isEmpty() ) - addIncludePath( *it ); - } - } - - addIncludePath( includePath ); - addIncludePath( "/usr/include/g++-3" ); - addIncludePath( "/usr/include/g++" ); - } - - addMacro( Macro( "__cplusplus", "1" ) ); - - ///@todo maybe remove the following? Is there any normal user who has his environment set up correctly so this is of any use? - TQString tdedir = getenv( "TDEDIR" ); - if( !tdedir.isNull() ) - addIncludePath( tdedir + "/include" ); - - TQString qmakespec = getenv( "QMAKESPEC" ); - if ( qmakespec.isNull() ) - qmakespec = "linux-g++"; - - TQString qtdir = getenv( "QTDIR" ); - if( !qtdir.isNull() ) { - addIncludePath( qtdir + "/include" ); - - // #### implement other mkspecs and find a better way to find the - // #### proper mkspec (althoigh this will be no fun :-) - - addIncludePath( qtdir + "/mkspecs/" + qmakespec ); - } - - TQStringList lines = SetupHelper::getGccMacros(&ok); - if (!ok) { - for (TQStringList::ConstIterator it = lines.constBegin(); it != lines.constEnd(); ++it) { - TQStringList lst = TQStringList::split( ' ', *it ); - if ( lst.count() != 3 ) - continue; - addMacro( Macro( lst[1], lst[2] ) ); - } - } - - addMacro( Macro( "__cplusplus", "1" ) ); - addMacro( Macro( "signals", "signals" ) ); - addMacro( Macro( "slots", "slots" ) ); - addMacro( Macro( "TQ_SCRIPTABLE", "" ) ); - - CppCodeCompletionConfig* cfg = m_cppSupport->codeCompletionConfig(); - TQString str = cfg->customIncludePaths(); - int pos = 0; - while( pos < str.length() ) { - int end = str.find( ';', pos ); - if( end == -1 ) { - end = str.length(); - } - - TQString s = str.mid( pos, end-pos ).stripWhiteSpace(); - if( !s.isEmpty() ) { - if( !s.startsWith( "/" ) && m_cppSupport->project() ) { - s = m_cppSupport->project()->projectDirectory() + "/" + s; - } - addIncludePath( s ); - } - - pos = end+1; - } - - setResolveDependencesEnabled( cfg->preProcessAllHeaders() | cfg->parseMissingHeaders() ); - - delete m_includePathResolver; - if( cfg->resolveIncludePaths() ) { - m_includePathResolver = new CppTools::IncludePathResolver( m_foreground ); - if( m_cppSupport && m_cppSupport->project() ) - m_includePathResolver->setOutOfSourceBuildSystem( m_cppSupport->project()->projectDirectory(), m_cppSupport->project()->buildDirectory() ); - } else - m_includePathResolver = 0; - - m_shouldParseIncludedFiles = cfg->parseMissingHeaders(); -} - -TQStringList TDevDriver::getCustomIncludePath( const TQString& file ) { - if( !file.startsWith("/") ) - kdDebug( 9007 ) << "TDevDriver::getCustomIncludePath(..): given file \"" << file << "\" is not absolute" << endl; - if( !m_includePathResolver ) - return includePaths(); - CppTools::PathResolutionResult res = m_includePathResolver->resolveIncludePath( file ); - - if( !res.success ) { - Problem p( i18n( "%1. Message: %2" ).arg( res.errorMessage ).arg( res.longErrorMessage ), 0, 0, Problem::Level_Warning ); - p.setFileName( file ); - addProblem( file, p ); - } - - return res.path + includePaths(); -} - -bool TDevDriver::shouldParseIncludedFile( const ParsedFilePointer& file ) { - TQString compoundString = file->fileName() + "||" + TQString("%1").arg(file->usedMacros().valueHash()) + "||" + TQString("%1").arg(file->usedMacros().idHash()); - - if( !m_shouldParseIncludedFiles ) - return false; - m_cppSupport->safeFileSet().contains( compoundString ); - - if( m_cppSupport->safeFileSet().contains( file->fileName()) ){ - return false; - } else if( m_cppSupport->safeFileSet().contains( compoundString ) ) { - //kdDebug( 9007 ) << "ALREADY IN FILE-SET: " << compoundString << endl; - return false; - } else { - m_cppSupport->safeFileSet().insert( compoundString ); //This is needed so the same instance of a file is not queued many times - //kdDebug( 9007 ) << "NOT IN FILE-SET, PARSING: " << compoundString << endl; - return true; - } - -} - -//kate: indent-mode csands; tab-width 4; space-indent off; diff --git a/languages/cpp/tdevdriver.h b/languages/cpp/tdevdriver.h deleted file mode 100644 index 46c7d515..00000000 --- a/languages/cpp/tdevdriver.h +++ /dev/null @@ -1,58 +0,0 @@ - -#ifndef __tdevdriver_h -#define __tdevdriver_h - -#include "cppsupportpart.h" -#include "driver.h" - -#include -#include - -#include -#include -#include - -class TDEProcess; -namespace CppTools { - class IncludePathResolver; -}; - -class TDevDriver: public Driver -{ -public: - ///When the driver is used in a background-thread, foreground MUST be false(else crash) - TDevDriver( CppSupportPart* cppSupport, bool foreground = false ); - ~TDevDriver(); - CppSupportPart* cppSupport(); - void setupProject(); - //! setup the preprocessor - //! code provided by Reginald Stadlbauer - void setup(); - - virtual void addMacro( const Macro& m ) - { - if ( m.name() == "signals" || m.name() == "slots" ) - return ; - Driver::addMacro( m ); - } - -protected: - void setupLexer( Lexer* lexer ); - - ///Returns the complete include-path for that file. Not constant because it may add Problem-items to the driver. Must be absolute path. - virtual TQStringList getCustomIncludePath( const TQString& file ); - - virtual bool shouldParseIncludedFile( const ParsedFilePointer& /*file*/ ); - -private: - - CppSupportPart* m_cppSupport; - CppTools::IncludePathResolver* m_includePathResolver; - bool m_foreground; - bool m_shouldParseIncludedFiles; -}; - -#endif -// kate: indent-mode csands; tab-width 4; - - diff --git a/languages/cpp/templates/CMakeLists.txt b/languages/cpp/templates/CMakeLists.txt index c52a25aa..c278a137 100644 --- a/languages/cpp/templates/CMakeLists.txt +++ b/languages/cpp/templates/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES default.cpp default.h - DESTINATION ${DATA_INSTALL_DIR}/tdevcppsupport/templates ) + DESTINATION ${DATA_INSTALL_DIR}/kdevcppsupport/templates ) diff --git a/languages/cpp/templates/Makefile.am b/languages/cpp/templates/Makefile.am index d5d24bcb..21f95fa8 100644 --- a/languages/cpp/templates/Makefile.am +++ b/languages/cpp/templates/Makefile.am @@ -1,2 +1,2 @@ templatesdata_DATA = default.cpp default.h -templatesdatadir = $(kde_datadir)/tdevcppsupport/templates +templatesdatadir = $(kde_datadir)/kdevcppsupport/templates diff --git a/languages/csharp/CMakeLists.txt b/languages/csharp/CMakeLists.txt index 361ce1a1..5e148431 100644 --- a/languages/csharp/CMakeLists.txt +++ b/languages/csharp/CMakeLists.txt @@ -31,17 +31,17 @@ link_directories( ##### other data ################################ install( FILES - tdevcsharpsupport.desktop csharpdoc.protocol + kdevcsharpsupport.desktop csharpdoc.protocol DESTINATION ${SERVICES_INSTALL_DIR} ) install( FILES - tdevcsharpsupport.rc - DESTINATION ${DATA_INSTALL_DIR}/tdevcsharpsupport ) + kdevcsharpsupport.rc + DESTINATION ${DATA_INSTALL_DIR}/kdevcsharpsupport ) -##### libtdevcsharpsupport (module) ############# +##### libkdevcsharpsupport (module) ############# -tde_add_kpart( libtdevcsharpsupport AUTOMOC +tde_add_kpart( libkdevcsharpsupport AUTOMOC SOURCES csharpsupportpart.cpp csharpconfigwidget.cpp csharpconfigwidgetbase.ui diff --git a/languages/csharp/Makefile.am b/languages/csharp/Makefile.am index 313e8bca..75ba9513 100644 --- a/languages/csharp/Makefile.am +++ b/languages/csharp/Makefile.am @@ -6,11 +6,11 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ SUBDIRS = app_templates file_templates doc -kde_module_LTLIBRARIES = libtdevcsharpsupport.la tdeio_csharpdoc.la -libtdevcsharpsupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevcsharpsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevcsharpsupport.la tdeio_csharpdoc.la +libkdevcsharpsupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevcsharpsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevcsharpsupport_la_SOURCES = csharpsupportpart.cpp csharpconfigwidget.cpp csharpconfigwidgetbase.ui +libkdevcsharpsupport_la_SOURCES = csharpsupportpart.cpp csharpconfigwidget.cpp csharpconfigwidgetbase.ui tdeio_csharpdoc_la_SOURCES = csharpdoc.cpp tdeio_csharpdoc_la_LIBADD = $(LIB_TDEIO) @@ -19,7 +19,7 @@ tdeio_csharpdoc_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevcsharpsupport.desktop csharpdoc.protocol +service_DATA = kdevcsharpsupport.desktop csharpdoc.protocol -rcdir = $(kde_datadir)/tdevcsharpsupport -rc_DATA = tdevcsharpsupport.rc +rcdir = $(kde_datadir)/kdevcsharpsupport +rc_DATA = kdevcsharpsupport.rc diff --git a/languages/csharp/csharpsupportpart.cpp b/languages/csharp/csharpsupportpart.cpp index d410441b..154ff911 100644 --- a/languages/csharp/csharpsupportpart.cpp +++ b/languages/csharp/csharpsupportpart.cpp @@ -19,24 +19,24 @@ #include #include #include -#include +#include #include #include #include #include #include #include -#include "tdevmainwindow.h" +#include "kdevmainwindow.h" #include #include #include -#include "tdevcore.h" -#include "tdevproject.h" -#include "tdevpartcontroller.h" -#include "tdevplugininfo.h" -#include "tdevappfrontend.h" +#include "kdevcore.h" +#include "kdevproject.h" +#include "kdevpartcontroller.h" +#include "kdevplugininfo.h" +#include "kdevappfrontend.h" //#include "classstore.h" //#include "parsedclass.h" //#include "parsedmethod.h" @@ -44,16 +44,16 @@ #include "domutil.h" //#include "programmingbycontract.h" -typedef TDevGenericFactory CSharpSupportFactory; -static const TDevPluginInfo data("tdevcsharpsupport"); -K_EXPORT_COMPONENT_FACTORY( libtdevcsharpsupport, CSharpSupportFactory( data ) ) +typedef KDevGenericFactory CSharpSupportFactory; +static const KDevPluginInfo data("kdevcsharpsupport"); +K_EXPORT_COMPONENT_FACTORY( libkdevcsharpsupport, CSharpSupportFactory( data ) ) CSharpSupportPart::CSharpSupportPart(TQObject *parent, const char *name, const TQStringList &) - : TDevLanguageSupport(&data, parent, name ? name : "CSharpSupportPart") + : KDevLanguageSupport(&data, parent, name ? name : "CSharpSupportPart") { setInstance(CSharpSupportFactory::instance()); - setXMLFile("tdevcsharpsupport.rc"); + setXMLFile("kdevcsharpsupport.rc"); connect( core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened()) ); connect( core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed()) ); @@ -174,9 +174,9 @@ void CSharpSupportPart::savedFile(const KURL &fileName) } -TDevLanguageSupport::Features CSharpSupportPart::features() +KDevLanguageSupport::Features CSharpSupportPart::features() { - return TDevLanguageSupport::Features(Classes | Functions | Variables | Namespaces | /*Scripts | */NewClass | AddMethod | AddAttribute /*| NewScript*/); + return KDevLanguageSupport::Features(Classes | Functions | Variables | Namespaces | /*Scripts | */NewClass | AddMethod | AddAttribute /*| NewScript*/); // return Functions; } @@ -193,7 +193,7 @@ TQString CSharpSupportPart::interpreter() void CSharpSupportPart::startApplication(const TQString &program) { bool inTerminal = DomUtil::readBoolEntry(*projectDom(), "/kdevcsharpsupport/run/terminal"); - if (TDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) + if (KDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) appFrontend->startAppCommand(TQString(), program, inTerminal); } diff --git a/languages/csharp/csharpsupportpart.h b/languages/csharp/csharpsupportpart.h index 2256480b..18e5a663 100644 --- a/languages/csharp/csharpsupportpart.h +++ b/languages/csharp/csharpsupportpart.h @@ -12,11 +12,11 @@ #ifndef _CSHARPSUPPORTPART_H_ #define _CSHARPSUPPORTPART_H_ -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" #include // #include "csharpparser.h" -class CSharpSupportPart : public TDevLanguageSupport +class CSharpSupportPart : public KDevLanguageSupport { Q_OBJECT diff --git a/languages/csharp/doc/Makefile.am b/languages/csharp/doc/Makefile.am index 1e8dbe53..e0dfb9eb 100644 --- a/languages/csharp/doc/Makefile.am +++ b/languages/csharp/doc/Makefile.am @@ -1,4 +1,4 @@ -tocdir = ${kde_datadir}/tdevdocumentation/tocs +tocdir = ${kde_datadir}/kdevdocumentation/tocs toc_DATA = #indexdir = ${kde_datadir}/devdoctreeview/indices diff --git a/languages/csharp/file_templates/Makefile.am b/languages/csharp/file_templates/Makefile.am index 40ad2f23..b4f0a30c 100644 --- a/languages/csharp/file_templates/Makefile.am +++ b/languages/csharp/file_templates/Makefile.am @@ -1,4 +1,4 @@ -templatedir = $(kde_datadir)/tdevfilecreate/file-templates +templatedir = $(kde_datadir)/kdevfilecreate/file-templates template_DATA = diff --git a/languages/csharp/kdevcsharpsupport.desktop b/languages/csharp/kdevcsharpsupport.desktop new file mode 100644 index 00000000..a5627cc3 --- /dev/null +++ b/languages/csharp/kdevcsharpsupport.desktop @@ -0,0 +1,57 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=CSharp Support +Comment[ca]=Suport per a CSharp +Comment[da]=Csharp understøttelse +Comment[de]=CSharp-Unterstützung für TDevelop +Comment[el]=Υποστήριξη CSharp +Comment[es]=Soporte para CSharp +Comment[et]=CSharp'i toetus +Comment[fr]=Prise en charge du langage CSharp +Comment[hu]=CSharp-támogatás +Comment[it]=Supporto per CSharp +Comment[ja]=CSharp サポート +Comment[nds]=Ünnerstütten för CSharp +Comment[nl]=Ondersteuning voor CSharp +Comment[pl]=Obsługa CSharp +Comment[pt]=Suporte a C# +Comment[pt_BR]=Suporte a C# +Comment[ru]=Поддержка CSharp +Comment[sk]=CSharp podpora +Comment[sr]=Подршка за CSharp +Comment[sr@Latn]=Podrška za CSharp +Comment[sv]=C#-stöd +Comment[zh_TW]=C# 支援 +Name=KDevCSharpSupport +Name[de]=Unterstützung für CSharp (TDevelop) +Name[nds]=CSharp-Ünnerstütten för TDevelop +Name[sv]=TDevelop C#-stöd +Name[zh_TW]=TDevelop C# 支援 +GenericName=CSharp Support +GenericName[ca]=Suport per a CSharp +GenericName[da]=CSharp understøttelse +GenericName[de]=Unterstützung für CSharp +GenericName[el]=Υποστήριξη CSharp +GenericName[es]=Soporte para CSharp +GenericName[et]=CSharp'i toetus +GenericName[fr]=Prise en charge du langage CSharp +GenericName[hu]=CSharp-támogatás +GenericName[it]=Supporto CSharp +GenericName[ja]=CSharp サポート +GenericName[nds]=Ünnerstütten för CSharp +GenericName[nl]=Ondersteuning voor CSharp +GenericName[pl]=Obsługa CSharp +GenericName[pt]=Suporte a C# +GenericName[pt_BR]=Suporte a C# +GenericName[ru]=Поддержка CSharp +GenericName[sk]=CSharp podpora +GenericName[sr]=Подршка за CSharp +GenericName[sr@Latn]=Podrška za CSharp +GenericName[sv]=C#-stöd +GenericName[zh_TW]=C# 支援 +ServiceTypes=TDevelop/LanguageSupport +X-TDE-Library=libkdevcsharpsupport +X-TDevelop-Version=5 +X-TDevelop-Language=CSharp + diff --git a/languages/csharp/tdevcsharpsupport.rc b/languages/csharp/kdevcsharpsupport.rc similarity index 100% rename from languages/csharp/tdevcsharpsupport.rc rename to languages/csharp/kdevcsharpsupport.rc diff --git a/languages/csharp/tdevcsharpsupport.desktop b/languages/csharp/tdevcsharpsupport.desktop deleted file mode 100644 index c072003e..00000000 --- a/languages/csharp/tdevcsharpsupport.desktop +++ /dev/null @@ -1,57 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=CSharp Support -Comment[ca]=Suport per a CSharp -Comment[da]=Csharp understøttelse -Comment[de]=CSharp-Unterstützung für TDevelop -Comment[el]=Υποστήριξη CSharp -Comment[es]=Soporte para CSharp -Comment[et]=CSharp'i toetus -Comment[fr]=Prise en charge du langage CSharp -Comment[hu]=CSharp-támogatás -Comment[it]=Supporto per CSharp -Comment[ja]=CSharp サポート -Comment[nds]=Ünnerstütten för CSharp -Comment[nl]=Ondersteuning voor CSharp -Comment[pl]=Obsługa CSharp -Comment[pt]=Suporte a C# -Comment[pt_BR]=Suporte a C# -Comment[ru]=Поддержка CSharp -Comment[sk]=CSharp podpora -Comment[sr]=Подршка за CSharp -Comment[sr@Latn]=Podrška za CSharp -Comment[sv]=C#-stöd -Comment[zh_TW]=C# 支援 -Name=KDevCSharpSupport -Name[de]=Unterstützung für CSharp (TDevelop) -Name[nds]=CSharp-Ünnerstütten för TDevelop -Name[sv]=TDevelop C#-stöd -Name[zh_TW]=TDevelop C# 支援 -GenericName=CSharp Support -GenericName[ca]=Suport per a CSharp -GenericName[da]=CSharp understøttelse -GenericName[de]=Unterstützung für CSharp -GenericName[el]=Υποστήριξη CSharp -GenericName[es]=Soporte para CSharp -GenericName[et]=CSharp'i toetus -GenericName[fr]=Prise en charge du langage CSharp -GenericName[hu]=CSharp-támogatás -GenericName[it]=Supporto CSharp -GenericName[ja]=CSharp サポート -GenericName[nds]=Ünnerstütten för CSharp -GenericName[nl]=Ondersteuning voor CSharp -GenericName[pl]=Obsługa CSharp -GenericName[pt]=Suporte a C# -GenericName[pt_BR]=Suporte a C# -GenericName[ru]=Поддержка CSharp -GenericName[sk]=CSharp podpora -GenericName[sr]=Подршка за CSharp -GenericName[sr@Latn]=Podrška za CSharp -GenericName[sv]=C#-stöd -GenericName[zh_TW]=C# 支援 -ServiceTypes=TDevelop/LanguageSupport -X-TDE-Library=libtdevcsharpsupport -X-TDevelop-Version=5 -X-TDevelop-Language=CSharp - diff --git a/languages/fortran/CMakeLists.txt b/languages/fortran/CMakeLists.txt index 8829a5b3..507795aa 100644 --- a/languages/fortran/CMakeLists.txt +++ b/languages/fortran/CMakeLists.txt @@ -31,13 +31,13 @@ link_directories( ##### other data ################################ -install( FILES tdevfortransupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevfortransupport.rc DESTINATION ${DATA_INSTALL_DIR}/tdevfortransupport ) +install( FILES kdevfortransupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevfortransupport.rc DESTINATION ${DATA_INSTALL_DIR}/kdevfortransupport ) -##### libtdevfortransupport (module) ############ +##### libkdevfortransupport (module) ############ -tde_add_kpart( libtdevfortransupport AUTOMOC +tde_add_kpart( libkdevfortransupport AUTOMOC SOURCES fortransupportpart.cpp fixedformparser.cpp ftnchekconfigwidget.cpp ftnchekconfigwidgetbase.ui diff --git a/languages/fortran/Makefile.am b/languages/fortran/Makefile.am index e6568364..73f4582c 100644 --- a/languages/fortran/Makefile.am +++ b/languages/fortran/Makefile.am @@ -5,16 +5,16 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ $(all_includes) SUBDIRS = file_templates app_templates compiler doc -kde_module_LTLIBRARIES = libtdevfortransupport.la -libtdevfortransupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevfortransupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevfortransupport.la +libkdevfortransupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevfortransupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevfortransupport_la_SOURCES = fortransupportpart.cpp fixedformparser.cpp ftnchekconfigwidget.cpp ftnchekconfigwidgetbase.ui +libkdevfortransupport_la_SOURCES = fortransupportpart.cpp fixedformparser.cpp ftnchekconfigwidget.cpp ftnchekconfigwidgetbase.ui METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevfortransupport.desktop +service_DATA = kdevfortransupport.desktop -rcdir = $(kde_datadir)/tdevfortransupport -rc_DATA = tdevfortransupport.rc +rcdir = $(kde_datadir)/kdevfortransupport +rc_DATA = kdevfortransupport.rc diff --git a/languages/fortran/app_templates/fortranhello/CMakeLists.txt b/languages/fortran/app_templates/fortranhello/CMakeLists.txt index 86254144..74709631 100644 --- a/languages/fortran/app_templates/fortranhello/CMakeLists.txt +++ b/languages/fortran/app_templates/fortranhello/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( fortranhello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/fortranhello.tar.gz fortranhello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - fortranhello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + fortranhello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/fortran/app_templates/fortranhello/Makefile.am b/languages/fortran/app_templates/fortranhello/Makefile.am index 15da4c3f..3bf32575 100644 --- a/languages/fortran/app_templates/fortranhello/Makefile.am +++ b/languages/fortran/app_templates/fortranhello/Makefile.am @@ -3,10 +3,10 @@ dataFiles = main.f src-Makefile.am fortran-Makefile.am fortran-Makefile.cvs \ templateName = fortranhello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/fortran/app_templates/fortranhello/app.tdevelop b/languages/fortran/app_templates/fortranhello/app.tdevelop index 238351ec..f97fd76a 100644 --- a/languages/fortran/app_templates/fortranhello/app.tdevelop +++ b/languages/fortran/app_templates/fortranhello/app.tdevelop @@ -14,7 +14,7 @@ KDevCTags - + src/%{APPNAMELC} @@ -26,16 +26,16 @@ - - + + - - + + false false @@ -54,8 +54,8 @@ - - + + ada ada_bugs_gcc @@ -103,11 +103,11 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/languages/fortran/app_templates/fortranhello/fortranhello.kdevtemplate b/languages/fortran/app_templates/fortranhello/fortranhello.kdevtemplate new file mode 100644 index 00000000..e4c5cb33 --- /dev/null +++ b/languages/fortran/app_templates/fortranhello/fortranhello.kdevtemplate @@ -0,0 +1,140 @@ +# KDE Config File +[General] +Name=Simple Hello world program +Name[ca]=Simple programa Hello world +Name[da]=Simpelt Goddag verden program +Name[de]=Ein einfaches "Hello World"-Programm +Name[el]=Απλό πρόγραμμα Γεια σου Κόσμε +Name[es]=Programa «Hola mundo» sencillo +Name[et]=Lihtne "Tere, maailm" programm +Name[eu]="Kaixo mundua" programa sinplea +Name[fa]=برنامۀ سادۀ Hello world +Name[fr]=Programme « Bonjour monde » simple +Name[ga]=Ríomhchlár simplí "Hello World" +Name[gl]=Programa sinxelo Ola mundo +Name[hu]=Egyszerű Hello world program +Name[it]=Semplice programma di "Hello world" +Name[ja]=簡単な Hello world プログラム +Name[ms]=Program Hello World mudah +Name[nds]=En eenfach "Moin Welt"-Programm +Name[ne]=साधारण हेल्लो वोल्ड कार्यक्रम +Name[nl]=Eenvoudig 'Hello World' programma +Name[pl]=Prosty program witaj świecie +Name[pt]=Programa simples Olá Mundo +Name[pt_BR]=Programa simples Olá Mundo +Name[ru]=Простая программа Hello world +Name[sk]=Jednoduchý "Ahoj svet" program +Name[sl]=Preprost program Hello world +Name[sr]=Једноставан „Здраво свете“ програм +Name[sr@Latn]=Jednostavan „Zdravo svete“ program +Name[sv]=Enkelt Hello world-program +Name[tr]=Basit Merhaba dünya programı +Name[zh_CN]=简单的 Hello world 程序 +Name[zh_TW]=簡單的 Hello world 程式 +Icon=fortranhello.png +Category=Fortran +Comment=Generates a simple Hello world program in Fortran +Comment[ca]=Genera un simple programa de Hello world en Fortran +Comment[da]=Genererer et simpelt Goddag verden program i Fortran +Comment[de]=Erstellt ein einfaches "Hello World"-Programm in Fortran +Comment[el]=Δημιουργία ενός απλού προγράμματος Γεια σου σε Fortran +Comment[es]=Genera un sencillo programa «Hola mundo» en Fortran +Comment[et]=Lihtsa "Tere, maailm" programmi loomine Fortranis +Comment[eu]="Kaixo mundua" programa sinple bat sortzen du Fortran lengoaian +Comment[fa]=یک برنامۀ سادۀ Hello world در فرترن تولید می‌کند +Comment[fr]=Génère un programme « Bonjour monde » simple en Fortran +Comment[gl]=Xera un programa sinxelo Ola mundo en Fortran +Comment[hu]=Létrehoz egy egyszerű Hello world programot Fortran nyelven +Comment[it]=Genera un semplice programma di "Hello world" in Fortran +Comment[ja]=簡単な Hello world プログラムを Fortran で作成します +Comment[nds]=Stellt en eenfach "Moin Welt"-Programm in Fortran op +Comment[ne]=फोर्ट्रानमा साधारण हेल्लो वोल्ड कार्यक्रम उत्पन्न गर्दछ +Comment[nl]=Genereert een eenvoudig Hello World-programma in Fortran +Comment[pl]=Generuje prosty program Witaj świecie w Fortranie +Comment[pt]=Gera um programa simples Olá Mundo em Fortran +Comment[pt_BR]=Gera um programa simples Olá Mundo em Fortran +Comment[ru]=Создание простой программы Hello world на Fortran +Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program vo Fortran +Comment[sr]=Прави једноставан „Здраво свете“ у Fortran-у +Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ u Fortran-u +Comment[sv]=Skapar ett enkelt Hello world-program i Fortran +Comment[tr]=Fortran'da basit bir Merhaba Dünya programı yaratır. +Comment[zh_CN]=生成一个简单的 Fortran 语言 Hello world 程序 +Comment[zh_TW]=產生一個簡單的 Fortran Hello world 程式 +FileTemplates=f,None +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.f +Archive=fortranhello.tar.gz + +[INCADMIN] +Type=include +File=%{tdevelop}/template-common/incadmin.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=%{src}/fortran-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE3] +Type=install +Source=%{src}/fortran-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE4] +Type=install +Source=%{src}/configure.in +Dest=%{dest}/configure.in + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE5] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE6] +Type=install +Source=%{src}/main.f +Dest=%{dest}/src/%{APPNAMELC}.f + +[MSG] +Type=message +Comment=a simple "Hello world" program in fortran was created in %{dest} +Comment[ca]=Un simple programa de "Hello world" en fortran ha estat creat en %{dest} +Comment[da]=et simpelt "Goddag verden" program i fortran blev oprettet i %{dest} +Comment[de]=Ein einfaches "Hello World"-Programm in Fortran wurde in %{dest} erstellt. +Comment[el]=Ένα απλό πρόγραμμα "Γεια σου κόσμε" σε fortran δημιουργήθηκε στο %{dest} +Comment[es]=Un sencillo programa «Hola mundo» en Fortran ha sido creado en %{dest} +Comment[et]=Lihtne "Tere, maailm" programm Fortranis loodi asukohta %{dest} +Comment[eu]="Kaixo mundua" programa sinple bat sortu da hemen: %{dest} +Comment[fa]=یک برنامۀ سادۀ «Hello world» در فرترن در %{dest} ایجاد شد +Comment[fr]=Un programme « Bonjour monde » simple en Fortran a été créé dans %{dest} +Comment[gl]=Creouse un programa sinxelo "Ola mundo" en fortran en %{dest} +Comment[hu]=Létrejött egy egyszerű, Fortran nyelvű Hello world program itt: %{dest} +Comment[it]=È stato creato un semplice programma di "Hello world" in Fortran in %{dest} +Comment[ja]=Fortran で記述された簡単な Hello world プログラムを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en eenfach "Moin Welt"-Programm in Fortran opstellt +Comment[ne]=फोर्ट्रानमा साधारण "हेल्लो वोल्ड" कार्यक्रम %{dest} मा सिर्जना गरियो +Comment[nl]=een eenvoudig "Hello World"-programma in Fortran is aangemaakt in %{dest} +Comment[pl]=Prosty program "Witaj świecie" w Fortranie został utworzony w %{dest} +Comment[pt]=Foi criado um programa simples "Olá mundo" em Fortran em %{dest} +Comment[pt_BR]=Foi criado um programa simples "Olá mundo" em Fortran em %{dest} +Comment[ru]=Простая программа "Hello world" на Fortran создана в %{dest} +Comment[sk]=Jednoduchý "Ahoj svet" program vo Fortran bol vytvorený v %{dest} +Comment[sr]=Једноставан „Здраво свете“ у Fortran-у направљен је у %{dest} +Comment[sr@Latn]=Jednostavan „Zdravo svete“ u Fortran-u napravljen je u %{dest} +Comment[sv]=Ett enkelt "Hello world"-program i Fortran skapades i %{dest} +Comment[tr]=Fortran'da basit bir "Merhaba Dünya" programı %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 创建了一个简单的 Fortran 语言“Hello world”程序 +Comment[zh_TW]=一個 fortran 的簡單的 "Hello world" 程式已建立於 %{dest} diff --git a/languages/fortran/app_templates/fortranhello/fortranhello.tdevtemplate b/languages/fortran/app_templates/fortranhello/fortranhello.tdevtemplate deleted file mode 100644 index d25570f7..00000000 --- a/languages/fortran/app_templates/fortranhello/fortranhello.tdevtemplate +++ /dev/null @@ -1,140 +0,0 @@ -# KDE Config File -[General] -Name=Simple Hello world program -Name[ca]=Simple programa Hello world -Name[da]=Simpelt Goddag verden program -Name[de]=Ein einfaches "Hello World"-Programm -Name[el]=Απλό πρόγραμμα Γεια σου Κόσμε -Name[es]=Programa «Hola mundo» sencillo -Name[et]=Lihtne "Tere, maailm" programm -Name[eu]="Kaixo mundua" programa sinplea -Name[fa]=برنامۀ سادۀ Hello world -Name[fr]=Programme « Bonjour monde » simple -Name[ga]=Ríomhchlár simplí "Hello World" -Name[gl]=Programa sinxelo Ola mundo -Name[hu]=Egyszerű Hello world program -Name[it]=Semplice programma di "Hello world" -Name[ja]=簡単な Hello world プログラム -Name[ms]=Program Hello World mudah -Name[nds]=En eenfach "Moin Welt"-Programm -Name[ne]=साधारण हेल्लो वोल्ड कार्यक्रम -Name[nl]=Eenvoudig 'Hello World' programma -Name[pl]=Prosty program witaj świecie -Name[pt]=Programa simples Olá Mundo -Name[pt_BR]=Programa simples Olá Mundo -Name[ru]=Простая программа Hello world -Name[sk]=Jednoduchý "Ahoj svet" program -Name[sl]=Preprost program Hello world -Name[sr]=Једноставан „Здраво свете“ програм -Name[sr@Latn]=Jednostavan „Zdravo svete“ program -Name[sv]=Enkelt Hello world-program -Name[tr]=Basit Merhaba dünya programı -Name[zh_CN]=简单的 Hello world 程序 -Name[zh_TW]=簡單的 Hello world 程式 -Icon=fortranhello.png -Category=Fortran -Comment=Generates a simple Hello world program in Fortran -Comment[ca]=Genera un simple programa de Hello world en Fortran -Comment[da]=Genererer et simpelt Goddag verden program i Fortran -Comment[de]=Erstellt ein einfaches "Hello World"-Programm in Fortran -Comment[el]=Δημιουργία ενός απλού προγράμματος Γεια σου σε Fortran -Comment[es]=Genera un sencillo programa «Hola mundo» en Fortran -Comment[et]=Lihtsa "Tere, maailm" programmi loomine Fortranis -Comment[eu]="Kaixo mundua" programa sinple bat sortzen du Fortran lengoaian -Comment[fa]=یک برنامۀ سادۀ Hello world در فرترن تولید می‌کند -Comment[fr]=Génère un programme « Bonjour monde » simple en Fortran -Comment[gl]=Xera un programa sinxelo Ola mundo en Fortran -Comment[hu]=Létrehoz egy egyszerű Hello world programot Fortran nyelven -Comment[it]=Genera un semplice programma di "Hello world" in Fortran -Comment[ja]=簡単な Hello world プログラムを Fortran で作成します -Comment[nds]=Stellt en eenfach "Moin Welt"-Programm in Fortran op -Comment[ne]=फोर्ट्रानमा साधारण हेल्लो वोल्ड कार्यक्रम उत्पन्न गर्दछ -Comment[nl]=Genereert een eenvoudig Hello World-programma in Fortran -Comment[pl]=Generuje prosty program Witaj świecie w Fortranie -Comment[pt]=Gera um programa simples Olá Mundo em Fortran -Comment[pt_BR]=Gera um programa simples Olá Mundo em Fortran -Comment[ru]=Создание простой программы Hello world на Fortran -Comment[sk]=Vygeneruje jednoduchý "Ahoj svet" program vo Fortran -Comment[sr]=Прави једноставан „Здраво свете“ у Fortran-у -Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ u Fortran-u -Comment[sv]=Skapar ett enkelt Hello world-program i Fortran -Comment[tr]=Fortran'da basit bir Merhaba Dünya programı yaratır. -Comment[zh_CN]=生成一个简单的 Fortran 语言 Hello world 程序 -Comment[zh_TW]=產生一個簡單的 Fortran Hello world 程式 -FileTemplates=f,None -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.f -Archive=fortranhello.tar.gz - -[INCADMIN] -Type=include -File=%{tdevelop}/template-common/incadmin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/fortran-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE3] -Type=install -Source=%{src}/fortran-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE4] -Type=install -Source=%{src}/configure.in -Dest=%{dest}/configure.in - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE5] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE6] -Type=install -Source=%{src}/main.f -Dest=%{dest}/src/%{APPNAMELC}.f - -[MSG] -Type=message -Comment=a simple "Hello world" program in fortran was created in %{dest} -Comment[ca]=Un simple programa de "Hello world" en fortran ha estat creat en %{dest} -Comment[da]=et simpelt "Goddag verden" program i fortran blev oprettet i %{dest} -Comment[de]=Ein einfaches "Hello World"-Programm in Fortran wurde in %{dest} erstellt. -Comment[el]=Ένα απλό πρόγραμμα "Γεια σου κόσμε" σε fortran δημιουργήθηκε στο %{dest} -Comment[es]=Un sencillo programa «Hola mundo» en Fortran ha sido creado en %{dest} -Comment[et]=Lihtne "Tere, maailm" programm Fortranis loodi asukohta %{dest} -Comment[eu]="Kaixo mundua" programa sinple bat sortu da hemen: %{dest} -Comment[fa]=یک برنامۀ سادۀ «Hello world» در فرترن در %{dest} ایجاد شد -Comment[fr]=Un programme « Bonjour monde » simple en Fortran a été créé dans %{dest} -Comment[gl]=Creouse un programa sinxelo "Ola mundo" en fortran en %{dest} -Comment[hu]=Létrejött egy egyszerű, Fortran nyelvű Hello world program itt: %{dest} -Comment[it]=È stato creato un semplice programma di "Hello world" in Fortran in %{dest} -Comment[ja]=Fortran で記述された簡単な Hello world プログラムを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en eenfach "Moin Welt"-Programm in Fortran opstellt -Comment[ne]=फोर्ट्रानमा साधारण "हेल्लो वोल्ड" कार्यक्रम %{dest} मा सिर्जना गरियो -Comment[nl]=een eenvoudig "Hello World"-programma in Fortran is aangemaakt in %{dest} -Comment[pl]=Prosty program "Witaj świecie" w Fortranie został utworzony w %{dest} -Comment[pt]=Foi criado um programa simples "Olá mundo" em Fortran em %{dest} -Comment[pt_BR]=Foi criado um programa simples "Olá mundo" em Fortran em %{dest} -Comment[ru]=Простая программа "Hello world" на Fortran создана в %{dest} -Comment[sk]=Jednoduchý "Ahoj svet" program vo Fortran bol vytvorený v %{dest} -Comment[sr]=Једноставан „Здраво свете“ у Fortran-у направљен је у %{dest} -Comment[sr@Latn]=Jednostavan „Zdravo svete“ u Fortran-u napravljen je u %{dest} -Comment[sv]=Ett enkelt "Hello world"-program i Fortran skapades i %{dest} -Comment[tr]=Fortran'da basit bir "Merhaba Dünya" programı %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 创建了一个简单的 Fortran 语言“Hello world”程序 -Comment[zh_TW]=一個 fortran 的簡單的 "Hello world" 程式已建立於 %{dest} diff --git a/languages/fortran/compiler/Makefile.am b/languages/fortran/compiler/Makefile.am index 183131cb..3489a85c 100644 --- a/languages/fortran/compiler/Makefile.am +++ b/languages/fortran/compiler/Makefile.am @@ -1,6 +1,6 @@ # This is the collection of plugins. In contrast to the parts # directory, these are 'transient' in a sense and don't -# share the complete TDevComponent interface. +# share the complete KDevComponent interface. SUBDIRS = pgioptions diff --git a/languages/fortran/compiler/pgioptions/CMakeLists.txt b/languages/fortran/compiler/pgioptions/CMakeLists.txt index 82d0d0a2..2111f2ad 100644 --- a/languages/fortran/compiler/pgioptions/CMakeLists.txt +++ b/languages/fortran/compiler/pgioptions/CMakeLists.txt @@ -25,15 +25,15 @@ link_directories( ##### other data ################################ install( FILES - tdevpghpfoptions.desktop tdevpgf77options.desktop + kdevpghpfoptions.desktop kdevpgf77options.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevpgioptions (module) ################ +##### libkdevpgioptions (module) ################ -tde_add_kpart( libtdevpgioptions AUTOMOC +tde_add_kpart( libkdevpgioptions AUTOMOC SOURCES pgioptionsfactory.cpp pgioptionsplugin.cpp - LINK tdevextras-shared tdeui-shared + LINK kdevextras-shared tdeui-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/languages/fortran/compiler/pgioptions/Makefile.am b/languages/fortran/compiler/pgioptions/Makefile.am index c26068e2..893b7950 100644 --- a/languages/fortran/compiler/pgioptions/Makefile.am +++ b/languages/fortran/compiler/pgioptions/Makefile.am @@ -4,15 +4,15 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/interfaces/extras \ $(all_includes) -kde_module_LTLIBRARIES = libtdevpgioptions.la -libtdevpgioptions_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) -libtdevpgioptions_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/lib/interfaces/extras/libtdevextras.la +kde_module_LTLIBRARIES = libkdevpgioptions.la +libkdevpgioptions_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) +libkdevpgioptions_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/lib/interfaces/extras/libkdevextras.la -libtdevpgioptions_la_SOURCES = pgioptionsfactory.cpp pgioptionsplugin.cpp +libkdevpgioptions_la_SOURCES = pgioptionsfactory.cpp pgioptionsplugin.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevpghpfoptions.desktop tdevpgf77options.desktop +service_DATA = kdevpghpfoptions.desktop kdevpgf77options.desktop diff --git a/languages/fortran/compiler/pgioptions/kdevpgf77options.desktop b/languages/fortran/compiler/pgioptions/kdevpgf77options.desktop new file mode 100644 index 00000000..6d2007ea --- /dev/null +++ b/languages/fortran/compiler/pgioptions/kdevpgf77options.desktop @@ -0,0 +1,53 @@ +[Desktop Entry] +Type=Service +Exec=pgf77 +Comment=Portland Group Fortran77 Compiler +Comment[br]=Dastumer Fortran 77 ar strollad Portland +Comment[ca]=Compilador Fortran 77 de Portland Group +Comment[da]=Portland Group Fortran77 oversætter +Comment[el]=Μεταγλωττιστής Fortran77 ομάδας Portland +Comment[es]=Compilador de Fortran 77 de Portland Group +Comment[et]=Portland Group Fortran77 kompilaator +Comment[eu]=Portland Group Fortran77 konpiladorea +Comment[fa]=مترجم فرترن ۷۷ گروه Portland +Comment[fr]=Compilateur Fortran77 du Portland Group +Comment[gl]=Compilador de Fortran77 de Portland Group +Comment[hi]=पोर्टलैंड समूह फ़ोरट्रॉन77 कम्पायलर +Comment[hu]=Portland Group Fortran 77 fordítóprogram +Comment[is]=Portland Group Fortran77 þýðandi +Comment[it]=Compilatore per Portland Group Fortran77 +Comment[ja]=Portland グループ Fortran77 コンパイラ +Comment[nds]=Portland Group-Fortran77-Kompilerer +Comment[ne]=पोर्टल्यान्ड समूह फोर्ट्रान ७७ कम्पाइलर +Comment[nl]=Portland Group Fortran77-compiler +Comment[pl]=Kompilator Portland Group Fortran77 +Comment[pt]=Compilador de Fortran77 do Portland Group +Comment[pt_BR]=Compilador Portland Group Fortran77 +Comment[ru]=Компилятор Portland Group Fortran77 +Comment[sk]=Portland Group Fortran77 kompilátor +Comment[sl]=Prevajalnik za Portland Group Fortran77 +Comment[sr]=Преводилац Fortran-а 77 од Portland Group-а +Comment[sr@Latn]=Prevodilac Fortran-a 77 od Portland Group-a +Comment[sv]=Portland gruppens Fortran 77-kompilator +Comment[ta]=பொர்ட்லான்ட் குழு பொர்ட்ரான் 77 தொகுப்பி +Comment[tg]=Талфифгари Portland Group Fortran77 +Comment[tr]=Portland Grubu Fortran 77 Derleyicisi +Comment[zh_CN]=Portland Group Fortran77 编译器 +Comment[zh_TW]=Portland Group Fortran 77 編譯器 +Name=Pgf77Options +Name[da]=Portland Group Fortran77 indstillinger +Name[de]=Pgf77-Einstellungen (TDevelop) +Name[hi]=पीजीएफ़77विकल्प +Name[nds]=Pgf77-Instellen (TDevelop) +Name[pl]=Opcje Pgf77 +Name[sk]=Pgf77 možnosti +Name[sl]=Možnosti Pgf77 +Name[sv]=Alternativ för pgf77 +Name[ta]=Pgf77 விருப்பங்கள் +Name[tg]=Pgf77Интихобҳо +Name[zh_TW]=Pgf77 選項 +ServiceTypes=TDevelop/CompilerOptions +X-TDE-Library=libkdevpgioptions +X-TDevelop-Version=5 +X-TDevelop-Language=Fortran +X-TDevelop-Args=pgf77 diff --git a/languages/fortran/compiler/pgioptions/kdevpghpfoptions.desktop b/languages/fortran/compiler/pgioptions/kdevpghpfoptions.desktop new file mode 100644 index 00000000..f3793949 --- /dev/null +++ b/languages/fortran/compiler/pgioptions/kdevpghpfoptions.desktop @@ -0,0 +1,50 @@ +[Desktop Entry] +Type=Service +Exec=pghpf +Comment=Portland Group High Performance Fortran compiler +Comment[ca]=Compilador Fortran d'altes prestacions de Portland Group +Comment[da]=Portland Group Fortran oversætter +Comment[de]=Portland Group High Performance Fortran Compiler +Comment[el]=Μεταγλωττιστής υψηλής ταχύτητας Fortran της ομάδας Portland +Comment[es]=Compilador de Fortran de alto rendimiento de Portland Group +Comment[et]=Portland Groupi suure jõudlusega Fortrani kompilaator +Comment[eu]=Portland Group-en errendimendu handiko Fortran konpiladorea +Comment[fa]=مترجم فرترن با کارایی بالای گروه Portland +Comment[fr]=Compilateur Fortran hautes performances du Portland Group +Comment[gl]=Compilador de High Performance Fortran de Portland Group +Comment[hi]=पोर्टलैंड समूह उच्च परफ़ार्मेंस फ़ोरट्रॉन कम्पायलर +Comment[hu]=Portland Group nagyteljesítményű Fortran fordítóprogram +Comment[it]=Compilatore ad alte prestazioni per Fortran del Portland Group +Comment[ja]=Portland グループ ハイパフォーマンス Fortran コンパイラ +Comment[nds]=Portland Group-Hoochleistenkompilerer för Fortran +Comment[ne]=पोर्टल्यान्ड समूह उच्च कार्यसम्पादन फोर्ट्रान कम्पाइलर +Comment[nl]=Portland Group High Performance Fortran-compiler +Comment[pl]=Kompilator Portland Group High Performance Fortran +Comment[pt]=Compilador Portland Group High Performance Fortran +Comment[pt_BR]=Compilador Portland Group Alta Performance +Comment[ru]=Компилятор Portland Group High Performance Fortran +Comment[sk]=Portland Group vysoko výkonný Fortran kompilátor +Comment[sr]=Преводилац Fortran-а високих перформанси, из Portland Group-а +Comment[sr@Latn]=Prevodilac Fortran-a visokih performansi, iz Portland Group-a +Comment[sv]=Portland gruppens högprestanda Fortran 77-kompilator +Comment[ta]=பொர்ட்லான்ட் குழு உயர் செயல்பாடு பொர்ட்ரான் தொகுப்பி +Comment[tg]=Талфифгари Portland Group High Performance Fortran +Comment[tr]=Portland Grubu Yüksek Başarımlı Fortran Derleyicisi +Comment[zh_CN]=Portland Group 高性能 Fortran 编译器 +Comment[zh_TW]=Portland Group 高效能 Fortran 編譯器 +Name=PghpfOptions +Name[da]=Portland Group oversætter-indstillinger +Name[de]=Pghpf-Einstellungen (TDevelop) +Name[hi]=पीजीएचपीएफ़-विकल्प +Name[nds]=Pghpf-Optschonen +Name[pl]=Opcje Pghpf +Name[sk]=Pghpf možnosti +Name[sv]=Alternativ för pghpf +Name[ta]=Pghpf விருப்பங்கள் +Name[tg]=PghpfИнтихобҳо +Name[zh_TW]=Pghpf 選項 +ServiceTypes=TDevelop/CompilerOptions +X-TDE-Library=libkdevpgioptions +X-TDevelop-Version=5 +X-TDevelop-Language=Fortran +X-TDevelop-Args=pghpf diff --git a/languages/fortran/compiler/pgioptions/pgioptionsfactory.cpp b/languages/fortran/compiler/pgioptions/pgioptionsfactory.cpp index 474263f0..6e019589 100644 --- a/languages/fortran/compiler/pgioptions/pgioptionsfactory.cpp +++ b/languages/fortran/compiler/pgioptions/pgioptionsfactory.cpp @@ -17,7 +17,7 @@ extern "C" { - void *init_libtdevpgioptions() + void *init_libkdevpgioptions() { return new PgiOptionsFactory; } @@ -61,7 +61,7 @@ TDEInstance *PgiOptionsFactory::s_instance = 0; TDEInstance *PgiOptionsFactory::instance() { if (!s_instance) - s_instance = new TDEInstance("tdevpgioptions"); + s_instance = new TDEInstance("kdevpgioptions"); return s_instance; } diff --git a/languages/fortran/compiler/pgioptions/pgioptionsplugin.cpp b/languages/fortran/compiler/pgioptions/pgioptionsplugin.cpp index 50d907b5..29301c36 100644 --- a/languages/fortran/compiler/pgioptions/pgioptionsplugin.cpp +++ b/languages/fortran/compiler/pgioptions/pgioptionsplugin.cpp @@ -300,7 +300,7 @@ TQString PgiOptionsDialog::flags() const PgiOptionsPlugin::PgiOptionsPlugin(Type type, TQObject *parent, const char *name) - : TDevCompilerOptions(parent, name) + : KDevCompilerOptions(parent, name) { pgitype = type; } diff --git a/languages/fortran/compiler/pgioptions/pgioptionsplugin.h b/languages/fortran/compiler/pgioptions/pgioptionsplugin.h index daa8c99b..d5d80892 100644 --- a/languages/fortran/compiler/pgioptions/pgioptionsplugin.h +++ b/languages/fortran/compiler/pgioptions/pgioptionsplugin.h @@ -14,14 +14,14 @@ #include -#include "tdevcompileroptions.h" +#include "kdevcompileroptions.h" class GeneralTab; class OptimizationTab; class HpfTab; -class PgiOptionsPlugin : public TDevCompilerOptions +class PgiOptionsPlugin : public KDevCompilerOptions { Q_OBJECT diff --git a/languages/fortran/compiler/pgioptions/tdevpgf77options.desktop b/languages/fortran/compiler/pgioptions/tdevpgf77options.desktop deleted file mode 100644 index 12dadcff..00000000 --- a/languages/fortran/compiler/pgioptions/tdevpgf77options.desktop +++ /dev/null @@ -1,53 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=pgf77 -Comment=Portland Group Fortran77 Compiler -Comment[br]=Dastumer Fortran 77 ar strollad Portland -Comment[ca]=Compilador Fortran 77 de Portland Group -Comment[da]=Portland Group Fortran77 oversætter -Comment[el]=Μεταγλωττιστής Fortran77 ομάδας Portland -Comment[es]=Compilador de Fortran 77 de Portland Group -Comment[et]=Portland Group Fortran77 kompilaator -Comment[eu]=Portland Group Fortran77 konpiladorea -Comment[fa]=مترجم فرترن ۷۷ گروه Portland -Comment[fr]=Compilateur Fortran77 du Portland Group -Comment[gl]=Compilador de Fortran77 de Portland Group -Comment[hi]=पोर्टलैंड समूह फ़ोरट्रॉन77 कम्पायलर -Comment[hu]=Portland Group Fortran 77 fordítóprogram -Comment[is]=Portland Group Fortran77 þýðandi -Comment[it]=Compilatore per Portland Group Fortran77 -Comment[ja]=Portland グループ Fortran77 コンパイラ -Comment[nds]=Portland Group-Fortran77-Kompilerer -Comment[ne]=पोर्टल्यान्ड समूह फोर्ट्रान ७७ कम्पाइलर -Comment[nl]=Portland Group Fortran77-compiler -Comment[pl]=Kompilator Portland Group Fortran77 -Comment[pt]=Compilador de Fortran77 do Portland Group -Comment[pt_BR]=Compilador Portland Group Fortran77 -Comment[ru]=Компилятор Portland Group Fortran77 -Comment[sk]=Portland Group Fortran77 kompilátor -Comment[sl]=Prevajalnik za Portland Group Fortran77 -Comment[sr]=Преводилац Fortran-а 77 од Portland Group-а -Comment[sr@Latn]=Prevodilac Fortran-a 77 od Portland Group-a -Comment[sv]=Portland gruppens Fortran 77-kompilator -Comment[ta]=பொர்ட்லான்ட் குழு பொர்ட்ரான் 77 தொகுப்பி -Comment[tg]=Талфифгари Portland Group Fortran77 -Comment[tr]=Portland Grubu Fortran 77 Derleyicisi -Comment[zh_CN]=Portland Group Fortran77 编译器 -Comment[zh_TW]=Portland Group Fortran 77 編譯器 -Name=Pgf77Options -Name[da]=Portland Group Fortran77 indstillinger -Name[de]=Pgf77-Einstellungen (TDevelop) -Name[hi]=पीजीएफ़77विकल्प -Name[nds]=Pgf77-Instellen (TDevelop) -Name[pl]=Opcje Pgf77 -Name[sk]=Pgf77 možnosti -Name[sl]=Možnosti Pgf77 -Name[sv]=Alternativ för pgf77 -Name[ta]=Pgf77 விருப்பங்கள் -Name[tg]=Pgf77Интихобҳо -Name[zh_TW]=Pgf77 選項 -ServiceTypes=TDevelop/CompilerOptions -X-TDE-Library=libtdevpgioptions -X-TDevelop-Version=5 -X-TDevelop-Language=Fortran -X-TDevelop-Args=pgf77 diff --git a/languages/fortran/compiler/pgioptions/tdevpghpfoptions.desktop b/languages/fortran/compiler/pgioptions/tdevpghpfoptions.desktop deleted file mode 100644 index 7fe27fe8..00000000 --- a/languages/fortran/compiler/pgioptions/tdevpghpfoptions.desktop +++ /dev/null @@ -1,50 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=pghpf -Comment=Portland Group High Performance Fortran compiler -Comment[ca]=Compilador Fortran d'altes prestacions de Portland Group -Comment[da]=Portland Group Fortran oversætter -Comment[de]=Portland Group High Performance Fortran Compiler -Comment[el]=Μεταγλωττιστής υψηλής ταχύτητας Fortran της ομάδας Portland -Comment[es]=Compilador de Fortran de alto rendimiento de Portland Group -Comment[et]=Portland Groupi suure jõudlusega Fortrani kompilaator -Comment[eu]=Portland Group-en errendimendu handiko Fortran konpiladorea -Comment[fa]=مترجم فرترن با کارایی بالای گروه Portland -Comment[fr]=Compilateur Fortran hautes performances du Portland Group -Comment[gl]=Compilador de High Performance Fortran de Portland Group -Comment[hi]=पोर्टलैंड समूह उच्च परफ़ार्मेंस फ़ोरट्रॉन कम्पायलर -Comment[hu]=Portland Group nagyteljesítményű Fortran fordítóprogram -Comment[it]=Compilatore ad alte prestazioni per Fortran del Portland Group -Comment[ja]=Portland グループ ハイパフォーマンス Fortran コンパイラ -Comment[nds]=Portland Group-Hoochleistenkompilerer för Fortran -Comment[ne]=पोर्टल्यान्ड समूह उच्च कार्यसम्पादन फोर्ट्रान कम्पाइलर -Comment[nl]=Portland Group High Performance Fortran-compiler -Comment[pl]=Kompilator Portland Group High Performance Fortran -Comment[pt]=Compilador Portland Group High Performance Fortran -Comment[pt_BR]=Compilador Portland Group Alta Performance -Comment[ru]=Компилятор Portland Group High Performance Fortran -Comment[sk]=Portland Group vysoko výkonný Fortran kompilátor -Comment[sr]=Преводилац Fortran-а високих перформанси, из Portland Group-а -Comment[sr@Latn]=Prevodilac Fortran-a visokih performansi, iz Portland Group-a -Comment[sv]=Portland gruppens högprestanda Fortran 77-kompilator -Comment[ta]=பொர்ட்லான்ட் குழு உயர் செயல்பாடு பொர்ட்ரான் தொகுப்பி -Comment[tg]=Талфифгари Portland Group High Performance Fortran -Comment[tr]=Portland Grubu Yüksek Başarımlı Fortran Derleyicisi -Comment[zh_CN]=Portland Group 高性能 Fortran 编译器 -Comment[zh_TW]=Portland Group 高效能 Fortran 編譯器 -Name=PghpfOptions -Name[da]=Portland Group oversætter-indstillinger -Name[de]=Pghpf-Einstellungen (TDevelop) -Name[hi]=पीजीएचपीएफ़-विकल्प -Name[nds]=Pghpf-Optschonen -Name[pl]=Opcje Pghpf -Name[sk]=Pghpf možnosti -Name[sv]=Alternativ för pghpf -Name[ta]=Pghpf விருப்பங்கள் -Name[tg]=PghpfИнтихобҳо -Name[zh_TW]=Pghpf 選項 -ServiceTypes=TDevelop/CompilerOptions -X-TDE-Library=libtdevpgioptions -X-TDevelop-Version=5 -X-TDevelop-Language=Fortran -X-TDevelop-Args=pghpf diff --git a/languages/fortran/doc/CMakeLists.txt b/languages/fortran/doc/CMakeLists.txt index 423f4cbd..50e2ab71 100644 --- a/languages/fortran/doc/CMakeLists.txt +++ b/languages/fortran/doc/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES fortran_bugs_gcc.toc - DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation/tocs ) + DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation/tocs ) diff --git a/languages/fortran/doc/Makefile.am b/languages/fortran/doc/Makefile.am index b7f9a188..5e7eab51 100644 --- a/languages/fortran/doc/Makefile.am +++ b/languages/fortran/doc/Makefile.am @@ -1,4 +1,4 @@ -tocdir = ${kde_datadir}/tdevdocumentation/tocs +tocdir = ${kde_datadir}/kdevdocumentation/tocs toc_DATA = fortran_bugs_gcc.toc #indexdir = ${kde_datadir}/devdoctreeview/indices diff --git a/languages/fortran/file_templates/CMakeLists.txt b/languages/fortran/file_templates/CMakeLists.txt index b031bbdc..3b5ef22e 100644 --- a/languages/fortran/file_templates/CMakeLists.txt +++ b/languages/fortran/file_templates/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES f f77 f90 f95 for fpp ftn - DESTINATION ${DATA_INSTALL_DIR}/tdevfilecreate/file-templates ) + DESTINATION ${DATA_INSTALL_DIR}/kdevfilecreate/file-templates ) diff --git a/languages/fortran/file_templates/Makefile.am b/languages/fortran/file_templates/Makefile.am index d935b552..2a8e4365 100644 --- a/languages/fortran/file_templates/Makefile.am +++ b/languages/fortran/file_templates/Makefile.am @@ -1,2 +1,2 @@ -templatedir = $(kde_datadir)/tdevfilecreate/file-templates +templatedir = $(kde_datadir)/kdevfilecreate/file-templates template_DATA = f f77 f90 f95 for fpp ftn diff --git a/languages/fortran/fortransupportpart.cpp b/languages/fortran/fortransupportpart.cpp index c23a35f3..4f749ed3 100644 --- a/languages/fortran/fortransupportpart.cpp +++ b/languages/fortran/fortransupportpart.cpp @@ -31,29 +31,29 @@ #include #include #include -#include +#include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include -#include +#include -typedef TDevGenericFactory FortranSupportFactory; -static const TDevPluginInfo data("tdevfortransupport"); -K_EXPORT_COMPONENT_FACTORY( libtdevfortransupport, FortranSupportFactory( data ) ) +typedef KDevGenericFactory FortranSupportFactory; +static const KDevPluginInfo data("kdevfortransupport"); +K_EXPORT_COMPONENT_FACTORY( libkdevfortransupport, FortranSupportFactory( data ) ) FortranSupportPart::FortranSupportPart(TQObject *parent, const char *name, const TQStringList &) - : TDevLanguageSupport(&data, parent, name ? name : "FortranSupportPart") + : KDevLanguageSupport(&data, parent, name ? name : "FortranSupportPart") { setInstance(FortranSupportFactory::instance()); - setXMLFile("tdevfortransupport.rc"); + setXMLFile("kdevfortransupport.rc"); connect( core(), TQT_SIGNAL(projectConfigWidget(KDialogBase*)), this, TQT_SLOT(projectConfigWidget(KDialogBase*)) ); @@ -274,14 +274,14 @@ void FortranSupportPart::savedFile(const KURL &fileName) } -TDevLanguageSupport::Features FortranSupportPart::features() +KDevLanguageSupport::Features FortranSupportPart::features() { return Features(Functions); } -TDevMakeFrontend * FortranSupportPart::makeFrontend( ) +KDevMakeFrontend * FortranSupportPart::makeFrontend( ) { - return extension("TDevelop/MakeFrontend"); + return extension("TDevelop/MakeFrontend"); } #include "fortransupportpart.moc" diff --git a/languages/fortran/fortransupportpart.h b/languages/fortran/fortransupportpart.h index fe48e364..7ed0f122 100644 --- a/languages/fortran/fortransupportpart.h +++ b/languages/fortran/fortransupportpart.h @@ -15,12 +15,12 @@ class FixedFormParser; class KDialogBase; class TQStringList; -class TDevMakeFrontend; +class KDevMakeFrontend; -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" -class FortranSupportPart : public TDevLanguageSupport +class FortranSupportPart : public KDevLanguageSupport { Q_OBJECT @@ -30,7 +30,7 @@ public: ~FortranSupportPart(); protected: - virtual TDevLanguageSupport::Features features(); + virtual KDevLanguageSupport::Features features(); private slots: void slotFtnchek(); @@ -46,7 +46,7 @@ private slots: private: void maybeParse(const TQString fileName); - TDevMakeFrontend *makeFrontend(); + KDevMakeFrontend *makeFrontend(); FixedFormParser *parser; }; diff --git a/languages/fortran/kdevfortransupport.desktop b/languages/fortran/kdevfortransupport.desktop new file mode 100644 index 00000000..b6465210 --- /dev/null +++ b/languages/fortran/kdevfortransupport.desktop @@ -0,0 +1,80 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Fortran 77 Support +Comment[ca]=Suport per a Fortran 77 +Comment[da]=Fortran 77 understøttelse +Comment[de]=Unterstützung für Fortran 77 für TDevelop +Comment[el]=Υποστήριξη Fortran 77 +Comment[es]=Soporte para Fortran 77 +Comment[et]=Fortran 77 toetus +Comment[eu]=Fortran 77 euskarria +Comment[fa]=پشتیبانی فرترن ۷۷ +Comment[fr]=Prise en charge du langage Fortran77 +Comment[ga]=Tacaíocht Fortran 77 +Comment[gl]=Soporte para Fortran 77 +Comment[hi]=फ़ोरट्रॉन 77 समर्थन +Comment[hu]=Fortran 77-támogatás +Comment[is]=Fortran 77 stuðningur +Comment[it]=Supporto per Fortran 77 +Comment[ja]=Fortran 77 サポート +Comment[nds]=Ünnerstütten för Fortran 77 +Comment[ne]=फोर्ट्रान ७७ समर्थन +Comment[nl]=Ondersteuning voor Fortran 77 +Comment[pl]=Obsługa Fortrana 77 +Comment[pt]=Suporte a Fortran 77 +Comment[pt_BR]=Suporte ao Fortran 77 +Comment[ru]=Поддержка языка Fortran 77 +Comment[sk]=Fortran 77 podpora +Comment[sl]=Podpora za Fortran 77 +Comment[sr]=Подршка за Fortran 77 +Comment[sr@Latn]=Podrška za Fortran 77 +Comment[sv]=Fortran 77-stöd +Comment[ta]=பொர்ட்ரான் 77 ஆதரவு +Comment[tg]=Ёрӣ намудани забони 77 Support +Comment[tr]=Fortran 77 Desteği +Comment[zh_CN]=Fortran 77 支持 +Comment[zh_TW]=Fortran 77 支援 +Name=KDevFortranSupport +Name[da]=TDevelop Fortran77 understøttelse +Name[nds]=Fortran-Ünnerstütten för TDevelop +Name[pl]=KDevObsługaFortrana +Name[sk]=KDev Fortran podpora +Name[sv]=TDevelop Fortran-stöd +Name[zh_TW]=TDevelop Fortran 支援 +GenericName=Fortran 77 Support +GenericName[ca]=Suport per a Fortran 77 +GenericName[da]=Fortran 77 understøttelse +GenericName[de]=Unterstützung für Fortran 77 +GenericName[el]=Υποστήριξη Fortran 77 +GenericName[es]=Soporte para Fortran 77 +GenericName[et]=Fortran 77 toetus +GenericName[eu]=Fortran 77 euskarria +GenericName[fa]=پشتیبانی فرترن ۷۷ +GenericName[fr]=Prise en charge du langage Fortran 77 +GenericName[ga]=Tacaíocht Fortran 77 +GenericName[gl]=Soporte para Fortran 77 +GenericName[hi]=फ़ोरट्रॉन 77 समर्थन +GenericName[hu]=Fortran 77-támogatás +GenericName[it]=Supporto Fortran 77 +GenericName[ja]=Fortran 77 サポート +GenericName[nds]=Ünnerstütten för Fortran-77 +GenericName[ne]=फोर्ट्रान ७७ समर्थन +GenericName[nl]=Ondersteuning voor Fortran 77 +GenericName[pl]=Obsługa Fortrana 77 +GenericName[pt]=Suporte a Fortran 77 +GenericName[pt_BR]=Suporte ao Fortran 77 +GenericName[ru]=Поддержка языка Fortran 77 +GenericName[sk]=Fortran 77 podpora +GenericName[sl]=Podpora za Fortran 77 +GenericName[sr]=Подршка за Fortran 77 +GenericName[sr@Latn]=Podrška za Fortran 77 +GenericName[sv]=Fortran 77-stöd +GenericName[tg]=Ёрӣ намудани забони 77 Support +GenericName[tr]=Fortran 77 Desteği +GenericName[zh_CN]=Fortran 77 支持 +GenericName[zh_TW]=Fortran 77 支援 +ServiceTypes=TDevelop/LanguageSupport +X-TDE-Library=libkdevfortransupport +X-TDevelop-Version=5 +X-TDevelop-Language=Fortran77 diff --git a/languages/fortran/tdevfortransupport.rc b/languages/fortran/kdevfortransupport.rc similarity index 100% rename from languages/fortran/tdevfortransupport.rc rename to languages/fortran/kdevfortransupport.rc diff --git a/languages/fortran/tdevfortransupport.desktop b/languages/fortran/tdevfortransupport.desktop deleted file mode 100644 index d4da4cba..00000000 --- a/languages/fortran/tdevfortransupport.desktop +++ /dev/null @@ -1,80 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Fortran 77 Support -Comment[ca]=Suport per a Fortran 77 -Comment[da]=Fortran 77 understøttelse -Comment[de]=Unterstützung für Fortran 77 für TDevelop -Comment[el]=Υποστήριξη Fortran 77 -Comment[es]=Soporte para Fortran 77 -Comment[et]=Fortran 77 toetus -Comment[eu]=Fortran 77 euskarria -Comment[fa]=پشتیبانی فرترن ۷۷ -Comment[fr]=Prise en charge du langage Fortran77 -Comment[ga]=Tacaíocht Fortran 77 -Comment[gl]=Soporte para Fortran 77 -Comment[hi]=फ़ोरट्रॉन 77 समर्थन -Comment[hu]=Fortran 77-támogatás -Comment[is]=Fortran 77 stuðningur -Comment[it]=Supporto per Fortran 77 -Comment[ja]=Fortran 77 サポート -Comment[nds]=Ünnerstütten för Fortran 77 -Comment[ne]=फोर्ट्रान ७७ समर्थन -Comment[nl]=Ondersteuning voor Fortran 77 -Comment[pl]=Obsługa Fortrana 77 -Comment[pt]=Suporte a Fortran 77 -Comment[pt_BR]=Suporte ao Fortran 77 -Comment[ru]=Поддержка языка Fortran 77 -Comment[sk]=Fortran 77 podpora -Comment[sl]=Podpora za Fortran 77 -Comment[sr]=Подршка за Fortran 77 -Comment[sr@Latn]=Podrška za Fortran 77 -Comment[sv]=Fortran 77-stöd -Comment[ta]=பொர்ட்ரான் 77 ஆதரவு -Comment[tg]=Ёрӣ намудани забони 77 Support -Comment[tr]=Fortran 77 Desteği -Comment[zh_CN]=Fortran 77 支持 -Comment[zh_TW]=Fortran 77 支援 -Name=KDevFortranSupport -Name[da]=TDevelop Fortran77 understøttelse -Name[nds]=Fortran-Ünnerstütten för TDevelop -Name[pl]=KDevObsługaFortrana -Name[sk]=KDev Fortran podpora -Name[sv]=TDevelop Fortran-stöd -Name[zh_TW]=TDevelop Fortran 支援 -GenericName=Fortran 77 Support -GenericName[ca]=Suport per a Fortran 77 -GenericName[da]=Fortran 77 understøttelse -GenericName[de]=Unterstützung für Fortran 77 -GenericName[el]=Υποστήριξη Fortran 77 -GenericName[es]=Soporte para Fortran 77 -GenericName[et]=Fortran 77 toetus -GenericName[eu]=Fortran 77 euskarria -GenericName[fa]=پشتیبانی فرترن ۷۷ -GenericName[fr]=Prise en charge du langage Fortran 77 -GenericName[ga]=Tacaíocht Fortran 77 -GenericName[gl]=Soporte para Fortran 77 -GenericName[hi]=फ़ोरट्रॉन 77 समर्थन -GenericName[hu]=Fortran 77-támogatás -GenericName[it]=Supporto Fortran 77 -GenericName[ja]=Fortran 77 サポート -GenericName[nds]=Ünnerstütten för Fortran-77 -GenericName[ne]=फोर्ट्रान ७७ समर्थन -GenericName[nl]=Ondersteuning voor Fortran 77 -GenericName[pl]=Obsługa Fortrana 77 -GenericName[pt]=Suporte a Fortran 77 -GenericName[pt_BR]=Suporte ao Fortran 77 -GenericName[ru]=Поддержка языка Fortran 77 -GenericName[sk]=Fortran 77 podpora -GenericName[sl]=Podpora za Fortran 77 -GenericName[sr]=Подршка за Fortran 77 -GenericName[sr@Latn]=Podrška za Fortran 77 -GenericName[sv]=Fortran 77-stöd -GenericName[tg]=Ёрӣ намудани забони 77 Support -GenericName[tr]=Fortran 77 Desteği -GenericName[zh_CN]=Fortran 77 支持 -GenericName[zh_TW]=Fortran 77 支援 -ServiceTypes=TDevelop/LanguageSupport -X-TDE-Library=libtdevfortransupport -X-TDevelop-Version=5 -X-TDevelop-Language=Fortran77 diff --git a/languages/java/CMakeLists.txt b/languages/java/CMakeLists.txt index 546c6ac9..d3f7f5a7 100644 --- a/languages/java/CMakeLists.txt +++ b/languages/java/CMakeLists.txt @@ -35,20 +35,20 @@ link_directories( ##### other data ################################ -install( FILES tdevjavasupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevjavasupport.rc DESTINATION ${DATA_INSTALL_DIR}/tdevjavasupport ) +install( FILES kdevjavasupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevjavasupport.rc DESTINATION ${DATA_INSTALL_DIR}/kdevjavasupport ) -##### libtdevjavasupport (module) ############### +##### libkdevjavasupport (module) ############### -tde_add_kpart( libtdevjavasupport AUTOMOC +tde_add_kpart( libkdevjavasupport AUTOMOC SOURCES - JavaLexer.cpp TDevJavaSupportIface.cpp + JavaLexer.cpp KDevJavaSupportIface.cpp javasupportfactory.cpp JavaRecognizer.cpp backgroundparser.cpp configproblemreporter.ui javasupportpart.cpp JavaStoreWalker.cpp javasupport_utils.cpp problemreporter.cpp driver.cpp - tdevdriver.cpp TDevJavaSupportIface.skel - LINK antlr-static tdevcatalog-shared tdevelop-shared + kdevdriver.cpp KDevJavaSupportIface.skel + LINK antlr-static kdevcatalog-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/languages/java/KDevJavaSupportIface.cpp b/languages/java/KDevJavaSupportIface.cpp new file mode 100644 index 00000000..b1225700 --- /dev/null +++ b/languages/java/KDevJavaSupportIface.cpp @@ -0,0 +1,24 @@ + +#include "KDevJavaSupportIface.h" +#include "javasupportpart.h" + +KDevJavaSupportIface::KDevJavaSupportIface( JavaSupportPart* javaSupport ) + : TQObject( javaSupport ), DCOPObject( "KDevJavaSupport" ), m_javaSupport( javaSupport ) +{ +} + +KDevJavaSupportIface::~KDevJavaSupportIface() +{ +} + +void KDevJavaSupportIface::addClass() +{ + m_javaSupport->slotNewClass(); +} + +void KDevJavaSupportIface::parseProject() +{ + m_javaSupport->parseProject(); +} + +#include "KDevJavaSupportIface.moc" diff --git a/languages/java/KDevJavaSupportIface.h b/languages/java/KDevJavaSupportIface.h new file mode 100644 index 00000000..d0c4d441 --- /dev/null +++ b/languages/java/KDevJavaSupportIface.h @@ -0,0 +1,27 @@ + +#ifndef KDEVJAVASUPPORTIFACE_H +#define KDEVJAVASUPPORTIFACE_H + +#include +#include + +class JavaSupportPart; + +class KDevJavaSupportIface : public TQObject, public DCOPObject +{ + Q_OBJECT +// + K_DCOP +public: + KDevJavaSupportIface( JavaSupportPart* javaSupport ); + ~KDevJavaSupportIface(); + +k_dcop: + void addClass(); + void parseProject(); + +private: + JavaSupportPart* m_javaSupport; +}; + +#endif diff --git a/languages/java/Makefile.am b/languages/java/Makefile.am index 8e19da19..a1a1e812 100644 --- a/languages/java/Makefile.am +++ b/languages/java/Makefile.am @@ -10,13 +10,13 @@ INCLUDES = -I$(top_srcdir)/lib/antlr -I$(top_srcdir)/lib/catalog \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/interfaces/external -I$(top_srcdir)/lib/util \ $(all_includes) -kde_module_LTLIBRARIES = libtdevjavasupport.la -libtdevjavasupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevjavasupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/antlr/src/libantlr.la $(top_builddir)/lib/catalog/libtdevcatalog.la +kde_module_LTLIBRARIES = libkdevjavasupport.la +libkdevjavasupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevjavasupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/antlr/src/libantlr.la $(top_builddir)/lib/catalog/libkdevcatalog.la -libtdevjavasupport_la_SOURCES = JavaLexer.cpp TDevJavaSupportIface.cpp javasupportfactory.cpp \ +libkdevjavasupport_la_SOURCES = JavaLexer.cpp KDevJavaSupportIface.cpp javasupportfactory.cpp \ JavaRecognizer.cpp backgroundparser.cpp configproblemreporter.ui javasupportpart.cpp \ -JavaStoreWalker.cpp javasupport_utils.cpp problemreporter.cpp driver.cpp tdevdriver.cpp TDevJavaSupportIface.skel +JavaStoreWalker.cpp javasupport_utils.cpp problemreporter.cpp driver.cpp kdevdriver.cpp KDevJavaSupportIface.skel EXTRA_DIST = java.g java.tree.g java.store.g @@ -31,7 +31,7 @@ EXTRA_DIST = java.g java.tree.g java.store.g METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevjavasupport.desktop +service_DATA = kdevjavasupport.desktop -rcdir = $(kde_datadir)/tdevjavasupport -rc_DATA = tdevjavasupport.rc +rcdir = $(kde_datadir)/kdevjavasupport +rc_DATA = kdevjavasupport.rc diff --git a/languages/java/TDevJavaSupportIface.cpp b/languages/java/TDevJavaSupportIface.cpp deleted file mode 100644 index b9847558..00000000 --- a/languages/java/TDevJavaSupportIface.cpp +++ /dev/null @@ -1,24 +0,0 @@ - -#include "TDevJavaSupportIface.h" -#include "javasupportpart.h" - -TDevJavaSupportIface::TDevJavaSupportIface( JavaSupportPart* javaSupport ) - : TQObject( javaSupport ), DCOPObject( "TDevJavaSupport" ), m_javaSupport( javaSupport ) -{ -} - -TDevJavaSupportIface::~TDevJavaSupportIface() -{ -} - -void TDevJavaSupportIface::addClass() -{ - m_javaSupport->slotNewClass(); -} - -void TDevJavaSupportIface::parseProject() -{ - m_javaSupport->parseProject(); -} - -#include "TDevJavaSupportIface.moc" diff --git a/languages/java/TDevJavaSupportIface.h b/languages/java/TDevJavaSupportIface.h deleted file mode 100644 index 9732ca51..00000000 --- a/languages/java/TDevJavaSupportIface.h +++ /dev/null @@ -1,27 +0,0 @@ - -#ifndef TDEVJAVASUPPORTIFACE_H -#define TDEVJAVASUPPORTIFACE_H - -#include -#include - -class JavaSupportPart; - -class TDevJavaSupportIface : public TQObject, public DCOPObject -{ - Q_OBJECT -// - K_DCOP -public: - TDevJavaSupportIface( JavaSupportPart* javaSupport ); - ~TDevJavaSupportIface(); - -k_dcop: - void addClass(); - void parseProject(); - -private: - JavaSupportPart* m_javaSupport; -}; - -#endif diff --git a/languages/java/app_templates/CMakeLists.txt b/languages/java/app_templates/CMakeLists.txt index 34cc305c..f7e7d242 100644 --- a/languages/java/app_templates/CMakeLists.txt +++ b/languages/java/app_templates/CMakeLists.txt @@ -10,7 +10,7 @@ ################################################# add_subdirectory( javahello ) -add_subdirectory( tdeappjava ) +add_subdirectory( kappjava ) add_subdirectory( superwaba ) install( FILES diff --git a/languages/java/app_templates/Makefile.am b/languages/java/app_templates/Makefile.am index f30aefdb..fe3931a3 100644 --- a/languages/java/app_templates/Makefile.am +++ b/languages/java/app_templates/Makefile.am @@ -1,3 +1,3 @@ -SUBDIRS = javahello tdeappjava superwaba +SUBDIRS = javahello kappjava superwaba profilesdir = $(kde_datadir)/tdevelop/profiles/IDE/CompiledLanguageIDE/JavaIDE profiles_DATA = java.appwizard diff --git a/languages/java/app_templates/java.appwizard b/languages/java/app_templates/java.appwizard index f4f8d6ba..087d6c0c 100644 --- a/languages/java/app_templates/java.appwizard +++ b/languages/java/app_templates/java.appwizard @@ -1,2 +1,2 @@ [General] -List=javahello,tdeappjava,superwaba +List=javahello,kappjava,superwaba diff --git a/languages/java/app_templates/javahello/CMakeLists.txt b/languages/java/app_templates/javahello/CMakeLists.txt index 04fd4963..8129bbc1 100644 --- a/languages/java/app_templates/javahello/CMakeLists.txt +++ b/languages/java/app_templates/javahello/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( javahello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/javahello.tar.gz javahello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - javahello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + javahello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/java/app_templates/javahello/Makefile.am b/languages/java/app_templates/javahello/Makefile.am index e3e3be27..f47e7056 100644 --- a/languages/java/app_templates/javahello/Makefile.am +++ b/languages/java/app_templates/javahello/Makefile.am @@ -2,10 +2,10 @@ dataFiles = Main.java build.xml javahello.filelist javahello.tdevelop templateName= javahello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/java/app_templates/javahello/javahello.filelist b/languages/java/app_templates/javahello/javahello.filelist index b9ce43ab..97da44be 100644 --- a/languages/java/app_templates/javahello/javahello.filelist +++ b/languages/java/app_templates/javahello/javahello.filelist @@ -1,2 +1,2 @@ -# TDevelop Custom Project File List +# KDevelop Custom Project File List Main.java diff --git a/languages/java/app_templates/javahello/javahello.tdevtemplate b/languages/java/app_templates/javahello/javahello.kdevtemplate similarity index 100% rename from languages/java/app_templates/javahello/javahello.tdevtemplate rename to languages/java/app_templates/javahello/javahello.kdevtemplate diff --git a/languages/java/app_templates/javahello/javahello.tdevelop b/languages/java/app_templates/javahello/javahello.tdevelop index ade81a9a..a41fae72 100644 --- a/languages/java/app_templates/javahello/javahello.tdevelop +++ b/languages/java/app_templates/javahello/javahello.tdevelop @@ -7,15 +7,15 @@ KDevAntProject Java - TDevDebugger + KDevDebugger - + ant - - + + ada ada_bugs_gcc @@ -59,11 +59,11 @@ KDE Libraries (Doxygen) - - + + false *.o,*.lo,CVS - + diff --git a/languages/java/app_templates/kappjava/CMakeLists.txt b/languages/java/app_templates/kappjava/CMakeLists.txt new file mode 100644 index 00000000..042872fd --- /dev/null +++ b/languages/java/app_templates/kappjava/CMakeLists.txt @@ -0,0 +1,26 @@ +################################################# +# +# (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( kappjava.tar.gz ALL + COMMAND tar zcf kappjava.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} + app.java pref.java appview.java app_client.java appui.rc + src-Makefile.am kappjava.png app.tdevelop subdirs +) + + +install( FILES + ${CMAKE_CURRENT_BINARY_DIR}/kappjava.tar.gz kappjava.png + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) + + +install( FILES + kappjava.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/java/app_templates/kappjava/Makefile.am b/languages/java/app_templates/kappjava/Makefile.am new file mode 100644 index 00000000..edbd4468 --- /dev/null +++ b/languages/java/app_templates/kappjava/Makefile.am @@ -0,0 +1,17 @@ +dataFiles = app.java pref.java appview.java app_client.java appui.rc \ + src-Makefile.am kappjava.png app.tdevelop subdirs +templateName = kappjava + +### 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/java/app_templates/tdeappjava/app.desktop b/languages/java/app_templates/kappjava/app.desktop similarity index 100% rename from languages/java/app_templates/tdeappjava/app.desktop rename to languages/java/app_templates/kappjava/app.desktop diff --git a/languages/java/app_templates/tdeappjava/app.java b/languages/java/app_templates/kappjava/app.java similarity index 100% rename from languages/java/app_templates/tdeappjava/app.java rename to languages/java/app_templates/kappjava/app.java diff --git a/languages/java/app_templates/kappjava/app.tdevelop b/languages/java/app_templates/kappjava/app.tdevelop new file mode 100644 index 00000000..7ee74558 --- /dev/null +++ b/languages/java/app_templates/kappjava/app.tdevelop @@ -0,0 +1,88 @@ + + + + %{AUTHOR} + %{EMAIL} + %{VERSION} + KDevAutoProject + Java + + Java + Code + Qt + KDE + + + + + src/java + + + src/%{APPNAMELC} + + + + + + + + + + + + + + + + + + ada + ada_bugs_gcc + bash + bash_bugs + c++_bugs_gcc + clanlib + w3c-dom-level2-html + fortran_bugs_gcc + gnome1 + gnustep + gtk + gtk_bugs + haskell + haskell_bugs_ghc + libc + libstdc++ + opengl + pascal_bugs_fp + php + php_bugs + perl + perl_bugs + python + python_bugs + ruby + ruby_bugs + sdl + stl + w3c-svg + sw + w3c-uaag10 + wxwidgets_bugs + + + Guide to the Qt Translation Tools + Qt Assistant Manual + Qt Designer Manual + Qt Reference Documentation + qmake User Guide + + + KDE Libraries (Doxygen) + + + + + + + + diff --git a/languages/java/app_templates/tdeappjava/app_client.java b/languages/java/app_templates/kappjava/app_client.java similarity index 100% rename from languages/java/app_templates/tdeappjava/app_client.java rename to languages/java/app_templates/kappjava/app_client.java diff --git a/languages/java/app_templates/tdeappjava/appui.rc b/languages/java/app_templates/kappjava/appui.rc similarity index 100% rename from languages/java/app_templates/tdeappjava/appui.rc rename to languages/java/app_templates/kappjava/appui.rc diff --git a/languages/java/app_templates/tdeappjava/appview.java b/languages/java/app_templates/kappjava/appview.java similarity index 100% rename from languages/java/app_templates/tdeappjava/appview.java rename to languages/java/app_templates/kappjava/appview.java diff --git a/languages/java/app_templates/kappjava/kappjava b/languages/java/app_templates/kappjava/kappjava new file mode 100644 index 00000000..e199ac25 --- /dev/null +++ b/languages/java/app_templates/kappjava/kappjava @@ -0,0 +1,10 @@ +# KDE Config File +[General] +Name=Application framework +Name[fr]=Squelette d'application +Icon=kappjava.png +Category=Java/KDE +Comment=Generates a simple Java KDE application with one toplevel window, menus and toolbars. +Comment[fr]=Gnre une simple application KDE dans le language JAVA avec une fentre principale, des menus, et des barres d'outils. +FileTemplates=java,CStyle +ShowFilesAfterGeneration=src/APPNAMEView.java diff --git a/languages/java/app_templates/kappjava/kappjava.kdevtemplate b/languages/java/app_templates/kappjava/kappjava.kdevtemplate new file mode 100644 index 00000000..92cf4710 --- /dev/null +++ b/languages/java/app_templates/kappjava/kappjava.kdevtemplate @@ -0,0 +1,163 @@ +# KDE Config File +[General] +Name=Application framework +Name[ca]=Infraestructura d'aplicacions +Name[da]=Programskelet +Name[de]=Anwendungsgrundgerüst +Name[el]=Πλαίσιο εφαρμογής +Name[es]=Infraestructura de aplicación +Name[et]=Rakenduse raamistik +Name[eu]=Aplikazioen lan-markoa +Name[fa]=چارچوب کاربرد +Name[fr]=Infrastructure d'application +Name[ga]=Creatlach feidhmchláir +Name[gl]=Entorno de traballo para aplicación +Name[hu]=Alkalmazás-keretrendszer +Name[it]=Infrastruttura applicativa +Name[ja]=アプリケーションフレームワーク +Name[nds]=Programmrahmenwark +Name[ne]=अनुप्रयोग फ्रेमवर्क +Name[nl]=Applicationframework +Name[pl]=Szablon programu +Name[pt]=Plataforma de aplicações +Name[pt_BR]=Plataforma de aplicações +Name[ru]=Приложение KDE +Name[sk]=Aplikačný framework +Name[sl]=Ogrodje programa +Name[sr]=Радни оквир програма +Name[sr@Latn]=Radni okvir programa +Name[sv]=Programramverk +Name[tr]=Uygulama Çatısı +Name[zh_CN]=应用程序框架 +Name[zh_TW]=應用程式框架 +Icon=kappjava.png +Category=Java/KDE +Comment=Generates a simple Java KDE application with one toplevel window, menus and toolbars. +Comment[ca]=Genera una simple aplicació per al KDE en Java amb una finestra principal, menús i barres d'eines. +Comment[da]=Genererer et simpelt Java KDE program med et vindue på topniveau, menuer og værktøjslinjer. +Comment[de]=Erstellt eine einfache Java-KDE-Anwendung mit einem Toplevel-Fenster, Menüs und Werkzeugleisten. +Comment[el]=Δημιουργεί μια απλή εφαρμογή Java του KDE με ένα ανώτερο παράθυρο, μενού, και γραμμές εργαλείων. +Comment[es]=Genera una sencilla aplicación para KDE en Java, con una ventana principal, menús y barras de herramientas. +Comment[et]=Lihtsa Java KDE rakenduse loomine ühe tipptaseme akna, menüüde ja tööriistaribadega. +Comment[eu]=Goi-mailako lehio bat, menuak eta tresna-barrak dituen Java KDE aplikazio bat sortzen du. +Comment[fa]=یک کاربرد سادۀ KDE جاوا با یک پنجرۀ سطح بالا، گزینگان و میله‌های ابزار تولید می‌کند. +Comment[fr]=Génère une application KDE simple en Java comprenant une fenêtre de premier niveau, des menus et des barres d'outils. +Comment[gl]=Xera unha aplicación sinxela KDE en Java cunha xanela principal, menús e barras de ferramentas. +Comment[hu]=Létrehoz egy egyszerű Java-alapú KDE-alkalmazást egy főablakkal, menükkel és eszköztárakkal. +Comment[it]=Genera una semplice applicazione KDE Java con una finestra toplevel, menu e barre degli strumenti. +Comment[nds]=Stellt en eenfach KDE-Programm in Java mit een böverst Finster, Menüs un Warktüüchbalkens op. +Comment[ne]=एउटा उच्चतह सञ्झ्याल, मेनु र उपकरणपट्टीसँग साधारण जाभा केडीई अनुप्रयोग उत्पन्न गर्दछ । +Comment[nl]=Genereert een eenvoudige Java KDE-toepassing met een toplevel window, menu's en toolbars. +Comment[pl]=Generuje prosty program KDE w Javie posiadający okno, menu i paski narzędzi. +Comment[pt]=Gera uma aplicação para KDE simples em Java, com uma janela de topo, menus e barras de ferramentas. +Comment[pt_BR]=Gera uma aplicação para KDE simples em Java, com uma janela de topo, menus e barras de ferramentas. +Comment[ru]=Создание простого приложения Java KDE с окном, меню и панелями инструментов. +Comment[sk]=Vygeneruje jednoduchú Java KDE aplikáciu s jedným oknom, menu a panelom nástrojov. +Comment[sr]=Прави једноставан Java KDE програм са једним прозором највишег нивоа, менијима и тракама са алатом. +Comment[sr@Latn]=Pravi jednostavan Java KDE program sa jednim prozorom najvišeg nivoa, menijima i trakama sa alatom. +Comment[sv]=Skapar ett enkelt Java KDE-program med ett toppnivåfönster, menyer och verktygsrader. +Comment[tr]=Bir üst seviye penceresi, menüleri ve araç çubukları olan basit bir Java KDE uygulaması yaratır. +Comment[zh_CN]=生成一个简单的带有顶级窗口、菜单和工具栏的 Java KDE 应用程序。 +Comment[zh_TW]=產生一個簡單的 Java KDE 應用程式,內含頂層視窗、選單與工具列。 +FileTemplates=java,CStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAME}View.java +Archive=kappjava.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[DOCBOOK] +Type=include +File=%{tdevelop}/template-common/dockbook.kdevtemplate + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/tde-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/tde-app.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[FILE10] +Type=install +Source=%{tdevelop}/template-common/hi16-app-app.png +Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png +Process=false + +[FILE11] +Type=install +Source=%{tdevelop}/template-common/hi32-app-app.png +Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png +Process=false + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE12] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE13] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE14] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE15] +Type=install +Source=%{src}/app.java +Dest=%{dest}/src/%{APPNAME}.java + +[FILE16] +Type=install +Source=%{src}/appview.java +Dest=%{dest}/src/%{APPNAME}View.java + +[FILE17] +Type=install +Source=%{src}/pref.java +Dest=%{dest}/src/%{APPNAME}Preferences.java + +[FILE18] +Type=install +Source=%{src}/appui.rc +Dest=%{dest}/src/%{APPNAMELC}ui.rc + diff --git a/languages/java/app_templates/tdeappjava/tdeappjava.png b/languages/java/app_templates/kappjava/kappjava.png similarity index 100% rename from languages/java/app_templates/tdeappjava/tdeappjava.png rename to languages/java/app_templates/kappjava/kappjava.png diff --git a/languages/java/app_templates/tdeappjava/pref.java b/languages/java/app_templates/kappjava/pref.java similarity index 100% rename from languages/java/app_templates/tdeappjava/pref.java rename to languages/java/app_templates/kappjava/pref.java diff --git a/languages/java/app_templates/tdeappjava/src-Makefile.am b/languages/java/app_templates/kappjava/src-Makefile.am similarity index 100% rename from languages/java/app_templates/tdeappjava/src-Makefile.am rename to languages/java/app_templates/kappjava/src-Makefile.am diff --git a/languages/java/app_templates/tdeappjava/subdirs b/languages/java/app_templates/kappjava/subdirs similarity index 100% rename from languages/java/app_templates/tdeappjava/subdirs rename to languages/java/app_templates/kappjava/subdirs diff --git a/languages/java/app_templates/superwaba/CMakeLists.txt b/languages/java/app_templates/superwaba/CMakeLists.txt index ea9517be..58932352 100644 --- a/languages/java/app_templates/superwaba/CMakeLists.txt +++ b/languages/java/app_templates/superwaba/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( superwaba.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/superwaba.tar.gz superwaba.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - superwaba.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + superwaba.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/java/app_templates/superwaba/Makefile.am b/languages/java/app_templates/superwaba/Makefile.am index c9c6aa99..bc706fe6 100644 --- a/languages/java/app_templates/superwaba/Makefile.am +++ b/languages/java/app_templates/superwaba/Makefile.am @@ -2,10 +2,10 @@ dataFiles = superwaba.png sw.java src-Makefile sw.tdevelop sw.filelist templateName = superwaba ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/java/app_templates/superwaba/superwaba.kdevtemplate b/languages/java/app_templates/superwaba/superwaba.kdevtemplate new file mode 100644 index 00000000..27257770 --- /dev/null +++ b/languages/java/app_templates/superwaba/superwaba.kdevtemplate @@ -0,0 +1,166 @@ +# KDE Config File +[General] +Name=SuperWaba +Name[ne]=सुपरवाभा +Icon=superwaba.png +Category=Java +Comment=A simple template for building SuperWaba Java based apps on WinCE and PalmOS. More information can be found at http://www.superwaba.org +Comment[ca]=Una simple plantilla per a construir aplicacions basades en SuperWaba Java per a WinCE i PalmOS. Podeu trobar més informació a http://www.superwaba.org +Comment[da]=En simpel skabelon til at bygge SuperWaba Java baserede programmer på WinCE og PalmOS. Mere information kan findes på http://www.superwaba.org +Comment[de]=Eine einfache Vorlage zum Erstellen von auf Java basierenden SuperWaba-Anwendungen unter WinCE und PalmOS. Weitere Informationen erhalten Sie auf http://www.superwaba.org. +Comment[el]=Ένα απλό πρότυπο για την κατασκευή εφαρμογών SuperWaba Java για τα WinCE και PalmOS. Περισσότερες πληροφορίες μπορούν να βρεθούν στο http://www.superwaba.org +Comment[es]=Una plantilla sencilla para crear aplicaciones basadas en SuperWaba Java para WinCE y PalmOS. Puede encontrar más información en http://www.superwaba.org +Comment[et]=Lihtne mall rakenduste loomiseks SuperWaba Java põhjal WinCE ja PalmOS'i tarbeks. Rohkem infot annab http://www.superwaba.org +Comment[eu]=WinCE eta PalmOS sistema eragileetan SuperWaba Javan oinarritutako aplikazioak sortzeko txantiloi sinple bat. Informazio gehiagorako: http://www.superwaba.org +Comment[fa]=یک قالب ساده برای ساختن کاربردهای بر مبنای SuperWaba جاوا روی WinCE و PalmOS. اطلاعات بیشتر می‌تواند در http://www.superwaba.org یافت شود +Comment[fr]=Un modèle simple pour construire des applications basées sur Java SuperWaba pour WinCE et PalmOS. Vous trouverez plus d'informations sur http://www.superwaba.org +Comment[gl]=Un modelo sinxelo para crear aplicacións SuperWaba baseadas en Java para WinCE e PalmOS. Pode atopar máis información en http://www.superwaba.org +Comment[hu]=Egyszerű sablon SuperWaba Java-alkalmazások készítéséhez, WinCE és PalmOS platformra. Részletes információ itt található: http://www.superwaba.org +Comment[it]=Un semplice modello per compilare applicazioni Java SuperWaba basato su WinCE e PalmOS. Ulteriori informazioni possono essere trovate visitando http://www.superwaba.org/ +Comment[nds]=En eenfach Vörlaag för't Opstellen vun op WinCE un PalmOS opbuut SuperWaba-Programmen. Mehr Informatschonen laat sik op http://www.superwaba.org finnen +Comment[ne]=WinCE र PalmOS मा सुपरवाभा जाभा आधारित अनुप्रयोग निर्माणका लागि साधारण टेम्प्लेट । बढी जानकारी http://www.superwaba.org मा फेला पार्न सकिन्छ । +Comment[nl]=Een eenvouidg sjabloon voor het bouwen van SuperWaba Java-gebaseerde toepassingen op WinCE en PalmOS. Meer informatie vindt u op http://www.superwaba.org. +Comment[pl]=Prosty szablon do budowania programów w Javie wykorzystujących SuperWaba w środowiskach WinCE oraz PalmOS. Więcej informacji można znaleźć na stronie http://www.superwaba.org +Comment[pt]=Um modelo simples para criara aplicações Java, baseadas no SuperWaba, para o WinCE e o PalmOS. Poderá encontrar mais informações em http://www.superwaba.org +Comment[pt_BR]=Um modelo simples para criara aplicações Java, baseadas no SuperWaba, para o WinCE e o PalmOS. Poderá encontrar mais informações em http://www.superwaba.org +Comment[ru]=Создание приложения SuperWaba Java для устройств WinCE и PalmOS. Дополнительную информацию можно найти на http://www.superwaba.org +Comment[sk]=Jednoduchá šablóna pre vytváranie SuperWaba Java Aplikácií na WinCE a PalmOS. Viac informácií môžte nájsť na http://www.superwaba.org +Comment[sr]=Једноставан шаблон за градњу SuperWaba програма на основу Java-е, за WinCE и PalmOS. Више информација на http://www.superwaba.org +Comment[sr@Latn]=Jednostavan šablon za gradnju SuperWaba programa na osnovu Java-e, za WinCE i PalmOS. Više informacija na http://www.superwaba.org +Comment[sv]=En enkel mall för att bygga SuperWaba Java-baserade program på WinCE och PalmOS. Mer information hittas på http://www.superwaba.org. +Comment[tr]=WinCE ve PalmOS üstünde SuperWaba tabanlı Java uygulamarı yapmak için basit bir şablon. Daha fazla bilgi http://www.superwaba.org/ adresinde bulunabilir. +Comment[zh_CN]=在 WinCE 和 PalmOS 上构建基于 SuperWaba Java 应用程序的简单模板。更多信息可以在 http://www.superwaba.org 找到 +Comment[zh_TW]=一個簡單的建立在 WinCE 與 PalmOS 上執行的 SuperWaba Java 應用程式。您可以在 http://www.superwaba.org 取得更多資訊。 +FileTemplates=java +ShowFilesAfterGeneration=%{dest}/%{APPNAME}.java +Archive=superwaba.tar.gz + +[JAVA] +Type=value +Value=JAVA +Comment=Path to your java root +Comment[ca]=Ruta cap a la vostra arrel Java +Comment[da]=Sti til din java-rod +Comment[de]=Pfad zum Stammordner von Java +Comment[el]=Διαδρομή στο κατάλογό σας της java +Comment[es]=Ruta a su carpeta raíz Java +Comment[et]=Java juurkataloogi asukoht +Comment[eu]=Zure java erroaren bide-izena +Comment[fa]=مسیر ریشۀ جاوای شما +Comment[fr]=Chemin vers votre racine Java +Comment[gl]=Ruta a súa instalación de java +Comment[hu]=A Java-alapkönyvtár elérési útja +Comment[it]=Percorso alla radice java +Comment[ja]=Java ルートへのパス +Comment[nds]=Padd na Dien Java-Wörtelorner +Comment[ne]=तपाईँको जाभा रूटको मार्ग +Comment[nl]=Pad naar uw Java-hoofdmap +Comment[pl]=Ścieżka do głównego katalogu Javy +Comment[pt]=A localização de base do seu Java +Comment[pt_BR]=A localização de base do seu Java +Comment[ru]=Путь к корневому каталогу Java +Comment[sk]=Cesta ku java koreňu +Comment[sr]=Путања до вашег корена Java-е +Comment[sr@Latn]=Putanja do vašeg korena Java-e +Comment[sv]=Sökväg till Java-rotkatalog +Comment[zh_CN]=您的 Java 根路径 +Comment[zh_TW]=您的 java 根路徑 +Default=/usr/lib/java +ValueType=QString + +[WABA] +Type=value +Value=WABA +Comment=Path to your SuperWaba root +Comment[ca]=Ruta cap a la vostra arrel SuperWaba +Comment[da]=Sti til din SuperWaba-rod +Comment[de]=Pfad zum Stammordner von SuperWaba +Comment[el]=Διαδρομή στο κατάλογό σας της SuperWaba +Comment[es]=Ruta a su carpeta raíz de SuperWaba +Comment[et]=SuperWaba juurkataloogi asukoht +Comment[eu]=Zure SuperWaba erroaren bide-izena +Comment[fa]=مسیر ریشۀ SuperWaba شما +Comment[fr]=Chemin vers votre racine SuperWaba +Comment[gl]=Ruta a súa instalación de SuperWaba +Comment[hu]=A SuperWaba-alapkönyvtár elérési útja +Comment[it]=Percorso alla radice SuperWaba +Comment[ja]=SuperWaba ルートへのパス +Comment[nds]=Padd na Dien SuperWaba-Wörtelorner +Comment[ne]=तपाईँको सुपरवाभा रूटको मार्ग +Comment[nl]=Pad naar uw SuperWaba-hoofdmap +Comment[pl]=Ścieżka do głównego katalogu SuperWaba +Comment[pt]=A localização de base do seu SuperWaba +Comment[pt_BR]=A localização de base do seu SuperWaba +Comment[ru]=Путь к корневому каталогу SuperWaba +Comment[sk]=Cesta ku SuperWaba koreňu +Comment[sr]=Путања до вашег корена SuperWaba-е +Comment[sr@Latn]=Putanja do vašeg korena SuperWaba-e +Comment[sv]=Sökväg till SuperWaba-rotkatalog +Comment[tr]=SuperWaba kök dizininizin yolu +Comment[zh_CN]=您的 SuperWaba 根路径 +Comment[zh_TW]=您的 SuperWaba 根路徑 +Default=/usr/lib +ValueType=QString + +[GNU] +Type=install archive +Source=%{tdevelop}/template-common/gnu.tar.gz +Dest=%{dest} + +[PROJECT] +Type=install +EscapeXML=true +Source=%{src}/sw.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILELIST] +Type=install +Source=%{src}/sw.filelist +Dest=%{dest}/%{APPNAMELC}.filelist + +[MAKEFILE] +Type=install +Source=%{src}/src-Makefile +Dest=%{dest}/Makefile + +[SOURCE] +Type=install +Source=%{src}/sw.java +Dest=%{dest}/%{APPNAME}.java + +[MESSAGE] +Type=Message +Comment=Your application is setup to build. Edit the make targets to customize the file. +Comment[ca]=La vostra aplicació està llesta per a ser construïda. Editeu els objectius de make per a personalitzar el fitxer. +Comment[da]=Dit program er parat til at blive bygget. Redigér make targets for at indstille filen. +Comment[de]=Ihre Anwendung ist bereit für das Erstellen. Bearbeiten Sie die Make-Targets, um die Datei an Ihre Bedürfnisse anzupassen. +Comment[el]=Η εφαρμογή σας έχει ρυθμιστεί για κατασκευή. Επεξεργαστείτε τους προορισμούς κατασκευής για την προσαρμογή του αρχείου. +Comment[en_GB]=Your application is setup to build. Edit the make targets to customise the file. +Comment[es]=Su aplicación está lista para ser construída. Edite los objetivos make para personalizar el archivo. +Comment[et]=Rakendus on ehitamiseks valmis. Faili kohandamiseks redigeeri ehitamise sihtmärke. +Comment[eu]=Zure aplikazioa eraikitzeko konfiguratu da. Editatu make-en helburuak fitxategia pertsonalizatzeko. +Comment[fa]=کاربرد شما برای ساختن برپا می‌شود. برای سفارشی کردن پرونده، هدفهای make را ویرایش کنید. +Comment[fr]=Votre application est prête à être construite. Modifiez les cibles de « make » pour personnaliser le fichier. +Comment[gl]=A súa aplicación esta configurada para compilar. Edite os obxectivos make para persoalizalo ficheiro. +Comment[hu]=Az alkalmazás készen áll a lefordításra. A make-célpontok szerkeszthetők, ha szükséges. +Comment[it]=L'applicazione è configurata per compilare. Modifica i target di make per personalizzare il file. +Comment[nds]=Dien Programm kann opstellt warrn. Bewerk de "Make"-Telen för't Topassen vun de Datei. +Comment[ne]=तपाईँको अनुप्रयोग निर्माण गर्नका लागि सेटअप भएको छ । फाइललाई अनुकूल गर्नका लागि मेक तार्गेटलाई सम्पादन गर्नुहोस् । +Comment[nl]=Uw toepassing kan worden gebouwd. Bewerk de make targets om het bestand naar eigen inzicht aan te passen. +Comment[pl]=Program skonfigurowany. Dostosowanie pliku do własnych potrzeb jest możliwe przez modyfikację celów make. +Comment[pt]=A sua aplicação está preparada para ser compilada. Edite os alvos do 'make' para personalizar o ficheiro. +Comment[pt_BR]=A sua aplicação está preparada para ser compilada. Edite os alvos do 'make' para personalizar o ficheiro. +Comment[ru]=Ваше приложение готово для сборки. +Comment[sk]=Aplikácia je pripravená na build. Môžte si prispôsobiť make ciele. +Comment[sr]=Ваш програм је спреман за градњу. Уредите циљеве справљача да бисте прилагодили фајл. +Comment[sr@Latn]=Vaš program je spreman za gradnju. Uredite ciljeve spravljača da biste prilagodili fajl. +Comment[sv]=Programmet är inställt att byggas. Redigera byggmålen för att anpassa filen. +Comment[tr]=Uygulamanız derlenmeye hazır. Dosyayı özelleştirmek için make hedeflerini düzenleyin. +Comment[zh_CN]=您的应用程序已设置为构建。编辑 make 目标可自定义文件。 +Comment[zh_TW]=您的應用程式已設定好可建立了。請編輯 make 目標來調整檔案。 +Archive=superwaba.tar.gz + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + diff --git a/languages/java/app_templates/superwaba/superwaba.tdevtemplate b/languages/java/app_templates/superwaba/superwaba.tdevtemplate deleted file mode 100644 index e792af35..00000000 --- a/languages/java/app_templates/superwaba/superwaba.tdevtemplate +++ /dev/null @@ -1,166 +0,0 @@ -# KDE Config File -[General] -Name=SuperWaba -Name[ne]=सुपरवाभा -Icon=superwaba.png -Category=Java -Comment=A simple template for building SuperWaba Java based apps on WinCE and PalmOS. More information can be found at http://www.superwaba.org -Comment[ca]=Una simple plantilla per a construir aplicacions basades en SuperWaba Java per a WinCE i PalmOS. Podeu trobar més informació a http://www.superwaba.org -Comment[da]=En simpel skabelon til at bygge SuperWaba Java baserede programmer på WinCE og PalmOS. Mere information kan findes på http://www.superwaba.org -Comment[de]=Eine einfache Vorlage zum Erstellen von auf Java basierenden SuperWaba-Anwendungen unter WinCE und PalmOS. Weitere Informationen erhalten Sie auf http://www.superwaba.org. -Comment[el]=Ένα απλό πρότυπο για την κατασκευή εφαρμογών SuperWaba Java για τα WinCE και PalmOS. Περισσότερες πληροφορίες μπορούν να βρεθούν στο http://www.superwaba.org -Comment[es]=Una plantilla sencilla para crear aplicaciones basadas en SuperWaba Java para WinCE y PalmOS. Puede encontrar más información en http://www.superwaba.org -Comment[et]=Lihtne mall rakenduste loomiseks SuperWaba Java põhjal WinCE ja PalmOS'i tarbeks. Rohkem infot annab http://www.superwaba.org -Comment[eu]=WinCE eta PalmOS sistema eragileetan SuperWaba Javan oinarritutako aplikazioak sortzeko txantiloi sinple bat. Informazio gehiagorako: http://www.superwaba.org -Comment[fa]=یک قالب ساده برای ساختن کاربردهای بر مبنای SuperWaba جاوا روی WinCE و PalmOS. اطلاعات بیشتر می‌تواند در http://www.superwaba.org یافت شود -Comment[fr]=Un modèle simple pour construire des applications basées sur Java SuperWaba pour WinCE et PalmOS. Vous trouverez plus d'informations sur http://www.superwaba.org -Comment[gl]=Un modelo sinxelo para crear aplicacións SuperWaba baseadas en Java para WinCE e PalmOS. Pode atopar máis información en http://www.superwaba.org -Comment[hu]=Egyszerű sablon SuperWaba Java-alkalmazások készítéséhez, WinCE és PalmOS platformra. Részletes információ itt található: http://www.superwaba.org -Comment[it]=Un semplice modello per compilare applicazioni Java SuperWaba basato su WinCE e PalmOS. Ulteriori informazioni possono essere trovate visitando http://www.superwaba.org/ -Comment[nds]=En eenfach Vörlaag för't Opstellen vun op WinCE un PalmOS opbuut SuperWaba-Programmen. Mehr Informatschonen laat sik op http://www.superwaba.org finnen -Comment[ne]=WinCE र PalmOS मा सुपरवाभा जाभा आधारित अनुप्रयोग निर्माणका लागि साधारण टेम्प्लेट । बढी जानकारी http://www.superwaba.org मा फेला पार्न सकिन्छ । -Comment[nl]=Een eenvouidg sjabloon voor het bouwen van SuperWaba Java-gebaseerde toepassingen op WinCE en PalmOS. Meer informatie vindt u op http://www.superwaba.org. -Comment[pl]=Prosty szablon do budowania programów w Javie wykorzystujących SuperWaba w środowiskach WinCE oraz PalmOS. Więcej informacji można znaleźć na stronie http://www.superwaba.org -Comment[pt]=Um modelo simples para criara aplicações Java, baseadas no SuperWaba, para o WinCE e o PalmOS. Poderá encontrar mais informações em http://www.superwaba.org -Comment[pt_BR]=Um modelo simples para criara aplicações Java, baseadas no SuperWaba, para o WinCE e o PalmOS. Poderá encontrar mais informações em http://www.superwaba.org -Comment[ru]=Создание приложения SuperWaba Java для устройств WinCE и PalmOS. Дополнительную информацию можно найти на http://www.superwaba.org -Comment[sk]=Jednoduchá šablóna pre vytváranie SuperWaba Java Aplikácií na WinCE a PalmOS. Viac informácií môžte nájsť na http://www.superwaba.org -Comment[sr]=Једноставан шаблон за градњу SuperWaba програма на основу Java-е, за WinCE и PalmOS. Више информација на http://www.superwaba.org -Comment[sr@Latn]=Jednostavan šablon za gradnju SuperWaba programa na osnovu Java-e, za WinCE i PalmOS. Više informacija na http://www.superwaba.org -Comment[sv]=En enkel mall för att bygga SuperWaba Java-baserade program på WinCE och PalmOS. Mer information hittas på http://www.superwaba.org. -Comment[tr]=WinCE ve PalmOS üstünde SuperWaba tabanlı Java uygulamarı yapmak için basit bir şablon. Daha fazla bilgi http://www.superwaba.org/ adresinde bulunabilir. -Comment[zh_CN]=在 WinCE 和 PalmOS 上构建基于 SuperWaba Java 应用程序的简单模板。更多信息可以在 http://www.superwaba.org 找到 -Comment[zh_TW]=一個簡單的建立在 WinCE 與 PalmOS 上執行的 SuperWaba Java 應用程式。您可以在 http://www.superwaba.org 取得更多資訊。 -FileTemplates=java -ShowFilesAfterGeneration=%{dest}/%{APPNAME}.java -Archive=superwaba.tar.gz - -[JAVA] -Type=value -Value=JAVA -Comment=Path to your java root -Comment[ca]=Ruta cap a la vostra arrel Java -Comment[da]=Sti til din java-rod -Comment[de]=Pfad zum Stammordner von Java -Comment[el]=Διαδρομή στο κατάλογό σας της java -Comment[es]=Ruta a su carpeta raíz Java -Comment[et]=Java juurkataloogi asukoht -Comment[eu]=Zure java erroaren bide-izena -Comment[fa]=مسیر ریشۀ جاوای شما -Comment[fr]=Chemin vers votre racine Java -Comment[gl]=Ruta a súa instalación de java -Comment[hu]=A Java-alapkönyvtár elérési útja -Comment[it]=Percorso alla radice java -Comment[ja]=Java ルートへのパス -Comment[nds]=Padd na Dien Java-Wörtelorner -Comment[ne]=तपाईँको जाभा रूटको मार्ग -Comment[nl]=Pad naar uw Java-hoofdmap -Comment[pl]=Ścieżka do głównego katalogu Javy -Comment[pt]=A localização de base do seu Java -Comment[pt_BR]=A localização de base do seu Java -Comment[ru]=Путь к корневому каталогу Java -Comment[sk]=Cesta ku java koreňu -Comment[sr]=Путања до вашег корена Java-е -Comment[sr@Latn]=Putanja do vašeg korena Java-e -Comment[sv]=Sökväg till Java-rotkatalog -Comment[zh_CN]=您的 Java 根路径 -Comment[zh_TW]=您的 java 根路徑 -Default=/usr/lib/java -ValueType=QString - -[WABA] -Type=value -Value=WABA -Comment=Path to your SuperWaba root -Comment[ca]=Ruta cap a la vostra arrel SuperWaba -Comment[da]=Sti til din SuperWaba-rod -Comment[de]=Pfad zum Stammordner von SuperWaba -Comment[el]=Διαδρομή στο κατάλογό σας της SuperWaba -Comment[es]=Ruta a su carpeta raíz de SuperWaba -Comment[et]=SuperWaba juurkataloogi asukoht -Comment[eu]=Zure SuperWaba erroaren bide-izena -Comment[fa]=مسیر ریشۀ SuperWaba شما -Comment[fr]=Chemin vers votre racine SuperWaba -Comment[gl]=Ruta a súa instalación de SuperWaba -Comment[hu]=A SuperWaba-alapkönyvtár elérési útja -Comment[it]=Percorso alla radice SuperWaba -Comment[ja]=SuperWaba ルートへのパス -Comment[nds]=Padd na Dien SuperWaba-Wörtelorner -Comment[ne]=तपाईँको सुपरवाभा रूटको मार्ग -Comment[nl]=Pad naar uw SuperWaba-hoofdmap -Comment[pl]=Ścieżka do głównego katalogu SuperWaba -Comment[pt]=A localização de base do seu SuperWaba -Comment[pt_BR]=A localização de base do seu SuperWaba -Comment[ru]=Путь к корневому каталогу SuperWaba -Comment[sk]=Cesta ku SuperWaba koreňu -Comment[sr]=Путања до вашег корена SuperWaba-е -Comment[sr@Latn]=Putanja do vašeg korena SuperWaba-e -Comment[sv]=Sökväg till SuperWaba-rotkatalog -Comment[tr]=SuperWaba kök dizininizin yolu -Comment[zh_CN]=您的 SuperWaba 根路径 -Comment[zh_TW]=您的 SuperWaba 根路徑 -Default=/usr/lib -ValueType=QString - -[GNU] -Type=install archive -Source=%{tdevelop}/template-common/gnu.tar.gz -Dest=%{dest} - -[PROJECT] -Type=install -EscapeXML=true -Source=%{src}/sw.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILELIST] -Type=install -Source=%{src}/sw.filelist -Dest=%{dest}/%{APPNAMELC}.filelist - -[MAKEFILE] -Type=install -Source=%{src}/src-Makefile -Dest=%{dest}/Makefile - -[SOURCE] -Type=install -Source=%{src}/sw.java -Dest=%{dest}/%{APPNAME}.java - -[MESSAGE] -Type=Message -Comment=Your application is setup to build. Edit the make targets to customize the file. -Comment[ca]=La vostra aplicació està llesta per a ser construïda. Editeu els objectius de make per a personalitzar el fitxer. -Comment[da]=Dit program er parat til at blive bygget. Redigér make targets for at indstille filen. -Comment[de]=Ihre Anwendung ist bereit für das Erstellen. Bearbeiten Sie die Make-Targets, um die Datei an Ihre Bedürfnisse anzupassen. -Comment[el]=Η εφαρμογή σας έχει ρυθμιστεί για κατασκευή. Επεξεργαστείτε τους προορισμούς κατασκευής για την προσαρμογή του αρχείου. -Comment[en_GB]=Your application is setup to build. Edit the make targets to customise the file. -Comment[es]=Su aplicación está lista para ser construída. Edite los objetivos make para personalizar el archivo. -Comment[et]=Rakendus on ehitamiseks valmis. Faili kohandamiseks redigeeri ehitamise sihtmärke. -Comment[eu]=Zure aplikazioa eraikitzeko konfiguratu da. Editatu make-en helburuak fitxategia pertsonalizatzeko. -Comment[fa]=کاربرد شما برای ساختن برپا می‌شود. برای سفارشی کردن پرونده، هدفهای make را ویرایش کنید. -Comment[fr]=Votre application est prête à être construite. Modifiez les cibles de « make » pour personnaliser le fichier. -Comment[gl]=A súa aplicación esta configurada para compilar. Edite os obxectivos make para persoalizalo ficheiro. -Comment[hu]=Az alkalmazás készen áll a lefordításra. A make-célpontok szerkeszthetők, ha szükséges. -Comment[it]=L'applicazione è configurata per compilare. Modifica i target di make per personalizzare il file. -Comment[nds]=Dien Programm kann opstellt warrn. Bewerk de "Make"-Telen för't Topassen vun de Datei. -Comment[ne]=तपाईँको अनुप्रयोग निर्माण गर्नका लागि सेटअप भएको छ । फाइललाई अनुकूल गर्नका लागि मेक तार्गेटलाई सम्पादन गर्नुहोस् । -Comment[nl]=Uw toepassing kan worden gebouwd. Bewerk de make targets om het bestand naar eigen inzicht aan te passen. -Comment[pl]=Program skonfigurowany. Dostosowanie pliku do własnych potrzeb jest możliwe przez modyfikację celów make. -Comment[pt]=A sua aplicação está preparada para ser compilada. Edite os alvos do 'make' para personalizar o ficheiro. -Comment[pt_BR]=A sua aplicação está preparada para ser compilada. Edite os alvos do 'make' para personalizar o ficheiro. -Comment[ru]=Ваше приложение готово для сборки. -Comment[sk]=Aplikácia je pripravená na build. Môžte si prispôsobiť make ciele. -Comment[sr]=Ваш програм је спреман за градњу. Уредите циљеве справљача да бисте прилагодили фајл. -Comment[sr@Latn]=Vaš program je spreman za gradnju. Uredite ciljeve spravljača da biste prilagodili fajl. -Comment[sv]=Programmet är inställt att byggas. Redigera byggmålen för att anpassa filen. -Comment[tr]=Uygulamanız derlenmeye hazır. Dosyayı özelleştirmek için make hedeflerini düzenleyin. -Comment[zh_CN]=您的应用程序已设置为构建。编辑 make 目标可自定义文件。 -Comment[zh_TW]=您的應用程式已設定好可建立了。請編輯 make 目標來調整檔案。 -Archive=superwaba.tar.gz - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - diff --git a/languages/java/app_templates/superwaba/sw.tdevelop b/languages/java/app_templates/superwaba/sw.tdevelop index 029d3af3..11db7411 100644 --- a/languages/java/app_templates/superwaba/sw.tdevelop +++ b/languages/java/app_templates/superwaba/sw.tdevelop @@ -4,17 +4,17 @@ %{AUTHOR} %{EMAIL} %{VERSION} - TDevCustomProject + KDevCustomProject Java - TDevDebugger + KDevDebugger Java Code - + make test @@ -34,14 +34,14 @@ - - + + - - + + bash bash_bugs @@ -85,10 +85,10 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/languages/java/app_templates/tdeappjava/CMakeLists.txt b/languages/java/app_templates/tdeappjava/CMakeLists.txt deleted file mode 100644 index 578b6e9d..00000000 --- a/languages/java/app_templates/tdeappjava/CMakeLists.txt +++ /dev/null @@ -1,26 +0,0 @@ -################################################# -# -# (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( tdeappjava.tar.gz ALL - COMMAND tar zcf tdeappjava.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} - app.java pref.java appview.java app_client.java appui.rc - src-Makefile.am tdeappjava.png app.tdevelop subdirs -) - - -install( FILES - ${CMAKE_CURRENT_BINARY_DIR}/tdeappjava.tar.gz tdeappjava.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) - - -install( FILES - tdeappjava.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) diff --git a/languages/java/app_templates/tdeappjava/Makefile.am b/languages/java/app_templates/tdeappjava/Makefile.am deleted file mode 100644 index 889abb5a..00000000 --- a/languages/java/app_templates/tdeappjava/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -dataFiles = app.java pref.java appview.java app_client.java appui.rc \ - src-Makefile.am tdeappjava.png app.tdevelop subdirs -templateName = tdeappjava - -### no need to change below: -template_DATA = $(templateName).tdevtemplate -templatedir = ${appwizarddatadir}/templates - -appwizarddatadir = ${kde_datadir}/tdevappwizard -$(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/java/app_templates/tdeappjava/app.tdevelop b/languages/java/app_templates/tdeappjava/app.tdevelop deleted file mode 100644 index 1e07dec0..00000000 --- a/languages/java/app_templates/tdeappjava/app.tdevelop +++ /dev/null @@ -1,88 +0,0 @@ - - - - %{AUTHOR} - %{EMAIL} - %{VERSION} - KDevAutoProject - Java - - Java - Code - Qt - KDE - - - - - src/java - - - src/%{APPNAMELC} - - - - - - - - - - - - - - - - - - ada - ada_bugs_gcc - bash - bash_bugs - c++_bugs_gcc - clanlib - w3c-dom-level2-html - fortran_bugs_gcc - gnome1 - gnustep - gtk - gtk_bugs - haskell - haskell_bugs_ghc - libc - libstdc++ - opengl - pascal_bugs_fp - php - php_bugs - perl - perl_bugs - python - python_bugs - ruby - ruby_bugs - sdl - stl - w3c-svg - sw - w3c-uaag10 - wxwidgets_bugs - - - Guide to the Qt Translation Tools - Qt Assistant Manual - Qt Designer Manual - Qt Reference Documentation - qmake User Guide - - - KDE Libraries (Doxygen) - - - - - - - - diff --git a/languages/java/app_templates/tdeappjava/tdeappjava b/languages/java/app_templates/tdeappjava/tdeappjava deleted file mode 100644 index a62edafa..00000000 --- a/languages/java/app_templates/tdeappjava/tdeappjava +++ /dev/null @@ -1,10 +0,0 @@ -# KDE Config File -[General] -Name=Application framework -Name[fr]=Squelette d'application -Icon=tdeappjava.png -Category=Java/KDE -Comment=Generates a simple Java KDE application with one toplevel window, menus and toolbars. -Comment[fr]=Gnre une simple application KDE dans le language JAVA avec une fentre principale, des menus, et des barres d'outils. -FileTemplates=java,CStyle -ShowFilesAfterGeneration=src/APPNAMEView.java diff --git a/languages/java/app_templates/tdeappjava/tdeappjava.tdevtemplate b/languages/java/app_templates/tdeappjava/tdeappjava.tdevtemplate deleted file mode 100644 index b5b35e33..00000000 --- a/languages/java/app_templates/tdeappjava/tdeappjava.tdevtemplate +++ /dev/null @@ -1,163 +0,0 @@ -# KDE Config File -[General] -Name=Application framework -Name[ca]=Infraestructura d'aplicacions -Name[da]=Programskelet -Name[de]=Anwendungsgrundgerüst -Name[el]=Πλαίσιο εφαρμογής -Name[es]=Infraestructura de aplicación -Name[et]=Rakenduse raamistik -Name[eu]=Aplikazioen lan-markoa -Name[fa]=چارچوب کاربرد -Name[fr]=Infrastructure d'application -Name[ga]=Creatlach feidhmchláir -Name[gl]=Entorno de traballo para aplicación -Name[hu]=Alkalmazás-keretrendszer -Name[it]=Infrastruttura applicativa -Name[ja]=アプリケーションフレームワーク -Name[nds]=Programmrahmenwark -Name[ne]=अनुप्रयोग फ्रेमवर्क -Name[nl]=Applicationframework -Name[pl]=Szablon programu -Name[pt]=Plataforma de aplicações -Name[pt_BR]=Plataforma de aplicações -Name[ru]=Приложение KDE -Name[sk]=Aplikačný framework -Name[sl]=Ogrodje programa -Name[sr]=Радни оквир програма -Name[sr@Latn]=Radni okvir programa -Name[sv]=Programramverk -Name[tr]=Uygulama Çatısı -Name[zh_CN]=应用程序框架 -Name[zh_TW]=應用程式框架 -Icon=tdeappjava.png -Category=Java/KDE -Comment=Generates a simple Java KDE application with one toplevel window, menus and toolbars. -Comment[ca]=Genera una simple aplicació per al KDE en Java amb una finestra principal, menús i barres d'eines. -Comment[da]=Genererer et simpelt Java KDE program med et vindue på topniveau, menuer og værktøjslinjer. -Comment[de]=Erstellt eine einfache Java-KDE-Anwendung mit einem Toplevel-Fenster, Menüs und Werkzeugleisten. -Comment[el]=Δημιουργεί μια απλή εφαρμογή Java του KDE με ένα ανώτερο παράθυρο, μενού, και γραμμές εργαλείων. -Comment[es]=Genera una sencilla aplicación para KDE en Java, con una ventana principal, menús y barras de herramientas. -Comment[et]=Lihtsa Java KDE rakenduse loomine ühe tipptaseme akna, menüüde ja tööriistaribadega. -Comment[eu]=Goi-mailako lehio bat, menuak eta tresna-barrak dituen Java KDE aplikazio bat sortzen du. -Comment[fa]=یک کاربرد سادۀ KDE جاوا با یک پنجرۀ سطح بالا، گزینگان و میله‌های ابزار تولید می‌کند. -Comment[fr]=Génère une application KDE simple en Java comprenant une fenêtre de premier niveau, des menus et des barres d'outils. -Comment[gl]=Xera unha aplicación sinxela KDE en Java cunha xanela principal, menús e barras de ferramentas. -Comment[hu]=Létrehoz egy egyszerű Java-alapú KDE-alkalmazást egy főablakkal, menükkel és eszköztárakkal. -Comment[it]=Genera una semplice applicazione KDE Java con una finestra toplevel, menu e barre degli strumenti. -Comment[nds]=Stellt en eenfach KDE-Programm in Java mit een böverst Finster, Menüs un Warktüüchbalkens op. -Comment[ne]=एउटा उच्चतह सञ्झ्याल, मेनु र उपकरणपट्टीसँग साधारण जाभा केडीई अनुप्रयोग उत्पन्न गर्दछ । -Comment[nl]=Genereert een eenvoudige Java KDE-toepassing met een toplevel window, menu's en toolbars. -Comment[pl]=Generuje prosty program KDE w Javie posiadający okno, menu i paski narzędzi. -Comment[pt]=Gera uma aplicação para KDE simples em Java, com uma janela de topo, menus e barras de ferramentas. -Comment[pt_BR]=Gera uma aplicação para KDE simples em Java, com uma janela de topo, menus e barras de ferramentas. -Comment[ru]=Создание простого приложения Java KDE с окном, меню и панелями инструментов. -Comment[sk]=Vygeneruje jednoduchú Java KDE aplikáciu s jedným oknom, menu a panelom nástrojov. -Comment[sr]=Прави једноставан Java KDE програм са једним прозором највишег нивоа, менијима и тракама са алатом. -Comment[sr@Latn]=Pravi jednostavan Java KDE program sa jednim prozorom najvišeg nivoa, menijima i trakama sa alatom. -Comment[sv]=Skapar ett enkelt Java KDE-program med ett toppnivåfönster, menyer och verktygsrader. -Comment[tr]=Bir üst seviye penceresi, menüleri ve araç çubukları olan basit bir Java KDE uygulaması yaratır. -Comment[zh_CN]=生成一个简单的带有顶级窗口、菜单和工具栏的 Java KDE 应用程序。 -Comment[zh_TW]=產生一個簡單的 Java KDE 應用程式,內含頂層視窗、選單與工具列。 -FileTemplates=java,CStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAME}View.java -Archive=tdeappjava.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[DOCBOOK] -Type=include -File=%{tdevelop}/template-common/dockbook.tdevtemplate - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/tde-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/tde-app.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[FILE10] -Type=install -Source=%{tdevelop}/template-common/hi16-app-app.png -Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png -Process=false - -[FILE11] -Type=install -Source=%{tdevelop}/template-common/hi32-app-app.png -Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png -Process=false - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE12] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE13] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE14] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE15] -Type=install -Source=%{src}/app.java -Dest=%{dest}/src/%{APPNAME}.java - -[FILE16] -Type=install -Source=%{src}/appview.java -Dest=%{dest}/src/%{APPNAME}View.java - -[FILE17] -Type=install -Source=%{src}/pref.java -Dest=%{dest}/src/%{APPNAME}Preferences.java - -[FILE18] -Type=install -Source=%{src}/appui.rc -Dest=%{dest}/src/%{APPNAMELC}ui.rc - diff --git a/languages/java/backgroundparser.cpp b/languages/java/backgroundparser.cpp index 006b0127..d6a034e4 100644 --- a/languages/java/backgroundparser.cpp +++ b/languages/java/backgroundparser.cpp @@ -13,8 +13,8 @@ #include "javasupportpart.h" #include "javasupport_events.h" #include "driver.h" -#include "tdevdeepcopy.h" -#include "tdevdriver.h" +#include "kdevdeepcopy.h" +#include "kdevdriver.h" #include @@ -23,8 +23,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -178,7 +178,7 @@ BackgroundParser::BackgroundParser( JavaSupportPart* part, TQWaitCondition* cons : m_consumed( consumed ), m_javaSupport( part ), m_close( false ) { m_fileList = new SynchronizedFileList(); - m_driver = new TDevDriver( m_javaSupport ); + m_driver = new KDevDriver( m_javaSupport ); m_driver->setSourceProvider( new KDevSourceProvider(m_javaSupport) ); //disabled for now m_driver->setResolveDependencesEnabled( true ); } diff --git a/languages/java/backgroundparser.h b/languages/java/backgroundparser.h index db197e31..fee2bc78 100644 --- a/languages/java/backgroundparser.h +++ b/languages/java/backgroundparser.h @@ -71,7 +71,7 @@ protected: Unit* parseFile( const TQString& fileName, bool readFromDisk ); private: - class TDevDriver* m_driver; + class KDevDriver* m_driver; TQString m_currentFile; TQWaitCondition m_canParse; TQWaitCondition m_isEmpty; diff --git a/languages/java/doc/CMakeLists.txt b/languages/java/doc/CMakeLists.txt index 23acf492..685a980d 100644 --- a/languages/java/doc/CMakeLists.txt +++ b/languages/java/doc/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES sw.toc java_bugs_gcc.toc java_bugs_sun.toc - DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation/tocs ) + DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation/tocs ) diff --git a/languages/java/doc/Makefile.am b/languages/java/doc/Makefile.am index f163d148..adb0f24f 100644 --- a/languages/java/doc/Makefile.am +++ b/languages/java/doc/Makefile.am @@ -1,4 +1,4 @@ -tocdir = ${kde_datadir}/tdevdocumentation/tocs +tocdir = ${kde_datadir}/kdevdocumentation/tocs toc_DATA = sw.toc java_bugs_gcc.toc java_bugs_sun.toc #indexdir = ${kde_datadir}/devdoctreeview/indices diff --git a/languages/java/file_templates/CMakeLists.txt b/languages/java/file_templates/CMakeLists.txt index cee049fb..848555dd 100644 --- a/languages/java/file_templates/CMakeLists.txt +++ b/languages/java/file_templates/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES java - DESTINATION ${DATA_INSTALL_DIR}/tdevfilecreate/file-templates ) + DESTINATION ${DATA_INSTALL_DIR}/kdevfilecreate/file-templates ) diff --git a/languages/java/file_templates/Makefile.am b/languages/java/file_templates/Makefile.am index 4d9013d4..dc3b82a9 100644 --- a/languages/java/file_templates/Makefile.am +++ b/languages/java/file_templates/Makefile.am @@ -1,4 +1,4 @@ -templatedir = $(kde_datadir)/tdevfilecreate/file-templates +templatedir = $(kde_datadir)/kdevfilecreate/file-templates template_DATA = java diff --git a/languages/java/javasupport_events.h b/languages/java/javasupport_events.h index b2022af2..36cda51b 100644 --- a/languages/java/javasupport_events.h +++ b/languages/java/javasupport_events.h @@ -13,7 +13,7 @@ #define __javasupport_events_h #include "driver.h" -#include "tdevdeepcopy.h" +#include "kdevdeepcopy.h" #include #include diff --git a/languages/java/javasupportfactory.cpp b/languages/java/javasupportfactory.cpp index ac1eaadb..94e435f2 100644 --- a/languages/java/javasupportfactory.cpp +++ b/languages/java/javasupportfactory.cpp @@ -11,28 +11,28 @@ #include #include -#include +#include #include "javasupportfactory.h" -static const TDevPluginInfo data("tdevjavasupport"); -K_EXPORT_COMPONENT_FACTORY( libtdevjavasupport, JavaSupportFactory ) +static const KDevPluginInfo data("kdevjavasupport"); +K_EXPORT_COMPONENT_FACTORY( libkdevjavasupport, JavaSupportFactory ) JavaSupportFactory::JavaSupportFactory() - : TDevGenericFactory( data ) + : KDevGenericFactory( data ) { } TDEInstance *JavaSupportFactory::createInstance() { - TDEInstance *instance = TDevGenericFactory::createInstance(); + TDEInstance *instance = KDevGenericFactory::createInstance(); TDEStandardDirs *dirs = instance->dirs(); - dirs->addResourceType( "newclasstemplates", TDEStandardDirs::kde_default("data") + "tdevjavasupport/newclass/" ); - dirs->addResourceType( "pcs", TDEStandardDirs::kde_default( "data" ) + "tdevjavasupport/pcs/" ); + dirs->addResourceType( "newclasstemplates", TDEStandardDirs::kde_default("data") + "kdevjavasupport/newclass/" ); + dirs->addResourceType( "pcs", TDEStandardDirs::kde_default( "data" ) + "kdevjavasupport/pcs/" ); return instance; } -const TDevPluginInfo *JavaSupportFactory::info() +const KDevPluginInfo *JavaSupportFactory::info() { return &data; } diff --git a/languages/java/javasupportfactory.h b/languages/java/javasupportfactory.h index cb231d34..e5ae52b4 100644 --- a/languages/java/javasupportfactory.h +++ b/languages/java/javasupportfactory.h @@ -12,17 +12,17 @@ #ifndef _JAVASUPPORTFACTORY_H_ #define _JAVASUPPORTFACTORY_H_ -#include +#include #include "javasupportpart.h" -class TDevPluginInfo; +class KDevPluginInfo; -class JavaSupportFactory : public TDevGenericFactory +class JavaSupportFactory : public KDevGenericFactory { public: JavaSupportFactory(); - static const TDevPluginInfo *info(); + static const KDevPluginInfo *info(); protected: virtual TDEInstance *createInstance(); diff --git a/languages/java/javasupportpart.cpp b/languages/java/javasupportpart.cpp index 3c2090e8..63b174fc 100644 --- a/languages/java/javasupportpart.cpp +++ b/languages/java/javasupportpart.cpp @@ -17,10 +17,10 @@ #include "javasupport_events.h" #include "problemreporter.h" #include "backgroundparser.h" -#include "TDevJavaSupportIface.h" +#include "KDevJavaSupportIface.h" #include "javasupportfactory.h" #include "catalog.h" -#include "tdevdriver.h" +#include "kdevdriver.h" #include "javasupport_utils.h" #include "JavaStoreWalker.hpp" @@ -63,12 +63,12 @@ #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -77,11 +77,11 @@ enum { KDEV_DB_VERSION = 7 }; enum { KDEV_PCS_VERSION = 8 }; -class JavaDriver: public TDevDriver +class JavaDriver: public KDevDriver { public: JavaDriver( JavaSupportPart* javaSupport ) - : TDevDriver( javaSupport ) + : KDevDriver( javaSupport ) { } @@ -119,7 +119,7 @@ public: }; JavaSupportPart::JavaSupportPart(TQObject *parent, const char *name, const TQStringList &/*args*/) - : TDevLanguageSupport(JavaSupportFactory::info(), parent, name ? name : "TDevJavaSupport"), + : KDevLanguageSupport(JavaSupportFactory::info(), parent, name ? name : "KDevJavaSupport"), m_activeDocument( 0 ), m_activeView( 0 ), m_activeSelection( 0 ), m_activeEditor( 0 ), m_activeViewCursor( 0 ), m_projectClosed( true ), m_valid( false ) { @@ -127,7 +127,7 @@ JavaSupportPart::JavaSupportPart(TQObject *parent, const char *name, const TQStr m_driver = new JavaDriver( this ); - setXMLFile( "tdevjavasupport.rc" ); + setXMLFile( "kdevjavasupport.rc" ); m_catalogList.setAutoDelete( true ); setupCatalog(); @@ -167,7 +167,7 @@ JavaSupportPart::JavaSupportPart(TQObject *parent, const char *name, const TQStr connect( core( ), TQT_SIGNAL( projectConfigWidget( KDialogBase* ) ), this, TQT_SLOT( projectConfigWidget( KDialogBase* ) ) ); - new TDevJavaSupportIface( this ); + new KDevJavaSupportIface( this ); //(void) dcopClient(); } @@ -434,7 +434,7 @@ TQString JavaSupportPart::findSourceFile() return m_activeFileName; } -TDevLanguageSupport::Features JavaSupportPart::features() +KDevLanguageSupport::Features JavaSupportPart::features() { return Features( Classes | Functions | Variables ); } @@ -830,7 +830,7 @@ TQString JavaSupportPart::formatModelItem( const CodeModelItem *item, bool short return arg.stripWhiteSpace(); } else - return TDevLanguageSupport::formatModelItem( item, shortDescription ); + return KDevLanguageSupport::formatModelItem( item, shortDescription ); } void JavaSupportPart::addClass( ) diff --git a/languages/java/javasupportpart.h b/languages/java/javasupportpart.h index 6154cb8f..a69e3524 100644 --- a/languages/java/javasupportpart.h +++ b/languages/java/javasupportpart.h @@ -16,8 +16,8 @@ #ifndef _JAVASUPPORTPART_H_ #define _JAVASUPPORTPART_H_ -#include -#include +#include +#include #include #include @@ -46,7 +46,7 @@ namespace KTextEditor class ViewCursorInterface; } -class JavaSupportPart : public TDevLanguageSupport +class JavaSupportPart : public KDevLanguageSupport { Q_OBJECT @@ -82,7 +82,7 @@ signals: void fileParsed( const TQString& fileName ); protected: - virtual TDevLanguageSupport::Features features(); + virtual KDevLanguageSupport::Features features(); virtual KMimeType::List mimeTypes(); virtual TQString formatClassName(const TQString &name); virtual TQString unformatClassName(const TQString &name); @@ -159,7 +159,7 @@ private: FunctionDom m_activeFunction; VariableDom m_activeVariable; - friend class TDevJavaSupportIface; + friend class KDevJavaSupportIface; friend class JavaDriver; }; diff --git a/languages/java/kdevdeepcopy.h b/languages/java/kdevdeepcopy.h new file mode 100644 index 00000000..dd4d8f4d --- /dev/null +++ b/languages/java/kdevdeepcopy.h @@ -0,0 +1,12 @@ +#ifndef KDEVDEEPCOPY_H +#define KDEVDEEPCOPY_H + +#include + +inline TQString deepCopy( const TQString& s ) +{ + TQCString str = s.utf8(); + return TQString::fromUtf8( str, str.length() ); +} + +#endif diff --git a/languages/java/kdevdriver.cpp b/languages/java/kdevdriver.cpp new file mode 100644 index 00000000..d19a20c3 --- /dev/null +++ b/languages/java/kdevdriver.cpp @@ -0,0 +1,44 @@ + +#include "kdevdriver.h" +#include "JavaLexer.hpp" +#include +#include + +KDevDriver::KDevDriver( JavaSupportPart* javaSupport ) + : m_javaSupport( javaSupport ) +{ +} + +JavaSupportPart* KDevDriver::javaSupport() +{ + return m_javaSupport; +} + +void KDevDriver::setupProject() +{ + TQMap map; + + { + TQStringList fileList = m_javaSupport->project()->allFiles(); + TQStringList::ConstIterator it = fileList.begin(); + while( it != fileList.end() ){ + TQFileInfo info( *it ); + ++it; + + map.insert( info.dirPath(true), true ); + } + } + + { + TQMap::Iterator it = map.begin(); + while( it != map.end() ){ + addIncludePath( it.key() ); + ++it; + } + } +} + +void KDevDriver::setupLexer( JavaLexer* lexer ) +{ + Driver::setupLexer( lexer ); +} diff --git a/languages/java/kdevdriver.h b/languages/java/kdevdriver.h new file mode 100644 index 00000000..cc0a1393 --- /dev/null +++ b/languages/java/kdevdriver.h @@ -0,0 +1,30 @@ + +#ifndef __kdevdriver_h +#define __kdevdriver_h + +#include "javasupportpart.h" + +#include +#include + +#include "driver.h" + +#include +#include + +class KDevDriver: public Driver +{ +public: + KDevDriver( JavaSupportPart* javaSupport ); + JavaSupportPart* javaSupport(); + void setupProject(); + +protected: + void setupLexer( JavaLexer* lexer ); + +private: + JavaSupportPart* m_javaSupport; +}; + +#endif + diff --git a/languages/java/kdevjavasupport.desktop b/languages/java/kdevjavasupport.desktop new file mode 100644 index 00000000..620fb10f --- /dev/null +++ b/languages/java/kdevjavasupport.desktop @@ -0,0 +1,85 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Java Support +Comment[ca]=Suport per a Java +Comment[da]=Java understøttelse +Comment[de]=Java-Unterstützung für TDevelop +Comment[el]=Υποστήριξη Java +Comment[es]=Soporte para Java +Comment[et]=Java toetus +Comment[eu]=Java euskarria +Comment[fa]=پشتیبانی جاوا +Comment[fr]=Prise en charge de Java +Comment[ga]=Tacaíocht Java +Comment[gl]=Soporte para Java +Comment[hi]=जावा समर्थन +Comment[hu]=Java-támogatás +Comment[is]=Java stuðningur +Comment[it]=Supporto per Java +Comment[ja]=Java サポート +Comment[nds]=Java-Ünnerstütten för TDevelop +Comment[ne]=जाभा समर्थन +Comment[nl]=Ondersteuning voor Java +Comment[pl]=Obsługa Javy +Comment[pt]=Suporte a Java +Comment[pt_BR]=Suporte ao Java +Comment[ru]=Поддержка языка Java +Comment[sk]=Java podpora +Comment[sl]=Podpora javi +Comment[sr]=Подршка за Java-у +Comment[sr@Latn]=Podrška za Java-u +Comment[sv]=Java-stöd +Comment[ta]=ஜாவா ஆதரவு +Comment[tg]=Ёрӣ намудани забони Java +Comment[tr]=Java Desteği +Comment[zh_CN]=Java 支持 +Comment[zh_TW]=Java 支援 +Name=KDevJavaSupport +Name[da]=TDevelop Java-understøttelse +Name[de]=Unterstützung für Java (TDevelop) +Name[hi]=के-डेव-जावा-समर्थन +Name[nds]=Java-Ünnerstütten för TDevelop +Name[pl]=KDevObsługaJavy +Name[sk]=KDev Java podpora +Name[sv]=TDevelop Java-stöd +Name[ta]=கெடெவ் ஜாவா ஆதரவு +Name[zh_TW]=TDevelop Java 支援 +GenericName=Java Support +GenericName[ca]=Suport per a Java +GenericName[da]=Java-understøttelse +GenericName[de]=Unterstützung für Java +GenericName[el]=Υποστήριξη Java +GenericName[es]=Soporte para Java +GenericName[et]=Java toetus +GenericName[eu]=Java euskarria +GenericName[fa]=پشتیبانی جاوا +GenericName[fr]=Prise en charge de JAVA +GenericName[ga]=Tacaíocht Java +GenericName[gl]=Soporte para Java +GenericName[hi]=जावा समर्थन +GenericName[hu]=Java-támogatás +GenericName[it]=Supporto Java +GenericName[ja]=Java サポート +GenericName[nds]=Ünnerstütten för Java +GenericName[ne]=जाभा समर्थन +GenericName[nl]=Ondersteuning voor Java +GenericName[pl]=Obsługa Javy +GenericName[pt]=Suporte a Java +GenericName[pt_BR]=Suporte ao Java +GenericName[ru]=Поддержка языка Java +GenericName[sk]=Java podpora +GenericName[sl]=Podpora javi +GenericName[sr]=Подршка за Java-у +GenericName[sr@Latn]=Podrška za Java-u +GenericName[sv]=Java-stöd +GenericName[ta]=ஜாவா ஆதரவு +GenericName[tg]=Ёрӣ намудани забони Java +GenericName[tr]=Java Desteği +GenericName[zh_CN]=Java 支持 +GenericName[zh_TW]=Java 支援 +ServiceTypes=TDevelop/LanguageSupport +X-TDE-Library=libkdevjavasupport +X-TDevelop-Version=5 +X-TDevelop-Language=Java +X-TDevelop-Args=Java diff --git a/languages/java/kdevjavasupport.rc b/languages/java/kdevjavasupport.rc new file mode 100644 index 00000000..e9b80d0d --- /dev/null +++ b/languages/java/kdevjavasupport.rc @@ -0,0 +1,4 @@ + + + + diff --git a/languages/java/newclass_templates/Makefile.am b/languages/java/newclass_templates/Makefile.am index f8b9e3bd..d24c99ef 100644 --- a/languages/java/newclass_templates/Makefile.am +++ b/languages/java/newclass_templates/Makefile.am @@ -1,4 +1,4 @@ -javasupportdatadir = ${kde_datadir}/tdevjavasupport +javasupportdatadir = ${kde_datadir}/kdevjavasupport newclassdir = ${javasupportdatadir}/newclass newclass_DATA = java_source diff --git a/languages/java/problemreporter.cpp b/languages/java/problemreporter.cpp index 6b6a46e6..4d4f47af 100644 --- a/languages/java/problemreporter.cpp +++ b/languages/java/problemreporter.cpp @@ -21,8 +21,8 @@ #include "configproblemreporter.h" #include "backgroundparser.h" -#include -#include +#include +#include #include #include diff --git a/languages/java/tdevdeepcopy.h b/languages/java/tdevdeepcopy.h deleted file mode 100644 index c4f889c1..00000000 --- a/languages/java/tdevdeepcopy.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef TDEVDEEPCOPY_H -#define TDEVDEEPCOPY_H - -#include - -inline TQString deepCopy( const TQString& s ) -{ - TQCString str = s.utf8(); - return TQString::fromUtf8( str, str.length() ); -} - -#endif diff --git a/languages/java/tdevdriver.cpp b/languages/java/tdevdriver.cpp deleted file mode 100644 index d36a23f3..00000000 --- a/languages/java/tdevdriver.cpp +++ /dev/null @@ -1,44 +0,0 @@ - -#include "tdevdriver.h" -#include "JavaLexer.hpp" -#include -#include - -TDevDriver::TDevDriver( JavaSupportPart* javaSupport ) - : m_javaSupport( javaSupport ) -{ -} - -JavaSupportPart* TDevDriver::javaSupport() -{ - return m_javaSupport; -} - -void TDevDriver::setupProject() -{ - TQMap map; - - { - TQStringList fileList = m_javaSupport->project()->allFiles(); - TQStringList::ConstIterator it = fileList.begin(); - while( it != fileList.end() ){ - TQFileInfo info( *it ); - ++it; - - map.insert( info.dirPath(true), true ); - } - } - - { - TQMap::Iterator it = map.begin(); - while( it != map.end() ){ - addIncludePath( it.key() ); - ++it; - } - } -} - -void TDevDriver::setupLexer( JavaLexer* lexer ) -{ - Driver::setupLexer( lexer ); -} diff --git a/languages/java/tdevdriver.h b/languages/java/tdevdriver.h deleted file mode 100644 index 27fd7854..00000000 --- a/languages/java/tdevdriver.h +++ /dev/null @@ -1,30 +0,0 @@ - -#ifndef __tdevdriver_h -#define __tdevdriver_h - -#include "javasupportpart.h" - -#include -#include - -#include "driver.h" - -#include -#include - -class TDevDriver: public Driver -{ -public: - TDevDriver( JavaSupportPart* javaSupport ); - JavaSupportPart* javaSupport(); - void setupProject(); - -protected: - void setupLexer( JavaLexer* lexer ); - -private: - JavaSupportPart* m_javaSupport; -}; - -#endif - diff --git a/languages/java/tdevjavasupport.desktop b/languages/java/tdevjavasupport.desktop deleted file mode 100644 index 6d3553d7..00000000 --- a/languages/java/tdevjavasupport.desktop +++ /dev/null @@ -1,85 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Java Support -Comment[ca]=Suport per a Java -Comment[da]=Java understøttelse -Comment[de]=Java-Unterstützung für TDevelop -Comment[el]=Υποστήριξη Java -Comment[es]=Soporte para Java -Comment[et]=Java toetus -Comment[eu]=Java euskarria -Comment[fa]=پشتیبانی جاوا -Comment[fr]=Prise en charge de Java -Comment[ga]=Tacaíocht Java -Comment[gl]=Soporte para Java -Comment[hi]=जावा समर्थन -Comment[hu]=Java-támogatás -Comment[is]=Java stuðningur -Comment[it]=Supporto per Java -Comment[ja]=Java サポート -Comment[nds]=Java-Ünnerstütten för TDevelop -Comment[ne]=जाभा समर्थन -Comment[nl]=Ondersteuning voor Java -Comment[pl]=Obsługa Javy -Comment[pt]=Suporte a Java -Comment[pt_BR]=Suporte ao Java -Comment[ru]=Поддержка языка Java -Comment[sk]=Java podpora -Comment[sl]=Podpora javi -Comment[sr]=Подршка за Java-у -Comment[sr@Latn]=Podrška za Java-u -Comment[sv]=Java-stöd -Comment[ta]=ஜாவா ஆதரவு -Comment[tg]=Ёрӣ намудани забони Java -Comment[tr]=Java Desteği -Comment[zh_CN]=Java 支持 -Comment[zh_TW]=Java 支援 -Name=TDevJavaSupport -Name[da]=TDevelop Java-understøttelse -Name[de]=Unterstützung für Java (TDevelop) -Name[hi]=के-डेव-जावा-समर्थन -Name[nds]=Java-Ünnerstütten för TDevelop -Name[pl]=KDevObsługaJavy -Name[sk]=KDev Java podpora -Name[sv]=TDevelop Java-stöd -Name[ta]=கெடெவ் ஜாவா ஆதரவு -Name[zh_TW]=TDevelop Java 支援 -GenericName=Java Support -GenericName[ca]=Suport per a Java -GenericName[da]=Java-understøttelse -GenericName[de]=Unterstützung für Java -GenericName[el]=Υποστήριξη Java -GenericName[es]=Soporte para Java -GenericName[et]=Java toetus -GenericName[eu]=Java euskarria -GenericName[fa]=پشتیبانی جاوا -GenericName[fr]=Prise en charge de JAVA -GenericName[ga]=Tacaíocht Java -GenericName[gl]=Soporte para Java -GenericName[hi]=जावा समर्थन -GenericName[hu]=Java-támogatás -GenericName[it]=Supporto Java -GenericName[ja]=Java サポート -GenericName[nds]=Ünnerstütten för Java -GenericName[ne]=जाभा समर्थन -GenericName[nl]=Ondersteuning voor Java -GenericName[pl]=Obsługa Javy -GenericName[pt]=Suporte a Java -GenericName[pt_BR]=Suporte ao Java -GenericName[ru]=Поддержка языка Java -GenericName[sk]=Java podpora -GenericName[sl]=Podpora javi -GenericName[sr]=Подршка за Java-у -GenericName[sr@Latn]=Podrška za Java-u -GenericName[sv]=Java-stöd -GenericName[ta]=ஜாவா ஆதரவு -GenericName[tg]=Ёрӣ намудани забони Java -GenericName[tr]=Java Desteği -GenericName[zh_CN]=Java 支持 -GenericName[zh_TW]=Java 支援 -ServiceTypes=TDevelop/LanguageSupport -X-TDE-Library=libtdevjavasupport -X-TDevelop-Version=5 -X-TDevelop-Language=Java -X-TDevelop-Args=Java diff --git a/languages/java/tdevjavasupport.rc b/languages/java/tdevjavasupport.rc deleted file mode 100644 index 66c7975c..00000000 --- a/languages/java/tdevjavasupport.rc +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/languages/kjssupport/Makefile.am b/languages/kjssupport/Makefile.am index 1fd1839b..72cc722b 100644 --- a/languages/kjssupport/Makefile.am +++ b/languages/kjssupport/Makefile.am @@ -1,22 +1,22 @@ INCLUDES = -I$(kde_includes)/tdevelop $(all_includes) -kde_module_LTLIBRARIES = libtdevkjssupport.la -libtdevkjssupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevkjssupport_la_LIBADD = -lkjsembed -ltdevelop -libtdevkjssupport_la_SOURCES = kjssupport_part.cpp kjsproblems.cpp jscodecompletion.cpp subclassingdlg.cpp subclassingdlgbase.ui +kde_module_LTLIBRARIES = libkdevkjssupport.la +libkdevkjssupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevkjssupport_la_LIBADD = -lkjsembed -ltdevelop +libkdevkjssupport_la_SOURCES = kjssupport_part.cpp kjsproblems.cpp jscodecompletion.cpp subclassingdlg.cpp subclassingdlgbase.ui METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevkjssupport.desktop +service_DATA = kdevkjssupport.desktop mimesrcdir = $(kde_mimedir)/text mimesrc_DATA = x-javascript-source.desktop EXTRA_DIST = $(mimesrc_DATA) -rcdir = $(kde_datadir)/tdevkjssupport -rc_DATA = tdevkjssupport.rc +rcdir = $(kde_datadir)/kdevkjssupport +rc_DATA = kdevkjssupport.rc SUBDIRS = template subclassing_template noinst_HEADERS = kjsproblems.h diff --git a/languages/kjssupport/jscodecompletion.cpp b/languages/kjssupport/jscodecompletion.cpp index b8f361a4..436e0a95 100644 --- a/languages/kjssupport/jscodecompletion.cpp +++ b/languages/kjssupport/jscodecompletion.cpp @@ -28,12 +28,12 @@ #include -#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/languages/kjssupport/jscodecompletion.h b/languages/kjssupport/jscodecompletion.h index 9e4434bb..f1d18a70 100644 --- a/languages/kjssupport/jscodecompletion.h +++ b/languages/kjssupport/jscodecompletion.h @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include diff --git a/languages/kjssupport/kdevkjssupport.desktop b/languages/kjssupport/kdevkjssupport.desktop new file mode 100644 index 00000000..e972cd18 --- /dev/null +++ b/languages/kjssupport/kdevkjssupport.desktop @@ -0,0 +1,54 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=kjsSupport +Comment[da]=kjs-understøttelse +Comment[et]=kjs toetus +Comment[fa]=پشتیبانی kjs +Comment[nds]=KDE-Ünnerstütten för JavaScript +Comment[pl]=Obsługakjs +Comment[sk]=kjs podpora +Comment[sv]=Javaskript-stöd +Comment[zh_TW]=kjs 支援 +Name=KDevkjsSupport +Name[da]=TDevelop Bash-understøttelse +Name[nds]=KJS-Ünnerstütten för TDevelop +Name[pl]=KDevObsługakjs +Name[sk]=KDev kjs podpora +Name[sv]=TDevelop Javaskript-stöd +Name[zh_TW]=TDevelop kjs 支援 +GenericName=TDE JavaScript Support +GenericName[ca]=Suport per a JavaScript per al TDE +GenericName[da]=TDE JavaScript-understøttelse +GenericName[de]=Unterstützung für TDE-JavaScript +GenericName[el]=Υποστήριξη TDE JavaScript +GenericName[es]=Soporte para JavaScript de TDE +GenericName[et]=TDE JavaScripti toetus +GenericName[eu]=TDE JavaScript euskarria +GenericName[fa]=پشتیبانی جاوااسکریپت TDE +GenericName[fr]=Prise en charge du JavaScript pour TDE +GenericName[ga]=Tacaíocht JavaScript TDE +GenericName[gl]=Soporte para JavaScript de TDE +GenericName[hu]=TDE Javascript-támogatás +GenericName[it]=Supporto JavaScript di TDE +GenericName[ja]=TDE JavaScript サポート +GenericName[nds]=TDE-Ünnerstütten för JavaScript +GenericName[ne]=केडीई जाभास्क्रिप्ट समर्थन +GenericName[nl]=TDE ondersteuning voor JavaScript +GenericName[pl]=Obsługa JavaScriptu TDE +GenericName[pt]=Suporte TDE a JavaScript +GenericName[pt_BR]=Suporte ao JavaScript do TDE +GenericName[ru]=Поддержка языка JavaScript +GenericName[sk]=TDE JavaScript podpora +GenericName[sl]=Podpora javascriptu v TDE +GenericName[sr]=TDE-ова подршка за Javascript +GenericName[sr@Latn]=TDE-ova podrška za Javascript +GenericName[sv]=TDE Javaskript-stöd +GenericName[tr]=TDE JavaScript Desteği +GenericName[zh_CN]=TDE JavaScript 支持 +GenericName[zh_TW]=TDE JavaScript 支援 +Icon=tdevelop +ServiceTypes=TDevelop/LanguageSupport +X-TDevelop-Language=Javascript +X-TDE-Library=libkdevkjssupport +X-TDevelop-Version=3 diff --git a/languages/kjssupport/tdevkjssupport.rc b/languages/kjssupport/kdevkjssupport.rc similarity index 100% rename from languages/kjssupport/tdevkjssupport.rc rename to languages/kjssupport/kdevkjssupport.rc diff --git a/languages/kjssupport/kjssupport_part.cpp b/languages/kjssupport/kjssupport_part.cpp index 69311ac3..4a3dbc25 100644 --- a/languages/kjssupport/kjssupport_part.cpp +++ b/languages/kjssupport/kjssupport_part.cpp @@ -26,15 +26,15 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include -#include +#include #include #include #include @@ -42,16 +42,16 @@ #include #include -#include +#include #include "kjssupport_part.h" #include "kjsproblems.h" #include "jscodecompletion.h" #include "subclassingdlg.h" -typedef TDevGenericFactory kjsSupportFactory; -static const TDevPluginInfo data("tdevkjssupport"); -K_EXPORT_COMPONENT_FACTORY( libtdevkjssupport, kjsSupportFactory( data ) ); +typedef KDevGenericFactory kjsSupportFactory; +static const KDevPluginInfo data("kdevkjssupport"); +K_EXPORT_COMPONENT_FACTORY( libkdevkjssupport, kjsSupportFactory( data ) ); class typeProperty @@ -63,10 +63,10 @@ class typeProperty }; kjsSupportPart::kjsSupportPart(TQObject *parent, const char *name, const TQStringList& ) -: TDevLanguageSupport(&data, parent, name ? name : "kjsSupportPart" ) +: KDevLanguageSupport(&data, parent, name ? name : "kjsSupportPart" ) { setInstance(kjsSupportFactory::instance()); - setXMLFile("tdevkjssupport.rc"); + setXMLFile("kdevkjssupport.rc"); m_build = new TDEAction( i18n("&Run"), "exec",Key_F9,this, TQT_SLOT(slotRun()),actionCollection(), "build_execute" ); @@ -104,7 +104,7 @@ kjsSupportPart::~kjsSupportPart() delete m_js; } -TDevLanguageSupport::Features kjsSupportPart::features() +KDevLanguageSupport::Features kjsSupportPart::features() { return Features(Classes | Variables | Functions); } diff --git a/languages/kjssupport/kjssupport_part.h b/languages/kjssupport/kjssupport_part.h index 59b5dae4..4572b9a2 100644 --- a/languages/kjssupport/kjssupport_part.h +++ b/languages/kjssupport/kjssupport_part.h @@ -17,13 +17,13 @@ */ -#ifndef __TDEVPART_KJSSUPPORT_H__ -#define __TDEVPART_KJSSUPPORT_H__ +#ifndef __KDEVPART_KJSSUPPORT_H__ +#define __KDEVPART_KJSSUPPORT_H__ #include #include -#include +#include #include #include #include @@ -43,7 +43,7 @@ class Context; class typeProperty; -class kjsSupportPart : public TDevLanguageSupport +class kjsSupportPart : public KDevLanguageSupport { Q_OBJECT diff --git a/languages/kjssupport/subclassing_template/Makefile.am b/languages/kjssupport/subclassing_template/Makefile.am index bafadb4e..8c99d172 100644 --- a/languages/kjssupport/subclassing_template/Makefile.am +++ b/languages/kjssupport/subclassing_template/Makefile.am @@ -1,3 +1,3 @@ -kjssupportdatadir = ${kde_datadir}/tdevkjssupport +kjssupportdatadir = ${kde_datadir}/kdevkjssupport subclassingdir = ${kjssupportdatadir}/subclassing subclassing_DATA = subclass_template.js diff --git a/languages/kjssupport/subclassingdlg.cpp b/languages/kjssupport/subclassingdlg.cpp index 260e2d49..513e0180 100644 --- a/languages/kjssupport/subclassingdlg.cpp +++ b/languages/kjssupport/subclassingdlg.cpp @@ -17,7 +17,7 @@ #include "store_walker.h" #include "cppsupportfactory.h"*/ #include -#include +#include #include #include diff --git a/languages/kjssupport/tdevkjssupport.desktop b/languages/kjssupport/tdevkjssupport.desktop deleted file mode 100644 index 02640f78..00000000 --- a/languages/kjssupport/tdevkjssupport.desktop +++ /dev/null @@ -1,54 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=kjsSupport -Comment[da]=kjs-understøttelse -Comment[et]=kjs toetus -Comment[fa]=پشتیبانی kjs -Comment[nds]=KDE-Ünnerstütten för JavaScript -Comment[pl]=Obsługakjs -Comment[sk]=kjs podpora -Comment[sv]=Javaskript-stöd -Comment[zh_TW]=kjs 支援 -Name=KDevkjsSupport -Name[da]=TDevelop Bash-understøttelse -Name[nds]=KJS-Ünnerstütten för TDevelop -Name[pl]=KDevObsługakjs -Name[sk]=KDev kjs podpora -Name[sv]=TDevelop Javaskript-stöd -Name[zh_TW]=TDevelop kjs 支援 -GenericName=TDE JavaScript Support -GenericName[ca]=Suport per a JavaScript per al TDE -GenericName[da]=TDE JavaScript-understøttelse -GenericName[de]=Unterstützung für TDE-JavaScript -GenericName[el]=Υποστήριξη TDE JavaScript -GenericName[es]=Soporte para JavaScript de TDE -GenericName[et]=TDE JavaScripti toetus -GenericName[eu]=TDE JavaScript euskarria -GenericName[fa]=پشتیبانی جاوااسکریپت TDE -GenericName[fr]=Prise en charge du JavaScript pour TDE -GenericName[ga]=Tacaíocht JavaScript TDE -GenericName[gl]=Soporte para JavaScript de TDE -GenericName[hu]=TDE Javascript-támogatás -GenericName[it]=Supporto JavaScript di TDE -GenericName[ja]=TDE JavaScript サポート -GenericName[nds]=TDE-Ünnerstütten för JavaScript -GenericName[ne]=केडीई जाभास्क्रिप्ट समर्थन -GenericName[nl]=TDE ondersteuning voor JavaScript -GenericName[pl]=Obsługa JavaScriptu TDE -GenericName[pt]=Suporte TDE a JavaScript -GenericName[pt_BR]=Suporte ao JavaScript do TDE -GenericName[ru]=Поддержка языка JavaScript -GenericName[sk]=TDE JavaScript podpora -GenericName[sl]=Podpora javascriptu v TDE -GenericName[sr]=TDE-ова подршка за Javascript -GenericName[sr@Latn]=TDE-ova podrška za Javascript -GenericName[sv]=TDE Javaskript-stöd -GenericName[tr]=TDE JavaScript Desteği -GenericName[zh_CN]=TDE JavaScript 支持 -GenericName[zh_TW]=TDE JavaScript 支援 -Icon=tdevelop -ServiceTypes=TDevelop/LanguageSupport -X-TDevelop-Language=Javascript -X-TDE-Library=libtdevkjssupport -X-TDevelop-Version=3 diff --git a/languages/kjssupport/template/Makefile.am b/languages/kjssupport/template/Makefile.am index fd902e1a..284227b7 100644 --- a/languages/kjssupport/template/Makefile.am +++ b/languages/kjssupport/template/Makefile.am @@ -1,4 +1,4 @@ -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard commondatadir = ${appwizarddatadir}/template-common jshellodir = ${appwizarddatadir}/template-jshello templatedir = ${appwizarddatadir}/templates diff --git a/languages/kjssupport/template/app.tdevelop b/languages/kjssupport/template/app.tdevelop index d1e55b10..cbef8262 100644 --- a/languages/kjssupport/template/app.tdevelop +++ b/languages/kjssupport/template/app.tdevelop @@ -10,24 +10,24 @@ Javascript - TDevFileView + KDevFileView KDevdistpart - TDevDebugger + KDevDebugger - + src *.js *~ - - + + - - + + kde gtk @@ -36,10 +36,10 @@ perl php - - + + - + diff --git a/languages/kjssupport/template/script b/languages/kjssupport/template/script index 3ed2602c..1473d762 100644 --- a/languages/kjssupport/template/script +++ b/languages/kjssupport/template/script @@ -1,4 +1,4 @@ -#!perl -I/usr/kde/3.1/share/apps/tdevappwizard/template-common +#!perl -I/usr/kde/3.1/share/apps/kdevappwizard/template-common use gideon; diff --git a/languages/lib/debugger/CMakeLists.txt b/languages/lib/debugger/CMakeLists.txt index fbd121e4..c159528b 100644 --- a/languages/lib/debugger/CMakeLists.txt +++ b/languages/lib/debugger/CMakeLists.txt @@ -24,14 +24,14 @@ link_directories( ##### headers ################################### install( FILES - debugger.h tdevdebugger.h + debugger.h kdevdebugger.h DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/languages/debugger ) ##### lang_debugger (shared) #################### tde_add_library( lang_debugger SHARED AUTOMOC - SOURCES tdevdebugger.cpp debugger.cpp + SOURCES kdevdebugger.cpp debugger.cpp VERSION 0.0.0 LINK tdetexteditor-shared DESTINATION ${LIB_INSTALL_DIR} diff --git a/languages/lib/debugger/Makefile.am b/languages/lib/debugger/Makefile.am index 3ca4e3a8..fc8923aa 100644 --- a/languages/lib/debugger/Makefile.am +++ b/languages/lib/debugger/Makefile.am @@ -3,11 +3,11 @@ METASOURCES = AUTO lib_LTLIBRARIES = liblang_debugger.la liblang_debugger_la_LDFLAGS = $(all_libraries) liblang_debugger_la_LIBADD = $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEPARTS) -ltdetexteditor -liblang_debugger_la_SOURCES = tdevdebugger.cpp debugger.cpp +liblang_debugger_la_SOURCES = kdevdebugger.cpp debugger.cpp langincludedirdir = $(includedir)/tdevelop/languages/debugger -langincludedir_HEADERS = debugger.h tdevdebugger.h +langincludedir_HEADERS = debugger.h kdevdebugger.h -DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils tdevinterfaces tdevutil -DOXYGEN_PROJECTNAME = TDevelop Debugger Support Library -DOXYGEN_DOCDIRPREFIX = tdevlang +DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils kdevinterfaces kdevutil +DOXYGEN_PROJECTNAME = KDevelop Debugger Support Library +DOXYGEN_DOCDIRPREFIX = kdevlang include ../../../Doxyfile.am diff --git a/languages/lib/debugger/debugger.cpp b/languages/lib/debugger/debugger.cpp index 341abecd..bc8356b7 100644 --- a/languages/lib/debugger/debugger.cpp +++ b/languages/lib/debugger/debugger.cpp @@ -6,14 +6,14 @@ #include // #include "editorproxy.h" -#include +#include using namespace KTextEditor; Debugger *Debugger::s_instance = 0; -Debugger::Debugger(TDevPartController *partController) +Debugger::Debugger(KDevPartController *partController) :m_partController(partController) { connect( m_partController, TQT_SIGNAL(partAdded(KParts::Part*)), diff --git a/languages/lib/debugger/debugger.h b/languages/lib/debugger/debugger.h index 1f5cbae8..d4112490 100644 --- a/languages/lib/debugger/debugger.h +++ b/languages/lib/debugger/debugger.h @@ -3,7 +3,7 @@ #include -#include "tdevdebugger.h" +#include "kdevdebugger.h" #include #include @@ -11,7 +11,7 @@ #include #include -class TDevPartController; +class KDevPartController; /** * Describes a single breakpoint in the system @@ -54,7 +54,7 @@ private: * point of the debugger. * We may change, add or remove breakpoints in this class. */ -class Debugger : public TDevDebugger +class Debugger : public KDevDebugger { Q_OBJECT @@ -94,7 +94,7 @@ public: // protected: - Debugger(TDevPartController *partController); + Debugger(KDevPartController *partController); ~Debugger(); private slots: @@ -126,7 +126,7 @@ private: }; static Debugger *s_instance; - TDevPartController *m_partController; + KDevPartController *m_partController; TQValueList BPList; }; diff --git a/languages/lib/debugger/kdevdebugger.cpp b/languages/lib/debugger/kdevdebugger.cpp new file mode 100644 index 00000000..b9ee4a05 --- /dev/null +++ b/languages/lib/debugger/kdevdebugger.cpp @@ -0,0 +1,182 @@ +/* This file is part of the KDE project + Copyright (C) 2002 Matthias Hoelzer-Kluepfel + Copyright (C) 2002 John Firebaugh + + 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 "kdevdebugger.h" + +KDevDebugger::KDevDebugger(TQObject *parent, const char *name) + : TQObject(parent, name) +{ +} + + +KDevDebugger::~KDevDebugger() +{ +} + +const TQPixmap* KDevDebugger::inactiveBreakpointPixmap() +{ + const char*breakpoint_gr_xpm[]={ + "11 16 6 1", + "c c #c6c6c6", + "d c #2c2c2c", + "# c #000000", + ". c None", + "a c #ffffff", + "b c #555555", + "...........", + "...........", + "...#####...", + "..#aaaaa#..", + ".#abbbbbb#.", + "#abbbbbbbb#", + "#abcacacbd#", + "#abbbbbbbb#", + "#abcacacbd#", + "#abbbbbbbb#", + ".#bbbbbbb#.", + "..#bdbdb#..", + "...#####...", + "...........", + "...........", + "..........."}; + static TQPixmap pixmap( breakpoint_gr_xpm ); + return &pixmap; +} + +const TQPixmap* KDevDebugger::activeBreakpointPixmap() +{ + const char* breakpoint_xpm[]={ + "11 16 6 1", + "c c #c6c6c6", + ". c None", + "# c #000000", + "d c #840000", + "a c #ffffff", + "b c #ff0000", + "...........", + "...........", + "...#####...", + "..#aaaaa#..", + ".#abbbbbb#.", + "#abbbbbbbb#", + "#abcacacbd#", + "#abbbbbbbb#", + "#abcacacbd#", + "#abbbbbbbb#", + ".#bbbbbbb#.", + "..#bdbdb#..", + "...#####...", + "...........", + "...........", + "..........."}; + static TQPixmap pixmap( breakpoint_xpm ); + return &pixmap; +} + +const TQPixmap* KDevDebugger::reachedBreakpointPixmap() +{ + const char*breakpoint_bl_xpm[]={ + "11 16 7 1", + "a c #c0c0ff", + "# c #000000", + "c c #0000c0", + "e c #0000ff", + "b c #dcdcdc", + "d c #ffffff", + ". c None", + "...........", + "...........", + "...#####...", + "..#ababa#..", + ".#bcccccc#.", + "#acccccccc#", + "#bcadadace#", + "#acccccccc#", + "#bcadadace#", + "#acccccccc#", + ".#ccccccc#.", + "..#cecec#..", + "...#####...", + "...........", + "...........", + "..........."}; + static TQPixmap pixmap( breakpoint_bl_xpm ); + return &pixmap; +} + +const TQPixmap* KDevDebugger::disabledBreakpointPixmap() +{ + const char*breakpoint_wh_xpm[]={ + "11 16 7 1", + "a c #c0c0ff", + "# c #000000", + "c c #0000c0", + "e c #0000ff", + "b c #dcdcdc", + "d c #ffffff", + ". c None", + "...........", + "...........", + "...#####...", + "..#ddddd#..", + ".#ddddddd#.", + "#ddddddddd#", + "#ddddddddd#", + "#ddddddddd#", + "#ddddddddd#", + "#ddddddddd#", + ".#ddddddd#.", + "..#ddddd#..", + "...#####...", + "...........", + "...........", + "..........."}; + static TQPixmap pixmap( breakpoint_wh_xpm ); + return &pixmap; +} + +const TQPixmap* KDevDebugger::executionPointPixmap() +{ + const char*exec_xpm[]={ + "11 16 4 1", + "a c #00ff00", + "b c #000000", + ". c None", + "# c #00c000", + "...........", + "...........", + "...........", + "#a.........", + "#aaa.......", + "#aaaaa.....", + "#aaaaaaa...", + "#aaaaaaaaa.", + "#aaaaaaa#b.", + "#aaaaa#b...", + "#aaa#b.....", + "#a#b.......", + "#b.........", + "...........", + "...........", + "..........."}; + static TQPixmap pixmap( exec_xpm ); + return &pixmap; +} + +#include "kdevdebugger.moc" diff --git a/languages/lib/debugger/kdevdebugger.h b/languages/lib/debugger/kdevdebugger.h new file mode 100644 index 00000000..4cb7df3f --- /dev/null +++ b/languages/lib/debugger/kdevdebugger.h @@ -0,0 +1,89 @@ +/* This file is part of the KDE project + Copyright (C) 2002 Matthias Hoelzer-Kluepfel + Copyright (C) 2002 John Firebaugh + + 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 _KDEVDEBUGGER_H_ +#define _KDEVDEBUGGER_H_ + + +#include +#include + + +#include + +/** +* Base class to handle signals from the editor that relate to breakpoints +* and the execution point of the debugger. +*/ +class KDevDebugger : public TQObject +{ + Q_OBJECT + + +public: + + KDevDebugger(TQObject *parent=0, const char *name=0); + ~KDevDebugger(); + + /** + * Sets a breakpoint in the editor document belong to fileName. + * If id==-1, the breakpoint is deleted. + */ + virtual void setBreakpoint(const TQString &fileName, int lineNum, + int id, bool enabled, bool pending) = 0; + + /** + * Goes to a given location in a source file and marks the line. + * This is used by the debugger to mark the location where the + * the debugger has stopped. + */ + virtual void gotoExecutionPoint(const KURL &url, int lineNum=0) = 0; + + /** + * Clear the execution point. Usefull if debugging has ended. + */ + virtual void clearExecutionPoint() = 0; + + static const TQPixmap* inactiveBreakpointPixmap(); + static const TQPixmap* activeBreakpointPixmap(); + static const TQPixmap* reachedBreakpointPixmap(); + static const TQPixmap* disabledBreakpointPixmap(); + static const TQPixmap* executionPointPixmap(); + +signals: + + /** + * The user has toggled a breakpoint. + */ + void toggledBreakpoint(const TQString &fileName, int lineNum); + + /* + * The user wants to edit the properties of a breakpoint. + */ + void editedBreakpoint(const TQString &fileName, int lineNum); + + /** + * The user wants to enable/disable a breakpoint. + */ + void toggledBreakpointEnabled(const TQString &fileName, int lineNum); + +}; + + +#endif diff --git a/languages/lib/debugger/tdevdebugger.cpp b/languages/lib/debugger/tdevdebugger.cpp deleted file mode 100644 index e005491f..00000000 --- a/languages/lib/debugger/tdevdebugger.cpp +++ /dev/null @@ -1,182 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2002 Matthias Hoelzer-Kluepfel - Copyright (C) 2002 John Firebaugh - - 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 "tdevdebugger.h" - -TDevDebugger::TDevDebugger(TQObject *parent, const char *name) - : TQObject(parent, name) -{ -} - - -TDevDebugger::~TDevDebugger() -{ -} - -const TQPixmap* TDevDebugger::inactiveBreakpointPixmap() -{ - const char*breakpoint_gr_xpm[]={ - "11 16 6 1", - "c c #c6c6c6", - "d c #2c2c2c", - "# c #000000", - ". c None", - "a c #ffffff", - "b c #555555", - "...........", - "...........", - "...#####...", - "..#aaaaa#..", - ".#abbbbbb#.", - "#abbbbbbbb#", - "#abcacacbd#", - "#abbbbbbbb#", - "#abcacacbd#", - "#abbbbbbbb#", - ".#bbbbbbb#.", - "..#bdbdb#..", - "...#####...", - "...........", - "...........", - "..........."}; - static TQPixmap pixmap( breakpoint_gr_xpm ); - return &pixmap; -} - -const TQPixmap* TDevDebugger::activeBreakpointPixmap() -{ - const char* breakpoint_xpm[]={ - "11 16 6 1", - "c c #c6c6c6", - ". c None", - "# c #000000", - "d c #840000", - "a c #ffffff", - "b c #ff0000", - "...........", - "...........", - "...#####...", - "..#aaaaa#..", - ".#abbbbbb#.", - "#abbbbbbbb#", - "#abcacacbd#", - "#abbbbbbbb#", - "#abcacacbd#", - "#abbbbbbbb#", - ".#bbbbbbb#.", - "..#bdbdb#..", - "...#####...", - "...........", - "...........", - "..........."}; - static TQPixmap pixmap( breakpoint_xpm ); - return &pixmap; -} - -const TQPixmap* TDevDebugger::reachedBreakpointPixmap() -{ - const char*breakpoint_bl_xpm[]={ - "11 16 7 1", - "a c #c0c0ff", - "# c #000000", - "c c #0000c0", - "e c #0000ff", - "b c #dcdcdc", - "d c #ffffff", - ". c None", - "...........", - "...........", - "...#####...", - "..#ababa#..", - ".#bcccccc#.", - "#acccccccc#", - "#bcadadace#", - "#acccccccc#", - "#bcadadace#", - "#acccccccc#", - ".#ccccccc#.", - "..#cecec#..", - "...#####...", - "...........", - "...........", - "..........."}; - static TQPixmap pixmap( breakpoint_bl_xpm ); - return &pixmap; -} - -const TQPixmap* TDevDebugger::disabledBreakpointPixmap() -{ - const char*breakpoint_wh_xpm[]={ - "11 16 7 1", - "a c #c0c0ff", - "# c #000000", - "c c #0000c0", - "e c #0000ff", - "b c #dcdcdc", - "d c #ffffff", - ". c None", - "...........", - "...........", - "...#####...", - "..#ddddd#..", - ".#ddddddd#.", - "#ddddddddd#", - "#ddddddddd#", - "#ddddddddd#", - "#ddddddddd#", - "#ddddddddd#", - ".#ddddddd#.", - "..#ddddd#..", - "...#####...", - "...........", - "...........", - "..........."}; - static TQPixmap pixmap( breakpoint_wh_xpm ); - return &pixmap; -} - -const TQPixmap* TDevDebugger::executionPointPixmap() -{ - const char*exec_xpm[]={ - "11 16 4 1", - "a c #00ff00", - "b c #000000", - ". c None", - "# c #00c000", - "...........", - "...........", - "...........", - "#a.........", - "#aaa.......", - "#aaaaa.....", - "#aaaaaaa...", - "#aaaaaaaaa.", - "#aaaaaaa#b.", - "#aaaaa#b...", - "#aaa#b.....", - "#a#b.......", - "#b.........", - "...........", - "...........", - "..........."}; - static TQPixmap pixmap( exec_xpm ); - return &pixmap; -} - -#include "tdevdebugger.moc" diff --git a/languages/lib/debugger/tdevdebugger.h b/languages/lib/debugger/tdevdebugger.h deleted file mode 100644 index 3cfcd5de..00000000 --- a/languages/lib/debugger/tdevdebugger.h +++ /dev/null @@ -1,89 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2002 Matthias Hoelzer-Kluepfel - Copyright (C) 2002 John Firebaugh - - 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 _TDEVDEBUGGER_H_ -#define _TDEVDEBUGGER_H_ - - -#include -#include - - -#include - -/** -* Base class to handle signals from the editor that relate to breakpoints -* and the execution point of the debugger. -*/ -class TDevDebugger : public TQObject -{ - Q_OBJECT - - -public: - - TDevDebugger(TQObject *parent=0, const char *name=0); - ~TDevDebugger(); - - /** - * Sets a breakpoint in the editor document belong to fileName. - * If id==-1, the breakpoint is deleted. - */ - virtual void setBreakpoint(const TQString &fileName, int lineNum, - int id, bool enabled, bool pending) = 0; - - /** - * Goes to a given location in a source file and marks the line. - * This is used by the debugger to mark the location where the - * the debugger has stopped. - */ - virtual void gotoExecutionPoint(const KURL &url, int lineNum=0) = 0; - - /** - * Clear the execution point. Usefull if debugging has ended. - */ - virtual void clearExecutionPoint() = 0; - - static const TQPixmap* inactiveBreakpointPixmap(); - static const TQPixmap* activeBreakpointPixmap(); - static const TQPixmap* reachedBreakpointPixmap(); - static const TQPixmap* disabledBreakpointPixmap(); - static const TQPixmap* executionPointPixmap(); - -signals: - - /** - * The user has toggled a breakpoint. - */ - void toggledBreakpoint(const TQString &fileName, int lineNum); - - /* - * The user wants to edit the properties of a breakpoint. - */ - void editedBreakpoint(const TQString &fileName, int lineNum); - - /** - * The user wants to enable/disable a breakpoint. - */ - void toggledBreakpointEnabled(const TQString &fileName, int lineNum); - -}; - - -#endif diff --git a/languages/lib/designer_integration/Mainpage.dox b/languages/lib/designer_integration/Mainpage.dox index 43070931..1f2db949 100644 --- a/languages/lib/designer_integration/Mainpage.dox +++ b/languages/lib/designer_integration/Mainpage.dox @@ -10,18 +10,18 @@ This library contains base classes to implement GUI designer integration in lang \section usingintegration Using designer integration support library Each language support which wants to use integrated designer, must reimplement @code -virtual TDevDesignerIntegration *TDevLanguageSupport::designer(KInterfaceDesigner::DesignerType type) +virtual KDevDesignerIntegration *KDevLanguageSupport::designer(KInterfaceDesigner::DesignerType type) @endcode -method and return designer integration object (@ref TDevLanguageSupport base class returns 0). +method and return designer integration object (@ref KDevLanguageSupport base class returns 0). Qt designer integration can be easily implemented by reusing @ref QtDesignerIntegration base class. For example, designer method of a language support could look like: @code -TDevDesignerIntegration * MyLanguageSupportPart::designer(KInterfaceDesigner::DesignerType type) +KDevDesignerIntegration * MyLanguageSupportPart::designer(KInterfaceDesigner::DesignerType type) { - TDevDesignerIntegration *des = 0; + KDevDesignerIntegration *des = 0; switch (type) { case KInterfaceDesigner::QtDesigner: @@ -40,7 +40,7 @@ return des; @endcode In the code above m_designers is a designer cache declared as: @code -QMap m_designers; +QMap m_designers; @endcode MyLanguageImplementationWidget and MyLanguageQtDesignerIntegration classes are subclasses of @ref QtDesignerIntegration and @ref ImplementationWidget base classes. diff --git a/languages/lib/designer_integration/Makefile.am b/languages/lib/designer_integration/Makefile.am index 41c0395d..6e9680a9 100644 --- a/languages/lib/designer_integration/Makefile.am +++ b/languages/lib/designer_integration/Makefile.am @@ -4,13 +4,13 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ METASOURCES = AUTO libdesignerintegration_la_LDFLAGS = $(all_libraries) lib_LTLIBRARIES = libdesignerintegration.la -libdesignerintegration_la_LIBADD = $(top_builddir)/lib/interfaces/libtdevinterfaces.la $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) +libdesignerintegration_la_LIBADD = $(top_builddir)/lib/interfaces/libkdevinterfaces.la $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) libdesignerintegration_la_SOURCES = implementationwidgetbase.ui \ implementationwidget.cpp qtdesignerintegration.cpp langincludedirdir = $(includedir)/tdevelop/languages/designer_integration langincludedir_HEADERS = qtdesignerintegration.h implementationwidget.h implementationwidgetbase.h -DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils tdevinterfaces tdevutil -DOXYGEN_PROJECTNAME = TDevelop Designer Integration Support Library +DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils kdevinterfaces kdevutil +DOXYGEN_PROJECTNAME = KDevelop Designer Integration Support Library include ../../../Doxyfile.am diff --git a/languages/lib/designer_integration/implementationwidget.cpp b/languages/lib/designer_integration/implementationwidget.cpp index 314e9eeb..bdca4558 100644 --- a/languages/lib/designer_integration/implementationwidget.cpp +++ b/languages/lib/designer_integration/implementationwidget.cpp @@ -32,10 +32,10 @@ #include #include -#include +#include #include #include -#include +#include namespace ImplUtils{ class ClassItem: public TDEListViewItem{ @@ -61,7 +61,7 @@ private: }; } -ImplementationWidget::ImplementationWidget(TDevLanguageSupport *part, TQWidget* parent, const char* name, bool modal) +ImplementationWidget::ImplementationWidget(KDevLanguageSupport *part, TQWidget* parent, const char* name, bool modal) :CreateImplemenationWidgetBase(parent, name, modal), m_part(part) { } diff --git a/languages/lib/designer_integration/implementationwidget.h b/languages/lib/designer_integration/implementationwidget.h index c74947be..3dd53763 100644 --- a/languages/lib/designer_integration/implementationwidget.h +++ b/languages/lib/designer_integration/implementationwidget.h @@ -26,7 +26,7 @@ #include class TDEListViewItem; -class TDevLanguageSupport; +class KDevLanguageSupport; /** Base class for implementation creation widgets. @@ -42,7 +42,7 @@ class ImplementationWidget : public CreateImplemenationWidgetBase Q_OBJECT public: - ImplementationWidget(TDevLanguageSupport *part, TQWidget* parent = 0, const char* name = 0, bool modal = false); + ImplementationWidget(KDevLanguageSupport *part, TQWidget* parent = 0, const char* name = 0, bool modal = false); virtual ~ImplementationWidget(); /*$PUBLIC_FUNCTIONS$*/ @@ -77,7 +77,7 @@ protected slots: virtual void accept(); protected: - TDevLanguageSupport *m_part; + KDevLanguageSupport *m_part; ClassDom m_selectedClass; TQString m_formName; TQString m_baseClassName; diff --git a/languages/lib/designer_integration/qtdesignerintegration.cpp b/languages/lib/designer_integration/qtdesignerintegration.cpp index c2b9ab34..26912ba1 100644 --- a/languages/lib/designer_integration/qtdesignerintegration.cpp +++ b/languages/lib/designer_integration/qtdesignerintegration.cpp @@ -30,16 +30,16 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include "codemodel_utils.h" #include "implementationwidget.h" -QtDesignerIntegration::QtDesignerIntegration(TDevLanguageSupport *part, ImplementationWidget *impl, bool classHasDefinitions, const char* name) - :TDevDesignerIntegration(part, name), m_part(part), m_impl(impl), +QtDesignerIntegration::QtDesignerIntegration(KDevLanguageSupport *part, ImplementationWidget *impl, bool classHasDefinitions, const char* name) + :KDevDesignerIntegration(part, name), m_part(part), m_impl(impl), m_classHasDefinitions(classHasDefinitions) { } diff --git a/languages/lib/designer_integration/qtdesignerintegration.h b/languages/lib/designer_integration/qtdesignerintegration.h index faafec58..f76eecba 100644 --- a/languages/lib/designer_integration/qtdesignerintegration.h +++ b/languages/lib/designer_integration/qtdesignerintegration.h @@ -23,24 +23,24 @@ #include #include -#include "tdevdesignerintegration.h" +#include "kdevdesignerintegration.h" -class TDevLanguageSupport; +class KDevLanguageSupport; class ImplementationWidget; /** TQt Designer integration base class. -Contains language-independent implementation part of a @ref TDevDesignerIntegration interface. +Contains language-independent implementation part of a @ref KDevDesignerIntegration interface. Ready to use in KDevelop language support plugins. Subclasses of this class should reimplement only pure virtual functions in the common case. */ -class QtDesignerIntegration : public TDevDesignerIntegration +class QtDesignerIntegration : public KDevDesignerIntegration { Q_OBJECT public: - QtDesignerIntegration(TDevLanguageSupport *part, ImplementationWidget *impl, + QtDesignerIntegration(KDevLanguageSupport *part, ImplementationWidget *impl, bool classHasDefinitions, const char* name = 0); virtual ~QtDesignerIntegration(); @@ -73,7 +73,7 @@ protected: //Form file - derived class name TQMap m_implementations; - TDevLanguageSupport *m_part; + KDevLanguageSupport *m_part; ImplementationWidget *m_impl; bool m_classHasDefinitions; }; diff --git a/languages/lib/interfaces/CMakeLists.txt b/languages/lib/interfaces/CMakeLists.txt index e8af2f36..370eece3 100644 --- a/languages/lib/interfaces/CMakeLists.txt +++ b/languages/lib/interfaces/CMakeLists.txt @@ -22,7 +22,7 @@ link_directories( ##### headers ################################### -install( FILES tdevpcsimporter.h DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/languages/interfaces ) +install( FILES kdevpcsimporter.h DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/languages/interfaces ) ##### other data ################################ @@ -33,7 +33,7 @@ install( FILES tdeveloppcsimporter.desktop DESTINATION ${SERVICETYPES_INSTALL_DI ##### lang_interfaces (shared) ################## tde_add_library( lang_interfaces SHARED AUTOMOC - SOURCES tdevpcsimporter.cpp + SOURCES kdevpcsimporter.cpp VERSION 0.0.0 LINK ${TQT_LIBRARIES} DESTINATION ${LIB_INSTALL_DIR} diff --git a/languages/lib/interfaces/Makefile.am b/languages/lib/interfaces/Makefile.am index 127999e6..c3ed3d00 100644 --- a/languages/lib/interfaces/Makefile.am +++ b/languages/lib/interfaces/Makefile.am @@ -3,14 +3,14 @@ METASOURCES = AUTO langincludedirdir = $(includedir)/tdevelop/languages/interfaces lib_LTLIBRARIES = liblang_interfaces.la liblang_interfaces_la_LDFLAGS = $(all_libraries) -liblang_interfaces_la_SOURCES = tdevpcsimporter.cpp +liblang_interfaces_la_SOURCES = kdevpcsimporter.cpp liblang_interfaces_la_LIBADD = $(LIB_QT) -langincludedir_HEADERS = tdevpcsimporter.h +langincludedir_HEADERS = kdevpcsimporter.h INCLUDES = $(all_includes) servicetypedir = $(kde_servicetypesdir) servicetype_DATA = tdeveloppcsimporter.desktop -DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils tdevinterfaces tdevutil -DOXYGEN_PROJECTNAME = TDevelop Language Support Interfaces Library -DOXYGEN_DOCDIRPREFIX = tdevlang +DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils kdevinterfaces kdevutil +DOXYGEN_PROJECTNAME = KDevelop Language Support Interfaces Library +DOXYGEN_DOCDIRPREFIX = kdevlang include ../../../Doxyfile.am diff --git a/languages/lib/interfaces/kdevpcsimporter.cpp b/languages/lib/interfaces/kdevpcsimporter.cpp new file mode 100644 index 00000000..166cc862 --- /dev/null +++ b/languages/lib/interfaces/kdevpcsimporter.cpp @@ -0,0 +1,35 @@ +/* This file is part of TDevelop + 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 "kdevpcsimporter.h" +#include "kdevpcsimporter.moc" + +KDevPCSImporter::KDevPCSImporter( TQObject * parent, const char * name ) + : TQObject( parent, name ) +{ +} + +KDevPCSImporter::~ KDevPCSImporter( ) +{ +} + +TQWidget * KDevPCSImporter::createSettingsPage( TQWidget * /*parent*/, const char * /*name*/ ) +{ + return 0; +} diff --git a/languages/lib/interfaces/kdevpcsimporter.h b/languages/lib/interfaces/kdevpcsimporter.h new file mode 100644 index 00000000..870865cb --- /dev/null +++ b/languages/lib/interfaces/kdevpcsimporter.h @@ -0,0 +1,50 @@ +/* This file is part of TDevelop + 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 KDEVPCSIMPORTER_H +#define KDEVPCSIMPORTER_H + +#include +#include + +class TQWidget; + +/** +KDevelop persistent class store importer plugin. + +These plugins are used by language support plugins to fill symbol stores +with symbol information from certain files. The purpose of the importer +is to provide file selection wizard. +*/ +class KDevPCSImporter: public TQObject +{ + Q_OBJECT + +public: + KDevPCSImporter( TQObject* parent=0, const char* name=0 ); + virtual ~KDevPCSImporter(); + + virtual TQString dbName() const = 0; + virtual TQStringList includePaths() = 0; + virtual TQStringList fileList() = 0; + + virtual TQWidget* createSettingsPage( TQWidget* parent, const char* name=0 ); +}; + +#endif // KDEVPCSIMPORTER_H diff --git a/languages/lib/interfaces/tdevpcsimporter.cpp b/languages/lib/interfaces/tdevpcsimporter.cpp deleted file mode 100644 index 66e29c13..00000000 --- a/languages/lib/interfaces/tdevpcsimporter.cpp +++ /dev/null @@ -1,35 +0,0 @@ -/* This file is part of TDevelop - 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 "tdevpcsimporter.h" -#include "tdevpcsimporter.moc" - -TDevPCSImporter::TDevPCSImporter( TQObject * parent, const char * name ) - : TQObject( parent, name ) -{ -} - -TDevPCSImporter::~ TDevPCSImporter( ) -{ -} - -TQWidget * TDevPCSImporter::createSettingsPage( TQWidget * /*parent*/, const char * /*name*/ ) -{ - return 0; -} diff --git a/languages/lib/interfaces/tdevpcsimporter.h b/languages/lib/interfaces/tdevpcsimporter.h deleted file mode 100644 index 62878973..00000000 --- a/languages/lib/interfaces/tdevpcsimporter.h +++ /dev/null @@ -1,50 +0,0 @@ -/* This file is part of TDevelop - 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 TDEVPCSIMPORTER_H -#define TDEVPCSIMPORTER_H - -#include -#include - -class TQWidget; - -/** -KDevelop persistent class store importer plugin. - -These plugins are used by language support plugins to fill symbol stores -with symbol information from certain files. The purpose of the importer -is to provide file selection wizard. -*/ -class TDevPCSImporter: public TQObject -{ - Q_OBJECT - -public: - TDevPCSImporter( TQObject* parent=0, const char* name=0 ); - virtual ~TDevPCSImporter(); - - virtual TQString dbName() const = 0; - virtual TQStringList includePaths() = 0; - virtual TQStringList fileList() = 0; - - virtual TQWidget* createSettingsPage( TQWidget* parent, const char* name=0 ); -}; - -#endif // TDEVPCSIMPORTER_H diff --git a/languages/pascal/CMakeLists.txt b/languages/pascal/CMakeLists.txt index cd398415..7449570e 100644 --- a/languages/pascal/CMakeLists.txt +++ b/languages/pascal/CMakeLists.txt @@ -34,18 +34,18 @@ link_directories( ##### other data ################################ -install( FILES tdevpascalsupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevpascalsupport.rc DESTINATION ${DATA_INSTALL_DIR}/tdevpascalsupport ) -install( FILES pascaltemplates DESTINATION ${DATA_INSTALL_DIR}/tdevabbrev/templates ) +install( FILES kdevpascalsupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevpascalsupport.rc DESTINATION ${DATA_INSTALL_DIR}/kdevpascalsupport ) +install( FILES pascaltemplates DESTINATION ${DATA_INSTALL_DIR}/kdevabbrev/templates ) -##### libtdevpascalsupport (module) ############# +##### libkdevpascalsupport (module) ############# -tde_add_kpart( libtdevpascalsupport AUTOMOC +tde_add_kpart( libkdevpascalsupport AUTOMOC SOURCES pascalsupport_part.cpp PascalLexer.cpp PascalParser.cpp PascalStoreWalker.cpp backgroundparser.cpp configproblemreporter.ui problemreporter.cpp - LINK antlr-static tdevcatalog-shared tdevelop-shared + LINK antlr-static kdevcatalog-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/languages/pascal/Makefile.am b/languages/pascal/Makefile.am index 403f37f9..9d168734 100644 --- a/languages/pascal/Makefile.am +++ b/languages/pascal/Makefile.am @@ -5,19 +5,19 @@ INCLUDES = -I$(top_srcdir)/lib/antlr -I$(top_srcdir)/lib/catalog \ $(all_includes) SUBDIRS = file_templates app_templates compiler doc -kde_module_LTLIBRARIES = libtdevpascalsupport.la -libtdevpascalsupport_la_LDFLAGS = $(LEXLIB) $(all_libraries) $(KDE_PLUGIN) -libtdevpascalsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/antlr/src/libantlr.la $(top_builddir)/lib/catalog/libtdevcatalog.la +kde_module_LTLIBRARIES = libkdevpascalsupport.la +libkdevpascalsupport_la_LDFLAGS = $(LEXLIB) $(all_libraries) $(KDE_PLUGIN) +libkdevpascalsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/antlr/src/libantlr.la $(top_builddir)/lib/catalog/libkdevcatalog.la -libtdevpascalsupport_la_SOURCES = pascalsupport_part.cpp PascalLexer.cpp PascalParser.cpp PascalStoreWalker.cpp backgroundparser.cpp configproblemreporter.ui problemreporter.cpp +libkdevpascalsupport_la_SOURCES = pascalsupport_part.cpp PascalLexer.cpp PascalParser.cpp PascalStoreWalker.cpp backgroundparser.cpp configproblemreporter.ui problemreporter.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevpascalsupport.desktop +service_DATA = kdevpascalsupport.desktop -rcdir = $(kde_datadir)/tdevpascalsupport -rc_DATA = tdevpascalsupport.rc +rcdir = $(kde_datadir)/kdevpascalsupport +rc_DATA = kdevpascalsupport.rc genparser: antlr pascal.g && antlr pascal.tree.g @@ -29,5 +29,5 @@ genparser: #PascalStoreWalker.hpp PascalStoreWalker.cpp: pascal.tree.g # antlr pascal.tree.g -templatedir = ${kde_datadir}/tdevabbrev/templates +templatedir = ${kde_datadir}/kdevabbrev/templates template_DATA = pascaltemplates diff --git a/languages/pascal/app_templates/fpcgtk/CMakeLists.txt b/languages/pascal/app_templates/fpcgtk/CMakeLists.txt index b4a2e071..eb16e978 100644 --- a/languages/pascal/app_templates/fpcgtk/CMakeLists.txt +++ b/languages/pascal/app_templates/fpcgtk/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( fpcgtk.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/fpcgtk.tar.gz fpcgtk.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - fpcgtk.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + fpcgtk.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/pascal/app_templates/fpcgtk/Makefile.am b/languages/pascal/app_templates/fpcgtk/Makefile.am index e9744c9b..5c4c116f 100644 --- a/languages/pascal/app_templates/fpcgtk/Makefile.am +++ b/languages/pascal/app_templates/fpcgtk/Makefile.am @@ -2,10 +2,10 @@ dataFiles = main.pp app.tdevelop templateName = fpcgtk ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/pascal/app_templates/fpcgtk/app.tdevelop b/languages/pascal/app_templates/fpcgtk/app.tdevelop index bbd6d777..e7b3a147 100644 --- a/languages/pascal/app_templates/fpcgtk/app.tdevelop +++ b/languages/pascal/app_templates/fpcgtk/app.tdevelop @@ -11,7 +11,7 @@ Code - + default @@ -26,8 +26,8 @@ false - - + + ada ada_bugs_gcc @@ -75,12 +75,12 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/languages/pascal/app_templates/fpcgtk/fpcgtk.kdevtemplate b/languages/pascal/app_templates/fpcgtk/fpcgtk.kdevtemplate new file mode 100644 index 00000000..45bb7eea --- /dev/null +++ b/languages/pascal/app_templates/fpcgtk/fpcgtk.kdevtemplate @@ -0,0 +1,114 @@ +# KDE Config File +[General] +Name=GTK+ application +Name[ca]=Aplicació GTK+ +Name[da]=GTK+ program +Name[de]=GTK+-Anwendung +Name[el]=Εφαρμογή GTK+ +Name[es]=Aplicación GTK+ +Name[et]=GTK+ rakendus +Name[eu]=GTK+ aplikazioa +Name[fa]=کاربرد GTK+ +Name[fr]=Application GTK+ +Name[ga]=Feidhmchlár GTK+ +Name[gl]=Aplicación GTK+ +Name[hu]=GTK+-alapú alkalmazás +Name[it]=Applicazione GTK+ +Name[ja]=GTK+ アプリケーション +Name[nds]=GTK+-Programm +Name[ne]=GTK+ अनुप्रयोग +Name[nl]=GTK+-toepassing +Name[pl]=Program GTK+ +Name[pt]=Aplicação do GTK+ +Name[pt_BR]=Aplicativo GTK+ +Name[ru]=Приложение GTK+ +Name[sk]=GTK+ aplikácia +Name[sr]=GTK+ програм +Name[sr@Latn]=GTK+ program +Name[sv]=GTK+ program +Name[tr]=GTK+ Uygulaması +Name[zh_CN]=GTK+ 应用程序 +Name[zh_TW]=GTK+ 應用程式 +Category=Pascal/Free Pascal +Comment=Generates a GTK+ based GUI application in Pascal +Comment[ca]=Genera una aplicació IGU en Pascal basada en GTK+ +Comment[da]=Genererer et GTK+ baseret GUI program i Pascal +Comment[de]=Erstellt eine auf GTK+ basierende GUI-Anwendung in Pascal +Comment[el]=Δημιουργεί μια γραφική εφαρμογή βασισμένη στο GTK+ σε Pascal +Comment[es]=Genera una aplicación gráfica en Pascal basada en GTK+ +Comment[et]=Graafilise rakenduse loomine GTK+ põhjal Pascalis +Comment[eu]=GTK+-en oinarritutako GUI aplikazio bat sortzen du Pascal-en +Comment[fa]=یک کاربرد ونک بر مبنای GTK+ در پاسکال تولید می‌کند +Comment[fr]=Génère une application avec interface graphique basée sur GTK+ en Pascal +Comment[ga]=Cruthaigh feidhmchlár grafach i Pascal, bunaithe ar GTK+ +Comment[gl]=Xera unha aplicación GUI baseada en GTK+ en Pascal +Comment[hu]=Létrehoz egy GTK+-alapú grafikus felületű alkalmazást Pascalban +Comment[it]=Genera un'applicazione GUI basata su GTK+ in Pascal +Comment[ja]=GTK+ ベースの GUI アプリケーションを Pascal で作成します +Comment[nds]=Stellt en op GTK+ opbuut Böversietprogramm in Pascal op +Comment[ne]= GTK+ आधारित जी यू आई अनुप्रयोगलाई पास्कलमा उत्पन्न गर्दछ +Comment[nl]=Genereert een GKT+-gebaseerde GUI-toepassing in Pascal +Comment[pl]=Generuje program z graficznym interfejsem użytkownika używający GTK+ w Pascalu +Comment[pt]=Gera uma aplicação gráfica, baseada em GTK+, em Pascal +Comment[pt_BR]=Gera uma aplicação gráfica, baseada em GTK+, em Pascal +Comment[ru]=Создание приложения GTK+ на Pascal +Comment[sk]=Vygeneruje GTK+ GUI aplikáciu v Pascal +Comment[sr]=Прави GUI програм на основу GTK+ у Pascal-у +Comment[sr@Latn]=Pravi GUI program na osnovu GTK+ u Pascal-u +Comment[sv]=Skapar ett GTK+ baserat program med grafiskt användargränssnitt i Pascal +Comment[zh_CN]=生成一个 Pascal 语言的 GTK+ GUI 应用程序 +Comment[zh_TW]=產生一個 Pascal 語言,以GTK+ 為基礎的使用者介面應用程式 +FileTemplates=pp-program,PStyle,pp-unit,PStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.pp +Archive=fpcgtk.tar.gz + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE2] +Type=install +Source=%{src}/main.pp +Dest=%{dest}/src/%{APPNAMELC}.pp + +[MSG] +Type=message +Comment=A GTK+ application written in pascal was created in %{dest} +Comment[ca]=Una aplicació GTK+ escrita en Pascal ha estat creada en %{dest} +Comment[da]=Et GTK+ program skrevet i pascal blev oprettet i %{dest} +Comment[de]=Eine in Pascal geschriebene GTK+-Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή GTK+ γραμμένη σε pascal δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación GTK+ escrita en Pascal ha sido creada en %{dest} +Comment[et]=GTK+ rakendus Pascalis loodi asukohta %{dest} +Comment[eu]=Pascal-en idatzitako GTK+ aplikazio bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد GTK+ نوشته‌شده در پاسکال در %{dest} ایجاد شد +Comment[fr]=Une application GTK+ écrite en Pascal a été créée dans %{dest} +Comment[ga]=Cruthaíodh feidhmchlár GTK+, scríofa i pascal, i %{dest} +Comment[gl]=Creouse unha aplicación GTK+ escrita en pascal en %{dest} +Comment[hu]=Létrejött egy egyszerű, Pascal nyelvű, GTK+-alapú alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione GTK+ scritta in Pascal in %{dest} +Comment[ja]=Pascal で書かれた GTK+ アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Pascal-Programm för GTK+ opstellt +Comment[ne]=पास्कलमा लेखिएको GTK+ अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een GTK+-toepassing geschreven in Pascal is aangemaakt in %{dest} +Comment[pl]=Program GTK+ napisany w Pascalu został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação GTK+, escrita em Pascal, em %{dest} +Comment[pt_BR]=Foi criada uma aplicação GTK+, escrita em Pascal, em %{dest} +Comment[ru]=Приложение GTK+ на Pascal создано в %{dest} +Comment[sk]=GTK+ aplikácia v Pascal bola vytvorená v %{dest} +Comment[sr]=GTK+ програм у Pascal-у направљен је у %{dest} +Comment[sr@Latn]=GTK+ program u Pascal-u napravljen je u %{dest} +Comment[sv]=Ett GTK+ program skrivet i Pascal skapades i %{dest} +Comment[tr]=Pascal'da yazılmış bir GTK+ uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 创建了 Pascal 语言的 GTK+ 应用程序 +Comment[zh_TW]=一個 Pascal 的 GTK+ 應用程式已建立於 %{dest} diff --git a/languages/pascal/app_templates/fpcgtk/fpcgtk.tdevtemplate b/languages/pascal/app_templates/fpcgtk/fpcgtk.tdevtemplate deleted file mode 100644 index d0103844..00000000 --- a/languages/pascal/app_templates/fpcgtk/fpcgtk.tdevtemplate +++ /dev/null @@ -1,114 +0,0 @@ -# KDE Config File -[General] -Name=GTK+ application -Name[ca]=Aplicació GTK+ -Name[da]=GTK+ program -Name[de]=GTK+-Anwendung -Name[el]=Εφαρμογή GTK+ -Name[es]=Aplicación GTK+ -Name[et]=GTK+ rakendus -Name[eu]=GTK+ aplikazioa -Name[fa]=کاربرد GTK+ -Name[fr]=Application GTK+ -Name[ga]=Feidhmchlár GTK+ -Name[gl]=Aplicación GTK+ -Name[hu]=GTK+-alapú alkalmazás -Name[it]=Applicazione GTK+ -Name[ja]=GTK+ アプリケーション -Name[nds]=GTK+-Programm -Name[ne]=GTK+ अनुप्रयोग -Name[nl]=GTK+-toepassing -Name[pl]=Program GTK+ -Name[pt]=Aplicação do GTK+ -Name[pt_BR]=Aplicativo GTK+ -Name[ru]=Приложение GTK+ -Name[sk]=GTK+ aplikácia -Name[sr]=GTK+ програм -Name[sr@Latn]=GTK+ program -Name[sv]=GTK+ program -Name[tr]=GTK+ Uygulaması -Name[zh_CN]=GTK+ 应用程序 -Name[zh_TW]=GTK+ 應用程式 -Category=Pascal/Free Pascal -Comment=Generates a GTK+ based GUI application in Pascal -Comment[ca]=Genera una aplicació IGU en Pascal basada en GTK+ -Comment[da]=Genererer et GTK+ baseret GUI program i Pascal -Comment[de]=Erstellt eine auf GTK+ basierende GUI-Anwendung in Pascal -Comment[el]=Δημιουργεί μια γραφική εφαρμογή βασισμένη στο GTK+ σε Pascal -Comment[es]=Genera una aplicación gráfica en Pascal basada en GTK+ -Comment[et]=Graafilise rakenduse loomine GTK+ põhjal Pascalis -Comment[eu]=GTK+-en oinarritutako GUI aplikazio bat sortzen du Pascal-en -Comment[fa]=یک کاربرد ونک بر مبنای GTK+ در پاسکال تولید می‌کند -Comment[fr]=Génère une application avec interface graphique basée sur GTK+ en Pascal -Comment[ga]=Cruthaigh feidhmchlár grafach i Pascal, bunaithe ar GTK+ -Comment[gl]=Xera unha aplicación GUI baseada en GTK+ en Pascal -Comment[hu]=Létrehoz egy GTK+-alapú grafikus felületű alkalmazást Pascalban -Comment[it]=Genera un'applicazione GUI basata su GTK+ in Pascal -Comment[ja]=GTK+ ベースの GUI アプリケーションを Pascal で作成します -Comment[nds]=Stellt en op GTK+ opbuut Böversietprogramm in Pascal op -Comment[ne]= GTK+ आधारित जी यू आई अनुप्रयोगलाई पास्कलमा उत्पन्न गर्दछ -Comment[nl]=Genereert een GKT+-gebaseerde GUI-toepassing in Pascal -Comment[pl]=Generuje program z graficznym interfejsem użytkownika używający GTK+ w Pascalu -Comment[pt]=Gera uma aplicação gráfica, baseada em GTK+, em Pascal -Comment[pt_BR]=Gera uma aplicação gráfica, baseada em GTK+, em Pascal -Comment[ru]=Создание приложения GTK+ на Pascal -Comment[sk]=Vygeneruje GTK+ GUI aplikáciu v Pascal -Comment[sr]=Прави GUI програм на основу GTK+ у Pascal-у -Comment[sr@Latn]=Pravi GUI program na osnovu GTK+ u Pascal-u -Comment[sv]=Skapar ett GTK+ baserat program med grafiskt användargränssnitt i Pascal -Comment[zh_CN]=生成一个 Pascal 语言的 GTK+ GUI 应用程序 -Comment[zh_TW]=產生一個 Pascal 語言,以GTK+ 為基礎的使用者介面應用程式 -FileTemplates=pp-program,PStyle,pp-unit,PStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.pp -Archive=fpcgtk.tar.gz - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE2] -Type=install -Source=%{src}/main.pp -Dest=%{dest}/src/%{APPNAMELC}.pp - -[MSG] -Type=message -Comment=A GTK+ application written in pascal was created in %{dest} -Comment[ca]=Una aplicació GTK+ escrita en Pascal ha estat creada en %{dest} -Comment[da]=Et GTK+ program skrevet i pascal blev oprettet i %{dest} -Comment[de]=Eine in Pascal geschriebene GTK+-Anwendung wurde in %{dest} erstellt. -Comment[el]=Μια εφαρμογή GTK+ γραμμένη σε pascal δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación GTK+ escrita en Pascal ha sido creada en %{dest} -Comment[et]=GTK+ rakendus Pascalis loodi asukohta %{dest} -Comment[eu]=Pascal-en idatzitako GTK+ aplikazio bat sortu da hemen: %{dest} -Comment[fa]=یک کاربرد GTK+ نوشته‌شده در پاسکال در %{dest} ایجاد شد -Comment[fr]=Une application GTK+ écrite en Pascal a été créée dans %{dest} -Comment[ga]=Cruthaíodh feidhmchlár GTK+, scríofa i pascal, i %{dest} -Comment[gl]=Creouse unha aplicación GTK+ escrita en pascal en %{dest} -Comment[hu]=Létrejött egy egyszerű, Pascal nyelvű, GTK+-alapú alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione GTK+ scritta in Pascal in %{dest} -Comment[ja]=Pascal で書かれた GTK+ アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Pascal-Programm för GTK+ opstellt -Comment[ne]=पास्कलमा लेखिएको GTK+ अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een GTK+-toepassing geschreven in Pascal is aangemaakt in %{dest} -Comment[pl]=Program GTK+ napisany w Pascalu został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação GTK+, escrita em Pascal, em %{dest} -Comment[pt_BR]=Foi criada uma aplicação GTK+, escrita em Pascal, em %{dest} -Comment[ru]=Приложение GTK+ на Pascal создано в %{dest} -Comment[sk]=GTK+ aplikácia v Pascal bola vytvorená v %{dest} -Comment[sr]=GTK+ програм у Pascal-у направљен је у %{dest} -Comment[sr@Latn]=GTK+ program u Pascal-u napravljen je u %{dest} -Comment[sv]=Ett GTK+ program skrivet i Pascal skapades i %{dest} -Comment[tr]=Pascal'da yazılmış bir GTK+ uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 创建了 Pascal 语言的 GTK+ 应用程序 -Comment[zh_TW]=一個 Pascal 的 GTK+ 應用程式已建立於 %{dest} diff --git a/languages/pascal/app_templates/fpchello/CMakeLists.txt b/languages/pascal/app_templates/fpchello/CMakeLists.txt index 37ac3aa9..12941440 100644 --- a/languages/pascal/app_templates/fpchello/CMakeLists.txt +++ b/languages/pascal/app_templates/fpchello/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( fpchello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/fpchello.tar.gz fpchello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - fpchello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + fpchello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/pascal/app_templates/fpchello/Makefile.am b/languages/pascal/app_templates/fpchello/Makefile.am index f5567a09..744bc214 100644 --- a/languages/pascal/app_templates/fpchello/Makefile.am +++ b/languages/pascal/app_templates/fpchello/Makefile.am @@ -2,10 +2,10 @@ dataFiles = main.pp app.tdevelop templateName = fpchello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/pascal/app_templates/fpchello/app.tdevelop b/languages/pascal/app_templates/fpchello/app.tdevelop index 603e6e6b..a2f83092 100644 --- a/languages/pascal/app_templates/fpchello/app.tdevelop +++ b/languages/pascal/app_templates/fpchello/app.tdevelop @@ -11,7 +11,7 @@ Code - + default @@ -26,8 +26,8 @@ true - - + + ada ada_bugs_gcc @@ -75,12 +75,12 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/languages/pascal/app_templates/fpchello/fpchello.kdevtemplate b/languages/pascal/app_templates/fpchello/fpchello.kdevtemplate new file mode 100644 index 00000000..65c46115 --- /dev/null +++ b/languages/pascal/app_templates/fpchello/fpchello.kdevtemplate @@ -0,0 +1,115 @@ +# KDE Config File +[General] +Name=Simple program +Name[ca]=Simple programa +Name[da]=Simpelt program +Name[de]=Einfaches Programm +Name[el]=Απλό πρόγραμμα +Name[es]=Programa sencillo +Name[et]=Lihtne programm +Name[eu]=Programa sinplea +Name[fa]=برنامۀ ساده +Name[fr]=Programme simple +Name[ga]=Ríomhchlár simplí +Name[gl]=Programa sinxelo +Name[hu]=Egyszerű program +Name[it]=Semplice programma +Name[ja]=簡単なプログラム +Name[nds]=Eenfach Programm +Name[ne]=साधारण कार्यक्रम +Name[nl]=Eenvoudig programma +Name[pl]=Prosty program +Name[pt]=Programa simples +Name[pt_BR]=Programa simples +Name[ru]=Простое приложение +Name[sk]=Jednoduchý prohram +Name[sr]=Једноставан програм +Name[sr@Latn]=Jednostavan program +Name[sv]=Enkelt program +Name[tr]=Basit program +Name[zh_CN]=简单程序 +Name[zh_TW]=簡單程式 +Category=Pascal/Free Pascal +Comment=Generates a simple program in Pascal +Comment[ca]=Genera un simple programa en Pascal +Comment[da]=Genererer et simpelt program i Pascal +Comment[de]=Erstellt ein einfaches Programm in Pascal +Comment[el]=Δημιουργεί ένα απλό πρόγραμμα σε Pascal +Comment[es]=Genera un sencillo programa en Pascal +Comment[et]=Lihtsa programmi loomine Pascalis +Comment[eu]=Pascal-en idatzitako programa sinple bat +Comment[fa]=یک برنامۀ ساده در پاسکال تولید می‌کند +Comment[fr]=Génère un programme simple en Pascal +Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí i Pascal +Comment[gl]=Xera un programa sinxelo en Pascal +Comment[hu]=Létrehoz egy egyszerű programot Pascalban +Comment[it]=Genera un semplice programma in Pascal +Comment[ja]=簡単なプログラムを Pascal で作成します +Comment[nds]=Stellt en eenfach Pascal-Programm op +Comment[ne]=पास्कलमा साधारण कार्यक्रम उत्पन्न गर्दछ +Comment[nl]=Genereert een eenvoudig programma in Pascal +Comment[pl]=Generuje prosty program w Pascalu +Comment[pt]=Gera um programa simples em Pascal +Comment[pt_BR]=Gera um programa simples em Pascal +Comment[ru]=Создание простого приложения на Pascal +Comment[sk]=Vygeneruje jednoduchý program v Pascal +Comment[sr]=Прави једноставан програм у Pascal-у +Comment[sr@Latn]=Pravi jednostavan program u Pascal-u +Comment[sv]=Skapar ett enkelt program i Pascal +Comment[tr]=Pascal'da basit bir program yaratır +Comment[zh_CN]=生成一个简单的 Pascal 语言程序 +Comment[zh_TW]=產生一個 Pascal 的簡單程式 +FileTemplates=pp-program,PStyle,pp-unit,PStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.pp +Archive=fpchello.tar.gz + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE2] +Type=install +Source=%{src}/main.pp +Dest=%{dest}/src/%{APPNAMELC}.pp + +[MSG] +Type=message +Comment=A simple pascal program was created in %{dest} +Comment[ca]=Un simple programa en Pascal ha estat creat en %{dest} +Comment[da]=Et simpelt pascal program blev oprettet i %{dest} +Comment[de]=Ein einfaches Programm in Pascal wurde in %{dest} erstellt. +Comment[el]=Ένα απλό πρόγραμμα pascal δημιουργήθηκε στο %{dest} +Comment[es]=Un sencillo programa en Pascal ha sido creado en %{dest} +Comment[et]=Lihtne Pascali programm loodi asukohta %{dest} +Comment[eu]=Pascal-en oinarritutako programa sinple bat sortu da hemen: %{dest} +Comment[fa]=یک برنامۀ سادۀ پاسکال در %{dest} ایجاد شد +Comment[fr]=Un programme Pascal simple a été créé dans %{dest} +Comment[ga]=Cruthaíodh ríomhchlár simplí pascal i %{dest} +Comment[gl]=Creouse un programa sinxelo en pascal en %{dest} +Comment[hu]=Létrejött egy egyszerű Pascal-program itt: %{dest} +Comment[it]=È stato creato un semplice programma Pascal in %{dest} +Comment[ja]=簡単な Pascal プログラムを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en eenfach Pascal-Programm opstellt +Comment[ne]=साधारण पास्कल कार्यक्रम %{dest} मा सिर्जना गरियो +Comment[nl]=Een eenvoudig Pascal-programma is aangemaakt in %{dest} +Comment[pl]=Prosty program w Pascalu został utworzony w %{dest} +Comment[pt]=Foi criado um programa simples em Pascal em %{dest} +Comment[pt_BR]=Foi criado um programa simples em Pascal em %{dest} +Comment[ru]=Простое приложение на Pascal создано в %{dest} +Comment[sk]=Jednoduchý program v Pascal bol vytvorený v %{dest} +Comment[sr]=Једноставан pascal програм направљен је у %{dest} +Comment[sr@Latn]=Jednostavan pascal program napravljen je u %{dest} +Comment[sv]=Ett enkelt Pascal-program skapades i %{dest} +Comment[tr]=Pascal'da basit bir program %{dest} içinde yaratıldı +Comment[zh_CN]=在 %{dest} 创建了一个简单的 Pascal 程序 +Comment[zh_TW]=一個簡單的 Pascal 程式已建立於 %{dest} diff --git a/languages/pascal/app_templates/fpchello/fpchello.tdevtemplate b/languages/pascal/app_templates/fpchello/fpchello.tdevtemplate deleted file mode 100644 index 21c213f4..00000000 --- a/languages/pascal/app_templates/fpchello/fpchello.tdevtemplate +++ /dev/null @@ -1,115 +0,0 @@ -# KDE Config File -[General] -Name=Simple program -Name[ca]=Simple programa -Name[da]=Simpelt program -Name[de]=Einfaches Programm -Name[el]=Απλό πρόγραμμα -Name[es]=Programa sencillo -Name[et]=Lihtne programm -Name[eu]=Programa sinplea -Name[fa]=برنامۀ ساده -Name[fr]=Programme simple -Name[ga]=Ríomhchlár simplí -Name[gl]=Programa sinxelo -Name[hu]=Egyszerű program -Name[it]=Semplice programma -Name[ja]=簡単なプログラム -Name[nds]=Eenfach Programm -Name[ne]=साधारण कार्यक्रम -Name[nl]=Eenvoudig programma -Name[pl]=Prosty program -Name[pt]=Programa simples -Name[pt_BR]=Programa simples -Name[ru]=Простое приложение -Name[sk]=Jednoduchý prohram -Name[sr]=Једноставан програм -Name[sr@Latn]=Jednostavan program -Name[sv]=Enkelt program -Name[tr]=Basit program -Name[zh_CN]=简单程序 -Name[zh_TW]=簡單程式 -Category=Pascal/Free Pascal -Comment=Generates a simple program in Pascal -Comment[ca]=Genera un simple programa en Pascal -Comment[da]=Genererer et simpelt program i Pascal -Comment[de]=Erstellt ein einfaches Programm in Pascal -Comment[el]=Δημιουργεί ένα απλό πρόγραμμα σε Pascal -Comment[es]=Genera un sencillo programa en Pascal -Comment[et]=Lihtsa programmi loomine Pascalis -Comment[eu]=Pascal-en idatzitako programa sinple bat -Comment[fa]=یک برنامۀ ساده در پاسکال تولید می‌کند -Comment[fr]=Génère un programme simple en Pascal -Comment[ga]=Cruthaíonn sé seo ríomhchlár simplí i Pascal -Comment[gl]=Xera un programa sinxelo en Pascal -Comment[hu]=Létrehoz egy egyszerű programot Pascalban -Comment[it]=Genera un semplice programma in Pascal -Comment[ja]=簡単なプログラムを Pascal で作成します -Comment[nds]=Stellt en eenfach Pascal-Programm op -Comment[ne]=पास्कलमा साधारण कार्यक्रम उत्पन्न गर्दछ -Comment[nl]=Genereert een eenvoudig programma in Pascal -Comment[pl]=Generuje prosty program w Pascalu -Comment[pt]=Gera um programa simples em Pascal -Comment[pt_BR]=Gera um programa simples em Pascal -Comment[ru]=Создание простого приложения на Pascal -Comment[sk]=Vygeneruje jednoduchý program v Pascal -Comment[sr]=Прави једноставан програм у Pascal-у -Comment[sr@Latn]=Pravi jednostavan program u Pascal-u -Comment[sv]=Skapar ett enkelt program i Pascal -Comment[tr]=Pascal'da basit bir program yaratır -Comment[zh_CN]=生成一个简单的 Pascal 语言程序 -Comment[zh_TW]=產生一個 Pascal 的簡單程式 -FileTemplates=pp-program,PStyle,pp-unit,PStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.pp -Archive=fpchello.tar.gz - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE2] -Type=install -Source=%{src}/main.pp -Dest=%{dest}/src/%{APPNAMELC}.pp - -[MSG] -Type=message -Comment=A simple pascal program was created in %{dest} -Comment[ca]=Un simple programa en Pascal ha estat creat en %{dest} -Comment[da]=Et simpelt pascal program blev oprettet i %{dest} -Comment[de]=Ein einfaches Programm in Pascal wurde in %{dest} erstellt. -Comment[el]=Ένα απλό πρόγραμμα pascal δημιουργήθηκε στο %{dest} -Comment[es]=Un sencillo programa en Pascal ha sido creado en %{dest} -Comment[et]=Lihtne Pascali programm loodi asukohta %{dest} -Comment[eu]=Pascal-en oinarritutako programa sinple bat sortu da hemen: %{dest} -Comment[fa]=یک برنامۀ سادۀ پاسکال در %{dest} ایجاد شد -Comment[fr]=Un programme Pascal simple a été créé dans %{dest} -Comment[ga]=Cruthaíodh ríomhchlár simplí pascal i %{dest} -Comment[gl]=Creouse un programa sinxelo en pascal en %{dest} -Comment[hu]=Létrejött egy egyszerű Pascal-program itt: %{dest} -Comment[it]=È stato creato un semplice programma Pascal in %{dest} -Comment[ja]=簡単な Pascal プログラムを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en eenfach Pascal-Programm opstellt -Comment[ne]=साधारण पास्कल कार्यक्रम %{dest} मा सिर्जना गरियो -Comment[nl]=Een eenvoudig Pascal-programma is aangemaakt in %{dest} -Comment[pl]=Prosty program w Pascalu został utworzony w %{dest} -Comment[pt]=Foi criado um programa simples em Pascal em %{dest} -Comment[pt_BR]=Foi criado um programa simples em Pascal em %{dest} -Comment[ru]=Простое приложение на Pascal создано в %{dest} -Comment[sk]=Jednoduchý program v Pascal bol vytvorený v %{dest} -Comment[sr]=Једноставан pascal програм направљен је у %{dest} -Comment[sr@Latn]=Jednostavan pascal program napravljen je u %{dest} -Comment[sv]=Ett enkelt Pascal-program skapades i %{dest} -Comment[tr]=Pascal'da basit bir program %{dest} içinde yaratıldı -Comment[zh_CN]=在 %{dest} 创建了一个简单的 Pascal 程序 -Comment[zh_TW]=一個簡單的 Pascal 程式已建立於 %{dest} diff --git a/languages/pascal/app_templates/fpcsharedlib/CMakeLists.txt b/languages/pascal/app_templates/fpcsharedlib/CMakeLists.txt index 779eda2d..52a5e4f7 100644 --- a/languages/pascal/app_templates/fpcsharedlib/CMakeLists.txt +++ b/languages/pascal/app_templates/fpcsharedlib/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( fpcsharedlib.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/fpcsharedlib.tar.gz fpcsharedlib.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - fpcsharedlib.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + fpcsharedlib.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/pascal/app_templates/fpcsharedlib/Makefile.am b/languages/pascal/app_templates/fpcsharedlib/Makefile.am index 13194e81..d1d0eef4 100644 --- a/languages/pascal/app_templates/fpcsharedlib/Makefile.am +++ b/languages/pascal/app_templates/fpcsharedlib/Makefile.am @@ -2,10 +2,10 @@ dataFiles = main.pp app.tdevelop templateName = fpcsharedlib ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/pascal/app_templates/fpcsharedlib/app.tdevelop b/languages/pascal/app_templates/fpcsharedlib/app.tdevelop index e0289480..8249e017 100644 --- a/languages/pascal/app_templates/fpcsharedlib/app.tdevelop +++ b/languages/pascal/app_templates/fpcsharedlib/app.tdevelop @@ -11,7 +11,7 @@ Code - + default @@ -26,8 +26,8 @@ true - - + + ada ada_bugs_gcc @@ -75,12 +75,12 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/languages/pascal/app_templates/fpcsharedlib/fpcsharedlib.kdevtemplate b/languages/pascal/app_templates/fpcsharedlib/fpcsharedlib.kdevtemplate new file mode 100644 index 00000000..35835599 --- /dev/null +++ b/languages/pascal/app_templates/fpcsharedlib/fpcsharedlib.kdevtemplate @@ -0,0 +1,115 @@ +# KDE Config File +[General] +Name=Shared library +Name[ca]=Biblioteca compartida +Name[da]=Delt bibliotek +Name[de]=Shared Library +Name[el]=Κοινόχρηστη βιβλιοθήκη +Name[es]=Biblioteca compartida +Name[et]=Jagatud teek +Name[eu]=Liburutegi partekatua +Name[fa]=کتابخانۀ مشترک +Name[fr]=Bibliothèque partagée +Name[ga]=Comhleabharlann +Name[gl]=Biblioteca compartida +Name[hu]=Osztott programkönyvtár +Name[it]=Libreria condivisa +Name[ja]=共有ライブラリ +Name[nds]=Deelt Bibliotheek +Name[ne]=साझेदार लाइब्रेरी +Name[nl]=Gedeelde bibliotheek +Name[pl]=Biblioteka dzielona +Name[pt]=Biblioteca dinâmica +Name[pt_BR]=Biblioteca compartilhada +Name[ru]=Разделяемая библиотека +Name[sk]=Zdieľaná knižnica +Name[sr]=Дељена библиотека +Name[sr@Latn]=Deljena biblioteka +Name[sv]=Delat bibliotek +Name[tr]=Paylaşılan Kütüphane +Name[zh_CN]=共享库 +Name[zh_TW]=共享函式庫 +Category=Pascal/Free Pascal +Comment=Generates a shared library in Pascal +Comment[ca]=Genera una biblioteca compartida en Pascal +Comment[da]=Genererer et delt bibliotek i Pascal +Comment[de]=Erstellt eine Shared Library in Pascal +Comment[el]=Δημιουργία μιας κοινόχρηστης βιβλιοθήκης σε Pascal +Comment[es]=Genera una biblioteca compartida en Pascal +Comment[et]=Jagatud teegi loomine Pascalis +Comment[eu]=Pascal-en idatzitako liburutegi partekatu bat sortzen du +Comment[fa]=یک کتابخانۀ مشترک در پاسکال تولید می‌کند +Comment[fr]=Génère une bibliothèque partagée en Pascal +Comment[ga]=Cruthaíonn sé seo comhleabharlann i Pascal +Comment[gl]=Xera unha biblioteca compartida en Pascal +Comment[hu]=Létrehoz egy osztott programkönyvtárt Pascalban +Comment[it]=Genera una libreria condivisa in Pascal +Comment[ja]=共有ライブラリを Pascal で作成します +Comment[nds]=Stellt en deelt Bibliotheek in Pascal op +Comment[ne]=साझेदार लाइब्रेरीलाई पास्कलमा उत्पन्न गर्दछ +Comment[nl]=Genereert een gedeelde bibliotheek in Pascal +Comment[pl]=Generuje bibliotekę dzieloną w Pascalu +Comment[pt]=Gera uma biblioteca dinâmica em Pascal +Comment[pt_BR]=Gera uma biblioteca dinâmica em Pascal +Comment[ru]=Создание разделяемой библиотеки на Pascal +Comment[sk]=Vygeneruje zdieľanú knižnicu v Pascal +Comment[sr]=Прави дељену библиотеку у Pascal-у +Comment[sr@Latn]=Pravi deljenu biblioteku u Pascal-u +Comment[sv]=Skapar ett delat bibliotek i Pascal +Comment[tr]=Pascal'da bir paylaşılan kütüphane yaratır +Comment[zh_CN]=生成 Pascal 语言的共享库 +Comment[zh_TW]=產生一個 Pascal 的共享函式庫 +FileTemplates=pp-program,PStyle,pp-unit,PStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.pp +Archive=fpcsharedlib.tar.gz + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE2] +Type=install +Source=%{src}/main.pp +Dest=%{dest}/src/%{APPNAMELC}.pp + +[MSG] +Type=message +Comment=A shared library project written in pascal was created in %{dest} +Comment[ca]=Una biblioteca compartida escrita en Pascal ha estat creada en %{dest} +Comment[da]=Et delt biblioteksprojekt skrevet i pascal blev oprettet i %{dest} +Comment[de]=Ein Projekt für eine in Pascal geschriebene Shared Library wurde in %{dest} erstellt. +Comment[el]=Ένα έργο κοινόχρηστης βιβλιοθήκης γραμμένο σε pascal δημιουργήθηκε στο %{dest} +Comment[es]=Un proyecto de biblioteca compartida escrito en Pascal ha sido creado en %{dest} +Comment[et]=Jagatud teegi projekt Pascalis loodi asukohta %{dest} +Comment[eu]=Pascal-en idatzitako liburutegi partekatu bat sortu da hemen: %{dest} +Comment[fa]=یک پروژۀ کتابخانۀ مشترک نوشته‌شده در پاسکال در %{dest} ایجاد شد +Comment[fr]=Un projet de bibliothèque partagée écrit en Pascal a été créé dans %{dest} +Comment[ga]=Cruthaíodh tionscadal comhleabharlainne, scríofa i pascal, i %{dest} +Comment[gl]=Creouse un proxecto de biblioteca compartida en pascan en %{dest} +Comment[hu]=Létrejött egy Pascal nyelvű projekt osztott programkönyvtár készítéséhez itt: %{dest} +Comment[it]=È stato creato un progetto di libreria condivisa scritto in Pascal in %{dest} +Comment[ja]=Pascal で書かれた共有ライブラリプロジェクトを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Projekt för en in Pascal schreven deelt Bibliotheek opstellt +Comment[ne]=पास्कलमा लेखिएको साझेदार लाइब्रेरी परियोजना %{dest} मा सिर्जना गरियो +Comment[nl]=Een gedeelde bibliotheek geschreven in Pascal is aangemaakt in %{dest} +Comment[pl]=Projekt biblioteki dzielonej napisanej w Pascalu został utworzony w %{dest} +Comment[pt]=Foi criado o projecto de uma biblioteca dinâmica em Pascal em %{dest} +Comment[pt_BR]=Foi criado o projecto de uma biblioteca dinâmica em Pascal em %{dest} +Comment[ru]=Разделяемая библиотека на Pascal создана в %{dest} +Comment[sk]=Zdieľaná knižnica v Pascal bola vytvorená v %{dest} +Comment[sr]=Пројекат дељене библиотеке у Pascal-у направљен је у %{dest} +Comment[sr@Latn]=Projekat deljene biblioteke u Pascal-u napravljen je u %{dest} +Comment[sv]=Ett projekt med delat bibliotek skrivet i Pascal skapades i %{dest} +Comment[tr]=Pascal'da bir paylaşılan kütüphane projesi %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 创建了一个 Pascal 语言的共享库工程 +Comment[zh_TW]=一個 Pascal 的共享函式庫專案已建立於 %{dest} diff --git a/languages/pascal/app_templates/fpcsharedlib/fpcsharedlib.tdevtemplate b/languages/pascal/app_templates/fpcsharedlib/fpcsharedlib.tdevtemplate deleted file mode 100644 index 3c4e93bf..00000000 --- a/languages/pascal/app_templates/fpcsharedlib/fpcsharedlib.tdevtemplate +++ /dev/null @@ -1,115 +0,0 @@ -# KDE Config File -[General] -Name=Shared library -Name[ca]=Biblioteca compartida -Name[da]=Delt bibliotek -Name[de]=Shared Library -Name[el]=Κοινόχρηστη βιβλιοθήκη -Name[es]=Biblioteca compartida -Name[et]=Jagatud teek -Name[eu]=Liburutegi partekatua -Name[fa]=کتابخانۀ مشترک -Name[fr]=Bibliothèque partagée -Name[ga]=Comhleabharlann -Name[gl]=Biblioteca compartida -Name[hu]=Osztott programkönyvtár -Name[it]=Libreria condivisa -Name[ja]=共有ライブラリ -Name[nds]=Deelt Bibliotheek -Name[ne]=साझेदार लाइब्रेरी -Name[nl]=Gedeelde bibliotheek -Name[pl]=Biblioteka dzielona -Name[pt]=Biblioteca dinâmica -Name[pt_BR]=Biblioteca compartilhada -Name[ru]=Разделяемая библиотека -Name[sk]=Zdieľaná knižnica -Name[sr]=Дељена библиотека -Name[sr@Latn]=Deljena biblioteka -Name[sv]=Delat bibliotek -Name[tr]=Paylaşılan Kütüphane -Name[zh_CN]=共享库 -Name[zh_TW]=共享函式庫 -Category=Pascal/Free Pascal -Comment=Generates a shared library in Pascal -Comment[ca]=Genera una biblioteca compartida en Pascal -Comment[da]=Genererer et delt bibliotek i Pascal -Comment[de]=Erstellt eine Shared Library in Pascal -Comment[el]=Δημιουργία μιας κοινόχρηστης βιβλιοθήκης σε Pascal -Comment[es]=Genera una biblioteca compartida en Pascal -Comment[et]=Jagatud teegi loomine Pascalis -Comment[eu]=Pascal-en idatzitako liburutegi partekatu bat sortzen du -Comment[fa]=یک کتابخانۀ مشترک در پاسکال تولید می‌کند -Comment[fr]=Génère une bibliothèque partagée en Pascal -Comment[ga]=Cruthaíonn sé seo comhleabharlann i Pascal -Comment[gl]=Xera unha biblioteca compartida en Pascal -Comment[hu]=Létrehoz egy osztott programkönyvtárt Pascalban -Comment[it]=Genera una libreria condivisa in Pascal -Comment[ja]=共有ライブラリを Pascal で作成します -Comment[nds]=Stellt en deelt Bibliotheek in Pascal op -Comment[ne]=साझेदार लाइब्रेरीलाई पास्कलमा उत्पन्न गर्दछ -Comment[nl]=Genereert een gedeelde bibliotheek in Pascal -Comment[pl]=Generuje bibliotekę dzieloną w Pascalu -Comment[pt]=Gera uma biblioteca dinâmica em Pascal -Comment[pt_BR]=Gera uma biblioteca dinâmica em Pascal -Comment[ru]=Создание разделяемой библиотеки на Pascal -Comment[sk]=Vygeneruje zdieľanú knižnicu v Pascal -Comment[sr]=Прави дељену библиотеку у Pascal-у -Comment[sr@Latn]=Pravi deljenu biblioteku u Pascal-u -Comment[sv]=Skapar ett delat bibliotek i Pascal -Comment[tr]=Pascal'da bir paylaşılan kütüphane yaratır -Comment[zh_CN]=生成 Pascal 语言的共享库 -Comment[zh_TW]=產生一個 Pascal 的共享函式庫 -FileTemplates=pp-program,PStyle,pp-unit,PStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.pp -Archive=fpcsharedlib.tar.gz - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE2] -Type=install -Source=%{src}/main.pp -Dest=%{dest}/src/%{APPNAMELC}.pp - -[MSG] -Type=message -Comment=A shared library project written in pascal was created in %{dest} -Comment[ca]=Una biblioteca compartida escrita en Pascal ha estat creada en %{dest} -Comment[da]=Et delt biblioteksprojekt skrevet i pascal blev oprettet i %{dest} -Comment[de]=Ein Projekt für eine in Pascal geschriebene Shared Library wurde in %{dest} erstellt. -Comment[el]=Ένα έργο κοινόχρηστης βιβλιοθήκης γραμμένο σε pascal δημιουργήθηκε στο %{dest} -Comment[es]=Un proyecto de biblioteca compartida escrito en Pascal ha sido creado en %{dest} -Comment[et]=Jagatud teegi projekt Pascalis loodi asukohta %{dest} -Comment[eu]=Pascal-en idatzitako liburutegi partekatu bat sortu da hemen: %{dest} -Comment[fa]=یک پروژۀ کتابخانۀ مشترک نوشته‌شده در پاسکال در %{dest} ایجاد شد -Comment[fr]=Un projet de bibliothèque partagée écrit en Pascal a été créé dans %{dest} -Comment[ga]=Cruthaíodh tionscadal comhleabharlainne, scríofa i pascal, i %{dest} -Comment[gl]=Creouse un proxecto de biblioteca compartida en pascan en %{dest} -Comment[hu]=Létrejött egy Pascal nyelvű projekt osztott programkönyvtár készítéséhez itt: %{dest} -Comment[it]=È stato creato un progetto di libreria condivisa scritto in Pascal in %{dest} -Comment[ja]=Pascal で書かれた共有ライブラリプロジェクトを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Projekt för en in Pascal schreven deelt Bibliotheek opstellt -Comment[ne]=पास्कलमा लेखिएको साझेदार लाइब्रेरी परियोजना %{dest} मा सिर्जना गरियो -Comment[nl]=Een gedeelde bibliotheek geschreven in Pascal is aangemaakt in %{dest} -Comment[pl]=Projekt biblioteki dzielonej napisanej w Pascalu został utworzony w %{dest} -Comment[pt]=Foi criado o projecto de uma biblioteca dinâmica em Pascal em %{dest} -Comment[pt_BR]=Foi criado o projecto de uma biblioteca dinâmica em Pascal em %{dest} -Comment[ru]=Разделяемая библиотека на Pascal создана в %{dest} -Comment[sk]=Zdieľaná knižnica v Pascal bola vytvorená v %{dest} -Comment[sr]=Пројекат дељене библиотеке у Pascal-у направљен је у %{dest} -Comment[sr@Latn]=Projekat deljene biblioteke u Pascal-u napravljen je u %{dest} -Comment[sv]=Ett projekt med delat bibliotek skrivet i Pascal skapades i %{dest} -Comment[tr]=Pascal'da bir paylaşılan kütüphane projesi %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 创建了一个 Pascal 语言的共享库工程 -Comment[zh_TW]=一個 Pascal 的共享函式庫專案已建立於 %{dest} diff --git a/languages/pascal/app_templates/pascalhello/CMakeLists.txt b/languages/pascal/app_templates/pascalhello/CMakeLists.txt index a9d1b313..3422a8ff 100644 --- a/languages/pascal/app_templates/pascalhello/CMakeLists.txt +++ b/languages/pascal/app_templates/pascalhello/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( pascalhello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/pascalhello.tar.gz pascalhello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - pascalhello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + pascalhello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/pascal/app_templates/pascalhello/Makefile.am b/languages/pascal/app_templates/pascalhello/Makefile.am index 96ce40c7..3e72435c 100644 --- a/languages/pascal/app_templates/pascalhello/Makefile.am +++ b/languages/pascal/app_templates/pascalhello/Makefile.am @@ -2,10 +2,10 @@ dataFiles = main.pp app.tdevelop templateName = pascalhello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/pascal/app_templates/pascalhello/app.tdevelop b/languages/pascal/app_templates/pascalhello/app.tdevelop index 8e571db2..51e8c65e 100644 --- a/languages/pascal/app_templates/pascalhello/app.tdevelop +++ b/languages/pascal/app_templates/pascalhello/app.tdevelop @@ -11,7 +11,7 @@ Code - + default @@ -23,8 +23,8 @@ true - - + + ada ada_bugs_gcc @@ -72,12 +72,12 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/languages/pascal/app_templates/pascalhello/pascalhello.kdevtemplate b/languages/pascal/app_templates/pascalhello/pascalhello.kdevtemplate new file mode 100644 index 00000000..ed7104cb --- /dev/null +++ b/languages/pascal/app_templates/pascalhello/pascalhello.kdevtemplate @@ -0,0 +1,116 @@ +# KDE Config File +[General] +Name=Simple Hello world program +Name[ca]=Simple programa Hello world +Name[da]=Simpelt Goddag verden program +Name[de]=Ein einfaches "Hello World"-Programm +Name[el]=Απλό πρόγραμμα Γεια σου Κόσμε +Name[es]=Programa «Hola mundo» sencillo +Name[et]=Lihtne "Tere, maailm" programm +Name[eu]="Kaixo mundua" programa sinplea +Name[fa]=برنامۀ سادۀ Hello world +Name[fr]=Programme « Bonjour monde » simple +Name[ga]=Ríomhchlár simplí "Hello World" +Name[gl]=Programa sinxelo Ola mundo +Name[hu]=Egyszerű Hello world program +Name[it]=Semplice programma di "Hello world" +Name[ja]=簡単な Hello world プログラム +Name[ms]=Program Hello World mudah +Name[nds]=En eenfach "Moin Welt"-Programm +Name[ne]=साधारण हेल्लो वोल्ड कार्यक्रम +Name[nl]=Eenvoudig 'Hello World' programma +Name[pl]=Prosty program witaj świecie +Name[pt]=Programa simples Olá Mundo +Name[pt_BR]=Programa simples Olá Mundo +Name[ru]=Простая программа Hello world +Name[sk]=Jednoduchý "Ahoj svet" program +Name[sl]=Preprost program Hello world +Name[sr]=Једноставан „Здраво свете“ програм +Name[sr@Latn]=Jednostavan „Zdravo svete“ program +Name[sv]=Enkelt Hello world-program +Name[tr]=Basit Merhaba dünya programı +Name[zh_CN]=简单的 Hello world 程序 +Name[zh_TW]=簡單的 Hello world 程式 +Icon=pascalhello.png +Category=Pascal +Comment=Generates a simple Hello world program in Pascal +Comment[ca]=Genera un simple programa de Hello world en Pascal +Comment[da]=Genererer et simpelt Goddag verden program i Pascal +Comment[de]=Erstellt ein einfaches "Hello World"-Programm in Pascal +Comment[el]=Δημιουργεί ένα απλό πρόγραμμα Γεια σου Κόσμε σε Pascal +Comment[es]=Genera un programa «Hola mundo» sencillo en Pascal +Comment[et]=Lihtsa "Tere, maailm" programmi loomine Pascalis +Comment[eu]=Pascal-en idatzitako "Kaixo mundua" programa sinple bat sortzen du +Comment[fa]=یک برنامۀ سادۀ Hello world در پاسکال تولید می‌کند +Comment[fr]=Génère un programme « Bonjour monde » simple en Pascal +Comment[gl]=Xera un programa sinxelo Ola mundo en Pascal +Comment[hu]=Létrehoz egy egyszerű Hello world programot Pascalban +Comment[it]=Genera un semplice programma di "Hello world" in Pascal +Comment[ja]=簡単な Hello world プログラムを Pascal で作成します +Comment[nds]=Stellt in Pascal en eenfach "Moin Welt"-Programm op +Comment[ne]=साधारण हेल्लो वोल्ड कार्यक्रमलाई पास्कलमा उत्पन्न गर्दछ +Comment[nl]=Genereert een eenvudig Hello World-programma in Pascal +Comment[pl]=Generuje prosty program "Witaj świecie" w Pascalu +Comment[pt]=Gera um programa simples Olá Mundo em Pascal +Comment[pt_BR]=Gera um programa simples Olá Mundo em Pascal +Comment[ru]=Создание простого приложения Hello world на Pascal +Comment[sk]=Vygeneruje jednoduchý Ahoj svet program v Pascal +Comment[sr]=Прави једноставан „Здраво свете“ у Pascal-у +Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ u Pascal-u +Comment[sv]=Skapar ett enkelt Hello world-program i Pascal +Comment[tr]=Pascal'da basit bir Merhaba Dünya programı yaratır. +Comment[zh_CN]=生成一个简单的 Pascal 语言 Hello world 程序 +Comment[zh_TW]=產生一個簡單的 Pascal Hello world 程式 +FileTemplates=pp-program,PStyle,pp-unit,PStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.pp +Archive=pascalhello.tar.gz + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[FILE1] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MkDir1] +Type=mkdir +Dir=%{dest}/src + +[FILE2] +Type=install +Source=%{src}/main.pp +Dest=%{dest}/src/%{APPNAMELC}.pp + +[MSG] +Type=message +Comment=A simple 'hello world' program in Pascal was created in %{dest} +Comment[ca]=Un simple programa de 'hello world' en Pascal ha estat creat en %{dest} +Comment[da]=Et simpelt 'goddag verden' program i Pascal blev oprettet i %{dest} +Comment[de]=Ein einfaches "Hello world"-Programm in Pascal wurde in %{dest} erstellt. +Comment[el]=Ένα απλό πρόγραμμα 'Γεια σου κόσμε' σε Pascal δημιουργήθηκε στο %{dest} +Comment[es]=Un sencillo programa «Hola mundo» en Pascal ha sido creado en %{dest} +Comment[et]=Lihtne "Tere, maailm" programm Pascalis loodi asukohta %{dest} +Comment[eu]=Pascal-en idatzitako "Kaixo mundua" programa sinple bat sortu da hemen: %{dest} +Comment[fa]=یک برنامۀ سادۀ «hello world» در پاسکال در %{dest} ایجاد شد +Comment[fr]=Un programme « Bonjour monde » simple en Pascal a été créé dans %{dest} +Comment[gl]=Creouse un programa sinxelo en Pascal 'ola mundo' en %{dest} +Comment[hu]=Létrejött egy egyszerű Hello world Pascal-program itt: %{dest} +Comment[it]=È stato creato un semplice programma Pascal di "hello world" in %{dest} +Comment[ja]=Pascal で書かれた簡単な hello world プログラムを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en eenfach "Moin Welt"-Programm in Pascal opstellt +Comment[ne]=पास्कलमा साधारण 'हेल्लो वोल्ड' कार्यक्रम %{dest} सिर्जना गरियो +Comment[nl]=Een eenvoudig Hello World-programma geschreven in Pascal is aangemaakt in %{dest} +Comment[pl]=Prosty program "Witaj świecie" w Pascalu został utworzony w %{dest} +Comment[pt]=Foi criado um programa simples 'olá mundo' em Pascal em %{dest} +Comment[pt_BR]=Foi criado um programa simples 'olá mundo' em Pascal em %{dest} +Comment[ru]=Простое приложение 'hello world' на Pascal создано в %{dest} +Comment[sk]=Jednoduchý Ahoj svet program v Pascal bol vytvorený v %{dest} +Comment[sr]=Једноставан „Здраво свете“ програм у Pascal-у направљен је у %{dest} +Comment[sr@Latn]=Jednostavan „Zdravo svete“ program u Pascal-u napravljen je u %{dest} +Comment[sv]=Ett enkelt 'Hello world'-program i Pascal skapades i %{dest} +Comment[tr]=Pascal'da basit bir "Merhaba Dünya" uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 创建了一个简单的“Hello world”程序 +Comment[zh_TW]=一個簡單的 Pascal Hello world 程式已建立於 %{dest} diff --git a/languages/pascal/app_templates/pascalhello/pascalhello.tdevtemplate b/languages/pascal/app_templates/pascalhello/pascalhello.tdevtemplate deleted file mode 100644 index e70ca533..00000000 --- a/languages/pascal/app_templates/pascalhello/pascalhello.tdevtemplate +++ /dev/null @@ -1,116 +0,0 @@ -# KDE Config File -[General] -Name=Simple Hello world program -Name[ca]=Simple programa Hello world -Name[da]=Simpelt Goddag verden program -Name[de]=Ein einfaches "Hello World"-Programm -Name[el]=Απλό πρόγραμμα Γεια σου Κόσμε -Name[es]=Programa «Hola mundo» sencillo -Name[et]=Lihtne "Tere, maailm" programm -Name[eu]="Kaixo mundua" programa sinplea -Name[fa]=برنامۀ سادۀ Hello world -Name[fr]=Programme « Bonjour monde » simple -Name[ga]=Ríomhchlár simplí "Hello World" -Name[gl]=Programa sinxelo Ola mundo -Name[hu]=Egyszerű Hello world program -Name[it]=Semplice programma di "Hello world" -Name[ja]=簡単な Hello world プログラム -Name[ms]=Program Hello World mudah -Name[nds]=En eenfach "Moin Welt"-Programm -Name[ne]=साधारण हेल्लो वोल्ड कार्यक्रम -Name[nl]=Eenvoudig 'Hello World' programma -Name[pl]=Prosty program witaj świecie -Name[pt]=Programa simples Olá Mundo -Name[pt_BR]=Programa simples Olá Mundo -Name[ru]=Простая программа Hello world -Name[sk]=Jednoduchý "Ahoj svet" program -Name[sl]=Preprost program Hello world -Name[sr]=Једноставан „Здраво свете“ програм -Name[sr@Latn]=Jednostavan „Zdravo svete“ program -Name[sv]=Enkelt Hello world-program -Name[tr]=Basit Merhaba dünya programı -Name[zh_CN]=简单的 Hello world 程序 -Name[zh_TW]=簡單的 Hello world 程式 -Icon=pascalhello.png -Category=Pascal -Comment=Generates a simple Hello world program in Pascal -Comment[ca]=Genera un simple programa de Hello world en Pascal -Comment[da]=Genererer et simpelt Goddag verden program i Pascal -Comment[de]=Erstellt ein einfaches "Hello World"-Programm in Pascal -Comment[el]=Δημιουργεί ένα απλό πρόγραμμα Γεια σου Κόσμε σε Pascal -Comment[es]=Genera un programa «Hola mundo» sencillo en Pascal -Comment[et]=Lihtsa "Tere, maailm" programmi loomine Pascalis -Comment[eu]=Pascal-en idatzitako "Kaixo mundua" programa sinple bat sortzen du -Comment[fa]=یک برنامۀ سادۀ Hello world در پاسکال تولید می‌کند -Comment[fr]=Génère un programme « Bonjour monde » simple en Pascal -Comment[gl]=Xera un programa sinxelo Ola mundo en Pascal -Comment[hu]=Létrehoz egy egyszerű Hello world programot Pascalban -Comment[it]=Genera un semplice programma di "Hello world" in Pascal -Comment[ja]=簡単な Hello world プログラムを Pascal で作成します -Comment[nds]=Stellt in Pascal en eenfach "Moin Welt"-Programm op -Comment[ne]=साधारण हेल्लो वोल्ड कार्यक्रमलाई पास्कलमा उत्पन्न गर्दछ -Comment[nl]=Genereert een eenvudig Hello World-programma in Pascal -Comment[pl]=Generuje prosty program "Witaj świecie" w Pascalu -Comment[pt]=Gera um programa simples Olá Mundo em Pascal -Comment[pt_BR]=Gera um programa simples Olá Mundo em Pascal -Comment[ru]=Создание простого приложения Hello world на Pascal -Comment[sk]=Vygeneruje jednoduchý Ahoj svet program v Pascal -Comment[sr]=Прави једноставан „Здраво свете“ у Pascal-у -Comment[sr@Latn]=Pravi jednostavan „Zdravo svete“ u Pascal-u -Comment[sv]=Skapar ett enkelt Hello world-program i Pascal -Comment[tr]=Pascal'da basit bir Merhaba Dünya programı yaratır. -Comment[zh_CN]=生成一个简单的 Pascal 语言 Hello world 程序 -Comment[zh_TW]=產生一個簡單的 Pascal Hello world 程式 -FileTemplates=pp-program,PStyle,pp-unit,PStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.pp -Archive=pascalhello.tar.gz - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[MkDir1] -Type=mkdir -Dir=%{dest}/src - -[FILE2] -Type=install -Source=%{src}/main.pp -Dest=%{dest}/src/%{APPNAMELC}.pp - -[MSG] -Type=message -Comment=A simple 'hello world' program in Pascal was created in %{dest} -Comment[ca]=Un simple programa de 'hello world' en Pascal ha estat creat en %{dest} -Comment[da]=Et simpelt 'goddag verden' program i Pascal blev oprettet i %{dest} -Comment[de]=Ein einfaches "Hello world"-Programm in Pascal wurde in %{dest} erstellt. -Comment[el]=Ένα απλό πρόγραμμα 'Γεια σου κόσμε' σε Pascal δημιουργήθηκε στο %{dest} -Comment[es]=Un sencillo programa «Hola mundo» en Pascal ha sido creado en %{dest} -Comment[et]=Lihtne "Tere, maailm" programm Pascalis loodi asukohta %{dest} -Comment[eu]=Pascal-en idatzitako "Kaixo mundua" programa sinple bat sortu da hemen: %{dest} -Comment[fa]=یک برنامۀ سادۀ «hello world» در پاسکال در %{dest} ایجاد شد -Comment[fr]=Un programme « Bonjour monde » simple en Pascal a été créé dans %{dest} -Comment[gl]=Creouse un programa sinxelo en Pascal 'ola mundo' en %{dest} -Comment[hu]=Létrejött egy egyszerű Hello world Pascal-program itt: %{dest} -Comment[it]=È stato creato un semplice programma Pascal di "hello world" in %{dest} -Comment[ja]=Pascal で書かれた簡単な hello world プログラムを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en eenfach "Moin Welt"-Programm in Pascal opstellt -Comment[ne]=पास्कलमा साधारण 'हेल्लो वोल्ड' कार्यक्रम %{dest} सिर्जना गरियो -Comment[nl]=Een eenvoudig Hello World-programma geschreven in Pascal is aangemaakt in %{dest} -Comment[pl]=Prosty program "Witaj świecie" w Pascalu został utworzony w %{dest} -Comment[pt]=Foi criado um programa simples 'olá mundo' em Pascal em %{dest} -Comment[pt_BR]=Foi criado um programa simples 'olá mundo' em Pascal em %{dest} -Comment[ru]=Простое приложение 'hello world' на Pascal создано в %{dest} -Comment[sk]=Jednoduchý Ahoj svet program v Pascal bol vytvorený v %{dest} -Comment[sr]=Једноставан „Здраво свете“ програм у Pascal-у направљен је у %{dest} -Comment[sr@Latn]=Jednostavan „Zdravo svete“ program u Pascal-u napravljen je u %{dest} -Comment[sv]=Ett enkelt 'Hello world'-program i Pascal skapades i %{dest} -Comment[tr]=Pascal'da basit bir "Merhaba Dünya" uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 创建了一个简单的“Hello world”程序 -Comment[zh_TW]=一個簡單的 Pascal Hello world 程式已建立於 %{dest} diff --git a/languages/pascal/compiler/Makefile.am b/languages/pascal/compiler/Makefile.am index 400962be..c9f7528b 100644 --- a/languages/pascal/compiler/Makefile.am +++ b/languages/pascal/compiler/Makefile.am @@ -1,6 +1,6 @@ # This is the collection of plugins. In contrast to the parts # directory, these are 'transient' in a sense and don't -# share the complete TDevComponent interface. +# share the complete KDevComponent interface. SUBDIRS = dccoptions fpcoptions diff --git a/languages/pascal/compiler/dccoptions/CMakeLists.txt b/languages/pascal/compiler/dccoptions/CMakeLists.txt index 3e7fbcdd..ae6c6388 100644 --- a/languages/pascal/compiler/dccoptions/CMakeLists.txt +++ b/languages/pascal/compiler/dccoptions/CMakeLists.txt @@ -25,13 +25,13 @@ link_directories( ##### other data ################################ -install( FILES tdevdccoptions.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevdccoptions.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevdccoptions (module) ################ +##### libkdevdccoptions (module) ################ -tde_add_kpart( libtdevdccoptions AUTOMOC +tde_add_kpart( libkdevdccoptions AUTOMOC SOURCES dccoptionsplugin.cpp optiontabs.cpp - LINK tdevwidgets-shared tdevextras-shared + LINK kdevwidgets-shared kdevextras-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/languages/pascal/compiler/dccoptions/Makefile.am b/languages/pascal/compiler/dccoptions/Makefile.am index f913ae45..734e63c5 100644 --- a/languages/pascal/compiler/dccoptions/Makefile.am +++ b/languages/pascal/compiler/dccoptions/Makefile.am @@ -3,14 +3,14 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/interfaces/extras \ -I$(top_srcdir)/lib/widgets $(all_includes) -kde_module_LTLIBRARIES = libtdevdccoptions.la -libtdevdccoptions_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) -libtdevdccoptions_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/lib/widgets/libtdevwidgets.la $(top_builddir)/lib/interfaces/extras/libtdevextras.la $(LIB_TDEHTML) +kde_module_LTLIBRARIES = libkdevdccoptions.la +libkdevdccoptions_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) +libkdevdccoptions_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/lib/widgets/libkdevwidgets.la $(top_builddir)/lib/interfaces/extras/libkdevextras.la $(LIB_TDEHTML) -libtdevdccoptions_la_SOURCES = dccoptionsplugin.cpp optiontabs.cpp +libkdevdccoptions_la_SOURCES = dccoptionsplugin.cpp optiontabs.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevdccoptions.desktop +service_DATA = kdevdccoptions.desktop diff --git a/languages/pascal/compiler/dccoptions/dccoptionsplugin.cpp b/languages/pascal/compiler/dccoptions/dccoptionsplugin.cpp index cffbbdd5..8a8ffc54 100644 --- a/languages/pascal/compiler/dccoptions/dccoptionsplugin.cpp +++ b/languages/pascal/compiler/dccoptions/dccoptionsplugin.cpp @@ -19,10 +19,10 @@ #include "optiontabs.h" -K_EXPORT_COMPONENT_FACTORY( libtdevdccoptions, KGenericFactory( "tdevdccoptions" ) ) +K_EXPORT_COMPONENT_FACTORY( libkdevdccoptions, KGenericFactory( "kdevdccoptions" ) ) DccOptionsPlugin::DccOptionsPlugin(TQObject *parent, const char *name, const TQStringList/* &args*/) - : TDevCompilerOptions(parent, name) + : KDevCompilerOptions(parent, name) { } diff --git a/languages/pascal/compiler/dccoptions/dccoptionsplugin.h b/languages/pascal/compiler/dccoptions/dccoptionsplugin.h index b0db639d..d8465520 100644 --- a/languages/pascal/compiler/dccoptions/dccoptionsplugin.h +++ b/languages/pascal/compiler/dccoptions/dccoptionsplugin.h @@ -13,9 +13,9 @@ #include -#include "tdevcompileroptions.h" +#include "kdevcompileroptions.h" -class DccOptionsPlugin : public TDevCompilerOptions +class DccOptionsPlugin : public KDevCompilerOptions { Q_OBJECT diff --git a/languages/pascal/compiler/dccoptions/kdevdccoptions.desktop b/languages/pascal/compiler/dccoptions/kdevdccoptions.desktop new file mode 100644 index 00000000..e99e9385 --- /dev/null +++ b/languages/pascal/compiler/dccoptions/kdevdccoptions.desktop @@ -0,0 +1,54 @@ +[Desktop Entry] +Type=Service +Exec=dcc +Comment=Borland Delphi Compiler +Comment[br]=Dastumer Delphi Borland +Comment[ca]=Compilador Delphi de Borland +Comment[da]=Borland Delphi oversætter +Comment[el]=Μεταγλωττιστής Borland Delphi +Comment[es]=Compilador de Delphi de Borland +Comment[et]=Borland Delphi kompilaator +Comment[eu]=Borland Delphi konpiladorea +Comment[fa]=مترجم برلند دلفی +Comment[fr]=Compilateur Delphi de Borland +Comment[ga]=Tiomsaitheoir Borland Delphi +Comment[gl]=Compilador Borland Delphi +Comment[hi]=बोरलैंड डेल्फ़ी कम्पायलर +Comment[hu]=Borland Delphi fordítóprogram +Comment[is]=Borland Delphi þýðandi +Comment[it]=Compilatore per Borland Delphi +Comment[ja]=Borland Delphi コンパイラ +Comment[nds]=Borland Delphi-Kompilerer +Comment[ne]=बोरल्यान्ड डेल्पी कम्पाइलर +Comment[nl]=Borland Delphi-compiler +Comment[pl]=Kompilator Borland Delphi +Comment[pt]=Compilador de Borland Delphi +Comment[pt_BR]=Compilador Delphi da Borland Delphi +Comment[ru]=Компилятор Borland Delphi +Comment[sk]=Borland Delphi kompilátor +Comment[sl]=Prevajalnik za Borland Delphi +Comment[sr]=Borland-ов преводилац Delphi-ја +Comment[sr@Latn]=Borland-ov prevodilac Delphi-ja +Comment[sv]=Borland Delphi kompilator +Comment[ta]=பொர்லான்ட் டெல்பி தொகுப்பி +Comment[tg]=Талфифгари Borland Delphi +Comment[tr]=Borland Delphi Derleyicisi +Comment[zh_CN]=Borland Delphi 编译器 +Comment[zh_TW]=Borland Delphi 編譯器 +Name=DccOptions +Name[da]=Delphi oversætter indstillinger +Name[de]=Delphi-Einstellungen (TDevelop) +Name[hi]=डीसीसी-विकल्प +Name[nds]=Delphi-Optschonen (TDevelop) +Name[pl]=Opcje Dcc +Name[sk]=Dcc možnosti +Name[sl]=Možnosti Dcc +Name[sv]=Alternativ för dcc +Name[ta]=Dccவிருப்பங்கள் +Name[tg]=DccИнтихобҳо +Name[zh_TW]=Dcc 選項 +ServiceTypes=TDevelop/CompilerOptions +X-TDE-Library=libkdevdccoptions +X-TDevelop-Version=5 +X-TDevelop-Language=Pascal +X-TDevelop-Args=dcc diff --git a/languages/pascal/compiler/dccoptions/tdevdccoptions.desktop b/languages/pascal/compiler/dccoptions/tdevdccoptions.desktop deleted file mode 100644 index 3631eeb9..00000000 --- a/languages/pascal/compiler/dccoptions/tdevdccoptions.desktop +++ /dev/null @@ -1,54 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=dcc -Comment=Borland Delphi Compiler -Comment[br]=Dastumer Delphi Borland -Comment[ca]=Compilador Delphi de Borland -Comment[da]=Borland Delphi oversætter -Comment[el]=Μεταγλωττιστής Borland Delphi -Comment[es]=Compilador de Delphi de Borland -Comment[et]=Borland Delphi kompilaator -Comment[eu]=Borland Delphi konpiladorea -Comment[fa]=مترجم برلند دلفی -Comment[fr]=Compilateur Delphi de Borland -Comment[ga]=Tiomsaitheoir Borland Delphi -Comment[gl]=Compilador Borland Delphi -Comment[hi]=बोरलैंड डेल्फ़ी कम्पायलर -Comment[hu]=Borland Delphi fordítóprogram -Comment[is]=Borland Delphi þýðandi -Comment[it]=Compilatore per Borland Delphi -Comment[ja]=Borland Delphi コンパイラ -Comment[nds]=Borland Delphi-Kompilerer -Comment[ne]=बोरल्यान्ड डेल्पी कम्पाइलर -Comment[nl]=Borland Delphi-compiler -Comment[pl]=Kompilator Borland Delphi -Comment[pt]=Compilador de Borland Delphi -Comment[pt_BR]=Compilador Delphi da Borland Delphi -Comment[ru]=Компилятор Borland Delphi -Comment[sk]=Borland Delphi kompilátor -Comment[sl]=Prevajalnik za Borland Delphi -Comment[sr]=Borland-ов преводилац Delphi-ја -Comment[sr@Latn]=Borland-ov prevodilac Delphi-ja -Comment[sv]=Borland Delphi kompilator -Comment[ta]=பொர்லான்ட் டெல்பி தொகுப்பி -Comment[tg]=Талфифгари Borland Delphi -Comment[tr]=Borland Delphi Derleyicisi -Comment[zh_CN]=Borland Delphi 编译器 -Comment[zh_TW]=Borland Delphi 編譯器 -Name=DccOptions -Name[da]=Delphi oversætter indstillinger -Name[de]=Delphi-Einstellungen (TDevelop) -Name[hi]=डीसीसी-विकल्प -Name[nds]=Delphi-Optschonen (TDevelop) -Name[pl]=Opcje Dcc -Name[sk]=Dcc možnosti -Name[sl]=Možnosti Dcc -Name[sv]=Alternativ för dcc -Name[ta]=Dccவிருப்பங்கள் -Name[tg]=DccИнтихобҳо -Name[zh_TW]=Dcc 選項 -ServiceTypes=TDevelop/CompilerOptions -X-TDE-Library=libtdevdccoptions -X-TDevelop-Version=5 -X-TDevelop-Language=Pascal -X-TDevelop-Args=dcc diff --git a/languages/pascal/compiler/fpcoptions/CMakeLists.txt b/languages/pascal/compiler/fpcoptions/CMakeLists.txt index 7d9a010f..12c9ef89 100644 --- a/languages/pascal/compiler/fpcoptions/CMakeLists.txt +++ b/languages/pascal/compiler/fpcoptions/CMakeLists.txt @@ -25,13 +25,13 @@ link_directories( ##### other data ################################ -install( FILES tdevfpcoptions.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevfpcoptions.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevfpcoptions (module) ################ +##### libkdevfpcoptions (module) ################ -tde_add_kpart( libtdevfpcoptions AUTOMOC +tde_add_kpart( libkdevfpcoptions AUTOMOC SOURCES fpcoptionsplugin.cpp optiontabs.cpp - LINK tdevwidgets-shared tdevextras-shared + LINK kdevwidgets-shared kdevextras-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/languages/pascal/compiler/fpcoptions/Makefile.am b/languages/pascal/compiler/fpcoptions/Makefile.am index 3d105f6f..70579448 100644 --- a/languages/pascal/compiler/fpcoptions/Makefile.am +++ b/languages/pascal/compiler/fpcoptions/Makefile.am @@ -3,17 +3,17 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/interfaces/extras \ -I$(top_srcdir)/lib/widgets $(all_includes) -kde_module_LTLIBRARIES = libtdevfpcoptions.la -libtdevfpcoptions_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) -libtdevfpcoptions_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/lib/widgets/libtdevwidgets.la $(top_builddir)/lib/interfaces/extras/libtdevextras.la $(LIB_TDEHTML) +kde_module_LTLIBRARIES = libkdevfpcoptions.la +libkdevfpcoptions_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) +libkdevfpcoptions_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/lib/widgets/libkdevwidgets.la $(top_builddir)/lib/interfaces/extras/libkdevextras.la $(LIB_TDEHTML) -libtdevfpcoptions_la_SOURCES = fpcoptionsplugin.cpp optiontabs.cpp +libkdevfpcoptions_la_SOURCES = fpcoptionsplugin.cpp optiontabs.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevfpcoptions.desktop +service_DATA = kdevfpcoptions.desktop diff --git a/languages/pascal/compiler/fpcoptions/fpcoptionsplugin.cpp b/languages/pascal/compiler/fpcoptions/fpcoptionsplugin.cpp index 31babced..0b01fb01 100644 --- a/languages/pascal/compiler/fpcoptions/fpcoptionsplugin.cpp +++ b/languages/pascal/compiler/fpcoptions/fpcoptionsplugin.cpp @@ -16,10 +16,10 @@ #include "optiontabs.h" #include "fpcoptionsplugin.h" -K_EXPORT_COMPONENT_FACTORY( libtdevfpcoptions, KGenericFactory( "tdevfpcoptions" ) ) +K_EXPORT_COMPONENT_FACTORY( libkdevfpcoptions, KGenericFactory( "kdevfpcoptions" ) ) FpcOptionsPlugin::FpcOptionsPlugin(TQObject *parent, const char *name, const TQStringList& /*args*/) - : TDevCompilerOptions(parent, name) + : KDevCompilerOptions(parent, name) { } diff --git a/languages/pascal/compiler/fpcoptions/fpcoptionsplugin.h b/languages/pascal/compiler/fpcoptions/fpcoptionsplugin.h index cee18e79..e30b33c0 100644 --- a/languages/pascal/compiler/fpcoptions/fpcoptionsplugin.h +++ b/languages/pascal/compiler/fpcoptions/fpcoptionsplugin.h @@ -13,9 +13,9 @@ #include -#include "tdevcompileroptions.h" +#include "kdevcompileroptions.h" -class FpcOptionsPlugin : public TDevCompilerOptions +class FpcOptionsPlugin : public KDevCompilerOptions { Q_OBJECT diff --git a/languages/pascal/compiler/fpcoptions/kdevfpcoptions.desktop b/languages/pascal/compiler/fpcoptions/kdevfpcoptions.desktop new file mode 100644 index 00000000..660e973d --- /dev/null +++ b/languages/pascal/compiler/fpcoptions/kdevfpcoptions.desktop @@ -0,0 +1,55 @@ +[Desktop Entry] +Type=Service +Exec=fpc +Comment=Free Pascal Compiler +Comment[br]=Dastumer Pascal dieub +Comment[ca]=Compilador Free Pascal +Comment[da]=Free Pascal oversætter +Comment[el]=Μεταγλωττιστής Free Pascal +Comment[es]=Compilador Free Pascal +Comment[et]=Free Pascal kompilaator +Comment[eu]=Free Pascal konpiladorea +Comment[fa]=مترجم آزاد پاسکال +Comment[fr]=Compilateur Free Pascal +Comment[ga]=Tiomsaitheoir Saor Pascal +Comment[gl]=Compilador Free Pascal +Comment[hi]=फ्री पॉस्कल कम्पायलर +Comment[hu]=Szabad forráskódú Pascal fordítóprogram +Comment[is]=Frjáls Pascal þýðandi +Comment[it]=Compilatore per Free Pascal +Comment[ja]=Free Pascal コンパイラ +Comment[nds]=Free Pascal-Kompilerer +Comment[ne]=स्वतन्त्र पास्कल कम्पाइलर +Comment[nl]=Free Pascal-compiler +Comment[pt]=Compilador Free Pascal +Comment[pt_BR]=Compilador Free Pascal +Comment[ru]=Компилятор Free Pascal +Comment[sk]=Voľný Pascal kompilátor +Comment[sl]=Prevajalnik za Free Pascal +Comment[sr]=Слободни преводилац Pascal-а +Comment[sr@Latn]=Slobodni prevodilac Pascal-a +Comment[sv]=Fri Pascal-kompilator +Comment[ta]=இலவச பாஸ்கல் தொகுப்பி +Comment[tg]=Талфифгари Free Pascal +Comment[tr]=Serbest Pascal Derleyicisi +Comment[zh_CN]=Free Pascal 编译器 +Comment[zh_TW]=Free Pascal 編譯器 +Name=FpcOptions +Name[da]=Free Pascal oversætter indstillinger +Name[de]=Fpc-Einstellungen (TDevelop) +Name[hi]=एफपीसी-विकल्प +Name[nds]=Fpc-Optschonen (TDevelop) +Name[pl]=Opcje Fpc +Name[sk]=Fpc možnosti +Name[sl]=Možnosti Fpc +Name[sv]=Alternativ för fpc +Name[ta]=Fpcவிருப்பங்கள் +Name[tg]=FpcИнтихобҳо +Name[zh_TW]=Fpc 選項 +ServiceTypes=TDevelop/CompilerOptions +X-TDE-Library=libkdevfpcoptions +X-TDevelop-Version=5 +X-TDevelop-Language=Pascal +X-TDevelop-Args=fpc +X-TDevelop-Default=true + diff --git a/languages/pascal/compiler/fpcoptions/tdevfpcoptions.desktop b/languages/pascal/compiler/fpcoptions/tdevfpcoptions.desktop deleted file mode 100644 index da25b683..00000000 --- a/languages/pascal/compiler/fpcoptions/tdevfpcoptions.desktop +++ /dev/null @@ -1,55 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=fpc -Comment=Free Pascal Compiler -Comment[br]=Dastumer Pascal dieub -Comment[ca]=Compilador Free Pascal -Comment[da]=Free Pascal oversætter -Comment[el]=Μεταγλωττιστής Free Pascal -Comment[es]=Compilador Free Pascal -Comment[et]=Free Pascal kompilaator -Comment[eu]=Free Pascal konpiladorea -Comment[fa]=مترجم آزاد پاسکال -Comment[fr]=Compilateur Free Pascal -Comment[ga]=Tiomsaitheoir Saor Pascal -Comment[gl]=Compilador Free Pascal -Comment[hi]=फ्री पॉस्कल कम्पायलर -Comment[hu]=Szabad forráskódú Pascal fordítóprogram -Comment[is]=Frjáls Pascal þýðandi -Comment[it]=Compilatore per Free Pascal -Comment[ja]=Free Pascal コンパイラ -Comment[nds]=Free Pascal-Kompilerer -Comment[ne]=स्वतन्त्र पास्कल कम्पाइलर -Comment[nl]=Free Pascal-compiler -Comment[pt]=Compilador Free Pascal -Comment[pt_BR]=Compilador Free Pascal -Comment[ru]=Компилятор Free Pascal -Comment[sk]=Voľný Pascal kompilátor -Comment[sl]=Prevajalnik za Free Pascal -Comment[sr]=Слободни преводилац Pascal-а -Comment[sr@Latn]=Slobodni prevodilac Pascal-a -Comment[sv]=Fri Pascal-kompilator -Comment[ta]=இலவச பாஸ்கல் தொகுப்பி -Comment[tg]=Талфифгари Free Pascal -Comment[tr]=Serbest Pascal Derleyicisi -Comment[zh_CN]=Free Pascal 编译器 -Comment[zh_TW]=Free Pascal 編譯器 -Name=FpcOptions -Name[da]=Free Pascal oversætter indstillinger -Name[de]=Fpc-Einstellungen (TDevelop) -Name[hi]=एफपीसी-विकल्प -Name[nds]=Fpc-Optschonen (TDevelop) -Name[pl]=Opcje Fpc -Name[sk]=Fpc možnosti -Name[sl]=Možnosti Fpc -Name[sv]=Alternativ för fpc -Name[ta]=Fpcவிருப்பங்கள் -Name[tg]=FpcИнтихобҳо -Name[zh_TW]=Fpc 選項 -ServiceTypes=TDevelop/CompilerOptions -X-TDE-Library=libtdevfpcoptions -X-TDevelop-Version=5 -X-TDevelop-Language=Pascal -X-TDevelop-Args=fpc -X-TDevelop-Default=true - diff --git a/languages/pascal/doc/CMakeLists.txt b/languages/pascal/doc/CMakeLists.txt index 37627f81..ade55abb 100644 --- a/languages/pascal/doc/CMakeLists.txt +++ b/languages/pascal/doc/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES pascal_bugs_fp.toc - DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation/tocs ) + DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation/tocs ) diff --git a/languages/pascal/doc/Makefile.am b/languages/pascal/doc/Makefile.am index bf36ead8..a7829d08 100644 --- a/languages/pascal/doc/Makefile.am +++ b/languages/pascal/doc/Makefile.am @@ -1,4 +1,4 @@ -tocdir = ${kde_datadir}/tdevdocumentation/tocs +tocdir = ${kde_datadir}/kdevdocumentation/tocs toc_DATA = pascal_bugs_fp.toc #indexdir = ${kde_datadir}/devdoctreeview/indices diff --git a/languages/pascal/file_templates/CMakeLists.txt b/languages/pascal/file_templates/CMakeLists.txt index 5a55baad..812d0398 100644 --- a/languages/pascal/file_templates/CMakeLists.txt +++ b/languages/pascal/file_templates/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES dpr pas-program pas-unit pp-program pp-unit - DESTINATION ${DATA_INSTALL_DIR}/tdevfilecreate/file-templates ) + DESTINATION ${DATA_INSTALL_DIR}/kdevfilecreate/file-templates ) diff --git a/languages/pascal/file_templates/Makefile.am b/languages/pascal/file_templates/Makefile.am index fe16bfb0..94891c97 100644 --- a/languages/pascal/file_templates/Makefile.am +++ b/languages/pascal/file_templates/Makefile.am @@ -1,2 +1,2 @@ -templatedir = $(kde_datadir)/tdevfilecreate/file-templates +templatedir = $(kde_datadir)/kdevfilecreate/file-templates template_DATA = dpr pas-program pas-unit pp-program pp-unit diff --git a/languages/pascal/kdevpascalsupport.desktop b/languages/pascal/kdevpascalsupport.desktop new file mode 100644 index 00000000..65e9f851 --- /dev/null +++ b/languages/pascal/kdevpascalsupport.desktop @@ -0,0 +1,84 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Pascal Language Support +Comment[ca]=Suport per al llenguatge Pascal +Comment[da]=Pascal sprogunderstøttelse +Comment[de]=Pascal-Unterstützung für TDevelop +Comment[el]=Υποστήριξη γλώσσας Pascal +Comment[es]=Soporte para el lenguaje Pascal +Comment[et]=Pascali keele toetus +Comment[eu]=Pascal lenguaiaren euskarria +Comment[fa]=پشتیبانی زبان پاسکال +Comment[fr]=Prise en charge du langage Pascal +Comment[ga]=Tacaíocht Pascal +Comment[gl]=Soporte para linguaxe Pascal +Comment[hi]=पास्कल भाषा समर्थन +Comment[hu]=Támogatás a Pascal nyelv használatához +Comment[is]=Stuðningur við Pascal forritunarmálið +Comment[it]=Supporto per il linguaggio Pascal +Comment[ja]=Pascal 言語サポート +Comment[nds]=Ünnerstütten för de Spraak Pascal +Comment[ne]=पास्कल भाषा समर्थन +Comment[nl]=Ondersteuning voor Pascal +Comment[pl]=Obsługa języka Pascal +Comment[pt]=Suporte da Linguagem Pascal +Comment[pt_BR]=Suporte à Linguagem Pascal +Comment[ru]=Поддержка языка Pascal +Comment[sk]=Podpora jazyka Pascal +Comment[sl]=Podpora jeziku pascal +Comment[sr]=Језичка подршка за Pascal +Comment[sr@Latn]=Jezička podrška za Pascal +Comment[sv]=Stöd för språket Pascal +Comment[ta]=பாஸ்கல் மொழி ஆதரவு +Comment[tg]=Ёрӣ намудани забони Pascal Language +Comment[tr]=Pascal Dil Desteği +Comment[zh_CN]=Pascal 语言支持 +Comment[zh_TW]=Pascal 語言支援 +Name=KDevPascalSupport +Name[da]=TDevelop Pascal-understøttelse +Name[de]=Sprachunterstützung für Pascal (TDevelop) +Name[hi]=के-डेव-पॉस्कल-समर्थन +Name[nds]=Pascal-Ünnerstütten för TDevelop +Name[pl]=KDevObsługaPascala +Name[sk]=KDev Pascal podpora +Name[sv]=TDevelop Pascal-stöd +Name[ta]=கெடெவ் பாஸ்கல் ஆதரவு +Name[zh_TW]=TDevelop Pascal 支援 +GenericName=Pascal Language Support +GenericName[ca]=Suport per al llenguatge Pascal +GenericName[da]=Pascal sprogunderstøttelse +GenericName[de]=Sprachunterstützung für Pascal +GenericName[el]=Υποστήριξη γλώσσας Pascal +GenericName[es]=Soporte para el lenguaje Pascal +GenericName[et]=Pascali keele toetus +GenericName[eu]=Pascal lenguaiaren euskarria +GenericName[fa]=پشتیبانی زبان پاسکال +GenericName[fr]=Prise en charge du langage PASCAL +GenericName[ga]=Tacaíocht Pascal +GenericName[gl]=Soporte para linguaxe Pascal +GenericName[hi]=पास्कल भाषा समर्थन +GenericName[hu]=Pascal-támogatás +GenericName[it]=Supporto per il linguaggio Pascal +GenericName[ja]=Pascal 言語サポート +GenericName[nds]=Ünnerstütten för de Spraak Pascal +GenericName[ne]=पास्कल भाषा समर्थन +GenericName[nl]=Ondersteuning voor Pascal +GenericName[pl]=Obsługa języka Pascal +GenericName[pt]=Suporte à Linguagem Pascal +GenericName[pt_BR]=Suporte à Linguagem Pascal +GenericName[ru]=Поддержка языка Pascal +GenericName[sk]=Podpora jazyka Pascal +GenericName[sl]=Podpora jezicu pascal +GenericName[sr]=Језичка подршка за Pascal +GenericName[sr@Latn]=Jezička podrška za Pascal +GenericName[sv]=Stöd för språket Pascal +GenericName[ta]=பாஸ்கல் மொழி ஆதரவு +GenericName[tg]=Ёрӣ намудани забони Pascal +GenericName[tr]=Pascal Dil Desteği +GenericName[zh_CN]=Pascal 语言支持 +GenericName[zh_TW]=Pascal 語言支援 +ServiceTypes=TDevelop/LanguageSupport +X-TDE-Library=libkdevpascalsupport +X-TDevelop-Version=5 +X-TDevelop-Language=Pascal diff --git a/languages/pascal/tdevpascalsupport.rc b/languages/pascal/kdevpascalsupport.rc similarity index 100% rename from languages/pascal/tdevpascalsupport.rc rename to languages/pascal/kdevpascalsupport.rc diff --git a/languages/pascal/pascalsupport_part.cpp b/languages/pascal/pascalsupport_part.cpp index 3b9d8263..69cbebf8 100644 --- a/languages/pascal/pascalsupport_part.cpp +++ b/languages/pascal/pascalsupport_part.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include #include #include @@ -23,11 +23,11 @@ #include #include "catalog.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "pascalsupport_part.h" #include "problemreporter.h" @@ -43,16 +43,16 @@ struct PascalSupportPartData{ {} }; -typedef TDevGenericFactory PascalSupportFactory; -static const TDevPluginInfo data("tdevpascalsupport"); -K_EXPORT_COMPONENT_FACTORY( libtdevpascalsupport, PascalSupportFactory( data ) ) +typedef KDevGenericFactory PascalSupportFactory; +static const KDevPluginInfo data("kdevpascalsupport"); +K_EXPORT_COMPONENT_FACTORY( libkdevpascalsupport, PascalSupportFactory( data ) ) PascalSupportPart::PascalSupportPart(TQObject *parent, const char *name, const TQStringList &) - : TDevLanguageSupport(&data, parent, name ? name : "KDevPascalSupport" ), + : KDevLanguageSupport(&data, parent, name ? name : "KDevPascalSupport" ), d( new PascalSupportPartData() ) { setInstance(PascalSupportFactory::instance()); - setXMLFile("tdevpascalsupport.rc"); + setXMLFile("kdevpascalsupport.rc"); d->problemReporter = new ProblemReporter( this ); connect( core(), TQT_SIGNAL(configWidget(KDialogBase*)), @@ -317,7 +317,7 @@ TQString PascalSupportPart::formatModelItem( const CodeModelItem * item, bool sh return arg.stripWhiteSpace(); } else - return TDevLanguageSupport::formatModelItem( item, shortDescription ); + return KDevLanguageSupport::formatModelItem( item, shortDescription ); } #include "pascalsupport_part.moc" diff --git a/languages/pascal/pascalsupport_part.h b/languages/pascal/pascalsupport_part.h index bac5c25b..5c99c2ae 100644 --- a/languages/pascal/pascalsupport_part.h +++ b/languages/pascal/pascalsupport_part.h @@ -7,11 +7,11 @@ * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * ***************************************************************************/ -#ifndef __TDEVPART_PASCALSUPPORT_H__ -#define __TDEVPART_PASCALSUPPORT_H__ +#ifndef __KDEVPART_PASCALSUPPORT_H__ +#define __KDEVPART_PASCALSUPPORT_H__ #include -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" class PascalSupportWidget; class KDialogBase; @@ -19,7 +19,7 @@ class TQPopupMenu; class Context; class PascalSupportPartData; -class PascalSupportPart : public TDevLanguageSupport +class PascalSupportPart : public KDevLanguageSupport { Q_OBJECT diff --git a/languages/pascal/problemreporter.cpp b/languages/pascal/problemreporter.cpp index 0d33aec1..2b477063 100644 --- a/languages/pascal/problemreporter.cpp +++ b/languages/pascal/problemreporter.cpp @@ -18,8 +18,8 @@ #include "problemreporter.h" #include "pascalsupport_part.h" -#include "tdevpartcontroller.h" -#include "tdevmainwindow.h" +#include "kdevpartcontroller.h" +#include "kdevmainwindow.h" #include "configproblemreporter.h" #include "backgroundparser.h" diff --git a/languages/pascal/tdevpascalsupport.desktop b/languages/pascal/tdevpascalsupport.desktop deleted file mode 100644 index 85c50c20..00000000 --- a/languages/pascal/tdevpascalsupport.desktop +++ /dev/null @@ -1,84 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Pascal Language Support -Comment[ca]=Suport per al llenguatge Pascal -Comment[da]=Pascal sprogunderstøttelse -Comment[de]=Pascal-Unterstützung für TDevelop -Comment[el]=Υποστήριξη γλώσσας Pascal -Comment[es]=Soporte para el lenguaje Pascal -Comment[et]=Pascali keele toetus -Comment[eu]=Pascal lenguaiaren euskarria -Comment[fa]=پشتیبانی زبان پاسکال -Comment[fr]=Prise en charge du langage Pascal -Comment[ga]=Tacaíocht Pascal -Comment[gl]=Soporte para linguaxe Pascal -Comment[hi]=पास्कल भाषा समर्थन -Comment[hu]=Támogatás a Pascal nyelv használatához -Comment[is]=Stuðningur við Pascal forritunarmálið -Comment[it]=Supporto per il linguaggio Pascal -Comment[ja]=Pascal 言語サポート -Comment[nds]=Ünnerstütten för de Spraak Pascal -Comment[ne]=पास्कल भाषा समर्थन -Comment[nl]=Ondersteuning voor Pascal -Comment[pl]=Obsługa języka Pascal -Comment[pt]=Suporte da Linguagem Pascal -Comment[pt_BR]=Suporte à Linguagem Pascal -Comment[ru]=Поддержка языка Pascal -Comment[sk]=Podpora jazyka Pascal -Comment[sl]=Podpora jeziku pascal -Comment[sr]=Језичка подршка за Pascal -Comment[sr@Latn]=Jezička podrška za Pascal -Comment[sv]=Stöd för språket Pascal -Comment[ta]=பாஸ்கல் மொழி ஆதரவு -Comment[tg]=Ёрӣ намудани забони Pascal Language -Comment[tr]=Pascal Dil Desteği -Comment[zh_CN]=Pascal 语言支持 -Comment[zh_TW]=Pascal 語言支援 -Name=KDevPascalSupport -Name[da]=TDevelop Pascal-understøttelse -Name[de]=Sprachunterstützung für Pascal (TDevelop) -Name[hi]=के-डेव-पॉस्कल-समर्थन -Name[nds]=Pascal-Ünnerstütten för TDevelop -Name[pl]=KDevObsługaPascala -Name[sk]=KDev Pascal podpora -Name[sv]=TDevelop Pascal-stöd -Name[ta]=கெடெவ் பாஸ்கல் ஆதரவு -Name[zh_TW]=TDevelop Pascal 支援 -GenericName=Pascal Language Support -GenericName[ca]=Suport per al llenguatge Pascal -GenericName[da]=Pascal sprogunderstøttelse -GenericName[de]=Sprachunterstützung für Pascal -GenericName[el]=Υποστήριξη γλώσσας Pascal -GenericName[es]=Soporte para el lenguaje Pascal -GenericName[et]=Pascali keele toetus -GenericName[eu]=Pascal lenguaiaren euskarria -GenericName[fa]=پشتیبانی زبان پاسکال -GenericName[fr]=Prise en charge du langage PASCAL -GenericName[ga]=Tacaíocht Pascal -GenericName[gl]=Soporte para linguaxe Pascal -GenericName[hi]=पास्कल भाषा समर्थन -GenericName[hu]=Pascal-támogatás -GenericName[it]=Supporto per il linguaggio Pascal -GenericName[ja]=Pascal 言語サポート -GenericName[nds]=Ünnerstütten för de Spraak Pascal -GenericName[ne]=पास्कल भाषा समर्थन -GenericName[nl]=Ondersteuning voor Pascal -GenericName[pl]=Obsługa języka Pascal -GenericName[pt]=Suporte à Linguagem Pascal -GenericName[pt_BR]=Suporte à Linguagem Pascal -GenericName[ru]=Поддержка языка Pascal -GenericName[sk]=Podpora jazyka Pascal -GenericName[sl]=Podpora jezicu pascal -GenericName[sr]=Језичка подршка за Pascal -GenericName[sr@Latn]=Jezička podrška za Pascal -GenericName[sv]=Stöd för språket Pascal -GenericName[ta]=பாஸ்கல் மொழி ஆதரவு -GenericName[tg]=Ёрӣ намудани забони Pascal -GenericName[tr]=Pascal Dil Desteği -GenericName[zh_CN]=Pascal 语言支持 -GenericName[zh_TW]=Pascal 語言支援 -ServiceTypes=TDevelop/LanguageSupport -X-TDE-Library=libtdevpascalsupport -X-TDevelop-Version=5 -X-TDevelop-Language=Pascal diff --git a/languages/perl/CMakeLists.txt b/languages/perl/CMakeLists.txt index 01327acb..e458c240 100644 --- a/languages/perl/CMakeLists.txt +++ b/languages/perl/CMakeLists.txt @@ -30,13 +30,13 @@ link_directories( ##### other data ################################ -install( FILES tdevperlsupport.desktop perldoc.protocol DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevperlsupport.rc DESTINATION ${DATA_INSTALL_DIR}/tdevperlsupport ) +install( FILES kdevperlsupport.desktop perldoc.protocol DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevperlsupport.rc DESTINATION ${DATA_INSTALL_DIR}/kdevperlsupport ) -##### libtdevperlsupport (module) ############### +##### libkdevperlsupport (module) ############### -tde_add_kpart( libtdevperlsupport AUTOMOC +tde_add_kpart( libkdevperlsupport AUTOMOC SOURCES perlparser.cpp perlsupportpart.cpp perlconfigwidget.cpp perlconfigwidgetbase.ui diff --git a/languages/perl/Makefile.am b/languages/perl/Makefile.am index f498dfd3..fcedfa23 100644 --- a/languages/perl/Makefile.am +++ b/languages/perl/Makefile.am @@ -6,11 +6,11 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ SUBDIRS = app_templates file_templates doc -kde_module_LTLIBRARIES = libtdevperlsupport.la tdeio_perldoc.la -libtdevperlsupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevperlsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevperlsupport.la tdeio_perldoc.la +libkdevperlsupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevperlsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevperlsupport_la_SOURCES = perlparser.cpp perlsupportpart.cpp perlconfigwidget.cpp perlconfigwidgetbase.ui +libkdevperlsupport_la_SOURCES = perlparser.cpp perlsupportpart.cpp perlconfigwidget.cpp perlconfigwidgetbase.ui tdeio_perldoc_la_SOURCES = perldoc.cpp tdeio_perldoc_la_LIBADD = $(LIB_TDEIO) @@ -19,7 +19,7 @@ tdeio_perldoc_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevperlsupport.desktop perldoc.protocol +service_DATA = kdevperlsupport.desktop perldoc.protocol -rcdir = $(kde_datadir)/tdevperlsupport -rc_DATA = tdevperlsupport.rc +rcdir = $(kde_datadir)/kdevperlsupport +rc_DATA = kdevperlsupport.rc diff --git a/languages/perl/app_templates/perlhello/CMakeLists.txt b/languages/perl/app_templates/perlhello/CMakeLists.txt index 6537b51c..bf51d851 100644 --- a/languages/perl/app_templates/perlhello/CMakeLists.txt +++ b/languages/perl/app_templates/perlhello/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( perlhello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/perlhello.tar.gz perlhello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - perlhello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + perlhello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/perl/app_templates/perlhello/Makefile.am b/languages/perl/app_templates/perlhello/Makefile.am index a7987969..b483b35b 100644 --- a/languages/perl/app_templates/perlhello/Makefile.am +++ b/languages/perl/app_templates/perlhello/Makefile.am @@ -2,10 +2,10 @@ dataFiles = app.pl app.tdevelop templateName = perlhello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/perl/app_templates/perlhello/app.tdevelop b/languages/perl/app_templates/perlhello/app.tdevelop index 2ae93215..a83391b7 100644 --- a/languages/perl/app_templates/perlhello/app.tdevelop +++ b/languages/perl/app_templates/perlhello/app.tdevelop @@ -9,7 +9,7 @@ . false - + ./%{APPNAMELC}.pl @@ -17,8 +17,8 @@ *.pl,*.pm *~ - - + + ada ada_bugs_gcc @@ -65,13 +65,13 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/languages/perl/app_templates/perlhello/perlhello.tdevtemplate b/languages/perl/app_templates/perlhello/perlhello.kdevtemplate similarity index 100% rename from languages/perl/app_templates/perlhello/perlhello.tdevtemplate rename to languages/perl/app_templates/perlhello/perlhello.kdevtemplate diff --git a/languages/perl/doc/CMakeLists.txt b/languages/perl/doc/CMakeLists.txt index 2e8ed498..653dc0d7 100644 --- a/languages/perl/doc/CMakeLists.txt +++ b/languages/perl/doc/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES perl.toc perl_bugs.toc - DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation/tocs ) + DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation/tocs ) diff --git a/languages/perl/doc/Makefile.am b/languages/perl/doc/Makefile.am index b62295ed..dae5d699 100644 --- a/languages/perl/doc/Makefile.am +++ b/languages/perl/doc/Makefile.am @@ -1,4 +1,4 @@ -tocdir = ${kde_datadir}/tdevdocumentation/tocs +tocdir = ${kde_datadir}/kdevdocumentation/tocs toc_DATA = perl.toc perl_bugs.toc #indexdir = ${kde_datadir}/devdoctreeview/indices diff --git a/languages/perl/file_templates/CMakeLists.txt b/languages/perl/file_templates/CMakeLists.txt index 96c5fa74..7faec8fc 100644 --- a/languages/perl/file_templates/CMakeLists.txt +++ b/languages/perl/file_templates/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES pl pm - DESTINATION ${DATA_INSTALL_DIR}/tdevfilecreate/file-templates ) + DESTINATION ${DATA_INSTALL_DIR}/kdevfilecreate/file-templates ) diff --git a/languages/perl/file_templates/Makefile.am b/languages/perl/file_templates/Makefile.am index 5dd94646..f1f8457d 100644 --- a/languages/perl/file_templates/Makefile.am +++ b/languages/perl/file_templates/Makefile.am @@ -1,4 +1,4 @@ -templatedir = $(kde_datadir)/tdevfilecreate/file-templates +templatedir = $(kde_datadir)/kdevfilecreate/file-templates template_DATA = pl pm diff --git a/languages/perl/kdevperlsupport.desktop b/languages/perl/kdevperlsupport.desktop new file mode 100644 index 00000000..9c637679 --- /dev/null +++ b/languages/perl/kdevperlsupport.desktop @@ -0,0 +1,85 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Perl Support +Comment[ca]=Suport per a Perl +Comment[da]=Perl-understøttelse +Comment[de]=Perl-Unterstützung für TDevelop +Comment[el]=Υποστήριξη Perl +Comment[es]=Soporte para Perl +Comment[et]=Perli toetus +Comment[eu]=Perl euskarria +Comment[fa]=پشتیبانی پرل +Comment[fr]=Prise en charge du langage Perl +Comment[ga]=Tacaíocht Perl +Comment[gl]=Soporte para Perl +Comment[hi]=पर्ल समर्थन +Comment[hu]=Perl-támogatás +Comment[is]=Perl stuðningur +Comment[it]=Supporto Perl +Comment[ja]=Perl サポート +Comment[nds]=Ünnerstütten för Perl +Comment[ne]=पर्ल समर्थन +Comment[nl]=Ondersteuning voor Perl +Comment[pl]=Obsługa Perla +Comment[pt]=Suporte a Perl +Comment[pt_BR]=Suporte ao Perl +Comment[ru]=Поддержка языка Perl +Comment[sk]=Perl podpora +Comment[sl]=Podpora za perl +Comment[sr]=Подршка за Perl +Comment[sr@Latn]=Podrška za Perl +Comment[sv]=Perl-stöd +Comment[ta]=பெர்ல் ஆதரவு +Comment[tg]=Ёрӣ намудани забони Perl +Comment[tr]=Perl Desteği +Comment[zh_CN]=Perl 支持 +Comment[zh_TW]=Perl 支援 +Name=KDevPerlSupport +Name[da]=TDevelop Perl-understøttelse +Name[de]=Unterstützung für Perl (TDevelop) +Name[hi]=के-डेव-पर्ल-समर्थन +Name[nds]=Perl-Ünnerstütten för TDevelop +Name[pl]=KDevObsługaPerla +Name[sk]=KDev Perl podpora +Name[sv]=TDevelop Perl-stöd +Name[ta]=கெடெவ் பெர்ல் ஆதரவு +Name[zh_TW]=TDevelop Perl 支援 +GenericName=Perl Support +GenericName[ca]=Suport per a Perl +GenericName[da]=Perl-understøttelse +GenericName[de]=Unterstützung für Perl +GenericName[el]=Υποστήριξη Perl +GenericName[es]=Soporte para Perl +GenericName[et]=Perli toetus +GenericName[eu]=Perl euskarria +GenericName[fa]=پشتیبانی پرل +GenericName[fr]=Prise en charge du langage PERL +GenericName[ga]=Tacaíocht Perl +GenericName[gl]=Soporte para Perl +GenericName[hi]=पर्ल समर्थन +GenericName[hu]=Perl-támogatás +GenericName[it]=Supporto per Perl +GenericName[ja]=Perl サポート +GenericName[nds]=Ünnerstütten för Perl +GenericName[ne]=पर्ल समर्थन +GenericName[nl]=Ondersteuning voor Perl +GenericName[pl]=Obsługa Perla +GenericName[pt]=Suporte a Perl +GenericName[pt_BR]=Suporte ao Perl +GenericName[ru]=Поддержка языка Perl +GenericName[sk]=Perl podpora +GenericName[sl]=Podpora za perl +GenericName[sr]=Подршка за Perl +GenericName[sr@Latn]=Podrška za Perl +GenericName[sv]=Perl-stöd +GenericName[ta]=பெர்ல் ஆதரவு +GenericName[tg]=Ёрӣ намудани забони Perl +GenericName[tr]=Perl Desteği +GenericName[zh_CN]=Perl 支持 +GenericName[zh_TW]=Perl 支援 +ServiceTypes=TDevelop/LanguageSupport +X-TDE-Library=libkdevperlsupport +X-TDevelop-Version=5 +X-TDevelop-Language=Perl + diff --git a/languages/perl/tdevperlsupport.rc b/languages/perl/kdevperlsupport.rc similarity index 100% rename from languages/perl/tdevperlsupport.rc rename to languages/perl/kdevperlsupport.rc diff --git a/languages/perl/perlparser.cpp b/languages/perl/perlparser.cpp index ca7b8dff..60cca8f5 100644 --- a/languages/perl/perlparser.cpp +++ b/languages/perl/perlparser.cpp @@ -22,7 +22,7 @@ #include #include -perlparser::perlparser(TDevCore* core,CodeModel* model, TQString interpreter) { +perlparser::perlparser(KDevCore* core,CodeModel* model, TQString interpreter) { m_core = core; m_model = model; m_interpreter=interpreter; diff --git a/languages/perl/perlparser.h b/languages/perl/perlparser.h index 6249ce15..b536596b 100644 --- a/languages/perl/perlparser.h +++ b/languages/perl/perlparser.h @@ -18,7 +18,7 @@ #ifndef PERLPARSER_H #define PERLPARSER_H -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" #include @@ -28,7 +28,7 @@ class perlparser { public: - perlparser(TDevCore* core,CodeModel* model, TQString interpreter); + perlparser(KDevCore* core,CodeModel* model, TQString interpreter); perlparser(); ~perlparser(); @@ -70,7 +70,7 @@ class perlparser { //CodeModel CodeModel* m_model; - TDevCore* m_core; + KDevCore* m_core; FileDom m_file; //this willhav a list of INC paths diff --git a/languages/perl/perlsupportpart.cpp b/languages/perl/perlsupportpart.cpp index 08627ea5..c8379c77 100644 --- a/languages/perl/perlsupportpart.cpp +++ b/languages/perl/perlsupportpart.cpp @@ -19,24 +19,24 @@ #include #include #include -#include +#include #include #include #include #include #include #include -#include "tdevmainwindow.h" +#include "kdevmainwindow.h" #include #include #include -#include "tdevcore.h" -#include "tdevproject.h" -#include "tdevpartcontroller.h" -#include "tdevplugininfo.h" -#include "tdevappfrontend.h" +#include "kdevcore.h" +#include "kdevproject.h" +#include "kdevpartcontroller.h" +#include "kdevplugininfo.h" +#include "kdevappfrontend.h" //#include "classstore.h" //#include "parsedclass.h" //#include "parsedmethod.h" @@ -44,16 +44,16 @@ #include "domutil.h" //#include "programmingbycontract.h" -typedef TDevGenericFactory PerlSupportFactory; -static const TDevPluginInfo data("tdevperlsupport"); -K_EXPORT_COMPONENT_FACTORY( libtdevperlsupport, PerlSupportFactory( data ) ) +typedef KDevGenericFactory PerlSupportFactory; +static const KDevPluginInfo data("kdevperlsupport"); +K_EXPORT_COMPONENT_FACTORY( libkdevperlsupport, PerlSupportFactory( data ) ) PerlSupportPart::PerlSupportPart(TQObject *parent, const char *name, const TQStringList &) - : TDevLanguageSupport(&data, parent, name ? name : "PerlSupportPart") + : KDevLanguageSupport(&data, parent, name ? name : "PerlSupportPart") { setInstance(PerlSupportFactory::instance()); - setXMLFile("tdevperlsupport.rc"); + setXMLFile("kdevperlsupport.rc"); connect( core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened()) ); connect( core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed()) ); @@ -174,9 +174,9 @@ void PerlSupportPart::savedFile(const KURL &fileName) } -TDevLanguageSupport::Features PerlSupportPart::features() +KDevLanguageSupport::Features PerlSupportPart::features() { - return TDevLanguageSupport::Features(Classes | Functions | Variables | Namespaces | /*Scripts | */NewClass | AddMethod | AddAttribute /*| NewScript*/); + return KDevLanguageSupport::Features(Classes | Functions | Variables | Namespaces | /*Scripts | */NewClass | AddMethod | AddAttribute /*| NewScript*/); // return Functions; } @@ -193,7 +193,7 @@ TQString PerlSupportPart::interpreter() void PerlSupportPart::startApplication(const TQString &program) { bool inTerminal = DomUtil::readBoolEntry(*projectDom(), "/kdevperlsupport/run/terminal"); - if (TDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) + if (KDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) appFrontend->startAppCommand(TQString(), program, inTerminal); } diff --git a/languages/perl/perlsupportpart.h b/languages/perl/perlsupportpart.h index b6517bbc..00c6bc69 100644 --- a/languages/perl/perlsupportpart.h +++ b/languages/perl/perlsupportpart.h @@ -12,11 +12,11 @@ #ifndef _PERLSUPPORTPART_H_ #define _PERLSUPPORTPART_H_ -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" #include #include "perlparser.h" -class PerlSupportPart : public TDevLanguageSupport +class PerlSupportPart : public KDevLanguageSupport { Q_OBJECT diff --git a/languages/perl/tdevperlsupport.desktop b/languages/perl/tdevperlsupport.desktop deleted file mode 100644 index 472be4f3..00000000 --- a/languages/perl/tdevperlsupport.desktop +++ /dev/null @@ -1,85 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Perl Support -Comment[ca]=Suport per a Perl -Comment[da]=Perl-understøttelse -Comment[de]=Perl-Unterstützung für TDevelop -Comment[el]=Υποστήριξη Perl -Comment[es]=Soporte para Perl -Comment[et]=Perli toetus -Comment[eu]=Perl euskarria -Comment[fa]=پشتیبانی پرل -Comment[fr]=Prise en charge du langage Perl -Comment[ga]=Tacaíocht Perl -Comment[gl]=Soporte para Perl -Comment[hi]=पर्ल समर्थन -Comment[hu]=Perl-támogatás -Comment[is]=Perl stuðningur -Comment[it]=Supporto Perl -Comment[ja]=Perl サポート -Comment[nds]=Ünnerstütten för Perl -Comment[ne]=पर्ल समर्थन -Comment[nl]=Ondersteuning voor Perl -Comment[pl]=Obsługa Perla -Comment[pt]=Suporte a Perl -Comment[pt_BR]=Suporte ao Perl -Comment[ru]=Поддержка языка Perl -Comment[sk]=Perl podpora -Comment[sl]=Podpora za perl -Comment[sr]=Подршка за Perl -Comment[sr@Latn]=Podrška za Perl -Comment[sv]=Perl-stöd -Comment[ta]=பெர்ல் ஆதரவு -Comment[tg]=Ёрӣ намудани забони Perl -Comment[tr]=Perl Desteği -Comment[zh_CN]=Perl 支持 -Comment[zh_TW]=Perl 支援 -Name=KDevPerlSupport -Name[da]=TDevelop Perl-understøttelse -Name[de]=Unterstützung für Perl (TDevelop) -Name[hi]=के-डेव-पर्ल-समर्थन -Name[nds]=Perl-Ünnerstütten för TDevelop -Name[pl]=KDevObsługaPerla -Name[sk]=KDev Perl podpora -Name[sv]=TDevelop Perl-stöd -Name[ta]=கெடெவ் பெர்ல் ஆதரவு -Name[zh_TW]=TDevelop Perl 支援 -GenericName=Perl Support -GenericName[ca]=Suport per a Perl -GenericName[da]=Perl-understøttelse -GenericName[de]=Unterstützung für Perl -GenericName[el]=Υποστήριξη Perl -GenericName[es]=Soporte para Perl -GenericName[et]=Perli toetus -GenericName[eu]=Perl euskarria -GenericName[fa]=پشتیبانی پرل -GenericName[fr]=Prise en charge du langage PERL -GenericName[ga]=Tacaíocht Perl -GenericName[gl]=Soporte para Perl -GenericName[hi]=पर्ल समर्थन -GenericName[hu]=Perl-támogatás -GenericName[it]=Supporto per Perl -GenericName[ja]=Perl サポート -GenericName[nds]=Ünnerstütten för Perl -GenericName[ne]=पर्ल समर्थन -GenericName[nl]=Ondersteuning voor Perl -GenericName[pl]=Obsługa Perla -GenericName[pt]=Suporte a Perl -GenericName[pt_BR]=Suporte ao Perl -GenericName[ru]=Поддержка языка Perl -GenericName[sk]=Perl podpora -GenericName[sl]=Podpora za perl -GenericName[sr]=Подршка за Perl -GenericName[sr@Latn]=Podrška za Perl -GenericName[sv]=Perl-stöd -GenericName[ta]=பெர்ல் ஆதரவு -GenericName[tg]=Ёрӣ намудани забони Perl -GenericName[tr]=Perl Desteği -GenericName[zh_CN]=Perl 支持 -GenericName[zh_TW]=Perl 支援 -ServiceTypes=TDevelop/LanguageSupport -X-TDE-Library=libtdevperlsupport -X-TDevelop-Version=5 -X-TDevelop-Language=Perl - diff --git a/languages/php/CMakeLists.txt b/languages/php/CMakeLists.txt index 02faa3cc..3a9e4123 100644 --- a/languages/php/CMakeLists.txt +++ b/languages/php/CMakeLists.txt @@ -32,20 +32,20 @@ link_directories( ##### other data ################################ -install( FILES tdevphpsupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevphpsupport.rc DESTINATION ${DATA_INSTALL_DIR}/tdevphpsupport ) -install( FILES phptemplates DESTINATION ${DATA_INSTALL_DIR}/tdevabbrev/templates ) +install( FILES kdevphpsupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevphpsupport.rc DESTINATION ${DATA_INSTALL_DIR}/kdevphpsupport ) +install( FILES phptemplates DESTINATION ${DATA_INSTALL_DIR}/kdevabbrev/templates ) -##### libtdevphpsupport (module) ################ +##### libkdevphpsupport (module) ################ -tde_add_kpart( libtdevphpsupport AUTOMOC +tde_add_kpart( libkdevphpsupport AUTOMOC SOURCES phpsupportpart.cpp phpconfigwidgetbase.ui phpconfigwidget.cpp phpinfodlg.ui phphtmlview.cpp phperrorview.cpp phpconfigdata.cpp phpcodecompletion.cpp phpparser.cpp phpnewclassdlgbase.ui phpnewclassdlg.cpp phpfile.cpp - LINK tdevwidgets-shared tdevelop-shared + LINK kdevwidgets-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/languages/php/Makefile.am b/languages/php/Makefile.am index bc4bb9d9..a10604e5 100644 --- a/languages/php/Makefile.am +++ b/languages/php/Makefile.am @@ -6,19 +6,19 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ SUBDIRS = data app_templates file_templates doc -kde_module_LTLIBRARIES = libtdevphpsupport.la -libtdevphpsupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevphpsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/widgets/libtdevwidgets.la $(LIB_TDEHTML) +kde_module_LTLIBRARIES = libkdevphpsupport.la +libkdevphpsupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevphpsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/widgets/libkdevwidgets.la $(LIB_TDEHTML) -libtdevphpsupport_la_SOURCES = phpsupportpart.cpp phpconfigwidgetbase.ui phpconfigwidget.cpp phpinfodlg.ui phphtmlview.cpp phperrorview.cpp phpconfigdata.cpp phpcodecompletion.cpp phpparser.cpp phpnewclassdlgbase.ui phpnewclassdlg.cpp phpfile.cpp +libkdevphpsupport_la_SOURCES = phpsupportpart.cpp phpconfigwidgetbase.ui phpconfigwidget.cpp phpinfodlg.ui phphtmlview.cpp phperrorview.cpp phpconfigdata.cpp phpcodecompletion.cpp phpparser.cpp phpnewclassdlgbase.ui phpnewclassdlg.cpp phpfile.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevphpsupport.desktop +service_DATA = kdevphpsupport.desktop -rcdir = $(kde_datadir)/tdevphpsupport -rc_DATA = tdevphpsupport.rc +rcdir = $(kde_datadir)/kdevphpsupport +rc_DATA = kdevphpsupport.rc -templatedir = ${kde_datadir}/tdevabbrev/templates +templatedir = ${kde_datadir}/kdevabbrev/templates template_DATA = phptemplates diff --git a/languages/php/app_templates/phphello/CMakeLists.txt b/languages/php/app_templates/phphello/CMakeLists.txt index c858f07a..4e534e08 100644 --- a/languages/php/app_templates/phphello/CMakeLists.txt +++ b/languages/php/app_templates/phphello/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( phphello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/phphello.tar.gz phphello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - phphello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + phphello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/php/app_templates/phphello/Makefile.am b/languages/php/app_templates/phphello/Makefile.am index c1457307..bc983960 100644 --- a/languages/php/app_templates/phphello/Makefile.am +++ b/languages/php/app_templates/phphello/Makefile.am @@ -2,10 +2,10 @@ dataFiles = app.php app.tdevelop templateName = phphello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/php/app_templates/phphello/app.tdevelop b/languages/php/app_templates/phphello/app.tdevelop index 961e0f4d..2cdb1c70 100644 --- a/languages/php/app_templates/phphello/app.tdevelop +++ b/languages/php/app_templates/phphello/app.tdevelop @@ -15,13 +15,13 @@ KDevVisualBoyAdvance - + *.php,*.phps,*.php3,*.inc - - + + ada ada_bugs_gcc @@ -65,23 +65,23 @@ KDE Libraries (Doxygen) - - + + true true true - - + + - - + + - + diff --git a/languages/php/app_templates/phphello/phphello.tdevtemplate b/languages/php/app_templates/phphello/phphello.kdevtemplate similarity index 100% rename from languages/php/app_templates/phphello/phphello.tdevtemplate rename to languages/php/app_templates/phphello/phphello.kdevtemplate diff --git a/languages/php/data/CMakeLists.txt b/languages/php/data/CMakeLists.txt index 1662f9c9..f89943bc 100644 --- a/languages/php/data/CMakeLists.txt +++ b/languages/php/data/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES phpfunctions - DESTINATION ${DATA_INSTALL_DIR}/tdevphpsupport ) + DESTINATION ${DATA_INSTALL_DIR}/kdevphpsupport ) diff --git a/languages/php/data/Makefile.am b/languages/php/data/Makefile.am index c48e5460..e54b0415 100644 --- a/languages/php/data/Makefile.am +++ b/languages/php/data/Makefile.am @@ -1,4 +1,4 @@ -phpsupportdatadir = ${kde_datadir}/tdevphpsupport +phpsupportdatadir = ${kde_datadir}/kdevphpsupport install-data-local: mkdir -p $(DESTDIR)$(phpsupportdatadir) diff --git a/languages/php/doc/CMakeLists.txt b/languages/php/doc/CMakeLists.txt index 8b7e6b10..59ea2199 100644 --- a/languages/php/doc/CMakeLists.txt +++ b/languages/php/doc/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES php.toc php_bugs.toc - DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation/tocs ) + DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation/tocs ) diff --git a/languages/php/doc/Makefile.am b/languages/php/doc/Makefile.am index 2b2ce6aa..163d435b 100644 --- a/languages/php/doc/Makefile.am +++ b/languages/php/doc/Makefile.am @@ -1,4 +1,4 @@ -tocdir = ${kde_datadir}/tdevdocumentation/tocs +tocdir = ${kde_datadir}/kdevdocumentation/tocs toc_DATA = php.toc php_bugs.toc #indexdir = ${kde_datadir}/devdoctreeview/indices diff --git a/languages/php/file_templates/CMakeLists.txt b/languages/php/file_templates/CMakeLists.txt index 3b034ae7..5de3a576 100644 --- a/languages/php/file_templates/CMakeLists.txt +++ b/languages/php/file_templates/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES php - DESTINATION ${DATA_INSTALL_DIR}/tdevfilecreate/file-templates ) + DESTINATION ${DATA_INSTALL_DIR}/kdevfilecreate/file-templates ) diff --git a/languages/php/file_templates/Makefile.am b/languages/php/file_templates/Makefile.am index 765157b2..7f031b4a 100644 --- a/languages/php/file_templates/Makefile.am +++ b/languages/php/file_templates/Makefile.am @@ -1,4 +1,4 @@ -templatedir = $(kde_datadir)/tdevfilecreate/file-templates +templatedir = $(kde_datadir)/kdevfilecreate/file-templates template_DATA = php diff --git a/languages/php/kdevphpsupport.desktop b/languages/php/kdevphpsupport.desktop new file mode 100644 index 00000000..eea6c168 --- /dev/null +++ b/languages/php/kdevphpsupport.desktop @@ -0,0 +1,86 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=PHP Support +Comment[ca]=Suport per a PHP +Comment[da]=PHP-understøttelse +Comment[de]=PHP-Unterstützung für TDevelop +Comment[el]=Υποστήριξη PHP +Comment[es]=Soporte para PHP +Comment[et]=PHP toetus +Comment[eu]=PHP euskarria +Comment[fa]=پشتیبانی پی‌اچ‌پی +Comment[fr]=Prise en charge du langage PHP +Comment[ga]=Tacaíocht PHP +Comment[gl]=Soporte para PHP +Comment[hi]=पीएचपी समर्थन +Comment[hu]=PHP-támogatás +Comment[is]=PHP stuðningur +Comment[it]=Supporto per PHP +Comment[ja]=PHP サポート +Comment[nds]=Ünnerstütten för PHP +Comment[ne]=पी एच पी समर्थन +Comment[nl]=Ondersteuning voor PHP +Comment[pa]=PHP ਸਹਿਯੋਗ +Comment[pl]=Obsługa PHP +Comment[pt]=Suporte a PHP +Comment[pt_BR]=Suporte ao PHP +Comment[ru]=Поддержка языка PHP +Comment[sk]=PHP podpora +Comment[sl]=Podpora za PHP +Comment[sr]=Подршка за PHP +Comment[sr@Latn]=Podrška za PHP +Comment[sv]=PHP-stöd +Comment[ta]=பிஎச்பிஆதரவு +Comment[tg]=Ёрӣ намудани забони PHP +Comment[tr]=PHP Desteği +Comment[zh_CN]=PHP 支持 +Comment[zh_TW]=PHP 支援 +Name=KDevPHPSupport +Name[da]=TDevelop PHP-understøttelse +Name[de]=Unterstützung für PHP (TDevelop) +Name[hi]=के-डेव-पीएचपी-समर्थन +Name[nds]=PHP-Ünnerstütten för TDevelop +Name[pl]=KDevObsługaPHP +Name[sk]=KDev PHP podpora +Name[sv]=TDevelop PHP-stöd +Name[ta]=கெடெவ் பிஎச்பி ஆதரவு +Name[zh_TW]=TDevelop PHP 支援 +GenericName=PHP Support +GenericName[ca]=Suport per a PHP +GenericName[da]=PHP-understøttelse +GenericName[de]=Unterstützung für PHP +GenericName[el]=Υποστήριξη PHP +GenericName[es]=Soporte para PHP +GenericName[et]=PHP toetus +GenericName[eu]=PHP euskarria +GenericName[fa]=پشتیبانی پی‌اچ‌پی +GenericName[fr]=Prise en charge du langage PHP +GenericName[ga]=Tacaíocht PHP +GenericName[gl]=Soporte para PHP +GenericName[hi]=पीएचपी समर्थन +GenericName[hu]=PHP-támogatás +GenericName[it]=Supporto per PHP +GenericName[ja]=PHP サポート +GenericName[nds]=Ünnerstütten för PHP +GenericName[ne]=पी एच पी समर्थन +GenericName[nl]=Ondersteuning voor PHP +GenericName[pl]=Obsługa PHP +GenericName[pt]=Suporte a PHP +GenericName[pt_BR]=Suporte ao PHP +GenericName[ru]=Поддержка языка PHP +GenericName[sk]=PHP podpora +GenericName[sl]=Podpora za PHP +GenericName[sr]=Подршка за PHP +GenericName[sr@Latn]=Podrška za PHP +GenericName[sv]=PHP-stöd +GenericName[ta]=பிஎச்பி ஆதரவு +GenericName[tg]=Ёрӣ намудани забони PHP +GenericName[tr]=PHP Desteği +GenericName[zh_CN]=PHP 支持 +GenericName[zh_TW]=PHP 支援 +ServiceTypes=TDevelop/LanguageSupport +X-TDE-Library=libkdevphpsupport +X-TDevelop-Version=5 +X-TDevelop-Language=PHP + diff --git a/languages/php/tdevphpsupport.rc b/languages/php/kdevphpsupport.rc similarity index 100% rename from languages/php/tdevphpsupport.rc rename to languages/php/kdevphpsupport.rc diff --git a/languages/php/phpcodecompletion.cpp b/languages/php/phpcodecompletion.cpp index 42615f69..af301000 100644 --- a/languages/php/phpcodecompletion.cpp +++ b/languages/php/phpcodecompletion.cpp @@ -21,7 +21,7 @@ #include "phpsupportpart.h" #include "phpconfigdata.h" -#include +#include #include #include #include diff --git a/languages/php/phpcodecompletion.h b/languages/php/phpcodecompletion.h index bac6c44f..65905878 100644 --- a/languages/php/phpcodecompletion.h +++ b/languages/php/phpcodecompletion.h @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include @@ -36,7 +36,7 @@ #include -class TDevCore; +class KDevCore; class PHPSupportPart; class PHPConfigData; diff --git a/languages/php/phperrorview.cpp b/languages/php/phperrorview.cpp index d408afb9..9af14b0d 100644 --- a/languages/php/phperrorview.cpp +++ b/languages/php/phperrorview.cpp @@ -20,9 +20,9 @@ #include "phperrorview.h" #include "phpsupportpart.h" -#include -#include -#include +#include +#include +#include #include #include diff --git a/languages/php/phpfile.cpp b/languages/php/phpfile.cpp index 1c4e6d04..92d2fc4c 100644 --- a/languages/php/phpfile.cpp +++ b/languages/php/phpfile.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include "phphtmlview.h" #include "phperrorview.h" diff --git a/languages/php/phpfile.h b/languages/php/phpfile.h index 647be68a..ac5a4525 100644 --- a/languages/php/phpfile.h +++ b/languages/php/phpfile.h @@ -30,9 +30,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include diff --git a/languages/php/phphtmlview.cpp b/languages/php/phphtmlview.cpp index 01123bb8..d21a6fa0 100644 --- a/languages/php/phphtmlview.cpp +++ b/languages/php/phphtmlview.cpp @@ -18,7 +18,7 @@ #include "phphtmlview.h" #include "phpsupportpart.h" -#include "tdevpartcontroller.h" +#include "kdevpartcontroller.h" PHPHTMLView::PHPHTMLView(PHPSupportPart *part):m_part(part) { setOptions(CanOpenInNewWindow); diff --git a/languages/php/phphtmlview.h b/languages/php/phphtmlview.h index 2da25349..e55be392 100644 --- a/languages/php/phphtmlview.h +++ b/languages/php/phphtmlview.h @@ -18,14 +18,14 @@ #ifndef PHPHTMLVIEW_H #define PHPHTMLVIEW_H -#include +#include /** *@author */ class PHPSupportPart; -class PHPHTMLView : public TDevHTMLPart { +class PHPHTMLView : public KDevHTMLPart { Q_OBJECT public: diff --git a/languages/php/phpparser.cpp b/languages/php/phpparser.cpp index 2af89eee..6b725dc8 100644 --- a/languages/php/phpparser.cpp +++ b/languages/php/phpparser.cpp @@ -21,8 +21,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/languages/php/phpparser.h b/languages/php/phpparser.h index 629e68b6..87093b06 100644 --- a/languages/php/phpparser.h +++ b/languages/php/phpparser.h @@ -31,7 +31,7 @@ #include "phpfile.h" -class TDevCore; +class KDevCore; class PHPSupportPart; /** @@ -56,7 +56,7 @@ public: private: CodeModel* m_model; - TDevCore* m_core; + KDevCore* m_core; PHPSupportPart* m_part; TQMutex m_mutex; diff --git a/languages/php/phpsupportpart.cpp b/languages/php/phpsupportpart.cpp index f5c484a9..4f764f1f 100644 --- a/languages/php/phpsupportpart.cpp +++ b/languages/php/phpsupportpart.cpp @@ -43,13 +43,13 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include -#include +#include #include #include "phpconfigdata.h" @@ -66,18 +66,18 @@ using namespace std; -static const TDevPluginInfo data("tdevphpsupport"); -K_EXPORT_COMPONENT_FACTORY( libtdevphpsupport, PHPSupportFactory( data ) ) +static const KDevPluginInfo data("kdevphpsupport"); +K_EXPORT_COMPONENT_FACTORY( libkdevphpsupport, PHPSupportFactory( data ) ) PHPSupportPart::PHPSupportPart(TQObject *parent, const char *name, const TQStringList &) - : TDevLanguageSupport(&data, parent, name ? name : "PHPSupportPart") + : KDevLanguageSupport(&data, parent, name ? name : "PHPSupportPart") { m_htmlView = 0; m_parser = 0; phpExeProc = 0; setInstance(PHPSupportFactory::instance()); - setXMLFile("tdevphpsupport.rc"); + setXMLFile("kdevphpsupport.rc"); connect( core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened()) ); connect( core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed()) ); @@ -545,7 +545,7 @@ TQString PHPSupportPart::getExePath() return configData->getPHPExecPath(); } -TDevLanguageSupport::Features PHPSupportPart::features() +KDevLanguageSupport::Features PHPSupportPart::features() { return Features(Classes | Functions); } diff --git a/languages/php/phpsupportpart.h b/languages/php/phpsupportpart.h index 35203bc7..4dca877b 100644 --- a/languages/php/phpsupportpart.h +++ b/languages/php/phpsupportpart.h @@ -25,9 +25,9 @@ #include #include -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" #include -#include +#include #include @@ -41,7 +41,7 @@ class PHPCodeCompletion; class PHPParser; class PHPFile; -class PHPSupportPart : public TDevLanguageSupport +class PHPSupportPart : public KDevLanguageSupport { Q_OBJECT @@ -129,6 +129,6 @@ private: VariableDom LastVariable; }; -typedef TDevGenericFactory PHPSupportFactory; +typedef KDevGenericFactory PHPSupportFactory; #endif diff --git a/languages/php/tdevphpsupport.desktop b/languages/php/tdevphpsupport.desktop deleted file mode 100644 index 64fe4329..00000000 --- a/languages/php/tdevphpsupport.desktop +++ /dev/null @@ -1,86 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=PHP Support -Comment[ca]=Suport per a PHP -Comment[da]=PHP-understøttelse -Comment[de]=PHP-Unterstützung für TDevelop -Comment[el]=Υποστήριξη PHP -Comment[es]=Soporte para PHP -Comment[et]=PHP toetus -Comment[eu]=PHP euskarria -Comment[fa]=پشتیبانی پی‌اچ‌پی -Comment[fr]=Prise en charge du langage PHP -Comment[ga]=Tacaíocht PHP -Comment[gl]=Soporte para PHP -Comment[hi]=पीएचपी समर्थन -Comment[hu]=PHP-támogatás -Comment[is]=PHP stuðningur -Comment[it]=Supporto per PHP -Comment[ja]=PHP サポート -Comment[nds]=Ünnerstütten för PHP -Comment[ne]=पी एच पी समर्थन -Comment[nl]=Ondersteuning voor PHP -Comment[pa]=PHP ਸਹਿਯੋਗ -Comment[pl]=Obsługa PHP -Comment[pt]=Suporte a PHP -Comment[pt_BR]=Suporte ao PHP -Comment[ru]=Поддержка языка PHP -Comment[sk]=PHP podpora -Comment[sl]=Podpora za PHP -Comment[sr]=Подршка за PHP -Comment[sr@Latn]=Podrška za PHP -Comment[sv]=PHP-stöd -Comment[ta]=பிஎச்பிஆதரவு -Comment[tg]=Ёрӣ намудани забони PHP -Comment[tr]=PHP Desteği -Comment[zh_CN]=PHP 支持 -Comment[zh_TW]=PHP 支援 -Name=KDevPHPSupport -Name[da]=TDevelop PHP-understøttelse -Name[de]=Unterstützung für PHP (TDevelop) -Name[hi]=के-डेव-पीएचपी-समर्थन -Name[nds]=PHP-Ünnerstütten för TDevelop -Name[pl]=KDevObsługaPHP -Name[sk]=KDev PHP podpora -Name[sv]=TDevelop PHP-stöd -Name[ta]=கெடெவ் பிஎச்பி ஆதரவு -Name[zh_TW]=TDevelop PHP 支援 -GenericName=PHP Support -GenericName[ca]=Suport per a PHP -GenericName[da]=PHP-understøttelse -GenericName[de]=Unterstützung für PHP -GenericName[el]=Υποστήριξη PHP -GenericName[es]=Soporte para PHP -GenericName[et]=PHP toetus -GenericName[eu]=PHP euskarria -GenericName[fa]=پشتیبانی پی‌اچ‌پی -GenericName[fr]=Prise en charge du langage PHP -GenericName[ga]=Tacaíocht PHP -GenericName[gl]=Soporte para PHP -GenericName[hi]=पीएचपी समर्थन -GenericName[hu]=PHP-támogatás -GenericName[it]=Supporto per PHP -GenericName[ja]=PHP サポート -GenericName[nds]=Ünnerstütten för PHP -GenericName[ne]=पी एच पी समर्थन -GenericName[nl]=Ondersteuning voor PHP -GenericName[pl]=Obsługa PHP -GenericName[pt]=Suporte a PHP -GenericName[pt_BR]=Suporte ao PHP -GenericName[ru]=Поддержка языка PHP -GenericName[sk]=PHP podpora -GenericName[sl]=Podpora za PHP -GenericName[sr]=Подршка за PHP -GenericName[sr@Latn]=Podrška za PHP -GenericName[sv]=PHP-stöd -GenericName[ta]=பிஎச்பி ஆதரவு -GenericName[tg]=Ёрӣ намудани забони PHP -GenericName[tr]=PHP Desteği -GenericName[zh_CN]=PHP 支持 -GenericName[zh_TW]=PHP 支援 -ServiceTypes=TDevelop/LanguageSupport -X-TDE-Library=libtdevphpsupport -X-TDevelop-Version=5 -X-TDevelop-Language=PHP - diff --git a/languages/python/CMakeLists.txt b/languages/python/CMakeLists.txt index ec9d708b..989ea1b1 100644 --- a/languages/python/CMakeLists.txt +++ b/languages/python/CMakeLists.txt @@ -32,14 +32,14 @@ link_directories( ##### other data ################################ -install( FILES tdevpythonsupport.desktop pydoc.protocol DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tde_pydoc.py DESTINATION ${DATA_INSTALL_DIR}/tdeio_pydoc ) -install( FILES tdevpythonsupport.rc DESTINATION ${DATA_INSTALL_DIR}/tdevpythonsupport ) +install( FILES kdevpythonsupport.desktop pydoc.protocol DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kde_pydoc.py DESTINATION ${DATA_INSTALL_DIR}/tdeio_pydoc ) +install( FILES kdevpythonsupport.rc DESTINATION ${DATA_INSTALL_DIR}/kdevpythonsupport ) -##### libtdevpythonsupport (module) ############# +##### libkdevpythonsupport (module) ############# -tde_add_kpart( libtdevpythonsupport AUTOMOC +tde_add_kpart( libkdevpythonsupport AUTOMOC SOURCES pythonsupportpart.cpp pythonconfigwidget.cpp pythonconfigwidgetbase.ui pythonimplementationwidget.cpp diff --git a/languages/python/Makefile.am b/languages/python/Makefile.am index 12ca5a06..feef469d 100644 --- a/languages/python/Makefile.am +++ b/languages/python/Makefile.am @@ -1,5 +1,5 @@ # Here resides the Python support part. -# Do not confuse this with the python part responsible for TDevelop scripting +# Do not confuse this with the python part responsible for KDevelop scripting INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/languages/lib/designer_integration \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/interfaces/external -I$(top_srcdir)/lib/util -I$(top_builddir)/languages/lib/designer_integration \ @@ -7,12 +7,12 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/languages/lib/designer SUBDIRS = app_templates file_templates doc -kde_module_LTLIBRARIES = libtdevpythonsupport.la tdeio_pydoc.la +kde_module_LTLIBRARIES = libkdevpythonsupport.la tdeio_pydoc.la -libtdevpythonsupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevpythonsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ +libkdevpythonsupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevpythonsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ $(top_builddir)/languages/lib/designer_integration/libdesignerintegration.la -libtdevpythonsupport_la_SOURCES = pythonsupportpart.cpp pythonconfigwidget.cpp pythonconfigwidgetbase.ui \ +libkdevpythonsupport_la_SOURCES = pythonsupportpart.cpp pythonconfigwidget.cpp pythonconfigwidgetbase.ui \ pythonimplementationwidget.cpp qtdesignerpythonintegration.cpp tdeio_pydoc_la_SOURCES = pydoc.cpp @@ -22,10 +22,10 @@ tdeio_pydoc_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) METASOURCES = AUTO slavedir = $(kde_datadir)/tdeio_pydoc -slave_DATA = tde_pydoc.py +slave_DATA = kde_pydoc.py servicedir = $(kde_servicesdir) -service_DATA = tdevpythonsupport.desktop pydoc.protocol +service_DATA = kdevpythonsupport.desktop pydoc.protocol -rcdir = $(kde_datadir)/tdevpythonsupport -rc_DATA = tdevpythonsupport.rc +rcdir = $(kde_datadir)/kdevpythonsupport +rc_DATA = kdevpythonsupport.rc diff --git a/languages/python/app_templates/pyqt/CMakeLists.txt b/languages/python/app_templates/pyqt/CMakeLists.txt index 0beb7976..672d6652 100644 --- a/languages/python/app_templates/pyqt/CMakeLists.txt +++ b/languages/python/app_templates/pyqt/CMakeLists.txt @@ -21,9 +21,9 @@ add_custom_target( pyqt.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/pyqt.tar.gz pyqt.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - pyqt.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + pyqt.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/python/app_templates/pyqt/Makefile.am b/languages/python/app_templates/pyqt/Makefile.am index 7ace4e15..dc12ca69 100644 --- a/languages/python/app_templates/pyqt/Makefile.am +++ b/languages/python/app_templates/pyqt/Makefile.am @@ -6,10 +6,10 @@ dataFiles = app.py app.tdevelop fileopen.pyxpm fileprint.pyxpm \ templateName = pyqt ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/python/app_templates/pyqt/app.tdevelop b/languages/python/app_templates/pyqt/app.tdevelop index 7f2743cb..2abb394e 100644 --- a/languages/python/app_templates/pyqt/app.tdevelop +++ b/languages/python/app_templates/pyqt/app.tdevelop @@ -12,15 +12,15 @@ - + ./%{APPNAMELC}.py - - + + ada ada_bugs_gcc @@ -61,8 +61,8 @@ KDE Libraries (Doxygen) - - + + false *.o,*.lo,CVS @@ -71,11 +71,11 @@ - - + + - + diff --git a/languages/python/app_templates/pyqt/pyqt.kdevtemplate b/languages/python/app_templates/pyqt/pyqt.kdevtemplate new file mode 100644 index 00000000..f19e263c --- /dev/null +++ b/languages/python/app_templates/pyqt/pyqt.kdevtemplate @@ -0,0 +1,168 @@ +# KDE Config File +[General] +Name=Python Qt application +Name[ca]=Aplicació per a Qt en Python +Name[da]=Python Qt program +Name[de]=Python/Qt-Anwendung +Name[el]=Εφαρμογή Python Qt +Name[es]=Aplicación Qt en Python +Name[et]=Pythoni Qt rakendus +Name[eu]=Python Qt aplikazioa +Name[fa]=کاربرد پیتون Qt +Name[fr]=Application Qt Python +Name[ga]=Feidhmchlár Qt Python +Name[gl]=Aplicación Qt en Python +Name[hu]=Python/Qt-alapú alkalmazás +Name[it]=Applicazione Qt Python +Name[ja]=Python Qt アプリケーション +Name[nds]=Python Qt-Programm +Name[ne]=पाइथोन क्यू टी अनुप्रयोग +Name[nl]=Python Qt-toepassing +Name[pl]=Program Qt w Pythonie +Name[pt]=Aplicação Qt em Python +Name[pt_BR]=Aplicação Qt em Python +Name[ru]=Приложение Qt на Python +Name[sk]=Python Qt aplikácia +Name[sr]=Python-Qt програм +Name[sr@Latn]=Python-Qt program +Name[sv]=Python Qt-program +Name[tr]=Python Qt Uygulaması +Name[zh_CN]=Python Qt 应用程序 +Name[zh_TW]=Python Qt 應用程式 +Icon=pyqt.png +Category=Python +Comment=This generates an application framework using Python and Qt +Comment[ca]=Genera una infraestructura d'aplicació usant Python i Qt +Comment[da]=Dette genererer et programskelet ved brug af Python og Qt +Comment[de]=Hiermit wird ein Anwendungsgerüst unter Verwendung von Python und Qt erstellt +Comment[el]=Αυτό δημιουργεί ένα πλαίσιο εφαρμογής χρησιμοποιώντας τις Python και Qt +Comment[es]=Genera una infraestructura de aplicación que usa Python y Qt +Comment[et]=Rakenduse raamistiku loomine Pythoni ja Qt abil +Comment[eu]=Honek Python eta Qt darabiltzan aplikazioen lan-marko bat sortzen du +Comment[fa]=یک چارچوب کاربرد با استفاده از پیتون و Qt تولید می‌کند +Comment[fr]=Génère une infrastructure d'application utilisant Python et Qt +Comment[ga]=Cruthaíonn sé seo creatlach feidhmchláir le Python agus Qt +Comment[gl]=Isto xera un contorno de traballo para unha aplicación usando Python e Qt +Comment[hu]=Létrehoz egy alkalmazás-keretrendszert Python nyelven, a Qt felhasználásával +Comment[it]=Genera l'infrastruttura applicativa usando Python e Qt +Comment[ja]=Python と Qt を使ってアプリケーションフレームワークを作成します +Comment[nds]=Dit stellt mit Python un Qt en Programmrahmenwark op. +Comment[ne]=यसले पाइथोन र क्यू टी प्रयोग गरेर अनुप्रयोग फ्रेमवर्क उत्पन्न गर्दछ +Comment[nl]=Dit genereert een toepassingsframework met behulp van Python en Qt +Comment[pl]=Generuje szablon programu używającego Pythona i Qt +Comment[pt]=Isto cria a plataforma de uma aplicação que usa o Python e o Qt +Comment[pt_BR]=Isto cria a plataforma de uma aplicação que usa o Python e o Qt +Comment[ru]=Создание приложения Qt на Python +Comment[sk]=Vygeneruje aplikačný framework používajúci Python a Qt +Comment[sr]=Прави радни оквир програма користећи Python и Qt +Comment[sr@Latn]=Pravi radni okvir programa koristeći Python i Qt +Comment[sv]=Detta skapar ett programramverk med användning av Python och Qt +Comment[tr]=Bu Python ve Qt kullanan bir uygulama çatısı yaratır. +Comment[zh_CN]=这将生成一个使用 Python 和 Qt 的应用程序框架 +Comment[zh_TW]=產生一個使用 Python 與 Qt 的應用程式框架 +FileTemplates=py,ShellStyle +ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.py +Archive=pyqt.tar.gz + +[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=%{src}/app.py +Dest=%{dest}/%{APPNAMELC}.py + +[FILE3] +Type=install +EscapeXML=true +Source=%{src}/documentdetails.ui +Dest=%{dest}/documentdetails.ui + +[FILE4] +Type=install +Source=%{src}/app-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE5] +Type=install +Source=%{src}/app-configure.ac +Dest=%{dest}/configure.ac + +[FILE6] +Type=install +Source=%{src}/app-autogen.sh +Dest=%{dest}/autogen.sh + +[FILE7] +Type=install +Source=%{src}/mkinstalldirs +Dest=%{dest}/mkinstalldirs + +[FILE8] +Type=install +Source=%{src}/missing +Dest=%{dest}/missing + +[FILE9] +Type=install +Source=%{src}/install-sh +Dest=%{dest}/install-sh + +[FILE10] +Type=install +Source=%{src}/pyqt-am-preproc.py +Dest=%{dest}/pyqt-am-preproc.py + +[FILE11] +Type=install +Source=%{src}/fileopen.pyxpm +Dest=%{dest}/fileopen.pyxpm + +[FILE12] +Type=install +Source=%{src}/fileprint.pyxpm +Dest=%{dest}/fileprint.pyxpm + +[FILE13] +Type=install +Source=%{src}/filesave.pyxpm +Dest=%{dest}/filesave.pyxpm + +[MSG] +Type=message +Comment=A Python Qt application was created in %{dest} +Comment[ca]=Una aplicació per a Qt en Python ha estat creada en %{dest} +Comment[da]=Et Python Qt program blev oprettet i %{dest} +Comment[de]=Eine Python/Qt-Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή Python Qt δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación Qt en Python ha sido creada en %{dest} +Comment[et]=Pythoni Qt rakendus loodi asukohta %{dest} +Comment[eu]=Python eta Qt darabiltzan aplikazio bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد پیتون Qt در %{dest} ایجاد شد +Comment[fr]=Une application Qt Python a été créée dans %{dest} +Comment[ga]=Cruthaíodh feidhmchlár Python Qt i %{dest} +Comment[gl]=Creouse unha aplicación Qt en Python en %{dest} +Comment[hu]=Létrejött egy Python/Qt-alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione Qt Python in %{dest} +Comment[ja]=Python Qt アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Python-Qt-Programm opstellt. +Comment[ne]=पाइथोन क्यू टी अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een Python Qt-toepassing is aangemaakt in %{dest} +Comment[pl]=Program używający Pythona i Qt został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação Qt em Python em %{dest} +Comment[pt_BR]=Foi criada uma aplicação Qt em Python em %{dest} +Comment[ru]=Приложение Qt на Python создано в %{dest} +Comment[sk]=Python Qt aplikácia bola vytvorená v %{dest} +Comment[sr]= Python-Qt програм је направљен у %{dest} +Comment[sr@Latn]= Python-Qt program je napravljen u %{dest} +Comment[sv]=Ett Python Qt-program skapades i %{dest} +Comment[tr]=Bir Python Qt uygulaması %{dest} içinde yaratıldı. +Comment[zh_CN]=在 %{dest} 创建了一个 Python Qt 应用程序 +Comment[zh_TW]=一個 Python Qt 應用程式已建立於 %{dest} diff --git a/languages/python/app_templates/pyqt/pyqt.tdevtemplate b/languages/python/app_templates/pyqt/pyqt.tdevtemplate deleted file mode 100644 index cb0deace..00000000 --- a/languages/python/app_templates/pyqt/pyqt.tdevtemplate +++ /dev/null @@ -1,168 +0,0 @@ -# KDE Config File -[General] -Name=Python Qt application -Name[ca]=Aplicació per a Qt en Python -Name[da]=Python Qt program -Name[de]=Python/Qt-Anwendung -Name[el]=Εφαρμογή Python Qt -Name[es]=Aplicación Qt en Python -Name[et]=Pythoni Qt rakendus -Name[eu]=Python Qt aplikazioa -Name[fa]=کاربرد پیتون Qt -Name[fr]=Application Qt Python -Name[ga]=Feidhmchlár Qt Python -Name[gl]=Aplicación Qt en Python -Name[hu]=Python/Qt-alapú alkalmazás -Name[it]=Applicazione Qt Python -Name[ja]=Python Qt アプリケーション -Name[nds]=Python Qt-Programm -Name[ne]=पाइथोन क्यू टी अनुप्रयोग -Name[nl]=Python Qt-toepassing -Name[pl]=Program Qt w Pythonie -Name[pt]=Aplicação Qt em Python -Name[pt_BR]=Aplicação Qt em Python -Name[ru]=Приложение Qt на Python -Name[sk]=Python Qt aplikácia -Name[sr]=Python-Qt програм -Name[sr@Latn]=Python-Qt program -Name[sv]=Python Qt-program -Name[tr]=Python Qt Uygulaması -Name[zh_CN]=Python Qt 应用程序 -Name[zh_TW]=Python Qt 應用程式 -Icon=pyqt.png -Category=Python -Comment=This generates an application framework using Python and Qt -Comment[ca]=Genera una infraestructura d'aplicació usant Python i Qt -Comment[da]=Dette genererer et programskelet ved brug af Python og Qt -Comment[de]=Hiermit wird ein Anwendungsgerüst unter Verwendung von Python und Qt erstellt -Comment[el]=Αυτό δημιουργεί ένα πλαίσιο εφαρμογής χρησιμοποιώντας τις Python και Qt -Comment[es]=Genera una infraestructura de aplicación que usa Python y Qt -Comment[et]=Rakenduse raamistiku loomine Pythoni ja Qt abil -Comment[eu]=Honek Python eta Qt darabiltzan aplikazioen lan-marko bat sortzen du -Comment[fa]=یک چارچوب کاربرد با استفاده از پیتون و Qt تولید می‌کند -Comment[fr]=Génère une infrastructure d'application utilisant Python et Qt -Comment[ga]=Cruthaíonn sé seo creatlach feidhmchláir le Python agus Qt -Comment[gl]=Isto xera un contorno de traballo para unha aplicación usando Python e Qt -Comment[hu]=Létrehoz egy alkalmazás-keretrendszert Python nyelven, a Qt felhasználásával -Comment[it]=Genera l'infrastruttura applicativa usando Python e Qt -Comment[ja]=Python と Qt を使ってアプリケーションフレームワークを作成します -Comment[nds]=Dit stellt mit Python un Qt en Programmrahmenwark op. -Comment[ne]=यसले पाइथोन र क्यू टी प्रयोग गरेर अनुप्रयोग फ्रेमवर्क उत्पन्न गर्दछ -Comment[nl]=Dit genereert een toepassingsframework met behulp van Python en Qt -Comment[pl]=Generuje szablon programu używającego Pythona i Qt -Comment[pt]=Isto cria a plataforma de uma aplicação que usa o Python e o Qt -Comment[pt_BR]=Isto cria a plataforma de uma aplicação que usa o Python e o Qt -Comment[ru]=Создание приложения Qt на Python -Comment[sk]=Vygeneruje aplikačný framework používajúci Python a Qt -Comment[sr]=Прави радни оквир програма користећи Python и Qt -Comment[sr@Latn]=Pravi radni okvir programa koristeći Python i Qt -Comment[sv]=Detta skapar ett programramverk med användning av Python och Qt -Comment[tr]=Bu Python ve Qt kullanan bir uygulama çatısı yaratır. -Comment[zh_CN]=这将生成一个使用 Python 和 Qt 的应用程序框架 -Comment[zh_TW]=產生一個使用 Python 與 Qt 的應用程式框架 -FileTemplates=py,ShellStyle -ShowFilesAfterGeneration=%{dest}/%{APPNAMELC}.py -Archive=pyqt.tar.gz - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[FILE1] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE2] -Type=install -Source=%{src}/app.py -Dest=%{dest}/%{APPNAMELC}.py - -[FILE3] -Type=install -EscapeXML=true -Source=%{src}/documentdetails.ui -Dest=%{dest}/documentdetails.ui - -[FILE4] -Type=install -Source=%{src}/app-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE5] -Type=install -Source=%{src}/app-configure.ac -Dest=%{dest}/configure.ac - -[FILE6] -Type=install -Source=%{src}/app-autogen.sh -Dest=%{dest}/autogen.sh - -[FILE7] -Type=install -Source=%{src}/mkinstalldirs -Dest=%{dest}/mkinstalldirs - -[FILE8] -Type=install -Source=%{src}/missing -Dest=%{dest}/missing - -[FILE9] -Type=install -Source=%{src}/install-sh -Dest=%{dest}/install-sh - -[FILE10] -Type=install -Source=%{src}/pyqt-am-preproc.py -Dest=%{dest}/pyqt-am-preproc.py - -[FILE11] -Type=install -Source=%{src}/fileopen.pyxpm -Dest=%{dest}/fileopen.pyxpm - -[FILE12] -Type=install -Source=%{src}/fileprint.pyxpm -Dest=%{dest}/fileprint.pyxpm - -[FILE13] -Type=install -Source=%{src}/filesave.pyxpm -Dest=%{dest}/filesave.pyxpm - -[MSG] -Type=message -Comment=A Python Qt application was created in %{dest} -Comment[ca]=Una aplicació per a Qt en Python ha estat creada en %{dest} -Comment[da]=Et Python Qt program blev oprettet i %{dest} -Comment[de]=Eine Python/Qt-Anwendung wurde in %{dest} erstellt. -Comment[el]=Μια εφαρμογή Python Qt δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación Qt en Python ha sido creada en %{dest} -Comment[et]=Pythoni Qt rakendus loodi asukohta %{dest} -Comment[eu]=Python eta Qt darabiltzan aplikazio bat sortu da hemen: %{dest} -Comment[fa]=یک کاربرد پیتون Qt در %{dest} ایجاد شد -Comment[fr]=Une application Qt Python a été créée dans %{dest} -Comment[ga]=Cruthaíodh feidhmchlár Python Qt i %{dest} -Comment[gl]=Creouse unha aplicación Qt en Python en %{dest} -Comment[hu]=Létrejött egy Python/Qt-alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione Qt Python in %{dest} -Comment[ja]=Python Qt アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Python-Qt-Programm opstellt. -Comment[ne]=पाइथोन क्यू टी अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een Python Qt-toepassing is aangemaakt in %{dest} -Comment[pl]=Program używający Pythona i Qt został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação Qt em Python em %{dest} -Comment[pt_BR]=Foi criada uma aplicação Qt em Python em %{dest} -Comment[ru]=Приложение Qt на Python создано в %{dest} -Comment[sk]=Python Qt aplikácia bola vytvorená v %{dest} -Comment[sr]= Python-Qt програм је направљен у %{dest} -Comment[sr@Latn]= Python-Qt program je napravljen u %{dest} -Comment[sv]=Ett Python Qt-program skapades i %{dest} -Comment[tr]=Bir Python Qt uygulaması %{dest} içinde yaratıldı. -Comment[zh_CN]=在 %{dest} 创建了一个 Python Qt 应用程序 -Comment[zh_TW]=一個 Python Qt 應用程式已建立於 %{dest} diff --git a/languages/python/app_templates/pythonhello/CMakeLists.txt b/languages/python/app_templates/pythonhello/CMakeLists.txt index d6c3f09c..dfdbbc3b 100644 --- a/languages/python/app_templates/pythonhello/CMakeLists.txt +++ b/languages/python/app_templates/pythonhello/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( pythonhello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/pythonhello.tar.gz pythonhello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - pythonhello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + pythonhello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/python/app_templates/pythonhello/Makefile.am b/languages/python/app_templates/pythonhello/Makefile.am index 7265f7de..2dc4f559 100644 --- a/languages/python/app_templates/pythonhello/Makefile.am +++ b/languages/python/app_templates/pythonhello/Makefile.am @@ -1,10 +1,10 @@ dataFiles = app.py app.tdevelop pythonhello.png templateName = pythonhello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/python/app_templates/pythonhello/app.tdevelop b/languages/python/app_templates/pythonhello/app.tdevelop index a93a999c..9826d145 100644 --- a/languages/python/app_templates/pythonhello/app.tdevelop +++ b/languages/python/app_templates/pythonhello/app.tdevelop @@ -11,15 +11,15 @@ - + %{APPNAMELC}.py - - + + ada ada_bugs_gcc @@ -66,8 +66,8 @@ KDE Libraries (Doxygen) - - + + false *.o,*.lo,CVS @@ -75,10 +75,10 @@ - - + + - + diff --git a/languages/python/app_templates/pythonhello/pythonhello.tdevtemplate b/languages/python/app_templates/pythonhello/pythonhello.kdevtemplate similarity index 100% rename from languages/python/app_templates/pythonhello/pythonhello.tdevtemplate rename to languages/python/app_templates/pythonhello/pythonhello.kdevtemplate diff --git a/languages/python/app_templates/pytk/CMakeLists.txt b/languages/python/app_templates/pytk/CMakeLists.txt index d71c9be1..1a28ddad 100644 --- a/languages/python/app_templates/pytk/CMakeLists.txt +++ b/languages/python/app_templates/pytk/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( pytk.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/pytk.tar.gz pytk.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - pytk.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + pytk.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/python/app_templates/pytk/Makefile.am b/languages/python/app_templates/pytk/Makefile.am index 94fb2122..d1ebe715 100644 --- a/languages/python/app_templates/pytk/Makefile.am +++ b/languages/python/app_templates/pytk/Makefile.am @@ -1,10 +1,10 @@ dataFiles = app.py app.tdevelop pytk.png templateName = pytk ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/python/app_templates/pytk/app.tdevelop b/languages/python/app_templates/pytk/app.tdevelop index 95144f90..1482b842 100644 --- a/languages/python/app_templates/pytk/app.tdevelop +++ b/languages/python/app_templates/pytk/app.tdevelop @@ -11,15 +11,15 @@ - + %{APPNAMELC}.py - - + + ada ada_bugs_gcc @@ -64,8 +64,8 @@ KDE Libraries (Doxygen) - - + + false *.o,*.lo,CVS @@ -73,10 +73,10 @@ - - + + - + diff --git a/languages/python/app_templates/pytk/pytk.tdevtemplate b/languages/python/app_templates/pytk/pytk.kdevtemplate similarity index 100% rename from languages/python/app_templates/pytk/pytk.tdevtemplate rename to languages/python/app_templates/pytk/pytk.kdevtemplate diff --git a/languages/python/doc/CMakeLists.txt b/languages/python/doc/CMakeLists.txt index 49cdea0d..a3caa5fd 100644 --- a/languages/python/doc/CMakeLists.txt +++ b/languages/python/doc/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES python.toc python_bugs.toc - DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation/tocs ) + DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation/tocs ) diff --git a/languages/python/doc/Makefile.am b/languages/python/doc/Makefile.am index 1714c774..5159f5f0 100644 --- a/languages/python/doc/Makefile.am +++ b/languages/python/doc/Makefile.am @@ -1,4 +1,4 @@ -tocdir = ${kde_datadir}/tdevdocumentation/tocs +tocdir = ${kde_datadir}/kdevdocumentation/tocs toc_DATA = python.toc python_bugs.toc #indexdir = ${kde_datadir}/devdoctreeview/indices diff --git a/languages/python/file_templates/CMakeLists.txt b/languages/python/file_templates/CMakeLists.txt index efd7a0bf..ddc20b95 100644 --- a/languages/python/file_templates/CMakeLists.txt +++ b/languages/python/file_templates/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES py - DESTINATION ${DATA_INSTALL_DIR}/tdevfilecreate/file-templates ) + DESTINATION ${DATA_INSTALL_DIR}/kdevfilecreate/file-templates ) diff --git a/languages/python/file_templates/Makefile.am b/languages/python/file_templates/Makefile.am index 9073dd5f..0846fdf2 100644 --- a/languages/python/file_templates/Makefile.am +++ b/languages/python/file_templates/Makefile.am @@ -1,4 +1,4 @@ -templatedir = $(kde_datadir)/tdevfilecreate/file-templates +templatedir = $(kde_datadir)/kdevfilecreate/file-templates template_DATA = py diff --git a/languages/python/tde_pydoc.py b/languages/python/kde_pydoc.py old mode 100644 new mode 100755 similarity index 100% rename from languages/python/tde_pydoc.py rename to languages/python/kde_pydoc.py diff --git a/languages/python/kdevpythonsupport.desktop b/languages/python/kdevpythonsupport.desktop new file mode 100644 index 00000000..61f2ff76 --- /dev/null +++ b/languages/python/kdevpythonsupport.desktop @@ -0,0 +1,85 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Python Support +Comment[ca]=Suport per a Python +Comment[da]=Python-understøttelse +Comment[de]=Unterstützung für Python +Comment[el]=Υποστήριξη Python +Comment[es]=Soporte para Python +Comment[et]=Pythoni toetus +Comment[eu]=Python euskarria +Comment[fa]=پشتیبانی پیتون +Comment[fr]=Prise en charge du langage PYTHON +Comment[ga]=Tacaíocht Python +Comment[gl]=Soporte para Python +Comment[hi]=पायथन समर्थन +Comment[hu]=Python-támogatás +Comment[is]=Python stuðningur +Comment[it]=Supporto per Python +Comment[ja]=Python サポート +Comment[nds]=Ünnerstütten för Python +Comment[ne]=पाइथोन समर्थन +Comment[nl]=Ondersteuning voor Python +Comment[pl]=Obsługa Pythona +Comment[pt]=Suporte a Python +Comment[pt_BR]=Suporte ao Python +Comment[ru]=Поддержка языка Python +Comment[sk]=Python podpora +Comment[sl]=Podpora za Python +Comment[sr]=Подршка за Python +Comment[sr@Latn]=Podrška za Python +Comment[sv]=Python-stöd +Comment[ta]=பைதான் ஆதரவு +Comment[tg]=Ёрӣ намудани забони Python +Comment[tr]=Python Desteği +Comment[zh_CN]=Python 支持 +Comment[zh_TW]=Python 支援 +Name=KDevPythonSupport +Name[da]=TDevelop Python-understøttelse +Name[de]=Unterstützung für Python (TDevelop) +Name[hi]=के-डेव-पायथन-समर्थन +Name[nds]=Python-Ünnerstütten för TDevelop +Name[pl]=KDevObsługaPythona +Name[sk]=KDev Python podpora +Name[sv]=TDevelop Python-stöd +Name[ta]=கெடெவ் பைதான் ஆதரவு +Name[tg]=Ёрӣ намудани забони Python +Name[zh_TW]=TDevelop Python 支援 +GenericName=Python Support +GenericName[ca]=Suport per a Python +GenericName[da]=Python-understøttelse +GenericName[de]=Unterstützung für Python +GenericName[el]=Υποστήριξη Python +GenericName[es]=Soporte para Python +GenericName[et]=Pythoni toetus +GenericName[eu]=Python euskarria +GenericName[fa]=پشتیبانی پیتون +GenericName[fr]=Prise en charge du langage PYTHON +GenericName[ga]=Tacaíocht Python +GenericName[gl]=Soporte para Python +GenericName[hi]=पायथन समर्थन +GenericName[hu]=Python-támogatás +GenericName[it]=Supporto per Python +GenericName[ja]=Python サポート +GenericName[nds]=Ünnerstütten för Python +GenericName[ne]=पाइथोन समर्थन +GenericName[nl]=Ondersteuning voor Python +GenericName[pl]=Obsługa Pythona +GenericName[pt]=Suporte a Python +GenericName[pt_BR]=Suporte ao Python +GenericName[ru]=Поддержка языка Python +GenericName[sk]=Python podpora +GenericName[sl]=Podpora za Python +GenericName[sr]=Подршка за Python +GenericName[sr@Latn]=Podrška za Python +GenericName[sv]=Python-stöd +GenericName[ta]=பைதான் ஆதரவு +GenericName[tg]=Ёрӣ намудани забони Python +GenericName[tr]=Python Desteği +GenericName[zh_CN]=Python 支持 +GenericName[zh_TW]=Python 支援 +ServiceTypes=TDevelop/LanguageSupport +X-TDE-Library=libkdevpythonsupport +X-TDevelop-Version=5 +X-TDevelop-Language=Python diff --git a/languages/python/tdevpythonsupport.rc b/languages/python/kdevpythonsupport.rc similarity index 100% rename from languages/python/tdevpythonsupport.rc rename to languages/python/kdevpythonsupport.rc diff --git a/languages/python/pydoc.cpp b/languages/python/pydoc.cpp index 43ceb071..bcb38b1e 100644 --- a/languages/python/pydoc.cpp +++ b/languages/python/pydoc.cpp @@ -20,7 +20,7 @@ PydocProtocol::PydocProtocol(const TQCString &pool, const TQCString &app) : SlaveBase("pydoc", pool, app), key() { python = TDEGlobal::dirs()->findExe("python"); - script = locate("data", "tdeio_pydoc/tde_pydoc.py"); + script = locate("data", "tdeio_pydoc/kde_pydoc.py"); } diff --git a/languages/python/pythonconfigwidget.cpp b/languages/python/pythonconfigwidget.cpp index e6915eac..29103705 100644 --- a/languages/python/pythonconfigwidget.cpp +++ b/languages/python/pythonconfigwidget.cpp @@ -20,8 +20,8 @@ PythonConfigWidget::PythonConfigWidget(TQDomDocument &projectDom, TQWidget *parent, const char *name) : PythonConfigWidgetBase(parent, name), dom(projectDom) { - interpreter_edit->setText(DomUtil::readEntry(dom, "/tdepythonsupport/run/interpreter")); - terminal_box->setChecked(DomUtil::readBoolEntry(dom, "/tdepythonsupport/run/terminal")); + interpreter_edit->setText(DomUtil::readEntry(dom, "/kdevpythonsupport/run/interpreter")); + terminal_box->setChecked(DomUtil::readBoolEntry(dom, "/kdevpythonsupport/run/terminal")); } @@ -31,8 +31,8 @@ PythonConfigWidget::~PythonConfigWidget() void PythonConfigWidget::accept() { - DomUtil::writeEntry(dom, "/tdepythonsupport/run/interpreter", interpreter_edit->text()); - DomUtil::writeBoolEntry(dom, "/tdepythonsupport/run/terminal", terminal_box->isChecked()); + DomUtil::writeEntry(dom, "/kdevpythonsupport/run/interpreter", interpreter_edit->text()); + DomUtil::writeBoolEntry(dom, "/kdevpythonsupport/run/terminal", terminal_box->isChecked()); } #include "pythonconfigwidget.moc" diff --git a/languages/python/pythonimplementationwidget.cpp b/languages/python/pythonimplementationwidget.cpp index b89488ef..de351b8e 100644 --- a/languages/python/pythonimplementationwidget.cpp +++ b/languages/python/pythonimplementationwidget.cpp @@ -30,10 +30,10 @@ #include #include -#include -#include +#include +#include -PythonImplementationWidget::PythonImplementationWidget(TDevLanguageSupport* part, +PythonImplementationWidget::PythonImplementationWidget(KDevLanguageSupport* part, TQWidget* parent, const char* name, bool modal) : ImplementationWidget(part, parent, name, modal) { diff --git a/languages/python/pythonimplementationwidget.h b/languages/python/pythonimplementationwidget.h index bc4a945b..c8e1cbde 100644 --- a/languages/python/pythonimplementationwidget.h +++ b/languages/python/pythonimplementationwidget.h @@ -27,7 +27,7 @@ class PythonImplementationWidget : public ImplementationWidget Q_OBJECT public: - PythonImplementationWidget(TDevLanguageSupport* part, TQWidget* parent = 0, const char* name = 0, bool modal = true); + PythonImplementationWidget(KDevLanguageSupport* part, TQWidget* parent = 0, const char* name = 0, bool modal = true); ~PythonImplementationWidget(); diff --git a/languages/python/pythonsupportpart.cpp b/languages/python/pythonsupportpart.cpp index 279688a6..1f2c7b87 100644 --- a/languages/python/pythonsupportpart.cpp +++ b/languages/python/pythonsupportpart.cpp @@ -12,10 +12,10 @@ #include "pythonsupportpart.h" #include "pythonconfigwidget.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -29,8 +29,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -38,16 +38,16 @@ #include "qtdesignerpythonintegration.h" #include "pythonimplementationwidget.h" -typedef TDevGenericFactory PythonSupportFactory; -static const TDevPluginInfo data("tdepythonsupport"); -K_EXPORT_COMPONENT_FACTORY( libtdevpythonsupport, PythonSupportFactory( data ) ) +typedef KDevGenericFactory PythonSupportFactory; +static const KDevPluginInfo data("kdevpythonsupport"); +K_EXPORT_COMPONENT_FACTORY( libkdevpythonsupport, PythonSupportFactory( data ) ) PythonSupportPart::PythonSupportPart(TQObject *parent, const char *name, const TQStringList &) - : TDevLanguageSupport(&data, parent, name ? name : "PythonSupportPart") + : KDevLanguageSupport(&data, parent, name ? name : "PythonSupportPart") { setInstance(PythonSupportFactory::instance()); - setXMLFile("tdepythonsupport.rc"); + setXMLFile("kdevpythonsupport.rc"); connect( core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened()) ); connect( core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed()) ); @@ -100,7 +100,7 @@ void PythonSupportPart::contextMenu(TQPopupMenu *popup, const Context *context) { m_contextFileName = url.fileName(); int id = popup->insertItem(i18n("Create or Select Implementation..."), this, TQT_SLOT(slotCreateSubclass())); - popup->setWhatsThis(id, i18n("Create or select implementation

    Creates or selects a subclass of selected form for use with integrated TDevDesigner.")); + popup->setWhatsThis(id, i18n("Create or select implementation

    Creates or selects a subclass of selected form for use with integrated KDevDesigner.")); } } } @@ -217,7 +217,7 @@ void PythonSupportPart::savedFile(const KURL &fileName) } -TDevLanguageSupport::Features PythonSupportPart::features() +KDevLanguageSupport::Features PythonSupportPart::features() { return Features(Classes | Functions); } @@ -316,7 +316,7 @@ void PythonSupportPart::parse(const TQString &fileName) TQString PythonSupportPart::interpreter() { - TQString prog = DomUtil::readEntry(*projectDom(), "/tdepythonsupport/run/interpreter"); + TQString prog = DomUtil::readEntry(*projectDom(), "/kdevpythonsupport/run/interpreter"); if (prog.isEmpty()) prog = "python"; @@ -326,8 +326,8 @@ TQString PythonSupportPart::interpreter() void PythonSupportPart::startApplication(const TQString &program) { - bool inTerminal = DomUtil::readBoolEntry(*projectDom(), "/tdepythonsupport/run/terminal"); - if (TDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) + bool inTerminal = DomUtil::readBoolEntry(*projectDom(), "/kdevpythonsupport/run/terminal"); + if (KDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) appFrontend->startAppCommand(TQString(), program, inTerminal); } @@ -369,9 +369,9 @@ void PythonSupportPart::slotPydoc() } } -TDevDesignerIntegration *PythonSupportPart::designer(KInterfaceDesigner::DesignerType type) +KDevDesignerIntegration *PythonSupportPart::designer(KInterfaceDesigner::DesignerType type) { - TDevDesignerIntegration *des = 0; + KDevDesignerIntegration *des = 0; switch (type) { case KInterfaceDesigner::TQtDesigner: @@ -381,7 +381,7 @@ TDevDesignerIntegration *PythonSupportPart::designer(KInterfaceDesigner::Designe PythonImplementationWidget *impl = new PythonImplementationWidget(this); des = new QtDesignerPythonIntegration(this, impl); des->loadSettings(*project()->projectDom(), - "tdepythonsupport/designerintegration"); + "kdevpythonsupport/designerintegration"); m_designers[type] = des; } break; diff --git a/languages/python/pythonsupportpart.h b/languages/python/pythonsupportpart.h index 873e0934..c60a2eb3 100644 --- a/languages/python/pythonsupportpart.h +++ b/languages/python/pythonsupportpart.h @@ -13,14 +13,14 @@ #define _PYTHONSUPPORTPART_H_ -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" class KDialogBase; class TQStringList; class TQPopupMenu; class Context; -class PythonSupportPart : public TDevLanguageSupport +class PythonSupportPart : public KDevLanguageSupport { Q_OBJECT @@ -29,7 +29,7 @@ public: PythonSupportPart( TQObject *parent, const char *name, const TQStringList & ); ~PythonSupportPart(); - virtual TDevDesignerIntegration *designer(KInterfaceDesigner::DesignerType type); + virtual KDevDesignerIntegration *designer(KInterfaceDesigner::DesignerType type); public slots: void contextMenu(TQPopupMenu *popup, const Context *context); @@ -60,7 +60,7 @@ private: void maybeParse(const TQString fileName); void parse(const TQString &fileName); - TQMap m_designers; + TQMap m_designers; TQString m_contextFileName; }; diff --git a/languages/python/qtdesignerpythonintegration.cpp b/languages/python/qtdesignerpythonintegration.cpp index ca8bed51..c1627f18 100644 --- a/languages/python/qtdesignerpythonintegration.cpp +++ b/languages/python/qtdesignerpythonintegration.cpp @@ -31,14 +31,14 @@ #include #include -#include -#include -#include +#include +#include +#include #include "codemodel_utils.h" #include "implementationwidget.h" -QtDesignerPythonIntegration::QtDesignerPythonIntegration(TDevLanguageSupport* part, ImplementationWidget* impl) +QtDesignerPythonIntegration::QtDesignerPythonIntegration(KDevLanguageSupport* part, ImplementationWidget* impl) :QtDesignerIntegration(part, impl, false, 0) { } diff --git a/languages/python/qtdesignerpythonintegration.h b/languages/python/qtdesignerpythonintegration.h index 120e6b47..8b171f17 100644 --- a/languages/python/qtdesignerpythonintegration.h +++ b/languages/python/qtdesignerpythonintegration.h @@ -27,7 +27,7 @@ class QtDesignerPythonIntegration : public QtDesignerIntegration Q_OBJECT public: - QtDesignerPythonIntegration(TDevLanguageSupport* part, ImplementationWidget* impl); + QtDesignerPythonIntegration(KDevLanguageSupport* part, ImplementationWidget* impl); ~QtDesignerPythonIntegration(); diff --git a/languages/python/tdevpythonsupport.desktop b/languages/python/tdevpythonsupport.desktop deleted file mode 100644 index 973604ff..00000000 --- a/languages/python/tdevpythonsupport.desktop +++ /dev/null @@ -1,85 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Python Support -Comment[ca]=Suport per a Python -Comment[da]=Python-understøttelse -Comment[de]=Unterstützung für Python -Comment[el]=Υποστήριξη Python -Comment[es]=Soporte para Python -Comment[et]=Pythoni toetus -Comment[eu]=Python euskarria -Comment[fa]=پشتیبانی پیتون -Comment[fr]=Prise en charge du langage PYTHON -Comment[ga]=Tacaíocht Python -Comment[gl]=Soporte para Python -Comment[hi]=पायथन समर्थन -Comment[hu]=Python-támogatás -Comment[is]=Python stuðningur -Comment[it]=Supporto per Python -Comment[ja]=Python サポート -Comment[nds]=Ünnerstütten för Python -Comment[ne]=पाइथोन समर्थन -Comment[nl]=Ondersteuning voor Python -Comment[pl]=Obsługa Pythona -Comment[pt]=Suporte a Python -Comment[pt_BR]=Suporte ao Python -Comment[ru]=Поддержка языка Python -Comment[sk]=Python podpora -Comment[sl]=Podpora za Python -Comment[sr]=Подршка за Python -Comment[sr@Latn]=Podrška za Python -Comment[sv]=Python-stöd -Comment[ta]=பைதான் ஆதரவு -Comment[tg]=Ёрӣ намудани забони Python -Comment[tr]=Python Desteği -Comment[zh_CN]=Python 支持 -Comment[zh_TW]=Python 支援 -Name=KDevPythonSupport -Name[da]=TDevelop Python-understøttelse -Name[de]=Unterstützung für Python (TDevelop) -Name[hi]=के-डेव-पायथन-समर्थन -Name[nds]=Python-Ünnerstütten för TDevelop -Name[pl]=KDevObsługaPythona -Name[sk]=KDev Python podpora -Name[sv]=TDevelop Python-stöd -Name[ta]=கெடெவ் பைதான் ஆதரவு -Name[tg]=Ёрӣ намудани забони Python -Name[zh_TW]=TDevelop Python 支援 -GenericName=Python Support -GenericName[ca]=Suport per a Python -GenericName[da]=Python-understøttelse -GenericName[de]=Unterstützung für Python -GenericName[el]=Υποστήριξη Python -GenericName[es]=Soporte para Python -GenericName[et]=Pythoni toetus -GenericName[eu]=Python euskarria -GenericName[fa]=پشتیبانی پیتون -GenericName[fr]=Prise en charge du langage PYTHON -GenericName[ga]=Tacaíocht Python -GenericName[gl]=Soporte para Python -GenericName[hi]=पायथन समर्थन -GenericName[hu]=Python-támogatás -GenericName[it]=Supporto per Python -GenericName[ja]=Python サポート -GenericName[nds]=Ünnerstütten för Python -GenericName[ne]=पाइथोन समर्थन -GenericName[nl]=Ondersteuning voor Python -GenericName[pl]=Obsługa Pythona -GenericName[pt]=Suporte a Python -GenericName[pt_BR]=Suporte ao Python -GenericName[ru]=Поддержка языка Python -GenericName[sk]=Python podpora -GenericName[sl]=Podpora za Python -GenericName[sr]=Подршка за Python -GenericName[sr@Latn]=Podrška za Python -GenericName[sv]=Python-stöd -GenericName[ta]=பைதான் ஆதரவு -GenericName[tg]=Ёрӣ намудани забони Python -GenericName[tr]=Python Desteği -GenericName[zh_CN]=Python 支持 -GenericName[zh_TW]=Python 支援 -ServiceTypes=TDevelop/LanguageSupport -X-TDE-Library=libtdevpythonsupport -X-TDevelop-Version=5 -X-TDevelop-Language=Python diff --git a/languages/ruby/CMakeLists.txt b/languages/ruby/CMakeLists.txt index 8418c5c9..2f1a231e 100644 --- a/languages/ruby/CMakeLists.txt +++ b/languages/ruby/CMakeLists.txt @@ -33,15 +33,15 @@ link_directories( ##### other data ################################ -install( FILES tdevrubysupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES rubytemplates DESTINATION ${DATA_INSTALL_DIR}/tdevabbrev/templates ) -install( FILES tdevrubysupport.rc DESTINATION ${DATA_INSTALL_DIR}/tdevrubysupport ) -install( FILES ruby_config.png ruby_run.png DESTINATION ${DATA_INSTALL_DIR}/tdevrubysupport/pics ) +install( FILES kdevrubysupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES rubytemplates DESTINATION ${DATA_INSTALL_DIR}/kdevabbrev/templates ) +install( FILES kdevrubysupport.rc DESTINATION ${DATA_INSTALL_DIR}/kdevrubysupport ) +install( FILES ruby_config.png ruby_run.png DESTINATION ${DATA_INSTALL_DIR}/kdevrubysupport/pics ) -##### libtdevrubysupport (module) ############### +##### libkdevrubysupport (module) ############### -tde_add_kpart( libtdevrubysupport AUTOMOC +tde_add_kpart( libkdevrubysupport AUTOMOC SOURCES rubysupport_part.cpp rubyconfigwidgetbase.ui rubyconfigwidget.cpp qtdesignerrubyintegration.cpp diff --git a/languages/ruby/Makefile.am b/languages/ruby/Makefile.am index 95a632cc..e0a3612b 100644 --- a/languages/ruby/Makefile.am +++ b/languages/ruby/Makefile.am @@ -7,25 +7,25 @@ INCLUDES = -I$(top_srcdir)/languages/lib/designer_integration \ SUBDIRS = app_templates file_templates doc debugger -kde_module_LTLIBRARIES = libtdevrubysupport.la -libtdevrubysupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevrubysupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/languages/lib/designer_integration/libdesignerintegration.la $(top_builddir)/lib/util/libtdevutil.la +kde_module_LTLIBRARIES = libkdevrubysupport.la +libkdevrubysupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevrubysupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/languages/lib/designer_integration/libdesignerintegration.la $(top_builddir)/lib/util/libkdevutil.la -libtdevrubysupport_la_SOURCES = rubysupport_part.cpp rubyconfigwidgetbase.ui \ +libkdevrubysupport_la_SOURCES = rubysupport_part.cpp rubyconfigwidgetbase.ui \ rubyconfigwidget.cpp qtdesignerrubyintegration.cpp rubyimplementationwidget.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevrubysupport.desktop +service_DATA = kdevrubysupport.desktop -templatedir = ${kde_datadir}/tdevabbrev/templates +templatedir = ${kde_datadir}/kdevabbrev/templates template_DATA = rubytemplates -rcdir = $(kde_datadir)/tdevrubysupport -rc_DATA = tdevrubysupport.rc +rcdir = $(kde_datadir)/kdevrubysupport +rc_DATA = kdevrubysupport.rc -picsdirdir = $(kde_datadir)/tdevrubysupport/pics +picsdirdir = $(kde_datadir)/kdevrubysupport/pics picsdir_DATA = ruby_config.png ruby_run.png noinst_HEADERS = qtdesignerrubyintegration.h rubyimplementationwidget.h diff --git a/languages/ruby/app_templates/CMakeLists.txt b/languages/ruby/app_templates/CMakeLists.txt index 9e642f8e..1f8c054a 100644 --- a/languages/ruby/app_templates/CMakeLists.txt +++ b/languages/ruby/app_templates/CMakeLists.txt @@ -13,7 +13,7 @@ add_subdirectory( rubyhello ) add_subdirectory( qtruby ) add_subdirectory( qtrubyapp ) add_subdirectory( dcopservice ) -add_subdirectory( tdeapp ) +add_subdirectory( kapp ) add_subdirectory( kxt ) add_subdirectory( rails ) add_subdirectory( qtruby4app ) diff --git a/languages/ruby/app_templates/Makefile.am b/languages/ruby/app_templates/Makefile.am index 9e02a942..3150485b 100644 --- a/languages/ruby/app_templates/Makefile.am +++ b/languages/ruby/app_templates/Makefile.am @@ -1,3 +1,3 @@ -SUBDIRS = rubyhello qtruby qtrubyapp dcopservice tdeapp kxt rails qtruby4app +SUBDIRS = rubyhello qtruby qtrubyapp dcopservice kapp kxt rails qtruby4app profilesdir = $(kde_datadir)/tdevelop/profiles/IDE/ScriptingLanguageIDE/RubyIDE profiles_DATA = ruby.appwizard diff --git a/languages/ruby/app_templates/dcopservice/CMakeLists.txt b/languages/ruby/app_templates/dcopservice/CMakeLists.txt index c971b3cd..f673e72c 100644 --- a/languages/ruby/app_templates/dcopservice/CMakeLists.txt +++ b/languages/ruby/app_templates/dcopservice/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( dcopserviceruby.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/dcopserviceruby.tar.gz dcopserviceruby.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - dcopserviceruby.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + dcopserviceruby.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/ruby/app_templates/dcopservice/Makefile.am b/languages/ruby/app_templates/dcopservice/Makefile.am index 3d7668ef..a7193d6a 100644 --- a/languages/ruby/app_templates/dcopservice/Makefile.am +++ b/languages/ruby/app_templates/dcopservice/Makefile.am @@ -4,10 +4,10 @@ dataFiles = dcopservice.desktop app.cpp app-configure.in.in \ templateName = dcopserviceruby ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/ruby/app_templates/dcopservice/dcopservice.tdevelop b/languages/ruby/app_templates/dcopservice/dcopservice.tdevelop index a1b10215..437aa315 100644 --- a/languages/ruby/app_templates/dcopservice/dcopservice.tdevelop +++ b/languages/ruby/app_templates/dcopservice/dcopservice.tdevelop @@ -13,22 +13,22 @@ KDE - + src/%{APPNAMELC} - - + + - - + + ada ada_bugs_gcc @@ -63,29 +63,29 @@ qmake User Guide - - + + libtool - - + + - - + + ruby false 3 src/main.rb - - + + Doxygen Documentation Collection %{APPNAMELC}.tag - + diff --git a/languages/ruby/app_templates/dcopservice/dcopserviceruby.kdevtemplate b/languages/ruby/app_templates/dcopservice/dcopserviceruby.kdevtemplate new file mode 100644 index 00000000..fbadd4e3 --- /dev/null +++ b/languages/ruby/app_templates/dcopservice/dcopserviceruby.kdevtemplate @@ -0,0 +1,199 @@ +# KDE Config File +[General] +Name=DCOP Service +Name[br]=Servij DCOP +Name[ca]=Servei DCOP +Name[de]=DCOP-Dienst +Name[el]=Υπηρεσία DCOP +Name[es]=Servicio DCOP +Name[et]=DCOP-teenus +Name[eu]=DCOP zerbitzua +Name[fa]=خدمت DCOP +Name[fr]=Service DCOP +Name[ga]=Seirbhís DCOP +Name[gl]=Servizo DCOP +Name[hu]=DCOP-szolgáltatás +Name[it]=Servizio DCOP +Name[ja]=DCOP サービス +Name[nds]=DCOP-Deenst +Name[ne]=DCOP सेवा +Name[nl]=DCOP-service +Name[pl]=Usługa DCOP +Name[pt]=Serviço de DCOP +Name[pt_BR]=Serviço DCOP +Name[ru]=Сервис DCOP +Name[sk]=DCOP služba +Name[sr]=DCOP сервис +Name[sr@Latn]=DCOP servis +Name[sv]=DCOP-tjänst +Name[tr]=DCOP Hizmeti +Name[zh_CN]=DCOP 服务 +Name[zh_TW]=DCOP 服務 +Icon=kdcop.png +Category=Ruby/KDE +Comment=Generates a framework for a KDE DCOP service and client access library. +Comment[ca]=Genera una infraestructura per a un servei DCOP de KDE i la biblioteca d'accés del client. +Comment[da]=Genererer et skelet for en KDE dcop-tjeneste og klientadgangsbibliotek. +Comment[de]=Erstellt das Grundgerüst für einen KDE-DCOP-Dienst und eine Bibliothek für den Client-Zugriff. +Comment[el]=Δημιουργεί ένα πλαίσιο για μια υπηρεσία KDE DCOP και μια βιβλιοθήκη πρόσβασης πελάτη. +Comment[es]=Genera una infraestructura para un servicio DCOP de KDE y una biblioteca de acceso cliente. +Comment[et]=KDE DCOP-teenuse raamistiku ja kliendi ligipääsu teegi loomine. +Comment[eu]=KDE-ren DCOP zerbitzu baterako lan-marko bat eta bezero liburutegi bat sortzen ditu. +Comment[fa]=چارچوبی برای خدمت KDE DCOP و کتابخانۀ دستیابی کارخواه تولید می‌کند. +Comment[fr]=Génère une infrastructure pour un service DCOP KDE et une bibliothèque d'accès client. +Comment[ga]=Cruthaigh creatlach do sheirbhís DCOP KDE agus leabharlann rochtana cliaint. +Comment[gl]=Xera un contorno de traballo para un servizo DCOP de KDE e unha biblioteca de acceso para clientes. +Comment[hu]=Létrehoz egy alap KDE DCOP-szolgáltatást és klienselérési programkönyvtárat. +Comment[it]=Genera l'infrastruttura per un servizio DCOP di KDE e una libreria per l'accesso da client. +Comment[ja]=KDE DCOP サービスとクライアントアクセスライブラリのためのフレームワークを作成します +Comment[nds]=Stellt en Rahmenwark för en KDE-DCOP-Deenst un en Clienttogriep-Bibliotheek op. +Comment[ne]=KDE DCOP सेवा र ग्राहक पहुँच लाइब्रेरीका लागि फ्रेमवर्क उत्पन्न गर्दछ । +Comment[nl]=Genereert een framework voor een KDE DCOP-service- en client-bibliotheek. +Comment[pl]=Generuje schemat dla usługi KDE DCOP i biblioteki dostępu użytkownika. +Comment[pt]=Gera a plataforma para um serviço de DCOP do KDE e a biblioteca de acesso dos clientes. +Comment[pt_BR]=Gera a plataforma para um serviço de DCOP do KDE e a biblioteca de acesso dos clientes. +Comment[ru]=Создание сервиса DCOP и библиотеки клиента. +Comment[sk]=Vygeneruje framework pre KDE DCOP službu a klientskú prístupovú knižnicu. +Comment[sr]=Прави једноставан радни оквир за KDE DCOP сервис и приступну библиотеку клијента. +Comment[sr@Latn]=Pravi jednostavan radni okvir za KDE DCOP servis i pristupnu biblioteku klijenta. +Comment[sv]=Skapar ett ramverk för en KDE DCOP-tjänst och klientåtkomstbibliotek. +Comment[tr]=Bir KDE DCOP hizmeti ve istemci erişim kütüphanesi için bir çatı yaratır. +Comment[zh_CN]=生成一个 KDE DCOP 服务和客户访问库的框架。 +Comment[zh_TW]=產生一個 KDE DCOP 服務的架構,以及客戶端存取的函式庫。 +FileTemplates=rb,ShellStyle +ShowFilesAfterGeneration=%{dest}/src/main.rb +Archive=dcopserviceruby.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/dcopservice.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE7] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE9] +Type=install +Source=%{src}/app-configure.in.in +Dest=%{dest}/configure.in.in + +[FILE10] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE11] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE12] +Type=install +Source=%{src}/dcopservice.rb +Dest=%{dest}/src/%{APPNAMELC}.rb + +[FILE13] +Type=install +Source=%{src}/dcopservice.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE14] +Type=install +Source=%{src}/main.rb +Dest=%{dest}/src/main.rb + +[FILE15] +Type=install +Source=%{src}/app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[MSG] +Type=message +Comment=A KDE DCOP Service was created in %{dest} +Comment[ca]=Un servei DCOP de KDE ha estat creada en %{dest} +Comment[da]=En KDE DCOP tjeneste blev oprettet i %{dest} +Comment[de]=Ein KDE-DCOP-Dienst wurde in %{dest} erstellt. +Comment[el]=Μια υπηρεσία KDE DCOP δημιουργήθηκε στο %{dest} +Comment[es]=Un servicio DCOP de KDE ha sido creado en %{dest} +Comment[et]=KDE DCOP-teenus loodi asukohta %{dest} +Comment[eu]=KDE-ren DCOP zerbitzu bat sortu da hemen: %{dest} +Comment[fa]=یک خدمت KDE DCOP در %{dest} ایجاد شد +Comment[fr]=Un service DCOP KDE a été créé dans %{dest} +Comment[ga]=Cruthaíodh Seirbhís DCOP KDE i %{dest} +Comment[gl]=Creouse un servizo DCOP de KDE en %{dest} +Comment[hu]=Létrejött egy KDE DCOP-szolgáltatás itt: %{dest} +Comment[it]=È stato creato un servizio DCOP di KDE in %{dest} +Comment[ja]=KDE DCOP サービスを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en KDE-DCOP-Deenst opstellt +Comment[ne]=KDE DCOP सेवा %{dest} मा सिर्जना गरियो +Comment[nl]=Een DCOP-service is aangemaakt in %{dest} +Comment[pl]=Usługa KDE DCOP została utworzona w %{dest} +Comment[pt]=Foi criado um serviço de DCOP do KDE em %{dest} +Comment[pt_BR]=Foi criado um serviço de DCOP do KDE em %{dest} +Comment[ru]=Сервис DCOP создан в %{dest} +Comment[sk]=KDE DCOP služba bola vytvorená v %{dest} +Comment[sl]=Storitev DCOP za KDE je bila ustvarjena v %{dest} +Comment[sr]=KDE DCOP сервис направљен је у %{dest} +Comment[sr@Latn]=KDE DCOP servis napravljen je u %{dest} +Comment[sv]=En KDE DCOP-tjänst skapades i %{dest} +Comment[tr]=Bir KDE DCOP Hizmeti %{dest} içinde yaratılmıştır. +Comment[zh_CN]=在 %{dest} 中创建了一个 KDE DCOP 服务 +Comment[zh_TW]=KDE DCOP 服務已建立於 %{dest} diff --git a/languages/ruby/app_templates/dcopservice/dcopserviceruby.tdevtemplate b/languages/ruby/app_templates/dcopservice/dcopserviceruby.tdevtemplate deleted file mode 100644 index 0bcb93cb..00000000 --- a/languages/ruby/app_templates/dcopservice/dcopserviceruby.tdevtemplate +++ /dev/null @@ -1,199 +0,0 @@ -# KDE Config File -[General] -Name=DCOP Service -Name[br]=Servij DCOP -Name[ca]=Servei DCOP -Name[de]=DCOP-Dienst -Name[el]=Υπηρεσία DCOP -Name[es]=Servicio DCOP -Name[et]=DCOP-teenus -Name[eu]=DCOP zerbitzua -Name[fa]=خدمت DCOP -Name[fr]=Service DCOP -Name[ga]=Seirbhís DCOP -Name[gl]=Servizo DCOP -Name[hu]=DCOP-szolgáltatás -Name[it]=Servizio DCOP -Name[ja]=DCOP サービス -Name[nds]=DCOP-Deenst -Name[ne]=DCOP सेवा -Name[nl]=DCOP-service -Name[pl]=Usługa DCOP -Name[pt]=Serviço de DCOP -Name[pt_BR]=Serviço DCOP -Name[ru]=Сервис DCOP -Name[sk]=DCOP služba -Name[sr]=DCOP сервис -Name[sr@Latn]=DCOP servis -Name[sv]=DCOP-tjänst -Name[tr]=DCOP Hizmeti -Name[zh_CN]=DCOP 服务 -Name[zh_TW]=DCOP 服務 -Icon=kdcop.png -Category=Ruby/KDE -Comment=Generates a framework for a KDE DCOP service and client access library. -Comment[ca]=Genera una infraestructura per a un servei DCOP de KDE i la biblioteca d'accés del client. -Comment[da]=Genererer et skelet for en KDE dcop-tjeneste og klientadgangsbibliotek. -Comment[de]=Erstellt das Grundgerüst für einen KDE-DCOP-Dienst und eine Bibliothek für den Client-Zugriff. -Comment[el]=Δημιουργεί ένα πλαίσιο για μια υπηρεσία KDE DCOP και μια βιβλιοθήκη πρόσβασης πελάτη. -Comment[es]=Genera una infraestructura para un servicio DCOP de KDE y una biblioteca de acceso cliente. -Comment[et]=KDE DCOP-teenuse raamistiku ja kliendi ligipääsu teegi loomine. -Comment[eu]=KDE-ren DCOP zerbitzu baterako lan-marko bat eta bezero liburutegi bat sortzen ditu. -Comment[fa]=چارچوبی برای خدمت KDE DCOP و کتابخانۀ دستیابی کارخواه تولید می‌کند. -Comment[fr]=Génère une infrastructure pour un service DCOP KDE et une bibliothèque d'accès client. -Comment[ga]=Cruthaigh creatlach do sheirbhís DCOP KDE agus leabharlann rochtana cliaint. -Comment[gl]=Xera un contorno de traballo para un servizo DCOP de KDE e unha biblioteca de acceso para clientes. -Comment[hu]=Létrehoz egy alap KDE DCOP-szolgáltatást és klienselérési programkönyvtárat. -Comment[it]=Genera l'infrastruttura per un servizio DCOP di KDE e una libreria per l'accesso da client. -Comment[ja]=KDE DCOP サービスとクライアントアクセスライブラリのためのフレームワークを作成します -Comment[nds]=Stellt en Rahmenwark för en KDE-DCOP-Deenst un en Clienttogriep-Bibliotheek op. -Comment[ne]=KDE DCOP सेवा र ग्राहक पहुँच लाइब्रेरीका लागि फ्रेमवर्क उत्पन्न गर्दछ । -Comment[nl]=Genereert een framework voor een KDE DCOP-service- en client-bibliotheek. -Comment[pl]=Generuje schemat dla usługi KDE DCOP i biblioteki dostępu użytkownika. -Comment[pt]=Gera a plataforma para um serviço de DCOP do KDE e a biblioteca de acesso dos clientes. -Comment[pt_BR]=Gera a plataforma para um serviço de DCOP do KDE e a biblioteca de acesso dos clientes. -Comment[ru]=Создание сервиса DCOP и библиотеки клиента. -Comment[sk]=Vygeneruje framework pre KDE DCOP službu a klientskú prístupovú knižnicu. -Comment[sr]=Прави једноставан радни оквир за KDE DCOP сервис и приступну библиотеку клијента. -Comment[sr@Latn]=Pravi jednostavan radni okvir za KDE DCOP servis i pristupnu biblioteku klijenta. -Comment[sv]=Skapar ett ramverk för en KDE DCOP-tjänst och klientåtkomstbibliotek. -Comment[tr]=Bir KDE DCOP hizmeti ve istemci erişim kütüphanesi için bir çatı yaratır. -Comment[zh_CN]=生成一个 KDE DCOP 服务和客户访问库的框架。 -Comment[zh_TW]=產生一個 KDE DCOP 服務的架構,以及客戶端存取的函式庫。 -FileTemplates=rb,ShellStyle -ShowFilesAfterGeneration=%{dest}/src/main.rb -Archive=dcopserviceruby.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/dcopservice.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE7] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE9] -Type=install -Source=%{src}/app-configure.in.in -Dest=%{dest}/configure.in.in - -[FILE10] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE11] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE12] -Type=install -Source=%{src}/dcopservice.rb -Dest=%{dest}/src/%{APPNAMELC}.rb - -[FILE13] -Type=install -Source=%{src}/dcopservice.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE14] -Type=install -Source=%{src}/main.rb -Dest=%{dest}/src/main.rb - -[FILE15] -Type=install -Source=%{src}/app.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[MSG] -Type=message -Comment=A KDE DCOP Service was created in %{dest} -Comment[ca]=Un servei DCOP de KDE ha estat creada en %{dest} -Comment[da]=En KDE DCOP tjeneste blev oprettet i %{dest} -Comment[de]=Ein KDE-DCOP-Dienst wurde in %{dest} erstellt. -Comment[el]=Μια υπηρεσία KDE DCOP δημιουργήθηκε στο %{dest} -Comment[es]=Un servicio DCOP de KDE ha sido creado en %{dest} -Comment[et]=KDE DCOP-teenus loodi asukohta %{dest} -Comment[eu]=KDE-ren DCOP zerbitzu bat sortu da hemen: %{dest} -Comment[fa]=یک خدمت KDE DCOP در %{dest} ایجاد شد -Comment[fr]=Un service DCOP KDE a été créé dans %{dest} -Comment[ga]=Cruthaíodh Seirbhís DCOP KDE i %{dest} -Comment[gl]=Creouse un servizo DCOP de KDE en %{dest} -Comment[hu]=Létrejött egy KDE DCOP-szolgáltatás itt: %{dest} -Comment[it]=È stato creato un servizio DCOP di KDE in %{dest} -Comment[ja]=KDE DCOP サービスを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en KDE-DCOP-Deenst opstellt -Comment[ne]=KDE DCOP सेवा %{dest} मा सिर्जना गरियो -Comment[nl]=Een DCOP-service is aangemaakt in %{dest} -Comment[pl]=Usługa KDE DCOP została utworzona w %{dest} -Comment[pt]=Foi criado um serviço de DCOP do KDE em %{dest} -Comment[pt_BR]=Foi criado um serviço de DCOP do KDE em %{dest} -Comment[ru]=Сервис DCOP создан в %{dest} -Comment[sk]=KDE DCOP služba bola vytvorená v %{dest} -Comment[sl]=Storitev DCOP za KDE je bila ustvarjena v %{dest} -Comment[sr]=KDE DCOP сервис направљен је у %{dest} -Comment[sr@Latn]=KDE DCOP servis napravljen je u %{dest} -Comment[sv]=En KDE DCOP-tjänst skapades i %{dest} -Comment[tr]=Bir KDE DCOP Hizmeti %{dest} içinde yaratılmıştır. -Comment[zh_CN]=在 %{dest} 中创建了一个 KDE DCOP 服务 -Comment[zh_TW]=KDE DCOP 服務已建立於 %{dest} diff --git a/languages/ruby/app_templates/kapp/CMakeLists.txt b/languages/ruby/app_templates/kapp/CMakeLists.txt new file mode 100644 index 00000000..6817278b --- /dev/null +++ b/languages/ruby/app_templates/kapp/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( kappruby.tar.gz ALL + COMMAND tar zcf kappruby.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} + app_client.rb appiface.rb app.rb appview.rb main.rb pref.rb + app.cpp appui.rc app.desktop app.tdevelop app-Makefile.am + app-configure.in.in src-Makefile.am subdirs README +) + + +install( FILES + ${CMAKE_CURRENT_BINARY_DIR}/kappruby.tar.gz kappruby.png + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) + + +install( FILES + kappruby.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/ruby/app_templates/kapp/Makefile.am b/languages/ruby/app_templates/kapp/Makefile.am new file mode 100644 index 00000000..9dbc37b5 --- /dev/null +++ b/languages/ruby/app_templates/kapp/Makefile.am @@ -0,0 +1,19 @@ +dataFiles = app_client.rb appiface.rb app.rb appview.rb main.rb pref.rb app.cpp \ + appui.rc app.desktop app.tdevelop app-Makefile.am app-configure.in.in \ + src-Makefile.am subdirs README + +templateName = kappruby + +### 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 diff --git a/languages/ruby/app_templates/tdeapp/README b/languages/ruby/app_templates/kapp/README similarity index 100% rename from languages/ruby/app_templates/tdeapp/README rename to languages/ruby/app_templates/kapp/README diff --git a/languages/ruby/app_templates/tdeapp/app-Makefile.am b/languages/ruby/app_templates/kapp/app-Makefile.am similarity index 100% rename from languages/ruby/app_templates/tdeapp/app-Makefile.am rename to languages/ruby/app_templates/kapp/app-Makefile.am diff --git a/languages/ruby/app_templates/tdeapp/app-configure.in.in b/languages/ruby/app_templates/kapp/app-configure.in.in similarity index 100% rename from languages/ruby/app_templates/tdeapp/app-configure.in.in rename to languages/ruby/app_templates/kapp/app-configure.in.in diff --git a/languages/ruby/app_templates/tdeapp/app.cpp b/languages/ruby/app_templates/kapp/app.cpp similarity index 100% rename from languages/ruby/app_templates/tdeapp/app.cpp rename to languages/ruby/app_templates/kapp/app.cpp diff --git a/languages/ruby/app_templates/tdeapp/app.desktop b/languages/ruby/app_templates/kapp/app.desktop similarity index 100% rename from languages/ruby/app_templates/tdeapp/app.desktop rename to languages/ruby/app_templates/kapp/app.desktop diff --git a/languages/ruby/app_templates/tdeapp/app.rb b/languages/ruby/app_templates/kapp/app.rb similarity index 100% rename from languages/ruby/app_templates/tdeapp/app.rb rename to languages/ruby/app_templates/kapp/app.rb diff --git a/languages/ruby/app_templates/kapp/app.tdevelop b/languages/ruby/app_templates/kapp/app.tdevelop new file mode 100644 index 00000000..5c57b8fb --- /dev/null +++ b/languages/ruby/app_templates/kapp/app.tdevelop @@ -0,0 +1,90 @@ + + + + %{AUTHOR} + %{EMAIL} + %{VERSION} + KDevAutoProject + Ruby + + Ruby + Qt + KDE + + + KDevDoxygen + KDevdistpart + KDevVisualBoyAdvance + KDevDebugger + + + + + + + + src/%{APPNAMELC} + + + + + false + CVS,.svn + + + + + + + + + ada + ada_bugs_gcc + bash + bash_bugs + c++_bugs_gcc + clanlib + w3c-dom-level2-html + fortran_bugs_gcc + gnome1 + gnustep + gtk + gtk_bugs + haskell + haskell_bugs_ghc + java_bugs_gcc + java_bugs_sun + kde2book + libc + libstdc++ + opengl + pascal_bugs_fp + php + php_bugs + perl + perl_bugs + python + python_bugs + sdl + stl + w3c-svg + sw + w3c-uaag10 + wxwindows_bugs + + + + + + + + + + + ruby + false + 3 + src/main.rb + + + diff --git a/languages/ruby/app_templates/tdeapp/app_client.rb b/languages/ruby/app_templates/kapp/app_client.rb similarity index 100% rename from languages/ruby/app_templates/tdeapp/app_client.rb rename to languages/ruby/app_templates/kapp/app_client.rb diff --git a/languages/ruby/app_templates/tdeapp/appiface.rb b/languages/ruby/app_templates/kapp/appiface.rb similarity index 100% rename from languages/ruby/app_templates/tdeapp/appiface.rb rename to languages/ruby/app_templates/kapp/appiface.rb diff --git a/languages/ruby/app_templates/tdeapp/appui.rc b/languages/ruby/app_templates/kapp/appui.rc similarity index 100% rename from languages/ruby/app_templates/tdeapp/appui.rc rename to languages/ruby/app_templates/kapp/appui.rc diff --git a/languages/ruby/app_templates/tdeapp/appview.rb b/languages/ruby/app_templates/kapp/appview.rb similarity index 100% rename from languages/ruby/app_templates/tdeapp/appview.rb rename to languages/ruby/app_templates/kapp/appview.rb diff --git a/languages/ruby/app_templates/kapp/kappruby.kdevtemplate b/languages/ruby/app_templates/kapp/kappruby.kdevtemplate new file mode 100644 index 00000000..368e0705 --- /dev/null +++ b/languages/ruby/app_templates/kapp/kappruby.kdevtemplate @@ -0,0 +1,238 @@ +# KDE Config File +[General] +Name=Application framework +Name[ca]=Infraestructura d'aplicacions +Name[da]=Programskelet +Name[de]=Anwendungsgrundgerüst +Name[el]=Πλαίσιο εφαρμογής +Name[es]=Infraestructura de aplicación +Name[et]=Rakenduse raamistik +Name[eu]=Aplikazioen lan-markoa +Name[fa]=چارچوب کاربرد +Name[fr]=Infrastructure d'application +Name[ga]=Creatlach feidhmchláir +Name[gl]=Entorno de traballo para aplicación +Name[hu]=Alkalmazás-keretrendszer +Name[it]=Infrastruttura applicativa +Name[ja]=アプリケーションフレームワーク +Name[nds]=Programmrahmenwark +Name[ne]=अनुप्रयोग फ्रेमवर्क +Name[nl]=Applicationframework +Name[pl]=Szablon programu +Name[pt]=Plataforma de aplicações +Name[pt_BR]=Plataforma de aplicações +Name[ru]=Приложение KDE +Name[sk]=Aplikačný framework +Name[sl]=Ogrodje programa +Name[sr]=Радни оквир програма +Name[sr@Latn]=Radni okvir programa +Name[sv]=Programramverk +Name[tr]=Uygulama Çatısı +Name[zh_CN]=应用程序框架 +Name[zh_TW]=應用程式框架 +Icon=kapp.png +Category=Ruby/KDE +Comment=Generates a simple Korundum application with one toplevel window, menus and toolbars. A DCOP interface is also provided, so that your application can provide a scripting interface +Comment[ca]=Genera una simple aplicació Korundum amb una finestra principal, menús i barres d'eines. També es proveeix la interfície DCOP, de manera que la vostra aplicació podrà proveir d'una interfície per a scripts +Comment[da]=Generere et simpelt Korundum program med et vindue på topniveau, menuer og værktøjslinjer. Der sørges også for en DCOP-grænseflade, så dit program kan give en script-grænseflade +Comment[de]=Erstellt eine einfache Korundum-Anwendung mit einem Toplevel-Fenster, Menüs und Werkzeugleisten. Dazu kommt eine DCOP-Schnittstelle, so dass Ihre Anwendung eine Schnittstelle für Skripte anbieten kann. +Comment[el]=Δημιουργεί μια απλή εφαρμογή Korundum με ένα ανώτερο παράθυρο, μενού και γραμμές εργαλείων. Προσφέρεται επίσης μια διασύνδεση DCOP, έτσι ώστε η εφαρμογή σας να προσφέρει ένα περιβάλλον γραφής σεναρίων +Comment[es]=Genera una sencilla aplicación Korundum con una ventana principal, menús y barras de herramientas. También se proporciona una interfaz DCOP para que su aplicación pueda proporcionar una interfaz para guiones de órdenes. +Comment[et]=Lihtsa Korundumi rakenduse loomine ühe tipptaseme akna, menüüde ja tööriistaribadega. Lisatakse ka DCOP-liides, mis võimaldab rakendusel pakkuda skriptikeelte toetust +Comment[eu]=Goi-mailako lehio bat, menuak eta tresna-barrak dituen Korundum aplikazio sinple bat sortzen du . DCOP interfazea ere sortzen du, eta beraz, zure aplikazioak script-interfaze bat eskainiko du +Comment[fa]=یک کاربرد سادۀ Korundum با یک پنجرۀ سطح بالا، گزینگان و میله ابزارها تولید می‌کند. همچنین یک واسط DCOP فراهم است. بنابراین، کاربرد شما یک واسط دست‌نوشته‌ای را می‌تواند فراهم کند +Comment[fr]=Génère une application Korundum simple comprenant une fenêtre de premier niveau, des menus et des barres d'outils. Une interface DCOP est également fournie, afin que votre application puisse offrir une interface de scriptage +Comment[gl]=Xera unha aplicación sinxela Korundum cunha fiestra, menús e barras de ferramentas. Proporciónase tamén unha interface DCOP de modo que a súa aplicación poida ofrecer unha interface de scripting. +Comment[hu]=Létrehoz egy egyszerű Korundum-alkalmazást egy főablakkal, menükkel és eszköztárakkal. DCOP-felület is tartozik az alkalmazáshoz, így könnyen kialakítható hozzá szkriptelési felület. +Comment[it]=Genera una semplice applicazione Korundum con una finestra toplevel, menu e barre degli strumenti. È anche fornita un'interfaccia DCOP, così che l'applicazione può fornire una interfaccia di scripting +Comment[nds]=Stellt en eenfach Korundum-Programm mit een böverst Finster, Menüs un Warktüüchbalkens op. Ok warrt noch en DCOP-Koppelsteed praatstellt, so dat Dien Programm en Skriptkoppelsteed anbeden kann. +Comment[ne]=एउटा उच्च तह सञ्झ्याल, मेनु र उपकरणपट्टीसँग साधारण Korundum अनुप्रयोग उत्पन्न गर्दछ । DCOP इन्टरफेस पनि प्रदान गरिन्छ, जसले गर्दा तपाईँको अनुप्रयोगले स्क्रिप्टिङ इन्टरफेस प्रदान गर्न सक्छ । +Comment[nl]=Dit genereert een eenvoudige Korundum-toepassing met één toplevel window, menu's en toolbars. Een DCOP-interface wordt ook aangeleverd, zodat uw toepassing een scripting interface kan aanleveren. +Comment[pl]=Generuje prosty program Korundum z jednym oknem, menu i paskami narzędzi. Dostępny jest także interfejs DCOP, więc Twój program może umożliwiać korzystanie ze skryptów +Comment[pt]=Gera uma aplicação Korundum simples com uma janela de topo, menus e barras de ferramentas. Também é fornecida uma interface de DCOP, para que a sua aplicação possa oferecer uma interface de programação +Comment[pt_BR]=Gera uma aplicação Korundum simples com uma janela de topo, menus e barras de ferramentas. Também é fornecida uma interface de DCOP, para que a sua aplicação possa oferecer uma interface de programação +Comment[ru]=Создание простого приложения Korundum с окном, меню, панелями инструментов и сервисом DCOP +Comment[sk]=Vygeneruje jednoduchú Korundum aplikáciu s jedným oknom, menu a panelom nástrojov. Taktiež bude poskytnuté DCOP rozhranie, takže aj aplikáciamôže poskytnúť skriptovacie rozhranie +Comment[sr]=Прави једноставан Korundum програм са једним прозором највишег нивоа, менијима и тракама са алатом. Дат је и DCOP интерфејс, тако да ваш програм може да омогући скриптовање +Comment[sr@Latn]=Pravi jednostavan Korundum program sa jednim prozorom najvišeg nivoa, menijima i trakama sa alatom. Dat je i DCOP interfejs, tako da vaš program može da omogući skriptovanje +Comment[sv]=Skapar ett enkelt Korundum-program med ett toppnivåfönster, menyer och verktygsrader. Ett DCOP-gränssnitt tillhandahålls också, så att programmet kan tillhandahålla ett skriptgränssnitt. +Comment[tr]=Bir üst seviye penceresi, menüleri ve araç çubukları olan basit bir Korundum uygulaması yaratır. Uygulamanızın bir betik arayüzü sağlayabilmesi için bir DCOP arayüzü de sağlanmıştır. +Comment[zh_TW]=產生一個簡單的 Korundum 應用程式,內含頂層視窗、選單與工具列。另外提供一個 DCOP 介面,讓您的應用程式可以使用文稿介面。 +FileTemplates=rb,ShellStyle +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.rb +Archive=kappruby.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE7] +Type=install +Source=%{src}/app-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/tde-app.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[FILE10] +Type=install +Source=%{tdevelop}/template-common/hi16-app-app.png +Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png +Process=false + +[FILE11] +Type=install +Source=%{tdevelop}/template-common/hi32-app-app.png +Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png +Process=false + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE12] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE13] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE14] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE15] +Type=install +Source=%{src}/app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE16] +Type=install +Source=%{src}/app.rb +Dest=%{dest}/src/%{APPNAMELC}.rb + +[FILE17] +Type=install +Source=%{src}/appview.rb +Dest=%{dest}/src/%{APPNAMELC}view.rb + +[FILE18] +Type=install +Source=%{src}/appiface.rb +Dest=%{dest}/src/%{APPNAMELC}iface.rb + +[FILE19] +Type=install +Source=%{src}/app_client.rb +Dest=%{dest}/src/%{APPNAMELC}_client.rb + +[FILE20] +Type=install +Source=%{src}/pref.rb +Dest=%{dest}/src/pref.rb + +[FILE21] +Type=install +Source=%{src}/main.rb +Dest=%{dest}/src/main.rb + +[FILE22] +Type=install +EscapeXML=true +Source=%{src}/appui.rc +Dest=%{dest}/src/%{APPNAMELC}ui.rc + +[FILE23] +Type=install +Source=%{src}/README +Dest=%{dest}/src/README + +[MSG] +Type=message +Comment=A Korundum Application was created at %{dest} +Comment[ca]=Una aplicació Korundum ha estat creada a %{dest} +Comment[da]=Et Korundum program blev oprettet i %{dest} +Comment[de]=Eine Korundum-Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή Korundum δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación Korundum ha sido creada en %{dest} +Comment[et]=Korundumi rakendus loodi asukohta %{dest} +Comment[eu]=Korundum aplikazio bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد Korundum در %{dest} ایجاد شد +Comment[fr]=Une application Korundum a été créée dans %{dest} +Comment[ga]=Cruthaíodh Feidhmchlár Korundum ag %{dest} +Comment[gl]=Creouse unha aplicación Korundum en %{dest} +Comment[hu]=Létrejött egy Korundum-alapú alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione Korundum in %{dest} +Comment[ja]=Korundum アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Korundum-Programm opstellt. +Comment[ne]=Korundum अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een Korundum-toepassing is aangemaakt in %{dest} +Comment[pl]=Program Korundum został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação Korundum em %{dest} +Comment[pt_BR]=Foi criada uma aplicação Korundum em %{dest} +Comment[ru]=Приложение Korundum создано в %{dest} +Comment[sk]=Korundum aplikácia bola vytvorená v %{dest} +Comment[sr]=Korundum програм је направљен у %{dest} +Comment[sr@Latn]=Korundum program je napravljen u %{dest} +Comment[sv]=Ett Korundum-program skapades i %{dest} +Comment[tr]=Bir Korundum Uygulaması %{dest} içinde yaratıldı. +Comment[zh_TW]=一個 Korundum 應用程式已建立於 %{dest} diff --git a/languages/ruby/app_templates/tdeapp/tdeappruby.png b/languages/ruby/app_templates/kapp/kappruby.png similarity index 100% rename from languages/ruby/app_templates/tdeapp/tdeappruby.png rename to languages/ruby/app_templates/kapp/kappruby.png diff --git a/languages/ruby/app_templates/tdeapp/main.rb b/languages/ruby/app_templates/kapp/main.rb similarity index 100% rename from languages/ruby/app_templates/tdeapp/main.rb rename to languages/ruby/app_templates/kapp/main.rb diff --git a/languages/ruby/app_templates/tdeapp/pref.rb b/languages/ruby/app_templates/kapp/pref.rb similarity index 100% rename from languages/ruby/app_templates/tdeapp/pref.rb rename to languages/ruby/app_templates/kapp/pref.rb diff --git a/languages/ruby/app_templates/tdeapp/src-Makefile.am b/languages/ruby/app_templates/kapp/src-Makefile.am similarity index 100% rename from languages/ruby/app_templates/tdeapp/src-Makefile.am rename to languages/ruby/app_templates/kapp/src-Makefile.am diff --git a/languages/ruby/app_templates/tdeapp/subdirs b/languages/ruby/app_templates/kapp/subdirs similarity index 100% rename from languages/ruby/app_templates/tdeapp/subdirs rename to languages/ruby/app_templates/kapp/subdirs diff --git a/languages/ruby/app_templates/kxt/CMakeLists.txt b/languages/ruby/app_templates/kxt/CMakeLists.txt index 482d5e24..539cfdb6 100644 --- a/languages/ruby/app_templates/kxt/CMakeLists.txt +++ b/languages/ruby/app_templates/kxt/CMakeLists.txt @@ -20,9 +20,9 @@ add_custom_target( kxtruby.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/kxtruby.tar.gz kxtruby.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - kxtruby.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + kxtruby.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/ruby/app_templates/kxt/Makefile.am b/languages/ruby/app_templates/kxt/Makefile.am index 66b2b259..2ea8cf5b 100644 --- a/languages/ruby/app_templates/kxt/Makefile.am +++ b/languages/ruby/app_templates/kxt/Makefile.am @@ -6,10 +6,10 @@ dataFiles = app.rb main.rb prefs.rb app.cpp appview.rb appview_base.ui prefs-bas templateName = kxtruby ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/ruby/app_templates/kxt/app.tdevelop b/languages/ruby/app_templates/kxt/app.tdevelop index d416fcdb..5c57b8fb 100644 --- a/languages/ruby/app_templates/kxt/app.tdevelop +++ b/languages/ruby/app_templates/kxt/app.tdevelop @@ -15,18 +15,18 @@ KDevDoxygen KDevdistpart KDevVisualBoyAdvance - TDevDebugger + KDevDebugger - + src/%{APPNAMELC} - - + + false CVS,.svn @@ -35,8 +35,8 @@ - - + + ada ada_bugs_gcc @@ -72,19 +72,19 @@ w3c-uaag10 wxwindows_bugs - - + + - - + + ruby false 3 src/main.rb - + diff --git a/languages/ruby/app_templates/kxt/kxtruby.kdevtemplate b/languages/ruby/app_templates/kxt/kxtruby.kdevtemplate new file mode 100644 index 00000000..e4756e1d --- /dev/null +++ b/languages/ruby/app_templates/kxt/kxtruby.kdevtemplate @@ -0,0 +1,251 @@ +# KDE Config File +[General] + +Name=TDEConfig XT application +Name[ca]=Aplicació TDEConfig XT +Name[da]=TDEConfig XT program +Name[de]=TDEConfigXT-Anwendung +Name[el]=Εφαρμογή TDEConfig XT +Name[es]=Aplicación TDEConfig XT +Name[et]=TDEConfig XT rakendus +Name[eu]=TDEConfig XT aplikazioa +Name[fa]=کاربرد TDEConfig XT +Name[fr]=Application TDEConfig XT +Name[ga]=Feidhmchlár XT TDEConfig +Name[gl]=Aplicación TDEConfig XT +Name[hu]=TDEConfig XT-alapú alkalmazás +Name[it]=Applicazione TDEConfig XT +Name[ja]=TDEConfig XT アプリケーション +Name[nds]=TDEConfig-XT-Programm +Name[ne]=TDEConfig XT अनुप्रयोग +Name[nl]=TDEConfig XT-toepassing +Name[pl]=Program TDEConfig XT +Name[pt]=Aplicação do TDEConfig XT +Name[pt_BR]=Aplicação do TDEConfig XT +Name[ru]=Приложение KDE с TDEConfig XT +Name[sk]=TDEConfig XT aplikácia +Name[sr]=TDEConfig XT програм +Name[sr@Latn]=TDEConfig XT program +Name[sv]=TDEConfig XT-program +Name[tr]=TDEConfig XT uygulaması +Name[zh_CN]=TDEConfig XT 应用程序 +Name[zh_TW]=TDEConfig XT 應用程式 +Category=Ruby/KDE +Icon=kxtruby.png +Comment=Generates a simple KDE application with one widget and a configuration dialog +Comment[ca]=Genera una simple aplicació per al KDE amb un estri i un diàleg de configuració +Comment[da]=Genererer et simpelt KDE-program med en kontrol og en indstillingsdialog +Comment[de]=Erstellt eine einfache KDE-Anwendung mit einem Widget und einem Einstellungsdialog. +Comment[el]=Δημιουργεί μια απλή εφαρμογή KDE με ένα γραφικό συστατικό, ένα διάλογο ρύθμισης +Comment[en_GB]=Generates a simple KDE application with one widget and a configuration dialogue +Comment[es]=Genera una sencilla aplicación para KDE con una ventana y un diálogo de configuración +Comment[et]=Lihtsa KDE rakenduse loomine ühe vidina ja seadistustedialoogiga. +Comment[eu]=Trepeta bat eta konfigurazio elkarrizketa-koadro bat duen KDE aplikazio sinple bat sortzen du +Comment[fa]=یک کاربرد سادۀ KDE، با یک عنصر و یک محاورۀ پیکربندی تولید می‌کند +Comment[fr]=Génère une application KDE simple comprenant un seul élément graphique (widget) et une boîte de dialogue de configuration +Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí KDE le giuirléid amháin agus dialóg chumraíochta +Comment[gl]=Xera unha aplicación KDE sinxela cunha compoñente e un diálogo de configuración +Comment[hu]=Létrehoz egy egyszerű KDE-alkalmazást egy grafikus elemmel és egy beállítóablakkal +Comment[it]=Genera una semplice applicazione KDE con un elemento grafico e una finestra di configurazione +Comment[ja]=一つのウィジェットと設定ダイアログを含む簡単な KDE アプリケーションを作成します +Comment[nds]=Stellt en eenfach KDE-Programm mit een Element un en Instelldialoog op +Comment[ne]=एउटा विगेट र कन्फिगरेसन संवादसँग साधारण केडीई अनुप्रयोग उत्पन्न गर्दछ +Comment[nl]=Genereert een eenvoudige KDE-toepassing met één widget en een configuratiedialoog +Comment[pl]=Generuje prosty program KDE z jednym widgetem i oknem konfiguracyjnym +Comment[pt]=Gera uma aplicação simples do KDE com uma janela principal e outra para configuração +Comment[pt_BR]=Gera uma aplicação simples do KDE com uma janela principal e outra para configuração +Comment[ru]=Создание приложения KDE с окном конфигурации +Comment[sk]=Vygeneruje jednoduchú KDE aplikáciu s jedným oknom a konfiguračným dialógom +Comment[sr]=Прави једноставан KDE програм са једном контролом и дијалогом за подешавање +Comment[sr@Latn]=Pravi jednostavan KDE program sa jednom kontrolom i dijalogom za podešavanje +Comment[sv]=Skapar ett enkelt KDE-program med en grafisk komponent och en inställningsdialogruta +Comment[tr]=Bir parçacığı ve ayar penceresi olan basit bir KDE uygulaması yaratır. +Comment[zh_CN]=生成带一个部件和一个配置对话框的简单 KDE 应用程序 +Comment[zh_TW]=產生一個簡單的 KDE 應用程式,內含一個元件與一個設定對話框。 +ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.rb,%{dest}/src/README +Archive=kxtruby.tar.gz + +[ADMIN] +Type=include +File=%{tdevelop}/template-common/admin.kdevtemplate + +[GNU] +Type=include +File=%{tdevelop}/template-common/gnu.kdevtemplate + +[MKDIR_DOCBOOK1] +Type=mkdir +Dir=%{dest}/doc + +[MKDIR_DOCBOOK2] +Type=mkdir +Dir=%{dest}/doc/en + +[FILE1] +Type=install +Source=%{tdevelop}/template-common/kde-doc-Makefile.am +Dest=%{dest}/doc/Makefile.am + +[FILE2] +Type=install +Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am +Dest=%{dest}/doc/en/Makefile.am + +[FILE3] +Type=install +EscapeXML=true +Source=%{tdevelop}/template-common/tde-index.docbook +Dest=%{dest}/doc/en/index.docbook + +[FILE4] +Type=install +EscapeXML=true +Source=%{src}/app.tdevelop +Dest=%{dest}/%{APPNAMELC}.tdevelop + +[FILE5] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.am +Dest=%{dest}/Makefile.am + +[FILE6] +Type=install +Source=%{tdevelop}/template-common/kde-Makefile.cvs +Dest=%{dest}/Makefile.cvs + +[FILE7] +Type=install +Source=%{src}/app-configure.in.in +Dest=%{dest}/configure.in.in + +[MkDir3] +Type=mkdir +Dir=%{dest}/src + +[FILE8] +Type=install +Source=%{tdevelop}/template-common/tde-app.desktop +Dest=%{dest}/src/%{APPNAMELC}.desktop + +[FILE9] +Type=install +Source=%{tdevelop}/template-common/kde-app.lsm +Dest=%{dest}/src/%{APPNAMELC}.lsm + +[FILE10] +Type=install +Source=%{tdevelop}/template-common/hi16-app-app.png +Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png +Process=false + +[FILE11] +Type=install +Source=%{tdevelop}/template-common/hi32-app-app.png +Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png +Process=false + +[MkDir4] +Type=mkdir +Dir=%{dest}/po + +[FILE12] +Type=install +Source=%{tdevelop}/template-common/kde-po-Makefile.am +Dest=%{dest}/po/Makefile.am + +[FILE13] +Type=install +Source=%{src}/subdirs +Dest=%{dest}/subdirs + +[FILE14] +Type=install +Source=%{src}/src-Makefile.am +Dest=%{dest}/src/Makefile.am + +[FILE15] +Type=install +Source=%{src}/app.cpp +Dest=%{dest}/src/%{APPNAMELC}.cpp + +[FILE16] +Type=install +Source=%{src}/app.rb +Dest=%{dest}/src/%{APPNAMELC}.rb + +[FILE17] +Type=install +Source=%{src}/appview.rb +Dest=%{dest}/src/%{APPNAMELC}view.rb + +[FILE18] +Type=install +Source=%{src}/appview_base.ui +Dest=%{dest}/src/appview_base.ui + +[FILE19] +Type=install +Source=%{src}/prefs-base.ui +Dest=%{dest}/src/prefs-base.ui + +[FILE20] +Type=install +Source=%{src}/prefs.rb +Dest=%{dest}/src/prefs.rb + +[FILE21] +Type=install +Source=%{src}/main.rb +Dest=%{dest}/src/main.rb + +[FILE22] +Type=install +EscapeXML=true +Source=%{src}/appui.rc +Dest=%{dest}/src/%{APPNAMELC}ui.rc + +[FILE23] +Type=install +Source=%{src}/README +Dest=%{dest}/src/README + +[FILE24] +Type=install +Source=%{src}/app.kcfg +Dest=%{dest}/src/%{APPNAMELC}.kcfg + +[FILE25] +Type=install +Source=%{src}/settings.kcfgc +Dest=%{dest}/src/settings.kcfgc + +[MSG] +Type=message +Comment=A Korundum TDEConfig XT Application was created at %{dest} +Comment[ca]=Una aplicació Korundum amb TDEConfig XT ha estat creada a %{dest} +Comment[da]=Et Korundum TDEConfig XT program blev oprettet i %{dest} +Comment[de]=Eine Korundum-TDEConfig-XT-Anwendung wurde in %{dest} erstellt. +Comment[el]=Μια εφαρμογή Korundum TDEConfig XT δημιουργήθηκε στο %{dest} +Comment[es]=Una aplicación Korundum con TDEConfig XT ha sido creada en %{dest} +Comment[et]=Korundumi TDEConfig XT rakendus loodi asukohta %{dest} +Comment[eu]=Korundum TDEConfig XT aplikazio bat sortu da hemen: %{dest} +Comment[fa]=یک کاربرد Korundum TDEConfig XT در %{dest} ایجاد شد +Comment[fr]=Une application TDEConfig XT Korundum a été créée dans %{dest} +Comment[ga]=Cruthaíodh Feidhmchlár Korundum TDEConfig XT ag %{dest} +Comment[gl]=Creouse unha aplicación TDEConfig XT con Korundum en %{dest} +Comment[hu]=Létrejött egy Korundum-alapú TDEConfig XT-s alkalmazás itt: %{dest} +Comment[it]=È stata creata un'applicazione Korundum TDEConfig XT in %{dest} +Comment[ja]=Korundum TDEConfig XT アプリケーションを %{dest} に作成しました +Comment[nds]=In %{dest} wöör en Korundum/TDEConfig-XT-Programm opstellt. +Comment[ne]=Korundum TDEConfig XT अनुप्रयोग %{dest} मा सिर्जना गरियो +Comment[nl]=Een Korundum TDEConfig XT-toepassing is aangemaakt in %{dest} +Comment[pl]=Program Korundum TDEConfig XT został utworzony w %{dest} +Comment[pt]=Foi criada uma aplicação Korundum com TDEConfig XT em %{dest} +Comment[pt_BR]=Foi criada uma aplicação Korundum com TDEConfig XT em %{dest} +Comment[ru]=Приложение Korundum с TDEConfig XT создано в %{dest} +Comment[sk]=Korundim TDEConfig XT aplikácia bola vytvorená v %{dest} +Comment[sr]=Korundum TDEConfig XT програм направљен је у %{dest} +Comment[sr@Latn]=Korundum TDEConfig XT program napravljen je u %{dest} +Comment[sv]=Ett Korundum TDEConfig XT-program skapades i %{dest} +Comment[tr]=Bir Korundum TDEConfig XT uygulaması %{dest} içinde yaratıldı. +Comment[zh_TW]=一個 Korundum TDEConfig XT 應用程式已建立於 %{dest} diff --git a/languages/ruby/app_templates/kxt/kxtruby.tdevtemplate b/languages/ruby/app_templates/kxt/kxtruby.tdevtemplate deleted file mode 100644 index f17db17b..00000000 --- a/languages/ruby/app_templates/kxt/kxtruby.tdevtemplate +++ /dev/null @@ -1,251 +0,0 @@ -# KDE Config File -[General] - -Name=TDEConfig XT application -Name[ca]=Aplicació TDEConfig XT -Name[da]=TDEConfig XT program -Name[de]=TDEConfigXT-Anwendung -Name[el]=Εφαρμογή TDEConfig XT -Name[es]=Aplicación TDEConfig XT -Name[et]=TDEConfig XT rakendus -Name[eu]=TDEConfig XT aplikazioa -Name[fa]=کاربرد TDEConfig XT -Name[fr]=Application TDEConfig XT -Name[ga]=Feidhmchlár XT TDEConfig -Name[gl]=Aplicación TDEConfig XT -Name[hu]=TDEConfig XT-alapú alkalmazás -Name[it]=Applicazione TDEConfig XT -Name[ja]=TDEConfig XT アプリケーション -Name[nds]=TDEConfig-XT-Programm -Name[ne]=TDEConfig XT अनुप्रयोग -Name[nl]=TDEConfig XT-toepassing -Name[pl]=Program TDEConfig XT -Name[pt]=Aplicação do TDEConfig XT -Name[pt_BR]=Aplicação do TDEConfig XT -Name[ru]=Приложение KDE с TDEConfig XT -Name[sk]=TDEConfig XT aplikácia -Name[sr]=TDEConfig XT програм -Name[sr@Latn]=TDEConfig XT program -Name[sv]=TDEConfig XT-program -Name[tr]=TDEConfig XT uygulaması -Name[zh_CN]=TDEConfig XT 应用程序 -Name[zh_TW]=TDEConfig XT 應用程式 -Category=Ruby/KDE -Icon=kxtruby.png -Comment=Generates a simple KDE application with one widget and a configuration dialog -Comment[ca]=Genera una simple aplicació per al KDE amb un estri i un diàleg de configuració -Comment[da]=Genererer et simpelt KDE-program med en kontrol og en indstillingsdialog -Comment[de]=Erstellt eine einfache KDE-Anwendung mit einem Widget und einem Einstellungsdialog. -Comment[el]=Δημιουργεί μια απλή εφαρμογή KDE με ένα γραφικό συστατικό, ένα διάλογο ρύθμισης -Comment[en_GB]=Generates a simple KDE application with one widget and a configuration dialogue -Comment[es]=Genera una sencilla aplicación para KDE con una ventana y un diálogo de configuración -Comment[et]=Lihtsa KDE rakenduse loomine ühe vidina ja seadistustedialoogiga. -Comment[eu]=Trepeta bat eta konfigurazio elkarrizketa-koadro bat duen KDE aplikazio sinple bat sortzen du -Comment[fa]=یک کاربرد سادۀ KDE، با یک عنصر و یک محاورۀ پیکربندی تولید می‌کند -Comment[fr]=Génère une application KDE simple comprenant un seul élément graphique (widget) et une boîte de dialogue de configuration -Comment[ga]=Cruthaíonn sé seo feidhmchlár simplí KDE le giuirléid amháin agus dialóg chumraíochta -Comment[gl]=Xera unha aplicación KDE sinxela cunha compoñente e un diálogo de configuración -Comment[hu]=Létrehoz egy egyszerű KDE-alkalmazást egy grafikus elemmel és egy beállítóablakkal -Comment[it]=Genera una semplice applicazione KDE con un elemento grafico e una finestra di configurazione -Comment[ja]=一つのウィジェットと設定ダイアログを含む簡単な KDE アプリケーションを作成します -Comment[nds]=Stellt en eenfach KDE-Programm mit een Element un en Instelldialoog op -Comment[ne]=एउटा विगेट र कन्फिगरेसन संवादसँग साधारण केडीई अनुप्रयोग उत्पन्न गर्दछ -Comment[nl]=Genereert een eenvoudige KDE-toepassing met één widget en een configuratiedialoog -Comment[pl]=Generuje prosty program KDE z jednym widgetem i oknem konfiguracyjnym -Comment[pt]=Gera uma aplicação simples do KDE com uma janela principal e outra para configuração -Comment[pt_BR]=Gera uma aplicação simples do KDE com uma janela principal e outra para configuração -Comment[ru]=Создание приложения KDE с окном конфигурации -Comment[sk]=Vygeneruje jednoduchú KDE aplikáciu s jedným oknom a konfiguračným dialógom -Comment[sr]=Прави једноставан KDE програм са једном контролом и дијалогом за подешавање -Comment[sr@Latn]=Pravi jednostavan KDE program sa jednom kontrolom i dijalogom za podešavanje -Comment[sv]=Skapar ett enkelt KDE-program med en grafisk komponent och en inställningsdialogruta -Comment[tr]=Bir parçacığı ve ayar penceresi olan basit bir KDE uygulaması yaratır. -Comment[zh_CN]=生成带一个部件和一个配置对话框的简单 KDE 应用程序 -Comment[zh_TW]=產生一個簡單的 KDE 應用程式,內含一個元件與一個設定對話框。 -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.rb,%{dest}/src/README -Archive=kxtruby.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE7] -Type=install -Source=%{src}/app-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/tde-app.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[FILE10] -Type=install -Source=%{tdevelop}/template-common/hi16-app-app.png -Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png -Process=false - -[FILE11] -Type=install -Source=%{tdevelop}/template-common/hi32-app-app.png -Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png -Process=false - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE12] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE13] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE14] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE15] -Type=install -Source=%{src}/app.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE16] -Type=install -Source=%{src}/app.rb -Dest=%{dest}/src/%{APPNAMELC}.rb - -[FILE17] -Type=install -Source=%{src}/appview.rb -Dest=%{dest}/src/%{APPNAMELC}view.rb - -[FILE18] -Type=install -Source=%{src}/appview_base.ui -Dest=%{dest}/src/appview_base.ui - -[FILE19] -Type=install -Source=%{src}/prefs-base.ui -Dest=%{dest}/src/prefs-base.ui - -[FILE20] -Type=install -Source=%{src}/prefs.rb -Dest=%{dest}/src/prefs.rb - -[FILE21] -Type=install -Source=%{src}/main.rb -Dest=%{dest}/src/main.rb - -[FILE22] -Type=install -EscapeXML=true -Source=%{src}/appui.rc -Dest=%{dest}/src/%{APPNAMELC}ui.rc - -[FILE23] -Type=install -Source=%{src}/README -Dest=%{dest}/src/README - -[FILE24] -Type=install -Source=%{src}/app.kcfg -Dest=%{dest}/src/%{APPNAMELC}.kcfg - -[FILE25] -Type=install -Source=%{src}/settings.kcfgc -Dest=%{dest}/src/settings.kcfgc - -[MSG] -Type=message -Comment=A Korundum TDEConfig XT Application was created at %{dest} -Comment[ca]=Una aplicació Korundum amb TDEConfig XT ha estat creada a %{dest} -Comment[da]=Et Korundum TDEConfig XT program blev oprettet i %{dest} -Comment[de]=Eine Korundum-TDEConfig-XT-Anwendung wurde in %{dest} erstellt. -Comment[el]=Μια εφαρμογή Korundum TDEConfig XT δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación Korundum con TDEConfig XT ha sido creada en %{dest} -Comment[et]=Korundumi TDEConfig XT rakendus loodi asukohta %{dest} -Comment[eu]=Korundum TDEConfig XT aplikazio bat sortu da hemen: %{dest} -Comment[fa]=یک کاربرد Korundum TDEConfig XT در %{dest} ایجاد شد -Comment[fr]=Une application TDEConfig XT Korundum a été créée dans %{dest} -Comment[ga]=Cruthaíodh Feidhmchlár Korundum TDEConfig XT ag %{dest} -Comment[gl]=Creouse unha aplicación TDEConfig XT con Korundum en %{dest} -Comment[hu]=Létrejött egy Korundum-alapú TDEConfig XT-s alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione Korundum TDEConfig XT in %{dest} -Comment[ja]=Korundum TDEConfig XT アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Korundum/TDEConfig-XT-Programm opstellt. -Comment[ne]=Korundum TDEConfig XT अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een Korundum TDEConfig XT-toepassing is aangemaakt in %{dest} -Comment[pl]=Program Korundum TDEConfig XT został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação Korundum com TDEConfig XT em %{dest} -Comment[pt_BR]=Foi criada uma aplicação Korundum com TDEConfig XT em %{dest} -Comment[ru]=Приложение Korundum с TDEConfig XT создано в %{dest} -Comment[sk]=Korundim TDEConfig XT aplikácia bola vytvorená v %{dest} -Comment[sr]=Korundum TDEConfig XT програм направљен је у %{dest} -Comment[sr@Latn]=Korundum TDEConfig XT program napravljen je u %{dest} -Comment[sv]=Ett Korundum TDEConfig XT-program skapades i %{dest} -Comment[tr]=Bir Korundum TDEConfig XT uygulaması %{dest} içinde yaratıldı. -Comment[zh_TW]=一個 Korundum TDEConfig XT 應用程式已建立於 %{dest} diff --git a/languages/ruby/app_templates/qtruby/CMakeLists.txt b/languages/ruby/app_templates/qtruby/CMakeLists.txt index edbe6376..beac7f1f 100644 --- a/languages/ruby/app_templates/qtruby/CMakeLists.txt +++ b/languages/ruby/app_templates/qtruby/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( qtruby.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/qtruby.tar.gz qtruby.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - qtruby.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + qtruby.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/ruby/app_templates/qtruby/Makefile.am b/languages/ruby/app_templates/qtruby/Makefile.am index a822765c..919a69f5 100644 --- a/languages/ruby/app_templates/qtruby/Makefile.am +++ b/languages/ruby/app_templates/qtruby/Makefile.am @@ -2,10 +2,10 @@ dataFiles = app.rb app.tdevelop app-Makefile app.filelist README templateName = qtruby ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/ruby/app_templates/qtruby/app.filelist b/languages/ruby/app_templates/qtruby/app.filelist index 2458459f..202beb22 100644 --- a/languages/ruby/app_templates/qtruby/app.filelist +++ b/languages/ruby/app_templates/qtruby/app.filelist @@ -1,2 +1,2 @@ -# TDevelop Custom Project File List +# KDevelop Custom Project File List %{APPNAMELC}.rb diff --git a/languages/ruby/app_templates/qtruby/app.tdevelop b/languages/ruby/app_templates/qtruby/app.tdevelop index ad09b42c..3b59130c 100644 --- a/languages/ruby/app_templates/qtruby/app.tdevelop +++ b/languages/ruby/app_templates/qtruby/app.tdevelop @@ -4,7 +4,7 @@ %{AUTHOR} %{EMAIL} %{VERSION} - TDevCustomProject + KDevCustomProject Ruby Ruby @@ -14,15 +14,15 @@ KDevDoxygen KDevdistpart KDevVisualBoyAdvance - TDevDebugger + KDevDebugger - + - - + + false CVS,.svn @@ -31,8 +31,8 @@ - - + + ada ada_bugs_gcc @@ -68,18 +68,18 @@ w3c-uaag10 wxwindows_bugs - - + + - - + + ./%{APPNAMELC}.rb ruby false - + diff --git a/languages/ruby/app_templates/qtruby/qtruby.tdevtemplate b/languages/ruby/app_templates/qtruby/qtruby.kdevtemplate similarity index 100% rename from languages/ruby/app_templates/qtruby/qtruby.tdevtemplate rename to languages/ruby/app_templates/qtruby/qtruby.kdevtemplate diff --git a/languages/ruby/app_templates/qtruby4app/CMakeLists.txt b/languages/ruby/app_templates/qtruby4app/CMakeLists.txt index 9bf5e3b6..e5045380 100644 --- a/languages/ruby/app_templates/qtruby4app/CMakeLists.txt +++ b/languages/ruby/app_templates/qtruby4app/CMakeLists.txt @@ -20,9 +20,9 @@ add_custom_target( qtruby4app.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/qtruby4app.tar.gz qtruby4app.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - qtruby4app.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + qtruby4app.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/ruby/app_templates/qtruby4app/Makefile.am b/languages/ruby/app_templates/qtruby4app/Makefile.am index 09709aed..8f4adecd 100644 --- a/languages/ruby/app_templates/qtruby4app/Makefile.am +++ b/languages/ruby/app_templates/qtruby4app/Makefile.am @@ -5,10 +5,10 @@ dataFiles = main.rb qtruby4app.rb qtruby4app.png qtruby4app.tdevelop \ templateName = qtruby4app ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/ruby/app_templates/qtruby4app/app.filelist b/languages/ruby/app_templates/qtruby4app/app.filelist index 23f4bc76..339e6998 100644 --- a/languages/ruby/app_templates/qtruby4app/app.filelist +++ b/languages/ruby/app_templates/qtruby4app/app.filelist @@ -1,3 +1,3 @@ -# TDevelop Custom Project File List +# KDevelop Custom Project File List main.rb %{APPNAMELC}.rb diff --git a/languages/ruby/app_templates/qtruby4app/qtruby4app.tdevtemplate b/languages/ruby/app_templates/qtruby4app/qtruby4app.kdevtemplate similarity index 100% rename from languages/ruby/app_templates/qtruby4app/qtruby4app.tdevtemplate rename to languages/ruby/app_templates/qtruby4app/qtruby4app.kdevtemplate diff --git a/languages/ruby/app_templates/qtruby4app/qtruby4app.tdevelop b/languages/ruby/app_templates/qtruby4app/qtruby4app.tdevelop index 84a1a8e3..3df7f3ab 100644 --- a/languages/ruby/app_templates/qtruby4app/qtruby4app.tdevelop +++ b/languages/ruby/app_templates/qtruby4app/qtruby4app.tdevelop @@ -4,19 +4,19 @@ %{AUTHOR} %{EMAIL} %{VERSION} - TDevCustomProject + KDevCustomProject Ruby Ruby Qt - + - - + + @@ -27,8 +27,8 @@ false CVS,.svn - - + + bash bash_bugs @@ -63,21 +63,21 @@ KDE Libraries (Doxygen) - + - + - - + + ruby false ./main.rb - + diff --git a/languages/ruby/app_templates/qtrubyapp/CMakeLists.txt b/languages/ruby/app_templates/qtrubyapp/CMakeLists.txt index c0a0429e..37f6e5b1 100644 --- a/languages/ruby/app_templates/qtrubyapp/CMakeLists.txt +++ b/languages/ruby/app_templates/qtrubyapp/CMakeLists.txt @@ -19,9 +19,9 @@ add_custom_target( qtrubyapp.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/qtrubyapp.tar.gz qtrubyapp.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - qtrubyapp.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + qtrubyapp.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/ruby/app_templates/qtrubyapp/Makefile.am b/languages/ruby/app_templates/qtrubyapp/Makefile.am index 2ea3aa4b..7777b886 100644 --- a/languages/ruby/app_templates/qtrubyapp/Makefile.am +++ b/languages/ruby/app_templates/qtrubyapp/Makefile.am @@ -4,10 +4,10 @@ dataFiles = main.rb qtrubyapp.rb qtrubyapp.png qtrubyapp.tdevelop \ templateName = qtrubyapp ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/ruby/app_templates/qtrubyapp/app.filelist b/languages/ruby/app_templates/qtrubyapp/app.filelist index 23f4bc76..339e6998 100644 --- a/languages/ruby/app_templates/qtrubyapp/app.filelist +++ b/languages/ruby/app_templates/qtrubyapp/app.filelist @@ -1,3 +1,3 @@ -# TDevelop Custom Project File List +# KDevelop Custom Project File List main.rb %{APPNAMELC}.rb diff --git a/languages/ruby/app_templates/qtrubyapp/qtrubyapp.tdevtemplate b/languages/ruby/app_templates/qtrubyapp/qtrubyapp.kdevtemplate similarity index 100% rename from languages/ruby/app_templates/qtrubyapp/qtrubyapp.tdevtemplate rename to languages/ruby/app_templates/qtrubyapp/qtrubyapp.kdevtemplate diff --git a/languages/ruby/app_templates/qtrubyapp/qtrubyapp.tdevelop b/languages/ruby/app_templates/qtrubyapp/qtrubyapp.tdevelop index 84a1a8e3..3df7f3ab 100644 --- a/languages/ruby/app_templates/qtrubyapp/qtrubyapp.tdevelop +++ b/languages/ruby/app_templates/qtrubyapp/qtrubyapp.tdevelop @@ -4,19 +4,19 @@ %{AUTHOR} %{EMAIL} %{VERSION} - TDevCustomProject + KDevCustomProject Ruby Ruby Qt - + - - + + @@ -27,8 +27,8 @@ false CVS,.svn - - + + bash bash_bugs @@ -63,21 +63,21 @@ KDE Libraries (Doxygen) - + - + - - + + ruby false ./main.rb - + diff --git a/languages/ruby/app_templates/rails/CMakeLists.txt b/languages/ruby/app_templates/rails/CMakeLists.txt index 8d8fb1e2..6f53dd0d 100644 --- a/languages/ruby/app_templates/rails/CMakeLists.txt +++ b/languages/ruby/app_templates/rails/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( rails.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/rails.tar.gz rails.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - rails.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + rails.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/ruby/app_templates/rails/Makefile.am b/languages/ruby/app_templates/rails/Makefile.am index 915e789c..9d89a708 100644 --- a/languages/ruby/app_templates/rails/Makefile.am +++ b/languages/ruby/app_templates/rails/Makefile.am @@ -2,10 +2,10 @@ dataFiles = app.tdevelop templateName= rails ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/ruby/app_templates/rails/app.tdevelop b/languages/ruby/app_templates/rails/app.tdevelop index 272185c7..17a0e6a1 100644 --- a/languages/ruby/app_templates/rails/app.tdevelop +++ b/languages/ruby/app_templates/rails/app.tdevelop @@ -13,16 +13,16 @@ KDevDoxygen KDevdistpart KDevVisualBoyAdvance - TDevDebugger + KDevDebugger - + *.rb,*.rhtml,*.rxml,*.rjs,*.css,*.js,*.html.erb,*.js.rjs,*.xml.builder *~ - - + + @@ -34,8 +34,8 @@ - - + + ada ada_bugs_gcc @@ -82,8 +82,8 @@ KDE Libraries (Doxygen) - - + + @@ -95,13 +95,13 @@ - - + + ruby %{dest}/script/console false script/server - + diff --git a/languages/ruby/app_templates/rails/rails.tdevtemplate b/languages/ruby/app_templates/rails/rails.kdevtemplate similarity index 100% rename from languages/ruby/app_templates/rails/rails.tdevtemplate rename to languages/ruby/app_templates/rails/rails.kdevtemplate diff --git a/languages/ruby/app_templates/ruby.appwizard b/languages/ruby/app_templates/ruby.appwizard index b5937b62..726daeed 100644 --- a/languages/ruby/app_templates/ruby.appwizard +++ b/languages/ruby/app_templates/ruby.appwizard @@ -1,2 +1,2 @@ [General] -List=rubyhello,qtruby,qtrubyapp,dcopserviceruby,tdeappruby,kxtruby,rails +List=rubyhello,qtruby,qtrubyapp,dcopserviceruby,kappruby,kxtruby,rails diff --git a/languages/ruby/app_templates/rubyhello/CMakeLists.txt b/languages/ruby/app_templates/rubyhello/CMakeLists.txt index 103d97e9..74da59e4 100644 --- a/languages/ruby/app_templates/rubyhello/CMakeLists.txt +++ b/languages/ruby/app_templates/rubyhello/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( rubyhello.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/rubyhello.tar.gz rubyhello.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - rubyhello.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + rubyhello.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/ruby/app_templates/rubyhello/Makefile.am b/languages/ruby/app_templates/rubyhello/Makefile.am index 9afc2af8..5d20526e 100644 --- a/languages/ruby/app_templates/rubyhello/Makefile.am +++ b/languages/ruby/app_templates/rubyhello/Makefile.am @@ -2,10 +2,10 @@ dataFiles = app.rb app.tdevelop templateName= rubyhello ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/ruby/app_templates/rubyhello/app.tdevelop b/languages/ruby/app_templates/rubyhello/app.tdevelop index 2023467f..c938d122 100644 --- a/languages/ruby/app_templates/rubyhello/app.tdevelop +++ b/languages/ruby/app_templates/rubyhello/app.tdevelop @@ -13,21 +13,21 @@ KDevDoxygen KDevdistpart KDevVisualBoyAdvance - TDevDebugger + KDevDebugger - + *.rb *~ - - + + - - + + ada ada_bugs_gcc @@ -74,18 +74,18 @@ KDE Libraries (Doxygen) - - + + - - + + ./%{APPNAMELC}.rb ruby false - + diff --git a/languages/ruby/app_templates/rubyhello/rubyhello.tdevtemplate b/languages/ruby/app_templates/rubyhello/rubyhello.kdevtemplate similarity index 100% rename from languages/ruby/app_templates/rubyhello/rubyhello.tdevtemplate rename to languages/ruby/app_templates/rubyhello/rubyhello.kdevtemplate diff --git a/languages/ruby/app_templates/tdeapp/CMakeLists.txt b/languages/ruby/app_templates/tdeapp/CMakeLists.txt deleted file mode 100644 index 598ce743..00000000 --- a/languages/ruby/app_templates/tdeapp/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -################################################# -# -# (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( tdeappruby.tar.gz ALL - COMMAND tar zcf tdeappruby.tar.gz -C ${CMAKE_CURRENT_SOURCE_DIR} - app_client.rb appiface.rb app.rb appview.rb main.rb pref.rb - app.cpp appui.rc app.desktop app.tdevelop app-Makefile.am - app-configure.in.in src-Makefile.am subdirs README -) - - -install( FILES - ${CMAKE_CURRENT_BINARY_DIR}/tdeappruby.tar.gz tdeappruby.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) - - -install( FILES - tdeappruby.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) diff --git a/languages/ruby/app_templates/tdeapp/Makefile.am b/languages/ruby/app_templates/tdeapp/Makefile.am deleted file mode 100644 index ff783b87..00000000 --- a/languages/ruby/app_templates/tdeapp/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -dataFiles = app_client.rb appiface.rb app.rb appview.rb main.rb pref.rb app.cpp \ - appui.rc app.desktop app.tdevelop app-Makefile.am app-configure.in.in \ - src-Makefile.am subdirs README - -templateName = tdeappruby - -### no need to change below: -template_DATA = $(templateName).tdevtemplate -templatedir = ${appwizarddatadir}/templates - -appwizarddatadir = ${kde_datadir}/tdevappwizard -$(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 diff --git a/languages/ruby/app_templates/tdeapp/app.tdevelop b/languages/ruby/app_templates/tdeapp/app.tdevelop deleted file mode 100644 index d416fcdb..00000000 --- a/languages/ruby/app_templates/tdeapp/app.tdevelop +++ /dev/null @@ -1,90 +0,0 @@ - - - - %{AUTHOR} - %{EMAIL} - %{VERSION} - KDevAutoProject - Ruby - - Ruby - Qt - KDE - - - KDevDoxygen - KDevdistpart - KDevVisualBoyAdvance - TDevDebugger - - - - - - - - src/%{APPNAMELC} - - - - - false - CVS,.svn - - - - - - - - - ada - ada_bugs_gcc - bash - bash_bugs - c++_bugs_gcc - clanlib - w3c-dom-level2-html - fortran_bugs_gcc - gnome1 - gnustep - gtk - gtk_bugs - haskell - haskell_bugs_ghc - java_bugs_gcc - java_bugs_sun - kde2book - libc - libstdc++ - opengl - pascal_bugs_fp - php - php_bugs - perl - perl_bugs - python - python_bugs - sdl - stl - w3c-svg - sw - w3c-uaag10 - wxwindows_bugs - - - - - - - - - - - ruby - false - 3 - src/main.rb - - - diff --git a/languages/ruby/app_templates/tdeapp/tdeappruby.tdevtemplate b/languages/ruby/app_templates/tdeapp/tdeappruby.tdevtemplate deleted file mode 100644 index 8a4c0320..00000000 --- a/languages/ruby/app_templates/tdeapp/tdeappruby.tdevtemplate +++ /dev/null @@ -1,238 +0,0 @@ -# KDE Config File -[General] -Name=Application framework -Name[ca]=Infraestructura d'aplicacions -Name[da]=Programskelet -Name[de]=Anwendungsgrundgerüst -Name[el]=Πλαίσιο εφαρμογής -Name[es]=Infraestructura de aplicación -Name[et]=Rakenduse raamistik -Name[eu]=Aplikazioen lan-markoa -Name[fa]=چارچوب کاربرد -Name[fr]=Infrastructure d'application -Name[ga]=Creatlach feidhmchláir -Name[gl]=Entorno de traballo para aplicación -Name[hu]=Alkalmazás-keretrendszer -Name[it]=Infrastruttura applicativa -Name[ja]=アプリケーションフレームワーク -Name[nds]=Programmrahmenwark -Name[ne]=अनुप्रयोग फ्रेमवर्क -Name[nl]=Applicationframework -Name[pl]=Szablon programu -Name[pt]=Plataforma de aplicações -Name[pt_BR]=Plataforma de aplicações -Name[ru]=Приложение KDE -Name[sk]=Aplikačný framework -Name[sl]=Ogrodje programa -Name[sr]=Радни оквир програма -Name[sr@Latn]=Radni okvir programa -Name[sv]=Programramverk -Name[tr]=Uygulama Çatısı -Name[zh_CN]=应用程序框架 -Name[zh_TW]=應用程式框架 -Icon=tdeapp.png -Category=Ruby/KDE -Comment=Generates a simple Korundum application with one toplevel window, menus and toolbars. A DCOP interface is also provided, so that your application can provide a scripting interface -Comment[ca]=Genera una simple aplicació Korundum amb una finestra principal, menús i barres d'eines. També es proveeix la interfície DCOP, de manera que la vostra aplicació podrà proveir d'una interfície per a scripts -Comment[da]=Generere et simpelt Korundum program med et vindue på topniveau, menuer og værktøjslinjer. Der sørges også for en DCOP-grænseflade, så dit program kan give en script-grænseflade -Comment[de]=Erstellt eine einfache Korundum-Anwendung mit einem Toplevel-Fenster, Menüs und Werkzeugleisten. Dazu kommt eine DCOP-Schnittstelle, so dass Ihre Anwendung eine Schnittstelle für Skripte anbieten kann. -Comment[el]=Δημιουργεί μια απλή εφαρμογή Korundum με ένα ανώτερο παράθυρο, μενού και γραμμές εργαλείων. Προσφέρεται επίσης μια διασύνδεση DCOP, έτσι ώστε η εφαρμογή σας να προσφέρει ένα περιβάλλον γραφής σεναρίων -Comment[es]=Genera una sencilla aplicación Korundum con una ventana principal, menús y barras de herramientas. También se proporciona una interfaz DCOP para que su aplicación pueda proporcionar una interfaz para guiones de órdenes. -Comment[et]=Lihtsa Korundumi rakenduse loomine ühe tipptaseme akna, menüüde ja tööriistaribadega. Lisatakse ka DCOP-liides, mis võimaldab rakendusel pakkuda skriptikeelte toetust -Comment[eu]=Goi-mailako lehio bat, menuak eta tresna-barrak dituen Korundum aplikazio sinple bat sortzen du . DCOP interfazea ere sortzen du, eta beraz, zure aplikazioak script-interfaze bat eskainiko du -Comment[fa]=یک کاربرد سادۀ Korundum با یک پنجرۀ سطح بالا، گزینگان و میله ابزارها تولید می‌کند. همچنین یک واسط DCOP فراهم است. بنابراین، کاربرد شما یک واسط دست‌نوشته‌ای را می‌تواند فراهم کند -Comment[fr]=Génère une application Korundum simple comprenant une fenêtre de premier niveau, des menus et des barres d'outils. Une interface DCOP est également fournie, afin que votre application puisse offrir une interface de scriptage -Comment[gl]=Xera unha aplicación sinxela Korundum cunha fiestra, menús e barras de ferramentas. Proporciónase tamén unha interface DCOP de modo que a súa aplicación poida ofrecer unha interface de scripting. -Comment[hu]=Létrehoz egy egyszerű Korundum-alkalmazást egy főablakkal, menükkel és eszköztárakkal. DCOP-felület is tartozik az alkalmazáshoz, így könnyen kialakítható hozzá szkriptelési felület. -Comment[it]=Genera una semplice applicazione Korundum con una finestra toplevel, menu e barre degli strumenti. È anche fornita un'interfaccia DCOP, così che l'applicazione può fornire una interfaccia di scripting -Comment[nds]=Stellt en eenfach Korundum-Programm mit een böverst Finster, Menüs un Warktüüchbalkens op. Ok warrt noch en DCOP-Koppelsteed praatstellt, so dat Dien Programm en Skriptkoppelsteed anbeden kann. -Comment[ne]=एउटा उच्च तह सञ्झ्याल, मेनु र उपकरणपट्टीसँग साधारण Korundum अनुप्रयोग उत्पन्न गर्दछ । DCOP इन्टरफेस पनि प्रदान गरिन्छ, जसले गर्दा तपाईँको अनुप्रयोगले स्क्रिप्टिङ इन्टरफेस प्रदान गर्न सक्छ । -Comment[nl]=Dit genereert een eenvoudige Korundum-toepassing met één toplevel window, menu's en toolbars. Een DCOP-interface wordt ook aangeleverd, zodat uw toepassing een scripting interface kan aanleveren. -Comment[pl]=Generuje prosty program Korundum z jednym oknem, menu i paskami narzędzi. Dostępny jest także interfejs DCOP, więc Twój program może umożliwiać korzystanie ze skryptów -Comment[pt]=Gera uma aplicação Korundum simples com uma janela de topo, menus e barras de ferramentas. Também é fornecida uma interface de DCOP, para que a sua aplicação possa oferecer uma interface de programação -Comment[pt_BR]=Gera uma aplicação Korundum simples com uma janela de topo, menus e barras de ferramentas. Também é fornecida uma interface de DCOP, para que a sua aplicação possa oferecer uma interface de programação -Comment[ru]=Создание простого приложения Korundum с окном, меню, панелями инструментов и сервисом DCOP -Comment[sk]=Vygeneruje jednoduchú Korundum aplikáciu s jedným oknom, menu a panelom nástrojov. Taktiež bude poskytnuté DCOP rozhranie, takže aj aplikáciamôže poskytnúť skriptovacie rozhranie -Comment[sr]=Прави једноставан Korundum програм са једним прозором највишег нивоа, менијима и тракама са алатом. Дат је и DCOP интерфејс, тако да ваш програм може да омогући скриптовање -Comment[sr@Latn]=Pravi jednostavan Korundum program sa jednim prozorom najvišeg nivoa, menijima i trakama sa alatom. Dat je i DCOP interfejs, tako da vaš program može da omogući skriptovanje -Comment[sv]=Skapar ett enkelt Korundum-program med ett toppnivåfönster, menyer och verktygsrader. Ett DCOP-gränssnitt tillhandahålls också, så att programmet kan tillhandahålla ett skriptgränssnitt. -Comment[tr]=Bir üst seviye penceresi, menüleri ve araç çubukları olan basit bir Korundum uygulaması yaratır. Uygulamanızın bir betik arayüzü sağlayabilmesi için bir DCOP arayüzü de sağlanmıştır. -Comment[zh_TW]=產生一個簡單的 Korundum 應用程式,內含頂層視窗、選單與工具列。另外提供一個 DCOP 介面,讓您的應用程式可以使用文稿介面。 -FileTemplates=rb,ShellStyle -ShowFilesAfterGeneration=%{dest}/src/%{APPNAMELC}.rb -Archive=tdeappruby.tar.gz - -[ADMIN] -Type=include -File=%{tdevelop}/template-common/admin.tdevtemplate - -[GNU] -Type=include -File=%{tdevelop}/template-common/gnu.tdevtemplate - -[MKDIR_DOCBOOK1] -Type=mkdir -Dir=%{dest}/doc - -[MKDIR_DOCBOOK2] -Type=mkdir -Dir=%{dest}/doc/en - -[FILE1] -Type=install -Source=%{tdevelop}/template-common/kde-doc-Makefile.am -Dest=%{dest}/doc/Makefile.am - -[FILE2] -Type=install -Source=%{tdevelop}/template-common/kde-doc-en-Makefile.am -Dest=%{dest}/doc/en/Makefile.am - -[FILE3] -Type=install -EscapeXML=true -Source=%{tdevelop}/template-common/tde-index.docbook -Dest=%{dest}/doc/en/index.docbook - -[FILE4] -Type=install -EscapeXML=true -Source=%{src}/app.tdevelop -Dest=%{dest}/%{APPNAMELC}.tdevelop - -[FILE5] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.am -Dest=%{dest}/Makefile.am - -[FILE6] -Type=install -Source=%{tdevelop}/template-common/kde-Makefile.cvs -Dest=%{dest}/Makefile.cvs - -[FILE7] -Type=install -Source=%{src}/app-configure.in.in -Dest=%{dest}/configure.in.in - -[MkDir3] -Type=mkdir -Dir=%{dest}/src - -[FILE8] -Type=install -Source=%{tdevelop}/template-common/tde-app.desktop -Dest=%{dest}/src/%{APPNAMELC}.desktop - -[FILE9] -Type=install -Source=%{tdevelop}/template-common/kde-app.lsm -Dest=%{dest}/src/%{APPNAMELC}.lsm - -[FILE10] -Type=install -Source=%{tdevelop}/template-common/hi16-app-app.png -Dest=%{dest}/src/hi16-app-%{APPNAMELC}.png -Process=false - -[FILE11] -Type=install -Source=%{tdevelop}/template-common/hi32-app-app.png -Dest=%{dest}/src/hi32-app-%{APPNAMELC}.png -Process=false - -[MkDir4] -Type=mkdir -Dir=%{dest}/po - -[FILE12] -Type=install -Source=%{tdevelop}/template-common/kde-po-Makefile.am -Dest=%{dest}/po/Makefile.am - -[FILE13] -Type=install -Source=%{src}/subdirs -Dest=%{dest}/subdirs - -[FILE14] -Type=install -Source=%{src}/src-Makefile.am -Dest=%{dest}/src/Makefile.am - -[FILE15] -Type=install -Source=%{src}/app.cpp -Dest=%{dest}/src/%{APPNAMELC}.cpp - -[FILE16] -Type=install -Source=%{src}/app.rb -Dest=%{dest}/src/%{APPNAMELC}.rb - -[FILE17] -Type=install -Source=%{src}/appview.rb -Dest=%{dest}/src/%{APPNAMELC}view.rb - -[FILE18] -Type=install -Source=%{src}/appiface.rb -Dest=%{dest}/src/%{APPNAMELC}iface.rb - -[FILE19] -Type=install -Source=%{src}/app_client.rb -Dest=%{dest}/src/%{APPNAMELC}_client.rb - -[FILE20] -Type=install -Source=%{src}/pref.rb -Dest=%{dest}/src/pref.rb - -[FILE21] -Type=install -Source=%{src}/main.rb -Dest=%{dest}/src/main.rb - -[FILE22] -Type=install -EscapeXML=true -Source=%{src}/appui.rc -Dest=%{dest}/src/%{APPNAMELC}ui.rc - -[FILE23] -Type=install -Source=%{src}/README -Dest=%{dest}/src/README - -[MSG] -Type=message -Comment=A Korundum Application was created at %{dest} -Comment[ca]=Una aplicació Korundum ha estat creada a %{dest} -Comment[da]=Et Korundum program blev oprettet i %{dest} -Comment[de]=Eine Korundum-Anwendung wurde in %{dest} erstellt. -Comment[el]=Μια εφαρμογή Korundum δημιουργήθηκε στο %{dest} -Comment[es]=Una aplicación Korundum ha sido creada en %{dest} -Comment[et]=Korundumi rakendus loodi asukohta %{dest} -Comment[eu]=Korundum aplikazio bat sortu da hemen: %{dest} -Comment[fa]=یک کاربرد Korundum در %{dest} ایجاد شد -Comment[fr]=Une application Korundum a été créée dans %{dest} -Comment[ga]=Cruthaíodh Feidhmchlár Korundum ag %{dest} -Comment[gl]=Creouse unha aplicación Korundum en %{dest} -Comment[hu]=Létrejött egy Korundum-alapú alkalmazás itt: %{dest} -Comment[it]=È stata creata un'applicazione Korundum in %{dest} -Comment[ja]=Korundum アプリケーションを %{dest} に作成しました -Comment[nds]=In %{dest} wöör en Korundum-Programm opstellt. -Comment[ne]=Korundum अनुप्रयोग %{dest} मा सिर्जना गरियो -Comment[nl]=Een Korundum-toepassing is aangemaakt in %{dest} -Comment[pl]=Program Korundum został utworzony w %{dest} -Comment[pt]=Foi criada uma aplicação Korundum em %{dest} -Comment[pt_BR]=Foi criada uma aplicação Korundum em %{dest} -Comment[ru]=Приложение Korundum создано в %{dest} -Comment[sk]=Korundum aplikácia bola vytvorená v %{dest} -Comment[sr]=Korundum програм је направљен у %{dest} -Comment[sr@Latn]=Korundum program je napravljen u %{dest} -Comment[sv]=Ett Korundum-program skapades i %{dest} -Comment[tr]=Bir Korundum Uygulaması %{dest} içinde yaratıldı. -Comment[zh_TW]=一個 Korundum 應用程式已建立於 %{dest} diff --git a/languages/ruby/debugger/CMakeLists.txt b/languages/ruby/debugger/CMakeLists.txt index 7fb74000..8290afd7 100644 --- a/languages/ruby/debugger/CMakeLists.txt +++ b/languages/ruby/debugger/CMakeLists.txt @@ -29,20 +29,20 @@ link_directories( ##### other data ################################ tde_install_icons( ) -install( FILES tdevrbdebugger.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES debuggee.rb DESTINATION ${DATA_INSTALL_DIR}/tdevrbdebugger ) -install( FILES tdevrbdebugger.rc DESTINATION ${DATA_INSTALL_DIR}/tdevrbdebugger ) +install( FILES kdevrbdebugger.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES debuggee.rb DESTINATION ${DATA_INSTALL_DIR}/kdevrbdebugger ) +install( FILES kdevrbdebugger.rc DESTINATION ${DATA_INSTALL_DIR}/kdevrbdebugger ) -##### libtdevrbdebugger (module) ################ +##### libkdevrbdebugger (module) ################ -tde_add_kpart( libtdevrbdebugger AUTOMOC +tde_add_kpart( libkdevrbdebugger AUTOMOC SOURCES debuggerpart.cpp dbgcontroller.cpp rdbcontroller.cpp dbgcommand.cpp rdbcommand.cpp rdbparser.cpp stty.cpp breakpoint.cpp variablewidget.cpp rdbbreakpointwidget.cpp framestackwidget.cpp dbgpsdlg.cpp dbgtoolbar.cpp rdboutputwidget.cpp rdbtable.cpp - LINK lang_debugger-shared tdevwidgets-shared tdevelop-shared + LINK lang_debugger-shared kdevwidgets-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/languages/ruby/debugger/Makefile.am b/languages/ruby/debugger/Makefile.am index 0bbe445b..88e03f03 100644 --- a/languages/ruby/debugger/Makefile.am +++ b/languages/ruby/debugger/Makefile.am @@ -4,22 +4,22 @@ INCLUDES = -I$(top_srcdir)/languages/lib/debugger \ -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util \ -I$(top_srcdir)/lib/widgets $(all_includes) -kde_module_LTLIBRARIES = libtdevrbdebugger.la -libtdevrbdebugger_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevrbdebugger_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/widgets/libtdevwidgets.la $(LIB_TDEHTML) \ +kde_module_LTLIBRARIES = libkdevrbdebugger.la +libkdevrbdebugger_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevrbdebugger_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/widgets/libkdevwidgets.la $(LIB_TDEHTML) \ $(top_builddir)/languages/lib/debugger/liblang_debugger.la -libtdevrbdebugger_la_SOURCES = debuggerpart.cpp dbgcontroller.cpp rdbcontroller.cpp dbgcommand.cpp rdbcommand.cpp rdbparser.cpp stty.cpp breakpoint.cpp variablewidget.cpp rdbbreakpointwidget.cpp framestackwidget.cpp dbgpsdlg.cpp dbgtoolbar.cpp rdboutputwidget.cpp rdbtable.cpp +libkdevrbdebugger_la_SOURCES = debuggerpart.cpp dbgcontroller.cpp rdbcontroller.cpp dbgcommand.cpp rdbcommand.cpp rdbparser.cpp stty.cpp breakpoint.cpp variablewidget.cpp rdbbreakpointwidget.cpp framestackwidget.cpp dbgpsdlg.cpp dbgtoolbar.cpp rdboutputwidget.cpp rdbtable.cpp METASOURCES = AUTO KDE_ICON = AUTO rubysrc_DATA = debuggee.rb -rubysrcdir = $(kde_datadir)/tdevrbdebugger +rubysrcdir = $(kde_datadir)/kdevrbdebugger servicedir = $(kde_servicesdir) -service_DATA = tdevrbdebugger.desktop +service_DATA = kdevrbdebugger.desktop -rcdir = $(kde_datadir)/tdevrbdebugger -rc_DATA = tdevrbdebugger.rc +rcdir = $(kde_datadir)/kdevrbdebugger +rc_DATA = kdevrbdebugger.rc noinst_HEADERS = rdbtable.h diff --git a/languages/ruby/debugger/debuggerpart.cpp b/languages/ruby/debugger/debuggerpart.cpp index 9d0c9767..35e6a2d2 100644 --- a/languages/ruby/debugger/debuggerpart.cpp +++ b/languages/ruby/debugger/debuggerpart.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include #include @@ -40,12 +40,12 @@ #include #include -#include "tdevcore.h" -#include "tdevproject.h" -#include "tdevmainwindow.h" -#include "tdevappfrontend.h" -#include "tdevpartcontroller.h" -#include "tdevdebugger.h" +#include "kdevcore.h" +#include "kdevproject.h" +#include "kdevmainwindow.h" +#include "kdevappfrontend.h" +#include "kdevpartcontroller.h" +#include "kdevdebugger.h" #include "domutil.h" #include "variablewidget.h" #include "rdbbreakpointwidget.h" @@ -61,25 +61,25 @@ #include -#include +#include #include namespace RDBDebugger { -static const TDevPluginInfo data("tdevrbdebugger"); +static const KDevPluginInfo data("kdevrbdebugger"); -typedef TDevGenericFactory RubyDebuggerFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevrbdebugger, RubyDebuggerFactory( data ) ) +typedef KDevGenericFactory RubyDebuggerFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevrbdebugger, RubyDebuggerFactory( data ) ) RubyDebuggerPart::RubyDebuggerPart( TQObject *parent, const char *name, const TQStringList & ) : - TDevPlugin( &data, parent, name ? name : "RubyDebuggerPart" ), + KDevPlugin( &data, parent, name ? name : "RubyDebuggerPart" ), controller(0) { // setObjId("RubyDebuggerInterface"); setInstance(RubyDebuggerFactory::instance()); - setXMLFile("tdevrbdebugger.rc"); + setXMLFile("kdevrbdebugger.rc"); m_debugger = new Debugger( partController() ); @@ -245,8 +245,8 @@ RubyDebuggerPart::RubyDebuggerPart( TQObject *parent, const char *name, const TQ connect( core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *)) ); - connect( core(), TQT_SIGNAL(stopButtonClicked(TDevPlugin*)), - this, TQT_SLOT(slotStop(TDevPlugin*)) ); + connect( core(), TQT_SIGNAL(stopButtonClicked(KDevPlugin*)), + this, TQT_SLOT(slotStop(KDevPlugin*)) ); connect( core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed()) ); @@ -616,7 +616,7 @@ void RubyDebuggerPart::slotRun() -void RubyDebuggerPart::slotStop(TDevPlugin* which) +void RubyDebuggerPart::slotStop(KDevPlugin* which) { if( which != 0 && which != this ) return; @@ -772,12 +772,12 @@ void RubyDebuggerPart::savePartialProjectSession(TQDomElement* el) } -TDevAppFrontend * RDBDebugger::RubyDebuggerPart::appFrontend( ) +KDevAppFrontend * RDBDebugger::RubyDebuggerPart::appFrontend( ) { - return extension("TDevelop/AppFrontend"); + return extension("TDevelop/AppFrontend"); } -TDevDebugger * RDBDebugger::RubyDebuggerPart::debugger() +KDevDebugger * RDBDebugger::RubyDebuggerPart::debugger() { return m_debugger; } diff --git a/languages/ruby/debugger/debuggerpart.h b/languages/ruby/debugger/debuggerpart.h index 9b554a8f..498a159e 100644 --- a/languages/ruby/debugger/debuggerpart.h +++ b/languages/ruby/debugger/debuggerpart.h @@ -21,8 +21,8 @@ #define _DEBUGGERPART_H_ #include -#include "tdevplugin.h" -#include "tdevcore.h" +#include "kdevplugin.h" +#include "kdevcore.h" namespace KParts { class Part; } @@ -31,8 +31,8 @@ class TQPopupMenu; class KDialogBase; class ProcessWidget; class ProcessLineMaker; -class TDevAppFrontend; -class TDevDebugger; +class KDevAppFrontend; +class KDevDebugger; namespace RDBDebugger { @@ -45,7 +45,7 @@ class DbgToolBar; class VariableWidget; class RDBOutputWidget; -class RubyDebuggerPart : public TDevPlugin +class RubyDebuggerPart : public KDevPlugin { Q_OBJECT @@ -68,7 +68,7 @@ private slots: void slotRun(); void slotStopDebugger(); - void slotStop(TDevPlugin* which = 0); + void slotStop(KDevPlugin* which = 0); void slotPause(); void slotRunToCursor(); void slotStepOver(); @@ -84,8 +84,8 @@ signals: void rubyInspect(const TQString&); private: - TDevAppFrontend *appFrontend(); - TDevDebugger *debugger(); + KDevAppFrontend *appFrontend(); + KDevDebugger *debugger(); bool startDebugger(); void setupController(); @@ -103,7 +103,7 @@ private: TQString m_contextIdent; TQCString m_drkonqi; - TDevDebugger *m_debugger; + KDevDebugger *m_debugger; }; } diff --git a/languages/ruby/debugger/kdevrbdebugger.desktop b/languages/ruby/debugger/kdevrbdebugger.desktop new file mode 100644 index 00000000..714b51a3 --- /dev/null +++ b/languages/ruby/debugger/kdevrbdebugger.desktop @@ -0,0 +1,73 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=This plugin provides a frontend for the source-level debugger for Ruby. +Comment[ca]=Aquest connector proveeix una interfície per a la depuració a nivell de codi per a Ruby. +Comment[da]=Dette plugin sørger for en grænseflade til Ruby kildekode-fejlretteren. +Comment[de]=Dieses Modul stellt eine Oberfläche für den Quelltext-Debugger für Ruby bereit. +Comment[el]=Αυτό το πρόσθετο προσφέρει ένα πρόγραμμα για τον αποσφαλματωτή πηγαίου κώδικα της γλώσσας Ruby. +Comment[es]=Este complemento proporciona un entorno para depurar código de Ruby. +Comment[et]=See plugin pakub Ruby lähtekoodi siluri kasutajaliidest. +Comment[eu]=Plugin honek Ruby-ren iturburu-mailako araztailearen interfaze bat bat eskeintzen du. +Comment[fa]=این وصله، یک پایانه برای اشکال‌زدای سطح منبع رابی فراهم می‌کند. +Comment[fr]=Ce module externe fournit une interface pour le débogueur au niveau source pour Ruby. +Comment[gl]=Esta extensión proporciona un frontal para o depurador a nivel de código de Ruby. +Comment[hu]=Ez a bővítőmodul grafikus felületet biztosít a Ruby forrásszintű nyomkövetőjének használatához. +Comment[it]=Questo plugin fornisce un'interfaccia per il debugger a livello sorgente di Ruby. +Comment[ja]=このプラグインは、Ruby のソースレベルデバッガのフロントエンドを提供します。 +Comment[nds]=Dit Moduul stellt en Böversiet för den Ruby-Borntextfehlersöker praat. +Comment[ne]=यो प्लगइनले रूबिका लागि स्रोत-तह डिबगरका लागि फ्रेन्टइन्ड प्रदान गर्दछ । +Comment[nl]=Deze plugin biedt een grafische schil voor de broncode-debugger voor Ruby. +Comment[pl]=Ta wtyczka udostępnia interfejs do debugera poziomu źródłowego dla języka Ruby. +Comment[pt]=Este 'plugin' oferece uma interface o depurador ao nível do código para Ruby. +Comment[pt_BR]=Este plug-in fornece uma interface para o depurador a nível de código para Ruby. +Comment[ru]=Этот модуль предоставляет интерфейс к отладчику исходного кода для Ruby. +Comment[sk]=Modul pre rozhranie debugera pre Ruby. +Comment[sr]=Овај прикључак обезбеђује интерфејс за исправљач на нивоу изворног кода за Ruby. +Comment[sr@Latn]=Ovaj priključak obezbeđuje interfejs za ispravljač na nivou izvornog koda za Ruby. +Comment[sv]=Insticksprogrammet tillhandahåller ett gränssnitt till källkodsavlusaren för Ruby. +Comment[tr]=Bu eklenti, Ruby için kaynak-düzeyi hata ayıklayıcıya bir önuç sağlar. +Comment[zh_CN]=此插件提供了一个 Ruby 的源代码级调试器的前端。 +Comment[zh_TW]=此外掛程式提供 Ruby 除錯器的前端介面。 +Name=KDevRbDebugger +Name[da]=TDevelop Ruby fejlretter +Name[nds]=Ruby-Fehlersöök för TDevelop +Name[pl]=KDevDebugerRb +Name[sk]=KDev Ruby debuger +Name[sv]=TDevelop Ruby-avlusare +Name[zh_TW]=TDevelop Ruby 除錯器 +GenericName=Ruby Debugger Frontend +GenericName[ca]=Interfície per al depurador Ruby +GenericName[da]=Ruby fejlretningsgrænseflade +GenericName[de]=Debugger-Oberfläche für Ruby +GenericName[el]=Πρόγραμμα αποσφαλματωτή Ruby +GenericName[es]=Interfaz para el depurador de Ruby +GenericName[et]=Ruby siluri kasutajaliides +GenericName[eu]=Ruby araztailearen interfazea +GenericName[fa]=پایانۀ اشکال‌زدای رابی +GenericName[fr]=Interface du débogueur pour Ruby +GenericName[gl]=Frontal do depurador Ruby +GenericName[hu]=Grafikus felület a Ruby nyomkövetőjéhez +GenericName[it]=Interfaccia di debug per Ruby +GenericName[ja]=Ruby デバッガフロントエンド +GenericName[nds]=Böversiet för den Ruby-Fehlersöker +GenericName[ne]=रूबि डिबगर फ्रेन्टइन्ड +GenericName[nl]=Grafische schil voor de Ruby-debugger +GenericName[pl]=Interfejs do debugera dla języka Ruby +GenericName[pt]=Interface de Depuração Ruby +GenericName[pt_BR]=Interface para o Depurador Ruby +GenericName[ru]=Интегрированный отладчик Ruby +GenericName[sk]=Ruby debuger rozhranie +GenericName[sr]=Интерфејс исправљача за Ruby +GenericName[sr@Latn]=Interfejs ispravljača za Ruby +GenericName[sv]=Gränssnitt för Ruby-avlusare +GenericName[tr]=Ruby Hata Ayıklayıcı Önucu +GenericName[zh_CN]=Ruby 调试器前端 +GenericName[zh_TW]=Ruby 除錯器前端介面 +Icon= +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevrbdebugger +X-TDevelop-Version=5 +X-TDevelop-Scope=Project +X-TDevelop-ProgrammingLanguages=Ruby +X-TDevelop-Properties=RubyDebugger diff --git a/languages/ruby/debugger/tdevrbdebugger.rc b/languages/ruby/debugger/kdevrbdebugger.rc similarity index 100% rename from languages/ruby/debugger/tdevrbdebugger.rc rename to languages/ruby/debugger/kdevrbdebugger.rc diff --git a/languages/ruby/debugger/tdevrbdebugger.desktop b/languages/ruby/debugger/tdevrbdebugger.desktop deleted file mode 100644 index 8b333642..00000000 --- a/languages/ruby/debugger/tdevrbdebugger.desktop +++ /dev/null @@ -1,73 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=This plugin provides a frontend for the source-level debugger for Ruby. -Comment[ca]=Aquest connector proveeix una interfície per a la depuració a nivell de codi per a Ruby. -Comment[da]=Dette plugin sørger for en grænseflade til Ruby kildekode-fejlretteren. -Comment[de]=Dieses Modul stellt eine Oberfläche für den Quelltext-Debugger für Ruby bereit. -Comment[el]=Αυτό το πρόσθετο προσφέρει ένα πρόγραμμα για τον αποσφαλματωτή πηγαίου κώδικα της γλώσσας Ruby. -Comment[es]=Este complemento proporciona un entorno para depurar código de Ruby. -Comment[et]=See plugin pakub Ruby lähtekoodi siluri kasutajaliidest. -Comment[eu]=Plugin honek Ruby-ren iturburu-mailako araztailearen interfaze bat bat eskeintzen du. -Comment[fa]=این وصله، یک پایانه برای اشکال‌زدای سطح منبع رابی فراهم می‌کند. -Comment[fr]=Ce module externe fournit une interface pour le débogueur au niveau source pour Ruby. -Comment[gl]=Esta extensión proporciona un frontal para o depurador a nivel de código de Ruby. -Comment[hu]=Ez a bővítőmodul grafikus felületet biztosít a Ruby forrásszintű nyomkövetőjének használatához. -Comment[it]=Questo plugin fornisce un'interfaccia per il debugger a livello sorgente di Ruby. -Comment[ja]=このプラグインは、Ruby のソースレベルデバッガのフロントエンドを提供します。 -Comment[nds]=Dit Moduul stellt en Böversiet för den Ruby-Borntextfehlersöker praat. -Comment[ne]=यो प्लगइनले रूबिका लागि स्रोत-तह डिबगरका लागि फ्रेन्टइन्ड प्रदान गर्दछ । -Comment[nl]=Deze plugin biedt een grafische schil voor de broncode-debugger voor Ruby. -Comment[pl]=Ta wtyczka udostępnia interfejs do debugera poziomu źródłowego dla języka Ruby. -Comment[pt]=Este 'plugin' oferece uma interface o depurador ao nível do código para Ruby. -Comment[pt_BR]=Este plug-in fornece uma interface para o depurador a nível de código para Ruby. -Comment[ru]=Этот модуль предоставляет интерфейс к отладчику исходного кода для Ruby. -Comment[sk]=Modul pre rozhranie debugera pre Ruby. -Comment[sr]=Овај прикључак обезбеђује интерфејс за исправљач на нивоу изворног кода за Ruby. -Comment[sr@Latn]=Ovaj priključak obezbeđuje interfejs za ispravljač na nivou izvornog koda za Ruby. -Comment[sv]=Insticksprogrammet tillhandahåller ett gränssnitt till källkodsavlusaren för Ruby. -Comment[tr]=Bu eklenti, Ruby için kaynak-düzeyi hata ayıklayıcıya bir önuç sağlar. -Comment[zh_CN]=此插件提供了一个 Ruby 的源代码级调试器的前端。 -Comment[zh_TW]=此外掛程式提供 Ruby 除錯器的前端介面。 -Name=KDevRbDebugger -Name[da]=TDevelop Ruby fejlretter -Name[nds]=Ruby-Fehlersöök för TDevelop -Name[pl]=KDevDebugerRb -Name[sk]=KDev Ruby debuger -Name[sv]=TDevelop Ruby-avlusare -Name[zh_TW]=TDevelop Ruby 除錯器 -GenericName=Ruby Debugger Frontend -GenericName[ca]=Interfície per al depurador Ruby -GenericName[da]=Ruby fejlretningsgrænseflade -GenericName[de]=Debugger-Oberfläche für Ruby -GenericName[el]=Πρόγραμμα αποσφαλματωτή Ruby -GenericName[es]=Interfaz para el depurador de Ruby -GenericName[et]=Ruby siluri kasutajaliides -GenericName[eu]=Ruby araztailearen interfazea -GenericName[fa]=پایانۀ اشکال‌زدای رابی -GenericName[fr]=Interface du débogueur pour Ruby -GenericName[gl]=Frontal do depurador Ruby -GenericName[hu]=Grafikus felület a Ruby nyomkövetőjéhez -GenericName[it]=Interfaccia di debug per Ruby -GenericName[ja]=Ruby デバッガフロントエンド -GenericName[nds]=Böversiet för den Ruby-Fehlersöker -GenericName[ne]=रूबि डिबगर फ्रेन्टइन्ड -GenericName[nl]=Grafische schil voor de Ruby-debugger -GenericName[pl]=Interfejs do debugera dla języka Ruby -GenericName[pt]=Interface de Depuração Ruby -GenericName[pt_BR]=Interface para o Depurador Ruby -GenericName[ru]=Интегрированный отладчик Ruby -GenericName[sk]=Ruby debuger rozhranie -GenericName[sr]=Интерфејс исправљача за Ruby -GenericName[sr@Latn]=Interfejs ispravljača za Ruby -GenericName[sv]=Gränssnitt för Ruby-avlusare -GenericName[tr]=Ruby Hata Ayıklayıcı Önucu -GenericName[zh_CN]=Ruby 调试器前端 -GenericName[zh_TW]=Ruby 除錯器前端介面 -Icon= -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevrbdebugger -X-TDevelop-Version=5 -X-TDevelop-Scope=Project -X-TDevelop-ProgrammingLanguages=Ruby -X-TDevelop-Properties=RubyDebugger diff --git a/languages/ruby/doc/CMakeLists.txt b/languages/ruby/doc/CMakeLists.txt index 127248cd..781fa2ba 100644 --- a/languages/ruby/doc/CMakeLists.txt +++ b/languages/ruby/doc/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES ruby.toc ruby_bugs.toc qtruby.toc rails.toc - DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation/tocs ) + DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation/tocs ) diff --git a/languages/ruby/doc/Makefile.am b/languages/ruby/doc/Makefile.am index 38fd2b45..245b8fe5 100644 --- a/languages/ruby/doc/Makefile.am +++ b/languages/ruby/doc/Makefile.am @@ -1,4 +1,4 @@ -tocdir = ${kde_datadir}/tdevdocumentation/tocs +tocdir = ${kde_datadir}/kdevdocumentation/tocs toc_DATA = ruby.toc ruby_bugs.toc qtruby.toc rails.toc #indexdir = ${kde_datadir}/devdoctreeview/indices diff --git a/languages/ruby/file_templates/CMakeLists.txt b/languages/ruby/file_templates/CMakeLists.txt index ef75c4e1..617e829c 100644 --- a/languages/ruby/file_templates/CMakeLists.txt +++ b/languages/ruby/file_templates/CMakeLists.txt @@ -11,4 +11,4 @@ install( FILES rb rhtml rxml rjs js css html.erb xml.builder js.rjs - DESTINATION ${DATA_INSTALL_DIR}/tdevfilecreate/file-templates ) + DESTINATION ${DATA_INSTALL_DIR}/kdevfilecreate/file-templates ) diff --git a/languages/ruby/file_templates/Makefile.am b/languages/ruby/file_templates/Makefile.am index 591930a0..7b449085 100644 --- a/languages/ruby/file_templates/Makefile.am +++ b/languages/ruby/file_templates/Makefile.am @@ -1,4 +1,4 @@ -templatedir = $(kde_datadir)/tdevfilecreate/file-templates +templatedir = $(kde_datadir)/kdevfilecreate/file-templates template_DATA = rb rhtml rxml rjs js css html.erb xml.builder js.rjs diff --git a/languages/ruby/kdevrubysupport.desktop b/languages/ruby/kdevrubysupport.desktop new file mode 100644 index 00000000..9b5c6771 --- /dev/null +++ b/languages/ruby/kdevrubysupport.desktop @@ -0,0 +1,84 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Ruby Support +Comment[ca]=Suport per a Ruby +Comment[da]=Ruby-understøttelse +Comment[de]=Ruby-Unterstützung für TDevelop +Comment[el]=Υποστήριξη Ruby +Comment[es]=Soporte para Ruby +Comment[et]=Ruby toetus +Comment[eu]=Ruby euskarria +Comment[fa]=پشتیبانی رابی +Comment[fr]=Prise en charge du langage Ruby +Comment[ga]=Tacaíocht Ruby +Comment[gl]=Soporte para Ruby +Comment[hi]=रूबी समर्थन +Comment[hu]=Ruby-támogatás +Comment[is]=Ruby stuðningur +Comment[it]=Supporto per Ruby +Comment[ja]=Ruby サポート +Comment[nds]=Ünnerstütten för Ruby +Comment[ne]=रूबि समर्थन +Comment[nl]=Ondersteuning voor Ruby +Comment[pl]=Obsługa: Ruby +Comment[pt]=Suporte a Ruby +Comment[pt_BR]=Suporte ao Ruby +Comment[ru]=Поддержка языка Ruby +Comment[sk]=Ruby podpora +Comment[sl]=Podpora za Ruby +Comment[sr]=Подршка за Ruby +Comment[sr@Latn]=Podrška za Ruby +Comment[sv]=Ruby-stöd +Comment[ta]=ருபி ஆதரவு +Comment[tg]=Ёрӣ намудани забони Ruby +Comment[tr]=Ruby Desteği +Comment[zh_CN]=Ruby 支持 +Comment[zh_TW]=Ruby 支援 +Name=KDevRubySupport +Name[da]=TDevelop Ruby-understøttelse +Name[de]=Unterstützung für Ruby (TDevelop) +Name[hi]=के-डेव-रूबी-समर्थन +Name[nds]=Ünnerstütten för Ruby (TDevelop) +Name[pl]=KDevObsługaRuby +Name[sk]=KDev Ruby podpora +Name[sv]=TDevelop Ruby-stöd +Name[ta]=கெடெவ் ருபி ஆதரவு +Name[zh_TW]=TDevelop Ruby 支援 +GenericName=Ruby Support +GenericName[ca]=Suport per a Ruby +GenericName[da]=Ruby-understøttelse +GenericName[de]=Unterstützung für Ruby +GenericName[el]=Υποστήριξη Ruby +GenericName[es]=Soporte para Ruby +GenericName[et]=Ruby toetus +GenericName[eu]=Ruby euskarria +GenericName[fa]=پشتیبانی رابی +GenericName[fr]=Prise en charge du langage Ruby +GenericName[ga]=Tacaíocht Ruby +GenericName[gl]=Soporte para Ruby +GenericName[hi]=रूबी समर्थन +GenericName[hu]=Ruby-támogatás +GenericName[it]=Supporto a Ruby +GenericName[ja]=Ruby サポート +GenericName[nds]=Ünnerstütten för Ruby +GenericName[ne]=रूबि समर्थन +GenericName[nl]=Ondersteuning voor Ruby +GenericName[pl]=Obsługa: Ruby +GenericName[pt]=Suporte a Ruby +GenericName[pt_BR]=Suporte ao Ruby +GenericName[ru]=Поддержка языка Ruby +GenericName[sk]=Ruby podpora +GenericName[sl]=Podpora za Ruby +GenericName[sr]=Подршка за Ruby +GenericName[sr@Latn]=Podrška za Ruby +GenericName[sv]=Ruby-stöd +GenericName[ta]=ருபி ஆதரவு +GenericName[tg]=Ёрӣ намудани забони Ruby +GenericName[tr]=Ruby Desteği +GenericName[zh_CN]=Ruby 支持 +GenericName[zh_TW]=Ruby 支援 +ServiceTypes=TDevelop/LanguageSupport +X-TDE-Library=libkdevrubysupport +X-TDevelop-Version=5 +X-TDevelop-Language=Ruby diff --git a/languages/ruby/tdevrubysupport.rc b/languages/ruby/kdevrubysupport.rc similarity index 100% rename from languages/ruby/tdevrubysupport.rc rename to languages/ruby/kdevrubysupport.rc diff --git a/languages/ruby/qtdesignerrubyintegration.cpp b/languages/ruby/qtdesignerrubyintegration.cpp index 7172b9e0..bb9c0113 100644 --- a/languages/ruby/qtdesignerrubyintegration.cpp +++ b/languages/ruby/qtdesignerrubyintegration.cpp @@ -32,14 +32,14 @@ #include #include -#include -#include -#include +#include +#include +#include #include "codemodel_utils.h" #include "implementationwidget.h" -QtDesignerRubyIntegration::QtDesignerRubyIntegration(TDevLanguageSupport *part, +QtDesignerRubyIntegration::QtDesignerRubyIntegration(KDevLanguageSupport *part, ImplementationWidget *impl) :QtDesignerIntegration(part, impl, false, 0) { diff --git a/languages/ruby/qtdesignerrubyintegration.h b/languages/ruby/qtdesignerrubyintegration.h index 91776afa..38722167 100644 --- a/languages/ruby/qtdesignerrubyintegration.h +++ b/languages/ruby/qtdesignerrubyintegration.h @@ -27,7 +27,7 @@ class QtDesignerRubyIntegration : public QtDesignerIntegration Q_OBJECT public: - QtDesignerRubyIntegration(TDevLanguageSupport *part, ImplementationWidget *impl); + QtDesignerRubyIntegration(KDevLanguageSupport *part, ImplementationWidget *impl); protected: void addFunctionToClass(KInterfaceDesigner::Function function, ClassDom klass); diff --git a/languages/ruby/rubyimplementationwidget.cpp b/languages/ruby/rubyimplementationwidget.cpp index 9a7cde7a..ba371526 100644 --- a/languages/ruby/rubyimplementationwidget.cpp +++ b/languages/ruby/rubyimplementationwidget.cpp @@ -30,10 +30,10 @@ #include #include -#include -#include +#include +#include -RubyImplementationWidget::RubyImplementationWidget(TDevLanguageSupport* part, +RubyImplementationWidget::RubyImplementationWidget(KDevLanguageSupport* part, TQWidget* parent, const char* name, bool modal) :ImplementationWidget(part, parent, name, modal) { diff --git a/languages/ruby/rubyimplementationwidget.h b/languages/ruby/rubyimplementationwidget.h index dac75fb1..a5d8e491 100644 --- a/languages/ruby/rubyimplementationwidget.h +++ b/languages/ruby/rubyimplementationwidget.h @@ -26,7 +26,7 @@ class RubyImplementationWidget : public ImplementationWidget { Q_OBJECT public: - RubyImplementationWidget(TDevLanguageSupport* part, TQWidget* parent = 0, + RubyImplementationWidget(KDevLanguageSupport* part, TQWidget* parent = 0, const char* name = 0, bool modal = true); virtual TQStringList createClassFiles(); diff --git a/languages/ruby/rubysupport_part.cpp b/languages/ruby/rubysupport_part.cpp index 915d12a1..e1745a02 100644 --- a/languages/ruby/rubysupport_part.cpp +++ b/languages/ruby/rubysupport_part.cpp @@ -5,15 +5,15 @@ #include "qtdesignerrubyintegration.h" #include "rubyimplementationwidget.h" -#include "tdevcore.h" -#include "tdevmainwindow.h" -#include "tdevlanguagesupport.h" -#include "tdevpartcontroller.h" -#include "tdevproject.h" -#include "tdevappfrontend.h" -#include "tdevplugininfo.h" -#include "tdevshellwidget.h" -#include "tdevquickopen.h" +#include "kdevcore.h" +#include "kdevmainwindow.h" +#include "kdevlanguagesupport.h" +#include "kdevpartcontroller.h" +#include "kdevproject.h" +#include "kdevappfrontend.h" +#include "kdevplugininfo.h" +#include "kdevshellwidget.h" +#include "kdevquickopen.h" #include #include @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include #include @@ -37,15 +37,15 @@ #include -typedef TDevGenericFactory RubySupportFactory; -static const TDevPluginInfo data("tdevrubysupport"); -K_EXPORT_COMPONENT_FACTORY( libtdevrubysupport, RubySupportFactory( data ) ) +typedef KDevGenericFactory RubySupportFactory; +static const KDevPluginInfo data("kdevrubysupport"); +K_EXPORT_COMPONENT_FACTORY( libkdevrubysupport, RubySupportFactory( data ) ) RubySupportPart::RubySupportPart(TQObject *parent, const char *name, const TQStringList& ) - : TDevLanguageSupport (&data, parent, name ? name : "RubySupportPart" ) + : KDevLanguageSupport (&data, parent, name ? name : "RubySupportPart" ) { setInstance(RubySupportFactory::instance()); - setXMLFile("tdevrubysupport.rc"); + setXMLFile("kdevrubysupport.rc"); TDEAction *action; action = new TDEAction( i18n("&Run"), "exec", SHIFT + Key_F9, @@ -72,7 +72,7 @@ RubySupportPart::RubySupportPart(TQObject *parent, const char *name, const TQStr kdDebug() << "Creating RubySupportPart" << endl; - m_shellWidget = new TDevShellWidget( 0, "irb console"); + m_shellWidget = new KDevShellWidget( 0, "irb console"); m_shellWidget->setIcon( SmallIcon("ruby_config.png", TDEIcon::SizeMedium, TDEIcon::DefaultState, RubySupportPart::instance())); m_shellWidget->setCaption(i18n("Ruby Shell")); mainWindow()->embedOutputView( m_shellWidget, i18n("Ruby Shell"), i18n("Ruby Shell")); @@ -127,7 +127,7 @@ void RubySupportPart::projectOpened() TQFileInfo server(project()->projectDirectory() + "/script/server"); if (! server.exists()) { cmd += "rails " + project()->projectDirectory(); - if (TDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) + if (KDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) appFrontend->startAppCommand(project()->projectDirectory(), cmd, false); } } @@ -211,7 +211,7 @@ void RubySupportPart::savedFile(const KURL &fileName) } } -TDevLanguageSupport::Features RubySupportPart::features() +KDevLanguageSupport::Features RubySupportPart::features() { return Features(Classes | Functions | Variables | Declarations | Signals | Slots); } @@ -528,7 +528,7 @@ void RubySupportPart::slotRun () // Starting WEBrick for a Rails app. Translate a SIGTERM signal sent by KDevelop // to a SIGINT expected by WEBrick (ie control&c) to terminate it. cmd += "script/server& \n trap \"kill -s SIGINT $!\" TERM \n wait \n exit 0"; - if (TDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) + if (KDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) appFrontend->startAppCommand(project()->projectDirectory(), cmd, false); } else { TQString cmd = TQString("%1 -K%2 -C\"%3\" -I\"%4\" \"%5\" %6") @@ -613,7 +613,7 @@ TQString RubySupportPart::characterCoding() { void RubySupportPart::startApplication(const TQString &program) { bool inTerminal = DomUtil::readBoolEntry(*projectDom(), "/kdevrubysupport/run/terminal"); - if (TDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) + if (KDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) appFrontend->startAppCommand(TQString(), program, inTerminal); } @@ -627,9 +627,9 @@ KMimeType::List RubySupportPart::mimeTypes( ) return list; } -TDevDesignerIntegration *RubySupportPart::designer(KInterfaceDesigner::DesignerType type) +KDevDesignerIntegration *RubySupportPart::designer(KInterfaceDesigner::DesignerType type) { - TDevDesignerIntegration *des = 0; + KDevDesignerIntegration *des = 0; switch (type) { case KInterfaceDesigner::TQtDesigner: @@ -651,7 +651,7 @@ TDevDesignerIntegration *RubySupportPart::designer(KInterfaceDesigner::DesignerT void RubySupportPart::projectClosed( ) { - for (TQMap::const_iterator it = m_designers.begin(); + for (TQMap::const_iterator it = m_designers.begin(); it != m_designers.end(); ++it) { kdDebug() << "calling save settings fro designer integration" << endl; @@ -669,7 +669,7 @@ void RubySupportPart::contextMenu( TQPopupMenu * popup, const Context * context { m_contextFileName = url.fileName(); int id = popup->insertItem(i18n("Create or Select Implementation..."), this, TQT_SLOT(slotCreateSubclass())); - popup->setWhatsThis(id, i18n("Create or select implementation

    Creates or selects a subclass of selected form for use with integrated TDevDesigner.")); + popup->setWhatsThis(id, i18n("Create or select implementation

    Creates or selects a subclass of selected form for use with integrated KDevDesigner.")); } } } diff --git a/languages/ruby/rubysupport_part.h b/languages/ruby/rubysupport_part.h index c0bfc36e..024eae60 100644 --- a/languages/ruby/rubysupport_part.h +++ b/languages/ruby/rubysupport_part.h @@ -3,19 +3,19 @@ */ -#ifndef __TDEVPART_RUBYSUPPORT_H__ -#define __TDEVPART_RUBYSUPPORT_H__ +#ifndef __KDEVPART_RUBYSUPPORT_H__ +#define __KDEVPART_RUBYSUPPORT_H__ #include -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" class KDialogBase; class TQPopupMenu; class Context; -class TDevShellWidget; +class KDevShellWidget; -class RubySupportPart : public TDevLanguageSupport +class RubySupportPart : public KDevLanguageSupport { Q_OBJECT @@ -25,7 +25,7 @@ public: RubySupportPart(TQObject *parent, const char *name, const TQStringList &); virtual ~RubySupportPart(); - virtual TDevDesignerIntegration *designer(KInterfaceDesigner::DesignerType type); + virtual KDevDesignerIntegration *designer(KInterfaceDesigner::DesignerType type); protected: virtual Features features(); @@ -63,12 +63,12 @@ private: void maybeParse(const TQString fileName); void parse(const TQString &fileName); - TQMap m_designers; + TQMap m_designers; TQString m_contextFileName; TQCString m_shell; - TQGuardedPtr m_shellWidget; + TQGuardedPtr m_shellWidget; }; diff --git a/languages/ruby/tdevrubysupport.desktop b/languages/ruby/tdevrubysupport.desktop deleted file mode 100644 index 1a507ffd..00000000 --- a/languages/ruby/tdevrubysupport.desktop +++ /dev/null @@ -1,84 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Ruby Support -Comment[ca]=Suport per a Ruby -Comment[da]=Ruby-understøttelse -Comment[de]=Ruby-Unterstützung für TDevelop -Comment[el]=Υποστήριξη Ruby -Comment[es]=Soporte para Ruby -Comment[et]=Ruby toetus -Comment[eu]=Ruby euskarria -Comment[fa]=پشتیبانی رابی -Comment[fr]=Prise en charge du langage Ruby -Comment[ga]=Tacaíocht Ruby -Comment[gl]=Soporte para Ruby -Comment[hi]=रूबी समर्थन -Comment[hu]=Ruby-támogatás -Comment[is]=Ruby stuðningur -Comment[it]=Supporto per Ruby -Comment[ja]=Ruby サポート -Comment[nds]=Ünnerstütten för Ruby -Comment[ne]=रूबि समर्थन -Comment[nl]=Ondersteuning voor Ruby -Comment[pl]=Obsługa: Ruby -Comment[pt]=Suporte a Ruby -Comment[pt_BR]=Suporte ao Ruby -Comment[ru]=Поддержка языка Ruby -Comment[sk]=Ruby podpora -Comment[sl]=Podpora za Ruby -Comment[sr]=Подршка за Ruby -Comment[sr@Latn]=Podrška za Ruby -Comment[sv]=Ruby-stöd -Comment[ta]=ருபி ஆதரவு -Comment[tg]=Ёрӣ намудани забони Ruby -Comment[tr]=Ruby Desteği -Comment[zh_CN]=Ruby 支持 -Comment[zh_TW]=Ruby 支援 -Name=KDevRubySupport -Name[da]=TDevelop Ruby-understøttelse -Name[de]=Unterstützung für Ruby (TDevelop) -Name[hi]=के-डेव-रूबी-समर्थन -Name[nds]=Ünnerstütten för Ruby (TDevelop) -Name[pl]=KDevObsługaRuby -Name[sk]=KDev Ruby podpora -Name[sv]=TDevelop Ruby-stöd -Name[ta]=கெடெவ் ருபி ஆதரவு -Name[zh_TW]=TDevelop Ruby 支援 -GenericName=Ruby Support -GenericName[ca]=Suport per a Ruby -GenericName[da]=Ruby-understøttelse -GenericName[de]=Unterstützung für Ruby -GenericName[el]=Υποστήριξη Ruby -GenericName[es]=Soporte para Ruby -GenericName[et]=Ruby toetus -GenericName[eu]=Ruby euskarria -GenericName[fa]=پشتیبانی رابی -GenericName[fr]=Prise en charge du langage Ruby -GenericName[ga]=Tacaíocht Ruby -GenericName[gl]=Soporte para Ruby -GenericName[hi]=रूबी समर्थन -GenericName[hu]=Ruby-támogatás -GenericName[it]=Supporto a Ruby -GenericName[ja]=Ruby サポート -GenericName[nds]=Ünnerstütten för Ruby -GenericName[ne]=रूबि समर्थन -GenericName[nl]=Ondersteuning voor Ruby -GenericName[pl]=Obsługa: Ruby -GenericName[pt]=Suporte a Ruby -GenericName[pt_BR]=Suporte ao Ruby -GenericName[ru]=Поддержка языка Ruby -GenericName[sk]=Ruby podpora -GenericName[sl]=Podpora za Ruby -GenericName[sr]=Подршка за Ruby -GenericName[sr@Latn]=Podrška za Ruby -GenericName[sv]=Ruby-stöd -GenericName[ta]=ருபி ஆதரவு -GenericName[tg]=Ёрӣ намудани забони Ruby -GenericName[tr]=Ruby Desteği -GenericName[zh_CN]=Ruby 支持 -GenericName[zh_TW]=Ruby 支援 -ServiceTypes=TDevelop/LanguageSupport -X-TDE-Library=libtdevrubysupport -X-TDevelop-Version=5 -X-TDevelop-Language=Ruby diff --git a/languages/sql/CMakeLists.txt b/languages/sql/CMakeLists.txt index 67d5aef5..8e7d41cc 100644 --- a/languages/sql/CMakeLists.txt +++ b/languages/sql/CMakeLists.txt @@ -30,13 +30,13 @@ link_directories( ##### other data ################################ -install( FILES tdevsqlsupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevsqlsupport.rc DESTINATION ${DATA_INSTALL_DIR}/tdevsqlsupport ) +install( FILES kdevsqlsupport.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevsqlsupport.rc DESTINATION ${DATA_INSTALL_DIR}/kdevsqlsupport ) -##### libtdevsqlsupport (module) ################ +##### libkdevsqlsupport (module) ################ -tde_add_kpart( libtdevsqlsupport AUTOMOC +tde_add_kpart( libkdevsqlsupport AUTOMOC SOURCES sqlconfigwidget.ui sqlsupport_part.cpp sqlactions.cpp sqloutputwidget.cpp diff --git a/languages/sql/Makefile.am b/languages/sql/Makefile.am index eb48a72f..ba410a98 100644 --- a/languages/sql/Makefile.am +++ b/languages/sql/Makefile.am @@ -5,16 +5,16 @@ INCLUDES = -I$(top_srcdir)/lib/compat -I$(top_srcdir)/lib/interfaces \ $(all_includes) SUBDIRS = app_templates doc -kde_module_LTLIBRARIES = libtdevsqlsupport.la -libtdevsqlsupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevsqlsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevsqlsupport.la +libkdevsqlsupport_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevsqlsupport_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevsqlsupport_la_SOURCES = sqlconfigwidget.ui sqlsupport_part.cpp sqlactions.cpp sqloutputwidget.cpp +libkdevsqlsupport_la_SOURCES = sqlconfigwidget.ui sqlsupport_part.cpp sqlactions.cpp sqloutputwidget.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevsqlsupport.desktop +service_DATA = kdevsqlsupport.desktop -rcdir = $(kde_datadir)/tdevsqlsupport -rc_DATA = tdevsqlsupport.rc +rcdir = $(kde_datadir)/kdevsqlsupport +rc_DATA = kdevsqlsupport.rc diff --git a/languages/sql/app_templates/sqlsimple/CMakeLists.txt b/languages/sql/app_templates/sqlsimple/CMakeLists.txt index 290dd962..05ddb17f 100644 --- a/languages/sql/app_templates/sqlsimple/CMakeLists.txt +++ b/languages/sql/app_templates/sqlsimple/CMakeLists.txt @@ -17,9 +17,9 @@ add_custom_target( sqlsimple.tar.gz ALL install( FILES ${CMAKE_CURRENT_BINARY_DIR}/sqlsimple.tar.gz sqlsimple.png - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) install( FILES - sqlsimple.tdevtemplate - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/templates ) + sqlsimple.kdevtemplate + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/templates ) diff --git a/languages/sql/app_templates/sqlsimple/Makefile.am b/languages/sql/app_templates/sqlsimple/Makefile.am index 1b49cc21..6bfae1c4 100644 --- a/languages/sql/app_templates/sqlsimple/Makefile.am +++ b/languages/sql/app_templates/sqlsimple/Makefile.am @@ -2,10 +2,10 @@ templateName = sqlsimple dataFiles = app.sql app.tdevelop ### no need to change below: -template_DATA = $(templateName).tdevtemplate +template_DATA = $(templateName).kdevtemplate templatedir = ${appwizarddatadir}/templates -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard $(templateName).tar.gz: ${dataFiles} $(TAR) -cf $(templateName).tar -C $(srcdir) ${dataFiles} $(GZIP_COMMAND) -f9 $(templateName).tar diff --git a/languages/sql/app_templates/sqlsimple/app.tdevelop b/languages/sql/app_templates/sqlsimple/app.tdevelop index 6977b304..7fc4efc9 100644 --- a/languages/sql/app_templates/sqlsimple/app.tdevelop +++ b/languages/sql/app_templates/sqlsimple/app.tdevelop @@ -11,22 +11,22 @@ KDevdistpart - TDevDebugger + KDevDebugger - + src *.sql *~ - - + + - - + + ada ada_bugs_gcc @@ -75,10 +75,10 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/languages/sql/app_templates/sqlsimple/sqlsimple.tdevtemplate b/languages/sql/app_templates/sqlsimple/sqlsimple.kdevtemplate similarity index 100% rename from languages/sql/app_templates/sqlsimple/sqlsimple.tdevtemplate rename to languages/sql/app_templates/sqlsimple/sqlsimple.kdevtemplate diff --git a/languages/sql/doc/Makefile.am b/languages/sql/doc/Makefile.am index f6fd6d52..d42aec82 100644 --- a/languages/sql/doc/Makefile.am +++ b/languages/sql/doc/Makefile.am @@ -1,4 +1,4 @@ -#tocdir = ${kde_datadir}/tdevdoctreeview/tocs +#tocdir = ${kde_datadir}/kdevdoctreeview/tocs #toc_DATA = #indexdir = ${kde_datadir}/devdoctreeview/indices diff --git a/languages/sql/kdevsqlsupport.desktop b/languages/sql/kdevsqlsupport.desktop new file mode 100644 index 00000000..f5ee67ab --- /dev/null +++ b/languages/sql/kdevsqlsupport.desktop @@ -0,0 +1,85 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=SQL Support +Comment[ca]=Suport per a SQL +Comment[da]=SQL-understøttelse +Comment[de]=Unterstützung für SQL +Comment[el]=Υποστήριξη SQL +Comment[es]=Soporte para SQL +Comment[et]=SQL toetus +Comment[eu]=SQL euskarria +Comment[fa]=پشتیبانی SQL +Comment[fr]=Prise en charge du langage SQL +Comment[ga]=Tacaíocht SQL +Comment[gl]=Soporte para SQL +Comment[hi]=एसक्यूएल समर्थन +Comment[hu]=SQL-támogatás +Comment[is]=SQL stuðningur +Comment[it]=Supporto SQL +Comment[ja]=SQL サポート +Comment[nds]=SQL-Ünnerstütten +Comment[ne]=SQL समर्थन +Comment[nl]=Ondersteuning voor SQL +Comment[pl]=Obsługa SQL-a +Comment[pt]=Suporte a SQL +Comment[pt_BR]=Suporte ao SQL +Comment[ru]=Поддержка языка SQL +Comment[sk]=SQL podpora +Comment[sl]=Podpora za SQL +Comment[sr]=Подршка за SQL +Comment[sr@Latn]=Podrška za SQL +Comment[sv]=SQL-stöd +Comment[ta]=SQL ஆதரவு +Comment[tg]=Ёрӣ намудани забони SQL +Comment[tr]=SQL Desteği +Comment[zh_CN]=SQL 语言支持 +Comment[zh_TW]=SQL 支援 +Name=KDevSQLSupport +Name[da]=TDevelop SQL-understøttelse +Name[de]=Unterstützung für SQL (TDevelop) +Name[hi]=के-डेव-एसक्यूएल-समर्थन +Name[nds]=SQL-Ünnerstütten för TDevelop +Name[pl]=KDevObsługaSQL +Name[sk]=KDev SQL podpora +Name[sv]=TDevelop SQL-stöd +Name[ta]=கெடெவ் எஸ்கியேல் ஆதரவு +Name[zh_TW]=TDevelop SQL 支援 +GenericName=SQL Support +GenericName[ca]=Suport per a SQL +GenericName[da]=SQL-understøttelse +GenericName[de]=Unterstützung für SQL +GenericName[el]=Υποστήριξη SQL +GenericName[es]=Soporte para SQL +GenericName[et]=SQL toetus +GenericName[eu]=SQL euskarria +GenericName[fa]=پشتیبانی SQL +GenericName[fr]=Langage SQL +GenericName[ga]=Tacaíocht SQL +GenericName[gl]=Soporte para SQL +GenericName[hi]=एसक्यूएल समर्थन +GenericName[hu]=SQL-támogatás +GenericName[it]=Supporto SQL +GenericName[ja]=SQL サポート +GenericName[nds]=SQL-Ünnerstütten +GenericName[ne]=SQL समर्थन +GenericName[nl]=Ondersteuning voor SQL +GenericName[pl]=Obsługa SQL-a +GenericName[pt]=Suporte a SQL +GenericName[pt_BR]=Suporte ao SQL +GenericName[ru]=Поддержка языка SQL +GenericName[sk]=SQL podpora +GenericName[sl]=Podpora za SQL +GenericName[sr]=Подршка за SQL +GenericName[sr@Latn]=Podrška za SQL +GenericName[sv]=SQL-stöd +GenericName[ta]=SQL ஆதரவு +GenericName[tg]=Ёрӣ намудани забони SQL +GenericName[tr]=SQL Desteği +GenericName[zh_CN]=SQL 支持 +GenericName[zh_TW]=SQL 支援 +ServiceTypes=TDevelop/LanguageSupport +X-TDE-Library=libkdevsqlsupport +X-TDevelop-Version=5 +X-TDevelop-Language=SQL +X-TDevelop-Args=SQL diff --git a/languages/sql/tdevsqlsupport.rc b/languages/sql/kdevsqlsupport.rc similarity index 100% rename from languages/sql/tdevsqlsupport.rc rename to languages/sql/kdevsqlsupport.rc diff --git a/languages/sql/sqlactions.cpp b/languages/sql/sqlactions.cpp index f737b694..1d1a5b14 100644 --- a/languages/sql/sqlactions.cpp +++ b/languages/sql/sqlactions.cpp @@ -21,8 +21,8 @@ #include #include -#include "tdevplugin.h" -#include "tdevlanguagesupport.h" +#include "kdevplugin.h" +#include "kdevlanguagesupport.h" #include "sqlsupport_part.h" SqlListAction::SqlListAction(SQLSupportPart *part, const TQString &text, diff --git a/languages/sql/sqlconfigwidget.ui.h b/languages/sql/sqlconfigwidget.ui.h index e58930f9..c06413e7 100644 --- a/languages/sql/sqlconfigwidget.ui.h +++ b/languages/sql/sqlconfigwidget.ui.h @@ -195,7 +195,7 @@ void SqlConfigWidget::accept() { Q_ASSERT( doc ); - TQDomElement dbElem = DomUtil::createElementByPath( *doc, "/tdevsqlsupport/servers" ); + TQDomElement dbElem = DomUtil::createElementByPath( *doc, "/kdevsqlsupport/servers" ); DomUtil::makeEmpty( dbElem ); for ( int i = 0; i < dbTable->numRows() - 1; i++ ) { @@ -206,7 +206,7 @@ void SqlConfigWidget::accept() << SQLSupportPart::cryptStr( ((PasswordTableItem*)dbTable->item( i, 5 ))->password ); DomUtil::writeListEntry( *doc, - "/tdevsqlsupport/servers/server" + TQString::number( i ), + "/kdevsqlsupport/servers/server" + TQString::number( i ), "el", db ); } if ( changed ) @@ -227,7 +227,7 @@ void SqlConfigWidget::loadConfig() TQStringList db; int i = 0; while ( true ) { - TQStringList db = DomUtil::readListEntry( *doc, "tdevsqlsupport/servers/server" + TQString::number( i ), "el" ); + TQStringList db = DomUtil::readListEntry( *doc, "kdevsqlsupport/servers/server" + TQString::number( i ), "el" ); if ( db.isEmpty() ) return; diff --git a/languages/sql/sqlsupport_part.cpp b/languages/sql/sqlsupport_part.cpp index c4d0a235..2ecb2ec4 100644 --- a/languages/sql/sqlsupport_part.cpp +++ b/languages/sql/sqlsupport_part.cpp @@ -8,7 +8,7 @@ #include #include #include -#include +#include #include #include #include @@ -16,28 +16,28 @@ #include #include -#include "tdevcore.h" -#include "tdevmainwindow.h" -#include "tdevlanguagesupport.h" -#include "tdevpartcontroller.h" -#include "tdevproject.h" +#include "kdevcore.h" +#include "kdevmainwindow.h" +#include "kdevlanguagesupport.h" +#include "kdevpartcontroller.h" +#include "kdevproject.h" #include "codemodel.h" -#include "tdevplugininfo.h" +#include "kdevplugininfo.h" #include "sqlconfigwidget.h" #include "sqlactions.h" #include "sqloutputwidget.h" #include "domutil.h" -typedef TDevGenericFactory SQLSupportFactory; -static const TDevPluginInfo data("tdevsqlsupport"); -K_EXPORT_COMPONENT_FACTORY( libtdevsqlsupport, SQLSupportFactory( data ) ) +typedef KDevGenericFactory SQLSupportFactory; +static const KDevPluginInfo data("kdevsqlsupport"); +K_EXPORT_COMPONENT_FACTORY( libkdevsqlsupport, SQLSupportFactory( data ) ) SQLSupportPart::SQLSupportPart( TQObject *parent, const char *name, const TQStringList& ) - : TDevLanguageSupport ( &data, parent, name ? name : "SQLSupportPart" ) + : KDevLanguageSupport ( &data, parent, name ? name : "SQLSupportPart" ) { setInstance( SQLSupportFactory::instance() ); - setXMLFile( "tdevsqlsupport.rc" ); + setXMLFile( "kdevsqlsupport.rc" ); TDEAction *action; action = new TDEAction( i18n( "&Run" ), "exec", Key_F9, this, TQT_SLOT( slotRun() ), actionCollection(), "build_execute" ); @@ -106,7 +106,7 @@ void SQLSupportPart::loadConfig() int i = 0; TQString conName; while ( true ) { - TQStringList sdb = DomUtil::readListEntry( *doc, "tdevsqlsupport/servers/server" + TQString::number( i ), "el" ); + TQStringList sdb = DomUtil::readListEntry( *doc, "kdevsqlsupport/servers/server" + TQString::number( i ), "el" ); if ( (int)sdb.size() < 6 ) break; @@ -267,7 +267,7 @@ void SQLSupportPart::savedFile( const KURL &fileName ) } } -TDevLanguageSupport::Features SQLSupportPart::features() +KDevLanguageSupport::Features SQLSupportPart::features() { return Features( Classes | Functions ); } diff --git a/languages/sql/sqlsupport_part.h b/languages/sql/sqlsupport_part.h index 4798d7fa..d5efca5b 100644 --- a/languages/sql/sqlsupport_part.h +++ b/languages/sql/sqlsupport_part.h @@ -1,5 +1,5 @@ -#ifndef __TDEVPART_SQLSUPPORT_H__ -#define __TDEVPART_SQLSUPPORT_H__ +#ifndef __KDEVPART_SQLSUPPORT_H__ +#define __KDEVPART_SQLSUPPORT_H__ #include #include @@ -7,14 +7,14 @@ #include #include -#include "tdevplugin.h" -#include "tdevlanguagesupport.h" +#include "kdevplugin.h" +#include "kdevlanguagesupport.h" class SqlListAction; class SqlOutputWidget; class CodeModel; -class SQLSupportPart : public TDevLanguageSupport +class SQLSupportPart : public KDevLanguageSupport { Q_OBJECT diff --git a/languages/sql/tdevsqlsupport.desktop b/languages/sql/tdevsqlsupport.desktop deleted file mode 100644 index 5357d127..00000000 --- a/languages/sql/tdevsqlsupport.desktop +++ /dev/null @@ -1,85 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=SQL Support -Comment[ca]=Suport per a SQL -Comment[da]=SQL-understøttelse -Comment[de]=Unterstützung für SQL -Comment[el]=Υποστήριξη SQL -Comment[es]=Soporte para SQL -Comment[et]=SQL toetus -Comment[eu]=SQL euskarria -Comment[fa]=پشتیبانی SQL -Comment[fr]=Prise en charge du langage SQL -Comment[ga]=Tacaíocht SQL -Comment[gl]=Soporte para SQL -Comment[hi]=एसक्यूएल समर्थन -Comment[hu]=SQL-támogatás -Comment[is]=SQL stuðningur -Comment[it]=Supporto SQL -Comment[ja]=SQL サポート -Comment[nds]=SQL-Ünnerstütten -Comment[ne]=SQL समर्थन -Comment[nl]=Ondersteuning voor SQL -Comment[pl]=Obsługa SQL-a -Comment[pt]=Suporte a SQL -Comment[pt_BR]=Suporte ao SQL -Comment[ru]=Поддержка языка SQL -Comment[sk]=SQL podpora -Comment[sl]=Podpora za SQL -Comment[sr]=Подршка за SQL -Comment[sr@Latn]=Podrška za SQL -Comment[sv]=SQL-stöd -Comment[ta]=SQL ஆதரவு -Comment[tg]=Ёрӣ намудани забони SQL -Comment[tr]=SQL Desteği -Comment[zh_CN]=SQL 语言支持 -Comment[zh_TW]=SQL 支援 -Name=KDevSQLSupport -Name[da]=TDevelop SQL-understøttelse -Name[de]=Unterstützung für SQL (TDevelop) -Name[hi]=के-डेव-एसक्यूएल-समर्थन -Name[nds]=SQL-Ünnerstütten för TDevelop -Name[pl]=KDevObsługaSQL -Name[sk]=KDev SQL podpora -Name[sv]=TDevelop SQL-stöd -Name[ta]=கெடெவ் எஸ்கியேல் ஆதரவு -Name[zh_TW]=TDevelop SQL 支援 -GenericName=SQL Support -GenericName[ca]=Suport per a SQL -GenericName[da]=SQL-understøttelse -GenericName[de]=Unterstützung für SQL -GenericName[el]=Υποστήριξη SQL -GenericName[es]=Soporte para SQL -GenericName[et]=SQL toetus -GenericName[eu]=SQL euskarria -GenericName[fa]=پشتیبانی SQL -GenericName[fr]=Langage SQL -GenericName[ga]=Tacaíocht SQL -GenericName[gl]=Soporte para SQL -GenericName[hi]=एसक्यूएल समर्थन -GenericName[hu]=SQL-támogatás -GenericName[it]=Supporto SQL -GenericName[ja]=SQL サポート -GenericName[nds]=SQL-Ünnerstütten -GenericName[ne]=SQL समर्थन -GenericName[nl]=Ondersteuning voor SQL -GenericName[pl]=Obsługa SQL-a -GenericName[pt]=Suporte a SQL -GenericName[pt_BR]=Suporte ao SQL -GenericName[ru]=Поддержка языка SQL -GenericName[sk]=SQL podpora -GenericName[sl]=Podpora za SQL -GenericName[sr]=Подршка за SQL -GenericName[sr@Latn]=Podrška za SQL -GenericName[sv]=SQL-stöd -GenericName[ta]=SQL ஆதரவு -GenericName[tg]=Ёрӣ намудани забони SQL -GenericName[tr]=SQL Desteği -GenericName[zh_CN]=SQL 支持 -GenericName[zh_TW]=SQL 支援 -ServiceTypes=TDevelop/LanguageSupport -X-TDE-Library=libtdevsqlsupport -X-TDevelop-Version=5 -X-TDevelop-Language=SQL -X-TDevelop-Args=SQL diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index e9088337..0398ddf0 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -31,9 +31,9 @@ link_directories( tde_add_library( tdevelop SHARED SOURCES dummy.cpp VERSION 1.0.0 - EMBED tdevutil-static tdevinterfaces-static + EMBED kdevutil-static kdevinterfaces-static LINK - tdevpropertyeditor-shared + kdevpropertyeditor-shared tdescript-shared tdeparts-shared tdetexteditor-shared DESTINATION ${LIB_INSTALL_DIR} ) diff --git a/lib/Makefile.am b/lib/Makefile.am index 55b974c5..d590051e 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,4 +1,4 @@ -# Here resides the library of general TDevelop-related utilities, +# Here resides the library of general KDevelop-related utilities, # which may be linked by any plugin or part. This is installed # as a shared library, including header files @@ -6,11 +6,11 @@ INCLUDES = $(all_includes) lib_LTLIBRARIES = libtdevelop.la libtdevelop_la_LDFLAGS = -no-undefined $(all_libraries) -version-info 1:0 -libtdevelop_la_LIBADD = $(top_builddir)/lib/interfaces/libtdevinterfaces.la \ - $(top_builddir)/lib/widgets/propeditor/libtdevpropertyeditor.la $(LIB_TDEIO) +libtdevelop_la_LIBADD = $(top_builddir)/lib/interfaces/libkdevinterfaces.la \ + $(top_builddir)/lib/widgets/propeditor/libkdevpropertyeditor.la $(LIB_TDEIO) -# $(top_builddir)/lib/util/libtdevutil.la $(top_builddir)/lib/widgets/propeditor/libtdevpropertyeditor.la \ -# $(top_builddir)/lib/interfaces/external/libkinterfacedesigner.la $(top_builddir)/lib/interfaces/extensions/libtdevextensions.la \ +# $(top_builddir)/lib/util/libkdevutil.la $(top_builddir)/lib/widgets/propeditor/libkdevpropertyeditor.la \ +# $(top_builddir)/lib/interfaces/external/libkinterfacedesigner.la $(top_builddir)/lib/interfaces/extensions/libkdevextensions.la \ # -ltdetexteditor $(LIB_TDEPARTS) $(LIB_TDEIO) -ltdescript libtdevelop_la_SOURCES = dummy.cpp diff --git a/lib/catalog/CMakeLists.txt b/lib/catalog/CMakeLists.txt index 13b008d1..5c1b4f2b 100644 --- a/lib/catalog/CMakeLists.txt +++ b/lib/catalog/CMakeLists.txt @@ -28,9 +28,9 @@ install( FILES DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/catalog ) -##### tdevcatalog (shared) ###################### +##### kdevcatalog (shared) ###################### -tde_add_library( tdevcatalog SHARED AUTOMOC +tde_add_library( kdevcatalog SHARED AUTOMOC SOURCES tag.cpp catalog.cpp VERSION 0.0.0 LINK tdecore-shared ${BDB_LIBRARY} diff --git a/lib/catalog/Makefile.am b/lib/catalog/Makefile.am index e45a2530..c8c7ddc1 100644 --- a/lib/catalog/Makefile.am +++ b/lib/catalog/Makefile.am @@ -1,13 +1,13 @@ INCLUDES = $(all_includes) $(DB3INCLUDES) -lib_LTLIBRARIES = libtdevcatalog.la -libtdevcatalog_la_SOURCES = tag.cpp catalog.cpp -libtdevcatalog_la_LDFLAGS = -no-undefined $(all_libraries) $(DB3LDFLAGS) -libtdevcatalog_la_LIBADD = -l$(DB3LIB) $(LIB_TDECORE) $(LIB_QT) +lib_LTLIBRARIES = libkdevcatalog.la +libkdevcatalog_la_SOURCES = tag.cpp catalog.cpp +libkdevcatalog_la_LDFLAGS = -no-undefined $(all_libraries) $(DB3LDFLAGS) +libkdevcatalog_la_LIBADD = -l$(DB3LIB) $(LIB_TDECORE) $(LIB_QT) -tdevcatalogincludedir = $(includedir)/tdevelop/catalog -tdevcataloginclude_HEADERS = catalog.h tag.h +kdevcatalogincludedir = $(includedir)/tdevelop/catalog +kdevcataloginclude_HEADERS = catalog.h tag.h DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils DOXYGEN_PROJECTNAME = TDevelop Catalog Library -DOXYGEN_DOCDIRPREFIX = tdev +DOXYGEN_DOCDIRPREFIX = kdev include ../../Doxyfile.am diff --git a/lib/cppparser/CMakeLists.txt b/lib/cppparser/CMakeLists.txt index 20db36c5..3b53e900 100644 --- a/lib/cppparser/CMakeLists.txt +++ b/lib/cppparser/CMakeLists.txt @@ -31,13 +31,13 @@ install( FILES DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/cppparser ) -##### tdevcppparser (shared) #################### +##### kdevcppparser (shared) #################### -tde_add_library( tdevcppparser SHARED AUTOMOC +tde_add_library( kdevcppparser SHARED AUTOMOC SOURCES ast.cpp cachemanager.cpp driver.cpp errors.cpp lexer.cpp lexercache.cpp lookup.cpp parser.cpp tree_parser.cpp VERSION 0.0.0 - LINK tdevinterfaces-static tdeio-shared + LINK kdevinterfaces-static tdeio-shared DESTINATION ${LIB_INSTALL_DIR} ) diff --git a/lib/cppparser/Makefile.am b/lib/cppparser/Makefile.am index 082c8227..4e62cebf 100644 --- a/lib/cppparser/Makefile.am +++ b/lib/cppparser/Makefile.am @@ -1,11 +1,11 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces $(all_includes) AM_CXXFLAGS = -DKDEVELOP_BGPARSER -lib_LTLIBRARIES = libtdevcppparser.la -libtdevcppparser_la_LDFLAGS = $(all_libraries) -libtdevcppparser_la_LIBADD = $(LIB_QT) $(LIB_TDECORE) $(top_builddir)/lib/interfaces/libtdevinterfaces.la -lDCOP $(LIB_TDEUI) $(LIB_TDEPARTS) -ltdetexteditor $(LIB_TDEIO) -ltdescript -libtdevcppparser_la_SOURCES = ast.cpp cachemanager.cpp driver.cpp errors.cpp \ +lib_LTLIBRARIES = libkdevcppparser.la +libkdevcppparser_la_LDFLAGS = $(all_libraries) +libkdevcppparser_la_LIBADD = $(LIB_QT) $(LIB_TDECORE) $(top_builddir)/lib/interfaces/libkdevinterfaces.la -lDCOP $(LIB_TDEUI) $(LIB_TDEPARTS) -ltdetexteditor $(LIB_TDEIO) -ltdescript +libkdevcppparser_la_SOURCES = ast.cpp cachemanager.cpp driver.cpp errors.cpp \ lexer.cpp lexercache.cpp lookup.cpp parser.cpp tree_parser.cpp -tdevcppparserincludedir = $(includedir)/tdevelop/cppparser -tdevcppparserinclude_HEADERS = ast.h driver.h lexer.h parser.h tree_parser.h errors.h lookup.h cachemanager.h lexercache.h macro.h +kdevcppparserincludedir = $(includedir)/tdevelop/cppparser +kdevcppparserinclude_HEADERS = ast.h driver.h lexer.h parser.h tree_parser.h errors.h lookup.h cachemanager.h lexercache.h macro.h diff --git a/lib/cppparser/lexer.cpp b/lib/cppparser/lexer.cpp index 5f01a19e..5325c80f 100644 --- a/lib/cppparser/lexer.cpp +++ b/lib/cppparser/lexer.cpp @@ -30,7 +30,7 @@ #if defined( KDEVELOP_BGPARSER ) #include -class TDevTread: public TQThread +class KDevTread: public TQThread { public: static void yield() @@ -41,7 +41,7 @@ public: inline void qthread_yield() { - TDevTread::yield(); + KDevTread::yield(); } #endif diff --git a/lib/interfaces/CMakeLists.txt b/lib/interfaces/CMakeLists.txt index 47d6855d..94b07bec 100644 --- a/lib/interfaces/CMakeLists.txt +++ b/lib/interfaces/CMakeLists.txt @@ -27,12 +27,12 @@ include_directories( ##### headers ################################### install( FILES - tdevlanguagesupport.h tdevmainwindow.h tdevpartcontroller.h - tdevplugin.h tdevproject.h tdevcore.h tdevcoderepository.h + kdevlanguagesupport.h kdevmainwindow.h kdevpartcontroller.h + kdevplugin.h kdevproject.h kdevcore.h kdevcoderepository.h codemodel.h codemodel_utils.h codemodel_treeparser.h - tdevgenericfactory.h tdevapi.h tdevdesignerintegration.h - tdevplugincontroller.h tdevplugininfo.h TDevCoreIface.h - TDevPartControllerIface.h katedocumentmanagerinterface.h + kdevgenericfactory.h kdevapi.h kdevdesignerintegration.h + kdevplugincontroller.h kdevplugininfo.h KDevCoreIface.h + KDevPartControllerIface.h katedocumentmanagerinterface.h hashedstring.h DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/interfaces ) @@ -42,20 +42,20 @@ install( FILES DESTINATION ${SERVICETYPES_INSTALL_DIR} ) -##### tdevinterfaces (static) ################### +##### kdevinterfaces (static) ################### -tde_add_library( tdevinterfaces STATIC_PIC AUTOMOC +tde_add_library( kdevinterfaces STATIC_PIC AUTOMOC SOURCES - tdevcore.cpp tdevproject.cpp tdevlanguagesupport.cpp - tdevpartcontroller.cpp tdevapi.cpp TDevCoreIface.skel - tdevmainwindow.cpp TDevPartControllerIface.skel - tdevplugin.cpp tdevcoderepository.cpp + kdevcore.cpp kdevproject.cpp kdevlanguagesupport.cpp + kdevpartcontroller.cpp kdevapi.cpp KDevCoreIface.skel + kdevmainwindow.cpp KDevPartControllerIface.skel + kdevplugin.cpp kdevcoderepository.cpp codemodel.cpp codemodel_treeparser.cpp - codemodel_utils.cpp tdevdesignerintegration.cpp - tdevplugincontroller.cpp tdevplugininfo.cpp - TDevCoreIface.cpp TDevPartControllerIface.cpp + codemodel_utils.cpp kdevdesignerintegration.cpp + kdevplugincontroller.cpp kdevplugininfo.cpp + KDevCoreIface.cpp KDevPartControllerIface.cpp katedocumentmanagerinterface.cpp - katedocumentmanagerinterface.skel tdevprojectiface.cpp - tdevprojectiface.skel tdevdesignerintegrationiface.cpp - tdevdesignerintegrationiface.skel hashedstring.cpp + katedocumentmanagerinterface.skel kdevprojectiface.cpp + kdevprojectiface.skel kdevdesignerintegrationiface.cpp + kdevdesignerintegrationiface.skel hashedstring.cpp ) diff --git a/lib/interfaces/KDevCoreIface.cpp b/lib/interfaces/KDevCoreIface.cpp new file mode 100644 index 00000000..aa70e01b --- /dev/null +++ b/lib/interfaces/KDevCoreIface.cpp @@ -0,0 +1,59 @@ + + +/* This file is part of the KDE project + Copyright (C) 2001 Bernd Gehrmann + Copyright (C) 2001-2002 Matthias Hoelzer-Kluepfel + 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 +#include +#include "KDevCoreIface.h" +#include "kdevcore.h" + + +KDevCoreIface::KDevCoreIface(KDevCore *core) + : TQObject(core), DCOPObject("KDevCore"), m_core(core) +{ + connect( m_core, TQT_SIGNAL(projectOpened()), this, TQT_SLOT(forwardProjectOpened()) ); + connect( m_core, TQT_SIGNAL(projectClosed()), this, TQT_SLOT(forwardProjectClosed()) ); +} + + +KDevCoreIface::~KDevCoreIface() +{} + + +void KDevCoreIface::forwardProjectOpened() +{ + kdDebug(9000) << "dcop emitting project opened" << endl; + emitDCOPSignal("projectOpened()", TQByteArray()); +} + + +void KDevCoreIface::forwardProjectClosed() +{ + kdDebug(9000) << "dcop emitting project closed" << endl; + emitDCOPSignal("projectClosed()", TQByteArray()); +} + +void KDevCoreIface::openProject( const TQString & projectFileName ) +{ + m_core->openProject(projectFileName); +} + +#include "KDevCoreIface.moc" diff --git a/lib/interfaces/KDevCoreIface.h b/lib/interfaces/KDevCoreIface.h new file mode 100644 index 00000000..612c8457 --- /dev/null +++ b/lib/interfaces/KDevCoreIface.h @@ -0,0 +1,52 @@ +/* This file is part of the KDE project + Copyright (C) 2001 Bernd Gehrmann + Copyright (C) 2001-2002 Matthias Hoelzer-Kluepfel + 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 _KDEVCOREIFACE_H_ +#define _KDEVCOREIFACE_H_ + +#include +#include + +class KDevCore; + + +class KDevCoreIface : public TQObject, public DCOPObject +{ + Q_OBJECT +// + K_DCOP + +public: + + KDevCoreIface( KDevCore *core ); + ~KDevCoreIface(); + +k_dcop: + void openProject(const TQString& projectFileName); + +private slots: + void forwardProjectOpened(); + void forwardProjectClosed(); + +private: + KDevCore *m_core; +}; + +#endif diff --git a/lib/interfaces/KDevPartControllerIface.cpp b/lib/interfaces/KDevPartControllerIface.cpp new file mode 100644 index 00000000..1b184453 --- /dev/null +++ b/lib/interfaces/KDevPartControllerIface.cpp @@ -0,0 +1,95 @@ +/* This file is part of the KDE project + Copyright (C) 2002 Matthias Hoelzer-Kluepfel + + 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 +#include +#include + + +#include "KDevPartControllerIface.h" +#include "kdevpartcontroller.h" + + +KDevPartControllerIface::KDevPartControllerIface(KDevPartController *pc) + : TQObject(pc), DCOPObject("KDevPartController"), m_controller(pc) +{ + connect(pc, TQT_SIGNAL(loadedFile(const KURL &)), this, TQT_SLOT(forwardLoadedFile(const KURL &))); + connect(pc, TQT_SIGNAL(savedFile(const KURL &)), this, TQT_SLOT(forwardSavedFile(const KURL &))); + connect(pc, TQT_SIGNAL(closedFile(const KURL &)), this, TQT_SLOT(forwardClosedFile(const KURL &))); +} + + +KDevPartControllerIface::~KDevPartControllerIface() +{ +} + + +void KDevPartControllerIface::editDocument(const TQString &url, int lineNum) +{ + m_controller->editDocument(KURL(url), lineNum); +} + + +void KDevPartControllerIface::showDocument(const TQString &url, bool newWin) +{ + m_controller->showDocument(KURL(url), newWin); +} + + +void KDevPartControllerIface::saveAllFiles() +{ + m_controller->saveAllFiles(); +} + + +void KDevPartControllerIface::revertAllFiles() +{ + m_controller->revertAllFiles(); +} + + +void KDevPartControllerIface::forwardLoadedFile(const KURL &fileName) +{ + kdDebug(9000) << "dcop emitting loadedFile " << fileName << endl; + emitDCOPSignal("projectOpened()", TQByteArray()); +} + + +void KDevPartControllerIface::forwardSavedFile(const KURL &fileName) +{ + kdDebug(9000) << "dcop emitting savedFile " << fileName << endl; + emitDCOPSignal("projectClosed()", TQByteArray()); +} + +void KDevPartControllerIface::forwardClosedFile(const KURL &fileName) +{ + kdDebug(9000) << "dcop emitting closedFile " << fileName << endl; + emitDCOPSignal("projectClosed()", TQByteArray()); +} + +bool KDevPartControllerIface::closeAllFiles( ) +{ + return m_controller->closeAllFiles(); +} + +uint KDevPartControllerIface::documentState( const KURL & url ) +{ + return (uint) m_controller->documentState(url); +} + +#include "KDevPartControllerIface.moc" diff --git a/lib/interfaces/KDevPartControllerIface.h b/lib/interfaces/KDevPartControllerIface.h new file mode 100644 index 00000000..8c3647ea --- /dev/null +++ b/lib/interfaces/KDevPartControllerIface.h @@ -0,0 +1,64 @@ +/* This file is part of the KDE project + Copyright (C) 2002 Matthias Hoelzer-Kluepfel + + 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 _KDEVPARTCONTROLLERIFACE_H_ +#define _KDEVPARTCONTROLLERIFACE_H_ + +#include +#include +#include + +class KDevPartController; + +class KDevPartControllerIface : public TQObject, public DCOPObject +{ + Q_OBJECT +// + K_DCOP + +public: + + KDevPartControllerIface(KDevPartController *pc); + ~KDevPartControllerIface(); + + +k_dcop: + + void editDocument(const TQString &url, int lineNum); + void showDocument(const TQString &url, bool newWin); + + void saveAllFiles(); + void revertAllFiles(); + + bool closeAllFiles(); + uint documentState( const KURL & url ); + +private slots: + + void forwardLoadedFile(const KURL &fileName); + void forwardSavedFile(const KURL &fileName); + void forwardClosedFile(const KURL &fileName); + +private: + + KDevPartController *m_controller; + +}; + + +#endif diff --git a/lib/interfaces/Makefile.am b/lib/interfaces/Makefile.am index 93533492..1944f4f9 100644 --- a/lib/interfaces/Makefile.am +++ b/lib/interfaces/Makefile.am @@ -1,27 +1,27 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces/external -I$(top_srcdir)/lib/util -I$(top_srcdir)/lib/cppparser \ $(all_includes) -noinst_LTLIBRARIES = libtdevinterfaces.la +noinst_LTLIBRARIES = libkdevinterfaces.la -libtdevinterfaces_la_SOURCES = tdevcore.cpp tdevproject.cpp \ - tdevlanguagesupport.cpp tdevpartcontroller.cpp tdevapi.cpp TDevCoreIface.skel \ - tdevmainwindow.cpp TDevPartControllerIface.skel tdevplugin.cpp tdevcoderepository.cpp \ +libkdevinterfaces_la_SOURCES = kdevcore.cpp kdevproject.cpp \ + kdevlanguagesupport.cpp kdevpartcontroller.cpp kdevapi.cpp KDevCoreIface.skel \ + kdevmainwindow.cpp KDevPartControllerIface.skel kdevplugin.cpp kdevcoderepository.cpp \ codemodel.cpp codemodel_treeparser.cpp codemodel_utils.cpp \ - tdevdesignerintegration.cpp tdevplugincontroller.cpp tdevplugininfo.cpp TDevCoreIface.cpp \ - TDevPartControllerIface.cpp katedocumentmanagerinterface.cpp katedocumentmanagerinterface.skel \ - tdevprojectiface.cpp tdevprojectiface.skel tdevdesignerintegrationiface.cpp \ - tdevdesignerintegrationiface.skel hashedstring.cpp -libtdevinterfaces_la_LDFLAGS = -no-undefined $(all_libraries) -libtdevinterfaces_la_LIBADD = $(top_builddir)/lib/interfaces/external/libkinterfacedesigner.la \ - $(top_builddir)/lib/util/libtdevutil.la \ + kdevdesignerintegration.cpp kdevplugincontroller.cpp kdevplugininfo.cpp KDevCoreIface.cpp \ + KDevPartControllerIface.cpp katedocumentmanagerinterface.cpp katedocumentmanagerinterface.skel \ + kdevprojectiface.cpp kdevprojectiface.skel kdevdesignerintegrationiface.cpp \ + kdevdesignerintegrationiface.skel hashedstring.cpp +libkdevinterfaces_la_LDFLAGS = -no-undefined $(all_libraries) +libkdevinterfaces_la_LIBADD = $(top_builddir)/lib/interfaces/external/libkinterfacedesigner.la \ + $(top_builddir)/lib/util/libkdevutil.la \ $(LIB_TDEUI) $(LIB_TDEHTML) $(LIB_TDEPARTS) -ltdetexteditor -ltdescript -lDCOP tdevelopincludedir = $(includedir)/tdevelop/interfaces -tdevelopinclude_HEADERS = tdevlanguagesupport.h tdevmainwindow.h \ - tdevpartcontroller.h tdevplugin.h tdevproject.h tdevcore.h tdevcoderepository.h codemodel.h \ - codemodel_utils.h codemodel_treeparser.h tdevgenericfactory.h tdevapi.h \ - tdevdesignerintegration.h tdevplugincontroller.h tdevplugininfo.h TDevCoreIface.h \ - TDevPartControllerIface.h katedocumentmanagerinterface.h \ +tdevelopinclude_HEADERS = kdevlanguagesupport.h kdevmainwindow.h \ + kdevpartcontroller.h kdevplugin.h kdevproject.h kdevcore.h kdevcoderepository.h codemodel.h \ + codemodel_utils.h codemodel_treeparser.h kdevgenericfactory.h kdevapi.h \ + kdevdesignerintegration.h kdevplugincontroller.h kdevplugininfo.h KDevCoreIface.h \ + KDevPartControllerIface.h katedocumentmanagerinterface.h \ hashedstring.h @@ -33,8 +33,8 @@ METASOURCES = AUTO SUBDIRS = extensions external extras -DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils tdevutil designer_integration tdevcatalog tdevprofileslib tdevextensions +DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils kdevutil designer_integration kdevcatalog kdevprofileslib kdevextensions DOXYGEN_PROJECTNAME = TDevelop Interfaces Library -DOXYGEN_DOCDIRPREFIX = tdev +DOXYGEN_DOCDIRPREFIX = kdev include ../../Doxyfile.am -noinst_HEADERS = tdevprojectiface.h tdevdesignerintegrationiface.h +noinst_HEADERS = kdevprojectiface.h kdevdesignerintegrationiface.h diff --git a/lib/interfaces/TDevCoreIface.cpp b/lib/interfaces/TDevCoreIface.cpp deleted file mode 100644 index 39d4bb97..00000000 --- a/lib/interfaces/TDevCoreIface.cpp +++ /dev/null @@ -1,59 +0,0 @@ - - -/* This file is part of the KDE project - Copyright (C) 2001 Bernd Gehrmann - Copyright (C) 2001-2002 Matthias Hoelzer-Kluepfel - 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 -#include -#include "TDevCoreIface.h" -#include "tdevcore.h" - - -TDevCoreIface::TDevCoreIface(TDevCore *core) - : TQObject(core), DCOPObject("TDevCore"), m_core(core) -{ - connect( m_core, TQT_SIGNAL(projectOpened()), this, TQT_SLOT(forwardProjectOpened()) ); - connect( m_core, TQT_SIGNAL(projectClosed()), this, TQT_SLOT(forwardProjectClosed()) ); -} - - -TDevCoreIface::~TDevCoreIface() -{} - - -void TDevCoreIface::forwardProjectOpened() -{ - kdDebug(9000) << "dcop emitting project opened" << endl; - emitDCOPSignal("projectOpened()", TQByteArray()); -} - - -void TDevCoreIface::forwardProjectClosed() -{ - kdDebug(9000) << "dcop emitting project closed" << endl; - emitDCOPSignal("projectClosed()", TQByteArray()); -} - -void TDevCoreIface::openProject( const TQString & projectFileName ) -{ - m_core->openProject(projectFileName); -} - -#include "TDevCoreIface.moc" diff --git a/lib/interfaces/TDevCoreIface.h b/lib/interfaces/TDevCoreIface.h deleted file mode 100644 index f259005a..00000000 --- a/lib/interfaces/TDevCoreIface.h +++ /dev/null @@ -1,52 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2001 Bernd Gehrmann - Copyright (C) 2001-2002 Matthias Hoelzer-Kluepfel - 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 _TDEVCOREIFACE_H_ -#define _TDEVCOREIFACE_H_ - -#include -#include - -class TDevCore; - - -class TDevCoreIface : public TQObject, public DCOPObject -{ - Q_OBJECT -// - K_DCOP - -public: - - TDevCoreIface( TDevCore *core ); - ~TDevCoreIface(); - -k_dcop: - void openProject(const TQString& projectFileName); - -private slots: - void forwardProjectOpened(); - void forwardProjectClosed(); - -private: - TDevCore *m_core; -}; - -#endif diff --git a/lib/interfaces/TDevPartControllerIface.cpp b/lib/interfaces/TDevPartControllerIface.cpp deleted file mode 100644 index e8bd1bb7..00000000 --- a/lib/interfaces/TDevPartControllerIface.cpp +++ /dev/null @@ -1,95 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2002 Matthias Hoelzer-Kluepfel - - 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 -#include -#include - - -#include "TDevPartControllerIface.h" -#include "tdevpartcontroller.h" - - -TDevPartControllerIface::TDevPartControllerIface(TDevPartController *pc) - : TQObject(pc), DCOPObject("TDevPartController"), m_controller(pc) -{ - connect(pc, TQT_SIGNAL(loadedFile(const KURL &)), this, TQT_SLOT(forwardLoadedFile(const KURL &))); - connect(pc, TQT_SIGNAL(savedFile(const KURL &)), this, TQT_SLOT(forwardSavedFile(const KURL &))); - connect(pc, TQT_SIGNAL(closedFile(const KURL &)), this, TQT_SLOT(forwardClosedFile(const KURL &))); -} - - -TDevPartControllerIface::~TDevPartControllerIface() -{ -} - - -void TDevPartControllerIface::editDocument(const TQString &url, int lineNum) -{ - m_controller->editDocument(KURL(url), lineNum); -} - - -void TDevPartControllerIface::showDocument(const TQString &url, bool newWin) -{ - m_controller->showDocument(KURL(url), newWin); -} - - -void TDevPartControllerIface::saveAllFiles() -{ - m_controller->saveAllFiles(); -} - - -void TDevPartControllerIface::revertAllFiles() -{ - m_controller->revertAllFiles(); -} - - -void TDevPartControllerIface::forwardLoadedFile(const KURL &fileName) -{ - kdDebug(9000) << "dcop emitting loadedFile " << fileName << endl; - emitDCOPSignal("projectOpened()", TQByteArray()); -} - - -void TDevPartControllerIface::forwardSavedFile(const KURL &fileName) -{ - kdDebug(9000) << "dcop emitting savedFile " << fileName << endl; - emitDCOPSignal("projectClosed()", TQByteArray()); -} - -void TDevPartControllerIface::forwardClosedFile(const KURL &fileName) -{ - kdDebug(9000) << "dcop emitting closedFile " << fileName << endl; - emitDCOPSignal("projectClosed()", TQByteArray()); -} - -bool TDevPartControllerIface::closeAllFiles( ) -{ - return m_controller->closeAllFiles(); -} - -uint TDevPartControllerIface::documentState( const KURL & url ) -{ - return (uint) m_controller->documentState(url); -} - -#include "TDevPartControllerIface.moc" diff --git a/lib/interfaces/TDevPartControllerIface.h b/lib/interfaces/TDevPartControllerIface.h deleted file mode 100644 index 87a4e04e..00000000 --- a/lib/interfaces/TDevPartControllerIface.h +++ /dev/null @@ -1,64 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2002 Matthias Hoelzer-Kluepfel - - 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 _TDEVPARTCONTROLLERIFACE_H_ -#define _TDEVPARTCONTROLLERIFACE_H_ - -#include -#include -#include - -class TDevPartController; - -class TDevPartControllerIface : public TQObject, public DCOPObject -{ - Q_OBJECT -// - K_DCOP - -public: - - TDevPartControllerIface(TDevPartController *pc); - ~TDevPartControllerIface(); - - -k_dcop: - - void editDocument(const TQString &url, int lineNum); - void showDocument(const TQString &url, bool newWin); - - void saveAllFiles(); - void revertAllFiles(); - - bool closeAllFiles(); - uint documentState( const KURL & url ); - -private slots: - - void forwardLoadedFile(const KURL &fileName); - void forwardSavedFile(const KURL &fileName); - void forwardClosedFile(const KURL &fileName); - -private: - - TDevPartController *m_controller; - -}; - - -#endif 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 diff --git a/lib/interfaces/external/Mainpage.dox b/lib/interfaces/external/Mainpage.dox index 6c2fb2b9..4ed571dd 100644 --- a/lib/interfaces/external/Mainpage.dox +++ b/lib/interfaces/external/Mainpage.dox @@ -30,7 +30,7 @@ are connected to corresponding Q_SLOTS of TDevelop designer integration engine w Each language support which wants to use integrated designer, must reimplement @code -virtual TDevDesignerIntegration *TDevLanguageSupport::designer(KInterfaceDesigner::DesignerType type) +virtual KDevDesignerIntegration *KDevLanguageSupport::designer(KInterfaceDesigner::DesignerType type) @endcode method and return designer integration object. @@ -39,15 +39,15 @@ developers. With the convenience library writing %Qt designer integration for th trivial task. -\section tdevdesigner KDevelop Designer technical overview -KDevelop version >= 3.1 comes with a customized version (fork ;)) of %Qt Designer. It is called KDevelop Designer (TDevDesigner, tdevdesigner from the command line). TDevDesigner has some important differences: -- TDevDesigner provides a read/write KPart which can be embedded into any application which wants to edit .ui files. TDevelop IDE embeds TDevDesigner this way. -- TDevDesigner uses %KDE icons and dialogs and thus provides better integration with a system. +\section kdevdesigner KDevelop Designer technical overview +KDevelop version >= 3.1 comes with a customized version (fork ;)) of %Qt Designer. It is called KDevelop Designer (KDevDesigner, kdevdesigner from the command line). KDevDesigner has some important differences: +- KDevDesigner provides a read/write KPart which can be embedded into any application which wants to edit .ui files. TDevelop IDE embeds KDevDesigner this way. +- KDevDesigner uses %KDE icons and dialogs and thus provides better integration with a system. . -It is safe to preview forms with some %KDE widgets from tdeui and tdeio libraries - TDevDesigner part is linked to those libraries so it will not crash under some circumstances. +It is safe to preview forms with some %KDE widgets from tdeui and tdeio libraries - KDevDesigner part is linked to those libraries so it will not crash under some circumstances. -TDevDesigner will not create .ui.h files - this feature is completely disabled. Integrated TDevDesigner will use subclassing approach, standalone does not allow to enter code. +KDevDesigner will not create .ui.h files - this feature is completely disabled. Integrated KDevDesigner will use subclassing approach, standalone does not allow to enter code. \section other Other information diff --git a/lib/interfaces/extras/CMakeLists.txt b/lib/interfaces/extras/CMakeLists.txt index afe233aa..eb4cdb75 100644 --- a/lib/interfaces/extras/CMakeLists.txt +++ b/lib/interfaces/extras/CMakeLists.txt @@ -22,7 +22,7 @@ link_directories( ##### headers ################################### install( FILES - tdevcompileroptions.h tdevvcsintegrator.h + kdevcompileroptions.h kdevvcsintegrator.h DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/interfaces/extras ) install( FILES @@ -30,10 +30,10 @@ install( FILES DESTINATION ${SERVICETYPES_INSTALL_DIR} ) -##### tdevextras (shared) ####################### +##### kdevextras (shared) ####################### -tde_add_library( tdevextras SHARED AUTOMOC - SOURCES tdevcompileroptions.cpp tdevvcsintegrator.cpp +tde_add_library( kdevextras SHARED AUTOMOC + SOURCES kdevcompileroptions.cpp kdevvcsintegrator.cpp VERSION 0.0.0 LINK ${TQT_LIBRARIES} DESTINATION ${LIB_INSTALL_DIR} diff --git a/lib/interfaces/extras/Makefile.am b/lib/interfaces/extras/Makefile.am index c504621e..67615223 100644 --- a/lib/interfaces/extras/Makefile.am +++ b/lib/interfaces/extras/Makefile.am @@ -1,18 +1,18 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces/external -I$(top_srcdir)/lib/util \ $(all_includes) METASOURCES = AUTO -libtdevextras_la_LIBADD = $(LIB_QT) -libtdevextras_la_LDFLAGS = $(all_libraries) -lib_LTLIBRARIES = libtdevextras.la +libkdevextras_la_LIBADD = $(LIB_QT) +libkdevextras_la_LDFLAGS = $(all_libraries) +lib_LTLIBRARIES = libkdevextras.la tdevelopincludedir = $(includedir)/tdevelop/interfaces/extras servicetypedir = $(kde_servicetypesdir) -tdevelopinclude_HEADERS = tdevcompileroptions.h tdevvcsintegrator.h -libtdevextras_la_SOURCES = tdevcompileroptions.cpp tdevvcsintegrator.cpp +tdevelopinclude_HEADERS = kdevcompileroptions.h kdevvcsintegrator.h +libkdevextras_la_SOURCES = kdevcompileroptions.cpp kdevvcsintegrator.cpp servicetype_DATA = tdevelopcompileroptions.desktop \ tdevelopvcsintegrator.desktop -DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils tdevinterfaces +DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils kdevinterfaces DOXYGEN_PROJECTNAME = TDevelop Extra Interfaces Library -DOXYGEN_DOCDIRPREFIX = tdev +DOXYGEN_DOCDIRPREFIX = kdev include ../../../Doxyfile.am diff --git a/lib/interfaces/extras/kdevcompileroptions.cpp b/lib/interfaces/extras/kdevcompileroptions.cpp new file mode 100644 index 00000000..22c701f1 --- /dev/null +++ b/lib/interfaces/extras/kdevcompileroptions.cpp @@ -0,0 +1,8 @@ +#include "kdevcompileroptions.h" + +KDevCompilerOptions::KDevCompilerOptions( TQObject * parent, const char * name ) + :TQObject(parent, name) +{ +} + +#include "kdevcompileroptions.moc" diff --git a/lib/interfaces/extras/kdevcompileroptions.h b/lib/interfaces/extras/kdevcompileroptions.h new file mode 100644 index 00000000..6544c5d0 --- /dev/null +++ b/lib/interfaces/extras/kdevcompileroptions.h @@ -0,0 +1,91 @@ +/* This file is part of the KDE project + Copyright (C) 2001 Matthias Hoelzer-Kluepfel + 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. +*/ + +/** +@file kdevcompileroptions.h +The interface to compiler options configuration. +*/ + +#ifndef _KDEVCOMPILEROPTIONS_H_ +#define _KDEVCOMPILEROPTIONS_H_ + +#include + +/** +The interface to compiler options configuration. +Used by build systems to give users a compiler options configuration dialog. + +Common use case: +@code +static KDevCompilerOptions *createCompilerOptions( const TQString &name, TQObject *parent ) +{ + KService::Ptr service = KService::serviceByDesktopName( name ); + if ( !service ) + return 0; + + KLibFactory *factory = KLibLoader::self()->factory(TQFile::encodeName(service->library())); + if (!factory) + return 0; + + TQStringList args; + TQVariant prop = service->property("X-TDevelop-Args"); + if (prop.isValid()) + args = TQStringList::split(" ", prop.toString()); + + TQObject *obj = factory->create(parent, service->name().latin1(), + "KDevCompilerOptions", args); + + if (!obj->inherits("KDevCompilerOptions")) + return 0; + + KDevCompilerOptions *dlg = (KDevCompilerOptions*) obj; + return dlg; +} + +... +KDevCompilerOptions *plugin = createCompilerOptions(compilerName, parent); +TQString flags = ""; //old compiler flags +if ( plugin ) +{ + flags = plugin->exec( parent, flags ); //new compiler flags are returned + delete plugin; +} +@endcode +*/ +class KDevCompilerOptions : public TQObject +{ + Q_OBJECT + + +public: + KDevCompilerOptions( TQObject *parent=0, const char *name=0 ); + + /** + * Opens a dialog which allows the user to configure the + * compiler options. The initial settings in the dialog + * will be set from the flags argument of this method. + * After the dialog is accepted, the new settings will + * be returned as a string. If the dialog was cancelled, + * TQString() is returned. + */ + virtual TQString exec(TQWidget *parent, const TQString &flags) = 0; +}; + +#endif diff --git a/lib/interfaces/extras/kdevvcsintegrator.cpp b/lib/interfaces/extras/kdevvcsintegrator.cpp new file mode 100644 index 00000000..5a6ab429 --- /dev/null +++ b/lib/interfaces/extras/kdevvcsintegrator.cpp @@ -0,0 +1,26 @@ +/* This file is part of the KDE project + 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. +*/ +#include "kdevvcsintegrator.h" + +KDevVCSIntegrator::KDevVCSIntegrator(TQObject *parent, const char *name) + :TQObject(parent, name) +{ +} + +#include "kdevvcsintegrator.moc" diff --git a/lib/interfaces/extras/kdevvcsintegrator.h b/lib/interfaces/extras/kdevvcsintegrator.h new file mode 100644 index 00000000..793070b3 --- /dev/null +++ b/lib/interfaces/extras/kdevvcsintegrator.h @@ -0,0 +1,77 @@ +/* This file is part of the KDE project + 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 KDEVVCSINTEGRATOR_H +#define KDEVVCSINTEGRATOR_H + +#include + +/** +@file kdevvcsintegrator.h +The interface to VCS integrators. +*/ + +class TQDomDocument; +class TQWidget; + +/** +VCS Integration Dialog. + +Usually it is created as: +@code +class MyVCSDialog: public TQWidget, public VCSDialog { + MyVCSDialog(TQWidget *parent = 0, const char *name = 0); + virtual void accept() { ... } + virtual void init(const TQString &projectName, const TQString &projectLocation) { ... } + virtual TQWidget *self() { + return const_cast(this); + } +} +@endcode +*/ +class VCSDialog { +public: + VCSDialog() { } + /**Implement all integration actions here. Do not use TQDialog::accept method + to perform integration actions.*/ + virtual void accept() = 0; + /**Init integration dialog with the project name and location.*/ + virtual void init(const TQString &projectName, const TQString &projectLocation) = 0; + /**Reimplement to return an actual integration widget. Use TQWidgets for that, not + TQDialogs because integrator dialogs are usually have parent containers.*/ + virtual TQWidget *self() = 0; +}; + +/** +The interface to VCS integrators. +VCS integrator takes care about setting up VCS for new and existing projects. +It can, for example, perform checkout or import operations. +*/ +class KDevVCSIntegrator: public TQObject { + Q_OBJECT + +public: + KDevVCSIntegrator(TQObject *parent = 0, const char *name = 0); + + /**Reimplement to return a dialog to fetch the project from VCS.*/ + virtual VCSDialog *fetcher(TQWidget *parent) = 0; + /**Reimplement to return a dialog to integrate the project into VCS.*/ + virtual VCSDialog *integrator(TQWidget *parent) = 0; +}; + +#endif diff --git a/lib/interfaces/extras/tdevcompileroptions.cpp b/lib/interfaces/extras/tdevcompileroptions.cpp deleted file mode 100644 index 9eead32f..00000000 --- a/lib/interfaces/extras/tdevcompileroptions.cpp +++ /dev/null @@ -1,8 +0,0 @@ -#include "tdevcompileroptions.h" - -TDevCompilerOptions::TDevCompilerOptions( TQObject * parent, const char * name ) - :TQObject(parent, name) -{ -} - -#include "tdevcompileroptions.moc" diff --git a/lib/interfaces/extras/tdevcompileroptions.h b/lib/interfaces/extras/tdevcompileroptions.h deleted file mode 100644 index b8509a99..00000000 --- a/lib/interfaces/extras/tdevcompileroptions.h +++ /dev/null @@ -1,91 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2001 Matthias Hoelzer-Kluepfel - 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. -*/ - -/** -@file tdevcompileroptions.h -The interface to compiler options configuration. -*/ - -#ifndef _TDEVCOMPILEROPTIONS_H_ -#define _TDEVCOMPILEROPTIONS_H_ - -#include - -/** -The interface to compiler options configuration. -Used by build systems to give users a compiler options configuration dialog. - -Common use case: -@code -static TDevCompilerOptions *createCompilerOptions( const TQString &name, TQObject *parent ) -{ - KService::Ptr service = KService::serviceByDesktopName( name ); - if ( !service ) - return 0; - - KLibFactory *factory = KLibLoader::self()->factory(TQFile::encodeName(service->library())); - if (!factory) - return 0; - - TQStringList args; - TQVariant prop = service->property("X-TDevelop-Args"); - if (prop.isValid()) - args = TQStringList::split(" ", prop.toString()); - - TQObject *obj = factory->create(parent, service->name().latin1(), - "TDevCompilerOptions", args); - - if (!obj->inherits("TDevCompilerOptions")) - return 0; - - TDevCompilerOptions *dlg = (TDevCompilerOptions*) obj; - return dlg; -} - -... -TDevCompilerOptions *plugin = createCompilerOptions(compilerName, parent); -TQString flags = ""; //old compiler flags -if ( plugin ) -{ - flags = plugin->exec( parent, flags ); //new compiler flags are returned - delete plugin; -} -@endcode -*/ -class TDevCompilerOptions : public TQObject -{ - Q_OBJECT - - -public: - TDevCompilerOptions( TQObject *parent=0, const char *name=0 ); - - /** - * Opens a dialog which allows the user to configure the - * compiler options. The initial settings in the dialog - * will be set from the flags argument of this method. - * After the dialog is accepted, the new settings will - * be returned as a string. If the dialog was cancelled, - * TQString() is returned. - */ - virtual TQString exec(TQWidget *parent, const TQString &flags) = 0; -}; - -#endif diff --git a/lib/interfaces/extras/tdevvcsintegrator.cpp b/lib/interfaces/extras/tdevvcsintegrator.cpp deleted file mode 100644 index 26bf915d..00000000 --- a/lib/interfaces/extras/tdevvcsintegrator.cpp +++ /dev/null @@ -1,26 +0,0 @@ -/* This file is part of the KDE project - 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. -*/ -#include "tdevvcsintegrator.h" - -TDevVCSIntegrator::TDevVCSIntegrator(TQObject *parent, const char *name) - :TQObject(parent, name) -{ -} - -#include "tdevvcsintegrator.moc" diff --git a/lib/interfaces/extras/tdevvcsintegrator.h b/lib/interfaces/extras/tdevvcsintegrator.h deleted file mode 100644 index 23ee6c22..00000000 --- a/lib/interfaces/extras/tdevvcsintegrator.h +++ /dev/null @@ -1,77 +0,0 @@ -/* This file is part of the KDE project - 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 TDEVVCSINTEGRATOR_H -#define TDEVVCSINTEGRATOR_H - -#include - -/** -@file tdevvcsintegrator.h -The interface to VCS integrators. -*/ - -class TQDomDocument; -class TQWidget; - -/** -VCS Integration Dialog. - -Usually it is created as: -@code -class MyVCSDialog: public TQWidget, public VCSDialog { - MyVCSDialog(TQWidget *parent = 0, const char *name = 0); - virtual void accept() { ... } - virtual void init(const TQString &projectName, const TQString &projectLocation) { ... } - virtual TQWidget *self() { - return const_cast(this); - } -} -@endcode -*/ -class VCSDialog { -public: - VCSDialog() { } - /**Implement all integration actions here. Do not use TQDialog::accept method - to perform integration actions.*/ - virtual void accept() = 0; - /**Init integration dialog with the project name and location.*/ - virtual void init(const TQString &projectName, const TQString &projectLocation) = 0; - /**Reimplement to return an actual integration widget. Use TQWidgets for that, not - TQDialogs because integrator dialogs are usually have parent containers.*/ - virtual TQWidget *self() = 0; -}; - -/** -The interface to VCS integrators. -VCS integrator takes care about setting up VCS for new and existing projects. -It can, for example, perform checkout or import operations. -*/ -class TDevVCSIntegrator: public TQObject { - Q_OBJECT - -public: - TDevVCSIntegrator(TQObject *parent = 0, const char *name = 0); - - /**Reimplement to return a dialog to fetch the project from VCS.*/ - virtual VCSDialog *fetcher(TQWidget *parent) = 0; - /**Reimplement to return a dialog to integrate the project into VCS.*/ - virtual VCSDialog *integrator(TQWidget *parent) = 0; -}; - -#endif diff --git a/lib/interfaces/katedocumentmanagerinterface.cpp b/lib/interfaces/katedocumentmanagerinterface.cpp index 360be1c4..0afbcc81 100644 --- a/lib/interfaces/katedocumentmanagerinterface.cpp +++ b/lib/interfaces/katedocumentmanagerinterface.cpp @@ -17,7 +17,7 @@ Boston, MA 02110-1301, USA. */ #include "katedocumentmanagerinterface.h" -#include "tdevpartcontroller.h" +#include "kdevpartcontroller.h" #include #include #include @@ -26,7 +26,7 @@ #include #include -KateDocumentManagerInterface::KateDocumentManagerInterface( TDevPartController *pc) +KateDocumentManagerInterface::KateDocumentManagerInterface( KDevPartController *pc) : TQObject(pc), DCOPObject("KateDocumentManager"), m_controller(pc) { diff --git a/lib/interfaces/katedocumentmanagerinterface.h b/lib/interfaces/katedocumentmanagerinterface.h index 235c7738..8bdbdf8f 100644 --- a/lib/interfaces/katedocumentmanagerinterface.h +++ b/lib/interfaces/katedocumentmanagerinterface.h @@ -23,7 +23,7 @@ #include #include #include -class TDevPartController; +class KDevPartController; /** This is an emulated interface to provide compatibility with Kate scripts. @@ -36,7 +36,7 @@ class KateDocumentManagerInterface : public TQObject, public DCOPObject { // K_DCOP public: - KateDocumentManagerInterface( TDevPartController *pc ); + KateDocumentManagerInterface( KDevPartController *pc ); ~KateDocumentManagerInterface(); @@ -53,7 +53,7 @@ k_dcop: uint documents(); private: - TDevPartController *m_controller; + KDevPartController *m_controller; }; #endif diff --git a/lib/interfaces/kdevapi.cpp b/lib/interfaces/kdevapi.cpp new file mode 100644 index 00000000..04cf078d --- /dev/null +++ b/lib/interfaces/kdevapi.cpp @@ -0,0 +1,93 @@ +/* This file is part of the KDE project + Copyright (C) 2000-2001 Bernd Gehrmann + 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. +*/ +#include "kdevapi.h" + +#include "kdevcoderepository.h" + +/////////////////////////////////////////////////////////////////////////////// +// class KDevApi::Private +/////////////////////////////////////////////////////////////////////////////// + +class KDevApi::Private +{ +public: + Private() + : m_projectDom(0), m_project(0), m_languageSupport(0), + m_codeRepository(0) + {} + + TQDomDocument *m_projectDom; + KDevProject *m_project; + KDevLanguageSupport *m_languageSupport; + KDevCodeRepository* m_codeRepository; +}; + +/////////////////////////////////////////////////////////////////////////////// +// class KDevApi +/////////////////////////////////////////////////////////////////////////////// + +KDevApi::KDevApi() +{ + d = new KDevApi::Private; + d->m_codeRepository = new KDevCodeRepository(); +} + +KDevApi::~KDevApi() +{ + delete d->m_codeRepository; + delete d; +} + +KDevProject *KDevApi::project() const +{ + return d->m_project; +} + +void KDevApi::setProject(KDevProject *project) +{ + d->m_project = project; +} + +KDevLanguageSupport *KDevApi::languageSupport() const +{ + return d->m_languageSupport; +} + +void KDevApi::setLanguageSupport(KDevLanguageSupport *languageSupport) +{ + d->m_languageSupport = languageSupport; +} + +TQDomDocument *KDevApi::projectDom() const +{ + return d->m_projectDom; +} + +void KDevApi::setProjectDom(TQDomDocument *dom) +{ + d->m_projectDom = dom; +} + +KDevCodeRepository *KDevApi::codeRepository() const +{ + return d->m_codeRepository; +} + +#include "kdevapi.moc" diff --git a/lib/interfaces/kdevapi.h b/lib/interfaces/kdevapi.h new file mode 100644 index 00000000..d1f4f5cc --- /dev/null +++ b/lib/interfaces/kdevapi.h @@ -0,0 +1,104 @@ +/* This file is part of the KDE project + Copyright (C) 2000-2001 Bernd Gehrmann + 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 KDEVAPI_H +#define KDEVAPI_H + +#include + +class TQStringList; +class TQDomDocument; +class KDevCore; +class KDevProject; +class KDevLanguageSupport; +class CodeModel; +class KDevPartController; +class KDevMainWindow; +class KDevCodeRepository; +class KDevPlugin; +class KDevPluginController; + +/** +@file kdevapi.h +KDevelop API interface. +*/ + +/** +The interface to KDevelop's core components. +Needs to be implemented in a shell. Developers do not need to use this +class because @ref KDevPlugin already provides API convenience methods. +*/ +class KDevApi: public TQObject +{ + Q_OBJECT + +public: + /**Constructor.*/ + KDevApi(); + + /**Destructor.*/ + virtual ~KDevApi(); + + /**@return A reference to the toplevel widget.*/ + virtual KDevMainWindow *mainWindow() const = 0; + + /**@return A reference to the part controller which is used to manipulate loaded KParts.*/ + virtual KDevPartController *partController() const = 0; + + /**@return A reference to the plugin controller which is used to manipulate loaded plugin.*/ + virtual KDevPluginController *pluginController() const = 0; + + /**@return A reference to the application core - an object which provides + basic functionalities for inter-parts communications / cooperation.*/ + virtual KDevCore *core() const = 0; + + /**@return A reference to the memory symbol store.*/ + virtual CodeModel *codeModel() const = 0; + + /**@return A reference to the DOM tree that represents the project file or 0 if no project is loaded.*/ + TQDomDocument *projectDom() const; + + /**Sets the Document Object Model for the current project. + @param dom The project DOM.*/ + void setProjectDom(TQDomDocument *dom); + + /**@return A reference to the current project component or 0 if no project is loaded.*/ + KDevProject *project() const; + + /**Sets the current project. + @param project The project plugin which becames the current project.*/ + void setProject(KDevProject *project); + + /**@return A reference to the language support component or 0 if no support available.*/ + KDevLanguageSupport *languageSupport() const; + + /**Sets the object charged of providing handling for the source files written in particular + language (languages support component). + @param languageSupport The language support plugin.*/ + void setLanguageSupport(KDevLanguageSupport *languageSupport); + + /**@return A reference to the code repository (accessor to persistent symbol stores).*/ + KDevCodeRepository *codeRepository() const; + +private: + class Private; + Private *d; +}; + +#endif diff --git a/lib/interfaces/kdevcoderepository.cpp b/lib/interfaces/kdevcoderepository.cpp new file mode 100644 index 00000000..26249544 --- /dev/null +++ b/lib/interfaces/kdevcoderepository.cpp @@ -0,0 +1,71 @@ +/* This file is part of the KDE project + 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 "kdevcoderepository.h" + +struct KDevCodeRepositoryData +{ + Catalog* mainCatalog; + TQValueList catalogs; + + KDevCodeRepositoryData(): mainCatalog( 0 ) {} +}; + +KDevCodeRepository::KDevCodeRepository( ) + : d( new KDevCodeRepositoryData ) +{ +} + +KDevCodeRepository::~KDevCodeRepository( ) +{ + delete( d ); +} + +Catalog* KDevCodeRepository::mainCatalog() +{ + return d->mainCatalog; +} + +void KDevCodeRepository::setMainCatalog( Catalog * mainCatalog ) +{ + d->mainCatalog = mainCatalog; +} + +void KDevCodeRepository::registerCatalog( Catalog * catalog ) +{ + d->catalogs.append( catalog ); + emit catalogRegistered( catalog ); +} + +void KDevCodeRepository::unregisterCatalog( Catalog * catalog ) +{ + d->catalogs.remove( catalog ); + emit catalogUnregistered( catalog ); +} + +void KDevCodeRepository::touchCatalog( Catalog * catalog ) +{ + emit catalogChanged( catalog ); +} + +TQValueList< Catalog * > KDevCodeRepository::registeredCatalogs( ) +{ + return d->catalogs; +} + +#include "kdevcoderepository.moc" diff --git a/lib/interfaces/kdevcoderepository.h b/lib/interfaces/kdevcoderepository.h new file mode 100644 index 00000000..4e1dd765 --- /dev/null +++ b/lib/interfaces/kdevcoderepository.h @@ -0,0 +1,95 @@ +/* This file is part of the KDE project + 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 KDEVCODEREPOSITORY_H +#define KDEVCODEREPOSITORY_H + +#include +#include + +/** +@file kdevcoderepository.h +Code repository - the persistent symbol store accessor. +*/ + +class KDevCodeRepositoryData; +class Catalog; + +/** +Code repository - the persistent symbol store accessor. +Symbols from parsed files can be saved to the persistent symbol store. +Persistence in this case means that symbol database is never loaded into memory +and works like a usual database which executes queries. + +Code repository consists from @ref Catalog objects that represent separate symbol +databases. Catalogs can be created/loaded/unloaded dynamically. +To find a symbol in the repository each catalog should be queried. + +Persistent symbol store is useful to keep information about code that +never or rarely changes. System libraries are perfect examples of such code. +Symbols from code contained in project files are better stored in memory +symbol store like @ref CodeModel. +*/ +class KDevCodeRepository : public TQObject +{ + Q_OBJECT + +public: + /**Constructor.*/ + KDevCodeRepository(); + /**Destructor.*/ + virtual ~KDevCodeRepository(); + + /**@return The main catalog. Each catalog can be marked is main + to provide easy access to it.*/ + Catalog* mainCatalog(); + /**Sets the main catalog. + @param mainCatalog The catalog to be marked as main.*/ + void setMainCatalog( Catalog* mainCatalog ); + + /**@return The list of registered catalogs.*/ + TQValueList registeredCatalogs(); + + /**Registers catalog in the repository. + @param catalog The catalog to register.*/ + void registerCatalog( Catalog* catalog ); + /**Unregisters catalog from the repository. + @param catalog The catalog to unregister.*/ + void unregisterCatalog( Catalog* catalog ); + /**Marks catalog as changed and emits @ref catalogChanged signal. + @param catalog The catalog to touch.*/ + void touchCatalog( Catalog* catalog ); + +signals: + /**Emitted when a new catalog is registered. + @param catalog The new catalog.*/ + void catalogRegistered( Catalog* catalog ); + + /**Emitted when a catalog in removed + @param catalog The catalog that was removed.*/ + void catalogUnregistered( Catalog* catalog ); + + /**Emitted when the contens of catalog is changed. + @param catalog Changed catalog.*/ + void catalogChanged( Catalog* catalog ); + +private: + KDevCodeRepositoryData* d; +}; + +#endif diff --git a/lib/interfaces/kdevcore.cpp b/lib/interfaces/kdevcore.cpp new file mode 100644 index 00000000..dda66cbf --- /dev/null +++ b/lib/interfaces/kdevcore.cpp @@ -0,0 +1,298 @@ +/* This file is part of the KDE project + Copyright (C) 2001-2002 Matthias Hoelzer-Kluepfel + Copyright (C) 2002-2003 Roberto Raggi + Copyright (C) 2003 Mario Scalas + Copyright (C) 2003 Amilcar do Carmo Lucas + Copyright (C) 2003 Jens Dagerbo + 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. +*/ +#include "KDevCoreIface.h" +#include "kdevcore.h" + +#include "urlutil.h" + +/////////////////////////////////////////////////////////////////////////////// +// class Context +/////////////////////////////////////////////////////////////////////////////// + +Context::Context() +{ +} + +Context::~Context() +{ +} + +bool Context::hasType( int aType ) const +{ + return aType == this->type(); +} + +/////////////////////////////////////////////////////////////////////////////// +// class EditorContext +/////////////////////////////////////////////////////////////////////////////// + +class EditorContext::Private +{ +public: + Private( const KURL &url, int line, int col, const TQString &linestr, + const TQString &wordstr ) + : m_url(url), m_line(line), m_col(col), + m_linestr(linestr), m_wordstr(wordstr) + { + } + + KURL m_url; + int m_line, m_col; + TQString m_linestr, m_wordstr; +}; + +EditorContext::EditorContext( const KURL &url, int line, int col, + const TQString &linestr, const TQString &wordstr ) + : Context(), d( new Private(url, line, col, linestr, wordstr) ) +{ +} + +EditorContext::~EditorContext() +{ + delete d; + d = 0; +} + +int EditorContext::type() const +{ + return Context::EditorContext; +} + +const KURL &EditorContext::url() const +{ + return d->m_url; +} + +int EditorContext::line() const +{ + return d->m_line; +} + +int EditorContext::col() const +{ + return d->m_col; +} + +TQString EditorContext::currentLine() const +{ + return d->m_linestr; +} + +TQString EditorContext::currentWord() const +{ + return d->m_wordstr; +} + +/////////////////////////////////////////////////////////////////////////////// +// class FileContext +/////////////////////////////////////////////////////////////////////////////// + +class FileContext::Private +{ +public: + Private( const KURL::List &someURLs ) : m_urls(someURLs) + { + if (m_urls.count() == 0) + { + m_fileName = "INVALID-FILENAME"; + m_isDirectory = false; // well, "true" should be ok too ... + } + else + { + m_fileName = m_urls[0].path(); + m_isDirectory = URLUtil::isDirectory( m_urls[0] ); + } + } + Private( const TQString &fileName, bool isDirectory ) + : m_fileName(fileName), m_isDirectory(isDirectory) + { + } + + KURL::List m_urls; + /// \FIXME the following data members should be removed, but first other + // parts should be modified to comply with this change. + TQString m_fileName; + bool m_isDirectory; +}; + +FileContext::FileContext( const KURL::List &someURLs ) + : Context(), d( new Private(someURLs) ) +{ +} + +FileContext::~FileContext() +{ + delete d; + d = 0; +} + +int FileContext::type() const +{ + return Context::FileContext; +} + +const KURL::List &FileContext::urls() const +{ + return d->m_urls; +} + +/////////////////////////////////////////////////////////////////////////////// +// class DocumentationContext +/////////////////////////////////////////////////////////////////////////////// + +class DocumentationContext::Private +{ +public: + Private( const TQString &url, const TQString &selection ) + : m_url(url), m_selection(selection) + { + } + + TQString m_url; + TQString m_selection; +}; + +DocumentationContext::DocumentationContext( const TQString &url, const TQString &selection ) + : Context(), d( new Private(url, selection) ) +{ +} + +DocumentationContext::DocumentationContext( const DocumentationContext &aContext ) + : Context(), d( 0 ) +{ + *this = aContext; +} + +DocumentationContext &DocumentationContext::operator=( const DocumentationContext &aContext) +{ + if (d) { + delete d; d = 0; + } + d = new Private( *aContext.d ); + return *this; +} + +DocumentationContext::~DocumentationContext() +{ + delete d; + d = 0; +} + +int DocumentationContext::type() const +{ + return Context::DocumentationContext; +} + +TQString DocumentationContext::url() const +{ + return d->m_url; +} + +TQString DocumentationContext::selection() const +{ + return d->m_selection; +} + +/////////////////////////////////////////////////////////////////////////////// +// class CodeModelItemContext +/////////////////////////////////////////////////////////////////////////////// + +class CodeModelItemContext::Private +{ +public: + Private( const CodeModelItem* item ) : m_item( item ) {} + + const CodeModelItem* m_item; +}; + +CodeModelItemContext::CodeModelItemContext( const CodeModelItem* item ) + : Context(), d( new Private(item) ) +{ +} + +CodeModelItemContext::~CodeModelItemContext() +{ + delete d; + d = 0; +} + +int CodeModelItemContext::type() const +{ + return Context::CodeModelItemContext; +} + +const CodeModelItem* CodeModelItemContext::item() const +{ + return d->m_item; +} + +/////////////////////////////////////////////////////////////////////////////// +// class ProjectModelItemContext +/////////////////////////////////////////////////////////////////////////////// + +class ProjectModelItemContext::Private +{ +public: + Private( const ProjectModelItem* item ) : m_item( item ) {} + + const ProjectModelItem* m_item; +}; + +ProjectModelItemContext::ProjectModelItemContext( const ProjectModelItem* item ) + : Context(), d( new Private(item) ) +{ +} + +ProjectModelItemContext::~ProjectModelItemContext() +{ + delete d; + d = 0; +} + +int ProjectModelItemContext::type() const +{ + return Context::ProjectModelItemContext; +} + +const ProjectModelItem* ProjectModelItemContext::item() const +{ + return d->m_item; +} + + +/////////////////////////////////////////////////////////////////////////////// +// class KDevCore +/////////////////////////////////////////////////////////////////////////////// + +KDevCore::KDevCore( TQObject *parent, const char *name ) + : TQObject( parent, name ) +{ + new KDevCoreIface(this); +} + +KDevCore::~KDevCore() +{ +} + +#include "kdevcore.moc" diff --git a/lib/interfaces/kdevcore.h b/lib/interfaces/kdevcore.h new file mode 100644 index 00000000..fad2891a --- /dev/null +++ b/lib/interfaces/kdevcore.h @@ -0,0 +1,388 @@ +/* This file is part of the KDE project + Copyright (C) 2001-2002 Matthias Hoelzer-Kluepfel + Copyright (C) 2001-2002 Bernd Gehrmann + Copyright (C) 2001 Sandy Meier + Copyright (C) 2002 Daniel Engelschalt + Copyright (C) 2002 Simon Hausmann + Copyright (C) 2002-2003 Roberto Raggi + Copyright (C) 2003 Mario Scalas + Copyright (C) 2003 Harald Fernengel + Copyright (C) 2003 Hamish Rodda + 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 KDEVCORE_H +#define KDEVCORE_H + +/** +@file kdevcore.h +The interface to the application core and context menu classes. +*/ + +#include +#include +#include + +#include + +class KDialogBase; +class KDevPlugin; +class CodeModelItem; +class ProjectModelItem; + +namespace KParts +{ + class Part; +} + +class TQStatusBar; +class TQPopupMenu; + +/** +Base class for every context. +Think of a Context-based class as "useful +info associated to a context menu". Several context menu can be defined, +each defining different information: because of these context menus being +used in many modules, they are defined here. + +When context menu with a certain "context" associated appears, KDevelop core +sends a notification signal and all plugins which receive this signal have +the ability to add own items into the menu. For example, VCS plugin could +add "commit" and "update" menu items to the context menu of a file. + +How to use context from a plugin: +-# Create a popup menu in context menu event handler: @code TDEPopupMenu menu(this); @endcode +-# Create a context: @code MyContext context(param). @endcode +-# Fill a context menu: @code core()->fillContextMenu(&menu, &context); @endcode +-# Show the popup menu: @code menu.exec(event->globalPos()); @endcode +. +In this example @em event is an object of TQContextMenuEvent class which you have access +to if you reimplement TQWidget::contextMenuEvent method. + +How to fill context menu from a plugin: +-# Create a @code contextMenu(TQPopupMenu *, const Context *) @endcode slot in your plugin class. +-# Connect KDevCore::contextMenu(TQPopupMenu *, const Context *) signal to that slot in +the constructor of your plugin:\n +@code +connect(core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), + this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *))); +@endcode +-# Fill the menu in the slot you created, for example:\n +@code +if (context->hasType(Context::EditorContext)) +{ + const EditorContext *econtext = static_cast(context); + int id = popup->insertItem(i18n("My Menu Item 1"), this, TQT_SLOT(myMenuAction1())); + popup->setWhatsThis(id, i18n("What's this for my menu item 1")); +} +else if context->hasType(MyContext)) +{ + int id = popup->insertItem(... + ... +} +... +@endcode +*/ +class Context +{ +public: + /**Pre-defined context types. More may be added so it is possible to add custom + contexts. We reserve enum values until 1000 (yeah, it is one thousand ) + for tdevelop official context types.*/ + enum Type + { + EditorContext, /** + + 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 "kdevdesignerintegration.h" +#include "kdevdesignerintegrationiface.h" + +class KDevDesignerIntegration::KDevDesignerIntegrationPrivate { +public: + KDevDesignerIntegrationIface *m_iface; +}; + +KDevDesignerIntegration::KDevDesignerIntegration(TQObject *parent, const char *name) + : TQObject(parent, name) +{ + dptr = new KDevDesignerIntegrationPrivate(); + + dptr->m_iface = new KDevDesignerIntegrationIface(this); +} + +KDevDesignerIntegration::~KDevDesignerIntegration() +{ + delete dptr; +} + +#include "kdevdesignerintegration.moc" diff --git a/lib/interfaces/kdevdesignerintegration.h b/lib/interfaces/kdevdesignerintegration.h new file mode 100644 index 00000000..528926cb --- /dev/null +++ b/lib/interfaces/kdevdesignerintegration.h @@ -0,0 +1,98 @@ +/* This file is part of the KDE project + 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 KDEVDESIGNERINTEGRATION_H +#define KDEVDESIGNERINTEGRATION_H + +#include +#include +#include + +/** +@file kdevdesignerintegration.h +TDevelop designer integration interface. +*/ + +/** +TDevelop designer integration interface. +Designer integration object provides functionality which is used by integrated +into KDevelop GUI designers: +- adding/removing/editing functions (class methods); +- opening form implementation files; +- saving and loading designer integration settings. +. + +Designer integration is a layer between visual form (GUI) designer of any type +and the current language support. Usually designers create some kind of forms +and allow developers to define actions which are executed upon some GUI events +(for example, TQt Designer allows to define slots connected to GUI signals). +The actual code with action implementations needs to be written by hand in source +files. Designer integration captures such implementation requests and opens +necessary files at desired line numbers and adds (edits, removes) code for implementations. + +For example, TQt Designer integration should be able to create an subclass for a form +and reimplement slots defined in the form. +*/ +class KDevDesignerIntegration : public TQObject +{ +Q_OBJECT + +public: + /**Constructor. + @param parent Parent object. + @param name Internal name.*/ + KDevDesignerIntegration(TQObject *parent = 0, const char *name = 0); + /**Destructor.*/ + ~KDevDesignerIntegration(); + + /**Saves designer integration settings.*/ + virtual void saveSettings(TQDomDocument dom, TQString path) = 0; + /**Loads designer integration settings.*/ + virtual void loadSettings(TQDomDocument dom, TQString path) = 0; + +public slots: + /**Adds the implementation for a function. + @param formName The name of a GUI form. + @param function The function which needs to be implemented in the source.*/ + virtual void addFunction(const TQString &formName, KInterfaceDesigner::Function function) = 0; + + /**Removes the implementation of a function. + @param formName The name of a GUI form. + @param function The function which needs to be removed from the source.*/ + virtual void removeFunction(const TQString &formName, KInterfaceDesigner::Function function) = 0; + + /**Edites the implementation of a function. + @param formName The name of a GUI form. + @param oldFunction The function which needs to be edited from the source. + @param function The new function declaration.*/ + virtual void editFunction(const TQString &formName, KInterfaceDesigner::Function oldFunction, KInterfaceDesigner::Function function) = 0; + + /**Opens the function and jumps to the line number of its definition (declaration). + @param formName The name of a GUI form. + @param functionName The name of a function to find in the source.*/ + virtual void openFunction(const TQString &formName, const TQString &functionName) = 0; + + /**Opens the form source. + @param formName The name of a GUI form.*/ + virtual void openSource(const TQString &formName) = 0; + private: + class KDevDesignerIntegrationPrivate; + KDevDesignerIntegrationPrivate *dptr; +}; + +#endif diff --git a/lib/interfaces/kdevdesignerintegrationiface.cpp b/lib/interfaces/kdevdesignerintegrationiface.cpp new file mode 100644 index 00000000..964ca340 --- /dev/null +++ b/lib/interfaces/kdevdesignerintegrationiface.cpp @@ -0,0 +1,63 @@ +/* This file is part of the KDE project + Copyright (C) 2005 Ian Reinhart Geiser + + 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 "kdevdesignerintegrationiface.h" +#include +#include "kdevdesignerintegration.h" + +KDevDesignerIntegrationIface::KDevDesignerIntegrationIface(KDevDesignerIntegration *p) + : DCOPObject("GUIDesigner"), m_designer(p) +{ + //FIXME figure out what number our interface is... +} + + +KDevDesignerIntegrationIface::~KDevDesignerIntegrationIface() +{ +} + +void KDevDesignerIntegrationIface::addFunction( const TQString & formName, TQString returnType, TQString function, TQString specifier, TQString access, uint type ) +{ + KInterfaceDesigner::Function f = {returnType, function, specifier, access, (KInterfaceDesigner::FunctionType)type }; + m_designer->addFunction(formName, f); +} + +void KDevDesignerIntegrationIface::removeFunction( const TQString & formName, TQString returnType, TQString function, TQString specifier, TQString access, uint type ) +{ + KInterfaceDesigner::Function f = {returnType, function, specifier, access, (KInterfaceDesigner::FunctionType)type }; + m_designer->addFunction(formName, f); +} + +void KDevDesignerIntegrationIface::editFunction( const TQString & formName, TQString oldReturnType, TQString oldFunction, TQString oldSpecifier, TQString oldAccess, uint oldType, TQString returnType, TQString function, TQString specifier, TQString access, uint type ) +{ + KInterfaceDesigner::Function fold = {oldReturnType, oldFunction, oldSpecifier, oldAccess, (KInterfaceDesigner::FunctionType)oldType }; + KInterfaceDesigner::Function fnew = {returnType, function, specifier, access, (KInterfaceDesigner::FunctionType)type }; + m_designer->editFunction(formName,fold,fnew); +} + +void KDevDesignerIntegrationIface::openFunction( const TQString & formName, const TQString & functionName ) +{ + m_designer->openFunction(formName,functionName); +} + +void KDevDesignerIntegrationIface::openSource( const TQString & formName ) +{ + m_designer->openSource(formName); +} + + diff --git a/lib/interfaces/kdevdesignerintegrationiface.h b/lib/interfaces/kdevdesignerintegrationiface.h new file mode 100644 index 00000000..c6c8988a --- /dev/null +++ b/lib/interfaces/kdevdesignerintegrationiface.h @@ -0,0 +1,49 @@ +/* I am drunk. + Copyright (C) 2005 Ian Reinhart Geiser + + 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 KDEVDESIGNERINTEGRATIONIFACE_H +#define KDEVDESIGNERINTEGRATIONIFACE_H + +#include +class KDevDesignerIntegration; +/** +The dcop interface for GUI designers in KDevelop. + +@author KDevelop Authors +*/ +class KDevDesignerIntegrationIface : public DCOPObject +{ + K_DCOP +public: + KDevDesignerIntegrationIface(KDevDesignerIntegration *p); + + ~KDevDesignerIntegrationIface(); +k_dcop: + void addFunction(const TQString &formName, TQString returnType, TQString function,TQString specifier,TQString access,uint type); + void removeFunction(const TQString &formName, TQString returnType, TQString function,TQString specifier,TQString access,uint type); + void editFunction(const TQString &formName, TQString oldReturnType, TQString oldFunction, + TQString oldSpecifier,TQString oldAccess,uint oldType, + TQString returnType, TQString function,TQString specifier,TQString access,uint type); + void openFunction(const TQString &formName, const TQString &functionName); + void openSource(const TQString &formName); + + private: + KDevDesignerIntegration *m_designer; +}; + +#endif diff --git a/lib/interfaces/kdevgenericfactory.h b/lib/interfaces/kdevgenericfactory.h new file mode 100644 index 00000000..6f8d3dc9 --- /dev/null +++ b/lib/interfaces/kdevgenericfactory.h @@ -0,0 +1,91 @@ +/* This file is part of the KDE project + * Copyright (C) 2003 Harald Fernengel + * 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. + */ +#include +#include + +/** +@file kdevgenericfactory.h +KDevelop generic plugin factory. +*/ + +/** +This class provides a generic implementation of a KLibFactory for +use with TDevelop plugins. +Usually it is convenient to use K_EXPORT_COMPONENT_FACTORY macro +to create factories for TDevelop plugins. For example, for DummyPlugin +the factory can be created (in dummyplugin.cpp file) as: +@code +typedef KDevGenericFactory DummyPluginFactory; +K_EXPORT_COMPONENT_FACTORY(libkdevdummyplugin, DummyPluginFactory( data ) ) +@endcode +Data should be a const static object. This way it complies with the requirements +for data objecs of KDevGenericFactory constructor. + +Important:
    +There is no need to create @ref TDEAboutData objects. It is more useful to create +a static const @ref KDevPluginInfo object which can be used also in the constructor +of a plugin. + +For example, dummyplugin.cpp file could contain: +@code +#include + +static const KDevPluginInfo data("KDevDummyPlugin"); +typedef KDevGenericFactory DummyPluginFactory; +K_EXPORT_COMPONENT_FACTORY(libkdevdummyplugin, DummyPluginFactory( data ) ) + +DummyPlugin::DummyPlugin(TQObject *parent, const char *name, const TQStringList & ) + :KDevPlugin(&data, parent, name) +{ +} +@endcode + +In the example above the duplication of information is avoided as same @ref KDevPluginInfo +objects are used for plugin and for plugin factory. This is possible because @ref KDevPluginInfo +class has an operator to cast @ref KDevPluginInfo to @ref TDEAboutData. +*/ +template +class KDevGenericFactory: public KGenericFactory +{ +public: + /**Constructor. + @param data A reference to TDEAboutData with an information about the plugin. + Data should have: + - plugin name as an application name; + - untranslated plugin generic name as a product name; + - license type number. + . + data object should live as long as factory lives.*/ + KDevGenericFactory(TDEAboutData *data) + :KGenericFactory(data->appName()), aboutData(data) + { + } + + /**Creates an instance.*/ + TDEInstance *createInstance() + { + return new TDEInstance(aboutData); + } + +private: + TDEAboutData *aboutData; + +}; + diff --git a/lib/interfaces/kdevlanguagesupport.cpp b/lib/interfaces/kdevlanguagesupport.cpp new file mode 100644 index 00000000..aa5b560c --- /dev/null +++ b/lib/interfaces/kdevlanguagesupport.cpp @@ -0,0 +1,166 @@ +/* This file is part of the KDE project + Copyright (C) 2001 Matthias Hoelzer-Kluepfel + Copyright (C) 2001-2002 Bernd Gehrmann + Copyright (C) 2002-2003 Roberto Raggi + Copyright (C) 2002 Simon Hausmann + Copyright (C) 2002 F@lk Brettschneider + Copyright (C) 2003 Alexander Dymo + 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 "codemodel.h" + +#include + +#include "kdevdesignerintegration.h" +#include "kdevlanguagesupport.h" + +KDevLanguageSupport::KDevLanguageSupport(const KDevPluginInfo *info, TQObject *parent, const char *name) + : KDevPlugin(info, parent, name ? name : "KDevLanguageSupport" ) +{ +} + +KDevLanguageSupport::~KDevLanguageSupport() +{ +} + +KDevLanguageSupport::Features KDevLanguageSupport::features() +{ + return Features(0); +} + +KMimeType::List KDevLanguageSupport::mimeTypes() +{ + return KMimeType::List(); +} + +TQString KDevLanguageSupport::formatTag( const Tag& /*tag*/ ) +{ + return TQString(); +} + +TQString KDevLanguageSupport::formatClassName(const TQString &name) +{ + return name; +} + +TQString KDevLanguageSupport::unformatClassName(const TQString &name) +{ + return name; +} + +bool KDevLanguageSupport::shouldSplitDocument(const KURL &url) +{ + return false; +} + +Qt::Orientation KDevLanguageSupport::splitOrientation() const +{ + return Qt::Vertical; +} + +void KDevLanguageSupport::addClass() +{ +} + +void KDevLanguageSupport::addMethod( ClassDom /*klass*/ ) +{ +} + +void KDevLanguageSupport::implementVirtualMethods( ClassDom /*klass*/ ) +{ +} + +void KDevLanguageSupport::addAttribute( ClassDom /*klass*/ ) +{ +} + +TQStringList KDevLanguageSupport::subclassWidget(const TQString& /*formName*/) +{ + return TQStringList(); +} + +TQStringList KDevLanguageSupport::updateWidget(const TQString& /*formName*/, const TQString& /*fileName*/) +{ + return TQStringList(); +} + +TQString KDevLanguageSupport::formatModelItem( const CodeModelItem *item, bool /*shortDescription*/ ) +{ + return item->name(); +} + +void KDevLanguageSupport::addFunction( DesignerType type, const TQString & formName, Function function ) +{ +// kdDebug() << "KDevLanguageSupport::addFunction: 1" << endl; + KDevDesignerIntegration *designerIntegration = designer(type); +// kdDebug() << "KDevLanguageSupport::addFunction: 2" << endl; + if (!designerIntegration) + { +// kdDebug() << "KDevLanguageSupport::addFunction: x" << endl; + return; + } +// kdDebug() << "KDevLanguageSupport::addFunction: 3" << endl; + designerIntegration->addFunction(formName, function); +// kdDebug() << "KDevLanguageSupport::addFunction: 4" << endl; +} + +void KDevLanguageSupport::editFunction( DesignerType type, const TQString & formName, Function oldFunction, Function function ) +{ + KDevDesignerIntegration *designerIntegration = designer(type); + if (!designerIntegration) + return; + designerIntegration->editFunction(formName, oldFunction, function); +} + +void KDevLanguageSupport::removeFunction( DesignerType type, const TQString & formName, Function function ) +{ + KDevDesignerIntegration *designerIntegration = designer(type); + if (!designerIntegration) + return; + designerIntegration->removeFunction(formName, function); +} + +KDevDesignerIntegration * KDevLanguageSupport::designer( DesignerType // type + ) +{ + return 0; +} + +void KDevLanguageSupport::openFunction( DesignerType type, const TQString & formName, const TQString & functionName ) +{ + KDevDesignerIntegration *designerIntegration = designer(type); + if (!designerIntegration) + return; + designerIntegration->openFunction(formName, functionName); +} + +void KDevLanguageSupport::createAccessMethods( ClassDom // theClass + , VariableDom // theVariable + ) +{ +} + +void KDevLanguageSupport::openSource( DesignerType type, const TQString & formName) +{ + KDevDesignerIntegration *designerIntegration = designer(type); + if (!designerIntegration) + return; + designerIntegration->openSource(formName); +} + +#include "kdevlanguagesupport.moc" diff --git a/lib/interfaces/kdevlanguagesupport.h b/lib/interfaces/kdevlanguagesupport.h new file mode 100644 index 00000000..42221868 --- /dev/null +++ b/lib/interfaces/kdevlanguagesupport.h @@ -0,0 +1,261 @@ +/* This file is part of the KDE project + Copyright (C) 2001 Matthias Hoelzer-Kluepfel + Copyright (C) 2001-2002 Bernd Gehrmann + Copyright (C) 2002-2003 Roberto Raggi + Copyright (C) 2002 Simon Hausmann + Copyright (C) 2002 F@lk Brettschneider + Copyright (C) 2003 Amilcar do Carmo Lucas + Copyright (C) 2003-2004 Alexander Dymo + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; see the file COPYING.LIB. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ +#ifndef KDEVLANGUAGESUPPORT_H +#define KDEVLANGUAGESUPPORT_H + +#include +#include +#include +#include "kdevplugin.h" +#include "codemodel.h" +#include + +/** +@file kdevlanguagesupport.h +Interface to programming language specific features. +*/ + +class Tag; +class KDevDesignerIntegration; + +using namespace KInterfaceDesigner; + +/** +KDevelop language support interface - the base class for all programming language support plugins. +Language support is used to load facilities specific to certain programming language. +Language supports are usually loaded among with a project. In this case project file defines +which language support to load. + +Language support plugin is a good place for: +- a language parser which fills memory and persistent symbol store +(see @ref CodeModel and @ref KDevCodeRepository); +- code wizards specific to a programming language (like new class wizard); +- GUI designer integration (see @ref KDevLanguageSupport::designer method +documentation and @ref KDevDesignerIntegration class documentation; +- symbol (class, function, etc.) name formatting to a human-readable convention (pretty +formatted name). +. +*/ +class KDevLanguageSupport: public KDevPlugin +{ + Q_OBJECT + + +public: + + /**Features supported by this language support.*/ + enum Features { + /*features of the language itself*/ + Classes=1 /**loadSettings(*project()->projectDom(), "kdevmylangsupport/designerintegration"); + saveDesignerToCache(type, des); + } + break; + } + return des; + @endcode + @ref ImplementationWidget and @ref TQtDesignerIntegration classes are available + from designerintegration support library. + @param type The type of the designer to integrate. + @return The pointer to designer integration of given type or 0.*/ + virtual KDevDesignerIntegration *designer(KInterfaceDesigner::DesignerType type); + +public slots: + /**Adds a function requested by a GUI designer. No need to reimplement this slot + unless you want to use specific implementation of KDevDesignerIntegration interface. + @param type The type of integrated designer. + @param formName The name of a GUI form. + @param function The function to implement (add).*/ + void addFunction(DesignerType type, const TQString &formName, Function function); + + /**Removes a function requested by a GUI designer. No need to reimplement this slot + unless you want to use specific implementation of KDevDesignerIntegration interface. + @param type The type of integrated designer. + @param formName The name of a GUI form. + @param function The function to remove.*/ + void removeFunction(DesignerType type, const TQString &formName, Function function); + + /**Edits a function requested by a GUI designer. No need to reimplement this slot + unless you want to use specific implementation of KDevDesignerIntegration interface. + @param type The type of integrated designer. + @param formName The name of a GUI form. + @param oldFunction The old function signature before editing. + @param function The new function signature after editing.*/ + void editFunction(DesignerType type, const TQString &formName, Function oldFunction, Function function); + + /**Opens a function requested by a GUI designer. No need to reimplement this slot + unless you want to use specific implementation of KDevDesignerIntegration interface. + @param type The type of integrated designer. + @param formName The name of a GUI form. + @param functionName The name of a function to seek in the code for.*/ + void openFunction(DesignerType type, const TQString &formName, const TQString &functionName); + + /**Opens a form source requested by a GUI designer. No need to reimplement this slot + unless you want to use specific implementation of KDevDesignerIntegration interface. + @param type The type of integrated designer. + @param formName The name of a GUI form.*/ + void openSource(DesignerType type, const TQString &formName); + +signals: + /**Emitted when the content of the memory symbol store has been modified.*/ + void updatedSourceInfo(); + + /**Emitted before removing the file from the memory symbol store.*/ + void aboutToRemoveSourceInfo(const TQString& fileName); + + /**Emitted when a file has been removed from the memory symbol store.*/ + void removedSourceInfo(const TQString& fileName); + + /**Emitted when a file has been added to the memory symbol store.*/ + void addedSourceInfo( const TQString& fileName ); + + /**Emitted when the language part changes the Split View orientation.*/ + void splitOrientationChanged( Qt::Orientation orientation ); +}; + +#endif diff --git a/lib/interfaces/kdevmainwindow.cpp b/lib/interfaces/kdevmainwindow.cpp new file mode 100644 index 00000000..4b95f669 --- /dev/null +++ b/lib/interfaces/kdevmainwindow.cpp @@ -0,0 +1,28 @@ +/* This file is part of the KDE project + Copyright (C) 2002 F@lk Brettschneider + Copyright (C) 2003 John Firebaugh + + 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 "kdevmainwindow.h" + +#include +#include + +KStatusBar *KDevMainWindow::statusBar() +{ + return main()->statusBar(); +} diff --git a/lib/interfaces/kdevmainwindow.h b/lib/interfaces/kdevmainwindow.h new file mode 100644 index 00000000..8138ab78 --- /dev/null +++ b/lib/interfaces/kdevmainwindow.h @@ -0,0 +1,101 @@ +/* This file is part of the KDE project + Copyright (C) 2003 F@lk Brettschneider + Copyright (C) 2003 John Firebaugh + Copyright (C) 2003 Amilcar do Carmo Lucas + 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 KDEV_MAINWINDOW_H +#define KDEV_MAINWINDOW_H + +#include + +class TQWidget; +class KStatusBar; +class TDEMainWindow; + +/** +@file kdevmainwindow.h +KDevelop main window interface. +*/ + +/** +KDevelop main window interface. +Provides methods to control the main window of an application. +*/ +class KDevMainWindow +{ +public: + /**Destroys the main window*/ + virtual ~KDevMainWindow() {} // must be virtual! + + /**Embeds a view of a part into the main window. + @param view The view to embed. Must be a KPart. + @param title The title of a view. + @param toolTip The tooltip of a view.*/ + virtual void embedPartView(TQWidget *view, const TQString &title, const TQString& toolTip = TQString()) = 0; + + /**Embeds a toolview at the left of the main window. + @param view The view to embed. Must be a KPart. + @param title The title of a view. + @param toolTip The tooltip of a view.*/ + virtual void embedSelectView(TQWidget *view, const TQString &title, const TQString &toolTip) = 0; + + /**Embeds a toolview at the bottom of the main window. + @param view The view to embed. Must be a KPart. + @param title The title of a view. + @param toolTip The tooltip of a view.*/ + virtual void embedOutputView(TQWidget *view, const TQString &title, const TQString &toolTip) = 0; + + /**Embeds a toolview at the right of the main window. + @param view The view to embed. Must be a KPart. + @param title The title of a view. + @param toolTip The tooltip of a view.*/ + virtual void embedSelectViewRight(TQWidget* view, const TQString& title, const TQString &toolTip) = 0; + + /**Removes a view from the main window. + @param view The view to remove.*/ + virtual void removeView(TQWidget *view) = 0; + + /**Shows or hides a view. + @param pView The view to show or hide. + @param bEnabled true if view should be shown, false it it is not.*/ + virtual void setViewAvailable(TQWidget *pView, bool bEnabled) = 0; + + /**Raises a view (shows it if it was minimized). + @param view The view to be raised.*/ + virtual void raiseView(TQWidget *view) = 0; + + /**Minimize a view. + @param view The view to be lowered.*/ + virtual void lowerView(TQWidget *view) = 0; + + /**Loads main window settings.*/ + virtual void loadSettings() = 0; + + /**Sets the current document's caption, if applicable. + @param caption the caption to set.*/ + virtual void setCurrentDocumentCaption( const TQString &caption ) = 0; + + /**@return TDEMainWindow object which actually represents the main window.*/ + virtual TDEMainWindow *main() = 0; + + /**@return KStatusBar object which actually represents the status bar in the main window.*/ + KStatusBar *statusBar(); +}; + +#endif diff --git a/lib/interfaces/kdevpartcontroller.cpp b/lib/interfaces/kdevpartcontroller.cpp new file mode 100644 index 00000000..58f1dc2a --- /dev/null +++ b/lib/interfaces/kdevpartcontroller.cpp @@ -0,0 +1,30 @@ +/* This file is part of the KDE project + Copyright (C) 2002 Matthias Hoelzer-Kluepfel + + 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 "KDevPartControllerIface.h" +#include "kdevpartcontroller.h" +#include "katedocumentmanagerinterface.h" + +KDevPartController::KDevPartController(TQWidget *parent) + : KParts::PartManager(parent) +{ + new KDevPartControllerIface(this); + new KateDocumentManagerInterface(this); +} + +#include "kdevpartcontroller.moc" diff --git a/lib/interfaces/kdevpartcontroller.h b/lib/interfaces/kdevpartcontroller.h new file mode 100644 index 00000000..fd8e6830 --- /dev/null +++ b/lib/interfaces/kdevpartcontroller.h @@ -0,0 +1,176 @@ +/* This file is part of the KDE project + Copyright (C) 2002 Matthias Hoelzer-Kluepfel + Copyright (C) 2002 Bernd Gehrmann + Copyright (C) 2003 Roberto Raggi + Copyright (C) 2003 Hamish Rodda + Copyright (C) 2003 Harald Fernengel + Copyright (C) 2003 Jens Dagerbo + 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 KDEV_PARTCONTROLLER_H +#define KDEV_PARTCONTROLLER_H + +#include +#include +#include + +/** +@file kdevpartcontroller.h +KDevelop part controller interface. +*/ + +namespace KParts +{ + class ReadOnlyPart; +} + +/**Document state enum.*/ +enum DocumentState +{ + Clean, /** + Copyright (C) 2002 Matthias Hoelzer-Kluepfel + Copyright (C) 2002 Harald Fernengel + Copyright (C) 2002 F@lk Brettschneider + Copyright (C) 2003 Julian Rockey + Copyright (C) 2003 Roberto Raggi + Copyright (C) 2003 Jens Dagerbo + Copyright (C) 2003 Mario Scalas + 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. +*/ +#include "kdevplugin.h" + +#include "kdevapi.h" +#include "kdevcore.h" +#include "kdevplugininfo.h" +#include "kdevpartcontroller.h" +#include "kdevplugincontroller.h" + +#include +#include +#include + +#include +#include + +#include + +/////////////////////////////////////////////////////////////////////////////// +// struct KDevPlugin::Private +/////////////////////////////////////////////////////////////////////////////// + +struct KDevPlugin::Private +{ + const KDevPluginInfo *info; +}; + +/////////////////////////////////////////////////////////////////////////////// +// class KDevPlugin +/////////////////////////////////////////////////////////////////////////////// + +KDevPlugin::KDevPlugin(const KDevPluginInfo *info, TQObject *parent, const char *name) + :TQObject(parent, name), d(new Private) +{ + assert(parent->inherits( "KDevApi" )); + m_api = static_cast( parent ); + + actionCollection()->setHighlightingEnabled( true ); + + d->info = info; + TDEGlobal::iconLoader()->addAppDir("tdevelop"); +} + +KDevPlugin::~KDevPlugin() +{ + delete( d ); +} + +KDevMainWindow *KDevPlugin::mainWindow() +{ + return m_api->mainWindow(); +} + +KDevCore *KDevPlugin::core() const +{ + return m_api->core(); +} + +KDevProject *KDevPlugin::project() const +{ + return m_api->project(); +} + +CodeModel *KDevPlugin::codeModel() const +{ + return m_api->codeModel(); +} + +TQDomDocument *KDevPlugin::projectDom() const +{ + return m_api->projectDom(); +} + +KDevLanguageSupport *KDevPlugin::languageSupport() const +{ + return m_api->languageSupport(); +} + +KDevPartController *KDevPlugin::partController() const +{ + return m_api->partController(); +} + +KDevPluginController *KDevPlugin::pluginController() const +{ + return m_api->pluginController(); +} + +void KDevPlugin::restorePartialProjectSession(const TQDomElement* /*el*/) +{ + // there's still nothing to do in the base class +} + +void KDevPlugin::savePartialProjectSession(TQDomElement* /*el*/) +{ + // there's still nothing to do in the base class +} + +KDevCodeRepository * KDevPlugin::codeRepository() const +{ + return m_api->codeRepository(); +} + +KDevPlugin * KDevPlugin::extension_internal(const TQString &serviceType, const TQString &constraint) +{ + return m_api->pluginController()->extension(serviceType, constraint); +} + +const KDevPluginInfo *KDevPlugin::info() +{ + return d->info; +} + +#include "kdevplugin.moc" diff --git a/lib/interfaces/kdevplugin.h b/lib/interfaces/kdevplugin.h new file mode 100644 index 00000000..31cc5550 --- /dev/null +++ b/lib/interfaces/kdevplugin.h @@ -0,0 +1,201 @@ +/* This file is part of the KDE project + Copyright (C) 1999-2001 Bernd Gehrmann + 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 KDEVPLUGIN_H +#define KDEVPLUGIN_H + +#include +#include +#include "kdevapi.h" + +class KDevCore; +class KDevProject; +class KDevVersionControl; +class KDevLanguageSupport; +class KDevPartController; +class KDevMainWindow; +class KDevCodeRepository; +class CodeModel; +class KDevPluginInfo; +class TQDomElement; + +/** +@file kdevplugin.h +TDevelop plugin interface. +*/ + +/**Current TDevelop plugin interface version. Interfaces declare plugin version to make sure +old source (or binary) incompatible plugins are not loaded. Increase this if +it is necessary that old plugins stop working.*/ +#define TDEVELOP_PLUGIN_VERSION 5 + +/** +The base class for all TDevelop plugins. +Plugin is a component which is loaded into TDevelop shell at startup or by request. +Each plugin should have corresponding .desktop file with a description. +.desktop file template looks like: +@code +[Desktop Entry] +Encoding=UTF-8 +Type=Service +Name= +GenericName= +Comment= +Icon= +X-TDevelop-Plugin-Version= +X-TDevelop-Plugin-Homepage= +X-TDevelop-Plugin-BugsEmailAddress= +X-TDevelop-Plugin-Copyright= +X-TDE-Library= +X-TDevelop-Version= +X-TDevelop-Scope= +X-TDevelop-Properties= +X-TDevelop-Args= +@endcode +Description of parameters in .desktop file: +- Name is a non-translatable name of a plugin, it is used in TDETrader queries +to search for a plugin (required); +- GenericName is a translatable name of a plugin, it is used to show +plugin names in GUI (required); +- Comment is a short description about the plugin (optional); +- Icon is a plugin icon (preferred); +- X-TDevelop-Plugin-Version is a version of a plugin (optional); +- X-TDevelop-Plugin-Homepage is a home page of a plugin (optional); +- X-TDevelop-Plugin-License is a license (optional). can be: GPL, LGPL, BSD, Artistic, +TQPL or Custom. If this property is not set, license is considered as unknown; +- X-TDevelop-Plugin-BugsEmailAddress is an email address for bug reports (optional); +- X-TDevelop-Plugin-Copyright is a copyright statement (optional); +- X-TDE-Library is a name of library which contains the plugin (required); +- X-TDevelop-Version is a version of TDevelop interfaces which is supported by the plugin (required); +- X-TDevelop-Scope is a scope of a plugin (see below for explanation) (required); +- X-TDevelop-Args is a list of additional arguments passed to plugins constructor (optional); +- X-TDevelop-Properties is a list of properties which this plugin supports, see @ref Profile class documentation for explanation (required to work with shells that support profiles). +. +Plugin scope can be either: +- Core +- Global +- Project +. +Global plugins are plugins which require only shell to be loaded and do not operate on @ref KDevProject interface and/or do not use project wide information.\n +Core plugins are global plugins which offer some important "core" functionality and thus +are not selectable by user in plugin configuration pages.\n +Project plugins require a project to be loaded and are usually loaded/unloaded among with the project. +If your plugin use @ref KDevProject interface and/or operate on project-related information then this is the project plugin. + +@sa KDevGenericFactory class documentation for an information about plugin instantiation +and writing factories for plugins. + +@sa KDevCore class documentation for an information about features which are available to plugins +from shell applications. +*/ +class KDevPlugin: public TQObject, public KXMLGUIClient +{ + Q_OBJECT + + +public: + /**Constructs a 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.*/ + KDevPlugin(const KDevPluginInfo *info, TQObject *parent, const char *name = 0); + + /**Destructs a plugin.*/ + virtual ~KDevPlugin(); + + /**Provides an information about the plugin. + @return TDEAboutData object which was initialized in the constructor.*/ + const KDevPluginInfo* info(); + + /**@return A reference to the toplevel widget.*/ + KDevMainWindow *mainWindow(); + + /**@return A reference to the application core - an object which provides + basic functionalities for inter-parts communications / cooperation.*/ + KDevCore *core() const; + + /**@return A reference to the current project component or 0 if no project is loaded.*/ + KDevProject *project() const; + + /**@return A reference to the language support component or 0 if no support available.*/ + KDevLanguageSupport *languageSupport() const; + + /**@return A reference to the memory symbol store.*/ + CodeModel *codeModel() const; + + /**@return A reference to the DOM tree that represents the project file or 0 if no project is loaded.*/ + TQDomDocument *projectDom() const; + + /**@return A reference to the part controller which is used to manipulate loaded KParts.*/ + KDevPartController *partController() const; + + /**@return A reference to the plugin controller which is used to manipulate loaded plugin.*/ + virtual KDevPluginController *pluginController() const; + + /**@return A reference to the code repository (accessor to persistent symbol stores).*/ + KDevCodeRepository* codeRepository() const; + + /**Queries for the plugin which supports given service type (such plugins are called extensions in KDevelop). + All already loaded plugins will be queried and the first loaded one to support + the service type will be returned. Any plugin can be an extension, only "ServiceTypes=..." + entry is required in .desktop file for that plugin. + + Template argument is used as a type to cast the result to. This is done because extension + is usually derived from a certain base class and not directly from KDevPlugin. + @param serviceType The service type of an extension (like "TDevelop/SourceFormatter"). + @param constraint The constraint which is applied when quering for the service. This + constraint is a usual TDETrader constraint statement (like "[X-TDevelop-Foo]=='MyFoo'"). + @return A KDevelop extension plugin for given service type or 0 if no plugin supports it*/ + template + Extension *extension(const TQString &serviceType, const TQString &constraint = "") + { + return static_cast(extension_internal(serviceType, constraint)); + } + + /**Override this base class method to restore any settings which differs from project to project. + Data can be read from a certain subtree of the project session file. + During project loading, respectively project session (.kdevses) loading, + this method will be called to give a chance to adapt the plugin to + the newly loaded project. For instance, the debugger plugin might restore the + list of breakpoints from the previous debug session for the certain project. + @note Take attention to the difference to common not-project-related session stuff. + They belong to the application rc file (tdeveloprc) + @note Project session file is useful for settings which cannot be shared between + developers. If a setting should be shared, modify projectDom instead. + @param el The parent DOM element for plugins session settings.*/ + virtual void restorePartialProjectSession(const TQDomElement* el); + + /**Saves session settings. + @sa restorePartialProjectSession - this is the other way round, the same just for saving.*/ + virtual void savePartialProjectSession(TQDomElement* el); + +private: + KDevPlugin *extension_internal(const TQString &serviceType, const TQString &constraint = ""); + + KDevApi *m_api; + class Private; + Private *d; +}; + +#endif diff --git a/lib/interfaces/kdevplugincontroller.cpp b/lib/interfaces/kdevplugincontroller.cpp new file mode 100644 index 00000000..1cc6caa3 --- /dev/null +++ b/lib/interfaces/kdevplugincontroller.cpp @@ -0,0 +1,49 @@ +/* This file is part of the KDE project + 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. +*/ +#include "kdevplugincontroller.h" + +#include "kdevplugin.h" + +KDevPluginController::KDevPluginController() +{ +} + +TDETrader::OfferList KDevPluginController::query(const TQString &serviceType, + const TQString &constraint) +{ + return TDETrader::self()->query(serviceType, + TQString("%1 and [X-TDevelop-Version] == %2").arg(constraint).arg(TDEVELOP_PLUGIN_VERSION)); +} + +TDETrader::OfferList KDevPluginController::queryPlugins(const TQString &constraint) +{ + return query("TDevelop/Plugin", constraint); +} + +KURL::List KDevPluginController::profileResources(const TQString &/*nameFilter*/) +{ + return KURL::List(); +} + +KURL::List KDevPluginController::profileResourcesRecursive(const TQString &/*nameFilter*/) +{ + return KURL::List(); +} + +#include "kdevplugincontroller.moc" diff --git a/lib/interfaces/kdevplugincontroller.h b/lib/interfaces/kdevplugincontroller.h new file mode 100644 index 00000000..05ee050b --- /dev/null +++ b/lib/interfaces/kdevplugincontroller.h @@ -0,0 +1,119 @@ +/* This file is part of the KDE project + 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 KDEVPLUGINCONTROLLER_H +#define KDEVPLUGINCONTROLLER_H + +#include + +#include +#include + +/** +@file kdevplugincontroller.h +TDevelop plugin controller interface. +*/ + +class KDevPlugin; +class ProfileEngine; + +/** +The base class for TDevelop plugin controller. +Plugin controller is responsible for quering, loading and unloading available plugins. +*/ +class KDevPluginController: public TQObject +{ + Q_OBJECT + +public: + + /** + * Returns a uniquely specified plugin. If it isn't already loaded, it will be. + * Use with caution! See extension for parameter details. + */ + virtual KDevPlugin * loadPlugin( const TQString & serviceType, const TQString & constraint ) = 0; + + /** + * Unloads the plugin specified by @p plugin + * @param plugin The plugin desktopEntryName of the plugin to unload + */ + virtual void unloadPlugin( const TQString & plugin ) = 0; + + /**Unloads plugins specified by @p list. + @param list The list of plugin names to unload. plugin name corresponds + to the "Name" property in plugin .desktop file.*/ + virtual void unloadPlugins(TQStringList const &list) = 0; + + /**@return The list of currently loaded plugins.*/ + virtual const TQValueList loadedPlugins() = 0; + + /**Queries for the plugin which supports given service type. + All already loaded plugins will be queried and the first one to support the service type + will be returned. Any plugin can be an extension, only "ServiceTypes=..." entry is + required in .desktop file for that plugin. + @param serviceType The service type of an extension (like "TDevelop/SourceFormatter") + @param constraint The constraint which is applied when quering for the service. This + constraint is a usual TDETrader constraint statement (like "[X-TDevelop-Foo]=='MyFoo'"). + @return A KDevelop extension plugin for given service type or 0 if no plugin supports it*/ + virtual KDevPlugin *extension(const TQString &serviceType, const TQString &constraint = "") = 0; + + /**Queries KDevelop services. Version is checked automatically + by adding proper X-TDevelop-Version=N statement into the query. + @param serviceType The service type to query, for example "TDevelop/Plugin" or + "TDevelop/SourceFormatter." + @param constraint A constraint for the service. Do not include plugin version number - it + is done automatically. + @return The list of plugin offers.*/ + static TDETrader::OfferList query(const TQString &serviceType, const TQString &constraint); + + /**Queries TDevelop plugins. Works like + KDevPluginController::query with serviceType set to "TDevelop/Plugin". + @param constraint A constraint for the service. Do not include plugin version number - it + is done automatically. + @return The list of plugin offers.*/ + static TDETrader::OfferList queryPlugins(const TQString &constraint); + + /**Reimplement this function only if your shell supports plugin profiles. + @return The list of URLs to the profile resources (files) with given @p extension. + @param nameFilter Name filter for files. @see TQDir::setNameFilter documentation + for name filters syntax.*/ + virtual KURL::List profileResources(const TQString &nameFilter); + + /**Reimplement this function only if your shell supports plugin profiles. + @return The list of URLs to the resources (files) with given @p extension. + This list is obtained by a recursive search that process given profile + and all it's subprofiles. + @param nameFilter Name filter for files. @see TQDir::setNameFilter documentation + for name filters syntax.*/ + virtual KURL::List profileResourcesRecursive(const TQString &nameFilter); + + /** @return The current Profile Engine */ + virtual ProfileEngine &engine() = 0; + +signals: + /**Emitted when a plugin profile was changed (reloaded, other profile opened, etc.). + Should work only on shells with plugin profiles support.*/ + void profileChanged(); + +protected: + /**Constructor.*/ + KDevPluginController(); + +}; + +#endif diff --git a/lib/interfaces/kdevplugininfo.cpp b/lib/interfaces/kdevplugininfo.cpp new file mode 100644 index 00000000..e80385cb --- /dev/null +++ b/lib/interfaces/kdevplugininfo.cpp @@ -0,0 +1,181 @@ +/* This file is part of the KDE project + 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. +*/ +#include "kdevplugininfo.h" + +#include + +#include +#include + +#include "kdevplugincontroller.h" + +struct KDevPluginInfo::Private { + TQString m_pluginName; + TQString m_rawGenericName; + + TQString m_genericName; + TQString m_description; + TQString m_icon; + + TQString m_version; + int m_licenseType; + TQString m_copyrightStatement; + TQString m_homePageAddress; + TQString m_bugsEmailAddress; + + TQValueList m_authors; + TQValueList m_credits; + + TDEAboutData *m_data; +}; + + +KDevPluginInfo::KDevPluginInfo(const TQString &pluginName) + :d(new Private()) +{ + d->m_pluginName = pluginName; + + KService::Ptr offer = KService::serviceByDesktopName(pluginName); + if (offer != 0) + { + d->m_genericName = offer->genericName(); + d->m_icon = offer->icon(); + d->m_description = offer->comment(); + + d->m_rawGenericName = offer->untranslatedGenericName(); + + d->m_version = offer->property("X-TDevelop-Plugin-Version").toString(); + d->m_homePageAddress = offer->property("X-TDevelop-Plugin-Homepage").toString(); + d->m_bugsEmailAddress = offer->property("X-TDevelop-Plugin-BugsEmailAddress").toString(); + d->m_copyrightStatement = offer->property("X-TDevelop-Plugin-Copyright").toString(); + + TQString lic = offer->property("X-TDevelop-Plugin-License").toString(); + if (lic == "GPL") + d->m_licenseType = TDEAboutData::License_GPL; + else if (lic == "LGPL") + d->m_licenseType = TDEAboutData::License_LGPL; + else if (lic == "BSD") + d->m_licenseType = TDEAboutData::License_BSD; + else if (lic == "QPL") + d->m_licenseType = TDEAboutData::License_QPL; + else if (lic == "Artistic") + d->m_licenseType = TDEAboutData::License_Artistic; + else if (lic == "Custom") + d->m_licenseType = TDEAboutData::License_Custom; + else + d->m_licenseType = TDEAboutData::License_Unknown; + + d->m_data = new TDEAboutData(d->m_pluginName.ascii(), d->m_rawGenericName.ascii(), "1", 0, d->m_licenseType); + } + else + kdDebug() << "Unable to load information for plugin: " << pluginName + << ". Check if " << pluginName << ".desktop exists." << endl; +} + + +KDevPluginInfo::operator TDEAboutData *() const +{ + return d->m_data; +} + +TQString KDevPluginInfo::pluginName() const +{ + return d->m_pluginName; +} + +TQString KDevPluginInfo::genericName() const +{ + return d->m_genericName; +} + +TQString KDevPluginInfo::icon() const +{ + return d->m_icon; +} + +TQString KDevPluginInfo::description() const +{ + return d->m_description; +} + +TQString KDevPluginInfo::version() const +{ + return d->m_version; +} + +int KDevPluginInfo::licenseType() const +{ + return d->m_licenseType; +} + +TQString KDevPluginInfo::license() const +{ + KDevPluginInfo &info = *const_cast(this); +// return TDEAboutData(info).license(); + TDEAboutData *data = info; + return data->license(); +} + +TQString KDevPluginInfo::copyrightStatement() const +{ + return d->m_copyrightStatement; +} + +TQString KDevPluginInfo::homePageAddress() const +{ + return d->m_homePageAddress; +} + +TQString KDevPluginInfo::bugsEmailAddress() const +{ + return d->m_bugsEmailAddress; +} + +TQVariant KDevPluginInfo::property(const TQString &name) const +{ + TDETrader::OfferList offers = KDevPluginController::queryPlugins(TQString("Name='%1'").arg(d->m_pluginName)); + if (offers.count() == 1) + return offers.first()->property(name); + return TQVariant(); +} + +TQVariant KDevPluginInfo::operator [](const TQString &name) const +{ + return property(name); +} + +TQStringList KDevPluginInfo::propertyNames( ) const +{ + TDETrader::OfferList offers = KDevPluginController::queryPlugins(TQString("Name='%1'").arg(d->m_pluginName)); + if (offers.count() == 1) + return offers.first()->propertyNames(); + return TQStringList(); +} + +void KDevPluginInfo::addAuthor(const char *name, const char *task, + const char *emailAddress, const char *webAddress) +{ + d->m_authors.append(TDEAboutPerson(name, task, emailAddress, webAddress)); +} + +void KDevPluginInfo::addCredit(const char *name, const char *task, + const char *emailAddress, const char *webAddress) +{ + d->m_credits.append(TDEAboutPerson(name, task, emailAddress, webAddress)); +} diff --git a/lib/interfaces/kdevplugininfo.h b/lib/interfaces/kdevplugininfo.h new file mode 100644 index 00000000..ffd1c46e --- /dev/null +++ b/lib/interfaces/kdevplugininfo.h @@ -0,0 +1,111 @@ +/* This file is part of the KDE project + 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 KDEVPLUGININFO_H +#define KDEVPLUGININFO_H + +#include + +#include + +/** +@file kdevplugininfo.h +TDevelop plugin information container class. +*/ + +/** +Information about TDevelop plugin. +It uses plugin name to query plugin .desktop files and +retrieve most information. Names of authors and credits to other people +must be added manually using KDevPluginInfo::addAuthor and KDevPluginInfo::addCredit +methods. +@sa KDevPlugin class documentation for more information about .desktop files. +*/ +class KDevPluginInfo +{ +public: + /**Constructor. + @param pluginName A name of a plugin. Must be the same as the name of a .desktop file + and the same as the location of plugin resource files.*/ + KDevPluginInfo(const TQString &pluginName); + + /**Casts KDevPluginInfo to TDEAboutData. Uses KDevPluginInfo::pluginName as TDEAboutData::appName, + KDevPluginInfo::rawGenericName as TDEAboutData::programName KDevPluginInfo::licenseType as TDEAboutData::licenseType. Other parameters are ignored.*/ + operator TDEAboutData*() const; + + /**@return A name of a plugin (always untranslated).*/ + TQString pluginName() const; + /**@return A generic name of a plugin (translated). Use this in GUI. Information is taken from .desktop file.*/ + TQString genericName() const; + /**@return An icon name of a plugin. Information is taken from .desktop file.*/ + TQString icon() const; + /**@return A description of a plugin. Information is taken from .desktop file.*/ + TQString description() const; + /**@return A version of a plugin. Information is taken from .desktop file.*/ + TQString version() const; + /**@return A license type of a plugin. Information is taken from .desktop file.*/ + int licenseType() const; + /**@return A license text for known license types (GPL, LGPL, BSD, Artistic, TQPL).*/ + TQString license() const; + /**@return A copyright statement of a plugin. Information is taken from .desktop file.*/ + TQString copyrightStatement() const; + /**@return A home page of a plugin. Information is taken from .desktop file.*/ + TQString homePageAddress() const; + /**@return A email address for bugs of a plugin. Information is taken from .desktop file.*/ + TQString bugsEmailAddress() const; + + /**@param name The name of a property. + @return Any property value which exists in .desktop file.*/ + TQVariant property(const TQString &name) const; + /**@param name The name of a property. + @return Any property value which exists in .desktop file.*/ + TQVariant operator [] (const TQString &name) const; + /**@return A list of property names set in .desktop file.*/ + TQStringList propertyNames() const; + + /**@return A list of plugin authors.*/ + const TQValueList authors() const; + /**@return A list of other plugin contributors.*/ + const TQValueList credits() const; + + /**Adds an author to the list of authors. + You can call this function as many times you need. Each entry is appended to a list. + @param name The developer's name in UTF-8 encoding. + @param task What the person is responsible for. This text can contain newlines. It should be marked for translation like this: I18N_NOOP("Task description..."). Can be 0. + @param emailAddress An Email address where the person can be reached. Can be 0. + @param webAddress The person's homepage or a relevant link. Start the address with "http://". "http://some.domain" is correct, "some.domain" is not. Can be 0.*/ + void addAuthor(const char *name, const char *task, + const char *emailAddress = 0, const char *webAddress = 0); + /**Adds a contributor to the list of contributors. + You can call this function as many times you need. Each entry is appended to a list. + @param name The developer's name in UTF-8 encoding. + @param task What the person is responsible for. This text can contain newlines. It should be marked for translation like this: I18N_NOOP("Task description..."). Can be 0. + @param emailAddress An Email address where the person can be reached. Can be 0. + @param webAddress The person's homepage or a relevant link. Start the address with "http://". "http://some.domain" is correct, "some.domain" is not. Can be 0.*/ + void addCredit(const char *name, const char *task = 0, + const char *emailAddress = 0, const char *webAddress = 0); + +private: + /**Returns the untranslated generic name of a plugin as set in .desktop file.*/ + const char *rawGenericName() const; + + class Private; + Private *d; +}; + +#endif diff --git a/lib/interfaces/kdevproject.cpp b/lib/interfaces/kdevproject.cpp new file mode 100644 index 00000000..e8616df1 --- /dev/null +++ b/lib/interfaces/kdevproject.cpp @@ -0,0 +1,164 @@ +/* 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 Jens Dagerbo + Copyright (C) 2003 Mario Scalas + 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. +*/ + +#include + +#include "kdevproject.h" +#include +#include +#include +#include "kdevprojectiface.h" + +struct KDevProject::Private { + TQMap m_absToRel; + TQStringList m_symlinkList; + TQTimer *m_timer; + KDevProjectIface *m_iface; +}; + +KDevProject::KDevProject(const KDevPluginInfo *info, TQObject *parent, const char *name) + : KDevPlugin(info, parent, name), d(new KDevProject::Private()) +{ + connect( this, TQT_SIGNAL(addedFilesToProject(const TQStringList& )), this, TQT_SLOT(buildFileMap()) ); + connect( this, TQT_SIGNAL(removedFilesFromProject(const TQStringList& )), this, TQT_SLOT(buildFileMap()) ); + + connect( this, TQT_SIGNAL(addedFilesToProject(const TQStringList& )), this, TQT_SLOT(slotAddFilesToFileMap(const TQStringList& )) ); + connect( this, TQT_SIGNAL(removedFilesFromProject(const TQStringList& )), this, TQT_SLOT(slotRemoveFilesFromFileMap(const TQStringList& )) ); + + d->m_timer = new TQTimer(this); + connect(d->m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotBuildFileMap())); + d->m_iface = new KDevProjectIface(this); +} + +KDevProject::~KDevProject() +{ + d->m_timer->stop(); + delete d->m_iface; + delete d->m_timer; + delete d; +} + +void KDevProject::changedFile( const TQString & fileName ) +{ + TQStringList fileList; + fileList.append ( fileName ); + + emit changedFilesInProject( fileList ); + +} + +void KDevProject::changedFiles( const TQStringList & fileList ) +{ + emit changedFilesInProject( fileList ); +} + +KDevProject::Options KDevProject::options() const +{ + return (KDevProject::Options)0; +} + +bool KDevProject::isProjectFile( const TQString & absFileName ) +{ + return d->m_absToRel.contains( absFileName ); +} + +TQString KDevProject::relativeProjectFile( const TQString & absFileName ) +{ + if( isProjectFile(absFileName) ) + return d->m_absToRel[ absFileName ]; + return TQString(); +} + +void KDevProject::buildFileMap() +{ + d->m_timer->stop(); + d->m_timer->start(0, true); +} + +void KDevProject::slotBuildFileMap() +{ + kdDebug(9000) << k_funcinfo << endl; + + d->m_absToRel.clear(); + d->m_symlinkList.clear(); + const TQStringList fileList = allFiles(); + for( TQStringList::ConstIterator it=fileList.begin(); it!=fileList.end(); ++it ) + { + TQFileInfo fileInfo( projectDirectory() + "/" + *it ); + d->m_absToRel[ URLUtil::canonicalPath(fileInfo.absFilePath()) ] = *it; + + if ( URLUtil::canonicalPath( fileInfo.absFilePath() ) != fileInfo.absFilePath() ) + { + d->m_symlinkList << *it; + } + } +} + +void KDevProject::openProject( const TQString & /*dirName*/, const TQString & /*projectName*/ ) +{ + buildFileMap(); +} + +TQStringList KDevProject::symlinkProjectFiles( ) +{ + return d->m_symlinkList; +} + +TQString KDevProject::defaultRunDirectory(const TQString& projectPluginName) const +{ + return DomUtil::readEntry(*projectDom(), "/" + projectPluginName + "/run/globalcwd"); +} + +void KDevProject::slotAddFilesToFileMap( const TQStringList & fileList ) +{ + TQStringList::ConstIterator it = fileList.begin(); + while( it != fileList.end() ) + { + TQFileInfo fileInfo( projectDirectory() + "/" + *it ); + d->m_absToRel[ URLUtil::canonicalPath(fileInfo.absFilePath()) ] = *it; + + if ( URLUtil::canonicalPath( fileInfo.absFilePath() ) != fileInfo.absFilePath() ) + { + d->m_symlinkList << *it; + } + + ++it; + } +} + +void KDevProject::slotRemoveFilesFromFileMap( const TQStringList & fileList ) +{ + TQStringList::ConstIterator it = fileList.begin(); + while( it != fileList.end() ) + { + TQFileInfo fileInfo( projectDirectory() + "/" + *it ); + d->m_absToRel.remove( URLUtil::canonicalPath(fileInfo.absFilePath()) ); + + d->m_symlinkList.remove( *it ); + + ++it; + } +} + +#include "kdevproject.moc" diff --git a/lib/interfaces/kdevproject.h b/lib/interfaces/kdevproject.h new file mode 100644 index 00000000..256b0c0c --- /dev/null +++ b/lib/interfaces/kdevproject.h @@ -0,0 +1,219 @@ +/* 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) 2003 Jens Dagerbo + Copyright (C) 2003 Mario Scalas + 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 KDEVPROJECT_H +#define KDEVPROJECT_H + +#include "kdevplugin.h" +#include "domutil.h" + +#include +#include + +/** +@file kdevproject.h +KDevelop project interface. +*/ + +class TQTimer; + +/** +KDevelop project interface. +Plugins implementing the KDevProject interfaces are used to manage projects. + +Project can be considered as a way of grouping files (in text editors) or +as a way of providing support for a build system (like it is done in TDevelop IDE buildtools). +*/ +class KDevProject: public KDevPlugin +{ + Q_OBJECT + +public: + /**Constructs a project 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.*/ + KDevProject(const KDevPluginInfo *info, TQObject *parent=0, const char *name=0); + /**Destructor.*/ + virtual ~KDevProject(); + + /**Options of the project plugin.*/ + enum Options { + UsesOtherBuildSystem = 0 /**/run/directoryradio == executable + * The directory where the executable is. + * if //run/directoryradio == build + * The build directory. + * if /kdevautoproject/run/directoryradio == custom + * The custom directory absolute path. + * Derived classes are supposed to explicitly call this implementation + */ + TQString defaultRunDirectory(const TQString& projectPluginName) const; + +private slots: + void buildFileMap(); + void slotBuildFileMap(); + void slotAddFilesToFileMap(const TQStringList & fileList ); + void slotRemoveFilesFromFileMap(const TQStringList & fileList ); + +signals: + /**Emitted when a new list of files has been added to the + project. Provided for convenience when many files were added. + @param fileList The file names relative to the project directory.*/ + void addedFilesToProject(const TQStringList& fileList); + + /**Emitted when a list of files has been removed from the project. + Provided for convenience when many files were removed. + @param fileList The file names relative to the project directory.*/ + void removedFilesFromProject(const TQStringList& fileList); + + /**Emitted when a list of files has changed in the project. + @param fileList The file names relative to the project directory.*/ + void changedFilesInProject(const TQStringList& fileList); + + /**Emitted when one compile related command (make, make install, make ...) ends sucessfuly. + Used to reparse the files after a sucessful compilation.*/ + void projectCompiled(); + + /**Emitted when the active directory of the project changes + * @param olddir The old active directory + * @param newdir The new active directory + */ + void activeDirectoryChanged( const TQString& olddir, const TQString& newdir ); + +private: + class Private; + Private *d; +}; + +#endif diff --git a/lib/interfaces/kdevprojectiface.cpp b/lib/interfaces/kdevprojectiface.cpp new file mode 100644 index 00000000..28d4501c --- /dev/null +++ b/lib/interfaces/kdevprojectiface.cpp @@ -0,0 +1,186 @@ + + +/* This file is part of the KDE project + Copyright (C) 2005 Ian Reinhart Geiser + + 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 "kdevprojectiface.h" +#include "kdevproject.h" +#include "domutil.h" + +KDevProjectIface::KDevProjectIface(KDevProject *prj) + : TQObject(prj), DCOPObject("KDevProject"), m_prj(prj) +{ +} + + +KDevProjectIface::~KDevProjectIface() +{ +} + +void KDevProjectIface::openProject( const TQString & dirName, const TQString & projectName ) +{ + m_prj->openProject(dirName,projectName); +} + +void KDevProjectIface::closeProject( ) +{ + m_prj->closeProject(); +} + +uint KDevProjectIface::options( ) const +{ + return (uint)m_prj->options(); +} + +TQString KDevProjectIface::projectDirectory( ) const +{ + return m_prj->projectDirectory(); +} + +TQString KDevProjectIface::projectName( ) const +{ + return m_prj->projectName(); +} + +TQString KDevProjectIface::mainProgram() const +{ + return m_prj->mainProgram(); +} + +TQString KDevProjectIface::runDirectory( ) const +{ + return m_prj->runDirectory(); +} + +TQString KDevProjectIface::activeDirectory( ) const +{ + return m_prj->activeDirectory(); +} + +TQString KDevProjectIface::buildDirectory( ) const +{ + return m_prj->buildDirectory(); +} + +TQStringList KDevProjectIface::allFiles( ) const +{ + return m_prj->allFiles(); +} + +TQStringList KDevProjectIface::distFiles( ) const +{ + return m_prj->distFiles(); +} + +void KDevProjectIface::addFiles( const TQStringList & fileList ) +{ + m_prj->addFiles(fileList); +} + +void KDevProjectIface::addFile( const TQString & fileName ) +{ + m_prj->addFile(fileName); +} + +void KDevProjectIface::removeFiles( const TQStringList & fileList ) +{ + m_prj->removeFiles(fileList); +} + +void KDevProjectIface::removeFile( const TQString & fileName ) +{ + m_prj->removeFile(fileName); +} + +void KDevProjectIface::changedFiles( const TQStringList & fileList ) +{ + m_prj->changedFiles(fileList); +} + +void KDevProjectIface::changedFile( const TQString & fileName ) +{ + m_prj->changedFile(fileName); +} + +bool KDevProjectIface::isProjectFile( const TQString & absFileName ) +{ + return m_prj->isProjectFile(absFileName); +} + +TQString KDevProjectIface::relativeProjectFile( const TQString & absFileName ) +{ + return m_prj->relativeProjectFile(absFileName); +} + +TQStringList KDevProjectIface::symlinkProjectFiles( ) +{ + return m_prj->symlinkProjectFiles(); +} + +TQString KDevProjectIface::readEntry( const TQString & path, const TQString & defaultEntry ) +{ + return DomUtil::readEntry( *m_prj->projectDom(), path, defaultEntry); +} + +int KDevProjectIface::readIntEntry( const TQString & path, int defaultEntry ) +{ + return DomUtil::readIntEntry(*m_prj->projectDom(), path,defaultEntry); +} + +bool KDevProjectIface::readBoolEntry( const TQString & path, bool defaultEntry ) +{ + return DomUtil::readBoolEntry(*m_prj->projectDom(), path, defaultEntry); +} + +TQStringList KDevProjectIface::readListEntry( const TQString & path, const TQString & tag ) +{ + return DomUtil::readListEntry(*m_prj->projectDom(), path, tag); +} + +TQMap< TQString, TQString > KDevProjectIface::readMapEntry( const TQString & path ) +{ + return DomUtil::readMapEntry(*m_prj->projectDom(), path); +} + +void KDevProjectIface::writeEntry( const TQString & path, const TQString & value ) +{ + DomUtil::writeEntry(*m_prj->projectDom(), path, value); +} + +void KDevProjectIface::writeIntEntry( const TQString & path, int value ) +{ + DomUtil::writeIntEntry(*m_prj->projectDom(), path, value); +} + +void KDevProjectIface::writeBoolEntry( const TQString & path, bool value ) +{ + DomUtil::writeBoolEntry(*m_prj->projectDom(), path, value); +} + +void KDevProjectIface::writeListEntry( const TQString & path, const TQString & tag, const TQStringList & value ) +{ + DomUtil::writeListEntry(*m_prj->projectDom(), path, tag, value); +} + +void KDevProjectIface::writeMapEntry( const TQString & path, const TQMap< TQString, TQString > & map ) +{ + DomUtil::writeMapEntry(*m_prj->projectDom(), path, map); +} + +#include "kdevprojectiface.moc" diff --git a/lib/interfaces/kdevprojectiface.h b/lib/interfaces/kdevprojectiface.h new file mode 100644 index 00000000..e30cd6cc --- /dev/null +++ b/lib/interfaces/kdevprojectiface.h @@ -0,0 +1,82 @@ +/* This file is part of the KDE project + Copyright (C) 2005 Ian Reinhart Geiser + + 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 KDEVPROJECTIFACE_H +#define KDEVPROJECTIFACE_H + +#include +#include +#include + +class KDevProject; + +/** +DCOP Interface for the @ref KDevProject object. + +@author KDevelop Authors +*/ +class KDevProjectIface : public TQObject, public DCOPObject +{ + Q_OBJECT +// + K_DCOP +public: + KDevProjectIface(KDevProject *prj); + + ~KDevProjectIface(); +k_dcop: + void openProject(const TQString &dirName, const TQString &projectName); + void closeProject(); + uint options() const; + TQString projectDirectory() const; + TQString projectName() const; + TQString mainProgram() const; + TQString runDirectory() const; + TQString activeDirectory() const; + TQString buildDirectory() const; + TQStringList allFiles() const; + TQStringList distFiles() const; + void addFiles(const TQStringList &fileList); + void addFile(const TQString &fileName); + void removeFiles(const TQStringList& fileList); + void removeFile(const TQString &fileName); + void changedFiles(const TQStringList &fileList); + void changedFile(const TQString &fileName); + bool isProjectFile(const TQString &absFileName); + TQString relativeProjectFile(const TQString &absFileName); + TQStringList symlinkProjectFiles(); + + // Project DOM access + TQString readEntry(const TQString &path, const TQString &defaultEntry = TQString()); + int readIntEntry(const TQString &path, int defaultEntry = 0); + bool readBoolEntry(const TQString &path, bool defaultEntry = false); + TQStringList readListEntry(const TQString &path, const TQString &tag); + TQMap readMapEntry(const TQString &path); + + void writeEntry(const TQString &path, const TQString &value); + void writeIntEntry(const TQString &path, int value); + void writeBoolEntry( const TQString &path, bool value); + void writeListEntry(const TQString &path, const TQString &tag, const TQStringList &value); + void writeMapEntry(const TQString& path, const TQMap &map); + + private: + KDevProject *m_prj; +}; + +#endif diff --git a/lib/interfaces/tdevapi.cpp b/lib/interfaces/tdevapi.cpp deleted file mode 100644 index 4f726107..00000000 --- a/lib/interfaces/tdevapi.cpp +++ /dev/null @@ -1,93 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2000-2001 Bernd Gehrmann - 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. -*/ -#include "tdevapi.h" - -#include "tdevcoderepository.h" - -/////////////////////////////////////////////////////////////////////////////// -// class TDevApi::Private -/////////////////////////////////////////////////////////////////////////////// - -class TDevApi::Private -{ -public: - Private() - : m_projectDom(0), m_project(0), m_languageSupport(0), - m_codeRepository(0) - {} - - TQDomDocument *m_projectDom; - TDevProject *m_project; - TDevLanguageSupport *m_languageSupport; - TDevCodeRepository* m_codeRepository; -}; - -/////////////////////////////////////////////////////////////////////////////// -// class TDevApi -/////////////////////////////////////////////////////////////////////////////// - -TDevApi::TDevApi() -{ - d = new TDevApi::Private; - d->m_codeRepository = new TDevCodeRepository(); -} - -TDevApi::~TDevApi() -{ - delete d->m_codeRepository; - delete d; -} - -TDevProject *TDevApi::project() const -{ - return d->m_project; -} - -void TDevApi::setProject(TDevProject *project) -{ - d->m_project = project; -} - -TDevLanguageSupport *TDevApi::languageSupport() const -{ - return d->m_languageSupport; -} - -void TDevApi::setLanguageSupport(TDevLanguageSupport *languageSupport) -{ - d->m_languageSupport = languageSupport; -} - -TQDomDocument *TDevApi::projectDom() const -{ - return d->m_projectDom; -} - -void TDevApi::setProjectDom(TQDomDocument *dom) -{ - d->m_projectDom = dom; -} - -TDevCodeRepository *TDevApi::codeRepository() const -{ - return d->m_codeRepository; -} - -#include "tdevapi.moc" diff --git a/lib/interfaces/tdevapi.h b/lib/interfaces/tdevapi.h deleted file mode 100644 index a2e38f7c..00000000 --- a/lib/interfaces/tdevapi.h +++ /dev/null @@ -1,104 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2000-2001 Bernd Gehrmann - 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 TDEVAPI_H -#define TDEVAPI_H - -#include - -class TQStringList; -class TQDomDocument; -class TDevCore; -class TDevProject; -class TDevLanguageSupport; -class CodeModel; -class TDevPartController; -class TDevMainWindow; -class TDevCodeRepository; -class TDevPlugin; -class TDevPluginController; - -/** -@file tdevapi.h -KDevelop API interface. -*/ - -/** -The interface to KDevelop's core components. -Needs to be implemented in a shell. Developers do not need to use this -class because @ref TDevPlugin already provides API convenience methods. -*/ -class TDevApi: public TQObject -{ - Q_OBJECT - -public: - /**Constructor.*/ - TDevApi(); - - /**Destructor.*/ - virtual ~TDevApi(); - - /**@return A reference to the toplevel widget.*/ - virtual TDevMainWindow *mainWindow() const = 0; - - /**@return A reference to the part controller which is used to manipulate loaded KParts.*/ - virtual TDevPartController *partController() const = 0; - - /**@return A reference to the plugin controller which is used to manipulate loaded plugin.*/ - virtual TDevPluginController *pluginController() const = 0; - - /**@return A reference to the application core - an object which provides - basic functionalities for inter-parts communications / cooperation.*/ - virtual TDevCore *core() const = 0; - - /**@return A reference to the memory symbol store.*/ - virtual CodeModel *codeModel() const = 0; - - /**@return A reference to the DOM tree that represents the project file or 0 if no project is loaded.*/ - TQDomDocument *projectDom() const; - - /**Sets the Document Object Model for the current project. - @param dom The project DOM.*/ - void setProjectDom(TQDomDocument *dom); - - /**@return A reference to the current project component or 0 if no project is loaded.*/ - TDevProject *project() const; - - /**Sets the current project. - @param project The project plugin which becames the current project.*/ - void setProject(TDevProject *project); - - /**@return A reference to the language support component or 0 if no support available.*/ - TDevLanguageSupport *languageSupport() const; - - /**Sets the object charged of providing handling for the source files written in particular - language (languages support component). - @param languageSupport The language support plugin.*/ - void setLanguageSupport(TDevLanguageSupport *languageSupport); - - /**@return A reference to the code repository (accessor to persistent symbol stores).*/ - TDevCodeRepository *codeRepository() const; - -private: - class Private; - Private *d; -}; - -#endif diff --git a/lib/interfaces/tdevcoderepository.cpp b/lib/interfaces/tdevcoderepository.cpp deleted file mode 100644 index f5716294..00000000 --- a/lib/interfaces/tdevcoderepository.cpp +++ /dev/null @@ -1,71 +0,0 @@ -/* This file is part of the KDE project - 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 "tdevcoderepository.h" - -struct TDevCodeRepositoryData -{ - Catalog* mainCatalog; - TQValueList catalogs; - - TDevCodeRepositoryData(): mainCatalog( 0 ) {} -}; - -TDevCodeRepository::TDevCodeRepository( ) - : d( new TDevCodeRepositoryData ) -{ -} - -TDevCodeRepository::~TDevCodeRepository( ) -{ - delete( d ); -} - -Catalog* TDevCodeRepository::mainCatalog() -{ - return d->mainCatalog; -} - -void TDevCodeRepository::setMainCatalog( Catalog * mainCatalog ) -{ - d->mainCatalog = mainCatalog; -} - -void TDevCodeRepository::registerCatalog( Catalog * catalog ) -{ - d->catalogs.append( catalog ); - emit catalogRegistered( catalog ); -} - -void TDevCodeRepository::unregisterCatalog( Catalog * catalog ) -{ - d->catalogs.remove( catalog ); - emit catalogUnregistered( catalog ); -} - -void TDevCodeRepository::touchCatalog( Catalog * catalog ) -{ - emit catalogChanged( catalog ); -} - -TQValueList< Catalog * > TDevCodeRepository::registeredCatalogs( ) -{ - return d->catalogs; -} - -#include "tdevcoderepository.moc" diff --git a/lib/interfaces/tdevcoderepository.h b/lib/interfaces/tdevcoderepository.h deleted file mode 100644 index b87d66e8..00000000 --- a/lib/interfaces/tdevcoderepository.h +++ /dev/null @@ -1,95 +0,0 @@ -/* This file is part of the KDE project - 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 TDEVCODEREPOSITORY_H -#define TDEVCODEREPOSITORY_H - -#include -#include - -/** -@file tdevcoderepository.h -Code repository - the persistent symbol store accessor. -*/ - -class TDevCodeRepositoryData; -class Catalog; - -/** -Code repository - the persistent symbol store accessor. -Symbols from parsed files can be saved to the persistent symbol store. -Persistence in this case means that symbol database is never loaded into memory -and works like a usual database which executes queries. - -Code repository consists from @ref Catalog objects that represent separate symbol -databases. Catalogs can be created/loaded/unloaded dynamically. -To find a symbol in the repository each catalog should be queried. - -Persistent symbol store is useful to keep information about code that -never or rarely changes. System libraries are perfect examples of such code. -Symbols from code contained in project files are better stored in memory -symbol store like @ref CodeModel. -*/ -class TDevCodeRepository : public TQObject -{ - Q_OBJECT - -public: - /**Constructor.*/ - TDevCodeRepository(); - /**Destructor.*/ - virtual ~TDevCodeRepository(); - - /**@return The main catalog. Each catalog can be marked is main - to provide easy access to it.*/ - Catalog* mainCatalog(); - /**Sets the main catalog. - @param mainCatalog The catalog to be marked as main.*/ - void setMainCatalog( Catalog* mainCatalog ); - - /**@return The list of registered catalogs.*/ - TQValueList registeredCatalogs(); - - /**Registers catalog in the repository. - @param catalog The catalog to register.*/ - void registerCatalog( Catalog* catalog ); - /**Unregisters catalog from the repository. - @param catalog The catalog to unregister.*/ - void unregisterCatalog( Catalog* catalog ); - /**Marks catalog as changed and emits @ref catalogChanged signal. - @param catalog The catalog to touch.*/ - void touchCatalog( Catalog* catalog ); - -signals: - /**Emitted when a new catalog is registered. - @param catalog The new catalog.*/ - void catalogRegistered( Catalog* catalog ); - - /**Emitted when a catalog in removed - @param catalog The catalog that was removed.*/ - void catalogUnregistered( Catalog* catalog ); - - /**Emitted when the contens of catalog is changed. - @param catalog Changed catalog.*/ - void catalogChanged( Catalog* catalog ); - -private: - TDevCodeRepositoryData* d; -}; - -#endif diff --git a/lib/interfaces/tdevcore.cpp b/lib/interfaces/tdevcore.cpp deleted file mode 100644 index 726bf2cb..00000000 --- a/lib/interfaces/tdevcore.cpp +++ /dev/null @@ -1,298 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2001-2002 Matthias Hoelzer-Kluepfel - Copyright (C) 2002-2003 Roberto Raggi - Copyright (C) 2003 Mario Scalas - Copyright (C) 2003 Amilcar do Carmo Lucas - Copyright (C) 2003 Jens Dagerbo - 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. -*/ -#include "TDevCoreIface.h" -#include "tdevcore.h" - -#include "urlutil.h" - -/////////////////////////////////////////////////////////////////////////////// -// class Context -/////////////////////////////////////////////////////////////////////////////// - -Context::Context() -{ -} - -Context::~Context() -{ -} - -bool Context::hasType( int aType ) const -{ - return aType == this->type(); -} - -/////////////////////////////////////////////////////////////////////////////// -// class EditorContext -/////////////////////////////////////////////////////////////////////////////// - -class EditorContext::Private -{ -public: - Private( const KURL &url, int line, int col, const TQString &linestr, - const TQString &wordstr ) - : m_url(url), m_line(line), m_col(col), - m_linestr(linestr), m_wordstr(wordstr) - { - } - - KURL m_url; - int m_line, m_col; - TQString m_linestr, m_wordstr; -}; - -EditorContext::EditorContext( const KURL &url, int line, int col, - const TQString &linestr, const TQString &wordstr ) - : Context(), d( new Private(url, line, col, linestr, wordstr) ) -{ -} - -EditorContext::~EditorContext() -{ - delete d; - d = 0; -} - -int EditorContext::type() const -{ - return Context::EditorContext; -} - -const KURL &EditorContext::url() const -{ - return d->m_url; -} - -int EditorContext::line() const -{ - return d->m_line; -} - -int EditorContext::col() const -{ - return d->m_col; -} - -TQString EditorContext::currentLine() const -{ - return d->m_linestr; -} - -TQString EditorContext::currentWord() const -{ - return d->m_wordstr; -} - -/////////////////////////////////////////////////////////////////////////////// -// class FileContext -/////////////////////////////////////////////////////////////////////////////// - -class FileContext::Private -{ -public: - Private( const KURL::List &someURLs ) : m_urls(someURLs) - { - if (m_urls.count() == 0) - { - m_fileName = "INVALID-FILENAME"; - m_isDirectory = false; // well, "true" should be ok too ... - } - else - { - m_fileName = m_urls[0].path(); - m_isDirectory = URLUtil::isDirectory( m_urls[0] ); - } - } - Private( const TQString &fileName, bool isDirectory ) - : m_fileName(fileName), m_isDirectory(isDirectory) - { - } - - KURL::List m_urls; - /// \FIXME the following data members should be removed, but first other - // parts should be modified to comply with this change. - TQString m_fileName; - bool m_isDirectory; -}; - -FileContext::FileContext( const KURL::List &someURLs ) - : Context(), d( new Private(someURLs) ) -{ -} - -FileContext::~FileContext() -{ - delete d; - d = 0; -} - -int FileContext::type() const -{ - return Context::FileContext; -} - -const KURL::List &FileContext::urls() const -{ - return d->m_urls; -} - -/////////////////////////////////////////////////////////////////////////////// -// class DocumentationContext -/////////////////////////////////////////////////////////////////////////////// - -class DocumentationContext::Private -{ -public: - Private( const TQString &url, const TQString &selection ) - : m_url(url), m_selection(selection) - { - } - - TQString m_url; - TQString m_selection; -}; - -DocumentationContext::DocumentationContext( const TQString &url, const TQString &selection ) - : Context(), d( new Private(url, selection) ) -{ -} - -DocumentationContext::DocumentationContext( const DocumentationContext &aContext ) - : Context(), d( 0 ) -{ - *this = aContext; -} - -DocumentationContext &DocumentationContext::operator=( const DocumentationContext &aContext) -{ - if (d) { - delete d; d = 0; - } - d = new Private( *aContext.d ); - return *this; -} - -DocumentationContext::~DocumentationContext() -{ - delete d; - d = 0; -} - -int DocumentationContext::type() const -{ - return Context::DocumentationContext; -} - -TQString DocumentationContext::url() const -{ - return d->m_url; -} - -TQString DocumentationContext::selection() const -{ - return d->m_selection; -} - -/////////////////////////////////////////////////////////////////////////////// -// class CodeModelItemContext -/////////////////////////////////////////////////////////////////////////////// - -class CodeModelItemContext::Private -{ -public: - Private( const CodeModelItem* item ) : m_item( item ) {} - - const CodeModelItem* m_item; -}; - -CodeModelItemContext::CodeModelItemContext( const CodeModelItem* item ) - : Context(), d( new Private(item) ) -{ -} - -CodeModelItemContext::~CodeModelItemContext() -{ - delete d; - d = 0; -} - -int CodeModelItemContext::type() const -{ - return Context::CodeModelItemContext; -} - -const CodeModelItem* CodeModelItemContext::item() const -{ - return d->m_item; -} - -/////////////////////////////////////////////////////////////////////////////// -// class ProjectModelItemContext -/////////////////////////////////////////////////////////////////////////////// - -class ProjectModelItemContext::Private -{ -public: - Private( const ProjectModelItem* item ) : m_item( item ) {} - - const ProjectModelItem* m_item; -}; - -ProjectModelItemContext::ProjectModelItemContext( const ProjectModelItem* item ) - : Context(), d( new Private(item) ) -{ -} - -ProjectModelItemContext::~ProjectModelItemContext() -{ - delete d; - d = 0; -} - -int ProjectModelItemContext::type() const -{ - return Context::ProjectModelItemContext; -} - -const ProjectModelItem* ProjectModelItemContext::item() const -{ - return d->m_item; -} - - -/////////////////////////////////////////////////////////////////////////////// -// class TDevCore -/////////////////////////////////////////////////////////////////////////////// - -TDevCore::TDevCore( TQObject *parent, const char *name ) - : TQObject( parent, name ) -{ - new TDevCoreIface(this); -} - -TDevCore::~TDevCore() -{ -} - -#include "tdevcore.moc" diff --git a/lib/interfaces/tdevcore.h b/lib/interfaces/tdevcore.h deleted file mode 100644 index fadcdfde..00000000 --- a/lib/interfaces/tdevcore.h +++ /dev/null @@ -1,388 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2001-2002 Matthias Hoelzer-Kluepfel - Copyright (C) 2001-2002 Bernd Gehrmann - Copyright (C) 2001 Sandy Meier - Copyright (C) 2002 Daniel Engelschalt - Copyright (C) 2002 Simon Hausmann - Copyright (C) 2002-2003 Roberto Raggi - Copyright (C) 2003 Mario Scalas - Copyright (C) 2003 Harald Fernengel - Copyright (C) 2003 Hamish Rodda - 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 TDEVCORE_H -#define TDEVCORE_H - -/** -@file tdevcore.h -The interface to the application core and context menu classes. -*/ - -#include -#include -#include - -#include - -class KDialogBase; -class TDevPlugin; -class CodeModelItem; -class ProjectModelItem; - -namespace KParts -{ - class Part; -} - -class TQStatusBar; -class TQPopupMenu; - -/** -Base class for every context. -Think of a Context-based class as "useful -info associated to a context menu". Several context menu can be defined, -each defining different information: because of these context menus being -used in many modules, they are defined here. - -When context menu with a certain "context" associated appears, KDevelop core -sends a notification signal and all plugins which receive this signal have -the ability to add own items into the menu. For example, VCS plugin could -add "commit" and "update" menu items to the context menu of a file. - -How to use context from a plugin: --# Create a popup menu in context menu event handler: @code TDEPopupMenu menu(this); @endcode --# Create a context: @code MyContext context(param). @endcode --# Fill a context menu: @code core()->fillContextMenu(&menu, &context); @endcode --# Show the popup menu: @code menu.exec(event->globalPos()); @endcode -. -In this example @em event is an object of TQContextMenuEvent class which you have access -to if you reimplement TQWidget::contextMenuEvent method. - -How to fill context menu from a plugin: --# Create a @code contextMenu(TQPopupMenu *, const Context *) @endcode slot in your plugin class. --# Connect TDevCore::contextMenu(TQPopupMenu *, const Context *) signal to that slot in -the constructor of your plugin:\n -@code -connect(core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), - this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *))); -@endcode --# Fill the menu in the slot you created, for example:\n -@code -if (context->hasType(Context::EditorContext)) -{ - const EditorContext *econtext = static_cast(context); - int id = popup->insertItem(i18n("My Menu Item 1"), this, TQT_SLOT(myMenuAction1())); - popup->setWhatsThis(id, i18n("What's this for my menu item 1")); -} -else if context->hasType(MyContext)) -{ - int id = popup->insertItem(... - ... -} -... -@endcode -*/ -class Context -{ -public: - /**Pre-defined context types. More may be added so it is possible to add custom - contexts. We reserve enum values until 1000 (yeah, it is one thousand ) - for tdevelop official context types.*/ - enum Type - { - EditorContext, /** - - 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 "tdevdesignerintegration.h" -#include "tdevdesignerintegrationiface.h" - -class TDevDesignerIntegration::TDevDesignerIntegrationPrivate { -public: - TDevDesignerIntegrationIface *m_iface; -}; - -TDevDesignerIntegration::TDevDesignerIntegration(TQObject *parent, const char *name) - : TQObject(parent, name) -{ - dptr = new TDevDesignerIntegrationPrivate(); - - dptr->m_iface = new TDevDesignerIntegrationIface(this); -} - -TDevDesignerIntegration::~TDevDesignerIntegration() -{ - delete dptr; -} - -#include "tdevdesignerintegration.moc" diff --git a/lib/interfaces/tdevdesignerintegration.h b/lib/interfaces/tdevdesignerintegration.h deleted file mode 100644 index 532d8b8b..00000000 --- a/lib/interfaces/tdevdesignerintegration.h +++ /dev/null @@ -1,98 +0,0 @@ -/* This file is part of the KDE project - 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 TDEVDESIGNERINTEGRATION_H -#define TDEVDESIGNERINTEGRATION_H - -#include -#include -#include - -/** -@file tdevdesignerintegration.h -TDevelop designer integration interface. -*/ - -/** -TDevelop designer integration interface. -Designer integration object provides functionality which is used by integrated -into KDevelop GUI designers: -- adding/removing/editing functions (class methods); -- opening form implementation files; -- saving and loading designer integration settings. -. - -Designer integration is a layer between visual form (GUI) designer of any type -and the current language support. Usually designers create some kind of forms -and allow developers to define actions which are executed upon some GUI events -(for example, TQt Designer allows to define slots connected to GUI signals). -The actual code with action implementations needs to be written by hand in source -files. Designer integration captures such implementation requests and opens -necessary files at desired line numbers and adds (edits, removes) code for implementations. - -For example, TQt Designer integration should be able to create an subclass for a form -and reimplement slots defined in the form. -*/ -class TDevDesignerIntegration : public TQObject -{ -Q_OBJECT - -public: - /**Constructor. - @param parent Parent object. - @param name Internal name.*/ - TDevDesignerIntegration(TQObject *parent = 0, const char *name = 0); - /**Destructor.*/ - ~TDevDesignerIntegration(); - - /**Saves designer integration settings.*/ - virtual void saveSettings(TQDomDocument dom, TQString path) = 0; - /**Loads designer integration settings.*/ - virtual void loadSettings(TQDomDocument dom, TQString path) = 0; - -public slots: - /**Adds the implementation for a function. - @param formName The name of a GUI form. - @param function The function which needs to be implemented in the source.*/ - virtual void addFunction(const TQString &formName, KInterfaceDesigner::Function function) = 0; - - /**Removes the implementation of a function. - @param formName The name of a GUI form. - @param function The function which needs to be removed from the source.*/ - virtual void removeFunction(const TQString &formName, KInterfaceDesigner::Function function) = 0; - - /**Edites the implementation of a function. - @param formName The name of a GUI form. - @param oldFunction The function which needs to be edited from the source. - @param function The new function declaration.*/ - virtual void editFunction(const TQString &formName, KInterfaceDesigner::Function oldFunction, KInterfaceDesigner::Function function) = 0; - - /**Opens the function and jumps to the line number of its definition (declaration). - @param formName The name of a GUI form. - @param functionName The name of a function to find in the source.*/ - virtual void openFunction(const TQString &formName, const TQString &functionName) = 0; - - /**Opens the form source. - @param formName The name of a GUI form.*/ - virtual void openSource(const TQString &formName) = 0; - private: - class TDevDesignerIntegrationPrivate; - TDevDesignerIntegrationPrivate *dptr; -}; - -#endif diff --git a/lib/interfaces/tdevdesignerintegrationiface.cpp b/lib/interfaces/tdevdesignerintegrationiface.cpp deleted file mode 100644 index bd4f349b..00000000 --- a/lib/interfaces/tdevdesignerintegrationiface.cpp +++ /dev/null @@ -1,63 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2005 Ian Reinhart Geiser - - 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 "tdevdesignerintegrationiface.h" -#include -#include "tdevdesignerintegration.h" - -TDevDesignerIntegrationIface::TDevDesignerIntegrationIface(TDevDesignerIntegration *p) - : DCOPObject("GUIDesigner"), m_designer(p) -{ - //FIXME figure out what number our interface is... -} - - -TDevDesignerIntegrationIface::~TDevDesignerIntegrationIface() -{ -} - -void TDevDesignerIntegrationIface::addFunction( const TQString & formName, TQString returnType, TQString function, TQString specifier, TQString access, uint type ) -{ - KInterfaceDesigner::Function f = {returnType, function, specifier, access, (KInterfaceDesigner::FunctionType)type }; - m_designer->addFunction(formName, f); -} - -void TDevDesignerIntegrationIface::removeFunction( const TQString & formName, TQString returnType, TQString function, TQString specifier, TQString access, uint type ) -{ - KInterfaceDesigner::Function f = {returnType, function, specifier, access, (KInterfaceDesigner::FunctionType)type }; - m_designer->addFunction(formName, f); -} - -void TDevDesignerIntegrationIface::editFunction( const TQString & formName, TQString oldReturnType, TQString oldFunction, TQString oldSpecifier, TQString oldAccess, uint oldType, TQString returnType, TQString function, TQString specifier, TQString access, uint type ) -{ - KInterfaceDesigner::Function fold = {oldReturnType, oldFunction, oldSpecifier, oldAccess, (KInterfaceDesigner::FunctionType)oldType }; - KInterfaceDesigner::Function fnew = {returnType, function, specifier, access, (KInterfaceDesigner::FunctionType)type }; - m_designer->editFunction(formName,fold,fnew); -} - -void TDevDesignerIntegrationIface::openFunction( const TQString & formName, const TQString & functionName ) -{ - m_designer->openFunction(formName,functionName); -} - -void TDevDesignerIntegrationIface::openSource( const TQString & formName ) -{ - m_designer->openSource(formName); -} - - diff --git a/lib/interfaces/tdevdesignerintegrationiface.h b/lib/interfaces/tdevdesignerintegrationiface.h deleted file mode 100644 index 0dd6f8d1..00000000 --- a/lib/interfaces/tdevdesignerintegrationiface.h +++ /dev/null @@ -1,49 +0,0 @@ -/* I am drunk. - Copyright (C) 2005 Ian Reinhart Geiser - - 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 TDEVDESIGNERINTEGRATIONIFACE_H -#define TDEVDESIGNERINTEGRATIONIFACE_H - -#include -class TDevDesignerIntegration; -/** -The dcop interface for GUI designers in KDevelop. - -@author KDevelop Authors -*/ -class TDevDesignerIntegrationIface : public DCOPObject -{ - K_DCOP -public: - TDevDesignerIntegrationIface(TDevDesignerIntegration *p); - - ~TDevDesignerIntegrationIface(); -k_dcop: - void addFunction(const TQString &formName, TQString returnType, TQString function,TQString specifier,TQString access,uint type); - void removeFunction(const TQString &formName, TQString returnType, TQString function,TQString specifier,TQString access,uint type); - void editFunction(const TQString &formName, TQString oldReturnType, TQString oldFunction, - TQString oldSpecifier,TQString oldAccess,uint oldType, - TQString returnType, TQString function,TQString specifier,TQString access,uint type); - void openFunction(const TQString &formName, const TQString &functionName); - void openSource(const TQString &formName); - - private: - TDevDesignerIntegration *m_designer; -}; - -#endif diff --git a/lib/interfaces/tdevgenericfactory.h b/lib/interfaces/tdevgenericfactory.h deleted file mode 100644 index 7fdbdb28..00000000 --- a/lib/interfaces/tdevgenericfactory.h +++ /dev/null @@ -1,91 +0,0 @@ -/* This file is part of the KDE project - * Copyright (C) 2003 Harald Fernengel - * 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. - */ -#include -#include - -/** -@file tdevgenericfactory.h -KDevelop generic plugin factory. -*/ - -/** -This class provides a generic implementation of a KLibFactory for -use with TDevelop plugins. -Usually it is convenient to use K_EXPORT_COMPONENT_FACTORY macro -to create factories for TDevelop plugins. For example, for DummyPlugin -the factory can be created (in dummyplugin.cpp file) as: -@code -typedef TDevGenericFactory DummyPluginFactory; -K_EXPORT_COMPONENT_FACTORY(libtdevdummyplugin, DummyPluginFactory( data ) ) -@endcode -Data should be a const static object. This way it complies with the requirements -for data objecs of TDevGenericFactory constructor. - -Important:
    -There is no need to create @ref TDEAboutData objects. It is more useful to create -a static const @ref TDevPluginInfo object which can be used also in the constructor -of a plugin. - -For example, dummyplugin.cpp file could contain: -@code -#include - -static const TDevPluginInfo data("KDevDummyPlugin"); -typedef TDevGenericFactory DummyPluginFactory; -K_EXPORT_COMPONENT_FACTORY(libtdevdummyplugin, DummyPluginFactory( data ) ) - -DummyPlugin::DummyPlugin(TQObject *parent, const char *name, const TQStringList & ) - :TDevPlugin(&data, parent, name) -{ -} -@endcode - -In the example above the duplication of information is avoided as same @ref TDevPluginInfo -objects are used for plugin and for plugin factory. This is possible because @ref TDevPluginInfo -class has an operator to cast @ref TDevPluginInfo to @ref TDEAboutData. -*/ -template -class TDevGenericFactory: public KGenericFactory -{ -public: - /**Constructor. - @param data A reference to TDEAboutData with an information about the plugin. - Data should have: - - plugin name as an application name; - - untranslated plugin generic name as a product name; - - license type number. - . - data object should live as long as factory lives.*/ - TDevGenericFactory(TDEAboutData *data) - :KGenericFactory(data->appName()), aboutData(data) - { - } - - /**Creates an instance.*/ - TDEInstance *createInstance() - { - return new TDEInstance(aboutData); - } - -private: - TDEAboutData *aboutData; - -}; - diff --git a/lib/interfaces/tdevlanguagesupport.cpp b/lib/interfaces/tdevlanguagesupport.cpp deleted file mode 100644 index d283a434..00000000 --- a/lib/interfaces/tdevlanguagesupport.cpp +++ /dev/null @@ -1,166 +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 F@lk Brettschneider - Copyright (C) 2003 Alexander Dymo - 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 "codemodel.h" - -#include - -#include "tdevdesignerintegration.h" -#include "tdevlanguagesupport.h" - -TDevLanguageSupport::TDevLanguageSupport(const TDevPluginInfo *info, TQObject *parent, const char *name) - : TDevPlugin(info, parent, name ? name : "TDevLanguageSupport" ) -{ -} - -TDevLanguageSupport::~TDevLanguageSupport() -{ -} - -TDevLanguageSupport::Features TDevLanguageSupport::features() -{ - return Features(0); -} - -KMimeType::List TDevLanguageSupport::mimeTypes() -{ - return KMimeType::List(); -} - -TQString TDevLanguageSupport::formatTag( const Tag& /*tag*/ ) -{ - return TQString(); -} - -TQString TDevLanguageSupport::formatClassName(const TQString &name) -{ - return name; -} - -TQString TDevLanguageSupport::unformatClassName(const TQString &name) -{ - return name; -} - -bool TDevLanguageSupport::shouldSplitDocument(const KURL &url) -{ - return false; -} - -Qt::Orientation TDevLanguageSupport::splitOrientation() const -{ - return Qt::Vertical; -} - -void TDevLanguageSupport::addClass() -{ -} - -void TDevLanguageSupport::addMethod( ClassDom /*klass*/ ) -{ -} - -void TDevLanguageSupport::implementVirtualMethods( ClassDom /*klass*/ ) -{ -} - -void TDevLanguageSupport::addAttribute( ClassDom /*klass*/ ) -{ -} - -TQStringList TDevLanguageSupport::subclassWidget(const TQString& /*formName*/) -{ - return TQStringList(); -} - -TQStringList TDevLanguageSupport::updateWidget(const TQString& /*formName*/, const TQString& /*fileName*/) -{ - return TQStringList(); -} - -TQString TDevLanguageSupport::formatModelItem( const CodeModelItem *item, bool /*shortDescription*/ ) -{ - return item->name(); -} - -void TDevLanguageSupport::addFunction( DesignerType type, const TQString & formName, Function function ) -{ -// kdDebug() << "TDevLanguageSupport::addFunction: 1" << endl; - TDevDesignerIntegration *designerIntegration = designer(type); -// kdDebug() << "TDevLanguageSupport::addFunction: 2" << endl; - if (!designerIntegration) - { -// kdDebug() << "TDevLanguageSupport::addFunction: x" << endl; - return; - } -// kdDebug() << "TDevLanguageSupport::addFunction: 3" << endl; - designerIntegration->addFunction(formName, function); -// kdDebug() << "TDevLanguageSupport::addFunction: 4" << endl; -} - -void TDevLanguageSupport::editFunction( DesignerType type, const TQString & formName, Function oldFunction, Function function ) -{ - TDevDesignerIntegration *designerIntegration = designer(type); - if (!designerIntegration) - return; - designerIntegration->editFunction(formName, oldFunction, function); -} - -void TDevLanguageSupport::removeFunction( DesignerType type, const TQString & formName, Function function ) -{ - TDevDesignerIntegration *designerIntegration = designer(type); - if (!designerIntegration) - return; - designerIntegration->removeFunction(formName, function); -} - -TDevDesignerIntegration * TDevLanguageSupport::designer( DesignerType // type - ) -{ - return 0; -} - -void TDevLanguageSupport::openFunction( DesignerType type, const TQString & formName, const TQString & functionName ) -{ - TDevDesignerIntegration *designerIntegration = designer(type); - if (!designerIntegration) - return; - designerIntegration->openFunction(formName, functionName); -} - -void TDevLanguageSupport::createAccessMethods( ClassDom // theClass - , VariableDom // theVariable - ) -{ -} - -void TDevLanguageSupport::openSource( DesignerType type, const TQString & formName) -{ - TDevDesignerIntegration *designerIntegration = designer(type); - if (!designerIntegration) - return; - designerIntegration->openSource(formName); -} - -#include "tdevlanguagesupport.moc" diff --git a/lib/interfaces/tdevlanguagesupport.h b/lib/interfaces/tdevlanguagesupport.h deleted file mode 100644 index a1778ff6..00000000 --- a/lib/interfaces/tdevlanguagesupport.h +++ /dev/null @@ -1,261 +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 F@lk Brettschneider - Copyright (C) 2003 Amilcar do Carmo Lucas - Copyright (C) 2003-2004 Alexander Dymo - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public License - along with this library; see the file COPYING.LIB. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ -#ifndef TDEVLANGUAGESUPPORT_H -#define TDEVLANGUAGESUPPORT_H - -#include -#include -#include -#include "tdevplugin.h" -#include "codemodel.h" -#include - -/** -@file tdevlanguagesupport.h -Interface to programming language specific features. -*/ - -class Tag; -class TDevDesignerIntegration; - -using namespace KInterfaceDesigner; - -/** -KDevelop language support interface - the base class for all programming language support plugins. -Language support is used to load facilities specific to certain programming language. -Language supports are usually loaded among with a project. In this case project file defines -which language support to load. - -Language support plugin is a good place for: -- a language parser which fills memory and persistent symbol store -(see @ref CodeModel and @ref TDevCodeRepository); -- code wizards specific to a programming language (like new class wizard); -- GUI designer integration (see @ref TDevLanguageSupport::designer method -documentation and @ref TDevDesignerIntegration class documentation; -- symbol (class, function, etc.) name formatting to a human-readable convention (pretty -formatted name). -. -*/ -class TDevLanguageSupport: public TDevPlugin -{ - Q_OBJECT - - -public: - - /**Features supported by this language support.*/ - enum Features { - /*features of the language itself*/ - Classes=1 /**loadSettings(*project()->projectDom(), "kdevmylangsupport/designerintegration"); - saveDesignerToCache(type, des); - } - break; - } - return des; - @endcode - @ref ImplementationWidget and @ref TQtDesignerIntegration classes are available - from designerintegration support library. - @param type The type of the designer to integrate. - @return The pointer to designer integration of given type or 0.*/ - virtual TDevDesignerIntegration *designer(KInterfaceDesigner::DesignerType type); - -public slots: - /**Adds a function requested by a GUI designer. No need to reimplement this slot - unless you want to use specific implementation of TDevDesignerIntegration interface. - @param type The type of integrated designer. - @param formName The name of a GUI form. - @param function The function to implement (add).*/ - void addFunction(DesignerType type, const TQString &formName, Function function); - - /**Removes a function requested by a GUI designer. No need to reimplement this slot - unless you want to use specific implementation of TDevDesignerIntegration interface. - @param type The type of integrated designer. - @param formName The name of a GUI form. - @param function The function to remove.*/ - void removeFunction(DesignerType type, const TQString &formName, Function function); - - /**Edits a function requested by a GUI designer. No need to reimplement this slot - unless you want to use specific implementation of TDevDesignerIntegration interface. - @param type The type of integrated designer. - @param formName The name of a GUI form. - @param oldFunction The old function signature before editing. - @param function The new function signature after editing.*/ - void editFunction(DesignerType type, const TQString &formName, Function oldFunction, Function function); - - /**Opens a function requested by a GUI designer. No need to reimplement this slot - unless you want to use specific implementation of TDevDesignerIntegration interface. - @param type The type of integrated designer. - @param formName The name of a GUI form. - @param functionName The name of a function to seek in the code for.*/ - void openFunction(DesignerType type, const TQString &formName, const TQString &functionName); - - /**Opens a form source requested by a GUI designer. No need to reimplement this slot - unless you want to use specific implementation of TDevDesignerIntegration interface. - @param type The type of integrated designer. - @param formName The name of a GUI form.*/ - void openSource(DesignerType type, const TQString &formName); - -signals: - /**Emitted when the content of the memory symbol store has been modified.*/ - void updatedSourceInfo(); - - /**Emitted before removing the file from the memory symbol store.*/ - void aboutToRemoveSourceInfo(const TQString& fileName); - - /**Emitted when a file has been removed from the memory symbol store.*/ - void removedSourceInfo(const TQString& fileName); - - /**Emitted when a file has been added to the memory symbol store.*/ - void addedSourceInfo( const TQString& fileName ); - - /**Emitted when the language part changes the Split View orientation.*/ - void splitOrientationChanged( Qt::Orientation orientation ); -}; - -#endif diff --git a/lib/interfaces/tdevmainwindow.cpp b/lib/interfaces/tdevmainwindow.cpp deleted file mode 100644 index e73250e9..00000000 --- a/lib/interfaces/tdevmainwindow.cpp +++ /dev/null @@ -1,28 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2002 F@lk Brettschneider - Copyright (C) 2003 John Firebaugh - - 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 "tdevmainwindow.h" - -#include -#include - -KStatusBar *TDevMainWindow::statusBar() -{ - return main()->statusBar(); -} diff --git a/lib/interfaces/tdevmainwindow.h b/lib/interfaces/tdevmainwindow.h deleted file mode 100644 index 83aef3b0..00000000 --- a/lib/interfaces/tdevmainwindow.h +++ /dev/null @@ -1,101 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2003 F@lk Brettschneider - Copyright (C) 2003 John Firebaugh - Copyright (C) 2003 Amilcar do Carmo Lucas - 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 TDEV_MAINWINDOW_H -#define TDEV_MAINWINDOW_H - -#include - -class TQWidget; -class KStatusBar; -class TDEMainWindow; - -/** -@file tdevmainwindow.h -KDevelop main window interface. -*/ - -/** -KDevelop main window interface. -Provides methods to control the main window of an application. -*/ -class TDevMainWindow -{ -public: - /**Destroys the main window*/ - virtual ~TDevMainWindow() {} // must be virtual! - - /**Embeds a view of a part into the main window. - @param view The view to embed. Must be a KPart. - @param title The title of a view. - @param toolTip The tooltip of a view.*/ - virtual void embedPartView(TQWidget *view, const TQString &title, const TQString& toolTip = TQString()) = 0; - - /**Embeds a toolview at the left of the main window. - @param view The view to embed. Must be a KPart. - @param title The title of a view. - @param toolTip The tooltip of a view.*/ - virtual void embedSelectView(TQWidget *view, const TQString &title, const TQString &toolTip) = 0; - - /**Embeds a toolview at the bottom of the main window. - @param view The view to embed. Must be a KPart. - @param title The title of a view. - @param toolTip The tooltip of a view.*/ - virtual void embedOutputView(TQWidget *view, const TQString &title, const TQString &toolTip) = 0; - - /**Embeds a toolview at the right of the main window. - @param view The view to embed. Must be a KPart. - @param title The title of a view. - @param toolTip The tooltip of a view.*/ - virtual void embedSelectViewRight(TQWidget* view, const TQString& title, const TQString &toolTip) = 0; - - /**Removes a view from the main window. - @param view The view to remove.*/ - virtual void removeView(TQWidget *view) = 0; - - /**Shows or hides a view. - @param pView The view to show or hide. - @param bEnabled true if view should be shown, false it it is not.*/ - virtual void setViewAvailable(TQWidget *pView, bool bEnabled) = 0; - - /**Raises a view (shows it if it was minimized). - @param view The view to be raised.*/ - virtual void raiseView(TQWidget *view) = 0; - - /**Minimize a view. - @param view The view to be lowered.*/ - virtual void lowerView(TQWidget *view) = 0; - - /**Loads main window settings.*/ - virtual void loadSettings() = 0; - - /**Sets the current document's caption, if applicable. - @param caption the caption to set.*/ - virtual void setCurrentDocumentCaption( const TQString &caption ) = 0; - - /**@return TDEMainWindow object which actually represents the main window.*/ - virtual TDEMainWindow *main() = 0; - - /**@return KStatusBar object which actually represents the status bar in the main window.*/ - KStatusBar *statusBar(); -}; - -#endif diff --git a/lib/interfaces/tdevpartcontroller.cpp b/lib/interfaces/tdevpartcontroller.cpp deleted file mode 100644 index e718ecf4..00000000 --- a/lib/interfaces/tdevpartcontroller.cpp +++ /dev/null @@ -1,30 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2002 Matthias Hoelzer-Kluepfel - - 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 "TDevPartControllerIface.h" -#include "tdevpartcontroller.h" -#include "katedocumentmanagerinterface.h" - -TDevPartController::TDevPartController(TQWidget *parent) - : KParts::PartManager(parent) -{ - new TDevPartControllerIface(this); - new KateDocumentManagerInterface(this); -} - -#include "tdevpartcontroller.moc" diff --git a/lib/interfaces/tdevpartcontroller.h b/lib/interfaces/tdevpartcontroller.h deleted file mode 100644 index 2bb593e6..00000000 --- a/lib/interfaces/tdevpartcontroller.h +++ /dev/null @@ -1,176 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2002 Matthias Hoelzer-Kluepfel - Copyright (C) 2002 Bernd Gehrmann - Copyright (C) 2003 Roberto Raggi - Copyright (C) 2003 Hamish Rodda - Copyright (C) 2003 Harald Fernengel - Copyright (C) 2003 Jens Dagerbo - 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 TDEV_PARTCONTROLLER_H -#define TDEV_PARTCONTROLLER_H - -#include -#include -#include - -/** -@file tdevpartcontroller.h -KDevelop part controller interface. -*/ - -namespace KParts -{ - class ReadOnlyPart; -} - -/**Document state enum.*/ -enum DocumentState -{ - Clean, /** - Copyright (C) 2002 Matthias Hoelzer-Kluepfel - Copyright (C) 2002 Harald Fernengel - Copyright (C) 2002 F@lk Brettschneider - Copyright (C) 2003 Julian Rockey - Copyright (C) 2003 Roberto Raggi - Copyright (C) 2003 Jens Dagerbo - Copyright (C) 2003 Mario Scalas - 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. -*/ -#include "tdevplugin.h" - -#include "tdevapi.h" -#include "tdevcore.h" -#include "tdevplugininfo.h" -#include "tdevpartcontroller.h" -#include "tdevplugincontroller.h" - -#include -#include -#include - -#include -#include - -#include - -/////////////////////////////////////////////////////////////////////////////// -// struct TDevPlugin::Private -/////////////////////////////////////////////////////////////////////////////// - -struct TDevPlugin::Private -{ - const TDevPluginInfo *info; -}; - -/////////////////////////////////////////////////////////////////////////////// -// class TDevPlugin -/////////////////////////////////////////////////////////////////////////////// - -TDevPlugin::TDevPlugin(const TDevPluginInfo *info, TQObject *parent, const char *name) - :TQObject(parent, name), d(new Private) -{ - assert(parent->inherits( "TDevApi" )); - m_api = static_cast( parent ); - - actionCollection()->setHighlightingEnabled( true ); - - d->info = info; - TDEGlobal::iconLoader()->addAppDir("tdevelop"); -} - -TDevPlugin::~TDevPlugin() -{ - delete( d ); -} - -TDevMainWindow *TDevPlugin::mainWindow() -{ - return m_api->mainWindow(); -} - -TDevCore *TDevPlugin::core() const -{ - return m_api->core(); -} - -TDevProject *TDevPlugin::project() const -{ - return m_api->project(); -} - -CodeModel *TDevPlugin::codeModel() const -{ - return m_api->codeModel(); -} - -TQDomDocument *TDevPlugin::projectDom() const -{ - return m_api->projectDom(); -} - -TDevLanguageSupport *TDevPlugin::languageSupport() const -{ - return m_api->languageSupport(); -} - -TDevPartController *TDevPlugin::partController() const -{ - return m_api->partController(); -} - -TDevPluginController *TDevPlugin::pluginController() const -{ - return m_api->pluginController(); -} - -void TDevPlugin::restorePartialProjectSession(const TQDomElement* /*el*/) -{ - // there's still nothing to do in the base class -} - -void TDevPlugin::savePartialProjectSession(TQDomElement* /*el*/) -{ - // there's still nothing to do in the base class -} - -TDevCodeRepository * TDevPlugin::codeRepository() const -{ - return m_api->codeRepository(); -} - -TDevPlugin * TDevPlugin::extension_internal(const TQString &serviceType, const TQString &constraint) -{ - return m_api->pluginController()->extension(serviceType, constraint); -} - -const TDevPluginInfo *TDevPlugin::info() -{ - return d->info; -} - -#include "tdevplugin.moc" diff --git a/lib/interfaces/tdevplugin.h b/lib/interfaces/tdevplugin.h deleted file mode 100644 index eaa66146..00000000 --- a/lib/interfaces/tdevplugin.h +++ /dev/null @@ -1,201 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 1999-2001 Bernd Gehrmann - 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 TDEVPLUGIN_H -#define TDEVPLUGIN_H - -#include -#include -#include "tdevapi.h" - -class TDevCore; -class TDevProject; -class TDevVersionControl; -class TDevLanguageSupport; -class TDevPartController; -class TDevMainWindow; -class TDevCodeRepository; -class CodeModel; -class TDevPluginInfo; -class TQDomElement; - -/** -@file tdevplugin.h -TDevelop plugin interface. -*/ - -/**Current TDevelop plugin interface version. Interfaces declare plugin version to make sure -old source (or binary) incompatible plugins are not loaded. Increase this if -it is necessary that old plugins stop working.*/ -#define TDEVELOP_PLUGIN_VERSION 5 - -/** -The base class for all TDevelop plugins. -Plugin is a component which is loaded into TDevelop shell at startup or by request. -Each plugin should have corresponding .desktop file with a description. -.desktop file template looks like: -@code -[Desktop Entry] -Encoding=UTF-8 -Type=Service -Name= -GenericName= -Comment= -Icon= -X-TDevelop-Plugin-Version= -X-TDevelop-Plugin-Homepage= -X-TDevelop-Plugin-BugsEmailAddress= -X-TDevelop-Plugin-Copyright= -X-TDE-Library= -X-TDevelop-Version= -X-TDevelop-Scope= -X-TDevelop-Properties= -X-TDevelop-Args= -@endcode -Description of parameters in .desktop file: -- Name is a non-translatable name of a plugin, it is used in TDETrader queries -to search for a plugin (required); -- GenericName is a translatable name of a plugin, it is used to show -plugin names in GUI (required); -- Comment is a short description about the plugin (optional); -- Icon is a plugin icon (preferred); -- X-TDevelop-Plugin-Version is a version of a plugin (optional); -- X-TDevelop-Plugin-Homepage is a home page of a plugin (optional); -- X-TDevelop-Plugin-License is a license (optional). can be: GPL, LGPL, BSD, Artistic, -TQPL or Custom. If this property is not set, license is considered as unknown; -- X-TDevelop-Plugin-BugsEmailAddress is an email address for bug reports (optional); -- X-TDevelop-Plugin-Copyright is a copyright statement (optional); -- X-TDE-Library is a name of library which contains the plugin (required); -- X-TDevelop-Version is a version of TDevelop interfaces which is supported by the plugin (required); -- X-TDevelop-Scope is a scope of a plugin (see below for explanation) (required); -- X-TDevelop-Args is a list of additional arguments passed to plugins constructor (optional); -- X-TDevelop-Properties is a list of properties which this plugin supports, see @ref Profile class documentation for explanation (required to work with shells that support profiles). -. -Plugin scope can be either: -- Core -- Global -- Project -. -Global plugins are plugins which require only shell to be loaded and do not operate on @ref TDevProject interface and/or do not use project wide information.\n -Core plugins are global plugins which offer some important "core" functionality and thus -are not selectable by user in plugin configuration pages.\n -Project plugins require a project to be loaded and are usually loaded/unloaded among with the project. -If your plugin use @ref TDevProject interface and/or operate on project-related information then this is the project plugin. - -@sa TDevGenericFactory class documentation for an information about plugin instantiation -and writing factories for plugins. - -@sa TDevCore class documentation for an information about features which are available to plugins -from shell applications. -*/ -class TDevPlugin: public TQObject, public KXMLGUIClient -{ - Q_OBJECT - - -public: - /**Constructs a 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.*/ - TDevPlugin(const TDevPluginInfo *info, TQObject *parent, const char *name = 0); - - /**Destructs a plugin.*/ - virtual ~TDevPlugin(); - - /**Provides an information about the plugin. - @return TDEAboutData object which was initialized in the constructor.*/ - const TDevPluginInfo* info(); - - /**@return A reference to the toplevel widget.*/ - TDevMainWindow *mainWindow(); - - /**@return A reference to the application core - an object which provides - basic functionalities for inter-parts communications / cooperation.*/ - TDevCore *core() const; - - /**@return A reference to the current project component or 0 if no project is loaded.*/ - TDevProject *project() const; - - /**@return A reference to the language support component or 0 if no support available.*/ - TDevLanguageSupport *languageSupport() const; - - /**@return A reference to the memory symbol store.*/ - CodeModel *codeModel() const; - - /**@return A reference to the DOM tree that represents the project file or 0 if no project is loaded.*/ - TQDomDocument *projectDom() const; - - /**@return A reference to the part controller which is used to manipulate loaded KParts.*/ - TDevPartController *partController() const; - - /**@return A reference to the plugin controller which is used to manipulate loaded plugin.*/ - virtual TDevPluginController *pluginController() const; - - /**@return A reference to the code repository (accessor to persistent symbol stores).*/ - TDevCodeRepository* codeRepository() const; - - /**Queries for the plugin which supports given service type (such plugins are called extensions in KDevelop). - All already loaded plugins will be queried and the first loaded one to support - the service type will be returned. Any plugin can be an extension, only "ServiceTypes=..." - entry is required in .desktop file for that plugin. - - Template argument is used as a type to cast the result to. This is done because extension - is usually derived from a certain base class and not directly from TDevPlugin. - @param serviceType The service type of an extension (like "TDevelop/SourceFormatter"). - @param constraint The constraint which is applied when quering for the service. This - constraint is a usual TDETrader constraint statement (like "[X-TDevelop-Foo]=='MyFoo'"). - @return A KDevelop extension plugin for given service type or 0 if no plugin supports it*/ - template - Extension *extension(const TQString &serviceType, const TQString &constraint = "") - { - return static_cast(extension_internal(serviceType, constraint)); - } - - /**Override this base class method to restore any settings which differs from project to project. - Data can be read from a certain subtree of the project session file. - During project loading, respectively project session (.kdevses) loading, - this method will be called to give a chance to adapt the plugin to - the newly loaded project. For instance, the debugger plugin might restore the - list of breakpoints from the previous debug session for the certain project. - @note Take attention to the difference to common not-project-related session stuff. - They belong to the application rc file (tdeveloprc) - @note Project session file is useful for settings which cannot be shared between - developers. If a setting should be shared, modify projectDom instead. - @param el The parent DOM element for plugins session settings.*/ - virtual void restorePartialProjectSession(const TQDomElement* el); - - /**Saves session settings. - @sa restorePartialProjectSession - this is the other way round, the same just for saving.*/ - virtual void savePartialProjectSession(TQDomElement* el); - -private: - TDevPlugin *extension_internal(const TQString &serviceType, const TQString &constraint = ""); - - TDevApi *m_api; - class Private; - Private *d; -}; - -#endif diff --git a/lib/interfaces/tdevplugincontroller.cpp b/lib/interfaces/tdevplugincontroller.cpp deleted file mode 100644 index bf1eb5e7..00000000 --- a/lib/interfaces/tdevplugincontroller.cpp +++ /dev/null @@ -1,49 +0,0 @@ -/* This file is part of the KDE project - 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. -*/ -#include "tdevplugincontroller.h" - -#include "tdevplugin.h" - -TDevPluginController::TDevPluginController() -{ -} - -TDETrader::OfferList TDevPluginController::query(const TQString &serviceType, - const TQString &constraint) -{ - return TDETrader::self()->query(serviceType, - TQString("%1 and [X-TDevelop-Version] == %2").arg(constraint).arg(TDEVELOP_PLUGIN_VERSION)); -} - -TDETrader::OfferList TDevPluginController::queryPlugins(const TQString &constraint) -{ - return query("TDevelop/Plugin", constraint); -} - -KURL::List TDevPluginController::profileResources(const TQString &/*nameFilter*/) -{ - return KURL::List(); -} - -KURL::List TDevPluginController::profileResourcesRecursive(const TQString &/*nameFilter*/) -{ - return KURL::List(); -} - -#include "tdevplugincontroller.moc" diff --git a/lib/interfaces/tdevplugincontroller.h b/lib/interfaces/tdevplugincontroller.h deleted file mode 100644 index ee44764d..00000000 --- a/lib/interfaces/tdevplugincontroller.h +++ /dev/null @@ -1,119 +0,0 @@ -/* This file is part of the KDE project - 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 TDEVPLUGINCONTROLLER_H -#define TDEVPLUGINCONTROLLER_H - -#include - -#include -#include - -/** -@file tdevplugincontroller.h -TDevelop plugin controller interface. -*/ - -class TDevPlugin; -class ProfileEngine; - -/** -The base class for TDevelop plugin controller. -Plugin controller is responsible for quering, loading and unloading available plugins. -*/ -class TDevPluginController: public TQObject -{ - Q_OBJECT - -public: - - /** - * Returns a uniquely specified plugin. If it isn't already loaded, it will be. - * Use with caution! See extension for parameter details. - */ - virtual TDevPlugin * loadPlugin( const TQString & serviceType, const TQString & constraint ) = 0; - - /** - * Unloads the plugin specified by @p plugin - * @param plugin The plugin desktopEntryName of the plugin to unload - */ - virtual void unloadPlugin( const TQString & plugin ) = 0; - - /**Unloads plugins specified by @p list. - @param list The list of plugin names to unload. plugin name corresponds - to the "Name" property in plugin .desktop file.*/ - virtual void unloadPlugins(TQStringList const &list) = 0; - - /**@return The list of currently loaded plugins.*/ - virtual const TQValueList loadedPlugins() = 0; - - /**Queries for the plugin which supports given service type. - All already loaded plugins will be queried and the first one to support the service type - will be returned. Any plugin can be an extension, only "ServiceTypes=..." entry is - required in .desktop file for that plugin. - @param serviceType The service type of an extension (like "TDevelop/SourceFormatter") - @param constraint The constraint which is applied when quering for the service. This - constraint is a usual TDETrader constraint statement (like "[X-TDevelop-Foo]=='MyFoo'"). - @return A KDevelop extension plugin for given service type or 0 if no plugin supports it*/ - virtual TDevPlugin *extension(const TQString &serviceType, const TQString &constraint = "") = 0; - - /**Queries KDevelop services. Version is checked automatically - by adding proper X-TDevelop-Version=N statement into the query. - @param serviceType The service type to query, for example "TDevelop/Plugin" or - "TDevelop/SourceFormatter." - @param constraint A constraint for the service. Do not include plugin version number - it - is done automatically. - @return The list of plugin offers.*/ - static TDETrader::OfferList query(const TQString &serviceType, const TQString &constraint); - - /**Queries TDevelop plugins. Works like - TDevPluginController::query with serviceType set to "TDevelop/Plugin". - @param constraint A constraint for the service. Do not include plugin version number - it - is done automatically. - @return The list of plugin offers.*/ - static TDETrader::OfferList queryPlugins(const TQString &constraint); - - /**Reimplement this function only if your shell supports plugin profiles. - @return The list of URLs to the profile resources (files) with given @p extension. - @param nameFilter Name filter for files. @see TQDir::setNameFilter documentation - for name filters syntax.*/ - virtual KURL::List profileResources(const TQString &nameFilter); - - /**Reimplement this function only if your shell supports plugin profiles. - @return The list of URLs to the resources (files) with given @p extension. - This list is obtained by a recursive search that process given profile - and all it's subprofiles. - @param nameFilter Name filter for files. @see TQDir::setNameFilter documentation - for name filters syntax.*/ - virtual KURL::List profileResourcesRecursive(const TQString &nameFilter); - - /** @return The current Profile Engine */ - virtual ProfileEngine &engine() = 0; - -signals: - /**Emitted when a plugin profile was changed (reloaded, other profile opened, etc.). - Should work only on shells with plugin profiles support.*/ - void profileChanged(); - -protected: - /**Constructor.*/ - TDevPluginController(); - -}; - -#endif diff --git a/lib/interfaces/tdevplugininfo.cpp b/lib/interfaces/tdevplugininfo.cpp deleted file mode 100644 index 2f607431..00000000 --- a/lib/interfaces/tdevplugininfo.cpp +++ /dev/null @@ -1,181 +0,0 @@ -/* This file is part of the KDE project - 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. -*/ -#include "tdevplugininfo.h" - -#include - -#include -#include - -#include "tdevplugincontroller.h" - -struct TDevPluginInfo::Private { - TQString m_pluginName; - TQString m_rawGenericName; - - TQString m_genericName; - TQString m_description; - TQString m_icon; - - TQString m_version; - int m_licenseType; - TQString m_copyrightStatement; - TQString m_homePageAddress; - TQString m_bugsEmailAddress; - - TQValueList m_authors; - TQValueList m_credits; - - TDEAboutData *m_data; -}; - - -TDevPluginInfo::TDevPluginInfo(const TQString &pluginName) - :d(new Private()) -{ - d->m_pluginName = pluginName; - - KService::Ptr offer = KService::serviceByDesktopName(pluginName); - if (offer != 0) - { - d->m_genericName = offer->genericName(); - d->m_icon = offer->icon(); - d->m_description = offer->comment(); - - d->m_rawGenericName = offer->untranslatedGenericName(); - - d->m_version = offer->property("X-TDevelop-Plugin-Version").toString(); - d->m_homePageAddress = offer->property("X-TDevelop-Plugin-Homepage").toString(); - d->m_bugsEmailAddress = offer->property("X-TDevelop-Plugin-BugsEmailAddress").toString(); - d->m_copyrightStatement = offer->property("X-TDevelop-Plugin-Copyright").toString(); - - TQString lic = offer->property("X-TDevelop-Plugin-License").toString(); - if (lic == "GPL") - d->m_licenseType = TDEAboutData::License_GPL; - else if (lic == "LGPL") - d->m_licenseType = TDEAboutData::License_LGPL; - else if (lic == "BSD") - d->m_licenseType = TDEAboutData::License_BSD; - else if (lic == "QPL") - d->m_licenseType = TDEAboutData::License_QPL; - else if (lic == "Artistic") - d->m_licenseType = TDEAboutData::License_Artistic; - else if (lic == "Custom") - d->m_licenseType = TDEAboutData::License_Custom; - else - d->m_licenseType = TDEAboutData::License_Unknown; - - d->m_data = new TDEAboutData(d->m_pluginName.ascii(), d->m_rawGenericName.ascii(), "1", 0, d->m_licenseType); - } - else - kdDebug() << "Unable to load information for plugin: " << pluginName - << ". Check if " << pluginName << ".desktop exists." << endl; -} - - -TDevPluginInfo::operator TDEAboutData *() const -{ - return d->m_data; -} - -TQString TDevPluginInfo::pluginName() const -{ - return d->m_pluginName; -} - -TQString TDevPluginInfo::genericName() const -{ - return d->m_genericName; -} - -TQString TDevPluginInfo::icon() const -{ - return d->m_icon; -} - -TQString TDevPluginInfo::description() const -{ - return d->m_description; -} - -TQString TDevPluginInfo::version() const -{ - return d->m_version; -} - -int TDevPluginInfo::licenseType() const -{ - return d->m_licenseType; -} - -TQString TDevPluginInfo::license() const -{ - TDevPluginInfo &info = *const_cast(this); -// return TDEAboutData(info).license(); - TDEAboutData *data = info; - return data->license(); -} - -TQString TDevPluginInfo::copyrightStatement() const -{ - return d->m_copyrightStatement; -} - -TQString TDevPluginInfo::homePageAddress() const -{ - return d->m_homePageAddress; -} - -TQString TDevPluginInfo::bugsEmailAddress() const -{ - return d->m_bugsEmailAddress; -} - -TQVariant TDevPluginInfo::property(const TQString &name) const -{ - TDETrader::OfferList offers = TDevPluginController::queryPlugins(TQString("Name='%1'").arg(d->m_pluginName)); - if (offers.count() == 1) - return offers.first()->property(name); - return TQVariant(); -} - -TQVariant TDevPluginInfo::operator [](const TQString &name) const -{ - return property(name); -} - -TQStringList TDevPluginInfo::propertyNames( ) const -{ - TDETrader::OfferList offers = TDevPluginController::queryPlugins(TQString("Name='%1'").arg(d->m_pluginName)); - if (offers.count() == 1) - return offers.first()->propertyNames(); - return TQStringList(); -} - -void TDevPluginInfo::addAuthor(const char *name, const char *task, - const char *emailAddress, const char *webAddress) -{ - d->m_authors.append(TDEAboutPerson(name, task, emailAddress, webAddress)); -} - -void TDevPluginInfo::addCredit(const char *name, const char *task, - const char *emailAddress, const char *webAddress) -{ - d->m_credits.append(TDEAboutPerson(name, task, emailAddress, webAddress)); -} diff --git a/lib/interfaces/tdevplugininfo.h b/lib/interfaces/tdevplugininfo.h deleted file mode 100644 index 419d61aa..00000000 --- a/lib/interfaces/tdevplugininfo.h +++ /dev/null @@ -1,111 +0,0 @@ -/* This file is part of the KDE project - 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 TDEVPLUGININFO_H -#define TDEVPLUGININFO_H - -#include - -#include - -/** -@file tdevplugininfo.h -TDevelop plugin information container class. -*/ - -/** -Information about TDevelop plugin. -It uses plugin name to query plugin .desktop files and -retrieve most information. Names of authors and credits to other people -must be added manually using TDevPluginInfo::addAuthor and TDevPluginInfo::addCredit -methods. -@sa TDevPlugin class documentation for more information about .desktop files. -*/ -class TDevPluginInfo -{ -public: - /**Constructor. - @param pluginName A name of a plugin. Must be the same as the name of a .desktop file - and the same as the location of plugin resource files.*/ - TDevPluginInfo(const TQString &pluginName); - - /**Casts TDevPluginInfo to TDEAboutData. Uses TDevPluginInfo::pluginName as TDEAboutData::appName, - TDevPluginInfo::rawGenericName as TDEAboutData::programName TDevPluginInfo::licenseType as TDEAboutData::licenseType. Other parameters are ignored.*/ - operator TDEAboutData*() const; - - /**@return A name of a plugin (always untranslated).*/ - TQString pluginName() const; - /**@return A generic name of a plugin (translated). Use this in GUI. Information is taken from .desktop file.*/ - TQString genericName() const; - /**@return An icon name of a plugin. Information is taken from .desktop file.*/ - TQString icon() const; - /**@return A description of a plugin. Information is taken from .desktop file.*/ - TQString description() const; - /**@return A version of a plugin. Information is taken from .desktop file.*/ - TQString version() const; - /**@return A license type of a plugin. Information is taken from .desktop file.*/ - int licenseType() const; - /**@return A license text for known license types (GPL, LGPL, BSD, Artistic, TQPL).*/ - TQString license() const; - /**@return A copyright statement of a plugin. Information is taken from .desktop file.*/ - TQString copyrightStatement() const; - /**@return A home page of a plugin. Information is taken from .desktop file.*/ - TQString homePageAddress() const; - /**@return A email address for bugs of a plugin. Information is taken from .desktop file.*/ - TQString bugsEmailAddress() const; - - /**@param name The name of a property. - @return Any property value which exists in .desktop file.*/ - TQVariant property(const TQString &name) const; - /**@param name The name of a property. - @return Any property value which exists in .desktop file.*/ - TQVariant operator [] (const TQString &name) const; - /**@return A list of property names set in .desktop file.*/ - TQStringList propertyNames() const; - - /**@return A list of plugin authors.*/ - const TQValueList authors() const; - /**@return A list of other plugin contributors.*/ - const TQValueList credits() const; - - /**Adds an author to the list of authors. - You can call this function as many times you need. Each entry is appended to a list. - @param name The developer's name in UTF-8 encoding. - @param task What the person is responsible for. This text can contain newlines. It should be marked for translation like this: I18N_NOOP("Task description..."). Can be 0. - @param emailAddress An Email address where the person can be reached. Can be 0. - @param webAddress The person's homepage or a relevant link. Start the address with "http://". "http://some.domain" is correct, "some.domain" is not. Can be 0.*/ - void addAuthor(const char *name, const char *task, - const char *emailAddress = 0, const char *webAddress = 0); - /**Adds a contributor to the list of contributors. - You can call this function as many times you need. Each entry is appended to a list. - @param name The developer's name in UTF-8 encoding. - @param task What the person is responsible for. This text can contain newlines. It should be marked for translation like this: I18N_NOOP("Task description..."). Can be 0. - @param emailAddress An Email address where the person can be reached. Can be 0. - @param webAddress The person's homepage or a relevant link. Start the address with "http://". "http://some.domain" is correct, "some.domain" is not. Can be 0.*/ - void addCredit(const char *name, const char *task = 0, - const char *emailAddress = 0, const char *webAddress = 0); - -private: - /**Returns the untranslated generic name of a plugin as set in .desktop file.*/ - const char *rawGenericName() const; - - class Private; - Private *d; -}; - -#endif diff --git a/lib/interfaces/tdevproject.cpp b/lib/interfaces/tdevproject.cpp deleted file mode 100644 index 77136ca0..00000000 --- a/lib/interfaces/tdevproject.cpp +++ /dev/null @@ -1,164 +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 Jens Dagerbo - Copyright (C) 2003 Mario Scalas - 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. -*/ - -#include - -#include "tdevproject.h" -#include -#include -#include -#include "tdevprojectiface.h" - -struct TDevProject::Private { - TQMap m_absToRel; - TQStringList m_symlinkList; - TQTimer *m_timer; - TDevProjectIface *m_iface; -}; - -TDevProject::TDevProject(const TDevPluginInfo *info, TQObject *parent, const char *name) - : TDevPlugin(info, parent, name), d(new TDevProject::Private()) -{ - connect( this, TQT_SIGNAL(addedFilesToProject(const TQStringList& )), this, TQT_SLOT(buildFileMap()) ); - connect( this, TQT_SIGNAL(removedFilesFromProject(const TQStringList& )), this, TQT_SLOT(buildFileMap()) ); - - connect( this, TQT_SIGNAL(addedFilesToProject(const TQStringList& )), this, TQT_SLOT(slotAddFilesToFileMap(const TQStringList& )) ); - connect( this, TQT_SIGNAL(removedFilesFromProject(const TQStringList& )), this, TQT_SLOT(slotRemoveFilesFromFileMap(const TQStringList& )) ); - - d->m_timer = new TQTimer(this); - connect(d->m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotBuildFileMap())); - d->m_iface = new TDevProjectIface(this); -} - -TDevProject::~TDevProject() -{ - d->m_timer->stop(); - delete d->m_iface; - delete d->m_timer; - delete d; -} - -void TDevProject::changedFile( const TQString & fileName ) -{ - TQStringList fileList; - fileList.append ( fileName ); - - emit changedFilesInProject( fileList ); - -} - -void TDevProject::changedFiles( const TQStringList & fileList ) -{ - emit changedFilesInProject( fileList ); -} - -TDevProject::Options TDevProject::options() const -{ - return (TDevProject::Options)0; -} - -bool TDevProject::isProjectFile( const TQString & absFileName ) -{ - return d->m_absToRel.contains( absFileName ); -} - -TQString TDevProject::relativeProjectFile( const TQString & absFileName ) -{ - if( isProjectFile(absFileName) ) - return d->m_absToRel[ absFileName ]; - return TQString(); -} - -void TDevProject::buildFileMap() -{ - d->m_timer->stop(); - d->m_timer->start(0, true); -} - -void TDevProject::slotBuildFileMap() -{ - kdDebug(9000) << k_funcinfo << endl; - - d->m_absToRel.clear(); - d->m_symlinkList.clear(); - const TQStringList fileList = allFiles(); - for( TQStringList::ConstIterator it=fileList.begin(); it!=fileList.end(); ++it ) - { - TQFileInfo fileInfo( projectDirectory() + "/" + *it ); - d->m_absToRel[ URLUtil::canonicalPath(fileInfo.absFilePath()) ] = *it; - - if ( URLUtil::canonicalPath( fileInfo.absFilePath() ) != fileInfo.absFilePath() ) - { - d->m_symlinkList << *it; - } - } -} - -void TDevProject::openProject( const TQString & /*dirName*/, const TQString & /*projectName*/ ) -{ - buildFileMap(); -} - -TQStringList TDevProject::symlinkProjectFiles( ) -{ - return d->m_symlinkList; -} - -TQString TDevProject::defaultRunDirectory(const TQString& projectPluginName) const -{ - return DomUtil::readEntry(*projectDom(), "/" + projectPluginName + "/run/globalcwd"); -} - -void TDevProject::slotAddFilesToFileMap( const TQStringList & fileList ) -{ - TQStringList::ConstIterator it = fileList.begin(); - while( it != fileList.end() ) - { - TQFileInfo fileInfo( projectDirectory() + "/" + *it ); - d->m_absToRel[ URLUtil::canonicalPath(fileInfo.absFilePath()) ] = *it; - - if ( URLUtil::canonicalPath( fileInfo.absFilePath() ) != fileInfo.absFilePath() ) - { - d->m_symlinkList << *it; - } - - ++it; - } -} - -void TDevProject::slotRemoveFilesFromFileMap( const TQStringList & fileList ) -{ - TQStringList::ConstIterator it = fileList.begin(); - while( it != fileList.end() ) - { - TQFileInfo fileInfo( projectDirectory() + "/" + *it ); - d->m_absToRel.remove( URLUtil::canonicalPath(fileInfo.absFilePath()) ); - - d->m_symlinkList.remove( *it ); - - ++it; - } -} - -#include "tdevproject.moc" diff --git a/lib/interfaces/tdevproject.h b/lib/interfaces/tdevproject.h deleted file mode 100644 index fa320edf..00000000 --- a/lib/interfaces/tdevproject.h +++ /dev/null @@ -1,219 +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) 2003 Jens Dagerbo - Copyright (C) 2003 Mario Scalas - 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 TDEVPROJECT_H -#define TDEVPROJECT_H - -#include "tdevplugin.h" -#include "domutil.h" - -#include -#include - -/** -@file tdevproject.h -KDevelop project interface. -*/ - -class TQTimer; - -/** -KDevelop project interface. -Plugins implementing the TDevProject interfaces are used to manage projects. - -Project can be considered as a way of grouping files (in text editors) or -as a way of providing support for a build system (like it is done in TDevelop IDE buildtools). -*/ -class TDevProject: public TDevPlugin -{ - Q_OBJECT - -public: - /**Constructs a project 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.*/ - TDevProject(const TDevPluginInfo *info, TQObject *parent=0, const char *name=0); - /**Destructor.*/ - virtual ~TDevProject(); - - /**Options of the project plugin.*/ - enum Options { - UsesOtherBuildSystem = 0 /**/run/directoryradio == executable - * The directory where the executable is. - * if //run/directoryradio == build - * The build directory. - * if /kdevautoproject/run/directoryradio == custom - * The custom directory absolute path. - * Derived classes are supposed to explicitly call this implementation - */ - TQString defaultRunDirectory(const TQString& projectPluginName) const; - -private slots: - void buildFileMap(); - void slotBuildFileMap(); - void slotAddFilesToFileMap(const TQStringList & fileList ); - void slotRemoveFilesFromFileMap(const TQStringList & fileList ); - -signals: - /**Emitted when a new list of files has been added to the - project. Provided for convenience when many files were added. - @param fileList The file names relative to the project directory.*/ - void addedFilesToProject(const TQStringList& fileList); - - /**Emitted when a list of files has been removed from the project. - Provided for convenience when many files were removed. - @param fileList The file names relative to the project directory.*/ - void removedFilesFromProject(const TQStringList& fileList); - - /**Emitted when a list of files has changed in the project. - @param fileList The file names relative to the project directory.*/ - void changedFilesInProject(const TQStringList& fileList); - - /**Emitted when one compile related command (make, make install, make ...) ends sucessfuly. - Used to reparse the files after a sucessful compilation.*/ - void projectCompiled(); - - /**Emitted when the active directory of the project changes - * @param olddir The old active directory - * @param newdir The new active directory - */ - void activeDirectoryChanged( const TQString& olddir, const TQString& newdir ); - -private: - class Private; - Private *d; -}; - -#endif diff --git a/lib/interfaces/tdevprojectiface.cpp b/lib/interfaces/tdevprojectiface.cpp deleted file mode 100644 index 625a4118..00000000 --- a/lib/interfaces/tdevprojectiface.cpp +++ /dev/null @@ -1,186 +0,0 @@ - - -/* This file is part of the KDE project - Copyright (C) 2005 Ian Reinhart Geiser - - 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 "tdevprojectiface.h" -#include "tdevproject.h" -#include "domutil.h" - -TDevProjectIface::TDevProjectIface(TDevProject *prj) - : TQObject(prj), DCOPObject("TDevProject"), m_prj(prj) -{ -} - - -TDevProjectIface::~TDevProjectIface() -{ -} - -void TDevProjectIface::openProject( const TQString & dirName, const TQString & projectName ) -{ - m_prj->openProject(dirName,projectName); -} - -void TDevProjectIface::closeProject( ) -{ - m_prj->closeProject(); -} - -uint TDevProjectIface::options( ) const -{ - return (uint)m_prj->options(); -} - -TQString TDevProjectIface::projectDirectory( ) const -{ - return m_prj->projectDirectory(); -} - -TQString TDevProjectIface::projectName( ) const -{ - return m_prj->projectName(); -} - -TQString TDevProjectIface::mainProgram() const -{ - return m_prj->mainProgram(); -} - -TQString TDevProjectIface::runDirectory( ) const -{ - return m_prj->runDirectory(); -} - -TQString TDevProjectIface::activeDirectory( ) const -{ - return m_prj->activeDirectory(); -} - -TQString TDevProjectIface::buildDirectory( ) const -{ - return m_prj->buildDirectory(); -} - -TQStringList TDevProjectIface::allFiles( ) const -{ - return m_prj->allFiles(); -} - -TQStringList TDevProjectIface::distFiles( ) const -{ - return m_prj->distFiles(); -} - -void TDevProjectIface::addFiles( const TQStringList & fileList ) -{ - m_prj->addFiles(fileList); -} - -void TDevProjectIface::addFile( const TQString & fileName ) -{ - m_prj->addFile(fileName); -} - -void TDevProjectIface::removeFiles( const TQStringList & fileList ) -{ - m_prj->removeFiles(fileList); -} - -void TDevProjectIface::removeFile( const TQString & fileName ) -{ - m_prj->removeFile(fileName); -} - -void TDevProjectIface::changedFiles( const TQStringList & fileList ) -{ - m_prj->changedFiles(fileList); -} - -void TDevProjectIface::changedFile( const TQString & fileName ) -{ - m_prj->changedFile(fileName); -} - -bool TDevProjectIface::isProjectFile( const TQString & absFileName ) -{ - return m_prj->isProjectFile(absFileName); -} - -TQString TDevProjectIface::relativeProjectFile( const TQString & absFileName ) -{ - return m_prj->relativeProjectFile(absFileName); -} - -TQStringList TDevProjectIface::symlinkProjectFiles( ) -{ - return m_prj->symlinkProjectFiles(); -} - -TQString TDevProjectIface::readEntry( const TQString & path, const TQString & defaultEntry ) -{ - return DomUtil::readEntry( *m_prj->projectDom(), path, defaultEntry); -} - -int TDevProjectIface::readIntEntry( const TQString & path, int defaultEntry ) -{ - return DomUtil::readIntEntry(*m_prj->projectDom(), path,defaultEntry); -} - -bool TDevProjectIface::readBoolEntry( const TQString & path, bool defaultEntry ) -{ - return DomUtil::readBoolEntry(*m_prj->projectDom(), path, defaultEntry); -} - -TQStringList TDevProjectIface::readListEntry( const TQString & path, const TQString & tag ) -{ - return DomUtil::readListEntry(*m_prj->projectDom(), path, tag); -} - -TQMap< TQString, TQString > TDevProjectIface::readMapEntry( const TQString & path ) -{ - return DomUtil::readMapEntry(*m_prj->projectDom(), path); -} - -void TDevProjectIface::writeEntry( const TQString & path, const TQString & value ) -{ - DomUtil::writeEntry(*m_prj->projectDom(), path, value); -} - -void TDevProjectIface::writeIntEntry( const TQString & path, int value ) -{ - DomUtil::writeIntEntry(*m_prj->projectDom(), path, value); -} - -void TDevProjectIface::writeBoolEntry( const TQString & path, bool value ) -{ - DomUtil::writeBoolEntry(*m_prj->projectDom(), path, value); -} - -void TDevProjectIface::writeListEntry( const TQString & path, const TQString & tag, const TQStringList & value ) -{ - DomUtil::writeListEntry(*m_prj->projectDom(), path, tag, value); -} - -void TDevProjectIface::writeMapEntry( const TQString & path, const TQMap< TQString, TQString > & map ) -{ - DomUtil::writeMapEntry(*m_prj->projectDom(), path, map); -} - -#include "tdevprojectiface.moc" diff --git a/lib/interfaces/tdevprojectiface.h b/lib/interfaces/tdevprojectiface.h deleted file mode 100644 index c3e0ddd4..00000000 --- a/lib/interfaces/tdevprojectiface.h +++ /dev/null @@ -1,82 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2005 Ian Reinhart Geiser - - 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 TDEVPROJECTIFACE_H -#define TDEVPROJECTIFACE_H - -#include -#include -#include - -class TDevProject; - -/** -DCOP Interface for the @ref TDevProject object. - -@author KDevelop Authors -*/ -class TDevProjectIface : public TQObject, public DCOPObject -{ - Q_OBJECT -// - K_DCOP -public: - TDevProjectIface(TDevProject *prj); - - ~TDevProjectIface(); -k_dcop: - void openProject(const TQString &dirName, const TQString &projectName); - void closeProject(); - uint options() const; - TQString projectDirectory() const; - TQString projectName() const; - TQString mainProgram() const; - TQString runDirectory() const; - TQString activeDirectory() const; - TQString buildDirectory() const; - TQStringList allFiles() const; - TQStringList distFiles() const; - void addFiles(const TQStringList &fileList); - void addFile(const TQString &fileName); - void removeFiles(const TQStringList& fileList); - void removeFile(const TQString &fileName); - void changedFiles(const TQStringList &fileList); - void changedFile(const TQString &fileName); - bool isProjectFile(const TQString &absFileName); - TQString relativeProjectFile(const TQString &absFileName); - TQStringList symlinkProjectFiles(); - - // Project DOM access - TQString readEntry(const TQString &path, const TQString &defaultEntry = TQString()); - int readIntEntry(const TQString &path, int defaultEntry = 0); - bool readBoolEntry(const TQString &path, bool defaultEntry = false); - TQStringList readListEntry(const TQString &path, const TQString &tag); - TQMap readMapEntry(const TQString &path); - - void writeEntry(const TQString &path, const TQString &value); - void writeIntEntry(const TQString &path, int value); - void writeBoolEntry( const TQString &path, bool value); - void writeListEntry(const TQString &path, const TQString &tag, const TQStringList &value); - void writeMapEntry(const TQString& path, const TQMap &map); - - private: - TDevProject *m_prj; -}; - -#endif diff --git a/lib/util/CMakeLists.txt b/lib/util/CMakeLists.txt index 0114b5ae..1eb17f35 100644 --- a/lib/util/CMakeLists.txt +++ b/lib/util/CMakeLists.txt @@ -26,13 +26,13 @@ install( FILES DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/util ) -##### tdevutil (static) ######################### +##### kdevutil (static) ######################### -tde_add_library( tdevutil STATIC_PIC AUTOMOC +tde_add_library( kdevutil STATIC_PIC AUTOMOC SOURCES blockingkprocess.cpp configwidgetproxy.cpp domutil.cpp execcommand.cpp filetemplate.cpp - tdeveditorutil.cpp tdevjobtimer.cpp - tdevshellwidget.cpp tdescriptactionmanager.cpp + kdeveditorutil.cpp kdevjobtimer.cpp + kdevshellwidget.cpp tdescriptactionmanager.cpp rurl.cpp settings.cpp urlutil.cpp ) diff --git a/lib/util/Makefile.am b/lib/util/Makefile.am index 52ededb0..8bf28091 100644 --- a/lib/util/Makefile.am +++ b/lib/util/Makefile.am @@ -1,10 +1,10 @@ INCLUDES = -I$(top_srcdir)/lib/compat -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/sourceinfo $(all_includes) -noinst_LTLIBRARIES = libtdevutil.la +noinst_LTLIBRARIES = libkdevutil.la -libtdevutil_la_SOURCES = blockingkprocess.cpp configwidgetproxy.cpp domutil.cpp \ - execcommand.cpp filetemplate.cpp tdeveditorutil.cpp tdevjobtimer.cpp \ - tdevshellwidget.cpp tdescriptactionmanager.cpp rurl.cpp settings.cpp urlutil.cpp +libkdevutil_la_SOURCES = blockingkprocess.cpp configwidgetproxy.cpp domutil.cpp \ + execcommand.cpp filetemplate.cpp kdeveditorutil.cpp kdevjobtimer.cpp \ + kdevshellwidget.cpp tdescriptactionmanager.cpp rurl.cpp settings.cpp urlutil.cpp METASOURCES = AUTO @@ -12,10 +12,10 @@ tdevelopincludedir = $(includedir)/tdevelop/util tdevelopinclude_HEADERS = domutil.h execcommand.h filetemplate.h urlutil.h \ configwidgetproxy.h rurl.h tdescriptactionmanager.h -DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils tdevextensions tdevinterfaces -DOXYGEN_PROJECTNAME = TDevelop Utility Library -DOXYGEN_DOCDIRPREFIX = tdev +DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils kdevextensions kdevinterfaces +DOXYGEN_PROJECTNAME = KDevelop Utility Library +DOXYGEN_DOCDIRPREFIX = kdev include ../../Doxyfile.am -noinst_HEADERS = blockingkprocess.h tdeveditorutil.h tdevjobtimer.h \ - tdevshellwidget.h settings.h +noinst_HEADERS = blockingkprocess.h kdeveditorutil.h kdevjobtimer.h \ + kdevshellwidget.h settings.h diff --git a/lib/util/configwidgetproxy.cpp b/lib/util/configwidgetproxy.cpp index c2251158..bea1c79a 100644 --- a/lib/util/configwidgetproxy.cpp +++ b/lib/util/configwidgetproxy.cpp @@ -26,13 +26,13 @@ #include #include -#include +#include #include "configwidgetproxy.h" -ConfigWidgetProxy::ConfigWidgetProxy( TDevCore * core ) +ConfigWidgetProxy::ConfigWidgetProxy( KDevCore * core ) { connect( core, TQT_SIGNAL(configWidget(KDialogBase*)), this, TQT_SLOT(slotConfigWidget( KDialogBase*)) ); connect( core, TQT_SIGNAL(projectConfigWidget(KDialogBase*)), this, TQT_SLOT(slotProjectConfigWidget( KDialogBase*)) ); diff --git a/lib/util/configwidgetproxy.h b/lib/util/configwidgetproxy.h index f1ced178..7881f830 100644 --- a/lib/util/configwidgetproxy.h +++ b/lib/util/configwidgetproxy.h @@ -24,7 +24,7 @@ #include #include -class TDevCore; +class KDevCore; class KDialogBase; /** @@ -65,8 +65,8 @@ void MyPart::insertConfigWidget( TQObject const * dlg, TQWidget * page, unsigned } @endcode -Note that this replaces the functionality of typical TDevCore::configWidget() and -TDevCore::projectConfigWidget() slots. +Note that this replaces the functionality of typical KDevCore::configWidget() and +KDevCore::projectConfigWidget() slots. */ class ConfigWidgetProxy : public TQObject { @@ -76,7 +76,7 @@ Q_OBJECT public: /**Constructor. @param core An instance of KDevelop Core.*/ - ConfigWidgetProxy( TDevCore * core ); + ConfigWidgetProxy( KDevCore * core ); virtual ~ConfigWidgetProxy(); /** diff --git a/lib/util/filetemplate.cpp b/lib/util/filetemplate.cpp index 4d0facdf..c2454580 100644 --- a/lib/util/filetemplate.cpp +++ b/lib/util/filetemplate.cpp @@ -27,12 +27,12 @@ #include -#include "tdevplugin.h" -#include "tdevproject.h" +#include "kdevplugin.h" +#include "kdevproject.h" #include "domutil.h" -bool FileTemplate::exists(TDevPlugin *part, const TQString &name, Policy p) +bool FileTemplate::exists(KDevPlugin *part, const TQString &name, Policy p) { //TQString fileName = (p == Default) ? // (part->project()->projectDirectory() + "/templates/" + name) : name; @@ -40,17 +40,17 @@ bool FileTemplate::exists(TDevPlugin *part, const TQString &name, Policy p) return TQFile::exists( fullPathForName(part,name,p) ); } -TQString FileTemplate::read(TDevPlugin *part, const TQString &name, Policy p) +TQString FileTemplate::read(KDevPlugin *part, const TQString &name, Policy p) { - //TDevProject *project = part->project(); + //KDevProject *project = part->project(); //TQString fileName = (p == Default) ? (project->projectDirectory() + // "/templates/" + name) : name; return readFile(part, fullPathForName(part, name, p) ); } -TQString FileTemplate::readFile(TDevPlugin *part, const TQString &fileName) +TQString FileTemplate::readFile(KDevPlugin *part, const TQString &fileName) { TQDomDocument &dom = *part->projectDom(); @@ -87,7 +87,7 @@ TQString FileTemplate::makeSubstitutions( TQDomDocument & dom, const TQString & } -bool FileTemplate::copy(TDevPlugin *part, const TQString &name, +bool FileTemplate::copy(KDevPlugin *part, const TQString &name, const TQString &dest, Policy p) { TQString text = read(part, name, p); @@ -109,7 +109,7 @@ bool FileTemplate::copy(TDevPlugin *part, const TQString &name, return true; } -TQString FileTemplate::fullPathForName(TDevPlugin *part, const TQString &name, +TQString FileTemplate::fullPathForName(KDevPlugin *part, const TQString &name, Policy p) { // if Policy is not default, full path is just the name if (p!=Default) return name; @@ -123,6 +123,6 @@ TQString FileTemplate::fullPathForName(TDevPlugin *part, const TQString &name, } // next try global - TQString globalName = ::locate("data", "tdevfilecreate/file-templates/" + name); + TQString globalName = ::locate("data", "kdevfilecreate/file-templates/" + name); return globalName.isNull() ? fileName : globalName; } diff --git a/lib/util/filetemplate.h b/lib/util/filetemplate.h index 7802f9b7..8f863535 100644 --- a/lib/util/filetemplate.h +++ b/lib/util/filetemplate.h @@ -22,7 +22,7 @@ #include -class TDevPlugin; +class KDevPlugin; class TQDomDocument; /** @@ -49,21 +49,21 @@ public: * exists in the current project. File templates * are stored in the "templates" subdirectory of a project or in application shared dirs. */ - static bool exists(TDevPlugin *part, const TQString &name, Policy p = Default); + static bool exists(KDevPlugin *part, const TQString &name, Policy p = Default); /** * Reads a template with the given name (e.g. "cpp") * and makes variable substitutions (like $AUTHOR$ etc.) * in it. The resulting string is returned. */ - static TQString read(TDevPlugin *part, const TQString &name, Policy p = Default); + static TQString read(KDevPlugin *part, const TQString &name, Policy p = Default); /** * Reads a template with the given URL * and makes variable substitutions (like $AUTHOR$ etc.) * in it. The resulting string is returned. */ - static TQString readFile(TDevPlugin *part, const TQString &fileName); + static TQString readFile(KDevPlugin *part, const TQString &fileName); /** * Makes variable substitutions on a text, based on a specified TQDomDocument @@ -76,13 +76,13 @@ public: * file with the name dest and - while copying - * performs variable substitutions. */ - static bool copy(TDevPlugin *part, const TQString &name, + static bool copy(KDevPlugin *part, const TQString &name, const TQString &dest, Policy p = Default); /** * Translates a template name into a full path, or suggests a full path * for the template in the project directory if it doesn't exist. */ - static TQString fullPathForName(TDevPlugin *part, const TQString &name, Policy p = Default); + static TQString fullPathForName(KDevPlugin *part, const TQString &name, Policy p = Default); }; #endif diff --git a/lib/util/kdeveditorutil.cpp b/lib/util/kdeveditorutil.cpp new file mode 100644 index 00000000..198e9a42 --- /dev/null +++ b/lib/util/kdeveditorutil.cpp @@ -0,0 +1,89 @@ +/*************************************************************************** + * Copyright (C) 2007 by Jens Dagerbo * + * jens.dagerbo@swipnet.se * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "kdeveditorutil.h" + +#include +#include +#include +#include +#include + +bool KDevEditorUtil::currentPositionReal( unsigned int * line, unsigned int * col, KTextEditor::Document * doc, KTextEditor::View * view ) +{ + if ( !line || !col ) return false; + + KTextEditor::EditInterface * editIface = dynamic_cast( doc ); + if ( !editIface ) return false; + + view = view ? view : dynamic_cast( doc->widget() ); + + KTextEditor::ViewCursorInterface * cursorIface = dynamic_cast( view ); + if ( !cursorIface ) return false; + + cursorIface->cursorPositionReal( line, col ); + return true; +} + +TQString KDevEditorUtil::currentLine( KTextEditor::Document * doc, KTextEditor::View * view ) +{ + KTextEditor::EditInterface * editIface = dynamic_cast( doc ); + if ( !editIface ) return TQString(); + + view = view ? view : dynamic_cast( doc->widget() ); + + KTextEditor::ViewCursorInterface * cursorIface = dynamic_cast( view ); + if ( !cursorIface ) return TQString(); + + uint line = 0; + uint col = 0; + cursorIface->cursorPositionReal(&line, &col); + + return editIface->textLine(line); +} + +TQString KDevEditorUtil::currentWord( KTextEditor::Document * doc, KTextEditor::View * view ) +{ + KTextEditor::EditInterface * editIface = dynamic_cast( doc ); + if ( !editIface ) return TQString(); + + view = view ? view : dynamic_cast( doc->widget() ); + + KTextEditor::ViewCursorInterface * cursorIface = dynamic_cast( view ); + if ( !cursorIface ) return TQString(); + + uint line = 0; + uint col = 0; + cursorIface->cursorPositionReal(&line, &col); + + TQString linestr = editIface->textLine(line); + + int startPos = TQMAX( TQMIN( (int)col, (int)linestr.length()-1 ), 0 ); + int endPos = startPos; + startPos--; + while (startPos >= 0 && ( linestr[startPos].isLetterOrNumber() || linestr[startPos] == '_' || linestr[startPos] == '~') ) + startPos--; + while (endPos < (int)linestr.length() && ( linestr[endPos].isLetterOrNumber() || linestr[endPos] == '_' ) ) + endPos++; + + return ( ( startPos == endPos ) ? TQString() : linestr.mid( startPos+1, endPos-startPos-1 ) ); +} + + +TQString KDevEditorUtil::currentSelection( KTextEditor::Document * doc ) +{ + KTextEditor::SelectionInterface * selectIface = dynamic_cast( doc ); + return selectIface ? selectIface->selection() : TQString(); +} + + +// kate: space-indent off; indent-width 4; tab-width 4; show-tabs on; + diff --git a/lib/util/kdeveditorutil.h b/lib/util/kdeveditorutil.h new file mode 100644 index 00000000..79a64fe1 --- /dev/null +++ b/lib/util/kdeveditorutil.h @@ -0,0 +1,67 @@ +/*************************************************************************** + * Copyright (C) 2007 by Jens Dagerbo * + * jens.dagerbo@swipnet.se * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef KDEVEDITOR_H +#define KDEVEDITOR_H + +namespace KTextEditor +{ +class Document; +class View; +} + +#include + +/** +Class with some common utility operations not currently supported by KTE + + @author Jens Dagerbo +*/ +class KDevEditorUtil +{ + KDevEditorUtil() {} +public: + + /** + * + * @param line + * @param col + * @param doc + * @param view + * @return + */ + static bool currentPositionReal( unsigned int * line, unsigned int * col, KTextEditor::Document * doc, KTextEditor::View * view = 0 ); + + /** + * + * @param doc + * @param view + * @return + */ + static TQString currentLine( KTextEditor::Document * doc, KTextEditor::View * view = 0 ); + + /** + * Call to get the text under the cursor of the currently active view. + * @return the text under the cursor of the currently active view + */ + static TQString currentWord( KTextEditor::Document * doc, KTextEditor::View * view = 0 ); + + /** + * Call to get the selection in the currently active view + * @return the selection in the currently active view + */ + static TQString currentSelection( KTextEditor::Document * doc ); +}; + +#endif + + +// kate: space-indent off; indent-width 4; tab-width 4; show-tabs on; diff --git a/lib/util/kdevjobtimer.cpp b/lib/util/kdevjobtimer.cpp new file mode 100644 index 00000000..b0b78250 --- /dev/null +++ b/lib/util/kdevjobtimer.cpp @@ -0,0 +1,39 @@ +/*************************************************************************** + * Copyright (C) 2006 by Jens Dagerbo * + * jens.dagerbo@swipnet.se * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include "kdevjobtimer.h" + +KDevJobTimer::KDevJobTimer( void * payload, TQObject *parent, const char *name) + : TQTimer(parent, name) +{ + m_payload = payload; + connect( this, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout()) ); +} + +KDevJobTimer::~KDevJobTimer() +{ +} + +void KDevJobTimer::singleShot(int msec, TQObject * receiver, const char * member, void * payload) +{ + KDevJobTimer * p = new KDevJobTimer( payload ); + p->start( msec, true ); + connect( p, TQT_SIGNAL(timeout(void*)), receiver, member ); +} + +void KDevJobTimer::slotTimeout() +{ + emit timeout( m_payload ); + m_payload = 0; + deleteLater(); +} + +#include "kdevjobtimer.moc" diff --git a/lib/util/kdevjobtimer.h b/lib/util/kdevjobtimer.h new file mode 100644 index 00000000..b0fa829e --- /dev/null +++ b/lib/util/kdevjobtimer.h @@ -0,0 +1,40 @@ +/*************************************************************************** + * Copyright (C) 2006 by Jens Dagerbo * + * jens.dagerbo@swipnet.se * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#ifndef KDEVJOBTIMER_H +#define KDEVJOBTIMER_H + +#include + +class KDevJobTimer : public TQTimer +{ +Q_OBJECT + +public: + static void singleShot( int msec, TQObject * receiver, const char * member, void * payload ); + +signals: + void timeout(void*); + +private: + KDevJobTimer( void * payload, TQObject *parent = 0, const char *name = 0); + ~KDevJobTimer(); + +private slots: + void slotTimeout(); + +private: + void * m_payload; + +}; + + +#endif diff --git a/lib/util/kdevshellwidget.cpp b/lib/util/kdevshellwidget.cpp new file mode 100644 index 00000000..b9220250 --- /dev/null +++ b/lib/util/kdevshellwidget.cpp @@ -0,0 +1,125 @@ +/*************************************************************************** + * Copyright (C) 2006 by Jens Dagerbo * + * jens.dagerbo@swipnet.se * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include +#include + +#include +#include +#include +#include +#include + +#include "kdevshellwidget.h" + +KDevShellWidget::KDevShellWidget(TQWidget *parent, const char *name) + : TQVBox(parent, name), m_doAutoActivate( false ), m_isRunning( false ) +{ +} + + +KDevShellWidget::~KDevShellWidget() +{ +} + +void KDevShellWidget::setShell( const TQString & shell, const TQStrList & arguments ) +{ + m_shellName = shell; + m_shellArguments = arguments; +} + +void KDevShellWidget::activate( ) +{ + KLibFactory *factory = KLibLoader::self()->factory("libkonsolepart"); + if ( !factory ) return; + + m_konsolePart = (KParts::ReadOnlyPart *) factory->create( TQT_TQOBJECT(this), "libkonsolepart", "KParts::ReadOnlyPart" ); + if ( !m_konsolePart ) return; + + connect( m_konsolePart, TQT_SIGNAL( processExited(TDEProcess *) ), this, TQT_SLOT( processExited(TDEProcess *) ) ); + connect( m_konsolePart, TQT_SIGNAL( receivedData( const TQString& ) ), this, TQT_SIGNAL( receivedData( const TQString& ) ) ); + connect( m_konsolePart, TQT_SIGNAL(destroyed()), this, TQT_SLOT(partDestroyed()) ); + + m_konsolePart->widget()->setFocusPolicy( TQ_WheelFocus ); + setFocusProxy( m_konsolePart->widget() ); + m_konsolePart->widget()->setFocus(); + + if ( m_konsolePart->widget()->inherits(TQFRAME_OBJECT_NAME_STRING) ) + ((TQFrame*)m_konsolePart->widget())->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); + + m_konsolePart->widget()->show(); + + TerminalInterface* ti = static_cast( m_konsolePart->tqt_cast( "TerminalInterface" ) ); + if( !ti ) return; + + if ( !m_shellName.isEmpty() ) + ti->startProgram( m_shellName, m_shellArguments ); + + m_isRunning = true; + +} + +void KDevShellWidget::partDestroyed( ) +{ + if ( m_doAutoActivate ) + { + activate(); + } +} + +void KDevShellWidget::processExited( TDEProcess * proc ) +{ + m_isRunning = false; + + if ( !proc ) return; + + kdDebug(9000) << proc->args() << endl; + + if ( proc->normalExit() ) + emit shellExited( proc->exitStatus() ); + else if ( proc->signalled() ) + emit shellSignalled( proc->exitSignal() ); +} + +void KDevShellWidget::sendInput( const TQString & text ) +{ + if ( !m_konsolePart ) return; + TerminalInterface* ti = static_cast( m_konsolePart->tqt_cast( "TerminalInterface" ) ); + if( !ti ) return; + + ti->sendInput( text ); +} + +bool KDevShellWidget::isRunning( ) +{ + return m_isRunning; +} + +void KDevShellWidget::setAutoReactivateOnClose( bool doAutoActivate ) +{ + // to auto reactivate can be dangerous, do it like this to avoid + // reactivating with a non-working setting (the partDestroyed() + // slot will have ran before m_doAutoActivate is set) + if ( doAutoActivate ) + TQTimer::singleShot( 3000, this, TQT_SLOT(setAutoReactivateOnCloseDelayed()) ); + else + m_doAutoActivate = false; +} + +void KDevShellWidget::setAutoReactivateOnCloseDelayed( ) +{ + m_doAutoActivate = true; +} + + +#include "kdevshellwidget.moc" + +// kate: space-indent off; indent-width 4; tab-width 4; show-tabs off; diff --git a/lib/util/kdevshellwidget.h b/lib/util/kdevshellwidget.h new file mode 100644 index 00000000..6bb6a8d7 --- /dev/null +++ b/lib/util/kdevshellwidget.h @@ -0,0 +1,101 @@ +/*************************************************************************** + * Copyright (C) 2006 by Jens Dagerbo * + * jens.dagerbo@swipnet.se * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + + +#ifndef KDEVSHELLWIDGET_H +#define KDEVSHELLWIDGET_H + +#include +#include +#include + +class TDEProcess; +namespace KParts +{ + class ReadOnlyPart; +} + +class KDevShellWidget : public TQVBox +{ + +Q_OBJECT + + +public: + KDevShellWidget(TQWidget *parent = 0, const char *name = 0); + virtual ~KDevShellWidget(); + + /** + * Stores the shell name and arguments, that will be used in @ref activate() + * @param shell The shell name, for example 'irb' or '/bin/bash' + * @param arguments Any optional arguments + */ + void setShell( const TQString & shell, const TQStrList & arguments = TQStrList() ); + + /** + * Executes the previously set shell. If @ref setShell wasn't called before + * konsolepart will decide what to use. + */ + void activate(); + + /** + * Should we auto launch the shell again if it was terminated? + * @param doAutoActivate + */ + void setAutoReactivateOnClose( bool doAutoActivate ); + + /** + * Send text to the running shell + * @param text The text to send to the shell + */ + void sendInput( const TQString & text ); + + /** + * Call to check if the shell is currently running + * @return true if the shell is currently running + */ + bool isRunning(); + +signals: + /** + * This signal will be emmitted when the started shell exits normally + * @param exitcode The return code of the process + */ + void shellExited( int exitcode ); + + /** + * This signal will be emitted when the started shell is terminated by a signal + * @param signalcode The signal the process was killed with + */ + void shellSignalled( int signalcode ); + + /** + * This signal will be emitted when the process receives data + * @param text received data + */ + void receivedData( const TQString & ); + +private slots: + void partDestroyed(); + void processExited( TDEProcess * ); + void setAutoReactivateOnCloseDelayed( ); + +private: + TQGuardedPtr m_konsolePart; + TQString m_shellName; + TQStrList m_shellArguments; + bool m_doAutoActivate; + bool m_isRunning; +}; + +#endif + +// kate: space-indent off; indent-width 4; tab-width 4; show-tabs off; diff --git a/lib/util/tdeveditorutil.cpp b/lib/util/tdeveditorutil.cpp deleted file mode 100644 index 455909f8..00000000 --- a/lib/util/tdeveditorutil.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2007 by Jens Dagerbo * - * jens.dagerbo@swipnet.se * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#include "tdeveditorutil.h" - -#include -#include -#include -#include -#include - -bool TDevEditorUtil::currentPositionReal( unsigned int * line, unsigned int * col, KTextEditor::Document * doc, KTextEditor::View * view ) -{ - if ( !line || !col ) return false; - - KTextEditor::EditInterface * editIface = dynamic_cast( doc ); - if ( !editIface ) return false; - - view = view ? view : dynamic_cast( doc->widget() ); - - KTextEditor::ViewCursorInterface * cursorIface = dynamic_cast( view ); - if ( !cursorIface ) return false; - - cursorIface->cursorPositionReal( line, col ); - return true; -} - -TQString TDevEditorUtil::currentLine( KTextEditor::Document * doc, KTextEditor::View * view ) -{ - KTextEditor::EditInterface * editIface = dynamic_cast( doc ); - if ( !editIface ) return TQString(); - - view = view ? view : dynamic_cast( doc->widget() ); - - KTextEditor::ViewCursorInterface * cursorIface = dynamic_cast( view ); - if ( !cursorIface ) return TQString(); - - uint line = 0; - uint col = 0; - cursorIface->cursorPositionReal(&line, &col); - - return editIface->textLine(line); -} - -TQString TDevEditorUtil::currentWord( KTextEditor::Document * doc, KTextEditor::View * view ) -{ - KTextEditor::EditInterface * editIface = dynamic_cast( doc ); - if ( !editIface ) return TQString(); - - view = view ? view : dynamic_cast( doc->widget() ); - - KTextEditor::ViewCursorInterface * cursorIface = dynamic_cast( view ); - if ( !cursorIface ) return TQString(); - - uint line = 0; - uint col = 0; - cursorIface->cursorPositionReal(&line, &col); - - TQString linestr = editIface->textLine(line); - - int startPos = TQMAX( TQMIN( (int)col, (int)linestr.length()-1 ), 0 ); - int endPos = startPos; - startPos--; - while (startPos >= 0 && ( linestr[startPos].isLetterOrNumber() || linestr[startPos] == '_' || linestr[startPos] == '~') ) - startPos--; - while (endPos < (int)linestr.length() && ( linestr[endPos].isLetterOrNumber() || linestr[endPos] == '_' ) ) - endPos++; - - return ( ( startPos == endPos ) ? TQString() : linestr.mid( startPos+1, endPos-startPos-1 ) ); -} - - -TQString TDevEditorUtil::currentSelection( KTextEditor::Document * doc ) -{ - KTextEditor::SelectionInterface * selectIface = dynamic_cast( doc ); - return selectIface ? selectIface->selection() : TQString(); -} - - -// kate: space-indent off; indent-width 4; tab-width 4; show-tabs on; - diff --git a/lib/util/tdeveditorutil.h b/lib/util/tdeveditorutil.h deleted file mode 100644 index d69e914b..00000000 --- a/lib/util/tdeveditorutil.h +++ /dev/null @@ -1,67 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2007 by Jens Dagerbo * - * jens.dagerbo@swipnet.se * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef TDEVEDITOR_H -#define TDEVEDITOR_H - -namespace KTextEditor -{ -class Document; -class View; -} - -#include - -/** -Class with some common utility operations not currently supported by KTE - - @author Jens Dagerbo -*/ -class TDevEditorUtil -{ - TDevEditorUtil() {} -public: - - /** - * - * @param line - * @param col - * @param doc - * @param view - * @return - */ - static bool currentPositionReal( unsigned int * line, unsigned int * col, KTextEditor::Document * doc, KTextEditor::View * view = 0 ); - - /** - * - * @param doc - * @param view - * @return - */ - static TQString currentLine( KTextEditor::Document * doc, KTextEditor::View * view = 0 ); - - /** - * Call to get the text under the cursor of the currently active view. - * @return the text under the cursor of the currently active view - */ - static TQString currentWord( KTextEditor::Document * doc, KTextEditor::View * view = 0 ); - - /** - * Call to get the selection in the currently active view - * @return the selection in the currently active view - */ - static TQString currentSelection( KTextEditor::Document * doc ); -}; - -#endif - - -// kate: space-indent off; indent-width 4; tab-width 4; show-tabs on; diff --git a/lib/util/tdevjobtimer.cpp b/lib/util/tdevjobtimer.cpp deleted file mode 100644 index 0e1465e0..00000000 --- a/lib/util/tdevjobtimer.cpp +++ /dev/null @@ -1,39 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2006 by Jens Dagerbo * - * jens.dagerbo@swipnet.se * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#include "tdevjobtimer.h" - -TDevJobTimer::TDevJobTimer( void * payload, TQObject *parent, const char *name) - : TQTimer(parent, name) -{ - m_payload = payload; - connect( this, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout()) ); -} - -TDevJobTimer::~TDevJobTimer() -{ -} - -void TDevJobTimer::singleShot(int msec, TQObject * receiver, const char * member, void * payload) -{ - TDevJobTimer * p = new TDevJobTimer( payload ); - p->start( msec, true ); - connect( p, TQT_SIGNAL(timeout(void*)), receiver, member ); -} - -void TDevJobTimer::slotTimeout() -{ - emit timeout( m_payload ); - m_payload = 0; - deleteLater(); -} - -#include "tdevjobtimer.moc" diff --git a/lib/util/tdevjobtimer.h b/lib/util/tdevjobtimer.h deleted file mode 100644 index 313e56e5..00000000 --- a/lib/util/tdevjobtimer.h +++ /dev/null @@ -1,40 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2006 by Jens Dagerbo * - * jens.dagerbo@swipnet.se * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#ifndef TDEVJOBTIMER_H -#define TDEVJOBTIMER_H - -#include - -class TDevJobTimer : public TQTimer -{ -Q_OBJECT - -public: - static void singleShot( int msec, TQObject * receiver, const char * member, void * payload ); - -signals: - void timeout(void*); - -private: - TDevJobTimer( void * payload, TQObject *parent = 0, const char *name = 0); - ~TDevJobTimer(); - -private slots: - void slotTimeout(); - -private: - void * m_payload; - -}; - - -#endif diff --git a/lib/util/tdevshellwidget.cpp b/lib/util/tdevshellwidget.cpp deleted file mode 100644 index b5b8d195..00000000 --- a/lib/util/tdevshellwidget.cpp +++ /dev/null @@ -1,125 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2006 by Jens Dagerbo * - * jens.dagerbo@swipnet.se * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#include -#include - -#include -#include -#include -#include -#include - -#include "tdevshellwidget.h" - -TDevShellWidget::TDevShellWidget(TQWidget *parent, const char *name) - : TQVBox(parent, name), m_doAutoActivate( false ), m_isRunning( false ) -{ -} - - -TDevShellWidget::~TDevShellWidget() -{ -} - -void TDevShellWidget::setShell( const TQString & shell, const TQStrList & arguments ) -{ - m_shellName = shell; - m_shellArguments = arguments; -} - -void TDevShellWidget::activate( ) -{ - KLibFactory *factory = KLibLoader::self()->factory("libkonsolepart"); - if ( !factory ) return; - - m_konsolePart = (KParts::ReadOnlyPart *) factory->create( TQT_TQOBJECT(this), "libkonsolepart", "KParts::ReadOnlyPart" ); - if ( !m_konsolePart ) return; - - connect( m_konsolePart, TQT_SIGNAL( processExited(TDEProcess *) ), this, TQT_SLOT( processExited(TDEProcess *) ) ); - connect( m_konsolePart, TQT_SIGNAL( receivedData( const TQString& ) ), this, TQT_SIGNAL( receivedData( const TQString& ) ) ); - connect( m_konsolePart, TQT_SIGNAL(destroyed()), this, TQT_SLOT(partDestroyed()) ); - - m_konsolePart->widget()->setFocusPolicy( TQ_WheelFocus ); - setFocusProxy( m_konsolePart->widget() ); - m_konsolePart->widget()->setFocus(); - - if ( m_konsolePart->widget()->inherits(TQFRAME_OBJECT_NAME_STRING) ) - ((TQFrame*)m_konsolePart->widget())->setFrameStyle( TQFrame::Panel | TQFrame::Sunken ); - - m_konsolePart->widget()->show(); - - TerminalInterface* ti = static_cast( m_konsolePart->tqt_cast( "TerminalInterface" ) ); - if( !ti ) return; - - if ( !m_shellName.isEmpty() ) - ti->startProgram( m_shellName, m_shellArguments ); - - m_isRunning = true; - -} - -void TDevShellWidget::partDestroyed( ) -{ - if ( m_doAutoActivate ) - { - activate(); - } -} - -void TDevShellWidget::processExited( TDEProcess * proc ) -{ - m_isRunning = false; - - if ( !proc ) return; - - kdDebug(9000) << proc->args() << endl; - - if ( proc->normalExit() ) - emit shellExited( proc->exitStatus() ); - else if ( proc->signalled() ) - emit shellSignalled( proc->exitSignal() ); -} - -void TDevShellWidget::sendInput( const TQString & text ) -{ - if ( !m_konsolePart ) return; - TerminalInterface* ti = static_cast( m_konsolePart->tqt_cast( "TerminalInterface" ) ); - if( !ti ) return; - - ti->sendInput( text ); -} - -bool TDevShellWidget::isRunning( ) -{ - return m_isRunning; -} - -void TDevShellWidget::setAutoReactivateOnClose( bool doAutoActivate ) -{ - // to auto reactivate can be dangerous, do it like this to avoid - // reactivating with a non-working setting (the partDestroyed() - // slot will have ran before m_doAutoActivate is set) - if ( doAutoActivate ) - TQTimer::singleShot( 3000, this, TQT_SLOT(setAutoReactivateOnCloseDelayed()) ); - else - m_doAutoActivate = false; -} - -void TDevShellWidget::setAutoReactivateOnCloseDelayed( ) -{ - m_doAutoActivate = true; -} - - -#include "tdevshellwidget.moc" - -// kate: space-indent off; indent-width 4; tab-width 4; show-tabs off; diff --git a/lib/util/tdevshellwidget.h b/lib/util/tdevshellwidget.h deleted file mode 100644 index f6476814..00000000 --- a/lib/util/tdevshellwidget.h +++ /dev/null @@ -1,101 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2006 by Jens Dagerbo * - * jens.dagerbo@swipnet.se * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - - -#ifndef TDEVSHELLWIDGET_H -#define TDEVSHELLWIDGET_H - -#include -#include -#include - -class TDEProcess; -namespace KParts -{ - class ReadOnlyPart; -} - -class TDevShellWidget : public TQVBox -{ - -Q_OBJECT - - -public: - TDevShellWidget(TQWidget *parent = 0, const char *name = 0); - virtual ~TDevShellWidget(); - - /** - * Stores the shell name and arguments, that will be used in @ref activate() - * @param shell The shell name, for example 'irb' or '/bin/bash' - * @param arguments Any optional arguments - */ - void setShell( const TQString & shell, const TQStrList & arguments = TQStrList() ); - - /** - * Executes the previously set shell. If @ref setShell wasn't called before - * konsolepart will decide what to use. - */ - void activate(); - - /** - * Should we auto launch the shell again if it was terminated? - * @param doAutoActivate - */ - void setAutoReactivateOnClose( bool doAutoActivate ); - - /** - * Send text to the running shell - * @param text The text to send to the shell - */ - void sendInput( const TQString & text ); - - /** - * Call to check if the shell is currently running - * @return true if the shell is currently running - */ - bool isRunning(); - -signals: - /** - * This signal will be emmitted when the started shell exits normally - * @param exitcode The return code of the process - */ - void shellExited( int exitcode ); - - /** - * This signal will be emitted when the started shell is terminated by a signal - * @param signalcode The signal the process was killed with - */ - void shellSignalled( int signalcode ); - - /** - * This signal will be emitted when the process receives data - * @param text received data - */ - void receivedData( const TQString & ); - -private slots: - void partDestroyed(); - void processExited( TDEProcess * ); - void setAutoReactivateOnCloseDelayed( ); - -private: - TQGuardedPtr m_konsolePart; - TQString m_shellName; - TQStrList m_shellArguments; - bool m_doAutoActivate; - bool m_isRunning; -}; - -#endif - -// kate: space-indent off; indent-width 4; tab-width 4; show-tabs off; diff --git a/lib/widgets/CMakeLists.txt b/lib/widgets/CMakeLists.txt index 86303b6d..30e0ba3e 100644 --- a/lib/widgets/CMakeLists.txt +++ b/lib/widgets/CMakeLists.txt @@ -28,22 +28,22 @@ link_directories( install( FILES tdelistviewaction.h qcomboview.h flagboxes.h ksavealldialog.h resizablecombo.h kcomboview.h - tdevhtmlpart.h processlinemaker.h processwidget.h + kdevhtmlpart.h processlinemaker.h processwidget.h fancylistviewitem.h DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/widgets ) ##### other data ################################ -install( FILES tdevhtml_partui.rc DESTINATION ${DATA_INSTALL_DIR}/tdevelop ) +install( FILES kdevhtml_partui.rc DESTINATION ${DATA_INSTALL_DIR}/tdevelop ) -##### tdevwidgets (shared) ###################### +##### kdevwidgets (shared) ###################### -tde_add_library( tdevwidgets SHARED AUTOMOC +tde_add_library( kdevwidgets SHARED AUTOMOC SOURCES flagboxes.cpp qcomboview.cpp tdelistviewaction.cpp - kcomboview.cpp resizablecombo.cpp tdevhtmlpart.cpp + kcomboview.cpp resizablecombo.cpp kdevhtmlpart.cpp processlinemaker.cpp processwidget.cpp ksavealldialog.cpp fancylistviewitem.cpp VERSION 0.0.0 diff --git a/lib/widgets/Makefile.am b/lib/widgets/Makefile.am index 7181151e..69be7a11 100644 --- a/lib/widgets/Makefile.am +++ b/lib/widgets/Makefile.am @@ -2,29 +2,29 @@ INCLUDES = -I$(top_srcdir)/lib/compat -I$(top_srcdir)/lib/interfaces $(all_inclu METASOURCES = AUTO -lib_LTLIBRARIES = libtdevwidgets.la +lib_LTLIBRARIES = libkdevwidgets.la -tdevwidgetsincludedir = $(includedir)/tdevelop/widgets +kdevwidgetsincludedir = $(includedir)/tdevelop/widgets -libtdevwidgets_la_SOURCES = flagboxes.cpp qcomboview.cpp tdelistviewaction.cpp \ - kcomboview.cpp resizablecombo.cpp tdevhtmlpart.cpp processlinemaker.cpp \ +libkdevwidgets_la_SOURCES = flagboxes.cpp qcomboview.cpp tdelistviewaction.cpp \ + kcomboview.cpp resizablecombo.cpp kdevhtmlpart.cpp processlinemaker.cpp \ processwidget.cpp ksavealldialog.cpp fancylistviewitem.cpp -tdevwidgetsinclude_HEADERS = tdelistviewaction.h qcomboview.h flagboxes.h \ - ksavealldialog.h resizablecombo.h kcomboview.h tdevhtmlpart.h processlinemaker.h \ +kdevwidgetsinclude_HEADERS = tdelistviewaction.h qcomboview.h flagboxes.h \ + ksavealldialog.h resizablecombo.h kcomboview.h kdevhtmlpart.h processlinemaker.h \ processwidget.h fancylistviewitem.h SUBDIRS = propeditor -libtdevwidgets_la_LIBADD = $(top_builddir)/lib/interfaces/libtdevinterfaces.la -libtdevwidgets_la_LDFLAGS = -no-undefined $(all_libraries) +libkdevwidgets_la_LIBADD = $(top_builddir)/lib/interfaces/libkdevinterfaces.la +libkdevwidgets_la_LDFLAGS = -no-undefined $(all_libraries) rcdir = $(kde_datadir)/tdevelop -rc_DATA = tdevhtml_partui.rc +rc_DATA = kdevhtml_partui.rc -DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils tdevutil tdevinterfaces -DOXYGEN_PROJECTNAME = TDevelop Widgets Library -DOXYGEN_DOCDIRPREFIX = tdev +DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils kdevutil kdevinterfaces +DOXYGEN_PROJECTNAME = KDevelop Widgets Library +DOXYGEN_DOCDIRPREFIX = kdev include ../../Doxyfile.am diff --git a/lib/widgets/kdevhtml_partui.rc b/lib/widgets/kdevhtml_partui.rc new file mode 100644 index 00000000..5a55b7bf --- /dev/null +++ b/lib/widgets/kdevhtml_partui.rc @@ -0,0 +1,18 @@ + + + + +

    &File + + + + + + + + + + + + + diff --git a/lib/widgets/kdevhtmlpart.cpp b/lib/widgets/kdevhtmlpart.cpp new file mode 100644 index 00000000..76697cfa --- /dev/null +++ b/lib/widgets/kdevhtmlpart.cpp @@ -0,0 +1,512 @@ +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + + +#include "kdevhtmlpart.h" + +KDevHTMLPart::KDevHTMLPart() + : TDEHTMLPart(0L, 0L, 0L, "KDevHTMLPart", DefaultGUI ) +{ + setXMLFile(locate("data", "tdevelop/kdevhtml_partui.rc"), true); + + connect(browserExtension(), TQT_SIGNAL(openURLRequestDelayed(const KURL &,const KParts::URLArgs &)), + this, TQT_SLOT(openURLRequest(const KURL &)) ); + + connect(this, TQT_SIGNAL(started(TDEIO::Job *)), this, TQT_SLOT(slotStarted(TDEIO::Job* ))); + connect(this, TQT_SIGNAL(completed()), this, TQT_SLOT(slotCompleted())); + connect(this, TQT_SIGNAL(canceled(const TQString &)), this, TQT_SLOT(slotCancelled(const TQString &))); + + TDEActionCollection * actions = actionCollection();// new TDEActionCollection( this ); + reloadAction = new TDEAction( i18n( "Reload" ), "reload", 0, + this, TQT_SLOT( slotReload() ), actions, "doc_reload" ); + reloadAction->setWhatsThis(i18n("Reload

    Reloads the current document.")); + stopAction = new TDEAction( i18n( "Stop" ), "stop", 0, + this, TQT_SLOT( slotStop() ), actions, "doc_stop" ); + stopAction->setWhatsThis(i18n("Stop

    Stops the loading of current document.")); + duplicateAction = new TDEAction( i18n( "Duplicate Tab" ), "window_new", 0, + this, TQT_SLOT( slotDuplicate() ), actions, "doc_dup" ); + duplicateAction->setWhatsThis(i18n("Duplicate window

    Opens current document in a new window.")); + printAction = KStdAction::print(this, TQT_SLOT(slotPrint()), actions, "print_doc"); + copyAction = KStdAction::copy(this, TQT_SLOT(slotCopy()), actions, "copy_doc_selection"); + + connect( this, TQT_SIGNAL(popupMenu(const TQString &, const TQPoint &)), this, TQT_SLOT(popup(const TQString &, const TQPoint &))); + connect(this, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged())); + +//BEGIN documentation history stuff + + m_backAction = new TDEToolBarPopupAction(i18n("Back"), "back", 0, + this, TQT_SLOT(slotBack()), + actions, "browser_back"); + m_backAction->setEnabled( false ); + m_backAction->setToolTip(i18n("Back")); + m_backAction->setWhatsThis(i18n("Back

    Moves backwards one step in the documentation browsing history.")); + + connect(m_backAction->popupMenu(), TQT_SIGNAL(aboutToShow()), + this, TQT_SLOT(slotBackAboutToShow())); + connect(m_backAction->popupMenu(), TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotPopupActivated(int))); + + m_forwardAction = new TDEToolBarPopupAction(i18n("Forward"), "forward", 0, + this, TQT_SLOT(slotForward()), + actions, "browser_forward"); + m_forwardAction->setEnabled( false ); + m_forwardAction->setToolTip(i18n("Forward")); + m_forwardAction->setWhatsThis(i18n("Forward

    Moves forward one step in the documentation browsing history.")); + + connect(m_forwardAction->popupMenu(), TQT_SIGNAL(aboutToShow()), + this, TQT_SLOT(slotForwardAboutToShow())); + connect(m_forwardAction->popupMenu(), TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotPopupActivated(int))); + + m_restoring = false; + m_Current = m_history.end(); +//END documentation history stuff + + //settings: + TDEConfig *appConfig = TDEGlobal::config(); + appConfig->setGroup("TDEHTMLPart"); + setStandardFont(appConfig->readEntry("StandardFont", + settings()->stdFontName())); + setFixedFont(appConfig->readEntry("FixedFont", + settings()->fixedFontName())); + setZoomFactor(appConfig->readEntry("Zoom", "100").toInt()); +} + +void KDevHTMLPart::popup( const TQString & url, const TQPoint & p ) +{ +// TDEPopupMenu popup( i18n( "Documentation Viewer" ), this->widget() ); + TDEPopupMenu popup(this->widget()); + + bool needSep = false; + int idNewWindow = -2; + if (!url.isEmpty() && (m_options & CanOpenInNewWindow)) + { + idNewWindow = popup.insertItem(SmallIcon("window_new"),i18n("Open in New Tab")); + popup.TQMenuData::setWhatsThis(idNewWindow, i18n("Open in new window

    Opens current link in a new window.")); + needSep = true; + } + if (m_options & CanDuplicate) + { + duplicateAction->plug(&popup); + needSep = true; + } + if (needSep) + popup.insertSeparator(); + + m_backAction->plug( &popup ); + m_forwardAction->plug( &popup ); + reloadAction->plug(&popup); +// stopAction->plug(&popup); + popup.insertSeparator(); + + copyAction->plug( &popup ); + popup.insertSeparator(); + + printAction->plug(&popup); + popup.insertSeparator(); + + TDEAction * incFontAction = this->action("incFontSizes"); + TDEAction * decFontAction = this->action("decFontSizes"); + if ( incFontAction && decFontAction ) + { + incFontAction->plug( &popup ); + decFontAction->plug( &popup ); + popup.insertSeparator(); + } + + TDEAction *ac = action("setEncoding"); + if (ac) + ac->plug(&popup); + + int r = popup.exec(p); + + if (r == idNewWindow) + { + KURL kurl; + if (!KURL(url).path().startsWith("/")) + { + kdDebug() << "processing relative url: " << url << endl; + if (url.startsWith("#")) + { + kurl = KURL(KDevHTMLPart::url()); + kurl.setRef(url.mid(1)); + } + else + kurl = KURL(KDevHTMLPart::url().upURL().url(true)+url); + } + else + kurl = KURL(url); + + if (kurl.isValid()) + slotOpenInNewWindow(kurl); + } +} + +void KDevHTMLPart::setContext(const TQString &context) +{ + m_context = context; +} + + +TQString KDevHTMLPart::context() const +{ + return m_context; +} + + +// Note: this function is a copy of code in tdecore/tdeconfigbase.cpp ;) +static bool isUtf8(const char *buf) { + int i, n; + register unsigned char c; + bool gotone = false; + +#define F 0 /* character never appears in text */ +#define T 1 /* character appears in plain ASCII text */ +#define I 2 /* character appears in ISO-8859 text */ +#define X 3 /* character appears in non-ISO extended ASCII (Mac, IBM PC) */ + + static const unsigned char text_chars[256] = { + /* BEL BS HT LF FF CR */ + F, F, F, F, F, F, F, T, T, T, T, F, T, T, F, F, /* 0x0X */ + /* ESC */ + F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, /* 0x1X */ + T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x2X */ + T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x3X */ + T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x4X */ + T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x5X */ + T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x6X */ + T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, F, /* 0x7X */ + /* NEL */ + X, X, X, X, X, T, X, X, X, X, X, X, X, X, X, X, /* 0x8X */ + X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, /* 0x9X */ + I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xaX */ + I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xbX */ + I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xcX */ + I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xdX */ + I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xeX */ + I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I /* 0xfX */ + }; + + /* *ulen = 0; */ + for (i = 0; (c = buf[i]); i++) { + if ((c & 0x80) == 0) { /* 0xxxxxxx is plain ASCII */ + /* + * Even if the whole file is valid UTF-8 sequences, + * still reject it if it uses weird control characters. + */ + + if (text_chars[c] != T) + return false; + + } else if ((c & 0x40) == 0) { /* 10xxxxxx never 1st byte */ + return false; + } else { /* 11xxxxxx begins UTF-8 */ + int following; + + if ((c & 0x20) == 0) { /* 110xxxxx */ + following = 1; + } else if ((c & 0x10) == 0) { /* 1110xxxx */ + following = 2; + } else if ((c & 0x08) == 0) { /* 11110xxx */ + following = 3; + } else if ((c & 0x04) == 0) { /* 111110xx */ + following = 4; + } else if ((c & 0x02) == 0) { /* 1111110x */ + following = 5; + } else + return false; + + for (n = 0; n < following; n++) { + i++; + if (!(c = buf[i])) + goto done; + + if ((c & 0x80) == 0 || (c & 0x40)) + return false; + } + gotone = true; + } + } +done: + return gotone; /* don't claim it's UTF-8 if it's all 7-bit */ +} +#undef F +#undef T +#undef I +#undef X + +TQString KDevHTMLPart::resolveEnvVarsInURL(const TQString& url) +{ + // check for environment variables and make necessary translations + TQString path = url; + int nDollarPos = path.find( '$' ); + + // Note: the while loop below is a copy of code in tdecore/tdeconfigbase.cpp ;) + while( nDollarPos != -1 && nDollarPos+1 < static_cast(path.length())) { + // there is at least one $ + if( (path)[nDollarPos+1] == '(' ) { + uint nEndPos = nDollarPos+1; + // the next character is no $ + while ( (nEndPos <= path.length()) && (path[nEndPos]!=')') ) + nEndPos++; + nEndPos++; + TQString cmd = path.mid( nDollarPos+2, nEndPos-nDollarPos-3 ); + + TQString result; + FILE *fs = popen(TQFile::encodeName(cmd).data(), "r"); + if (fs) + { + TQTextStream ts(fs, IO_ReadOnly); + result = ts.read().stripWhiteSpace(); + pclose(fs); + } + path.replace( nDollarPos, nEndPos-nDollarPos, result ); + } else if( (path)[nDollarPos+1] != '$' ) { + uint nEndPos = nDollarPos+1; + // the next character is no $ + TQString aVarName; + if (path[nEndPos]=='{') + { + while ( (nEndPos <= path.length()) && (path[nEndPos]!='}') ) + nEndPos++; + nEndPos++; + aVarName = path.mid( nDollarPos+2, nEndPos-nDollarPos-3 ); + } + else + { + while ( nEndPos <= path.length() && (path[nEndPos].isNumber() + || path[nEndPos].isLetter() || path[nEndPos]=='_' ) ) + nEndPos++; + aVarName = path.mid( nDollarPos+1, nEndPos-nDollarPos-1 ); + } + const char* pEnv = 0; + if (!aVarName.isEmpty()) + pEnv = getenv( aVarName.ascii() ); + if( pEnv ) { + // !!! Sergey A. Sukiyazov !!! + // A environment variables may contain values in 8bit + // locale cpecified encoding or in UTF8 encoding. + if (isUtf8( pEnv )) + path.replace( nDollarPos, nEndPos-nDollarPos, TQString::fromUtf8(pEnv) ); + else + path.replace( nDollarPos, nEndPos-nDollarPos, TQString::fromLocal8Bit(pEnv) ); + } else + path.remove( nDollarPos, nEndPos-nDollarPos ); + } else { + // remove one of the dollar signs + path.remove( nDollarPos, 1 ); + nDollarPos++; + } + nDollarPos = path.find( '$', nDollarPos ); + } + + return path; +} + +bool KDevHTMLPart::openURL(const KURL &url) +{ + TQString path = resolveEnvVarsInURL(url.url()); + KURL newUrl(path); + + bool retval = TDEHTMLPart::openURL(newUrl); + if ( retval ) + { + emit fileNameChanged(this); + if ( !m_restoring ) + { + addHistoryEntry(); + } + } + + m_backAction->setEnabled( m_Current != m_history.begin() ); + m_forwardAction->setEnabled( m_Current != m_history.fromLast() ); + + return retval; +} + +void KDevHTMLPart::openURLRequest(const KURL &url) +{ + openURL( url ); +} + +void KDevHTMLPart::slotReload( ) +{ + openURL( url() ); +} + +void KDevHTMLPart::slotStop( ) +{ + closeURL(); +} + +void KDevHTMLPart::slotStarted( TDEIO::Job * ) +{ + stopAction->setEnabled(true); +} + +void KDevHTMLPart::slotCompleted( ) +{ + stopAction->setEnabled(false); +} + +void KDevHTMLPart::slotCancelled( const TQString & /*errMsg*/ ) +{ + stopAction->setEnabled(false); +} + +/*void KDevHTMLPart::slotDuplicate( ) +{ + PartController::getInstance()->showDocument(url(), true); +}*/ + +void KDevHTMLPart::slotPrint( ) +{ + view()->print(); +} + +void KDevHTMLPart::slotBack() +{ + if ( m_Current != m_history.begin() ) + { + --m_Current; + m_restoring = true; + openURL( (*m_Current).url ); + m_restoring = false; + } +} + +void KDevHTMLPart::slotForward() +{ + if ( m_Current != m_history.fromLast() ) + { + ++m_Current; + m_restoring = true; + openURL( (*m_Current).url ); + m_restoring = false; + } +} + +void KDevHTMLPart::slotBackAboutToShow() +{ + TDEPopupMenu *popup = m_backAction->popupMenu(); + popup->clear(); + + if ( m_Current == m_history.begin() ) return; + + TQValueList::Iterator it = m_Current; + --it; + + int i = 0; + while( i < 10 ) + { + if ( it == m_history.begin() ) + { + popup->insertItem( (*it).url.url(), (*it).id ); + return; + } + + popup->insertItem( (*it).url.url(), (*it).id ); + ++i; + --it; + } +} + +void KDevHTMLPart::slotForwardAboutToShow() +{ + TDEPopupMenu *popup = m_forwardAction->popupMenu(); + popup->clear(); + + if ( m_Current == m_history.fromLast() ) return; + + TQValueList::Iterator it = m_Current; + ++it; + + int i = 0; + while( i < 10 ) + { + if ( it == m_history.fromLast() ) + { + popup->insertItem( (*it).url.url(), (*it).id ); + return; + } + + popup->insertItem( (*it).url.url(), (*it).id ); + ++i; + ++it; + } +} + +void KDevHTMLPart::slotPopupActivated( int id ) +{ + kdDebug(9000) << "id: " << id << endl; + + TQValueList::Iterator it = m_history.begin(); + while( it != m_history.end() ) + { + kdDebug(9000) << "(*it).id: " << (*it).id << endl; + if ( (*it).id == id ) + { + m_Current = it; + m_restoring = true; + openURL( (*m_Current).url ); + m_restoring = false; + return; + } + ++it; + } +} + +void KDevHTMLPart::addHistoryEntry() +{ + TQValueList::Iterator it = m_Current; + + // if We're not already the last entry, we truncate the list here before adding an entry + if ( it != m_history.end() && it != m_history.fromLast() ) + { + m_history.erase( ++it, m_history.end() ); + } + + DocumentationHistoryEntry newEntry( url() ); + + // Only save the new entry if it is different from the last + if ( newEntry.url != (*m_Current).url ) + { + m_history.append( newEntry ); + m_Current = m_history.fromLast(); + } +} + +void KDevHTMLPart::slotCopy( ) +{ + TQString text = selectedText(); + text.replace( TQChar( 0xa0 ), ' ' ); + TQClipboard *cb = TQApplication::clipboard(); + disconnect( cb, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotClearSelection() ) ); + cb->setText(text); + connect( cb, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotClearSelection() ) ); +} + +void KDevHTMLPart::slotSelectionChanged( ) +{ + if (selectedText().isEmpty()) + copyAction->setEnabled(false); + else + copyAction->setEnabled(true); +} + +#include "kdevhtmlpart.moc" diff --git a/lib/widgets/kdevhtmlpart.h b/lib/widgets/kdevhtmlpart.h new file mode 100644 index 00000000..6c8f7dc3 --- /dev/null +++ b/lib/widgets/kdevhtmlpart.h @@ -0,0 +1,111 @@ +#ifndef __KDEVHTMLPART_H__ +#define __KDEVHTMLPART_H__ + +#include + +#include + +#include + +/** +@file kdevhtmlpart.h +Customized TDEHTML part for KDevelop. +*/ + +class TDEAction; +class TDEToolBarPopupAction; + +struct DocumentationHistoryEntry { + KURL url; + int id; + + DocumentationHistoryEntry() {} + DocumentationHistoryEntry( const KURL& u ): url( u ) + { + id = abs( TQTime::currentTime().msecsTo( TQTime() ) ); // nasty, but should provide a reasonably unique number + } +}; + +/** +Customized TDEHTML part for KDevelop. +Used as HTML documentation and file viewer. + +Represents customized BrowserViewGUI mode of TDEHTMLPart. Provides also actions for: +- reload; +- stop; +- duplicate; +- print; +- copy text; +- back; +- forward. +. +It has it's own popup menu and font/zoom settings. +*/ +class KDevHTMLPart : public TDEHTMLPart +{ + Q_OBJECT + + +public: + + enum Options { CanDuplicate=1, CanOpenInNewWindow=2 }; + + KDevHTMLPart(); + + void setContext(const TQString &context); + TQString context() const; + virtual bool openURL(const KURL &url); + static TQString resolveEnvVarsInURL(const TQString& url); + + void setOptions(int options) { m_options = options; } + +signals: + void fileNameChanged(KParts::ReadOnlyPart *part); + +protected slots: + + void slotStarted(TDEIO::Job *); + void slotCompleted(); + void slotCancelled(const TQString &errMsg); + + void openURLRequest(const KURL &url); + void popup( const TQString & url, const TQPoint & p ); + + void slotReload(); + void slotStop(); + virtual void slotDuplicate() = 0; + virtual void slotOpenInNewWindow(const KURL &url) = 0; + void slotPrint(); + void slotCopy(); + void slotSelectionChanged(); + + void slotBack(); + void slotForward(); + void slotBackAboutToShow(); + void slotForwardAboutToShow(); + + void slotPopupActivated( int id ); + void addHistoryEntry(); + + +private: + + TQValueList< DocumentationHistoryEntry > m_history; + TQValueList< DocumentationHistoryEntry >::Iterator m_Current; + + TDEToolBarPopupAction* m_backAction; + TDEToolBarPopupAction* m_forwardAction; + + bool m_restoring; + + TQString m_context; + TDEAction *stopAction; + TDEAction *reloadAction; + TDEAction *duplicateAction; + TDEAction *printAction; + TDEAction *copyAction; + + int m_options; +}; + +#endif diff --git a/lib/widgets/kdevtabwidget.cpp b/lib/widgets/kdevtabwidget.cpp new file mode 100644 index 00000000..33c9f733 --- /dev/null +++ b/lib/widgets/kdevtabwidget.cpp @@ -0,0 +1,66 @@ +/*************************************************************************** + * Copyright (C) 2001-2003 * + * The KDevelop Team * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + ***************************************************************************/ + +#include + +#include +#include +#include +#include + +#include "kdevtabwidget.h" + +KDevTabWidget::KDevTabWidget(TQWidget *parent, const char *name) : TQTabWidget(parent,name) +{ + m_pTabBar = new KTabBar(this, "tabbar"); + setTabBar(m_pTabBar); + connect(m_pTabBar, TQT_SIGNAL(closeWindow(const TQWidget*)), this, TQT_SIGNAL(closeWindow(const TQWidget*))); + connect(m_pTabBar, TQT_SIGNAL(closeOthers(TQWidget*)), this, TQT_SIGNAL(closeOthers(TQWidget*))); +} + +KTabBar::KTabBar(TQWidget *parent, const char *name) : TQTabBar(parent,name) +{ + m_pPopupMenu = new TQPopupMenu(this); + + TQPixmap closePixmap = TDEGlobal::instance()->iconLoader()->loadIcon( "tab_remove", TDEIcon::Small, 0, TDEIcon::DefaultState, 0, true ); + if (closePixmap.isNull()) + closePixmap = SmallIcon("fileclose"); + + m_pPopupMenu->insertItem(closePixmap, i18n("&Close"), this, TQT_SLOT(closeWindowSlot())); + m_pPopupMenu->insertItem(i18n("Close &Others"), this, TQT_SLOT(closeOthersSlot())); +} + +void KTabBar::closeWindowSlot() +{ + emit closeWindow(m_pPage); +} + +void KTabBar::closeOthersSlot() +{ + emit closeOthers(m_pPage); +} + +void KTabBar::mousePressEvent(TQMouseEvent *e) +{ + if(e->button() == Qt::RightButton) { + + TQTab *tab = selectTab(e->pos() ); + if( tab == 0L ) return; + + m_pPage = ((KDevTabWidget*)parent())->page(indexOf(tab->identifier() ) ); + if(m_pPage == 0L) return; + + m_pPopupMenu->exec(mapToGlobal(e->pos())); + } + TQTabBar::mousePressEvent(e); +} + +#include "kdevtabwidget.moc" diff --git a/lib/widgets/propeditor/CMakeLists.txt b/lib/widgets/propeditor/CMakeLists.txt index 1cffb908..2620aaa0 100644 --- a/lib/widgets/propeditor/CMakeLists.txt +++ b/lib/widgets/propeditor/CMakeLists.txt @@ -38,9 +38,9 @@ install( FILES DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/propeditor ) -##### tdevpropertyeditor (shared) ############### +##### kdevpropertyeditor (shared) ############### -tde_add_library( tdevpropertyeditor SHARED AUTOMOC +tde_add_library( kdevpropertyeditor SHARED AUTOMOC SOURCES childproperty.cpp pcombobox.cpp pdummywidget.cpp ppointedit.cpp propertymachinefactory.cpp diff --git a/lib/widgets/propeditor/Makefile.am b/lib/widgets/propeditor/Makefile.am index a01eb4d3..e07d5c69 100644 --- a/lib/widgets/propeditor/Makefile.am +++ b/lib/widgets/propeditor/Makefile.am @@ -1,18 +1,18 @@ INCLUDES = -I$(top_srcdir)/lib/compat $(all_includes) METASOURCES = AUTO -lib_LTLIBRARIES = libtdevpropertyeditor.la -libtdevpropertyeditor_la_LIBADD = $(LIB_TDEIO) -libtdevpropertyeditor_la_LDFLAGS = -no-undefined $(all_libraries) -libtdevpropertyeditor_la_SOURCES = childproperty.cpp pcombobox.cpp pdummywidget.cpp ppointedit.cpp propertymachinefactory.cpp pstringlistedit.cpp\ +lib_LTLIBRARIES = libkdevpropertyeditor.la +libkdevpropertyeditor_la_LIBADD = $(LIB_TDEIO) +libkdevpropertyeditor_la_LDFLAGS = -no-undefined $(all_libraries) +libkdevpropertyeditor_la_SOURCES = childproperty.cpp pcombobox.cpp pdummywidget.cpp ppointedit.cpp propertymachinefactory.cpp pstringlistedit.cpp\ multiproperty.cpp pcursoredit.cpp pfontbutton.cpp prectedit.cpp propertywidget.cpp psymbolcombo.cpp\ pcheckbox.cpp pdateedit.cpp pfontcombo.cpp property.cpp psizeedit.cpp purledit.cpp\ pcolorbutton.cpp pdatetimeedit.cpp plineedit.cpp propertyeditor.cpp psizepolicyedit.cpp pyesnobutton.cpp\ pcolorcombo.cpp pdoublenuminput.cpp ppixmapedit.cpp propertylist.cpp pspinbox.cpp propertywidgetproxy.cpp plinestyleedit.cpp qeditlistbox.cpp -tdevpropeditorincludedir = $(includedir)/tdevelop/propeditor -tdevpropeditorinclude_HEADERS = childproperty.h pcombobox.h pdummywidget.h ppointedit.h propertymachinefactory.h pcursoredit.h pfontbutton.h prectedit.h propertywidget.h pdateedit.h pfontcombo.h property.h psizeedit.h pdatetimeedit.h plineedit.h propertyeditor.h psizepolicyedit.h pdoublenuminput.h ppixmapedit.h propertylist.h pspinbox.h propertywidgetproxy.h multiproperty.h pyesnobutton.h purledit.h psymbolcombo.h pstringlistedit.h pcolorcombo.h pcolorbutton.h pcheckbox.h plinestyleedit.h +kdevpropeditorincludedir = $(includedir)/tdevelop/propeditor +kdevpropeditorinclude_HEADERS = childproperty.h pcombobox.h pdummywidget.h ppointedit.h propertymachinefactory.h pcursoredit.h pfontbutton.h prectedit.h propertywidget.h pdateedit.h pfontcombo.h property.h psizeedit.h pdatetimeedit.h plineedit.h propertyeditor.h psizepolicyedit.h pdoublenuminput.h ppixmapedit.h propertylist.h pspinbox.h propertywidgetproxy.h multiproperty.h pyesnobutton.h purledit.h psymbolcombo.h pstringlistedit.h pcolorcombo.h pcolorbutton.h pcheckbox.h plinestyleedit.h DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils -DOXYGEN_PROJECTNAME = TDevelop Property Editing Library +DOXYGEN_PROJECTNAME = KDevelop Property Editing Library include ../../../Doxyfile.am diff --git a/lib/widgets/tdevhtml_partui.rc b/lib/widgets/tdevhtml_partui.rc deleted file mode 100644 index a62fa22f..00000000 --- a/lib/widgets/tdevhtml_partui.rc +++ /dev/null @@ -1,18 +0,0 @@ - - - - -

    &File - - - - - - - - - - - - - diff --git a/lib/widgets/tdevhtmlpart.cpp b/lib/widgets/tdevhtmlpart.cpp deleted file mode 100644 index 6ec74651..00000000 --- a/lib/widgets/tdevhtmlpart.cpp +++ /dev/null @@ -1,512 +0,0 @@ -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - - -#include "tdevhtmlpart.h" - -TDevHTMLPart::TDevHTMLPart() - : TDEHTMLPart(0L, 0L, 0L, "TDevHTMLPart", DefaultGUI ) -{ - setXMLFile(locate("data", "tdevelop/tdevhtml_partui.rc"), true); - - connect(browserExtension(), TQT_SIGNAL(openURLRequestDelayed(const KURL &,const KParts::URLArgs &)), - this, TQT_SLOT(openURLRequest(const KURL &)) ); - - connect(this, TQT_SIGNAL(started(TDEIO::Job *)), this, TQT_SLOT(slotStarted(TDEIO::Job* ))); - connect(this, TQT_SIGNAL(completed()), this, TQT_SLOT(slotCompleted())); - connect(this, TQT_SIGNAL(canceled(const TQString &)), this, TQT_SLOT(slotCancelled(const TQString &))); - - TDEActionCollection * actions = actionCollection();// new TDEActionCollection( this ); - reloadAction = new TDEAction( i18n( "Reload" ), "reload", 0, - this, TQT_SLOT( slotReload() ), actions, "doc_reload" ); - reloadAction->setWhatsThis(i18n("Reload

    Reloads the current document.")); - stopAction = new TDEAction( i18n( "Stop" ), "stop", 0, - this, TQT_SLOT( slotStop() ), actions, "doc_stop" ); - stopAction->setWhatsThis(i18n("Stop

    Stops the loading of current document.")); - duplicateAction = new TDEAction( i18n( "Duplicate Tab" ), "window_new", 0, - this, TQT_SLOT( slotDuplicate() ), actions, "doc_dup" ); - duplicateAction->setWhatsThis(i18n("Duplicate window

    Opens current document in a new window.")); - printAction = KStdAction::print(this, TQT_SLOT(slotPrint()), actions, "print_doc"); - copyAction = KStdAction::copy(this, TQT_SLOT(slotCopy()), actions, "copy_doc_selection"); - - connect( this, TQT_SIGNAL(popupMenu(const TQString &, const TQPoint &)), this, TQT_SLOT(popup(const TQString &, const TQPoint &))); - connect(this, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged())); - -//BEGIN documentation history stuff - - m_backAction = new TDEToolBarPopupAction(i18n("Back"), "back", 0, - this, TQT_SLOT(slotBack()), - actions, "browser_back"); - m_backAction->setEnabled( false ); - m_backAction->setToolTip(i18n("Back")); - m_backAction->setWhatsThis(i18n("Back

    Moves backwards one step in the documentation browsing history.")); - - connect(m_backAction->popupMenu(), TQT_SIGNAL(aboutToShow()), - this, TQT_SLOT(slotBackAboutToShow())); - connect(m_backAction->popupMenu(), TQT_SIGNAL(activated(int)), - this, TQT_SLOT(slotPopupActivated(int))); - - m_forwardAction = new TDEToolBarPopupAction(i18n("Forward"), "forward", 0, - this, TQT_SLOT(slotForward()), - actions, "browser_forward"); - m_forwardAction->setEnabled( false ); - m_forwardAction->setToolTip(i18n("Forward")); - m_forwardAction->setWhatsThis(i18n("Forward

    Moves forward one step in the documentation browsing history.")); - - connect(m_forwardAction->popupMenu(), TQT_SIGNAL(aboutToShow()), - this, TQT_SLOT(slotForwardAboutToShow())); - connect(m_forwardAction->popupMenu(), TQT_SIGNAL(activated(int)), - this, TQT_SLOT(slotPopupActivated(int))); - - m_restoring = false; - m_Current = m_history.end(); -//END documentation history stuff - - //settings: - TDEConfig *appConfig = TDEGlobal::config(); - appConfig->setGroup("TDEHTMLPart"); - setStandardFont(appConfig->readEntry("StandardFont", - settings()->stdFontName())); - setFixedFont(appConfig->readEntry("FixedFont", - settings()->fixedFontName())); - setZoomFactor(appConfig->readEntry("Zoom", "100").toInt()); -} - -void TDevHTMLPart::popup( const TQString & url, const TQPoint & p ) -{ -// TDEPopupMenu popup( i18n( "Documentation Viewer" ), this->widget() ); - TDEPopupMenu popup(this->widget()); - - bool needSep = false; - int idNewWindow = -2; - if (!url.isEmpty() && (m_options & CanOpenInNewWindow)) - { - idNewWindow = popup.insertItem(SmallIcon("window_new"),i18n("Open in New Tab")); - popup.TQMenuData::setWhatsThis(idNewWindow, i18n("Open in new window

    Opens current link in a new window.")); - needSep = true; - } - if (m_options & CanDuplicate) - { - duplicateAction->plug(&popup); - needSep = true; - } - if (needSep) - popup.insertSeparator(); - - m_backAction->plug( &popup ); - m_forwardAction->plug( &popup ); - reloadAction->plug(&popup); -// stopAction->plug(&popup); - popup.insertSeparator(); - - copyAction->plug( &popup ); - popup.insertSeparator(); - - printAction->plug(&popup); - popup.insertSeparator(); - - TDEAction * incFontAction = this->action("incFontSizes"); - TDEAction * decFontAction = this->action("decFontSizes"); - if ( incFontAction && decFontAction ) - { - incFontAction->plug( &popup ); - decFontAction->plug( &popup ); - popup.insertSeparator(); - } - - TDEAction *ac = action("setEncoding"); - if (ac) - ac->plug(&popup); - - int r = popup.exec(p); - - if (r == idNewWindow) - { - KURL kurl; - if (!KURL(url).path().startsWith("/")) - { - kdDebug() << "processing relative url: " << url << endl; - if (url.startsWith("#")) - { - kurl = KURL(TDevHTMLPart::url()); - kurl.setRef(url.mid(1)); - } - else - kurl = KURL(TDevHTMLPart::url().upURL().url(true)+url); - } - else - kurl = KURL(url); - - if (kurl.isValid()) - slotOpenInNewWindow(kurl); - } -} - -void TDevHTMLPart::setContext(const TQString &context) -{ - m_context = context; -} - - -TQString TDevHTMLPart::context() const -{ - return m_context; -} - - -// Note: this function is a copy of code in tdecore/tdeconfigbase.cpp ;) -static bool isUtf8(const char *buf) { - int i, n; - register unsigned char c; - bool gotone = false; - -#define F 0 /* character never appears in text */ -#define T 1 /* character appears in plain ASCII text */ -#define I 2 /* character appears in ISO-8859 text */ -#define X 3 /* character appears in non-ISO extended ASCII (Mac, IBM PC) */ - - static const unsigned char text_chars[256] = { - /* BEL BS HT LF FF CR */ - F, F, F, F, F, F, F, T, T, T, T, F, T, T, F, F, /* 0x0X */ - /* ESC */ - F, F, F, F, F, F, F, F, F, F, F, T, F, F, F, F, /* 0x1X */ - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x2X */ - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x3X */ - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x4X */ - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x5X */ - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, /* 0x6X */ - T, T, T, T, T, T, T, T, T, T, T, T, T, T, T, F, /* 0x7X */ - /* NEL */ - X, X, X, X, X, T, X, X, X, X, X, X, X, X, X, X, /* 0x8X */ - X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, /* 0x9X */ - I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xaX */ - I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xbX */ - I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xcX */ - I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xdX */ - I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, /* 0xeX */ - I, I, I, I, I, I, I, I, I, I, I, I, I, I, I, I /* 0xfX */ - }; - - /* *ulen = 0; */ - for (i = 0; (c = buf[i]); i++) { - if ((c & 0x80) == 0) { /* 0xxxxxxx is plain ASCII */ - /* - * Even if the whole file is valid UTF-8 sequences, - * still reject it if it uses weird control characters. - */ - - if (text_chars[c] != T) - return false; - - } else if ((c & 0x40) == 0) { /* 10xxxxxx never 1st byte */ - return false; - } else { /* 11xxxxxx begins UTF-8 */ - int following; - - if ((c & 0x20) == 0) { /* 110xxxxx */ - following = 1; - } else if ((c & 0x10) == 0) { /* 1110xxxx */ - following = 2; - } else if ((c & 0x08) == 0) { /* 11110xxx */ - following = 3; - } else if ((c & 0x04) == 0) { /* 111110xx */ - following = 4; - } else if ((c & 0x02) == 0) { /* 1111110x */ - following = 5; - } else - return false; - - for (n = 0; n < following; n++) { - i++; - if (!(c = buf[i])) - goto done; - - if ((c & 0x80) == 0 || (c & 0x40)) - return false; - } - gotone = true; - } - } -done: - return gotone; /* don't claim it's UTF-8 if it's all 7-bit */ -} -#undef F -#undef T -#undef I -#undef X - -TQString TDevHTMLPart::resolveEnvVarsInURL(const TQString& url) -{ - // check for environment variables and make necessary translations - TQString path = url; - int nDollarPos = path.find( '$' ); - - // Note: the while loop below is a copy of code in tdecore/tdeconfigbase.cpp ;) - while( nDollarPos != -1 && nDollarPos+1 < static_cast(path.length())) { - // there is at least one $ - if( (path)[nDollarPos+1] == '(' ) { - uint nEndPos = nDollarPos+1; - // the next character is no $ - while ( (nEndPos <= path.length()) && (path[nEndPos]!=')') ) - nEndPos++; - nEndPos++; - TQString cmd = path.mid( nDollarPos+2, nEndPos-nDollarPos-3 ); - - TQString result; - FILE *fs = popen(TQFile::encodeName(cmd).data(), "r"); - if (fs) - { - TQTextStream ts(fs, IO_ReadOnly); - result = ts.read().stripWhiteSpace(); - pclose(fs); - } - path.replace( nDollarPos, nEndPos-nDollarPos, result ); - } else if( (path)[nDollarPos+1] != '$' ) { - uint nEndPos = nDollarPos+1; - // the next character is no $ - TQString aVarName; - if (path[nEndPos]=='{') - { - while ( (nEndPos <= path.length()) && (path[nEndPos]!='}') ) - nEndPos++; - nEndPos++; - aVarName = path.mid( nDollarPos+2, nEndPos-nDollarPos-3 ); - } - else - { - while ( nEndPos <= path.length() && (path[nEndPos].isNumber() - || path[nEndPos].isLetter() || path[nEndPos]=='_' ) ) - nEndPos++; - aVarName = path.mid( nDollarPos+1, nEndPos-nDollarPos-1 ); - } - const char* pEnv = 0; - if (!aVarName.isEmpty()) - pEnv = getenv( aVarName.ascii() ); - if( pEnv ) { - // !!! Sergey A. Sukiyazov !!! - // A environment variables may contain values in 8bit - // locale cpecified encoding or in UTF8 encoding. - if (isUtf8( pEnv )) - path.replace( nDollarPos, nEndPos-nDollarPos, TQString::fromUtf8(pEnv) ); - else - path.replace( nDollarPos, nEndPos-nDollarPos, TQString::fromLocal8Bit(pEnv) ); - } else - path.remove( nDollarPos, nEndPos-nDollarPos ); - } else { - // remove one of the dollar signs - path.remove( nDollarPos, 1 ); - nDollarPos++; - } - nDollarPos = path.find( '$', nDollarPos ); - } - - return path; -} - -bool TDevHTMLPart::openURL(const KURL &url) -{ - TQString path = resolveEnvVarsInURL(url.url()); - KURL newUrl(path); - - bool retval = TDEHTMLPart::openURL(newUrl); - if ( retval ) - { - emit fileNameChanged(this); - if ( !m_restoring ) - { - addHistoryEntry(); - } - } - - m_backAction->setEnabled( m_Current != m_history.begin() ); - m_forwardAction->setEnabled( m_Current != m_history.fromLast() ); - - return retval; -} - -void TDevHTMLPart::openURLRequest(const KURL &url) -{ - openURL( url ); -} - -void TDevHTMLPart::slotReload( ) -{ - openURL( url() ); -} - -void TDevHTMLPart::slotStop( ) -{ - closeURL(); -} - -void TDevHTMLPart::slotStarted( TDEIO::Job * ) -{ - stopAction->setEnabled(true); -} - -void TDevHTMLPart::slotCompleted( ) -{ - stopAction->setEnabled(false); -} - -void TDevHTMLPart::slotCancelled( const TQString & /*errMsg*/ ) -{ - stopAction->setEnabled(false); -} - -/*void TDevHTMLPart::slotDuplicate( ) -{ - PartController::getInstance()->showDocument(url(), true); -}*/ - -void TDevHTMLPart::slotPrint( ) -{ - view()->print(); -} - -void TDevHTMLPart::slotBack() -{ - if ( m_Current != m_history.begin() ) - { - --m_Current; - m_restoring = true; - openURL( (*m_Current).url ); - m_restoring = false; - } -} - -void TDevHTMLPart::slotForward() -{ - if ( m_Current != m_history.fromLast() ) - { - ++m_Current; - m_restoring = true; - openURL( (*m_Current).url ); - m_restoring = false; - } -} - -void TDevHTMLPart::slotBackAboutToShow() -{ - TDEPopupMenu *popup = m_backAction->popupMenu(); - popup->clear(); - - if ( m_Current == m_history.begin() ) return; - - TQValueList::Iterator it = m_Current; - --it; - - int i = 0; - while( i < 10 ) - { - if ( it == m_history.begin() ) - { - popup->insertItem( (*it).url.url(), (*it).id ); - return; - } - - popup->insertItem( (*it).url.url(), (*it).id ); - ++i; - --it; - } -} - -void TDevHTMLPart::slotForwardAboutToShow() -{ - TDEPopupMenu *popup = m_forwardAction->popupMenu(); - popup->clear(); - - if ( m_Current == m_history.fromLast() ) return; - - TQValueList::Iterator it = m_Current; - ++it; - - int i = 0; - while( i < 10 ) - { - if ( it == m_history.fromLast() ) - { - popup->insertItem( (*it).url.url(), (*it).id ); - return; - } - - popup->insertItem( (*it).url.url(), (*it).id ); - ++i; - ++it; - } -} - -void TDevHTMLPart::slotPopupActivated( int id ) -{ - kdDebug(9000) << "id: " << id << endl; - - TQValueList::Iterator it = m_history.begin(); - while( it != m_history.end() ) - { - kdDebug(9000) << "(*it).id: " << (*it).id << endl; - if ( (*it).id == id ) - { - m_Current = it; - m_restoring = true; - openURL( (*m_Current).url ); - m_restoring = false; - return; - } - ++it; - } -} - -void TDevHTMLPart::addHistoryEntry() -{ - TQValueList::Iterator it = m_Current; - - // if We're not already the last entry, we truncate the list here before adding an entry - if ( it != m_history.end() && it != m_history.fromLast() ) - { - m_history.erase( ++it, m_history.end() ); - } - - DocumentationHistoryEntry newEntry( url() ); - - // Only save the new entry if it is different from the last - if ( newEntry.url != (*m_Current).url ) - { - m_history.append( newEntry ); - m_Current = m_history.fromLast(); - } -} - -void TDevHTMLPart::slotCopy( ) -{ - TQString text = selectedText(); - text.replace( TQChar( 0xa0 ), ' ' ); - TQClipboard *cb = TQApplication::clipboard(); - disconnect( cb, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotClearSelection() ) ); - cb->setText(text); - connect( cb, TQT_SIGNAL( selectionChanged() ), this, TQT_SLOT( slotClearSelection() ) ); -} - -void TDevHTMLPart::slotSelectionChanged( ) -{ - if (selectedText().isEmpty()) - copyAction->setEnabled(false); - else - copyAction->setEnabled(true); -} - -#include "tdevhtmlpart.moc" diff --git a/lib/widgets/tdevhtmlpart.h b/lib/widgets/tdevhtmlpart.h deleted file mode 100644 index e822488b..00000000 --- a/lib/widgets/tdevhtmlpart.h +++ /dev/null @@ -1,111 +0,0 @@ -#ifndef __TDEVHTMLPART_H__ -#define __TDEVHTMLPART_H__ - -#include - -#include - -#include - -/** -@file tdevhtmlpart.h -Customized TDEHTML part for KDevelop. -*/ - -class TDEAction; -class TDEToolBarPopupAction; - -struct DocumentationHistoryEntry { - KURL url; - int id; - - DocumentationHistoryEntry() {} - DocumentationHistoryEntry( const KURL& u ): url( u ) - { - id = abs( TQTime::currentTime().msecsTo( TQTime() ) ); // nasty, but should provide a reasonably unique number - } -}; - -/** -Customized TDEHTML part for KDevelop. -Used as HTML documentation and file viewer. - -Represents customized BrowserViewGUI mode of TDEHTMLPart. Provides also actions for: -- reload; -- stop; -- duplicate; -- print; -- copy text; -- back; -- forward. -. -It has it's own popup menu and font/zoom settings. -*/ -class TDevHTMLPart : public TDEHTMLPart -{ - Q_OBJECT - - -public: - - enum Options { CanDuplicate=1, CanOpenInNewWindow=2 }; - - TDevHTMLPart(); - - void setContext(const TQString &context); - TQString context() const; - virtual bool openURL(const KURL &url); - static TQString resolveEnvVarsInURL(const TQString& url); - - void setOptions(int options) { m_options = options; } - -signals: - void fileNameChanged(KParts::ReadOnlyPart *part); - -protected slots: - - void slotStarted(TDEIO::Job *); - void slotCompleted(); - void slotCancelled(const TQString &errMsg); - - void openURLRequest(const KURL &url); - void popup( const TQString & url, const TQPoint & p ); - - void slotReload(); - void slotStop(); - virtual void slotDuplicate() = 0; - virtual void slotOpenInNewWindow(const KURL &url) = 0; - void slotPrint(); - void slotCopy(); - void slotSelectionChanged(); - - void slotBack(); - void slotForward(); - void slotBackAboutToShow(); - void slotForwardAboutToShow(); - - void slotPopupActivated( int id ); - void addHistoryEntry(); - - -private: - - TQValueList< DocumentationHistoryEntry > m_history; - TQValueList< DocumentationHistoryEntry >::Iterator m_Current; - - TDEToolBarPopupAction* m_backAction; - TDEToolBarPopupAction* m_forwardAction; - - bool m_restoring; - - TQString m_context; - TDEAction *stopAction; - TDEAction *reloadAction; - TDEAction *duplicateAction; - TDEAction *printAction; - TDEAction *copyAction; - - int m_options; -}; - -#endif diff --git a/lib/widgets/tdevtabwidget.cpp b/lib/widgets/tdevtabwidget.cpp deleted file mode 100644 index adfd4566..00000000 --- a/lib/widgets/tdevtabwidget.cpp +++ /dev/null @@ -1,66 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2001-2003 * - * The KDevelop Team * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - ***************************************************************************/ - -#include - -#include -#include -#include -#include - -#include "tdevtabwidget.h" - -TDevTabWidget::TDevTabWidget(TQWidget *parent, const char *name) : TQTabWidget(parent,name) -{ - m_pTabBar = new KTabBar(this, "tabbar"); - setTabBar(m_pTabBar); - connect(m_pTabBar, TQT_SIGNAL(closeWindow(const TQWidget*)), this, TQT_SIGNAL(closeWindow(const TQWidget*))); - connect(m_pTabBar, TQT_SIGNAL(closeOthers(TQWidget*)), this, TQT_SIGNAL(closeOthers(TQWidget*))); -} - -KTabBar::KTabBar(TQWidget *parent, const char *name) : TQTabBar(parent,name) -{ - m_pPopupMenu = new TQPopupMenu(this); - - TQPixmap closePixmap = TDEGlobal::instance()->iconLoader()->loadIcon( "tab_remove", TDEIcon::Small, 0, TDEIcon::DefaultState, 0, true ); - if (closePixmap.isNull()) - closePixmap = SmallIcon("fileclose"); - - m_pPopupMenu->insertItem(closePixmap, i18n("&Close"), this, TQT_SLOT(closeWindowSlot())); - m_pPopupMenu->insertItem(i18n("Close &Others"), this, TQT_SLOT(closeOthersSlot())); -} - -void KTabBar::closeWindowSlot() -{ - emit closeWindow(m_pPage); -} - -void KTabBar::closeOthersSlot() -{ - emit closeOthers(m_pPage); -} - -void KTabBar::mousePressEvent(TQMouseEvent *e) -{ - if(e->button() == Qt::RightButton) { - - TQTab *tab = selectTab(e->pos() ); - if( tab == 0L ) return; - - m_pPage = ((TDevTabWidget*)parent())->page(indexOf(tab->identifier() ) ); - if(m_pPage == 0L) return; - - m_pPopupMenu->exec(mapToGlobal(e->pos())); - } - TQTabBar::mousePressEvent(e); -} - -#include "tdevtabwidget.moc" diff --git a/parts/abbrev/CMakeLists.txt b/parts/abbrev/CMakeLists.txt index 6a61f9d8..219ad73d 100644 --- a/parts/abbrev/CMakeLists.txt +++ b/parts/abbrev/CMakeLists.txt @@ -26,14 +26,14 @@ link_directories( ##### other data ################################ -install( FILES tdevabbrev.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES qt_classes cpp_keywords DESTINATION ${DATA_INSTALL_DIR}/tdevabbrev/sources ) -install( FILES tdevabbrev.rc DESTINATION ${DATA_INSTALL_DIR}/tdevabbrev ) +install( FILES kdevabbrev.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES qt_classes cpp_keywords DESTINATION ${DATA_INSTALL_DIR}/kdevabbrev/sources ) +install( FILES kdevabbrev.rc DESTINATION ${DATA_INSTALL_DIR}/kdevabbrev ) -##### libtdevabbrev (module) #################### +##### libkdevabbrev (module) #################### -tde_add_kpart( libtdevabbrev AUTOMOC +tde_add_kpart( libkdevabbrev AUTOMOC SOURCES abbrevpart.cpp abbrevconfigwidget.cpp abbrevconfigwidgetbase.ui addtemplatedlg.cpp diff --git a/parts/abbrev/Makefile.am b/parts/abbrev/Makefile.am index 1c4f559c..f5c3ec2e 100644 --- a/parts/abbrev/Makefile.am +++ b/parts/abbrev/Makefile.am @@ -2,19 +2,19 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevabbrev.la -libtdevabbrev_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevabbrev_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevabbrev.la +libkdevabbrev_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevabbrev_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevabbrev_la_SOURCES = abbrevpart.cpp abbrevconfigwidget.cpp abbrevconfigwidgetbase.ui addtemplatedlg.cpp addtemplatedlgbase.ui +libkdevabbrev_la_SOURCES = abbrevpart.cpp abbrevconfigwidget.cpp abbrevconfigwidgetbase.ui addtemplatedlg.cpp addtemplatedlgbase.ui METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevabbrev.desktop +service_DATA = kdevabbrev.desktop -sourcesdir = $(kde_datadir)/tdevabbrev/sources +sourcesdir = $(kde_datadir)/kdevabbrev/sources sources_DATA = qt_classes cpp_keywords -rcdir = $(kde_datadir)/tdevabbrev -rc_DATA = tdevabbrev.rc +rcdir = $(kde_datadir)/kdevabbrev +rc_DATA = kdevabbrev.rc diff --git a/parts/abbrev/abbrevpart.cpp b/parts/abbrev/abbrevpart.cpp index 87e44e23..80d26599 100644 --- a/parts/abbrev/abbrevpart.cpp +++ b/parts/abbrev/abbrevpart.cpp @@ -24,35 +24,35 @@ #include #include #include -#include +#include #include #include #include #include -#include +#include #include #include #include #include -#include "tdevcore.h" -#include "tdevpartcontroller.h" +#include "kdevcore.h" +#include "kdevpartcontroller.h" #include "abbrevconfigwidget.h" -#include "tdeveditorutil.h" +#include "kdeveditorutil.h" -static const TDevPluginInfo data("tdevabbrev"); +static const KDevPluginInfo data("kdevabbrev"); -class AbbrevFactory : public TDevGenericFactory +class AbbrevFactory : public KDevGenericFactory { public: AbbrevFactory() - : TDevGenericFactory( data ) + : KDevGenericFactory( data ) { } virtual TDEInstance *createInstance() { - TDEInstance *instance = TDevGenericFactory::createInstance(); + TDEInstance *instance = KDevGenericFactory::createInstance(); TDEStandardDirs *dirs = instance->dirs(); dirs->addResourceType( "codetemplates", TDEStandardDirs::kde_default( "data" ) + "kdevabbrev/templates/" ); @@ -63,13 +63,13 @@ public: } }; -K_EXPORT_COMPONENT_FACTORY( libtdevabbrev, AbbrevFactory ) +K_EXPORT_COMPONENT_FACTORY( libkdevabbrev, AbbrevFactory ) AbbrevPart::AbbrevPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin(&data, parent, name ? name : "AbbrevPart") + : KDevPlugin(&data, parent, name ? name : "AbbrevPart") { setInstance(AbbrevFactory::instance()); - setXMLFile("tdevabbrev.rc"); + setXMLFile("kdevabbrev.rc"); connect(partController(), TQT_SIGNAL(activePartChanged(KParts::Part*)), this, TQT_SLOT(slotActivePartChanged(KParts::Part*)) ); @@ -235,7 +235,7 @@ void AbbrevPart::save() TQString AbbrevPart::currentWord() const { - return TDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); + return KDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); } diff --git a/parts/abbrev/abbrevpart.h b/parts/abbrev/abbrevpart.h index cbb60e50..2b602088 100644 --- a/parts/abbrev/abbrevpart.h +++ b/parts/abbrev/abbrevpart.h @@ -18,7 +18,7 @@ #include #include -#include "tdevplugin.h" +#include "kdevplugin.h" #include @@ -60,7 +60,7 @@ private: TQStringList m_suffixes; }; -class AbbrevPart : public TDevPlugin +class AbbrevPart : public KDevPlugin { Q_OBJECT diff --git a/parts/abbrev/kdevabbrev.desktop b/parts/abbrev/kdevabbrev.desktop new file mode 100644 index 00000000..5c230dd4 --- /dev/null +++ b/parts/abbrev/kdevabbrev.desktop @@ -0,0 +1,83 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Provides support for customizable abbreviations - short words which expand into commonly needed code structures. +Comment[ca]=Proporciona suport per a abreviatures personalitzables - paraules curtes que en expandir-se formen estructures de codi usades habitualment. +Comment[da]=Sørger for støtte til brugerindrettede forkortelser - korte ord som udvides til almindeligt nyttige kodestrukturer. +Comment[de]=Unterstützung für benutzerdefinierte Abkürzungen - Kurzbegriffe, die zu häufig verwendeten Quelltextstrukturen erweitert werden. +Comment[el]=Προσφέρει υποστήριξη για προσαρμοσμένες συντομογραφίες - σύντομες λέξεις οι οποίες αναπτύσσονται σε συχνά χρησιμοποιούμενες δομές κώδικα. +Comment[en_GB]=Provides support for customisable abbreviations - short words which expand into commonly needed code structures. +Comment[es]=Proporciona soporte para las abreviaturas personalizables - palabras cortas que se expanden en estructuras utilizadas habitualmente. +Comment[et]=Pakub kohandatavate lühendite toetust. Viimased on lühendid, mis laienevad sagedamini vajaminevateks koodistruktuurideks. +Comment[eu]=Laburdura pertsonalizatuen euskarria eskeintzen du-normalean behar diren kode-egitura bezala zabalduko diren hitz motzak. +Comment[fa]=پشتیبانی برای مختصرسازیهای سفارشی فراهم می‌کند - واژه‌های کوتاه که اغلب به ساختارهای کد مورد نیاز بسط می‌یابد. +Comment[fr]=Fournit une prise en charge pour les abréviations personnalisables - mots abrégés qui s'étendent en structures de code communément nécessaires. +Comment[gl]=Proporciona soporte para abreviaturas persoalizadas - palabras curtas que se expanden en estructuras de código usadas frecuentemente. +Comment[hi]=मनपसंद किए जा सकने योग्य संक्षिप्त शब्दों जो कि सामान्यतया आवश्यक कोड स्ट्रक्चर में एक्सपांड हो सकें, के लिए समर्थन प्रदान करता है. +Comment[hu]=Lehetővé teszi különféle rövidítések használatát (rövid kifejezések kódstruktúrává kibontását) +Comment[it]=Offre il supporto per le abbreviazioni personalizzate - brevi parole che vengono espanse in strutture di codice richieste comunemente. +Comment[ja]=短い単語を一般に必要とされるコードに展開する、カスタマイズ可能な略語のサポートを提供します。 +Comment[ms]=Menyediakan sokongan untuk kependekan boleh ditetapkan - perkataan pendek yang berkembang kepada struktur kod yang biasa diperlukan. +Comment[nds]=Ünnerstütten för egen Afkörten - Kortwöör, de na faken bruukt Kodestrukturen utfooldt warrt. +Comment[ne]=साझा आवश्यक सङ्केत बनावटमा विस्तार गरिने छोटो शब्द - अनुकूलन संक्षिप्त रूपका लागि समर्थन प्रदान गर्दछ । +Comment[nl]=Biedt ondersteuning voor afkortingen - korte stukjes tekst die expanderen tot veelgebruikte codestructuren. +Comment[pl]=Umożliwia obsługę konfigurowalnych skrótów - krótkich słow rozszerzających się w często używane struktury kodu. +Comment[pt]=Oferece o suporte para abreviaturas personalizadas - palavras curtas que podem expandir para estruturas de código normalmente necessárias. +Comment[pt_BR]=Fornece suporte para abreviaturas personalizadas - palavras curtas que se expandem em estruturas de código normalmente necessárias. +Comment[ru]=Предоставляет поддержку для настраиваемых сокращений - коротких слов, которые заменяются на часто используемые структуры кода. +Comment[sk]=Poskytuje podporu pre prispôsobiteľné skratky - krátke slová, ktoré sa rozvinú do bežne potrebných kódových štruktúr. +Comment[sr]=Обезбеђује подршку за прилагодљиве скраћенице — кратке речи које се проширују у уобичајено потребне структуре кôда. +Comment[sr@Latn]=Obezbeđuje podršku za prilagodljive skraćenice — kratke reči koje se proširuju u uobičajeno potrebne strukture kôda. +Comment[sv]=Ger stöd för anpassningsbara förkortningar: korta ord som expanderas till vanligt använda kodstrukturer. +Comment[ta]=தேவைக்கேற்ப சுருக்கத்திற்கு இது ஆதரவு தரும்-குறியிடு வடிவத்திற்கு இந்த சுருக்கங்கள் மிகவும் உதவும். +Comment[tg]=Барои кӯтоҳ намоӣ ёрдами худро саҳм мегузорад, яъне калимаҳои кӯтоҳе, ки як хел вақт ба структураҳои коди истифода намоии истифода бурда мешавад. +Comment[tr]=Özelleştirilebilir kısaltmalar için destek sağlar - sık ihtiyaç duyualan kod yapıları yerine geçen kısa kelimeler. +Comment[zh_CN]=为自定义缩写提供支持 - 按需要扩展为所需代码结构的简短文字。 +Comment[zh_TW]=提供可調整的縮寫支援 - 將短的字擴展到常用的程式源碼結構。 +Name=KDevAbbrev +Name[da]=TDevelop Forkortelser +Name[de]=Abkürzungsmodul (TDevelop) +Name[hi]=के-डेव-एब्रिवि +Name[nds]=TDevelop-Afkörtenmoduul +Name[pl]=KDevSkróty +Name[sk]=KDev skratky +Name[sv]=TDevelop förkortningar +Name[zh_TW]=TDevelop 縮寫 +GenericName=Abbreviation Expansion +GenericName[ca]=Expansió d'abreviatures +GenericName[da]=Forkortelsesudvidelse +GenericName[de]=Abkürzungsvervollständigung +GenericName[el]=Ανάπτυξη συντομογραφιών +GenericName[es]=Expansión de abreviaturas +GenericName[et]=Lühendite laienemine +GenericName[eu]=Laburduren zabalkuntza +GenericName[fa]=بسط مختصرسازی +GenericName[fr]=Expansion des abréviations +GenericName[gl]=Expansión de abreviaturas +GenericName[hi]=संक्षिप्त शब्द एक्सपांशन +GenericName[hu]=Rövidítéskezelő +GenericName[it]=Espansione delle abbreviazioni +GenericName[ja]=略語拡張 +GenericName[ms]=Pengembang Kependekan +GenericName[nds]=Afkörtenutfoolden +GenericName[ne]=संक्षिप्त रूप विस्तार +GenericName[nl]=Afkortingen expanderen +GenericName[pl]=Rozwijanie skrótów +GenericName[pt]=Expansão de Abreviaturas +GenericName[pt_BR]=Expansão de Abreviaturas +GenericName[ru]=Расширение сокращений +GenericName[sk]=Rozvinutie skratiek +GenericName[sr]=Проширење скраћеница +GenericName[sr@Latn]=Proširenje skraćenica +GenericName[sv]=Expansion av förkortningar +GenericName[ta]=சுருக்கத்தின் விரிவாக்கம் +GenericName[tg]=Васеъкунии кӯтоҳ карда шуда +GenericName[tr]=Kısaltma Genişlemesi +GenericName[zh_CN]=缩写扩展 +GenericName[zh_TW]=縮寫擴展 +ServiceTypes=TDevelop/Plugin +Icon=fontsizeup +X-TDE-Library=libkdevabbrev +X-TDevelop-Version=5 +X-TDevelop-Scope=Global +X-TDevelop-Properties=CodeEditing diff --git a/parts/abbrev/tdevabbrev.rc b/parts/abbrev/kdevabbrev.rc similarity index 100% rename from parts/abbrev/tdevabbrev.rc rename to parts/abbrev/kdevabbrev.rc diff --git a/parts/abbrev/tdevabbrev.desktop b/parts/abbrev/tdevabbrev.desktop deleted file mode 100644 index f06bf2eb..00000000 --- a/parts/abbrev/tdevabbrev.desktop +++ /dev/null @@ -1,83 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Provides support for customizable abbreviations - short words which expand into commonly needed code structures. -Comment[ca]=Proporciona suport per a abreviatures personalitzables - paraules curtes que en expandir-se formen estructures de codi usades habitualment. -Comment[da]=Sørger for støtte til brugerindrettede forkortelser - korte ord som udvides til almindeligt nyttige kodestrukturer. -Comment[de]=Unterstützung für benutzerdefinierte Abkürzungen - Kurzbegriffe, die zu häufig verwendeten Quelltextstrukturen erweitert werden. -Comment[el]=Προσφέρει υποστήριξη για προσαρμοσμένες συντομογραφίες - σύντομες λέξεις οι οποίες αναπτύσσονται σε συχνά χρησιμοποιούμενες δομές κώδικα. -Comment[en_GB]=Provides support for customisable abbreviations - short words which expand into commonly needed code structures. -Comment[es]=Proporciona soporte para las abreviaturas personalizables - palabras cortas que se expanden en estructuras utilizadas habitualmente. -Comment[et]=Pakub kohandatavate lühendite toetust. Viimased on lühendid, mis laienevad sagedamini vajaminevateks koodistruktuurideks. -Comment[eu]=Laburdura pertsonalizatuen euskarria eskeintzen du-normalean behar diren kode-egitura bezala zabalduko diren hitz motzak. -Comment[fa]=پشتیبانی برای مختصرسازیهای سفارشی فراهم می‌کند - واژه‌های کوتاه که اغلب به ساختارهای کد مورد نیاز بسط می‌یابد. -Comment[fr]=Fournit une prise en charge pour les abréviations personnalisables - mots abrégés qui s'étendent en structures de code communément nécessaires. -Comment[gl]=Proporciona soporte para abreviaturas persoalizadas - palabras curtas que se expanden en estructuras de código usadas frecuentemente. -Comment[hi]=मनपसंद किए जा सकने योग्य संक्षिप्त शब्दों जो कि सामान्यतया आवश्यक कोड स्ट्रक्चर में एक्सपांड हो सकें, के लिए समर्थन प्रदान करता है. -Comment[hu]=Lehetővé teszi különféle rövidítések használatát (rövid kifejezések kódstruktúrává kibontását) -Comment[it]=Offre il supporto per le abbreviazioni personalizzate - brevi parole che vengono espanse in strutture di codice richieste comunemente. -Comment[ja]=短い単語を一般に必要とされるコードに展開する、カスタマイズ可能な略語のサポートを提供します。 -Comment[ms]=Menyediakan sokongan untuk kependekan boleh ditetapkan - perkataan pendek yang berkembang kepada struktur kod yang biasa diperlukan. -Comment[nds]=Ünnerstütten för egen Afkörten - Kortwöör, de na faken bruukt Kodestrukturen utfooldt warrt. -Comment[ne]=साझा आवश्यक सङ्केत बनावटमा विस्तार गरिने छोटो शब्द - अनुकूलन संक्षिप्त रूपका लागि समर्थन प्रदान गर्दछ । -Comment[nl]=Biedt ondersteuning voor afkortingen - korte stukjes tekst die expanderen tot veelgebruikte codestructuren. -Comment[pl]=Umożliwia obsługę konfigurowalnych skrótów - krótkich słow rozszerzających się w często używane struktury kodu. -Comment[pt]=Oferece o suporte para abreviaturas personalizadas - palavras curtas que podem expandir para estruturas de código normalmente necessárias. -Comment[pt_BR]=Fornece suporte para abreviaturas personalizadas - palavras curtas que se expandem em estruturas de código normalmente necessárias. -Comment[ru]=Предоставляет поддержку для настраиваемых сокращений - коротких слов, которые заменяются на часто используемые структуры кода. -Comment[sk]=Poskytuje podporu pre prispôsobiteľné skratky - krátke slová, ktoré sa rozvinú do bežne potrebných kódových štruktúr. -Comment[sr]=Обезбеђује подршку за прилагодљиве скраћенице — кратке речи које се проширују у уобичајено потребне структуре кôда. -Comment[sr@Latn]=Obezbeđuje podršku za prilagodljive skraćenice — kratke reči koje se proširuju u uobičajeno potrebne strukture kôda. -Comment[sv]=Ger stöd för anpassningsbara förkortningar: korta ord som expanderas till vanligt använda kodstrukturer. -Comment[ta]=தேவைக்கேற்ப சுருக்கத்திற்கு இது ஆதரவு தரும்-குறியிடு வடிவத்திற்கு இந்த சுருக்கங்கள் மிகவும் உதவும். -Comment[tg]=Барои кӯтоҳ намоӣ ёрдами худро саҳм мегузорад, яъне калимаҳои кӯтоҳе, ки як хел вақт ба структураҳои коди истифода намоии истифода бурда мешавад. -Comment[tr]=Özelleştirilebilir kısaltmalar için destek sağlar - sık ihtiyaç duyualan kod yapıları yerine geçen kısa kelimeler. -Comment[zh_CN]=为自定义缩写提供支持 - 按需要扩展为所需代码结构的简短文字。 -Comment[zh_TW]=提供可調整的縮寫支援 - 將短的字擴展到常用的程式源碼結構。 -Name=KDevAbbrev -Name[da]=TDevelop Forkortelser -Name[de]=Abkürzungsmodul (TDevelop) -Name[hi]=के-डेव-एब्रिवि -Name[nds]=TDevelop-Afkörtenmoduul -Name[pl]=KDevSkróty -Name[sk]=KDev skratky -Name[sv]=TDevelop förkortningar -Name[zh_TW]=TDevelop 縮寫 -GenericName=Abbreviation Expansion -GenericName[ca]=Expansió d'abreviatures -GenericName[da]=Forkortelsesudvidelse -GenericName[de]=Abkürzungsvervollständigung -GenericName[el]=Ανάπτυξη συντομογραφιών -GenericName[es]=Expansión de abreviaturas -GenericName[et]=Lühendite laienemine -GenericName[eu]=Laburduren zabalkuntza -GenericName[fa]=بسط مختصرسازی -GenericName[fr]=Expansion des abréviations -GenericName[gl]=Expansión de abreviaturas -GenericName[hi]=संक्षिप्त शब्द एक्सपांशन -GenericName[hu]=Rövidítéskezelő -GenericName[it]=Espansione delle abbreviazioni -GenericName[ja]=略語拡張 -GenericName[ms]=Pengembang Kependekan -GenericName[nds]=Afkörtenutfoolden -GenericName[ne]=संक्षिप्त रूप विस्तार -GenericName[nl]=Afkortingen expanderen -GenericName[pl]=Rozwijanie skrótów -GenericName[pt]=Expansão de Abreviaturas -GenericName[pt_BR]=Expansão de Abreviaturas -GenericName[ru]=Расширение сокращений -GenericName[sk]=Rozvinutie skratiek -GenericName[sr]=Проширење скраћеница -GenericName[sr@Latn]=Proširenje skraćenica -GenericName[sv]=Expansion av förkortningar -GenericName[ta]=சுருக்கத்தின் விரிவாக்கம் -GenericName[tg]=Васеъкунии кӯтоҳ карда шуда -GenericName[tr]=Kısaltma Genişlemesi -GenericName[zh_CN]=缩写扩展 -GenericName[zh_TW]=縮寫擴展 -ServiceTypes=TDevelop/Plugin -Icon=fontsizeup -X-TDE-Library=libtdevabbrev -X-TDevelop-Version=5 -X-TDevelop-Scope=Global -X-TDevelop-Properties=CodeEditing diff --git a/parts/appwizard/CMakeLists.txt b/parts/appwizard/CMakeLists.txt index 8a69f06e..bdeaf541 100644 --- a/parts/appwizard/CMakeLists.txt +++ b/parts/appwizard/CMakeLists.txt @@ -35,18 +35,18 @@ link_directories( ##### other data ################################ -install( FILES tdevappwizard.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevappwizard.rc DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard ) +install( FILES kdevappwizard.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevappwizard.rc DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard ) -##### libtdevappwizard (module) ################# +##### libkdevappwizard (module) ################# -tde_add_kpart( libtdevappwizard AUTOMOC +tde_add_kpart( libkdevappwizard AUTOMOC SOURCES appwizardfactory.cpp appwizardpart.cpp appwizarddlg.cpp importdlg.cpp filepropspagebase.ui filepropspage.cpp appwizarddlgbase.ui importdlgbase.ui misc.cpp vcs_form.ui - tdevfile.cpp tdevlicense.cpp profilesupport.cpp + kdevfile.cpp kdevlicense.cpp profilesupport.cpp LINK profileengine-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/parts/appwizard/Makefile.am b/parts/appwizard/Makefile.am index 012f6f29..34af3163 100644 --- a/parts/appwizard/Makefile.am +++ b/parts/appwizard/Makefile.am @@ -7,22 +7,22 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extras -I$(top_srcdir)/lib/util -I$(top_srcdir)/lib/widgets \ -I$(top_srcdir)/src/profileengine/lib $(all_includes) -kde_module_LTLIBRARIES = libtdevappwizard.la -libtdevappwizard_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevappwizard_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/lib/interfaces/extras/libtdevextras.la $(top_builddir)/lib/util/libtdevutil.la \ - $(top_builddir)/lib/widgets/propeditor/libtdevpropertyeditor.la $(top_builddir)/src/profileengine/lib/libprofileengine.la +kde_module_LTLIBRARIES = libkdevappwizard.la +libkdevappwizard_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevappwizard_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/lib/interfaces/extras/libkdevextras.la $(top_builddir)/lib/util/libkdevutil.la \ + $(top_builddir)/lib/widgets/propeditor/libkdevpropertyeditor.la $(top_builddir)/src/profileengine/lib/libprofileengine.la -libtdevappwizard_la_SOURCES = appwizardfactory.cpp appwizardpart.cpp \ +libkdevappwizard_la_SOURCES = appwizardfactory.cpp appwizardpart.cpp \ appwizarddlg.cpp importdlg.cpp filepropspagebase.ui filepropspage.cpp \ appwizarddlgbase.ui importdlgbase.ui misc.cpp vcs_form.ui\ - tdevfile.cpp tdevlicense.cpp profilesupport.cpp + kdevfile.cpp kdevlicense.cpp profilesupport.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevappwizard.desktop +service_DATA = kdevappwizard.desktop -rcdir = $(kde_datadir)/tdevappwizard -rc_DATA = tdevappwizard.rc +rcdir = $(kde_datadir)/kdevappwizard +rc_DATA = kdevappwizard.rc noinst_HEADERS = profilesupport.h diff --git a/parts/appwizard/appwizarddlg.cpp b/parts/appwizard/appwizarddlg.cpp index 4cbf716d..d5160075 100644 --- a/parts/appwizard/appwizarddlg.cpp +++ b/parts/appwizard/appwizarddlg.cpp @@ -64,14 +64,14 @@ #include #include "domutil.h" -#include "tdevversioncontrol.h" -#include "tdevmakefrontend.h" -#include "tdevpartcontroller.h" -#include "tdevplugincontroller.h" -#include "tdevappfrontend.h" -#include "tdevplugininfo.h" -#include "tdevlicense.h" -#include "tdevcore.h" +#include "kdevversioncontrol.h" +#include "kdevmakefrontend.h" +#include "kdevpartcontroller.h" +#include "kdevplugincontroller.h" +#include "kdevappfrontend.h" +#include "kdevplugininfo.h" +#include "kdevlicense.h" +#include "kdevcore.h" #include "appwizardfactory.h" #include "appwizardpart.h" #include "filepropspage.h" @@ -309,8 +309,8 @@ AppWizardDialog::AppWizardDialog(AppWizardPart *part, TQWidget *parent, const ch appname_edit->setValidator(appname_edit_validator); // insert the licenses into the license_combo - TQDict< TDevLicense > lics( licenses() ); - TQDictIterator< TDevLicense > dit(lics); + TQDict< KDevLicense > lics( licenses() ); + TQDictIterator< KDevLicense > dit(lics); int idx=1; for( ; dit.current(); ++dit ) { @@ -356,8 +356,8 @@ void AppWizardDialog::loadVcs() } TQStringList args; TQObject *obj = factory->create(0, service->name().latin1(), - "TDevVCSIntegrator", args); - TDevVCSIntegrator *integrator = (TDevVCSIntegrator*) obj; + "KDevVCSIntegrator", args); + KDevVCSIntegrator *integrator = (KDevVCSIntegrator*) obj; if (!integrator) kdDebug(9010) << " failed to create vcs integrator " << service->name() << endl; @@ -418,20 +418,20 @@ void AppWizardDialog::licenseChanged() edit->setText( TQString() ); } } else { - TDevLicense* lic = licenses()[ license_combo->currentText() ]; + KDevLicense* lic = licenses()[ license_combo->currentText() ]; for (it = m_fileTemplates.begin(); it != m_fileTemplates.end(); ++it) { TQString style = (*it).style; TQMultiLineEdit *edit = (*it).edit; - TDevFile::CommentingStyle commentStyle = TDevFile::CPPStyle; + KDevFile::CommentingStyle commentStyle = KDevFile::CPPStyle; if (style == "PStyle") { - commentStyle = TDevFile::PascalStyle; + commentStyle = KDevFile::PascalStyle; } else if (style == "AdaStyle") { - commentStyle = TDevFile::AdaStyle; + commentStyle = KDevFile::AdaStyle; } else if (style == "ShellStyle") { - commentStyle = TDevFile::BashStyle; + commentStyle = KDevFile::BashStyle; } else if (style == "XMLStyle") { - commentStyle = TDevFile::XMLStyle; + commentStyle = KDevFile::XMLStyle; } TQString text; @@ -577,7 +577,7 @@ void AppWizardDialog::accept() if( license_combo->currentItem() != 0 ) { licenseName = license_combo->currentText(); - TDevLicense* lic = licenses()[ licenseName ]; + KDevLicense* lic = licenses()[ licenseName ]; if( lic ) { TQStringList files( lic->copyFiles() ); @@ -1273,7 +1273,7 @@ void AppWizardDialog::setPermissions(const installFile &file) } } -TQDict AppWizardDialog::licenses() +TQDict AppWizardDialog::licenses() { return m_licenses; } @@ -1291,7 +1291,7 @@ void AppWizardDialog::loadLicenses() TQString licPath( dirs->findResource( "licenses", *it ) ); kdDebug(9010) << "Loading license file: " << licPath << endl; TQString licName = licPath.mid( licPath.findRev('/') + 1 ); - TDevLicense* lic = new TDevLicense( licName, licPath ); + KDevLicense* lic = new KDevLicense( licName, licPath ); m_licenses.insert( licName, lic ); } // kdDebug(9010) << "======================== Done loadLicenses" << endl; diff --git a/parts/appwizard/appwizarddlg.h b/parts/appwizard/appwizarddlg.h index 4a160bd2..392cd1b6 100644 --- a/parts/appwizard/appwizarddlg.h +++ b/parts/appwizard/appwizarddlg.h @@ -32,12 +32,12 @@ class ProfileSupport; #include #include #include -#include "tdevversioncontrol.h" -#include "tdevvcsintegrator.h" +#include "kdevversioncontrol.h" +#include "kdevvcsintegrator.h" #include "appwizarddlgbase.h" #include "vcs_form.h" //#include "autoform.h" -#include "tdevlicense.h" +#include "kdevlicense.h" namespace PropertyLib { class PropertyList; @@ -132,7 +132,7 @@ public: protected: virtual void accept(); - virtual TQDict licenses(); + virtual TQDict licenses(); void loadLicenses(); protected slots: @@ -181,7 +181,7 @@ private: //data TQDict m_categoryMap; TQValueList m_categoryItems; //! A list of currently available version control systems -// TQDict m_availVcs; +// TQDict m_availVcs; TQHBoxLayout *m_custom_options_layout; PropertyLib::PropertyEditor *m_customOptions; @@ -195,8 +195,8 @@ private: //data TDEPopupMenu* m_favouritesMenu; TDEPopupMenu* m_templatesMenu; - TQDict m_licenses; - TQDict m_integrators; + TQDict m_licenses; + TQDict m_integrators; TQMap m_integratorDialogs; ProfileSupport *m_profileSupport; diff --git a/parts/appwizard/appwizardfactory.cpp b/parts/appwizard/appwizardfactory.cpp index 6749add0..5288105d 100644 --- a/parts/appwizard/appwizardfactory.cpp +++ b/parts/appwizard/appwizardfactory.cpp @@ -11,30 +11,30 @@ #include -#include +#include #include "appwizardfactory.h" -static const TDevPluginInfo data("tdevappwizard"); -K_EXPORT_COMPONENT_FACTORY( libtdevappwizard, AppWizardFactory ) +static const KDevPluginInfo data("kdevappwizard"); +K_EXPORT_COMPONENT_FACTORY( libkdevappwizard, AppWizardFactory ) AppWizardFactory::AppWizardFactory() - : TDevGenericFactory( data ) + : KDevGenericFactory( data ) { } TDEInstance *AppWizardFactory::createInstance() { - TDEInstance *instance = TDevGenericFactory::createInstance(); + TDEInstance *instance = KDevGenericFactory::createInstance(); TDEStandardDirs *dirs = instance->dirs(); - dirs->addResourceType("apptemplates", TDEStandardDirs::kde_default("data") + "tdevappwizard/templates/"); - dirs->addResourceType("appimports", TDEStandardDirs::kde_default("data") + "tdevappwizard/imports/"); - dirs->addResourceType("appimportfiles", TDEStandardDirs::kde_default("data") + "tdevappwizard/importfiles/"); + dirs->addResourceType("apptemplates", TDEStandardDirs::kde_default("data") + "kdevappwizard/templates/"); + dirs->addResourceType("appimports", TDEStandardDirs::kde_default("data") + "kdevappwizard/imports/"); + dirs->addResourceType("appimportfiles", TDEStandardDirs::kde_default("data") + "kdevappwizard/importfiles/"); return instance; } -const TDevPluginInfo *AppWizardFactory::info() +const KDevPluginInfo *AppWizardFactory::info() { return &data; } diff --git a/parts/appwizard/appwizardfactory.h b/parts/appwizard/appwizardfactory.h index 3de35631..3bbc6e1e 100644 --- a/parts/appwizard/appwizardfactory.h +++ b/parts/appwizard/appwizardfactory.h @@ -12,18 +12,18 @@ #ifndef _APPWIZARDFACTORY_H_ #define _APPWIZARDFACTORY_H_ -#include +#include #include "appwizardpart.h" -class TDevPluginInfo; +class KDevPluginInfo; -class AppWizardFactory : public TDevGenericFactory +class AppWizardFactory : public KDevGenericFactory { public: AppWizardFactory(); - static const TDevPluginInfo *info(); + static const KDevPluginInfo *info(); protected: virtual TDEInstance *createInstance(); diff --git a/parts/appwizard/appwizardpart.cpp b/parts/appwizard/appwizardpart.cpp index ada3b362..dd2fae65 100644 --- a/parts/appwizard/appwizardpart.cpp +++ b/parts/appwizard/appwizardpart.cpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include @@ -28,17 +28,17 @@ #include "importdlg.h" #include "appwizarddlg.h" #include "appwizardfactory.h" -#include -#include -#include -#include +#include +#include +#include +#include #include AppWizardPart::AppWizardPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin(AppWizardFactory::info(), parent, name ? name : "AppWizardPart") + : KDevPlugin(AppWizardFactory::info(), parent, name ? name : "AppWizardPart") { setInstance(AppWizardFactory::instance()); - setXMLFile("tdevappwizard.rc"); + setXMLFile("kdevappwizard.rc"); TDEAction *action; diff --git a/parts/appwizard/appwizardpart.h b/parts/appwizard/appwizardpart.h index 901d51ad..59280631 100644 --- a/parts/appwizard/appwizardpart.h +++ b/parts/appwizard/appwizardpart.h @@ -13,7 +13,7 @@ #define _APPWIZARDPART_H_ #include -#include "tdevplugin.h" +#include "kdevplugin.h" #include #include #include @@ -21,7 +21,7 @@ class AppWizardDialog; -class AppWizardPart : public TDevPlugin +class AppWizardPart : public KDevPlugin { Q_OBJECT diff --git a/parts/appwizard/common/CMakeLists.txt b/parts/appwizard/common/CMakeLists.txt index 81ee38b4..62a5b97b 100644 --- a/parts/appwizard/common/CMakeLists.txt +++ b/parts/appwizard/common/CMakeLists.txt @@ -20,7 +20,7 @@ generate_tar( gnome2.tar.gz gnome2 macros ) generate_tar( gnu.tar.gz gnu AUTHORS COPYING ChangeLog INSTALL NEWS README TODO ) generate_tar( wxwidgets.tar.gz wx macros ) generate_tar( incadmin.tar.gz incadmin config.guess config.sub depcomp install-sh ltmain.sh missing mkinstalldirs ) -generate_tar( scons.tar.gz scons configure admin/scons-mini.tar.bz2 admin/generic.py admin/tde.py ) +generate_tar( scons.tar.gz scons configure admin/scons-mini.tar.bz2 admin/generic.py admin/kde.py ) install( FILES ${CMAKE_CURRENT_BINARY_DIR}/admin.tar.gz @@ -29,18 +29,18 @@ install( FILES ${CMAKE_CURRENT_BINARY_DIR}/gnome.tar.gz ${CMAKE_CURRENT_BINARY_DIR}/gnome2.tar.gz ${CMAKE_CURRENT_BINARY_DIR}/wxwidgets.tar.gz - tde-app.lsm tde-Makefile.am tde-Makefile.cvs + kde-app.lsm kde-Makefile.am kde-Makefile.cvs tde-configure.in.in tde-index.docbook - tde-po-Makefile.am tde-doc-Makefile.am - tde-doc-en-Makefile.am hi16-app-app.png + kde-po-Makefile.am kde-doc-Makefile.am + kde-doc-en-Makefile.am hi16-app-app.png hi32-app-app.png tde-app.desktop tde-part.desktop gnome-app.lsm gnome-Makefile.am gnome-Makefile.cvs gnome-pixmaps-Makefile.am gnome-app.png wx-configure.in wx-Makefile.am wx-Makefile.cvs COPYING COPYING.LIB LICENSE.QPL LICENSE.BSD - Artistic admin.tdevtemplate gnu.tdevtemplate - dockbook.tdevtemplate incadmin.tdevtemplate - gnome2.tdevtemplate scons.tdevtemplate + Artistic admin.kdevtemplate gnu.kdevtemplate + dockbook.kdevtemplate incadmin.kdevtemplate + gnome2.kdevtemplate scons.kdevtemplate ${CMAKE_CURRENT_BINARY_DIR}/scons.tar.gz - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/template-common ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/template-common ) diff --git a/parts/appwizard/common/Makefile.am b/parts/appwizard/common/Makefile.am index e068df5b..2d6e5278 100644 --- a/parts/appwizard/common/Makefile.am +++ b/parts/appwizard/common/Makefile.am @@ -28,19 +28,19 @@ incadmin.tar.gz: gzip incadmin.tar scons.tar.gz: - $(TAR) -cf scons.tar --exclude=.svn -C $(srcdir)/scons configure admin/scons-mini.tar.bz2 admin/generic.py admin/tde.py + $(TAR) -cf scons.tar --exclude=.svn -C $(srcdir)/scons configure admin/scons-mini.tar.bz2 admin/generic.py admin/kde.py gzip scons.tar -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard commondatadir = ${appwizarddatadir}/template-common commondata_DATA = admin.tar.gz gnu.tar.gz incadmin.tar.gz gnome.tar.gz gnome2.tar.gz wxwidgets.tar.gz \ - tde-app.lsm tde-Makefile.am tde-Makefile.cvs tde-configure.in.in \ - tde-index.docbook tde-po-Makefile.am tde-doc-Makefile.am tde-doc-en-Makefile.am \ + kde-app.lsm kde-Makefile.am kde-Makefile.cvs tde-configure.in.in \ + tde-index.docbook kde-po-Makefile.am kde-doc-Makefile.am kde-doc-en-Makefile.am \ hi16-app-app.png hi32-app-app.png tde-app.desktop tde-part.desktop \ gnome-app.lsm gnome-Makefile.am gnome-Makefile.cvs \ gnome-pixmaps-Makefile.am gnome-app.png \ wx-configure.in wx-Makefile.am wx-Makefile.cvs \ COPYING COPYING.LIB LICENSE.QPL LICENSE.BSD Artistic \ - admin.tdevtemplate gnu.tdevtemplate dockbook.tdevtemplate\ - incadmin.tdevtemplate gnome2.tdevtemplate scons.tdevtemplate scons.tar.gz + admin.kdevtemplate gnu.kdevtemplate dockbook.kdevtemplate\ + incadmin.kdevtemplate gnome2.kdevtemplate scons.kdevtemplate scons.tar.gz diff --git a/parts/appwizard/common/admin.tdevtemplate b/parts/appwizard/common/admin.kdevtemplate similarity index 100% rename from parts/appwizard/common/admin.tdevtemplate rename to parts/appwizard/common/admin.kdevtemplate diff --git a/parts/appwizard/common/dockbook.tdevtemplate b/parts/appwizard/common/dockbook.kdevtemplate similarity index 100% rename from parts/appwizard/common/dockbook.tdevtemplate rename to parts/appwizard/common/dockbook.kdevtemplate diff --git a/parts/appwizard/common/gnome2.tdevtemplate b/parts/appwizard/common/gnome2.kdevtemplate similarity index 100% rename from parts/appwizard/common/gnome2.tdevtemplate rename to parts/appwizard/common/gnome2.kdevtemplate diff --git a/parts/appwizard/common/gnu.tdevtemplate b/parts/appwizard/common/gnu.kdevtemplate similarity index 100% rename from parts/appwizard/common/gnu.tdevtemplate rename to parts/appwizard/common/gnu.kdevtemplate diff --git a/parts/appwizard/common/incadmin.tdevtemplate b/parts/appwizard/common/incadmin.kdevtemplate similarity index 100% rename from parts/appwizard/common/incadmin.tdevtemplate rename to parts/appwizard/common/incadmin.kdevtemplate diff --git a/parts/appwizard/common/tde-Makefile.am b/parts/appwizard/common/kde-Makefile.am similarity index 100% rename from parts/appwizard/common/tde-Makefile.am rename to parts/appwizard/common/kde-Makefile.am diff --git a/parts/appwizard/common/tde-Makefile.cvs b/parts/appwizard/common/kde-Makefile.cvs similarity index 100% rename from parts/appwizard/common/tde-Makefile.cvs rename to parts/appwizard/common/kde-Makefile.cvs diff --git a/parts/appwizard/common/tde-app.lsm b/parts/appwizard/common/kde-app.lsm similarity index 100% rename from parts/appwizard/common/tde-app.lsm rename to parts/appwizard/common/kde-app.lsm diff --git a/parts/appwizard/common/tde-doc-Makefile.am b/parts/appwizard/common/kde-doc-Makefile.am similarity index 100% rename from parts/appwizard/common/tde-doc-Makefile.am rename to parts/appwizard/common/kde-doc-Makefile.am diff --git a/parts/appwizard/common/tde-doc-en-Makefile.am b/parts/appwizard/common/kde-doc-en-Makefile.am similarity index 100% rename from parts/appwizard/common/tde-doc-en-Makefile.am rename to parts/appwizard/common/kde-doc-en-Makefile.am diff --git a/parts/appwizard/common/tde-po-Makefile.am b/parts/appwizard/common/kde-po-Makefile.am similarity index 100% rename from parts/appwizard/common/tde-po-Makefile.am rename to parts/appwizard/common/kde-po-Makefile.am diff --git a/parts/appwizard/common/scons.tdevtemplate b/parts/appwizard/common/scons.kdevtemplate similarity index 100% rename from parts/appwizard/common/scons.tdevtemplate rename to parts/appwizard/common/scons.kdevtemplate diff --git a/parts/appwizard/common/scons/admin/kde.py b/parts/appwizard/common/scons/admin/kde.py new file mode 100644 index 00000000..d194fd84 --- /dev/null +++ b/parts/appwizard/common/scons/admin/kde.py @@ -0,0 +1,856 @@ +# Made from scons qt.py and (heavily) modified into kde.py +# Thomas Nagy, 2004, 2005 + +""" +Run scons -h to display the associated help, or look below .. +""" + +BOLD ="\033[1m" +RED ="\033[91m" +GREEN ="\033[92m" +YELLOW ="\033[1m" #"\033[93m" # unreadable on white backgrounds +CYAN ="\033[96m" +NORMAL ="\033[0m" + +import os, re, types + +# Returns the name of the shared object (i.e. libtdeui.so.4) +# referenced by a libtool archive (like libtdeui.la) +def getSOfromLA(lafile): + contents = open(lafile, 'r').read() + match = re.search("^dlname='([^']*)'$", contents, re.M) + if match: + return match.group(1) + return None + +def exists(env): + return True + +def detect_kde(env): + """ Detect the qt and kde environment using tde-config mostly """ + + prefix = env['ARGS'].get('prefix', None) + execprefix = env['ARGS'].get('execprefix', None) + datadir = env['ARGS'].get('datadir', None) + libdir = env['ARGS'].get('libdir', None) + libsuffix = env['ARGS'].get('libsuffix', '') + kdeincludes = env['ARGS'].get('kdeincludes', None) + tdelibs = env['ARGS'].get('tdelibs', None) + qtincludes = env['ARGS'].get('qtincludes', None) + qtlibs = env['ARGS'].get('qtlibs', None) + + if libdir: + libdir = libdir+libsuffix + + ## Detect the kde libraries + print "Checking for tde-config : ", + kde_config = os.popen("which tde-config 2>/dev/null").read().strip() + if len(kde_config): + print GREEN+"tde-config was found"+NORMAL + else: + print RED+"tde-config was NOT found in your PATH"+NORMAL + print "Make sure kde is installed properly" + print "(missing package tdebase-devel?)" + env.Exit(1) + env['TDEDIR'] = os.popen('tde-config -prefix').read().strip() + + print "Checking for kde version : ", + kde_version = os.popen("tde-config --version|grep KDE").read().strip().split()[1] + if int(kde_version[0]) != 3 or int(kde_version[2]) < 2: + print RED+kde_version + print RED+"Your kde version can be too old"+NORMAL + print RED+"Please make sure kde is at least 3.2"+NORMAL + else: + print GREEN+kde_version+NORMAL + + ## Detect the qt library + print "Checking for the qt library : ", + qtdir = os.getenv("QTDIR") + if qtdir: + print GREEN+"qt is in "+qtdir+NORMAL + else: + libdir = os.popen('tde-config --expandvars --install lib').read().strip() + libtdeuiSO = libdir+'/'+getSOfromLA(libdir+'/libtdeui.la') + m = re.search('(.*)/lib/libqt.*', os.popen('ldd ' + libtdeuiSO + ' | grep libqt').read().strip().split()[2]) + if m: + qtdir = m.group(1) + print YELLOW+"qt was found as "+m.group(1)+NORMAL + else: + print RED+"qt was not found"+NORMAL + print RED+"Please set QTDIR first (/usr/lib/qt3?)"+NORMAL + env.Exit(1) + env['QTDIR'] = qtdir.strip() + + ## Find the necessary programs uic and moc + print "Checking for uic : ", + uic = qtdir + "/bin/uic" + if os.path.isfile(uic): + print GREEN+"uic was found as "+uic+NORMAL + else: + uic = os.popen("which uic 2>/dev/null").read().strip() + if len(uic): + print YELLOW+"uic was found as "+uic+NORMAL + else: + uic = os.popen("which uic 2>/dev/null").read().strip() + if len(uic): + print YELLOW+"uic was found as "+uic+NORMAL + else: + print RED+"uic was not found - set QTDIR put it in your PATH ?"+NORMAL + env.Exit(1) + env['QT_UIC'] = uic + + print "Checking for moc : ", + moc = qtdir + "/bin/moc" + if os.path.isfile(moc): + print GREEN + "moc was found as " + moc + NORMAL + else: + moc = os.popen("which moc 2>/dev/null").read().strip() + if len(moc): + print YELLOW + "moc was found as " + moc + NORMAL + elif os.path.isfile("/usr/share/qt3/bin/moc"): + moc = "/usr/share/qt3/bin/moc" + print YELLOW + "moc was found as " + moc + NORMAL + else: + print RED + "moc was not found - set QTDIR or put it in your PATH ?" + NORMAL + env.Exit(1) + env['QT_MOC'] = moc + + ## check for the qt and kde includes + print "Checking for the qt includes : ", + if qtincludes and os.path.isfile(qtincludes + "/qtqlayout.h"): + # The user told where to look for and it looks valid + print GREEN + "ok " + qtincludes + NORMAL + else: + if os.path.isfile(qtdir + "/include/qtqlayout.h"): + # Automatic detection + print GREEN + "ok " + qtdir + "/include/ " + NORMAL + qtincludes = qtdir + "/include/" + elif os.path.isfile("/usr/include/qt3/qtqlayout.h"): + # Debian probably + print YELLOW + "the qt headers were found in /usr/include/qt3/ " + NORMAL + qtincludes = "/usr/include/qt3" + else: + print RED + "the qt headers were not found" + NORMAL + env.Exit(1) + + print "Checking for the kde includes : ", + kdeprefix = os.popen("tde-config --prefix").read().strip() + if not kdeincludes: + kdeincludes = kdeprefix+"/include/" + if os.path.isfile(kdeincludes + "/klineedit.h"): + print GREEN + "ok " + kdeincludes + NORMAL + else: + if os.path.isfile(kdeprefix+"/include/tde/klineedit.h"): + # Debian, Fedora probably + print YELLOW + "the kde headers were found in " + kdeprefix + "/include/tde/" + NORMAL + kdeincludes = kdeprefix + "/include/tde/" + else: + print RED + "The kde includes were NOT found" + NORMAL + env.Exit(1) + + if prefix: + ## use the user-specified prefix + if not execprefix: + execprefix = prefix + if not datadir: + datadir=prefix+"/share" + if not libdir: + libdir=execprefix+"/lib"+libsuffix + + subst_vars = lambda x: x.replace('${exec_prefix}', execprefix).replace('${datadir}',datadir).replace('${libdir}', libdir) + debian_fix = lambda x: x.replace('/usr/share', '${datadir}') + env['KDEBIN'] = subst_vars(os.popen('tde-config --install exe').read().strip()) + env['KDEAPPS'] = subst_vars(os.popen('tde-config --install apps').read().strip()) + env['KDEDATA'] = subst_vars(os.popen('tde-config --install data').read().strip()) + env['KDEMODULE']= subst_vars(os.popen('tde-config --install module').read().strip()) + env['KDELOCALE']= subst_vars(os.popen('tde-config --install locale').read().strip()) + env['KDEDOC'] = subst_vars( debian_fix(os.popen('tde-config --install html').read().strip()) ) + env['KDEKCFG'] = subst_vars(os.popen('tde-config --install kcfg').read().strip()) + env['KDEXDG'] = subst_vars(os.popen('tde-config --install xdgdata-apps').read().strip()) + env['KDEXDGDIR']= subst_vars(os.popen('tde-config --install xdgdata-dirs').read().strip()) + env['KDEMENU'] = subst_vars(os.popen('tde-config --install apps').read().strip()) + env['KDEMIME'] = subst_vars(os.popen('tde-config --install mime').read().strip()) + env['KDEICONS'] = subst_vars(os.popen('tde-config --install icon').read().strip()) + env['KDESERV'] = subst_vars(os.popen('tde-config --install services').read().strip()) + else: + # the user has given no prefix, install as a normal kde app + env['PREFIX'] = os.popen('tde-config --prefix').read().strip() + env['KDEBIN'] = os.popen('tde-config --expandvars --install exe').read().strip() + env['KDEAPPS'] = os.popen('tde-config --expandvars --install apps').read().strip() + env['KDEDATA'] = os.popen('tde-config --expandvars --install data').read().strip() + env['KDEMODULE']= os.popen('tde-config --expandvars --install module').read().strip() + env['KDELOCALE']= os.popen('tde-config --expandvars --install locale').read().strip() + env['KDEDOC'] = os.popen('tde-config --expandvars --install html').read().strip() + env['KDEKCFG'] = os.popen('tde-config --expandvars --install kcfg').read().strip() + env['KDEXDG'] = os.popen('tde-config --expandvars --install xdgdata-apps').read().strip() + env['KDEXDGDIR']= os.popen('tde-config --expandvars --install xdgdata-dirs').read().strip() + env['KDEMENU'] = os.popen('tde-config --expandvars --install apps').read().strip() + env['KDEMIME'] = os.popen('tde-config --expandvars --install mime').read().strip() + env['KDEICONS'] = os.popen('tde-config --expandvars --install icon').read().strip() + env['KDESERV'] = os.popen('tde-config --expandvars --install services').read().strip() + + env['QTPLUGINS']=os.popen('tde-config --expandvars --install qtplugins').read().strip() + + ## kde libs and includes + env['KDEINCLUDEPATH']=kdeincludes + if not tdelibs: + tdelibs=os.popen('tde-config --expandvars --install lib').read().strip() + env['KDELIBPATH']=tdelibs + + ## qt libs and includes + env['QTINCLUDEPATH']=qtincludes + if not qtlibs: + qtlibs=qtdir+"/lib" + env['QTLIBPATH']=qtlibs + +def generate(env): + """"Set up the qt and kde environment and builders - the moc part is difficult to understand """ + if env['HELP']: + print """ +"""+BOLD+"""*** KDE options *** +-------------------"""+NORMAL+""" +"""+BOLD+"""* prefix """+NORMAL+""": base install path, ie: /usr/local +"""+BOLD+"""* execprefix """+NORMAL+""": install path for binaries, ie: /usr/bin +"""+BOLD+"""* datadir """+NORMAL+""": install path for the data, ie: /usr/local/share +"""+BOLD+"""* libdir """+NORMAL+""": install path for the libs, ie: /usr/lib +"""+BOLD+"""* libsuffix """+NORMAL+""": suffix of libraries on amd64, ie: 64, 32 +"""+BOLD+"""* kdeincludes"""+NORMAL+""": path to the kde includes (/usr/include/tde on debian, ...) +"""+BOLD+"""* qtincludes """+NORMAL+""": same punishment, for qt includes (/usr/include/qt on debian, ...) +"""+BOLD+"""* tdelibs """+NORMAL+""": path to the kde libs, for linking the programs +"""+BOLD+"""* qtlibs """+NORMAL+""": same punishment, for qt libraries +ie: """+BOLD+"""scons configure libdir=/usr/local/lib qtincludes=/usr/include/qt +"""+NORMAL + + import SCons.Defaults + import SCons.Tool + import SCons.Util + + ui_extensions = [".ui"] + header_extensions = [".h", ".hxx", ".hpp", ".hh"] + source_extensions = [".cpp", ".cxx", ".cc"] + + def find_file(filename, paths, node_factory): + retval = None + for dir in paths: + node = node_factory(filename, dir) + if node.rexists(): + return node + return None + + class _Metasources: + """ Callable class, which works as an emitter for Programs, SharedLibraries + and StaticLibraries.""" + + def __init__(self, objBuilderName): + self.objBuilderName = objBuilderName + + def __call__(self, target, source, env): + """ Smart autoscan function. Gets the list of objects for the Program + or Lib. Adds objects and builders for the special qt files. """ + try: + if int(env.subst('$QT_AUTOSCAN')) == 0: + return target, source + except ValueError: + pass + + try: + qtdebug = int(env.subst('$QT_DEBUG')) + except ValueError: + qtdebug = 0 + + # some shortcuts used in the scanner + FS = SCons.Node.FS.default_fs + splitext = SCons.Util.splitext + objBuilder = getattr(env, self.objBuilderName) + + # some regular expressions: + # Q_OBJECT detection + q_object_search = re.compile(r'[^A-Za-z0-9]Q_OBJECT[^A-Za-z0-9]') + + # The following is kind of hacky to get builders working properly (FIXME) ?? + objBuilderEnv = objBuilder.env + objBuilder.env = env + mocBuilderEnv = env.Moc.env + env.Moc.env = env + + # make a deep copy for the result; MocH objects will be appended + out_sources = source[:] + + for obj in source: + if not obj.has_builder(): + # binary obj file provided + if qtdebug: + print "scons: qt: '%s' seems to be a binary. Discarded." % str(obj) + continue + cpp = obj.sources[0] + if not splitext(str(cpp))[1] in source_extensions: + if qtdebug: + print "scons: qt: '%s' is no cxx file. Discarded." % str(cpp) + # c or fortran source + continue + #cpp_contents = comment.sub('', cpp.get_contents()) + cpp_contents = cpp.get_contents() + + h = None + ui = None + + for ui_ext in ui_extensions: + # try to find the ui file in the corresponding source directory + uiname = splitext(cpp.name)[0] + ui_ext + ui = find_file(uiname, (cpp.get_dir(),), FS.File) + if ui: + if qtdebug: + print "scons: qt: found .ui file of header" #% (str(h), str(cpp)) + #h_contents = comment.sub('', h.get_contents()) + break + + # if we have a .ui file, do not continue, it is automatically handled by Uic + if ui: + continue + + for h_ext in header_extensions: + # try to find the header file in the corresponding source + # directory + hname = splitext(cpp.name)[0] + h_ext + h = find_file(hname, (cpp.get_dir(),), FS.File) + if h: + if qtdebug: + print "scons: qt: Scanning '%s' (header of '%s')" % (str(h), str(cpp)) + #h_contents = comment.sub('', h.get_contents()) + h_contents = h.get_contents() + break + + if not h and qtdebug: + print "scons: qt: no header for '%s'." % (str(cpp)) + if h and q_object_search.search(h_contents): + # h file with the Q_OBJECT macro found -> add .moc or _moc.cpp file + moc_cpp = None + + if env.has_key('NOMOCSCAN'): + moc_cpp = env.Moc(h) + else: + reg = '\n\s*#include\s*("|<)'+splitext(cpp.name)[0]+'.moc("|>)' + meta_object_search = re.compile(reg) + if meta_object_search.search(cpp_contents): + moc_cpp = env.Moc(h) + else: + moc_cpp = env.Moccpp(h) + moc_o = objBuilder(moc_cpp) + out_sources.append(moc_o) + if qtdebug: + print "scons: qt: found Q_OBJECT macro in '%s', moc'ing to '%s'" % (str(h), str(moc_cpp[0])) + + if cpp and q_object_search.search(cpp_contents): + print "error, bksys cannot handle cpp files with Q_OBJECT classes" + print "if you are sure this is a feature worth the effort, " + print "report this to the authors tnagyemail-mail yahoo.fr" + + # restore the original env attributes (FIXME) + objBuilder.env = objBuilderEnv + env.Moc.env = mocBuilderEnv + + return (target, out_sources) + + MetasourcesShared = _Metasources('SharedObject') + MetasourcesStatic = _Metasources('StaticObject') + + CLVar = SCons.Util.CLVar + splitext = SCons.Util.splitext + Builder = SCons.Builder.Builder + + # Detect the environment - replaces ./configure implicitely and store the options into a cache + from SCons.Options import Options + cachefile=env['CACHEDIR']+'kde.cache.py' + opts = Options(cachefile) + opts.AddOptions( + ('PREFIX', 'root of the program installation'), + + ('QTDIR', 'root of qt directory'), + ('QTLIBPATH', 'path to the qt libraries'), + ('QTINCLUDEPATH', 'path to the qt includes'), + ('QT_UIC', 'moc directory'), + ('QT_MOC', 'moc executable command'), + ('QTPLUGINS', 'uic executable command'), + ('TDEDIR', 'root of kde directory'), + ('KDELIBPATH', 'path to the kde libs'), + ('KDEINCLUDEPATH', 'path to the kde includes'), + + ('KDEBIN', 'installation path of the kde binaries'), + ('KDEMODULE', 'installation path of the parts and libs'), + ('KDEAPPS', ''), + ('KDEDATA', 'installation path of the application data'), + ('KDELOCALE', ''), + ('KDEDOC', 'installation path of the application documentation'), + ('KDEKCFG', 'installation path of the .kcfg files'), + ('KDEXDG', 'installation path of the service types'), + ('KDEXDGDIR', 'installation path of the xdg service directories'), + ('KDEMENU', ''), + ('KDEMIME', 'installation path of to the mimetypes'), + ('KDEICONS', ''), + ('KDESERV', ''), + ) + opts.Update(env) + + # reconfigure when things are missing + if not env['HELP'] and (env['_CONFIGURE'] or not env.has_key('QTDIR') or not env.has_key('TDEDIR')): + detect_kde(env) + + # finally save the configuration to the cache file + opts.Save(cachefile, env) + + ## set default variables, one can override them in sconscript files + env.Append(CXXFLAGS = ['-I'+env['KDEINCLUDEPATH'], '-I'+env['QTINCLUDEPATH'] ]) + env.Append(LIBPATH = [env['KDELIBPATH'], env['QTLIBPATH'] ]) + + env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1 + + env['QT_AUTOSCAN'] = 1 + env['QT_DEBUG'] = 0 + env['QT_UIC_HFLAGS'] = '-L $QTPLUGINS -nounload' + env['QT_UIC_CFLAGS'] = '$QT_UIC_HFLAGS -tr tr2i18n' + env['QT_LIBS'] = 'qt-mt' + env['QT_UICIMPLPREFIX'] = '' + env['QT_UICIMPLSUFFIX'] = '.cpp' + + env['QT_MOCHPREFIX'] = '' + env['QT_MOCHSUFFIX'] = '.moc' + env['KDE_KCFG_IMPLPREFIX'] = '' + env['KDE_KCFG_IMPL_HSUFFIX'] = '.h' + env['KDE_KCFG_IMPL_CSUFFIX'] = '.cpp' + env['KDE_SKEL_IMPL_SUFFIX'] = '.skel' + env['MEINPROC'] = 'meinproc' + env['MSGFMT'] = 'msgfmt' + + ## ui file processing + def uic_processing(target, source, env): + inc_kde = '#include \n#include \n' + inc_moc = '#include "%s"\n' % target[2].name + comp_h = '$QT_UIC $QT_UIC_HFLAGS -o %s %s' % (target[0].path, source[0].path) + comp_c = '$QT_UIC $QT_UIC_CFLAGS -impl %s %s' % (target[0].path, source[0].path) + comp_moc = '$QT_MOC -o %s %s' % (target[2].path, target[0].path) + + ret = env.Execute(comp_h) + if ret: + return ret + + dest = open( target[1].path, "w" ) + dest.write(inc_kde) + dest.close() + + ret = env.Execute( comp_c+" >> "+target[1].path ) + if ret: + return ret + + dest = open( target[1].path, "a" ) + dest.write(inc_moc) + dest.close() + + ret = env.Execute( comp_moc ) + return ret + + def uicEmitter(target, source, env): + adjustixes = SCons.Util.adjustixes + bs = SCons.Util.splitext(str(source[0].name))[0] + bs = os.path.join(str(target[0].get_dir()),bs) + # first target is automatically added by builder (.h file) + if len(target) < 2: + # second target is .cpp file + target.append(adjustixes(bs, + env.subst('$QT_UICIMPLPREFIX'), + env.subst('$QT_UICIMPLSUFFIX'))) + if len(target) < 3: + # third target is .moc file + target.append(adjustixes(bs, + env.subst('$QT_MOCHPREFIX'), + env.subst('$QT_MOCHSUFFIX'))) + return target, source + + UIC_BUILDER = Builder( + action = uic_processing, + emitter = uicEmitter, + suffix = '.h', + src_suffix = '.ui') + + ## moc file processing + env['QT_MOCCOM'] = ('$QT_MOC -o ${TARGETS[0]} $SOURCE') + + MOC_BUILDER = Builder( + action = '$QT_MOCCOM', + suffix = '.moc', + src_suffix = '.h') + + MOCCPP_BUILDER = Builder( + action = '$QT_MOCCOM', + suffix = '_moc.cpp', + src_suffix = '.h') + + ## kcfg file processing + def kcfgGenerator(target, source, env, for_signature): + act=[] + act.append('tdeconfig_compiler -d'+str(source[0].get_dir())+' '+source[1].path+' '+source[0].path) + return act + + def kcfgEmitter(target, source, env): + adjustixes = SCons.Util.adjustixes + bs = SCons.Util.splitext(str(source[0].name))[0] + bs = os.path.join(str(target[0].get_dir()),bs) + # .h file is automatically added + if len(target) < 2: + # add .cpp file + target.append(adjustixes(bs, env.subst('$KDE_KCFG_IMPLPREFIX'), env.subst('$KDE_KCFG_IMPL_CSUFFIX'))) + + if len(source) <2: + if not os.path.isfile(str(source[0])): + print RED+'kcfg file given'+str(source[0])+' does not exist !'+NORMAL + return target, source + kfcgfilename="" + kcfgFileDeclRx = re.compile("^[fF]ile\s*=\s*(.+)\s*$") + for line in file(str(source[0]), "r").readlines(): + match = kcfgFileDeclRx.match(line.strip()) + if match: + kcfgfilename = match.group(1) + break + source.append(str(source[0].get_dir())+'/'+kcfgfilename) + return target, source + + KCFG_BUILDER = Builder( + generator = kcfgGenerator, + emitter = kcfgEmitter, + suffix = '.h', + src_suffix = '.kcfgc') + + ## dcop processing + def dcopGenerator(target, source, env, for_signature): + act=[] + act.append('dcopidl '+source[0].path+' > '+target[1].path+'|| ( rm -f '+target[1].path+' ; false)') + act.append('dcopidl2cpp --c++-suffix cpp --no-Q_SIGNALS --no-stub '+target[1].path) + return act + + def dcopEmitter(target, source, env): + bs = SCons.Util.splitext(str(source[0].name))[0] + bs = os.path.join(str(target[0].get_dir()),bs) + target.append(bs+'.kidl') + #target.append(bs+'_skel.cpp') + return target, source + + DCOP_BUILDER = Builder( + generator = dcopGenerator, + emitter = dcopEmitter, + suffix = '_skel.cpp', + src_suffix = '.h') + + ## documentation processing + MEINPROC_BUILDER = Builder( + action = '$MEINPROC --check --cache $TARGET $SOURCE', + suffix = '.cache.bz2') + + ## translation files builder + TRANSFILES_BUILDER = Builder( + action = '$MSGFMT $SOURCE -o $TARGET', + suffix = '.gmo', + src_suffix = '.po') + + ## libtool file builder + def la_file(target, source, env): + dest=open(target[0].path, 'w') + sname=source[0].name + dest.write("dlname='%s'\n" % sname) + dest.write("library_names='%s %s %s'\n" % (sname, sname, sname)) + dest.write("old_library=''\n") + dest.write("dependency_libs=''\n") + dest.write("current=0\n") + dest.write("age=0\n") + dest.write("revision=0\n") + dest.write("installed=yes\n") + dest.write("shouldnotlink=no\n") + dest.write("dlopen=''\n") + dest.write("dlpreopen=''\n") + dest.write("libdir='%s'" % env['KDEMODULE']) + dest.close() + return 0 + + LA_BUILDER = Builder( + action = la_file, + suffix = '.la', + src_suffix = env['SHLIBSUFFIX']) + + ## register the builders + env['BUILDERS']['Uic'] = UIC_BUILDER + env['BUILDERS']['Moc'] = MOC_BUILDER + env['BUILDERS']['Moccpp'] = MOCCPP_BUILDER + env['BUILDERS']['Dcop'] = DCOP_BUILDER + env['BUILDERS']['Kcfg'] = KCFG_BUILDER + env['BUILDERS']['LaFile'] = LA_BUILDER + env['BUILDERS']['Meinproc'] = MEINPROC_BUILDER + env['BUILDERS']['Transfiles']= TRANSFILES_BUILDER + + static_obj, shared_obj = SCons.Tool.createObjBuilders(env) + static_obj.src_builder.append('Uic') + shared_obj.src_builder.append('Uic') + static_obj.src_builder.append('Kcfg') + shared_obj.src_builder.append('Kcfg') + static_obj.src_builder.append('LaFile') + shared_obj.src_builder.append('LaFile') + static_obj.src_builder.append('Meinproc') + shared_obj.src_builder.append('Meinproc') + static_obj.src_builder.append('Transfiles') + shared_obj.src_builder.append('Transfiles') + + ## Find the files to moc, dcop, and link against kde and qt + env.AppendUnique(PROGEMITTER = [MetasourcesStatic], SHLIBEMITTER=[MetasourcesShared], LIBEMITTER =[MetasourcesStatic]) + + ## Handy helpers for building kde programs + ## You should not have to modify them .. + + ## return a list of things + def make_list(e): + if type(e) is types.ListType: + return e + else: + return e.split() + + #import SCons.Util + skel_ext = [".skel", ".SKEL"] + def KDEfiles(lenv, target, source): + """ Returns a list of files for scons (handles kde tricks like .skel) + It also makes custom checks against double includes like : ['file.ui', 'file.cpp'] + (file.cpp is already included because of file.ui) """ + + src=[] + ui_files=[] + kcfg_files=[] + skel_files=[] + other_files=[] + + source_=make_list(source) + + # For each file, check wether it is a dcop file or not, and create the complete list of sources + for file in source_: + bs = SCons.Util.splitext(file)[0] + ext = SCons.Util.splitext(file)[1] + if ext in skel_ext: + lenv.Dcop(bs+'.h') + src.append(bs+'_skel.cpp') + elif ext == ".moch": + lenv.Moccpp(bs+'.h') + src.append(bs+'_moc.cpp') + else: + src.append(file) + + if ext == '.ui': + ui_files.append(bs) + elif ext == '.kcfgc': + kcfg_files.append(bs) + elif ext == '.skel': + skel_files.append(bs) + else: + other_files.append(bs) + + # Now check against typical newbie errors + for file in ui_files: + for ofile in other_files: + if ofile == file: + print RED+"WARNING: You have included "+file+".ui and another file of the same prefix"+NORMAL + print "Files generated by uic (file.h, file.cpp must not be included" + for file in kcfg_files: + for ofile in other_files: + if ofile == file: + print RED+"WARNING: You have included "+file+".kcfg and another file of the same prefix"+NORMAL + print "Files generated by tdeconfig_compiler (settings.h, settings.cpp) must not be included" + return src + + + """ + In the future, these functions will contain the code that will dump the + configuration for re-use from an IDE + """ + import glob + def KDEinstall(lenv, restype, subdir, files): + if not env['_INSTALL']: + return + basedir=env['DESTDIR'] + if len(restype)>0: + if not lenv.has_key(restype): + print RED+"unknown resource type "+restype+NORMAL + else: + basedir += lenv[restype]+'/' + #print file # <- useful to trace stuff :) + install_list = env.Install(basedir+subdir+'/', files) + env.Alias('install', install_list) + return install_list + + def KDEinstallas(lenv, restype, destfile, file): + if not env['_INSTALL']: + return + basedir=env['DESTDIR'] + if len(restype)>0: + if not lenv.has_key(restype): + print RED+"unknown resource type "+restype+NORMAL + else: + basedir += lenv[restype]+'/' + install_list = env.InstallAs(basedir+destfile, file) + env.Alias('install', install_list) + return install_list + + def KDEprogram(lenv, target, source): + """ Makes a kde program + The program is installed except if one sets env['NOAUTOINSTALL'] """ + src = KDEfiles(lenv, target, source) + program_list = lenv.Program(target, src) + if not lenv.has_key('NOAUTOINSTALL'): + KDEinstall(lenv, 'KDEBIN', '', target) + return program_list + + def KDEshlib(lenv, target, source, kdelib=0, libprefix='lib'): + """ Makes a shared library for kde (.la file for klibloader) + The library is installed except if one sets env['NOAUTOINSTALL'] """ + src = KDEfiles(lenv, target, source) + lenv['LIBPREFIX']=libprefix + library_list = lenv.SharedLibrary(target, src) + lafile_list = lenv.LaFile(target, library_list) + if not lenv.has_key('NOAUTOINSTALL'): + install_dir = 'KDEMODULE' + if kdelib==1: + install_dir = 'KDELIBPATH' + KDEinstall(lenv, install_dir, '', library_list) + KDEinstall(lenv, install_dir, '', lafile_list) + return library_list + + def KDEstaticlib(lenv, target, source): + """ Makes a static library for kde - in practice you should not use static libraries + 1. they take more memory than shared ones + 2. makefile.am needed it because of limitations + (cannot handle sources in separate folders - takes extra processing) """ + src = KDEfiles(lenv, target, source) + return lenv.StaticLibrary(target, src) + # do not install static libraries by default + + def KDEaddflags_cxx(lenv, fl): + """ Compilation flags for C++ programs """ + lenv.AppendUnique(CXXFLAGS = make_list(fl)) + + def KDEaddflags_c(lenv, fl): + """ Compilation flags for C programs """ + lenv.AppendUnique(CFLAGS = make_list(fl)) + + def KDEaddflags_link(lenv, fl): + """ Add link flags - Use this if KDEaddlibs below is not enough """ + lenv.AppendUnique(LINKFLAGS = make_list(fl)) + + def KDEaddlibs(lenv, libs): + """ Helper function """ + lenv.AppendUnique(LIBS = make_list(libs)) + + def KDEaddpaths_includes(lenv, paths): + """ Add new include paths """ + lenv.AppendUnique(CPPPATH = make_list(paths)) + + def KDEaddpaths_libs(lenv, paths): + """ Add paths to libraries """ + lenv.AppendUnique(LIBPATH = make_list(paths)) + + def KDElang(lenv, folder, appname): + """ Process translations (.po files) in a po/ dir """ + transfiles = glob.glob(folder+'/*.po') + for lang in transfiles: + result = lenv.Transfiles(lang) + country = SCons.Util.splitext(result[0].name)[0] + KDEinstallas(lenv, 'KDELOCALE', country+'/LC_MESSAGES/'+appname+'.mo', result) + + def subdirs(lenv, folderlist): + flist=make_list(folderlist) + for i in flist: + lenv.SConscript(i+"/SConscript") + + def KDEicon(lenv, icname='*', path='./'): + """ Emulates the behaviour of Makefile.am to install icons + Contributed by: "Andrey Golovizin" """ + type_dic = { 'action' : 'actions', 'app' : 'apps', 'device' : + 'devices', 'filesys' : 'filesystems', 'mime' : 'mimetypes' } + dir_dic = { + 'los' :'locolor/16x16', + 'lom' :'locolor/32x32', + 'him' :'hicolor/32x32', + 'hil' :'hicolor/48x48', + 'lo16' :'locolor/16x16', + 'lo22' :'locolor/22x22', + 'lo32' :'locolor/32x32', + 'hi16' :'hicolor/16x16', + 'hi22' :'hicolor/22x22', + 'hi32' :'hicolor/32x32', + 'hi48' :'hicolor/48x48', + 'hi64' :'hicolor/64x64', + 'hi128':'hicolor/128x128', + 'hisc' :'hicolor/scalable', + 'cr16' :'crystalsvg/16x16', + 'cr22' :'crystalsvg/22x22', + 'cr32' :'crystalsvg/32x32', + 'cr48' :'crystalsvg/48x48', + 'cr64' :'crystalsvg/64x64', + 'cr128':'crystalsvg/128x128', + 'crsc' :'crystalsvg/scalable' + } + + iconfiles = [] + for ext in "png xpm mng svg svgz".split(): + files = glob.glob(path+'/'+'*-*-%s.%s' % (icname, ext)) + iconfiles += files + for iconfile in iconfiles: + lst = iconfile.split('/') + filename = lst[ len(lst) - 1 ] + tmp = filename.split('-') + if len(tmp)!=3: + print RED+'WARNING: icon filename has unknown format: '+iconfile+NORMAL + continue + [icon_dir, icon_type, icon_filename]=tmp + try: + destfile = '%s/%s/%s/%s' % (lenv['KDEICONS'], dir_dic[icon_dir], type_dic[icon_type], icon_filename) + except KeyError: + print RED+'WARNING: unknown icon type: '+iconfile+NORMAL + continue + ## Do not use KDEinstallas here, as parsing from an ide will be necessary + if env['_INSTALL']: + env.Alias('install', env.InstallAs( env['DESTDIR']+'/'+destfile, iconfile ) ) + + def KDEuse(lenv, flags): + _flags=make_list(flags) + if 'environ' in _flags: + ## The scons developers advise against using this but it is mostly innocuous :) + import os + lenv.AppendUnique( ENV = os.environ ) + if not 'lang_qt' in _flags: + ## Use this define if you are using the kde translation scheme (.po files) + lenv.Append( CPPFLAGS = '-DQT_NO_TRANSLATION' ) + if 'rpath' in _flags: + ## Use this to set rpath - this may cause trouble if folders are moved (chrpath) + lenv.Append( RPATH = [env['QTLIBPATH'], env['KDELIBPATH'], env['KDEMODULE']] ) + if 'thread' in _flags: + ## Uncomment the following if you need threading support + lenv.KDEaddflags_cxx( ['-DQT_THREAD_SUPPORT', '-D_REENTRANT'] ) + if not 'nohelp' in _flags: + if lenv['_CONFIGURE'] or lenv['HELP']: + env.Exit(0) + + ## To use kdDebug(intvalue)<<"some trace"< - -""" -Run scons -h to display the associated help, or look below .. -""" - -BOLD ="\033[1m" -RED ="\033[91m" -GREEN ="\033[92m" -YELLOW ="\033[1m" #"\033[93m" # unreadable on white backgrounds -CYAN ="\033[96m" -NORMAL ="\033[0m" - -import os, re, types - -# Returns the name of the shared object (i.e. libtdeui.so.4) -# referenced by a libtool archive (like libtdeui.la) -def getSOfromLA(lafile): - contents = open(lafile, 'r').read() - match = re.search("^dlname='([^']*)'$", contents, re.M) - if match: - return match.group(1) - return None - -def exists(env): - return True - -def detect_kde(env): - """ Detect the qt and kde environment using tde-config mostly """ - - prefix = env['ARGS'].get('prefix', None) - execprefix = env['ARGS'].get('execprefix', None) - datadir = env['ARGS'].get('datadir', None) - libdir = env['ARGS'].get('libdir', None) - libsuffix = env['ARGS'].get('libsuffix', '') - kdeincludes = env['ARGS'].get('kdeincludes', None) - tdelibs = env['ARGS'].get('tdelibs', None) - qtincludes = env['ARGS'].get('qtincludes', None) - qtlibs = env['ARGS'].get('qtlibs', None) - - if libdir: - libdir = libdir+libsuffix - - ## Detect the kde libraries - print "Checking for tde-config : ", - kde_config = os.popen("which tde-config 2>/dev/null").read().strip() - if len(kde_config): - print GREEN+"tde-config was found"+NORMAL - else: - print RED+"tde-config was NOT found in your PATH"+NORMAL - print "Make sure kde is installed properly" - print "(missing package tdebase-devel?)" - env.Exit(1) - env['TDEDIR'] = os.popen('tde-config -prefix').read().strip() - - print "Checking for kde version : ", - kde_version = os.popen("tde-config --version|grep KDE").read().strip().split()[1] - if int(kde_version[0]) != 3 or int(kde_version[2]) < 2: - print RED+kde_version - print RED+"Your kde version can be too old"+NORMAL - print RED+"Please make sure kde is at least 3.2"+NORMAL - else: - print GREEN+kde_version+NORMAL - - ## Detect the qt library - print "Checking for the qt library : ", - qtdir = os.getenv("QTDIR") - if qtdir: - print GREEN+"qt is in "+qtdir+NORMAL - else: - libdir = os.popen('tde-config --expandvars --install lib').read().strip() - libtdeuiSO = libdir+'/'+getSOfromLA(libdir+'/libtdeui.la') - m = re.search('(.*)/lib/libqt.*', os.popen('ldd ' + libtdeuiSO + ' | grep libqt').read().strip().split()[2]) - if m: - qtdir = m.group(1) - print YELLOW+"qt was found as "+m.group(1)+NORMAL - else: - print RED+"qt was not found"+NORMAL - print RED+"Please set QTDIR first (/usr/lib/qt3?)"+NORMAL - env.Exit(1) - env['QTDIR'] = qtdir.strip() - - ## Find the necessary programs uic and moc - print "Checking for uic : ", - uic = qtdir + "/bin/uic" - if os.path.isfile(uic): - print GREEN+"uic was found as "+uic+NORMAL - else: - uic = os.popen("which uic 2>/dev/null").read().strip() - if len(uic): - print YELLOW+"uic was found as "+uic+NORMAL - else: - uic = os.popen("which uic 2>/dev/null").read().strip() - if len(uic): - print YELLOW+"uic was found as "+uic+NORMAL - else: - print RED+"uic was not found - set QTDIR put it in your PATH ?"+NORMAL - env.Exit(1) - env['QT_UIC'] = uic - - print "Checking for moc : ", - moc = qtdir + "/bin/moc" - if os.path.isfile(moc): - print GREEN + "moc was found as " + moc + NORMAL - else: - moc = os.popen("which moc 2>/dev/null").read().strip() - if len(moc): - print YELLOW + "moc was found as " + moc + NORMAL - elif os.path.isfile("/usr/share/qt3/bin/moc"): - moc = "/usr/share/qt3/bin/moc" - print YELLOW + "moc was found as " + moc + NORMAL - else: - print RED + "moc was not found - set QTDIR or put it in your PATH ?" + NORMAL - env.Exit(1) - env['QT_MOC'] = moc - - ## check for the qt and kde includes - print "Checking for the qt includes : ", - if qtincludes and os.path.isfile(qtincludes + "/qtqlayout.h"): - # The user told where to look for and it looks valid - print GREEN + "ok " + qtincludes + NORMAL - else: - if os.path.isfile(qtdir + "/include/qtqlayout.h"): - # Automatic detection - print GREEN + "ok " + qtdir + "/include/ " + NORMAL - qtincludes = qtdir + "/include/" - elif os.path.isfile("/usr/include/qt3/qtqlayout.h"): - # Debian probably - print YELLOW + "the qt headers were found in /usr/include/qt3/ " + NORMAL - qtincludes = "/usr/include/qt3" - else: - print RED + "the qt headers were not found" + NORMAL - env.Exit(1) - - print "Checking for the kde includes : ", - kdeprefix = os.popen("tde-config --prefix").read().strip() - if not kdeincludes: - kdeincludes = kdeprefix+"/include/" - if os.path.isfile(kdeincludes + "/klineedit.h"): - print GREEN + "ok " + kdeincludes + NORMAL - else: - if os.path.isfile(kdeprefix+"/include/tde/klineedit.h"): - # Debian, Fedora probably - print YELLOW + "the kde headers were found in " + kdeprefix + "/include/tde/" + NORMAL - kdeincludes = kdeprefix + "/include/tde/" - else: - print RED + "The kde includes were NOT found" + NORMAL - env.Exit(1) - - if prefix: - ## use the user-specified prefix - if not execprefix: - execprefix = prefix - if not datadir: - datadir=prefix+"/share" - if not libdir: - libdir=execprefix+"/lib"+libsuffix - - subst_vars = lambda x: x.replace('${exec_prefix}', execprefix).replace('${datadir}',datadir).replace('${libdir}', libdir) - debian_fix = lambda x: x.replace('/usr/share', '${datadir}') - env['KDEBIN'] = subst_vars(os.popen('tde-config --install exe').read().strip()) - env['KDEAPPS'] = subst_vars(os.popen('tde-config --install apps').read().strip()) - env['KDEDATA'] = subst_vars(os.popen('tde-config --install data').read().strip()) - env['KDEMODULE']= subst_vars(os.popen('tde-config --install module').read().strip()) - env['KDELOCALE']= subst_vars(os.popen('tde-config --install locale').read().strip()) - env['KDEDOC'] = subst_vars( debian_fix(os.popen('tde-config --install html').read().strip()) ) - env['KDEKCFG'] = subst_vars(os.popen('tde-config --install kcfg').read().strip()) - env['KDEXDG'] = subst_vars(os.popen('tde-config --install xdgdata-apps').read().strip()) - env['KDEXDGDIR']= subst_vars(os.popen('tde-config --install xdgdata-dirs').read().strip()) - env['KDEMENU'] = subst_vars(os.popen('tde-config --install apps').read().strip()) - env['KDEMIME'] = subst_vars(os.popen('tde-config --install mime').read().strip()) - env['KDEICONS'] = subst_vars(os.popen('tde-config --install icon').read().strip()) - env['KDESERV'] = subst_vars(os.popen('tde-config --install services').read().strip()) - else: - # the user has given no prefix, install as a normal kde app - env['PREFIX'] = os.popen('tde-config --prefix').read().strip() - env['KDEBIN'] = os.popen('tde-config --expandvars --install exe').read().strip() - env['KDEAPPS'] = os.popen('tde-config --expandvars --install apps').read().strip() - env['KDEDATA'] = os.popen('tde-config --expandvars --install data').read().strip() - env['KDEMODULE']= os.popen('tde-config --expandvars --install module').read().strip() - env['KDELOCALE']= os.popen('tde-config --expandvars --install locale').read().strip() - env['KDEDOC'] = os.popen('tde-config --expandvars --install html').read().strip() - env['KDEKCFG'] = os.popen('tde-config --expandvars --install kcfg').read().strip() - env['KDEXDG'] = os.popen('tde-config --expandvars --install xdgdata-apps').read().strip() - env['KDEXDGDIR']= os.popen('tde-config --expandvars --install xdgdata-dirs').read().strip() - env['KDEMENU'] = os.popen('tde-config --expandvars --install apps').read().strip() - env['KDEMIME'] = os.popen('tde-config --expandvars --install mime').read().strip() - env['KDEICONS'] = os.popen('tde-config --expandvars --install icon').read().strip() - env['KDESERV'] = os.popen('tde-config --expandvars --install services').read().strip() - - env['QTPLUGINS']=os.popen('tde-config --expandvars --install qtplugins').read().strip() - - ## kde libs and includes - env['KDEINCLUDEPATH']=kdeincludes - if not tdelibs: - tdelibs=os.popen('tde-config --expandvars --install lib').read().strip() - env['KDELIBPATH']=tdelibs - - ## qt libs and includes - env['QTINCLUDEPATH']=qtincludes - if not qtlibs: - qtlibs=qtdir+"/lib" - env['QTLIBPATH']=qtlibs - -def generate(env): - """"Set up the qt and kde environment and builders - the moc part is difficult to understand """ - if env['HELP']: - print """ -"""+BOLD+"""*** KDE options *** --------------------"""+NORMAL+""" -"""+BOLD+"""* prefix """+NORMAL+""": base install path, ie: /usr/local -"""+BOLD+"""* execprefix """+NORMAL+""": install path for binaries, ie: /usr/bin -"""+BOLD+"""* datadir """+NORMAL+""": install path for the data, ie: /usr/local/share -"""+BOLD+"""* libdir """+NORMAL+""": install path for the libs, ie: /usr/lib -"""+BOLD+"""* libsuffix """+NORMAL+""": suffix of libraries on amd64, ie: 64, 32 -"""+BOLD+"""* kdeincludes"""+NORMAL+""": path to the kde includes (/usr/include/tde on debian, ...) -"""+BOLD+"""* qtincludes """+NORMAL+""": same punishment, for qt includes (/usr/include/qt on debian, ...) -"""+BOLD+"""* tdelibs """+NORMAL+""": path to the kde libs, for linking the programs -"""+BOLD+"""* qtlibs """+NORMAL+""": same punishment, for qt libraries -ie: """+BOLD+"""scons configure libdir=/usr/local/lib qtincludes=/usr/include/qt -"""+NORMAL - - import SCons.Defaults - import SCons.Tool - import SCons.Util - - ui_extensions = [".ui"] - header_extensions = [".h", ".hxx", ".hpp", ".hh"] - source_extensions = [".cpp", ".cxx", ".cc"] - - def find_file(filename, paths, node_factory): - retval = None - for dir in paths: - node = node_factory(filename, dir) - if node.rexists(): - return node - return None - - class _Metasources: - """ Callable class, which works as an emitter for Programs, SharedLibraries - and StaticLibraries.""" - - def __init__(self, objBuilderName): - self.objBuilderName = objBuilderName - - def __call__(self, target, source, env): - """ Smart autoscan function. Gets the list of objects for the Program - or Lib. Adds objects and builders for the special qt files. """ - try: - if int(env.subst('$QT_AUTOSCAN')) == 0: - return target, source - except ValueError: - pass - - try: - qtdebug = int(env.subst('$QT_DEBUG')) - except ValueError: - qtdebug = 0 - - # some shortcuts used in the scanner - FS = SCons.Node.FS.default_fs - splitext = SCons.Util.splitext - objBuilder = getattr(env, self.objBuilderName) - - # some regular expressions: - # Q_OBJECT detection - q_object_search = re.compile(r'[^A-Za-z0-9]Q_OBJECT[^A-Za-z0-9]') - - # The following is kind of hacky to get builders working properly (FIXME) ?? - objBuilderEnv = objBuilder.env - objBuilder.env = env - mocBuilderEnv = env.Moc.env - env.Moc.env = env - - # make a deep copy for the result; MocH objects will be appended - out_sources = source[:] - - for obj in source: - if not obj.has_builder(): - # binary obj file provided - if qtdebug: - print "scons: qt: '%s' seems to be a binary. Discarded." % str(obj) - continue - cpp = obj.sources[0] - if not splitext(str(cpp))[1] in source_extensions: - if qtdebug: - print "scons: qt: '%s' is no cxx file. Discarded." % str(cpp) - # c or fortran source - continue - #cpp_contents = comment.sub('', cpp.get_contents()) - cpp_contents = cpp.get_contents() - - h = None - ui = None - - for ui_ext in ui_extensions: - # try to find the ui file in the corresponding source directory - uiname = splitext(cpp.name)[0] + ui_ext - ui = find_file(uiname, (cpp.get_dir(),), FS.File) - if ui: - if qtdebug: - print "scons: qt: found .ui file of header" #% (str(h), str(cpp)) - #h_contents = comment.sub('', h.get_contents()) - break - - # if we have a .ui file, do not continue, it is automatically handled by Uic - if ui: - continue - - for h_ext in header_extensions: - # try to find the header file in the corresponding source - # directory - hname = splitext(cpp.name)[0] + h_ext - h = find_file(hname, (cpp.get_dir(),), FS.File) - if h: - if qtdebug: - print "scons: qt: Scanning '%s' (header of '%s')" % (str(h), str(cpp)) - #h_contents = comment.sub('', h.get_contents()) - h_contents = h.get_contents() - break - - if not h and qtdebug: - print "scons: qt: no header for '%s'." % (str(cpp)) - if h and q_object_search.search(h_contents): - # h file with the Q_OBJECT macro found -> add .moc or _moc.cpp file - moc_cpp = None - - if env.has_key('NOMOCSCAN'): - moc_cpp = env.Moc(h) - else: - reg = '\n\s*#include\s*("|<)'+splitext(cpp.name)[0]+'.moc("|>)' - meta_object_search = re.compile(reg) - if meta_object_search.search(cpp_contents): - moc_cpp = env.Moc(h) - else: - moc_cpp = env.Moccpp(h) - moc_o = objBuilder(moc_cpp) - out_sources.append(moc_o) - if qtdebug: - print "scons: qt: found Q_OBJECT macro in '%s', moc'ing to '%s'" % (str(h), str(moc_cpp[0])) - - if cpp and q_object_search.search(cpp_contents): - print "error, bksys cannot handle cpp files with Q_OBJECT classes" - print "if you are sure this is a feature worth the effort, " - print "report this to the authors tnagyemail-mail yahoo.fr" - - # restore the original env attributes (FIXME) - objBuilder.env = objBuilderEnv - env.Moc.env = mocBuilderEnv - - return (target, out_sources) - - MetasourcesShared = _Metasources('SharedObject') - MetasourcesStatic = _Metasources('StaticObject') - - CLVar = SCons.Util.CLVar - splitext = SCons.Util.splitext - Builder = SCons.Builder.Builder - - # Detect the environment - replaces ./configure implicitely and store the options into a cache - from SCons.Options import Options - cachefile=env['CACHEDIR']+'kde.cache.py' - opts = Options(cachefile) - opts.AddOptions( - ('PREFIX', 'root of the program installation'), - - ('QTDIR', 'root of qt directory'), - ('QTLIBPATH', 'path to the qt libraries'), - ('QTINCLUDEPATH', 'path to the qt includes'), - ('QT_UIC', 'moc directory'), - ('QT_MOC', 'moc executable command'), - ('QTPLUGINS', 'uic executable command'), - ('TDEDIR', 'root of kde directory'), - ('KDELIBPATH', 'path to the kde libs'), - ('KDEINCLUDEPATH', 'path to the kde includes'), - - ('KDEBIN', 'installation path of the kde binaries'), - ('KDEMODULE', 'installation path of the parts and libs'), - ('KDEAPPS', ''), - ('KDEDATA', 'installation path of the application data'), - ('KDELOCALE', ''), - ('KDEDOC', 'installation path of the application documentation'), - ('KDEKCFG', 'installation path of the .kcfg files'), - ('KDEXDG', 'installation path of the service types'), - ('KDEXDGDIR', 'installation path of the xdg service directories'), - ('KDEMENU', ''), - ('KDEMIME', 'installation path of to the mimetypes'), - ('KDEICONS', ''), - ('KDESERV', ''), - ) - opts.Update(env) - - # reconfigure when things are missing - if not env['HELP'] and (env['_CONFIGURE'] or not env.has_key('QTDIR') or not env.has_key('TDEDIR')): - detect_kde(env) - - # finally save the configuration to the cache file - opts.Save(cachefile, env) - - ## set default variables, one can override them in sconscript files - env.Append(CXXFLAGS = ['-I'+env['KDEINCLUDEPATH'], '-I'+env['QTINCLUDEPATH'] ]) - env.Append(LIBPATH = [env['KDELIBPATH'], env['QTLIBPATH'] ]) - - env['STATIC_AND_SHARED_OBJECTS_ARE_THE_SAME'] = 1 - - env['QT_AUTOSCAN'] = 1 - env['QT_DEBUG'] = 0 - env['QT_UIC_HFLAGS'] = '-L $QTPLUGINS -nounload' - env['QT_UIC_CFLAGS'] = '$QT_UIC_HFLAGS -tr tr2i18n' - env['QT_LIBS'] = 'qt-mt' - env['QT_UICIMPLPREFIX'] = '' - env['QT_UICIMPLSUFFIX'] = '.cpp' - - env['QT_MOCHPREFIX'] = '' - env['QT_MOCHSUFFIX'] = '.moc' - env['KDE_KCFG_IMPLPREFIX'] = '' - env['KDE_KCFG_IMPL_HSUFFIX'] = '.h' - env['KDE_KCFG_IMPL_CSUFFIX'] = '.cpp' - env['KDE_SKEL_IMPL_SUFFIX'] = '.skel' - env['MEINPROC'] = 'meinproc' - env['MSGFMT'] = 'msgfmt' - - ## ui file processing - def uic_processing(target, source, env): - inc_kde = '#include \n#include \n' - inc_moc = '#include "%s"\n' % target[2].name - comp_h = '$QT_UIC $QT_UIC_HFLAGS -o %s %s' % (target[0].path, source[0].path) - comp_c = '$QT_UIC $QT_UIC_CFLAGS -impl %s %s' % (target[0].path, source[0].path) - comp_moc = '$QT_MOC -o %s %s' % (target[2].path, target[0].path) - - ret = env.Execute(comp_h) - if ret: - return ret - - dest = open( target[1].path, "w" ) - dest.write(inc_kde) - dest.close() - - ret = env.Execute( comp_c+" >> "+target[1].path ) - if ret: - return ret - - dest = open( target[1].path, "a" ) - dest.write(inc_moc) - dest.close() - - ret = env.Execute( comp_moc ) - return ret - - def uicEmitter(target, source, env): - adjustixes = SCons.Util.adjustixes - bs = SCons.Util.splitext(str(source[0].name))[0] - bs = os.path.join(str(target[0].get_dir()),bs) - # first target is automatically added by builder (.h file) - if len(target) < 2: - # second target is .cpp file - target.append(adjustixes(bs, - env.subst('$QT_UICIMPLPREFIX'), - env.subst('$QT_UICIMPLSUFFIX'))) - if len(target) < 3: - # third target is .moc file - target.append(adjustixes(bs, - env.subst('$QT_MOCHPREFIX'), - env.subst('$QT_MOCHSUFFIX'))) - return target, source - - UIC_BUILDER = Builder( - action = uic_processing, - emitter = uicEmitter, - suffix = '.h', - src_suffix = '.ui') - - ## moc file processing - env['QT_MOCCOM'] = ('$QT_MOC -o ${TARGETS[0]} $SOURCE') - - MOC_BUILDER = Builder( - action = '$QT_MOCCOM', - suffix = '.moc', - src_suffix = '.h') - - MOCCPP_BUILDER = Builder( - action = '$QT_MOCCOM', - suffix = '_moc.cpp', - src_suffix = '.h') - - ## kcfg file processing - def kcfgGenerator(target, source, env, for_signature): - act=[] - act.append('tdeconfig_compiler -d'+str(source[0].get_dir())+' '+source[1].path+' '+source[0].path) - return act - - def kcfgEmitter(target, source, env): - adjustixes = SCons.Util.adjustixes - bs = SCons.Util.splitext(str(source[0].name))[0] - bs = os.path.join(str(target[0].get_dir()),bs) - # .h file is automatically added - if len(target) < 2: - # add .cpp file - target.append(adjustixes(bs, env.subst('$KDE_KCFG_IMPLPREFIX'), env.subst('$KDE_KCFG_IMPL_CSUFFIX'))) - - if len(source) <2: - if not os.path.isfile(str(source[0])): - print RED+'kcfg file given'+str(source[0])+' does not exist !'+NORMAL - return target, source - kfcgfilename="" - kcfgFileDeclRx = re.compile("^[fF]ile\s*=\s*(.+)\s*$") - for line in file(str(source[0]), "r").readlines(): - match = kcfgFileDeclRx.match(line.strip()) - if match: - kcfgfilename = match.group(1) - break - source.append(str(source[0].get_dir())+'/'+kcfgfilename) - return target, source - - KCFG_BUILDER = Builder( - generator = kcfgGenerator, - emitter = kcfgEmitter, - suffix = '.h', - src_suffix = '.kcfgc') - - ## dcop processing - def dcopGenerator(target, source, env, for_signature): - act=[] - act.append('dcopidl '+source[0].path+' > '+target[1].path+'|| ( rm -f '+target[1].path+' ; false)') - act.append('dcopidl2cpp --c++-suffix cpp --no-Q_SIGNALS --no-stub '+target[1].path) - return act - - def dcopEmitter(target, source, env): - bs = SCons.Util.splitext(str(source[0].name))[0] - bs = os.path.join(str(target[0].get_dir()),bs) - target.append(bs+'.kidl') - #target.append(bs+'_skel.cpp') - return target, source - - DCOP_BUILDER = Builder( - generator = dcopGenerator, - emitter = dcopEmitter, - suffix = '_skel.cpp', - src_suffix = '.h') - - ## documentation processing - MEINPROC_BUILDER = Builder( - action = '$MEINPROC --check --cache $TARGET $SOURCE', - suffix = '.cache.bz2') - - ## translation files builder - TRANSFILES_BUILDER = Builder( - action = '$MSGFMT $SOURCE -o $TARGET', - suffix = '.gmo', - src_suffix = '.po') - - ## libtool file builder - def la_file(target, source, env): - dest=open(target[0].path, 'w') - sname=source[0].name - dest.write("dlname='%s'\n" % sname) - dest.write("library_names='%s %s %s'\n" % (sname, sname, sname)) - dest.write("old_library=''\n") - dest.write("dependency_libs=''\n") - dest.write("current=0\n") - dest.write("age=0\n") - dest.write("revision=0\n") - dest.write("installed=yes\n") - dest.write("shouldnotlink=no\n") - dest.write("dlopen=''\n") - dest.write("dlpreopen=''\n") - dest.write("libdir='%s'" % env['KDEMODULE']) - dest.close() - return 0 - - LA_BUILDER = Builder( - action = la_file, - suffix = '.la', - src_suffix = env['SHLIBSUFFIX']) - - ## register the builders - env['BUILDERS']['Uic'] = UIC_BUILDER - env['BUILDERS']['Moc'] = MOC_BUILDER - env['BUILDERS']['Moccpp'] = MOCCPP_BUILDER - env['BUILDERS']['Dcop'] = DCOP_BUILDER - env['BUILDERS']['Kcfg'] = KCFG_BUILDER - env['BUILDERS']['LaFile'] = LA_BUILDER - env['BUILDERS']['Meinproc'] = MEINPROC_BUILDER - env['BUILDERS']['Transfiles']= TRANSFILES_BUILDER - - static_obj, shared_obj = SCons.Tool.createObjBuilders(env) - static_obj.src_builder.append('Uic') - shared_obj.src_builder.append('Uic') - static_obj.src_builder.append('Kcfg') - shared_obj.src_builder.append('Kcfg') - static_obj.src_builder.append('LaFile') - shared_obj.src_builder.append('LaFile') - static_obj.src_builder.append('Meinproc') - shared_obj.src_builder.append('Meinproc') - static_obj.src_builder.append('Transfiles') - shared_obj.src_builder.append('Transfiles') - - ## Find the files to moc, dcop, and link against kde and qt - env.AppendUnique(PROGEMITTER = [MetasourcesStatic], SHLIBEMITTER=[MetasourcesShared], LIBEMITTER =[MetasourcesStatic]) - - ## Handy helpers for building kde programs - ## You should not have to modify them .. - - ## return a list of things - def make_list(e): - if type(e) is types.ListType: - return e - else: - return e.split() - - #import SCons.Util - skel_ext = [".skel", ".SKEL"] - def KDEfiles(lenv, target, source): - """ Returns a list of files for scons (handles kde tricks like .skel) - It also makes custom checks against double includes like : ['file.ui', 'file.cpp'] - (file.cpp is already included because of file.ui) """ - - src=[] - ui_files=[] - kcfg_files=[] - skel_files=[] - other_files=[] - - source_=make_list(source) - - # For each file, check wether it is a dcop file or not, and create the complete list of sources - for file in source_: - bs = SCons.Util.splitext(file)[0] - ext = SCons.Util.splitext(file)[1] - if ext in skel_ext: - lenv.Dcop(bs+'.h') - src.append(bs+'_skel.cpp') - elif ext == ".moch": - lenv.Moccpp(bs+'.h') - src.append(bs+'_moc.cpp') - else: - src.append(file) - - if ext == '.ui': - ui_files.append(bs) - elif ext == '.kcfgc': - kcfg_files.append(bs) - elif ext == '.skel': - skel_files.append(bs) - else: - other_files.append(bs) - - # Now check against typical newbie errors - for file in ui_files: - for ofile in other_files: - if ofile == file: - print RED+"WARNING: You have included "+file+".ui and another file of the same prefix"+NORMAL - print "Files generated by uic (file.h, file.cpp must not be included" - for file in kcfg_files: - for ofile in other_files: - if ofile == file: - print RED+"WARNING: You have included "+file+".kcfg and another file of the same prefix"+NORMAL - print "Files generated by tdeconfig_compiler (settings.h, settings.cpp) must not be included" - return src - - - """ - In the future, these functions will contain the code that will dump the - configuration for re-use from an IDE - """ - import glob - def KDEinstall(lenv, restype, subdir, files): - if not env['_INSTALL']: - return - basedir=env['DESTDIR'] - if len(restype)>0: - if not lenv.has_key(restype): - print RED+"unknown resource type "+restype+NORMAL - else: - basedir += lenv[restype]+'/' - #print file # <- useful to trace stuff :) - install_list = env.Install(basedir+subdir+'/', files) - env.Alias('install', install_list) - return install_list - - def KDEinstallas(lenv, restype, destfile, file): - if not env['_INSTALL']: - return - basedir=env['DESTDIR'] - if len(restype)>0: - if not lenv.has_key(restype): - print RED+"unknown resource type "+restype+NORMAL - else: - basedir += lenv[restype]+'/' - install_list = env.InstallAs(basedir+destfile, file) - env.Alias('install', install_list) - return install_list - - def KDEprogram(lenv, target, source): - """ Makes a kde program - The program is installed except if one sets env['NOAUTOINSTALL'] """ - src = KDEfiles(lenv, target, source) - program_list = lenv.Program(target, src) - if not lenv.has_key('NOAUTOINSTALL'): - KDEinstall(lenv, 'KDEBIN', '', target) - return program_list - - def KDEshlib(lenv, target, source, kdelib=0, libprefix='lib'): - """ Makes a shared library for kde (.la file for klibloader) - The library is installed except if one sets env['NOAUTOINSTALL'] """ - src = KDEfiles(lenv, target, source) - lenv['LIBPREFIX']=libprefix - library_list = lenv.SharedLibrary(target, src) - lafile_list = lenv.LaFile(target, library_list) - if not lenv.has_key('NOAUTOINSTALL'): - install_dir = 'KDEMODULE' - if kdelib==1: - install_dir = 'KDELIBPATH' - KDEinstall(lenv, install_dir, '', library_list) - KDEinstall(lenv, install_dir, '', lafile_list) - return library_list - - def KDEstaticlib(lenv, target, source): - """ Makes a static library for kde - in practice you should not use static libraries - 1. they take more memory than shared ones - 2. makefile.am needed it because of limitations - (cannot handle sources in separate folders - takes extra processing) """ - src = KDEfiles(lenv, target, source) - return lenv.StaticLibrary(target, src) - # do not install static libraries by default - - def KDEaddflags_cxx(lenv, fl): - """ Compilation flags for C++ programs """ - lenv.AppendUnique(CXXFLAGS = make_list(fl)) - - def KDEaddflags_c(lenv, fl): - """ Compilation flags for C programs """ - lenv.AppendUnique(CFLAGS = make_list(fl)) - - def KDEaddflags_link(lenv, fl): - """ Add link flags - Use this if KDEaddlibs below is not enough """ - lenv.AppendUnique(LINKFLAGS = make_list(fl)) - - def KDEaddlibs(lenv, libs): - """ Helper function """ - lenv.AppendUnique(LIBS = make_list(libs)) - - def KDEaddpaths_includes(lenv, paths): - """ Add new include paths """ - lenv.AppendUnique(CPPPATH = make_list(paths)) - - def KDEaddpaths_libs(lenv, paths): - """ Add paths to libraries """ - lenv.AppendUnique(LIBPATH = make_list(paths)) - - def KDElang(lenv, folder, appname): - """ Process translations (.po files) in a po/ dir """ - transfiles = glob.glob(folder+'/*.po') - for lang in transfiles: - result = lenv.Transfiles(lang) - country = SCons.Util.splitext(result[0].name)[0] - KDEinstallas(lenv, 'KDELOCALE', country+'/LC_MESSAGES/'+appname+'.mo', result) - - def subdirs(lenv, folderlist): - flist=make_list(folderlist) - for i in flist: - lenv.SConscript(i+"/SConscript") - - def KDEicon(lenv, icname='*', path='./'): - """ Emulates the behaviour of Makefile.am to install icons - Contributed by: "Andrey Golovizin" """ - type_dic = { 'action' : 'actions', 'app' : 'apps', 'device' : - 'devices', 'filesys' : 'filesystems', 'mime' : 'mimetypes' } - dir_dic = { - 'los' :'locolor/16x16', - 'lom' :'locolor/32x32', - 'him' :'hicolor/32x32', - 'hil' :'hicolor/48x48', - 'lo16' :'locolor/16x16', - 'lo22' :'locolor/22x22', - 'lo32' :'locolor/32x32', - 'hi16' :'hicolor/16x16', - 'hi22' :'hicolor/22x22', - 'hi32' :'hicolor/32x32', - 'hi48' :'hicolor/48x48', - 'hi64' :'hicolor/64x64', - 'hi128':'hicolor/128x128', - 'hisc' :'hicolor/scalable', - 'cr16' :'crystalsvg/16x16', - 'cr22' :'crystalsvg/22x22', - 'cr32' :'crystalsvg/32x32', - 'cr48' :'crystalsvg/48x48', - 'cr64' :'crystalsvg/64x64', - 'cr128':'crystalsvg/128x128', - 'crsc' :'crystalsvg/scalable' - } - - iconfiles = [] - for ext in "png xpm mng svg svgz".split(): - files = glob.glob(path+'/'+'*-*-%s.%s' % (icname, ext)) - iconfiles += files - for iconfile in iconfiles: - lst = iconfile.split('/') - filename = lst[ len(lst) - 1 ] - tmp = filename.split('-') - if len(tmp)!=3: - print RED+'WARNING: icon filename has unknown format: '+iconfile+NORMAL - continue - [icon_dir, icon_type, icon_filename]=tmp - try: - destfile = '%s/%s/%s/%s' % (lenv['KDEICONS'], dir_dic[icon_dir], type_dic[icon_type], icon_filename) - except KeyError: - print RED+'WARNING: unknown icon type: '+iconfile+NORMAL - continue - ## Do not use KDEinstallas here, as parsing from an ide will be necessary - if env['_INSTALL']: - env.Alias('install', env.InstallAs( env['DESTDIR']+'/'+destfile, iconfile ) ) - - def KDEuse(lenv, flags): - _flags=make_list(flags) - if 'environ' in _flags: - ## The scons developers advise against using this but it is mostly innocuous :) - import os - lenv.AppendUnique( ENV = os.environ ) - if not 'lang_qt' in _flags: - ## Use this define if you are using the kde translation scheme (.po files) - lenv.Append( CPPFLAGS = '-DQT_NO_TRANSLATION' ) - if 'rpath' in _flags: - ## Use this to set rpath - this may cause trouble if folders are moved (chrpath) - lenv.Append( RPATH = [env['QTLIBPATH'], env['KDELIBPATH'], env['KDEMODULE']] ) - if 'thread' in _flags: - ## Uncomment the following if you need threading support - lenv.KDEaddflags_cxx( ['-DQT_THREAD_SUPPORT', '-D_REENTRANT'] ) - if not 'nohelp' in _flags: - if lenv['_CONFIGURE'] or lenv['HELP']: - env.Exit(0) - - ## To use kdDebug(intvalue)<<"some trace"< #include -#include "tdevcore.h" -#include "tdevversioncontrol.h" -#include "tdevplugincontroller.h" +#include "kdevcore.h" +#include "kdevversioncontrol.h" +#include "kdevplugincontroller.h" #include "domutil.h" #include "settings.h" @@ -272,7 +272,7 @@ void ImportDialog::dirChanged() // KDevelop legacy project? TQStringList files = dir.entryList("*.kdevprj"); if (!files.isEmpty()) { - scanLegacyTDevelopProject(dir.absFilePath(files.first())); + scanLegacyKDevelopProject(dir.absFilePath(files.first())); return; } @@ -328,7 +328,7 @@ void ImportDialog::dirChanged() } -void ImportDialog::scanLegacyTDevelopProject(const TQString &fileName) +void ImportDialog::scanLegacyKDevelopProject(const TQString &fileName) { kdDebug(9010) << "Scanning legacy KDevelop project file " << fileName << endl; @@ -524,7 +524,7 @@ void ImportDialog::slotFinishedCheckout( TQString destinationDir ) void ImportDialog::slotFetchModulesFromRepository() { - TDevVersionControl *vcs = m_part->versionControlByName( vcsCombo->currentText() ); + KDevVersionControl *vcs = m_part->versionControlByName( vcsCombo->currentText() ); if (!vcs) return; diff --git a/parts/appwizard/importdlg.h b/parts/appwizard/importdlg.h index af4d3859..5b334668 100644 --- a/parts/appwizard/importdlg.h +++ b/parts/appwizard/importdlg.h @@ -48,7 +48,7 @@ private slots: void slotProjectNameChanged( const TQString &_text ); private: // void scanAvailableVCS(); - void scanLegacyTDevelopProject(const TQString &fileName); + void scanLegacyKDevelopProject(const TQString &fileName); void scanLegacyStudioProject(const TQString &fileName); void scanAutomakeProject(const TQString &dirName); void setProjectType(const TQString &type); diff --git a/parts/appwizard/imports/CMakeLists.txt b/parts/appwizard/imports/CMakeLists.txt index d59750c4..e7b303c3 100644 --- a/parts/appwizard/imports/CMakeLists.txt +++ b/parts/appwizard/imports/CMakeLists.txt @@ -10,16 +10,16 @@ ################################################# install( FILES - c-auto cpp-auto fortran-auto java-auto tde gnome c cpp + c-auto cpp-auto fortran-auto java-auto kde gnome c cpp fortran python php perl java java-ant qttmake qtqmake qt4qmake ruby pascal ada - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/imports ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/imports ) install( FILES c-auto.tdevelop cpp-auto.tdevelop fortran-auto.tdevelop - java-auto.tdevelop tde.tdevelop gnome.tdevelop + java-auto.tdevelop kde.tdevelop gnome.tdevelop c.tdevelop cpp.tdevelop fortran.tdevelop python.tdevelop php.tdevelop perl.tdevelop java.tdevelop java-ant.tdevelop qttmake.tdevelop qtqmake.tdevelop qt4qmake.tdevelop ruby.tdevelop pascal.tdevelop ada.tdevelop - DESTINATION ${DATA_INSTALL_DIR}/tdevappwizard/importfiles ) + DESTINATION ${DATA_INSTALL_DIR}/kdevappwizard/importfiles ) diff --git a/parts/appwizard/imports/Makefile.am b/parts/appwizard/imports/Makefile.am index aaefd91f..c7f74dcd 100644 --- a/parts/appwizard/imports/Makefile.am +++ b/parts/appwizard/imports/Makefile.am @@ -1,7 +1,7 @@ -appwizarddatadir = ${kde_datadir}/tdevappwizard +appwizarddatadir = ${kde_datadir}/kdevappwizard importsdir = ${appwizarddatadir}/imports importfilesdir = ${appwizarddatadir}/importfiles -imports_DATA = c-auto cpp-auto fortran-auto java-auto tde gnome c cpp fortran python php perl java java-ant qttmake qtqmake qt4qmake ruby pascal ada -importfiles_DATA = c-auto.tdevelop cpp-auto.tdevelop fortran-auto.tdevelop java-auto.tdevelop tde.tdevelop gnome.tdevelop c.tdevelop cpp.tdevelop fortran.tdevelop python.tdevelop php.tdevelop perl.tdevelop java.tdevelop java-ant.tdevelop qttmake.tdevelop qtqmake.tdevelop qt4qmake.tdevelop ruby.tdevelop pascal.tdevelop ada.tdevelop +imports_DATA = c-auto cpp-auto fortran-auto java-auto kde gnome c cpp fortran python php perl java java-ant qttmake qtqmake qt4qmake ruby pascal ada +importfiles_DATA = c-auto.tdevelop cpp-auto.tdevelop fortran-auto.tdevelop java-auto.tdevelop kde.tdevelop gnome.tdevelop c.tdevelop cpp.tdevelop fortran.tdevelop python.tdevelop php.tdevelop perl.tdevelop java.tdevelop java-ant.tdevelop qttmake.tdevelop qtqmake.tdevelop qt4qmake.tdevelop ruby.tdevelop pascal.tdevelop ada.tdevelop diff --git a/parts/appwizard/imports/ada.tdevelop b/parts/appwizard/imports/ada.tdevelop index 188fbea6..cdb35b40 100644 --- a/parts/appwizard/imports/ada.tdevelop +++ b/parts/appwizard/imports/ada.tdevelop @@ -11,12 +11,12 @@ Code - + true - - + + bash bash_bugs @@ -63,11 +63,11 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/parts/appwizard/imports/c-auto.tdevelop b/parts/appwizard/imports/c-auto.tdevelop index 002e6e1d..892dd88d 100644 --- a/parts/appwizard/imports/c-auto.tdevelop +++ b/parts/appwizard/imports/c-auto.tdevelop @@ -9,7 +9,7 @@ - + debug @@ -32,13 +32,13 @@ -O0 -g3 - - + + libtool - - + + ada ada_bugs_gcc @@ -85,12 +85,12 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/parts/appwizard/imports/c.tdevelop b/parts/appwizard/imports/c.tdevelop index e578fba4..e0c06089 100644 --- a/parts/appwizard/imports/c.tdevelop +++ b/parts/appwizard/imports/c.tdevelop @@ -4,21 +4,21 @@ %{AUTHOR} %{EMAIL} %{VERSION} - TDevCustomProject + KDevCustomProject C - + - - + + - - + + ada ada_bugs_gcc @@ -65,12 +65,12 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/parts/appwizard/imports/cpp-auto.tdevelop b/parts/appwizard/imports/cpp-auto.tdevelop index 0a1b05b1..74de8db0 100644 --- a/parts/appwizard/imports/cpp-auto.tdevelop +++ b/parts/appwizard/imports/cpp-auto.tdevelop @@ -9,7 +9,7 @@ - + debug @@ -30,13 +30,13 @@ -O0 -g3 - - + + libtool - - + + ada ada_bugs_gcc @@ -81,13 +81,13 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/parts/appwizard/imports/cpp.tdevelop b/parts/appwizard/imports/cpp.tdevelop index 3eade8de..b351de38 100644 --- a/parts/appwizard/imports/cpp.tdevelop +++ b/parts/appwizard/imports/cpp.tdevelop @@ -4,21 +4,21 @@ %{AUTHOR} %{EMAIL} %{VERSION} - TDevCustomProject + KDevCustomProject C++ - + - - + + - - + + ada ada_bugs_gcc @@ -63,13 +63,13 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/parts/appwizard/imports/fortran-auto.tdevelop b/parts/appwizard/imports/fortran-auto.tdevelop index 4be630a6..8fdd5f89 100644 --- a/parts/appwizard/imports/fortran-auto.tdevelop +++ b/parts/appwizard/imports/fortran-auto.tdevelop @@ -9,7 +9,7 @@ - + ada ada_bugs_gcc @@ -57,15 +57,15 @@ KDE Libraries (Doxygen) - - + + libtool - - + + - + diff --git a/parts/appwizard/imports/fortran.tdevelop b/parts/appwizard/imports/fortran.tdevelop index e7141b4f..c852870e 100644 --- a/parts/appwizard/imports/fortran.tdevelop +++ b/parts/appwizard/imports/fortran.tdevelop @@ -4,16 +4,16 @@ %{AUTHOR} %{EMAIL} %{VERSION} - TDevCustomProject + KDevCustomProject Fortran77 - + - - + + ada ada_bugs_gcc @@ -61,15 +61,15 @@ KDE Libraries (Doxygen) - - + + - - + + - + diff --git a/parts/appwizard/imports/gnome.tdevelop b/parts/appwizard/imports/gnome.tdevelop index cad92fda..0b8c5c95 100644 --- a/parts/appwizard/imports/gnome.tdevelop +++ b/parts/appwizard/imports/gnome.tdevelop @@ -7,10 +7,10 @@ KDevAutoProject C - TDevJavaDebugger + KDevJavaDebugger - + debug @@ -31,8 +31,8 @@ -O0 -g3 - - + + @@ -40,8 +40,8 @@ - - + + ada ada_bugs_gcc @@ -85,16 +85,16 @@ KDE Libraries (Doxygen) - - + + libtool - - + + - + diff --git a/parts/appwizard/imports/java-ant.tdevelop b/parts/appwizard/imports/java-ant.tdevelop index 1d64dc64..a4db806b 100644 --- a/parts/appwizard/imports/java-ant.tdevelop +++ b/parts/appwizard/imports/java-ant.tdevelop @@ -7,15 +7,15 @@ KDevAntProject Java - TDevDebugger + KDevDebugger - + ant - - + + ada ada_bugs_gcc @@ -59,10 +59,10 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/parts/appwizard/imports/java-auto.tdevelop b/parts/appwizard/imports/java-auto.tdevelop index f5de6138..9a42ec82 100644 --- a/parts/appwizard/imports/java-auto.tdevelop +++ b/parts/appwizard/imports/java-auto.tdevelop @@ -7,10 +7,10 @@ KDevAutoProject Java - TDevDebugger + KDevDebugger - + ada ada_bugs_gcc @@ -54,10 +54,10 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/parts/appwizard/imports/java.tdevelop b/parts/appwizard/imports/java.tdevelop index f5de6138..9a42ec82 100644 --- a/parts/appwizard/imports/java.tdevelop +++ b/parts/appwizard/imports/java.tdevelop @@ -7,10 +7,10 @@ KDevAutoProject Java - TDevDebugger + KDevDebugger - + ada ada_bugs_gcc @@ -54,10 +54,10 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/parts/appwizard/imports/tde b/parts/appwizard/imports/kde similarity index 100% rename from parts/appwizard/imports/tde rename to parts/appwizard/imports/kde diff --git a/parts/appwizard/imports/kde.tdevelop b/parts/appwizard/imports/kde.tdevelop new file mode 100644 index 00000000..5bff727f --- /dev/null +++ b/parts/appwizard/imports/kde.tdevelop @@ -0,0 +1,73 @@ + + + + %{AUTHOR} + %{EMAIL} + %{VERSION} + KDevTDEAutoProject + C++ + + Qt + KDE + + + + + + + + + + + + + + ada + ada_bugs_gcc + bash + bash_bugs + clanlib + fortran_bugs_gcc + gnome1 + gnustep + gtk + gtk_bugs + haskell + haskell_bugs_ghc + java_bugs_gcc + java_bugs_sun + opengl + pascal_bugs_fp + php + php_bugs + perl + perl_bugs + python + python_bugs + ruby + ruby_bugs + sdl + stl + sw + w3c-dom-level2-html + w3c-svg + w3c-uaag10 + wxwidgets_bugs + + + qmake User Guide + + + + + libtool + + + + + + + + + + diff --git a/parts/appwizard/imports/pascal.tdevelop b/parts/appwizard/imports/pascal.tdevelop index 7db5a9d8..551ac91e 100644 --- a/parts/appwizard/imports/pascal.tdevelop +++ b/parts/appwizard/imports/pascal.tdevelop @@ -11,12 +11,12 @@ Code - + true - - + + ada ada_bugs_gcc @@ -64,12 +64,12 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/parts/appwizard/imports/perl.tdevelop b/parts/appwizard/imports/perl.tdevelop index 0b4f4fba..bbf18ee3 100644 --- a/parts/appwizard/imports/perl.tdevelop +++ b/parts/appwizard/imports/perl.tdevelop @@ -9,11 +9,11 @@ - + - - + + ada ada_bugs_gcc @@ -60,10 +60,10 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/parts/appwizard/imports/php.tdevelop b/parts/appwizard/imports/php.tdevelop index 4135828b..64651d3b 100644 --- a/parts/appwizard/imports/php.tdevelop +++ b/parts/appwizard/imports/php.tdevelop @@ -11,11 +11,11 @@ KDevdistpart - + - - + + gtk kde @@ -23,15 +23,15 @@ python perl - - + + true true false - - + + ada ada_bugs_gcc @@ -75,10 +75,10 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/parts/appwizard/imports/python.tdevelop b/parts/appwizard/imports/python.tdevelop index d85480b9..3c6ece1a 100644 --- a/parts/appwizard/imports/python.tdevelop +++ b/parts/appwizard/imports/python.tdevelop @@ -7,15 +7,15 @@ KDevScriptProject Python - TDevDebugger - TDevJavaDebugger + KDevDebugger + KDevJavaDebugger - + - - + + bash bash_bugs @@ -60,10 +60,10 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/parts/appwizard/imports/qt-auto.tdevelop b/parts/appwizard/imports/qt-auto.tdevelop index a8ac37de..b4bba39e 100644 --- a/parts/appwizard/imports/qt-auto.tdevelop +++ b/parts/appwizard/imports/qt-auto.tdevelop @@ -10,7 +10,7 @@ Qt - + @@ -18,8 +18,8 @@ - - + + gtk gnustep @@ -27,17 +27,17 @@ php perl - - + + libtool - - + + - + diff --git a/parts/appwizard/imports/qt.tdevelop b/parts/appwizard/imports/qt.tdevelop index 713510e0..6b716a7b 100644 --- a/parts/appwizard/imports/qt.tdevelop +++ b/parts/appwizard/imports/qt.tdevelop @@ -4,13 +4,13 @@ %{AUTHOR} %{EMAIL} %{VERSION} - TDevCustomProject + KDevCustomProject C++ Qt - + @@ -18,21 +18,21 @@ - - + + - - + + - - + + - + diff --git a/parts/appwizard/imports/qt4qmake.tdevelop b/parts/appwizard/imports/qt4qmake.tdevelop index e211a470..3be6c94c 100644 --- a/parts/appwizard/imports/qt4qmake.tdevelop +++ b/parts/appwizard/imports/qt4qmake.tdevelop @@ -10,15 +10,15 @@ Qt - + - - + + bash bash_bugs @@ -55,26 +55,26 @@ KDE Libraries (Doxygen) - - + + - - + + 4 true 4 ExternalDesigner - - + + - + diff --git a/parts/appwizard/imports/qtqmake.tdevelop b/parts/appwizard/imports/qtqmake.tdevelop index 8a9d6b17..2e9b089a 100644 --- a/parts/appwizard/imports/qtqmake.tdevelop +++ b/parts/appwizard/imports/qtqmake.tdevelop @@ -10,15 +10,15 @@ Qt - + - - + + bash bash_bugs @@ -55,25 +55,25 @@ KDE Libraries (Doxygen) - - + + - - + + 3 true 3 KDevEmbeddedDesigner - - + + - + diff --git a/parts/appwizard/imports/qttmake.tdevelop b/parts/appwizard/imports/qttmake.tdevelop index 015f4278..713655b6 100644 --- a/parts/appwizard/imports/qttmake.tdevelop +++ b/parts/appwizard/imports/qttmake.tdevelop @@ -10,15 +10,15 @@ Qt - + - - + + bash bash_bugs @@ -58,17 +58,17 @@ KDE Libraries (Doxygen) - - + + - - + + - + diff --git a/parts/appwizard/imports/ruby.tdevelop b/parts/appwizard/imports/ruby.tdevelop index 0a29b0a7..90dbe34a 100644 --- a/parts/appwizard/imports/ruby.tdevelop +++ b/parts/appwizard/imports/ruby.tdevelop @@ -13,22 +13,22 @@ KDevDoxygen KDevdistpart KDevVisualBoyAdvance - TDevDebugger + KDevDebugger - + src *.rb *~ - - + + - - + + bash bash_bugs @@ -73,10 +73,10 @@ KDE Libraries (Doxygen) - - + + - + diff --git a/parts/appwizard/imports/tde.tdevelop b/parts/appwizard/imports/tde.tdevelop deleted file mode 100644 index fe54fadc..00000000 --- a/parts/appwizard/imports/tde.tdevelop +++ /dev/null @@ -1,73 +0,0 @@ - - - - %{AUTHOR} - %{EMAIL} - %{VERSION} - KDevTDEAutoProject - C++ - - Qt - KDE - - - - - - - - - - - - - - ada - ada_bugs_gcc - bash - bash_bugs - clanlib - fortran_bugs_gcc - gnome1 - gnustep - gtk - gtk_bugs - haskell - haskell_bugs_ghc - java_bugs_gcc - java_bugs_sun - opengl - pascal_bugs_fp - php - php_bugs - perl - perl_bugs - python - python_bugs - ruby - ruby_bugs - sdl - stl - sw - w3c-dom-level2-html - w3c-svg - w3c-uaag10 - wxwidgets_bugs - - - qmake User Guide - - - - - libtool - - - - - - - - - - diff --git a/parts/appwizard/kdevappwizard.desktop b/parts/appwizard/kdevappwizard.desktop new file mode 100644 index 00000000..fa9dd541 --- /dev/null +++ b/parts/appwizard/kdevappwizard.desktop @@ -0,0 +1,87 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Application Wizard +Comment[br]=Skoazeller meziant +Comment[ca]=Assistent d'aplicacions +Comment[da]=Programguide +Comment[de]=Anwendungs-Assistent für TDevelop +Comment[el]=Μάγος εφαρμογής +Comment[es]=Asistente de aplicaciones +Comment[et]=Rakenduse nõustaja +Comment[eu]=Aplikazio morroia +Comment[fa]=جادوگر کاربرد +Comment[fr]=Assistant de création d'applications +Comment[ga]=Treoraí Feidhmchláir +Comment[gl]=Asistente de aplicación +Comment[hi]=अनुप्रयोग विज़ार्ड +Comment[hu]=Alkalmazásvarázsló +Comment[it]=Procedura guidata applicazione +Comment[ja]=アプリケーションウィザード +Comment[ms]=Wizard Aplikasi +Comment[nds]=Programm-Hölper +Comment[ne]=अनुप्रयोग विजार्ड +Comment[nl]=Toepassingassistent +Comment[pl]=Asystent tworzenia programu +Comment[pt]=Assistente de Aplicações +Comment[pt_BR]=Assistente de Aplicativo +Comment[ru]=Мастер создания приложений +Comment[sk]=Aplikačný sprievodca +Comment[sl]=Čarovnik za programe +Comment[sr]=Чаробњак за програме +Comment[sr@Latn]=Čarobnjak za programe +Comment[sv]=Programguide +Comment[ta]=பயன்பாட்டு வழிகாட்டி +Comment[tg]=Устои сохтани гузориш +Comment[tr]=Uygulama Sihirbazı +Comment[zh_CN]=应用程序向导 +Comment[zh_TW]=應用程式精靈 +Name=KDevAppWizard +Name[da]=TDevelop Programguide +Name[de]=Anwendungs-Assistent (TDevelop) +Name[hi]=के-डेव-एप-विज़ार्ड +Name[nds]=Programm-Hölper (TDevelop) +Name[pl]=KDevAsystentApli +Name[sk]=KDev aplikačný sprievodca +Name[sv]=TDevelop programguide +Name[zh_TW]=TDevelop 應用程式精靈 +GenericName=Application Wizard +GenericName[br]=Skoazeller meziant +GenericName[ca]=Assistent d'aplicacions +GenericName[da]=Programguide +GenericName[de]=Anwendungs-Assistent +GenericName[el]=Μάγος εφαρμογής +GenericName[es]=Asistente de aplicaciones +GenericName[et]=Rakenduse nõustaja +GenericName[eu]=Aplikazio morroia +GenericName[fa]=جادوگر کاربرد +GenericName[fr]=Assistant d'applications +GenericName[ga]=Treoraí Feidhmchláir +GenericName[gl]=Asistente de aplicación +GenericName[hi]=अनुप्रयोग विज़ार्ड +GenericName[hu]=Alkalmazásvarázsló +GenericName[it]=Procedura guidata applicazione +GenericName[ja]=アプリケーションウィザード +GenericName[ms]=Wizard Aplikasi +GenericName[nds]=Programm-Hölper +GenericName[ne]=अनुप्रयोग विजार्ड +GenericName[nl]=Toepassingassistent +GenericName[pl]=Asystent tworzenia programu +GenericName[pt]=Assistente de Aplicações +GenericName[pt_BR]=Assistente de Aplicativo +GenericName[ru]=Мастер создания приложений +GenericName[sk]=Aplikačný sprievodca +GenericName[sl]=Čarovnik za programe +GenericName[sr]=Чаробњак за програме +GenericName[sr@Latn]=Čarobnjak za programe +GenericName[sv]=Programguide +GenericName[ta]=பயன்பாடு வழிகாட்டி +GenericName[tg]=Устои сохтани гузориш +GenericName[tr]=Uygulama Sihirbazı +GenericName[zh_CN]=应用程序向导 +GenericName[zh_TW]=應用程式精靈 +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevappwizard +X-TDevelop-Scope=Core +X-TDevelop-Version=5 +X-TDevelop-Properties=ProjectCreation diff --git a/parts/appwizard/kdevappwizard.rc b/parts/appwizard/kdevappwizard.rc new file mode 100644 index 00000000..c86e0f44 --- /dev/null +++ b/parts/appwizard/kdevappwizard.rc @@ -0,0 +1,10 @@ + + + +

    + + + + + + diff --git a/parts/appwizard/kdevfile.cpp b/parts/appwizard/kdevfile.cpp new file mode 100644 index 00000000..4edb62c7 --- /dev/null +++ b/parts/appwizard/kdevfile.cpp @@ -0,0 +1,59 @@ +/* This file is part of the KDE project + Copyright (C) 2004 Sascha Cunz + + 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 "kdevfile.h" + +static struct MimeTypeMapping +{ + const char* szMimeType; + KDevFile::CommentingStyle commentStyle; +} mimeTypeMapping[] = { +{ "text/x-c++hdr", KDevFile::CPPStyle }, +{ "text/x-c++src", KDevFile::CPPStyle }, +{ "text/x-chdr", KDevFile::CStyle }, +{ "text/x-csrc", KDevFile::CStyle }, +{ "text/adasrc", KDevFile::AdaStyle }, +{ "text/x-pascal", KDevFile::PascalStyle }, +{ "text/x-perl", KDevFile::BashStyle }, +{ "text/xml", KDevFile::XMLStyle }, +{ "text/x-xslt", KDevFile::XMLStyle }, +{ "text/x-xslfo", KDevFile::XMLStyle }, +{ "text/html", KDevFile::XMLStyle }, +{ "text/docbook", KDevFile::XMLStyle }, +{ "application/x-php", KDevFile::CPPStyle }, +{ "application/x-shellscript",KDevFile::BashStyle }, +{ NULL, KDevFile::NoCommenting } +}; + +KDevFile::CommentingStyle KDevFile::commentingStyleFromMimeType( const TQString& mimeType ) +{ + int idx = 0; + while( mimeTypeMapping[idx].szMimeType ) + { + if( mimeType == mimeTypeMapping[idx].szMimeType ) + return mimeTypeMapping[idx].commentStyle; + idx++; + } + return KDevFile::NoCommenting; +} + +KDevFile::CommentingStyle KDevFile::commentingStyleFromMimeType( KMimeType::Ptr mimeType ) +{ + return commentingStyleFromMimeType( mimeType->name() ); +} + diff --git a/parts/appwizard/kdevfile.h b/parts/appwizard/kdevfile.h new file mode 100644 index 00000000..6b2e2699 --- /dev/null +++ b/parts/appwizard/kdevfile.h @@ -0,0 +1,57 @@ +/* This file is part of the KDE project + Copyright (C) 2004 Sascha Cunz + + 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. +*/ + +/** +@file kdevfile.h +File abstraction layer. +*/ +#ifndef KDEVFILE_H +#define KDEVFILE_H + +#include + +/** +File abstraction. +*/ +class KDevFile +{ +public: + /**Styles of comment-formats a source file can have.*/ + enum CommentingStyle + { + NoCommenting, //!< file seems to be unable to contain comments + CPPStyle, //!< C Style:
    /* comment */
    + CStyle, //!< C++ Style:
    // comment
    + AdaStyle, //!< Ada Style:
    -- comment --
    + PascalStyle, //!< Pascal Style:
    {  comment  }
    + BashStyle, //!< Shell Style:
    #  comment
    + XMLStyle //!< XML Style:
    + }; + +public: + /**@return A commenting style for a given mime type. + @param mimeType A string which defines a mime type (like "text/x-c+++src").*/ + static CommentingStyle commentingStyleFromMimeType(const TQString& mimeType); + + /**@return A commenting style for a given mime type. + @param mimeType The mime type.*/ + static CommentingStyle commentingStyleFromMimeType( KMimeType::Ptr mimeType ); +}; + +#endif diff --git a/parts/appwizard/kdevlicense.cpp b/parts/appwizard/kdevlicense.cpp new file mode 100644 index 00000000..5e189422 --- /dev/null +++ b/parts/appwizard/kdevlicense.cpp @@ -0,0 +1,116 @@ +/* This file is part of the KDE project + Copyright (C) 2004 Sascha Cunz + + 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 "kdevlicense.h" + +#include +#include +#include + +KDevLicense::KDevLicense( const TQString& name, const TQString& fileName ) + : m_name( name ) +{ + readFile( fileName ); +} + +void KDevLicense::readFile( const TQString& fileName ) +{ + TQFile f(fileName); + if (!f.open(IO_ReadOnly)) + return; + TQTextStream stream(&f); + TQString str; + enum { readingText, readingFiles } mode = readingText; + for(;;) + { + str = stream.readLine(); + if( str.isNull() ) + break; + if( str == "[FILES]" ) + mode = readingFiles; + else if( str == "[PREFIX]" ) + mode = readingText; + else if( mode == readingFiles ) + { + if( !str.isEmpty() ) + { + m_copyFiles.append( str ); + } + } else + m_rawLines.append( str ); + } + +} + +TQString KDevLicense::assemble( KDevFile::CommentingStyle commentingStyle, const TQString& author, const TQString& email, int leadingSpaces ) +{ + // first, build a CPP Style license + + TQString strFill; + strFill.fill( ' ', leadingSpaces ); + + TQString str = + strFill + "/***************************************************************************\n" + + strFill + " * Copyright (C) $YEAR$ by $AUTHOR$ *\n" + + strFill + " * $EMAIL$ *\n" + + strFill + " * *\n"; + +// str = str.arg(TQDate::currentDate().year()).arg(author.left(45),-45).arg(email.left(67),-67); + + TQStringList::Iterator it; + for( it = m_rawLines.begin(); it != m_rawLines.end(); ++it ) + { + str += TQString( "%1 * %2 *\n").arg( strFill ).arg( *it, -69 ); + } + + str += strFill + " ***************************************************************************/\n"; + + switch( commentingStyle ) + { + case KDevFile::CPPStyle: + case KDevFile::CStyle: + return str; + + case KDevFile::PascalStyle: + str.replace(TQRegExp("/\\**\n \\*"), "{\n "); + str.replace(TQRegExp("\\*\n \\*"), " \n "); + str.replace(TQRegExp(" *\\**/\n"), "}\n"); + return str; + + case KDevFile::AdaStyle: + str.replace(TQRegExp("/\\*"), "--"); + str.replace(TQRegExp(" \\*"), "--"); + str.replace(TQRegExp("\\*/"), "*"); + return str; + + case KDevFile::BashStyle: + str.replace(TQRegExp("\\*|/"), "#"); + str.replace(TQRegExp("\n ##"), "\n##"); + str.replace(TQRegExp("\n #"), "\n# "); + return str; + + case KDevFile::XMLStyle: + str.replace(TQRegExp("/\\*"), "\n"); + str.replace(TQRegExp("\\*"), "_"); + return str; + } + + return "currently unknown/unsupported commenting style"; +} diff --git a/parts/appwizard/kdevlicense.h b/parts/appwizard/kdevlicense.h new file mode 100644 index 00000000..2e81c9ec --- /dev/null +++ b/parts/appwizard/kdevlicense.h @@ -0,0 +1,75 @@ +/* This file is part of the KDE project + Copyright (C) 2004 Sascha Cunz + + 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 KDEVLICENSE_H +#define KDEVLICENSE_H + +/** +@file kdevfile.h +The interface to installed licenses. +*/ + +#include + +#include "kdevfile.h" + +/*The interface to installed licenses.*/ +class KDevLicense +{ +public: + /**Constructs a KDevLicense and loads the given license template file. + @param name The name of this license. + @param fileName The file name where license template text is kept.*/ + KDevLicense(const TQString& name, const TQString& fileName); + +public: + /**Assembles the license to a string suitable for replacement of a %{LICENSE} .*/ + TQString assemble(KDevFile::CommentingStyle commentingStyle, const TQString& author, const TQString& email, int leadingSpaces ); + + /** + * returns the name of this license. + */ + TQString name() const { return m_name; } + + /** + * returns list of files tat must be present in the project's root directory + * if any source files uses this license. + */ + TQStringList copyFiles(){ return m_copyFiles; } + +private: + void readFile( const TQString& fileName ); + +private: + /** + * Name of this license + */ + TQString m_name; + /** + * Raw lines of the license. Should contain no spaces at + * the start or end of each line. + */ + TQStringList m_rawLines; + /** + * List of files that must be added to the project, if any + * file in the project uses this license. + */ + TQStringList m_copyFiles; +}; + +#endif diff --git a/parts/appwizard/profilesupport.cpp b/parts/appwizard/profilesupport.cpp index 3c5a5a35..ac5da870 100644 --- a/parts/appwizard/profilesupport.cpp +++ b/parts/appwizard/profilesupport.cpp @@ -24,9 +24,9 @@ #include #include -#include +#include -ProfileSupport::ProfileSupport(TDevPlugin *parent) +ProfileSupport::ProfileSupport(KDevPlugin *parent) { KURL::List resources = parent->pluginController()->profileResourcesRecursive("*.appwizard"); diff --git a/parts/appwizard/profilesupport.h b/parts/appwizard/profilesupport.h index 11e9b201..b18a9620 100644 --- a/parts/appwizard/profilesupport.h +++ b/parts/appwizard/profilesupport.h @@ -20,11 +20,11 @@ #ifndef PROFILESUPPORT_H #define PROFILESUPPORT_H -#include +#include class ProfileSupport{ public: - ProfileSupport(TDevPlugin *parent); + ProfileSupport(KDevPlugin *parent); bool isInTemplateList(const TQString &templateUrl); private: diff --git a/parts/appwizard/tdevappwizard.desktop b/parts/appwizard/tdevappwizard.desktop deleted file mode 100644 index bda84ba5..00000000 --- a/parts/appwizard/tdevappwizard.desktop +++ /dev/null @@ -1,87 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Application Wizard -Comment[br]=Skoazeller meziant -Comment[ca]=Assistent d'aplicacions -Comment[da]=Programguide -Comment[de]=Anwendungs-Assistent für TDevelop -Comment[el]=Μάγος εφαρμογής -Comment[es]=Asistente de aplicaciones -Comment[et]=Rakenduse nõustaja -Comment[eu]=Aplikazio morroia -Comment[fa]=جادوگر کاربرد -Comment[fr]=Assistant de création d'applications -Comment[ga]=Treoraí Feidhmchláir -Comment[gl]=Asistente de aplicación -Comment[hi]=अनुप्रयोग विज़ार्ड -Comment[hu]=Alkalmazásvarázsló -Comment[it]=Procedura guidata applicazione -Comment[ja]=アプリケーションウィザード -Comment[ms]=Wizard Aplikasi -Comment[nds]=Programm-Hölper -Comment[ne]=अनुप्रयोग विजार्ड -Comment[nl]=Toepassingassistent -Comment[pl]=Asystent tworzenia programu -Comment[pt]=Assistente de Aplicações -Comment[pt_BR]=Assistente de Aplicativo -Comment[ru]=Мастер создания приложений -Comment[sk]=Aplikačný sprievodca -Comment[sl]=Čarovnik za programe -Comment[sr]=Чаробњак за програме -Comment[sr@Latn]=Čarobnjak za programe -Comment[sv]=Programguide -Comment[ta]=பயன்பாட்டு வழிகாட்டி -Comment[tg]=Устои сохтани гузориш -Comment[tr]=Uygulama Sihirbazı -Comment[zh_CN]=应用程序向导 -Comment[zh_TW]=應用程式精靈 -Name=TDevAppWizard -Name[da]=TDevelop Programguide -Name[de]=Anwendungs-Assistent (TDevelop) -Name[hi]=के-डेव-एप-विज़ार्ड -Name[nds]=Programm-Hölper (TDevelop) -Name[pl]=KDevAsystentApli -Name[sk]=KDev aplikačný sprievodca -Name[sv]=TDevelop programguide -Name[zh_TW]=TDevelop 應用程式精靈 -GenericName=Application Wizard -GenericName[br]=Skoazeller meziant -GenericName[ca]=Assistent d'aplicacions -GenericName[da]=Programguide -GenericName[de]=Anwendungs-Assistent -GenericName[el]=Μάγος εφαρμογής -GenericName[es]=Asistente de aplicaciones -GenericName[et]=Rakenduse nõustaja -GenericName[eu]=Aplikazio morroia -GenericName[fa]=جادوگر کاربرد -GenericName[fr]=Assistant d'applications -GenericName[ga]=Treoraí Feidhmchláir -GenericName[gl]=Asistente de aplicación -GenericName[hi]=अनुप्रयोग विज़ार्ड -GenericName[hu]=Alkalmazásvarázsló -GenericName[it]=Procedura guidata applicazione -GenericName[ja]=アプリケーションウィザード -GenericName[ms]=Wizard Aplikasi -GenericName[nds]=Programm-Hölper -GenericName[ne]=अनुप्रयोग विजार्ड -GenericName[nl]=Toepassingassistent -GenericName[pl]=Asystent tworzenia programu -GenericName[pt]=Assistente de Aplicações -GenericName[pt_BR]=Assistente de Aplicativo -GenericName[ru]=Мастер создания приложений -GenericName[sk]=Aplikačný sprievodca -GenericName[sl]=Čarovnik za programe -GenericName[sr]=Чаробњак за програме -GenericName[sr@Latn]=Čarobnjak za programe -GenericName[sv]=Programguide -GenericName[ta]=பயன்பாடு வழிகாட்டி -GenericName[tg]=Устои сохтани гузориш -GenericName[tr]=Uygulama Sihirbazı -GenericName[zh_CN]=应用程序向导 -GenericName[zh_TW]=應用程式精靈 -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevappwizard -X-TDevelop-Scope=Core -X-TDevelop-Version=5 -X-TDevelop-Properties=ProjectCreation diff --git a/parts/appwizard/tdevappwizard.rc b/parts/appwizard/tdevappwizard.rc deleted file mode 100644 index 2705a29f..00000000 --- a/parts/appwizard/tdevappwizard.rc +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/parts/appwizard/tdevfile.cpp b/parts/appwizard/tdevfile.cpp deleted file mode 100644 index 4a748d47..00000000 --- a/parts/appwizard/tdevfile.cpp +++ /dev/null @@ -1,59 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Sascha Cunz - - 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 "tdevfile.h" - -static struct MimeTypeMapping -{ - const char* szMimeType; - TDevFile::CommentingStyle commentStyle; -} mimeTypeMapping[] = { -{ "text/x-c++hdr", TDevFile::CPPStyle }, -{ "text/x-c++src", TDevFile::CPPStyle }, -{ "text/x-chdr", TDevFile::CStyle }, -{ "text/x-csrc", TDevFile::CStyle }, -{ "text/adasrc", TDevFile::AdaStyle }, -{ "text/x-pascal", TDevFile::PascalStyle }, -{ "text/x-perl", TDevFile::BashStyle }, -{ "text/xml", TDevFile::XMLStyle }, -{ "text/x-xslt", TDevFile::XMLStyle }, -{ "text/x-xslfo", TDevFile::XMLStyle }, -{ "text/html", TDevFile::XMLStyle }, -{ "text/docbook", TDevFile::XMLStyle }, -{ "application/x-php", TDevFile::CPPStyle }, -{ "application/x-shellscript",TDevFile::BashStyle }, -{ NULL, TDevFile::NoCommenting } -}; - -TDevFile::CommentingStyle TDevFile::commentingStyleFromMimeType( const TQString& mimeType ) -{ - int idx = 0; - while( mimeTypeMapping[idx].szMimeType ) - { - if( mimeType == mimeTypeMapping[idx].szMimeType ) - return mimeTypeMapping[idx].commentStyle; - idx++; - } - return TDevFile::NoCommenting; -} - -TDevFile::CommentingStyle TDevFile::commentingStyleFromMimeType( KMimeType::Ptr mimeType ) -{ - return commentingStyleFromMimeType( mimeType->name() ); -} - diff --git a/parts/appwizard/tdevfile.h b/parts/appwizard/tdevfile.h deleted file mode 100644 index b1280f54..00000000 --- a/parts/appwizard/tdevfile.h +++ /dev/null @@ -1,57 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Sascha Cunz - - 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. -*/ - -/** -@file tdevfile.h -File abstraction layer. -*/ -#ifndef TDEVFILE_H -#define TDEVFILE_H - -#include - -/** -File abstraction. -*/ -class TDevFile -{ -public: - /**Styles of comment-formats a source file can have.*/ - enum CommentingStyle - { - NoCommenting, //!< file seems to be unable to contain comments - CPPStyle, //!< C Style:
    /* comment */
    - CStyle, //!< C++ Style:
    // comment
    - AdaStyle, //!< Ada Style:
    -- comment --
    - PascalStyle, //!< Pascal Style:
    {  comment  }
    - BashStyle, //!< Shell Style:
    #  comment
    - XMLStyle //!< XML Style:
    - }; - -public: - /**@return A commenting style for a given mime type. - @param mimeType A string which defines a mime type (like "text/x-c+++src").*/ - static CommentingStyle commentingStyleFromMimeType(const TQString& mimeType); - - /**@return A commenting style for a given mime type. - @param mimeType The mime type.*/ - static CommentingStyle commentingStyleFromMimeType( KMimeType::Ptr mimeType ); -}; - -#endif diff --git a/parts/appwizard/tdevlicense.cpp b/parts/appwizard/tdevlicense.cpp deleted file mode 100644 index a720c6c3..00000000 --- a/parts/appwizard/tdevlicense.cpp +++ /dev/null @@ -1,116 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Sascha Cunz - - 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 "tdevlicense.h" - -#include -#include -#include - -TDevLicense::TDevLicense( const TQString& name, const TQString& fileName ) - : m_name( name ) -{ - readFile( fileName ); -} - -void TDevLicense::readFile( const TQString& fileName ) -{ - TQFile f(fileName); - if (!f.open(IO_ReadOnly)) - return; - TQTextStream stream(&f); - TQString str; - enum { readingText, readingFiles } mode = readingText; - for(;;) - { - str = stream.readLine(); - if( str.isNull() ) - break; - if( str == "[FILES]" ) - mode = readingFiles; - else if( str == "[PREFIX]" ) - mode = readingText; - else if( mode == readingFiles ) - { - if( !str.isEmpty() ) - { - m_copyFiles.append( str ); - } - } else - m_rawLines.append( str ); - } - -} - -TQString TDevLicense::assemble( TDevFile::CommentingStyle commentingStyle, const TQString& author, const TQString& email, int leadingSpaces ) -{ - // first, build a CPP Style license - - TQString strFill; - strFill.fill( ' ', leadingSpaces ); - - TQString str = - strFill + "/***************************************************************************\n" + - strFill + " * Copyright (C) $YEAR$ by $AUTHOR$ *\n" + - strFill + " * $EMAIL$ *\n" + - strFill + " * *\n"; - -// str = str.arg(TQDate::currentDate().year()).arg(author.left(45),-45).arg(email.left(67),-67); - - TQStringList::Iterator it; - for( it = m_rawLines.begin(); it != m_rawLines.end(); ++it ) - { - str += TQString( "%1 * %2 *\n").arg( strFill ).arg( *it, -69 ); - } - - str += strFill + " ***************************************************************************/\n"; - - switch( commentingStyle ) - { - case TDevFile::CPPStyle: - case TDevFile::CStyle: - return str; - - case TDevFile::PascalStyle: - str.replace(TQRegExp("/\\**\n \\*"), "{\n "); - str.replace(TQRegExp("\\*\n \\*"), " \n "); - str.replace(TQRegExp(" *\\**/\n"), "}\n"); - return str; - - case TDevFile::AdaStyle: - str.replace(TQRegExp("/\\*"), "--"); - str.replace(TQRegExp(" \\*"), "--"); - str.replace(TQRegExp("\\*/"), "*"); - return str; - - case TDevFile::BashStyle: - str.replace(TQRegExp("\\*|/"), "#"); - str.replace(TQRegExp("\n ##"), "\n##"); - str.replace(TQRegExp("\n #"), "\n# "); - return str; - - case TDevFile::XMLStyle: - str.replace(TQRegExp("/\\*"), "\n"); - str.replace(TQRegExp("\\*"), "_"); - return str; - } - - return "currently unknown/unsupported commenting style"; -} diff --git a/parts/appwizard/tdevlicense.h b/parts/appwizard/tdevlicense.h deleted file mode 100644 index d61aebc3..00000000 --- a/parts/appwizard/tdevlicense.h +++ /dev/null @@ -1,75 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 Sascha Cunz - - 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 TDEVLICENSE_H -#define TDEVLICENSE_H - -/** -@file tdevfile.h -The interface to installed licenses. -*/ - -#include - -#include "tdevfile.h" - -/*The interface to installed licenses.*/ -class TDevLicense -{ -public: - /**Constructs a TDevLicense and loads the given license template file. - @param name The name of this license. - @param fileName The file name where license template text is kept.*/ - TDevLicense(const TQString& name, const TQString& fileName); - -public: - /**Assembles the license to a string suitable for replacement of a %{LICENSE} .*/ - TQString assemble(TDevFile::CommentingStyle commentingStyle, const TQString& author, const TQString& email, int leadingSpaces ); - - /** - * returns the name of this license. - */ - TQString name() const { return m_name; } - - /** - * returns list of files tat must be present in the project's root directory - * if any source files uses this license. - */ - TQStringList copyFiles(){ return m_copyFiles; } - -private: - void readFile( const TQString& fileName ); - -private: - /** - * Name of this license - */ - TQString m_name; - /** - * Raw lines of the license. Should contain no spaces at - * the start or end of each line. - */ - TQStringList m_rawLines; - /** - * List of files that must be added to the project, if any - * file in the project uses this license. - */ - TQStringList m_copyFiles; -}; - -#endif diff --git a/parts/astyle/CMakeLists.txt b/parts/astyle/CMakeLists.txt index aba6c00f..bac3e50a 100644 --- a/parts/astyle/CMakeLists.txt +++ b/parts/astyle/CMakeLists.txt @@ -28,13 +28,13 @@ link_directories( ##### other data ################################ -install( FILES tdevastyle.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevpart_astyle.rc DESTINATION ${DATA_INSTALL_DIR}/tdevastyle ) +install( FILES kdevastyle.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevpart_astyle.rc DESTINATION ${DATA_INSTALL_DIR}/kdevastyle ) -##### libtdevastyle (module) #################### +##### libkdevastyle (module) #################### -tde_add_kpart( libtdevastyle AUTOMOC +tde_add_kpart( libkdevastyle AUTOMOC SOURCES astyle_part.cpp astyleconfig.ui astyle_widget.cpp astyle_adaptor.cpp diff --git a/parts/astyle/Makefile.am b/parts/astyle/Makefile.am index 4247625d..739ba2b8 100644 --- a/parts/astyle/Makefile.am +++ b/parts/astyle/Makefile.am @@ -1,16 +1,16 @@ INCLUDES = -I$(top_srcdir)/lib/astyle -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevastyle.la -libtdevastyle_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevastyle_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ +kde_module_LTLIBRARIES = libkdevastyle.la +libkdevastyle_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevastyle_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ $(top_builddir)/lib/astyle/libastyle.la -libtdevastyle_la_SOURCES = astyle_part.cpp astyleconfig.ui astyle_widget.cpp astyle_adaptor.cpp +libkdevastyle_la_SOURCES = astyle_part.cpp astyleconfig.ui astyle_widget.cpp astyle_adaptor.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevastyle.desktop +service_DATA = kdevastyle.desktop -rc_DATA = tdevpart_astyle.rc -rcdir = $(kde_datadir)/tdevastyle +rc_DATA = kdevpart_astyle.rc +rcdir = $(kde_datadir)/kdevastyle diff --git a/parts/astyle/astyle_adaptor.cpp b/parts/astyle/astyle_adaptor.cpp index 6f6bed50..05fb0901 100644 --- a/parts/astyle/astyle_adaptor.cpp +++ b/parts/astyle/astyle_adaptor.cpp @@ -38,7 +38,7 @@ string ASStringIterator::nextLine() } -TDevFormatter::TDevFormatter(const TQMap& options) +KDevFormatter::KDevFormatter(const TQMap& options) { // for ( TQMap::ConstIterator iter = options.begin();iter != options.end();iter++ ) // { @@ -116,7 +116,7 @@ TDevFormatter::TDevFormatter(const TQMap& options) setSingleStatementsMode(!options["KeepStatements"].toBool()); } -TDevFormatter::TDevFormatter( AStyleWidget * widget ) +KDevFormatter::KDevFormatter( AStyleWidget * widget ) { setCStyle(); @@ -215,7 +215,7 @@ TDevFormatter::TDevFormatter( AStyleWidget * widget ) setSingleStatementsMode( !widget->Keep_Statements->isChecked() ); } -bool TDevFormatter::predefinedStyle( const TQString & style ) +bool KDevFormatter::predefinedStyle( const TQString & style ) { if (style == "ANSI") { diff --git a/parts/astyle/astyle_adaptor.h b/parts/astyle/astyle_adaptor.h index df2ab818..21398fbb 100644 --- a/parts/astyle/astyle_adaptor.h +++ b/parts/astyle/astyle_adaptor.h @@ -33,12 +33,12 @@ private: class AStyleWidget; -class TDevFormatter : public astyle::ASFormatter +class KDevFormatter : public astyle::ASFormatter { public: - TDevFormatter(const TQMap& options); - TDevFormatter( AStyleWidget * widget ); + KDevFormatter(const TQMap& options); + KDevFormatter( AStyleWidget * widget ); TQString indentString() const { return m_indentString; diff --git a/parts/astyle/astyle_part.cpp b/parts/astyle/astyle_part.cpp index 57d032c8..16d590ab 100644 --- a/parts/astyle/astyle_part.cpp +++ b/parts/astyle/astyle_part.cpp @@ -7,7 +7,7 @@ #include #include #include -#include +#include #include #include #include @@ -17,10 +17,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -33,22 +33,22 @@ #include "astyle_widget.h" #include "astyle_adaptor.h" -static const TDevPluginInfo data("tdevastyle"); +static const KDevPluginInfo data("kdevastyle"); namespace { const char* defaultFormatExtensions = "*.cpp *.h *.hpp,*.c *.h,*.cxx *.hxx,*.c++ *.h++,*.cc *.hh,*.C *.H,*.diff ,*.inl,*.java,*.moc,*.patch,*.tlh,*.xpm"; } -typedef TDevGenericFactory AStyleFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevastyle, AStyleFactory( data ) ) +typedef KDevGenericFactory AStyleFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevastyle, AStyleFactory( data ) ) AStylePart::AStylePart(TQObject *parent, const char *name, const TQStringList &) : KDevSourceFormatter(&data, parent, name ? name : "AStylePart") { setInstance(AStyleFactory::instance()); - setXMLFile("tdevpart_astyle.rc"); + setXMLFile("kdevpart_astyle.rc"); formatTextAction = new TDEAction(i18n("&Reformat Source"), 0, this, TQT_SLOT(beautifySource()), actionCollection(), "edit_astyle"); formatTextAction->setEnabled(false); @@ -161,7 +161,7 @@ void AStylePart::beautifySource() //if there is a selection, we only format it. ASStringIterator is(has_selection ? sel_iface->selection() : iface->text()); - TDevFormatter formatter(m_project); + KDevFormatter formatter(m_project); formatter.init(&is); @@ -346,7 +346,7 @@ void AStylePart::activePartChanged ( KParts::Part *part ) TQString AStylePart::formatSource( const TQString text, AStyleWidget * widget, const TQMap& options ) { ASStringIterator is(text); - TDevFormatter * formatter = ( widget)? new TDevFormatter( widget ) : new TDevFormatter(options); + KDevFormatter * formatter = ( widget)? new KDevFormatter( widget ) : new KDevFormatter(options); formatter->init(&is); @@ -390,7 +390,7 @@ TQString AStylePart::formatSource( const TQString text ) TQString AStylePart::indentString( ) const { - TDevFormatter formatter(m_project); + KDevFormatter formatter(m_project); return formatter.indentString(); } diff --git a/parts/astyle/astyle_part.h b/parts/astyle/astyle_part.h index 675bada5..61b5a382 100644 --- a/parts/astyle/astyle_part.h +++ b/parts/astyle/astyle_part.h @@ -3,14 +3,14 @@ */ -#ifndef __TDEVPART_ASTYLE_H__ -#define __TDEVPART_ASTYLE_H__ +#ifndef __KDEVPART_ASTYLE_H__ +#define __KDEVPART_ASTYLE_H__ class KDialogBase; -#include +#include #include #include -#include +#include #include #include #include diff --git a/parts/astyle/astyle_widget.cpp b/parts/astyle/astyle_widget.cpp index bcb810e5..a70c6771 100644 --- a/parts/astyle/astyle_widget.cpp +++ b/parts/astyle/astyle_widget.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include AStyleWidget::AStyleWidget(AStylePart * part, bool global, TQWidget *parent, const char *name) diff --git a/parts/astyle/astyle_widget.h b/parts/astyle/astyle_widget.h index 89b3f2cd..91963e54 100644 --- a/parts/astyle/astyle_widget.h +++ b/parts/astyle/astyle_widget.h @@ -4,7 +4,7 @@ #include "astyleconfig.h" class AStylePart; -class TDevPart; +class KDevPart; class AStyleWidget : public AStyleConfig diff --git a/parts/astyle/kdevastyle.desktop b/parts/astyle/kdevastyle.desktop new file mode 100644 index 00000000..ceeaabfc --- /dev/null +++ b/parts/astyle/kdevastyle.desktop @@ -0,0 +1,82 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=A plugin for formatting of sourcecode according to a specified set of rules. When loaded it is found in the Tools menu. +Comment[ca]=Un connector per a donar format al codi font d'acord a una sèrie de regles especificades. Quan està carregat apareixerà en el menú Eines. +Comment[da]=Et plugin til at formatere kildekode ifølge et angivet sæt regler. Når det er indlæst er det i værktøjsmenuen. +Comment[de]=Ein Modul zur Formatierung der Quelltexte nach vorgegebenen Regeln. Ist das Modul geladen, kann es über das Menü "Werkzeuge" aufgerufen werden. +Comment[el]=Ένα πρόσθετο για τη μορφοποίηση του πηγαίου κώδικα σύμφωνα με το ορισμένο σύνολο κανόνων. Όταν φορτωθεί μπορεί να βρεθεί στο μενού εργαλείων. +Comment[es]=Un complemento para dar formato al código fuente de acuerdo una serie de reglas especificadas. Cuando está cargado, aparece en el menú Herramientas. +Comment[et]=Plugin lähtekoodi vormindamiseks vastavalt konkreetsetele reeglitele. Kasutamisel leiab selle tööriistade menüüst. +Comment[eu]=Iturburu kodea emandako arau sorten arabera formateatuko da. Kargatzean Tresnak menuan aurkituko duzu. +Comment[fa]=وصله‌ای برای قالب‌بندی کد منبع طبق یک سری قوانین مشخص‌شده. در هنگام بارگذاری در گزینگان ابزار یافت می‌شود. +Comment[fr]=Un module externe pour le formatage du code source selon un ensemble de règles spécifié. Lorsqu'il est chargé, ce module externe se trouve dans le menu « Outils ». +Comment[gl]=Unha extensión para formatear código seguindo un conxunto de regras. Cando se carga atópase no menú Ferramentas. +Comment[hu]=Bővítőmodul forráskód formázásához, megadott szabályok alapján. Az Eszközök menüből érhető el, ha be van töltve. +Comment[it]=Un plugin per formattare il codice sorgente secondo uno specifico insieme di regole. Quando sarà caricato lo troverai nel menu Strumenti. +Comment[ja]=指定された規則にソースコードを書式化するためのプラグイン。読み込まれるとツールメニューで見つかります。 +Comment[ms]=Plugin untuk memformat kod sumber mengikut set peraturan yang ditetapkan. Apabila dimuatkan ia berada di menu Alatan. +Comment[nds]=En Moduul för't Borntextformateren na angeven Regeln. Wenn dat Moduul laadt is, lett sik dat binnen dat Warktüüchmenü finnen. +Comment[ne]=नियमको निर्दिष्ट सेट अनुसार स्रोतसङ्केतको ढाँचाबद्धताका लागि प्लगइन । लोड भएपछि यो उपकरण मेनुमा फेला पार्न सकिन्छ । +Comment[nl]=Een plugin om broncode te formatteren volgens een speciale set regels. Te vinden onder het menu Gereedschap. +Comment[pl]=Wtyczka do formatowania kodu źródłowego zgodnie z podanymi zasadami. Po wczytaniu pojawia się w menu Narzędzia. +Comment[pt]=Um 'plugin' para a formatação do código-fonte de acordo com um conjunto específico de regras. Quando é carregado, encontrar-se-á no menu Ferramentas. +Comment[pt_BR]=Um plug-in para formatação do código fonte de acordo com um conjunto específico de regras. Quando carregado é encontrado no menu Ferramentas. +Comment[ru]=Модуль для форматирования кода по установленным правилам. +Comment[sk]=Modul pre formátovanie zdrojového kódu podľa špecifických pravidiel.Po načítaní ho nájdete v menu Nástroje. +Comment[sr]=Прикључак за форматирање изворног кôда према прецизираном скупу правила. Када је учитан, налази се у менију „Алати“. +Comment[sr@Latn]=Priključak za formatiranje izvornog kôda prema preciziranom skupu pravila. Kada je učitan, nalazi se u meniju „Alati“. +Comment[sv]=Ett insticksprogram för att formatera källkod enligt en given uppsättning regler. När det laddats finns det i verktygsmenyn. +Comment[ta]=மூல குறிமுறை வடிவத்தை மாற்றும் சொருகிக்கு சில குறிப்பிட்ட விதிமுறைகள் உள்ளது. ஏற்றியபின் இதனை கருவிப்பட்டியில் காணலாம். +Comment[tg]=Модул барои қолабгузории код аз рӯи қонунҳои гузошта шуда. +Comment[tr]=Belli kurallara göre kaynak kodu biçimlendirmeye yarayan bir eklenti. Yüklendiğinde Araçlar menüsünde bulunabilir. +Comment[zh_CN]=一个按照指定规则格式化源代码的插件。启动后显示在工具菜单。 +Comment[zh_TW]=一個根據特定規則將程式源碼格式化的外掛程式。載入後可以在工具選單中找到。 +Name=KDevAStyle +Name[da]=TDevelop en stil +Name[de]=Artistic-Style-Unterstützung (TDevelop) +Name[hi]=के-डेव-ए-स्टाइल +Name[nds]=Kodestil-Ünnerstütten för TDevelop +Name[pl]=KDevStylA +Name[sk]=KDev štýl +Name[sv]=TDevelop A-stil +Name[zh_TW]=TDevelop AStyle +GenericName=Source Code Formatter +GenericName[ca]=Formatador de codi font +GenericName[da]=Kildekode-formatering +GenericName[de]=Quelltext-Formatierer +GenericName[el]=Μορφοποιητής πηγαίου κώδικα +GenericName[es]=Formateador de código fuente +GenericName[et]=Lähtekoodi vormindaja +GenericName[eu]=Iturburu kode formateatzailea +GenericName[fa]=قالب‌دهندۀ کد منبع +GenericName[fr]=Formatage de code source +GenericName[gl]=Formateador de código +GenericName[hi]=स्रोत कोड फ़ॉर्मेटर +GenericName[hu]=Forráskód-formázó +GenericName[it]=Formattatore del codice sorgente +GenericName[ja]=ソースコードフォーマッタ +GenericName[ms]=Pemformat Kod Sumber +GenericName[nds]=Borntext-Formateren +GenericName[ne]=स्रोत सङ्केत ढाँचाबद्धक +GenericName[nl]=Broncode formatteren +GenericName[pl]=Formatowanie kodu źródłowego +GenericName[pt]=Formatador de Código Fonte +GenericName[pt_BR]=Formatador de Código Fonte +GenericName[ru]=Форматирование исходного кода +GenericName[sk]=Formátovač zdrojového kódu +GenericName[sl]=Oblikovalec izvorne kode +GenericName[sr]=Форматер изворног кода +GenericName[sr@Latn]=Formater izvornog koda +GenericName[sv]=Källkodsformatering +GenericName[ta]=மூல குறியை வடிவமைப்பவர் +GenericName[tg]=Қолабгузори коди берунӣ +GenericName[tr]=Kaynak Kodu Biçimlendirici +GenericName[zh_CN]=源代码格式化 +GenericName[zh_TW]=程式源碼格式器 +Icon=tdevelop +ServiceTypes=TDevelop/SourceFormatter +X-TDE-Library=libkdevastyle +X-TDevelop-Version=5 +X-TDevelop-Scope=Project +X-TDevelop-Properties=CDevelopment,CPPDevelopment,JavaDevelopment diff --git a/parts/astyle/tdevpart_astyle.rc b/parts/astyle/kdevpart_astyle.rc similarity index 100% rename from parts/astyle/tdevpart_astyle.rc rename to parts/astyle/kdevpart_astyle.rc diff --git a/parts/astyle/tdevastyle.desktop b/parts/astyle/tdevastyle.desktop deleted file mode 100644 index b77c4745..00000000 --- a/parts/astyle/tdevastyle.desktop +++ /dev/null @@ -1,82 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=A plugin for formatting of sourcecode according to a specified set of rules. When loaded it is found in the Tools menu. -Comment[ca]=Un connector per a donar format al codi font d'acord a una sèrie de regles especificades. Quan està carregat apareixerà en el menú Eines. -Comment[da]=Et plugin til at formatere kildekode ifølge et angivet sæt regler. Når det er indlæst er det i værktøjsmenuen. -Comment[de]=Ein Modul zur Formatierung der Quelltexte nach vorgegebenen Regeln. Ist das Modul geladen, kann es über das Menü "Werkzeuge" aufgerufen werden. -Comment[el]=Ένα πρόσθετο για τη μορφοποίηση του πηγαίου κώδικα σύμφωνα με το ορισμένο σύνολο κανόνων. Όταν φορτωθεί μπορεί να βρεθεί στο μενού εργαλείων. -Comment[es]=Un complemento para dar formato al código fuente de acuerdo una serie de reglas especificadas. Cuando está cargado, aparece en el menú Herramientas. -Comment[et]=Plugin lähtekoodi vormindamiseks vastavalt konkreetsetele reeglitele. Kasutamisel leiab selle tööriistade menüüst. -Comment[eu]=Iturburu kodea emandako arau sorten arabera formateatuko da. Kargatzean Tresnak menuan aurkituko duzu. -Comment[fa]=وصله‌ای برای قالب‌بندی کد منبع طبق یک سری قوانین مشخص‌شده. در هنگام بارگذاری در گزینگان ابزار یافت می‌شود. -Comment[fr]=Un module externe pour le formatage du code source selon un ensemble de règles spécifié. Lorsqu'il est chargé, ce module externe se trouve dans le menu « Outils ». -Comment[gl]=Unha extensión para formatear código seguindo un conxunto de regras. Cando se carga atópase no menú Ferramentas. -Comment[hu]=Bővítőmodul forráskód formázásához, megadott szabályok alapján. Az Eszközök menüből érhető el, ha be van töltve. -Comment[it]=Un plugin per formattare il codice sorgente secondo uno specifico insieme di regole. Quando sarà caricato lo troverai nel menu Strumenti. -Comment[ja]=指定された規則にソースコードを書式化するためのプラグイン。読み込まれるとツールメニューで見つかります。 -Comment[ms]=Plugin untuk memformat kod sumber mengikut set peraturan yang ditetapkan. Apabila dimuatkan ia berada di menu Alatan. -Comment[nds]=En Moduul för't Borntextformateren na angeven Regeln. Wenn dat Moduul laadt is, lett sik dat binnen dat Warktüüchmenü finnen. -Comment[ne]=नियमको निर्दिष्ट सेट अनुसार स्रोतसङ्केतको ढाँचाबद्धताका लागि प्लगइन । लोड भएपछि यो उपकरण मेनुमा फेला पार्न सकिन्छ । -Comment[nl]=Een plugin om broncode te formatteren volgens een speciale set regels. Te vinden onder het menu Gereedschap. -Comment[pl]=Wtyczka do formatowania kodu źródłowego zgodnie z podanymi zasadami. Po wczytaniu pojawia się w menu Narzędzia. -Comment[pt]=Um 'plugin' para a formatação do código-fonte de acordo com um conjunto específico de regras. Quando é carregado, encontrar-se-á no menu Ferramentas. -Comment[pt_BR]=Um plug-in para formatação do código fonte de acordo com um conjunto específico de regras. Quando carregado é encontrado no menu Ferramentas. -Comment[ru]=Модуль для форматирования кода по установленным правилам. -Comment[sk]=Modul pre formátovanie zdrojového kódu podľa špecifických pravidiel.Po načítaní ho nájdete v menu Nástroje. -Comment[sr]=Прикључак за форматирање изворног кôда према прецизираном скупу правила. Када је учитан, налази се у менију „Алати“. -Comment[sr@Latn]=Priključak za formatiranje izvornog kôda prema preciziranom skupu pravila. Kada je učitan, nalazi se u meniju „Alati“. -Comment[sv]=Ett insticksprogram för att formatera källkod enligt en given uppsättning regler. När det laddats finns det i verktygsmenyn. -Comment[ta]=மூல குறிமுறை வடிவத்தை மாற்றும் சொருகிக்கு சில குறிப்பிட்ட விதிமுறைகள் உள்ளது. ஏற்றியபின் இதனை கருவிப்பட்டியில் காணலாம். -Comment[tg]=Модул барои қолабгузории код аз рӯи қонунҳои гузошта шуда. -Comment[tr]=Belli kurallara göre kaynak kodu biçimlendirmeye yarayan bir eklenti. Yüklendiğinde Araçlar menüsünde bulunabilir. -Comment[zh_CN]=一个按照指定规则格式化源代码的插件。启动后显示在工具菜单。 -Comment[zh_TW]=一個根據特定規則將程式源碼格式化的外掛程式。載入後可以在工具選單中找到。 -Name=KDevAStyle -Name[da]=TDevelop en stil -Name[de]=Artistic-Style-Unterstützung (TDevelop) -Name[hi]=के-डेव-ए-स्टाइल -Name[nds]=Kodestil-Ünnerstütten för TDevelop -Name[pl]=KDevStylA -Name[sk]=KDev štýl -Name[sv]=TDevelop A-stil -Name[zh_TW]=TDevelop AStyle -GenericName=Source Code Formatter -GenericName[ca]=Formatador de codi font -GenericName[da]=Kildekode-formatering -GenericName[de]=Quelltext-Formatierer -GenericName[el]=Μορφοποιητής πηγαίου κώδικα -GenericName[es]=Formateador de código fuente -GenericName[et]=Lähtekoodi vormindaja -GenericName[eu]=Iturburu kode formateatzailea -GenericName[fa]=قالب‌دهندۀ کد منبع -GenericName[fr]=Formatage de code source -GenericName[gl]=Formateador de código -GenericName[hi]=स्रोत कोड फ़ॉर्मेटर -GenericName[hu]=Forráskód-formázó -GenericName[it]=Formattatore del codice sorgente -GenericName[ja]=ソースコードフォーマッタ -GenericName[ms]=Pemformat Kod Sumber -GenericName[nds]=Borntext-Formateren -GenericName[ne]=स्रोत सङ्केत ढाँचाबद्धक -GenericName[nl]=Broncode formatteren -GenericName[pl]=Formatowanie kodu źródłowego -GenericName[pt]=Formatador de Código Fonte -GenericName[pt_BR]=Formatador de Código Fonte -GenericName[ru]=Форматирование исходного кода -GenericName[sk]=Formátovač zdrojového kódu -GenericName[sl]=Oblikovalec izvorne kode -GenericName[sr]=Форматер изворног кода -GenericName[sr@Latn]=Formater izvornog koda -GenericName[sv]=Källkodsformatering -GenericName[ta]=மூல குறியை வடிவமைப்பவர் -GenericName[tg]=Қолабгузори коди берунӣ -GenericName[tr]=Kaynak Kodu Biçimlendirici -GenericName[zh_CN]=源代码格式化 -GenericName[zh_TW]=程式源碼格式器 -Icon=tdevelop -ServiceTypes=TDevelop/SourceFormatter -X-TDE-Library=libtdevastyle -X-TDevelop-Version=5 -X-TDevelop-Scope=Project -X-TDevelop-Properties=CDevelopment,CPPDevelopment,JavaDevelopment diff --git a/parts/bookmarks/CMakeLists.txt b/parts/bookmarks/CMakeLists.txt index 98022378..0422965c 100644 --- a/parts/bookmarks/CMakeLists.txt +++ b/parts/bookmarks/CMakeLists.txt @@ -26,12 +26,12 @@ link_directories( ##### other data ################################ -install( FILES tdevbookmarks.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevbookmarks.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevbookmarks (module) ################# +##### libkdevbookmarks (module) ################# -tde_add_kpart( libtdevbookmarks AUTOMOC +tde_add_kpart( libkdevbookmarks AUTOMOC SOURCES bookmarks_part.cpp bookmarks_widget.cpp bookmarks_settings_base.ui bookmarks_settings.cpp bookmarks_config.cpp diff --git a/parts/bookmarks/Makefile.am b/parts/bookmarks/Makefile.am index 6f2e6b8d..2ac7b233 100644 --- a/parts/bookmarks/Makefile.am +++ b/parts/bookmarks/Makefile.am @@ -1,14 +1,14 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevbookmarks.la -libtdevbookmarks_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevbookmarks_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevbookmarks.la +libkdevbookmarks_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevbookmarks_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevbookmarks_la_SOURCES = bookmarks_part.cpp bookmarks_widget.cpp bookmarks_settings_base.ui bookmarks_settings.cpp bookmarks_config.cpp +libkdevbookmarks_la_SOURCES = bookmarks_part.cpp bookmarks_widget.cpp bookmarks_settings_base.ui bookmarks_settings.cpp bookmarks_config.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevbookmarks.desktop +service_DATA = kdevbookmarks.desktop noinst_HEADERS = bookmarks_settings.h bookmarks_config.h diff --git a/parts/bookmarks/bookmarks_part.cpp b/parts/bookmarks/bookmarks_part.cpp index 50672642..f7ac78cb 100644 --- a/parts/bookmarks/bookmarks_part.cpp +++ b/parts/bookmarks/bookmarks_part.cpp @@ -18,16 +18,16 @@ #include #include #include -#include +#include #include #include #include #include #include -#include -#include -#include +#include +#include +#include #include "domutil.h" #include "bookmarks_widget.h" @@ -36,16 +36,16 @@ #include "bookmarks_config.h" #include -#include +#include #define BOOKMARKSETTINGSPAGE 1 -typedef TDevGenericFactory BookmarksFactory; -static const TDevPluginInfo data("tdevbookmarks"); -K_EXPORT_COMPONENT_FACTORY( libtdevbookmarks, BookmarksFactory( data ) ) +typedef KDevGenericFactory BookmarksFactory; +static const KDevPluginInfo data("kdevbookmarks"); +K_EXPORT_COMPONENT_FACTORY( libkdevbookmarks, BookmarksFactory( data ) ) BookmarksPart::BookmarksPart(TQObject *parent, const char *name, const TQStringList& ) - : TDevPlugin(&data, parent, name ? name : "BookmarksPart" ) + : KDevPlugin(&data, parent, name ? name : "BookmarksPart" ) { setInstance(BookmarksFactory::instance()); diff --git a/parts/bookmarks/bookmarks_part.h b/parts/bookmarks/bookmarks_part.h index b8015f54..f51603d7 100644 --- a/parts/bookmarks/bookmarks_part.h +++ b/parts/bookmarks/bookmarks_part.h @@ -10,8 +10,8 @@ ***************************************************************************/ -#ifndef __TDEVPART_BOOKMARKS_H__ -#define __TDEVPART_BOOKMARKS_H__ +#ifndef __KDEVPART_BOOKMARKS_H__ +#define __KDEVPART_BOOKMARKS_H__ #include @@ -22,7 +22,7 @@ #include #include -#include +#include class TQTimer; class KDialogBase; @@ -38,7 +38,7 @@ struct EditorData class BookmarksWidget; class TQDomElement; -class BookmarksPart : public TDevPlugin +class BookmarksPart : public KDevPlugin { Q_OBJECT @@ -48,7 +48,7 @@ public: BookmarksPart(TQObject *parent, const char *name, const TQStringList &); ~BookmarksPart(); - // reimplemented from TDevPlugin + // reimplemented from KDevPlugin void restorePartialProjectSession( const TQDomElement * el ); void savePartialProjectSession( TQDomElement * el ); diff --git a/parts/bookmarks/bookmarks_widget.cpp b/parts/bookmarks/bookmarks_widget.cpp index dbf892fe..cc7316c8 100644 --- a/parts/bookmarks/bookmarks_widget.cpp +++ b/parts/bookmarks/bookmarks_widget.cpp @@ -23,8 +23,8 @@ #include #include -#include -#include +#include +#include #include "bookmarks_part.h" diff --git a/parts/bookmarks/kdevbookmarks.desktop b/parts/bookmarks/kdevbookmarks.desktop new file mode 100644 index 00000000..3cbdb233 --- /dev/null +++ b/parts/bookmarks/kdevbookmarks.desktop @@ -0,0 +1,85 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Plugin that provides navigation and overview of active source bookmarks and persists them between sessions. +Comment[ca]=Connector que proporciona navegació i visió de conjunt dels marcadors actius en el codi font i els manté entre sessions. +Comment[da]=Plugin der sørger for navigation og overblik for aktive kilde-bogmærker og lader dem overleve mellem sessioner. +Comment[de]=Ein Modul, das die Navigation in und die Übersicht über Quelltext-Lesezeichen ermöglicht und diese zwischen den Arbeitssitzungen speichert. +Comment[el]=Πρόσθετο που προσφέρει πλοήγηση και περίληψη των ενεργών σελιδοδεικτών στον κώδικα καθώς και τη διατήρηση αυτών μεταξύ των συνεδριών. +Comment[es]=Complemento que proporciona navegación de marcadores del código activos y los mantiene entre sesiones. +Comment[et]=Plugin, mis võimaldab näha ja liikuda aktiivse koodi järjehoidjate vahel ning peab need seansside vahel meeles. +Comment[eu]=Iturburu laster-marka aktiboen arakatze eta ikuspegi orokorra eskeintzen duen plugina da eta hauek sesioen artean mantentzen ditu. +Comment[fa]=وصله‌ای که ناوش و خلاصۀ چوب الفهای فعال منبع را فراهم می‌کند و آنها را در بین نشستها می‌گذارد +Comment[fr]=Module externe qui fournit une navigation et une vue d'ensemble des signets du source actif, et les maintient persistants entre les sessions. +Comment[gl]=Extensión que proporciona navegación e vista xeral de marcadores activos no código e que se encarga de mantelos entre sesións. +Comment[hu]=Bővítőmodul a forrásfájlok könyvjelzőinek áttekintéséhez, eltárolásához +Comment[it]=Plugin che offre la navigazione e l'anteprima dei segnalibri nel codice attivo e rimane nelle varie sessioni. +Comment[ja]=セッション間でアクティブなソースのブックマークや主張の外観やナビゲーションを提供するプラグイン。 +Comment[ms]=Plugin yang menyediakan pengemudian dan pandangan umum bagi tandalaman sumber aktif dan mengekalkan mereka antara sesi. +Comment[nds]=En Moduul, wat dat Stüern twischen un de Översicht över Borntext-Leestekens praatstellt, un disse över Törns wohrt. +Comment[ne]=प्लगइनले सक्रिय स्रोत पुस्तकचिनोको नेभिगेसन र समिक्षा प्रदान गर्दछ र सत्रहरू बिच तिनीहरूलाई राख्दछ । +Comment[nl]=Plugin die bladwijzers biedt die ook blijven bestaan tussen opeenvolgende sessies. +Comment[pl]=Wtyczka umożliwiająca nawigację i uzyskiwanie informacji na temat aktywnych zakładek w kodzie oraz przenoszenie ich między sesjami. +Comment[pt]=Um 'plugin' que oferece uma navegação e uma vista geral sobre os favoritos de código activos, mantendo-os persistentes entre sessões. +Comment[pt_BR]=Plug-in que fornece navegação e uma visão geral dos marcadores de código ativos e persiste entre sessões. +Comment[ru]=Модуль, который обеспечивает навигацию и просмотр активных закладок в коде, а также их сохранение в проекте. +Comment[sk]=Modul proskytuje navigáciu a prehľad aktívnych zdrojových záložiek a ich pretrvanie medzi sedeniami. +Comment[sr]=Прикључак који обезбеђује навигацију и преглед активних маркера изворног кôда и одржава их између сесија. +Comment[sr@Latn]=Priključak koji obezbeđuje navigaciju i pregled aktivnih markera izvornog kôda i održava ih između sesija. +Comment[sv]=Insticksprogram som tillhandahåller navigering och översikt över aktiva källkodsbokmärken och gör dem bestående mellan sessioner. +Comment[ta]=நடப்பில் உள்ள புத்தக குறியீடு மூலத்திற்கு மேற்பார்வை மற்றும் வழிசெலுத்தும் வசதிகளை சொருகி உங்களுக்கு தரும் மற்றும் அமர்வுக்கு இடையே இதனை பரிசோதிக்கும். +Comment[tg]=Модуле, ки навигатсия ва намоиши поягузории фаъолро дар код таъмин месозад, ва боз барои нигоҳ доштан дар лоиҳа ҳам. +Comment[tr]=Etkin kaynak yerimlerinin dolaşımını, gözden geçirilmesini ve oturumlar arasında devamlılığını sağlayan bir eklenti. +Comment[zh_CN]=提供当前源文件书签的浏览、预览和保存的插件。 +Comment[zh_TW]=提供目前程式碼書籤的導覽與概觀,並保持在工作階段間。 +Name=KDevBookmarks +Name[da]=TDevelop bogmærker +Name[de]=Lesezeichen-Unterstützung (TDevelop) +Name[hi]=के-डेव-बुकमार्क्स +Name[nds]=Leestekens-Ünnerstütten (TDevelop) +Name[pl]=KDevZakładki +Name[sk]=KDev záložky +Name[sv]=TDevelop bokmärken +Name[zh_TW]=TDevelop 書籤 +GenericName=Bookmarks +GenericName[br]=Sinedoù +GenericName[ca]=Marcadors +GenericName[cy]=Tudnodau +GenericName[da]=Bogmærker +GenericName[de]=Unterstützung für Lesezeichen +GenericName[el]=Σελιδοδείκτες +GenericName[es]=Marcadores +GenericName[et]=Järjehoidjad +GenericName[eu]=Laster-markak +GenericName[fa]=چوب‌ الفها +GenericName[fr]=Signets +GenericName[ga]=Leabharmharcanna +GenericName[gl]=Marcadores +GenericName[hi]= पसंदीदा +GenericName[hu]=Könyvjelzők +GenericName[it]=Segnalibri +GenericName[ja]=ブックマーク +GenericName[ms]=Tandabuku +GenericName[nds]=Leestekens-Ünnerstütten +GenericName[ne]=पुस्तकचिनो +GenericName[nl]=Bladwijzers +GenericName[pl]=Zakładki +GenericName[pt]=Favoritos +GenericName[pt_BR]=Marcadores +GenericName[ru]=Закладки +GenericName[sk]=Záložky +GenericName[sl]=Zaznamki +GenericName[sr]=Маркери +GenericName[sr@Latn]=Markeri +GenericName[sv]=Bokmärken +GenericName[ta]=புத்தகக்குறியின் +GenericName[tg]=Поягузор +GenericName[tr]=Yerimleri +GenericName[zh_CN]=书签 +GenericName[zh_TW]=書籤 +Icon=bookmark +ServiceTypes=TDevelop/Plugin +X-TDevelop-Scope=Project +X-TDE-Library=libkdevbookmarks +X-TDevelop-Version=5 +X-TDevelop-Properties=CodeEditing diff --git a/parts/bookmarks/tdevbookmarks.desktop b/parts/bookmarks/tdevbookmarks.desktop deleted file mode 100644 index 0ec9ae11..00000000 --- a/parts/bookmarks/tdevbookmarks.desktop +++ /dev/null @@ -1,85 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Plugin that provides navigation and overview of active source bookmarks and persists them between sessions. -Comment[ca]=Connector que proporciona navegació i visió de conjunt dels marcadors actius en el codi font i els manté entre sessions. -Comment[da]=Plugin der sørger for navigation og overblik for aktive kilde-bogmærker og lader dem overleve mellem sessioner. -Comment[de]=Ein Modul, das die Navigation in und die Übersicht über Quelltext-Lesezeichen ermöglicht und diese zwischen den Arbeitssitzungen speichert. -Comment[el]=Πρόσθετο που προσφέρει πλοήγηση και περίληψη των ενεργών σελιδοδεικτών στον κώδικα καθώς και τη διατήρηση αυτών μεταξύ των συνεδριών. -Comment[es]=Complemento que proporciona navegación de marcadores del código activos y los mantiene entre sesiones. -Comment[et]=Plugin, mis võimaldab näha ja liikuda aktiivse koodi järjehoidjate vahel ning peab need seansside vahel meeles. -Comment[eu]=Iturburu laster-marka aktiboen arakatze eta ikuspegi orokorra eskeintzen duen plugina da eta hauek sesioen artean mantentzen ditu. -Comment[fa]=وصله‌ای که ناوش و خلاصۀ چوب الفهای فعال منبع را فراهم می‌کند و آنها را در بین نشستها می‌گذارد -Comment[fr]=Module externe qui fournit une navigation et une vue d'ensemble des signets du source actif, et les maintient persistants entre les sessions. -Comment[gl]=Extensión que proporciona navegación e vista xeral de marcadores activos no código e que se encarga de mantelos entre sesións. -Comment[hu]=Bővítőmodul a forrásfájlok könyvjelzőinek áttekintéséhez, eltárolásához -Comment[it]=Plugin che offre la navigazione e l'anteprima dei segnalibri nel codice attivo e rimane nelle varie sessioni. -Comment[ja]=セッション間でアクティブなソースのブックマークや主張の外観やナビゲーションを提供するプラグイン。 -Comment[ms]=Plugin yang menyediakan pengemudian dan pandangan umum bagi tandalaman sumber aktif dan mengekalkan mereka antara sesi. -Comment[nds]=En Moduul, wat dat Stüern twischen un de Översicht över Borntext-Leestekens praatstellt, un disse över Törns wohrt. -Comment[ne]=प्लगइनले सक्रिय स्रोत पुस्तकचिनोको नेभिगेसन र समिक्षा प्रदान गर्दछ र सत्रहरू बिच तिनीहरूलाई राख्दछ । -Comment[nl]=Plugin die bladwijzers biedt die ook blijven bestaan tussen opeenvolgende sessies. -Comment[pl]=Wtyczka umożliwiająca nawigację i uzyskiwanie informacji na temat aktywnych zakładek w kodzie oraz przenoszenie ich między sesjami. -Comment[pt]=Um 'plugin' que oferece uma navegação e uma vista geral sobre os favoritos de código activos, mantendo-os persistentes entre sessões. -Comment[pt_BR]=Plug-in que fornece navegação e uma visão geral dos marcadores de código ativos e persiste entre sessões. -Comment[ru]=Модуль, который обеспечивает навигацию и просмотр активных закладок в коде, а также их сохранение в проекте. -Comment[sk]=Modul proskytuje navigáciu a prehľad aktívnych zdrojových záložiek a ich pretrvanie medzi sedeniami. -Comment[sr]=Прикључак који обезбеђује навигацију и преглед активних маркера изворног кôда и одржава их између сесија. -Comment[sr@Latn]=Priključak koji obezbeđuje navigaciju i pregled aktivnih markera izvornog kôda i održava ih između sesija. -Comment[sv]=Insticksprogram som tillhandahåller navigering och översikt över aktiva källkodsbokmärken och gör dem bestående mellan sessioner. -Comment[ta]=நடப்பில் உள்ள புத்தக குறியீடு மூலத்திற்கு மேற்பார்வை மற்றும் வழிசெலுத்தும் வசதிகளை சொருகி உங்களுக்கு தரும் மற்றும் அமர்வுக்கு இடையே இதனை பரிசோதிக்கும். -Comment[tg]=Модуле, ки навигатсия ва намоиши поягузории фаъолро дар код таъмин месозад, ва боз барои нигоҳ доштан дар лоиҳа ҳам. -Comment[tr]=Etkin kaynak yerimlerinin dolaşımını, gözden geçirilmesini ve oturumlar arasında devamlılığını sağlayan bir eklenti. -Comment[zh_CN]=提供当前源文件书签的浏览、预览和保存的插件。 -Comment[zh_TW]=提供目前程式碼書籤的導覽與概觀,並保持在工作階段間。 -Name=KDevBookmarks -Name[da]=TDevelop bogmærker -Name[de]=Lesezeichen-Unterstützung (TDevelop) -Name[hi]=के-डेव-बुकमार्क्स -Name[nds]=Leestekens-Ünnerstütten (TDevelop) -Name[pl]=KDevZakładki -Name[sk]=KDev záložky -Name[sv]=TDevelop bokmärken -Name[zh_TW]=TDevelop 書籤 -GenericName=Bookmarks -GenericName[br]=Sinedoù -GenericName[ca]=Marcadors -GenericName[cy]=Tudnodau -GenericName[da]=Bogmærker -GenericName[de]=Unterstützung für Lesezeichen -GenericName[el]=Σελιδοδείκτες -GenericName[es]=Marcadores -GenericName[et]=Järjehoidjad -GenericName[eu]=Laster-markak -GenericName[fa]=چوب‌ الفها -GenericName[fr]=Signets -GenericName[ga]=Leabharmharcanna -GenericName[gl]=Marcadores -GenericName[hi]= पसंदीदा -GenericName[hu]=Könyvjelzők -GenericName[it]=Segnalibri -GenericName[ja]=ブックマーク -GenericName[ms]=Tandabuku -GenericName[nds]=Leestekens-Ünnerstütten -GenericName[ne]=पुस्तकचिनो -GenericName[nl]=Bladwijzers -GenericName[pl]=Zakładki -GenericName[pt]=Favoritos -GenericName[pt_BR]=Marcadores -GenericName[ru]=Закладки -GenericName[sk]=Záložky -GenericName[sl]=Zaznamki -GenericName[sr]=Маркери -GenericName[sr@Latn]=Markeri -GenericName[sv]=Bokmärken -GenericName[ta]=புத்தகக்குறியின் -GenericName[tg]=Поягузор -GenericName[tr]=Yerimleri -GenericName[zh_CN]=书签 -GenericName[zh_TW]=書籤 -Icon=bookmark -ServiceTypes=TDevelop/Plugin -X-TDevelop-Scope=Project -X-TDE-Library=libtdevbookmarks -X-TDevelop-Version=5 -X-TDevelop-Properties=CodeEditing diff --git a/parts/classview/CMakeLists.txt b/parts/classview/CMakeLists.txt index a5ec68dc..2d19388a 100644 --- a/parts/classview/CMakeLists.txt +++ b/parts/classview/CMakeLists.txt @@ -30,17 +30,17 @@ link_directories( ##### other data ################################ -install( FILES tdevclassview.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevclassview.rc DESTINATION ${DATA_INSTALL_DIR}/tdevclassview ) +install( FILES kdevclassview.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevclassview.rc DESTINATION ${DATA_INSTALL_DIR}/kdevclassview ) -##### libtdevclassview (module) ################# +##### libkdevclassview (module) ################# -tde_add_kpart( libtdevclassview AUTOMOC +tde_add_kpart( libkdevclassview AUTOMOC SOURCES classviewpart.cpp classviewwidget.cpp digraphview.cpp hierarchydlg.cpp navigator.cpp viewcombos.cpp LINK - tdevextensions-static tdevelop-shared tdevwidgets-shared + kdevextensions-static tdevelop-shared kdevwidgets-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/parts/classview/Makefile.am b/parts/classview/Makefile.am index ccc02078..3041259e 100644 --- a/parts/classview/Makefile.am +++ b/parts/classview/Makefile.am @@ -3,20 +3,20 @@ INCLUDES = -I$(top_srcdir)/lib/compat -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/interfaces/extensions \ -I$(top_srcdir)/lib/interfaces/external -I$(top_srcdir)/lib/util -I$(top_srcdir)/lib/widgets $(all_includes) -kde_module_LTLIBRARIES = libtdevclassview.la -libtdevclassview_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevclassview_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/widgets/libtdevwidgets.la $(LIB_TDEHTML) $(top_builddir)/lib/interfaces/extensions/libtdevextensions.la +kde_module_LTLIBRARIES = libkdevclassview.la +libkdevclassview_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevclassview_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/widgets/libkdevwidgets.la $(LIB_TDEHTML) $(top_builddir)/lib/interfaces/extensions/libkdevextensions.la -libtdevclassview_la_SOURCES = classviewpart.cpp classviewwidget.cpp \ +libkdevclassview_la_SOURCES = classviewpart.cpp classviewwidget.cpp \ digraphview.cpp hierarchydlg.cpp navigator.cpp viewcombos.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevclassview.desktop +service_DATA = kdevclassview.desktop -rcdir = $(kde_datadir)/tdevclassview -rc_DATA = tdevclassview.rc +rcdir = $(kde_datadir)/kdevclassview +rc_DATA = kdevclassview.rc QTDIR = /home/bernd/kdesrc/qt-copy diff --git a/parts/classview/classtooldlg.cpp b/parts/classview/classtooldlg.cpp index f0c49d46..c0cc21a2 100644 --- a/parts/classview/classtooldlg.cpp +++ b/parts/classview/classtooldlg.cpp @@ -20,7 +20,7 @@ #include #include -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" #include "classstore.h" #include "parsedclass.h" #include "classviewpart.h" @@ -119,8 +119,8 @@ ClassToolDialog::ClassToolDialog( ClassViewPart *part ) connect( methods_button, TQT_SIGNAL(clicked()), TQT_SLOT(viewMethods())); connect( attributes_button, TQT_SIGNAL(clicked()), TQT_SLOT(viewAttributes())); - connect( part, TQT_SIGNAL(setLanguageSupport(TDevLanguageSupport*)), - this, TQT_SLOT(setLanguageSupport(TDevLanguageSupport*)) ); + connect( part, TQT_SIGNAL(setLanguageSupport(KDevLanguageSupport*)), + this, TQT_SLOT(setLanguageSupport(KDevLanguageSupport*)) ); m_part->registerClassToolDialog(this); } @@ -132,7 +132,7 @@ ClassToolDialog::~ClassToolDialog() } -void ClassToolDialog::setLanguageSupport(TDevLanguageSupport *ls) +void ClassToolDialog::setLanguageSupport(KDevLanguageSupport *ls) { if (ls) { disconnect(ls, 0, this, 0); diff --git a/parts/classview/classtooldlg.h b/parts/classview/classtooldlg.h index c4b2e79a..d143e66e 100644 --- a/parts/classview/classtooldlg.h +++ b/parts/classview/classtooldlg.h @@ -59,7 +59,7 @@ public slots: void viewAttributes(); private slots: - void setLanguageSupport(TDevLanguageSupport *ls); + void setLanguageSupport(KDevLanguageSupport *ls); void refresh(); void delayedClose(); @@ -85,7 +85,7 @@ private: /** Store that holds all classes in the system. */ ClassStore *m_store; - TDevLanguageSupport *m_ls; + KDevLanguageSupport *m_ls; ClassViewPart *m_part; /** The class we are currently viewing. */ diff --git a/parts/classview/classtreebase.cpp b/parts/classview/classtreebase.cpp index 66e23173..9e052418 100644 --- a/parts/classview/classtreebase.cpp +++ b/parts/classview/classtreebase.cpp @@ -22,10 +22,10 @@ #include #include -#include "tdevcore.h" -#include "tdevlanguagesupport.h" -#include "tdevmainwindow.h" -#include "tdevpartcontroller.h" +#include "kdevcore.h" +#include "kdevlanguagesupport.h" +#include "kdevmainwindow.h" +#include "kdevpartcontroller.h" #include "classstore.h" #include "classviewpart.h" @@ -36,10 +36,10 @@ TDEPopupMenu *ClassTreeItem::createPopup() if (!m_item || m_item->itemType() == PIT_SCOPE) return 0; - TDevLanguageSupport::Features features = classTree()->m_part->languageSupport()->features(); + KDevLanguageSupport::Features features = classTree()->m_part->languageSupport()->features(); TDEPopupMenu *popup = new TDEPopupMenu(); - if (features & TDevLanguageSupport::Declarations) + if (features & KDevLanguageSupport::Declarations) popup->insertItem( i18n("Go to Declaration"), classTree(), TQT_SLOT(slotGotoDeclaration()) ); if (m_item->itemType() == PIT_METHOD) popup->insertItem( i18n("Go to Definition"), classTree(), TQT_SLOT(slotGotoImplementation()) ); @@ -49,8 +49,8 @@ TDEPopupMenu *ClassTreeItem::createPopup() case PIT_CLASS: { title = i18n("Class"); - bool hasAddMethod = features & TDevLanguageSupport::AddMethod; - bool hasAddAttribute = features & TDevLanguageSupport::AddAttribute; + bool hasAddMethod = features & KDevLanguageSupport::AddMethod; + bool hasAddAttribute = features & KDevLanguageSupport::AddAttribute; if (hasAddMethod) popup->insertItem( i18n("Add Method..."), classTree(), TQT_SLOT(slotAddMethod())); if (hasAddAttribute) @@ -168,7 +168,7 @@ void ClassTreeScopeItem::setOpen(bool o) ClassTreeItem *lastItem = 0; // Ok, this is a hack... - TDevLanguageSupport::Features features = classTree()->m_part->languageSupport()->features(); + KDevLanguageSupport::Features features = classTree()->m_part->languageSupport()->features(); // Add namespaces TQValueList scopeList = pScope->getSortedScopeList(); @@ -176,7 +176,7 @@ void ClassTreeScopeItem::setOpen(bool o) for (it = scopeList.begin(); it != scopeList.end(); ++it) lastItem = new ClassTreeScopeItem(this, lastItem, *it); - if (features & TDevLanguageSupport::Classes) { + if (features & KDevLanguageSupport::Classes) { // Add classes TQValueList classList = pScope->getSortedClassList(); TQValueList::ConstIterator it; @@ -184,7 +184,7 @@ void ClassTreeScopeItem::setOpen(bool o) lastItem = new ClassTreeClassItem(this, lastItem, *it); } - if (features & TDevLanguageSupport::Structs) { + if (features & KDevLanguageSupport::Structs) { // Add structs TQValueList structList = pScope->getSortedStructList(); TQValueList::ConstIterator it; @@ -192,7 +192,7 @@ void ClassTreeScopeItem::setOpen(bool o) lastItem = new ClassTreeClassItem(this, lastItem, *it, true); } - if (features & TDevLanguageSupport::Functions) { + if (features & KDevLanguageSupport::Functions) { // Add functions TQValueList methodList = pScope->getSortedMethodList(); TQValueList::ConstIterator it; @@ -200,7 +200,7 @@ void ClassTreeScopeItem::setOpen(bool o) lastItem = new ClassTreeMethodItem(this, lastItem, *it); } - if (features & TDevLanguageSupport::Variables) { + if (features & KDevLanguageSupport::Variables) { // Add attributes TQValueList attrList = pScope->getSortedAttributeList(); TQValueList::ConstIterator it; diff --git a/parts/classview/classviewpart.cpp b/parts/classview/classviewpart.cpp index 7cdf8cbd..92e26bd0 100644 --- a/parts/classview/classviewpart.cpp +++ b/parts/classview/classviewpart.cpp @@ -26,19 +26,19 @@ #include #include -#include +#include #include #include #include -#include -#include -#include +#include +#include +#include #include -#include -#include +#include +#include #include -#include +#include #include #include @@ -138,17 +138,17 @@ class FunctionCompletion : public CustomCompleter { }; -typedef TDevGenericFactory ClassViewFactory; -static const TDevPluginInfo data("tdevclassview"); -K_EXPORT_COMPONENT_FACTORY( libtdevclassview, ClassViewFactory( data ) ) +typedef KDevGenericFactory ClassViewFactory; +static const KDevPluginInfo data("kdevclassview"); +K_EXPORT_COMPONENT_FACTORY( libkdevclassview, ClassViewFactory( data ) ) ClassViewPart::ClassViewPart(TQObject *parent, const char *name, const TQStringList& ) - :/// TDevPlugin( &data, parent, name ? name : "ClassViewPart" ), - TDevCodeBrowserFrontend( &data, parent, name ? name : "ClassViewPart" ), + :/// KDevPlugin( &data, parent, name ? name : "ClassViewPart" ), + KDevCodeBrowserFrontend( &data, parent, name ? name : "ClassViewPart" ), m_activeDocument(0), m_activeView(0), m_activeSelection(0), m_activeEditor(0), m_activeViewCursor(0), m_hierarchyDlg(0) { setInstance(ClassViewFactory::instance()); - setXMLFile("tdevclassview.rc"); + setXMLFile("kdevclassview.rc"); navigator = new Navigator(this); @@ -207,7 +207,7 @@ void ClassViewPart::setupActions( ) new TDEAction( i18n("Focus Navigator"), 0, this, TQT_SLOT(slotFocusNavbar()), actionCollection(), "focus_navigator" ); - if (langHasFeature(TDevLanguageSupport::Classes)) + if (langHasFeature(KDevLanguageSupport::Classes)) { TDEAction *ac = new TDEAction(i18n("Class Inheritance Diagram"), "view_tree", 0, this, TQT_SLOT(graphicalClassView()), actionCollection(), "inheritance_dia"); ac->setToolTip(i18n("Class inheritance diagram")); @@ -216,7 +216,7 @@ void ClassViewPart::setupActions( ) } } -bool ClassViewPart::langHasFeature(TDevLanguageSupport::Features feature) +bool ClassViewPart::langHasFeature(KDevLanguageSupport::Features feature) { bool result = false; if (languageSupport()) diff --git a/parts/classview/classviewpart.h b/parts/classview/classviewpart.h index 70d00cc9..16e18def 100644 --- a/parts/classview/classviewpart.h +++ b/parts/classview/classviewpart.h @@ -18,16 +18,16 @@ * */ -#ifndef __TDEVPART_CLASSVIEW_H__ -#define __TDEVPART_CLASSVIEW_H__ +#ifndef __KDEVPART_CLASSVIEW_H__ +#define __KDEVPART_CLASSVIEW_H__ -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" #include "viewcombos.h" #include #include -#include +#include #include #include @@ -52,7 +52,7 @@ class TDEToolBarPopupAction; class NamespaceItem; class Navigator; class HierarchyDialog; -class ClassViewPart : public Extensions::TDevCodeBrowserFrontend +class ClassViewPart : public Extensions::KDevCodeBrowserFrontend { Q_OBJECT @@ -60,7 +60,7 @@ public: ClassViewPart(TQObject *parent, const char *name, const TQStringList &); virtual ~ClassViewPart(); - bool langHasFeature(TDevLanguageSupport::Features feature); + bool langHasFeature(KDevLanguageSupport::Features feature); TDEListViewAction *m_functionsnav; Navigator *navigator; diff --git a/parts/classview/classviewwidget.cpp b/parts/classview/classviewwidget.cpp index cede06f3..22b865ef 100644 --- a/parts/classview/classviewwidget.cpp +++ b/parts/classview/classviewwidget.cpp @@ -31,10 +31,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -252,7 +252,7 @@ void ClassViewWidget::insertFile( const TQString& fileName ) } break; - case TDevelop2ViewMode: + case KDevelop2ViewMode: { } break; @@ -293,7 +293,7 @@ void ClassViewWidget::removeFile( const TQString& fileName ) } break; - case TDevelop2ViewMode: + case KDevelop2ViewMode: { } break; @@ -332,19 +332,19 @@ void ClassViewWidget::contentsContextMenuEvent( TQContextMenuEvent * ev ) bool sep = false; if( item && item->isClass() ){ - if( m_part->langHasFeature(TDevLanguageSupport::AddMethod) ) { + if( m_part->langHasFeature(KDevLanguageSupport::AddMethod) ) { m_actionAddMethod->plug( &menu ); sep = true; } - if( m_part->langHasFeature(TDevLanguageSupport::AddAttribute) ) { + if( m_part->langHasFeature(KDevLanguageSupport::AddAttribute) ) { m_actionAddAttribute->plug( &menu ); sep = true; } } if (item && item->isVariable()){ - if( m_part->langHasFeature(TDevLanguageSupport::CreateAccessMethods) ) + if( m_part->langHasFeature(KDevLanguageSupport::CreateAccessMethods) ) m_actionCreateAccessMethods->plug( &menu ); } @@ -1108,7 +1108,7 @@ TQString VariableDomBrowserItem::key( int , bool ) const void ClassViewWidget::slotNewClass( ) { - if( m_part->languageSupport()->features() & TDevLanguageSupport::NewClass ) + if( m_part->languageSupport()->features() & KDevLanguageSupport::NewClass ) m_part->languageSupport()->addClass(); } @@ -1116,7 +1116,7 @@ void ClassViewWidget::slotAddMethod( ) { if ( !selectedItem() ) return; - if( m_part->languageSupport()->features() & TDevLanguageSupport::AddMethod ) + if( m_part->languageSupport()->features() & KDevLanguageSupport::AddMethod ) m_part->languageSupport()->addMethod( static_cast( selectedItem() )->dom() ); } @@ -1124,7 +1124,7 @@ void ClassViewWidget::slotAddAttribute( ) { if ( !selectedItem() ) return; - if( m_part->languageSupport()->features() & TDevLanguageSupport::AddAttribute ) + if( m_part->languageSupport()->features() & KDevLanguageSupport::AddAttribute ) m_part->languageSupport()->addAttribute( static_cast( selectedItem() )->dom() ); } @@ -1271,7 +1271,7 @@ void ClassViewWidget::slotCreateAccessMethods( ) { if ( !selectedItem() ) return; - if( m_part->languageSupport()->features() & TDevLanguageSupport::CreateAccessMethods ) + if( m_part->languageSupport()->features() & KDevLanguageSupport::CreateAccessMethods ) { VariableDomBrowserItem* item = dynamic_cast( selectedItem() ); if (item == 0) diff --git a/parts/classview/classviewwidget.h b/parts/classview/classviewwidget.h index 1d17efec..d74448f5 100644 --- a/parts/classview/classviewwidget.h +++ b/parts/classview/classviewwidget.h @@ -31,7 +31,7 @@ #include #include -class TDevProject; +class KDevProject; class ClassViewPart; class ClassViewItem; class FolderBrowserItem; @@ -51,7 +51,7 @@ public: enum ViewMode { KDevelop3ViewMode = 0, - TDevelop2ViewMode, + KDevelop2ViewMode, JavaLikeViewMode }; diff --git a/parts/classview/hierarchydlg.cpp b/parts/classview/hierarchydlg.cpp index 6901926b..c8761861 100644 --- a/parts/classview/hierarchydlg.cpp +++ b/parts/classview/hierarchydlg.cpp @@ -28,7 +28,7 @@ #include #include -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" #include "kcomboview.h" #include "classviewpart.h" @@ -105,7 +105,7 @@ void HierarchyDialog::save() { TQFileInfo fi(dlg.selectedURL().pathOrURL()); TQApplication::setOverrideCursor( TQt::waitCursor ); - TDevLanguageSupport *ls = m_part->languageSupport(); + KDevLanguageSupport *ls = m_part->languageSupport(); for (TQMap::const_iterator it = classes.begin(); it != classes.end(); ++it) { kdDebug(9003) << "Adding class to graph: " << it.key() << endl; @@ -134,7 +134,7 @@ void HierarchyDialog::refresh() ViewCombosOp::refreshNamespaces(m_part, namespace_combo); processNamespace("", m_part->codeModel()->globalNamespace()); - TDevLanguageSupport *ls = m_part->languageSupport(); + KDevLanguageSupport *ls = m_part->languageSupport(); for (TQMap::const_iterator it = classes.begin(); it != classes.end(); ++it) { @@ -154,7 +154,7 @@ void HierarchyDialog::refresh() digraph->process(); } -void HierarchyDialog::setLanguageSupport(TDevLanguageSupport *ls) +void HierarchyDialog::setLanguageSupport(KDevLanguageSupport *ls) { if (ls) connect(ls, TQT_SIGNAL(updatedSourceInfo()), this, TQT_SLOT(refresh())); @@ -169,7 +169,7 @@ void HierarchyDialog::slotClassComboChoice(TQListViewItem * item) if (!ci) return; - TDevLanguageSupport *ls = m_part->languageSupport(); + KDevLanguageSupport *ls = m_part->languageSupport(); TQString className = ls->formatClassName(uclasses[item->text(0)]); digraph->setSelected(className); @@ -188,7 +188,7 @@ void HierarchyDialog::slotClassComboChoice( const TQString& itemText ) if (!ci) return; - TDevLanguageSupport *ls = m_part->languageSupport(); + KDevLanguageSupport *ls = m_part->languageSupport(); TQString className = ls->formatClassName(uclasses[item->text(0)]); digraph->setSelected(className); @@ -205,10 +205,10 @@ void HierarchyDialog::classSelected(const TQString &/*className*/) /* ParsedClass *currentClass = m_part->classStore()->getClassByName(className); member_tree->clear(); if (currentClass) { - TDevLanguageSupport::Features features = m_part->languageSupport()->features(); - if (features & TDevLanguageSupport::Functions) + KDevLanguageSupport::Features features = m_part->languageSupport()->features(); + if (features & KDevLanguageSupport::Functions) member_tree->insertAllClassMethods(currentClass, (PIAccess)-1); - if (features & TDevLanguageSupport::Variables) + if (features & KDevLanguageSupport::Variables) member_tree->insertAllClassAttributes(currentClass, (PIAccess)-1); }*/ } diff --git a/parts/classview/hierarchydlg.h b/parts/classview/hierarchydlg.h index 9d26ebd0..1c41a8f0 100644 --- a/parts/classview/hierarchydlg.h +++ b/parts/classview/hierarchydlg.h @@ -17,7 +17,7 @@ #include "codemodel.h" class ClassViewPart; -class TDevLanguageSupport; +class KDevLanguageSupport; class DigraphView; class ClassToolWidget; class KComboView; @@ -35,7 +35,7 @@ public slots: void refresh(); private slots: - void setLanguageSupport(TDevLanguageSupport *ls); + void setLanguageSupport(KDevLanguageSupport *ls); void slotClassComboChoice(TQListViewItem *item); void slotNamespaceComboChoice(TQListViewItem *item); void slotClassComboChoice(const TQString&); diff --git a/parts/classview/kdevclassview.desktop b/parts/classview/kdevclassview.desktop new file mode 100644 index 00000000..49bfa43c --- /dev/null +++ b/parts/classview/kdevclassview.desktop @@ -0,0 +1,82 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=This plugin displays a graphical view of all the classes in the project, complete with methods and attributes, and provides a way of direct source navigation. +Comment[ca]=Aquest connector mostra una vista gràfica de totes les classes del projecte, completant-lo amb mètodes i atributs, i proporciona una forma de navegar directament a través del codi font. +Comment[da]=Dette plugin giver en grafisk visning af alle klasserne i projektet, fuldstændig med metoder og attributter og sørger for en måde at have direkte kildenavigation. +Comment[de]=Dieses Modul zeigt eine grafische Ansicht aller Klassen im Projekt, einschließlich der Methoden und Attribute und ermöglicht die Navigation in den betreffenden Quelltexten. +Comment[el]=Αυτό το πρόσθετο εμφανίζει μια γραφική προβολή όλων των κλάσεων του έργου, πλήρης με μεθόδους και χαρακτηριστικά, και προσφέρει μια μέθοδο απευθείας πλοήγησης στον κώδικα. +Comment[es]=Este complemento muestra una vista gráfica de todas las clases del proyecto, completándolo con métodos y atributos, y proporciona una forma de navegar directamente por el código fuente. +Comment[et]=See plugin näitab graafiliselt kõiki projekti klasse koos meetodite ja atribuutidega ning võimaldab nende vahel kiiresti liikuda. +Comment[eu]=Plugin honek proiektuak dituen klase guztien ikuspegi grafiko bat bistaratzen du, metodo eta atributuekin osatuta, eta iturburuen arteko nabigazio zuzena eskeintzen du. +Comment[fa]=این وصله یک نمای نگاره‌ای از همۀ رده‌ها در پروژه را نمایش می‌دهد، با روشها و ویژگیها کامل می‌کند و یک راه ناوش مستقیم منبع فراهم می‌کند. +Comment[fr]=Ce module externe affiche une vue graphique de toutes les classes dans le projet, la complète avec des méthodes et des attributs, et offre un moyen de naviguer directement dans le source. +Comment[gl]=Esta extensión mostra unha vista gráfica de tódalas clases do proxecto, cos métodos e os atributos, e proporciona unha maneira para navegar o código directamente. +Comment[hu]=Bővítőmodul egy projekt osztályainak áttekintéséhez, a tagfüggvényekkel és az attribútumokkal együtt, navigálási lehetőséggel +Comment[it]=Questo plugin offre una rappresentazione grafica di tutte le classi nel progetto, complete con metodi e attributi, e fornisce un modo per la navigazione diretta nei sorgenti. +Comment[ja]=このプラグインは、プロジェクトの中のすべてのクラスを視覚的に表示します。また、メソッドや属性を補完し、直接的なソース操作を提供します。 +Comment[ms]=Plugin ini memaparkan paparan bergrafik bagi semua kelas dalam projek, lengkap dengan kaedah dan ciri, dan menyediakan kaedah kemudian sumber secara terus. +Comment[nds]=Dit Moduul wiest en graafsch Ansicht vun all Klassen vun en Projekt, komplett mit Metoden un Attributen, un stellt dat Stüern binnen de Borntexten praat. +Comment[ne]=यो प्लगइनले विधि र विशेषतासँग परियोजनामा सबै कक्षको ग्राफिकल दृश्य प्रर्दशन गर्दछ र प्रत्यक्ष स्रोत नेभिगेसनको उपाय प्रदान गर्दछ । +Comment[nl]=Deze plugin toont een grafische weergave van alle klassen in een project, compleet met methoden en attributen, en biedt directe navigatie hiertussen. +Comment[pl]=Ta wtyczka pokazuje graficzny widok wszystkich klas w projekcie z metodami i atrybutami oraz umożliwia bezpośrednią nawigację w kodzie źródłowym.. +Comment[pt]=Este 'plugin' mostra uma vista gráfica de todas as classes no projecto, completas com os métodos e atributos, oferecendo uma forma de navegação directa sobre o código. +Comment[pt_BR]=Este plug-in exibe uma visão gráfica de todas as classes no projeto, juntamente com métodos e atributos, e fornece uma maneira de navegar diretamente no código. +Comment[ru]=Этот модуль показывает список классов в проекте, включая методы и атрибуты, а также предоставляет возможности навигации по коду. +Comment[sk]=Modul zobrazí grafický pohľad na triedy v projekte, spolu s metódami a atribútmi, a umožní priamy prístup k zdrojovému kódu. +Comment[sr]=Овај прикључак приказује графички изглед свих класа у пројекту, заједно са методама и атрибутима, и обезбеђује начин директне навигације кроз изворни кôд. +Comment[sr@Latn]=Ovaj priključak prikazuje grafički izgled svih klasa u projektu, zajedno sa metodama i atributima, i obezbeđuje način direktne navigacije kroz izvorni kôd. +Comment[sv]=Insticksprogrammet visar en grafisk bild av alla klasser i ett projekt, tillsammans med metoder och egenskaper, och ger möjlighet till direkt navigering i källkoden. +Comment[ta]=இந்த சொருகி திட்டப்பணியில் உள்ள வகுப்புகளின், முறைகள் மற்றும் பண்புகளை உங்களுக்கு வரைகலை பார்வையில் அளிக்கும்,மற்றும் மூலத்தை வழி செலுத்த இது நேர்வழி அளிக்கும். +Comment[tg]=Ин модул рӯйхати синфҳоро дар лоиҳа намоиш медиҳад, ва боз методҳо ва атрибутҳо ва боз ҳам имкони кодро роҳ медиҳад. +Comment[tr]=Bu eklenti projedeki sınıfların bütün yöntem ve öznitelikleri ile grafiksel bir görünümü gösterir ve doğrudan kaynak dolaşımını sağlar. +Comment[zh_CN]=这个插件以图形显示工程中所有的类,包括完整的方法和属性,并提供浏览源文件的方法。 +Comment[zh_TW]=這個外掛程式顯示專案中所有類別、完整方法與屬性的圖形檢視,並提供源碼導覽。 +Name=KDevClassView +Name[da]=TDevelop klassevisning +Name[de]=Klassenansicht (TDevelop) +Name[hi]=के-डेव-क्लॉस-व्यू +Name[nds]=KlassKieker (TDevelop) +Name[pl]=KDevWidokKlas +Name[sk]=KDev pohľad na triedy +Name[sv]=TDevelop klassvisning +Name[tg]=Намоиши снфи KDev +Name[zh_TW]=TDevelop 類別檢視 +GenericName=Class View +GenericName[ca]=Visor de classes +GenericName[da]=Klassevisning +GenericName[de]=Klassenansicht +GenericName[el]=Προβολή κλάσεων +GenericName[es]=Visor de clases +GenericName[et]=Klasside vaade +GenericName[eu]=Klase ikuspegia +GenericName[fa]=نمای رده +GenericName[fr]=Vue des classes +GenericName[gl]=Vista de clases +GenericName[hi]=क्लॉस व्यू +GenericName[hu]=Osztálynézegető +GenericName[it]=Visualizza classe +GenericName[ja]=クラスビュー +GenericName[ms]=Paparan Kelas +GenericName[nds]=Klasskieker +GenericName[ne]=कक्ष दृश्य +GenericName[nl]=Klassenweergave +GenericName[pl]=Widok klas +GenericName[pt]=Vista de Classe +GenericName[pt_BR]=Visualizador de Classe +GenericName[ru]=Просмотр классов +GenericName[sk]=Pohľad na triedy +GenericName[sl]=Prikaz razreda +GenericName[sr]=Преглед класа +GenericName[sr@Latn]=Pregled klasa +GenericName[sv]=Klassvisning +GenericName[ta]=வகுப்புக்காட்சி +GenericName[tg]=Намоиши синфҳо +GenericName[tr]=Sınıf Görünümü +GenericName[zh_CN]=类查看器 +GenericName[zh_TW]=類別檢視 +ServiceTypes=TDevelop/CodeBrowserFrontend +X-TDE-Library=libkdevclassview +X-TDevelop-Version=5 +X-TDevelop-Scope=Project +X-TDevelop-Properties=CodeNavigation diff --git a/parts/classview/tdevclassview.rc b/parts/classview/kdevclassview.rc similarity index 100% rename from parts/classview/tdevclassview.rc rename to parts/classview/kdevclassview.rc diff --git a/parts/classview/navigator.cpp b/parts/classview/navigator.cpp index a7e3ac85..694aa0d4 100644 --- a/parts/classview/navigator.cpp +++ b/parts/classview/navigator.cpp @@ -31,9 +31,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include #include "classviewpart.h" #include "classviewwidget.h" diff --git a/parts/classview/tdevclassview.desktop b/parts/classview/tdevclassview.desktop deleted file mode 100644 index 10200b50..00000000 --- a/parts/classview/tdevclassview.desktop +++ /dev/null @@ -1,82 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=This plugin displays a graphical view of all the classes in the project, complete with methods and attributes, and provides a way of direct source navigation. -Comment[ca]=Aquest connector mostra una vista gràfica de totes les classes del projecte, completant-lo amb mètodes i atributs, i proporciona una forma de navegar directament a través del codi font. -Comment[da]=Dette plugin giver en grafisk visning af alle klasserne i projektet, fuldstændig med metoder og attributter og sørger for en måde at have direkte kildenavigation. -Comment[de]=Dieses Modul zeigt eine grafische Ansicht aller Klassen im Projekt, einschließlich der Methoden und Attribute und ermöglicht die Navigation in den betreffenden Quelltexten. -Comment[el]=Αυτό το πρόσθετο εμφανίζει μια γραφική προβολή όλων των κλάσεων του έργου, πλήρης με μεθόδους και χαρακτηριστικά, και προσφέρει μια μέθοδο απευθείας πλοήγησης στον κώδικα. -Comment[es]=Este complemento muestra una vista gráfica de todas las clases del proyecto, completándolo con métodos y atributos, y proporciona una forma de navegar directamente por el código fuente. -Comment[et]=See plugin näitab graafiliselt kõiki projekti klasse koos meetodite ja atribuutidega ning võimaldab nende vahel kiiresti liikuda. -Comment[eu]=Plugin honek proiektuak dituen klase guztien ikuspegi grafiko bat bistaratzen du, metodo eta atributuekin osatuta, eta iturburuen arteko nabigazio zuzena eskeintzen du. -Comment[fa]=این وصله یک نمای نگاره‌ای از همۀ رده‌ها در پروژه را نمایش می‌دهد، با روشها و ویژگیها کامل می‌کند و یک راه ناوش مستقیم منبع فراهم می‌کند. -Comment[fr]=Ce module externe affiche une vue graphique de toutes les classes dans le projet, la complète avec des méthodes et des attributs, et offre un moyen de naviguer directement dans le source. -Comment[gl]=Esta extensión mostra unha vista gráfica de tódalas clases do proxecto, cos métodos e os atributos, e proporciona unha maneira para navegar o código directamente. -Comment[hu]=Bővítőmodul egy projekt osztályainak áttekintéséhez, a tagfüggvényekkel és az attribútumokkal együtt, navigálási lehetőséggel -Comment[it]=Questo plugin offre una rappresentazione grafica di tutte le classi nel progetto, complete con metodi e attributi, e fornisce un modo per la navigazione diretta nei sorgenti. -Comment[ja]=このプラグインは、プロジェクトの中のすべてのクラスを視覚的に表示します。また、メソッドや属性を補完し、直接的なソース操作を提供します。 -Comment[ms]=Plugin ini memaparkan paparan bergrafik bagi semua kelas dalam projek, lengkap dengan kaedah dan ciri, dan menyediakan kaedah kemudian sumber secara terus. -Comment[nds]=Dit Moduul wiest en graafsch Ansicht vun all Klassen vun en Projekt, komplett mit Metoden un Attributen, un stellt dat Stüern binnen de Borntexten praat. -Comment[ne]=यो प्लगइनले विधि र विशेषतासँग परियोजनामा सबै कक्षको ग्राफिकल दृश्य प्रर्दशन गर्दछ र प्रत्यक्ष स्रोत नेभिगेसनको उपाय प्रदान गर्दछ । -Comment[nl]=Deze plugin toont een grafische weergave van alle klassen in een project, compleet met methoden en attributen, en biedt directe navigatie hiertussen. -Comment[pl]=Ta wtyczka pokazuje graficzny widok wszystkich klas w projekcie z metodami i atrybutami oraz umożliwia bezpośrednią nawigację w kodzie źródłowym.. -Comment[pt]=Este 'plugin' mostra uma vista gráfica de todas as classes no projecto, completas com os métodos e atributos, oferecendo uma forma de navegação directa sobre o código. -Comment[pt_BR]=Este plug-in exibe uma visão gráfica de todas as classes no projeto, juntamente com métodos e atributos, e fornece uma maneira de navegar diretamente no código. -Comment[ru]=Этот модуль показывает список классов в проекте, включая методы и атрибуты, а также предоставляет возможности навигации по коду. -Comment[sk]=Modul zobrazí grafický pohľad na triedy v projekte, spolu s metódami a atribútmi, a umožní priamy prístup k zdrojovému kódu. -Comment[sr]=Овај прикључак приказује графички изглед свих класа у пројекту, заједно са методама и атрибутима, и обезбеђује начин директне навигације кроз изворни кôд. -Comment[sr@Latn]=Ovaj priključak prikazuje grafički izgled svih klasa u projektu, zajedno sa metodama i atributima, i obezbeđuje način direktne navigacije kroz izvorni kôd. -Comment[sv]=Insticksprogrammet visar en grafisk bild av alla klasser i ett projekt, tillsammans med metoder och egenskaper, och ger möjlighet till direkt navigering i källkoden. -Comment[ta]=இந்த சொருகி திட்டப்பணியில் உள்ள வகுப்புகளின், முறைகள் மற்றும் பண்புகளை உங்களுக்கு வரைகலை பார்வையில் அளிக்கும்,மற்றும் மூலத்தை வழி செலுத்த இது நேர்வழி அளிக்கும். -Comment[tg]=Ин модул рӯйхати синфҳоро дар лоиҳа намоиш медиҳад, ва боз методҳо ва атрибутҳо ва боз ҳам имкони кодро роҳ медиҳад. -Comment[tr]=Bu eklenti projedeki sınıfların bütün yöntem ve öznitelikleri ile grafiksel bir görünümü gösterir ve doğrudan kaynak dolaşımını sağlar. -Comment[zh_CN]=这个插件以图形显示工程中所有的类,包括完整的方法和属性,并提供浏览源文件的方法。 -Comment[zh_TW]=這個外掛程式顯示專案中所有類別、完整方法與屬性的圖形檢視,並提供源碼導覽。 -Name=KDevClassView -Name[da]=TDevelop klassevisning -Name[de]=Klassenansicht (TDevelop) -Name[hi]=के-डेव-क्लॉस-व्यू -Name[nds]=KlassKieker (TDevelop) -Name[pl]=KDevWidokKlas -Name[sk]=KDev pohľad na triedy -Name[sv]=TDevelop klassvisning -Name[tg]=Намоиши снфи KDev -Name[zh_TW]=TDevelop 類別檢視 -GenericName=Class View -GenericName[ca]=Visor de classes -GenericName[da]=Klassevisning -GenericName[de]=Klassenansicht -GenericName[el]=Προβολή κλάσεων -GenericName[es]=Visor de clases -GenericName[et]=Klasside vaade -GenericName[eu]=Klase ikuspegia -GenericName[fa]=نمای رده -GenericName[fr]=Vue des classes -GenericName[gl]=Vista de clases -GenericName[hi]=क्लॉस व्यू -GenericName[hu]=Osztálynézegető -GenericName[it]=Visualizza classe -GenericName[ja]=クラスビュー -GenericName[ms]=Paparan Kelas -GenericName[nds]=Klasskieker -GenericName[ne]=कक्ष दृश्य -GenericName[nl]=Klassenweergave -GenericName[pl]=Widok klas -GenericName[pt]=Vista de Classe -GenericName[pt_BR]=Visualizador de Classe -GenericName[ru]=Просмотр классов -GenericName[sk]=Pohľad na triedy -GenericName[sl]=Prikaz razreda -GenericName[sr]=Преглед класа -GenericName[sr@Latn]=Pregled klasa -GenericName[sv]=Klassvisning -GenericName[ta]=வகுப்புக்காட்சி -GenericName[tg]=Намоиши синфҳо -GenericName[tr]=Sınıf Görünümü -GenericName[zh_CN]=类查看器 -GenericName[zh_TW]=類別檢視 -ServiceTypes=TDevelop/CodeBrowserFrontend -X-TDE-Library=libtdevclassview -X-TDevelop-Version=5 -X-TDevelop-Scope=Project -X-TDevelop-Properties=CodeNavigation diff --git a/parts/ctags2/CMakeLists.txt b/parts/ctags2/CMakeLists.txt index a88415d6..a8f4b582 100644 --- a/parts/ctags2/CMakeLists.txt +++ b/parts/ctags2/CMakeLists.txt @@ -27,13 +27,13 @@ link_directories( ##### other data ################################ -install( FILES tdevctags2.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevpart_ctags2.rc DESTINATION ${DATA_INSTALL_DIR}/tdevctags2 ) +install( FILES kdevctags2.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevpart_ctags2.rc DESTINATION ${DATA_INSTALL_DIR}/kdevctags2 ) -##### libtdevctags2 (module) #################### +##### libkdevctags2 (module) #################### -tde_add_kpart( libtdevctags2 AUTOMOC +tde_add_kpart( libkdevctags2 AUTOMOC SOURCES ctags2_part.cpp readtags.c ctags2_widgetbase.ui ctags2_widget.cpp tags.cpp ctagskinds.cpp diff --git a/parts/ctags2/Makefile.am b/parts/ctags2/Makefile.am index f12fdada..f92a819c 100644 --- a/parts/ctags2/Makefile.am +++ b/parts/ctags2/Makefile.am @@ -1,11 +1,11 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevctags2.la -libtdevctags2_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevctags2_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevctags2.la +libkdevctags2_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevctags2_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevctags2_la_SOURCES = ctags2_part.cpp readtags.c ctags2_widgetbase.ui \ +libkdevctags2_la_SOURCES = ctags2_part.cpp readtags.c ctags2_widgetbase.ui \ ctags2_widget.cpp tags.cpp ctagskinds.cpp ctags2_settingswidgetbase.ui \ ctags2_settingswidget.cpp ctags2_selecttagfilebase.ui ctags2_selecttagfile.cpp \ ctags2_createtagfilebase.ui ctags2_createtagfile.cpp @@ -13,10 +13,10 @@ libtdevctags2_la_SOURCES = ctags2_part.cpp readtags.c ctags2_widgetbase.ui \ METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevctags2.desktop +service_DATA = kdevctags2.desktop -rc_DATA = tdevpart_ctags2.rc -rcdir = $(kde_datadir)/tdevctags2 +rc_DATA = kdevpart_ctags2.rc +rcdir = $(kde_datadir)/kdevctags2 noinst_HEADERS = ctags2_widget.h tags.h readtags.h ctagskinds.h \ ctags2_settingswidget.h diff --git a/parts/ctags2/ctags2_part.cpp b/parts/ctags2/ctags2_part.cpp index 371ff7e5..324ded8a 100644 --- a/parts/ctags2/ctags2_part.cpp +++ b/parts/ctags2/ctags2_part.cpp @@ -31,16 +31,16 @@ #include #include -#include "tdevappfrontend.h" -#include -#include -#include -#include -#include -#include +#include "kdevappfrontend.h" +#include +#include +#include +#include +#include +#include #include "configwidgetproxy.h" #include "domutil.h" -#include "tdeveditorutil.h" +#include "kdeveditorutil.h" #include "ctags2_settingswidget.h" #include "ctags2_widget.h" @@ -54,15 +54,15 @@ namespace ctags #include "readtags.h" } -typedef TDevGenericFactory CTags2Factory; -static const TDevPluginInfo data("tdevctags2"); -K_EXPORT_COMPONENT_FACTORY( libtdevctags2, CTags2Factory( data ) ) +typedef KDevGenericFactory CTags2Factory; +static const KDevPluginInfo data("kdevctags2"); +K_EXPORT_COMPONENT_FACTORY( libkdevctags2, CTags2Factory( data ) ) CTags2Part::CTags2Part(TQObject *parent, const char *name, const TQStringList& ) - : TDevPlugin(&data, parent, name ? name : "ctags2Part" ) + : KDevPlugin(&data, parent, name ? name : "ctags2Part" ) { setInstance(CTags2Factory::instance()); - setXMLFile("tdevpart_ctags2.rc"); + setXMLFile("kdevpart_ctags2.rc"); TQDomDocument & dom = *projectDom(); TQString customTagFile = DomUtil::readEntry( dom, "/ctagspart/customTagfilePath" ); @@ -164,7 +164,7 @@ bool CTags2Part::createTagsFile(const TQString& tagFile, const TQString& dir) commandline += " "; commandline += dir; - if (TDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) + if (KDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) appFrontend->startAppCommand(dir, commandline, false); return true; @@ -330,7 +330,7 @@ int CTags2Part::getFileLineFromPattern( KURL const & url, TQString const & patte void CTags2Part::slotLookupDeclaration( ) { - m_contextString = TDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); + m_contextString = KDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); if ( !m_contextString.isEmpty() ) { slotGotoDeclaration(); @@ -339,7 +339,7 @@ void CTags2Part::slotLookupDeclaration( ) void CTags2Part::slotLookupDefinition( ) { - m_contextString = TDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); + m_contextString = KDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); if ( !m_contextString.isEmpty() ) { slotGotoDefinition(); @@ -348,7 +348,7 @@ void CTags2Part::slotLookupDefinition( ) void CTags2Part::slotLookup( ) { - m_contextString = TDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); + m_contextString = KDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); if ( !m_contextString.isEmpty() ) { slotGotoTag(); diff --git a/parts/ctags2/ctags2_part.h b/parts/ctags2/ctags2_part.h index ca33e801..93af5f7f 100644 --- a/parts/ctags2/ctags2_part.h +++ b/parts/ctags2/ctags2_part.h @@ -9,13 +9,13 @@ * * ***************************************************************************/ -#ifndef __TDEVPART_CTAGS2_H__ -#define __TDEVPART_CTAGS2_H__ +#ifndef __KDEVPART_CTAGS2_H__ +#define __KDEVPART_CTAGS2_H__ #include #include -#include +#include #include "tags.h" class TQPopupMenu; @@ -26,7 +26,7 @@ class CTags2Widget; class ConfigWidgetProxy; class KDialogBase; -class CTags2Part : public TDevPlugin +class CTags2Part : public KDevPlugin { Q_OBJECT diff --git a/parts/ctags2/ctags2_settingswidget.cpp b/parts/ctags2/ctags2_settingswidget.cpp index c44f91d6..b45a41be 100644 --- a/parts/ctags2/ctags2_settingswidget.cpp +++ b/parts/ctags2/ctags2_settingswidget.cpp @@ -15,13 +15,13 @@ #include #include -#include +#include #include #include #include #include #include -#include +#include #include #include "ctags2_settingswidget.h" diff --git a/parts/ctags2/ctags2_widget.cpp b/parts/ctags2/ctags2_widget.cpp index cb44937d..bd1b138d 100644 --- a/parts/ctags2/ctags2_widget.cpp +++ b/parts/ctags2/ctags2_widget.cpp @@ -22,8 +22,8 @@ #include #include -#include -#include +#include +#include #include "ctags2_widget.h" #include "tags.h" diff --git a/parts/ctags2/kdevctags2.desktop b/parts/ctags2/kdevctags2.desktop new file mode 100644 index 00000000..db79f503 --- /dev/null +++ b/parts/ctags2/kdevctags2.desktop @@ -0,0 +1,82 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Icon=tdevelop +Comment=CTags is a source navigation tool with support for many languages. When loaded it provides a context menu for finding type declarations/definitions and also a query dialog. http://ctags.sourceforge.net/ +Comment[ca]=CTags és una eina de navegació de codi font amb suport per a diversos llenguatges. En carregar-se proporciona un menú de context per a localitzar les declaracions/definicions de tipus i també un diàleg de consultes. http://ctags.sourceforge.net/ +Comment[da]=CTags er et kildenavigationsværktøj med støtte for mange sprog. Når det er indlæst sørger det for en sammenhængsmenu til at finde type-deklarationer/definitioner og også en forespørgselsdialog. http://ctags.sourceforge.net/ +Comment[de]=CTags ist ein Navigationswerkzeug, das viele Sprachen unterstützt. Ist es geladen, bietet es ein Kontextmenü zum Suchen von Typ-Deklarationen und -Definitionen und einen Abfragedialog im Menü "Werkzeuge". http://ctags.sourceforge.net/ +Comment[el]=Το CTags είναι ένα εργαλείο πλοήγησης κώδικα με υποστήριξη πολλών γλωσσών. Όταν φορτωθεί προσφέρει ένα σχετικό μενού εύρεσης δηλώσεων/ορισμών τύπων και ένα διάλογο αναζήτησης. http://ctags.sourceforge.net/ +Comment[en_GB]=CTags is a source navigation tool with support for many languages. When loaded it provides a context menu for finding type declarations/definitions and also a query dialogue. http://ctags.sourceforge.net/ +Comment[es]=CTags es una herramienta de navegación del código fuente con soporte para varios lenguajes. Al cargarse, proporciona un menú contextual para localizar las declaraciones/definiciones de tipos y también un diálogo de consultas. http://ctags.sourceforge.net/ +Comment[et]=CTags on liikumisvahend paljude keelte toega. Laadimisel pakub see kontekstimenüüd deklaratsioonide/definitsioonide tüübi leidmiseks, samuti päringudialoogi tööriistade menüü vahendusel. Vaata internetis http://ctags.sourceforge.net/ +Comment[eu]=CTags hizkuntza askotako euskarria duen iturburu nabigazio tresna bat da. Kargatzean mota deklarazio/definizioak aurkitzeko testuinguru menu bat eskeintzen du eta baita kontsulta elkarrizketa-koadro bat ere Tresnak menuan.http://ctags.sourceforge.net/ +Comment[fa]=CTags یک ابزار ناوش منبع با پشتیبانی از زبانهای زیادی است. در هنگام بارگذاری، یک گزینگان متن برای یافتن تعاریف/اعلانهای نوع و همچنین یک محاورۀ پرس‌وجو فراهم می‌کند. http://ctags.sourceforge.net/ +Comment[fr]=CTags est un outil de navigation dans les sources comprenant une prise en charge pour de nombreux langages. Une fois chargé, il fournit un menu contextuel pour la recherche de déclarations / définitions de types, ainsi qu'une boîte de dialogue de requête. http://ctags.sourceforge.net/ +Comment[gl]=CTags é unha ferramenta para a navegación de código con soporte para moitas linguaxes. Cando se carga proporciona un menú contextual para atopar declaracións/definicións de tipos e tamén un diálogo de peticións. http://ctags.sourceforge.net/ +Comment[hu]=A CTags egy többféle nyelvet is támogató forrásnavigációs eszköz. Lehetővé teszi felbukkanó menüből típusdeklarációk és -megvalósítások keresését, lekérdezését. http://ctags.sourceforge.net/ +Comment[it]=CTags è uno strumento per la navigazione nel codice sorgente con supporto per molti linguaggi. Quando caricato offre un menu contestuale per ricercare i tipi di dichiarazioni/definizioni e anche una finestra per compiere interrogazioni. http://ctags.sourceforge.net/ +Comment[ja]=CTags は色々な言語をサポートしたソースナビゲーションツールです。読み込まれると、型の宣言や定義を見つけたり、ツールメニューの中で対話的な問い合わせを行うコンテキストメニューを提供します。http://ctags.sourceforge.net/ +Comment[ms]=CTags adalah alatan pengemudi sumber dengan sokongan untuk banyak bahasa. Apabila dimuatkan ia menyediakan menu konteks untuk mencari pengisytiharan/definisi dan juga dialog pertanyaan. http://ctags.sourceforge.net/ +Comment[nds]=CTags is en Navigatschoonwarktüüch, wat vele Spraken ünnerstütt. Wenn dat laadt is, stellt dat en Rechtsklickmenü för't Söken na Typ-Deklaratschonen un -Definitschonen praat, un ok noch en Affraagdialoog. http://ctags.sourceforge.net/ +Comment[ne]=CTags स्रोत नेभिगेसन उपकरण हो जसले धेरै भाषा समर्थन गर्दछ । लोड गरेपछि यसले टाइप घोषणा/परिभाषा र क्वेरी संवाद पनि फेला पार्नका लागि प्रसङ्ग मेनु प्रदान गर्दछ । http://ctags.sourceforge.net/ +Comment[nl]=CTags is een krachtige tool voor het navigeren in broncode met ondersteuning voor veel talen. Wanneer de plugin geladen is biedt deze een contextmenu voor het vinden van typedeclaraties, en ook een ondervragingsdialoog. Web: http://ctags.sourceforge.net/ +Comment[pl]=CTags to narzędzie do nawigacji w kodzie źródłowym obsługujące wiele języków. Po wczytaniu udostępnia menu kontekstowe pozwalające znajdować deklaracje/definicje oraz okno dialogowe w menu Narzędzia. http://ctags.sourceforge.net/ +Comment[pt]=O CTags é uma ferramenta de navegação no código com suporte para várias linguagens. Quando é carregado, oferece um menu de contexto para encontrar as declarações/definições de tipos, assim como uma janela de pesquisa. http://ctags.sourceforge.net/ +Comment[pt_BR]=CTags é uma ferramenta de navegação de código com suporte para muitas linguagens. Quando carregada ela oferece um menu de contexto para encontrar declarações/definições de tipo e também um diálogo de consulta no menu Ferramentas. http://ctags.sourceforge.net/ +Comment[ru]=CTags - это средство навигации по коду, поддерживающее многие языки. Будучи загружено, оно предоставляет контекстное меню для нахождения описания и определения типа выбранного символа, а также диалог запроса. http://ctags.sourceforge.net/ +Comment[sk]=CTags je navigačný nástroj pre zdrojový kód pre veľa jazykov.Po načítaní poskytuje kontextové menu pre hľadanie deklarácie/definície a tiež vyhľadávací dialóg. http://ctags.sourceforge.net/ +Comment[sr]=CTags је алат за навигацију кроз изворни кôд са подршком за многе језике. Када је учитан, обезбеђује контекстни мени за проналажење декларација/дефиниција типова, а такође и дијалог за упите. http://ctags.sourceforge.net/ +Comment[sr@Latn]=CTags je alat za navigaciju kroz izvorni kôd sa podrškom za mnoge jezike. Kada je učitan, obezbeđuje kontekstni meni za pronalaženje deklaracija/definicija tipova, a takođe i dijalog za upite. http://ctags.sourceforge.net/ +Comment[sv]=Ctags är ett verktyg för källkodsnavigering med stöd för många språk. När det laddats tillhandahåller det en sammanhangsberoende meny för att hitta typdeklarationer eller definitioner, och dessutom en frågedialogruta. http://ctags.sourceforge.net/ +Comment[ta]=Cதத்தல்கள் இது ஒரு மூல வழி செலுத்தும் கருவி இது நிறைய மொழிகளை ஆதரிக்கும். ஏற்றும் பொழுது எழுத்து உருவை காண உதவும் ஒரு பட்டியலும் மற்றும் கருவிப்பட்டியலில் கேள்வி உரையாடல்களும் இது அளிக்கும்.http://ctags.sourceforge.net/ +Comment[tg]=CTags-ин воситаи навигадсия дар код мебошад, ки бисёр забонҳоро дастрасӣ менамояд. Ҳангоми пурбор намудан, вай менюи қаринагинро пешниҳод менамояд, барои ёфтани тасвир ва муаян сохтани намуди нишонаҳои интихоб карда шуда ва боз гуфтугӯи дархостро мегузорад. http://ctags.sourceforge.net/ +Comment[tr]=CTags birçok dili destekleyen bir kaynak dolaşım aracıdır. Yüklendiğinde tip tanımlamalarını bulmayı sağlayan bir bağlam menüsü ve bir sorgu penceresi sunar. +Comment[zh_CN]=CTags 是一个支持多种语言源文件浏览的工具。启动后在上下文菜单中提供查找类型的声明/定义,并在工具菜单中提供查询对话框。http://ctags.sourceforge.net/ +Comment[zh_TW]=CTags 是支援許多種語言的程式源碼導覽工具。它載入後會提供一個選單,尋找型態的宣告、定義,並提供一個查詢對話框。http://ctags.sourceforge.net/ +Name=KDevCTags2 +Name[da]=TDevelop CTags2 +Name[nds]=TDevelop-CTags2 +Name[sk]=KDev CTags2 +Name[sv]=TDevelop ctags-2 +Name[tg]=KDevCТегҳо2 +Name[zh_TW]=TDevelop CTags2 +GenericName=CTags Frontend +GenericName[ca]=Entorn per a CTags +GenericName[da]=CTags-grænseflade +GenericName[de]=Unterstützung für CTags +GenericName[el]=Πρόγραμμα CTags +GenericName[es]=Entorno de CTags +GenericName[et]=CTagsi kasutajaliides +GenericName[eu]=CTags interfazea +GenericName[fa]=پایانۀ CTags +GenericName[fr]=Interface pour CTags +GenericName[ga]=Comhéadan CTags +GenericName[gl]=Frontal para CTags +GenericName[hi]=सी-टैग्स-फ्रन्टएन्ड +GenericName[hu]=CTags-kezelő +GenericName[it]=Interfaccia a CTags +GenericName[ja]=CTags フロントエンド +GenericName[ms]=Antaradepan CTags +GenericName[nds]=CTags-Böversiet +GenericName[ne]=CTags फ्रेन्टइन्ड +GenericName[nl]=Frontend voor CTags +GenericName[pl]=Interfejs do CTags +GenericName[pt]=Interface de CTags +GenericName[pt_BR]=Interface do CTags +GenericName[ru]=Интерфейс к CTags +GenericName[sk]=CTags rozhranie +GenericName[sl]=Vmesnik za CTags +GenericName[sr]=Интерфејс CTags-а +GenericName[sr@Latn]=Interfejs CTags-a +GenericName[sv]=Ctags-gränssnitt +GenericName[ta]=CTags முன்பகுதி +GenericName[tg]=Интерфейс дар CTags +GenericName[tr]=CTags Önucu +GenericName[zh_CN]=CTags前端 +GenericName[zh_TW]=CTags 前端介面 +ServiceTypes=TDevelop/Plugin +X-TDevelop-Scope=Project +X-TDE-Library=libkdevctags2 +X-TDevelop-Version=5 +X-TDevelop-Properties=CodeNavigation diff --git a/parts/ctags2/kdevpart_ctags2.rc b/parts/ctags2/kdevpart_ctags2.rc new file mode 100644 index 00000000..e8745b3b --- /dev/null +++ b/parts/ctags2/kdevpart_ctags2.rc @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/parts/ctags2/tdevctags2.desktop b/parts/ctags2/tdevctags2.desktop deleted file mode 100644 index 86720c8e..00000000 --- a/parts/ctags2/tdevctags2.desktop +++ /dev/null @@ -1,82 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Icon=tdevelop -Comment=CTags is a source navigation tool with support for many languages. When loaded it provides a context menu for finding type declarations/definitions and also a query dialog. http://ctags.sourceforge.net/ -Comment[ca]=CTags és una eina de navegació de codi font amb suport per a diversos llenguatges. En carregar-se proporciona un menú de context per a localitzar les declaracions/definicions de tipus i també un diàleg de consultes. http://ctags.sourceforge.net/ -Comment[da]=CTags er et kildenavigationsværktøj med støtte for mange sprog. Når det er indlæst sørger det for en sammenhængsmenu til at finde type-deklarationer/definitioner og også en forespørgselsdialog. http://ctags.sourceforge.net/ -Comment[de]=CTags ist ein Navigationswerkzeug, das viele Sprachen unterstützt. Ist es geladen, bietet es ein Kontextmenü zum Suchen von Typ-Deklarationen und -Definitionen und einen Abfragedialog im Menü "Werkzeuge". http://ctags.sourceforge.net/ -Comment[el]=Το CTags είναι ένα εργαλείο πλοήγησης κώδικα με υποστήριξη πολλών γλωσσών. Όταν φορτωθεί προσφέρει ένα σχετικό μενού εύρεσης δηλώσεων/ορισμών τύπων και ένα διάλογο αναζήτησης. http://ctags.sourceforge.net/ -Comment[en_GB]=CTags is a source navigation tool with support for many languages. When loaded it provides a context menu for finding type declarations/definitions and also a query dialogue. http://ctags.sourceforge.net/ -Comment[es]=CTags es una herramienta de navegación del código fuente con soporte para varios lenguajes. Al cargarse, proporciona un menú contextual para localizar las declaraciones/definiciones de tipos y también un diálogo de consultas. http://ctags.sourceforge.net/ -Comment[et]=CTags on liikumisvahend paljude keelte toega. Laadimisel pakub see kontekstimenüüd deklaratsioonide/definitsioonide tüübi leidmiseks, samuti päringudialoogi tööriistade menüü vahendusel. Vaata internetis http://ctags.sourceforge.net/ -Comment[eu]=CTags hizkuntza askotako euskarria duen iturburu nabigazio tresna bat da. Kargatzean mota deklarazio/definizioak aurkitzeko testuinguru menu bat eskeintzen du eta baita kontsulta elkarrizketa-koadro bat ere Tresnak menuan.http://ctags.sourceforge.net/ -Comment[fa]=CTags یک ابزار ناوش منبع با پشتیبانی از زبانهای زیادی است. در هنگام بارگذاری، یک گزینگان متن برای یافتن تعاریف/اعلانهای نوع و همچنین یک محاورۀ پرس‌وجو فراهم می‌کند. http://ctags.sourceforge.net/ -Comment[fr]=CTags est un outil de navigation dans les sources comprenant une prise en charge pour de nombreux langages. Une fois chargé, il fournit un menu contextuel pour la recherche de déclarations / définitions de types, ainsi qu'une boîte de dialogue de requête. http://ctags.sourceforge.net/ -Comment[gl]=CTags é unha ferramenta para a navegación de código con soporte para moitas linguaxes. Cando se carga proporciona un menú contextual para atopar declaracións/definicións de tipos e tamén un diálogo de peticións. http://ctags.sourceforge.net/ -Comment[hu]=A CTags egy többféle nyelvet is támogató forrásnavigációs eszköz. Lehetővé teszi felbukkanó menüből típusdeklarációk és -megvalósítások keresését, lekérdezését. http://ctags.sourceforge.net/ -Comment[it]=CTags è uno strumento per la navigazione nel codice sorgente con supporto per molti linguaggi. Quando caricato offre un menu contestuale per ricercare i tipi di dichiarazioni/definizioni e anche una finestra per compiere interrogazioni. http://ctags.sourceforge.net/ -Comment[ja]=CTags は色々な言語をサポートしたソースナビゲーションツールです。読み込まれると、型の宣言や定義を見つけたり、ツールメニューの中で対話的な問い合わせを行うコンテキストメニューを提供します。http://ctags.sourceforge.net/ -Comment[ms]=CTags adalah alatan pengemudi sumber dengan sokongan untuk banyak bahasa. Apabila dimuatkan ia menyediakan menu konteks untuk mencari pengisytiharan/definisi dan juga dialog pertanyaan. http://ctags.sourceforge.net/ -Comment[nds]=CTags is en Navigatschoonwarktüüch, wat vele Spraken ünnerstütt. Wenn dat laadt is, stellt dat en Rechtsklickmenü för't Söken na Typ-Deklaratschonen un -Definitschonen praat, un ok noch en Affraagdialoog. http://ctags.sourceforge.net/ -Comment[ne]=CTags स्रोत नेभिगेसन उपकरण हो जसले धेरै भाषा समर्थन गर्दछ । लोड गरेपछि यसले टाइप घोषणा/परिभाषा र क्वेरी संवाद पनि फेला पार्नका लागि प्रसङ्ग मेनु प्रदान गर्दछ । http://ctags.sourceforge.net/ -Comment[nl]=CTags is een krachtige tool voor het navigeren in broncode met ondersteuning voor veel talen. Wanneer de plugin geladen is biedt deze een contextmenu voor het vinden van typedeclaraties, en ook een ondervragingsdialoog. Web: http://ctags.sourceforge.net/ -Comment[pl]=CTags to narzędzie do nawigacji w kodzie źródłowym obsługujące wiele języków. Po wczytaniu udostępnia menu kontekstowe pozwalające znajdować deklaracje/definicje oraz okno dialogowe w menu Narzędzia. http://ctags.sourceforge.net/ -Comment[pt]=O CTags é uma ferramenta de navegação no código com suporte para várias linguagens. Quando é carregado, oferece um menu de contexto para encontrar as declarações/definições de tipos, assim como uma janela de pesquisa. http://ctags.sourceforge.net/ -Comment[pt_BR]=CTags é uma ferramenta de navegação de código com suporte para muitas linguagens. Quando carregada ela oferece um menu de contexto para encontrar declarações/definições de tipo e também um diálogo de consulta no menu Ferramentas. http://ctags.sourceforge.net/ -Comment[ru]=CTags - это средство навигации по коду, поддерживающее многие языки. Будучи загружено, оно предоставляет контекстное меню для нахождения описания и определения типа выбранного символа, а также диалог запроса. http://ctags.sourceforge.net/ -Comment[sk]=CTags je navigačný nástroj pre zdrojový kód pre veľa jazykov.Po načítaní poskytuje kontextové menu pre hľadanie deklarácie/definície a tiež vyhľadávací dialóg. http://ctags.sourceforge.net/ -Comment[sr]=CTags је алат за навигацију кроз изворни кôд са подршком за многе језике. Када је учитан, обезбеђује контекстни мени за проналажење декларација/дефиниција типова, а такође и дијалог за упите. http://ctags.sourceforge.net/ -Comment[sr@Latn]=CTags je alat za navigaciju kroz izvorni kôd sa podrškom za mnoge jezike. Kada je učitan, obezbeđuje kontekstni meni za pronalaženje deklaracija/definicija tipova, a takođe i dijalog za upite. http://ctags.sourceforge.net/ -Comment[sv]=Ctags är ett verktyg för källkodsnavigering med stöd för många språk. När det laddats tillhandahåller det en sammanhangsberoende meny för att hitta typdeklarationer eller definitioner, och dessutom en frågedialogruta. http://ctags.sourceforge.net/ -Comment[ta]=Cதத்தல்கள் இது ஒரு மூல வழி செலுத்தும் கருவி இது நிறைய மொழிகளை ஆதரிக்கும். ஏற்றும் பொழுது எழுத்து உருவை காண உதவும் ஒரு பட்டியலும் மற்றும் கருவிப்பட்டியலில் கேள்வி உரையாடல்களும் இது அளிக்கும்.http://ctags.sourceforge.net/ -Comment[tg]=CTags-ин воситаи навигадсия дар код мебошад, ки бисёр забонҳоро дастрасӣ менамояд. Ҳангоми пурбор намудан, вай менюи қаринагинро пешниҳод менамояд, барои ёфтани тасвир ва муаян сохтани намуди нишонаҳои интихоб карда шуда ва боз гуфтугӯи дархостро мегузорад. http://ctags.sourceforge.net/ -Comment[tr]=CTags birçok dili destekleyen bir kaynak dolaşım aracıdır. Yüklendiğinde tip tanımlamalarını bulmayı sağlayan bir bağlam menüsü ve bir sorgu penceresi sunar. -Comment[zh_CN]=CTags 是一个支持多种语言源文件浏览的工具。启动后在上下文菜单中提供查找类型的声明/定义,并在工具菜单中提供查询对话框。http://ctags.sourceforge.net/ -Comment[zh_TW]=CTags 是支援許多種語言的程式源碼導覽工具。它載入後會提供一個選單,尋找型態的宣告、定義,並提供一個查詢對話框。http://ctags.sourceforge.net/ -Name=KDevCTags2 -Name[da]=TDevelop CTags2 -Name[nds]=TDevelop-CTags2 -Name[sk]=KDev CTags2 -Name[sv]=TDevelop ctags-2 -Name[tg]=KDevCТегҳо2 -Name[zh_TW]=TDevelop CTags2 -GenericName=CTags Frontend -GenericName[ca]=Entorn per a CTags -GenericName[da]=CTags-grænseflade -GenericName[de]=Unterstützung für CTags -GenericName[el]=Πρόγραμμα CTags -GenericName[es]=Entorno de CTags -GenericName[et]=CTagsi kasutajaliides -GenericName[eu]=CTags interfazea -GenericName[fa]=پایانۀ CTags -GenericName[fr]=Interface pour CTags -GenericName[ga]=Comhéadan CTags -GenericName[gl]=Frontal para CTags -GenericName[hi]=सी-टैग्स-फ्रन्टएन्ड -GenericName[hu]=CTags-kezelő -GenericName[it]=Interfaccia a CTags -GenericName[ja]=CTags フロントエンド -GenericName[ms]=Antaradepan CTags -GenericName[nds]=CTags-Böversiet -GenericName[ne]=CTags फ्रेन्टइन्ड -GenericName[nl]=Frontend voor CTags -GenericName[pl]=Interfejs do CTags -GenericName[pt]=Interface de CTags -GenericName[pt_BR]=Interface do CTags -GenericName[ru]=Интерфейс к CTags -GenericName[sk]=CTags rozhranie -GenericName[sl]=Vmesnik za CTags -GenericName[sr]=Интерфејс CTags-а -GenericName[sr@Latn]=Interfejs CTags-a -GenericName[sv]=Ctags-gränssnitt -GenericName[ta]=CTags முன்பகுதி -GenericName[tg]=Интерфейс дар CTags -GenericName[tr]=CTags Önucu -GenericName[zh_CN]=CTags前端 -GenericName[zh_TW]=CTags 前端介面 -ServiceTypes=TDevelop/Plugin -X-TDevelop-Scope=Project -X-TDE-Library=libtdevctags2 -X-TDevelop-Version=5 -X-TDevelop-Properties=CodeNavigation diff --git a/parts/ctags2/tdevpart_ctags2.rc b/parts/ctags2/tdevpart_ctags2.rc deleted file mode 100644 index c217c256..00000000 --- a/parts/ctags2/tdevpart_ctags2.rc +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/parts/diff/CMakeLists.txt b/parts/diff/CMakeLists.txt index a4135dc6..09987fd7 100644 --- a/parts/diff/CMakeLists.txt +++ b/parts/diff/CMakeLists.txt @@ -26,13 +26,13 @@ link_directories( ##### other data ################################ -install( FILES tdevdiff.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevdiff.rc DESTINATION ${DATA_INSTALL_DIR}/tdevdiff ) +install( FILES kdevdiff.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevdiff.rc DESTINATION ${DATA_INSTALL_DIR}/kdevdiff ) -##### libtdevdiff (module) ###################### +##### libkdevdiff (module) ###################### -tde_add_kpart( libtdevdiff AUTOMOC +tde_add_kpart( libkdevdiff AUTOMOC SOURCES diffpart.cpp diffwidget.cpp LINK tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} diff --git a/parts/diff/Makefile.am b/parts/diff/Makefile.am index 3d9396eb..ea521442 100644 --- a/parts/diff/Makefile.am +++ b/parts/diff/Makefile.am @@ -3,16 +3,16 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions $(all_includes) -kde_module_LTLIBRARIES = libtdevdiff.la -libtdevdiff_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevdiff_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevdiff.la +libkdevdiff_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevdiff_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevdiff_la_SOURCES = diffpart.cpp diffwidget.cpp +libkdevdiff_la_SOURCES = diffpart.cpp diffwidget.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevdiff.desktop +service_DATA = kdevdiff.desktop -rcdir = $(kde_datadir)/tdevdiff -rc_DATA = tdevdiff.rc +rcdir = $(kde_datadir)/kdevdiff +rc_DATA = kdevdiff.rc diff --git a/parts/diff/diffpart.cpp b/parts/diff/diffpart.cpp index b48e8136..a0dbafdd 100644 --- a/parts/diff/diffpart.cpp +++ b/parts/diff/diffpart.cpp @@ -16,7 +16,7 @@ #include #include -#include +#include #include #include #include @@ -28,24 +28,24 @@ #include #include -#include "tdevcore.h" -#include "tdevmainwindow.h" -#include "tdevpartcontroller.h" -#include "tdevplugininfo.h" +#include "kdevcore.h" +#include "kdevmainwindow.h" +#include "kdevpartcontroller.h" +#include "kdevplugininfo.h" #include "diffdlg.h" #include "diffwidget.h" -static const TDevPluginInfo data("tdevdiff"); +static const KDevPluginInfo data("kdevdiff"); -typedef TDevGenericFactory DiffFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevdiff, DiffFactory( data ) ) +typedef KDevGenericFactory DiffFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevdiff, DiffFactory( data ) ) DiffPart::DiffPart(TQObject *parent, const char *name, const TQStringList &) - : TDevDiffFrontend(&data, parent, name ? name : "DiffPart"), proc(0) + : KDevDiffFrontend(&data, parent, name ? name : "DiffPart"), proc(0) { setInstance(DiffFactory::instance()); - setXMLFile("tdevdiff.rc"); + setXMLFile("kdevdiff.rc"); diffWidget = new DiffWidget(this, 0, "diffWidget"); diffWidget->setIcon( SmallIcon("editcopy") ); @@ -83,7 +83,7 @@ static bool urlIsEqual(const KURL &a, const KURL &b) return a == b; } -static KParts::ReadWritePart* partForURL(const KURL &url, TDevPartController* pc) +static KParts::ReadWritePart* partForURL(const KURL &url, KDevPartController* pc) { if ( !pc ) return 0; diff --git a/parts/diff/diffpart.h b/parts/diff/diffpart.h index 984c2c06..6fe89efe 100644 --- a/parts/diff/diffpart.h +++ b/parts/diff/diffpart.h @@ -15,8 +15,8 @@ #include #include -#include "tdevplugin.h" -#include "tdevdifffrontend.h" +#include "kdevplugin.h" +#include "kdevdifffrontend.h" class TQPopupMenu; class Context; @@ -24,7 +24,7 @@ class TDEProcess; class DiffWidget; class TQCString; -class DiffPart : public TDevDiffFrontend +class DiffPart : public KDevDiffFrontend { Q_OBJECT diff --git a/parts/diff/diffwidget.cpp b/parts/diff/diffwidget.cpp index 24435611..51dabcaf 100644 --- a/parts/diff/diffwidget.cpp +++ b/parts/diff/diffwidget.cpp @@ -31,7 +31,7 @@ #include #include -#include +#include #include "diffpart.h" #include "diffwidget.h" diff --git a/parts/diff/kdevdiff.desktop b/parts/diff/kdevdiff.desktop new file mode 100644 index 00000000..13b22e9f --- /dev/null +++ b/parts/diff/kdevdiff.desktop @@ -0,0 +1,84 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Difference Viewer +Comment[ca]=Visor de diferències +Comment[da]=Diff-fremviser +Comment[de]=Betrachter für Abweichungen +Comment[el]=Προβολέας διαφορών +Comment[es]=Visor de diferencias +Comment[et]=Erinevuste näitaja +Comment[eu]=Desberdintasun ikustailea +Comment[fa]=مشاهده‌گر تفاوت +Comment[fr]=Afficheur de différences +Comment[ga]=Amharcán Difríochtaí +Comment[gl]=Visor de diferenzas +Comment[hi]=भिन्नता प्रदर्शक +Comment[hu]=Fájlok közötti eltérések megjelenítése +Comment[it]=Visualizzatore di differenze +Comment[ja]=差分ビューア +Comment[ms]=Pelihat Perbezaan +Comment[nds]=En Verscheelkieker +Comment[ne]=फरक दृश्यकर्ता +Comment[nl]=Weergave van verschillen +Comment[pl]=Przeglądarka różnic +Comment[pt]=Visualizador de Diferenças +Comment[pt_BR]=Visualizador de Diferenças +Comment[ru]=Просмотр различий +Comment[sk]=Prezerač rozdielov +Comment[sl]=Pregledovalnik razlik +Comment[sr]=Програм за прегледање разлика +Comment[sr@Latn]=Program za pregledanje razlika +Comment[sv]=Visning av jämförelser +Comment[ta]=பாகுபாடு காட்சியாளர் +Comment[tg]=Намоишгари фарқкунанда +Comment[tr]=Fark Görüntüleyicisi +Comment[zh_CN]=差别查看器 +Comment[zh_TW]=比較檢視器 +Name=KDevDiff +Name[da]=TDevelop diff-fremviser +Name[de]=Abweichungsansicht (TDevelop) +Name[hi]=के-डेव-डिफ़ +Name[nds]=TDevelop-Verscheelkieker +Name[sk]=KDev rozdiel +Name[sv]=TDevelop jämför +Name[zh_TW]=TDevelop 比較 +GenericName=Difference Viewer +GenericName[ca]=Visor de diferències +GenericName[da]=Diff-fremviser +GenericName[de]=Betrachter für Abweichungen +GenericName[el]=Προβολέας διαφορών +GenericName[es]=Visor de diferencias +GenericName[et]=Erinevuste näitaja +GenericName[eu]=Desberdintasun ikustailea +GenericName[fa]=مشاهده‌گر تفاوت +GenericName[fr]=Afficheur de différences +GenericName[ga]=Amharcán Difríochtaí +GenericName[gl]=Visor de diferenzas +GenericName[hi]=भिन्नता प्रदर्शक +GenericName[hu]=Diff-megjelenítő +GenericName[it]=Visualizzatore delle differenze +GenericName[ja]=差分ビューア +GenericName[ms]=Pelihat Perbezaan +GenericName[nds]=Verscheelkieker +GenericName[ne]=फरक दृश्यकर्ता +GenericName[nl]=Weergave van verschillen +GenericName[pl]=Przeglądarka różnic +GenericName[pt]=Visualizador de Diferenças +GenericName[pt_BR]=Visualizador de Diferenças +GenericName[ru]=Просмотр различий +GenericName[sk]=Prezerač rozdielov +GenericName[sl]=Pregledovalnik razlik +GenericName[sr]=Програм за прегледање разлика +GenericName[sr@Latn]=Program za pregledanje razlika +GenericName[sv]=Visning av jämförelser +GenericName[ta]=வெவ்வேறு பார்வையாளர்கள் +GenericName[tg]=Намоишгари фарқкунанда +GenericName[tr]=Fark Görüntüleyicisi +GenericName[zh_CN]=差别查看器 +GenericName[zh_TW]=比較檢視器 +ServiceTypes=TDevelop/DiffFrontend +X-TDE-Library=libkdevdiff +X-TDevelop-Version=5 +X-TDevelop-Properties=CodeEditing +X-TDevelop-Scope=Core diff --git a/parts/diff/kdevdiff.rc b/parts/diff/kdevdiff.rc new file mode 100644 index 00000000..37059573 --- /dev/null +++ b/parts/diff/kdevdiff.rc @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/parts/diff/tdevdiff.desktop b/parts/diff/tdevdiff.desktop deleted file mode 100644 index db2d0428..00000000 --- a/parts/diff/tdevdiff.desktop +++ /dev/null @@ -1,84 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Difference Viewer -Comment[ca]=Visor de diferències -Comment[da]=Diff-fremviser -Comment[de]=Betrachter für Abweichungen -Comment[el]=Προβολέας διαφορών -Comment[es]=Visor de diferencias -Comment[et]=Erinevuste näitaja -Comment[eu]=Desberdintasun ikustailea -Comment[fa]=مشاهده‌گر تفاوت -Comment[fr]=Afficheur de différences -Comment[ga]=Amharcán Difríochtaí -Comment[gl]=Visor de diferenzas -Comment[hi]=भिन्नता प्रदर्शक -Comment[hu]=Fájlok közötti eltérések megjelenítése -Comment[it]=Visualizzatore di differenze -Comment[ja]=差分ビューア -Comment[ms]=Pelihat Perbezaan -Comment[nds]=En Verscheelkieker -Comment[ne]=फरक दृश्यकर्ता -Comment[nl]=Weergave van verschillen -Comment[pl]=Przeglądarka różnic -Comment[pt]=Visualizador de Diferenças -Comment[pt_BR]=Visualizador de Diferenças -Comment[ru]=Просмотр различий -Comment[sk]=Prezerač rozdielov -Comment[sl]=Pregledovalnik razlik -Comment[sr]=Програм за прегледање разлика -Comment[sr@Latn]=Program za pregledanje razlika -Comment[sv]=Visning av jämförelser -Comment[ta]=பாகுபாடு காட்சியாளர் -Comment[tg]=Намоишгари фарқкунанда -Comment[tr]=Fark Görüntüleyicisi -Comment[zh_CN]=差别查看器 -Comment[zh_TW]=比較檢視器 -Name=TDevDiff -Name[da]=TDevelop diff-fremviser -Name[de]=Abweichungsansicht (TDevelop) -Name[hi]=के-डेव-डिफ़ -Name[nds]=TDevelop-Verscheelkieker -Name[sk]=KDev rozdiel -Name[sv]=TDevelop jämför -Name[zh_TW]=TDevelop 比較 -GenericName=Difference Viewer -GenericName[ca]=Visor de diferències -GenericName[da]=Diff-fremviser -GenericName[de]=Betrachter für Abweichungen -GenericName[el]=Προβολέας διαφορών -GenericName[es]=Visor de diferencias -GenericName[et]=Erinevuste näitaja -GenericName[eu]=Desberdintasun ikustailea -GenericName[fa]=مشاهده‌گر تفاوت -GenericName[fr]=Afficheur de différences -GenericName[ga]=Amharcán Difríochtaí -GenericName[gl]=Visor de diferenzas -GenericName[hi]=भिन्नता प्रदर्शक -GenericName[hu]=Diff-megjelenítő -GenericName[it]=Visualizzatore delle differenze -GenericName[ja]=差分ビューア -GenericName[ms]=Pelihat Perbezaan -GenericName[nds]=Verscheelkieker -GenericName[ne]=फरक दृश्यकर्ता -GenericName[nl]=Weergave van verschillen -GenericName[pl]=Przeglądarka różnic -GenericName[pt]=Visualizador de Diferenças -GenericName[pt_BR]=Visualizador de Diferenças -GenericName[ru]=Просмотр различий -GenericName[sk]=Prezerač rozdielov -GenericName[sl]=Pregledovalnik razlik -GenericName[sr]=Програм за прегледање разлика -GenericName[sr@Latn]=Program za pregledanje razlika -GenericName[sv]=Visning av jämförelser -GenericName[ta]=வெவ்வேறு பார்வையாளர்கள் -GenericName[tg]=Намоишгари фарқкунанда -GenericName[tr]=Fark Görüntüleyicisi -GenericName[zh_CN]=差别查看器 -GenericName[zh_TW]=比較檢視器 -ServiceTypes=TDevelop/DiffFrontend -X-TDE-Library=libtdevdiff -X-TDevelop-Version=5 -X-TDevelop-Properties=CodeEditing -X-TDevelop-Scope=Core diff --git a/parts/diff/tdevdiff.rc b/parts/diff/tdevdiff.rc deleted file mode 100644 index ca944508..00000000 --- a/parts/diff/tdevdiff.rc +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/parts/distpart/CMakeLists.txt b/parts/distpart/CMakeLists.txt index 586b5346..15fcb85e 100644 --- a/parts/distpart/CMakeLists.txt +++ b/parts/distpart/CMakeLists.txt @@ -27,13 +27,13 @@ link_directories( ##### other data ################################ -install( FILES tdevdistpart.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevpart_distpart.rc DESTINATION ${DATA_INSTALL_DIR}/tdevdistpart ) +install( FILES kdevdistpart.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevpart_distpart.rc DESTINATION ${DATA_INSTALL_DIR}/kdevdistpart ) -##### libtdevdistpart (module) ################## +##### libkdevdistpart (module) ################## -tde_add_kpart( libtdevdistpart AUTOMOC +tde_add_kpart( libkdevdistpart AUTOMOC SOURCES distpart_ui.ui distpart_part.cpp distpart_widget.cpp packagebase.cpp lsmsupport.cpp specsupport.cpp diff --git a/parts/distpart/Makefile.am b/parts/distpart/Makefile.am index 8b5e69db..52f4a5ba 100644 --- a/parts/distpart/Makefile.am +++ b/parts/distpart/Makefile.am @@ -1,16 +1,16 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevdistpart.la -libtdevdistpart_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevdistpart_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevdistpart.la +libkdevdistpart_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevdistpart_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevdistpart_la_SOURCES = distpart_ui.ui distpart_part.cpp distpart_widget.cpp packagebase.cpp lsmsupport.cpp specsupport.cpp +libkdevdistpart_la_SOURCES = distpart_ui.ui distpart_part.cpp distpart_widget.cpp packagebase.cpp lsmsupport.cpp specsupport.cpp METASOURCES = AUTO KDEICON = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevdistpart.desktop +service_DATA = kdevdistpart.desktop -rc_DATA = tdevpart_distpart.rc -rcdir = $(kde_datadir)/tdevdistpart +rc_DATA = kdevpart_distpart.rc +rcdir = $(kde_datadir)/kdevdistpart diff --git a/parts/distpart/distpart_part.cpp b/parts/distpart/distpart_part.cpp index 01ef30b0..e8a3e11a 100644 --- a/parts/distpart/distpart_part.cpp +++ b/parts/distpart/distpart_part.cpp @@ -23,27 +23,27 @@ #include #include -#include +#include #include -#include "tdevcore.h" -#include +#include "kdevcore.h" +#include #include "distpart_widget.h" #include -typedef TDevGenericFactory DistpartFactory; -static const TDevPluginInfo data("tdevdistpart"); -K_EXPORT_COMPONENT_FACTORY( libtdevdistpart, DistpartFactory( data ) ) +typedef KDevGenericFactory DistpartFactory; +static const KDevPluginInfo data("kdevdistpart"); +K_EXPORT_COMPONENT_FACTORY( libkdevdistpart, DistpartFactory( data ) ) DistpartPart::DistpartPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin(&data, parent, name ? name : "DistpartPart") { + : KDevPlugin(&data, parent, name ? name : "DistpartPart") { kdDebug(9007) << "DistpartPart::DistpartPart()" << endl; setInstance(DistpartFactory::instance()); - setXMLFile("tdevpart_distpart.rc"); + setXMLFile("kdevpart_distpart.rc"); m_action = new TDEAction( i18n("Distribution && Publishing"), "package", 0, this, TQT_SLOT(show()), diff --git a/parts/distpart/distpart_part.h b/parts/distpart/distpart_part.h index d1d05a24..aa019c4d 100644 --- a/parts/distpart/distpart_part.h +++ b/parts/distpart/distpart_part.h @@ -19,12 +19,12 @@ ***************************************************************************/ -#ifndef __TDEVPART_DISTPART_H__ -#define __TDEVPART_DISTPART_H__ +#ifndef __KDEVPART_DISTPART_H__ +#define __KDEVPART_DISTPART_H__ #include -#include +#include #include #include "packagebase.h" @@ -32,7 +32,7 @@ class DistpartDialog; class KDialogBase; -class DistpartPart : public TDevPlugin { +class DistpartPart : public KDevPlugin { Q_OBJECT diff --git a/parts/distpart/distpart_widget.cpp b/parts/distpart/distpart_widget.cpp index 0999ca72..c628fe26 100644 --- a/parts/distpart/distpart_widget.cpp +++ b/parts/distpart/distpart_widget.cpp @@ -27,12 +27,12 @@ #include #include #include -#include "tdevproject.h" +#include "kdevproject.h" #include "domutil.h" #include #include -#include +#include #include #include #include @@ -44,7 +44,7 @@ #include #include #include -#include "tdevmakefrontend.h" +#include "kdevmakefrontend.h" #include #include diff --git a/parts/distpart/distpart_widget.h b/parts/distpart/distpart_widget.h index 1e5bf68f..7a684a5a 100644 --- a/parts/distpart/distpart_widget.h +++ b/parts/distpart/distpart_widget.h @@ -32,7 +32,7 @@ #include #include -class TDevProject; +class KDevProject; class DistpartPart; class TQUrlOperator; class TDEProcess; diff --git a/parts/distpart/kdevdistpart.desktop b/parts/distpart/kdevdistpart.desktop new file mode 100644 index 00000000..1b3d095d --- /dev/null +++ b/parts/distpart/kdevdistpart.desktop @@ -0,0 +1,70 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Aids in building and publishing the final project. Supports creation of RPM packages or source packages. +Comment[ca]=Ajuda en la construcció i publicació del projecte final. Suporta la creació de paquets RPM o paquets font. +Comment[da]=Hjælper til med at bygge og publicere det færdige projekt. Understøtter at oprette RPM-pakker og kildekodepakker. +Comment[de]=Unterstützt beim Erstellen und Ausliefern des fertigen Projekts. Derzeit werden RPM- und Quell-Pakete unterstützt. +Comment[el]=Βοηθά στην κατασκευή και δημοσίευση του τελικού έργου. Για την ώρα υποστηρίζεται μόνο η μορφή RPM. +Comment[es]=Ayuda en la construcción y publicación del proyecto final. Contempla la creación de paquetes RPM y de código fuente. +Comment[et]=Abi valmisprojekti ehitamisel ja avaldamisel. Toetatud on RPM-pakettide ja lähtekoodipakettide loomine. +Comment[fr]=Outil d'aide à la construction et à la publication du projet final. Prend en charge la création de paquetages RPM ou de paquetages de sources. +Comment[hu]=A projekt felépítésében és publikálásában segít. RPM és forráscsomagok készítését teszi lehetővé. +Comment[it]=Aiuta nella compilazione e pubblicazione del progetto finale. Supporta la creazione di pacchetti RPM o di pacchetti sorgenti. +Comment[ms]=Membantu dalam membina dan menerbitkan projek akhir. Menyokong penciptaan pakej RPM atau pakej sumber. +Comment[nds]=Ünnerstütten för't Opstellen un Apenmaken vun't fardige Projekt. Ünnerstütt dat Opstellen vun RPMs un Bornpaketen. +Comment[nl]=Helpt bij het bouwen en publiceren van het uiteindelijke project. Ondersteunt het aanmaken van RPM-pakketten of broncodepakketten. +Comment[pl]=Pomoc w budowaniu i publikowaniu projektu. Obsługuje tworzenie pakietów RPM i paczek ze źródłami. +Comment[pt]=Ajuda na construção e publicação do projecto final. Suporta a criação de pacotes RPM ou pacotes com código-fonte. +Comment[pt_BR]=Auxilia na compilação e publicação do projeto final. Suporta a criação de pacotes RPM ou pacotes fontes. +Comment[ru]=Помощник по сборке и распространению окончательных версий проекта. Поддерживает создание пакетов RPM или пакетов с исходным кодом. +Comment[sk]=Pomáha pri vytváraní a publikovaní finálneho projektu. Podporované sú RPM a zdrojové balíčky. +Comment[sr]=Помаже у грађењу и објављивању коначног пројекта. За сада је подржано стварање RPM и изворних пакета. +Comment[sr@Latn]=Pomaže u građenju i objavljivanju konačnog projekta. Za sada je podržano stvaranje RPM i izvornih paketa. +Comment[sv]=Hjälper till att bygga och publicera det färdiga projektet. Stöder att skapa RPM-paket och källkodspaket. +Comment[zh_TW]=協助建立與發布最終專案版本。支援建立 RPM 套件與 RPM 源碼套件。 +Name=KDevdistpart +Name[da]=TDevelop distpart +Name[de]=Unterstützung für Paketerstellung (TDevelop) +Name[hi]=के-डेव-डिस्टपार्ट +Name[nds]=Paketopstell-Ünnerstütten för't TDevelop +Name[sk]=KDev distribúcia +Name[sv]=TDevelop distributionsdel +Name[zh_TW]=TDevelop 發布元件 +GenericName=Final Packaging Support +GenericName[ca]=Suport per a l'empaquetat final +GenericName[da]=Endelig pakkestøtte +GenericName[de]=Unterstützung für Paketerstellung +GenericName[el]=Υποστήριξη τελικού πακέτου +GenericName[es]=Soporte para empaquetado final +GenericName[et]=Lõpp-pakendamise toetus +GenericName[eu]=Azken paketatze euskarria +GenericName[fa]=پشتیبانی بسته‌بندی نهایی +GenericName[fr]=Gestion du conditionnement final +GenericName[gl]=Soporte para empaquetado final +GenericName[hu]=Csomagelőkészítő +GenericName[it]=Supporto finale per la creazione di pacchetti +GenericName[ja]=最終パッケージ化サポート +GenericName[nds]=Ünnerstütten för't Paketopstellen +GenericName[ne]=अन्तिम प्याकेजिङ समर्थन +GenericName[nl]=Ondersteuning voor projectpublicatie +GenericName[pl]=Obsługa ostatecznego pakowania +GenericName[pt]=Suporte a Empacotamento Final +GenericName[pt_BR]=Suporte ao Empacotamento Final +GenericName[ru]=Сборка и распространение пакетов +GenericName[sk]=Podpora finálneho balíčkovania +GenericName[sl]=Podpora končnemu ustarjanju paketov +GenericName[sr]=Подршка за коначно паковање +GenericName[sr@Latn]=Podrška za konačno pakovanje +GenericName[sv]=Stöd för slutpaketering +GenericName[ta]=ஆதரவுள்ள கடைசி தொகுப்பு +GenericName[tg]=Ҷамъкунӣ ва ҷорӣ намудани пакетҳо +GenericName[tr]=Son Paketleme Desteği +GenericName[zh_CN]=最终打包支持 +GenericName[zh_TW]=最終包裝支援 +Icon=tdevelop +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevdistpart +X-TDevelop-Version=5 +X-TDevelop-Scope=Project +X-TDevelop-Properties=ProjectPackaging diff --git a/parts/distpart/tdevpart_distpart.rc b/parts/distpart/kdevpart_distpart.rc similarity index 100% rename from parts/distpart/tdevpart_distpart.rc rename to parts/distpart/kdevpart_distpart.rc diff --git a/parts/distpart/specsupport.cpp b/parts/distpart/specsupport.cpp index 38f8f385..06a0bb67 100644 --- a/parts/distpart/specsupport.cpp +++ b/parts/distpart/specsupport.cpp @@ -19,8 +19,8 @@ ***************************************************************************/ #include "specsupport.h" -#include "tdevproject.h" -#include "tdevmakefrontend.h" +#include "kdevproject.h" +#include "kdevmakefrontend.h" #include "distpart_widget.h" #include @@ -79,11 +79,11 @@ void SpecSupport::slotbuildAllPushButtonPressed() { return; } else - if (TDevMakeFrontend *makeFrontend = m_part->extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = m_part->extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand(dir,"cd " + TDEProcess::quote(dir) + " && cp " + TDEProcess::quote(getAppSource()) + " " + TDEProcess::quote(*(map.find("_sourcedir")))); } - if (TDevMakeFrontend *makeFrontend = m_part->extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = m_part->extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand(dir,"cd " + TDEProcess::quote((((it = map.find("_specdir")) != map.end()) ? (*it) : dir)) + " && rpmbuild -ba " + m_part->project()->projectName() + ".spec"); } @@ -178,11 +178,11 @@ void SpecSupport::slotsrcPackagePushButtonPressed() { return; } else - if (TDevMakeFrontend *makeFrontend = m_part->extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = m_part->extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand(dir,"cd " + TDEProcess::quote(dir) + " && cp " + TDEProcess::quote(getAppSource()) + " " + TDEProcess::quote(*(map.find("_sourcedir")))); } - if (TDevMakeFrontend *makeFrontend = m_part->extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = m_part->extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand(dir,"cd " + TDEProcess::quote((((it = map.find("_specdir")) != map.end()) ? (*it) : dir)) + " && rpmbuild -bs " + m_part->project()->projectName() + ".spec"); } diff --git a/parts/distpart/tdevdistpart.desktop b/parts/distpart/tdevdistpart.desktop deleted file mode 100644 index 290a0a8d..00000000 --- a/parts/distpart/tdevdistpart.desktop +++ /dev/null @@ -1,70 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Aids in building and publishing the final project. Supports creation of RPM packages or source packages. -Comment[ca]=Ajuda en la construcció i publicació del projecte final. Suporta la creació de paquets RPM o paquets font. -Comment[da]=Hjælper til med at bygge og publicere det færdige projekt. Understøtter at oprette RPM-pakker og kildekodepakker. -Comment[de]=Unterstützt beim Erstellen und Ausliefern des fertigen Projekts. Derzeit werden RPM- und Quell-Pakete unterstützt. -Comment[el]=Βοηθά στην κατασκευή και δημοσίευση του τελικού έργου. Για την ώρα υποστηρίζεται μόνο η μορφή RPM. -Comment[es]=Ayuda en la construcción y publicación del proyecto final. Contempla la creación de paquetes RPM y de código fuente. -Comment[et]=Abi valmisprojekti ehitamisel ja avaldamisel. Toetatud on RPM-pakettide ja lähtekoodipakettide loomine. -Comment[fr]=Outil d'aide à la construction et à la publication du projet final. Prend en charge la création de paquetages RPM ou de paquetages de sources. -Comment[hu]=A projekt felépítésében és publikálásában segít. RPM és forráscsomagok készítését teszi lehetővé. -Comment[it]=Aiuta nella compilazione e pubblicazione del progetto finale. Supporta la creazione di pacchetti RPM o di pacchetti sorgenti. -Comment[ms]=Membantu dalam membina dan menerbitkan projek akhir. Menyokong penciptaan pakej RPM atau pakej sumber. -Comment[nds]=Ünnerstütten för't Opstellen un Apenmaken vun't fardige Projekt. Ünnerstütt dat Opstellen vun RPMs un Bornpaketen. -Comment[nl]=Helpt bij het bouwen en publiceren van het uiteindelijke project. Ondersteunt het aanmaken van RPM-pakketten of broncodepakketten. -Comment[pl]=Pomoc w budowaniu i publikowaniu projektu. Obsługuje tworzenie pakietów RPM i paczek ze źródłami. -Comment[pt]=Ajuda na construção e publicação do projecto final. Suporta a criação de pacotes RPM ou pacotes com código-fonte. -Comment[pt_BR]=Auxilia na compilação e publicação do projeto final. Suporta a criação de pacotes RPM ou pacotes fontes. -Comment[ru]=Помощник по сборке и распространению окончательных версий проекта. Поддерживает создание пакетов RPM или пакетов с исходным кодом. -Comment[sk]=Pomáha pri vytváraní a publikovaní finálneho projektu. Podporované sú RPM a zdrojové balíčky. -Comment[sr]=Помаже у грађењу и објављивању коначног пројекта. За сада је подржано стварање RPM и изворних пакета. -Comment[sr@Latn]=Pomaže u građenju i objavljivanju konačnog projekta. Za sada je podržano stvaranje RPM i izvornih paketa. -Comment[sv]=Hjälper till att bygga och publicera det färdiga projektet. Stöder att skapa RPM-paket och källkodspaket. -Comment[zh_TW]=協助建立與發布最終專案版本。支援建立 RPM 套件與 RPM 源碼套件。 -Name=KDevdistpart -Name[da]=TDevelop distpart -Name[de]=Unterstützung für Paketerstellung (TDevelop) -Name[hi]=के-डेव-डिस्टपार्ट -Name[nds]=Paketopstell-Ünnerstütten för't TDevelop -Name[sk]=KDev distribúcia -Name[sv]=TDevelop distributionsdel -Name[zh_TW]=TDevelop 發布元件 -GenericName=Final Packaging Support -GenericName[ca]=Suport per a l'empaquetat final -GenericName[da]=Endelig pakkestøtte -GenericName[de]=Unterstützung für Paketerstellung -GenericName[el]=Υποστήριξη τελικού πακέτου -GenericName[es]=Soporte para empaquetado final -GenericName[et]=Lõpp-pakendamise toetus -GenericName[eu]=Azken paketatze euskarria -GenericName[fa]=پشتیبانی بسته‌بندی نهایی -GenericName[fr]=Gestion du conditionnement final -GenericName[gl]=Soporte para empaquetado final -GenericName[hu]=Csomagelőkészítő -GenericName[it]=Supporto finale per la creazione di pacchetti -GenericName[ja]=最終パッケージ化サポート -GenericName[nds]=Ünnerstütten för't Paketopstellen -GenericName[ne]=अन्तिम प्याकेजिङ समर्थन -GenericName[nl]=Ondersteuning voor projectpublicatie -GenericName[pl]=Obsługa ostatecznego pakowania -GenericName[pt]=Suporte a Empacotamento Final -GenericName[pt_BR]=Suporte ao Empacotamento Final -GenericName[ru]=Сборка и распространение пакетов -GenericName[sk]=Podpora finálneho balíčkovania -GenericName[sl]=Podpora končnemu ustarjanju paketov -GenericName[sr]=Подршка за коначно паковање -GenericName[sr@Latn]=Podrška za konačno pakovanje -GenericName[sv]=Stöd för slutpaketering -GenericName[ta]=ஆதரவுள்ள கடைசி தொகுப்பு -GenericName[tg]=Ҷамъкунӣ ва ҷорӣ намудани пакетҳо -GenericName[tr]=Son Paketleme Desteği -GenericName[zh_CN]=最终打包支持 -GenericName[zh_TW]=最終包裝支援 -Icon=tdevelop -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevdistpart -X-TDevelop-Version=5 -X-TDevelop-Scope=Project -X-TDevelop-Properties=ProjectPackaging diff --git a/parts/documentation/CMakeLists.txt b/parts/documentation/CMakeLists.txt index 4b13b342..accc3401 100644 --- a/parts/documentation/CMakeLists.txt +++ b/parts/documentation/CMakeLists.txt @@ -33,13 +33,13 @@ link_directories( ##### other data ################################ -install( FILES tdevdocumentation.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevpart_documentation.rc DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation ) +install( FILES kdevdocumentation.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevpart_documentation.rc DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation ) -##### libtdevdocumentation (module) ############# +##### libkdevdocumentation (module) ############# -tde_add_kpart( libtdevdocumentation AUTOMOC +tde_add_kpart( libkdevdocumentation AUTOMOC SOURCES documentation_part.cpp documentation_widget.cpp contentsview.cpp indexview.cpp docglobalconfigwidgetbase.ui @@ -50,8 +50,8 @@ tde_add_kpart( libtdevdocumentation AUTOMOC find_documentation.cpp find_documentation_optionsbase.ui find_documentation_options.cpp selecttopicbase.ui selecttopic.cpp docprojectconfigwidgetbase.ui - docprojectconfigwidget.cpp TDevDocumentationIface.cpp - TDevDocumentationIface.skel addcatalogdlgbase.ui + docprojectconfigwidget.cpp KDevDocumentationIface.cpp + KDevDocumentationIface.skel addcatalogdlgbase.ui addcatalogdlg.cpp LINK documentation_interfaces-shared tdevelop-shared tdehtml-shared DESTINATION ${PLUGIN_INSTALL_DIR} diff --git a/parts/documentation/KDevDocumentationIface.cpp b/parts/documentation/KDevDocumentationIface.cpp new file mode 100644 index 00000000..329b8474 --- /dev/null +++ b/parts/documentation/KDevDocumentationIface.cpp @@ -0,0 +1,83 @@ +/*************************************************************************** + * Copyright (C) 2004 by Alexander Dymo * + * adymo@mksat.net * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ +#include "KDevDocumentationIface.h" + +#include "documentation_part.h" + +KDevDocumentationIface::KDevDocumentationIface(DocumentationPart *part) + :TQObject(part), DCOPObject("KDevDocumentation"), m_part(part) +{ +} + +KDevDocumentationIface::~KDevDocumentationIface() +{ +} + +void KDevDocumentationIface::lookupInIndex(TQString term) +{ + m_part->lookInDocumentationIndex(term); +} + +void KDevDocumentationIface::findInFinder(TQString term) +{ + m_part->findInDocumentation(term); +} + +void KDevDocumentationIface::searchInDocumentation(TQString term) +{ + m_part->searchInDocumentation(term); +} + +void KDevDocumentationIface::lookupInIndex() +{ + m_part->lookInDocumentationIndex(); +} + +void KDevDocumentationIface::searchInDocumentation() +{ + m_part->searchInDocumentation(); +} + +void KDevDocumentationIface::manPage(TQString term) +{ + m_part->manPage(term); +} + +void KDevDocumentationIface::infoPage(TQString term) +{ + m_part->infoPage(term); +} + +void KDevDocumentationIface::manPage() +{ + m_part->manPage(); +} + +void KDevDocumentationIface::infoPage() +{ + m_part->infoPage(); +} + +void KDevDocumentationIface::findInFinder( ) +{ + m_part->findInDocumentation(); +} + +#include "KDevDocumentationIface.moc" diff --git a/parts/documentation/KDevDocumentationIface.h b/parts/documentation/KDevDocumentationIface.h new file mode 100644 index 00000000..c55143e7 --- /dev/null +++ b/parts/documentation/KDevDocumentationIface.h @@ -0,0 +1,53 @@ +/*************************************************************************** + * Copyright (C) 2004 by Alexander Dymo * + * adymo@mksat.net * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ +#ifndef KDEVDOCUMENTATIONIFACE_H +#define KDEVDOCUMENTATIONIFACE_H + +#include +#include + +class DocumentationPart; + +class KDevDocumentationIface : public TQObject, public DCOPObject { + Q_OBJECT +// + K_DCOP +public: + KDevDocumentationIface(DocumentationPart *part); + ~KDevDocumentationIface(); + +k_dcop: + void lookupInIndex(TQString term); + void findInFinder(TQString term); + void searchInDocumentation(TQString term); + void manPage(TQString term); + void infoPage(TQString term); + + void lookupInIndex(); + void findInFinder(); + void searchInDocumentation(); + void manPage(); + void infoPage(); + +private: + DocumentationPart *m_part; +}; + +#endif diff --git a/parts/documentation/Makefile.am b/parts/documentation/Makefile.am index 118c8041..13c4db3f 100644 --- a/parts/documentation/Makefile.am +++ b/parts/documentation/Makefile.am @@ -1,31 +1,31 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util \ -I$(top_srcdir)/parts/documentation/interfaces $(all_includes) -kde_module_LTLIBRARIES = libtdevdocumentation.la -libtdevdocumentation_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevdocumentation_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ +kde_module_LTLIBRARIES = libkdevdocumentation.la +libkdevdocumentation_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevdocumentation_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ $(top_builddir)/parts/documentation/interfaces/libdocumentation_interfaces.la $(LIB_TDEHTML) -libtdevdocumentation_la_SOURCES = documentation_part.cpp \ +libkdevdocumentation_la_SOURCES = documentation_part.cpp \ documentation_widget.cpp contentsview.cpp indexview.cpp docglobalconfigwidgetbase.ui \ docglobalconfigwidget.cpp docconfiglistview.cpp editcatalogdlgbase.ui editcatalogdlg.cpp \ docutils.cpp searchview.cpp bookmarkview.cpp editbookmarkdlg.ui \ find_documentationbase.ui find_documentation.cpp find_documentation_optionsbase.ui \ find_documentation_options.cpp selecttopicbase.ui selecttopic.cpp docprojectconfigwidgetbase.ui \ - docprojectconfigwidget.cpp TDevDocumentationIface.cpp TDevDocumentationIface.skel \ + docprojectconfigwidget.cpp KDevDocumentationIface.cpp KDevDocumentationIface.skel \ addcatalogdlgbase.ui addcatalogdlg.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevdocumentation.desktop +service_DATA = kdevdocumentation.desktop -rcdir = $(kde_datadir)/tdevdocumentation -rc_DATA = tdevpart_documentation.rc +rcdir = $(kde_datadir)/kdevdocumentation +rc_DATA = kdevpart_documentation.rc noinst_HEADERS = contentsview.h indexview.h docglobalconfigwidget.h \ docconfiglistview.h editcatalogdlg.h docutils.h searchview.h bookmarkview.h selecttopic.h \ - docprojectconfigwidget.h TDevDocumentationIface.h addcatalogdlg.h + docprojectconfigwidget.h KDevDocumentationIface.h addcatalogdlg.h SUBDIRS = interfaces plugins tools data protocols DOXYGEN_EMPTY = YES diff --git a/parts/documentation/TDevDocumentationIface.cpp b/parts/documentation/TDevDocumentationIface.cpp deleted file mode 100644 index 0441eb4a..00000000 --- a/parts/documentation/TDevDocumentationIface.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Alexander Dymo * - * adymo@mksat.net * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ -#include "TDevDocumentationIface.h" - -#include "documentation_part.h" - -TDevDocumentationIface::TDevDocumentationIface(DocumentationPart *part) - :TQObject(part), DCOPObject("TDevDocumentation"), m_part(part) -{ -} - -TDevDocumentationIface::~TDevDocumentationIface() -{ -} - -void TDevDocumentationIface::lookupInIndex(TQString term) -{ - m_part->lookInDocumentationIndex(term); -} - -void TDevDocumentationIface::findInFinder(TQString term) -{ - m_part->findInDocumentation(term); -} - -void TDevDocumentationIface::searchInDocumentation(TQString term) -{ - m_part->searchInDocumentation(term); -} - -void TDevDocumentationIface::lookupInIndex() -{ - m_part->lookInDocumentationIndex(); -} - -void TDevDocumentationIface::searchInDocumentation() -{ - m_part->searchInDocumentation(); -} - -void TDevDocumentationIface::manPage(TQString term) -{ - m_part->manPage(term); -} - -void TDevDocumentationIface::infoPage(TQString term) -{ - m_part->infoPage(term); -} - -void TDevDocumentationIface::manPage() -{ - m_part->manPage(); -} - -void TDevDocumentationIface::infoPage() -{ - m_part->infoPage(); -} - -void TDevDocumentationIface::findInFinder( ) -{ - m_part->findInDocumentation(); -} - -#include "TDevDocumentationIface.moc" diff --git a/parts/documentation/TDevDocumentationIface.h b/parts/documentation/TDevDocumentationIface.h deleted file mode 100644 index 565070f3..00000000 --- a/parts/documentation/TDevDocumentationIface.h +++ /dev/null @@ -1,53 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Alexander Dymo * - * adymo@mksat.net * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ -#ifndef TDEVDOCUMENTATIONIFACE_H -#define TDEVDOCUMENTATIONIFACE_H - -#include -#include - -class DocumentationPart; - -class TDevDocumentationIface : public TQObject, public DCOPObject { - Q_OBJECT -// - K_DCOP -public: - TDevDocumentationIface(DocumentationPart *part); - ~TDevDocumentationIface(); - -k_dcop: - void lookupInIndex(TQString term); - void findInFinder(TQString term); - void searchInDocumentation(TQString term); - void manPage(TQString term); - void infoPage(TQString term); - - void lookupInIndex(); - void findInFinder(); - void searchInDocumentation(); - void manPage(); - void infoPage(); - -private: - DocumentationPart *m_part; -}; - -#endif diff --git a/parts/documentation/addcatalogdlg.cpp b/parts/documentation/addcatalogdlg.cpp index 51e6fe96..21913089 100644 --- a/parts/documentation/addcatalogdlg.cpp +++ b/parts/documentation/addcatalogdlg.cpp @@ -29,7 +29,7 @@ #include #include "docutils.h" -#include "tdevdocumentationplugin.h" +#include "kdevdocumentationplugin.h" AddCatalogDlg::AddCatalogDlg( TQValueList const & plugins, TQWidget* parent, const char* name, bool modal, WFlags fl) diff --git a/parts/documentation/bookmarkview.cpp b/parts/documentation/bookmarkview.cpp index 9e6f85df..f626e246 100644 --- a/parts/documentation/bookmarkview.cpp +++ b/parts/documentation/bookmarkview.cpp @@ -34,8 +34,8 @@ #include #include -#include -#include +#include +#include #include "documentation_part.h" #include "documentation_widget.h" @@ -44,7 +44,7 @@ DocBookmarkManager::DocBookmarkManager(DocumentationPart */*part*/) :KBookmarkManager(locateLocal("data", - "tdevdocumentation/bookmarks/bookmarks.xml"), false) + "kdevdocumentation/bookmarks/bookmarks.xml"), false) { setEditorOptions(i18n("Documentation"), false); } diff --git a/parts/documentation/contentsview.cpp b/parts/documentation/contentsview.cpp index ff3c9a31..532feefd 100644 --- a/parts/documentation/contentsview.cpp +++ b/parts/documentation/contentsview.cpp @@ -26,8 +26,8 @@ #include #include -#include -#include +#include +#include #include "documentation_widget.h" #include "documentation_part.h" diff --git a/parts/documentation/data/CMakeLists.txt b/parts/documentation/data/CMakeLists.txt index 5bb6d766..77d380d4 100644 --- a/parts/documentation/data/CMakeLists.txt +++ b/parts/documentation/data/CMakeLists.txt @@ -11,8 +11,8 @@ install( FILES long.html nomatch.html short.html syntax.html wrapper.html - DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation/en ) + DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation/en ) install( FILES checked.xpm htdig.png star.png star_blank.png unchecked.xpm - DESTINATION ${DATA_INSTALL_DIR}/tdevdocumentation/pics ) + DESTINATION ${DATA_INSTALL_DIR}/kdevdocumentation/pics ) diff --git a/parts/documentation/data/Makefile.am b/parts/documentation/data/Makefile.am index ae52bf11..920c492a 100644 --- a/parts/documentation/data/Makefile.am +++ b/parts/documentation/data/Makefile.am @@ -1,6 +1,6 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) METASOURCES = AUTO -htmldir = $(kde_datadir)/tdevdocumentation/en -picsdir = $(kde_datadir)/tdevdocumentation/pics +htmldir = $(kde_datadir)/kdevdocumentation/en +picsdir = $(kde_datadir)/kdevdocumentation/pics html_DATA = long.html nomatch.html short.html syntax.html wrapper.html pics_DATA = checked.xpm htdig.png star.png star_blank.png unchecked.xpm diff --git a/parts/documentation/data/nomatch.html b/parts/documentation/data/nomatch.html index 5cbd5c49..8951a604 100644 --- a/parts/documentation/data/nomatch.html +++ b/parts/documentation/data/nomatch.html @@ -1,6 +1,6 @@ No match for '$&(LOGICAL_WORDS)' -

    +

    Search results


    No matches were found for '$&(LOGICAL_WORDS)'

    @@ -17,5 +17,5 @@ word with "All," try using one or more of the same words with "Any."


    -ht://Dig $(VERSION) +ht://Dig $(VERSION) diff --git a/parts/documentation/data/syntax.html b/parts/documentation/data/syntax.html index 21a2ab2a..9701c37f 100644 --- a/parts/documentation/data/syntax.html +++ b/parts/documentation/data/syntax.html @@ -1,6 +1,6 @@ Error in Boolean search for '$&(WORDS)' -

    +

    Error in Boolean search for '$&(LOGICAL_WORDS)'


    Boolean expressions need to be 'correct' in order for the search @@ -14,6 +14,6 @@ $(SYNTAXERROR)
    -ht://Dig $(VERSION) +ht://Dig $(VERSION) diff --git a/parts/documentation/data/wrapper.html b/parts/documentation/data/wrapper.html index 187ffd61..20c1bbf2 100644 --- a/parts/documentation/data/wrapper.html +++ b/parts/documentation/data/wrapper.html @@ -1,10 +1,10 @@ Search results for '$&(WORDS)' -

    +

    Search results for '$&(LOGICAL_WORDS)'


    -More *'s indicate a better match. +More *'s indicate a better match.
    $(HTSEARCH_RESULTS) @@ -12,5 +12,5 @@ $(PAGEHEADER) $(PREVPAGE) $(PAGELIST) $(NEXTPAGE)
    -ht://Dig $(VERSION) +ht://Dig $(VERSION) diff --git a/parts/documentation/docconfiglistview.cpp b/parts/documentation/docconfiglistview.cpp index ba6f30fb..d2753653 100644 --- a/parts/documentation/docconfiglistview.cpp +++ b/parts/documentation/docconfiglistview.cpp @@ -21,7 +21,7 @@ #include -#include "tdevdocumentationplugin.h" +#include "kdevdocumentationplugin.h" DocConfigListView::DocConfigListView(TQWidget *parent, const char *name) :TDEListView(parent, name) diff --git a/parts/documentation/docglobalconfigwidget.cpp b/parts/documentation/docglobalconfigwidget.cpp index 5f66ef4a..cb6c3776 100644 --- a/parts/documentation/docglobalconfigwidget.cpp +++ b/parts/documentation/docglobalconfigwidget.cpp @@ -38,8 +38,8 @@ #include #include -#include "tdevdocumentationplugin.h" -#include "tdevpartcontroller.h" +#include "kdevdocumentationplugin.h" +#include "kdevpartcontroller.h" #include "docconfiglistview.h" #include "documentation_part.h" @@ -67,7 +67,7 @@ DocGlobalConfigWidget::DocGlobalConfigWidget(DocumentationPart *part, //read full text search settings config->setGroup("htdig"); TQString databaseDir = kapp->dirs()->saveLocation("data", - "tdevdocumentation/search"); + "kdevdocumentation/search"); databaseDirEdit->setURL(config->readPathEntry("databaseDir", databaseDir)); htdigbinEdit->setURL(config->readPathEntry("htdigbin", kapp->dirs()->findExe("htdig"))); htmergebinEdit->setURL(config->readPathEntry("htmergebin", kapp->dirs()->findExe("htmerge"))); @@ -99,8 +99,8 @@ DocGlobalConfigWidget::DocGlobalConfigWidget(DocumentationPart *part, useAssistant_box->setChecked(m_part->isAssistantUsed()); - // Having app-specific settings isn't pretty, but this setting is nonsensical in tdevassistant - if ( kapp->instanceName().find("tdevassistant") != -1 ) + // Having app-specific settings isn't pretty, but this setting is nonsensical in kdevassistant + if ( kapp->instanceName().find("kdevassistant") != -1 ) useAssistant_box->hide(); //font sizes and zoom levels @@ -182,7 +182,7 @@ void DocGlobalConfigWidget::accept() config->writePathEntry("htsearchbin", DocUtils::envURL(htsearchbinEdit)); //write full text search locations file - TQString ftsLocationsFile = locateLocal("data", "tdevdocumentation/search/locations.txt"); + TQString ftsLocationsFile = locateLocal("data", "kdevdocumentation/search/locations.txt"); TQFile f(ftsLocationsFile); TQStringList locs; if (f.open(IO_ReadWrite | IO_Truncate)) diff --git a/parts/documentation/docprojectconfigwidget.cpp b/parts/documentation/docprojectconfigwidget.cpp index 1d6678d7..a37ad5cb 100644 --- a/parts/documentation/docprojectconfigwidget.cpp +++ b/parts/documentation/docprojectconfigwidget.cpp @@ -27,8 +27,8 @@ #include "domutil.h" #include "urlutil.h" -#include "tdevproject.h" -#include "tdevdocumentationplugin.h" +#include "kdevproject.h" +#include "kdevdocumentationplugin.h" #include "documentation_part.h" #include "documentation_widget.h" @@ -45,7 +45,7 @@ DocProjectConfigWidget::DocProjectConfigWidget(DocumentationPart *part, TQWidget m_plugins[(*it)->pluginName()] = *it; } } - TQString projectDocSystem = DomUtil::readEntry(*(m_part->projectDom()), "/tdevdocumentation/projectdoc/docsystem"); + TQString projectDocSystem = DomUtil::readEntry(*(m_part->projectDom()), "/kdevdocumentation/projectdoc/docsystem"); bool hasProjectDoc = false; for (int i = 0; i < docSystemCombo->count(); ++i) @@ -64,7 +64,7 @@ DocProjectConfigWidget::DocProjectConfigWidget(DocumentationPart *part, TQWidget changeDocSystem(docSystemCombo->currentText()); } - manualURL->setURL(DomUtil::readEntry(*(m_part->projectDom()), "/tdevdocumentation/projectdoc/usermanualurl")); + manualURL->setURL(DomUtil::readEntry(*(m_part->projectDom()), "/kdevdocumentation/projectdoc/usermanualurl")); } void DocProjectConfigWidget::changeDocSystem(const TQString &text) @@ -79,7 +79,7 @@ void DocProjectConfigWidget::changeDocSystem(const TQString &text) catalogURL->setMode(plugin->catalogLocatorProps().first); catalogURL->setFilter(plugin->catalogLocatorProps().second); - TQString projectDocURL = DomUtil::readEntry(*(m_part->projectDom()), "/tdevdocumentation/projectdoc/docurl"); + TQString projectDocURL = DomUtil::readEntry(*(m_part->projectDom()), "/kdevdocumentation/projectdoc/docurl"); if (!projectDocURL.isEmpty()) projectDocURL = TQDir::cleanDirPath(m_part->project()->projectDirectory() + "/" + projectDocURL); diff --git a/parts/documentation/documentation_part.cpp b/parts/documentation/documentation_part.cpp index 9515fad7..75bb7c13 100644 --- a/parts/documentation/documentation_part.cpp +++ b/parts/documentation/documentation_part.cpp @@ -48,17 +48,17 @@ #include #include -#include "tdevplugininfo.h" -#include "tdevcore.h" -#include "tdevproject.h" -#include "tdevmainwindow.h" -#include "tdevgenericfactory.h" -#include "tdevdocumentationplugin.h" +#include "kdevplugininfo.h" +#include "kdevcore.h" +#include "kdevproject.h" +#include "kdevmainwindow.h" +#include "kdevgenericfactory.h" +#include "kdevdocumentationplugin.h" #include "configwidgetproxy.h" -#include "tdevpartcontroller.h" +#include "kdevpartcontroller.h" #include "domutil.h" #include "urlutil.h" -#include "tdeveditorutil.h" +#include "kdeveditorutil.h" #include "documentation_widget.h" #include "docglobalconfigwidget.h" @@ -66,22 +66,22 @@ #include "contentsview.h" #include "find_documentation.h" -#include "TDevDocumentationIface.h" +#include "KDevDocumentationIface.h" #define GLOBALDOC_OPTIONS 1 #define PROJECTDOC_OPTIONS 2 -static const TDevPluginInfo data("tdevdocumentation"); +static const KDevPluginInfo data("kdevdocumentation"); -typedef TDevGenericFactory DocumentationFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevdocumentation, DocumentationFactory( data ) ) +typedef KDevGenericFactory DocumentationFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevdocumentation, DocumentationFactory( data ) ) DocumentationPart::DocumentationPart(TQObject *parent, const char *name, const TQStringList& ) - :TDevPlugin(&data, parent, name ? name : "DocumentationPart" ), + :KDevPlugin(&data, parent, name ? name : "DocumentationPart" ), m_projectDocumentationPlugin(0), m_userManualPlugin(0), m_hasIndex(false) { setInstance(DocumentationFactory::instance()); - setXMLFile("tdevpart_documentation.rc"); + setXMLFile("kdevpart_documentation.rc"); m_configProxy = new ConfigWidgetProxy(core()); m_configProxy->createGlobalConfigPage(i18n("Documentation"), GLOBALDOC_OPTIONS, info()->icon() ); @@ -109,7 +109,7 @@ DocumentationPart::DocumentationPart(TQObject *parent, const char *name, const T TQTimer::singleShot(0, this, TQT_SLOT(init())); - new TDevDocumentationIface(this); + new KDevDocumentationIface(this); } DocumentationPart::~DocumentationPart() @@ -250,12 +250,6 @@ void DocumentationPart::setupActions() "all possible sources of documentation like " "table of contents, index, man and info databases, " "Google, etc.")); - action = new TDEAction(i18n("TDevelop Programming Handbook"), 0, - this, TQT_SLOT(programmingHandbook()), - actionCollection(), "help_programming_handbook" ); - action->setToolTip(i18n("Open the TDevelop Programming Handbook")); - action->setWhatsThis(i18n("Open the TDevelop Programming Handbook

    Opens Open the TDevelop Programming Handbook.")); - } void DocumentationPart::emitBookmarkLocation(const TQString &title, const KURL &url) @@ -265,12 +259,12 @@ void DocumentationPart::emitBookmarkLocation(const TQString &title, const KURL & void DocumentationPart::searchInDocumentation() { - TQString word = TDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); + TQString word = KDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); if ( word.isEmpty() ) { if ( isAssistantUsed() ) - callAssistant ( "TDevDocumentation", "searchInDocumentation()" ); + callAssistant ( "KDevDocumentation", "searchInDocumentation()" ); else { mainWindow()->raiseView ( m_widget ); @@ -280,7 +274,7 @@ void DocumentationPart::searchInDocumentation() else { if ( isAssistantUsed() ) - callAssistant ( "TDevDocumentation", "searchInDocumentation(TQString)", word ); + callAssistant ( "KDevDocumentation", "searchInDocumentation(TQString)", word ); else { mainWindow()->raiseView ( m_widget ); @@ -298,29 +292,24 @@ void DocumentationPart::searchInDocumentation(const TQString &term) void DocumentationPart::contextSearchInDocumentation() { if (isAssistantUsed()) - callAssistant("TDevDocumentation", "searchInDocumentation(TQString)", m_contextStr); + callAssistant("KDevDocumentation", "searchInDocumentation(TQString)", m_contextStr); else searchInDocumentation(m_contextStr); } -void DocumentationPart::programmingHandbook() -{ - kapp->invokeHelp (TQString::null, "tde_app_devel"); -} - void DocumentationPart::manPage() { - TQString word = TDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); + TQString word = KDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); if ( isAssistantUsed() ) { if ( word.isEmpty() ) { - callAssistant ( "TDevDocumentation", "manPage()" ); + callAssistant ( "KDevDocumentation", "manPage()" ); } else { - callAssistant ( "TDevDocumentation", "manPage(TQString)", word ); + callAssistant ( "KDevDocumentation", "manPage(TQString)", word ); } } else @@ -334,17 +323,17 @@ void DocumentationPart::manPage() void DocumentationPart::infoPage() { - TQString word = TDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); + TQString word = KDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); if ( isAssistantUsed() ) { if ( word.isEmpty() ) { - callAssistant ( "TDevDocumentation", "infoPage()" ); + callAssistant ( "KDevDocumentation", "infoPage()" ); } else { - callAssistant ( "TDevDocumentation", "infoPage(TQString)", word ); + callAssistant ( "KDevDocumentation", "infoPage(TQString)", word ); } } else @@ -371,7 +360,7 @@ void DocumentationPart::infoPage(const TQString &term) void DocumentationPart::contextManPage() { if (isAssistantUsed()) - callAssistant("TDevDocumentation", "manPage(TQString)", m_contextStr); + callAssistant("KDevDocumentation", "manPage(TQString)", m_contextStr); else manPage(m_contextStr); } @@ -379,7 +368,7 @@ void DocumentationPart::contextManPage() void DocumentationPart::contextInfoPage() { if (isAssistantUsed()) - callAssistant("TDevDocumentation", "infoPage(TQString)", m_contextStr); + callAssistant("KDevDocumentation", "infoPage(TQString)", m_contextStr); else infoPage(m_contextStr); } @@ -387,19 +376,19 @@ void DocumentationPart::contextInfoPage() void DocumentationPart::contextFindDocumentation() { if (isAssistantUsed()) - callAssistant("TDevDocumentation", "findInFinder(TQString)", m_contextStr); + callAssistant("KDevDocumentation", "findInFinder(TQString)", m_contextStr); else findInDocumentation(m_contextStr); } void DocumentationPart::findInDocumentation() { - TQString word = TDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); + TQString word = KDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); if ( word.isEmpty() ) { if ( isAssistantUsed() ) - callAssistant ( "TDevDocumentation", "findInFinder()" ); + callAssistant ( "KDevDocumentation", "findInFinder()" ); else { mainWindow()->raiseView ( m_widget ); @@ -409,7 +398,7 @@ void DocumentationPart::findInDocumentation() else { if ( isAssistantUsed() ) - callAssistant ( "TDevDocumentation", "findInFinder(TQString)", word ); + callAssistant ( "KDevDocumentation", "findInFinder(TQString)", word ); else { mainWindow()->raiseView ( m_widget ); @@ -426,12 +415,12 @@ void DocumentationPart::findInDocumentation(const TQString &term) void DocumentationPart::lookInDocumentationIndex() { - TQString word = TDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); + TQString word = KDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); if ( word.isEmpty() ) { if ( isAssistantUsed() ) - callAssistant ( "TDevDocumentation", "lookupInIndex()" ); + callAssistant ( "KDevDocumentation", "lookupInIndex()" ); else { mainWindow()->raiseView ( m_widget ); @@ -441,7 +430,7 @@ void DocumentationPart::lookInDocumentationIndex() else { if ( isAssistantUsed() ) - callAssistant ( "TDevDocumentation", "lookupInIndex(TQString)", word ); + callAssistant ( "KDevDocumentation", "lookupInIndex(TQString)", word ); else { mainWindow()->raiseView ( m_widget ); @@ -459,7 +448,7 @@ void DocumentationPart::lookInDocumentationIndex(const TQString &term) void DocumentationPart::contextLookInDocumentationIndex() { if (isAssistantUsed()) - callAssistant("TDevDocumentation", "lookupInIndex(TQString)", m_contextStr); + callAssistant("KDevDocumentation", "lookupInIndex(TQString)", m_contextStr); else lookInDocumentationIndex(m_contextStr); } @@ -575,11 +564,11 @@ void DocumentationPart::setContextFeature(ContextFeature feature, bool b) void DocumentationPart::projectOpened() { - TQString projectDocSystem = DomUtil::readEntry(*(projectDom()), "/tdevdocumentation/projectdoc/docsystem"); - TQString projectDocURL = DomUtil::readEntry(*(projectDom()), "/tdevdocumentation/projectdoc/docurl"); + TQString projectDocSystem = DomUtil::readEntry(*(projectDom()), "/kdevdocumentation/projectdoc/docsystem"); + TQString projectDocURL = DomUtil::readEntry(*(projectDom()), "/kdevdocumentation/projectdoc/docurl"); if (!projectDocURL.isEmpty()) projectDocURL = TQDir::cleanDirPath(project()->projectDirectory() + "/" + projectDocURL); - TQString userManualURL = DomUtil::readEntry(*(projectDom()), "/tdevdocumentation/projectdoc/usermanualurl"); + TQString userManualURL = DomUtil::readEntry(*(projectDom()), "/kdevdocumentation/projectdoc/usermanualurl"); for (TQValueList::const_iterator it = m_plugins.constBegin(); it != m_plugins.constEnd(); ++it) @@ -613,21 +602,21 @@ void DocumentationPart::saveProjectDocumentationInfo() { if (m_projectDocumentationPlugin) { - DomUtil::writeEntry(*(projectDom()), "/tdevdocumentation/projectdoc/docsystem", m_projectDocumentationPlugin->pluginName()); + DomUtil::writeEntry(*(projectDom()), "/kdevdocumentation/projectdoc/docsystem", m_projectDocumentationPlugin->pluginName()); TQString relPath = URLUtil::extractPathNameRelative(project()->projectDirectory(), m_projectDocumentationPlugin->catalogURL()); - DomUtil::writeEntry(*(projectDom()), "/tdevdocumentation/projectdoc/docurl", relPath); + DomUtil::writeEntry(*(projectDom()), "/kdevdocumentation/projectdoc/docurl", relPath); } else { - DomUtil::writeEntry(*(projectDom()), "/tdevdocumentation/projectdoc/docsystem", ""); - DomUtil::writeEntry(*(projectDom()), "/tdevdocumentation/projectdoc/docurl", ""); + DomUtil::writeEntry(*(projectDom()), "/kdevdocumentation/projectdoc/docsystem", ""); + DomUtil::writeEntry(*(projectDom()), "/kdevdocumentation/projectdoc/docurl", ""); } if (m_userManualPlugin) - DomUtil::writeEntry(*(projectDom()), "/tdevdocumentation/projectdoc/usermanualurl", m_userManualPlugin->catalogURL()); + DomUtil::writeEntry(*(projectDom()), "/kdevdocumentation/projectdoc/usermanualurl", m_userManualPlugin->catalogURL()); else - DomUtil::writeEntry(*(projectDom()), "/tdevdocumentation/projectdoc/usermanualurl", ""); + DomUtil::writeEntry(*(projectDom()), "/kdevdocumentation/projectdoc/usermanualurl", ""); } TQCString DocumentationPart::startAssistant() @@ -638,7 +627,7 @@ TQCString DocumentationPart::startAssistant() return lastAssistant; const char *function = 0; - TQString app = "tdevassistant"; + TQString app = "kdevassistant"; function = "start_service_by_desktop_name(TQString,TQStringList)"; TQStringList URLs; @@ -676,7 +665,7 @@ TQCString DocumentationPart::startAssistant() kdDebug() << dcopName.data() << endl; //@fixme: is there another way to wait for the remote object to be loaded - while (!TDEApplication::dcopClient()->remoteObjects(dcopName).contains("TDevDocumentation")) + while (!TDEApplication::dcopClient()->remoteObjects(dcopName).contains("KDevDocumentation")) usleep(500); } } @@ -685,8 +674,8 @@ TQCString DocumentationPart::startAssistant() bool DocumentationPart::isAssistantUsed() const { - // hack to solve BR #90334 - don't call tdevassistant via DCOP if we ARE tdevassistant - if ( kapp->instanceName().find("tdevassistant") != -1 ) + // hack to solve BR #90334 - don't call kdevassistant via DCOP if we ARE kdevassistant + if ( kapp->instanceName().find("kdevassistant") != -1 ) { return false; } @@ -697,7 +686,7 @@ bool DocumentationPart::isAssistantUsed() const void DocumentationPart::setAssistantUsed(bool b) { m_assistantUsed = b; - //use global config to store different settings for tdevassistant and tdevelop + //use global config to store different settings for kdevassistant and tdevelop TDEConfig *config = kapp->config(); config->setGroup("Documentation"); config->writeEntry("UseAssistant", isAssistantUsed()); @@ -750,7 +739,7 @@ void DocumentationPart::loadSettings() config->setGroup("Documentation"); m_assistantUsed = config->readBoolEntry("UseAssistant", false); - if (TQString(TDEGlobal::instance()->aboutData()->appName()) == "tdevassistant") + if (TQString(TDEGlobal::instance()->aboutData()->appName()) == "kdevassistant") { int page = config->readNumEntry("LastPage", 0); switch (page) diff --git a/parts/documentation/documentation_part.h b/parts/documentation/documentation_part.h index aafe1669..722ad4bd 100644 --- a/parts/documentation/documentation_part.h +++ b/parts/documentation/documentation_part.h @@ -17,11 +17,11 @@ * Free Software Foundation, Inc., * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef __TDEVPART_DOCUMENTATION_H__ -#define __TDEVPART_DOCUMENTATION_H__ +#ifndef __KDEVPART_DOCUMENTATION_H__ +#define __KDEVPART_DOCUMENTATION_H__ #include -#include +#include class FindDocumentation; @@ -39,7 +39,7 @@ class TQPopupMenu; /* Please read the README.dox file for more info about this part */ -class DocumentationPart : public TDevPlugin +class DocumentationPart : public KDevPlugin { Q_OBJECT @@ -69,7 +69,6 @@ public slots: void searchInDocumentation(); void searchInDocumentation(const TQString &term); void contextSearchInDocumentation(); - void programmingHandbook(); void manPage(); void manPage(const TQString &term); void contextManPage(); diff --git a/parts/documentation/documentation_widget.cpp b/parts/documentation/documentation_widget.cpp index b69e80a5..b1ab69ca 100644 --- a/parts/documentation/documentation_widget.cpp +++ b/parts/documentation/documentation_widget.cpp @@ -31,8 +31,8 @@ #include #include -#include -#include +#include +#include #include "documentation_part.h" #include "contentsview.h" diff --git a/parts/documentation/documentation_widget.h b/parts/documentation/documentation_widget.h index fccd03b9..a813b393 100644 --- a/parts/documentation/documentation_widget.h +++ b/parts/documentation/documentation_widget.h @@ -23,7 +23,7 @@ #include class FindDocumentation; -class TDevProject; +class KDevProject; class DocumentationPart; class ContentsView; class IndexView; diff --git a/parts/documentation/docutils.cpp b/parts/documentation/docutils.cpp index ba00ea83..5360a73f 100644 --- a/parts/documentation/docutils.cpp +++ b/parts/documentation/docutils.cpp @@ -27,9 +27,9 @@ #include #include -#include +#include -#include "tdevdocumentationplugin.h" +#include "kdevdocumentationplugin.h" #include "documentation_part.h" TQString DocUtils::noEnvURL(const TQString &url) diff --git a/parts/documentation/editcatalogdlg.cpp b/parts/documentation/editcatalogdlg.cpp index 2fb81fec..8bdc19d5 100644 --- a/parts/documentation/editcatalogdlg.cpp +++ b/parts/documentation/editcatalogdlg.cpp @@ -26,7 +26,7 @@ #include #include "docutils.h" -#include "tdevdocumentationplugin.h" +#include "kdevdocumentationplugin.h" EditCatalogDlg::EditCatalogDlg(DocumentationPlugin *plugin, TQWidget* parent, const char* name, bool modal, WFlags fl) diff --git a/parts/documentation/find_documentation.cpp b/parts/documentation/find_documentation.cpp index 2f730b81..ebddcd4c 100644 --- a/parts/documentation/find_documentation.cpp +++ b/parts/documentation/find_documentation.cpp @@ -29,8 +29,8 @@ #include #include -#include -#include +#include +#include #include "documentation_widget.h" #include "documentation_part.h" diff --git a/parts/documentation/indexview.cpp b/parts/documentation/indexview.cpp index 25762451..cae33db5 100644 --- a/parts/documentation/indexview.cpp +++ b/parts/documentation/indexview.cpp @@ -30,8 +30,8 @@ #include #include -#include -#include +#include +#include #include "docutils.h" #include "selecttopic.h" diff --git a/parts/documentation/interfaces/CMakeLists.txt b/parts/documentation/interfaces/CMakeLists.txt index 2e1f0ae3..f4a2ff08 100644 --- a/parts/documentation/interfaces/CMakeLists.txt +++ b/parts/documentation/interfaces/CMakeLists.txt @@ -23,7 +23,7 @@ link_directories( ##### headers ################################### install( FILES - tdevdocumentationplugin.h + kdevdocumentationplugin.h DESTINATION ${INCLUDE_INSTALL_DIR}/tdevelop/parts/documentation ) @@ -37,7 +37,7 @@ install( FILES ##### documentation_interfaces (shared) ######### tde_add_library( documentation_interfaces SHARED AUTOMOC - SOURCES tdevdocumentationplugin.cpp + SOURCES kdevdocumentationplugin.cpp VERSION 0.0.0 LINK tdeio-shared DESTINATION ${LIB_INSTALL_DIR} diff --git a/parts/documentation/interfaces/Makefile.am b/parts/documentation/interfaces/Makefile.am index b0feb598..f128dabc 100644 --- a/parts/documentation/interfaces/Makefile.am +++ b/parts/documentation/interfaces/Makefile.am @@ -5,12 +5,12 @@ partincludedirdir = $(includedir)/tdevelop/parts/documentation lib_LTLIBRARIES = libdocumentation_interfaces.la libdocumentation_interfaces_la_LDFLAGS = $(all_libraries) libdocumentation_interfaces_la_LIBADD = $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) $(LIB_TDEIO) -libdocumentation_interfaces_la_SOURCES = tdevdocumentationplugin.cpp -partincludedir_HEADERS = tdevdocumentationplugin.h +libdocumentation_interfaces_la_SOURCES = kdevdocumentationplugin.cpp +partincludedir_HEADERS = kdevdocumentationplugin.h servicetypedir = $(kde_servicetypesdir) servicetype_DATA = tdevelopdocumentationplugins.desktop -DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils tdevutil tdevinterfaces -DOXYGEN_PROJECTNAME = TDevelop Documentation Part Interfaces Library -DOXYGEN_DOCDIRPREFIX = tdevdoc +DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils kdevutil kdevinterfaces +DOXYGEN_PROJECTNAME = KDevelop Documentation Part Interfaces Library +DOXYGEN_DOCDIRPREFIX = kdevdoc include ../../../Doxyfile.am diff --git a/parts/documentation/interfaces/kdevdocumentationplugin.cpp b/parts/documentation/interfaces/kdevdocumentationplugin.cpp new file mode 100644 index 00000000..afc9abad --- /dev/null +++ b/parts/documentation/interfaces/kdevdocumentationplugin.cpp @@ -0,0 +1,721 @@ +/* This file is part of the KDE project + Copyright (C) 2004 by 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. +*/ +#include "kdevdocumentationplugin.h" + +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +//class DocumentationItem + +DocumentationItem::DocumentationItem(DocumentationItem::Type type, TDEListView *parent, + const TQString &name) + :TDEListViewItem(parent, name), m_type(type) +{ + init(); +} + +DocumentationItem::DocumentationItem(DocumentationItem::Type type, TDEListViewItem *parent, + const TQString &name) + :TDEListViewItem(parent, name), m_type(type) +{ + init(); +} + +DocumentationItem::DocumentationItem(DocumentationItem::Type type, TDEListView *parent, + TDEListViewItem *after, const TQString &name) + :TDEListViewItem(parent, after, name), m_type(type) +{ + init(); +} + +DocumentationItem::DocumentationItem(DocumentationItem::Type type, TDEListViewItem * parent, + TDEListViewItem * after, const TQString & name ) + :TDEListViewItem(parent, after, name), m_type(type) +{ + init(); +} + + +void DocumentationItem::init( ) +{ + TQString icon; + + switch (m_type) + { + case Collection: + case Catalog: + icon = "folder"; + break; + case Book: + icon = "contents"; + break; + default: + icon = "document"; + } + + setPixmap(0, SmallIcon(icon)); +} + + + + + +//class DocumentationCatalogItem + + +DocumentationCatalogItem::DocumentationCatalogItem(DocumentationPlugin* plugin, + TDEListView *parent, const TQString &name) + :DocumentationItem(DocumentationItem::Catalog, parent, name), m_plugin(plugin), + isLoaded(false), isActivated(false), m_isProjectDocumentationItem(false) +{ + setExpandable(true); + m_plugin->addCatalog(this); +} + +DocumentationCatalogItem::DocumentationCatalogItem(DocumentationPlugin* plugin, + DocumentationItem *parent, const TQString &name) + :DocumentationItem(DocumentationItem::Catalog, parent, name), m_plugin(plugin), + isLoaded(false), isActivated(false), m_isProjectDocumentationItem(false) +{ + setExpandable(true); + m_plugin->addCatalog(this); +} + +DocumentationCatalogItem::~ DocumentationCatalogItem( ) +{ + m_plugin->clearCatalog(this); +} + +void DocumentationCatalogItem::setOpen(bool o) +{ + if (o) + { + load(); + } + DocumentationItem::setOpen(o); +} + +void DocumentationCatalogItem::load() +{ +if(isLoaded) +return; + + plugin()->createTOC(this); + isLoaded = true; +} + +void DocumentationCatalogItem::activate() +{ + if (!isActivated) + { + plugin()->setCatalogURL(this); + isActivated = true; + } + DocumentationItem::activate(); +} + + + + +//class IndexItemProto + +IndexItemProto::IndexItemProto(DocumentationPlugin *plugin, DocumentationCatalogItem *catalog, + IndexBox *listbox, const TQString &text, const TQString &description) + : m_listbox(listbox), m_text(text), m_description(description) +{ + plugin->indexes[catalog].append(this); + m_listbox->addIndexItem(this); +} + +IndexItemProto::~IndexItemProto() +{ + m_listbox->removeIndexItem(this); +} + + +//class IndexItem + +IndexItem::IndexItem(IndexBox *listbox, const TQString &text) + :TQListBoxText(listbox, text), m_listbox(listbox) +{ +} + +IndexItem::List IndexItem::urls() const +{ + List urlList; + TQValueList itemProtos = m_listbox->items[text()]; + for (TQValueList::const_iterator it = itemProtos.begin(); + it != itemProtos.end(); ++it) + urlList.append(tqMakePair((*it)->description(), (*it)->url())); + return urlList; +} + + + + +//class ConfigurationItem + +ConfigurationItem::ConfigurationItem(TQListView *parent, DocumentationPlugin * plugin, const TQString &title, const TQString &url, + bool indexPossible, bool fullTextSearchPossible) + :TQCheckListItem(parent, "", TQCheckListItem::CheckBox), m_title(title), m_url(url), + m_origTitle(title), m_contents(true), m_index(false), m_fullTextSearch(false), + m_indexPossible(indexPossible), m_fullTextSearchPossible(fullTextSearchPossible), + m_docPlugin( plugin ) +{ + setText(3, m_title); + setText(4, m_url); +} + +void ConfigurationItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, + int width, int align) +{ + if ( (column == 0) || (column == 1) || (column == 2) ) + { + if ( !p ) + return; + + TQListView *lv = listView(); + if ( !lv ) + return; + + const BackgroundMode bgmode = lv->viewport()->backgroundMode(); + const TQColorGroup::ColorRole crole = TQPalette::backgroundRoleFromMode( bgmode ); + p->fillRect(0, 0, width, height(), cg.brush(crole)); + + TQFontMetrics fm(lv->fontMetrics()); + int boxsize = lv->style().pixelMetric(TQStyle::PM_CheckListButtonSize, lv); + int marg = lv->itemMargin(); + int styleflags = TQStyle::Style_Default; + + if (((column == 0) && m_contents) || ((column == 1) && m_index) || ((column == 2) && m_fullTextSearch)) + styleflags |= TQStyle::Style_On; + else + styleflags |= TQStyle::Style_Off; + if ((column == 0) || ((column == 1) && m_indexPossible) || ((column == 2) && m_fullTextSearchPossible)) + styleflags |= TQStyle::Style_Enabled; + + int x = 0; + int y = 0; + x += 3; + if (align & AlignVCenter) + y = ((height() - boxsize) / 2) + marg; + else + y = (fm.height() + 2 + marg - boxsize) / 2; + + TQStyleOption opt(this); + lv->style().tqdrawPrimitive(TQStyle::PE_CheckListIndicator, p, + TQRect(x, y, boxsize, fm.height() + 2 + marg), cg, styleflags, opt); + + return; + } + TQListViewItem::paintCell(p, cg, column, width, align); +} + +int ConfigurationItem::width(const TQFontMetrics &fm, const TQListView *lv, int c) const +{ + if ((c == 0) || (c == 1) || (c == 2)) + return lv->style().pixelMetric(TQStyle::PM_CheckListButtonSize, lv) + 4; + return TQListViewItem::width(fm, lv, c); +} + + + + + + + + +//class DocumentationPlugin + +DocumentationPlugin::DocumentationPlugin(TDEConfig *pluginConfig, TQObject *parent, const char *name) + :TQObject(parent, name), config(pluginConfig), m_indexCreated(false) +{ +} + +DocumentationPlugin::~DocumentationPlugin() +{ +} + +void DocumentationPlugin::autoSetup() +{ + config->setGroup("General"); + if ( ! config->readBoolEntry("Autosetup", false) ) + { + autoSetupPlugin(); + config->setGroup("General"); + config->writeEntry("Autosetup", true); + config->sync(); + } +} + +void DocumentationPlugin::reload() +{ + clear(); + for (TQValueList::iterator it = catalogs.begin(); + it != catalogs.end(); ++it) + { + createTOC(*it); + } +} + +void DocumentationPlugin::clear() +{ + for (TQValueList::iterator it = catalogs.begin(); + it != catalogs.end(); ++it) + { + clearCatalog(*it); + } +} + +void DocumentationPlugin::clearCatalog(DocumentationCatalogItem *item) +{ + //clear named catalog map + for (TQMap::iterator it = namedCatalogs.begin(); + it != namedCatalogs.end(); ++it) + { + if (it.data() == item) + { + namedCatalogs.remove(it); + break; + } + } + //clear indexes for catalog + TQValueList idx = indexes[item]; + for (TQValueList::iterator it = idx.begin(); it != idx.end(); ++it) + { + delete *it; + } + indexes.remove(item); + + //remove catalog + catalogs.remove(item); +} + +void DocumentationPlugin::createIndex(IndexBox *index) +{ + if (m_indexCreated) + return; + + for (TQValueList::iterator it = catalogs.begin(); + it != catalogs.end(); ++it) + { + loadIndex(index, *it); + } + m_indexCreated = true; +} + +void DocumentationPlugin::cacheIndex(DocumentationCatalogItem *item) +{ + kdDebug() << "Creating index cache for " << item->text(0) << endl; + + TQString cacheName = locateLocal("data", TQString("kdevdocumentation/index/cache_") + item->text(0)); + TQFile cacheFile(cacheName); + if (!cacheFile.open(IO_WriteOnly)) + return; + + TQTextStream str(&cacheFile); + str.setEncoding(TQTextStream::Unicode); + str << CACHE_VERSION << endl; + + TQValueList catalogIndexes = indexes[item]; + for (TQValueList::const_iterator it = catalogIndexes.constBegin(); + it != catalogIndexes.constEnd(); ++it) + { + str << (*it)->text() << endl; + str << (*it)->description() << endl; + str << (*it)->url().url() << endl; + } + + cacheFile.close(); +} + +bool DocumentationPlugin::loadCachedIndex(IndexBox *index, DocumentationCatalogItem *item) +{ + TQString cacheName = locateLocal("data", TQString("kdevdocumentation/index/cache_") + item->cacheVersion() + item->text(0)); + TQFile cacheFile(cacheName); + if (!cacheFile.open(IO_ReadOnly)) + return false; + + kdDebug() << "Using cached index for item: " << item->text(0) << endl; + + TQTextStream str(&cacheFile); + str.setEncoding(TQTextStream::Unicode); + TQString cache = str.read(); + TQStringList cacheList = TQStringList::split("\n", cache, true); + TQString ver = cacheList.first(); + if (ver != CACHE_VERSION) + { + kdDebug() << "Wrong cache version: " << ver << endl; + return false; + } + TQStringList::const_iterator it = cacheList.begin(); + it++; + TQString s[3]; int c = 0; + for (; it != cacheList.end(); ++it) + { + s[c] = *it; + if (c == 2) + { + IndexItemProto *ii = new IndexItemProto(this, item, index, s[0], s[1]); + ii->addURL(KURL(s[2])); + c = 0; + } + else c++; + } + cacheFile.close(); + + return true; +} + +void DocumentationPlugin::addCatalog(DocumentationCatalogItem *item) +{ + catalogs.append(item); + namedCatalogs[item->text(0)] = item; +// indexes[item] = TQValueList(); +} + +void DocumentationPlugin::addCatalogConfiguration(TDEListView *configurationView, + const TQString &title, const TQString &url) +{ + new ConfigurationItem(configurationView, this, title, url, + hasCapability(Index), hasCapability(FullTextSearch)); +} + +void DocumentationPlugin::editCatalogConfiguration(ConfigurationItem *configurationItem, + const TQString &title, const TQString &url) +{ + configurationItem->setTitle(title); + configurationItem->setURL(url); +} + +void DocumentationPlugin::deleteCatalogConfiguration(const ConfigurationItem *const configurationItem) +{ + deletedConfigurationItems << configurationItem->title(); +} + +void DocumentationPlugin::clearCatalogIndex(DocumentationCatalogItem *item) +{ + //clear indexes for catalog + TQValueList idx = indexes[item]; + for (TQValueList::iterator it = idx.begin(); it != idx.end(); ++it) + { + delete *it; + } + indexes.remove(item); +} + +void DocumentationPlugin::loadIndex(IndexBox *index, DocumentationCatalogItem *item) +{ + if (!indexEnabled(item)) + return; + if (!needRefreshIndex(item) && loadCachedIndex(index, item)) + return; + createIndex(index, item); + cacheIndex(item); +} + +void DocumentationPlugin::init(TDEListView *contents) +{ + config->setGroup("Locations"); + TQMap entryMap = config->entryMap("Locations"); + + for (TQMap::const_iterator it = entryMap.begin(); + it != entryMap.end(); ++it) + { + if (catalogEnabled(it.key())) + createCatalog(contents, it.key(), config->readPathEntry(it.key())); + } +} + +void DocumentationPlugin::reinit(TDEListView *contents, IndexBox *index, TQStringList restrictions) +{ + config->setGroup("Locations"); + TQMap entryMap = config->entryMap("Locations"); + + //remove deleted in configuration catalogs + for (TQStringList::const_iterator it = deletedConfigurationItems.constBegin(); + it != deletedConfigurationItems.constEnd(); ++it) + { + if (namedCatalogs.contains(*it)) + delete namedCatalogs[*it]; + } + deletedConfigurationItems.clear(); + + //update configuration + for (TQMap::const_iterator it = entryMap.begin(); + it != entryMap.end(); ++it) + { + config->setGroup("Locations"); + if (restrictions.contains(it.key()) || (!catalogEnabled(it.key()))) + { + if (namedCatalogs.contains(it.key())) + delete namedCatalogs[it.key()]; + } + else + { + kdDebug() << "updating 1" << endl; + if (!namedCatalogs.contains(it.key())) //create catalog if it does not exist + { + DocumentationCatalogItem * item = createCatalog(contents, it.key(), config->readPathEntry(it.key())); + loadIndex(index, item); + index->setDirty(true); +// index->refill(indexes[item]); + } + else if (!indexEnabled(namedCatalogs[it.key()])) //clear index if it is disabled in configuration + { + kdDebug() << " updating: clearCatalogIndex" << endl; + clearCatalogIndex(namedCatalogs[it.key()]); + } + else if ( (indexEnabled(namedCatalogs[it.key()])) //index is requested in configuration but does not yet exist + && (!indexes.contains(namedCatalogs[it.key()])) ) + { + kdDebug() << " index requested " << endl; + loadIndex(index, namedCatalogs[it.key()]); + index->setDirty(true); + } + m_indexCreated = true; + } + } +} + +void DocumentationPlugin::loadCatalogConfiguration(TDEListView *configurationView) +{ + config->setGroup("Locations"); + TQMap entryMap = config->entryMap("Locations"); + + for (TQMap::const_iterator it = entryMap.begin(); + it != entryMap.end(); ++it) + { + if (namedCatalogs.contains(it.key()) + && namedCatalogs[it.key()]->isProjectDocumentationItem()) + continue; + + config->setGroup("Locations"); + ConfigurationItem *item = new ConfigurationItem(configurationView, this, it.key(), + config->readPathEntry(it.key()), + hasCapability(Index), hasCapability(FullTextSearch)); + config->setGroup("TOC Settings"); + item->setContents(config->readBoolEntry(item->title(), true)); + config->setGroup("Index Settings"); + item->setIndex(config->readBoolEntry(item->title(), false)); + config->setGroup("Search Settings"); + item->setFullTextSearch(config->readBoolEntry(item->title(), false)); + } +} + +void DocumentationPlugin::saveCatalogConfiguration(TDEListView *configurationView) +{ + config->setGroup("Locations"); + + for (TQStringList::const_iterator it = deletedConfigurationItems.constBegin(); + it != deletedConfigurationItems.constEnd(); ++it) + { + config->deleteEntry(*it); + } + + TQListViewItemIterator it(configurationView); + while (it.current()) + { + ConfigurationItem *confItem = dynamic_cast(it.current()); + if ( confItem->docPlugin() != this ) + { + ++it; + continue; + } + + config->setGroup("Locations"); + if (confItem->isChanged()) + config->deleteEntry(confItem->origTitle()); + config->writePathEntry(confItem->title(), confItem->url()); + + config->setGroup("TOC Settings"); + if (confItem->isChanged()) + config->deleteEntry(confItem->origTitle()); + config->writeEntry(confItem->title(), confItem->contents()); + + config->setGroup("Index Settings"); + if (confItem->isChanged()) + config->deleteEntry(confItem->origTitle()); + config->writeEntry(confItem->title(), confItem->index()); + + config->setGroup("Search Settings"); + if (confItem->isChanged()) + config->deleteEntry(confItem->origTitle()); + config->writeEntry(confItem->title(), confItem->fullTextSearch()); + + ++it; + } + config->sync(); +} + +void DocumentationPlugin::setIndexEnabled( DocumentationCatalogItem * item, bool e ) +{ + TQString group = config->group(); + config->setGroup("Index Settings"); + config->writeEntry(item->text(0), e); + config->setGroup(group); +} + +bool DocumentationPlugin::indexEnabled( DocumentationCatalogItem * item ) const +{ + TQString group = config->group(); + config->setGroup("Index Settings"); + bool b = config->readBoolEntry(item->text(0), false); + config->setGroup(group); + return b; +} + +bool DocumentationPlugin::catalogEnabled(const TQString &name) const +{ + TQString group = config->group(); + config->setGroup("TOC Settings"); + bool b = config->readBoolEntry(name, true); + config->setGroup(group); + return b; +} + +void DocumentationPlugin::setCatalogEnabled(const TQString &name, bool e) +{ + TQString group = config->group(); + config->setGroup("TOC Settings"); + config->writeEntry(name, e); + config->setGroup(group); +} + + + + +//class IndexBox + +IndexBox::IndexBox(TQWidget *parent, const char *name) + :TDEListBox(parent, name), m_dirty(false) +{ +} + +void IndexBox::addIndexItem(IndexItemProto *item) +{ + items[item->text()].append(item); +} + +void IndexBox::removeIndexItem(IndexItemProto *item) +{ + TQString text = item->text(); + items[text].remove(item); + if (items[text].count() == 0) + { + items.remove(text); + TQListBoxItem *item = findItem(text, TQt::CaseSensitive | TQt::ExactMatch); + if (item) + delete item; + } +} + +void IndexBox::fill() +{ + for (TQMap >::const_iterator it = items.begin(); + it != items.end(); ++it) + { + new IndexItem(this, it.key()); + } +} + +void IndexBox::setDirty(bool dirty) +{ + m_dirty = dirty; +} + +void IndexBox::refill() +{ + if (m_dirty) + { + clear(); + fill(); + setDirty(false); + } +} + + +ProjectDocumentationPlugin::ProjectDocumentationPlugin(DocumentationPlugin *docPlugin, DocumentationPlugin::ProjectDocType type) + :TQObject(0, 0), m_docPlugin(docPlugin), m_catalog(0), m_type(type), m_contents(0), m_index(0) +{ + kdDebug() << "ProjectDocumentationPlugin::ProjectDocumentationPlugin for type " << type << endl; + + m_watch = new KDirWatch(this); + connect(m_watch, TQT_SIGNAL(dirty(const TQString&)), this, TQT_SLOT(reinit())); + m_watch->startScan(); +} + +ProjectDocumentationPlugin::~ProjectDocumentationPlugin() +{ + deinit(); +} + +void ProjectDocumentationPlugin::init(TDEListView *contents, IndexBox *index, const TQString &url) +{ + m_contents = contents; + m_index = index; + m_url = url; + + if (m_catalog) + deinit(); + m_catalog = m_docPlugin->createCatalog(contents, + m_type == DocumentationPlugin::APIDocs ? i18n("Project API Documentation") + : i18n("Project User Manual"), url); + if (m_catalog) + { + m_catalog->setProjectDocumentationItem(true); + m_watch->addFile(url); + } +} + +void ProjectDocumentationPlugin::reinit() +{ + deinit(); + if (m_contents != 0 && m_index != 0 && m_url != 0) + init(m_contents, m_index, m_url); +} + +void ProjectDocumentationPlugin::deinit() +{ + m_watch->removeFile(m_url); + delete m_catalog; + m_catalog = 0; +} + +TQString ProjectDocumentationPlugin::pluginName() const +{ + return m_docPlugin->pluginName(); +} + +TQString ProjectDocumentationPlugin::catalogURL() const +{ + return m_url; +} + +#include "kdevdocumentationplugin.moc" diff --git a/parts/documentation/interfaces/kdevdocumentationplugin.h b/parts/documentation/interfaces/kdevdocumentationplugin.h new file mode 100644 index 00000000..a5dbe458 --- /dev/null +++ b/parts/documentation/interfaces/kdevdocumentationplugin.h @@ -0,0 +1,423 @@ +/* This file is part of the KDE project + Copyright (C) 2004 by 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 KDEV_DOC_PLUGIN_H +#define KDEV_DOC_PLUGIN_H + +#include +#include +#include + +#include +#include +#include +#include + +#define CACHE_VERSION "3" + +/**Documentation list item. +Stores the type of a documentation it represents and an URL.*/ +class DocumentationItem: public TDEListViewItem +{ +public: + /**Type of documentation which is represented by this item.*/ + enum Type { + Collection /** URL; + typedef TQValueList List; + + IndexItem(IndexBox *listbox, const TQString &text); + + List urls() const; + +private: + IndexBox *m_listbox; +}; + +/**Documentation index view.*/ +class IndexBox: public TDEListBox{ +public: + IndexBox(TQWidget *parent = 0, const char *name = 0); + + virtual void addIndexItem(IndexItemProto *item); + virtual void removeIndexItem(IndexItemProto *item); + virtual void fill(); + virtual void refill(); + virtual void setDirty(bool dirty); +// virtual void refill(TQValueList &items); + +private: + TQMap > items; + friend class IndexItem; + + bool m_dirty; +}; + +class TQPainter; +class TQColorGroup; +class TQFontMetrics; +class DocumentationPlugin; + +/**Documentation configuration item.*/ +class ConfigurationItem: public TQCheckListItem +{ +public: + ConfigurationItem(TQListView *parent, DocumentationPlugin * plugin, const TQString &title, const TQString &url, + bool indexPossible, bool fullTextSearchPossible); + + virtual TQString title() const { return m_title; } + virtual void setTitle(const TQString title) { setText(3, m_title = title); } + virtual TQString url() const { return m_url; } + virtual void setURL(const TQString url) { setText(4, m_url = url); } + + virtual bool isChanged() const { return m_title == m_origTitle; } + virtual TQString origTitle() const {return m_origTitle; } + + virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align); + virtual int width(const TQFontMetrics &fm, const TQListView *lv, int c) const; + + bool contents() const { return m_contents; } + void setContents(bool contents) { m_contents = contents; } + bool index() const { return m_index; } + void setIndex(bool index) { m_index = index; } + bool fullTextSearch() const { return m_fullTextSearch; } + void setFullTextSearch(bool fullTextSearch) { m_fullTextSearch = fullTextSearch; } + + bool indexPossible() const { return m_indexPossible; } + bool fullTextSearchPossible() const { return m_fullTextSearchPossible; } + + DocumentationPlugin * docPlugin() { return m_docPlugin; } + +private: + TQString m_title; + TQString m_url; + TQString m_origTitle; + + bool m_contents; + bool m_index; + bool m_fullTextSearch; + + bool m_indexPossible; + bool m_fullTextSearchPossible; + + DocumentationPlugin * m_docPlugin; +}; + + +class ProjectDocumentationPlugin; + +/** +@short Documentation Plugin Interface + +All KDevelop documentation plugins must implement this interface. +Documentation plugin handles certain documentation type. It provides +methods to load documentation catalogs and indexes for a documentation +of that type. It also has methods to configure catalogs and provides +a list of URL's for the full text search tool. +*/ +class DocumentationPlugin: public TQObject +{ + Q_OBJECT + +public: + /**Capability of documentation plugin.*/ + enum Capability { Index=1 /** catalogLocatorProps() = 0; + /**Returns a title of catalog defined by an url parameter.*/ + virtual TQString catalogTitle(const TQString &url) = 0; + + /**Reloads documentation catalogs and indices.*/ + virtual void reload(); + /**Clears documentation catalogs and indices.*/ + virtual void clear(); + + /**Checks if documentation plugin has given capability.*/ + bool hasCapability(Capability cap) const { return m_capabilities & cap; } + + /**Sets dirty flag for all indices. Index caching algorythm will update + the cache next time @ref createIndex is called.*/ + void setDirtyIndex(bool dirty) { m_indexCreated = dirty; } + + /**Caches index for documentation catalog. Reimplement this only if custom + caching algorythm is used (do not forget to reimplement also @ref loadCachedIndex + and @ref createIndex).*/ + virtual void cacheIndex(DocumentationCatalogItem *item); + /**Loads index from the cache. Reimplement this only if custom + caching algorythm is used (do not forget to reimplement also @ref cacheIndex + and @ref createIndex).*/ + virtual bool loadCachedIndex(IndexBox *index, DocumentationCatalogItem *item); + + /**Returns associated project documentation plugin. Default implementation returns zero. + Reimplement this if the documentation plugin can also handle project documentation.*/ + virtual ProjectDocumentationPlugin *projectDocumentationPlugin(ProjectDocType /* type */) { return 0; } + +public slots: + /**Creates index and fills index listbox. Reimplement this only if custom + caching algorythm is used (do not forget to reimplement also @ref cacheIndex + and @ref loadCachedIndex).*/ + virtual void createIndex(IndexBox *index); + +protected: + /**A list of loaded documentation catalogs.*/ + TQValueList catalogs; + /**A map of names of loaded documentation catalogs.*/ + TQMap namedCatalogs; + /**A map of indices of loaded documentation catalogs.*/ + TQMap > indexes; + + /**Sets capabilities of documentation plugin.*/ + void setCapabilities(int caps) { m_capabilities = caps; } + /**Clears index of given catalog.*/ + virtual void clearCatalogIndex(DocumentationCatalogItem *item); + /**Loads index from cache or creates and caches it if does not exist.*/ + void loadIndex(IndexBox *index, DocumentationCatalogItem *item); + + /**Stores items deleted from configuration. @ref saveCatalogConfiguration + uses this to remove entries from configuration file.*/ + TQStringList deletedConfigurationItems; + + /**Configuration object used by a plugin.*/ + TDEConfig *config; + +private: + /**Adds catalog item to catalogs, namedCatalogs and indexes lists and maps.*/ + virtual void addCatalog(DocumentationCatalogItem *item); + /**Removes catalog item from catalogs, namedCatalogs and indexes lists and maps.*/ + virtual void clearCatalog(DocumentationCatalogItem *item); + + int m_capabilities; + bool m_indexCreated; + + +friend class IndexItemProto; +friend class DocumentationCatalogItem; +}; + + +/** +@short Project documentation plugin + +Represents functionality to display project documentation catalog and index in documentation browser. +*/ +class ProjectDocumentationPlugin: public TQObject { + Q_OBJECT + +public: + ProjectDocumentationPlugin(DocumentationPlugin *docPlugin, DocumentationPlugin::ProjectDocType type); + virtual ~ProjectDocumentationPlugin(); + + /**Initializes project documentation plugin - creates documentation catalog.*/ + virtual void init(TDEListView *contents, IndexBox *index, const TQString &url); + /**Deinitializes project documentation plugin - removes documentation catalog.*/ + virtual void deinit(); + + TQString pluginName() const; + TQString catalogURL() const; + +public slots: + /**Performs reinitialization if project documentation has changed (after building api documentation).*/ + virtual void reinit(); + +protected: + DocumentationPlugin *m_docPlugin; + DocumentationCatalogItem *m_catalog; + +private: + DocumentationPlugin::ProjectDocType m_type; + + class KDirWatch *m_watch; + class TDEListView *m_contents; + class IndexBox *m_index; + TQString m_url; +}; + +#endif diff --git a/parts/documentation/interfaces/tdevdocumentationplugin.cpp b/parts/documentation/interfaces/tdevdocumentationplugin.cpp deleted file mode 100644 index f3c20841..00000000 --- a/parts/documentation/interfaces/tdevdocumentationplugin.cpp +++ /dev/null @@ -1,721 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 by 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. -*/ -#include "tdevdocumentationplugin.h" - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -//class DocumentationItem - -DocumentationItem::DocumentationItem(DocumentationItem::Type type, TDEListView *parent, - const TQString &name) - :TDEListViewItem(parent, name), m_type(type) -{ - init(); -} - -DocumentationItem::DocumentationItem(DocumentationItem::Type type, TDEListViewItem *parent, - const TQString &name) - :TDEListViewItem(parent, name), m_type(type) -{ - init(); -} - -DocumentationItem::DocumentationItem(DocumentationItem::Type type, TDEListView *parent, - TDEListViewItem *after, const TQString &name) - :TDEListViewItem(parent, after, name), m_type(type) -{ - init(); -} - -DocumentationItem::DocumentationItem(DocumentationItem::Type type, TDEListViewItem * parent, - TDEListViewItem * after, const TQString & name ) - :TDEListViewItem(parent, after, name), m_type(type) -{ - init(); -} - - -void DocumentationItem::init( ) -{ - TQString icon; - - switch (m_type) - { - case Collection: - case Catalog: - icon = "folder"; - break; - case Book: - icon = "contents"; - break; - default: - icon = "document"; - } - - setPixmap(0, SmallIcon(icon)); -} - - - - - -//class DocumentationCatalogItem - - -DocumentationCatalogItem::DocumentationCatalogItem(DocumentationPlugin* plugin, - TDEListView *parent, const TQString &name) - :DocumentationItem(DocumentationItem::Catalog, parent, name), m_plugin(plugin), - isLoaded(false), isActivated(false), m_isProjectDocumentationItem(false) -{ - setExpandable(true); - m_plugin->addCatalog(this); -} - -DocumentationCatalogItem::DocumentationCatalogItem(DocumentationPlugin* plugin, - DocumentationItem *parent, const TQString &name) - :DocumentationItem(DocumentationItem::Catalog, parent, name), m_plugin(plugin), - isLoaded(false), isActivated(false), m_isProjectDocumentationItem(false) -{ - setExpandable(true); - m_plugin->addCatalog(this); -} - -DocumentationCatalogItem::~ DocumentationCatalogItem( ) -{ - m_plugin->clearCatalog(this); -} - -void DocumentationCatalogItem::setOpen(bool o) -{ - if (o) - { - load(); - } - DocumentationItem::setOpen(o); -} - -void DocumentationCatalogItem::load() -{ -if(isLoaded) -return; - - plugin()->createTOC(this); - isLoaded = true; -} - -void DocumentationCatalogItem::activate() -{ - if (!isActivated) - { - plugin()->setCatalogURL(this); - isActivated = true; - } - DocumentationItem::activate(); -} - - - - -//class IndexItemProto - -IndexItemProto::IndexItemProto(DocumentationPlugin *plugin, DocumentationCatalogItem *catalog, - IndexBox *listbox, const TQString &text, const TQString &description) - : m_listbox(listbox), m_text(text), m_description(description) -{ - plugin->indexes[catalog].append(this); - m_listbox->addIndexItem(this); -} - -IndexItemProto::~IndexItemProto() -{ - m_listbox->removeIndexItem(this); -} - - -//class IndexItem - -IndexItem::IndexItem(IndexBox *listbox, const TQString &text) - :TQListBoxText(listbox, text), m_listbox(listbox) -{ -} - -IndexItem::List IndexItem::urls() const -{ - List urlList; - TQValueList itemProtos = m_listbox->items[text()]; - for (TQValueList::const_iterator it = itemProtos.begin(); - it != itemProtos.end(); ++it) - urlList.append(tqMakePair((*it)->description(), (*it)->url())); - return urlList; -} - - - - -//class ConfigurationItem - -ConfigurationItem::ConfigurationItem(TQListView *parent, DocumentationPlugin * plugin, const TQString &title, const TQString &url, - bool indexPossible, bool fullTextSearchPossible) - :TQCheckListItem(parent, "", TQCheckListItem::CheckBox), m_title(title), m_url(url), - m_origTitle(title), m_contents(true), m_index(false), m_fullTextSearch(false), - m_indexPossible(indexPossible), m_fullTextSearchPossible(fullTextSearchPossible), - m_docPlugin( plugin ) -{ - setText(3, m_title); - setText(4, m_url); -} - -void ConfigurationItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, - int width, int align) -{ - if ( (column == 0) || (column == 1) || (column == 2) ) - { - if ( !p ) - return; - - TQListView *lv = listView(); - if ( !lv ) - return; - - const BackgroundMode bgmode = lv->viewport()->backgroundMode(); - const TQColorGroup::ColorRole crole = TQPalette::backgroundRoleFromMode( bgmode ); - p->fillRect(0, 0, width, height(), cg.brush(crole)); - - TQFontMetrics fm(lv->fontMetrics()); - int boxsize = lv->style().pixelMetric(TQStyle::PM_CheckListButtonSize, lv); - int marg = lv->itemMargin(); - int styleflags = TQStyle::Style_Default; - - if (((column == 0) && m_contents) || ((column == 1) && m_index) || ((column == 2) && m_fullTextSearch)) - styleflags |= TQStyle::Style_On; - else - styleflags |= TQStyle::Style_Off; - if ((column == 0) || ((column == 1) && m_indexPossible) || ((column == 2) && m_fullTextSearchPossible)) - styleflags |= TQStyle::Style_Enabled; - - int x = 0; - int y = 0; - x += 3; - if (align & AlignVCenter) - y = ((height() - boxsize) / 2) + marg; - else - y = (fm.height() + 2 + marg - boxsize) / 2; - - TQStyleOption opt(this); - lv->style().tqdrawPrimitive(TQStyle::PE_CheckListIndicator, p, - TQRect(x, y, boxsize, fm.height() + 2 + marg), cg, styleflags, opt); - - return; - } - TQListViewItem::paintCell(p, cg, column, width, align); -} - -int ConfigurationItem::width(const TQFontMetrics &fm, const TQListView *lv, int c) const -{ - if ((c == 0) || (c == 1) || (c == 2)) - return lv->style().pixelMetric(TQStyle::PM_CheckListButtonSize, lv) + 4; - return TQListViewItem::width(fm, lv, c); -} - - - - - - - - -//class DocumentationPlugin - -DocumentationPlugin::DocumentationPlugin(TDEConfig *pluginConfig, TQObject *parent, const char *name) - :TQObject(parent, name), config(pluginConfig), m_indexCreated(false) -{ -} - -DocumentationPlugin::~DocumentationPlugin() -{ -} - -void DocumentationPlugin::autoSetup() -{ - config->setGroup("General"); - if ( ! config->readBoolEntry("Autosetup", false) ) - { - autoSetupPlugin(); - config->setGroup("General"); - config->writeEntry("Autosetup", true); - config->sync(); - } -} - -void DocumentationPlugin::reload() -{ - clear(); - for (TQValueList::iterator it = catalogs.begin(); - it != catalogs.end(); ++it) - { - createTOC(*it); - } -} - -void DocumentationPlugin::clear() -{ - for (TQValueList::iterator it = catalogs.begin(); - it != catalogs.end(); ++it) - { - clearCatalog(*it); - } -} - -void DocumentationPlugin::clearCatalog(DocumentationCatalogItem *item) -{ - //clear named catalog map - for (TQMap::iterator it = namedCatalogs.begin(); - it != namedCatalogs.end(); ++it) - { - if (it.data() == item) - { - namedCatalogs.remove(it); - break; - } - } - //clear indexes for catalog - TQValueList idx = indexes[item]; - for (TQValueList::iterator it = idx.begin(); it != idx.end(); ++it) - { - delete *it; - } - indexes.remove(item); - - //remove catalog - catalogs.remove(item); -} - -void DocumentationPlugin::createIndex(IndexBox *index) -{ - if (m_indexCreated) - return; - - for (TQValueList::iterator it = catalogs.begin(); - it != catalogs.end(); ++it) - { - loadIndex(index, *it); - } - m_indexCreated = true; -} - -void DocumentationPlugin::cacheIndex(DocumentationCatalogItem *item) -{ - kdDebug() << "Creating index cache for " << item->text(0) << endl; - - TQString cacheName = locateLocal("data", TQString("tdevdocumentation/index/cache_") + item->text(0)); - TQFile cacheFile(cacheName); - if (!cacheFile.open(IO_WriteOnly)) - return; - - TQTextStream str(&cacheFile); - str.setEncoding(TQTextStream::Unicode); - str << CACHE_VERSION << endl; - - TQValueList catalogIndexes = indexes[item]; - for (TQValueList::const_iterator it = catalogIndexes.constBegin(); - it != catalogIndexes.constEnd(); ++it) - { - str << (*it)->text() << endl; - str << (*it)->description() << endl; - str << (*it)->url().url() << endl; - } - - cacheFile.close(); -} - -bool DocumentationPlugin::loadCachedIndex(IndexBox *index, DocumentationCatalogItem *item) -{ - TQString cacheName = locateLocal("data", TQString("tdevdocumentation/index/cache_") + item->cacheVersion() + item->text(0)); - TQFile cacheFile(cacheName); - if (!cacheFile.open(IO_ReadOnly)) - return false; - - kdDebug() << "Using cached index for item: " << item->text(0) << endl; - - TQTextStream str(&cacheFile); - str.setEncoding(TQTextStream::Unicode); - TQString cache = str.read(); - TQStringList cacheList = TQStringList::split("\n", cache, true); - TQString ver = cacheList.first(); - if (ver != CACHE_VERSION) - { - kdDebug() << "Wrong cache version: " << ver << endl; - return false; - } - TQStringList::const_iterator it = cacheList.begin(); - it++; - TQString s[3]; int c = 0; - for (; it != cacheList.end(); ++it) - { - s[c] = *it; - if (c == 2) - { - IndexItemProto *ii = new IndexItemProto(this, item, index, s[0], s[1]); - ii->addURL(KURL(s[2])); - c = 0; - } - else c++; - } - cacheFile.close(); - - return true; -} - -void DocumentationPlugin::addCatalog(DocumentationCatalogItem *item) -{ - catalogs.append(item); - namedCatalogs[item->text(0)] = item; -// indexes[item] = TQValueList(); -} - -void DocumentationPlugin::addCatalogConfiguration(TDEListView *configurationView, - const TQString &title, const TQString &url) -{ - new ConfigurationItem(configurationView, this, title, url, - hasCapability(Index), hasCapability(FullTextSearch)); -} - -void DocumentationPlugin::editCatalogConfiguration(ConfigurationItem *configurationItem, - const TQString &title, const TQString &url) -{ - configurationItem->setTitle(title); - configurationItem->setURL(url); -} - -void DocumentationPlugin::deleteCatalogConfiguration(const ConfigurationItem *const configurationItem) -{ - deletedConfigurationItems << configurationItem->title(); -} - -void DocumentationPlugin::clearCatalogIndex(DocumentationCatalogItem *item) -{ - //clear indexes for catalog - TQValueList idx = indexes[item]; - for (TQValueList::iterator it = idx.begin(); it != idx.end(); ++it) - { - delete *it; - } - indexes.remove(item); -} - -void DocumentationPlugin::loadIndex(IndexBox *index, DocumentationCatalogItem *item) -{ - if (!indexEnabled(item)) - return; - if (!needRefreshIndex(item) && loadCachedIndex(index, item)) - return; - createIndex(index, item); - cacheIndex(item); -} - -void DocumentationPlugin::init(TDEListView *contents) -{ - config->setGroup("Locations"); - TQMap entryMap = config->entryMap("Locations"); - - for (TQMap::const_iterator it = entryMap.begin(); - it != entryMap.end(); ++it) - { - if (catalogEnabled(it.key())) - createCatalog(contents, it.key(), config->readPathEntry(it.key())); - } -} - -void DocumentationPlugin::reinit(TDEListView *contents, IndexBox *index, TQStringList restrictions) -{ - config->setGroup("Locations"); - TQMap entryMap = config->entryMap("Locations"); - - //remove deleted in configuration catalogs - for (TQStringList::const_iterator it = deletedConfigurationItems.constBegin(); - it != deletedConfigurationItems.constEnd(); ++it) - { - if (namedCatalogs.contains(*it)) - delete namedCatalogs[*it]; - } - deletedConfigurationItems.clear(); - - //update configuration - for (TQMap::const_iterator it = entryMap.begin(); - it != entryMap.end(); ++it) - { - config->setGroup("Locations"); - if (restrictions.contains(it.key()) || (!catalogEnabled(it.key()))) - { - if (namedCatalogs.contains(it.key())) - delete namedCatalogs[it.key()]; - } - else - { - kdDebug() << "updating 1" << endl; - if (!namedCatalogs.contains(it.key())) //create catalog if it does not exist - { - DocumentationCatalogItem * item = createCatalog(contents, it.key(), config->readPathEntry(it.key())); - loadIndex(index, item); - index->setDirty(true); -// index->refill(indexes[item]); - } - else if (!indexEnabled(namedCatalogs[it.key()])) //clear index if it is disabled in configuration - { - kdDebug() << " updating: clearCatalogIndex" << endl; - clearCatalogIndex(namedCatalogs[it.key()]); - } - else if ( (indexEnabled(namedCatalogs[it.key()])) //index is requested in configuration but does not yet exist - && (!indexes.contains(namedCatalogs[it.key()])) ) - { - kdDebug() << " index requested " << endl; - loadIndex(index, namedCatalogs[it.key()]); - index->setDirty(true); - } - m_indexCreated = true; - } - } -} - -void DocumentationPlugin::loadCatalogConfiguration(TDEListView *configurationView) -{ - config->setGroup("Locations"); - TQMap entryMap = config->entryMap("Locations"); - - for (TQMap::const_iterator it = entryMap.begin(); - it != entryMap.end(); ++it) - { - if (namedCatalogs.contains(it.key()) - && namedCatalogs[it.key()]->isProjectDocumentationItem()) - continue; - - config->setGroup("Locations"); - ConfigurationItem *item = new ConfigurationItem(configurationView, this, it.key(), - config->readPathEntry(it.key()), - hasCapability(Index), hasCapability(FullTextSearch)); - config->setGroup("TOC Settings"); - item->setContents(config->readBoolEntry(item->title(), true)); - config->setGroup("Index Settings"); - item->setIndex(config->readBoolEntry(item->title(), false)); - config->setGroup("Search Settings"); - item->setFullTextSearch(config->readBoolEntry(item->title(), false)); - } -} - -void DocumentationPlugin::saveCatalogConfiguration(TDEListView *configurationView) -{ - config->setGroup("Locations"); - - for (TQStringList::const_iterator it = deletedConfigurationItems.constBegin(); - it != deletedConfigurationItems.constEnd(); ++it) - { - config->deleteEntry(*it); - } - - TQListViewItemIterator it(configurationView); - while (it.current()) - { - ConfigurationItem *confItem = dynamic_cast(it.current()); - if ( confItem->docPlugin() != this ) - { - ++it; - continue; - } - - config->setGroup("Locations"); - if (confItem->isChanged()) - config->deleteEntry(confItem->origTitle()); - config->writePathEntry(confItem->title(), confItem->url()); - - config->setGroup("TOC Settings"); - if (confItem->isChanged()) - config->deleteEntry(confItem->origTitle()); - config->writeEntry(confItem->title(), confItem->contents()); - - config->setGroup("Index Settings"); - if (confItem->isChanged()) - config->deleteEntry(confItem->origTitle()); - config->writeEntry(confItem->title(), confItem->index()); - - config->setGroup("Search Settings"); - if (confItem->isChanged()) - config->deleteEntry(confItem->origTitle()); - config->writeEntry(confItem->title(), confItem->fullTextSearch()); - - ++it; - } - config->sync(); -} - -void DocumentationPlugin::setIndexEnabled( DocumentationCatalogItem * item, bool e ) -{ - TQString group = config->group(); - config->setGroup("Index Settings"); - config->writeEntry(item->text(0), e); - config->setGroup(group); -} - -bool DocumentationPlugin::indexEnabled( DocumentationCatalogItem * item ) const -{ - TQString group = config->group(); - config->setGroup("Index Settings"); - bool b = config->readBoolEntry(item->text(0), false); - config->setGroup(group); - return b; -} - -bool DocumentationPlugin::catalogEnabled(const TQString &name) const -{ - TQString group = config->group(); - config->setGroup("TOC Settings"); - bool b = config->readBoolEntry(name, true); - config->setGroup(group); - return b; -} - -void DocumentationPlugin::setCatalogEnabled(const TQString &name, bool e) -{ - TQString group = config->group(); - config->setGroup("TOC Settings"); - config->writeEntry(name, e); - config->setGroup(group); -} - - - - -//class IndexBox - -IndexBox::IndexBox(TQWidget *parent, const char *name) - :TDEListBox(parent, name), m_dirty(false) -{ -} - -void IndexBox::addIndexItem(IndexItemProto *item) -{ - items[item->text()].append(item); -} - -void IndexBox::removeIndexItem(IndexItemProto *item) -{ - TQString text = item->text(); - items[text].remove(item); - if (items[text].count() == 0) - { - items.remove(text); - TQListBoxItem *item = findItem(text, TQt::CaseSensitive | TQt::ExactMatch); - if (item) - delete item; - } -} - -void IndexBox::fill() -{ - for (TQMap >::const_iterator it = items.begin(); - it != items.end(); ++it) - { - new IndexItem(this, it.key()); - } -} - -void IndexBox::setDirty(bool dirty) -{ - m_dirty = dirty; -} - -void IndexBox::refill() -{ - if (m_dirty) - { - clear(); - fill(); - setDirty(false); - } -} - - -ProjectDocumentationPlugin::ProjectDocumentationPlugin(DocumentationPlugin *docPlugin, DocumentationPlugin::ProjectDocType type) - :TQObject(0, 0), m_docPlugin(docPlugin), m_catalog(0), m_type(type), m_contents(0), m_index(0) -{ - kdDebug() << "ProjectDocumentationPlugin::ProjectDocumentationPlugin for type " << type << endl; - - m_watch = new KDirWatch(this); - connect(m_watch, TQT_SIGNAL(dirty(const TQString&)), this, TQT_SLOT(reinit())); - m_watch->startScan(); -} - -ProjectDocumentationPlugin::~ProjectDocumentationPlugin() -{ - deinit(); -} - -void ProjectDocumentationPlugin::init(TDEListView *contents, IndexBox *index, const TQString &url) -{ - m_contents = contents; - m_index = index; - m_url = url; - - if (m_catalog) - deinit(); - m_catalog = m_docPlugin->createCatalog(contents, - m_type == DocumentationPlugin::APIDocs ? i18n("Project API Documentation") - : i18n("Project User Manual"), url); - if (m_catalog) - { - m_catalog->setProjectDocumentationItem(true); - m_watch->addFile(url); - } -} - -void ProjectDocumentationPlugin::reinit() -{ - deinit(); - if (m_contents != 0 && m_index != 0 && m_url != 0) - init(m_contents, m_index, m_url); -} - -void ProjectDocumentationPlugin::deinit() -{ - m_watch->removeFile(m_url); - delete m_catalog; - m_catalog = 0; -} - -TQString ProjectDocumentationPlugin::pluginName() const -{ - return m_docPlugin->pluginName(); -} - -TQString ProjectDocumentationPlugin::catalogURL() const -{ - return m_url; -} - -#include "tdevdocumentationplugin.moc" diff --git a/parts/documentation/interfaces/tdevdocumentationplugin.h b/parts/documentation/interfaces/tdevdocumentationplugin.h deleted file mode 100644 index ed18a86a..00000000 --- a/parts/documentation/interfaces/tdevdocumentationplugin.h +++ /dev/null @@ -1,423 +0,0 @@ -/* This file is part of the KDE project - Copyright (C) 2004 by 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 TDEV_DOC_PLUGIN_H -#define TDEV_DOC_PLUGIN_H - -#include -#include -#include - -#include -#include -#include -#include - -#define CACHE_VERSION "3" - -/**Documentation list item. -Stores the type of a documentation it represents and an URL.*/ -class DocumentationItem: public TDEListViewItem -{ -public: - /**Type of documentation which is represented by this item.*/ - enum Type { - Collection /** URL; - typedef TQValueList List; - - IndexItem(IndexBox *listbox, const TQString &text); - - List urls() const; - -private: - IndexBox *m_listbox; -}; - -/**Documentation index view.*/ -class IndexBox: public TDEListBox{ -public: - IndexBox(TQWidget *parent = 0, const char *name = 0); - - virtual void addIndexItem(IndexItemProto *item); - virtual void removeIndexItem(IndexItemProto *item); - virtual void fill(); - virtual void refill(); - virtual void setDirty(bool dirty); -// virtual void refill(TQValueList &items); - -private: - TQMap > items; - friend class IndexItem; - - bool m_dirty; -}; - -class TQPainter; -class TQColorGroup; -class TQFontMetrics; -class DocumentationPlugin; - -/**Documentation configuration item.*/ -class ConfigurationItem: public TQCheckListItem -{ -public: - ConfigurationItem(TQListView *parent, DocumentationPlugin * plugin, const TQString &title, const TQString &url, - bool indexPossible, bool fullTextSearchPossible); - - virtual TQString title() const { return m_title; } - virtual void setTitle(const TQString title) { setText(3, m_title = title); } - virtual TQString url() const { return m_url; } - virtual void setURL(const TQString url) { setText(4, m_url = url); } - - virtual bool isChanged() const { return m_title == m_origTitle; } - virtual TQString origTitle() const {return m_origTitle; } - - virtual void paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align); - virtual int width(const TQFontMetrics &fm, const TQListView *lv, int c) const; - - bool contents() const { return m_contents; } - void setContents(bool contents) { m_contents = contents; } - bool index() const { return m_index; } - void setIndex(bool index) { m_index = index; } - bool fullTextSearch() const { return m_fullTextSearch; } - void setFullTextSearch(bool fullTextSearch) { m_fullTextSearch = fullTextSearch; } - - bool indexPossible() const { return m_indexPossible; } - bool fullTextSearchPossible() const { return m_fullTextSearchPossible; } - - DocumentationPlugin * docPlugin() { return m_docPlugin; } - -private: - TQString m_title; - TQString m_url; - TQString m_origTitle; - - bool m_contents; - bool m_index; - bool m_fullTextSearch; - - bool m_indexPossible; - bool m_fullTextSearchPossible; - - DocumentationPlugin * m_docPlugin; -}; - - -class ProjectDocumentationPlugin; - -/** -@short Documentation Plugin Interface - -All KDevelop documentation plugins must implement this interface. -Documentation plugin handles certain documentation type. It provides -methods to load documentation catalogs and indexes for a documentation -of that type. It also has methods to configure catalogs and provides -a list of URL's for the full text search tool. -*/ -class DocumentationPlugin: public TQObject -{ - Q_OBJECT - -public: - /**Capability of documentation plugin.*/ - enum Capability { Index=1 /** catalogLocatorProps() = 0; - /**Returns a title of catalog defined by an url parameter.*/ - virtual TQString catalogTitle(const TQString &url) = 0; - - /**Reloads documentation catalogs and indices.*/ - virtual void reload(); - /**Clears documentation catalogs and indices.*/ - virtual void clear(); - - /**Checks if documentation plugin has given capability.*/ - bool hasCapability(Capability cap) const { return m_capabilities & cap; } - - /**Sets dirty flag for all indices. Index caching algorythm will update - the cache next time @ref createIndex is called.*/ - void setDirtyIndex(bool dirty) { m_indexCreated = dirty; } - - /**Caches index for documentation catalog. Reimplement this only if custom - caching algorythm is used (do not forget to reimplement also @ref loadCachedIndex - and @ref createIndex).*/ - virtual void cacheIndex(DocumentationCatalogItem *item); - /**Loads index from the cache. Reimplement this only if custom - caching algorythm is used (do not forget to reimplement also @ref cacheIndex - and @ref createIndex).*/ - virtual bool loadCachedIndex(IndexBox *index, DocumentationCatalogItem *item); - - /**Returns associated project documentation plugin. Default implementation returns zero. - Reimplement this if the documentation plugin can also handle project documentation.*/ - virtual ProjectDocumentationPlugin *projectDocumentationPlugin(ProjectDocType /* type */) { return 0; } - -public slots: - /**Creates index and fills index listbox. Reimplement this only if custom - caching algorythm is used (do not forget to reimplement also @ref cacheIndex - and @ref loadCachedIndex).*/ - virtual void createIndex(IndexBox *index); - -protected: - /**A list of loaded documentation catalogs.*/ - TQValueList catalogs; - /**A map of names of loaded documentation catalogs.*/ - TQMap namedCatalogs; - /**A map of indices of loaded documentation catalogs.*/ - TQMap > indexes; - - /**Sets capabilities of documentation plugin.*/ - void setCapabilities(int caps) { m_capabilities = caps; } - /**Clears index of given catalog.*/ - virtual void clearCatalogIndex(DocumentationCatalogItem *item); - /**Loads index from cache or creates and caches it if does not exist.*/ - void loadIndex(IndexBox *index, DocumentationCatalogItem *item); - - /**Stores items deleted from configuration. @ref saveCatalogConfiguration - uses this to remove entries from configuration file.*/ - TQStringList deletedConfigurationItems; - - /**Configuration object used by a plugin.*/ - TDEConfig *config; - -private: - /**Adds catalog item to catalogs, namedCatalogs and indexes lists and maps.*/ - virtual void addCatalog(DocumentationCatalogItem *item); - /**Removes catalog item from catalogs, namedCatalogs and indexes lists and maps.*/ - virtual void clearCatalog(DocumentationCatalogItem *item); - - int m_capabilities; - bool m_indexCreated; - - -friend class IndexItemProto; -friend class DocumentationCatalogItem; -}; - - -/** -@short Project documentation plugin - -Represents functionality to display project documentation catalog and index in documentation browser. -*/ -class ProjectDocumentationPlugin: public TQObject { - Q_OBJECT - -public: - ProjectDocumentationPlugin(DocumentationPlugin *docPlugin, DocumentationPlugin::ProjectDocType type); - virtual ~ProjectDocumentationPlugin(); - - /**Initializes project documentation plugin - creates documentation catalog.*/ - virtual void init(TDEListView *contents, IndexBox *index, const TQString &url); - /**Deinitializes project documentation plugin - removes documentation catalog.*/ - virtual void deinit(); - - TQString pluginName() const; - TQString catalogURL() const; - -public slots: - /**Performs reinitialization if project documentation has changed (after building api documentation).*/ - virtual void reinit(); - -protected: - DocumentationPlugin *m_docPlugin; - DocumentationCatalogItem *m_catalog; - -private: - DocumentationPlugin::ProjectDocType m_type; - - class KDirWatch *m_watch; - class TDEListView *m_contents; - class IndexBox *m_index; - TQString m_url; -}; - -#endif diff --git a/parts/documentation/kdevdocumentation.desktop b/parts/documentation/kdevdocumentation.desktop new file mode 100644 index 00000000..674812f4 --- /dev/null +++ b/parts/documentation/kdevdocumentation.desktop @@ -0,0 +1,82 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=The Documentation plugin offers browsing and searching in local and online documentation with support for multiple documentation systems. +Comment[ca]=El connector de documentació ofereix navegació i recerca en documentació local i en línia amb suport per a múltiples sistemes de documentació. +Comment[da]=Dokumentations-plugin tilbyder visning og søgning i lokal og online dokumentation med understøttelse af flere dokumentations-systemer. +Comment[de]=Die Dokumentations-Komponente bietet eine Browsefunktion und Unterstützung für die Suche in mehreren Hilfedokumenten und Dokumentationssystemen. +Comment[el]=Το πρόσθετο τεκμηρίωσης προσφέρει περιήγηση και αναζήτηση σε τοπική και απομακρυσμένη τεκμηρίωση για πολλαπλά συστήματα τεκμηρίωσης. +Comment[es]=El complemento de documentación proporciona navegación y búsqueda en la documentación, tanto local como en línea, y permite múltiples sistemas de documentación. +Comment[et]=Dokumentatsiooniplugin võimaldab lehitseda ja otsida nii kohalikus kui võrgudokumentatsioonis paljusid dokumentatsioonisüsteeme kasutades. +Comment[eu]=Dokumentazio-pluginak lokaleko eta urruneko dokumentazio arakatzeko eta bilatzeko aukera ematen dizu, eta dokumentazio-sistema anitz onartzen ditu. +Comment[fa]=وصلۀ مستندسازی، مرور و جستجو در مستندات محلی و برخط را با پشتیبانی از سیستمهای مستندسازی چندگانه، ارائه می‌کند. +Comment[fr]=Le module externe de documentation offre une navigation et une recherche dans la documentation locale et en ligne ainsi que la prise en charge de systèmes de documentation mutiples. +Comment[gl]=A extensión de documentación ofrece navegación e búsqueda en documentación local e en liña con soporte para múltiples sistemas de documentación. +Comment[hu]=Dokumentációmegjelenítő elem helyi és távoli dokumentáció böngészéséhez, keresési lehetőséggel. Többféle formátumot támogat. +Comment[it]=Il plugin di documentazione offre navigazione e ricerca in locale e documentazione in linea con supporto per sistemi di documentazione multipla. +Comment[ms]=Plugin dokumentasi menawarkan pelungsuran dan pencarian dalam dokumentasi tempatan dan dalam talian dengan sokongan untuk pelbagai sistem dokumentasi. +Comment[nds]=Mit dat Dokmentatschoon-Moduul kannst Du lokale un Tokoppel-Dokmentatschoon dörkieken un -söken, mehr Dokmentatschoonsystemen warrt ünnerstütt. +Comment[ne]=मिसिलीकरण प्लगइनले बहुविध मिसिलीकरण प्रणालीको समर्थनसँग अनलाइन मिसिलीकरण र स्थानीय रूपमा ब्राउज र खोजी गर्न दिन्छ । +Comment[nl]=De documentatieplugin welke het mogelijk maakt om door lokale documentatie en documentatie op afstand te bladeren en te zoeken. Met ondersteuning voor verschillende documentatiesystemen. +Comment[pl]=Kontrola dokumentacji z obsługą przeglądania i wyszukiwania w różnych plikach pomocy i systemach dokumentacji. +Comment[pt]=O 'plugin' de documentação oferece navegação e procura em documentação local e em rede com suporte para vários sistemas de documentação. +Comment[pt_BR]=A documentação do plug-in oferece navegação e busca na documentação local e online com suporte para diversos sistemas de documentação. +Comment[ru]=Модуль документации позволяет упростить работу с документацией. +Comment[sk]=Dokumentačný modul proskytuje prehliadanie a vyhľadávanie v lokálnej a online dokumentácie s podporou viacerých dokumentačných systémov. +Comment[sr]=Прикључак за документацију са подршком за прегледање и тражење у локалној и документацији на вези, за више документационих система. +Comment[sr@Latn]=Priključak za dokumentaciju sa podrškom za pregledanje i traženje u lokalnoj i dokumentaciji na vezi, za više dokumentacionih sistema. +Comment[sv]=Dokumentationsinsticksprogrammet erbjuder bläddring och sökning i lokal dokumentation och dokumentation på nätet, med stöd för flera dokumentationssystem. +Comment[tr]=Belgelendirme eklentisi, çoklu belgelendirme sistemlerine destek ile, yerel ve çevrimiçi belgelere gözatma ve bu belgelerde arama yapılmasına izin verir. +Comment[zh_CN]=文档插件提供了本地和在线文档中提供浏览和搜索功能,支持多种文档系统 +Comment[zh_TW]=文件外掛程式提供對本地與線上文件的瀏覽與搜尋功能,並支援多重文件系統。 +Name=KDevDocumentation +Name[da]=TDevelop dokumentation +Name[nds]=TDevelop-Dokmentatschoon +Name[pt_BR]=KDevDocumentação +Name[sk]=KDev dokumentácia +Name[sv]=TDevelop dokumentation +Name[ta]=KDev ஆவணமாக்கல் +Name[tg]=Ҳуҷҷатҳои KDev +Name[zh_TW]=TDevelop 文件 +GenericName=Documentation +GenericName[br]=Teuliadur +GenericName[ca]=Documentació +GenericName[cy]=Dogfenniaeth +GenericName[da]=Dokumentation +GenericName[de]=Dokumentationsbaum +GenericName[el]=Τεκμηρίωση +GenericName[es]=Documentación +GenericName[et]=Dokumentatsioon +GenericName[eu]=Dokumentazioa +GenericName[fa]=مستندات +GenericName[ga]=Doiciméadú +GenericName[gl]=Documentación +GenericName[hi]=दस्तावेज़ीकरण +GenericName[hu]=Dokumentáció +GenericName[it]=Documentazione +GenericName[ja]=ドキュメンテーション +GenericName[ms]=Dokumentasi +GenericName[nds]=Dokmentatschoon +GenericName[ne]=मिसिलीकरण +GenericName[nl]=Documentatie +GenericName[pl]=Dokumentacja +GenericName[pt]=Documentação +GenericName[pt_BR]=Documentação +GenericName[ru]=Просмотр документации +GenericName[sk]=Dokumentácia +GenericName[sl]=Dokumentacija +GenericName[sr]=Документација +GenericName[sr@Latn]=Dokumentacija +GenericName[sv]=Dokumentation +GenericName[ta]=ஆவணமாக்கல் +GenericName[tg]=Намоиши ҳуҷҷатҳо +GenericName[tr]=Belgelendirme +GenericName[zh_CN]=文档 +GenericName[zh_TW]=文件 +Icon=khelpcenter +ServiceTypes=TDevelop/Plugin +X-TDevelop-Scope=Global +X-TDE-Library=libkdevdocumentation +X-TDevelop-Version=5 +X-TDevelop-Mode=AssistantMode +X-TDevelop-Properties=Documentation diff --git a/parts/documentation/kdevpart_documentation.rc b/parts/documentation/kdevpart_documentation.rc new file mode 100644 index 00000000..f8dac85a --- /dev/null +++ b/parts/documentation/kdevpart_documentation.rc @@ -0,0 +1,19 @@ + + + + + +

    + + + + + + + + + diff --git a/parts/documentation/plugins/CMakeLists.txt b/parts/documentation/plugins/CMakeLists.txt index 116e7674..281c40f8 100644 --- a/parts/documentation/plugins/CMakeLists.txt +++ b/parts/documentation/plugins/CMakeLists.txt @@ -12,6 +12,6 @@ add_subdirectory( qt ) add_subdirectory( doxygen ) add_subdirectory( devhelp ) -add_subdirectory( tdevtoc ) +add_subdirectory( kdevtoc ) add_subdirectory( chm ) add_subdirectory( custom ) diff --git a/parts/documentation/plugins/Makefile.am b/parts/documentation/plugins/Makefile.am index 253a0193..c2002f78 100644 --- a/parts/documentation/plugins/Makefile.am +++ b/parts/documentation/plugins/Makefile.am @@ -1,3 +1,3 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) METASOURCES = AUTO -SUBDIRS = qt doxygen devhelp tdevtoc chm custom +SUBDIRS = qt doxygen devhelp kdevtoc chm custom diff --git a/parts/documentation/plugins/chm/docchmplugin.cpp b/parts/documentation/plugins/chm/docchmplugin.cpp index f3287540..5acecce3 100644 --- a/parts/documentation/plugins/chm/docchmplugin.cpp +++ b/parts/documentation/plugins/chm/docchmplugin.cpp @@ -28,14 +28,14 @@ #include #include #include -#include -#include +#include +#include #include #include "../../../../config.h" -static const TDevPluginInfo data("docchmplugin"); -typedef TDevGenericFactory DocCHMPluginFactory; +static const KDevPluginInfo data("docchmplugin"); +typedef KDevGenericFactory DocCHMPluginFactory; K_EXPORT_COMPONENT_FACTORY( libdocchmplugin, DocCHMPluginFactory(data) ) DocCHMPlugin::DocCHMPlugin(TQObject* parent, const char* name, TQStringList // args diff --git a/parts/documentation/plugins/chm/docchmplugin.h b/parts/documentation/plugins/chm/docchmplugin.h index e814248f..452e1c09 100644 --- a/parts/documentation/plugins/chm/docchmplugin.h +++ b/parts/documentation/plugins/chm/docchmplugin.h @@ -20,7 +20,7 @@ #ifndef DOCCHMPLUGIN_H #define DOCCHMPLUGIN_H -#include +#include class DocCHMPlugin :public DocumentationPlugin { diff --git a/parts/documentation/plugins/custom/doccustomplugin.cpp b/parts/documentation/plugins/custom/doccustomplugin.cpp index 55d6c9c6..dd141eba 100644 --- a/parts/documentation/plugins/custom/doccustomplugin.cpp +++ b/parts/documentation/plugins/custom/doccustomplugin.cpp @@ -25,11 +25,11 @@ #include #include -#include -#include +#include +#include -static const TDevPluginInfo data("doccustomplugin"); -typedef TDevGenericFactory DocCustomPluginFactory; +static const KDevPluginInfo data("doccustomplugin"); +typedef KDevGenericFactory DocCustomPluginFactory; K_EXPORT_COMPONENT_FACTORY( libdoccustomplugin, DocCustomPluginFactory(data) ) DocCustomPlugin::DocCustomPlugin(TQObject* parent, const char* name, const TQStringList // args diff --git a/parts/documentation/plugins/custom/doccustomplugin.h b/parts/documentation/plugins/custom/doccustomplugin.h index 315e0864..f83daf1a 100644 --- a/parts/documentation/plugins/custom/doccustomplugin.h +++ b/parts/documentation/plugins/custom/doccustomplugin.h @@ -20,7 +20,7 @@ #ifndef DOCCUSTOMPLUGIN_H #define DOCCUSTOMPLUGIN_H -#include +#include class DocCustomPlugin : public DocumentationPlugin { public: diff --git a/parts/documentation/plugins/devhelp/docdevhelpplugin.cpp b/parts/documentation/plugins/devhelp/docdevhelpplugin.cpp index d644df4f..4f2d50d6 100644 --- a/parts/documentation/plugins/devhelp/docdevhelpplugin.cpp +++ b/parts/documentation/plugins/devhelp/docdevhelpplugin.cpp @@ -32,8 +32,8 @@ #include #include -#include -#include +#include +#include #include "../../../../config.h" @@ -69,8 +69,8 @@ private: }; -static const TDevPluginInfo data("docdevhelpplugin"); -typedef TDevGenericFactory DocDevHelpPluginFactory; +static const KDevPluginInfo data("docdevhelpplugin"); +typedef KDevGenericFactory DocDevHelpPluginFactory; K_EXPORT_COMPONENT_FACTORY( libdocdevhelpplugin, DocDevHelpPluginFactory(data) ) DocDevHelpPlugin::DocDevHelpPlugin(TQObject* parent, const char* name, diff --git a/parts/documentation/plugins/devhelp/docdevhelpplugin.h b/parts/documentation/plugins/devhelp/docdevhelpplugin.h index 11339098..6436a1d8 100644 --- a/parts/documentation/plugins/devhelp/docdevhelpplugin.h +++ b/parts/documentation/plugins/devhelp/docdevhelpplugin.h @@ -23,7 +23,7 @@ #include #include -#include +#include class DocDevHelpPlugin: public DocumentationPlugin { diff --git a/parts/documentation/plugins/djvu/docdjvuplugin.cpp b/parts/documentation/plugins/djvu/docdjvuplugin.cpp index dafdfa1f..7851a516 100644 --- a/parts/documentation/plugins/djvu/docdjvuplugin.cpp +++ b/parts/documentation/plugins/djvu/docdjvuplugin.cpp @@ -25,10 +25,10 @@ #include #include -#include +#include static const TDEAboutData data("docdjvuplugin", I18N_NOOP("Djvu documentation plugin"), "1.0"); -typedef TDevGenericFactory DocDjvuPluginFactory; +typedef KDevGenericFactory DocDjvuPluginFactory; K_EXPORT_COMPONENT_FACTORY( libdocdjvuplugin, DocDjvuPluginFactory(&data) ) DocDjvuPlugin::DocDjvuPlugin(TQObject* parent, const char* name, const TQStringList args) diff --git a/parts/documentation/plugins/djvu/docdjvuplugin.h b/parts/documentation/plugins/djvu/docdjvuplugin.h index 15415c65..6bff409c 100644 --- a/parts/documentation/plugins/djvu/docdjvuplugin.h +++ b/parts/documentation/plugins/djvu/docdjvuplugin.h @@ -20,7 +20,7 @@ #ifndef DOCDJVUPLUGIN_H #define DOCDVJUPLUGIN_H -#include +#include class DocDjvuPlugin : public DocumentationPlugin { public: diff --git a/parts/documentation/plugins/doxygen/docdoxygenplugin.cpp b/parts/documentation/plugins/doxygen/docdoxygenplugin.cpp index e5a7da93..9a5a6912 100644 --- a/parts/documentation/plugins/doxygen/docdoxygenplugin.cpp +++ b/parts/documentation/plugins/doxygen/docdoxygenplugin.cpp @@ -35,8 +35,8 @@ #include #include -#include -#include +#include +#include #include "../../../../config.h" @@ -60,8 +60,8 @@ private: }; -static const TDevPluginInfo data("docdoxygenplugin"); -typedef TDevGenericFactory DocDoxygenPluginFactory; +static const KDevPluginInfo data("docdoxygenplugin"); +typedef KDevGenericFactory DocDoxygenPluginFactory; K_EXPORT_COMPONENT_FACTORY( libdocdoxygenplugin, DocDoxygenPluginFactory(data) ) DocDoxygenPlugin::DocDoxygenPlugin(TQObject* parent, const char* name, const TQStringList) diff --git a/parts/documentation/plugins/doxygen/docdoxygenplugin.h b/parts/documentation/plugins/doxygen/docdoxygenplugin.h index 8382f98e..ebd4a540 100644 --- a/parts/documentation/plugins/doxygen/docdoxygenplugin.h +++ b/parts/documentation/plugins/doxygen/docdoxygenplugin.h @@ -20,7 +20,7 @@ #ifndef DOCDOXYGENPLUGIN_H #define DOCDOXYGENPLUGIN_H -#include +#include class TQDomDocument; class TQDomElement; diff --git a/parts/documentation/plugins/kdevtoc/CMakeLists.txt b/parts/documentation/plugins/kdevtoc/CMakeLists.txt new file mode 100644 index 00000000..c12c26e3 --- /dev/null +++ b/parts/documentation/plugins/kdevtoc/CMakeLists.txt @@ -0,0 +1,39 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +add_definitions( ${KDE_PLUGIN} ) + +include_directories( + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/lib/interfaces + ${CMAKE_SOURCE_DIR}/lib/util + ${CMAKE_SOURCE_DIR}/parts/documentation/interfaces + ${TDE_INCLUDE_DIR} + ${TQT_INCLUDE_DIRS} +) + +link_directories( + ${TQT_LIBRARY_DIRS} +) + + +##### other data ################################ + +install( FILES dockdevtocplugin.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) + + +##### libdockdevtocplugin (module) ############## + +tde_add_kpart( libdockdevtocplugin AUTOMOC + SOURCES dockdevtocplugin.cpp + LINK documentation_interfaces-shared tdevelop-shared + DESTINATION ${PLUGIN_INSTALL_DIR} +) diff --git a/parts/documentation/plugins/kdevtoc/Makefile.am b/parts/documentation/plugins/kdevtoc/Makefile.am new file mode 100644 index 00000000..22dab380 --- /dev/null +++ b/parts/documentation/plugins/kdevtoc/Makefile.am @@ -0,0 +1,10 @@ +INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util \ + -I$(top_srcdir)/parts/documentation/interfaces $(all_includes) +METASOURCES = AUTO +kde_module_LTLIBRARIES = libdockdevtocplugin.la +libdockdevtocplugin_la_LDFLAGS = -module -avoid-version -no-undefined $(all_libraries) +kde_services_DATA = dockdevtocplugin.desktop +noinst_HEADERS = dockdevtocplugin.h +libdockdevtocplugin_la_SOURCES = dockdevtocplugin.cpp +libdockdevtocplugin_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/parts/documentation/interfaces/libdocumentation_interfaces.la diff --git a/parts/documentation/plugins/kdevtoc/dockdevtocplugin.cpp b/parts/documentation/plugins/kdevtoc/dockdevtocplugin.cpp new file mode 100644 index 00000000..fa17549b --- /dev/null +++ b/parts/documentation/plugins/kdevtoc/dockdevtocplugin.cpp @@ -0,0 +1,277 @@ +/*************************************************************************** + * Copyright (C) 2004 by Alexander Dymo * + * cloudtemple@mksat.net * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ +#include "dockdevtocplugin.h" + +#include + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "../../../../config.h" + +class TOCDocumentationCatalogItem: public DocumentationCatalogItem +{ +public: + TOCDocumentationCatalogItem(const TQString &tocFile, DocumentationPlugin* plugin, + TDEListView *parent, const TQString &name) + :DocumentationCatalogItem(plugin, parent, name), m_tocFile(tocFile) + { + } + TOCDocumentationCatalogItem(const TQString &tocFile, DocumentationPlugin* plugin, + DocumentationItem *parent, const TQString &name) + :DocumentationCatalogItem(plugin, parent, name), m_tocFile(tocFile) + { + } + TQString tocFile() const { return m_tocFile; } + +private: + TQString m_tocFile; +}; + + +static const KDevPluginInfo data("dockdevtocplugin"); +typedef KDevGenericFactory DocKDevTOCPluginFactory; +K_EXPORT_COMPONENT_FACTORY( libdockdevtocplugin, DocKDevTOCPluginFactory(data) ) + +DocKDevTOCPlugin::DocKDevTOCPlugin(TQObject* parent, const char* name, + const TQStringList /*args*/) + :DocumentationPlugin(DocKDevTOCPluginFactory::instance()->config(), parent, name) +{ + setCapabilities(Index); + autoSetup(); +} + +DocKDevTOCPlugin::~DocKDevTOCPlugin() +{ +} + +TQString DocKDevTOCPlugin::pluginName() const +{ + return i18n("TDevelopTOC Documentation Collection"); +} + +DocumentationCatalogItem* DocKDevTOCPlugin::createCatalog(TDEListView* contents, const TQString& title, const TQString& url) +{ + return new TOCDocumentationCatalogItem(url, this, contents, title); +} + +TQPair DocKDevTOCPlugin::catalogLocatorProps() +{ + return TQPair(KFile::File, "*.toc"); +} + +TQString DocKDevTOCPlugin::catalogTitle(const TQString& url) +{ + TQFileInfo fi(url); + if (!fi.exists()) + return TQString(); + + TQFile f(url); + if (!f.open(IO_ReadOnly)) + return TQString(); + + TQDomDocument doc; + if (!doc.setContent(&f) || (doc.doctype().name() != "tdeveloptoc")) + return TQString(); + f.close(); + + TQDomElement titleEl = doc.documentElement().namedItem("title").toElement(); + + return titleEl.firstChild().toText().data(); +} + + +TQStringList DocKDevTOCPlugin::fullTextSearchLocations() +{ + return TQStringList(); +} + +bool DocKDevTOCPlugin::needRefreshIndex(DocumentationCatalogItem* /*item*/) +{ + return false; +} + +void DocKDevTOCPlugin::autoSetupPlugin() +{ + TQStringList tocsDir = DocKDevTOCPluginFactory::instance()->dirs()->findAllResources("data", "kdevdocumentation/tocs/*.toc"); + + for (TQStringList::const_iterator it = tocsDir.begin(); it != tocsDir.end(); ++it) + { + config->setGroup("Locations"); + config->writePathEntry(catalogTitle(*it), *it); + } +} + +void DocKDevTOCPlugin::createIndex(IndexBox* index, DocumentationCatalogItem* item) +{ + TOCDocumentationCatalogItem *tocItem = dynamic_cast(item); + if (!tocItem) + return; + + TQFileInfo fi(tocItem->tocFile()); + + TQFile f(tocItem->tocFile()); + if (!f.open(IO_ReadOnly)) + { + kdDebug(9002) << "Could not read" << tocItem->tocFile() << endl; + return; + } + TQDomDocument doc; + if (!doc.setContent(&f) || doc.doctype().name() != "tdeveloptoc") + { + kdDebug(9002) << "Not a valid tdeveloptoc file: " << tocItem->tocFile() << endl; + return; + } + f.close(); + + TQDomElement docEl = doc.documentElement(); + TQDomElement baseEl = docEl.namedItem("base").toElement(); + + TQString base; + if (!baseEl.isNull()) + base = baseEl.attribute("href", TQString()); + + TQDomElement indexEl = docEl.namedItem("index").toElement(); + TQDomElement childEl = indexEl.firstChild().toElement(); + while (!childEl.isNull()) + { + if (childEl.tagName() == "entry") + { + TQString name = childEl.attribute("name"); + TQString url = childEl.attribute("url"); + + IndexItemProto *ii = new IndexItemProto(this, item, index, name, item->text(0)); + ii->addURL(KURL(constructURL(base, url))); + } + childEl = childEl.nextSibling().toElement(); + } +} + +void DocKDevTOCPlugin::createTOC(DocumentationCatalogItem* item) +{ + TOCDocumentationCatalogItem *tocItem = dynamic_cast(item); + if (!tocItem) + return; + + TQFileInfo fi(tocItem->tocFile()); + + TQFile f(tocItem->tocFile()); + if (!f.open(IO_ReadOnly)) + { + kdDebug(9002) << "Could not read" << tocItem->tocFile() << endl; + return; + } + TQDomDocument doc; + if (!doc.setContent(&f) || doc.doctype().name() != "tdeveloptoc") + { + kdDebug(9002) << "Not a valid tdeveloptoc file: " << tocItem->tocFile() << endl; + return; + } + f.close(); + + TQDomElement docEl = doc.documentElement(); + TQDomElement baseEl = docEl.namedItem("base").toElement(); + + TQString base; + if (!baseEl.isNull()) + base = baseEl.attribute("href", TQString()); + + TQDomElement childEl = docEl.lastChild().toElement(); + addTocSect(tocItem, childEl, base, 1); +} + +void DocKDevTOCPlugin::addTocSect(DocumentationItem *parent, TQDomElement childEl, const TQString &base, uint level) +{ + while (!childEl.isNull()) + { + if (childEl.tagName() == TQString("tocsect%1").arg(level)) + { + TQString name = childEl.attribute("name"); + TQString url = childEl.attribute("url"); + + DocumentationItem *item = new DocumentationItem(level == 1 ? DocumentationItem::Book : DocumentationItem::Document, parent, name); + item->setURL(KURL(constructURL(base, url))); + + TQDomElement grandchildEl = childEl.lastChild().toElement(); + addTocSect(item, grandchildEl, base, level+1); + } + childEl = childEl.previousSibling().toElement(); + } +} + +void DocKDevTOCPlugin::setCatalogURL(DocumentationCatalogItem* item) +{ + TOCDocumentationCatalogItem *tocItem = dynamic_cast(item); + if (!tocItem) + return; + + TQFileInfo fi(tocItem->tocFile()); + + TQFile f(tocItem->tocFile()); + if (!f.open(IO_ReadOnly)) + { + kdDebug(9002) << "Could not read" << tocItem->tocFile() << endl; + return; + } + TQDomDocument doc; + if (!doc.setContent(&f) || doc.doctype().name() != "tdeveloptoc") + { + kdDebug(9002) << "Not a valid tdeveloptoc file: " << tocItem->tocFile() << endl; + return; + } + f.close(); + + TQDomElement docEl = doc.documentElement(); + TQDomElement baseEl = docEl.namedItem("base").toElement(); + + if (item->url().isEmpty()) + { + if (baseEl.isNull()) + item->setURL(KURL()); + else + item->setURL(KURL(constructURL(baseEl.attribute("href", TQString()), + baseEl.attribute("url", TQString())))); + } +} + +TQString DocKDevTOCPlugin::constructURL(const TQString &base, const TQString &url) +{ + if (base.isEmpty() && !url.isEmpty()) + return url; + if (!url.isEmpty()) + return base.endsWith("/") ? base + url : base + "/" + url; + else + return base; +} + +#include "dockdevtocplugin.moc" diff --git a/parts/documentation/plugins/kdevtoc/dockdevtocplugin.desktop b/parts/documentation/plugins/kdevtoc/dockdevtocplugin.desktop new file mode 100644 index 00000000..1cae3582 --- /dev/null +++ b/parts/documentation/plugins/kdevtoc/dockdevtocplugin.desktop @@ -0,0 +1,43 @@ +[Desktop Entry] +Type=Service +Name=DocKDevTOCPlugin +Name[da]=DocKDevTOC-plugin +Name[sk]=Doc KDevTOC modul +Name[sv]=TDevelop innehållsförteckning-dokumentationsinsticksmodul +Name[ta]=DocKDevTOC சொருகு +Name[zh_TW]=TDevelop 目錄文件外掛程式 +Exec=blubb +Comment=Documentation plugin for TDevelopTOC documentation +Comment[ca]=Connector de documentació per a documentació TDevelopTOC +Comment[da]=Dokumentations-plugin for TDevelopTOC-dokumentation +Comment[de]=Komponente für TDevelopTOC-Dokumentation +Comment[el]=Πρόσθετο τεκμηρίωσης για τεκμηρίωση τύπου TDevelopTOC +Comment[es]=Complemento de documentación para TDevelopTOC +Comment[et]=TDevelopTOC dokumentatsiooni plugin +Comment[eu]=TDevelopTOC dokumentaziorako dokumentazio plugin-a +Comment[fa]=وصلۀ مستندسازی برای مستندات TDevelopTOC +Comment[fr]=Module externe de documentation pour la documentation TDevelopTOC +Comment[gl]=Extensión de documentación para documentación TDevelopTOC +Comment[hu]=Dokumentációmodul TDevelopTOC-dokumentációhoz +Comment[it]=Plugin di documentazione per file di TDevelopTOC +Comment[ja]=TDevelopTOC ドキュメンテーションのためのドキュメンテーションプラグイン +Comment[ms]=Plugin dokumentasi untuk dokumentasi TDevelopTOC +Comment[nds]=Dokmentatschoon-Moduul för TDevelopTOC-Dokmentatschoon +Comment[ne]=TDevelopTOC मिसिलीकरणका लागि मिसिलीकरण प्लगइन +Comment[nl]=Documentatie plugin for TDevelopTOC documentatie +Comment[pl]=Wtyczka dokumentacji dla dokumentacji w formacie TDevelopTOC +Comment[pt]='Plugin' para documentação TDevelopTOC +Comment[pt_BR]=Plug-in de documentação para document TOC do TDevelop +Comment[ru]=Модуль для просмотра TDevelopTOC +Comment[sk]=Dokumentačný modul pre TDevelopTOC dokumentáciu +Comment[sr]=Документациони прикључак за TDevelopTOC документацију +Comment[sr@Latn]=Dokumentacioni priključak za TDevelopTOC dokumentaciju +Comment[sv]=Dokumentationsinsticksmodul för TDevelop innehållsförteckningsdokumentation +Comment[ta]= TDevelopTOC ஆவணத்திற்கான ஆவணச் சொருகு +Comment[tg]=Модул барои наоиши TDevelopTOC +Comment[tr]=TDevelopTOC belgelendirmesi için belgelendirme eklentisi +Comment[zh_CN]=TDevelopTOC 文档的文档插件 +Comment[zh_TW]=TDevelop 目錄文件外掛程式 +ServiceTypes=TDevelop/DocumentationPlugins +X-TDevelop-Version=5 +X-TDE-Library=libdockdevtocplugin diff --git a/parts/documentation/plugins/kdevtoc/dockdevtocplugin.h b/parts/documentation/plugins/kdevtoc/dockdevtocplugin.h new file mode 100644 index 00000000..7205cc4c --- /dev/null +++ b/parts/documentation/plugins/kdevtoc/dockdevtocplugin.h @@ -0,0 +1,55 @@ +/*************************************************************************** + * Copyright (C) 2004 by Alexander Dymo * + * cloudtemple@mksat.net * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ +#ifndef DOCKDEVTOCPLUGIN_H +#define DOCKDEVTOCPLUGIN_H + +#include + +#include + +class DocKDevTOCPlugin : public DocumentationPlugin +{ + Q_OBJECT + +public: + DocKDevTOCPlugin(TQObject* parent, const char* name, const TQStringList args = TQStringList()); + ~DocKDevTOCPlugin(); + + virtual TQString pluginName() const; + + virtual TQString catalogTitle(const TQString& url); + virtual DocumentationCatalogItem* createCatalog(TDEListView* contents, const TQString& title, const TQString& url); + virtual void createTOC(DocumentationCatalogItem* item); + virtual void setCatalogURL(DocumentationCatalogItem* item); + + virtual bool needRefreshIndex(DocumentationCatalogItem* item); + virtual void createIndex(IndexBox* index, DocumentationCatalogItem* item); + + virtual TQStringList fullTextSearchLocations(); + + virtual TQPair catalogLocatorProps(); + virtual void autoSetupPlugin(); + +protected: + void addTocSect(DocumentationItem *parent, TQDomElement childEl, const TQString &base, uint level); + static TQString constructURL(const TQString &base, const TQString &url) ; +}; + +#endif diff --git a/parts/documentation/plugins/pdb/docpdbplugin.cpp b/parts/documentation/plugins/pdb/docpdbplugin.cpp index b0ebd29d..fc647d34 100644 --- a/parts/documentation/plugins/pdb/docpdbplugin.cpp +++ b/parts/documentation/plugins/pdb/docpdbplugin.cpp @@ -25,10 +25,10 @@ #include #include -#include +#include static const TDEAboutData data("docpdbplugin", I18N_NOOP("PalmDoc documentation plugin"), "1.0"); -typedef TDevGenericFactory DocPDBPluginFactory; +typedef KDevGenericFactory DocPDBPluginFactory; K_EXPORT_COMPONENT_FACTORY( libdocpdbplugin, DocPDBPluginFactory(&data) ) DocPDBPlugin::DocPDBPlugin(TQObject* parent, const char* name, const TQStringList args) diff --git a/parts/documentation/plugins/pdb/docpdbplugin.h b/parts/documentation/plugins/pdb/docpdbplugin.h index d1319012..40dd3a15 100644 --- a/parts/documentation/plugins/pdb/docpdbplugin.h +++ b/parts/documentation/plugins/pdb/docpdbplugin.h @@ -20,7 +20,7 @@ #ifndef DOCPDBPLUGIN_H #define DOCPDBPLUGIN_H -#include +#include class DocPDBPlugin : public DocumentationPlugin { public: diff --git a/parts/documentation/plugins/pdf/docpdfplugin.cpp b/parts/documentation/plugins/pdf/docpdfplugin.cpp index 322a33d3..65bddd1b 100644 --- a/parts/documentation/plugins/pdf/docpdfplugin.cpp +++ b/parts/documentation/plugins/pdf/docpdfplugin.cpp @@ -25,10 +25,10 @@ #include #include -#include +#include static const TDEAboutData data("docpdfplugin", I18N_NOOP("PDF documentation plugin"), "1.0"); -typedef TDevGenericFactory DocPDFPluginFactory; +typedef KDevGenericFactory DocPDFPluginFactory; K_EXPORT_COMPONENT_FACTORY( libdocpdfplugin, DocPDFPluginFactory(&data) ) DocPDFPlugin::DocPDFPlugin(TQObject* parent, const char* name, const TQStringList args) diff --git a/parts/documentation/plugins/pdf/docpdfplugin.h b/parts/documentation/plugins/pdf/docpdfplugin.h index a5410196..d5ecc7eb 100644 --- a/parts/documentation/plugins/pdf/docpdfplugin.h +++ b/parts/documentation/plugins/pdf/docpdfplugin.h @@ -20,7 +20,7 @@ #ifndef DOCPDFPLUGIN_H #define DOCPDFPLUGIN_H -#include +#include class DocPDFPlugin : public DocumentationPlugin { public: diff --git a/parts/documentation/plugins/qt/docqtplugin.cpp b/parts/documentation/plugins/qt/docqtplugin.cpp index 301859ca..10271524 100644 --- a/parts/documentation/plugins/qt/docqtplugin.cpp +++ b/parts/documentation/plugins/qt/docqtplugin.cpp @@ -32,8 +32,8 @@ #include #include -#include -#include +#include +#include #include "../../../../config.h" @@ -56,8 +56,8 @@ private: TQString m_dcfFile; }; -static const TDevPluginInfo data("docqtplugin"); -typedef TDevGenericFactory DocQtPluginFactory; +static const KDevPluginInfo data("docqtplugin"); +typedef KDevGenericFactory DocQtPluginFactory; K_EXPORT_COMPONENT_FACTORY( libdocqtplugin, DocQtPluginFactory(data) ) DocQtPlugin::DocQtPlugin(TQObject* parent, const char* name, const TQStringList) diff --git a/parts/documentation/plugins/qt/docqtplugin.h b/parts/documentation/plugins/qt/docqtplugin.h index 964ef844..8eac8456 100644 --- a/parts/documentation/plugins/qt/docqtplugin.h +++ b/parts/documentation/plugins/qt/docqtplugin.h @@ -20,7 +20,7 @@ #ifndef DOCTQTPLUGIN_H #define DOCTQTPLUGIN_H -#include +#include #include class TDEConfig; diff --git a/parts/documentation/plugins/tdevtoc/CMakeLists.txt b/parts/documentation/plugins/tdevtoc/CMakeLists.txt deleted file mode 100644 index f3d1efc2..00000000 --- a/parts/documentation/plugins/tdevtoc/CMakeLists.txt +++ /dev/null @@ -1,39 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -add_definitions( ${KDE_PLUGIN} ) - -include_directories( - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_SOURCE_DIR}/lib/interfaces - ${CMAKE_SOURCE_DIR}/lib/util - ${CMAKE_SOURCE_DIR}/parts/documentation/interfaces - ${TDE_INCLUDE_DIR} - ${TQT_INCLUDE_DIRS} -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### other data ################################ - -install( FILES doctdevtocplugin.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) - - -##### libdoctdevtocplugin (module) ############## - -tde_add_kpart( libdoctdevtocplugin AUTOMOC - SOURCES doctdevtocplugin.cpp - LINK documentation_interfaces-shared tdevelop-shared - DESTINATION ${PLUGIN_INSTALL_DIR} -) diff --git a/parts/documentation/plugins/tdevtoc/Makefile.am b/parts/documentation/plugins/tdevtoc/Makefile.am deleted file mode 100644 index 4baaaa86..00000000 --- a/parts/documentation/plugins/tdevtoc/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util \ - -I$(top_srcdir)/parts/documentation/interfaces $(all_includes) -METASOURCES = AUTO -kde_module_LTLIBRARIES = libdoctdevtocplugin.la -libdoctdevtocplugin_la_LDFLAGS = -module -avoid-version -no-undefined $(all_libraries) -kde_services_DATA = doctdevtocplugin.desktop -noinst_HEADERS = doctdevtocplugin.h -libdoctdevtocplugin_la_SOURCES = doctdevtocplugin.cpp -libdoctdevtocplugin_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/parts/documentation/interfaces/libdocumentation_interfaces.la diff --git a/parts/documentation/plugins/tdevtoc/doctdevtocplugin.cpp b/parts/documentation/plugins/tdevtoc/doctdevtocplugin.cpp deleted file mode 100644 index aa603fbd..00000000 --- a/parts/documentation/plugins/tdevtoc/doctdevtocplugin.cpp +++ /dev/null @@ -1,277 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Alexander Dymo * - * cloudtemple@mksat.net * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ -#include "doctdevtocplugin.h" - -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "../../../../config.h" - -class TOCDocumentationCatalogItem: public DocumentationCatalogItem -{ -public: - TOCDocumentationCatalogItem(const TQString &tocFile, DocumentationPlugin* plugin, - TDEListView *parent, const TQString &name) - :DocumentationCatalogItem(plugin, parent, name), m_tocFile(tocFile) - { - } - TOCDocumentationCatalogItem(const TQString &tocFile, DocumentationPlugin* plugin, - DocumentationItem *parent, const TQString &name) - :DocumentationCatalogItem(plugin, parent, name), m_tocFile(tocFile) - { - } - TQString tocFile() const { return m_tocFile; } - -private: - TQString m_tocFile; -}; - - -static const TDevPluginInfo data("doctdevtocplugin"); -typedef TDevGenericFactory DocTDevTOCPluginFactory; -K_EXPORT_COMPONENT_FACTORY( libdoctdevtocplugin, DocTDevTOCPluginFactory(data) ) - -DocTDevTOCPlugin::DocTDevTOCPlugin(TQObject* parent, const char* name, - const TQStringList /*args*/) - :DocumentationPlugin(DocTDevTOCPluginFactory::instance()->config(), parent, name) -{ - setCapabilities(Index); - autoSetup(); -} - -DocTDevTOCPlugin::~DocTDevTOCPlugin() -{ -} - -TQString DocTDevTOCPlugin::pluginName() const -{ - return i18n("TDevelopTOC Documentation Collection"); -} - -DocumentationCatalogItem* DocTDevTOCPlugin::createCatalog(TDEListView* contents, const TQString& title, const TQString& url) -{ - return new TOCDocumentationCatalogItem(url, this, contents, title); -} - -TQPair DocTDevTOCPlugin::catalogLocatorProps() -{ - return TQPair(KFile::File, "*.toc"); -} - -TQString DocTDevTOCPlugin::catalogTitle(const TQString& url) -{ - TQFileInfo fi(url); - if (!fi.exists()) - return TQString(); - - TQFile f(url); - if (!f.open(IO_ReadOnly)) - return TQString(); - - TQDomDocument doc; - if (!doc.setContent(&f) || (doc.doctype().name() != "tdeveloptoc")) - return TQString(); - f.close(); - - TQDomElement titleEl = doc.documentElement().namedItem("title").toElement(); - - return titleEl.firstChild().toText().data(); -} - - -TQStringList DocTDevTOCPlugin::fullTextSearchLocations() -{ - return TQStringList(); -} - -bool DocTDevTOCPlugin::needRefreshIndex(DocumentationCatalogItem* /*item*/) -{ - return false; -} - -void DocTDevTOCPlugin::autoSetupPlugin() -{ - TQStringList tocsDir = DocTDevTOCPluginFactory::instance()->dirs()->findAllResources("data", "tdevdocumentation/tocs/*.toc"); - - for (TQStringList::const_iterator it = tocsDir.begin(); it != tocsDir.end(); ++it) - { - config->setGroup("Locations"); - config->writePathEntry(catalogTitle(*it), *it); - } -} - -void DocTDevTOCPlugin::createIndex(IndexBox* index, DocumentationCatalogItem* item) -{ - TOCDocumentationCatalogItem *tocItem = dynamic_cast(item); - if (!tocItem) - return; - - TQFileInfo fi(tocItem->tocFile()); - - TQFile f(tocItem->tocFile()); - if (!f.open(IO_ReadOnly)) - { - kdDebug(9002) << "Could not read" << tocItem->tocFile() << endl; - return; - } - TQDomDocument doc; - if (!doc.setContent(&f) || doc.doctype().name() != "tdeveloptoc") - { - kdDebug(9002) << "Not a valid tdeveloptoc file: " << tocItem->tocFile() << endl; - return; - } - f.close(); - - TQDomElement docEl = doc.documentElement(); - TQDomElement baseEl = docEl.namedItem("base").toElement(); - - TQString base; - if (!baseEl.isNull()) - base = baseEl.attribute("href", TQString()); - - TQDomElement indexEl = docEl.namedItem("index").toElement(); - TQDomElement childEl = indexEl.firstChild().toElement(); - while (!childEl.isNull()) - { - if (childEl.tagName() == "entry") - { - TQString name = childEl.attribute("name"); - TQString url = childEl.attribute("url"); - - IndexItemProto *ii = new IndexItemProto(this, item, index, name, item->text(0)); - ii->addURL(KURL(constructURL(base, url))); - } - childEl = childEl.nextSibling().toElement(); - } -} - -void DocTDevTOCPlugin::createTOC(DocumentationCatalogItem* item) -{ - TOCDocumentationCatalogItem *tocItem = dynamic_cast(item); - if (!tocItem) - return; - - TQFileInfo fi(tocItem->tocFile()); - - TQFile f(tocItem->tocFile()); - if (!f.open(IO_ReadOnly)) - { - kdDebug(9002) << "Could not read" << tocItem->tocFile() << endl; - return; - } - TQDomDocument doc; - if (!doc.setContent(&f) || doc.doctype().name() != "tdeveloptoc") - { - kdDebug(9002) << "Not a valid tdeveloptoc file: " << tocItem->tocFile() << endl; - return; - } - f.close(); - - TQDomElement docEl = doc.documentElement(); - TQDomElement baseEl = docEl.namedItem("base").toElement(); - - TQString base; - if (!baseEl.isNull()) - base = baseEl.attribute("href", TQString()); - - TQDomElement childEl = docEl.lastChild().toElement(); - addTocSect(tocItem, childEl, base, 1); -} - -void DocTDevTOCPlugin::addTocSect(DocumentationItem *parent, TQDomElement childEl, const TQString &base, uint level) -{ - while (!childEl.isNull()) - { - if (childEl.tagName() == TQString("tocsect%1").arg(level)) - { - TQString name = childEl.attribute("name"); - TQString url = childEl.attribute("url"); - - DocumentationItem *item = new DocumentationItem(level == 1 ? DocumentationItem::Book : DocumentationItem::Document, parent, name); - item->setURL(KURL(constructURL(base, url))); - - TQDomElement grandchildEl = childEl.lastChild().toElement(); - addTocSect(item, grandchildEl, base, level+1); - } - childEl = childEl.previousSibling().toElement(); - } -} - -void DocTDevTOCPlugin::setCatalogURL(DocumentationCatalogItem* item) -{ - TOCDocumentationCatalogItem *tocItem = dynamic_cast(item); - if (!tocItem) - return; - - TQFileInfo fi(tocItem->tocFile()); - - TQFile f(tocItem->tocFile()); - if (!f.open(IO_ReadOnly)) - { - kdDebug(9002) << "Could not read" << tocItem->tocFile() << endl; - return; - } - TQDomDocument doc; - if (!doc.setContent(&f) || doc.doctype().name() != "tdeveloptoc") - { - kdDebug(9002) << "Not a valid tdeveloptoc file: " << tocItem->tocFile() << endl; - return; - } - f.close(); - - TQDomElement docEl = doc.documentElement(); - TQDomElement baseEl = docEl.namedItem("base").toElement(); - - if (item->url().isEmpty()) - { - if (baseEl.isNull()) - item->setURL(KURL()); - else - item->setURL(KURL(constructURL(baseEl.attribute("href", TQString()), - baseEl.attribute("url", TQString())))); - } -} - -TQString DocTDevTOCPlugin::constructURL(const TQString &base, const TQString &url) -{ - if (base.isEmpty() && !url.isEmpty()) - return url; - if (!url.isEmpty()) - return base.endsWith("/") ? base + url : base + "/" + url; - else - return base; -} - -#include "doctdevtocplugin.moc" diff --git a/parts/documentation/plugins/tdevtoc/doctdevtocplugin.desktop b/parts/documentation/plugins/tdevtoc/doctdevtocplugin.desktop deleted file mode 100644 index 5f89e8d7..00000000 --- a/parts/documentation/plugins/tdevtoc/doctdevtocplugin.desktop +++ /dev/null @@ -1,43 +0,0 @@ -[Desktop Entry] -Type=Service -Name=DocTDevTOCPlugin -Name[da]=DocTDevTOC-plugin -Name[sk]=Doc TDevTOC modul -Name[sv]=TDevelop innehållsförteckning-dokumentationsinsticksmodul -Name[ta]=DocTDevTOC சொருகு -Name[zh_TW]=TDevelop 目錄文件外掛程式 -Exec=blubb -Comment=Documentation plugin for TDevelopTOC documentation -Comment[ca]=Connector de documentació per a documentació TDevelopTOC -Comment[da]=Dokumentations-plugin for TDevelopTOC-dokumentation -Comment[de]=Komponente für TDevelopTOC-Dokumentation -Comment[el]=Πρόσθετο τεκμηρίωσης για τεκμηρίωση τύπου TDevelopTOC -Comment[es]=Complemento de documentación para TDevelopTOC -Comment[et]=TDevelopTOC dokumentatsiooni plugin -Comment[eu]=TDevelopTOC dokumentaziorako dokumentazio plugin-a -Comment[fa]=وصلۀ مستندسازی برای مستندات TDevelopTOC -Comment[fr]=Module externe de documentation pour la documentation TDevelopTOC -Comment[gl]=Extensión de documentación para documentación TDevelopTOC -Comment[hu]=Dokumentációmodul TDevelopTOC-dokumentációhoz -Comment[it]=Plugin di documentazione per file di TDevelopTOC -Comment[ja]=TDevelopTOC ドキュメンテーションのためのドキュメンテーションプラグイン -Comment[ms]=Plugin dokumentasi untuk dokumentasi TDevelopTOC -Comment[nds]=Dokmentatschoon-Moduul för TDevelopTOC-Dokmentatschoon -Comment[ne]=TDevelopTOC मिसिलीकरणका लागि मिसिलीकरण प्लगइन -Comment[nl]=Documentatie plugin for TDevelopTOC documentatie -Comment[pl]=Wtyczka dokumentacji dla dokumentacji w formacie TDevelopTOC -Comment[pt]='Plugin' para documentação TDevelopTOC -Comment[pt_BR]=Plug-in de documentação para document TOC do TDevelop -Comment[ru]=Модуль для просмотра TDevelopTOC -Comment[sk]=Dokumentačný modul pre TDevelopTOC dokumentáciu -Comment[sr]=Документациони прикључак за TDevelopTOC документацију -Comment[sr@Latn]=Dokumentacioni priključak za TDevelopTOC dokumentaciju -Comment[sv]=Dokumentationsinsticksmodul för TDevelop innehållsförteckningsdokumentation -Comment[ta]= TDevelopTOC ஆவணத்திற்கான ஆவணச் சொருகு -Comment[tg]=Модул барои наоиши TDevelopTOC -Comment[tr]=TDevelopTOC belgelendirmesi için belgelendirme eklentisi -Comment[zh_CN]=TDevelopTOC 文档的文档插件 -Comment[zh_TW]=TDevelop 目錄文件外掛程式 -ServiceTypes=TDevelop/DocumentationPlugins -X-TDevelop-Version=5 -X-TDE-Library=libdoctdevtocplugin diff --git a/parts/documentation/plugins/tdevtoc/doctdevtocplugin.h b/parts/documentation/plugins/tdevtoc/doctdevtocplugin.h deleted file mode 100644 index 266efb94..00000000 --- a/parts/documentation/plugins/tdevtoc/doctdevtocplugin.h +++ /dev/null @@ -1,55 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Alexander Dymo * - * cloudtemple@mksat.net * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ -#ifndef DOCTDEVTOCPLUGIN_H -#define DOCTDEVTOCPLUGIN_H - -#include - -#include - -class DocTDevTOCPlugin : public DocumentationPlugin -{ - Q_OBJECT - -public: - DocTDevTOCPlugin(TQObject* parent, const char* name, const TQStringList args = TQStringList()); - ~DocTDevTOCPlugin(); - - virtual TQString pluginName() const; - - virtual TQString catalogTitle(const TQString& url); - virtual DocumentationCatalogItem* createCatalog(TDEListView* contents, const TQString& title, const TQString& url); - virtual void createTOC(DocumentationCatalogItem* item); - virtual void setCatalogURL(DocumentationCatalogItem* item); - - virtual bool needRefreshIndex(DocumentationCatalogItem* item); - virtual void createIndex(IndexBox* index, DocumentationCatalogItem* item); - - virtual TQStringList fullTextSearchLocations(); - - virtual TQPair catalogLocatorProps(); - virtual void autoSetupPlugin(); - -protected: - void addTocSect(DocumentationItem *parent, TQDomElement childEl, const TQString &base, uint level); - static TQString constructURL(const TQString &base, const TQString &url) ; -}; - -#endif diff --git a/parts/documentation/protocols/chm/CMakeLists.txt b/parts/documentation/protocols/chm/CMakeLists.txt index 8d97053e..c444c226 100644 --- a/parts/documentation/protocols/chm/CMakeLists.txt +++ b/parts/documentation/protocols/chm/CMakeLists.txt @@ -43,6 +43,6 @@ tde_add_kpart( tdeio_chm tde_add_kpart( libkchmpart AUTOMOC SOURCES kchmpart.cpp - LINK tdevwidgets-shared + LINK kdevwidgets-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/parts/documentation/protocols/chm/Makefile.am b/parts/documentation/protocols/chm/Makefile.am index de7e0929..5a1092a2 100644 --- a/parts/documentation/protocols/chm/Makefile.am +++ b/parts/documentation/protocols/chm/Makefile.am @@ -9,7 +9,7 @@ tdeio_chm_la_LIBADD = $(LIB_TDEIO) tdeio_chm_la_LDFLAGS = $(all_libraries) -module $(KDE_PLUGIN) libkchmpart_la_SOURCES = kchmpart.cpp -libkchmpart_la_LIBADD = -ltdehtml $(LIB_TDEPARTS) $(top_builddir)/lib/widgets/libtdevwidgets.la +libkchmpart_la_LIBADD = -ltdehtml $(LIB_TDEPARTS) $(top_builddir)/lib/widgets/libkdevwidgets.la libkchmpart_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) noinst_HEADERS = chm.h chmfile.h decompress.h kchmpart.h diff --git a/parts/documentation/protocols/chm/kchmpart.cpp b/parts/documentation/protocols/chm/kchmpart.cpp index ab688ff7..952228c4 100644 --- a/parts/documentation/protocols/chm/kchmpart.cpp +++ b/parts/documentation/protocols/chm/kchmpart.cpp @@ -67,7 +67,7 @@ TDEInstance* KChmPartFactory::instance() KChmPart::KChmPart( TQWidget * parent, const char * name ) - : TDevHTMLPart( ), m_job(0) + : KDevHTMLPart( ), m_job(0) { TDEInstance * instance = new TDEInstance( "kchmpart" ); setInstance( instance ); @@ -80,7 +80,7 @@ bool KChmPart::openURL( const KURL &url ) KURL chmURL = url; chmURL.setProtocol("ms-its"); chmURL.addPath("/"); - return TDevHTMLPart::openURL(chmURL); + return KDevHTMLPart::openURL(chmURL); } void KChmPart::slotDuplicate() diff --git a/parts/documentation/protocols/chm/kchmpart.h b/parts/documentation/protocols/chm/kchmpart.h index a3c8d9ec..9d1812b1 100644 --- a/parts/documentation/protocols/chm/kchmpart.h +++ b/parts/documentation/protocols/chm/kchmpart.h @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include @@ -52,7 +52,7 @@ class KChmPartFactory: public KParts::Factory }; -class KChmPart : public TDevHTMLPart +class KChmPart : public KDevHTMLPart { Q_OBJECT diff --git a/parts/documentation/searchview.cpp b/parts/documentation/searchview.cpp index 2893d574..67dca0ed 100644 --- a/parts/documentation/searchview.cpp +++ b/parts/documentation/searchview.cpp @@ -43,8 +43,8 @@ #include #include -#include -#include +#include +#include #include "documentation_part.h" #include "docutils.h" @@ -160,7 +160,7 @@ void SearchView::search() return; } - TQString indexdir = kapp->dirs()->saveLocation("data", "tdevdocumentation/search"); + TQString indexdir = kapp->dirs()->saveLocation("data", "kdevdocumentation/search"); TQDir d; if (indexdir.isEmpty() || !TQFile::exists(indexdir + "/htdig.conf")) { @@ -177,7 +177,7 @@ void SearchView::search() } } - TQString savedir = kapp->dirs()->saveLocation("data", "tdevdocumentation/search"); + TQString savedir = kapp->dirs()->saveLocation("data", "kdevdocumentation/search"); if (!d.exists(savedir)) d.mkdir(savedir); @@ -191,7 +191,7 @@ void SearchView::search() kdDebug(9002) << "starting kprocess" << endl; kdDebug(9002) << "htdig line:" << exe << " -c " << (indexdir + "/htdig.conf ") << query << endl; TDEProcess *proc = new TDEProcess; - TQString picdir = kapp->dirs()->findResourceDir("data", "tdevdocumentation/pics/htdig.png"); + TQString picdir = kapp->dirs()->findResourceDir("data", "kdevdocumentation/pics/htdig.png"); proc->setEnvironment("PICDIR", picdir); *proc << exe << "-c" << (indexdir + "/htdig.conf") << query; diff --git a/parts/documentation/selecttopic.h b/parts/documentation/selecttopic.h index e7e850bf..6ca5ad8b 100644 --- a/parts/documentation/selecttopic.h +++ b/parts/documentation/selecttopic.h @@ -22,7 +22,7 @@ #include "selecttopicbase.h" -#include "tdevdocumentationplugin.h" +#include "kdevdocumentationplugin.h" class SelectTopic: public SelectTopicBase{ Q_OBJECT diff --git a/parts/documentation/tdevdocumentation.desktop b/parts/documentation/tdevdocumentation.desktop deleted file mode 100644 index 721970e7..00000000 --- a/parts/documentation/tdevdocumentation.desktop +++ /dev/null @@ -1,82 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=The Documentation plugin offers browsing and searching in local and online documentation with support for multiple documentation systems. -Comment[ca]=El connector de documentació ofereix navegació i recerca en documentació local i en línia amb suport per a múltiples sistemes de documentació. -Comment[da]=Dokumentations-plugin tilbyder visning og søgning i lokal og online dokumentation med understøttelse af flere dokumentations-systemer. -Comment[de]=Die Dokumentations-Komponente bietet eine Browsefunktion und Unterstützung für die Suche in mehreren Hilfedokumenten und Dokumentationssystemen. -Comment[el]=Το πρόσθετο τεκμηρίωσης προσφέρει περιήγηση και αναζήτηση σε τοπική και απομακρυσμένη τεκμηρίωση για πολλαπλά συστήματα τεκμηρίωσης. -Comment[es]=El complemento de documentación proporciona navegación y búsqueda en la documentación, tanto local como en línea, y permite múltiples sistemas de documentación. -Comment[et]=Dokumentatsiooniplugin võimaldab lehitseda ja otsida nii kohalikus kui võrgudokumentatsioonis paljusid dokumentatsioonisüsteeme kasutades. -Comment[eu]=Dokumentazio-pluginak lokaleko eta urruneko dokumentazio arakatzeko eta bilatzeko aukera ematen dizu, eta dokumentazio-sistema anitz onartzen ditu. -Comment[fa]=وصلۀ مستندسازی، مرور و جستجو در مستندات محلی و برخط را با پشتیبانی از سیستمهای مستندسازی چندگانه، ارائه می‌کند. -Comment[fr]=Le module externe de documentation offre une navigation et une recherche dans la documentation locale et en ligne ainsi que la prise en charge de systèmes de documentation mutiples. -Comment[gl]=A extensión de documentación ofrece navegación e búsqueda en documentación local e en liña con soporte para múltiples sistemas de documentación. -Comment[hu]=Dokumentációmegjelenítő elem helyi és távoli dokumentáció böngészéséhez, keresési lehetőséggel. Többféle formátumot támogat. -Comment[it]=Il plugin di documentazione offre navigazione e ricerca in locale e documentazione in linea con supporto per sistemi di documentazione multipla. -Comment[ms]=Plugin dokumentasi menawarkan pelungsuran dan pencarian dalam dokumentasi tempatan dan dalam talian dengan sokongan untuk pelbagai sistem dokumentasi. -Comment[nds]=Mit dat Dokmentatschoon-Moduul kannst Du lokale un Tokoppel-Dokmentatschoon dörkieken un -söken, mehr Dokmentatschoonsystemen warrt ünnerstütt. -Comment[ne]=मिसिलीकरण प्लगइनले बहुविध मिसिलीकरण प्रणालीको समर्थनसँग अनलाइन मिसिलीकरण र स्थानीय रूपमा ब्राउज र खोजी गर्न दिन्छ । -Comment[nl]=De documentatieplugin welke het mogelijk maakt om door lokale documentatie en documentatie op afstand te bladeren en te zoeken. Met ondersteuning voor verschillende documentatiesystemen. -Comment[pl]=Kontrola dokumentacji z obsługą przeglądania i wyszukiwania w różnych plikach pomocy i systemach dokumentacji. -Comment[pt]=O 'plugin' de documentação oferece navegação e procura em documentação local e em rede com suporte para vários sistemas de documentação. -Comment[pt_BR]=A documentação do plug-in oferece navegação e busca na documentação local e online com suporte para diversos sistemas de documentação. -Comment[ru]=Модуль документации позволяет упростить работу с документацией. -Comment[sk]=Dokumentačný modul proskytuje prehliadanie a vyhľadávanie v lokálnej a online dokumentácie s podporou viacerých dokumentačných systémov. -Comment[sr]=Прикључак за документацију са подршком за прегледање и тражење у локалној и документацији на вези, за више документационих система. -Comment[sr@Latn]=Priključak za dokumentaciju sa podrškom za pregledanje i traženje u lokalnoj i dokumentaciji na vezi, za više dokumentacionih sistema. -Comment[sv]=Dokumentationsinsticksprogrammet erbjuder bläddring och sökning i lokal dokumentation och dokumentation på nätet, med stöd för flera dokumentationssystem. -Comment[tr]=Belgelendirme eklentisi, çoklu belgelendirme sistemlerine destek ile, yerel ve çevrimiçi belgelere gözatma ve bu belgelerde arama yapılmasına izin verir. -Comment[zh_CN]=文档插件提供了本地和在线文档中提供浏览和搜索功能,支持多种文档系统 -Comment[zh_TW]=文件外掛程式提供對本地與線上文件的瀏覽與搜尋功能,並支援多重文件系統。 -Name=TDevDocumentation -Name[da]=TDevelop dokumentation -Name[nds]=TDevelop-Dokmentatschoon -Name[pt_BR]=TDevDocumentação -Name[sk]=KDev dokumentácia -Name[sv]=TDevelop dokumentation -Name[ta]=KDev ஆவணமாக்கல் -Name[tg]=Ҳуҷҷатҳои KDev -Name[zh_TW]=TDevelop 文件 -GenericName=Documentation -GenericName[br]=Teuliadur -GenericName[ca]=Documentació -GenericName[cy]=Dogfenniaeth -GenericName[da]=Dokumentation -GenericName[de]=Dokumentationsbaum -GenericName[el]=Τεκμηρίωση -GenericName[es]=Documentación -GenericName[et]=Dokumentatsioon -GenericName[eu]=Dokumentazioa -GenericName[fa]=مستندات -GenericName[ga]=Doiciméadú -GenericName[gl]=Documentación -GenericName[hi]=दस्तावेज़ीकरण -GenericName[hu]=Dokumentáció -GenericName[it]=Documentazione -GenericName[ja]=ドキュメンテーション -GenericName[ms]=Dokumentasi -GenericName[nds]=Dokmentatschoon -GenericName[ne]=मिसिलीकरण -GenericName[nl]=Documentatie -GenericName[pl]=Dokumentacja -GenericName[pt]=Documentação -GenericName[pt_BR]=Documentação -GenericName[ru]=Просмотр документации -GenericName[sk]=Dokumentácia -GenericName[sl]=Dokumentacija -GenericName[sr]=Документација -GenericName[sr@Latn]=Dokumentacija -GenericName[sv]=Dokumentation -GenericName[ta]=ஆவணமாக்கல் -GenericName[tg]=Намоиши ҳуҷҷатҳо -GenericName[tr]=Belgelendirme -GenericName[zh_CN]=文档 -GenericName[zh_TW]=文件 -Icon=khelpcenter -ServiceTypes=TDevelop/Plugin -X-TDevelop-Scope=Global -X-TDE-Library=libtdevdocumentation -X-TDevelop-Version=5 -X-TDevelop-Mode=AssistantMode -X-TDevelop-Properties=Documentation diff --git a/parts/documentation/tdevpart_documentation.rc b/parts/documentation/tdevpart_documentation.rc deleted file mode 100644 index 6fd8b488..00000000 --- a/parts/documentation/tdevpart_documentation.rc +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/parts/documentation/tools/htdig/htdigindex.cpp b/parts/documentation/tools/htdig/htdigindex.cpp index d422826c..c99c4a2c 100644 --- a/parts/documentation/tools/htdig/htdigindex.cpp +++ b/parts/documentation/tools/htdig/htdigindex.cpp @@ -45,10 +45,10 @@ ProgressDialog::ProgressDialog(bool index, TQWidget *parent, const char *name) { proc = 0; - indexdir = kapp->dirs()->saveLocation("data", "tdevdocumentation/search"); + indexdir = kapp->dirs()->saveLocation("data", "kdevdocumentation/search"); TQDir d; d.mkdir(indexdir); - TDEConfig config("tdevdocumentation", true); + TDEConfig config("kdevdocumentation", true); config.setGroup("htdig"); databaseDir = config.readPathEntry("databaseDir", indexdir); @@ -137,8 +137,8 @@ void ProgressDialog::setFilesDigged(int n) void ProgressDialog::setState(int n) { - TQPixmap unchecked = TQPixmap(locate("data", "tdevdocumentation/pics/unchecked.xpm")); - TQPixmap checked = TQPixmap(locate("data", "tdevdocumentation/pics/checked.xpm")); + TQPixmap unchecked = TQPixmap(locate("data", "kdevdocumentation/pics/unchecked.xpm")); + TQPixmap checked = TQPixmap(locate("data", "kdevdocumentation/pics/checked.xpm")); check1->setPixmap( n > 0 ? checked : unchecked); check2->setPixmap( n > 1 ? checked : unchecked); @@ -182,7 +182,7 @@ void ProgressDialog::addDir(const TQString &dir) void ProgressDialog::scanDirectories() { - TQString ftsLocationsFile = locateLocal("data", "tdevdocumentation/search/locations.txt"); + TQString ftsLocationsFile = locateLocal("data", "kdevdocumentation/search/locations.txt"); TQFile f(ftsLocationsFile); if (!f.open(IO_ReadOnly)) @@ -214,15 +214,15 @@ bool ProgressDialog::createConfig() if (language == "C") language = "en"; - TQString wrapper = locate("data", TQString("tdevdocumentation/%1/wrapper.html").arg(language)); + TQString wrapper = locate("data", TQString("kdevdocumentation/%1/wrapper.html").arg(language)); if (wrapper.isEmpty()) - wrapper = locate("data", TQString("tdevdocumentation/en/wrapper.html")); + wrapper = locate("data", TQString("kdevdocumentation/en/wrapper.html")); if (wrapper.isEmpty()) return false; wrapper = wrapper.left(wrapper.length()-12); // locate the image dir - TQString images = locate("data", "tdevdocumentation/pics/star.png"); + TQString images = locate("data", "kdevdocumentation/pics/star.png"); if (images.isEmpty()) return false; images = images.left(images.length()-8); @@ -300,7 +300,7 @@ bool ProgressDialog::generateIndex() setState(1); procdone = false; // run htdig - TDEConfig config("tdevdocumentation", true); + TDEConfig config("kdevdocumentation", true); config.setGroup("htdig"); exe = config.readPathEntry("htdigbin", kapp->dirs()->findExe("htdig")); if (exe.isEmpty()) @@ -365,7 +365,7 @@ void ProgressDialog::htdigExited(TDEProcess *proc) setFilesDigged(filesToDig); setState(2); - TDEConfig config("tdevdocumentation", true); + TDEConfig config("kdevdocumentation", true); config.setGroup("htdig"); // run htmerge ----------------------------------------------------- exe = config.readPathEntry("htmergebin", kapp->dirs()->findExe("htmerge")); diff --git a/parts/doxygen/CMakeLists.txt b/parts/doxygen/CMakeLists.txt index ed4bfeb9..00a18675 100644 --- a/parts/doxygen/CMakeLists.txt +++ b/parts/doxygen/CMakeLists.txt @@ -28,13 +28,13 @@ link_directories( ##### other data ################################ -install( FILES tdevdoxygen.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevdoxygen.rc DESTINATION ${DATA_INSTALL_DIR}/tdevdoxygen ) +install( FILES kdevdoxygen.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevdoxygen.rc DESTINATION ${DATA_INSTALL_DIR}/kdevdoxygen ) -##### libtdevdoxygen (module) ################### +##### libkdevdoxygen (module) ################### -tde_add_kpart( libtdevdoxygen AUTOMOC +tde_add_kpart( libkdevdoxygen AUTOMOC SOURCES doxygenpart.cpp doxygenconfigwidget.cpp input.cpp config.cpp version.cpp messages.cpp diff --git a/parts/doxygen/Makefile.am b/parts/doxygen/Makefile.am index e01fa6eb..703760cb 100644 --- a/parts/doxygen/Makefile.am +++ b/parts/doxygen/Makefile.am @@ -4,16 +4,16 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util -I$(top_srcdir)/src -DDOXYWIZARD \ $(all_includes) -kde_module_LTLIBRARIES = libtdevdoxygen.la -libtdevdoxygen_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevdoxygen_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevdoxygen.la +libkdevdoxygen_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevdoxygen_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevdoxygen_la_SOURCES = doxygenpart.cpp doxygenconfigwidget.cpp input.cpp config.cpp version.cpp messages.cpp +libkdevdoxygen_la_SOURCES = doxygenpart.cpp doxygenconfigwidget.cpp input.cpp config.cpp version.cpp messages.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevdoxygen.desktop +service_DATA = kdevdoxygen.desktop -rcdir = $(kde_datadir)/tdevdoxygen -rc_DATA = tdevdoxygen.rc +rcdir = $(kde_datadir)/kdevdoxygen +rc_DATA = kdevdoxygen.rc diff --git a/parts/doxygen/doxygenpart.cpp b/parts/doxygen/doxygenpart.cpp index 960eef41..d965d98b 100644 --- a/parts/doxygen/doxygenpart.cpp +++ b/parts/doxygen/doxygenpart.cpp @@ -15,19 +15,19 @@ #include "doxygenconfigwidget.h" #include "configwidgetproxy.h" #include "config.h" -#include "tdevappfrontend.h" +#include "kdevappfrontend.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include #include #include -#include +#include #include #include #include @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include #include @@ -47,15 +47,15 @@ #define PROJECTOPTIONS 1 -typedef TDevGenericFactory DoxygenFactory; -static const TDevPluginInfo data("tdevdoxygen"); -K_EXPORT_COMPONENT_FACTORY( libtdevdoxygen, DoxygenFactory( data ) ) +typedef KDevGenericFactory DoxygenFactory; +static const KDevPluginInfo data("kdevdoxygen"); +K_EXPORT_COMPONENT_FACTORY( libkdevdoxygen, DoxygenFactory( data ) ) DoxygenPart::DoxygenPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin(&data, parent, name ? name : "DoxygenPart"), m_activeEditor(0), m_cursor(0) + : KDevPlugin(&data, parent, name ? name : "DoxygenPart"), m_activeEditor(0), m_cursor(0) { setInstance(DoxygenFactory::instance()); - setXMLFile("tdevdoxygen.rc"); + setXMLFile("kdevdoxygen.rc"); TDEAction *action; action = new TDEAction( i18n("Build API Documentation"), 0, @@ -272,7 +272,7 @@ void DoxygenPart::slotDoxygen() kdDebug(9026) << "Doxygen command line: " << cmdline << endl; - if (TDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand(dir, cmdline); } @@ -340,7 +340,7 @@ void DoxygenPart::slotDoxClean() if (could_be_dirty) { kdDebug(9026) << "Cleaning Doxygen generated API documentation using: " << cmdline << endl; - if (TDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand(KShellProcess::quote(project()->projectDirectory()), cmdline); } else @@ -350,7 +350,7 @@ void DoxygenPart::slotDoxClean() void DoxygenPart::slotPreviewProcessExited( ) { - TDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend"); + KDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend"); if ( appFrontend != 0 ) disconnect(appFrontend, 0, this, 0); partController()->showDocument(KURL(m_tmpDir.name()+"html/index.html")); @@ -361,7 +361,7 @@ void DoxygenPart::slotRunPreview( ) if (m_file.isNull()) return; - TDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend"); + KDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend"); if ( appFrontend == 0 ) return; diff --git a/parts/doxygen/doxygenpart.h b/parts/doxygen/doxygenpart.h index 77bafe46..aaa438de 100644 --- a/parts/doxygen/doxygenpart.h +++ b/parts/doxygen/doxygenpart.h @@ -20,7 +20,7 @@ #include #include -#include "tdevplugin.h" +#include "kdevplugin.h" class DoxygenDialog; class TQPopupMenu; @@ -37,7 +37,7 @@ namespace KTextEditor{ class EditInterface; } -class DoxygenPart : public TDevPlugin +class DoxygenPart : public KDevPlugin { Q_OBJECT diff --git a/parts/doxygen/kdevdoxygen.desktop b/parts/doxygen/kdevdoxygen.desktop new file mode 100644 index 00000000..7d50f15b --- /dev/null +++ b/parts/doxygen/kdevdoxygen.desktop @@ -0,0 +1,81 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=The doxygen plugin provides a way to specify and control generation of documentation for a project, based on source code content. You need to have doxygen installed to be able to use this. For more info goto http://www.doxygen.org +Comment[ca]=El connector doxygen proporciona una forma d'especificar i controlar la generació de documentació d'un projecte, basant-se en el contingut del codi font. Necessitareu tenir instal·lat doxygen. Per a més informació visiteu http://www.doxygen.org +Comment[da]=Doxygen-plugin sørger for en måde at angive og kontrollere generering af dokumentation for et projekt, baseret på kildekodens indhold. Du skal have doxygen installeret for at kunne bruge dette. For mere info gå til http://www.doxygen.org +Comment[de]=Diese Komponente bietet Unterstützung bei der Erstellung von Projektdokumentation, die auf den Quelltexten basiert. Um diese Funktionalität zu nutzen, muss Doxygen installiert sein. Weitere Informationen finden sie auf http://www.doxygen.org. +Comment[el]=Το πρόσθετο doxygen προσφέρει μια μέθοδο ορισμού και ελέγχου της δημιουργίας της τεκμηρίωσης για ένα έργο, βασισμένο στον πηγαίο κώδικα. Πρέπει να έχετε το doxygen εγκατεστημένο για να το χρησιμοποιήσετε. Για περισσότερες πληροφορίες πηγαίνετε στο http://www.doxygen.org +Comment[es]=El complemento doxygen proporciona una forma de especificar y controlar la generación de documentación de un proyecto, basándose en el contenido del código fuente. Necesita tener instalado doxygen. Para más información visite http://www.doxygen.org +Comment[et]=Doxygeni plugin võimaldab määrata ja kontrollida projekti dokumentatsiooni loomist vastavalt lähtekoodi sisule. Selleks peab olema paigaldatud ka programm 'doxygen'. Vaata täpsemalt http://www.doxygen.org +Comment[eu]=Doxygen plugin-ak, iturburu kodean oinarrituta, proiektu baterako dokumentazio sorkuntza eta kontrola zehazteko aukera ematen dizu. Doxygen instalatuta eduki behar duzu hau erabiltzeko. Informazio gehiagorako joan hona:http://www.doxygen.org +Comment[fa]=وصلۀ doxygen راهی برای مشخص کردن و کنترل تولید مستندات پروژه بر اساس متن کد منبع فراهم می‌کند. شما برای توانایی در استفاده از این، نیاز به نصب doxygen دارید. برای اطلاعات بیشتر به http://www.doxygen.org بروید +Comment[fr]=Le module externe « doxygen » fournit un moyen de spécifier et de contrôler la génération de la documentation pour un projet, en se basant sur le contenu du code source. Pour pouvoir l'utiliser, vous devez avoir installé « doxygen ». Pour plus d'informations, allez sur le site http://www.doxygen.org +Comment[gl]=A extensión doxigen proporciona unha maneira de especificar e controlar a xeración da documentación dun proxecto, basada nos contidos do código fonte. Necesitará ter doxigen instalado para poder usar isto. Para máis información visite http://www.doxygen.org +Comment[hu]=A Doxygen bővítőmodullal a projekt teljes dokumentációjának készítése elvégezhető, közvetlenül a forráskódból. Használatához előbb telepíteni kell a Doxygen programcsomagot. Részletes információ itt található: http://www.doxygen.org +Comment[it]=Il plugin doxygen offre un modo per specificare e controllare la generazione della documentazione di un progetto, basato sul contenuto del codice sorgente. Devi avere doxygen installato per utilizzarlo. Per maggiori informazioni vai su http://www.doxygen.org +Comment[ja]=doxygen プラグインは、ソースコード内容に基づいて、プロジェクトのためのドキュメンテーションの生成を指定しコントロールする方法を提供します。これを使用するには doxygen をインストールする必要があります。より多くの情報は http://www.doxygen.org にあります。 +Comment[ms]=Plugin doxygen menyediakan cara untuk menyatakan dan mengawal penjanaan dokumentasi untuk projek, berdasarkan pada kandungan kod sumber. Anda perlu mempunyai doxygen dipasang untuk boleh menggunakannya. Untuk lebih maklumat lawat http://www.doxygen.org +Comment[nds]=Dat Doxygen-Moduul stellt en op den Borntextinholt opbuut Ünnerstütten bi't Opstellen vun Projektdokmentatschonen praat. Dormit Du dat bruken kannst, mutt "doxygen" installeert wesen. Mehr Informatschonen laat sik op http://www.doxygen.org finnen. +Comment[ne]=डक्सिजन प्लगइनले स्रोत सङ्केत प्रसङ्गमा आधारित, परियोजनाका लागि मिसिलीकरणको उत्पादन नियन्त्रण र निर्दिष्ट गर्ने तरिका प्रदान गर्दछ । यसलाई प्रयोग गर्न सक्षम हुनका लागि तपाईँले डक्सिजन स्थापना गर्नु पर्दछ । बढी जानकारीका लागि http://www.doxygen.org मा जानुहोस् । +Comment[nl]=De doxygen-plugin biedt hulp bij het vervaardigen van documentatie voor een project, gebaseerd op documentatie in de broncode. Om deze functie te kunnen gebruiken dient u doxygen te hebben geïnstalleerd. Meer info: http://www.doxygen.org/ +Comment[pl]=Wtyczka doxygena pozwala kontrolować generację dokumentacji projektu, bazując na zawartości kodu źródłowego. Aby użyć tej opcji trzeba mieć zainstalowany doxygen. Więcej informacji można uzyskać na http://www.doxygen.org +Comment[pt]=O 'plugin' do doxygen oferece uma forma de especificar e controlar a geração de documentação de um projecto, baseada no conteúdo do código-fonte. Você necessita de ter o 'doxygen' instalado para poder usar isto. Para obter mais informações vá a http://www.doxygen.org +Comment[pt_BR]=O plug-in do doxygen fornece uma maneira de especificar e controlar a geração de documentação para um projeto, baseado no conteúdo do código fonte. Você precisa ter o doxygen instalado para poder usar isto. Para mais informações vá em http://www.doxygen.org +Comment[ru]=Модуль поддержки doxygen предоставляет возможности контроля генерации проектной документации на основе содержимого исходных файлов. Для использования необходим doxygen. Подробнее об этом смотрите на http://www.doxygen.org. +Comment[sk]=Doxygen modul proskytuje spôsob ako špecifikovať a generovať projektovú dokumentáciu na základe obsahu zdrojového kódu. Potrebujete mať nainštalovaný doxygen. Pre viac informácií pozrite http://www.doxygen.org +Comment[sr]=Doxygen прикључак обезбеђује начин да се прецизира и контролише документација за пројекат, на основу садржаја изворног кôда. Потребно је да имате инсталиран doxygen да бисте били у могућности да користите ово. За више информација идите на http://www.doxygen.org +Comment[sr@Latn]=Doxygen priključak obezbeđuje način da se precizira i kontroliše dokumentacija za projekat, na osnovu sadržaja izvornog kôda. Potrebno je da imate instaliran doxygen da biste bili u mogućnosti da koristite ovo. Za više informacija idite na http://www.doxygen.org +Comment[sv]=Doxygen-insticksprogrammet tillhandahåller ett sätt att ange och styra hur dokument skapas för ett projekt, baserat på källkodens innehåll. Du måste ha installerat Doxygen för att kunna använda det. För mer information besök http://www.doxygen.org. +Comment[ta]=டிஆக்சிஜன் சொருகி உங்கள் திட்டப்பணிக்கு குறிப்பிட்ட வழி மற்றும் ஆவணத்தின் கட்டுபாட்டு உற்பத்திக்கு இது உதவும். இதை உபயோகிக்க முதலில் நீங்கள் டிஆக்சிஜன் நிறுவ வேண்டும். மேலும் விவரங்களுக்கு http://www.doxygen.org +Comment[tg]=Модули тарафдорбудаи doxygen барои идора намудани генератсияи ҳуҷҷатҳо дар асоси файлҳои берунӣ буда имконият медиҳад.Барои истифодаи doxygen-и лозимӣ.Барои пурратар гирифтани маълумот ба http://www.doxygen.org назар намоед +Comment[tr]=Doxygen eklentisi, kaynak kod içeriğine göre bir projenin belgelerinin yaratılmasının belirtilmesi ve kontrolü için bir yol sağlar. Bunu kullanabilmek için doxygen'ın kurulu olması lazımdır. Daha fazla bilgi için http://www.doxygen.org adresine gidin. +Comment[zh_CN]=doxygen 是基于源文件产生文档的控制插件。必须安装 doxygen 才能使用。更多信息参考 http://www.doxygen.org +Comment[zh_TW]=Doxygen 外掛程式提供依據程式源碼內容產生並控制專案文件的方式。您需要安裝 doxygen 才能使用。詳情請參考 http://www.doxygen.org +Name=KDevDoxygen +Name[da]=TDevelop Doxygen +Name[de]=Unterstützung für Doxygen (TDevelop) +Name[hi]=के-डेव-डॉक्सीज़ेन +Name[nds]=Doxygen-Ünnerstütten för TDevelop +Name[sk]=KDev Doxygen +Name[sv]=TDevelop Doxygen +Name[zh_TW]=TDevelop Doxygen +GenericName=Doxygen Support +GenericName[ca]=Suport per a doxygen +GenericName[da]=Doxygen understøttelse +GenericName[de]=Unterstützung für Doxygen +GenericName[el]=Υποστήριξη Doxygen +GenericName[es]=Soporte para Doxygen +GenericName[et]=Doxygeni toetus +GenericName[eu]=Doxygen euskarria +GenericName[fa]=پشتیبانی Doxygen +GenericName[fr]=Prise en charge de Doxygen +GenericName[ga]=Tacaíocht Doxygen +GenericName[gl]=Soporte para Doxygen +GenericName[hu]=Doxygen-támogatás +GenericName[it]=Supporto Doxygen +GenericName[ja]=Doxygen サポート +GenericName[ms]=Sokongan Doxygen +GenericName[nds]=Ünnerstütten för Doxygen +GenericName[ne]=डक्सिजन समर्थन +GenericName[nl]=Doxygen ondersteuning +GenericName[pl]=Obsług Doxygena +GenericName[pt]=Suporte a Doxygen +GenericName[pt_BR]=Suporte ao Doxygen +GenericName[ru]=Поддержка Doxygen +GenericName[sk]=Doxygen podpora +GenericName[sl]=Podpora za Doxygen +GenericName[sr]=Doxygen подршка +GenericName[sr@Latn]=Doxygen podrška +GenericName[sv]=Doxygen-stöd +GenericName[ta]=Doxygen ஆதரவு +GenericName[tg]=Тарафдори намудани Doxygen +GenericName[tr]=Doxygen Desteği +GenericName[zh_CN]=Doxygen 支持 +GenericName[zh_TW]=Doxygen 支援 +ServiceTypes=TDevelop/Plugin +Icon=tdevelop +X-TDE-Library=libkdevdoxygen +X-TDevelop-Version=5 +X-TDevelop-Scope=Project +X-TDevelop-Properties=CProjectDocumentation,CPPProjectDocumentation,JavaProjectDocumentation,PHPProjectDocumentation diff --git a/parts/doxygen/tdevdoxygen.rc b/parts/doxygen/kdevdoxygen.rc similarity index 100% rename from parts/doxygen/tdevdoxygen.rc rename to parts/doxygen/kdevdoxygen.rc diff --git a/parts/doxygen/tdevdoxygen.desktop b/parts/doxygen/tdevdoxygen.desktop deleted file mode 100644 index a69635ab..00000000 --- a/parts/doxygen/tdevdoxygen.desktop +++ /dev/null @@ -1,81 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=The doxygen plugin provides a way to specify and control generation of documentation for a project, based on source code content. You need to have doxygen installed to be able to use this. For more info goto http://www.doxygen.org -Comment[ca]=El connector doxygen proporciona una forma d'especificar i controlar la generació de documentació d'un projecte, basant-se en el contingut del codi font. Necessitareu tenir instal·lat doxygen. Per a més informació visiteu http://www.doxygen.org -Comment[da]=Doxygen-plugin sørger for en måde at angive og kontrollere generering af dokumentation for et projekt, baseret på kildekodens indhold. Du skal have doxygen installeret for at kunne bruge dette. For mere info gå til http://www.doxygen.org -Comment[de]=Diese Komponente bietet Unterstützung bei der Erstellung von Projektdokumentation, die auf den Quelltexten basiert. Um diese Funktionalität zu nutzen, muss Doxygen installiert sein. Weitere Informationen finden sie auf http://www.doxygen.org. -Comment[el]=Το πρόσθετο doxygen προσφέρει μια μέθοδο ορισμού και ελέγχου της δημιουργίας της τεκμηρίωσης για ένα έργο, βασισμένο στον πηγαίο κώδικα. Πρέπει να έχετε το doxygen εγκατεστημένο για να το χρησιμοποιήσετε. Για περισσότερες πληροφορίες πηγαίνετε στο http://www.doxygen.org -Comment[es]=El complemento doxygen proporciona una forma de especificar y controlar la generación de documentación de un proyecto, basándose en el contenido del código fuente. Necesita tener instalado doxygen. Para más información visite http://www.doxygen.org -Comment[et]=Doxygeni plugin võimaldab määrata ja kontrollida projekti dokumentatsiooni loomist vastavalt lähtekoodi sisule. Selleks peab olema paigaldatud ka programm 'doxygen'. Vaata täpsemalt http://www.doxygen.org -Comment[eu]=Doxygen plugin-ak, iturburu kodean oinarrituta, proiektu baterako dokumentazio sorkuntza eta kontrola zehazteko aukera ematen dizu. Doxygen instalatuta eduki behar duzu hau erabiltzeko. Informazio gehiagorako joan hona:http://www.doxygen.org -Comment[fa]=وصلۀ doxygen راهی برای مشخص کردن و کنترل تولید مستندات پروژه بر اساس متن کد منبع فراهم می‌کند. شما برای توانایی در استفاده از این، نیاز به نصب doxygen دارید. برای اطلاعات بیشتر به http://www.doxygen.org بروید -Comment[fr]=Le module externe « doxygen » fournit un moyen de spécifier et de contrôler la génération de la documentation pour un projet, en se basant sur le contenu du code source. Pour pouvoir l'utiliser, vous devez avoir installé « doxygen ». Pour plus d'informations, allez sur le site http://www.doxygen.org -Comment[gl]=A extensión doxigen proporciona unha maneira de especificar e controlar a xeración da documentación dun proxecto, basada nos contidos do código fonte. Necesitará ter doxigen instalado para poder usar isto. Para máis información visite http://www.doxygen.org -Comment[hu]=A Doxygen bővítőmodullal a projekt teljes dokumentációjának készítése elvégezhető, közvetlenül a forráskódból. Használatához előbb telepíteni kell a Doxygen programcsomagot. Részletes információ itt található: http://www.doxygen.org -Comment[it]=Il plugin doxygen offre un modo per specificare e controllare la generazione della documentazione di un progetto, basato sul contenuto del codice sorgente. Devi avere doxygen installato per utilizzarlo. Per maggiori informazioni vai su http://www.doxygen.org -Comment[ja]=doxygen プラグインは、ソースコード内容に基づいて、プロジェクトのためのドキュメンテーションの生成を指定しコントロールする方法を提供します。これを使用するには doxygen をインストールする必要があります。より多くの情報は http://www.doxygen.org にあります。 -Comment[ms]=Plugin doxygen menyediakan cara untuk menyatakan dan mengawal penjanaan dokumentasi untuk projek, berdasarkan pada kandungan kod sumber. Anda perlu mempunyai doxygen dipasang untuk boleh menggunakannya. Untuk lebih maklumat lawat http://www.doxygen.org -Comment[nds]=Dat Doxygen-Moduul stellt en op den Borntextinholt opbuut Ünnerstütten bi't Opstellen vun Projektdokmentatschonen praat. Dormit Du dat bruken kannst, mutt "doxygen" installeert wesen. Mehr Informatschonen laat sik op http://www.doxygen.org finnen. -Comment[ne]=डक्सिजन प्लगइनले स्रोत सङ्केत प्रसङ्गमा आधारित, परियोजनाका लागि मिसिलीकरणको उत्पादन नियन्त्रण र निर्दिष्ट गर्ने तरिका प्रदान गर्दछ । यसलाई प्रयोग गर्न सक्षम हुनका लागि तपाईँले डक्सिजन स्थापना गर्नु पर्दछ । बढी जानकारीका लागि http://www.doxygen.org मा जानुहोस् । -Comment[nl]=De doxygen-plugin biedt hulp bij het vervaardigen van documentatie voor een project, gebaseerd op documentatie in de broncode. Om deze functie te kunnen gebruiken dient u doxygen te hebben geïnstalleerd. Meer info: http://www.doxygen.org/ -Comment[pl]=Wtyczka doxygena pozwala kontrolować generację dokumentacji projektu, bazując na zawartości kodu źródłowego. Aby użyć tej opcji trzeba mieć zainstalowany doxygen. Więcej informacji można uzyskać na http://www.doxygen.org -Comment[pt]=O 'plugin' do doxygen oferece uma forma de especificar e controlar a geração de documentação de um projecto, baseada no conteúdo do código-fonte. Você necessita de ter o 'doxygen' instalado para poder usar isto. Para obter mais informações vá a http://www.doxygen.org -Comment[pt_BR]=O plug-in do doxygen fornece uma maneira de especificar e controlar a geração de documentação para um projeto, baseado no conteúdo do código fonte. Você precisa ter o doxygen instalado para poder usar isto. Para mais informações vá em http://www.doxygen.org -Comment[ru]=Модуль поддержки doxygen предоставляет возможности контроля генерации проектной документации на основе содержимого исходных файлов. Для использования необходим doxygen. Подробнее об этом смотрите на http://www.doxygen.org. -Comment[sk]=Doxygen modul proskytuje spôsob ako špecifikovať a generovať projektovú dokumentáciu na základe obsahu zdrojového kódu. Potrebujete mať nainštalovaný doxygen. Pre viac informácií pozrite http://www.doxygen.org -Comment[sr]=Doxygen прикључак обезбеђује начин да се прецизира и контролише документација за пројекат, на основу садржаја изворног кôда. Потребно је да имате инсталиран doxygen да бисте били у могућности да користите ово. За више информација идите на http://www.doxygen.org -Comment[sr@Latn]=Doxygen priključak obezbeđuje način da se precizira i kontroliše dokumentacija za projekat, na osnovu sadržaja izvornog kôda. Potrebno je da imate instaliran doxygen da biste bili u mogućnosti da koristite ovo. Za više informacija idite na http://www.doxygen.org -Comment[sv]=Doxygen-insticksprogrammet tillhandahåller ett sätt att ange och styra hur dokument skapas för ett projekt, baserat på källkodens innehåll. Du måste ha installerat Doxygen för att kunna använda det. För mer information besök http://www.doxygen.org. -Comment[ta]=டிஆக்சிஜன் சொருகி உங்கள் திட்டப்பணிக்கு குறிப்பிட்ட வழி மற்றும் ஆவணத்தின் கட்டுபாட்டு உற்பத்திக்கு இது உதவும். இதை உபயோகிக்க முதலில் நீங்கள் டிஆக்சிஜன் நிறுவ வேண்டும். மேலும் விவரங்களுக்கு http://www.doxygen.org -Comment[tg]=Модули тарафдорбудаи doxygen барои идора намудани генератсияи ҳуҷҷатҳо дар асоси файлҳои берунӣ буда имконият медиҳад.Барои истифодаи doxygen-и лозимӣ.Барои пурратар гирифтани маълумот ба http://www.doxygen.org назар намоед -Comment[tr]=Doxygen eklentisi, kaynak kod içeriğine göre bir projenin belgelerinin yaratılmasının belirtilmesi ve kontrolü için bir yol sağlar. Bunu kullanabilmek için doxygen'ın kurulu olması lazımdır. Daha fazla bilgi için http://www.doxygen.org adresine gidin. -Comment[zh_CN]=doxygen 是基于源文件产生文档的控制插件。必须安装 doxygen 才能使用。更多信息参考 http://www.doxygen.org -Comment[zh_TW]=Doxygen 外掛程式提供依據程式源碼內容產生並控制專案文件的方式。您需要安裝 doxygen 才能使用。詳情請參考 http://www.doxygen.org -Name=KDevDoxygen -Name[da]=TDevelop Doxygen -Name[de]=Unterstützung für Doxygen (TDevelop) -Name[hi]=के-डेव-डॉक्सीज़ेन -Name[nds]=Doxygen-Ünnerstütten för TDevelop -Name[sk]=KDev Doxygen -Name[sv]=TDevelop Doxygen -Name[zh_TW]=TDevelop Doxygen -GenericName=Doxygen Support -GenericName[ca]=Suport per a doxygen -GenericName[da]=Doxygen understøttelse -GenericName[de]=Unterstützung für Doxygen -GenericName[el]=Υποστήριξη Doxygen -GenericName[es]=Soporte para Doxygen -GenericName[et]=Doxygeni toetus -GenericName[eu]=Doxygen euskarria -GenericName[fa]=پشتیبانی Doxygen -GenericName[fr]=Prise en charge de Doxygen -GenericName[ga]=Tacaíocht Doxygen -GenericName[gl]=Soporte para Doxygen -GenericName[hu]=Doxygen-támogatás -GenericName[it]=Supporto Doxygen -GenericName[ja]=Doxygen サポート -GenericName[ms]=Sokongan Doxygen -GenericName[nds]=Ünnerstütten för Doxygen -GenericName[ne]=डक्सिजन समर्थन -GenericName[nl]=Doxygen ondersteuning -GenericName[pl]=Obsług Doxygena -GenericName[pt]=Suporte a Doxygen -GenericName[pt_BR]=Suporte ao Doxygen -GenericName[ru]=Поддержка Doxygen -GenericName[sk]=Doxygen podpora -GenericName[sl]=Podpora za Doxygen -GenericName[sr]=Doxygen подршка -GenericName[sr@Latn]=Doxygen podrška -GenericName[sv]=Doxygen-stöd -GenericName[ta]=Doxygen ஆதரவு -GenericName[tg]=Тарафдори намудани Doxygen -GenericName[tr]=Doxygen Desteği -GenericName[zh_CN]=Doxygen 支持 -GenericName[zh_TW]=Doxygen 支援 -ServiceTypes=TDevelop/Plugin -Icon=tdevelop -X-TDE-Library=libtdevdoxygen -X-TDevelop-Version=5 -X-TDevelop-Scope=Project -X-TDevelop-Properties=CProjectDocumentation,CPPProjectDocumentation,JavaProjectDocumentation,PHPProjectDocumentation diff --git a/parts/filecreate/CMakeLists.txt b/parts/filecreate/CMakeLists.txt index 5655e7b9..a562f8e1 100644 --- a/parts/filecreate/CMakeLists.txt +++ b/parts/filecreate/CMakeLists.txt @@ -31,13 +31,13 @@ link_directories( ##### other data ################################ -install( FILES tdevfilecreate.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevpart_filecreate.rc template-info.xml DESTINATION ${DATA_INSTALL_DIR}/tdevfilecreate ) +install( FILES kdevfilecreate.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevpart_filecreate.rc template-info.xml DESTINATION ${DATA_INSTALL_DIR}/kdevfilecreate ) -##### libtdevfilecreate (module) ################ +##### libkdevfilecreate (module) ################ -tde_add_kpart( libtdevfilecreate AUTOMOC +tde_add_kpart( libkdevfilecreate AUTOMOC SOURCES filecreate_part.cpp filecreate_listitem.cpp filecreate_filetype.cpp filecreate_filedialog.cpp diff --git a/parts/filecreate/Makefile.am b/parts/filecreate/Makefile.am index ca0f1790..efe204d9 100644 --- a/parts/filecreate/Makefile.am +++ b/parts/filecreate/Makefile.am @@ -5,11 +5,11 @@ SUBDIRS = file-templates INCLUDES = -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevfilecreate.la -libtdevfilecreate_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevfilecreate_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevfilecreate.la +libkdevfilecreate_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevfilecreate_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevfilecreate_la_SOURCES = filecreate_part.cpp filecreate_listitem.cpp \ +libkdevfilecreate_la_SOURCES = filecreate_part.cpp filecreate_listitem.cpp \ filecreate_filetype.cpp filecreate_filedialog.cpp fcconfigwidgetbase.ui fcconfigwidget.cpp \ fctypeeditbase.ui fctypeedit.cpp fctemplateeditbase.ui fctemplateedit.cpp \ filecreate_newfile.cpp @@ -17,7 +17,7 @@ libtdevfilecreate_la_SOURCES = filecreate_part.cpp filecreate_listitem.cpp \ METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevfilecreate.desktop +service_DATA = kdevfilecreate.desktop -rcdir = $(kde_datadir)/tdevfilecreate -rc_DATA = tdevpart_filecreate.rc template-info.xml +rcdir = $(kde_datadir)/kdevfilecreate +rc_DATA = kdevpart_filecreate.rc template-info.xml diff --git a/parts/filecreate/README.dox b/parts/filecreate/README.dox index fc0fbc76..34a7882d 100644 --- a/parts/filecreate/README.dox +++ b/parts/filecreate/README.dox @@ -20,7 +20,7 @@ Example XML: \verbatim - + @@ -28,7 +28,7 @@ Example XML: - + \endverbatim @@ -36,14 +36,14 @@ You can also use global template definitions supplied with the FileCreate part: \verbatim - + - + \endverbatim diff --git a/parts/filecreate/fcconfigwidget.cpp b/parts/filecreate/fcconfigwidget.cpp index 14066c11..7c6fabc4 100644 --- a/parts/filecreate/fcconfigwidget.cpp +++ b/parts/filecreate/fcconfigwidget.cpp @@ -35,8 +35,8 @@ #include "fcconfigwidget.h" #include "filecreate_part.h" #include "filecreate_filetype.h" -#include "tdevproject.h" -#include "tdevpartcontroller.h" +#include "kdevproject.h" +#include "kdevpartcontroller.h" FCConfigWidget::FCConfigWidget(FileCreatePart * part, bool global, TQWidget *parent, const char *name): @@ -90,7 +90,7 @@ void FCConfigWidget::accept() void FCConfigWidget::loadGlobalConfig(TQListView *view, bool checkmarks) { - TQString globalXMLFile = ::locate("data", "tdevfilecreate/template-info.xml"); + TQString globalXMLFile = ::locate("data", "kdevfilecreate/template-info.xml"); TQDomDocument globalDom; if (!globalXMLFile.isNull() && DomUtil::openDOMFile(globalDom,globalXMLFile)) { @@ -103,7 +103,7 @@ void FCConfigWidget::loadGlobalConfig(TQListView *view, bool checkmarks) if (checkmarks) { TQDomElement useGlobalTypes = - DomUtil::elementByPath(*(m_part->projectDom()),"/tdevfilecreate/useglobaltypes"); + DomUtil::elementByPath(*(m_part->projectDom()),"/kdevfilecreate/useglobaltypes"); for(TQDomNode node = useGlobalTypes.firstChild(); !node.isNull();node=node.nextSibling()) { if (node.isElement() && node.nodeName()=="type") @@ -171,14 +171,14 @@ void FCConfigWidget::saveGlobalConfig() TQDomDocument globalDom; TQDomElement element = globalDom.createElement("tdevelop" ); globalDom.appendChild(element); - TQDomElement apPart = globalDom.createElement("tdevfilecreate"); + TQDomElement apPart = globalDom.createElement("kdevfilecreate"); element.appendChild(apPart); TQDomElement fileTypes = globalDom.createElement( "filetypes" ); apPart.appendChild( fileTypes ); saveConfiguration(globalDom, fileTypes, true); - TQFile config( TDEGlobal::dirs()->saveLocation("data", "tdevfilecreate/", true) + "template-info.xml" ); + TQFile config( TDEGlobal::dirs()->saveLocation("data", "kdevfilecreate/", true) + "template-info.xml" ); config.open(IO_WriteOnly | IO_Truncate); TQTextStream stream(&config); stream << ""; @@ -190,10 +190,10 @@ void FCConfigWidget::saveProjectConfig() { TQDomDocument dom = *m_part->projectDom( ); TQDomElement element = dom.documentElement( ); - TQDomElement apPart = element.namedItem( "tdevfilecreate" ).toElement( ); + TQDomElement apPart = element.namedItem( "kdevfilecreate" ).toElement( ); if( apPart.isNull( ) ) { - apPart = dom.createElement( "tdevfilecreate" ); + apPart = dom.createElement( "kdevfilecreate" ); element.appendChild( apPart ); } @@ -291,7 +291,7 @@ void FCConfigWidget::saveConfiguration(TQDomDocument &dom, TQDomElement &element { TQString dest; if (global) - dest = TDEGlobal::dirs()->saveLocation("data", "/tdevfilecreate/file-templates/", true); + dest = TDEGlobal::dirs()->saveLocation("data", "/kdevfilecreate/file-templates/", true); else dest = m_part->project()->projectDirectory() + "/templates/"; if (it.current()->text(4) == "create") @@ -318,7 +318,7 @@ void FCConfigWidget::saveConfiguration(TQDomDocument &dom, TQDomElement &element { TQString dest; if (global) - dest = TDEGlobal::dirs()->saveLocation("data", "/tdevfilecreate/file-templates/", true); + dest = TDEGlobal::dirs()->saveLocation("data", "/kdevfilecreate/file-templates/", true); else dest = m_part->project()->projectDirectory() + "/templates/"; if (lastChild->text(4) == "create") @@ -440,7 +440,7 @@ void FCConfigWidget::copyToProject_button_clicked() it->parent()->text(1), it->parent()->text(2), it->parent()->text(3), - locate("data", "tdevfilecreate/file-templates/"+ it->parent()->text(0))); + locate("data", "kdevfilecreate/file-templates/"+ it->parent()->text(0))); destParent += it->parent()->text(0) + "-"; TQCheckListItem *chk = dynamic_cast(it->parent()); if (chk) @@ -452,13 +452,13 @@ void FCConfigWidget::copyToProject_button_clicked() it->text(1), it->text(2), it->text(3), - locate("data", "tdevfilecreate/file-templates/"+destParent + it->text(0))); + locate("data", "kdevfilecreate/file-templates/"+destParent + it->text(0))); else it_copy = new TQListViewItem(fc_view, it->text(0), it->text(1), it->text(2), it->text(3), - locate("data", "tdevfilecreate/file-templates/" +destParent+ it->text(0))); + locate("data", "kdevfilecreate/file-templates/" +destParent+ it->text(0))); TQCheckListItem *chk = dynamic_cast(it); if (chk) chk->setOn(false); @@ -470,7 +470,7 @@ void FCConfigWidget::copyToProject_button_clicked() it_child->text(1), it_child->text(2), it_child->text(3), - locate("data", "tdevfilecreate/file-templates/"+ it_copy->text(0) + "-" + it_child->text(0))); + locate("data", "kdevfilecreate/file-templates/"+ it_copy->text(0) + "-" + it_child->text(0))); TQCheckListItem *chk_child = dynamic_cast(it_child); if (chk_child) chk_child->setOn(false); @@ -683,7 +683,7 @@ void FCConfigWidget::edit_type_content_button_clicked( ) } else { - TQString dest = TDEGlobal::dirs()->saveLocation("data", "/tdevfilecreate/file-templates/", true); + TQString dest = TDEGlobal::dirs()->saveLocation("data", "/kdevfilecreate/file-templates/", true); TQString typePath = dest + type_name; KURL content; content.setPath(typePath); @@ -691,7 +691,7 @@ void FCConfigWidget::edit_type_content_button_clicked( ) { TQFileInfo fi(dest+type_name); if (!fi.exists()) - copyTemplate(locate("data", "tdevfilecreate/file-templates/" + type_name), dest, type_name); + copyTemplate(locate("data", "kdevfilecreate/file-templates/" + type_name), dest, type_name); m_part->partController()->editDocument(content); } else diff --git a/parts/filecreate/file-templates/CMakeLists.txt b/parts/filecreate/file-templates/CMakeLists.txt index 37b9a309..04405e1a 100644 --- a/parts/filecreate/file-templates/CMakeLists.txt +++ b/parts/filecreate/file-templates/CMakeLists.txt @@ -14,4 +14,4 @@ install( FILES ui-dialogr ui-tabdialog ui-wizard dox ts ui-mainwin-qt4 ui-widget-qt4 ui-dialogb-qt4 ui-dialogr-qt4 ui-dialog-qt4 qrc - DESTINATION ${DATA_INSTALL_DIR}/tdevfilecreate/file-templates ) + DESTINATION ${DATA_INSTALL_DIR}/kdevfilecreate/file-templates ) diff --git a/parts/filecreate/file-templates/Makefile.am b/parts/filecreate/file-templates/Makefile.am index 631e3554..672a1cfa 100644 --- a/parts/filecreate/file-templates/Makefile.am +++ b/parts/filecreate/file-templates/Makefile.am @@ -1,2 +1,2 @@ -rcdir = $(kde_datadir)/tdevfilecreate/file-templates +rcdir = $(kde_datadir)/kdevfilecreate/file-templates rc_DATA = ui ui-dialog ui-mainwin ui-confdialog ui-dialogb ui-widget ui-dialogr ui-tabdialog ui-wizard dox ts ui-mainwin-qt4 ui-widget-qt4 ui-dialogb-qt4 ui-dialogr-qt4 ui-dialog-qt4 qrc diff --git a/parts/filecreate/filecreate_filedialog.h b/parts/filecreate/filecreate_filedialog.h index 616e9c2d..54365717 100644 --- a/parts/filecreate/filecreate_filedialog.h +++ b/parts/filecreate/filecreate_filedialog.h @@ -10,8 +10,8 @@ -#ifndef __TDEVPART_FILECREATE_FILEDIALOG_H__ -#define __TDEVPART_FILECREATE_FILEDIALOG_H__ +#ifndef __KDEVPART_FILECREATE_FILEDIALOG_H__ +#define __KDEVPART_FILECREATE_FILEDIALOG_H__ #include diff --git a/parts/filecreate/filecreate_part.cpp b/parts/filecreate/filecreate_part.cpp index 11fcfa6c..19deeb66 100644 --- a/parts/filecreate/filecreate_part.cpp +++ b/parts/filecreate/filecreate_part.cpp @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include @@ -30,10 +30,10 @@ #include #include -#include "tdevcore.h" -#include "tdevmainwindow.h" -#include "tdevproject.h" -#include "tdevpartcontroller.h" +#include "kdevcore.h" +#include "kdevmainwindow.h" +#include "kdevproject.h" +#include "kdevpartcontroller.h" #include "configwidgetproxy.h" #include "filetemplate.h" @@ -50,23 +50,23 @@ #define PROJECTSETTINGSPAGE 1 #define GLOBALSETTINGSPAGE 2 -#include "tdevplugininfo.h" +#include "kdevplugininfo.h" #include "config.h" -static const TDevPluginInfo data("tdevfilecreate"); +static const KDevPluginInfo data("kdevfilecreate"); -typedef TDevGenericFactory FileCreateFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevfilecreate, FileCreateFactory( data ) ) +typedef KDevGenericFactory FileCreateFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevfilecreate, FileCreateFactory( data ) ) using namespace FileCreate; FileCreatePart::FileCreatePart(TQObject *parent, const char *name, const TQStringList & ) -// : TDevCreateFile(&data, parent, name ? name : "FileCreatePart"), m_selectedWidget(-1), m_useSideTab(true), m_subPopups(0) - : TDevCreateFile(&data, parent, name ? name : "FileCreatePart"), m_subPopups(0) +// : KDevCreateFile(&data, parent, name ? name : "FileCreatePart"), m_selectedWidget(-1), m_useSideTab(true), m_subPopups(0) + : KDevCreateFile(&data, parent, name ? name : "FileCreatePart"), m_subPopups(0) { setInstance(FileCreateFactory::instance()); - setXMLFile("tdevpart_filecreate.rc"); + setXMLFile("kdevpart_filecreate.rc"); connect( core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(slotProjectOpened()) ); connect( core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(slotProjectClosed()) ); @@ -179,10 +179,10 @@ void FileCreatePart::slotNewFilePopup( int pFileType ) } void FileCreatePart::slotNewFile() { - TDevCreateFile::CreatedFile createdFile = createNewFile(); - if (createdFile.status == TDevCreateFile::CreatedFile::STATUS_NOTCREATED) + KDevCreateFile::CreatedFile createdFile = createNewFile(); + if (createdFile.status == KDevCreateFile::CreatedFile::STATUS_NOTCREATED) KMessageBox::error(0, i18n("Cannot create file. Check whether the directory and filename are valid.")); - else if (createdFile.status != TDevCreateFile::CreatedFile::STATUS_CANCELED) + else if (createdFile.status != KDevCreateFile::CreatedFile::STATUS_CANCELED) openCreatedFile(createdFile); } @@ -209,7 +209,7 @@ void FileCreatePart::slotProjectClosed() { void FileCreatePart::slotFiletypeSelected(const FileType * filetype) { - TDevCreateFile::CreatedFile createdFile = createNewFile(filetype->ext(), + KDevCreateFile::CreatedFile createdFile = createNewFile(filetype->ext(), TQString(), TQString(), filetype->subtypeRef()); @@ -217,9 +217,9 @@ void FileCreatePart::slotFiletypeSelected(const FileType * filetype) { openCreatedFile(createdFile); } -void FileCreatePart::openCreatedFile(const TDevCreateFile::CreatedFile & createdFile) +void FileCreatePart::openCreatedFile(const KDevCreateFile::CreatedFile & createdFile) { - if ( createdFile.status == TDevCreateFile::CreatedFile::STATUS_OK ) + if ( createdFile.status == KDevCreateFile::CreatedFile::STATUS_OK ) { KURL uu( createdFile.dir + "/" + createdFile.filename ); partController()->editDocument ( uu ); @@ -228,7 +228,7 @@ void FileCreatePart::openCreatedFile(const TDevCreateFile::CreatedFile & created int FileCreatePart::readTypes(const TQDomDocument & dom, TQPtrList &m_filetypes, bool enable) { int numRead = 0; - TQDomElement fileTypes = DomUtil::elementByPath(dom,"/tdevfilecreate/filetypes"); + TQDomElement fileTypes = DomUtil::elementByPath(dom,"/kdevfilecreate/filetypes"); if (!fileTypes.isNull()) { for(TQDomNode node = fileTypes.firstChild();!node.isNull();node=node.nextSibling()) { @@ -324,16 +324,16 @@ FileType * FileCreatePart::getEnabledType(const TQString & ex, const TQString su return NULL; } -// TDevFileCreate interface +// KDevFileCreate interface -TDevCreateFile::CreatedFile FileCreatePart::createNewFile(TQString ext, TQString dir, TQString name, TQString subtype) +KDevCreateFile::CreatedFile FileCreatePart::createNewFile(TQString ext, TQString dir, TQString name, TQString subtype) { - TDevCreateFile::CreatedFile result; + KDevCreateFile::CreatedFile result; KURL projectURL; if ( !project() ) { - //result.status = TDevCreateFile::CreatedFile::STATUS_NOTCREATED; + //result.status = KDevCreateFile::CreatedFile::STATUS_NOTCREATED; //return result; } else @@ -373,7 +373,7 @@ TDevCreateFile::CreatedFile FileCreatePart::createNewFile(TQString ext, TQString int dialogResult = dialog.exec(); if (dialogResult == KDialogBase::Rejected) { - result.status = TDevCreateFile::CreatedFile::STATUS_CANCELED; + result.status = KDevCreateFile::CreatedFile::STATUS_CANCELED; return result; } @@ -383,8 +383,8 @@ TDevCreateFile::CreatedFile FileCreatePart::createNewFile(TQString ext, TQString selectedURL = dialog.url(); const FileType *selectedFileType = dialog.selectedType(); - if (dialog.addToProject() && !projectURL.isParentOf(selectedURL) && !(project()->options() & TDevProject::UsesTQMakeBuildSystem) ) { - result.status = TDevCreateFile::CreatedFile::STATUS_NOTWITHINPROJECT; + if (dialog.addToProject() && !projectURL.isParentOf(selectedURL) && !(project()->options() & KDevProject::UsesTQMakeBuildSystem) ) { + result.status = KDevCreateFile::CreatedFile::STATUS_NOTWITHINPROJECT; return result; } @@ -416,7 +416,7 @@ TDevCreateFile::CreatedFile FileCreatePart::createNewFile(TQString ext, TQString } if (!created) { - result.status = TDevCreateFile::CreatedFile::STATUS_NOTCREATED; + result.status = KDevCreateFile::CreatedFile::STATUS_NOTCREATED; return result; } @@ -425,7 +425,7 @@ TDevCreateFile::CreatedFile FileCreatePart::createNewFile(TQString ext, TQString // work out the path relative to the project directory // TQString relToProj = URLUtil::relativePath(projectURL, selectedURL, URLUtil::SLASH_PREFIX ); TQString relToProj; - if( project()->options() & TDevProject::UsesTQMakeBuildSystem ) + if( project()->options() & KDevProject::UsesTQMakeBuildSystem ) { relToProj = URLUtil::relativePathToFile( project()->projectDirectory(), fullPath ); project()->addFile(relToProj); @@ -445,7 +445,7 @@ TDevCreateFile::CreatedFile FileCreatePart::createNewFile(TQString ext, TQString result.filename = fileName; result.dir = URLUtil::directory(fullPath); - result.status = TDevCreateFile::CreatedFile::STATUS_OK; + result.status = KDevCreateFile::CreatedFile::STATUS_OK; return result; } @@ -464,7 +464,7 @@ void FileCreatePart::slotInitialize( ) // read in which global templates are to be used for this project TQDomElement useGlobalTypes = - DomUtil::elementByPath(*projectDom(),"/tdevfilecreate/useglobaltypes"); + DomUtil::elementByPath(*projectDom(),"/kdevfilecreate/useglobaltypes"); for(TQDomNode node = useGlobalTypes.firstChild(); !node.isNull();node=node.nextSibling()) { @@ -524,7 +524,7 @@ TQString FileCreatePart::findGlobalXMLFile() const { int version = 0; TQString filename; - TQStringList filenames = TDEGlobal::instance()->dirs()->findAllResources("data", "tdevfilecreate/template-info.xml"); + TQStringList filenames = TDEGlobal::instance()->dirs()->findAllResources("data", "kdevfilecreate/template-info.xml"); for( TQStringList::const_iterator it = filenames.begin(); it != filenames.end(); ++it ) { TQDomDocument globalDom; diff --git a/parts/filecreate/filecreate_part.h b/parts/filecreate/filecreate_part.h index 0b6e5a01..9d090493 100644 --- a/parts/filecreate/filecreate_part.h +++ b/parts/filecreate/filecreate_part.h @@ -10,16 +10,16 @@ -#ifndef __TDEVPART_FILECREATE_H__ -#define __TDEVPART_FILECREATE_H__ +#ifndef __KDEVPART_FILECREATE_H__ +#define __KDEVPART_FILECREATE_H__ #include #include #include -#include -#include +#include +#include #include "filecreate_typechooser.h" @@ -36,7 +36,7 @@ class ConfigWidgetProxy; using namespace FileCreate; -class FileCreatePart : public TDevCreateFile +class FileCreatePart : public KDevCreateFile { Q_OBJECT @@ -57,7 +57,7 @@ public: * The user will be prompted as necessary for the missing information, and the * file created, and added to the project as necessary. */ - virtual TDevCreateFile::CreatedFile createNewFile(TQString ext = TQString(), + virtual KDevCreateFile::CreatedFile createNewFile(TQString ext = TQString(), TQString dir = TQString(), TQString name = TQString(), TQString subtype = TQString()); @@ -106,7 +106,7 @@ private: /** * If a file has been successfully created, open it */ - void openCreatedFile(const TDevCreateFile::CreatedFile & createdFile); + void openCreatedFile(const KDevCreateFile::CreatedFile & createdFile); /** * Reads in file type definitions from a config DOM and adds them diff --git a/parts/filecreate/filecreate_widget2.cpp b/parts/filecreate/filecreate_widget2.cpp index d57fbf48..4638725c 100644 --- a/parts/filecreate/filecreate_widget2.cpp +++ b/parts/filecreate/filecreate_widget2.cpp @@ -19,9 +19,9 @@ #include #include -#include +#include -#include "tdevproject.h" +#include "kdevproject.h" #include "filecreate_part.h" #include "filecreate_widget2.h" #include "filecreate_filetype.h" diff --git a/parts/filecreate/filecreate_widget2.h b/parts/filecreate/filecreate_widget2.h index 3e4df801..217d37ce 100644 --- a/parts/filecreate/filecreate_widget2.h +++ b/parts/filecreate/filecreate_widget2.h @@ -21,7 +21,7 @@ #include "filecreate_typechooser.h" class TDEIconLoader; -class TDevProject; +class KDevProject; class FileCreatePart; namespace FileCreate { diff --git a/parts/filecreate/filecreate_widget3.cpp b/parts/filecreate/filecreate_widget3.cpp index e541038c..caf1ac74 100644 --- a/parts/filecreate/filecreate_widget3.cpp +++ b/parts/filecreate/filecreate_widget3.cpp @@ -18,11 +18,11 @@ #include #include #include -#include +#include #include "filecreate_widget3.h" -#include "tdevproject.h" +#include "kdevproject.h" #include "filecreate_part.h" #include "filecreate_filetype.h" #include "filecreate_listitem.h" @@ -30,7 +30,7 @@ namespace FileCreate { ListWidget::ListWidget(FileCreatePart *part) - : TDEListView(0, "TDevFileCreate"), TypeChooser(part) + : TDEListView(0, "KDevFileCreate"), TypeChooser(part) { setIcon( SmallIcon("filenew2") ); setCaption(i18n("File Create")); diff --git a/parts/filecreate/filecreate_widget3.h b/parts/filecreate/filecreate_widget3.h index 244bf78d..ac8b866e 100644 --- a/parts/filecreate/filecreate_widget3.h +++ b/parts/filecreate/filecreate_widget3.h @@ -19,7 +19,7 @@ #include "filecreate_typechooser.h" -class TDevProject; +class KDevProject; class FileCreatePart; class TQResizeEvent; diff --git a/parts/filecreate/kdevfilecreate.desktop b/parts/filecreate/kdevfilecreate.desktop new file mode 100644 index 00000000..1861090d --- /dev/null +++ b/parts/filecreate/kdevfilecreate.desktop @@ -0,0 +1,77 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=FileCreate +Comment[ca]=Creació de fitxers +Comment[da]=Filoprettelse +Comment[de]=Eine Komponente, die Unterstützung bei der Erstellung von Dateien bietet +Comment[el]=ΔημιουργίαΑρχείου +Comment[es]=Creación de archivos +Comment[eu]=Fitxategi sorkuntza +Comment[fa]=ایجاد پرونده +Comment[fr]=Création de fichiers +Comment[hi]=फ़ाइल-क्रिएट +Comment[hu]=Fájl létrehozása +Comment[it]=Crea file +Comment[ja]=ファイル作成 +Comment[ms]=CiptaFail +Comment[nds]=Dateiopstellen +Comment[ne]=फाइल सिर्जना +Comment[nl]=Bestand aanmaken +Comment[pl]=Tworzenie pliku +Comment[pt]=Criação de Ficheiros +Comment[ru]=Мастер создания файлов +Comment[sk]=Vytvoriť súbor +Comment[sl]=Ustvarjanje datotek +Comment[sr]=Направи фајл +Comment[sr@Latn]=Napravi fajl +Comment[sv]=Skapa filer +Comment[ta]= கோப்பு உருவாக்கப்பட்டது +Comment[tg]=Устои бунёд кардани файлҳо +Comment[zh_CN]=文件创建 +Comment[zh_TW]=檔案建立 +Name=KDevFileCreate +Name[da]=TDevelop filoprettelse +Name[de]=Dateierstellungs-Komponente (TDevelop) +Name[hi]=के-डेव-फ़ाइल-क्रिएट +Name[nds]=TDevelop-Dateiopstellen +Name[pl]=KDevTworzeniePliku +Name[sk]=KDev vytvoriť súbor +Name[sv]=TDevelop skapa filer +Name[ta]=KDev உருவாக்கப்பட்ட கோப்பு +Name[tg]=Сохткунандаи KDev +Name[zh_TW]=TDevelop 檔案建立 +GenericName=FileCreate +GenericName[ca]=Creació de fitxers +GenericName[da]=Filoprettelse +GenericName[de]=Dateierstellungs-Komponente +GenericName[el]=ΔημιουργίαΑρχείου +GenericName[es]=Creación de archivos +GenericName[eu]=Fitxategi sorkuntza +GenericName[fa]=ایجاد پرونده +GenericName[hi]=फ़ाइल-क्रिएट +GenericName[hu]=Fájl létrehozása +GenericName[it]=Crea file +GenericName[ja]=ファイル作成 +GenericName[ms]=CiptaFail +GenericName[nds]=Dateiopstellen +GenericName[ne]=फाइल सिर्जना +GenericName[nl]=Bestand aanmaken +GenericName[pl]=Tworzenie pliku +GenericName[pt]=Criação de Ficheiros +GenericName[ru]=Мастер создания файлов +GenericName[sk]=Vytvoriť súbor +GenericName[sl]=Ustvarjanje datotek +GenericName[sr]=Направи фајл +GenericName[sr@Latn]=Napravi fajl +GenericName[sv]=Skapa filer +GenericName[ta]=கோப்பு உருவாக்கம் +GenericName[tg]=Устои бунёд кардани файлҳо +GenericName[zh_CN]=文件创建 +GenericName[zh_TW]=檔案建立 +Icon=wizard +ServiceTypes=TDevelop/CreateFile +X-TDE-Library=libkdevfilecreate +X-TDevelop-Version=5 +X-TDevelop-Properties=FileCreation +X-TDevelop-Scope=Core diff --git a/parts/filecreate/kdevpart_filecreate.rc b/parts/filecreate/kdevpart_filecreate.rc new file mode 100644 index 00000000..401a1378 --- /dev/null +++ b/parts/filecreate/kdevpart_filecreate.rc @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/parts/filecreate/tdevfilecreate.desktop b/parts/filecreate/tdevfilecreate.desktop deleted file mode 100644 index d9accc3c..00000000 --- a/parts/filecreate/tdevfilecreate.desktop +++ /dev/null @@ -1,77 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=FileCreate -Comment[ca]=Creació de fitxers -Comment[da]=Filoprettelse -Comment[de]=Eine Komponente, die Unterstützung bei der Erstellung von Dateien bietet -Comment[el]=ΔημιουργίαΑρχείου -Comment[es]=Creación de archivos -Comment[eu]=Fitxategi sorkuntza -Comment[fa]=ایجاد پرونده -Comment[fr]=Création de fichiers -Comment[hi]=फ़ाइल-क्रिएट -Comment[hu]=Fájl létrehozása -Comment[it]=Crea file -Comment[ja]=ファイル作成 -Comment[ms]=CiptaFail -Comment[nds]=Dateiopstellen -Comment[ne]=फाइल सिर्जना -Comment[nl]=Bestand aanmaken -Comment[pl]=Tworzenie pliku -Comment[pt]=Criação de Ficheiros -Comment[ru]=Мастер создания файлов -Comment[sk]=Vytvoriť súbor -Comment[sl]=Ustvarjanje datotek -Comment[sr]=Направи фајл -Comment[sr@Latn]=Napravi fajl -Comment[sv]=Skapa filer -Comment[ta]= கோப்பு உருவாக்கப்பட்டது -Comment[tg]=Устои бунёд кардани файлҳо -Comment[zh_CN]=文件创建 -Comment[zh_TW]=檔案建立 -Name=TDevFileCreate -Name[da]=TDevelop filoprettelse -Name[de]=Dateierstellungs-Komponente (TDevelop) -Name[hi]=के-डेव-फ़ाइल-क्रिएट -Name[nds]=TDevelop-Dateiopstellen -Name[pl]=KDevTworzeniePliku -Name[sk]=KDev vytvoriť súbor -Name[sv]=TDevelop skapa filer -Name[ta]=KDev உருவாக்கப்பட்ட கோப்பு -Name[tg]=Сохткунандаи KDev -Name[zh_TW]=TDevelop 檔案建立 -GenericName=FileCreate -GenericName[ca]=Creació de fitxers -GenericName[da]=Filoprettelse -GenericName[de]=Dateierstellungs-Komponente -GenericName[el]=ΔημιουργίαΑρχείου -GenericName[es]=Creación de archivos -GenericName[eu]=Fitxategi sorkuntza -GenericName[fa]=ایجاد پرونده -GenericName[hi]=फ़ाइल-क्रिएट -GenericName[hu]=Fájl létrehozása -GenericName[it]=Crea file -GenericName[ja]=ファイル作成 -GenericName[ms]=CiptaFail -GenericName[nds]=Dateiopstellen -GenericName[ne]=फाइल सिर्जना -GenericName[nl]=Bestand aanmaken -GenericName[pl]=Tworzenie pliku -GenericName[pt]=Criação de Ficheiros -GenericName[ru]=Мастер создания файлов -GenericName[sk]=Vytvoriť súbor -GenericName[sl]=Ustvarjanje datotek -GenericName[sr]=Направи фајл -GenericName[sr@Latn]=Napravi fajl -GenericName[sv]=Skapa filer -GenericName[ta]=கோப்பு உருவாக்கம் -GenericName[tg]=Устои бунёд кардани файлҳо -GenericName[zh_CN]=文件创建 -GenericName[zh_TW]=檔案建立 -Icon=wizard -ServiceTypes=TDevelop/CreateFile -X-TDE-Library=libtdevfilecreate -X-TDevelop-Version=5 -X-TDevelop-Properties=FileCreation -X-TDevelop-Scope=Core diff --git a/parts/filecreate/tdevpart_filecreate.rc b/parts/filecreate/tdevpart_filecreate.rc deleted file mode 100644 index 09a293ee..00000000 --- a/parts/filecreate/tdevpart_filecreate.rc +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/parts/filecreate/template-info.xml b/parts/filecreate/template-info.xml index 9afd9825..664fa376 100644 --- a/parts/filecreate/template-info.xml +++ b/parts/filecreate/template-info.xml @@ -1,6 +1,6 @@ - + @@ -177,5 +177,5 @@ A new empty Qt Linguist translation source file. - + diff --git a/parts/filelist/CMakeLists.txt b/parts/filelist/CMakeLists.txt index 7feb3ae1..ac227b5e 100644 --- a/parts/filelist/CMakeLists.txt +++ b/parts/filelist/CMakeLists.txt @@ -26,13 +26,13 @@ link_directories( ##### other data ################################ -install( FILES tdevfilelist.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevfilelist.rc DESTINATION ${DATA_INSTALL_DIR}/tdevfilelist ) +install( FILES kdevfilelist.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevfilelist.rc DESTINATION ${DATA_INSTALL_DIR}/kdevfilelist ) -##### libtdevfilelist (module) ################## +##### libkdevfilelist (module) ################## -tde_add_kpart( libtdevfilelist AUTOMOC +tde_add_kpart( libkdevfilelist AUTOMOC SOURCES filelist_widget.cpp filelist_item.cpp projectviewprojectconfigbase.ui diff --git a/parts/filelist/Makefile.am b/parts/filelist/Makefile.am index 8652a240..83e36d19 100644 --- a/parts/filelist/Makefile.am +++ b/parts/filelist/Makefile.am @@ -1,20 +1,20 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevfilelist.la -libtdevfilelist_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevfilelist_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevfilelist.la +libkdevfilelist_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevfilelist_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevfilelist_la_SOURCES = filelist_widget.cpp filelist_item.cpp \ +libkdevfilelist_la_SOURCES = filelist_widget.cpp filelist_item.cpp \ projectviewprojectconfigbase.ui projectviewprojectconfig.cpp projectviewpart.cpp toolbarguibuilder.cpp \ projectviewconfigbase.ui projectviewconfig.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevfilelist.desktop +service_DATA = kdevfilelist.desktop -rcdir = $(kde_datadir)/tdevfilelist +rcdir = $(kde_datadir)/kdevfilelist noinst_HEADERS = filelist_item.h filelist_widget.h projectviewprojectconfig.h \ projectviewpart.h toolbarguibuilder.h projectviewconfig.h fileinfo.h -rc_DATA = tdevfilelist.rc +rc_DATA = kdevfilelist.rc diff --git a/parts/filelist/filelist_item.h b/parts/filelist/filelist_item.h index 2d9322c9..6b88b09e 100644 --- a/parts/filelist/filelist_item.h +++ b/parts/filelist/filelist_item.h @@ -18,7 +18,7 @@ #include -#include +#include class FileListItem : public TQListViewItem { diff --git a/parts/filelist/filelist_widget.cpp b/parts/filelist/filelist_widget.cpp index 4b0b2b48..2e415dcd 100644 --- a/parts/filelist/filelist_widget.cpp +++ b/parts/filelist/filelist_widget.cpp @@ -21,8 +21,8 @@ #include #include -#include -#include +#include +#include #include "projectviewpart.h" #include "filelist_widget.h" diff --git a/parts/filelist/filelist_widget.h b/parts/filelist/filelist_widget.h index f1b4de97..b582a309 100644 --- a/parts/filelist/filelist_widget.h +++ b/parts/filelist/filelist_widget.h @@ -17,7 +17,7 @@ #include #include -#include // for DocumentState +#include // for DocumentState #include #include @@ -25,7 +25,7 @@ #include "projectviewpart.h" -class TDevProject; +class KDevProject; class FileListItem; namespace KParts { class Part; } diff --git a/parts/filelist/kdevfilelist.desktop b/parts/filelist/kdevfilelist.desktop new file mode 100644 index 00000000..da37f14b --- /dev/null +++ b/parts/filelist/kdevfilelist.desktop @@ -0,0 +1,76 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Provides a list of all currently open files. (Handy when the tab bar is not quite wide enough.) +Comment[ca]=Proporciona una llista de tots els fitxers oberts actualment. (Útil quan la barra de pestanyes no és suficientment ample) +Comment[da]=Sørger for en liste over alle filer der er åbne. (Praktisk når tab-linjen ikke er helt bred nok.) +Comment[de]=Stellt eine Liste aller offenen Dateien bereit. +Comment[el]=Προσφέρει μια λίστα των τρέχων ανοιγμένων αρχείων. (Χρήσιμο όταν η γραμμή καρτελών δεν είναι αρκετά πλατιά.) +Comment[es]=Proporciona una lista de los archivos abiertos actualmente (útil cuando la barra de pestañas no es lo suficientemente ancha). +Comment[et]=Näitab kõiki parajasti avatud faile (mugav, kui kaardiriba ei ole piisavalt lai). +Comment[eu]=Uneko irekitako fitxategien zerrenda eskeintzen du. (Erabilgarria fitxa-barra behar den bezain zabala ez bada) +Comment[fa]=فهرستی از همۀ پرونده‌های باز جاری را فراهم می‌کند. )دستی هنگامی که میله ابزار پهنای کافی نداشته باشد.( +Comment[fr]=Fournit une liste de tous les fichiers actuellement ouverts. (Pratique lorsque la barre d'onglets n'est plus assez large.) +Comment[gl]=Proporciona unha lista de tódolos ficheiros abertos actualmente. (Útil cando a barra de pestañas non é suficientemente ancha.) +Comment[hu]=Kilistázza a nyitott fájlokat. (Jól jöhet, ha a lapozósáv nem elég széles.) +Comment[it]=Fornisce una lista di tutti i file aperti correntemente. (Utile quando la barra delle schede non è sufficientemente larga.) +Comment[ja]=現在開かれているファイルのリストを提供します。(タブバーが十分広くない場合に便利です) +Comment[ms]=Menyediakan senarai semua fail yang sedang dibuka. (Berguna apabila bar tab tidak cukup lebar.) +Comment[nds]=Stellt en List vun all apen Dateien praat. (Goot, wenn de Paneelbalken nich wiet noog is.) +Comment[ne]=हालै खुला फाइलको सूची प्रदान गर्दछ (ट्याब बार पर्याप्त चौडा नहुदा सजिलो हुन्छ) +Comment[nl]=Geeft een lijst van alle open bestanden. (Handig als de tabbalk niet breed genoeg is.) +Comment[pl]=Pokazuje listę obecnie otwartych plików (przydaje się, gdy pasek kart nie mieści wszystkich) +Comment[pt]=Fornece uma lista de todos os ficheiros actualmente aberto. (Útil quando a barra de página não é suficientemente larga.) +Comment[pt_BR]=Fornece uma lista de todos os arquivos atualmente abertos (acessível quando a barra de abas não for larga o suficiente). +Comment[ru]=Список открытых в данных момент файлов (полезно, когда они не помещаются на панели вкладок). +Comment[sk]=Poskytne zoznam všetkých aktuálne otvorených súborov. (Užitočné keď panel kariet nie je dostatočne široký.) +Comment[sr]=Даје листу свих отворених фајлова. (Згодно кад трака са језичцима није довољно дугачка.) +Comment[sr@Latn]=Daje listu svih otvorenih fajlova. (Zgodno kad traka sa jezičcima nije dovoljno dugačka.) +Comment[sv]=Tillhandahåller en lista av alla för närvarande öppna filer. (Praktiskt när flikraden inte är riktigt bred nog.) +Comment[ta]=தற்போது திறக்கப்பட்ட கோப்புகளின் பட்டியலை வழங்குகிறது. (தத்தல் போதுமான வசதியை வழங்க இயலாத பொழுது) +Comment[tg]=Рӯйхати кушодашудагиҳои ҳозир будаи файлҳо (вақте ки онҳо дар панелмонӣ омехта намешаванд, фоидаовар аст.) +Comment[tr]=Bütün açık dosyaların bir listesini sunar. (Sekme çubuğu yeteri kadar geniş olmadığında işe yarar) +Comment[zh_CN]=提供目前已打开全部文件的列表。(当标签栏不够宽时非常实用。) +Comment[zh_TW]=提供目前開啟檔案的列表。 +Name=KDevfilelist +Name[da]=TDevelop filliste +Name[nds]=TDevelop-Dateilist +Name[pt_BR]=Lista de arq. do KDev +Name[sk]=KDev zoznam súborov +Name[sv]=TDevelop fillista +Name[ta]=KDev கோப்புக்காட்சி +Name[tg]=Рӯйхати файли KDev +Name[zh_TW]=TDevelop 檔案列表 +GenericName=FileList +GenericName[br]=Roll restr +GenericName[da]=Filliste +GenericName[de]=Dateiliste +GenericName[el]=ΛίσταΑρχείων +GenericName[eu]=Fitxategi zerrenda +GenericName[fa]=فهرست پرونده +GenericName[hu]=Fájllista +GenericName[it]=ListaFile +GenericName[ja]=ファイルリスト +GenericName[ms]=SenaraiFail +GenericName[nds]=Dateilist +GenericName[ne]=फाइल सूची +GenericName[nl]=Bestandenlijst +GenericName[pl]=Lista plików +GenericName[pt]=Lista de Ficheiros +GenericName[pt_BR]=Lista de Arquivos +GenericName[ru]=Список файлов +GenericName[sk]=Zoznam súborov +GenericName[sl]=Seznam datotek +GenericName[sr]=Листа фајлова +GenericName[sr@Latn]=Lista fajlova +GenericName[sv]=Fillista +GenericName[ta]=கோப்புப் பட்டியல் +GenericName[tg]=Рӯйхати файлҳо +GenericName[zh_CN]=文件列表 +GenericName[zh_TW]=檔案列表 +Icon=tdevelop +ServiceTypes=TDevelop/Plugin +X-TDevelop-Scope=Global +X-TDE-Library=libkdevfilelist +X-TDevelop-Version=5 +X-TDevelop-Properties=OpenFileNavigation diff --git a/parts/filelist/tdevfilelist.rc b/parts/filelist/kdevfilelist.rc similarity index 100% rename from parts/filelist/tdevfilelist.rc rename to parts/filelist/kdevfilelist.rc diff --git a/parts/filelist/projectviewpart.cpp b/parts/filelist/projectviewpart.cpp index 76f0c102..517d2f98 100644 --- a/parts/filelist/projectviewpart.cpp +++ b/parts/filelist/projectviewpart.cpp @@ -51,28 +51,28 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include -typedef TDevGenericFactory projectviewFactory; -TDevPluginInfo data("tdevfilelist"); -K_EXPORT_COMPONENT_FACTORY(libtdevfilelist, projectviewFactory(data)) +typedef KDevGenericFactory projectviewFactory; +KDevPluginInfo data("kdevfilelist"); +K_EXPORT_COMPONENT_FACTORY(libkdevfilelist, projectviewFactory(data)) #define GLOBALDOC_OPTIONS 1 #define PROJECTDOC_OPTIONS 2 ProjectviewPart::ProjectviewPart(TQObject *parent, const char *name, const TQStringList &/*args*/) - : TDevPlugin(&data, parent, name ? name : "FileListPart") + : KDevPlugin(&data, parent, name ? name : "FileListPart") { setInstance(projectviewFactory::instance()); - setXMLFile("tdevfilelist.rc"); + setXMLFile("kdevfilelist.rc"); setupActions(); m_configProxy = new ConfigWidgetProxy(core()); diff --git a/parts/filelist/projectviewpart.h b/parts/filelist/projectviewpart.h index 72c6efcd..392a9cdf 100644 --- a/parts/filelist/projectviewpart.h +++ b/parts/filelist/projectviewpart.h @@ -18,8 +18,8 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef TDEVPROJECTVIEW_H -#define TDEVPROJECTVIEW_H +#ifndef KDEVPROJECTVIEW_H +#define KDEVPROJECTVIEW_H #include "fileinfo.h" @@ -27,7 +27,7 @@ #include #include -#include +#include #include @@ -53,7 +53,7 @@ this is a reimplementation of the project views in Quanta @TODO save html parts too FIXME at project open I get the default view and the open files at last close */ -class ProjectviewPart: public TDevPlugin +class ProjectviewPart: public KDevPlugin { Q_OBJECT @@ -66,7 +66,7 @@ public: ProjectviewPart(TQObject *parent, const char *name, const TQStringList &args); ~ProjectviewPart(); - // reimplemented from TDevPlugin + // reimplemented from KDevPlugin void restorePartialProjectSession(const TQDomElement * el); void savePartialProjectSession(TQDomElement * el); diff --git a/parts/filelist/tdevfilelist.desktop b/parts/filelist/tdevfilelist.desktop deleted file mode 100644 index 17a20ad6..00000000 --- a/parts/filelist/tdevfilelist.desktop +++ /dev/null @@ -1,76 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Provides a list of all currently open files. (Handy when the tab bar is not quite wide enough.) -Comment[ca]=Proporciona una llista de tots els fitxers oberts actualment. (Útil quan la barra de pestanyes no és suficientment ample) -Comment[da]=Sørger for en liste over alle filer der er åbne. (Praktisk når tab-linjen ikke er helt bred nok.) -Comment[de]=Stellt eine Liste aller offenen Dateien bereit. -Comment[el]=Προσφέρει μια λίστα των τρέχων ανοιγμένων αρχείων. (Χρήσιμο όταν η γραμμή καρτελών δεν είναι αρκετά πλατιά.) -Comment[es]=Proporciona una lista de los archivos abiertos actualmente (útil cuando la barra de pestañas no es lo suficientemente ancha). -Comment[et]=Näitab kõiki parajasti avatud faile (mugav, kui kaardiriba ei ole piisavalt lai). -Comment[eu]=Uneko irekitako fitxategien zerrenda eskeintzen du. (Erabilgarria fitxa-barra behar den bezain zabala ez bada) -Comment[fa]=فهرستی از همۀ پرونده‌های باز جاری را فراهم می‌کند. )دستی هنگامی که میله ابزار پهنای کافی نداشته باشد.( -Comment[fr]=Fournit une liste de tous les fichiers actuellement ouverts. (Pratique lorsque la barre d'onglets n'est plus assez large.) -Comment[gl]=Proporciona unha lista de tódolos ficheiros abertos actualmente. (Útil cando a barra de pestañas non é suficientemente ancha.) -Comment[hu]=Kilistázza a nyitott fájlokat. (Jól jöhet, ha a lapozósáv nem elég széles.) -Comment[it]=Fornisce una lista di tutti i file aperti correntemente. (Utile quando la barra delle schede non è sufficientemente larga.) -Comment[ja]=現在開かれているファイルのリストを提供します。(タブバーが十分広くない場合に便利です) -Comment[ms]=Menyediakan senarai semua fail yang sedang dibuka. (Berguna apabila bar tab tidak cukup lebar.) -Comment[nds]=Stellt en List vun all apen Dateien praat. (Goot, wenn de Paneelbalken nich wiet noog is.) -Comment[ne]=हालै खुला फाइलको सूची प्रदान गर्दछ (ट्याब बार पर्याप्त चौडा नहुदा सजिलो हुन्छ) -Comment[nl]=Geeft een lijst van alle open bestanden. (Handig als de tabbalk niet breed genoeg is.) -Comment[pl]=Pokazuje listę obecnie otwartych plików (przydaje się, gdy pasek kart nie mieści wszystkich) -Comment[pt]=Fornece uma lista de todos os ficheiros actualmente aberto. (Útil quando a barra de página não é suficientemente larga.) -Comment[pt_BR]=Fornece uma lista de todos os arquivos atualmente abertos (acessível quando a barra de abas não for larga o suficiente). -Comment[ru]=Список открытых в данных момент файлов (полезно, когда они не помещаются на панели вкладок). -Comment[sk]=Poskytne zoznam všetkých aktuálne otvorených súborov. (Užitočné keď panel kariet nie je dostatočne široký.) -Comment[sr]=Даје листу свих отворених фајлова. (Згодно кад трака са језичцима није довољно дугачка.) -Comment[sr@Latn]=Daje listu svih otvorenih fajlova. (Zgodno kad traka sa jezičcima nije dovoljno dugačka.) -Comment[sv]=Tillhandahåller en lista av alla för närvarande öppna filer. (Praktiskt när flikraden inte är riktigt bred nog.) -Comment[ta]=தற்போது திறக்கப்பட்ட கோப்புகளின் பட்டியலை வழங்குகிறது. (தத்தல் போதுமான வசதியை வழங்க இயலாத பொழுது) -Comment[tg]=Рӯйхати кушодашудагиҳои ҳозир будаи файлҳо (вақте ки онҳо дар панелмонӣ омехта намешаванд, фоидаовар аст.) -Comment[tr]=Bütün açık dosyaların bir listesini sunar. (Sekme çubuğu yeteri kadar geniş olmadığında işe yarar) -Comment[zh_CN]=提供目前已打开全部文件的列表。(当标签栏不够宽时非常实用。) -Comment[zh_TW]=提供目前開啟檔案的列表。 -Name=KDevfilelist -Name[da]=TDevelop filliste -Name[nds]=TDevelop-Dateilist -Name[pt_BR]=Lista de arq. do KDev -Name[sk]=KDev zoznam súborov -Name[sv]=TDevelop fillista -Name[ta]=KDev கோப்புக்காட்சி -Name[tg]=Рӯйхати файли KDev -Name[zh_TW]=TDevelop 檔案列表 -GenericName=FileList -GenericName[br]=Roll restr -GenericName[da]=Filliste -GenericName[de]=Dateiliste -GenericName[el]=ΛίσταΑρχείων -GenericName[eu]=Fitxategi zerrenda -GenericName[fa]=فهرست پرونده -GenericName[hu]=Fájllista -GenericName[it]=ListaFile -GenericName[ja]=ファイルリスト -GenericName[ms]=SenaraiFail -GenericName[nds]=Dateilist -GenericName[ne]=फाइल सूची -GenericName[nl]=Bestandenlijst -GenericName[pl]=Lista plików -GenericName[pt]=Lista de Ficheiros -GenericName[pt_BR]=Lista de Arquivos -GenericName[ru]=Список файлов -GenericName[sk]=Zoznam súborov -GenericName[sl]=Seznam datotek -GenericName[sr]=Листа фајлова -GenericName[sr@Latn]=Lista fajlova -GenericName[sv]=Fillista -GenericName[ta]=கோப்புப் பட்டியல் -GenericName[tg]=Рӯйхати файлҳо -GenericName[zh_CN]=文件列表 -GenericName[zh_TW]=檔案列表 -Icon=tdevelop -ServiceTypes=TDevelop/Plugin -X-TDevelop-Scope=Global -X-TDE-Library=libtdevfilelist -X-TDevelop-Version=5 -X-TDevelop-Properties=OpenFileNavigation diff --git a/parts/fileselector/CMakeLists.txt b/parts/fileselector/CMakeLists.txt index b310f791..8f18792e 100644 --- a/parts/fileselector/CMakeLists.txt +++ b/parts/fileselector/CMakeLists.txt @@ -27,12 +27,12 @@ link_directories( ##### other data ################################ -install( FILES tdevfileselector.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevfileselector.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevfileselector (module) ############## +##### libkdevfileselector (module) ############## -tde_add_kpart( libtdevfileselector AUTOMOC +tde_add_kpart( libkdevfileselector AUTOMOC SOURCES fileselector_part.cpp fileselector_widget.cpp tdeactionselector.cpp kbookmarkhandler.cpp diff --git a/parts/fileselector/Makefile.am b/parts/fileselector/Makefile.am index 43ee404b..f0c2fc35 100644 --- a/parts/fileselector/Makefile.am +++ b/parts/fileselector/Makefile.am @@ -2,17 +2,17 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util -I$(top_srcdir)/lib/sourceinfo $(all_includes) -kde_module_LTLIBRARIES = libtdevfileselector.la -libtdevfileselector_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevfileselector_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevfileselector.la +libkdevfileselector_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevfileselector_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevfileselector_la_SOURCES = fileselector_part.cpp fileselector_widget.cpp tdeactionselector.cpp kbookmarkhandler.cpp +libkdevfileselector_la_SOURCES = fileselector_part.cpp fileselector_widget.cpp tdeactionselector.cpp kbookmarkhandler.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevfileselector.desktop +service_DATA = kdevfileselector.desktop # not used currently -#rcdir = $(kde_datadir)/tdevfileselector -#rc_DATA = tdevfileselector.rc +#rcdir = $(kde_datadir)/kdevfileselector +#rc_DATA = kdevfileselector.rc diff --git a/parts/fileselector/fileselector_part.cpp b/parts/fileselector/fileselector_part.cpp index 331bb639..a6b4a6bb 100644 --- a/parts/fileselector/fileselector_part.cpp +++ b/parts/fileselector/fileselector_part.cpp @@ -13,33 +13,33 @@ #include #include #include -#include +#include #include #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include "fileselector_widget.h" -typedef TDevGenericFactory FileSelectorFactory; -static const TDevPluginInfo data("tdevfileselector"); -K_EXPORT_COMPONENT_FACTORY( libtdevfileselector, FileSelectorFactory( data ) ) +typedef KDevGenericFactory FileSelectorFactory; +static const KDevPluginInfo data("kdevfileselector"); +K_EXPORT_COMPONENT_FACTORY( libkdevfileselector, FileSelectorFactory( data ) ) FileSelectorPart::FileSelectorPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin(&data, parent, name ? name : "FileSelectorPart") + : KDevPlugin(&data, parent, name ? name : "FileSelectorPart") { setInstance(FileSelectorFactory::instance()); - m_filetree = new TDevFileSelector( this, mainWindow(), partController(), 0, "fileselectorwidget" ); + m_filetree = new KDevFileSelector( this, mainWindow(), partController(), 0, "fileselectorwidget" ); connect( m_filetree->dirOperator(), TQT_SIGNAL(fileSelected(const KFileItem*)), this, TQT_SLOT(fileSelected(const KFileItem*))); @@ -63,7 +63,7 @@ FileSelectorPart::~FileSelectorPart() mainWindow()->removeView( m_filetree ); } - delete (TDevFileSelector*) m_filetree; + delete (KDevFileSelector*) m_filetree; } void FileSelectorPart::fileSelected( const KFileItem * file ) @@ -90,14 +90,14 @@ void FileSelectorPart::slotConfigWidget( KDialogBase * dlg ) void FileSelectorPart::newFile() { - TDevCreateFile *creator = extension("TDevelop/CreateFile"); + KDevCreateFile *creator = extension("TDevelop/CreateFile"); if (creator) { - TDevCreateFile::CreatedFile file = creator->createNewFile("", + KDevCreateFile::CreatedFile file = creator->createNewFile("", m_filetree->dirOperator()->url().path()); - if (file.status == TDevCreateFile::CreatedFile::STATUS_NOTCREATED) + if (file.status == KDevCreateFile::CreatedFile::STATUS_NOTCREATED) KMessageBox::error(0, i18n("Cannot create file. Check whether the directory and filename are valid.")); - else if (file.status != TDevCreateFile::CreatedFile::STATUS_CANCELED) + else if (file.status != KDevCreateFile::CreatedFile::STATUS_CANCELED) { partController()->editDocument(KURL::fromPathOrURL( file.dir + "/" + file.filename)); diff --git a/parts/fileselector/fileselector_part.h b/parts/fileselector/fileselector_part.h index 80841deb..f415444d 100644 --- a/parts/fileselector/fileselector_part.h +++ b/parts/fileselector/fileselector_part.h @@ -1,17 +1,17 @@ -#ifndef __TDEVPART_FILESELECTOR_H__ -#define __TDEVPART_FILESELECTOR_H__ +#ifndef __KDEVPART_FILESELECTOR_H__ +#define __KDEVPART_FILESELECTOR_H__ -#include +#include #include #include #include -class TDevFileSelector; +class KDevFileSelector; class KDialogBase; -class FileSelectorPart : public TDevPlugin +class FileSelectorPart : public KDevPlugin { Q_OBJECT @@ -33,7 +33,7 @@ private slots: void slotConfigWidget( KDialogBase * ); private: - TQGuardedPtr m_filetree; + TQGuardedPtr m_filetree; TDEAction *m_newFileAction; }; diff --git a/parts/fileselector/fileselector_widget.cpp b/parts/fileselector/fileselector_widget.cpp index 1d6fb154..894bf185 100644 --- a/parts/fileselector/fileselector_widget.cpp +++ b/parts/fileselector/fileselector_widget.cpp @@ -26,9 +26,9 @@ #include "tdeactionselector.h" #include "kbookmarkhandler.h" -#include -#include -#include +#include +#include +#include #include #include @@ -76,32 +76,32 @@ static void silenceTQToolBar(TQtMsgType, const char *) {} -TDevFileSelectorToolBar::TDevFileSelectorToolBar(TQWidget *parent) +KDevFileSelectorToolBar::KDevFileSelectorToolBar(TQWidget *parent) : TDEToolBar( parent, "KDev FileSelector Toolbar", true ) { setMinimumWidth(10); } -TDevFileSelectorToolBar::~TDevFileSelectorToolBar() +KDevFileSelectorToolBar::~KDevFileSelectorToolBar() {} -void TDevFileSelectorToolBar::setMovingEnabled( bool) +void KDevFileSelectorToolBar::setMovingEnabled( bool) { TDEToolBar::setMovingEnabled(false); } -TDevFileSelectorToolBarParent::TDevFileSelectorToolBarParent(TQWidget *parent) +KDevFileSelectorToolBarParent::KDevFileSelectorToolBarParent(TQWidget *parent) :TQFrame(parent),m_tb(0) {} -TDevFileSelectorToolBarParent::~TDevFileSelectorToolBarParent() +KDevFileSelectorToolBarParent::~KDevFileSelectorToolBarParent() {} -void TDevFileSelectorToolBarParent::setToolBar(TDevFileSelectorToolBar *tb) +void KDevFileSelectorToolBarParent::setToolBar(KDevFileSelectorToolBar *tb) { m_tb=tb; } -void TDevFileSelectorToolBarParent::resizeEvent ( TQResizeEvent * ) +void KDevFileSelectorToolBarParent::resizeEvent ( TQResizeEvent * ) { if (m_tb) { @@ -113,8 +113,8 @@ void TDevFileSelectorToolBarParent::resizeEvent ( TQResizeEvent * ) //BEGIN Constructor/destructor -TDevFileSelector::TDevFileSelector( FileSelectorPart *part, TDevMainWindow *mainWindow, - TDevPartController *partController, +KDevFileSelector::KDevFileSelector( FileSelectorPart *part, KDevMainWindow *mainWindow, + KDevPartController *partController, TQWidget * parent, const char * name ) : TQWidget(parent, name), m_part(part), @@ -127,8 +127,8 @@ TDevFileSelector::TDevFileSelector( FileSelectorPart *part, TDevMainWindow *main TQtMsgHandler oldHandler = tqInstallMsgHandler( silenceTQToolBar ); - TDevFileSelectorToolBarParent *tbp=new TDevFileSelectorToolBarParent(this); - toolbar = new TDevFileSelectorToolBar(tbp); + KDevFileSelectorToolBarParent *tbp=new KDevFileSelectorToolBarParent(this); + toolbar = new KDevFileSelectorToolBar(tbp); tbp->setToolBar(toolbar); lo->addWidget(tbp); toolbar->setMovingEnabled(false); @@ -142,7 +142,7 @@ TDevFileSelector::TDevFileSelector( FileSelectorPart *part, TDevMainWindow *main lo->addWidget(cmbPath); cmbPath->listBox()->installEventFilter( this ); - dir = new TDevDirOperator(m_part, KURL(), this, "operator"); + dir = new KDevDirOperator(m_part, KURL(), this, "operator"); dir->setView(KFile::/*Simple*/Detail); TDEActionCollection *coll = dir->actionCollection(); @@ -229,7 +229,7 @@ TDevFileSelector::TDevFileSelector( FileSelectorPart *part, TDevMainWindow *main "reapplies the last filter used when toggled on.") ); } -TDevFileSelector::~TDevFileSelector() +KDevFileSelector::~KDevFileSelector() { writeConfig( m_part->instance()->config(), "fileselector" ); } @@ -237,7 +237,7 @@ TDevFileSelector::~TDevFileSelector() //BEGIN Public Methods -void TDevFileSelector::readConfig(TDEConfig *config, const TQString & name) +void KDevFileSelector::readConfig(TDEConfig *config, const TQString & name) { dir->readConfig(config, name + ":dir"); dir->setView( KFile::Default ); @@ -283,12 +283,12 @@ void TDevFileSelector::readConfig(TDEConfig *config, const TQString & name) } -void TDevFileSelector::initialDirChangeHack() +void KDevFileSelector::initialDirChangeHack() { setDir( waitingDir ); } -void TDevFileSelector::setupToolbar( TDEConfig *config ) +void KDevFileSelector::setupToolbar( TDEConfig *config ) { toolbar->clear(); TQStringList tbactions = config->readListEntry( "toolbar actions", ',' ); @@ -311,7 +311,7 @@ void TDevFileSelector::setupToolbar( TDEConfig *config ) } } -void TDevFileSelector::writeConfig(TDEConfig *config, const TQString & name) +void KDevFileSelector::writeConfig(TDEConfig *config, const TQString & name) { dir->writeConfig(config,name + ":dir"); @@ -332,7 +332,7 @@ void TDevFileSelector::writeConfig(TDEConfig *config, const TQString & name) config->writeEntry( "AutoSyncEvents", autoSyncEvents ); } -void TDevFileSelector::setView(KFile::FileView view) +void KDevFileSelector::setView(KFile::FileView view) { dir->setView(view); } @@ -341,7 +341,7 @@ void TDevFileSelector::setView(KFile::FileView view) //BEGIN Public Slots -void TDevFileSelector::slotFilterChange( const TQString & nf ) +void KDevFileSelector::slotFilterChange( const TQString & nf ) { TQToolTip::remove( btnFilter ); TQString f = nf.stripWhiteSpace(); @@ -371,7 +371,7 @@ void TDevFileSelector::slotFilterChange( const TQString & nf ) btnFilter->setEnabled( !( empty && lastFilter.isEmpty() ) ); } -void TDevFileSelector::setDir( KURL u ) +void KDevFileSelector::setDir( KURL u ) { dir->setURL(u, true); } @@ -380,12 +380,12 @@ void TDevFileSelector::setDir( KURL u ) //BEGIN Private Slots -void TDevFileSelector::cmbPathActivated( const KURL& u ) +void KDevFileSelector::cmbPathActivated( const KURL& u ) { cmbPathReturnPressed( u.url() ); } -void TDevFileSelector::cmbPathReturnPressed( const TQString& u ) +void KDevFileSelector::cmbPathReturnPressed( const TQString& u ) { TQStringList urls = cmbPath->urls(); urls.remove( u ); @@ -395,12 +395,12 @@ void TDevFileSelector::cmbPathReturnPressed( const TQString& u ) dir->setURL( KURL(u), true ); } -void TDevFileSelector::dirUrlEntered( const KURL& u ) +void KDevFileSelector::dirUrlEntered( const KURL& u ) { cmbPath->setURL( u ); } -void TDevFileSelector::dirFinishedLoading() +void KDevFileSelector::dirFinishedLoading() {} @@ -411,7 +411,7 @@ void TDevFileSelector::dirFinishedLoading() If on: Set last filter. */ -void TDevFileSelector::btnFilterClick() +void KDevFileSelector::btnFilterClick() { if ( !btnFilter->isOn() ) { @@ -425,9 +425,9 @@ void TDevFileSelector::btnFilterClick() } -void TDevFileSelector::autoSync() +void KDevFileSelector::autoSync() { - kdDebug()<<"TDevFileSelector::autoSync()"<( part ); if( !doc ) return; // as above, but using document url. - kdDebug()<<"TDevFileSelector::autoSync( KTextEditor::Document )"<url() ); if ( u.isEmpty() ) { @@ -468,15 +468,15 @@ void TDevFileSelector::autoSync( KParts::Part *part ) } } /// \FIXME crash on shutdown -void TDevFileSelector::setActiveDocumentDir() +void KDevFileSelector::setActiveDocumentDir() { - //kdDebug()<<"TDevFileSelector::setActiveDocumentDir()"<setFocus(); } -void TDevFileSelector::showEvent( TQShowEvent * ) +void KDevFileSelector::showEvent( TQShowEvent * ) { // sync if we should if ( autoSyncEvents & GotVisible ) @@ -509,7 +509,7 @@ void TDevFileSelector::showEvent( TQShowEvent * ) } } -bool TDevFileSelector::eventFilter( TQObject* o, TQEvent *e ) +bool KDevFileSelector::eventFilter( TQObject* o, TQEvent *e ) { /* This is rather unfortunate, but: @@ -559,7 +559,7 @@ private: TQString _str; }; -KURL TDevFileSelector::activeDocumentUrl( ) +KURL KDevFileSelector::activeDocumentUrl( ) { KParts::ReadOnlyPart * part = dynamic_cast( partController->activePart() ); if ( part ) @@ -575,7 +575,7 @@ KURL TDevFileSelector::activeDocumentUrl( ) //////////////////////////////////////////////////////////////////////////////// // KFSConfigPage implementation //////////////////////////////////////////////////////////////////////////////// -KFSConfigPage::KFSConfigPage( TQWidget *parent, const char *name, TDevFileSelector *kfs ) +KFSConfigPage::KFSConfigPage( TQWidget *parent, const char *name, KDevFileSelector *kfs ) : TQWidget( parent, name ), fileSelector( kfs ), bDirty( false ) @@ -706,20 +706,20 @@ void KFSConfigPage::apply() // sync int s = 0; if ( cbSyncActive->isChecked() ) - s |= TDevFileSelector::DocumentChanged; + s |= KDevFileSelector::DocumentChanged; if ( cbSyncOpen->isChecked() ) - s |= TDevFileSelector::DocumentOpened; + s |= KDevFileSelector::DocumentOpened; if ( cbSyncShow->isChecked() ) - s |= TDevFileSelector::GotVisible; + s |= KDevFileSelector::GotVisible; fileSelector->autoSyncEvents = s; // reset connections disconnect( fileSelector->partController, 0, fileSelector, TQT_SLOT( autoSync() ) ); disconnect( fileSelector->partController, 0, fileSelector, TQT_SLOT( autoSync( KParts::Part *) ) ); - if ( s & TDevFileSelector::DocumentChanged ) + if ( s & KDevFileSelector::DocumentChanged ) connect( fileSelector->partController, TQT_SIGNAL( viewChanged() ), fileSelector, TQT_SLOT( autoSync() ) ); - if ( s & TDevFileSelector::DocumentOpened ) + if ( s & KDevFileSelector::DocumentOpened ) connect( fileSelector->partController, TQT_SIGNAL( partAdded(KParts::Part *) ), fileSelector, TQT_SLOT( autoSync(KParts::Part *) ) ); @@ -773,9 +773,9 @@ void KFSConfigPage::init() // sync int s = fileSelector->autoSyncEvents; - cbSyncActive->setChecked( s & TDevFileSelector::DocumentChanged ); - cbSyncOpen->setChecked( s & TDevFileSelector::DocumentOpened ); - cbSyncShow->setChecked( s & TDevFileSelector::GotVisible ); + cbSyncActive->setChecked( s & KDevFileSelector::DocumentChanged ); + cbSyncOpen->setChecked( s & KDevFileSelector::DocumentOpened ); + cbSyncShow->setChecked( s & KDevFileSelector::GotVisible ); // histories sbPathHistLength->setValue( fileSelector->cmbPath->maxItems() ); sbFilterHistLength->setValue( fileSelector->filter->maxCount() ); @@ -791,9 +791,9 @@ void KFSConfigPage::slotChanged() //END KFSConfigPage -//BEGIN TDevDirOperator +//BEGIN KDevDirOperator -void TDevDirOperator::activatedMenu( const KFileItem *fi, const TQPoint & pos ) +void KDevDirOperator::activatedMenu( const KFileItem *fi, const TQPoint & pos ) { setupMenu(); updateSelectionDependentActions(); @@ -816,6 +816,6 @@ void TDevDirOperator::activatedMenu( const KFileItem *fi, const TQPoint & pos ) popup->popup(pos); } -//END TDevDirOperator +//END KDevDirOperator #include "fileselector_widget.moc" diff --git a/parts/fileselector/fileselector_widget.h b/parts/fileselector/fileselector_widget.h index 1c30eadd..ef64f88c 100644 --- a/parts/fileselector/fileselector_widget.h +++ b/parts/fileselector/fileselector_widget.h @@ -29,8 +29,8 @@ #include #include -class TDevMainWindow; -class TDevPartController; +class KDevMainWindow; +class KDevPartController; class FileSelectorPart; class TDEActionCollection; class TDEActionSelector; @@ -57,39 +57,39 @@ namespace KTextEditor */ /* I think this fix for not moving toolbars is better */ -class TDevFileSelectorToolBar: public TDEToolBar +class KDevFileSelectorToolBar: public TDEToolBar { Q_OBJECT public: - TDevFileSelectorToolBar(TQWidget *parent); - virtual ~TDevFileSelectorToolBar(); + KDevFileSelectorToolBar(TQWidget *parent); + virtual ~KDevFileSelectorToolBar(); virtual void setMovingEnabled( bool b ); }; -class TDevFileSelectorToolBarParent: public TQFrame +class KDevFileSelectorToolBarParent: public TQFrame { Q_OBJECT public: - TDevFileSelectorToolBarParent(TQWidget *parent); - ~TDevFileSelectorToolBarParent(); - void setToolBar(TDevFileSelectorToolBar *tb); + KDevFileSelectorToolBarParent(TQWidget *parent); + ~KDevFileSelectorToolBarParent(); + void setToolBar(KDevFileSelectorToolBar *tb); private: - TDevFileSelectorToolBar *m_tb; + KDevFileSelectorToolBar *m_tb; protected: virtual void resizeEvent ( TQResizeEvent * ); }; -class TDevDirOperator: public KDirOperator +class KDevDirOperator: public KDirOperator { Q_OBJECT public: - TDevDirOperator(FileSelectorPart *part, const KURL &urlName=KURL(), TQWidget *parent=0, const char *name=0) + KDevDirOperator(FileSelectorPart *part, const KURL &urlName=KURL(), TQWidget *parent=0, const char *name=0) :KDirOperator(urlName, parent, name), m_part(part) { } @@ -101,7 +101,7 @@ private: FileSelectorPart *m_part; }; -class TDevFileSelector : public TQWidget +class KDevFileSelector : public TQWidget { Q_OBJECT @@ -112,15 +112,15 @@ public: /* When to sync to current document directory */ enum AutoSyncEvent { DocumentChanged=1, DocumentOpened=2, GotVisible=4 }; - TDevFileSelector( FileSelectorPart *part, TDevMainWindow *mainWindow=0, TDevPartController *partController=0, + KDevFileSelector( FileSelectorPart *part, KDevMainWindow *mainWindow=0, KDevPartController *partController=0, TQWidget * parent = 0, const char * name = 0 ); - ~TDevFileSelector(); + ~KDevFileSelector(); void readConfig( TDEConfig *, const TQString & ); void writeConfig( TDEConfig *, const TQString & ); void setupToolbar( TDEConfig * ); void setView( KFile::FileView ); - TDevDirOperator *dirOperator(){ return dir; } + KDevDirOperator *dirOperator(){ return dir; } TDEActionCollection *actionCollection() { return mActionCollection; }; public slots: @@ -146,18 +146,18 @@ protected: KURL activeDocumentUrl(); private: - class TDevFileSelectorToolBar *toolbar; + class KDevFileSelectorToolBar *toolbar; TDEActionCollection *mActionCollection; class KBookmarkHandler *bookmarkHandler; KURLComboBox *cmbPath; - TDevDirOperator * dir; + KDevDirOperator * dir; class TDEAction *acSyncDir; KHistoryCombo * filter; class TQToolButton *btnFilter; FileSelectorPart *m_part; - TDevMainWindow *mainwin; - TDevPartController *partController; + KDevMainWindow *mainwin; + KDevPartController *partController; TQString lastFilter; int autoSyncEvents; // enabled autosync events @@ -183,7 +183,7 @@ class KFSConfigPage : public TQWidget Q_OBJECT public: - KFSConfigPage( TQWidget* parent=0, const char *name=0, TDevFileSelector *kfs=0); + KFSConfigPage( TQWidget* parent=0, const char *name=0, KDevFileSelector *kfs=0); virtual ~KFSConfigPage() {}; public slots: @@ -194,7 +194,7 @@ public slots: private: void init(); - TDevFileSelector *fileSelector; + KDevFileSelector *fileSelector; bool bDirty; //class TQListBox *lbAvailableActions, *lbUsedActions; TDEActionSelector *acSel; diff --git a/parts/fileselector/kbookmarkhandler.cpp b/parts/fileselector/kbookmarkhandler.cpp index 059f0d78..935b9d86 100644 --- a/parts/fileselector/kbookmarkhandler.cpp +++ b/parts/fileselector/kbookmarkhandler.cpp @@ -35,7 +35,7 @@ #include "kbookmarkhandler.moc" -KBookmarkHandler::KBookmarkHandler( TDevFileSelector *parent, TDEPopupMenu* tdepopupmenu ) +KBookmarkHandler::KBookmarkHandler( KDevFileSelector *parent, TDEPopupMenu* tdepopupmenu ) : TQObject( parent, "KBookmarkHandler" ), KBookmarkOwner(), mParent( parent ), @@ -45,9 +45,9 @@ KBookmarkHandler::KBookmarkHandler( TDevFileSelector *parent, TDEPopupMenu* tdep if (!m_menu) m_menu = new TDEPopupMenu( parent, "bookmark menu" ); - TQString file = locate( "data", "tdevfileselector/fsbookmarks.xml" ); + TQString file = locate( "data", "kdevfileselector/fsbookmarks.xml" ); if ( file.isEmpty() ) - file = locateLocal( "data", "tdevfileselector/fsbookmarks.xml" ); + file = locateLocal( "data", "kdevfileselector/fsbookmarks.xml" ); KBookmarkManager *manager = KBookmarkManager::managerForFile( file, false); manager->setUpdate( true ); diff --git a/parts/fileselector/kbookmarkhandler.h b/parts/fileselector/kbookmarkhandler.h index 7d232107..4ec065aa 100644 --- a/parts/fileselector/kbookmarkhandler.h +++ b/parts/fileselector/kbookmarkhandler.h @@ -34,7 +34,7 @@ class KBookmarkHandler : public TQObject, public KBookmarkOwner public: - KBookmarkHandler( TDevFileSelector *parent, TDEPopupMenu *tdepopupmenu=0 ); + KBookmarkHandler( KDevFileSelector *parent, TDEPopupMenu *tdepopupmenu=0 ); ~KBookmarkHandler(); // KBookmarkOwner interface: @@ -58,7 +58,7 @@ protected: virtual void virtual_hook( int id, void* data ); private: - TDevFileSelector *mParent; + KDevFileSelector *mParent; TDEPopupMenu *m_menu; KBookmarkMenu *m_bookmarkMenu; diff --git a/parts/fileselector/kdevfileselector.desktop b/parts/fileselector/kdevfileselector.desktop new file mode 100644 index 00000000..785db621 --- /dev/null +++ b/parts/fileselector/kdevfileselector.desktop @@ -0,0 +1,89 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Powerful network transparent file browser utility. +Comment[ca]=Potent utilitat per a la navegació entre fitxers, transparent a la xarxa. +Comment[da]=Stærkt netværkstransparent filsøgerredskab. +Comment[de]=Ein mächtiges, netzwerktransparentes Dateiverwaltungswerkzeug. +Comment[el]=Ισχυρό εργαλείο περιηγητή αρχείων με δικτυακή υποστήριξη. +Comment[es]=Potente utilidad de navegación de archivos transparente a la red. +Comment[et]=Võimas failide lehitsemise rakendus. +Comment[eu]=Fitxategiak arakatzeko sare gardeneko tresna ahaltsua. +Comment[fa]=برنامۀ سودمند مرورگر پروندۀ شفاف شبکۀ قوی +Comment[fr]=Puissant utilitaire de navigateur de fichiers transparent vis-à-vis du réseau. +Comment[gl]=Potente utilidade de navegación de ficheiros con soporte para navegación da rede de forma transparente. +Comment[hi]=शक्तिशाली नेटवर्क ट्रांसपेरेन्ट फ़ाइल ब्राउज़र यूटिलिटी +Comment[hu]=Fájlböngésző program (hálózatkezeléssel) +Comment[it]=Utilità per la navigazione trasparente dei file in rete. +Comment[ja]=強力なネットワーク透過ファイルブラウザユーティリティ +Comment[ms]=Utiliti pelayar fail telus rangkaian yang berkuasa +Comment[nds]=En mächtig, nettwarktransparent Dateigrieper. +Comment[ne]=शक्तिशाली सञ्जाल पारदर्शी फाइल ब्राउजर युटिलिटी +Comment[nl]=Krachtige, netwerktransparante bestandsbrowser. +Comment[pl]=Potężne narzędzie do przeglądania plików z obsługą sieci. +Comment[pt]=Utilitário de navegação de ficheiros poderoso. +Comment[pt_BR]=Poderoso utilitário de navegação de arquivos transparente à rede. +Comment[ru]=Средство просмотра списка файлов с поддержкой работы по сети. +Comment[sk]=Výkonný sieťovo-transparentný nástroj na prezeranie súborov. +Comment[sr]=Моћан програмчић за претраживање фајлова који је независтан од мреже. +Comment[sr@Latn]=Moćan programčić za pretraživanje fajlova koji je nezavistan od mreže. +Comment[sv]=Kraftfullt nätverkstransparent filbläddringsverktyg +Comment[ta]=வலிமையுள்ள வலை பின்னல் ஊடக கோப்பினை தேடும் வசதி. +Comment[tg]=Воситаи намоиши файлҳо бо тарафдории корҳо бо шабака. +Comment[tr]=Güçlü, ağdan saydam, dosya gözatma yardımcı programı +Comment[zh_CN]=强有力的网络文件浏览工具。 +Comment[zh_TW]=強大的網路檔案瀏覽工具。 +Name=KDevFileSelector +Name[da]=TDevelop filvælger +Name[de]=Datei-Selektor (TDevelop) +Name[hi]=के-डेव-फ़ाइल-चयनक +Name[nds]=TDevelop-Dateigrieper +Name[pl]=KDevWybórPliku +Name[sk]=KDev voľba súboru +Name[sv]=TDevelop filväljare +Name[ta]=KDev கோப்பு தேர்வாளன் +Name[tg]=Ҷудосози файли KDev +Name[zh_TW]=TDevelop 檔案選擇器 +GenericName=File Selector +GenericName[br]=Dibaber ar restr +GenericName[ca]=Selector de fitxers +GenericName[cy]=Dewisydd Ffeiliau +GenericName[da]=Filvælger +GenericName[de]=Datei-Selektor +GenericName[el]=Επιλογέας αρχείων +GenericName[es]=Selector de archivos +GenericName[et]=Failide valija +GenericName[eu]=Fitxategi hautatzailea +GenericName[fa]=گزینندۀ پرونده +GenericName[fr]=Sélecteur de fichiers +GenericName[ga]=Roghnóir na gComhad +GenericName[gl]=Selector de ficheiros +GenericName[hi]=फ़ाइल चयनक +GenericName[hu]=Fájlválasztó +GenericName[it]=Selettore file +GenericName[ja]=ファイル選択 +GenericName[ms]=Pemilih Fail +GenericName[nds]=Dateigrieper +GenericName[ne]=फाइल चयनकर्ता +GenericName[nl]=Bestandsselector +GenericName[pl]=Wybór plików +GenericName[pt]=Selector de Ficheiros +GenericName[pt_BR]=Seletor de Arquivo +GenericName[ru]=Выбор файлов +GenericName[sk]=Voľba súboru +GenericName[sl]=Izbirnik datotek +GenericName[sr]=Бирач фајлова +GenericName[sr@Latn]=Birač fajlova +GenericName[sv]=Filväljare +GenericName[ta]=கோப்பு தேர்வாளர் +GenericName[tg]=Селектори файлҳо +GenericName[tr]=Dosya Seçici +GenericName[zh_CN]=文件选择器 +GenericName[zh_TW]=檔案選擇器 +Icon=fileopen +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevfileselector +X-TDevelop-Version=5 +X-TDevelop-Scope=Global +X-TDevelop-Mode=AssistantMode +X-TDevelop-Properties=GlobalFileManagement diff --git a/parts/fileselector/tdevpart_fileselector.rc b/parts/fileselector/kdevpart_fileselector.rc similarity index 100% rename from parts/fileselector/tdevpart_fileselector.rc rename to parts/fileselector/kdevpart_fileselector.rc diff --git a/parts/fileselector/tdevfileselector.desktop b/parts/fileselector/tdevfileselector.desktop deleted file mode 100644 index a1d13627..00000000 --- a/parts/fileselector/tdevfileselector.desktop +++ /dev/null @@ -1,89 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Powerful network transparent file browser utility. -Comment[ca]=Potent utilitat per a la navegació entre fitxers, transparent a la xarxa. -Comment[da]=Stærkt netværkstransparent filsøgerredskab. -Comment[de]=Ein mächtiges, netzwerktransparentes Dateiverwaltungswerkzeug. -Comment[el]=Ισχυρό εργαλείο περιηγητή αρχείων με δικτυακή υποστήριξη. -Comment[es]=Potente utilidad de navegación de archivos transparente a la red. -Comment[et]=Võimas failide lehitsemise rakendus. -Comment[eu]=Fitxategiak arakatzeko sare gardeneko tresna ahaltsua. -Comment[fa]=برنامۀ سودمند مرورگر پروندۀ شفاف شبکۀ قوی -Comment[fr]=Puissant utilitaire de navigateur de fichiers transparent vis-à-vis du réseau. -Comment[gl]=Potente utilidade de navegación de ficheiros con soporte para navegación da rede de forma transparente. -Comment[hi]=शक्तिशाली नेटवर्क ट्रांसपेरेन्ट फ़ाइल ब्राउज़र यूटिलिटी -Comment[hu]=Fájlböngésző program (hálózatkezeléssel) -Comment[it]=Utilità per la navigazione trasparente dei file in rete. -Comment[ja]=強力なネットワーク透過ファイルブラウザユーティリティ -Comment[ms]=Utiliti pelayar fail telus rangkaian yang berkuasa -Comment[nds]=En mächtig, nettwarktransparent Dateigrieper. -Comment[ne]=शक्तिशाली सञ्जाल पारदर्शी फाइल ब्राउजर युटिलिटी -Comment[nl]=Krachtige, netwerktransparante bestandsbrowser. -Comment[pl]=Potężne narzędzie do przeglądania plików z obsługą sieci. -Comment[pt]=Utilitário de navegação de ficheiros poderoso. -Comment[pt_BR]=Poderoso utilitário de navegação de arquivos transparente à rede. -Comment[ru]=Средство просмотра списка файлов с поддержкой работы по сети. -Comment[sk]=Výkonný sieťovo-transparentný nástroj na prezeranie súborov. -Comment[sr]=Моћан програмчић за претраживање фајлова који је независтан од мреже. -Comment[sr@Latn]=Moćan programčić za pretraživanje fajlova koji je nezavistan od mreže. -Comment[sv]=Kraftfullt nätverkstransparent filbläddringsverktyg -Comment[ta]=வலிமையுள்ள வலை பின்னல் ஊடக கோப்பினை தேடும் வசதி. -Comment[tg]=Воситаи намоиши файлҳо бо тарафдории корҳо бо шабака. -Comment[tr]=Güçlü, ağdan saydam, dosya gözatma yardımcı programı -Comment[zh_CN]=强有力的网络文件浏览工具。 -Comment[zh_TW]=強大的網路檔案瀏覽工具。 -Name=TDevFileSelector -Name[da]=TDevelop filvælger -Name[de]=Datei-Selektor (TDevelop) -Name[hi]=के-डेव-फ़ाइल-चयनक -Name[nds]=TDevelop-Dateigrieper -Name[pl]=KDevWybórPliku -Name[sk]=KDev voľba súboru -Name[sv]=TDevelop filväljare -Name[ta]=KDev கோப்பு தேர்வாளன் -Name[tg]=Ҷудосози файли KDev -Name[zh_TW]=TDevelop 檔案選擇器 -GenericName=File Selector -GenericName[br]=Dibaber ar restr -GenericName[ca]=Selector de fitxers -GenericName[cy]=Dewisydd Ffeiliau -GenericName[da]=Filvælger -GenericName[de]=Datei-Selektor -GenericName[el]=Επιλογέας αρχείων -GenericName[es]=Selector de archivos -GenericName[et]=Failide valija -GenericName[eu]=Fitxategi hautatzailea -GenericName[fa]=گزینندۀ پرونده -GenericName[fr]=Sélecteur de fichiers -GenericName[ga]=Roghnóir na gComhad -GenericName[gl]=Selector de ficheiros -GenericName[hi]=फ़ाइल चयनक -GenericName[hu]=Fájlválasztó -GenericName[it]=Selettore file -GenericName[ja]=ファイル選択 -GenericName[ms]=Pemilih Fail -GenericName[nds]=Dateigrieper -GenericName[ne]=फाइल चयनकर्ता -GenericName[nl]=Bestandsselector -GenericName[pl]=Wybór plików -GenericName[pt]=Selector de Ficheiros -GenericName[pt_BR]=Seletor de Arquivo -GenericName[ru]=Выбор файлов -GenericName[sk]=Voľba súboru -GenericName[sl]=Izbirnik datotek -GenericName[sr]=Бирач фајлова -GenericName[sr@Latn]=Birač fajlova -GenericName[sv]=Filväljare -GenericName[ta]=கோப்பு தேர்வாளர் -GenericName[tg]=Селектори файлҳо -GenericName[tr]=Dosya Seçici -GenericName[zh_CN]=文件选择器 -GenericName[zh_TW]=檔案選擇器 -Icon=fileopen -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevfileselector -X-TDevelop-Version=5 -X-TDevelop-Scope=Global -X-TDevelop-Mode=AssistantMode -X-TDevelop-Properties=GlobalFileManagement diff --git a/parts/fileview/CMakeLists.txt b/parts/fileview/CMakeLists.txt index 49539df2..4f5f87dc 100644 --- a/parts/fileview/CMakeLists.txt +++ b/parts/fileview/CMakeLists.txt @@ -28,13 +28,13 @@ link_directories( ##### other data ################################ install( FILES - tdevfileview.desktop tdevfilegroups.desktop + kdevfileview.desktop kdevfilegroups.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevfileview (module) ################## +##### libkdevfileview (module) ################## -tde_add_kpart( libtdevfileview AUTOMOC +tde_add_kpart( libkdevfileview AUTOMOC SOURCES fileviewpart.cpp filetreewidget.cpp partwidget.cpp vcscolorsconfigwidgetbase.ui vcscolorsconfigwidget.cpp @@ -45,9 +45,9 @@ tde_add_kpart( libtdevfileview AUTOMOC ) -##### libtdevfilegroups (module) ################ +##### libkdevfilegroups (module) ################ -tde_add_kpart( libtdevfilegroups AUTOMOC +tde_add_kpart( libkdevfilegroups AUTOMOC SOURCES filegroupswidget.cpp addfilegroupdlg.cpp filegroupsconfigwidget.cpp filegroupsconfigwidgetbase.ui diff --git a/parts/fileview/Makefile.am b/parts/fileview/Makefile.am index 76f1460b..3211d736 100644 --- a/parts/fileview/Makefile.am +++ b/parts/fileview/Makefile.am @@ -3,24 +3,24 @@ INCLUDES = -I$(top_srcdir)/lib/compat -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevfileview.la libtdevfilegroups.la +kde_module_LTLIBRARIES = libkdevfileview.la libkdevfilegroups.la -libtdevfileview_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevfileview_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +libkdevfileview_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevfileview_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevfilegroups_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevfilegroups_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +libkdevfilegroups_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevfilegroups_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevfileview_la_SOURCES = fileviewpart.cpp filetreewidget.cpp partwidget.cpp vcscolorsconfigwidgetbase.ui vcscolorsconfigwidget.cpp stdfiletreewidgetimpl.cpp filetreeviewwidgetimpl.cpp vcsfiletreewidgetimpl.cpp fileitemfactory.cpp +libkdevfileview_la_SOURCES = fileviewpart.cpp filetreewidget.cpp partwidget.cpp vcscolorsconfigwidgetbase.ui vcscolorsconfigwidget.cpp stdfiletreewidgetimpl.cpp filetreeviewwidgetimpl.cpp vcsfiletreewidgetimpl.cpp fileitemfactory.cpp -libtdevfilegroups_la_SOURCES = filegroupswidget.cpp addfilegroupdlg.cpp filegroupsconfigwidget.cpp filegroupsconfigwidgetbase.ui filegroupspart.cpp +libkdevfilegroups_la_SOURCES = filegroupswidget.cpp addfilegroupdlg.cpp filegroupsconfigwidget.cpp filegroupsconfigwidgetbase.ui filegroupspart.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevfileview.desktop tdevfilegroups.desktop +service_DATA = kdevfileview.desktop kdevfilegroups.desktop # not used currently -#rcdir = $(kde_datadir)/tdevfileview -#rc_DATA = tdevfileview.rc +#rcdir = $(kde_datadir)/kdevfileview +#rc_DATA = kdevfileview.rc noinst_HEADERS = vcscolorsconfigwidget.h stdfiletreewidgetimpl.h filetreeviewwidgetimpl.h vcsfiletreewidgetimpl.h fileitemfactory.h diff --git a/parts/fileview/filegroupsconfigwidget.cpp b/parts/fileview/filegroupsconfigwidget.cpp index bf8d39a6..4f8fe422 100644 --- a/parts/fileview/filegroupsconfigwidget.cpp +++ b/parts/fileview/filegroupsconfigwidget.cpp @@ -39,7 +39,7 @@ FileGroupsConfigWidget::~FileGroupsConfigWidget() void FileGroupsConfigWidget::readConfig() { TQDomDocument &dom = *m_part->projectDom(); - DomUtil::PairList list = DomUtil::readPairListEntry(dom, "/tdevfileview/groups", + DomUtil::PairList list = DomUtil::readPairListEntry(dom, "/kdevfileview/groups", "group", "name", "pattern"); TQListViewItem *lastItem = 0; @@ -64,7 +64,7 @@ void FileGroupsConfigWidget::storeConfig() item = item->nextSibling(); } - DomUtil::writePairListEntry(*m_part->projectDom(), "/tdevfileview/groups", + DomUtil::writePairListEntry(*m_part->projectDom(), "/kdevfileview/groups", "group", "name", "pattern", list); } diff --git a/parts/fileview/filegroupspart.cpp b/parts/fileview/filegroupspart.cpp index 7b83b8ef..77fc9646 100644 --- a/parts/fileview/filegroupspart.cpp +++ b/parts/fileview/filegroupspart.cpp @@ -19,25 +19,25 @@ #include #include #include -#include +#include #include -#include "tdevcore.h" -#include "tdevproject.h" -#include "tdevmainwindow.h" -#include "tdevplugininfo.h" +#include "kdevcore.h" +#include "kdevproject.h" +#include "kdevmainwindow.h" +#include "kdevplugininfo.h" #include "filegroupswidget.h" #include "filegroupsconfigwidget.h" #define FILEGROUPS_OPTIONS 1 -typedef TDevGenericFactory FileGroupsFactory; -static const TDevPluginInfo data("tdevfilegroups"); -K_EXPORT_COMPONENT_FACTORY( libtdevfilegroups, FileGroupsFactory( data ) ) +typedef KDevGenericFactory FileGroupsFactory; +static const KDevPluginInfo data("kdevfilegroups"); +K_EXPORT_COMPONENT_FACTORY( libkdevfilegroups, FileGroupsFactory( data ) ) FileGroupsPart::FileGroupsPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin(&data, parent, name ? name : "FileGroupsPart") + : KDevPlugin(&data, parent, name ? name : "FileGroupsPart") { deleteRequested = false; setInstance(FileGroupsFactory::instance()); diff --git a/parts/fileview/filegroupspart.h b/parts/fileview/filegroupspart.h index 88bed704..314f1663 100644 --- a/parts/fileview/filegroupspart.h +++ b/parts/fileview/filegroupspart.h @@ -15,12 +15,12 @@ #include //#include #include -#include "tdevplugin.h" +#include "kdevplugin.h" class FileGroupsWidget; class KDialogBase; -class FileGroupsPart : public TDevPlugin +class FileGroupsPart : public KDevPlugin { Q_OBJECT diff --git a/parts/fileview/filegroupswidget.cpp b/parts/fileview/filegroupswidget.cpp index 3c1c348f..8a3e19b4 100644 --- a/parts/fileview/filegroupswidget.cpp +++ b/parts/fileview/filegroupswidget.cpp @@ -27,10 +27,10 @@ #include #include -#include "tdevcore.h" -#include "tdevproject.h" -#include "tdevmainwindow.h" -#include "tdevpartcontroller.h" +#include "kdevcore.h" +#include "kdevproject.h" +#include "kdevmainwindow.h" +#include "kdevpartcontroller.h" #include "domutil.h" #include "filegroupspart.h" @@ -191,16 +191,16 @@ FileGroupsWidget::FileGroupsWidget(FileGroupsPart *part) (void) translations; // supress compiler warning TQDomDocument &dom = *m_part->projectDom(); - m_actionToggleShowNonProjectFiles->setChecked( !DomUtil::readBoolEntry(dom, "/tdevfileview/groups/hidenonprojectfiles") ); - m_actionToggleDisplayLocation->setChecked( !DomUtil::readBoolEntry(dom, "/tdevfileview/groups/hidenonlocation") ); + m_actionToggleShowNonProjectFiles->setChecked( !DomUtil::readBoolEntry(dom, "/kdevfileview/groups/hidenonprojectfiles") ); + m_actionToggleDisplayLocation->setChecked( !DomUtil::readBoolEntry(dom, "/kdevfileview/groups/hidenonlocation") ); } FileGroupsWidget::~FileGroupsWidget() { TQDomDocument &dom = *m_part->projectDom(); - DomUtil::writeBoolEntry( dom, "/tdevfileview/groups/hidenonprojectfiles", !m_actionToggleShowNonProjectFiles->isChecked() ); - DomUtil::writeBoolEntry( dom, "/tdevfileview/groups/hidenonlocation", !m_actionToggleDisplayLocation->isChecked() ); + DomUtil::writeBoolEntry( dom, "/kdevfileview/groups/hidenonprojectfiles", !m_actionToggleShowNonProjectFiles->isChecked() ); + DomUtil::writeBoolEntry( dom, "/kdevfileview/groups/hidenonlocation", !m_actionToggleDisplayLocation->isChecked() ); } @@ -319,7 +319,7 @@ void FileGroupsWidget::refresh() } TQDomDocument &dom = *m_part->projectDom(); DomUtil::PairList list = - DomUtil::readPairListEntry(dom, "/tdevfileview/groups", "group", "name", "pattern"); + DomUtil::readPairListEntry(dom, "/kdevfileview/groups", "group", "name", "pattern"); FileViewFolderItem *lastGroup = 0; diff --git a/parts/fileview/filegroupswidget.h b/parts/fileview/filegroupswidget.h index 62ec5d6f..3294db32 100644 --- a/parts/fileview/filegroupswidget.h +++ b/parts/fileview/filegroupswidget.h @@ -15,7 +15,7 @@ #include class FileGroupsPart; -class TDevProject; +class KDevProject; class FileGroupsWidget : public TDEListView diff --git a/parts/fileview/filetreeviewwidgetimpl.cpp b/parts/fileview/filetreeviewwidgetimpl.cpp index 3764a3f2..af6f9e1f 100644 --- a/parts/fileview/filetreeviewwidgetimpl.cpp +++ b/parts/fileview/filetreeviewwidgetimpl.cpp @@ -16,7 +16,7 @@ #include #include -#include +#include #include "fileviewpart.h" #include "filetreewidget.h" @@ -44,7 +44,7 @@ FileTreeViewWidgetImpl::FileTreeViewWidgetImpl( FileTreeWidget *parent, const ch // Reload good ol' settings TQDomDocument &dom = *m_part->projectDom(); - m_actionToggleShowNonProjectFiles->setChecked( !DomUtil::readBoolEntry(dom, "/tdevfileview/tree/hidenonprojectfiles") ); + m_actionToggleShowNonProjectFiles->setChecked( !DomUtil::readBoolEntry(dom, "/kdevfileview/tree/hidenonprojectfiles") ); } /////////////////////////////////////////////////////////////////////////////// @@ -56,7 +56,7 @@ FileTreeViewWidgetImpl::~FileTreeViewWidgetImpl() delete m_branchItemFactory; TQDomDocument &dom = *m_part->projectDom(); - DomUtil::writeBoolEntry( dom, "/tdevfileview/tree/hidenonprojectfiles", !showNonProjectFiles() ); + DomUtil::writeBoolEntry( dom, "/kdevfileview/tree/hidenonprojectfiles", !showNonProjectFiles() ); } /////////////////////////////////////////////////////////////////////////////// diff --git a/parts/fileview/filetreewidget.cpp b/parts/fileview/filetreewidget.cpp index 0a1c5346..f89bf71d 100644 --- a/parts/fileview/filetreewidget.cpp +++ b/parts/fileview/filetreewidget.cpp @@ -26,11 +26,11 @@ #include #include -#include "tdevcore.h" -#include "tdevproject.h" -#include "tdevpartcontroller.h" -#include "tdevmainwindow.h" -#include "tdevversioncontrol.h" +#include "kdevcore.h" +#include "kdevproject.h" +#include "kdevpartcontroller.h" +#include "kdevmainwindow.h" +#include "kdevversioncontrol.h" #include "domutil.h" #include "urlutil.h" @@ -51,7 +51,7 @@ using namespace filetreeview; // class FileTreeWidget /////////////////////////////////////////////////////////////////////////////// -FileTreeWidget::FileTreeWidget( FileViewPart *part, TQWidget *parent, TDevVCSFileInfoProvider *infoProvider ) +FileTreeWidget::FileTreeWidget( FileViewPart *part, TQWidget *parent, KDevVCSFileInfoProvider *infoProvider ) : KFileTreeView( parent, "filetreewidget" ), m_part( part ), m_rootBranch( 0 ) { kdDebug(9017) << "Requested FileTree for: " << projectDirectory() << endl; @@ -87,7 +87,7 @@ FileTreeWidget::FileTreeWidget( FileViewPart *part, TQWidget *parent, TDevVCSFil // Hide pattern for files TQDomDocument &dom = *m_part->projectDom(); TQString defaultHidePattern = "*.o,*.lo,CVS"; - TQString hidePattern = DomUtil::readEntry( dom, "/tdevfileview/tree/hidepatterns", defaultHidePattern ); + TQString hidePattern = DomUtil::readEntry( dom, "/kdevfileview/tree/hidepatterns", defaultHidePattern ); m_hidePatterns = TQStringList::split( ",", hidePattern ); } @@ -98,7 +98,7 @@ FileTreeWidget::~FileTreeWidget() kdDebug(9017) << "FileTreeWidget::~FileTreeWidget()" << endl; TQDomDocument &dom = *m_part->projectDom(); - DomUtil::writeEntry( dom, "/tdevfileview/tree/hidepatterns", hidePatterns() ); + DomUtil::writeEntry( dom, "/kdevfileview/tree/hidepatterns", hidePatterns() ); // delete m_impl; } @@ -343,7 +343,7 @@ TQString FileTreeWidget::hidePatterns() const /////////////////////////////////////////////////////////////////////////////// -TDevVersionControl *FileTreeWidget::versionControl() const +KDevVersionControl *FileTreeWidget::versionControl() const { if (part() && part()->versionControl()) return part()->versionControl(); diff --git a/parts/fileview/filetreewidget.h b/parts/fileview/filetreewidget.h index a8d3e2bf..f6abb0c6 100644 --- a/parts/fileview/filetreewidget.h +++ b/parts/fileview/filetreewidget.h @@ -17,11 +17,11 @@ #include #include -#include +#include class FileViewPart; class FileTreeViewWidgetImpl; -class TDevVersionControl; +class KDevVersionControl; /** * This is FileTree widget for listing files belonging to the project. It does feature: @@ -33,8 +33,8 @@ class TDevVersionControl; * Design notes * The class uses two different implementations (referred by m_impl data member): * - @see VCSFileTreeWidgetImpl for VCS support -* VCS support is detencted by the constructor looking for the @see TDevPlugin::versionControl() member: -* if the current VCS plug-in does offer a @see TDevVCSFileInfoProvider object than this will be used for +* VCS support is detencted by the constructor looking for the @see KDevPlugin::versionControl() member: +* if the current VCS plug-in does offer a @see KDevVCSFileInfoProvider object than this will be used for * querying about files' data. If neither VCS plugin nor valid info provider is found then the filetreeview * will fallback to the standard implementation * - @see StdFileTreeWidgetImpl for standard visualization, just like the KFileTreeView @@ -49,7 +49,7 @@ class FileTreeWidget : public KFileTreeView Q_OBJECT public: - FileTreeWidget( FileViewPart *part, TQWidget *parent, TDevVCSFileInfoProvider *infoProvider ); + FileTreeWidget( FileViewPart *part, TQWidget *parent, KDevVCSFileInfoProvider *infoProvider ); virtual ~FileTreeWidget(); void openDirectory(const TQString &dirName); @@ -60,7 +60,7 @@ public: FileViewPart *part() const { return m_part; } - //TDevVCSFileInfoProvider *vcsFileInfoProvider() const; + //KDevVCSFileInfoProvider *vcsFileInfoProvider() const; void applyHidePatterns( const TQString &hidePatterns ); TQString hidePatterns() const; @@ -85,7 +85,7 @@ private slots: private: bool matchesHidePattern(const TQString &fileName); - TDevVersionControl *versionControl() const; + KDevVersionControl *versionControl() const; TQStringList m_hidePatterns; /** diff --git a/parts/fileview/fileviewpart.cpp b/parts/fileview/fileviewpart.cpp index 7da44996..414cea52 100644 --- a/parts/fileview/fileviewpart.cpp +++ b/parts/fileview/fileviewpart.cpp @@ -23,19 +23,19 @@ #include #include #include -#include +#include #include -#include "tdevcore.h" -#include "tdevproject.h" -#include "tdevmainwindow.h" +#include "kdevcore.h" +#include "kdevproject.h" +#include "kdevmainwindow.h" #include "partwidget.h" #include "domutil.h" #include "filetreewidget.h" #include "vcscolorsconfigwidget.h" -#include "tdevversioncontrol.h" -#include "tdevplugininfo.h" +#include "kdevversioncontrol.h" +#include "kdevplugininfo.h" #define FILETREE_OPTIONS 1 @@ -49,20 +49,20 @@ VCSColors FileViewPart::vcsColors; // class factory /////////////////////////////////////////////////////////////////////////////// -typedef TDevGenericFactory FileViewFactory; -static const TDevPluginInfo data("tdevfileview"); -K_EXPORT_COMPONENT_FACTORY( libtdevfileview, FileViewFactory( data ) ) +typedef KDevGenericFactory FileViewFactory; +static const KDevPluginInfo data("kdevfileview"); +K_EXPORT_COMPONENT_FACTORY( libkdevfileview, FileViewFactory( data ) ) /////////////////////////////////////////////////////////////////////////////// // class FileTreeWidget /////////////////////////////////////////////////////////////////////////////// FileViewPart::FileViewPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin(&data, parent, name ? name : "FileViewPart"), + : KDevPlugin(&data, parent, name ? name : "FileViewPart"), m_widget( 0 ) { setInstance( FileViewFactory::instance() ); - // setXMLFile("tdevfileview.rc"); + // setXMLFile("kdevfileview.rc"); _configProxy = new ConfigWidgetProxy( core() ); _configProxy->createProjectConfigPage( i18n("File Tree"), FILETREE_OPTIONS, info()->icon() ); @@ -153,9 +153,9 @@ void FileViewPart::insertConfigWidget( const KDialogBase* dlg, TQWidget * page, } } -TDevVersionControl *FileViewPart::versionControl() +KDevVersionControl *FileViewPart::versionControl() { - return extension("TDevelop/VersionControl"); + return extension("TDevelop/VersionControl"); } #include "fileviewpart.moc" diff --git a/parts/fileview/fileviewpart.h b/parts/fileview/fileviewpart.h index c1c8c776..68eb6a56 100644 --- a/parts/fileview/fileviewpart.h +++ b/parts/fileview/fileviewpart.h @@ -14,14 +14,14 @@ #include #include -#include "tdevplugin.h" +#include "kdevplugin.h" #include "vcscolorsconfigwidget.h" class PartWidget; class KDialogBase; -class TDevVersionControl; +class KDevVersionControl; -class FileViewPart : public TDevPlugin +class FileViewPart : public KDevPlugin { Q_OBJECT @@ -33,7 +33,7 @@ public: //! Colors to use for VCS visual feed-back static VCSColors vcsColors; - TDevVersionControl *versionControl(); + KDevVersionControl *versionControl(); private slots: void insertConfigWidget( const KDialogBase* dlg, TQWidget * page, unsigned int ); diff --git a/parts/fileview/kdevfilegroups.desktop b/parts/fileview/kdevfilegroups.desktop new file mode 100644 index 00000000..bfa3e699 --- /dev/null +++ b/parts/fileview/kdevfilegroups.desktop @@ -0,0 +1,86 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Allows for grouping of project files according to filename patterns. +Comment[ca]=Permet l'agrupació de fitxers del projecte d'acord als patrons dels noms de fitxer. +Comment[da]=Tillader gruppering af projektfiler efter filnavnemønstre. +Comment[de]=Erlaubt die Gruppierung von Projektdateien nach Dateimustern. +Comment[el]=Επιτρέπει την ομαδοποίηση των αρχείων του έργου σύμφωνα με διάφορα μοτίβα. +Comment[es]=Permite la agrupación de archivos del proyecto de acuerdo a patrones en sus nombres. +Comment[et]=Võimaldab rühmitada projekti faile vastavalt failinimede mustritele. +Comment[eu]=Proiektu fitxategiak fitxategi-izen ereduen arabera taldekatzeko aukera ematen du. +Comment[fa]=اجازۀ گروه کردن پرونده‌های پروژه را طبق الگوهای نام پرونده می‌دهد. +Comment[fr]=Permet de grouper des fichiers projet en fonction des motifs de noms de fichier. +Comment[gl]=Permite o agrupamento dos arquivos do proxecto seguindo patróns nos seus nomes. +Comment[hi]=फ़ाइल-नाम पैटर्न के आधार पर परियोजना फ़ाइलों का समूह बनाना स्वीकारता है. +Comment[hu]=Lehetővé teszi projektfájlok csoportosítását fájlnévminta alapján +Comment[it]=Permette il raggruppamento dei file di progetto per schemi del nome file. +Comment[ja]=ファイル名のパターンによりプロジェクトファイルのグルーピングを可能にします。 +Comment[ms]=Membenarkan pengumpulan bagi fail projek mengikut corak namafail. +Comment[nds]=Maakt dat Sorteren vun Projektdateien na Dateinaam-Mustern mööglich. +Comment[ne]=फाइल नाम बाँन्की अनुसार परियोजना फाइलहरू समूहबद्ध गर्न अनुमति दिन्छ । +Comment[nl]=Groepeert projectbestanden op grond van patronen in bestandsnamen. +Comment[pl]=Umożliwia grupowanie plików projektu zgodnie z wzorcami nazw plików. +Comment[pt]=Permite o agrupamento de ficheiros de projecto, de acordo com padrões de nomes de ficheiros. +Comment[pt_BR]=Permite agrupar arquivos de projetos de acordo com padrões de nome de arquivo. +Comment[ru]=Позволяет группировать файлы в проекте согласно шаблонам имён. +Comment[sk]=Umožní zoskupenie projektových súborov podľa vzoru mien súborov. +Comment[sr]=Дозвољава груписање пројектних фајлова према облицима имена фајлова. +Comment[sr@Latn]=Dozvoljava grupisanje projektnih fajlova prema oblicima imena fajlova. +Comment[sv]=Tillåter att projektfiler grupperas enligt filnamnsmönster. +Comment[ta]=திட்ட பணிகோப்புகளை கோப்பின் பெயர் அடிப்படையில் அதனை குழுவாக பிரிக்கும். +Comment[tg]=Барои файлҳои дар номҳои қолиб имкон медиҳад. +Comment[tr]=Dosya adı desenlerine göre proje dosyalarının gruplanmasını sağlar. +Comment[zh_CN]=允许你根据文件名模式规类工程文件。 +Comment[zh_TW]=允許專案檔案根據檔名樣式來分群組。 +Name=KDevFileGroups +Name[da]=TDevelop filgrupper +Name[de]=Dateigruppen-Komponente (TDevelop) +Name[hi]=के-डेव-फ़ाइल-ग्रुप्स +Name[nds]=TDevelop-Dateikoppeln +Name[pl]=KDevGrupyPlików +Name[sk]=KDev zoskupenie súborov +Name[sv]=TDevelop filgrupper +Name[ta]=KDev கோப்பு குழுக்கள் +Name[tg]=Гурӯҳҳои файли KDev +Name[zh_TW]=TDevelop 檔案群組 +GenericName=File Groups +GenericName[br]=Strolladoù a restroù +GenericName[ca]=Grups de fitxers +GenericName[da]=Filgrupper +GenericName[de]=Dateigruppen +GenericName[el]=Ομάδες αρχείων +GenericName[es]=Grupos de archivos +GenericName[et]=Failigrupid +GenericName[eu]=Fitxategi taldeak +GenericName[fa]=گروههای پرونده +GenericName[fr]=Groupes de fichiers +GenericName[gl]=Grupos de arquivos +GenericName[hi]=फ़ाइल समूह +GenericName[hu]=Fájlcsoportok +GenericName[it]=Gruppi file +GenericName[ja]=ファイルグループ +GenericName[ms]=Kumpulan Fail +GenericName[nds]=Dateikoppeln +GenericName[ne]=फाइल समूह +GenericName[nl]=Bestandsgroepen +GenericName[pl]=Grupy plików +GenericName[pt]=Grupos de Ficheiros +GenericName[pt_BR]=Grupos de Arquivo +GenericName[ru]=Группы файлов +GenericName[sk]=Zoskupenie súborov +GenericName[sl]=Skupine datotek +GenericName[sr]=Групе фајлова +GenericName[sr@Latn]=Grupe fajlova +GenericName[sv]=Filgrupper +GenericName[ta]=கோப்புக்குழுக்கள் +GenericName[tg]=Гурӯҳи файлҳо +GenericName[tr]=Dosya Grupları +GenericName[zh_CN]=文件分组 +GenericName[zh_TW]=檔案群組 +ServiceTypes=TDevelop/Plugin +Icon=attach +X-TDE-Library=libkdevfilegroups +X-TDevelop-Version=5 +X-TDevelop-Scope=Project +X-TDevelop-Properties=ProjectFileGroupsManagement diff --git a/parts/fileview/kdevfileview.desktop b/parts/fileview/kdevfileview.desktop new file mode 100644 index 00000000..6a702e1b --- /dev/null +++ b/parts/fileview/kdevfileview.desktop @@ -0,0 +1,85 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Provides a way of navigating and interacting with the source files of the current project. +Comment[ca]=Proporciona un mètode de navegació i interacció amb els fitxers de codi font del projecte actual. +Comment[da]=Sørger for en måde at navigere og interagere med kildefiler for dette projekt. +Comment[de]=Bietet Funktionalität zur Navigation und zum Umgang mit den Quelltexten des aktuellen Projektes. +Comment[el]=Προσφέρει μια μέθοδο πλοήγησης και αλληλεπίδρασης με τα αρχεία πηγαίου κώδικα του τρέχοντος έργου. +Comment[es]=Proporciona un método de navegación e interacción con los archivos de código fuente del proyecto actual. +Comment[et]=Võimaldab aktiivse projekti lähtekoodifailide vahel liikuda ja neis üht-teist ette võtta. +Comment[eu]=Uneko proiektuko itruburu fitxategiekin lan egiteko eta hauen artean nabigatzeko aukera ematen du. +Comment[fa]=راهی برای ناوش و تعامل با پرونده‌های منبع پروژۀ جاری را فراهم می‌کند. +Comment[fr]=Fournit un moyen de naviguer et d'interagir avec les fichiers source du projet actuel. +Comment[gl]=Proporciona unha maneira de navegar e interactuar cos ficheiros fonte do proxecto actual. +Comment[hu]=Lehetővé teszi az aktuális projekthez tartozó forrásfájlok áttekintését, kezelését +Comment[it]=Offre un modo per navigare e interagire con il file sorgente del progetto attuale. +Comment[ja]=現在のプロジェクトのソースファイルでナビゲーションおよび対話する方法を提供します。 +Comment[ms]=Menyediakan cara untuk pandu arah dan berinteraksi dengan fail sumber bagi projek semasa. +Comment[nds]=Stellt Ünnerstütten bi't Stüern binnen un för't Hanteren vun de Borndateien vun't aktuelle Projekt praat. +Comment[ne]=हालको परियोजनाको स्रोत फाइलसँग नेभिगेटिङ र अन्तरक्रिया गर्ने तरिका प्रदान गर्दछ । +Comment[nl]=Handig bladeren en zoeken in de broncode-bestanden van het huidige project. +Comment[pl]=Umożliwia metodę nawigacji i interacji z plikami źródłowymi bieżącego projektu. +Comment[pt]=Oferece uma forma de navegar e de interagir com os ficheiros de código do projecto actual. +Comment[pt_BR]=Fornece uma maneira de navegar e interagir com arquivos fonte do projeto atual. +Comment[ru]=Предоставляет способ навигации и взаимодействия с исходными файлами в каталоге текущего проекта. +Comment[sk]=Umožní navigáciu a interakciu so zdrojovými súbormi v aktálnom projekte. +Comment[sr]=Обезбеђује начин навигације и рада са фајловима изворног кôда текућег пројекта. +Comment[sr@Latn]=Obezbeđuje način navigacije i rada sa fajlovima izvornog kôda tekućeg projekta. +Comment[sv]=Erbjuder ett sätt att navigera och arbeta med källkodsfilerna i det aktuella projektet. +Comment[ta]=நடப்பு திட்ட பணியில் உள்ள மூல கோப்பிற்கு வழி செலுத்த மற்றும் உறையாட இது வழி செலுத்தும். +Comment[tg]=Тариқи навигатсияро ва ҳангоми ҳамкорӣ намудан бо файлҳои берунии дар каталоги лоиҳаи ҷорӣ имкон медиҳад. +Comment[tr]=Geçerli projenin kaynak dosyalarında gezinme ve onlarla etkileşime geçme yolu sunar. +Comment[zh_CN]=提供当前工程源文件的浏览和相互关系。 +Comment[zh_TW]=提供目前專案的程式源碼檔的導覽與互動。 +Name=KDevFileView +Name[da]=TDevelop filvisning +Name[de]=Dateibaum (TDevelop) +Name[hi]=के-डेव-फ़ाइल-व्यू +Name[nds]=TDevelop-Dateiboom +Name[pl]=KDevWidokPliku +Name[sk]=KDev pohľad na súbor +Name[sv]=TDevelop filvisning +Name[ta]=KDev கோப்பு காட்சி +Name[tg]=Намоиши файл KDev +Name[zh_TW]=TDevelop 檔案檢視 +GenericName=File Tree +GenericName[br]=Gwezenn restr +GenericName[ca]=Arbre de fitxers +GenericName[da]=Filtræ +GenericName[de]=Dateibaum +GenericName[el]=Δέντρο αρχείων +GenericName[es]=Árbol de archivos +GenericName[et]=Failipuu +GenericName[eu]=Fitxategi zuhaitza +GenericName[fa]=درخت پرونده +GenericName[fr]=Arborescence de fichiers +GenericName[gl]=Árbore de arquivos +GenericName[hi]=फ़ाइल ट्री +GenericName[hu]=Fájl-fa +GenericName[it]=Albero file +GenericName[ja]=ファイルツリー +GenericName[ms]=Pepohon Fail +GenericName[nds]=Dateiboom +GenericName[ne]=फाइल ट्रि +GenericName[nl]=Bestandsboomstructuur +GenericName[pl]=Drzewo plików +GenericName[pt]=Árvore de Ficheiros +GenericName[pt_BR]=Árvore de Arquivo +GenericName[ru]=Дерево файлов +GenericName[sk]=Strom súborov +GenericName[sl]=Datotečno drevo +GenericName[sr]=Дрво фајлова +GenericName[sr@Latn]=Drvo fajlova +GenericName[sv]=Filträd +GenericName[ta]=கோப்பு மரம் +GenericName[tg]=Дарахти файлҳо +GenericName[tr]=Dosya Ağacı +GenericName[zh_CN]=文件树 +GenericName[zh_TW]=檔案樹 +ServiceTypes=TDevelop/Plugin +Icon=folder +X-TDE-Library=libkdevfileview +X-TDevelop-Version=5 +X-TDevelop-Scope=Project +X-TDevelop-Properties=ProjectFileManagement diff --git a/parts/fileview/partwidget.cpp b/parts/fileview/partwidget.cpp index 49cfe7d5..bf68de83 100644 --- a/parts/fileview/partwidget.cpp +++ b/parts/fileview/partwidget.cpp @@ -22,10 +22,10 @@ #include #include -#include "tdevversioncontrol.h" -#include "tdevcore.h" -#include "tdevproject.h" -#include "tdevmainwindow.h" +#include "kdevversioncontrol.h" +#include "kdevcore.h" +#include "kdevproject.h" +#include "kdevmainwindow.h" #include "fileviewpart.h" #include "filetreewidget.h" @@ -40,7 +40,7 @@ PartWidget::PartWidget( FileViewPart *part, TQWidget *parent ) { Q_ASSERT( part && parent ); - TDevVCSFileInfoProvider *infoProvider = 0; + KDevVCSFileInfoProvider *infoProvider = 0; if (part && part->versionControl() && part->versionControl()->fileInfoProvider()) infoProvider = part->versionControl()->fileInfoProvider(); diff --git a/parts/fileview/tdevfilegroups.desktop b/parts/fileview/tdevfilegroups.desktop deleted file mode 100644 index 4c04c274..00000000 --- a/parts/fileview/tdevfilegroups.desktop +++ /dev/null @@ -1,86 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Allows for grouping of project files according to filename patterns. -Comment[ca]=Permet l'agrupació de fitxers del projecte d'acord als patrons dels noms de fitxer. -Comment[da]=Tillader gruppering af projektfiler efter filnavnemønstre. -Comment[de]=Erlaubt die Gruppierung von Projektdateien nach Dateimustern. -Comment[el]=Επιτρέπει την ομαδοποίηση των αρχείων του έργου σύμφωνα με διάφορα μοτίβα. -Comment[es]=Permite la agrupación de archivos del proyecto de acuerdo a patrones en sus nombres. -Comment[et]=Võimaldab rühmitada projekti faile vastavalt failinimede mustritele. -Comment[eu]=Proiektu fitxategiak fitxategi-izen ereduen arabera taldekatzeko aukera ematen du. -Comment[fa]=اجازۀ گروه کردن پرونده‌های پروژه را طبق الگوهای نام پرونده می‌دهد. -Comment[fr]=Permet de grouper des fichiers projet en fonction des motifs de noms de fichier. -Comment[gl]=Permite o agrupamento dos arquivos do proxecto seguindo patróns nos seus nomes. -Comment[hi]=फ़ाइल-नाम पैटर्न के आधार पर परियोजना फ़ाइलों का समूह बनाना स्वीकारता है. -Comment[hu]=Lehetővé teszi projektfájlok csoportosítását fájlnévminta alapján -Comment[it]=Permette il raggruppamento dei file di progetto per schemi del nome file. -Comment[ja]=ファイル名のパターンによりプロジェクトファイルのグルーピングを可能にします。 -Comment[ms]=Membenarkan pengumpulan bagi fail projek mengikut corak namafail. -Comment[nds]=Maakt dat Sorteren vun Projektdateien na Dateinaam-Mustern mööglich. -Comment[ne]=फाइल नाम बाँन्की अनुसार परियोजना फाइलहरू समूहबद्ध गर्न अनुमति दिन्छ । -Comment[nl]=Groepeert projectbestanden op grond van patronen in bestandsnamen. -Comment[pl]=Umożliwia grupowanie plików projektu zgodnie z wzorcami nazw plików. -Comment[pt]=Permite o agrupamento de ficheiros de projecto, de acordo com padrões de nomes de ficheiros. -Comment[pt_BR]=Permite agrupar arquivos de projetos de acordo com padrões de nome de arquivo. -Comment[ru]=Позволяет группировать файлы в проекте согласно шаблонам имён. -Comment[sk]=Umožní zoskupenie projektových súborov podľa vzoru mien súborov. -Comment[sr]=Дозвољава груписање пројектних фајлова према облицима имена фајлова. -Comment[sr@Latn]=Dozvoljava grupisanje projektnih fajlova prema oblicima imena fajlova. -Comment[sv]=Tillåter att projektfiler grupperas enligt filnamnsmönster. -Comment[ta]=திட்ட பணிகோப்புகளை கோப்பின் பெயர் அடிப்படையில் அதனை குழுவாக பிரிக்கும். -Comment[tg]=Барои файлҳои дар номҳои қолиб имкон медиҳад. -Comment[tr]=Dosya adı desenlerine göre proje dosyalarının gruplanmasını sağlar. -Comment[zh_CN]=允许你根据文件名模式规类工程文件。 -Comment[zh_TW]=允許專案檔案根據檔名樣式來分群組。 -Name=TDevFileGroups -Name[da]=TDevelop filgrupper -Name[de]=Dateigruppen-Komponente (TDevelop) -Name[hi]=के-डेव-फ़ाइल-ग्रुप्स -Name[nds]=TDevelop-Dateikoppeln -Name[pl]=KDevGrupyPlików -Name[sk]=KDev zoskupenie súborov -Name[sv]=TDevelop filgrupper -Name[ta]=KDev கோப்பு குழுக்கள் -Name[tg]=Гурӯҳҳои файли KDev -Name[zh_TW]=TDevelop 檔案群組 -GenericName=File Groups -GenericName[br]=Strolladoù a restroù -GenericName[ca]=Grups de fitxers -GenericName[da]=Filgrupper -GenericName[de]=Dateigruppen -GenericName[el]=Ομάδες αρχείων -GenericName[es]=Grupos de archivos -GenericName[et]=Failigrupid -GenericName[eu]=Fitxategi taldeak -GenericName[fa]=گروههای پرونده -GenericName[fr]=Groupes de fichiers -GenericName[gl]=Grupos de arquivos -GenericName[hi]=फ़ाइल समूह -GenericName[hu]=Fájlcsoportok -GenericName[it]=Gruppi file -GenericName[ja]=ファイルグループ -GenericName[ms]=Kumpulan Fail -GenericName[nds]=Dateikoppeln -GenericName[ne]=फाइल समूह -GenericName[nl]=Bestandsgroepen -GenericName[pl]=Grupy plików -GenericName[pt]=Grupos de Ficheiros -GenericName[pt_BR]=Grupos de Arquivo -GenericName[ru]=Группы файлов -GenericName[sk]=Zoskupenie súborov -GenericName[sl]=Skupine datotek -GenericName[sr]=Групе фајлова -GenericName[sr@Latn]=Grupe fajlova -GenericName[sv]=Filgrupper -GenericName[ta]=கோப்புக்குழுக்கள் -GenericName[tg]=Гурӯҳи файлҳо -GenericName[tr]=Dosya Grupları -GenericName[zh_CN]=文件分组 -GenericName[zh_TW]=檔案群組 -ServiceTypes=TDevelop/Plugin -Icon=attach -X-TDE-Library=libtdevfilegroups -X-TDevelop-Version=5 -X-TDevelop-Scope=Project -X-TDevelop-Properties=ProjectFileGroupsManagement diff --git a/parts/fileview/tdevfileview.desktop b/parts/fileview/tdevfileview.desktop deleted file mode 100644 index b589b5ef..00000000 --- a/parts/fileview/tdevfileview.desktop +++ /dev/null @@ -1,85 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Provides a way of navigating and interacting with the source files of the current project. -Comment[ca]=Proporciona un mètode de navegació i interacció amb els fitxers de codi font del projecte actual. -Comment[da]=Sørger for en måde at navigere og interagere med kildefiler for dette projekt. -Comment[de]=Bietet Funktionalität zur Navigation und zum Umgang mit den Quelltexten des aktuellen Projektes. -Comment[el]=Προσφέρει μια μέθοδο πλοήγησης και αλληλεπίδρασης με τα αρχεία πηγαίου κώδικα του τρέχοντος έργου. -Comment[es]=Proporciona un método de navegación e interacción con los archivos de código fuente del proyecto actual. -Comment[et]=Võimaldab aktiivse projekti lähtekoodifailide vahel liikuda ja neis üht-teist ette võtta. -Comment[eu]=Uneko proiektuko itruburu fitxategiekin lan egiteko eta hauen artean nabigatzeko aukera ematen du. -Comment[fa]=راهی برای ناوش و تعامل با پرونده‌های منبع پروژۀ جاری را فراهم می‌کند. -Comment[fr]=Fournit un moyen de naviguer et d'interagir avec les fichiers source du projet actuel. -Comment[gl]=Proporciona unha maneira de navegar e interactuar cos ficheiros fonte do proxecto actual. -Comment[hu]=Lehetővé teszi az aktuális projekthez tartozó forrásfájlok áttekintését, kezelését -Comment[it]=Offre un modo per navigare e interagire con il file sorgente del progetto attuale. -Comment[ja]=現在のプロジェクトのソースファイルでナビゲーションおよび対話する方法を提供します。 -Comment[ms]=Menyediakan cara untuk pandu arah dan berinteraksi dengan fail sumber bagi projek semasa. -Comment[nds]=Stellt Ünnerstütten bi't Stüern binnen un för't Hanteren vun de Borndateien vun't aktuelle Projekt praat. -Comment[ne]=हालको परियोजनाको स्रोत फाइलसँग नेभिगेटिङ र अन्तरक्रिया गर्ने तरिका प्रदान गर्दछ । -Comment[nl]=Handig bladeren en zoeken in de broncode-bestanden van het huidige project. -Comment[pl]=Umożliwia metodę nawigacji i interacji z plikami źródłowymi bieżącego projektu. -Comment[pt]=Oferece uma forma de navegar e de interagir com os ficheiros de código do projecto actual. -Comment[pt_BR]=Fornece uma maneira de navegar e interagir com arquivos fonte do projeto atual. -Comment[ru]=Предоставляет способ навигации и взаимодействия с исходными файлами в каталоге текущего проекта. -Comment[sk]=Umožní navigáciu a interakciu so zdrojovými súbormi v aktálnom projekte. -Comment[sr]=Обезбеђује начин навигације и рада са фајловима изворног кôда текућег пројекта. -Comment[sr@Latn]=Obezbeđuje način navigacije i rada sa fajlovima izvornog kôda tekućeg projekta. -Comment[sv]=Erbjuder ett sätt att navigera och arbeta med källkodsfilerna i det aktuella projektet. -Comment[ta]=நடப்பு திட்ட பணியில் உள்ள மூல கோப்பிற்கு வழி செலுத்த மற்றும் உறையாட இது வழி செலுத்தும். -Comment[tg]=Тариқи навигатсияро ва ҳангоми ҳамкорӣ намудан бо файлҳои берунии дар каталоги лоиҳаи ҷорӣ имкон медиҳад. -Comment[tr]=Geçerli projenin kaynak dosyalarında gezinme ve onlarla etkileşime geçme yolu sunar. -Comment[zh_CN]=提供当前工程源文件的浏览和相互关系。 -Comment[zh_TW]=提供目前專案的程式源碼檔的導覽與互動。 -Name=TDevFileView -Name[da]=TDevelop filvisning -Name[de]=Dateibaum (TDevelop) -Name[hi]=के-डेव-फ़ाइल-व्यू -Name[nds]=TDevelop-Dateiboom -Name[pl]=KDevWidokPliku -Name[sk]=KDev pohľad na súbor -Name[sv]=TDevelop filvisning -Name[ta]=KDev கோப்பு காட்சி -Name[tg]=Намоиши файл KDev -Name[zh_TW]=TDevelop 檔案檢視 -GenericName=File Tree -GenericName[br]=Gwezenn restr -GenericName[ca]=Arbre de fitxers -GenericName[da]=Filtræ -GenericName[de]=Dateibaum -GenericName[el]=Δέντρο αρχείων -GenericName[es]=Árbol de archivos -GenericName[et]=Failipuu -GenericName[eu]=Fitxategi zuhaitza -GenericName[fa]=درخت پرونده -GenericName[fr]=Arborescence de fichiers -GenericName[gl]=Árbore de arquivos -GenericName[hi]=फ़ाइल ट्री -GenericName[hu]=Fájl-fa -GenericName[it]=Albero file -GenericName[ja]=ファイルツリー -GenericName[ms]=Pepohon Fail -GenericName[nds]=Dateiboom -GenericName[ne]=फाइल ट्रि -GenericName[nl]=Bestandsboomstructuur -GenericName[pl]=Drzewo plików -GenericName[pt]=Árvore de Ficheiros -GenericName[pt_BR]=Árvore de Arquivo -GenericName[ru]=Дерево файлов -GenericName[sk]=Strom súborov -GenericName[sl]=Datotečno drevo -GenericName[sr]=Дрво фајлова -GenericName[sr@Latn]=Drvo fajlova -GenericName[sv]=Filträd -GenericName[ta]=கோப்பு மரம் -GenericName[tg]=Дарахти файлҳо -GenericName[tr]=Dosya Ağacı -GenericName[zh_CN]=文件树 -GenericName[zh_TW]=檔案樹 -ServiceTypes=TDevelop/Plugin -Icon=folder -X-TDE-Library=libtdevfileview -X-TDevelop-Version=5 -X-TDevelop-Scope=Project -X-TDevelop-Properties=ProjectFileManagement diff --git a/parts/fileview/vcsfiletreewidgetimpl.cpp b/parts/fileview/vcsfiletreewidgetimpl.cpp index e08068db..450a6a58 100644 --- a/parts/fileview/vcsfiletreewidgetimpl.cpp +++ b/parts/fileview/vcsfiletreewidgetimpl.cpp @@ -18,7 +18,7 @@ #include #include -//#include +//#include #include #include @@ -127,13 +127,13 @@ class VCSFileTreeBranchItem : public filetreeview::FileTreeBranchItem { public: VCSFileTreeBranchItem( KFileTreeView* view, const KURL& url, const TQString& name, const TQPixmap& pix, - TDevVCSFileInfoProvider *vcsInfoProvider ) + KDevVCSFileInfoProvider *vcsInfoProvider ) : FileTreeBranchItem( view, url, name, pix ), m_vcsInfoProvider( vcsInfoProvider ) {} // virtual ~VCSFileTreeBranchItem() {} virtual KFileTreeViewItem* createTreeViewItem( KFileTreeViewItem* parent, KFileItem* fileItem ); private: - TDevVCSFileInfoProvider *m_vcsInfoProvider; + KDevVCSFileInfoProvider *m_vcsInfoProvider; }; /////////////////////////////////////////////////////////////////////////////// @@ -169,20 +169,20 @@ KFileTreeViewItem* VCSFileTreeBranchItem::createTreeViewItem( KFileTreeViewItem* class VCSBranchItemFactory : public filetreeview::BranchItemFactory { public: - VCSBranchItemFactory( TDevVCSFileInfoProvider *vcsInfoProvider ) : m_vcsInfoProvider( vcsInfoProvider ) {} + VCSBranchItemFactory( KDevVCSFileInfoProvider *vcsInfoProvider ) : m_vcsInfoProvider( vcsInfoProvider ) {} virtual filetreeview::FileTreeBranchItem *makeBranchItem( KFileTreeView* view, const KURL& url, const TQString& name, const TQPixmap& pix ) { return new VCSFileTreeBranchItem( view, url, name, pix, m_vcsInfoProvider ); } private: - TDevVCSFileInfoProvider *m_vcsInfoProvider; + KDevVCSFileInfoProvider *m_vcsInfoProvider; }; /////////////////////////////////////////////////////////////////////////////// // class VCSFileTreeWidgetImpl /////////////////////////////////////////////////////////////////////////////// -VCSFileTreeWidgetImpl::VCSFileTreeWidgetImpl( FileTreeWidget *parent, TDevVCSFileInfoProvider *infoProvider ) +VCSFileTreeWidgetImpl::VCSFileTreeWidgetImpl( FileTreeWidget *parent, KDevVCSFileInfoProvider *infoProvider ) : FileTreeViewWidgetImpl( parent, "vcsfiletreewidgetimpl" ), m_actionToggleShowVCSFields( 0 ), m_actionSyncWithRepository( 0 ), m_vcsInfoProvider( infoProvider ), m_isSyncingWithRepository( false ), m_vcsStatusRequestedItem( 0 ) @@ -216,7 +216,7 @@ VCSFileTreeWidgetImpl::VCSFileTreeWidgetImpl( FileTreeWidget *parent, TDevVCSFil m_actionSyncWithRepository->setWhatsThis( aboutAction ); TQDomDocument &dom = projectDom(); - m_actionToggleShowVCSFields->setChecked( DomUtil::readBoolEntry(dom, "/tdevfileview/tree/showvcsfields") ); + m_actionToggleShowVCSFields->setChecked( DomUtil::readBoolEntry(dom, "/kdevfileview/tree/showvcsfields") ); slotToggleShowVCSFields( showVCSFields() ); // show or hide fields depending on read settings connect( parent, TQT_SIGNAL(expanded(TQListViewItem*)), this, TQT_SLOT(slotDirectoryExpanded(TQListViewItem*))); } @@ -228,7 +228,7 @@ VCSFileTreeWidgetImpl::~VCSFileTreeWidgetImpl() kdDebug(9017) << "VCSFileTreeWidgetImpl::~VCSFileTreeWidgetImpl()" << endl; TQDomDocument &dom = projectDom(); - DomUtil::writeBoolEntry( dom, "/tdevfileview/tree/showvcsfields", showVCSFields() ); + DomUtil::writeBoolEntry( dom, "/kdevfileview/tree/showvcsfields", showVCSFields() ); } /////////////////////////////////////////////////////////////////////////////// diff --git a/parts/fileview/vcsfiletreewidgetimpl.h b/parts/fileview/vcsfiletreewidgetimpl.h index 928fe544..00a38b32 100644 --- a/parts/fileview/vcsfiletreewidgetimpl.h +++ b/parts/fileview/vcsfiletreewidgetimpl.h @@ -14,7 +14,7 @@ #include "filetreeviewwidgetimpl.h" -class TDevVCSFileInfoProvider; +class KDevVCSFileInfoProvider; class TDEAction; class TDEToggleAction; @@ -27,7 +27,7 @@ class VCSFileTreeWidgetImpl : public FileTreeViewWidgetImpl Q_OBJECT public: - VCSFileTreeWidgetImpl( FileTreeWidget *parent, TDevVCSFileInfoProvider *infoProvider ); + VCSFileTreeWidgetImpl( FileTreeWidget *parent, KDevVCSFileInfoProvider *infoProvider ); virtual ~VCSFileTreeWidgetImpl(); /* @@ -44,7 +44,7 @@ private slots: //! show/hide the header and the additional fields (status and versions) void slotToggleShowVCSFields( bool checked ); //! start a sync operation with the remote repository: this may take a while so we use - //! the async interface provided by the TDevVCSFileInfoProvider interface + //! the async interface provided by the KDevVCSFileInfoProvider interface void slotSyncWithRepository(); //! when the requested info are ready the infoProvider object will be so kind the //! to give them to us in a ready-to-use format: we'll use that info to update all @@ -58,7 +58,7 @@ private: TDEToggleAction *m_actionToggleShowVCSFields; TDEAction *m_actionSyncWithRepository; - TDevVCSFileInfoProvider *m_vcsInfoProvider; + KDevVCSFileInfoProvider *m_vcsInfoProvider; //! We use this guard to avoid enabling the "reload tree" action when performing //! syncing with remote repositories. bool m_isSyncingWithRepository; diff --git a/parts/filter/CMakeLists.txt b/parts/filter/CMakeLists.txt index 7665f6f1..095144d3 100644 --- a/parts/filter/CMakeLists.txt +++ b/parts/filter/CMakeLists.txt @@ -26,16 +26,16 @@ link_directories( ##### other data ################################ -install( FILES tdevfilter.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevfilter.rc DESTINATION ${DATA_INSTALL_DIR}/tdevfilter ) +install( FILES kdevfilter.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevfilter.rc DESTINATION ${DATA_INSTALL_DIR}/kdevfilter ) -##### libtdevfilter (module) #################### +##### libkdevfilter (module) #################### -tde_add_kpart( libtdevfilter AUTOMOC +tde_add_kpart( libkdevfilter AUTOMOC SOURCES filterpart.cpp shellfilterdlg.cpp shellinsertdlg.cpp - tdevfilterIface.cpp tdevfilterIface.skel + kdevfilterIface.cpp kdevfilterIface.skel LINK tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/parts/filter/Makefile.am b/parts/filter/Makefile.am index 4a3fe722..f68b0cf6 100644 --- a/parts/filter/Makefile.am +++ b/parts/filter/Makefile.am @@ -2,16 +2,16 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevfilter.la -libtdevfilter_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevfilter_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevfilter.la +libkdevfilter_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevfilter_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevfilter_la_SOURCES = filterpart.cpp shellfilterdlg.cpp shellinsertdlg.cpp tdevfilterIface.cpp tdevfilterIface.skel +libkdevfilter_la_SOURCES = filterpart.cpp shellfilterdlg.cpp shellinsertdlg.cpp kdevfilterIface.cpp kdevfilterIface.skel METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevfilter.desktop +service_DATA = kdevfilter.desktop -rcdir = $(kde_datadir)/tdevfilter -rc_DATA = tdevfilter.rc +rcdir = $(kde_datadir)/kdevfilter +rc_DATA = kdevfilter.rc diff --git a/parts/filter/filterpart.cpp b/parts/filter/filterpart.cpp index 3ee5029a..5ebd265e 100644 --- a/parts/filter/filterpart.cpp +++ b/parts/filter/filterpart.cpp @@ -19,21 +19,21 @@ #include #include -#include "tdevcore.h" -#include "tdevpartcontroller.h" -#include "tdevplugininfo.h" +#include "kdevcore.h" +#include "kdevpartcontroller.h" +#include "kdevplugininfo.h" #include "shellfilterdlg.h" #include "shellinsertdlg.h" -#include "tdevfilterIface.h" +#include "kdevfilterIface.h" -static const TDevPluginInfo data("tdevfilter"); -K_EXPORT_COMPONENT_FACTORY( libtdevfilter, FilterFactory( data ) ) +static const KDevPluginInfo data("kdevfilter"); +K_EXPORT_COMPONENT_FACTORY( libkdevfilter, FilterFactory( data ) ) FilterPart::FilterPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin(&data, parent, name ? name : "FilterPart") + : KDevPlugin(&data, parent, name ? name : "FilterPart") { setInstance(FilterFactory::instance()); - setXMLFile("tdevfilter.rc"); + setXMLFile("kdevfilter.rc"); TDEAction *action; @@ -52,7 +52,7 @@ FilterPart::FilterPart(TQObject *parent, const char *name, const TQStringList &) m_insertDialog = 0; m_filterDialog = 0; - new TDevFilterIface( this ); + new KDevFilterIface( this ); // (void) dcopClient(); } diff --git a/parts/filter/filterpart.h b/parts/filter/filterpart.h index b1eac334..b8322425 100644 --- a/parts/filter/filterpart.h +++ b/parts/filter/filterpart.h @@ -12,14 +12,14 @@ #ifndef _FILTERPART_H_ #define _FILTERPART_H_ -#include -#include "tdevplugin.h" +#include +#include "kdevplugin.h" class ShellInsertDialog; class ShellFilterDialog; -class FilterPart : public TDevPlugin +class FilterPart : public KDevPlugin { Q_OBJECT @@ -37,6 +37,6 @@ private: ShellFilterDialog *m_filterDialog; }; -typedef TDevGenericFactory FilterFactory; +typedef KDevGenericFactory FilterFactory; #endif diff --git a/parts/filter/kdevfilter.desktop b/parts/filter/kdevfilter.desktop new file mode 100644 index 00000000..1ce8122a --- /dev/null +++ b/parts/filter/kdevfilter.desktop @@ -0,0 +1,82 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Provides a way of manipulating editor text using commandline tools. Appears in the Tools menu. +Comment[ca]=Proporciona un mètode per a manipular text a l'editor emprant eines de la línia de comandaments. Apareix al menú Eines. +Comment[da]=Sørger for en måde at manipulere editortekst ved brug af kommandolinje værktøjer. Viser sig i værktøjsmenuen. +Comment[de]=Ermöglicht die Bearbeitung von Editorinhalten mit Konsolenanwendungen. Erscheint im Menü Werkzeuge. +Comment[el]=Προσφέρει μια μέθοδο διαχείρισης κειμένου επεξεργαστή χρησιμοποιώντας εργαλεία γραμμής εντολών. Εμφανίζεται στο μενού εργαλείων. +Comment[es]=Proporciona un método para manipular texto del editor utilizando herramientas de la línea de órdenes. Aparece en el menú Herramientas. +Comment[et]=Võimaldab käsureavahendite abil käsitleda redaktoris olevat teksti. Kättesaadav tööriistade menüüst. +Comment[eu]=Komando-lerro tresnak erabiliz editore testua manipulatzeko aukera ematen dizu. Tresnak menuan dago. +Comment[fa]=راهی برای دستکاری متن ویرایشگر، با استفاده از ابزار خط فرمان فراهم می‌کند. در گزینگان ابزار ظاهر می‌شود. +Comment[fr]=Fournit un moyen de manipuler le texte de l'éditeur à l'aide d'outils en ligne de commande. Cette fonction apparaît dans le menu « Outils ». +Comment[gl]=Proporciona unha maneira para manipular o texto do editor usando ferramentas da liña de comandos. Aparece no menú Ferramentas. +Comment[hu]=Lehetővé teszi a szerkesztett szövegek kezelését parancssoros programokból (az Eszközök menüből érhető el) +Comment[it]=Offre un modo per manipolare il testo utilizzando strumenti a riga di comando. Appare nel menu degli strumenti. +Comment[ja]=コマンドラインツールを使用して、エディタテキストを操作する方法を提供します。ツールメニューに現れます。 +Comment[ms]=Menyediakan cara untuk memanipulasi teks penyunting menggunakan alatan arahan baris. Muncul didalam menu Alatan. +Comment[nds]=Stellt dat Ännern vun Editorinholden mit Befehlsreeg-Warktüüch praat. Dukt in't Menü "Warktüüch" op. +Comment[ne]=आदेशरेखा उपकरण प्रयोग गरेर सम्पादक चलाउने तरिका प्रदान गर्दछ । +Comment[nl]=Maakt het mogelijk de tekstinhoud van de editor met externe commandoregeltools te bewerken. Verschijnt in het menu Gereedschap. +Comment[pl]=Umożliwia manipulowanie tekstem w edytorze za pomocą narzędzi linii komend. Pojawia się w menu Narzędzia. +Comment[pt]=Oferece uma forma de manipular o texto do edito com as ferramentas da linha de comandos. Aparece no menu de Ferramentas. +Comment[pt_BR]=Fornece uma maneira de manipular o editor de texto usando ferramentas de linha de comando. Aparece no menu Ferramentas. +Comment[ru]=Предоставляет функции работы с текстом в редакторе с использованием утилит командной строки. +Comment[sk]=Umožní manipuláciu s textom editora s použitím nástrojov príkazového riadku. Objaví sa v menu Nástroje. +Comment[sr]=Обезбеђује начин манипулисања текстом уређивача коришћењем алата командне линије. Појављује се у менију „Алати“. +Comment[sr@Latn]=Obezbeđuje način manipulisanja tekstom uređivača korišćenjem alata komandne linije. Pojavljuje se u meniju „Alati“. +Comment[sv]=Erbjuder ett sätt att behandla editortext med kommandoradsverktyg. Finns i verktygsmenyn. +Comment[ta]=கட்டளை கருவி உபயோகித்து தொகுப்பான் உறைகளை கையாள இது வழி அளிக்கும். கருவிப்பட்டியலில் இது தோன்றும் +Comment[tg]=Вазифаи корҳо бо матнҳои дар муҳаррир буда бо истифодаи фармони сатр гузориш менамояд. +Comment[tr]=Komut satırı araçlarını kullanarak düzenleyici metni işlemek için bir yol sunar. Araçlar menüsünde durur. +Comment[zh_CN]=使用命令行工具操作编辑器文字。显示在工具菜单中。 +Comment[zh_TW]=提供使用命令列工具操作編輯器文字的方法。會出現在工具選單中。 +Name=KDevFilter +Name[da]=TDevelop filter +Name[de]=Filter (TDevelop) +Name[hi]=के-डेव-फ़िल्टर +Name[nds]=TDevelop-Filter +Name[pl]=KDevFiltr +Name[sk]=KDev filter +Name[sv]=TDevelop filter +Name[ta]=KDev வடிகட்டல் +Name[tg]=Филтри KDev +Name[zh_TW]=TDevelop 過濾器 +GenericName=Shell Filtering and Insertion +GenericName[ca]=Inserció i filtrat de la línia de comandaments +GenericName[da]=Skal-filtrering og indsætning +GenericName[de]=Filtern und Einfügen über Shell-Befehle +GenericName[el]=Εισαγωγή και φιλτράρισμα κελύφους +GenericName[es]=Inserción y filtrado en línea de órdenes +GenericName[et]=Shellifiltrid ja lisamine +GenericName[eu]=Shell iragazte eta txertatzea +GenericName[fa]=پالایش و درج پوسته +GenericName[fr]=Filtrage et insertion dans le shell +GenericName[gl]=Inserción e filtrado shell +GenericName[hi]=शेल फ़िल्टरिंग तथा प्रविष्टि +GenericName[hu]=Szűrés és beszúrás +GenericName[it]=Inserimento e filtraggio da shell +GenericName[ja]=シェルフィルタリングと挿入 +GenericName[nds]=Filtern un Infögen mit Konsool-Befehlen +GenericName[ne]=शेल फिल्टरिङ र घुसाइ +GenericName[nl]=Filteren en invoegen met shellcommando's +GenericName[pl]=Filtrowanie i wstawianie za pomocą powłoki +GenericName[pt]=Filtragem e Inserção por 'Shell' +GenericName[pt_BR]=Shell de Filtro e Inserção +GenericName[ru]=Фильтрация и вставка с помощью команд оболочки +GenericName[sk]=Shell filtrovanie a vkladanie +GenericName[sl]=Filtriranje lupine in vstavljanje +GenericName[sr]=Филтрирање и убацивање шкољке +GenericName[sr@Latn]=Filtriranje i ubacivanje školjke +GenericName[sv]=Skalfiltrering och infogning +GenericName[ta]=உறையகத்தை வடிகட்ட மற்றும் சேர்க்க +GenericName[tg]=Бо пӯсти фармон филтр ва мондан +GenericName[tr]=Kabuk filtreleme ve Ekleme +GenericName[zh_CN]=Shell 过滤和插入 +GenericName[zh_TW]=Shell 過濾與插入 +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevfilter +X-TDevelop-Version=5 +X-TDevelop-Scope=Global +X-TDevelop-Properties=OptionalCodeEditing diff --git a/parts/filter/kdevfilter.rc b/parts/filter/kdevfilter.rc new file mode 100644 index 00000000..6f7f9053 --- /dev/null +++ b/parts/filter/kdevfilter.rc @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/parts/filter/kdevfilterIface.cpp b/parts/filter/kdevfilterIface.cpp new file mode 100644 index 00000000..3df749a4 --- /dev/null +++ b/parts/filter/kdevfilterIface.cpp @@ -0,0 +1,35 @@ +// +// +// C++ Implementation: cpp +// +// Description: +// +// +// Author: KDevelop Authors , (C) 2003 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#include "kdevfilterIface.h" +#include "filterpart.h" + +KDevFilterIface::KDevFilterIface( FilterPart* part ) + : TQObject( part ), DCOPObject( "KDevFilter" ), m_part( part ) +{ +} + +KDevFilterIface::~KDevFilterIface() +{ +} + +void KDevFilterIface::shellInsert() +{ + m_part->slotShellInsert(); +} + +void KDevFilterIface::shellFilter() +{ + m_part->slotShellFilter(); +} + +#include "kdevfilterIface.moc" diff --git a/parts/filter/kdevfilterIface.h b/parts/filter/kdevfilterIface.h new file mode 100644 index 00000000..fae74022 --- /dev/null +++ b/parts/filter/kdevfilterIface.h @@ -0,0 +1,27 @@ + +#ifndef KDEVFILTERIFACE_H +#define KDEVFILTERIFACE_H + +#include +#include + +class FilterPart; + +class KDevFilterIface : public TQObject, public DCOPObject +{ + Q_OBJECT +// + K_DCOP +public: + KDevFilterIface( FilterPart* part ); + ~KDevFilterIface(); + +k_dcop: + void shellInsert(); + void shellFilter(); + +private: + FilterPart* m_part; +}; + +#endif diff --git a/parts/filter/shellfilterdlg.cpp b/parts/filter/shellfilterdlg.cpp index 7d3d0ff5..a5100d5b 100644 --- a/parts/filter/shellfilterdlg.cpp +++ b/parts/filter/shellfilterdlg.cpp @@ -23,7 +23,7 @@ #include #include -#include "tdevplugin.h" +#include "kdevplugin.h" #include "domutil.h" #include "filterpart.h" diff --git a/parts/filter/shellfilterdlg.h b/parts/filter/shellfilterdlg.h index cf9812ab..87657501 100644 --- a/parts/filter/shellfilterdlg.h +++ b/parts/filter/shellfilterdlg.h @@ -16,7 +16,7 @@ class TQComboBox; class TQPushButton; -class TDevPlugin; +class KDevPlugin; class TDEProcess; diff --git a/parts/filter/shellinsertdlg.cpp b/parts/filter/shellinsertdlg.cpp index f9d24c19..057e8121 100644 --- a/parts/filter/shellinsertdlg.cpp +++ b/parts/filter/shellinsertdlg.cpp @@ -24,7 +24,7 @@ #include #include -#include "tdevplugin.h" +#include "kdevplugin.h" #include "domutil.h" #include "filterpart.h" diff --git a/parts/filter/shellinsertdlg.h b/parts/filter/shellinsertdlg.h index df3085a1..fda59678 100644 --- a/parts/filter/shellinsertdlg.h +++ b/parts/filter/shellinsertdlg.h @@ -16,7 +16,7 @@ class TQComboBox; class TQPushButton; -class TDevPlugin; +class KDevPlugin; class TDEProcess; diff --git a/parts/filter/tdevfilter.desktop b/parts/filter/tdevfilter.desktop deleted file mode 100644 index 36854737..00000000 --- a/parts/filter/tdevfilter.desktop +++ /dev/null @@ -1,82 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Provides a way of manipulating editor text using commandline tools. Appears in the Tools menu. -Comment[ca]=Proporciona un mètode per a manipular text a l'editor emprant eines de la línia de comandaments. Apareix al menú Eines. -Comment[da]=Sørger for en måde at manipulere editortekst ved brug af kommandolinje værktøjer. Viser sig i værktøjsmenuen. -Comment[de]=Ermöglicht die Bearbeitung von Editorinhalten mit Konsolenanwendungen. Erscheint im Menü Werkzeuge. -Comment[el]=Προσφέρει μια μέθοδο διαχείρισης κειμένου επεξεργαστή χρησιμοποιώντας εργαλεία γραμμής εντολών. Εμφανίζεται στο μενού εργαλείων. -Comment[es]=Proporciona un método para manipular texto del editor utilizando herramientas de la línea de órdenes. Aparece en el menú Herramientas. -Comment[et]=Võimaldab käsureavahendite abil käsitleda redaktoris olevat teksti. Kättesaadav tööriistade menüüst. -Comment[eu]=Komando-lerro tresnak erabiliz editore testua manipulatzeko aukera ematen dizu. Tresnak menuan dago. -Comment[fa]=راهی برای دستکاری متن ویرایشگر، با استفاده از ابزار خط فرمان فراهم می‌کند. در گزینگان ابزار ظاهر می‌شود. -Comment[fr]=Fournit un moyen de manipuler le texte de l'éditeur à l'aide d'outils en ligne de commande. Cette fonction apparaît dans le menu « Outils ». -Comment[gl]=Proporciona unha maneira para manipular o texto do editor usando ferramentas da liña de comandos. Aparece no menú Ferramentas. -Comment[hu]=Lehetővé teszi a szerkesztett szövegek kezelését parancssoros programokból (az Eszközök menüből érhető el) -Comment[it]=Offre un modo per manipolare il testo utilizzando strumenti a riga di comando. Appare nel menu degli strumenti. -Comment[ja]=コマンドラインツールを使用して、エディタテキストを操作する方法を提供します。ツールメニューに現れます。 -Comment[ms]=Menyediakan cara untuk memanipulasi teks penyunting menggunakan alatan arahan baris. Muncul didalam menu Alatan. -Comment[nds]=Stellt dat Ännern vun Editorinholden mit Befehlsreeg-Warktüüch praat. Dukt in't Menü "Warktüüch" op. -Comment[ne]=आदेशरेखा उपकरण प्रयोग गरेर सम्पादक चलाउने तरिका प्रदान गर्दछ । -Comment[nl]=Maakt het mogelijk de tekstinhoud van de editor met externe commandoregeltools te bewerken. Verschijnt in het menu Gereedschap. -Comment[pl]=Umożliwia manipulowanie tekstem w edytorze za pomocą narzędzi linii komend. Pojawia się w menu Narzędzia. -Comment[pt]=Oferece uma forma de manipular o texto do edito com as ferramentas da linha de comandos. Aparece no menu de Ferramentas. -Comment[pt_BR]=Fornece uma maneira de manipular o editor de texto usando ferramentas de linha de comando. Aparece no menu Ferramentas. -Comment[ru]=Предоставляет функции работы с текстом в редакторе с использованием утилит командной строки. -Comment[sk]=Umožní manipuláciu s textom editora s použitím nástrojov príkazového riadku. Objaví sa v menu Nástroje. -Comment[sr]=Обезбеђује начин манипулисања текстом уређивача коришћењем алата командне линије. Појављује се у менију „Алати“. -Comment[sr@Latn]=Obezbeđuje način manipulisanja tekstom uređivača korišćenjem alata komandne linije. Pojavljuje se u meniju „Alati“. -Comment[sv]=Erbjuder ett sätt att behandla editortext med kommandoradsverktyg. Finns i verktygsmenyn. -Comment[ta]=கட்டளை கருவி உபயோகித்து தொகுப்பான் உறைகளை கையாள இது வழி அளிக்கும். கருவிப்பட்டியலில் இது தோன்றும் -Comment[tg]=Вазифаи корҳо бо матнҳои дар муҳаррир буда бо истифодаи фармони сатр гузориш менамояд. -Comment[tr]=Komut satırı araçlarını kullanarak düzenleyici metni işlemek için bir yol sunar. Araçlar menüsünde durur. -Comment[zh_CN]=使用命令行工具操作编辑器文字。显示在工具菜单中。 -Comment[zh_TW]=提供使用命令列工具操作編輯器文字的方法。會出現在工具選單中。 -Name=TDevFilter -Name[da]=TDevelop filter -Name[de]=Filter (TDevelop) -Name[hi]=के-डेव-फ़िल्टर -Name[nds]=TDevelop-Filter -Name[pl]=KDevFiltr -Name[sk]=KDev filter -Name[sv]=TDevelop filter -Name[ta]=KDev வடிகட்டல் -Name[tg]=Филтри KDev -Name[zh_TW]=TDevelop 過濾器 -GenericName=Shell Filtering and Insertion -GenericName[ca]=Inserció i filtrat de la línia de comandaments -GenericName[da]=Skal-filtrering og indsætning -GenericName[de]=Filtern und Einfügen über Shell-Befehle -GenericName[el]=Εισαγωγή και φιλτράρισμα κελύφους -GenericName[es]=Inserción y filtrado en línea de órdenes -GenericName[et]=Shellifiltrid ja lisamine -GenericName[eu]=Shell iragazte eta txertatzea -GenericName[fa]=پالایش و درج پوسته -GenericName[fr]=Filtrage et insertion dans le shell -GenericName[gl]=Inserción e filtrado shell -GenericName[hi]=शेल फ़िल्टरिंग तथा प्रविष्टि -GenericName[hu]=Szűrés és beszúrás -GenericName[it]=Inserimento e filtraggio da shell -GenericName[ja]=シェルフィルタリングと挿入 -GenericName[nds]=Filtern un Infögen mit Konsool-Befehlen -GenericName[ne]=शेल फिल्टरिङ र घुसाइ -GenericName[nl]=Filteren en invoegen met shellcommando's -GenericName[pl]=Filtrowanie i wstawianie za pomocą powłoki -GenericName[pt]=Filtragem e Inserção por 'Shell' -GenericName[pt_BR]=Shell de Filtro e Inserção -GenericName[ru]=Фильтрация и вставка с помощью команд оболочки -GenericName[sk]=Shell filtrovanie a vkladanie -GenericName[sl]=Filtriranje lupine in vstavljanje -GenericName[sr]=Филтрирање и убацивање шкољке -GenericName[sr@Latn]=Filtriranje i ubacivanje školjke -GenericName[sv]=Skalfiltrering och infogning -GenericName[ta]=உறையகத்தை வடிகட்ட மற்றும் சேர்க்க -GenericName[tg]=Бо пӯсти фармон филтр ва мондан -GenericName[tr]=Kabuk filtreleme ve Ekleme -GenericName[zh_CN]=Shell 过滤和插入 -GenericName[zh_TW]=Shell 過濾與插入 -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevfilter -X-TDevelop-Version=5 -X-TDevelop-Scope=Global -X-TDevelop-Properties=OptionalCodeEditing diff --git a/parts/filter/tdevfilter.rc b/parts/filter/tdevfilter.rc deleted file mode 100644 index 4f3d82d9..00000000 --- a/parts/filter/tdevfilter.rc +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/parts/filter/tdevfilterIface.cpp b/parts/filter/tdevfilterIface.cpp deleted file mode 100644 index e0c15687..00000000 --- a/parts/filter/tdevfilterIface.cpp +++ /dev/null @@ -1,35 +0,0 @@ -// -// -// C++ Implementation: cpp -// -// Description: -// -// -// Author: KDevelop Authors , (C) 2003 -// -// Copyright: See COPYING file that comes with this distribution -// -// -#include "tdevfilterIface.h" -#include "filterpart.h" - -TDevFilterIface::TDevFilterIface( FilterPart* part ) - : TQObject( part ), DCOPObject( "TDevFilter" ), m_part( part ) -{ -} - -TDevFilterIface::~TDevFilterIface() -{ -} - -void TDevFilterIface::shellInsert() -{ - m_part->slotShellInsert(); -} - -void TDevFilterIface::shellFilter() -{ - m_part->slotShellFilter(); -} - -#include "tdevfilterIface.moc" diff --git a/parts/filter/tdevfilterIface.h b/parts/filter/tdevfilterIface.h deleted file mode 100644 index 56d2aebf..00000000 --- a/parts/filter/tdevfilterIface.h +++ /dev/null @@ -1,27 +0,0 @@ - -#ifndef TDEVFILTERIFACE_H -#define TDEVFILTERIFACE_H - -#include -#include - -class FilterPart; - -class TDevFilterIface : public TQObject, public DCOPObject -{ - Q_OBJECT -// - K_DCOP -public: - TDevFilterIface( FilterPart* part ); - ~TDevFilterIface(); - -k_dcop: - void shellInsert(); - void shellFilter(); - -private: - FilterPart* m_part; -}; - -#endif diff --git a/parts/fullscreen/CMakeLists.txt b/parts/fullscreen/CMakeLists.txt index 548e4f40..84b45df9 100644 --- a/parts/fullscreen/CMakeLists.txt +++ b/parts/fullscreen/CMakeLists.txt @@ -26,13 +26,13 @@ link_directories( ##### other data ################################ -install( FILES tdevfullscreen.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevpart_fullscreen.rc DESTINATION ${DATA_INSTALL_DIR}/tdevfullscreen ) +install( FILES kdevfullscreen.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevpart_fullscreen.rc DESTINATION ${DATA_INSTALL_DIR}/kdevfullscreen ) -##### libtdevfullscreen (module) ################ +##### libkdevfullscreen (module) ################ -tde_add_kpart( libtdevfullscreen AUTOMOC +tde_add_kpart( libkdevfullscreen AUTOMOC SOURCES fullscreen_part.cpp LINK tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} diff --git a/parts/fullscreen/Makefile.am b/parts/fullscreen/Makefile.am index a05b0bd1..3f039ef6 100644 --- a/parts/fullscreen/Makefile.am +++ b/parts/fullscreen/Makefile.am @@ -1,15 +1,15 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevfullscreen.la -libtdevfullscreen_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevfullscreen_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevfullscreen.la +libkdevfullscreen_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevfullscreen_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevfullscreen_la_SOURCES = fullscreen_part.cpp +libkdevfullscreen_la_SOURCES = fullscreen_part.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevfullscreen.desktop +service_DATA = kdevfullscreen.desktop -rcdir = $(kde_datadir)/tdevfullscreen -rc_DATA = tdevpart_fullscreen.rc +rcdir = $(kde_datadir)/kdevfullscreen +rc_DATA = kdevpart_fullscreen.rc diff --git a/parts/fullscreen/fullscreen_part.cpp b/parts/fullscreen/fullscreen_part.cpp index a73f33f1..22cecb42 100644 --- a/parts/fullscreen/fullscreen_part.cpp +++ b/parts/fullscreen/fullscreen_part.cpp @@ -11,32 +11,32 @@ #include #include -#include +#include #include #include #include -#include -#include -#include +#include +#include +#include #include "fullscreen_part.h" -static const TDevPluginInfo data("tdevfullscreen"); +static const KDevPluginInfo data("kdevfullscreen"); -typedef TDevGenericFactory FullScreenFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevfullscreen, FullScreenFactory( data ) ) +typedef KDevGenericFactory FullScreenFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevfullscreen, FullScreenFactory( data ) ) FullScreenPart::FullScreenPart(TQObject *parent, const char *name, const TQStringList& ) - : TDevPlugin(&data, parent, name ? name : "FullScreenPart" ) + : KDevPlugin(&data, parent, name ? name : "FullScreenPart" ) { setInstance(FullScreenFactory::instance()); // const TDEAboutData &abdata1 = *(info()); // kdDebug() << abdata1.appName() << endl; - const TDevPluginInfo &_info = *info(); + const KDevPluginInfo &_info = *info(); const TDEAboutData *abdata = _info; kdDebug() << abdata->appName() << endl; - setXMLFile("tdevpart_fullscreen.rc"); + setXMLFile("kdevpart_fullscreen.rc"); m_bFullScreen = false; diff --git a/parts/fullscreen/fullscreen_part.h b/parts/fullscreen/fullscreen_part.h index 2964b5d9..fcb566e8 100644 --- a/parts/fullscreen/fullscreen_part.h +++ b/parts/fullscreen/fullscreen_part.h @@ -9,15 +9,15 @@ * * ***************************************************************************/ -#ifndef __TDEVPART_FULLSCREEN_H__ -#define __TDEVPART_FULLSCREEN_H__ +#ifndef __KDEVPART_FULLSCREEN_H__ +#define __KDEVPART_FULLSCREEN_H__ #include -#include +#include class TDEAction; -class FullScreenPart : public TDevPlugin +class FullScreenPart : public KDevPlugin { Q_OBJECT diff --git a/parts/fullscreen/kdevfullscreen.desktop b/parts/fullscreen/kdevfullscreen.desktop new file mode 100644 index 00000000..6f935c85 --- /dev/null +++ b/parts/fullscreen/kdevfullscreen.desktop @@ -0,0 +1,86 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=FullScreen +Comment[br]=Skramm leun +Comment[ca]=Pantalla completa +Comment[da]=Fuldskærm +Comment[de]=Vollbild +Comment[el]=ΠλήρηςΟθόνη +Comment[es]=Pantalla completa +Comment[eu]=Pantaila osoa +Comment[fa]=تمام ‌صفحه +Comment[fr]=Plein écran +Comment[ga]=Lánscáileán +Comment[hi]=फुल-स्क्रीन +Comment[hu]=Teljes képernyő +Comment[it]=Schermo pieno +Comment[ja]=フルスクリーン +Comment[ms]=SkrinPenuh +Comment[nds]=Heel Schirm +Comment[ne]=पूरा पर्दा +Comment[nl]=Volledig scherm +Comment[pl]=Pełny ekran +Comment[pt]=Todo o Ecrã +Comment[pt_BR]=Tela Cheia +Comment[ru]=Полноэкранный режим +Comment[sk]=Celá obrazovka +Comment[sl]=Celozaslonski način +Comment[sr]=Преко целог екрана +Comment[sr@Latn]=Preko celog ekrana +Comment[sv]=Fullskärm +Comment[ta]=முழுத்திரை +Comment[tg]=Тартиботи экрани пурра +Comment[tr]=Tam Ekran +Comment[zh_CN]=全屏 +Comment[zh_TW]=全螢幕 +Name=KDevFullScreen +Name[da]=TDevelop fuldskærm +Name[de]=Vollbild (TDevelop) +Name[hi]=के-डेव-फुलस्क्रीन +Name[nds]=TDevelop-Heelschirm +Name[pl]=KDevPełnyEkran +Name[sk]=KDev celá obrazovka +Name[sv]=TDevelop fullskärm +Name[ta]=KDev முழுத்திரை +Name[tg]=Васеъкуниии KDev +Name[zh_TW]=TDevelop 全螢幕 +GenericName=FullScreen +GenericName[br]=Skramm leun +GenericName[ca]=Pantalla completa +GenericName[da]=Fuldskærm +GenericName[de]=Vollbild +GenericName[el]=ΠλήρηςΟθόνη +GenericName[es]=Pantalla completa +GenericName[et]=Täisekraan +GenericName[eu]=Pantaila osoa +GenericName[fa]=تمام‌ صفحه +GenericName[fr]=Plein écran +GenericName[ga]=Lánscáileán +GenericName[hi]=फुल-स्क्रीन +GenericName[hu]=Teljes képernyő +GenericName[it]=Schermo pieno +GenericName[ja]=フルスクリーン +GenericName[nds]=Heel Schirm +GenericName[ne]=पूरा पर्दा +GenericName[nl]=Volledig scherm +GenericName[pl]=Pełny ekran +GenericName[pt]=Todo o Ecrã +GenericName[pt_BR]=Tela Cheia +GenericName[ru]=Полноэкранный режим +GenericName[sk]=Celá obrazovka +GenericName[sl]=Celozaslonski način +GenericName[sr]=Преко целог екрана +GenericName[sr@Latn]=Preko celog ekrana +GenericName[sv]=Fullskärm +GenericName[ta]=முழுத்திரை +GenericName[tg]=Тартиботи экрани пурра +GenericName[tr]=Tam Ekran +GenericName[zh_CN]=全屏 +GenericName[zh_TW]=全螢幕 +Icon=tdevelop +ServiceTypes=TDevelop/Plugin +X-TDevelop-Scope=Core +X-TDE-Library=libkdevfullscreen +X-TDevelop-Version=5 +X-TDevelop-Properties=ViewManagement diff --git a/parts/fullscreen/tdevpart_fullscreen.rc b/parts/fullscreen/kdevpart_fullscreen.rc similarity index 100% rename from parts/fullscreen/tdevpart_fullscreen.rc rename to parts/fullscreen/kdevpart_fullscreen.rc diff --git a/parts/fullscreen/tdevfullscreen.desktop b/parts/fullscreen/tdevfullscreen.desktop deleted file mode 100644 index 4974af20..00000000 --- a/parts/fullscreen/tdevfullscreen.desktop +++ /dev/null @@ -1,86 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=FullScreen -Comment[br]=Skramm leun -Comment[ca]=Pantalla completa -Comment[da]=Fuldskærm -Comment[de]=Vollbild -Comment[el]=ΠλήρηςΟθόνη -Comment[es]=Pantalla completa -Comment[eu]=Pantaila osoa -Comment[fa]=تمام ‌صفحه -Comment[fr]=Plein écran -Comment[ga]=Lánscáileán -Comment[hi]=फुल-स्क्रीन -Comment[hu]=Teljes képernyő -Comment[it]=Schermo pieno -Comment[ja]=フルスクリーン -Comment[ms]=SkrinPenuh -Comment[nds]=Heel Schirm -Comment[ne]=पूरा पर्दा -Comment[nl]=Volledig scherm -Comment[pl]=Pełny ekran -Comment[pt]=Todo o Ecrã -Comment[pt_BR]=Tela Cheia -Comment[ru]=Полноэкранный режим -Comment[sk]=Celá obrazovka -Comment[sl]=Celozaslonski način -Comment[sr]=Преко целог екрана -Comment[sr@Latn]=Preko celog ekrana -Comment[sv]=Fullskärm -Comment[ta]=முழுத்திரை -Comment[tg]=Тартиботи экрани пурра -Comment[tr]=Tam Ekran -Comment[zh_CN]=全屏 -Comment[zh_TW]=全螢幕 -Name=KDevFullScreen -Name[da]=TDevelop fuldskærm -Name[de]=Vollbild (TDevelop) -Name[hi]=के-डेव-फुलस्क्रीन -Name[nds]=TDevelop-Heelschirm -Name[pl]=KDevPełnyEkran -Name[sk]=KDev celá obrazovka -Name[sv]=TDevelop fullskärm -Name[ta]=KDev முழுத்திரை -Name[tg]=Васеъкуниии KDev -Name[zh_TW]=TDevelop 全螢幕 -GenericName=FullScreen -GenericName[br]=Skramm leun -GenericName[ca]=Pantalla completa -GenericName[da]=Fuldskærm -GenericName[de]=Vollbild -GenericName[el]=ΠλήρηςΟθόνη -GenericName[es]=Pantalla completa -GenericName[et]=Täisekraan -GenericName[eu]=Pantaila osoa -GenericName[fa]=تمام‌ صفحه -GenericName[fr]=Plein écran -GenericName[ga]=Lánscáileán -GenericName[hi]=फुल-स्क्रीन -GenericName[hu]=Teljes képernyő -GenericName[it]=Schermo pieno -GenericName[ja]=フルスクリーン -GenericName[nds]=Heel Schirm -GenericName[ne]=पूरा पर्दा -GenericName[nl]=Volledig scherm -GenericName[pl]=Pełny ekran -GenericName[pt]=Todo o Ecrã -GenericName[pt_BR]=Tela Cheia -GenericName[ru]=Полноэкранный режим -GenericName[sk]=Celá obrazovka -GenericName[sl]=Celozaslonski način -GenericName[sr]=Преко целог екрана -GenericName[sr@Latn]=Preko celog ekrana -GenericName[sv]=Fullskärm -GenericName[ta]=முழுத்திரை -GenericName[tg]=Тартиботи экрани пурра -GenericName[tr]=Tam Ekran -GenericName[zh_CN]=全屏 -GenericName[zh_TW]=全螢幕 -Icon=tdevelop -ServiceTypes=TDevelop/Plugin -X-TDevelop-Scope=Core -X-TDE-Library=libtdevfullscreen -X-TDevelop-Version=5 -X-TDevelop-Properties=ViewManagement diff --git a/parts/grepview/CMakeLists.txt b/parts/grepview/CMakeLists.txt index 96d4042b..5ad23e4f 100644 --- a/parts/grepview/CMakeLists.txt +++ b/parts/grepview/CMakeLists.txt @@ -27,16 +27,16 @@ link_directories( ##### other data ################################ -install( FILES tdevgrepview.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevgrepview.rc DESTINATION ${DATA_INSTALL_DIR}/tdevgrepview ) +install( FILES kdevgrepview.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevgrepview.rc DESTINATION ${DATA_INSTALL_DIR}/kdevgrepview ) -##### libtdevgrepview (module) ################## +##### libkdevgrepview (module) ################## -tde_add_kpart( libtdevgrepview AUTOMOC +tde_add_kpart( libkdevgrepview AUTOMOC SOURCES grepviewpart.cpp grepviewwidget.cpp grepdlg.cpp LINK - tdevwidgets-shared tdevelop-shared + kdevwidgets-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/parts/grepview/Makefile.am b/parts/grepview/Makefile.am index 8ae4725c..dc5f5fed 100644 --- a/parts/grepview/Makefile.am +++ b/parts/grepview/Makefile.am @@ -3,17 +3,17 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util \ -I$(top_srcdir)/lib/widgets $(all_includes) -kde_module_LTLIBRARIES = libtdevgrepview.la -libtdevgrepview_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevgrepview_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/lib/widgets/libtdevwidgets.la $(LIB_TDEHTML) +kde_module_LTLIBRARIES = libkdevgrepview.la +libkdevgrepview_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevgrepview_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/lib/widgets/libkdevwidgets.la $(LIB_TDEHTML) -libtdevgrepview_la_SOURCES = grepviewpart.cpp grepviewwidget.cpp grepdlg.cpp +libkdevgrepview_la_SOURCES = grepviewpart.cpp grepviewwidget.cpp grepdlg.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevgrepview.desktop +service_DATA = kdevgrepview.desktop -rcdir = $(kde_datadir)/tdevgrepview -rc_DATA = tdevgrepview.rc +rcdir = $(kde_datadir)/kdevgrepview +rc_DATA = kdevgrepview.rc diff --git a/parts/grepview/grepdlg.cpp b/parts/grepview/grepdlg.cpp index 8e8b0eb3..6333805f 100644 --- a/parts/grepview/grepdlg.cpp +++ b/parts/grepview/grepdlg.cpp @@ -34,7 +34,7 @@ #include #include #include -#include +#include #include #include "grepviewpart.h" diff --git a/parts/grepview/grepviewpart.cpp b/parts/grepview/grepviewpart.cpp index 9d6b08c5..92f4ebb6 100644 --- a/parts/grepview/grepviewpart.cpp +++ b/parts/grepview/grepviewpart.cpp @@ -23,26 +23,26 @@ #include #include -#include "tdevcore.h" -#include "tdevpartcontroller.h" -#include "tdevmainwindow.h" -#include "tdevplugininfo.h" -#include "tdeveditorutil.h" +#include "kdevcore.h" +#include "kdevpartcontroller.h" +#include "kdevmainwindow.h" +#include "kdevplugininfo.h" +#include "kdeveditorutil.h" #include "grepviewwidget.h" -static const TDevPluginInfo data("tdevgrepview"); +static const KDevPluginInfo data("kdevgrepview"); -K_EXPORT_COMPONENT_FACTORY(libtdevgrepview, GrepViewFactory(data)) +K_EXPORT_COMPONENT_FACTORY(libkdevgrepview, GrepViewFactory(data)) GrepViewPart::GrepViewPart( TQObject *parent, const char *name, const TQStringList & ) - : TDevPlugin( &data, parent, name ? name : "GrepViewPart" ) + : KDevPlugin( &data, parent, name ? name : "GrepViewPart" ) { setInstance(GrepViewFactory::instance()); - setXMLFile("tdevgrepview.rc"); + setXMLFile("kdevgrepview.rc"); - connect( core(), TQT_SIGNAL(stopButtonClicked(TDevPlugin*)), - this, TQT_SLOT(stopButtonClicked(TDevPlugin*)) ); + connect( core(), TQT_SIGNAL(stopButtonClicked(KDevPlugin*)), + this, TQT_SLOT(stopButtonClicked(KDevPlugin*)) ); connect( core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened()) ); connect( core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(projectClosed()) ); connect( core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), @@ -83,7 +83,7 @@ GrepViewPart::~GrepViewPart() } -void GrepViewPart::stopButtonClicked(TDevPlugin* which) +void GrepViewPart::stopButtonClicked(KDevPlugin* which) { if ( which != 0 && which != this ) return; @@ -129,10 +129,10 @@ void GrepViewPart::slotGrep() { if ( !m_widget->isRunning() ) { - TQString contextString = TDevEditorUtil::currentSelection( dynamic_cast( partController()->activePart() ) ); + TQString contextString = KDevEditorUtil::currentSelection( dynamic_cast( partController()->activePart() ) ); if ( contextString.isEmpty() ) { - contextString = TDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); + contextString = KDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ); } m_widget->showDialogWithPattern( contextString ); } diff --git a/parts/grepview/grepviewpart.h b/parts/grepview/grepviewpart.h index 68c4a574..4ebd7638 100644 --- a/parts/grepview/grepviewpart.h +++ b/parts/grepview/grepviewpart.h @@ -13,8 +13,8 @@ #define _GREPVIEWPART_H_ #include -#include -#include "tdevplugin.h" +#include +#include "kdevplugin.h" class KDialogBase; class TQPopupMenu; @@ -22,7 +22,7 @@ class Context; class GrepViewWidget; -class GrepViewPart : public TDevPlugin +class GrepViewPart : public KDevPlugin { Q_OBJECT @@ -32,7 +32,7 @@ public: ~GrepViewPart(); private slots: - void stopButtonClicked(TDevPlugin *which); + void stopButtonClicked(KDevPlugin *which); void projectOpened(); void projectClosed(); void contextMenu(TQPopupMenu *popup, const Context *context); @@ -46,6 +46,6 @@ private: friend class GrepViewWidget; }; -typedef TDevGenericFactory GrepViewFactory; +typedef KDevGenericFactory GrepViewFactory; #endif diff --git a/parts/grepview/grepviewwidget.cpp b/parts/grepview/grepviewwidget.cpp index edcdaa7c..1d709dff 100644 --- a/parts/grepview/grepviewwidget.cpp +++ b/parts/grepview/grepviewwidget.cpp @@ -27,10 +27,10 @@ #include using namespace KTextEditor; -#include "tdevcore.h" -#include "tdevproject.h" -#include "tdevmainwindow.h" -#include "tdevpartcontroller.h" +#include "kdevcore.h" +#include "kdevproject.h" +#include "kdevmainwindow.h" +#include "kdevpartcontroller.h" #include "grepdlg.h" #include "grepviewpart.h" @@ -181,7 +181,7 @@ void GrepViewWidget::showDialog() } } // Determine if we have a list of project files - TDevProject *openProject = m_part->project(); + KDevProject *openProject = m_part->project(); if (openProject) { grepdlg->setEnableProjectBox(!openProject->allFiles().isEmpty()); @@ -225,7 +225,7 @@ void GrepViewWidget::showDialogWithPattern(TQString pattern) grepdlg->setPattern( pattern ); // Determine if we have a list of project files - TDevProject *openProject = m_part->project(); + KDevProject *openProject = m_part->project(); if (openProject) { grepdlg->setEnableProjectBox(!openProject->allFiles().isEmpty()); @@ -255,7 +255,7 @@ void GrepViewWidget::searchActivated() if (grepdlg->useProjectFilesFlag()) { - TDevProject *openProject = m_part->project(); + KDevProject *openProject = m_part->project(); if (openProject) { TQString tmpFilePath; @@ -430,7 +430,7 @@ void GrepViewProcessWidget::insertStdoutLine(const TQCString &line) } -void GrepViewWidget::projectChanged(TDevProject *project) +void GrepViewWidget::projectChanged(KDevProject *project) { TQString dir = project? project->projectDirectory() : TQDir::homeDirPath(); grepdlg->setDirectory(dir); diff --git a/parts/grepview/grepviewwidget.h b/parts/grepview/grepviewwidget.h index 0f05c136..3bf803b5 100644 --- a/parts/grepview/grepviewwidget.h +++ b/parts/grepview/grepviewwidget.h @@ -18,7 +18,7 @@ class GrepDialog; class GrepViewPart; -class TDevProject; +class KDevProject; class KTabWidget; class TQHBoxLayout; class TQToolButton; @@ -66,7 +66,7 @@ public: GrepViewWidget(GrepViewPart *part); ~GrepViewWidget(); - void projectChanged(TDevProject *project); + void projectChanged(KDevProject *project); void killJob( int signo = SIGTERM ); bool isRunning() const; diff --git a/parts/grepview/kdevgrepview.desktop b/parts/grepview/kdevgrepview.desktop new file mode 100644 index 00000000..0521c804 --- /dev/null +++ b/parts/grepview/kdevgrepview.desktop @@ -0,0 +1,86 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Integrates "find|grep" in TDevelop - allows fast searching of multiple files using patterns or regular expressions. +Comment[ca]=Integra "find|grep" en el TDevelop, permetent la recerca ràpida de diversos fitxers emprant patrons o expressions regulars. +Comment[da]=Integrerer "find|grep" i TDevelop - tillader hurtig søgning i flere filer ved brug af mønstre eller regulære udtryk. +Comment[de]=Integration von "find|grep" in TDevelop. - Ermöglicht das schnelle Durchsuchen mehrere Dateien mit Hilfe von Suchmustern und regulären Ausdrücken. +Comment[el]=Ενσωματώνει τα "find|grep" στο TDevelop - επιτρέπει τη γρήγορη αναζήτηση σε πολλά αρχεία χρησιμοποιώντας μοτίβα ή κανονικές εκφράσεις. +Comment[es]=Integra «find|grep» en TDevelop, permitiendo la búsqueda rápida de varios archivos utilizando patrones o expresiones regulares. +Comment[et]=Integreerib TDevelopi programmi "Find|grep", mis lubab mustreid või regulaaravaldisi kasutades kiiresti paljudes failides teksti otsida. +Comment[eu]="find|grep" TDevelop-en txertatzen du - fitxategi anitzetan eredu edo espresio erregularrak erabiliz bilaketa azkarrak egiteko aukera ematen du. +Comment[fa]=«find|grep» را در TDevelop مجتمع‌سازی می‌کند. اجازۀ جستجوی سریع پرونده‌های چندگانه را با استفاده از الگوها یا عبارتهای منظم می‌دهد. +Comment[fr]=Intègre « find|grep » dans TDevelop - permet d'effectuer une recherche rapide dans des fichiers multiples en utilisant des motifs ou des expressions rationnelles. +Comment[gl]=Integra "find|grep" en TDevelop - permite a procura rápida de varios ficheiros usando patróns ou expresións regulares. +Comment[hu]=A "find|grep" programok integrálása a TDevelopba - lehetővé teszi szövegek fájlokban való gyors keresését minták és reguláris kifejezések felhasználásával +Comment[it]=Integra "find|grep" in TDevelop - permette la ricerca rapida di file multipli utilizzando motivi o espressioni regolari. +Comment[ja]="find|grep" を TDevelop 内に統合し、正規表現やパターンを用いて素早く複数のファイルを検索することを可能にします。 +Comment[ms]=Menggabungkan "find|grep" dalam TDevelop - membenarkan carian pantas beberapa fail menggunakan corak atau regular expression. +Comment[nds]=Buut "find|grep" na TDevelop in. - Stellt gau Dörsöken vun mehr Dateien mit Söökmustern oder reguleer Utdrück praat. +Comment[ne]=केडीई विकासमा "find|grep" एकीकरण गर्दछ - जसले नियमित अभिव्यक्ति वा बाँन्की प्रयोग गरेर बहुविध फाइलको छिटो खोजी गर्न अनुमति दिन्छ । +Comment[nl]=Integreert "find|grep" in TDevelop - snel zoeken door verschillende bestanden naar patronen of reguliere expressies. +Comment[pl]=Integracja "find|grep" z TDevelop - pozwala na szybie wyszukiwanie wielu plików przy użyciu wzorców i wyrażeń regularnych. +Comment[pt]=Integra o "find|grep" no TDevelop - permite a procura rápida em vários ficheiros usando padrões ou expressões regulares. +Comment[pt_BR]=Integra o "find/grep" no TDevelop - permite busca rápida de múltiplos arquivos usando padrões e expressões regulares. +Comment[ru]=Интегрирует "find|grep" в TDevelop - позволяет производить быстрый поиск по нескольким файлам с использованием шаблонов или регулярных выражений. +Comment[sk]=Integruje "find|grep" do Kdevelop - umožní rýchle vyhľadávanie rôznych súborov pomocou vzorov alebo regulárnych výrazov. +Comment[sr]=Интегрише „find|grep“ у TDevelop — омогућава брзо претраживање више фајлова коришћењем облика имена или регуларних израза. +Comment[sr@Latn]=Integriše „find|grep“ u TDevelop — omogućava brzo pretraživanje više fajlova korišćenjem oblika imena ili regularnih izraza. +Comment[sv]=Integrerar "find | grep" med TDevelop - tillåter snabb sökning i flera filer med mönster eller reguljära uttryck. +Comment[ta]=TDevelopபில் "find|grep" ஒருங்கினை-வடிவங்கள் அல்லது வழக்கமான தொடர்களை பயன்படுத்தி பல்வகை கோப்பினை மிக வேகமாய் தேடலாம். +Comment[tg]=Интегралёбии "find|grep" дар TDevelop - бо истифодаи қолиб ё инки баёни ботартиб имкон медиҳад бо якчанд файлҳо ковтуковро барпо намоед. +Comment[tr]=TDevelop'a "find|grep"i yerleştirir - desen veya düzenli ifadeler kullanılara çoklu dosyalarda hızlı arama sağlar. +Comment[zh_CN]=在 TDevelop 中集成“查找|grep” - 可以使用模式或正则表达式在多个文件中快速查找。 +Comment[zh_TW]=在 TDevelop 中整合 "find|grep" - 允許使用特定樣式或正規表式示來快速搜尋多個檔案內容。 +Name=KDevGrepView +Name[da]=TDevelop Grep-visning +Name[de]=Grep-Ansicht (TDevelop) +Name[hi]=के-डेव-ग्रेप-व्यू +Name[nds]=TDevelop-Grepkieker +Name[pl]=KDevWidokGrep +Name[sk]=KDev pohľad na grep +Name[sv]=TDevelop grep-visning +Name[ta]=KDevGrep காட்சி +Name[tg]=Намоиши KDevGrep +Name[tr]=KDevGrepView +Name[zh_TW]=TDevelop Grep 檢視 +GenericName=Grep Frontend +GenericName[ca]=Entorn per a grep +GenericName[da]=Grep-grænseflade +GenericName[de]=Grep-Ansicht +GenericName[el]=Πρόγραμμα Grep +GenericName[es]=Entorno para grep +GenericName[et]=Programmi grep kasutajaliides +GenericName[eu]=Grep interfazea +GenericName[fa]=پایانۀ Grep +GenericName[fr]=Interface pour Grep +GenericName[ga]=Comhéadan Grep +GenericName[gl]=Frontal para Grep +GenericName[hi]=ग्रेप फ्रन्टएण्ड +GenericName[hu]=Grafikus felület a Grep-hez +GenericName[it]=Interfaccia a "grep" +GenericName[ja]=Grep フロントエンド +GenericName[ms]=Frontend Grep +GenericName[nds]=Grep-Böversiet +GenericName[ne]=ग्रिप फ्रन्टइन्ड +GenericName[nl]=Grep-frontend +GenericName[pl]=Interfejs do grepa +GenericName[pt]=Interface do Grep +GenericName[pt_BR]=Frontend do Grep +GenericName[ru]=Интеграция Grep +GenericName[sk]=Grep rozhranie +GenericName[sl]=Vmesnik za Grep +GenericName[sr]=Кориснички интерфејс за grep +GenericName[sr@Latn]=Korisnički interfejs za grep +GenericName[sv]=Gränssnitt till grep +GenericName[ta]=Grep முன் பகுதி +GenericName[tg]=Интегратсияи Grep +GenericName[tr]=Grep Önucu +GenericName[zh_CN]=Grep 前端 +GenericName[zh_TW]=Grep 前端介面 +Icon=find +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevgrepview +X-TDevelop-Version=5 +X-TDevelop-Scope=Global +X-TDevelop-Properties=FileSearch diff --git a/parts/grepview/tdevgrepview.rc b/parts/grepview/kdevgrepview.rc similarity index 100% rename from parts/grepview/tdevgrepview.rc rename to parts/grepview/kdevgrepview.rc diff --git a/parts/grepview/tdevgrepview.desktop b/parts/grepview/tdevgrepview.desktop deleted file mode 100644 index c7b98916..00000000 --- a/parts/grepview/tdevgrepview.desktop +++ /dev/null @@ -1,86 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Integrates "find|grep" in TDevelop - allows fast searching of multiple files using patterns or regular expressions. -Comment[ca]=Integra "find|grep" en el TDevelop, permetent la recerca ràpida de diversos fitxers emprant patrons o expressions regulars. -Comment[da]=Integrerer "find|grep" i TDevelop - tillader hurtig søgning i flere filer ved brug af mønstre eller regulære udtryk. -Comment[de]=Integration von "find|grep" in TDevelop. - Ermöglicht das schnelle Durchsuchen mehrere Dateien mit Hilfe von Suchmustern und regulären Ausdrücken. -Comment[el]=Ενσωματώνει τα "find|grep" στο TDevelop - επιτρέπει τη γρήγορη αναζήτηση σε πολλά αρχεία χρησιμοποιώντας μοτίβα ή κανονικές εκφράσεις. -Comment[es]=Integra «find|grep» en TDevelop, permitiendo la búsqueda rápida de varios archivos utilizando patrones o expresiones regulares. -Comment[et]=Integreerib TDevelopi programmi "Find|grep", mis lubab mustreid või regulaaravaldisi kasutades kiiresti paljudes failides teksti otsida. -Comment[eu]="find|grep" TDevelop-en txertatzen du - fitxategi anitzetan eredu edo espresio erregularrak erabiliz bilaketa azkarrak egiteko aukera ematen du. -Comment[fa]=«find|grep» را در TDevelop مجتمع‌سازی می‌کند. اجازۀ جستجوی سریع پرونده‌های چندگانه را با استفاده از الگوها یا عبارتهای منظم می‌دهد. -Comment[fr]=Intègre « find|grep » dans TDevelop - permet d'effectuer une recherche rapide dans des fichiers multiples en utilisant des motifs ou des expressions rationnelles. -Comment[gl]=Integra "find|grep" en TDevelop - permite a procura rápida de varios ficheiros usando patróns ou expresións regulares. -Comment[hu]=A "find|grep" programok integrálása a TDevelopba - lehetővé teszi szövegek fájlokban való gyors keresését minták és reguláris kifejezések felhasználásával -Comment[it]=Integra "find|grep" in TDevelop - permette la ricerca rapida di file multipli utilizzando motivi o espressioni regolari. -Comment[ja]="find|grep" を TDevelop 内に統合し、正規表現やパターンを用いて素早く複数のファイルを検索することを可能にします。 -Comment[ms]=Menggabungkan "find|grep" dalam TDevelop - membenarkan carian pantas beberapa fail menggunakan corak atau regular expression. -Comment[nds]=Buut "find|grep" na TDevelop in. - Stellt gau Dörsöken vun mehr Dateien mit Söökmustern oder reguleer Utdrück praat. -Comment[ne]=केडीई विकासमा "find|grep" एकीकरण गर्दछ - जसले नियमित अभिव्यक्ति वा बाँन्की प्रयोग गरेर बहुविध फाइलको छिटो खोजी गर्न अनुमति दिन्छ । -Comment[nl]=Integreert "find|grep" in TDevelop - snel zoeken door verschillende bestanden naar patronen of reguliere expressies. -Comment[pl]=Integracja "find|grep" z TDevelop - pozwala na szybie wyszukiwanie wielu plików przy użyciu wzorców i wyrażeń regularnych. -Comment[pt]=Integra o "find|grep" no TDevelop - permite a procura rápida em vários ficheiros usando padrões ou expressões regulares. -Comment[pt_BR]=Integra o "find/grep" no TDevelop - permite busca rápida de múltiplos arquivos usando padrões e expressões regulares. -Comment[ru]=Интегрирует "find|grep" в TDevelop - позволяет производить быстрый поиск по нескольким файлам с использованием шаблонов или регулярных выражений. -Comment[sk]=Integruje "find|grep" do Kdevelop - umožní rýchle vyhľadávanie rôznych súborov pomocou vzorov alebo regulárnych výrazov. -Comment[sr]=Интегрише „find|grep“ у TDevelop — омогућава брзо претраживање више фајлова коришћењем облика имена или регуларних израза. -Comment[sr@Latn]=Integriše „find|grep“ u TDevelop — omogućava brzo pretraživanje više fajlova korišćenjem oblika imena ili regularnih izraza. -Comment[sv]=Integrerar "find | grep" med TDevelop - tillåter snabb sökning i flera filer med mönster eller reguljära uttryck. -Comment[ta]=TDevelopபில் "find|grep" ஒருங்கினை-வடிவங்கள் அல்லது வழக்கமான தொடர்களை பயன்படுத்தி பல்வகை கோப்பினை மிக வேகமாய் தேடலாம். -Comment[tg]=Интегралёбии "find|grep" дар TDevelop - бо истифодаи қолиб ё инки баёни ботартиб имкон медиҳад бо якчанд файлҳо ковтуковро барпо намоед. -Comment[tr]=TDevelop'a "find|grep"i yerleştirir - desen veya düzenli ifadeler kullanılara çoklu dosyalarda hızlı arama sağlar. -Comment[zh_CN]=在 TDevelop 中集成“查找|grep” - 可以使用模式或正则表达式在多个文件中快速查找。 -Comment[zh_TW]=在 TDevelop 中整合 "find|grep" - 允許使用特定樣式或正規表式示來快速搜尋多個檔案內容。 -Name=KDevGrepView -Name[da]=TDevelop Grep-visning -Name[de]=Grep-Ansicht (TDevelop) -Name[hi]=के-डेव-ग्रेप-व्यू -Name[nds]=TDevelop-Grepkieker -Name[pl]=KDevWidokGrep -Name[sk]=KDev pohľad na grep -Name[sv]=TDevelop grep-visning -Name[ta]=KDevGrep காட்சி -Name[tg]=Намоиши KDevGrep -Name[tr]=KDevGrepView -Name[zh_TW]=TDevelop Grep 檢視 -GenericName=Grep Frontend -GenericName[ca]=Entorn per a grep -GenericName[da]=Grep-grænseflade -GenericName[de]=Grep-Ansicht -GenericName[el]=Πρόγραμμα Grep -GenericName[es]=Entorno para grep -GenericName[et]=Programmi grep kasutajaliides -GenericName[eu]=Grep interfazea -GenericName[fa]=پایانۀ Grep -GenericName[fr]=Interface pour Grep -GenericName[ga]=Comhéadan Grep -GenericName[gl]=Frontal para Grep -GenericName[hi]=ग्रेप फ्रन्टएण्ड -GenericName[hu]=Grafikus felület a Grep-hez -GenericName[it]=Interfaccia a "grep" -GenericName[ja]=Grep フロントエンド -GenericName[ms]=Frontend Grep -GenericName[nds]=Grep-Böversiet -GenericName[ne]=ग्रिप फ्रन्टइन्ड -GenericName[nl]=Grep-frontend -GenericName[pl]=Interfejs do grepa -GenericName[pt]=Interface do Grep -GenericName[pt_BR]=Frontend do Grep -GenericName[ru]=Интеграция Grep -GenericName[sk]=Grep rozhranie -GenericName[sl]=Vmesnik za Grep -GenericName[sr]=Кориснички интерфејс за grep -GenericName[sr@Latn]=Korisnički interfejs za grep -GenericName[sv]=Gränssnitt till grep -GenericName[ta]=Grep முன் பகுதி -GenericName[tg]=Интегратсияи Grep -GenericName[tr]=Grep Önucu -GenericName[zh_CN]=Grep 前端 -GenericName[zh_TW]=Grep 前端介面 -Icon=find -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevgrepview -X-TDevelop-Version=5 -X-TDevelop-Scope=Global -X-TDevelop-Properties=FileSearch diff --git a/parts/konsole/CMakeLists.txt b/parts/konsole/CMakeLists.txt index 37cd0687..e6b51296 100644 --- a/parts/konsole/CMakeLists.txt +++ b/parts/konsole/CMakeLists.txt @@ -26,12 +26,12 @@ link_directories( ##### other data ################################ -install( FILES tdevkonsoleview.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevkonsoleview.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevkonsoleview (module) ############### +##### libkdevkonsoleview (module) ############### -tde_add_kpart( libtdevkonsoleview AUTOMOC +tde_add_kpart( libkdevkonsoleview AUTOMOC SOURCES konsoleviewpart.cpp LINK tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} diff --git a/parts/konsole/Makefile.am b/parts/konsole/Makefile.am index 1cc781d4..085f8e7a 100644 --- a/parts/konsole/Makefile.am +++ b/parts/konsole/Makefile.am @@ -2,15 +2,15 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevkonsoleview.la -libtdevkonsoleview_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevkonsoleview_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/lib/util/libtdevutil.la +kde_module_LTLIBRARIES = libkdevkonsoleview.la +libkdevkonsoleview_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevkonsoleview_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/lib/util/libkdevutil.la -libtdevkonsoleview_la_SOURCES = konsoleviewpart.cpp +libkdevkonsoleview_la_SOURCES = konsoleviewpart.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevkonsoleview.desktop +service_DATA = kdevkonsoleview.desktop diff --git a/parts/konsole/kdevkonsoleview.desktop b/parts/konsole/kdevkonsoleview.desktop new file mode 100644 index 00000000..4a9fa14e --- /dev/null +++ b/parts/konsole/kdevkonsoleview.desktop @@ -0,0 +1,86 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=This plugin gives TDevelop an embedded konsole for quick and easy command line access. +Comment[ca]=Aquest connector ofereix a TDevelop una konsola encastada per a facilitar l'accés a la línia de comandaments. +Comment[da]=Dette plugin giver TDevelop en indlejret terminal for hurtig og nem kommandolinjeadgang. +Comment[de]=Dieses Modul stellt eine eingebettete Konsole für den schnellen und einfachen Zugriff auf die Kommandozeile zur Verfügung. +Comment[el]=Αυτό το πρόσθετο προσφέρει στο TDevelop μια ενσωματωμένη konsole για γρήγορη και εύκολη πρόσβαση σε γραμμή εντολών. +Comment[es]=Este complemento proporciona a TDevelop una consola empotrada para facilitar el acceso a la línea de órdenes. +Comment[et]=See plugin lisab TDevelopile võimaluse põimitult kasutada konsooli käsurea võimaluste kiireks ja hõlpsaks pruukimiseks. +Comment[eu]=Plugin honek TDevelop-i komando-lerroak azkar eta erraz sartzeko kapsultatutako kontsola bat eskeintzen dio. +Comment[fa]=این وصله برای دستیابی سریع و آسان به خط فرمان، به TDevelop یک konsole نهفته می‌دهد. +Comment[fr]=Ce module externe offre à TDevelop une Konsole intégrée permettant un accès à la ligne de commande rapide et facile. +Comment[gl]=Esta extensión engade a TDevelop unha konsole incrustada para un rápido e sinxelo acceso a liña de comandos. +Comment[hu]=Ez a bővítőmodul egy könnyen elérhető, beágyazott parancssort hoz létre a TDevelopon belül. +Comment[it]=Questo plugin offre una console integrata per TDevelop per l'accesso rapido e semplice alla linea di comando. +Comment[ja]=このプラグインは、TDevelop に迅速で容易なコマンドラインアクセス用の埋め込まれた konsole を与えます。 +Comment[ms]=Plugin ini memberikan TDevelop konsol embedded untuk akses arahan baris yang cepat dan mudah. +Comment[nds]=Dit Moduul stellt för't gaue un eenfache Togriepen op de Befehlsreeg en inbett Konsole för TDevelop praat. +Comment[ne]=यो प्लगइनले छिटो र सजिलो आदेशरेखा पहुँचका लागि केडीई विकासमा सम्मिलित कन्सोल प्रदान गर्दछ । +Comment[nl]=Deze plugin geeft TDevelop een ingebedde Konsole voor snelle toegang tot de commandoregel. +Comment[pl]=Ta wtyczka dodaje do TDevelopa wbudowaną konsolę umożliwiając szybki i łatwy dostęp do linii komend. +Comment[pt]=Este 'plugin' dá ao TDevelop um Konsole incorporado para um acesso rápido e simples à linha de comandos. +Comment[pt_BR]=Este plug-in fornece ao TDevelop um konsole embutido para acesso rápido e fácil à linha de comando. +Comment[ru]=Предоставляет встроенную консоль для быстрого вызова командной строки. +Comment[sk]=Modul vložiteľnej konzoly do Kdevelop pre rýchly a jednoduchý prístup k príkazovému riadku. +Comment[sr]=Овај прикључак даје TDevelop-у уграђену конзолу за брз и лак приступ командној линији. +Comment[sr@Latn]=Ovaj priključak daje TDevelop-u ugrađenu konzolu za brz i lak pristup komandnoj liniji. +Comment[sv]=Insticksprogrammet ger TDevelop en inbyggd terminal för snabb och enkel åtkomst av kommandoraden. +Comment[ta]=இந்த சொருகி உங்களுக்கு Kஉருவாக்கத்திற்கு கன்சோல் உட்பொதியின் மூலம் விரைவு மற்றும் எளிய கட்டளை வரி அனுமதி தரும். +Comment[tg]=Барои тез фарёд намудани фармони сатр рафаки бино карда шударо имкон медиҳад. +Comment[tr]=Bu eklenti, TDevelop'a hızlı komut satırı erişimi için gömülü bir terminal verir. +Comment[zh_CN]=这个插件为 TDevelop 提供KDE终端来快速和方便使用命令行。 +Comment[zh_TW]=此外掛程式提供 TDevelop 嵌入式的主控台,可以快速使用命令列。 +Name=KDevKonsoleView +Name[da]=TDevelop Konsole-visning +Name[de]=Unterstützung für Konsole (TDevelop) +Name[hi]=के-डेव-कंसोल-व्यू +Name[nds]=TDevelop-Konsoleünnerstütten +Name[pl]=KDevWidokKonsoli +Name[sk]=KDev pohľad na konzolu +Name[sv]=TDevelop terminalvy +Name[ta]=KDevKonsole காட்சி +Name[tg]=Намоиши KDevKonsole +Name[zh_TW]=TDevelop 主控台檢視 +GenericName=Embedded Konsole +GenericName[br]=Konsole enframmet +GenericName[ca]=Konsola encastada +GenericName[da]=Indlejret konsole +GenericName[de]=Eingebettete Konsole +GenericName[el]=Ενσωματωμένη Konsole +GenericName[es]=Consola empotrada +GenericName[et]=Põimitud Konsool +GenericName[eu]=Konsole kapsulatua +GenericName[fa]=Konsole نهفته +GenericName[fr]=Konsole intégrée +GenericName[ga]=Konsole Leabaithe +GenericName[gl]=Konsole incrustada +GenericName[hi]=अंतर्निर्मित कंसोल +GenericName[hu]=Beágyazott Konsole +GenericName[it]=Konsole integrata +GenericName[ja]=埋め込まれた Konsole +GenericName[ms]=Konsol Embedded +GenericName[nds]=Inbett Konsole +GenericName[ne]=सम्मिलित कन्सोल +GenericName[nl]=Ingebedde Konsole +GenericName[pl]=Wbudowana konsola +GenericName[pt]=Konsole Embebida +GenericName[pt_BR]=Konsole Embutido +GenericName[ru]=Встроенная консоль +GenericName[sk]=Vložiteľná konzola +GenericName[sl]=Vključena Konzola +GenericName[sr]=Уграђена конзола +GenericName[sr@Latn]=Ugrađena konzola +GenericName[sv]=Inbäddad terminal +GenericName[ta]=கன்சோல் உட்பொதி +GenericName[tg]=Бино намудани Embedded +GenericName[tr]=Gömülü Terminal +GenericName[zh_CN]=嵌入的 Konsole +GenericName[zh_TW]=嵌入式主控台 +Icon=konsole +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevkonsoleview +X-TDevelop-Version=5 +X-TDevelop-Scope=Global +X-TDevelop-Properties=Console diff --git a/parts/konsole/konsoleviewpart.cpp b/parts/konsole/konsoleviewpart.cpp index 63f720d9..873ab790 100644 --- a/parts/konsole/konsoleviewpart.cpp +++ b/parts/konsole/konsoleviewpart.cpp @@ -13,27 +13,27 @@ #include -#include +#include #include #include -#include "tdevcore.h" -#include "tdevproject.h" -#include "tdevmainwindow.h" -#include "tdevplugininfo.h" -#include "tdevshellwidget.h" +#include "kdevcore.h" +#include "kdevproject.h" +#include "kdevmainwindow.h" +#include "kdevplugininfo.h" +#include "kdevshellwidget.h" -typedef TDevGenericFactory KonsoleViewFactory; -static const TDevPluginInfo data("tdevkonsoleview"); -K_EXPORT_COMPONENT_FACTORY(libtdevkonsoleview, KonsoleViewFactory(data)) +typedef KDevGenericFactory KonsoleViewFactory; +static const KDevPluginInfo data("kdevkonsoleview"); +K_EXPORT_COMPONENT_FACTORY(libkdevkonsoleview, KonsoleViewFactory(data)) KonsoleViewPart::KonsoleViewPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin(&data, parent, name ? name : "KonsoleViewPart") + : KDevPlugin(&data, parent, name ? name : "KonsoleViewPart") { setInstance( KonsoleViewFactory::instance() ); - m_widget = new TDevShellWidget( 0, "konsole widget" ); + m_widget = new KDevShellWidget( 0, "konsole widget" ); TQWhatsThis::add(m_widget, i18n("Konsole

    " "This window contains an embedded konsole window. It will try to follow you when " diff --git a/parts/konsole/konsoleviewpart.h b/parts/konsole/konsoleviewpart.h index 912e00b4..9bcecb38 100644 --- a/parts/konsole/konsoleviewpart.h +++ b/parts/konsole/konsoleviewpart.h @@ -14,12 +14,12 @@ #include -#include "tdevplugin.h" +#include "kdevplugin.h" -class TDevShellWidget; +class KDevShellWidget; -class KonsoleViewPart : public TDevPlugin +class KonsoleViewPart : public KDevPlugin { Q_OBJECT @@ -31,7 +31,7 @@ private slots: void projectOpened(); private: - TQGuardedPtr m_widget; + TQGuardedPtr m_widget; }; #endif diff --git a/parts/konsole/konsoleviewwidget.cpp b/parts/konsole/konsoleviewwidget.cpp index 26ac9e29..7c21cab2 100644 --- a/parts/konsole/konsoleviewwidget.cpp +++ b/parts/konsole/konsoleviewwidget.cpp @@ -20,10 +20,10 @@ #include #include -#include "tdevcore.h" -#include "tdevproject.h" +#include "kdevcore.h" +#include "kdevproject.h" #include "konsoleviewpart.h" -#include "tdevpartcontroller.h" +#include "kdevpartcontroller.h" #include "konsoleviewwidget.h" diff --git a/parts/konsole/konsoleviewwidget.h b/parts/konsole/konsoleviewwidget.h index 6a7f6a9f..2bf3160a 100644 --- a/parts/konsole/konsoleviewwidget.h +++ b/parts/konsole/konsoleviewwidget.h @@ -17,7 +17,7 @@ #include -class TDevProject; +class KDevProject; class KonsoleWidgetPrivate; class KonsoleViewPart; namespace KParts { diff --git a/parts/konsole/tdevkonsoleview.desktop b/parts/konsole/tdevkonsoleview.desktop deleted file mode 100644 index edc9018f..00000000 --- a/parts/konsole/tdevkonsoleview.desktop +++ /dev/null @@ -1,86 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=This plugin gives TDevelop an embedded konsole for quick and easy command line access. -Comment[ca]=Aquest connector ofereix a TDevelop una konsola encastada per a facilitar l'accés a la línia de comandaments. -Comment[da]=Dette plugin giver TDevelop en indlejret terminal for hurtig og nem kommandolinjeadgang. -Comment[de]=Dieses Modul stellt eine eingebettete Konsole für den schnellen und einfachen Zugriff auf die Kommandozeile zur Verfügung. -Comment[el]=Αυτό το πρόσθετο προσφέρει στο TDevelop μια ενσωματωμένη konsole για γρήγορη και εύκολη πρόσβαση σε γραμμή εντολών. -Comment[es]=Este complemento proporciona a TDevelop una consola empotrada para facilitar el acceso a la línea de órdenes. -Comment[et]=See plugin lisab TDevelopile võimaluse põimitult kasutada konsooli käsurea võimaluste kiireks ja hõlpsaks pruukimiseks. -Comment[eu]=Plugin honek TDevelop-i komando-lerroak azkar eta erraz sartzeko kapsultatutako kontsola bat eskeintzen dio. -Comment[fa]=این وصله برای دستیابی سریع و آسان به خط فرمان، به TDevelop یک konsole نهفته می‌دهد. -Comment[fr]=Ce module externe offre à TDevelop une Konsole intégrée permettant un accès à la ligne de commande rapide et facile. -Comment[gl]=Esta extensión engade a TDevelop unha konsole incrustada para un rápido e sinxelo acceso a liña de comandos. -Comment[hu]=Ez a bővítőmodul egy könnyen elérhető, beágyazott parancssort hoz létre a TDevelopon belül. -Comment[it]=Questo plugin offre una console integrata per TDevelop per l'accesso rapido e semplice alla linea di comando. -Comment[ja]=このプラグインは、TDevelop に迅速で容易なコマンドラインアクセス用の埋め込まれた konsole を与えます。 -Comment[ms]=Plugin ini memberikan TDevelop konsol embedded untuk akses arahan baris yang cepat dan mudah. -Comment[nds]=Dit Moduul stellt för't gaue un eenfache Togriepen op de Befehlsreeg en inbett Konsole för TDevelop praat. -Comment[ne]=यो प्लगइनले छिटो र सजिलो आदेशरेखा पहुँचका लागि केडीई विकासमा सम्मिलित कन्सोल प्रदान गर्दछ । -Comment[nl]=Deze plugin geeft TDevelop een ingebedde Konsole voor snelle toegang tot de commandoregel. -Comment[pl]=Ta wtyczka dodaje do TDevelopa wbudowaną konsolę umożliwiając szybki i łatwy dostęp do linii komend. -Comment[pt]=Este 'plugin' dá ao TDevelop um Konsole incorporado para um acesso rápido e simples à linha de comandos. -Comment[pt_BR]=Este plug-in fornece ao TDevelop um konsole embutido para acesso rápido e fácil à linha de comando. -Comment[ru]=Предоставляет встроенную консоль для быстрого вызова командной строки. -Comment[sk]=Modul vložiteľnej konzoly do Kdevelop pre rýchly a jednoduchý prístup k príkazovému riadku. -Comment[sr]=Овај прикључак даје TDevelop-у уграђену конзолу за брз и лак приступ командној линији. -Comment[sr@Latn]=Ovaj priključak daje TDevelop-u ugrađenu konzolu za brz i lak pristup komandnoj liniji. -Comment[sv]=Insticksprogrammet ger TDevelop en inbyggd terminal för snabb och enkel åtkomst av kommandoraden. -Comment[ta]=இந்த சொருகி உங்களுக்கு Kஉருவாக்கத்திற்கு கன்சோல் உட்பொதியின் மூலம் விரைவு மற்றும் எளிய கட்டளை வரி அனுமதி தரும். -Comment[tg]=Барои тез фарёд намудани фармони сатр рафаки бино карда шударо имкон медиҳад. -Comment[tr]=Bu eklenti, TDevelop'a hızlı komut satırı erişimi için gömülü bir terminal verir. -Comment[zh_CN]=这个插件为 TDevelop 提供KDE终端来快速和方便使用命令行。 -Comment[zh_TW]=此外掛程式提供 TDevelop 嵌入式的主控台,可以快速使用命令列。 -Name=KDevKonsoleView -Name[da]=TDevelop Konsole-visning -Name[de]=Unterstützung für Konsole (TDevelop) -Name[hi]=के-डेव-कंसोल-व्यू -Name[nds]=TDevelop-Konsoleünnerstütten -Name[pl]=KDevWidokKonsoli -Name[sk]=KDev pohľad na konzolu -Name[sv]=TDevelop terminalvy -Name[ta]=KDevKonsole காட்சி -Name[tg]=Намоиши KDevKonsole -Name[zh_TW]=TDevelop 主控台檢視 -GenericName=Embedded Konsole -GenericName[br]=Konsole enframmet -GenericName[ca]=Konsola encastada -GenericName[da]=Indlejret konsole -GenericName[de]=Eingebettete Konsole -GenericName[el]=Ενσωματωμένη Konsole -GenericName[es]=Consola empotrada -GenericName[et]=Põimitud Konsool -GenericName[eu]=Konsole kapsulatua -GenericName[fa]=Konsole نهفته -GenericName[fr]=Konsole intégrée -GenericName[ga]=Konsole Leabaithe -GenericName[gl]=Konsole incrustada -GenericName[hi]=अंतर्निर्मित कंसोल -GenericName[hu]=Beágyazott Konsole -GenericName[it]=Konsole integrata -GenericName[ja]=埋め込まれた Konsole -GenericName[ms]=Konsol Embedded -GenericName[nds]=Inbett Konsole -GenericName[ne]=सम्मिलित कन्सोल -GenericName[nl]=Ingebedde Konsole -GenericName[pl]=Wbudowana konsola -GenericName[pt]=Konsole Embebida -GenericName[pt_BR]=Konsole Embutido -GenericName[ru]=Встроенная консоль -GenericName[sk]=Vložiteľná konzola -GenericName[sl]=Vključena Konzola -GenericName[sr]=Уграђена конзола -GenericName[sr@Latn]=Ugrađena konzola -GenericName[sv]=Inbäddad terminal -GenericName[ta]=கன்சோல் உட்பொதி -GenericName[tg]=Бино намудани Embedded -GenericName[tr]=Gömülü Terminal -GenericName[zh_CN]=嵌入的 Konsole -GenericName[zh_TW]=嵌入式主控台 -Icon=konsole -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevkonsoleview -X-TDevelop-Version=5 -X-TDevelop-Scope=Global -X-TDevelop-Properties=Console diff --git a/parts/openwith/CMakeLists.txt b/parts/openwith/CMakeLists.txt index d870a3e0..8384bdaa 100644 --- a/parts/openwith/CMakeLists.txt +++ b/parts/openwith/CMakeLists.txt @@ -26,12 +26,12 @@ link_directories( ##### other data ################################ -install( FILES tdevopenwith.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevopenwith.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevopenwith (module) ################## +##### libkdevopenwith (module) ################## -tde_add_kpart( libtdevopenwith AUTOMOC +tde_add_kpart( libkdevopenwith AUTOMOC SOURCES openwithpart.cpp LINK tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} diff --git a/parts/openwith/Makefile.am b/parts/openwith/Makefile.am index 316572ef..57503a0e 100644 --- a/parts/openwith/Makefile.am +++ b/parts/openwith/Makefile.am @@ -2,14 +2,14 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevopenwith.la -libtdevopenwith_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevopenwith_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevopenwith.la +libkdevopenwith_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevopenwith_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevopenwith_la_SOURCES = openwithpart.cpp +libkdevopenwith_la_SOURCES = openwithpart.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevopenwith.desktop +service_DATA = kdevopenwith.desktop diff --git a/parts/openwith/kdevopenwith.desktop b/parts/openwith/kdevopenwith.desktop new file mode 100644 index 00000000..0108daaa --- /dev/null +++ b/parts/openwith/kdevopenwith.desktop @@ -0,0 +1,82 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=This plugin provides additional "open" alternatives for various context menus in TDevelop. +Comment[ca]=Aquest connector proporciona alternatives "open" addicionals per a diversos menús de context a TDevelop. +Comment[da]=Dette plugin sørger for yderligere "åbne" alternativer for forskellige sammenhængsmenuer i TDevelop. +Comment[de]=Dieses Modul stellt in vielen Kontextmenüs Alternativen für den Menüpunkt "Öffnen" zur Verfügung. +Comment[el]=Αυτό το πρόσθετο προσφέρει εναλλακτικές επιλογές "ανοίγματος" για διάφορα σχετικά μενού στο TDevelop. +Comment[es]=Este complemento proporciona alternativas de «abrir» adicionales en varios menús contextuales de TDevelop. +Comment[et]=See plugin lisab TDevelopi erinevatele kontekstimenüüdele täiendavaid faili avamise võimalusi. +Comment[eu]=Plugin honek TDevelop-eko testuinguru menu hainbatentzat beste "ireki" aukera eskeintzen dizkie. +Comment[fa]=این وصله، انتخابهای »باز کردن« اضافی را برای گزینگان متن مختلف در TDevelop فراهم می‌کند. +Comment[fr]=Ce module externe fournit des alternatives « ouvertes » supplémentaires pour divers menus contextuels dans TDevelop. +Comment[gl]=Esta extensión proporciona alternativas "abrir" adicionais a varios menús de contexto de TDevelop. +Comment[hu]=Ez a bővítőmodul további megnyitási lehetőségeket hoz létre a TDevelop felbukkanó menüiben. +Comment[it]=Questo plugin offre alternative aggiuntive per "Apri" per i vari menu contestuali di TDevelop. +Comment[ja]=このプラグインは、TDevelop の中のさまざまなコンテキストメニューに追加の「開く」選択肢を供給します。 +Comment[ms]=Plugin ini menyediakan alternatif "buka" tambahan untuk pelbagai menu konteks dalam TDevelop. +Comment[nds]=Dit Moduul stellt för en Reeg Rechtsklickmenüs in TDevelop mehr Mööglichkeiten för "Opmaken" praat. +Comment[ne]=यो प्लगइनले केडीई विकासमा विविध प्रसङ्ग मेनुका लागि अतिरिक्त "खोल्नुहोस्" विकल्प प्रदान गर्दछ । +Comment[nl]=Deze plugin biedt extra "open"-alternatieven in verschillende contextmenus in TDevelop. +Comment[pl]=Ta wtyczka umożliwia dodanie dodatkowych możliwości otwierania plików w menu kontekstowych TDevelopa. +Comment[pt]=Este 'plugin' oferece várias alternativas adicionais e "abertas" para vários menus de contexto no TDevelop. +Comment[pt_BR]=Este plug-in fornece alternativas adicionais de "abrir" para vários menus de contetxo do TDevelop. +Comment[ru]=Этот модуль предоставляет различные возможности открытия файлов, используя контекстные меню TDevelop. +Comment[sk]=Modul poskytuje dodatočné "Otvoriť pomocou" alternatívy pre rôzne kontextové menu v TDevelop. +Comment[sr]=Овај прикључак обезбеђује додатне алтернативе за „отвори“ за различите контекстне меније у tdevelop-у. +Comment[sr@Latn]=Ovaj priključak obezbeđuje dodatne alternative za „otvori“ za različite kontekstne menije u tdevelop-u. +Comment[sv]=Insticksprogrammet tillhandahåller ytterligare "öppna" alternativ i diverse sammanhangsberoende menyer i TDevelop. +Comment[ta]=இந்த சொருகி Kஉருவாக்கியில் உள்ள வெவ்வேறு சூழுல் பட்டியலிற்கு பதில் "open" என்ற கூடுதல் வசதி தரும். +Comment[tg]=Ин модул як чанд хел кушодани файлҳоро имкон медиҳад, ҳангоми истифода намудани TDevelop. +Comment[tr]=Bu eklenti, TDevelop'taki bir çok bağlam menüleri için fazladan "aç" alternatifleri sunar. +Comment[zh_CN]=这个插件在 TDevelop 多个上下文菜单中提供“打开”菜单项。 +Comment[zh_TW]=此外掛程式提供 TDevelop 額外的「開啟方式」選單。 +Name=KDevOpenWith +Name[da]=TDevelop Åbn med +Name[de]="Öffnen mit"-Menüerweiterung (TDevelop) +Name[hi]=के-डेव-ओपन-विथ +Name[nds]=TDevelop-"Opmaken mit"-Menüverwiedern +Name[pl]=KDevOtwórzW +Name[sk]=KDev otvoriť pomocou +Name[sv]=TDevelop öppna med +Name[ta]=KDev வைத்து திற +Name[tg]=Кушодани аз рӯи KDev +Name[zh_TW]=TDevelop 開啟方式 +GenericName="Open with" Menu Addon +GenericName[ca]=Afegit de menú "Obre amb" +GenericName[da]="Åbn med" menu-tilføjelse +GenericName[de]=Menüerweiterung "Öffnen mit" +GenericName[el]=Πρόσθετο μενού "Άνοιγμα με" +GenericName[es]=Extensión de menú «Abrir con» +GenericName[et]=Menüü "Ava kasutades" lisamine +GenericName[eu]="Ireki honekin" menu gehigarria +GenericName[fa]=»باز کردن با« افزودن گزینگان +GenericName[fr]=Extension de menu « Ouvrir avec... » +GenericName[gl]=Engadido "Abrir con" para menús +GenericName[hu]="Megnyitás ezzel" menübővítés +GenericName[it]=Aggiunta al menu della voce "Apri con" +GenericName[ja]=「アプリケーションで開く」メニューアドオン +GenericName[nds]=Menüverwiedern "Opmaken mit" +GenericName[ne]="यससँग खोल्नुहोस्" मेनु एडअन +GenericName[nl]="Openen met" menutoevoeging +GenericName[pl]=Dodatek do menu "Otwórz za pomocą" +GenericName[pt]=Extra do Menu "Abrir com" +GenericName[pt_BR]=Addon de Menu "Abrir com" +GenericName[ru]=Дополнение меню "Открыть с помощью" +GenericName[sk]="Otvoriť pomocou" prídavok k menu +GenericName[sl]=Menijski dodatek »Odpri z« +GenericName[sr]=Додатак за мени „Отвори помоћу“ +GenericName[sr@Latn]=Dodatak za meni „Otvori pomoću“ +GenericName[sv]=Menytillägg till "Öppna med" +GenericName[ta]="Open with" பட்டியல் அடான் +GenericName[tg]=Менюи иловагӣ "Кушодан бо фармони Ёрӣ" +GenericName[tr]="Birlikte Aç" Menü Eki +GenericName[zh_CN]=“打开方式”菜单项 +GenericName[zh_TW]="開啟方式"選單 +Icon=tdevelop +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevopenwith +X-TDevelop-Version=5 +X-TDevelop-Scope=Global +X-TDevelop-Properties=GlobalFileManagement,FileOpenWith diff --git a/parts/openwith/openwithpart.cpp b/parts/openwith/openwithpart.cpp index a223f193..63fcc6d9 100644 --- a/parts/openwith/openwithpart.cpp +++ b/parts/openwith/openwithpart.cpp @@ -3,7 +3,7 @@ #include #include -#include +#include #include #include #include @@ -11,18 +11,18 @@ #include #include -#include "tdevpartcontroller.h" -#include "tdevcore.h" -#include "tdevplugininfo.h" +#include "kdevpartcontroller.h" +#include "kdevcore.h" +#include "kdevplugininfo.h" #include "urlutil.h" -typedef TDevGenericFactory OpenWithFactory; +typedef KDevGenericFactory OpenWithFactory; -static const TDevPluginInfo data("tdevopenwith"); -K_EXPORT_COMPONENT_FACTORY(libtdevopenwith, OpenWithFactory(data)) +static const KDevPluginInfo data("kdevopenwith"); +K_EXPORT_COMPONENT_FACTORY(libkdevopenwith, OpenWithFactory(data)) OpenWithPart::OpenWithPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin(&data, parent, name ? name : "OpenWithPart") + : KDevPlugin(&data, parent, name ? name : "OpenWithPart") { setInstance( OpenWithFactory::instance() ); diff --git a/parts/openwith/openwithpart.h b/parts/openwith/openwithpart.h index 0c9a20ac..bd338a3f 100644 --- a/parts/openwith/openwithpart.h +++ b/parts/openwith/openwithpart.h @@ -3,13 +3,13 @@ #include -#include "tdevplugin.h" +#include "kdevplugin.h" class TQPopupMenu; class Context; -class OpenWithPart : public TDevPlugin +class OpenWithPart : public KDevPlugin { Q_OBJECT diff --git a/parts/openwith/tdevopenwith.desktop b/parts/openwith/tdevopenwith.desktop deleted file mode 100644 index fa1be30d..00000000 --- a/parts/openwith/tdevopenwith.desktop +++ /dev/null @@ -1,82 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=This plugin provides additional "open" alternatives for various context menus in TDevelop. -Comment[ca]=Aquest connector proporciona alternatives "open" addicionals per a diversos menús de context a TDevelop. -Comment[da]=Dette plugin sørger for yderligere "åbne" alternativer for forskellige sammenhængsmenuer i TDevelop. -Comment[de]=Dieses Modul stellt in vielen Kontextmenüs Alternativen für den Menüpunkt "Öffnen" zur Verfügung. -Comment[el]=Αυτό το πρόσθετο προσφέρει εναλλακτικές επιλογές "ανοίγματος" για διάφορα σχετικά μενού στο TDevelop. -Comment[es]=Este complemento proporciona alternativas de «abrir» adicionales en varios menús contextuales de TDevelop. -Comment[et]=See plugin lisab TDevelopi erinevatele kontekstimenüüdele täiendavaid faili avamise võimalusi. -Comment[eu]=Plugin honek TDevelop-eko testuinguru menu hainbatentzat beste "ireki" aukera eskeintzen dizkie. -Comment[fa]=این وصله، انتخابهای »باز کردن« اضافی را برای گزینگان متن مختلف در TDevelop فراهم می‌کند. -Comment[fr]=Ce module externe fournit des alternatives « ouvertes » supplémentaires pour divers menus contextuels dans TDevelop. -Comment[gl]=Esta extensión proporciona alternativas "abrir" adicionais a varios menús de contexto de TDevelop. -Comment[hu]=Ez a bővítőmodul további megnyitási lehetőségeket hoz létre a TDevelop felbukkanó menüiben. -Comment[it]=Questo plugin offre alternative aggiuntive per "Apri" per i vari menu contestuali di TDevelop. -Comment[ja]=このプラグインは、TDevelop の中のさまざまなコンテキストメニューに追加の「開く」選択肢を供給します。 -Comment[ms]=Plugin ini menyediakan alternatif "buka" tambahan untuk pelbagai menu konteks dalam TDevelop. -Comment[nds]=Dit Moduul stellt för en Reeg Rechtsklickmenüs in TDevelop mehr Mööglichkeiten för "Opmaken" praat. -Comment[ne]=यो प्लगइनले केडीई विकासमा विविध प्रसङ्ग मेनुका लागि अतिरिक्त "खोल्नुहोस्" विकल्प प्रदान गर्दछ । -Comment[nl]=Deze plugin biedt extra "open"-alternatieven in verschillende contextmenus in TDevelop. -Comment[pl]=Ta wtyczka umożliwia dodanie dodatkowych możliwości otwierania plików w menu kontekstowych TDevelopa. -Comment[pt]=Este 'plugin' oferece várias alternativas adicionais e "abertas" para vários menus de contexto no TDevelop. -Comment[pt_BR]=Este plug-in fornece alternativas adicionais de "abrir" para vários menus de contetxo do TDevelop. -Comment[ru]=Этот модуль предоставляет различные возможности открытия файлов, используя контекстные меню TDevelop. -Comment[sk]=Modul poskytuje dodatočné "Otvoriť pomocou" alternatívy pre rôzne kontextové menu v TDevelop. -Comment[sr]=Овај прикључак обезбеђује додатне алтернативе за „отвори“ за различите контекстне меније у tdevelop-у. -Comment[sr@Latn]=Ovaj priključak obezbeđuje dodatne alternative za „otvori“ za različite kontekstne menije u tdevelop-u. -Comment[sv]=Insticksprogrammet tillhandahåller ytterligare "öppna" alternativ i diverse sammanhangsberoende menyer i TDevelop. -Comment[ta]=இந்த சொருகி Kஉருவாக்கியில் உள்ள வெவ்வேறு சூழுல் பட்டியலிற்கு பதில் "open" என்ற கூடுதல் வசதி தரும். -Comment[tg]=Ин модул як чанд хел кушодани файлҳоро имкон медиҳад, ҳангоми истифода намудани TDevelop. -Comment[tr]=Bu eklenti, TDevelop'taki bir çok bağlam menüleri için fazladan "aç" alternatifleri sunar. -Comment[zh_CN]=这个插件在 TDevelop 多个上下文菜单中提供“打开”菜单项。 -Comment[zh_TW]=此外掛程式提供 TDevelop 額外的「開啟方式」選單。 -Name=KDevOpenWith -Name[da]=TDevelop Åbn med -Name[de]="Öffnen mit"-Menüerweiterung (TDevelop) -Name[hi]=के-डेव-ओपन-विथ -Name[nds]=TDevelop-"Opmaken mit"-Menüverwiedern -Name[pl]=KDevOtwórzW -Name[sk]=KDev otvoriť pomocou -Name[sv]=TDevelop öppna med -Name[ta]=KDev வைத்து திற -Name[tg]=Кушодани аз рӯи KDev -Name[zh_TW]=TDevelop 開啟方式 -GenericName="Open with" Menu Addon -GenericName[ca]=Afegit de menú "Obre amb" -GenericName[da]="Åbn med" menu-tilføjelse -GenericName[de]=Menüerweiterung "Öffnen mit" -GenericName[el]=Πρόσθετο μενού "Άνοιγμα με" -GenericName[es]=Extensión de menú «Abrir con» -GenericName[et]=Menüü "Ava kasutades" lisamine -GenericName[eu]="Ireki honekin" menu gehigarria -GenericName[fa]=»باز کردن با« افزودن گزینگان -GenericName[fr]=Extension de menu « Ouvrir avec... » -GenericName[gl]=Engadido "Abrir con" para menús -GenericName[hu]="Megnyitás ezzel" menübővítés -GenericName[it]=Aggiunta al menu della voce "Apri con" -GenericName[ja]=「アプリケーションで開く」メニューアドオン -GenericName[nds]=Menüverwiedern "Opmaken mit" -GenericName[ne]="यससँग खोल्नुहोस्" मेनु एडअन -GenericName[nl]="Openen met" menutoevoeging -GenericName[pl]=Dodatek do menu "Otwórz za pomocą" -GenericName[pt]=Extra do Menu "Abrir com" -GenericName[pt_BR]=Addon de Menu "Abrir com" -GenericName[ru]=Дополнение меню "Открыть с помощью" -GenericName[sk]="Otvoriť pomocou" prídavok k menu -GenericName[sl]=Menijski dodatek »Odpri z« -GenericName[sr]=Додатак за мени „Отвори помоћу“ -GenericName[sr@Latn]=Dodatak za meni „Otvori pomoću“ -GenericName[sv]=Menytillägg till "Öppna med" -GenericName[ta]="Open with" பட்டியல் அடான் -GenericName[tg]=Менюи иловагӣ "Кушодан бо фармони Ёрӣ" -GenericName[tr]="Birlikte Aç" Menü Eki -GenericName[zh_CN]=“打开方式”菜单项 -GenericName[zh_TW]="開啟方式"選單 -Icon=tdevelop -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevopenwith -X-TDevelop-Version=5 -X-TDevelop-Scope=Global -X-TDevelop-Properties=GlobalFileManagement,FileOpenWith diff --git a/parts/outputviews/CMakeLists.txt b/parts/outputviews/CMakeLists.txt index 18effab8..48cf38ec 100644 --- a/parts/outputviews/CMakeLists.txt +++ b/parts/outputviews/CMakeLists.txt @@ -30,40 +30,40 @@ link_directories( ##### other data ################################ install( FILES - tdevappoutputview.desktop tdevmakeview.desktop + kdevappoutputview.desktop kdevmakeview.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) install( FILES - tdevmakeview.rc - DESTINATION ${DATA_INSTALL_DIR}/tdevappoutputview ) + kdevmakeview.rc + DESTINATION ${DATA_INSTALL_DIR}/kdevappoutputview ) install( FILES - tdevmakeview.rc - DESTINATION ${DATA_INSTALL_DIR}/tdevmakeview ) + kdevmakeview.rc + DESTINATION ${DATA_INSTALL_DIR}/kdevmakeview ) -##### libtdevmakeview (module) ################## +##### libkdevmakeview (module) ################## -tde_add_kpart( libtdevmakeview AUTOMOC +tde_add_kpart( libkdevmakeview AUTOMOC SOURCES makeviewpart.cpp makewidget.cpp directorystatusmessagefilter.cpp outputfilter.cpp compileerrorfilter.cpp commandcontinuationfilter.cpp makeitem.cpp makeactionfilter.cpp otherfilter.cpp LINK - tdevdcopextensions-static tdevextensions-static - tdevwidgets-shared tdevelop-shared + kdevdcopextensions-static kdevextensions-static + kdevwidgets-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) -##### libtdevappview (module) ################### +##### libkdevappview (module) ################### -tde_add_kpart( libtdevappview AUTOMOC +tde_add_kpart( libkdevappview AUTOMOC SOURCES appoutputviewpart.cpp appoutputwidget.cpp filterdlg.ui LINK - tdevdcopextensions-static tdevextensions-static - tdevwidgets-shared tdevelop-shared + kdevdcopextensions-static kdevextensions-static + kdevwidgets-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/parts/outputviews/Makefile.am b/parts/outputviews/Makefile.am index 6536d0f2..6a890586 100644 --- a/parts/outputviews/Makefile.am +++ b/parts/outputviews/Makefile.am @@ -4,32 +4,32 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/interfaces/extensions/dcop -I$(top_srcdir)/lib/util \ -I$(top_srcdir)/lib/widgets $(all_includes) -kde_module_LTLIBRARIES = libtdevmakeview.la libtdevappview.la +kde_module_LTLIBRARIES = libkdevmakeview.la libkdevappview.la METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevappoutputview.desktop tdevmakeview.desktop +service_DATA = kdevappoutputview.desktop kdevmakeview.desktop -rc1dir = $(kde_datadir)/tdevappoutputview -rc1_DATA = tdevmakeview.rc +rc1dir = $(kde_datadir)/kdevappoutputview +rc1_DATA = kdevmakeview.rc -rc2dir = $(kde_datadir)/tdevmakeview -rc2_DATA = tdevmakeview.rc +rc2dir = $(kde_datadir)/kdevmakeview +rc2_DATA = kdevmakeview.rc noinst_HEADERS = filterdlg.h -libtdevmakeview_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevmakeview_la_LIBADD = $(top_builddir)/lib/widgets/libtdevwidgets.la \ - $(top_builddir)/lib/interfaces/extensions/dcop/libtdevdcopextensions.la $(top_builddir)/lib/libtdevelop.la \ - $(LIB_TDEHTML) $(top_builddir)/lib/interfaces/extensions/libtdevextensions.la -libtdevmakeview_la_SOURCES = makeviewpart.cpp makewidget.cpp \ +libkdevmakeview_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevmakeview_la_LIBADD = $(top_builddir)/lib/widgets/libkdevwidgets.la \ + $(top_builddir)/lib/interfaces/extensions/dcop/libkdevdcopextensions.la $(top_builddir)/lib/libtdevelop.la \ + $(LIB_TDEHTML) $(top_builddir)/lib/interfaces/extensions/libkdevextensions.la +libkdevmakeview_la_SOURCES = makeviewpart.cpp makewidget.cpp \ directorystatusmessagefilter.cpp outputfilter.cpp compileerrorfilter.cpp commandcontinuationfilter.cpp \ makeitem.cpp makeactionfilter.cpp otherfilter.cpp -libtdevappview_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevappview_la_LIBADD = $(top_builddir)/lib/widgets/libtdevwidgets.la \ - $(top_builddir)/lib/interfaces/extensions/dcop/libtdevdcopextensions.la $(top_builddir)/lib/libtdevelop.la \ - $(LIB_TDEHTML) $(top_builddir)/lib/interfaces/extensions/libtdevextensions.la -libtdevappview_la_SOURCES = appoutputviewpart.cpp appoutputwidget.cpp \ +libkdevappview_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevappview_la_LIBADD = $(top_builddir)/lib/widgets/libkdevwidgets.la \ + $(top_builddir)/lib/interfaces/extensions/dcop/libkdevdcopextensions.la $(top_builddir)/lib/libtdevelop.la \ + $(LIB_TDEHTML) $(top_builddir)/lib/interfaces/extensions/libkdevextensions.la +libkdevappview_la_SOURCES = appoutputviewpart.cpp appoutputwidget.cpp \ filterdlg.ui diff --git a/parts/outputviews/appoutputviewpart.cpp b/parts/outputviews/appoutputviewpart.cpp index 223d3855..3a0e0e7d 100644 --- a/parts/outputviews/appoutputviewpart.cpp +++ b/parts/outputviews/appoutputviewpart.cpp @@ -18,27 +18,27 @@ #include #include #include -#include -#include +#include +#include #include -#include "tdevproject.h" -#include "tdevcore.h" -#include "tdevmainwindow.h" +#include "kdevproject.h" +#include "kdevcore.h" +#include "kdevmainwindow.h" #include "appoutputwidget.h" -#include "tdevpartcontroller.h" +#include "kdevpartcontroller.h" #include "settings.h" -static const TDevPluginInfo data("tdevappoutputview"); -typedef TDevGenericFactory< AppOutputViewPart > AppViewFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevappview, AppViewFactory( data ) ) +static const KDevPluginInfo data("kdevappoutputview"); +typedef KDevGenericFactory< AppOutputViewPart > AppViewFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevappview, AppViewFactory( data ) ) AppOutputViewPart::AppOutputViewPart(TQObject *parent, const char *name, const TQStringList &) - : TDevAppFrontend(&data, parent, name ? name : "AppOutputViewPart") + : KDevAppFrontend(&data, parent, name ? name : "AppOutputViewPart") { setInstance(AppViewFactory::instance()); - m_dcop = new TDevAppFrontendIface(this); + m_dcop = new KDevAppFrontendIface(this); m_widget = new AppOutputWidget(this); m_widget->setIcon( SmallIcon("openterm") ); @@ -51,8 +51,8 @@ AppOutputViewPart::AppOutputViewPart(TQObject *parent, const char *name, const T mainWindow()->embedOutputView(m_widget, i18n("Application"), i18n("Output of the executed user program")); hideView(); - connect( core(), TQT_SIGNAL(stopButtonClicked(TDevPlugin*)), - this, TQT_SLOT(slotStopButtonClicked(TDevPlugin*)) ); + connect( core(), TQT_SIGNAL(stopButtonClicked(KDevPlugin*)), + this, TQT_SLOT(slotStopButtonClicked(KDevPlugin*)) ); connect(m_widget, TQT_SIGNAL(processExited(TDEProcess*)), this, TQT_SLOT(slotProcessExited())); connect(m_widget, TQT_SIGNAL(processExited(TDEProcess*)), TQT_SIGNAL(processExited())); } @@ -66,7 +66,7 @@ AppOutputViewPart::~AppOutputViewPart() delete m_dcop; } -void AppOutputViewPart::slotStopButtonClicked( TDevPlugin* which ) +void AppOutputViewPart::slotStopButtonClicked( KDevPlugin* which ) { if ( which != 0 && which != this ) return; diff --git a/parts/outputviews/appoutputviewpart.h b/parts/outputviews/appoutputviewpart.h index 306108cd..1067af97 100644 --- a/parts/outputviews/appoutputviewpart.h +++ b/parts/outputviews/appoutputviewpart.h @@ -14,13 +14,13 @@ #include -#include "tdevappfrontend.h" -#include "TDevAppFrontendIface.h" +#include "kdevappfrontend.h" +#include "KDevAppFrontendIface.h" class AppOutputWidget; -class AppOutputViewPart : public TDevAppFrontend +class AppOutputViewPart : public KDevAppFrontend { Q_OBJECT @@ -45,12 +45,12 @@ signals: void processExited(); private slots: - void slotStopButtonClicked(TDevPlugin*); + void slotStopButtonClicked(KDevPlugin*); void slotProcessExited(); private: TQGuardedPtr m_widget; - TDevAppFrontendIface *m_dcop; + KDevAppFrontendIface *m_dcop; bool m_viewIsVisible; }; diff --git a/parts/outputviews/appoutputwidget.cpp b/parts/outputviews/appoutputwidget.cpp index 0201ce5c..50060339 100644 --- a/parts/outputviews/appoutputwidget.cpp +++ b/parts/outputviews/appoutputwidget.cpp @@ -33,9 +33,9 @@ #include "appoutputviewpart.h" #include "filterdlg.h" -#include "tdevpartcontroller.h" -#include "tdevmainwindow.h" -#include "tdevproject.h" +#include "kdevpartcontroller.h" +#include "kdevmainwindow.h" +#include "kdevproject.h" AppOutputWidget::AppOutputWidget(AppOutputViewPart* part) : ProcessWidget(0, "app output widget"), m_part(part) diff --git a/parts/outputviews/kdevappoutputview.desktop b/parts/outputviews/kdevappoutputview.desktop new file mode 100644 index 00000000..bca43d54 --- /dev/null +++ b/parts/outputviews/kdevappoutputview.desktop @@ -0,0 +1,84 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Application Output View +Comment[ca]=Visor de l'eixida de les aplicacions +Comment[da]=Program-uddata fremvisning +Comment[de]=Anwendungsausgabe für TDevelop +Comment[el]=Προβολή εξόδου εφαρμογής +Comment[es]=Visor de la salida de las aplicaciones +Comment[et]=Rakenduse väljundi vaade +Comment[eu]=Aplikazioen irteera ikustailua +Comment[fa]=نمای خروجی کاربرد +Comment[fr]=Fenêtre de sortie d'une application +Comment[gl]=Vista da saída da aplicación +Comment[hi]=अनुप्रयोग आउटपुट व्यू +Comment[hu]=Alkalmazáskimenet-megjelenítő +Comment[it]=Vista dell'output dell'applicazione +Comment[ja]=アプリケーション出力ビュー +Comment[ms]=Lihat Keluaran Aplikasi +Comment[nds]=Programmutgaav-Kieker +Comment[ne]=अनुप्रयोग निर्गत दृश्य +Comment[nl]=Weergave van toepassingsuitvoer +Comment[pl]=Widok wyjścia programu +Comment[pt]=Vista do Resultado da Aplicação +Comment[pt_BR]=Visão da Saída do Aplicativo +Comment[ru]=Окно вывода приложения +Comment[sk]=Pohľad na výstup aplikácie +Comment[sl]=Prikaz programskega izhoda +Comment[sr]=Приказ излаза апликације +Comment[sr@Latn]=Prikaz izlaza aplikacije +Comment[sv]=Programutmatningsvy +Comment[ta]=பயன்பாட்டு வெளியீட்டுக் காட்சி +Comment[tg]=Тирезаи хориҷ кардани гузориш +Comment[tr]=Uygulama Çıktı Görünümü +Comment[zh_CN]=应用程序输出查看器 +Comment[zh_TW]=應用程式輸出檢視 +Name=KDevAppOutputView +Name[da]=TDevelop Program-uddata fremvisning +Name[de]=Anwendungsausgabe (TDevelop) +Name[hi]=के-डेव-एप्प-आउटपुट-व्यू +Name[nds]=Programmutgaav-Kieker (TDevelop) +Name[pl]=KDevAppWidokWyjścia +Name[sk]=KDev pohľad na výstup aplikácie +Name[sv]=TDevelop programutmatningsvy +Name[ta]=KDevApp வெளியீட்டுக் காட்சி +Name[zh_TW]=TDevelop 應用程式輸出檢視 +GenericName=Application Output View +GenericName[ca]=Visor de l'eixida de les aplicacions +GenericName[da]=Program-uddata fremvisning +GenericName[de]=Anwendungsausgabe +GenericName[el]=Προβολή εξόδου εφαρμογής +GenericName[es]=Visor de la salida de las aplicaciones +GenericName[et]=Rakenduse väljundi vaade +GenericName[eu]=Aplikazioen irteera ikustailua +GenericName[fa]=نمای خروجی کاربرد +GenericName[fr]=Fenêtre de sortie d'une application +GenericName[gl]=Vista da saída da aplicación +GenericName[hi]=अनुप्रयोग आउटपुट व्यू +GenericName[hu]=Alkalmazáskimenet-megjelenítő +GenericName[it]=Visualizza l'output dell'applicazione +GenericName[ja]=アプリケーション出力ビュー +GenericName[nds]=Programmutgaav-Kieker +GenericName[ne]=अनुप्रयोग निर्गत दृश्य +GenericName[nl]=Weergave van toepassingsuitvoer +GenericName[pl]=Widok wyjścia programu +GenericName[pt]=Vista do Resultado da Aplicação +GenericName[pt_BR]=Visão da Saída do Aplicativo +GenericName[ru]=Окно вывода приложения +GenericName[sk]=Pohľad na výstup aplikácie +GenericName[sl]=Prikaz programskega izhoda +GenericName[sr]=Приказ излаза апликације +GenericName[sr@Latn]=Prikaz izlaza aplikacije +GenericName[sv]=Programutmatningsvy +GenericName[ta]=பயன்பாட்டு வெளியீட்டுக் காட்சி +GenericName[tg]=Тирезаи хориҷ кардани гузориш +GenericName[tr]=Uygulama Çıktı Görünümü +GenericName[zh_CN]=应用程序输出查看器 +GenericName[zh_TW]=應用程式輸出檢視 +Icon=exec +ServiceTypes=TDevelop/AppFrontend +X-TDE-Library=libkdevappview +X-TDevelop-Version=5 +X-TDevelop-Scope=Core +X-TDevelop-Properties=OutputTool diff --git a/parts/outputviews/kdevmakeview.desktop b/parts/outputviews/kdevmakeview.desktop new file mode 100644 index 00000000..bfea5cec --- /dev/null +++ b/parts/outputviews/kdevmakeview.desktop @@ -0,0 +1,87 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Compiler Frontend +Comment[ca]=Entorn per al compilador +Comment[da]=Grænseflade til oversætter +Comment[de]=Make-Ausgabe für TDevelop +Comment[el]=Πρόγραμμα μεταγλωττιστή +Comment[es]=Entorno para el compilador +Comment[et]=Kompilaatori kasutajaliides +Comment[eu]=Konpiladore interfazea +Comment[fa]=پایانۀ مترجم +Comment[fr]=Interface pour le compilateur +Comment[ga]=Comhéadan Tiomsaitheora +Comment[gl]=Frontal para o compilador +Comment[hi]=कम्पायलर फ्रन्टएण्ड +Comment[hu]=Grafikus felület fordítóprogramokhoz +Comment[it]=Interfaccia al compilatore +Comment[ja]=コンパイラフロントエンド +Comment[ms]=Frontend Penghimpun +Comment[nds]=Kompilerer-Böversiet +Comment[ne]=कम्पाइलर फ्रन्टइन्ड +Comment[nl]=Compiler-frontend +Comment[pl]=Interfejs do kompilatora +Comment[pt]=Interface de Compilador +Comment[pt_BR]=Frontend do Compilador +Comment[ru]=Интерфейс к компилятору +Comment[sk]=Rozhranie kompilátora +Comment[sl]=Vmesnik prevajalnika +Comment[sr]=Кориснички интерфејс за преводилац +Comment[sr@Latn]=Korisnički interfejs za prevodilac +Comment[sv]=Kompilatorgränssnitt +Comment[ta]=முன்பகுதி தொகுப்பான் +Comment[tg]=Интерфейс ба талфифгар +Comment[tr]=Derleyici Önucu +Comment[zh_CN]=编译器前端 +Comment[zh_TW]=編譯器前端介面 +Name=KDevMakeView +Name[da]=TDevelop Make-visning +Name[de]=Make-Ausgabe (TDevelop) +Name[hi]=के-डेव-मेक-व्यू +Name[nds]=Make-Kieker (TDevelop) +Name[pl]=KDevWIdokMake +Name[sk]=KDev pohľad na make +Name[sv]=TDevelop byggvy +Name[ta]=KDev காட்சியாக்கு +Name[zh_TW]=TDevelop Make 檢視 +GenericName=Compiler Frontend +GenericName[ca]=Entorn per al compilador +GenericName[da]=Grænseflade til oversætter +GenericName[de]=Make-Ausgabe +GenericName[el]=Πρόγραμμα μεταγλωττιστή +GenericName[es]=Entorno para el compilador +GenericName[et]=Kompilaatori kasutajaliides +GenericName[eu]=Konpiladore interfazea +GenericName[fa]=پایانۀ مترجم +GenericName[fr]=Interface pour le compilateur +GenericName[ga]=Comhéadan Tiomsaitheora +GenericName[gl]=Frontal para o compilador +GenericName[hi]=कम्पायलर फ्रन्टएण्ड +GenericName[hu]=Grafikus felület fordítóprogramokhoz +GenericName[it]=Interfaccia al compilatore +GenericName[ja]=コンパイラフロントエンド +GenericName[ms]=Frontend Penghimpun +GenericName[nds]=Kompilerer-Böversiet +GenericName[ne]=कम्पाइलर फ्रन्टइन्ड +GenericName[nl]=Compiler-frontend +GenericName[pl]=Interfejs do kompilatora +GenericName[pt]=Interface de Compilador +GenericName[pt_BR]=Frontend do Compilador +GenericName[ru]=Интерфейс к компилятору +GenericName[sk]=Rozhranie kompilátor +GenericName[sl]=Vmesnik prevajalnika +GenericName[sr]=Кориснички интерфејс преводиоца +GenericName[sr@Latn]=Korisnički interfejs prevodioca +GenericName[sv]=Kompilatorgränssnitt +GenericName[ta]=முன் பகுதி தொகுப்பான் +GenericName[tg]=Интерфейс ба талфифгар +GenericName[tr]=Derleyici Önucu +GenericName[zh_CN]=编译器前端 +GenericName[zh_TW]=編譯器前端介面 +Icon=konsole +ServiceTypes=TDevelop/MakeFrontend +X-TDE-Library=libkdevmakeview +X-TDevelop-Version=5 +X-TDevelop-Scope=Core +X-TDevelop-Properties=OutputTool diff --git a/parts/outputviews/kdevmakeview.rc b/parts/outputviews/kdevmakeview.rc new file mode 100644 index 00000000..fc8c82f6 --- /dev/null +++ b/parts/outputviews/kdevmakeview.rc @@ -0,0 +1,9 @@ + + + +

    + + + + + diff --git a/parts/outputviews/makeactionfilter.cpp b/parts/outputviews/makeactionfilter.cpp index 157a2c2e..ee38d144 100644 --- a/parts/outputviews/makeactionfilter.cpp +++ b/parts/outputviews/makeactionfilter.cpp @@ -184,11 +184,11 @@ void MakeActionFilter::test() "-I/usr/X11R6/include -DTQT_THREAD_SUPPORT -D_REENTRANT -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -pedantic -W " "-Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion " "-Wchar-subscripts -fno-builtin -g3 -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new " - "-fno-common -MT tdevcore.lo -MD -MP -MF \".deps/tdevcore.Tpo\" -c -o tdevcore.lo `test -f " - "'/home/john/src/kde/tdevelop/lib/interfaces/tdevcore.cpp' || echo " - "'/home/john/src/kde/tdevelop/lib/interfaces/'`/home/john/src/kde/tdevelop/lib/interfaces/tdevcore.cpp; then mv " - "\".deps/tdevcore.Tpo\" \".deps/tdevcore.Plo\"; else rm -f \".deps/tdevcore.Tpo\"; exit 1; fi", - "compiling", "g++", "tdevcore.cpp" ) + "-fno-common -MT kdevcore.lo -MD -MP -MF \".deps/kdevcore.Tpo\" -c -o kdevcore.lo `test -f " + "'/home/john/src/kde/tdevelop/lib/interfaces/kdevcore.cpp' || echo " + "'/home/john/src/kde/tdevelop/lib/interfaces/'`/home/john/src/kde/tdevelop/lib/interfaces/kdevcore.cpp; then mv " + "\".deps/kdevcore.Tpo\" \".deps/kdevcore.Plo\"; else rm -f \".deps/kdevcore.Tpo\"; exit 1; fi", + "compiling", "g++", "kdevcore.cpp" ) << TestItem( // automake 1.7, srcdir != builddir "if g++ -DHAVE_CONFIG_H -I. -I/home/john/src/kde/tdevelop/src -I.. -I/home/john/src/kde/tdevelop/lib/interfaces " "-I/home/john/src/kde/tdevelop/lib/sourceinfo -I/home/john/src/kde/tdevelop/lib/util -I/home/john/src/kde/tdevelop/lib " @@ -222,12 +222,12 @@ void MakeActionFilter::test() "/bin/sh ../../libtool --silent --mode=link --tag=CXX g++ -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -pedantic " "-W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align " "-Wconversion -Wchar-subscripts -fno-builtin -g3 -Wformat-security -Wmissing-format-attribute -fno-exceptions " - "-fno-check-new -fno-common -o libtdevoutputviews.la.closure libtdevoutputviews_la_closure.lo -L/usr/X11R6/lib " + "-fno-check-new -fno-common -o libkdevoutputviews.la.closure libkdevoutputviews_la_closure.lo -L/usr/X11R6/lib " "-L/home/john/src/kde/qt-copy/lib -L/usr/local/kde/lib -avoid-version -module -no-undefined -R /usr/local/kde/lib " "-R /home/john/src/kde/qt-copy/lib -R /usr/X11R6/lib outputviewsfactory.lo makeviewpart.lo makewidget.lo " "appoutputviewpart.lo appoutputwidget.lo directorystatusmessagefilter.lo outputfilter.lo compileerrorfilter.lo " "commandcontinuationfilter.lo makeitem.lo makeactionfilter.lo otherfilter.lo ../../lib/libtdevelop.la", - "linking", "libtool", "libtdevoutputviews.la.closure" ) + "linking", "libtool", "libkdevoutputviews.la.closure" ) << TestItem( //libtool, linking 2 "/bin/sh ../libtool --silent --mode=link --tag=CXX g++ -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -pedantic " "-W -Wpointer-arith -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -Wchar-subscripts " @@ -254,12 +254,12 @@ void MakeActionFilter::test() "echo '/home/andris/cvs-developement/head/quanta/quanta/project/'`/home/andris/cvs-developement/head/quanta/quanta/project/project.cpp ", "compiling", "g++", "project.cpp") << TestItem( - "/usr/local/kde/bin/dcopidl /home/john/src/kde/tdevelop/lib/interfaces/TDevAppFrontendIface.h > TDevAppFrontendIface.kidl " - "|| ( rm -f TDevAppFrontendIface.kidl ; /bin/false )", - "generating", "dcopidl", "TDevAppFrontendIface.kidl" ) + "/usr/local/kde/bin/dcopidl /home/john/src/kde/tdevelop/lib/interfaces/KDevAppFrontendIface.h > KDevAppFrontendIface.kidl " + "|| ( rm -f KDevAppFrontendIface.kidl ; /bin/false )", + "generating", "dcopidl", "KDevAppFrontendIface.kidl" ) << TestItem( - "/usr/local/kde/bin/dcopidl2cpp --c++-suffix cpp --no-signals --no-stub TDevAppFrontendIface.kidl", - "compiling", "dcopidl2cpp", "TDevAppFrontendIface.kidl" ) + "/usr/local/kde/bin/dcopidl2cpp --c++-suffix cpp --no-signals --no-stub KDevAppFrontendIface.kidl", + "compiling", "dcopidl2cpp", "KDevAppFrontendIface.kidl" ) << TestItem( //install "/usr/bin/install -c -p -m 644 /home/andris/development/quanta/quanta/kommander/editor/kmdr-editor.desktop " "/opt/trinity/share/applnk/Editors/kmdr-editor.desktop", "installing", "", "/opt/trinity/share/applnk/Editors/kmdr-editor.desktop") diff --git a/parts/outputviews/makeviewpart.cpp b/parts/outputviews/makeviewpart.cpp index e8eb6a75..9324bcb0 100644 --- a/parts/outputviews/makeviewpart.cpp +++ b/parts/outputviews/makeviewpart.cpp @@ -17,27 +17,27 @@ #include #include #include -#include -#include +#include +#include -#include "tdevproject.h" -#include "tdevcore.h" -#include "tdevmainwindow.h" +#include "kdevproject.h" +#include "kdevcore.h" +#include "kdevmainwindow.h" #include "makewidget.h" -static const TDevPluginInfo data("tdevmakeview"); -typedef TDevGenericFactory< MakeViewPart > MakeViewFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevmakeview, MakeViewFactory( data ) ) +static const KDevPluginInfo data("kdevmakeview"); +typedef KDevGenericFactory< MakeViewPart > MakeViewFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevmakeview, MakeViewFactory( data ) ) MakeViewPart::MakeViewPart(TQObject *parent, const char *name, const TQStringList &) - : TDevMakeFrontend(&data, parent, name) + : KDevMakeFrontend(&data, parent, name) { setInstance(MakeViewFactory::instance()); - setXMLFile("tdevmakeview.rc"); + setXMLFile("kdevmakeview.rc"); - m_dcop = new TDevMakeFrontendIface(this); + m_dcop = new KDevMakeFrontendIface(this); m_widget = new MakeWidget(this); m_widget->setIcon( SmallIcon("exec") ); @@ -61,8 +61,8 @@ MakeViewPart::MakeViewPart(TQObject *parent, const char *name, const TQStringLis action->setToolTip( i18n("Go to the previous error") ); action->setWhatsThis(i18n("Previous error

    Switches to the file and line where the previous error was reported from.")); - connect( core(), TQT_SIGNAL(stopButtonClicked(TDevPlugin*)), - this, TQT_SLOT(slotStopButtonClicked(TDevPlugin*)) ); + connect( core(), TQT_SIGNAL(stopButtonClicked(KDevPlugin*)), + this, TQT_SLOT(slotStopButtonClicked(KDevPlugin*)) ); } @@ -74,7 +74,7 @@ MakeViewPart::~MakeViewPart() delete m_dcop; } -void MakeViewPart::slotStopButtonClicked(TDevPlugin* which) +void MakeViewPart::slotStopButtonClicked(KDevPlugin* which) { if ( which != 0 && which != this ) return; diff --git a/parts/outputviews/makeviewpart.h b/parts/outputviews/makeviewpart.h index 420eebcb..89f2a8bd 100644 --- a/parts/outputviews/makeviewpart.h +++ b/parts/outputviews/makeviewpart.h @@ -14,13 +14,13 @@ #include -#include "tdevmakefrontend.h" -#include "TDevMakeFrontendIface.h" +#include "kdevmakefrontend.h" +#include "KDevMakeFrontendIface.h" class MakeWidget; -class MakeViewPart : public TDevMakeFrontend +class MakeViewPart : public KDevMakeFrontend { Q_OBJECT @@ -32,7 +32,7 @@ public: virtual void updateSettingsFromConfig(); private slots: - void slotStopButtonClicked(TDevPlugin*); + void slotStopButtonClicked(KDevPlugin*); protected: virtual void queueCommand(const TQString &dir, const TQString &command); @@ -40,7 +40,7 @@ protected: private: TQGuardedPtr m_widget; - TDevMakeFrontendIface *m_dcop; + KDevMakeFrontendIface *m_dcop; friend class MakeWidget; }; diff --git a/parts/outputviews/makewidget.cpp b/parts/outputviews/makewidget.cpp index 0e2e6aef..029efdc6 100644 --- a/parts/outputviews/makewidget.cpp +++ b/parts/outputviews/makewidget.cpp @@ -10,10 +10,10 @@ ***************************************************************************/ #include "makewidget.h" -#include "tdevcore.h" -#include "tdevmainwindow.h" -#include "tdevproject.h" -#include "tdevpartcontroller.h" +#include "kdevcore.h" +#include "kdevmainwindow.h" +#include "kdevproject.h" +#include "kdevpartcontroller.h" #include "processlinemaker.h" #include "makeviewpart.h" #include "makeitem.h" diff --git a/parts/outputviews/outputviewsfactory.cpp b/parts/outputviews/outputviewsfactory.cpp index d63621d6..55e5bf55 100644 --- a/parts/outputviews/outputviewsfactory.cpp +++ b/parts/outputviews/outputviewsfactory.cpp @@ -11,11 +11,11 @@ #include "outputviewsfactory.h" -static const TDevPluginInfo data("tdevoutputviews", I18N_NOOP("Messages Output"), "1.0"); +static const KDevPluginInfo data("kdevoutputviews", I18N_NOOP("Messages Output"), "1.0"); -K_EXPORT_COMPONENT_FACTORY( libtdevoutputviews, OutputViewsFactory( &data ) ) +K_EXPORT_COMPONENT_FACTORY( libkdevoutputviews, OutputViewsFactory( &data ) ) -const TDevPluginInfo *outputViewsInfo() +const KDevPluginInfo *outputViewsInfo() { return data; } diff --git a/parts/outputviews/outputviewsfactory.h b/parts/outputviews/outputviewsfactory.h index e79e60a2..4bcba666 100644 --- a/parts/outputviews/outputviewsfactory.h +++ b/parts/outputviews/outputviewsfactory.h @@ -12,16 +12,16 @@ #ifndef _OUTPUTVIEWSFACTORY_H_ #define _OUTPUTVIEWSFACTORY_H_ -#include +#include #include "appoutputviewpart.h" #include "makeviewpart.h" -class TDevPluginInfo; +class KDevPluginInfo; typedef K_TYPELIST_2( AppOutputViewPart, MakeViewPart ) OutputViews; -typedef TDevGenericFactory< OutputViews > OutputViewsFactory; +typedef KDevGenericFactory< OutputViews > OutputViewsFactory; -const TDevPluginInfo *outputViewsInfo(); +const KDevPluginInfo *outputViewsInfo(); #endif diff --git a/parts/outputviews/tdevappoutputview.desktop b/parts/outputviews/tdevappoutputview.desktop deleted file mode 100644 index 7791162d..00000000 --- a/parts/outputviews/tdevappoutputview.desktop +++ /dev/null @@ -1,84 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Application Output View -Comment[ca]=Visor de l'eixida de les aplicacions -Comment[da]=Program-uddata fremvisning -Comment[de]=Anwendungsausgabe für TDevelop -Comment[el]=Προβολή εξόδου εφαρμογής -Comment[es]=Visor de la salida de las aplicaciones -Comment[et]=Rakenduse väljundi vaade -Comment[eu]=Aplikazioen irteera ikustailua -Comment[fa]=نمای خروجی کاربرد -Comment[fr]=Fenêtre de sortie d'une application -Comment[gl]=Vista da saída da aplicación -Comment[hi]=अनुप्रयोग आउटपुट व्यू -Comment[hu]=Alkalmazáskimenet-megjelenítő -Comment[it]=Vista dell'output dell'applicazione -Comment[ja]=アプリケーション出力ビュー -Comment[ms]=Lihat Keluaran Aplikasi -Comment[nds]=Programmutgaav-Kieker -Comment[ne]=अनुप्रयोग निर्गत दृश्य -Comment[nl]=Weergave van toepassingsuitvoer -Comment[pl]=Widok wyjścia programu -Comment[pt]=Vista do Resultado da Aplicação -Comment[pt_BR]=Visão da Saída do Aplicativo -Comment[ru]=Окно вывода приложения -Comment[sk]=Pohľad na výstup aplikácie -Comment[sl]=Prikaz programskega izhoda -Comment[sr]=Приказ излаза апликације -Comment[sr@Latn]=Prikaz izlaza aplikacije -Comment[sv]=Programutmatningsvy -Comment[ta]=பயன்பாட்டு வெளியீட்டுக் காட்சி -Comment[tg]=Тирезаи хориҷ кардани гузориш -Comment[tr]=Uygulama Çıktı Görünümü -Comment[zh_CN]=应用程序输出查看器 -Comment[zh_TW]=應用程式輸出檢視 -Name=TDevAppOutputView -Name[da]=TDevelop Program-uddata fremvisning -Name[de]=Anwendungsausgabe (TDevelop) -Name[hi]=के-डेव-एप्प-आउटपुट-व्यू -Name[nds]=Programmutgaav-Kieker (TDevelop) -Name[pl]=TDevAppWidokWyjścia -Name[sk]=KDev pohľad na výstup aplikácie -Name[sv]=TDevelop programutmatningsvy -Name[ta]=TDevApp வெளியீட்டுக் காட்சி -Name[zh_TW]=TDevelop 應用程式輸出檢視 -GenericName=Application Output View -GenericName[ca]=Visor de l'eixida de les aplicacions -GenericName[da]=Program-uddata fremvisning -GenericName[de]=Anwendungsausgabe -GenericName[el]=Προβολή εξόδου εφαρμογής -GenericName[es]=Visor de la salida de las aplicaciones -GenericName[et]=Rakenduse väljundi vaade -GenericName[eu]=Aplikazioen irteera ikustailua -GenericName[fa]=نمای خروجی کاربرد -GenericName[fr]=Fenêtre de sortie d'une application -GenericName[gl]=Vista da saída da aplicación -GenericName[hi]=अनुप्रयोग आउटपुट व्यू -GenericName[hu]=Alkalmazáskimenet-megjelenítő -GenericName[it]=Visualizza l'output dell'applicazione -GenericName[ja]=アプリケーション出力ビュー -GenericName[nds]=Programmutgaav-Kieker -GenericName[ne]=अनुप्रयोग निर्गत दृश्य -GenericName[nl]=Weergave van toepassingsuitvoer -GenericName[pl]=Widok wyjścia programu -GenericName[pt]=Vista do Resultado da Aplicação -GenericName[pt_BR]=Visão da Saída do Aplicativo -GenericName[ru]=Окно вывода приложения -GenericName[sk]=Pohľad na výstup aplikácie -GenericName[sl]=Prikaz programskega izhoda -GenericName[sr]=Приказ излаза апликације -GenericName[sr@Latn]=Prikaz izlaza aplikacije -GenericName[sv]=Programutmatningsvy -GenericName[ta]=பயன்பாட்டு வெளியீட்டுக் காட்சி -GenericName[tg]=Тирезаи хориҷ кардани гузориш -GenericName[tr]=Uygulama Çıktı Görünümü -GenericName[zh_CN]=应用程序输出查看器 -GenericName[zh_TW]=應用程式輸出檢視 -Icon=exec -ServiceTypes=TDevelop/AppFrontend -X-TDE-Library=libtdevappview -X-TDevelop-Version=5 -X-TDevelop-Scope=Core -X-TDevelop-Properties=OutputTool diff --git a/parts/outputviews/tdevmakeview.desktop b/parts/outputviews/tdevmakeview.desktop deleted file mode 100644 index 5651f031..00000000 --- a/parts/outputviews/tdevmakeview.desktop +++ /dev/null @@ -1,87 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Compiler Frontend -Comment[ca]=Entorn per al compilador -Comment[da]=Grænseflade til oversætter -Comment[de]=Make-Ausgabe für TDevelop -Comment[el]=Πρόγραμμα μεταγλωττιστή -Comment[es]=Entorno para el compilador -Comment[et]=Kompilaatori kasutajaliides -Comment[eu]=Konpiladore interfazea -Comment[fa]=پایانۀ مترجم -Comment[fr]=Interface pour le compilateur -Comment[ga]=Comhéadan Tiomsaitheora -Comment[gl]=Frontal para o compilador -Comment[hi]=कम्पायलर फ्रन्टएण्ड -Comment[hu]=Grafikus felület fordítóprogramokhoz -Comment[it]=Interfaccia al compilatore -Comment[ja]=コンパイラフロントエンド -Comment[ms]=Frontend Penghimpun -Comment[nds]=Kompilerer-Böversiet -Comment[ne]=कम्पाइलर फ्रन्टइन्ड -Comment[nl]=Compiler-frontend -Comment[pl]=Interfejs do kompilatora -Comment[pt]=Interface de Compilador -Comment[pt_BR]=Frontend do Compilador -Comment[ru]=Интерфейс к компилятору -Comment[sk]=Rozhranie kompilátora -Comment[sl]=Vmesnik prevajalnika -Comment[sr]=Кориснички интерфејс за преводилац -Comment[sr@Latn]=Korisnički interfejs za prevodilac -Comment[sv]=Kompilatorgränssnitt -Comment[ta]=முன்பகுதி தொகுப்பான் -Comment[tg]=Интерфейс ба талфифгар -Comment[tr]=Derleyici Önucu -Comment[zh_CN]=编译器前端 -Comment[zh_TW]=編譯器前端介面 -Name=TDevMakeView -Name[da]=TDevelop Make-visning -Name[de]=Make-Ausgabe (TDevelop) -Name[hi]=के-डेव-मेक-व्यू -Name[nds]=Make-Kieker (TDevelop) -Name[pl]=KDevWIdokMake -Name[sk]=KDev pohľad na make -Name[sv]=TDevelop byggvy -Name[ta]=KDev காட்சியாக்கு -Name[zh_TW]=TDevelop Make 檢視 -GenericName=Compiler Frontend -GenericName[ca]=Entorn per al compilador -GenericName[da]=Grænseflade til oversætter -GenericName[de]=Make-Ausgabe -GenericName[el]=Πρόγραμμα μεταγλωττιστή -GenericName[es]=Entorno para el compilador -GenericName[et]=Kompilaatori kasutajaliides -GenericName[eu]=Konpiladore interfazea -GenericName[fa]=پایانۀ مترجم -GenericName[fr]=Interface pour le compilateur -GenericName[ga]=Comhéadan Tiomsaitheora -GenericName[gl]=Frontal para o compilador -GenericName[hi]=कम्पायलर फ्रन्टएण्ड -GenericName[hu]=Grafikus felület fordítóprogramokhoz -GenericName[it]=Interfaccia al compilatore -GenericName[ja]=コンパイラフロントエンド -GenericName[ms]=Frontend Penghimpun -GenericName[nds]=Kompilerer-Böversiet -GenericName[ne]=कम्पाइलर फ्रन्टइन्ड -GenericName[nl]=Compiler-frontend -GenericName[pl]=Interfejs do kompilatora -GenericName[pt]=Interface de Compilador -GenericName[pt_BR]=Frontend do Compilador -GenericName[ru]=Интерфейс к компилятору -GenericName[sk]=Rozhranie kompilátor -GenericName[sl]=Vmesnik prevajalnika -GenericName[sr]=Кориснички интерфејс преводиоца -GenericName[sr@Latn]=Korisnički interfejs prevodioca -GenericName[sv]=Kompilatorgränssnitt -GenericName[ta]=முன் பகுதி தொகுப்பான் -GenericName[tg]=Интерфейс ба талфифгар -GenericName[tr]=Derleyici Önucu -GenericName[zh_CN]=编译器前端 -GenericName[zh_TW]=編譯器前端介面 -Icon=konsole -ServiceTypes=TDevelop/MakeFrontend -X-TDE-Library=libtdevmakeview -X-TDevelop-Version=5 -X-TDevelop-Scope=Core -X-TDevelop-Properties=OutputTool diff --git a/parts/outputviews/tdevmakeview.rc b/parts/outputviews/tdevmakeview.rc deleted file mode 100644 index 869191cb..00000000 --- a/parts/outputviews/tdevmakeview.rc +++ /dev/null @@ -1,9 +0,0 @@ - - - -

    - - - - - diff --git a/parts/partexplorer/CMakeLists.txt b/parts/partexplorer/CMakeLists.txt index 8b9b130f..7fe5080f 100644 --- a/parts/partexplorer/CMakeLists.txt +++ b/parts/partexplorer/CMakeLists.txt @@ -25,13 +25,13 @@ link_directories( ##### other data ################################ -install( FILES tdevpartexplorer.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevpartexplorer.rc DESTINATION ${DATA_INSTALL_DIR}/tdevpartexplorer ) +install( FILES kdevpartexplorer.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevpartexplorer.rc DESTINATION ${DATA_INSTALL_DIR}/kdevpartexplorer ) -##### libtdevpartexplorer (module) ############## +##### libkdevpartexplorer (module) ############## -tde_add_kpart( libtdevpartexplorer AUTOMOC +tde_add_kpart( libkdevpartexplorer AUTOMOC SOURCES partexplorerformbase.ui partexplorerform.cpp partexplorer_plugin.cpp diff --git a/parts/partexplorer/Makefile.am b/parts/partexplorer/Makefile.am index b0d8dd8a..fcb6caff 100644 --- a/parts/partexplorer/Makefile.am +++ b/parts/partexplorer/Makefile.am @@ -2,16 +2,16 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces $(all_includes) -kde_module_LTLIBRARIES = libtdevpartexplorer.la -libtdevpartexplorer_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevpartexplorer_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevpartexplorer.la +libkdevpartexplorer_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevpartexplorer_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevpartexplorer_la_SOURCES = partexplorerformbase.ui partexplorerform.cpp partexplorer_plugin.cpp +libkdevpartexplorer_la_SOURCES = partexplorerformbase.ui partexplorerform.cpp partexplorer_plugin.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevpartexplorer.desktop +service_DATA = kdevpartexplorer.desktop -rcdir = $(kde_datadir)/tdevpartexplorer -rc_DATA = tdevpartexplorer.rc +rcdir = $(kde_datadir)/kdevpartexplorer +rc_DATA = kdevpartexplorer.rc diff --git a/parts/partexplorer/kdevpartexplorer.desktop b/parts/partexplorer/kdevpartexplorer.desktop new file mode 100644 index 00000000..ff432eeb --- /dev/null +++ b/parts/partexplorer/kdevpartexplorer.desktop @@ -0,0 +1,76 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=A Graphical tool for performing TDETrader-like queries about registered services +Comment[ca]=Una eina gràfica per a realitzar consultes del tipus TDETrader sobre els serveis registrats +Comment[da]=Et grafisk værktøj til at udføre TDETrader-lignende forespørgsler om registrerede tjenester +Comment[de]=Ein grafisches Werkzeug, mit dem Abfragen nach im System verfügbaren Komponten durchgeführt werden können +Comment[el]=Ένα γραφικό εργαλείο για την εκτέλεση ερωτήσεων όπως το TDETrader σχετικά με καταχωρημένες υπηρεσίες +Comment[es]=Una herramienta gráfica para realizar consultas del tipo TDETrader sobre los servicios registrados +Comment[et]=Graafiline vahend TDETraderi-laadsete päringute sooritamiseks registreeritud teenuste kohta +Comment[eu]=Erregistratutako zerbitzuei buruzko kontsultak egiteko, TDETrader-en antzeko tresna grafikoa +Comment[fa]=یک ابزار نگاره‌ای برای انجام TDETrader- مثل پرس‌وجوهایی در مورد خدمات ثبت‌شده +Comment[fr]=Un outil graphique pour effectuer des requêtes de type TDETrader sur les services enregistrés +Comment[gl]=Unha ferramente gráfica para realizar peticións tipo TDETrader dos servizos rexistrados +Comment[hu]=Grafikus felületű program a regisztrált szolgáltatások TDETrader-szerű lekérdezéséhez +Comment[it]=Uno strumento grafico per eseguire interrogazioni tipo TDETrader sui servizi registrati +Comment[ja]=登録されたサービスに関する TDETrader のような質問を実行するための視覚化されたツール +Comment[ms]=Alatan bergrafik untuk melaksanakan pertanyaan seperti-TDETrader mengenai servis berdaftar +Comment[nds]=En graafsch Warktüüch för TDETrader-liek Anfragen över indragen Deensten. +Comment[ne]=दर्ता गरेको सेवाका बारेमा क्वेरीहरू जस्तै-TDETrader कार्यसम्पादन गर्नका लागि एउटा ग्राफिकल उपकरण +Comment[nl]=Een grafische tool om naar geregistreerde diensten te zoeken +Comment[pl]=Narzędzie graficzne do wykonywania zapytań na temat zarejestrowanych usług (jak TDETrader) +Comment[pt]=Uma ferramenta gráfica para efectuar pesquisas do tipo TDETrader sobre os serviços registados +Comment[pt_BR]=Uma ferramenta Gráfica para realizar consultas como TDETrader sobre serviços registrados +Comment[ru]=Графическое средство для выполнения запросов TDETrader о зарегистрированных сервисах. +Comment[sk]=Grafický nástroj pre vyhľadávanie TDETraderregistrovaných služieb +Comment[sr]=Графички алат за обављање упита налик TDETrader-овим о регистрованим сервисима +Comment[sr@Latn]=Grafički alat za obavljanje upita nalik TDETrader-ovim o registrovanim servisima +Comment[sv]=Ett grafiskt verktyg för att utföra TDETrader-liknande förfrågningar om registrerade tjänster. +Comment[ta]=வரைகலை கருவி மூலம் பதிப்பு சேவையில் இருந்து Kட்ரேடர் கேள்விகளை செயலாக்கலாம். +Comment[tg]=Воситаи графикӣ барои иҷро намудани дархостҳои TDETrader дар бораи қайдкунии муҳаррирҳо +Comment[tr]=Kayıtlı servisler için TDETrader-benzeri sorgular yapmayı sağlayan bir grafiksel araç +Comment[zh_CN]=调用TDETrader的图形工具-就像查询已经注册的服务。 +Comment[zh_TW]=執行類似 TDETrader 查詢註冊服務的圖形化工具 +Name=KDevPartExplorer +Name[da]=TDevelop Part-søger +Name[nds]=TDevelop-Komponentkieker +Name[sk]=KDev Part prieskumník +Name[sv]=TDevelop delutforskare +Name[zh_TW]=TDevelop 元件探索 +GenericName=Part Explorer Tool +GenericName[ca]=Eina Part per a explorar +GenericName[da]=Partsøger værktøj +GenericName[de]=Komponenten-Explorer +GenericName[el]=Εργαλείο περιηγητή τμημάτων +GenericName[es]=Herramienta de exploración de partes +GenericName[et]=Komponentide näitaja +GenericName[eu]=Parteen arakatzaile tresna +GenericName[fa]=ابزار کاوشگر جزء +GenericName[fr]=Outil d'exploration des composants +GenericName[hu]=Objektumböngésző +GenericName[it]=Strumento per l'esplorazione di componenti +GenericName[ja]=部分調査ツール +GenericName[ms]=Alat Penjelajah Bahagian +GenericName[nds]=Kiekwarktüüch för Komponenten +GenericName[ne]=भाग एक्सप्लोरर उपकरण +GenericName[nl]=Part Explorer gereedschap +GenericName[pl]=Przeglądarka elementów KPart +GenericName[pt]=Ferramenta de Exploração de Partes +GenericName[pt_BR]=Ferramenta de Explorador de Parte +GenericName[ru]=Средство опроса компонентов +GenericName[sk]=Part prieskumník +GenericName[sl]=Orodje Part Explorer +GenericName[sr]=Алат за истраживање делова +GenericName[sr@Latn]=Alat za istraživanje delova +GenericName[sv]=Delutforskningsverktyg +GenericName[ta]=முழுவதும் தேடும் கருவியில் ஒரு பகுதி +GenericName[tg]=Восиати дархости қисматҳо +GenericName[tr]=Bileşen Gezinti Aracı +GenericName[zh_CN]=模块浏览器工具 +GenericName[zh_TW]=元件探索工具 +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevpartexplorer +X-TDevelop-Version=5 +X-TDevelop-Scope=Global +X-TDevelop-Properties=KDEDevelopment diff --git a/parts/partexplorer/kdevpartexplorer.rc b/parts/partexplorer/kdevpartexplorer.rc new file mode 100644 index 00000000..9632115b --- /dev/null +++ b/parts/partexplorer/kdevpartexplorer.rc @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/parts/partexplorer/partexplorer_plugin.cpp b/parts/partexplorer/partexplorer_plugin.cpp index 43ab5717..d5240edb 100644 --- a/parts/partexplorer/partexplorer_plugin.cpp +++ b/parts/partexplorer/partexplorer_plugin.cpp @@ -13,28 +13,28 @@ #include #include -#include +#include #include #include #include -#include -#include +#include +#include #include "partexplorerform.h" -static const TDevPluginInfo data("tdevpartexplorer"); +static const KDevPluginInfo data("kdevpartexplorer"); -typedef TDevGenericFactory PartExplorerPluginFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevpartexplorer, PartExplorerPluginFactory( data ) ) +typedef KDevGenericFactory PartExplorerPluginFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevpartexplorer, PartExplorerPluginFactory( data ) ) PartExplorerPlugin::PartExplorerPlugin( TQObject *parent, const char *name, const TQStringList & ) - : TDevPlugin( &data, parent, name ? name : "PartExplorerPlugin" ) + : KDevPlugin( &data, parent, name ? name : "PartExplorerPlugin" ) { // we need an instance setInstance( PartExplorerPluginFactory::instance() ); - setXMLFile( "tdevpartexplorer.rc" ); + setXMLFile( "kdevpartexplorer.rc" ); // this should be your custom internal widget m_widget = new PartExplorerForm( mainWindow()->main() ); diff --git a/parts/partexplorer/partexplorer_plugin.h b/parts/partexplorer/partexplorer_plugin.h index 622ff002..eea44750 100644 --- a/parts/partexplorer/partexplorer_plugin.h +++ b/parts/partexplorer/partexplorer_plugin.h @@ -14,14 +14,14 @@ #include -#include "tdevplugin.h" +#include "kdevplugin.h" class TQWidget; class TQPainter; class KURL; class PartExplorerForm; -class PartExplorerPlugin : public TDevPlugin +class PartExplorerPlugin : public KDevPlugin { Q_OBJECT diff --git a/parts/partexplorer/tdevpartexplorer.desktop b/parts/partexplorer/tdevpartexplorer.desktop deleted file mode 100644 index 0e1242c4..00000000 --- a/parts/partexplorer/tdevpartexplorer.desktop +++ /dev/null @@ -1,76 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=A Graphical tool for performing TDETrader-like queries about registered services -Comment[ca]=Una eina gràfica per a realitzar consultes del tipus TDETrader sobre els serveis registrats -Comment[da]=Et grafisk værktøj til at udføre TDETrader-lignende forespørgsler om registrerede tjenester -Comment[de]=Ein grafisches Werkzeug, mit dem Abfragen nach im System verfügbaren Komponten durchgeführt werden können -Comment[el]=Ένα γραφικό εργαλείο για την εκτέλεση ερωτήσεων όπως το TDETrader σχετικά με καταχωρημένες υπηρεσίες -Comment[es]=Una herramienta gráfica para realizar consultas del tipo TDETrader sobre los servicios registrados -Comment[et]=Graafiline vahend TDETraderi-laadsete päringute sooritamiseks registreeritud teenuste kohta -Comment[eu]=Erregistratutako zerbitzuei buruzko kontsultak egiteko, TDETrader-en antzeko tresna grafikoa -Comment[fa]=یک ابزار نگاره‌ای برای انجام TDETrader- مثل پرس‌وجوهایی در مورد خدمات ثبت‌شده -Comment[fr]=Un outil graphique pour effectuer des requêtes de type TDETrader sur les services enregistrés -Comment[gl]=Unha ferramente gráfica para realizar peticións tipo TDETrader dos servizos rexistrados -Comment[hu]=Grafikus felületű program a regisztrált szolgáltatások TDETrader-szerű lekérdezéséhez -Comment[it]=Uno strumento grafico per eseguire interrogazioni tipo TDETrader sui servizi registrati -Comment[ja]=登録されたサービスに関する TDETrader のような質問を実行するための視覚化されたツール -Comment[ms]=Alatan bergrafik untuk melaksanakan pertanyaan seperti-TDETrader mengenai servis berdaftar -Comment[nds]=En graafsch Warktüüch för TDETrader-liek Anfragen över indragen Deensten. -Comment[ne]=दर्ता गरेको सेवाका बारेमा क्वेरीहरू जस्तै-TDETrader कार्यसम्पादन गर्नका लागि एउटा ग्राफिकल उपकरण -Comment[nl]=Een grafische tool om naar geregistreerde diensten te zoeken -Comment[pl]=Narzędzie graficzne do wykonywania zapytań na temat zarejestrowanych usług (jak TDETrader) -Comment[pt]=Uma ferramenta gráfica para efectuar pesquisas do tipo TDETrader sobre os serviços registados -Comment[pt_BR]=Uma ferramenta Gráfica para realizar consultas como TDETrader sobre serviços registrados -Comment[ru]=Графическое средство для выполнения запросов TDETrader о зарегистрированных сервисах. -Comment[sk]=Grafický nástroj pre vyhľadávanie TDETraderregistrovaných služieb -Comment[sr]=Графички алат за обављање упита налик TDETrader-овим о регистрованим сервисима -Comment[sr@Latn]=Grafički alat za obavljanje upita nalik TDETrader-ovim o registrovanim servisima -Comment[sv]=Ett grafiskt verktyg för att utföra TDETrader-liknande förfrågningar om registrerade tjänster. -Comment[ta]=வரைகலை கருவி மூலம் பதிப்பு சேவையில் இருந்து Kட்ரேடர் கேள்விகளை செயலாக்கலாம். -Comment[tg]=Воситаи графикӣ барои иҷро намудани дархостҳои TDETrader дар бораи қайдкунии муҳаррирҳо -Comment[tr]=Kayıtlı servisler için TDETrader-benzeri sorgular yapmayı sağlayan bir grafiksel araç -Comment[zh_CN]=调用TDETrader的图形工具-就像查询已经注册的服务。 -Comment[zh_TW]=執行類似 TDETrader 查詢註冊服務的圖形化工具 -Name=TDevPartExplorer -Name[da]=TDevelop Part-søger -Name[nds]=TDevelop-Komponentkieker -Name[sk]=KDev Part prieskumník -Name[sv]=TDevelop delutforskare -Name[zh_TW]=TDevelop 元件探索 -GenericName=Part Explorer Tool -GenericName[ca]=Eina Part per a explorar -GenericName[da]=Partsøger værktøj -GenericName[de]=Komponenten-Explorer -GenericName[el]=Εργαλείο περιηγητή τμημάτων -GenericName[es]=Herramienta de exploración de partes -GenericName[et]=Komponentide näitaja -GenericName[eu]=Parteen arakatzaile tresna -GenericName[fa]=ابزار کاوشگر جزء -GenericName[fr]=Outil d'exploration des composants -GenericName[hu]=Objektumböngésző -GenericName[it]=Strumento per l'esplorazione di componenti -GenericName[ja]=部分調査ツール -GenericName[ms]=Alat Penjelajah Bahagian -GenericName[nds]=Kiekwarktüüch för Komponenten -GenericName[ne]=भाग एक्सप्लोरर उपकरण -GenericName[nl]=Part Explorer gereedschap -GenericName[pl]=Przeglądarka elementów KPart -GenericName[pt]=Ferramenta de Exploração de Partes -GenericName[pt_BR]=Ferramenta de Explorador de Parte -GenericName[ru]=Средство опроса компонентов -GenericName[sk]=Part prieskumník -GenericName[sl]=Orodje Part Explorer -GenericName[sr]=Алат за истраживање делова -GenericName[sr@Latn]=Alat za istraživanje delova -GenericName[sv]=Delutforskningsverktyg -GenericName[ta]=முழுவதும் தேடும் கருவியில் ஒரு பகுதி -GenericName[tg]=Восиати дархости қисматҳо -GenericName[tr]=Bileşen Gezinti Aracı -GenericName[zh_CN]=模块浏览器工具 -GenericName[zh_TW]=元件探索工具 -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevpartexplorer -X-TDevelop-Version=5 -X-TDevelop-Scope=Global -X-TDevelop-Properties=KDEDevelopment diff --git a/parts/partexplorer/tdevpartexplorer.rc b/parts/partexplorer/tdevpartexplorer.rc deleted file mode 100644 index 1dff4ed6..00000000 --- a/parts/partexplorer/tdevpartexplorer.rc +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/parts/quickopen/CMakeLists.txt b/parts/quickopen/CMakeLists.txt index ad6fa926..cb82433f 100644 --- a/parts/quickopen/CMakeLists.txt +++ b/parts/quickopen/CMakeLists.txt @@ -28,13 +28,13 @@ link_directories( ##### other data ################################ -install( FILES tdevquickopen.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevpart_quickopen.rc DESTINATION ${DATA_INSTALL_DIR}/tdevquickopen ) +install( FILES kdevquickopen.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevpart_quickopen.rc DESTINATION ${DATA_INSTALL_DIR}/kdevquickopen ) -##### libtdevquickopen (module) ################# +##### libkdevquickopen (module) ################# -tde_add_kpart( libtdevquickopen AUTOMOC +tde_add_kpart( libkdevquickopen AUTOMOC SOURCES quickopen_part.cpp quickopendialog.cpp quickopenclassdialog.cpp quickopenbase.ui diff --git a/parts/quickopen/Makefile.am b/parts/quickopen/Makefile.am index cce44ae3..ca7ed3dd 100644 --- a/parts/quickopen/Makefile.am +++ b/parts/quickopen/Makefile.am @@ -1,17 +1,17 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/interfaces/extensions \ -I$(top_srcdir)/lib/interfaces/external -I$(top_srcdir)/lib/util -I$(top_srcdir)/lib/widgets $(all_includes) -kde_module_LTLIBRARIES = libtdevquickopen.la -libtdevquickopen_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevquickopen_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/widgets/libtdevwidgets.la $(LIB_TDEHTML) +kde_module_LTLIBRARIES = libkdevquickopen.la +libkdevquickopen_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevquickopen_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/widgets/libkdevwidgets.la $(LIB_TDEHTML) -libtdevquickopen_la_SOURCES = quickopen_part.cpp quickopendialog.cpp quickopenclassdialog.cpp quickopenbase.ui quickopenfiledialog.cpp quickopenfunctiondialog.cpp quickopenfunctionchooseformbase.ui quickopenfunctionchooseform.cpp +libkdevquickopen_la_SOURCES = quickopen_part.cpp quickopendialog.cpp quickopenclassdialog.cpp quickopenbase.ui quickopenfiledialog.cpp quickopenfunctiondialog.cpp quickopenfunctionchooseformbase.ui quickopenfunctionchooseform.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevquickopen.desktop +service_DATA = kdevquickopen.desktop -rcdir = $(kde_datadir)/tdevquickopen -rc_DATA = tdevpart_quickopen.rc +rcdir = $(kde_datadir)/kdevquickopen +rc_DATA = kdevpart_quickopen.rc noinst_HEADERS = quickopendialog.h quickopenclassdialog.h quickopenfiledialog.h quickopenfunctiondialog.h quickopenfunctionchooseform.h diff --git a/parts/quickopen/tdevpart_quickopen.rc b/parts/quickopen/kdevpart_quickopen.rc similarity index 100% rename from parts/quickopen/tdevpart_quickopen.rc rename to parts/quickopen/kdevpart_quickopen.rc diff --git a/parts/quickopen/kdevquickopen.desktop b/parts/quickopen/kdevquickopen.desktop new file mode 100644 index 00000000..42a8e8ff --- /dev/null +++ b/parts/quickopen/kdevquickopen.desktop @@ -0,0 +1,80 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Provides an efficient way of finding/opening files, classes and methods in a large project. Appears in the File and Tools menus when loaded. +Comment[ca]=Proporciona un mètode eficient per a cercar i obrir fitxers, classes i mètodes en un projecte gran. Quan està carregat apareix en el menú Fitxer i Eines. +Comment[da]=Giver en effektiv måde at finde/åbne, filer, klasser og metoder i et stort projekt. Viser sig i Fil- og værktøjsmenuerne når den er indlæst. +Comment[de]=Stellt eine effektive Möglichkeit zum Suchen und Öffnen von Dateien in einem großen Projekt zur Verfügung. Erscheint im Menü "Datei", wenn es geladen ist. +Comment[el]=Προσφέρει μια εύχρηστη μέθοδο αναζήτησης/ανοίγματος αρχείων, κλάσεων και μεθόδων σε ένα μεγάλο έργο. Εμφανίζεται στα μενού αρχείων και εργαλείων όταν φορτωθεί. +Comment[es]=Proporciona un método para para buscar/abrir archivos, clases y métodos de un proyecto grande. Aparece en los menús Archivo y Herramientas cuando está cargado. +Comment[et]=Võimaldab hõlpsasti leida/avada faile, klasse ja meetodeid suures projektis. Laadimisel kättesaadav faili- ja tööriistade menüüs. +Comment[eu]=Proiektu handi batean fitxategiak, klaseak eta metodoak aurkitzeko/irekitzeko aukera eskeintzen du. Fitxategia eta Tresnak menutan agertzen da kargatzean. +Comment[fa]=راه مؤثری برای یافتن/باز کردن پرونده‌ها، رده‌ها و روشها در پروژه‌های بزرگ فراهم می‌کند. در هنگام بارگذاری در گزینگان ابزار و پرونده ظاهر می‌شود. +Comment[fr]=Fournit une manière efficace pour chercher / ouvrir des fichiers, classes et méthodes dans des grands projets. Apparaît dans les menus « Fichier » et « Outils » lorsque chargé. +Comment[gl]=Proporciona un método eficiente para atopar/abrir ficheiros, clases e métodos nun proxecto grande. Aparece nos menús Ficheiro e Ferramentas cando se carga. +Comment[hu]=Segítséget nyújt nagy projekteknél fájlok, osztályok és tagfüggvények kereséséhez, megnyitásához. Betöltéskor a Fájl és Eszközök menübe kerül. +Comment[it]=Offre un modo efficiente per trovare/aprire file, classi e metodi in un progetto di ampia dimensione. Appare nel menu File e Strumenti quando caricato. +Comment[ja]=大規模なプロジェクトでのファイルやクラス、メソッドを検索したり開く効率的な方法を提供します。読み込まれると、ファイルとツールのメニューに現れます。 +Comment[ms]=Menyediakan cara efisien untuk mencari/membuka fail, kelas dan kaedah dalam projek besar. Muncul sebagai menu Fail dan Alatan apabila dimuatkan. +Comment[nds]=Stellt en effektiv Metood för't Söken un Opmaken vun Dateien, Klassen un Metoden in grötter Projekten praat. Dukt in't Menü "Datei" un "Warktüüch" op, wenn laadt. +Comment[ne]=ठूलो परियोजनामा फाइल फेला पार्ने/खोल्ने, कक्षहरू र विधिको उपयुक्त तरिका प्रदान गर्दछ । लोड भएको बेलामा फाइल र उपकरणमा देखा पर्दछ । +Comment[nl]=Biedt een snelle manier om bestanden te vinden/openen in een groot project. Verschijnt in menu Bestand en Gereedschap als het geladen is. +Comment[pl]=Umożliwia wyszukiwanie/otwieranie plików, klas i metod w dużym projekcie. Po wczytaniu pojawia się w menu Plik i Narzędzia. +Comment[pt]=Oferece uma forma eficiente de procurar/abrir ficheiros, classes e métodos num projecto grande. Aparece nos menus Ficheiro e Ferramentas quando é carregado. +Comment[pt_BR]=Fornece uma maneira eficiente de procurar/abrir arquivos, classes e métodos em um grande projeto. Aparece nos menus Arquivo e Ferramentas quando carregado. +Comment[ru]=Предоставляет эффективное средство нахождения и открытия файлов и классов в больших проектах. +Comment[sk]=Poskytuje efektívny spôsob hľadania/otvárania súborov, tried a metód vo veľkom projekte. Po načítaní sa objaví v menu Súbor a Nástroje. +Comment[sr]=Обезбеђује ефикасан начин проналажења/отварања фајлова, класа и метода у великом пројекту. Појављује се у менијима „Фајл“ и „Алати“ када је учитан. +Comment[sr@Latn]=Obezbeđuje efikasan način pronalaženja/otvaranja fajlova, klasa i metoda u velikom projektu. Pojavljuje se u menijima „Fajl“ i „Alati“ kada je učitan. +Comment[sv]=Erbjuder ett effektivt sätt att hitta och öppna filer, klasser och metoder i ett stort projekt. Finns i menyn Arkiv och Verktyg när det laddats. +Comment[ta]=பெரிய திட்ட பணிகளில் உள்ள கோப்பினை திறக்க/தேட இது ஒரு நல்ல வழியை தரும். ஏற்றியபின் கோப்பு பட்டியலில் இது தோன்றும். +Comment[tg]=Воситаи зуд ёфтан, кушодани файлҳо ва синфҳо дар лоиҳаҳоро имкон медиҳад. +Comment[tr]=Büyük bir projede dosyaları, sınıfları ve yöntemleri bulmak ve açmak için verimli bir yol sunar. Yüklendiğinde Dosya ve Araçlar menüsünde durur. +Comment[zh_CN]=提供在大工程中查找/打开文件、类和方法的有效方法。启动后显示在文件菜单中。 +Comment[zh_TW]=在大型專案中有效率地尋找/開啟檔案、類別與方法。載入後可以在檔案與工具選單中找到。 +Name=KDevQuickOpen +Name[da]=TDevelop hurtigåbner +Name[de]=Schnellöffner-Komponente (TDevelop) +Name[hi]=के-डेव-क्विक-ओपन +Name[nds]=TDevelop-Fixopmaker +Name[pl]=KDevSzybkieOtwarcie +Name[sk]=KDev rýchle otvorenie +Name[sv]=TDevelop snabböppna +Name[ta]=KDev சீக்கிரம் திற +Name[zh_TW]=TDevelop 快速開啟 +GenericName=QuickOpen +GenericName[ca]=Obertura ràpida +GenericName[da]=Hurtigåbner +GenericName[de]=Schnellöffner +GenericName[el]=ΓρήγοροΆνοιγμα +GenericName[es]=Apertura rápida +GenericName[et]=Kiiresti avamine +GenericName[fa]=باز کردن سریع +GenericName[fr]=Ouverture rapide +GenericName[gl]=Apertura rápida +GenericName[hi]=क्विक-ओपन +GenericName[hu]=Gyors fájlmegnyitó +GenericName[it]=Apertura rapida +GenericName[ja]=簡易読み込み +GenericName[nds]=Gau opmaken +GenericName[ne]=शीघ्र खुला +GenericName[nl]=Snel openen +GenericName[pl]=Szybkie otwarcie +GenericName[pt]=Abertura Rápida +GenericName[ru]=Быстрое открытие +GenericName[sk]=Rýchle otvorenie +GenericName[sl]=Hitro odprtje +GenericName[sr]=Брзо отварање +GenericName[sr@Latn]=Brzo otvaranje +GenericName[sv]=Snabböppna +GenericName[ta]=சீக்கிரம் திற +GenericName[tg]=Ба зуди кушодан +GenericName[tr]=HızlıAç +GenericName[zh_CN]=快速打开 +GenericName[zh_TW]=快速開啟 +Icon=tdevelop +ServiceTypes=TDevelop/QuickOpen +X-TDevelop-Scope=Project +X-TDE-Library=libkdevquickopen +X-TDevelop-Version=5 +X-TDevelop-Properties=CodeNavigation diff --git a/parts/quickopen/quickopen_part.cpp b/parts/quickopen/quickopen_part.cpp index 3a8a10c4..4d316e68 100644 --- a/parts/quickopen/quickopen_part.cpp +++ b/parts/quickopen/quickopen_part.cpp @@ -27,25 +27,25 @@ #include #include #include -#include -#include +#include +#include #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include -#include "tdeveditorutil.h" +#include "kdeveditorutil.h" -typedef TDevGenericFactory QuickOpenFactory; -static const TDevPluginInfo data("tdevquickopen"); -K_EXPORT_COMPONENT_FACTORY( libtdevquickopen, QuickOpenFactory( data ) ) +typedef KDevGenericFactory QuickOpenFactory; +static const KDevPluginInfo data("kdevquickopen"); +K_EXPORT_COMPONENT_FACTORY( libkdevquickopen, QuickOpenFactory( data ) ) using namespace KTextEditor; @@ -53,7 +53,7 @@ QuickOpenPart::QuickOpenPart(TQObject *parent, const char *name, const TQStringL : KDevQuickOpen(&data, parent, name ? name : "QuickOpenPart" ) { setInstance(QuickOpenFactory::instance()); - setXMLFile("tdevpart_quickopen.rc"); + setXMLFile("kdevpart_quickopen.rc"); m_actionQuickOpen = new TDEAction( i18n("Quick Open File..."), CTRL + ALT + Key_O, this, TQT_SLOT(slotQuickFileOpen()), @@ -100,14 +100,14 @@ void QuickOpenPart::slotQuickFileOpen( ) void QuickOpenPart::slotQuickOpenClass( ) { QuickOpenClassDialog dlg( this, mainWindow()->main() ); - dlg.nameEdit->setText( TDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ) ); + dlg.nameEdit->setText( KDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ) ); dlg.exec(); } void QuickOpenPart::slotQuickOpenFunction() { QuickOpenFunctionDialog dlg( this, mainWindow()->main() ); - dlg.nameEdit->setText( TDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ) ); + dlg.nameEdit->setText( KDevEditorUtil::currentWord( dynamic_cast( partController()->activePart() ) ) ); dlg.exec(); } @@ -119,7 +119,7 @@ void QuickOpenPart::slotSwitchTo() void QuickOpenPart::selectItem( ItemDom item ) { - Extensions::TDevCodeBrowserFrontend* f = extension< Extensions::TDevCodeBrowserFrontend > ( "KDevelop/CodeBrowserFrontend" ); + Extensions::KDevCodeBrowserFrontend* f = extension< Extensions::KDevCodeBrowserFrontend > ( "KDevelop/CodeBrowserFrontend" ); if(f != 0) { ItemDom itemDom( &(*item) ); diff --git a/parts/quickopen/quickopen_part.h b/parts/quickopen/quickopen_part.h index aff0d4f6..fa1d85e3 100644 --- a/parts/quickopen/quickopen_part.h +++ b/parts/quickopen/quickopen_part.h @@ -18,11 +18,11 @@ * */ -#ifndef __TDEVPART_QUICKOPEN_H__ -#define __TDEVPART_QUICKOPEN_H__ +#ifndef __KDEVPART_QUICKOPEN_H__ +#define __KDEVPART_QUICKOPEN_H__ #include -#include +#include #include class TDEAction; diff --git a/parts/quickopen/quickopenclassdialog.cpp b/parts/quickopen/quickopenclassdialog.cpp index 7dcfd48b..37987166 100644 --- a/parts/quickopen/quickopenclassdialog.cpp +++ b/parts/quickopen/quickopenclassdialog.cpp @@ -18,9 +18,9 @@ * */ -#include -#include -#include +#include +#include +#include #include #include diff --git a/parts/quickopen/quickopenfiledialog.cpp b/parts/quickopen/quickopenfiledialog.cpp index fc8da49a..18f15974 100644 --- a/parts/quickopen/quickopenfiledialog.cpp +++ b/parts/quickopen/quickopenfiledialog.cpp @@ -18,8 +18,8 @@ * */ -#include -#include +#include +#include #include diff --git a/parts/quickopen/quickopenfunctiondialog.cpp b/parts/quickopen/quickopenfunctiondialog.cpp index 14f7a984..bbcab7e4 100644 --- a/parts/quickopen/quickopenfunctiondialog.cpp +++ b/parts/quickopen/quickopenfunctiondialog.cpp @@ -28,11 +28,11 @@ #include #include -#include +#include #include -#include -#include -#include +#include +#include +#include #include diff --git a/parts/quickopen/tdevquickopen.desktop b/parts/quickopen/tdevquickopen.desktop deleted file mode 100644 index ed500ad4..00000000 --- a/parts/quickopen/tdevquickopen.desktop +++ /dev/null @@ -1,80 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Provides an efficient way of finding/opening files, classes and methods in a large project. Appears in the File and Tools menus when loaded. -Comment[ca]=Proporciona un mètode eficient per a cercar i obrir fitxers, classes i mètodes en un projecte gran. Quan està carregat apareix en el menú Fitxer i Eines. -Comment[da]=Giver en effektiv måde at finde/åbne, filer, klasser og metoder i et stort projekt. Viser sig i Fil- og værktøjsmenuerne når den er indlæst. -Comment[de]=Stellt eine effektive Möglichkeit zum Suchen und Öffnen von Dateien in einem großen Projekt zur Verfügung. Erscheint im Menü "Datei", wenn es geladen ist. -Comment[el]=Προσφέρει μια εύχρηστη μέθοδο αναζήτησης/ανοίγματος αρχείων, κλάσεων και μεθόδων σε ένα μεγάλο έργο. Εμφανίζεται στα μενού αρχείων και εργαλείων όταν φορτωθεί. -Comment[es]=Proporciona un método para para buscar/abrir archivos, clases y métodos de un proyecto grande. Aparece en los menús Archivo y Herramientas cuando está cargado. -Comment[et]=Võimaldab hõlpsasti leida/avada faile, klasse ja meetodeid suures projektis. Laadimisel kättesaadav faili- ja tööriistade menüüs. -Comment[eu]=Proiektu handi batean fitxategiak, klaseak eta metodoak aurkitzeko/irekitzeko aukera eskeintzen du. Fitxategia eta Tresnak menutan agertzen da kargatzean. -Comment[fa]=راه مؤثری برای یافتن/باز کردن پرونده‌ها، رده‌ها و روشها در پروژه‌های بزرگ فراهم می‌کند. در هنگام بارگذاری در گزینگان ابزار و پرونده ظاهر می‌شود. -Comment[fr]=Fournit une manière efficace pour chercher / ouvrir des fichiers, classes et méthodes dans des grands projets. Apparaît dans les menus « Fichier » et « Outils » lorsque chargé. -Comment[gl]=Proporciona un método eficiente para atopar/abrir ficheiros, clases e métodos nun proxecto grande. Aparece nos menús Ficheiro e Ferramentas cando se carga. -Comment[hu]=Segítséget nyújt nagy projekteknél fájlok, osztályok és tagfüggvények kereséséhez, megnyitásához. Betöltéskor a Fájl és Eszközök menübe kerül. -Comment[it]=Offre un modo efficiente per trovare/aprire file, classi e metodi in un progetto di ampia dimensione. Appare nel menu File e Strumenti quando caricato. -Comment[ja]=大規模なプロジェクトでのファイルやクラス、メソッドを検索したり開く効率的な方法を提供します。読み込まれると、ファイルとツールのメニューに現れます。 -Comment[ms]=Menyediakan cara efisien untuk mencari/membuka fail, kelas dan kaedah dalam projek besar. Muncul sebagai menu Fail dan Alatan apabila dimuatkan. -Comment[nds]=Stellt en effektiv Metood för't Söken un Opmaken vun Dateien, Klassen un Metoden in grötter Projekten praat. Dukt in't Menü "Datei" un "Warktüüch" op, wenn laadt. -Comment[ne]=ठूलो परियोजनामा फाइल फेला पार्ने/खोल्ने, कक्षहरू र विधिको उपयुक्त तरिका प्रदान गर्दछ । लोड भएको बेलामा फाइल र उपकरणमा देखा पर्दछ । -Comment[nl]=Biedt een snelle manier om bestanden te vinden/openen in een groot project. Verschijnt in menu Bestand en Gereedschap als het geladen is. -Comment[pl]=Umożliwia wyszukiwanie/otwieranie plików, klas i metod w dużym projekcie. Po wczytaniu pojawia się w menu Plik i Narzędzia. -Comment[pt]=Oferece uma forma eficiente de procurar/abrir ficheiros, classes e métodos num projecto grande. Aparece nos menus Ficheiro e Ferramentas quando é carregado. -Comment[pt_BR]=Fornece uma maneira eficiente de procurar/abrir arquivos, classes e métodos em um grande projeto. Aparece nos menus Arquivo e Ferramentas quando carregado. -Comment[ru]=Предоставляет эффективное средство нахождения и открытия файлов и классов в больших проектах. -Comment[sk]=Poskytuje efektívny spôsob hľadania/otvárania súborov, tried a metód vo veľkom projekte. Po načítaní sa objaví v menu Súbor a Nástroje. -Comment[sr]=Обезбеђује ефикасан начин проналажења/отварања фајлова, класа и метода у великом пројекту. Појављује се у менијима „Фајл“ и „Алати“ када је учитан. -Comment[sr@Latn]=Obezbeđuje efikasan način pronalaženja/otvaranja fajlova, klasa i metoda u velikom projektu. Pojavljuje se u menijima „Fajl“ i „Alati“ kada je učitan. -Comment[sv]=Erbjuder ett effektivt sätt att hitta och öppna filer, klasser och metoder i ett stort projekt. Finns i menyn Arkiv och Verktyg när det laddats. -Comment[ta]=பெரிய திட்ட பணிகளில் உள்ள கோப்பினை திறக்க/தேட இது ஒரு நல்ல வழியை தரும். ஏற்றியபின் கோப்பு பட்டியலில் இது தோன்றும். -Comment[tg]=Воситаи зуд ёфтан, кушодани файлҳо ва синфҳо дар лоиҳаҳоро имкон медиҳад. -Comment[tr]=Büyük bir projede dosyaları, sınıfları ve yöntemleri bulmak ve açmak için verimli bir yol sunar. Yüklendiğinde Dosya ve Araçlar menüsünde durur. -Comment[zh_CN]=提供在大工程中查找/打开文件、类和方法的有效方法。启动后显示在文件菜单中。 -Comment[zh_TW]=在大型專案中有效率地尋找/開啟檔案、類別與方法。載入後可以在檔案與工具選單中找到。 -Name=KDevQuickOpen -Name[da]=TDevelop hurtigåbner -Name[de]=Schnellöffner-Komponente (TDevelop) -Name[hi]=के-डेव-क्विक-ओपन -Name[nds]=TDevelop-Fixopmaker -Name[pl]=KDevSzybkieOtwarcie -Name[sk]=KDev rýchle otvorenie -Name[sv]=TDevelop snabböppna -Name[ta]=KDev சீக்கிரம் திற -Name[zh_TW]=TDevelop 快速開啟 -GenericName=QuickOpen -GenericName[ca]=Obertura ràpida -GenericName[da]=Hurtigåbner -GenericName[de]=Schnellöffner -GenericName[el]=ΓρήγοροΆνοιγμα -GenericName[es]=Apertura rápida -GenericName[et]=Kiiresti avamine -GenericName[fa]=باز کردن سریع -GenericName[fr]=Ouverture rapide -GenericName[gl]=Apertura rápida -GenericName[hi]=क्विक-ओपन -GenericName[hu]=Gyors fájlmegnyitó -GenericName[it]=Apertura rapida -GenericName[ja]=簡易読み込み -GenericName[nds]=Gau opmaken -GenericName[ne]=शीघ्र खुला -GenericName[nl]=Snel openen -GenericName[pl]=Szybkie otwarcie -GenericName[pt]=Abertura Rápida -GenericName[ru]=Быстрое открытие -GenericName[sk]=Rýchle otvorenie -GenericName[sl]=Hitro odprtje -GenericName[sr]=Брзо отварање -GenericName[sr@Latn]=Brzo otvaranje -GenericName[sv]=Snabböppna -GenericName[ta]=சீக்கிரம் திற -GenericName[tg]=Ба зуди кушодан -GenericName[tr]=HızlıAç -GenericName[zh_CN]=快速打开 -GenericName[zh_TW]=快速開啟 -Icon=tdevelop -ServiceTypes=TDevelop/QuickOpen -X-TDevelop-Scope=Project -X-TDE-Library=libtdevquickopen -X-TDevelop-Version=5 -X-TDevelop-Properties=CodeNavigation diff --git a/parts/regexptest/CMakeLists.txt b/parts/regexptest/CMakeLists.txt index 3bc96414..608f053c 100644 --- a/parts/regexptest/CMakeLists.txt +++ b/parts/regexptest/CMakeLists.txt @@ -25,13 +25,13 @@ link_directories( ##### other data ################################ -install( FILES tdevregexptest.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevregexptest.rc DESTINATION ${DATA_INSTALL_DIR}/tdevregexptest ) +install( FILES kdevregexptest.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevregexptest.rc DESTINATION ${DATA_INSTALL_DIR}/kdevregexptest ) -##### libtdevregexptest (module) ################ +##### libkdevregexptest (module) ################ -tde_add_kpart( libtdevregexptest AUTOMOC +tde_add_kpart( libkdevregexptest AUTOMOC SOURCES regexptestpart.cpp regexptestdlg.cpp regexptestdlgbase.ui LINK tdevelop-shared diff --git a/parts/regexptest/Makefile.am b/parts/regexptest/Makefile.am index 8e87ac79..df99989f 100644 --- a/parts/regexptest/Makefile.am +++ b/parts/regexptest/Makefile.am @@ -2,16 +2,16 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces $(all_includes) -kde_module_LTLIBRARIES = libtdevregexptest.la -libtdevregexptest_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevregexptest_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevregexptest.la +libkdevregexptest_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevregexptest_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevregexptest_la_SOURCES = regexptestpart.cpp regexptestdlg.cpp regexptestdlgbase.ui +libkdevregexptest_la_SOURCES = regexptestpart.cpp regexptestdlg.cpp regexptestdlgbase.ui METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevregexptest.desktop +service_DATA = kdevregexptest.desktop -rcdir = $(kde_datadir)/tdevregexptest -rc_DATA = tdevregexptest.rc +rcdir = $(kde_datadir)/kdevregexptest +rc_DATA = kdevregexptest.rc diff --git a/parts/regexptest/kdevregexptest.desktop b/parts/regexptest/kdevregexptest.desktop new file mode 100644 index 00000000..57f93f73 --- /dev/null +++ b/parts/regexptest/kdevregexptest.desktop @@ -0,0 +1,82 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Tool to design and test regular expressions against common regexp syntaxes. +Comment[ca]=Eina per a dissenyar i provar expressions regulars amb sintaxis d'expressions regulars comuns. +Comment[da]=Værktøj til at designe og teste regulære udtryk imod almindelige regexp syntakser. +Comment[de]=Ein Werkzeug zum Erstellen und Testen regulärer Ausdrücke. +Comment[el]=Εργαλείο για το σχεδιασμό και τη δοκιμή κανονικών εκφράσεων με κοινή σύνταξη κανονικών εκφράσεων. +Comment[es]=Herramienta para diseñar y probar expresiones regulares con sintaxis comunes. +Comment[et]=Vahend regulaaravaldiste loomiseks ja korrektsuse testimiseks. +Comment[eu]=Ohizko regexp sintaxiaren arabera espresio erregularra diseinatu eta egiaztatzeko tresna. +Comment[fa]=ابزاری برای طراحی و آزمودن عبارتهای منظم در برابر نحوهای مشترک عبارت منظم +Comment[fr]=Outil pour créer et tester des expressions rationnelles par rapport aux syntaxes des expressions rationnnelles communes. +Comment[gl]=Ferramenta para deseñar e probar expresións regulares con sintaxes típicas para expresións regulares +Comment[hu]=Tervezőprogram reguláris kifejezések tervezéséhez és teszteléséhez, többféle szintaxis szerint +Comment[it]=Strumento per progettare e verificare espressioni regolari con le sintassi comuni di regexp. +Comment[ja]=共通の regexp 構文に対する正規表現を設計したりテストするツール +Comment[ms]=Alatan untuk mereka dan menguji regular expressions berbanding sintaks biasa regexp. +Comment[nds]=En Warktüüch för't Opstellen un Utproberen vun reguleer Utdrück in en Reeg "regexp"-Schriefwiesen. +Comment[ne]=साझा रेगेक्प वाक्य संरचनाको बिरूद्ध नियमित अभिव्यक्ति डिजाइन र परीक्षण गर्ने उपकरण । +Comment[nl]=Gereedschap voor het ontwerpen en testen van reguliere expressies. +Comment[pl]=Narzędzie do tworzenia i testowania wyrażeń regularnych. +Comment[pt]=Uma ferramenta para desenhar e testar expressões regulares sobre várias sintaxes comuns de expressões. +Comment[pt_BR]=Ferramenta para desenvolver e testar expressões regulares com base na sintaxe comum das regexp. +Comment[ru]=Средство для определения и проверки регулярных выражений на предмет соответствия их наиболее распространённым вариантам синтаксиса. +Comment[sk]=Nástroj pre dizajn a testovanie regulárnych výrazov. +Comment[sr]=Алат за дизајн и тестирање регуларних израза насупрот уобичајеним рег.из. синтаксама. +Comment[sr@Latn]=Alat za dizajn i testiranje regularnih izraza nasuprot uobičajenim reg.iz. sintaksama. +Comment[sv]=Verktyg för att skapa och testa reguljära uttryck mot vanlig syntax för reguljära uttryck. +Comment[ta]=ரேக்ஸ்ப் தொடரமைப்பதற்கு எதிராக கருவி உபயோகித்து வரைதல் மற்றும் வாடிக்கையான தொடர்களை பரிசோதிக்க. +Comment[tg]=Восита барои муаян намудан ва тафтиш намудани баёни ботартиб дар асоси ҷорӣ шудаи вариантҳои синтаксисӣ менамояд. +Comment[tr]=Genel regexp söz dizimlerine karşı düzenli ifadeleri düzenlemeye ve test etmeye yarayan araç. +Comment[zh_CN]=依据通用正则表达式语法进行正则表达式设计和测试的工具。 +Comment[zh_TW]=設計、測試正規表示式語法的工具。 +Name=KDevRegexpTest +Name[da]=TDevelop test af regulære udtryk +Name[de]=RegExp-Überprüfung (TDevelop) +Name[hi]=के-डेव-रेगएक्सपी-टेक्स्ट +Name[nds]=RegExp-Prööv (TDevelop) +Name[pl]=KDevTestWyrReg +Name[sk]=KDev Regexp test +Name[sv]=TDevelop test av reguljära uttryck +Name[ta]=Kடேவ்ரெக்ஸ்ப் சோதனை +Name[zh_TW]=TDevelop 正規表示式測試 +GenericName=Regular Expression Tester +GenericName[ca]=Comprovador d'expressions regulars +GenericName[da]=Test af regulære udtryk +GenericName[de]=RegExp-Überprüfung +GenericName[el]=Δοκιμαστής κανονικών εκφράσεων +GenericName[es]=Comprobador de expresiones regulares +GenericName[et]=Regulaaravaldiste testija +GenericName[eu]=Espresio erregular egiaztatzailea +GenericName[fa]=آزمایندۀ عبارت منظم +GenericName[fr]=Testeur d'expressions rationnelles +GenericName[gl]=Comprobador de expresións regulares +GenericName[hi]=रेगुलर एक्सप्रेशन टेस्टर +GenericName[hu]=Tesztprogram reguláris kifejezésekhez +GenericName[it]=Verificatore per espressioni regolari +GenericName[ja]=正規表現テスタ +GenericName[ms]=Penguji Regular Expression +GenericName[nds]=RegExp-Prööv +GenericName[ne]=नियमित अभिव्यक्ति परीक्षक +GenericName[nl]=Reguliere expressie-tester +GenericName[pl]=Tester wyrażeń regularnych +GenericName[pt]=Ferramenta de Teste de Expressões Regulares +GenericName[pt_BR]=Testador de Expressão Regular +GenericName[ru]=Проверка регулярных выражений +GenericName[sk]=Tester pre regulárne výrazy +GenericName[sl]=Preverjalnik regularnih izrazov +GenericName[sr]=Тестер регуларних израза +GenericName[sr@Latn]=Tester regularnih izraza +GenericName[sv]=Test av reguljära uttryck +GenericName[ta]=வாடிக்கையான தொடர்களை பரிசோதிப்பவர். +GenericName[tg]=Тафтиши баёни ботартиб +GenericName[tr]=Düzenli İfade Test Edicisi +GenericName[zh_CN]=正则表达式测试 +GenericName[zh_TW]=正規表示式測試器 +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevregexptest +X-TDevelop-Version=5 +X-TDevelop-Scope=Global +X-TDevelop-Properties=ScriptDevelopment,CDevelopment,CPPDevelopment diff --git a/parts/regexptest/tdevregexptest.rc b/parts/regexptest/kdevregexptest.rc similarity index 100% rename from parts/regexptest/tdevregexptest.rc rename to parts/regexptest/kdevregexptest.rc diff --git a/parts/regexptest/regexptestdlg.cpp b/parts/regexptest/regexptestdlg.cpp index 200bee12..bd426411 100644 --- a/parts/regexptest/regexptestdlg.cpp +++ b/parts/regexptest/regexptestdlg.cpp @@ -32,11 +32,11 @@ #include #include -#include "tdevplugin.h" -#include "tdevpartcontroller.h" +#include "kdevplugin.h" +#include "kdevpartcontroller.h" -RegexpTestDialog::RegexpTestDialog(TDevPlugin *part) +RegexpTestDialog::RegexpTestDialog(KDevPlugin *part) : RegexpTestDialogBase(0, "regexp test dialog", false), _regexp_dialog(0) { pattern_edit->setFocus(); diff --git a/parts/regexptest/regexptestdlg.h b/parts/regexptest/regexptestdlg.h index 09e656d2..4c7094a6 100644 --- a/parts/regexptest/regexptestdlg.h +++ b/parts/regexptest/regexptestdlg.h @@ -14,7 +14,7 @@ #include "regexptestdlgbase.h" -class TDevPlugin; +class KDevPlugin; class RegexpTestDialog : public RegexpTestDialogBase @@ -23,7 +23,7 @@ class RegexpTestDialog : public RegexpTestDialogBase public: - RegexpTestDialog( TDevPlugin *part ); + RegexpTestDialog( KDevPlugin *part ); ~RegexpTestDialog(); protected: @@ -39,7 +39,7 @@ private: virtual void checkKRegExp(); virtual void insertQuoted(); - TDevPlugin *m_part; + KDevPlugin *m_part; TQDialog * _regexp_dialog; }; diff --git a/parts/regexptest/regexptestpart.cpp b/parts/regexptest/regexptestpart.cpp index 0ca0b083..6c45a492 100644 --- a/parts/regexptest/regexptestpart.cpp +++ b/parts/regexptest/regexptestpart.cpp @@ -12,23 +12,23 @@ #include "regexptestpart.h" #include -#include -#include +#include +#include #include -#include "tdevcore.h" +#include "kdevcore.h" #include "regexptestdlg.h" -static const TDevPluginInfo data("tdevregexptest"); +static const KDevPluginInfo data("kdevregexptest"); -typedef TDevGenericFactory RegexpTestFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevregexptest, RegexpTestFactory( data ) ) +typedef KDevGenericFactory RegexpTestFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevregexptest, RegexpTestFactory( data ) ) RegexpTestPart::RegexpTestPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin(&data, parent, name ? name : "RegexpTestPart") + : KDevPlugin(&data, parent, name ? name : "RegexpTestPart") { setInstance(RegexpTestFactory::instance()); - setXMLFile("tdevregexptest.rc"); + setXMLFile("kdevregexptest.rc"); TDEAction *action; diff --git a/parts/regexptest/regexptestpart.h b/parts/regexptest/regexptestpart.h index 3488e910..ec153d90 100644 --- a/parts/regexptest/regexptestpart.h +++ b/parts/regexptest/regexptestpart.h @@ -14,12 +14,12 @@ #include #include -#include "tdevplugin.h" +#include "kdevplugin.h" class RegexpTestDialog; -class RegexpTestPart : public TDevPlugin +class RegexpTestPart : public KDevPlugin { Q_OBJECT diff --git a/parts/regexptest/tdevregexptest.desktop b/parts/regexptest/tdevregexptest.desktop deleted file mode 100644 index e0978750..00000000 --- a/parts/regexptest/tdevregexptest.desktop +++ /dev/null @@ -1,82 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Tool to design and test regular expressions against common regexp syntaxes. -Comment[ca]=Eina per a dissenyar i provar expressions regulars amb sintaxis d'expressions regulars comuns. -Comment[da]=Værktøj til at designe og teste regulære udtryk imod almindelige regexp syntakser. -Comment[de]=Ein Werkzeug zum Erstellen und Testen regulärer Ausdrücke. -Comment[el]=Εργαλείο για το σχεδιασμό και τη δοκιμή κανονικών εκφράσεων με κοινή σύνταξη κανονικών εκφράσεων. -Comment[es]=Herramienta para diseñar y probar expresiones regulares con sintaxis comunes. -Comment[et]=Vahend regulaaravaldiste loomiseks ja korrektsuse testimiseks. -Comment[eu]=Ohizko regexp sintaxiaren arabera espresio erregularra diseinatu eta egiaztatzeko tresna. -Comment[fa]=ابزاری برای طراحی و آزمودن عبارتهای منظم در برابر نحوهای مشترک عبارت منظم -Comment[fr]=Outil pour créer et tester des expressions rationnelles par rapport aux syntaxes des expressions rationnnelles communes. -Comment[gl]=Ferramenta para deseñar e probar expresións regulares con sintaxes típicas para expresións regulares -Comment[hu]=Tervezőprogram reguláris kifejezések tervezéséhez és teszteléséhez, többféle szintaxis szerint -Comment[it]=Strumento per progettare e verificare espressioni regolari con le sintassi comuni di regexp. -Comment[ja]=共通の regexp 構文に対する正規表現を設計したりテストするツール -Comment[ms]=Alatan untuk mereka dan menguji regular expressions berbanding sintaks biasa regexp. -Comment[nds]=En Warktüüch för't Opstellen un Utproberen vun reguleer Utdrück in en Reeg "regexp"-Schriefwiesen. -Comment[ne]=साझा रेगेक्प वाक्य संरचनाको बिरूद्ध नियमित अभिव्यक्ति डिजाइन र परीक्षण गर्ने उपकरण । -Comment[nl]=Gereedschap voor het ontwerpen en testen van reguliere expressies. -Comment[pl]=Narzędzie do tworzenia i testowania wyrażeń regularnych. -Comment[pt]=Uma ferramenta para desenhar e testar expressões regulares sobre várias sintaxes comuns de expressões. -Comment[pt_BR]=Ferramenta para desenvolver e testar expressões regulares com base na sintaxe comum das regexp. -Comment[ru]=Средство для определения и проверки регулярных выражений на предмет соответствия их наиболее распространённым вариантам синтаксиса. -Comment[sk]=Nástroj pre dizajn a testovanie regulárnych výrazov. -Comment[sr]=Алат за дизајн и тестирање регуларних израза насупрот уобичајеним рег.из. синтаксама. -Comment[sr@Latn]=Alat za dizajn i testiranje regularnih izraza nasuprot uobičajenim reg.iz. sintaksama. -Comment[sv]=Verktyg för att skapa och testa reguljära uttryck mot vanlig syntax för reguljära uttryck. -Comment[ta]=ரேக்ஸ்ப் தொடரமைப்பதற்கு எதிராக கருவி உபயோகித்து வரைதல் மற்றும் வாடிக்கையான தொடர்களை பரிசோதிக்க. -Comment[tg]=Восита барои муаян намудан ва тафтиш намудани баёни ботартиб дар асоси ҷорӣ шудаи вариантҳои синтаксисӣ менамояд. -Comment[tr]=Genel regexp söz dizimlerine karşı düzenli ifadeleri düzenlemeye ve test etmeye yarayan araç. -Comment[zh_CN]=依据通用正则表达式语法进行正则表达式设计和测试的工具。 -Comment[zh_TW]=設計、測試正規表示式語法的工具。 -Name=KDevRegexpTest -Name[da]=TDevelop test af regulære udtryk -Name[de]=RegExp-Überprüfung (TDevelop) -Name[hi]=के-डेव-रेगएक्सपी-टेक्स्ट -Name[nds]=RegExp-Prööv (TDevelop) -Name[pl]=KDevTestWyrReg -Name[sk]=KDev Regexp test -Name[sv]=TDevelop test av reguljära uttryck -Name[ta]=Kடேவ்ரெக்ஸ்ப் சோதனை -Name[zh_TW]=TDevelop 正規表示式測試 -GenericName=Regular Expression Tester -GenericName[ca]=Comprovador d'expressions regulars -GenericName[da]=Test af regulære udtryk -GenericName[de]=RegExp-Überprüfung -GenericName[el]=Δοκιμαστής κανονικών εκφράσεων -GenericName[es]=Comprobador de expresiones regulares -GenericName[et]=Regulaaravaldiste testija -GenericName[eu]=Espresio erregular egiaztatzailea -GenericName[fa]=آزمایندۀ عبارت منظم -GenericName[fr]=Testeur d'expressions rationnelles -GenericName[gl]=Comprobador de expresións regulares -GenericName[hi]=रेगुलर एक्सप्रेशन टेस्टर -GenericName[hu]=Tesztprogram reguláris kifejezésekhez -GenericName[it]=Verificatore per espressioni regolari -GenericName[ja]=正規表現テスタ -GenericName[ms]=Penguji Regular Expression -GenericName[nds]=RegExp-Prööv -GenericName[ne]=नियमित अभिव्यक्ति परीक्षक -GenericName[nl]=Reguliere expressie-tester -GenericName[pl]=Tester wyrażeń regularnych -GenericName[pt]=Ferramenta de Teste de Expressões Regulares -GenericName[pt_BR]=Testador de Expressão Regular -GenericName[ru]=Проверка регулярных выражений -GenericName[sk]=Tester pre regulárne výrazy -GenericName[sl]=Preverjalnik regularnih izrazov -GenericName[sr]=Тестер регуларних израза -GenericName[sr@Latn]=Tester regularnih izraza -GenericName[sv]=Test av reguljära uttryck -GenericName[ta]=வாடிக்கையான தொடர்களை பரிசோதிப்பவர். -GenericName[tg]=Тафтиши баёни ботартиб -GenericName[tr]=Düzenli İfade Test Edicisi -GenericName[zh_CN]=正则表达式测试 -GenericName[zh_TW]=正規表示式測試器 -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevregexptest -X-TDevelop-Version=5 -X-TDevelop-Scope=Global -X-TDevelop-Properties=ScriptDevelopment,CDevelopment,CPPDevelopment diff --git a/parts/replace/CMakeLists.txt b/parts/replace/CMakeLists.txt index b32da714..4779e553 100644 --- a/parts/replace/CMakeLists.txt +++ b/parts/replace/CMakeLists.txt @@ -26,13 +26,13 @@ link_directories( ##### other data ################################ -install( FILES tdevreplace.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevpart_replace.rc DESTINATION ${DATA_INSTALL_DIR}/tdevreplace ) +install( FILES kdevreplace.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevpart_replace.rc DESTINATION ${DATA_INSTALL_DIR}/kdevreplace ) -##### libtdevreplace (module) ################### +##### libkdevreplace (module) ################### -tde_add_kpart( libtdevreplace AUTOMOC +tde_add_kpart( libkdevreplace AUTOMOC SOURCES replace_part.cpp replace_widget.cpp replacedlg.ui replaceitem.cpp replaceview.cpp replacedlgimpl.cpp diff --git a/parts/replace/Makefile.am b/parts/replace/Makefile.am index 36d8e64f..8d75f0e8 100644 --- a/parts/replace/Makefile.am +++ b/parts/replace/Makefile.am @@ -2,15 +2,15 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevreplace.la -libtdevreplace_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevreplace_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevreplace_la_SOURCES = replace_part.cpp replace_widget.cpp replacedlg.ui replaceitem.cpp replaceview.cpp replacedlgimpl.cpp +kde_module_LTLIBRARIES = libkdevreplace.la +libkdevreplace_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevreplace_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +libkdevreplace_la_SOURCES = replace_part.cpp replace_widget.cpp replacedlg.ui replaceitem.cpp replaceview.cpp replacedlgimpl.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevreplace.desktop +service_DATA = kdevreplace.desktop -rcdir = $(kde_datadir)/tdevreplace -rc_DATA = tdevpart_replace.rc +rcdir = $(kde_datadir)/kdevreplace +rc_DATA = kdevpart_replace.rc diff --git a/parts/replace/tdevpart_replace.rc b/parts/replace/kdevpart_replace.rc similarity index 100% rename from parts/replace/tdevpart_replace.rc rename to parts/replace/kdevpart_replace.rc diff --git a/parts/replace/kdevreplace.desktop b/parts/replace/kdevreplace.desktop new file mode 100644 index 00000000..d2490c05 --- /dev/null +++ b/parts/replace/kdevreplace.desktop @@ -0,0 +1,80 @@ +[Desktop Entry] +Type=Service +Exec= +Comment=This plugin is an interactive projectwide "Search and Replace" tool. Search using string or regexp matching, and select the replacements to be made from a preview before the action is finalized. When loaded it appears in the Edit menu. +Comment[ca]=Aquest connector és una eina interactiva de "Recerca i substitució" a tot el projecte. Pot cercar mitjançant patrons o expressions regulars, i seleccionar les substitucions en una vista prèvia, abans de que finalitzi l'acció. Quan està carregat apareix en el menú Edita. +Comment[da]=Dette plugin er et interaktivt projektomfattende "Søg og erstat" værktøj. Søg ved brug af streng eller regexp tilpasning, og vælg erstatninger lavet fra en forhåndsvisning før handlingen blive helt udført. Når det er indlæst er det i redigeringsmenuen. +Comment[de]=Diese Komponente ist ein interaktives Werkzeug zum projektweiten "Suchen und Ersetzen" von Begriffen oder regulären Ausdrücken. Die zu ersetzenden Zeichenketten können in einer Vorschau ausgewählt werden. Erscheint im Menü "Bearbeiten", wenn es geladen ist. +Comment[el]=Αυτό το πρόσθετο είναι ένα εργαλείο αλληλεπίδρασης "Αναζήτησης και αντικατάστασης" για όλο το έργο. Αναζητά χρησιμοποιώντας συμβολοσειρές ή κανονικές εκφράσεις, και επιλέγει τις αντικαταστάσεις από μια προεπισκόπηση πριν να εκτελεστεί η ενέργεια. Όταν φορτωθεί είναι διαθέσιμο από το μενού επεξεργασίας. +Comment[en_GB]=This plugin is an interactive projectwide "Search and Replace" tool. Search using string or regexp matching, and select the replacements to be made from a preview before the action is finalised. When loaded it appears in the Edit menu. +Comment[es]=Este complemento es una herramienta interactiva de «Búsqueda y sustitución» para todo el proyecto. Puede buscar mediante patrones o expresiones regulares, y seleccionar las sustituciones en una previsualización, antes de que finalice la acción. Cuando está cargado aparece en el menú Editar. +Comment[et]=See plugin on kogu projekti hõlmav interaktiivne "otsi ja asenda" vahend. Otsida saab stringe või regulaaravaldiste sobivusi, asendusi saab valida eelvaatluse abil, enne kui need päriselt teoks teha. Kasutamisel kättesaadav redigeerimismenüüst. +Comment[eu]=Plugin hau proiektu mailako "Bilatu eta ordeztu" tresna interaktiboa da. Bila ezazu kate edo regexp bat-egitea erabiliz, eta hautatu egin beharreko ordezkapenak aurrebista batetik ekintza amaitu aurretik. Kargatzean Editatu menuan agertzen da. +Comment[fa]=این وصله یک ابزار گسترۀ پروژۀ تعاملی »جستجو و جایگزینی« می‌باشد. با استفاده از تطبیق رشته یا عبارت منظم جستجو می‌کند، و جایگزینهایی را گزینش می‌کند تا قبل از اتمام کنش، از یک پیش‌نمایش ایجاد شود. در هنگام بارگذاری در گزینگان ویرایش ظاهر می‌شود. +Comment[fr]=Ce module externe est un outil de « Recherche et remplacement » à l'échelle du projet. Faites une recherche à l'aide de la correspondance de chaînes ou d'expressions rationnelles, et sélectionnez les remplacements à effectuer à partir d'un aperçu avant que l'action ne soit finalisée. Lorsqu'il est chargé, ce module externe apparaît dans le menu « Édition ». +Comment[gl]=Esta extensión é unha ferramenta interactiva "Procurar e reemprazar" dispoñíbel en todo o proxecto. Busca usando coincidencias con strings ou expresións regulares, e selecciona os reemprazamentos a facer nunha previsualización antes de que as accións finalicen. Cando se carga aparece no menú Editar. +Comment[hu]=Ezzel a bővítőmodullal az egész projektre kiterjedő keresést és cserét lehet végezni. Lehet sztringre és reg. kifejezésre keresni, az elvégzendő műveleteket egy előnézeti ablakban lehet kiválasztani. A modul betöltés után a Szerkesztés menübe kerül. +Comment[it]=Questo plugin è uno strumento interattivo per "Cerca e sostituisci" sui progetti. Cerca tramite stringhe e confronto regexp e seleziona le sostituzioni da compiere da un'anteprima prima che le azioni siano finalizzate. Quando caricato apparirà nel menu Modifica. +Comment[ja]=このプラグインは、プロジェクト規模で検索や置換を行う対話型のツールです。検索は文字列や正規表現の合致を使い、アクションが終了する前にプレビューで作られている置換を選択します。読み込まれると編集メニューに表示されます。 +Comment[ms]=Plugin ini adalah alatan "Cari dan Ganti" serata projek interaktif. Cari menggunakan padanan rentetan atau regexp, dan pilih gantian yang akan dibuat daripada pralihat sebelum tindakan diselesaikan. Apabila dimuatkan ia kelihatan didalam menu Sunting. +Comment[nds]=Dit Moduul is en interaktiv projektwiet "Söken un Utwesseln"-Warktüüch. Du kannst na Tekenkeden oder mit reguleer Utdrück söken un de Ännern in en Vöransicht utsöken, ehr de Akschoon utföhrt warrt. Dukt in't Menü "Bewerken" op, wenn laadt. +Comment[ne]=यो प्लगइन अन्तरक्रियात्मक परियोजनामा "खोजी गरेर प्रतिस्थापन गर्नुहोस्" उपकरण हो । स्ट्रिङ वा regexp मिल्दो प्रयोग गरेर खोजी गर्नुहोस् र कार्य समाप्त गर्नु पूर्व पूर्वावलोकनबाट प्रतिस्थापन गर्नेलाई चयन गर्नुहोस् । लोड भएपछि सम्पादन मेनुमा देखा पर्दछ । +Comment[nl]=Deze plugin biedt een interactieve, projectbrede "zoek en vervang"-tool. U kunt zoeken naar tekens of reguliere expressies en de vervanging kan in een dialoog worden bekeken voordat deze wordt uitgevoerd. Verschijnt in het menu Bewerken. +Comment[pl]=Wtyczka działającego w całym projekcie narzędzia "Znajdź i zamień". Wyszukiwanie odbywa się za pomocą porównywania ciągów lub wyrażen regularnych, a wybór zamienników może być dokonywany przy włączonym podglądzie. Po wczytaniu pojawia się w menu Edycja. +Comment[pt]=Este 'plugin' é uma ferramenta interactiva ao nível do projecto de "Procurar e Substituir". Pode procurar por texto ou por uma expressão regular e seleccionar as substituições a serem feitas, a partir de uma antevisão, antes de a acção terminar. Quando é carregado, aparece no menu Editar. +Comment[pt_BR]=Este plug-in é uma ferramenta interativa de "Procurar e Substituir" por todo o projeto. Procura usando um string ou regexp correspondente, e seleciona as substituições a serem feitas de uma previsão antes da ação ser finalizada. Quando carregado ele aparece no menu Editar. +Comment[ru]=Этот модуль предоставляет интерактивные возможности поиска и замены по файлам в проекте. Сначала проводится поиск по строке или регулярному выражению, далее выбор с предпросмотром и применение замен из списка доступных вариантов. +Comment[sk]=Modul poskytuje interaktívny nástroj pre "Nájsť a Zameniť" v celom projekte.Vyhľadávanie pomocou regexp výrazov a výber nového reťazca z náhľadu pred samotnou zámenou. Po načítaní sa objaví v menu Edit. +Comment[sr]=Овај прикључак је интерактивни „пронађи и замени“ алат широм пројекта. Тражите користећи знаковни низ или рег.из. поклапање, и из прегледа одаберите измене које ће бити извршене пре него што се акција заврши. Када је учитан појављује се у менију „Измени“. +Comment[sr@Latn]=Ovaj priključak je interaktivni „pronađi i zameni“ alat širom projekta. Tražite koristeći znakovni niz ili reg.iz. poklapanje, i iz pregleda odaberite izmene koje će biti izvršene pre nego što se akcija završi. Kada je učitan pojavljuje se u meniju „Izmeni“. +Comment[sv]=Insticksprogrammet är ett interaktivt verktyg för att "söka och ersätta" i hela projektet. Sök med en sträng eller reguljärt uttryck, och välj ersättningen som ska göras från en förhandsgranskning innan åtgärden slutförs. När det laddats visas det i redigeringsmenyn. +Comment[ta]=இந்த சொருகி "Search and Replace" ஒரு சிறந்த திட்ட பணி கருவி. சரத்தை உபயோகித்து தேடுதல் அல்லது ரெக்ஸ்ப் பொருத்துதல், மற்றும் செயல்கள் தீர்மானிப்பதற்கு முன் முன்தோற்றத்தைப் பார்த்து மாற்ற வேண்டியதை தேர்வு செய். +Comment[tg]=Ин модул барои ковтукови интерактивӣ ва ҷой иваз намудан дар лоиҳаро имкон медиҳад.Аввал ковтуков дар сатр оғоз меёбад ва ё дар баёноти ботартиб, баъд аз он интихоби пеш аз намоиш ва истифода барии ҷой ивазкунӣ аз рӯйхати вариантҳои имконпазир гузаронида мешавад. +Comment[tr]=Bu eklenti projenin tamamında "Ara ve Değiştir" aracıdır. Dizgi veya regexp eşleşmesi ara ve işlem sona ermeden bir önizlemeden yapılacak değişiklikleri seç. Yüklendiğinde Düzenle menüsünde durur. +Comment[zh_CN]=这个插件是面向真个工程的“查找和替换”工具。 使用字符串或正则表达式匹配,并在操作完成前提供选择替换预览。启动后显示在编辑菜单中。 +Comment[zh_TW]=這個外掛程式是一個專案的「搜尋與取代」互動工具。使用字串或正規表示式來搜尋,並選擇是否要取代。載入後可以在「編輯」選單中找到。 +Name=KDevReplace +Name[da]=TDevelop Erstat +Name[nds]=TDevelop-Utwesseln +Name[sk]=KDev zameniť +Name[sv]=TDevelop ersätt +Name[zh_TW]=TDevelop 取代 +GenericName=Replace Part +GenericName[ca]=Part per a la substitució +GenericName[da]=Erstatningspart +GenericName[de]=Ersetzen-Komponente +GenericName[el]=Τμήμα αντικατάστασης +GenericName[es]=Servicio de sustitución +GenericName[et]=Asendamise komponent +GenericName[eu]=Ordeztu partea +GenericName[fa]=جزء جایگزینی +GenericName[fr]=Outil de remplacement +GenericName[gl]='Part' reemprazar +GenericName[hi]=रीप्लेस पार्ट +GenericName[hu]=Cserélés +GenericName[it]=Componente per sostituire +GenericName[ja]=置換 +GenericName[ms]=Ganti Bahagian +GenericName[nds]=Utwessel-Komponent +GenericName[ne]=प्रतिस्थापन भाग +GenericName[nl]=Zoeken en vervangen +GenericName[pl]=Program do zastępowania +GenericName[pt]=Parte de Substituição +GenericName[pt_BR]=Parte Substituir +GenericName[ru]=Замена по проекту +GenericName[sk]=Part zameniť +GenericName[sl]=Del za zamenjave +GenericName[sr]=Део за замену +GenericName[sr@Latn]=Deo za zamenu +GenericName[sv]=Ersättning +GenericName[ta]=மாற்றுப் பகுதி +GenericName[tg]=Ҷой иваз намудан бо лоиҳа +GenericName[tr]=Değiştirme Bileşeni +GenericName[zh_CN]=替换模块 +GenericName[zh_TW]=取代元件 +Icon=tdevelop +ServiceTypes=TDevelop/Plugin +X-TDevelop-Scope=Global +X-TDE-Library=libkdevreplace +X-TDevelop-Version=5 +X-TDevelop-Properties=FileReplace diff --git a/parts/replace/replace_part.cpp b/parts/replace/replace_part.cpp index 40bfb1ea..447548ef 100644 --- a/parts/replace/replace_part.cpp +++ b/parts/replace/replace_part.cpp @@ -15,25 +15,25 @@ #include #include #include -#include -#include +#include +#include #include #include -#include -#include +#include +#include #include "replace_widget.h" -static const TDevPluginInfo data("tdevreplace"); +static const KDevPluginInfo data("kdevreplace"); -typedef TDevGenericFactory ReplaceFactory; -K_EXPORT_COMPONENT_FACTORY(libtdevreplace, ReplaceFactory(data)) +typedef KDevGenericFactory ReplaceFactory; +K_EXPORT_COMPONENT_FACTORY(libkdevreplace, ReplaceFactory(data)) ReplacePart::ReplacePart(TQObject *parent, const char *name, const TQStringList& ) - : TDevPlugin( &data, parent, name ? name : "ReplacePart" ) + : KDevPlugin( &data, parent, name ? name : "ReplacePart" ) { setInstance(ReplaceFactory::instance()); - setXMLFile("tdevpart_replace.rc"); + setXMLFile("kdevpart_replace.rc"); m_widget = new ReplaceWidget(this); m_widget->setIcon( SmallIcon("filefind") ); diff --git a/parts/replace/replace_part.h b/parts/replace/replace_part.h index f0316eb0..fbd0f2f7 100644 --- a/parts/replace/replace_part.h +++ b/parts/replace/replace_part.h @@ -9,12 +9,12 @@ * * ***************************************************************************/ -#ifndef __TDEVPART_REPLACE_H__ -#define __TDEVPART_REPLACE_H__ +#ifndef __KDEVPART_REPLACE_H__ +#define __KDEVPART_REPLACE_H__ #include -#include +#include #include @@ -22,7 +22,7 @@ class ReplaceWidget; class TDEAction; class Context; -class ReplacePart : public TDevPlugin +class ReplacePart : public KDevPlugin { Q_OBJECT diff --git a/parts/replace/replace_widget.cpp b/parts/replace/replace_widget.cpp index 34dd3afd..6b1bcbda 100644 --- a/parts/replace/replace_widget.cpp +++ b/parts/replace/replace_widget.cpp @@ -26,11 +26,11 @@ #include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include @@ -87,7 +87,7 @@ ReplaceWidget::ReplaceWidget(ReplacePart *part) connect( _cancel, TQT_SIGNAL( clicked() ), TQT_SLOT( clear() ) ); connect( _listview, TQT_SIGNAL( editDocument( const TQString &, int ) ), TQT_SLOT( editDocument( const TQString &, int ) ) ); - connect( m_part->core(), TQT_SIGNAL( stopButtonClicked( TDevPlugin * ) ), TQT_SLOT( stopButtonClicked( TDevPlugin * ) ) ); + connect( m_part->core(), TQT_SIGNAL( stopButtonClicked( KDevPlugin * ) ), TQT_SLOT( stopButtonClicked( KDevPlugin * ) ) ); } //BEGIN Slots @@ -184,7 +184,7 @@ void ReplaceWidget::editDocument( TQString const & file, int line ) m_part->partController()->editDocument( KURL( file ), line ); } -void ReplaceWidget::stopButtonClicked( TDevPlugin * which ) +void ReplaceWidget::stopButtonClicked( KDevPlugin * which ) { if ( which != 0 && which != m_part ) return; diff --git a/parts/replace/replace_widget.h b/parts/replace/replace_widget.h index 64ca50e2..c9063928 100644 --- a/parts/replace/replace_widget.h +++ b/parts/replace/replace_widget.h @@ -36,7 +36,7 @@ public: public slots: void showDialog(); - void stopButtonClicked( TDevPlugin * ); + void stopButtonClicked( KDevPlugin * ); protected: virtual void focusInEvent(TQFocusEvent *e); diff --git a/parts/replace/tdevreplace.desktop b/parts/replace/tdevreplace.desktop deleted file mode 100644 index cd05c65c..00000000 --- a/parts/replace/tdevreplace.desktop +++ /dev/null @@ -1,80 +0,0 @@ -[Desktop Entry] -Type=Service -Exec= -Comment=This plugin is an interactive projectwide "Search and Replace" tool. Search using string or regexp matching, and select the replacements to be made from a preview before the action is finalized. When loaded it appears in the Edit menu. -Comment[ca]=Aquest connector és una eina interactiva de "Recerca i substitució" a tot el projecte. Pot cercar mitjançant patrons o expressions regulars, i seleccionar les substitucions en una vista prèvia, abans de que finalitzi l'acció. Quan està carregat apareix en el menú Edita. -Comment[da]=Dette plugin er et interaktivt projektomfattende "Søg og erstat" værktøj. Søg ved brug af streng eller regexp tilpasning, og vælg erstatninger lavet fra en forhåndsvisning før handlingen blive helt udført. Når det er indlæst er det i redigeringsmenuen. -Comment[de]=Diese Komponente ist ein interaktives Werkzeug zum projektweiten "Suchen und Ersetzen" von Begriffen oder regulären Ausdrücken. Die zu ersetzenden Zeichenketten können in einer Vorschau ausgewählt werden. Erscheint im Menü "Bearbeiten", wenn es geladen ist. -Comment[el]=Αυτό το πρόσθετο είναι ένα εργαλείο αλληλεπίδρασης "Αναζήτησης και αντικατάστασης" για όλο το έργο. Αναζητά χρησιμοποιώντας συμβολοσειρές ή κανονικές εκφράσεις, και επιλέγει τις αντικαταστάσεις από μια προεπισκόπηση πριν να εκτελεστεί η ενέργεια. Όταν φορτωθεί είναι διαθέσιμο από το μενού επεξεργασίας. -Comment[en_GB]=This plugin is an interactive projectwide "Search and Replace" tool. Search using string or regexp matching, and select the replacements to be made from a preview before the action is finalised. When loaded it appears in the Edit menu. -Comment[es]=Este complemento es una herramienta interactiva de «Búsqueda y sustitución» para todo el proyecto. Puede buscar mediante patrones o expresiones regulares, y seleccionar las sustituciones en una previsualización, antes de que finalice la acción. Cuando está cargado aparece en el menú Editar. -Comment[et]=See plugin on kogu projekti hõlmav interaktiivne "otsi ja asenda" vahend. Otsida saab stringe või regulaaravaldiste sobivusi, asendusi saab valida eelvaatluse abil, enne kui need päriselt teoks teha. Kasutamisel kättesaadav redigeerimismenüüst. -Comment[eu]=Plugin hau proiektu mailako "Bilatu eta ordeztu" tresna interaktiboa da. Bila ezazu kate edo regexp bat-egitea erabiliz, eta hautatu egin beharreko ordezkapenak aurrebista batetik ekintza amaitu aurretik. Kargatzean Editatu menuan agertzen da. -Comment[fa]=این وصله یک ابزار گسترۀ پروژۀ تعاملی »جستجو و جایگزینی« می‌باشد. با استفاده از تطبیق رشته یا عبارت منظم جستجو می‌کند، و جایگزینهایی را گزینش می‌کند تا قبل از اتمام کنش، از یک پیش‌نمایش ایجاد شود. در هنگام بارگذاری در گزینگان ویرایش ظاهر می‌شود. -Comment[fr]=Ce module externe est un outil de « Recherche et remplacement » à l'échelle du projet. Faites une recherche à l'aide de la correspondance de chaînes ou d'expressions rationnelles, et sélectionnez les remplacements à effectuer à partir d'un aperçu avant que l'action ne soit finalisée. Lorsqu'il est chargé, ce module externe apparaît dans le menu « Édition ». -Comment[gl]=Esta extensión é unha ferramenta interactiva "Procurar e reemprazar" dispoñíbel en todo o proxecto. Busca usando coincidencias con strings ou expresións regulares, e selecciona os reemprazamentos a facer nunha previsualización antes de que as accións finalicen. Cando se carga aparece no menú Editar. -Comment[hu]=Ezzel a bővítőmodullal az egész projektre kiterjedő keresést és cserét lehet végezni. Lehet sztringre és reg. kifejezésre keresni, az elvégzendő műveleteket egy előnézeti ablakban lehet kiválasztani. A modul betöltés után a Szerkesztés menübe kerül. -Comment[it]=Questo plugin è uno strumento interattivo per "Cerca e sostituisci" sui progetti. Cerca tramite stringhe e confronto regexp e seleziona le sostituzioni da compiere da un'anteprima prima che le azioni siano finalizzate. Quando caricato apparirà nel menu Modifica. -Comment[ja]=このプラグインは、プロジェクト規模で検索や置換を行う対話型のツールです。検索は文字列や正規表現の合致を使い、アクションが終了する前にプレビューで作られている置換を選択します。読み込まれると編集メニューに表示されます。 -Comment[ms]=Plugin ini adalah alatan "Cari dan Ganti" serata projek interaktif. Cari menggunakan padanan rentetan atau regexp, dan pilih gantian yang akan dibuat daripada pralihat sebelum tindakan diselesaikan. Apabila dimuatkan ia kelihatan didalam menu Sunting. -Comment[nds]=Dit Moduul is en interaktiv projektwiet "Söken un Utwesseln"-Warktüüch. Du kannst na Tekenkeden oder mit reguleer Utdrück söken un de Ännern in en Vöransicht utsöken, ehr de Akschoon utföhrt warrt. Dukt in't Menü "Bewerken" op, wenn laadt. -Comment[ne]=यो प्लगइन अन्तरक्रियात्मक परियोजनामा "खोजी गरेर प्रतिस्थापन गर्नुहोस्" उपकरण हो । स्ट्रिङ वा regexp मिल्दो प्रयोग गरेर खोजी गर्नुहोस् र कार्य समाप्त गर्नु पूर्व पूर्वावलोकनबाट प्रतिस्थापन गर्नेलाई चयन गर्नुहोस् । लोड भएपछि सम्पादन मेनुमा देखा पर्दछ । -Comment[nl]=Deze plugin biedt een interactieve, projectbrede "zoek en vervang"-tool. U kunt zoeken naar tekens of reguliere expressies en de vervanging kan in een dialoog worden bekeken voordat deze wordt uitgevoerd. Verschijnt in het menu Bewerken. -Comment[pl]=Wtyczka działającego w całym projekcie narzędzia "Znajdź i zamień". Wyszukiwanie odbywa się za pomocą porównywania ciągów lub wyrażen regularnych, a wybór zamienników może być dokonywany przy włączonym podglądzie. Po wczytaniu pojawia się w menu Edycja. -Comment[pt]=Este 'plugin' é uma ferramenta interactiva ao nível do projecto de "Procurar e Substituir". Pode procurar por texto ou por uma expressão regular e seleccionar as substituições a serem feitas, a partir de uma antevisão, antes de a acção terminar. Quando é carregado, aparece no menu Editar. -Comment[pt_BR]=Este plug-in é uma ferramenta interativa de "Procurar e Substituir" por todo o projeto. Procura usando um string ou regexp correspondente, e seleciona as substituições a serem feitas de uma previsão antes da ação ser finalizada. Quando carregado ele aparece no menu Editar. -Comment[ru]=Этот модуль предоставляет интерактивные возможности поиска и замены по файлам в проекте. Сначала проводится поиск по строке или регулярному выражению, далее выбор с предпросмотром и применение замен из списка доступных вариантов. -Comment[sk]=Modul poskytuje interaktívny nástroj pre "Nájsť a Zameniť" v celom projekte.Vyhľadávanie pomocou regexp výrazov a výber nového reťazca z náhľadu pred samotnou zámenou. Po načítaní sa objaví v menu Edit. -Comment[sr]=Овај прикључак је интерактивни „пронађи и замени“ алат широм пројекта. Тражите користећи знаковни низ или рег.из. поклапање, и из прегледа одаберите измене које ће бити извршене пре него што се акција заврши. Када је учитан појављује се у менију „Измени“. -Comment[sr@Latn]=Ovaj priključak je interaktivni „pronađi i zameni“ alat širom projekta. Tražite koristeći znakovni niz ili reg.iz. poklapanje, i iz pregleda odaberite izmene koje će biti izvršene pre nego što se akcija završi. Kada je učitan pojavljuje se u meniju „Izmeni“. -Comment[sv]=Insticksprogrammet är ett interaktivt verktyg för att "söka och ersätta" i hela projektet. Sök med en sträng eller reguljärt uttryck, och välj ersättningen som ska göras från en förhandsgranskning innan åtgärden slutförs. När det laddats visas det i redigeringsmenyn. -Comment[ta]=இந்த சொருகி "Search and Replace" ஒரு சிறந்த திட்ட பணி கருவி. சரத்தை உபயோகித்து தேடுதல் அல்லது ரெக்ஸ்ப் பொருத்துதல், மற்றும் செயல்கள் தீர்மானிப்பதற்கு முன் முன்தோற்றத்தைப் பார்த்து மாற்ற வேண்டியதை தேர்வு செய். -Comment[tg]=Ин модул барои ковтукови интерактивӣ ва ҷой иваз намудан дар лоиҳаро имкон медиҳад.Аввал ковтуков дар сатр оғоз меёбад ва ё дар баёноти ботартиб, баъд аз он интихоби пеш аз намоиш ва истифода барии ҷой ивазкунӣ аз рӯйхати вариантҳои имконпазир гузаронида мешавад. -Comment[tr]=Bu eklenti projenin tamamında "Ara ve Değiştir" aracıdır. Dizgi veya regexp eşleşmesi ara ve işlem sona ermeden bir önizlemeden yapılacak değişiklikleri seç. Yüklendiğinde Düzenle menüsünde durur. -Comment[zh_CN]=这个插件是面向真个工程的“查找和替换”工具。 使用字符串或正则表达式匹配,并在操作完成前提供选择替换预览。启动后显示在编辑菜单中。 -Comment[zh_TW]=這個外掛程式是一個專案的「搜尋與取代」互動工具。使用字串或正規表示式來搜尋,並選擇是否要取代。載入後可以在「編輯」選單中找到。 -Name=KDevReplace -Name[da]=TDevelop Erstat -Name[nds]=TDevelop-Utwesseln -Name[sk]=KDev zameniť -Name[sv]=TDevelop ersätt -Name[zh_TW]=TDevelop 取代 -GenericName=Replace Part -GenericName[ca]=Part per a la substitució -GenericName[da]=Erstatningspart -GenericName[de]=Ersetzen-Komponente -GenericName[el]=Τμήμα αντικατάστασης -GenericName[es]=Servicio de sustitución -GenericName[et]=Asendamise komponent -GenericName[eu]=Ordeztu partea -GenericName[fa]=جزء جایگزینی -GenericName[fr]=Outil de remplacement -GenericName[gl]='Part' reemprazar -GenericName[hi]=रीप्लेस पार्ट -GenericName[hu]=Cserélés -GenericName[it]=Componente per sostituire -GenericName[ja]=置換 -GenericName[ms]=Ganti Bahagian -GenericName[nds]=Utwessel-Komponent -GenericName[ne]=प्रतिस्थापन भाग -GenericName[nl]=Zoeken en vervangen -GenericName[pl]=Program do zastępowania -GenericName[pt]=Parte de Substituição -GenericName[pt_BR]=Parte Substituir -GenericName[ru]=Замена по проекту -GenericName[sk]=Part zameniť -GenericName[sl]=Del za zamenjave -GenericName[sr]=Део за замену -GenericName[sr@Latn]=Deo za zamenu -GenericName[sv]=Ersättning -GenericName[ta]=மாற்றுப் பகுதி -GenericName[tg]=Ҷой иваз намудан бо лоиҳа -GenericName[tr]=Değiştirme Bileşeni -GenericName[zh_CN]=替换模块 -GenericName[zh_TW]=取代元件 -Icon=tdevelop -ServiceTypes=TDevelop/Plugin -X-TDevelop-Scope=Global -X-TDE-Library=libtdevreplace -X-TDevelop-Version=5 -X-TDevelop-Properties=FileReplace diff --git a/parts/scripting/CMakeLists.txt b/parts/scripting/CMakeLists.txt index 371cf8f6..f906bd02 100644 --- a/parts/scripting/CMakeLists.txt +++ b/parts/scripting/CMakeLists.txt @@ -26,13 +26,13 @@ link_directories( ##### other data ################################ -install( FILES tdevscripting.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevscripting.rc DESTINATION ${DATA_INSTALL_DIR}/tdevscripting ) +install( FILES kdevscripting.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevscripting.rc DESTINATION ${DATA_INSTALL_DIR}/kdevscripting ) -##### libtdevscripting (module) ################# +##### libkdevscripting (module) ################# -tde_add_kpart( libtdevscripting AUTOMOC +tde_add_kpart( libkdevscripting AUTOMOC SOURCES scriptingpart.cpp scriptingglobalconfigbase.ui scriptingglobalconfig.cpp diff --git a/parts/scripting/Makefile.am b/parts/scripting/Makefile.am index 9de6d889..7262dac9 100644 --- a/parts/scripting/Makefile.am +++ b/parts/scripting/Makefile.am @@ -1,20 +1,20 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevscripting.la -libtdevscripting_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevscripting_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevscripting.la +libkdevscripting_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevscripting_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevscripting_la_SOURCES = scriptingpart.cpp scriptingglobalconfigbase.ui \ +libkdevscripting_la_SOURCES = scriptingpart.cpp scriptingglobalconfigbase.ui \ scriptingglobalconfig.cpp METASOURCES = AUTO -appsharedir = $(kde_datadir)/tdevscripting +appsharedir = $(kde_datadir)/kdevscripting appshare_DATA = servicedir = $(kde_servicesdir) -service_DATA = tdevscripting.desktop +service_DATA = kdevscripting.desktop -rcdir = $(kde_datadir)/tdevscripting -rc_DATA = tdevscripting.rc +rcdir = $(kde_datadir)/kdevscripting +rc_DATA = kdevscripting.rc noinst_HEADERS = scriptingglobalconfig.h scriptingpart.h diff --git a/parts/scripting/kdevscripting.desktop b/parts/scripting/kdevscripting.desktop new file mode 100644 index 00000000..22ef15e8 --- /dev/null +++ b/parts/scripting/kdevscripting.desktop @@ -0,0 +1,77 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Name=KDevscripting +Name[da]=TDevelop scriptning +Name[nds]=TDevelop-Skriptschrieven +Name[sk]=KDev skriptovanie +Name[sv]=TDevelop-skriptanvändning +Name[zh_TW]=TDevelop 文稿 +GenericName=Scripting +GenericName[ca]=Scripts +GenericName[da]=Scriptning +GenericName[de]=Skriptunterstützung +GenericName[el]=Γραφή σεναρίων +GenericName[es]=Guiones +GenericName[et]=Skriptikeele plugin +GenericName[eu]=Script-a +GenericName[fa]=دست‌نوشته +GenericName[fr]=Scriptage +GenericName[ga]=Scriptiú +GenericName[hu]=Szkriptszerkesztő +GenericName[it]=Script +GenericName[nds]=Skriptünnerstütten +GenericName[ne]=स्क्रिप्टिङ +GenericName[pl]=Skrypty +GenericName[pt]='Scripting' +GenericName[ru]=Сценарии +GenericName[sk]=Skriptovanie +GenericName[sl]=Skriptiranje +GenericName[sr]=Скриптовање +GenericName[sr@Latn]=Skriptovanje +GenericName[sv]=Skriptanvändning +GenericName[tr]=Betik Yazma +GenericName[zh_CN]=脚本 +GenericName[zh_TW]=文稿 +Comment=The Scripting plugin offers KScript based scripting of the TDevelop application +Comment[ca]=El connector per als scripts ofereix scripts basats en KScript de l'aplicació TDevelop +Comment[da]=Scriptning-plugin stiller KScript-baseret scriptning til rådighed for TDevelop +Comment[de]=Das "Skript"-Modul bietet KScript-basierte Automatisierung für TDevelop +Comment[el]=Το πρόσθετο γραφής σεναρίων προσφέρει σενάρια της μορφής KScript της εφαρμογής TDevelop +Comment[es]=El complemento de guiones ofrece guiones basados en KScript de la aplicación TDevelop +Comment[et]=Skriptikeele plugin võimaldab TDevelopis kasutada skriptikeelt KScripti alusel +Comment[eu]=Script-a pluginak KScript-en oinarritutako TDevelop aplikazioaren script zerbitzuak eskeintzen ditu +Comment[fa]=وصلۀ دست‌نوشته، دست‌نوشتۀ کاربرد TDevelop بر مبنای KScript را ارائه می‌دهد. +Comment[fr]=Le module externe Scriptage fournit le scriptage basé sur KScript de l'application TDevelop +Comment[gl]=A extensión Scripting ofrece scripting baseado en KScript para a aplicación de TDevelop +Comment[hu]=A Szkriptszerkesztő KScript-alapú szkriptkészítést tesz lehetővé a TDevelophoz +Comment[it]=Il plugin di script offre lo script basato su KScript dell'applicazione TDevelop +Comment[ms]=Plugin Scripting memberikan scripting berasaskan KScript pada aplikasi TDevelop +Comment[nds]=Dat Skript-Moduul stellt en op KSkript opbuut Skriptbewerken för TDevelop praat. +Comment[ne]=यो स्क्रिप्टिङ प्लगइनले केडीई विकास अनुप्रयोगको स्क्रिप्टिङमा आधारित केडीई स्क्रिप्टिङ प्रस्ताव गर्दछ +Comment[nl]=De scripting-plugin maakt KScript gebaseerde scripting van de TDevelop-toepassing mogelijk. +Comment[pl]=Wtyczka skrypty pozwala ja skrypty oparte o KScript w programie TDevelop +Comment[pt]=O 'plugin' de 'scripting' oferece funcionalidade de 'scripting' da aplicação TDevelop baseados no KScript +Comment[pt_BR]=O plug-in de scripting oferece scripts baseados no KScript do aplicativo TDevelop +Comment[ru]=Модуль сценариев позволяет автоматизировать работу с помощью KScript +Comment[sk]=Modul poskytuje KScript skriptovanie TDevelop aplikácie +Comment[sr]=Прикључак за скриптовање нуди скриптовање помоћу KScript-а за TDevelop +Comment[sr@Latn]=Priključak za skriptovanje nudi skriptovanje pomoću KScript-a za TDevelop +Comment[sv]=Skriptinsticksprogrammet erbjuder KScript-baserad styrning av programmet TDevelop. +Comment[tr]=Betik Yazma eklentisi TDevelop uygulamasına KScript tabanlı betik yazmayı sunar. +Comment[zh_CN]=脚本插件可为 TDevelop 应用程序提供基于 KScript 的脚本。 +Comment[zh_TW]=文稿外掛程式提供 TDevelop 應用程式一個 KScript 基礎的文稿機制。 +Icon=shellscript +ServiceTypes=TDevelop/Plugin + +X-TDevelop-Plugin-Version=1 +X-TDevelop-Plugin-Homepage=http://www.sourcextreme.com/projects/tdevelop +X-TDevelop-Plugin-BugsEmailAddress=geiseri@sourcextreme.com +X-TDevelop-Plugin-Copyright=(C) by ian reinhart geiser + +X-TDevelop-Args= + +X-TDevelop-Scope=Global +X-TDE-Library=libkdevscripting +X-TDevelop-Version=5 +X-TDevelop-Properties=CodeEditing diff --git a/parts/scripting/tdevscripting.rc b/parts/scripting/kdevscripting.rc similarity index 100% rename from parts/scripting/tdevscripting.rc rename to parts/scripting/kdevscripting.rc diff --git a/parts/scripting/scriptingpart.cpp b/parts/scripting/scriptingpart.cpp index 4ebee2b0..80a33c9e 100644 --- a/parts/scripting/scriptingpart.cpp +++ b/parts/scripting/scriptingpart.cpp @@ -29,29 +29,29 @@ #include #include #include -#include -#include +#include +#include -#include -#include +#include +#include #include #include #include #include "scriptingglobalconfig.h" #include "tdescriptactionmanager.h" -typedef TDevGenericFactory scriptingFactory; -TDevPluginInfo data("tdevscripting"); -K_EXPORT_COMPONENT_FACTORY( libtdevscripting, scriptingFactory( data ) ) +typedef KDevGenericFactory scriptingFactory; +KDevPluginInfo data("kdevscripting"); +K_EXPORT_COMPONENT_FACTORY( libkdevscripting, scriptingFactory( data ) ) #define GLOBALDOC_OPTIONS 1 #define PROJECTDOC_OPTIONS 2 scriptingPart::scriptingPart(TQObject *parent, const char *name, const TQStringList &/*args*/) - : TDevPlugin(&data, parent, name ? name : "scriptingPart"), m_scripts(0L) + : KDevPlugin(&data, parent, name ? name : "scriptingPart"), m_scripts(0L) { setInstance(scriptingFactory::instance()); - setXMLFile("tdevscripting.rc"); + setXMLFile("kdevscripting.rc"); m_configProxy = new ConfigWidgetProxy(core()); m_configProxy->createGlobalConfigPage(i18n("Scripting"), GLOBALDOC_OPTIONS, info()->icon()); diff --git a/parts/scripting/scriptingpart.h b/parts/scripting/scriptingpart.h index ca6bafd9..832318b9 100644 --- a/parts/scripting/scriptingpart.h +++ b/parts/scripting/scriptingpart.h @@ -18,10 +18,10 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef TDEVSCRIPTING_H -#define TDEVSCRIPTING_H +#ifndef KDEVSCRIPTING_H +#define KDEVSCRIPTING_H -#include +#include #include @@ -34,7 +34,7 @@ class KScriptActionManager; /** Please read the README.dox file for more info about this part */ -class scriptingPart: public TDevPlugin +class scriptingPart: public KDevPlugin { Q_OBJECT diff --git a/parts/scripting/tdevscripting.desktop b/parts/scripting/tdevscripting.desktop deleted file mode 100644 index afa0cc10..00000000 --- a/parts/scripting/tdevscripting.desktop +++ /dev/null @@ -1,77 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Name=KDevscripting -Name[da]=TDevelop scriptning -Name[nds]=TDevelop-Skriptschrieven -Name[sk]=KDev skriptovanie -Name[sv]=TDevelop-skriptanvändning -Name[zh_TW]=TDevelop 文稿 -GenericName=Scripting -GenericName[ca]=Scripts -GenericName[da]=Scriptning -GenericName[de]=Skriptunterstützung -GenericName[el]=Γραφή σεναρίων -GenericName[es]=Guiones -GenericName[et]=Skriptikeele plugin -GenericName[eu]=Script-a -GenericName[fa]=دست‌نوشته -GenericName[fr]=Scriptage -GenericName[ga]=Scriptiú -GenericName[hu]=Szkriptszerkesztő -GenericName[it]=Script -GenericName[nds]=Skriptünnerstütten -GenericName[ne]=स्क्रिप्टिङ -GenericName[pl]=Skrypty -GenericName[pt]='Scripting' -GenericName[ru]=Сценарии -GenericName[sk]=Skriptovanie -GenericName[sl]=Skriptiranje -GenericName[sr]=Скриптовање -GenericName[sr@Latn]=Skriptovanje -GenericName[sv]=Skriptanvändning -GenericName[tr]=Betik Yazma -GenericName[zh_CN]=脚本 -GenericName[zh_TW]=文稿 -Comment=The Scripting plugin offers KScript based scripting of the TDevelop application -Comment[ca]=El connector per als scripts ofereix scripts basats en KScript de l'aplicació TDevelop -Comment[da]=Scriptning-plugin stiller KScript-baseret scriptning til rådighed for TDevelop -Comment[de]=Das "Skript"-Modul bietet KScript-basierte Automatisierung für TDevelop -Comment[el]=Το πρόσθετο γραφής σεναρίων προσφέρει σενάρια της μορφής KScript της εφαρμογής TDevelop -Comment[es]=El complemento de guiones ofrece guiones basados en KScript de la aplicación TDevelop -Comment[et]=Skriptikeele plugin võimaldab TDevelopis kasutada skriptikeelt KScripti alusel -Comment[eu]=Script-a pluginak KScript-en oinarritutako TDevelop aplikazioaren script zerbitzuak eskeintzen ditu -Comment[fa]=وصلۀ دست‌نوشته، دست‌نوشتۀ کاربرد TDevelop بر مبنای KScript را ارائه می‌دهد. -Comment[fr]=Le module externe Scriptage fournit le scriptage basé sur KScript de l'application TDevelop -Comment[gl]=A extensión Scripting ofrece scripting baseado en KScript para a aplicación de TDevelop -Comment[hu]=A Szkriptszerkesztő KScript-alapú szkriptkészítést tesz lehetővé a TDevelophoz -Comment[it]=Il plugin di script offre lo script basato su KScript dell'applicazione TDevelop -Comment[ms]=Plugin Scripting memberikan scripting berasaskan KScript pada aplikasi TDevelop -Comment[nds]=Dat Skript-Moduul stellt en op KSkript opbuut Skriptbewerken för TDevelop praat. -Comment[ne]=यो स्क्रिप्टिङ प्लगइनले केडीई विकास अनुप्रयोगको स्क्रिप्टिङमा आधारित केडीई स्क्रिप्टिङ प्रस्ताव गर्दछ -Comment[nl]=De scripting-plugin maakt KScript gebaseerde scripting van de TDevelop-toepassing mogelijk. -Comment[pl]=Wtyczka skrypty pozwala ja skrypty oparte o KScript w programie TDevelop -Comment[pt]=O 'plugin' de 'scripting' oferece funcionalidade de 'scripting' da aplicação TDevelop baseados no KScript -Comment[pt_BR]=O plug-in de scripting oferece scripts baseados no KScript do aplicativo TDevelop -Comment[ru]=Модуль сценариев позволяет автоматизировать работу с помощью KScript -Comment[sk]=Modul poskytuje KScript skriptovanie TDevelop aplikácie -Comment[sr]=Прикључак за скриптовање нуди скриптовање помоћу KScript-а за TDevelop -Comment[sr@Latn]=Priključak za skriptovanje nudi skriptovanje pomoću KScript-a za TDevelop -Comment[sv]=Skriptinsticksprogrammet erbjuder KScript-baserad styrning av programmet TDevelop. -Comment[tr]=Betik Yazma eklentisi TDevelop uygulamasına KScript tabanlı betik yazmayı sunar. -Comment[zh_CN]=脚本插件可为 TDevelop 应用程序提供基于 KScript 的脚本。 -Comment[zh_TW]=文稿外掛程式提供 TDevelop 應用程式一個 KScript 基礎的文稿機制。 -Icon=shellscript -ServiceTypes=TDevelop/Plugin - -X-TDevelop-Plugin-Version=1 -X-TDevelop-Plugin-Homepage=http://www.sourcextreme.com/projects/tdevelop -X-TDevelop-Plugin-BugsEmailAddress=geiseri@sourcextreme.com -X-TDevelop-Plugin-Copyright=(C) by ian reinhart geiser - -X-TDevelop-Args= - -X-TDevelop-Scope=Global -X-TDE-Library=libtdevscripting -X-TDevelop-Version=5 -X-TDevelop-Properties=CodeEditing diff --git a/parts/snippet/CMakeLists.txt b/parts/snippet/CMakeLists.txt index 43776bf0..704ec3e9 100644 --- a/parts/snippet/CMakeLists.txt +++ b/parts/snippet/CMakeLists.txt @@ -26,13 +26,13 @@ link_directories( ##### other data ################################ -install( FILES tdevsnippet.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevpart_snippet.rc DESTINATION ${DATA_INSTALL_DIR}/tdevsnippet ) +install( FILES kdevsnippet.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevpart_snippet.rc DESTINATION ${DATA_INSTALL_DIR}/kdevsnippet ) -##### libtdevsnippet (module) ################### +##### libkdevsnippet (module) ################### -tde_add_kpart( libtdevsnippet AUTOMOC +tde_add_kpart( libkdevsnippet AUTOMOC SOURCES snippet_part.cpp snippet_widget.cpp snippetdlg.ui snippetitem.cpp snippetsettingsbase.ui snippetsettings.cpp diff --git a/parts/snippet/Makefile.am b/parts/snippet/Makefile.am index d2429963..e2c207a4 100644 --- a/parts/snippet/Makefile.am +++ b/parts/snippet/Makefile.am @@ -1,17 +1,17 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevsnippet.la -libtdevsnippet_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevsnippet_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevsnippet.la +libkdevsnippet_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevsnippet_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevsnippet_la_SOURCES = snippet_part.cpp snippet_widget.cpp snippetdlg.ui snippetitem.cpp snippetsettingsbase.ui snippetsettings.cpp snippetconfig.cpp +libkdevsnippet_la_SOURCES = snippet_part.cpp snippet_widget.cpp snippetdlg.ui snippetitem.cpp snippetsettingsbase.ui snippetsettings.cpp snippetconfig.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevsnippet.desktop +service_DATA = kdevsnippet.desktop -rc_DATA = tdevpart_snippet.rc -rcdir = $(kde_datadir)/tdevsnippet +rc_DATA = kdevpart_snippet.rc +rcdir = $(kde_datadir)/kdevsnippet noinst_HEADERS = snippetdlg.h snippetitem.h snippetsettingsbase.h snippetsettings.h snippetconfig.h diff --git a/parts/snippet/kdevpart_snippet.rc b/parts/snippet/kdevpart_snippet.rc new file mode 100644 index 00000000..4f34ec50 --- /dev/null +++ b/parts/snippet/kdevpart_snippet.rc @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/parts/snippet/kdevsnippet.desktop b/parts/snippet/kdevsnippet.desktop new file mode 100644 index 00000000..f9ba9652 --- /dev/null +++ b/parts/snippet/kdevsnippet.desktop @@ -0,0 +1,102 @@ +[Desktop Entry] +Type=Service +Exec= +Comment=This plugin allows you to store code snippets and add them to your code +Comment[ca]=Aquest connector permet guardar trossos de codi i afegir-los més tard al vostre codi +Comment[da]=Dette plugin tillader dig at opbevare kodestumper og tilføje dem til din kode +Comment[de]=Dieses Modul erlaubt das Abspeichern und Wiederverwenden von Quelltext-Schnipseln +Comment[el]=Αυτό το πρόσθετο σας επιτρέπει να αποθηκεύσετε δείγματα κώδικα και να τα προσθέσετε στον κώδικά σας +Comment[es]=Este complemento permite almacenar trozos de código y añadirlos a su código fuente +Comment[et]=See plugin võimaldab salvestada koodijuppe ja neid koodi lisada +Comment[eu]=Plugin honek kode zatiak gordetzeo eta zure kodeari gehitzeko aukera eskeintzen dizu +Comment[fa]=این وصله، اجازۀ ذخیرۀ تکه‌های کد و افزودن آنها را به کدتان می‌دهد +Comment[fr]=Ce module externe permet de stocker des fragments de code et de les ajouter à votre code +Comment[gl]=Esta extensión permite almacenar fragmentos de código e engadilos ao seu código +Comment[hu]=Ez a modul kódrészletek eltárolását és programkódba való beillesztését teszi lehetővé +Comment[it]=Questo plugin consente di memorizzare frammenti di codice e di aggiungerli al tuo codice +Comment[ja]=このプラグインはコード断片を格納し、あなたのコードにそれらを加えることを可能にします。 +Comment[ms]=Plugin ini membenarkan anda untuk menyimpan petikan kod dan menambahkannya ke dalam kod anda +Comment[nds]=Dit Moduul stellt dat Sekern un Tofögen vun Kode-Snippels praat. +Comment[ne]=यो प्लगइनले तपाईँलाई सङ्केत स्निपेट्स भण्डारण गर्न र तपाईँको सङ्केतमा तिनीहरूलाई थप्न अनुमति दिन्छ +Comment[nl]=Deze plugin staat u toe om tekstblokken op te slaan en deze toe te voegen aan uw code +Comment[pl]=Wtyczka umożliwiająca zapisanie fragmentów kodu i wstawianie ich później do kodu +Comment[pt]=Este 'plugin' permite-lhe guardar pedaços de códigos e adicioná-los ao seu código +Comment[pt_BR]=Este plug-in permite a você armazenar os pedaços de código e adicioná-los em seu código +Comment[ru]=Модуль сохранения часто используемых частей кода в одно место для быстрого доступа к ним +Comment[sk]=Modul umožní uložiť si výňatky kódu a ich vkladať +Comment[sr]=Овај прикључак вам омогућава да чувате исечке кôда и додајете их у сопствени кôд +Comment[sr@Latn]=Ovaj priključak vam omogućava da čuvate isečke kôda i dodajete ih u sopstveni kôd +Comment[sv]=Det här insticksprogrammet gör det möjligt att lagra kodsnuttar och lägga till dem i din kod +Comment[ta]=இந்த உள்ளீடுகள் ஸ்னிப்பட் குறியீடுகளை சேமிக்கவும் மற்றும் அக்குறியீட்டை சேர்க்கவும் வழிவகுக்கிறது +Comment[tg]=Нигоҳ дории модул баъзан истифодашавии як қисми код дар як ҷой барои зуд роҳ гирифтан ба он ҷо +Comment[tr]=Bu eklenti kod parçalarını saklamanızı ve onları kodunuza eklemenizi sağlar +Comment[zh_CN]=这个插件允许您保存代码片段并将这些片段插入到您的代码中 +Comment[zh_TW]=此外掛程式讓您儲存程式碼片段,並可以加入您的程式碼中 +Name=Code Snippets +Name[ca]=Trossos de codi +Name[da]=Kodestumper +Name[de]=Quelltext-Schnipsel +Name[el]=Δείγματα κώδικα +Name[es]=Trozos de código +Name[et]=Koodijupid +Name[eu]=Kode zatiak +Name[fa]=تکه‌های کد +Name[fr]=Fragments de code +Name[ga]=Blúirí Cóid +Name[hu]=Kódrészletek +Name[it]=Frammenti di codice +Name[ja]=コード Snippet +Name[ms]=Petikan Kod +Name[nds]=Kode-Snippels +Name[ne]=सङ्केत स्निपेट्स +Name[pl]=Fragmenty kodu +Name[pt]=Pedaços de Código +Name[pt_BR]=Pedaços de Código +Name[ru]=Заготовки кода +Name[sk]=Výňatky kódu +Name[sl]=Odseki kode +Name[sv]=Kodsnuttar +Name[ta]=ஸ்னிப்பட் குறியீடுகள் +Name[tg]=Тайёр намудани код +Name[tr]=Kod Parçacıkları +Name[zh_CN]=代码片段 +Name[zh_TW]=程式碼片段 +GenericName=Code Snippets +GenericName[ca]=Trossos de codi +GenericName[da]=Kodestumper +GenericName[de]=Quelltext-Schnipsel +GenericName[el]=Δείγματα κώδικα +GenericName[es]=Trozos de código +GenericName[et]=Koodijupid +GenericName[eu]=Kode zatiak +GenericName[fa]=تکه‌های کد +GenericName[fr]=Fragments de code +GenericName[ga]=Blúirí Cóid +GenericName[gl]=Fragmentos de código +GenericName[hu]=Kódrészletek +GenericName[it]=Frammenti di codice +GenericName[ja]=コード Snippet +GenericName[ms]=Petikan Kod +GenericName[nds]=Kode-Snippels +GenericName[ne]=सङ्केत स्निपेट्स +GenericName[nl]=Tekstblokken +GenericName[pl]=Fragmenty kodu +GenericName[pt]=Pedaços de Código +GenericName[pt_BR]=Pedaços de código +GenericName[ru]=Заготовки кода +GenericName[sk]=Výňatky kódu +GenericName[sl]=Odseki kode +GenericName[sr]=Исечци кôда +GenericName[sr@Latn]=Isečci kôda +GenericName[sv]=Kodsnuttar +GenericName[ta]=ஸ்ப்பட் குறியீடு +GenericName[tg]=Тайёр намудани кодҳо +GenericName[tr]=Kod Parçacıkları +GenericName[zh_CN]=代码片段 +GenericName[zh_TW]=程式碼片段 +Icon=editcut +ServiceTypes=TDevelop/Plugin +X-TDevelop-Scope=Global +X-TDE-Library=libkdevsnippet +X-TDevelop-Version=5 +X-TDevelop-Properties=CodeEditing diff --git a/parts/snippet/snippet_part.cpp b/parts/snippet/snippet_part.cpp index e31ebe7a..82969151 100644 --- a/parts/snippet/snippet_part.cpp +++ b/parts/snippet/snippet_part.cpp @@ -20,11 +20,11 @@ #include #include -#include "tdevcore.h" -#include -#include "tdevmainwindow.h" -#include -#include +#include "kdevcore.h" +#include +#include "kdevmainwindow.h" +#include +#include #include @@ -33,15 +33,15 @@ #include "snippetsettings.h" #include "snippetconfig.h" -static const TDevPluginInfo data("tdevsnippet"); -typedef TDevGenericFactory snippetFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevsnippet, snippetFactory( data ) ) +static const KDevPluginInfo data("kdevsnippet"); +typedef KDevGenericFactory snippetFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevsnippet, snippetFactory( data ) ) SnippetPart::SnippetPart(TQObject *parent, const char *name, const TQStringList& ) - : TDevPlugin(&data, parent, name ? name : "SnippetPart" ) + : KDevPlugin(&data, parent, name ? name : "SnippetPart" ) { setInstance(snippetFactory::instance()); - setXMLFile("tdevpart_snippet.rc"); + setXMLFile("kdevpart_snippet.rc"); m_widget = new SnippetWidget(this); m_widget->setCaption(i18n("Code Snippets")); diff --git a/parts/snippet/snippet_part.h b/parts/snippet/snippet_part.h index 98a809cf..8ffd8fce 100644 --- a/parts/snippet/snippet_part.h +++ b/parts/snippet/snippet_part.h @@ -7,12 +7,12 @@ */ -#ifndef __TDEVPART_SNIPPET_H__ -#define __TDEVPART_SNIPPET_H__ +#ifndef __KDEVPART_SNIPPET_H__ +#define __KDEVPART_SNIPPET_H__ #include -#include +#include class SnippetWidget; @@ -20,11 +20,11 @@ class TDEAboutData; class KDialogBase; /* -This is the TDevPlugin for the CodeSnippet feature +This is the KDevPlugin for the CodeSnippet feature For more info read the README.dox file @author Robert Gruber */ -class SnippetPart : public TDevPlugin +class SnippetPart : public KDevPlugin { Q_OBJECT diff --git a/parts/snippet/snippet_widget.cpp b/parts/snippet/snippet_widget.cpp index 6b59f16f..9cd4ae4b 100644 --- a/parts/snippet/snippet_widget.cpp +++ b/parts/snippet/snippet_widget.cpp @@ -36,9 +36,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include "snippetdlg.h" #include "snippetitem.h" @@ -418,7 +418,7 @@ void SnippetWidget::initConfigOldVersion(TDEConfig *cfg) void SnippetWidget::initConfig() { if (_cfg == NULL) - _cfg = new TDEConfig("tdevsnippetrc", false, false); + _cfg = new TDEConfig("kdevsnippetrc", false, false); _cfg->setGroup("SnippetPart"); diff --git a/parts/snippet/snippet_widget.h b/parts/snippet/snippet_widget.h index 4d534802..8b6c17a1 100644 --- a/parts/snippet/snippet_widget.h +++ b/parts/snippet/snippet_widget.h @@ -19,7 +19,7 @@ #include #include "snippetconfig.h" -class TDevProject; +class KDevProject; class SnippetPart; class TQPushButton; class TDEListView; diff --git a/parts/snippet/tdevpart_snippet.rc b/parts/snippet/tdevpart_snippet.rc deleted file mode 100644 index f4b9d2db..00000000 --- a/parts/snippet/tdevpart_snippet.rc +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/parts/snippet/tdevsnippet.desktop b/parts/snippet/tdevsnippet.desktop deleted file mode 100644 index b257280c..00000000 --- a/parts/snippet/tdevsnippet.desktop +++ /dev/null @@ -1,102 +0,0 @@ -[Desktop Entry] -Type=Service -Exec= -Comment=This plugin allows you to store code snippets and add them to your code -Comment[ca]=Aquest connector permet guardar trossos de codi i afegir-los més tard al vostre codi -Comment[da]=Dette plugin tillader dig at opbevare kodestumper og tilføje dem til din kode -Comment[de]=Dieses Modul erlaubt das Abspeichern und Wiederverwenden von Quelltext-Schnipseln -Comment[el]=Αυτό το πρόσθετο σας επιτρέπει να αποθηκεύσετε δείγματα κώδικα και να τα προσθέσετε στον κώδικά σας -Comment[es]=Este complemento permite almacenar trozos de código y añadirlos a su código fuente -Comment[et]=See plugin võimaldab salvestada koodijuppe ja neid koodi lisada -Comment[eu]=Plugin honek kode zatiak gordetzeo eta zure kodeari gehitzeko aukera eskeintzen dizu -Comment[fa]=این وصله، اجازۀ ذخیرۀ تکه‌های کد و افزودن آنها را به کدتان می‌دهد -Comment[fr]=Ce module externe permet de stocker des fragments de code et de les ajouter à votre code -Comment[gl]=Esta extensión permite almacenar fragmentos de código e engadilos ao seu código -Comment[hu]=Ez a modul kódrészletek eltárolását és programkódba való beillesztését teszi lehetővé -Comment[it]=Questo plugin consente di memorizzare frammenti di codice e di aggiungerli al tuo codice -Comment[ja]=このプラグインはコード断片を格納し、あなたのコードにそれらを加えることを可能にします。 -Comment[ms]=Plugin ini membenarkan anda untuk menyimpan petikan kod dan menambahkannya ke dalam kod anda -Comment[nds]=Dit Moduul stellt dat Sekern un Tofögen vun Kode-Snippels praat. -Comment[ne]=यो प्लगइनले तपाईँलाई सङ्केत स्निपेट्स भण्डारण गर्न र तपाईँको सङ्केतमा तिनीहरूलाई थप्न अनुमति दिन्छ -Comment[nl]=Deze plugin staat u toe om tekstblokken op te slaan en deze toe te voegen aan uw code -Comment[pl]=Wtyczka umożliwiająca zapisanie fragmentów kodu i wstawianie ich później do kodu -Comment[pt]=Este 'plugin' permite-lhe guardar pedaços de códigos e adicioná-los ao seu código -Comment[pt_BR]=Este plug-in permite a você armazenar os pedaços de código e adicioná-los em seu código -Comment[ru]=Модуль сохранения часто используемых частей кода в одно место для быстрого доступа к ним -Comment[sk]=Modul umožní uložiť si výňatky kódu a ich vkladať -Comment[sr]=Овај прикључак вам омогућава да чувате исечке кôда и додајете их у сопствени кôд -Comment[sr@Latn]=Ovaj priključak vam omogućava da čuvate isečke kôda i dodajete ih u sopstveni kôd -Comment[sv]=Det här insticksprogrammet gör det möjligt att lagra kodsnuttar och lägga till dem i din kod -Comment[ta]=இந்த உள்ளீடுகள் ஸ்னிப்பட் குறியீடுகளை சேமிக்கவும் மற்றும் அக்குறியீட்டை சேர்க்கவும் வழிவகுக்கிறது -Comment[tg]=Нигоҳ дории модул баъзан истифодашавии як қисми код дар як ҷой барои зуд роҳ гирифтан ба он ҷо -Comment[tr]=Bu eklenti kod parçalarını saklamanızı ve onları kodunuza eklemenizi sağlar -Comment[zh_CN]=这个插件允许您保存代码片段并将这些片段插入到您的代码中 -Comment[zh_TW]=此外掛程式讓您儲存程式碼片段,並可以加入您的程式碼中 -Name=Code Snippets -Name[ca]=Trossos de codi -Name[da]=Kodestumper -Name[de]=Quelltext-Schnipsel -Name[el]=Δείγματα κώδικα -Name[es]=Trozos de código -Name[et]=Koodijupid -Name[eu]=Kode zatiak -Name[fa]=تکه‌های کد -Name[fr]=Fragments de code -Name[ga]=Blúirí Cóid -Name[hu]=Kódrészletek -Name[it]=Frammenti di codice -Name[ja]=コード Snippet -Name[ms]=Petikan Kod -Name[nds]=Kode-Snippels -Name[ne]=सङ्केत स्निपेट्स -Name[pl]=Fragmenty kodu -Name[pt]=Pedaços de Código -Name[pt_BR]=Pedaços de Código -Name[ru]=Заготовки кода -Name[sk]=Výňatky kódu -Name[sl]=Odseki kode -Name[sv]=Kodsnuttar -Name[ta]=ஸ்னிப்பட் குறியீடுகள் -Name[tg]=Тайёр намудани код -Name[tr]=Kod Parçacıkları -Name[zh_CN]=代码片段 -Name[zh_TW]=程式碼片段 -GenericName=Code Snippets -GenericName[ca]=Trossos de codi -GenericName[da]=Kodestumper -GenericName[de]=Quelltext-Schnipsel -GenericName[el]=Δείγματα κώδικα -GenericName[es]=Trozos de código -GenericName[et]=Koodijupid -GenericName[eu]=Kode zatiak -GenericName[fa]=تکه‌های کد -GenericName[fr]=Fragments de code -GenericName[ga]=Blúirí Cóid -GenericName[gl]=Fragmentos de código -GenericName[hu]=Kódrészletek -GenericName[it]=Frammenti di codice -GenericName[ja]=コード Snippet -GenericName[ms]=Petikan Kod -GenericName[nds]=Kode-Snippels -GenericName[ne]=सङ्केत स्निपेट्स -GenericName[nl]=Tekstblokken -GenericName[pl]=Fragmenty kodu -GenericName[pt]=Pedaços de Código -GenericName[pt_BR]=Pedaços de código -GenericName[ru]=Заготовки кода -GenericName[sk]=Výňatky kódu -GenericName[sl]=Odseki kode -GenericName[sr]=Исечци кôда -GenericName[sr@Latn]=Isečci kôda -GenericName[sv]=Kodsnuttar -GenericName[ta]=ஸ்ப்பட் குறியீடு -GenericName[tg]=Тайёр намудани кодҳо -GenericName[tr]=Kod Parçacıkları -GenericName[zh_CN]=代码片段 -GenericName[zh_TW]=程式碼片段 -Icon=editcut -ServiceTypes=TDevelop/Plugin -X-TDevelop-Scope=Global -X-TDE-Library=libtdevsnippet -X-TDevelop-Version=5 -X-TDevelop-Properties=CodeEditing diff --git a/parts/texttools/CMakeLists.txt b/parts/texttools/CMakeLists.txt index 4a893dd4..2ed4221c 100644 --- a/parts/texttools/CMakeLists.txt +++ b/parts/texttools/CMakeLists.txt @@ -26,12 +26,12 @@ link_directories( ##### other data ################################ -install( FILES tdevtexttools.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevtexttools.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevtexttools (module) ################# +##### libkdevtexttools (module) ################# -tde_add_kpart( libtdevtexttools AUTOMOC +tde_add_kpart( libkdevtexttools AUTOMOC SOURCES texttoolspart.cpp texttoolswidget.cpp LINK tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} diff --git a/parts/texttools/Makefile.am b/parts/texttools/Makefile.am index 105eec32..725133be 100644 --- a/parts/texttools/Makefile.am +++ b/parts/texttools/Makefile.am @@ -2,17 +2,17 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/sourceinfo -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevtexttools.la -libtdevtexttools_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevtexttools_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevtexttools.la +libkdevtexttools_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevtexttools_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevtexttools_la_SOURCES = texttoolspart.cpp texttoolswidget.cpp +libkdevtexttools_la_SOURCES = texttoolspart.cpp texttoolswidget.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevtexttools.desktop +service_DATA = kdevtexttools.desktop # not used currently -#rcdir = $(kde_datadir)/tdevtexttools -#rc_DATA = tdevtexttools.rc +#rcdir = $(kde_datadir)/kdevtexttools +#rc_DATA = kdevtexttools.rc diff --git a/parts/texttools/kdevtexttools.desktop b/parts/texttools/kdevtexttools.desktop new file mode 100644 index 00000000..fd5fc736 --- /dev/null +++ b/parts/texttools/kdevtexttools.desktop @@ -0,0 +1,84 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Provides a structure overview and navigation for HTML and TEX files +Comment[ca]=Proporciona una vista de conjunt i navegació per a fitxers HTML i TEX +Comment[da]=Giver et strukturoverblik og navigering for HTML- og TeX-filer +Comment[de]=Stellt eine Strukturansicht für HTML- und TeX-Dateien zur Verfügung +Comment[el]=Προσφέρει μια περίληψη δομής και πλοήγηση για αρχεία HTML και TEX +Comment[es]=Proporciona una vista general y navegación para archivos HTML y TEX +Comment[et]=Näitab HTML- ja TEX-failide struktuuri ning võimaldab neis liikuda +Comment[eu]=HTML eta TEX fitxategien egituren laburpen eta nabigazioa eskeintzen du. +Comment[fa]=خلاصۀ ساختار و ناوش را برای پرونده‌های زنگام و متن فراهم می‌کند +Comment[fr]=Fournit une vue d'ensemble et une navigation pour les fichiers HTML et TEX +Comment[gl]=Proporciona unha vista xeral e navegación da estructura de ficheiros HTML e TEX +Comment[hu]=Lehetővé teszi a struktúra áttekintését, navigálását HTML és TEX fájloknál +Comment[it]=Offre un'anteprima di struttura e navigazione per file HTML e TEX +Comment[ja]=HTML や TeX ファイルの構造の概要やナビゲーションを提供します。 +Comment[ms]=Menyediakan struktur menyeluruh dan navigasi untuk HTML dan fail TEX +Comment[nds]=Stellt en Struktuuröversicht un dat Stüern för HTML- un TeX-Dateien praat. +Comment[ne]=HTML र TEX फाइलका लागि नेभिगेसन र बनावट समिक्षा प्रदान गर्दछ +Comment[nl]=Biedt een overzicht van de structuur van HTML- en TeX-bestanden +Comment[pl]=Widok struktury tekstu i nawigacja dla plików HTML i TEX +Comment[pt]=Oferece uma vista geral estruturada e a navegação sobre os ficheiros de HTML e TEX +Comment[pt_BR]=Fornece uma visão de estrutura e navegação para arquivos HTML e TEX +Comment[ru]=Показывает структуру документов в формате HTML и TEX, а также предоставляет возможности навигации по ним. +Comment[sk]=Poskytuje štruktúrovaný náhľad a navigáciu pre HTML a TEX súbory +Comment[sr]=Обезбеђује преглед структуре и навигацију за HTML и TEX фајлове +Comment[sr@Latn]=Obezbeđuje pregled strukture i navigaciju za HTML i TEX fajlove +Comment[sv]=Tillhandahåller en strukturöversikt och navigering för HTML- och Tex-filer +Comment[ta]=HTML மற்றும் TEX கோப்புகளின் அமைப்பை மேற்பார்வையிட மற்றும் வழி செலுத்த இது உதவும். +Comment[tg]=Ҳуҷҷатҳои структуриро дар формати HTML ва TEX тасвир менамояд ва боз ҳам имкони навигатсия намуданро иҷозат медиҳад +Comment[tr]=HTML ve TEX dosyaları için yapı gözden geçirimi ve dolaşımı sağlar. +Comment[zh_CN]=提供HTML和TEX文件的结构预览 +Comment[zh_TW]=提供 HTML 與 TEX 檔的結構化的概觀與導覽 +Name=KDevTextTools +Name[da]=TDevelop tekstværktøjer +Name[de]=Textstrukturansicht (TDevelop) +Name[hi]=के-डेव-टेक्स्ट-टूल्स +Name[nds]=TDevelop-TextWarktüüch +Name[pl]=KDevNarzędziaTekstowe +Name[sk]=KDev textové nástroje +Name[sv]=TDevelop textverktyg +Name[ta]=KDev உரைக்கருவி +Name[tg]=Асбобҳои матни KDev +Name[zh_TW]=TDevelop 文字工具 +GenericName=Text Structure +GenericName[br]=Skeledenn ar skrid +GenericName[ca]=Estructura del text +GenericName[da]=Tekststruktur +GenericName[de]=Textstruktur-Ansicht +GenericName[el]=Δομή κειμένου +GenericName[es]=Estructura de texto +GenericName[et]=Tekstistruktuur +GenericName[eu]=Testuaren egitura +GenericName[fa]=ساختار متن +GenericName[fr]=Structure du texte +GenericName[gl]=Estructura do texto +GenericName[hi]=टेक्स्ट स्ट्रक्चर +GenericName[hu]=Szövegstruktúra +GenericName[it]=Struttura testo +GenericName[ja]=テキスト構造 +GenericName[ms]=Struktur Teks +GenericName[nds]=Textstruktuur +GenericName[ne]=पाठ बनावट +GenericName[nl]=Tekststructuur +GenericName[pl]=Struktura tekstu +GenericName[pt]=Estrutura de Texto +GenericName[pt_BR]=Estrutura de Texto +GenericName[ru]=Показ структуры текста +GenericName[sk]=Textové štruktúry +GenericName[sl]=Besedilna struktura +GenericName[sr]=Структура текста +GenericName[sr@Latn]=Struktura teksta +GenericName[sv]=Textstruktur +GenericName[ta]=உரை வடிவம் +GenericName[tg]=Тасвири матни структурӣ +GenericName[tr]=Metin Yapısı +GenericName[zh_CN]=文件结构 +GenericName[zh_TW]=文字結構 +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevtexttools +X-TDevelop-Version=5 +X-TDevelop-Scope=Global +X-TDevelop-Properties=CodeNavigation diff --git a/parts/texttools/tdevtexttools.desktop b/parts/texttools/tdevtexttools.desktop deleted file mode 100644 index c9caf618..00000000 --- a/parts/texttools/tdevtexttools.desktop +++ /dev/null @@ -1,84 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Provides a structure overview and navigation for HTML and TEX files -Comment[ca]=Proporciona una vista de conjunt i navegació per a fitxers HTML i TEX -Comment[da]=Giver et strukturoverblik og navigering for HTML- og TeX-filer -Comment[de]=Stellt eine Strukturansicht für HTML- und TeX-Dateien zur Verfügung -Comment[el]=Προσφέρει μια περίληψη δομής και πλοήγηση για αρχεία HTML και TEX -Comment[es]=Proporciona una vista general y navegación para archivos HTML y TEX -Comment[et]=Näitab HTML- ja TEX-failide struktuuri ning võimaldab neis liikuda -Comment[eu]=HTML eta TEX fitxategien egituren laburpen eta nabigazioa eskeintzen du. -Comment[fa]=خلاصۀ ساختار و ناوش را برای پرونده‌های زنگام و متن فراهم می‌کند -Comment[fr]=Fournit une vue d'ensemble et une navigation pour les fichiers HTML et TEX -Comment[gl]=Proporciona unha vista xeral e navegación da estructura de ficheiros HTML e TEX -Comment[hu]=Lehetővé teszi a struktúra áttekintését, navigálását HTML és TEX fájloknál -Comment[it]=Offre un'anteprima di struttura e navigazione per file HTML e TEX -Comment[ja]=HTML や TeX ファイルの構造の概要やナビゲーションを提供します。 -Comment[ms]=Menyediakan struktur menyeluruh dan navigasi untuk HTML dan fail TEX -Comment[nds]=Stellt en Struktuuröversicht un dat Stüern för HTML- un TeX-Dateien praat. -Comment[ne]=HTML र TEX फाइलका लागि नेभिगेसन र बनावट समिक्षा प्रदान गर्दछ -Comment[nl]=Biedt een overzicht van de structuur van HTML- en TeX-bestanden -Comment[pl]=Widok struktury tekstu i nawigacja dla plików HTML i TEX -Comment[pt]=Oferece uma vista geral estruturada e a navegação sobre os ficheiros de HTML e TEX -Comment[pt_BR]=Fornece uma visão de estrutura e navegação para arquivos HTML e TEX -Comment[ru]=Показывает структуру документов в формате HTML и TEX, а также предоставляет возможности навигации по ним. -Comment[sk]=Poskytuje štruktúrovaný náhľad a navigáciu pre HTML a TEX súbory -Comment[sr]=Обезбеђује преглед структуре и навигацију за HTML и TEX фајлове -Comment[sr@Latn]=Obezbeđuje pregled strukture i navigaciju za HTML i TEX fajlove -Comment[sv]=Tillhandahåller en strukturöversikt och navigering för HTML- och Tex-filer -Comment[ta]=HTML மற்றும் TEX கோப்புகளின் அமைப்பை மேற்பார்வையிட மற்றும் வழி செலுத்த இது உதவும். -Comment[tg]=Ҳуҷҷатҳои структуриро дар формати HTML ва TEX тасвир менамояд ва боз ҳам имкони навигатсия намуданро иҷозат медиҳад -Comment[tr]=HTML ve TEX dosyaları için yapı gözden geçirimi ve dolaşımı sağlar. -Comment[zh_CN]=提供HTML和TEX文件的结构预览 -Comment[zh_TW]=提供 HTML 與 TEX 檔的結構化的概觀與導覽 -Name=KDevTextTools -Name[da]=TDevelop tekstværktøjer -Name[de]=Textstrukturansicht (TDevelop) -Name[hi]=के-डेव-टेक्स्ट-टूल्स -Name[nds]=TDevelop-TextWarktüüch -Name[pl]=KDevNarzędziaTekstowe -Name[sk]=KDev textové nástroje -Name[sv]=TDevelop textverktyg -Name[ta]=KDev உரைக்கருவி -Name[tg]=Асбобҳои матни KDev -Name[zh_TW]=TDevelop 文字工具 -GenericName=Text Structure -GenericName[br]=Skeledenn ar skrid -GenericName[ca]=Estructura del text -GenericName[da]=Tekststruktur -GenericName[de]=Textstruktur-Ansicht -GenericName[el]=Δομή κειμένου -GenericName[es]=Estructura de texto -GenericName[et]=Tekstistruktuur -GenericName[eu]=Testuaren egitura -GenericName[fa]=ساختار متن -GenericName[fr]=Structure du texte -GenericName[gl]=Estructura do texto -GenericName[hi]=टेक्स्ट स्ट्रक्चर -GenericName[hu]=Szövegstruktúra -GenericName[it]=Struttura testo -GenericName[ja]=テキスト構造 -GenericName[ms]=Struktur Teks -GenericName[nds]=Textstruktuur -GenericName[ne]=पाठ बनावट -GenericName[nl]=Tekststructuur -GenericName[pl]=Struktura tekstu -GenericName[pt]=Estrutura de Texto -GenericName[pt_BR]=Estrutura de Texto -GenericName[ru]=Показ структуры текста -GenericName[sk]=Textové štruktúry -GenericName[sl]=Besedilna struktura -GenericName[sr]=Структура текста -GenericName[sr@Latn]=Struktura teksta -GenericName[sv]=Textstruktur -GenericName[ta]=உரை வடிவம் -GenericName[tg]=Тасвири матни структурӣ -GenericName[tr]=Metin Yapısı -GenericName[zh_CN]=文件结构 -GenericName[zh_TW]=文字結構 -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevtexttools -X-TDevelop-Version=5 -X-TDevelop-Scope=Global -X-TDevelop-Properties=CodeNavigation diff --git a/parts/texttools/texttoolspart.cpp b/parts/texttools/texttoolspart.cpp index 857e2bec..4453030a 100644 --- a/parts/texttools/texttoolspart.cpp +++ b/parts/texttools/texttoolspart.cpp @@ -14,25 +14,25 @@ #include #include #include -#include -#include +#include +#include #include -#include "tdevpartcontroller.h" -#include "tdevmainwindow.h" +#include "kdevpartcontroller.h" +#include "kdevmainwindow.h" #include "texttoolswidget.h" -typedef TDevGenericFactory TextToolsFactory; -static const TDevPluginInfo data("tdevtexttools"); -K_EXPORT_COMPONENT_FACTORY( libtdevtexttools, TextToolsFactory( data ) ) +typedef KDevGenericFactory TextToolsFactory; +static const KDevPluginInfo data("kdevtexttools"); +K_EXPORT_COMPONENT_FACTORY( libkdevtexttools, TextToolsFactory( data ) ) TextToolsPart::TextToolsPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin(&data, parent, name ? name : "TextToolsPart") + : KDevPlugin(&data, parent, name ? name : "TextToolsPart") { setInstance(TextToolsFactory::instance()); - // setXMLFile("tdevfileview.rc"); + // setXMLFile("kdevfileview.rc"); m_widget = 0; diff --git a/parts/texttools/texttoolspart.h b/parts/texttools/texttoolspart.h index fa911d98..0d822a65 100644 --- a/parts/texttools/texttoolspart.h +++ b/parts/texttools/texttoolspart.h @@ -14,12 +14,12 @@ #include #include -#include "tdevplugin.h" +#include "kdevplugin.h" class TextToolsWidget; -class TextToolsPart : public TDevPlugin +class TextToolsPart : public KDevPlugin { Q_OBJECT diff --git a/parts/texttools/texttoolswidget.cpp b/parts/texttools/texttoolswidget.cpp index ebf0c56b..db2f0acc 100644 --- a/parts/texttools/texttoolswidget.cpp +++ b/parts/texttools/texttoolswidget.cpp @@ -22,8 +22,8 @@ #include #include -#include "tdevmainwindow.h" -#include "tdevpartcontroller.h" +#include "kdevmainwindow.h" +#include "kdevpartcontroller.h" #include "texttoolspart.h" diff --git a/parts/tipofday/CMakeLists.txt b/parts/tipofday/CMakeLists.txt index c3990be1..753f65e1 100644 --- a/parts/tipofday/CMakeLists.txt +++ b/parts/tipofday/CMakeLists.txt @@ -27,14 +27,14 @@ link_directories( ##### other data ################################ tde_install_icons( ) -install( FILES tdevtipofday.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tips DESTINATION ${DATA_INSTALL_DIR}/tdevtipofday ) -install( FILES tdevpart_tipofday.rc DESTINATION ${DATA_INSTALL_DIR}/tdevtipofday ) +install( FILES kdevtipofday.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES tips DESTINATION ${DATA_INSTALL_DIR}/kdevtipofday ) +install( FILES kdevpart_tipofday.rc DESTINATION ${DATA_INSTALL_DIR}/kdevtipofday ) -##### libtdevtipofday (module) ################## +##### libkdevtipofday (module) ################## -tde_add_kpart( libtdevtipofday AUTOMOC +tde_add_kpart( libkdevtipofday AUTOMOC SOURCES tipofday_part.cpp LINK tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} diff --git a/parts/tipofday/Makefile.am b/parts/tipofday/Makefile.am index 22560851..4ec54292 100644 --- a/parts/tipofday/Makefile.am +++ b/parts/tipofday/Makefile.am @@ -1,24 +1,24 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevtipofday.la -libtdevtipofday_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevtipofday_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevtipofday.la +libkdevtipofday_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevtipofday_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevtipofday_la_SOURCES = tipofday_part.cpp +libkdevtipofday_la_SOURCES = tipofday_part.cpp METASOURCES = AUTO KDE_ICON = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevtipofday.desktop +service_DATA = kdevtipofday.desktop tip_DATA = tips -tipdir = $(kde_datadir)/tdevtipofday +tipdir = $(kde_datadir)/kdevtipofday -rc_DATA = tdevpart_tipofday.rc -rcdir = $(kde_datadir)/tdevtipofday +rc_DATA = kdevpart_tipofday.rc +rcdir = $(kde_datadir)/kdevtipofday messages: rc.cpp $(PREPARETIPS) > tips.cc - $(XGETTEXT) *.cpp *.h tips.cc -o $(podir)/tdevtipofday.pot + $(XGETTEXT) *.cpp *.h tips.cc -o $(podir)/kdevtipofday.pot rm -f tips.cc diff --git a/parts/tipofday/tdevpart_tipofday.rc b/parts/tipofday/kdevpart_tipofday.rc similarity index 100% rename from parts/tipofday/tdevpart_tipofday.rc rename to parts/tipofday/kdevpart_tipofday.rc diff --git a/parts/tipofday/kdevtipofday.desktop b/parts/tipofday/kdevtipofday.desktop new file mode 100644 index 00000000..7efdbd9f --- /dev/null +++ b/parts/tipofday/kdevtipofday.desktop @@ -0,0 +1,94 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Tip of the Day +Comment[br]=Lagadenn an deiz +Comment[ca]=Consell del dia +Comment[cy]=Awgrymiad y Dydd +Comment[da]=Dagens vink +Comment[de]=Tipp des Tages +Comment[el]=Συμβουλή της ημέρας +Comment[es]=Consejo del día +Comment[et]=Päeva nõuanne +Comment[eu]=Eguneko aholkua +Comment[fa]=نکتۀ روز +Comment[fr]=Astuce du jour +Comment[ga]=Leid an Lae +Comment[gl]=Consello do día +Comment[hi]=टिप ऑफ द डे +Comment[hu]=A nap tippje +Comment[it]=Suggerimento del giorno +Comment[ja]=今日の一言 +Comment[ms]=Tip Hari Ini +Comment[nds]=Tipp för Vundaag +Comment[ne]=आजको टिप +Comment[nl]=Tip van de dag +Comment[pa]=ਅੱਜ ਦਾ ਇਸ਼ਾਰਾ +Comment[pl]=Podpowiedź dnia +Comment[pt]=Dica do Dia +Comment[pt_BR]=Dica do Dia +Comment[ru]=Полезный совет +Comment[sk]=Tip dňa +Comment[sl]=Namig dneva +Comment[sr]=Савет дана +Comment[sr@Latn]=Savet dana +Comment[sv]=Dagens tips +Comment[ta]=இந்த நாளுக்கான யோசனை +Comment[tg]=Маслиҳати фоиданок +Comment[tr]=Günün İpucu +Comment[zh_CN]=日积月累 +Comment[zh_TW]=本日小提示 +Name=KDevTipOfDay +Name[da]=TDevelop Dagens vink +Name[de]="Tipp des Tages"-Modul (TDevelop) +Name[hi]=के-डेव-टिप-ऑफ-डे +Name[nds]=TDevelop-"Tipp för Vundaag" +Name[pl]=KDevPodpowiedźDnia +Name[sk]=KDev tip dňa +Name[sv]=TDevelop dagens tips +Name[ta]=KDevஇந்த நாளுக்கான யோசனை +Name[tg]=KDevЛуқмаи рӯз +Name[zh_TW]=TDevelop 本日小提示 +GenericName=Tip of the Day +GenericName[br]=Lagadenn an deiz +GenericName[ca]=Consell del dia +GenericName[cy]=Awgrymiad y Dydd +GenericName[da]=Dagens vink +GenericName[de]=Tipp des Tages +GenericName[el]=Συμβουλή της ημέρας +GenericName[es]=Consejo del día +GenericName[et]=Päeva nõuanne +GenericName[eu]=Eguneko aholkua +GenericName[fa]=نکتۀ روز +GenericName[fr]=Astuce du jour +GenericName[ga]=Leid an Lae +GenericName[gl]=Consello do día +GenericName[hi]=टिप ऑफ द डे +GenericName[hu]=A nap tippje +GenericName[it]=Suggerimento del giorno +GenericName[ja]=今日の一言 +GenericName[ms]=Tip Hari Ini +GenericName[nds]=Tipp för Vundaag +GenericName[ne]=आजको टिप +GenericName[nl]=Tip van de dag +GenericName[pa]=ਅੱਜ ਦਾ ਇਸ਼ਾਰਾ +GenericName[pl]=Podpowiedź dnia +GenericName[pt]=Dica do Dia +GenericName[pt_BR]=Dica do Dia +GenericName[ru]=Полезный совет +GenericName[sk]=Tip dňa +GenericName[sl]=Namig dneva +GenericName[sr]=Савет дана +GenericName[sr@Latn]=Savet dana +GenericName[sv]=Dagens tips +GenericName[ta]=இந்த நாளுக்கான யோசனை +GenericName[tg]=Маслиҳати фоиданок +GenericName[tr]=Günün İpucu +GenericName[zh_CN]=日积月累 +GenericName[zh_TW]=本日小提示 +Icon=tdevelop +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevtipofday +X-TDevelop-Version=5 +X-TDevelop-Scope=Core +X-TDevelop-Properties=Documentation diff --git a/parts/tipofday/tdevtipofday.desktop b/parts/tipofday/tdevtipofday.desktop deleted file mode 100644 index 53d6d9c9..00000000 --- a/parts/tipofday/tdevtipofday.desktop +++ /dev/null @@ -1,94 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Tip of the Day -Comment[br]=Lagadenn an deiz -Comment[ca]=Consell del dia -Comment[cy]=Awgrymiad y Dydd -Comment[da]=Dagens vink -Comment[de]=Tipp des Tages -Comment[el]=Συμβουλή της ημέρας -Comment[es]=Consejo del día -Comment[et]=Päeva nõuanne -Comment[eu]=Eguneko aholkua -Comment[fa]=نکتۀ روز -Comment[fr]=Astuce du jour -Comment[ga]=Leid an Lae -Comment[gl]=Consello do día -Comment[hi]=टिप ऑफ द डे -Comment[hu]=A nap tippje -Comment[it]=Suggerimento del giorno -Comment[ja]=今日の一言 -Comment[ms]=Tip Hari Ini -Comment[nds]=Tipp för Vundaag -Comment[ne]=आजको टिप -Comment[nl]=Tip van de dag -Comment[pa]=ਅੱਜ ਦਾ ਇਸ਼ਾਰਾ -Comment[pl]=Podpowiedź dnia -Comment[pt]=Dica do Dia -Comment[pt_BR]=Dica do Dia -Comment[ru]=Полезный совет -Comment[sk]=Tip dňa -Comment[sl]=Namig dneva -Comment[sr]=Савет дана -Comment[sr@Latn]=Savet dana -Comment[sv]=Dagens tips -Comment[ta]=இந்த நாளுக்கான யோசனை -Comment[tg]=Маслиҳати фоиданок -Comment[tr]=Günün İpucu -Comment[zh_CN]=日积月累 -Comment[zh_TW]=本日小提示 -Name=KDevTipOfDay -Name[da]=TDevelop Dagens vink -Name[de]="Tipp des Tages"-Modul (TDevelop) -Name[hi]=के-डेव-टिप-ऑफ-डे -Name[nds]=TDevelop-"Tipp för Vundaag" -Name[pl]=KDevPodpowiedźDnia -Name[sk]=KDev tip dňa -Name[sv]=TDevelop dagens tips -Name[ta]=KDevஇந்த நாளுக்கான யோசனை -Name[tg]=KDevЛуқмаи рӯз -Name[zh_TW]=TDevelop 本日小提示 -GenericName=Tip of the Day -GenericName[br]=Lagadenn an deiz -GenericName[ca]=Consell del dia -GenericName[cy]=Awgrymiad y Dydd -GenericName[da]=Dagens vink -GenericName[de]=Tipp des Tages -GenericName[el]=Συμβουλή της ημέρας -GenericName[es]=Consejo del día -GenericName[et]=Päeva nõuanne -GenericName[eu]=Eguneko aholkua -GenericName[fa]=نکتۀ روز -GenericName[fr]=Astuce du jour -GenericName[ga]=Leid an Lae -GenericName[gl]=Consello do día -GenericName[hi]=टिप ऑफ द डे -GenericName[hu]=A nap tippje -GenericName[it]=Suggerimento del giorno -GenericName[ja]=今日の一言 -GenericName[ms]=Tip Hari Ini -GenericName[nds]=Tipp för Vundaag -GenericName[ne]=आजको टिप -GenericName[nl]=Tip van de dag -GenericName[pa]=ਅੱਜ ਦਾ ਇਸ਼ਾਰਾ -GenericName[pl]=Podpowiedź dnia -GenericName[pt]=Dica do Dia -GenericName[pt_BR]=Dica do Dia -GenericName[ru]=Полезный совет -GenericName[sk]=Tip dňa -GenericName[sl]=Namig dneva -GenericName[sr]=Савет дана -GenericName[sr@Latn]=Savet dana -GenericName[sv]=Dagens tips -GenericName[ta]=இந்த நாளுக்கான யோசனை -GenericName[tg]=Маслиҳати фоиданок -GenericName[tr]=Günün İpucu -GenericName[zh_CN]=日积月累 -GenericName[zh_TW]=本日小提示 -Icon=tdevelop -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevtipofday -X-TDevelop-Version=5 -X-TDevelop-Scope=Core -X-TDevelop-Properties=Documentation diff --git a/parts/tipofday/tipofday_part.cpp b/parts/tipofday/tipofday_part.cpp index f86ebf1f..6cd63deb 100644 --- a/parts/tipofday/tipofday_part.cpp +++ b/parts/tipofday/tipofday_part.cpp @@ -8,28 +8,28 @@ #include #include #include -#include -#include +#include +#include #include #include #include #include #include -#include "tdevapi.h" -#include "tdevcore.h" +#include "kdevapi.h" +#include "kdevcore.h" -static const TDevPluginInfo data("tdevtipofday"); +static const KDevPluginInfo data("kdevtipofday"); -typedef TDevGenericFactory TipOfDayFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevtipofday, TipOfDayFactory( data ) ) +typedef KDevGenericFactory TipOfDayFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevtipofday, TipOfDayFactory( data ) ) TipOfDayPart::TipOfDayPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin(&data, parent, name ? name : "TipOfDayPart") + : KDevPlugin(&data, parent, name ? name : "TipOfDayPart") { setInstance(TipOfDayFactory::instance()); - setXMLFile("tdevpart_tipofday.rc"); + setXMLFile("kdevpart_tipofday.rc"); TDEAction *action; diff --git a/parts/tipofday/tipofday_part.h b/parts/tipofday/tipofday_part.h index b5aafe50..4b982800 100644 --- a/parts/tipofday/tipofday_part.h +++ b/parts/tipofday/tipofday_part.h @@ -3,14 +3,14 @@ */ -#ifndef __TDEVPART_TIPOFDAY_H__ -#define __TDEVPART_TIPOFDAY_H__ +#ifndef __KDEVPART_TIPOFDAY_H__ +#define __KDEVPART_TIPOFDAY_H__ -#include +#include -class TipOfDayPart : public TDevPlugin +class TipOfDayPart : public KDevPlugin { Q_OBJECT diff --git a/parts/tools/CMakeLists.txt b/parts/tools/CMakeLists.txt index aaa0d462..7bd64c81 100644 --- a/parts/tools/CMakeLists.txt +++ b/parts/tools/CMakeLists.txt @@ -28,13 +28,13 @@ link_directories( ##### other data ################################ -install( FILES tdevtools.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevpart_tools.rc DESTINATION ${DATA_INSTALL_DIR}/tdevtools ) +install( FILES kdevtools.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevpart_tools.rc DESTINATION ${DATA_INSTALL_DIR}/kdevtools ) -##### libtdevtools (module) ##################### +##### libkdevtools (module) ##################### -tde_add_kpart( libtdevtools AUTOMOC +tde_add_kpart( libkdevtools AUTOMOC SOURCES tools_part.cpp toolsconfig.cpp toolsconfigwidgetbase.ui toolsconfigwidget.cpp kapplicationtree.cpp addtooldlg.ui diff --git a/parts/tools/Makefile.am b/parts/tools/Makefile.am index da4d9d0b..a61da964 100644 --- a/parts/tools/Makefile.am +++ b/parts/tools/Makefile.am @@ -1,16 +1,16 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevtools.la -libtdevtools_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevtools_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevtools.la +libkdevtools_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevtools_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevtools_la_SOURCES = tools_part.cpp toolsconfig.cpp toolsconfigwidgetbase.ui toolsconfigwidget.cpp kapplicationtree.cpp addtooldlg.ui +libkdevtools_la_SOURCES = tools_part.cpp toolsconfig.cpp toolsconfigwidgetbase.ui toolsconfigwidget.cpp kapplicationtree.cpp addtooldlg.ui METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevtools.desktop +service_DATA = kdevtools.desktop -rc_DATA = tdevpart_tools.rc -rcdir = $(kde_datadir)/tdevtools +rc_DATA = kdevpart_tools.rc +rcdir = $(kde_datadir)/kdevtools diff --git a/parts/tools/addtooldlg.ui b/parts/tools/addtooldlg.ui index 09fd5424..a1a6157e 100644 --- a/parts/tools/addtooldlg.ui +++ b/parts/tools/addtooldlg.ui @@ -159,7 +159,7 @@ executed.</p> The path and name of the application to execute - + tree @@ -179,7 +179,7 @@ executed.</p> - TDevApplicationTree + KDevApplicationTree
    kapplicationtree.h
    -1 diff --git a/parts/tools/addtooldlg.ui.h b/parts/tools/addtooldlg.ui.h index cabb91e7..fea69766 100644 --- a/parts/tools/addtooldlg.ui.h +++ b/parts/tools/addtooldlg.ui.h @@ -23,7 +23,7 @@ TQString AddToolDialog::getApp() void AddToolDialog::treeSelectionChanged( TQListViewItem * lvi ) { - TDevAppTreeListItem* item = dynamic_cast ( lvi ); + KDevAppTreeListItem* item = dynamic_cast ( lvi ); if ( !item || item->isDirectory() ) return; execEdit->setURL( item->executable() ); diff --git a/parts/tools/kapplicationtree.cpp b/parts/tools/kapplicationtree.cpp index 18e31265..8c13a4ea 100644 --- a/parts/tools/kapplicationtree.cpp +++ b/parts/tools/kapplicationtree.cpp @@ -1,5 +1,5 @@ /* This file is part of the KDE libraries - Nicked from KDElibs since TDevApplicationTree is not a public class.. + Nicked from KDElibs since KDevApplicationTree is not a public class.. Copyright (C) 1997 Torben Weis Copyright (C) 1999 Dirk A. Mueller @@ -65,7 +65,7 @@ template class TQPtrList; // ---------------------------------------------------------------------- -TDevAppTreeListItem::TDevAppTreeListItem( TDEListView* parent, const TQString & name, +KDevAppTreeListItem::KDevAppTreeListItem( TDEListView* parent, const TQString & name, const TQPixmap& pixmap, bool parse, bool dir, const TQString& p, const TQString& c, const TQString& dE ) : TQListViewItem( parent, name ) { @@ -75,7 +75,7 @@ TDevAppTreeListItem::TDevAppTreeListItem( TDEListView* parent, const TQString & // ---------------------------------------------------------------------- -TDevAppTreeListItem::TDevAppTreeListItem( TQListViewItem* parent, const TQString & name, +KDevAppTreeListItem::KDevAppTreeListItem( TQListViewItem* parent, const TQString & name, const TQPixmap& pixmap, bool parse, bool dir, const TQString& p, const TQString& c, const TQString& dE ) : TQListViewItem( parent, name ) { @@ -85,7 +85,7 @@ TDevAppTreeListItem::TDevAppTreeListItem( TQListViewItem* parent, const TQString // ---------------------------------------------------------------------- -void TDevAppTreeListItem::init(const TQPixmap& pixmap, bool parse, bool dir, const TQString& _path, const TQString& _exec, const TQString& _dEntry) +void KDevAppTreeListItem::init(const TQPixmap& pixmap, bool parse, bool dir, const TQString& _path, const TQString& _exec, const TQString& _dEntry) { setPixmap(0, pixmap); parsed = parse; @@ -101,7 +101,7 @@ void TDevAppTreeListItem::init(const TQPixmap& pixmap, bool parse, bool dir, con // ---------------------------------------------------------------------- // Ensure that dirs are sorted in front of files and case is ignored -TQString TDevAppTreeListItem::key(int column, bool /*ascending*/) const +TQString KDevAppTreeListItem::key(int column, bool /*ascending*/) const { if (directory) return TQString::fromLatin1(" ") + text(column).upper(); @@ -109,29 +109,29 @@ TQString TDevAppTreeListItem::key(int column, bool /*ascending*/) const return text(column).upper(); } -void TDevAppTreeListItem::activate() +void KDevAppTreeListItem::activate() { if ( directory ) setOpen(!isOpen()); } -void TDevAppTreeListItem::setOpen( bool o ) +void KDevAppTreeListItem::setOpen( bool o ) { if( o && !parsed ) { // fill the children before opening - ((TDevApplicationTree *) parent())->addDesktopGroup( path, this ); + ((KDevApplicationTree *) parent())->addDesktopGroup( path, this ); parsed = true; } TQListViewItem::setOpen( o ); } -bool TDevAppTreeListItem::isDirectory() +bool KDevAppTreeListItem::isDirectory() { return directory; } // ---------------------------------------------------------------------- -TDevApplicationTree::TDevApplicationTree( TQWidget *parent, const char* name ) +KDevApplicationTree::KDevApplicationTree( TQWidget *parent, const char* name ) : TDEListView( parent, name ), currentitem(0) { addColumn( i18n("Known Applications") ); @@ -145,7 +145,7 @@ TDevApplicationTree::TDevApplicationTree( TQWidget *parent, const char* name ) // ---------------------------------------------------------------------- -bool TDevApplicationTree::isDirSel() +bool KDevApplicationTree::isDirSel() { if (!currentitem) return false; // if currentitem isn't set return currentitem->isDirectory(); @@ -153,12 +153,12 @@ bool TDevApplicationTree::isDirSel() // ---------------------------------------------------------------------- -void TDevApplicationTree::addDesktopGroup( TQString relPath, TDevAppTreeListItem *item) +void KDevApplicationTree::addDesktopGroup( TQString relPath, KDevAppTreeListItem *item) { KServiceGroup::Ptr root = KServiceGroup::group(relPath); KServiceGroup::List list = root->entries(); - TDevAppTreeListItem * newItem; + KDevAppTreeListItem * newItem; for( KServiceGroup::List::ConstIterator it = list.begin(); it != list.end(); it++) { @@ -200,10 +200,10 @@ void TDevApplicationTree::addDesktopGroup( TQString relPath, TDevAppTreeListItem TQPixmap pixmap = SmallIcon( icon ); if (item) - newItem = new TDevAppTreeListItem( item, text, pixmap, false, isDir, + newItem = new KDevAppTreeListItem( item, text, pixmap, false, isDir, relPath, exec, dEntry ); else - newItem = new TDevAppTreeListItem( this, text, pixmap, false, isDir, + newItem = new KDevAppTreeListItem( this, text, pixmap, false, isDir, relPath, exec, dEntry ); if (isDir) newItem->setExpandable( true ); @@ -213,13 +213,13 @@ void TDevApplicationTree::addDesktopGroup( TQString relPath, TDevAppTreeListItem // ---------------------------------------------------------------------- -void TDevApplicationTree::slotItemHighlighted(TQListViewItem* i) +void KDevApplicationTree::slotItemHighlighted(TQListViewItem* i) { // i may be 0 (see documentation) if(!i) return; - TDevAppTreeListItem *item = (TDevAppTreeListItem *) i; + KDevAppTreeListItem *item = (KDevAppTreeListItem *) i; currentitem = item; @@ -230,13 +230,13 @@ void TDevApplicationTree::slotItemHighlighted(TQListViewItem* i) // ---------------------------------------------------------------------- -void TDevApplicationTree::slotSelectionChanged(TQListViewItem* i) +void KDevApplicationTree::slotSelectionChanged(TQListViewItem* i) { // i may be 0 (see documentation) if(!i) return; - TDevAppTreeListItem *item = (TDevAppTreeListItem *) i; + KDevAppTreeListItem *item = (KDevAppTreeListItem *) i; currentitem = item; @@ -246,7 +246,7 @@ void TDevApplicationTree::slotSelectionChanged(TQListViewItem* i) // ---------------------------------------------------------------------- -void TDevApplicationTree::resizeEvent( TQResizeEvent * e) +void KDevApplicationTree::resizeEvent( TQResizeEvent * e) { setColumnWidth(0, width()-TQApplication::style().pixelMetric(TQStyle::PM_ScrollBarExtent)); TDEListView::resizeEvent(e); diff --git a/parts/tools/kapplicationtree.h b/parts/tools/kapplicationtree.h index b45bbeac..0ba2cc9f 100644 --- a/parts/tools/kapplicationtree.h +++ b/parts/tools/kapplicationtree.h @@ -16,8 +16,8 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef __TDevApplicationTree_h__ -#define __TDevApplicationTree_h__ +#ifndef __KDevApplicationTree_h__ +#define __KDevApplicationTree_h__ #include #include @@ -36,7 +36,7 @@ class TQStringList; /** * @internal */ -class TDevAppTreeListItem : public TQListViewItem +class KDevAppTreeListItem : public TQListViewItem { bool parsed; bool directory; @@ -50,9 +50,9 @@ protected: void init(const TQPixmap& pixmap, bool parse, bool dir, const TQString& _path, const TQString& _exec, const TQString& _dEntry); public: - TDevAppTreeListItem( TDEListView* parent, const TQString & name, const TQPixmap& pixmap, + KDevAppTreeListItem( TDEListView* parent, const TQString & name, const TQPixmap& pixmap, bool parse, bool dir, const TQString& p, const TQString& c, const TQString& dE ); - TDevAppTreeListItem( TQListViewItem* parent, const TQString & name, const TQPixmap& pixmap, + KDevAppTreeListItem( TQListViewItem* parent, const TQString & name, const TQPixmap& pixmap, bool parse, bool dir, const TQString& p, const TQString& c, const TQString& dE ); bool isDirectory(); @@ -63,7 +63,7 @@ protected: virtual void activate(); virtual void setOpen( bool o ); - friend class TDevApplicationTree; + friend class KDevApplicationTree; }; /* ------------------------------------------------------------------------- */ @@ -71,23 +71,23 @@ protected: /** * @internal */ -class TDevApplicationTree : public TDEListView +class KDevApplicationTree : public TDEListView { Q_OBJECT public: - TDevApplicationTree( TQWidget *parent, const char* name = 0 ); + KDevApplicationTree( TQWidget *parent, const char* name = 0 ); /** * Add a group of .desktop/.kdelnk entries */ - void addDesktopGroup( TQString relPath, TDevAppTreeListItem *item = 0 ); + void addDesktopGroup( TQString relPath, KDevAppTreeListItem *item = 0 ); bool isDirSel(); protected: void resizeEvent( TQResizeEvent *_ev ); - TDevAppTreeListItem* currentitem; + KDevAppTreeListItem* currentitem; public slots: void slotItemHighlighted(TQListViewItem* i); diff --git a/parts/tools/tdevpart_tools.rc b/parts/tools/kdevpart_tools.rc similarity index 100% rename from parts/tools/tdevpart_tools.rc rename to parts/tools/kdevpart_tools.rc diff --git a/parts/tools/kdevtools.desktop b/parts/tools/kdevtools.desktop new file mode 100644 index 00000000..225b4b5f --- /dev/null +++ b/parts/tools/kdevtools.desktop @@ -0,0 +1,82 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=This plugin provides an easy way to add external applications to the Tools menu and toolbar. +Comment[ca]=Aquest connector proporciona un mètode fàcil per afegir aplicacions externes en el menú Eines i a la barra d'eines. +Comment[da]=Dette plugin sørger for en nem måde at tilføje eksterne programmer til værktøjsmenuen og værktøjslinjen. +Comment[de]=Dieses Modul erleichtert das Hinzufügen externer Anwendungen zum Menü "Werkzeuge" und in die Werkzeugleiste. +Comment[el]=Αυτό το πρόσθετο προσφέρει μια εύκολη μέθοδο για τη προσθήκη εξωτερικών εφαρμογών στο μενού εργαλείων και τη γραμμή εργαλείων. +Comment[es]=Este complemento proporciona un método sencillo para añadir aplicaciones externas en el menú de Herramientas y en la barra de herramientas. +Comment[et]=See plugin võimaldab hõlpsasti lisada väliseid rakendusi tööriistade menüüsse ja tööriistaribale. +Comment[eu]=Plugin honek kanpoko aplikazioak Tresnak menu eta tresna-barran erraz gehitzeko aukera eskeintzen du. +Comment[fa]=این وصله، راه آسانی را برای افزودن کاربردهای خارجی به گزینگان ابزار و میله ابزار فراهم می‌کند. +Comment[fr]=Ce module externe fournit un moyen facile d'ajouter des applications externes au menu « Outils » et à la barre d'outils. +Comment[gl]=Esta extensión proporciona un método sinxelo para engadir aplicacións externas ao menú Ferramentas e á barra de ferramentas. +Comment[hu]=Ez a bővítőmodul lehetővé teszi az Eszközök menü és az eszköztár egyszerű kibővítését +Comment[it]=Questo plugin offre un modo per aggiungere applicazioni esterne al menu o alla barra degli strumenti. +Comment[ja]=このプラグインはツールメニューやツールバーに外部のアプリケーションを追加する簡単な方法を提供します。 +Comment[ms]=Plugin ini menyediakan cara mudah untuk menambah aplikasi luaran ke menu Alatan dan bar alatan. +Comment[nds]=Mit dit Moduul laat sik extern Programmen eenfach na dat "Warktüüch"-Menü un den Warktüüchbalken tofögen. +Comment[ne]=यो प्लगइनले उपकरण मेनु र उपकरणपट्टीमा बाह्य अनुप्रयोग थप्न सजिलो तरिका प्रदान गर्दछ । +Comment[nl]=Met deze plugin kunt u op eenvoudige wijze externe toepassingen aan het menu Gereedschap en de werkbalk toevoegen. +Comment[pl]=Ta wtyczka umożliwia łatwe dodawanie zewnętrznych programów do menu Narzędzia i do paska narzędzi. +Comment[pt]=Este 'plugin' oferece uma forma simples de adicionar as aplicações externas ao menu Ferramentas e à barra de ferramentas. +Comment[pt_BR]=Este plug-in fornece uma maneira fácil de adicionar aplicativos externos ao menu Ferramentas e barra de ferramentas. +Comment[ru]=Предоставляет возможности добавления в меню пунктов вызова внешних приложений. +Comment[sk]=Modul poskytuje jednoduchý spôsob ako pridať externú aplikáciu do menu Nástroje a do panelu nástrojov. +Comment[sl]=Ta vstavek omogoča preprost način dodajanja zunanjih programov v meni Orodja in v orodjarno. +Comment[sr]=Овај прикључак обезбеђује лак начин за додавање спољних програма у мени „Алати“ и у траку са алатом. +Comment[sr@Latn]=Ovaj priključak obezbeđuje lak način za dodavanje spoljnih programa u meni „Alati“ i u traku sa alatom. +Comment[sv]=Insticksprogrammet tillhandahåller ett enkelt sätt att lägga till yttre program i verktygsmenyn och verktygsraden. +Comment[ta]=இந்த சொருகி கருவிப்பட்டியல் மற்றும் கருவிப்பட்டையில் வெளிபுற பயன்பாடு எளிய முறையில் சேர்க்கலாம். +Comment[tg]=Барои илова намудан дар меню нуқтаҳои ҷеғ задани гузоришҳои берунро имкон медиҳад. +Comment[zh_CN]=这个插件提供向工具菜单和工具栏添加外部程序的方法。 +Comment[zh_TW]=此外掛程式提供一個簡單的方式,將外部應用程式新增到工具選單與工具列中。 +Name=KDevTools +Name[da]=TDevelop Værktøjer +Name[de]="Werkzeug"-Menüerweiterung (TDevelop) +Name[hi]=के-डेव-टूल्स +Name[nds]=Warktüüch-Menüverwiedern (TDevelop) +Name[pl]=KDevNarzędzia +Name[sk]=KDev nástroje +Name[sv]=TDevelop verktyg +Name[ta]=KDev கருவிகள் +Name[tg]=Асбобҳои KDev +Name[zh_TW]=TDevelop 工具 +GenericName=Tools Menu Addition +GenericName[ca]=Afegiment al menú Eines +GenericName[da]=Værktøjsmenu tilføjelse +GenericName[de]="Werkzeuge"-Menüerweiterung +GenericName[el]=Προσθήκη μενού εργαλείων +GenericName[es]=Añadir al menú Herramientas +GenericName[et]=Tööriistade menüü lisamine +GenericName[eu]=Tresnak menuan gehitu +GenericName[fa]=افزودن گزینگان ابزار +GenericName[fr]=Ajout au menu « Outils » +GenericName[gl]=Engadidos ao menú Ferramentas +GenericName[hu]=Bővítés az Eszközök menühöz +GenericName[it]=Aggiunte al menu Strumenti +GenericName[ja]=ツールメニュー追加 +GenericName[nds]=Warktüüch-Menüverwiedern +GenericName[ne]=उपकरण मेनु अतिरिक्त +GenericName[nl]=Gereedschapsmenu-toevoeging +GenericName[pl]=Dodatek do menu Narzędzia +GenericName[pt]=Adicionar ao Menu de Ferramentas +GenericName[pt_BR]=Adição ao Menu Ferramentas +GenericName[ru]=Дополнение меню инструментов +GenericName[sk]=Prídavky menu Nástroje +GenericName[sl]=Dodatek menija orodij +GenericName[sr]=Додаци менију „Алати“ +GenericName[sr@Latn]=Dodaci meniju „Alati“ +GenericName[sv]=Tillägg i verktygsmenyn +GenericName[ta]=கருவிப்பட்டியல் சேர்ப்பு +GenericName[tg]=Асбобҳои иловагии меню +GenericName[tr]=Araçlar Menü Eklemesi +GenericName[zh_CN]=工具菜单附加 +GenericName[zh_TW]=新增工具選單 +Icon=configure +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevtools +X-TDevelop-Version=5 +X-TDevelop-Scope=Global +X-TDevelop-Properties=AdditionalTools diff --git a/parts/tools/tdevtools.desktop b/parts/tools/tdevtools.desktop deleted file mode 100644 index 3b7e8272..00000000 --- a/parts/tools/tdevtools.desktop +++ /dev/null @@ -1,82 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=This plugin provides an easy way to add external applications to the Tools menu and toolbar. -Comment[ca]=Aquest connector proporciona un mètode fàcil per afegir aplicacions externes en el menú Eines i a la barra d'eines. -Comment[da]=Dette plugin sørger for en nem måde at tilføje eksterne programmer til værktøjsmenuen og værktøjslinjen. -Comment[de]=Dieses Modul erleichtert das Hinzufügen externer Anwendungen zum Menü "Werkzeuge" und in die Werkzeugleiste. -Comment[el]=Αυτό το πρόσθετο προσφέρει μια εύκολη μέθοδο για τη προσθήκη εξωτερικών εφαρμογών στο μενού εργαλείων και τη γραμμή εργαλείων. -Comment[es]=Este complemento proporciona un método sencillo para añadir aplicaciones externas en el menú de Herramientas y en la barra de herramientas. -Comment[et]=See plugin võimaldab hõlpsasti lisada väliseid rakendusi tööriistade menüüsse ja tööriistaribale. -Comment[eu]=Plugin honek kanpoko aplikazioak Tresnak menu eta tresna-barran erraz gehitzeko aukera eskeintzen du. -Comment[fa]=این وصله، راه آسانی را برای افزودن کاربردهای خارجی به گزینگان ابزار و میله ابزار فراهم می‌کند. -Comment[fr]=Ce module externe fournit un moyen facile d'ajouter des applications externes au menu « Outils » et à la barre d'outils. -Comment[gl]=Esta extensión proporciona un método sinxelo para engadir aplicacións externas ao menú Ferramentas e á barra de ferramentas. -Comment[hu]=Ez a bővítőmodul lehetővé teszi az Eszközök menü és az eszköztár egyszerű kibővítését -Comment[it]=Questo plugin offre un modo per aggiungere applicazioni esterne al menu o alla barra degli strumenti. -Comment[ja]=このプラグインはツールメニューやツールバーに外部のアプリケーションを追加する簡単な方法を提供します。 -Comment[ms]=Plugin ini menyediakan cara mudah untuk menambah aplikasi luaran ke menu Alatan dan bar alatan. -Comment[nds]=Mit dit Moduul laat sik extern Programmen eenfach na dat "Warktüüch"-Menü un den Warktüüchbalken tofögen. -Comment[ne]=यो प्लगइनले उपकरण मेनु र उपकरणपट्टीमा बाह्य अनुप्रयोग थप्न सजिलो तरिका प्रदान गर्दछ । -Comment[nl]=Met deze plugin kunt u op eenvoudige wijze externe toepassingen aan het menu Gereedschap en de werkbalk toevoegen. -Comment[pl]=Ta wtyczka umożliwia łatwe dodawanie zewnętrznych programów do menu Narzędzia i do paska narzędzi. -Comment[pt]=Este 'plugin' oferece uma forma simples de adicionar as aplicações externas ao menu Ferramentas e à barra de ferramentas. -Comment[pt_BR]=Este plug-in fornece uma maneira fácil de adicionar aplicativos externos ao menu Ferramentas e barra de ferramentas. -Comment[ru]=Предоставляет возможности добавления в меню пунктов вызова внешних приложений. -Comment[sk]=Modul poskytuje jednoduchý spôsob ako pridať externú aplikáciu do menu Nástroje a do panelu nástrojov. -Comment[sl]=Ta vstavek omogoča preprost način dodajanja zunanjih programov v meni Orodja in v orodjarno. -Comment[sr]=Овај прикључак обезбеђује лак начин за додавање спољних програма у мени „Алати“ и у траку са алатом. -Comment[sr@Latn]=Ovaj priključak obezbeđuje lak način za dodavanje spoljnih programa u meni „Alati“ i u traku sa alatom. -Comment[sv]=Insticksprogrammet tillhandahåller ett enkelt sätt att lägga till yttre program i verktygsmenyn och verktygsraden. -Comment[ta]=இந்த சொருகி கருவிப்பட்டியல் மற்றும் கருவிப்பட்டையில் வெளிபுற பயன்பாடு எளிய முறையில் சேர்க்கலாம். -Comment[tg]=Барои илова намудан дар меню нуқтаҳои ҷеғ задани гузоришҳои берунро имкон медиҳад. -Comment[zh_CN]=这个插件提供向工具菜单和工具栏添加外部程序的方法。 -Comment[zh_TW]=此外掛程式提供一個簡單的方式,將外部應用程式新增到工具選單與工具列中。 -Name=KDevTools -Name[da]=TDevelop Værktøjer -Name[de]="Werkzeug"-Menüerweiterung (TDevelop) -Name[hi]=के-डेव-टूल्स -Name[nds]=Warktüüch-Menüverwiedern (TDevelop) -Name[pl]=KDevNarzędzia -Name[sk]=KDev nástroje -Name[sv]=TDevelop verktyg -Name[ta]=KDev கருவிகள் -Name[tg]=Асбобҳои KDev -Name[zh_TW]=TDevelop 工具 -GenericName=Tools Menu Addition -GenericName[ca]=Afegiment al menú Eines -GenericName[da]=Værktøjsmenu tilføjelse -GenericName[de]="Werkzeuge"-Menüerweiterung -GenericName[el]=Προσθήκη μενού εργαλείων -GenericName[es]=Añadir al menú Herramientas -GenericName[et]=Tööriistade menüü lisamine -GenericName[eu]=Tresnak menuan gehitu -GenericName[fa]=افزودن گزینگان ابزار -GenericName[fr]=Ajout au menu « Outils » -GenericName[gl]=Engadidos ao menú Ferramentas -GenericName[hu]=Bővítés az Eszközök menühöz -GenericName[it]=Aggiunte al menu Strumenti -GenericName[ja]=ツールメニュー追加 -GenericName[nds]=Warktüüch-Menüverwiedern -GenericName[ne]=उपकरण मेनु अतिरिक्त -GenericName[nl]=Gereedschapsmenu-toevoeging -GenericName[pl]=Dodatek do menu Narzędzia -GenericName[pt]=Adicionar ao Menu de Ferramentas -GenericName[pt_BR]=Adição ao Menu Ferramentas -GenericName[ru]=Дополнение меню инструментов -GenericName[sk]=Prídavky menu Nástroje -GenericName[sl]=Dodatek menija orodij -GenericName[sr]=Додаци менију „Алати“ -GenericName[sr@Latn]=Dodaci meniju „Alati“ -GenericName[sv]=Tillägg i verktygsmenyn -GenericName[ta]=கருவிப்பட்டியல் சேர்ப்பு -GenericName[tg]=Асбобҳои иловагии меню -GenericName[tr]=Araçlar Menü Eklemesi -GenericName[zh_CN]=工具菜单附加 -GenericName[zh_TW]=新增工具選單 -Icon=configure -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevtools -X-TDevelop-Version=5 -X-TDevelop-Scope=Global -X-TDevelop-Properties=AdditionalTools diff --git a/parts/tools/tools_part.cpp b/parts/tools/tools_part.cpp index c6e4a242..8734eadc 100644 --- a/parts/tools/tools_part.cpp +++ b/parts/tools/tools_part.cpp @@ -19,14 +19,14 @@ #include #include -#include "tdevcore.h" -#include "tdevproject.h" -#include "tdevpartcontroller.h" -#include "tdevappfrontend.h" -#include "tdevplugininfo.h" +#include "kdevcore.h" +#include "kdevproject.h" +#include "kdevpartcontroller.h" +#include "kdevappfrontend.h" +#include "kdevplugininfo.h" #include "urlutil.h" #include "configwidgetproxy.h" -#include "tdeveditorutil.h" +#include "kdeveditorutil.h" #include "toolsconfig.h" #include "toolsconfigwidget.h" @@ -34,17 +34,17 @@ #define TOOLSSETTINGS 1 #define EXTRATOOLSSETTINGS 2 -static const TDevPluginInfo data("tdevtools"); -K_EXPORT_COMPONENT_FACTORY( libtdevtools, ToolsFactory( data ) ) +static const KDevPluginInfo data("kdevtools"); +K_EXPORT_COMPONENT_FACTORY( libkdevtools, ToolsFactory( data ) ) TQMap externalToolMenuEntries; ToolsPart::ToolsPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin( &data, parent, name ? name : "ToolsPart") + : KDevPlugin( &data, parent, name ? name : "ToolsPart") { setInstance(ToolsFactory::instance()); - setXMLFile("tdevpart_tools.rc"); + setXMLFile("kdevpart_tools.rc"); m_configProxy = new ConfigWidgetProxy( core() ); m_configProxy->createGlobalConfigPage( i18n("Tools Menu"), TOOLSSETTINGS, info()->icon() ); @@ -128,11 +128,11 @@ void ToolsPart::startCommand(TQString cmdline, bool captured, TQString fileName) if (project()) projectDirectory = project()->projectDirectory(); - TQString selection = TDevEditorUtil::currentSelection( doc ); + TQString selection = KDevEditorUtil::currentSelection( doc ); if ( !selection.isEmpty() ) selection = KShellProcess::quote( selection ); - TQString word = TDevEditorUtil::currentWord( doc ); + TQString word = KDevEditorUtil::currentWord( doc ); // This should really be checked before inserting into the popup if (cmdline.contains("%D") && projectDirectory.isNull()) @@ -153,7 +153,7 @@ void ToolsPart::startCommand(TQString cmdline, bool captured, TQString fileName) if (captured) { - if (TDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) + if (KDevAppFrontend *appFrontend = extension("TDevelop/AppFrontend")) appFrontend->startAppCommand(TQString(), cmdline, false); } else diff --git a/parts/tools/tools_part.h b/parts/tools/tools_part.h index 4eeaf0e1..20af2ea8 100644 --- a/parts/tools/tools_part.h +++ b/parts/tools/tools_part.h @@ -3,13 +3,13 @@ */ -#ifndef __TDEVPART_TOOLS_H__ -#define __TDEVPART_TOOLS_H__ +#ifndef __KDEVPART_TOOLS_H__ +#define __KDEVPART_TOOLS_H__ #include -#include -#include +#include +#include class TQPopupMenu; @@ -20,7 +20,7 @@ class ConfigWidgetProxy; class ToolsWidget; -class ToolsPart : public TDevPlugin +class ToolsPart : public KDevPlugin { Q_OBJECT @@ -51,6 +51,6 @@ private: ConfigWidgetProxy * m_configProxy; }; -typedef TDevGenericFactory ToolsFactory; +typedef KDevGenericFactory ToolsFactory; #endif diff --git a/parts/tools/toolsconfig.cpp b/parts/tools/toolsconfig.cpp index 8d689f40..f21713e9 100644 --- a/parts/tools/toolsconfig.cpp +++ b/parts/tools/toolsconfig.cpp @@ -35,7 +35,7 @@ void ToolsConfig::showEvent(TQShowEvent *e) TQHBoxLayout *hbox = new TQHBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint()); TQVBoxLayout *vbox = new TQVBoxLayout(hbox); - _tree = new TDevApplicationTree(this); + _tree = new KDevApplicationTree(this); _tree->header()->hide(); TQLabel *l = new TQLabel(_tree, i18n("&Applications:"), this); l->show(); @@ -121,7 +121,7 @@ void ToolsConfig::add(const TQString &desktopFile) void ToolsConfig::toList() { - TDevAppTreeListItem *item = dynamic_cast(_tree->selectedItem()); + KDevAppTreeListItem *item = dynamic_cast(_tree->selectedItem()); if (item && !item->desktopEntryPath().isEmpty()) add(item->desktopEntryPath()); checkButtons(); diff --git a/parts/tools/toolsconfig.h b/parts/tools/toolsconfig.h index 23081676..074d5900 100644 --- a/parts/tools/toolsconfig.h +++ b/parts/tools/toolsconfig.h @@ -9,7 +9,7 @@ class TQListBox; class TQPushButton; -class TDevApplicationTree; +class KDevApplicationTree; class Entry { @@ -60,7 +60,7 @@ private slots: private: - TDevApplicationTree *_tree; + KDevApplicationTree *_tree; TQListBox *_list; TQPushButton *_toList, *_toTree; diff --git a/parts/uimode/CMakeLists.txt b/parts/uimode/CMakeLists.txt index 0eaa5ff6..478a4103 100644 --- a/parts/uimode/CMakeLists.txt +++ b/parts/uimode/CMakeLists.txt @@ -26,12 +26,12 @@ link_directories( ##### other data ################################ -install( FILES tdevuichooser.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevuichooser.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevuichooser (module) ################# +##### libkdevuichooser (module) ################# -tde_add_kpart( libtdevuichooser AUTOMOC +tde_add_kpart( libkdevuichooser AUTOMOC SOURCES uichooser_part.cpp uichooser.ui uichooser_widget.cpp LINK tdevelop-shared diff --git a/parts/uimode/Makefile.am b/parts/uimode/Makefile.am index df7ddba9..00792790 100644 --- a/parts/uimode/Makefile.am +++ b/parts/uimode/Makefile.am @@ -1,13 +1,13 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevuichooser.la -libtdevuichooser_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevuichooser_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevuichooser.la +libkdevuichooser_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevuichooser_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevuichooser_la_SOURCES = uichooser_part.cpp uichooser.ui uichooser_widget.cpp +libkdevuichooser_la_SOURCES = uichooser_part.cpp uichooser.ui uichooser_widget.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevuichooser.desktop +service_DATA = kdevuichooser.desktop diff --git a/parts/uimode/kdevuichooser.desktop b/parts/uimode/kdevuichooser.desktop new file mode 100644 index 00000000..afb21a50 --- /dev/null +++ b/parts/uimode/kdevuichooser.desktop @@ -0,0 +1,87 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Provides a dialog for UI-mode selection. +Comment[ca]=Proporciona un diàleg per a la selecció del mode de la interfície d'usuari. +Comment[da]=Sørger for en dialog for valg af brugergrænsefladetilstand. +Comment[de]=Stellt einen Dialog für die Auswahl des Fenstermodus zur Verfügung. +Comment[el]=Προσφέρει ένα διάλογο για την επιλογή της λειτουργίας του περιβάλλοντος χρήστη. +Comment[en_GB]=Provides a dialogue for UI-mode selection. +Comment[es]=Proporciona un diálogo para la selección del modo de la interfaz de usuario. +Comment[et]=Pakub dialoogi kasutajaliidese režiimi valikuks. +Comment[eu]=UI-modu hautapenerako elkarrizketa-koadroa eskeintzen du. +Comment[fa]=محاوره‌ای برای گزینش حالت UI فراهم‌ می‌کند. +Comment[fr]=Fournit une boîte de dialogue pour la sélection du mode d'interface graphique. +Comment[gl]=Proporciona un diálogo para a selección do modo da interface de usuario +Comment[hi]=यूआई-मोड चयन के लिए एक संवाद प्रदान करता है. +Comment[hu]=Párbeszédablak a grafikus felület kiválasztásához +Comment[it]=Fornisce una maschera per scegliere la modalità UI. +Comment[ja]=UI モード選択のためのダイアログを提供します。 +Comment[ms]=Menyediakan dialok untuk pemilihan mod-UI. +Comment[nds]=Stellt en Dialoog för de Böversiedenutwahl praat. +Comment[ne]=UI-मोड चयनका लागि संवाद प्रदान गर्दछ +Comment[nl]=Biedt een dialoog voor het selecteren van een UI-modus. +Comment[pl]=Udostępnienie okna dialogowego do wyboru trybu interfejsu. +Comment[pt]=Oferece uma janela para a selecção do modo de UI. +Comment[pt_BR]=Fornece um diálogo para seleção modo-UI. +Comment[ru]=Предоставляет диалог выбора режима интерфейса пользователя. +Comment[sk]=Poskytuje dialóg pre voľbu UI módu. +Comment[sl]=Prikazuje okno za izbiro načina uporabniškega vmesnika. +Comment[sr]=Обезбеђује прозор за избор UI режима. +Comment[sr@Latn]=Obezbeđuje prozor za izbor UI režima. +Comment[sv]=Tillhandahåller en dialogruta för att välja läge för det grafiska gränssnittet. +Comment[ta]=UI-பாங்கு தேர்வுக்காக உரையாடல் பெட்டி வரும். +Comment[tg]=Барои интихоб намудани тартиботи истифодабарандаи интерфейс имкон медиҳад. +Comment[tr]=Arayüz-modu seçim için bir pencere sunar. +Comment[zh_CN]=提供用户界面模式选择对话框 +Comment[zh_TW]=提供使用者介面模式選擇對話框 +Name=KDevUIChooser +Name[da]=TDevelop brugergrænsefladevælger +Name[de]=Fenstermodusauswahl (TDevelop) +Name[hi]=के-डेव-यूआई-चूज़र +Name[nds]=TDevelop-Böversietutwahl +Name[pl]=KDevWybórInterfUżytk +Name[sk]=KDev voľba UI +Name[sv]=TDevelop gränssnittsväljare +Name[ta]=KDevUI தேர்வாளர் +Name[tg]=KDevUIИнтихобкунанда +Name[zh_TW]=TDevelop 使用者介面選擇器 +GenericName=User-Interface Selection +GenericName[ca]=Selecció de la interfície d'usuari +GenericName[da]=Valg af brugergrænseflade +GenericName[de]=Fenstermodusauswahl +GenericName[el]=Επιλογή περιβάλλοντος χρήστη +GenericName[es]=Selección de la interfaz de usuario +GenericName[et]=Kasutajaliidese valimine +GenericName[eu]=Erabiltzaile-interfaze hautapena +GenericName[fa]=گزینش واسط کاربر +GenericName[fr]=Sélection de l'interface utilisateur +GenericName[gl]=Selección da interface de usuario +GenericName[hi]=उपयोक्ता-इंटरफ़ेस चयन +GenericName[hu]=A felhasználói felület kiválasztása +GenericName[it]=Selezione dell'interfaccia utente +GenericName[ja]=ユーザインターフェース選択 +GenericName[nds]=Bruker-Koppelsteedutwahl +GenericName[ne]=प्रयोगकर्ता-इन्टरफेस चयन +GenericName[nl]=Gebruikersinterface selectie +GenericName[pl]=Wybór interfejsu użytkownika +GenericName[pt]=Selecção da Interface de Utilizador +GenericName[pt_BR]=Seleção de Interface-Usuário +GenericName[ru]=Выбор интерфейса пользователя +GenericName[sk]=Voľba užívateľského rozhrania +GenericName[sl]=Izbira uporabniškega vmesnika +GenericName[sr]=Избор корисничког интерфејса +GenericName[sr@Latn]=Izbor korisničkog interfejsa +GenericName[sv]=Användargränssnittsval +GenericName[ta]=பயனரின்-இடைமுக தேர்வு +GenericName[tg]=Интихоби интерфейси истифодабаранда +GenericName[tr]=Kullanıcı Arayüzü Seçimi +GenericName[zh_CN]=用户界面选择 +GenericName[zh_TW]=使用者介面選擇器 +Icon=view_choose +ServiceTypes=TDevelop/Plugin +X-TDE-Library=libkdevuichooser +X-TDevelop-Version=5 +X-TDevelop-Scope=Core +X-TDevelop-Mode=AssistantMode +X-TDevelop-Properties=UISwitching diff --git a/parts/uimode/tdevuichooser.desktop b/parts/uimode/tdevuichooser.desktop deleted file mode 100644 index 65faa5be..00000000 --- a/parts/uimode/tdevuichooser.desktop +++ /dev/null @@ -1,87 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Provides a dialog for UI-mode selection. -Comment[ca]=Proporciona un diàleg per a la selecció del mode de la interfície d'usuari. -Comment[da]=Sørger for en dialog for valg af brugergrænsefladetilstand. -Comment[de]=Stellt einen Dialog für die Auswahl des Fenstermodus zur Verfügung. -Comment[el]=Προσφέρει ένα διάλογο για την επιλογή της λειτουργίας του περιβάλλοντος χρήστη. -Comment[en_GB]=Provides a dialogue for UI-mode selection. -Comment[es]=Proporciona un diálogo para la selección del modo de la interfaz de usuario. -Comment[et]=Pakub dialoogi kasutajaliidese režiimi valikuks. -Comment[eu]=UI-modu hautapenerako elkarrizketa-koadroa eskeintzen du. -Comment[fa]=محاوره‌ای برای گزینش حالت UI فراهم‌ می‌کند. -Comment[fr]=Fournit une boîte de dialogue pour la sélection du mode d'interface graphique. -Comment[gl]=Proporciona un diálogo para a selección do modo da interface de usuario -Comment[hi]=यूआई-मोड चयन के लिए एक संवाद प्रदान करता है. -Comment[hu]=Párbeszédablak a grafikus felület kiválasztásához -Comment[it]=Fornisce una maschera per scegliere la modalità UI. -Comment[ja]=UI モード選択のためのダイアログを提供します。 -Comment[ms]=Menyediakan dialok untuk pemilihan mod-UI. -Comment[nds]=Stellt en Dialoog för de Böversiedenutwahl praat. -Comment[ne]=UI-मोड चयनका लागि संवाद प्रदान गर्दछ -Comment[nl]=Biedt een dialoog voor het selecteren van een UI-modus. -Comment[pl]=Udostępnienie okna dialogowego do wyboru trybu interfejsu. -Comment[pt]=Oferece uma janela para a selecção do modo de UI. -Comment[pt_BR]=Fornece um diálogo para seleção modo-UI. -Comment[ru]=Предоставляет диалог выбора режима интерфейса пользователя. -Comment[sk]=Poskytuje dialóg pre voľbu UI módu. -Comment[sl]=Prikazuje okno za izbiro načina uporabniškega vmesnika. -Comment[sr]=Обезбеђује прозор за избор UI режима. -Comment[sr@Latn]=Obezbeđuje prozor za izbor UI režima. -Comment[sv]=Tillhandahåller en dialogruta för att välja läge för det grafiska gränssnittet. -Comment[ta]=UI-பாங்கு தேர்வுக்காக உரையாடல் பெட்டி வரும். -Comment[tg]=Барои интихоб намудани тартиботи истифодабарандаи интерфейс имкон медиҳад. -Comment[tr]=Arayüz-modu seçim için bir pencere sunar. -Comment[zh_CN]=提供用户界面模式选择对话框 -Comment[zh_TW]=提供使用者介面模式選擇對話框 -Name=KDevUIChooser -Name[da]=TDevelop brugergrænsefladevælger -Name[de]=Fenstermodusauswahl (TDevelop) -Name[hi]=के-डेव-यूआई-चूज़र -Name[nds]=TDevelop-Böversietutwahl -Name[pl]=KDevWybórInterfUżytk -Name[sk]=KDev voľba UI -Name[sv]=TDevelop gränssnittsväljare -Name[ta]=KDevUI தேர்வாளர் -Name[tg]=KDevUIИнтихобкунанда -Name[zh_TW]=TDevelop 使用者介面選擇器 -GenericName=User-Interface Selection -GenericName[ca]=Selecció de la interfície d'usuari -GenericName[da]=Valg af brugergrænseflade -GenericName[de]=Fenstermodusauswahl -GenericName[el]=Επιλογή περιβάλλοντος χρήστη -GenericName[es]=Selección de la interfaz de usuario -GenericName[et]=Kasutajaliidese valimine -GenericName[eu]=Erabiltzaile-interfaze hautapena -GenericName[fa]=گزینش واسط کاربر -GenericName[fr]=Sélection de l'interface utilisateur -GenericName[gl]=Selección da interface de usuario -GenericName[hi]=उपयोक्ता-इंटरफ़ेस चयन -GenericName[hu]=A felhasználói felület kiválasztása -GenericName[it]=Selezione dell'interfaccia utente -GenericName[ja]=ユーザインターフェース選択 -GenericName[nds]=Bruker-Koppelsteedutwahl -GenericName[ne]=प्रयोगकर्ता-इन्टरफेस चयन -GenericName[nl]=Gebruikersinterface selectie -GenericName[pl]=Wybór interfejsu użytkownika -GenericName[pt]=Selecção da Interface de Utilizador -GenericName[pt_BR]=Seleção de Interface-Usuário -GenericName[ru]=Выбор интерфейса пользователя -GenericName[sk]=Voľba užívateľského rozhrania -GenericName[sl]=Izbira uporabniškega vmesnika -GenericName[sr]=Избор корисничког интерфејса -GenericName[sr@Latn]=Izbor korisničkog interfejsa -GenericName[sv]=Användargränssnittsval -GenericName[ta]=பயனரின்-இடைமுக தேர்வு -GenericName[tg]=Интихоби интерфейси истифодабаранда -GenericName[tr]=Kullanıcı Arayüzü Seçimi -GenericName[zh_CN]=用户界面选择 -GenericName[zh_TW]=使用者介面選擇器 -Icon=view_choose -ServiceTypes=TDevelop/Plugin -X-TDE-Library=libtdevuichooser -X-TDevelop-Version=5 -X-TDevelop-Scope=Core -X-TDevelop-Mode=AssistantMode -X-TDevelop-Properties=UISwitching diff --git a/parts/uimode/uichooser_part.cpp b/parts/uimode/uichooser_part.cpp index 5795d829..fdc9fa6a 100644 --- a/parts/uimode/uichooser_part.cpp +++ b/parts/uimode/uichooser_part.cpp @@ -3,23 +3,23 @@ #include #include -#include +#include #include #include -#include +#include #include -#include +#include #include "uichooser_widget.h" #define UICHOOSERSETTINGSPAGE 1 -typedef TDevGenericFactory UIChooserFactory; -static const TDevPluginInfo data("tdevuichooser"); -K_EXPORT_COMPONENT_FACTORY( libtdevuichooser, UIChooserFactory( data ) ) +typedef KDevGenericFactory UIChooserFactory; +static const KDevPluginInfo data("kdevuichooser"); +K_EXPORT_COMPONENT_FACTORY( libkdevuichooser, UIChooserFactory( data ) ) UIChooserPart::UIChooserPart(TQObject *parent, const char *name, const TQStringList &) - : TDevPlugin( &data, parent, name ? name : "UIChooserPart") + : KDevPlugin( &data, parent, name ? name : "UIChooserPart") { setInstance(UIChooserFactory::instance()); diff --git a/parts/uimode/uichooser_part.h b/parts/uimode/uichooser_part.h index e86f9211..ff822e1d 100644 --- a/parts/uimode/uichooser_part.h +++ b/parts/uimode/uichooser_part.h @@ -3,16 +3,16 @@ */ -#ifndef __TDEVPART_UICHOOSER_H__ -#define __TDEVPART_UICHOOSER_H__ +#ifndef __KDEVPART_UICHOOSER_H__ +#define __KDEVPART_UICHOOSER_H__ class KDialogBase; class ConfigWidgetProxy; -#include +#include -class UIChooserPart : public TDevPlugin +class UIChooserPart : public KDevPlugin { Q_OBJECT diff --git a/parts/uimode/uichooser_widget.cpp b/parts/uimode/uichooser_widget.cpp index d70d648d..cb75ec02 100644 --- a/parts/uimode/uichooser_widget.cpp +++ b/parts/uimode/uichooser_widget.cpp @@ -24,7 +24,7 @@ #include #include "uichooser_part.h" -#include "tdevmainwindow.h" +#include "kdevmainwindow.h" #include "uichooser_widget.h" UIChooserWidget::UIChooserWidget( UIChooserPart * part, TQWidget *parent, const char *name) diff --git a/parts/valgrind/CMakeLists.txt b/parts/valgrind/CMakeLists.txt index 611aa4ec..9c32760f 100644 --- a/parts/valgrind/CMakeLists.txt +++ b/parts/valgrind/CMakeLists.txt @@ -26,13 +26,13 @@ link_directories( ##### other data ################################ -install( FILES tdevvalgrind.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdevpart_valgrind.rc DESTINATION ${DATA_INSTALL_DIR}/tdevvalgrind ) +install( FILES kdevvalgrind.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevpart_valgrind.rc DESTINATION ${DATA_INSTALL_DIR}/kdevvalgrind ) -##### libtdevvalgrind (module) ################## +##### libkdevvalgrind (module) ################## -tde_add_kpart( libtdevvalgrind AUTOMOC +tde_add_kpart( libkdevvalgrind AUTOMOC SOURCES dialog_widget.ui valgrind_part.cpp valgrind_widget.cpp valgrind_dialog.cpp valgrinditem.cpp diff --git a/parts/valgrind/Makefile.am b/parts/valgrind/Makefile.am index 6e9e89c0..e0cd6536 100644 --- a/parts/valgrind/Makefile.am +++ b/parts/valgrind/Makefile.am @@ -1,15 +1,15 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevvalgrind.la -libtdevvalgrind_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevvalgrind_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevvalgrind.la +libkdevvalgrind_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevvalgrind_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevvalgrind_la_SOURCES = dialog_widget.ui valgrind_part.cpp valgrind_widget.cpp valgrind_dialog.cpp valgrinditem.cpp +libkdevvalgrind_la_SOURCES = dialog_widget.ui valgrind_part.cpp valgrind_widget.cpp valgrind_dialog.cpp valgrinditem.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevvalgrind.desktop +service_DATA = kdevvalgrind.desktop -rcdir = $(kde_datadir)/tdevvalgrind -rc_DATA = tdevpart_valgrind.rc +rcdir = $(kde_datadir)/kdevvalgrind +rc_DATA = kdevpart_valgrind.rc diff --git a/parts/valgrind/tdevpart_valgrind.rc b/parts/valgrind/kdevpart_valgrind.rc similarity index 100% rename from parts/valgrind/tdevpart_valgrind.rc rename to parts/valgrind/kdevpart_valgrind.rc diff --git a/parts/valgrind/kdevvalgrind.desktop b/parts/valgrind/kdevvalgrind.desktop new file mode 100644 index 00000000..e2142182 --- /dev/null +++ b/parts/valgrind/kdevvalgrind.desktop @@ -0,0 +1,74 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Valgrind is a tool that helps you find memory management problems in programs. http://valgrind.org/ +Comment[ca]=Valgrind és una eina que us ajuda a trobar problemes en la gestió de la memòria en els programes. http://valgrind.org/ +Comment[da]=Valgrind er et værktøj der hjælper dig med at finde hukommelseshåndteringsproblemer i programmer. http://valgrind.org/ +Comment[de]=Valgrind ist ein Werkzeug zum Auffinden von Speicherverwaltungsproblemen in Anwendungen. http://valgrind.org/ +Comment[el]=Το Valgrind είναι ένα εργαλείο που βοηθά στην εύρεση προβλημάτων διαχείρισης μνήμης στα προγράμματα. http://valgrind.org/ +Comment[es]=Valgrind es una herramienta que le ayuda a encontrar problemas de gestión de memoria en los programas. http://valgrind.org/ +Comment[et]=Valgrind aitab leida programmides mälulekkeid ja muid mäluga seotud asju. http://valgrind.org/ +Comment[fr]=Valgrind est un outil qui vous aide à trouver les problèmes de gestion de la mémoire dans les programmes. http://valgrind.org/ +Comment[hu]=A Valgrind memóriakezelési hibák keresésére alkalmas program - http://valgrind.org +Comment[it]=Valgrind è uno strumento che ti aiuta a trovare problemi di gestione della memoria nei programmi. http://valgrind.org/ +Comment[ja]=Valgrind は、プログラム内のメモリ管理問題を発見することを手助けするツールです。http://valgrind.org/ +Comment[ms]=Valgrind adalah alatan yang membantu anda mencari masalah pengurusan memori dalam program. http://valgrind.org/ +Comment[nds]=Valgrind is en Warktüüch för't Finnen vun t Spiekerpleegproblemen in Programmen. http://valgrind.org/ +Comment[nl]=Valgrind is een hulpprogramma dat u helpt bij het opsporen van geheugenproblemen in programma's. http://valgrind.org/ +Comment[pl]=Valgrind jest narzędziem pomagającym znaleźć w programach problemy z zarządzaniem pamięcią. http://valgrind.org/ +Comment[pt]=O Valgrind é uma ferramenta que o ajuda a descobrir os problemas de gestão de memória nos programas. http://www.valgrind.org/ +Comment[pt_BR]=Valgrind é uma ferramenta ajuda você a encontrar problemas de gerenciamento de memória nos programas. http://www.valgrind.org/ +Comment[ru]=Valgrind - средство нахождения проблем управления памятью в программах. http://valgrind.org/ +Comment[sk]=Valgrind je nástroj, ktorý pomáha nájsť problémy so správou pamäte v programoch. http://valgrind.org/ +Comment[sr]=Valgrind је алат који вам помаже да нађете проблеме са употребом меморије у програмима. http://valgrind.org/ +Comment[sr@Latn]=Valgrind je alat koji vam pomaže da nađete probleme sa upotrebom memorije u programima. http://valgrind.org/ +Comment[sv]=Valgrind är ett verktyg som hjälper dig hitta minneshanteringsproblem i program. Se http://valgrind.org/. +Comment[zh_TW]=Valgrind 能協助您找到程式中記憶體管理上的問題。http://valgrind.org/ +Name=KDevvalgrind +Name[da]=TDevelop Valgrind +Name[de]=Unterstützung für Valgrind (TDevelop) +Name[hi]=के-डेववेलग्रिंड +Name[nds]=Ünnerstütten för Valgrind (TDevelop) +Name[sk]=KDev valgrind +Name[sv]=TDevelop valgrind +Name[zh_TW]=TDevelop Valgrind +GenericName=Valgrind Frontend +GenericName[ca]=Entorn per a Valgrind +GenericName[da]=Valgrind-grænseflade +GenericName[de]=Oberfläche für Valgrind +GenericName[el]=Πρόγραμμα Valgrind +GenericName[es]=Interfaz para Valgrind +GenericName[et]=Valgrindi kasutajaliides +GenericName[eu]=Valgrind interfazea +GenericName[fa]=پایانۀ Valgrind +GenericName[fr]=Interface de Valgrind +GenericName[ga]=Comhéadan Valgrind +GenericName[gl]=Frontal para Valgrind +GenericName[hi]=वेलग्रिन्ड फ्रन्टएण्ड +GenericName[hu]=Valgrind-kezelő +GenericName[it]=Interfaccia a Valgrind +GenericName[ja]=Valgrind フロントエンド +GenericName[ms]=Frontend Valgrind +GenericName[nds]=Valgrind-Böversiet +GenericName[ne]=भलग्रिन्ड फ्रन्टइन्ड +GenericName[nl]=Valgrind-frontend +GenericName[pl]=Interfejs do Valgrinda +GenericName[pt]=Interface para o Valgrind +GenericName[pt_BR]=Frontend do Valgrind +GenericName[ru]=Интерфейс к Valgrind +GenericName[sk]=Valgrind rozhranie +GenericName[sl]=VMesnik za Valgrind +GenericName[sr]=Кориснички интерфејс за Valgrind +GenericName[sr@Latn]=Korisnički interfejs za Valgrind +GenericName[sv]=Valgrind-gränssnitt +GenericName[ta]=Valgrind முன் பகுதி +GenericName[tg]=Интерфейс дар Valgrind +GenericName[tr]=Valgrind Önucu +GenericName[zh_CN]=Valgrind 前端 +GenericName[zh_TW]=Valgrind 前端介面 +Icon=tdevelop +ServiceTypes=TDevelop/Plugin +X-TDevelop-Scope=Global +X-TDE-Library=libkdevvalgrind +X-TDevelop-Version=5 +X-TDevelop-Properties=CompiledDevelopment diff --git a/parts/valgrind/tdevvalgrind.desktop b/parts/valgrind/tdevvalgrind.desktop deleted file mode 100644 index 0c4fa769..00000000 --- a/parts/valgrind/tdevvalgrind.desktop +++ /dev/null @@ -1,74 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Valgrind is a tool that helps you find memory management problems in programs. http://valgrind.org/ -Comment[ca]=Valgrind és una eina que us ajuda a trobar problemes en la gestió de la memòria en els programes. http://valgrind.org/ -Comment[da]=Valgrind er et værktøj der hjælper dig med at finde hukommelseshåndteringsproblemer i programmer. http://valgrind.org/ -Comment[de]=Valgrind ist ein Werkzeug zum Auffinden von Speicherverwaltungsproblemen in Anwendungen. http://valgrind.org/ -Comment[el]=Το Valgrind είναι ένα εργαλείο που βοηθά στην εύρεση προβλημάτων διαχείρισης μνήμης στα προγράμματα. http://valgrind.org/ -Comment[es]=Valgrind es una herramienta que le ayuda a encontrar problemas de gestión de memoria en los programas. http://valgrind.org/ -Comment[et]=Valgrind aitab leida programmides mälulekkeid ja muid mäluga seotud asju. http://valgrind.org/ -Comment[fr]=Valgrind est un outil qui vous aide à trouver les problèmes de gestion de la mémoire dans les programmes. http://valgrind.org/ -Comment[hu]=A Valgrind memóriakezelési hibák keresésére alkalmas program - http://valgrind.org -Comment[it]=Valgrind è uno strumento che ti aiuta a trovare problemi di gestione della memoria nei programmi. http://valgrind.org/ -Comment[ja]=Valgrind は、プログラム内のメモリ管理問題を発見することを手助けするツールです。http://valgrind.org/ -Comment[ms]=Valgrind adalah alatan yang membantu anda mencari masalah pengurusan memori dalam program. http://valgrind.org/ -Comment[nds]=Valgrind is en Warktüüch för't Finnen vun t Spiekerpleegproblemen in Programmen. http://valgrind.org/ -Comment[nl]=Valgrind is een hulpprogramma dat u helpt bij het opsporen van geheugenproblemen in programma's. http://valgrind.org/ -Comment[pl]=Valgrind jest narzędziem pomagającym znaleźć w programach problemy z zarządzaniem pamięcią. http://valgrind.org/ -Comment[pt]=O Valgrind é uma ferramenta que o ajuda a descobrir os problemas de gestão de memória nos programas. http://www.valgrind.org/ -Comment[pt_BR]=Valgrind é uma ferramenta ajuda você a encontrar problemas de gerenciamento de memória nos programas. http://www.valgrind.org/ -Comment[ru]=Valgrind - средство нахождения проблем управления памятью в программах. http://valgrind.org/ -Comment[sk]=Valgrind je nástroj, ktorý pomáha nájsť problémy so správou pamäte v programoch. http://valgrind.org/ -Comment[sr]=Valgrind је алат који вам помаже да нађете проблеме са употребом меморије у програмима. http://valgrind.org/ -Comment[sr@Latn]=Valgrind je alat koji vam pomaže da nađete probleme sa upotrebom memorije u programima. http://valgrind.org/ -Comment[sv]=Valgrind är ett verktyg som hjälper dig hitta minneshanteringsproblem i program. Se http://valgrind.org/. -Comment[zh_TW]=Valgrind 能協助您找到程式中記憶體管理上的問題。http://valgrind.org/ -Name=KDevvalgrind -Name[da]=TDevelop Valgrind -Name[de]=Unterstützung für Valgrind (TDevelop) -Name[hi]=के-डेववेलग्रिंड -Name[nds]=Ünnerstütten för Valgrind (TDevelop) -Name[sk]=KDev valgrind -Name[sv]=TDevelop valgrind -Name[zh_TW]=TDevelop Valgrind -GenericName=Valgrind Frontend -GenericName[ca]=Entorn per a Valgrind -GenericName[da]=Valgrind-grænseflade -GenericName[de]=Oberfläche für Valgrind -GenericName[el]=Πρόγραμμα Valgrind -GenericName[es]=Interfaz para Valgrind -GenericName[et]=Valgrindi kasutajaliides -GenericName[eu]=Valgrind interfazea -GenericName[fa]=پایانۀ Valgrind -GenericName[fr]=Interface de Valgrind -GenericName[ga]=Comhéadan Valgrind -GenericName[gl]=Frontal para Valgrind -GenericName[hi]=वेलग्रिन्ड फ्रन्टएण्ड -GenericName[hu]=Valgrind-kezelő -GenericName[it]=Interfaccia a Valgrind -GenericName[ja]=Valgrind フロントエンド -GenericName[ms]=Frontend Valgrind -GenericName[nds]=Valgrind-Böversiet -GenericName[ne]=भलग्रिन्ड फ्रन्टइन्ड -GenericName[nl]=Valgrind-frontend -GenericName[pl]=Interfejs do Valgrinda -GenericName[pt]=Interface para o Valgrind -GenericName[pt_BR]=Frontend do Valgrind -GenericName[ru]=Интерфейс к Valgrind -GenericName[sk]=Valgrind rozhranie -GenericName[sl]=VMesnik za Valgrind -GenericName[sr]=Кориснички интерфејс за Valgrind -GenericName[sr@Latn]=Korisnički interfejs za Valgrind -GenericName[sv]=Valgrind-gränssnitt -GenericName[ta]=Valgrind முன் பகுதி -GenericName[tg]=Интерфейс дар Valgrind -GenericName[tr]=Valgrind Önucu -GenericName[zh_CN]=Valgrind 前端 -GenericName[zh_TW]=Valgrind 前端介面 -Icon=tdevelop -ServiceTypes=TDevelop/Plugin -X-TDevelop-Scope=Global -X-TDE-Library=libtdevvalgrind -X-TDevelop-Version=5 -X-TDevelop-Properties=CompiledDevelopment diff --git a/parts/valgrind/valgrind_part.cpp b/parts/valgrind/valgrind_part.cpp index 88d9427c..1b262175 100644 --- a/parts/valgrind/valgrind_part.cpp +++ b/parts/valgrind/valgrind_part.cpp @@ -6,31 +6,31 @@ #include #include -#include +#include #include #include #include #include #include -#include "tdevcore.h" -#include "tdevmainwindow.h" -#include "tdevproject.h" -#include "tdevplugininfo.h" +#include "kdevcore.h" +#include "kdevmainwindow.h" +#include "kdevproject.h" +#include "kdevplugininfo.h" #include "valgrind_widget.h" #include "valgrind_dialog.h" #include "valgrinditem.h" -typedef TDevGenericFactory ValgrindFactory; -static const TDevPluginInfo data("tdevvalgrind"); -K_EXPORT_COMPONENT_FACTORY( libtdevvalgrind, ValgrindFactory( data ) ) +typedef KDevGenericFactory ValgrindFactory; +static const KDevPluginInfo data("kdevvalgrind"); +K_EXPORT_COMPONENT_FACTORY( libkdevvalgrind, ValgrindFactory( data ) ) ValgrindPart::ValgrindPart( TQObject *parent, const char *name, const TQStringList& ) - : TDevPlugin( &data, parent, name ? name : "ValgrindPart" ) + : KDevPlugin( &data, parent, name ? name : "ValgrindPart" ) { setInstance( ValgrindFactory::instance() ); - setXMLFile( "tdevpart_valgrind.rc" ); + setXMLFile( "kdevpart_valgrind.rc" ); proc = new KShellProcess(); connect( proc, TQT_SIGNAL(receivedStdout( TDEProcess*, char*, int )), @@ -39,8 +39,8 @@ ValgrindPart::ValgrindPart( TQObject *parent, const char *name, const TQStringLi this, TQT_SLOT(receivedStderr( TDEProcess*, char*, int )) ); connect( proc, TQT_SIGNAL(processExited( TDEProcess* )), this, TQT_SLOT(processExited( TDEProcess* )) ); - connect( core(), TQT_SIGNAL(stopButtonClicked(TDevPlugin*)), - this, TQT_SLOT(slotStopButtonClicked(TDevPlugin*)) ); + connect( core(), TQT_SIGNAL(stopButtonClicked(KDevPlugin*)), + this, TQT_SLOT(slotStopButtonClicked(KDevPlugin*)) ); connect( core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(projectOpened()) ); @@ -196,7 +196,7 @@ void ValgrindPart::slotKillValgrind() proc->kill(); } -void ValgrindPart::slotStopButtonClicked( TDevPlugin* which ) +void ValgrindPart::slotStopButtonClicked( KDevPlugin* which ) { if ( which != 0 && which != this ) return; diff --git a/parts/valgrind/valgrind_part.h b/parts/valgrind/valgrind_part.h index 1982ea33..6a05737b 100644 --- a/parts/valgrind/valgrind_part.h +++ b/parts/valgrind/valgrind_part.h @@ -2,18 +2,18 @@ * Copyright (C) 2002 Harald Fernengel */ -#ifndef __TDEVPART_VALGRIND_H__ -#define __TDEVPART_VALGRIND_H__ +#ifndef __KDEVPART_VALGRIND_H__ +#define __KDEVPART_VALGRIND_H__ #include #include #include -#include +#include class ValgrindWidget; class TDEProcess; -class ValgrindPart : public TDevPlugin +class ValgrindPart : public KDevPlugin { Q_OBJECT @@ -31,7 +31,7 @@ private slots: void slotExecValgrind(); void slotExecCalltree(); void slotKillValgrind(); - void slotStopButtonClicked( TDevPlugin* which ); + void slotStopButtonClicked( KDevPlugin* which ); void receivedStdout( TDEProcess*, char*, int ); void receivedStderr( TDEProcess*, char*, int ); void processExited( TDEProcess* ); diff --git a/parts/valgrind/valgrind_widget.cpp b/parts/valgrind/valgrind_widget.cpp index f32ab9b7..70484704 100644 --- a/parts/valgrind/valgrind_widget.cpp +++ b/parts/valgrind/valgrind_widget.cpp @@ -10,10 +10,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include "valgrind_part.h" #include "valgrind_widget.h" diff --git a/parts/vcsmanager/CMakeLists.txt b/parts/vcsmanager/CMakeLists.txt index a672b4ac..de236f81 100644 --- a/parts/vcsmanager/CMakeLists.txt +++ b/parts/vcsmanager/CMakeLists.txt @@ -26,12 +26,12 @@ link_directories( ##### other data ################################ -install( FILES tdevvcsmanager.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevvcsmanager.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevvcsmanager (module) ################ +##### libkdevvcsmanager (module) ################ -tde_add_kpart( libtdevvcsmanager AUTOMOC +tde_add_kpart( libkdevvcsmanager AUTOMOC SOURCES vcsmanagerpart.cpp vcsmanagerprojectconfigbase.ui vcsmanagerprojectconfig.cpp diff --git a/parts/vcsmanager/Makefile.am b/parts/vcsmanager/Makefile.am index 66897658..5f7534ee 100644 --- a/parts/vcsmanager/Makefile.am +++ b/parts/vcsmanager/Makefile.am @@ -1,19 +1,19 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevvcsmanager.la -libtdevvcsmanager_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevvcsmanager_la_LIBADD = $(top_builddir)/lib/libtdevelop.la +kde_module_LTLIBRARIES = libkdevvcsmanager.la +libkdevvcsmanager_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevvcsmanager_la_LIBADD = $(top_builddir)/lib/libtdevelop.la -libtdevvcsmanager_la_SOURCES = vcsmanagerpart.cpp \ +libkdevvcsmanager_la_SOURCES = vcsmanagerpart.cpp \ vcsmanagerprojectconfigbase.ui vcsmanagerprojectconfig.cpp METASOURCES = AUTO -appsharedir = $(kde_datadir)/tdevvcsmanager +appsharedir = $(kde_datadir)/kdevvcsmanager appshare_DATA = servicedir = $(kde_servicesdir) -service_DATA = tdevvcsmanager.desktop +service_DATA = kdevvcsmanager.desktop -rcdir = $(kde_datadir)/tdevvcsmanager +rcdir = $(kde_datadir)/kdevvcsmanager diff --git a/parts/vcsmanager/kdevvcsmanager.desktop b/parts/vcsmanager/kdevvcsmanager.desktop new file mode 100644 index 00000000..35cdf2aa --- /dev/null +++ b/parts/vcsmanager/kdevvcsmanager.desktop @@ -0,0 +1,65 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Name=KDevVCSManager +Name[da]=TDevelop VCS-håndtering +Name[nds]=TDevelop-VKS-Pleger +Name[sk]=KDev VCS manažér +Name[sv]=TDevelop VCS-hantering +Name[tg]=РоҳбариKDevVCS +Name[zh_TW]=TDevelop VCS 管理器 +GenericName=VCSManager +GenericName[da]=VCS-håndtering +GenericName[fa]=مدیر VCS +GenericName[nds]=VKS-Pleger +GenericName[ru]=Управление системами контроля версий +GenericName[sk]=VCS manažér +GenericName[sl]=Upravitelj VCS +GenericName[sr]=VCS менаџер +GenericName[sr@Latn]=VCS menadžer +GenericName[sv]=VCS-hantering +GenericName[tg]=РоҳбариVCS +GenericName[zh_TW]=VCS 管理員 +Comment=Version Control System Manager +Comment[ca]=Gestor per al sistema de control de versions +Comment[da]=Versionskontrolsystem-håndtering +Comment[de]=Verwaltung für VCS +Comment[el]=Διαχειριστής συστήματος ελέγχου εκδόσεων +Comment[es]=Administrador de sistemas de control de versiones +Comment[et]=Versioonikontrollisüsteemi haldur +Comment[eu]=Version Control System (VCS) kudeatzailea +Comment[fa]=مدیر سیستم کنترل نسخه +Comment[fr]=Gestionnaire du système de contrôle de versions +Comment[gl]=Xestor do Sistema de control de versións +Comment[hu]=Kezelőfelület verziókövető rendszerekhez +Comment[it]=Gestore Sistema Controllo Versione +Comment[ms]=Pengurus Sistem Kawalan Versi +Comment[nds]=VKS-Pleger +Comment[ne]=संस्करण नियन्त्रण प्रणाली प्रबन्धक +Comment[nl]=Versie Controle Systeem-beheerder +Comment[pl]=Menedżer Systemu kontroli wersji +Comment[pt]=Gestor de Sistema de Controlo de Versão +Comment[pt_BR]=Gerenciador do Sistema de Controle de Versão +Comment[ru]=Управление системами контроля версий +Comment[sk]=Manažér systému riadenia verzií +Comment[sl]=Upravitelj sistema za nadzor različic +Comment[sr]=Менаџер система контроле верзија +Comment[sr@Latn]=Menadžer sistema kontrole verzija +Comment[sv]=Hantering av versionskontrollsystem +Comment[tr]=Sürüm Kontrol Sistemi Yöneticisi +Comment[zh_CN]=版本控制系统管理器 +Comment[zh_TW]=版本控制系統管理員 +Icon=tdevelop +ServiceTypes=TDevelop/Plugin + +X-TDevelop-Plugin-Version=1 +X-TDevelop-Plugin-Homepage= +X-TDevelop-Plugin-BugsEmailAddress=jens.dagerbo@swipnet.se +X-TDevelop-Plugin-Copyright=(C) by Jens Dagerbo + +X-TDevelop-Args= + +X-TDevelop-Scope=Core +X-TDE-Library=libkdevvcsmanager +X-TDevelop-Version=5 +X-TDevelop-Properties=VCS diff --git a/parts/vcsmanager/tdevvcsmanager.desktop b/parts/vcsmanager/tdevvcsmanager.desktop deleted file mode 100644 index 91fe7c98..00000000 --- a/parts/vcsmanager/tdevvcsmanager.desktop +++ /dev/null @@ -1,65 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Name=TDevVCSManager -Name[da]=TDevelop VCS-håndtering -Name[nds]=TDevelop-VKS-Pleger -Name[sk]=KDev VCS manažér -Name[sv]=TDevelop VCS-hantering -Name[tg]=РоҳбариTDevVCS -Name[zh_TW]=TDevelop VCS 管理器 -GenericName=VCSManager -GenericName[da]=VCS-håndtering -GenericName[fa]=مدیر VCS -GenericName[nds]=VKS-Pleger -GenericName[ru]=Управление системами контроля версий -GenericName[sk]=VCS manažér -GenericName[sl]=Upravitelj VCS -GenericName[sr]=VCS менаџер -GenericName[sr@Latn]=VCS menadžer -GenericName[sv]=VCS-hantering -GenericName[tg]=РоҳбариVCS -GenericName[zh_TW]=VCS 管理員 -Comment=Version Control System Manager -Comment[ca]=Gestor per al sistema de control de versions -Comment[da]=Versionskontrolsystem-håndtering -Comment[de]=Verwaltung für VCS -Comment[el]=Διαχειριστής συστήματος ελέγχου εκδόσεων -Comment[es]=Administrador de sistemas de control de versiones -Comment[et]=Versioonikontrollisüsteemi haldur -Comment[eu]=Version Control System (VCS) kudeatzailea -Comment[fa]=مدیر سیستم کنترل نسخه -Comment[fr]=Gestionnaire du système de contrôle de versions -Comment[gl]=Xestor do Sistema de control de versións -Comment[hu]=Kezelőfelület verziókövető rendszerekhez -Comment[it]=Gestore Sistema Controllo Versione -Comment[ms]=Pengurus Sistem Kawalan Versi -Comment[nds]=VKS-Pleger -Comment[ne]=संस्करण नियन्त्रण प्रणाली प्रबन्धक -Comment[nl]=Versie Controle Systeem-beheerder -Comment[pl]=Menedżer Systemu kontroli wersji -Comment[pt]=Gestor de Sistema de Controlo de Versão -Comment[pt_BR]=Gerenciador do Sistema de Controle de Versão -Comment[ru]=Управление системами контроля версий -Comment[sk]=Manažér systému riadenia verzií -Comment[sl]=Upravitelj sistema za nadzor različic -Comment[sr]=Менаџер система контроле верзија -Comment[sr@Latn]=Menadžer sistema kontrole verzija -Comment[sv]=Hantering av versionskontrollsystem -Comment[tr]=Sürüm Kontrol Sistemi Yöneticisi -Comment[zh_CN]=版本控制系统管理器 -Comment[zh_TW]=版本控制系統管理員 -Icon=tdevelop -ServiceTypes=TDevelop/Plugin - -X-TDevelop-Plugin-Version=1 -X-TDevelop-Plugin-Homepage= -X-TDevelop-Plugin-BugsEmailAddress=jens.dagerbo@swipnet.se -X-TDevelop-Plugin-Copyright=(C) by Jens Dagerbo - -X-TDevelop-Args= - -X-TDevelop-Scope=Core -X-TDE-Library=libtdevvcsmanager -X-TDevelop-Version=5 -X-TDevelop-Properties=VCS diff --git a/parts/vcsmanager/vcsmanagerpart.cpp b/parts/vcsmanager/vcsmanagerpart.cpp index 5f5ad639..ec176c47 100644 --- a/parts/vcsmanager/vcsmanagerpart.cpp +++ b/parts/vcsmanager/vcsmanagerpart.cpp @@ -29,32 +29,32 @@ #include #include #include -#include -#include +#include +#include #include -#include -#include +#include +#include #include -#include +#include #include "domutil.h" #include "vcsmanagerprojectconfig.h" -typedef TDevGenericFactory VCSManagerFactory; -TDevPluginInfo data("tdevvcsmanager"); -K_EXPORT_COMPONENT_FACTORY( libtdevvcsmanager, VCSManagerFactory( data ) ) +typedef KDevGenericFactory VCSManagerFactory; +KDevPluginInfo data("kdevvcsmanager"); +K_EXPORT_COMPONENT_FACTORY( libkdevvcsmanager, VCSManagerFactory( data ) ) #define GLOBALDOC_OPTIONS 1 #define PROJECTDOC_OPTIONS 2 VCSManagerPart::VCSManagerPart(TQObject *parent, const char *name, const TQStringList &/*args*/) - : TDevPlugin(&data, parent, name ? name : "VCSManagerPart") + : KDevPlugin(&data, parent, name ? name : "VCSManagerPart") { kdDebug() << " ********** VCSManagerPart::VCSManagerPart() ************** " << endl; setInstance(VCSManagerFactory::instance()); -// setXMLFile("tdevvcsmanager.rc"); +// setXMLFile("kdevvcsmanager.rc"); m_configProxy = new ConfigWidgetProxy(core()); m_configProxy->createProjectConfigPage(i18n("Version Control"), PROJECTDOC_OPTIONS, info()->icon()); diff --git a/parts/vcsmanager/vcsmanagerpart.h b/parts/vcsmanager/vcsmanagerpart.h index aa52de94..1fbccbff 100644 --- a/parts/vcsmanager/vcsmanagerpart.h +++ b/parts/vcsmanager/vcsmanagerpart.h @@ -18,10 +18,10 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ -#ifndef TDEVVCSMANAGER_H -#define TDEVVCSMANAGER_H +#ifndef KDEVVCSMANAGER_H +#define KDEVVCSMANAGER_H -#include +#include #include @@ -35,7 +35,7 @@ class VCSManagerWidget; /** Please read the README.dox file for more info about this part */ -class VCSManagerPart: public TDevPlugin +class VCSManagerPart: public KDevPlugin { Q_OBJECT diff --git a/pics/hi16-app-tdevassistant.png b/pics/hi16-app-kdevassistant.png similarity index 100% rename from pics/hi16-app-tdevassistant.png rename to pics/hi16-app-kdevassistant.png diff --git a/pics/hi16-app-tdevdesigner.png b/pics/hi16-app-kdevdesigner.png similarity index 100% rename from pics/hi16-app-tdevdesigner.png rename to pics/hi16-app-kdevdesigner.png diff --git a/pics/hi32-app-tdevassistant.png b/pics/hi32-app-kdevassistant.png similarity index 100% rename from pics/hi32-app-tdevassistant.png rename to pics/hi32-app-kdevassistant.png diff --git a/pics/hi32-app-tdevdesigner.png b/pics/hi32-app-kdevdesigner.png similarity index 100% rename from pics/hi32-app-tdevdesigner.png rename to pics/hi32-app-kdevdesigner.png diff --git a/pics/hi48-app-tdevassistant.png b/pics/hi48-app-kdevassistant.png similarity index 100% rename from pics/hi48-app-tdevassistant.png rename to pics/hi48-app-kdevassistant.png diff --git a/pics/hi48-app-tdevdesigner.png b/pics/hi48-app-kdevdesigner.png similarity index 100% rename from pics/hi48-app-tdevdesigner.png rename to pics/hi48-app-kdevdesigner.png diff --git a/pics/mini/CMakeLists.txt b/pics/mini/CMakeLists.txt index 704cbedf..143ea8d3 100644 --- a/pics/mini/CMakeLists.txt +++ b/pics/mini/CMakeLists.txt @@ -19,4 +19,4 @@ install( FILES CVpublic_signal.png CVpublic_slot.png CVpublic_var.png CVstruct.png CVpackage_meth.png CVpackage_var.png CVtypedef.png - DESTINATION ${DATA_INSTALL_DIR}/tdevclassview/pics ) + DESTINATION ${DATA_INSTALL_DIR}/kdevclassview/pics ) diff --git a/pics/mini/Makefile.am b/pics/mini/Makefile.am index 5b921601..94e74ffb 100644 --- a/pics/mini/Makefile.am +++ b/pics/mini/Makefile.am @@ -1,4 +1,4 @@ -minipicsdir = $(kde_datadir)/tdevclassview/pics +minipicsdir = $(kde_datadir)/kdevclassview/pics minipics_DATA = CTchildren.png CTclients.png CTparents.png CTsuppliers.png \ CTvirtuals.png CVclass.png CVglobal_meth.png CVglobal_var.png CVnamespace.png \ CVprivate_meth.png CVprivate_signal.png CVprivate_slot.png CVprivate_var.png \ diff --git a/pics/misc/CMakeLists.txt b/pics/misc/CMakeLists.txt index 6d156aeb..86b1d049 100644 --- a/pics/misc/CMakeLists.txt +++ b/pics/misc/CMakeLists.txt @@ -10,6 +10,6 @@ ################################################# install( FILES - tdevelop-splash.png tdevassistant-splash.png - tdevdesigner-splash.png + tdevelop-splash.png kdevassistant-splash.png + kdevdesigner-splash.png DESTINATION ${DATA_INSTALL_DIR}/tdevelop/pics ) diff --git a/pics/misc/Makefile.am b/pics/misc/Makefile.am index 5f2435c3..d748146d 100644 --- a/pics/misc/Makefile.am +++ b/pics/misc/Makefile.am @@ -1,3 +1,3 @@ picsdir = $(kde_datadir)/tdevelop/pics -pics_DATA = tdevelop-splash.png tdevassistant-splash.png \ - tdevdesigner-splash.png +pics_DATA = tdevelop-splash.png kdevassistant-splash.png \ + kdevdesigner-splash.png diff --git a/pics/misc/tdevassistant-splash.png b/pics/misc/kdevassistant-splash.png similarity index 100% rename from pics/misc/tdevassistant-splash.png rename to pics/misc/kdevassistant-splash.png diff --git a/pics/misc/tdevdesigner-splash.png b/pics/misc/kdevdesigner-splash.png similarity index 100% rename from pics/misc/tdevdesigner-splash.png rename to pics/misc/kdevdesigner-splash.png diff --git a/pics/toolbar/CMakeLists.txt b/pics/toolbar/CMakeLists.txt index 8b3bfbb8..89891ee4 100644 --- a/pics/toolbar/CMakeLists.txt +++ b/pics/toolbar/CMakeLists.txt @@ -15,17 +15,17 @@ tde_install_icons( dbgnext dbgwatchvar dbgrun dbgstepout dbgmemview dbgparam dbgrunto dbgstep dbgnextinst dbgrestart dbgstepinst dbgvar debugger dbgjumpto - DESTINATION ${DATA_INSTALL_DIR}/tdevdebugger/icons ) + DESTINATION ${DATA_INSTALL_DIR}/kdevdebugger/icons ) tde_install_icons( classnew classwiz - DESTINATION ${DATA_INSTALL_DIR}/tdevcppsupport/icons ) + DESTINATION ${DATA_INSTALL_DIR}/kdevcppsupport/icons ) tde_install_icons( dbgnext dbgrun dbgstepout dbgrunto dbgstep dbgrestart debugger - DESTINATION ${DATA_INSTALL_DIR}/tdevrbdebugger/icons ) + DESTINATION ${DATA_INSTALL_DIR}/kdevrbdebugger/icons ) tde_install_icons( grep - DESTINATION ${DATA_INSTALL_DIR}/tdevgrepview/icons ) + DESTINATION ${DATA_INSTALL_DIR}/kdevgrepview/icons ) diff --git a/pics/toolbar/Makefile.am b/pics/toolbar/Makefile.am index 0713d5b3..d60121e7 100644 --- a/pics/toolbar/Makefile.am +++ b/pics/toolbar/Makefile.am @@ -1,14 +1,14 @@ tdevelopdir = $(kde_datadir)/tdevelop/icons tdevelop_ICON = AUTO -tdevdebuggerdir = $(kde_datadir)/tdevdebugger/icons -tdevdebugger_ICON = dbgnext dbgwatchvar dbgrun dbgstepout dbgmemview dbgparam dbgrunto dbgstep dbgnextinst dbgrestart dbgstepinst dbgvar debugger dbgjumpto +kdevdebuggerdir = $(kde_datadir)/kdevdebugger/icons +kdevdebugger_ICON = dbgnext dbgwatchvar dbgrun dbgstepout dbgmemview dbgparam dbgrunto dbgstep dbgnextinst dbgrestart dbgstepinst dbgvar debugger dbgjumpto -cppsupportdir = $(kde_datadir)/tdevcppsupport/icons +cppsupportdir = $(kde_datadir)/kdevcppsupport/icons cppsupport_ICON = classnew classwiz -tdevrbdebuggerdir = $(kde_datadir)/tdevrbdebugger/icons -tdevrbdebugger_ICON = dbgnext dbgrun dbgstepout dbgrunto dbgstep dbgrestart debugger +kdevrbdebuggerdir = $(kde_datadir)/kdevrbdebugger/icons +kdevrbdebugger_ICON = dbgnext dbgrun dbgstepout dbgrunto dbgstep dbgrestart debugger -grepdir = $(kde_datadir)/tdevgrepview/icons +grepdir = $(kde_datadir)/kdevgrepview/icons grep_ICON = grep diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b58b6df5..558caeb4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -52,8 +52,8 @@ install( FILES ##### other data ################################ install( FILES tdevelopui.rc eventsrc DESTINATION ${DATA_INSTALL_DIR}/tdevelop ) -install( FILES tdeveloprc tdevassistantrc DESTINATION ${CONFIG_INSTALL_DIR} ) -install( FILES tdevassistantui.rc DESTINATION ${DATA_INSTALL_DIR}/tdevassistant ) +install( FILES tdeveloprc kdevassistantrc DESTINATION ${CONFIG_INSTALL_DIR} ) +install( FILES kdevassistantui.rc DESTINATION ${DATA_INSTALL_DIR}/kdevassistant ) install( FILES projectprofiles DESTINATION ${DATA_INSTALL_DIR}/tdevelop/profiles ) @@ -61,25 +61,25 @@ install( FILES projectprofiles DESTINATION ${DATA_INSTALL_DIR}/tdevelop/profiles tde_add_executable( tdevelop SOURCES - main.cpp tdevideextension.cpp settingswidget.ui - LINK tdevshell-shared + main.cpp kdevideextension.cpp settingswidget.ui + LINK kdevshell-shared DESTINATION ${BIN_INSTALL_DIR} ) -##### tdevassistant (executable) ################ +##### kdevassistant (executable) ################ -tde_add_executable( tdevassistant +tde_add_executable( kdevassistant SOURCES - main_assistant.cpp tdevassistantextension.cpp - LINK tdevshell-shared + main_assistant.cpp kdevassistantextension.cpp + LINK kdevshell-shared DESTINATION ${BIN_INSTALL_DIR} ) -##### tdevshell (shared) ######################## +##### kdevshell (shared) ######################## -tde_add_library( tdevshell SHARED AUTOMOC +tde_add_library( kdevshell SHARED AUTOMOC SOURCES api.cpp core.cpp documentationpart.cpp editorproxy.cpp generalinfowidget.cpp generalinfowidgetbase.ui @@ -92,7 +92,7 @@ tde_add_library( tdevshell SHARED AUTOMOC toplevel.cpp VERSION 0.0.0 LINK - tdevutil-static d-shared kinterfacedesigner-shared - profileengine-shared tdevelop-shared tdevwidgets-shared + kdevutil-static d-shared kinterfacedesigner-shared + profileengine-shared tdevelop-shared kdevwidgets-shared DESTINATION ${LIB_INSTALL_DIR} ) diff --git a/src/Mainpage.dox b/src/Mainpage.dox index 7f2255d2..2f055d1b 100644 --- a/src/Mainpage.dox +++ b/src/Mainpage.dox @@ -3,7 +3,7 @@ This library contains the Shell - a profile-based implementation of TDevelop plugin architecture. -Link with: -ltdevshell +Link with: -lkdevshell Include path: -I\$(kde_includes)/tdevelop/shell @@ -109,7 +109,7 @@ Example: } protected: - TDevAssistantExtension(); + KDevAssistantExtension(); }; @endcode diff --git a/src/Makefile.am b/src/Makefile.am index b0b8a04c..047e89a4 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -6,41 +6,41 @@ INCLUDES = -I$(top_srcdir)/lib -I$(top_srcdir)/lib/interfaces \ KDE_OPTIONS=nofinal -lib_LTLIBRARIES = libtdevshell.la -libtdevshell_la_LDFLAGS = $(all_libraries) -ltdevelop -L../lib/.libs -L../lib/interfaces/external/.libs -lkinterfacedesigner -libtdevshell_la_LIBADD = \ +lib_LTLIBRARIES = libkdevshell.la +libkdevshell_la_LDFLAGS = $(all_libraries) -ltdevelop -L../lib/.libs -L../lib/interfaces/external/.libs -lkinterfacedesigner +libkdevshell_la_LIBADD = \ $(top_builddir)/src/profileengine/lib/libprofileengine.la $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/lib/widgets/libtdevwidgets.la $(top_builddir)/lib/interfaces/extras/libtdevextras.la \ + $(top_builddir)/lib/widgets/libkdevwidgets.la $(top_builddir)/lib/interfaces/extras/libkdevextras.la \ $(top_builddir)/src/newui/libd.la $(LIB_TDEHTML) -ltdetexteditor -L../lib/interfaces/external/.libs -lkinterfacedesigner -libtdevshell_la_SOURCES = api.cpp core.cpp documentationpart.cpp \ +libkdevshell_la_SOURCES = api.cpp core.cpp documentationpart.cpp \ editorproxy.cpp generalinfowidget.cpp generalinfowidgetbase.ui languageselectwidget.cpp \ mainwindowshare.cpp mimewarningdialog.ui multibuffer.cpp partcontroller.cpp \ plugincontroller.cpp pluginselectdialog.cpp pluginselectdialog.h pluginselectdialogbase.ui \ projectmanager.cpp projectsession.cpp shellextension.cpp simplemainwindow.cpp \ splashscreen.cpp statusbar.cpp toplevel.cpp -bin_PROGRAMS = tdevelop tdevassistant +bin_PROGRAMS = tdevelop kdevassistant -tdevelop_SOURCES = main.cpp tdevideextension.cpp settingswidget.ui +tdevelop_SOURCES = main.cpp kdevideextension.cpp settingswidget.ui tdevelop_METASOURCES = AUTO tdevelop_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor -ltdevelop -L../lib/.libs -L../lib/interfaces/external/.libs -lkinterfacedesigner -tdevelop_LDADD = libtdevshell.la -L../lib/interfaces/external/.libs -lkinterfacedesigner +tdevelop_LDADD = libkdevshell.la -L../lib/interfaces/external/.libs -lkinterfacedesigner rcdir = $(kde_datadir)/tdevelop rc_DATA = tdevelopui.rc eventsrc -# default TDevelop configuration +# default KDevelop configuration tdevelopdatadir = $(kde_confdir) -tdevelopdata_DATA = tdeveloprc tdevassistantrc +tdevelopdata_DATA = tdeveloprc kdevassistantrc SUBDIRS = profiles profileengine newui tdeconf_update -tdevassistant_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor -ltdevelop -L../lib/.libs -L../lib/interfaces/external/.libs -lkinterfacedesigner -tdevassistant_SOURCES = main_assistant.cpp tdevassistantextension.cpp -tdevassistant_LDADD = libtdevshell.la -L../lib/interfaces/external/.libs -lkinterfacedesigner +kdevassistant_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor -ltdevelop -L../lib/.libs -L../lib/interfaces/external/.libs -lkinterfacedesigner +kdevassistant_SOURCES = main_assistant.cpp kdevassistantextension.cpp +kdevassistant_LDADD = libkdevshell.la -L../lib/interfaces/external/.libs -lkinterfacedesigner -rc_assistantdir = $(kde_datadir)/tdevassistant -rc_assistant_DATA = tdevassistantui.rc +rc_assistantdir = $(kde_datadir)/kdevassistant +rc_assistant_DATA = kdevassistantui.rc shellincludedir = $(includedir)/tdevelop/shell shellinclude_HEADERS = api.h core.h documentationpart.h editorproxy.h \ generalinfowidget.h languageselectwidget.h mainwindowshare.h partcontroller.h \ @@ -48,9 +48,9 @@ shellinclude_HEADERS = api.h core.h documentationpart.h editorproxy.h \ statusbar.h toplevel.h generalinfowidgetbase.h mimewarningdialog.h settingswidget.h \ simplemainwindow.h multibuffer.h -DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils tdevutil tdevinterfaces tdevextensions -DOXYGEN_PROJECTNAME = TDevelop Generic Shell -DOXYGEN_DOCDIRPREFIX = tdevshell +DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils kdevutil kdevinterfaces kdevextensions +DOXYGEN_PROJECTNAME = KDevelop Generic Shell +DOXYGEN_DOCDIRPREFIX = kdevshell include ../Doxyfile.am profilesdatadir = $(kde_datadir)/tdevelop/profiles profilesdata_DATA = projectprofiles diff --git a/src/api.cpp b/src/api.cpp index 4053f871..8e56da3d 100644 --- a/src/api.cpp +++ b/src/api.cpp @@ -9,18 +9,18 @@ API *API::s_instance = 0; -TDevMainWindow *API::mainWindow() const +KDevMainWindow *API::mainWindow() const { return TopLevel::getInstance(); } -TDevPartController *API::partController() const +KDevPartController *API::partController() const { return PartController::getInstance(); } -TDevCore *API::core() const +KDevCore *API::core() const { return Core::getInstance(); } @@ -41,7 +41,7 @@ API *API::getInstance() API::API() - : TDevApi() + : KDevApi() { m_classStore = new CodeModel(); } @@ -53,7 +53,7 @@ API::~API() m_classStore = 0; } -TDevPluginController * API::pluginController() const +KDevPluginController * API::pluginController() const { return PluginController::getInstance(); } diff --git a/src/api.h b/src/api.h index 2957b42a..fb20447a 100644 --- a/src/api.h +++ b/src/api.h @@ -2,7 +2,7 @@ #define _API_H_ -#include "tdevapi.h" +#include "kdevapi.h" class CodeModel; @@ -10,14 +10,14 @@ class CodeModel; /** API implementation. */ -class API : public TDevApi +class API : public KDevApi { public: - virtual TDevMainWindow *mainWindow() const; - virtual TDevPartController *partController() const; - virtual TDevPluginController *pluginController() const; - virtual TDevCore *core() const; + virtual KDevMainWindow *mainWindow() const; + virtual KDevPartController *partController() const; + virtual KDevPluginController *pluginController() const; + virtual KDevCore *core() const; virtual CodeModel *codeModel() const; static API *getInstance(); diff --git a/src/core.cpp b/src/core.cpp index 64c3d0b9..ccdd0ace 100644 --- a/src/core.cpp +++ b/src/core.cpp @@ -59,7 +59,7 @@ void Core::setupShourtcutTips(KXMLGUIClient * client) } Core::Core() - : TDevCore() + : KDevCore() { } @@ -88,7 +88,7 @@ bool Core::queryClose() } -void Core::running(TDevPlugin * which, bool runs) +void Core::running(KDevPlugin * which, bool runs) { emit activeProcessChanged( which, runs ); } diff --git a/src/core.h b/src/core.h index 9973c7e0..c041eac0 100644 --- a/src/core.h +++ b/src/core.h @@ -7,7 +7,7 @@ #include -#include "tdevcore.h" +#include "kdevcore.h" namespace MainWindowUtils{ @@ -17,7 +17,7 @@ TQString beautifyToolTip(const TQString& text); /** Core implementation. */ -class Core : public TDevCore +class Core : public KDevCore { Q_OBJECT @@ -41,7 +41,7 @@ public: ~Core(); - virtual void running(TDevPlugin *which, bool runs); + virtual void running(KDevPlugin *which, bool runs); virtual void fillContextMenu(TQPopupMenu *popup, const Context *context); virtual void openProject(const TQString& projectFileName); @@ -51,13 +51,13 @@ public: void doEmitCoreInitialized() { emit coreInitialized(); } void doEmitProjectConfigWidget(KDialogBase *base) { emit projectConfigWidget(base); } void doEmitConfigWidget(KDialogBase *base) { emit configWidget(base); } - void doEmitStopButtonPressed(TDevPlugin* which = 0) { emit stopButtonClicked( which ); } + void doEmitStopButtonPressed(KDevPlugin* which = 0) { emit stopButtonClicked( which ); } bool queryClose(); signals: - void activeProcessChanged(TDevPlugin* which, bool runs); + void activeProcessChanged(KDevPlugin* which, bool runs); protected: diff --git a/src/documentationpart.cpp b/src/documentationpart.cpp index 43c9db67..b9ad78d0 100644 --- a/src/documentationpart.cpp +++ b/src/documentationpart.cpp @@ -3,7 +3,7 @@ #include "documentationpart.h" HTMLDocumentationPart::HTMLDocumentationPart() - : TDevHTMLPart() + : KDevHTMLPart() { setOptions(CanDuplicate | CanOpenInNewWindow); } diff --git a/src/documentationpart.h b/src/documentationpart.h index 84f17023..dd86ce8a 100644 --- a/src/documentationpart.h +++ b/src/documentationpart.h @@ -1,14 +1,14 @@ #ifndef __DOCUMENTATIONPART_H__ #define __DOCUMENTATIONPART_H__ -#include +#include /** HTML documentation part. -Implements shell-dependent "duplicate" and "open in new window" actions of TDevHTMLPart. +Implements shell-dependent "duplicate" and "open in new window" actions of KDevHTMLPart. */ -class HTMLDocumentationPart : public TDevHTMLPart +class HTMLDocumentationPart : public KDevHTMLPart { Q_OBJECT diff --git a/src/editorproxy.cpp b/src/editorproxy.cpp index fca4bfdf..73ff852b 100644 --- a/src/editorproxy.cpp +++ b/src/editorproxy.cpp @@ -27,7 +27,7 @@ #include "partcontroller.h" #include "core.h" #include "multibuffer.h" -#include "tdeveditorutil.h" +#include "kdeveditorutil.h" #include "editorproxy.h" @@ -178,20 +178,20 @@ void EditorProxy::popupAboutToShow() unsigned int line; unsigned int col; - if ( !TDevEditorUtil::currentPositionReal( &line, &col, doc ) ) return; + if ( !KDevEditorUtil::currentPositionReal( &line, &col, doc ) ) return; TQString wordstr; - TQString selection = TDevEditorUtil::currentSelection( doc ); + TQString selection = KDevEditorUtil::currentSelection( doc ); if ( !selection.isEmpty() && selection.contains('\n') != 0 ) { wordstr = selection; } else { - wordstr = TDevEditorUtil::currentWord( doc ); + wordstr = KDevEditorUtil::currentWord( doc ); } - TQString linestr = TDevEditorUtil::currentLine( doc ); + TQString linestr = KDevEditorUtil::currentLine( doc ); EditorContext context( doc->url(), line, col, linestr, wordstr ); Core::getInstance()->fillContextMenu( popup, &context ); diff --git a/src/eventsrc b/src/eventsrc index 4032da95..baa16c20 100644 --- a/src/eventsrc +++ b/src/eventsrc @@ -1,6 +1,6 @@ [!Global!] IconName=tdevelop -Comment=TDevelop +Comment=KDevelop Comment[hi]=के-डेवलप [ProcessSuccess] diff --git a/src/kdevassistantextension.cpp b/src/kdevassistantextension.cpp new file mode 100644 index 00000000..ddbfb6bf --- /dev/null +++ b/src/kdevassistantextension.cpp @@ -0,0 +1,40 @@ +/*************************************************************************** + * Copyright (C) 2004 by Alexander Dymo * + * adymo@kdevelop.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ +#include "kdevassistantextension.h" + +KDevAssistantExtension::KDevAssistantExtension() + : ShellExtension() +{ +} + +void KDevAssistantExtension::init() +{ + s_instance = new KDevAssistantExtension(); +} + +TQString KDevAssistantExtension::xmlFile() +{ + return "kdevassistantui.rc"; +} + +TQString KDevAssistantExtension::defaultProfile() +{ + return "KDevAssistant"; +} diff --git a/src/kdevassistantextension.h b/src/kdevassistantextension.h new file mode 100644 index 00000000..874cafbd --- /dev/null +++ b/src/kdevassistantextension.h @@ -0,0 +1,41 @@ +/*************************************************************************** + * Copyright (C) 2004 by Alexander Dymo * + * adymo@kdevelop.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ +#ifndef KDEVASSISTANTEXTENSION_H +#define KDEVASSISTANTEXTENSION_H + +#include "shellextension.h" + +class KDevAssistantExtension : public ShellExtension { +public: + static void init(); + + virtual void createGlobalSettingsPage(KDialogBase */*dlg*/) {}; + virtual void acceptGlobalSettingsPage(KDialogBase */*dlg*/) {}; + + virtual TQString xmlFile(); + + virtual TQString defaultProfile(); + +protected: + KDevAssistantExtension(); + +}; + +#endif diff --git a/src/tdevassistantrc b/src/kdevassistantrc similarity index 100% rename from src/tdevassistantrc rename to src/kdevassistantrc diff --git a/src/kdevassistantui.rc b/src/kdevassistantui.rc new file mode 100644 index 00000000..a5b202ce --- /dev/null +++ b/src/kdevassistantui.rc @@ -0,0 +1,168 @@ + + + + &File + + + + + + + + + + + + + + + + + + + + + + + + + + &View + + + + + + + + + + + + + + &Settings + + + + + + + + + + + + + + + + + + + + &Window + + + + + + + + + + + + + + + &Help + + + + + + Main Toolbar + + + + + + + + + + + + + + + + + Browser Toolbar + + + + + + + + + + + + + + + + diff --git a/src/kdevideextension.cpp b/src/kdevideextension.cpp new file mode 100644 index 00000000..7bfbf29f --- /dev/null +++ b/src/kdevideextension.cpp @@ -0,0 +1,129 @@ +/*************************************************************************** + * Copyright (C) 2004 by Alexander Dymo * + * adymo@kdevelop.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ +#include "kdevideextension.h" + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "api.h" +#include "settingswidget.h" + +KDevIDEExtension::KDevIDEExtension() + : ShellExtension() +{ +} + +void KDevIDEExtension::init() +{ + s_instance = new KDevIDEExtension(); +} + +void KDevIDEExtension::createGlobalSettingsPage(KDialogBase *dlg) +{ + TDEConfig* config = kapp->config(); + TQVBox *vbox = dlg->addVBoxPage(i18n("General"), i18n("General"), BarIcon("tdevelop", TDEIcon::SizeMedium) ); + gsw = new SettingsWidget(vbox, "general settings widget"); + + gsw->projectsURL->setMode((int)KFile::Directory); + + config->setGroup("General Options"); + gsw->lastProjectCheckbox->setChecked(config->readBoolEntry("Read Last Project On Startup",true)); + gsw->outputFont->setFont( config->readFontEntry( "OutputViewFont" ) ); + config->setGroup("MakeOutputView"); + gsw->lineWrappingCheckBox->setChecked(config->readBoolEntry("LineWrapping",true)); + gsw->dirNavigMsgCheckBox->setChecked(config->readBoolEntry("ShowDirNavigMsg",false)); + gsw->compileOutputCombo->setCurrentItem(config->readNumEntry("CompilerOutputLevel",2)); + gsw->forceCLocaleRadio->setChecked( config->readBoolEntry( "ForceCLocale", true ) ); + gsw->userLocaleRadio->setChecked( !config->readBoolEntry( "ForceCLocale", true ) ); + + config->setGroup("General Options"); + gsw->projectsURL->setURL(config->readPathEntry("DefaultProjectsDir", TQDir::homeDirPath()+"/")); + gsw->designerButtonGroup->setButton( config->readNumEntry( "DesignerApp", 0 ) ); + + TQString DesignerSetting = config->readEntry( "DesignerSetting", "ExternalDesigner" ); + gsw->qtDesignerRadioButton->setChecked( DesignerSetting == "ExternalDesigner" ); + gsw->seperateAppRadioButton->setChecked( DesignerSetting == "ExternalKDevDesigner" ); + gsw->embeddedDesignerRadioButton->setChecked( DesignerSetting == "EmbeddedKDevDesigner" ); + + config->setGroup("TerminalEmulator"); + gsw->terminalEdit->setText( config->readEntry( "TerminalApplication", TQString::fromLatin1("konsole") ) ); + bool useKDESetting = config->readBoolEntry( "UseKDESetting", true ); + gsw->useKDETerminal->setChecked( useKDESetting ); + gsw->useOtherTerminal->setChecked( !useKDESetting ); +} + +void KDevIDEExtension::acceptGlobalSettingsPage(KDialogBase *dlg) +{ + TDEConfig* config = kapp->config(); + + config->setGroup("General Options"); + config->writeEntry("DesignerApp", gsw->designerButtonGroup->selectedId()); + config->writeEntry("Read Last Project On Startup",gsw->lastProjectCheckbox->isChecked()); + config->writePathEntry("DefaultProjectsDir", gsw->projectsURL->url()); + config->writeEntry("OutputViewFont", gsw->outputFont->font()); + + TQString DesignerSetting; + if ( gsw->qtDesignerRadioButton->isChecked() ) DesignerSetting = "ExternalDesigner"; + if ( gsw->seperateAppRadioButton->isChecked() ) DesignerSetting = "ExternalKDevDesigner"; + if ( gsw->embeddedDesignerRadioButton->isChecked() ) DesignerSetting = "EmbeddedKDevDesigner"; + config->writeEntry( "DesignerSetting", DesignerSetting ); + + config->setGroup("MakeOutputView"); + config->writeEntry("LineWrapping",gsw->lineWrappingCheckBox->isChecked()); + config->writeEntry("ShowDirNavigMsg",gsw->dirNavigMsgCheckBox->isChecked()); + config->writeEntry( "ForceCLocale", gsw->forceCLocaleRadio->isChecked() ); + //current item id must be in sync with the enum! + config->writeEntry("CompilerOutputLevel",gsw->compileOutputCombo->currentItem()); + config->sync(); + if( KDevPlugin *makeExt = API::getInstance()->pluginController()->extension("TDevelop/MakeFrontend")) + { + static_cast(makeExt)->updateSettingsFromConfig(); + } + + config->setGroup("TerminalEmulator"); + config->writeEntry("UseKDESetting", gsw->useKDETerminal->isChecked() ); + config->writeEntry("TerminalApplication", gsw->terminalEdit->text().stripWhiteSpace() ); +} + +TQString KDevIDEExtension::xmlFile() +{ + return "tdevelopui.rc"; +} + +TQString KDevIDEExtension::defaultProfile() +{ + return "IDE"; +} diff --git a/src/kdevideextension.h b/src/kdevideextension.h new file mode 100644 index 00000000..1e25da7e --- /dev/null +++ b/src/kdevideextension.h @@ -0,0 +1,45 @@ +/*************************************************************************** + * Copyright (C) 2004 by Alexander Dymo * + * adymo@kdevelop.org * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + * * + * This program 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 General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with this program; if not, write to the * + * Free Software Foundation, Inc., * + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * + ***************************************************************************/ +#ifndef KDEVIDEEXTENSION_H +#define KDEVIDEEXTENSION_H + +#include + +class SettingsWidget; + +class KDevIDEExtension : public ShellExtension { +public: + static void init(); + + virtual void createGlobalSettingsPage(KDialogBase *dlg); + virtual void acceptGlobalSettingsPage(KDialogBase *dlg); + + virtual TQString xmlFile(); + + virtual TQString defaultProfile(); + +protected: + KDevIDEExtension(); + +private: + SettingsWidget *gsw; +}; + +#endif diff --git a/src/kdevpluginprofilerc b/src/kdevpluginprofilerc new file mode 100644 index 00000000..1c2abb92 --- /dev/null +++ b/src/kdevpluginprofilerc @@ -0,0 +1,52 @@ +[Plugin Profiles] +profiles=Profile_BASE,Profile_COMPILED,Profile_CPP,Profile_SCRIPT,Profile_WEB +default=Profile_BASE + +[Category] +Ada= +C= +C/GNOME= +C/GBA= +C/PalmOS= +C++=Profile_CPP +C++/Embedded=Profile_CPP +C++/KDE=Profile_CPP +C++/wxWidgets= +C++/KDevelop +C++/Generic +C++/GTK+ +C++/QMake= +PHP= +Database= +Shell= +Java= +Java/KDE= +Java/Ant= +Perl= +Ruby= +Python= +Fortran= +Haskell= +Pascal/Free Pascal= + +[Profile_BASE] +plugins=KDevFileView,KDevClassView,KDevBookmarks,KDevQuickOpen + +[Profile_COMPILED] +inherits=Profile_BASE +plugins= + +[Profile_CPP] +inherits=Profile_COMPILED +plugins=KDevDebugger + +[Profile_SCRIPT] +inherits=Profile_BASE +plugins= + +[Profile_WEB] +inherits=Profile_SCRIPT +plugins=KDevcopyto + + + diff --git a/src/languageselectwidget.cpp b/src/languageselectwidget.cpp index 67723b65..7a8695ff 100644 --- a/src/languageselectwidget.cpp +++ b/src/languageselectwidget.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include "domutil.h" #include "languageselectwidget.h" diff --git a/src/main.cpp b/src/main.cpp index 2df35f7e..6f27e415 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -18,7 +18,7 @@ #include "core.h" #include "projectmanager.h" -#include "tdevideextension.h" +#include "kdevideextension.h" static TDECmdLineOptions options[] = { @@ -86,15 +86,15 @@ int main(int argc, char *argv[]) TDEApplication app; - TDevIDEExtension::init(); + KDevIDEExtension::init(); - TDevSplashScreen *splash = 0; + KDevSplashScreen *splash = 0; TQString splashFile = locate("appdata", "pics/tdevelop-splash.png"); if (!splashFile.isEmpty()) { TQPixmap pm; pm.load(splashFile); - splash = new TDevSplashScreen( pm ); + splash = new KDevSplashScreen( pm ); } app.processEvents(); diff --git a/src/main_assistant.cpp b/src/main_assistant.cpp index 7cd9a98d..ba2c1886 100644 --- a/src/main_assistant.cpp +++ b/src/main_assistant.cpp @@ -18,7 +18,7 @@ #include "core.h" #include "projectmanager.h" -#include "tdevassistantextension.h" +#include "kdevassistantextension.h" static TDECmdLineOptions options[] = { @@ -30,7 +30,7 @@ static TDECmdLineOptions options[] = int main(int argc, char *argv[]) { static const char description[] = I18N_NOOP("The TDevelop Integrated Development Environment:\nassistant and documentation viewer"); - TDEAboutData aboutData("tdevassistant", I18N_NOOP("TDevelop Assistant"), + TDEAboutData aboutData("kdevassistant", I18N_NOOP("TDevelop Assistant"), VERSION, description, TDEAboutData::License_GPL, I18N_NOOP("(c) 1999-2007, The KDevelop developers"), "", "http://www.kdevelop.org"); aboutData.addAuthor("Alexander Dymo", I18N_NOOP("Release coordinator, Overall improvements, Pascal support, C++ support, New File and Documentation parts"), "adymo@kdevelop.org"); @@ -80,15 +80,15 @@ int main(int argc, char *argv[]) TDEApplication app; - TDevAssistantExtension::init(); + KDevAssistantExtension::init(); - TDevSplashScreen *splash = 0; - TQString splashFile = locate("data", "tdevelop/pics/tdevassistant-splash.png"); + KDevSplashScreen *splash = 0; + TQString splashFile = locate("data", "tdevelop/pics/kdevassistant-splash.png"); if (!splashFile.isEmpty()) { TQPixmap pm; pm.load(splashFile); - splash = new TDevSplashScreen( pm ); + splash = new KDevSplashScreen( pm ); } if (splash) splash->show(); @@ -109,7 +109,7 @@ int main(int argc, char *argv[]) if (splash) delete splash; - kapp->dcopClient()->registerAs("tdevassistant"); + kapp->dcopClient()->registerAs("kdevassistant"); return app.exec(); } diff --git a/src/mainwindowshare.cpp b/src/mainwindowshare.cpp index 8e44d7b7..a06dba14 100644 --- a/src/mainwindowshare.cpp +++ b/src/mainwindowshare.cpp @@ -55,11 +55,11 @@ #include "projectmanager.h" #include "core.h" #include "api.h" -#include "tdevmakefrontend.h" +#include "kdevmakefrontend.h" #include "toplevel.h" #include "plugincontroller.h" -#include "tdevplugininfo.h" +#include "kdevplugininfo.h" #include "mainwindowshare.h" @@ -120,8 +120,8 @@ void MainWindowShare::createActions() connect(m_stopProcesses->popupMenu(), TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotStopPopupActivated(int))); - connect( Core::getInstance(), TQT_SIGNAL(activeProcessChanged(TDevPlugin*, bool)), - this, TQT_SLOT(slotActiveProcessChanged(TDevPlugin*, bool)) ); + connect( Core::getInstance(), TQT_SIGNAL(activeProcessChanged(KDevPlugin*, bool)), + this, TQT_SLOT(slotActiveProcessChanged(KDevPlugin*, bool)) ); action = KStdAction::showMenubar( this, TQT_SLOT(slotShowMenuBar()), @@ -180,7 +180,7 @@ void MainWindowShare::createActions() m_configureEditorAction->setWhatsThis(i18n("Configure editor

    Opens editor configuration dialog.")); m_configureEditorAction->setEnabled( false ); - TDevPartController * partController = API::getInstance()->partController(); + KDevPartController * partController = API::getInstance()->partController(); connect( partController, TQT_SIGNAL(activePartChanged(KParts::Part*)), this, TQT_SLOT(slotActivePartChanged(KParts::Part* )) ); } @@ -236,7 +236,7 @@ void MainWindowShare::slotStopButtonPressed() Core::getInstance()->doEmitStopButtonPressed(); } -void MainWindowShare::slotActiveProcessChanged( TDevPlugin* plugin, bool active ) +void MainWindowShare::slotActiveProcessChanged( KDevPlugin* plugin, bool active ) { if ( !plugin ) return; @@ -251,7 +251,7 @@ void MainWindowShare::slotActiveProcessChanged( TDevPlugin* plugin, bool active void MainWindowShare::slotStopPopupActivated( int id ) { - TDevPlugin* plugin = activeProcesses.at( id ); + KDevPlugin* plugin = activeProcesses.at( id ); if ( plugin && plugin->info()->genericName() == m_stopProcesses->popupMenu()->text( id ) ) { Core::getInstance()->doEmitStopButtonPressed( plugin ); return; @@ -273,7 +273,7 @@ void MainWindowShare::slotStopMenuAboutToShow() popup->clear(); int i = 0; - for ( TDevPlugin* plugin = activeProcesses.first(); plugin; plugin = activeProcesses.next() ) { + for ( KDevPlugin* plugin = activeProcesses.first(); plugin; plugin = activeProcesses.next() ) { popup->insertItem( plugin->info()->genericName(), i++ ); } } @@ -325,7 +325,7 @@ void MainWindowShare::slotConfigureEditors() { kdDebug(9000) << " *** MainWindowShare::slotConfigureEditors()" << endl; - TDevPartController * partController = API::getInstance()->partController(); + KDevPartController * partController = API::getInstance()->partController(); KParts::Part * part = partController->activePart(); KTextEditor::ConfigInterface * conf = dynamic_cast( part ); diff --git a/src/mainwindowshare.h b/src/mainwindowshare.h index 7ac08bdb..a9ec620a 100644 --- a/src/mainwindowshare.h +++ b/src/mainwindowshare.h @@ -54,7 +54,7 @@ private slots: void slotConfigureNotifications(); void slotConfigureEditors(); void slotSettings(); - void slotActiveProcessChanged( TDevPlugin*, bool ); + void slotActiveProcessChanged( KDevPlugin*, bool ); void slotActivePartChanged( KParts::Part* part ); void slotStopPopupActivated(int); void slotStopMenuAboutToShow(); @@ -83,7 +83,7 @@ private: TDEToolBarPopupAction* m_stopProcesses; //!< Stops all running processes KParts::MainWindow* m_pMainWnd; - TQPtrList activeProcesses; + TQPtrList activeProcesses; }; #endif // __MAINWINDOWSHARE_H__ diff --git a/src/multibuffer.cpp b/src/multibuffer.cpp index 757eeab7..05a4d26f 100644 --- a/src/multibuffer.cpp +++ b/src/multibuffer.cpp @@ -32,7 +32,7 @@ #include "toplevel.h" #include "editorproxy.h" #include "partcontroller.h" -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" #include #include @@ -53,7 +53,7 @@ MultiBuffer::MultiBuffer( TQWidget *parent ) m_activeBuffer( 0 ) { EditorProxy::getInstance() ->registerEditor( this ); - if ( TDevLanguageSupport *lang = + if ( KDevLanguageSupport *lang = API::getInstance() ->languageSupport() ) { setOrientation( lang->splitOrientation() ); diff --git a/src/partcontroller.cpp b/src/partcontroller.cpp index 16bffcca..21b78a8c 100644 --- a/src/partcontroller.cpp +++ b/src/partcontroller.cpp @@ -54,14 +54,14 @@ #include "documentationpart.h" #include "ksavealldialog.h" -#include "tdevproject.h" +#include "kdevproject.h" #include "urlutil.h" #include "mimewarningdialog.h" #include "domutil.h" -#include "tdevjobtimer.h" +#include "kdevjobtimer.h" #include "designer.h" -#include "tdevlanguagesupport.h" +#include "kdevlanguagesupport.h" #include "multibuffer.h" #include "partcontroller.h" @@ -90,7 +90,7 @@ struct ModificationData PartController::PartController(TQWidget *parent) - : TDevPartController(parent), _editorFactory(0L), m_currentActivePart(0), m_removingActivePart(false) + : KDevPartController(parent), _editorFactory(0L), m_currentActivePart(0), m_removingActivePart(false) { connect(this, TQT_SIGNAL(partRemoved(KParts::Part*)), this, TQT_SLOT(slotPartRemoved(KParts::Part* )) ); connect(this, TQT_SIGNAL(partAdded(KParts::Part*)), this, TQT_SLOT(slotPartAdded(KParts::Part* )) ); @@ -348,7 +348,7 @@ void PartController::editDocumentInternal( const KURL & inputUrl, int lineNum, if ( !addToCurrentBuffer ) { - if ( TDevLanguageSupport *lang = + if ( KDevLanguageSupport *lang = API::getInstance()->languageSupport() ) { // Let the language part override the addToCurrentBuffer flag @@ -406,11 +406,11 @@ void PartController::editDocumentInternal( const KURL & inputUrl, int lineNum, DesignerSetting = DomUtil::readEntry(*dom, "/kdevcppsupport/qt/designerintegration", DesignerSetting ); designerExec = DomUtil::readEntry(*dom, "/kdevcppsupport/qt/designer", designerExec ); } - if ( DesignerSetting == "ExternalTDevDesigner" ) + if ( DesignerSetting == "ExternalKDevDesigner" ) { - designerExec = "tdevdesigner"; + designerExec = "kdevdesigner"; } - else if ( DesignerSetting == "EmbeddedTDevDesigner" ) + else if ( DesignerSetting == "EmbeddedKDevDesigner" ) { if ( KParts::ReadOnlyPart *designerPart = qtDesignerPart() ) { @@ -419,12 +419,12 @@ void PartController::editDocumentInternal( const KURL & inputUrl, int lineNum, designerPart->openURL(url); return; } - else if ( KParts::Factory * TDevDesignerFactory = static_cast( KLibLoader::self()->factory( TQFile::encodeName( "libtdevdesignerpart" ) ) ) ) + else if ( KParts::Factory * KDevDesignerFactory = static_cast( KLibLoader::self()->factory( TQFile::encodeName( "libkdevdesignerpart" ) ) ) ) { - KParts::ReadWritePart * tdevpart = static_cast( TDevDesignerFactory->createPart( TopLevel::getInstance()->main(), 0, 0, 0, "KParts::ReadWritePart" ) ); - tdevpart->openURL( url ); + KParts::ReadWritePart * kdevpart = static_cast( KDevDesignerFactory->createPart( TopLevel::getInstance()->main(), 0, 0, 0, "KParts::ReadWritePart" ) ); + kdevpart->openURL( url ); addHistoryEntry(); - integratePart( tdevpart, url ); + integratePart( kdevpart, url ); m_openRecentAction->addURL( url ); m_openRecentAction->saveEntries( kapp->config(), "RecentFiles" ); return; @@ -1386,7 +1386,7 @@ void PartController::slotDocumentDirty( Kate::Document * d, bool isModified, uns p->doc = doc; p->isModified = isModified; p->reason = reason; - TDevJobTimer::singleShot( 0, this, TQT_SLOT(slotDocumentDirtyStepTwo(void*)), p ); + KDevJobTimer::singleShot( 0, this, TQT_SLOT(slotDocumentDirtyStepTwo(void*)), p ); } } diff --git a/src/partcontroller.h b/src/partcontroller.h index 064c6ef6..2e621c38 100644 --- a/src/partcontroller.h +++ b/src/partcontroller.h @@ -1,7 +1,7 @@ #ifndef __PARTCONTROLLER_H__ #define __PARTCONTROLLER_H__ -#include "tdevpartcontroller.h" +#include "kdevpartcontroller.h" #include #include @@ -40,7 +40,7 @@ class KDirWatch; /** Part controler implementation. */ -class PartController : public TDevPartController +class PartController : public KDevPartController { Q_OBJECT @@ -51,7 +51,7 @@ public: static void createInstance(TQWidget *parent); static PartController *getInstance(); - ///// TDevPartController interface + ///// KDevPartController interface void setEncoding(const TQString &encoding); void editDocument(const KURL &inputUrl, int lineNum=-1, int col=-1); diff --git a/src/plugincontroller.cpp b/src/plugincontroller.cpp index 7b6410b7..30aa9171 100644 --- a/src/plugincontroller.cpp +++ b/src/plugincontroller.cpp @@ -19,14 +19,14 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -77,7 +77,7 @@ PluginController *PluginController::getInstance() PluginController::PluginController() - : TDevPluginController() + : KDevPluginController() { /* m_defaultProfile = TQString::fromLatin1( "FullIDE" ); m_defaultProfilePath = kapp->dirs()->localtdedir() + "/" + @@ -149,7 +149,7 @@ void PluginController::loadPlugins( TDETrader::OfferList offers, const TQStringL emit loadingPlugin(i18n("Loading: %1").arg((*it)->genericName())); - TDevPlugin *plugin = loadPlugin( *it ); + KDevPlugin *plugin = loadPlugin( *it ); if ( plugin ) { m_parts.insert( name, plugin ); @@ -160,9 +160,9 @@ void PluginController::loadPlugins( TDETrader::OfferList offers, const TQStringL void PluginController::unloadPlugins() { - for( TQDictIterator it( m_parts ); !it.isEmpty(); ) + for( TQDictIterator it( m_parts ); !it.isEmpty(); ) { - TDevPlugin* part = it.current(); + KDevPlugin* part = it.current(); removePart( part ); m_parts.remove( it.currentKey() ); delete part; @@ -180,7 +180,7 @@ void PluginController::unloadProjectPlugins( ) { TQString name = (*it)->desktopEntryName(); - if ( TDevPlugin * plugin = m_parts[ name ] ) + if ( KDevPlugin * plugin = m_parts[ name ] ) { kdDebug(9000) << " *** Removing: " << name << endl; removeAndForgetPart( name, plugin ); @@ -194,7 +194,7 @@ void PluginController::unloadPlugins( TQStringList const & unloadParts ) TQStringList::ConstIterator it = unloadParts.begin(); while ( it != unloadParts.end() ) { - TDevPlugin* part = m_parts[ *it ]; + KDevPlugin* part = m_parts[ *it ]; if( part ) { kdDebug(9000) << " *** Removing: " << *it << endl; @@ -206,11 +206,11 @@ void PluginController::unloadPlugins( TQStringList const & unloadParts ) } } -TDevPlugin *PluginController::loadPlugin( const KService::Ptr &service ) +KDevPlugin *PluginController::loadPlugin( const KService::Ptr &service ) { int err = 0; - TDevPlugin * pl = KParts::ComponentFactory - ::createInstanceFromService( service, API::getInstance(), 0, + KDevPlugin * pl = KParts::ComponentFactory + ::createInstanceFromService( service, API::getInstance(), 0, argumentsFromService( service ), &err ); if (!pl) { @@ -248,7 +248,7 @@ void PluginController::integratePart(KXMLGUIClient *part) TopLevel::getInstance()->main()->actionCollection(), TQT_SIGNAL( actionStatusText( const TQString & ) ) ); } -void PluginController::integrateAndRememberPart(const TQString &name, TDevPlugin *part) +void PluginController::integrateAndRememberPart(const TQString &name, KDevPlugin *part) { m_parts.insert(name, part); integratePart(part); @@ -260,17 +260,17 @@ void PluginController::removePart(KXMLGUIClient *part) TopLevel::getInstance()->main()->guiFactory()->removeClient(part); } -void PluginController::removeAndForgetPart(const TQString &name, TDevPlugin *part) +void PluginController::removeAndForgetPart(const TQString &name, KDevPlugin *part) { kdDebug() << "removing: " << name << endl; m_parts.remove(name); removePart(part); } -const TQValueList PluginController::loadedPlugins() +const TQValueList PluginController::loadedPlugins() { - TQValueList plugins; - TQDictIterator itt(m_parts); + TQValueList plugins; + TQDictIterator itt(m_parts); while( itt.current() ) { plugins.append( itt.current() ); @@ -279,26 +279,26 @@ const TQValueList PluginController::loadedPlugins() return plugins; } -TDevPlugin * PluginController::extension( const TQString & serviceType, const TQString & constraint ) +KDevPlugin * PluginController::extension( const TQString & serviceType, const TQString & constraint ) { - TDETrader::OfferList offers = TDevPluginController::query(serviceType, constraint); + TDETrader::OfferList offers = KDevPluginController::query(serviceType, constraint); for (TDETrader::OfferList::const_iterator it = offers.constBegin(); it != offers.end(); ++it) { - TDevPlugin *ext = m_parts[(*it)->desktopEntryName()]; + KDevPlugin *ext = m_parts[(*it)->desktopEntryName()]; if (ext) return ext; } return 0; } -TDevPlugin * PluginController::loadPlugin( const TQString & serviceType, const TQString & constraint ) +KDevPlugin * PluginController::loadPlugin( const TQString & serviceType, const TQString & constraint ) { - TDETrader::OfferList offers = TDevPluginController::query( serviceType, constraint ); + TDETrader::OfferList offers = KDevPluginController::query( serviceType, constraint ); if ( !offers.size() == 1 ) return 0; TDETrader::OfferList::const_iterator it = offers.constBegin(); TQString name = (*it)->desktopEntryName(); - TDevPlugin * plugin = 0; + KDevPlugin * plugin = 0; if ( plugin = m_parts[ name ] ) { return plugin; @@ -372,12 +372,12 @@ void PluginController::selectPlugins( ) } /* -TDevPlugin * PluginController::getPlugin( const KService::Ptr & service ) +KDevPlugin * PluginController::getPlugin( const KService::Ptr & service ) { - TDevPlugin * plugin = m_parts[ (*it)->name() ]; + KDevPlugin * plugin = m_parts[ (*it)->name() ]; if ( !plugin ) { - TDevPlugin * plugin = loadPlugin( *it ); + KDevPlugin * plugin = loadPlugin( *it ); if ( plugin ) { integratePart( plugin ); diff --git a/src/plugincontroller.h b/src/plugincontroller.h index eb635bb6..d5c3f423 100644 --- a/src/plugincontroller.h +++ b/src/plugincontroller.h @@ -6,13 +6,13 @@ #include -#include +#include #include class KXMLGUIClient; class KService; -class TDevPlugin; +class KDevPlugin; class KDialogBase; class ProjectInfo; @@ -20,7 +20,7 @@ class ProjectInfo; Plugin controller implementation. Loads and unloads plugins. */ -class PluginController : public TDevPluginController +class PluginController : public KDevPluginController { Q_OBJECT @@ -33,7 +33,7 @@ public: static TQStringList argumentsFromService( const KService::Ptr &service ); - virtual TDevPlugin * loadPlugin( const TQString & serviceType, const TQString & constraint ); + virtual KDevPlugin * loadPlugin( const TQString & serviceType, const TQString & constraint ); virtual void unloadPlugin( const TQString & plugin ); TQString currentProfile() const { return m_profile; } @@ -45,18 +45,18 @@ public: void loadGlobalPlugins( const TQStringList & ignorePlugins = TQStringList() ); - // TDevPlugin * getPlugin( const KService::Ptr &service ); + // KDevPlugin * getPlugin( const KService::Ptr &service ); - virtual TDevPlugin *extension(const TQString &serviceType, const TQString &constraint = ""); + virtual KDevPlugin *extension(const TQString &serviceType, const TQString &constraint = ""); void unloadPlugins( TQStringList const & ); void integratePart(KXMLGUIClient *part); - void integrateAndRememberPart(const TQString &name, TDevPlugin *part); + void integrateAndRememberPart(const TQString &name, KDevPlugin *part); void removePart(KXMLGUIClient* part); - void removeAndForgetPart(const TQString &name, TDevPlugin* part); + void removeAndForgetPart(const TQString &name, KDevPlugin* part); - const TQValueList loadedPlugins(); + const TQValueList loadedPlugins(); ProfileEngine &engine() { return m_engine; } @@ -82,10 +82,10 @@ private slots: void unloadPlugins(); private: - static TDevPlugin *loadPlugin( const KService::Ptr &service ); + static KDevPlugin *loadPlugin( const KService::Ptr &service ); - TQDict m_parts; + TQDict m_parts; TQString m_profile; static PluginController *s_instance; diff --git a/src/pluginselectdialog.cpp b/src/pluginselectdialog.cpp index 4f32a37d..2f896b51 100644 --- a/src/pluginselectdialog.cpp +++ b/src/pluginselectdialog.cpp @@ -18,7 +18,7 @@ #include #include -#include "tdevplugin.h" +#include "kdevplugin.h" #include "projectmanager.h" #include "plugincontroller.h" #include "pluginselectdialog.h" @@ -109,9 +109,9 @@ void PluginSelectDialog::itemSelected( TQListViewItem * item ) void PluginSelectDialog::init( ) { - const TQValueList loadedPlugins = PluginController::getInstance()->loadedPlugins(); + const TQValueList loadedPlugins = PluginController::getInstance()->loadedPlugins(); TQStringList loadedPluginDesktopNames; - TQValueList::ConstIterator it = loadedPlugins.begin(); + TQValueList::ConstIterator it = loadedPlugins.begin(); while( it != loadedPlugins.end() ) { loadedPluginDesktopNames << (*it)->instance()->instanceName(); diff --git a/src/profileengine/editor/CMakeLists.txt b/src/profileengine/editor/CMakeLists.txt index 443da696..cfd7c59c 100644 --- a/src/profileengine/editor/CMakeLists.txt +++ b/src/profileengine/editor/CMakeLists.txt @@ -21,9 +21,9 @@ link_directories( ) -##### tdevprofileeditor (executable) ############ +##### kdevprofileeditor (executable) ############ -tde_add_executable( tdevprofileeditor +tde_add_executable( kdevprofileeditor SOURCES main.cpp LINK profileeditor-static profileengine-shared tdeio-shared DESTINATION ${BIN_INSTALL_DIR} diff --git a/src/profileengine/editor/Makefile.am b/src/profileengine/editor/Makefile.am index fae89b48..26f69be6 100644 --- a/src/profileengine/editor/Makefile.am +++ b/src/profileengine/editor/Makefile.am @@ -12,11 +12,11 @@ libprofileeditor_la_SOURCES = profileeditorbase.ui profileeditor.cpp \ noinst_HEADERS = profileeditor.h -bin_PROGRAMS = tdevprofileeditor -tdevprofileeditor_LDFLAGS = $(all_libraries) -tdevprofileeditor_LDADD = \ +bin_PROGRAMS = kdevprofileeditor +kdevprofileeditor_LDFLAGS = $(all_libraries) +kdevprofileeditor_LDADD = \ $(top_builddir)/src/profileengine/lib/libprofileengine.la libprofileeditor.la \ $(LIB_TDEUI) $(LIB_TDEIO) -tdevprofileeditor_SOURCES = main.cpp +kdevprofileeditor_SOURCES = main.cpp diff --git a/src/profileengine/editor/main.cpp b/src/profileengine/editor/main.cpp index 68e942d7..46d128f3 100644 --- a/src/profileengine/editor/main.cpp +++ b/src/profileengine/editor/main.cpp @@ -30,7 +30,7 @@ static TDECmdLineOptions options[] = int main(int argc, char **argv) { - TDEAboutData about("tdevprofileeditor", I18N_NOOP("TDevelop Profile Editor"), "1", "", + TDEAboutData about("kdevprofileeditor", I18N_NOOP("TDevelop Profile Editor"), "1", "", TDEAboutData::License_GPL, I18N_NOOP("(c) 2004, The KDevelop Developers"), 0, 0, ""); about.addAuthor("Alexander Dymo", 0, "adymo@kdevelop.org"); TDECmdLineArgs::init(argc, argv, &about); diff --git a/src/profileengine/lib/Makefile.am b/src/profileengine/lib/Makefile.am index 66b1f159..08b6e7ad 100644 --- a/src/profileengine/lib/Makefile.am +++ b/src/profileengine/lib/Makefile.am @@ -10,7 +10,7 @@ libprofileengine_la_SOURCES = profileengine.cpp profile.cpp profileincludedir = $(includedir)/tdevelop/shell/profileengine profileinclude_HEADERS = profileengine.h profile.h -DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils tdevutil tdevinterfaces -DOXYGEN_PROJECTNAME = TDevelop Shell Profiles Library -DOXYGEN_DOCDIRPREFIX = tdevprofiles +DOXYGEN_REFERENCES = dcop interfaces tdecore tdefx tdeui tdehtml tdemdi tdeio kjs tdeparts tdeutils kdevutil kdevinterfaces +DOXYGEN_PROJECTNAME = KDevelop Shell Profiles Library +DOXYGEN_DOCDIRPREFIX = kdevprofiles include ../../../Doxyfile.am diff --git a/src/profileengine/lib/profileengine.cpp b/src/profileengine/lib/profileengine.cpp index 8678732e..fd4d06fa 100644 --- a/src/profileengine/lib/profileengine.cpp +++ b/src/profileengine/lib/profileengine.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include ProfileEngine::ProfileEngine() { diff --git a/src/profileengine/lib/profileengine.h b/src/profileengine/lib/profileengine.h index d630f576..36d85697 100644 --- a/src/profileengine/lib/profileengine.h +++ b/src/profileengine/lib/profileengine.h @@ -61,27 +61,27 @@ public: /** Profile engine. -- Uses TDevelop profiles to form lists of plugin offers; +- Uses KDevelop profiles to form lists of plugin offers; - Provides means of managing profiles; - Provides means to access the resources provided by a profile. -TDevelop profiles form a tree with a root profile named "TDevelop". +KDevelop profiles form a tree with a root profile named "KDevelop". For example, such profiles tree can look as: @code -TDevelop +KDevelop - IDE - CompiledLanguageIDE - AdaIDE - CandCppIDE - CIDE - CppIDE - - TDECppIDE + - KDECppIDE - FortranIDE ... - DatabaseIDE - ScriptingLanguageIDE .. -- TDevAssistant +- KDevAssistant @endcode To manage a tree of profiles, use @ref ProfileEngine::walkProfiles methods. */ @@ -92,7 +92,7 @@ public: /**Type of the plugin offer. Engine will usually find profiles and return offers of selected type. - @sa TDevPlugin class documentation for more information of plugin types.*/ + @sa KDevPlugin class documentation for more information of plugin types.*/ enum OfferType { Global /**= 2 +# +################################################# + +install( FILES + profile.config + DESTINATION ${DATA_INSTALL_DIR}/tdevelop/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/KDECppIDE ) diff --git a/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/KDECppIDE/Makefile.am b/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/KDECppIDE/Makefile.am new file mode 100644 index 00000000..5e5e943e --- /dev/null +++ b/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/KDECppIDE/Makefile.am @@ -0,0 +1,3 @@ +profilesdir = $(kde_datadir)/tdevelop/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/KDECppIDE +profiles_DATA = profile.config + diff --git a/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/TDECppIDE/profile.config b/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/KDECppIDE/profile.config similarity index 100% rename from src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/TDECppIDE/profile.config rename to src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/KDECppIDE/profile.config diff --git a/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/Makefile.am b/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/Makefile.am index fc781b15..79978385 100644 --- a/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/Makefile.am +++ b/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/Makefile.am @@ -1,3 +1,3 @@ profilesdir = $(kde_datadir)/tdevelop/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE profiles_DATA = profile.config -SUBDIRS = TDECppIDE +SUBDIRS = KDECppIDE diff --git a/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/TDECppIDE/CMakeLists.txt b/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/TDECppIDE/CMakeLists.txt deleted file mode 100644 index a364b7a9..00000000 --- a/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/TDECppIDE/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -install( FILES - profile.config - DESTINATION ${DATA_INSTALL_DIR}/tdevelop/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/TDECppIDE ) diff --git a/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/TDECppIDE/Makefile.am b/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/TDECppIDE/Makefile.am deleted file mode 100644 index 9368caac..00000000 --- a/src/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/TDECppIDE/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -profilesdir = $(kde_datadir)/tdevelop/profiles/IDE/CompiledLanguageIDE/CandCppIDE/CppIDE/TDECppIDE -profiles_DATA = profile.config - diff --git a/src/profiles/IDE/ScriptingLanguageIDE/RubyIDE/profile.config b/src/profiles/IDE/ScriptingLanguageIDE/RubyIDE/profile.config index 99a52802..5e58c161 100644 --- a/src/profiles/IDE/ScriptingLanguageIDE/RubyIDE/profile.config +++ b/src/profiles/IDE/ScriptingLanguageIDE/RubyIDE/profile.config @@ -1,5 +1,5 @@ [Disable] -List=tdevfilelist,kdevsnippet,kdevvalgrind,kdevastyle,kdevctags2,kdevsecurity,kdevregexptest +List=kdevfilelist,kdevsnippet,kdevvalgrind,kdevastyle,kdevctags2,kdevsecurity,kdevregexptest [Enable] List= diff --git a/src/profiles/KDevAssistant/CMakeLists.txt b/src/profiles/KDevAssistant/CMakeLists.txt new file mode 100644 index 00000000..1f22e2e7 --- /dev/null +++ b/src/profiles/KDevAssistant/CMakeLists.txt @@ -0,0 +1,14 @@ +################################################# +# +# (C) 2010-2011 Serghei Amelian +# serghei (DOT) amelian (AT) gmail.com +# +# Improvements and feedback are welcome +# +# This file is released under GPL >= 2 +# +################################################# + +install( FILES + profile.config + DESTINATION ${DATA_INSTALL_DIR}/tdevelop/profiles/KDevAssistant ) diff --git a/src/profiles/KDevAssistant/Makefile.am b/src/profiles/KDevAssistant/Makefile.am new file mode 100644 index 00000000..dda1dd47 --- /dev/null +++ b/src/profiles/KDevAssistant/Makefile.am @@ -0,0 +1,3 @@ +profilesdir = $(kde_datadir)/tdevelop/profiles/KDevAssistant +profiles_DATA = profile.config + diff --git a/src/profiles/TDevAssistant/profile.config b/src/profiles/KDevAssistant/profile.config similarity index 100% rename from src/profiles/TDevAssistant/profile.config rename to src/profiles/KDevAssistant/profile.config diff --git a/src/profiles/Makefile.am b/src/profiles/Makefile.am index 34789723..3e0a706a 100644 --- a/src/profiles/Makefile.am +++ b/src/profiles/Makefile.am @@ -1,3 +1,3 @@ profilesdir = $(kde_datadir)/tdevelop/profiles profiles_DATA = profile.config -SUBDIRS = IDE TDevAssistant +SUBDIRS = IDE KDevAssistant diff --git a/src/profiles/TDevAssistant/CMakeLists.txt b/src/profiles/TDevAssistant/CMakeLists.txt deleted file mode 100644 index c6f5900f..00000000 --- a/src/profiles/TDevAssistant/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -install( FILES - profile.config - DESTINATION ${DATA_INSTALL_DIR}/tdevelop/profiles/TDevAssistant ) diff --git a/src/profiles/TDevAssistant/Makefile.am b/src/profiles/TDevAssistant/Makefile.am deleted file mode 100644 index 39590a36..00000000 --- a/src/profiles/TDevAssistant/Makefile.am +++ /dev/null @@ -1,3 +0,0 @@ -profilesdir = $(kde_datadir)/tdevelop/profiles/TDevAssistant -profiles_DATA = profile.config - diff --git a/src/projectmanager.cpp b/src/projectmanager.cpp index 3ced0d63..c0380ffb 100644 --- a/src/projectmanager.cpp +++ b/src/projectmanager.cpp @@ -30,11 +30,11 @@ class TQDomDocument; #include #include -#include "tdevproject.h" -#include "tdevlanguagesupport.h" -#include "tdevplugin.h" -#include "tdevcreatefile.h" -#include "tdevversioncontrol.h" +#include "kdevproject.h" +#include "kdevlanguagesupport.h" +#include "kdevplugin.h" +#include "kdevcreatefile.h" +#include "kdevversioncontrol.h" #include "toplevel.h" @@ -97,7 +97,7 @@ void ProjectManager::createActions( TDEActionCollection* ac ) this, TQT_SLOT(slotOpenProject()), ac, "project_open"); action->setToolTip( i18n("Open project")); - action->setWhatsThis(i18n("Open project

    Opens a KDevelop3 or TDevelop2 project.")); + action->setWhatsThis(i18n("Open project

    Opens a KDevelop3 or KDevelop2 project.")); m_openRecentProjectAction = new TDERecentFilesAction(i18n("Open &Recent Project"), 0, @@ -137,8 +137,8 @@ void ProjectManager::slotOpenProject() if( url.isEmpty() ) return; - if (url.path().endsWith("tdevprj")) - loadTDevelop2Project( url ); + if (url.path().endsWith("kdevprj")) + loadKDevelop2Project( url ); else loadProject( url ); } @@ -490,8 +490,8 @@ bool ProjectManager::loadProjectPart() return false; } - TDevProject *projectPart = KParts::ComponentFactory - ::createInstanceFromService< TDevProject >( projectService, API::getInstance(), 0, + KDevProject *projectPart = KParts::ComponentFactory + ::createInstanceFromService< KDevProject >( projectService, API::getInstance(), 0, PluginController::argumentsFromService( projectService ) ); if ( !projectPart ) { KMessageBox::sorry(TopLevel::getInstance()->main(), @@ -517,7 +517,7 @@ bool ProjectManager::loadProjectPart() void ProjectManager::unloadProjectPart() { - TDevProject *projectPart = API::getInstance()->project(); + KDevProject *projectPart = API::getInstance()->project(); if( !projectPart ) return; PluginController::getInstance()->removePart( projectPart ); projectPart->closeProject(); @@ -547,8 +547,8 @@ bool ProjectManager::loadLanguageSupport(const TQString& lang) } KService::Ptr languageSupportService = *languageSupportOffers.begin(); - TDevLanguageSupport *langSupport = KParts::ComponentFactory - ::createInstanceFromService( languageSupportService, + KDevLanguageSupport *langSupport = KParts::ComponentFactory + ::createInstanceFromService( languageSupportService, API::getInstance(), 0, PluginController::argumentsFromService( languageSupportService ) ); @@ -569,7 +569,7 @@ bool ProjectManager::loadLanguageSupport(const TQString& lang) void ProjectManager::unloadLanguageSupport() { - TDevLanguageSupport *langSupport = API::getInstance()->languageSupport(); + KDevLanguageSupport *langSupport = API::getInstance()->languageSupport(); if( !langSupport ) return; kdDebug(9000) << "Language support for " << langSupport->name() << " unloading..." << endl; PluginController::getInstance()->removePart( langSupport ); @@ -611,14 +611,14 @@ ProjectSession* ProjectManager::projectSession() const return m_pProjectSession; } -bool ProjectManager::loadTDevelop2Project( const KURL & url ) +bool ProjectManager::loadKDevelop2Project( const KURL & url ) { if( !url.isValid() || !url.isLocalFile() ){ KMessageBox::sorry(0, i18n("Invalid URL.")); return false; } - TQString cmd = TDEGlobal::dirs()->findExe( "tdevprj2tdevelop" ); + TQString cmd = TDEGlobal::dirs()->findExe( "kdevprj2tdevelop" ); if (cmd.isEmpty()) { KMessageBox::sorry(0, i18n("You do not have 'kdevprj2tdevelop' installed.")); return false; diff --git a/src/projectmanager.h b/src/projectmanager.h index 3c1b3599..3a92409e 100644 --- a/src/projectmanager.h +++ b/src/projectmanager.h @@ -17,7 +17,7 @@ class KService; class ProjectInfo; class ProjectSession; class TDERecentFilesAction; -class TDevPlugin; +class KDevPlugin; class ProjectInfo @@ -65,7 +65,7 @@ public: public slots: bool loadProject( const KURL& url); - bool loadTDevelop2Project( const KURL& url); + bool loadKDevelop2Project( const KURL& url); bool closeProject( bool exiting = false ); private slots: @@ -102,7 +102,7 @@ private: ProjectSession* m_pProjectSession; - TDevPlugin *m_vcsPlugin; + KDevPlugin *m_vcsPlugin; TQString m_vcsName; TQString m_oldProfileName; diff --git a/src/projectprofiles b/src/projectprofiles index b86f9b25..d2224272 100644 --- a/src/projectprofiles +++ b/src/projectprofiles @@ -8,8 +8,8 @@ Profiles=ShellIDE Profiles=CIDE [C++] -Keywords=Empty,TDE -Profiles=CppIDE,TDECppIDE +Keywords=Empty,KDE +Profiles=CppIDE,KDECppIDE [Fortran77] Profiles=FortranIDE diff --git a/src/projectsession.cpp b/src/projectsession.cpp index 1b8173fc..afdaf0b5 100644 --- a/src/projectsession.cpp +++ b/src/projectsession.cpp @@ -34,7 +34,7 @@ #include "domutil.h" #include "documentationpart.h" #include "toplevel.h" -#include "tdevplugin.h" +#include "kdevplugin.h" #include "projectsession.h" #include "projectsession.moc" @@ -68,7 +68,7 @@ void ProjectSession::initXMLTree() } //--------------------------------------------------------------------------- -bool ProjectSession::restoreFromFile( const TQString & sessionFileName, const TQValueList< TDevPlugin * > plugins ) +bool ProjectSession::restoreFromFile( const TQString & sessionFileName, const TQValueList< KDevPlugin * > plugins ) { bool bFileOpenOK = true; @@ -105,10 +105,10 @@ bool ProjectSession::restoreFromFile( const TQString & sessionFileName, const TQ // now also let the plugins load their session stuff TQDomElement pluginListEl = session.namedItem("pluginList").toElement(); - TQValueList::ConstIterator it = plugins.begin(); + TQValueList::ConstIterator it = plugins.begin(); while( it != plugins.end() ) { - TDevPlugin* pPlugin = (*it); + KDevPlugin* pPlugin = (*it); TQString pluginName = pPlugin->instance()->instanceName(); TQDomElement pluginEl = pluginListEl.namedItem(pluginName).toElement(); if (!pluginEl.isNull()) { @@ -230,7 +230,7 @@ void ProjectSession::recreateViews(KURL& url, TQDomElement docEl, bool activate) } //--------------------------------------------------------------------------- -bool ProjectSession::saveToFile( const TQString & sessionFileName, const TQValueList< TDevPlugin * > plugins ) +bool ProjectSession::saveToFile( const TQString & sessionFileName, const TQValueList< KDevPlugin * > plugins ) { TQString section, keyword; TQDomElement session = domdoc.documentElement(); @@ -390,10 +390,10 @@ bool ProjectSession::saveToFile( const TQString & sessionFileName, const TQValue } } - TQValueList::ConstIterator itt = plugins.begin(); + TQValueList::ConstIterator itt = plugins.begin(); while( itt != plugins.end() ) { - TDevPlugin* pPlugin = (*itt); + KDevPlugin* pPlugin = (*itt); TQString pluginName = pPlugin->instance()->instanceName(); TQDomElement pluginEl = domdoc.createElement(pluginName); diff --git a/src/projectsession.h b/src/projectsession.h index 64101496..e386bdbc 100644 --- a/src/projectsession.h +++ b/src/projectsession.h @@ -24,7 +24,7 @@ class TQWidget; class KURL; -class TDevPlugin; +class KDevPlugin; /** * This class stores and restores the last situation before the certain project @@ -42,10 +42,10 @@ public: virtual ~ProjectSession(); /** Opens the .kdevses file and saves the project session in XML format to it. */ - bool saveToFile(const TQString& fileName, const TQValueList plugins ); + bool saveToFile(const TQString& fileName, const TQValueList plugins ); /** Opens the .kdevses file and loads the project session from it. */ - bool restoreFromFile(const TQString& fileName, const TQValueList plugins ); + bool restoreFromFile(const TQString& fileName, const TQValueList plugins ); signals: void sig_restoreMainWindowProperties(const TQDomElement* el); diff --git a/src/simplemainwindow.cpp b/src/simplemainwindow.cpp index f82f4882..3c9db000 100644 --- a/src/simplemainwindow.cpp +++ b/src/simplemainwindow.cpp @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include "api.h" @@ -81,7 +81,7 @@ void SimpleMainWindow::init() createFramework(); createActions(); - new TDevStatusBar(this); + new KDevStatusBar(this); setAcceptDrops(true); @@ -466,7 +466,7 @@ void SimpleMainWindow::createActions() void SimpleMainWindow::raiseEditor() { kdDebug() << "SimpleMainWindow::raiseEditor" << endl; - TDevPartController *partcontroller = API::getInstance()->partController(); + KDevPartController *partcontroller = API::getInstance()->partController(); if (partcontroller->activePart() && partcontroller->activePart()->widget()) partcontroller->activePart()->widget()->setFocus(); } @@ -983,7 +983,7 @@ void SimpleMainWindow::setCaption(const TQString &caption) modified = ( state == Modified || state == DirtyAndModified ); } - TDevProject *project = API::getInstance()->project(); + KDevProject *project = API::getInstance()->project(); if (project) { TQString projectname = project->projectName(); diff --git a/src/simplemainwindow.h b/src/simplemainwindow.h index 1f80119f..7dbf5695 100644 --- a/src/simplemainwindow.h +++ b/src/simplemainwindow.h @@ -21,9 +21,9 @@ #define SIMPLEMAINWINDOW_H #include -#include -#include -#include +#include +#include +#include class TDEAction; class TQPopupMenu; @@ -34,7 +34,7 @@ namespace KParts { class ReadOnlyPart; } -class SimpleMainWindow: public DMainWindow, public TDevMainWindow { +class SimpleMainWindow: public DMainWindow, public KDevMainWindow { Q_OBJECT public: diff --git a/src/splashscreen.cpp b/src/splashscreen.cpp index 446705b8..205656bd 100644 --- a/src/splashscreen.cpp +++ b/src/splashscreen.cpp @@ -10,7 +10,7 @@ #include #include -TDevSplashScreen::TDevSplashScreen(const TQPixmap& pixmap, WFlags f) : TQSplashScreen(pixmap, f) +KDevSplashScreen::KDevSplashScreen(const TQPixmap& pixmap, WFlags f) : TQSplashScreen(pixmap, f) { TQTimer *timer = new TQTimer( this ); TQObject::connect(timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(animate())); @@ -21,19 +21,19 @@ TDevSplashScreen::TDevSplashScreen(const TQPixmap& pixmap, WFlags f) : TQSplashS } -TDevSplashScreen::~TDevSplashScreen() +KDevSplashScreen::~KDevSplashScreen() { } -void TDevSplashScreen::animate() +void KDevSplashScreen::animate() { state = ((state + 1) % (2*progress_bar_size-1)); repaint(); } -void TDevSplashScreen::message( const TQString &str, int flags, const TQColor &color) +void KDevSplashScreen::message( const TQString &str, int flags, const TQColor &color) { TQSplashScreen::message(str,flags,color); animate(); @@ -41,7 +41,7 @@ void TDevSplashScreen::message( const TQString &str, int flags, const TQColor &c } -void TDevSplashScreen::drawContents (TQPainter* painter) +void KDevSplashScreen::drawContents (TQPainter* painter) { int position; TQColor base_color (201,229,165); // Base green color diff --git a/src/splashscreen.h b/src/splashscreen.h index 11a329bc..b8d5563c 100644 --- a/src/splashscreen.h +++ b/src/splashscreen.h @@ -11,14 +11,14 @@ class TQPixmap; /** Splash screen. */ -class TDevSplashScreen : public TQSplashScreen +class KDevSplashScreen : public TQSplashScreen { Q_OBJECT public: - TDevSplashScreen(const TQPixmap& pixmap, WFlags f = 0); - virtual ~TDevSplashScreen(); + KDevSplashScreen(const TQPixmap& pixmap, WFlags f = 0); + virtual ~KDevSplashScreen(); protected: void drawContents (TQPainter * painter); diff --git a/src/statusbar.cpp b/src/statusbar.cpp index e1f8f3b5..b4e11769 100644 --- a/src/statusbar.cpp +++ b/src/statusbar.cpp @@ -27,7 +27,7 @@ #include "statusbar.h" #include "partcontroller.h" -TDevStatusBar::TDevStatusBar(TQWidget *parent, const char *name) +KDevStatusBar::KDevStatusBar(TQWidget *parent, const char *name) : KStatusBar(parent, name), _cursorIface(0), _activePart(0) { TQWidget * w = new TQWidget( this ); @@ -44,10 +44,10 @@ TDevStatusBar::TDevStatusBar(TQWidget *parent, const char *name) } -TDevStatusBar::~TDevStatusBar() +KDevStatusBar::~KDevStatusBar() {} -void TDevStatusBar::activePartChanged(KParts::Part *part) +void KDevStatusBar::activePartChanged(KParts::Part *part) { if ( _activePart && _activePart->widget() ) disconnect( _activePart->widget(), 0, this, 0 ); @@ -80,7 +80,7 @@ void TDevStatusBar::activePartChanged(KParts::Part *part) } } -void TDevStatusBar::cursorPositionChanged() +void KDevStatusBar::cursorPositionChanged() { if (_cursorIface) { @@ -90,18 +90,18 @@ void TDevStatusBar::cursorPositionChanged() } } -void TDevStatusBar::setStatus(const TQString &str) +void KDevStatusBar::setStatus(const TQString &str) { _status->setText(str); } -void TDevStatusBar::setCursorPosition(int line, int col) +void KDevStatusBar::setCursorPosition(int line, int col) { _status->setText(i18n(" Line: %1 Col: %2 ").arg(line+1).arg(col)); } -void TDevStatusBar::addWidget ( TQWidget *widget, int stretch, bool permanent) +void KDevStatusBar::addWidget ( TQWidget *widget, int stretch, bool permanent) { KStatusBar::addWidget(widget,stretch,permanent); diff --git a/src/statusbar.h b/src/statusbar.h index 09f1af97..2f5370ef 100644 --- a/src/statusbar.h +++ b/src/statusbar.h @@ -24,14 +24,14 @@ namespace KParts { class Part; } /** Status bar. */ -class TDevStatusBar : public KStatusBar +class KDevStatusBar : public KStatusBar { Q_OBJECT public: - TDevStatusBar( TQWidget *parent=0, const char *name=0 ); - ~TDevStatusBar(); + KDevStatusBar( TQWidget *parent=0, const char *name=0 ); + ~KDevStatusBar(); void addWidget ( TQWidget *widget, int stretch = 0, bool permanent = FALSE ); private slots: diff --git a/src/tdeconf_update/CMakeLists.txt b/src/tdeconf_update/CMakeLists.txt index 8eb5c732..4b605615 100644 --- a/src/tdeconf_update/CMakeLists.txt +++ b/src/tdeconf_update/CMakeLists.txt @@ -20,13 +20,13 @@ link_directories( ##### other data ################################ -install( FILES tdev-gen-settings.upd DESTINATION ${KCONF_UPDATE_INSTALL_DIR} ) +install( FILES kdev-gen-settings.upd DESTINATION ${KCONF_UPDATE_INSTALL_DIR} ) -##### tdev-gen-settings-tdeconf_update (executable) +##### kdev-gen-settings-tdeconf_update (executable) -tde_add_executable( tdev-gen-settings-tdeconf_update - SOURCES tdev-gen-settings-tdeconf_update.cpp +tde_add_executable( kdev-gen-settings-tdeconf_update + SOURCES kdev-gen-settings-tdeconf_update.cpp LINK ${TQT_LIBRARIES} DESTINATION ${LIB_INSTALL_DIR}/tdeconf_update_bin ) diff --git a/src/tdeconf_update/Makefile.am b/src/tdeconf_update/Makefile.am index 4cf2dab5..f806baa2 100644 --- a/src/tdeconf_update/Makefile.am +++ b/src/tdeconf_update/Makefile.am @@ -1,18 +1,18 @@ AM_CPPFLAGS = -DKDE_NO_COMPAT -DQT_NO_COMPAT $(all_includes) -update_DATA = tdev-gen-settings.upd +update_DATA = kdev-gen-settings.upd updatedir = $(kde_datadir)/tdeconf_update # The Qt app cannot go into kde_datadir, that is not portable. # install to kde_bindir/tdeconf_update_bin instead. # KDE 3.2 will allow tdeconf_update scripts to run directly from there, # but for us that's too late. Use the .sh script as a workaround. -tdeconf_PROGRAMS = tdev-gen-settings-tdeconf_update +tdeconf_PROGRAMS = kdev-gen-settings-tdeconf_update tdeconfdir = $(libdir)/tdeconf_update_bin -tdev_gen_settings_tdeconf_update_SOURCES = tdev-gen-settings-tdeconf_update.cpp -tdev_gen_settings_tdeconf_update_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor -tdev_gen_settings_tdeconf_update_LDADD = $(LIB_QT) +kdev_gen_settings_tdeconf_update_SOURCES = kdev-gen-settings-tdeconf_update.cpp +kdev_gen_settings_tdeconf_update_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor +kdev_gen_settings_tdeconf_update_LDADD = $(LIB_QT) # vim: set noet: diff --git a/src/tdeconf_update/kdev-gen-settings-tdeconf_update.cpp b/src/tdeconf_update/kdev-gen-settings-tdeconf_update.cpp new file mode 100644 index 00000000..63e4a834 --- /dev/null +++ b/src/tdeconf_update/kdev-gen-settings-tdeconf_update.cpp @@ -0,0 +1,113 @@ +/* + tdeconf_update app for migrating tdevelop's ui settings to the new + code that will be in 3.3. + + Copyright (c) 2005 by Matt Rogers + Based on code Copyright (c) 2003 by Martijn Klingens + + ************************************************************************* + * * + * This program is free software; you can redistribute it and/or * + * modify it under the terms of the GNU Lesser General Public * + * License as published by the Free Software Foundation; either * + * version 2 of the License, or (at your option) any later version. * + * * + ************************************************************************* +*/ + +#include +#include +#include + +static TQTextStream qcin ( stdin, IO_ReadOnly ); +static TQTextStream qcout( stdout, IO_WriteOnly ); +static TQTextStream qcerr( stderr, IO_WriteOnly ); + +// Group cache. Yes, I know global vars are ugly :) +bool needFlush = false; +TQString newKeyValue; +int newDataValue; + +void parseKey( const TQString &group, const TQString &key, + const TQString &value, const TQString &rawLine ) +{ + + //qcerr << "*** group='" << group << "'" << endl; + if ( group == "General Options" && key == "Embed KDevDesigner") + { + newKeyValue = "Designer App"; + if ( value.lower() == "true" ) + newDataValue = 0; + else + newDataValue = 2; + qcout << newKeyValue << "=" << newDataValue << endl; + qcout << "# DELETE [" << key << "]" << endl; + + } + else if ( group == "General Options" && key == "Application Font" ) + { + newKeyValue = "OutputViewFont"; + qcout << newKeyValue << "=" << value << endl; + qcout << "# DELETE [" << key << "]" << endl; + } + else if ( group == "MakeOutputView" && key == "Messages Font" ) + { + qcout << "# DELETE [" << key << "]" << endl; + } + else if ( group == "TerminalEmulator" && key == "UseKDESetting" ) + { + newKeyValue = "UseKDESetting"; + if ( value.lower() == "true" ) + newDataValue = 0; + else + newDataValue = 1; + qcout << newKeyValue << "=" << newDataValue << endl; + } + else + { + // keys we don't convert. output the raw line instead. + qcout << rawLine << endl; + } +} + +int main() +{ + qcin.setEncoding( TQTextStream::UnicodeUTF8 ); + qcout.setEncoding( TQTextStream::UnicodeUTF8 ); + + TQString curGroup; + + TQRegExp groupRegExp( "^\\[(.*)\\]" ); + TQRegExp keyRegExp( "^([a-zA-Z0-9:, _-]*)\\s*=\\s*(.*)\\s*" ); + TQRegExp commentRegExp( "^(#.*)?$" ); + + while ( !qcin.atEnd() ) + { + TQString line = qcin.readLine(); + + if ( commentRegExp.exactMatch( line ) ) + { + // We found a comment, leave unchanged + qcout << line << endl; + } + else if ( groupRegExp.exactMatch( line ) ) + { + curGroup = groupRegExp.capturedTexts()[ 1 ]; + qcout << line << endl; + } + else if ( keyRegExp.exactMatch( line ) ) + { + // We found the a key line + parseKey( curGroup, keyRegExp.capturedTexts()[ 1 ], keyRegExp.capturedTexts()[ 2 ], line ); + } + else + { + qcout << line << endl; + } + } + + return 0; +} + +// vim: set noet ts=4 sts=4 sw=4: + diff --git a/src/tdeconf_update/tdev-gen-settings.upd b/src/tdeconf_update/kdev-gen-settings.upd similarity index 100% rename from src/tdeconf_update/tdev-gen-settings.upd rename to src/tdeconf_update/kdev-gen-settings.upd diff --git a/src/tdeconf_update/tdev-gen-settings-tdeconf_update.cpp b/src/tdeconf_update/tdev-gen-settings-tdeconf_update.cpp deleted file mode 100644 index ae20ae57..00000000 --- a/src/tdeconf_update/tdev-gen-settings-tdeconf_update.cpp +++ /dev/null @@ -1,113 +0,0 @@ -/* - tdeconf_update app for migrating tdevelop's ui settings to the new - code that will be in 3.3. - - Copyright (c) 2005 by Matt Rogers - Based on code Copyright (c) 2003 by Martijn Klingens - - ************************************************************************* - * * - * This program is free software; you can redistribute it and/or * - * modify it under the terms of the GNU Lesser General Public * - * License as published by the Free Software Foundation; either * - * version 2 of the License, or (at your option) any later version. * - * * - ************************************************************************* -*/ - -#include -#include -#include - -static TQTextStream qcin ( stdin, IO_ReadOnly ); -static TQTextStream qcout( stdout, IO_WriteOnly ); -static TQTextStream qcerr( stderr, IO_WriteOnly ); - -// Group cache. Yes, I know global vars are ugly :) -bool needFlush = false; -TQString newKeyValue; -int newDataValue; - -void parseKey( const TQString &group, const TQString &key, - const TQString &value, const TQString &rawLine ) -{ - - //qcerr << "*** group='" << group << "'" << endl; - if ( group == "General Options" && key == "Embed TDevDesigner") - { - newKeyValue = "Designer App"; - if ( value.lower() == "true" ) - newDataValue = 0; - else - newDataValue = 2; - qcout << newKeyValue << "=" << newDataValue << endl; - qcout << "# DELETE [" << key << "]" << endl; - - } - else if ( group == "General Options" && key == "Application Font" ) - { - newKeyValue = "OutputViewFont"; - qcout << newKeyValue << "=" << value << endl; - qcout << "# DELETE [" << key << "]" << endl; - } - else if ( group == "MakeOutputView" && key == "Messages Font" ) - { - qcout << "# DELETE [" << key << "]" << endl; - } - else if ( group == "TerminalEmulator" && key == "UseKDESetting" ) - { - newKeyValue = "UseKDESetting"; - if ( value.lower() == "true" ) - newDataValue = 0; - else - newDataValue = 1; - qcout << newKeyValue << "=" << newDataValue << endl; - } - else - { - // keys we don't convert. output the raw line instead. - qcout << rawLine << endl; - } -} - -int main() -{ - qcin.setEncoding( TQTextStream::UnicodeUTF8 ); - qcout.setEncoding( TQTextStream::UnicodeUTF8 ); - - TQString curGroup; - - TQRegExp groupRegExp( "^\\[(.*)\\]" ); - TQRegExp keyRegExp( "^([a-zA-Z0-9:, _-]*)\\s*=\\s*(.*)\\s*" ); - TQRegExp commentRegExp( "^(#.*)?$" ); - - while ( !qcin.atEnd() ) - { - TQString line = qcin.readLine(); - - if ( commentRegExp.exactMatch( line ) ) - { - // We found a comment, leave unchanged - qcout << line << endl; - } - else if ( groupRegExp.exactMatch( line ) ) - { - curGroup = groupRegExp.capturedTexts()[ 1 ]; - qcout << line << endl; - } - else if ( keyRegExp.exactMatch( line ) ) - { - // We found the a key line - parseKey( curGroup, keyRegExp.capturedTexts()[ 1 ], keyRegExp.capturedTexts()[ 2 ], line ); - } - else - { - qcout << line << endl; - } - } - - return 0; -} - -// vim: set noet ts=4 sts=4 sw=4: - diff --git a/src/tdevassistantextension.cpp b/src/tdevassistantextension.cpp deleted file mode 100644 index f53d2bc3..00000000 --- a/src/tdevassistantextension.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Alexander Dymo * - * adymo@kdevelop.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ -#include "tdevassistantextension.h" - -TDevAssistantExtension::TDevAssistantExtension() - : ShellExtension() -{ -} - -void TDevAssistantExtension::init() -{ - s_instance = new TDevAssistantExtension(); -} - -TQString TDevAssistantExtension::xmlFile() -{ - return "tdevassistantui.rc"; -} - -TQString TDevAssistantExtension::defaultProfile() -{ - return "TDevAssistant"; -} diff --git a/src/tdevassistantextension.h b/src/tdevassistantextension.h deleted file mode 100644 index a53d9dbd..00000000 --- a/src/tdevassistantextension.h +++ /dev/null @@ -1,41 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Alexander Dymo * - * adymo@kdevelop.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ -#ifndef TDEVASSISTANTEXTENSION_H -#define TDEVASSISTANTEXTENSION_H - -#include "shellextension.h" - -class TDevAssistantExtension : public ShellExtension { -public: - static void init(); - - virtual void createGlobalSettingsPage(KDialogBase */*dlg*/) {}; - virtual void acceptGlobalSettingsPage(KDialogBase */*dlg*/) {}; - - virtual TQString xmlFile(); - - virtual TQString defaultProfile(); - -protected: - TDevAssistantExtension(); - -}; - -#endif diff --git a/src/tdevassistantui.rc b/src/tdevassistantui.rc deleted file mode 100644 index 39171359..00000000 --- a/src/tdevassistantui.rc +++ /dev/null @@ -1,168 +0,0 @@ - - - -

    &File - - - - - - - - - - - - - - - - - - - - - - - - - - &View - - - - - - - - - - - - - - &Settings - - - - - - - - - - - - - - - - - - - - &Window - - - - - - - - - - - - - - - &Help - - - - - - Main Toolbar - - - - - - - - - - - - - - - - - Browser Toolbar - - - - - - - - - - - - - - - - diff --git a/src/tdevideextension.cpp b/src/tdevideextension.cpp deleted file mode 100644 index a6b62e12..00000000 --- a/src/tdevideextension.cpp +++ /dev/null @@ -1,129 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Alexander Dymo * - * adymo@kdevelop.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ -#include "tdevideextension.h" - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "api.h" -#include "settingswidget.h" - -TDevIDEExtension::TDevIDEExtension() - : ShellExtension() -{ -} - -void TDevIDEExtension::init() -{ - s_instance = new TDevIDEExtension(); -} - -void TDevIDEExtension::createGlobalSettingsPage(KDialogBase *dlg) -{ - TDEConfig* config = kapp->config(); - TQVBox *vbox = dlg->addVBoxPage(i18n("General"), i18n("General"), BarIcon("tdevelop", TDEIcon::SizeMedium) ); - gsw = new SettingsWidget(vbox, "general settings widget"); - - gsw->projectsURL->setMode((int)KFile::Directory); - - config->setGroup("General Options"); - gsw->lastProjectCheckbox->setChecked(config->readBoolEntry("Read Last Project On Startup",true)); - gsw->outputFont->setFont( config->readFontEntry( "OutputViewFont" ) ); - config->setGroup("MakeOutputView"); - gsw->lineWrappingCheckBox->setChecked(config->readBoolEntry("LineWrapping",true)); - gsw->dirNavigMsgCheckBox->setChecked(config->readBoolEntry("ShowDirNavigMsg",false)); - gsw->compileOutputCombo->setCurrentItem(config->readNumEntry("CompilerOutputLevel",2)); - gsw->forceCLocaleRadio->setChecked( config->readBoolEntry( "ForceCLocale", true ) ); - gsw->userLocaleRadio->setChecked( !config->readBoolEntry( "ForceCLocale", true ) ); - - config->setGroup("General Options"); - gsw->projectsURL->setURL(config->readPathEntry("DefaultProjectsDir", TQDir::homeDirPath()+"/")); - gsw->designerButtonGroup->setButton( config->readNumEntry( "DesignerApp", 0 ) ); - - TQString DesignerSetting = config->readEntry( "DesignerSetting", "ExternalDesigner" ); - gsw->qtDesignerRadioButton->setChecked( DesignerSetting == "ExternalDesigner" ); - gsw->seperateAppRadioButton->setChecked( DesignerSetting == "ExternalTDevDesigner" ); - gsw->embeddedDesignerRadioButton->setChecked( DesignerSetting == "EmbeddedTDevDesigner" ); - - config->setGroup("TerminalEmulator"); - gsw->terminalEdit->setText( config->readEntry( "TerminalApplication", TQString::fromLatin1("konsole") ) ); - bool useKDESetting = config->readBoolEntry( "UseKDESetting", true ); - gsw->useKDETerminal->setChecked( useKDESetting ); - gsw->useOtherTerminal->setChecked( !useKDESetting ); -} - -void TDevIDEExtension::acceptGlobalSettingsPage(KDialogBase *dlg) -{ - TDEConfig* config = kapp->config(); - - config->setGroup("General Options"); - config->writeEntry("DesignerApp", gsw->designerButtonGroup->selectedId()); - config->writeEntry("Read Last Project On Startup",gsw->lastProjectCheckbox->isChecked()); - config->writePathEntry("DefaultProjectsDir", gsw->projectsURL->url()); - config->writeEntry("OutputViewFont", gsw->outputFont->font()); - - TQString DesignerSetting; - if ( gsw->qtDesignerRadioButton->isChecked() ) DesignerSetting = "ExternalDesigner"; - if ( gsw->seperateAppRadioButton->isChecked() ) DesignerSetting = "ExternalTDevDesigner"; - if ( gsw->embeddedDesignerRadioButton->isChecked() ) DesignerSetting = "EmbeddedTDevDesigner"; - config->writeEntry( "DesignerSetting", DesignerSetting ); - - config->setGroup("MakeOutputView"); - config->writeEntry("LineWrapping",gsw->lineWrappingCheckBox->isChecked()); - config->writeEntry("ShowDirNavigMsg",gsw->dirNavigMsgCheckBox->isChecked()); - config->writeEntry( "ForceCLocale", gsw->forceCLocaleRadio->isChecked() ); - //current item id must be in sync with the enum! - config->writeEntry("CompilerOutputLevel",gsw->compileOutputCombo->currentItem()); - config->sync(); - if( TDevPlugin *makeExt = API::getInstance()->pluginController()->extension("TDevelop/MakeFrontend")) - { - static_cast(makeExt)->updateSettingsFromConfig(); - } - - config->setGroup("TerminalEmulator"); - config->writeEntry("UseKDESetting", gsw->useKDETerminal->isChecked() ); - config->writeEntry("TerminalApplication", gsw->terminalEdit->text().stripWhiteSpace() ); -} - -TQString TDevIDEExtension::xmlFile() -{ - return "tdevelopui.rc"; -} - -TQString TDevIDEExtension::defaultProfile() -{ - return "IDE"; -} diff --git a/src/tdevideextension.h b/src/tdevideextension.h deleted file mode 100644 index 64c1a8ca..00000000 --- a/src/tdevideextension.h +++ /dev/null @@ -1,45 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Alexander Dymo * - * adymo@kdevelop.org * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ -#ifndef TDEVIDEEXTENSION_H -#define TDEVIDEEXTENSION_H - -#include - -class SettingsWidget; - -class TDevIDEExtension : public ShellExtension { -public: - static void init(); - - virtual void createGlobalSettingsPage(KDialogBase *dlg); - virtual void acceptGlobalSettingsPage(KDialogBase *dlg); - - virtual TQString xmlFile(); - - virtual TQString defaultProfile(); - -protected: - TDevIDEExtension(); - -private: - SettingsWidget *gsw; -}; - -#endif diff --git a/src/tdevpluginprofilerc b/src/tdevpluginprofilerc deleted file mode 100644 index b93ba2c1..00000000 --- a/src/tdevpluginprofilerc +++ /dev/null @@ -1,52 +0,0 @@ -[Plugin Profiles] -profiles=Profile_BASE,Profile_COMPILED,Profile_CPP,Profile_SCRIPT,Profile_WEB -default=Profile_BASE - -[Category] -Ada= -C= -C/GNOME= -C/GBA= -C/PalmOS= -C++=Profile_CPP -C++/Embedded=Profile_CPP -C++/KDE=Profile_CPP -C++/wxWidgets= -C++/TDevelop -C++/Generic -C++/GTK+ -C++/QMake= -PHP= -Database= -Shell= -Java= -Java/KDE= -Java/Ant= -Perl= -Ruby= -Python= -Fortran= -Haskell= -Pascal/Free Pascal= - -[Profile_BASE] -plugins=TDevFileView,KDevClassView,KDevBookmarks,KDevQuickOpen - -[Profile_COMPILED] -inherits=Profile_BASE -plugins= - -[Profile_CPP] -inherits=Profile_COMPILED -plugins=TDevDebugger - -[Profile_SCRIPT] -inherits=Profile_BASE -plugins= - -[Profile_WEB] -inherits=Profile_SCRIPT -plugins=KDevcopyto - - - diff --git a/src/toplevel.cpp b/src/toplevel.cpp index 63416175..129d869c 100644 --- a/src/toplevel.cpp +++ b/src/toplevel.cpp @@ -8,14 +8,14 @@ #include "simplemainwindow.h" -TDevMainWindow *TopLevel::s_instance = 0; +KDevMainWindow *TopLevel::s_instance = 0; bool TopLevel::mainWindowValid() { return s_instance != 0; } -TDevMainWindow *TopLevel::getInstance() +KDevMainWindow *TopLevel::getInstance() { if (!s_instance) { @@ -28,7 +28,7 @@ TDevMainWindow *TopLevel::getInstance() return s_instance; } -void TopLevel::invalidateInstance(TDevMainWindow *instance) +void TopLevel::invalidateInstance(KDevMainWindow *instance) { if ( s_instance == instance ) s_instance = 0; diff --git a/src/toplevel.h b/src/toplevel.h index 081ddcae..8eb0243a 100644 --- a/src/toplevel.h +++ b/src/toplevel.h @@ -2,10 +2,10 @@ #define __TOPLEVEL_H__ -#include "tdevmainwindow.h" +#include "kdevmainwindow.h" -/**\brief This class handles the single object of type TDevMainWindow. +/**\brief This class handles the single object of type KDevMainWindow. It is completely static (all methods and attributes). */ @@ -14,13 +14,13 @@ class TopLevel { public: - static TDevMainWindow *getInstance(); //!< Get a pointer to the single KDevTopLevel object + static KDevMainWindow *getInstance(); //!< Get a pointer to the single KDevTopLevel object static bool mainWindowValid(); - static void invalidateInstance(TDevMainWindow *instance); //!< Signal that the object has been (or is about to be) destroyed + static void invalidateInstance(KDevMainWindow *instance); //!< Signal that the object has been (or is about to be) destroyed private: - static TDevMainWindow *s_instance; //!< Pointer to the single KDevTopLevel object or 0L + static KDevMainWindow *s_instance; //!< Pointer to the single KDevTopLevel object or 0L }; diff --git a/tde_app_devel.desktop b/tde_app_devel.desktop deleted file mode 100644 index ee7ddfc5..00000000 --- a/tde_app_devel.desktop +++ /dev/null @@ -1,6 +0,0 @@ -[Desktop Entry] -Icon=tdevelop -DocPath=tde_app_devel/index.html -Categories=Qt;TDE;Development;IDE;X-TDE-TDevelopIDE -NoDisplay=true -Name=TDevelop Programming diff --git a/tdevassistant.desktop b/tdevassistant.desktop deleted file mode 100644 index d4640788..00000000 --- a/tdevassistant.desktop +++ /dev/null @@ -1,73 +0,0 @@ -[Desktop Entry] -Type=Application -Exec=tdevassistant %u -Icon=tdevelop -DocPath=tdevelop/index.html -Terminal=false -Name=TDevelop Assistant -Name[br]=Skoazeller TDevelop -Name[ca]=Assistent per a TDevelop -Name[cy]=Cymhorthwr TDevelop -Name[da]=TDevelop assistent -Name[de]=TDevelop-Assistent -Name[el]=Βοηθός TDevelop -Name[es]=Asistente de TDevelop -Name[et]=TDevelopi abiline -Name[eu]=TDevelop laguntzailea -Name[fa]=دستیار TDevelop -Name[fr]=Assistant de TDevelop -Name[it]=Assistente di TDevelop -Name[ja]=TDevelop アシスタント -Name[ms]=Pembantu TDevelop -Name[nds]=TDevelop-Hölper -Name[ne]=केडीई विकास सहायक -Name[nl]=TDevelop Assistent -Name[pl]=Asystent TDevelop -Name[pt]=Assistente do TDevelop -Name[pt_BR]=Assistente do TDevelop -Name[sk]=TDevelop asistent -Name[sl]=Pomočnik za TDevelop -Name[sr]=TDevelop-ов асистент -Name[sr@Latn]=TDevelop-ov asistent -Name[sv]=TDevelop assistent -Name[ta]=Kஉருவாக்கு உதவி -Name[tg]=TDevelop Ассистент -Name[zh_CN]=TDevelop 助手 -Name[zh_TW]=TDevelop 助理 -GenericName=Documentation Viewer -GenericName[br]=Gweler an teuliadur -GenericName[ca]=Visor de documentació -GenericName[da]=Dokumentationsfremviser -GenericName[de]=Dokumentationsbetrachter -GenericName[el]=Προβολέας τεκμηρίωσης -GenericName[es]=Visor de documentación -GenericName[et]=Dokumentatsiooninäitaja -GenericName[eu]=Documentazio ikustailea -GenericName[fa]=مشاهده‌گر مستندات -GenericName[fr]=Afficheur de documentation -GenericName[ga]=Amharcán Doiciméadithe -GenericName[gl]=Visor de documentación -GenericName[hu]=Dokumentációmegjelenítő -GenericName[it]=Visualizzatore documentazione -GenericName[ja]=ドキュメンテーションビューア -GenericName[ms]=Pelihat Dokumentasi -GenericName[nds]=Dokmentatschoonkieker -GenericName[ne]=मिलिसीकरण दृश्यकर्ता -GenericName[nl]=Documentatie Browser -GenericName[pa]=ਦਸਤਾਵੇਜ਼ ਦਰਸ਼ਕ -GenericName[pl]=Przeglądarka dokumentacji -GenericName[pt]=Visualizador de Documentação -GenericName[pt_BR]=Visualizador de Documentação -GenericName[ru]=Просмотр документации -GenericName[sk]=Prezerač dokumentácie -GenericName[sl]=Pregledovalnik dokumentacije -GenericName[sr]=Приказивач документације -GenericName[sr@Latn]=Prikazivač dokumentacije -GenericName[sv]=Dokumentationsvisning -GenericName[ta]=ஆவணமாக்கல் காட்சியமைப்பாளர் -GenericName[tg]=Аз назар бо ҳуҷҷатнок гузарондан -GenericName[tr]=Belge Gösterici -GenericName[zh_CN]=文档查看器 -GenericName[zh_TW]=文件檢視器 -X-DCOP-ServiceType=Multi -Categories=Qt;TDE;Development;Documentation;X-TDE-TDevelopIDE; diff --git a/tdevdesigner/AUTHORS b/tdevdesigner/AUTHORS deleted file mode 100644 index 5ecf318c..00000000 --- a/tdevdesigner/AUTHORS +++ /dev/null @@ -1,4 +0,0 @@ -TDevDesigner: Alexander Dymo -Qt Designer Copyright: (C) 2000-2003 Trolltech AS All Rights Reserved - - diff --git a/tdevdesigner/README b/tdevdesigner/README deleted file mode 100644 index 23675fdb..00000000 --- a/tdevdesigner/README +++ /dev/null @@ -1,25 +0,0 @@ -TDevDesigner is a port of Qt Designer (code taken from Qt 3.3 distribution) to KDE technologies: -1) XML GUI -2) KParts -3) KFileDialog -4) TDEIconLoader - -TDevDesigner consists of a part and a shell. -Part can be used in Konqueror and KDevelop to edit and view ui files and projects. -Shell loads a part with "in shell" argument so that the part can create projects and ui files. - -Other important notes: -TDevDesignerPart is Read/Write part which ignores readonly mode. -Designer Editor plugins are not loaded. -Available in system designer plugins are loaded if possible (tested with Qt 3.3 version). - -TDevDesignerPart integration: -TDevDesignerPart implements KInterfaceDesigner interface (defined in tdevelop/lib/external_interfaces). - -WARNING: -If you want to modify this code, try to introduce as few modifications to original Qt Designer code as possible. -Write your own classes and wrappers instead. The goal is to ease syncronization between the port and original Qt Designer. -Feel free to modify tdevdesigner_part.h(cpp) though. - -FUTURE: -Trolltech promises that Qt 4 will have easilly embeddable designer. If that happens, this port will be dropped for KDevelop 4. diff --git a/tdevdesigner/designer/CMakeLists.txt b/tdevdesigner/designer/CMakeLists.txt deleted file mode 100644 index c74d2977..00000000 --- a/tdevdesigner/designer/CMakeLists.txt +++ /dev/null @@ -1,107 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -add_definitions( -DDESIGNER -UQT_NO_ASCII_CAST ) - -include_directories( - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/tdevdesigner/shared - ${CMAKE_SOURCE_DIR}/lib/interfaces/external - ${TDE_INCLUDE_DIR} - ${TQT_INCLUDE_DIRS} -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### other data ################################ - -install( FILES - tdevdesigner_part.desktop - DESTINATION ${SERVICES_INSTALL_DIR} ) - -install( FILES - tdevdesigner_part.rc tdevdesigner_part_sh.rc - DESTINATION ${DATA_INSTALL_DIR}/tdevdesignerpart ) - -add_subdirectory( pics ) - - -##### libtdevdesignerpart (module) ############## - -set( SRCS - about.ui dbconnection.ui gotolinedialog.ui - newform.ui actionlistview.cpp asciivalidator.cpp - command.cpp connectionitems.cpp connectiontable.cpp - customwidgeteditor.ui formsettings.ui - multilineeditor.ui customwidgeteditorimpl.cpp - database.cpp dbconnectioneditor.ui iconvieweditor.ui - paletteeditor.ui dbconnectionimpl.cpp dbconnectionsimpl.cpp - dbconnections.ui listboxeditor.ui paletteeditoradvanced.ui - defs.cpp designerapp.cpp designerappiface.cpp - editfunctionsimpl.cpp filechooser.cpp formfile.cpp - formsettingsimpl.cpp formwindow.cpp hierarchyview.cpp - iconvieweditorimpl.cpp layout.cpp listboxdnd.cpp - tdevdesigner_part.cpp actiondnd.cpp actioneditorimpl.cpp - listboxeditorimpl.cpp listboxrename.cpp listdnd.cpp - listeditor.ui pixmapcollectioneditor.ui listviewdnd.cpp - listvieweditorimpl.cpp mainwindow.cpp listvieweditor.ui - pixmapfunction.ui startdialog.ui mainwindowactions.cpp - menubareditor.cpp metadatabase.cpp multilineeditorimpl.cpp - newformimpl.cpp orderindicator.cpp myiconloader.cpp - outputwindow.cpp paletteeditoradvancedimpl.cpp - paletteeditorimpl.cpp pixmapchooser.cpp - pixmapcollection.cpp popupmenueditor.cpp previewframe.cpp - preferences.ui tableeditor.ui designeraction.cpp - previewwidget.ui variabledialog.ui actioneditor.ui - previewwidgetimpl.cpp project.cpp projectsettingsimpl.cpp - projectsettings.ui wizardeditor.ui configtoolboxdialog.ui - propertyeditor.cpp propertyobject.cpp qcompletionedit.cpp - replacedialog.ui connectiondialog.ui editfunctions.ui - resource.cpp sizehandle.cpp sourceeditor.cpp - richtextfontdialog.ui createtemplate.ui finddialog.ui - sourcefile.cpp startdialogimpl.cpp styledbutton.cpp - syntaxhighlighter_html.cpp tableeditorimpl.cpp - timestamp.cpp variabledialogimpl.cpp widgetaction.cpp - widgetfactory.cpp wizardeditorimpl.cpp workspace.cpp -) - -tde_moc( SRCS - actiondnd.h actioneditorimpl.h actionlistview.h - asciivalidator.h command.h connectionitems.h - connectiontable.h customwidgeteditorimpl.h database.h - dbconnectionimpl.h dbconnectionsimpl.h editfunctionsimpl.h - filechooser.h formfile.h formsettingsimpl.h - formwindow.h hierarchyview.h iconvieweditorimpl.h - layout.h listboxdnd.h listboxeditorimpl.h listboxrename.h - listdnd.h listviewdnd.h listvieweditorimpl.h mainwindow.h - menubareditor.h multilineeditorimpl.h newformimpl.h - orderindicator.h outputwindow.h paletteeditoradvancedimpl.h - paletteeditorimpl.h pixmapchooser.h popupmenueditor.h - previewframe.h previewwidgetimpl.h project.h - projectsettingsimpl.h propertyeditor.h qcompletionedit.h - sizehandle.h sourceeditor.h sourcefile.h startdialogimpl.h - styledbutton.h tableeditorimpl.h timestamp.h - variabledialogimpl.h widgetaction.h widgetfactory.h - wizardeditorimpl.h workspace.h - ) - - -tde_add_kpart( libtdevdesignerpart AUTOMOC - SOURCES ${SRCS} - LINK - tdevqui-static shared-static kinterfacedesigner-shared - tdeio-shared tdeparts-shared tqassistantclient - DESTINATION ${PLUGIN_INSTALL_DIR} -) diff --git a/tdevdesigner/designer/Makefile.am b/tdevdesigner/designer/Makefile.am deleted file mode 100644 index b486e711..00000000 --- a/tdevdesigner/designer/Makefile.am +++ /dev/null @@ -1,21 +0,0 @@ -SUBDIRS = pics - -AM_CXXFLAGS=-DDESIGNER -KDE_CXXFLAGS=-UQT_NO_ASCII_CAST -INCLUDES = -I$(top_srcdir)/tdevdesigner/shared \ - -I$(top_srcdir)/lib/interfaces/external $(all_includes) -METASOURCES = AUTO -kde_module_LTLIBRARIES = libtdevdesignerpart.la -libtdevdesignerpart_la_LDFLAGS = $(KDE_PLUGIN) $(all_libraries) -libtdevdesignerpart_la_LIBADD = \ - $(top_builddir)/tdevdesigner/uilib/libtdevqui.la $(top_builddir)/tdevdesigner/shared/libshared.la \ - $(top_builddir)/lib/interfaces/external/libkinterfacedesigner.la $(LIB_QT) $(LIB_TDECORE) $(LIB_TDEUI) -ltqassistantclient $(LIB_TDEFILE) $(LIB_TDEPARTS) -libtdevdesignerpart_la_SOURCES = tdevdesigner_part.cpp actiondnd.cpp actioneditorimpl.cpp actionlistview.cpp asciivalidator.cpp command.cpp connectionitems.cpp connectiontable.cpp customwidgeteditorimpl.cpp database.cpp dbconnectionimpl.cpp dbconnectionsimpl.cpp defs.cpp designerapp.cpp designerappiface.cpp editfunctionsimpl.cpp filechooser.cpp formfile.cpp formsettingsimpl.cpp formwindow.cpp hierarchyview.cpp iconvieweditorimpl.cpp layout.cpp listboxdnd.cpp listboxeditorimpl.cpp listboxrename.cpp listdnd.cpp listviewdnd.cpp listvieweditorimpl.cpp mainwindow.cpp mainwindowactions.cpp menubareditor.cpp metadatabase.cpp multilineeditorimpl.cpp newformimpl.cpp orderindicator.cpp outputwindow.cpp paletteeditoradvancedimpl.cpp paletteeditorimpl.cpp pixmapchooser.cpp pixmapcollection.cpp popupmenueditor.cpp previewframe.cpp previewwidgetimpl.cpp project.cpp projectsettingsimpl.cpp propertyeditor.cpp propertyobject.cpp qcompletionedit.cpp resource.cpp sizehandle.cpp sourceeditor.cpp sourcefile.cpp startdialogimpl.cpp styledbutton.cpp syntaxhighlighter_html.cpp tableeditorimpl.cpp timestamp.cpp variabledialogimpl.cpp widgetaction.cpp widgetfactory.cpp wizardeditorimpl.cpp workspace.cpp about.ui dbconnection.ui gotolinedialog.ui newform.ui previewwidget.ui variabledialog.ui actioneditor.ui dbconnectioneditor.ui iconvieweditor.ui paletteeditor.ui projectsettings.ui wizardeditor.ui configtoolboxdialog.ui dbconnections.ui listboxeditor.ui paletteeditoradvanced.ui replacedialog.ui connectiondialog.ui editfunctions.ui listeditor.ui pixmapcollectioneditor.ui richtextfontdialog.ui createtemplate.ui finddialog.ui listvieweditor.ui pixmapfunction.ui startdialog.ui customwidgeteditor.ui formsettings.ui multilineeditor.ui preferences.ui tableeditor.ui designeraction.cpp myiconloader.cpp -partrcdir = $(kde_datadir)/tdevdesignerpart -partdesktopdir = $(kde_servicesdir) -partdesktop_DATA = tdevdesigner_part.desktop -partrc_DATA = tdevdesigner_part.rc tdevdesigner_part_sh.rc -noinst_HEADERS = tdevdesigner_part.h designeraction.h myiconloader.h -picsdirdir = $(kde_datadir)/tdevdesignerpart/pics - -KDE_OPTIONS=nofinal diff --git a/tdevdesigner/designer/command.cpp b/tdevdesigner/designer/command.cpp deleted file mode 100644 index cce10a34..00000000 --- a/tdevdesigner/designer/command.cpp +++ /dev/null @@ -1,2475 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ -#include "command.h" -#include "formwindow.h" -#include "widgetfactory.h" -#include "propertyeditor.h" -#include "metadatabase.h" -#include -#include "mainwindow.h" -#include "hierarchyview.h" -#include "workspace.h" -#include "actioneditorimpl.h" -#include "actiondnd.h" -#include "formfile.h" -#include "../interfaces/languageinterface.h" -#include "menubareditor.h" -#include "popupmenueditor.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef TQT_NO_TABLE -#include -#endif -#include - -#include "tdevdesigner_part.h" - -#include - -CommandHistory::CommandHistory( int s ) - : current( -1 ), steps( s ), savedAt( -1 ) -{ - history.setAutoDelete( TRUE ); - modified = FALSE; - compressedCommand = 0; -} - -void CommandHistory::addCommand( Command *cmd, bool tryCompress ) -{ - if ( tryCompress ) { - if ( !compressedCommand || - compressedCommand->type() != cmd->type() || - !compressedCommand->canMerge( cmd ) ) { - checkCompressedCommand(); - compressedCommand = 0; - } - - if ( compressedCommand ) { - compressedCommand->merge( cmd ); - modified = TRUE; - modificationChanged( modified ); - return; - } - compressedCommand = cmd; - } else { - checkCompressedCommand(); - } - - if ( current < (int)history.count() - 1 ) { - if ( current < savedAt ) - savedAt = -2; - - TQPtrList commands; - commands.setAutoDelete( FALSE ); - - for( int i = 0; i <= current; ++i ) { - commands.insert( i, history.at( 0 ) ); - history.take( 0 ); - } - - commands.append( cmd ); - history.clear(); - history = commands; - history.setAutoDelete( TRUE ); - } else { - history.append( cmd ); - } - - if ( (int)history.count() > steps ) { - savedAt--; - history.removeFirst(); - } else { - ++current; - } - - emitUndoRedo(); - modified = TRUE; - modificationChanged( modified ); -} - -void CommandHistory::undo() -{ - checkCompressedCommand(); - compressedCommand = 0; - if ( current > -1 ) { - history.at( current )->unexecute(); - --current; - } - emitUndoRedo(); - modified = savedAt != current; - modificationChanged( modified ); -} - -void CommandHistory::redo() -{ - checkCompressedCommand(); - compressedCommand = 0; - if ( current > -1 ) { - if ( current < (int)history.count() - 1 ) { - ++current; - history.at( current )->execute(); - } - } else { - if ( history.count() > 0 ) { - ++current; - history.at( current )->execute(); - } - } - emitUndoRedo(); - modified = savedAt != current; - modificationChanged( modified ); -} - -void CommandHistory::emitUndoRedo() -{ - Command *undoCmd = 0; - Command *redoCmd = 0; - - if ( current >= 0 && current < (int)history.count() ) - undoCmd = history.at( current ); - if ( current + 1 >= 0 && current + 1 < (int)history.count() ) - redoCmd = history.at( current + 1 ); - - bool ua = (undoCmd != 0); - TQString uc; - if ( ua ) - uc = undoCmd->name(); - bool ra = (redoCmd != 0); - TQString rc; - if ( ra ) - rc = redoCmd->name(); - emit undoRedoChanged( ua, ra, uc, rc ); -} - -void CommandHistory::setModified( bool m ) -{ - modified = m; - if ( !modified ) - savedAt = current; - modificationChanged( modified ); -} - -bool CommandHistory::isModified() const -{ - return modified; -} - -void CommandHistory::checkCompressedCommand() -{ - if ( compressedCommand && compressedCommand->type() == Command::SetProperty ) { - Command *c = compressedCommand; - compressedCommand = 0; - if ( !( (SetPropertyCommand*)c )->checkProperty() ) { - history.remove( current ); - --current; - emitUndoRedo(); - } - } -} - -// ------------------------------------------------------------ - -Command::Command( const TQString &n, FormWindow *fw ) - : cmdName( n ), formWin( fw ) -{ -} - -Command::~Command() -{ -} - -TQString Command::name() const -{ - return cmdName; -} - -FormWindow *Command::formWindow() const -{ - return formWin; -} - -void Command::merge( Command * ) -{ -} - -bool Command::canMerge( Command * ) -{ - return FALSE; -} - -// ------------------------------------------------------------ - -ResizeCommand::ResizeCommand( const TQString &n, FormWindow *fw, - TQWidget *w, const TQRect &oldr, const TQRect &nr ) - : Command( n, fw ), widget( w ), oldRect( oldr ), newRect( nr ) -{ -} - -void ResizeCommand::execute() -{ - widget->setGeometry( newRect ); - formWindow()->updateSelection( widget ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(widget) ); - if ( WidgetFactory::layoutType( widget ) != WidgetFactory::NoLayout ) - formWindow()->updateChildSelections( widget ); -} - -void ResizeCommand::unexecute() -{ - widget->setGeometry( oldRect ); - formWindow()->updateSelection( widget ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(widget) ); - if ( WidgetFactory::layoutType( widget ) != WidgetFactory::NoLayout ) - formWindow()->updateChildSelections( widget ); -} - -// ------------------------------------------------------------ - -InsertCommand::InsertCommand( const TQString &n, FormWindow *fw, - TQWidget *w, const TQRect &g ) - : Command( n, fw ), widget( w ), geometry( g ) -{ -} - -void InsertCommand::execute() -{ - if ( geometry.size() == TQSize( 0, 0 ) ) { - widget->move( geometry.topLeft() ); - widget->adjustSize(); - } else { - TQSize s = geometry.size().expandedTo( widget->minimumSize() ); - s = s.expandedTo( widget->minimumSizeHint() ); - TQRect r( geometry.topLeft(), s ); - widget->setGeometry( r ); - } - widget->show(); - formWindow()->widgets()->insert( widget, widget ); - formWindow()->clearSelection( FALSE ); - formWindow()->selectWidget( TQT_TQOBJECT(widget) ); - formWindow()->mainWindow()->objectHierarchy()->widgetInserted( widget ); -} - -void InsertCommand::unexecute() -{ - widget->hide(); - formWindow()->selectWidget( TQT_TQOBJECT(widget), FALSE ); - formWindow()->widgets()->remove( TQT_TQOBJECT(widget) ); - formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( widget ); - } - -// ------------------------------------------------------------ - -MoveCommand::MoveCommand( const TQString &n, FormWindow *fw, - const TQWidgetList &w, - const TQValueList op, - const TQValueList np, - TQWidget *opr, TQWidget *npr ) - : Command( n, fw ), widgets( w ), oldPos( op ), newPos( np ), - oldParent( opr ), newParent( npr ) -{ - widgets.setAutoDelete( FALSE ); -} - -void MoveCommand::merge( Command *c ) -{ - MoveCommand *cmd = (MoveCommand*)c; - newPos = cmd->newPos; -} - -bool MoveCommand::canMerge( Command *c ) -{ - MoveCommand *cmd = (MoveCommand*)c; - return widgets == cmd->widgets; -} - - -void MoveCommand::execute() -{ - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) { - if ( newParent && oldParent && newParent != oldParent ) { - TQPoint pos = newParent->mapFromGlobal( w->mapToGlobal( TQPoint( 0,0 ) ) ); - w->reparent( newParent, pos, TRUE ); - formWindow()->raiseSelection( w ); - formWindow()->raiseChildSelections( w ); - formWindow()->widgetChanged( TQT_TQOBJECT(w) ); - formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w ); - formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w ); - } - w->move( newPos[ widgets.at() ] ); - } - formWindow()->updateSelection( w ); - formWindow()->updateChildSelections( w ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(w) ); - } -} - -void MoveCommand::unexecute() -{ - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) { - if ( newParent && oldParent && newParent != oldParent ) { - TQPoint pos = oldParent->mapFromGlobal( w->mapToGlobal( TQPoint( 0,0 ) ) ); - w->reparent( oldParent, pos, TRUE ); - formWindow()->raiseSelection( w ); - formWindow()->raiseChildSelections( w ); - formWindow()->widgetChanged( TQT_TQOBJECT(w) ); - formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w ); - formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w ); - } - w->move( oldPos[ widgets.at() ] ); - } - formWindow()->updateSelection( w ); - formWindow()->updateChildSelections( w ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(w) ); - } -} - -// ------------------------------------------------------------ - -DeleteCommand::DeleteCommand( const TQString &n, FormWindow *fw, - const TQWidgetList &wl ) - : Command( n, fw ), widgets( wl ) -{ - widgets.setAutoDelete( FALSE ); - TQWidgetList copyOfWidgets = widgets; - copyOfWidgets.setAutoDelete(FALSE); - - // Include the children of the selected items when deleting - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - TQObjectList *children = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); - for ( TQWidget *c = (TQWidget *)children->first(); c; c = (TQWidget *)children->next() ) { - if ( copyOfWidgets.find( c ) == -1 && formWindow()->widgets()->find( c ) ) { - widgets.insert(widgets.at() + 1, c); - widgets.prev(); - copyOfWidgets.append(c); - } - } - delete children; - } -} - -void DeleteCommand::execute() -{ - formWindow()->setPropertyShowingBlocked( TRUE ); - connections.clear(); - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - w->hide(); - TQString s = w->name(); - s.prepend( "qt_dead_widget_" ); - w->setName( s ); - formWindow()->selectWidget( TQT_TQOBJECT(w), FALSE ); - formWindow()->widgets()->remove( w ); - TQValueList conns = MetaDataBase::connections( TQT_TQOBJECT(formWindow()), TQT_TQOBJECT(w) ); - connections.insert( w, conns ); - TQValueList::Iterator it = conns.begin(); - for ( ; it != conns.end(); ++it ) { - MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), (*it).sender, - (*it).signal, (*it).receiver, (*it).slot ); - } - } - formWindow()->setPropertyShowingBlocked( FALSE ); - formWindow()->emitShowProperties(); - formWindow()->mainWindow()->objectHierarchy()->widgetsRemoved( widgets ); - -} - -void DeleteCommand::unexecute() -{ - formWindow()->setPropertyShowingBlocked( TRUE ); - formWindow()->clearSelection( FALSE ); - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - w->show(); - TQString s = w->name(); - s.remove( 0, TQString( "qt_dead_widget_" ).length() ); - w->setName( s ); - formWindow()->widgets()->insert( w, w ); - formWindow()->selectWidget( TQT_TQOBJECT(w) ); - TQValueList conns = *connections.find( w ); - TQValueList::Iterator it = conns.begin(); - for ( ; it != conns.end(); ++it ) { - MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), (*it).sender, - (*it).signal, (*it).receiver, (*it).slot ); - } - } - formWindow()->setPropertyShowingBlocked( FALSE ); - formWindow()->emitShowProperties(); - formWindow()->mainWindow()->objectHierarchy()->widgetsInserted( widgets ); -} - -// ------------------------------------------------------------ - -SetPropertyCommand::SetPropertyCommand( const TQString &n, FormWindow *fw, - TQObject *w, PropertyEditor *e, - const TQString &pn, const TQVariant &ov, - const TQVariant &nv, const TQString &ncut, - const TQString &ocut, bool reset ) - : Command( n, fw ), widget( w ), editor( e ), propName( pn ), - oldValue( ov ), newValue( nv ), oldCurrentItemText( ocut ), newCurrentItemText( ncut ), - wasChanged( TRUE ), isResetCommand( reset ) -{ - wasChanged = MetaDataBase::isPropertyChanged( w, propName ); - if ( oldCurrentItemText.isNull() ) - oldCurrentItemText = ""; - if ( newCurrentItemText.isNull() ) - newCurrentItemText = ""; -} - - -void SetPropertyCommand::execute() -{ - if ( !wasChanged ) - MetaDataBase::setPropertyChanged( widget, propName, TRUE ); - if ( isResetCommand ) { - MetaDataBase::setPropertyChanged( widget, propName, FALSE ); - if ( WidgetFactory::resetProperty( widget, propName ) ) { - if ( !formWindow()->isWidgetSelected( widget ) && TQT_TQOBJECT(formWindow()) != TQT_TQOBJECT(widget) ) - formWindow()->selectWidget( TQT_TQOBJECT(widget) ); - if ( editor->widget() != widget ) - editor->setWidget( widget, formWindow() ); - editor->propertyList()->setCurrentProperty( propName ); - PropertyItem *i = (PropertyItem*)editor->propertyList()->currentItem(); - if ( !i ) - return; - i->setValue( widget->property( propName ) ); - i->setChanged( FALSE ); - editor->refetchData(); - editor->emitWidgetChanged(); - return; - } - } - setProperty( newValue, newCurrentItemText ); -} - -void SetPropertyCommand::unexecute() -{ - if ( !wasChanged ) - MetaDataBase::setPropertyChanged( widget, propName, FALSE ); - if ( isResetCommand ) - MetaDataBase::setPropertyChanged( widget, propName, TRUE ); - setProperty( oldValue, oldCurrentItemText ); -} - -bool SetPropertyCommand::canMerge( Command *c ) -{ - SetPropertyCommand *cmd = (SetPropertyCommand*)c; - if ( !widget ) - return FALSE; - const TQMetaProperty *p = - widget->metaObject()->property( widget->metaObject()->findProperty( propName, TRUE ), TRUE ); - if ( !p ) { - if ( propName == "toolTip" || propName == "whatsThis" ) - return TRUE; - if ( ::tqqt_cast((TQObject *)widget) ) { - MetaDataBase::CustomWidget *cw = ((CustomWidget*)(TQObject*)widget)->customWidget(); - if ( !cw ) - return FALSE; - for ( TQValueList::Iterator it = cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) { - if ( TQString( (*it ).property ) == propName ) { - if ( (*it).type == "String" || (*it).type == "CString" || (*it).type == "Int" || (*it).type == "UInt" ) - return TRUE; - } - } - } - return FALSE; - } - TQVariant::Type t = TQVariant::nameToType( p->type() ); - return ( cmd->propName == propName && - t == TQVariant::String || t == TQVariant::CString || t == TQVariant::Int || t == TQVariant::UInt ); -} - -void SetPropertyCommand::merge( Command *c ) -{ - SetPropertyCommand *cmd = (SetPropertyCommand*)c; - newValue = cmd->newValue; - newCurrentItemText = cmd->newCurrentItemText; -} - -bool SetPropertyCommand::checkProperty() -{ - if ( propName == "name" /*|| propName == "itemName"*/ ) { // ### fix that - TQString s = newValue.toString(); - if ( !formWindow()->unify( widget, s, FALSE ) ) { - TQMessageBox::information( formWindow()->mainWindow(), - i18n( "Set 'name' Property" ), - i18n( "The name of a widget must be unique.\n" - "'%1' is already used in form '%2',\n" - "so the name has been reverted to '%3'." ). - arg( newValue.toString() ). - arg( formWindow()->name() ). - arg( oldValue.toString() )); - setProperty( oldValue, oldCurrentItemText, FALSE ); - return FALSE; - } - if ( s.isEmpty() ) { - TQMessageBox::information( formWindow()->mainWindow(), - i18n( "Set 'name' Property" ), - i18n( "The name of a widget must not be null.\n" - "The name has been reverted to '%1'." ). - arg( oldValue.toString() )); - setProperty( oldValue, oldCurrentItemText, FALSE ); - return FALSE; - } - - if ( ::tqqt_cast(widget->parent()) ) - formWindow()->mainWindow()->formNameChanged( (FormWindow*)((TQWidget*)(TQObject*)widget)->parentWidget() ); - } - return TRUE; -} - -void SetPropertyCommand::setProperty( const TQVariant &v, const TQString ¤tItemText, bool select ) -{ - if ( !widget ) - return; - - if ( !formWindow()->isWidgetSelected( widget ) && !formWindow()->isMainContainer( widget ) && select ) - formWindow()->selectWidget( TQT_TQOBJECT(widget) ); - if ( editor->widget() != widget && select ) - editor->setWidget( widget, formWindow() ); - if ( select ) - editor->propertyList()->setCurrentProperty( propName ); - const TQMetaProperty *p = - widget->metaObject()->property( widget->metaObject()->findProperty( propName, TRUE ), TRUE ); - if ( !p ) { - if ( propName == "hAlign" ) { - p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", TRUE ), TRUE ); - int align = widget->property( "alignment" ).toInt(); - align &= ~( AlignHorizontal_Mask ); - align |= p->keyToValue( currentItemText ); - widget->setProperty( "alignment", TQVariant( align ) ); - } else if ( propName == "vAlign" ) { - p = widget->metaObject()->property( widget->metaObject()->findProperty( "alignment", TRUE ), TRUE ); - int align = widget->property( "alignment" ).toInt(); - align &= ~( AlignVertical_Mask ); - align |= p->keyToValue( currentItemText ); - widget->setProperty( "alignment", TQVariant( align ) ); - } else if ( propName == "wordwrap" ) { - int align = widget->property( "alignment" ).toInt(); - align &= ~WordBreak; - if ( v.toBool() ) - align |= WordBreak; - widget->setProperty( "alignment", TQVariant( align ) ); - } else if ( propName == "layoutSpacing" ) { - TQVariant val = v; - if ( val.toString() == "default" ) - val = -1; - MetaDataBase::setSpacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), val.toInt() ); - } else if ( propName == "layoutMargin" ) { - TQVariant val = v; - if ( val.toString() == "default" ) - val = -1; - MetaDataBase::setMargin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), val.toInt() ); - } else if ( propName == "resizeMode" ) { - MetaDataBase::setResizeMode( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) )), currentItemText ); - } else if ( propName == "toolTip" || propName == "whatsThis" || propName == "database" || propName == "frameworkCode" ) { - MetaDataBase::setFakeProperty( editor->widget(), propName, v ); - } else if ( ::tqqt_cast(editor->widget()) ) { - MetaDataBase::CustomWidget *cw = ((CustomWidget *)(TQObject *)widget)->customWidget(); - if ( cw ) { - MetaDataBase::setFakeProperty( editor->widget(), propName, v ); - } - } - editor->refetchData(); - editor->emitWidgetChanged(); - ( ( PropertyItem* )editor->propertyList()->currentItem() )->setChanged( MetaDataBase::isPropertyChanged( widget, propName ) ); -#ifndef TQT_NO_SQL - if ( propName == "database" ) { - formWindow()->mainWindow()->objectHierarchy()->databasePropertyChanged( (TQWidget*)((TQObject *)widget), MetaDataBase::fakeProperty( widget, "database" ).toStringList() ); - } -#endif - return; - } - - if ( p->isSetType() ) { - TQStrList strlst; - TQStringList lst = TQStringList::split( "|", currentItemText ); - TQValueListConstIterator it = lst.begin(); - for ( ; it != lst.end(); ++it ) - strlst.append( (*it).latin1() ); - widget->setProperty( propName, p->keysToValue( strlst ) ); - } else if ( p->isEnumType() ) { - widget->setProperty( propName, p->keyToValue( currentItemText ) ); - } else if ( qstrcmp( p->name(), "buddy" ) == 0 ) { - widget->setProperty( propName, currentItemText ); - } else { - TQVariant ov; - if ( propName == "name" || propName == "itemName" ) - ov = widget->property( propName ); - int oldSerNum = -1; - if ( v.type() == TQVariant::Pixmap ) - oldSerNum = v.toPixmap().serialNumber(); - widget->setProperty( propName, v ); - if ( oldSerNum != -1 && oldSerNum != widget->property( propName ).toPixmap().serialNumber() ) - MetaDataBase::setPixmapKey( TQT_TQOBJECT(formWindow()), - widget->property( propName ).toPixmap().serialNumber(), - MetaDataBase::pixmapKey( TQT_TQOBJECT(formWindow()), oldSerNum ) ); - if ( propName == "cursor" ) { - MetaDataBase::setCursor( (TQWidget*)((TQObject *)widget), v.toCursor() ); - } - if ( propName == "name" && widget->isWidgetType() ) { - formWindow()->mainWindow()->objectHierarchy()->namePropertyChanged( ((TQWidget*)(TQObject *)widget), ov ); - if ( formWindow()->isMainContainer( widget ) ) - formWindow()->setName( v.toCString() ); - } - if ( propName == "name" && ::tqqt_cast((TQObject *)widget) && ::tqqt_cast(formWindow()->mainContainer()) ) { - formWindow()->mainWindow()->actioneditor()->updateActionName( (TQAction*)(TQObject *)widget ); - } - if ( propName == "iconSet" && ::tqqt_cast((TQObject *)widget) && ::tqqt_cast(formWindow()->mainContainer()) ) { - formWindow()->mainWindow()->actioneditor()->updateActionIcon( (TQAction*)(TQObject *)widget ); - } - if ( propName == "caption" ) { - if ( formWindow()->isMainContainer( widget ) ) - formWindow()->setCaption( v.toString() ); - } - if ( propName == "icon" ) { - if ( formWindow()->isMainContainer( widget ) ) - formWindow()->setIcon( v.toPixmap() ); - } - } - editor->refetchData(); - if ( editor->propertyList()->currentItem() && select ) { - ( ( PropertyItem* )editor->propertyList()->currentItem() )->showEditor(); - ( ( PropertyItem* )editor->propertyList()->currentItem() )->setChanged( MetaDataBase::isPropertyChanged( widget, propName ) ); - } - editor->emitWidgetChanged(); - formWindow()->killAccels( TQT_TQOBJECT(widget) ); -} - -// ------------------------------------------------------------ - -LayoutHorizontalCommand::LayoutHorizontalCommand( const TQString &n, FormWindow *fw, - TQWidget *parent, TQWidget *layoutBase, - const TQWidgetList &wl ) - : Command( n, fw ), layout( wl, parent, fw, layoutBase ) -{ -} - -void LayoutHorizontalCommand::execute() -{ - formWindow()->clearSelection( FALSE ); - layout.doLayout(); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -void LayoutHorizontalCommand::unexecute() -{ - formWindow()->clearSelection( FALSE ); - layout.undoLayout(); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -// ------------------------------------------------------------ - -LayoutHorizontalSplitCommand::LayoutHorizontalSplitCommand( const TQString &n, FormWindow *fw, - TQWidget *parent, TQWidget *layoutBase, - const TQWidgetList &wl ) - : Command( n, fw ), layout( wl, parent, fw, layoutBase, TRUE, TRUE ) -{ -} - -void LayoutHorizontalSplitCommand::execute() -{ - formWindow()->clearSelection( FALSE ); - layout.doLayout(); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -void LayoutHorizontalSplitCommand::unexecute() -{ - formWindow()->clearSelection( FALSE ); - layout.undoLayout(); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -// ------------------------------------------------------------ - -LayoutVerticalCommand::LayoutVerticalCommand( const TQString &n, FormWindow *fw, - TQWidget *parent, TQWidget *layoutBase, - const TQWidgetList &wl ) - : Command( n, fw ), layout( wl, parent, fw, layoutBase ) -{ -} - -void LayoutVerticalCommand::execute() -{ - formWindow()->clearSelection( FALSE ); - layout.doLayout(); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -void LayoutVerticalCommand::unexecute() -{ - formWindow()->clearSelection( FALSE ); - layout.undoLayout(); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -// ------------------------------------------------------------ - -LayoutVerticalSplitCommand::LayoutVerticalSplitCommand( const TQString &n, FormWindow *fw, - TQWidget *parent, TQWidget *layoutBase, - const TQWidgetList &wl ) - : Command( n, fw ), layout( wl, parent, fw, layoutBase, TRUE, TRUE ) -{ -} - -void LayoutVerticalSplitCommand::execute() -{ - formWindow()->clearSelection( FALSE ); - layout.doLayout(); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -void LayoutVerticalSplitCommand::unexecute() -{ - formWindow()->clearSelection( FALSE ); - layout.undoLayout(); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -// ------------------------------------------------------------ - -LayoutGridCommand::LayoutGridCommand( const TQString &n, FormWindow *fw, - TQWidget *parent, TQWidget *layoutBase, - const TQWidgetList &wl, int xres, int yres ) - : Command( n, fw ), layout( wl, parent, fw, layoutBase, TQSize( TQMAX(5,xres), TQMAX(5,yres) ) ) -{ -} - -void LayoutGridCommand::execute() -{ - formWindow()->clearSelection( FALSE ); - layout.doLayout(); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -void LayoutGridCommand::unexecute() -{ - formWindow()->clearSelection( FALSE ); - layout.undoLayout(); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -// ------------------------------------------------------------ - -BreakLayoutCommand::BreakLayoutCommand( const TQString &n, FormWindow *fw, - TQWidget *layoutBase, const TQWidgetList &wl ) - : Command( n, fw ), lb( layoutBase ), widgets( wl ) -{ - WidgetFactory::LayoutType lay = WidgetFactory::layoutType( layoutBase ); - spacing = MetaDataBase::spacing( TQT_TQOBJECT(layoutBase) ); - margin = MetaDataBase::margin( TQT_TQOBJECT(layoutBase) ); - layout = 0; - if ( lay == WidgetFactory::HBox ) - layout = new HorizontalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqqt_cast(layoutBase) != 0 ); - else if ( lay == WidgetFactory::VBox ) - layout = new VerticalLayout( wl, layoutBase, fw, layoutBase, FALSE, ::tqqt_cast(layoutBase) != 0 ); - else if ( lay == WidgetFactory::Grid ) - layout = new GridLayout( wl, layoutBase, fw, layoutBase, TQSize( TQMAX( 5, fw->grid().x()), TQMAX( 5, fw->grid().y()) ), FALSE ); -} - -void BreakLayoutCommand::execute() -{ - if ( !layout ) - return; - formWindow()->clearSelection( FALSE ); - layout->breakLayout(); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) - w->resize( TQMAX( 16, w->width() ), TQMAX( 16, w->height() ) ); -} - -void BreakLayoutCommand::unexecute() -{ - if ( !layout ) - return; - formWindow()->clearSelection( FALSE ); - layout->doLayout(); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); - MetaDataBase::setSpacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( lb )), spacing ); - MetaDataBase::setMargin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( lb )), margin ); -} - -// ------------------------------------------------------------ - -MacroCommand::MacroCommand( const TQString &n, FormWindow *fw, - const TQPtrList &cmds ) - : Command( n, fw ), commands( cmds ) -{ -} - -void MacroCommand::execute() -{ - for ( Command *c = commands.first(); c; c = commands.next() ) - c->execute(); -} - -void MacroCommand::unexecute() -{ - for ( Command *c = commands.last(); c; c = commands.prev() ) - c->unexecute(); -} - -// ------------------------------------------------------------ - -AddTabPageCommand::AddTabPageCommand( const TQString &n, FormWindow *fw, - TQTabWidget *tw, const TQString &label ) - : Command( n, fw ), tabWidget( tw ), tabLabel( label ) -{ - tabPage = new QDesignerWidget( formWindow(), tabWidget, "TabPage" ); - tabPage->hide(); - index = -1; - MetaDataBase::addEntry( TQT_TQOBJECT(tabPage) ); -} - -void AddTabPageCommand::execute() -{ - if ( index == -1 ) - index = ( (QDesignerTabWidget*)tabWidget )->count(); - tabWidget->insertTab( tabPage, tabLabel, index ); - tabWidget->showPage( tabPage ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); -} - -void AddTabPageCommand::unexecute() -{ - tabWidget->removePage( tabPage ); - tabPage->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); -} - -// ------------------------------------------------------------ - -MoveTabPageCommand::MoveTabPageCommand( const TQString &n, FormWindow *fw, - TQTabWidget *tw, TQWidget* page, const TQString& label, int nIndex, int oIndex ) - : Command( n, fw ), tabWidget( tw ), tabPage( page ), tabLabel( label ) -{ - newIndex = nIndex; - oldIndex = oIndex; -} - -void MoveTabPageCommand::execute() -{ - ((QDesignerTabWidget*)tabWidget )->removePage( tabPage ); - ((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, newIndex ); - ((QDesignerTabWidget*)tabWidget )->showPage( tabPage ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); -} - -void MoveTabPageCommand::unexecute() -{ - ((QDesignerTabWidget*)tabWidget )->removePage( tabPage ); - ((QDesignerTabWidget*)tabWidget )->insertTab( tabPage, tabLabel, oldIndex ); - ((QDesignerTabWidget*)tabWidget )->showPage( tabPage ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); -} - -// ------------------------------------------------------------ - -DeleteTabPageCommand::DeleteTabPageCommand( const TQString &n, FormWindow *fw, - TQTabWidget *tw, TQWidget *page ) - : Command( n, fw ), tabWidget( tw ), tabPage( page ) -{ - tabLabel = ( (QDesignerTabWidget*)tabWidget )->pageTitle(); - index = ( (QDesignerTabWidget*)tabWidget )->currentPage(); -} - -void DeleteTabPageCommand::execute() -{ - tabWidget->removePage( tabPage ); - tabPage->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); -} - -void DeleteTabPageCommand::unexecute() -{ - tabWidget->insertTab( tabPage, tabLabel, index ); - tabWidget->showPage( tabPage ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->tabsChanged( tabWidget ); -} - -// ------------------------------------------------------------ - -AddWidgetStackPageCommand::AddWidgetStackPageCommand( const TQString &n, FormWindow *fw, - QDesignerWidgetStack *ws ) - : Command( n, fw ), widgetStack( ws ) -{ - stackPage = new QDesignerWidget( formWindow(), widgetStack, "WStackPage" ); - stackPage->hide(); - index = -1; - MetaDataBase::addEntry( TQT_TQOBJECT(stackPage) ); -} - -void AddWidgetStackPageCommand::execute() -{ - index = widgetStack->insertPage( stackPage, index ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->tabsChanged( 0 ); -} - -void AddWidgetStackPageCommand::unexecute() -{ - index = widgetStack->removePage( stackPage ); - stackPage->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->tabsChanged( 0 ); -} - -DeleteWidgetStackPageCommand::DeleteWidgetStackPageCommand( const TQString &n, FormWindow *fw, - QDesignerWidgetStack *ws, TQWidget *page ) - : Command( n, fw), widgetStack( ws ), stackPage( page ) -{ - index = -1; -} - -void DeleteWidgetStackPageCommand::execute() -{ - index = widgetStack->removePage( stackPage ); - stackPage->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( stackPage ); -} - -void DeleteWidgetStackPageCommand::unexecute() -{ - index = widgetStack->insertPage( stackPage, index ); - widgetStack->raiseWidget( stackPage ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->widgetInserted( stackPage ); -} - -// ------------------------------------------------------------ - -AddWizardPageCommand::AddWizardPageCommand( const TQString &n, FormWindow *fw, - TQWizard *w, const TQString &label, int i, bool s ) - : Command( n, fw ), wizard( w ), pageLabel( label ) -{ - page = new QDesignerWidget( formWindow(), wizard, "WizardPage" ); - page->hide(); - index = i; - show = s; - MetaDataBase::addEntry( TQT_TQOBJECT(page) ); -} - -void AddWizardPageCommand::execute() -{ - if ( index == -1 ) - index = wizard->pageCount(); - wizard->insertPage( page, pageLabel, index ); - if ( show ) - ( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); -} - -void AddWizardPageCommand::unexecute() -{ - wizard->removePage( page ); - page->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); -} - -// ------------------------------------------------------------ - -DeleteWizardPageCommand::DeleteWizardPageCommand( const TQString &n, FormWindow *fw, - TQWizard *w, int i, bool s ) - : Command( n, fw ), wizard( w ), index( i ) -{ - show = s; -} - -void DeleteWizardPageCommand::execute() -{ - page = wizard->page( index ); - pageLabel = wizard->title( page ); - wizard->removePage( page ); - page->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); -} - -void DeleteWizardPageCommand::unexecute() -{ - wizard->insertPage( page, pageLabel, index ); - if ( show ) - ( (QDesignerWizard*)wizard )->setCurrentPage( ( (QDesignerWizard*)wizard )->pageNum( page ) ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); -} - -// ------------------------------------------------------------ - -RenameWizardPageCommand::RenameWizardPageCommand( const TQString &n, FormWindow *fw, - TQWizard *w, int i, const TQString& name ) - : Command( n, fw ), wizard( w ), index( i ), label( name ) -{ - -} - -void RenameWizardPageCommand::execute() -{ - page = wizard->page( index ); - TQString oldLabel = wizard->title( page ); - - wizard->setTitle( page, label ); - label = oldLabel; - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); -} - -void RenameWizardPageCommand::unexecute() -{ - execute(); -} - -// ------------------------------------------------------------ - -SwapWizardPagesCommand::SwapWizardPagesCommand( const TQString &n, FormWindow *fw, TQWizard *w, int i1, int i2 ) - : Command( n, fw ), wizard( w ), index1( i1 ), index2( i2 ) -{ -} - -void SwapWizardPagesCommand::execute() -{ - TQWidget *page1 = wizard->page( index1 ); - TQWidget *page2 = wizard->page( index2 ); - TQString page1Label = wizard->title( page1 ); - TQString page2Label = wizard->title( page2 ); - wizard->removePage( page1 ); - wizard->removePage( page2 ); - wizard->insertPage( page1, page1Label, index2 ); - wizard->insertPage( page2, page2Label, index1 ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); -} - -void SwapWizardPagesCommand::unexecute() -{ - execute(); -} - -// ------------------------------------------------------------ - -MoveWizardPageCommand::MoveWizardPageCommand( const TQString &n, FormWindow *fw, TQWizard *w, int i1, int i2 ) - : Command( n, fw ), wizard( w ), index1( i1 ), index2( i2 ) -{ -} - -void MoveWizardPageCommand::execute() -{ - TQWidget *page = wizard->page( index1 ); - TQString pageLabel = wizard->title( page ); - wizard->removePage( page ); - wizard->insertPage( page, pageLabel, index2 ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); -} - -void MoveWizardPageCommand::unexecute() -{ - // ###FIX: index1 may be the wrong place - TQWidget *page = wizard->page( index2 ); - TQString pageLabel = wizard->title( page ); - wizard->removePage( page ); - wizard->insertPage( page, pageLabel, index1 ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->pagesChanged( wizard ); -} - -// ------------------------------------------------------------ - -AddConnectionCommand::AddConnectionCommand( const TQString &name, FormWindow *fw, - MetaDataBase::Connection c ) - : Command( name, fw ), connection( c ) -{ -} - -void AddConnectionCommand::execute() -{ - MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), connection.sender, - connection.signal, connection.receiver, connection.slot ); - if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) ) - formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); -} - -void AddConnectionCommand::unexecute() -{ - MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), connection.sender, - connection.signal, connection.receiver, connection.slot ); - if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) ) - formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); -} - -// ------------------------------------------------------------ - -RemoveConnectionCommand::RemoveConnectionCommand( const TQString &name, FormWindow *fw, - MetaDataBase::Connection c ) - : Command( name, fw ), connection( c ) -{ -} - -void RemoveConnectionCommand::execute() -{ - MetaDataBase::removeConnection( TQT_TQOBJECT(formWindow()), connection.sender, - connection.signal, connection.receiver, connection.slot ); - if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) ) - formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); -} - -void RemoveConnectionCommand::unexecute() -{ - MetaDataBase::addConnection( TQT_TQOBJECT(formWindow()), connection.sender, - connection.signal, connection.receiver, connection.slot ); - if ( TQT_BASE_OBJECT(connection.receiver) == TQT_BASE_OBJECT(formWindow()->mainContainer()) ) - formWindow()->mainWindow()->propertyeditor()->eventList()->setup(); -} - -// ------------------------------------------------------------ - -AddFunctionCommand::AddFunctionCommand( const TQString &name, FormWindow *fw, const TQCString &f, - const TQString& spec, const TQString &a, const TQString &t, - const TQString &l, const TQString &rt ) - : Command( name, fw ), function( f ), specifier( spec ), access( a ), functionType( t ), language( l ), - returnType( rt ) -{ -} - -void AddFunctionCommand::execute() -{ - MetaDataBase::addFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType ); - formWindow()->mainWindow()->functionsChanged(); - - //integration (add - execute) - KInterfaceDesigner::Function f; - f.returnType = returnType; - f.function = function; - f.specifier = specifier; - f.access = access; - f.type = (functionType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; - formWindow()->clearSelection(false); - formWindow()->mainWindow()->part()->emitAddedFunction(formWindow()->fileName(), f); - - if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); -} - -void AddFunctionCommand::unexecute() -{ - MetaDataBase::removeFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType ); - formWindow()->mainWindow()->functionsChanged(); - - //integration (add - unexecute) - KInterfaceDesigner::Function f; - f.returnType = returnType; - f.function = function; - f.specifier = specifier; - f.access = access; - f.type = (functionType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; - formWindow()->mainWindow()->part()->emitRemovedFunction(formWindow()->fileName(), f); - - if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); -} - -// ------------------------------------------------------------ - -ChangeFunctionAttribCommand::ChangeFunctionAttribCommand( const TQString &name, FormWindow *fw, MetaDataBase::Function f, - const TQString &on, const TQString &os, - const TQString &oa, const TQString &ot, const TQString &ol, - const TQString &ort ) - : Command( name, fw ), oldName( on ), oldSpec( os ), oldAccess( oa ), - oldType( ot ), oldLang( ol ), oldReturnType( ort ) -{ - newName = f.function; - newSpec = f.specifier; - newAccess = f.access; - newType = f.type; - newLang = f.language; - newReturnType = f.returnType; -} - -void ChangeFunctionAttribCommand::execute() -{ - MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formWindow()), oldName, newName, newSpec, newAccess, - newType, newLang, newReturnType ); - formWindow()->formFile()->functionNameChanged( oldName, newName ); - formWindow()->formFile()->functionRetTypeChanged( newName, oldReturnType, newReturnType ); - formWindow()->mainWindow()->functionsChanged(); - - //integration (edit - execute) - KInterfaceDesigner::Function f; - f.returnType = newReturnType; - f.function = newName; - f.specifier = newSpec; - f.access = newAccess; - f.type = (newType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; - KInterfaceDesigner::Function of; - f.returnType = oldReturnType; - f.function = oldName; - f.specifier = oldSpec; - f.access = oldAccess; - f.type = (oldType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; - formWindow()->mainWindow()->part()->emitEditedFunction(formWindow()->fileName(), of, f); - - if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); -} - -void ChangeFunctionAttribCommand::unexecute() -{ - MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formWindow()), newName, oldName, oldSpec, oldAccess, - oldType, oldLang, oldReturnType ); - formWindow()->formFile()->functionNameChanged( newName, oldName ); - formWindow()->formFile()->functionRetTypeChanged( oldName, newReturnType, oldReturnType ); - formWindow()->mainWindow()->functionsChanged(); - - //integration (edit - execute) - KInterfaceDesigner::Function f; - f.returnType = newReturnType; - f.function = newName; - f.specifier = newSpec; - f.access = newAccess; - f.type = (newType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; - KInterfaceDesigner::Function of; - f.returnType = oldReturnType; - f.function = oldName; - f.specifier = oldSpec; - f.access = oldAccess; - f.type = (oldType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; - formWindow()->mainWindow()->part()->emitEditedFunction(formWindow()->fileName(), f, of); - - if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); -} - -// ------------------------------------------------------------ - -RemoveFunctionCommand::RemoveFunctionCommand( const TQString &name, FormWindow *fw, const TQCString &f, - const TQString& spec, const TQString &a, const TQString &t, - const TQString &l, const TQString &rt ) - : Command( name, fw ), function( f ), specifier( spec ), access( a ), functionType( t ), language( l ), - returnType( rt ) -{ - if ( spec.isNull() ) { - TQValueList lst = MetaDataBase::functionList( TQT_TQOBJECT(fw) ); - for ( TQValueList::Iterator it = lst.begin(); it != lst.end(); ++it ) { - if ( MetaDataBase::normalizeFunction( (*it).function ) == - MetaDataBase::normalizeFunction( function ) ) { - specifier = (*it).specifier; - access = (*it).access; - functionType = (*it).type; - returnType = (*it).returnType; - language = (*it).language; - break; - } - } - } -} - -void RemoveFunctionCommand::execute() -{ - MetaDataBase::removeFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType ); - formWindow()->mainWindow()->functionsChanged(); - - //integration (remove - execute) - KInterfaceDesigner::Function f; - f.returnType = returnType; - f.function = function; - f.specifier = specifier; - f.access = access; - f.type = (functionType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; - formWindow()->mainWindow()->part()->emitRemovedFunction(formWindow()->fileName(), f); - - if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); -} - -void RemoveFunctionCommand::unexecute() -{ - if ( MetaDataBase::hasFunction( TQT_TQOBJECT(formWindow()), function ) ) - return; - MetaDataBase::addFunction( TQT_TQOBJECT(formWindow()), function, specifier, access, functionType, language, returnType ); - formWindow()->mainWindow()->functionsChanged(); - - //integration (remove - unexecute) - KInterfaceDesigner::Function f; - f.returnType = returnType; - f.function = function; - f.specifier = specifier; - f.access = access; - f.type = (functionType == "slot") ? KInterfaceDesigner::ftTQtSlot : KInterfaceDesigner::ftFunction ; - formWindow()->clearSelection(false); - formWindow()->mainWindow()->part()->emitAddedFunction(formWindow()->fileName(), f); - - if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); -} - -// ------------------------------------------------------------ - -AddVariableCommand::AddVariableCommand( const TQString &name, FormWindow *fw, const TQString &vn, const TQString &a ) - : Command( name, fw ), varName( vn ), access( a ) -{ -} - -void AddVariableCommand::execute() -{ - MetaDataBase::addVariable( TQT_TQOBJECT(formWindow()), varName, access ); - formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); - if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); -} - -void AddVariableCommand::unexecute() -{ - MetaDataBase::removeVariable( TQT_TQOBJECT(formWindow()), varName ); - formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); - if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); -} - -// ------------------------------------------------------------ - -SetVariablesCommand::SetVariablesCommand( const TQString &name, FormWindow *fw, - TQValueList lst ) - : Command( name, fw ), newList( lst ) -{ - oldList = MetaDataBase::variables( TQT_TQOBJECT(formWindow()) ); -} - -void SetVariablesCommand::execute() -{ - MetaDataBase::setVariables( TQT_TQOBJECT(formWindow()), newList ); - formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); - if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); -} - -void SetVariablesCommand::unexecute() -{ - MetaDataBase::setVariables( TQT_TQOBJECT(formWindow()), oldList ); - formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); - if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); -} - -// ------------------------------------------------------------ - -RemoveVariableCommand::RemoveVariableCommand( const TQString &name, FormWindow *fw, const TQString &vn ) - : Command( name, fw ), varName( vn ) -{ - TQValueList lst = MetaDataBase::variables( TQT_TQOBJECT(fw) ); - for ( TQValueList::Iterator it = lst.begin(); it != lst.end(); ++it ) { - if ( (*it).varName == varName ) { - access = (*it).varAccess; - break; - } - } -} - -void RemoveVariableCommand::execute() -{ - MetaDataBase::removeVariable( TQT_TQOBJECT(formWindow()), varName ); - formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); - if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); -} - -void RemoveVariableCommand::unexecute() -{ - MetaDataBase::addVariable( TQT_TQOBJECT(formWindow()), varName, access ); - formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); - if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); -} - -// ------------------------------------------------------------ - -EditDefinitionsCommand::EditDefinitionsCommand( const TQString &name, FormWindow *fw, LanguageInterface *lf, - const TQString &n, const TQStringList &nl ) - : Command( name, fw ), lIface( lf ), defName( n ), newList( nl ) -{ - oldList = lIface->definitionEntries( defName, formWindow()->mainWindow()->designerInterface() ); -} - -void EditDefinitionsCommand::execute() -{ - lIface->setDefinitionEntries( defName, newList, formWindow()->mainWindow()->designerInterface() ); - lIface->release(); - formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); - if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); -} - -void EditDefinitionsCommand::unexecute() -{ - lIface->setDefinitionEntries( defName, oldList, formWindow()->mainWindow()->designerInterface() ); - lIface->release(); - formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); - if ( formWindow()->formFile() ) - formWindow()->formFile()->setModified( TRUE ); -} - -// ------------------------------------------------------------ - -LowerCommand::LowerCommand( const TQString &name, FormWindow *fw, const TQWidgetList &w ) - : Command( name, fw ), widgets( w ) -{ -} - -void LowerCommand::execute() -{ - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - w->lower(); - formWindow()->raiseSelection( w ); - } - -} - -void LowerCommand::unexecute() -{ - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - w->raise(); - formWindow()->raiseSelection( w ); - } -} - -// ------------------------------------------------------------ - -RaiseCommand::RaiseCommand( const TQString &name, FormWindow *fw, const TQWidgetList &w ) - : Command( name, fw ), widgets( w ) -{ -} - -void RaiseCommand::execute() -{ - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - w->raise(); - formWindow()->raiseSelection( w ); - } - -} - -void RaiseCommand::unexecute() -{ - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - w->lower(); - formWindow()->raiseSelection( w ); - } -} - -// ------------------------------------------------------------ - -PasteCommand::PasteCommand( const TQString &n, FormWindow *fw, - const TQWidgetList &w ) - : Command( n, fw ), widgets( w ) -{ -} - -void PasteCommand::execute() -{ - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - w->show(); - formWindow()->selectWidget( TQT_TQOBJECT(w) ); - formWindow()->widgets()->insert( w, w ); - formWindow()->mainWindow()->objectHierarchy()->widgetInserted( w ); - } -} - -void PasteCommand::unexecute() -{ - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - w->hide(); - formWindow()->selectWidget( TQT_TQOBJECT(w), FALSE ); - formWindow()->widgets()->remove( w ); - formWindow()->mainWindow()->objectHierarchy()->widgetRemoved( w ); - } - } - -// ------------------------------------------------------------ - -TabOrderCommand::TabOrderCommand( const TQString &n, FormWindow *fw, - const TQWidgetList &ol, const TQWidgetList &nl ) - : Command( n, fw ), oldOrder( ol ), newOrder( nl ) -{ -} - -void TabOrderCommand::merge( Command *c ) -{ - TabOrderCommand *cmd = (TabOrderCommand*)c; - newOrder = cmd->newOrder; -} - -bool TabOrderCommand::canMerge( Command * ) -{ - return TRUE; -} - -void TabOrderCommand::execute() -{ - MetaDataBase::setTabOrder( formWindow(), newOrder ); -} - -void TabOrderCommand::unexecute() -{ - MetaDataBase::setTabOrder( formWindow(), oldOrder ); -} - -// ------------------------------------------------------------ - -PopulateListBoxCommand::PopulateListBoxCommand( const TQString &n, FormWindow *fw, - TQListBox *lb, const TQValueList &items ) - : Command( n, fw ), newItems( items ), listbox( lb ) -{ - TQListBoxItem *i = 0; - for ( i = listbox->firstItem(); i; i = i->next() ) { - Item item; - if ( i->pixmap() ) - item.pix = *i->pixmap(); - item.text = i->text(); - oldItems.append( item ); - } -} - -void PopulateListBoxCommand::execute() -{ - listbox->clear(); - for ( TQValueList::Iterator it = newItems.begin(); it != newItems.end(); ++it ) { - Item i = *it; - if ( !i.pix.isNull() ) - (void)new TQListBoxPixmap( listbox, i.pix, i.text ); - else - (void)new TQListBoxText( listbox, i.text ); - } - formWindow()->mainWindow()->propertyeditor()->refetchData(); -} - -void PopulateListBoxCommand::unexecute() -{ - listbox->clear(); - for ( TQValueList::Iterator it = oldItems.begin(); it != oldItems.end(); ++it ) { - Item i = *it; - if ( !i.pix.isNull() ) - (void)new TQListBoxPixmap( listbox, i.pix, i.text ); - else - (void)new TQListBoxText( listbox, i.text ); - } - formWindow()->mainWindow()->propertyeditor()->refetchData(); -} - -// ------------------------------------------------------------ - -PopulateIconViewCommand::PopulateIconViewCommand( const TQString &n, FormWindow *fw, - TQIconView *iv, const TQValueList &items ) - : Command( n, fw ), newItems( items ), iconview( iv ) -{ -#ifndef TQT_NO_ICONVIEW - TQIconViewItem *i = 0; - for ( i = iconview->firstItem(); i; i = i->nextItem() ) { - Item item; - if ( i->pixmap() ) - item.pix = *i->pixmap(); - item.text = i->text(); - oldItems.append( item ); - } -#endif -} - -void PopulateIconViewCommand::execute() -{ -#ifndef TQT_NO_ICONVIEW - iconview->clear(); - for ( TQValueList::Iterator it = newItems.begin(); it != newItems.end(); ++it ) { - Item i = *it; - (void)new TQIconViewItem( iconview, i.text, i.pix ); - } -#endif -} - -void PopulateIconViewCommand::unexecute() -{ -#ifndef TQT_NO_ICONVIEW - iconview->clear(); - for ( TQValueList::Iterator it = oldItems.begin(); it != oldItems.end(); ++it ) { - Item i = *it; - (void)new TQIconViewItem( iconview, i.text, i.pix ); - } -#endif -} - -// ------------------------------------------------------------ - -PopulateListViewCommand::PopulateListViewCommand( const TQString &n, FormWindow *fw, - TQListView *lv, TQListView *from ) - : Command( n, fw ), listview( lv ) -{ - newItems = new TQListView(); - newItems->hide(); - transferItems( from, newItems ); - oldItems = new TQListView(); - oldItems->hide(); - transferItems( listview, oldItems ); -} - -void PopulateListViewCommand::execute() -{ - listview->clear(); - transferItems( newItems, listview ); -} - -void PopulateListViewCommand::unexecute() -{ - listview->clear(); - transferItems( oldItems, listview ); -} - -void PopulateListViewCommand::transferItems( TQListView *from, TQListView *to ) -{ - TQHeader *header = to->header(); - while ( header->count() ) - to->removeColumn( 0 ); - TQHeader *h2 = from->header(); - for ( int i = 0; i < h2->count(); ++i ) { - to->addColumn( h2->label( i ) ); - if ( h2->iconSet( i ) && !h2->iconSet( i )->pixmap().isNull() ) - header->setLabel( i, *h2->iconSet( i ), h2->label( i ) ); - header->setResizeEnabled( h2->isResizeEnabled( i ), i ); - header->setClickEnabled( h2->isClickEnabled( i ), i ); - } - - TQListViewItemIterator it( from ); - TQPtrStack fromParents, toParents; - fromParents.push( 0 ); - toParents.push( 0 ); - TQPtrStack toLasts; - TQListViewItem *fromLast = 0; - toLasts.push( 0 ); - int cols = from->columns(); - to->setSorting( -1 ); - from->setSorting( -1 ); - for ( ; it.current(); ++it ) { - TQListViewItem *i = it.current(); - if ( i->parent() == fromParents.top() ) { - TQListViewItem *pi = toParents.top(); - TQListViewItem *ni = 0; - if ( pi ) - ni = new TQListViewItem( pi, toLasts.top() ); - else - ni = new TQListViewItem( to, toLasts.top() ); - for ( int c = 0; c < cols; ++c ) { - ni->setText( c, i->text( c ) ); - if ( i->pixmap( c ) ) - ni->setPixmap( c, *i->pixmap( c ) ); - } - toLasts.pop(); - toLasts.push( ni ); - if ( pi ) - pi->setOpen( TRUE ); - } else { - if ( i->parent() == fromLast ) { - fromParents.push( fromLast ); - toParents.push( toLasts.top() ); - toLasts.push( 0 ); - TQListViewItem *pi = toParents.top(); - TQListViewItem *ni = 0; - if ( pi ) - ni = new TQListViewItem( pi ); - else - ni = new TQListViewItem( to ); - for ( int c = 0; c < cols; ++c ) { - ni->setText( c, i->text( c ) ); - if ( i->pixmap( c ) ) - ni->setPixmap( c, *i->pixmap( c ) ); - } - toLasts.pop(); - toLasts.push( ni ); - if ( pi ) - pi->setOpen( TRUE ); - } else { - while ( fromParents.top() != i->parent() ) { - fromParents.pop(); - toParents.pop(); - toLasts.pop(); - } - - TQListViewItem *pi = toParents.top(); - TQListViewItem *ni = 0; - if ( pi ) - ni = new TQListViewItem( pi, toLasts.top() ); - else - ni = new TQListViewItem( to, toLasts.top() ); - for ( int c = 0; c < cols; ++c ) { - ni->setText( c, i->text( c ) ); - if ( i->pixmap( c ) ) - ni->setPixmap( c, *i->pixmap( c ) ); - } - if ( pi ) - pi->setOpen( TRUE ); - toLasts.pop(); - toLasts.push( ni ); - } - } - fromLast = i; - } -} - - - -// ------------------------------------------------------------ - -PopulateMultiLineEditCommand::PopulateMultiLineEditCommand( const TQString &n, FormWindow *fw, - TQTextEdit *mle, const TQString &txt ) - : Command( n, fw ), newText( txt ), mlined( mle ) -{ - oldText = mlined->text(); - wasChanged = MetaDataBase::isPropertyChanged( TQT_TQOBJECT(mlined), "text" ); -} - -void PopulateMultiLineEditCommand::execute() -{ - mlined->setText( newText ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(mlined), "text", TRUE ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(mlined) ); -} - -void PopulateMultiLineEditCommand::unexecute() -{ - mlined->setText( oldText ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(mlined), "text", wasChanged ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(mlined) ); -} - -// ------------------------------------------------------------ - -PopulateTableCommand::PopulateTableCommand( const TQString &n, FormWindow *fw, TQTable *t, - const TQValueList &rows, - const TQValueList &columns ) - : Command( n, fw ), newRows( rows ), newColumns( columns ), table( t ) -{ -#ifndef TQT_NO_TABLE - int i = 0; - TQMap columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(table) ); - for ( i = 0; i < table->horizontalHeader()->count(); ++i ) { - PopulateTableCommand::Column col; - col.text = table->horizontalHeader()->label( i ); - if ( table->horizontalHeader()->iconSet( i ) ) - col.pix = table->horizontalHeader()->iconSet( i )->pixmap(); - col.field = *columnFields.find( col.text ); - oldColumns.append( col ); - } - for ( i = 0; i < table->verticalHeader()->count(); ++i ) { - PopulateTableCommand::Row row; - row.text = table->verticalHeader()->label( i ); - if ( table->verticalHeader()->iconSet( i ) ) - row.pix = table->verticalHeader()->iconSet( i )->pixmap(); - oldRows.append( row ); - } -#endif -} - -void PopulateTableCommand::execute() -{ -#ifndef TQT_NO_TABLE - TQMap columnFields; - table->setNumCols( newColumns.count() ); - int i = 0; - for ( TQValueList::Iterator cit = newColumns.begin(); cit != newColumns.end(); ++cit, ++i ) { - table->horizontalHeader()->setLabel( i, (*cit).pix, (*cit).text ); - if ( !(*cit).field.isEmpty() ) - columnFields.insert( (*cit).text, (*cit).field ); - } - MetaDataBase::setColumnFields( TQT_TQOBJECT(table), columnFields ); - table->setNumRows( newRows.count() ); - i = 0; - for ( TQValueList::Iterator rit = newRows.begin(); rit != newRows.end(); ++rit, ++i ) - table->verticalHeader()->setLabel( i, (*rit).pix, (*rit).text ); -#endif -} - -void PopulateTableCommand::unexecute() -{ -#ifndef TQT_NO_TABLE - TQMap columnFields; - table->setNumCols( oldColumns.count() ); - int i = 0; - for ( TQValueList::Iterator cit = oldColumns.begin(); cit != oldColumns.end(); ++cit, ++i ) { - table->horizontalHeader()->setLabel( i, (*cit).pix, (*cit).text ); - if ( !(*cit).field.isEmpty() ) - columnFields.insert( (*cit).text, (*cit).field ); - } - MetaDataBase::setColumnFields( TQT_TQOBJECT(table), columnFields ); - table->setNumRows( oldRows.count() ); - i = 0; - for ( TQValueList::Iterator rit = oldRows.begin(); rit != oldRows.end(); ++rit, ++i ) - table->verticalHeader()->setLabel( i, (*rit).pix, (*rit).text ); -#endif -} - -// ------------------------------------------------------------ - -AddActionToToolBarCommand::AddActionToToolBarCommand( const TQString &n, FormWindow *fw, - TQAction *a, QDesignerToolBar *tb, int idx ) - : Command( n, fw ), action( a ), toolBar( tb ), index( idx ) -{ -} - -void AddActionToToolBarCommand::execute() -{ - action->addTo( toolBar ); - - if ( ::tqqt_cast(action) ) { - TQString s = ( (QDesignerAction*)action )->widget()->name(); - if ( s.startsWith( "qt_dead_widget_" ) ) { - s.remove( 0, TQString( "qt_dead_widget_" ).length() ); - ( (QDesignerAction*)action )->widget()->setName( s ); - } - toolBar->insertAction( ( (QDesignerAction*)action )->widget(), action ); - ( (QDesignerAction*)action )->widget()->installEventFilter( toolBar ); - } else if ( ::tqqt_cast(action) ) { - if ( ( (QDesignerActionGroup*)action )->usesDropDown() ) { - toolBar->insertAction( ( (QDesignerActionGroup*)action )->widget(), action ); - ( (QDesignerActionGroup*)action )->widget()->installEventFilter( toolBar ); - } - } else if ( ::tqqt_cast(action) ) { - toolBar->insertAction( ( (QSeparatorAction*)action )->widget(), action ); - ( (QSeparatorAction*)action )->widget()->installEventFilter( toolBar ); - } - if ( !::tqqt_cast(action) || ( (TQActionGroup*)action )->usesDropDown()) { - if ( index == -1 ) - toolBar->appendAction( action ); - else - toolBar->insertAction( index, action ); - toolBar->reInsert(); - TQObject::connect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) ); - } else { - TQObjectList clo = action->childrenListObject(); - if ( !clo.isEmpty() ) { - TQObjectListIt it( clo ); - int i = 0; - while ( it.current() ) { - TQObject *o = it.current(); - ++it; - if ( !::tqqt_cast(o) ) - continue; - // ### fix it for nested actiongroups - if ( ::tqqt_cast(o) ) { - QDesignerAction *ac = (QDesignerAction*)o; - toolBar->insertAction( ac->widget(), ac ); - ac->widget()->installEventFilter( toolBar ); - if ( index == -1 ) - toolBar->appendAction( ac ); - else - toolBar->insertAction( index + (i++), ac ); - } - TQObject::connect( o, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) ); - } - } - toolBar->reInsert(); - TQObject::connect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) ); - } - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -void AddActionToToolBarCommand::unexecute() -{ - if ( ::tqqt_cast(action) ) { - TQString s = ( (QDesignerAction*)action )->widget()->name(); - s.prepend( "qt_dead_widget_" ); - ( (QDesignerAction*)action )->widget()->setName( s ); - } - - toolBar->removeAction( action ); - action->removeFrom( toolBar ); - TQObject::disconnect( action, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) ); - if ( !::tqqt_cast(action) || ( (TQActionGroup*)action )->usesDropDown()) { - action->removeEventFilter( toolBar ); - } else { - TQObjectList clo = action->childrenListObject(); - if ( !clo.isEmpty() ) { - TQObjectListIt it( clo ); - while ( it.current() ) { - TQObject *o = it.current(); - ++it; - if ( !::tqqt_cast(o) ) - continue; - if ( ::tqqt_cast(o) ) { - o->removeEventFilter( toolBar ); - toolBar->removeAction( (TQAction*)o ); - } - TQObject::disconnect( o, TQT_SIGNAL( destroyed() ), toolBar, TQT_SLOT( actionRemoved() ) ); - } - } - } - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -// ------------------------------------------------------------ - -AddToolBarCommand::AddToolBarCommand( const TQString &n, FormWindow *fw, TQMainWindow *mw ) - : Command( n, fw ), toolBar( 0 ), mainWindow( mw ) -{ -} - -void AddToolBarCommand::execute() -{ - if ( !toolBar ) { - toolBar = new QDesignerToolBar( mainWindow ); - TQString n = "Toolbar"; - formWindow()->unify( TQT_TQOBJECT(toolBar), n, TRUE ); - toolBar->setName( n ); - mainWindow->addToolBar( toolBar, n ); - } else { - toolBar->show(); - TQString s = toolBar->name(); - s.remove( 0, TQString( "qt_dead_widget_" ).length() ); - toolBar->setName( s ); - } - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -void AddToolBarCommand::unexecute() -{ - toolBar->hide(); - TQString s = toolBar->name(); - s.prepend( "qt_dead_widget_" ); - toolBar->setName( s ); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -// ------------------------------------------------------------ - -#ifdef TQT_CONTAINER_CUSTOM_WIDGETS -AddContainerPageCommand::AddContainerPageCommand( const TQString &n, FormWindow *fw, - TQWidget *c, const TQString &label ) - : Command( n, fw ), container( c ), index( -1 ), pageLabel( label ), page( 0 ) -{ - WidgetInterface *iface = 0; - widgetManager()->queryInterface( WidgetFactory::classNameOf( container ), &iface ); - if ( !iface ) - return; - iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&wiface ); - if ( !wiface ) - return; - wClassName = WidgetFactory::classNameOf( container ); -} - -AddContainerPageCommand::~AddContainerPageCommand() -{ - if ( wiface ) - wiface->release(); -} - -void AddContainerPageCommand::execute() -{ - if ( !wiface || !wiface->supportsPages( wClassName ) ) - return; - if ( index == -1 ) - index = wiface->count( wClassName, container ); - if ( !page ) - page = wiface->addPage( wClassName, container, pageLabel, index ); - else - wiface->insertPage( wClassName, container, pageLabel, index, page ); - - MetaDataBase::addEntry( page ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - // #### show and update pages in object hierarchy view -} - -void AddContainerPageCommand::unexecute() -{ - if ( !wiface || !wiface->supportsPages( wClassName ) ) - return; - wiface->removePage( wClassName, container, index ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - // #### show and update pages in object hierarchy view -} - -// ------------------------------------------------------------ - -DeleteContainerPageCommand::DeleteContainerPageCommand( const TQString &n, FormWindow *fw, - TQWidget *c, int idx ) - : Command( n, fw ), container( c ), index( idx ) -{ - WidgetInterface *iface = 0; - widgetManager()->queryInterface( WidgetFactory::classNameOf( container ), &iface ); - if ( !iface ) - return; - iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&wiface ); - if ( !wiface ) - return; - wClassName = WidgetFactory::classNameOf( container ); - page = wiface->page( wClassName, container, index ); - pageLabel = wiface->pageLabel( wClassName, container, index ); -} - -DeleteContainerPageCommand::~DeleteContainerPageCommand() -{ - if ( wiface ) - wiface->release(); -} - -void DeleteContainerPageCommand::execute() -{ - if ( !wiface || !wiface->supportsPages( wClassName ) ) - return; - - wiface->removePage( wClassName, container, index ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - // #### show and update pages in object hierarchy view -} - -void DeleteContainerPageCommand::unexecute() -{ - if ( !wiface || !wiface->supportsPages( wClassName ) ) - return; - if ( index == -1 ) - index = wiface->count( wClassName, container ); - - wiface->insertPage( wClassName, container, pageLabel, index, page ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - // #### show and update pages in object hierarchy view -} - -// ------------------------------------------------------------ - -RenameContainerPageCommand::RenameContainerPageCommand( const TQString &n, FormWindow *fw, - TQWidget *c, int idx, - const TQString &label ) - : Command( n, fw ), container( c ), index( idx ), newLabel( label ) -{ - WidgetInterface *iface = 0; - widgetManager()->queryInterface( WidgetFactory::classNameOf( container ), &iface ); - if ( !iface ) - return; - iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&wiface ); - if ( !wiface ) - return; - wClassName = WidgetFactory::classNameOf( container ); - oldLabel = wiface->pageLabel( wClassName, container, index ); -} - -RenameContainerPageCommand::~RenameContainerPageCommand() -{ - if ( wiface ) - wiface->release(); -} - -void RenameContainerPageCommand::execute() -{ - if ( !wiface || !wiface->supportsPages( wClassName ) ) - return; - wiface->renamePage( wClassName, container, index, newLabel ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - // #### show and update pages in object hierarchy view -} - -void RenameContainerPageCommand::unexecute() -{ - if ( !wiface || !wiface->supportsPages( wClassName ) ) - return; - wiface->renamePage( wClassName, container, index, oldLabel ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - // #### show and update pages in object hierarchy view -} -#endif // TQT_CONTAINER_CUSTOM_WIDGETS -// ------------------------------------------------------------ - -AddActionToPopupCommand::AddActionToPopupCommand( const TQString &n, - FormWindow *fw, - PopupMenuEditor *m, - PopupMenuEditorItem *i, - int idx ) - : Command( n, fw ), menu( m ), item( i ), index( idx ) -{ } - -void AddActionToPopupCommand::execute() -{ - menu->insert( item, index ); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -void AddActionToPopupCommand::unexecute() -{ - item->hideMenu(); - int i = menu->find( item->action() ); - menu->remove( i ); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -// ------------------------------------------------------------ - -RemoveActionFromPopupCommand::RemoveActionFromPopupCommand( const TQString &n, - FormWindow *fw, - PopupMenuEditor *m, - int idx ) - : AddActionToPopupCommand( n, fw, m, 0, idx ) -{ - item = menu->at( index ); -} - -void RemoveActionFromPopupCommand::execute() -{ - AddActionToPopupCommand::unexecute(); -} - -void RemoveActionFromPopupCommand::unexecute() -{ - AddActionToPopupCommand::execute(); -} - -// ------------------------------------------------------------ - -ExchangeActionInPopupCommand::ExchangeActionInPopupCommand( const TQString &n, - FormWindow *fw, - PopupMenuEditor *m, - int a, - int b ) - : Command( n, fw ), menu( m ), c( a ), d( b ) -{ } - -void ExchangeActionInPopupCommand::execute() -{ - menu->exchange( c, d ); -} - -void ExchangeActionInPopupCommand::unexecute() -{ - execute(); -} - -// ------------------------------------------------------------ - -ActionEditor *ActionCommand::actionEditor() -{ - // FIXME: handle multiple action editors - return (ActionEditor *) formWindow()->mainWindow()->child( 0, "ActionEditor" ); -} - -// ------------------------------------------------------------ - -RenameActionCommand::RenameActionCommand( const TQString &n, - FormWindow *fw, - TQAction *a, - PopupMenuEditor *m, - TQString nm ) - : ActionCommand( n, fw, a ), menu( m ), newName( nm ) -{ - oldName = action->menuText(); -} - -void RenameActionCommand::execute() -{ - TQString actionText = newName; - actionText.replace("&&", "&"); - TQString menuText = newName; - action->setText( actionText ); - action->setMenuText( menuText ); - - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -void RenameActionCommand::unexecute() -{ - action->setMenuText( oldName ); - action->setText( oldName ); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -// ------------------------------------------------------------ - -SetActionIconsCommand::SetActionIconsCommand( const TQString &n, - FormWindow *fw, - TQAction *a, - PopupMenuEditor *m, - TQIconSet &icons ) - : ActionCommand( n, fw, a ), menu( m ), newIcons( icons ) -{ - oldIcons = a->iconSet(); -} - -void SetActionIconsCommand::execute() -{ - action->setIconSet( newIcons ); - ActionEditor *ae = actionEditor(); - if ( ae ) - ae->updateActionIcon( action ); - MetaDataBase::setPropertyChanged( action, "iconSet", TRUE ); -} - -void SetActionIconsCommand::unexecute() -{ - action->setIconSet( oldIcons ); - ActionEditor *ae = actionEditor(); - if ( ae ) - ae->updateActionIcon( action ); - MetaDataBase::setPropertyChanged( action, "iconSet", TRUE ); -} - -// ------------------------------------------------------------ - -AddMenuCommand::AddMenuCommand( const TQString &n, - FormWindow *fw, - MenuBarEditor *b, - MenuBarEditorItem *i, - int idx ) - : Command( n, fw ), mb( b ), item( i ), name( 0 ), index( idx ) -{ } - -AddMenuCommand::AddMenuCommand( const TQString &n, - FormWindow *fw, - TQMainWindow *mw, - const TQString &nm ) - : Command( n, fw ), mb( 0 ), item( 0 ), name( nm ), index( -1 ) -{ - if ( mw ) - mb = (MenuBarEditor *)mw->child( 0, "MenuBarEditor" ); -} - -void AddMenuCommand::execute() -{ - TQString n; - TQMainWindow *mw = (TQMainWindow*)formWindow()->mainContainer(); - if ( !mb ) { - mb = new MenuBarEditor( formWindow(), mw ); - mb->setName( "MenuBarEditor" ); - formWindow()->insertWidget( mb, TRUE ); - } - if ( !item ) { - PopupMenuEditor *popup = new PopupMenuEditor( formWindow(), mw ); - popup->setName( "PopupMenuEditor" ); - formWindow()->insertWidget( popup, TRUE ); - mb->insertItem( name, popup, index ); - index = mb->findItem( popup ); - item = mb->item( index ); - } else { - PopupMenuEditor *popup = item->menu(); - popup->setName( item->menuText() ); - formWindow()->insertWidget( popup, TRUE ); - mb->insertItem( item, index ); - } - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -void AddMenuCommand::unexecute() -{ - if ( !item ) { - tqWarning( "The AddMenuCommand was created without a menu item." ); - return; - } - item->menu()->hide(); - int i = mb->findItem( item ); - formWindow()->removeWidget( item->menu() ); - mb->removeItemAt( i ); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -// ------------------------------------------------------------ - -RemoveMenuCommand::RemoveMenuCommand( const TQString &n, - FormWindow *fw, - MenuBarEditor *b, - int idx ) - : AddMenuCommand( n, fw, b, 0, idx ) -{ - item = mb->item( index ); -} - -void RemoveMenuCommand::execute() -{ - mb->hideItem( index ); - AddMenuCommand::unexecute(); -} - -void RemoveMenuCommand::unexecute() -{ - AddMenuCommand::execute(); -} - -// ------------------------------------------------------------ - -ExchangeMenuCommand::ExchangeMenuCommand( const TQString &n, - FormWindow *fw, - MenuBarEditor *b, - int i, - int j ) - : Command( n, fw ), bar( b ), k( i ), l( j ) -{ } - -void ExchangeMenuCommand::execute() -{ - bar->exchange( k, l ); -} - -void ExchangeMenuCommand::unexecute() -{ - execute(); -} - -// ------------------------------------------------------------ - -MoveMenuCommand::MoveMenuCommand( const TQString &n, - FormWindow *fw, - MenuBarEditor *b, - int i, - int j ) - : Command( n, fw ), bar( b ), from( i ), to( j ) -{ } - -void MoveMenuCommand::execute() -{ - bar->hideItem( from ); - MenuBarEditorItem * i = bar->item( from ); - bar->removeItemAt( from ); - int t = ( from > to ? to : to - 1 ); - bar->insertItem( i, t ); -} - -void MoveMenuCommand::unexecute() -{ - bar->hideItem( to ); - int t = ( from > to ? to : to - 1 ); - MenuBarEditorItem * i = bar->item( t ); - bar->removeItemAt( t ); - bar->insertItem( i, from ); -} - -// ------------------------------------------------------------ - -RenameMenuCommand::RenameMenuCommand( const TQString &n, - FormWindow *fw, - MenuBarEditor *b, - TQString nm, - MenuBarEditorItem *i ) - : Command( n, fw ), bar( b ), item( i ), newName( nm ) -{ - oldName = item->menu()->name(); -} - -TQString RenameMenuCommand::makeLegal( const TQString &str ) -{ - // remove illegal characters - TQString d; - char c = 0, i = 0; - while ( !str.at(i).isNull() ) { - c = str.at(i).latin1(); - if ( c == '-' || c == ' ' ) - d += '_'; - else if ( ( c >= '0' && c <= '9') || ( c >= 'A' && c <= 'Z' ) - || c == '_' || ( c >= 'a' && c <= 'z' ) ) - d += c; - ++i; - } - return d; -} - -void RenameMenuCommand::execute() -{ - PopupMenuEditor *popup = item->menu(); - item->setMenuText( newName ); - TQString legal = makeLegal( newName ); - formWindow()->unify( TQT_TQOBJECT(popup), legal, TRUE ); - popup->setName( legal ); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -void RenameMenuCommand::unexecute() -{ - PopupMenuEditor *popup = item->menu(); - item->setMenuText( oldName ); - popup->setName( oldName ); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -// ------------------------------------------------------------ - -AddToolBoxPageCommand::AddToolBoxPageCommand( const TQString &n, FormWindow *fw, - TQToolBox *tw, const TQString &label ) - : Command( n, fw ), toolBox( tw ), toolBoxLabel( label ) -{ - toolBoxPage = new QDesignerWidget( formWindow(), toolBox, "page" ); - toolBoxPage->hide(); - index = -1; - MetaDataBase::addEntry( TQT_TQOBJECT(toolBoxPage) ); -} - -void AddToolBoxPageCommand::execute() -{ - index = toolBox->insertItem( index, toolBoxPage, toolBoxLabel); - toolBox->setCurrentIndex( index ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -void AddToolBoxPageCommand::unexecute() -{ - toolBox->removeItem( toolBoxPage ); - toolBoxPage->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -// ------------------------------------------------------------ - -DeleteToolBoxPageCommand::DeleteToolBoxPageCommand( const TQString &n, FormWindow *fw, - TQToolBox *tw, TQWidget *page ) - : Command( n, fw ), toolBox( tw ), toolBoxPage( page ) -{ - toolBoxLabel = toolBox->itemLabel( toolBox->currentIndex() ); - index = toolBox->currentIndex(); -} - -void DeleteToolBoxPageCommand::execute() -{ - toolBox->removeItem( toolBoxPage ); - toolBoxPage->hide(); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} - -void DeleteToolBoxPageCommand::unexecute() -{ - index = toolBox->insertItem( index, toolBoxPage, toolBoxLabel ); - toolBox->setCurrentIndex( index ); - formWindow()->emitUpdateProperties( TQT_TQOBJECT(formWindow()->currentWidget()) ); - formWindow()->mainWindow()->objectHierarchy()->rebuild(); -} diff --git a/tdevdesigner/designer/editfunctionsimpl.cpp b/tdevdesigner/designer/editfunctionsimpl.cpp deleted file mode 100644 index 78730c99..00000000 --- a/tdevdesigner/designer/editfunctionsimpl.cpp +++ /dev/null @@ -1,534 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "editfunctionsimpl.h" -#include "formwindow.h" -#include "metadatabase.h" -#include "asciivalidator.h" -#include "mainwindow.h" -#include "hierarchyview.h" -#include "project.h" - -#include -#include -#include "tdevdesigner_part.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -EditFunctions::EditFunctions( TQWidget *parent, FormWindow *fw, bool justSlots ) - : EditFunctionsBase( parent, 0, TRUE ), formWindow( fw ) -{ - connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); - - id = 0; - functList.clear(); - - TQValueList functionList = MetaDataBase::functionList( TQT_TQOBJECT(fw) ); - for ( TQValueList::Iterator it = functionList.begin(); it != functionList.end(); ++it ) { - TQListViewItem *i = new TQListViewItem( functionListView ); - - i->setPixmap( 0, SmallIcon( "designer_editslots.png" , TDevDesignerPartFactory::instance()) ); - i->setText( 0, (*it).function ); - i->setText( 1, (*it).returnType ); - i->setText( 2, (*it).specifier ); - i->setText( 3, (*it).access ); - i->setText( 4, (*it).type ); - - FunctItem fui; - fui.id = id; - fui.oldName = (*it).function; - fui.newName = fui.oldName; - fui.oldRetTyp = (*it).returnType; - fui.retTyp = fui.oldRetTyp; - fui.oldSpec = (*it).specifier; - fui.spec = fui.oldSpec; - fui.oldAccess = (*it).access; - fui.access = fui.oldAccess; - fui.oldType = (*it).type; - fui.type = fui.oldType; - functList.append( fui ); - - functionIds.insert( i, id ); - id++; - - if ( (*it).type == "slot" ) { - if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), MetaDataBase::normalizeFunction( (*it).function ).latin1() ) ) - i->setText( 5, i18n( "Yes" ) ); - else - i->setText( 5, i18n( "No" ) ); - } else { - i->setText( 5, "---" ); - } - } - - boxProperties->setEnabled( FALSE ); - functionName->setValidator( new AsciiValidator( TRUE, TQT_TQOBJECT(functionName) ) ); - - if ( functionListView->firstChild() ) - functionListView->setCurrentItem( functionListView->firstChild() ); - - showOnlySlots->setChecked( justSlots ); - lastType = "function"; - - // Enable rename for all TQListViewItems - TQListViewItemIterator lvit = functionListView->firstChild(); - for ( ; *lvit; lvit++ ) - (*lvit)->setRenameEnabled( 0, TRUE ); - - // Connect listview signal to signal-relay - TQObject::connect( functionListView, - TQT_SIGNAL( itemRenamed( TQListViewItem*, int, const TQString & ) ), - this, - TQT_SLOT( emitItemRenamed(TQListViewItem*, int, const TQString&) ) ); - - // Connect signal-relay to TQLineEdit "functionName" - TQObjectList *l = parent->queryList( TQLINEEDIT_OBJECT_NAME_STRING, "functionName" ); - TQObject *obj; - TQObjectListIt itemsLineEditIt( *l ); - while ( (obj = itemsLineEditIt.current()) != 0 ) { - ++itemsLineEditIt; - TQObject::connect( this, - TQT_SIGNAL( itemRenamed( const TQString & ) ), - obj, - TQT_SLOT( setText( const TQString & ) ) ); - } - delete l; -} - -void EditFunctions::okClicked() -{ - TQValueList functionList = MetaDataBase::functionList( TQT_TQOBJECT(formWindow) ); - TQString n = i18n( "Add/Remove functions of '%1'" ).arg( formWindow->name() ); - TQPtrList commands; - TQValueList::Iterator fit; - if ( !functionList.isEmpty() ) { - for ( fit = functionList.begin(); fit != functionList.end(); ++fit ) { - bool functionFound = FALSE; - TQValueList::Iterator it = functList.begin(); - for ( ; it != functList.end(); ++it ) { - if ( MetaDataBase::normalizeFunction( (*it).oldName ) == - MetaDataBase::normalizeFunction( (*fit).function ) ) { - functionFound = TRUE; - break; - } - } - if ( !functionFound ) - commands.append( new RemoveFunctionCommand( i18n( "Remove Function" ), - formWindow, (*fit).function, (*fit).specifier, - (*fit).access, - (*fit).type, - formWindow->project()->language(), - (*fit).returnType ) ); - } - } - - bool invalidFunctions = FALSE; - TQValueList invalidItems; - - if ( !functList.isEmpty() ) { - TQStrList lst; - TQValueList::Iterator it = functList.begin(); - for ( ; it != functList.end(); ++it ) { - MetaDataBase::Function function; - function.function = (*it).newName; - function.returnType = (*it).retTyp; - function.specifier = (*it).spec; - function.access = (*it).access; - function.type = (*it).type; - function.language = formWindow->project()->language(); - if ( function.returnType.isEmpty() ) - function.returnType = "void"; - TQString s = function.function; - s = s.simplifyWhiteSpace(); - bool startNum = s[ 0 ] >= '0' && s[ 0 ] <= '9'; - bool noParens = s.contains( '(' ) != 1 || s.contains( ')' ) != 1; - bool illegalSpace = s.find( ' ' ) != -1 && s.find( ' ' ) < s.find( '(' ); - - if ( startNum || noParens || illegalSpace || lst.find( function.function ) != -1 ) { - invalidFunctions = TRUE; - invalidItems.append( (*it) ); - continue; - } - bool functionFound = FALSE; - for ( fit = functionList.begin(); fit != functionList.end(); ++fit ) { - if ( MetaDataBase::normalizeFunction( (*fit).function ) == - MetaDataBase::normalizeFunction( (*it).oldName ) ) { - functionFound = TRUE; - break; - } - } - if ( !functionFound ) - commands.append( new AddFunctionCommand( i18n( "Add Function" ), - formWindow, function.function, function.specifier, - function.access, - function.type, formWindow->project()->language(), - function.returnType ) ); - if ( MetaDataBase::normalizeFunction( (*it).newName ) != MetaDataBase::normalizeFunction( (*it).oldName ) || - (*it).spec != (*it).oldSpec || (*it).access != (*it).oldAccess || (*it).type != (*it).oldType || - (*it).retTyp != (*it).oldRetTyp ) { - TQString normalizedOldName = MetaDataBase::normalizeFunction( (*it).oldName ); - if ((*it).oldName.endsWith("const")) // make sure we get the 'const' when we remove the old name - normalizedOldName += " const"; - commands.append( new ChangeFunctionAttribCommand( i18n( "Change Function Attributes" ), - formWindow, function, normalizedOldName, - (*it).oldSpec, (*it).oldAccess, (*it).oldType, - formWindow->project()->language(), (*it).oldRetTyp ) ); - } - lst.append( function.function ); - } - } - - if ( invalidFunctions ) { - if ( TQMessageBox::information( this, i18n( "Edit Functions" ), - i18n( "Some syntactically incorrect functions have been defined.\n" - "Remove these functions?" ), i18n( "&Yes" ), i18n( "&No" ) ) == 0 ) { - TQValueList::Iterator it = functList.begin(); - while ( it != functList.end() ) { - bool found = FALSE; - TQValueList::Iterator vit = invalidItems.begin(); - for ( ; vit != invalidItems.end(); ++vit ) { - if ( (*vit).newName == (*it).newName ) { - invalidItems.remove( vit ); - found = TRUE; - break; - } - } - if ( found ) { - int delId = (*it).id; - it = functList.remove( it ); - TQMap::Iterator fit = functionIds.begin(); - while ( fit != functionIds.end() ) { - if ( *fit == delId ) { - TQListViewItem *litem = fit.key(); - functionIds.remove( fit ); - delete litem; - if ( functionListView->currentItem() ) - functionListView->setSelected( functionListView->currentItem(), TRUE ); - currentItemChanged( functionListView->currentItem() ); - break; - } - ++fit; - } - } - else - ++it; - } - if ( functionListView->firstChild() ) { - functionListView->setCurrentItem( functionListView->firstChild() ); - functionListView->setSelected( functionListView->firstChild(), TRUE ); - } - } - formWindow->mainWindow()->objectHierarchy()->updateFormDefinitionView(); - return; - } - - if ( !commands.isEmpty() ) { - MacroCommand *cmd = new MacroCommand( n, formWindow, commands ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); - } - - formWindow->mainWindow()->objectHierarchy()->updateFormDefinitionView(); - accept(); -} - -void EditFunctions::functionAdd( const TQString &access, const TQString &type ) -{ - TQListViewItem *i = new TQListViewItem( functionListView ); - i->setPixmap( 0, SmallIcon( "designer_editslots.png" , TDevDesignerPartFactory::instance()) ); - i->setRenameEnabled( 0, TRUE ); - i->setText( 1, "void" ); - i->setText( 2, "virtual" ); - - if ( access.isEmpty() ) - i->setText( 3, "public" ); - else - i->setText( 3, access ); - - if( type.isEmpty() ) { - if ( showOnlySlots->isChecked() ) - i->setText( 4, "slot" ); - else { - i->setText( 4, lastType ); - } - } else { - i->setText( 4, type ); - } - - if ( i->text( 4 ) == "slot" ) { - i->setText( 0, "newSlot()" ); - if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), "newSlot()" ) ) - i->setText( 5, i18n( "Yes" ) ); - else - i->setText( 5, i18n( "No" ) ); - } else { - i->setText( 0, "newFunction()" ); - i->setText( 5, "---" ); - } - - functionListView->setCurrentItem( i ); - functionListView->setSelected( i, TRUE ); - functionListView->ensureItemVisible( i ); - functionName->setFocus(); - functionName->selectAll(); - - FunctItem fui; - fui.id = id; - fui.oldName = i->text( 0 ); - fui.newName = fui.oldName; - fui.oldRetTyp = i->text( 1 ); - fui.retTyp = fui.oldRetTyp; - fui.oldSpec = i->text ( 2 ); - fui.spec = fui.oldSpec; - fui.oldAccess = i->text( 3 ); - fui.access = fui.oldAccess; - fui.oldType = i->text( 4 ); - fui.type = fui.oldType; - lastType = fui.oldType; - functList.append( fui ); - functionIds.insert( i, id ); - id++; -} - -void EditFunctions::functionRemove() -{ - if ( !functionListView->currentItem() ) - return; - - functionListView->blockSignals( TRUE ); - removedFunctions << MetaDataBase::normalizeFunction( functionListView->currentItem()->text( 0 ) ); - int delId = functionIds[ functionListView->currentItem() ]; - TQValueList::Iterator it = functList.begin(); - while ( it != functList.end() ) { - if ( (*it).id == delId ) { - functList.remove( it ); - break; - } - ++it; - } - functionIds.remove( functionListView->currentItem() ); - delete functionListView->currentItem(); - if ( functionListView->currentItem() ) - functionListView->setSelected( functionListView->currentItem(), TRUE ); - functionListView->blockSignals( FALSE ); - currentItemChanged( functionListView->currentItem() ); -} - -void EditFunctions::currentItemChanged( TQListViewItem *i ) -{ - functionName->blockSignals( TRUE ); - functionName->setText( "" ); - functionAccess->setCurrentItem( 0 ); - functionName->blockSignals( FALSE ); - - if ( !i ) { - boxProperties->setEnabled( FALSE ); - return; - } - - functionName->blockSignals( TRUE ); - functionName->setText( i->text( 0 ) ); - editType->setText( i->text( 1 ) ); - TQString specifier = i->text( 2 ); - TQString access = i->text( 3 ); - TQString type = i->text( 4 ); - if ( specifier == "pure virtual" ) - functionSpecifier->setCurrentItem( 2 ); - else if ( specifier == "non virtual" ) - functionSpecifier->setCurrentItem( 0 ); - else if ( specifier == "virtual" ) - functionSpecifier->setCurrentItem( 1 ); - else - functionSpecifier->setCurrentItem( 3 ); - if ( access == "private" ) - functionAccess->setCurrentItem( 2 ); - else if ( access == "protected" ) - functionAccess->setCurrentItem( 1 ); - else - functionAccess->setCurrentItem( 0 ); - if ( type == "slot" ) - functionType->setCurrentItem( 0 ); - else - functionType->setCurrentItem( 1 ); - - functionName->blockSignals( FALSE ); - boxProperties->setEnabled( TRUE ); -} - -void EditFunctions::currentTextChanged( const TQString &txt ) -{ - if ( !functionListView->currentItem() ) - return; - - changeItem( functionListView->currentItem(), Name, txt ); - functionListView->currentItem()->setText( 0, txt ); - - if ( functionListView->currentItem()->text( 4 ) == "slot" ) { - if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), MetaDataBase::normalizeFunction( txt.latin1() ).latin1() ) ) - functionListView->currentItem()->setText( 5, i18n( "Yes" ) ); - else - functionListView->currentItem()->setText( 5, i18n( "No" ) ); - } else { - functionListView->currentItem()->setText( 5, "---" ); - } -} - -void EditFunctions::currentSpecifierChanged( const TQString& s ) -{ - if ( !functionListView->currentItem() ) - return; - - changeItem( functionListView->currentItem(), Specifier, s ); - functionListView->currentItem()->setText( 2, s ); -} - -void EditFunctions::currentAccessChanged( const TQString& a ) -{ - if ( !functionListView->currentItem() ) - return; - changeItem( functionListView->currentItem(), Access, a ); - functionListView->currentItem()->setText( 3, a ); -} - - -void EditFunctions::currentReturnTypeChanged( const TQString &type ) -{ - if ( !functionListView->currentItem() ) - return; - changeItem( functionListView->currentItem(), ReturnType, type ); - functionListView->currentItem()->setText( 1, type ); -} - -void EditFunctions::currentTypeChanged( const TQString &type ) -{ - if ( !functionListView->currentItem() ) - return; - changeItem( functionListView->currentItem(), Type, type ); - lastType = type; - functionListView->currentItem()->setText( 4, type ); - if ( type == "slot" ) { - if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), - MetaDataBase::normalizeFunction( functionListView->currentItem()->text( 0 ).latin1() ).latin1() ) ) - functionListView->currentItem()->setText( 5, i18n( "Yes" ) ); - else - functionListView->currentItem()->setText( 5, i18n( "No" ) ); - } else { - functionListView->currentItem()->setText( 5, "---" ); - } -} - -void EditFunctions::changeItem( TQListViewItem *item, Attribute a, const TQString &nV ) -{ - int itemId; - TQMap::Iterator fit = functionIds.find( item ); - if ( fit != functionIds.end() ) - itemId = *fit; - else - return; - - TQValueList::Iterator it = functList.begin(); - for ( ; it != functList.end(); ++it ) { - if ( (*it).id == itemId ) { - switch( a ) { - case Name: - (*it).newName = nV; - break; - case Specifier: - (*it).spec = nV; - break; - case Access: - (*it).access = nV; - break; - case ReturnType: - (*it).retTyp = nV; - break; - case Type: - (*it).type = nV; - break; - } - } - } -} - -void EditFunctions::setCurrentFunction( const TQString &function ) -{ - TQListViewItemIterator it( functionListView ); - while ( it.current() ) { - if ( MetaDataBase::normalizeFunction( it.current()->text( 0 ) ) == function ) { - functionListView->setCurrentItem( it.current() ); - functionListView->setSelected( it.current(), TRUE ); - currentItemChanged( it.current() ); - return; - } - ++it; - } -} - -void EditFunctions::displaySlots( bool justSlots ) -{ - functionIds.clear(); - functionListView->clear(); - for ( TQValueList::Iterator it = functList.begin(); it != functList.end(); ++it ) { - if ( (*it).type == "function" && justSlots ) - continue; - TQListViewItem *i = new TQListViewItem( functionListView ); - functionIds.insert( i, (*it).id ); - i->setPixmap( 0, SmallIcon( "designer_editslots.png" , TDevDesignerPartFactory::instance()) ); - i->setText( 0, (*it).newName ); - i->setText( 1, (*it).retTyp ); - i->setText( 2, (*it).spec ); - i->setText( 3, (*it).access ); - i->setText( 4, (*it).type ); - - if ( (*it).type == "slot" ) { - if ( MetaDataBase::isSlotUsed( TQT_TQOBJECT(formWindow), MetaDataBase::normalizeFunction( (*it).newName ).latin1() ) ) - i->setText( 5, i18n( "Yes" ) ); - else - i->setText( 5, i18n( "No" ) ); - } else { - i->setText( 5, "---" ); - } - } - - if ( functionListView->firstChild() ) - functionListView->setSelected( functionListView->firstChild(), TRUE ); -} - -void EditFunctions::emitItemRenamed( TQListViewItem *, int, const TQString & text ) -{ - emit itemRenamed( text ); // Relay signal ( to TQLineEdit ) -} diff --git a/tdevdesigner/designer/formfile.cpp b/tdevdesigner/designer/formfile.cpp deleted file mode 100644 index ce04010e..00000000 --- a/tdevdesigner/designer/formfile.cpp +++ /dev/null @@ -1,905 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "formfile.h" -#include "timestamp.h" -#include "project.h" -#include "formwindow.h" -#include "command.h" -#include "sourceeditor.h" -#include "mainwindow.h" -#include "../interfaces/languageinterface.h" -#include "resource.h" -#include "workspace.h" -#include -#include -#include -#include "propertyeditor.h" -#include -#include -#include "designerappiface.h" -#include - -#include -#include -#include "tdevdesigner_part.h" - -static TQString make_func_pretty( const TQString &s ) -{ - TQString res = s; - if ( res.find( ")" ) - res.find( "(" ) == 1 ) - return res; - res.replace( "(", "( " ); - res.replace( ")", " )" ); - res.replace( "&", " &" ); - res.replace( "*", " *" ); - res.replace( ",", ", " ); - res.replace( ":", " : " ); - res = res.simplifyWhiteSpace(); - res.replace( " : : ", "::" ); - res.replace( ">>", "> >" ); - return res; -} - -FormFile::FormFile( const TQString &fn, bool temp, Project *p, const char *name ) - : filename( fn ), fileNameTemp( temp ), pro( p ), fw( 0 ), ed( 0 ), - timeStamp( 0, fn + codeExtension() ), codeEdited( FALSE ), pkg( FALSE ), - cm( FALSE ), codeFileStat( None ) -{ - MetaDataBase::addEntry( this ); - fake = qstrcmp( name, "qt_fakewindow" ) == 0; - //codeFileStat = FormFile::None; - pro->addFormFile( this ); - loadCode(); - if ( !temp ) - checkFileName( FALSE ); - - connect(this, TQT_SIGNAL(somethingChanged(FormFile* )), this, TQT_SLOT(emitNewStatus(FormFile* ))); -} - -FormFile::~FormFile() -{ - pro->removeFormFile( this ); - if ( TQT_TQOBJECT(formWindow()) ) - formWindow()->setFormFile( 0 ); -} - -void FormFile::setFormWindow( FormWindow *f ) -{ - if ( f == fw ) - return; - if ( fw ) - fw->setFormFile( 0 ); - fw = f; - if ( fw ) - fw->setFormFile( this ); - parseCode( cod, FALSE ); - TQTimer::singleShot( 0, this, TQT_SLOT( notifyFormWindowChange() ) ); -} - -void FormFile::setEditor( SourceEditor *e ) -{ - ed = e; -} - -void FormFile::setFileName( const TQString &fn ) -{ - if ( fn == filename ) - return; - if ( fn.isEmpty() ) { - fileNameTemp = TRUE; - if ( filename.find( "unnamed" ) != 0 ) - filename = createUnnamedFileName(); - return; - } else { - fileNameTemp = FALSE; - } - filename = fn; - timeStamp.setFileName( filename + codeExtension() ); - cod = ""; - loadCode(); -} - -void FormFile::setCode( const TQString &c ) -{ - cod = c; -} - -FormWindow *FormFile::formWindow() const -{ - return fw; -} - -SourceEditor *FormFile::editor() const -{ - return ed; -} - -TQString FormFile::fileName() const -{ - return filename; -} - -TQString FormFile::absFileName() const -{ - return pro->makeAbsolute( filename ); -} - -TQString FormFile::codeFile() const -{ - TQString codeExt = codeExtension(); - if ( codeExt.isEmpty() ) - return ""; - return filename + codeExt; -} - -TQString FormFile::code() -{ - return cod; -} - -bool FormFile::save( bool withMsgBox, bool ignoreModified ) -{ - if ( fileNameTemp ) - return saveAs(); - if ( !ignoreModified && !isModified() ) - return TRUE; - if ( ed ) - ed->save(); - - if ( TQT_TQOBJECT(formWindow()) && isModified( WFormWindow ) ) { - if ( withMsgBox ) { - if ( !formWindow()->checkCustomWidgets() ) - return FALSE; - } - - if ( TQFile::exists( pro->makeAbsolute( filename ) ) ) { - TQString fn( pro->makeAbsolute( filename ) ); -#if defined(Q_OS_WIN32) - fn += ".bak"; -#else - fn += "~"; -#endif - TQFile f( pro->makeAbsolute( filename ) ); - if ( f.open( IO_ReadOnly ) ) { - TQFile f2( fn ); - if ( f2.open( IO_WriteOnly | IO_Translate ) ) { - TQCString data( f.size() ); - f.readBlock( data.data(), f.size() ); - f2.writeBlock( data ); - } else { - TQMessageBox::warning( MainWindow::self, i18n( "Save" ), - i18n( "The file %1 could not be saved" ).arg( codeFile() ) ); - } - } - } - } - - if ( isModified( WFormCode ) ) { - if ( TQFile::exists( pro->makeAbsolute( codeFile() ) ) ) { - TQString fn( pro->makeAbsolute( codeFile() ) ); -#if defined(Q_OS_WIN32) - fn += ".bak"; -#else - fn += "~"; -#endif - TQFile f( pro->makeAbsolute( codeFile() ) ); - if ( f.open( IO_ReadOnly ) ) { - TQFile f2( fn ); - if ( f2.open( IO_WriteOnly | IO_Translate) ) { - TQCString data( f.size() ); - f.readBlock( data.data(), f.size() ); - f2.writeBlock( data ); - } else if ( tqApp->type() != TQApplication::Tty ) { - TQMessageBox::warning( MainWindow::self, i18n( "Save" ), - i18n( "The file %1 could not be saved" ).arg( codeFile() ) ); - } - } - } - } - - if ( TQT_TQOBJECT(formWindow()) ) { - Resource resource( MainWindow::self ); - resource.setWidget( formWindow() ); - bool formCodeOnly = isModified( WFormCode ) && !isModified( WFormWindow ); - if ( !resource.save( pro->makeAbsolute( filename ), formCodeOnly ) ) { - if ( MainWindow::self ) - MainWindow::self->statusMessage( i18n( "Failed to save file '%1'.").arg( formCodeOnly ? codeFile(): filename ) ); - if ( formCodeOnly ) - return FALSE; - return saveAs(); - } - if ( MainWindow::self ) - MainWindow::self->statusMessage( i18n( "'%1' saved."). - arg( formCodeOnly ? codeFile() : filename )); - } else { - if ( !Resource::saveFormCode(this, MetaDataBase::languageInterface(pro->language())) ) - return FALSE; - } - timeStamp.update(); - setModified( FALSE ); - return TRUE; -} - -bool FormFile::saveAs( bool ignoreModified ) -{ - TQString f = pro->makeAbsolute( fileName() ); - if ( fileNameTemp && TQT_TQOBJECT(formWindow()) ) { - f = TQString( formWindow()->name() ).lower(); - f.replace( "::", "_" ); - f = pro->makeAbsolute( f + ".ui" ); - } - bool saved = FALSE; - if ( ignoreModified ) { - TQString dir = TQStringList::split( ':', pro->iFace()->customSetting( "QTSCRIPT_PACKAGES" ) ).first(); - f = TQFileInfo( f ).fileName(); - f.prepend( dir + "/" ); - } - TQString fn; - while ( !saved ) { - fn = KFileDialog::getSaveFileName( f, - i18n( "*.ui|TQt User-Interface Files" ) + "\n" + - i18n( "*|All Files" ), MainWindow::self, /*0,*/ - i18n( "Save Form '%1' As").arg( formName() )/*, - MainWindow::self ? &MainWindow::self->lastSaveFilter : 0*/ ); - if ( fn.isEmpty() ) - return FALSE; - TQFileInfo fi( fn ); - if ( fi.extension() != "ui" ) - fn += ".ui"; - fileNameTemp = FALSE; - filename = pro->makeRelative( fn ); - TQFileInfo relfi( filename ); - if ( relfi.exists() ) { - if ( TQMessageBox::warning( MainWindow::self, i18n( "File Already Exists" ), - i18n( "The file already exists. Do you wish to overwrite it?" ), - TQMessageBox::Yes, - TQMessageBox::No ) == TQMessageBox::Yes ) { - saved = TRUE; - } else { - filename = f; - } - - } else { - saved = TRUE; - } - } - if ( !checkFileName( TRUE ) ) { - filename = f; - return FALSE; - } - pro->setModified( TRUE ); - timeStamp.setFileName( pro->makeAbsolute( codeFile() ) ); - if ( ed && TQT_TQOBJECT(formWindow()) ) - ed->setCaption( i18n( "Edit %1" ).arg( formWindow()->name() ) ); - setModified( TRUE ); - if ( pro->isDummy() ) - fw->mainWindow()->addRecentlyOpenedFile( fn ); - return save( TRUE, ignoreModified ); -} - -bool FormFile::close() -{ - if ( editor() ) { - editor()->save(); - editor()->close(); - } - if ( TQT_TQOBJECT(formWindow()) ) - return formWindow()->close(); - return TRUE; -} - -bool FormFile::closeEvent() -{ - if ( !isModified() && fileNameTemp ) { - pro->removeFormFile( this ); - return TRUE; - } - - if ( !isModified() ) - return TRUE; - - if ( editor() ) - editor()->save(); - - switch ( TQMessageBox::warning( MainWindow::self, i18n( "Save Form" ), - i18n( "Save changes to form '%1'?" ).arg( filename ), - i18n( "&Yes" ), i18n( "&No" ), i18n( "&Cancel" ), 0, 2 ) ) { - case 0: // save - if ( !save() ) - return FALSE; - case 1: // don't save - loadCode(); - if ( ed ) - ed->editorInterface()->setText( cod ); - if ( fileNameTemp ) - pro->removeFormFile( this ); - if ( MainWindow::self ) - MainWindow::self->workspace()->update(); - break; - case 2: // cancel - return FALSE; - default: - break; - } - - setModified( FALSE ); - if ( MainWindow::self ) - MainWindow::self->updateFunctionList(); - setCodeEdited( FALSE ); - return TRUE; -} - -void FormFile::setModified( bool m, int who ) -{ - if ( ( who & WFormWindow ) == WFormWindow ) - setFormWindowModified( m ); - if ( ( who & WFormCode ) == WFormCode ) - setCodeModified( m ); -} - -bool FormFile::isModified( int who ) -{ - if ( who == WFormWindow ) - return isFormWindowModified(); - if ( who == WFormCode ) - return isCodeModified(); - return isCodeModified() || isFormWindowModified(); -} - -bool FormFile::isFormWindowModified() const -{ - if ( !TQT_TQOBJECT(formWindow()) || !formWindow()->commandHistory() ) - return FALSE; - return formWindow()->commandHistory()->isModified(); -} - -bool FormFile::isCodeModified() const -{ - if ( !editor() ) - return cm; - return editor()->isModified(); -} - -void FormFile::setFormWindowModified( bool m ) -{ - bool b = isFormWindowModified(); - if ( m == b ) - return; - if ( !TQT_TQOBJECT(formWindow()) || !formWindow()->commandHistory() ) - return; - formWindow()->commandHistory()->setModified( m ); - emit somethingChanged( this ); -} - -void FormFile::setCodeModified( bool m ) -{ - bool b = isCodeModified(); - if ( m == b ) - return; - emit somethingChanged( this ); - cm = m; - if ( !editor() ) - return; - editor()->setModified( m ); -} - -void FormFile::showFormWindow() -{ - if ( !MainWindow::self ) - return; - if ( TQT_TQOBJECT(formWindow()) ) { - if ( ( formWindow()->hasFocus() || - TQT_BASE_OBJECT(MainWindow::self->qWorkspace()->activeWindow()) == TQT_BASE_OBJECT(formWindow()) ) && - TQT_BASE_OBJECT(MainWindow::self->propertyeditor()->formWindow()) != TQT_BASE_OBJECT(formWindow()) ) { - MainWindow::self->propertyeditor()->setWidget( TQT_TQOBJECT(formWindow()->currentWidget()), formWindow() ); - MainWindow::self->objectHierarchy()->setFormWindow( formWindow(), - TQT_TQOBJECT(formWindow()->currentWidget()) ); - } - formWindow()->setFocus(); - return; - } - MainWindow::self->openFormWindow( pro->makeAbsolute( filename ), TRUE, this ); -} - -bool FormFile::setupUihFile( bool askForUih ) -{ - if ( !pro->isCpp() || !askForUih ) { - if ( !hasFormCode() ) { - createFormCode(); - setModified( TRUE ); - } - codeFileStat = FormFile::Ok; - return TRUE; - } - if ( codeFileStat != FormFile::Ok && !ed ) { - if ( hasFormCode() ) { - int i = TQMessageBox::information( MainWindow::self, i18n( "Using ui.h File" ), - i18n( "An \"ui.h\" file for this form already exists.\n" - "Do you want to use it or create a new one?" ), - i18n( "Use Existing" ), i18n( "Create New" ), - i18n( "Cancel" ), 2, 2 ); - if ( i == 2 ) - return FALSE; - if ( i == 1 ) - createFormCode(); - } else { - if ( TQMessageBox::Yes != TQMessageBox::information( MainWindow::self, i18n( "Creating ui.h file" ), - i18n( "Do you want to create an new \"ui.h\" file?" ), - TQMessageBox::Yes, TQMessageBox::No ) ) - return FALSE; - createFormCode(); - } - setModified( TRUE ); - } - codeFileStat = FormFile::Ok; - return TRUE; -} - -SourceEditor *FormFile::showEditor( bool askForUih ) -{ - if ( !MainWindow::self ) - return 0; - showFormWindow(); - //emit signal to the embedding IDE if there is one and return 0 because - //no source editing is possible - emit fw->mainWindow()->part()->emitEditSource(fw->fileName()); - return 0; -/* if ( !setupUihFile( askForUih ) ) - return 0; - return MainWindow::self->openSourceEditor();*/ -} - -static int ui_counter = 0; -TQString FormFile::createUnnamedFileName() -{ - return TQString( "unnamed" ) + TQString::number( ++ui_counter ) + TQString( ".ui" ); -} - -TQString FormFile::codeExtension() const -{ - LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); - if ( iface ) - return iface->formCodeExtension(); - return ""; -} - -TQString FormFile::codeComment() const -{ - return TQString( "/****************************************************************************\n" - "** ui.h extension file, included from the uic-generated form implementation.\n" - "**\n" - "** If you want to add, delete, or rename functions or slots, use\n" - "** TQt Designer to update this file, preserving your code.\n" - "**\n" - "** You should not define a constructor or destructor in this file.\n" - "** Instead, write your code in functions called init() and destroy().\n" - "** These will automatically be called by the form's constructor and\n" - "** destructor.\n" - "*****************************************************************************/\n" ); -} - -bool FormFile::hasFormCode() const -{ - return !cod.isEmpty() && cod != TQString( codeComment() ); -} - -int FormFile::codeFileState() const -{ - return hasFormCode() ? codeFileStat : None; -} - -void FormFile::setCodeFileState( UihState s ) -{ - codeFileStat = s; -} - -void FormFile::createFormCode() -{ - if ( !TQT_TQOBJECT(formWindow()) ) - return; - LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); - if ( !iface ) - return; - if ( pro->isCpp() ) - cod = codeComment(); - TQValueList functionList = MetaDataBase::functionList( TQT_TQOBJECT(formWindow()) ); - for ( TQValueList::Iterator it = functionList.begin(); it != functionList.end(); ++it ) { - cod += (!cod.isEmpty() ? "\n\n" : "") + - iface->createFunctionStart( formWindow()->name(), make_func_pretty((*it).function), - (*it).returnType.isEmpty() ? - TQString( "void" ) : - (*it).returnType, (*it).access ) + - "\n" + iface->createEmptyFunction(); - } - parseCode( cod, FALSE ); -} - -void FormFile::load() -{ - showFormWindow(); - code(); -} - -bool FormFile::loadCode() -{ - TQFile f( pro->makeAbsolute( codeFile() ) ); - if ( !f.open( IO_ReadOnly ) ) { - cod = ""; - setCodeFileState( FormFile::None ); - return FALSE; - } - TQTextStream ts( &f ); - cod = ts.read(); - parseCode( cod, FALSE ); - if ( hasFormCode() && codeFileStat != FormFile::Ok ) - setCodeFileState( FormFile::Deleted ); - timeStamp.update(); - return TRUE; -} - -bool FormFile::isCodeEdited() const -{ - return codeEdited; -} - -void FormFile::setCodeEdited( bool b ) -{ - codeEdited = b; -} - -void FormFile::parseCode( const TQString &txt, bool allowModify ) -{ - if ( !TQT_TQOBJECT(formWindow()) ) - return; - LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); - if ( !iface ) - return; - TQValueList functions; - TQValueList newFunctions, oldFunctions; - oldFunctions = MetaDataBase::functionList( TQT_TQOBJECT(formWindow()) ); - iface->functions( txt, &functions ); - TQMap funcs; - for ( TQValueList::Iterator it = functions.begin(); - it != functions.end(); ++it ) { - bool found = FALSE; - for ( TQValueList::Iterator fit = oldFunctions.begin(); - fit != oldFunctions.end(); ++fit ) { - TQString f( (*fit).function ); - if ( MetaDataBase::normalizeFunction( f ) == - MetaDataBase::normalizeFunction( (*it).name ) ) { - found = TRUE; - MetaDataBase::Function function; - function.function = make_func_pretty( (*it).name ); - function.specifier = (*fit).specifier; - function.type = (*fit).type; - if ( !pro->isCpp() ) - function.access = (*it).access; - else - function.access = (*fit).access; - function.language = (*fit).language; - function.returnType = (*it).returnType; - newFunctions << function; - funcs.insert( (*it).name, (*it).body ); - oldFunctions.remove( fit ); - break; - } - } - if ( !found ) { - MetaDataBase::Function function; - function.function = make_func_pretty( (*it).name ); - function.specifier = "virtual"; - function.access = "public"; - function.language = pro->language(); - function.returnType = (*it).returnType; - if ( function.returnType == "void" ) - function.type = "slot"; - else - function.type = "function"; - if ( function.function == "init()" || function.function == "destroy()" ) { - function.type = "function"; - function.access = "private"; - function.specifier = "non virtual"; - } - newFunctions << function; - funcs.insert( (*it).name, (*it).body ); - if ( allowModify ) - setFormWindowModified( TRUE ); - } - } - - if ( allowModify && oldFunctions.count() > 0 ) - setFormWindowModified( TRUE ); - - MetaDataBase::setFunctionList( TQT_TQOBJECT(formWindow()), newFunctions ); -} - -void FormFile::syncCode() -{ - if ( !editor() ) - return; - parseCode( editor()->editorInterface()->text(), TRUE ); - cod = editor()->editorInterface()->text(); -} - -void FormFile::checkTimeStamp() -{ - if ( timeStamp.isUpToDate() ) - return; - timeStamp.update(); - if ( codeEdited ) { - if ( TQMessageBox::information( MainWindow::self, i18n( "TQt Designer" ), - i18n( "File '%1' has been changed outside TQt Designer.\n" - "Do you want to reload it?" ).arg( timeStamp.fileName() ), - i18n( "&Yes" ), i18n( "&No" ) ) == 0 ) { - TQFile f( timeStamp.fileName() ); - if ( f.open( IO_ReadOnly ) ) { - TQTextStream ts( &f ); - editor()->editorInterface()->setText( ts.read() ); - editor()->save(); - if ( MainWindow::self ) - MainWindow::self->functionsChanged(); - } - } - } else { - loadCode(); - } -} - -bool FormFile::isUihFileUpToDate() -{ - if ( timeStamp.isUpToDate() ) - return TRUE; - if ( !editor() ) { - MainWindow::self->editSource(); - tqDebug( "parse Code" ); - parseCode( editor()->editorInterface()->text(), TRUE ); - } - checkTimeStamp(); - return FALSE; -} - -void FormFile::addFunctionCode( MetaDataBase::Function function ) -{ - if ( pro->isCpp() && !hasFormCode() && !codeEdited ) - return; - LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); - if ( !iface ) - return; - - TQValueList funcs; - iface->functions( cod, &funcs ); - bool hasFunc = FALSE; - for ( TQValueList::Iterator it = funcs.begin(); - it != funcs.end(); ++it ) { - if ( MetaDataBase::normalizeFunction( (*it).name ) == MetaDataBase::normalizeFunction( function.function ) ) { - hasFunc = TRUE; - break; - } - } - - if ( !hasFunc ) { - if ( !codeEdited && !timeStamp.isUpToDate() ) - loadCode(); - MetaDataBase::MetaInfo mi = MetaDataBase::metaInfo( TQT_TQOBJECT(formWindow()) ); - TQString cn; - if ( mi.classNameChanged ) - cn = mi.className; - if ( cn.isEmpty() ) - cn = formWindow()->name(); - TQString body = "\n\n" + iface->createFunctionStart( cn, - make_func_pretty( function.function ), - function.returnType.isEmpty() ? - TQString( "void" ) : - function.returnType, function.access ) + - "\n" + iface->createEmptyFunction(); - cod += body; - if ( codeEdited ) { - setModified( TRUE ); - emit somethingChanged( this ); - } - } -} - -void FormFile::removeFunctionCode( MetaDataBase::Function function ) -{ - if ( pro->isCpp() && !hasFormCode() && !codeEdited ) - return; - - LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); - if ( !iface ) - return; - - checkTimeStamp(); - TQString sourceCode = code(); - if ( sourceCode.isEmpty() ) - return; - TQValueList functions; - iface->functions( sourceCode, &functions ); - TQString fu = MetaDataBase::normalizeFunction( function.function ); - for ( TQValueList::Iterator fit = functions.begin(); fit != functions.end(); ++fit ) { - if ( MetaDataBase::normalizeFunction( (*fit).name ) == fu ) { - int line = 0; - int start = 0; - while ( line < (*fit).start - 1 ) { - start = sourceCode.find( '\n', start ); - if ( start == -1 ) - return; - start++; - line++; - } - if ( start == -1 ) - return; - int end = start; - while ( line < (*fit).end + 1 ) { - end = sourceCode.find( '\n', end ); - if ( end == -1 ) { - if ( line <= (*fit).end ) - end = sourceCode.length() - 1; - else - return; - } - end++; - line++; - } - if ( end < start ) - return; - sourceCode.remove( start, end - start ); - setCode( sourceCode ); - } - } -} - -void FormFile::functionNameChanged( const TQString &oldName, const TQString &newName ) -{ - if ( !cod.isEmpty() ) { - TQString funcStart = TQString( formWindow()->name() ) + TQString( "::" ); - int i = cod.find( funcStart + oldName ); - if ( i != -1 ) { - cod.remove( i + funcStart.length(), oldName.length() ); - cod.insert( i + funcStart.length(), newName ); - } - } -} - -void FormFile::functionRetTypeChanged( const TQString &fuName, const TQString &oldType, const TQString &newType ) -{ - if ( !cod.isEmpty() ) { - TQString oldFunct = oldType + " " + TQString( formWindow()->name() ) + "::" + fuName; - TQString newFunct = newType + " " + TQString( formWindow()->name() ) + "::" + fuName; - - int i = cod.find( oldFunct ); - if ( i != -1 ) { - cod.remove( i, oldFunct.length() ); - cod.insert( i, newFunct ); - } - } -} - -TQString FormFile::formName() const -{ - FormFile* that = (FormFile*) this; - if ( TQT_TQOBJECT(formWindow()) ) { - that->cachedFormName = formWindow()->name(); - return cachedFormName; - } - if ( !cachedFormName.isNull() ) - return cachedFormName; - TQFile f( pro->makeAbsolute( filename ) ); - if ( f.open( IO_ReadOnly ) ) { - TQTextStream ts( &f ); - TQString line; - TQString className; - while ( !ts.eof() ) { - line = ts.readLine(); - if ( !className.isEmpty() ) { - int end = line.find( "" ); - if ( end == -1 ) { - className += line; - } else { - className += line.left( end ); - break; - } - continue; - } - int start; - if ( ( start = line.find( "" ) ) != -1 ) { - int end = line.find( "" ); - if ( end == -1 ) { - className = line.mid( start + 7 ); - } else { - className = line.mid( start + 7, end - ( start + 7 ) ); - break; - } - } - } - that->cachedFormName = className; - } - if ( cachedFormName.isEmpty() ) - that->cachedFormName = filename; - return cachedFormName; -} - -void FormFile::formWindowChangedSomehow() -{ - emit somethingChanged( this ); -} - -bool FormFile::checkFileName( bool allowBreak ) -{ - FormFile *ff = pro->findFormFile( filename, this ); - if ( ff ) - TQMessageBox::warning( MainWindow::self, i18n( "Invalid Filename" ), - i18n( "The project already contains a form with a\n" - "filename of '%1'. Please choose a new filename." ).arg( filename ) ); - while ( ff ) { - TQString fn; - while ( fn.isEmpty() ) { - fn = KFileDialog::getSaveFileName( pro->makeAbsolute( fileName() ), - i18n( "*.ui|TQt User-Interface Files" ) + "\n" + - i18n( "*|All Files" ), MainWindow::self,/* 0,*/ - i18n( "Save Form '%1' As"). - arg( formWindow()->name() )/*, - MainWindow::self ? &MainWindow::self->lastSaveFilter : 0 */); - if ( allowBreak && fn.isEmpty() ) - return FALSE; - } - filename = pro->makeRelative( fn ); - ff = pro->findFormFile( filename, this ); - } - return TRUE; -} - -void FormFile::addConnection( const TQString &sender, const TQString &signal, - const TQString &receiver, const TQString &slot ) -{ - LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); - if ( iface ) - iface->addConnection( sender, signal, receiver, slot, &cod ); - if ( ed ) - ed->editorInterface()->setText( cod ); -} - -void FormFile::removeConnection( const TQString &sender, const TQString &signal, - const TQString &receiver, const TQString &slot ) -{ - LanguageInterface *iface = MetaDataBase::languageInterface( pro->language() ); - if ( iface ) - iface->removeConnection( sender, signal, receiver, slot, &cod ); - if ( ed ) - ed->editorInterface()->setText( cod ); -} - -void FormFile::notifyFormWindowChange() -{ - if ( fw ) - pro->formOpened( fw ); -} - -void FormFile::emitNewStatus(FormFile *file) -{ - fw->mainWindow()->part()->emitNewStatus(fileName(), isModified()); -} diff --git a/tdevdesigner/designer/formwindow.cpp b/tdevdesigner/designer/formwindow.cpp deleted file mode 100644 index 8852eaa2..00000000 --- a/tdevdesigner/designer/formwindow.cpp +++ /dev/null @@ -1,2773 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "formwindow.h" -#include "defs.h" -#include "mainwindow.h" -#include "widgetfactory.h" -#include "sizehandle.h" -#include "metadatabase.h" -#include "resource.h" -#include "tqlayout.h" -#include "connectiondialog.h" -#include -#include "pixmapchooser.h" -#include "orderindicator.h" -#include "hierarchyview.h" -#include "designerappiface.h" -#include "menubareditor.h" -#define NO_STATIC_COLORS -#include "globaldefs.h" - -#include - -#include -#include -#include "tdevdesigner_part.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// FormWindow should be able to work to some limited degree -// (existance, loading) without a MainWindow. Functions which require -// a MainWindow in theory should never be called if no MainWindow -// exists. These macros are used to let us know if that happens anyway -// and to ensure that we don't crash -#define CHECK_MAINWINDOW Q_ASSERT( mainWindow() ); if ( !mainWindow() ) return -#define CHECK_MAINWINDOW_VALUE( v ) Q_ASSERT( mainWindow() ); if ( !mainWindow() ) return v - -static void setCursorToAll( const TQCursor &c, TQWidget *start ) -{ - start->setCursor( c ); - TQObjectList l = start->childrenListObject(); - if ( !l.isEmpty() ) { - for ( TQObject *o = l.first(); o; o = l.next() ) { - if ( o->isWidgetType() && !::tqqt_cast(o) ) - setCursorToAll( c, ( (TQWidget*)o ) ); - } - } -} - -static void restoreCursors( TQWidget *start, FormWindow *fw ) -{ - if ( fw->widgets()->find( start ) ) - start->setCursor( MetaDataBase::cursor( start ) ); - else - start->setCursor( TQt::ArrowCursor ); - TQObjectList l = start->childrenListObject(); - if ( !l.isEmpty() ) { - for ( TQObject *o = l.first(); o; o = l.next() ) { - if ( o->isWidgetType() && !::tqqt_cast(o) ) - restoreCursors( ( (TQWidget*)o ), fw ); - } - } -} - -#if defined(TQ_WS_WIN32) // #### needed for the workaround for repaint problem on windows -#include -static void flickerfree_update( TQWidget *w ) -{ - InvalidateRect( w->winId(), 0, FALSE ); -} -#endif - -/*! - \class FormWindow formwindow.h - \brief Editor window for a form - - The FormWindow is the widget which is used as editor for forms. It - handles inserting, deleting, moving, resizing, etc. of widgets. - - Normally multiple formwindows are used at the same time in the - Designer. So each formwindow has its own undo/redo buffer, etc. - - Also the formwindow has some signals to inform e.g. about selection - changes which is interesting for the PropertyEditor. - - For handling the events of the child widgets (moving, etc.) the - handleMousePress(), etc. functions are called from the application - event filter which is implemented in MainWindow::eventFilter(). -*/ - -FormWindow::FormWindow( FormFile *f, MainWindow *mw, TQWidget *parent, const char *name ) - : TQWidget( parent, name, WDestructiveClose ), mainwindow( mw ), - commands( 100 ), pixInline( TRUE ), pixProject( FALSE ) -{ - ff = f; - init(); - initSlots(); -} - -FormWindow::FormWindow( FormFile *f, TQWidget *parent, const char *name ) - : TQWidget( parent, name, WDestructiveClose ), mainwindow( 0 ), - commands( 100 ), pixInline( TRUE ) -{ - ff = f; - init(); -} - -void FormWindow::init() -{ - setWFlags(getWFlags() & TQt::WStyle_Maximize); - - fake = qstrcmp( name(), "qt_fakewindow" ) == 0; - MetaDataBase::addEntry( TQT_TQOBJECT(this) ); - ff->setFormWindow( this ); - iface = 0; - proj = 0; - propertyWidget = 0; - toolFixed = FALSE; - checkedSelectionsForMove = FALSE; - mContainer = 0; - startWidget = endWidget = 0; - currTool = POINTER_TOOL; - unclippedPainter = 0; - widgetPressed = FALSE; - drawRubber = FALSE; - setFocusPolicy( TQ_ClickFocus ); - sizePreviewLabel = 0; - checkSelectionsTimer = new TQTimer( this, "checkSelectionsTimer" ); - connect( checkSelectionsTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( invalidCheckedSelections() ) ); - updatePropertiesTimer = new TQTimer( this ); - connect( updatePropertiesTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( updatePropertiesTimerDone() ) ); - showPropertiesTimer = new TQTimer( this ); - //!!!! - connect( showPropertiesTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( showPropertiesTimerDone() ) ); - selectionChangedTimer = new TQTimer( this ); - connect( selectionChangedTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( selectionChangedTimerDone() ) ); - windowsRepaintWorkaroundTimer = new TQTimer( this ); - connect( windowsRepaintWorkaroundTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( windowsRepaintWorkaroundTimerTimeout() ) ); - insertParent = 0; - connect( &commands, TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ), - this, TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ) ); - propShowBlocked = FALSE; - - setIcon( SmallIcon( "designer_form.png" , TDevDesignerPartFactory::instance()) ); - - connect( &commands, TQT_SIGNAL( modificationChanged( bool ) ), - this, TQT_SLOT( modificationChanged( bool ) ) ); - buffer = 0; - - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQFRAME_OBJECT_NAME_STRING ), this ); - setMainContainer( w ); - propertyWidget = TQT_TQOBJECT(w); - targetContainer = 0; - hadOwnPalette = FALSE; - - defSpacing = BOXLAYOUT_DEFAULT_SPACING; - defMargin = BOXLAYOUT_DEFAULT_MARGIN; - hasLayoutFunc = FALSE; -} - -void FormWindow::setMainWindow( MainWindow *w ) -{ - mainwindow = w; - MetaDataBase::addEntry( TQT_TQOBJECT(this) ); - initSlots(); -} - -void FormWindow::initSlots() -{ - if ( isFake() ) - return; - Q_ASSERT( project() || MainWindow::self ); - if ( !project() && !MainWindow::self ) - return; - Project *p = project() ? project() : MainWindow::self->currProject(); - if ( p && p->isCpp() ) { - TQString code = formFile()->code(); - if ( code.isEmpty() ) - formFile()->setCode( formFile()->codeComment() ); - } -} - -FormWindow::~FormWindow() -{ - if ( MainWindow::self && MainWindow::self->objectHierarchy()->formWindow() == this ) - MainWindow::self->objectHierarchy()->setFormWindow( 0, 0 ); - - MetaDataBase::clear( TQT_TQOBJECT(this) ); - if ( ff ) - ff->setFormWindow( 0 ); - delete iface; -} - -void FormWindow::closeEvent( TQCloseEvent *e ) -{ - TQGuardedPtr that = this; - if ( ff->closeEvent() && ( !that || ( mainwindow && mainwindow->unregisterClient( this ) ) ) ) - e->accept(); - else - e->ignore(); -} - -void FormWindow::paintGrid( TQWidget *w, TQPaintEvent *e ) -{ - if ( !mainWindow() || !mainWindow()->showGrid() ) - return; - TQPixmap grid; - TQString grid_name; - grid_name.sprintf("FormWindowGrid_%d_%d", mainWindow()->grid().x(), mainWindow()->grid().y()); - if( !TQPixmapCache::find( grid_name, grid ) ) { - grid = TQPixmap( 350 + ( 350 % mainWindow()->grid().x() ), 350 + ( 350 % mainWindow()->grid().y() ) ); - grid.fill( colorGroup().color( TQColorGroup::Foreground ) ); - TQBitmap mask( grid.width(), grid.height() ); - mask.fill( color0 ); - TQPainter p( &mask ); - p.setPen( color1 ); - for ( int y = 0; y < grid.width(); y += mainWindow()->grid().y()) { - for ( int x = 0; x < grid.height(); x += mainWindow()->grid().x() ) { - p.drawPoint( x, y ); - } - } - grid.setMask( mask ); - TQPixmapCache::insert( grid_name, grid ); - } - TQPainter p( w ); - p.setClipRegion( e->rect() ); - p.drawTiledPixmap( TQRect( 0, 0, width(), height() ), grid ); -} - -/*! For operations like drawing a rubber band or drawing the rect - when inserting a new widget, a unclipped painter (which draws also - on child widgets) is needed. This method does all the initialization. -*/ - -void FormWindow::beginUnclippedPainter( bool doNot ) -{ - endUnclippedPainter(); - bool unclipped = testWFlags( WPaintUnclipped ); - setWFlags( WPaintUnclipped ); - unclippedPainter = new TQPainter; - unclippedPainter->begin( this ); - if ( !unclipped ) - clearWFlags( WPaintUnclipped ); - if ( doNot ) { - unclippedPainter->setPen( TQPen( color0, 2 ) ); - unclippedPainter->setRasterOp( NotROP ); - } -} - -/*! - Gets rid of an open unclipped painter. - - \sa beginUnclippedPainter() -*/ - -void FormWindow::endUnclippedPainter() -{ - if ( unclippedPainter ) - unclippedPainter->end(); - delete unclippedPainter; - unclippedPainter = 0; -} - -TQPoint FormWindow::gridPoint( const TQPoint &p ) -{ - return TQPoint( ( p.x() / grid().x() ) * grid().x(), - ( p.y() / grid().y() ) * grid().y() ); -} - -void FormWindow::drawSizePreview( const TQPoint &pos, const TQString& text ) -{ - unclippedPainter->save(); - unclippedPainter->setPen( TQPen( colorGroup().foreground(), 1 )); - unclippedPainter->setRasterOp( CopyROP ); - if ( !sizePreviewPixmap.isNull() ) - unclippedPainter->drawPixmap( sizePreviewPos, sizePreviewPixmap ); - if ( text.isNull() ) { - sizePreviewPixmap = TQPixmap(); // set null again - unclippedPainter->restore(); - return; - } - TQRect r = fontMetrics().boundingRect( 0, 0, 0, 0, AlignCenter, text ); - r = TQRect( pos + TQPoint( 10, 10 ), r.size() + TQSize( 5, 5 ) ); - - checkPreviewGeometry( r ); - - sizePreviewPos = r.topLeft(); - sizePreviewPixmap = TQPixmap::grabWindow( winId(), r.x(), r.y(), r.width(), r.height() ); - unclippedPainter->setBrush( TQColor( 255, 255, 128 ) ); - unclippedPainter->drawRect( r ); - unclippedPainter->drawText( r, AlignCenter, text ); - unclippedPainter->restore(); -} - -void FormWindow::insertWidget() -{ - CHECK_MAINWINDOW; - if ( !insertParent ) - return; - - if ( currTool == POINTER_TOOL ) - return; - - bool useSizeHint = !oldRectValid || ( currRect.width() < 2 && currRect.height() < 2 ); - Qt::Orientation orient =Qt::Horizontal; - TQString n = WidgetDatabase::className( currTool ); - if ( useSizeHint && ( n == "Spacer" || n == TQSLIDER_OBJECT_NAME_STRING || n == "Line" || n == TQSCROLLBAR_OBJECT_NAME_STRING ) ) { - TQPopupMenu m( mainWindow() ); - m.insertItem( i18n( "&Horizontal" ) ); - int ver = m.insertItem( i18n( "&Vertical" ) ); - int r = m.exec( TQCursor::pos() ); - if ( r == ver ) - orient =Qt::Vertical; - } - - - TQWidget *w = WidgetFactory::create( currTool, insertParent, 0, TRUE, &currRect, orient ); - if ( !w ) - return; - - if ( !savePixmapInline() && currTool == WidgetDatabase::idFromClassName( "PixmapLabel" ) ) { // ### what to do for pixmaps in project - TQPixmap pix; - // we have to force the pixmap to get a new and unique serial number. Unfortunately detatch() doesn't do that - pix.convertFromImage( SmallIcon( "designer_image.png" , TDevDesignerPartFactory::instance()).convertToImage() ); - ( (TQLabel*)w )->setPixmap( pix ); - } - int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(TQT_TQOBJECT(w)) ); - if ( WidgetDatabase::isCustomWidget( id ) ) { - TQWhatsThis::add( w, i18n("A %1 (custom widget) " - "

    Click Edit Custom Widgets... in the Tools|Custom " - "menu to add and change custom widgets. You can add " - "properties as well as signals and slots to integrate custom widgets into " - "TQt Designer, and provide a pixmap which will be used to represent " - "the widget on the form.

    ") - .arg(WidgetDatabase::toolTip( id )) ); - TQToolTip::add( w, i18n("A %1 (custom widget)").arg(WidgetDatabase::toolTip( id )) ); - } else { - TQString tt = WidgetDatabase::toolTip( id ); - TQString wt = WidgetDatabase::whatsThis( id ); - if ( !wt.isEmpty() && !tt.isEmpty() ) - TQWhatsThis::add( w, TQString("A %1

    %2

    ").arg( tt ).arg( wt ) ); - } - - TQString s = w->name(); - unify( TQT_TQOBJECT(w), s, TRUE ); - w->setName( s ); - insertWidget( w ); - TQRect r( currRect ); - if ( !oldRectValid || - ( currRect.width() < 2 && currRect.height() < 2 ) ) - r = TQRect( rectAnchor, TQSize( 0, 0 ) ); - - TQPoint p = r.topLeft(); - p = mapToGlobal( p ); - p = insertParent->mapFromGlobal( p ); - r = TQRect( p, r.size() ); - - if ( useSizeHint ) { - if ( n == "Spacer" ) { - if ( orient ==Qt::Vertical ) { - r.setWidth( 20 ); - r.setHeight( 40 ); - } else { - r.setWidth( 40 ); - r.setHeight( 20 ); - } - } else { - r.setWidth( w->sizeHint().width() ); - r.setHeight( w->sizeHint().height() ); - } - } - - if ( r.width() < 2 * grid().x() ) - r.setWidth( 2 * grid().x() ); - if ( r.height() < 2 * grid().y() ) - r.setHeight( 2 * grid().y() ); - - const TQObjectList l = insertParent->childrenListObject(); - TQObjectListIt it( l ); - TQWidgetList lst; - if ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) { - for ( ; it.current(); ) { - TQObject *o = it.current(); - ++it; - if ( o->isWidgetType() && - ( (TQWidget*)o )->isVisibleTo( this ) && - insertedWidgets.find( TQT_TQWIDGET(o) ) && TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(w) ) { - TQRect r2( ( (TQWidget*)o )->pos(), - ( (TQWidget*)o )->size() ); - if ( r.contains( r2 ) ) - lst.append( (TQWidget*)o ); - } - } - } - - if ( !lst.isEmpty() ) { - TQWidget *pw = WidgetFactory::containerOfWidget( w ); - if (pw) { - TQValueList op, np; - for ( TQWidget *i = lst.first(); i; i = lst.next() ) { - op.append( i->pos() ); - TQPoint pos = pw->mapFromGlobal( i->mapToGlobal( TQPoint( 0, 0 ) ) ); - pos -= r.topLeft(); - np.append( pos ); - } - - MoveCommand *mv = new MoveCommand( i18n( "Reparent Widgets" ), this, - lst, op, np, insertParent, pw ); - - if ( !toolFixed ) - mainwindow->resetTool(); - else - setCursorToAll( CrossCursor, w ); - - InsertCommand *cmd = new InsertCommand( i18n( "Insert %1" ).arg( w->name() ), this, w, r ); - - TQPtrList commands; - commands.append( mv ); - commands.append( cmd ); - - MacroCommand *mc = new MacroCommand( i18n( "Insert %1" ).arg( w->name() ), this, commands ); - commandHistory()->addCommand( mc ); - mc->execute(); - } - } else { - if ( !toolFixed ) - mainwindow->resetTool(); - else - setCursorToAll( CrossCursor, w ); - - InsertCommand *cmd = new InsertCommand( i18n( "Insert %1" ).arg( w->name() ), this, w, r ); - commandHistory()->addCommand( cmd ); - cmd->execute(); - } - - TemplateWizardInterface *iface = mainWindow()->templateWizardInterface( w->className() ); - if ( iface ) { - iface->setup( w->className(), w, iFace(), mainWindow()->designerInterface() ); - iface->release(); - } -} - -void FormWindow::insertWidget( TQWidget *w, bool checkName ) -{ - if ( !w ) - return; - if ( checkName ) { - TQString s = w->name(); - unify( TQT_TQOBJECT(w), s, TRUE ); - w->setName( s ); - } - - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); - int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(TQT_TQOBJECT(w)) ); - if ( WidgetDatabase::isCustomWidget( id ) ) { - TQWhatsThis::add( w, i18n("A %1 (custom widget) " - "

    Click Edit Custom Widgets... in the Tools|Custom " - "menu to add and change custom widgets. You can add " - "properties as well as signals and slots to integrate custom widgets into " - "TQt Designer, and provide a pixmap which will be used to represent " - "the widget on the form.

    ") - .arg(WidgetDatabase::toolTip( id )) ); - TQToolTip::add( w, i18n("A %1 (custom widget)").arg(WidgetDatabase::toolTip( id )) ); - } else { - TQString tt = WidgetDatabase::toolTip( id ); - TQString wt = WidgetDatabase::whatsThis( id ); - if ( !wt.isEmpty() && !tt.isEmpty() ) - TQWhatsThis::add( w, TQString("A %1

    %2

    ").arg( tt ).arg( wt ) ); - } - - restoreCursors( w, this ); - widgets()->insert( w, w ); - w->show(); -} - -void FormWindow::removeWidget( TQWidget *w ) -{ - MetaDataBase::removeEntry( TQT_TQOBJECT(w) ); - widgets()->take( w ); -} - -void FormWindow::handleContextMenu( TQContextMenuEvent *e, TQWidget *w ) -{ - CHECK_MAINWINDOW; - switch ( currTool ) { - case POINTER_TOOL: { - if ( !isMainContainer( TQT_TQOBJECT(w) ) && qstrcmp( w->name(), "central widget" ) != 0 ) { // press on a child widget - raiseChildSelections( w ); // raise selections and select widget - selectWidget( TQT_TQOBJECT(w) ); - // if widget is laid out, find the first non-laid out super-widget - TQWidget *realWidget = w; // but store the original one - while ( w->parentWidget() && - ( WidgetFactory::layoutType( w->parentWidget()) != WidgetFactory::NoLayout || - !insertedWidgets.find(w) ) ) - w = w->parentWidget(); - if ( ::tqqt_cast(mainContainer()) && ((TQMainWindow*)mainContainer())->centralWidget() == realWidget ) { - e->accept(); - mainwindow->popupFormWindowMenu( e->globalPos(), this ); - } else { - e->accept(); - mainwindow->popupWidgetMenu( e->globalPos(), this, realWidget); - } - } else { - e->accept(); - clearSelection(); - mainwindow->popupFormWindowMenu( e->globalPos(), this ); - } - break; } - default: - break; - } -} - -void FormWindow::handleMousePress( TQMouseEvent *e, TQWidget *w ) -{ - CHECK_MAINWINDOW; - checkedSelectionsForMove = FALSE; - checkSelectionsTimer->stop(); - if ( !sizePreviewLabel ) { - sizePreviewLabel = new TQLabel( this ); - sizePreviewLabel->hide(); - sizePreviewLabel->setBackgroundColor( TQColor( 255, 255, 128 ) ); - sizePreviewLabel->setFrameStyle( TQFrame::Plain | TQFrame::Box ); - } - - switch ( currTool ) { - case POINTER_TOOL: - if ( !isMainContainer( TQT_TQOBJECT(w) ) && qstrcmp( w->name(), "central widget" ) != 0 ) { // press on a child widget - // if the clicked widget is not in a layout, raise it - if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) - w->raise(); - if ( ( e->state() & ControlButton ) ) { // with control pressed, always start rubber band selection - drawRubber = TRUE; - currRect = TQRect( 0, 0, -1, -1 ); - startRectDraw( mapFromGlobal( e->globalPos() ), e->globalPos(), this, Rubber ); - break; - } - - bool sel = isWidgetSelected( TQT_TQOBJECT(w) ); - if ( !( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) ) { // control not pressed... - if ( !sel ) { // ...and widget no selectted: unselect all - clearSelection( FALSE ); - } else { // ...widget selected - // only if widget has a layout (it is a layout meta widget or a laid out container!), unselect its childs - if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout ) { - TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); - setPropertyShowingBlocked( TRUE ); - for ( TQObject *o = l->first(); o; o = l->next() ) { - if ( !o->isWidgetType() ) - continue; - if ( insertedWidgets.find( (TQWidget*)o ) ) - selectWidget( TQT_TQOBJECT(o), FALSE ); - } - setPropertyShowingBlocked( FALSE ); - delete l; - } - } - tqApp->processEvents(); - } - if ( ( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) && - sel && e->button() == Qt::LeftButton ) { // control pressed and selected, unselect widget - selectWidget( TQT_TQOBJECT(w), FALSE ); - break; - } - - raiseChildSelections( w ); // raise selections and select widget - selectWidget( TQT_TQOBJECT(w) ); - - // if widget is laid out, find the first non-laid out super-widget - while ( w->parentWidget() && - ( WidgetFactory::layoutType( w->parentWidget()) != WidgetFactory::NoLayout || !insertedWidgets.find(w) ) ) - w = w->parentWidget(); - - if ( e->button() == Qt::LeftButton ) { // left button: store original geometry and more as the widget might start moving - widgetPressed = TRUE; - widgetGeom = TQRect( w->pos(), w->size() ); - oldPressPos = w->mapFromGlobal( e->globalPos() ); - origPressPos = oldPressPos; - checkedSelectionsForMove = FALSE; - moving.clear(); - if ( w->parentWidget() && !isMainContainer( TQT_TQOBJECT(w->parentWidget()) ) && !isCentralWidget( TQT_TQOBJECT(w->parentWidget()) ) ) { - targetContainer = w->parentWidget(); - hadOwnPalette = w->parentWidget()->ownPalette(); - restorePalette = w->parentWidget()->palette(); - } - } - } else { // press was on the formwindow - if ( e->button() == Qt::LeftButton ) { // left button: start rubber selection and show formwindow properties - drawRubber = TRUE; - if ( !( ( e->state() & ControlButton ) || ( e->state() & ShiftButton ) ) ) { - clearSelection( FALSE ); - TQObject *opw = propertyWidget; - propertyWidget = TQT_TQOBJECT(mainContainer()); - if ( opw->isWidgetType() ) - repaintSelection( (TQWidget*)opw ); - } - currRect = TQRect( 0, 0, -1, -1 ); - startRectDraw( mapFromGlobal( e->globalPos() ), e->globalPos(), this, Rubber ); - } - } - break; - case CONNECT_TOOL: - case BUDDY_TOOL: - if ( e->button() != Qt::LeftButton ) - break; - validForBuddy = FALSE; - if ( currTool == BUDDY_TOOL ) { - if ( !::tqqt_cast(w) ) - break; - clearSelection( FALSE ); - validForBuddy = TRUE; - mainWindow()->statusMessage( i18n( "Set buddy for '%1' to..." ).arg( w->name() ) ); - } else { - mainWindow()->statusMessage( i18n( "Connect '%1' with..." ).arg( w->name() ) ); - } - saveBackground(); - startPos = mapFromGlobal( e->globalPos() ); - currentPos = startPos; - startWidget = designerWidget( TQT_TQOBJECT(w) ); - endWidget = startWidget; - beginUnclippedPainter( FALSE ); - drawConnectionLine(); - break; - case ORDER_TOOL: - if ( !isMainContainer( TQT_TQOBJECT(w) ) ) { // press on a child widget - orderedWidgets.removeRef( w ); - orderedWidgets.append( w ); - for ( TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev() ) { - int i = stackedWidgets.findRef( wid ); - if ( i != -1 ) { - stackedWidgets.removeRef( wid ); - stackedWidgets.insert( 0, wid ); - } - } - TQWidgetList oldl = MetaDataBase::tabOrder( this ); - TabOrderCommand *cmd = new TabOrderCommand( i18n( "Change Tab Order" ), this, oldl, stackedWidgets ); - cmd->execute(); - commandHistory()->addCommand( cmd, TRUE ); - updateOrderIndicators(); - } - break; - default: // any insert widget tool - if ( e->button() == Qt::LeftButton ) { - insertParent = WidgetFactory::containerOfWidget( mainContainer() ); // default parent for new widget is the formwindow - if ( !isMainContainer( TQT_TQOBJECT(w) ) ) { // press was not on formwindow, check if we can find another parent - TQWidget *wid = w; - for (;;) { - int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(wid) ) ); - if ( ( WidgetDatabase::isContainer( id ) || wid == mainContainer() ) && - !::tqqt_cast(wid) && !::tqqt_cast(wid) ) { - insertParent = WidgetFactory::containerOfWidget( wid ); // found another parent, store it - break; - } else { - wid = wid->parentWidget(); - if ( !wid ) - break; - } - } - } - startRectDraw( w->mapFromGlobal( e->globalPos() ), e->globalPos(), w, Insert ); - } - break; - } -} - -void FormWindow::handleMouseDblClick( TQMouseEvent *, TQWidget *w ) -{ - CHECK_MAINWINDOW; - switch ( currTool ) { - case ORDER_TOOL: - if ( !isMainContainer( TQT_TQOBJECT(w) ) ) { // press on a child widget - orderedWidgets.clear(); - orderedWidgets.append( w ); - for ( TQWidget *wid = orderedWidgets.last(); wid; wid = orderedWidgets.prev() ) { - int i = stackedWidgets.findRef( wid ); - if ( i != -1 ) { - stackedWidgets.removeRef( wid ); - stackedWidgets.insert( 0, wid ); - } - } - TQWidgetList oldl = MetaDataBase::tabOrder( this ); - TabOrderCommand *cmd = new TabOrderCommand( i18n( "Change Tab Order" ), this, oldl, stackedWidgets ); - cmd->execute(); - commandHistory()->addCommand( cmd, TRUE ); - updateOrderIndicators(); - } - default: - if ( !WidgetFactory::isPassiveInteractor( TQT_TQOBJECT(w) ) && - ( isMainContainer( TQT_TQOBJECT(w) ) || TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(this) ) ) - mainWindow()->editSource(); - break; - } -} - -void FormWindow::handleMouseMove( TQMouseEvent *e, TQWidget *w ) -{ - CHECK_MAINWINDOW; - if ( ( e->state() & Qt::LeftButton ) != Qt::LeftButton ) - return; - - TQWidget *newendWidget = endWidget, *oldendWidget = endWidget, *wid; - bool drawRecRect; - switch ( currTool ) { - case POINTER_TOOL: - if ( widgetPressed && allowMove( w ) ) { // we are prepated for a move - - // if widget is laid out, find the first non-laid out super-widget - while ( w->parentWidget() && - ( WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout || !insertedWidgets.find(w ) ) ) - w = w->parentWidget(); - - // calc correct position - TQPoint pos = w->mapFromGlobal( e->globalPos() ); - -#if 0 - TQPoint mpos = w->mapToParent( pos ); - // check if we are not outside the visible area, else correct coords - if ( mpos.x() < 0 ) - pos.setX( w->mapFromParent( TQPoint( 0, mpos.y() ) ).x() ); - if ( mpos.y() < 0 ) - pos.setY( w->mapFromParent( TQPoint( mpos.x(), 0 ) ).y() ); - if ( mpos.x() > w->parentWidget()->width() ) - pos.setX( w->mapFromParent( TQPoint( w->parentWidget()->width(), mpos.y() ) ).x() ); - if ( mpos.y() > w->parentWidget()->height() ) - pos.setY( w->mapFromParent( TQPoint( mpos.x(), w->parentWidget()->height() ) ).y() ); -#endif - - // calc move distance and store it - TQPoint d = oldPressPos - pos; - if ( TQABS( d.x() ) < grid().x() ) - d.setX( 0 ); - if ( TQABS( d.y() ) < grid().y() ) - d.setY( 0 ); - if ( d.x() == 0 ) - pos.setX( oldPressPos.x() ); - if ( d.y() == 0 ) - pos.setY( oldPressPos.y() ); - oldPressPos = pos; - - // snap to grid - int x = widgetGeom.x() - d.x(); - widgetGeom.setX( x ); - x = ( x / grid().x() ) * grid().x(); - int y = widgetGeom.y() - d.y(); - widgetGeom.setY( y ); - y = ( y / grid().y() ) * grid().y(); - TQPoint p = w->pos(); - - if ( x - p.x() != 0 || y - p.y() != 0 ) { // if we actually have to move - if ( !checkedSelectionsForMove ) { // if not checked yet, check if the correct widget are selected... - if ( !isWidgetSelected( TQT_TQOBJECT(w) ) ) { // and unselect others. Only siblings can be moved at the same time - setPropertyShowingBlocked( TRUE ); - selectWidget( TQT_TQOBJECT(w) ); - setPropertyShowingBlocked( FALSE ); - } - checkSelectionsForMove( w ); - } - - // check whether we would have to reparent the selection and highlight the possible new parent container - TQMapConstIterator it = moving.begin(); - TQWidget* wa = containerAt( e->globalPos(), it.key() ); - if ( wa && !isMainContainer( TQT_TQOBJECT(wa) ) && !isCentralWidget( TQT_TQOBJECT(wa) ) ) { - wa = WidgetFactory::containerOfWidget( wa ); - // ok, looks like we moved onto a container - - if ( wa != targetContainer ) { - if ( targetContainer ) { - if ( hadOwnPalette ) - targetContainer->setPalette( restorePalette ); - else - targetContainer->unsetPalette(); - } - targetContainer = wa; - hadOwnPalette = wa->ownPalette(); - restorePalette = wa->palette(); - wa->setPaletteBackgroundColor( wa->colorGroup().midlight() ); - } - } - else if ( targetContainer ) { - if( hadOwnPalette ) - targetContainer->setPalette( restorePalette ); - else - targetContainer->unsetPalette(); - targetContainer = 0; - } - - // finally move the selected widgets and show/update preview label - moveSelectedWidgets( x - p.x(), y - p.y() ); - sizePreviewLabel->setText( i18n( "%1/%2" ).arg( w->pos().x() ).arg( w->pos().y() ) ); - sizePreviewLabel->adjustSize(); - TQRect lg( mapFromGlobal( e->globalPos() ) + TQPoint( 16, 16 ), sizePreviewLabel->size() ); - checkPreviewGeometry( lg ); - sizePreviewLabel->setGeometry( lg ); - sizePreviewLabel->raise(); - sizePreviewLabel->show(); -#if defined(TQ_WS_WIN32) - windowsRepaintWorkaroundTimer->start( 100, TRUE ); -#endif - } else { // if we don't need to move, do some indication - TQRect lg( mapFromGlobal( e->globalPos() ) + TQPoint( 16, 16 ), sizePreviewLabel->size() ); - checkPreviewGeometry( lg ); - sizePreviewLabel->move( lg.x(), lg.y() ); - } - - oldPressPos += ( p - w->pos() ); - } else if ( drawRubber ) { // draw rubber if we are in rubber-selection mode - continueRectDraw( mapFromGlobal( e->globalPos() ), e->globalPos(), this, Rubber ); - } - break; - case CONNECT_TOOL: - restoreConnectionLine(); - wid = tqApp->widgetAt( e->globalPos(), TRUE ); - if ( wid ) - wid = designerWidget( TQT_TQOBJECT(wid) ); - if ( wid && ( isMainContainer( TQT_TQOBJECT(wid) ) || insertedWidgets.find( wid ) ) && wid->isVisibleTo( this ) ) - newendWidget = wid; - if ( ::tqqt_cast(newendWidget) || ::tqqt_cast(newendWidget) ) - newendWidget = (TQWidget*)endWidget; - drawRecRect = newendWidget != endWidget; - if ( newendWidget && - ( isMainContainer( TQT_TQOBJECT(newendWidget) ) || insertedWidgets.find( newendWidget ) ) && !isCentralWidget( TQT_TQOBJECT(newendWidget) ) ) - endWidget = newendWidget; - mainWindow()->statusMessage( i18n( "Connect '%1' to '%2'" ).arg( startWidget->name() ). - arg( endWidget->name() ) ); - currentPos = mapFromGlobal( e->globalPos() ); - tqApp->processEvents(); - if ( drawRecRect ) - restoreRect( TQRect( mapToForm( ( (TQWidget*)oldendWidget )->parentWidget(), ( (TQWidget*)oldendWidget )->pos() ), - ( (TQWidget*)oldendWidget )->size() ) ); - drawConnectionLine(); - break; - case BUDDY_TOOL: - if ( !validForBuddy ) - break; - restoreConnectionLine(); - wid = tqApp->widgetAt( e->globalPos(), TRUE ); - if ( wid ) - wid = designerWidget( TQT_TQOBJECT(wid) ); - if ( wid && canBeBuddy( wid ) && wid->isVisibleTo( this ) ) - newendWidget = wid; - else - newendWidget = 0; - if ( ::tqqt_cast(newendWidget) || ::tqqt_cast(newendWidget) ) - newendWidget = (TQWidget*)endWidget; - drawRecRect = newendWidget != endWidget; - if ( !newendWidget ) - endWidget = newendWidget; - else if ( insertedWidgets.find( newendWidget ) && !isCentralWidget( TQT_TQOBJECT(newendWidget) ) ) - endWidget = newendWidget; - if ( endWidget ) - mainWindow()->statusMessage( i18n( "Set buddy '%1' to '%2'" ).arg( startWidget->name() ). - arg( endWidget->name() ) ); - else - mainWindow()->statusMessage( i18n( "Set buddy '%1' to ..." ).arg( startWidget->name() ) ); - currentPos = mapFromGlobal( e->globalPos() ); - tqApp->processEvents(); - if ( drawRecRect && oldendWidget ) - restoreRect( TQRect( mapToForm( ( (TQWidget*)oldendWidget )->parentWidget(), ( (TQWidget*)oldendWidget )->pos() ), - ( (TQWidget*)oldendWidget )->size() ) ); - drawConnectionLine(); - break; - case ORDER_TOOL: - break; - default: // we are in an insert-widget tool - if ( insertParent ) // draw insert rect - continueRectDraw( w->mapFromGlobal( e->globalPos() ), e->globalPos(), w, Insert ); - break; - } -} - -void FormWindow::handleMouseRelease( TQMouseEvent *e, TQWidget *w ) -{ - CHECK_MAINWINDOW; - if ( e->button() != Qt::LeftButton ) - return; - - switch ( currTool ) { - case POINTER_TOOL: - if ( widgetPressed && allowMove( w ) ) { // we moved the widget - sizePreviewLabel->hide(); - - if ( moving.isEmpty() || w->pos() == *moving.find(w) ) - break; - - // restore targetContainer - if ( targetContainer ) { - if( hadOwnPalette ) - targetContainer->setPalette( restorePalette ); - else - targetContainer->unsetPalette(); - } - - // tell property editor to update - if ( propertyWidget && propertyWidget->isWidgetType() && !isMainContainer( propertyWidget ) ) - emitUpdateProperties( propertyWidget ); - - TQMapConstIterator it = moving.begin(); - TQWidget *oldParent = it.key()->parentWidget(); - TQWidget *newParent = oldParent; - // check whether we have to reparent the selection - TQWidget* wa = containerAt( e->globalPos(), it.key() ); - if ( wa ) { - wa = WidgetFactory::containerOfWidget( wa ); - // ok, looks like we moved onto a container - - // check whether we really have different parents. - if ( wa == it.key()->parentWidget() ) - goto make_move_command; - - // break layout if necessary - if ( WidgetFactory::layoutType( wa ) != WidgetFactory::NoLayout ) { - if ( TQMessageBox::information( mainWindow(), i18n( "Inserting Widget" ), - i18n( "You tried to insert a widget into the " - "layout Container Widget '%1'.\n" - "This is not possible. " - "In order to insert the widget, the layout of '%1'\n" - "must first be broken.\n" - "Break the layout or cancel the operation?" ). - arg( wa->name() ). - arg( wa->name() ), i18n( "&Break Layout" ), i18n( "&Cancel" ) ) ) - goto make_move_command; // cancel - breakLayout( wa ); - } - - // doesn't need to be a command, the MoveCommand does reparenting too - bool emitSelChanged = FALSE; - for ( TQMap::Iterator it = moving.begin(); it != moving.end(); ++it ) { - TQWidget *i = it.key(); - if ( !emitSelChanged && ::tqqt_cast(i) ) { - if ( ::tqqt_cast(i->parentWidget()) || ::tqqt_cast(wa) ) - emitSelChanged = TRUE; - if ( !::tqqt_cast(wa) ) { - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(i), "buttonGroupId", FALSE ); - if ( ::tqqt_cast(i->parentWidget()) ) - ( (TQButtonGroup*)i->parentWidget() )->remove( (TQButton*)i ); - } - } - TQPoint pos = wa->mapFromGlobal( i->mapToGlobal( TQPoint(0,0) ) ); - i->reparent( wa, pos, TRUE ); - raiseSelection( i ); - raiseChildSelections( i ); - widgetChanged( TQT_TQOBJECT(i) ); - mainWindow()->objectHierarchy()->widgetRemoved( i ); - mainWindow()->objectHierarchy()->widgetInserted( i ); - } - if ( emitSelChanged ) { - emit showProperties( TQT_TQOBJECT(wa) ); - emit showProperties( propertyWidget ); - } - newParent = wa; - } - - make_move_command: - TQWidgetList widgets; // collect the widgets and its old and new positions which have been moved - TQValueList oldPos, newPos; - for ( it = moving.begin(); it != moving.end(); ++it ) { - widgets.append( it.key() ); - oldPos.append( *it ); - newPos.append( it.key()->pos() ); - } - // add move command, don't execute it, this is just a summary of the operations we did during the move-event handling - commandHistory()->addCommand( new MoveCommand( i18n( "Move" ), - this, widgets, - oldPos, newPos, oldParent, newParent ) ); - } else if ( drawRubber ) { // we were drawing a rubber selection - endRectDraw(); // get rid of the rectangle - blockSignals( TRUE ); - selectWidgets(); // select widgets which intersect the rect - blockSignals( FALSE ); - emitSelectionChanged(); // inform about selection changes - if ( propertyWidget ) - emitShowProperties( propertyWidget ); - } - break; - case CONNECT_TOOL: - case BUDDY_TOOL: - restoreConnectionLine(); - if ( startWidget ) - restoreRect( TQRect( mapToForm( ( (TQWidget*)startWidget )->parentWidget(), - ( (TQWidget*)startWidget )->pos() ), - ((TQWidget*)startWidget )->size() ) ); - if ( endWidget ) - restoreRect( TQRect( mapToForm( ( (TQWidget*)endWidget )->parentWidget(), - ( (TQWidget*)endWidget )->pos() ), - ( (TQWidget*)endWidget )->size() ) ); - endUnclippedPainter(); - tqApp->processEvents(); - - if ( startWidget && endWidget ) { - if ( currTool == CONNECT_TOOL ) - editConnections(); - else if ( currTool == BUDDY_TOOL && validForBuddy && startWidget != endWidget ) { - TQString oldBuddy = startWidget->property( "buddy" ).toString(); - if ( oldBuddy.isNull() ) - oldBuddy = ""; - SetPropertyCommand *cmd = new SetPropertyCommand( i18n( "Set Buddy for %1" ).arg( startWidget->name() ), - this, TQT_TQOBJECT(startWidget), mainWindow()->propertyeditor(), - "buddy", startWidget->property( "buddy" ), - endWidget->name(), endWidget->name(), - oldBuddy ); - commandHistory()->addCommand( cmd, TRUE ); - cmd->execute(); - emitUpdateProperties( TQT_TQOBJECT(startWidget) ); - } - } - if ( !toolFixed ) - mainwindow->resetTool(); - startWidget = endWidget = 0; - mainWindow()->statusBar()->clear(); - break; - case ORDER_TOOL: - break; - default: // any insert widget tool is active - if ( insertParent ) { // we should insert the new widget now - endRectDraw(); - if ( WidgetFactory::layoutType( insertParent ) != WidgetFactory::NoLayout ) { - if ( TQMessageBox::information( mainWindow(), i18n( "Inserting Widget" ), - i18n( "You tried to insert a widget into the " - "layout Container Widget '%1'.\n" - "This is not possible. " - "In order to insert the widget, the layout of '%1'\n" - "must first be broken.\n" - "Break the layout or cancel the operation?" ). - arg( insertParent->name() ). - arg( insertParent->name() ), i18n( "&Break Layout" ), i18n( "&Cancel" ) ) == 0 ) { - breakLayout( insertParent ); - } else { - if ( !toolFixed ) - mainWindow()->resetTool(); - break; - } - } - insertWidget(); // so do it - } - break; - } - widgetPressed = FALSE; - drawRubber = FALSE; - insertParent = 0; - delete buffer; - buffer = 0; -} - -void FormWindow::handleKeyPress( TQKeyEvent *e, TQWidget *w ) -{ - CHECK_MAINWINDOW; - e->ignore(); - checkSelectionsTimer->stop(); - if ( !checkedSelectionsForMove && - ( e->key() == Key_Left || - e->key() == Key_Right || - e->key() == Key_Up || - e->key() == Key_Down ) && - propertyWidget->isWidgetType() ) - checkSelectionsForMove( (TQWidget*)propertyWidget ); - checkSelectionsTimer->start( 1000, TRUE ); - if ( e->key() == Key_Left || e->key() == Key_Right || - e->key() == Key_Up || e->key() == Key_Down ) { - TQWidgetList widgets; - TQValueList oldPos, newPos; - for ( WidgetSelection *s = selections.first(); s; s = selections.next() ) { - if ( s->isUsed() ) { - int dx = 0, dy = 0; - bool control = e->state() & ControlButton; - - switch ( e->key() ) { - case Key_Left: { - e->accept(); - if ( control ) - dx = -1; - else - dx = -grid().x(); - } break; - case Key_Right: { - e->accept(); - if ( control ) - dx = 1; - else - dx = grid().x(); - } break; - case Key_Up: { - e->accept(); - if ( control ) - dy = -1; - else - dy = -grid().y(); - } break; - case Key_Down: { - e->accept(); - if ( control ) - dy = 1; - else - dy = grid().y(); - } break; - default: - break; - } - - widgets.append( s->widget() ); - oldPos.append( s->widget()->pos() ); - newPos.append( s->widget()->pos() + TQPoint( dx, dy ) ); - } - } - if ( !widgets.isEmpty() ) { - MoveCommand *cmd = new MoveCommand( i18n( "Move" ), this, - widgets, oldPos, newPos, 0, 0 ); - commandHistory()->addCommand( cmd, TRUE ); - cmd->execute(); - } - } - if ( !e->isAccepted() ) { - TQObjectList *l = queryList( TQWIDGET_OBJECT_NAME_STRING ); - if ( !l ) - return; - if ( l->find( TQT_TQOBJECT(w) ) != -1 ) - e->accept(); - delete l; - } - -} - -void FormWindow::handleKeyRelease( TQKeyEvent *e, TQWidget * ) -{ - e->ignore(); -} - -void FormWindow::selectWidget( TQObject *o, bool select ) -{ - CHECK_MAINWINDOW; - if ( !o->isWidgetType() ) { - // ########### do TQObject stuff - return; - } - - TQWidget *w = (TQWidget*)o; - - if ( isMainContainer( TQT_TQOBJECT(w) ) ) { - TQObject *opw = propertyWidget; - propertyWidget = TQT_TQOBJECT(mainContainer()); - if ( opw->isWidgetType() ) - repaintSelection( (TQWidget*)opw ); - emitShowProperties( propertyWidget ); - return; - } - - if ( ::tqqt_cast(mainContainer()) && w == ( (TQMainWindow*)mainContainer() )->centralWidget() ) { - TQObject *opw = propertyWidget; - propertyWidget = TQT_TQOBJECT(mainContainer()); - if ( opw->isWidgetType() ) - repaintSelection( (TQWidget*)opw ); - emitShowProperties( propertyWidget ); - return; - } - - if ( ::tqqt_cast(o) ) - return; - - if ( select ) { - TQObject *opw = propertyWidget; - propertyWidget = TQT_TQOBJECT(w); - if ( opw->isWidgetType() ) - repaintSelection( (TQWidget*)opw ); - if ( !isPropertyShowingBlocked() ) - emitShowProperties( propertyWidget ); - WidgetSelection *s = usedSelections.find( w ); - if ( s ) { - s->show(); - return; - } - - for ( WidgetSelection *s2 = selections.first(); s2; s2 = selections.next() ) { - if ( !s2->isUsed() ) { - s = s2; - } - } - - if ( !s ) { - s = new WidgetSelection( this, &usedSelections ); - selections.append( s ); - } - - s->setWidget( w ); - emitSelectionChanged(); - } else { - WidgetSelection *s = usedSelections.find( w ); - if ( s ) - s->setWidget( 0 ); - TQObject *opw = propertyWidget; - if ( !usedSelections.isEmpty() ) - propertyWidget = TQT_TQOBJECT(TQPtrDictIterator( usedSelections ).current()->widget()); - else - propertyWidget = TQT_TQOBJECT(mainContainer()); - if ( opw->isWidgetType() ) - repaintSelection( (TQWidget*)opw ); - if ( !isPropertyShowingBlocked() ) - emitShowProperties( propertyWidget ); - emitSelectionChanged(); - } -} - -TQPoint FormWindow::grid() const -{ - if ( !mainWindow() || !mainWindow()->snapGrid() ) - return TQPoint( 1, 1 ); - return mainWindow()->grid(); -} - -void FormWindow::updateSelection( TQWidget *w ) -{ - WidgetSelection *s = usedSelections.find( w ); - if ( !w->isVisibleTo( this ) ) - selectWidget( TQT_TQOBJECT(w), FALSE ); - else if ( s ) - s->updateGeometry(); -} - -void FormWindow::raiseSelection( TQWidget *w ) -{ - WidgetSelection *s = usedSelections.find( w ); - if ( s ) - s->show(); -} - -void FormWindow::repaintSelection( TQWidget *w ) -{ - WidgetSelection *s = usedSelections.find( w ); - if ( s ) - s->update(); -} - -void FormWindow::clearSelection( bool changePropertyDisplay ) -{ - TQPtrDictIterator it( usedSelections ); - for ( ; it.current(); ++it ) - it.current()->setWidget( 0, FALSE ); - - usedSelections.clear(); - if ( changePropertyDisplay ) { - TQObject *opw = propertyWidget; - propertyWidget = TQT_TQOBJECT(mainContainer()); - if ( opw->isWidgetType() ) - repaintSelection( (TQWidget*)opw ); - emitShowProperties( propertyWidget ); - } - emitSelectionChanged(); -} - -void FormWindow::startRectDraw( const TQPoint &p, const TQPoint &global, TQWidget *, RectType t ) -{ - TQPoint pos( p ); - pos = mapFromGlobal( global ); - oldRectValid = FALSE; - beginUnclippedPainter( TRUE ); - if ( t == Rubber ) - unclippedPainter->setPen( TQPen( color0, 1 ) ); - if ( t == Insert ) - rectAnchor = gridPoint( pos ); - else if ( t == Rubber ) - rectAnchor = pos; - currRect = TQRect( rectAnchor, TQPoint( 0, 0 ) ); - if ( t == Insert ) - drawSizePreview( pos, i18n("Use Size Hint") ); -} - -void FormWindow::continueRectDraw( const TQPoint &p, const TQPoint &global, TQWidget *, RectType t ) -{ - TQPoint pos =p; - pos = mapFromGlobal( global ); - TQPoint p2; - if ( t == Insert ) - p2 = gridPoint( pos ); - else if ( t == Rubber ) - p2 = pos; - TQRect r( rectAnchor, p2 ); - r = r.normalize(); - - if ( currRect == r ) { - TQString t = i18n( "%1/%2" ); - t = t.arg( r.width() - 1 ).arg( r.height() - 1 ); - drawSizePreview( pos, t ); - return; - } - - if ( oldRectValid ) - unclippedPainter->drawRect( currRect ); - if ( r.width() > 1 || r.height() > 1 ) { - oldRectValid = TRUE; - currRect = r; - if ( t == Insert ) { - TQString t = i18n( "%1/%2" ); - t = t.arg( r.width() - 1 ).arg( r.height() - 1 ); - drawSizePreview( pos, t ); - } - unclippedPainter->setClipRegion( TQRegion( rect() ).subtract( TQRect( sizePreviewPos, sizePreviewPixmap.size() ) ) ); - unclippedPainter->drawRect( currRect ); - unclippedPainter->setClipping( FALSE ); - } else { - oldRectValid = FALSE; - if ( t == Insert ) - drawSizePreview( pos, i18n("Use Size Hint") ); - } -} - -void FormWindow::endRectDraw() -{ - if ( !unclippedPainter ) - return; - - if ( oldRectValid ) - unclippedPainter->drawRect( currRect ); - drawSizePreview( TQPoint(-1,-1), TQString() ); - endUnclippedPainter(); -} - -void FormWindow::selectWidgets() -{ - TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING ); - if ( l ) { - for ( TQObject *o = l->first(); o; o = l->next() ) { - if ( ( (TQWidget*)o )->isVisibleTo( this ) && - insertedWidgets[ (void*)o ] ) { - TQPoint p = ( (TQWidget*)o )->mapToGlobal( TQPoint(0,0) ); - p = mapFromGlobal( p ); - TQRect r( p, ( (TQWidget*)o )->size() ); - if ( r.intersects( currRect ) && !r.contains( currRect ) ) - selectWidget( TQT_TQOBJECT(o) ); - } - } - delete l; - } - emitSelectionChanged(); -} - -bool FormWindow::isWidgetSelected( TQObject *w ) -{ - if ( w->isWidgetType() ) - return usedSelections.find( (TQWidget*)w ) != 0; - return FALSE; // #### do stuff for TQObjects -} - -void FormWindow::moveSelectedWidgets( int dx, int dy ) -{ - TQPtrDictIterator it( usedSelections ); - for ( ; it.current(); ++it ) { - WidgetSelection *s = it.current(); - TQWidget *w = s->widget(); - if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) - continue; - w->move( w->x() + dx, w->y() + dy ); - s->updateGeometry(); - updateChildSelections( w ); - } -} - -CommandHistory *FormWindow::commandHistory() -{ - return &commands; -} - -void FormWindow::undo() -{ - commandHistory()->undo(); -} - -void FormWindow::redo() -{ - commandHistory()->redo(); -} - -void FormWindow::raiseChildSelections( TQWidget *w ) -{ - TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); - if ( !l || !l->first() ) { - delete l; - return; - } - - TQPtrDictIterator it( usedSelections ); - for ( ; it.current(); ++it ) { - if ( l->findRef( TQT_TQOBJECT(it.current()->widget()) ) != -1 ) - it.current()->show(); - } - delete l; -} - -void FormWindow::updateChildSelections( TQWidget *w ) -{ - TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); - if ( l ) { - for ( TQObject *o = l->first(); o; o = l->next() ) { - if ( o->isWidgetType() && - insertedWidgets.find( (TQWidget*)o ) ) - updateSelection( (TQWidget*)o ); - } - delete l; - } -} - -void FormWindow::checkSelectionsForMove( TQWidget *w ) -{ - checkedSelectionsForMove = TRUE; - - TQObjectList *l = w->parentWidget()->queryList( TQWIDGET_OBJECT_NAME_STRING, 0, FALSE, FALSE ); - moving.clear(); - if ( l ) { - TQPtrDictIterator it( usedSelections ); - WidgetSelection *sel; - while ( ( sel = it.current() ) != 0 ) { - if ( it.current()->widget() == mainContainer() ) - continue; - ++it; - if ( l->find( TQT_TQOBJECT(sel->widget()) ) == -1 ) { - if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) - sel->setWidget( 0 ); - } else { - if ( WidgetFactory::layoutType( sel->widget()->parentWidget() ) == WidgetFactory::NoLayout ) { - moving.insert( sel->widget(), sel->widget()->pos() ); - sel->widget()->raise(); - raiseChildSelections( sel->widget() ); - raiseSelection( sel->widget() ); - } - } - } - delete l; - } -} - -void FormWindow::deleteWidgets() -{ - CHECK_MAINWINDOW; - TQWidgetList widgets; - TQPtrDictIterator it( usedSelections ); - for ( ; it.current(); ++it ) { - TQWidget *tb = 0; - if ( !( tb = mainWindow()->isAToolBarChild( TQT_TQOBJECT(it.current()->widget()) ) ) ) - widgets.append( it.current()->widget() ); - else - ( (QDesignerToolBar*)tb )->removeWidget( it.current()->widget() ); - } - - if ( widgets.isEmpty() ) - return; - - DeleteCommand *cmd = new DeleteCommand( i18n( "Delete" ), this, widgets ); - commandHistory()->addCommand( cmd ); - cmd->execute(); -} - -void FormWindow::editAdjustSize() -{ - TQPtrList commands; - TQWidgetList widgets = selectedWidgets(); - if ( widgets.isEmpty() ) { - TQRect oldr = geometry(); - mainContainer()->adjustSize(); - resize( mainContainer()->size() ); - // check whether our own size constraint hit us - if ( size() != mainContainer()->size() ) - mainContainer()->resize( size() ); - TQRect nr = geometry(); - if ( oldr != nr ) { - ResizeCommand *cmd = new ResizeCommand( i18n( "Adjust Size" ), this, this, oldr, nr ); - commandHistory()->addCommand( cmd ); - } - return; - } - for ( TQWidget* w = widgets.first(); w; w = widgets.next() ) { - if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) - continue; - TQRect oldr = w->geometry(); - w->adjustSize(); - TQRect nr = w->geometry(); - if ( oldr != nr ) - commands.append( new ResizeCommand( i18n("Adjust Size"), this, w, oldr, nr ) ); - } - - if ( commands.isEmpty() ) - return; - for ( WidgetSelection *s = selections.first(); s; s = selections.next() ) - s->updateGeometry(); - - MacroCommand *cmd = new MacroCommand( i18n( "Adjust Size" ), this, commands ); - commandHistory()->addCommand( cmd ); -} - - -TQWidgetList FormWindow::selectedWidgets() const -{ - TQWidgetList widgets; - TQPtrDictIterator it( usedSelections ); - for ( ; it.current(); ++it ) - widgets.append( it.current()->widget() ); - return widgets; -} - -void FormWindow::widgetChanged( TQObject *w ) -{ - if ( w->isWidgetType() ) - updateSelection( (TQWidget*)w ); - // ########## do TQObject stuff -} - -TQLabel *FormWindow::sizePreview() const -{ - if ( !sizePreviewLabel ) { - ( (FormWindow*)this )->sizePreviewLabel = new TQLabel( (FormWindow*)this ); - ( (FormWindow*)this )->sizePreviewLabel->hide(); - ( (FormWindow*)this )->sizePreviewLabel->setBackgroundColor( TQColor( 255, 255, 128 ) ); - ( (FormWindow*)this )->sizePreviewLabel->setFrameStyle( TQFrame::Plain | TQFrame::Box ); - } - return sizePreviewLabel; -} - -void FormWindow::invalidCheckedSelections() -{ - checkedSelectionsForMove = FALSE; -} - -void FormWindow::checkPreviewGeometry( TQRect &r ) -{ - if ( !TQT_TQRECT_OBJECT(rect()).contains( r ) ) { - if ( r.left() < rect().left() ) - r.moveTopLeft( TQPoint( 0, r.top() ) ); - if ( r.right() > rect().right() ) - r.moveBottomRight( TQPoint( rect().right(), r.bottom() ) ); - if ( r.top() < rect().top() ) - r.moveTopLeft( TQPoint( r.left(), rect().top() ) ); - if ( r.bottom() > rect().bottom() ) - r.moveBottomRight( TQPoint( r.right(), rect().bottom() ) ); - } -} - -void FormWindow::focusInEvent( TQFocusEvent * ){ - - if (ff) - ff->checkTimeStamp(); -} - -void FormWindow::focusOutEvent( TQFocusEvent * ) -{ - if ( propertyWidget && !isMainContainer( propertyWidget ) && !isWidgetSelected( propertyWidget ) ) { - TQObject *opw = propertyWidget; - propertyWidget = TQT_TQOBJECT(mainContainer()); - if ( opw->isWidgetType() ) - repaintSelection( (TQWidget*)opw ); - } -} - -void FormWindow::resizeEvent( TQResizeEvent *e ) -{ - TQWidget::resizeEvent( e ); - if ( currTool == ORDER_TOOL ) - repositionOrderIndicators(); - if ( isVisible() ) - formFile()->setModified( TRUE, FormFile::WFormWindow ); - -#if defined(TQ_WS_WIN32) - windowsRepaintWorkaroundTimer->start( 100, TRUE ); -#endif -} - -void FormWindow::windowsRepaintWorkaroundTimerTimeout() -{ -#if defined(TQ_WS_WIN32) - TQObjectList *l = queryList( TQWIDGET_OBJECT_NAME_STRING ); - for ( TQObject *o = l->first(); o; o = l->next() ) { - flickerfree_update( (TQWidget*)o ); - } - flickerfree_update( this ); - delete l; -#endif -} - -TQPtrDict *FormWindow::widgets() -{ - return &insertedWidgets; -} - -TQWidget *FormWindow::designerWidget( TQObject *o ) const -{ - if ( !o || !o->isWidgetType() ) - return 0; - TQWidget *w = (TQWidget*)o; - while ( w && !isMainContainer( TQT_TQOBJECT(w) ) && !insertedWidgets[ (void*)w ] || isCentralWidget( TQT_TQOBJECT(w) ) ) - w = (TQWidget*)w->parent(); - return w; -} - -void FormWindow::emitShowProperties( TQObject *w ) -{ - if ( w ) { - TQObject *opw = propertyWidget; - propertyWidget = w; - if ( opw->isWidgetType() ) - repaintSelection( (TQWidget*)opw ); - } - showPropertiesTimer->stop(); -// showPropertiesTimer->start( 0, TRUE ); - showPropertiesTimerDone(); -} - -void FormWindow::emitUpdateProperties( TQObject *w ) -{ - if ( w == propertyWidget ) { - updatePropertiesTimer->stop(); - updatePropertiesTimer->start( 0, TRUE ); - } -} - -void FormWindow::emitSelectionChanged() -{ - selectionChangedTimer->stop(); - selectionChangedTimer->start( 0, TRUE ); -} - -void FormWindow::updatePropertiesTimerDone() -{ - CHECK_MAINWINDOW; - if ( propertyWidget && mainWindow()->formWindow() == this ) - emit updateProperties( propertyWidget ); -} - -void FormWindow::showPropertiesTimerDone() -{ - CHECK_MAINWINDOW; - if ( propertyWidget && mainWindow()->formWindow() == this ) - emit showProperties( propertyWidget ); -} - -void FormWindow::selectionChangedTimerDone() -{ - emit selectionChanged(); -} - -void FormWindow::currentToolChanged() -{ - CHECK_MAINWINDOW; - toolFixed = FALSE; - int t = mainwindow->currentTool(); - if ( currTool == t && t != ORDER_TOOL ) - return; - - // tool cleanup - switch ( currTool ) { - case ORDER_TOOL: - hideOrderIndicators(); - break; - case CONNECT_TOOL: - case BUDDY_TOOL: - restoreConnectionLine(); - if ( startWidget ) - restoreRect( TQRect( mapToForm( ( (TQWidget*)startWidget )->parentWidget(), - ( (TQWidget*)startWidget )->pos() ), - ( (TQWidget*)startWidget )->size() ) ); - if ( endWidget ) - restoreRect( TQRect( mapToForm( ( (TQWidget*)endWidget )->parentWidget(), - ( (TQWidget*)endWidget )->pos() ), - ( (TQWidget*)endWidget )->size() ) ); - endUnclippedPainter(); - break; - case POINTER_TOOL: - break; - default: - if ( insertParent ) - endRectDraw(); - break; - } - - startWidget = endWidget = 0; - widgetPressed = FALSE; - drawRubber = FALSE; - insertParent = 0; - delete buffer; - buffer = 0; - - currTool = t; - - if ( hasFocus() ) - clearSelection( FALSE ); - - mainWindow()->statusBar()->clear(); - - // tool setup - switch ( currTool ) { - case POINTER_TOOL: - if ( propertyWidget && !isMainContainer( propertyWidget ) && !isWidgetSelected( propertyWidget ) ) - emitShowProperties( TQT_TQOBJECT(mainContainer()) ); - restoreCursors( this, this ); - break; - case ORDER_TOOL: - if ( mainWindow()->formWindow() == this ) { - mainWindow()->statusMessage( i18n( "Click widgets to change the tab order...") ); - orderedWidgets.clear(); - showOrderIndicators(); - if ( mainWindow()->formWindow() == this ) - emitShowProperties( TQT_TQOBJECT(mainContainer()) ); - setCursorToAll( ArrowCursor, this ); - } - break; - case CONNECT_TOOL: - case BUDDY_TOOL: - if ( currTool == CONNECT_TOOL ) - mainWindow()->statusMessage( i18n( "Drag a line to create a connection...") ); - else - mainWindow()->statusMessage( i18n( "Drag a line to set a buddy...") ); - setCursorToAll( CrossCursor, this ); - if ( mainWindow()->formWindow() == this ) - emitShowProperties( TQT_TQOBJECT(mainContainer()) ); - break; - default: - mainWindow()->statusMessage( i18n( "Click on the form to insert a %1..." ).arg( WidgetDatabase::toolTip( currTool ).lower() ) ); - setCursorToAll( CrossCursor, this ); - if ( mainWindow()->formWindow() == this ) - emitShowProperties( TQT_TQOBJECT(mainContainer()) ); - break; - } -} - -void FormWindow::showOrderIndicators() -{ - hideOrderIndicators(); - orderIndicators.setAutoDelete( TRUE ); - TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING ); - stackedWidgets = MetaDataBase::tabOrder( this ); - if ( l ) { - int order = 1; - for ( TQObject *o = l->first(); o; o = l->next() ) { - TQWidget* w = (TQWidget*) o; - if ( w->isShown() && - insertedWidgets[ (void*)w ] && - w->focusPolicy() != TQ_NoFocus ) { - OrderIndicator* ind = new OrderIndicator( order++, w, this ); - orderIndicators.append( ind ); - if ( stackedWidgets.findRef( w ) == -1 ) - stackedWidgets.append( w ); - } - } - delete l; - } - updateOrderIndicators(); -} - -void FormWindow::hideOrderIndicators() -{ - orderIndicators.clear(); -} - -void FormWindow::updateOrderIndicators() -{ - int order = 1; - for ( TQWidget *w = stackedWidgets.first(); w; w = stackedWidgets.next() ) { - for ( OrderIndicator* i = orderIndicators.first(); i; i = orderIndicators.next() ) - i->setOrder( order, w ); - order++; - } -} - -void FormWindow::repositionOrderIndicators() -{ - for ( OrderIndicator* i = orderIndicators.first(); i; i = orderIndicators.next() ) - i->reposition(); -} - - -void FormWindow::updateUndoInfo() -{ - commandHistory()->emitUndoRedo(); -} - -bool FormWindow::checkCustomWidgets() -{ - TQStringList missingCustomWidgets; - TQPtrDictIterator it( insertedWidgets ); - for ( ; it.current(); ++it ) { - if ( it.current()->isA( "CustomWidget" ) ) { - TQString className = WidgetFactory::classNameOf( TQT_TQOBJECT(it.current()) ); - if ( !MetaDataBase::hasCustomWidget( className ) ) - missingCustomWidgets << className; - } - } - - if ( !missingCustomWidgets.isEmpty() ) { - TQString txt = i18n( "The following custom widgets are used in '%1',\n" - "but are not known to TQt Designer:\n" ).arg( name() ); - for ( TQStringList::Iterator sit = missingCustomWidgets.begin(); sit != missingCustomWidgets.end(); ++sit ) - txt += " " + *sit + "\n"; - txt += i18n( "If you save this form and generate code for it using uic, \n" - "the generated code will not compile.\n" - "Do you want to save this form now?" ); - if ( TQMessageBox::information( mainWindow(), i18n( "Save Form" ), txt ) == 1 ) - return FALSE; - } - return TRUE; -} - -void FormWindow::setPropertyShowingBlocked( bool b ) -{ - propShowBlocked = b; -} - -bool FormWindow::isPropertyShowingBlocked() const -{ - return propShowBlocked; -} - -int FormWindow::numSelectedWidgets() const -{ - return usedSelections.count(); -} - -TQString FormWindow::copy() -{ - CHECK_MAINWINDOW_VALUE( TQString() ); - Resource resource( mainWindow() ); - resource.setWidget( this ); - return resource.copy(); -} - -void FormWindow::lowerWidgets() -{ - TQWidgetList widgets; - TQPtrDictIterator it( usedSelections ); - for ( ; it.current(); ++it ) - widgets.append( it.current()->widget() ); - - LowerCommand *cmd = new LowerCommand( i18n( "Lower" ), this, widgets ); - cmd->execute(); - commandHistory()->addCommand( cmd ); -} - -void find_accel( const TQString &txt, TQMap &accels, TQWidget *w ) -{ - int i = txt.find( "&" ); - if ( i == -1 ) - return; - TQChar c = txt[ i + 1 ]; - if ( c.isNull() || c == '&' ) - return; - c = c.lower(); - TQMap::Iterator it = accels.find( c ); - if ( it == accels.end() ) { - TQWidgetList wl; - wl.append( w ); - accels.insert( c, wl ); - } else { - TQWidgetList *wl = &*it; - wl->append( w ); - } -} - -void FormWindow::checkAccels() -{ - CHECK_MAINWINDOW; - TQMap accels; - TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING ); - if ( l ) { - for ( TQObject *o = l->first(); o; o = l->next() ) { - if ( ( (TQWidget*)o )->isVisibleTo( this ) && - insertedWidgets[ (void*)o ] ) { - TQWidget *w = (TQWidget*)o; - const TQMetaProperty* text = - w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE ); - const TQMetaProperty* title = - w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), TRUE ); - const TQMetaProperty* pageTitle = - w->metaObject()->property( w->metaObject()->findProperty( "pageTitle", TRUE ), TRUE ); - if ( text ) - find_accel( w->property( "text" ).toString(), accels, w ); - if ( title ) - find_accel( w->property( "title" ).toString(), accels, w ); - if ( pageTitle ) - find_accel( w->property( "pageTitle" ).toString(), accels, w ); - } else if ( ::tqqt_cast(o) ) { - ((MenuBarEditor *)o)->checkAccels( accels ); - } - } - delete l; - } - - bool ok = TRUE; - TQWidget *wid; - for ( TQMap::Iterator it = accels.begin(); it != accels.end(); ++it ) { - if ( (*it).count() > 1 ) { - ok = FALSE; - switch ( TQMessageBox::information( mainWindow(), i18n( "Check Accelerators" ), - i18n( "Accelerator '%1' is used once.", "Accelerator '%1' is used %n times.", (*it).count() - ).arg( it.key().upper() ), - i18n( "&Select" ), - i18n( "&Cancel" ), TQString(), 2 ) ) { - case 0: // select - clearSelection( FALSE ); - for ( wid = (*it).first(); wid; wid = (*it).next() ) - selectWidget( TQT_TQOBJECT(wid), TRUE ); - return; - case 1: // cancel - return; - } - } - } - - if ( ok ) - TQMessageBox::information( mainWindow(), i18n( "Check Accelerators" ), - i18n( "No accelerator is used more than once." ) ); -} - -void FormWindow::raiseWidgets() -{ - TQWidgetList widgets; - TQPtrDictIterator it( usedSelections ); - for ( ; it.current(); ++it ) - widgets.append( it.current()->widget() ); - - RaiseCommand *cmd = new RaiseCommand( i18n( "Raise" ), this, widgets ); - cmd->execute(); - commandHistory()->addCommand( cmd ); -} - -void FormWindow::paste( const TQString &cb, TQWidget *parent ) -{ - CHECK_MAINWINDOW; - Resource resource( mainWindow() ); - resource.setWidget( this ); - resource.paste( cb, parent ); -} - -void FormWindow::selectAll() -{ - checkedSelectionsForMove = FALSE; - blockSignals( TRUE ); - TQObjectList *l = mainContainer()->queryList( TQWIDGET_OBJECT_NAME_STRING ); - if ( l ) { - for ( TQObject *o = l->first(); o; o = l->next() ) { - if ( ( (TQWidget*)o )->isVisibleTo( this ) && - insertedWidgets[ (void*)o ] ) { - selectWidget( TQT_TQOBJECT(o) ); - } - } - delete l; - } - - blockSignals( FALSE ); - emitSelectionChanged(); - if ( propertyWidget ) - emitShowProperties( propertyWidget ); - emitSelectionChanged(); -} - -void FormWindow::layoutHorizontal() -{ - TQWidgetList widgets( selectedWidgets() ); - LayoutHorizontalCommand *cmd = new LayoutHorizontalCommand( i18n( "Lay OutQt::Horizontally" ), - this, mainContainer(), 0, widgets ); - clearSelection( FALSE ); - commandHistory()->addCommand( cmd ); - cmd->execute(); -} - -void FormWindow::layoutVertical() -{ - TQWidgetList widgets( selectedWidgets() ); - LayoutVerticalCommand *cmd = new LayoutVerticalCommand( i18n( "Lay OutQt::Vertically" ), - this, mainContainer(), 0, widgets ); - clearSelection( FALSE ); - commandHistory()->addCommand( cmd ); - cmd->execute(); -} - -void FormWindow::layoutHorizontalSplit() -{ - TQWidgetList widgets( selectedWidgets() ); - LayoutHorizontalSplitCommand *cmd = new LayoutHorizontalSplitCommand( i18n( "Lay OutQt::Horizontally (in splitter)" ), - this, mainContainer(), 0, widgets ); - clearSelection( FALSE ); - commandHistory()->addCommand( cmd ); - cmd->execute(); -} - -void FormWindow::layoutVerticalSplit() -{ - TQWidgetList widgets( selectedWidgets() ); - LayoutVerticalSplitCommand *cmd = new LayoutVerticalSplitCommand( i18n( "Lay OutQt::Vertically (in splitter)" ), - this, mainContainer(), 0, widgets ); - clearSelection( FALSE ); - commandHistory()->addCommand( cmd ); - cmd->execute(); -} - -void FormWindow::layoutGrid() -{ - int xres = grid().x(); - int yres = grid().y(); - - TQWidgetList widgets( selectedWidgets() ); - LayoutGridCommand *cmd = new LayoutGridCommand( i18n( "Lay Out in a Grid" ), - this, mainContainer(), 0, widgets, xres, yres ); - clearSelection( FALSE ); - commandHistory()->addCommand( cmd ); - cmd->execute(); -} - -void FormWindow::layoutHorizontalContainer( TQWidget *w ) -{ - if ( w == this ) - w = mainContainer(); - TQObjectList l = WidgetFactory::containerOfWidget(w)->childrenListObject(); - if ( l.isEmpty() ) - return; - TQWidgetList widgets; - for ( TQObject *o = l.first(); o; o = l.next() ) { - if ( o->isWidgetType() && - ( (TQWidget*)o )->isVisibleTo( this ) && - insertedWidgets.find( (TQWidget*)o ) ) - widgets.append( (TQWidget*)o ); - } - LayoutHorizontalCommand *cmd = new LayoutHorizontalCommand( i18n( "Lay Out ChildrenQt::Horizontally" ), - this, mainContainer(), w, widgets ); - clearSelection( FALSE ); - commandHistory()->addCommand( cmd ); - cmd->execute(); -} - -void FormWindow::layoutVerticalContainer( TQWidget *w ) -{ - if ( w == this ) - w = mainContainer(); - TQObjectList l = WidgetFactory::containerOfWidget(w)->childrenListObject(); - if ( l.isEmpty() ) - return; - TQWidgetList widgets; - for ( TQObject *o = l.first(); o; o = l.next() ) { - if ( o->isWidgetType() && - ( (TQWidget*)o )->isVisibleTo( this ) && - insertedWidgets.find( (TQWidget*)o ) ) - widgets.append( (TQWidget*)o ); - } - LayoutVerticalCommand *cmd = new LayoutVerticalCommand( i18n( "Lay Out ChildrenQt::Vertically" ), - this, mainContainer(), w, widgets ); - clearSelection( FALSE ); - commandHistory()->addCommand( cmd ); - cmd->execute(); -} - -void FormWindow::layoutGridContainer( TQWidget *w ) -{ - if ( w == this ) - w = mainContainer(); - int xres = grid().x(); - int yres = grid().y(); - - TQObjectList l = WidgetFactory::containerOfWidget(w)->childrenListObject(); - if ( l.isEmpty() ) - return; - TQWidgetList widgets; - for ( TQObject *o = l.first(); o; o = l.next() ) { - if ( o->isWidgetType() && - ( (TQWidget*)o )->isVisibleTo( this ) && - insertedWidgets.find( (TQWidget*)o ) ) - widgets.append( (TQWidget*)o ); - } - LayoutGridCommand *cmd = new LayoutGridCommand( i18n( "Lay Out Children in a Grid" ), - this, mainContainer(), w, widgets, xres, yres ); - clearSelection( FALSE ); - commandHistory()->addCommand( cmd ); - cmd->execute(); -} - -void FormWindow::breakLayout( TQWidget *w ) -{ - if ( w == this ) - w = mainContainer(); - w = WidgetFactory::containerOfWidget( w ); - TQPtrList commands; - - for (;;) { - if ( !w || w == this ) - break; - if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout && - WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) { - Command *cmd = breakLayoutCommand( w ); - if ( cmd ) - commands.insert( 0, cmd ); - if ( !::tqqt_cast(w) && !::tqqt_cast(w) ) - break; - } - w = w->parentWidget(); - } - - if ( commands.isEmpty() ) - return; - - clearSelection( FALSE ); - MacroCommand *cmd = new MacroCommand( i18n( "Break Layout" ), this, commands ); - commandHistory()->addCommand( cmd ); - cmd->execute(); -} - -BreakLayoutCommand *FormWindow::breakLayoutCommand( TQWidget *w ) -{ - CHECK_MAINWINDOW_VALUE( 0 ); - TQObjectList l = w->childrenListObject(); - if ( l.isEmpty() ) - return 0; - - TQWidgetList widgets; - for ( TQObject *o = l.first(); o; o = l.next() ) { - if ( o->isWidgetType() && - !mainWindow()->isAToolBarChild( TQT_TQOBJECT(o) ) && - ( (TQWidget*)o )->isVisibleTo( this ) && - insertedWidgets.find( (TQWidget*)o ) ) - widgets.append( (TQWidget*)o ); - } - return new BreakLayoutCommand( i18n( "Break Layout" ), this, WidgetFactory::widgetOfContainer( w ), widgets ); -} - -int FormWindow::numVisibleWidgets() const -{ - TQPtrDictIterator it( insertedWidgets ); - int visible = 0; - for ( ; it.current(); ++it ) { - if ( it.current()->isVisibleTo( (FormWindow*)this ) ) - visible++; - } - return visible; -} - -bool FormWindow::hasInsertedChildren( TQWidget *w ) const -{ - if ( !w ) - return FALSE; - w = WidgetFactory::containerOfWidget( w ); - if ( !w ) - return FALSE; - TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); - if ( !l || !l->first() ) { - delete l; - return FALSE; - } - - for ( TQObject *o = l->first(); o; o = l->next() ) { - if ( o->isWidgetType() && - ( (TQWidget*)o )->isVisibleTo( (FormWindow*)this ) && - insertedWidgets.find( (TQWidget*)o ) ) { - delete l; - return TRUE; - } - } - - delete l; - return FALSE; -} - -bool FormWindow::allowMove( TQWidget *w ) -{ - w = w->parentWidget(); - while ( w ) { - if ( ( isMainContainer( TQT_TQOBJECT(w) ) || insertedWidgets.find( w ) ) && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) - return TRUE; - w = w->parentWidget(); - } - return FALSE; -} - - -void FormWindow::editConnections() -{ - CHECK_MAINWINDOW; - buffer = 0; - if ( !startWidget || !endWidget ) - return; - - ConnectionDialog dlg( mainwindow ); - mainWindow()->statusMessage( i18n( "Edit connections...") ); - dlg.addConnection( TQT_TQOBJECT(startWidget), TQT_TQOBJECT(endWidget), TQString(), TQString() ); - TQTimer::singleShot( 0, &dlg, TQT_SLOT(ensureConnectionVisible()) ); - dlg.exec(); -} - -void FormWindow::saveBackground() -{ - if ( buffer ) - delete buffer; - buffer = new TQPixmap( width(), height() ); - *buffer = TQPixmap::grabWindow( winId() ); -} - -void FormWindow::restoreConnectionLine() -{ - if (!unclippedPainter || !buffer) // designer will occasionally crash if buffer is not tested to be non-zero - return; - - int a =TQABS( startPos.x() - currentPos.x() ); - int b = TQABS( startPos.y() - currentPos.y() ); - TQRect r( startPos, currentPos ); - - if ( a < 32 || b < 32 ) { // special case: vertical or horizontal line - r = r.normalize(); - unclippedPainter->drawPixmap( r.x() - 2, r.y() - 2, *buffer, - r.x() - 2, r.y() - 2, r.width() + 4, r.height() + 4 ); - return; - } - - if ( a <= 0 ) - a = 1; - if ( b <= 0 ) - b = 1; - int w, h; - if ( b > a ) { - h = 64; - w = ( a * h ) / b; - } else { - w = 64; - h = ( b * w ) / a; - } - - int dx = 2 * w / 3; - int dy = 2 * h / 3; - TQPoint p( startPos ); - - if ( r.x() > r.right() ) { - dx = dx * -1; - p.setX( p.x() - 64 ); - r.moveBy( -64, 0 ); - } - if ( r.y() > r.bottom() ) { - dy = dy * -1; - p.setY( p.y() - 64 ); - r.moveBy( 0, -64 ); - } - - w = h = 64; - r = r.normalize(); - while ( r.contains( p ) ) { - unclippedPainter->drawPixmap( p, *buffer, TQRect( p, TQSize( w, h ) ) ); - unclippedPainter->setPen( red ); - p.setX( p.x() + dx ); - p.setY( p.y() + dy ); - } - - unclippedPainter->drawPixmap( startPos.x() - 10, startPos.y() - 10, *buffer, - startPos.x() - 10, startPos.y() - 10, 20, 20 ); -} - -void FormWindow::restoreRect( const TQRect &rect ) -{ - if (!unclippedPainter || !buffer) - return; - - TQRect r( rect ); - r = r.normalize(); - - r = TQRect( r.x() + 2, r.y() + 2, r.width() - 4, r.height() - 4 ); - - unclippedPainter->drawPixmap( r.x() - 2, r.y() - 2, *buffer, r.x() - 2, r.y() - 2, r.width() + 4, 4 ); - unclippedPainter->drawPixmap( r.x() - 2, r.y() - 2, *buffer, r.x() - 2, r.y() - 2, 4, r.height() + 4 ); - unclippedPainter->drawPixmap( r.x() - 2, r.y() + r.height() - 3, *buffer, r.x() - 2, r.y() + r.height() - 3, r.width() + 4, 5 ); - unclippedPainter->drawPixmap( r.x() + r.width() - 2, r.y(), *buffer, r.x() + r.width() - 2, r.y(), 4, r.height() + 4 ); -} - -void FormWindow::drawConnectionLine() -{ - if ( !unclippedPainter ) - return; - - unclippedPainter->setPen( TQPen( white, 2 ) ); - unclippedPainter->drawLine( startPos, currentPos ); - if ( validForBuddy ) - unclippedPainter->setPen( TQPen( darkRed, 1 ) ); - else - unclippedPainter->setPen( TQPen( darkCyan, 1 ) ); - unclippedPainter->drawLine( startPos, currentPos ); - - if ( validForBuddy ) - unclippedPainter->setPen( TQPen( darkGreen, 1 ) ); - else - unclippedPainter->setPen( TQPen( magenta, 1 ) ); - if ( startWidget ) { - TQWidget *s = (TQWidget*)startWidget; - TQPoint p = mapToForm( s, TQPoint(0,0) ); - unclippedPainter->drawRect( TQRect( p + TQPoint( 2, 2 ), s->size() - TQSize( 4, 4 ) ) ); - } - if ( endWidget ) { - TQWidget *e = (TQWidget*)endWidget; - TQPoint p = mapToForm( e, TQPoint(0,0) ); - unclippedPainter->drawRect( TQRect( p + TQPoint( 2, 2 ), e->size() - TQSize( 4, 4 ) ) ); - } -} - -TQString FormWindow::fileName() const -{ - return ff->absFileName(); -} - -void FormWindow::setFileName( const TQString &fn ) -{ - ff->setFileName( fn ); - emit fileNameChanged( ff->fileName(), this ); -} - -void FormWindow::modificationChanged( bool m ) -{ - emit modificationChanged( m, this ); - emit modificationChanged( m, ff->fileName() ); -} - -bool FormWindow::unify( TQObject *w, TQString &s, bool changeIt ) -{ - bool found = !isMainContainer( w ) && qstrcmp( name(), s.latin1() ) == 0; - if ( !found ) { - TQString orig = s; - int num = 1; - TQPtrDictIterator it( insertedWidgets ); - for ( ; it.current();) { - if ( TQT_BASE_OBJECT(it.current()) != TQT_BASE_OBJECT(w) && - qstrcmp( it.current()->name(), s.latin1() ) == 0 ) { - found = TRUE; - if ( !changeIt ) - break; - s = orig + "_" + TQString::number( ++num ); - it.toFirst(); - } else { - ++it; - } - } - if ( !found ) { - TQPtrList al; - TQAction *a = 0; - for ( a = actions.first(); a; a = actions.next() ) { - TQObjectList *l = a->queryList( TQACTION_OBJECT_NAME_STRING ); - al.append( a ); - for ( TQObject *ao = l->first(); ao; ao = l->next() ) - al.append( (TQAction*)ao ); - delete l; - } - for ( a = al.first(); a; a = al.next() ) { - if ( a != w && - qstrcmp( a->name(), s.latin1() ) == 0 ) { - found = TRUE; - if ( !changeIt ) - break; - s = orig + "_" + TQString::number( ++num ); - a = actions.first(); - } - } - } - if ( ::tqqt_cast(mainContainer()) && !found ) { - TQObjectList *l = mainContainer()->queryList( "PopupMenuEditor" ); - for ( TQObject *o = l->first(); o; o = l->next() ) { - if ( o != w && - qstrcmp ( o->name(), s.latin1() ) == 0 ) { - found = TRUE; - if ( !changeIt ) - break; - s = orig + "_" + TQString::number( ++num ); - o = l->first(); - } - } - delete l; - } - if ( ::tqqt_cast(mainContainer()) ) { - if ( !found ) { - TQObjectList *l = mainContainer()->queryList( TQDOCKWINDOW_OBJECT_NAME_STRING, 0, TRUE ); - for ( TQObject *o = l->first(); o; o = l->next() ) { - if ( o != w && - qstrcmp( o->name(), s.latin1() ) == 0 ) { - found = TRUE; - if ( !changeIt ) - break; - s = orig + "_" + TQString::number( ++num ); - o = l->first(); - } - } - delete l; - } - } - } - - if ( !found ) - return TRUE; - return FALSE; -} - -bool FormWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *w ) -{ - TQPtrDictIterator it( insertedWidgets ); - for ( ; it.current(); ++it ) { - if ( it.current()->isA( "CustomWidget" ) ) { - if ( qstrcmp( WidgetFactory::classNameOf( TQT_TQOBJECT(it.current()) ), w->className.utf8() ) == 0 ) - return TRUE; - } - } - - return FALSE; -} - -bool FormWindow::isDatabaseWidgetUsed() const -{ -#ifndef TQT_NO_SQL - TQStringList dbClasses; - dbClasses << TQDATATABLE_OBJECT_NAME_STRING; // add more here - TQPtrDictIterator it( insertedWidgets ); - for ( ; it.current(); ++it ) { - TQString c( it.current()->className() ); - if ( dbClasses.contains( c ) > 0 ) { - return TRUE; - } - } -#endif - return FALSE; -} - -bool FormWindow::isDatabaseAware() const -{ -#ifndef TQT_NO_SQL - if ( TQString(mContainer->className()) == "QDesignerDataBrowser" || TQString(mContainer->className()) == "QDesignerDataView" ) - return TRUE; - return isDatabaseWidgetUsed(); -#else - return FALSE; -#endif -} - -void FormWindow::visibilityChanged() -{ - if ( currTool != ORDER_TOOL ) { - emitUpdateProperties( TQT_TQOBJECT(currentWidget()) ); - } else { - updateOrderIndicators(); - repositionOrderIndicators(); - } -} - - -/*! - Maps \a pos in \a w's coordinates to the form's coordinate system. - - This is the equivalent to mapFromGlobal(w->mapToGlobal(pos) ) but - avoids the two roundtrips to the X-Server on Unix/X11. - */ -TQPoint FormWindow::mapToForm( const TQWidget* w, const TQPoint& pos ) const -{ - TQPoint p = pos; - const TQWidget* i = w; - while ( i && !i->isTopLevel() && !isMainContainer( TQT_TQOBJECT(const_cast(i)) ) ) { - p = i->mapToParent( p ); - i = i->parentWidget(); - } - return mapFromGlobal( w->mapToGlobal( pos ) ); -} - -static int widgetDepth( TQWidget *w ) -{ - int d = -1; - while ( w && !w->isTopLevel() ) { - d++; - w = w->parentWidget(); - } - - return d; -} - -static bool isChildOf( TQWidget *c, TQWidget *p ) -{ - while ( c && !c->isTopLevel() ) { - if ( c == p ) - return TRUE; - c = c->parentWidget(); - } - return FALSE; -} - -TQWidget *FormWindow::containerAt( const TQPoint &pos, TQWidget *notParentOf ) -{ - TQPtrDictIterator it( insertedWidgets ); - TQWidget *container = 0; - int depth = -1; - TQWidgetList selected = selectedWidgets(); - if ( TQT_TQRECT_OBJECT(rect()).contains( mapFromGlobal( pos ) ) ) { - container = mainContainer(); - depth = widgetDepth( container ); - } - - for ( ; it.current(); ++it ) { - if ( ::tqqt_cast(it.current()) - || ::tqqt_cast(it.current()) ) - continue; - if ( !it.current()->isVisibleTo( this ) ) - continue; - if ( selected.find( it.current() ) != -1 ) - continue; - if ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(it.current()) ) ) ) && - it.current() != mainContainer() ) - continue; - - // the rectangles of all ancestors of the container must contain the insert position - TQWidget *w = it.current(); - while ( w && !w->isTopLevel() ) { - if ( !TQT_TQRECT_OBJECT(w->rect()).contains( ( w->mapFromGlobal( pos ) ) ) ) - break; - w = w->parentWidget(); - } - if ( !( w == 0 || w->isTopLevel() ) ) continue; // we did not get through the full while loop - - int wd = widgetDepth( it.current() ); - if ( wd == depth && container ) { - if ( ( it.current()->parentWidget()->childrenListObject() ).find( TQT_TQOBJECT(it.current()) ) > - ( container->parentWidget()->childrenListObject() ).find( TQT_TQOBJECT(container) ) ) - wd++; - } - if ( wd > depth && !isChildOf( it.current(), notParentOf ) ) { - depth = wd; - container = it.current(); - } - } - - return container; -} - -bool FormWindow::isMainContainer( TQObject *w ) const -{ - return w && w->isWidgetType() && ( TQT_BASE_OBJECT(w) == this || TQT_BASE_OBJECT(w) == mainContainer() ); -} - -void FormWindow::setMainContainer( TQWidget *w ) -{ - bool resetPropertyWidget = isMainContainer( propertyWidget ); - if ( mContainer ) - insertedWidgets.remove( mContainer ); - if ( TQT_BASE_OBJECT(propertyWidget) == TQT_BASE_OBJECT(mContainer) ) - propertyWidget = 0; - delete mContainer; - mContainer = w; - insertedWidgets.insert( mContainer, mContainer ); - delete layout(); - TQHBoxLayout *l = new TQHBoxLayout( this ); - l->addWidget( w ); - if ( resetPropertyWidget ) { - TQObject *opw = propertyWidget; - propertyWidget = TQT_TQOBJECT(mContainer); - if ( opw && opw->isWidgetType() ) - repaintSelection( (TQWidget*)opw ); - } - if ( project() ) { - LanguageInterface *iface = MetaDataBase::languageInterface( project()->language() ); - if ( iface && !project()->isCpp() && !isFake() ) { - if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(this), "init()" ) ) - MetaDataBase::addFunction( TQT_TQOBJECT(this), "init()", "", "private", "function", - project()->language(), "void" ); - if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(this), "destroy()" ) ) - MetaDataBase::addFunction( TQT_TQOBJECT(this), "destroy()", "", "private", "function", - project()->language(), "void" ); - if ( !MetaDataBase::hasConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "shown()", TQT_TQOBJECT(mainContainer()), "init" ) ) - MetaDataBase::addConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "shown()", TQT_TQOBJECT(mainContainer()), "init" ); - if ( !MetaDataBase::hasConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "destroyed()", TQT_TQOBJECT(mainContainer()), "destroy" ) ) - MetaDataBase::addConnection( TQT_TQOBJECT(this), TQT_TQOBJECT(mainContainer()), "destroyed()", - TQT_TQOBJECT(mainContainer()), "destroy" ); - } - } -} - -bool FormWindow::savePixmapInline() const -{ - return pixInline; -} - -bool FormWindow::savePixmapInProject() const -{ - return pixProject; -} - -TQString FormWindow::pixmapLoaderFunction() const -{ - return pixLoader; -} - -void FormWindow::setSavePixmapInline( bool b ) -{ - pixInline = b; - if ( b ) - pixProject = FALSE; -} - -void FormWindow::setSavePixmapInProject( bool b ) -{ - pixProject = b; - if ( b ) - pixInline = FALSE; -} - -void FormWindow::setPixmapLoaderFunction( const TQString &func ) -{ - pixLoader = func; -} - -void FormWindow::setActiveObject( TQObject *o ) -{ - emitShowProperties( o ); - propertyWidget = o; -} - -void FormWindow::setProject( Project *pro ) -{ - proj = pro; -} - -Project *FormWindow::project() const -{ - return proj; -} - -TQAction *FormWindow::findAction( const TQString &name ) -{ - for ( TQAction *a = actionList().first(); a; a = actionList().next() ) { - if ( TQString( a->name() ) == name ) - return a; - TQAction *ac = (TQAction*)a->child( name.latin1(), TQACTION_OBJECT_NAME_STRING ); - if ( ac ) - return ac; - } - return 0; -} - -void FormWindow::killAccels( TQObject *top ) -{ - TQObjectList *l = top->queryList( TQACCEL_OBJECT_NAME_STRING ); - if ( !l ) - return; - for ( TQObject *o = l->first(); o; o = l->next() ) - ( (TQAccel*)o )->setEnabled( FALSE ); - delete l; -} - -DesignerFormWindow *FormWindow::iFace() -{ - if ( !iface ) - iface = new DesignerFormWindowImpl( this ); - return iface; -} - -bool FormWindow::isCentralWidget( TQObject *w ) const -{ - if ( !::tqqt_cast(mainContainer()) ) - return FALSE; - return TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(( (TQMainWindow*)mainContainer() )->centralWidget()); -} - -int FormWindow::layoutDefaultSpacing() const -{ - return defSpacing; -} - -int FormWindow::layoutDefaultMargin() const -{ - return defMargin; -} - -void FormWindow::setLayoutDefaultSpacing( int s ) -{ - defSpacing = s; -} - -void FormWindow::setLayoutDefaultMargin( int s ) -{ - defMargin = s; -} - -void FormWindow::setSpacingFunction( const TQString &funct ) -{ - spacFunction = funct; -} - -TQString FormWindow::spacingFunction() const -{ - return spacFunction; -} - -void FormWindow::hasLayoutFunctions( bool b ) -{ - hasLayoutFunc = b; -} - -bool FormWindow::hasLayoutFunctions() const -{ - return hasLayoutFunc; -} - -void FormWindow::setMarginFunction( const TQString &funct ) -{ - margFunction = funct; -} - -TQString FormWindow::marginFunction() const -{ - return margFunction; -} - -FormFile *FormWindow::formFile() const -{ - return ff; -} - -void FormWindow::setFormFile( FormFile *f ) -{ - ff = f; - if ( ff ) - connect( this, TQT_SIGNAL( modificationChanged(bool, const TQString&) ), ff, TQT_SLOT( formWindowChangedSomehow() ) ); -} - -bool FormWindow::canBeBuddy( const TQWidget *w ) const -{ - return w->focusPolicy() != TQ_NoFocus; -} - -bool FormWindow::event( TQEvent *e ) -{ - if (e->type() == TQEvent::ShowMaximized) - { - if ( isMaximized() ) - setWindowState( windowState() & ~WindowMaximized | WindowActive); - return true; - } - return TQWidget::event(e); -} diff --git a/tdevdesigner/designer/hierarchyview.cpp b/tdevdesigner/designer/hierarchyview.cpp deleted file mode 100644 index 860897ff..00000000 --- a/tdevdesigner/designer/hierarchyview.cpp +++ /dev/null @@ -1,1508 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "hierarchyview.h" -#include "formwindow.h" -#include "globaldefs.h" -#include "mainwindow.h" -#include "command.h" -#include "widgetfactory.h" -#include "widgetdatabase.h" -#include "project.h" -#include "sourceeditor.h" -#include "propertyeditor.h" -#include "editfunctionsimpl.h" -#include "listeditor.h" -#include "actiondnd.h" -#include "actioneditorimpl.h" -#include "variabledialogimpl.h" -#include "popupmenueditor.h" -#include "menubareditor.h" - -#include -#include "tdevdesigner_part.h" -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "../interfaces/languageinterface.h" -#include -#include -#include - -#include - -TQListViewItem *newItem = 0; - -static TQPluginManager *classBrowserInterfaceManager = 0; - -HierarchyItem::HierarchyItem( Type type, TQListViewItem *parent, TQListViewItem *after, - const TQString &txt1, const TQString &txt2, const TQString &txt3 ) - : TQListViewItem( parent, after, txt1, txt2, txt3 ), typ( type ) -{ -} - -HierarchyItem::HierarchyItem( Type type, TQListView *parent, TQListViewItem *after, - const TQString &txt1, const TQString &txt2, const TQString &txt3 ) - : TQListViewItem( parent, after, txt1, txt2, txt3 ), typ( type ) -{ -} - -void HierarchyItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ) -{ - TQColorGroup g( cg ); - g.setColor( TQColorGroup::Base, backgroundColor() ); - g.setColor( TQColorGroup::Foreground, TQt::black ); - g.setColor( TQColorGroup::Text, TQt::black ); - TQString txt = text( 0 ); - if ( rtti() == Function && - MainWindow::self->currProject()->isCpp() && - ( txt == "init()" || txt == "destroy()" ) ) { - listView()->setUpdatesEnabled( FALSE ); - if ( txt == "init()" ) - setText( 0, txt + " " + "(Constructor)" ); - else - setText( 0, txt + " " + "(Destructor)" ); - TQListViewItem::paintCell( p, g, column, width, align ); - setText( 0, txt ); - listView()->setUpdatesEnabled( TRUE ); - } else { - TQListViewItem::paintCell( p, g, column, width, align ); - } - p->save(); - p->setPen( TQPen( cg.dark(), 1 ) ); - if ( column == 0 ) - p->drawLine( 0, 0, 0, height() - 1 ); - if ( listView()->firstChild() != this ) { - if ( nextSibling() != itemBelow() && itemBelow()->depth() < depth() ) { - int d = depth() - itemBelow()->depth(); - p->drawLine( -listView()->treeStepSize() * d, height() - 1, 0, height() - 1 ); - } - } - p->drawLine( 0, height() - 1, width, height() - 1 ); - p->drawLine( width - 1, 0, width - 1, height() ); - p->restore(); -} - -TQColor HierarchyItem::backgroundColor() -{ - updateBackColor(); - return backColor; -} - -void HierarchyItem::updateBackColor() -{ - if ( listView()->firstChild() == this ) { - backColor = *backColor1; - return; - } - - TQListViewItemIterator it( this ); - --it; - if ( it.current() ) { - if ( ( ( HierarchyItem*)it.current() )->backColor == *backColor1 ) - backColor = *backColor2; - else - backColor = *backColor1; - } else { - backColor = *backColor1; - } -} - -void HierarchyItem::setObject( TQObject *o ) -{ - obj = o; -} - -TQObject *HierarchyItem::object() const -{ - return obj; -} - -void HierarchyItem::okRename( int col ) -{ - if ( newItem == this ) - newItem = 0; - TQListViewItem::okRename( col ); -} - -void HierarchyItem::cancelRename( int col ) -{ - if ( newItem == this ) { - newItem = 0; - TQListViewItem::cancelRename( col ); - delete this; - return; - } - TQListViewItem::cancelRename( col ); -} - - - - -HierarchyList::HierarchyList( TQWidget *parent, FormWindow *fw, bool doConnects ) - : TQListView( parent ), formWindow( fw ) -{ - DesignerFormPix = SmallIcon( "designer_form.png" , TDevDesignerPartFactory::instance()); - DesignerLayoutPix = SmallIcon( "designer_layout.png" , TDevDesignerPartFactory::instance()); - DesignerFolderPix = SmallIcon( "designer_folder.png" , TDevDesignerPartFactory::instance()); - DesignerEditSlotsPix = SmallIcon( "designer_editslots.png" , TDevDesignerPartFactory::instance()); - - init_colors(); - - setDefaultRenameAction( Accept ); - header()->setMovingEnabled( FALSE ); - header()->setStretchEnabled( TRUE ); - normalMenu = 0; - tabWidgetMenu = 0; - addColumn( i18n( "Name" ) ); - addColumn( i18n( "Class" ) ); - TQPalette p( palette() ); - p.setColor( TQColorGroup::Base, TQColor( *backColor2 ) ); - (void)*selectedBack; // hack - setPalette( p ); - disconnect( header(), TQT_SIGNAL( sectionClicked( int ) ), - this, TQT_SLOT( changeSortColumn( int ) ) ); - setSorting( -1 ); - setHScrollBarMode( AlwaysOff ); - setVScrollBarMode( AlwaysOn ); - if ( doConnects ) { - connect( this, TQT_SIGNAL( clicked( TQListViewItem * ) ), - this, TQT_SLOT( objectClicked( TQListViewItem * ) ) ); - connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), - this, TQT_SLOT( objectDoubleClicked( TQListViewItem * ) ) ); - connect( this, TQT_SIGNAL( returnPressed( TQListViewItem * ) ), - this, TQT_SLOT( objectClicked( TQListViewItem * ) ) ); - connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint&, int ) ), - this, TQT_SLOT( showRMBMenu( TQListViewItem *, const TQPoint & ) ) ); - } - deselect = TRUE; - setColumnWidthMode( 1, Manual ); -} - -void HierarchyList::keyPressEvent( TQKeyEvent *e ) -{ - if ( e->key() == Key_Shift || e->key() == Key_Control ) - deselect = FALSE; - else - deselect = TRUE; - TQListView::keyPressEvent( e ); -} - -void HierarchyList::keyReleaseEvent( TQKeyEvent *e ) -{ - deselect = TRUE; - TQListView::keyReleaseEvent( e ); -} - -void HierarchyList::viewportMousePressEvent( TQMouseEvent *e ) -{ - if ( e->state() & ShiftButton || e->state() & ControlButton ) - deselect = FALSE; - else - deselect = TRUE; - TQListView::viewportMousePressEvent( e ); -} - -void HierarchyList::viewportMouseReleaseEvent( TQMouseEvent *e ) -{ - TQListView::viewportMouseReleaseEvent( e ); -} - -TQObject *HierarchyList::handleObjectClick( TQListViewItem *i ) -{ - if ( !i ) - return 0; - - TQObject *o = findObject( i ); - if ( !o ) - return 0; - if ( TQT_BASE_OBJECT(formWindow) == TQT_BASE_OBJECT(o) ) { - if ( deselect ) - formWindow->clearSelection( FALSE ); - formWindow->emitShowProperties( TQT_TQOBJECT(formWindow) ); - return 0; - } - if ( o->isWidgetType() ) { - TQWidget *w = (TQWidget*)o; - if ( !formWindow->widgets()->find( w ) ) { - if ( ::tqqt_cast(w->parent()) ) { - if (::tqqt_cast(w->parent()->parent()) ) { - ((TQTabWidget*)w->parent()->parent())->showPage( w ); - o = TQT_TQOBJECT((TQWidget*)w->parent()->parent()); - formWindow->emitUpdateProperties( TQT_TQOBJECT(formWindow->currentWidget()) ); - } else if ( ::tqqt_cast(w->parent()->parent()) ) { - ((QDesignerWizard*)w->parent()->parent())-> - setCurrentPage( ( (QDesignerWizard*)w->parent()->parent() )->pageNum( w ) ); - o = TQT_TQOBJECT((TQWidget*)w->parent()->parent()); - formWindow->emitUpdateProperties( TQT_TQOBJECT(formWindow->currentWidget()) ); - } else { - ( (TQWidgetStack*)w->parent() )->raiseWidget( w ); - if ( (TQWidgetStack*)w->parent()->isA( "QDesignerWidgetStack" ) ) - ( (QDesignerWidgetStack*)w->parent() )->updateButtons(); - } - } else if ( ::tqqt_cast(w) || ::tqqt_cast(w) ) { - formWindow->setActiveObject( TQT_TQOBJECT(w) ); - } else if ( ::tqqt_cast(w) ) { - return 0; // ### we could try to find our menu bar and change the currentMenu to our index - } else { - return 0; - } - } - } else if ( ::tqqt_cast(o) ) { - MainWindow::self->actioneditor()->setCurrentAction( (TQAction*)o ); - deselect = TRUE; - } - - if ( deselect ) - formWindow->clearSelection( FALSE ); - - return o; -} - - -void HierarchyList::objectDoubleClicked( TQListViewItem *i ) -{ - TQObject *o = handleObjectClick( i ); - if ( !o ) - return; - if ( o->isWidgetType() && ( (TQWidget*)o )->isVisibleTo( formWindow ) ) { - TQWidget *w = (TQWidget*)o; - if ( !w->parentWidget() || - WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) - w->raise(); - formWindow->selectWidget( TQT_TQOBJECT(w), TRUE ); - } -} - -void HierarchyList::objectClicked( TQListViewItem *i ) -{ - TQObject *o = handleObjectClick( i ); - if ( !o ) - return; - if ( o->isWidgetType() && ( (TQWidget*)o )->isVisibleTo( formWindow ) ) { - TQWidget *w = (TQWidget*)o; - formWindow->selectWidget( TQT_TQOBJECT(w), TRUE ); - } -} - -TQObject *HierarchyList::findObject( TQListViewItem *i ) -{ - return ( (HierarchyItem*)i )->object(); -} - -TQListViewItem *HierarchyList::findItem( TQObject *o ) -{ - TQListViewItemIterator it( this ); - while ( it.current() ) { - if ( ( (HierarchyItem*)it.current() )->object() == o ) - return it.current(); - ++it; - } - return 0; -} - -TQObject *HierarchyList::current() const -{ - if ( currentItem() ) - return ( (HierarchyItem*)currentItem() )->object(); - return 0; -} - -void HierarchyList::changeNameOf( TQObject *o, const TQString &name ) -{ - TQListViewItem *item = findItem( o ); - if ( !item ) - return; - item->setText( 0, name ); -} - - -void HierarchyList::changeDatabaseOf( TQObject *o, const TQString &info ) -{ -#ifndef TQT_NO_SQL - if ( !formWindow->isDatabaseAware() ) - return; - TQListViewItem *item = findItem( o ); - if ( !item ) - return; - item->setText( 2, info ); -#endif -} - -static TQPtrList *widgetStacks = 0; - -void HierarchyList::setup() -{ - if ( !formWindow || formWindow->isFake() ) - return; - clear(); - TQWidget *w = formWindow->mainContainer(); -#ifndef TQT_NO_SQL - if ( formWindow->isDatabaseAware() ) { - if ( columns() == 2 ) { - addColumn( i18n( "Database" ) ); - header()->resizeSection( 0, 1 ); - header()->resizeSection( 1, 1 ); - header()->resizeSection( 2, 1 ); - header()->adjustHeaderSize(); - } - } else { - if ( columns() == 3 ) { - removeColumn( 2 ); - } - } -#endif - if ( !widgetStacks ) - widgetStacks = new TQPtrList; - if ( w ) - insertObject( TQT_TQOBJECT(w), 0 ); - widgetStacks->clear(); -} - -void HierarchyList::setOpen( TQListViewItem *i, bool b ) -{ - TQListView::setOpen( i, b ); -} - -void HierarchyList::insertObject( TQObject *o, TQListViewItem *parent ) -{ - if ( TQString( o->name() ).startsWith( "qt_dead_widget_" ) ) - return; - bool fakeMainWindow = FALSE; - if ( ::tqqt_cast(o) ) { - TQObject *cw = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); - if ( cw ) { - o = cw; - fakeMainWindow = TRUE; - } - } - TQListViewItem *item = 0; - TQString className = WidgetFactory::classNameOf( o ); - if ( ::tqqt_cast(o) ) { - switch ( WidgetFactory::layoutType( (TQWidget*)o ) ) { - case WidgetFactory::HBox: - className = "HBox"; - break; - case WidgetFactory::VBox: - className = "VBox"; - break; - case WidgetFactory::Grid: - className = "Grid"; - break; - default: - break; - } - } - - TQString dbInfo; -#ifndef TQT_NO_SQL - dbInfo = MetaDataBase::fakeProperty( o, "database" ).toStringList().join("."); -#endif - - TQString name = o->name(); - if ( ::tqqt_cast(o->parent()) ) { - if ( ::tqqt_cast(o->parent()->parent()) ) - name = ( (TQTabWidget*)o->parent()->parent() )->tabLabel( (TQWidget*)o ); - else if ( ::tqqt_cast(o->parent()->parent()) ) - name = ( (TQWizard*)o->parent()->parent() )->title( (TQWidget*)o ); - } - - TQToolBox *tb; - if ( o->parent() && o->parent()->parent() && - (tb = ::tqqt_cast(o->parent()->parent()->parent())) ) - name = tb->itemLabel( tb->indexOf((TQWidget*)o) ); - - if ( fakeMainWindow ) { - name = o->parent()->name(); - className = TQMAINWINDOW_OBJECT_NAME_STRING; - } - - if ( !parent ) - item = new HierarchyItem( HierarchyItem::Widget, this, 0, name, className, dbInfo ); - else - item = new HierarchyItem( HierarchyItem::Widget, parent, 0, name, className, dbInfo ); - item->setOpen( TRUE ); - if ( !parent ) - item->setPixmap( 0, DesignerFormPix ); - else if ( ::tqqt_cast(o) ) - item->setPixmap( 0, DesignerLayoutPix ); - else - item->setPixmap( 0, WidgetDatabase::iconSet( - WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( o ) ) ). - pixmap( TQIconSet::Small, TQIconSet::Normal ) ); - if ( ::tqqt_cast(o) ) - item->setPixmap( 0, ( (TQAction*)o )->iconSet().pixmap() ); - - ( (HierarchyItem*)item )->setObject( o ); - TQObjectList l = o->childrenListObject(); - if ( ::tqqt_cast(o) ) - l.clear(); - if ( !l.isEmpty() ) { - TQObjectListIt it( l ); - it.toLast(); - for ( ; it.current(); --it ) { - if ( !it.current()->isWidgetType() || - ( (TQWidget*)it.current() )->isHidden() ) - continue; - if ( !formWindow->widgets()->find( (TQWidget*)it.current() ) ) { - if ( ::tqqt_cast(it.current()->parent()) || - ::tqqt_cast(it.current()) ) { - TQObject *obj = it.current(); - QDesignerTabWidget *tw = ::tqqt_cast(it.current()->parent()); - QDesignerWizard *dw = ::tqqt_cast(it.current()->parent()); - TQWidgetStack *stack = 0; - if ( dw || tw || ::tqqt_cast(obj) ) - stack = (TQWidgetStack*)obj; - else - stack = (TQWidgetStack*)obj->parent(); - if ( widgetStacks->findRef( stack ) != -1 ) - continue; - widgetStacks->append( stack ); - TQObjectList *l2 = stack->queryList( TQWIDGET_OBJECT_NAME_STRING, 0, TRUE, FALSE ); - for ( obj = l2->last(); obj; obj = l2->prev() ) { - if ( qstrcmp( obj->className(), - "TQWidgetStackPrivate::Invisible" ) == 0 || - ( tw && !tw->tabBar()->tab( stack->id( (TQWidget*)obj ) ) ) || - ( dw && dw->isPageRemoved( (TQWidget*)obj ) ) ) - continue; - if ( qstrcmp( obj->name(), "designer_wizardstack_button" ) == 0 ) - continue; - if ( stack->id( (TQWidget*)obj ) == -1 ) - continue; - insertObject( obj, item ); - } - delete l2; - } else if ( ::tqqt_cast(it.current()->parent()) ) { - if ( !::tqqt_cast(it.current()) ) - continue; - TQToolBox *tb = (TQToolBox*)it.current()->parent(); - for ( int i = tb->count() - 1; i >= 0; --i ) - insertObject( TQT_TQOBJECT(tb->item( i )), item ); - } - continue; - } - insertObject( it.current(), item ); - } - } - - if ( fakeMainWindow ) { - TQObjectList *l = o->parent()->queryList( "QDesignerToolBar" ); - TQObject *obj; - for ( obj = l->first(); obj; obj = l->next() ) - insertObject( obj, item ); - delete l; - l = o->parent()->queryList( "MenuBarEditor" ); - for ( obj = l->first(); obj; obj = l->next() ) - insertObject( obj, item ); - delete l; - } else if ( ::tqqt_cast(o) || ::tqqt_cast(o) ) { - TQPtrList actions; - if ( ::tqqt_cast(o) ) - actions = ( (QDesignerToolBar*)o )->insertedActions(); - else - ( (PopupMenuEditor*)o )->insertedActions( actions ); - - TQPtrListIterator it( actions ); - it.toLast(); - while ( it.current() ) { - TQAction *a = it.current(); - if ( ::tqqt_cast(a) ) { - QDesignerAction *da = (QDesignerAction*)a; - if ( da->supportsMenu() ) - insertObject( da, item ); - else - insertObject( TQT_TQOBJECT(da->widget()), item ); - } else if ( ::tqqt_cast(a) ) { - insertObject( a, item ); - } - --it; - } - } else if ( ::tqqt_cast(o) && !o->childrenListObject().isEmpty() ) { - TQObjectList l = o->childrenListObject(); - for ( TQObject *obj = l.last(); obj; obj = l.prev() ) { - if ( ::tqqt_cast(obj) ) { - QDesignerAction *da = (QDesignerAction*)obj; - if ( da->supportsMenu() ) - insertObject( da, item ); - else - insertObject( TQT_TQOBJECT(da->widget()), item ); - } else if ( ::tqqt_cast(obj) ) { - insertObject( obj, item ); - } - } - } else if ( ::tqqt_cast(o) ) { - MenuBarEditor *mb = (MenuBarEditor*)o; - for ( int i = mb->count() -1; i >= 0; --i ) { - MenuBarEditorItem *md = mb->item( i ); - if ( !md || !md->menu() ) - continue; - insertObject( TQT_TQOBJECT(md->menu()), item ); - } - } -} - -void HierarchyList::setCurrent( TQObject *o ) -{ - TQListViewItemIterator it( this ); - while ( it.current() ) { - if ( ( (HierarchyItem*)it.current() )->object() == o ) { - blockSignals( TRUE ); - setCurrentItem( it.current() ); - ensureItemVisible( it.current() ); - blockSignals( FALSE ); - return; - } - ++it; - } -} - -void HierarchyList::showRMBMenu( TQListViewItem *i, const TQPoint & p ) -{ - if ( !i ) - return; - - TQObject *o = findObject( i ); - if ( !o ) - return; - - if ( !o->isWidgetType() || - ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(formWindow) && !formWindow->widgets()->find( (TQWidget*)o ) ) ) - return; - - TQWidget *w = (TQWidget*)o; - if ( w->isVisibleTo( formWindow ) ) { - if ( !::tqqt_cast(w) && !::tqqt_cast(w) ) { - if ( !normalMenu ) - normalMenu = formWindow->mainWindow()->setupNormalHierarchyMenu( this ); - normalMenu->popup( p ); - } else { - if ( !tabWidgetMenu ) - tabWidgetMenu = - formWindow->mainWindow()->setupTabWidgetHierarchyMenu( - this, TQT_SLOT( addTabPage() ), - TQT_SLOT( removeTabPage() ) ); - tabWidgetMenu->popup( p ); - } - } -} - -void HierarchyList::addTabPage() -{ - TQObject *o = current(); - if ( !o || !o->isWidgetType() ) - return; - TQWidget *w = (TQWidget*)o; - if ( ::tqqt_cast(w) ) { - TQTabWidget *tw = (TQTabWidget*)w; - AddTabPageCommand *cmd = new AddTabPageCommand( i18n( "Add Page to %1" ). - arg( tw->name() ), formWindow, - tw, "Tab" ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); - } else if ( ::tqqt_cast(w) ) { - TQWizard *wiz = (TQWizard*)formWindow->mainContainer(); - AddWizardPageCommand *cmd = new AddWizardPageCommand( i18n( "Add Page to %1" ). - arg( wiz->name() ), formWindow, - wiz, "Page" ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); - } -} - -void HierarchyList::removeTabPage() -{ - TQObject *o = current(); - if ( !o || !o->isWidgetType() ) - return; - TQWidget *w = (TQWidget*)o; - if ( ::tqqt_cast(w) ) { - TQTabWidget *tw = (TQTabWidget*)w; - if ( tw->currentPage() ) { - QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw; - DeleteTabPageCommand *cmd = - new DeleteTabPageCommand( i18n( "Delete Page %1 of %2" ). - arg( dtw->pageTitle() ).arg( tw->name() ), - formWindow, tw, tw->currentPage() ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); - } - } else if ( ::tqqt_cast(w) ) { - TQWizard *wiz = (TQWizard*)formWindow->mainContainer(); - if ( wiz->currentPage() ) { - QDesignerWizard *dw = (QDesignerWizard*)wiz; - DeleteWizardPageCommand *cmd = - new DeleteWizardPageCommand( i18n( "Delete Page %1 of %2" ). - arg( dw->pageTitle() ).arg( wiz->name() ), - formWindow, wiz, - wiz->indexOf( wiz->currentPage() ), TRUE ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); - } - } -} - -// ------------------------------------------------------------ - -FormDefinitionView::FormDefinitionView( TQWidget *parent, FormWindow *fw ) - : HierarchyList( parent, fw, TRUE ) -{ - header()->hide(); - removeColumn( 1 ); - connect( this, TQT_SIGNAL( itemRenamed( TQListViewItem *, int, const TQString & ) ), - this, TQT_SLOT( renamed( TQListViewItem * ) ) ); - popupOpen = FALSE; -} - -void FormDefinitionView::setup() -{ - if ( popupOpen || !formWindow ) - return; - if ( !formWindow->project()->isCpp() ) - return; - TQListViewItem *i = firstChild(); - while ( i ) { - if ( i->rtti() == HierarchyItem::DefinitionParent ) { - TQListViewItem *a = i; - i = i->nextSibling(); - delete a; - continue; - } - i = i->nextSibling(); - } - - LanguageInterface *lIface = MetaDataBase::languageInterface( formWindow->project()->language() ); - if ( lIface ) { - TQStringList defs = lIface->definitions(); - for ( TQStringList::Iterator dit = defs.begin(); dit != defs.end(); ++dit ) { - HierarchyItem *itemDef = new HierarchyItem( HierarchyItem::DefinitionParent, this, 0, - i18n( *dit ), TQString(), TQString() ); - itemDef->setPixmap( 0, DesignerFolderPix ); - itemDef->setOpen( TRUE ); - TQStringList entries = - lIface->definitionEntries( *dit, formWindow->mainWindow()->designerInterface() ); - HierarchyItem *item = 0; - for ( TQStringList::Iterator eit = entries.begin(); eit != entries.end(); ++eit ) { - item = new HierarchyItem( HierarchyItem::Definition, - itemDef, item, *eit, TQString(), TQString() ); - item->setRenameEnabled( 0, TRUE ); - } - } - lIface->release(); - } - setupVariables(); - refresh(); -} - -void FormDefinitionView::setupVariables() -{ - bool pubOpen, protOpen, privOpen; - pubOpen = protOpen = privOpen = TRUE; - TQListViewItem *i = firstChild(); - while ( i ) { - if ( i->rtti() == HierarchyItem::VarParent ) { - TQListViewItem *a = i; - i = i->firstChild(); - while ( i ) { - if ( i->rtti() == HierarchyItem::VarPublic ) - pubOpen = i->isOpen(); - else if ( i->rtti() == HierarchyItem::VarProtected ) - protOpen = i->isOpen(); - else if ( i->rtti() == HierarchyItem::VarPrivate ) - privOpen = i->isOpen(); - i = i->nextSibling(); - } - delete a; - break; - } - i = i->nextSibling(); - } - - HierarchyItem *itemVar = new HierarchyItem( HierarchyItem::VarParent, this, 0, i18n( "Class Variables" ), - TQString(), TQString() ); - itemVar->setPixmap( 0, DesignerFolderPix ); - itemVar->setOpen( TRUE ); - - itemVarPriv = new HierarchyItem( HierarchyItem::VarPrivate, itemVar, 0, i18n( "private" ), - TQString(), TQString() ); - itemVarProt = new HierarchyItem( HierarchyItem::VarProtected, itemVar, 0, i18n( "protected" ), - TQString(), TQString() ); - itemVarPubl = new HierarchyItem( HierarchyItem::VarPublic, itemVar, 0, i18n( "public" ), - TQString(), TQString() ); - - TQValueList varList = MetaDataBase::variables( TQT_TQOBJECT(formWindow) ); - TQValueList::Iterator it = --( varList.end() ); - if ( !varList.isEmpty() && itemVar ) { - for (;;) { - TQListViewItem *item = 0; - if ( (*it).varAccess == "public" ) - item = new HierarchyItem( HierarchyItem::Variable, itemVarPubl, 0, (*it).varName, - TQString(), TQString() ); - else if ( (*it).varAccess == "private" ) - item = new HierarchyItem( HierarchyItem::Variable, itemVarPriv, 0, (*it).varName, - TQString(), TQString() ); - else // default is protected - item = new HierarchyItem( HierarchyItem::Variable, itemVarProt, 0, (*it).varName, - TQString(), TQString() ); - item->setPixmap( 0, DesignerEditSlotsPix ); - if ( it == varList.begin() ) - break; - --it; - } - } - itemVar->setOpen( TRUE ); - itemVarPriv->setOpen( privOpen ); - itemVarProt->setOpen( protOpen ); - itemVarPubl->setOpen( pubOpen ); -} - -void FormDefinitionView::refresh() -{ - if ( popupOpen || !formWindow || !formWindow->project()->isCpp() ) - return; - - bool fuPub, fuProt, fuPriv, slPub, slProt, slPriv; - fuPub = fuProt = fuPriv = slPub = slProt = slPriv = TRUE; - TQListViewItem *i = firstChild(); - while ( i ) { - if ( i->rtti() == HierarchyItem::SlotParent || - i->rtti() == HierarchyItem::FunctParent ) { - TQListViewItem *a = i; - i = i->firstChild(); - while ( i ) { - switch( i->rtti() ) { - case HierarchyItem::FunctPublic: - fuPub = i->isOpen(); - case HierarchyItem::FunctProtected: - fuProt = i->isOpen(); - break; - case HierarchyItem::FunctPrivate: - fuPriv = i->isOpen(); - break; - case HierarchyItem::SlotPublic: - slPub = i->isOpen(); - if ( slPub ) - break; - case HierarchyItem::SlotProtected: - slProt = i->isOpen(); - break; - case HierarchyItem::SlotPrivate: - slPriv = i->isOpen(); - } - i = i->nextSibling(); - } - i = a->nextSibling(); - delete a; - continue; - } - i = i->nextSibling(); - } - - - itemFunct = new HierarchyItem( HierarchyItem::FunctParent, - this, 0, i18n( "Functions" ), TQString(), TQString() ); - itemFunct->moveItem( i ); - itemFunct->setPixmap( 0, DesignerFolderPix ); - itemFunctPriv = new HierarchyItem( HierarchyItem::FunctPrivate, itemFunct, 0, - i18n( "private" ), TQString(), TQString() ); - itemFunctProt = new HierarchyItem( HierarchyItem::FunctProtected, itemFunct, 0, - i18n( "protected" ), TQString(), TQString() ); - itemFunctPubl = new HierarchyItem( HierarchyItem::FunctPublic, itemFunct, 0, - i18n( "public" ), TQString(), TQString() ); - - itemSlots = new HierarchyItem( HierarchyItem::SlotParent, - this, 0, i18n( "Slots" ), TQString(), TQString() ); - itemSlots->setPixmap( 0, DesignerFolderPix ); - itemPrivate = new HierarchyItem( HierarchyItem::SlotPrivate, itemSlots, 0, i18n( "private" ), - TQString(), TQString() ); - itemProtected = new HierarchyItem( HierarchyItem::SlotProtected, itemSlots, 0, i18n( "protected" ), - TQString(), TQString() ); - itemPublic = new HierarchyItem( HierarchyItem::SlotPublic, itemSlots, 0, i18n( "public" ), - TQString(), TQString() ); - - TQValueList functionList = MetaDataBase::functionList( TQT_TQOBJECT(formWindow) ); - TQValueList::Iterator it = --( functionList.end() ); - if ( !functionList.isEmpty() && itemFunct ) { - for (;;) { - TQListViewItem *item = 0; - if ( (*it).type == "slot" ) { - if ( (*it).access == "protected" ) - item = new HierarchyItem( HierarchyItem::Slot, itemProtected, 0, (*it).function, - TQString(), TQString() ); - else if ( (*it).access == "private" ) - item = new HierarchyItem( HierarchyItem::Slot, itemPrivate, 0, (*it).function, - TQString(), TQString() ); - else // default is public - item = new HierarchyItem( HierarchyItem::Slot, itemPublic, 0, (*it).function, - TQString(), TQString() ); - } else { - if ( (*it).access == "protected" ) - item = new HierarchyItem( HierarchyItem::Function, itemFunctProt, 0, (*it).function, - TQString(), TQString() ); - else if ( (*it).access == "private" ) - item = new HierarchyItem( HierarchyItem::Function, itemFunctPriv, 0, (*it).function, - TQString(), TQString() ); - else // default is public - item = new HierarchyItem( HierarchyItem::Function, itemFunctPubl, 0, (*it).function, - TQString(), TQString() ); - } - item->setPixmap( 0, DesignerEditSlotsPix ); - if ( it == functionList.begin() ) - break; - --it; - } - } - - itemFunct->setOpen( TRUE ); - itemFunctPubl->setOpen( fuPub ); - itemFunctProt->setOpen( fuProt ); - itemFunctPriv->setOpen( fuPriv ); - - itemSlots->setOpen( TRUE ); - itemPublic->setOpen( slPub ); - itemProtected->setOpen( slProt ); - itemPrivate->setOpen( slPriv ); -} - - -void FormDefinitionView::setCurrent( TQWidget * ) -{ -} - -void FormDefinitionView::objectClicked( TQListViewItem *i ) -{ - if ( !i ) - return; - if ( (i->rtti() == HierarchyItem::Slot) || (i->rtti() == HierarchyItem::Function) ) - { - formWindow->clearSelection(false); - formWindow->mainWindow()->part()->emitEditFunction(formWindow->fileName(), i->text( 0 )); - } -// formWindow->mainWindow()->editFunction( i->text( 0 ) ); -} - -static HierarchyItem::Type getChildType( int type ) -{ - switch ( (HierarchyItem::Type)type ) { - case HierarchyItem::Widget: - tqWarning( "getChildType: Inserting childs dynamically to Widget or SlotParent is not allowed!" ); - break; - case HierarchyItem::SlotParent: - case HierarchyItem::SlotPublic: - case HierarchyItem::SlotProtected: - case HierarchyItem::SlotPrivate: - case HierarchyItem::Slot: - return HierarchyItem::Slot; - case HierarchyItem::DefinitionParent: - case HierarchyItem::Definition: - return HierarchyItem::Definition; - case HierarchyItem::Event: - case HierarchyItem::EventFunction: - return HierarchyItem::Event; - case HierarchyItem::FunctParent: - case HierarchyItem::FunctPublic: - case HierarchyItem::FunctProtected: - case HierarchyItem::FunctPrivate: - case HierarchyItem::Function: - return HierarchyItem::Function; - case HierarchyItem::VarParent: - case HierarchyItem::VarPublic: - case HierarchyItem::VarProtected: - case HierarchyItem::VarPrivate: - case HierarchyItem::Variable: - return HierarchyItem::Variable; - } - return (HierarchyItem::Type)type; -} - -void HierarchyList::insertEntry( TQListViewItem *i, const TQPixmap &pix, const TQString &s ) -{ - TQListViewItem *after = i->firstChild(); - while ( after && after->nextSibling() ) - after = after->nextSibling(); - HierarchyItem *item = new HierarchyItem( getChildType( i->rtti() ), i, after, s, - TQString(), TQString() ); - if ( !pix.isNull() ) - item->setPixmap( 0, pix ); - item->setRenameEnabled( 0, TRUE ); - setCurrentItem( item ); - ensureItemVisible( item ); - tqApp->processEvents(); - newItem = item; - item->startRename( 0 ); -} - -void FormDefinitionView::contentsMouseDoubleClickEvent( TQMouseEvent *e ) -{ - TQListViewItem *i = itemAt( contentsToViewport( e->pos() ) ); - if ( !i ) - return; - - if ( i->rtti() == HierarchyItem::SlotParent || i->rtti() == HierarchyItem::FunctParent || - i->rtti() == HierarchyItem::VarParent ) - return; - - HierarchyItem::Type t = getChildType( i->rtti() ); - if ( (int)t == i->rtti() ) - i = i->parent(); - - if ( formWindow->project()->isCpp() ) - switch( i->rtti() ) { - case HierarchyItem::FunctPublic: - execFunctionDialog( "public", "function", TRUE ); - break; - case HierarchyItem::FunctProtected: - execFunctionDialog( "protected", "function", TRUE ); - break; - case HierarchyItem::FunctPrivate: - execFunctionDialog( "private", "function", TRUE ); - break; - case HierarchyItem::SlotPublic: - execFunctionDialog( "public", "slot", TRUE ); - break; - case HierarchyItem::SlotProtected: - execFunctionDialog( "protected", "slot", TRUE ); - break; - case HierarchyItem::SlotPrivate: - execFunctionDialog( "private", "slot", TRUE ); - break; - case HierarchyItem::VarPublic: - case HierarchyItem::VarProtected: - case HierarchyItem::VarPrivate: { - VariableDialog varDia( formWindow, this ); - TQListViewItem *i = selectedItem(); - if ( i ) - varDia.setCurrentItem( i->text( 0 ) ); - varDia.exec(); - break; - } - default: - insertEntry( i ); - } else - insertEntry( i ); -} - -void FormDefinitionView::execFunctionDialog( const TQString &access, const TQString &type, bool addFunc ) -{ - FormFile *formFile = formWindow->formFile(); - if ( !formFile || !formFile->isUihFileUpToDate() ) - return; - - // refresh the functions list in the metadatabase - SourceEditor *editor = formFile->editor(); - if ( editor ) - editor->refresh( TRUE ); - - EditFunctions dlg( this, formWindow ); - if ( addFunc ) - dlg.functionAdd( access, type ); - dlg.exec(); -} - -void FormDefinitionView::showRMBMenu( TQListViewItem *i, const TQPoint &pos ) -{ - if ( !i ) - return; - - const int EDIT = 1; - const int NEW = 2; - const int DEL = 3; - const int PROPS = 4; - const int GOIMPL = 5; - - TQPopupMenu menu; - bool insertDelete = FALSE; - - if ( i->rtti() == HierarchyItem::FunctParent || i->rtti() == HierarchyItem::SlotParent || - i->rtti() == HierarchyItem::VarParent ) { - menu.insertItem( SmallIcon( "designer_editslots.png" , TDevDesignerPartFactory::instance()), i18n( "Edit..." ), EDIT ); - } else - menu.insertItem( SmallIcon( "designer_filenew.png" , TDevDesignerPartFactory::instance()), i18n( "New..." ), NEW ); - if ( i->rtti() == HierarchyItem::DefinitionParent || i->rtti() == HierarchyItem::Variable || - i->rtti() == HierarchyItem::Definition ) { - menu.insertItem( SmallIcon( "designer_editslots.png" , TDevDesignerPartFactory::instance()), i18n( "Edit..." ), EDIT ); - } - if ( i->rtti() == HierarchyItem::Function || i->rtti() == HierarchyItem::Slot ) { - if ( formWindow->project()->isCpp() ) - menu.insertItem( SmallIcon( "designer_editslots.png" , TDevDesignerPartFactory::instance()), i18n( "Properties" ), PROPS ); - if ( MetaDataBase::hasEditor( formWindow->project()->language() ) ) - menu.insertItem( i18n( "Goto Implementation" ), GOIMPL ); - insertDelete = TRUE; - } - if ( insertDelete || i->rtti() == HierarchyItem::Variable || - i->rtti() == HierarchyItem::Function || i->rtti() == HierarchyItem::Slot || - i->rtti() == HierarchyItem::Definition ) { - menu.insertSeparator(); - menu.insertItem( SmallIcon( "designer_editcut.png" , TDevDesignerPartFactory::instance()), i18n( "Delete" ), DEL ); - } - popupOpen = TRUE; - int res = menu.exec( pos ); - popupOpen = FALSE; - if ( res == -1 ) - return; - - if ( res == EDIT ) { - switch( i->rtti() ) { - case HierarchyItem::FunctParent: - execFunctionDialog( "public", "function", FALSE ); - break; - case HierarchyItem::SlotParent: - execFunctionDialog( "public", "slot", FALSE ); - break; - case HierarchyItem::VarParent: - case HierarchyItem::VarPublic: - case HierarchyItem::VarProtected: - case HierarchyItem::VarPrivate: - case HierarchyItem::Variable: { - VariableDialog varDia( formWindow, this ); - TQListViewItem *i = selectedItem(); - if ( i ) - varDia.setCurrentItem( i->text( 0 ) ); - if ( varDia.exec() == TQDialog::Accepted ) - formWindow->commandHistory()->setModified( TRUE ); - break; - } - case HierarchyItem::Definition: - case HierarchyItem::DefinitionParent: - LanguageInterface *lIface = MetaDataBase::languageInterface( formWindow->project()->language() ); - if ( !lIface ) - return; - if ( i->rtti() == HierarchyItem::Definition ) - i = i->parent(); - ListEditor dia( this, 0, TRUE ); - dia.setCaption( i18n( "Edit %1" ).arg( i->text( 0 ) ) ); - TQStringList entries = lIface->definitionEntries( i->text( 0 ), MainWindow::self->designerInterface() ); - dia.setList( entries ); - dia.exec(); - Command *cmd = new EditDefinitionsCommand( i18n( "Edit %1" ).arg( i->text( 0 )), formWindow, - lIface, i->text( 0 ), dia.items() ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); - } - } else if ( res == NEW ) { - HierarchyItem::Type t = getChildType( i->rtti() ); - if ( (int)t == i->rtti() ) - i = i->parent(); - switch( i->rtti() ) { - case HierarchyItem::SlotPublic: - execFunctionDialog( "public", "slot", TRUE ); - break; - case HierarchyItem::SlotProtected: - execFunctionDialog( "protected", "slot", TRUE ); - break; - case HierarchyItem::SlotPrivate: - execFunctionDialog( "private" , "slot", TRUE ); - break; - case HierarchyItem::FunctPublic: - execFunctionDialog( "public", "function", TRUE ); - break; - case HierarchyItem::FunctProtected: - execFunctionDialog( "protected", "function", TRUE ); - break; - case HierarchyItem::FunctPrivate: - execFunctionDialog( "private" , "function", TRUE ); - break; - default: - insertEntry( i ); - } - } else if ( res == DEL ) { - if ( i->rtti() == HierarchyItem::Slot || i->rtti() == HierarchyItem::Function ) { - - TQCString funct( MetaDataBase::normalizeFunction( i->text( 0 ) ).latin1() ); - Command *cmd = new RemoveFunctionCommand( i18n( "Remove Function" ), formWindow, funct, - TQString(), TQString(), TQString(), - TQString(), formWindow->project()->language() ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); - formWindow->mainWindow()->objectHierarchy()->updateFormDefinitionView(); - } else if ( i->rtti() == HierarchyItem::Variable ) { - Command *cmd = new RemoveVariableCommand( i18n( "Remove Variable" ), formWindow, - i->text( 0 ) ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); - } else { - TQListViewItem *p = i->parent(); - delete i; - save( p, 0 ); - } - } else if ( res == PROPS ) { - if ( i->rtti() == HierarchyItem::Slot || - i->rtti() == HierarchyItem::Function ) { - EditFunctions dlg( this, formWindow ); - dlg.setCurrentFunction( MetaDataBase::normalizeFunction( i->text( 0 ) ) ); - dlg.exec(); - } - } else if ( res == GOIMPL ) { - if ( i->rtti() == HierarchyItem::Slot || - i->rtti() == HierarchyItem::Function ) { - formWindow->clearSelection(false); - formWindow->mainWindow()->part()->emitEditFunction(formWindow->fileName(), i->text( 0 )); -// formWindow->mainWindow()->editFunction( i->text( 0 ) ); - } - } -} - -void FormDefinitionView::renamed( TQListViewItem *i ) -{ - if ( newItem == i ) - newItem = 0; - if ( !i->parent() ) - return; - save( i->parent(), i ); -} - - -void FormDefinitionView::save( TQListViewItem *p, TQListViewItem *i ) -{ - if ( i && i->text( 0 ).isEmpty() ) { - delete i; - return; - } - - if ( i && i->rtti() == HierarchyItem::Variable ) { - i->setRenameEnabled( 0, FALSE ); - TQString varName = i->text( 0 ); - varName = varName.simplifyWhiteSpace(); - if ( varName[(int)varName.length() - 1] != ';' ) - varName += ";"; - if ( MetaDataBase::hasVariable( TQT_TQOBJECT(formWindow), varName ) ) { - TQMessageBox::information( this, i18n( "Edit Variables" ), - i18n( "This variable has already been declared." ) ); - } else { - if ( p->rtti() == HierarchyItem::VarPublic ) - addVariable( varName, "public" ); - else if ( p->rtti() == HierarchyItem::VarProtected ) - addVariable( varName, "protected" ); - else if ( p->rtti() == HierarchyItem::VarPrivate ) - addVariable( varName, "private" ); - } - } else { - LanguageInterface *lIface = MetaDataBase::languageInterface( formWindow->project()->language() ); - if ( !lIface ) - return; - TQStringList lst; - i = p->firstChild(); - while ( i ) { - lst << i->text( 0 ); - i = i->nextSibling(); - } - Command *cmd = new EditDefinitionsCommand( i18n( "Edit %1" ).arg( p->text( 0 ) ), formWindow, - lIface, p->text( 0 ), lst ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); - } -} - -void FormDefinitionView::addVariable( const TQString &varName, const TQString &access ) -{ - Command *cmd = new AddVariableCommand( i18n( "Add Variable" ), formWindow, - varName, access ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); -} - -// ------------------------------------------------------------ - -HierarchyView::HierarchyView( TQWidget *parent ) - : TQTabWidget( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | - WStyle_Tool |WStyle_MinMax | WStyle_SysMenu ) -{ - formwindow = 0; - editor = 0; - listview = new HierarchyList( this, formWindow() ); - fView = new FormDefinitionView( this, formWindow() ); - if ( !MainWindow::self->singleProjectMode() ) { - addTab( listview, i18n( "Objects" ) ); - setTabToolTip( listview, i18n( "List of all widgets and objects of the current form in hierarchical order" ) ); - addTab( fView, i18n( "Members" ) ); - setTabToolTip( fView, i18n( "List of all members of the current form" ) ); - } else { - listview->hide(); - fView->hide(); - } - - if ( !classBrowserInterfaceManager ) { - classBrowserInterfaceManager = - new TQPluginManager( IID_ClassBrowser, TQApplication::libraryPaths(), - MainWindow::self->pluginDirectory() ); - } - - classBrowsers = new TQMap(); - TQStringList langs = MetaDataBase::languages(); - for ( TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it ) { - TQInterfacePtr ciface = 0; - classBrowserInterfaceManager->queryInterface( *it, &ciface ); - if ( ciface ) { - ClassBrowser cb( ciface->createClassBrowser( this ), ciface ); - addTab( cb.lv, i18n( "Class Declarations" ) ); - setTabToolTip( cb.lv, i18n( "List of all classes and its declarations of the current source file" ) ); - ciface->onClick( TQT_TQOBJECT(this), TQT_SLOT( jumpTo( const TQString &, const TQString &, int ) ) ); - classBrowsers->insert( *it, cb ); - setTabEnabled( cb.lv, FALSE ); - } - } -} - -HierarchyView::~HierarchyView() -{ -} - -void HierarchyView::clear() -{ - listview->clear(); - fView->clear(); - for ( TQMap::Iterator it = classBrowsers->begin(); - it != classBrowsers->end(); ++it ) { - (*it).iface->clear(); - } -} - -void HierarchyView::setFormWindow( FormWindow *fw, TQObject *o ) -{ - bool fake = fw && qstrcmp( fw->name(), "qt_fakewindow" ) == 0; - if ( fw == 0 || o == 0 ) { - listview->clear(); - fView->clear(); - listview->setFormWindow( fw ); - fView->setFormWindow( fw ); - formwindow = 0; - editor = 0; - } - - setTabEnabled( listview, TRUE ); - setTabEnabled( fView, fw && fw->project()->isCpp() ); - - if ( fw == formwindow ) { - if ( fw ) { - if ( !fake ) - listview->setCurrent( TQT_TQOBJECT(o) ); - else - listview->clear(); - if ( MainWindow::self->qWorkspace()->activeWindow() == fw ) - showPage( listview ); - else if ( fw->project()->isCpp() ) - showPage( fView ); - else - showClasses( fw->formFile()->editor() ); - } - } - - formwindow = fw; - if ( !fake ) { - listview->setFormWindow( fw ); - } else { - listview->setFormWindow( 0 ); - listview->clear(); - } - - fView->setFormWindow( fw ); - if ( !fake ) { - listview->setup(); - listview->setCurrent( TQT_TQOBJECT(o) ); - } - fView->setup(); - - for ( TQMap::Iterator it = classBrowsers->begin(); - it != classBrowsers->end(); ++it ) { - (*it).iface->clear(); - setTabEnabled( (*it).lv, fw && !fw->project()->isCpp() ); - } - - if ( MainWindow::self->qWorkspace()->activeWindow() == fw ) - showPage( listview ); - else if ( fw && fw->project()->isCpp() ) - showPage( fView ); - else if ( fw ) - showClasses( fw->formFile()->editor() ); - - editor = 0; -} - -void HierarchyView::showClasses( SourceEditor *se ) -{ - if ( !se->object() ) - return; - - lastSourceEditor = se; - TQTimer::singleShot( 100, this, TQT_SLOT( showClassesTimeout() ) ); -} - -void HierarchyView::showClassesTimeout() -{ - if ( !lastSourceEditor ) - return; - SourceEditor *se = (SourceEditor*)lastSourceEditor; - if ( !se->object() ) - return; - if ( se->formWindow() && se->formWindow()->project()->isCpp() ) { - setFormWindow( se->formWindow(), TQT_TQOBJECT(se->formWindow()->currentWidget()) ); - MainWindow::self->propertyeditor()->setWidget( TQT_TQOBJECT(se->formWindow()->currentWidget()), - se->formWindow() ); - return; - } - - setTabEnabled( listview, !!se->formWindow() && !se->formWindow()->isFake() ); - setTabEnabled( fView, FALSE ); - - formwindow = 0; - listview->setFormWindow( 0 ); - fView->setFormWindow( 0 ); - listview->clear(); - fView->clear(); - if ( !se->formWindow() ) - MainWindow::self->propertyeditor()->setWidget( 0, 0 ); - editor = se; - - for ( TQMap::Iterator it = classBrowsers->begin(); - it != classBrowsers->end(); ++it ) { - if ( it.key() == se->project()->language() ) { - (*it).iface->update( se->text() ); - setTabEnabled( (*it).lv, TRUE ); - showPage( (*it).lv ); - } else { - setTabEnabled( (*it).lv, FALSE ); - (*it).iface->clear(); - } - } -} - -void HierarchyView::updateClassBrowsers() -{ - if ( !editor ) - return; - for ( TQMap::Iterator it = classBrowsers->begin(); - it != classBrowsers->end(); ++it ) { - if ( it.key() == editor->project()->language() ) - (*it).iface->update( editor->text() ); - else - (*it).iface->clear(); - } -} - -FormWindow *HierarchyView::formWindow() const -{ - return formwindow; -} - -void HierarchyView::closeEvent( TQCloseEvent *e ) -{ - emit hidden(); - e->accept(); -} - -void HierarchyView::widgetInserted( TQWidget * ) -{ - listview->setup(); -} - -void HierarchyView::widgetRemoved( TQWidget * ) -{ - listview->setup(); -} - -void HierarchyView::widgetsInserted( const TQWidgetList & ) -{ - listview->setup(); -} - -void HierarchyView::widgetsRemoved( const TQWidgetList & ) -{ - listview->setup(); -} - -void HierarchyView::namePropertyChanged( TQWidget *w, const TQVariant & ) -{ - TQWidget *w2 = w; - if ( ::tqqt_cast(w) ) - w2 = ( (TQMainWindow*)w )->centralWidget(); - listview->changeNameOf( TQT_TQOBJECT(w2), w->name() ); -} - - -void HierarchyView::databasePropertyChanged( TQWidget *w, const TQStringList& info ) -{ -#ifndef TQT_NO_SQL - TQString i = info.join( "." ); - listview->changeDatabaseOf( TQT_TQOBJECT(w), i ); -#endif -} - - -void HierarchyView::tabsChanged( TQTabWidget * ) -{ - listview->setup(); -} - -void HierarchyView::pagesChanged( TQWizard * ) -{ - listview->setup(); -} - -void HierarchyView::rebuild() -{ - listview->setup(); -} - -void HierarchyView::closed( FormWindow *fw ) -{ - if ( fw == formwindow ) { - listview->clear(); - fView->clear(); - } -} - -void HierarchyView::updateFormDefinitionView() -{ - fView->setup(); -} - -void HierarchyView::jumpTo( const TQString &func, const TQString &clss, int type ) -{ - if ( !editor ) - return; - if ( type == ClassBrowserInterface::Class ) - editor->setClass( func ); - else - editor->setFunction( func, clss ); -} - -HierarchyView::ClassBrowser::ClassBrowser( TQListView *l, ClassBrowserInterface *i ) - : lv( l ), iface( i ) -{ -} - -HierarchyView::ClassBrowser::~ClassBrowser() -{ -} diff --git a/tdevdesigner/designer/mainwindow.cpp b/tdevdesigner/designer/mainwindow.cpp deleted file mode 100644 index 3f53e004..00000000 --- a/tdevdesigner/designer/mainwindow.cpp +++ /dev/null @@ -1,3784 +0,0 @@ - /********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "designerappiface.h" -#include "designerapp.h" - -#include "mainwindow.h" -#include "defs.h" -#include "globaldefs.h" -#include "formwindow.h" -#include "widgetdatabase.h" -#include "widgetfactory.h" -#include "propertyeditor.h" -#include "metadatabase.h" -#include "resource.h" -#include "hierarchyview.h" -#include "newformimpl.h" -#include "workspace.h" -#include "about.h" -#include "multilineeditorimpl.h" -#include "wizardeditorimpl.h" -#include "outputwindow.h" -#include "actioneditorimpl.h" -#include "actiondnd.h" -#include "project.h" -#include "projectsettingsimpl.h" -#include "tqwidgetfactory.h" -#include "pixmapcollection.h" -#include "qcompletionedit.h" -#include "sourcefile.h" -#include "orderindicator.h" -#include -#include "widgetaction.h" -#include "propertyobject.h" -#include "popupmenueditor.h" -#include "menubareditor.h" - -#include "startdialog.h" -#include "createtemplate.h" -#include "editfunctions.h" -//#include "connectionviewer.h" -#include "formsettings.h" -#include "preferences.h" -#include "pixmapcollectioneditor.h" -#ifndef TQT_NO_SQL -#include "dbconnectionimpl.h" -#endif -//#include "connectioneditor.h" -#include "customwidgeteditorimpl.h" -#include "paletteeditorimpl.h" -#include "listboxeditorimpl.h" -#include "listvieweditorimpl.h" -#include "iconvieweditorimpl.h" -#include "tableeditorimpl.h" -#include "multilineeditor.h" -#include "finddialog.h" -#include "replacedialog.h" -#include "gotolinedialog.h" -#include "designeraction.h" - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "tdevdesigner_part.h" - -static bool mblockNewForms = FALSE; -extern TQMap *qwf_forms; -extern TQString *qwf_language; -extern bool qwf_execute_code; -extern bool qwf_stays_on_top; -extern void set_splash_status( const TQString &txt ); -extern TQObject* qwf_form_object; -extern TQString *qwf_plugin_dir; - -MainWindow *MainWindow::self = 0; - -TQString assistantPath() -{ - TQString path = TQDir::cleanDirPath( TQString( tqInstallPathBins() ) + - TQDir::separator() ); - return path; -} - - -static TQString textNoAccel( const TQString& text) -{ - TQString t = text; - int i; - while ( (i = t.find('&') )>= 0 ) { - t.remove(i,1); - } - return t; -} - - -MainWindow::MainWindow( TDevDesignerPart *part, bool asClient, bool single, const TQString &plgDir ) - : TQMainWindow( 0, "designer_mainwindow"/*, WType_TopLevel | (single ? 0 : WDestructiveClose) | WGroupLeader*/ ), - grd( 10, 10 ), sGrid( TRUE ), snGrid( TRUE ), restoreConfig( TRUE ), splashScreen( TRUE ), - fileFilter( i18n( "TQt User-Interface Files (*.ui)" ) ), client( asClient ), - previewing( FALSE ), databaseAutoEdit( FALSE ), autoSaveEnabled( FALSE ), autoSaveInterval( 1800 ), m_part(part) -{ -// extern void qInitImages_designercore(); -// qInitImages_designercore(); - - self = this; - setPluginDirectory( plgDir ); - customWidgetToolBar = customWidgetToolBar2 = 0; - guiStuffVisible = TRUE; - editorsReadOnly = FALSE; - sSignalHandlers = TRUE; - init_colors(); - shStartDialog = FALSE; - - desInterface = new DesignerInterfaceImpl( this ); - desInterface->addRef(); - inDebugMode = FALSE; - savePluginPaths = FALSE; - - updateFunctionsTimer = new TQTimer( this ); - connect( updateFunctionsTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( doFunctionsChanged() ) ); - - autoSaveTimer = new TQTimer( this ); - connect( autoSaveTimer, TQT_SIGNAL( timeout() ), - this, TQT_SLOT( fileSaveAll() ) ); - - set_splash_status( "Loading Plugins..." ); - setupPluginManagers(); - -/* if ( !single ) - tqApp->setMainWidget( this );*/ - TQWidgetFactory::addWidgetFactory( new CustomWidgetFactory ); -#ifndef TQ_WS_MACX - setIcon( BarIcon( "designer_appicon.png", TDevDesignerPartFactory::instance() ) ); -#endif - - actionGroupTools = 0; - prefDia = 0; - windowMenu = 0; - hierarchyView = 0; - actionEditor = 0; - currentProject = 0; - wspace = 0; - oWindow = 0; - singleProject = single; - - statusBar()->clear(); -#if defined(TQT_NON_COMMERCIAL) - statusBar()->addWidget( new TQLabel(i18n("Ready - This is the non-commercial version of TQt - " - "For commercial evaluations, use the help menu to register with Trolltech."), statusBar()), 1 ); -#else - statusBar()->addWidget( new TQLabel("Ready", statusBar()), 1 ); -#endif - - - set_splash_status( "Setting up GUI..." ); - setupMDI(); - setupMenuBar(); - - setupToolbox(); - - setupFileActions(); - setupEditActions(); - setupProjectActions(); - setupSearchActions(); - layoutToolBar = new TQToolBar( this, "Layout" ); - layoutToolBar->setCloseMode( TQDockWindow::Undocked ); - addToolBar( layoutToolBar, i18n( "Layout" ) ); - interpreterPluginManager = 0; - setupToolActions(); - setupLayoutActions(); - setupPreviewActions(); - setupOutputWindow(); - setupActionManager(); - setupWindowActions(); - - setupWorkspace(); - setupHierarchyView(); - setupPropertyEditor(); - setupActionEditor(); - - setupHelpActions(); - - setupRMBMenus(); - - connect( this, TQT_SIGNAL( projectChanged() ), this, TQT_SLOT( emitProjectSignals() ) ); - connect( this, TQT_SIGNAL( hasActiveWindow(bool) ), this, TQT_SLOT( emitProjectSignals() ) ); - - emit hasActiveForm( FALSE ); - emit hasActiveWindow( FALSE ); - - lastPressWidget = 0; - tqApp->installEventFilter( this ); - - TQSize as( tqApp->desktop()->size() ); - as -= TQSize( 30, 30 ); - resize( TQSize( 1200, 1000 ).boundedTo( as ) ); - - connect( tqApp->clipboard(), TQT_SIGNAL( dataChanged() ), - this, TQT_SLOT( clipboardChanged() ) ); - clipboardChanged(); - layoutChilds = FALSE; - layoutSelected = FALSE; - breakLayout = FALSE; - backPix = TRUE; - - set_splash_status( "Loading User Settings..." ); - readConfig(); - // hack to make WidgetFactory happy (so it knows TQWidget and TQDialog for resetting properties) - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQWIDGET_OBJECT_NAME_STRING ), this, 0, FALSE ); - delete w; - w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQDIALOG_OBJECT_NAME_STRING ), this, 0, FALSE ); - delete w; - w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQLABEL_OBJECT_NAME_STRING ), this, 0, FALSE ); - delete w; - w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQTABWIDGET_OBJECT_NAME_STRING ), this, 0, FALSE ); - delete w; - w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQFRAME_OBJECT_NAME_STRING ), this, 0, FALSE ); - delete w; - setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), FALSE ); - actionEditor->parentWidget()->hide(); - - assistant = new TQAssistantClient( assistantPath(), TQT_TQOBJECT(this) ); - - statusBar()->setSizeGripEnabled( TRUE ); - set_splash_status( "Initialization Done." ); -/* if ( shStartDialog ) - TQTimer::singleShot( 0, this, TQT_SLOT( showStartDialog() ));*/ - - if ( autoSaveEnabled ) - autoSaveTimer->start( autoSaveInterval * 1000 ); - - setFocusPolicy( TQ_StrongFocus ); -} - -MainWindow::~MainWindow() -{ - TQValueList::Iterator tit; - for ( tit = preferenceTabs.begin(); tit != preferenceTabs.end(); ++tit ) { - Tab t = *tit; - delete t.w; - } - for ( tit = projectTabs.begin(); tit != projectTabs.end(); ++tit ) { - Tab t = *tit; - delete t.w; - } - - TQMap< TQAction*, Project* >::Iterator it = projects.begin(); - while ( it != projects.end() ) { - Project *p = *it; - ++it; - delete p; - } - projects.clear(); - - delete oWindow; - oWindow = 0; - - desInterface->release(); - desInterface = 0; - - delete actionPluginManager; - delete preferencePluginManager; - delete projectSettingsPluginManager; - delete interpreterPluginManager; - delete templateWizardPluginManager; - delete editorPluginManager; - delete sourceTemplatePluginManager; - - MetaDataBase::clearDataBase(); - if(self == this) - self = 0; -} - -void MainWindow::setupMDI() -{ - TQVBox *vbox = new TQVBox( this ); - setCentralWidget( vbox ); - vbox->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); - vbox->setMargin( 1 ); - vbox->setLineWidth( 1 ); - qworkspace = new TQWorkspace( vbox ); - qworkspace->setPaletteBackgroundPixmap( UserIcon( "designer_background.png", TDevDesignerPartFactory::instance() ) ); - qworkspace->setScrollBarsEnabled( TRUE ); - connect( qworkspace, TQT_SIGNAL( windowActivated( TQWidget * ) ), - this, TQT_SLOT( activeWindowChanged( TQWidget * ) ) ); - lastActiveFormWindow = 0; - qworkspace->setAcceptDrops( TRUE ); -} - -void MainWindow::setupMenuBar() -{ - menubar = menuBar(); -} - -void MainWindow::setupPropertyEditor() -{ - TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); - dw->setResizeEnabled( TRUE ); - dw->setCloseMode( TQDockWindow::Always ); - propertyEditor = new PropertyEditor( dw ); - addToolBar( dw, TQt::DockRight ); - dw->setWidget( propertyEditor ); - dw->setFixedExtentWidth( 250 ); - dw->setCaption( i18n( "Property Editor/Signal Handlers" ) ); - TQWhatsThis::add( propertyEditor, - i18n("The Property Editor" - "

    You can change the appearance and behavior of the selected widget in the " - "property editor.

    " - "

    You can set properties for components and forms at design time and see the " - "immediately see the effects of the changes. " - "Each property has its own editor which (depending on the property) can be used " - "to enter " - "new values, open a special dialog, or to select values from a predefined list. " - "Click F1 to get detailed help for the selected property.

    " - "

    You can resize the columns of the editor by dragging the separators in the " - "list's header.

    " - "

    Signal Handlers

    " - "

    In the Signal Handlers tab you can define connections between " - "the signals emitted by widgets and the slots in the form. " - "(These connections can also be made using the connection tool.)" ) ); - dw->show(); -} - -void MainWindow::setupOutputWindow() -{ - TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); - dw->setResizeEnabled( TRUE ); - dw->setCloseMode( TQDockWindow::Always ); - addToolBar( dw, TQt::DockBottom ); - oWindow = new OutputWindow( dw ); - dw->setWidget( oWindow ); - dw->setFixedExtentHeight( 150 ); - dw->setCaption( i18n( "Output Window" ) ); -} - -void MainWindow::setupHierarchyView() -{ - if ( hierarchyView ) - return; - TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); - dw->setResizeEnabled( TRUE ); - dw->setCloseMode( TQDockWindow::Always ); - hierarchyView = new HierarchyView( dw ); - addToolBar( dw, TQt::DockRight ); - dw->setWidget( hierarchyView ); - - dw->setCaption( i18n( "Object Explorer" ) ); - dw->setFixedExtentWidth( 250 ); - TQWhatsThis::add( hierarchyView, - i18n("The Object Explorer" - "

    The Object Explorer provides an overview of the relationships " - "between the widgets in a form. You can use the clipboard functions using " - "a context menu for each item in the view. It is also useful for selecting widgets " - "in forms that have complex layouts.

    " - "

    The columns can be resized by dragging the separator in the list's header.

    " - "

    The second tab shows all the form's slots, class variables, includes, etc.

    ") ); - dw->show(); -} - -void MainWindow::setupWorkspace() -{ - TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); - dw->setResizeEnabled( TRUE ); - dw->setCloseMode( TQDockWindow::Always ); - TQVBox *vbox = new TQVBox( dw ); - QCompletionEdit *edit = new QCompletionEdit( vbox ); - TQToolTip::add( edit, i18n( "Start typing the buffer you want to switch to here (ALT+B)" ) ); - TQAccel *a = new TQAccel( this ); - a->connectItem( a->insertItem( ALT + Key_B ), edit, TQT_SLOT( setFocus() ) ); - wspace = new Workspace( vbox, this ); - wspace->setBufferEdit( edit ); - wspace->setCurrentProject( currentProject ); - addToolBar( dw, TQt::DockRight ); - dw->setWidget( vbox ); - - dw->setCaption( i18n( "Project Overview" ) ); - TQWhatsThis::add( wspace, i18n("The Project Overview Window" - "

    The Project Overview Window displays all the current " - "project, including forms and source files.

    " - "

    Use the search field to rapidly switch between files.

    ")); - dw->setFixedExtentHeight( 100 ); - dw->show(); -} - -void MainWindow::setupActionEditor() -{ - TQDockWindow *dw = new TQDockWindow( TQDockWindow::OutsideDock, this, 0 ); - addDockWindow( dw, TQt::DockTornOff ); - dw->setResizeEnabled( TRUE ); - dw->setCloseMode( TQDockWindow::Always ); - actionEditor = new ActionEditor( dw ); - dw->setWidget( actionEditor ); - actionEditor->show(); - dw->setCaption( i18n( "Action Editor" ) ); - TQWhatsThis::add( actionEditor, i18n("The Action Editor" - "

    The Action Editor is used to add actions and action groups to " - "a form, and to connect actions to slots. Actions and action " - "groups can be dragged into menus and into toolbars, and may " - "feature keyboard shortcuts and tooltips. If actions have pixmaps " - "these are displayed on toolbar buttons and besides their names in " - "menus.

    " ) ); - dw->hide(); - setAppropriate( dw, FALSE ); -} - -void MainWindow::setupToolbox() -{ - TQDockWindow *dw = new TQDockWindow( TQDockWindow::InDock, this ); - dw->setResizeEnabled( TRUE ); - dw->setCloseMode( TQDockWindow::Always ); - addToolBar( dw, TQt::DockLeft ); - toolBox = new TQToolBox( dw ); - dw->setWidget( toolBox ); - dw->setFixedExtentWidth( 160 ); - dw->setCaption( i18n( "Toolbox" ) ); - dw->show(); - setDockEnabled( dw, TQt::DockTop, FALSE ); - setDockEnabled( dw, TQt::DockBottom, FALSE ); - commonWidgetsToolBar = new TQToolBar( "Common Widgets", 0, toolBox, FALSE, "Common Widgets" ); - commonWidgetsToolBar->setFrameStyle( TQFrame::NoFrame ); - commonWidgetsToolBar->setOrientation( Qt::Vertical ); - commonWidgetsToolBar->setBackgroundMode(PaletteBase); - toolBox->addItem( commonWidgetsToolBar, "Common Widgets" ); -} - -void MainWindow::setupRMBMenus() -{ - rmbWidgets = new TQPopupMenu( this ); - actionEditCut->addTo( rmbWidgets ); - actionEditCopy->addTo( rmbWidgets ); - actionEditPaste->addTo( rmbWidgets ); - actionEditDelete->addTo( rmbWidgets ); -#if 0 - rmbWidgets->insertSeparator(); - actionEditLower->addTo( rmbWidgets ); - actionEditRaise->addTo( rmbWidgets ); -#endif - rmbWidgets->insertSeparator(); - actionEditAdjustSize->addTo( rmbWidgets ); - actionEditHLayout->addTo( rmbWidgets ); - actionEditVLayout->addTo( rmbWidgets ); - actionEditGridLayout->addTo( rmbWidgets ); - actionEditSplitHorizontal->addTo( rmbWidgets ); - actionEditSplitVertical->addTo( rmbWidgets ); - actionEditBreakLayout->addTo( rmbWidgets ); - rmbWidgets->insertSeparator(); - if ( !singleProjectMode() ) - actionEditConnections->addTo( rmbWidgets ); - actionEditSource->addTo( rmbWidgets ); - - rmbFormWindow = new TQPopupMenu( this ); - actionEditPaste->addTo( rmbFormWindow ); - actionEditSelectAll->addTo( rmbFormWindow ); - actionEditAccels->addTo( rmbFormWindow ); - rmbFormWindow->insertSeparator(); - actionEditAdjustSize->addTo( rmbFormWindow ); - actionEditHLayout->addTo( rmbFormWindow ); - actionEditVLayout->addTo( rmbFormWindow ); - actionEditGridLayout->addTo( rmbFormWindow ); - actionEditBreakLayout->addTo( rmbFormWindow ); - rmbFormWindow->insertSeparator(); - if ( !singleProjectMode() ) { - actionEditFunctions->addTo( rmbFormWindow ); - actionEditConnections->addTo( rmbFormWindow ); - } - actionEditSource->addTo( rmbFormWindow ); - rmbFormWindow->insertSeparator(); - actionEditFormSettings->addTo( rmbFormWindow ); -} - -void MainWindow::toolSelected( TQAction* action ) -{ - actionCurrentTool = action; - emit currentToolChanged(); - if ( formWindow() ) - formWindow()->commandHistory()->emitUndoRedo(); -} - -int MainWindow::currentTool() const -{ - if ( !actionCurrentTool ) - return POINTER_TOOL; - return TQString::fromLatin1(actionCurrentTool->name()).toInt(); -} - -void MainWindow::runProjectPrecondition() -{ - for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { - e->save(); - e->saveBreakPoints(); - } - fileSaveProject(); - - if ( currentTool() == ORDER_TOOL ) - resetTool(); - oWindow->clearErrorMessages(); - oWindow->clearDebug(); - oWindow->showDebugTab(); - previewing = TRUE; -} - -void MainWindow::runProjectPostcondition( TQObjectList *l ) -{ - inDebugMode = TRUE; - debuggingForms = *l; - enableAll( FALSE ); - for ( SourceEditor *e2 = sourceEditors.first(); e2; e2 = sourceEditors.next() ) { - if ( e2->project() == currentProject ) - e2->editorInterface()->setMode( EditorInterface::Debugging ); - } -} - -TQWidget* MainWindow::previewFormInternal( TQStyle* style, TQPalette* palet ) -{ - qwf_execute_code = FALSE; - for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) - e->save(); - if ( currentTool() == ORDER_TOOL ) - resetTool(); - - FormWindow *fw = formWindow(); - if ( !fw ) - return 0; - - TQStringList databases; - TQPtrDictIterator wit( *fw->widgets() ); - while ( wit.current() ) { - TQStringList lst = MetaDataBase::fakeProperty( TQT_TQOBJECT(wit.current()), "database" ).toStringList(); - if ( !lst.isEmpty() ) - databases << lst [ 0 ]; - ++wit; - } - - if ( fw->project() ) { - TQStringList::ConstIterator it; - for ( it = databases.begin(); it != databases.end(); ++it ) - fw->project()->openDatabase( *it, FALSE ); - } - TQApplication::setOverrideCursor( WaitCursor ); - - TQCString s; - TQBuffer buffer( s ); - buffer.open( IO_WriteOnly ); - Resource resource( this ); - resource.setWidget( fw ); - TQValueList images; - resource.save( TQT_TQIODEVICE(&buffer) ); - - buffer.close(); - buffer.open( IO_ReadOnly ); - - TQWidget *w = TQWidgetFactory::create( TQT_TQIODEVICE(&buffer) ); - if ( w ) { - previewedForm = w; - if ( palet ) { - if ( style ) - style->polish( *palet ); - w->setPalette( *palet ); - } - - if ( style ) - w->setStyle( style ); - - TQObjectList *l = w->queryList( TQWIDGET_OBJECT_NAME_STRING ); - for ( TQObject *o = l->first(); o; o = l->next() ) { - if ( style ) - ( (TQWidget*)o )->setStyle( style ); - } - delete l; - - w->move( fw->mapToGlobal( TQPoint(0,0) ) ); - ((MainWindow*)w )->setWFlags( WDestructiveClose ); - previewing = TRUE; - w->show(); - previewing = FALSE; - TQApplication::restoreOverrideCursor(); - return w; - } - TQApplication::restoreOverrideCursor(); - return 0; -} - -void MainWindow::previewForm() -{ - TQWidget* w = previewFormInternal(); - if ( w ) - w->show(); -} - -void MainWindow::previewForm( const TQString & style ) -{ - TQStyle* st = TQStyleFactory::create( style ); - TQWidget* w = 0; - if ( style == "Motif" ) { - TQPalette p( TQColor( 192, 192, 192 ) ); - w = previewFormInternal( st, &p ); - } else if ( style == "Windows" ) { - TQPalette p( TQColor( 212, 208, 200 ) ); - w = previewFormInternal( st, &p ); - } else if ( style == "Platinum" ) { - TQPalette p( TQColor( 220, 220, 220 ) ); - w = previewFormInternal( st, &p ); - } else if ( style == "CDE" ) { - TQPalette p( TQColor( 75, 123, 130 ) ); - p.setColor( TQPalette::Active, TQColorGroup::Base, TQColor( 55, 77, 78 ) ); - p.setColor( TQPalette::Inactive, TQColorGroup::Base, TQColor( 55, 77, 78 ) ); - p.setColor( TQPalette::Disabled, TQColorGroup::Base, TQColor( 55, 77, 78 ) ); - p.setColor( TQPalette::Active, TQColorGroup::Highlight, TQt::white ); - p.setColor( TQPalette::Active, TQColorGroup::HighlightedText, TQColor( 55, 77, 78 ) ); - p.setColor( TQPalette::Inactive, TQColorGroup::Highlight, TQt::white ); - p.setColor( TQPalette::Inactive, TQColorGroup::HighlightedText, TQColor( 55, 77, 78 ) ); - p.setColor( TQPalette::Disabled, TQColorGroup::Highlight, TQt::white ); - p.setColor( TQPalette::Disabled, TQColorGroup::HighlightedText, TQColor( 55, 77, 78 ) ); - p.setColor( TQPalette::Active, TQColorGroup::Foreground, TQt::white ); - p.setColor( TQPalette::Active, TQColorGroup::Text, TQt::white ); - p.setColor( TQPalette::Active, TQColorGroup::ButtonText, TQt::white ); - p.setColor( TQPalette::Inactive, TQColorGroup::Foreground, TQt::white ); - p.setColor( TQPalette::Inactive, TQColorGroup::Text, TQt::white ); - p.setColor( TQPalette::Inactive, TQColorGroup::ButtonText, TQt::white ); - p.setColor( TQPalette::Disabled, TQColorGroup::Foreground, TQt::lightGray ); - p.setColor( TQPalette::Disabled, TQColorGroup::Text, TQt::lightGray ); - p.setColor( TQPalette::Disabled, TQColorGroup::ButtonText, TQt::lightGray ); - - w = previewFormInternal( st, &p ); - } else if ( style == "SGI" ) { - TQPalette p( TQColor( 220, 220, 220 ) ); - w = previewFormInternal( st, &p ); - } else if ( style == "MotifPlus" ) { - TQColor gtkfg(0x00, 0x00, 0x00); - TQColor gtkdf(0x75, 0x75, 0x75); - TQColor gtksf(0xff, 0xff, 0xff); - TQColor gtkbs(0xff, 0xff, 0xff); - TQColor gtkbg(0xd6, 0xd6, 0xd6); - TQColor gtksl(0x00, 0x00, 0x9c); - TQColorGroup active(gtkfg, // foreground - gtkbg, // button - gtkbg.light(), // light - gtkbg.dark(142), // dark - gtkbg.dark(110), // mid - gtkfg, // text - gtkfg, // bright text - gtkbs, // base - gtkbg), // background - disabled(gtkdf, // foreground - gtkbg, // button - gtkbg.light(), // light - gtkbg.dark(156), // dark - gtkbg.dark(110), // mid - gtkdf, // text - gtkdf, // bright text - gtkbs, // base - gtkbg); // background - - TQPalette pal(active, disabled, active); - - pal.setColor(TQPalette::Active, TQColorGroup::Highlight, - gtksl); - pal.setColor(TQPalette::Active, TQColorGroup::HighlightedText, - gtksf); - pal.setColor(TQPalette::Inactive, TQColorGroup::Highlight, - gtksl); - pal.setColor(TQPalette::Inactive, TQColorGroup::HighlightedText, - gtksf); - pal.setColor(TQPalette::Disabled, TQColorGroup::Highlight, - gtksl); - pal.setColor(TQPalette::Disabled, TQColorGroup::HighlightedText, - gtkdf); - w = previewFormInternal( st, &pal ); - } else { - w = previewFormInternal( st ); - } - - if ( !w ) - return; - w->insertChild( TQT_TQOBJECT(st) ); - w->show(); -} - -void MainWindow::helpContents() -{ - TQWidget *focusWidget = tqApp->focusWidget(); - bool showClassDocu = TRUE; - while ( focusWidget ) { - if ( focusWidget->isA( "PropertyList" ) ) { - showClassDocu = FALSE; - break; - } - focusWidget = focusWidget->parentWidget(); - } - - TQString source = "designer-manual.html"; - if ( propertyDocumentation.isEmpty() ) { - TQString indexFile = documentationPath() + "/propertyindex"; - TQFile f( indexFile ); - if ( f.open( IO_ReadOnly ) ) { - TQTextStream ts( &f ); - while ( !ts.eof() ) { - TQString s = ts.readLine(); - int from = s.find( "\"" ); - if ( from == -1 ) - continue; - int to = s.findRev( "\"" ); - if ( to == -1 ) - continue; - propertyDocumentation[ s.mid( from + 1, to - from - 1 ) ] = s.mid( to + 2 ) + "-prop"; - } - f.close(); - } - } - - if ( propertyEditor->widget() && !showClassDocu ) { - if ( !propertyEditor->currentProperty().isEmpty() ) { - TQMetaObject* mo = propertyEditor->metaObjectOfCurrentProperty(); - TQString s; - TQString cp = propertyEditor->currentProperty(); - if ( cp == "layoutMargin" ) { - source = propertyDocumentation[ "TQLayout/margin" ]; - } else if ( cp == "layoutSpacing" ) { - source = propertyDocumentation[ "TQLayout/spacing" ]; - } else if ( cp == "toolTip" ) { - source = "tqtooltip.html#details"; - } else if ( mo && qstrcmp( mo->className(), "Spacer" ) == 0 ) { - if ( cp != "name" ) - source = "tqsizepolicy.html#SizeType"; - else - source = propertyDocumentation[ "TQObject/name" ]; - } else { - while ( mo && !propertyDocumentation.contains( ( s = TQString( mo->className() ) + "/" + cp ) ) ) - mo = mo->superClass(); - if ( mo ) - source = "p:" + propertyDocumentation[s]; - } - } - - TQString classname = WidgetFactory::classNameOf( propertyEditor->widget() ); - if ( source.isEmpty() || source == "designer-manual.html" ) { - if ( classname.lower() == "spacer" ) - source = "qspaceritem.html#details"; - else if ( classname == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) - source = "layout.html"; - else - source = TQString( WidgetFactory::classNameOf( propertyEditor->widget() ) ).lower() + ".html#details"; - } - } else if ( propertyEditor->widget() ) { - source = TQString( WidgetFactory::classNameOf( propertyEditor->widget() ) ).lower() + ".html#details"; - } - - if ( !source.isEmpty() ) - assistant->showPage( documentationPath() + source ); -} - -void MainWindow::helpManual() -{ - assistant->showPage( documentationPath() + "/designer-manual.html" ); -} - -void MainWindow::helpAbout() -{ - AboutDialog dlg( this, 0, TRUE ); - if ( singleProjectMode() ) { - dlg.aboutPixmap->setText( "" ); - dlg.aboutVersion->setText( "" ); - dlg.aboutCopyright->setText( "" ); - LanguageInterface *iface = MetaDataBase::languageInterface( eProject->language() ); - dlg.aboutLicense->setText( iface->aboutText() ); - } - dlg.aboutVersion->setText(TQString("Version ") + TQString(TQT_VERSION_STR)); - dlg.resize( dlg.width(), dlg.layout()->heightForWidth(dlg.width()) ); - dlg.exec(); -} - -void MainWindow::helpAboutQt() -{ - TQMessageBox::aboutTQt( this, "TQt Designer" ); -} - -#if defined(_WS_WIN_) -#include -#include -#endif - -void MainWindow::helpRegister() -{ -#if defined(_WS_WIN_) - HKEY key; - HKEY subkey; - long res; - DWORD type; - DWORD size = 255; - TQString command; - TQString sub( "htmlfile\\shell" ); -#if defined(UNICODE) - if ( TQApplication::winVersion() & TQt::WV_NT_based ) { - unsigned char data[256]; - res = RegOpenKeyExW( HKEY_CLASSES_ROOT, NULL, 0, KEY_READ, &key ); - res = RegOpenKeyExW( key, (TCHAR*)sub.ucs2(), 0, KEY_READ, &subkey ); - res = RegQueryValueExW( subkey, NULL, NULL, &type, data, &size ); - command = qt_winTQString( data ) + "\\command"; - size = 255; - res = RegOpenKeyExW( subkey, (TCHAR*)command.ucs2(), 0, KEY_READ, &subkey ); - res = RegQueryValueExW( subkey, NULL, NULL, &type, data, &size ); - command = qt_winTQString( data ); - } else -#endif - { - unsigned char data[256]; - res = RegOpenKeyExA( HKEY_CLASSES_ROOT, NULL, 0, KEY_READ, &key ); - res = RegOpenKeyExA( key, sub.local8Bit(), 0, KEY_READ, &subkey ); - res = RegQueryValueExA( subkey, NULL, NULL, &type, data, &size ); - command = TQString::fromLocal8Bit( (const char*) data ) + "\\command"; - size = 255; - res = RegOpenKeyExA( subkey, command.local8Bit(), 0, KEY_READ, &subkey ); - res = RegQueryValueExA( subkey, NULL, NULL, &type, data, &size ); - command = TQString::fromLocal8Bit( (const char*) data ); - } - - res = RegCloseKey( subkey ); - res = RegCloseKey( key ); - - TQProcess process( command + " www.trolltech.com/products/download/eval/evaluation.html" ); - if ( !process.start() ) - TQMessageBox::information( this, "Register TQt", "Launching your web browser failed.\n" - "To register TQt, point your browser to www.trolltech.com/products/download/eval/evaluation.html" ); -#endif -} - -void MainWindow::showProperties( TQObject *o ) -{ - if ( !o->isWidgetType() ) { - propertyEditor->setWidget( o, lastActiveFormWindow ); - if ( lastActiveFormWindow ) - hierarchyView->setFormWindow( lastActiveFormWindow, TQT_TQOBJECT(lastActiveFormWindow->mainContainer()) ); - else - hierarchyView->setFormWindow( 0, 0 ); - return; - } - TQWidget *w = (TQWidget*)o; - setupHierarchyView(); - FormWindow *fw = (FormWindow*)isAFormWindowChild( TQT_TQOBJECT(w) ); - if ( fw ) { - if ( fw->numSelectedWidgets() > 1 ) { - TQWidgetList wl = fw->selectedWidgets(); - if ( wl.first() != w ) { - wl.removeRef( w ); - wl.insert( 0, w ); - } - propertyEditor->setWidget( new PropertyObject( wl ), fw ); - } else { - propertyEditor->setWidget( TQT_TQOBJECT(w), fw ); - } - hierarchyView->setFormWindow( fw, TQT_TQOBJECT(w) ); - } else { - propertyEditor->setWidget( 0, 0 ); - hierarchyView->setFormWindow( 0, 0 ); - } - - if ( currentTool() == POINTER_TOOL && fw && - ( !qworkspace->activeWindow() || !::tqqt_cast(qworkspace->activeWindow()) ) ) - fw->setFocus(); -} - -void MainWindow::resetTool() -{ - actionPointerTool->setOn( TRUE ); -} - -void MainWindow::updateProperties( TQObject * ) -{ - if ( propertyEditor ) - propertyEditor->refetchData(); -} - -bool MainWindow::eventFilter( TQObject *o, TQEvent *e ) -{ - if ( ::tqqt_cast(o) || ::tqqt_cast(o) || - ( o && - ( ::tqqt_cast(o->parent()) || - ::tqqt_cast(o->parent()) ) ) ) { - - if ( e->type() == TQEvent::Accel && ::tqqt_cast(o) ) { - return TRUE; // consume accel events - } else if ( e->type() == TQEvent::MouseButtonPress && ::tqqt_cast(o) ) { - TQPoint pos = ((TQMouseEvent*)e)->pos(); - MenuBarEditor *m = ::tqqt_cast(o); - showProperties( o ); - if ( m->findItem( pos ) >= m->count() ) - m->setFocus(); - } else if ( e->type() == TQEvent::MouseButtonPress && ::tqqt_cast(o) ) { - PopupMenuEditor *m = ::tqqt_cast(o); - PopupMenuEditorItem *i = m->at( ((TQMouseEvent*)e)->pos() ); - if ( m->find( i->action() ) != -1 && !i->isSeparator() ) - showProperties( i->action() ); - } - return TQMainWindow::eventFilter( o, e ); - } - - if ( !o || !e || !o->isWidgetType() ) - return TQMainWindow::eventFilter( o, e ); - - TQWidget *w = 0; - bool passiveInteractor; - switch ( e->type() ) { - case TQEvent::AccelOverride: - if ( ( (TQKeyEvent*)e )->key() == Key_F1 && - ( ( (TQKeyEvent*)e )->state() & ShiftButton ) != ShiftButton ) { - w = (TQWidget*)o; - while ( w ) { - if ( ::tqqt_cast(w) ) - break; - w = w->parentWidget( TRUE ); - } - if ( w ) { - propertyEditor->propertyList()->showCurrentWhatsThis(); - ( (TQKeyEvent*)e )->accept(); - return TRUE; - } - } - break; - case TQEvent::Accel: - if ( ( ( (TQKeyEvent*)e )->key() == Key_A || - ( (TQKeyEvent*)e )->key() == Key_E ) && - ( (TQKeyEvent*)e )->state() & ControlButton ) { - if ( qWorkspace()->activeWindow() && - ::tqqt_cast(qWorkspace()->activeWindow()) ) { - ( (TQKeyEvent*)e )->ignore(); - return TRUE; - } - } - break; - case TQEvent::ContextMenu: - case TQEvent::MouseButtonPress: - if ( o && currentTool() == POINTER_TOOL && - ( ::tqqt_cast(o) || - ::tqqt_cast(o) || - ::tqqt_cast(o) || - ( ::tqqt_cast(o) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) && - o->parent() - && ( ::tqqt_cast(o->parent()) - || ::tqqt_cast(o->parent())) ) ) { - TQWidget *w = (TQWidget*)o; - if ( ::tqqt_cast(w) || - ::tqqt_cast(w) || - ::tqqt_cast(w) || - ::tqqt_cast(w) ) - w = w->parentWidget(); - TQWidget *pw = w->parentWidget(); - while ( pw ) { - if ( ::tqqt_cast(pw) ) { - ( (FormWindow*)pw )->emitShowProperties( TQT_TQOBJECT(w) ); - if ( !::tqqt_cast(o) ) - return ( !::tqqt_cast(o) && - !::tqqt_cast(o) && - !::tqqt_cast(o) && - !::tqqt_cast(o) ); - } - pw = pw->parentWidget(); - } - } - if ( o && ( ::tqqt_cast(o) || o->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) ) - && e->type() == TQEvent::ContextMenu ) - break; - if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL ) - break; - if ( ::tqqt_cast(o) ) - break; - if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) - break; - if ( !w->hasFocus() ) - w->setFocus(); - passiveInteractor = WidgetFactory::isPassiveInteractor( o ); - if ( !passiveInteractor || currentTool() != ORDER_TOOL ) { - if( e->type() == TQEvent::ContextMenu ) { - ( (FormWindow*)w )->handleContextMenu( (TQContextMenuEvent*)e, - ( (FormWindow*)w )->designerWidget( o ) ); - return TRUE; - } else { - ( (FormWindow*)w )->handleMousePress( (TQMouseEvent*)e, - ( (FormWindow*)w )->designerWidget( o ) ); - } - } - lastPressWidget = (TQWidget*)o; - if ( passiveInteractor ) - TQTimer::singleShot( 0, formWindow(), TQT_SLOT( visibilityChanged() ) ); - if ( currentTool() == CONNECT_TOOL || currentTool() == BUDDY_TOOL ) - return TRUE; - return !passiveInteractor; - case TQEvent::MouseButtonRelease: - lastPressWidget = 0; - if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL ) - break; - if ( ::tqqt_cast(o) ) - break; - if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) - break; - passiveInteractor = WidgetFactory::isPassiveInteractor( o ); - if ( !passiveInteractor ) - ( (FormWindow*)w )->handleMouseRelease( (TQMouseEvent*)e, - ( (FormWindow*)w )->designerWidget( o ) ); - if ( passiveInteractor ) { - TQTimer::singleShot( 0, this, TQT_SLOT( selectionChanged() ) ); - TQTimer::singleShot( 0, formWindow(), TQT_SLOT( visibilityChanged() ) ); - } - return !passiveInteractor; - case TQEvent::MouseMove: - if ( isAToolBarChild( o ) && currentTool() != CONNECT_TOOL && currentTool() != BUDDY_TOOL ) - break; - w = isAFormWindowChild( o ); - if ( lastPressWidget != (TQWidget*)o && w && - !::tqqt_cast(o) && !::tqqt_cast(o) && - !::tqqt_cast(o) && !::tqqt_cast(o) && - !::tqqt_cast(o) ) - return TRUE; - if ( o && ::tqqt_cast(o) ) - break; - if ( lastPressWidget != (TQWidget*)o || - ( !w || ::tqqt_cast(o) ) || - ::tqqt_cast(o) ) - break; - passiveInteractor = WidgetFactory::isPassiveInteractor( o ); - if ( !passiveInteractor ) - ( (FormWindow*)w )->handleMouseMove( (TQMouseEvent*)e, - ( (FormWindow*)w )->designerWidget( o ) ); - return !passiveInteractor; - case TQEvent::KeyPress: - if ( ( (TQKeyEvent*)e )->key() == Key_Escape && currentTool() != POINTER_TOOL ) { - resetTool(); - return FALSE; - } - if ( ( (TQKeyEvent*)e )->key() == Key_Escape && incrementalSearch->hasFocus() ) { - if ( ::tqqt_cast(qWorkspace()->activeWindow()) ) { - qWorkspace()->activeWindow()->setFocus(); - return TRUE; - } - } - if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) - break; - ( (FormWindow*)w )->handleKeyPress( (TQKeyEvent*)e, ( (FormWindow*)w )->designerWidget( o ) ); - if ( ((TQKeyEvent*)e)->isAccepted() ) - return TRUE; - break; - case TQEvent::MouseButtonDblClick: - if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) { - if ( ::tqqt_cast(o) && ((TQToolButton*)o)->isOn() && - o->parent() && ::tqqt_cast(o->parent()) && formWindow() ) - formWindow()->setToolFixed(); - break; - } - if ( currentTool() == ORDER_TOOL ) { - ( (FormWindow*)w )->handleMouseDblClick( (TQMouseEvent*)e, - ( (FormWindow*)w )->designerWidget( o ) ); - return TRUE; - } - if ( !WidgetFactory::isPassiveInteractor( o ) && ( (FormWindow*)w )->formFile() ) - return openEditor( ( (FormWindow*)w )->designerWidget( o ), (FormWindow*)w ); - return TRUE; - case TQEvent::KeyRelease: - if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) - break; - ( (FormWindow*)w )->handleKeyRelease( (TQKeyEvent*)e, ( (FormWindow*)w )->designerWidget( o ) ); - if ( ((TQKeyEvent*)e)->isAccepted() ) - return TRUE; - break; - case TQEvent::Hide: - if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) - break; - if ( ( (FormWindow*)w )->isWidgetSelected( TQT_TQOBJECT(o) ) ) - ( (FormWindow*)w )->selectWidget( TQT_TQOBJECT(o), FALSE ); - break; - case TQEvent::Enter: - case TQEvent::Leave: - if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast(o) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) - break; - return TRUE; - case TQEvent::Resize: - case TQEvent::Move: - if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) - break; - if ( WidgetFactory::layoutType( (TQWidget*)o->parent() ) != WidgetFactory::NoLayout ) { - ( (FormWindow*)w )->updateSelection( (TQWidget*)o ); - if ( e->type() != TQEvent::Resize ) - ( (FormWindow*)w )->updateChildSelections( (TQWidget*)o ); - } - break; - case TQEvent::Close: - if ( o->isWidgetType() && (TQWidget*)o == (TQWidget*)previewedForm ) { - if ( lastActiveFormWindow && lastActiveFormWindow->project() ) { - TQStringList lst = - MetaDataBase::fakeProperty( TQT_TQOBJECT(lastActiveFormWindow), "database" ).toStringList(); - lastActiveFormWindow->project()->closeDatabase( lst[ 0 ] ); - } - } - break; - case TQEvent::DragEnter: - if ( TQT_BASE_OBJECT(o) == qWorkspace() || TQT_BASE_OBJECT(o) == workspace() || TQT_BASE_OBJECT(o) == workspace()->viewport() ) { - workspace()->contentsDragEnterEvent( (TQDragEnterEvent*)e ); - return TRUE; - } - break; - case TQEvent::DragMove: - if ( TQT_BASE_OBJECT(o) == qWorkspace() || TQT_BASE_OBJECT(o) == workspace() || TQT_BASE_OBJECT(o) == workspace()->viewport() ) { - workspace()->contentsDragMoveEvent( (TQDragMoveEvent*)e ); - return TRUE; - } - break; - case TQEvent::Drop: - if ( TQT_BASE_OBJECT(o) == qWorkspace() || TQT_BASE_OBJECT(o) == workspace() || TQT_BASE_OBJECT(o) == workspace()->viewport() ) { - workspace()->contentsDropEvent( (TQDropEvent*)e ); - return TRUE; - } - break; - case TQEvent::Show: - if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this) ) - break; - if ( ((TQShowEvent*)e)->spontaneous() ) - break; - TQApplication::sendPostedEvents( qworkspace, TQEvent::ChildInserted ); - showEvent( (TQShowEvent*)e ); - checkTempFiles(); - return TRUE; - case TQEvent::Wheel: - if ( !( w = isAFormWindowChild( o ) ) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) - break; - return TRUE; - case TQEvent::FocusIn: - if ( !::tqqt_cast(o) && isAFormWindowChild( o ) ) - return TRUE; //FIXME - if ( hierarchyView->formDefinitionView()->isRenaming() - && ( o->inherits( "Editor" ) || ::tqqt_cast(o) ) ) - TQApplication::sendPostedEvents(); - if ( o->inherits( "Editor" ) ) { - TQWidget *w = (TQWidget*)o; - while ( w ) { - if ( ::tqqt_cast(w) ) - break; - w = w->parentWidget( TRUE ); - } - if ( ::tqqt_cast(w) ) - ( (SourceEditor*)w )->checkTimeStamp(); - } else if ( ::tqqt_cast(o) ) { - FormWindow *fw = (FormWindow*)o; - if ( fw->formFile() && fw->formFile()->editor() ) - fw->formFile()->editor()->checkTimeStamp(); - } - break; - case TQEvent::FocusOut: - if ( !::tqqt_cast(o) && isAFormWindowChild( o ) ) - return TRUE; - break; - default: - return TQMainWindow::eventFilter( o, e ); - } - - return TQMainWindow::eventFilter( o, e ); -} - -TQWidget *MainWindow::isAFormWindowChild( TQObject *o ) const -{ - if ( ::tqqt_cast(o->parent()) && !::tqqt_cast(o) ) - return 0; - while ( o ) { - if ( ::tqqt_cast(o) ) - return (TQWidget*)o; - o = o->parent(); - } - return 0; -} - -TQWidget *MainWindow::isAToolBarChild( TQObject *o ) const -{ - while ( o ) { - if ( ::tqqt_cast(o) ) - return (TQWidget*)o; - if ( ::tqqt_cast(o) ) - return 0; - o = o->parent(); - } - return 0; -} - -FormWindow *MainWindow::formWindow() -{ - if ( qworkspace->activeWindow() ) { - FormWindow *fw = 0; - if ( ::tqqt_cast(qworkspace->activeWindow()) ) - fw = (FormWindow*)qworkspace->activeWindow(); - else if ( lastActiveFormWindow && - qworkspace->windowList().find( lastActiveFormWindow ) != -1) - fw = lastActiveFormWindow; - return fw; - } - return 0; -} - -void MainWindow::emitProjectSignals() -{ - emit hasNonDummyProject( !currentProject->isDummy() ); - emit hasActiveWindowOrProject( !!qworkspace->activeWindow() || !currentProject->isDummy() ); -} - -void MainWindow::insertFormWindow( FormWindow *fw ) -{ - if ( fw ) - TQWhatsThis::add( fw, i18n( "The Form Window" - "

    Use the various tools to add widgets or to change the layout " - "and behavior of the components in the form. Select one or multiple " - "widgets to move them or lay them out. If a single widget is chosen it can " - "be resized using the resize handles.

    " - "

    Changes in the Property Editor are visible at design time, " - "and you can preview the form in different styles.

    " - "

    You can change the grid resolution, or turn the grid off in the " - "Preferences dialog in the Edit menu." - "

    You can have several forms open, and all open forms are listed " - "in the Form List.") ); - - connect( fw, TQT_SIGNAL( showProperties( TQObject * ) ), - this, TQT_SLOT( showProperties( TQObject * ) ) ); - connect( fw, TQT_SIGNAL( updateProperties( TQObject * ) ), - this, TQT_SLOT( updateProperties( TQObject * ) ) ); - connect( this, TQT_SIGNAL( currentToolChanged() ), - fw, TQT_SLOT( currentToolChanged() ) ); - connect( fw, TQT_SIGNAL( selectionChanged() ), - this, TQT_SLOT( selectionChanged() ) ); - connect( fw, TQT_SIGNAL( undoRedoChanged( bool, bool, const TQString &, const TQString & ) ), - this, TQT_SLOT( updateUndoRedo( bool, bool, const TQString &, const TQString & ) ) ); - - if ( !mblockNewForms ) { - } else { - fw->setProject( currentProject ); - } - fw->show(); - fw->currentToolChanged(); - if ( fw->caption().isEmpty() && tqstrlen( fw->name() ) ) - fw->setCaption( fw->name() ); - fw->mainContainer()->setCaption( fw->caption() ); - WidgetFactory::saveDefaultProperties( TQT_TQOBJECT(fw->mainContainer()), - WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(fw->mainContainer()) ) ) ); - activeWindowChanged( fw ); - emit formWindowsChanged(); - for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { - if ( e->project() == fw->project() ) - e->resetContext(); - } -} - -void MainWindow::createNewProject( const TQString &lang ) -{ - Project *pro = new Project( "", "", projectSettingsPluginManager ); - pro->setLanguage( lang ); - - - if ( !openProjectSettings( pro ) ) { - delete pro; - return; - } - - if ( !pro->isValid() ) { - TQMessageBox::information( this, i18n("New Project"), i18n( "Cannot create an invalid project." ) ); - delete pro; - return; - } - - TQAction *a = new TQAction( pro->makeRelative( pro->fileName() ), - pro->makeRelative( pro->fileName() ), 0, actionGroupProjects, 0, TRUE ); - projects.insert( a, pro ); - addRecentlyOpened( pro->makeAbsolute( pro->fileName() ), recentlyProjects ); - projectSelected( a ); -} - - -bool MainWindow::unregisterClient( FormWindow *w ) -{ - propertyEditor->closed( w ); - objectHierarchy()->closed( w ); - if ( w == lastActiveFormWindow ) - lastActiveFormWindow = 0; - - TQPtrList waitingForDelete; - waitingForDelete.setAutoDelete( TRUE ); - for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { - if ( TQT_BASE_OBJECT(e->object()) == TQT_BASE_OBJECT(w) ) - waitingForDelete.append( e ); - } - - if ( actionEditor->form() == w ) { - actionEditor->setFormWindow( 0 ); - actionEditor->parentWidget()->hide(); - } - - return TRUE; -} - -void MainWindow::activeWindowChanged( TQWidget *w ) -{ - TQWidget *old = formWindow(); - if ( ::tqqt_cast(w) ) { - FormWindow *fw = (FormWindow*)w; - FormWindow *ofw = lastActiveFormWindow; - lastActiveFormWindow = fw; - lastActiveFormWindow->updateUndoInfo(); - emit hasActiveForm( TRUE ); - if ( formWindow() ) { - formWindow()->emitShowProperties(); - emit formModified( formWindow()->commandHistory()->isModified() ); - if ( currentTool() != POINTER_TOOL ) - formWindow()->clearSelection(); - } - workspace()->activeFormChanged( fw ); - setAppropriate( (TQDockWindow*)actionEditor->parentWidget(), - ::tqqt_cast(lastActiveFormWindow->mainContainer()) ); - if ( appropriate( (TQDockWindow*)actionEditor->parentWidget() ) ) { - if ( actionEditor->wantToBeShown() ) - actionEditor->parentWidget()->show(); - } else { - TQWidget *mc = 0; - if ( ofw && (mc = ofw->mainContainer()) && ::tqqt_cast(mc) ) - actionEditor->setWantToBeShown( !actionEditor->parentWidget()->isHidden() ); - actionEditor->parentWidget()->hide(); - } - - actionEditor->setFormWindow( lastActiveFormWindow ); - if ( wspace && fw->project() && fw->project() != currentProject ) { - for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) { - if ( *it == fw->project() ) { - projectSelected( it.key() ); - break; - } - } - } - emit formWindowChanged(); - - } else if ( w == propertyEditor ) { - propertyEditor->resetFocus(); - } else if ( !lastActiveFormWindow ) { - emit formWindowChanged(); - emit hasActiveForm( FALSE ); - actionEditUndo->setEnabled( FALSE ); - actionEditRedo->setEnabled( FALSE ); - } - - if ( !w ) { - emit formWindowChanged(); - emit hasActiveForm( FALSE ); - propertyEditor->clear(); - hierarchyView->clear(); - updateUndoRedo( FALSE, FALSE, TQString(), TQString() ); - } - - selectionChanged(); - - if ( ::tqqt_cast(w) ) { - SourceEditor *se = (SourceEditor*)w; - TQGuardedPtr fw = se->formWindow(); - if ( se->formWindow() && - lastActiveFormWindow != fw ) { - activeWindowChanged( se->formWindow() ); - } - actionSearchFind->setEnabled( TRUE ); - actionSearchIncremetal->setEnabled( TRUE ); - actionSearchReplace->setEnabled( TRUE ); - actionSearchGotoLine->setEnabled( TRUE ); - incrementalSearch->setEnabled( TRUE ); - - actionEditUndo->setEnabled( FALSE ); - actionEditRedo->setEnabled( FALSE ); - actionEditCut->setEnabled( TRUE ); - actionEditCopy->setEnabled( TRUE ); - actionEditPaste->setEnabled( TRUE ); - actionEditSelectAll->setEnabled( TRUE ); - actionEditUndo->setMenuText( i18n( "&Undo" ) ); - actionEditUndo->setToolTip( textNoAccel( actionEditUndo->menuText()) ); - actionEditRedo->setMenuText( i18n( "&Redo" ) ); - actionEditRedo->setToolTip( textNoAccel( actionEditRedo->menuText()) ); - if ( hierarchyView->sourceEditor() != w ) - hierarchyView->showClasses( se ); - actionEditor->setFormWindow( 0 ); - if ( wspace && se->project() && se->project() != currentProject ) { - for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) { - if ( *it == se->project() ) { - projectSelected( it.key() ); - break; - } - } - } - workspace()->activeEditorChanged( se ); - } else { - actionSearchFind->setEnabled( FALSE ); - actionSearchIncremetal->setEnabled( FALSE ); - actionSearchReplace->setEnabled( FALSE ); - actionSearchGotoLine->setEnabled( FALSE ); - incrementalSearch->setEnabled( FALSE ); - } - - if ( currentTool() == ORDER_TOOL && w != old ) - emit currentToolChanged(); - - emit hasActiveWindow( !!qworkspace->activeWindow() ); -} - -void MainWindow::updateUndoRedo( bool undoAvailable, bool redoAvailable, - const TQString &undoCmd, const TQString &redoCmd ) -{ - if ( qWorkspace()->activeWindow() && - ::tqqt_cast(qWorkspace()->activeWindow()) ) - return; // do not set a formWindow related command - actionEditUndo->setEnabled( undoAvailable ); - actionEditRedo->setEnabled( redoAvailable ); - if ( !undoCmd.isEmpty() ) - actionEditUndo->setMenuText( i18n( "&Undo: %1" ).arg( undoCmd ) ); - else - actionEditUndo->setMenuText( i18n( "&Undo: Not Available" ) ); - if ( !redoCmd.isEmpty() ) - actionEditRedo->setMenuText( i18n( "&Redo: %1" ).arg( redoCmd ) ); - else - actionEditRedo->setMenuText( i18n( "&Redo: Not Available" ) ); - - actionEditUndo->setToolTip( textNoAccel( actionEditUndo->menuText()) ); - actionEditRedo->setToolTip( textNoAccel( actionEditRedo->menuText()) ); - - if ( currentTool() == ORDER_TOOL ) { - actionEditUndo->setEnabled( FALSE ); - actionEditRedo->setEnabled( FALSE ); - } -} - -void MainWindow::updateEditorUndoRedo() -{ - if ( !qWorkspace()->activeWindow() || - !::tqqt_cast(qWorkspace()->activeWindow()) ) - return; - SourceEditor *editor = (SourceEditor*)qWorkspace()->activeWindow(); - actionEditUndo->setEnabled( editor->editIsUndoAvailable() ); - actionEditRedo->setEnabled( editor->editIsRedoAvailable() ); -} - -TQWorkspace *MainWindow::qWorkspace() const -{ - return qworkspace; -} - -void MainWindow::popupFormWindowMenu( const TQPoint & gp, FormWindow *fw ) -{ - TQValueList ids; - TQMap commands; - - setupRMBSpecialCommands( ids, commands, fw ); - setupRMBProperties( ids, commands, fw ); - - tqApp->processEvents(); - int r = rmbFormWindow->exec( gp ); - - handleRMBProperties( r, commands, fw ); - handleRMBSpecialCommands( r, commands, fw ); - - for ( TQValueList::ConstIterator i = ids.begin(); i != ids.end(); ++i ) - rmbFormWindow->removeItem( *i ); -} - -void MainWindow::popupWidgetMenu( const TQPoint &gp, FormWindow * /*fw*/, TQWidget * w) -{ - TQValueList ids; - TQMap commands; - - setupRMBSpecialCommands( ids, commands, w ); - setupRMBProperties( ids, commands, w ); - - tqApp->processEvents(); - int r = rmbWidgets->exec( gp ); - - handleRMBProperties( r, commands, w ); - handleRMBSpecialCommands( r, commands, w ); - - for ( TQValueList::ConstIterator i = ids.begin(); i != ids.end(); ++i ) - rmbWidgets->removeItem( *i ); -} - -void MainWindow::setupRMBProperties( TQValueList &ids, TQMap &props, TQWidget *w ) -{ - const TQMetaProperty* text = w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE ); - if ( text && qstrcmp( text->type(), TQSTRING_OBJECT_NAME_STRING) != 0 ) - text = 0; - const TQMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), TRUE ); - if ( title && qstrcmp( title->type(), TQSTRING_OBJECT_NAME_STRING) != 0 ) - title = 0; - const TQMetaProperty* pagetitle = - w->metaObject()->property( w->metaObject()->findProperty( "pageTitle", TRUE ), TRUE ); - if ( pagetitle && qstrcmp( pagetitle->type(), TQSTRING_OBJECT_NAME_STRING) != 0 ) - pagetitle = 0; - const TQMetaProperty* pixmap = - w->metaObject()->property( w->metaObject()->findProperty( "pixmap", TRUE ), TRUE ); - if ( pixmap && qstrcmp( pixmap->type(), TQPIXMAP_OBJECT_NAME_STRING) != 0 ) - pixmap = 0; - - if ( text && text->designable(w) || - title && title->designable(w) || - pagetitle && pagetitle->designable(w) || - pixmap && pixmap->designable(w) ) { - int id = 0; - if ( ids.isEmpty() ) - ids << rmbWidgets->insertSeparator(0); - if ( pixmap && pixmap->designable(w) ) { - ids << ( id = rmbWidgets->insertItem( i18n("Choose Pixmap..."), -1, 0) ); - props.insert( "pixmap", id ); - } - if ( text && text->designable(w) && !::tqqt_cast(w) ) { - ids << ( id = rmbWidgets->insertItem( i18n("Edit Text..."), -1, 0) ); - props.insert( "text", id ); - } - if ( title && title->designable(w) ) { - ids << ( id = rmbWidgets->insertItem( i18n("Edit Title..."), -1, 0) ); - props.insert( "title", id ); - } - if ( pagetitle && pagetitle->designable(w) ) { - ids << ( id = rmbWidgets->insertItem( i18n("Edit Page Title..."), -1, 0) ); - props.insert( "pagetitle", id ); - } - } -} - -#ifdef TQT_CONTAINER_CUSTOM_WIDGETS -static TQWidgetContainerInterfacePrivate *containerWidgetInterface( TQWidget *w ) -{ - WidgetInterface *iface = 0; - widgetManager()->queryInterface( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ), &iface ); - if ( !iface ) - return 0; - TQWidgetContainerInterfacePrivate *iface2 = 0; - iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 ); - if ( !iface2 ) - return 0; - iface->release(); - return iface2; -} -#endif - -void MainWindow::setupRMBSpecialCommands( TQValueList &ids, - TQMap &commands, TQWidget *w ) -{ - int id; - - if ( ::tqqt_cast(w) ) { - if ( ids.isEmpty() ) - ids << rmbWidgets->insertSeparator( 0 ); - if ( ( (QDesignerTabWidget*)w )->count() > 1) { - ids << ( id = rmbWidgets->insertItem( i18n("Delete Page"), -1, 0 ) ); - commands.insert( "remove", id ); - } - ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) ); - commands.insert( "add", id ); - } else if ( ::tqqt_cast(w) ) { - if ( ids.isEmpty() ) - ids << rmbWidgets->insertSeparator( 0 ); - if ( ( (QDesignerWidgetStack*)w )->count() > 1) { - ids << ( id = rmbWidgets->insertItem( i18n("Previous Page"), -1, 0 ) ); - commands.insert( "prevpage", id ); - ids << ( id = rmbWidgets->insertItem( i18n("Next Page"), -1, 0 ) ); - ids << rmbWidgets->insertSeparator( 0 ); - commands.insert( "nextpage", id ); - ids << ( id = rmbWidgets->insertItem( i18n("Delete Page"), -1, 0 ) ); - commands.insert( "remove", id ); - } - ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) ); - commands.insert( "add", id ); - } else if ( ::tqqt_cast(w) ) { - if ( ids.isEmpty() ) - ids << rmbWidgets->insertSeparator( 0 ); - if ( ( (TQToolBox*)w )->count() > 1 ) { - ids << ( id = rmbWidgets->insertItem( i18n("Delete Page"), -1, 0 ) ); - commands.insert( "remove", id ); - } - ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) ); - commands.insert( "add", id ); -#ifdef TQT_CONTAINER_CUSTOM_WIDGETS - } else if ( WidgetDatabase:: - isCustomPluginWidget( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) { - TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w ); - if ( iface && iface->supportsPages( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) { - if ( ids.isEmpty() ) - ids << rmbWidgets->insertSeparator( 0 ); - - if ( iface->count( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ), w ) > 1 ) { - ids << ( id = rmbWidgets->insertItem( i18n( "Delete Page" ), -1, 0 ) ); - commands.insert( "remove", id ); - } - ids << ( id = rmbWidgets->insertItem( i18n("Add Page"), -1, 0 ) ); - commands.insert( "add", id ); - if ( iface->currentIndex( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ), w ) != -1 ) { - ids << ( id = rmbWidgets->insertItem( i18n("Rename Current Page..."), -1, 0 ) ); - commands.insert( "rename", id ); - } - } - if ( iface ) - iface->release(); -#endif // TQT_CONTAINER_CUSTOM_WIDGETS - } - - if ( WidgetFactory::hasSpecialEditor( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) { - if ( ids.isEmpty() ) - ids << rmbWidgets->insertSeparator( 0 ); - ids << ( id = rmbWidgets->insertItem( i18n("Edit..."), -1, 0 ) ); - commands.insert( "edit", id ); - } -} - -void MainWindow::setupRMBSpecialCommands( TQValueList &ids, - TQMap &commands, FormWindow *fw ) -{ - int id; - - if ( ::tqqt_cast(fw->mainContainer()) ) { - if ( ids.isEmpty() ) - ids << rmbFormWindow->insertSeparator( 0 ); - - if ( ( (TQWizard*)fw->mainContainer() )->pageCount() > 1) { - ids << ( id = rmbFormWindow->insertItem( i18n("Delete Page"), -1, 0 ) ); - commands.insert( "remove", id ); - } - - ids << ( id = rmbFormWindow->insertItem( i18n("Add Page"), -1, 0 ) ); - commands.insert( "add", id ); - - ids << ( id = rmbFormWindow->insertItem( i18n("Edit Page Title..."), -1, 0 ) ); - commands.insert( "rename", id ); - - ids << ( id = rmbFormWindow->insertItem( i18n("Edit Pages..."), -1, 0 ) ); - commands.insert( "edit", id ); - - } else if ( ::tqqt_cast(fw->mainContainer()) ) { - if ( ids.isEmpty() ) - ids << rmbFormWindow->insertSeparator( 0 ); - ids << ( id = rmbFormWindow->insertItem( i18n( "Add Menu Item" ), -1, 0 ) ); - commands.insert( "add_menu_item", id ); - ids << ( id = rmbFormWindow->insertItem( i18n( "Add Toolbar" ), -1, 0 ) ); - commands.insert( "add_toolbar", id ); - } -} - -void MainWindow::handleRMBProperties( int id, TQMap &props, TQWidget *w ) -{ - if ( id == props[ "text" ] ) { - bool ok = FALSE; - bool oldDoWrap = FALSE; - if ( ::tqqt_cast(w) ) { - int align = w->property( "alignment" ).toInt(); - if ( align & WordBreak ) - oldDoWrap = TRUE; - } - bool doWrap = oldDoWrap; - - TQString text; - if ( ::tqqt_cast(w) || ::tqqt_cast(w) || ::tqqt_cast(w) ) { - text = MultiLineEditor::getText( this, w->property( "text" ).toString(), !::tqqt_cast(w), &doWrap ); - ok = !text.isNull(); - } else { - text = TQInputDialog::getText( i18n("Text"), i18n( "New text" ), - TQLineEdit::Normal, w->property("text").toString(), &ok, this ); - } - if ( ok ) { - if ( oldDoWrap != doWrap ) { - TQString pn( i18n( "Set 'wordwrap' of '%1'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, - "wordwrap", TQVariant( oldDoWrap, 0 ), - TQVariant( doWrap, 0 ), TQString(), TQString() ); - cmd->execute(); - formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "wordwrap", TRUE ); - } - - TQString pn( i18n( "Set the 'text' of '%1'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, - "text", w->property( "text" ), - text, TQString(), TQString() ); - cmd->execute(); - formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "text", TRUE ); - } - } else if ( id == props[ "title" ] ) { - bool ok = FALSE; - TQString title = TQInputDialog::getText( i18n("Title"), i18n( "New title" ), - TQLineEdit::Normal, w->property("title").toString(), &ok, this ); - if ( ok ) { - TQString pn( i18n( "Set the 'title' of '%2'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, - "title", w->property( "title" ), - title, TQString(), TQString() ); - cmd->execute(); - formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "title", TRUE ); - } - } else if ( id == props[ "pagetitle" ] ) { - bool ok = FALSE; - TQString text = TQInputDialog::getText( i18n("Page Title"), i18n( "New page title" ), - TQLineEdit::Normal, w->property("pageTitle").toString(), &ok, this ); - if ( ok ) { - TQString pn( i18n( "Set the 'pageTitle' of '%2'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, - "pageTitle", - w->property( "pageTitle" ), - text, TQString(), TQString() ); - cmd->execute(); - formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "pageTitle", TRUE ); - } - } else if ( id == props[ "pixmap" ] ) { - TQPixmap oldPix = TQVariant(w->property( "pixmap" )).toPixmap(); - TQPixmap pix = qChoosePixmap( this, formWindow(), oldPix ); - if ( !pix.isNull() ) { - TQString pn( i18n( "Set the 'pixmap' of '%2'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, - "pixmap", w->property( "pixmap" ), - pix, TQString(), TQString() ); - cmd->execute(); - formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "pixmap", TRUE ); - } - } -} - -void MainWindow::handleRMBSpecialCommands( int id, TQMap &commands, TQWidget *w ) -{ - if ( ::tqqt_cast(w) ) { - TQTabWidget *tw = (TQTabWidget*)w; - if ( id == commands[ "add" ] ) { - AddTabPageCommand *cmd = - new AddTabPageCommand( i18n( "Add Page to %1" ).arg( tw->name() ), formWindow(), - tw, "Tab" ); - formWindow()->commandHistory()->addCommand( cmd ); - cmd->execute(); - } else if ( id == commands[ "remove" ] ) { - if ( tw->currentPage() ) { - QDesignerTabWidget *dtw = (QDesignerTabWidget*)tw; - DeleteTabPageCommand *cmd = - new DeleteTabPageCommand( i18n( "Delete Page %1 of %2" ). - arg( dtw->pageTitle() ).arg( tw->name() ), - formWindow(), tw, tw->currentPage() ); - formWindow()->commandHistory()->addCommand( cmd ); - cmd->execute(); - } - } - } else if ( ::tqqt_cast(w) ) { - TQToolBox *tb = (TQToolBox*)w; - if ( id == commands[ "add" ] ) { - AddToolBoxPageCommand *cmd = - new AddToolBoxPageCommand( i18n( "Add Page to %1" ).arg( tb->name() ), - formWindow(), - tb, "Page" ); - formWindow()->commandHistory()->addCommand( cmd ); - cmd->execute(); - } else if ( id == commands[ "remove" ] ) { - if ( tb->currentItem() ) { - DeleteToolBoxPageCommand *cmd = - new DeleteToolBoxPageCommand( i18n( "Delete Page %1 of %2" ). - arg( tb->itemLabel( tb->currentIndex() ) ). - arg( tb->name() ), - formWindow(), tb, tb->currentItem() ); - formWindow()->commandHistory()->addCommand( cmd ); - cmd->execute(); - } - } - } else if ( ::tqqt_cast(w) ) { - QDesignerWidgetStack *ws = (QDesignerWidgetStack*)w; - if ( id == commands[ "add" ] ) { - AddWidgetStackPageCommand *cmd = - new AddWidgetStackPageCommand( i18n( "Add Page to %1" ).arg( ws->name() ), - formWindow(), ws ); - formWindow()->commandHistory()->addCommand( cmd ); - cmd->execute(); - } else if ( id == commands[ "remove" ] ) { - if ( ws->visibleWidget() ) { - DeleteWidgetStackPageCommand *cmd = - new DeleteWidgetStackPageCommand( i18n( "Delete Page %1 of %2" ). - arg( ws->currentPage() ).arg( ws->name() ), - formWindow(), ws, ws->visibleWidget() ); - formWindow()->commandHistory()->addCommand( cmd ); - cmd->execute(); - } - } else if ( id == commands[ "nextpage" ] ) { - int currentPage = w->property( "currentPage" ).toInt(); - TQString pn( i18n( "Raise next page of '%2'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = - new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, - "currentPage", currentPage, - currentPage + 1, TQString(), TQString() ); - cmd->execute(); - formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "currentPage", TRUE ); - } else if ( id == commands[ "prevpage" ] ) { - int currentPage = w->property( "currentPage" ).toInt(); - TQString pn( i18n( "Raise previous page of '%2'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = - new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, - "currentPage", currentPage, - currentPage -1, TQString(), TQString() ); - cmd->execute(); - formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "currentPage", TRUE ); - } -#ifdef TQT_CONTAINER_CUSTOM_WIDGETS - } else if ( WidgetDatabase:: - isCustomPluginWidget( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) ) { - if ( id == commands[ "add" ] ) { - AddContainerPageCommand *cmd = - new AddContainerPageCommand( i18n( "Add Page to %1" ).arg( w->name() ), - formWindow(), w, "Page" ); - formWindow()->commandHistory()->addCommand( cmd ); - cmd->execute(); - } else if ( id == commands[ "remove" ] ) { - TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w ); - if ( iface ) { - TQString wClassName = WidgetFactory::classNameOf( TQT_TQOBJECT(w) ); - int index = iface->currentIndex( wClassName, w ); - DeleteContainerPageCommand *cmd = - new DeleteContainerPageCommand( i18n( "Delete Page %1 of %2" ). - arg( iface->pageLabel( wClassName, - w, index ) ). - arg( w->name() ), - formWindow(), w, index ); - formWindow()->commandHistory()->addCommand( cmd ); - cmd->execute(); - iface->release(); - } - } else if ( id == commands[ "rename" ] ) { - TQWidgetContainerInterfacePrivate *iface = containerWidgetInterface( w ); - if ( iface ) { - bool ok = FALSE; - TQString wClassName = WidgetFactory::classNameOf( TQT_TQOBJECT(w) ); - int index = iface->currentIndex( wClassName, w ); - TQString text = TQInputDialog::getText( i18n("Page Title"), i18n( "New page title" ), - TQLineEdit::Normal, - iface->pageLabel( wClassName, w, - index ), - &ok, this ); - if ( ok ) { - RenameContainerPageCommand *cmd = - new RenameContainerPageCommand( i18n( "Rename Page %1 to %2" ). - arg( iface-> - pageLabel( wClassName, w, - index ) ). - arg( text ), formWindow(), - w, index, text ); - formWindow()->commandHistory()->addCommand( cmd ); - cmd->execute(); - } - iface->release(); - } - } -#endif // TQT_CONTAINER_CUSTOM_WIDGETS - } - - if ( WidgetFactory::hasSpecialEditor( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) { - if ( id == commands[ "edit" ] ) - WidgetFactory::editWidget( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), this, w, formWindow() ); - } -} - -void MainWindow::handleRMBSpecialCommands( int id, TQMap &commands, FormWindow *fw ) -{ - if ( ::tqqt_cast(fw->mainContainer()) ) { - TQWizard *wiz = (TQWizard*)fw->mainContainer(); - if ( id == commands[ "add" ] ) { - AddWizardPageCommand *cmd = - new AddWizardPageCommand( i18n( "Add Page to %1" ).arg( wiz->name() ), - formWindow(), wiz, "WizardPage" ); - formWindow()->commandHistory()->addCommand( cmd ); - cmd->execute(); - } else if ( id == commands[ "remove" ] ) { - if ( wiz->currentPage() ) { - QDesignerWizard *dw = (QDesignerWizard*)wiz; - DeleteWizardPageCommand *cmd = - new DeleteWizardPageCommand( i18n( "Delete Page %1 of %2" ). - arg( dw->pageTitle() ).arg( wiz->name() ), - formWindow(), wiz, - wiz->indexOf( wiz->currentPage() ) ); - formWindow()->commandHistory()->addCommand( cmd ); - cmd->execute(); - } - } else if ( id == commands[ "edit" ] ) { - WizardEditor *e = new WizardEditor( this, wiz, fw ); - e->exec(); - delete e; - } else if ( id == commands[ "rename" ] ) { - - bool ok = FALSE; - QDesignerWizard *dw = (QDesignerWizard*)wiz; - TQString text = TQInputDialog::getText( i18n("Page Title"), i18n( "New page title" ), - TQLineEdit::Normal, dw->pageTitle(), &ok, this ); - if ( ok ) { - TQString pn( i18n( "Rename page %1 of %2" ).arg( dw->pageTitle() ).arg( wiz->name() ) ); - RenameWizardPageCommand *cmd = - new RenameWizardPageCommand( pn, formWindow() - , wiz, wiz->indexOf( wiz->currentPage() ), text ); - formWindow()->commandHistory()->addCommand( cmd ); - cmd->execute(); - } - } - } else if ( ::tqqt_cast(fw->mainContainer()) ) { - TQMainWindow *mw = (TQMainWindow*)fw->mainContainer(); - if ( id == commands[ "add_toolbar" ] ) { - AddToolBarCommand *cmd = - new AddToolBarCommand( i18n( "Add Toolbar to '%1'" ).arg( formWindow()->name() ), - formWindow(), mw ); - formWindow()->commandHistory()->addCommand( cmd ); - cmd->execute(); - } else if ( id == commands[ "add_menu_item" ] ) { - AddMenuCommand *cmd = - new AddMenuCommand( i18n( "Add Menu to '%1'" ).arg( formWindow()->name() ), - formWindow(), mw ); - formWindow()->commandHistory()->addCommand( cmd ); - cmd->execute(); - } - } -} - -void MainWindow::clipboardChanged() -{ - TQString text( tqApp->clipboard()->text() ); - TQString start( "" ); - actionEditPaste->setEnabled( text.left( start.length() ) == start ); -} - -void MainWindow::selectionChanged() -{ - layoutChilds = FALSE; - layoutSelected = FALSE; - breakLayout = FALSE; - if ( !formWindow() ) { - actionEditCut->setEnabled( FALSE ); - actionEditCopy->setEnabled( FALSE ); - actionEditDelete->setEnabled( FALSE ); - actionEditAdjustSize->setEnabled( FALSE ); - actionEditHLayout->setEnabled( FALSE ); - actionEditVLayout->setEnabled( FALSE ); - actionEditSplitHorizontal->setEnabled( FALSE ); - actionEditSplitVertical->setEnabled( FALSE ); - actionEditGridLayout->setEnabled( FALSE ); - actionEditBreakLayout->setEnabled( FALSE ); - actionEditLower->setEnabled( FALSE ); - actionEditRaise->setEnabled( FALSE ); - actionEditAdjustSize->setEnabled( FALSE ); - return; - } - - int selectedWidgets = formWindow()->numSelectedWidgets(); - bool enable = selectedWidgets > 0; - actionEditCut->setEnabled( enable ); - actionEditCopy->setEnabled( enable ); - actionEditDelete->setEnabled( enable ); - actionEditLower->setEnabled( enable ); - actionEditRaise->setEnabled( enable ); - - actionEditAdjustSize->setEnabled( FALSE ); - actionEditSplitHorizontal->setEnabled( FALSE ); - actionEditSplitVertical->setEnabled( FALSE ); - - enable = FALSE; - TQWidgetList widgets = formWindow()->selectedWidgets(); - if ( selectedWidgets > 1 ) { - int unlaidout = 0; - int laidout = 0; - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - if ( !w->parentWidget() || WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ) - unlaidout++; - else - laidout++; - } - actionEditHLayout->setEnabled( unlaidout > 1 ); - actionEditVLayout->setEnabled( unlaidout > 1 ); - actionEditSplitHorizontal->setEnabled( unlaidout > 1 ); - actionEditSplitVertical->setEnabled( unlaidout > 1 ); - actionEditGridLayout->setEnabled( unlaidout > 1 ); - actionEditBreakLayout->setEnabled( laidout > 0 ); - actionEditAdjustSize->setEnabled( laidout > 0 ); - layoutSelected = unlaidout > 1; - breakLayout = laidout > 0; - } else if ( selectedWidgets == 1 ) { - TQWidget *w = widgets.first(); - bool isContainer = WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) || - w == formWindow()->mainContainer(); - actionEditAdjustSize->setEnabled( !w->parentWidget() || - WidgetFactory::layoutType( w->parentWidget() ) == WidgetFactory::NoLayout ); - - if ( !isContainer ) { - actionEditHLayout->setEnabled( FALSE ); - actionEditVLayout->setEnabled( FALSE ); - actionEditGridLayout->setEnabled( FALSE ); - if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) { - actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) ); - breakLayout = TRUE; - } else { - actionEditBreakLayout->setEnabled( FALSE ); - } - } else { - if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) { - if ( !formWindow()->hasInsertedChildren( w ) ) { - actionEditHLayout->setEnabled( FALSE ); - actionEditVLayout->setEnabled( FALSE ); - actionEditGridLayout->setEnabled( FALSE ); - actionEditBreakLayout->setEnabled( FALSE ); - } else { - actionEditHLayout->setEnabled( TRUE ); - actionEditVLayout->setEnabled( TRUE ); - actionEditGridLayout->setEnabled( TRUE ); - actionEditBreakLayout->setEnabled( FALSE ); - layoutChilds = TRUE; - } - if ( w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) { - actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) ); - breakLayout = TRUE; - } - } else { - actionEditHLayout->setEnabled( FALSE ); - actionEditVLayout->setEnabled( FALSE ); - actionEditGridLayout->setEnabled( FALSE ); - actionEditBreakLayout->setEnabled( !isAToolBarChild( TQT_TQOBJECT(w) ) ); - breakLayout = TRUE; - } - } - } else if ( selectedWidgets == 0 ) { - actionEditAdjustSize->setEnabled( TRUE ); - TQWidget *w = formWindow()->mainContainer(); - if ( WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) { - if ( !formWindow()->hasInsertedChildren( w ) ) { - actionEditHLayout->setEnabled( FALSE ); - actionEditVLayout->setEnabled( FALSE ); - actionEditGridLayout->setEnabled( FALSE ); - actionEditBreakLayout->setEnabled( FALSE ); - } else { - actionEditHLayout->setEnabled( TRUE ); - actionEditVLayout->setEnabled( TRUE ); - actionEditGridLayout->setEnabled( TRUE ); - actionEditBreakLayout->setEnabled( FALSE ); - layoutChilds = TRUE; - } - } else { - actionEditHLayout->setEnabled( FALSE ); - actionEditVLayout->setEnabled( FALSE ); - actionEditGridLayout->setEnabled( FALSE ); - actionEditBreakLayout->setEnabled( TRUE ); - breakLayout = TRUE; - } - } else { - actionEditHLayout->setEnabled( FALSE ); - actionEditVLayout->setEnabled( FALSE ); - actionEditGridLayout->setEnabled( FALSE ); - actionEditBreakLayout->setEnabled( FALSE ); - } -} - -static TQString fixArgs( const TQString &s2 ) -{ - TQString s = s2; - return s.replace( ',', ';' ); -} - -void MainWindow::writeConfig() -{ - TQSettings config; - - // No search path for unix, only needs application name - config.insertSearchPath( TQSettings::Windows, "/Trolltech" ); - - TQString keybase = DesignerApplication::settingsKey(); - - if (savePluginPaths) { - TQStringList pluginPaths = TQApplication::libraryPaths(); - config.writeEntry( keybase + "PluginPaths", pluginPaths ); - } - config.writeEntry( keybase + "RestoreWorkspace", restoreConfig ); - config.writeEntry( keybase + "SplashScreen", splashScreen ); - config.writeEntry( keybase + "ShowStartDialog", shStartDialog ); - config.writeEntry( keybase + "FileFilter", fileFilter ); - config.writeEntry( keybase + "TemplatePath", templPath ); - config.writeEntry( keybase + "RecentlyOpenedFiles", recentlyFiles ); - config.writeEntry( keybase + "RecentlyOpenedProjects", recentlyProjects ); - config.writeEntry( keybase + "DatabaseAutoEdit", databaseAutoEdit ); - - config.writeEntry( keybase + "AutoSave/Enabled", autoSaveEnabled ); - config.writeEntry( keybase + "AutoSave/Interval", autoSaveInterval ); - - config.writeEntry( keybase + "Grid/Snap", snGrid ); - config.writeEntry( keybase + "Grid/Show", sGrid ); - config.writeEntry( keybase + "Grid/x", grid().x() ); - config.writeEntry( keybase + "Grid/y", grid().y() ); - config.writeEntry( keybase + "LastToolPage", - toolBox->itemLabel( toolBox->currentIndex() ) ); - - config.writeEntry( keybase + "Background/UsePixmap", backPix ); - config.writeEntry( keybase + "Background/Color", (int)qworkspace->backgroundColor().rgb() ); - if ( qworkspace->backgroundPixmap() ) - qworkspace->backgroundPixmap()->save( TQDir::home().absPath() + "/.designer/" + "background.xpm", "PNG" ); - - config.writeEntry( keybase + "Geometries/MainwindowX", x() ); - config.writeEntry( keybase + "Geometries/MainwindowY", y() ); - config.writeEntry( keybase + "Geometries/MainwindowWidth", width() ); - config.writeEntry( keybase + "Geometries/MainwindowHeight", height() ); - config.writeEntry( keybase + "Geometries/MainwindowMaximized", isMaximized() ); - config.writeEntry( keybase + "Geometries/PropertyEditorX", propertyEditor->parentWidget()->x() ); - config.writeEntry( keybase + "Geometries/PropertyEditorY", propertyEditor->parentWidget()->y() ); - config.writeEntry( keybase + "Geometries/PropertyEditorWidth", propertyEditor->parentWidget()->width() ); - config.writeEntry( keybase + "Geometries/PropertyEditorHeight", propertyEditor->parentWidget()->height() ); - config.writeEntry( keybase + "Geometries/HierarchyViewX", hierarchyView->parentWidget()->x() ); - config.writeEntry( keybase + "Geometries/HierarchyViewY", hierarchyView->parentWidget()->y() ); - config.writeEntry( keybase + "Geometries/HierarchyViewWidth", hierarchyView->parentWidget()->width() ); - config.writeEntry( keybase + "Geometries/HierarchyViewHeight", hierarchyView->parentWidget()->height() ); - config.writeEntry( keybase + "Geometries/WorkspaceX", wspace->parentWidget()->x() ); - config.writeEntry( keybase + "Geometries/WorkspaceY", wspace->parentWidget()->y() ); - config.writeEntry( keybase + "Geometries/WorkspaceWidth", wspace->parentWidget()->width() ); - config.writeEntry( keybase + "Geometries/WorkspaceHeight", wspace->parentWidget()->height() ); - - config.writeEntry( keybase + "View/TextLabels", usesTextLabel() ); - config.writeEntry( keybase + "View/BigIcons", usesBigPixmaps() ); - - TQString mwlKey = "MainwindowLayout"; - if ( singleProjectMode() ) - mwlKey += "S"; - TQString mainWindowLayout; - TQTextStream ts( &mainWindowLayout, IO_WriteOnly ); - ts << *this; - config.writeEntry( keybase + mwlKey, mainWindowLayout ); - - - TQPtrList *lst = MetaDataBase::customWidgets(); - config.writeEntry( keybase + "CustomWidgets/num", (int)lst->count() ); - int j = 0; - TQDir::home().mkdir( ".designer" ); - for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) { - TQStringList l; - l << w->className; - l << w->includeFile; - l << TQString::number( (int)w->includePolicy ); - l << TQString::number( w->sizeHint.width() ); - l << TQString::number( w->sizeHint.height() ); - l << TQString::number( w->lstSignals.count() ); - for ( TQValueList::ConstIterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it ) - l << TQString( fixArgs( *it ) ); - l << TQString::number( w->lstSlots.count() ); - for ( TQValueList::ConstIterator it2 = w->lstSlots.begin(); it2 != w->lstSlots.end(); ++it2 ) { - l << fixArgs( (*it2).function ); - l << (*it2).access; - } - l << TQString::number( w->lstProperties.count() ); - for ( TQValueList::ConstIterator it3 = w->lstProperties.begin(); it3 != w->lstProperties.end(); ++it3 ) { - l << (*it3).property; - l << (*it3).type; - } - l << TQString::number( size_type_to_int( w->sizePolicy.horData() ) ); - l << TQString::number( size_type_to_int( w->sizePolicy.verData() ) ); - l << TQString::number( (int)w->isContainer ); - config.writeEntry( keybase + "CustomWidgets/Widget" + TQString::number( j++ ), l, ',' ); - w->pixmap->save( TQDir::home().absPath() + "/.designer/" + w->className, "XPM" ); - } - - TQStringList l; - for ( TQAction *a = commonWidgetsPage.first(); a; a = commonWidgetsPage.next() ) - l << a->text(); - config.writeEntry( keybase + "ToolBox/CommonWidgets", l ); -} - -static TQString fixArgs2( const TQString &s2 ) -{ - TQString s = s2; - return s.replace( ';', ',' ); -} - -void MainWindow::readConfig() -{ - TQString keybase = DesignerApplication::settingsKey(); - TQSettings config; - config.insertSearchPath( TQSettings::Windows, "/Trolltech" ); - - bool ok; - bool readPreviousConfig = FALSE; - TQString backPixName( TQDir::home().absPath() + "/.designer/" + "background.xpm" ); - restoreConfig = config.readBoolEntry( keybase + "RestoreWorkspace", TRUE, &ok ); - if ( !ok ) { - keybase = DesignerApplication::oldSettingsKey(); - restoreConfig = config.readBoolEntry( keybase + "RestoreWorkspace", TRUE, &ok ); - if ( !ok ) { - if ( oWindow ) { - oWindow->shuttingDown(); - ( (TQDockWindow*)oWindow->parent() )->hide(); - } - TQPixmap pix; - pix.load( backPixName ); - if ( !pix.isNull() ) - qworkspace->setBackgroundPixmap( pix ); - return; - } - readPreviousConfig = TRUE; - } - if ( !readPreviousConfig ) { - fileFilter = config.readEntry( keybase + "FileFilter", fileFilter ); - templPath = config.readEntry( keybase + "TemplatePath", TQString() ); - databaseAutoEdit = config.readBoolEntry( keybase + "DatabaseAutoEdit", databaseAutoEdit ); - shStartDialog = config.readBoolEntry( keybase + "ShowStartDialog", shStartDialog ); - autoSaveEnabled = config.readBoolEntry( keybase + "AutoSave/Enabled", autoSaveEnabled ); - autoSaveInterval = config.readNumEntry( keybase + "AutoSave/Interval", autoSaveInterval ); - } - - if ( restoreConfig || readPreviousConfig ) { - TQString s = config.readEntry( keybase + "LastToolPage" ); - for ( int i = 0; i < toolBox->count(); ++i ) { - if ( toolBox->itemLabel(i) == s ) { - toolBox->setCurrentIndex( i ); - break; - } - } - // We know that the oldSettingsKey() will return 3.1 - if ( keybase == DesignerApplication::oldSettingsKey() ) { - if (keybase.contains("3.1")) - recentlyFiles = config.readListEntry( keybase + "RecentlyOpenedFiles", ',' ); - else - recentlyFiles = config.readListEntry(keybase + "RecentlyOpenedFiles"); - - if ( recentlyFiles.count() == 1 && recentlyFiles[0].isNull() ) - recentlyFiles.clear(); - if (keybase.contains("3.1")) - recentlyProjects = config.readListEntry( keybase + "RecentlyOpenedProjects", ',' ); - else - recentlyProjects = config.readListEntry( keybase + "RecentlyOpenedProjects"); - if ( recentlyProjects.count() == 1 && recentlyProjects[0].isNull() ) - recentlyProjects.clear(); - } else { - recentlyFiles = config.readListEntry( keybase + "RecentlyOpenedFiles" ); - recentlyProjects = config.readListEntry( keybase + "RecentlyOpenedProjects" ); - } - - backPix = config.readBoolEntry( keybase + "Background/UsePixmap", TRUE ) | readPreviousConfig; - if ( backPix ) { - TQPixmap pix; - pix.load( backPixName ); - if ( !pix.isNull() ) - qworkspace->setBackgroundPixmap( pix ); - } else { - qworkspace->setBackgroundColor( TQColor( (TQRgb)config.readNumEntry( keybase + "Background/Color" ) ) ); - } - - if ( !readPreviousConfig ) { - splashScreen = config.readBoolEntry( keybase + "SplashScreen", TRUE ); - - sGrid = config.readBoolEntry( keybase + "Grid/Show", TRUE ); - snGrid = config.readBoolEntry( keybase + "Grid/Snap", TRUE ); - grd.setX( config.readNumEntry( keybase + "Grid/x", 10 ) ); - grd.setY( config.readNumEntry( keybase + "Grid/y", 10 ) ); - - if ( !config.readBoolEntry( DesignerApplication::settingsKey() + "Geometries/MainwindowMaximized", FALSE ) ) { - TQRect r( pos(), size() ); - r.setX( config.readNumEntry( keybase + "Geometries/MainwindowX", r.x() ) ); - r.setY( config.readNumEntry( keybase + "Geometries/MainwindowY", r.y() ) ); - r.setWidth( config.readNumEntry( keybase + "Geometries/MainwindowWidth", r.width() ) ); - r.setHeight( config.readNumEntry( keybase + "Geometries/MainwindowHeight", r.height() ) ); - - TQRect desk = TQApplication::desktop()->geometry(); - TQRect inter = desk.intersect( r ); - resize( r.size() ); - if ( inter.width() * inter.height() > ( r.width() * r.height() / 20 ) ) { - move( r.topLeft() ); - } - } - setUsesTextLabel( config.readBoolEntry( keybase + "View/TextLabels", FALSE ) ); - setUsesBigPixmaps( FALSE /*config.readBoolEntry( "BigIcons", FALSE )*/ ); // ### disabled for now - } - } - int num = config.readNumEntry( keybase + "CustomWidgets/num" ); - for ( int j = 0; j < num; ++j ) { - MetaDataBase::CustomWidget *w = new MetaDataBase::CustomWidget; - TQStringList l = config.readListEntry( keybase + "CustomWidgets/Widget" + TQString::number( j ), ',' ); - w->className = l[ 0 ]; - w->includeFile = l[ 1 ]; - w->includePolicy = (MetaDataBase::CustomWidget::IncludePolicy)l[ 2 ].toInt(); - w->sizeHint.setWidth( l[ 3 ].toInt() ); - w->sizeHint.setHeight( l[ 4 ].toInt() ); - uint c = 5; - if ( l.count() > c ) { - int numSignals = l[ c ].toInt(); - c++; - for ( int i = 0; i < numSignals; ++i, c++ ) - w->lstSignals.append( fixArgs2( l[ c ] ).latin1() ); - } - if ( l.count() > c ) { - int numSlots = l[ c ].toInt(); - c++; - for ( int i = 0; i < numSlots; ++i ) { - MetaDataBase::Function slot; - slot.function = fixArgs2( l[ c ] ); - c++; - slot.access = l[ c ]; - c++; - w->lstSlots.append( slot ); - } - } - if ( l.count() > c ) { - int numProperties = l[ c ].toInt(); - c++; - for ( int i = 0; i < numProperties; ++i ) { - MetaDataBase::Property prop; - prop.property = l[ c ]; - c++; - prop.type = l[ c ]; - c++; - w->lstProperties.append( prop ); - } - } if ( l.count() > c ) { - TQSizePolicy::SizeType h, v; - h = int_to_size_type( l[ c++ ].toInt() ); - v = int_to_size_type( l[ c++ ].toInt() ); - w->sizePolicy = TQSizePolicy( h, v ); - } - if ( l.count() > c ) { - w->isContainer = (bool)l[ c++ ].toInt(); - } - w->pixmap = new TQPixmap( BarIcon( TQDir::home().absPath() + "/.designer/" + w->className , TDevDesignerPartFactory::instance()) ); - MetaDataBase::addCustomWidget( w ); - } - if ( num > 0 ) - rebuildCustomWidgetGUI(); - - if ( !restoreConfig ) - return; - -#ifndef TQ_WS_MAC - /* I'm sorry to make this not happen on the Mac, but it seems to hang somewhere deep - in TQLayout, it gets into a very large loop - and seems it has to do with clever - things the designer does ###Sam */ - TQApplication::sendPostedEvents(); -#endif - - if ( !readPreviousConfig ) { - TQString mwlKey = "MainwindowLayout"; - if ( singleProjectMode() ) - mwlKey += "S"; - TQString mainWindowLayout = config.readEntry( keybase + mwlKey ); - TQTextStream ts( &mainWindowLayout, IO_ReadOnly ); - ts >> *this; - } - if ( readPreviousConfig && oWindow ) { - oWindow->shuttingDown(); - ( (TQDockWindow*)oWindow->parent() )->hide(); - } - - rebuildCustomWidgetGUI(); - - TQStringList l = config.readListEntry( keybase + "ToolBox/CommonWidgets" ); - if ( !l.isEmpty() ) { - TQPtrList lst; - commonWidgetsPage.clear(); - for ( TQStringList::ConstIterator it = l.begin(); it != l.end(); ++it ) { - for ( TQAction *a = toolActions.first(); a; a = toolActions.next() ) { - if ( *it == a->text() ) { - lst.append( a ); - break; - } - } - } - if ( lst != commonWidgetsPage ) { - commonWidgetsPage = lst; - rebuildCommonWidgetsToolBoxPage(); - } - } -} - -HierarchyView *MainWindow::objectHierarchy() const -{ - if ( !hierarchyView ) - ( (MainWindow*)this )->setupHierarchyView(); - return hierarchyView; -} - -TQPopupMenu *MainWindow::setupNormalHierarchyMenu( TQWidget *parent ) -{ - TQPopupMenu *menu = new TQPopupMenu( parent ); - - actionEditCut->addTo( menu ); - actionEditCopy->addTo( menu ); - actionEditPaste->addTo( menu ); - actionEditDelete->addTo( menu ); - - return menu; -} - -TQPopupMenu *MainWindow::setupTabWidgetHierarchyMenu( TQWidget *parent, const char *addSlot, const char *removeSlot ) -{ - TQPopupMenu *menu = new TQPopupMenu( parent ); - - menu->insertItem( i18n( "Add Page" ), parent, addSlot ); - menu->insertItem( i18n( "Delete Page" ), parent, removeSlot ); - menu->insertSeparator(); - actionEditCut->addTo( menu ); - actionEditCopy->addTo( menu ); - actionEditPaste->addTo( menu ); - actionEditDelete->addTo( menu ); - - return menu; -} - -void MainWindow::closeEvent( TQCloseEvent *e ) -{ - if ( singleProject ) { - hide(); - e->ignore(); - return; - } - - TQWidgetList windows = qWorkspace()->windowList(); - TQWidgetListIt wit( windows ); - while ( wit.current() ) { - TQWidget *w = wit.current(); - ++wit; - if ( ::tqqt_cast(w) ) { - if ( ( (FormWindow*)w )->formFile()->editor() ) - windows.removeRef( ( (FormWindow*)w )->formFile()->editor() ); - if ( ( (FormWindow*)w )->formFile()->formWindow() ) - windows.removeRef( ( (FormWindow*)w )->formFile()->formWindow() ); - if ( !( (FormWindow*)w )->formFile()->close() ) { - e->ignore(); - return; - } - } else if ( ::tqqt_cast(w) ) { - if ( !( (SourceEditor*)w )->close() ) { - e->ignore(); - return; - } - } - w->close(); - } - - TQMapConstIterator it = projects.begin(); - while( it != projects.end() ) { - Project *pro = it.data(); - ++it; - if ( pro->isModified() ) { - switch ( TQMessageBox::warning( this, i18n( "Save Project Settings" ), - i18n( "Save changes to '%1'?" ).arg( pro->fileName() ), - i18n( "&Yes" ), i18n( "&No" ), i18n( "&Cancel" ), 0, 2 ) ) { - case 0: // save - pro->save(); - break; - case 1: // don't save - break; - case 2: // cancel - e->ignore(); - return; - default: - break; - } - } - } - - writeConfig(); - hide(); - e->accept(); - - if ( client ) { - TQDir home( TQDir::homeDirPath() ); - home.remove( ".designerpid" ); - } -} - -Workspace *MainWindow::workspace() const -{ - if ( !wspace ) - ( (MainWindow*)this )->setupWorkspace(); - return wspace; -} - -PropertyEditor *MainWindow::propertyeditor() const -{ - if ( !propertyEditor ) - ( (MainWindow*)this )->setupPropertyEditor(); - return propertyEditor; -} - -ActionEditor *MainWindow::actioneditor() const -{ - if ( !actionEditor ) - ( (MainWindow*)this )->setupActionEditor(); - return actionEditor; -} - -bool MainWindow::openEditor( TQWidget *w, FormWindow *f ) -{ - if ( f && !f->project()->isCpp() && !WidgetFactory::isPassiveInteractor( TQT_TQOBJECT(w) ) ) { - TQString defSignal = WidgetFactory::defaultSignal( TQT_TQOBJECT(w) ); - if ( defSignal.isEmpty() ) { - editSource(); - } else { - TQString s = TQString( w->name() ) + "_" + defSignal; - LanguageInterface *iface = MetaDataBase::languageInterface( f->project()->language() ); - if ( iface ) { - TQStrList sigs = iface->signalNames( TQT_TQOBJECT(w) ); - TQString fullSignal; - for ( int i = 0; i < (int)sigs.count(); ++i ) { - TQString sig = sigs.at( i ); - if ( sig.left( sig.find( '(' ) ) == defSignal ) { - fullSignal = sig; - break; - } - } - - if ( !fullSignal.isEmpty() ) { - TQString signl = fullSignal; - fullSignal = fullSignal.mid( fullSignal.find( '(' ) + 1 ); - fullSignal.remove( (int)fullSignal.length() - 1, 1 ); - fullSignal = iface->createArguments( fullSignal.simplifyWhiteSpace() ); - s += "(" + fullSignal + ")"; - if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(f), s.latin1() ) ) - MetaDataBase::addFunction( TQT_TQOBJECT(f), s.latin1(), "", "public", "slot", - f->project()->language(), "void" ); - s = s.left( s.find( '(' ) ).latin1(); - if ( !MetaDataBase::hasConnection( TQT_TQOBJECT(f), TQT_TQOBJECT(w), defSignal.latin1(), TQT_TQOBJECT(f->mainContainer()), s.latin1() ) ) { - MetaDataBase::Connection conn; - conn.sender = TQT_TQOBJECT(w); - conn.receiver = TQT_TQOBJECT(f->mainContainer()); - conn.signal = signl; - conn.slot = s; - AddConnectionCommand *cmd = - new AddConnectionCommand( i18n( "Add Connection" ), f, conn ); - f->commandHistory()->addCommand( cmd ); - cmd->execute(); - f->formFile()->setModified( TRUE ); - } - } - } - editFunction( s, TRUE ); - } - return TRUE; - } - if ( WidgetFactory::hasSpecialEditor( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) { - statusMessage( i18n( "Edit %1..." ).arg( w->className() ) ); - WidgetFactory::editWidget( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), - this, w, formWindow() ); - statusBar()->clear(); - return TRUE; - } - - const TQMetaProperty* text = w->metaObject()->property( w->metaObject()->findProperty( "text", TRUE ), TRUE ); - const TQMetaProperty* title = w->metaObject()->property( w->metaObject()->findProperty( "title", TRUE ), TRUE ); - if ( text && text->designable(w) ) { - bool ok = FALSE; - bool oldDoWrap = FALSE; - if ( ::tqqt_cast(w) ) { - int align = w->property( "alignment" ).toInt(); - if ( align & WordBreak ) - oldDoWrap = TRUE; - } - bool doWrap = oldDoWrap; - - TQString text; - if ( ::tqqt_cast(w) || ::tqqt_cast(w) || ::tqqt_cast(w) ) { - text = MultiLineEditor::getText( this, w->property( "text" ).toString(), - !::tqqt_cast(w), &doWrap ); - ok = !text.isNull(); - } else { - text = TQInputDialog::getText( i18n("Text"), i18n( "New text" ), - TQLineEdit::Normal, w->property("text").toString(), &ok, this ); - } - if ( ok ) { - if ( oldDoWrap != doWrap ) { - TQString pn( i18n( "Set 'wordwrap' of '%1'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, - "wordwrap", TQVariant( oldDoWrap, 0 ), - TQVariant( doWrap, 0 ), TQString(), TQString() ); - cmd->execute(); - formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "wordwrap", TRUE ); - } - - TQString pn( i18n( "Set the 'text' of '%1'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, - "text", w->property( "text" ), - text, TQString(), TQString() ); - cmd->execute(); - formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "text", TRUE ); - } - return TRUE; - } - if ( title && title->designable(w) ) { - bool ok = FALSE; - TQString text; - text = TQInputDialog::getText( i18n("Title"), i18n( "New title" ), TQLineEdit::Normal, w->property("title").toString(), &ok, this ); - if ( ok ) { - TQString pn( i18n( "Set the 'title' of '%2'" ).arg( w->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, formWindow(), TQT_TQOBJECT(w), propertyEditor, - "title", w->property( "title" ), - text, TQString(), TQString() ); - cmd->execute(); - formWindow()->commandHistory()->addCommand( cmd ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(w), "title", TRUE ); - } - return TRUE; - } - - if ( !WidgetFactory::isPassiveInteractor( TQT_TQOBJECT(w) ) ) - editSource(); - - return TRUE; -} - -void MainWindow::rebuildCustomWidgetGUI() -{ - customWidgetToolBar->clear(); - customWidgetMenu->clear(); - customWidgetToolBar2->clear(); - int count = 0; - - TQPtrListIterator it( toolActions ); - TQAction *action; - while ( ( action = it.current() ) ) { - ++it; - if ( ( (WidgetAction*)action )->group() == "Custom Widgets" ) - delete action; - } - - TQPtrList *lst = MetaDataBase::customWidgets(); - - actionToolsCustomWidget->addTo( customWidgetMenu ); - customWidgetMenu->insertSeparator(); - - for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) { - WidgetAction* a = new WidgetAction( "Custom Widgets", actionGroupTools, TQString::number( w->id ).latin1() ); - a->setToggleAction( TRUE ); - a->setText( w->className ); - a->setIconSet( *w->pixmap ); - a->setStatusTip( i18n( "Insert a %1 (custom widget)" ).arg( w->className ) ); - a->setWhatsThis( i18n("%1 (custom widget)" - "

    Click Edit Custom Widgets... in the Tools|Custom menu to " - "add and change custom widgets. You can add properties as well as " - "signals and slots to integrate them into TQt Designer, " - "and provide a pixmap which will be used to represent the widget on the form.

    ").arg( w->className ) ); - - a->addTo( customWidgetToolBar ); - a->addTo( customWidgetToolBar2 ); - a->addTo( customWidgetMenu ); - count++; - } - TQWidget *wid; - customWidgetToolBar2->setStretchableWidget( ( wid = new TQWidget( customWidgetToolBar2 ) ) ); - wid->setBackgroundMode( customWidgetToolBar2->backgroundMode() ); - - if ( count == 0 ) - customWidgetToolBar->hide(); - else if ( customWidgetToolBar->isVisible() ) - customWidgetToolBar->show(); -} - -void MainWindow::rebuildCommonWidgetsToolBoxPage() -{ - toolBox->setUpdatesEnabled( FALSE ); - commonWidgetsToolBar->setUpdatesEnabled( FALSE ); - commonWidgetsToolBar->clear(); - for ( TQAction *a = commonWidgetsPage.first(); a; a = commonWidgetsPage.next() ) - a->addTo( commonWidgetsToolBar ); - TQWidget *w; - commonWidgetsToolBar->setStretchableWidget( ( w = new TQWidget( commonWidgetsToolBar ) ) ); - w->setBackgroundMode( commonWidgetsToolBar->backgroundMode() ); - toolBox->setUpdatesEnabled( TRUE ); - commonWidgetsToolBar->setUpdatesEnabled( TRUE ); -} - -bool MainWindow::isCustomWidgetUsed( MetaDataBase::CustomWidget *wid ) -{ - TQWidgetList windows = qWorkspace()->windowList(); - for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - if ( ::tqqt_cast(w) ) { - if ( ( (FormWindow*)w )->isCustomWidgetUsed( wid ) ) - return TRUE; - } - } - return FALSE; -} - -void MainWindow::setGrid( const TQPoint &p ) -{ - if ( p == grd ) - return; - grd = p; - TQWidgetList windows = qWorkspace()->windowList(); - for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - if ( !::tqqt_cast(w) ) - continue; - ( (FormWindow*)w )->mainContainer()->update(); - } -} - -void MainWindow::setShowGrid( bool b ) -{ - if ( b == sGrid ) - return; - sGrid = b; - TQWidgetList windows = qWorkspace()->windowList(); - for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - if ( !::tqqt_cast(w) ) - continue; - ( (FormWindow*)w )->mainContainer()->update(); - } -} - -void MainWindow::setSnapGrid( bool b ) -{ - if ( b == snGrid ) - return; - snGrid = b; -} - -TQString MainWindow::documentationPath() const -{ - return TQString( tqInstallPathDocs() ) + "/html/"; -} - -void MainWindow::windowsMenuActivated( int id ) -{ - TQWidget* w = qworkspace->windowList().at( id ); - if ( w ) - w->setFocus(); -} - -void MainWindow::projectSelected( TQAction *a ) -{ - a->setOn( TRUE ); - if ( currentProject ) - currentProject->setActive( FALSE ); - Project *p = *projects.find( a ); - p->setActive( TRUE ); - if ( currentProject == p ) - return; - currentProject = p; - if ( wspace ) - wspace->setCurrentProject( currentProject ); -} - -void MainWindow::openProject( const TQString &fn ) -{ - for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) { - if ( (*it)->fileName() == fn ) { - projectSelected( it.key() ); - return; - } - } - TQApplication::setOverrideCursor( waitCursor ); - Project *pro = new Project( fn, "", projectSettingsPluginManager ); - pro->setModified( FALSE ); - TQAction *a = new TQAction( pro->projectName(), pro->projectName(), 0, actionGroupProjects, 0, TRUE ); - projects.insert( a, pro ); - projectSelected( a ); - TQApplication::restoreOverrideCursor(); -} - -void MainWindow::checkTempFiles() -{ - TQString s = TQDir::homeDirPath() + "/.designer"; - TQString baseName = s+ "/saved-form-"; - if ( !TQFile::exists( baseName + "1.ui" ) ) - return; - DesignerApplication::closeSplash(); - TQDir d( s ); - d.setNameFilter( "*.ui" ); - TQStringList lst = d.entryList(); - TQApplication::restoreOverrideCursor(); - bool load = TQMessageBox::information( this, i18n( "Restoring Last Session" ), - i18n( "TQt Designer found some temporary saved files, which were\n" - "written when TQt Designer crashed last time. Do you want to\n" - "load these files?" ), i18n( "&Yes" ), i18n( "&No" ) ) == 0; - TQApplication::setOverrideCursor( waitCursor ); - for ( TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { - if ( load ) - openFormWindow( s + "/" + *it, FALSE ); - d.remove( *it ); - } -} - -void MainWindow::showDialogHelp() -{ - TQWidget *w = (TQWidget*)sender(); - w = w->topLevelWidget(); - - TQString link = documentationPath() + "/designer-manual-13.html#"; - - if ( ::tqqt_cast(w) || ::tqqt_cast(w) ) // own doc for startdialog? - link += "dialog-file-new"; - else if ( ::tqqt_cast(w) ) - link += "dialog-file-create-template"; - else if ( ::tqqt_cast(w) ) - link += "dialog-edit-functions"; -// else if ( ::tqqt_cast(w) ) - else if ( w->inherits("ConnectionViewerBase") ) - link += "dialog-view-connections"; - else if ( ::tqqt_cast(w) ) - link += "dialog-edit-form-settings"; - else if ( ::tqqt_cast(w) ) - link += "dialog-edit-preferences"; - else if ( ::tqqt_cast(w) ) - link += "dialog-image-collection"; -// else if ( ::tqqt_cast(w) ) - else if ( w->inherits( "DatabaseConnectionBase" ) ) - link += "dialog-edit-database-connections"; - else if ( ::tqqt_cast(w) ) - link += "dialog-project-settings"; - else if ( ::tqqt_cast(w) ) - link += "dialog-find-text"; - else if ( ::tqqt_cast(w) ) - link += "dialog-replace-text"; - else if ( ::tqqt_cast(w) ) - link += "dialog-go-to-line"; -// else if ( ::tqqt_cast(w) ) - else if ( w->inherits("ConnectionEditorBase") ) - link += "dialog-edit-connections"; - else if ( ::tqqt_cast(w) ) - link += "dialog-edit-custom-widgets"; - else if ( ::tqqt_cast(w) ) - link += "dialog-edit-palette"; - else if ( ::tqqt_cast(w) ) - link += "dialog-edit-listbox"; - else if ( ::tqqt_cast(w) ) - link += "dialog-edit-listview"; - else if ( ::tqqt_cast(w) ) - link += "dialog-edit-iconview"; - else if ( ::tqqt_cast(w) ) - link += "dialog-edit-table"; - else if ( ::tqqt_cast(w) ) - link += "dialog-text"; - - else { - TQMessageBox::information( this, i18n( "Help" ), - i18n( "There is no help available for this dialog at the moment." ) ); - return; - } - - assistant->showPage( link ); -} - -void MainWindow::setupActionManager() -{ - actionPluginManager = new TQPluginManager( IID_Action, TQApplication::libraryPaths(), pluginDirectory() ); - - TQStringList lst = actionPluginManager->featureList(); - for ( TQStringList::ConstIterator ait = lst.begin(); ait != lst.end(); ++ait ) { - ActionInterface *iface = 0; - actionPluginManager->queryInterface( *ait, &iface ); - if ( !iface ) - continue; - - iface->connectTo( desInterface ); - TQAction *a = iface->create( *ait, TQT_TQOBJECT(this) ); - if ( !a ) - continue; - - TQString grp = iface->group( *ait ); - if ( grp.isEmpty() ) - grp = "3rd party actions"; - TQPopupMenu *menu = 0; - TQToolBar *tb = 0; - - if ( !( menu = (TQPopupMenu*)child( grp.latin1(), TQPOPUPMENU_OBJECT_NAME_STRING ) ) ) { - menu = new TQPopupMenu( this, grp.latin1() ); - menuBar()->insertItem( i18n( grp ), menu ); - } - if ( !( tb = (TQToolBar*)child( grp.latin1(), TQTOOLBAR_OBJECT_NAME_STRING ) ) ) { - tb = new TQToolBar( this, grp.latin1() ); - tb->setCloseMode( TQDockWindow::Undocked ); - addToolBar( tb, grp ); - } - - if ( iface->location( *ait, ActionInterface::Menu ) ) - a->addTo( menu ); - if ( iface->location( *ait, ActionInterface::Toolbar ) ) - a->addTo( tb ); - - iface->release(); - } -} - -void MainWindow::editFunction( const TQString &func, bool rereadSource ) -{ - if ( !formWindow() ) - return; - - if ( formWindow()->formFile()->codeFileState() != FormFile::Ok ) - if ( !formWindow()->formFile()->setupUihFile(FALSE) ) - return; - - TQString lang = currentProject->language(); - if ( !MetaDataBase::hasEditor( lang ) ) { - TQMessageBox::information( this, i18n( "Edit Source" ), - i18n( "There is no plugin for editing %1 code installed.\n" - "Note: Plugins are not available in static TQt configurations." ).arg( lang ) ); - return; - } - - for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { - if ( e->language() == lang && e->formWindow() == formWindow() ) { - e->show(); - e->setFunction( func ); - return; - } - } - - createSourceEditor( TQT_TQOBJECT(formWindow()), formWindow()->project(), lang, func, rereadSource ); -} - -void MainWindow::setupRecentlyFilesMenu() -{ - recentlyFilesMenu->clear(); - int id = 0; - for ( TQStringList::ConstIterator it = recentlyFiles.begin(); it != recentlyFiles.end(); ++it ) { - recentlyFilesMenu->insertItem( *it, id ); - id++; - } -} - -void MainWindow::setupRecentlyProjectsMenu() -{ - recentlyProjectsMenu->clear(); - int id = 0; - for ( TQStringList::ConstIterator it = recentlyProjects.begin(); it != recentlyProjects.end(); ++it ) { - recentlyProjectsMenu->insertItem( *it, id ); - id++; - } -} - -TQPtrList MainWindow::projectList() const -{ - TQPtrList list; - TQMapConstIterator it = projects.begin(); - - while( it != projects.end() ) { - Project *p = it.data(); - ++it; - list.append( p->iFace() ); - } - - return list; -} - -TQStringList MainWindow::projectNames() const -{ - TQStringList res; - for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) - res << (*it)->projectName(); - return res; -} - -TQStringList MainWindow::projectFileNames() const -{ - TQStringList res; - for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) - res << (*it)->makeRelative( (*it)->fileName() ); - return res; -} - -Project *MainWindow::findProject( const TQString &projectName ) const -{ - for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) { - if ( (*it)->projectName() == projectName ) - return *it; - } - return 0; -} - -void MainWindow::setCurrentProject( Project *pro ) -{ - for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) { - if ( *it == pro ) { - projectSelected( it.key() ); - return; - } - } -} - -void MainWindow::setCurrentProjectByFilename( const TQString& proFilename ) -{ - for ( TQMap::ConstIterator it = projects.begin(); it != projects.end(); ++it ) { - if ( (*it)->makeRelative( (*it)->fileName() ) == proFilename ) { - projectSelected( it.key() ); - return; - } - } -} - - -void MainWindow::recentlyFilesMenuActivated( int id ) -{ - if ( id != -1 ) { - if ( !TQFile::exists( *recentlyFiles.at( id ) ) ) { - TQMessageBox::warning( this, i18n( "Open File" ), - i18n( "Could not open '%1'. File does not exist." ). - arg( *recentlyFiles.at( id ) ) ); - recentlyFiles.remove( recentlyFiles.at( id ) ); - return; - } - fileOpen( "", "", *recentlyFiles.at( id ) ); - TQString fn( *recentlyFiles.at( id ) ); - addRecentlyOpened( fn, recentlyFiles ); - } -} - -void MainWindow::recentlyProjectsMenuActivated( int id ) -{ - if ( id != -1 ) { - if ( !TQFile::exists( *recentlyProjects.at( id ) ) ) { - TQMessageBox::warning( this, i18n( "Open Project" ), - i18n( "Could not open '%1'. File does not exist." ). - arg( *recentlyProjects.at( id ) ) ); - recentlyProjects.remove( recentlyProjects.at( id ) ); - return; - } - openProject( *recentlyProjects.at( id ) ); - TQString fn( *recentlyProjects.at( id ) ); - addRecentlyOpened( fn, recentlyProjects ); - } -} - -void MainWindow::addRecentlyOpened( const TQString &fn, TQStringList &lst ) -{ - TQFileInfo fi( fn ); - fi.convertToAbs(); - TQString f = fi.filePath(); - if ( lst.find( f ) != lst.end() ) - lst.remove( f ); - if ( lst.count() >= 10 ) - lst.pop_back(); - lst.prepend( f ); -} - -TemplateWizardInterface * MainWindow::templateWizardInterface( const TQString& className ) -{ - TemplateWizardInterface* iface = 0; - templateWizardPluginManager->queryInterface( className, & iface ); - return iface; -} - -void MainWindow::setupPluginManagers() -{ - editorPluginManager = new TQPluginManager( IID_Editor, TQApplication::libraryPaths(), "/tdevdesigner" ); - MetaDataBase::setEditor( editorPluginManager->featureList() ); - - templateWizardPluginManager = - new TQPluginManager( IID_TemplateWizard, TQApplication::libraryPaths(), pluginDirectory() ); - - MetaDataBase::setupInterfaceManagers( "/designer" ); - preferencePluginManager = - new TQPluginManager( IID_Preference, TQApplication::libraryPaths(), pluginDirectory() ); - projectSettingsPluginManager = - new TQPluginManager( IID_ProjectSettings, TQApplication::libraryPaths(), pluginDirectory() ); - sourceTemplatePluginManager = - new TQPluginManager( IID_SourceTemplate, TQApplication::libraryPaths(), pluginDirectory() ); - - if ( preferencePluginManager ) { - TQStringList lst = preferencePluginManager->featureList(); - for ( TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { - PreferenceInterface *i = 0; - preferencePluginManager->queryInterface( *it, &i ); - if ( !i ) - continue; - i->connectTo( designerInterface() ); - PreferenceInterface::Preference *pf = i->preference(); - if ( pf ) - addPreferencesTab( pf->tab, pf->title, pf->receiver, pf->init_slot, pf->accept_slot ); - i->deletePreferenceObject( pf ); - - i->release(); - } - } - if ( projectSettingsPluginManager ) { - TQStringList lst = projectSettingsPluginManager->featureList(); - for ( TQStringList::ConstIterator it = lst.begin(); it != lst.end(); ++it ) { - ProjectSettingsInterface *i = 0; - projectSettingsPluginManager->queryInterface( *it, &i ); - if ( !i ) - continue; - i->connectTo( designerInterface() ); - - ProjectSettingsInterface::ProjectSettings *pf = i->projectSetting(); - if ( pf ) - addProjectTab( pf->tab, pf->title, pf->receiver, pf->init_slot, pf->accept_slot ); - i->deleteProjectSettingsObject( pf ); - i->release(); - } - } -} - -void MainWindow::addPreferencesTab( TQWidget *tab, const TQString &title, TQObject *receiver, const char *init_slot, const char *accept_slot ) -{ - Tab t; - t.w = tab; - t.title = title; - t.receiver = receiver; - t.init_slot = init_slot; - t.accept_slot = accept_slot; - preferenceTabs << t; -} - -void MainWindow::addProjectTab( TQWidget *tab, const TQString &title, TQObject *receiver, const char *init_slot, const char *accept_slot ) -{ - Tab t; - t.w = tab; - t.title = title; - t.receiver = receiver; - t.init_slot = init_slot; - t.accept_slot = accept_slot; - projectTabs << t; -} - -void MainWindow::setModified( bool b, TQWidget *window ) -{ - TQWidget *w = window; - while ( w ) { - if ( ::tqqt_cast(w) ) { - ( (FormWindow*)w )->modificationChanged( b ); - return; - } else if ( ::tqqt_cast(w) ) { - FormWindow *fw = ( (SourceEditor*)w )->formWindow(); - if ( fw && !fw->isFake() ) { - //fw->commandHistory()->setModified( b ); - //fw->modificationChanged( b ); - fw->formFile()->setModified( b, FormFile::WFormCode ); - wspace->update( fw->formFile() ); - } else { - wspace->update(); - } - return; - } - w = w->parentWidget( TRUE ); - } -} - -void MainWindow::editorClosed( SourceEditor *e ) -{ - sourceEditors.take( sourceEditors.findRef( e ) ); -} - -void MainWindow::functionsChanged() -{ - updateFunctionsTimer->start( 0, TRUE ); -} - -void MainWindow::doFunctionsChanged() -{ - for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) - e->refresh( FALSE ); - hierarchyView->formDefinitionView()->refresh(); -} - -void MainWindow::updateFunctionList() -{ - if ( !qWorkspace()->activeWindow() || !::tqqt_cast(qWorkspace()->activeWindow()) ) - return; - SourceEditor *se = (SourceEditor*)qWorkspace()->activeWindow(); - se->save(); - hierarchyView->formDefinitionView()->refresh(); - if ( !currentProject->isCpp() && se->formWindow() ) { - LanguageInterface *iface = MetaDataBase::languageInterface( currentProject->language() ); - if ( !iface ) - return; - TQValueList conns; - iface->connections( se->text(), &conns ); - MetaDataBase::setupConnections( TQT_TQOBJECT(se->formWindow()), conns ); - propertyEditor->eventList()->setup(); - } -} - -void MainWindow::updateWorkspace() -{ - wspace->setCurrentProject( currentProject ); -} - -void MainWindow::showDebugStep( TQObject *o, int line ) -{ - for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) - e->clearStep(); - if ( !o || line == -1 ) - return; - showSourceLine( o, line, Step ); -} - -void MainWindow::showStackFrame( TQObject *o, int line ) -{ - if ( !o || line == -1 ) - return; - showSourceLine( o, line, StackFrame ); -} - -void MainWindow::showErrorMessage( TQObject *o, int errorLine, const TQString &errorMessage ) -{ - if ( o ) { - errorLine--; // ###### - TQValueList l; - l << ( errorLine + 1 ); - TQStringList l2; - l2 << errorMessage; - TQObjectList ol; - ol.append( o ); - TQStringList ll; - ll << currentProject->locationOfObject( o ); - oWindow->setErrorMessages( l2, l, TRUE, ll, ol ); - showSourceLine( o, errorLine, Error ); - } -} - -void MainWindow::finishedRun() -{ - inDebugMode = FALSE; - previewing = FALSE; - debuggingForms.clear(); - enableAll( TRUE ); - for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { - if ( e->project() == currentProject ) - e->editorInterface()->setMode( EditorInterface::Editing ); - e->clearStackFrame(); - } - outputWindow()->clearErrorMessages(); -} - -void MainWindow::enableAll( bool enable ) -{ - menuBar()->setEnabled( enable ); - TQObjectList *l = queryList( TQDOCKWINDOW_OBJECT_NAME_STRING ); - for ( TQObject *o = l->first(); o; o = l->next() ) { - if ( TQT_BASE_OBJECT(o) == wspace->parentWidget() || - TQT_BASE_OBJECT(o) == oWindow->parentWidget() || - TQT_BASE_OBJECT(o) == hierarchyView->parentWidget() ) - continue; - ( (TQWidget*)o )->setEnabled( enable ); - } - delete l; -} - -void MainWindow::showSourceLine( TQObject *o, int line, LineMode lm ) -{ - TQWidgetList windows = qworkspace->windowList(); - for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - FormWindow *fw = 0; - SourceEditor *se = 0; - SourceFile *sf = 0; - if ( ::tqqt_cast(w) ) { - fw = (FormWindow*)w; - } else if ( ::tqqt_cast(w) ) { - se = (SourceEditor*)w; - if ( !se->object() ) - continue; - if ( se->formWindow() ) - fw = se->formWindow(); - else - sf = se->sourceFile(); - } - - if ( fw ) { - if ( fw->project() != currentProject ) - continue; - if ( qstrcmp( fw->name(), o->name() ) == 0 || - fw->isFake() && currentProject->objectForFakeForm( fw ) == o ) { - if ( se ) { - switch ( lm ) { - case Error: - se->editorInterface()->setError( line ); - break; - case Step: - se->editorInterface()->setStep( line ); - break; - case StackFrame: - se->editorInterface()->setStackFrame( line ); - break; - } - return; - } else { - fw->showNormal(); - fw->setFocus(); - lastActiveFormWindow = fw; - tqApp->processEvents(); - se = editSource(); - if ( se ) { - switch ( lm ) { - case Error: - se->editorInterface()->setError( line ); - break; - case Step: - se->editorInterface()->setStep( line ); - break; - case StackFrame: - se->editorInterface()->setStackFrame( line ); - break; - } - return; - } - } - } - } else if ( se ) { - if ( o != sf ) - continue; - switch ( lm ) { - case Error: - se->editorInterface()->setError( line ); - break; - case Step: - se->editorInterface()->setStep( line ); - break; - case StackFrame: - se->editorInterface()->setStackFrame( line ); - break; - } - return; - } - } - - if ( ::tqqt_cast(o) ) { - for ( TQPtrListIterator sources = currentProject->sourceFiles(); - sources.current(); ++sources ) { - SourceFile* f = sources.current(); - if ( f == o ) { - SourceEditor *se = editSource( f ); - if ( se ) { - switch ( lm ) { - case Error: - se->editorInterface()->setError( line ); - break; - case Step: - se->editorInterface()->setStep( line ); - break; - case StackFrame: - se->editorInterface()->setStackFrame( line ); - break; - } - } - return; - } - } - } - - FormFile *ff = currentProject->fakeFormFileFor( o ); - FormWindow *fw = 0; - if ( ff ) - fw = ff->formWindow(); - - if ( !fw && !qwf_forms ) { - tqWarning( "MainWindow::showSourceLine: qwf_forms is NULL!" ); - return; - } - - mblockNewForms = TRUE; - if ( !fw ) - openFormWindow( currentProject->makeAbsolute( *qwf_forms->find( (TQWidget*)o ) ) ); - else - fw->formFile()->showEditor( FALSE ); - tqApp->processEvents(); // give all views the chance to get the formwindow - SourceEditor *se = editSource(); - if ( se ) { - switch ( lm ) { - case Error: - se->editorInterface()->setError( line ); - break; - case Step: - se->editorInterface()->setStep( line ); - break; - case StackFrame: - se->editorInterface()->setStackFrame( line ); - break; - } - } - mblockNewForms = FALSE; -} - - -TQObject *MainWindow::findRealObject( TQObject *o ) -{ - TQWidgetList windows = qWorkspace()->windowList(); - for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - if ( ::tqqt_cast(w) && TQString( w->name() ) == TQString( o->name() ) ) - return TQT_TQOBJECT(w); - else if ( ::tqqt_cast(w) && ( (SourceEditor*)w )->formWindow() && - TQString( ( (SourceEditor*)w )->formWindow()->name() ) == TQString( o->name() ) ) - return TQT_TQOBJECT(w); - else if ( ::tqqt_cast(w) && ( (SourceEditor*)w )->sourceFile() && - ( (SourceEditor*)w )->sourceFile() == o ) - return o; - } - return 0; -} - -void MainWindow::formNameChanged( FormWindow *fw ) -{ - for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { - if ( TQT_BASE_OBJECT(e->object()) == TQT_BASE_OBJECT(fw) ) - e->refresh( TRUE ); - if ( e->project() == fw->project() ) - e->resetContext(); - } -} - -void MainWindow::breakPointsChanged() -{ - if ( !inDebugMode ) - return; - if ( !qWorkspace()->activeWindow() || !::tqqt_cast(qWorkspace()->activeWindow()) ) - return; - SourceEditor *e = (SourceEditor*)qWorkspace()->activeWindow(); - if ( !e->object() || !e->project() ) - return; - if ( e->project() != currentProject ) - return; - - if ( !interpreterPluginManager ) { - interpreterPluginManager = - new TQPluginManager( IID_Interpreter, - TQApplication::libraryPaths(), - "/qsa" ); - } - - InterpreterInterface *iiface = 0; - if ( interpreterPluginManager ) { - TQString lang = currentProject->language(); - iiface = 0; - interpreterPluginManager->queryInterface( lang, &iiface ); - if ( !iiface ) - return; - } - - e->saveBreakPoints(); - - for ( TQObject *o = debuggingForms.first(); o; o = debuggingForms.next() ) { - if ( qstrcmp( o->name(), e->object()->name() ) == 0 ) { - iiface->setBreakPoints( o, MetaDataBase::breakPoints( e->object() ) ); - break; - } - } - - for ( e = sourceEditors.first(); e; e = sourceEditors.next() ) { - if ( e->project() == currentProject && e->sourceFile() ) { - TQValueList bps = MetaDataBase::breakPoints( e->sourceFile() ); - iiface->setBreakPoints( e->object(), bps ); - } - } - - iiface->release(); -} - -int MainWindow::currentLayoutDefaultSpacing() const -{ - if ( ( (MainWindow*)this )->formWindow() ) - return ( (MainWindow*)this )->formWindow()->layoutDefaultSpacing(); - return BOXLAYOUT_DEFAULT_SPACING; -} - -int MainWindow::currentLayoutDefaultMargin() const -{ - if ( ( (MainWindow*)this )->formWindow() ) - return ( (MainWindow*)this )->formWindow()->layoutDefaultMargin(); - return BOXLAYOUT_DEFAULT_MARGIN; -} - -void MainWindow::saveAllBreakPoints() -{ - for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { - e->save(); - e->saveBreakPoints(); - } -} - -void MainWindow::resetBreakPoints() -{ - for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) - e->resetBreakPoints(); -} - -SourceFile *MainWindow::sourceFile() -{ - for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { - if ( qworkspace->activeWindow() == e ) { - if ( e->sourceFile() ) - return e->sourceFile(); - } - } - return 0; -} - -bool MainWindow::openProjectSettings( Project *pro ) -{ - ProjectSettings dia( pro, this, 0, TRUE ); - SenderObject *senderObject = new SenderObject( designerInterface() ); - TQValueList::ConstIterator it; - for ( it = projectTabs.begin(); it != projectTabs.end(); ++it ) { - Tab t = *it; - if ( t.title != pro->language() ) - continue; - dia.tabWidget->addTab( t.w, t.title ); - if ( t.receiver ) { - connect( dia.buttonOk, TQT_SIGNAL( clicked() ), senderObject, TQT_SLOT( emitAcceptSignal() ) ); - connect( senderObject, TQT_SIGNAL( acceptSignal( TQUnknownInterface * ) ), t.receiver, t.accept_slot ); - connect( senderObject, TQT_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot ); - senderObject->emitInitSignal(); - disconnect( senderObject, TQT_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot ); - } - } - - if ( singleProject ) - dia.tabWidget->setTabEnabled( dia.tabSettings, FALSE ); - - int res = dia.exec(); - - delete senderObject; - - for ( it = projectTabs.begin(); it != projectTabs.end(); ++it ) { - Tab t = *it; - dia.tabWidget->removePage( t.w ); - t.w->reparent( 0, TQPoint(0,0), FALSE ); - } - - return res == TQDialog::Accepted; -} - -void MainWindow::popupProjectMenu( const TQPoint &pos ) -{ - projectMenu->exec( pos ); -} - -TQStringList MainWindow::sourceTemplates() const -{ - return sourceTemplatePluginManager->featureList(); -} - -SourceTemplateInterface* MainWindow::sourceTemplateInterface( const TQString& templ ) -{ - SourceTemplateInterface *iface = 0; - sourceTemplatePluginManager->queryInterface( templ, &iface); - return iface; -} - -TQString MainWindow::whatsThisFrom( const TQString &key ) -{ - if ( menuHelpFile.isEmpty() ) { - TQString fn( documentationPath() ); - fn += "/designer-manual-11.html"; - TQFile f( fn ); - if ( f.open( IO_ReadOnly ) ) { - TQTextStream ts( &f ); - menuHelpFile = ts.read(); - } - } - - int i = menuHelpFile.find( key ); - if ( i == -1 ) - return TQString(); - int start = i; - int end = i; - start = menuHelpFile.findRev( "
  • ", i ) + 4; - end = menuHelpFile.find( '\n', i ) - 1; - return menuHelpFile.mid( start, end - start + 1 ); -} - -void MainWindow::setSingleProject( Project *pro ) -{ - if ( eProject ) { - Project *pro = eProject; - pro->save(); - TQWidgetList windows = qWorkspace()->windowList(); - qWorkspace()->blockSignals( TRUE ); - TQWidgetListIt wit( windows ); - while ( wit.current() ) { - TQWidget *w = wit.current(); - ++wit; - if ( ::tqqt_cast(w) ) { - if ( ( (FormWindow*)w )->project() == pro ) { - if ( ( (FormWindow*)w )->formFile()->editor() ) - windows.removeRef( ( (FormWindow*)w )->formFile()->editor() ); - ( (FormWindow*)w )->formFile()->close(); - } - } else if ( ::tqqt_cast(w) ) { - ( (SourceEditor*)w )->close(); - } - } - hierarchyView->clear(); - windows = qWorkspace()->windowList(); - qWorkspace()->blockSignals( FALSE ); - currentProject = 0; - updateUndoRedo( FALSE, FALSE, TQString(), TQString() ); - } - - singleProject = TRUE; - projects.clear(); - TQAction *a = new TQAction( i18n( pro->name() ), i18n( pro->name() ), 0, - actionGroupProjects, 0, TRUE ); - eProject = pro; - projects.insert( a, eProject ); - a->setOn( TRUE ); - actionGroupProjects->removeFrom( projectMenu ); - actionGroupProjects->removeFrom( projectToolBar ); - currentProject = eProject; - currentProject->designerCreated(); -} - -void MainWindow::shuttingDown() -{ - outputWindow()->shuttingDown(); -} - -void MainWindow::showGUIStuff( bool b ) -{ - if ( (bool)guiStuffVisible == b ) - return; - guiStuffVisible = b; - if ( !b ) { - setAppropriate( (TQDockWindow*)toolBox->parentWidget(), FALSE ); - toolBox->parentWidget()->hide(); - for ( TQToolBar *tb = widgetToolBars.first(); tb; tb = widgetToolBars.next() ) { - tb->hide(); - setAppropriate( tb, FALSE ); - } - propertyEditor->setPropertyEditorEnabled( FALSE ); - setAppropriate( layoutToolBar, FALSE ); - layoutToolBar->hide(); - setAppropriate( toolsToolBar, FALSE ); - toolsToolBar->hide(); - menubar->removeItem( toolsMenuId ); - menubar->removeItem( toolsMenuId + 1 ); - menubar->removeItem( toolsMenuId + 2 ); - disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) ); - disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) ); - disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQT_SLOT( setEnabled(bool) ) ); - disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQT_SLOT( setEnabled(bool) ) ); - disconnect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQT_SLOT( setEnabled(bool) ) ); - actionEditFormSettings->setEnabled( FALSE ); - actionEditSource->setEnabled( FALSE ); - actionEditConnections->setEnabled( FALSE ); - actionEditFunctions->setEnabled( FALSE ); - actionEditAccels->setEnabled( FALSE ); - ( (TQDockWindow*)propertyEditor->parentWidget() )-> - setCaption( i18n( "Signal Handlers" ) ); - actionGroupNew->removeFrom( fileMenu ); - actionGroupNew->removeFrom( projectToolBar ); - actionFileSave->removeFrom( fileMenu ); - actionFileSave->removeFrom( projectToolBar ); - actionFileExit->removeFrom( fileMenu ); - actionNewFile->addTo( fileMenu ); - actionNewFile->addTo( projectToolBar ); - actionFileSave->addTo( fileMenu ); - actionFileSave->addTo( projectToolBar ); - actionFileExit->addTo( fileMenu ); - } else { - setAppropriate( (TQDockWindow*)toolBox->parentWidget(), TRUE ); - toolBox->parentWidget()->show(); - for ( TQToolBar *tb = widgetToolBars.first(); tb; tb = widgetToolBars.next() ) { - setAppropriate( tb, TRUE ); - tb->hide(); - } - propertyEditor->setPropertyEditorEnabled( TRUE ); - setAppropriate( layoutToolBar, TRUE ); - layoutToolBar->show(); - setAppropriate( toolsToolBar, TRUE ); - toolsToolBar->show(); - menubar->insertItem( i18n( "&Tools" ), toolsMenu, toolsMenuId, toolsMenuIndex ); - menubar->insertItem( i18n( "&Layout" ), layoutMenu, toolsMenuId + 1, toolsMenuIndex + 1 ); - menubar->insertItem( i18n( "&Preview" ), previewMenu, toolsMenuId + 2, toolsMenuIndex + 2 ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQT_SLOT( setEnabled(bool) ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQT_SLOT( setEnabled(bool) ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQT_SLOT( setEnabled(bool) ) ); - actionEditFormSettings->setEnabled( TRUE ); - actionEditSource->setEnabled( TRUE ); - actionEditConnections->setEnabled( TRUE ); - actionEditFunctions->setEnabled( TRUE ); - actionEditAccels->setEnabled( TRUE ); - ( (TQDockWindow*)propertyEditor->parentWidget() )-> - setCaption( i18n( "Property Editor/Signal Handlers" ) ); - actionFileSave->removeFrom( fileMenu ); - actionFileSave->removeFrom( projectToolBar ); - actionFileExit->removeFrom( fileMenu ); - actionGroupNew->addTo( fileMenu ); - actionGroupNew->addTo( projectToolBar ); - actionFileSave->addTo( fileMenu ); - actionFileSave->addTo( projectToolBar ); - actionFileExit->addTo( fileMenu ); - } -} - -void MainWindow::setEditorsReadOnly( bool b ) -{ - editorsReadOnly = b; -} - -void MainWindow::setPluginDirectory( const TQString &pd ) -{ - pluginDir = pd; - if ( !qwf_plugin_dir ) - qwf_plugin_dir = new TQString( pd ); - else - *qwf_plugin_dir = pd; -} - -void MainWindow::toggleSignalHandlers( bool show ) -{ - if ( sSignalHandlers == show ) - return; - sSignalHandlers = show; - propertyEditor->setSignalHandlersEnabled( show ); -} - -void MainWindow::statusMessage( const TQString &msg ) -{ - m_part->statusMessage(msg); -} diff --git a/tdevdesigner/designer/mainwindow.h b/tdevdesigner/designer/mainwindow.h deleted file mode 100644 index f22d371f..00000000 --- a/tdevdesigner/designer/mainwindow.h +++ /dev/null @@ -1,513 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#ifndef MAINWINDOW_H -#define MAINWINDOW_H - -#include "metadatabase.h" -#include "../interfaces/actioninterface.h" // for GCC 2.7.* compatibility -#include "../interfaces/editorinterface.h" -#include "../interfaces/templatewizardiface.h" -#include "../interfaces/languageinterface.h" -#include "../interfaces/filterinterface.h" -#include "../interfaces/interpreterinterface.h" -#include "../interfaces/preferenceinterface.h" -#include "../interfaces/projectsettingsiface.h" -#include "../interfaces/sourcetemplateiface.h" -#include "sourceeditor.h" - -#include -#include -#include -#include -#include -#include - -class TQToolBox; -class PropertyEditor; -class TQWorkspace; -class TQMenuBar; -class FormWindow; -class TQPopupMenu; -class HierarchyView; -class TQCloseEvent; -class Workspace; -class ActionEditor; -class Project; -class OutputWindow; -class TQTimer; -class FindDialog; -struct DesignerProject; -class ReplaceDialog; -class GotoLineDialog; -class SourceFile; -class FormFile; -class TQAssistantClient; -class DesignerAction; - -#if defined(TQ_FULL_TEMPLATE_INSTANTIATION) -#include -#else -class TQToolBar; -#endif -class Preferences; - -class TDevDesignerPart; - -class MainWindow : public TQMainWindow -{ - Q_OBJECT - - -public: - enum LineMode { Error, Step, StackFrame }; - - MainWindow( TDevDesignerPart *part, bool asClient, bool single = FALSE, const TQString &plgDir = "/designer" ); - ~MainWindow(); - - HierarchyView *objectHierarchy() const; - Workspace *workspace() const; - PropertyEditor *propertyeditor() const; - ActionEditor *actioneditor() const; - - void resetTool(); - int currentTool() const; - - FormWindow *formWindow(); - - bool unregisterClient( FormWindow *w ); - void editorClosed( SourceEditor *e ); - TQWidget *isAFormWindowChild( TQObject *o ) const; - TQWidget *isAToolBarChild( TQObject *o ) const; - - void insertFormWindow( FormWindow *fw ); - TQWorkspace *qWorkspace() const; - - void popupFormWindowMenu( const TQPoint &gp, FormWindow *fw ); - void popupWidgetMenu( const TQPoint &gp, FormWindow *fw, TQWidget *w ); - - TQPopupMenu *setupNormalHierarchyMenu( TQWidget *parent ); - TQPopupMenu *setupTabWidgetHierarchyMenu( TQWidget *parent, const char *addSlot, const char *removeSlot ); - - FormWindow *openFormWindow( const TQString &fn, bool validFileName = TRUE, FormFile *ff = 0 ); - bool isCustomWidgetUsed( MetaDataBase::CustomWidget *w ); - - void setGrid( const TQPoint &p ); - void setShowGrid( bool b ); - void setSnapGrid( bool b ); - TQPoint grid() const { return grd; } - bool showGrid() const { return sGrid; } - bool snapGrid() const { return snGrid && sGrid; } - - TQString documentationPath() const; - - static MainWindow *self; - - TQString templatePath() const { return templPath; } - - void editFunction( const TQString &func, bool rereadSource = FALSE ); - - bool isPreviewing() const { return previewing; } - - Project *currProject() const { return currentProject; } - - FormWindow *activeForm() const { return lastActiveFormWindow; } - - TemplateWizardInterface* templateWizardInterface( const TQString& className ); - TQStringList sourceTemplates() const; - SourceTemplateInterface* sourceTemplateInterface( const TQString& templ ); - TQUnknownInterface* designerInterface() const { return desInterface; } - TQPtrList projectList() const; - TQStringList projectNames() const; - TQStringList projectFileNames() const; - Project *findProject( const TQString &projectName ) const; - void setCurrentProject( Project *pro ); - void setCurrentProjectByFilename( const TQString& proFilename ); - OutputWindow *outputWindow() const { return oWindow; } - void addPreferencesTab( TQWidget *tab, const TQString &title, TQObject *receiver, const char *init_slot, const char *accept_slot ); - void addProjectTab( TQWidget *tab, const TQString &title, TQObject *receiver, const char *init_slot, const char *accept_slot ); - void setModified( bool b, TQWidget *window ); - void functionsChanged(); - void updateFunctionList(); - void updateWorkspace(); - void runProjectPrecondition(); - void runProjectPostcondition( TQObjectList *l ); - - void formNameChanged( FormWindow *fw ); - - int currentLayoutDefaultSpacing() const; - int currentLayoutDefaultMargin() const; - - void saveAllBreakPoints(); - void resetBreakPoints(); - - SourceFile *sourceFile(); - void createNewProject( const TQString &lang ); - - void popupProjectMenu( const TQPoint &pos ); - TQObject *findRealObject( TQObject *o ); - - void setSingleProject( Project *pro ); - bool singleProjectMode() const { return singleProject; } - - void showSourceLine( TQObject *o, int line, LineMode lm ); - - void shuttingDown(); - void showGUIStuff( bool b ); - void setEditorsReadOnly( bool b ); - bool areEditorsReadOnly() const { return editorsReadOnly; } - void toggleSignalHandlers( bool show ); - bool showSignalHandlers() const { return sSignalHandlers; } - void writeConfig(); - - void openProject( const TQString &fn ); - void setPluginDirectory( const TQString &pd ); - TQString pluginDirectory() const { return pluginDir; } - - TQAssistantClient* assistantClient() const { return assistant; } - - void addRecentlyOpenedFile( const TQString &fn ) { addRecentlyOpened( fn, recentlyFiles ); } - - void statusMessage(const TQString &msg); - - //integration - TDevDesignerPart *part() const { return m_part; } - -public slots: - void showProperties( TQObject *w ); - void updateProperties( TQObject *w ); - void showDialogHelp(); - void showDebugStep( TQObject *o, int line ); - void showStackFrame( TQObject *o, int line ); - void showErrorMessage( TQObject *o, int line, const TQString &errorMessage ); - void finishedRun(); - void breakPointsChanged(); - -signals: - void currentToolChanged(); - void hasActiveForm( bool ); - void hasActiveWindow( bool ); - void hasActiveWindowOrProject( bool ); - void hasNonDummyProject( bool ); - void formModified( bool ); - void formWindowsChanged(); - void formWindowChanged(); - void projectChanged(); - void editorChanged(); - -protected: - bool eventFilter( TQObject *o, TQEvent *e ); - void closeEvent( TQCloseEvent *e ); - -public slots: - void fileNew(); - void fileNewDialog(); - void fileNewFile(); - void fileClose(); - void fileQuit(); - void fileCloseProject(); // not visible in menu, called from fileClose - void fileOpen(); - void fileOpen( const TQString &filter, const TQString &extension, const TQString &filename = "" , bool inProject = TRUE ); - bool fileSave(); - bool fileSaveForm(); // not visible in menu, called from fileSave - bool fileSaveProject(); // not visible in menu, called from fileSaveProject - bool fileSaveAs(); - void fileSaveAll(); - void fileCreateTemplate(); - -public slots: - void editUndo(); - void editRedo(); - void editCut(); - void editCopy(); - void editPaste(); - void editDelete(); - void editSelectAll(); - void editLower(); - void editRaise(); - void editAdjustSize(); - void editLayoutHorizontal(); - void editLayoutVertical(); - void editLayoutHorizontalSplit(); - void editLayoutVerticalSplit(); - void editLayoutGrid(); - void editLayoutContainerHorizontal(); - void editLayoutContainerVertical(); - void editLayoutContainerGrid(); - void editBreakLayout(); - void editAccels(); - void editFunctions(); - void editConnections(); - SourceEditor *editSource(); - SourceEditor *editSource( SourceFile *f ); - SourceEditor *openSourceEditor(); - SourceEditor *createSourceEditor( TQObject *object, Project *project, - const TQString &lang = TQString(), - const TQString &func = TQString(), - bool rereadSource = FALSE ); - void editFormSettings(); - void editProjectSettings(); - void editPixmapCollection(); - void editDatabaseConnections(); - void editPreferences(); - - void projectInsertFile(); - - void searchFind(); - void searchIncremetalFindMenu(); - void searchIncremetalFind(); - void searchIncremetalFindNext(); - void searchReplace(); - void searchGotoLine(); - - void previewForm(); - void previewForm( const TQString& ); - - void toolsCustomWidget(); - void toolsConfigure(); - - void helpContents(); - void helpManual(); - void helpAbout(); - void helpAboutQt(); - void helpRegister(); - -private slots: - void activeWindowChanged( TQWidget *w ); - void updateUndoRedo( bool, bool, const TQString &, const TQString & ); - void updateEditorUndoRedo(); - - void toolSelected( TQAction* ); - - void clipboardChanged(); - void selectionChanged(); - - void windowsMenuActivated( int id ); - void setupWindowActions(); - - void createNewTemplate(); - void projectSelected( TQAction *a ); - - void setupRecentlyFilesMenu(); - void setupRecentlyProjectsMenu(); - void recentlyFilesMenuActivated( int id ); - void recentlyProjectsMenuActivated( int id ); - - void emitProjectSignals(); - - void showStartDialog(); - -private: - void setupMDI(); - void setupMenuBar(); - void setupEditActions(); - void setupProjectActions(); - void setupSearchActions(); - void setupToolActions(); - void setupLayoutActions(); - void setupFileActions(); - void setupPreviewActions(); - void setupHelpActions(); - void setupRMBMenus(); - - void setupPropertyEditor(); - void setupHierarchyView(); - void setupWorkspace(); - void setupActionEditor(); - void setupOutputWindow(); - void setupToolbox(); - - void setupActionManager(); - void setupPluginManagers(); - - void enableAll( bool enable ); - - TQWidget* previewFormInternal( TQStyle* style = 0, TQPalette* pal = 0 ); - - void readConfig(); - - void setupRMBProperties( TQValueList &ids, TQMap &props, TQWidget *w ); - void handleRMBProperties( int id, TQMap &props, TQWidget *w ); - void setupRMBSpecialCommands( TQValueList &ids, TQMap &commands, TQWidget *w ); - void handleRMBSpecialCommands( int id, TQMap &commands, TQWidget *w ); - void setupRMBSpecialCommands( TQValueList &ids, TQMap &commands, FormWindow *w ); - void handleRMBSpecialCommands( int id, TQMap &commands, FormWindow *w ); - bool openEditor( TQWidget *w, FormWindow *fw ); - void rebuildCustomWidgetGUI(); - void rebuildCommonWidgetsToolBoxPage(); - void checkTempFiles(); - - void addRecentlyOpened( const TQString &fn, TQStringList &lst ); - - TQString whatsThisFrom( const TQString &key ); - -private slots: - void doFunctionsChanged(); - bool openProjectSettings( Project *pro ); - -private: - struct Tab - { - TQWidget *w; - TQString title; - TQObject *receiver; - const char *init_slot, *accept_slot; - TQ_DUMMY_COMPARISON_OPERATOR( Tab ) - }; - -private: - PropertyEditor *propertyEditor; - HierarchyView *hierarchyView; - Workspace *wspace; - TQWidget *lastPressWidget; - TQWorkspace *qworkspace; - TQMenuBar *menubar; - TQGuardedPtr lastActiveFormWindow; - bool breakLayout, layoutChilds, layoutSelected; - TQPoint grd; - bool sGrid, snGrid; - bool restoreConfig; - bool backPix; - bool splashScreen; - TQString fileFilter; - - TQMap projects; - DesignerAction *actionEditUndo, *actionEditRedo, *actionEditCut, *actionEditCopy, - *actionEditPaste, *actionEditDelete, - *actionEditAdjustSize, - *actionEditHLayout, *actionEditVLayout, *actionEditGridLayout, - *actionEditSplitHorizontal, *actionEditSplitVertical, - *actionEditSelectAll, *actionEditBreakLayout, *actionEditFunctions, *actionEditConnections, - *actionEditLower, *actionEditRaise; - TQAction *actionInsertSpacer; - TQActionGroup *actionGroupTools, *actionGroupProjects; - TQAction* actionPointerTool, *actionConnectTool, *actionOrderTool, *actionBuddyTool; - TQAction* actionCurrentTool; - DesignerAction *actionHelpContents, *actionHelpAbout, *actionHelpAboutTQt, *actionHelpWhatsThis; - DesignerAction *actionHelpManual; -#if defined(TQT_NON_COMMERCIAL) - DesignerAction *actionHelpRegister; -#endif - DesignerAction *actionToolsCustomWidget, *actionEditPreferences; - DesignerAction *actionWindowTile, *actionWindowCascade, *actionWindowClose, *actionWindowCloseAll; - DesignerAction *actionWindowNext, *actionWindowPrevious; - DesignerAction *actionEditFormSettings, *actionEditAccels; - DesignerAction *actionEditSource, *actionNewFile, *actionFileSave, *actionFileExit; - DesignerAction *actionFileClose, *actionFileSaveAs, *actionFileSaveAll; - DesignerAction *actionSearchFind, *actionSearchIncremetal, *actionSearchReplace, *actionSearchGotoLine; - DesignerAction *actionProjectAddFile, *actionEditPixmapCollection, *actionEditDatabaseConnections, - *actionEditProjectSettings, *actionPreview; - TQActionGroup *actionGroupNew; - - TQPopupMenu *rmbWidgets; - TQPopupMenu *rmbFormWindow; - TQPopupMenu *customWidgetMenu, *windowMenu, *fileMenu, *recentlyFilesMenu, *recentlyProjectsMenu; - TQPopupMenu *toolsMenu, *layoutMenu, *previewMenu; - TQToolBar *customWidgetToolBar, *layoutToolBar, *projectToolBar, *customWidgetToolBar2, *toolsToolBar; - TQToolBar *commonWidgetsToolBar; - TQPtrList widgetToolBars; - - Preferences *prefDia; - TQMap propertyDocumentation; - bool client; - TQString templPath; - ActionEditor *actionEditor; - Project *currentProject; - TQPluginManager *actionPluginManager; - TQPluginManager *editorPluginManager; - TQPluginManager *templateWizardPluginManager; - TQPluginManager *interpreterPluginManager; - TQPluginManager *preferencePluginManager; - TQPluginManager *projectSettingsPluginManager; - TQPluginManager *sourceTemplatePluginManager; - TQPtrList sourceEditors; - bool previewing; - TQUnknownInterface *desInterface; - TQStringList recentlyFiles; - TQStringList recentlyProjects; - OutputWindow *oWindow; - TQValueList preferenceTabs; - TQValueList projectTabs; - bool databaseAutoEdit; - TQTimer *updateFunctionsTimer; - TQTimer *autoSaveTimer; - bool autoSaveEnabled; - int autoSaveInterval; - TQLineEdit *incrementalSearch; - TQGuardedPtr findDialog; - TQGuardedPtr replaceDialog; - TQGuardedPtr gotoLineDialog; - Project *eProject; - bool inDebugMode; - TQObjectList debuggingForms; - TQString lastOpenFilter; - TQGuardedPtr previewedForm; - TQPopupMenu *projectMenu; - TQString menuHelpFile; - bool singleProject; - TQToolBox *toolBox; - int toolsMenuId, toolsMenuIndex; - uint guiStuffVisible : 1; - uint editorsReadOnly : 1; - uint savePluginPaths : 1; - TQAssistantClient *assistant; - bool shStartDialog; - TQString pluginDir; - bool sSignalHandlers; - - TDevDesignerPart *m_part; - -public: - TQString lastSaveFilter; - TQPtrList toolActions; - TQPtrList commonWidgetsPage; - -friend class TDevDesignerPart; -}; - -class SenderObject : public TQObject -{ - Q_OBJECT - - -public: - SenderObject( TQUnknownInterface *i ) : iface( i ) { iface->addRef(); } - ~SenderObject() { iface->release(); } - -public slots: - void emitInitSignal() { emit initSignal( iface ); } - void emitAcceptSignal() { emit acceptSignal( iface ); } - -signals: - void initSignal( TQUnknownInterface * ); - void acceptSignal( TQUnknownInterface * ); - -private: - TQUnknownInterface *iface; - -}; - -#endif diff --git a/tdevdesigner/designer/mainwindowactions.cpp b/tdevdesigner/designer/mainwindowactions.cpp deleted file mode 100644 index b9d0b1b6..00000000 --- a/tdevdesigner/designer/mainwindowactions.cpp +++ /dev/null @@ -1,2067 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "mainwindow.h" - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "defs.h" -#include "project.h" -#include "widgetdatabase.h" -#include "widgetfactory.h" -#include "preferences.h" -#include "formwindow.h" -#include "newformimpl.h" -#include "resource.h" -#include "projectsettingsimpl.h" -#include "workspace.h" -#include "createtemplate.h" -#include "hierarchyview.h" -#include "editfunctionsimpl.h" -#include "finddialog.h" -#include "replacedialog.h" -#include "gotolinedialog.h" -#include "formsettingsimpl.h" -#include "pixmapcollectioneditor.h" -#include "styledbutton.h" -#include "customwidgeteditorimpl.h" -#ifndef TQT_NO_SQL -#include "dbconnectionsimpl.h" -#include "dbconnectionimpl.h" -#endif -#include "widgetaction.h" -#include -#include "startdialogimpl.h" -#include "designerappiface.h" -#include "connectiondialog.h" -#include "configtoolboxdialog.h" -#include "designeraction.h" - -#include "tdevdesigner_part.h" - -static const char * whatsthis_image[] = { - "16 16 3 1", - " c None", - "o c #000000", - "a c #000080", - "o aaaaa ", - "oo aaa aaa ", - "ooo aaa aaa", - "oooo aa aa", - "ooooo aa aa", - "oooooo a aaa", - "ooooooo aaa ", - "oooooooo aaa ", - "ooooooooo aaa ", - "ooooo aaa ", - "oo ooo ", - "o ooo aaa ", - " ooo aaa ", - " ooo ", - " ooo ", - " ooo "}; - -const TQString toolbarHelp = "

    Toolbars contain a number of buttons to " -"provide quick access to often used functions.%1" -"
    Click on the toolbar handle to hide the toolbar, " -"or drag and place the toolbar to a different location.

    "; - -static TQIconSet createIconSet( const TQString &name ) -{ - TQIconSet ic( BarIcon( "" + name, TDevDesignerPartFactory::instance() ) ); - TQString prefix = "designer_"; - int right = name.length() - prefix.length(); - ic.setPixmap( BarIcon( prefix + "d_" + name.right( right ), TDevDesignerPartFactory::instance() ), - TQIconSet::Small, TQIconSet::Disabled ); - return ic; -} - -void MainWindow::setupEditActions() -{ - actionEditUndo = new DesignerAction( i18n("Undo"), createIconSet( "designer_undo.png" ),i18n("&Undo: Not Available"), CTRL + Key_Z, TQT_TQOBJECT(this), 0 ); - actionEditUndo->setStatusTip( i18n( "Undoes the last action" ) ); - actionEditUndo->setWhatsThis( whatsThisFrom( "Edit|Undo" ) ); - connect( actionEditUndo, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editUndo() ) ); - actionEditUndo->setEnabled( FALSE ); - - actionEditRedo = new DesignerAction( i18n( "Redo" ), createIconSet("designer_redo.png"), i18n( "&Redo: Not Available" ), CTRL + Key_Y, TQT_TQOBJECT(this), 0 ); - actionEditRedo->setStatusTip( i18n( "Redoes the last undone operation") ); - actionEditRedo->setWhatsThis( whatsThisFrom( "Edit|Redo" ) ); - connect( actionEditRedo, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editRedo() ) ); - actionEditRedo->setEnabled( FALSE ); - - actionEditCut = new DesignerAction( i18n( "Cut" ), createIconSet("designer_editcut.png"), i18n( "Cu&t" ), CTRL + Key_X, TQT_TQOBJECT(this), 0 ); - actionEditCut->setStatusTip( i18n( "Cuts the selected widgets and puts them on the clipboard" ) ); - actionEditCut->setWhatsThis( whatsThisFrom( "Edit|Cut" ) ); - connect( actionEditCut, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editCut() ) ); - actionEditCut->setEnabled( FALSE ); - - actionEditCopy = new DesignerAction( i18n( "Copy" ), createIconSet("designer_editcopy.png"), i18n( "&Copy" ), CTRL + Key_C, TQT_TQOBJECT(this), 0 ); - actionEditCopy->setStatusTip( i18n( "Copies the selected widgets to the clipboard" ) ); - actionEditCopy->setWhatsThis( whatsThisFrom( "Edit|Copy" ) ); - connect( actionEditCopy, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editCopy() ) ); - actionEditCopy->setEnabled( FALSE ); - - actionEditPaste = new DesignerAction( i18n( "Paste" ), createIconSet("designer_editpaste.png"), i18n( "&Paste" ), CTRL + Key_V, TQT_TQOBJECT(this), 0 ); - actionEditPaste->setStatusTip( i18n( "Pastes the clipboard's contents" ) ); - actionEditPaste->setWhatsThis( whatsThisFrom( "Edit|Paste" ) ); - connect( actionEditPaste, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editPaste() ) ); - actionEditPaste->setEnabled( FALSE ); - - actionEditDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Delete, TQT_TQOBJECT(this), 0 ); - actionEditDelete->setStatusTip( i18n( "Deletes the selected widgets" ) ); - actionEditDelete->setWhatsThis( whatsThisFrom( "Edit|Delete" ) ); - connect( actionEditDelete, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editDelete() ) ); - actionEditDelete->setEnabled( FALSE ); -#ifdef TQ_WS_MAC - TQAction *macDelete = new DesignerAction( i18n( "Delete" ), TQPixmap(), i18n( "&Delete" ), Key_Backspace, TQT_TQOBJECT(this), 0 ); - connect( macDelete, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editDelete() ) ); -#endif - - actionEditSelectAll = new DesignerAction( i18n( "Select All" ), TQPixmap(), i18n( "Select &All" ), CTRL + Key_A, TQT_TQOBJECT(this), 0 ); - actionEditSelectAll->setStatusTip( i18n( "Selects all widgets" ) ); - actionEditSelectAll->setWhatsThis( whatsThisFrom( "Edit|Select All" ) ); - connect( actionEditSelectAll, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editSelectAll() ) ); - actionEditSelectAll->setEnabled( TRUE ); - - actionEditRaise = new DesignerAction( i18n( "Bring to Front" ), createIconSet("designer_editraise.png"), i18n( "Bring to &Front" ), 0, TQT_TQOBJECT(this), 0 ); - actionEditRaise->setStatusTip( i18n( "Raises the selected widgets" ) ); - actionEditRaise->setWhatsThis( i18n( "Raises the selected widgets" ) ); - connect( actionEditRaise, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editRaise() ) ); - actionEditRaise->setEnabled( FALSE ); - - actionEditLower = new DesignerAction( i18n( "Send to Back" ), createIconSet("designer_editlower.png"), i18n( "Send to &Back" ), 0, TQT_TQOBJECT(this), 0 ); - actionEditLower->setStatusTip( i18n( "Lowers the selected widgets" ) ); - actionEditLower->setWhatsThis( i18n( "Lowers the selected widgets" ) ); - connect( actionEditLower, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLower() ) ); - actionEditLower->setEnabled( FALSE ); - - actionEditAccels = new DesignerAction( i18n( "Check Accelerators" ), TQPixmap(), - i18n( "Chec&k Accelerators" ), ALT + Key_R, TQT_TQOBJECT(this), 0 ); - actionEditAccels->setStatusTip( i18n("Checks if the accelerators used in the form are unique") ); - actionEditAccels->setWhatsThis( whatsThisFrom( "Edit|Check Accelerator" ) ); - connect( actionEditAccels, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editAccels() ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditAccels, TQT_SLOT( setEnabled(bool) ) ); - - actionEditFunctions = new DesignerAction( i18n( "Slots" ), createIconSet("designer_editslots.png"), - i18n( "S&lots..." ), 0, TQT_TQOBJECT(this), 0 ); - actionEditFunctions->setStatusTip( i18n("Opens a dialog for editing slots") ); - actionEditFunctions->setWhatsThis( whatsThisFrom( "Edit|Slots" ) ); - connect( actionEditFunctions, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editFunctions() ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFunctions, TQT_SLOT( setEnabled(bool) ) ); - - actionEditConnections = new DesignerAction( i18n( "Connections" ), createIconSet("designer_connecttool.png"), - i18n( "Co&nnections..." ), 0, TQT_TQOBJECT(this), 0 ); - actionEditConnections->setStatusTip( i18n("Opens a dialog for editing connections") ); - actionEditConnections->setWhatsThis( whatsThisFrom( "Edit|Connections" ) ); - connect( actionEditConnections, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editConnections() ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditConnections, TQT_SLOT( setEnabled(bool) ) ); - - actionEditSource = new DesignerAction( i18n( "Source" ), TQIconSet(), - i18n( "&Source..." ), CTRL + Key_E, TQT_TQOBJECT(this), 0 ); - actionEditSource->setStatusTip( i18n("Opens an editor to edit the form's source code") ); - actionEditSource->setWhatsThis( whatsThisFrom( "Edit|Source" ) ); - connect( actionEditSource, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editSource() ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditSource, TQT_SLOT( setEnabled(bool) ) ); - - actionEditFormSettings = new DesignerAction( i18n( "Form Settings" ), TQPixmap(), - i18n( "&Form Settings..." ), 0, TQT_TQOBJECT(this), 0 ); - actionEditFormSettings->setStatusTip( i18n("Opens a dialog to change the form's settings") ); - actionEditFormSettings->setWhatsThis( whatsThisFrom( "Edit|Form Settings" ) ); - connect( actionEditFormSettings, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editFormSettings() ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), actionEditFormSettings, TQT_SLOT( setEnabled(bool) ) ); - - actionEditPreferences = new DesignerAction( i18n( "Preferences" ), TQPixmap(), - i18n( "Preferences..." ), 0, TQT_TQOBJECT(this), 0 ); - actionEditPreferences->setStatusTip( i18n("Opens a dialog to change preferences") ); - actionEditPreferences->setWhatsThis( whatsThisFrom( "Edit|Preferences" ) ); - connect( actionEditPreferences, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editPreferences() ) ); - -/* TQToolBar *tb = new TQToolBar( this, "Edit" ); - tb->setCloseMode( TQDockWindow::Undocked ); - TQWhatsThis::add( tb, i18n( "The Edit toolbar%1").arg(i18n(toolbarHelp).arg("")) ); - addToolBar( tb, i18n( "Edit" ) ); - actionEditUndo->addTo( tb ); - actionEditRedo->addTo( tb ); - tb->addSeparator(); - actionEditCut->addTo( tb ); - actionEditCopy->addTo( tb ); - actionEditPaste->addTo( tb );*/ -#if 0 - tb->addSeparator(); - actionEditLower->addTo( tb ); - actionEditRaise->addTo( tb ); -#endif - - TQPopupMenu *menu = new TQPopupMenu( this, "Edit" ); - connect( menu, TQT_SIGNAL( aboutToShow() ), TQT_TQOBJECT(this), TQT_SLOT( updateEditorUndoRedo() ) ); - menubar->insertItem( i18n( "&Edit" ), menu ); - actionEditUndo->addTo( menu ); - actionEditRedo->addTo( menu ); - menu->insertSeparator(); - actionEditCut->addTo( menu ); - actionEditCopy->addTo( menu ); - actionEditPaste->addTo( menu ); - actionEditDelete->addTo( menu ); - actionEditSelectAll->addTo( menu ); - actionEditAccels->addTo( menu ); -#if 0 - menu->insertSeparator(); - actionEditLower->addTo( menu ); - actionEditRaise->addTo( menu ); -#endif - menu->insertSeparator(); - if ( !singleProjectMode() ) { - actionEditFunctions->addTo( menu ); - actionEditConnections->addTo( menu ); - } - actionEditFormSettings->addTo( menu ); - menu->insertSeparator(); - actionEditPreferences->addTo( menu ); -} - -void MainWindow::setupSearchActions() -{ - actionSearchFind = new DesignerAction( i18n( "Find" ), createIconSet( "designer_searchfind.png" ), - i18n( "&Find..." ), CTRL + Key_F, TQT_TQOBJECT(this), 0 ); - connect( actionSearchFind, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchFind() ) ); - actionSearchFind->setEnabled( FALSE ); - actionSearchFind->setWhatsThis( whatsThisFrom( "Search|Find" ) ); - - actionSearchIncremetal = new DesignerAction( i18n( "Find Incremental" ), TQIconSet(), - i18n( "Find &Incremental" ), ALT + Key_I, TQT_TQOBJECT(this), 0 ); - connect( actionSearchIncremetal, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchIncremetalFindMenu() ) ); - actionSearchIncremetal->setEnabled( FALSE ); - actionSearchIncremetal->setWhatsThis( whatsThisFrom( "Search|Find Incremental" ) ); - - actionSearchReplace = new DesignerAction( i18n( "Replace" ), TQIconSet(), - i18n( "&Replace..." ), CTRL + Key_R, TQT_TQOBJECT(this), 0 ); - connect( actionSearchReplace, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchReplace() ) ); - actionSearchReplace->setEnabled( FALSE ); - actionSearchReplace->setWhatsThis( whatsThisFrom( "Search|Replace" ) ); - - actionSearchGotoLine = new DesignerAction( i18n( "Goto Line" ), TQIconSet(), - i18n( "&Goto Line..." ), ALT + Key_G, TQT_TQOBJECT(this), 0 ); - connect( actionSearchGotoLine, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( searchGotoLine() ) ); - actionSearchGotoLine->setEnabled( FALSE ); - actionSearchGotoLine->setWhatsThis( whatsThisFrom( "Search|Goto line" ) ); - -/* TQToolBar *tb = new TQToolBar( this, "Search" ); - tb->setCloseMode( TQDockWindow::Undocked ); - addToolBar( tb, i18n( "Search" ) ); - - actionSearchFind->addTo( tb );*/ - incrementalSearch = new TQLineEdit( 0 ); - incrementalSearch->hide(); - TQToolTip::add( incrementalSearch, i18n( "Incremental search (Alt+I)" ) ); - connect( incrementalSearch, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SLOT( searchIncremetalFind() ) ); - connect( incrementalSearch, TQT_SIGNAL( returnPressed() ), - this, TQT_SLOT( searchIncremetalFindNext() ) ); - incrementalSearch->setEnabled( FALSE ); - - TQPopupMenu *menu = new TQPopupMenu( this, "Search" ); - menubar->insertItem( i18n( "&Search" ), menu ); - actionSearchFind->addTo( menu ); - actionSearchIncremetal->addTo( menu ); - actionSearchReplace->addTo( menu ); - menu->insertSeparator(); - actionSearchGotoLine->addTo( menu ); -} - -void MainWindow::setupLayoutActions() -{ - if ( !actionGroupTools ) { - actionGroupTools = new TQActionGroup( this ); - actionGroupTools->setExclusive( TRUE ); - connect( actionGroupTools, TQT_SIGNAL( selected(TQAction*) ), TQT_TQOBJECT(this), TQT_SLOT( toolSelected(TQAction*) ) ); - } - - actionEditAdjustSize = new DesignerAction( i18n( "Adjust Size" ), createIconSet("designer_adjustsize.png"), - i18n( "Adjust &Size" ), CTRL + Key_J, TQT_TQOBJECT(this), 0 ); - actionEditAdjustSize->setStatusTip(i18n("Adjusts the size of the selected widget") ); - actionEditAdjustSize->setWhatsThis( whatsThisFrom( "Layout|Adjust Size" ) ); - connect( actionEditAdjustSize, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editAdjustSize() ) ); - actionEditAdjustSize->setEnabled( FALSE ); - - actionEditHLayout = new DesignerAction( i18n( "Lay OutQt::Horizontally" ), createIconSet("designer_edithlayout.png"), - i18n( "Lay Out &Horizontally" ), CTRL + Key_H, TQT_TQOBJECT(this), 0 ); - actionEditHLayout->setStatusTip(i18n("Lays out the selected widgets horizontally") ); - actionEditHLayout->setWhatsThis( whatsThisFrom( "Layout|Lay OutQt::Horizontally" ) ); - connect( actionEditHLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutHorizontal() ) ); - actionEditHLayout->setEnabled( FALSE ); - - actionEditVLayout = new DesignerAction( i18n( "Lay OutQt::Vertically" ), createIconSet("designer_editvlayout.png"), - i18n( "Lay Out &Vertically" ), CTRL + Key_L, TQT_TQOBJECT(this), 0 ); - actionEditVLayout->setStatusTip(i18n("Lays out the selected widgets vertically") ); - actionEditVLayout->setWhatsThis( whatsThisFrom( "Layout|Lay OutQt::Vertically" ) ); - connect( actionEditVLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutVertical() ) ); - actionEditVLayout->setEnabled( FALSE ); - - actionEditGridLayout = new DesignerAction( i18n( "Lay Out in a Grid" ), createIconSet("designer_editgrid.png"), - i18n( "Lay Out in a &Grid" ), CTRL + Key_G, TQT_TQOBJECT(this), 0 ); - actionEditGridLayout->setStatusTip(i18n("Lays out the selected widgets in a grid") ); - actionEditGridLayout->setWhatsThis( whatsThisFrom( "Layout|Lay Out in a Grid" ) ); - connect( actionEditGridLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutGrid() ) ); - actionEditGridLayout->setEnabled( FALSE ); - - actionEditSplitHorizontal = new DesignerAction( i18n( "Lay OutQt::Horizontally (in Splitter)" ), createIconSet("designer_editvlayoutsplit.png"), - i18n( "Lay OutQt::Horizontally (in S&plitter)" ), 0, TQT_TQOBJECT(this), 0 ); - actionEditSplitHorizontal->setStatusTip(i18n("Lays out the selected widgets horizontally in a splitter") ); - actionEditSplitHorizontal->setWhatsThis( whatsThisFrom( "Layout|Lay OutQt::Horizontally (in Splitter)" ) ); - connect( actionEditSplitHorizontal, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutHorizontalSplit() ) ); - actionEditSplitHorizontal->setEnabled( FALSE ); - - actionEditSplitVertical = new DesignerAction( i18n( "Lay OutQt::Vertically (in Splitter)" ), createIconSet("designer_edithlayoutsplit.png"), - i18n( "Lay OutQt::Vertically (in Sp&litter)" ), 0, TQT_TQOBJECT(this), 0 ); - actionEditSplitVertical->setStatusTip(i18n("Lays out the selected widgets vertically in a splitter") ); - actionEditSplitVertical->setWhatsThis( whatsThisFrom( "Layout|Lay OutQt::Vertically (in Splitter)" ) ); - connect( actionEditSplitVertical, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editLayoutVerticalSplit() ) ); - actionEditSplitVertical->setEnabled( FALSE ); - - actionEditBreakLayout = new DesignerAction( i18n( "Break Layout" ), createIconSet("designer_editbreaklayout.png"), - i18n( "&Break Layout" ), CTRL + Key_B, TQT_TQOBJECT(this), 0 ); - actionEditBreakLayout->setStatusTip(i18n("Breaks the selected layout") ); - actionEditBreakLayout->setWhatsThis( whatsThisFrom( "Layout|Break Layout" ) ); - connect( actionEditBreakLayout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editBreakLayout() ) ); - actionEditBreakLayout->setEnabled( FALSE ); - - int id = WidgetDatabase::idFromClassName( "Spacer" ); - actionInsertSpacer = new WidgetAction( i18n( "Layout" ), actionGroupTools, TQString::number( id ).latin1() ); - actionInsertSpacer->setToggleAction( TRUE ); - actionInsertSpacer->setText( WidgetDatabase::className( id ) ); - actionInsertSpacer->setMenuText( i18n( "Add %1").arg( WidgetDatabase::className( id ) ) ); - actionInsertSpacer->setIconSet( WidgetDatabase::iconSet( id ) ); - actionInsertSpacer->setToolTip( WidgetDatabase::toolTip( id ) ); - actionInsertSpacer->setStatusTip( i18n( "Insert a %1").arg(WidgetDatabase::toolTip( id )) ); - actionInsertSpacer->setWhatsThis( i18n("A %1

    %2

    " - "

    Click to insert a single %3," - "or double click to keep the tool selected.") - .arg(WidgetDatabase::toolTip( id )) - .arg(WidgetDatabase::whatsThis( id )) - .arg(WidgetDatabase::toolTip( id ) )); - - actionInsertSpacer->addTo( commonWidgetsToolBar ); - commonWidgetsPage.append( actionInsertSpacer ); - TQWidget *w; - commonWidgetsToolBar->setStretchableWidget( ( w = new TQWidget( commonWidgetsToolBar ) ) ); - w->setBackgroundMode( commonWidgetsToolBar->backgroundMode() ); - TQWhatsThis::add( layoutToolBar, i18n( "The Layout toolbar%1" ).arg(i18n(toolbarHelp).arg("")) ); - actionEditAdjustSize->addTo( layoutToolBar ); - layoutToolBar->addSeparator(); - actionEditHLayout->addTo( layoutToolBar ); - actionEditVLayout->addTo( layoutToolBar ); - actionEditGridLayout->addTo( layoutToolBar ); - actionEditSplitHorizontal->addTo( layoutToolBar ); - actionEditSplitVertical->addTo( layoutToolBar ); - actionEditBreakLayout->addTo( layoutToolBar ); - layoutToolBar->addSeparator(); - actionInsertSpacer->addTo( layoutToolBar ); - - TQPopupMenu *menu = new TQPopupMenu( this, "Layout" ); - layoutMenu = menu; - menubar->insertItem( i18n( "&Layout" ), menu, toolsMenuId + 1 ); - actionEditAdjustSize->addTo( menu ); - menu->insertSeparator(); - actionEditHLayout->addTo( menu ); - actionEditVLayout->addTo( menu ); - actionEditGridLayout->addTo( menu ); - actionEditSplitHorizontal->addTo( menu ); - actionEditSplitVertical->addTo( menu ); - actionEditBreakLayout->addTo( menu ); - menu->insertSeparator(); - actionInsertSpacer->addTo( menu ); -} - -void MainWindow::setupToolActions() -{ - if ( !actionGroupTools ) { - actionGroupTools = new TQActionGroup( this ); - actionGroupTools->setExclusive( TRUE ); - connect( actionGroupTools, TQT_SIGNAL( selected(TQAction*) ), - this, TQT_SLOT( toolSelected(TQAction*) ) ); - } - - actionPointerTool = new DesignerAction( i18n("Pointer"), createIconSet("designer_pointer.png"), - i18n("&Pointer"), Key_F2, - actionGroupTools, - TQString::number(POINTER_TOOL).latin1(), TRUE ); - actionPointerTool->setStatusTip( i18n("Selects the pointer tool") ); - actionPointerTool->setWhatsThis( whatsThisFrom( "Tools|Pointer" ) ); - - actionConnectTool = new DesignerAction( i18n("Connect Signal/Slots"), - createIconSet("designer_connecttool.png"), - i18n("&Connect Signal/Slots"), - singleProjectMode() ? 0 : Key_F3, - actionGroupTools, - TQString::number(CONNECT_TOOL).latin1(), TRUE ); - actionConnectTool->setStatusTip( i18n("Selects the connection tool") ); - actionConnectTool->setWhatsThis( whatsThisFrom( "Tools|Connect Signals and Slots" ) ); - - actionOrderTool = new DesignerAction( i18n("Tab Order"), createIconSet("designer_ordertool.png"), - i18n("Tab &Order"), Key_F4, - actionGroupTools, - TQString::number(ORDER_TOOL).latin1(), TRUE ); - actionOrderTool->setStatusTip( i18n("Selects the tab order tool") ); - actionOrderTool->setWhatsThis( whatsThisFrom( "Tools|Tab Order" ) ); - - actionBuddyTool = new DesignerAction( i18n( "Set Buddy" ), createIconSet( "designer_setbuddy.png" ), - i18n( "Set &Buddy" ), Key_F12, - actionGroupTools, TQString::number( BUDDY_TOOL ).latin1(), - TRUE ); - actionBuddyTool->setStatusTip( i18n( "Sets a buddy to a label" ) ); - actionBuddyTool->setWhatsThis( whatsThisFrom( "Tools|Set Buddy" ) ); - - TQToolBar *tb = new TQToolBar( this, "Tools" ); - tb->setCloseMode( TQDockWindow::Undocked ); - toolsToolBar = tb; - TQWhatsThis::add( tb, i18n( "The Tools toolbar%1" ).arg(i18n(toolbarHelp).arg("")) ); - - addToolBar( tb, i18n( "Tools" ), TQMainWindow::DockTop, FALSE ); - actionPointerTool->addTo( tb ); - if ( !singleProjectMode() ) - actionConnectTool->addTo( tb ); - actionOrderTool->addTo( tb ); - actionBuddyTool->addTo( tb ); - - TQPopupMenu *mmenu = new TQPopupMenu( this, "Tools" ); - toolsMenu = mmenu; - toolsMenuId = 100; - menubar->insertItem( i18n( "&Tools" ), mmenu, toolsMenuId ); - toolsMenuIndex = menubar->indexOf( toolsMenuId ); - actionPointerTool->addTo( mmenu ); - if ( !singleProjectMode() ) - actionConnectTool->addTo( mmenu ); - actionOrderTool->addTo( mmenu ); - actionBuddyTool->addTo( mmenu ); - mmenu->insertSeparator(); - - customWidgetToolBar = 0; - customWidgetMenu = 0; - - actionToolsCustomWidget = new DesignerAction( i18n("Custom Widgets"), - createIconSet( "designer_customwidget.png" ), - i18n("Edit &Custom Widgets..."), 0, TQT_TQOBJECT(this), 0 ); - actionToolsCustomWidget->setStatusTip( i18n("Opens a dialog to add and change " - "custom widgets") ); - actionToolsCustomWidget->setWhatsThis( whatsThisFrom( "Tools|Custom|Edit Custom" - "Widgets" ) ); - connect( actionToolsCustomWidget, TQT_SIGNAL( activated() ), - this, TQT_SLOT( toolsCustomWidget() ) ); - - for ( int j = 0; j < WidgetDatabase::numWidgetGroups(); ++j ) { - TQString grp = WidgetDatabase::widgetGroup( j ); - if ( !WidgetDatabase::isGroupVisible( grp ) || - WidgetDatabase::isGroupEmpty( grp ) ) - continue; - TQToolBar *tb = new TQToolBar( this, grp.latin1() ); - tb->setCloseMode( TQDockWindow::Undocked ); - widgetToolBars.append( tb ); - bool plural = grp[(int)grp.length()-1] == 's'; - if ( plural ) { - TQWhatsThis::add( tb, i18n( "The %1%2" ).arg(grp).arg(i18n(toolbarHelp). - arg( i18n(" Click on a button to insert a single widget, " - "or double click to insert multiple %1.") ).arg(grp)) ); - } else { - TQWhatsThis::add( tb, i18n( "The %1 Widgets%2" ).arg(grp).arg(i18n(toolbarHelp). - arg( i18n(" Click on a button to insert a single %1 widget, " - "or double click to insert multiple widgets.") ).arg(grp)) ); - } - addToolBar( tb, grp ); - tb->hide(); - TQPopupMenu *menu = new TQPopupMenu( this, grp.latin1() ); - mmenu->insertItem( grp, menu ); - - TQToolBar *tb2 = new TQToolBar( grp, 0, toolBox, FALSE, grp.latin1() ); - tb2->setFrameStyle( TQFrame::NoFrame ); - tb2->setOrientation( Qt::Vertical ); - tb2->setBackgroundMode( PaletteBase ); - toolBox->addItem( tb2, grp ); - - if ( grp == "Custom" ) { - if ( !customWidgetMenu ) - actionToolsCustomWidget->addTo( menu ); - else - menu->insertSeparator(); - customWidgetMenu = menu; - customWidgetToolBar = tb; - } - - for ( int i = 0; i < WidgetDatabase::count(); ++i ) { - if ( WidgetDatabase::group( i ) != grp ) - continue; // only widgets, i.e. not forms and temp stuff - WidgetAction* a = - new WidgetAction( grp, actionGroupTools, TQString::number( i ).latin1() ); - a->setToggleAction( TRUE ); - TQString atext = WidgetDatabase::className( i ); - if ( atext[0] == 'Q' ) - atext = atext.mid(1); - while ( atext.length() && atext[0] >= 'a' && atext[0] <= 'z' ) - atext = atext.mid(1); - if ( atext.isEmpty() ) - atext = WidgetDatabase::className( i ); - a->setText( atext ); - TQString ttip = WidgetDatabase::toolTip( i ); - a->setIconSet( WidgetDatabase::iconSet( i ) ); - a->setToolTip( ttip ); - if ( !WidgetDatabase::isWhatsThisLoaded() ) - WidgetDatabase::loadWhatsThis( documentationPath() ); - a->setStatusTip( i18n( "Insert a %1").arg(WidgetDatabase::className( i )) ); - - TQString whats = i18n("A %1").arg( WidgetDatabase::className( i ) ); - if ( !WidgetDatabase::whatsThis( i ).isEmpty() ) - whats += TQString("

    %1

    ").arg(WidgetDatabase::whatsThis( i )); - a->setWhatsThis( whats+ i18n("

    Double click on this tool to keep it selected.

    ") ); - - if ( grp != "KDE" ) - a->addTo( tb ); - a->addTo( menu ); - a->addTo( tb2 ); - if ( WidgetDatabase::isCommon( i ) ) { - a->addTo( commonWidgetsToolBar ); - commonWidgetsPage.append( a ); - } - } - TQWidget *w; - tb2->setStretchableWidget( ( w = new TQWidget( tb2 ) ) ); - w->setBackgroundMode( tb2->backgroundMode() ); - } - - if ( !customWidgetToolBar ) { - TQToolBar *tb = new TQToolBar( this, "Custom Widgets" ); - tb->setCloseMode( TQDockWindow::Undocked ); - TQWhatsThis::add( tb, i18n( "The Custom Widgets toolbar%1" - "

    Click Edit Custom Widgets..." - "in the Tools|Custom menu to " - "add and change custom widgets

    " ). - arg(i18n(toolbarHelp). - arg( i18n(" Click on the buttons to insert a single widget, " - "or double click to insert multiple widgets.") )) ); - addToolBar( tb, i18n( "Custom" ) ); - tb->hide(); - widgetToolBars.append( tb ); - customWidgetToolBar = tb; - TQPopupMenu *menu = new TQPopupMenu( this, "Custom Widgets" ); - mmenu->insertItem( "Custom", menu ); - customWidgetMenu = menu; - customWidgetToolBar->hide(); - actionToolsCustomWidget->addTo( customWidgetMenu ); - customWidgetMenu->insertSeparator(); - TQToolBar *tb2 = new TQToolBar( "Custom Widgets", 0, - toolBox, FALSE, "Custom Widgets" ); - tb2->setBackgroundMode(PaletteBase); - tb2->setOrientation( Qt::Vertical ); - tb2->setFrameStyle( TQFrame::NoFrame ); - toolBox->addItem( tb2, "Custom Widgets" ); - customWidgetToolBar2 = tb2; - } - - TQAction *a = new DesignerAction( i18n( "Configure Toolbox" ), i18n( "Configure Toolbox..." ), 0, TQT_TQOBJECT(this) ); - a->setStatusTip( i18n( "Opens a dialog to configure the common " - "widgets page of the toolbox") ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( toolsConfigure() ) ); - mmenu->insertSeparator(); - a->addTo( mmenu ); - resetTool(); -} - -void MainWindow::setupFileActions() -{ - TQToolBar* tb = new TQToolBar( this, "File" ); - tb->setCloseMode( TQDockWindow::Undocked ); - projectToolBar = tb; - - TQWhatsThis::add( tb, i18n( "The File toolbar%1" ).arg(i18n(toolbarHelp).arg("")) ); - addToolBar( tb, i18n( "File" ) ); - fileMenu = new TQPopupMenu( this, "File" ); - menubar->insertItem( i18n( "&File" ), fileMenu ); - - DesignerAction *a = 0; - - if ( !singleProject ) { - DesignerAction *a = new DesignerAction( TQT_TQOBJECT(this), 0 ); - a->setText( i18n( "New" ) ); - a->setToolTip( i18n( "New dialog or file" ) ); - a->setMenuText( i18n( "&New..." ) ); - a->setIconSet( createIconSet("designer_filenew.png") ); - a->setAccel( CTRL + Key_N ); - a->setStatusTip( i18n( "Creates a new project, form or source file." ) ); - a->setWhatsThis( whatsThisFrom( "File|New" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileNew() ) ); - a->addTo( tb ); - a->addTo( fileMenu ); - actionNewFile = a; - } else { - actionGroupNew = new TQActionGroup( this, 0, FALSE ); - TQActionGroup* a = actionGroupNew; - ( (TQActionGroup*)a )->setUsesDropDown( TRUE ); - a->setText( i18n( "New" ) ); - a->setMenuText( i18n( "&New..." ) ); - a->setIconSet( createIconSet("designer_form.png") ); - a->setStatusTip( i18n( "Creates a new dialog or file" ) ); - a->setWhatsThis( whatsThisFrom( "File|New" ) ); - - TQAction *newForm = new DesignerAction( a, 0 ); - newForm->setText( i18n( "New Dialog" ) ); - newForm->setMenuText( i18n( "&Dialog..." ) ); - newForm->setIconSet( createIconSet("designer_form.png") ); - newForm->setAccel( CTRL + Key_N ); - newForm->setStatusTip( i18n( "Creates a new dialog." ) ); - connect( newForm, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileNewDialog() ) ); - - DesignerAction *newFile = new DesignerAction( TQT_TQOBJECT(a), 0 ); - newFile->setText( i18n( "New File" ) ); - newFile->setMenuText( i18n( "&File..." ) ); - newFile->setIconSet( createIconSet("designer_filenew.png") ); - newFile->setAccel( ALT + Key_N ); - newFile->setStatusTip( i18n( "Creates a new file." ) ); - connect( newFile, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileNewFile() ) ); - actionNewFile = newFile; - - a->addTo( tb ); - a->addTo( fileMenu ); - - fileMenu->insertSeparator(); - } - - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); - a->setText( i18n( "Open" ) ); - a->setMenuText( i18n( "&Open..." ) ); - a->setIconSet( createIconSet("designer_fileopen.png") ); - a->setAccel( CTRL + Key_O ); - a->setStatusTip( i18n( "Opens an existing project, form or source file ") ); - a->setWhatsThis( whatsThisFrom( "File|Open" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileOpen() ) ); - if ( !singleProject ) { - a->addTo( tb ); - a->addTo( fileMenu ); - fileMenu->insertSeparator(); - } - - - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); - actionFileClose = a; - a->setText( i18n( "Close" ) ); - a->setMenuText( i18n( "&Close" ) ); - a->setStatusTip( i18n( "Closes the current project or document" ) ); - a->setWhatsThis(whatsThisFrom( "File|Close" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileClose() ) ); - connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); - if ( !singleProject ) { - a->addTo( fileMenu ); - fileMenu->insertSeparator(); - } - - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); - actionFileSave = a; - a->setText( i18n( "Save" ) ); - a->setMenuText( i18n( "&Save" ) ); - a->setIconSet( createIconSet("designer_filesave.png") ); - a->setAccel( CTRL + Key_S ); - a->setStatusTip( i18n( "Saves the current project or document" ) ); - a->setWhatsThis(whatsThisFrom( "File|Save" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileSave() ) ); - connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); - a->addTo( tb ); - a->addTo( fileMenu ); - - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); - actionFileSaveAs = a; - a->setText( i18n( "Save As" ) ); - a->setMenuText( i18n( "Save &As..." ) ); - a->setStatusTip( i18n( "Saves the current form with a new filename" ) ); - a->setWhatsThis( whatsThisFrom( "File|Save As" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileSaveAs() ) ); - connect( this, TQT_SIGNAL( hasActiveWindow(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); - if ( !singleProject ) - a->addTo( fileMenu ); - - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); - actionFileSaveAll = a; - a->setText( i18n( "Save All" ) ); - a->setMenuText( i18n( "Sa&ve All" ) ); - a->setStatusTip( i18n( "Saves all open documents" ) ); - a->setWhatsThis( whatsThisFrom( "File|Save All" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileSaveAll() ) ); - connect( this, TQT_SIGNAL( hasActiveWindowOrProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); - if ( !singleProject ) { - a->addTo( fileMenu ); - fileMenu->insertSeparator(); - } - - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); - a->setText( i18n( "Create Template" ) ); - a->setMenuText( i18n( "Create &Template..." ) ); - a->setStatusTip( i18n( "Creates a new template" ) ); - a->setWhatsThis( whatsThisFrom( "File|Create Template" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileCreateTemplate() ) ); - if ( !singleProject ) - a->addTo( fileMenu ); - - if ( !singleProject ) - fileMenu->insertSeparator(); - - recentlyFilesMenu = new TQPopupMenu( this ); - recentlyProjectsMenu = new TQPopupMenu( this ); - - if ( !singleProject ) { - fileMenu->insertItem( i18n( "Recently Opened Files " ), recentlyFilesMenu ); - fileMenu->insertItem( i18n( "Recently Opened Projects" ), recentlyProjectsMenu ); - } - - connect( recentlyFilesMenu, TQT_SIGNAL( aboutToShow() ), - this, TQT_SLOT( setupRecentlyFilesMenu() ) ); - connect( recentlyProjectsMenu, TQT_SIGNAL( aboutToShow() ), - this, TQT_SLOT( setupRecentlyProjectsMenu() ) ); - connect( recentlyFilesMenu, TQT_SIGNAL( activated( int ) ), - this, TQT_SLOT( recentlyFilesMenuActivated( int ) ) ); - connect( recentlyProjectsMenu, TQT_SIGNAL( activated( int ) ), - this, TQT_SLOT( recentlyProjectsMenuActivated( int ) ) ); - - if ( !singleProject ) - fileMenu->insertSeparator(); - - a = new DesignerAction( TQT_TQOBJECT(this), 0 ); - actionFileExit = a; - if ( !singleProjectMode() ) { - a->setText( i18n( "Exit" ) ); - a->setMenuText( i18n( "E&xit" ) ); - a->setStatusTip( i18n( "Quits the application and prompts to save any changed forms, source files or project settings" ) ); - a->setWhatsThis( whatsThisFrom( "File|Exit" ) ); - } else { - a->setText( i18n( "Close" ) ); - a->setMenuText( i18n( "&Close" ) ); - } - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( fileQuit() ) ); - a->addTo( fileMenu ); -} - -void MainWindow::setupProjectActions() -{ - projectMenu = new TQPopupMenu( this, "Project" ); - menubar->insertItem( i18n( "Pr&oject" ), projectMenu ); - - TQActionGroup *ag = new TQActionGroup( this, 0 ); - ag->setText( i18n( "Active Project" ) ); - ag->setMenuText( i18n( "Active Project" ) ); - ag->setExclusive( TRUE ); - ag->setUsesDropDown( TRUE ); - connect( ag, TQT_SIGNAL( selected( TQAction * ) ), TQT_TQOBJECT(this), TQT_SLOT( projectSelected( TQAction * ) ) ); - connect( ag, TQT_SIGNAL( selected( TQAction * ) ), TQT_TQOBJECT(this), TQT_SIGNAL( projectChanged() ) ); - DesignerAction *a = new DesignerAction( i18n( "" ), i18n( "" ), 0, ag, 0, TRUE ); - eProject = new Project( "", i18n( "" ), projectSettingsPluginManager, TRUE ); - projects.insert( a, eProject ); - a->setOn( TRUE ); - ag->addTo( projectMenu ); - ag->addTo( projectToolBar ); - actionGroupProjects = ag; - - if ( !singleProject ) - projectMenu->insertSeparator(); - - a = new DesignerAction( i18n( "Add File" ), TQPixmap(), i18n( "&Add File..." ), 0, TQT_TQOBJECT(this), 0 ); - actionProjectAddFile = a; - a->setStatusTip( i18n("Adds a file to the current project") ); - a->setWhatsThis( whatsThisFrom( "Project|Add File" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( projectInsertFile() ) ); - a->setEnabled( FALSE ); - connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); - if ( !singleProject ) - a->addTo( projectMenu ); - - actionEditPixmapCollection = new DesignerAction( i18n( "Image Collection..." ), TQPixmap(), - i18n( "&Image Collection..." ), 0, TQT_TQOBJECT(this), 0 ); - actionEditPixmapCollection->setStatusTip( i18n("Opens a dialog for editing the current project's image collection") ); - actionEditPixmapCollection->setWhatsThis( whatsThisFrom( "Project|Image Collection" ) ); - connect( actionEditPixmapCollection, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editPixmapCollection() ) ); - actionEditPixmapCollection->setEnabled( FALSE ); - connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditPixmapCollection, TQT_SLOT( setEnabled(bool) ) ); - actionEditPixmapCollection->addTo( projectMenu ); - -#ifndef TQT_NO_SQL - actionEditDatabaseConnections = new DesignerAction( i18n( "Database Connections..." ), TQPixmap(), - i18n( "&Database Connections..." ), 0, TQT_TQOBJECT(this), 0 ); - actionEditDatabaseConnections->setStatusTip( i18n("Opens a dialog for editing the current project's database connections") ); - actionEditDatabaseConnections->setWhatsThis( whatsThisFrom( "Project|Database Connections" ) ); - connect( actionEditDatabaseConnections, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editDatabaseConnections() ) ); - //actionEditDatabaseConnections->setEnabled( FALSE ); - //connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditDatabaseConnections, TQT_SLOT( setEnabled(bool) ) ); - if ( !singleProject ) - actionEditDatabaseConnections->addTo( projectMenu ); -#endif - - actionEditProjectSettings = new DesignerAction( i18n( "Project Settings..." ), TQPixmap(), - i18n( "&Project Settings..." ), 0, TQT_TQOBJECT(this), 0 ); - actionEditProjectSettings->setStatusTip( i18n("Opens a dialog to change the project's settings") ); - actionEditProjectSettings->setWhatsThis( whatsThisFrom( "Project|Project Settings" ) ); - connect( actionEditProjectSettings, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( editProjectSettings() ) ); - actionEditProjectSettings->setEnabled( FALSE ); - connect( this, TQT_SIGNAL( hasNonDummyProject(bool) ), actionEditProjectSettings, TQT_SLOT( setEnabled(bool) ) ); - actionEditProjectSettings->addTo( projectMenu ); - -} - -void MainWindow::setupPreviewActions() -{ - DesignerAction* a = 0; - TQPopupMenu *menu = new TQPopupMenu( this, "Preview" ); - layoutMenu = menu; - menubar->insertItem( i18n( "&Preview" ), menu, toolsMenuId + 2 ); - - a = new DesignerAction( i18n( "Preview Form" ), TQPixmap(), i18n( "Preview &Form" ), 0, TQT_TQOBJECT(this), 0 ); - actionPreview = a; - a->setAccel( CTRL + Key_T ); - a->setStatusTip( i18n("Opens a preview") ); - a->setWhatsThis( whatsThisFrom( "Preview|Preview Form" ) ); - connect( a, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( previewForm() ) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); - a->addTo( menu ); - - menu->insertSeparator(); - - TQSignalMapper *mapper = new TQSignalMapper( TQT_TQOBJECT(this) ); - connect( mapper, TQT_SIGNAL(mapped(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(previewForm(const TQString&)) ); - TQStringList styles = TQStyleFactory::keys(); - for ( TQStringList::Iterator it = styles.begin(); it != styles.end(); ++it ) { - TQString info; - if ( *it == "Motif" ) - info = i18n( "The preview will use the Motif look and feel which is used as the default style on most UNIX systems." ); - else if ( *it == "Windows" ) - info = i18n( "The preview will use the Windows look and feel." ); - else if ( *it == "Platinum" ) - info = i18n( "The preview will use the Platinum look and feel which is similar to the Macintosh GUI style." ); - else if ( *it == "CDE" ) - info = i18n( "The preview will use the CDE look and feel which is similar to some versions of the Common Desktop Environment." ); - else if ( *it == "SGI" ) - info = i18n( "The preview will use the Motif look and feel which is used as the default style on SGI systems." ); - else if ( *it == "MotifPlus" ) - info = i18n( "The preview will use the advanced Motif look and feel used by the GIMP toolkit (GTK) on Linux." ); - - a = new DesignerAction( i18n( "Preview Form in %1 Style" ).arg( *it ), TQPixmap(), - i18n( "... in %1 Style" ).arg( *it ), 0, TQT_TQOBJECT(this), 0 ); - a->setStatusTip( i18n("Opens a preview in %1 style").arg( *it ) ); - a->setWhatsThis( i18n("Open a preview in %1 style." - "

    Use the preview to test the design and " - "signal-slot connections of the current form. %2

    ").arg( *it ).arg( info ) ); - mapper->setMapping( a, *it ); - connect( a, TQT_SIGNAL(activated()), mapper, TQT_SLOT(map()) ); - connect( this, TQT_SIGNAL( hasActiveForm(bool) ), a, TQT_SLOT( setEnabled(bool) ) ); - a->addTo( menu ); - } -} - -void MainWindow::setupWindowActions() -{ -/* static bool windowActionsSetup = FALSE; - if ( !windowActionsSetup ) { - windowActionsSetup = TRUE; -*/ - actionWindowTile = new DesignerAction( i18n( "Tile" ), i18n( "&Tile" ), 0, TQT_TQOBJECT(this) ); - actionWindowTile->setStatusTip( i18n("Tiles the windows so that they are all visible") ); - actionWindowTile->setWhatsThis( whatsThisFrom( "Window|Tile" ) ); - connect( actionWindowTile, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( tile() ) ); - actionWindowCascade = new DesignerAction( i18n( "Cascade" ), i18n( "&Cascade" ), 0, TQT_TQOBJECT(this) ); - actionWindowCascade->setStatusTip( i18n("Cascades the windows so that all their title bars are visible") ); - actionWindowCascade->setWhatsThis( whatsThisFrom( "Window|Cascade" ) ); - connect( actionWindowCascade, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( cascade() ) ); - - actionWindowClose = new DesignerAction( i18n( "Close" ), i18n( "Cl&ose" ), CTRL + Key_F4, TQT_TQOBJECT(this) ); - actionWindowClose->setStatusTip( i18n( "Closes the active window") ); - actionWindowClose->setWhatsThis( whatsThisFrom( "Window|Close" ) ); - connect( actionWindowClose, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( closeActiveWindow() ) ); - - actionWindowCloseAll = new DesignerAction( i18n( "Close All" ), i18n( "Close Al&l" ), 0, TQT_TQOBJECT(this) ); - actionWindowCloseAll->setStatusTip( i18n( "Closes all form windows") ); - actionWindowCloseAll->setWhatsThis( whatsThisFrom( "Window|Close All" ) ); - connect( actionWindowCloseAll, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( closeAllWindows() ) ); - - actionWindowNext = new DesignerAction( i18n( "Next" ), i18n( "Ne&xt" ), CTRL + Key_F6, TQT_TQOBJECT(this) ); - actionWindowNext->setStatusTip( i18n( "Activates the next window" ) ); - actionWindowNext->setWhatsThis( whatsThisFrom( "Window|Next" ) ); - connect( actionWindowNext, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( activateNextWindow() ) ); - - actionWindowPrevious = new DesignerAction( i18n( "Previous" ), i18n( "Pre&vious" ), CTRL + SHIFT + Key_F6, TQT_TQOBJECT(this) ); - actionWindowPrevious->setStatusTip( i18n( "Activates the previous window" ) ); - actionWindowPrevious->setWhatsThis( whatsThisFrom( "Window|Previous" ) ); - connect( actionWindowPrevious, TQT_SIGNAL( activated() ), qworkspace, TQT_SLOT( activatePreviousWindow() ) ); - // } - - if ( !windowMenu ) { - windowMenu = new TQPopupMenu( this, "Window" ); - menubar->insertItem( i18n( "&Window" ), windowMenu ); - connect( windowMenu, TQT_SIGNAL( aboutToShow() ), - this, TQT_SLOT( setupWindowActions() ) ); - } else { - windowMenu->clear(); - } - - actionWindowClose->addTo( windowMenu ); - actionWindowCloseAll->addTo( windowMenu ); - windowMenu->insertSeparator(); - actionWindowNext->addTo( windowMenu ); - actionWindowPrevious->addTo( windowMenu ); - windowMenu->insertSeparator(); - actionWindowTile->addTo( windowMenu ); - actionWindowCascade->addTo( windowMenu ); - windowMenu->insertSeparator(); - windowMenu->insertItem( i18n( "Vie&ws" ), createDockWindowMenu( NoToolBars ) ); - windowMenu->insertItem( i18n( "Tool&bars" ), createDockWindowMenu( OnlyToolBars ) ); - TQWidgetList windows = qworkspace->windowList(); - if ( windows.count() && formWindow() ) - windowMenu->insertSeparator(); - int j = 0; - for ( int i = 0; i < int( windows.count() ); ++i ) { - TQWidget *w = windows.at( i ); - if ( !::tqqt_cast(w) && !::tqqt_cast(w) ) - continue; - if ( ::tqqt_cast(w) && ( ( (FormWindow*)w )->isFake() ) ) - continue; - j++; - TQString itemText; - if ( j < 10 ) - itemText = TQString("&%1 ").arg( j ); - if ( ::tqqt_cast(w) ) - itemText += w->name(); - else - itemText += w->caption(); - - int id = windowMenu->insertItem( itemText, TQT_TQOBJECT(this), TQT_SLOT( windowsMenuActivated( int ) ) ); - windowMenu->setItemParameter( id, i ); - windowMenu->setItemChecked( id, qworkspace->activeWindow() == windows.at( i ) ); - } -} - -void MainWindow::setupHelpActions() -{ - actionHelpContents = new DesignerAction( i18n( "Contents" ), i18n( "&Contents" ), Key_F1, TQT_TQOBJECT(this), 0 ); - actionHelpContents->setStatusTip( i18n("Opens the online help") ); - actionHelpContents->setWhatsThis( whatsThisFrom( "Help|Contents" ) ); - connect( actionHelpContents, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpContents() ) ); - - actionHelpManual = new DesignerAction( i18n( "Manual" ), i18n( "&Manual" ), CTRL + Key_M, TQT_TQOBJECT(this), 0 ); - actionHelpManual->setStatusTip( i18n("Opens the TQt Designer manual") ); - actionHelpManual->setWhatsThis( whatsThisFrom( "Help|Manual" ) ); - connect( actionHelpManual, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpManual() ) ); - - actionHelpAbout = new DesignerAction( i18n("About"), TQPixmap(), i18n("&About"), 0, TQT_TQOBJECT(this), 0 ); - actionHelpAbout->setStatusTip( i18n("Displays information about TQt Designer") ); - actionHelpAbout->setWhatsThis( whatsThisFrom( "Help|About" ) ); - connect( actionHelpAbout, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpAbout() ) ); - - actionHelpAboutTQt = new DesignerAction( i18n("About TQt"), TQPixmap(), i18n("About &TQt"), 0, TQT_TQOBJECT(this), 0 ); - actionHelpAboutTQt->setStatusTip( i18n("Displays information about the TQt Toolkit") ); - actionHelpAboutTQt->setWhatsThis( whatsThisFrom( "Help|About TQt" ) ); - connect( actionHelpAboutTQt, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpAboutTQt() ) ); - -#if 0 //defined(TQT_NON_COMMERCIAL) - // ### not used anymore -- should be deleted? - actionHelpRegister = new DesignerAction( i18n("Register TQt"), TQPixmap(), i18n("&Register TQt..."), 0, TQT_TQOBJECT(this), 0 ); - actionHelpRegister->setStatusTip( i18n("Opens a web browser at the evaluation form on www.trolltech.com") ); - actionHelpRegister->setWhatsThis( i18n("Register with Trolltech") ); - connect( actionHelpRegister, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( helpRegister() ) ); -#endif - - actionHelpWhatsThis = new DesignerAction( i18n("What's This?"), TQIconSet( whatsthis_image, whatsthis_image ), - i18n("What's This?"), SHIFT + Key_F1, TQT_TQOBJECT(this), 0 ); - actionHelpWhatsThis->setStatusTip( i18n("\"What's This?\" context sensitive help") ); - actionHelpWhatsThis->setWhatsThis( whatsThisFrom( "Help|What's This?" ) ); - connect( actionHelpWhatsThis, TQT_SIGNAL( activated() ), TQT_TQOBJECT(this), TQT_SLOT( whatsThis() ) ); - -/* TQToolBar *tb = new TQToolBar( this, "Help" ); - tb->setCloseMode( TQDockWindow::Undocked ); - TQWhatsThis::add( tb, i18n( "The Help toolbar%1" ).arg(i18n(toolbarHelp).arg("") )); - addToolBar( tb, i18n( "Help" ) ); - actionHelpWhatsThis->addTo( tb );*/ - - TQPopupMenu *menu = new TQPopupMenu( this, "Help" ); - menubar->insertSeparator(); - menubar->insertItem( i18n( "&Help" ), menu ); - actionHelpContents->addTo( menu ); - actionHelpManual->addTo( menu ); - menu->insertSeparator(); - actionHelpAbout->addTo( menu ); - actionHelpAboutTQt->addTo( menu ); -#if 0 //defined(TQT_NON_COMMERCIAL) - // ### not used anymore -- should be deleted? - actionHelpRegister->addTo( menu ); -#endif - - menu->insertSeparator(); - actionHelpWhatsThis->addTo( menu ); -} - -void MainWindow::fileNew() -{ - statusMessage( i18n( "Create a new project, form or source file...") ); - NewForm dlg( this, projectNames(), currentProject->projectName(), templatePath() ); - dlg.exec(); - statusBar()->clear(); -} - -void MainWindow::fileNewDialog() -{ - static int forms = 0; - TQString n = "Dialog" + TQString::number( ++forms ); - while ( currentProject->findFormFile( n + ".ui" ) ) - n = "Dialog" + TQString::number( ++forms ); - FormWindow *fw = 0; - FormFile *ff = new FormFile( n + ".ui", FALSE, currentProject ); - fw = new FormWindow( ff, MainWindow::self, MainWindow::self->qWorkspace(), n ); - ff->setModified( TRUE ); - currentProject->setModified( TRUE ); - workspace()->update(); - fw->setProject( currentProject ); - MetaDataBase::addEntry( TQT_TQOBJECT(fw) ); - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQDIALOG_OBJECT_NAME_STRING ), fw, n.latin1() ); - fw->setMainContainer( w ); - fw->setCaption( n ); - fw->resize( 600, 480 ); - insertFormWindow( fw ); - fw->killAccels( TQT_TQOBJECT(fw) ); - fw->project()->setModified( TRUE ); - fw->setFocus(); - fw->setSavePixmapInProject( TRUE ); - fw->setSavePixmapInline( FALSE ); -} - -void MainWindow::fileNewFile() -{ - TQString name = TQInputDialog::getText( i18n( "Name of File" ), i18n( "Enter the name of the new source file:" ) ); - if ( name.isEmpty() ) - return; - if ( name.right( 3 ) != ".qs" ) - name += ".qs"; - SourceFile *f = new SourceFile( name, FALSE, currentProject ); - MainWindow::self->editSource( f ); - f->setModified( TRUE ); - currentProject->setModified( TRUE ); - workspace()->update(); -} - -void MainWindow::fileQuit() -{ - close(); - if ( !singleProjectMode() ) - tqApp->closeAllWindows(); -} - -void MainWindow::fileClose() -{ - if ( !currentProject->isDummy() ) { - fileCloseProject(); - } else { - TQWidget *w = qworkspace->activeWindow(); - if ( w ) { - if ( ::tqqt_cast(w) ) - ( (FormWindow*)w )->formFile()->close(); - else if ( ::tqqt_cast(w) ) - ( (SourceEditor*)w )->close(); - } - } -} - - -void MainWindow::fileCloseProject() -{ - if ( currentProject->isDummy() ) - return; - Project *pro = currentProject; - TQAction* a = 0; - TQAction* lastValid = 0; - for ( TQMap::Iterator it = projects.begin(); it != projects.end(); ++it ) { - if ( it.data() == pro ) { - a = it.key(); - if ( lastValid ) - break; - } - lastValid = it.key(); - } - if ( a ) { - if ( pro->isModified() ) { - switch ( TQMessageBox::warning( this, i18n( "Save Project Settings" ), - i18n( "Save changes to '%1'?" ).arg( pro->fileName() ), - i18n( "&Yes" ), i18n( "&No" ), i18n( "&Cancel" ), 0, 2 ) ) { - case 0: // save - pro->save(); - break; - case 1: // don't save - break; - case 2: // cancel - return; - default: - break; - } - } - - TQWidgetList windows = qWorkspace()->windowList(); - qWorkspace()->blockSignals( TRUE ); - TQWidgetListIt wit( windows ); - while ( wit.current() ) { - TQWidget *w = wit.current(); - ++wit; - if ( ::tqqt_cast(w) ) { - if ( ( (FormWindow*)w )->project() == pro ) { - if ( ( (FormWindow*)w )->formFile()->editor() ) - windows.removeRef( ( (FormWindow*)w )->formFile()->editor() ); - if ( !( (FormWindow*)w )->formFile()->close() ) - return; - } - } else if ( ::tqqt_cast(w) ) { - if ( !( (SourceEditor*)w )->close() ) - return; - } - } - hierarchyView->clear(); - windows = qWorkspace()->windowList(); - qWorkspace()->blockSignals( FALSE ); - actionGroupProjects->removeChild( a ); - projects.remove( a ); - delete a; - currentProject = 0; - if ( lastValid ) { - projectSelected( lastValid ); - statusMessage( i18n( "Selected project '%1'" ).arg( currentProject->projectName() ) ); - } - if ( !windows.isEmpty() ) { - for ( TQWidget *w = windows.first(); w; w = windows.next() ) { - if ( !::tqqt_cast(w) ) - continue; - w->setFocus(); - activeWindowChanged( w ); - break; - } - } else { - emit hasActiveWindow( FALSE ); - emit hasActiveForm( FALSE ); - updateUndoRedo( FALSE, FALSE, TQString(), TQString() ); - } - } -} - -void MainWindow::fileOpen() // as called by the menu -{ - fileOpen( "", "", "", FALSE ); -} - -void MainWindow::projectInsertFile() -{ - fileOpen( "", "" ); -} - -void MainWindow::fileOpen( const TQString &filter, const TQString &extension, const TQString &fn, bool inProject ) -{ - statusMessage( i18n( "Open a file...") ); - - TQPluginManager manager( IID_ImportFilter, TQApplication::libraryPaths(), pluginDirectory() ); - - Project* project = inProject ? currentProject : eProject; - - TQStringList additionalSources; - - { - TQStringList filterlist; - if ( filter.isEmpty() ) { - if ( !inProject ) - filterlist << i18n( "*.ui *.pro|Designer Files" ); - filterlist << i18n( "*.ui|TQt User-Interface Files" ); - if ( !inProject ) - filterlist << i18n( "*.pro|TQMAKE Project Files" ); - TQStringList list = manager.featureList(); - for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) - filterlist << *it; - LanguageInterface *iface = MetaDataBase::languageInterface( project->language() ); - if ( iface ) { - filterlist += iface->fileFilterList(); - additionalSources += iface->fileExtensionList(); - } - filterlist << i18n( "*|All Files" ); - } else { - filterlist << filter; - } - - TQString filters = filterlist.join( "\n" ); - - TQStringList filenames; - if ( fn.isEmpty() ) { - if ( !inProject ) { - TQString f = KFileDialog::getOpenFileName( TQString(), filters, this, /*0,*/ - i18n("Open" )/*, &lastOpenFilter */); - filenames << f; - } else { - filenames = KFileDialog::getOpenFileNames( TQString(), filters, this, /*0,*/ - i18n("Add")/*, &lastOpenFilter */); - } - } else { - filenames << fn; - } - - for ( TQStringList::Iterator fit = filenames.begin(); fit != filenames.end(); ++fit ) { - TQString filename = *fit; - if ( !filename.isEmpty() ) { - TQFileInfo fi( filename ); - - if ( fi.extension( FALSE ) == "pro" && ( extension.isEmpty() || extension.find( ";pro" ) != -1 ) ) { - addRecentlyOpened( filename, recentlyProjects ); - openProject( filename ); - } else if ( fi.extension( FALSE ) == "ui" && ( extension.isEmpty() || extension.find( ";ui" ) != -1 ) ) { - if ( !inProject ) - setCurrentProject( eProject ); - openFormWindow( filename ); - addRecentlyOpened( filename, recentlyFiles ); - } else if ( !extension.isEmpty() && extension.find( ";" + fi.extension( FALSE ) ) != -1 || - additionalSources.find( fi.extension( FALSE ) ) != additionalSources.end() ) { - SourceFile *sf = project->findSourceFile( project->makeRelative( filename ) ); - if ( !sf ) - sf = new SourceFile( project->makeRelative( filename ), FALSE, project ); - editSource( sf ); - } else if ( extension.isEmpty() ) { - TQString filter; - for ( TQStringList::Iterator it2 = filterlist.begin(); it2 != filterlist.end(); ++it2 ) { - if ( (*it2).contains( "." + fi.extension( FALSE ), FALSE ) ) { - filter = *it2; - break; - } - } - - ImportFilterInterface* iface = 0; - manager.queryInterface( filter, &iface ); - if ( !iface ) { - statusMessage( i18n( "No import filter is available to import '%1'"). - arg( filename )/*, 3000*/ ); - return; - } - statusMessage( i18n( "Importing '%1' using import filter ...").arg( filename ) ); - TQStringList list = iface->import( filter, filename ); - iface->release(); - if ( list.isEmpty() ) { - statusMessage( i18n( "Nothing to load in '%1'").arg( filename )/*, 3000*/ ); - return; - } - if ( !inProject ) - setCurrentProject( eProject ); - addRecentlyOpened( filename, recentlyFiles ); - for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { - openFormWindow( *it, FALSE ); - TQFile::remove( *it ); - } - statusBar()->clear(); - } - } - } - } -} - -FormWindow *MainWindow::openFormWindow( const TQString &filename, bool validFileName, FormFile *ff ) -{ - if ( filename.isEmpty() ) - return 0; - - bool makeNew = FALSE; - - if ( !TQFile::exists( filename ) ) { - makeNew = TRUE; - } else { - TQFile f( filename ); - f.open( IO_ReadOnly ); - TQTextStream ts( &f ); - makeNew = ts.read().length() < 2; - } - if ( makeNew ) { - fileNew(); - if ( formWindow() ) - formWindow()->setFileName( filename ); - return formWindow(); - } - - statusMessage( i18n( "Reading file '%1'...").arg( filename ) ); - FormFile *ff2 = currentProject->findFormFile( currentProject->makeRelative(filename) ); - if ( ff2 && ff2->formWindow() ) { - ff2->formWindow()->setFocus(); - return ff2->formWindow(); - } - - if ( ff2 ) - ff = ff2; - TQApplication::setOverrideCursor( WaitCursor ); - Resource resource( this ); - if ( !ff ) - ff = new FormFile( currentProject->makeRelative( filename ), FALSE, currentProject ); - bool b = resource.load( ff ) && (FormWindow*)resource.widget(); - if ( !validFileName && resource.widget() ) - ( (FormWindow*)resource.widget() )->setFileName( TQString() ); - TQApplication::restoreOverrideCursor(); - if ( b ) { - rebuildCustomWidgetGUI(); - statusMessage( i18n( "Loaded file '%1'").arg( filename )/*, 3000 */); - } else { - statusMessage( i18n( "Failed to load file '%1'").arg( filename )/*, 5000 */); - TQMessageBox::information( this, i18n("Load File"), i18n("Could not load file '%1'.").arg( filename ) ); - delete ff; - } - return (FormWindow*)resource.widget(); -} - -bool MainWindow::fileSave() -{ - - if ( !currentProject->isDummy() ) - return fileSaveProject(); - return fileSaveForm(); -} - -bool MainWindow::fileSaveForm() -{ - for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { - if ( TQT_BASE_OBJECT(e->object()) == formWindow() || e == qWorkspace()->activeWindow() ) { - e->save(); - } - } - - FormWindow *fw = 0; - - TQWidget *w = qWorkspace()->activeWindow(); - if ( w ) { - if ( ::tqqt_cast(w) ) { - SourceEditor *se = (SourceEditor*)w; - if ( se->formWindow() ) - fw = se->formWindow(); - else if ( se->sourceFile() ) { - se->sourceFile()->save(); - return TRUE; - } - } - } - - if ( !fw ) - fw = formWindow(); - if ( !fw || !fw->formFile()->save() ) - return FALSE; - TQApplication::restoreOverrideCursor(); - return TRUE; -} - -bool MainWindow::fileSaveProject() -{ - currentProject->save(); - statusMessage( i18n( "Project '%1' saved.").arg( currentProject->projectName() )/*, 3000 */); - return TRUE; -} - -bool MainWindow::fileSaveAs() -{ - statusMessage( i18n( "Enter a filename..." ) ); - - TQWidget *w = qworkspace->activeWindow(); - if ( !w ) - return TRUE; - if ( ::tqqt_cast(w) ) - return ( (FormWindow*)w )->formFile()->saveAs(); - else if ( ::tqqt_cast(w) ) - return ( (SourceEditor*)w )->saveAs(); - return FALSE; -} - -void MainWindow::fileSaveAll() -{ - for ( TQMap::Iterator it = projects.begin(); it != projects.end(); ++it ) - (*it)->save(); -} - -void MainWindow::fileCreateTemplate() -{ - CreateTemplate dia( this, 0, TRUE ); - - int i = 0; - for ( i = 0; i < WidgetDatabase::count(); ++i ) { - if ( WidgetDatabase::isForm( i ) && WidgetDatabase::group( i ) != "Temp") { - dia.listClass->insertItem( WidgetDatabase::className( i ) ); - } - } - for ( i = 0; i < WidgetDatabase::count(); ++i ) { - if ( WidgetDatabase::isContainer( i ) && !WidgetDatabase::isForm(i) && - WidgetDatabase::className( i ) != TQTABWIDGET_OBJECT_NAME_STRING && WidgetDatabase::group( i ) != "Temp" ) { - dia.listClass->insertItem( WidgetDatabase::className( i ) ); - } - } - - TQPtrList *lst = MetaDataBase::customWidgets(); - for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) { - if ( w->isContainer ) - dia.listClass->insertItem( w->className ); - } - - dia.editName->setText( i18n( "NewTemplate" ) ); - connect( dia.buttonCreate, TQT_SIGNAL( clicked() ), - this, TQT_SLOT( createNewTemplate() ) ); - dia.exec(); -} - -void MainWindow::createNewTemplate() -{ - CreateTemplate *dia = (CreateTemplate*)TQT_TQOBJECT(const_cast(sender()))->parent(); - TQString fn = dia->editName->text(); - TQString cn = dia->listClass->currentText(); - if ( fn.isEmpty() || cn.isEmpty() ) { - TQMessageBox::information( this, i18n( "Create Template" ), i18n( "Could not create the template." ) ); - return; - } - - TQStringList templRoots; - const char *qtdir = getenv( "QTDIR" ); - if(qtdir) - templRoots << qtdir; - templRoots << tqInstallPathData(); - if(qtdir) //try the tools/designer directory last! - templRoots << (TQString(qtdir) + "/tools/designer"); - TQFile f; - for ( TQStringList::Iterator it = templRoots.begin(); it != templRoots.end(); ++it ) { - if ( TQFile::exists( (*it) + "/templates/" )) { - TQString tmpfn = (*it) + "/templates/" + fn + ".ui"; - f.setName(tmpfn); - if(f.open(IO_WriteOnly)) - break; - } - } - if ( !f.isOpen() ) { - TQMessageBox::information( this, i18n( "Create Template" ), i18n( "Could not create the template." ) ); - return; - } - TQTextStream ts( &f ); - - ts << "" << endl; - ts << "" << endl; - ts << "" << cn << "" << endl; - ts << "" << endl; - ts << " name" << endl; - ts << " " << cn << "Form" << endl; - ts << "" << endl; - ts << "" << endl; - ts << " geometry" << endl; - ts << " " << endl; - ts << " 300" << endl; - ts << " 400" << endl; - ts << " " << endl; - ts << "" << endl; - ts << "" << endl; - ts << "" << endl; - - dia->editName->setText( i18n( "NewTemplate" ) ); - - f.close(); -} - -void MainWindow::editUndo() -{ - if ( qWorkspace()->activeWindow() && - ::tqqt_cast(qWorkspace()->activeWindow()) ) { - ( (SourceEditor*)qWorkspace()->activeWindow() )->editUndo(); - return; - } - if ( formWindow() ) - formWindow()->undo(); -} - -void MainWindow::editRedo() -{ - if ( qWorkspace()->activeWindow() && - ::tqqt_cast(qWorkspace()->activeWindow()) ) { - ( (SourceEditor*)qWorkspace()->activeWindow() )->editRedo(); - return; - } - if ( formWindow() ) - formWindow()->redo(); -} - -void MainWindow::editCut() -{ - if ( qWorkspace()->activeWindow() && - ::tqqt_cast(qWorkspace()->activeWindow()) ) { - ( (SourceEditor*)qWorkspace()->activeWindow() )->editCut(); - return; - } - editCopy(); - editDelete(); -} - -void MainWindow::editCopy() -{ - if ( qWorkspace()->activeWindow() && - ::tqqt_cast(qWorkspace()->activeWindow()) ) { - ( (SourceEditor*)qWorkspace()->activeWindow() )->editCopy(); - return; - } - if ( formWindow() ) - tqApp->clipboard()->setText( formWindow()->copy() ); -} - -void MainWindow::editPaste() -{ - if ( qWorkspace()->activeWindow() && - ::tqqt_cast(qWorkspace()->activeWindow()) ) { - ( (SourceEditor*)qWorkspace()->activeWindow() )->editPaste(); - return; - } - if ( !formWindow() ) - return; - - TQWidget *w = formWindow()->mainContainer(); - TQWidgetList l( formWindow()->selectedWidgets() ); - if ( l.count() == 1 ) { - w = l.first(); - if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout || - ( !WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) ) && - w != formWindow()->mainContainer() ) ) - w = formWindow()->mainContainer(); - } - - if ( w && WidgetFactory::layoutType( w ) == WidgetFactory::NoLayout ) { - formWindow()->paste( tqApp->clipboard()->text(), WidgetFactory::containerOfWidget( w ) ); - hierarchyView->widgetInserted( 0 ); - formWindow()->commandHistory()->setModified( TRUE ); - } else { - TQMessageBox::information( this, i18n( "Paste Error" ), - i18n( "Cannot paste widgets. Designer could not find a container\n" - "to paste into which does not contain a layout. Break the layout\n" - "of the container you want to paste into and select this container\n" - "and then paste again." ) ); - } -} - -void MainWindow::editDelete() -{ - if ( formWindow() ) - formWindow()->deleteWidgets(); -} - -void MainWindow::editSelectAll() -{ - if ( qWorkspace()->activeWindow() && - ::tqqt_cast(qWorkspace()->activeWindow()) ) { - ( (SourceEditor*)qWorkspace()->activeWindow() )->editSelectAll(); - return; - } - if ( formWindow() ) - formWindow()->selectAll(); -} - - -void MainWindow::editLower() -{ - if ( formWindow() ) - formWindow()->lowerWidgets(); -} - -void MainWindow::editRaise() -{ - if ( formWindow() ) - formWindow()->raiseWidgets(); -} - -void MainWindow::editAdjustSize() -{ - if ( formWindow() ) - formWindow()->editAdjustSize(); -} - -void MainWindow::editLayoutHorizontal() -{ - if ( layoutChilds ) - editLayoutContainerHorizontal(); - else if ( layoutSelected && formWindow() ) - formWindow()->layoutHorizontal(); -} - -void MainWindow::editLayoutVertical() -{ - if ( layoutChilds ) - editLayoutContainerVertical(); - else if ( layoutSelected && formWindow() ) - formWindow()->layoutVertical(); -} - -void MainWindow::editLayoutHorizontalSplit() -{ - if ( layoutChilds ) - ; // no way to do that - else if ( layoutSelected && formWindow() ) - formWindow()->layoutHorizontalSplit(); -} - -void MainWindow::editLayoutVerticalSplit() -{ - if ( layoutChilds ) - ; // no way to do that - else if ( layoutSelected && formWindow() ) - formWindow()->layoutVerticalSplit(); -} - -void MainWindow::editLayoutGrid() -{ - if ( layoutChilds ) - editLayoutContainerGrid(); - else if ( layoutSelected && formWindow() ) - formWindow()->layoutGrid(); -} - -void MainWindow::editLayoutContainerVertical() -{ - if ( !formWindow() ) - return; - TQWidget *w = formWindow()->mainContainer(); - TQWidgetList l( formWindow()->selectedWidgets() ); - if ( l.count() == 1 ) - w = l.first(); - if ( w ) - formWindow()->layoutVerticalContainer( w ); -} - -void MainWindow::editLayoutContainerHorizontal() -{ - if ( !formWindow() ) - return; - TQWidget *w = formWindow()->mainContainer(); - TQWidgetList l( formWindow()->selectedWidgets() ); - if ( l.count() == 1 ) - w = l.first(); - if ( w ) - formWindow()->layoutHorizontalContainer( w ); -} - -void MainWindow::editLayoutContainerGrid() -{ - if ( !formWindow() ) - return; - TQWidget *w = formWindow()->mainContainer(); - TQWidgetList l( formWindow()->selectedWidgets() ); - if ( l.count() == 1 ) - w = l.first(); - if ( w ) - formWindow()->layoutGridContainer( w ); -} - -void MainWindow::editBreakLayout() -{ - if ( !formWindow() || !breakLayout ) - return; - TQWidget *w = formWindow()->mainContainer(); - if ( formWindow()->currentWidget() ) - w = formWindow()->currentWidget(); - if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout || - w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) { - formWindow()->breakLayout( w ); - return; - } else { - TQWidgetList widgets = formWindow()->selectedWidgets(); - for ( w = widgets.first(); w; w = widgets.next() ) { - if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout || - w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) - break; - } - if ( w ) { - formWindow()->breakLayout( w ); - return; - } - } - - w = formWindow()->mainContainer(); - if ( WidgetFactory::layoutType( w ) != WidgetFactory::NoLayout || - w->parentWidget() && WidgetFactory::layoutType( w->parentWidget() ) != WidgetFactory::NoLayout ) - formWindow()->breakLayout( w ); -} - -void MainWindow::editAccels() -{ - if ( !formWindow() ) - return; - formWindow()->checkAccels(); -} - -void MainWindow::editFunctions() -{ - if ( !formWindow() ) - return; - - statusMessage( i18n( "Edit the current form's slots..." ) ); - EditFunctions dlg( this, formWindow(), TRUE ); - dlg.exec(); - statusBar()->clear(); -} - -void MainWindow::editConnections() -{ - if ( !formWindow() ) - return; - - statusMessage( i18n( "Edit the current form's connections..." ) ); - ConnectionDialog dlg( this ); - dlg.exec(); - - statusBar()->clear(); -} - -SourceEditor *MainWindow::editSource() -{ - if ( !formWindow() ) - return 0; - return formWindow()->formFile()->showEditor(); -} - -SourceEditor *MainWindow::openSourceEditor() -{ - if ( !formWindow() ) - return 0; - - TQString lang = currentProject->language(); - if ( !MetaDataBase::hasEditor( lang ) ) { - TQMessageBox::information( this, i18n( "Edit Source" ), - i18n( "There is no plugin for editing %1 code installed.\n" - "Note: Plugins are not available in static TQt configurations." ).arg( lang ) ); - return 0; - } - - SourceEditor *editor = 0; - for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) { - if ( e->language() == lang && e->formWindow() == formWindow() ) { - editor = e; - break; - } - } - - if ( !editor ) -editor = createSourceEditor( TQT_TQOBJECT(formWindow()), formWindow()->project(), lang ); - return editor; -} - -SourceEditor *MainWindow::editSource( SourceFile *f ) -{ - TQString lang = currentProject->language(); - if ( !MetaDataBase::hasEditor( lang ) ) { - TQMessageBox::information( this, i18n( "Edit Source" ), - i18n( "There is no plugin for editing %1 code installed.\n" - "Note: Plugins are not available in static TQt configurations." ).arg( lang ) ); - return 0; - } - - SourceEditor *editor = 0; - if ( f ) - editor = f->editor(); - if ( !editor ) - editor = createSourceEditor( f, currentProject, lang ); - editor->setActiveWindow(); - editor->setFocus(); - return editor; -} - -SourceEditor *MainWindow::createSourceEditor( TQObject *object, Project *project, - const TQString &lang, const TQString &func, - bool rereadSource ) -{ - SourceEditor *editor = 0; - EditorInterface *eIface = 0; - editorPluginManager->queryInterface( lang, &eIface ); - if ( !eIface ) - return 0; - LanguageInterface *lIface = MetaDataBase::languageInterface( lang ); - if ( !lIface ) - return 0; - TQApplication::setOverrideCursor( WaitCursor ); - editor = new SourceEditor( qWorkspace(), eIface, lIface ); - eIface->release(); - lIface->release(); - - editor->setLanguage( lang ); - sourceEditors.append( editor ); - TQApplication::restoreOverrideCursor(); - - if ( editor->object() != object ) - editor->setObject( object, project ); - else if ( rereadSource ) - editor->refresh( FALSE ); - - editor->show(); - editor->setFocus(); - if ( !func.isEmpty() ) - editor->setFunction( func ); - emit editorChanged(); - - return editor; -} - -void MainWindow::editFormSettings() -{ - if ( !formWindow() ) - return; - - statusMessage( i18n( "Edit the current form's settings..." ) ); - FormSettings dlg( this, formWindow() ); - dlg.exec(); - statusBar()->clear(); -} - -void MainWindow::editProjectSettings() -{ - openProjectSettings( currentProject ); - wspace->setCurrentProject( currentProject ); -} - -void MainWindow::editPixmapCollection() -{ - PixmapCollectionEditor dia( this, 0, TRUE ); - dia.setProject( currentProject ); - dia.exec(); -} - -void MainWindow::editDatabaseConnections() -{ -#ifndef TQT_NO_SQL - DatabaseConnectionsEditor dia( currentProject, this, 0, TRUE ); - dia.exec(); -#endif -} - -void MainWindow::editPreferences() -{ - statusMessage( i18n( "Edit preferences..." ) ); - Preferences *dia = new Preferences( this, 0, TRUE ); - prefDia = dia; - connect( dia->helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); - dia->buttonColor->setEditor( StyledButton::ColorEditor ); - dia->buttonPixmap->setEditor( StyledButton::PixmapEditor ); - dia->groupBoxGrid->setChecked( sGrid ); - dia->checkBoxSnapGrid->setChecked( snGrid ); - dia->spinGridX->setValue( grid().x() ); - dia->spinGridY->setValue( grid().y() ); - dia->checkBoxWorkspace->setChecked( restoreConfig ); - dia->checkBoxTextLabels->setChecked( usesTextLabel() ); - dia->buttonColor->setColor( qworkspace->backgroundColor() ); - TQString pluginPaths = TQApplication::libraryPaths().join("\n"); - dia->textEditPluginPaths->setText(pluginPaths); - if ( qworkspace->backgroundPixmap() ) - dia->buttonPixmap->setPixmap( *qworkspace->backgroundPixmap() ); - if ( backPix ) - dia->radioPixmap->setChecked( TRUE ); - else - dia->radioColor->setChecked( TRUE ); - dia->checkBoxSplash->setChecked( splashScreen ); - dia->checkAutoEdit->setChecked( !databaseAutoEdit ); - dia->checkBoxStartDialog->setChecked( shStartDialog ); - dia->checkBoxAutoSave->setChecked( autoSaveEnabled ); - int h = autoSaveInterval / 3600; - int m = ( autoSaveInterval - h * 3600 ) / 60; - int s = autoSaveInterval - ( h * 3600 + m * 60 ); - TQTime t( h, m, s ); - dia->timeEditAutoSave->setTime( t ); - - SenderObject *senderObject = new SenderObject( designerInterface() ); - TQValueList::Iterator it; - for ( it = preferenceTabs.begin(); it != preferenceTabs.end(); ++it ) { - Tab t = *it; - dia->tabWidget->addTab( t.w, t.title ); - if ( t.receiver ) { - connect( dia->buttonOk, TQT_SIGNAL( clicked() ), senderObject, TQT_SLOT( emitAcceptSignal() ) ); - connect( senderObject, TQT_SIGNAL( acceptSignal( TQUnknownInterface * ) ), t.receiver, t.accept_slot ); - connect( senderObject, TQT_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot ); - senderObject->emitInitSignal(); - disconnect( senderObject, TQT_SIGNAL( initSignal( TQUnknownInterface * ) ), t.receiver, t.init_slot ); - } - } - - if ( dia->exec() == TQDialog::Accepted ) { - setSnapGrid( dia->checkBoxSnapGrid->isChecked() ); - setShowGrid( dia->groupBoxGrid->isChecked() ); - setGrid( TQPoint( dia->spinGridX->value(), - dia->spinGridY->value() ) ); - restoreConfig = dia->checkBoxWorkspace->isChecked(); - setUsesTextLabel( dia->checkBoxTextLabels->isChecked() ); - if (dia->textEditPluginPaths->isModified()) { - pluginPaths = dia->textEditPluginPaths->text(); - TQApplication::setLibraryPaths(TQStringList::split("\n", pluginPaths)); - savePluginPaths = TRUE; - } - - if ( dia->radioPixmap->isChecked() && dia->buttonPixmap->pixmap() ) { - qworkspace->setBackgroundPixmap( *dia->buttonPixmap->pixmap() ); - backPix = TRUE; - } else { - qworkspace->setBackgroundColor( dia->buttonColor->color() ); - backPix = FALSE; - } - splashScreen = dia->checkBoxSplash->isChecked(); - databaseAutoEdit = !dia->checkAutoEdit->isChecked(); - shStartDialog = dia->checkBoxStartDialog->isChecked(); - autoSaveEnabled = dia->checkBoxAutoSave->isChecked(); - TQTime time = dia->timeEditAutoSave->time(); - autoSaveInterval = time.hour() * 3600 + time.minute() * 60 + time.second(); - if ( autoSaveEnabled ) - autoSaveTimer->start( autoSaveInterval * 1000 ); - else - autoSaveTimer->stop(); - } - delete senderObject; - for ( it = preferenceTabs.begin(); it != preferenceTabs.end(); ++it ) { - Tab t = *it; - dia->tabWidget->removePage( t.w ); - t.w->reparent( 0, TQPoint(0,0), FALSE ); - } - - for ( SourceEditor *e = sourceEditors.first(); e; e = sourceEditors.next() ) - e->configChanged(); - - delete dia; - prefDia = 0; - statusBar()->clear(); -} - -void MainWindow::searchFind() -{ - if ( !qWorkspace()->activeWindow() || - !::tqqt_cast(qWorkspace()->activeWindow()) ) - return; - - if ( !findDialog ) - findDialog = new FindDialog( this, 0, FALSE ); - findDialog->show(); - findDialog->raise(); - findDialog->setEditor( ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface(), - ( (SourceEditor*)qWorkspace()->activeWindow() )->object() ); - findDialog->comboFind->setFocus(); - findDialog->comboFind->lineEdit()->selectAll(); -} - -void MainWindow::searchIncremetalFindMenu() -{ - incrementalSearch->selectAll(); - incrementalSearch->setFocus(); -} - -void MainWindow::searchIncremetalFind() -{ - if ( !qWorkspace()->activeWindow() || - !::tqqt_cast(qWorkspace()->activeWindow()) ) - return; - - ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->find( incrementalSearch->text(), - FALSE, FALSE, TRUE, FALSE ); -} - -void MainWindow::searchIncremetalFindNext() -{ - if ( !qWorkspace()->activeWindow() || - !::tqqt_cast(qWorkspace()->activeWindow()) ) - return; - - ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface()->find( incrementalSearch->text(), - FALSE, FALSE, TRUE, TRUE ); -} - -void MainWindow::searchReplace() -{ - if ( !qWorkspace()->activeWindow() || - !::tqqt_cast(qWorkspace()->activeWindow()) ) - return; - - if ( !replaceDialog ) - replaceDialog = new ReplaceDialog( this, 0, FALSE ); - replaceDialog->show(); - replaceDialog->raise(); - replaceDialog->setEditor( ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface(), - ( (SourceEditor*)qWorkspace()->activeWindow() )->object() ); - replaceDialog->comboFind->setFocus(); - replaceDialog->comboFind->lineEdit()->selectAll(); -} - -void MainWindow::searchGotoLine() -{ - if ( !qWorkspace()->activeWindow() || - !::tqqt_cast(qWorkspace()->activeWindow()) ) - return; - - if ( !gotoLineDialog ) - gotoLineDialog = new GotoLineDialog( this, 0, FALSE ); - gotoLineDialog->show(); - gotoLineDialog->raise(); - gotoLineDialog->setEditor( ( (SourceEditor*)qWorkspace()->activeWindow() )->editorInterface() ); - gotoLineDialog->spinLine->setFocus(); - gotoLineDialog->spinLine->setMinValue( 1 ); - gotoLineDialog->spinLine->setMaxValue( ( (SourceEditor*)qWorkspace()->activeWindow() )->numLines() ); - gotoLineDialog->spinLine->selectAll(); -} - -void MainWindow::toolsCustomWidget() -{ - statusMessage( i18n( "Edit custom widgets..." ) ); - CustomWidgetEditor edit( this, this ); - edit.exec(); - rebuildCustomWidgetGUI(); - statusBar()->clear(); -} - -void MainWindow::toolsConfigure() -{ - ConfigToolboxDialog dlg( this ); - if ( dlg.exec() != TQDialog::Accepted ) - return; - rebuildCommonWidgetsToolBoxPage(); -} - -void MainWindow::showStartDialog() -{ - if ( singleProjectMode() ) - return; - for ( int i = 1; i < tqApp->argc(); ++i ) { - TQString arg = tqApp->argv()[i]; - if ( arg[0] != '-' ) - return; - } - StartDialog *sd = new StartDialog( this, templatePath() ); - sd->setRecentlyFiles( recentlyFiles ); - sd->setRecentlyProjects( recentlyProjects ); - sd->exec(); - shStartDialog = sd->showDialogInFuture(); -} diff --git a/tdevdesigner/designer/metadatabase.cpp b/tdevdesigner/designer/metadatabase.cpp deleted file mode 100644 index aa85fc80..00000000 --- a/tdevdesigner/designer/metadatabase.cpp +++ /dev/null @@ -1,1692 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "metadatabase.h" -#include "widgetfactory.h" -#include "formwindow.h" -#include "parser.h" -#include "widgetdatabase.h" -#include "formfile.h" -#include "propertyobject.h" -#include "project.h" -#include "mainwindow.h" - -#include "tdevdesigner_part.h" - -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -class MetaDataBaseRecord -{ -public: - TQObject *object; - TQStringList changedProperties; - TQMap fakeProperties; - TQMap propertyComments; - int spacing, margin; - TQString resizeMode; - TQValueList connections; - TQValueList functionList; - TQValueList includes; - TQValueList variables; - TQStringList forwards, sigs; - TQWidgetList tabOrder; - MetaDataBase::MetaInfo metaInfo; - TQCursor cursor; - TQMap pixmapArguments; - TQMap pixmapKeys; - TQMap columnFields; - TQValueList breakPoints; - TQMap breakPointConditions; - TQString exportMacro; -}; - -static TQPtrDict *db = 0; -static TQPtrList *cWidgets = 0; -static bool doUpdate = TRUE; -static TQStringList langList; -static TQStringList editorLangList; -static TQPluginManager *languageInterfaceManager = 0; - -/*! - \class MetaDataBase metadatabase.h - \brief Database which stores meta data of widgets - - The MetaDataBase stores meta information of widgets, which are not - stored directly in widgets (properties). This is e.g. the - information which properties have been modified. -*/ - -MetaDataBase::MetaDataBase() -{ -} - -inline void setupDataBase() -{ - if ( !db || !cWidgets ) { - db = new TQPtrDict( 1481 ); - db->setAutoDelete( TRUE ); - cWidgets = new TQPtrList; - cWidgets->setAutoDelete( TRUE ); - } -} - -void MetaDataBase::clearDataBase() -{ - delete db; - db = 0; - delete cWidgets; - cWidgets = 0; -} - -void MetaDataBase::addEntry( TQObject *o ) -{ - if ( !o ) - return; - setupDataBase(); - if ( db->find( o ) ) - return; - MetaDataBaseRecord *r = new MetaDataBaseRecord; - r->object = o; - r->spacing = r->margin = -1; - db->insert( (void*)o, r ); - - WidgetFactory::initChangedProperties( o ); -} - -void MetaDataBase::removeEntry( TQObject *o ) -{ - setupDataBase(); - db->remove( o ); -} - -void MetaDataBase::setPropertyChanged( TQObject *o, const TQString &property, bool changed ) -{ - setupDataBase(); - if ( o->isA( "PropertyObject" ) ) { - ( (PropertyObject*)o )->mdPropertyChanged( property, changed ); - return; - } - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - if ( changed ) { - if ( r->changedProperties.findIndex( property ) == -1 ) - r->changedProperties.append( property ); - } else { - if ( r->changedProperties.findIndex( property ) != -1 ) - r->changedProperties.remove( property ); - } - - if ( doUpdate && - ( property == "hAlign" || property == "vAlign" || property == "wordwrap" ) ) { - doUpdate = FALSE; - setPropertyChanged( o, "alignment", changed || - isPropertyChanged( o, "hAlign" ) || - isPropertyChanged( o, "vAlign" ) || - isPropertyChanged( o, "wordwrap" ) ); - doUpdate = TRUE; - } - - if ( doUpdate && property == "alignment" ) { - doUpdate = FALSE; - setPropertyChanged( o, "hAlign", changed ); - setPropertyChanged( o, "vAlign", changed ); - setPropertyChanged( o, "wordwrap", changed ); - doUpdate = TRUE; - } -} - -bool MetaDataBase::isPropertyChanged( TQObject *o, const TQString &property ) -{ - setupDataBase(); - if ( o->isA( "PropertyObject" ) ) - return ( (PropertyObject*)o )->mdIsPropertyChanged( property ); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return FALSE; - } - - return r->changedProperties.findIndex( property ) != -1; -} - -TQStringList MetaDataBase::changedProperties( TQObject *o ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQStringList(); - } - - TQStringList lst( r->changedProperties ); - return lst; -} - -void MetaDataBase::setPropertyComment( TQObject *o, const TQString &property, const TQString &comment ) -{ - setupDataBase(); - if ( o->isA( "PropertyObject" ) ) { - ( (PropertyObject*)o )->mdSetPropertyComment( property, comment ); - return; - } - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->propertyComments.insert( property, comment ); -} - -TQString MetaDataBase::propertyComment( TQObject *o, const TQString &property ) -{ - setupDataBase(); - if ( o->isA( "PropertyObject" ) ) - return ( (PropertyObject*)o )->mdPropertyComment( property ); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQString(); - } - - return *r->propertyComments.find( property ); -} - -void MetaDataBase::setFakeProperty( TQObject *o, const TQString &property, const TQVariant& value ) -{ - setupDataBase(); - if ( o->isA( "PropertyObject" ) ) { - ( (PropertyObject*)o )->mdSetFakeProperty( property, value ); - return; - } - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - r->fakeProperties[property] = value; -} - -TQVariant MetaDataBase::fakeProperty( TQObject * o, const TQString &property) -{ - setupDataBase(); - if ( o->isA( "PropertyObject" ) ) - return ( (PropertyObject*)o )->mdFakeProperty( property ); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQVariant(); - } - TQMap::Iterator it = r->fakeProperties.find( property ); - if ( it != r->fakeProperties.end() ) - return r->fakeProperties[property]; - return WidgetFactory::defaultValue( o, property ); - -} - -TQMap* MetaDataBase::fakeProperties( TQObject* o ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return 0; - } - return &r->fakeProperties; -} - -void MetaDataBase::setSpacing( TQObject *o, int spacing ) -{ - if ( !o ) - return; - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r || !o->isWidgetType() ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->spacing = spacing; - TQLayout * layout = 0; - WidgetFactory::layoutType( (TQWidget*)o, layout ); - if ( layout ) { - int spadef = 6; - if ( MainWindow::self->formWindow() ) - spadef = MainWindow::self->formWindow()->layoutDefaultSpacing(); - if ( spacing == -1 ) - layout->setSpacing( spadef ); - else - layout->setSpacing( spacing ); - } -} - -int MetaDataBase::spacing( TQObject *o ) -{ - if ( !o ) - return -1; - setupDataBase(); - if ( ::tqqt_cast(o) ) - o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r || !o->isWidgetType() ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return -1; - } - - return r->spacing; -} - -void MetaDataBase::setMargin( TQObject *o, int margin ) -{ - if ( !o ) - return; - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r || !o->isWidgetType() ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->margin = margin; - TQLayout * layout = 0; - WidgetFactory::layoutType( (TQWidget*)o, layout ); - - bool isInnerLayout = TRUE; - - TQWidget *widget = (TQWidget*)o; - if ( widget && !::tqqt_cast(widget) && - ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ) ) || - widget && widget->parentWidget() && ::tqqt_cast(widget->parentWidget()) ) ) - isInnerLayout = FALSE; - - - if ( layout ) { - int mardef = 11; - if ( MainWindow::self->formWindow() ) - mardef = MainWindow::self->formWindow()->layoutDefaultMargin(); - if ( margin == -1 ) { - if ( isInnerLayout ) - layout->setMargin( 1 ); - else - layout->setMargin( TQMAX( 1, mardef ) ); - } - else - layout->setMargin( TQMAX( 1, margin ) ); - } -} - -int MetaDataBase::margin( TQObject *o ) -{ - if ( !o ) - return -1; - setupDataBase(); - if ( ::tqqt_cast(o) ) - o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r || !o->isWidgetType() ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return -1; - } - return r->margin; -} - -void MetaDataBase::setResizeMode( TQObject *o, const TQString &mode ) -{ - if ( !o ) - return; - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r || !o->isWidgetType() ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->resizeMode = mode; -} - -TQString MetaDataBase::resizeMode( TQObject *o ) -{ - if ( !o ) - return TQString(); - setupDataBase(); - if ( ::tqqt_cast(o) ) - o = TQT_TQOBJECT(( (TQMainWindow*)o )->centralWidget()); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r || !o->isWidgetType() ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQString(); - } - return r->resizeMode; -} - -void MetaDataBase::addConnection( TQObject *o, TQObject *sender, const TQCString &signal, - TQObject *receiver, const TQCString &slot, bool addCode ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - if ( !(sender && receiver) ) - return; - Connection conn; - conn.sender = sender; - conn.signal = signal; - conn.receiver = receiver; - conn.slot = slot; - r->connections.append( conn ); - if ( addCode ) { - TQString rec = receiver->name(); - if ( ::tqqt_cast(o) && TQT_BASE_OBJECT(receiver) ==( (FormWindow*)o )->mainContainer() ) - rec = "this"; - TQString sen = sender->name(); - if ( ::tqqt_cast(o) && TQT_BASE_OBJECT(sender) ==( (FormWindow*)o )->mainContainer() ) - sen = "this"; - FormFile *ff = 0; - if ( ::tqqt_cast(o) ) - ff = (FormFile*)o; - else if ( ::tqqt_cast(o) ) - ff = ( (FormWindow*)o )->formFile(); - ff->addConnection( sen, signal, rec, slot ); - } -} - -void MetaDataBase::removeConnection( TQObject *o, TQObject *sender, const TQCString &signal, - TQObject *receiver, const TQCString &slot ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - if ( !(sender && receiver) ) - return; - for ( TQValueList::Iterator it = r->connections.begin(); it != r->connections.end(); ++it ) { - Connection conn = *it; - if ( TQT_BASE_OBJECT(conn.sender) ==sender && - conn.signal == signal && - TQT_BASE_OBJECT(conn.receiver) ==receiver && - conn.slot == slot ) { - r->connections.remove( it ); - break; - } - } - if ( ::tqqt_cast(o) ) { - TQString rec = receiver->name(); - if ( TQT_BASE_OBJECT(receiver) ==( (FormWindow*)o )->mainContainer() ) - rec = "this"; - ( (FormWindow*)o )->formFile()->removeConnection( sender->name(), signal, rec, slot ); - } -} - -void MetaDataBase::setupConnections( TQObject *o, const TQValueList &conns ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - if ( !::tqqt_cast(o) ) - return; - - FormFile *formfile = (FormFile*)o; - - r->connections.clear(); - - for ( TQValueList::ConstIterator cit = conns.begin(); - cit != conns.end(); ++cit ) { - // #### get the correct sender object out of Bla.Blub.sender - TQString senderName = (*cit).sender; - if ( senderName.find( '.' ) != -1 ) - senderName = senderName.mid( senderName.findRev( '.' ) + 1 ); - TQObject *sender = 0; - if ( formfile->formWindow() ) - sender = formfile->formWindow()->child( senderName ); - if ( !sender && formfile->isFake() ) - sender = formfile->project()->objectForFakeFormFile( formfile ); - if ( !sender && senderName == "this" ) - sender = formfile->formWindow() ? - TQT_TQOBJECT(formfile->formWindow()->mainContainer()) : - TQT_TQOBJECT(formfile->project()->objectForFakeFormFile( formfile )); - if ( !sender ) - continue; - MetaDataBase::addConnection( formfile->formWindow() ? - (TQObject*)formfile->formWindow() : - (TQObject*)formfile, - sender, - (*cit).signal.latin1(), - formfile->formWindow() ? - TQT_TQOBJECT(formfile->formWindow()->mainContainer()) : - TQT_TQOBJECT(formfile->project()->objectForFakeFormFile( formfile )), - (*cit).slot.latin1(), - FALSE ); - } -} - -bool MetaDataBase::hasConnection( TQObject *o, TQObject *sender, const TQCString &signal, - TQObject *receiver, const TQCString &slot ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return FALSE; - } - - for ( TQValueList::Iterator it = r->connections.begin(); it != r->connections.end(); ++it ) { - Connection conn = *it; - if ( TQT_BASE_OBJECT(conn.sender) ==sender && - conn.signal == signal && - TQT_BASE_OBJECT(conn.receiver) ==receiver && - conn.slot == slot ) - return TRUE; - } - return FALSE; -} - - -TQValueList MetaDataBase::connections( TQObject *o ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQValueList(); - } - return r->connections; -} - -TQValueList MetaDataBase::connections( TQObject *o, TQObject *sender, - TQObject *receiver ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQValueList(); - } - TQValueList::Iterator it = r->connections.begin(); - TQValueList ret; - TQValueList::Iterator conn; - while ( ( conn = it ) != r->connections.end() ) { - ++it; - if ( TQT_BASE_OBJECT((*conn).sender) ==sender && - TQT_BASE_OBJECT((*conn).receiver) ==receiver ) - ret << *conn; - } - - return ret; -} - -TQValueList MetaDataBase::connections( TQObject *o, TQObject *object ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQValueList(); - } - TQValueList::Iterator it = r->connections.begin(); - TQValueList ret; - TQValueList::Iterator conn; - while ( ( conn = it ) != r->connections.end() ) { - ++it; - if ( TQT_BASE_OBJECT((*conn).sender) ==object || - TQT_BASE_OBJECT((*conn).receiver) ==object ) - ret << *conn; - } - return ret; -} - -void MetaDataBase::doConnections( TQObject *o ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - TQObject *sender = 0, *receiver = 0; - TQObjectList *l = 0; - TQValueList::Iterator it = r->connections.begin(); - for ( ; it != r->connections.end(); ++it ) { - Connection conn = *it; - if ( qstrcmp( conn.sender->name(), o->name() ) == 0 ) { - sender = o; - } else { - l = o->queryList( 0, conn.sender->name(), FALSE ); - if ( !l || !l->first() ) { - delete l; - continue; - } - sender = l->first(); - delete l; - } - if ( qstrcmp( conn.receiver->name(), o->name() ) == 0 ) { - receiver = o; - } else { - l = o->queryList( 0, conn.receiver->name(), FALSE ); - if ( !l || !l->first() ) { - delete l; - continue; - } - receiver = l->first(); - delete l; - } - TQString s = "2""%1"; - s = s.arg( conn.signal.data() ); - TQString s2 = "1""%1"; - s2 = s2.arg( conn.slot.data() ); - - TQStrList signalList = sender->metaObject()->signalNames( TRUE ); - TQStrList slotList = receiver->metaObject()->slotNames( TRUE ); - - // avoid warnings - if ( signalList.find( conn.signal ) == -1 || - slotList.find( conn.slot ) == -1 ) - continue; - - TQObject::connect( sender, s, receiver, s2 ); - } -} - -bool MetaDataBase::hasSlot( TQObject *o, const TQCString &slot, bool onlyCustom ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return FALSE; - } - - if ( !onlyCustom ) { - TQStrList slotList = o->metaObject()->slotNames( TRUE ); - if ( slotList.find( slot ) != -1 ) - return TRUE; - - if ( ::tqqt_cast(o) ) { - o = TQT_TQOBJECT(( (FormWindow*)o )->mainContainer()); - slotList = o->metaObject()->slotNames( TRUE ); - if ( slotList.find( slot ) != -1 ) - return TRUE; - } - - //if ( ::tqqt_cast(o) ) { - if ( o->inherits( "CustomWidget" ) ) { - MetaDataBase::CustomWidget *w = ( (::CustomWidget*)o )->customWidget(); - for ( TQValueList::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) { - TQCString s = (*it).function; - if ( !s.data() ) - continue; - if ( s == slot ) - return TRUE; - } - } - } - - for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { - Function f = *it; - if ( normalizeFunction( f.function ) == normalizeFunction( slot ) && f.type == "slot" ) - return TRUE; - } - - return FALSE; -} - -bool MetaDataBase::isSlotUsed( TQObject *o, const TQCString &slot ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return FALSE; - } - - TQValueList conns = connections( o ); - for ( TQValueList::Iterator it = conns.begin(); it != conns.end(); ++it ) { - if ( (*it).slot == slot ) - return TRUE; - } - return FALSE; -} - - -void MetaDataBase::addFunction( TQObject *o, const TQCString &function, const TQString &specifier, - const TQString &access, const TQString &type, const TQString &language, - const TQString &returnType ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - Function f; - f.function = function; - f.specifier = specifier; - f.access = access; - f.type = type; - f.language = language; - f.returnType = returnType; - TQValueList::Iterator it = r->functionList.find( f ); - if ( it != r->functionList.end() ) - r->functionList.remove( it ); - r->functionList.append( f ); - ( (FormWindow*)o )->formFile()->addFunctionCode( f ); -} - -void MetaDataBase::setFunctionList( TQObject *o, const TQValueList &functionList ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - r->functionList = functionList; -} - -void MetaDataBase::removeFunction( TQObject *o, const TQCString &function, const TQString &specifier, - const TQString &access, const TQString &type, const TQString &language, - const TQString &returnType ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { - if ( MetaDataBase::normalizeFunction( (*it).function ) == - MetaDataBase::normalizeFunction( function ) && - (*it).specifier == specifier && - (*it).access == access && - (*it).type == type && - ( language.isEmpty() || (*it).language == language ) && - ( returnType.isEmpty() || (*it).returnType == returnType ) ) { - ( (FormWindow*)o )->formFile()->removeFunctionCode( *it ); - r->functionList.remove( it ); - break; - } - } -} - -void MetaDataBase::removeFunction( TQObject *o, const TQString &function ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { - if ( normalizeFunction( (*it).function ) == normalizeFunction( function ) ) { - ( (FormWindow*)o )->formFile()->removeFunctionCode( *it ); - r->functionList.remove( it ); - break; - } - } -} - -TQValueList MetaDataBase::functionList( TQObject *o, bool onlyFunctions ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQValueList(); - } - if ( !onlyFunctions ) - return r->functionList; - TQValueList fList; - for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { - if ( (*it).type == "function" ) - fList.append( *it ); - } - return fList; -} - -TQValueList MetaDataBase::slotList( TQObject *o ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQValueList(); - } - TQValueList slotList; - for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { - if ( (*it).type == "slot" ) - slotList.append( *it ); - } - return slotList; -} - -void MetaDataBase::changeFunction( TQObject *o, const TQString &function, const TQString &newName, - const TQString &returnType ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { - Function f = *it; - if ( normalizeFunction( f.function ) == normalizeFunction( function ) ) { - (*it).function = newName; - if ( !returnType.isNull() ) - (*it).returnType = returnType; - return; - } - } -} - -void MetaDataBase::changeFunctionAttributes( TQObject *o, const TQString &oldName, const TQString &newName, - const TQString &specifier, const TQString &access, - const TQString &type, const TQString &language, - const TQString &returnType ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { - Function f = *it; - if ( normalizeFunction( f.function ) == normalizeFunction( oldName ) ) { - (*it).function = newName; - (*it).specifier = specifier; - (*it).access = access; - (*it).type = type; - (*it).language = language; - (*it).returnType = returnType; - return; - } - } -} - -bool MetaDataBase::hasFunction( TQObject *o, const TQCString &function, bool onlyCustom ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return FALSE; - } - - if ( !onlyCustom ) { - TQStrList functionList = o->metaObject()->slotNames( TRUE ); - if ( functionList.find( function ) != -1 ) - return TRUE; - - if ( ::tqqt_cast(o) ) { - o = TQT_TQOBJECT(( (FormWindow*)o )->mainContainer()); - functionList = o->metaObject()->slotNames( TRUE ); - if ( functionList.find( function ) != -1 ) - return TRUE; - } - - //if ( ::tqqt_cast(o) ) { - if ( o->inherits( "CustomWidget" ) ) { - MetaDataBase::CustomWidget *w = ( (::CustomWidget*)o )->customWidget(); - for ( TQValueList::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) { - TQCString s = (*it).function; - if ( !s.data() ) - continue; - if ( s == function ) - return TRUE; - } - } - } - - for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { - Function f = *it; - if ( normalizeFunction( f.function ) == normalizeFunction( function ) ) - return TRUE; - } - - return FALSE; -} - -TQString MetaDataBase::languageOfFunction( TQObject *o, const TQCString &function ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQString(); - } - - TQString fu = normalizeFunction( function ); - for ( TQValueList::Iterator it = r->functionList.begin(); it != r->functionList.end(); ++it ) { - if ( fu == normalizeFunction( (*it).function ) ) - return (*it).language; - } - return TQString(); -} - -bool MetaDataBase::addCustomWidget( CustomWidget *wid ) -{ - setupDataBase(); - - for ( CustomWidget *w = cWidgets->first(); w; w = cWidgets->next() ) { - if ( *wid == *w ) { - for ( TQValueList::ConstIterator it = wid->lstSignals.begin(); it != wid->lstSignals.end(); ++it ) { - if ( !w->hasSignal( *it ) ) - w->lstSignals.append( *it ); - } - for ( TQValueList::ConstIterator it2 = wid->lstSlots.begin(); it2 != wid->lstSlots.end(); ++it2 ) { - if ( !w->hasSlot( MetaDataBase::normalizeFunction( (*it2).function ).latin1() ) ) - w->lstSlots.append( *it2 ); - } - for ( TQValueList::ConstIterator it3 = wid->lstProperties.begin(); it3 != wid->lstProperties.end(); ++it3 ) { - if ( !w->hasProperty( (*it3).property ) ) - w->lstProperties.append( *it3 ); - } - delete wid; - return FALSE; - } - } - - - WidgetDatabaseRecord *r = new WidgetDatabaseRecord; - r->name = wid->className; - r->group = WidgetDatabase::widgetGroup( "Custom" ); - r->toolTip = wid->className; - r->icon = new TQIconSet( *wid->pixmap, *wid->pixmap ); - r->isContainer = wid->isContainer; - wid->id = WidgetDatabase::addCustomWidget( r ); - cWidgets->append( wid ); - return TRUE; -} - -void MetaDataBase::removeCustomWidget( CustomWidget *w ) -{ - cWidgets->removeRef( w ); -} - -TQPtrList *MetaDataBase::customWidgets() -{ - setupDataBase(); - return cWidgets; -} - -MetaDataBase::CustomWidget *MetaDataBase::customWidget( int id ) -{ - for ( CustomWidget *w = cWidgets->first(); w; w = cWidgets->next() ) { - if ( id == w->id ) - return w; - } - return 0; -} - -bool MetaDataBase::isWidgetNameUsed( CustomWidget *wid ) -{ - for ( CustomWidget *w = cWidgets->first(); w; w = cWidgets->next() ) { - if ( w == wid ) - continue; - if ( wid->className == w->className ) - return TRUE; - } - return FALSE; -} - -bool MetaDataBase::hasCustomWidget( const TQString &className ) -{ - for ( CustomWidget *w = cWidgets->first(); w; w = cWidgets->next() ) { - if ( w->className == className ) - return TRUE; - } - return FALSE; -} - -void MetaDataBase::setTabOrder( TQWidget *w, const TQWidgetList &order ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*) w ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - w, w->name(), w->className() ); - return; - } - - r->tabOrder = order; -} - -TQWidgetList MetaDataBase::tabOrder( TQWidget *w ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*) w ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - w, w->name(), w->className() ); - return TQWidgetList(); - } - - return r->tabOrder; -} - -void MetaDataBase::setIncludes( TQObject *o, const TQValueList &incs ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->includes = incs; -} - -TQValueList MetaDataBase::includes( TQObject *o ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQValueList(); - } - - return r->includes; -} - -void MetaDataBase::setForwards( TQObject *o, const TQStringList &fwds ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->forwards = fwds; -} - -TQStringList MetaDataBase::forwards( TQObject *o ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQStringList(); - } - - return r->forwards; -} - -void MetaDataBase::setVariables( TQObject *o, const TQValueList &vars ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->variables = vars; -} - -void MetaDataBase::addVariable( TQObject *o, const TQString &name, const TQString &access ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - Variable v; - v.varName = name; - v.varAccess = access; - r->variables << v; -} - -void MetaDataBase::removeVariable( TQObject *o, const TQString &name ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - TQValueList::Iterator it = r->variables.begin(); - for ( ; it != r->variables.end(); ++it ) { - if ( (*it).varName == name ) { - r->variables.remove( it ); - break; - } - } -} - -TQValueList MetaDataBase::variables( TQObject *o ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQValueList(); - } - - return r->variables; -} - -bool MetaDataBase::hasVariable( TQObject *o, const TQString &name ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return FALSE; - } - - TQValueList::Iterator it = r->variables.begin(); - for ( ; it != r->variables.end(); ++it ) { - if ( extractVariableName( name ) == extractVariableName( (*it).varName ) ) - return TRUE; - } - return FALSE; -} - -TQString MetaDataBase::extractVariableName( const TQString &name ) -{ - TQString n = name.right( name.length() - name.findRev( ' ' ) - 1 ); - if ( n[ 0 ] == '*' || n[ 0 ] == '&' ) - n[ 0 ] = ' '; - if ( n[ (int)n.length() - 1 ] == ';' ) - n[ (int)n.length() - 1 ] = ' '; - return n.simplifyWhiteSpace(); -} - -void MetaDataBase::setSignalList( TQObject *o, const TQStringList &sigs ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->sigs.clear(); - - for ( TQStringList::ConstIterator it = sigs.begin(); it != sigs.end(); ++it ) { - TQString s = (*it).simplifyWhiteSpace(); - bool hasSemicolon = s.endsWith( ";" ); - if ( hasSemicolon ) - s = s.left( s.length() - 1 ); - int p = s.find( '(' ); - if ( p < 0 ) - p = s.length(); - int sp = s.find( ' ' ); - if ( sp >= 0 && sp < p ) { - s = s.mid( sp+1 ); - p -= sp + 1; - } - if ( p == (int) s.length() ) - s += "()"; - if ( hasSemicolon ) - s += ";"; - r->sigs << s; - } -} - -TQStringList MetaDataBase::signalList( TQObject *o ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQStringList(); - } - - return r->sigs; -} - -void MetaDataBase::setMetaInfo( TQObject *o, MetaInfo mi ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->metaInfo = mi; -} - -MetaDataBase::MetaInfo MetaDataBase::metaInfo( TQObject *o ) -{ - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return MetaInfo(); - } - - return r->metaInfo; -} - - - - -MetaDataBase::CustomWidget::CustomWidget() -{ - className = "MyCustomWidget"; - includeFile = "mywidget.h"; - includePolicy = Local; - sizeHint = TQSize( -1, -1 ); - pixmap = new TQPixmap( BarIcon( "designer_customwidget.png", TDevDesignerPartFactory::instance() ) ); - id = -1; - sizePolicy = TQSizePolicy( TQSizePolicy::Preferred, TQSizePolicy::Preferred ); - isContainer = FALSE; -} - -MetaDataBase::CustomWidget::CustomWidget( const CustomWidget &w ) -{ - className = w.className; - includeFile = w.includeFile; - includePolicy = w.includePolicy; - sizeHint = w.sizeHint; - if ( w.pixmap ) - pixmap = new TQPixmap( *w.pixmap ); - else - pixmap = 0; - id = w.id; - isContainer = w.isContainer; -} - -void MetaDataBase::setCursor( TQWidget *w, const TQCursor &c ) -{ - setupDataBase(); - if ( w->isA( "PropertyObject" ) ) { - ( (PropertyObject*)w )->mdSetCursor( c ); - return; - } - MetaDataBaseRecord *r = db->find( (void*)w ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - w, w->name(), w->className() ); - return; - } - - r->cursor = c; -} - -TQCursor MetaDataBase::cursor( TQWidget *w ) -{ - setupDataBase(); - if ( w->isA( "PropertyObject" ) ) - return ( (PropertyObject*)w )->mdCursor(); - MetaDataBaseRecord *r = db->find( (void*)w ); - if ( !r ) { - w->unsetCursor(); - return w->cursor(); - } - - return r->cursor; -} - -bool MetaDataBase::CustomWidget::operator==( const CustomWidget &w ) const -{ - return className == w.className; -} - -MetaDataBase::CustomWidget &MetaDataBase::CustomWidget::operator=( const CustomWidget &w ) -{ - delete pixmap; - className = w.className; - includeFile = w.includeFile; - includePolicy = w.includePolicy; - sizeHint = w.sizeHint; - if ( w.pixmap ) - pixmap = new TQPixmap( *w.pixmap ); - else - pixmap = 0; - lstSignals = w.lstSignals; - lstSlots = w.lstSlots; - lstProperties = w.lstProperties; - id = w.id; - isContainer = w.isContainer; - return *this; -} - -bool MetaDataBase::CustomWidget::hasSignal( const TQCString &signal ) const -{ - TQStrList sigList = TQWidget::staticMetaObject()->signalNames( TRUE ); - if ( sigList.find( signal ) != -1 ) - return TRUE; - for ( TQValueList::ConstIterator it = lstSignals.begin(); it != lstSignals.end(); ++it ) { - if ( normalizeFunction( *it ) == normalizeFunction( signal ) ) - return TRUE; - } - return FALSE; -} - -bool MetaDataBase::CustomWidget::hasSlot( const TQCString &slot ) const -{ - TQStrList slotList = TQWidget::staticMetaObject()->slotNames( TRUE ); - if ( slotList.find( normalizeFunction( slot ) ) != -1 ) - return TRUE; - - for ( TQValueList::ConstIterator it = lstSlots.begin(); it != lstSlots.end(); ++it ) { - if ( normalizeFunction( (*it).function ) == normalizeFunction( slot ) ) - return TRUE; - } - return FALSE; -} - -bool MetaDataBase::CustomWidget::hasProperty( const TQCString &prop ) const -{ - TQStrList propList = TQWidget::staticMetaObject()->propertyNames( TRUE ); - if ( propList.find( prop ) != -1 ) - return TRUE; - - for ( TQValueList::ConstIterator it = lstProperties.begin(); it != lstProperties.end(); ++it ) { - if ( (*it).property == prop ) - return TRUE; - } - return FALSE; -} - -void MetaDataBase::setPixmapArgument( TQObject *o, int pixmap, const TQString &arg ) -{ - if ( !o ) - return; - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->pixmapArguments.remove( pixmap ); - r->pixmapArguments.insert( pixmap, arg ); -} - -TQString MetaDataBase::pixmapArgument( TQObject *o, int pixmap ) -{ - if ( !o ) - return TQString(); - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQString(); - } - - return *r->pixmapArguments.find( pixmap ); -} - -void MetaDataBase::clearPixmapArguments( TQObject *o ) -{ - if ( !o ) - return; - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->pixmapArguments.clear(); -} - - -void MetaDataBase::setPixmapKey( TQObject *o, int pixmap, const TQString &arg ) -{ - if ( !o ) - return; - setupDataBase(); - if ( o->isA( "PropertyObject" ) ) { - ( (PropertyObject*)o )->mdSetPixmapKey( pixmap, arg ); - return; - } - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->pixmapKeys.remove( pixmap ); - r->pixmapKeys.insert( pixmap, arg ); -} - -TQString MetaDataBase::pixmapKey( TQObject *o, int pixmap ) -{ - if ( !o ) - return TQString(); - setupDataBase(); - if ( o->isA( "PropertyObject" ) ) - return ( (PropertyObject*)o )->mdPixmapKey( pixmap ); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQString(); - } - - TQString s = *r->pixmapKeys.find( pixmap ); - if ( !s.isNull() ) - return s; - if ( !o->isWidgetType() ) - return s; - TQWidget *w = (TQWidget*)o; - if ( w->icon() ) - return *r->pixmapKeys.find( w->icon()->serialNumber() ); - return s; -} - -void MetaDataBase::clearPixmapKeys( TQObject *o ) -{ - if ( !o ) - return; - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->pixmapKeys.clear(); -} - - - -void MetaDataBase::setColumnFields( TQObject *o, const TQMap &columnFields ) -{ - if ( !o ) - return; - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->columnFields = columnFields; -} - -TQMap MetaDataBase::columnFields( TQObject *o ) -{ - if ( !o ) - return TQMap(); - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQMap(); - } - - return r->columnFields; -} - -void MetaDataBase::setEditor( const TQStringList &langs ) -{ - editorLangList = langs; -} - -bool MetaDataBase::hasEditor( const TQString &lang ) -{ - return editorLangList.find( lang ) != editorLangList.end(); -} - -void MetaDataBase::setupInterfaceManagers( const TQString &plugDir ) -{ - if ( !languageInterfaceManager ) { - languageInterfaceManager = - new TQPluginManager( IID_Language, - TQApplication::libraryPaths(), -// kapp->dirs()->resourceDirs("qtplugins"), - plugDir ); - - langList = languageInterfaceManager->featureList(); - langList.remove( "C++" ); - langList << "C++"; - } -} - -TQStringList MetaDataBase::languages() -{ - return langList; -} - -TQString MetaDataBase::normalizeFunction( const TQString &f ) -{ - return Parser::cleanArgs( f ); -} - -LanguageInterface *MetaDataBase::languageInterface( const TQString &lang ) -{ - LanguageInterface* iface = 0; - languageInterfaceManager->queryInterface( lang, &iface ); - return iface; -} - -void MetaDataBase::clear( TQObject *o ) -{ - if ( !o ) - return; - setupDataBase(); - db->remove( (void*)o ); - for ( TQPtrDictIterator it( *( (FormWindow*)o )->widgets() ); it.current(); ++it ) - db->remove( (void*)it.current() ); -} - -void MetaDataBase::setBreakPoints( TQObject *o, const TQValueList &l ) -{ - if ( !o ) - return; - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->breakPoints = l; - - TQMap::Iterator it = r->breakPointConditions.begin(); - while ( it != r->breakPointConditions.end() ) { - int line = it.key(); - ++it; - if ( r->breakPoints.find( line ) == r->breakPoints.end() ) - r->breakPointConditions.remove( r->breakPointConditions.find( line ) ); - } -} - -TQValueList MetaDataBase::breakPoints( TQObject *o ) -{ - if ( !o ) - return TQValueList(); - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQValueList(); - } - - return r->breakPoints; -} - -void MetaDataBase::setBreakPointCondition( TQObject *o, int line, const TQString &condition ) -{ - if ( !o ) - return; - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - r->breakPointConditions.replace( line, condition ); -} - -TQString MetaDataBase::breakPointCondition( TQObject *o, int line ) -{ - if ( !o ) - return TQString(); - setupDataBase(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return TQString(); - } - TQMap::Iterator it = r->breakPointConditions.find( line ); - if ( it == r->breakPointConditions.end() ) - return TQString(); - return *it; -} - -void MetaDataBase::setExportMacro( TQObject *o, const TQString ¯o ) -{ - if ( !o ) - return; - setupDataBase(); - if ( o->isA( "PropertyObject" ) ) { - ( (PropertyObject*)o )->mdSetExportMacro( macro ); - return; - } - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return; - } - - r->exportMacro = macro; -} - -TQString MetaDataBase::exportMacro( TQObject *o ) -{ - if ( !o ) - return ""; - setupDataBase(); - if ( o->isA( "PropertyObject" ) ) - return ( (PropertyObject*)o )->mdExportMacro(); - MetaDataBaseRecord *r = db->find( (void*)o ); - if ( !r ) { - tqWarning( "No entry for %p (%s, %s) found in MetaDataBase", - o, o->name(), o->className() ); - return ""; - } - - return r->exportMacro; -} - -bool MetaDataBase::hasObject( TQObject *o ) -{ - return !!db->find( o ); -} diff --git a/tdevdesigner/designer/multilineeditorimpl.cpp b/tdevdesigner/designer/multilineeditorimpl.cpp deleted file mode 100644 index a3f6093e..00000000 --- a/tdevdesigner/designer/multilineeditorimpl.cpp +++ /dev/null @@ -1,415 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "multilineeditorimpl.h" -#include "formwindow.h" -#include "command.h" -#include "mainwindow.h" -#include "richtextfontdialog.h" -#include "syntaxhighlighter_html.h" -#include "widgetfactory.h" - -#include -#include "tdevdesigner_part.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -ToolBarItem::ToolBarItem( TQWidget *parent, TQWidget *toolBar, - const TQString &label, const TQString &tagstr, - const TQIconSet &icon, const TQKeySequence &key ) - : TQAction( parent ) -{ - setIconSet( icon ); - setText( label ); - setAccel( key ); - addTo( toolBar ); - tag = tagstr; - connect( this, TQT_SIGNAL( activated() ), this, TQT_SLOT( wasActivated() ) ); -} - -ToolBarItem::~ToolBarItem() -{ - -} - -void ToolBarItem::wasActivated() -{ - emit clicked( tag ); -} - -TextEdit::TextEdit( TQWidget *parent, const char *name ) - : TQTextEdit( parent, name ) -{ - setTextFormat( TQt::PlainText ); -} - -TQTextParagraph* TextEdit::paragraph() -{ - TQTextCursor *tc = new TQTextCursor( TQTextEdit::document() ); - return tc->paragraph(); -} - - -MultiLineEditor::MultiLineEditor( bool call_static, bool richtextMode, TQWidget *parent, TQWidget *editWidget, - FormWindow *fw, const TQString &text ) - : MultiLineEditorBase( parent, 0, WType_Dialog | WShowModal ), formwindow( fw ), doWrap( FALSE ) -{ - callStatic = call_static; - - if ( callStatic ) - applyButton->hide(); - - textEdit = new TextEdit( centralWidget(), "textedit" ); - Layout4->insertWidget( 0, textEdit ); - - if ( richtextMode ) { - TQPopupMenu *stylesMenu = new TQPopupMenu( this ); - menuBar->insertItem( i18n( "&Styles" ), stylesMenu ); - - basicToolBar = new TQToolBar( i18n( "Basics" ), this, DockTop ); - - ToolBarItem *it = new ToolBarItem( this, basicToolBar, i18n( "Italic" ), - "i", BarIcon( "designer_textitalic.png", TDevDesignerPartFactory::instance() ), CTRL+Key_I ); - it->addTo( stylesMenu ); - connect( it, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); - - ToolBarItem *b = new ToolBarItem( this, basicToolBar, i18n( "Bold" ), - "b", BarIcon( "designer_textbold.png", TDevDesignerPartFactory::instance() ), CTRL+Key_B ); - b->addTo( stylesMenu ); - connect( b, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); - - ToolBarItem *ul = new ToolBarItem( this, basicToolBar, i18n( "Underline" ), - "u", BarIcon( "designer_textunderline.png" , TDevDesignerPartFactory::instance()), CTRL+Key_U ); - ul->addTo( stylesMenu ); - connect( ul, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); - - ToolBarItem *tt = new ToolBarItem( this, basicToolBar, i18n( "Typewriter" ), - "tt", BarIcon( "designer_textteletext.png", TDevDesignerPartFactory::instance() ) ); - tt->addTo( stylesMenu ); - connect( tt, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); - - basicToolBar->addSeparator(); - - TQPopupMenu *layoutMenu = new TQPopupMenu( this ); - menuBar->insertItem( i18n( "&Layout" ), layoutMenu ); - - TQAction *brAction = new TQAction( this ); - brAction->setIconSet( BarIcon( "designer_textlinebreak.png", TDevDesignerPartFactory::instance() ) ); - brAction->setText( i18n("Break" ) ); - brAction->addTo( basicToolBar ); - brAction->addTo( layoutMenu ); - connect( brAction, TQT_SIGNAL( activated() ) , this, TQT_SLOT( insertBR() ) ); - - ToolBarItem *p = new ToolBarItem( this, basicToolBar, i18n( "Paragraph" ), - "p", BarIcon( "designer_textparagraph.png", TDevDesignerPartFactory::instance() ) ); - p->addTo( layoutMenu ); - connect( p, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); - layoutMenu->insertSeparator(); - basicToolBar->addSeparator(); - - ToolBarItem *al = new ToolBarItem( this, basicToolBar, i18n( "Align left" ), - "p align=\"left\"", BarIcon( "designer_textleft.png", TDevDesignerPartFactory::instance() ) ); - al->addTo( layoutMenu ); - connect( al, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); - - ToolBarItem *ac = new ToolBarItem( this, basicToolBar, i18n( "Align center" ), - "p align=\"center\"", BarIcon( "designer_textcenter.png", TDevDesignerPartFactory::instance() ) ); - ac->addTo( layoutMenu ); - connect( ac, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); - - ToolBarItem *ar = new ToolBarItem( this, basicToolBar, i18n( "Align right" ), - "p align=\"right\"", BarIcon( "designer_textright.png", TDevDesignerPartFactory::instance() ) ); - ar->addTo( layoutMenu ); - connect( ar, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); - - ToolBarItem *block = new ToolBarItem( this, basicToolBar, i18n( "Blockquote" ), - "blockquote", BarIcon( "designer_textjustify.png", TDevDesignerPartFactory::instance() ) ); - block->addTo( layoutMenu ); - connect( block, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); - - - TQPopupMenu *fontMenu = new TQPopupMenu( this ); - menuBar->insertItem( i18n( "&Font" ), fontMenu ); - - fontToolBar = new TQToolBar( "Fonts", this, DockTop ); - - TQAction *fontAction = new TQAction( this ); - fontAction->setIconSet( BarIcon( "designer_textfont.png", TDevDesignerPartFactory::instance() ) ); - fontAction->setText( i18n("Font" ) ); - fontAction->addTo( fontToolBar ); - fontAction->addTo( fontMenu ); - connect( fontAction, TQT_SIGNAL( activated() ) , this, TQT_SLOT( showFontDialog() ) ); - - - ToolBarItem *fp1 = new ToolBarItem( this, fontToolBar, i18n( "Fontsize +1" ), - "font size=\"+1\"", BarIcon( "designer_textlarger.png", TDevDesignerPartFactory::instance() ) ); - connect( fp1, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); - - ToolBarItem *fm1 = new ToolBarItem( this, fontToolBar, i18n( "Fontsize -1" ), - "font size=\"-1\"", BarIcon( "designer_textsmaller.png", TDevDesignerPartFactory::instance() ) ); - connect( fm1, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); - - ToolBarItem *h1 = new ToolBarItem( this, fontToolBar, i18n( "Headline 1" ), - "h1", BarIcon( "designer_texth1.png", TDevDesignerPartFactory::instance() ) ); - connect( h1, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); - - ToolBarItem *h2 = new ToolBarItem( this, fontToolBar, i18n( "Headline 2" ), - "h2", BarIcon( "designer_texth2.png", TDevDesignerPartFactory::instance() ) ); - connect( h2, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); - - ToolBarItem *h3 = new ToolBarItem( this, fontToolBar, i18n( "Headline 3" ), - "h3", BarIcon( "designer_texth3.png", TDevDesignerPartFactory::instance() ) ); - connect( h3, TQT_SIGNAL( clicked( const TQString& ) ), - this, TQT_SLOT( insertTags( const TQString& ))); - - TQPopupMenu *optionsMenu = new TQPopupMenu( this ); - menuBar->insertItem( i18n( "O&ptions" ), optionsMenu ); - - optionsToolBar = new TQToolBar( "Options", this, DockTop ); - wrapAction = new TQAction( this ); - wrapAction->setToggleAction( TRUE ); - wrapAction->setIconSet( BarIcon( "designer_wordwrap.png", TDevDesignerPartFactory::instance() ) ); - wrapAction->setText( i18n( "Word Wrapping" ) ); - wrapAction->addTo( optionsToolBar ); - wrapAction->addTo( optionsMenu ); - connect( wrapAction, TQT_SIGNAL( toggled( bool ) ), this, TQT_SLOT( changeWrapMode( bool ) ) ); - - oldDoWrap = doWrap; - wrapAction->setOn( doWrap ); - - connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); - textEdit->document()->setFormatter( new TQTextFormatterBreakInWords ); - textEdit->document()->setUseFormatCollection( FALSE ); - textEdit->document()->setPreProcessor( new SyntaxHighlighter_HTML ); - - if ( !callStatic && ::tqqt_cast(editWidget) ) { - mlined = (TQTextEdit*)editWidget; - mlined->setReadOnly( TRUE ); - - const TQMetaProperty *wordWrap = mlined->metaObject()->property( - mlined->metaObject()->findProperty( "wordWrap", TRUE ), TRUE ); - oldWrapMode = 0; - oldWrapString = "NoWrap"; - if ( wordWrap ) { - oldWrapMode = mlined->property( "wordWrap" ); - oldWrapString = TQString( wordWrap->valueToKey( oldWrapMode.toInt() ) ); - if ( oldWrapString != "NoWrap" ) - doWrap = TRUE; - } - textEdit->setAlignment( mlined->alignment() ); - textEdit->setWordWrap( mlined->wordWrap() ); - textEdit->setWrapColumnOrWidth( mlined->wrapColumnOrWidth() ); - textEdit->setWrapPolicy( mlined->wrapPolicy() ); - textEdit->setText( mlined->text() ); - if ( !mlined->text().isEmpty() ) - textEdit->selectAll(); - } else { - textEdit->setText( text ); - textEdit->selectAll(); - } - } else { - textEdit->setText( text ); - textEdit->selectAll(); - } - textEdit->setFocus(); -} - -int MultiLineEditor::exec() -{ - res = 1; - show(); - tqApp->enter_loop(); - return res; -} - -void MultiLineEditor::okClicked() -{ - applyClicked(); - close(); -} - -void MultiLineEditor::applyClicked() -{ - if ( !callStatic ) { - PopulateMultiLineEditCommand *cmd = new PopulateMultiLineEditCommand( i18n( "Set the Text of '%1'" ).arg( mlined->name() ), - formwindow, mlined, textEdit->text() ); - cmd->execute(); - formwindow->commandHistory()->addCommand( cmd ); - - if ( oldDoWrap != doWrap ) { - TQString pn( i18n( "Set 'wordWrap' of '%2'" ).arg( mlined->name() ) ); - SetPropertyCommand *propcmd; - if ( doWrap ) - propcmd = new SetPropertyCommand( pn, formwindow, - TQT_TQOBJECT(mlined), MainWindow::self->propertyeditor(), - "wordWrap", WidgetFactory::property( TQT_TQOBJECT(mlined), "wordWrap" ), - TQVariant( 1 ), "WidgetWidth", oldWrapString ); - else - propcmd = new SetPropertyCommand( pn, formwindow, - TQT_TQOBJECT(mlined), MainWindow::self->propertyeditor(), - "wordWrap", WidgetFactory::property( TQT_TQOBJECT(mlined), "wordWrap" ), - TQVariant( 0 ), "NoWrap", oldWrapString ); - - propcmd->execute(); - formwindow->commandHistory()->addCommand( propcmd, TRUE ); - } - textEdit->setFocus(); - } - else { - staticText = textEdit->text(); - } -} - -void MultiLineEditor::cancelClicked() -{ - res = 0; - close(); -} - -void MultiLineEditor::closeEvent( TQCloseEvent *e ) -{ - tqApp->exit_loop(); - MultiLineEditorBase::closeEvent( e ); -} - -void MultiLineEditor::insertTags( const TQString &tag ) -{ - int pfrom, pto, ifrom, ito; - TQString tagend( tag.simplifyWhiteSpace() ); - tagend.remove( tagend.find( ' ', 0 ), tagend.length() ); - if ( textEdit->hasSelectedText() ) { - textEdit->getSelection( &pfrom, &ifrom, &pto, &ito ); - TQString buf = textEdit->selectedText(); - buf = TQString( "<%1>%3" ).arg( tag ).arg( tagend ).arg( buf ); - textEdit->removeSelectedText(); - textEdit->insertAt( buf, pfrom, ifrom ); - textEdit->setCursorPosition( pto, ito + 2 + tag.length() ); - } - else { - int para, index; - textEdit->getCursorPosition( ¶, &index ); - textEdit->insert( TQString( "<%1>" ).arg( tag ).arg( tagend ) ); - index += 2 + tag.length(); - textEdit->setCursorPosition( para, index ); - } -} - -void MultiLineEditor::insertBR() -{ - textEdit->insert( "
    " ); -} - -void MultiLineEditor::showFontDialog() -{ - bool selText = FALSE; - int pfrom, pto, ifrom, ito; - if ( textEdit->hasSelectedText() ) { - textEdit->getSelection( &pfrom, &ifrom, &pto, &ito ); - selText = TRUE; - } - RichTextFontDialog *fd = new RichTextFontDialog( this ); - if ( fd->exec() == TQDialog::Accepted ) { - TQString size, font; - if ( fd->getSize() != "0" ) - size = "size=\"" + fd->getSize() + "\""; - TQString color; - if ( !fd->getColor().isEmpty() && fd->getColor() != "#000000" ) - color = "color=\"" + fd->getColor() + "\""; - if ( fd->getFont() != "default" ) - font = "face=\"" + fd->getFont() + "\""; - TQString tag( TQString( "font %1 %2 %3" ) - .arg( color ).arg( size ).arg( font ) ); - - if ( selText ) - textEdit->setSelection( pfrom, ifrom, pto, ito ); - insertTags( tag.simplifyWhiteSpace() ); - } - else if ( selText ) - textEdit->setSelection( pfrom, ifrom, pto, ito ); -} - -TQString MultiLineEditor::getStaticText() -{ - return staticText.stripWhiteSpace(); -} - -TQString MultiLineEditor::getText( TQWidget *parent, const TQString &text, bool richtextMode, bool *useWrap ) -{ - MultiLineEditor medit( TRUE, richtextMode, parent, 0, 0, text ); - if ( richtextMode ) - medit.setUseWrapping( *useWrap ); - if ( medit.exec() == TQDialog::Accepted ) { - *useWrap = medit.useWrapping(); - return medit.getStaticText(); - } - return TQString(); -} - -void MultiLineEditor::changeWrapMode( bool b ) -{ - doWrap = b; - if ( doWrap && !callStatic ) { - if ( oldDoWrap ) - textEdit->setProperty( "wordWrap", oldWrapMode ); - else - textEdit->setWordWrap( TQTextEdit::WidgetWidth ); - } else { - textEdit->setWordWrap( TQTextEdit::NoWrap ); - } -} - -bool MultiLineEditor::useWrapping() const -{ - return doWrap; -} - -void MultiLineEditor::setUseWrapping( bool b ) -{ - doWrap = b; - wrapAction->setOn( doWrap ); -} diff --git a/tdevdesigner/designer/myiconloader.cpp b/tdevdesigner/designer/myiconloader.cpp deleted file mode 100644 index 72a1bdfb..00000000 --- a/tdevdesigner/designer/myiconloader.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Alexander Dymo * - * cloudtemple@mksat.net * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ -#include "myiconloader.h" -#include "tdevdesigner_part.h" -#include - -TQPixmap BarIcon2( const TQString & name ) -{ - return BarIcon(name, TDevDesignerPartFactory::instance()); -} - -TQPixmap SmallIcon2( const TQString & name) -{ - return SmallIcon(name, TDevDesignerPartFactory::instance()); -} diff --git a/tdevdesigner/designer/newformimpl.cpp b/tdevdesigner/designer/newformimpl.cpp deleted file mode 100644 index b5cc7c58..00000000 --- a/tdevdesigner/designer/newformimpl.cpp +++ /dev/null @@ -1,414 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "newformimpl.h" -#include "mainwindow.h" -#include "metadatabase.h" -#include "project.h" -#include "formwindow.h" -#include "widgetfactory.h" -#include "widgetdatabase.h" -#include "actioneditorimpl.h" -#include "hierarchyview.h" -#include "resource.h" -#include "projectsettingsimpl.h" -#include "sourcefile.h" - -#include -#include "tdevdesigner_part.h" -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -static int forms = 0; - -ProjectItem::ProjectItem( TQIconView *view, const TQString &text ) - : NewItem( view, text ) -{ -} - -void ProjectItem::insert( Project * ) -{ - MainWindow::self->createNewProject( lang ); -} - - - -FormItem::FormItem( TQIconView *view, const TQString &text ) - : NewItem( view, text ) -{ -} - -void FormItem::insert( Project *pro ) -{ - TQString n = "Form" + TQString::number( ++forms ); - FormWindow *fw = 0; - FormFile *ff = new FormFile( FormFile::createUnnamedFileName(), TRUE, pro ); - fw = new FormWindow( ff, MainWindow::self, MainWindow::self->qWorkspace(), n ); - fw->setProject( pro ); - MetaDataBase::addEntry( TQT_TQOBJECT(fw) ); - if ( fType == Widget ) { - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQWIDGET_OBJECT_NAME_STRING ), - fw, n.latin1() ); - fw->setMainContainer( w ); - } else if ( fType == Dialog ) { - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQDIALOG_OBJECT_NAME_STRING ), fw, n.latin1() ); - fw->setMainContainer( w ); - } else if ( fType == Wizard ) { - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQWIZARD_OBJECT_NAME_STRING ), - fw, n.latin1() ); - fw->setMainContainer( w ); - } else if ( fType == MainWindow ) { - TQWidget *w = WidgetFactory::create( WidgetDatabase::idFromClassName( TQMAINWINDOW_OBJECT_NAME_STRING ), - fw, n.latin1() ); - fw->setMainContainer( w ); - } - - fw->setCaption( n ); - fw->resize( 600, 480 ); - MainWindow::self->insertFormWindow( fw ); - - TemplateWizardInterface *iface = - MainWindow::self->templateWizardInterface( fw->mainContainer()->className() ); - if ( iface ) { - iface->setup( fw->mainContainer()->className(), fw->mainContainer(), - fw->iFace(), MainWindow::self->designerInterface() ); - iface->release(); - } - - // the wizard might have changed a lot, lets update everything - MainWindow::self->actioneditor()->setFormWindow( fw ); - MainWindow::self->objectHierarchy()->setFormWindow( fw, TQT_TQOBJECT(fw) ); - MainWindow::self->objectHierarchy()->formDefinitionView()->refresh(); - MainWindow::self->objectHierarchy()->rebuild(); - fw->killAccels( TQT_TQOBJECT(fw) ); - fw->project()->setModified( TRUE ); - fw->setFocus(); - if ( !pro->isDummy() ) { - fw->setSavePixmapInProject( TRUE ); - fw->setSavePixmapInline( FALSE ); - } -} - - - -CustomFormItem::CustomFormItem( TQIconView *view, const TQString &text ) - : NewItem( view, text ) -{ -} - -static void unifyFormName( FormWindow *fw, TQWorkspace *qworkspace ) -{ - TQStringList lst; - TQWidgetList windows = qworkspace->windowList(); - for ( TQWidget *w =windows.first(); w; w = windows.next() ) { - if ( w == fw ) - continue; - lst << w->name(); - } - - if ( lst.findIndex( fw->name() ) == -1 ) - return; - TQString origName = fw->name(); - TQString n = origName; - int i = 1; - while ( lst.findIndex( n ) != -1 ) { - n = origName + TQString::number( i++ ); - } - fw->setName( n ); - fw->setCaption( n ); -} - -void CustomFormItem::insert( Project *pro ) -{ - TQString filename = templateFileName(); - if ( !filename.isEmpty() && TQFile::exists( filename ) ) { - Resource resource( MainWindow::self ); - FormFile *ff = new FormFile( filename, TRUE, pro ); - if ( !resource.load( ff ) ) { - TQMessageBox::information( MainWindow::self, i18n("Load Template"), - i18n("Could not load form description from template '%1'" ).arg( filename ) ); - delete ff; - return; - } - ff->setFileName( TQString() ); - if ( MainWindow::self->formWindow() ) { - MainWindow::self->formWindow()->setFileName( TQString() ); - unifyFormName( MainWindow::self->formWindow(), MainWindow::self->qWorkspace() ); - if ( !pro->isDummy() ) { - MainWindow::self->formWindow()->setSavePixmapInProject( TRUE ); - MainWindow::self->formWindow()->setSavePixmapInline( FALSE ); - } - } - } -} - - - -SourceFileItem::SourceFileItem( TQIconView *view, const TQString &text ) - : NewItem( view, text ), visible( TRUE ) -{ -} - -void SourceFileItem::insert( Project *pro ) -{ - SourceFile *f = new SourceFile( SourceFile::createUnnamedFileName( ext ), TRUE, pro ); - MainWindow::self->editSource( f ); -} - -void SourceFileItem::setProject( Project *pro ) -{ - TQIconView *iv = iconView(); - bool v = lang == pro->language(); - if ( !iv || v == visible ) - return; - visible = v; - if ( !visible ) - iv->takeItem( this ); - else - iv->insertItem( this ); -} - - - -SourceTemplateItem::SourceTemplateItem( TQIconView *view, const TQString &text ) - : NewItem( view, text ), visible( TRUE ) -{ -} - -void SourceTemplateItem::insert( Project *pro ) -{ - SourceTemplateInterface *siface = MainWindow::self->sourceTemplateInterface( text() ); - if ( !siface ) - return; - SourceTemplateInterface::Source src = siface->create( text(), MainWindow::self->designerInterface() ); - SourceFile *f = 0; - if ( src.type == SourceTemplateInterface::Source::Invalid ) - return; - if ( src.type == SourceTemplateInterface::Source::FileName ) - f = new SourceFile( src.filename, FALSE, pro ); - else - f = new SourceFile( SourceFile::createUnnamedFileName( src.extension ), TRUE, pro ); - if ( f->isAccepted()) { - f->setText( src.code ); - MainWindow::self->editSource( f ); - f->setModified( TRUE ); - } else { - delete f; - } -} - -void SourceTemplateItem::setProject( Project *pro ) -{ - TQIconView *iv = iconView(); - bool v = !pro->isDummy() && lang == pro->language(); - if ( !iv || v == visible ) - return; - visible = v; - if ( !visible ) - iv->takeItem( this ); - else - iv->insertItem( this ); -} - -void NewForm::insertTemplates( TQIconView *tView, - const TQString &templatePath ) -{ - TQStringList::Iterator it; - TQStringList languages = MetaDataBase::languages(); - if ( !MainWindow::self->singleProjectMode() ) { - for ( it = languages.begin(); it != languages.end(); ++it ) { - ProjectItem *pi = new ProjectItem( tView, i18n("%1 Project" ).arg( *it ) ); - allItems.append( pi ); - pi->setLanguage( *it ); - pi->setPixmap( BarIcon( "designer_project.png" , TDevDesignerPartFactory::instance()) ); - pi->setDragEnabled( FALSE ); - } - } - TQIconViewItem *cur = 0; - FormItem *fi = new FormItem( tView,i18n( "Dialog" ) ); - allItems.append( fi ); - fi->setFormType( FormItem::Dialog ); - fi->setPixmap( BarIcon( "designer_newform.png" , TDevDesignerPartFactory::instance()) ); - fi->setDragEnabled( FALSE ); - cur = fi; - if ( !MainWindow::self->singleProjectMode() ) { - fi = new FormItem( tView,i18n( "Wizard" ) ); - allItems.append( fi ); - fi->setFormType( FormItem::Wizard ); - fi->setPixmap( BarIcon( "designer_newform.png" , TDevDesignerPartFactory::instance()) ); - fi->setDragEnabled( FALSE ); - fi = new FormItem( tView, i18n( "Widget" ) ); - allItems.append( fi ); - fi->setFormType( FormItem::Widget ); - fi->setPixmap( BarIcon( "designer_newform.png" , TDevDesignerPartFactory::instance()) ); - fi->setDragEnabled( FALSE ); - fi = new FormItem( tView, i18n( "Main Window" ) ); - allItems.append( fi ); - fi->setFormType( FormItem::MainWindow ); - fi->setPixmap( BarIcon( "designer_newform.png" , TDevDesignerPartFactory::instance()) ); - fi->setDragEnabled( FALSE ); - - TQString templPath = templatePath; - TQStringList templRoots; - const char *qtdir = getenv( "QTDIR" ); - if(qtdir) - templRoots << qtdir; - templRoots << tqInstallPathData(); - if(qtdir) //try the tools/designer directory last! - templRoots << (TQString(qtdir) + "/tools/designer"); - for ( TQStringList::Iterator it = templRoots.begin(); it != templRoots.end(); ++it ) { - TQString path = (*it) + "/templates"; - if ( TQFile::exists( path )) { - templPath = path; - break; - } - } - if ( !templPath.isEmpty() ) { - TQDir dir( templPath ); - const TQFileInfoList *filist = dir.entryInfoList( TQDir::DefaultFilter, TQDir::DirsFirst | TQDir::Name ); - if ( filist ) { - TQFileInfoListIterator it( *filist ); - TQFileInfo *fi; - while ( ( fi = it.current() ) != 0 ) { - ++it; - if ( !fi->isFile() || fi->extension() != "ui" ) - continue; - TQString name = fi->baseName(); - name = name.replace( '_', ' ' ); - CustomFormItem *ci = new CustomFormItem( tView, name ); - allItems.append( ci ); - ci->setDragEnabled( FALSE ); - ci->setPixmap( BarIcon( "designer_newform.png" , TDevDesignerPartFactory::instance()) ); - ci->setTemplateFile( fi->absFilePath() ); - } - } - } - } - - for ( it = languages.begin(); it != languages.end(); ++it ) { - LanguageInterface *iface = MetaDataBase::languageInterface( *it ); - if ( iface ) { - TQMap extensionMap; - iface->preferedExtensions( extensionMap ); - for ( TQMap::Iterator eit = extensionMap.begin(); - eit != extensionMap.end(); ++eit ) { - SourceFileItem * si = new SourceFileItem( tView, *eit ); - allItems.append( si ); - si->setExtension( eit.key() ); - si->setLanguage( *it ); - si->setPixmap( BarIcon( "designer_filenew.png", TDevDesignerPartFactory::instance() ) ); - si->setDragEnabled( FALSE ); - } - iface->release(); - } - } - - if ( !MainWindow::self->singleProjectMode() ) { - TQStringList sourceTemplates = MainWindow::self->sourceTemplates(); - for ( TQStringList::Iterator sit = sourceTemplates.begin(); sit != sourceTemplates.end(); ++sit ) { - SourceTemplateInterface *siface = MainWindow::self->sourceTemplateInterface( *sit ); - if ( !siface ) - continue; - SourceTemplateItem * si = new SourceTemplateItem( tView, *sit ); - allItems.append( si ); - si->setTemplate( *sit ); - si->setLanguage( siface->language( *sit ) ); - si->setPixmap( BarIcon( "designer_filenew.png", TDevDesignerPartFactory::instance() ) ); - si->setDragEnabled( FALSE ); - siface->release(); - } - } - - tView->viewport()->setFocus(); - tView->setCurrentItem( cur ); - - if ( MainWindow::self->singleProjectMode() ) - adjustSize(); -} - -NewForm::NewForm( TQIconView *templateView, const TQString &templatePath ) -{ - insertTemplates( templateView, templatePath ); - projectChanged( i18n( "" ) ); -} - -NewForm::NewForm( TQWidget *parent, const TQStringList& projects, - const TQString& currentProject, const TQString &templatePath ) - : NewFormBase( parent, 0, TRUE ) -{ - connect( helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); - - projectCombo->insertStringList( projects ); - projectCombo->setCurrentText( currentProject ); - - insertTemplates( templateView, templatePath ); - - projectChanged( projectCombo->currentText() ); -} - -void NewForm::accept() -{ - if ( !templateView->currentItem() ) - return; - Project *pro = MainWindow::self->findProject( projectCombo->currentText() ); - if ( !pro ) - return; - MainWindow::self->setCurrentProject( pro ); - NewFormBase::accept(); - ( (NewItem*)templateView->currentItem() )->insert( pro ); -} - -void NewForm::projectChanged( const TQString &project ) -{ - Project *pro = MainWindow::self->findProject( project ); - if ( !pro ) - return; - TQIconViewItem *i; - for ( i = allItems.first(); i; i = allItems.next() ) - ( (NewItem*)i )->setProject( pro ); - templateView->setCurrentItem( templateView->firstItem() ); - templateView->arrangeItemsInGrid( TRUE ); -} - -void NewForm::itemChanged( TQIconViewItem *item ) -{ - labelProject->setEnabled( item->rtti() != NewItem::ProjectType ); - projectCombo->setEnabled( item->rtti() != NewItem::ProjectType ); -} - -TQPtrList NewForm::allViewItems() -{ - return allItems; -} diff --git a/tdevdesigner/designer/pics/CMakeLists.txt b/tdevdesigner/designer/pics/CMakeLists.txt deleted file mode 100644 index 940ecd0d..00000000 --- a/tdevdesigner/designer/pics/CMakeLists.txt +++ /dev/null @@ -1,85 +0,0 @@ -################################################# -# -# (C) 2012 Slavek Banko -# slavek (DOT) banko (AT) axis.cz -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -install( - FILES - designer_adjustsize.png designer_appicon.png designer_arrow.png - designer_background.png designer_book.png designer_buttongroup.png - designer_checkbox.png designer_combobox.png designer_connecttool.png - designer_cross.png designer_customwidget.png designer_d_adjustsize.png - designer_d_book.png designer_d_buttongroup.png designer_d_checkbox.png - designer_d_combobox.png designer_d_connecttool.png designer_d_customwidget.png - designer_d_databrowser.png designer_d_datatable.png designer_d_dataview.png - designer_d_dateedit.png designer_d_datetimeedit.png designer_d_dial.png - designer_d_down.png designer_d_editbreaklayout.png designer_d_editcopy.png - designer_d_editcut.png designer_d_editdelete.png designer_d_editgrid.png - designer_d_edithlayout.png designer_d_edithlayoutsplit.png - designer_d_editlower.png designer_d_editpaste.png designer_d_editraise.png - designer_d_editslots.png designer_d_editvlayout.png - designer_d_editvlayoutsplit.png designer_d_filenew.png designer_d_fileopen.png - designer_d_filesave.png designer_d_folder.png designer_d_form.png - designer_d_frame.png designer_d_groupbox.png designer_d_help.png - designer_d_home.png designer_d_iconview.png designer_d_image.png - designer_d_label.png designer_d_layout.png designer_d_lcdnumber.png - designer_d_left.png designer_d_line.png designer_d_lineedit.png - designer_d_listbox.png designer_d_listview.png designer_d_multilineedit.png - designer_d_newform.png designer_d_ordertool.png designer_d_pixlabel.png - designer_d_pointer.png designer_d_print.png designer_d_progress.png - designer_d_project.png designer_d_pushbutton.png designer_d_radiobutton.png - designer_d_redo.png designer_d_richtextedit.png designer_d_right.png - designer_d_scrollbar.png designer_d_searchfind.png designer_d_setbuddy.png - designer_d_slider.png designer_d_spacer.png designer_d_spinbox.png - designer_d_table.png designer_d_tabwidget.png designer_d_textbold.png - designer_d_textbrowser.png designer_d_textcenter.png designer_d_textedit.png - designer_d_textfont.png designer_d_texth1.png designer_d_texth2.png - designer_d_texth3.png designer_d_textitalic.png designer_d_textjustify.png - designer_d_textlarger.png designer_d_textleft.png designer_d_textlinebreak.png - designer_d_textparagraph.png designer_d_textright.png designer_d_textsmaller.png - designer_d_textteletext.png designer_d_textunderline.png designer_d_textview.png - designer_d_timeedit.png designer_d_toolbox.png designer_d_toolbutton.png - designer_d_undo.png designer_d_up.png designer_d_widgetstack.png - designer_d_wizarddata.png designer_d_wizarddialog.png designer_d_wordwrap.png - designer_databrowser.png designer_datatable.png designer_dataview.png - designer_dateedit.png designer_datetimeedit.png designer_dial.png - designer_down.png designer_editbreaklayout.png designer_editcopy.png - designer_editcut.png designer_editdelete.png designer_editgrid.png - designer_edithlayout.png designer_edithlayoutsplit.png designer_editlower.png - designer_editpaste.png designer_editraise.png designer_editslots.png - designer_editvlayout.png designer_editvlayoutsplit.png designer_filenew.png - designer_fileopen.png designer_filesave.png designer_folder.png - designer_form.png designer_frame.png designer_groupbox.png designer_hand.png - designer_help.png designer_home.png designer_hsplit.png designer_ibeam.png - designer_iconview.png designer_image.png designer_label.png designer_layout.png - designer_lcdnumber.png designer_left.png designer_line.png designer_lineedit.png - designer_listbox.png designer_listview.png designer_multilineedit.png - designer_newform.png designer_no.png designer_object.png designer_ordertool.png - designer_pixlabel.png designer_pointer.png designer_print.png - designer_progress.png designer_project.png designer_pushbutton.png - designer_qtlogo.png designer_radiobutton.png designer_redo.png - designer_resetproperty.png designer_richtextedit.png designer_right.png - designer_s_down.png designer_s_editcut.png designer_s_left.png - designer_s_right.png designer_s_up.png designer_scrollbar.png - designer_searchfind.png designer_setbuddy.png designer_sizeall.png - designer_sizeb.png designer_sizef.png designer_sizeh.png designer_sizev.png - designer_slider.png designer_spacer.png designer_spinbox.png designer_splash.png - designer_table.png designer_tabwidget.png designer_textbold.png - designer_textbrowser.png designer_textcenter.png designer_textedit.png - designer_textfont.png designer_texth1.png designer_texth2.png - designer_texth3.png designer_textitalic.png designer_textjustify.png - designer_textlarger.png designer_textleft.png designer_textlinebreak.png - designer_textparagraph.png designer_textright.png designer_textsmaller.png - designer_textteletext.png designer_textunderline.png designer_textview.png - designer_timeedit.png designer_toolbox.png designer_toolbutton.png - designer_undo.png designer_up.png designer_uparrow.png designer_vsplit.png - designer_wait.png designer_widgetstack.png designer_wizarddata.png - designer_wizarddialog.png designer_wordwrap.png - DESTINATION ${DATA_INSTALL_DIR}/tdevdesignerpart/pics -) diff --git a/tdevdesigner/designer/pics/Makefile.am b/tdevdesigner/designer/pics/Makefile.am deleted file mode 100644 index be65c4d5..00000000 --- a/tdevdesigner/designer/pics/Makefile.am +++ /dev/null @@ -1,2 +0,0 @@ -picsdirdir = $(kde_datadir)/tdevdesignerpart/pics -picsdir_DATA = designer_adjustsize.png designer_appicon.png designer_arrow.png designer_background.png designer_book.png designer_buttongroup.png designer_checkbox.png designer_combobox.png designer_connecttool.png designer_cross.png designer_customwidget.png designer_d_adjustsize.png designer_d_book.png designer_d_buttongroup.png designer_d_checkbox.png designer_d_combobox.png designer_d_connecttool.png designer_d_customwidget.png designer_d_databrowser.png designer_d_datatable.png designer_d_dataview.png designer_d_dateedit.png designer_d_datetimeedit.png designer_d_dial.png designer_d_down.png designer_d_editbreaklayout.png designer_d_editcopy.png designer_d_editcut.png designer_d_editdelete.png designer_d_editgrid.png designer_d_edithlayout.png designer_d_edithlayoutsplit.png designer_d_editlower.png designer_d_editpaste.png designer_d_editraise.png designer_d_editslots.png designer_d_editvlayout.png designer_d_editvlayoutsplit.png designer_d_filenew.png designer_d_fileopen.png designer_d_filesave.png designer_d_folder.png designer_d_form.png designer_d_frame.png designer_d_groupbox.png designer_d_help.png designer_d_home.png designer_d_iconview.png designer_d_image.png designer_d_label.png designer_d_layout.png designer_d_lcdnumber.png designer_d_left.png designer_d_line.png designer_d_lineedit.png designer_d_listbox.png designer_d_listview.png designer_d_multilineedit.png designer_d_newform.png designer_d_ordertool.png designer_d_pixlabel.png designer_d_pointer.png designer_d_print.png designer_d_progress.png designer_d_project.png designer_d_pushbutton.png designer_d_radiobutton.png designer_d_redo.png designer_d_richtextedit.png designer_d_right.png designer_d_scrollbar.png designer_d_searchfind.png designer_d_setbuddy.png designer_d_slider.png designer_d_spacer.png designer_d_spinbox.png designer_d_table.png designer_d_tabwidget.png designer_d_textbold.png designer_d_textbrowser.png designer_d_textcenter.png designer_d_textedit.png designer_d_textfont.png designer_d_texth1.png designer_d_texth2.png designer_d_texth3.png designer_d_textitalic.png designer_d_textjustify.png designer_d_textlarger.png designer_d_textleft.png designer_d_textlinebreak.png designer_d_textparagraph.png designer_d_textright.png designer_d_textsmaller.png designer_d_textteletext.png designer_d_textunderline.png designer_d_textview.png designer_d_timeedit.png designer_d_toolbox.png designer_d_toolbutton.png designer_d_undo.png designer_d_up.png designer_d_widgetstack.png designer_d_wizarddata.png designer_d_wizarddialog.png designer_d_wordwrap.png designer_databrowser.png designer_datatable.png designer_dataview.png designer_dateedit.png designer_datetimeedit.png designer_dial.png designer_down.png designer_editbreaklayout.png designer_editcopy.png designer_editcut.png designer_editdelete.png designer_editgrid.png designer_edithlayout.png designer_edithlayoutsplit.png designer_editlower.png designer_editpaste.png designer_editraise.png designer_editslots.png designer_editvlayout.png designer_editvlayoutsplit.png designer_filenew.png designer_fileopen.png designer_filesave.png designer_folder.png designer_form.png designer_frame.png designer_groupbox.png designer_hand.png designer_help.png designer_home.png designer_hsplit.png designer_ibeam.png designer_iconview.png designer_image.png designer_label.png designer_layout.png designer_lcdnumber.png designer_left.png designer_line.png designer_lineedit.png designer_listbox.png designer_listview.png designer_multilineedit.png designer_newform.png designer_no.png designer_object.png designer_ordertool.png designer_pixlabel.png designer_pointer.png designer_print.png designer_progress.png designer_project.png designer_pushbutton.png designer_qtlogo.png designer_radiobutton.png designer_redo.png designer_resetproperty.png designer_richtextedit.png designer_right.png designer_s_down.png designer_s_editcut.png designer_s_left.png designer_s_right.png designer_s_up.png designer_scrollbar.png designer_searchfind.png designer_setbuddy.png designer_sizeall.png designer_sizeb.png designer_sizef.png designer_sizeh.png designer_sizev.png designer_slider.png designer_spacer.png designer_spinbox.png designer_splash.png designer_table.png designer_tabwidget.png designer_textbold.png designer_textbrowser.png designer_textcenter.png designer_textedit.png designer_textfont.png designer_texth1.png designer_texth2.png designer_texth3.png designer_textitalic.png designer_textjustify.png designer_textlarger.png designer_textleft.png designer_textlinebreak.png designer_textparagraph.png designer_textright.png designer_textsmaller.png designer_textteletext.png designer_textunderline.png designer_textview.png designer_timeedit.png designer_toolbox.png designer_toolbutton.png designer_undo.png designer_up.png designer_uparrow.png designer_vsplit.png designer_wait.png designer_widgetstack.png designer_wizarddata.png designer_wizarddialog.png designer_wordwrap.png diff --git a/tdevdesigner/designer/pixmapchooser.cpp b/tdevdesigner/designer/pixmapchooser.cpp deleted file mode 100644 index 279997ba..00000000 --- a/tdevdesigner/designer/pixmapchooser.cpp +++ /dev/null @@ -1,231 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2001 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include // HP-UX compiler needs this here - -#include -#include -#include -#include -#include - -#include "tdevdesigner_part.h" - -#include "pixmapchooser.h" -#include "formwindow.h" -#if defined(DESIGNER) && !defined(RESOURCE) -#include "pixmapfunction.h" -#endif -#include "metadatabase.h" -#include "mainwindow.h" -#include "pixmapcollectioneditor.h" -#include "pixmapcollection.h" -#include "project.h" - -#include -#include -#include -#include -#include -#include - -#if defined(DESIGNER) -static ImageIconProvider *imageIconProvider = 0; -#endif - -PixmapView::PixmapView( TQWidget *parent ) - : TQScrollView( parent ) -{ - viewport()->setBackgroundMode( PaletteBase ); -} - -void PixmapView::setPixmap( const TQPixmap &pix ) -{ - pixmap = pix; - resizeContents( pixmap.size().width(), pixmap.size().height() ); - viewport()->repaint( FALSE ); -} - -void PixmapView::drawContents( TQPainter *p, int cx, int cy, int cw, int ch ) -{ - p->fillRect( cx, cy, cw, ch, colorGroup().brush( TQColorGroup::Base ) ); - p->drawPixmap( 0, 0, pixmap ); -} - -void PixmapView::previewUrl( const TQUrl &u ) -{ - if ( u.isLocalFile() ) { - TQString path = u.path(); - TQPixmap pix( path ); - if ( !pix.isNull() ) - setPixmap( pix ); - } else { - tqWarning( "Previewing remote files not supported." ); - } -} - -static void buildImageFormatList( TQString &filter, TQString &all ) -{ - all = tqApp->translate( "qChoosePixmap", "All Pixmaps (" ); - for ( uint i = 0; i < TQImageIO::outputFormats().count(); i++ ) { - TQString outputFormat = TQImageIO::outputFormats().at( i ); - TQString outputExtension; - if ( outputFormat != "JPEG" ) - outputExtension = outputFormat.lower(); - else - outputExtension = "jpg;*.jpeg"; - filter += TQString(tqApp->translate( "qChoosePixmap", "%1-Pixmaps (%2)\n" )). - arg( outputFormat ).arg( "*." + outputExtension); - all += "*." + outputExtension + ";"; - } - filter.prepend( all + tqApp->translate( "qChoosePixmap", ")\n" ) ); - filter += tqApp->translate( "qChoosePixmap", "All Files (*)" ); - -} -TQStringList qChoosePixmaps( TQWidget *parent ) -{ -/* if ( !imageIconProvider && !TQFileDialog::iconProvider() ) - TQFileDialog::setIconProvider( ( imageIconProvider = new ImageIconProvider ) ); - - TQString filter; - TQString all; - buildImageFormatList( filter, all ); - - TQFileDialog fd( TQString(), filter, parent, 0, TRUE ); - fd.setMode( TQFileDialog::ExistingFiles ); - fd.setContentsPreviewEnabled( TRUE ); - PixmapView *pw = new PixmapView( &fd ); - fd.setContentsPreview( pw, pw ); - fd.setViewMode( TQFileDialog::List ); - fd.setPreviewMode( TQFileDialog::Contents ); - fd.setCaption( tqApp->translate( "qChoosePixmap", "Choose Images..." ) ); - if ( fd.exec() == TQDialog::Accepted ) - return fd.selectedFiles(); - return TQStringList();*/ - TQStringList mimetypes = KImageIO::mimeTypes( KImageIO::Reading ); - KFileDialog dlg(TQString(), mimetypes.join(" "), parent, "filedialog", true); - dlg.setOperationMode( KFileDialog::Opening ); - dlg.setCaption( tqApp->translate( "qChoosePixmap", "Choose Images..." ) ); - dlg.setMode( KFile::Files ); - KImageFilePreview *ip = new KImageFilePreview( &dlg ); - dlg.setPreviewWidget( ip ); - if (dlg.exec()) - return dlg.selectedFiles(); - return TQStringList(); -} - -TQPixmap qChoosePixmap( TQWidget *parent, FormWindow *fw, const TQPixmap &old, TQString *fn ) -{ -#if defined(DESIGNER) - if ( !fw || fw->savePixmapInline() ) { -/* if ( !imageIconProvider && !TQFileDialog::iconProvider() ) - TQFileDialog::setIconProvider( ( imageIconProvider = new ImageIconProvider ) ); - - TQString filter; - TQString all; - buildImageFormatList( filter, all ); - - TQFileDialog fd( TQString(), filter, parent, 0, TRUE ); - fd.setContentsPreviewEnabled( TRUE ); - PixmapView *pw = new PixmapView( &fd ); - fd.setContentsPreview( pw, pw ); - fd.setViewMode( TQFileDialog::List ); - fd.setPreviewMode( TQFileDialog::Contents ); - fd.setCaption( tqApp->translate( "qChoosePixmap", "Choose Pixmap" ) ); - if ( fd.exec() == TQDialog::Accepted ) { - TQPixmap pix( fd.selectedFile() ); - if ( fn ) - *fn = fd.selectedFile(); - MetaDataBase::setPixmapArgument( fw, pix.serialNumber(), fd.selectedFile() ); - return pix; - }*/ - TQStringList mimetypes = KImageIO::mimeTypes( KImageIO::Reading ); - KFileDialog dlg(TQString(), mimetypes.join(" "), parent, "filedialog", true); - dlg.setOperationMode( KFileDialog::Opening ); - dlg.setCaption( tqApp->translate( "qChoosePixmap", "Choose Pixmap" ) ); - dlg.setMode( KFile::File ); - KImageFilePreview *ip = new KImageFilePreview( &dlg ); - dlg.setPreviewWidget( ip ); - if (dlg.exec()) - { - TQPixmap pix( dlg.selectedURL().path() ); - if ( fn ) - *fn = dlg.selectedURL().path(); - MetaDataBase::setPixmapArgument( TQT_TQOBJECT(fw), pix.serialNumber(), dlg.selectedURL().path() ); - return pix; - } - } else if ( fw && fw->savePixmapInProject() ) { - PixmapCollectionEditor dia( parent, 0, TRUE ); - dia.setProject( fw->project() ); - dia.setChooserMode( TRUE ); - dia.setCurrentItem( MetaDataBase::pixmapKey( TQT_TQOBJECT(fw), old.serialNumber() ) ); - if ( dia.exec() == TQDialog::Accepted ) { - TQPixmap pix( fw->project()->pixmapCollection()->pixmap( dia.viewPixmaps->currentItem()->text() ) ); - MetaDataBase::setPixmapKey( TQT_TQOBJECT(fw), pix.serialNumber(), dia.viewPixmaps->currentItem()->text() ); - return pix; - } - } else { - PixmapFunction dia( parent, 0, TRUE ); - TQObject::connect( dia.helpButton, TQT_SIGNAL( clicked() ), MainWindow::self, TQT_SLOT( showDialogHelp() ) ); - dia.labelFunction->setText( fw->pixmapLoaderFunction() + "(" ); - dia.editArguments->setText( MetaDataBase::pixmapArgument( TQT_TQOBJECT(fw), old.serialNumber() ) ); - dia.editArguments->setFocus(); - if ( dia.exec() == TQDialog::Accepted ) { - TQPixmap pix; - // we have to force the pixmap to get a new and unique serial number. Unfortunately detatch() doesn't do that - pix.convertFromImage( BarIcon( "designer_image.png", TDevDesignerPartFactory::instance() ).convertToImage() ); - - MetaDataBase::setPixmapArgument( TQT_TQOBJECT(fw), pix.serialNumber(), dia.editArguments->text() ); - return pix; - } - } -#else - Q_UNUSED( parent ); - Q_UNUSED( fw ); - Q_UNUSED( old ); -#endif - return TQPixmap(); -} - -ImageIconProvider::ImageIconProvider( TQWidget *parent, const char *name ) - : TQFileIconProvider( TQT_TQOBJECT(parent), name ), imagepm( BarIcon( "designer_image.png", TDevDesignerPartFactory::instance() ) ) -{ - fmts = TQImage::inputFormats(); -} - -ImageIconProvider::~ImageIconProvider() -{ -} - -const TQPixmap * ImageIconProvider::pixmap( const TQFileInfo &fi ) -{ - TQString ext = fi.extension().upper(); - if ( fmts.contains( ext ) ) { - return &imagepm; - } else { - return TQFileIconProvider::pixmap( fi ); - } -} diff --git a/tdevdesigner/designer/propertyeditor.cpp b/tdevdesigner/designer/propertyeditor.cpp deleted file mode 100644 index c22e9b22..00000000 --- a/tdevdesigner/designer/propertyeditor.cpp +++ /dev/null @@ -1,4332 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include // HP-UX compiler needs this here - -#include "propertyeditor.h" -#include "formwindow.h" -#include "command.h" -#include "metadatabase.h" -#include "propertyobject.h" -#include -#include "widgetfactory.h" -#include "globaldefs.h" -#include "defs.h" -#include "asciivalidator.h" -#include "paletteeditorimpl.h" -#include "multilineeditorimpl.h" -#include "mainwindow.h" -#include "project.h" -#include "hierarchyview.h" -#include "database.h" -#include "menubareditor.h" - -#include -#include -#include -#include "tdevdesigner_part.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include // FIXME: obsolete -#include -#include -#include - -#include - - -static TQFontDatabase *fontDataBase = 0; -TQString assistantPath(); - -#ifdef TQ_WS_MAC -#include -static void setupStyle(TQWidget *w) -{ - static TQStyle *windowsStyle = 0; - if(!windowsStyle) - windowsStyle = new TQWindowsStyle; - w->setStyle(windowsStyle); -} -#else -#define setupStyle(x) -#endif - -static void cleanupFontDatabase() -{ - delete fontDataBase; - fontDataBase = 0; -} - -static TQStringList getFontList() -{ - if ( !fontDataBase ) { - fontDataBase = new TQFontDatabase; - tqAddPostRoutine( cleanupFontDatabase ); - } - return fontDataBase->families(); -} - - -class PropertyWhatsThis : public TQWhatsThis -{ -public: - PropertyWhatsThis( PropertyList *l ); - TQString text( const TQPoint &pos ); - bool clicked( const TQString& href ); - -private: - PropertyList *propertyList; - -}; - -PropertyWhatsThis::PropertyWhatsThis( PropertyList *l ) - : TQWhatsThis( l->viewport() ), propertyList( l ) -{ -} - -TQString PropertyWhatsThis::text( const TQPoint &pos ) -{ - return propertyList->whatsThisAt( pos ); -} - -bool PropertyWhatsThis::clicked( const TQString& href ) -{ - if ( !href.isEmpty() ) { - TQAssistantClient *ac = MainWindow::self->assistantClient(); - ac->showPage( TQString( tqInstallPathDocs() ) + "/html/" + href ); - } - return FALSE; // do not hide window -} - - -/*! - \class PropertyItem propertyeditor.h - \brief Base class for all property items - - This is the base class for each property item for the - PropertyList. A simple property item has just a name and a value to - provide an editor for a datatype. But more complex datatypes might - provide an expandable item for editing single parts of the - datatype. See hasSubItems(), initChildren() for that. -*/ - -/*! If this item should be a child of another property item, specify - \a prop as the parent item. -*/ - -PropertyItem::PropertyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) - : TQListViewItem( l, after ), listview( l ), property( prop ), propertyName( propName ) -{ - setSelectable( FALSE ); - open = FALSE; - setText( 0, propertyName ); - changed = FALSE; - setText( 1, "" ); - resetButton = 0; -} - -PropertyItem::~PropertyItem() -{ - if ( resetButton ) - delete resetButton->parentWidget(); - resetButton = 0; -} - -void PropertyItem::toggle() -{ -} - -void PropertyItem::updateBackColor() -{ - if ( itemAbove() && this != listview->firstChild() ) { - if ( ( ( PropertyItem*)itemAbove() )->backColor == *backColor1 ) - backColor = *backColor2; - else - backColor = *backColor1; - } else { - backColor = *backColor1; - } - if ( listview->firstChild() == this ) - backColor = *backColor1; -} - -TQColor PropertyItem::backgroundColor() -{ - updateBackColor(); - if ( (TQListViewItem*)this == listview->currentItem() ) - return *selectedBack; - return backColor; -} - -/*! If a subclass is a expandable item, this is called when the child -items should be created. -*/ - -void PropertyItem::createChildren() -{ -} - -/*! If a subclass is a expandable item, this is called when the child -items should be initialized. -*/ - -void PropertyItem::initChildren() -{ -} - -void PropertyItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ) -{ - TQColorGroup g( cg ); - g.setColor( TQColorGroup::Base, backgroundColor() ); - g.setColor( TQColorGroup::Foreground, TQt::black ); - g.setColor( TQColorGroup::Text, TQt::black ); - int indent = 0; - if ( column == 0 ) { - indent = 20 + ( property ? 20 : 0 ); - p->fillRect( 0, 0, width, height(), backgroundColor() ); - p->save(); - p->translate( indent, 0 ); - } - - if ( isChanged() && column == 0 ) { - p->save(); - TQFont f = p->font(); - f.setBold( TRUE ); - p->setFont( f ); - } - - if ( !hasCustomContents() || column != 1 ) { - TQListViewItem::paintCell( p, g, column, width - indent, align ); - } else { - p->fillRect( 0, 0, width, height(), backgroundColor() ); - drawCustomContents( p, TQRect( 0, 0, width, height() ) ); - } - - if ( isChanged() && column == 0 ) - p->restore(); - if ( column == 0 ) - p->restore(); - if ( hasSubItems() && column == 0 ) { - p->save(); - p->setPen( cg.foreground() ); - p->setBrush( cg.base() ); - p->drawRect( 5, height() / 2 - 4, 9, 9 ); - p->drawLine( 7, height() / 2, 11, height() / 2 ); - if ( !isOpen() ) - p->drawLine( 9, height() / 2 - 2, 9, height() / 2 + 2 ); - p->restore(); - } - p->save(); - p->setPen( TQPen( cg.dark(), 1 ) ); - p->drawLine( 0, height() - 1, width, height() - 1 ); - p->drawLine( width - 1, 0, width - 1, height() ); - p->restore(); - - if ( listview->currentItem() == this && column == 0 && - !listview->hasFocus() && !listview->viewport()->hasFocus() ) - paintFocus( p, cg, TQRect( 0, 0, width, height() ) ); -} - -void PropertyItem::paintBranches( TQPainter * p, const TQColorGroup & cg, - int w, int y, int h ) -{ - TQColorGroup g( cg ); - g.setColor( TQColorGroup::Base, backgroundColor() ); - TQListViewItem::paintBranches( p, g, w, y, h ); -} - -void PropertyItem::paintFocus( TQPainter *p, const TQColorGroup &cg, const TQRect &r ) -{ - p->save(); - TQApplication::style().tqdrawPrimitive(TQStyle::PE_Panel, p, r, cg, - TQStyle::Style_Sunken, TQStyleOption(1,1) ); - p->restore(); -} - -/*! Subclasses which are expandable items have to return TRUE - here. Default is FALSE. -*/ - -bool PropertyItem::hasSubItems() const -{ - return FALSE; -} - -/*! Returns the parent property item here if this is a child or 0 - otherwise. - */ - -PropertyItem *PropertyItem::propertyParent() const -{ - return property; -} - -bool PropertyItem::isOpen() const -{ - return open; -} - -void PropertyItem::setOpen( bool b ) -{ - if ( b == open ) - return; - open = b; - - if ( !open ) { - children.setAutoDelete( TRUE ); - children.clear(); - children.setAutoDelete( FALSE ); - tqApp->processEvents(); - listview->updateEditorSize(); - return; - } - - createChildren(); - initChildren(); - tqApp->processEvents(); - listview->updateEditorSize(); -} - -/*! Subclasses have to show the editor of the item here -*/ - -void PropertyItem::showEditor() -{ - createResetButton(); - resetButton->parentWidget()->show(); -} - -/*! Subclasses have to hide the editor of the item here -*/ - -void PropertyItem::hideEditor() -{ - createResetButton(); - resetButton->parentWidget()->hide(); -} - -/*! This is called to init the value of the item. Reimplement in - subclasses to init the editor -*/ - -void PropertyItem::setValue( const TQVariant &v ) -{ - val = v; -} - -TQVariant PropertyItem::value() const -{ - return val; -} - -bool PropertyItem::isChanged() const -{ - return changed; -} - -void PropertyItem::setChanged( bool b, bool updateDb ) -{ - if ( propertyParent() ) - return; - if ( changed == b ) - return; - changed = b; - repaint(); - if ( updateDb ) { - MetaDataBase::setPropertyChanged( listview->propertyEditor()->widget(), name(), changed ); - } - updateResetButtonState(); -} - -TQString PropertyItem::name() const -{ - return propertyName; -} - -void PropertyItem::createResetButton() -{ - if ( resetButton ) { - resetButton->parentWidget()->lower(); - return; - } - const TQPixmap DesignerResetPix = SmallIcon( "designer_resetproperty.png" , TDevDesignerPartFactory::instance()); - - TQHBox *hbox = new TQHBox( listview->viewport() ); - hbox->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); - hbox->setLineWidth( 1 ); - resetButton = new TQPushButton( hbox ); - setupStyle( resetButton ); - resetButton->setPixmap( DesignerResetPix ); - resetButton->setFixedWidth( resetButton->sizeHint().width() ); - hbox->layout()->setAlignment( TQt::AlignRight ); - listview->addChild( hbox ); - hbox->hide(); - TQObject::connect( resetButton, TQT_SIGNAL( clicked() ), - listview, TQT_SLOT( resetProperty() ) ); - TQToolTip::add( resetButton, i18n( "Reset the property to its default value" ) ); - TQWhatsThis::add( resetButton, i18n( "Click this button to reset the property to its default value" ) ); - updateResetButtonState(); -} - -void PropertyItem::updateResetButtonState() -{ - if ( !resetButton ) - return; - if ( propertyParent() || !WidgetFactory::canResetProperty( listview->propertyEditor()->widget(), name() ) ) - resetButton->setEnabled( FALSE ); - else - resetButton->setEnabled( isChanged() ); -} - -/*! Call this to place/resize the item editor correctly (normally - call it from showEditor()) -*/ - -void PropertyItem::placeEditor( TQWidget *w ) -{ - createResetButton(); - TQRect r = listview->itemRect( this ); - if ( !r.size().isValid() ) { - listview->ensureItemVisible( this ); -#if defined(TQ_WS_WIN) - listview->repaintContents( FALSE ); -#endif - r = listview->itemRect( this ); - } - r.setX( listview->header()->sectionPos( 1 ) ); - r.setWidth( listview->header()->sectionSize( 1 ) - 1 ); - r.setWidth( r.width() - resetButton->width() - 2 ); - r = TQRect( listview->viewportToContents( r.topLeft() ), r.size() ); - w->resize( r.size() ); - listview->moveChild( w, r.x(), r.y() ); - resetButton->parentWidget()->resize( resetButton->sizeHint().width() + 10, r.height() ); - listview->moveChild( resetButton->parentWidget(), r.x() + r.width() - 8, r.y() ); - resetButton->setFixedHeight( TQMAX( 0, r.height() - 3 ) ); -} - -/*! This should be called by subclasses if the user changed the value - of the property and this value should be applied to the widget property -*/ - -void PropertyItem::notifyValueChange() -{ - if ( !propertyParent() ) { - listview->valueChanged( this ); - setChanged( TRUE ); - if ( hasSubItems() ) - initChildren(); - } else { - propertyParent()->childValueChanged( this ); - setChanged( TRUE ); - } -} - -/*! If a subclass is a expandable item reimplement this as this is - always called if a child item changed its value. So update the - display of the item here then. -*/ - -void PropertyItem::childValueChanged( PropertyItem * ) -{ -} - -/*! When adding a child item, call this (normally from addChildren() -*/ - -void PropertyItem::addChild( PropertyItem *i ) -{ - children.append( i ); -} - -int PropertyItem::childCount() const -{ - return children.count(); -} - -PropertyItem *PropertyItem::child( int i ) const -{ - // ARRRRRRRRG - return ( (PropertyItem*)this )->children.at( i ); -} - -/*! If the contents of the item is not displayable with a text, but - you want to draw it yourself (using drawCustomContents()), return - TRUE here. -*/ - -bool PropertyItem::hasCustomContents() const -{ - return FALSE; -} - -/*! - \sa hasCustomContents() -*/ - -void PropertyItem::drawCustomContents( TQPainter *, const TQRect & ) -{ -} - -TQString PropertyItem::currentItem() const -{ - return TQString(); -} - -int PropertyItem::currentIntItem() const -{ - return -1; -} - -void PropertyItem::setCurrentItem( const TQString & ) -{ -} - -void PropertyItem::setCurrentItem( int ) -{ -} - -int PropertyItem::currentIntItemFromObject() const -{ - return -1; -} - -TQString PropertyItem::currentItemFromObject() const -{ - return TQString(); -} - -void PropertyItem::setFocus( TQWidget *w ) -{ - if ( !tqApp->focusWidget() || - listview->propertyEditor()->formWindow() && - ( !MainWindow::self->isAFormWindowChild( TQT_TQOBJECT(tqApp->focusWidget()) ) && - !tqApp->focusWidget()->inherits( "Editor" ) ) ) - w->setFocus(); -} - -void PropertyItem::setText( int col, const TQString &t ) -{ - TQString txt( t ); - if ( col == 1 ) - txt = txt.replace( "\n", " " ); - TQListViewItem::setText( col, txt ); -} - -// -------------------------------------------------------------- - -PropertyTextItem::PropertyTextItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName, bool comment, bool multiLine, bool ascii, bool a ) - : PropertyItem( l, after, prop, propName ), withComment( comment ), - hasMultiLines( multiLine ), asciiOnly( ascii ), accel( a ) -{ - lin = 0; - box = 0; -} - -TQLineEdit *PropertyTextItem::lined() -{ - if ( lin ) - return lin; - if ( hasMultiLines ) { - box = new TQHBox( listview->viewport() ); - box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); - box->setLineWidth( 2 ); - box->hide(); - } - - lin = 0; - if ( hasMultiLines ) - lin = new TQLineEdit( box ); - else - lin = new TQLineEdit( listview->viewport() ); - - if ( asciiOnly ) { - if ( PropertyItem::name() == "name" ) { - lin->setValidator( new AsciiValidator( TQString(":"), TQT_TQOBJECT(lin), "ascii_validator" ) ); - if ( listview->propertyEditor()->formWindow()->isFake() ) - lin->setEnabled( FALSE ); - } else { - lin->setValidator( new AsciiValidator( TQString("!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~" - "\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9" - "\xaa\xab\xac\xad\xae\xaf\xb1\xb2\xb3" - "\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc" - "\xbd\xbe\xbf"), TQT_TQOBJECT(lin), "ascii_validator" ) ); - } - } if ( !hasMultiLines ) { - lin->hide(); - } else { - button = new TQPushButton( "...", box ); - setupStyle( button ); - button->setFixedWidth( 20 ); - connect( button, TQT_SIGNAL( clicked() ), - this, TQT_SLOT( getText() ) ); - lin->setFrame( FALSE ); - } - connect( lin, TQT_SIGNAL( returnPressed() ), - this, TQT_SLOT( setValue() ) ); - connect( lin, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SLOT( setValue() ) ); - if ( PropertyItem::name() == "name" || PropertyItem::name() == "itemName" ) - connect( lin, TQT_SIGNAL( returnPressed() ), - listview->propertyEditor()->formWindow()->commandHistory(), - TQT_SLOT( checkCompressedCommand() ) ); - lin->installEventFilter( listview ); - return lin; -} - -PropertyTextItem::~PropertyTextItem() -{ - delete (TQLineEdit*)lin; - lin = 0; - delete (TQHBox*)box; - box = 0; -} - -void PropertyTextItem::setChanged( bool b, bool updateDb ) -{ - PropertyItem::setChanged( b, updateDb ); - if ( withComment && childCount() > 0 ) - ( (PropertyTextItem*)PropertyItem::child( 0 ) )->lined()->setEnabled( b ); -} - -bool PropertyTextItem::hasSubItems() const -{ - return withComment; -} - -void PropertyTextItem::childValueChanged( PropertyItem *child ) -{ - if ( PropertyItem::name() != "name" ) - MetaDataBase::setPropertyComment( listview->propertyEditor()->widget(), - PropertyItem::name(), child->value().toString() ); - else - MetaDataBase::setExportMacro( listview->propertyEditor()->widget(), child->value().toString() ); - listview->propertyEditor()->formWindow()->commandHistory()->setModified( TRUE ); -} - -void PropertyTextItem::showEditor() -{ - PropertyItem::showEditor(); - if ( !lin || lin->text().length() == 0 ) { - lined()->blockSignals( TRUE ); - lined()->setText( value().toString() ); - lined()->blockSignals( FALSE ); - } - - TQWidget* w; - if ( hasMultiLines ) - w = box; - else - w= lined(); - - placeEditor( w ); - if ( !w->isVisible() || !lined()->hasFocus() ) { - w->show(); - setFocus( lined() ); - } -} - -void PropertyTextItem::createChildren() -{ - PropertyTextItem *i = new PropertyTextItem( listview, this, this, - PropertyItem::name() == "name" ? - "export macro" : "comment", FALSE, FALSE, - PropertyItem::name() == "name" ); - i->lined()->setEnabled( isChanged() ); - addChild( i ); -} - -void PropertyTextItem::initChildren() -{ - if ( !childCount() ) - return; - PropertyItem *item = PropertyItem::child( 0 ); - if ( item ) { - if ( PropertyItem::name() != "name" ) - item->setValue( MetaDataBase::propertyComment( listview->propertyEditor()->widget(), - PropertyItem::name() ) ); - else - item->setValue( MetaDataBase::exportMacro( listview->propertyEditor()->widget() ) ); - } -} - -void PropertyTextItem::hideEditor() -{ - PropertyItem::hideEditor(); - TQWidget* w; - if ( hasMultiLines ) - w = box; - else - w = lined(); - - w->hide(); -} - -void PropertyTextItem::setValue( const TQVariant &v ) -{ - if ( ( !hasSubItems() || !isOpen() ) - && value() == v ) - return; - if ( lin ) { - lined()->blockSignals( TRUE ); - int oldCursorPos; - oldCursorPos = lin->cursorPosition(); - lined()->setText( v.toString() ); - if ( oldCursorPos < (int)lin->text().length() ) - lin->setCursorPosition( oldCursorPos ); - lined()->blockSignals( FALSE ); - } - setText( 1, v.toString() ); - PropertyItem::setValue( v ); -} - -void PropertyTextItem::setValue() -{ - setText( 1, lined()->text() ); - TQVariant v; - if ( accel ) { - v = TQVariant( TQKeySequence( lined()->text() ) ); - if ( v.toString().isNull() ) - return; // not yet valid input - } else { - v = lined()->text(); - } - PropertyItem::setValue( v ); - notifyValueChange(); -} - -void PropertyTextItem::getText() -{ - bool richText = !::tqqt_cast(listview->propertyEditor()->widget()) || - ( text( 0 ) == "whatsThis" ); - bool doWrap = FALSE; - TQString txt = MultiLineEditor::getText( listview, value().toString(), richText, &doWrap ); - if ( !txt.isEmpty() ) { - setText( 1, txt ); - PropertyItem::setValue( txt ); - notifyValueChange(); - lined()->blockSignals( TRUE ); - lined()->setText( txt ); - lined()->blockSignals( FALSE ); - } -} - -// -------------------------------------------------------------- - -PropertyDoubleItem::PropertyDoubleItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName ) - : PropertyItem( l, after, prop, propName ) -{ - lin = 0; -} - -TQLineEdit *PropertyDoubleItem::lined() -{ - if ( lin ) - return lin; - lin = new TQLineEdit( listview->viewport() ); - lin->setValidator( new TQDoubleValidator( TQT_TQOBJECT(lin), "double_validator" ) ); - - connect( lin, TQT_SIGNAL( returnPressed() ), - this, TQT_SLOT( setValue() ) ); - connect( lin, TQT_SIGNAL( textChanged( const TQString & ) ), - this, TQT_SLOT( setValue() ) ); - lin->installEventFilter( listview ); - return lin; -} - -PropertyDoubleItem::~PropertyDoubleItem() -{ - delete (TQLineEdit*)lin; - lin = 0; -} - -void PropertyDoubleItem::showEditor() -{ - PropertyItem::showEditor(); - if ( !lin ) { - lined()->blockSignals( TRUE ); - lined()->setText( TQString::number( value().toDouble() ) ); - lined()->blockSignals( FALSE ); - } - TQWidget* w = lined(); - - placeEditor( w ); - if ( !w->isVisible() || !lined()->hasFocus() ) { - w->show(); - setFocus( lined() ); - } -} - - -void PropertyDoubleItem::hideEditor() -{ - PropertyItem::hideEditor(); - TQWidget* w = lined(); - w->hide(); -} - -void PropertyDoubleItem::setValue( const TQVariant &v ) -{ - if ( value() == v ) - return; - if ( lin ) { - lined()->blockSignals( TRUE ); - int oldCursorPos; - oldCursorPos = lin->cursorPosition(); - lined()->setText( TQString::number( v.toDouble() ) ); - if ( oldCursorPos < (int)lin->text().length() ) - lin->setCursorPosition( oldCursorPos ); - lined()->blockSignals( FALSE ); - } - setText( 1, TQString::number( v.toDouble() ) ); - PropertyItem::setValue( v ); -} - -void PropertyDoubleItem::setValue() -{ - setText( 1, lined()->text() ); - TQVariant v = lined()->text().toDouble(); - PropertyItem::setValue( v ); - notifyValueChange(); -} - - -// -------------------------------------------------------------- - -PropertyDateItem::PropertyDateItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) - : PropertyItem( l, after, prop, propName ) -{ - lin = 0; -} - -TQDateEdit *PropertyDateItem::lined() -{ - if ( lin ) - return lin; - lin = new TQDateEdit( listview->viewport() ); - TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); - for ( TQObject *o = l->first(); o; o = l->next() ) - o->installEventFilter( listview ); - delete l; - connect( lin, TQT_SIGNAL( valueChanged( const TQDate & ) ), - this, TQT_SLOT( setValue() ) ); - return lin; -} - -PropertyDateItem::~PropertyDateItem() -{ - delete (TQDateEdit*)lin; - lin = 0; -} - -void PropertyDateItem::showEditor() -{ - PropertyItem::showEditor(); - if ( !lin ) { - lined()->blockSignals( TRUE ); - lined()->setDate( value().toDate() ); - lined()->blockSignals( FALSE ); - } - placeEditor( lin ); - if ( !lin->isVisible() ) { - lin->show(); - setFocus( lin ); - } -} - -void PropertyDateItem::hideEditor() -{ - PropertyItem::hideEditor(); - if ( lin ) - lin->hide(); -} - -void PropertyDateItem::setValue( const TQVariant &v ) -{ - if ( ( !hasSubItems() || !isOpen() ) - && value() == v ) - return; - - if ( lin ) { - lined()->blockSignals( TRUE ); - if ( lined()->date() != v.toDate() ) - lined()->setDate( v.toDate() ); - lined()->blockSignals( FALSE ); - } - setText( 1, v.toDate().toString( ::Qt::ISODate ) ); - PropertyItem::setValue( v ); -} - -void PropertyDateItem::setValue() -{ - setText( 1, lined()->date().toString( ::Qt::ISODate ) ); - TQVariant v; - v = lined()->date(); - PropertyItem::setValue( v ); - notifyValueChange(); -} - -// -------------------------------------------------------------- - -PropertyTimeItem::PropertyTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) - : PropertyItem( l, after, prop, propName ) -{ - lin = 0; -} - -TQTimeEdit *PropertyTimeItem::lined() -{ - if ( lin ) - return lin; - lin = new TQTimeEdit( listview->viewport() ); - connect( lin, TQT_SIGNAL( valueChanged( const TQTime & ) ), - this, TQT_SLOT( setValue() ) ); - TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); - for ( TQObject *o = l->first(); o; o = l->next() ) - o->installEventFilter( listview ); - delete l; - return lin; -} - -PropertyTimeItem::~PropertyTimeItem() -{ - delete (TQTimeEdit*)lin; - lin = 0; -} - -void PropertyTimeItem::showEditor() -{ - PropertyItem::showEditor(); - if ( !lin ) { - lined()->blockSignals( TRUE ); - lined()->setTime( value().toTime() ); - lined()->blockSignals( FALSE ); - } - placeEditor( lin ); - if ( !lin->isVisible() ) { - lin->show(); - setFocus( lin ); - } -} - -void PropertyTimeItem::hideEditor() -{ - PropertyItem::hideEditor(); - if ( lin ) - lin->hide(); -} - -void PropertyTimeItem::setValue( const TQVariant &v ) -{ - if ( ( !hasSubItems() || !isOpen() ) - && value() == v ) - return; - - if ( lin ) { - lined()->blockSignals( TRUE ); - if ( lined()->time() != v.toTime() ) - lined()->setTime( v.toTime() ); - lined()->blockSignals( FALSE ); - } - setText( 1, v.toTime().toString( ::Qt::ISODate ) ); - PropertyItem::setValue( v ); -} - -void PropertyTimeItem::setValue() -{ - setText( 1, lined()->time().toString( ::Qt::ISODate ) ); - TQVariant v; - v = lined()->time(); - PropertyItem::setValue( v ); - notifyValueChange(); -} - -// -------------------------------------------------------------- - -PropertyDateTimeItem::PropertyDateTimeItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) - : PropertyItem( l, after, prop, propName ) -{ - lin = 0; -} - -TQDateTimeEdit *PropertyDateTimeItem::lined() -{ - if ( lin ) - return lin; - lin = new TQDateTimeEdit( listview->viewport() ); - connect( lin, TQT_SIGNAL( valueChanged( const TQDateTime & ) ), - this, TQT_SLOT( setValue() ) ); - TQObjectList *l = lin->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); - for ( TQObject *o = l->first(); o; o = l->next() ) - o->installEventFilter( listview ); - delete l; - return lin; -} - -PropertyDateTimeItem::~PropertyDateTimeItem() -{ - delete (TQDateTimeEdit*)lin; - lin = 0; -} - -void PropertyDateTimeItem::showEditor() -{ - PropertyItem::showEditor(); - if ( !lin ) { - lined()->blockSignals( TRUE ); - lined()->setDateTime( value().toDateTime() ); - lined()->blockSignals( FALSE ); - } - placeEditor( lin ); - if ( !lin->isVisible() ) { - lin->show(); - setFocus( lin ); - } -} - -void PropertyDateTimeItem::hideEditor() -{ - PropertyItem::hideEditor(); - if ( lin ) - lin->hide(); -} - -void PropertyDateTimeItem::setValue( const TQVariant &v ) -{ - if ( ( !hasSubItems() || !isOpen() ) - && value() == v ) - return; - - if ( lin ) { - lined()->blockSignals( TRUE ); - if ( lined()->dateTime() != v.toDateTime() ) - lined()->setDateTime( v.toDateTime() ); - lined()->blockSignals( FALSE ); - } - setText( 1, v.toDateTime().toString( ::Qt::ISODate ) ); - PropertyItem::setValue( v ); -} - -void PropertyDateTimeItem::setValue() -{ - setText( 1, lined()->dateTime().toString( ::Qt::ISODate ) ); - TQVariant v; - v = lined()->dateTime(); - PropertyItem::setValue( v ); - notifyValueChange(); -} - -// -------------------------------------------------------------- - -PropertyBoolItem::PropertyBoolItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) - : PropertyItem( l, after, prop, propName ) -{ - comb = 0; -} - -TQComboBox *PropertyBoolItem::combo() -{ - if ( comb ) - return comb; - comb = new TQComboBox( FALSE, listview->viewport() ); - comb->hide(); - comb->insertItem( i18n( "False" ) ); - comb->insertItem( i18n( "True" ) ); - connect( comb, TQT_SIGNAL( activated( int ) ), - this, TQT_SLOT( setValue() ) ); - comb->installEventFilter( listview ); - return comb; -} - -PropertyBoolItem::~PropertyBoolItem() -{ - delete (TQComboBox*)comb; - comb = 0; -} - -void PropertyBoolItem::toggle() -{ - bool b = value().toBool(); - setValue( TQVariant( !b, 0 ) ); - setValue(); -} - -void PropertyBoolItem::showEditor() -{ - PropertyItem::showEditor(); - if ( !comb ) { - combo()->blockSignals( TRUE ); - if ( value().toBool() ) - combo()->setCurrentItem( 1 ); - else - combo()->setCurrentItem( 0 ); - combo()->blockSignals( FALSE ); - } - placeEditor( combo() ); - if ( !combo()->isVisible() || !combo()->hasFocus() ) { - combo()->show(); - setFocus( combo() ); - } -} - -void PropertyBoolItem::hideEditor() -{ - PropertyItem::hideEditor(); - combo()->hide(); -} - -void PropertyBoolItem::setValue( const TQVariant &v ) -{ - if ( ( !hasSubItems() || !isOpen() ) - && value() == v ) - return; - - if ( comb ) { - combo()->blockSignals( TRUE ); - if ( v.toBool() ) - combo()->setCurrentItem( 1 ); - else - combo()->setCurrentItem( 0 ); - combo()->blockSignals( FALSE ); - } - TQString tmp = i18n( "True" ); - if ( !v.toBool() ) - tmp = i18n( "False" ); - setText( 1, tmp ); - PropertyItem::setValue( v ); -} - -void PropertyBoolItem::setValue() -{ - if ( !comb ) - return; - setText( 1, combo()->currentText() ); - bool b = combo()->currentItem() == 0 ? (bool)FALSE : (bool)TRUE; - PropertyItem::setValue( TQVariant( b, 0 ) ); - notifyValueChange(); -} - -// -------------------------------------------------------------- - -PropertyIntItem::PropertyIntItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName, bool s ) - : PropertyItem( l, after, prop, propName ), signedValue( s ) -{ - spinBx = 0; -} - -TQSpinBox *PropertyIntItem::spinBox() -{ - if ( spinBx ) - return spinBx; - if ( signedValue ) - spinBx = new TQSpinBox( -INT_MAX, INT_MAX, 1, listview->viewport() ); - else - spinBx = new TQSpinBox( 0, INT_MAX, 1, listview->viewport() ); - spinBx->hide(); - spinBx->installEventFilter( listview ); - TQObjectList *ol = spinBx->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); - if ( ol && ol->first() ) - ol->first()->installEventFilter( listview ); - delete ol; - connect( spinBx, TQT_SIGNAL( valueChanged( int ) ), - this, TQT_SLOT( setValue() ) ); - return spinBx; -} - -PropertyIntItem::~PropertyIntItem() -{ - delete (TQSpinBox*)spinBx; - spinBx = 0; -} - -void PropertyIntItem::showEditor() -{ - PropertyItem::showEditor(); - if ( !spinBx ) { - spinBox()->blockSignals( TRUE ); - if ( signedValue ) - spinBox()->setValue( value().toInt() ); - else - spinBox()->setValue( value().toUInt() ); - spinBox()->blockSignals( FALSE ); - } - placeEditor( spinBox() ); - if ( !spinBox()->isVisible() || !spinBox()->hasFocus() ) { - spinBox()->show(); - setFocus( spinBox() ); - } -} - -void PropertyIntItem::hideEditor() -{ - PropertyItem::hideEditor(); - spinBox()->hide(); -} - -void PropertyIntItem::setValue( const TQVariant &v ) -{ - if ( ( !hasSubItems() || !isOpen() ) - && value() == v ) - return; - - if ( spinBx ) { - spinBox()->blockSignals( TRUE ); - if ( signedValue ) - spinBox()->setValue( v.toInt() ); - else - spinBox()->setValue( v.toUInt() ); - spinBox()->blockSignals( FALSE ); - } - - if ( signedValue ) - setText( 1, TQString::number( v.toInt() ) ); - else - setText( 1, TQString::number( v.toUInt() ) ); - PropertyItem::setValue( v ); -} - -void PropertyIntItem::setValue() -{ - if ( !spinBx ) - return; - setText( 1, TQString::number( spinBox()->value() ) ); - if ( signedValue ) - PropertyItem::setValue( spinBox()->value() ); - else - PropertyItem::setValue( (uint)spinBox()->value() ); - notifyValueChange(); -} - -// -------------------------------------------------------------- - -PropertyLayoutItem::PropertyLayoutItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName ) - : PropertyItem( l, after, prop, propName ) -{ - spinBx = 0; -} - -PropertyLayoutItem::~PropertyLayoutItem() -{ - delete (TQSpinBox*)spinBx; - spinBx = 0; -} - -TQSpinBox* PropertyLayoutItem::spinBox() -{ - if ( spinBx ) - return spinBx; - spinBx = new TQSpinBox( -1, INT_MAX, 1, listview->viewport() ); - spinBx->setSpecialValueText( i18n( "default" ) ); - spinBx->hide(); - spinBx->installEventFilter( listview ); - TQObjectList *ol = spinBx->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); - if ( ol && ol->first() ) - ol->first()->installEventFilter( listview ); - delete ol; - connect( spinBx, TQT_SIGNAL( valueChanged( int ) ), - this, TQT_SLOT( setValue() ) ); - return spinBx; -} - -void PropertyLayoutItem::showEditor() -{ - PropertyItem::showEditor(); - if ( !spinBx ) { - spinBox()->blockSignals( TRUE ); - spinBox()->setValue( value().toInt() ); - spinBox()->blockSignals( TRUE ); - } - placeEditor( spinBox() ); - if ( !spinBox()->isVisible() || !spinBox()->hasFocus() ) { - spinBox()->show(); - setFocus( spinBox() ); - } -} - -void PropertyLayoutItem::hideEditor() -{ - PropertyItem::hideEditor(); - spinBox()->hide(); -} - -void PropertyLayoutItem::setValue( const TQVariant &v ) -{ - if ( spinBx ) { - spinBox()->blockSignals( TRUE ); - spinBox()->setValue( v.toInt() ); - spinBox()->blockSignals( FALSE ); - } - TQString s = v.toString(); - if ( v.toInt() == -1 ) - s = spinBox()->specialValueText(); - setText( 1, s ); - PropertyItem::setValue( v ); -} - -void PropertyLayoutItem::setValue() -{ - if ( !spinBx ) - return; - PropertyItem::setValue( spinBox()->value() ); - notifyValueChange(); -} - - -// -------------------------------------------------------------- - -PropertyListItem::PropertyListItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName, bool e ) - : PropertyItem( l, after, prop, propName ), editable( e ) -{ - comb = 0; - oldInt = -1; -} - -TQComboBox *PropertyListItem::combo() -{ - if ( comb ) - return comb; - comb = new TQComboBox( editable, listview->viewport() ); - comb->hide(); - connect( comb, TQT_SIGNAL( activated( int ) ), - this, TQT_SLOT( setValue() ) ); - comb->installEventFilter( listview ); - if ( editable ) { - TQObjectList *ol = comb->queryList( TQLINEEDIT_OBJECT_NAME_STRING ); - if ( ol && ol->first() ) - ol->first()->installEventFilter( listview ); - delete ol; - } - return comb; -} - -PropertyListItem::~PropertyListItem() -{ - delete (TQComboBox*)comb; - comb = 0; -} - -void PropertyListItem::showEditor() -{ - PropertyItem::showEditor(); - if ( !comb ) { - combo()->blockSignals( TRUE ); - combo()->clear(); - combo()->insertStringList( value().toStringList() ); - combo()->blockSignals( FALSE ); - } - placeEditor( combo() ); - if ( !combo()->isVisible() || !combo()->hasFocus() ) { - combo()->show(); - setFocus( combo() ); - } -} - -void PropertyListItem::hideEditor() -{ - PropertyItem::hideEditor(); - combo()->hide(); -} - -void PropertyListItem::setValue( const TQVariant &v ) -{ - if ( comb ) { - combo()->blockSignals( TRUE ); - combo()->clear(); - combo()->insertStringList( v.toStringList() ); - combo()->blockSignals( FALSE ); - } - setText( 1, v.toStringList().first() ); - PropertyItem::setValue( v ); -} - -void PropertyListItem::setValue() -{ - if ( !comb ) - return; - setText( 1, combo()->currentText() ); - TQStringList lst; - for ( uint i = 0; i < combo()->listBox()->count(); ++i ) - lst << combo()->listBox()->item( i )->text(); - PropertyItem::setValue( lst ); - notifyValueChange(); - oldInt = currentIntItem(); - oldString = currentItem(); -} - -TQString PropertyListItem::currentItem() const -{ - return ( (PropertyListItem*)this )->combo()->currentText(); -} - -void PropertyListItem::setCurrentItem( const TQString &s ) -{ - if ( comb && currentItem().lower() == s.lower() ) - return; - - if ( !comb ) { - combo()->blockSignals( TRUE ); - combo()->clear(); - combo()->insertStringList( value().toStringList() ); - combo()->blockSignals( FALSE ); - } - for ( uint i = 0; i < combo()->listBox()->count(); ++i ) { - if ( combo()->listBox()->item( i )->text().lower() == s.lower() ) { - combo()->setCurrentItem( i ); - setText( 1, combo()->currentText() ); - break; - } - } - oldInt = currentIntItem(); - oldString = currentItem(); -} - -void PropertyListItem::addItem( const TQString &s ) -{ - combo()->insertItem( s ); -} - -void PropertyListItem::setCurrentItem( int i ) -{ - if ( comb && i == combo()->currentItem() ) - return; - - if ( !comb ) { - combo()->blockSignals( TRUE ); - combo()->clear(); - combo()->insertStringList( value().toStringList() ); - combo()->blockSignals( FALSE ); - } - combo()->setCurrentItem( i ); - setText( 1, combo()->currentText() ); - oldInt = currentIntItem(); - oldString = currentItem(); -} - -int PropertyListItem::currentIntItem() const -{ - return ( (PropertyListItem*)this )->combo()->currentItem(); -} - -int PropertyListItem::currentIntItemFromObject() const -{ - return oldInt; -} - -TQString PropertyListItem::currentItemFromObject() const -{ - return oldString; -} - -// -------------------------------------------------------------- - -PropertyCoordItem::PropertyCoordItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName, Type t ) - : PropertyItem( l, after, prop, propName ), typ( t ) -{ - lin = 0; - -} - -TQLineEdit *PropertyCoordItem::lined() -{ - if ( lin ) - return lin; - lin = new TQLineEdit( listview->viewport() ); - lin->setReadOnly( TRUE ); - lin->installEventFilter( listview ); - lin->hide(); - return lin; -} - -void PropertyCoordItem::createChildren() -{ - PropertyItem *i = this; - if ( typ == Rect || typ == Point ) { - i = new PropertyIntItem( listview, i, this, i18n( "x" ), TRUE ); - addChild( i ); - i = new PropertyIntItem( listview, i, this, i18n( "y" ), TRUE ); - addChild( i ); - } - if ( typ == Rect || typ == Size ) { - i = new PropertyIntItem( listview, i, this, i18n( "width" ), TRUE ); - addChild( i ); - i = new PropertyIntItem( listview, i, this, i18n( "height" ), TRUE ); - addChild( i ); - } -} - -void PropertyCoordItem::initChildren() -{ - PropertyItem *item = 0; - for ( int i = 0; i < childCount(); ++i ) { - item = PropertyItem::child( i ); - if ( item->name() == i18n( "x" ) ) { - if ( typ == Rect ) - item->setValue( val.toRect().x() ); - else if ( typ == Point ) - item->setValue( val.toPoint().x() ); - } else if ( item->name() == i18n( "y" ) ) { - if ( typ == Rect ) - item->setValue( val.toRect().y() ); - else if ( typ == Point ) - item->setValue( val.toPoint().y() ); - } else if ( item->name() == i18n( "width" ) ) { - if ( typ == Rect ) - item->setValue( val.toRect().width() ); - else if ( typ == Size ) - item->setValue( val.toSize().width() ); - } else if ( item->name() == i18n( "height" ) ) { - if ( typ == Rect ) - item->setValue( val.toRect().height() ); - else if ( typ == Size ) - item->setValue( val.toSize().height() ); - } - } -} - -PropertyCoordItem::~PropertyCoordItem() -{ - delete (TQLineEdit*)lin; - lin = 0; -} - -void PropertyCoordItem::showEditor() -{ - PropertyItem::showEditor(); - if ( !lin ) - lined()->setText( text( 1 ) ); - placeEditor( lined() ); - if ( !lined()->isVisible() || !lined()->hasFocus() ) { - lined()->show(); - setFocus( lined() ); - } -} - -void PropertyCoordItem::hideEditor() -{ - PropertyItem::hideEditor(); - lined()->hide(); -} - -void PropertyCoordItem::setValue( const TQVariant &v ) -{ - if ( ( !hasSubItems() || !isOpen() ) - && value() == v ) - return; - - TQString s; - if ( typ == Rect ) - s = "[ " + TQString::number( v.toRect().x() ) + ", " + TQString::number( v.toRect().y() ) + ", " + - TQString::number( v.toRect().width() ) + ", " + TQString::number( v.toRect().height() ) + " ]"; - else if ( typ == Point ) - s = "[ " + TQString::number( v.toPoint().x() ) + ", " + - TQString::number( v.toPoint().y() ) + " ]"; - else if ( typ == Size ) - s = "[ " + TQString::number( v.toSize().width() ) + ", " + - TQString::number( v.toSize().height() ) + " ]"; - setText( 1, s ); - if ( lin ) - lined()->setText( s ); - PropertyItem::setValue( v ); -} - -bool PropertyCoordItem::hasSubItems() const -{ - return TRUE; -} - -void PropertyCoordItem::childValueChanged( PropertyItem *child ) -{ - if ( typ == Rect ) { - TQRect r = value().toRect(); - if ( child->name() == i18n( "x" ) ) - r.moveBy( -r.x() + child->value().toInt(), 0 ); - else if ( child->name() == i18n( "y" ) ) - r.moveBy( 0, -r.y() + child->value().toInt() ); - else if ( child->name() == i18n( "width" ) ) - r.setWidth( child->value().toInt() ); - else if ( child->name() == i18n( "height" ) ) - r.setHeight( child->value().toInt() ); - setValue( r ); - } else if ( typ == Point ) { - TQPoint r = value().toPoint(); - if ( child->name() == i18n( "x" ) ) - r.setX( child->value().toInt() ); - else if ( child->name() == i18n( "y" ) ) - r.setY( child->value().toInt() ); - setValue( r ); - } else if ( typ == Size ) { - TQSize r = value().toSize(); - if ( child->name() == i18n( "width" ) ) - r.setWidth( child->value().toInt() ); - else if ( child->name() == i18n( "height" ) ) - r.setHeight( child->value().toInt() ); - setValue( r ); - } - notifyValueChange(); -} - -// -------------------------------------------------------------- - -PropertyPixmapItem::PropertyPixmapItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName, Type t ) - : PropertyItem( l, after, prop, propName ), type( t ) -{ - box = new TQHBox( listview->viewport() ); - box->hide(); - pixPrev = new TQLabel( box ); - pixPrev->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Minimum ) ); - pixPrev->setBackgroundColor( pixPrev->colorGroup().color( TQColorGroup::Base ) ); - button = new TQPushButton( "...", box ); - setupStyle( button ); - button->setFixedWidth( 20 ); - box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); - box->setLineWidth( 2 ); - pixPrev->setFrameStyle( TQFrame::NoFrame ); - box->installEventFilter( listview ); - connect( button, TQT_SIGNAL( clicked() ), - this, TQT_SLOT( getPixmap() ) ); -} - -PropertyPixmapItem::~PropertyPixmapItem() -{ - delete (TQHBox*)box; -} - -void PropertyPixmapItem::showEditor() -{ - PropertyItem::showEditor(); - placeEditor( box ); - if ( !box->isVisible() ) { - box->show(); - listView()->viewport()->setFocus(); - } -} - -void PropertyPixmapItem::hideEditor() -{ - PropertyItem::hideEditor(); - box->hide(); -} - -void PropertyPixmapItem::setValue( const TQVariant &v ) -{ - TQString s; - if ( type == Pixmap ) - pixPrev->setPixmap( v.toPixmap() ); - else if ( type == IconSet ) - pixPrev->setPixmap( v.toIconSet().pixmap() ); - else - pixPrev->setPixmap( v.toImage() ); - PropertyItem::setValue( v ); - repaint(); -} - -void PropertyPixmapItem::getPixmap() -{ - TQPixmap pix = qChoosePixmap( listview, listview->propertyEditor()->formWindow(), value().toPixmap() ); - if ( !pix.isNull() ) { - if ( type == Pixmap ) - setValue( pix ); - else if ( type == IconSet ) - setValue( TQIconSet( pix ) ); - else - setValue( pix.convertToImage() ); - - notifyValueChange(); - } -} - -bool PropertyPixmapItem::hasCustomContents() const -{ - return TRUE; -} - -void PropertyPixmapItem::drawCustomContents( TQPainter *p, const TQRect &r ) -{ - TQPixmap pix; - if ( type == Pixmap ) - pix = value().toPixmap(); - else if ( type == IconSet ) - pix = value().toIconSet().pixmap(); - else - pix = value().toImage(); - - if ( !pix.isNull() ) { - p->save(); - p->setClipRect( TQRect( TQPoint( (int)(p->worldMatrix().dx() + r.x()), - (int)(p->worldMatrix().dy() + r.y()) ), - r.size() ) ); - p->drawPixmap( r.x(), r.y() + ( r.height() - pix.height() ) / 2, pix ); - p->restore(); - } -} - - -// -------------------------------------------------------------- - -PropertyColorItem::PropertyColorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName, bool children ) - : PropertyItem( l, after, prop, propName ), withChildren( children ) -{ - box = new TQHBox( listview->viewport() ); - box->hide(); - colorPrev = new TQFrame( box ); - button = new TQPushButton( "...", box ); - setupStyle( button ); - button->setFixedWidth( 20 ); - box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); - box->setLineWidth( 2 ); - colorPrev->setFrameStyle( TQFrame::Plain | TQFrame::Box ); - colorPrev->setLineWidth( 2 ); - TQPalette pal = colorPrev->palette(); - TQColorGroup cg = pal.active(); - cg.setColor( TQColorGroup::Foreground, cg.color( TQColorGroup::Base ) ); - pal.setActive( cg ); - pal.setInactive( cg ); - pal.setDisabled( cg ); - colorPrev->setPalette( pal ); - box->installEventFilter( listview ); - connect( button, TQT_SIGNAL( clicked() ), - this, TQT_SLOT( getColor() ) ); -} - -void PropertyColorItem::createChildren() -{ - PropertyItem *i = this; - i = new PropertyIntItem( listview, i, this, i18n( "Red" ), TRUE ); - addChild( i ); - i = new PropertyIntItem( listview, i, this, i18n( "Green" ), TRUE ); - addChild( i ); - i = new PropertyIntItem( listview, i, this, i18n( "Blue" ), TRUE ); - addChild( i ); -} - -void PropertyColorItem::initChildren() -{ - PropertyItem *item = 0; - for ( int i = 0; i < childCount(); ++i ) { - item = PropertyItem::child( i ); - if ( item->name() == i18n( "Red" ) ) - item->setValue( val.toColor().red() ); - else if ( item->name() == i18n( "Green" ) ) - item->setValue( val.toColor().green() ); - else if ( item->name() == i18n( "Blue" ) ) - item->setValue( val.toColor().blue() ); - } -} - -PropertyColorItem::~PropertyColorItem() -{ - delete (TQHBox*)box; -} - -void PropertyColorItem::showEditor() -{ - PropertyItem::showEditor(); - placeEditor( box ); - if ( !box->isVisible() ) { - box->show(); - listView()->viewport()->setFocus(); - } -} - -void PropertyColorItem::hideEditor() -{ - PropertyItem::hideEditor(); - box->hide(); -} - -void PropertyColorItem::setValue( const TQVariant &v ) -{ - if ( ( !hasSubItems() || !isOpen() ) - && value() == v ) - return; - - TQString s; - setText( 1, v.toColor().name() ); - colorPrev->setBackgroundColor( v.toColor() ); - PropertyItem::setValue( v ); -} - -bool PropertyColorItem::hasSubItems() const -{ - return withChildren; -} - -void PropertyColorItem::childValueChanged( PropertyItem *child ) -{ - TQColor c( val.toColor() ); - if ( child->name() == i18n( "Red" ) ) - c.setRgb( child->value().toInt(), c.green(), c.blue() ); - else if ( child->name() == i18n( "Green" ) ) - c.setRgb( c.red(), child->value().toInt(), c.blue() ); - else if ( child->name() == i18n( "Blue" ) ) - c.setRgb( c.red(), c.green(), child->value().toInt() ); - setValue( c ); - notifyValueChange(); -} - -void PropertyColorItem::getColor() -{ - TQColor c = TQColorDialog::getColor( val.asColor(), listview ); - if ( c.isValid() ) { - setValue( c ); - notifyValueChange(); - } -} - -bool PropertyColorItem::hasCustomContents() const -{ - return TRUE; -} - -void PropertyColorItem::drawCustomContents( TQPainter *p, const TQRect &r ) -{ - p->save(); - p->setPen( TQPen( black, 1 ) ); - p->setBrush( val.toColor() ); - p->drawRect( r.x() + 2, r.y() + 2, r.width() - 5, r.height() - 5 ); - p->restore(); -} - -// -------------------------------------------------------------- - -PropertyFontItem::PropertyFontItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, const TQString &propName ) - : PropertyItem( l, after, prop, propName ) -{ - box = new TQHBox( listview->viewport() ); - box->hide(); - lined = new TQLineEdit( box ); - button = new TQPushButton( "...", box ); - setupStyle( button ); - button->setFixedWidth( 20 ); - box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); - box->setLineWidth( 2 ); - lined->setFrame( FALSE ); - lined->setReadOnly( TRUE ); - box->setFocusProxy( lined ); - box->installEventFilter( listview ); - lined->installEventFilter( listview ); - button->installEventFilter( listview ); - connect( button, TQT_SIGNAL( clicked() ), - this, TQT_SLOT( getFont() ) ); -} - -void PropertyFontItem::createChildren() -{ - PropertyItem *i = this; - i = new PropertyListItem( listview, i, this, i18n( "Family" ), FALSE ); - addChild( i ); - i = new PropertyIntItem( listview, i, this, i18n( "Point Size" ), TRUE ); - addChild( i ); - i = new PropertyBoolItem( listview, i, this, i18n( "Bold" ) ); - addChild( i ); - i = new PropertyBoolItem( listview, i, this, i18n( "Italic" ) ); - addChild( i ); - i = new PropertyBoolItem( listview, i, this, i18n( "Underline" ) ); - addChild( i ); - i = new PropertyBoolItem( listview, i, this, i18n( "Strikeout" ) ); - addChild( i ); -} - -void PropertyFontItem::initChildren() -{ - PropertyItem *item = 0; - for ( int i = 0; i < childCount(); ++i ) { - item = PropertyItem::child( i ); - if ( item->name() == i18n( "Family" ) ) { - ( (PropertyListItem*)item )->setValue( getFontList() ); - ( (PropertyListItem*)item )->setCurrentItem( val.toFont().family() ); - } else if ( item->name() == i18n( "Point Size" ) ) - item->setValue( val.toFont().pointSize() ); - else if ( item->name() == i18n( "Bold" ) ) - item->setValue( TQVariant( val.toFont().bold(), 0 ) ); - else if ( item->name() == i18n( "Italic" ) ) - item->setValue( TQVariant( val.toFont().italic(), 0 ) ); - else if ( item->name() == i18n( "Underline" ) ) - item->setValue( TQVariant( val.toFont().underline(), 0 ) ); - else if ( item->name() == i18n( "Strikeout" ) ) - item->setValue( TQVariant( val.toFont().strikeOut(), 0 ) ); - } -} - -PropertyFontItem::~PropertyFontItem() -{ - delete (TQHBox*)box; -} - -void PropertyFontItem::showEditor() -{ - PropertyItem::showEditor(); - placeEditor( box ); - if ( !box->isVisible() || !lined->hasFocus() ) { - box->show(); - setFocus( lined ); - } -} - -void PropertyFontItem::hideEditor() -{ - PropertyItem::hideEditor(); - box->hide(); -} - -void PropertyFontItem::setValue( const TQVariant &v ) -{ - if ( value() == v ) - return; - - setText( 1, v.toFont().family() + "-" + TQString::number( v.toFont().pointSize() ) ); - lined->setText( v.toFont().family() + "-" + TQString::number( v.toFont().pointSize() ) ); - PropertyItem::setValue( v ); -} - -void PropertyFontItem::getFont() -{ - bool ok = FALSE; - TQFont f = TQFontDialog::getFont( &ok, val.toFont(), listview ); - if ( ok && f != val.toFont() ) { - setValue( f ); - notifyValueChange(); - } -} - -bool PropertyFontItem::hasSubItems() const -{ - return TRUE; -} - -void PropertyFontItem::childValueChanged( PropertyItem *child ) -{ - TQFont f = val.toFont(); - if ( child->name() == i18n( "Family" ) ) - f.setFamily( ( (PropertyListItem*)child )->currentItem() ); - else if ( child->name() == i18n( "Point Size" ) ) - f.setPointSize( child->value().toInt() ); - else if ( child->name() == i18n( "Bold" ) ) - f.setBold( child->value().toBool() ); - else if ( child->name() == i18n( "Italic" ) ) - f.setItalic( child->value().toBool() ); - else if ( child->name() == i18n( "Underline" ) ) - f.setUnderline( child->value().toBool() ); - else if ( child->name() == i18n( "Strikeout" ) ) - f.setStrikeOut( child->value().toBool() ); - setValue( f ); - notifyValueChange(); -} - -// -------------------------------------------------------------- - -PropertyDatabaseItem::PropertyDatabaseItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName, bool wField ) - : PropertyItem( l, after, prop, propName ), withField( wField ) -{ - box = new TQHBox( listview->viewport() ); - box->hide(); - lined = new TQLineEdit( box ); - button = new TQPushButton( "...", box ); - setupStyle( button ); - button->setFixedWidth( 20 ); - box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); - box->setLineWidth( 2 ); - lined->setFrame( FALSE ); - lined->setReadOnly( TRUE ); - box->setFocusProxy( lined ); - box->installEventFilter( listview ); - lined->installEventFilter( listview ); - button->installEventFilter( listview ); -} - -void PropertyDatabaseItem::createChildren() -{ - PropertyItem *i = this; - i = new PropertyListItem( listview, i, this, i18n( "Connection" ), TRUE ); - addChild( i ); - i = new PropertyListItem( listview, i, this, i18n( "Table" ), TRUE ); - addChild( i ); - if ( withField ) { - i = new PropertyListItem( listview, i, this, i18n( "Field" ), TRUE ); - addChild( i ); - } -} - -void PropertyDatabaseItem::initChildren() -{ -#ifndef TQT_NO_SQL - PropertyItem *item = 0; - TQStringList lst = value().toStringList(); - TQString conn, table; - for ( int i = 0; i < childCount(); ++i ) { - item = PropertyItem::child( i ); - if ( item->name() == i18n( "Connection" ) ) { - TQStringList cl = listview->propertyEditor()->formWindow()->project()->databaseConnectionList(); - if ( !cl.isEmpty() ) - item->setValue( cl ); - else if ( lst.count() > 0 ) - item->setValue( TQStringList( lst[ 0 ] ) ); - else if ( withField ) - item->setValue( TQStringList( MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()), - "database" ).toStringList()[ 0 ] ) ); - - if ( lst.count() > 0 && !lst[ 0 ].isEmpty() ) - item->setCurrentItem( lst[ 0 ] ); - else if ( !isChanged() && withField ) - item->setCurrentItem( MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()), - "database" ).toStringList()[ 0 ] ); - else - item->setCurrentItem( 0 ); - conn = item->currentItem(); - } else if ( item->name() == i18n( "Table" ) ) { - TQStringList cl = listview->propertyEditor()->formWindow()->project()->databaseTableList( conn ); - if ( !cl.isEmpty() ) - item->setValue( cl ); - else if ( lst.count() > 1 ) - item->setValue( TQStringList( lst[ 1 ] ) ); - else if ( withField ) { - TQStringList fakeLst = MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()), "database" ).toStringList(); - if ( fakeLst.count() > 1 ) - item->setValue( fakeLst[ 1 ] ); - } - - if ( lst.count() > 1 && !lst[ 1 ].isEmpty() ) - item->setCurrentItem( lst[ 1 ] ); - else if ( !isChanged() && withField ) { - TQStringList fakeLst = MetaDataBase::fakeProperty( TQT_TQOBJECT(listview->propertyEditor()->formWindow()->mainContainer()), "database" ).toStringList(); - if ( fakeLst.count() > 1 ) - item->setCurrentItem( fakeLst[ 1 ] ); - else - item->setCurrentItem( 0 ); - } else - item->setCurrentItem( 0 ); - table = item->currentItem(); - } else if ( item->name() == i18n( "Field" ) ) { - TQStringList cl = listview->propertyEditor()->formWindow()->project()->databaseFieldList( conn, table ); - if ( !cl.isEmpty() ) - item->setValue( cl ); - else if ( lst.count() > 2 ) - item->setValue( TQStringList( lst[ 2 ] ) ); - if ( lst.count() > 2 && !lst[ 2 ].isEmpty() ) - item->setCurrentItem( lst[ 2 ] ); - else - item->setCurrentItem( 0 ); - } - } -#endif -} - -PropertyDatabaseItem::~PropertyDatabaseItem() -{ - delete (TQHBox*)box; -} - -void PropertyDatabaseItem::showEditor() -{ - PropertyItem::showEditor(); - placeEditor( box ); - if ( !box->isVisible() || !lined->hasFocus() ) { - box->show(); - setFocus( lined ); - } -} - -void PropertyDatabaseItem::hideEditor() -{ - PropertyItem::hideEditor(); - box->hide(); -} - -void PropertyDatabaseItem::setValue( const TQVariant &v ) -{ - if ( value() == v ) - return; - - TQStringList lst = v.toStringList(); - TQString s = lst.join( "." ); - setText( 1, s ); - lined->setText( s ); - PropertyItem::setValue( v ); -} - -bool PropertyDatabaseItem::hasSubItems() const -{ - return TRUE; -} - -void PropertyDatabaseItem::childValueChanged( PropertyItem *c ) -{ -#ifndef TQT_NO_SQL - TQStringList lst; - lst << ( (PropertyListItem*)PropertyItem::child( 0 ) )->currentItem() - << ( (PropertyListItem*)PropertyItem::child( 1 ) )->currentItem(); - if ( withField ) - lst << ( (PropertyListItem*)PropertyItem::child( 2 ) )->currentItem(); - if ( c == PropertyItem::child( 0 ) ) { // if the connection changed - lst[ 0 ] = ( (PropertyListItem*)c )->currentItem(); - PropertyItem::child( 1 )->setValue( listview->propertyEditor()->formWindow()->project()->databaseTableList( lst[ 0 ] ) ); - if ( withField ) - PropertyItem::child( 2 )->setValue( listview->propertyEditor()->formWindow()->project()->databaseFieldList( lst[ 0 ], lst[ 1 ] ) ); - } else if ( withField && c == PropertyItem::child( 1 ) ) { // if the table changed - lst[ 1 ] = ( (PropertyListItem*)c )->currentItem(); - if ( withField ) - PropertyItem::child( 2 )->setValue( listview->propertyEditor()->formWindow()->project()->databaseFieldList( lst[ 0 ], lst[ 1 ] ) ); - } - lst.clear(); - lst << ( (PropertyListItem*)PropertyItem::child( 0 ) )->currentItem() - << ( (PropertyListItem*)PropertyItem::child( 1 ) )->currentItem(); - if ( withField ) - lst << ( (PropertyListItem*)PropertyItem::child( 2 ) )->currentItem(); - setValue( lst ); - notifyValueChange(); -#else - Q_UNUSED( c ); -#endif -} - -// -------------------------------------------------------------- - -PropertySizePolicyItem::PropertySizePolicyItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName ) - : PropertyItem( l, after, prop, propName ) -{ - lin = 0; -} - -TQLineEdit *PropertySizePolicyItem::lined() -{ - if ( lin ) - return lin; - lin = new TQLineEdit( listview->viewport() ); - lin->hide(); - lin->setReadOnly( TRUE ); - return lin; -} - -void PropertySizePolicyItem::createChildren() -{ - TQStringList lst; - lst << "Fixed" << "Minimum" << "Maximum" << "Preferred" << "MinimumExpanding" << "Expanding" << "Ignored"; - - PropertyItem *i = this; - i = new PropertyListItem( listview, i, this, i18n( "hSizeType" ), FALSE ); - i->setValue( lst ); - addChild( i ); - i = new PropertyListItem( listview, i, this, i18n( "vSizeType" ), FALSE ); - i->setValue( lst ); - addChild( i ); - i = new PropertyIntItem( listview, i, this, i18n( "horizontalStretch" ), TRUE ); - addChild( i ); - i = new PropertyIntItem( listview, i, this, i18n( "verticalStretch" ), TRUE ); - addChild( i ); -} - -void PropertySizePolicyItem::initChildren() -{ - PropertyItem *item = 0; - TQSizePolicy sp = val.toSizePolicy(); - for ( int i = 0; i < childCount(); ++i ) { - item = PropertyItem::child( i ); - if ( item->name() == i18n( "hSizeType" ) ) - ( (PropertyListItem*)item )->setCurrentItem( size_type_to_int( sp.horData() ) ); - else if ( item->name() == i18n( "vSizeType" ) ) - ( (PropertyListItem*)item )->setCurrentItem( size_type_to_int( sp.verData() ) ); - else if ( item->name() == i18n( "horizontalStretch" ) ) - ( (PropertyIntItem*)item )->setValue( sp.horStretch() ); - else if ( item->name() == i18n( "verticalStretch" ) ) - ( (PropertyIntItem*)item )->setValue( sp.verStretch() ); - } -} - -PropertySizePolicyItem::~PropertySizePolicyItem() -{ - delete (TQLineEdit*)lin; -} - -void PropertySizePolicyItem::showEditor() -{ - PropertyItem::showEditor(); - placeEditor( lined() ); - if ( !lined()->isVisible() || !lined()->hasFocus() ) { - lined()->show(); - listView()->viewport()->setFocus(); - } -} - -void PropertySizePolicyItem::hideEditor() -{ - PropertyItem::hideEditor(); - lined()->hide(); -} - -void PropertySizePolicyItem::setValue( const TQVariant &v ) -{ - if ( value() == v ) - return; - - TQString s = i18n( "%1/%2/%3/%4" ); - s = s.arg( size_type_to_string( v.toSizePolicy().horData() ) ). - arg( size_type_to_string( v.toSizePolicy().verData() ) ). - arg( v.toSizePolicy().horStretch() ). - arg( v.toSizePolicy().verStretch() ); - setText( 1, s ); - lined()->setText( s ); - PropertyItem::setValue( v ); -} - -void PropertySizePolicyItem::childValueChanged( PropertyItem *child ) -{ - TQSizePolicy sp = val.toSizePolicy(); - if ( child->name() == i18n( "hSizeType" ) ) - sp.setHorData( int_to_size_type( ( ( PropertyListItem*)child )->currentIntItem() ) ); - else if ( child->name() == i18n( "vSizeType" ) ) - sp.setVerData( int_to_size_type( ( ( PropertyListItem*)child )->currentIntItem() ) ); - else if ( child->name() == i18n( "horizontalStretch" ) ) - sp.setHorStretch( ( ( PropertyIntItem*)child )->value().toInt() ); - else if ( child->name() == i18n( "verticalStretch" ) ) - sp.setVerStretch( ( ( PropertyIntItem*)child )->value().toInt() ); - setValue( sp ); - notifyValueChange(); -} - -bool PropertySizePolicyItem::hasSubItems() const -{ - return TRUE; -} - -// -------------------------------------------------------------- - -PropertyPaletteItem::PropertyPaletteItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName ) - : PropertyItem( l, after, prop, propName ) -{ - box = new TQHBox( listview->viewport() ); - box->hide(); - palettePrev = new TQLabel( box ); - button = new TQPushButton( "...", box ); - setupStyle( button ); - button->setFixedWidth( 20 ); - box->setFrameStyle( TQFrame::StyledPanel | TQFrame::Sunken ); - box->setLineWidth( 2 ); - palettePrev->setFrameStyle( TQFrame::NoFrame ); - box->installEventFilter( listview ); - connect( button, TQT_SIGNAL( clicked() ), - this, TQT_SLOT( getPalette() ) ); -} -PropertyPaletteItem::~PropertyPaletteItem() -{ - delete (TQHBox*)box; -} - -void PropertyPaletteItem::showEditor() -{ - PropertyItem::showEditor(); - placeEditor( box ); - if ( !box->isVisible() ) { - box->show(); - listView()->viewport()->setFocus(); - } -} - -void PropertyPaletteItem::hideEditor() -{ - PropertyItem::hideEditor(); - box->hide(); -} - -void PropertyPaletteItem::setValue( const TQVariant &v ) -{ - TQString s; - palettePrev->setPalette( v.toPalette() ); - PropertyItem::setValue( v ); - repaint(); -} - -void PropertyPaletteItem::getPalette() -{ - if ( !listview->propertyEditor()->widget()->isWidgetType() ) - return; - bool ok = FALSE; - TQWidget *w = (TQWidget*)listview->propertyEditor()->widget(); - if ( ::tqqt_cast(w) ) - w = ( (TQScrollView*)w )->viewport(); - TQPalette pal = PaletteEditor::getPalette( &ok, val.toPalette(), -#if defined(TQT_NON_COMMERCIAL) - w->backgroundMode(), listview->topLevelWidget(), -#else - w->backgroundMode(), listview, -#endif - "choose_palette", listview->propertyEditor()->formWindow() ); - if ( !ok ) - return; - setValue( pal ); - notifyValueChange(); -} - -bool PropertyPaletteItem::hasCustomContents() const -{ - return TRUE; -} - -void PropertyPaletteItem::drawCustomContents( TQPainter *p, const TQRect &r ) -{ - TQPalette pal( value().toPalette() ); - p->save(); - p->setClipRect( TQRect( TQPoint( (int)(p->worldMatrix().dx() + r.x()), - (int)(p->worldMatrix().dy() + r.y()) ), - r.size() ) ); - TQRect r2( r ); - r2.setX( r2.x() + 2 ); - r2.setY( r2.y() + 2 ); - r2.setWidth( r2.width() - 3 ); - r2.setHeight( r2.height() - 3 ); - p->setPen( TQPen( black, 1 ) ); - p->setBrush( pal.active().background() ); - p->drawRect( r2 ); - p->restore(); -} - -// -------------------------------------------------------------- - -PropertyCursorItem::PropertyCursorItem( PropertyList *l, PropertyItem *after, PropertyItem *prop, - const TQString &propName ) - : PropertyItem( l, after, prop, propName ) -{ - comb = 0; -} - -TQComboBox *PropertyCursorItem::combo() -{ - if ( comb ) - return comb; - comb = new TQComboBox( FALSE, listview->viewport() ); - comb->hide(); - TQBitmap cur; - - const TQPixmap ArrowPix = SmallIcon( "designer_arrow.png" , TDevDesignerPartFactory::instance()); - const TQPixmap UpArrowPix = SmallIcon( "designer_uparrow.png" , TDevDesignerPartFactory::instance()); - const TQPixmap CrossPix = SmallIcon( "designer_cross.png" , TDevDesignerPartFactory::instance()); - const TQPixmap WaitPix = SmallIcon( "designer_wait.png" , TDevDesignerPartFactory::instance()); - const TQPixmap IBeamPix = SmallIcon( "designer_ibeam.png" , TDevDesignerPartFactory::instance()); - const TQPixmap SizeVPix = SmallIcon( "designer_sizev.png" , TDevDesignerPartFactory::instance()); - const TQPixmap SizeHPix = SmallIcon( "designer_sizeh.png" , TDevDesignerPartFactory::instance()); - const TQPixmap SizeFPix = SmallIcon( "designer_sizef.png" , TDevDesignerPartFactory::instance()); - const TQPixmap SizeBPix = SmallIcon( "designer_sizeb.png" , TDevDesignerPartFactory::instance()); - const TQPixmap SizeAllPix = SmallIcon( "designer_sizeall.png" , TDevDesignerPartFactory::instance()); - const TQPixmap VSplitPix = SmallIcon( "designer_vsplit.png" , TDevDesignerPartFactory::instance()); - const TQPixmap HSplitPix = SmallIcon( "designer_hsplit.png" , TDevDesignerPartFactory::instance()); - const TQPixmap HandPix = SmallIcon( "designer_hand.png" , TDevDesignerPartFactory::instance()); - const TQPixmap NoPix = SmallIcon( "designer_no.png" , TDevDesignerPartFactory::instance()); - - comb->insertItem( ArrowPix, i18n("Arrow"), TQObject::ArrowCursor); - comb->insertItem( UpArrowPix, i18n("Up-Arrow"), TQObject::UpArrowCursor ); - comb->insertItem( CrossPix, i18n("Cross"), TQObject::CrossCursor ); - comb->insertItem( WaitPix, i18n("Waiting"), TQObject::WaitCursor ); - comb->insertItem( IBeamPix, i18n("iBeam"), TQObject::IbeamCursor ); - comb->insertItem( SizeVPix, i18n("SizeQt::Vertical"), TQObject::SizeVerCursor ); - comb->insertItem( SizeHPix, i18n("SizeQt::Horizontal"), TQObject::SizeHorCursor ); - comb->insertItem( SizeFPix, i18n("Size Slash"), TQObject::SizeBDiagCursor ); - comb->insertItem( SizeBPix, i18n("Size Backslash"), TQObject::SizeFDiagCursor ); - comb->insertItem( SizeAllPix, i18n("Size All"), TQObject::SizeAllCursor ); - cur = TQBitmap( 25, 25, 1 ); - cur.setMask( cur ); - comb->insertItem( cur, i18n("Blank"), TQObject::BlankCursor ); - comb->insertItem( VSplitPix, i18n("SplitQt::Vertical"), TQObject::SplitVCursor ); - comb->insertItem( HSplitPix, i18n("SplitQt::Horizontal"), TQObject::SplitHCursor ); - comb->insertItem( HandPix, i18n("Pointing Hand"), TQObject::PointingHandCursor ); - comb->insertItem( NoPix, i18n("Forbidden"), TQObject::ForbiddenCursor ); - - connect( comb, TQT_SIGNAL( activated( int ) ), - this, TQT_SLOT( setValue() ) ); - comb->installEventFilter( listview ); - return comb; -} - -PropertyCursorItem::~PropertyCursorItem() -{ - delete (TQComboBox*)comb; -} - -void PropertyCursorItem::showEditor() -{ - PropertyItem::showEditor(); - if ( !comb ) { - combo()->blockSignals( TRUE ); - combo()->setCurrentItem( (int)value().toCursor().shape() ); - combo()->blockSignals( FALSE ); - } - placeEditor( combo() ); - if ( !combo()->isVisible() || !combo()->hasFocus() ) { - combo()->show(); - setFocus( combo() ); - } -} - -void PropertyCursorItem::hideEditor() -{ - PropertyItem::hideEditor(); - combo()->hide(); -} - -void PropertyCursorItem::setValue( const TQVariant &v ) -{ - if ( ( !hasSubItems() || !isOpen() ) - && value() == v ) - return; - - combo()->blockSignals( TRUE ); - combo()->setCurrentItem( (int)v.toCursor().shape() ); - combo()->blockSignals( FALSE ); - setText( 1, combo()->currentText() ); - PropertyItem::setValue( v ); -} - -void PropertyCursorItem::setValue() -{ - if ( !comb ) - return; - if ( TQVariant( TQCursor( combo()->currentItem() ) ) == val ) - return; - setText( 1, combo()->currentText() ); - PropertyItem::setValue( TQCursor( combo()->currentItem() ) ); - notifyValueChange(); -} - -// -------------------------------------------------------------- - -PropertyKeysequenceItem::PropertyKeysequenceItem( PropertyList *l, - PropertyItem *after, - PropertyItem *prop, - const TQString &propName ) - : PropertyItem( l, after, prop, propName ), - k1( 0 ), k2( 0 ), k3( 0 ), k4( 0 ), num( 0 ), mouseEnter( FALSE ) -{ - box = new TQHBox( listview->viewport() ); - box->hide(); - sequence = new TQLineEdit( box ); - connect( sequence, TQT_SIGNAL(textChanged( const TQString & )), - this, TQT_SLOT(setValue()) ); - sequence->installEventFilter( this ); -} - -PropertyKeysequenceItem::~PropertyKeysequenceItem() -{ - delete (TQHBox*)box; -} - -void PropertyKeysequenceItem::showEditor() -{ - PropertyItem::showEditor(); - placeEditor( box ); - if ( !box->isVisible() ) { - box->show(); - sequence->setFocus(); - } -} - -void PropertyKeysequenceItem::hideEditor() -{ - PropertyItem::hideEditor(); - box->hide(); -} - -bool PropertyKeysequenceItem::eventFilter( TQObject *o, TQEvent *e ) -{ - Q_UNUSED( o ); - if ( e->type() == TQEvent::KeyPress ) { - TQKeyEvent *k = (TQKeyEvent *)e; - if ( !mouseEnter && - (k->key() == TQObject::Key_Up || - k->key() == TQObject::Key_Down) ) - return FALSE; - handleKeyEvent( k ); - return TRUE; - } else if ( (e->type() == TQEvent::FocusIn) || - (e->type() == TQEvent::MouseButtonPress) ) { - mouseEnter = ( listview->lastEvent() == PropertyList::MouseEvent ) || - (e->type() == TQEvent::MouseButtonPress); - return TRUE; - } - - // Lets eat accelerators now.. - if ( e->type() == TQEvent::Accel || - e->type() == TQEvent::AccelOverride || - e->type() == TQEvent::KeyRelease ) - return TRUE; - return FALSE; -} - -void PropertyKeysequenceItem::handleKeyEvent( TQKeyEvent *e ) -{ - int nextKey = e->key(); - - if ( num > 3 || - nextKey == TQObject::Key_Control || - nextKey == TQObject::Key_Shift || - nextKey == TQObject::Key_Meta || - nextKey == TQObject::Key_Alt ) - return; - - nextKey |= translateModifiers( e->state() ); - switch( num ) { - case 0: - k1 = nextKey; - break; - case 1: - k2 = nextKey; - break; - case 2: - k3 = nextKey; - break; - case 3: - k4 = nextKey; - break; - default: - break; - } - num++; - TQKeySequence ks( k1, k2, k3, k4 ); - sequence->setText( ks ); -} - -int PropertyKeysequenceItem::translateModifiers( int state ) -{ - int result = 0; - if ( state & TQObject::ShiftButton ) - result |= TQObject::SHIFT; - if ( state & TQObject::ControlButton ) - result |= TQObject::CTRL; - if ( state & TQObject::MetaButton ) - result |= TQObject::META; - if ( state & TQObject::AltButton ) - result |= TQObject::ALT; - return result; -} - -void PropertyKeysequenceItem::setValue() -{ - TQVariant v; - v = TQVariant( TQKeySequence(sequence->text()) ); - if ( v.toString().isNull() ) - return; - setText( 1, sequence->text() ); - PropertyItem::setValue( v ); - if ( sequence->hasFocus() ) - notifyValueChange(); - setChanged( TRUE ); -} - -void PropertyKeysequenceItem::setValue( const TQVariant &v ) -{ - TQKeySequence ks = v.toKeySequence(); - if ( sequence ) { - sequence->setText( ks ); - } - num = ks.count(); - k1 = ks[0]; - k2 = ks[1]; - k3 = ks[2]; - k4 = ks[3]; - setText( 1, ks ); - PropertyItem::setValue( v ); -} - -// -------------------------------------------------------------- - -EnumPopup::EnumPopup( TQWidget *parent, const char *name, WFlags f ) - : TQFrame( parent, name, f ) -{ - setLineWidth( 1 ); - setFrameStyle( Panel | Plain ); - setPaletteBackgroundColor( TQt::white ); - popLayout = new TQVBoxLayout( this, 3 ); - checkBoxList.setAutoDelete( TRUE ); -} - -EnumPopup::~EnumPopup() -{ -} - -void EnumPopup::insertEnums( TQValueList lst ) -{ - while ( checkBoxList.count() ) - checkBoxList.removeFirst(); - - itemList = lst; - TQCheckBox *cb; - TQValueListConstIterator it = itemList.begin(); - for ( ; it != itemList.end(); ++it ) { - cb = new TQCheckBox( this ); - cb->setText( (*it).key ); - cb->setChecked( (*it).selected ); - if ( it == itemList.begin() ) - cb->setFocus(); - checkBoxList.append( cb ); - cb->resize( width(), cb->height() ); - popLayout->addWidget( cb ); - } -} - -void EnumPopup::keyPressEvent( TQKeyEvent *e ) -{ - if ( e->key() == Key_Escape ) { - hide(); - emit hidden(); - } else if ( e->key() == Key_Enter || e->key() == Key_Return ) { - closeWidget(); - } -} - -void EnumPopup::closeWidget() -{ - TQPtrListIterator it( checkBoxList ); - int i = 0; - while ( it.current() != 0 ) { - itemList[i].selected = (*it)->isChecked(); - ++it; - ++i; - } - close(); - emit closed(); -} - -TQValueList EnumPopup::enumList() const -{ - return itemList; -} - -EnumBox::EnumBox( TQWidget *parent, const char *name ) - : TQComboBox( parent, name ) -{ - pop = new EnumPopup( this, "popup", TQObject::WType_Popup ); - connect( pop, TQT_SIGNAL( hidden() ), this, TQT_SLOT( popupHidden() ) ); - connect( pop, TQT_SIGNAL( closed() ), this, TQT_SLOT( popupClosed() ) ); - popupShown = FALSE; - arrowDown = FALSE; -} - -void EnumBox::popupHidden() -{ - popupShown = FALSE; -} - -void EnumBox::popupClosed() -{ - popupShown = FALSE; - emit valueChanged(); -} - -void EnumBox::paintEvent( TQPaintEvent * ) -{ - TQPainter p( this ); - const TQColorGroup & g = colorGroup(); - p.setPen(g.text()); - - TQStyle::SFlags flags = TQStyle::Style_Default; - if (isEnabled()) - flags |= TQStyle::Style_Enabled; - if (hasFocus()) - flags |= TQStyle::Style_HasFocus; - - if ( width() < 5 || height() < 5 ) { - qDrawShadePanel( &p, rect().x(), rect().y(), rect().width(), rect().height(), g, FALSE, 2, - &g.brush( TQColorGroup::Button ) ); - return; - } - style().drawComplexControl( TQStyle::CC_ComboBox, &p, this, rect(), g, - flags, TQStyle::SC_All, - (arrowDown ? - TQStyle::SC_ComboBoxArrow : - TQStyle::SC_None )); - - TQRect re = style().querySubControlMetrics( TQStyle::CC_ComboBox, this, - TQStyle::SC_ComboBoxEditField ); - re = TQStyle::visualRect(re, this); - p.setClipRect( re ); - - if ( !str.isNull() ) { - p.save(); - p.setFont(font()); - TQFontMetrics fm(font()); - int x = re.x(), y = re.y() + fm.ascent(); - p.drawText( x, y, str ); - p.restore(); - } -} - -void EnumBox::insertEnums( TQValueList lst ) -{ - pop->insertEnums( lst ); -} - -TQValueList EnumBox::enumList() const -{ - return pop->enumList(); -} - -void EnumBox::popup() -{ - if ( popupShown ) { - pop->closeWidget(); - popupShown = FALSE; - return; - } - pop->move( ((TQWidget*)parent())->mapToGlobal( geometry().bottomLeft() ) ); - pop->setMinimumWidth( width() ); - emit aboutToShowPopup(); - pop->show(); - popupShown = TRUE; -} - -void EnumBox::mousePressEvent( TQMouseEvent *e ) -{ - if ( e->button() != Qt::LeftButton ) - return; - - TQRect arrowRect = style().querySubControlMetrics( TQStyle::CC_ComboBox, this, - TQStyle::SC_ComboBoxArrow); - arrowRect = TQStyle::visualRect(arrowRect, this); - - arrowRect.setHeight( TQMAX( height() - (2 * arrowRect.y()), arrowRect.height() ) ); - - if ( arrowRect.contains( e->pos() ) ) { - arrowDown = TRUE; - repaint( FALSE ); - } - - popup(); - TQTimer::singleShot( 100, this, TQT_SLOT( restoreArrow() ) ); -} - -void EnumBox::keyPressEvent( TQKeyEvent *e ) -{ - if ( e->key() == Key_Space ) { - popup(); - TQTimer::singleShot( 100, this, TQT_SLOT( restoreArrow() ) ); - } else if ( e->key() == Key_Enter || e->key() == Key_Return ) { - popup(); - } -} - -void EnumBox::restoreArrow() -{ - arrowDown = FALSE; - repaint( FALSE ); -} - -void EnumBox::setText( const TQString &text ) -{ - str = text; - repaint( FALSE ); -} - - - -PropertyEnumItem::PropertyEnumItem( PropertyList *l, - PropertyItem *after, - PropertyItem *prop, - const TQString &propName ) - : PropertyItem( l, after, prop, propName ) -{ - box = new EnumBox( listview->viewport() ); - box->hide(); - box->installEventFilter( listview ); - connect( box, TQT_SIGNAL( aboutToShowPopup() ), this, TQT_SLOT( insertEnums() ) ); - connect( box, TQT_SIGNAL( valueChanged() ), this, TQT_SLOT( setValue() ) ); -} - -PropertyEnumItem::~PropertyEnumItem() -{ - delete (EnumBox*)box; -} - -void PropertyEnumItem::showEditor() -{ - PropertyItem::showEditor(); - placeEditor( box ); - if ( !box->isVisible() ) { - box->show(); - box->setText( enumString ); - listView()->viewport()->setFocus(); - } - box->setFocus(); -} - -void PropertyEnumItem::hideEditor() -{ - PropertyItem::hideEditor(); - box->hide(); -} - -void PropertyEnumItem::setValue( const TQVariant &v ) -{ - enumString = ""; - enumList.clear(); - TQStringList lst = v.toStringList(); - TQValueListConstIterator it = lst.begin(); - for ( ; it != lst.end(); ++it ) - enumList.append( EnumItem( *it, FALSE ) ); - enumList.first().selected = TRUE; - enumString = enumList.first().key; - box->setText( enumString ); - setText( 1, enumString ); - PropertyItem::setValue( v ); -} - -void PropertyEnumItem::insertEnums() -{ - box->insertEnums( enumList ); -} - -void PropertyEnumItem::setValue() -{ - enumList = box->enumList(); - enumString = ""; - TQValueListConstIterator it = enumList.begin(); - for ( ; it != enumList.end(); ++it ) { - if ( (*it).selected ) - enumString += "|" + (*it).key; - } - if ( !enumString.isEmpty() ) - enumString.replace( 0, 1, "" ); - - box->setText( enumString ); - setText( 1, enumString ); - notifyValueChange(); -} - -void PropertyEnumItem::setCurrentValues( TQStrList lst ) -{ - enumString =""; - TQStrList::ConstIterator it = lst.begin(); - TQValueList::Iterator eit = enumList.begin(); - for ( ; eit != enumList.end(); ++eit ) { - (*eit).selected = FALSE; - for ( it = lst.begin(); it != lst.end(); ++it ) { - if ( TQString( *it ) == (*eit).key ) { - (*eit).selected = TRUE; - enumString += "|" + (*eit).key; - break; - } - } - } - if ( !enumString.isEmpty() ) - enumString.replace( 0, 1, "" ); - box->setText( enumString ); - setText( 1, enumString ); -} - -TQString PropertyEnumItem::currentItem() const -{ - return enumString; -} - -TQString PropertyEnumItem::currentItemFromObject() const -{ - return enumString; -} - -// -------------------------------------------------------------- - -/*! - \class PropertyList propertyeditor.h - \brief PropertyList is a TQListView derived class which is used for editing widget properties - - This class is used for widget properties. It has to be child of a - PropertyEditor. - - To initialize it for editing a widget call setupProperties() which - iterates through the properties of the current widget (see - PropertyEditor::widget()) and builds the list. - - To update the item values, refetchData() can be called. - - If the value of an item has been changed by the user, and this - change should be applied to the widget's property, valueChanged() - has to be called. - - To set the value of an item, setPropertyValue() has to be called. -*/ - -PropertyList::PropertyList( PropertyEditor *e ) - : TQListView( e ), editor( e ) -{ - init_colors(); - - whatsThis = new PropertyWhatsThis( this ); - showSorted = FALSE; - header()->setMovingEnabled( FALSE ); - header()->setStretchEnabled( TRUE ); - setResizePolicy( TQScrollView::Manual ); - viewport()->setAcceptDrops( TRUE ); - viewport()->installEventFilter( this ); - addColumn( i18n( "Property" ) ); - addColumn( i18n( "Value" ) ); - connect( header(), TQT_SIGNAL( sizeChange( int, int, int ) ), - this, TQT_SLOT( updateEditorSize() ) ); - disconnect( header(), TQT_SIGNAL( sectionClicked( int ) ), - this, TQT_SLOT( changeSortColumn( int ) ) ); - connect( header(), TQT_SIGNAL( sectionClicked( int ) ), - this, TQT_SLOT( toggleSort() ) ); - connect( this, TQT_SIGNAL( pressed( TQListViewItem *, const TQPoint &, int ) ), - this, TQT_SLOT( itemPressed( TQListViewItem *, const TQPoint &, int ) ) ); - connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), - this, TQT_SLOT( toggleOpen( TQListViewItem * ) ) ); - setSorting( -1 ); - setHScrollBarMode( AlwaysOff ); - setVScrollBarMode( AlwaysOn ); - setColumnWidthMode( 1, Manual ); - mousePressed = FALSE; - pressItem = 0; - theLastEvent = MouseEvent; - header()->installEventFilter( this ); -} - -void PropertyList::toggleSort() -{ - showSorted = !showSorted; - editor->clear(); - editor->setup(); -} - -void PropertyList::resizeEvent( TQResizeEvent *e ) -{ - TQListView::resizeEvent( e ); - if ( currentItem() ) - ( ( PropertyItem* )currentItem() )->showEditor(); -} - -static TQVariant::Type type_to_variant( const TQString &s ) -{ - if ( s == "Invalid " ) - return TQVariant::Invalid; - if ( s == "Map" ) - return TQVariant::Map; - if ( s == "List" ) - return TQVariant::List; - if ( s == "String" ) - return TQVariant::String; - if ( s == "StringList" ) - return TQVariant::StringList; - if ( s == "Font" ) - return TQVariant::Font; - if ( s == "Pixmap" ) - return TQVariant::Pixmap; - if ( s == "Brush" ) - return TQVariant::Brush; - if ( s == "Rect" ) - return TQVariant::Rect; - if ( s == "Size" ) - return TQVariant::Size; - if ( s == "Color" ) - return TQVariant::Color; - if ( s == "Palette" ) - return TQVariant::Palette; - if ( s == "ColorGroup" ) - return TQVariant::ColorGroup; - if ( s == "IconSet" ) - return TQVariant::IconSet; - if ( s == "Point" ) - return TQVariant::Point; - if ( s == "Image" ) - return TQVariant::Image; - if ( s == "Int" ) - return TQVariant::Int; - if ( s == "UInt" ) - return TQVariant::UInt; - if ( s == "Bool" ) - return TQVariant::Bool; - if ( s == "Double" ) - return TQVariant::Double; - if ( s == "CString" ) - return TQVariant::CString; - if ( s == "PointArray" ) - return TQVariant::PointArray; - if ( s == "Region" ) - return TQVariant::Region; - if ( s == "Bitmap" ) - return TQVariant::Bitmap; - if ( s == "Cursor" ) - return TQVariant::Cursor; - if ( s == "SizePolicy" ) - return TQVariant::SizePolicy; - if ( s == "Date" ) - return TQVariant::Date; - if ( s == "Time" ) - return TQVariant::Time; - if ( s == "DateTime" ) - return TQVariant::DateTime; - return TQVariant::Invalid; -} - -#ifndef TQT_NO_SQL -static bool parent_is_data_aware( TQWidget *w ) -{ - TQWidget *p = w ? w->parentWidget() : 0; - while ( p && !p->isTopLevel() ) { - if ( ::tqqt_cast(p) || ::tqqt_cast(p) ) - return TRUE; - p = p->parentWidget(); - } - return FALSE; -} -#endif - -/*! Sets up the property list by adding an item for each designable -property of the widget which is just edited. -*/ - -void PropertyList::setupProperties() -{ - if ( !editor->widget() ) - return; - bool allProperties = !::tqqt_cast(editor->widget()); - TQStrList lst = editor->widget()->metaObject()->propertyNames( allProperties ); - PropertyItem *item = 0; - TQMap unique; - TQObject *w = editor->widget(); - TQStringList valueSet; - bool parentHasLayout = - w->isWidgetType() && - !editor->formWindow()->isMainContainer( TQT_TQOBJECT(w) ) && ( (TQWidget*)w )->parentWidget() && - WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout; - for ( TQPtrListIterator it( lst ); it.current(); ++it ) { - const TQMetaProperty* p = - editor->widget()->metaObject()-> - property( editor->widget()->metaObject()->findProperty( it.current(), allProperties), allProperties ); - if ( !p ) - continue; - if ( unique.contains( TQString::fromLatin1( it.current() ) ) ) - continue; - if ( ::tqqt_cast(editor->widget()) || - ::tqqt_cast(editor->widget()) ) { - if ( qstrcmp( p->name(), "minimumHeight" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "minimumWidth" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "maximumHeight" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "maximumWidth" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "geometry" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "sizePolicy" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "minimumSize" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "maximumSize" ) == 0 ) - continue; - } - unique.insert( TQString::fromLatin1( it.current() ), TRUE ); - if ( editor->widget()->isWidgetType() && - editor->formWindow()->isMainContainer( TQT_TQOBJECT(editor->widget()) ) ) { - if ( qstrcmp( p->name(), "geometry" ) == 0 ) - continue; - } else { // hide some toplevel-only stuff - if ( qstrcmp( p->name(), "icon" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "iconText" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "caption" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "sizeIncrement" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "baseSize" ) == 0 ) - continue; - if ( parentHasLayout && qstrcmp( p->name(), "geometry" ) == 0 ) - continue; - if ( ::tqqt_cast(w) || ::tqqt_cast(w) ) { - if ( qstrcmp( p->name(), "sizePolicy" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "minimumHeight" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "minimumWidth" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "maximumHeight" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "maximumWidth" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "geometry" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "minimumSize" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "maximumSize" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "enabled" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "paletteForegroundColor" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "paletteBackgroundColor" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "paletteBackgroundPixmap" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "palette" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "font" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "cursor" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "mouseTracking" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "focusPolicy" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "acceptDrops" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "autoMask" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "backgroundOrigin" ) == 0 ) - continue; - } - } - if ( ::tqqt_cast(w) ) { - if ( qstrcmp( p->name(), "usesDropDown" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "toggleAction" ) == 0 ) - continue; - } - if ( qstrcmp( p->name(), "minimumHeight" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "minimumWidth" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "maximumHeight" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "maximumWidth" ) == 0 ) - continue; - if ( qstrcmp( p->name(), "buttonGroupId" ) == 0 ) { // #### remove this when designable in TQ_PROPERTY can take a function (isInButtonGroup() in this case) - if ( !editor->widget()->isWidgetType() || - !editor->widget()->parent() || - !::tqqt_cast(editor->widget()->parent()) ) - continue; - } - - bool isPropertyObject = w->isA( "PropertyObject" ); - - if ( ( p->designable(w) || - isPropertyObject && p->designable( ( (PropertyObject*)w )->widgetList().first() ) ) && - ( !isPropertyObject || qstrcmp( p->name(), "name" ) != 0 ) ) { - if ( p->isSetType() ) { - if ( TQString( p->name() ) == "alignment" ) { - TQStringList lst; - lst << p->valueToKey( AlignAuto ) - << p->valueToKey( AlignLeft ) - << p->valueToKey( AlignHCenter ) - << p->valueToKey( AlignRight ) - << p->valueToKey( AlignJustify ); - item = new PropertyListItem( this, item, 0, "hAlign", FALSE ); - item->setValue( lst ); - setPropertyValue( item ); - if ( MetaDataBase::isPropertyChanged( editor->widget(), "hAlign" ) ) - item->setChanged( TRUE, FALSE ); - if ( !::tqqt_cast(editor->widget()) ) { - lst.clear(); - lst << p->valueToKey( AlignTop ) - << p->valueToKey( AlignVCenter ) - << p->valueToKey( AlignBottom ); - item = new PropertyListItem( this, item, 0, "vAlign", FALSE ); - item->setValue( lst ); - setPropertyValue( item ); - if ( MetaDataBase::isPropertyChanged( editor->widget(), "vAlign" ) ) - item->setChanged( TRUE, FALSE ); - item = new PropertyBoolItem( this, item, 0, "wordwrap" ); - if ( ::tqqt_cast(w) ) - item->setVisible( FALSE ); - setPropertyValue( item ); - if ( MetaDataBase::isPropertyChanged( editor->widget(), "wordwrap" ) ) - item->setChanged( TRUE, FALSE ); - } - } else { - TQStrList lst( p->enumKeys() ); - TQStringList l; - TQPtrListIterator it( lst ); - while ( it.current() != 0 ) { - l << TQString(*it); - ++it; - } - item = new PropertyEnumItem( this, item, 0, p->name() ); - item->setValue( l ); - setPropertyValue( item ); - if ( MetaDataBase::isPropertyChanged( editor->widget(), p->name() ) ) - item->setChanged( TRUE, FALSE ); - } - } else if ( p->isEnumType() ) { - TQStrList l = p->enumKeys(); - TQStringList lst; - for ( uint i = 0; i < l.count(); ++i ) { - TQString k = l.at( i ); - // filter out enum-masks - if ( k[0] == 'M' && k[1].category() == TQChar::Letter_Uppercase ) - continue; - lst << k; - } - item = new PropertyListItem( this, item, 0, p->name(), FALSE ); - item->setValue( lst ); - } else { - TQVariant::Type t = TQVariant::nameToType( p->type() ); - if ( !addPropertyItem( item, p->name(), t ) ) - continue; - } - } - if ( item && !p->isSetType() ) { - if ( valueSet.findIndex( item->name() ) == -1 ) { - setPropertyValue( item ); - valueSet << item->name(); - } - if ( MetaDataBase::isPropertyChanged( editor->widget(), p->name() ) ) - item->setChanged( TRUE, FALSE ); - } - } - - if ( !::tqqt_cast(w) && !::tqqt_cast(w) && !::tqqt_cast(w) && - w->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)w ) != WidgetFactory::NoLayout ) { - item = new PropertyLayoutItem( this, item, 0, "layoutSpacing" ); - setPropertyValue( item ); - if ( MetaDataBase::isPropertyChanged( editor->widget(), "layoutSpacing" ) - || MetaDataBase::spacing( editor->widget() ) != -1 ) - layoutInitValue( item, TRUE ); - else - layoutInitValue( item ); - item = new PropertyLayoutItem( this, item, 0, "layoutMargin" ); - setPropertyValue( item ); - if ( MetaDataBase::isPropertyChanged( editor->widget(), "layoutMargin" ) - || MetaDataBase::margin( editor->widget() ) != -1 ) - layoutInitValue( item, TRUE ); - else - layoutInitValue( item ); - TQWidget *widget = (TQWidget*)w; - if ( ( !::tqqt_cast(widget) && - widget->parentWidget() && ::tqqt_cast(widget->parentWidget()) ) ) { - item = new PropertyListItem( this, item, 0, "resizeMode", FALSE ); - TQStringList lst; - lst << "Auto" << "FreeResize" << "Minimum" << "Fixed"; - item->setValue( lst ); - setPropertyValue( item ); - TQString resizeMod = MetaDataBase::resizeMode( editor->widget() ); - if ( !resizeMod.isEmpty() && - resizeMod != WidgetFactory::defaultCurrentItem( editor->widget(), "resizeMode" ) ) { - item->setChanged( TRUE, FALSE ); - MetaDataBase::setPropertyChanged( editor->widget(), "resizeMode", TRUE ); - } - } - } - - if ( !::tqqt_cast(w) && !::tqqt_cast(w) && - !::tqqt_cast(w) && !::tqqt_cast(w) ) { - item = new PropertyTextItem( this, item, 0, "toolTip", TRUE, FALSE ); - setPropertyValue( item ); - if ( MetaDataBase::isPropertyChanged( editor->widget(), "toolTip" ) ) - item->setChanged( TRUE, FALSE ); - item = new PropertyTextItem( this, item, 0, "whatsThis", TRUE, TRUE ); - setPropertyValue( item ); - if ( MetaDataBase::isPropertyChanged( editor->widget(), "whatsThis" ) ) - item->setChanged( TRUE, FALSE ); - } - -#ifndef TQT_NO_SQL - if ( !::tqqt_cast(editor->widget()) && !::tqqt_cast(editor->widget()) && - !::tqqt_cast(editor->widget()) && parent_is_data_aware( ::tqqt_cast(editor->widget()) ) ) { - item = new PropertyDatabaseItem( this, item, 0, "database", TQT_BASE_OBJECT(editor->formWindow()->mainContainer()) != TQT_BASE_OBJECT(w) ); - setPropertyValue( item ); - if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) ) - item->setChanged( TRUE, FALSE ); - } - - if ( ::tqqt_cast(editor->widget()) || ::tqqt_cast(editor->widget()) || - ::tqqt_cast(editor->widget()) ) { - item = new PropertyDatabaseItem( this, item, 0, "database", FALSE ); - setPropertyValue( item ); - if ( MetaDataBase::isPropertyChanged( editor->widget(), "database" ) ) - item->setChanged( TRUE, FALSE ); - item = new PropertyBoolItem( this, item, 0, "frameworkCode" ); - setPropertyValue( item ); - if ( MetaDataBase::isPropertyChanged( editor->widget(), "frameworkCode" ) ) - item->setChanged( TRUE, FALSE ); - } -#endif - - if ( w->isA("PropertyObject") ) { - const TQWidgetList wl = ( (PropertyObject*)w )->widgetList(); - TQPtrListIterator wIt( wl ); - while ( *wIt ) { - if ( (*wIt)->inherits("CustomWidget") ) { - MetaDataBase::CustomWidget *cw = ( (CustomWidget*)*wIt )->customWidget(); - setupCusWidgetProperties( cw, unique, item ); - } - ++wIt; - } - } else if ( w->inherits( "CustomWidget" ) ) { - MetaDataBase::CustomWidget *cw = ( (CustomWidget*)w )->customWidget(); - setupCusWidgetProperties( cw, unique, item ); - } - - setCurrentItem( firstChild() ); - - if ( showSorted ) { - setSorting( 0 ); - sort(); - setSorting( -1 ); - setCurrentItem( firstChild() ); - tqApp->processEvents(); - } - - updateEditorSize(); -} - -void PropertyList::setupCusWidgetProperties( MetaDataBase::CustomWidget *cw, - TQMap &unique, - PropertyItem *&item ) -{ - if ( !cw ) - return; - - for ( TQValueList::Iterator it = - cw->lstProperties.begin(); it != cw->lstProperties.end(); ++it ) { - if ( unique.contains( TQString( (*it).property ) ) ) - continue; - unique.insert( TQString( (*it).property ), TRUE ); - addPropertyItem( item, (*it).property, type_to_variant( (*it).type ) ); - setPropertyValue( item ); - if ( MetaDataBase::isPropertyChanged( editor->widget(), (*it).property ) ) - item->setChanged( TRUE, FALSE ); - } -} - -bool PropertyList::addPropertyItem( PropertyItem *&item, const TQCString &name, TQVariant::Type t ) -{ - if ( name == "buddy" ) { - PropertyListItem *itm = new PropertyListItem( this, item, 0, name, TRUE ); - TQPtrDict *widgets = editor->formWindow()->widgets(); - TQPtrDictIterator it( *widgets ); - TQStringList l; - l << ""; - while ( it.current() ) { - if ( editor->formWindow()->canBeBuddy( it.current() ) ) { - if ( l.find( it.current()->name() ) == l.end() ) - l << it.current()->name(); - } - ++it; - } - l.sort(); - itm->setValue( l ); - item = itm; - return TRUE; - } - - switch ( t ) { - case TQVariant::String: - item = new PropertyTextItem( this, item, 0, name, TRUE, - ::tqqt_cast(editor->widget()) || - ::tqqt_cast(editor->widget()) || - ::tqqt_cast(editor->widget()) ); - break; - case TQVariant::CString: - item = new PropertyTextItem( this, item, 0, - name, name == "name" && - TQT_BASE_OBJECT(editor->widget()) == TQT_BASE_OBJECT(editor->formWindow()->mainContainer()), - FALSE, TRUE ); - break; - case TQVariant::Bool: - item = new PropertyBoolItem( this, item, 0, name ); - break; - case TQVariant::Font: - item = new PropertyFontItem( this, item, 0, name ); - break; - case TQVariant::Int: - if ( name == "accel" ) - item = new PropertyTextItem( this, item, 0, name, FALSE, FALSE, FALSE, TRUE ); - else if ( name == "layoutSpacing" || name == "layoutMargin" ) - item = new PropertyLayoutItem( this, item, 0, name ); - else if ( name == "resizeMode" ) - item = new PropertyListItem( this, item, 0, name, TRUE ); - else - item = new PropertyIntItem( this, item, 0, name, TRUE ); - break; - case TQVariant::Double: - item = new PropertyDoubleItem( this, item, 0, name ); - break; - case TQVariant::KeySequence: - item = new PropertyKeysequenceItem( this, item, 0, name ); - break; - case TQVariant::UInt: - item = new PropertyIntItem( this, item, 0, name, FALSE ); - break; - case TQVariant::StringList: - item = new PropertyListItem( this, item, 0, name, TRUE ); - break; - case TQVariant::Rect: - item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Rect ); - break; - case TQVariant::Point: - item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Point ); - break; - case TQVariant::Size: - item = new PropertyCoordItem( this, item, 0, name, PropertyCoordItem::Size ); - break; - case TQVariant::Color: - item = new PropertyColorItem( this, item, 0, name, TRUE ); - break; - case TQVariant::Pixmap: - item = new PropertyPixmapItem( this, item, 0, name, PropertyPixmapItem::Pixmap ); - break; - case TQVariant::IconSet: - item = new PropertyPixmapItem( this, item, 0, name, PropertyPixmapItem::IconSet ); - break; - case TQVariant::Image: - item = new PropertyPixmapItem( this, item, 0, name, PropertyPixmapItem::Image ); - break; - case TQVariant::SizePolicy: - item = new PropertySizePolicyItem( this, item, 0, name ); - break; - case TQVariant::Palette: - item = new PropertyPaletteItem( this, item, 0, name ); - break; - case TQVariant::Cursor: - item = new PropertyCursorItem( this, item, 0, name ); - break; - case TQVariant::Date: - item = new PropertyDateItem( this, item, 0, name ); - break; - case TQVariant::Time: - item = new PropertyTimeItem( this, item, 0, name ); - break; - case TQVariant::DateTime: - item = new PropertyDateTimeItem( this, item, 0, name ); - break; - default: - return FALSE; - } - return TRUE; -} - -void PropertyList::paintEmptyArea( TQPainter *p, const TQRect &r ) -{ - p->fillRect( r, *backColor2 ); -} - -void PropertyList::setCurrentItem( TQListViewItem *i ) -{ - if ( !i ) - return; - - if ( currentItem() ) - ( (PropertyItem*)currentItem() )->hideEditor(); - TQListView::setCurrentItem( i ); - ( (PropertyItem*)currentItem() )->showEditor(); -} - -void PropertyList::updateEditorSize() -{ - if ( currentItem() ) - ( ( PropertyItem* )currentItem() )->showEditor(); -} - -/*! This has to be called if the value if \a i should be set as - property to the currently edited widget. -*/ - -void PropertyList::valueChanged( PropertyItem *i ) -{ - if ( !editor->widget() ) - return; - TQString pn( i18n( "Set '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, editor->formWindow(), - editor->widget(), editor, - i->name(), WidgetFactory::property( editor->widget(), i->name() ), - i->value(), i->currentItem(), i->currentItemFromObject() ); - - cmd->execute(); - editor->formWindow()->commandHistory()->addCommand( cmd, TRUE ); -} - -void PropertyList::layoutInitValue( PropertyItem *i, bool changed ) -{ - if ( !editor->widget() ) - return; - TQString pn( i18n( "Set '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, editor->formWindow(), - editor->widget(), editor, - i->name(), WidgetFactory::property( editor->widget(), i->name() ), - i->value(), i->currentItem(), i->currentItemFromObject() ); - cmd->execute(); - if ( i->value().toString() != "-1" ) - changed = TRUE; - i->setChanged( changed ); -} - -void PropertyList::itemPressed( TQListViewItem *i, const TQPoint &p, int c ) -{ - if ( !i ) - return; - PropertyItem *pi = (PropertyItem*)i; - if ( !pi->hasSubItems() ) - return; - - if ( c == 0 && viewport()->mapFromGlobal( p ).x() < 20 ) - toggleOpen( i ); -} - -void PropertyList::toggleOpen( TQListViewItem *i ) -{ - if ( !i ) - return; - PropertyItem *pi = (PropertyItem*)i; - if ( pi->hasSubItems() ) { - pi->setOpen( !pi->isOpen() ); - } else { - pi->toggle(); - } -} - -bool PropertyList::eventFilter( TQObject *o, TQEvent *e ) -{ - if ( !o || !e ) - return TRUE; - - PropertyItem *i = (PropertyItem*)currentItem(); - if ( e->type() == TQEvent::KeyPress ) - theLastEvent = KeyEvent; - else if ( e->type() == TQEvent::MouseButtonPress ) - theLastEvent = MouseEvent; - - if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this) &&e->type() == TQEvent::KeyPress ) { - TQKeyEvent *ke = (TQKeyEvent*)e; - if ( ( ke->key() == Key_Up || ke->key() == Key_Down ) && - ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(this) || TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(viewport()) ) && - !( ke->state() & ControlButton ) ) { - TQApplication::sendEvent( this, (TQKeyEvent*)e ); - return TRUE; - } else if ( ( !::tqqt_cast(o) || - ( ::tqqt_cast(o) && ( (TQLineEdit*)o )->isReadOnly() ) ) && - i && i->hasSubItems() ) { - if ( !i->isOpen() && - ( ke->key() == Key_Plus || - ke->key() == Key_Right )) - i->setOpen( TRUE ); - else if ( i->isOpen() && - ( ke->key() == Key_Minus || - ke->key() == Key_Left ) ) - i->setOpen( FALSE ); - } else if ( ( ke->key() == Key_Return || ke->key() == Key_Enter ) && ::tqqt_cast(o) ) { - TQKeyEvent ke2( TQEvent::KeyPress, Key_Space, 0, 0 ); - TQApplication::sendEvent( o, &ke2 ); - return TRUE; - } - } else if ( e->type() == TQEvent::FocusOut && ::tqqt_cast(o) && editor->formWindow() ) { - TQTimer::singleShot( 100, editor->formWindow()->commandHistory(), TQT_SLOT( checkCompressedCommand() ) ); - } else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(viewport()) ) { - TQMouseEvent *me; - PropertyListItem* i; - switch ( e->type() ) { - case TQEvent::MouseButtonPress: - me = (TQMouseEvent*)e; - i = (PropertyListItem*) itemAt( me->pos() ); - if ( i && ( ::tqqt_cast(i) || ::tqqt_cast(i) ) ) { - pressItem = i; - pressPos = me->pos(); - mousePressed = TRUE; - } - break; - case TQEvent::MouseMove: - me = (TQMouseEvent*)e; - if ( me && me->state() & Qt::LeftButton && mousePressed) { - - i = (PropertyListItem*) itemAt( me->pos() ); - if ( i && i == pressItem ) { - - if (( pressPos - me->pos() ).manhattanLength() > TQApplication::startDragDistance() ){ - if ( ::tqqt_cast(i) ) { - TQColor col = i->value().asColor(); - TQColorDrag *drg = new TQColorDrag( col, this ); - TQPixmap pix( 25, 25 ); - pix.fill( col ); - TQPainter p( &pix ); - p.drawRect( 0, 0, pix.width(), pix.height() ); - p.end(); - drg->setPixmap( pix ); - mousePressed = FALSE; - drg->dragCopy(); - } - else if ( ::tqqt_cast(i) ) { - TQPixmap pix = i->value().asPixmap(); - if( !pix.isNull() ) { - TQImage img = pix.convertToImage(); - TQImageDrag *drg = new TQImageDrag( img, this ); - drg->setPixmap( pix ); - mousePressed = FALSE; - drg->dragCopy(); - } - } - } - } - } - break; - default: - break; - } - } else if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(header()) ) { - if ( e->type() == TQEvent::ContextMenu ) { - ((TQContextMenuEvent *)e)->accept(); - TQPopupMenu menu( 0 ); - menu.setCheckable( TRUE ); - const int cat_id = 1; - const int alpha_id = 2; - menu.insertItem( i18n( "Sort &Categorized" ), cat_id ); - int alpha = menu.insertItem( i18n( "Sort &Alphabetically" ), alpha_id ); - if ( showSorted ) - menu.setItemChecked( alpha_id, TRUE ); - else - menu.setItemChecked( cat_id, TRUE ); - int res = menu.exec( ( (TQContextMenuEvent*)e )->globalPos() ); - if ( res != -1 ) { - bool newShowSorted = ( res == alpha ); - if ( showSorted != newShowSorted ) { - showSorted = newShowSorted; - editor->clear(); - editor->setup(); - } - } - return TRUE; - } - } - - return TQListView::eventFilter( o, e ); -} - -/*! This method re-initializes each item of the property list. -*/ - -void PropertyList::refetchData() -{ - TQListViewItemIterator it( this ); - for ( ; it.current(); ++it ) { - PropertyItem *i = (PropertyItem*)it.current(); - if ( !i->propertyParent() ) - setPropertyValue( i ); - if ( i->hasSubItems() ) - i->initChildren(); - bool changed = MetaDataBase::isPropertyChanged( editor->widget(), i->name() ); - if ( ( i->name() == "layoutSpacing" || i->name() == "layoutMargin" ) ) { - if ( i->value().toString() != "-1" ) - i->setChanged( TRUE, FALSE ); - else - i->setChanged( FALSE, FALSE ); - } - else if ( changed != i->isChanged() ) - i->setChanged( changed, FALSE ); - } - updateEditorSize(); -} - -static void clearAlignList( TQStrList &l ) -{ - if ( l.count() == 1 ) - return; - if ( l.find( "AlignAuto" ) != -1 ) - l.remove( "AlignAuto" ); - if ( l.find( "WordBreak" ) != -1 ) - l.remove( "WordBreak" ); -} - -/*! This method initializes the value of the item \a i to the value - of the corresponding property. -*/ - -void PropertyList::setPropertyValue( PropertyItem *i ) -{ - const TQMetaProperty *p = - editor->widget()->metaObject()-> - property( editor->widget()->metaObject()->findProperty( i->name(), TRUE), TRUE ); - if ( !p ) { - if ( i->name() == "hAlign" ) { - int align = editor->widget()->property( "alignment" ).toInt(); - p = editor->widget()->metaObject()-> - property( editor->widget()->metaObject()->findProperty( "alignment", TRUE ), TRUE ); - align &= ~AlignVertical_Mask; - TQStrList l = p->valueToKeys( align ); - clearAlignList( l ); - ( (PropertyListItem*)i )->setCurrentItem( l.last() ); - } else if ( i->name() == "vAlign" ) { - int align = editor->widget()->property( "alignment" ).toInt(); - p = editor->widget()->metaObject()-> - property( editor->widget()->metaObject()->findProperty( "alignment", TRUE ), TRUE ); - align &= ~AlignHorizontal_Mask; - ( (PropertyListItem*)i )->setCurrentItem( p->valueToKeys( align ).last() ); - } else if ( i->name() == "wordwrap" ) { - int align = editor->widget()->property( "alignment" ).toInt(); - if ( align & WordBreak ) - i->setValue( TQVariant( TRUE, 0 ) ); - else - i->setValue( TQVariant( FALSE, 0 ) ); - } else if ( i->name() == "layoutSpacing" ) { - ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::spacing( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) ) ) )); - } else if ( i->name() == "layoutMargin" ) { - ( (PropertyLayoutItem*)i )->setValue( MetaDataBase::margin( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) ) ) )); - } else if ( i->name() == "resizeMode" ) { - ( (PropertyListItem*)i )->setCurrentItem( MetaDataBase::resizeMode( TQT_TQOBJECT(WidgetFactory::containerOfWidget( TQT_TQWIDGET(editor->widget()) ) )) ); - } else if ( i->name() == "toolTip" || i->name() == "whatsThis" || i->name() == "database" || i->name() == "frameworkCode" ) { - i->setValue( MetaDataBase::fakeProperty( editor->widget(), i->name() ) ); - } else if ( editor->widget()->inherits( "CustomWidget" ) ) { - MetaDataBase::CustomWidget *cw = ( (CustomWidget*)editor->widget() )->customWidget(); - if ( !cw ) - return; - i->setValue( MetaDataBase::fakeProperty( editor->widget(), i->name() ) ); - } - return; - } - if ( p->isSetType() ) - ( (PropertyEnumItem*)i )->setCurrentValues( p->valueToKeys( editor->widget()->property( i->name() ).toInt() ) ); - else if ( p->isEnumType() ) - ( (PropertyListItem*)i )->setCurrentItem( p->valueToKey( editor->widget()->property( i->name() ).toInt() ) ); - else if ( qstrcmp( p->name(), "buddy" ) == 0 ) - ( (PropertyListItem*)i )->setCurrentItem( editor->widget()->property( i->name() ).toString() ); - else - i->setValue( editor->widget()->property( i->name() ) ); -} - -void PropertyList::setCurrentProperty( const TQString &n ) -{ - if ( currentItem() && currentItem()->text( 0 ) == n || - currentItem() && ( (PropertyItem*)currentItem() )->propertyParent() && - ( (PropertyItem*)currentItem() )->propertyParent()->text( 0 ) == n ) - return; - - TQListViewItemIterator it( this ); - for ( ; it.current(); ++it ) { - if ( it.current()->text( 0 ) == n ) { - setCurrentItem( it.current() ); - break; - } - } -} - -PropertyEditor *PropertyList::propertyEditor() const -{ - return editor; -} - -void PropertyList::resetProperty() -{ - if ( !currentItem() ) - return; - PropertyItem *i = (PropertyItem*)currentItem(); - if ( !MetaDataBase::isPropertyChanged( editor->widget(), i->PropertyItem::name() ) ) - return; - TQString pn( i18n( "Reset '%1' of '%2'" ).arg( i->name() ).arg( editor->widget()->name() ) ); - SetPropertyCommand *cmd = new SetPropertyCommand( pn, editor->formWindow(), - editor->widget(), editor, - i->name(), i->value(), - WidgetFactory::defaultValue( editor->widget(), i->name() ), - WidgetFactory::defaultCurrentItem( editor->widget(), i->name() ), - i->currentItem(), TRUE ); - cmd->execute(); - editor->formWindow()->commandHistory()->addCommand( cmd, FALSE ); - if ( i->hasSubItems() ) - i->initChildren(); -} - -void PropertyList::viewportDragEnterEvent( TQDragEnterEvent *e ) -{ - PropertyListItem *i = (PropertyListItem*) itemAt( e->pos() ); - if( !i ) { - e->ignore(); - return; - } - - if ( ::tqqt_cast(i) && TQColorDrag::canDecode( e ) ) - e->accept(); - else if ( ::tqqt_cast(i) && TQImageDrag::canDecode( e ) ) - e->accept(); - else - e->ignore(); -} - -void PropertyList::viewportDragMoveEvent ( TQDragMoveEvent *e ) -{ - PropertyListItem *i = (PropertyListItem*) itemAt( e->pos() ); - if( !i ) { - e->ignore(); - return; - } - - if ( ::tqqt_cast(i) && TQColorDrag::canDecode( e ) ) - e->accept(); - else if ( ::tqqt_cast(i) && TQImageDrag::canDecode( e ) ) - e->accept(); - else - e->ignore(); -} - -void PropertyList::viewportDropEvent ( TQDropEvent *e ) -{ - PropertyListItem *i = (PropertyListItem*) itemAt( e->pos() ); - if( !i ) { - e->ignore(); - return; - } - - if ( ::tqqt_cast(i) && TQColorDrag::canDecode( e ) ) { - TQColor color; - TQColorDrag::decode( e, color ); - i->setValue( TQVariant( color ) ); - valueChanged( i ); - e->accept(); - } - else if ( ::tqqt_cast(i) && TQImageDrag::canDecode( e ) ) { - TQImage img; - TQImageDrag::decode( e, img ); - TQPixmap pm; - pm.convertFromImage( img ); - i->setValue( TQVariant( pm ) ); - valueChanged( i ); - e->accept(); - } - else - e->ignore(); -} - -TQString PropertyList::whatsThisAt( const TQPoint &p ) -{ - return whatsThisText( itemAt( p ) ); -} - -void PropertyList::showCurrentWhatsThis() -{ - if ( !currentItem() ) - return; - TQPoint p( 0, currentItem()->itemPos() ); - p = viewport()->mapToGlobal( contentsToViewport( p ) ); - TQWhatsThis::display( whatsThisText( currentItem() ), p, viewport() ); -} - -TQString PropertyList::whatsThisText( TQListViewItem *i ) -{ - if ( !i || !editor->widget() ) - return TQString(); - readPropertyDocs(); - if ( ( (PropertyItem*)i )->propertyParent() ) - i = ( (PropertyItem*)i )->propertyParent(); - - const TQMetaObject *mo = editor->widget()->metaObject(); - TQString prop = ( (PropertyItem*)i )->name(); - while ( mo ) { - TQString s; - s = TQString( mo->className() ) + "::" + prop; - TQMap::Iterator it; - if ( ( it = propertyDocs.find( s ) ) != propertyDocs.end() ) { - return *it; - } - mo = mo->superClass(); - } - - return i18n( "

    TQWidget::%1

    There is no documentation available for this property.

    " ).arg( prop ); -} - -void PropertyList::readPropertyDocs() -{ - if ( !propertyDocs.isEmpty() ) - return; - - TQString docFile = MainWindow::self->documentationPath() + "/propertydocs"; - TQFile f( docFile ); - if ( !f.open( IO_ReadOnly ) ) - return; - TQDomDocument doc; - TQString errMsg; - int errLine; - if ( !doc.setContent( &f, &errMsg, &errLine ) ) - return; - TQDomElement e = doc.firstChild().toElement().firstChild().toElement(); - - for ( ; !e.isNull(); e = e.nextSibling().toElement() ) { - TQDomElement n = e.firstChild().toElement(); - TQString name; - TQString doc; - for ( ; !n.isNull(); n = n.nextSibling().toElement() ) { - if ( n.tagName() == "name" ) - name = n.firstChild().toText().data(); - else if ( n.tagName() == "doc" ) - doc = n.firstChild().toText().data(); - } - doc.insert( 0, "

    " + name + "

    " ); - propertyDocs.insert( name, doc ); - } -} - -PropertyList::LastEventType PropertyList::lastEvent() -{ - return theLastEvent; -} -// ------------------------------------------------------------ - -EventList::EventList( TQWidget *parent, FormWindow *fw, PropertyEditor *e ) - : HierarchyList( parent, fw, TRUE ), editor( e ) -{ - header()->hide(); - removeColumn( 1 ); - setRootIsDecorated( TRUE ); - connect( this, TQT_SIGNAL( itemRenamed( TQListViewItem *, int, const TQString & ) ), - this, TQT_SLOT( renamed( TQListViewItem * ) ) ); -} - -TQString clean_arguments( const TQString &s ) -{ - TQString slot = s; - TQString arg = slot.mid( slot.find( '(' ) + 1 ); - arg = arg.left( arg.findRev( ')' ) ); - TQStringList args = TQStringList::split( ',', arg ); - slot = slot.left( slot.find( '(' ) + 1 ); - int num = 0; - for ( TQStringList::Iterator it = args.begin(); it != args.end(); ++it, ++num ) { - TQString a = *it; - int i; - if ( ( i =a.find( ':' ) ) == -1 ) - slot += a.simplifyWhiteSpace(); - else - slot += a.mid( i + 1 ).simplifyWhiteSpace(); - if ( num < (int)args.count() - 1 ) - slot += ","; - } - - slot += ")"; - - return slot; -} - - -void EventList::setup() -{ - clear(); - - if ( !formWindow ) - return; - LanguageInterface *iface = MetaDataBase::languageInterface( formWindow->project()->language() ); - const TQPixmap DesignerEditSlotsPix = SmallIcon( "designer_editslots.png" , TDevDesignerPartFactory::instance()); - TQStrList sigs; - if ( iface ) - { - sigs = iface->signalNames( editor->widget() ); - } - TQStrListIterator it( sigs ); - while ( it.current() ) { - HierarchyItem *eventItem = new HierarchyItem( HierarchyItem::Event, this, (HierarchyItem*)0, - it.current(), TQString(), TQString() ); - eventItem->setOpen( TRUE ); - TQValueList conns = - MetaDataBase::connections( TQT_TQOBJECT(formWindow), TQT_TQOBJECT(editor->widget()), TQT_TQOBJECT(formWindow->mainContainer()) ); - HierarchyItem *item = 0; - for ( TQValueList::Iterator cit = conns.begin(); - cit != conns.end(); ++cit ) { - TQString s = it.current(); - if ( MetaDataBase::normalizeFunction( clean_arguments( TQString( (*cit).signal ) ) ) != - MetaDataBase::normalizeFunction( clean_arguments( s ) ) ) - continue; - item = new HierarchyItem( HierarchyItem::EventFunction, eventItem, item, - (*cit).slot, TQString(), TQString() ); - item->setPixmap( 0, DesignerEditSlotsPix ); - } - ++it; - } -} - -extern TQListViewItem *newItem; - -void EventList::contentsMouseDoubleClickEvent( TQMouseEvent *e ) -{ - TQListViewItem *i = itemAt( contentsToViewport( e->pos() ) ); - if ( !i || i->parent() ) - return; - TQString s; - if ( !formWindow->project()->isCpp() ) { - TQString s1 = i->text( 0 ); - int pt = s1.find( "(" ); - if ( pt != -1 ) - s1 = s1.left( pt ); - s = TQString( editor->widget()->name() ) + "_" + s1; - } else { - s = TQString( editor->widget()->name() ) + "_" + i->text( 0 ); - } - - const TQPixmap DesignerEditSlotsPix = SmallIcon( "designer_editslots.png" , TDevDesignerPartFactory::instance()); - insertEntry( i, DesignerEditSlotsPix , s ); -} - -void EventList::setCurrent( TQWidget * ) -{ -} - -void EventList::objectClicked( TQListViewItem *i ) -{ - if ( !i || !i->parent() ) - return; -// formWindow->clearSelection(false); - formWindow->mainWindow()->part()->emitEditFunction(formWindow->fileName(), i->text( 0 )); -// formWindow->mainWindow()->editFunction( i->text( 0 ) ); -} - -void EventList::showRMBMenu( TQListViewItem *i, const TQPoint &pos ) -{ - if ( !i ) - return; - TQPopupMenu menu; - const int NEW_ITEM = 1; - const int DEL_ITEM = 2; - menu.insertItem( SmallIcon( "designer_filenew.png" , TDevDesignerPartFactory::instance()), i18n( "New Signal Handler" ), NEW_ITEM ); - menu.insertItem( SmallIcon( "designer_editcut.png" , TDevDesignerPartFactory::instance()), i18n( "Delete Signal Handler" ), DEL_ITEM ); - int res = menu.exec( pos ); - if ( res == NEW_ITEM ) { - TQString s; - if ( !formWindow->project()->isCpp() ) { - TQString s1 = ( i->parent() ? i->parent() : i )->text( 0 ); - int pt = s1.find( "(" ); - if ( pt != -1 ) - s1 = s1.left( pt ); - s = TQString( editor->widget()->name() ) + "_" + s1; - } else { - s = TQString( editor->widget()->name() ) + "_" + ( i->parent() ? i->parent() : i )->text( 0 ); - } - insertEntry( i->parent() ? i->parent() : i, SmallIcon( "designer_editslots.png" , TDevDesignerPartFactory::instance()), s ); - } else if ( res == DEL_ITEM && i->parent() ) { - MetaDataBase::Connection conn; - conn.sender = editor->widget(); - conn.receiver = TQT_TQOBJECT(formWindow->mainContainer()); - conn.signal = i->parent()->text( 0 ); - conn.slot = i->text( 0 ); - delete i; - RemoveConnectionCommand *cmd = new RemoveConnectionCommand( i18n( "Remove Connection" ), - formWindow, - conn ); - formWindow->commandHistory()->addCommand( cmd ); - cmd->execute(); - editor->formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); - } -} - -void EventList::renamed( TQListViewItem *i ) -{ - if ( newItem == i ) - newItem = 0; - if ( !i->parent() ) - return; - TQListViewItem *itm = i->parent()->firstChild(); - bool del = FALSE; - while ( itm ) { - if ( itm != i && itm->text( 0 ) == i->text( 0 ) ) { - del = TRUE; - break; - } - itm = itm->nextSibling(); - } - i->setRenameEnabled( 0, FALSE ); - if ( del ) { - delete i; - } else { - MetaDataBase::Connection conn; - conn.sender = editor->widget(); - conn.receiver = TQT_TQOBJECT(formWindow->mainContainer()); - conn.signal = i->parent()->text( 0 ); - conn.slot = i->text( 0 ); - AddConnectionCommand *cmd = new AddConnectionCommand( i18n( "Add Connection" ), - formWindow, - conn ); - formWindow->commandHistory()->addCommand( cmd ); - // #### we should look if the specified slot already - // exists and if we can connect to this one - TQString funcname = i->text( 0 ).latin1(); - if ( funcname.find( '(' ) == -1 ) { // try to create a signature - TQString sig = i->parent()->text( 0 ); - sig = sig.mid( sig.find( '(' ) + 1 ); - sig.remove( (int)sig.length() - 1, 1 ); - LanguageInterface *iface = MetaDataBase::languageInterface( formWindow->project()->language() ); - if ( iface ) - sig = iface->createArguments( sig.simplifyWhiteSpace() ); - funcname += "(" + sig + ")"; - } - - //normally add a function in tdevdesigner - AddFunctionCommand *cmd2 = new AddFunctionCommand( i18n( "Add Function" ), - formWindow, funcname.latin1(), "virtual", - "public", - "slot", formWindow->project()->language(), - "void" ); - -/* MetaDataBase::addFunction( formWindow, funcname.latin1(), "virtual", "public", - "slot", formWindow->project()->language(), "void" ); - editor->formWindow()->mainWindow()-> - editFunction( i->text( 0 ).left( i->text( 0 ).find( "(" ) ), TRUE );*/ - cmd->execute(); - cmd2->execute(); - editor->formWindow()->mainWindow()->objectHierarchy()->updateFormDefinitionView(); - editor->formWindow()->formFile()->setModified( TRUE ); - } -} - -void EventList::save( TQListViewItem *p ) -{ - TQStringList lst; - TQListViewItem *i = p->firstChild(); - while ( i ) { - lst << i->text( 0 ); - i = i->nextSibling(); - } -} - -// -------------------------------------------------------------- - -/*! - \class PropertyEditor propertyeditor.h - \brief PropertyEdior toplevel window - - This is the toplevel window of the property editor which contains a - listview for editing properties. -*/ - -PropertyEditor::PropertyEditor( TQWidget *parent ) - : TQTabWidget( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | - WStyle_StaysOnTop | WStyle_Tool |WStyle_MinMax | WStyle_SysMenu ) -{ - setCaption( i18n( "Property Editor" ) ); - wid = 0; - formwindow = 0; - listview = new PropertyList( this ); - addTab( listview, i18n( "P&roperties" ) ); - eList = new EventList( this, formWindow(), this ); - addTab( eList, i18n( "Signa&l Handlers" ) ); -} - -TQObject *PropertyEditor::widget() const -{ - return wid; -} - -void PropertyEditor::setWidget( TQObject *w, FormWindow *fw ) -{ - if ( fw && fw->isFake() ) - w = fw->project()->objectForFakeForm( fw ); - eList->setFormWindow( fw ); - if ( w && w == wid ) { - // if there is no properties displayed then we really should show them. - // to do this check the number of properties in the list. - bool ret = (listview->childCount() > 0) ? TRUE : FALSE; - if ( wid->isWidgetType() && WidgetFactory::layoutType( (TQWidget*)wid ) != WidgetFactory::NoLayout ) { - TQListViewItemIterator it( listview ); - ret = FALSE; - while ( it.current() ) { - if ( it.current()->text( 0 ) == "layoutSpacing" || it.current()->text( 0 ) == "layoutMargin" ) { - ret = TRUE; - break; - } - ++it; - } - } - if ( ret ) - return; - } - - if ( !w || !fw ) { - setCaption( i18n( "Property Editor" ) ); - clear(); - wid = 0; - formwindow = 0; - return; - } - - wid = w; - formwindow = fw; - setCaption( i18n( "Property Editor (%1)" ).arg( formwindow->name() ) ); - listview->viewport()->setUpdatesEnabled( FALSE ); - listview->setUpdatesEnabled( FALSE ); - clear(); - listview->viewport()->setUpdatesEnabled( TRUE ); - listview->setUpdatesEnabled( TRUE ); - setup(); -} - -void PropertyEditor::clear() -{ - listview->setContentsPos( 0, 0 ); - listview->clear(); - eList->setContentsPos( 0, 0 ); - eList->clear(); -} - -void PropertyEditor::setup() -{ - if ( !formwindow || !wid ) - return; - listview->viewport()->setUpdatesEnabled( FALSE ); - listview->setupProperties(); - listview->viewport()->setUpdatesEnabled( TRUE ); - listview->updateEditorSize(); - - if ( !wid->isA( "PropertyObject" ) ) { - eList->viewport()->setUpdatesEnabled( FALSE ); - eList->setup(); - eList->viewport()->setUpdatesEnabled( TRUE ); - } -} - -void PropertyEditor::refetchData() -{ - listview->refetchData(); -} - -void PropertyEditor::emitWidgetChanged() -{ - if ( formwindow && wid ) - formwindow->widgetChanged( wid ); -} - -void PropertyEditor::closed( FormWindow *w ) -{ - if ( w == formwindow ) { - formwindow = 0; - wid = 0; - clear(); - } -} - -void PropertyEditor::closeEvent( TQCloseEvent *e ) -{ - emit hidden(); - e->accept(); -} - -PropertyList *PropertyEditor::propertyList() const -{ - return listview; -} - -FormWindow *PropertyEditor::formWindow() const -{ - return formwindow; -} - -TQString PropertyEditor::currentProperty() const -{ - if ( !wid ) - return TQString(); - if ( ( (PropertyItem*)listview->currentItem() )->propertyParent() ) - return ( (PropertyItem*)listview->currentItem() )->propertyParent()->name(); - return ( (PropertyItem*)listview->currentItem() )->name(); -} - -TQString PropertyEditor::classOfCurrentProperty() const -{ - if ( !wid ) - return TQString(); - TQObject *o = wid; - TQString curr = currentProperty(); - TQMetaObject *mo = o->metaObject(); - while ( mo ) { - TQStrList props = mo->propertyNames( FALSE ); - if ( props.find( curr.latin1() ) != -1 ) - return mo->className(); - mo = mo->superClass(); - } - return TQString(); -} - -TQMetaObject* PropertyEditor::metaObjectOfCurrentProperty() const -{ - if ( !wid ) - return 0; - return wid->metaObject(); -} - -void PropertyEditor::resetFocus() -{ - if ( listview->currentItem() ) - ( (PropertyItem*)listview->currentItem() )->showEditor(); -} - -EventList *PropertyEditor::eventList() const -{ - return eList; -} - -void PropertyEditor::setPropertyEditorEnabled( bool b ) -{ - if ( !b ) - removePage( listview ); - else - insertTab( listview, i18n( "Property Editor" ), 0 ); - updateWindow(); -} - -void PropertyEditor::setSignalHandlersEnabled( bool b ) -{ - if ( !b ) - removePage( eList ); - else - insertTab( eList, i18n( "Signal Handlers" ), 0 ); - updateWindow(); -} - -void PropertyEditor::updateWindow() -{ - if ( isHidden() && count() ) { - parentWidget()->show(); - MainWindow::self->setAppropriate( (TQDockWindow*)parentWidget(), TRUE ); - } else if ( isShown() && !count() ) { - parentWidget()->hide(); - MainWindow::self->setAppropriate( (TQDockWindow*)parentWidget(), FALSE ); - } -} diff --git a/tdevdesigner/designer/resource.cpp b/tdevdesigner/designer/resource.cpp deleted file mode 100644 index 26b46a68..00000000 --- a/tdevdesigner/designer/resource.cpp +++ /dev/null @@ -1,3328 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "actiondnd.h" -#include "command.h" -#ifndef TQT_NO_SQL -#include "database.h" -#endif -#include "formfile.h" -#include "formwindow.h" -#include "mainwindow.h" -#include "menubareditor.h" -#include "metadatabase.h" -#include "pixmapcollection.h" -#include "popupmenueditor.h" -#include "project.h" -#include "resource.h" -#include "widgetfactory.h" - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef TQT_NO_TABLE -#include -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "tdevdesigner_part.h" - -static TQString makeIndent( int indent ) -{ - TQString s; - s.fill( ' ', indent * 4 ); - return s; -} - -static TQString entitize( const TQString &s, bool attribute = FALSE ) -{ - TQString s2 = s; - s2 = s2.replace( "&", "&" ); - s2 = s2.replace( ">", ">" ); - s2 = s2.replace( "<", "<" ); - if ( attribute ) { - s2 = s2.replace( "\"", """ ); - s2 = s2.replace( "'", "'" ); - } - return s2; -} - -#ifdef TQ_WS_MACX -static struct { - int key; - const char* name; -} keyname[] = { - { TQt::Key_Space, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Space" ) }, - { TQt::Key_Escape, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Esc" ) }, - { TQt::Key_Tab, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Tab" ) }, - { TQt::Key_Backtab, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Backtab" ) }, - { TQt::Key_Backspace, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Backspace" ) }, - { TQt::Key_Return, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Return" ) }, - { TQt::Key_Enter, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Enter" ) }, - { TQt::Key_Insert, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Ins" ) }, - { TQt::Key_Delete, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Del" ) }, - { TQt::Key_Pause, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Pause" ) }, - { TQt::Key_Print, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Print" ) }, - { TQt::Key_SysReq, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "SysReq" ) }, - { TQt::Key_Home, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Home" ) }, - { TQt::Key_End, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "End" ) }, - { TQt::Key_Left, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Left" ) }, - { TQt::Key_Up, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Up" ) }, - { TQt::Key_Right, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Right" ) }, - { TQt::Key_Down, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Down" ) }, - { TQt::Key_Prior, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "PgUp" ) }, - { TQt::Key_Next, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "PgDown" ) }, - { TQt::Key_CapsLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "CapsLock" ) }, - { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "NumLock" ) }, - { TQt::Key_ScrollLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "ScrollLock" ) }, - { TQt::Key_Menu, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Menu" ) }, - { TQt::Key_Help, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Help" ) }, - - // Multimedia keys - { TQt::Key_Back, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Back" ) }, - { TQt::Key_Forward, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Forward" ) }, - { TQt::Key_Stop, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Stop" ) }, - { TQt::Key_Refresh, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Refresh" ) }, - { TQt::Key_VolumeDown, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Volume Down" ) }, - { TQt::Key_VolumeMute, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Volume Mute" ) }, - { TQt::Key_VolumeUp, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Volume Up" ) }, - { TQt::Key_BassBoost, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Bass Boost" ) }, - { TQt::Key_BassUp, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Bass Up" ) }, - { TQt::Key_BassDown, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Bass Down" ) }, - { TQt::Key_TrebleUp, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Treble Up" ) }, - { TQt::Key_TrebleDown, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Treble Down" ) }, - { TQt::Key_MediaPlay, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Play" ) }, - { TQt::Key_MediaStop, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Stop" ) }, - { TQt::Key_MediaPrev, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Previous" ) }, - { TQt::Key_MediaNext, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Next" ) }, - { TQt::Key_MediaRecord, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Media Record" ) }, - { TQt::Key_HomePage, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Home" ) }, - { TQt::Key_Favorites, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Favorites" ) }, - { TQt::Key_Search, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Search" ) }, - { TQt::Key_Standby, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Standby" ) }, - { TQt::Key_OpenUrl, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Open URL" ) }, - { TQt::Key_LaunchMail, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch Mail" ) }, - { TQt::Key_LaunchMedia, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch Media" ) }, - { TQt::Key_Launch0, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (0)" ) }, - { TQt::Key_Launch1, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (1)" ) }, - { TQt::Key_Launch2, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (2)" ) }, - { TQt::Key_Launch3, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (3)" ) }, - { TQt::Key_Launch4, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (4)" ) }, - { TQt::Key_Launch5, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (5)" ) }, - { TQt::Key_Launch6, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (6)" ) }, - { TQt::Key_Launch7, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (7)" ) }, - { TQt::Key_Launch8, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (8)" ) }, - { TQt::Key_Launch9, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (9)" ) }, - { TQt::Key_LaunchA, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (A)" ) }, - { TQt::Key_LaunchB, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (B)" ) }, - { TQt::Key_LaunchC, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (C)" ) }, - { TQt::Key_LaunchD, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (D)" ) }, - { TQt::Key_LaunchE, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (E)" ) }, - { TQt::Key_LaunchF, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Launch (F)" ) }, - - // -------------------------------------------------------------- - // More consistent namings - { TQt::Key_Print, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Print Screen" ) }, - { TQt::Key_Prior, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Page Up" ) }, - { TQt::Key_Next, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Page Down" ) }, - { TQt::Key_CapsLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Caps Lock" ) }, - { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Num Lock" ) }, - { TQt::Key_NumLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Number Lock" ) }, - { TQt::Key_ScrollLock, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Scroll Lock" ) }, - { TQt::Key_Insert, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Insert" ) }, - { TQt::Key_Delete, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Delete" ) }, - { TQt::Key_Escape, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "Escape" ) }, - { TQt::Key_SysReq, TQT_TRANSLATE_NOOP( TQACCEL_OBJECT_NAME_STRING, "System Request" ) }, - - { 0, 0 } -}; -#endif -static TQString platformNeutralKeySequence(const TQKeySequence &ks) -{ -#ifndef TQ_WS_MACX - return TQString(ks); -#else - uint k; - TQString str; - TQString p; - for (k = 0; k < ks.count(); ++k) { - int keycombo = ks[k]; - int basekey = keycombo & ~(TQt::SHIFT | TQt::CTRL | TQt::ALT | TQt::META); - if (keycombo & TQt::CTRL) - str += "Ctrl+"; - if (keycombo & TQt::ALT) - str += "Alt+"; - if (keycombo & TQt::META) - str += "Meta+"; - if (keycombo & TQt::SHIFT) - str += "Shift+"; - - // begin copy and paste from TQKeySequence :( - if (basekey & TQt::UNICODE_ACCEL) { - // Note: This character should NOT be upper()'ed, since - // the encoded string should indicate EXACTLY what the - // key represents! Hence a 'Ctrl+Shift+c' is posible to - // represent, but is clearly impossible to trigger... - p = TQChar(basekey & 0xffff); - } else if ( basekey >= TQt::Key_F1 && basekey <= TQt::Key_F35 ) { - p = TQAccel::tr( "F%1" ).arg(basekey - TQt::Key_F1 + 1); - } else if ( basekey > TQt::Key_Space && basekey <= TQt::Key_AsciiTilde ) { - p.sprintf( "%c", basekey ); - } else { - int i = 0; - while (keyname[i].name) { - if (basekey == keyname[i].key) { - p = TQAccel::tr(keyname[i].name); - break; - } - ++i; - } - // If we can't find the actual translatable keyname, - // fall back on the unicode representation of it... - // Or else characters like Key_aring may not get displayed - // ( Really depends on you locale ) - if ( !keyname[i].name ) - // Note: This character should NOT be upper()'ed, see above! - p = TQChar(basekey & 0xffff); - } - // end copy... - str += p + ", "; - } - str.truncate(str.length() - 2); - return str; -#endif -} - -static TQString mkBool( bool b ) -{ - return b? "true" : "false"; -} - -/*! - \class Resource resource.h - \brief Class for saving/loading, etc. forms - - This class is used for saving and loading forms, code generation, - transferring data of widgets over the clipboard, etc.. - -*/ - - -Resource::Resource() -{ - mainwindow = 0; - formwindow = 0; - toplevel = 0; - copying = FALSE; - pasting = FALSE; - hadGeometry = FALSE; - langIface = 0; - hasFunctions = FALSE; -} - -Resource::Resource( MainWindow* mw ) - : mainwindow( mw ) -{ - formwindow = 0; - toplevel = 0; - copying = FALSE; - pasting = FALSE; - hadGeometry = FALSE; - langIface = 0; - hasFunctions = FALSE; -} - -Resource::~Resource() -{ - if ( langIface ) - langIface->release(); -} - -void Resource::setWidget( FormWindow *w ) -{ - formwindow = w; - toplevel = w; -} - -TQWidget *Resource::widget() const -{ - return toplevel; -} - -bool Resource::load( FormFile *ff, Project *defProject ) -{ - if ( !ff || ff->absFileName().isEmpty() ) - return FALSE; - currFileName = ff->absFileName(); - mainContainerSet = FALSE; - - TQFile f( ff->absFileName() ); - f.open( IO_ReadOnly | IO_Translate ); - - bool b = load( ff, TQT_TQIODEVICE(&f), defProject ); - f.close(); - - return b; -} - -#undef signals -#undef slots - -bool Resource::load( FormFile *ff, TQIODevice* dev, Project *defProject ) -{ - TQDomDocument doc; - TQString errMsg; - int errLine; - if ( !doc.setContent( dev, &errMsg, &errLine ) ) { - return FALSE; - } - - DomTool::fixDocument( doc ); - - TQWidget *p = mainwindow ? mainwindow->qWorkspace() : 0; - toplevel = formwindow = new FormWindow( ff, p, 0 ); - if ( defProject ) - formwindow->setProject( defProject ); - else if ( MainWindow::self ) - formwindow->setProject( MainWindow::self->currProject() ); - if ( mainwindow ) - formwindow->setMainWindow( mainwindow ); - MetaDataBase::addEntry( TQT_TQOBJECT(formwindow) ); - - if ( !langIface ) { - TQString lang = "TQt Script"; - if ( mainwindow ) - lang = mainwindow->currProject()->language(); - langIface = MetaDataBase::languageInterface( lang ); - if ( langIface ) - langIface->addRef(); - } - - uiFileVersion = doc.firstChild().toElement().attribute("version"); - TQDomElement e = doc.firstChild().toElement().firstChild().toElement(); - - TQDomElement forwards = e; - while ( forwards.tagName() != "forwards" && !forwards.isNull() ) - forwards = forwards.nextSibling().toElement(); - - TQDomElement includes = e; - while ( includes.tagName() != "includes" && !includes.isNull() ) - includes = includes.nextSibling().toElement(); - - TQDomElement variables = e; - while ( variables.tagName() != "variables" && !variables.isNull() ) - variables = variables.nextSibling().toElement(); - - TQDomElement signals = e; - while ( signals.tagName() != "signals" && !signals.isNull() ) - signals = signals.nextSibling().toElement(); - - TQDomElement slots = e; - while ( slots.tagName() != "slots" && !slots.isNull() ) - slots = slots.nextSibling().toElement(); - - TQDomElement functions = e; - while ( functions.tagName() != "functions" && !functions.isNull() ) - functions = functions.nextSibling().toElement(); - - TQDomElement connections = e; - while ( connections.tagName() != "connections" && !connections.isNull() ) - connections = connections.nextSibling().toElement(); - - TQDomElement imageCollection = e; - images.clear(); - while ( imageCollection.tagName() != "images" && !imageCollection.isNull() ) - imageCollection = imageCollection.nextSibling().toElement(); - - TQDomElement customWidgets = e; - while ( customWidgets.tagName() != "customwidgets" && !customWidgets.isNull() ) - customWidgets = customWidgets.nextSibling().toElement(); - - TQDomElement tabOrder = e; - while ( tabOrder.tagName() != "tabstops" && !tabOrder.isNull() ) - tabOrder = tabOrder.nextSibling().toElement(); - - TQDomElement actions = e; - while ( actions.tagName() != "actions" && !actions.isNull() ) - actions = actions.nextSibling().toElement(); - - TQDomElement toolbars = e; - while ( toolbars.tagName() != "toolbars" && !toolbars.isNull() ) - toolbars = toolbars.nextSibling().toElement(); - - TQDomElement menubar = e; - while ( menubar.tagName() != "menubar" && !menubar.isNull() ) - menubar = menubar.nextSibling().toElement(); - - TQDomElement widget; - while ( !e.isNull() ) { - if ( e.tagName() == "widget" ) { - widgets.clear(); - widget = e; - } else if ( e.tagName() == "include" ) { // compatibility with 2.x - MetaDataBase::Include inc; - inc.location = "global"; - if ( e.attribute( "location" ) == "local" ) - inc.location = "local"; - inc.implDecl = "in declaration"; - if ( e.attribute( "impldecl" ) == "in implementation" ) - inc.implDecl = "in implementation"; - inc.header = e.firstChild().toText().data(); - if ( inc.header.right( 5 ) != ".ui.h" ) { - metaIncludes.append( inc ); - } else { - if ( formwindow->formFile() ) - formwindow->formFile()->setCodeFileState( FormFile::Ok ); - } - } else if ( e.tagName() == "comment" ) { - metaInfo.comment = e.firstChild().toText().data(); - } else if ( e.tagName() == "forward" ) { // compatibility with old betas - metaForwards << e.firstChild().toText().data(); - } else if ( e.tagName() == "variable" ) { // compatibility with old betas - MetaDataBase::Variable v; - v.varName = e.firstChild().toText().data(); - v.varAccess = "protected"; - metaVariables << v; - } else if ( e.tagName() == "author" ) { - metaInfo.author = e.firstChild().toText().data(); - } else if ( e.tagName() == "class" ) { - metaInfo.className = e.firstChild().toText().data(); - } else if ( e.tagName() == "pixmapfunction" ) { - if ( formwindow ) { - formwindow->setSavePixmapInline( FALSE ); - formwindow->setSavePixmapInProject( FALSE ); - formwindow->setPixmapLoaderFunction( e.firstChild().toText().data() ); - } - } else if ( e.tagName() == "pixmapinproject" ) { - if ( formwindow ) { - formwindow->setSavePixmapInline( FALSE ); - formwindow->setSavePixmapInProject( TRUE ); - } - } else if ( e.tagName() == "exportmacro" ) { - exportMacro = e.firstChild().toText().data(); - } else if ( e.tagName() == "layoutdefaults" ) { - formwindow->setLayoutDefaultSpacing( e.attribute( "spacing", TQString::number( formwindow->layoutDefaultSpacing() ) ).toInt() ); - formwindow->setLayoutDefaultMargin( e.attribute( "margin", TQString::number( formwindow->layoutDefaultMargin() ) ).toInt() ); - } else if ( e.tagName() == "layoutfunctions" ) { - formwindow->setSpacingFunction( e.attribute( "spacing" ) ); - formwindow->setMarginFunction( e.attribute( "margin" ) ); - if ( !formwindow->marginFunction().isEmpty() || !formwindow->spacingFunction().isEmpty() ) - formwindow->hasLayoutFunctions( TRUE ); - } - - e = e.nextSibling().toElement(); - } - - if ( !imageCollection.isNull() ) - loadImageCollection( imageCollection ); - if ( !customWidgets.isNull() ) - loadCustomWidgets( customWidgets, this ); - -#if defined (TQT_NON_COMMERCIAL) - bool previewMode = MainWindow::self ? MainWindow::self->isPreviewing() : FALSE; - TQWidget *w = (TQWidget*)createObject( widget, !previewMode ? (TQWidget*)formwindow : MainWindow::self ); - if ( !w ) - return FALSE; - if ( previewMode ) - w->reparent( MainWindow::self, TQt::WType_TopLevel, w->pos(), TRUE ); -#else - if ( !createObject( widget, formwindow) ) - return FALSE; -#endif - - if ( !forwards.isNull() ) { - for ( TQDomElement n = forwards.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) - if ( n.tagName() == "forward" ) - metaForwards << n.firstChild().toText().data(); - } - - if ( !includes.isNull() ) { - for ( TQDomElement n = includes.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) - if ( n.tagName() == "include" ) { - if ( n.tagName() == "include" ) { - MetaDataBase::Include inc; - inc.location = "global"; - if ( n.attribute( "location" ) == "local" ) - inc.location = "local"; - inc.implDecl = "in declaration"; - if ( n.attribute( "impldecl" ) == "in implementation" ) - inc.implDecl = "in implementation"; - inc.header = n.firstChild().toText().data(); - if ( inc.header.right( 5 ) != ".ui.h" ) { - metaIncludes.append( inc ); - } else { - if ( formwindow->formFile() ) - formwindow->formFile()->setCodeFileState( FormFile::Ok ); - } - } - } - } - - if ( !variables.isNull() ) { - for ( TQDomElement n = variables.firstChild().toElement(); !n.isNull(); - n = n.nextSibling().toElement() ) { - if ( n.tagName() == "variable" ) { - MetaDataBase::Variable v; - v.varName = n.firstChild().toText().data(); - v.varAccess = n.attribute( "access", "protected" ); - if ( v.varAccess.isEmpty() ) - v.varAccess = "protected"; - metaVariables << v; - } - } - } - if ( !signals.isNull() ) { - for ( TQDomElement n = signals.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) - if ( n.tagName() == "signal" ) - metaSignals << n.firstChild().toText().data(); - } - if ( !slots.isNull() ) { - for ( TQDomElement n = slots.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) - if ( n.tagName() == "slot" ) { - MetaDataBase::Function function; - function.specifier = n.attribute( "specifier", "virtual" ); - if ( function.specifier.isEmpty() ) - function.specifier = "virtual"; - function.access = n.attribute( "access", "public" ); - if ( function.access.isEmpty() ) - function.access = "public"; - function.language = n.attribute( "language", "C++" ); - function.returnType = n.attribute( "returnType", "void" ); - if ( function.returnType.isEmpty() ) - function.returnType = "void"; - function.type = "slot"; - function.function = n.firstChild().toText().data(); - if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(formwindow), function.function, TRUE ) ) - MetaDataBase::addFunction( TQT_TQOBJECT(formwindow), function.function, function.specifier, - function.access, "slot", function.language, function.returnType ); - else - MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formwindow), function.function, function.function, - function.specifier, function.access, - "slot", function.language, - function.returnType ); - } - } - - if ( !functions.isNull() ) { - for ( TQDomElement n = functions.firstChild().toElement(); !n.isNull(); n = n.nextSibling().toElement() ) { - if ( n.tagName() == "function" ) { - MetaDataBase::Function function; - function.specifier = n.attribute( "specifier", "virtual" ); - if ( function.specifier.isEmpty() ) - function.specifier = "virtual"; - function.access = n.attribute( "access", "public" ); - if ( function.access.isEmpty() ) - function.access = "public"; - function.type = n.attribute( "type", "function" ); - function.type = "function"; - function.language = n.attribute( "language", "C++" ); - function.returnType = n.attribute( "returnType", "void" ); - if ( function.returnType.isEmpty() ) - function.returnType = "void"; - function.function = n.firstChild().toText().data(); - if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(formwindow), function.function, TRUE ) ) - MetaDataBase::addFunction( TQT_TQOBJECT(formwindow), function.function, function.specifier, - function.access, function.type, function.language, - function.returnType ); - else - MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formwindow), function.function, function.function, - function.specifier, function.access, - function.type, function.language, function.returnType ); - } - } - } - - if ( !actions.isNull() ) - loadActions( actions ); - if ( !toolbars.isNull() ) - loadToolBars( toolbars ); - if ( !menubar.isNull() ) - loadMenuBar( menubar ); - - if ( !connections.isNull() ) - loadConnections( connections ); - - if ( !tabOrder.isNull() ) - loadTabOrder( tabOrder ); - - if ( formwindow ) { - MetaDataBase::setIncludes( TQT_TQOBJECT(formwindow), metaIncludes ); - MetaDataBase::setForwards( TQT_TQOBJECT(formwindow), metaForwards ); - MetaDataBase::setVariables( TQT_TQOBJECT(formwindow), metaVariables ); - MetaDataBase::setSignalList( TQT_TQOBJECT(formwindow), metaSignals ); - metaInfo.classNameChanged = metaInfo.className != TQString( formwindow->name() ); - MetaDataBase::setMetaInfo( TQT_TQOBJECT(formwindow), metaInfo ); - MetaDataBase::setExportMacro( TQT_TQOBJECT(formwindow->mainContainer()), exportMacro ); - } - - loadExtraSource( formwindow->formFile(), currFileName, langIface, hasFunctions ); - - if ( mainwindow && formwindow ) - mainwindow->insertFormWindow( formwindow ); - - if ( formwindow ) { - formwindow->killAccels( TQT_TQOBJECT(formwindow) ); - if ( formwindow->layout() ) - formwindow->layout()->activate(); - if ( hadGeometry ) - formwindow->resize( formwindow->size().expandedTo( formwindow->minimumSize(). - expandedTo( formwindow->minimumSizeHint() ) ) ); - else - formwindow->resize( formwindow->size().expandedTo( formwindow->sizeHint() ) ); - } - - return TRUE; -} - -static bool saveCode( const TQString &filename, const TQString &code ) -{ - TQFile f( filename ); - if ( f.open(IO_WriteOnly | IO_Translate) ) { - TQTextStream ts( &f ); - ts << code; - return TRUE; - } - return FALSE; -} - -bool Resource::save( const TQString& filename, bool formCodeOnly ) -{ - if ( !formwindow || filename.isEmpty() ) - return FALSE; - if (!langIface) { - TQString lang = "TQt Script"; - if ( mainwindow ) - lang = mainwindow->currProject()->language(); - langIface = MetaDataBase::languageInterface( lang ); - if ( langIface ) - langIface->addRef(); - } - if ( formCodeOnly && langIface ) { - if ( saveFormCode(formwindow->formFile(), langIface) ) - return TRUE; - bool breakout = FALSE; - FormFile *ff = formwindow->formFile(); - TQString codeFile = ff->project()->makeAbsolute( ff->codeFile() ); - TQString filter = langIface->fileFilterList().join("\n"); - while ( !breakout ) { - TQString fn = KFileDialog::getSaveFileName( codeFile, filter ); - breakout = fn.isEmpty(); - if ( !breakout ) { - if ( saveCode(fn, ff->code()) ) - return TRUE; - } - } - } - currFileName = filename; - - TQFile f( filename ); - if ( !f.open( IO_WriteOnly | IO_Translate ) ) - return FALSE; - bool b = save( TQT_TQIODEVICE(&f) ); - f.close(); - return b; -} - -bool Resource::save( TQIODevice* dev ) -{ - if ( !formwindow ) - return FALSE; - - if ( !langIface ) { - TQString lang = "C++"; - if ( mainwindow ) - lang = mainwindow->currProject()->language(); - langIface = MetaDataBase::languageInterface( lang ); - if ( langIface ) - langIface->addRef(); - } - - TQTextStream ts( dev ); - ts.setCodec( TQTextCodec::codecForName( "UTF-8" ) ); - - ts << "" << endl; - saveMetaInfoBefore( ts, 0 ); - saveObject( TQT_TQOBJECT(formwindow->mainContainer()), 0, ts, 0 ); - if ( ::tqqt_cast(formwindow->mainContainer()) ) { - saveMenuBar( (TQMainWindow*)formwindow->mainContainer(), ts, 0 ); - saveToolBars( (TQMainWindow*)formwindow->mainContainer(), ts, 0 ); - } - if ( !MetaDataBase::customWidgets()->isEmpty() && !usedCustomWidgets.isEmpty() ) - saveCustomWidgets( ts, 0 ); - if ( ::tqqt_cast(formwindow->mainContainer()) ) - saveActions( formwindow->actionList(), ts, 0 ); - if ( !images.isEmpty() ) - saveImageCollection( ts, 0 ); - if ( !MetaDataBase::connections( TQT_TQOBJECT(formwindow) ).isEmpty() || - !MetaDataBase::slotList( TQT_TQOBJECT(formwindow) ).isEmpty() ) - saveConnections( ts, 0 ); - saveTabOrder( ts, 0 ); - saveMetaInfoAfter( ts, 0 ); - saveIncludeHints( ts, 0 ); - ts << "" << endl; - bool ok = saveFormCode( formwindow->formFile(), langIface ); - images.clear(); - - return ok; -} - -TQString Resource::copy() -{ - if ( !formwindow ) - return TQString(); - - copying = TRUE; - TQString s; - TQTextOStream ts( &s ); - - ts << "" << endl; - TQWidgetList widgets = formwindow->selectedWidgets(); - TQWidgetList tmp( widgets ); - for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { - TQWidget *p = w->parentWidget(); - bool save = TRUE; - while ( p ) { - if ( tmp.findRef( p ) != -1 ) { - save = FALSE; - break; - } - p = p->parentWidget(); - } - if ( save ) - saveObject( TQT_TQOBJECT(w), 0, ts, 0 ); - } - if ( !MetaDataBase::customWidgets()->isEmpty() && !usedCustomWidgets.isEmpty() ) - saveCustomWidgets( ts, 0 ); - if ( !images.isEmpty() ) - saveImageCollection( ts, 0 ); - ts << "" << endl; - - return s; -} - - -void Resource::paste( const TQString &cb, TQWidget *parent ) -{ - if ( !formwindow ) - return; - mainContainerSet = TRUE; - - pasting = TRUE; - TQDomDocument doc; - TQString errMsg; - int errLine; - doc.setContent( cb, &errMsg, &errLine ); - - TQDomElement firstWidget = doc.firstChild().toElement().firstChild().toElement(); - - TQDomElement imageCollection = firstWidget; - images.clear(); - while ( imageCollection.tagName() != "images" && !imageCollection.isNull() ) - imageCollection = imageCollection.nextSibling().toElement(); - - TQDomElement customWidgets = firstWidget; - while ( customWidgets.tagName() != "customwidgets" && !customWidgets.isNull() ) - customWidgets = customWidgets.nextSibling().toElement(); - - if ( !imageCollection.isNull() ) - loadImageCollection( imageCollection ); - if ( !customWidgets.isNull() ) - loadCustomWidgets( customWidgets, this ); - - TQWidgetList widgets; - formwindow->clearSelection( FALSE ); - formwindow->setPropertyShowingBlocked( TRUE ); - formwindow->clearSelection( FALSE ); - while ( !firstWidget.isNull() ) { - if ( firstWidget.tagName() == "widget" ) { - TQWidget *w = (TQWidget*)createObject( firstWidget, parent, 0 ); - if ( !w ) - continue; - widgets.append( w ); - int x = w->x() + formwindow->grid().x(); - int y = w->y() + formwindow->grid().y(); - if ( w->x() + w->width() > parent->width() ) - x = TQMAX( 0, parent->width() - w->width() ); - if ( w->y() + w->height() > parent->height() ) - y = TQMAX( 0, parent->height() - w->height() ); - if ( x != w->x() || y != w->y() ) - w->move( x, y ); - formwindow->selectWidget( TQT_TQOBJECT(w) ); - } else if ( firstWidget.tagName() == "spacer" ) { - TQWidget *w = createSpacer( firstWidget, parent, 0, firstWidget.tagName() == "vspacer" ? Qt::Vertical : Qt::Horizontal ); - if ( !w ) - continue; - widgets.append( w ); - int x = w->x() + formwindow->grid().x(); - int y = w->y() + formwindow->grid().y(); - if ( w->x() + w->width() > parent->width() ) - x = TQMAX( 0, parent->width() - w->width() ); - if ( w->y() + w->height() > parent->height() ) - y = TQMAX( 0, parent->height() - w->height() ); - if ( x != w->x() || y != w->y() ) - w->move( x, y ); - formwindow->selectWidget( TQT_TQOBJECT(w) ); - } - firstWidget = firstWidget.nextSibling().toElement(); - } - formwindow->setPropertyShowingBlocked( FALSE ); - formwindow->emitShowProperties(); - - PasteCommand *cmd = new PasteCommand( i18n( "Paste" ), formwindow, widgets ); - formwindow->commandHistory()->addCommand( cmd ); -} - -void Resource::saveObject( TQObject *obj, QDesignerGridLayout* grid, TQTextStream &ts, int indent ) -{ - if ( obj && obj->isWidgetType() && ( (TQWidget*)obj )->isHidden() ) - return; - TQString closeTag; - const char* className = WidgetFactory::classNameOf( obj ); - int classID = WidgetDatabase::idFromClassName( className ); - bool isPlugin = WidgetDatabase::isCustomPluginWidget( classID ); - if ( obj->isWidgetType() ) { - if ( obj->isA("CustomWidget") || isPlugin ) { - usedCustomWidgets << TQString( className ); - includeHints << WidgetDatabase::includeFile( classID ); - } - - if ( TQT_BASE_OBJECT(obj) != TQT_BASE_OBJECT(formwindow) && !formwindow->widgets()->find( (TQWidget*)obj ) ) - return; // we don't know anything about this thing - - TQString attributes; - if ( grid ) { - QDesignerGridLayout::Item item = grid->items[ (TQWidget*)obj ]; - attributes += TQString(" row=\"") + TQString::number(item.row) + "\""; - attributes += TQString(" column=\"") + TQString::number(item.column) + "\""; - if ( item.rowspan * item.colspan != 1 ) { - attributes += TQString(" rowspan=\"") + TQString::number(item.rowspan) + "\""; - attributes += TQString(" colspan=\"") + TQString::number(item.colspan) + "\""; - } - } - - if ( qstrcmp( className, "Spacer" ) == 0 ) { - closeTag = makeIndent( indent ) + "\n"; - ts << makeIndent( indent ) << "" << endl; - ++indent; - } else { - closeTag = makeIndent( indent ) + "\n"; - ts << makeIndent( indent ) << "" << endl; - ++indent; - } - if ( WidgetFactory::hasItems(classID, obj) ) - saveItems( obj, ts, indent ); - saveObjectProperties( obj, ts, indent ); - } else { - // test for other objects we created. Nothing so far. - return; - } - - QDesignerWidgetStack* ws = 0; - - if ( ::tqqt_cast(obj) ) { - TQTabWidget* tw = (TQTabWidget*) obj; - TQObjectList* tmpl = tw->queryList( TQWIDGETSTACK_OBJECT_NAME_STRING ); - TQWidgetStack *ws = (TQWidgetStack*)tmpl->first(); - TQTabBar *tb = ( (QDesignerTabWidget*)obj )->tabBar(); - for ( int i = 0; i < tb->count(); ++i ) { - TQTab *t = tb->tabAt( i ); - if ( !t ) - continue; - TQWidget *w = ws->widget( t->identifier() ); - if ( !w ) - continue; - if ( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf(TQT_TQOBJECT(w)) ) == -1 ) - continue; // we don't know this widget - ts << makeIndent( indent ) << "" << endl; - ++indent; - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << entitize( w->name() ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << entitize( t->text() ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - saveChildrenOf( TQT_TQOBJECT(w), ts, indent ); - --indent; - ts << makeIndent( indent ) << "" << endl; - } - delete tmpl; - } else if ( (ws = ::tqqt_cast(obj)) != 0 ) { - for ( int i = 0; i < ws->count(); ++i ) { - TQWidget *w = ws->page( i ); - if ( !w ) - continue; - if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))) == -1 ) - continue; // we don't know this widget - ts << makeIndent( indent ) << "" << endl; - ++indent; - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << entitize( w->name() ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << TQString::number(i) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - saveChildrenOf( TQT_TQOBJECT(w), ts, indent ); - --indent; - ts << makeIndent( indent ) << "" << endl; - } - } else if ( ::tqqt_cast(obj) ) { - TQToolBox* tb = (TQToolBox*)obj; - for ( int i = 0; i < tb->count(); ++i ) { - TQWidget *w = tb->item( i ); - if ( !w ) - continue; - if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))) == -1 ) - continue; // we don't know this widget - ts << makeIndent( indent ) << "" << endl; - ++indent; - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << entitize( w->name() ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - ts << makeIndent( indent ) << "" << endl; - indent++; - saveEnumProperty( TQT_TQOBJECT(w), "backgroundMode", TQVariant::Invalid, ts, indent ); - indent--; - ts << makeIndent( indent ) << "" << endl; - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << entitize( tb->itemLabel( tb->indexOf(w) ) ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - saveChildrenOf( TQT_TQOBJECT(w), ts, indent ); - --indent; - ts << makeIndent( indent ) << "" << endl; - } - } else if ( ::tqqt_cast(obj) ) { - TQWizard* wiz = (TQWizard*)obj; - for ( int i = 0; i < wiz->pageCount(); ++i ) { - TQWidget *w = wiz->page( i ); - if ( !w ) - continue; - if ( WidgetDatabase::idFromClassName(WidgetFactory::classNameOf(TQT_TQOBJECT(w))) == -1 ) - continue; // we don't know this widget - ts << makeIndent( indent ) << "" << endl; - ++indent; - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << entitize( w->name() ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << entitize( wiz->title( w ) ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - saveChildrenOf( TQT_TQOBJECT(w), ts, indent ); - --indent; - ts << makeIndent( indent ) << "" << endl; - } - } else if ( ::tqqt_cast(obj) ) { - saveChildrenOf( TQT_TQOBJECT(( (TQMainWindow*)obj )->centralWidget()), ts, indent ); - } else { - bool saved = FALSE; -#ifdef TQT_CONTAINER_CUSTOM_WIDGETS - if ( isPlugin ) { - WidgetInterface *iface = 0; - widgetManager()->queryInterface( className, &iface ); - if ( iface ) { - TQWidgetContainerInterfacePrivate *iface2 = 0; - iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 ); - if ( iface2 ) { - if ( iface2->supportsPages( className ) ) { - TQWidgetList containers = iface2->pages( className, (TQWidget*)obj ); - if ( !containers.isEmpty() ) { - saved = TRUE; - int i = 0; - for ( TQWidget *w = containers.first(); w; w = containers.next(), ++i ) { - if ( WidgetDatabase:: - idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ) == -1 ) - continue; // we don't know this widget - ts << makeIndent( indent ) << "" << endl; - ++indent; - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << entitize( w->name() ) - << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" - << entitize( iface2->pageLabel( className, (TQWidget*)obj, i ) ) - << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - saveChildrenOf( w, ts, indent ); - --indent; - ts << makeIndent( indent ) << "" << endl; - } - } - } else { - saved = TRUE; - TQWidget *w = iface2->containerOfWidget( className, (TQWidget*)obj ); - if ( obj != w ) { - ts << makeIndent( indent ) << "" << endl; - ++indent; - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << entitize( w->name() ) - << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - saveChildrenOf( w, ts, indent ); - --indent; - ts << makeIndent( indent ) << "" << endl; - } - // Create a custom widget and then store it in the database - // so we can save the custom widgets. - MetaDataBase::CustomWidget *cw = new MetaDataBase::CustomWidget; - cw->className = className; - cw->includeFile = WidgetDatabase::includeFile( classID ); - TQStrList lst = w->metaObject()->signalNames( TRUE ); - for ( TQPtrListIterator it(lst); it.current(); ++it ) - cw->lstSignals.append(it.current()); - - int i; - int total = w->metaObject()->numProperties( TRUE ); - for ( i = 0; i < total; i++ ) { - const TQMetaProperty *p = w->metaObject()->property( i, TRUE ); - if ( p->designable(w) ) { - MetaDataBase::Property prop; - prop.property = p->name(); - TQString pType = p->type(); - // *sigh* designer types are not normal types - // Handle most cases, the ones it misses are - // probably too difficult to deal with anyway... - if ( pType.startsWith("Q") ) { - pType = pType.right( pType.length() - 1 ); - } else { - pType[0] = pType[0].upper(); - } - prop.type = pType; - cw->lstProperties.append( prop ); - } - } - - total = w->metaObject()->numSlots( TRUE ); - for ( i = 0; i < total; i++ ) { - const TQMetaData *md = w->metaObject()->slot( i, TRUE ); - MetaDataBase::Function funky; - // Find out if we have a return type. - if ( md->method->count > 0 ) { - const TQUParameter p = md->method->parameters[0]; - if ( p.inOut == TQUParameter::InOut ) - funky.returnType = p.type->desc(); - } - - funky.function = md->name; - funky.language = "C++"; - switch ( md->access ) { - case TQMetaData::Public: - funky.access = "public"; - break; - case TQMetaData::Protected: - funky.access = "protected"; - break; - case TQMetaData::Private: - funky.access = "private"; - break; - } - cw->lstSlots.append( funky ); - } - MetaDataBase::addCustomWidget( cw ); - } - iface2->release(); - } - iface->release(); - } - } -#endif // TQT_CONTAINER_CUSTOM_WIDGETS - if ( !saved ) - saveChildrenOf( obj, ts, indent ); - } - - indent--; - ts << closeTag; -} - -void Resource::saveItems( TQObject *obj, TQTextStream &ts, int indent ) -{ - if ( ::tqqt_cast(obj) || ::tqqt_cast(obj) ) { - TQListBox *lb = 0; - if ( ::tqqt_cast(obj) ) - lb = (TQListBox*)obj; - else - lb = ( (TQComboBox*)obj )->listBox(); - - TQListBoxItem *i = lb->firstItem(); - for ( ; i; i = i->next() ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - TQStringList text; - text << i->text(); - TQPtrList pixmaps; - if ( i->pixmap() ) - pixmaps.append( i->pixmap() ); - saveItem( text, pixmaps, ts, indent ); - indent--; - ts << makeIndent( indent ) << "" << endl; - } - } else if ( ::tqqt_cast(obj) ) { - TQIconView *iv = (TQIconView*)obj; - - TQIconViewItem *i = iv->firstItem(); - for ( ; i; i = i->nextItem() ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - TQStringList text; - text << i->text(); - TQPtrList pixmaps; - if ( i->pixmap() ) - pixmaps.append( i->pixmap() ); - saveItem( text, pixmaps, ts, indent ); - indent--; - ts << makeIndent( indent ) << "" << endl; - } - } else if ( ::tqqt_cast(obj) ) { - TQListView *lv = (TQListView*)obj; - int i; - for ( i = 0; i < lv->header()->count(); ++i ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - TQStringList l; - l << lv->header()->label( i ); - TQPtrList pix; - pix.setAutoDelete( TRUE ); - if ( lv->header()->iconSet( i ) ) - pix.append( new TQPixmap( lv->header()->iconSet( i )->pixmap() ) ); - saveItem( l, pix, ts, indent ); - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << mkBool( lv->header()->isClickEnabled( i ) )<< "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << mkBool( lv->header()->isResizeEnabled( i ) ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - } - saveItem( lv->firstChild(), ts, indent - 1 ); - } -#if !defined (TQT_NO_TABLE) - else if ( ::tqqt_cast(obj) ) { - TQTable *table = (TQTable*)obj; - int i; - TQMap columnFields = MetaDataBase::columnFields( TQT_TQOBJECT(table) ); -# ifndef TQT_NO_SQL - bool isDataTable = ::tqqt_cast(table); -# else - bool isDataTable = false; -# endif - for ( i = 0; i < table->horizontalHeader()->count(); ++i ) { - if ( !table->horizontalHeader()->label( i ).isNull() && - table->horizontalHeader()->label( i ).toInt() != i + 1 || - table->horizontalHeader()->iconSet( i ) || - isDataTable ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - TQStringList l; - l << table->horizontalHeader()->label( i ); - TQPtrList pix; - pix.setAutoDelete( TRUE ); - if ( table->horizontalHeader()->iconSet( i ) ) - pix.append( new TQPixmap( table->horizontalHeader()->iconSet( i )->pixmap() ) ); - saveItem( l, pix, ts, indent ); - if ( isDataTable && !columnFields.isEmpty() ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << entitize( *columnFields.find( l[ 0 ] ) ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - } - indent--; - ts << makeIndent( indent ) << "" << endl; - } - } - for ( i = 0; i < table->verticalHeader()->count(); ++i ) { - if ( !table->verticalHeader()->label( i ).isNull() && - table->verticalHeader()->label( i ).toInt() != i + 1 || - table->verticalHeader()->iconSet( i ) ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - TQStringList l; - l << table->verticalHeader()->label( i ); - TQPtrList pix; - pix.setAutoDelete( TRUE ); - if ( table->verticalHeader()->iconSet( i ) ) - pix.append( new TQPixmap( table->verticalHeader()->iconSet( i )->pixmap() ) ); - saveItem( l, pix, ts, indent ); - indent--; - ts << makeIndent( indent ) << "" << endl; - } - } - } -#endif -} - -void Resource::saveItem( TQListViewItem *i, TQTextStream &ts, int indent ) -{ - TQListView *lv = i->listView(); - while ( i ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - - TQPtrList pixmaps; - TQStringList textes; - for ( int c = 0; c < lv->columns(); ++c ) { - pixmaps.append( i->pixmap( c ) ); - textes << i->text( c ); - } - saveItem( textes, pixmaps, ts, indent ); - - if ( i->firstChild() ) - saveItem( i->firstChild(), ts, indent ); - - indent--; - ts << makeIndent( indent ) << "" << endl; - i = i->nextSibling(); - } -} - -void Resource::savePixmap( const TQPixmap &p, TQTextStream &ts, int indent, const TQString &tagname ) -{ - if ( p.isNull() ) { - ts << makeIndent( indent ) << "<" << tagname << ">" << endl; - return; - } - - if ( formwindow && formwindow->savePixmapInline() ) - ts << makeIndent( indent ) << "<" << tagname << ">" << saveInCollection( p ) << "" << endl; - else if ( formwindow && formwindow->savePixmapInProject() ) - ts << makeIndent( indent ) << "<" << tagname << ">" << MetaDataBase::pixmapKey( TQT_TQOBJECT(formwindow), p.serialNumber() ) - << "" << endl; - else - ts << makeIndent( indent ) << "<" << tagname << ">" << MetaDataBase::pixmapArgument( TQT_TQOBJECT(formwindow), p.serialNumber() ) - << "" << endl; -} - -TQPixmap Resource::loadPixmap( const TQDomElement &e, const TQString &/*tagname*/ ) -{ - TQString arg = e.firstChild().toText().data(); - - if ( formwindow && formwindow->savePixmapInline() ) { - TQImage img = loadFromCollection( arg ); - TQPixmap pix; - pix.convertFromImage( img ); - MetaDataBase::setPixmapArgument( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg ); - return pix; - } else if ( formwindow && formwindow->savePixmapInProject() ) { - TQPixmap pix; - if ( mainwindow && mainwindow->currProject() ) { - pix = mainwindow->currProject()->pixmapCollection()->pixmap( arg ); - } else { - pix = BarIcon( "designer_image.png", TDevDesignerPartFactory::instance() ); - // we have to force the pixmap to get a new and unique serial number. Unfortunately detatch() doesn't do that - pix.convertFromImage( pix.convertToImage() ); - } - - MetaDataBase::setPixmapKey( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg ); - return pix; - } - TQPixmap pix = BarIcon( "designer_image.png", TDevDesignerPartFactory::instance() ); - // we have to force the pixmap to get a new and unique serial number. Unfortunately detatch() doesn't do that - pix.convertFromImage( pix.convertToImage() ); - MetaDataBase::setPixmapArgument( TQT_TQOBJECT(formwindow), pix.serialNumber(), arg ); - return pix; -} - -void Resource::saveItem( const TQStringList &text, - const TQPtrList &pixmaps, TQTextStream &ts, - int indent ) -{ - TQStringList::ConstIterator it = text.begin(); - for ( ; it != text.end(); ++it ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << entitize( *it ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - } - - for ( int i = 0; i < (int)pixmaps.count(); ++i ) { - TQPixmap *p = ( (TQPtrList)pixmaps ).at( i ); - ts << makeIndent( indent ) << "" << endl; - indent++; - if ( p ) - savePixmap( *p, ts, indent ); - else - savePixmap( TQPixmap(), ts, indent ); - indent--; - ts << makeIndent( indent ) << "" << endl; - } -} - -void Resource::saveChildrenOf( TQObject* obj, TQTextStream &ts, int indent ) -{ - const TQObjectList l = obj->childrenListObject(); - if ( l.isEmpty() ) - return; // no children to save - - TQString closeTag; - // if the widget has a layout we pretend that all widget's childs are childs of the layout - makes the structure nicer - TQLayout *layout = 0; - QDesignerGridLayout* grid = 0; - if ( !::tqqt_cast(obj) && - WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( obj ) ) ) && - obj->isWidgetType() && - WidgetFactory::layoutType( (TQWidget*)obj, layout ) != WidgetFactory::NoLayout ) { - WidgetFactory::LayoutType lay = WidgetFactory::layoutType( (TQWidget*)obj, layout ); - switch ( lay ) { - case WidgetFactory::HBox: - closeTag = makeIndent( indent ) + ""; - ts << makeIndent( indent ) << "" << endl; - ++indent; - break; - case WidgetFactory::VBox: - closeTag = makeIndent( indent ) + ""; - ts << makeIndent( indent ) << "" << endl; - ++indent; - break; - case WidgetFactory::Grid: - closeTag = makeIndent( indent ) + ""; - ts << makeIndent( indent ) << "" << endl; - ++indent; - grid = (QDesignerGridLayout*) layout; - break; - default: - break; - } - - // save properties of layout - if ( lay != WidgetFactory::NoLayout ) - saveObjectProperties( TQT_TQOBJECT(layout), ts, indent ); - - } - - TQObject *o = 0; - for ( TQPtrListIterator it ( l ); ( o = it.current() ); ++it ) - if ( !TQString( o->name() ).startsWith( "qt_dead_widget_" ) ) - saveObject( o, grid, ts, indent ); - if ( !closeTag.isEmpty() ) { - indent--; - ts << closeTag << endl; - } -} - -void Resource::saveObjectProperties( TQObject *w, TQTextStream &ts, int indent ) -{ - TQStringList saved; - TQStringList changed; - changed = MetaDataBase::changedProperties( w ); - if ( w->isWidgetType() ) { - if ( ::tqqt_cast(w) ) { - if ( !changed.contains( "sizeHint" ) ) - changed << "sizeHint"; - if ( !changed.contains( "geometry" ) ) - changed << "geometry"; - } else { - TQToolButton *tb = ::tqqt_cast(w); - if ( tb && !tb->iconSet().isNull() ) { - changed << "iconSet"; - } - } - } else if ( ::tqqt_cast(w) ) { - if ( MetaDataBase::spacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) > -1 ) - changed << "spacing"; - if ( MetaDataBase::margin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) > -1 ) - changed << "margin"; - if ( MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ) != "Auto" - && !MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ).isEmpty() ) - changed << "resizeMode"; - } - - if ( TQT_BASE_OBJECT(w) == TQT_BASE_OBJECT(formwindow->mainContainer()) ) { - if ( changed.findIndex( "geometry" ) == -1 ) - changed << "geometry"; - if ( changed.findIndex( "caption" ) == -1 ) - changed << "caption"; - } - - if ( changed.isEmpty() ) - return; - - bool inLayout = TQT_BASE_OBJECT(w) != TQT_BASE_OBJECT(formwindow->mainContainer()) && !copying && w->isWidgetType() && ( (TQWidget*)w )->parentWidget() && - WidgetFactory::layoutType( ( (TQWidget*)w )->parentWidget() ) != WidgetFactory::NoLayout; - - TQStrList lst = w->metaObject()->propertyNames( !::tqqt_cast(w) ); - for ( TQPtrListIterator it( lst ); it.current(); ++it ) { - if ( changed.find( TQString::fromLatin1( it.current() ) ) == changed.end() ) - continue; - if ( saved.find( TQString::fromLatin1( it.current() ) ) != saved.end() ) - continue; - saved << TQString::fromLatin1( it.current() ); - const TQMetaProperty* p = w->metaObject()-> - property( w->metaObject()->findProperty( it.current(), TRUE ), TRUE ); - if ( !p || !p->stored( w ) || ( inLayout && qstrcmp( p->name(), "geometry" ) == 0 ) ) - continue; - if ( ::tqqt_cast(w) && qstrcmp( p->name(), "pixmap" ) == 0 && - ( !( (TQLabel*)w )->pixmap() || ( (TQLabel*)w )->pixmap()->isNull() ) ) - continue; - if ( ::tqqt_cast(w) && - ( qstrcmp( p->name(), "itemName" ) == 0 || qstrcmp( p->name(), "itemNumber" ) == 0 || - qstrcmp( p->name(), "itemText" ) == 0 ) ) - continue; - if ( qstrcmp( p->name(), "name" ) == 0 ) - knownNames << w->property( "name" ).toString(); - if ( !p->isSetType() && !p->isEnumType() && !w->property( p->name() ).isValid() ) - continue; - ts << makeIndent( indent ) << "stdSet() ) - ts << " stdset=\"0\""; - ts << ">" << endl; - indent++; - if ( strcmp( it.current(), "resizeMode" ) == 0 && ::tqqt_cast(w) ) { - saveProperty( w, it.current(), "", TQVariant::String, ts, indent ); - } else if ( p->isSetType() ) { - saveSetProperty( w, it.current(), TQVariant::nameToType( p->type() ), ts, indent ); - } else if ( p->isEnumType() ) { - saveEnumProperty( w, it.current(), TQVariant::nameToType( p->type() ), ts, indent ); - } else { - saveProperty( w, it.current(), w->property( p->name() ), TQVariant::nameToType( p->type() ), ts, indent ); - } - indent--; - ts << makeIndent( indent ) << "
    " << endl; - } - - if ( w->isWidgetType() && MetaDataBase::fakeProperties( w ) ) { - TQMap* fakeProperties = MetaDataBase::fakeProperties( w ); - for ( TQMap::Iterator fake = fakeProperties->begin(); - fake != fakeProperties->end(); ++fake ) { - if ( MetaDataBase::isPropertyChanged( w, fake.key() ) ) { - if ( w->inherits("CustomWidget") ) { - MetaDataBase::CustomWidget *cw = ( (CustomWidget*)w )->customWidget(); - if ( cw && !cw->hasProperty( fake.key().latin1() ) && fake.key() != "toolTip" && fake.key() != "whatsThis" ) - continue; - } - - ts << makeIndent( indent ) << "" << endl; - indent++; - saveProperty( w, fake.key(), *fake, (*fake).type(), ts, indent ); - indent--; - ts << makeIndent( indent ) << "" << endl; - } - } - } -} - -void Resource::saveSetProperty( TQObject *w, const TQString &name, TQVariant::Type, TQTextStream &ts, int indent ) -{ - const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, TRUE ), TRUE ); - TQStrList l( p->valueToKeys( w->property( name ).toInt() ) ); - TQString v; - for ( uint i = 0; i < l.count(); ++i ) { - v += l.at( i ); - if ( i < l.count() - 1 ) - v += "|"; - } - ts << makeIndent( indent ) << "" << v << "" << endl; -} - -void Resource::saveEnumProperty( TQObject *w, const TQString &name, TQVariant::Type, TQTextStream &ts, int indent ) -{ - const TQMetaProperty *p = w->metaObject()->property( w->metaObject()->findProperty( name, TRUE ), TRUE ); - ts << makeIndent( indent ) << "" << p->valueToKey( w->property( name ).toInt() ) << "" << endl; -} - -void Resource::saveProperty( TQObject *w, const TQString &name, const TQVariant &value, TQVariant::Type t, TQTextStream &ts, int indent ) -{ - if ( name == "hAlign" || name =="vAlign" || name == "wordwrap" || - name == "layoutMargin" || name =="layoutSpacing" ) - return; - int num; - uint unum; - double dob; - TQString comment; - if ( w && formwindow->widgets()->find( (TQWidget*)w ) || formwindow->actionList().find( (TQAction*)w ) ) - comment = MetaDataBase::propertyComment( w, name ); - switch ( t ) { - case TQVariant::String: - if ( name == "resizeMode" ) { - TQString resmod = MetaDataBase::resizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ); - if ( !resmod.isNull() && resmod != "Auto" ) { - ts << makeIndent( indent ) << ""; - ts << resmod; - ts << "" << endl; - } - - } else { - ts << makeIndent( indent ) << "" << entitize( value.toString() ) << "" << endl; - if ( !comment.isEmpty() ) - ts << makeIndent( indent ) << "" << entitize( comment ) << "" << endl; - } - break; - case TQVariant::CString: - ts << makeIndent( indent ) << "" << entitize( value.toCString() ).latin1() << "" << endl; - break; - case TQVariant::Bool: - ts << makeIndent( indent ) << "" << mkBool( value.toBool() ) << "" << endl; - break; - case TQVariant::Int: - if ( ::tqqt_cast(w) ) { - num = -1; - if ( name == "spacing" ) - num = MetaDataBase::spacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ); - else if ( name == "margin" ) - num = MetaDataBase::margin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(w) ) ) ) ); - if ( num != -1 ) - ts << makeIndent( indent ) << "" << TQString::number( num ) << "" << endl; - } else { - num = value.toInt(); - ts << makeIndent( indent ) << "" << TQString::number( num ) << "" << endl; - } - break; - case TQVariant::Double: - dob = value.toDouble(); - ts << makeIndent( indent ) << "" << TQString::number( dob ) << "" << endl; - break; - case TQVariant::KeySequence: - ts << makeIndent( indent ) << "" - << entitize(platformNeutralKeySequence(value.toKeySequence())) << "" << endl; - break; - case TQVariant::UInt: - unum = value.toUInt(); - ts << makeIndent( indent ) << "" << TQString::number( unum ) << "" << endl; - break; - case TQVariant::Rect: { - TQVariant v( value ); - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << TQString::number( v.toRect().x() ) << "" << endl; - ts << makeIndent( indent ) << "" << TQString::number( v.toRect().y() ) << "" << endl; - ts << makeIndent( indent ) << "" << TQString::number( v.toRect().width() ) << "" << endl; - ts << makeIndent( indent ) << "" << TQString::number( v.toRect().height() ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - } break; - case TQVariant::Point: { - TQVariant v( value ); - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << TQString::number( v.toPoint().x() ) << "" << endl; - ts << makeIndent( indent ) << "" << TQString::number( v.toPoint().y() ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - } break; - case TQVariant::Size: { - TQVariant v( value ); - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << TQString::number( v.toSize().width() ) << "" << endl; - ts << makeIndent( indent ) << "" << TQString::number( v.toSize().height() ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - } break; - case TQVariant::Color: { - TQVariant v( value ); - ts << makeIndent( indent ) << "" << endl; - indent++; - saveColor( ts, indent, v.toColor() ); - indent--; - ts << makeIndent( indent ) << "" << endl; - } break; - case TQVariant::Font: { - TQVariant v( value ); - ts << makeIndent( indent ) << "" << endl; - TQFont f( tqApp->font() ); - if ( w && w->isWidgetType() && ((TQWidget*)w)->parentWidget() ) - f = ((TQWidget*)w)->parentWidget()->font(); - TQFont f2( v.toFont() ); - indent++; - if ( f.family() != f2.family() ) - ts << makeIndent( indent ) << "" << f2.family() << "" << endl; - if ( f.pointSize() != f2.pointSize() ) - ts << makeIndent( indent ) << "" << TQString::number( f2.pointSize() ) << "" << endl; - if ( f.bold() != f2.bold() ) - ts << makeIndent( indent ) << "" << TQString::number( (int)f2.bold() ) << "" << endl; - if ( f.italic() != f2.italic() ) - ts << makeIndent( indent ) << "" << TQString::number( (int)f2.italic() ) << "" << endl; - if ( f.underline() != f2.underline() ) - ts << makeIndent( indent ) << "" << TQString::number( (int)f2.underline() ) << "" << endl; - if ( f.strikeOut() != f2.strikeOut() ) - ts << makeIndent( indent ) << "" << TQString::number( (int)f2.strikeOut() ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - } break; - case TQVariant::SizePolicy: { - TQSizePolicy sp( value.toSizePolicy() ); - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << (int)sp.horData() << "" << endl; - ts << makeIndent( indent ) << "" << (int)sp.verData() << "" << endl; - ts << makeIndent( indent ) << "" << (int)sp.horStretch() << "" << endl; - ts << makeIndent( indent ) << "" << (int)sp.verStretch() << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - break; - } - case TQVariant::Pixmap: - savePixmap( value.toPixmap(), ts, indent ); - break; - case TQVariant::IconSet: - savePixmap( value.toIconSet().pixmap(), ts, indent, "iconset" ); - break; - case TQVariant::Image: - ts << makeIndent( indent ) << "" << saveInCollection( value.toImage() ) << "" << endl; - break; - case TQVariant::Palette: { - TQPalette p( value.toPalette() ); - ts << makeIndent( indent ) << "" << endl; - indent++; - - ts << makeIndent( indent ) << "" << endl; - indent++; - saveColorGroup( ts, indent, p.active() ); - indent--; - ts << makeIndent( indent ) << "" << endl; - - ts << makeIndent( indent ) << "" << endl; - indent++; - saveColorGroup( ts, indent, p.disabled() ); - indent--; - ts << makeIndent( indent ) << "" << endl; - - ts << makeIndent( indent ) << "" << endl; - indent++; - saveColorGroup( ts, indent, p.inactive() ); - indent--; - ts << makeIndent( indent ) << "" << endl; - - indent--; - ts << makeIndent( indent ) << "" << endl; - } break; - case TQVariant::Cursor: - ts << makeIndent( indent ) << "" << value.toCursor().shape() << "" << endl; - break; - case TQVariant::StringList: { - TQStringList lst = value.toStringList(); - uint i = 0; - ts << makeIndent( indent ) << "" << endl; - indent++; - if ( !lst.isEmpty() ) { - for ( i = 0; i < lst.count(); ++i ) - ts << makeIndent( indent ) << "" << entitize( lst[ i ] ) << "" << endl; - } - indent--; - ts << makeIndent( indent ) << "" << endl; - } break; - case TQVariant::Date: { - TQDate d = value.toDate(); - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << d.year() << "" << endl; - ts << makeIndent( indent ) << "" << d.month() << "" << endl; - ts << makeIndent( indent ) << "" << d.day() << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - break; - } - case TQVariant::Time: { - TQTime t = value.toTime(); - ts << makeIndent( indent ) << "" << endl; - break; - } - case TQVariant::DateTime: { - TQDateTime dt = value.toDateTime(); - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << dt.date().year() << "" << endl; - ts << makeIndent( indent ) << "" << dt.date().month() << "" << endl; - ts << makeIndent( indent ) << "" << dt.date().day() << "" << endl; - ts << makeIndent( indent ) << "" << dt.time().hour() << "" << endl; - ts << makeIndent( indent ) << "" << dt.time().minute() << "" << endl; - ts << makeIndent( indent ) << "" << dt.time().second() << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - break; - } - default: - tqWarning( "saving the property %s of type %d not supported yet", name.latin1(), (int)t ); - } -} - -void Resource::saveColorGroup( TQTextStream &ts, int indent, const TQColorGroup &cg ) -{ - for( int r = 0 ; r < TQColorGroup::NColorRoles ; r++ ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - saveColor( ts, indent, cg.color( (TQColorGroup::ColorRole)r ) ); - indent--; - ts << makeIndent( indent ) << "" << endl; - TQPixmap* pm = cg.brush( (TQColorGroup::ColorRole)r ).pixmap(); - if ( pm && !pm->isNull() ) - savePixmap( *pm, ts, indent ); - } -} - -void Resource::saveColor( TQTextStream &ts, int indent, const TQColor &c ) -{ - ts << makeIndent( indent ) << "" << TQString::number( c.red() ) << "" << endl; - ts << makeIndent( indent ) << "" << TQString::number( c.green() ) << "" << endl; - ts << makeIndent( indent ) << "" << TQString::number( c.blue() ) << "" << endl; -} - -TQObject *Resource::createObject( const TQDomElement &e, TQWidget *parent, TQLayout* layout ) -{ - lastItem = 0; - TQDomElement n = e.firstChild().toElement(); - TQWidget *w = 0; // the widget that got created - TQObject *obj = 0; // gets the properties - - int row = e.attribute( "row" ).toInt(); - int col = e.attribute( "column" ).toInt(); - int rowspan = e.attribute( "rowspan" ).toInt(); - int colspan = e.attribute( "colspan" ).toInt(); - if ( rowspan < 1 ) - rowspan = 1; - if ( colspan < 1 ) - colspan = 1; - - TQString className = e.attribute( "class", TQWIDGET_OBJECT_NAME_STRING ); -#ifdef TQT_CONTAINER_CUSTOM_WIDGETS - TQString parentClassName = WidgetFactory::classNameOf( parent ); - bool isPlugin = - WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( parentClassName ) ); - if ( isPlugin ) - tqWarning( "####### loading custom container widgets without page support not implemented!" ); - // ### TODO loading for custom container widgets without pages -#endif - if ( !className.isNull() ) { - obj = TQT_TQOBJECT(WidgetFactory::create( WidgetDatabase::idFromClassName( className ), parent, 0, FALSE )); - if ( !obj ) { - TQMessageBox::critical( MainWindow::self, i18n( "Loading File" ), - i18n( "Error loading %1.\n" - "The widget %2 could not be created." ). - arg( currFileName ).arg( className ) ); - return 0; - } - if ( !mainContainerSet ) { - if ( formwindow ) - formwindow->setMainContainer( (TQWidget*)obj ); - mainContainerSet = TRUE; - } - w = (TQWidget*)obj; - if ( ::tqqt_cast(w) ) - w = ( (TQMainWindow*)w )->centralWidget(); - if ( layout ) { - switch ( WidgetFactory::layoutType( layout ) ) { - case WidgetFactory::HBox: - ( (TQHBoxLayout*)layout )->addWidget( w ); - break; - case WidgetFactory::VBox: - ( (TQVBoxLayout*)layout )->addWidget( w ); - break; - case WidgetFactory::Grid: - ( (QDesignerGridLayout*)layout )->addMultiCellWidget( w, row, row + rowspan - 1, - col, col + colspan - 1 ); - break; - default: - break; - } - } - - if ( !toplevel ) - toplevel = w; - layout = 0; - - if ( w && formwindow ) { - if ( !parent || - ( !::tqqt_cast(parent) && - !::tqqt_cast(parent) && - !::tqqt_cast(parent) && - !::tqqt_cast(parent) -#ifdef TQT_CONTAINER_CUSTOM_WIDGETS - && !isPlugin -#endif - ) ) - formwindow->insertWidget( w, pasting ); - else if ( parent && - ( ::tqqt_cast(parent) || - ::tqqt_cast(parent) || - ::tqqt_cast(parent) || - ::tqqt_cast(parent) -#ifdef TQT_CONTAINER_CUSTOM_WIDGETS - || isPlugin -#endif - ) ) - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); - } - } - - TQDomElement sizePolicyElement; - TQObject *sizePolicyObject = 0; - - while ( !n.isNull() ) { - if ( n.tagName() == "spacer" ) { - createSpacer( n, w, layout, Qt::Horizontal ); - } else if ( n.tagName() == "widget" ) { - createObject( n, w, layout ); - } else if ( n.tagName() == "hbox" ) { - layout = WidgetFactory::createLayout( w, layout, WidgetFactory::HBox ); - obj = TQT_TQOBJECT(layout); - n = n.firstChild().toElement(); - continue; - } else if ( n.tagName() == "grid" ) { - layout = WidgetFactory::createLayout( w, layout, WidgetFactory::Grid ); - obj = TQT_TQOBJECT(layout); - n = n.firstChild().toElement(); - continue; - } else if ( n.tagName() == "vbox" ) { - layout = WidgetFactory::createLayout( w, layout, WidgetFactory::VBox ); - obj = TQT_TQOBJECT(layout); - n = n.firstChild().toElement(); - continue; - } else if ( n.tagName() == "property" && obj ) { - if ( n.attribute( "name" ) == "sizePolicy" ) { - // ### Evil hack ### Delay setting sizePolicy so it won't be overridden by other properties. - sizePolicyElement = n; - sizePolicyObject = obj; - } else { - setObjectProperty( obj, n.attribute( "name" ), n.firstChild().toElement() ); - } - } else if ( n.tagName() == "attribute" && w ) { - TQString attrib = n.attribute( "name" ); - TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); - if ( ::tqqt_cast(parent) ) { - if ( attrib == "title" ) - ( (TQTabWidget*)parent )->insertTab( w, v.toString() ); - } else if ( ::tqqt_cast(parent) ) { - if ( attrib == "id" ) - ( (QDesignerWidgetStack*)parent )->insertPage( w, v.toInt() ); - } else if ( ::tqqt_cast(parent) ) { - if ( attrib == "label" ) - ( (TQToolBox*)parent )->addItem( w, v.toString() ); - } else if ( ::tqqt_cast(parent) ) { - if ( attrib == "title" ) - ( (TQWizard*)parent )->addPage( w, v.toString() ); -#ifdef TQT_CONTAINER_CUSTOM_WIDGETS - } else if ( isPlugin ) { - if ( attrib == "label" ) { - WidgetInterface *iface = 0; - widgetManager()->queryInterface( parentClassName, &iface ); - if ( iface ) { - TQWidgetContainerInterfacePrivate *iface2 = 0; - iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 ); - if ( iface2 ) { - iface2->insertPage( parentClassName, - (TQWidget*)parent, v.toString(), -1, w ); - iface2->release(); - } - iface->release(); - } - } -#endif // TQT_CONTAINER_CUSTOM_WIDGETS - } - } else if ( n.tagName() == "item" ) { - createItem( n, w ); - } else if ( n.tagName() == "column" || n.tagName() =="row" ) { - createColumn( n, w ); - } - - n = n.nextSibling().toElement(); - } - - // ### Evil hack ### See description above. - if ( !sizePolicyElement.isNull() ) { - setObjectProperty( sizePolicyObject, - sizePolicyElement.attribute( "name" ), - sizePolicyElement.firstChild().toElement() ); - } - - if ( w->isWidgetType() ) - widgets.insert( w->name(), w ); - - return TQT_TQOBJECT(w); -} - -void Resource::createColumn( const TQDomElement &e, TQWidget *widget ) -{ - if ( !widget ) - return; - - if ( ::tqqt_cast(widget) && e.tagName() == "column" ) { - TQListView *lv = (TQListView*)widget; - TQDomElement n = e.firstChild().toElement(); - TQPixmap pix; - bool hasPixmap = FALSE; - TQString txt; - bool clickable = TRUE, resizable = TRUE; - while ( !n.isNull() ) { - if ( n.tagName() == "property" ) { - TQString attrib = n.attribute( "name" ); - TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); - if ( attrib == "text" ) - txt = v.toString(); - else if ( attrib == "pixmap" ) { - pix = loadPixmap( n.firstChild().toElement().toElement() ); - hasPixmap = !pix.isNull(); - } else if ( attrib == "clickable" ) - clickable = v.toBool(); - else if ( attrib == "resizable" ) - resizable = v.toBool(); - } - n = n.nextSibling().toElement(); - } - lv->addColumn( txt ); - int i = lv->header()->count() - 1; - if ( hasPixmap ) { - lv->header()->setLabel( i, pix, txt ); - } - if ( !clickable ) - lv->header()->setClickEnabled( clickable, i ); - if ( !resizable ) - lv->header()->setResizeEnabled( resizable, i ); - } -#ifndef TQT_NO_TABLE - else if ( ::tqqt_cast(widget) ) { - TQTable *table = (TQTable*)widget; - bool isRow; - if ( ( isRow = e.tagName() == "row" ) ) - table->setNumRows( table->numRows() + 1 ); - else - table->setNumCols( table->numCols() + 1 ); - - TQDomElement n = e.firstChild().toElement(); - TQPixmap pix; - bool hasPixmap = FALSE; - TQString txt; - TQString field; - TQMap fieldMap = MetaDataBase::columnFields( TQT_TQOBJECT(table) ); - while ( !n.isNull() ) { - if ( n.tagName() == "property" ) { - TQString attrib = n.attribute( "name" ); - TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); - if ( attrib == "text" ) - txt = v.toString(); - else if ( attrib == "pixmap" ) { - hasPixmap = !n.firstChild().firstChild().toText().data().isEmpty(); - if ( hasPixmap ) - pix = loadPixmap( n.firstChild().toElement() ); - } else if ( attrib == "field" ) - field = v.toString(); - } - n = n.nextSibling().toElement(); - } - - int i = isRow ? table->numRows() - 1 : table->numCols() - 1; - TQHeader *h = !isRow ? table->horizontalHeader() : table->verticalHeader(); - if ( hasPixmap ) - h->setLabel( i, pix, txt ); - else - h->setLabel( i, txt ); - if ( !isRow && !field.isEmpty() ) - fieldMap.insert( txt, field ); - MetaDataBase::setColumnFields( TQT_TQOBJECT(table), fieldMap ); - } -#endif -} - -void Resource::loadItem( const TQDomElement &e, TQPixmap &pix, TQString &txt, bool &hasPixmap ) -{ - TQDomElement n = e; - hasPixmap = FALSE; - while ( !n.isNull() ) { - if ( n.tagName() == "property" ) { - TQString attrib = n.attribute( "name" ); - TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); - if ( attrib == "text" ) - txt = v.toString(); - else if ( attrib == "pixmap" ) { - pix = loadPixmap( n.firstChild().toElement() ); - hasPixmap = !pix.isNull(); - } - } - n = n.nextSibling().toElement(); - } -} - -void Resource::createItem( const TQDomElement &e, TQWidget *widget, TQListViewItem *i ) -{ - if ( !widget || !WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ), TQT_TQOBJECT(widget) ) ) - return; - - if ( ::tqqt_cast(widget) || ::tqqt_cast(widget) ) { - TQDomElement n = e.firstChild().toElement(); - TQPixmap pix; - bool hasPixmap = FALSE; - TQString txt; - loadItem( n, pix, txt, hasPixmap ); - TQListBox *lb = 0; - if ( ::tqqt_cast(widget) ) - lb = (TQListBox*)widget; - else - lb = ( (TQComboBox*)widget)->listBox(); - if ( hasPixmap ) { - new TQListBoxPixmap( lb, pix, txt ); - } else { - new TQListBoxText( lb, txt ); - } - } else if ( ::tqqt_cast(widget) ) { - TQDomElement n = e.firstChild().toElement(); - TQPixmap pix; - bool hasPixmap = FALSE; - TQString txt; - loadItem( n, pix, txt, hasPixmap ); - TQIconView *iv = (TQIconView*)widget; - if ( hasPixmap ) - new TQIconViewItem( iv, txt, pix ); - else - new TQIconViewItem( iv, txt ); - } else if ( ::tqqt_cast(widget) ) { - TQDomElement n = e.firstChild().toElement(); - TQPixmap pix; - TQValueList pixmaps; - TQStringList textes; - TQListViewItem *item = 0; - TQListView *lv = (TQListView*)widget; - if ( i ) - item = new TQListViewItem( i, lastItem ); - else - item = new TQListViewItem( lv, lastItem ); - while ( !n.isNull() ) { - if ( n.tagName() == "property" ) { - TQString attrib = n.attribute( "name" ); - TQVariant v = DomTool::elementToVariant( n.firstChild().toElement(), TQVariant() ); - if ( attrib == "text" ) - textes << v.toString(); - else if ( attrib == "pixmap" ) { - TQString s = v.toString(); - if ( s.isEmpty() ) { - pixmaps << TQPixmap(); - } else { - pix = loadPixmap( n.firstChild().toElement() ); - pixmaps << pix; - } - } - } else if ( n.tagName() == "item" ) { - item->setOpen( TRUE ); - createItem( n, widget, item ); - } - - n = n.nextSibling().toElement(); - } - - for ( int i = 0; i < lv->columns(); ++i ) { - item->setText( i, textes[ i ] ); - item->setPixmap( i, pixmaps[ i ] ); - } - lastItem = item; - } -} - -TQWidget *Resource::createSpacer( const TQDomElement &e, TQWidget *parent, TQLayout *layout, Qt::Orientation o ) -{ - TQDomElement n = e.firstChild().toElement(); - int row = e.attribute( "row" ).toInt(); - int col = e.attribute( "column" ).toInt(); - int rowspan = e.attribute( "rowspan" ).toInt(); - int colspan = e.attribute( "colspan" ).toInt(); - if ( rowspan < 1 ) - rowspan = 1; - if ( colspan < 1 ) - colspan = 1; - - Spacer *spacer = (Spacer*) WidgetFactory::create( WidgetDatabase::idFromClassName("Spacer"), - parent, "spacer", FALSE); - spacer->setOrientation( o ); - spacer->setInteraciveMode( FALSE ); - while ( !n.isNull() ) { - if ( n.tagName() == "property" ) - setObjectProperty( TQT_TQOBJECT(spacer), n.attribute( "name" ), n.firstChild().toElement() ); - n = n.nextSibling().toElement(); - } - spacer->setInteraciveMode( TRUE ); - if ( formwindow ) - formwindow->insertWidget( spacer, pasting ); - if ( layout ) { - if ( ::tqqt_cast(layout) ) - ( (TQBoxLayout*)layout )->addWidget( spacer, 0, spacer->alignment() ); - else - ( (QDesignerGridLayout*)layout )->addMultiCellWidget( spacer, row, row + rowspan - 1, col, col + colspan - 1, - spacer->alignment() ); - } - return spacer; -} - -/*! - Attention: this function has to be in sync with Uic::setObjectProperty(). If you change one, change both. -*/ -void Resource::setObjectProperty( TQObject* obj, const TQString &prop, const TQDomElement &e ) -{ - const TQMetaProperty *p = obj->metaObject()->property( obj->metaObject()->findProperty( prop, TRUE ), TRUE ); - - if ( !::tqqt_cast(obj) ) {// no layouts in metadatabase... (RS) - if ( obj->inherits( "CustomWidget" ) ) { - MetaDataBase::CustomWidget *cw = ( (CustomWidget*)obj )->customWidget(); - if ( cw && !cw->hasProperty( prop.latin1() ) && !p && prop != "toolTip" && prop != "whatsThis" ) - return; - } - MetaDataBase::setPropertyChanged( obj, prop, TRUE ); - } - - TQVariant defVarient; - if ( e.tagName() == "font" ) { - TQFont f( tqApp->font() ); - if ( obj->isWidgetType() && ( (TQWidget*)obj )->parentWidget() ) - f = ( (TQWidget*)obj )->parentWidget()->font(); - defVarient = TQVariant( f ); - } - - TQString comment; - TQVariant v( DomTool::elementToVariant( e, defVarient, comment ) ); - - if ( !comment.isEmpty() ) { - MetaDataBase::addEntry( obj ); - MetaDataBase::setPropertyComment( obj, prop, comment ); - } - - if ( e.tagName() == "pixmap" ) { - TQPixmap pix = loadPixmap( e ); - if ( pix.isNull() ) - return; - v = TQVariant( pix ); - } else if ( e.tagName() == "iconset" ) { - TQPixmap pix = loadPixmap( e, "iconset" ); - if ( pix.isNull() ) - return; - v = TQVariant( TQIconSet( pix ) ); - } else if ( e.tagName() == "image" ) { - v = TQVariant( loadFromCollection( v.toString() ) ); - } - - if ( !p ) { - MetaDataBase::setFakeProperty( obj, prop, v ); - if ( obj->isWidgetType() ) { - if ( prop == "database" && TQT_TQOBJECT(obj) != TQT_TQOBJECT(toplevel) ) { - TQStringList lst = MetaDataBase::fakeProperty( obj, "database" ).toStringList(); - if ( lst.count() > 2 ) - dbControls.insert( obj->name(), lst[ 2 ] ); - else if ( lst.count() == 2 ) - dbTables.insert( obj->name(), lst ); - } - return; - } - } - - if ( e.tagName() == "palette" ) { - TQDomElement n = e.firstChild().toElement(); - TQPalette p; - while ( !n.isNull() ) { - TQColorGroup cg; - if ( n.tagName() == "active" ) { - cg = loadColorGroup( n ); - p.setActive( cg ); - } else if ( n.tagName() == "inactive" ) { - cg = loadColorGroup( n ); - p.setInactive( cg ); - } else if ( n.tagName() == "disabled" ) { - cg = loadColorGroup( n ); - p.setDisabled( cg ); - } - n = n.nextSibling().toElement(); - } - v = TQPalette( p ); - } else if ( e.tagName() == "enum" && p && p->isEnumType() && prop != "resizeMode" ) { - TQString key( v.toString() ); - int vi = p->keyToValue( key ); - if ( p->valueToKey( vi ) != key ) - return; // ignore invalid properties - v = TQVariant( vi ); - } else if ( e.tagName() == "set" && p && p->isSetType() ) { - TQString keys( v.toString() ); - TQStringList lst = TQStringList::split( '|', keys ); - TQStrList l; - for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) - l.append( *it ); - v = TQVariant( p->keysToValue( l ) ); - } - - if ( prop == "caption" ) { - TQCString s1 = v.toCString(); - TQString s2 = v.toString(); - if ( !s2.isEmpty() ) - formwindow->setCaption( s2 ); - else if ( !s1.isEmpty() ) - formwindow->setCaption( s1 ); - } - if ( prop == "icon" ) { - formwindow->setIcon( v.toPixmap() ); - TQString pmk = MetaDataBase::pixmapKey( TQT_TQOBJECT(formwindow), v.toPixmap().serialNumber() ); - MetaDataBase::setPixmapKey( TQT_TQOBJECT(formwindow), - formwindow->icon()->serialNumber(), pmk ); - } - - if ( prop == "geometry" ) { - if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(toplevel) ) { - hadGeometry = TRUE; - toplevel->resize( v.toRect().size() ); - return; - } else if ( TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(formwindow->mainContainer()) ) { - hadGeometry = TRUE; - formwindow->resize( v.toRect().size() ); - return; - } - } - - if ( ::tqqt_cast(obj) ) { - if ( prop == "spacing" ) { - MetaDataBase::setSpacing( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) ), v.toInt() ); - return; - } else if ( prop == "margin" ) { - MetaDataBase::setMargin( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) ), v.toInt() ); - return; - } else if ( e.tagName() == "enum" && prop == "resizeMode" ) { - MetaDataBase::setResizeMode( TQT_TQOBJECT( WidgetFactory::containerOfWidget( WidgetFactory::layoutParent( (TQLayout*)(obj) ) ) ), v.toString() ); - return; - } - } - - if ( prop == "name" ) { - if ( pasting ) { - TQString s = v.toString(); - formwindow->unify( TQT_TQOBJECT(obj), s, TRUE ); - obj->setName( s ); - return; - } else if ( formwindow && TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(formwindow->mainContainer()) ) { - formwindow->setName( v.toCString() ); - } - } - - if ( prop == "sizePolicy" ) { - TQSizePolicy sp = v.toSizePolicy(); - sp.setHeightForWidth( ( (TQWidget*)obj )->sizePolicy().hasHeightForWidth() ); - } - - if ( prop == "cursor" ) - MetaDataBase::setCursor( (TQWidget*)obj, v.toCursor() ); - - obj->setProperty( prop, v ); -} - - -TQString Resource::saveInCollection( const TQImage &img ) -{ - TQString imgName = "none"; - TQValueList::Iterator it = images.begin(); - for ( ; it != images.end(); ++it ) { - if ( img == ( *it ).img ) { - imgName = ( *it ).name; - break; - } - } - - if ( imgName == "none" ) { - Image i; - imgName = "image" + TQString::number( images.count() ); - i.name = imgName; - i.img = img; - images.append( i ); - } - return imgName; -} - -void Resource::saveImageData( const TQImage &img, TQTextStream &ts, int indent ) -{ - TQByteArray ba; - TQBuffer buf( ba ); - buf.open( IO_WriteOnly | IO_Translate ); - TQString format; - bool compress = FALSE; - if (img.hasAlphaBuffer()) { - format = "PNG"; - } else { - format = img.depth() > 1 ? "XPM" : "XBM"; - compress = TRUE; - } - TQImageIO iio( &buf, format ); - iio.setImage( img ); - iio.write(); - buf.close(); - TQByteArray bazip = ba; - int i = 0; - if (compress) { - bazip = tqCompress( ba ); - format += ".GZ"; - // The first 4 bytes in tqCompress() are the length of the unzipped - // format. The XPM.GZ format does not use these. - i = 4; - } - ulong len = bazip.size(); - ts << makeIndent( indent ) << ""; - static const char hexchars[] = "0123456789abcdef"; - for (; i < (int)len; ++i ) { - uchar s = (uchar) bazip[i]; - ts << hexchars[s >> 4]; - ts << hexchars[s & 0x0f]; - } - ts << "" << endl; -} - -void Resource::saveImageCollection( TQTextStream &ts, int indent ) -{ - ts << makeIndent( indent ) << "" << endl; - indent++; - - TQValueList::Iterator it = images.begin(); - for ( ; it != images.end(); ++it ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - saveImageData( (*it).img, ts, indent ); - indent--; - ts << makeIndent( indent ) << "" << endl; - } - - indent--; - ts << makeIndent( indent ) << "" << endl; -} - -static TQImage loadImageData( TQDomElement &n2 ) -{ - TQImage img; - TQString data = n2.firstChild().toText().data(); - const int lengthOffset = 4; - int baSize = data.length() / 2 + lengthOffset; - uchar *ba = new uchar[ baSize ]; - for ( int i = lengthOffset; i < baSize; ++i ) { - char h = data[ 2 * (i-lengthOffset) ].latin1(); - char l = data[ 2 * (i-lengthOffset) + 1 ].latin1(); - uchar r = 0; - if ( h <= '9' ) - r += h - '0'; - else - r += h - 'a' + 10; - r = r << 4; - if ( l <= '9' ) - r += l - '0'; - else - r += l - 'a' + 10; - ba[ i ] = r; - } - TQString format = n2.attribute( "format", "PNG" ); - if ( format == "XPM.GZ" || format == "XBM.GZ" ) { - ulong len = n2.attribute( "length" ).toULong(); - if ( len < data.length() * 5 ) - len = data.length() * 5; - // tqUncompress() expects the first 4 bytes to be the expected length of - // the uncompressed data - ba[0] = ( len & 0xff000000 ) >> 24; - ba[1] = ( len & 0x00ff0000 ) >> 16; - ba[2] = ( len & 0x0000ff00 ) >> 8; - ba[3] = ( len & 0x000000ff ); - TQByteArray baunzip = tqUncompress( ba, baSize ); - img.loadFromData( (const uchar*)baunzip.data(), baunzip.size(), format.left(format.find('.')) ); - } else { - img.loadFromData( (const uchar*)ba+lengthOffset, baSize-lengthOffset, format ); - } - delete [] ba; - return img; -} - -void Resource::loadImageCollection( const TQDomElement &e ) -{ - TQDomElement n = e.firstChild().toElement(); - while ( !n.isNull() ) { - if ( n.tagName() == "image" ) { - Image img; - img.name = n.attribute( "name" ); - TQDomElement n2 = n.firstChild().toElement(); - while ( !n2.isNull() ) { - if ( n2.tagName() == "data" ) - img.img = loadImageData( n2 ); - n2 = n2.nextSibling().toElement(); - } - images.append( img ); - n = n.nextSibling().toElement(); - } - } -} - -TQImage Resource::loadFromCollection( const TQString &name ) -{ - TQValueList::Iterator it = images.begin(); - for ( ; it != images.end(); ++it ) { - if ( ( *it ).name == name ) - return ( *it ).img; - } - return TQImage(); -} - -void Resource::saveConnections( TQTextStream &ts, int indent ) -{ - TQValueList connections = MetaDataBase::connections( TQT_TQOBJECT(formwindow) ); - if ( connections.isEmpty() ) - return; - ts << makeIndent( indent ) << "" << endl; - indent++; - TQValueList::Iterator it = connections.begin(); - for ( ; it != connections.end(); ++it ) { - MetaDataBase::Connection conn = *it; - if ( ( knownNames.findIndex( TQString( conn.sender->name() ) ) == -1 && - qstrcmp( conn.sender->name(), "this" ) != 0 ) || - ( knownNames.findIndex( TQString( conn.receiver->name() ) ) == -1 && - qstrcmp( conn.receiver->name(), "this" ) != 0 ) ) - continue; - if ( formwindow->isMainContainer( TQT_TQOBJECT((*it).receiver) ) && - !MetaDataBase::hasSlot( TQT_TQOBJECT(formwindow), MetaDataBase::normalizeFunction( (*it).slot ).latin1() ) ) - continue; - - if ( conn.sender->inherits( "CustomWidget" ) ) { - MetaDataBase::CustomWidget *cw = ( (CustomWidget*)conn.sender )->customWidget(); - if ( cw && !cw->hasSignal( conn.signal ) ) - continue; - } - - if ( conn.receiver->inherits( "CustomWidget" ) && !formwindow->isMainContainer( conn.receiver ) ) { - MetaDataBase::CustomWidget *cw = ( (CustomWidget*)conn.receiver )->customWidget(); - if ( cw && !cw->hasSlot( MetaDataBase::normalizeFunction( conn.slot ).latin1() ) ) - continue; - } - - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << entitize( conn.sender->name() ) << "" << endl; - ts << makeIndent( indent ) << "" << entitize( conn.signal ) << "" << endl; - ts << makeIndent( indent ) << "" << entitize( conn.receiver->name() ) << "" << endl; - ts << makeIndent( indent ) << "" << entitize( MetaDataBase::normalizeFunction( conn.slot ) ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - } - - TQString lang = formwindow->project()->language(); - indent--; - ts << makeIndent( indent ) << "" << endl; -} - -void Resource::loadConnections( const TQDomElement &e ) -{ - TQDomElement n = e.firstChild().toElement(); - while ( !n.isNull() ) { - if ( n.tagName() == "connection" ) { - TQString lang = n.attribute( "language", "C++" ); - TQDomElement n2 = n.firstChild().toElement(); - MetaDataBase::Connection conn; - while ( !n2.isNull() ) { - if ( n2.tagName() == "sender" ) { - conn.sender = 0; - TQString name = n2.firstChild().toText().data(); - if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) { - conn.sender = TQT_TQOBJECT(toplevel); - } else { - if ( name == "this" ) - name = toplevel->name(); - TQObjectList *l = toplevel->queryList( 0, name, FALSE ); - if ( l ) { - if ( l->first() ) - conn.sender = l->first(); - delete l; - l = 0; - } - if ( !conn.sender ) - conn.sender = formwindow->findAction( name ); - } - } else if ( n2.tagName() == "signal" ) { - conn.signal = n2.firstChild().toText().data(); - } else if ( n2.tagName() == "receiver" ) { - conn.receiver = 0; - TQString name = n2.firstChild().toText().data(); - if ( name == "this" || qstrcmp( toplevel->name(), name ) == 0 ) { - conn.receiver = TQT_TQOBJECT(toplevel); - } else { - TQObjectList *l = toplevel->queryList( 0, name, FALSE ); - if ( l ) { - if ( l->first() ) - conn.receiver = l->first(); - delete l; - l = 0; - } - if ( !conn.receiver ) - conn.receiver = formwindow->findAction( name ); - } - } else if ( n2.tagName() == "slot" ) { - conn.slot = n2.firstChild().toText().data(); - } - n2 = n2.nextSibling().toElement(); - } - if ( formwindow ) { - if ( TQT_BASE_OBJECT(conn.sender) == TQT_BASE_OBJECT(formwindow) ) - conn.sender = TQT_TQOBJECT(formwindow->mainContainer()); - if ( TQT_BASE_OBJECT(conn.receiver) == TQT_BASE_OBJECT(formwindow) ) - conn.receiver = TQT_TQOBJECT(formwindow->mainContainer()); - } - if ( conn.sender && conn.receiver ) { - if ( lang == "C++" ) { - MetaDataBase::addConnection( TQT_TQOBJECT(formwindow ? formwindow : toplevel), - conn.sender, conn.signal, conn.receiver, conn.slot ); - } - } - } else if ( n.tagName() == "slot" ) { // compatibility with 2.x - MetaDataBase::Function slot; - slot.specifier = n.attribute( "specifier", "virtual" ); - if ( slot.specifier.isEmpty() ) - slot.specifier = "virtual"; - slot.access = n.attribute( "access", "public" ); - if ( slot.access.isEmpty() ) - slot.access = "public"; - slot.language = n.attribute( "language", "C++" ); - slot.returnType = n.attribute( "returnType", "void" ); - if ( slot.returnType.isEmpty() ) - slot.returnType = "void"; - slot.function = n.firstChild().toText().data(); - if ( !MetaDataBase::hasFunction( TQT_TQOBJECT(formwindow), slot.function, TRUE ) ) - MetaDataBase::addFunction( TQT_TQOBJECT(formwindow), slot.function, slot.specifier, - slot.access, "slot", slot.language, slot.returnType ); - else - MetaDataBase::changeFunctionAttributes( TQT_TQOBJECT(formwindow), slot.function, slot.function, - slot.specifier, slot.access, - "slot", slot.language, slot.returnType ); - } - n = n.nextSibling().toElement(); - } -} - -void Resource::saveCustomWidgets( TQTextStream &ts, int indent ) -{ - ts << makeIndent( indent ) << "" << endl; - indent++; - - TQPtrList *lst = MetaDataBase::customWidgets(); - for ( MetaDataBase::CustomWidget *w = lst->first(); w; w = lst->next() ) { - if ( usedCustomWidgets.findIndex( w->className ) == -1 ) - continue; - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << w->className << "" << endl; - ts << makeIndent( indent ) << "
    includePolicy == MetaDataBase::CustomWidget::Local ? "local" : "global" ) - << "\">" << w->includeFile << "
    " << endl; - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << w->sizeHint.width() << "" << endl; - ts << makeIndent( indent ) << "" << w->sizeHint.height() << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - ts << makeIndent( indent ) << "" << (int)w->isContainer << "" << endl; - ts << makeIndent( indent ) << "" << endl; - indent++; - ts << makeIndent( indent ) << "" << (int)w->sizePolicy.horData() << "" << endl; - ts << makeIndent( indent ) << "" << (int)w->sizePolicy.verData() << "" << endl; - ts << makeIndent( indent ) << "" << (int)w->sizePolicy.horStretch() << "" << endl; - ts << makeIndent( indent ) << "" << (int)w->sizePolicy.verStretch() << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - ts << makeIndent( indent ) << "" << saveInCollection( w->pixmap->convertToImage() ) << "" << endl; - if ( !w->lstSignals.isEmpty() ) { - for ( TQValueList::Iterator it = w->lstSignals.begin(); it != w->lstSignals.end(); ++it ) - ts << makeIndent( indent ) << "" << entitize( *it ) << "" << endl; - } - if ( !w->lstSlots.isEmpty() ) { - for ( TQValueList::Iterator it = w->lstSlots.begin(); it != w->lstSlots.end(); ++it ) - ts << makeIndent( indent ) << "" << entitize( (*it).function ) << "" << endl; - } - if ( !w->lstProperties.isEmpty() ) { - for ( TQValueList::Iterator it = w->lstProperties.begin(); it != w->lstProperties.end(); ++it ) - ts << makeIndent( indent ) << "" << entitize( (*it).property ) << "" << endl; - } - indent--; - ts << makeIndent( indent ) << "
    " << endl; - } - - - indent--; - ts << makeIndent( indent ) << "
    " << endl; -} - -void Resource::loadCustomWidgets( const TQDomElement &e, Resource *r ) -{ - TQDomElement n = e.firstChild().toElement(); - while ( !n.isNull() ) { - if ( n.tagName() == "customwidget" ) { - TQDomElement n2 = n.firstChild().toElement(); - MetaDataBase::CustomWidget *w = new MetaDataBase::CustomWidget; - while ( !n2.isNull() ) { - if ( n2.tagName() == "class" ) { - w->className = n2.firstChild().toText().data(); - } else if ( n2.tagName() == "header" ) { - w->includeFile = n2.firstChild().toText().data(); - TQString s = n2.attribute( "location" ); - if ( s != "local" ) - w->includePolicy = MetaDataBase::CustomWidget::Global; - else - w->includePolicy = MetaDataBase::CustomWidget::Local; - } else if ( n2.tagName() == "sizehint" ) { - TQDomElement n3 = n2.firstChild().toElement(); - while ( !n3.isNull() ) { - if ( n3.tagName() == "width" ) - w->sizeHint.setWidth( n3.firstChild().toText().data().toInt() ); - else if ( n3.tagName() == "height" ) - w->sizeHint.setHeight( n3.firstChild().toText().data().toInt() ); - n3 = n3.nextSibling().toElement(); - } - } else if ( n2.tagName() == "sizepolicy" ) { - TQDomElement n3 = n2.firstChild().toElement(); - while ( !n3.isNull() ) { - if ( n3.tagName() == "hordata" ) - w->sizePolicy.setHorData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() ); - else if ( n3.tagName() == "verdata" ) - w->sizePolicy.setVerData( (TQSizePolicy::SizeType)n3.firstChild().toText().data().toInt() ); - else if ( n3.tagName() == "horstretch" ) - w->sizePolicy.setHorStretch( n3.firstChild().toText().data().toInt() ); - else if ( n3.tagName() == "verstretch" ) - w->sizePolicy.setVerStretch( n3.firstChild().toText().data().toInt() ); - n3 = n3.nextSibling().toElement(); - } - } else if ( n2.tagName() == "pixmap" ) { - TQPixmap pix; - if ( r ) { - pix = r->loadPixmap( n2 ); - } else { - TQDomElement n3 = n2.firstChild().toElement(); - TQImage img; - while ( !n3.isNull() ) { - if ( n3.tagName() == "data" ) { - img = loadImageData( n3 ); - } - n3 = n3.nextSibling().toElement(); - } - pix.convertFromImage( img ); - } - w->pixmap = new TQPixmap( pix ); - } else if ( n2.tagName() == "signal" ) { - w->lstSignals.append( n2.firstChild().toText().data().latin1() ); - } else if ( n2.tagName() == "container" ) { - w->isContainer = (bool)n2.firstChild().toText().data().toInt(); - } else if ( n2.tagName() == "slot" ) { - MetaDataBase::Function function; - function.function = n2.firstChild().toText().data().latin1(); - function.access = n2.attribute( "access" ); - function.type = "slot"; - w->lstSlots.append( function ); - } else if ( n2.tagName() == "property" ) { - MetaDataBase::Property property; - property.property = n2.firstChild().toText().data().latin1(); - property.type = n2.attribute( "type" ); - w->lstProperties.append( property ); - } - n2 = n2.nextSibling().toElement(); - } - MetaDataBase::addCustomWidget( w ); - } - n = n.nextSibling().toElement(); - } -} - -void Resource::saveTabOrder( TQTextStream &ts, int indent ) -{ - TQWidgetList l = MetaDataBase::tabOrder( toplevel ); - if ( l.isEmpty() ) - return; - - ts << makeIndent( indent ) << "" << endl; - indent++; - - for ( TQWidget *w = l.first(); w; w = l.next() ) { - if ( w->testWState( TQt::WState_ForceHide ) || knownNames.findIndex( w->name() ) == -1 ) - continue; - ts << makeIndent( indent ) << "" << w->name() << "" << endl; - } - - indent--; - ts << makeIndent( indent ) << "" << endl; -} - -void Resource::loadTabOrder( const TQDomElement &e ) -{ - TQWidget *last = 0; - TQDomElement n = e.firstChild().toElement(); - TQWidgetList widgets; - while ( !n.isNull() ) { - if ( n.tagName() == "tabstop" ) { - TQString name = n.firstChild().toText().data(); - if ( name.isEmpty() ) - continue; - TQObjectList *l = toplevel->queryList( 0, name, FALSE ); - if ( l ) { - if ( l->first() ) { - TQWidget *w = (TQWidget*)l->first(); - widgets.append( w ); - if ( last ) - toplevel->setTabOrder( last, w ); - last = w; - } - delete l; - } - } - n = n.nextSibling().toElement(); - } - - if ( !widgets.isEmpty() ) - MetaDataBase::setTabOrder( toplevel, widgets ); -} - -void Resource::saveMetaInfoBefore( TQTextStream &ts, int indent ) -{ - MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( TQT_TQOBJECT(formwindow) ); - TQString cn; - if ( info.classNameChanged && !info.className.isEmpty() ) - cn = info.className; - else - cn = formwindow->name(); - ts << makeIndent( indent ) << "" << entitize( cn ) << "" << endl; - if ( !info.comment.isEmpty() ) - ts << makeIndent( indent ) << "" << entitize( info.comment ) << "" << endl; - if ( !info.author.isEmpty() ) - ts << makeIndent( indent ) << "" << entitize( info.author ) << "" << endl; -} - -void Resource::saveMetaInfoAfter( TQTextStream &ts, int indent ) -{ - MetaDataBase::MetaInfo info = MetaDataBase::metaInfo( TQT_TQOBJECT(formwindow) ); - if ( !langIface || formwindow->project()->isCpp() ) { - TQValueList includes = MetaDataBase::includes( TQT_TQOBJECT(formwindow) ); - TQString extensionInclude; - bool needExtensionInclude = FALSE; - if ( langIface && - formwindow->formFile()->hasFormCode() && - formwindow->formFile()->codeFileState() != FormFile::Deleted ) { - extensionInclude = TQFileInfo( currFileName ).fileName() + langIface->formCodeExtension(); - needExtensionInclude = TRUE; - } - if ( !includes.isEmpty() || needExtensionInclude ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - - for ( TQValueList::Iterator it = includes.begin(); it != includes.end(); ++it ) { - ts << makeIndent( indent ) << "" << (*it).header << "" << endl; - if ( needExtensionInclude ) - needExtensionInclude = (*it).header != extensionInclude; - } - - if ( needExtensionInclude ) - ts << makeIndent( indent ) << "" - << extensionInclude << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - } - - TQStringList forwards = MetaDataBase::forwards( TQT_TQOBJECT(formwindow) ); - if ( !forwards.isEmpty() ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - for ( TQStringList::Iterator it2 = forwards.begin(); it2 != forwards.end(); ++it2 ) - ts << makeIndent( indent ) << "" << entitize( *it2 ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - } - TQValueList varLst = MetaDataBase::variables( TQT_TQOBJECT(formwindow) ); - if ( !varLst.isEmpty() ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - - TQValueList::Iterator it = varLst.begin(); - for ( ; it != varLst.end(); ++it ) { - ts << makeIndent( indent ) << "" << entitize( (*it).varName ) << "" << endl; - } - indent--; - ts << makeIndent( indent ) << "" << endl; - } - TQStringList sigs = MetaDataBase::signalList( TQT_TQOBJECT(formwindow) ); - if ( !sigs.isEmpty() ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - for ( TQStringList::Iterator it3 = sigs.begin(); it3 != sigs.end(); ++it3 ) - ts << makeIndent( indent ) << "" << entitize( *it3 ) << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; - } - - TQValueList slotList = MetaDataBase::slotList( TQT_TQOBJECT(formwindow) ); - if ( !slotList.isEmpty() ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - TQString lang = formwindow->project()->language(); - TQValueList::Iterator it = slotList.begin(); - for ( ; it != slotList.end(); ++it ) { - MetaDataBase::Function function = *it; - ts << makeIndent( indent ) << "" << entitize( function.function ) << "" << endl; - } - indent--; - ts << makeIndent( indent ) << "" << endl; - } - - TQValueList functionList = MetaDataBase::functionList( TQT_TQOBJECT(formwindow), TRUE ); - if ( !functionList.isEmpty() ) { - ts << makeIndent( indent ) << "" << endl; - indent++; - TQString lang = formwindow->project()->language(); - TQValueList::Iterator it = functionList.begin(); - for ( ; it != functionList.end(); ++it ) { - MetaDataBase::Function function = *it; - ts << makeIndent( indent ) << "" << entitize( function.function ) << "
    " << endl; - } - indent--; - ts << makeIndent( indent ) << "" << endl; - } - } - - if ( formwindow && formwindow->savePixmapInline() ) - ; - else if ( formwindow && formwindow->savePixmapInProject() ) - ts << makeIndent( indent ) << "" << endl; - else - ts << makeIndent( indent ) << "" << formwindow->pixmapLoaderFunction() << "" << endl; - if ( !( exportMacro = MetaDataBase::exportMacro( TQT_TQOBJECT(formwindow->mainContainer()) ) ).isEmpty() ) - ts << makeIndent( indent ) << "" << exportMacro << "" << endl; - if ( formwindow ) { - ts << makeIndent( indent ) << "layoutDefaultSpacing() - << "\" margin=\"" << formwindow->layoutDefaultMargin() << "\"/>" << endl; - if ( formwindow->hasLayoutFunctions() ) { - TQString s = ""; - TQString m = ""; - if ( !formwindow->spacingFunction().isEmpty() ) - s = TQString( " spacing=\"%1\"" ).arg( formwindow->spacingFunction() ); - if ( !formwindow->marginFunction().isEmpty() ) - m = TQString( " margin=\"%1\"" ).arg( formwindow->marginFunction() ); - ts << makeIndent( indent ) << "" << endl; - } - } -} - -void Resource::saveIncludeHints( TQTextStream &ts, int indent ) -{ - if ( includeHints.isEmpty() ) - return; - ts << makeIndent( indent ) << "" << endl; - indent++; - for ( TQStringList::Iterator it = includeHints.begin(); it != includeHints.end(); ++it ) - ts << makeIndent( indent ) << "" << *it << "" << endl; - indent--; - ts << makeIndent( indent ) << "" << endl; -} - -TQColorGroup Resource::loadColorGroup( const TQDomElement &e ) -{ - TQColorGroup cg; - int r = -1; - TQDomElement n = e.firstChild().toElement(); - TQColor col; - while ( !n.isNull() ) { - if ( n.tagName() == "color" ) { - r++; - cg.setColor( (TQColorGroup::ColorRole)r, (col = DomTool::readColor( n ) ) ); - } else if ( n.tagName() == "pixmap" ) { - TQPixmap pix = loadPixmap( n ); - cg.setBrush( (TQColorGroup::ColorRole)r, TQBrush( col, pix ) ); - } - n = n.nextSibling().toElement(); - } - return cg; -} - -void Resource::saveChildActions( TQAction *a, TQTextStream &ts, int indent ) -{ - TQObjectList clo = a->childrenListObject(); - if ( clo.isEmpty() ) - return; - TQObjectListIt it( clo ); - while ( it.current() ) { - TQObject *o = it.current(); - ++it; - if ( !::tqqt_cast(o) ) - continue; - TQAction *ac = (TQAction*)o; - bool isGroup = ::tqqt_cast(ac); - if ( isGroup ) - ts << makeIndent( indent ) << "" << endl; - else - ts << makeIndent( indent ) << "" << endl; - indent++; - saveObjectProperties( ac, ts, indent ); - indent--; - if ( isGroup ) { - indent++; - saveChildActions( ac, ts, indent ); - indent--; - } - if ( isGroup ) - ts << makeIndent( indent ) << "" << endl; - else - ts << makeIndent( indent ) << "" << endl; - } -} - -void Resource::saveActions( const TQPtrList &actions, TQTextStream &ts, int indent ) -{ - if ( actions.isEmpty() ) - return; - ts << makeIndent( indent ) << "" << endl; - indent++; - TQPtrListIterator it( actions ); - while ( it.current() ) { - TQAction *a = it.current(); - bool isGroup = ::tqqt_cast(a); - if ( isGroup ) - ts << makeIndent( indent ) << "" << endl; - else - ts << makeIndent( indent ) << "" << endl; - indent++; - saveObjectProperties( a, ts, indent ); - indent--; - if ( isGroup ) { - indent++; - saveChildActions( a, ts, indent ); - indent--; - } - if ( isGroup ) - ts << makeIndent( indent ) << "" << endl; - else - ts << makeIndent( indent ) << "" << endl; - ++it; - } - indent--; - ts << makeIndent( indent ) << "" << endl; -} - -void Resource::loadChildAction( TQObject *parent, const TQDomElement &e ) -{ - TQDomElement n = e; - TQAction *a = 0; - if ( n.tagName() == "action" ) { - a = new QDesignerAction( parent ); - MetaDataBase::addEntry( a ); - TQDomElement n2 = n.firstChild().toElement(); - bool hasMenuText = FALSE; - while ( !n2.isNull() ) { - if ( n2.tagName() == "property" ) { - TQDomElement n3(n2); // don't modify n2 - TQString prop = n3.attribute( "name" ); - if (prop == "menuText") - hasMenuText = TRUE; - TQDomElement value(n3.firstChild().toElement()); - setObjectProperty( a, prop, value ); - if (!hasMenuText && uiFileVersion < "3.3" && prop == "text") - setObjectProperty( a, "menuText", value ); - } - n2 = n2.nextSibling().toElement(); - } - if ( !::tqqt_cast(parent) ) - formwindow->actionList().append( a ); - } else if ( n.tagName() == "actiongroup" ) { - a = new QDesignerActionGroup( parent ); - MetaDataBase::addEntry( a ); - TQDomElement n2 = n.firstChild().toElement(); - bool hasMenuText = FALSE; - while ( !n2.isNull() ) { - if ( n2.tagName() == "property" ) { - TQDomElement n3(n2); // don't modify n2 - TQString prop = n3.attribute( "name" ); - if (prop == "menuText") - hasMenuText = TRUE; - TQDomElement value = n3.firstChild().toElement(); - setObjectProperty( a, prop, value ); - if (!hasMenuText && uiFileVersion < "3.3" && prop == "text") - setObjectProperty( a, "menuText", value ); - } else if ( n2.tagName() == "action" || - n2.tagName() == "actiongroup" ) { - loadChildAction( a, n2 ); - } - n2 = n2.nextSibling().toElement(); - } - if ( !::tqqt_cast(parent) ) - formwindow->actionList().append( a ); - } -} - -void Resource::loadActions( const TQDomElement &e ) -{ - TQDomElement n = e.firstChild().toElement(); - while ( !n.isNull() ) { - if ( n.tagName() == "action" ) { - loadChildAction( TQT_TQOBJECT(formwindow), n ); - } else if ( n.tagName() == "actiongroup" ) { - loadChildAction( TQT_TQOBJECT(formwindow), n ); - } - n = n.nextSibling().toElement(); - } -} - -void Resource::saveToolBars( TQMainWindow *mw, TQTextStream &ts, int indent ) -{ - ts << makeIndent( indent ) << "" << endl; - indent++; - - TQPtrList tbList; - for ( int i = 0; i <= (int)TQt::DockMinimized; ++i ) { - tbList = mw->toolBars( (TQt::Dock)i ); - if ( tbList.isEmpty() ) - continue; - for ( TQToolBar *tb = tbList.first(); tb; tb = tbList.next() ) { - if ( tb->isHidden() ) - continue; - ts << makeIndent( indent ) << "" << endl; - indent++; - saveObjectProperties( TQT_TQOBJECT(tb), ts, indent ); - TQPtrList actionList = ( (QDesignerToolBar*)tb )->insertedActions(); - for ( TQAction *a = actionList.first(); a; a = actionList.next() ) { - if ( ::tqqt_cast(a) ) { - ts << makeIndent( indent ) << "" << endl; - } else { - if ( ::tqqt_cast(a) && !( (QDesignerAction*)a )->supportsMenu() ) { - TQWidget *w = ( (QDesignerAction*)a )->widget(); - ts << makeIndent( indent ) << "" << endl; - indent++; - const char *className = WidgetFactory::classNameOf( TQT_TQOBJECT(w) ); - if ( w->isA( "CustomWidget" ) ) - usedCustomWidgets << TQString( className ); - if ( WidgetFactory::hasItems( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ), TQT_TQOBJECT(w) ) ) - saveItems( TQT_TQOBJECT(w), ts, indent ); - saveObjectProperties( TQT_TQOBJECT(w), ts, indent ); - indent--; - ts << makeIndent( indent ) << "" << endl; - } else { - ts << makeIndent( indent ) << "name() << "\"/>" << endl; - } - } - } - indent--; - ts << makeIndent( indent ) << "" << endl; - } - } - indent--; - ts << makeIndent( indent ) << "" << endl; -} - -void Resource::saveMenuBar( TQMainWindow *mw, TQTextStream &ts, int indent ) -{ - MenuBarEditor *mb = (MenuBarEditor *)mw->child( 0, "MenuBarEditor" ); - if ( !mb ) - return; - ts << makeIndent( indent ) << "" << endl; - indent++; - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(mb), "name", TRUE ); // FIXME: remove - saveObjectProperties( TQT_TQOBJECT(mb), ts, indent ); - - for ( int i = 0; i < (int)mb->count(); ++i ) { - MenuBarEditorItem *m = mb->item( i ); - if ( !m ) - continue; - if ( m->isSeparator() ) { - ts << makeIndent( indent ) << "" << endl; - } else { - ts << makeIndent( indent ) << "menuText() ) - << "\" name=\"" << entitize( m->menu()->name() ) << "\">" << endl; - indent++; - savePopupMenu( m->menu(), mw, ts, indent ); - indent--; - ts << makeIndent( indent ) << "" << endl; - } - } - indent--; - ts << makeIndent( indent ) << "" << endl; -} - -void Resource::savePopupMenu( PopupMenuEditor *pm, TQMainWindow *mw, TQTextStream &ts, int indent ) -{ - for ( PopupMenuEditorItem *i = pm->items()->first(); i; i = pm->items()->next() ) { - TQAction *a = i->action(); - if ( ::tqqt_cast(a) ) - ts << makeIndent( indent ) << "" << endl; - else if ( ::tqqt_cast(a) ) - ts << makeIndent( indent ) << "name() << "\"/>" << endl; - else if ( ::tqqt_cast(a) ) - ts << makeIndent( indent ) << "name() << "\"/>" << endl; - PopupMenuEditor *s = i->subMenu(); - if ( s && s->count() ) { - TQString n = s->name(); - ts << makeIndent( indent ) << "menuText() ) - << "\" name=\"" << entitize( n ) - << "\" accel=\"" << entitize( a->accel() ) - << "\">" << endl; - indent++; - savePopupMenu( s, mw, ts, indent ); - indent--; - ts << makeIndent( indent ) << "" << endl; - } - } -} - -void Resource::loadToolBars( const TQDomElement &e ) -{ - TQDomElement n = e.firstChild().toElement(); - TQMainWindow *mw = ( (TQMainWindow*)formwindow->mainContainer() ); - QDesignerToolBar *tb = 0; - while ( !n.isNull() ) { - if ( n.tagName() == "toolbar" ) { - TQt::Dock dock = (TQt::Dock)n.attribute( "dock" ).toInt(); - tb = new QDesignerToolBar( mw, dock ); - TQDomElement n2 = n.firstChild().toElement(); - while ( !n2.isNull() ) { - if ( n2.tagName() == "action" ) { - TQAction *a = formwindow->findAction( n2.attribute( "name" ) ); - if ( a ) { - a->addTo( tb ); - tb->addAction( a ); - } - } else if ( n2.tagName() == "separator" ) { - TQAction *a = new QSeparatorAction( 0 ); - a->addTo( tb ); - tb->addAction( a ); - } else if ( n2.tagName() == "widget" ) { - TQWidget *w = (TQWidget*)createObject( n2, tb ); - QDesignerAction *a = new QDesignerAction( w, TQT_TQOBJECT(tb) ); - a->addTo( tb ); - tb->addAction( a ); - tb->installEventFilters( w ); - } else if ( n2.tagName() == "property" ) { - setObjectProperty( TQT_TQOBJECT(tb), n2.attribute( "name" ), n2.firstChild().toElement() ); - } - n2 = n2.nextSibling().toElement(); - } - } - n = n.nextSibling().toElement(); - } -} - -void Resource::loadMenuBar( const TQDomElement &e ) -{ - TQDomElement n = e.firstChild().toElement(); - TQMainWindow *mw = (TQMainWindow*)formwindow->mainContainer(); - MenuBarEditor *mb = new MenuBarEditor( formwindow, mw ); - MetaDataBase::addEntry( TQT_TQOBJECT(mb) ); - while ( !n.isNull() ) { - if ( n.tagName() == "item" ) { - PopupMenuEditor * popup = new PopupMenuEditor( formwindow, mw ); - loadPopupMenu( popup, n ); - popup->setName( n.attribute( "name" ) ); - mb->insertItem( n.attribute( "text" ), popup ); - MetaDataBase::addEntry( TQT_TQOBJECT(popup) ); - } else if ( n.tagName() == "property" ) { - setObjectProperty( TQT_TQOBJECT(mb), n.attribute( "name" ), n.firstChild().toElement() ); - } else if ( n.tagName() == "separator" ) { - mb->insertSeparator(); - } - n = n.nextSibling().toElement(); - } -} - -void Resource::loadPopupMenu( PopupMenuEditor *p, const TQDomElement &e ) -{ - MetaDataBase::addEntry( TQT_TQOBJECT(p) ); - TQDomElement n = e.firstChild().toElement(); - TQAction *a = 0; - while ( !n.isNull() ) { - if ( n.tagName() == "action" || n.tagName() == "actiongroup") { - a = formwindow->findAction( n.attribute( "name" ) ); - if ( a ) - p->insert( a ); - } - if ( n.tagName() == "item" ) { - PopupMenuEditorItem *i = p->at( p->find( a ) ); - if ( i ) { - TQString name = n.attribute( "name" ); - formwindow->unify( i, name, TRUE ); - i->setName( name ); - MetaDataBase::addEntry( i ); - loadPopupMenu( i->subMenu(), n ); - } - } else if ( n.tagName() == "separator" ) { - a = new QSeparatorAction( 0 ); - p->insert( a ); - } - n = n.nextSibling().toElement(); - } -} - -bool Resource::saveFormCode( FormFile *formfile, LanguageInterface * /*langIface*/ ) -{ - TQString lang = formfile->project()->language(); - if ( formfile->hasTempFileName() || - formfile->code().isEmpty() || - !formfile->hasFormCode() || - !formfile->isModified(FormFile::WFormCode) ) - return TRUE; // There is no code to be saved. - return saveCode( formfile->project()->makeAbsolute(formfile->codeFile()), - formfile->code() ); -} - -void Resource::loadExtraSource( FormFile *formfile, const TQString &currFileName, - LanguageInterface *langIface, bool hasFunctions ) -{ - TQString lang = "TQt Script"; - if ( MainWindow::self ) - lang = MainWindow::self->currProject()->language(); - LanguageInterface *iface = langIface; - if ( hasFunctions || !iface ) - return; - TQValueList functions; - TQStringList forwards; - TQStringList includesImpl; - TQStringList includesDecl; - TQStringList vars; - TQValueList connections; - - iface->loadFormCode( formfile->formName(), - currFileName + iface->formCodeExtension(), - functions, - vars, - connections ); - - TQFile f( formfile->project()->makeAbsolute( formfile->codeFile() ) ); - TQString code; - if ( f.open( IO_ReadOnly ) ) { - TQTextStream ts( &f ); - code = ts.read(); - } - formfile->setCode( code ); - - if ( !MainWindow::self || !MainWindow::self->currProject()->isCpp() ) - MetaDataBase::setupConnections( formfile, connections ); - - for ( TQValueList::Iterator fit = functions.begin(); - fit != functions.end(); ++fit ) { - - if ( MetaDataBase::hasFunction( formfile->formWindow() ? - (TQObject*)formfile->formWindow() : - (TQObject*)formfile, - (*fit).name.latin1() ) ) { - TQString access = (*fit).access; - if ( !MainWindow::self || !MainWindow::self->currProject()->isCpp() ) - MetaDataBase::changeFunction( formfile->formWindow() ? - (TQObject*)formfile->formWindow() : - (TQObject*)formfile, - (*fit).name, - (*fit).name, - TQString() ); - } else { - TQString access = (*fit).access; - if ( access.isEmpty() ) - access = "protected"; - TQString type = "function"; - if ( (*fit).returnType == "void" ) - type = "slot"; - MetaDataBase::addFunction( formfile->formWindow() ? - (TQObject*)formfile->formWindow() : - (TQObject*)formfile, - (*fit).name.latin1(), "virtual", (*fit).access, - type, lang, (*fit).returnType ); - } - } -} diff --git a/tdevdesigner/designer/sourceeditor.cpp b/tdevdesigner/designer/sourceeditor.cpp deleted file mode 100644 index 43d18cba..00000000 --- a/tdevdesigner/designer/sourceeditor.cpp +++ /dev/null @@ -1,320 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ -#include - -#include "sourceeditor.h" - -#include "formwindow.h" -#include "metadatabase.h" -#include "project.h" -#include "mainwindow.h" -#include "../interfaces/languageinterface.h" -#include -#include "project.h" -#include "sourcefile.h" -#include "hierarchyview.h" -#include -#include -#include "tdevdesigner_part.h" - -SourceEditor::SourceEditor( TQWidget *parent, EditorInterface *iface, LanguageInterface *liface ) - : TQVBox( parent, 0, WDestructiveClose ), iFace( iface ), lIface( liface ), obj( 0 ), pro( 0 ) -{ - iFace->addRef(); - lIface->addRef(); - editor = iFace->editor( MainWindow::self->areEditorsReadOnly(), - this, MainWindow::self->designerInterface() ); - iFace->onBreakPointChange( TQT_TQOBJECT(MainWindow::self), TQT_SLOT( breakPointsChanged() ) ); - resize( 600, 400 ); - setIcon( SmallIcon( "designer_filenew.png" , TDevDesignerPartFactory::instance()) ); -} - -SourceEditor::~SourceEditor() -{ - saveBreakPoints(); - editor = 0; - if ( formWindow() ) { - formWindow()->formFile()->setCodeEdited( FALSE ); - formWindow()->formFile()->setEditor( 0 ); - } else if ( sourceFile() ) { - sourceFile()->setEditor( 0 ); - if ( MainWindow::self->objectHierarchy()->sourceEditor() == this ) - MainWindow::self->objectHierarchy()->setFormWindow( 0, 0 ); - } - iFace->release(); - lIface->release(); - MainWindow::self->editorClosed( this ); -} - -void SourceEditor::setObject( TQObject *o, Project *p ) -{ - if ( sourceFile() ) - sourceFile()->setEditor( 0 ); - if ( formWindow() ) { - formWindow()->formFile()->setCodeEdited( FALSE ); - formWindow()->formFile()->setEditor( 0 ); - } - if ( ::tqqt_cast(o) ) - ( (FormWindow*)o )->formFile()->setCodeEdited( TRUE ); - save(); - bool changed = FALSE; - if ( &(*obj) != o ) { - saveBreakPoints(); - changed = TRUE; - } - obj = o; - pro = p; - if ( formWindow() ) { - if ( formWindow()->isFake() ) - setCaption( formWindow()->project()->objectForFakeForm( formWindow() )->name() ); - else - setCaption( obj->name() ); - } else { - setCaption( sourceFile()->fileName() ); - } - if ( sourceFile() ) - sourceFile()->setEditor( this ); - else if ( formWindow() ) - formWindow()->formFile()->setEditor( this ); - iFace->setText( sourceOfObject( obj, lang, iFace, lIface ) ); - if ( pro && formWindow() ) { - if ( formWindow()->isFake() ) - iFace->setContext( pro->objectForFakeFormFile( formWindow()->formFile() ) ); - else - iFace->setContext( TQT_TQOBJECT(formWindow()->mainContainer()) ); - } else { - iFace->setContext( 0 ); - } - if ( changed || sourceFile() ) - iFace->setBreakPoints( MetaDataBase::breakPoints( o ) ); - MainWindow::self->objectHierarchy()->showClasses( this ); -} - -TQString SourceEditor::sourceOfObject( TQObject *o, const TQString &, - EditorInterface *, LanguageInterface * ) -{ - TQString txt; - if ( !o ) - return txt; - if ( ::tqqt_cast(o) ) - txt = ( (FormWindow*)o )->formFile()->code(); - else if ( ::tqqt_cast(o) ) - txt = ( (SourceFile*)o )->text(); - return txt; -} - -void SourceEditor::setFunction( const TQString &func, const TQString &clss ) -{ - iFace->scrollTo( lIface->createFunctionStart( obj->name(), func, "", "" ), clss ); -} - -void SourceEditor::setClass( const TQString &clss ) -{ - iFace->scrollTo( clss, TQString() ); -} - -void SourceEditor::closeEvent( TQCloseEvent *e ) -{ - e->accept(); - if ( !obj ) - return; - if ( formWindow() ) { - save(); - formWindow()->formFile()->cm = formWindow()->formFile()->isModified(); - } else { - if ( !sourceFile()->closeEvent() ) - e->ignore(); - } -} - -void SourceEditor::save() -{ - if ( !obj ) - return; - if ( formWindow() ) - formWindow()->formFile()->syncCode(); - else if ( sourceFile() && sourceFile()->editor() ) - sourceFile()->setText( iFace->text() ); -} - -TQString SourceEditor::language() const -{ - return lang; -} - -void SourceEditor::setLanguage( const TQString &l ) -{ - lang = l; -} - -void SourceEditor::editCut() -{ - iFace->cut(); -} - -void SourceEditor::editCopy() -{ - iFace->copy(); -} - -void SourceEditor::editPaste() -{ - iFace->paste(); -} - -bool SourceEditor::editIsUndoAvailable() -{ - return iFace->isUndoAvailable(); -} - -bool SourceEditor::editIsRedoAvailable() -{ - return iFace->isRedoAvailable(); -} - -void SourceEditor::editUndo() -{ - iFace->undo(); -} - -void SourceEditor::editRedo() -{ - iFace->redo(); -} - -void SourceEditor::editSelectAll() -{ - iFace->selectAll(); -} - -void SourceEditor::configChanged() -{ - iFace->readSettings(); -} - -void SourceEditor::setModified( bool b ) -{ - iFace->setModified( b ); -} - -void SourceEditor::refresh( bool allowSave ) -{ - if ( allowSave ) - save(); - bool oldMod = iFace->isModified(); - iFace->setText( sourceOfObject( obj, lang, iFace, lIface ) ); - iFace->setModified( oldMod ); -} - -void SourceEditor::resetContext() -{ - if ( pro && formWindow() ) { - if ( formWindow()->isFake() ) - iFace->setContext( pro->objectForFakeFormFile( formWindow()->formFile() ) ); - else - iFace->setContext( TQT_TQOBJECT(formWindow()->mainContainer()) ); - } else { - iFace->setContext( 0 ); - } -} - -void SourceEditor::setFocus() -{ - if ( formWindow() ) - formWindow()->formFile()->setCodeEdited( TRUE ); - if ( editor ) - editor->setFocus(); -} - -int SourceEditor::numLines() const -{ - return iFace->numLines(); -} - -void SourceEditor::saveBreakPoints() -{ - if ( !obj ) - return; - TQValueList l; - iFace->breakPoints( l ); - MetaDataBase::setBreakPoints( obj, l ); -} - -void SourceEditor::clearStep() -{ - iFace->clearStep(); -} - -void SourceEditor::clearStackFrame() -{ - iFace->clearStackFrame(); -} - -void SourceEditor::resetBreakPoints() -{ - iFace->setBreakPoints( MetaDataBase::breakPoints( obj ) ); -} - -TQString SourceEditor::text() const -{ - return iFace->text(); -} - -bool SourceEditor::isModified() const -{ - return iFace->isModified(); -} - -void SourceEditor::checkTimeStamp() -{ - if ( formWindow() ) - formWindow()->formFile()->checkTimeStamp(); - else if ( sourceFile() ) - sourceFile()->checkTimeStamp(); -} - -bool SourceEditor::saveAs() -{ - if ( formWindow() ) - return formWindow()->formFile()->saveAs(); - else if ( sourceFile() ) - return sourceFile()->saveAs(); - return FALSE; -} - -SourceFile *SourceEditor::sourceFile() const -{ - if ( !::tqqt_cast((TQObject *)obj) ) - return 0; - return (SourceFile*)(TQObject*)obj; -} - -FormWindow *SourceEditor::formWindow() const -{ - if ( !::tqqt_cast((TQObject *)obj) ) - return 0; - return (FormWindow*)(TQObject*)obj; -} diff --git a/tdevdesigner/designer/startdialogimpl.cpp b/tdevdesigner/designer/startdialogimpl.cpp deleted file mode 100644 index e7099068..00000000 --- a/tdevdesigner/designer/startdialogimpl.cpp +++ /dev/null @@ -1,182 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "tdevdesigner_part.h" - -#include "mainwindow.h" -#include "startdialogimpl.h" -#include "designerapp.h" - -#include - -FileDialog::FileDialog( const TQString &dir, TQWidget *parent ) - : TQFileDialog( dir, TQString(), parent ) -{ -} - -void FileDialog::accept() -{ - emit fileSelected(); -} - - -StartDialog::StartDialog( TQWidget *parent, const TQString &templatePath ) - : StartDialogBase( parent, 0 ) -{ - newForm = new NewForm( templateView, templatePath ); - recentFiles.clear(); - initFileOpen(); - showInFuture = TRUE; - - connect( buttonHelp, TQT_SIGNAL( clicked() ), - MainWindow::self, TQT_SLOT( showDialogHelp() ) ); - connect( recentView, TQT_SIGNAL( doubleClicked(TQIconViewItem*) ), - this, TQT_SLOT( accept() ) ); - connect( recentView, TQT_SIGNAL( returnPressed(TQIconViewItem*) ), - this, TQT_SLOT( accept() ) ); - connect( fd, TQT_SIGNAL( fileSelected() ), this, TQT_SLOT( accept() ) ); -} - -void StartDialog::accept() -{ - hide(); - showInFuture = !checkShowInFuture->isChecked(); // means don't show it anymore - - int tabindex = tabWidget->currentPageIndex(); - TQString filename; - if( !tabindex ) { - if ( !templateView->currentItem() ) - return; - Project *pro = MainWindow::self->findProject( i18n( "" ) ); - if ( !pro ) - return; - MainWindow::self->setCurrentProject( pro ); - ( (NewItem*)templateView->currentItem() )->insert( pro ); - } else if ( tabindex == 1 ) { - filename = fd->selectedFile(); - } else if ( tabindex == 2 ) { - filename = recentFiles[recentView->currentItem()->index()]; - } - if ( tabindex ) { - if ( !filename.isEmpty() ) { - TQFileInfo fi( filename ); - if ( fi.extension() == "pro" ) - MainWindow::self->openProject( filename ); - else - MainWindow::self->fileOpen( "", "", filename ); - } - } - - done( Accepted ); -} - -void StartDialog::reject() -{ - done( Rejected ); -} - -void StartDialog::recentItemChanged( TQIconViewItem *item ) -{ - TQString msg( recentFiles[item->index()] ); - TQFileInfo f( recentFiles[item->index()] ); - uint s = f.size(); - TQString unit( "B" ); - if( s > 1024 ) { - s /= 1024; - unit = "KB"; - } - if ( s > 1024 ) { - s /= 1024; - unit = "MB"; - } - TQDateTime dt( f.lastModified() ); - TQString date( dt.toString( "MMMM dd hh:mm" )); - msg = TQString( "%1 (%2 %3) %4" ).arg(msg).arg(s).arg(unit).arg(date); - fileInfoLabel->setText( msg ); -} - -void StartDialog::clearFileInfo() -{ - fileInfoLabel->clear(); -} - -void StartDialog::setRecentlyFiles( TQStringList &files ) -{ - insertRecentItems( files, FALSE ); -} - -void StartDialog::setRecentlyProjects( TQStringList &projects ) -{ - insertRecentItems( projects, TRUE ); -} - -void StartDialog::insertRecentItems( TQStringList &files, bool isProject ) -{ - TQString iconName = "designer_newform.png"; - if ( isProject ) - iconName = "designer_project.png"; - TQIconViewItem *item; - TQStringList::iterator it = files.begin(); - for( ; it != files.end(); ++it ) { - TQFileInfo fi( *it ); - item = new TQIconViewItem( recentView, fi.fileName() ); - recentFiles[recentView->index( item )] = *it; - item->setPixmap( BarIcon( iconName, TDevDesignerPartFactory::instance() ) ); - item->setDragEnabled( FALSE ); - } -} - -void StartDialog::initFileOpen() -{ - TQString encode = TQDir::currentDirPath(); - TQUrl::encode( encode ); - fd = new FileDialog( encode, this ); - TQPoint point( 0, 0 ); - fd->reparent( tab, point ); - - TQObjectList *l = fd->queryList( TQPUSHBUTTON_OBJECT_NAME_STRING ); - TQObjectListIt it( *l ); - TQObject *obj; - while ( (obj = it.current()) != 0 ) { - ++it; - ((TQPushButton*)obj)->hide(); - } - delete l; - - fd->setSizeGripEnabled ( FALSE ); - tabLayout->addWidget( fd ); - - TQPluginManager manager( IID_ImportFilter, TQApplication::libraryPaths(), - MainWindow::self->pluginDirectory() ); - TQStringList filterlist; - filterlist << i18n( "Designer Files (*.ui *.pro)" ); - filterlist << i18n( "TQt User-Interface Files (*.ui)" ); - filterlist << i18n( "QMAKE Project Files (*.pro)" ); - - TQStringList list = manager.featureList(); - for ( TQStringList::Iterator it2 = list.begin(); it2 != list.end(); ++it2 ) - filterlist << *it2; - - filterlist << i18n( "All Files (*)" ); - TQString filters = filterlist.join( ";;" ); - fd->setFilters( filters ); - - fd->show(); -} diff --git a/tdevdesigner/designer/tdevdesigner_part.cpp b/tdevdesigner/designer/tdevdesigner_part.cpp deleted file mode 100644 index def9aa7f..00000000 --- a/tdevdesigner/designer/tdevdesigner_part.cpp +++ /dev/null @@ -1,565 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Alexander Dymo * - * cloudtemple@mksat.net * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ - -#include "tdevdesigner_part.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include "mainwindow.h" -#include "designeraction.h" -#include "formwindow.h" - -TDevDesignerPart::TDevDesignerPart( TQWidget *parentWidget, const char *// widgetName - , - TQObject *parent, const char *name, const TQStringList &args ) - : KInterfaceDesigner::Designer(parent, name) -{ - setInstance( TDevDesignerPartFactory::instance() ); - - m_widget = new MainWindow( this, true ); - m_widget->reparent(parentWidget, TQPoint(0,0)); - setupDesignerWindow(); - - setWidget(m_widget); - - setupActions(); - if (args.contains("in shell")) - setXMLFile("tdevdesigner_part_sh.rc"); - else - setXMLFile("tdevdesigner_part.rc"); - - setReadWrite(true); - setModified(false); - - connect(m_widget, TQT_SIGNAL(formModified(bool )), this, TQT_SLOT(formModified(bool))); -} - -void TDevDesignerPart::setupDesignerWindow() -{ - m_widget->menuBar()->hide(); - m_widget->layoutToolBar->hide(); - m_widget->projectToolBar->hide(); - m_widget->toolsToolBar->hide(); - m_widget->statusBar()->hide(); -} - -static TQIconSet createPartIconSet( const TQString &name ) -{ - TQIconSet ic( BarIcon( "" + name, TDevDesignerPartFactory::instance() ) ); - TQString prefix = "designer_"; - int right = name.length() - prefix.length(); - ic.setPixmap( BarIcon( prefix + "d_" + name.right( right ), TDevDesignerPartFactory::instance() ), - TQIconSet::Small, TQIconSet::Disabled ); - return ic; -} - -void TDevDesignerPart::setupActions( ) -{ - TDEAction *action; - action = KStdAction::openNew(this, TQT_SLOT(fileNew()), actionCollection()); - action = KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection()); - action = KStdAction::close(this, TQT_SLOT(fileClose()), actionCollection()); - stateSync(action, m_widget->actionFileClose); - action = KStdAction::save(this, TQT_SLOT(save()), actionCollection()); - stateSync(action, m_widget->actionFileSave); - action = KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection()); - stateSync(action, m_widget->actionFileSaveAs); - action = new TDEAction(i18n("Save Al&l"), 0, this, TQT_SLOT(fileSaveAs()), actionCollection(), "file_saveall"); - stateSync(action, m_widget->actionFileSaveAll); - new TDEAction(i18n("Create &Template..."), 0, this, TQT_SLOT(fileCreateTemplate()), actionCollection(), "file_createtemplate"); - - action = KStdAction::undo(this, TQT_SLOT(editUndo()), actionCollection()); - stateSync(action, m_widget->actionEditUndo); - action = KStdAction::redo(this, TQT_SLOT(editRedo()), actionCollection()); - stateSync(action, m_widget->actionEditRedo); - action = KStdAction::cut(this, TQT_SLOT(editCut()), actionCollection()); - stateSync(action, m_widget->actionEditCut); - action = KStdAction::copy(this, TQT_SLOT(editCopy()), actionCollection()); - stateSync(action, m_widget->actionEditCopy); - action = KStdAction::paste(this, TQT_SLOT(editPaste()), actionCollection()); - stateSync(action, m_widget->actionEditPaste); - action = new TDEAction(i18n("&Delete"), Key_Delete, this, TQT_SLOT(editDelete()), actionCollection(), "edit_delete"); - stateSync(action, m_widget->actionEditDelete); - action = KStdAction::selectAll(this, TQT_SLOT(editSelectAll()), actionCollection()); - stateSync(action, m_widget->actionEditSelectAll); - action = new TDEAction(i18n("Chec&k Accelerators"), ALT + Key_R, this, TQT_SLOT(editAccels()), actionCollection(), "edit_accels"); - stateSync(action, m_widget->actionEditAccels); - action = new TDEAction(i18n("S&lots..."), createPartIconSet("designer_editslots.png"), 0, this, TQT_SLOT(editFunctions()), actionCollection(), "edit_functions"); - stateSync(action, m_widget->actionEditFunctions); - action = new TDEAction(i18n("Co&nnections..."), createPartIconSet("designer_connecttool.png"), 0, this, TQT_SLOT(editConnections()), actionCollection(), "edit_connections"); - stateSync(action, m_widget->actionEditConnections); - action = new TDEAction(i18n("&Form Settings..."), 0, this, TQT_SLOT(editFormSettings()), actionCollection(), "edit_formsettings"); - stateSync(action, m_widget->actionEditFormSettings); - - action = new TDEAction(i18n("&Add File..."), 0, this, TQT_SLOT(projectAddFile()), actionCollection(), "project_addfile"); - stateSync(action, m_widget->actionProjectAddFile); - action = new TDEAction(i18n("&Image Collection..."), 0, this, TQT_SLOT(projectImageCollection()), actionCollection(), "project_imagecollection"); - stateSync(action, m_widget->actionEditPixmapCollection); - action = new TDEAction(i18n("&Database Connections..."), 0, this, TQT_SLOT(projectDatabaseCollections()), actionCollection(), "project_databasecollections"); - stateSync(action, m_widget->actionEditDatabaseConnections); - action = new TDEAction(i18n("&Designer Project Settings..."), 0, this, TQT_SLOT(projectSettings()), actionCollection(), "project_settings"); - stateSync(action, m_widget->actionEditProjectSettings); - - TDERadioAction *toggle; - toggle = new TDERadioAction(i18n("&Pointer"), createPartIconSet("designer_pointer.png"), Key_F2, actionCollection(), "tools_pointer"); - setupToolsAction(toggle, m_widget->actionPointerTool); - pointerAction = toggle; - toggle = new TDERadioAction(i18n("&Connect Signal/Slots"), createPartIconSet("designer_connecttool.png"), Key_F3, actionCollection(), "tools_connect"); - setupToolsAction(toggle, m_widget->actionConnectTool); - toggle = new TDERadioAction(i18n("Tab &Order"), createPartIconSet("designer_ordertool.png"), Key_F4, actionCollection(), "tools_taborder"); - setupToolsAction(toggle, m_widget->actionOrderTool); - toggle = new TDERadioAction(i18n("Set &Buddy"), createPartIconSet("designer_setbuddy.png"), Key_F12, actionCollection(), "tools_setbuddy"); - setupToolsAction(toggle, m_widget->actionBuddyTool); - new TDEAction(i18n("Configure Toolbox..."), 0, this, TQT_SLOT(toolsConfigureToolbox()), actionCollection(), "tools_toolbox"); - new TDEAction(i18n("Edit &Custom Widgets..."), 0, this, TQT_SLOT(toolsEditCustomWidgets()), actionCollection(), "tools_editcustomwidgets"); - - action = new TDEAction(i18n("Adjust &Size"), createPartIconSet("designer_adjustsize.png"), CTRL + Key_J, this, TQT_SLOT(layoutAdjustSize()), actionCollection(), "layout_adjustsize"); - stateSync(action, m_widget->actionEditAdjustSize); - action = new TDEAction(i18n("Lay Out &Horizontally"), createPartIconSet("designer_edithlayout.png"), CTRL + Key_H, this, TQT_SLOT(layoutHLayout()), actionCollection(), "layout_h"); - stateSync(action, m_widget->actionEditHLayout); - action = new TDEAction(i18n("Lay Out &Vertically"), createPartIconSet("designer_editvlayout.png"), CTRL + Key_V, this, TQT_SLOT(layoutVLayout()), actionCollection(), "layout_v"); - stateSync(action, m_widget->actionEditVLayout); - action = new TDEAction(i18n("Lay Out in &Grid"), createPartIconSet("designer_editgrid.png"), CTRL + Key_G, this, TQT_SLOT(layoutGridLayout()), actionCollection(), "layout_grid"); - stateSync(action, m_widget->actionEditGridLayout); - action = new TDEAction(i18n("Lay OutQt::Horizontally (in S&plitter)"), createPartIconSet("designer_editvlayoutsplit.png"), 0, this, TQT_SLOT(layoutSplitHLayout()), actionCollection(), "layout_splith"); - stateSync(action, m_widget->actionEditSplitHorizontal); - action = new TDEAction(i18n("Lay OutQt::Vertically (in Sp&litter)"), createPartIconSet("designer_edithlayoutsplit.png"), 0, this, TQT_SLOT(layoutSplitVLayout()), actionCollection(), "layout_splitv"); - stateSync(action, m_widget->actionEditSplitVertical); - action = new TDEAction(i18n("&Break Layout"), createPartIconSet("designer_editbreaklayout.png"), CTRL + Key_B, this, TQT_SLOT(layoutBreak()), actionCollection(), "layout_break"); - stateSync(action, m_widget->actionEditBreakLayout); - toggle = new TDERadioAction(i18n("Add Spacer"), createPartIconSet("designer_spacer.png"), 0, actionCollection(), "layout_spacer"); - setupToolsAction(toggle, m_widget->actionInsertSpacer); - - action = new TDEAction(i18n("Preview &Form"), CTRL + Key_T, this, TQT_SLOT(windowPreview()), actionCollection(), "window_preview"); - stateSync(action, m_widget->actionPreview); - action = new TDEAction(i18n("Ne&xt Form"), CTRL + Key_F6, this, TQT_SLOT(windowNext()), actionCollection(), "window_next"); - stateSync(action, m_widget->actionWindowNext); - action = new TDEAction(i18n("Pre&vious Form"), CTRL + SHIFT + Key_F6, this, TQT_SLOT(windowPrev()), actionCollection(), "window_prev"); - stateSync(action, m_widget->actionWindowPrevious); - - action = KStdAction::preferences(this, TQT_SLOT(editPreferences()), actionCollection()); - action->setText(i18n("Configure &TDevDesigner...")); - stateSync(action, m_widget->actionEditPreferences); -} - -TDevDesignerPart::~TDevDesignerPart() -{ -} - -void TDevDesignerPart::setReadWrite(bool rw) -{ - ReadWritePart::setReadWrite(rw); -} - -void TDevDesignerPart::setModified(bool modified) -{ -/* TDEAction *save = actionCollection()->action(KStdAction::stdName(KStdAction::Save)); - if (!save) - return; - if (modified) - save->setEnabled(true); - else - save->setEnabled(false);*/ - - ReadWritePart::setModified(modified); -} - -bool TDevDesignerPart::openFile() -{ - m_widget->fileOpen("", "", m_file); - return true; -} - -bool TDevDesignerPart::saveFile() -{ - if (isReadWrite() == false) - return false; - m_widget->actionFileSaveAll->activate(); - return true; -} - -void TDevDesignerPart::stateSync( TDEAction * tdeaction, TQAction * qaction ) -{ - if (!qaction) - return; - tdeaction->setEnabled(qaction->isEnabled()); - DesignerAction *ac = dynamic_cast(qaction); - if (!ac) - return; - connect(ac, TQT_SIGNAL(actionEnabled(bool )), tdeaction, TQT_SLOT(setEnabled(bool ))); -} - -void TDevDesignerPart::setupToolsAction( TDERadioAction * toggle, TQAction * action ) -{ - if (!action) - return; - - toggle->setGroup("tools"); - toggle->setExclusiveGroup("tools"); - connect(action, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(setToggleActionChecked(bool ))); - connect(toggle, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(setToggleActionOn(bool))); - toggle->setChecked(action->isOn()); - m_actionMap[action] = toggle; - m_actionMap2[toggle] = action; -} - - -// It's usually safe to leave the factory code alone.. with the -// notable exception of the TDEAboutData data -#include -#include - -TDEInstance* TDevDesignerPartFactory::s_instance = 0L; -TDEAboutData* TDevDesignerPartFactory::s_about = 0L; - -TDevDesignerPartFactory::TDevDesignerPartFactory() - : KParts::Factory() -{ -} - -TDevDesignerPartFactory::~TDevDesignerPartFactory() -{ - delete s_instance; - delete s_about; - - s_instance = 0L; -} - -KParts::Part* TDevDesignerPartFactory::createPartObject( TQWidget *parentWidget, const char *widgetName, - TQObject *parent, const char *name, - const char *classname, const TQStringList &args ) -{ - // Create an instance of our Part - TDevDesignerPart* obj = new TDevDesignerPart( parentWidget, widgetName, parent, name, args ); - - // See if we are to be read-write or not - if (TQCString(classname) == "KParts::ReadOnlyPart") - obj->setReadWrite(false); - - return obj; -} - -TDEInstance* TDevDesignerPartFactory::instance() -{ - if( !s_instance ) - { - s_about = new TDEAboutData("tdevdesignerpart", I18N_NOOP("TDevDesignerPart"), "0.1"); - s_about->addAuthor("Alexander Dymo", 0, "cloudtemple@mksat.net"); - s_about->addAuthor("Trolltech AS", 0, "info@trolltech.com"); - s_instance = new TDEInstance(s_about); - } - return s_instance; -} - -extern "C" -{ - void* init_libtdevdesignerpart() - { - return new TDevDesignerPartFactory; - } -} - -//actions - -void TDevDesignerPart::fileNew( ) -{ - if (!m_widget->actionNewFile) - { - tqWarning("wrong m_widget->actionNewFile"); - return; - } - m_widget->actionNewFile->activate(); -} - -void TDevDesignerPart::fileOpen() -{ - m_widget->fileOpen(); -} - -void TDevDesignerPart::fileSaveAs() -{ - m_widget->actionFileSaveAs->activate(); -} - -void TDevDesignerPart::fileClose( ) -{ - m_widget->actionFileClose->activate(); -} - -void TDevDesignerPart::fileCreateTemplate( ) -{ - m_widget->fileCreateTemplate(); -} - -void TDevDesignerPart::editUndo( ) -{ - m_widget->actionEditUndo->activate(); -} - -void TDevDesignerPart::editRedo( ) -{ - m_widget->actionEditRedo->activate(); -} - -void TDevDesignerPart::editCut( ) -{ - m_widget->actionEditCut->activate(); -} - -void TDevDesignerPart::editPaste( ) -{ - m_widget->actionEditPaste->activate(); -} - -void TDevDesignerPart::editCopy( ) -{ - m_widget->actionEditCopy->activate(); -} - -void TDevDesignerPart::editDelete( ) -{ - m_widget->actionEditDelete->activate(); -} - -void TDevDesignerPart::editSelectAll( ) -{ - m_widget->actionEditSelectAll->activate(); -} - -void TDevDesignerPart::editAccels( ) -{ - m_widget->actionEditAccels->activate(); -} - -void TDevDesignerPart::editFunctions( ) -{ - m_widget->actionEditFunctions->activate(); -} - -void TDevDesignerPart::editConnections( ) -{ - m_widget->actionEditConnections->activate(); -} - -void TDevDesignerPart::editFormSettings( ) -{ - m_widget->actionEditFormSettings->activate(); -} - -void TDevDesignerPart::editPreferences( ) -{ - m_widget->actionEditPreferences->activate(); -} - -void TDevDesignerPart::projectAddFile( ) -{ - m_widget->actionProjectAddFile->activate(); -} - -void TDevDesignerPart::projectImageCollection( ) -{ - m_widget->actionEditPixmapCollection->activate(); -} - -void TDevDesignerPart::projectDatabaseCollections( ) -{ - m_widget->actionEditDatabaseConnections->activate(); -} - -void TDevDesignerPart::projectSettings( ) -{ - m_widget->actionEditProjectSettings->activate(); -} - -void TDevDesignerPart::toolsConfigureToolbox( ) -{ - m_widget->toolsConfigure(); -} - -void TDevDesignerPart::layoutAdjustSize( ) -{ - m_widget->actionEditAdjustSize->activate(); -} - -void TDevDesignerPart::layoutHLayout( ) -{ - m_widget->actionEditHLayout->activate(); -} - -void TDevDesignerPart::layoutVLayout( ) -{ - m_widget->actionEditVLayout->activate(); -} - -void TDevDesignerPart::layoutGridLayout( ) -{ - m_widget->actionEditGridLayout->activate(); -} - -void TDevDesignerPart::layoutSplitHLayout( ) -{ - m_widget->actionEditSplitHorizontal->activate(); -} - -void TDevDesignerPart::layoutSplitVLayout( ) -{ - m_widget->actionEditSplitVertical->activate(); -} - -void TDevDesignerPart::layoutBreak( ) -{ - m_widget->actionEditBreakLayout->activate(); -} - -void TDevDesignerPart::windowPreview( ) -{ - m_widget->actionPreview->activate(); -} - -void TDevDesignerPart::windowNext( ) -{ - m_widget->actionWindowNext->activate(); -} - -void TDevDesignerPart::windowPrev( ) -{ - m_widget->actionWindowPrevious->activate(); -} - -void TDevDesignerPart::statusMessage( const TQString & msg ) -{ - emit setStatusBarText(msg); -} - -void TDevDesignerPart::setToggleActionChecked( bool b) -{ - if (!sender()) - return; - const TQAction *action = dynamic_cast(sender()); - if (!action) - return; - if (b) - { - if (action == m_widget->actionPointerTool) - pointerAction->setChecked(true); - return; - } - TDERadioAction *tdeaction = m_actionMap[action]; - if (!tdeaction) - return; -// kdDebug() << "untoggle action: " << tdeaction->text() << endl; - tdeaction->blockSignals(true); - tdeaction->setChecked(b); - tdeaction->blockSignals(false); -} - -void TDevDesignerPart::setToggleActionOn( bool b ) -{ - if (!sender()) - return; - const TDERadioAction *action = dynamic_cast(sender()); - if (!action) - return; -// kdDebug() << (b?TQString("toggle"):TQString("untoggle")) << " action: " << action->text() << endl; - TQAction *qaction = m_actionMap2[action]; - if (!qaction) - return; - disconnect(qaction, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(setToggleActionChecked(bool ))); - qaction->setOn(b); - connect(qaction, TQT_SIGNAL(toggled(bool )), this, TQT_SLOT(setToggleActionChecked(bool ))); -} - -void TDevDesignerPart::openProject( const TQString & // projectFile - ) -{ - //TODO: implement - return; -} - -KInterfaceDesigner::DesignerType TDevDesignerPart::designerType( ) -{ - return KInterfaceDesigner::TQtDesigner; -} - -void TDevDesignerPart::emitAddedFunction( const TQString & form, KInterfaceDesigner::Function func ) -{ - kdDebug() << "TDevDesignerPart::emitAddedFunction: form " << form << ", function: " << func.function << endl; - emit addedFunction(designerType(), form, func); -} - -void TDevDesignerPart::emitRemovedFunction( const TQString & form, KInterfaceDesigner::Function func ) -{ - kdDebug() << "TDevDesignerPart::emitRemovedFunction: form " << form << ", function: " << func.function << endl; - emit removedFunction(designerType(), form, func); -} - -void TDevDesignerPart::emitEditedFunction( const TQString & form, KInterfaceDesigner::Function oldFunc, KInterfaceDesigner::Function func ) -{ - kdDebug() << "TDevDesignerPart::emitEditedFunction: form " << form - << ", old function: " << oldFunc.function - << ", function: " << func.function << endl; - -// m_widget->formWindow()->clearSelection(false); - emit editedFunction(designerType(), form, oldFunc, func); -} - -void TDevDesignerPart::emitEditFunction(const TQString &formName, const TQString &functionName) -{ - kdDebug() << "TDevDesignerPart::emitEditedFunction: form " << formName - << ", function: " << functionName << endl; - emit editFunction(designerType(), formName, functionName); -} - -void TDevDesignerPart::formModified(bool b) -{ - kdDebug() << "TDevDesignerPart::formModified " << b << endl; - setModified(b); -} - -void TDevDesignerPart::emitEditSource(const TQString &formName) -{ - emit editSource(designerType(), formName); -} - -void TDevDesignerPart::emitNewStatus(const TQString &formName, int status) -{ - emit newStatus(formName, status); -} - -void TDevDesignerPart::toolsEditCustomWidgets( ) -{ - m_widget->toolsCustomWidget(); -} - -#include "tdevdesigner_part.moc" diff --git a/tdevdesigner/designer/tdevdesigner_part.desktop b/tdevdesigner/designer/tdevdesigner_part.desktop deleted file mode 100644 index 998d4f74..00000000 --- a/tdevdesigner/designer/tdevdesigner_part.desktop +++ /dev/null @@ -1,16 +0,0 @@ -[Desktop Entry] -Name=TDevDesignerPart -Name[da]=TDevelop Designer-part -Name[el]=ΤμήμαTDevDesigner -Name[nds]=Kdevelop-Makerkomponent -Name[ne]=केडीई विकास डिजाइनर भाग -Name[sv]=TDevelop designerdel -Name[ta]=கேமேம்பாட்டு வடிவமைப்பாளர் பகுதி -Name[tg]=KDevҚисми дизайнгар -Name[zh_TW]=TDevelop 設計元件 -MimeType=application/x-designer -ServiceTypes=KParts/ReadOnlyPart,KParts/ReadWritePart -X-TDE-Library=libtdevdesignerpart -Type=Service -InitialPreference=10 - diff --git a/tdevdesigner/designer/tdevdesigner_part.h b/tdevdesigner/designer/tdevdesigner_part.h deleted file mode 100644 index 3381da5a..00000000 --- a/tdevdesigner/designer/tdevdesigner_part.h +++ /dev/null @@ -1,148 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Alexander Dymo * - * cloudtemple@mksat.net * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ - -#ifndef _TDEVDESIGNERPART_H_ -#define _TDEVDESIGNERPART_H_ - -#include - -#include -#include - -#include "designer.h" - -class TQWidget; -class TQPainter; -class KURL; -class MainWindow; -class TDEAction; -class TQAction; -class TDERadioAction; - -class TDevDesignerPart : public KInterfaceDesigner::Designer -{ - Q_OBJECT - -public: - TDevDesignerPart(TQWidget *parentWidget, const char *widgetName, - TQObject *parent, const char *name, const TQStringList &args); - virtual ~TDevDesignerPart(); - - virtual void setReadWrite(bool rw); - virtual void setModified(bool modified); - - void statusMessage(const TQString &msg); - - //KInterfaceDesigner::Designer methods - virtual void openProject(const TQString &projectFile); - virtual KInterfaceDesigner::DesignerType designerType(); - - void emitAddedFunction(const TQString &form, KInterfaceDesigner::Function func); - void emitEditedFunction(const TQString &form, KInterfaceDesigner::Function oldFunc, KInterfaceDesigner::Function func); - void emitRemovedFunction(const TQString &form, KInterfaceDesigner::Function func); - - void emitEditFunction(const TQString &formName, const TQString &functionName); - void emitEditSource(const TQString &formName); - - void emitNewStatus(const TQString &formName, int status); - -protected: - virtual bool openFile(); - virtual bool saveFile(); - - void setupDesignerWindow(); - void setupActions(); - - void stateSync(TDEAction *tdeaction, TQAction *qaction); - void setupToolsAction(TDERadioAction *toggle, TQAction *action); - -protected slots: - void setToggleActionChecked(bool b); - void setToggleActionOn(bool b); - - void fileNew(); - void fileOpen(); - void fileClose(); - void fileSaveAs(); - void fileCreateTemplate(); - - void editUndo(); - void editRedo(); - void editCut(); - void editCopy(); - void editPaste(); - void editDelete(); - void editSelectAll(); - void editAccels(); - void editFunctions(); - void editConnections(); - void editFormSettings(); - void editPreferences(); - - void projectAddFile(); - void projectImageCollection(); - void projectDatabaseCollections(); - void projectSettings(); - - void toolsConfigureToolbox(); - void toolsEditCustomWidgets(); - - void layoutAdjustSize(); - void layoutHLayout(); - void layoutVLayout(); - void layoutGridLayout(); - void layoutSplitHLayout(); - void layoutSplitVLayout(); - void layoutBreak(); - - void windowPreview(); - void windowNext(); - void windowPrev(); - - void formModified(bool b); -private: - MainWindow *m_widget; - - TQMap m_actionMap; - TQMap m_actionMap2; - TDERadioAction* pointerAction; -}; - -class TDEInstance; -class TDEAboutData; - -class TDevDesignerPartFactory : public KParts::Factory -{ - Q_OBJECT - -public: - TDevDesignerPartFactory(); - virtual ~TDevDesignerPartFactory(); - virtual KParts::Part* createPartObject( TQWidget *parentWidget, const char *widgetName, - TQObject *parent, const char *name, - const char *classname, const TQStringList &args ); - static TDEInstance* instance(); - -private: - static TDEInstance* s_instance; - static TDEAboutData* s_about; -}; - -#endif // _TDEVDESIGNERPART_H_ diff --git a/tdevdesigner/designer/tdevdesigner_part.rc b/tdevdesigner/designer/tdevdesigner_part.rc deleted file mode 100644 index 318a0761..00000000 --- a/tdevdesigner/designer/tdevdesigner_part.rc +++ /dev/null @@ -1,121 +0,0 @@ - - - - &File - - - - - - &Edit - - - - - - - - - - - - - - - - - - - &Project - - - - - - - - &Tools - - - - - - - - - - &Layout - - - - - - - - - - - - - &Settings - - - - &Window - - - - - - - - - - -Main Toolbar - - - - - - - - - - - - -Layout Toolbar - - - - - - - - - - - - -Tools Toolbar - - - - - - - diff --git a/tdevdesigner/designer/tdevdesigner_part_sh.rc b/tdevdesigner/designer/tdevdesigner_part_sh.rc deleted file mode 100644 index c0ec9d8a..00000000 --- a/tdevdesigner/designer/tdevdesigner_part_sh.rc +++ /dev/null @@ -1,116 +0,0 @@ - - - - &File - - - - - - - - - - - - - - &Edit - - - - - - - - - - - - - - - - - - &Project - - - - - - - - &Tools - - - - - - - - - - &Layout - - - - - - - - - - - - - &Settings - - - - &Window - - - - - - - - -File Toolbar - - - - - -Edit Toolbar - - - - - - - - -Layout Toolbar - - - - - - - - - - - - -Tools Toolbar - - - - - - - diff --git a/tdevdesigner/designer/widgetfactory.cpp b/tdevdesigner/designer/widgetfactory.cpp deleted file mode 100644 index 1271e84e..00000000 --- a/tdevdesigner/designer/widgetfactory.cpp +++ /dev/null @@ -1,1805 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include // HP-UX compiler need this here -#include "widgetfactory.h" -#include -#include "metadatabase.h" -#include "mainwindow.h" -#include "formwindow.h" -#include "propertyeditor.h" -#include "tqlayout.h" -#include "listboxeditorimpl.h" -#include "listvieweditorimpl.h" -#include "iconvieweditorimpl.h" -#include "formwindow.h" -#include "multilineeditorimpl.h" -#include "../interfaces/widgetinterface.h" -#ifndef TQT_NO_TABLE -#include "tableeditorimpl.h" -#endif -#include "project.h" -#include "menubareditor.h" -#include "popupmenueditor.h" - -#include "tdevdesigner_part.h" - -#include - -#include - -#include -#include -#include -#ifndef TQT_NO_TABLE -#include -#endif -#ifndef TQT_NO_SQL -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifndef TQT_NO_SQL -#include "database.h" -#endif - -#define NO_STATIC_COLORS -#include -#include - -#include - -FormWindow *find_formwindow( TQWidget *w ) -{ - if ( !w ) - return 0; - for (;;) { - if ( ::tqqt_cast(w) ) - return (FormWindow*)w; - if ( !w->parentWidget() ) - return 0; - w = w->parentWidget(); - } -} - -void TQLayoutWidget::paintEvent( TQPaintEvent* ) -{ - TQPainter p ( this ); - p.setPen( red ); - p.drawRect( rect() ); -} - - -QDesignerTabWidget::QDesignerTabWidget( TQWidget *parent, const char *name ) - : TQTabWidget( parent, name ), dropIndicator( 0 ), dragPage( 0 ), mousePressed( FALSE ) -{ - tabBar()->setAcceptDrops( TRUE ); - tabBar()->installEventFilter( this ); -} - -int QDesignerTabWidget::currentPage() const -{ - return tabBar()->currentTab(); -} - -void QDesignerTabWidget::setCurrentPage( int i ) -{ - tabBar()->setCurrentTab( i ); -} - -TQString QDesignerTabWidget::pageTitle() const -{ - return ((TQTabWidget*)this)->tabLabel( TQTabWidget::currentPage() ); -} - -void QDesignerTabWidget::setPageTitle( const TQString& title ) -{ - changeTab( TQTabWidget::currentPage(), title ); -} - -void QDesignerTabWidget::setPageName( const TQCString& name ) -{ - if ( TQTabWidget::currentPage() ) - TQTabWidget::currentPage()->setName( name ); -} - -TQCString QDesignerTabWidget::pageName() const -{ - if ( !TQTabWidget::currentPage() ) - return 0; - return TQTabWidget::currentPage()->name(); -} - -int QDesignerTabWidget::count() const -{ - return tabBar()->count(); -} - -bool QDesignerTabWidget::eventFilter( TQObject *o, TQEvent *e ) -{ - if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(tabBar()) ) return FALSE; - - switch ( e->type() ) { - case TQEvent::MouseButtonPress: { - mousePressed = TRUE; - TQMouseEvent *me = (TQMouseEvent*)e; - pressPoint = me->pos(); - } - break; - case TQEvent::MouseMove: { - TQMouseEvent *me = (TQMouseEvent*)e; - if ( mousePressed && ( pressPoint - me->pos()).manhattanLength() > TQApplication::startDragDistance() ) { - TQTextDrag *drg = new TQTextDrag( TQString::number( (long) this ) , this ); - mousePressed = FALSE; - dragPage = TQTabWidget::currentPage(); - dragLabel = TQTabWidget::tabLabel( dragPage ); - - int index = indexOf( dragPage ); - - removePage( dragPage ); - if ( !drg->dragMove() ) { - insertTab( dragPage, dragLabel, index ); - showPage( dragPage ); - } - if ( dropIndicator ) - dropIndicator->hide(); - } - } - break; - case TQEvent::DragLeave: { - if ( dropIndicator ) - dropIndicator->hide(); - } - break; - case TQEvent::DragMove: { - TQDragEnterEvent *de = (TQDragEnterEvent*) e; - if ( TQTextDrag::canDecode( de ) ) { - TQString text; - TQTextDrag::decode( de, text ); - if ( text == TQString::number( (long)this ) ) - de->accept(); - else - return FALSE; - } - - int index = 0; - TQRect rect; - for ( ; index < tabBar()->count(); index++ ) { - if ( tabBar()->tabAt( index )->rect().contains( de->pos() ) ) { - rect = tabBar()->tabAt( index )->rect(); - break; - } - } - - if ( index == tabBar()->count() -1 ) { - TQRect rect2 = rect; - rect2.setLeft( rect2.left() + rect2.width() / 2 ); - if ( rect2.contains( de->pos() ) ) - index++; - } - - if ( ! dropIndicator ) { - dropIndicator = new TQWidget( this ); - dropIndicator->setBackgroundColor( red ); - } - - TQPoint pos; - if ( index == tabBar()->count() ) - pos = tabBar()->mapToParent( TQPoint( rect.x() + rect.width(), rect.y() ) ); - else - pos = tabBar()->mapToParent( TQPoint( rect.x(), rect.y() ) ); - - dropIndicator->setGeometry( pos.x(), pos.y() , 3, rect.height() ); - dropIndicator->show(); - } - break; - case TQEvent::Drop: { - TQDragEnterEvent *de = (TQDragEnterEvent*) e; - if ( TQTextDrag::canDecode( de ) ) { - TQString text; - TQTextDrag::decode( de, text ); - if ( text == TQString::number( (long)this ) ) { - - int newIndex = 0; - for ( ; newIndex < tabBar()->count(); newIndex++ ) { - if ( tabBar()->tabAt( newIndex )->rect().contains( de->pos() ) ) - break; - } - - if ( newIndex == tabBar()->count() -1 ) { - TQRect rect2 = tabBar()->tabAt( newIndex )->rect(); - rect2.setLeft( rect2.left() + rect2.width() / 2 ); - if ( rect2.contains( de->pos() ) ) - newIndex++; - } - - int oldIndex = 0; - for ( ; oldIndex < tabBar()->count(); oldIndex++ ) { - if ( tabBar()->tabAt( oldIndex )->rect().contains( pressPoint ) ) - break; - } - - FormWindow *fw = find_formwindow( this ); - MoveTabPageCommand *cmd = - new MoveTabPageCommand( i18n( "Move Tab Page" ), fw, this, - dragPage, dragLabel, newIndex, oldIndex ); - fw->commandHistory()->addCommand( cmd ); - cmd->execute(); - de->accept(); - } - } - } - break; - default: - break; - } - return FALSE; -} - - -QDesignerWidgetStack::QDesignerWidgetStack( TQWidget *parent, const char *name ) - : TQWidgetStack( parent, name ) -{ - prev = new TQToolButton( TQt::LeftArrow, this, "designer_wizardstack_button" ); - prev->setAutoRaise( TRUE ); - prev->setAutoRepeat( TRUE ); - prev->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored ) ); - next = new TQToolButton( TQt::RightArrow, this, "designer_wizardstack_button" ); - next->setAutoRaise( TRUE ); - next->setAutoRepeat( TRUE ); - next->setSizePolicy( TQSizePolicy( TQSizePolicy::Ignored, TQSizePolicy::Ignored ) ); - connect( prev, TQT_SIGNAL( clicked() ), this, TQT_SLOT( prevPage() ) ); - connect( next, TQT_SIGNAL( clicked() ), this, TQT_SLOT( nextPage() ) ); - updateButtons(); -} - -void QDesignerWidgetStack::updateButtons() -{ - prev->setGeometry( width() - 31, 1, 15, 15 ); - next->setGeometry( width() - 16, 1, 15, 15 ); - prev->show(); - next->show(); - prev->raise(); - next->raise(); -} - -void QDesignerWidgetStack::prevPage() -{ - setCurrentPage( currentPage() - 1 ); -} - -void QDesignerWidgetStack::nextPage() -{ - setCurrentPage( currentPage() + 1 ); -} - -int QDesignerWidgetStack::currentPage() const -{ - QDesignerWidgetStack* that = (QDesignerWidgetStack*) this; - return that->pages.find( visibleWidget() ); -} - -void QDesignerWidgetStack::setCurrentPage( int i ) -{ - // help next/prev page commands - if ( i < 0 ) - i += count(); - if ( i >= count() ) - i -= count(); - - if ( i < 0 || i >= count() ) - return; - raiseWidget( pages.at( i ) ); - updateButtons(); -} - -TQCString QDesignerWidgetStack::pageName() const -{ - if ( !visibleWidget() ) - return 0; - return visibleWidget()->name(); -} - -void QDesignerWidgetStack::setPageName( const TQCString& name ) -{ - if ( visibleWidget() ) - visibleWidget()->setName( name ); -} - -int QDesignerWidgetStack::count() const -{ - return pages.count(); -} - -TQWidget* QDesignerWidgetStack::page( int i ) const -{ - if ( i < 0 || i >= count() ) - return 0; - QDesignerWidgetStack* that = (QDesignerWidgetStack*) this; - return that->pages.at( i ); -} - - -int QDesignerWidgetStack::insertPage( TQWidget *p, int i ) -{ - if ( i < 0 ) - pages.append( p ); - else - pages.insert( (uint) i, p ); - addWidget( p ); - p->show(); - raiseWidget( p ); - TQApplication::sendPostedEvents(); - updateButtons(); - return pages.find( p ); -} - -int QDesignerWidgetStack::removePage( TQWidget *p ) -{ - int i = pages.find( p ); - pages.remove( p ); - removeWidget( p ); - setCurrentPage( 0 ); - updateButtons(); - return i; -} - - -int QDesignerWizard::currentPageNum() const -{ - for ( int i = 0; i < pageCount(); ++i ) { - if ( page( i ) == currentPage() ) - return i; - } - return 0; -} - - - - - -void QDesignerWizard::setCurrentPage( int i ) -{ - if ( i < currentPageNum() ) { - while ( i < currentPageNum() ) { - if ( currentPageNum() == 0 ) - break; - back(); - } - - } else { - while ( i > currentPageNum() ) { - if ( currentPageNum() == pageCount() - 1 ) - break; - next(); - } - } -} - -TQString QDesignerWizard::pageTitle() const -{ - return title( currentPage() ); -} - -void QDesignerWizard::setPageTitle( const TQString& title ) -{ - setTitle( currentPage(), title ); -} - -void QDesignerWizard::setPageName( const TQCString& name ) -{ - if ( TQWizard::currentPage() ) - TQWizard::currentPage()->setName( name ); -} - -TQCString QDesignerWizard::pageName() const -{ - if ( !TQWizard::currentPage() ) - return 0; - return TQWizard::currentPage()->name(); -} - -int QDesignerWizard::pageNum( TQWidget *p ) -{ - for ( int i = 0; i < pageCount(); ++i ) { - if ( page( i ) == p ) - return i; - } - return -1; -} - -void QDesignerWizard::addPage( TQWidget *p, const TQString &t ) -{ - TQWizard::addPage( p, t ); - if ( removedPages.find( p ) ) - removedPages.remove( p ); -} - -void QDesignerWizard::removePage( TQWidget *p ) -{ - TQWizard::removePage( p ); - removedPages.insert( p, p ); -} - -void QDesignerWizard::insertPage( TQWidget *p, const TQString &t, int index ) -{ - TQWizard::insertPage( p, t, index ); - if ( removedPages.find( p ) ) - removedPages.remove( p ); -} - -TQMap< int, TQMap< TQString, TQVariant> > *defaultProperties = 0; -TQMap< int, TQStringList > *changedProperties = 0; - -/*! - \class WidgetFactory widgetfactory.h - \brief Set of static functions for creating widgets, layouts and do other stuff - - The widget factory offers functions to create widgets, create and - delete layouts find out other details - all based on the - WidgetDatabase's data. So the functions that use ids use the same - ids as in the WidgetDatabase. -*/ - - -void WidgetFactory::saveDefaultProperties( TQObject *w, int id ) -{ - TQMap< TQString, TQVariant> propMap; - TQStrList lst = w->metaObject()->propertyNames( TRUE ); - for ( uint i = 0; i < lst.count(); ++i ) { - TQVariant var = w->property( lst.at( i ) ); - if ( !var.isValid() && qstrcmp( "pixmap", lst.at( i ) ) == 0 ) - var = TQVariant( TQPixmap() ); - else if ( !var.isValid() && qstrcmp( "iconSet", lst.at( i ) ) == 0 ) - var = TQVariant( TQIconSet() ); - propMap.replace( lst.at( i ), var ); - } - defaultProperties->replace( id, propMap ); -} - -void WidgetFactory::saveChangedProperties( TQObject *w, int id ) -{ - TQStringList l = MetaDataBase::changedProperties( w ); - changedProperties->insert( id, l ); -} - -/*! Creates a widget of the type which is registered as \a id as - child of \a parent. The \a name is optional. If \a init is TRUE, the - widget is initialized with some defaults, else the plain widget is - created. -*/ - -TQWidget *WidgetFactory::create( int id, TQWidget *parent, const char *name, bool init, const TQRect *r, Qt::Orientation orient ) -{ - TQString n = WidgetDatabase::className( id ); - if ( n.isEmpty() ) - return 0; - - if ( !defaultProperties ) { - defaultProperties = new TQMap< int, TQMap< TQString, TQVariant> >(); - changedProperties = new TQMap< int, TQStringList >(); - } - - TQWidget *w = 0; - TQString str = WidgetDatabase::createWidgetName( id ); - const char *s = str.latin1(); - w = createWidget( n, parent, name ? name : s, init, r, orient ); - if ( ::tqqt_cast(w) ) - ( (TQScrollView*)w )->disableSizeHintCaching(); - if ( !w && WidgetDatabase::isCustomWidget( id ) ) - w = createCustomWidget( parent, name ? name : s, MetaDataBase::customWidget( id ) ); - if ( !w ) - return 0; - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); - - if ( !defaultProperties->contains( id ) ) - saveDefaultProperties( TQT_TQOBJECT(w), id ); - if ( !changedProperties->contains( id ) ) - saveChangedProperties( TQT_TQOBJECT(w), id ); - - return w; -} - -/*! Creates a layout on the widget \a widget of the type \a type - which can be \c HBox, \c VBox or \c Grid. -*/ - -TQLayout *WidgetFactory::createLayout( TQWidget *widget, TQLayout *layout, LayoutType type ) -{ - int spacing = MainWindow::self->currentLayoutDefaultSpacing(); - int margin = 0; - - int metaspacing = MetaDataBase::spacing( TQT_TQOBJECT(widget) ); - int metamargin = MetaDataBase::margin( TQT_TQOBJECT(widget) ); - - if ( ::tqqt_cast(widget) && - ( WidgetDatabase::isContainer( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(widget) ) ) ) || - widget && ::tqqt_cast(widget->parentWidget()) ) ) - margin = MainWindow::self->currentLayoutDefaultMargin(); - - if ( !layout && ::tqqt_cast(widget) ) - widget = ((TQTabWidget*)widget)->currentPage(); - - if ( !layout && ::tqqt_cast(widget) ) - widget = ((TQWizard*)widget)->currentPage(); - - if ( !layout && ::tqqt_cast(widget) ) - widget = ((TQMainWindow*)widget)->centralWidget(); - - if ( !layout && ::tqqt_cast(widget) ) - widget = ((TQWidgetStack*)widget)->visibleWidget(); - - if ( !layout && ::tqqt_cast(widget) ) - widget = ((TQToolBox*)widget)->currentItem(); - - MetaDataBase::addEntry( TQT_TQOBJECT(widget) ); - - TQLayout *l = 0; - int align = 0; - if ( !layout && ::tqqt_cast(widget) ) { - TQGroupBox *gb = (TQGroupBox*)widget; - gb->setColumnLayout( 0, Qt::Vertical ); - layout = gb->layout(); - layout->setMargin( 0 ); - layout->setSpacing( 0 ); - switch ( type ) { - case HBox: - l = new TQHBoxLayout( layout ); - break; - case VBox: - l = new TQVBoxLayout( layout ); - break; - case Grid: - l = new QDesignerGridLayout( layout ); - break; - default: - return 0; - } - align = TQt::AlignTop; - MetaDataBase::setMargin( TQT_TQOBJECT(gb), metamargin ); - MetaDataBase::setSpacing( TQT_TQOBJECT(gb), metaspacing ); - } else { - if ( layout ) { - switch ( type ) { - case HBox: - l = new TQHBoxLayout( layout ); - break; - case VBox: - l = new TQVBoxLayout( layout ); - break; - case Grid: - l = new QDesignerGridLayout( layout ); - break; - default: - return 0; - } - MetaDataBase::addEntry( TQT_TQOBJECT(l) ); - l->setSpacing( spacing ); - l->setMargin( margin ); - } else { - switch ( type ) { - case HBox: - l = new TQHBoxLayout( widget ); - break; - case VBox: - l = new TQVBoxLayout( widget ); - break; - case Grid: - l = new QDesignerGridLayout( widget ); - break; - default: - return 0; - } - MetaDataBase::addEntry( TQT_TQOBJECT(l) ); - if ( widget ) { - MetaDataBase::setMargin( TQT_TQOBJECT(widget), metamargin ); - MetaDataBase::setSpacing( TQT_TQOBJECT(widget), metaspacing ); - } else { - l->setMargin( margin ); - l->setSpacing( spacing ); - } - } - } - l->setAlignment( align ); - MetaDataBase::addEntry( TQT_TQOBJECT(l) ); - return l; -} - -void WidgetFactory::deleteLayout( TQWidget *widget ) -{ - if ( !widget ) - return; - - if ( ::tqqt_cast(widget) ) - widget = ((TQTabWidget*)widget)->currentPage(); - if ( ::tqqt_cast(widget) ) - widget = ((TQWizard*)widget)->currentPage(); - if ( ::tqqt_cast(widget) ) - widget = ((TQMainWindow*)widget)->centralWidget(); - if ( ::tqqt_cast(widget) ) - widget = ((TQWidgetStack*)widget)->visibleWidget(); - if ( ::tqqt_cast(widget) ) - widget = ((TQToolBox*)widget)->currentItem(); - delete widget->layout(); -} - -/*! Factory functions for creating a widget of the type \a className - as child of \a parent with the name \a name. - - If \a init is TRUE, some initial default properties are set. This - has to be in sync with the initChangedProperties() function! -*/ - -TQWidget *WidgetFactory::createWidget( const TQString &className, TQWidget *parent, const char *name, bool init, - const TQRect *r, Qt::Orientation orient ) -{ - if ( className == TQPUSHBUTTON_OBJECT_NAME_STRING ) { - TQPushButton *b = 0; - if ( init ) { - b = new QDesignerPushButton( parent, name ); - b->setText( TQString::fromLatin1( name ) ); - } else { - b = new QDesignerPushButton( parent, name ); - } - TQWidget *w = find_formwindow( b ); - b->setAutoDefault( w && ::tqqt_cast(((FormWindow*)w)->mainContainer()) ); - return b; - } else if ( className == TQTOOLBUTTON_OBJECT_NAME_STRING ) { - if ( init ) { - QDesignerToolButton *tb = new QDesignerToolButton( parent, name ); - if ( ::tqqt_cast(widgetOfContainer(parent))) { - tb->setUsesTextLabel(TRUE); - tb->setTextLabel("..."); - tb->setAutoRaise(TRUE); - tb->setTextPosition(TQToolButton::BesideIcon); - } else { - tb->setText( "..." ); - } - return tb; - } - return new QDesignerToolButton( parent, name ); - } else if ( className == TQCHECKBOX_OBJECT_NAME_STRING ) { - if ( init ) { - QDesignerCheckBox *cb = new QDesignerCheckBox( parent, name ); - cb->setText( TQString::fromLatin1( name ) ); - return cb; - } - return new QDesignerCheckBox( parent, name ); - } else if ( className == TQRADIOBUTTON_OBJECT_NAME_STRING ) { - if ( init ) { - QDesignerRadioButton *rb = new QDesignerRadioButton( parent, name ); - rb->setText( TQString::fromLatin1( name ) ); - return rb; - } - return new QDesignerRadioButton( parent, name ); - } else if ( className == TQGROUPBOX_OBJECT_NAME_STRING ) { - if ( init ) - return new TQGroupBox( TQString::fromLatin1( name ), parent, name ); - return new TQGroupBox( parent, name ); - } else if ( className == TQBUTTONGROUP_OBJECT_NAME_STRING ) { - if ( init ) - return new TQButtonGroup( TQString::fromLatin1( name ), parent, name ); - return new TQButtonGroup( parent, name ); - } else if ( className == TQICONVIEW_OBJECT_NAME_STRING ) { -#if !defined(TQT_NO_ICONVIEW) - TQIconView* iv = new TQIconView( parent, name ); - if ( init ) - (void) new TQIconViewItem( iv, i18n( "New Item" ) ); - return iv; -#else - return 0; -#endif - } else if ( className == TQTABLE_OBJECT_NAME_STRING ) { -#if !defined(TQT_NO_TABLE) - if ( init ) - return new TQTable( 3, 3, parent, name ); - return new TQTable( parent, name ); -#else - return 0; -#endif -#ifndef TQT_NO_SQL - } else if ( className == TQDATATABLE_OBJECT_NAME_STRING ) { - return new TQDataTable( parent, name ); -#endif //TQT_NO_SQL - } else if ( className == TQDATEEDIT_OBJECT_NAME_STRING ) { - return new TQDateEdit( parent, name ); - } else if ( className == TQTIMEEDIT_OBJECT_NAME_STRING ) { - return new TQTimeEdit( parent, name ); - } else if ( className == TQDATETIMEEDIT_OBJECT_NAME_STRING ) { - return new TQDateTimeEdit( parent, name ); - } - else if ( className == TQLISTBOX_OBJECT_NAME_STRING ) { - TQListBox* lb = new TQListBox( parent, name ); - if ( init ) { - lb->insertItem( i18n( "New Item" ) ); - lb->setCurrentItem( 0 ); - } - return lb; - } else if ( className == TQLISTVIEW_OBJECT_NAME_STRING ) { - TQListView *lv = new TQListView( parent, name ); - lv->setSorting( -1 ); - if ( init ) { - lv->addColumn( i18n( "Column 1" ) ); - lv->setCurrentItem( new TQListViewItem( lv, i18n( "New Item" ) ) ); - } - return lv; - } else if ( className == TQLINEEDIT_OBJECT_NAME_STRING ) - return new TQLineEdit( parent, name ); - else if ( className == TQSPINBOX_OBJECT_NAME_STRING ) - return new TQSpinBox( parent, name ); - else if ( className == TQSPLITTER_OBJECT_NAME_STRING ) - return new TQSplitter( parent, name ); - else if ( className == TQMULTILINEEDIT_OBJECT_NAME_STRING ) - return new TQMultiLineEdit( parent, name ); - else if ( className == TQTEXTEDIT_OBJECT_NAME_STRING ) - return new TQTextEdit( parent, name ); - else if ( className == TQLABEL_OBJECT_NAME_STRING || className == "TextLabel" ) { - QDesignerLabel *l = new QDesignerLabel( parent, name ); - if ( init ) { - l->setText( TQString::fromLatin1( name ) ); - MetaDataBase::addEntry( TQT_TQOBJECT(l) ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "text", TRUE ); - } - return l; - } else if ( className == "PixmapLabel" ) { - QDesignerLabel *l = new QDesignerLabel( parent, name ); - if ( init ) { - l->setPixmap( BarIcon( "designer_qtlogo.png", TDevDesignerPartFactory::instance() ) ); - l->setScaledContents( TRUE ); - MetaDataBase::addEntry( TQT_TQOBJECT(l) ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "pixmap", TRUE ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "scaledContents", TRUE ); - } - return l; - } else if ( className == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) - return new TQLayoutWidget( parent, name ); - else if ( className == TQTABWIDGET_OBJECT_NAME_STRING ) { - TQTabWidget *tw = new QDesignerTabWidget( parent, name ); - if ( init ) { - FormWindow *fw = find_formwindow( parent ); - TQWidget *w = fw ? new QDesignerWidget( fw, tw, "tab" ) : new TQWidget( tw, "tab" ); - tw->addTab( w, i18n("Tab 1") ); - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); - w = fw ? new QDesignerWidget( fw, tw, "tab" ) : new TQWidget( tw, "tab" ); - tw->addTab( w, i18n("Tab 2") ); - MetaDataBase::addEntry( TQT_TQOBJECT(tw) ); - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); - } - return tw; - } else if ( className == TQWIDGETSTACK_OBJECT_NAME_STRING ) { - QDesignerWidgetStack *ws = new QDesignerWidgetStack( parent, name ); - if ( init ) { - FormWindow *fw = find_formwindow( parent ); - TQWidget *w = fw ? new QDesignerWidget( fw, ws, "WStackPage" ) : new TQWidget( ws, "WStackPage" ); - ws->insertPage( w ); - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); - MetaDataBase::addEntry( TQT_TQOBJECT(ws) ); - } - return ws; - } else if ( className == TQCOMBOBOX_OBJECT_NAME_STRING ) { - return new TQComboBox( FALSE, parent, name ); - } else if ( className == TQWIDGET_OBJECT_NAME_STRING ) { - if ( parent && - ( ::tqqt_cast(parent) || - ::tqqt_cast(parent) || - ::tqqt_cast(parent) || - ::tqqt_cast(parent) || - ::tqqt_cast(parent) || - ::tqqt_cast(parent) ) ) { - FormWindow *fw = find_formwindow( parent ); - if ( fw ) { - QDesignerWidget *dw = new QDesignerWidget( fw, parent, name ); - MetaDataBase::addEntry( TQT_TQOBJECT(dw) ); - return dw; - } - } - return new TQWidget( parent, name ); - } else if ( className == TQDIALOG_OBJECT_NAME_STRING ) { - TQDialog *dia = 0; - if ( ::tqqt_cast(parent) ) - dia = new QDesignerDialog( (FormWindow*)parent, parent, name ); - else - dia = new TQDialog( parent, name ); -#if defined(TQT_NON_COMMERCIAL) - if ( ::tqqt_cast(parent) ) -#else - if ( parent ) -#endif - dia->reparent( parent, TQPoint( 0, 0 ), TRUE ); - return dia; - } else if ( className == TQWIZARD_OBJECT_NAME_STRING ) { - TQWizard *wiz = new QDesignerWizard( parent, name ); -#if defined(TQT_NON_COMMERCIAL) - if ( ::tqqt_cast(parent) ) -#else - if ( parent ) -#endif - wiz->reparent( parent, TQPoint( 0, 0 ), TRUE ); - if ( init && ::tqqt_cast(parent) ) { - QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)parent, wiz, "WizardPage" ); - MetaDataBase::addEntry( TQT_TQOBJECT(dw) ); - wiz->addPage( dw, i18n( "Page" ) ); - TQTimer::singleShot( 0, wiz, TQT_SLOT( next() ) ); - } - return wiz; - } else if ( className == "Spacer" ) { - Spacer *s = new Spacer( parent, name ); - MetaDataBase::addEntry( TQT_TQOBJECT(s) ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "orientation", TRUE ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "sizeType", TRUE ); - if ( !r ) - return s; - if ( !r->isValid() || r->width() < 2 && r->height() < 2 ) - s->setOrientation( orient ); - else if ( r->width() < r->height() ) - s->setOrientation( Qt::Vertical ); - else - s->setOrientation( Qt::Horizontal ); - return s; - } else if ( className == TQLCDNUMBER_OBJECT_NAME_STRING ) - return new TQLCDNumber( parent, name ); - else if ( className == TQPROGRESSBAR_OBJECT_NAME_STRING ) - return new TQProgressBar( parent, name ); - else if ( className == TQTEXTVIEW_OBJECT_NAME_STRING ) - return new TQTextView( parent, name ); - else if ( className == TQTEXTBROWSER_OBJECT_NAME_STRING ) - return new TQTextBrowser( parent, name ); - else if ( className == TQDIAL_OBJECT_NAME_STRING ) - return new TQDial( parent, name ); - else if ( className == TQSLIDER_OBJECT_NAME_STRING ) { - TQSlider *s = new TQSlider( parent, name ); - if ( !r ) - return s; - if ( !r->isValid() || r->width() < 2 && r->height() < 2 ) - s->setOrientation( orient ); - else if ( r->width() > r->height() ) - s->setOrientation( Qt::Horizontal ); - MetaDataBase::addEntry( TQT_TQOBJECT(s) ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "orientation", TRUE ); - return s; - } else if ( className == TQSCROLLBAR_OBJECT_NAME_STRING ) { - TQScrollBar *s = new TQScrollBar( parent, name ); - if ( !r ) - return s; - if ( !r->isValid() || r->width() < 2 && r->height() < 2 ) - s->setOrientation( orient ); - else if ( r->width() > r->height() ) - s->setOrientation( Qt::Horizontal ); - MetaDataBase::addEntry( TQT_TQOBJECT(s) ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(s), "orientation", TRUE ); - return s; - } else if ( className == TQFRAME_OBJECT_NAME_STRING ) { - if ( !init ) - return new TQFrame( parent, name ); - TQFrame *f = new TQFrame( parent, name ); - f->setFrameStyle( TQFrame::StyledPanel | TQFrame::Raised ); - return f; - } else if ( className == "Line" ) { - Line *l = new Line( parent, name ); - MetaDataBase::addEntry( TQT_TQOBJECT(l) ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "orientation", TRUE ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "frameShadow", TRUE ); - MetaDataBase::setPropertyChanged( TQT_TQOBJECT(l), "frameShape", TRUE ); - if ( !r ) - return l; - if ( !r->isValid() || r->width() < 2 && r->height() < 2 ) - l->setOrientation( orient ); - else if ( r->width() < r->height() ) - l->setOrientation( Qt::Vertical ); - return l; - } else if ( className == TQMAINWINDOW_OBJECT_NAME_STRING ) { - TQMainWindow *mw = new TQMainWindow( parent, name, 0 ); - mw->setDockEnabled( TQt::DockMinimized, FALSE ); - QDesignerWidget *dw = new QDesignerWidget( (FormWindow*)parent, mw, "central widget" ); - mw->setDockMenuEnabled( FALSE ); - MetaDataBase::addEntry( TQT_TQOBJECT(dw) ); - mw->setCentralWidget( dw ); - (void)mw->statusBar(); - dw->show(); - return mw; - } else if ( className == TQTOOLBOX_OBJECT_NAME_STRING ) { - if ( !init ) - return new QDesignerToolBox( parent, name ); - TQToolBox *tb = new QDesignerToolBox( parent, name ); - FormWindow *fw = find_formwindow( parent ); - TQWidget *w = fw ? new QDesignerWidget( fw, tb, "page1" ) : - new TQWidget( tb, "page1" ); - tb->addItem( w, i18n("Page 1") ); - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); - w = fw ? new QDesignerWidget( fw, tb, "page2" ) : new TQWidget( tb, "page2" ); - tb->addItem( w, i18n("Page 2") ); - MetaDataBase::addEntry( TQT_TQOBJECT(tb) ); - MetaDataBase::addEntry( TQT_TQOBJECT(w) ); - return tb; - } -#ifndef TQT_NO_SQL - else if ( className == TQDATABROWSER_OBJECT_NAME_STRING ) { - TQWidget *w = new QDesignerDataBrowser( parent, name ); - if ( parent ) - w->reparent( parent, TQPoint( 0, 0 ), TRUE ); - return w; - } else if ( className == TQDATAVIEW_OBJECT_NAME_STRING ) { - TQWidget *w = new QDesignerDataView( parent, name ); - if ( parent ) - w->reparent( parent, TQPoint( 0, 0 ), TRUE ); - return w; - } -#endif - - WidgetInterface *iface = 0; - widgetManager()->queryInterface( className, &iface ); - if ( !iface ) - return 0; - - TQWidget *w = iface->create( className, parent, name ); -#ifdef TQT_CONTAINER_CUSTOM_WIDGETS - if ( init && WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( className ) ) ) { - TQWidgetContainerInterfacePrivate *iface2 = 0; - iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 ); - if ( iface2 ) { - iface2->addPage( className, w, "Page", -1 ); - iface2->release(); - } - } -#endif // TQT_CONTAINER_CUSTOM_WIDGETS - iface->release(); - return w; -} - - - -/*! Find out which type the layout of the widget is. Returns \c HBox, - \c VBox, \c Grid or \c NoLayout. \a layout points to this - TQWidget::layout() of \a w or to 0 after the function call. -*/ - -WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w, TQLayout *&layout ) -{ - layout = 0; - - if ( ::tqqt_cast(w) ) - w = ((TQTabWidget*)w)->currentPage(); - if ( ::tqqt_cast(w) ) - w = ((TQWizard*)w)->currentPage(); - if ( ::tqqt_cast(w) ) - w = ((TQMainWindow*)w)->centralWidget(); - if ( ::tqqt_cast(w) ) - w = ((TQWidgetStack*)w)->visibleWidget(); - if ( ::tqqt_cast(w) ) - w = ((TQToolBox*)w)->currentItem(); - - if ( ::tqqt_cast(w) ) - return ( (TQSplitter*)w )->orientation() ==Qt::Horizontal ? HBox : VBox; - - if ( !w || !w->layout() ) - return NoLayout; - TQLayout *lay = w->layout(); - - if ( ::tqqt_cast(w) ) { - TQObjectList *l = TQT_TQOBJECT(lay)->queryList( TQLAYOUT_OBJECT_NAME_STRING ); - if ( l && l->first() ) - lay = (TQLayout*)l->first(); - delete l; - } - layout = lay; - - if ( ::tqqt_cast(lay) ) - return HBox; - else if ( ::tqqt_cast(lay) ) - return VBox; - else if ( ::tqqt_cast(lay) ) - return Grid; - return NoLayout; -} - -/*! - \overload -*/ -WidgetFactory::LayoutType WidgetFactory::layoutType( TQLayout *layout ) -{ - if ( ::tqqt_cast(layout) ) - return HBox; - else if ( ::tqqt_cast(layout) ) - return VBox; - else if ( ::tqqt_cast(layout) ) - return Grid; - return NoLayout; -} - -/*! - \overload -*/ -WidgetFactory::LayoutType WidgetFactory::layoutType( TQWidget *w ) -{ - TQLayout *l = 0; - return layoutType( w, l ); -} - - -TQWidget *WidgetFactory::layoutParent( TQLayout *layout ) -{ - TQObject *o = TQT_TQOBJECT(layout); - while ( o ) { - if ( o->isWidgetType() ) - return (TQWidget*)o; - o = o->parent(); - } - return 0; -} - -/*! Returns the widget into which children should be inserted when \a - w is a container known to the designer. - - Usually that is \a w itself, sometimes it is different (e.g. a - tabwidget is known to the designer as a container but the child - widgets should be inserted into the current page of the - tabwidget. So in this case this function returns the current page of - the tabwidget.) - */ -TQWidget* WidgetFactory::containerOfWidget( TQWidget *w ) -{ - if ( !w ) - return w; - if ( ::tqqt_cast(w) ) - return ((TQTabWidget*)w)->currentPage(); - if ( ::tqqt_cast(w) ) - return ((TQWizard*)w)->currentPage(); - if ( ::tqqt_cast(w) ) - return ((TQWidgetStack*)w)->visibleWidget(); - if ( ::tqqt_cast(w) ) - return ((TQToolBox*)w)->currentItem(); - if ( ::tqqt_cast(w) ) - return ((TQMainWindow*)w)->centralWidget(); -#ifdef TQT_CONTAINER_CUSTOM_WIDGETS - if ( !WidgetDatabase::isCustomPluginWidget( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) ) - return w; - WidgetInterface *iface = 0; - widgetManager()->queryInterface( classNameOf( w ), &iface ); - if ( !iface ) - return w; - TQWidgetContainerInterfacePrivate *iface2 = 0; - iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 ); - if ( !iface2 ) - return w; - TQWidget *c = iface2->containerOfWidget( w->className(), w ); - iface2->release(); - iface->release(); - if ( c ) - return c; -#endif // TQT_CONTAINER_CUSTOM_WIDGETS - return w; -} - -/*! Returns the actual designer widget of the container \a w. This is - normally \a w itself, but might be a parent or grand parent of \a w - (e.g. when working with a tabwidget and \a w is the container which - contains and layouts childs, but the actual widget known to the - designer is the tabwidget which is the parent of \a w. So this - function returns the tabwidget then.) -*/ - -TQWidget* WidgetFactory::widgetOfContainer( TQWidget *w ) -{ - if ( w && ::tqqt_cast(w->parentWidget()) ) - w = w->parentWidget(); - if ( w->parentWidget() && w->parentWidget()->parentWidget() && - w->parentWidget()->parentWidget()->parentWidget() && - ::tqqt_cast(w->parentWidget()->parentWidget()->parentWidget()) ) - return w->parentWidget()->parentWidget()->parentWidget(); - while ( w ) { - int id = WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( TQT_TQOBJECT(w) ) ); - if ( WidgetDatabase::isContainer( id ) || - w && ::tqqt_cast(w->parentWidget()) ) - return w; - w = w->parentWidget(); - } - return w; -} - -/*! - Returns whether \a o is a passive interactor or not. - */ - -bool WidgetFactory::lastWasAPassiveInteractor = FALSE; -TQGuardedPtr *WidgetFactory::lastPassiveInteractor = new TQGuardedPtr(); - -bool WidgetFactory::isPassiveInteractor( TQObject* o ) -{ - if ( lastPassiveInteractor && *lastPassiveInteractor && (TQObject*)(*lastPassiveInteractor) == o ) - return lastWasAPassiveInteractor; - lastWasAPassiveInteractor = FALSE; - (*lastPassiveInteractor) = o; - if ( TQApplication::activePopupWidget() ) // if a popup is open, we have to make sure that this one is closed, else X might do funny things - return ( lastWasAPassiveInteractor = TRUE ); - - if ( ::tqqt_cast(o) ) - return ( lastWasAPassiveInteractor = TRUE ); - else if ( ::tqqt_cast(o) ) - return ( lastWasAPassiveInteractor = TRUE ); - else if ( ::tqqt_cast(o) && - ( ::tqqt_cast(o->parent()) || ::tqqt_cast(o->parent()) ) ) - return ( lastWasAPassiveInteractor = TRUE ); - else if ( ::tqqt_cast(o) && ::tqqt_cast(o->parent()) ) - return ( lastWasAPassiveInteractor = TRUE ); - else if ( ::tqqt_cast(o) && ::tqqt_cast(o->parent()) ) - return ( lastWasAPassiveInteractor = TRUE ); -// else if ( ::tqqt_cast(o) ) - else if ( o->inherits( TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING ) ) - return ( lastWasAPassiveInteractor = TRUE ); -// else if ( ::tqqt_cast(o) ) - else if ( o->inherits( TQHIDEDOCK_OBJECT_NAME_STRING ) ) - return ( lastWasAPassiveInteractor = TRUE ); - else if ( qstrcmp( o->name(), "designer_wizardstack_button" ) == 0 ) - return ( lastWasAPassiveInteractor = TRUE ); -#ifdef TQT_CONTAINER_CUSTOM_WIDGETS - if ( !o->isWidgetType() ) - return ( lastWasAPassiveInteractor = FALSE ); - WidgetInterface *iface = 0; - TQWidget *w = (TQWidget*)o; - while ( !iface && w && !::tqqt_cast(w) ) { - widgetManager()->queryInterface( classNameOf( w ), &iface ); - w = w->parentWidget(); - } - if ( !iface ) - return ( lastWasAPassiveInteractor = FALSE ); - TQWidgetContainerInterfacePrivate *iface2 = 0; - iface->queryInterface( IID_TQWidgetContainer, (TQUnknownInterface**)&iface2 ); - if ( !iface2 ) - return ( lastWasAPassiveInteractor = FALSE ); - TQWidget *fw = MainWindow::self->isAFormWindowChild( (TQWidget*)o ); - if ( !fw ) - return ( lastWasAPassiveInteractor = FALSE ); - TQWidget *dw = ( (FormWindow*)fw )->designerWidget( (TQWidget*)o ); - if ( !dw ) - return ( lastWasAPassiveInteractor = FALSE ); - lastWasAPassiveInteractor = iface2->isPassiveInteractor( dw->className(), (TQWidget*)o ); - iface2->release(); - iface->release(); -#endif // TQT_CONTAINER_CUSTOM_WIDGETS - return lastWasAPassiveInteractor; -} - - -/*! - Returns the class name of object \a o that should be used for externally (i.e. for saving) - */ -const char* WidgetFactory::classNameOf( TQObject* o ) -{ - if ( o->isA( "PropertyObject" ) ) - return o->className(); - if (WidgetDatabase::isCustomPluginWidget(WidgetDatabase::idFromClassName(o->className()))) - return o->className(); - else if ( ::tqqt_cast(o) ) - return TQTABWIDGET_OBJECT_NAME_STRING; - else if ( ::tqqt_cast(o) ) - return TQWIDGETSTACK_OBJECT_NAME_STRING; - else if ( ::tqqt_cast(o) ) - return "TQWeDoNotWantToBreakTabWidget"; - else if ( ::tqqt_cast(o) ) - return TQDIALOG_OBJECT_NAME_STRING; - else if ( ::tqqt_cast(o) ) - return TQWIDGET_OBJECT_NAME_STRING; - else if ( o->inherits( "CustomWidget" ) ) - return ( (CustomWidget*)o )->realClassName().latin1(); - else if ( ::tqqt_cast(o) ) - return TQLABEL_OBJECT_NAME_STRING; - else if ( ::tqqt_cast(o) ) - return TQWIZARD_OBJECT_NAME_STRING; - else if ( ::tqqt_cast(o) ) - return TQPUSHBUTTON_OBJECT_NAME_STRING; - else if ( ::tqqt_cast(o) ) - return TQTOOLBUTTON_OBJECT_NAME_STRING; - else if ( ::tqqt_cast(o) ) - return TQRADIOBUTTON_OBJECT_NAME_STRING; - else if ( ::tqqt_cast(o) ) - return TQCHECKBOX_OBJECT_NAME_STRING; - else if ( ::tqqt_cast(o) ) - return TQMENUBAR_OBJECT_NAME_STRING; - else if ( ::tqqt_cast(o) ) - return TQTOOLBAR_OBJECT_NAME_STRING; - else if ( ::tqqt_cast(o) ) - return TQACTION_OBJECT_NAME_STRING; - else if ( ::tqqt_cast(o) ) - return TQACTIONGROUP_OBJECT_NAME_STRING; - else if ( ::tqqt_cast(o) ) - return TQPOPUPMENU_OBJECT_NAME_STRING; - else if ( ::tqqt_cast(o) ) - return TQTOOLBOX_OBJECT_NAME_STRING; -#ifndef TQT_NO_SQL - else if ( ::tqqt_cast(o) ) - return TQDATABROWSER_OBJECT_NAME_STRING; - else if ( ::tqqt_cast(o) ) - return TQDATAVIEW_OBJECT_NAME_STRING; -#endif - return o->className(); -} - -TQString WidgetFactory::defaultSignal( TQObject *w ) -{ - if ( ::tqqt_cast(w) || ::tqqt_cast(w) ) - return "toggled"; - else if ( ::tqqt_cast(w) || ::tqqt_cast(w) ) - return "clicked"; - else if ( ::tqqt_cast(w) ) - return "linkClicked"; - else if ( ::tqqt_cast(w) || ::tqqt_cast(w) ) - return "textChanged"; - else if ( ::tqqt_cast(w) || ::tqqt_cast(w) || - ::tqqt_cast(w) || ::tqqt_cast(w) ) - return "selectionChanged"; - else if ( ::tqqt_cast(w) ) - return "selected"; - else if ( ::tqqt_cast(w) ) - return "currentChanged"; - else if ( ::tqqt_cast(w) ) - return "aboutToShow"; - else if ( ::tqqt_cast(w) || ::tqqt_cast(w) || - ::tqqt_cast(w) || ::tqqt_cast(w) || - ::tqqt_cast(w) || ::tqqt_cast(w) || - ::tqqt_cast(w) ) - return "valueChanged"; - else if ( ::tqqt_cast(w) ) - return "activated"; - return TQString(); -} - -/*! As some properties are set by default when creating a widget this - functions markes this properties as changed. Has to be in sync with - createWidget()! -*/ - -void WidgetFactory::initChangedProperties( TQObject *o ) -{ - if ( MainWindow::self && MainWindow::self->currProject() && - MainWindow::self->currProject()->fakeFormFileFor( o ) ) - return; - MetaDataBase::setPropertyChanged( o, "name", TRUE ); - if ( !::tqqt_cast(o) && !::tqqt_cast(o) ) - MetaDataBase::setPropertyChanged( o, "geometry", TRUE ); - - if ( ::tqqt_cast(o) || - ::tqqt_cast(o) || - ::tqqt_cast(o) || - ::tqqt_cast(o) ) { - if (::tqqt_cast(o) && ::tqqt_cast(widgetOfContainer((TQWidget*)o->parent()))) { - MetaDataBase::setPropertyChanged( o, "usesTextLabel", TRUE ); - MetaDataBase::setPropertyChanged( o, "textLabel", TRUE ); - MetaDataBase::setPropertyChanged( o, "autoRaise", TRUE ); - MetaDataBase::setPropertyChanged( o, "textPosition", TRUE ); - } else { - MetaDataBase::setPropertyChanged( o, "text", TRUE ); - } - } - else if ( ::tqqt_cast(o) ) - MetaDataBase::setPropertyChanged( o, "title", TRUE ); - else if ( o->isA( TQFRAME_OBJECT_NAME_STRING ) ) { - MetaDataBase::setPropertyChanged( o, "frameShadow", TRUE ); - MetaDataBase::setPropertyChanged( o, "frameShape", TRUE ); - } else if ( ::tqqt_cast(o) || ::tqqt_cast(o) ) { - MetaDataBase::setPropertyChanged( o, "pageTitle", TRUE ); - MetaDataBase::setPropertyChanged( o, "pageName", TRUE ); - MetaDataBase::setPropertyChanged( o, "currentPage", TRUE ); - } else if ( ::tqqt_cast(o) ) { - MetaDataBase::setPropertyChanged( o, "currentPage", TRUE ); - MetaDataBase::setPropertyChanged( o, "pageName", TRUE ); - } else if ( ::tqqt_cast(o) ) { - MetaDataBase::setPropertyChanged( o, "currentIndex", TRUE ); - MetaDataBase::setPropertyChanged( o, "itemName", TRUE ); - MetaDataBase::setPropertyChanged( o, "itemLabel", TRUE ); - MetaDataBase::setPropertyChanged( o, "itemIconSet", TRUE ); - MetaDataBase::setPropertyChanged( o, "itemToolTip", TRUE ); - MetaDataBase::setPropertyChanged( o, "itemBackgroundMode", TRUE ); -#ifndef TQT_NO_TABLE - } else if ( ::tqqt_cast(o) ) { -# ifndef TQT_NO_SQL - if (!::tqqt_cast(o) ) -# endif - { - MetaDataBase::setPropertyChanged( o, "numRows", TRUE ); - MetaDataBase::setPropertyChanged( o, "numCols", TRUE ); - TQTable *t = (TQTable*)o; - for ( int i = 0; i < 3; ++i ) { - t->horizontalHeader()->setLabel( i, TQString::number( i + 1 ) ); - t->verticalHeader()->setLabel( i, TQString::number( i + 1 ) ); - } - } -#endif - } else if ( ::tqqt_cast(o) ) { - MetaDataBase::setPropertyChanged( o, "orientation", TRUE ); - } else if ( ::tqqt_cast(o) ) { - MetaDataBase::setPropertyChanged( o, "label", TRUE ); - } else if ( ::tqqt_cast(o) ) { - MetaDataBase::setPropertyChanged( o, "itemName", TRUE ); - MetaDataBase::setPropertyChanged( o, "itemNumber", TRUE ); - MetaDataBase::setPropertyChanged( o, "itemText", TRUE ); - } -} - -bool WidgetFactory::hasSpecialEditor( int id, TQObject *editorWidget ) -{ - TQString className = WidgetDatabase::className( id ); - - if ( className.contains( "ListBox" ) ) - return TRUE; - if ( className.contains( "ComboBox" ) ) - return TRUE; - if ( className.contains( "ListView" ) ) - return TRUE; - if ( className.contains( "IconView" ) ) - return TRUE; - if ( className == TQTEXTEDIT_OBJECT_NAME_STRING || className == TQMULTILINEEDIT_OBJECT_NAME_STRING ) - return TRUE; - if ( ::tqqt_cast(editorWidget) != 0 ) - return TRUE; - - return FALSE; -} - -bool WidgetFactory::hasItems( int id, TQObject *editorWidget ) -{ - TQString className = WidgetDatabase::className( id ); - - if ( className.contains( "ListBox" ) || className.contains( "ListView" ) || - className.contains( "IconView" ) || className.contains( "ComboBox" ) || - ::tqqt_cast(editorWidget) != 0 ) - return TRUE; - - return FALSE; -} - -void WidgetFactory::editWidget( int id, TQWidget *parent, TQWidget *editWidget, FormWindow *fw ) -{ - TQString className = WidgetDatabase::className( id ); - - if ( className.contains( "ListBox" ) ) { - if ( !::tqqt_cast(editWidget) ) - return; - ListBoxEditor *e = new ListBoxEditor( parent, editWidget, fw ); - e->exec(); - delete e; - return; - } - - if ( className.contains( "ComboBox" ) ) { - if ( !::tqqt_cast(editWidget) ) - return; - TQComboBox *cb = (TQComboBox*)editWidget; - ListBoxEditor *e = new ListBoxEditor( parent, cb->listBox(), fw ); - e->exec(); - delete e; - cb->update(); - return; - } - - if ( className.contains( "ListView" ) ) { - if ( !::tqqt_cast(editWidget) ) - return; - TQListView *lv = (TQListView*)editWidget; - ListViewEditor *e = new ListViewEditor( parent, lv, fw ); - e->exec(); - delete e; - return; - } - - if ( className.contains( "IconView" ) ) { - if ( !::tqqt_cast(editWidget) ) - return; - IconViewEditor *e = new IconViewEditor( parent, editWidget, fw ); - e->exec(); - delete e; - return; - } - - if ( className == TQMULTILINEEDIT_OBJECT_NAME_STRING || className == TQTEXTEDIT_OBJECT_NAME_STRING ) { - MultiLineEditor *e = new MultiLineEditor( FALSE, TRUE, parent, editWidget, fw ); - e->exec(); - delete e; - return; - } -#ifndef TQT_NO_TABLE - if (::tqqt_cast(editWidget) != 0) { - TableEditor *e = new TableEditor( parent, editWidget, fw ); - e->exec(); - delete e; - return; - } -#endif -} - -bool WidgetFactory::canResetProperty( TQObject *w, const TQString &propName ) -{ - if ( propName == "name" || propName == "geometry" ) - return FALSE; - TQStringList l = *changedProperties->find( WidgetDatabase::idFromClassName( WidgetFactory::classNameOf( w ) ) ); - return l.findIndex( propName ) == -1; -} - -bool WidgetFactory::resetProperty( TQObject *w, const TQString &propName ) -{ - const TQMetaProperty *p = w->metaObject()->property( w->metaObject()-> - findProperty( propName, TRUE ), TRUE ); - if (!p ) - return FALSE; - return p->reset( w ); -} - -TQVariant WidgetFactory::defaultValue( TQObject *w, const TQString &propName ) -{ - if ( propName == "wordwrap" ) { - int v = defaultValue( w, "alignment" ).toInt(); - return TQVariant( ( v & WordBreak ) == WordBreak, 0 ); - } else if ( propName == "toolTip" || propName == "whatsThis" ) { - return TQVariant( TQString::fromLatin1( "" ) ); - } else if ( w->inherits( "CustomWidget" ) ) { - return TQVariant(); - } else if ( propName == "frameworkCode" ) { - return TQVariant( TRUE, 0 ); - } else if ( propName == "layoutMargin" || propName == "layoutSpacing" ) { - return TQVariant( -1 ); - } - - return *( *defaultProperties->find( WidgetDatabase::idFromClassName( classNameOf( w ) ) ) ).find( propName ); -} - -TQString WidgetFactory::defaultCurrentItem( TQObject *w, const TQString &propName ) -{ - const TQMetaProperty *p = w->metaObject()-> - property( w->metaObject()->findProperty( propName, TRUE ), TRUE ); - if ( !p ) { - int v = defaultValue( w, "alignment" ).toInt(); - if ( propName == "hAlign" ) { - if ( ( v & AlignAuto ) == AlignAuto ) - return "AlignAuto"; - if ( ( v & AlignLeft ) == AlignLeft ) - return "AlignLeft"; - if ( ( v & AlignCenter ) == AlignCenter || ( v & AlignHCenter ) == AlignHCenter ) - return "AlignHCenter"; - if ( ( v & AlignRight ) == AlignRight ) - return "AlignRight"; - if ( ( v & AlignJustify ) == AlignJustify ) - return "AlignJustify"; - } else if ( propName == "vAlign" ) { - if ( ( v & AlignTop ) == AlignTop ) - return "AlignTop"; - if ( ( v & AlignCenter ) == AlignCenter || ( v & AlignVCenter ) == AlignVCenter ) - return "AlignVCenter"; - if ( ( v & AlignBottom ) == AlignBottom ) - return "AlignBottom"; - } else if ( propName == "resizeMode" ) { - return "Auto"; - } - return TQString(); - - } - return p->valueToKey( defaultValue( w, propName ).toInt() ); -} - -TQWidget *WidgetFactory::createCustomWidget( TQWidget *parent, const char *name, MetaDataBase::CustomWidget *w ) -{ - if ( !w ) - return 0; - return new CustomWidget( parent, name, w ); -} - -TQVariant WidgetFactory::property( TQObject *w, const char *name ) -{ - int id = w->metaObject()->findProperty( name, TRUE ); - const TQMetaProperty* p = w->metaObject()->property( id, TRUE ); - if ( !p || !p->isValid() ) - return MetaDataBase::fakeProperty( w, name ); - return w->property( name ); -} - -void QDesignerLabel::updateBuddy() -{ - - if ( myBuddy.isEmpty() ) - return; - - TQObjectList *l = topLevelWidget()->queryList( TQWIDGET_OBJECT_NAME_STRING, myBuddy, FALSE, TRUE ); - if ( !l || !l->first() ) { - delete l; - return; - } - - TQLabel::setBuddy( (TQWidget*)l->first() ); - delete l; -} - - -void QDesignerWidget::resizeEvent( TQResizeEvent* e) -{ - if ( need_frame ) { - TQPainter p(this); - p.setPen( backgroundColor() ); - p.drawRect( TQRect( TQPoint(0,0), e->oldSize() ) ); - } -} - -void QDesignerWidget::paintEvent( TQPaintEvent *e ) -{ - if ( need_frame ) { - TQPainter p(this); - p.setPen( backgroundColor().dark() ); - p.drawRect( rect() ); - } - formwindow->paintGrid( this, e ); -} - -void QDesignerDialog::paintEvent( TQPaintEvent *e ) -{ - formwindow->paintGrid( this, e ); -} - -TQSizePolicy TQLayoutWidget::sizePolicy() const -{ - return sp; -} - -bool TQLayoutWidget::event( TQEvent *e ) -{ - if ( e && ( e->type() == TQEvent::ChildInserted || - e->type() == TQEvent::ChildRemoved || - e->type() == TQEvent::LayoutHint || - e->type() == TQEvent::Reparent ) ) - updateSizePolicy(); - return TQWidget::event( e ); -} - -/* - This function must be called on TQLayoutWidget creation and whenever - the TQLayoutWidget's parent layout changes (e.g., from a TQHBoxLayout - to a TQVBoxLayout), because of the (illogical) way layouting works. -*/ -void TQLayoutWidget::updateSizePolicy() -{ - if ( childrenListObject().isEmpty() || childrenListObject().count() == 0 ) { - sp = TQWidget::sizePolicy(); - return; - } - - /* - TQSizePolicy::MayShrink & friends are private. Here we assume the - following: - - Fixed = 0 - Maximum = MayShrink - Minimum = MayGrow - Preferred = MayShrink | MayGrow - */ - - int ht = (int) TQSizePolicy::Preferred; - int vt = (int) TQSizePolicy::Preferred; - - if ( layout() ) { - /* - parentLayout is set to the parent layout if there is one and if it is - top level, in which case layouting is illogical. - */ - TQLayout *parentLayout = 0; - if ( parent() && parent()->isWidgetType() ) { - parentLayout = ((TQWidget *)parent())->layout(); - if ( parentLayout && - ::tqqt_cast(parentLayout->mainWidget()) ) - parentLayout = 0; - } - - TQObjectListIt it( childrenListObject() ); - TQObject *o; - - if ( ::tqqt_cast(layout()) ) { - if ( ::tqqt_cast(parentLayout) ) - vt = TQSizePolicy::Minimum; - else - vt = TQSizePolicy::Fixed; - - while ( ( o = it.current() ) ) { - ++it; - if ( !o->isWidgetType() || ( (TQWidget*)o )->testWState( WState_ForceHide ) ) - continue; - TQWidget *w = (TQWidget*)o; - - if ( !w->sizePolicy().mayGrowHorizontally() ) - ht &= ~TQSizePolicy::Minimum; - if ( !w->sizePolicy().mayShrinkHorizontally() ) - ht &= ~TQSizePolicy::Maximum; - if ( w->sizePolicy().mayGrowVertically() ) - vt |= TQSizePolicy::Minimum; - if ( w->sizePolicy().mayShrinkVertically() ) - vt |= TQSizePolicy::Maximum; - } - } else if ( ::tqqt_cast(layout()) ) { - if ( ::tqqt_cast(parentLayout) ) - ht = TQSizePolicy::Minimum; - else - ht = TQSizePolicy::Fixed; - - while ( ( o = it.current() ) ) { - ++it; - if ( !o->isWidgetType() || ( (TQWidget*)o )->testWState( WState_ForceHide ) ) - continue; - TQWidget *w = (TQWidget*)o; - - if ( w->sizePolicy().mayGrowHorizontally() ) - ht |= TQSizePolicy::Minimum; - if ( w->sizePolicy().mayShrinkHorizontally() ) - ht |= TQSizePolicy::Maximum; - if ( !w->sizePolicy().mayGrowVertically() ) - vt &= ~TQSizePolicy::Minimum; - if ( !w->sizePolicy().mayShrinkVertically() ) - vt &= ~TQSizePolicy::Maximum; - } - } else if ( ::tqqt_cast(layout()) ) { - ht = TQSizePolicy::Fixed; - vt = TQSizePolicy::Fixed; - if ( parentLayout ) { - if ( ::tqqt_cast(parentLayout) ) - ht = TQSizePolicy::Minimum; - else if ( ::tqqt_cast(parentLayout) ) - vt = TQSizePolicy::Minimum; - } - - while ( ( o = it.current() ) ) { - ++it; - if ( !o->isWidgetType() || ( (TQWidget*)o )->testWState( WState_ForceHide ) ) - continue; - TQWidget *w = (TQWidget*)o; - - if ( w->sizePolicy().mayGrowHorizontally() ) - ht |= TQSizePolicy::Minimum; - if ( w->sizePolicy().mayShrinkHorizontally() ) - ht |= TQSizePolicy::Maximum; - if ( w->sizePolicy().mayGrowVertically() ) - vt |= TQSizePolicy::Minimum; - if ( w->sizePolicy().mayShrinkVertically() ) - vt |= TQSizePolicy::Maximum; - } - } -#ifdef USE_QT4 - if ( layout()->expanding() & TQSizePolicy::Horizontally ) -#else // USE_QT4 - if ( layout()->expanding() & TQSizePolicy::Horizontally ) -#endif // USE_QT4 - ht = TQSizePolicy::Expanding; -#ifdef USE_QT4 - if ( layout()->expanding() & TQSizePolicy::Vertically ) -#else // USE_QT4 - if ( layout()->expanding() & TQSizePolicy::Vertically ) -#endif // USE_QT4 - vt = TQSizePolicy::Expanding; - - layout()->invalidate(); - } - - sp = TQSizePolicy( (TQSizePolicy::SizeType) ht, (TQSizePolicy::SizeType) vt ); - updateGeometry(); -} - -void CustomWidget::paintEvent( TQPaintEvent *e ) -{ - if ( ::tqqt_cast(parentWidget()) ) { - ( (FormWindow*)parentWidget() )->paintGrid( this, e ); - } else { - TQPainter p( this ); - p.fillRect( rect(), colorGroup().dark() ); - p.setPen( colorGroup().light() ); - p.drawText( 2, 2, width() - 4, height() - 4, TQt::AlignAuto | TQt::AlignTop, cusw->className ); - p.drawPixmap( ( width() - cusw->pixmap->width() ) / 2, - ( height() - cusw->pixmap->height() ) / 2, - *cusw->pixmap ); - } -} - - -CustomWidgetFactory::CustomWidgetFactory() -{ -} - -TQWidget *CustomWidgetFactory::createWidget( const TQString &className, TQWidget *parent, const char *name ) const -{ - MetaDataBase::CustomWidget *w = MetaDataBase::customWidget( WidgetDatabase::idFromClassName( className ) ); - if ( !w ) - return 0; - return WidgetFactory::createCustomWidget( parent, name, w ); -} - - -QDesignerToolBox::QDesignerToolBox( TQWidget *parent, const char *name ) - : TQToolBox( parent, name ) -{ -} - -TQString QDesignerToolBox::itemLabel() const -{ - return TQToolBox::itemLabel( currentIndex() ); -} - -void QDesignerToolBox::setItemLabel( const TQString &l ) -{ - TQToolBox::setItemLabel( currentIndex(), l ); -} - -TQCString QDesignerToolBox::itemName() const -{ - return currentItem() ? currentItem()->name() : 0; -} - -void QDesignerToolBox::setItemName( const TQCString &n ) -{ - if (currentItem()) - currentItem()->setName( n ); -} - - -TQt::BackgroundMode QDesignerToolBox::itemBackgroundMode() const -{ - return (item(0) ? item(0)->backgroundMode() : PaletteBackground); -} - -void QDesignerToolBox::setItemBackgroundMode( BackgroundMode bmode ) -{ - for (int i = 0; i < count(); ++i) { - TQWidget *w = item(i); - w->setBackgroundMode( bmode ); - w->update(); - } -} - -void QDesignerToolBox::itemInserted( int index ) -{ - if (count() > 1) - item(index)->setBackgroundMode(item(index>0?0:1)->backgroundMode()); -} diff --git a/tdevdesigner/designer/workspace.cpp b/tdevdesigner/designer/workspace.cpp deleted file mode 100644 index 7eb7f86f..00000000 --- a/tdevdesigner/designer/workspace.cpp +++ /dev/null @@ -1,711 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include // HP-UX compiler needs this here -#include "workspace.h" -#include "formwindow.h" -#include "mainwindow.h" -#include "globaldefs.h" -#include "command.h" -#include "project.h" -#include "pixmapcollection.h" -#include "sourcefile.h" -#include "sourceeditor.h" -#include "propertyeditor.h" - -#include -#include "tdevdesigner_part.h" - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "qcompletionedit.h" - -#include - -WorkspaceItem::WorkspaceItem( TQListView *parent, Project* p ) - : TQListViewItem( parent ) -{ - init(); - project = p; - t = ProjectType; - setPixmap( 0, SmallIcon( "designer_folder.png" , TDevDesignerPartFactory::instance()) ); - setExpandable( FALSE ); -} - -WorkspaceItem::WorkspaceItem( TQListViewItem *parent, SourceFile* sf ) - : TQListViewItem( parent ) -{ - init(); - sourceFile = sf; - t = SourceFileType; - setPixmap( 0, SmallIcon( "designer_filenew.png" , TDevDesignerPartFactory::instance()) ); -} - -WorkspaceItem::WorkspaceItem( TQListViewItem *parent, TQObject *o, Project *p ) - : TQListViewItem( parent ) -{ - init(); - object = o; - project = p; - t = ObjectType; - setPixmap( 0, SmallIcon( "designer_object.png" , TDevDesignerPartFactory::instance()) ); - TQObject::connect( p->fakeFormFileFor( o ), TQT_SIGNAL( somethingChanged(FormFile*) ), - listView(), TQT_SLOT( update() ) ); -} - -WorkspaceItem::WorkspaceItem( TQListViewItem *parent, FormFile* ff, Type type ) - : TQListViewItem( parent ) -{ - init(); - formFile = ff; - t = type; - if ( type == FormFileType ) { - setPixmap( 0, SmallIcon( "designer_form.png" , TDevDesignerPartFactory::instance()) ); - TQObject::connect( ff, TQT_SIGNAL( somethingChanged(FormFile*) ), listView(), TQT_SLOT( update(FormFile*) ) ); - if ( formFile->supportsCodeFile() ) { - (void) new WorkspaceItem( this, formFile, FormSourceType ); - } - } else if ( type == FormSourceType ) { - setPixmap( 0, SmallIcon( "designer_filenew.png" , TDevDesignerPartFactory::instance()) ); - } -} - - -void WorkspaceItem::init() -{ - autoOpen = FALSE; - useOddColor = FALSE; - project = 0; - sourceFile = 0; - formFile = 0; -} - -void WorkspaceItem::paintCell( TQPainter *p, const TQColorGroup &cg, int column, int width, int align ) -{ - TQColorGroup g( cg ); - g.setColor( TQColorGroup::Base, backgroundColor() ); - g.setColor( TQColorGroup::Foreground, TQt::black ); - - if ( type() == FormSourceType && - ( !formFile->hasFormCode() || ( formFile->codeFileState() == FormFile::Deleted && formFile->formWindow() ) ) && - parent() && parent()->parent() && ( (WorkspaceItem*)parent()->parent() )->project && - ( (WorkspaceItem*)parent()->parent() )->project->isCpp() ) { - g.setColor( TQColorGroup::Text, listView()->palette().disabled().color( TQColorGroup::Text) ); - g.setColor( TQColorGroup::HighlightedText, listView()->palette().disabled().color( TQColorGroup::Text) ); - } else { - g.setColor( TQColorGroup::Text, TQt::black ); - } - p->save(); - - if ( isModified() ) { - TQFont f = p->font(); - f.setBold( TRUE ); - p->setFont( f ); - } - - TQListViewItem::paintCell( p, g, column, width, align ); - p->setPen( TQPen( cg.dark(), 1 ) ); - if ( column == 0 ) - p->drawLine( 0, 0, 0, height() - 1 ); - if ( listView()->firstChild() != this ) { - if ( nextSibling() != itemBelow() && itemBelow()->depth() < depth() ) { - int d = depth() - itemBelow()->depth(); - p->drawLine( -listView()->treeStepSize() * d, height() - 1, 0, height() - 1 ); - } - } - p->drawLine( 0, height() - 1, width, height() - 1 ); - p->drawLine( width - 1, 0, width - 1, height() ); - p->restore(); -} - -TQString WorkspaceItem::text( int column ) const -{ - if ( column != 0 ) - return TQListViewItem::text( column ); - switch( t ) { - case ProjectType: - if ( project->isDummy() ) { - return i18n("" ); - } else if ( MainWindow::self->singleProjectMode() ) { - return TQFileInfo( project->fileName() ).baseName(); - } - return project->makeRelative( project->fileName() ); - case FormFileType: - if ( !MainWindow::self->singleProjectMode() ) - return formFile->formName() + ": " + formFile->fileName(); - return formFile->formName(); - case FormSourceType: - if ( !MainWindow::self->singleProjectMode() ) - return formFile->codeFile(); - return formFile->formName() + " [Source]"; - case SourceFileType: - return sourceFile->fileName(); - case ObjectType: - if ( !project->hasParentObject( object ) ) - return object->name(); - return project->qualifiedName( object ); - } - - return TQString(); // shut up compiler -} - -void WorkspaceItem::fillCompletionList( TQStringList& completion ) -{ - switch( t ) { - case ProjectType: - break; - case FormFileType: - completion += formFile->formName(); - completion += formFile->fileName(); - break; - case FormSourceType: - completion += formFile->codeFile(); - break; - case SourceFileType: - completion += sourceFile->fileName(); - break; - case ObjectType: - completion += object->name(); - } -} - -bool WorkspaceItem::checkCompletion( const TQString& completion ) -{ - switch( t ) { - case ProjectType: - break; - case FormFileType: - return completion == formFile->formName() - || completion == formFile->fileName(); - case FormSourceType: - return completion == formFile->codeFile(); - case SourceFileType: - return completion == sourceFile->fileName(); - case ObjectType: - return completion == object->name(); - } - return FALSE; -} - - -bool WorkspaceItem::isModified() const -{ - switch( t ) { - case ProjectType: - return project->isModified(); - case FormFileType: - return formFile->isModified( FormFile::WFormWindow ); - case FormSourceType: - return formFile->isModified( FormFile::WFormCode ); - case SourceFileType: - return sourceFile->isModified(); - case ObjectType: - return project->fakeFormFileFor( object )->isModified(); - break; - } - return FALSE; // shut up compiler -} - -TQString WorkspaceItem::key( int column, bool ) const -{ - TQString key = text( column ); - if ( t == FormFileType ) - key.prepend( "0" ); - else if ( t == ObjectType ) - key.prepend( "a" ); - else - key.prepend( "A" ); - return key; -} - -TQColor WorkspaceItem::backgroundColor() -{ - bool b = useOddColor; - if ( t == FormSourceType && parent() ) - b = ( ( WorkspaceItem*)parent() )->useOddColor; - return b ? *backColor2 : *backColor1; -} - - -void WorkspaceItem::setOpen( bool b ) -{ - TQListViewItem::setOpen( b ); - autoOpen = FALSE; -} - -void WorkspaceItem::setAutoOpen( bool b ) -{ - TQListViewItem::setOpen( b ); - autoOpen = b; -} - -Workspace::Workspace( TQWidget *parent, MainWindow *mw ) - : TQListView( parent, 0, WStyle_Customize | WStyle_NormalBorder | WStyle_Title | - WStyle_Tool | WStyle_MinMax | WStyle_SysMenu ), mainWindow( mw ), - project( 0 ), completionDirty( FALSE ) -{ - init_colors(); - - setDefaultRenameAction( Accept ); - blockNewForms = FALSE; - bufferEdit = 0; - header()->setStretchEnabled( TRUE ); - header()->hide(); - setSorting( 0 ); - setResizePolicy( TQScrollView::Manual ); -#ifndef TQ_WS_MAC - TQPalette p( palette() ); - p.setColor( TQColorGroup::Base, TQColor( *backColor2 ) ); - (void)*selectedBack; // hack - setPalette( p ); -#endif - addColumn( i18n( "Files" ) ); - setAllColumnsShowFocus( TRUE ); - connect( this, TQT_SIGNAL( mouseButtonClicked( int, TQListViewItem *, const TQPoint &, int ) ), - this, TQT_SLOT( itemClicked( int, TQListViewItem *, const TQPoint& ) ) ), - connect( this, TQT_SIGNAL( doubleClicked( TQListViewItem * ) ), - this, TQT_SLOT( itemDoubleClicked( TQListViewItem * ) ) ), - connect( this, TQT_SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint &, int ) ), - this, TQT_SLOT( rmbClicked( TQListViewItem *, const TQPoint& ) ) ), - setHScrollBarMode( AlwaysOff ); - setVScrollBarMode( AlwaysOn ); - viewport()->setAcceptDrops( TRUE ); - setAcceptDrops( TRUE ); - setColumnWidthMode( 1, Manual ); -} - - -void Workspace::projectDestroyed( TQObject* o ) -{ - if ( o == project ) { - project = 0; - clear(); - } -} - -void Workspace::setCurrentProject( Project *pro ) -{ - if ( project == pro ) - return; - if ( project ) { - disconnect( project, TQT_SIGNAL( sourceFileAdded(SourceFile*) ), this, TQT_SLOT( sourceFileAdded(SourceFile*) ) ); - disconnect( project, TQT_SIGNAL( sourceFileRemoved(SourceFile*) ), this, TQT_SLOT( sourceFileRemoved(SourceFile*) ) ); - disconnect( project, TQT_SIGNAL( formFileAdded(FormFile*) ), this, TQT_SLOT( formFileAdded(FormFile*) ) ); - disconnect( project, TQT_SIGNAL( formFileRemoved(FormFile*) ), this, TQT_SLOT( formFileRemoved(FormFile*) ) ); - disconnect( project, TQT_SIGNAL( objectAdded(TQObject*) ), this, TQT_SLOT( objectAdded(TQObject*) ) ); - disconnect( project, TQT_SIGNAL( objectRemoved(TQObject*) ), this, TQT_SLOT( objectRemoved(TQObject*) ) ); - disconnect( project, TQT_SIGNAL( projectModified() ), this, TQT_SLOT( update() ) ); - } - project = pro; - connect( project, TQT_SIGNAL( sourceFileAdded(SourceFile*) ), this, TQT_SLOT( sourceFileAdded(SourceFile*) ) ); - connect( project, TQT_SIGNAL( sourceFileRemoved(SourceFile*) ), this, TQT_SLOT( sourceFileRemoved(SourceFile*) ) ); - connect( project, TQT_SIGNAL( formFileAdded(FormFile*) ), this, TQT_SLOT( formFileAdded(FormFile*) ) ); - connect( project, TQT_SIGNAL( formFileRemoved(FormFile*) ), this, TQT_SLOT( formFileRemoved(FormFile*) ) ); - connect( project, TQT_SIGNAL( destroyed(TQObject*) ), this, TQT_SLOT( projectDestroyed(TQObject*) ) ); - connect( project, TQT_SIGNAL( objectAdded(TQObject*) ), this, TQT_SLOT( objectAdded(TQObject*) ) ); - connect( project, TQT_SIGNAL( objectRemoved(TQObject*) ), this, TQT_SLOT( objectRemoved(TQObject*) ) ); - connect( project, TQT_SIGNAL( projectModified() ), this, TQT_SLOT( update() ) ); - clear(); - - if ( bufferEdit ) - bufferEdit->clear(); - - projectItem = new WorkspaceItem( this, project ); - - projectItem->setOpen( TRUE ); - - for ( TQPtrListIterator sources = project->sourceFiles(); - sources.current(); ++sources ) { - SourceFile* f = sources.current(); - (void) new WorkspaceItem( projectItem, f ); - } - - for ( TQPtrListIterator forms = project->formFiles(); - forms.current(); ++forms ) { - FormFile* f = forms.current(); - if ( f->isFake() ) - continue; - - (void) new WorkspaceItem( projectItem, f ); - } - - TQObjectList l = project->objects(); - TQObjectListIt objs( l ); - for ( ;objs.current(); ++objs ) { - TQObject* o = objs.current(); - (void) new WorkspaceItem( projectItem, o, project ); - } - - updateColors(); - completionDirty = TRUE; -} - -void Workspace::sourceFileAdded( SourceFile* sf ) -{ - (void) new WorkspaceItem( projectItem, sf ); - updateColors(); -} - -void Workspace::sourceFileRemoved( SourceFile* sf ) -{ - delete findItem( sf ); - updateColors(); -} - -void Workspace::formFileAdded( FormFile* ff ) -{ - if ( ff->isFake() ) - return; - (void) new WorkspaceItem( projectItem, ff ); - updateColors(); -} - -void Workspace::formFileRemoved( FormFile* ff ) -{ - delete findItem( ff ); - updateColors(); -} - -void Workspace::objectAdded( TQObject *o ) -{ - (void) new WorkspaceItem( projectItem, o, project ); - updateColors(); -} - -void Workspace::objectRemoved( TQObject *o ) -{ - delete findItem( o ); - updateColors(); -} - -void Workspace::update() -{ - completionDirty = TRUE; - triggerUpdate(); -} - -void Workspace::update( FormFile* ff ) -{ - TQListViewItem* i = findItem( ff ); - if ( i ) { - i->repaint(); - if ( (i = i->firstChild()) ) - i->repaint(); - } -} - - -void Workspace::activeFormChanged( FormWindow *fw ) -{ - WorkspaceItem *i = findItem( fw->formFile() ); - if ( i ) { - setCurrentItem( i ); - setSelected( i, TRUE ); - if ( !i->isOpen() ) - i->setAutoOpen( TRUE ); - } - - closeAutoOpenItems(); - -} - -void Workspace::activeEditorChanged( SourceEditor *se ) -{ - if ( !se->object() ) - return; - - if ( se->formWindow() ) { - WorkspaceItem *i = findItem( se->formWindow()->formFile() ); - if ( i && i->firstChild() ) { - if ( !i->isOpen() ) - i->setAutoOpen( TRUE ); - setCurrentItem( i->firstChild() ); - setSelected( i->firstChild(), TRUE ); - } - } else { - WorkspaceItem *i = findItem( se->sourceFile() ); - if ( i ) { - setCurrentItem( i ); - setSelected( i, TRUE ); - } - } - - closeAutoOpenItems(); -} - -WorkspaceItem *Workspace::findItem( FormFile* ff) -{ - TQListViewItemIterator it( this ); - for ( ; it.current(); ++it ) { - if ( ( (WorkspaceItem*)it.current() )->formFile == ff ) - return (WorkspaceItem*)it.current(); - } - return 0; -} - -WorkspaceItem *Workspace::findItem( SourceFile *sf ) -{ - TQListViewItemIterator it( this ); - for ( ; it.current(); ++it ) { - if ( ( (WorkspaceItem*)it.current() )->sourceFile == sf ) - return (WorkspaceItem*)it.current(); - } - return 0; -} - -WorkspaceItem *Workspace::findItem( TQObject *o ) -{ - TQListViewItemIterator it( this ); - for ( ; it.current(); ++it ) { - if ( ( (WorkspaceItem*)it.current() )->object == o ) - return (WorkspaceItem*)it.current(); - } - return 0; -} - -void Workspace::closeAutoOpenItems() -{ - TQListViewItemIterator it( this ); - for ( ; it.current(); ++it ) { - WorkspaceItem* i = (WorkspaceItem*) it.current(); - WorkspaceItem* ip = (WorkspaceItem*) i->parent(); - if ( i->type() == WorkspaceItem::FormSourceType ) { - if ( !i->isSelected() && !ip->isSelected() - && ip->isAutoOpen() ) { - ip->setAutoOpen( FALSE ); - } - } - } -} - - -void Workspace::closeEvent( TQCloseEvent *e ) -{ - e->accept(); -} - -void Workspace::itemDoubleClicked( TQListViewItem *i ) -{ - if ( ( (WorkspaceItem*)i)->type()== WorkspaceItem::ProjectType ) - i->setOpen( TRUE ); -} - -void Workspace::itemClicked( int button, TQListViewItem *i, const TQPoint& ) -{ - if ( !i || button != Qt::LeftButton ) - return; - - closeAutoOpenItems(); - - WorkspaceItem* wi = (WorkspaceItem*)i; - switch( wi->type() ) { - case WorkspaceItem::ProjectType: - break; // ### TODO - case WorkspaceItem::FormFileType: - wi->formFile->showFormWindow(); - break; - case WorkspaceItem::FormSourceType: - wi->formFile->showEditor( FALSE ); - break; - case WorkspaceItem::SourceFileType: - mainWindow->editSource( wi->sourceFile ); - break; - case WorkspaceItem::ObjectType: - project->fakeFormFileFor( wi->object )->formWindow()->setFocus(); - mainWindow->propertyeditor()->setWidget( wi->object, - project->fakeFormFileFor( wi->object )->formWindow() ); - mainWindow->objectHierarchy()-> - setFormWindow( project->fakeFormFileFor( wi->object )->formWindow(), wi->object ); - project->fakeFormFileFor( wi->object )->showEditor(); - break; - } -} - -void Workspace::contentsDropEvent( TQDropEvent *e ) -{ - if ( !TQUriDrag::canDecode( e ) ) { - e->ignore(); - } else { - TQStringList files; - TQUriDrag::decodeLocalFiles( e, files ); - if ( !files.isEmpty() ) { - for ( TQStringList::Iterator it = files.begin(); it != files.end(); ++it ) { - TQString fn = *it; - mainWindow->fileOpen( "", "", fn ); - } - } - } -} - -void Workspace::contentsDragEnterEvent( TQDragEnterEvent *e ) -{ - if ( !TQUriDrag::canDecode( e ) ) - e->ignore(); - else - e->accept(); -} - -void Workspace::contentsDragMoveEvent( TQDragMoveEvent *e ) -{ - if ( !TQUriDrag::canDecode( e ) ) - e->ignore(); - else - e->accept(); -} - -void Workspace::rmbClicked( TQListViewItem *i, const TQPoint& pos ) -{ - if ( !i ) - return; - WorkspaceItem* wi = (WorkspaceItem*)i; - enum { OPEN_SOURCE, REMOVE_SOURCE, OPEN_FORM, REMOVE_FORM, - OPEN_FORM_SOURCE, REMOVE_FORM_SOURCE, OPEN_OBJECT_SOURCE }; - TQPopupMenu menu( this ); - menu.setCheckable( TRUE ); - switch ( wi->type() ) { - case WorkspaceItem::SourceFileType: - menu.insertItem( i18n( "&Open Source File" ), OPEN_SOURCE ); - menu.insertSeparator(); - menu.insertItem( SmallIcon( "designer_editcut.png" , TDevDesignerPartFactory::instance()), - i18n( "&Remove Source File From Project" ), REMOVE_SOURCE ); - break; - case WorkspaceItem::FormFileType: - menu.insertItem( i18n( "&Open Form" ), OPEN_FORM ); - menu.insertSeparator(); - menu.insertItem( SmallIcon( "designer_editcut.png" , TDevDesignerPartFactory::instance()), - i18n( "&Remove Form From Project" ), REMOVE_FORM ); - break; - case WorkspaceItem::FormSourceType: - menu.insertItem( i18n( "&Open Form Source" ), OPEN_FORM_SOURCE ); - menu.insertSeparator(); - if ( project->isCpp() ) - menu.insertItem( SmallIcon( "designer_editcut.png" , TDevDesignerPartFactory::instance()), - i18n( "&Remove Source File From Form" ), REMOVE_FORM_SOURCE ); - else - menu.insertItem( SmallIcon( "designer_editcut.png" , TDevDesignerPartFactory::instance()), - i18n( "&Remove Form From Project" ), REMOVE_FORM ); - break; - case WorkspaceItem::ProjectType: - MainWindow::self->popupProjectMenu( pos ); - return; - case WorkspaceItem::ObjectType: - menu.insertItem( i18n( "&Open Source" ), OPEN_OBJECT_SOURCE ); - break; - } - - switch ( menu.exec( pos ) ) { - case REMOVE_SOURCE: - project->removeSourceFile( wi->sourceFile ); - break; - case REMOVE_FORM: - project->removeFormFile( wi->formFile ); - break; - case REMOVE_FORM_SOURCE: - ( (WorkspaceItem*)i )->formFile->setModified( TRUE ); - ( (WorkspaceItem*)i )->formFile->setCodeFileState( FormFile::Deleted ); - delete ( (WorkspaceItem*)i )->formFile->editor(); - break; - case OPEN_OBJECT_SOURCE: - case OPEN_SOURCE: - case OPEN_FORM: - case OPEN_FORM_SOURCE: - itemClicked( Qt::LeftButton, i, pos ); - break; - } -} - -bool Workspace::eventFilter( TQObject *o, TQEvent * e ) -{ - // Reggie, on what type of events do we have to execute updateBufferEdit() - if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(bufferEdit) && e->type() != TQEvent::ChildRemoved ) - updateBufferEdit(); - return TQListView::eventFilter( o, e ); -} - -void Workspace::setBufferEdit( QCompletionEdit *edit ) -{ - bufferEdit = edit; - connect( bufferEdit, TQT_SIGNAL( chosen( const TQString & ) ), - this, TQT_SLOT( bufferChosen( const TQString & ) ) ); - bufferEdit->installEventFilter( this ); -} - -void Workspace::updateBufferEdit() -{ - if ( !bufferEdit || !completionDirty || !MainWindow::self) - return; - completionDirty = FALSE; - TQStringList completion = MainWindow::self->projectFileNames(); - TQListViewItemIterator it( this ); - while ( it.current() ) { - ( (WorkspaceItem*)it.current())->fillCompletionList( completion ); - ++it; - } - completion.sort(); - bufferEdit->setCompletionList( completion ); -} - -void Workspace::bufferChosen( const TQString &buffer ) -{ - if ( bufferEdit ) - bufferEdit->setText( "" ); - - if ( MainWindow::self->projectFileNames().contains( buffer ) ) { - MainWindow::self->setCurrentProjectByFilename( buffer ); - return; - } - - TQListViewItemIterator it( this ); - while ( it.current() ) { - if ( ( (WorkspaceItem*)it.current())->checkCompletion( buffer ) ) { - itemClicked( Qt::LeftButton, it.current(), TQPoint() ); - break; - } - ++it; - } -} - -void Workspace::updateColors() -{ - TQListViewItem* i = firstChild(); - if ( i ) - i = i->firstChild(); - bool b = TRUE; - while ( i ) { - WorkspaceItem* wi = ( WorkspaceItem*) i; - i = i->nextSibling(); - wi->useOddColor = b; - b = !b; - } -} diff --git a/tdevdesigner/plugins/Makefile.am b/tdevdesigner/plugins/Makefile.am deleted file mode 100644 index 5d1b7d39..00000000 --- a/tdevdesigner/plugins/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -INCLUDES = -I$(top_srcdir)/interfaces $(all_includes) -METASOURCES = AUTO -tdevdesignerdir = $(kde_moduledir)/plugins/tdevdesigner -tdevdesigner_LTLIBRARIES = libtdevdesigner_lang.la -libtdevdesigner_lang_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) -libtdevdesigner_lang_la_SOURCES = languageinterfaceimpl.cpp -libtdevdesigner_lang_la_LIBADD = $(LIB_QT) - diff --git a/tdevdesigner/shared/widgetdatabase.cpp b/tdevdesigner/shared/widgetdatabase.cpp deleted file mode 100644 index c2635a9d..00000000 --- a/tdevdesigner/shared/widgetdatabase.cpp +++ /dev/null @@ -1,960 +0,0 @@ -/********************************************************************** -** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. -** -** This file is part of TQt Designer. -** -** This file may be distributed and/or modified under the terms of the -** GNU General Public License version 2 as published by the Free Software -** Foundation and appearing in the file LICENSE.GPL included in the -** packaging of this file. -** -** Licensees holding valid TQt Enterprise Edition or TQt Professional Edition -** licenses may use this file in accordance with the TQt Commercial License -** Agreement provided with the Software. -** -** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -** -** See http://www.trolltech.com/gpl/ for GPL licensing information. -** See http://www.trolltech.com/pricing.html or email sales@trolltech.com for -** information about TQt Commercial License Agreements. -** -** Contact info@trolltech.com if any conditions of this licensing are -** not clear to you. -** -**********************************************************************/ - -#include "widgetdatabase.h" -#include "../interfaces/widgetinterface.h" - -#include "../designer/tdevdesigner_part.h" - -#include -#include - -#include -#define NO_STATIC_COLORS -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -const int dbsize = 300; -const int dbcustom = 200; -const int dbdictsize = 211; -static WidgetDatabaseRecord* db[ dbsize ]; -static TQDict *className2Id = 0; -static int dbcount = 0; -static int dbcustomcount = 200; -static TQStrList *wGroups; -static TQStrList *invisibleGroups; -static bool whatsThisLoaded = FALSE; -static TQPluginManager *widgetPluginManager = 0; -static bool plugins_set_up = FALSE; -static bool was_in_setup = FALSE; - -TQCleanupHandler > cleanup_manager; - -WidgetDatabaseRecord::WidgetDatabaseRecord() -{ - isForm = FALSE; - isContainer = FALSE; - icon = 0; - nameCounter = 0; - isCommon = FALSE; - isPlugin = FALSE; -} - -WidgetDatabaseRecord::~WidgetDatabaseRecord() -{ - delete icon; -} - - -/*! - \class WidgetDatabase widgetdatabase.h - \brief The WidgetDatabase class holds information about widgets - - The WidgetDatabase holds information about widgets like toolTip(), - iconSet(), ... It works Id-based, so all access functions take the - widget id as parameter. To get the id for a widget (classname), use - idFromClassName(). - - All access functions are static. Having multiple widgetdatabases in - one application doesn't make sense anyway and so you don't need more - than an instance of the widgetdatabase. - - For creating widgets, layouts, etc. see WidgetFactory. -*/ - -/*! - Creates widget database. Does nothing. -*/ - -WidgetDatabase::WidgetDatabase() -{ -} - -/*! Sets up the widget database. If the static widgetdatabase already - exists, the functions returns immediately. -*/ - -void WidgetDatabase::setupDataBase( int id ) -{ - was_in_setup = TRUE; -#ifndef UIC - Q_UNUSED( id ) - if ( dbcount ) - return; -#else - if ( dbcount && id != -2 ) - return; - if ( dbcount && !plugins_set_up ) { - setupPlugins(); - return; - } - if ( dbcount && plugins_set_up) - return; -#endif - - wGroups = new TQStrList; - invisibleGroups = new TQStrList; - invisibleGroups->append( "Forms" ); - invisibleGroups->append( "Temp" ); - className2Id = new TQDict( dbdictsize ); - className2Id->setAutoDelete( TRUE ); - - WidgetDatabaseRecord *r = 0; - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_pushbutton.png"; - r->name = TQPUSHBUTTON_OBJECT_NAME_STRING; - r->group = widgetGroup( "Buttons" ); - r->toolTip = "Push Button"; - r->isCommon = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_toolbutton.png"; - r->name = TQTOOLBUTTON_OBJECT_NAME_STRING; - r->group = widgetGroup( "Buttons" ); - r->toolTip = "Tool Button"; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_radiobutton.png"; - r->name = TQRADIOBUTTON_OBJECT_NAME_STRING; - r->group = widgetGroup( "Buttons" ); - r->toolTip = "Radio Button"; - r->isCommon = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_checkbox.png"; - r->name = TQCHECKBOX_OBJECT_NAME_STRING; - r->group = widgetGroup( "Buttons" ); - r->toolTip = "Check Box"; - r->isCommon = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_groupbox.png"; - r->name = TQGROUPBOX_OBJECT_NAME_STRING; - r->group = widgetGroup( "Containers" ); - r->toolTip = "Group Box"; - r->isContainer = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_buttongroup.png"; - r->name = TQBUTTONGROUP_OBJECT_NAME_STRING; - r->group = widgetGroup( "Containers" ); - r->toolTip = "Button Group"; - r->isContainer = TRUE; - r->isCommon = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_frame.png"; - r->name = TQFRAME_OBJECT_NAME_STRING; - r->group = widgetGroup( "Containers" ); - r->toolTip = "Frame"; - r->isContainer = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_tabwidget.png"; - r->name = TQTABWIDGET_OBJECT_NAME_STRING; - r->group = widgetGroup( "Containers" ); - r->toolTip = "Tabwidget"; - r->isContainer = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_widgetstack.png"; - r->name = TQWIDGETSTACK_OBJECT_NAME_STRING; - r->group = widgetGroup( "Containers" ); - r->toolTip = "Widget Stack"; - r->isContainer = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_toolbox.png"; - r->name = TQTOOLBOX_OBJECT_NAME_STRING; - r->group = widgetGroup( "Containers" ); - r->toolTip = "Tool Box"; - r->isContainer = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_listbox.png"; - r->name = TQLISTBOX_OBJECT_NAME_STRING; - r->group = widgetGroup( "Views" ); - r->toolTip = "List Box"; - r->isCommon = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_listview.png"; - r->name = TQLISTVIEW_OBJECT_NAME_STRING; - r->group = widgetGroup( "Views" ); - r->toolTip = "List View"; - - append( r ); - -#if !defined(TQT_NO_ICONVIEW) || defined(UIC) - r = new WidgetDatabaseRecord; - r->iconSet = "designer_iconview.png"; - r->name = TQICONVIEW_OBJECT_NAME_STRING; - r->group = widgetGroup( "Views" ); - r->toolTip = "Icon View"; - - append( r ); -#endif - -#if !defined(TQT_NO_TABLE) - r = new WidgetDatabaseRecord; - r->iconSet = "designer_table.png"; - r->name = TQTABLE_OBJECT_NAME_STRING; - r->group = widgetGroup( "Views" ); - r->toolTip = "Table"; - - append( r ); -#endif - -#if !defined(TQT_NO_SQL) - r = new WidgetDatabaseRecord; - r->iconSet = "designer_datatable.png"; - r->includeFile = "tqdatatable.h"; - r->name = TQDATATABLE_OBJECT_NAME_STRING; - r->group = widgetGroup( "Database" ); - r->toolTip = "Data Table"; - - append( r ); -#endif - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_lineedit.png"; - r->name = TQLINEEDIT_OBJECT_NAME_STRING; - r->group = widgetGroup( "Input" ); - r->toolTip = "Line Edit"; - r->isCommon = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_spinbox.png"; - r->name = TQSPINBOX_OBJECT_NAME_STRING; - r->group = widgetGroup( "Input" ); - r->toolTip = "Spin Box"; - r->isCommon = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_dateedit.png"; - r->name = TQDATEEDIT_OBJECT_NAME_STRING; - r->group = widgetGroup( "Input" ); - r->toolTip = "Date Edit"; - r->includeFile = "tqdatetimeedit.h"; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_timeedit.png"; - r->name = TQTIMEEDIT_OBJECT_NAME_STRING; - r->group = widgetGroup( "Input" ); - r->toolTip = "Time Edit"; - r->includeFile = "tqdatetimeedit.h"; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_datetimeedit.png"; - r->name = TQDATETIMEEDIT_OBJECT_NAME_STRING; - r->group = widgetGroup( "Input" ); - r->toolTip = "Date-Time Edit"; - r->includeFile = "tqdatetimeedit.h"; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_multilineedit.png"; - r->name = TQMULTILINEEDIT_OBJECT_NAME_STRING; - r->group = widgetGroup( "Temp" ); - r->toolTip = "Multi Line Edit"; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_richtextedit.png"; - r->name = TQTEXTEDIT_OBJECT_NAME_STRING; - r->group = widgetGroup( "Input" ); - r->toolTip = "Rich Text Edit"; - r->isCommon = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_combobox.png"; - r->name = TQCOMBOBOX_OBJECT_NAME_STRING; - r->group = widgetGroup( "Input" ); - r->toolTip = "Combo Box"; - r->isCommon = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_slider.png"; - r->name = TQSLIDER_OBJECT_NAME_STRING; - r->group = widgetGroup( "Input" ); - r->toolTip = "Slider"; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_scrollbar.png"; - r->name = TQSCROLLBAR_OBJECT_NAME_STRING; - r->group = widgetGroup( "Input" ); - r->toolTip = "Scrollbar"; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_dial.png"; - r->name = TQDIAL_OBJECT_NAME_STRING; - r->group = widgetGroup( "Input" ); - r->toolTip = "Dial"; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_label.png"; - r->name = TQLABEL_OBJECT_NAME_STRING; - r->group = widgetGroup( "Temp" ); - r->toolTip = "Label"; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_label.png"; - r->name = "TextLabel"; - r->group = widgetGroup( "Display" ); - r->toolTip = "Text Label"; - r->whatsThis = "The Text Label provides a widget to display static text."; - r->isCommon = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_pixlabel.png"; - r->name = "PixmapLabel"; - r->group = widgetGroup( "Display" ); - r->toolTip = "Pixmap Label"; - r->whatsThis = "The Pixmap Label provides a widget to display pixmaps."; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_lcdnumber.png"; - r->name = TQLCDNUMBER_OBJECT_NAME_STRING; - r->group = widgetGroup( "Display" ); - r->toolTip = "LCD Number"; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_line.png"; - r->name = "Line"; - r->group = widgetGroup( "Display" ); - r->toolTip = "Line"; - r->includeFile = "tqframe.h"; - r->whatsThis = "The Line widget provides horizontal and vertical lines."; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_progress.png"; - r->name = TQPROGRESSBAR_OBJECT_NAME_STRING; - r->group = widgetGroup( "Display" ); - r->toolTip = "Progress Bar"; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_textview.png"; - r->name = TQTEXTVIEW_OBJECT_NAME_STRING; - r->group = widgetGroup( "Temp" ); - r->toolTip = "Text View"; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_textbrowser.png"; - r->name = TQTEXTBROWSER_OBJECT_NAME_STRING; - r->group = widgetGroup( "Display" ); - r->toolTip = "Text Browser"; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_spacer.png"; - r->name = "Spacer"; - r->group = widgetGroup( "Temp" ); - r->toolTip = "Spacer"; - r->whatsThis = "The Spacer provides horizontal and vertical spacing to be able to manipulate the behaviour of layouts."; - - append( r ); - - r = new WidgetDatabaseRecord; - r->name = TQWIDGET_OBJECT_NAME_STRING; - r->isForm = TRUE; - r->group = widgetGroup( "Forms" ); - - append( r ); - - r = new WidgetDatabaseRecord; - r->name = TQDIALOG_OBJECT_NAME_STRING; - r->group = widgetGroup( "Forms" ); - r->isForm = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->name = TQWIZARD_OBJECT_NAME_STRING; - r->group = widgetGroup( "Forms" ); - r->isContainer = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->name = "TQDesignerWizard"; - r->group = widgetGroup( "Forms" ); - r->isContainer = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->name = TQLAYOUTWIDGET_OBJECT_NAME_STRING; - r->group = widgetGroup( "Temp" ); - r->includeFile = ""; - r->isContainer = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->name = TQSPLITTER_OBJECT_NAME_STRING; - r->group = widgetGroup( "Temp" ); - r->includeFile = "tqsplitter.h"; - r->isContainer = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_tabwidget.png"; - r->name = "TQDesignerTabWidget"; - r->group = widgetGroup( "Temp" ); - r->isContainer = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_tabwidget.png"; - r->name = "TQDesignerWidget"; - r->group = widgetGroup( "Temp" ); - r->isContainer = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = "designer_tabwidget.png"; - r->name = "TQDesignerDialog"; - r->group = widgetGroup( "Temp" ); - r->isContainer = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = ""; - r->name = TQMAINWINDOW_OBJECT_NAME_STRING; - r->includeFile = "tqmainwindow.h"; - r->group = widgetGroup( "Temp" ); - r->isContainer = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = ""; - r->name = "TQDesignerAction"; - r->includeFile = "tqaction.h"; - r->group = widgetGroup( "Temp" ); - r->isContainer = FALSE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = ""; - r->name = "TQDesignerActionGroup"; - r->includeFile = "tqaction.h"; - r->group = widgetGroup( "Temp" ); - r->isContainer = FALSE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = ""; - r->name = TQSCROLLVIEW_OBJECT_NAME_STRING; - r->includeFile = "tqscrollview.h"; - r->group = widgetGroup( "Temp" ); - r->isContainer = TRUE; - - append( r ); - -#ifndef TQT_NO_SQL - r = new WidgetDatabaseRecord; - r->iconSet = ""; - r->name = TQDATABROWSER_OBJECT_NAME_STRING; - r->includeFile = "tqdatabrowser.h"; - r->group = widgetGroup( "Database" ); - r->toolTip = "Data Browser"; - r->iconSet = "designer_databrowser.png"; - r->isContainer = TRUE; - - append( r ); - - r = new WidgetDatabaseRecord; - r->iconSet = ""; - r->name = TQDATAVIEW_OBJECT_NAME_STRING; - r->includeFile = "tqdataview.h"; - r->group = widgetGroup( "Database" ); - r->toolTip = "Data View"; - r->iconSet = "designer_dataview.png"; - r->isContainer = TRUE; - - append( r ); -#endif - -#ifndef UIC - setupPlugins(); -#endif -} - -void WidgetDatabase::setupPlugins() -{ - if ( plugins_set_up ) - return; - plugins_set_up = TRUE; - TQStringList widgets = widgetManager()->featureList(); - for ( TQStringList::Iterator it = widgets.begin(); it != widgets.end(); ++it ) { - if ( hasWidget( *it ) ) - continue; - WidgetDatabaseRecord *r = new WidgetDatabaseRecord; - WidgetInterface *iface = 0; - widgetManager()->queryInterface( *it, &iface ); - if ( !iface ) - continue; - -#ifndef UIC - TQIconSet icon = iface->iconSet( *it ); - if ( !icon.pixmap().isNull() ) - r->icon = new TQIconSet( icon ); -#endif - TQString grp = iface->group( *it ); - if ( grp.isEmpty() ) - grp = "3rd party widgets"; - r->group = widgetGroup( grp ); - r->toolTip = iface->toolTip( *it ); - r->whatsThis = iface->whatsThis( *it ); - r->includeFile = iface->includeFile( *it ); - r->isContainer = iface->isContainer( *it ); - r->name = *it; - r->isPlugin = TRUE; - append( r ); - iface->release(); - } -} - -/*! - Returns the number of elements in the widget database. -*/ - -int WidgetDatabase::count() -{ - setupDataBase( -1 ); - return dbcount; -} - -/*! - Returns the id at which the ids of custom widgets start. -*/ - -int WidgetDatabase::startCustom() -{ - setupDataBase( -1 ); - return dbcustom; -} - -/*! - Returns the iconset which represents the class registered as \a id. -*/ - -TQIconSet WidgetDatabase::iconSet( int id ) -{ - setupDataBase( id ); - WidgetDatabaseRecord *r = at( id ); - if ( !r ) - return TQIconSet(); -#if !defined(UIC) && !defined(RESOURCE) - if ( !r->icon ) { - if ( r->iconSet.isEmpty() ) - return TQIconSet(); - TQPixmap pix = BarIcon( r->iconSet, TDevDesignerPartFactory::instance() ); - if ( pix.isNull() ) - pix = TQPixmap( r->iconSet ); - r->icon = new TQIconSet( pix ); - } - return *r->icon; -#else - return TQIconSet(); -#endif -} - -/*! - Returns the classname of the widget which is registered as \a id. -*/ - -TQString WidgetDatabase::className( int id ) -{ - setupDataBase( id ); - WidgetDatabaseRecord *r = at( id ); - if ( !r ) - return TQString(); - return r->name; -} - -/*! - Returns the group the widget registered as \a id belongs to. -*/ - -TQString WidgetDatabase::group( int id ) -{ - setupDataBase( id ); - WidgetDatabaseRecord *r = at( id ); - if ( !r ) - return TQString(); - return r->group; -} - -/*! - Returns the tooltip text of the widget which is registered as \a id. -*/ - -TQString WidgetDatabase::toolTip( int id ) -{ - setupDataBase( id ); - WidgetDatabaseRecord *r = at( id ); - if ( !r ) - return TQString(); - return r->toolTip; -} - -/*! - Returns the what's this? text of the widget which is registered as \a id. -*/ - -TQString WidgetDatabase::whatsThis( int id ) -{ - setupDataBase( id ); - WidgetDatabaseRecord *r = at( id ); - if ( !r ) - return TQString(); - return r->whatsThis; -} - -/*! - Returns the include file if the widget which is registered as \a id. -*/ - -TQString WidgetDatabase::includeFile( int id ) -{ - setupDataBase( id ); - WidgetDatabaseRecord *r = at( id ); - if ( !r ) - return TQString(); - if ( r->includeFile.isNull() ) - return r->name.lower() + ".h"; - return r->includeFile; -} - -/*! Returns whether the widget registered as \a id is a form. -*/ -bool WidgetDatabase::isForm( int id ) -{ - setupDataBase( id ); - WidgetDatabaseRecord *r = at( id ); - if ( !r ) - return FALSE; - return r->isForm; -} - -/*! Returns whether the widget registered as \a id can have children. -*/ - -bool WidgetDatabase::isContainer( int id ) -{ - setupDataBase( id ); - WidgetDatabaseRecord *r = at( id ); - if ( !r ) - return FALSE; - return r->isContainer || r->isForm; -} - -bool WidgetDatabase::isCommon( int id ) -{ - setupDataBase( id ); - WidgetDatabaseRecord *r = at( id ); - if ( !r ) - return FALSE; - return r->isCommon; -} - -TQString WidgetDatabase::createWidgetName( int id ) -{ - setupDataBase( id ); - TQString n = className( id ); - if ( n == TQLAYOUTWIDGET_OBJECT_NAME_STRING ) - n = "Layout"; - if ( n[ 0 ] == 'Q' && n[ 1 ].lower() != n[ 1 ] ) - n = n.mid( 1 ); - int colonColon = n.findRev( "::" ); - if ( colonColon != -1 ) - n = n.mid( colonColon + 2 ); - - WidgetDatabaseRecord *r = at( id ); - if ( !r ) - return n; - n += TQString::number( ++r->nameCounter ); - n[0] = n[0].lower(); - return n; -} - -/*! Returns the id for \a name or -1 if \a name is unknown. - */ -int WidgetDatabase::idFromClassName( const TQString &name ) -{ - setupDataBase( -1 ); - if ( name.isEmpty() ) - return 0; - int *i = className2Id->find( name ); - if ( i ) - return *i; - if ( name == "FormWindow" ) - return idFromClassName( TQLAYOUTWIDGET_OBJECT_NAME_STRING ); -#ifdef UIC - setupDataBase( -2 ); - i = className2Id->find( name ); - if ( i ) - return *i; -#endif - return -1; -} - -bool WidgetDatabase::hasWidget( const TQString &name ) -{ - return className2Id->find( name ) != 0; -} - -WidgetDatabaseRecord *WidgetDatabase::at( int index ) -{ - if ( index < 0 ) - return 0; - if ( index >= dbcustom && index < dbcustomcount ) - return db[ index ]; - if ( index < dbcount ) - return db[ index ]; - return 0; -} - -void WidgetDatabase::insert( int index, WidgetDatabaseRecord *r ) -{ - if ( index < 0 || index >= dbsize ) - return; - db[ index ] = r; - className2Id->insert( r->name, new int( index ) ); - if ( index < dbcustom ) - dbcount = TQMAX( dbcount, index ); -} - -void WidgetDatabase::append( WidgetDatabaseRecord *r ) -{ - if ( !was_in_setup ) - setupDataBase( -1 ); - insert( dbcount++, r ); -} - -TQString WidgetDatabase::widgetGroup( const TQString &g ) -{ - if ( wGroups->find( g.ascii() ) == -1 ) - wGroups->append( g.ascii() ); - return g; -} - -bool WidgetDatabase::isGroupEmpty( const TQString &grp ) -{ - WidgetDatabaseRecord *r = 0; - for ( int i = 0; i < dbcount; ++i ) { - if ( !( r = db[ i ] ) ) - continue; - if ( r->group == grp ) - return FALSE; - } - return TRUE; -} - -TQString WidgetDatabase::widgetGroup( int i ) -{ - setupDataBase( -1 ); - if ( i >= 0 && i < (int)wGroups->count() ) - return wGroups->at( i ); - return TQString(); -} - -int WidgetDatabase::numWidgetGroups() -{ - setupDataBase( -1 ); - return wGroups->count(); -} - -bool WidgetDatabase::isGroupVisible( const TQString &g ) -{ - setupDataBase( -1 ); - return invisibleGroups->find( g.ascii() ) == -1; -} - -int WidgetDatabase::addCustomWidget( WidgetDatabaseRecord *r ) -{ - insert( dbcustomcount++, r ); - return dbcustomcount - 1; -} - -void WidgetDatabase::customWidgetClassNameChanged( const TQString &oldName, - const TQString &newName ) -{ - int id = idFromClassName( oldName ); - if ( id == -1 ) - return; - WidgetDatabaseRecord *r = db[ id ]; - r->name = newName; - className2Id->remove( oldName ); - className2Id->insert( newName, new int( id ) ); -} - -bool WidgetDatabase::isCustomWidget( int id ) -{ - if ( id >= dbcustom && id < dbcustomcount ) - return TRUE; - return FALSE; -} - -bool WidgetDatabase::isCustomPluginWidget( int id ) -{ - setupDataBase( id ); - WidgetDatabaseRecord *r = at( id ); - if ( !r ) - return FALSE; - return r->isPlugin; -} - -bool WidgetDatabase::isWhatsThisLoaded() -{ - return whatsThisLoaded; -} - -void WidgetDatabase::loadWhatsThis( const TQString &docPath ) -{ - TQString whatsthisFile = docPath + "/whatsthis"; - TQFile f( whatsthisFile ); - if ( !f.open( IO_ReadOnly ) ) - return; - TQTextStream ts( &f ); - while ( !ts.atEnd() ) { - TQString s = ts.readLine(); - TQStringList l = TQStringList::split( " | ", s ); - int id = idFromClassName( l[ 1 ] ); - WidgetDatabaseRecord *r = at( id ); - if ( r ) - r->whatsThis = l[ 0 ]; - } - whatsThisLoaded = TRUE; -} - - -// ### TQt 3.1: make these publically accessible via TQWidgetDatabase API -#if defined(UIC) -bool dbnounload = FALSE; -TQStringList *dbpaths = 0; -#else -extern TQString *qwf_plugin_dir; -#endif - - -TQPluginManager *widgetManager() -{ - if ( !widgetPluginManager ) { - TQString pluginDir = "/designer"; -#if !defined(UIC) - if ( qwf_plugin_dir ) - pluginDir = *qwf_plugin_dir; -#endif - widgetPluginManager = new TQPluginManager( IID_Widget, TQApplication::libraryPaths(), pluginDir ); - cleanup_manager.add( &widgetPluginManager ); -#if defined(UIC) - if ( dbnounload ) - widgetPluginManager->setAutoUnload( FALSE ); - if ( dbpaths ) { - TQStringList::ConstIterator it = dbpaths->begin(); - for ( ; it != dbpaths->end(); ++it ) - widgetPluginManager->addLibraryPath( *it ); - } -#endif - } - return widgetPluginManager; -} diff --git a/tdevdesigner/src/CMakeLists.txt b/tdevdesigner/src/CMakeLists.txt deleted file mode 100644 index e7cf1615..00000000 --- a/tdevdesigner/src/CMakeLists.txt +++ /dev/null @@ -1,36 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_BINARY_DIR} - ${TDE_INCLUDE_DIR} - ${TQT_INCLUDE_DIRS} -) - -link_directories( - ${TQT_LIBRARY_DIRS} -) - - -##### other data ################################ - -install( FILES tdevdesigner.desktop DESTINATION ${XDG_APPS_INSTALL_DIR} ) -install( FILES tdevdesigner_shell.rc DESTINATION ${DATA_INSTALL_DIR}/tdevdesigner ) - - -##### tdevdesigner (executable) ################# - -tde_add_executable( tdevdesigner AUTOMOC - SOURCES main.cpp tdevdesigner.cpp - LINK tdeparts-shared - DESTINATION ${BIN_INSTALL_DIR} -) diff --git a/tdevdesigner/src/Makefile.am b/tdevdesigner/src/Makefile.am deleted file mode 100644 index c88a016d..00000000 --- a/tdevdesigner/src/Makefile.am +++ /dev/null @@ -1,47 +0,0 @@ -# set the include path for X, qt and KDE -INCLUDES = $(all_includes) - -# these are the headers for your project -noinst_HEADERS = tdevdesigner.h - -# let automoc handle all of the meta source files (moc) -METASOURCES = AUTO - -messages: rc.cpp - $(XGETTEXT) *.cpp -o $(podir)/tdevdesigner.pot - - -# this Makefile creates both a KPart application and a KPart -######################################################################### -# APPLICATION SECTION -######################################################################### -# this is the program that gets installed. it's name is used for all -# of the other Makefile.am variables -bin_PROGRAMS = tdevdesigner - -# the application source, library search path, and link libraries -tdevdesigner_SOURCES = main.cpp tdevdesigner.cpp -tdevdesigner_LDFLAGS = $(all_libraries) $(KDE_RPATH) $(LIB_QT) -lDCOP $(LIB_TDECORE) $(LIB_TDEUI) -ltdefx $(LIB_TDEIO) -ltdetexteditor -tdevdesigner_LDADD = $(LIB_TDEPARTS) - -# this is where the desktop file will go -#shelldesktopdir = $(kde_appsdir)/Development -#shelldesktop_DATA = tdevdesigner.desktop -xdg_apps_DATA = tdevdesigner.desktop - -# this is where the shell's XML-GUI resource file goes -shellrcdir = $(kde_datadir)/tdevdesigner -shellrc_DATA = tdevdesigner_shell.rc - -######################################################################### -# KPART SECTION -######################################################################### - -# the Part's source, library search path, and link libraries - - -# this is where the desktop file will go -partdesktopdir = $(kde_servicesdir) - -# this is where the part's XML-GUI resource file goes -partrcdir = $(kde_datadir)/tdevdesignerpart diff --git a/tdevdesigner/src/main.cpp b/tdevdesigner/src/main.cpp deleted file mode 100644 index 0ada9f98..00000000 --- a/tdevdesigner/src/main.cpp +++ /dev/null @@ -1,94 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Alexander Dymo * - * cloudtemple@mksat.net * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ -#include - -#include -#include "tdevdesigner.h" -#include -#include -#include -#include -#include - -static const char description[] = - I18N_NOOP("TDE GUI Designer"); - -static const char version[] = "0.2"; - -static TDECmdLineOptions options[] = -{ - { "+[URL]", I18N_NOOP( "Document to open" ), 0 }, - TDECmdLineLastOption -}; - -int main(int argc, char **argv) -{ - TDEAboutData about("tdevdesigner", I18N_NOOP("TDevDesigner"), version, description, - TDEAboutData::License_GPL, "TDevDesigner Copyright: (C) 2004-2005 Alexander Dymo\nTQt Designer Copyright: (C) 2000-2005 Trolltech AS All Rights Reserved", 0, 0); - about.addAuthor( "Trolltech AS", "TQt Designer code (Free Edition)" ); - about.addAuthor( "Alexander Dymo", "Port to KDE, partification", "adymo@kdevelop.org" ); - TDECmdLineArgs::init(argc, argv, &about); - TDECmdLineArgs::addCmdLineOptions( options ); - TDEApplication app; - - // see if we are starting with session management - if (app.isRestored()) - { - RESTORE(TDevDesigner); - } - else - { - // no session.. just start up normally - TQSplashScreen * splash = 0; - TQString splashFile = locate("data", "tdevelop/pics/tdevdesigner-splash.png"); - if (!splashFile.isNull()) - { - TQPixmap pm; - pm.load(splashFile); - splash = new TQSplashScreen( pm ); - splash->show(); - } - - app.processEvents(); - - TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs(); - - if ( args->count() == 0 ) - { - TDevDesigner *widget = new TDevDesigner; - widget->show(); - } - else - { - int i = 0; - for (; i < args->count(); i++ ) - { - TDevDesigner *widget = new TDevDesigner; - widget->show(); - widget->load( args->url( i ) ); - } - } - args->clear(); - if (splash) - delete splash; - } - - return app.exec(); -} diff --git a/tdevdesigner/src/tdevdesigner.cpp b/tdevdesigner/src/tdevdesigner.cpp deleted file mode 100644 index bcc9423d..00000000 --- a/tdevdesigner/src/tdevdesigner.cpp +++ /dev/null @@ -1,216 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Alexander Dymo * - * cloudtemple@mksat.net * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ - -#include "tdevdesigner.h" - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -#include -#include -#include -#include - -TDevDesigner::TDevDesigner() - : KParts::MainWindow( 0L, "TDevDesigner" ) -{ - // set the shell's ui resource file - setXMLFile("tdevdesigner_shell.rc"); - - // then, setup our actions - setupActions(); - - // and a status bar - statusBar()->show(); - - // this routine will find and load our Part. it finds the Part by - // name which is a bad idea usually.. but it's alright in this - // case since our Part is made for this Shell - KLibFactory *factory = KLibLoader::self()->factory("libtdevdesignerpart"); - if (factory) - { - // now that the Part is loaded, we cast it to a Part to get - // our hands on it - TQStringList args; - args.append("in shell"); - m_part = static_cast(factory->create(TQT_TQOBJECT(this), - "tdevdesigner_part", "KParts::ReadWritePart", args)); - - if (m_part) - { - // tell the KParts::MainWindow that this is indeed the main widget - setCentralWidget(m_part->widget()); - - // and integrate the part's GUI with the shell's - createGUI(m_part); - } - } - else - { - // if we couldn't find our Part, we exit since the Shell by - // itself can't do anything useful - KMessageBox::error(this, i18n("Could not find the TDevDesigner part.")); - kapp->quit(); - // we return here, cause kapp->quit() only means "exit the - // next time we enter the event loop... - return; - } - - // apply the saved mainwindow settings, if any, and ask the mainwindow - // to automatically save settings if changed: window size, toolbar - // position, icon size, etc. - setAutoSaveSettings(); -} - -TDevDesigner::~TDevDesigner() -{ -} - -void TDevDesigner::load(const KURL& url) -{ - m_part->openURL( url ); -} - -void TDevDesigner::setupActions() -{ -/* KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(fileNew()), actionCollection()); - KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(fileOpen()), actionCollection());*/ - - KStdAction::quit(TQT_TQOBJECT(kapp), TQT_SLOT(quit()), actionCollection()); - - m_toolbarAction = KStdAction::showToolbar(TQT_TQOBJECT(this), TQT_SLOT(optionsShowToolbar()), actionCollection()); - m_statusbarAction = KStdAction::showStatusbar(TQT_TQOBJECT(this), TQT_SLOT(optionsShowStatusbar()), actionCollection()); - - KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureKeys()), actionCollection()); - KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureToolbars()), actionCollection()); -} - -void TDevDesigner::saveProperties(TDEConfig* /*config*/) -{ - // the 'config' object points to the session managed - // config file. anything you write here will be available - // later when this app is restored -} - -void TDevDesigner::readProperties(TDEConfig* /*config*/) -{ - // the 'config' object points to the session managed - // config file. this function is automatically called whenever - // the app is being restored. read in here whatever you wrote - // in 'saveProperties' -} - -void TDevDesigner::fileNew() -{ - // this slot is called whenever the File->New menu is selected, - // the New shortcut is pressed (usually CTRL+N) or the New toolbar - // button is clicked - - // About this function, the style guide ( - // http://developer.kde.org/documentation/standards/kde/style/basics/index.html ) - // says that it should open a new window if the document is _not_ - // in its initial state. This is what we do here.. - if ( ! m_part->url().isEmpty() || m_part->isModified() ) - { - (new TDevDesigner)->show(); - }; -} - - -void TDevDesigner::optionsShowToolbar() -{ - // this is all very cut and paste code for showing/hiding the - // toolbar - if (m_toolbarAction->isChecked()) - toolBar()->show(); - else - toolBar()->hide(); -} - -void TDevDesigner::optionsShowStatusbar() -{ - // this is all very cut and paste code for showing/hiding the - // statusbar - if (m_statusbarAction->isChecked()) - statusBar()->show(); - else - statusBar()->hide(); -} - -void TDevDesigner::optionsConfigureKeys() -{ - KKeyDialog::configureKeys(m_part->actionCollection(), "tdevdesigner_part.rc"); -} - -void TDevDesigner::optionsConfigureToolbars() -{ - saveMainWindowSettings(TDEGlobal::config(), autoSaveGroup()); - - // use the standard toolbar editor - KEditToolbar dlg(factory()); - connect(&dlg, TQT_SIGNAL(newToolbarConfig()), - this, TQT_SLOT(applyNewToolbarConfig())); - dlg.exec(); -} - -void TDevDesigner::applyNewToolbarConfig() -{ - applyMainWindowSettings(TDEGlobal::config(), autoSaveGroup()); -} - -void TDevDesigner::fileOpen() -{ - // this slot is called whenever the File->Open menu is selected, - // the Open shortcut is pressed (usually CTRL+O) or the Open toolbar - // button is clicked - KURL url = - KFileDialog::getOpenURL( TQString(), TQString(), this ); - - if (url.isEmpty() == false) - { - // About this function, the style guide ( - // http://developer.kde.org/documentation/standards/kde/style/basics/index.html ) - // says that it should open a new window if the document is _not_ - // in its initial state. This is what we do here.. - if ( m_part->url().isEmpty() && ! m_part->isModified() ) - { - // we open the file in this window... - load( url ); - } - else - { - // we open the file in a new window... - TDevDesigner* newWin = new TDevDesigner; - newWin->load( url ); - newWin->show(); - } - } -} - -#include "tdevdesigner.moc" diff --git a/tdevdesigner/src/tdevdesigner.desktop b/tdevdesigner/src/tdevdesigner.desktop deleted file mode 100644 index d2989142..00000000 --- a/tdevdesigner/src/tdevdesigner.desktop +++ /dev/null @@ -1,96 +0,0 @@ -[Desktop Entry] -Name=TDevelop Designer -Name[el]=Σχεδιαστής TDevelop -Name[es]=Diseñador de TDevelop -Name[et]=TDevelopi Disainer -Name[eu]=TDevelop disenatzailea -Name[fa]=طراح TDevelop -Name[fr]=Concepteur TDevelop -Name[ga]=Dearthóir TDevelop -Name[it]=Designer di TDevelop -Name[ja]=TDevelop デザイナー -Name[ms]=Pereka TDevelop -Name[nds]=TDevelop-Maker -Name[ne]=केडीई विकास डिजाइनर -Name[pl]=Projektant TDevelop -Name[pt]=Desenhador do TDevelop -Name[pt_BR]=Designer do TDevelop -Name[sk]=TDevelop Dizajnér -Name[sl]=Snovalnik TDevelop -Name[sv]=TDevelop designer -Name[ta]=கேமேம்பாட்டு வடிவமைப்பாளர் -Name[tg]=Дизайнгари TDevelop -Name[zh_CN]=TDevelop 设计师 -Name[zh_TW]=TDevelop 設計器 -GenericName=Interface Designer -GenericName[br]=Ergrafer etrefas -GenericName[ca]=Dissenyador de interfícies -GenericName[cy]=Dylunydd Rhyngwyneb -GenericName[de]=Oberflächen-Designer -GenericName[el]=Σχεδιαστής διασυνδέσεων -GenericName[es]=Diseñador de interfaces -GenericName[et]=Liidesedisainer -GenericName[eu]=Interfazeen diseinatzailea -GenericName[fa]=طراح واسط -GenericName[fr]=Concepteur d'interfaces graphiques -GenericName[ga]=Dearthóir Comhéadain -GenericName[gl]=Deseñador de interfaces -GenericName[hu]=Felülettervező -GenericName[it]=Interfaccia del Designer -GenericName[ja]=インターフェースデザイナー -GenericName[lt]=Sąsajos redaktorius -GenericName[ms]=Pereka Antaramuka -GenericName[nds]=Böversietmaker -GenericName[ne]=इन्टरफेस डिजाइनर -GenericName[pl]=Projektowanie interfejsu -GenericName[pt]=Editor de Interfaces -GenericName[pt_BR]=Desenhador de Interface -GenericName[ru]=Дизайнер пользовательского интерфейса -GenericName[rw]=Umuhanzi w'Imigaragarire -GenericName[sk]=Interface Dizajnér -GenericName[sl]=Snovalnik vmesnikov -GenericName[sr]=Дизајнер интерфејса -GenericName[sr@Latn]=Dizajner interfejsa -GenericName[sv]=Gränssnittsdesign -GenericName[tr]=Arayüz Tasarlayıcısı -GenericName[zh_CN]=界面设计师 -GenericName[zh_TW]=介面設計器 -Exec=tdevdesigner %i -caption "%c" -Icon=tdevdesigner -Type=Application -DocPath=tdevdesigner/index.html -Comment=GUI Designer for Qt/TDE -Comment[ca]=Dissenyador de IGU per Qt/TDE -Comment[da]=Grafisk brugerfladedesigner til Qt/TDE -Comment[de]=Auf Qt-Designer basierender GUI-Designer -Comment[el]=Σχεδιαστής GUI για Qt/TDE -Comment[es]=Diseñador de interfaces para Qt/TDE -Comment[et]=Qt/TDE graafilise kasutajaliidese disainer -Comment[eu]=GUI diseinatzailea Qt/TDE-rako -Comment[fa]=طراح ونک برای Qt/TDE -Comment[fr]=Concepteur d'interfaces graphiques pour Qt / TDE -Comment[ga]=Dearthóir Comhéadan Grafach le haghaidh Qt/TDE -Comment[gl]=Deseñador GUI para Qt/TDE -Comment[hu]=Qt/TDE felülettervező -Comment[it]=Designer di GUI per Qt/TDE -Comment[ja]=Qt/TDE のための GUI デザイナー -Comment[ms]=Pereka GUI untuk Qt/TDE -Comment[nds]=Böversietmaker för Qt/TDE -Comment[ne]=Qt/TDE का लागि जी यू आई डिजाइनर -Comment[nl]=GUI Designer voor Qt/TDE -Comment[pl]=Projektant graficznego interfejsu użytkownika dla Qt/TDE -Comment[pt]=Editor de Interfaces para Qt/TDE -Comment[pt_BR]=Designer de GUI para o Qt/TDE -Comment[ru]=Среда создания графических форм Qt/TDE -Comment[sk]=GUI Dizajnér pre Qt/TDE -Comment[sl]=Snovalnik grafičnega vmesnika za Qt/TDE -Comment[sr]=Дизајнер GUI-ја за Qt/TDE -Comment[sr@Latn]=Dizajner GUI-ja za Qt/TDE -Comment[sv]=Grafisk gränssnittsdesign för Qt och TDE -Comment[ta]=Qtக்கான GUI வடிவமைப்பாளர் -Comment[tg]=Муҳит барои сохтани Qt/TDE ба шакли графикӣ -Comment[tr]=Qt/TDE için Arayüz Tasarlayıcısı -Comment[zh_CN]=Qt/TDE 的 GUI 设计师 -Comment[zh_TW]=Qt/TDE 的使用者介面設計器 -Terminal=false -Categories=Qt;TDE;Development;GUIDesigner;X-TDE-TDevelopIDE; diff --git a/tdevdesigner/src/tdevdesigner.h b/tdevdesigner/src/tdevdesigner.h deleted file mode 100644 index dc5113fe..00000000 --- a/tdevdesigner/src/tdevdesigner.h +++ /dev/null @@ -1,97 +0,0 @@ -/*************************************************************************** - * Copyright (C) 2004 by Alexander Dymo * - * cloudtemple@mksat.net * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU General Public License as published by * - * the Free Software Foundation; either version 2 of the License, or * - * (at your option) any later version. * - * * - * This program 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 General Public License for more details. * - * * - * You should have received a copy of the GNU General Public License * - * along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * - ***************************************************************************/ - -#ifndef _TDEVDESIGNER_H_ -#define _TDEVDESIGNER_H_ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include - -class TDEToggleAction; - -/** - * This is the application "Shell". It has a menubar, toolbar, and - * statusbar but relies on the "Part" to do all the real work. - * - * @short Application Shell - * @author Alexander Dymo - * @version 0.1 - */ -class TDevDesigner : public KParts::MainWindow -{ - Q_OBJECT - -public: - /** - * Default Constructor - */ - TDevDesigner(); - - /** - * Default Destructor - */ - virtual ~TDevDesigner(); - - /** - * Use this method to load whatever file/URL you have - */ - void load(const KURL& url); - -protected: - /** - * This method is called when it is time for the app to save its - * properties for session management purposes. - */ - void saveProperties(TDEConfig *); - - /** - * This method is called when this app is restored. The TDEConfig - * object points to the session management config file that was saved - * with @ref saveProperties - */ - void readProperties(TDEConfig *); - -private slots: - void fileNew(); - void fileOpen(); - void optionsShowToolbar(); - void optionsShowStatusbar(); - void optionsConfigureKeys(); - void optionsConfigureToolbars(); - - void applyNewToolbarConfig(); - -private: - void setupAccel(); - void setupActions(); - -private: - KParts::ReadWritePart *m_part; - - TDEToggleAction *m_toolbarAction; - TDEToggleAction *m_statusbarAction; -}; - -#endif // _TDEVDESIGNER_H_ diff --git a/tdevdesigner/src/tdevdesigner_shell.rc b/tdevdesigner/src/tdevdesigner_shell.rc deleted file mode 100644 index a6a81fd3..00000000 --- a/tdevdesigner/src/tdevdesigner_shell.rc +++ /dev/null @@ -1,37 +0,0 @@ - - - - &File - - - - - &Edit - - - &Project - - - &Tools - - - &Layout - - - &Window - - - - &Settings - - - - - - - - - - - - diff --git a/tdevdesigner/uilib/CMakeLists.txt b/tdevdesigner/uilib/CMakeLists.txt deleted file mode 100644 index 588c2366..00000000 --- a/tdevdesigner/uilib/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -################################################# -# -# (C) 2010-2011 Serghei Amelian -# serghei (DOT) amelian (AT) gmail.com -# -# Improvements and feedback are welcome -# -# This file is released under GPL >= 2 -# -################################################# - -include_directories( - ${CMAKE_SOURCE_DIR}/tdevdesigner/shared - ${TDE_INCLUDE_DIR} - ${TQT_INCLUDE_DIRS} -) - - -##### tdevqui (static) ########################## - -set( SRCS database.cpp qwidgetfactory.cpp ) - -tde_moc( SRCS database2.h ) - -tde_add_library( tdevqui STATIC_PIC - SOURCES ${SRCS} -) diff --git a/tdevdesigner/uilib/Makefile.am b/tdevdesigner/uilib/Makefile.am deleted file mode 100644 index d58d4dcb..00000000 --- a/tdevdesigner/uilib/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -KDE_CXXFLAGS=-UQT_NO_ASCII_CAST - -INCLUDES = -I$(top_srcdir)/tdevdesigner/shared $(all_includes) -METASOURCES = AUTO - -noinst_LTLIBRARIES = libtdevqui.la -libtdevqui_la_SOURCES = database.cpp qwidgetfactory.cpp - -libtdevqui_la_LDFLAGS = $(all_libraries) diff --git a/tdevelop_kde_cpp.desktop b/tdevelop_kde_cpp.desktop new file mode 100644 index 00000000..c73f2f06 --- /dev/null +++ b/tdevelop_kde_cpp.desktop @@ -0,0 +1,48 @@ +[Desktop Entry] +Type=Application +Exec=tdevelop --profile KDECppIDE %u +MimeType=application/x-tdevelop; +Icon=tdevelop +DocPath=tdevelop/index.html +Terminal=false +Name=TDevelop: TDE/C++ +Name[br]=TDevelop : TDE/C++ +Name[fr]=TDevelop : TDE / C++ +Name[nds]=TDevelop - TDE/C++ +Name[ne]=केडीई विकास: TDE/C++ +Name[zh_CN]=TDevelop:TDE/C++ +Name[zh_TW]=TDevelop:TDE/C++ +GenericName=IDE for TDE Development +GenericName[ca]=IDE per al desenvolupament de TDE +GenericName[cs]=IDE pro vývoj TDE +GenericName[da]=Integreret udviklingsmiljø for TDE +GenericName[de]=IDE für TDE-Softwareentwicklung +GenericName[el]=IDE για προγραμματισμό TDE +GenericName[es]=IDE para desarrollo en TDE +GenericName[et]=TDE arendamise IDE +GenericName[eu]=TDE-ren garapenerako IDE-a +GenericName[fa]=IDE برای توسعۀ TDE +GenericName[fr]=EDI pour le développement pour TDE +GenericName[ga]=IDE le haghaidh fhorbairt TDE +GenericName[gl]=IDE para desenvolvemento TDE +GenericName[hu]=Fejlesztőkörnyezet a TDE-hez +GenericName[it]=IDE per lo sviluppo di TDE +GenericName[ja]=TDE のための統合開発環境 +GenericName[nds]=TDE-Programmsmeed +GenericName[ne]=केडीई विकासका लागि आईडी ई +GenericName[nl]=IDE voor TDE Development +GenericName[pl]=IDE do tworzenia programów dla TDE +GenericName[pt]=IDE para Desenvolvimento TDE +GenericName[pt_BR]=IDE para Desenvolvimento no TDE +GenericName[ru]=Среда разработки TDE-приложений +GenericName[sk]=IDE pre vývoj TDE +GenericName[sl]=IDE za razvijanje TDE +GenericName[sr]=IDE за TDE развој +GenericName[sr@Latn]=IDE za TDE razvoj +GenericName[sv]=Utvecklingsmiljö för TDE +GenericName[tr]=TDE Geliştirmek için Bütünleşik Geliştirme Ortamı +GenericName[zh_CN]=TDE 开发的 IDE +GenericName[zh_TW]=TDE 整合開發環境 +X-DCOP-ServiceType=Multi +Categories=Qt;TDE;Development;IDE;X-TDE-TDevelopIDE; + diff --git a/tdevelop_tde_cpp.desktop b/tdevelop_tde_cpp.desktop deleted file mode 100644 index 301af04f..00000000 --- a/tdevelop_tde_cpp.desktop +++ /dev/null @@ -1,48 +0,0 @@ -[Desktop Entry] -Type=Application -Exec=tdevelop --profile TDECppIDE %u -MimeType=application/x-tdevelop; -Icon=tdevelop -DocPath=tdevelop/index.html -Terminal=false -Name=TDevelop: TDE/C++ -Name[br]=TDevelop : TDE/C++ -Name[fr]=TDevelop : TDE / C++ -Name[nds]=TDevelop - TDE/C++ -Name[ne]=केडीई विकास: TDE/C++ -Name[zh_CN]=TDevelop:TDE/C++ -Name[zh_TW]=TDevelop:TDE/C++ -GenericName=IDE for TDE Development -GenericName[ca]=IDE per al desenvolupament de TDE -GenericName[cs]=IDE pro vývoj TDE -GenericName[da]=Integreret udviklingsmiljø for TDE -GenericName[de]=IDE für TDE-Softwareentwicklung -GenericName[el]=IDE για προγραμματισμό TDE -GenericName[es]=IDE para desarrollo en TDE -GenericName[et]=TDE arendamise IDE -GenericName[eu]=TDE-ren garapenerako IDE-a -GenericName[fa]=IDE برای توسعۀ TDE -GenericName[fr]=EDI pour le développement pour TDE -GenericName[ga]=IDE le haghaidh fhorbairt TDE -GenericName[gl]=IDE para desenvolvemento TDE -GenericName[hu]=Fejlesztőkörnyezet a TDE-hez -GenericName[it]=IDE per lo sviluppo di TDE -GenericName[ja]=TDE のための統合開発環境 -GenericName[nds]=TDE-Programmsmeed -GenericName[ne]=केडीई विकासका लागि आईडी ई -GenericName[nl]=IDE voor TDE Development -GenericName[pl]=IDE do tworzenia programów dla TDE -GenericName[pt]=IDE para Desenvolvimento TDE -GenericName[pt_BR]=IDE para Desenvolvimento no TDE -GenericName[ru]=Среда разработки TDE-приложений -GenericName[sk]=IDE pre vývoj TDE -GenericName[sl]=IDE za razvijanje TDE -GenericName[sr]=IDE за TDE развој -GenericName[sr@Latn]=IDE za TDE razvoj -GenericName[sv]=Utvecklingsmiljö för TDE -GenericName[tr]=TDE Geliştirmek için Bütünleşik Geliştirme Ortamı -GenericName[zh_CN]=TDE 开发的 IDE -GenericName[zh_TW]=TDE 整合開發環境 -X-DCOP-ServiceType=Multi -Categories=Qt;TDE;Development;IDE;X-TDE-TDevelopIDE; - diff --git a/tdevprj2tdevelop b/tdevprj2tdevelop deleted file mode 100644 index 79966df0..00000000 --- a/tdevprj2tdevelop +++ /dev/null @@ -1,299 +0,0 @@ -#!/usr/bin/perl - -if ($#ARGV != 0) { - die "Need one argument"; -} - -$filename = $ARGV[0]; -unless ($filename =~ /\.kdevprj/) { - die "Not a .kdevprj file"; -} - - -$ingeneral = 0; -$inlfvgroups = 0; - -open(FILE, "<$filename") || die "File not found"; -while () { - if (/\[General\]/) { - $ingeneral = 1; - $inlfvgroups = 0; - $inbin = 0; - } elsif (/\[LFV Groups\]/) { - $ingeneral = 0; - $inlfvgroups = 1; - $inbin = 0; - } elsif (/\[Config for BinMakefileAm\]/) { - $ingeneral = 0; - $inlfvgroups = 0; - $inbin = 1; - } elsif (/\[(.*)\]/) { - push(@sourcefiles, $1); - $ingeneral = 0; - $inlfvgroups = 0; - $inbin = 0; - } - - if ($ingeneral) { - if (/^author=(.*)/) { - $author = $1; - } elsif (/^configure_args=(.*)/) { - $configure_args = $1; - } elsif (/^email=(.*)/) { - $email = $1; - } elsif (/^make_options=(.*)/) { - $make_options = $1; - if ($makeoptions =~ /-n/) { - $dontact = "true"; - } - if ($makeoptions =~ /-j([0-9]+)/) { - $numberofjobs = $1; - } - if ($makeoptions =~ /-f/) { - $abortonerror = "true"; - } - } elsif (/^project_name=(.*)/) { - $project_name = $1; - } elsif (/^project_type=(.*)/) { - $project_type = $1; - } elsif (/^sub_dir=([^\/]*)/) { - $subdir = $1; - } - } - - if ($inlfvgroups) { - if (/^groups=(.*)/) { - $lfvgroups = $1; - } elsif (/(.*)=(.*)/) { - $group = $1; - $pattern = $2; - $pattern =~ s/^(.*),$/$1/; - $lfvgrouppattern{$group} = $pattern; - } - } - - if ($inbin) { - if (/^bin_program=(.*)/) { - $bin_program = $1; - } elsif (/^path_to_bin_program=(.*)/) { - $path_to_bin_program = $1; - $path_to_bin_program =~ s#^\./(.*)$#$1#; - $path_to_bin_program =~ s#^(.*)/#$1#; - $path_to_bin_program = $path_to_bin_program . "/"; - } elsif (/^cflags=(.*)/) { - $cflags = $1; - } elsif (/^cxxflags=(.*)/) { - $cxxflags = $1; - } - } - -} -close FILE; - -# Choose language support -$primarylanguage = "C++"; -if ($project_type eq "normal_c" - || $project_type eq "normal_gnome") { - $primarylanguage = "C"; -} - -# Choose project management -$projectmanagement = "TDevCustomProject"; -if ($project_type =~ /normal_kde|mini_kde|normalogl_kde|normal_kde2|mini_kde2|mdi_kde2/ - || $project_type =~ /kde2_normal|kicker_app|tdeio_slave|kc_module|kpart_plugin|ktheme/) { - $projectmanagement = "KDevTDEAutoProject"; -} -if ($project_type =~ /normal_cpp/) { - $projectmanagement = "KDevAutoProject"; -} - -# Keywords -if ($project_type =~ /normal_kde|mini_kde|normalogl_kde|normal_kde2|mini_kde2|mdi_kde2/ - || $project_type =~ /kde2_normal|kicker_app|tdeio_slave|kc_module|kpart_plugin|ktheme/) { - $keywords = $keywords . ",KDE"; -} -if ($project_type =~ /normal_kde|mini_kde|normalogl_kde|normal_kde2|mini_kde2|mdi_kde2/ - || $project_type =~ /kde2_normal|kicker_app|tdeio_slave|kc_module|kpart_plugin|ktheme/ - || $project_type =~ /normal_qt|normal_qt2|mdi_qt2|mdi_qextmdi/) { - $keywords = $keywords . ",Qt"; -} - - -## -## Let's go: write project file -## - -$projectfilename = $filename; -$projectfilename =~ s/^(.*)\.kdevprj$/$1.tdevelop/; -open(FILE, ">$projectfilename"); - -print FILE < - - - $author - $email - $projectmanagement - $primarylanguage - -EOF - -foreach $key (split(/,/, $keywords)) { - next if ($key eq ""); - print FILE <$key -EOF -} - -print FILE < - -EOF - -# auto project specific - -if ($projectmanagement eq "KDevAutoProject" || $projectmanagement eq "KDevTDEAutoProject") { - print FILE < - - $path_to_bin_program$bin_program - - - $configure_args - - - $abortonerror - $numberofjobs - $dontact - - - - $cflags - $cxxflags - - -EOF -} - -if ($project_management eq "TDevCustomProject") { - print FILE < - - $path_to_bin_program/$bin_program - - - $abortonerror - $numberofjobs - $dontact - - - -EOF -} - - -# file view -print FILE < - -EOF - -for $group (split /,/, $lfvgroups) { - next if ($group eq ""); - $pattern = $lfvgrouppattern{$group}; - $pattern =~ s/,/;/g; - print FILE < -EOF -} - -print FILE < - - - - gtk - gnustep - python - php - perl - - -EOF - -if ($projectmanagement eq "KDevAutoProject" - || $projectmanagement eq "KDevTDEAutoProject") { - print FILE < - - libtool - - -EOF -} - -print FILE < -EOF -close FILE; - - -## -## Write file list -## - -if ($projectmanagement eq "TDevCustomProject") { - $filelistfilename = $filename; - $filelistfilename =~ s/^(.*).kdevprj$/$1.filelist/; - open(FILE, ">$filelistfilename"); - for $file (@sourcefiles) { - print FILE "$file\n"; - } - close FILE; -} - - -## -## Convert templates -## - -$projectdir = ""; -if ($filename =~ m#(.*/)[^/]*#) { - $projectdir = $1; -} - -$oldtemplatedir = "${projectdir}$subdir/templates"; - -if (open(FILE, "$oldtemplatedir/cpp_template")) { - mkdir "${projectdir}templates"; - if (open(OFILE, ">${projectdir}templates/cpp")) { - while() { - s/\|EMAIL\|/\$EMAIL\$/; - s/\|AUTHOR\|/\$AUTHOR\$/; - s/\|VERSION\|/\$VERSION\$/; - s/\|DATE\|/\$DATE\$/; - s/\|YEAR\|/\$YEAR\$/; - s/\|FILENAME\|/\$FILENAME\$/; - print OFILE $_; - } - close OFILE; - } - close FILE; -} - -if (open(FILE, "$oldtemplatedir/header_template")) { - mkdir "${projectdir}templates"; - if (open(OFILE, ">${projectdir}templates/h")) { - while() { - s/\|EMAIL\|/\$EMAIL\$/; - s/\|AUTHOR\|/\$AUTHOR\$/; - s/\|VERSION\|/\$VERSION\$/; - s/\|DATE\|/\$DATE\$/; - s/\|YEAR\|/\$YEAR\$/; - s/\|FILENAME\|/\$FILENAME\$/; - print OFILE $_; - } - close OFILE; - } - close FILE; -} diff --git a/vcs/clearcase/CMakeLists.txt b/vcs/clearcase/CMakeLists.txt index 94ca0536..4dbed390 100644 --- a/vcs/clearcase/CMakeLists.txt +++ b/vcs/clearcase/CMakeLists.txt @@ -27,15 +27,15 @@ link_directories( ##### other data ################################ -install( FILES tdevclearcase.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevclearcase.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevclearcase (module) ################# +##### libkdevclearcase (module) ################# -tde_add_kpart( libtdevclearcase AUTOMOC +tde_add_kpart( libkdevclearcase AUTOMOC SOURCES clearcasepart.cpp commentdlg.cpp clearcasefileinfoprovider.cpp clearcasemanipulator.cpp - LINK tdevextensions-static tdevelop-shared + LINK kdevextensions-static tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/vcs/clearcase/Makefile.am b/vcs/clearcase/Makefile.am index 36a2e7b6..630a1346 100644 --- a/vcs/clearcase/Makefile.am +++ b/vcs/clearcase/Makefile.am @@ -3,16 +3,16 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevclearcase.la -libtdevclearcase_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevclearcase_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/interfaces/extensions/libtdevextensions.la +kde_module_LTLIBRARIES = libkdevclearcase.la +libkdevclearcase_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevclearcase_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/interfaces/extensions/libkdevextensions.la -libtdevclearcase_la_SOURCES = clearcasepart.cpp commentdlg.cpp \ +libkdevclearcase_la_SOURCES = clearcasepart.cpp commentdlg.cpp \ clearcasefileinfoprovider.cpp clearcasemanipulator.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevclearcase.desktop +service_DATA = kdevclearcase.desktop SUBDIRS = integrator diff --git a/vcs/clearcase/clearcasefileinfoprovider.cpp b/vcs/clearcase/clearcasefileinfoprovider.cpp index db7cbcc1..1e18f8e1 100644 --- a/vcs/clearcase/clearcasefileinfoprovider.cpp +++ b/vcs/clearcase/clearcasefileinfoprovider.cpp @@ -11,13 +11,13 @@ // #include "clearcasefileinfoprovider.h" #include "clearcasepart.h" -#include "tdevversioncontrol.h" +#include "kdevversioncontrol.h" #include #include ClearcaseFileinfoProvider::ClearcaseFileinfoProvider(ClearcasePart *parent) - : TDevVCSFileInfoProvider( (TDevVersionControl*) parent, "clearcasefileinfoprovider") + : KDevVCSFileInfoProvider( (KDevVersionControl*) parent, "clearcasefileinfoprovider") { vcsInfo_ = NULL; diff --git a/vcs/clearcase/clearcasefileinfoprovider.h b/vcs/clearcase/clearcasefileinfoprovider.h index 4c29da44..0f6f7d06 100644 --- a/vcs/clearcase/clearcasefileinfoprovider.h +++ b/vcs/clearcase/clearcasefileinfoprovider.h @@ -19,7 +19,7 @@ /** @author KDevelop Authors */ -class ClearcaseFileinfoProvider : public TDevVCSFileInfoProvider +class ClearcaseFileinfoProvider : public KDevVCSFileInfoProvider { Q_OBJECT diff --git a/vcs/clearcase/clearcasemanipulator.h b/vcs/clearcase/clearcasemanipulator.h index 42a5cee0..0cb795e3 100644 --- a/vcs/clearcase/clearcasemanipulator.h +++ b/vcs/clearcase/clearcasemanipulator.h @@ -12,7 +12,7 @@ #ifndef CLEARCASEMANIPULATOR_H #define CLEARCASEMANIPULATOR_H -#include "tdevversioncontrol.h" +#include "kdevversioncontrol.h" #include diff --git a/vcs/clearcase/clearcasepart.cpp b/vcs/clearcase/clearcasepart.cpp index 338675d5..aeb1eea9 100644 --- a/vcs/clearcase/clearcasepart.cpp +++ b/vcs/clearcase/clearcasepart.cpp @@ -17,33 +17,33 @@ #include #include -#include +#include #include #include #include #include -#include "tdevcore.h" -#include "tdevmakefrontend.h" -#include "tdevdifffrontend.h" -#include "tdevappfrontend.h" +#include "kdevcore.h" +#include "kdevmakefrontend.h" +#include "kdevdifffrontend.h" +#include "kdevappfrontend.h" #include "execcommand.h" #include "domutil.h" -#include "tdevmainwindow.h" -#include "tdevproject.h" -#include "tdevplugininfo.h" +#include "kdevmainwindow.h" +#include "kdevproject.h" +#include "kdevplugininfo.h" #include "clearcasefileinfoprovider.h" #include "clearcasemanipulator.h" -static const TDevPluginInfo data("tdevclearcase"); +static const KDevPluginInfo data("kdevclearcase"); -typedef TDevGenericFactory ClearcaseFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevclearcase, ClearcaseFactory( data ) ) +typedef KDevGenericFactory ClearcaseFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevclearcase, ClearcaseFactory( data ) ) ClearcasePart::ClearcasePart( TQObject *parent, const char *name, const TQStringList & ) - : TDevVersionControl( &data, parent, name ? name : "ClearcasePart" ), + : KDevVersionControl( &data, parent, name ? name : "ClearcasePart" ), default_checkin(""), default_checkout(""), default_uncheckout("-rm"), @@ -144,7 +144,7 @@ void ClearcasePart::slotCheckin() command += " "; command += KShellProcess::quote(name); - if (TDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand(dir, command); } @@ -176,7 +176,7 @@ void ClearcasePart::slotCheckout() command += " "; command += KShellProcess::quote(name); - if (TDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand(dir, command); emit finishedFetching(dir); @@ -199,7 +199,7 @@ void ClearcasePart::slotUncheckout() command += " "; command += KShellProcess::quote(name); - if (TDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand(dir, command); emit finishedFetching(dir); @@ -228,7 +228,7 @@ void ClearcasePart::slotCreate() command += " "; command += KShellProcess::quote(name); - if (TDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand(dir, command); emit finishedFetching(dir); @@ -255,7 +255,7 @@ void ClearcasePart::slotRemove() command += " "; command += KShellProcess::quote(name); - if (TDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand(dir, command); emit finishedFetching(dir); @@ -279,7 +279,7 @@ void ClearcasePart::slotListHistory() command += " "; command += KShellProcess::quote(name); - if (TDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand(dir, command); } @@ -333,7 +333,7 @@ void ClearcasePart::slotDiffFinished( const TQString& diff, const TQString& err return; } - if (TDevDiffFrontend *diffFrontend = extension("TDevelop/DiffFrontend")) + if (KDevDiffFrontend *diffFrontend = extension("TDevelop/DiffFrontend")) diffFrontend->showDiff( diff ); } @@ -354,7 +354,7 @@ void ClearcasePart::slotListCheckouts() command += " && cleartool lsco "; command += DomUtil::readEntry(dom, "/kdevclearcase/lscheckout_options", default_lscheckout); - if (TDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand(dir, command); } diff --git a/vcs/clearcase/clearcasepart.h b/vcs/clearcase/clearcasepart.h index 52129141..be63e674 100644 --- a/vcs/clearcase/clearcasepart.h +++ b/vcs/clearcase/clearcasepart.h @@ -12,12 +12,12 @@ #ifndef _CLEARCASEPART_H_ #define _CLEARCASEPART_H_ -#include +#include class Context; class TQPopupMenu; -class ClearcasePart : public TDevVersionControl { +class ClearcasePart : public KDevVersionControl { Q_OBJECT @@ -36,7 +36,7 @@ public: virtual void createNewProject(const TQString& dir) {} virtual bool fetchFromRepository() { return true; } - virtual TDevVCSFileInfoProvider *fileInfoProvider() const { return fileInfoProvider_; } + virtual KDevVCSFileInfoProvider *fileInfoProvider() const { return fileInfoProvider_; } virtual bool isValidDirectory(const TQString &dirPath) const; private slots: @@ -60,7 +60,7 @@ private: TQString popupfile_; TQString viewname; - TDevVCSFileInfoProvider *fileInfoProvider_; + KDevVCSFileInfoProvider *fileInfoProvider_; }; #endif diff --git a/vcs/clearcase/integrator/CMakeLists.txt b/vcs/clearcase/integrator/CMakeLists.txt index bd527272..ccc3348f 100644 --- a/vcs/clearcase/integrator/CMakeLists.txt +++ b/vcs/clearcase/integrator/CMakeLists.txt @@ -26,7 +26,7 @@ link_directories( ##### other data ################################ -install( FILES tdevclearcaseintegrator.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevclearcaseintegrator.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) ##### libclearcaseintegrator (module) ########### @@ -35,6 +35,6 @@ tde_add_kpart( libclearcaseintegrator AUTOMOC SOURCES clearcaseintegrator.cpp ccintegratordlgbase.ui ccintegratordlg.cpp - LINK tdevextras-shared tdevelop-shared + LINK kdevextras-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/vcs/clearcase/integrator/Makefile.am b/vcs/clearcase/integrator/Makefile.am index 98e39465..a9d50a98 100644 --- a/vcs/clearcase/integrator/Makefile.am +++ b/vcs/clearcase/integrator/Makefile.am @@ -5,9 +5,9 @@ METASOURCES = AUTO kde_module_LTLIBRARIES = libclearcaseintegrator.la libclearcaseintegrator_la_LDFLAGS = -avoid-version -no-undefined $(all_libraries) libclearcaseintegrator_la_LIBADD =\ - $(top_builddir)/lib/interfaces/extras/libtdevextras.la\ + $(top_builddir)/lib/interfaces/extras/libkdevextras.la\ $(top_builddir)/lib/libtdevelop.la -kde_services_DATA = tdevclearcaseintegrator.desktop +kde_services_DATA = kdevclearcaseintegrator.desktop noinst_HEADERS = clearcaseintegrator.h ccintegratordlg.h libclearcaseintegrator_la_SOURCES = clearcaseintegrator.cpp \ ccintegratordlgbase.ui ccintegratordlg.cpp diff --git a/vcs/clearcase/integrator/ccintegratordlg.h b/vcs/clearcase/integrator/ccintegratordlg.h index 2eb1e2e3..f427b2b3 100644 --- a/vcs/clearcase/integrator/ccintegratordlg.h +++ b/vcs/clearcase/integrator/ccintegratordlg.h @@ -21,7 +21,7 @@ #define CCINTEGRATORDLG_H #include "ccintegratordlgbase.h" -#include +#include class CCIntegratorDlg: public CCIntegratorDlgBase, public VCSDialog { Q_OBJECT diff --git a/vcs/clearcase/integrator/clearcaseintegrator.cpp b/vcs/clearcase/integrator/clearcaseintegrator.cpp index f00783b4..4e8c1a0b 100644 --- a/vcs/clearcase/integrator/clearcaseintegrator.cpp +++ b/vcs/clearcase/integrator/clearcaseintegrator.cpp @@ -19,19 +19,19 @@ ***************************************************************************/ #include "clearcaseintegrator.h" -#include -#include +#include +#include #include "ccintegratordlg.h" -static const TDevPluginInfo data("tdevclearcaseintegrator"); -typedef TDevGenericFactory ClearcaseIntegratorFactory; +static const KDevPluginInfo data("kdevclearcaseintegrator"); +typedef KDevGenericFactory ClearcaseIntegratorFactory; K_EXPORT_COMPONENT_FACTORY( libclearcaseintegrator, ClearcaseIntegratorFactory(data) ) ClearcaseIntegrator::ClearcaseIntegrator(TQObject* parent, const char* name, const TQStringList // args ) - :TDevVCSIntegrator(parent, name) + :KDevVCSIntegrator(parent, name) { } diff --git a/vcs/clearcase/integrator/clearcaseintegrator.h b/vcs/clearcase/integrator/clearcaseintegrator.h index 4e431da6..3859c1f9 100644 --- a/vcs/clearcase/integrator/clearcaseintegrator.h +++ b/vcs/clearcase/integrator/clearcaseintegrator.h @@ -20,11 +20,11 @@ #ifndef CLEARCASEINTEGRATOR_H #define CLEARCASEINTEGRATOR_H -#include +#include #include -class ClearcaseIntegrator : public TDevVCSIntegrator +class ClearcaseIntegrator : public KDevVCSIntegrator { Q_OBJECT diff --git a/vcs/clearcase/integrator/tdevclearcaseintegrator.desktop b/vcs/clearcase/integrator/kdevclearcaseintegrator.desktop similarity index 100% rename from vcs/clearcase/integrator/tdevclearcaseintegrator.desktop rename to vcs/clearcase/integrator/kdevclearcaseintegrator.desktop diff --git a/vcs/clearcase/kdevclearcase.desktop b/vcs/clearcase/kdevclearcase.desktop new file mode 100644 index 00000000..9b3df9df --- /dev/null +++ b/vcs/clearcase/kdevclearcase.desktop @@ -0,0 +1,82 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=A plugin that provides support for Rational ClearCase, a large version control and build management system. http://www.rational.com/products/clearcase/index.jsp +Comment[ca]=Un connector que proporciona suport per a ClearCase de Rational, un potent sistema de control de versions i gestió de compilacions. http://www.rational.com/products/clearcase/index.jsp +Comment[da]=Et plugin der sørger for støtte for Rational ClearCase, et stort versionskontrol og byggehåndteringssystem. http://www.rational.com/products/clearcase/index.jsp +Comment[de]=Eine Komponente, die eine Schnittstelle zu Rational ClearCase zur Verfügung stellt, einem umfangreichen Werkzeug zur Verwaltung von Versionen und Erstellungsvorgängen. http://www.rational.com/products/clearcase/index.jsp +Comment[el]=Ένα πρόσθετο που προσφέρει υποστήριξη για το Rational ClearCase, ένα μεγάλο σύστημα διαχείρισης ελέγχου εκδόσεων και κατασκευής. http://www.rational.com/products/clearcase/index.jsp +Comment[es]=Un complemento que proporciona soporte para Rational ClearCase, un potente sistema de control de versiones y administración de compilaciones (http://www.rational.com/products/clearcase/index.jsp) +Comment[et]=See plugin pakub suure versioonikontrolli ja ehitamise haldamise süsteemi Rational ClearCase toetust. http://www.rational.com/products/clearcase/index.jsp +Comment[eu]=Rational ClearCase euskarri plugin bat. ClearCase bertsio kontrol eta eraikuntza kudeaketa sistema handi bat da. http://www.rational.com/products/clearcase/index.jsp +Comment[fa]=وصله‌ای که پشتیبانی برای Rational ClearCase، یک کنترل نسخۀ بزرگ و سیستم مدیریت ساختن فراهم ‌می‌کند. http://www.rational.com/products/clearcase/index.jsp +Comment[fr]=Un module externe qui offre une prise en charge pour Rational ClearCase, un puissant système de contrôle de versions et de gestion de compilation. http://www.rational.com/products/clearcase/index.jsp +Comment[gl]=Extensión que proporciona soporte para Rational ClearCase, un gran sistema de control de versións e xestión da compilación. http://www.rational.com/products/clearcase/index.jsp +Comment[hu]=Bővítőmodul a Rational ClearCase komplex verziókövető rendszerhez. http://www.rational.com/products/clearcase/index.jsp +Comment[it]=Un plugin che offre il supporto per Rational ClearCase, un sistema molto vasto per il controllo di versione e la compilazione. http://www.rational.com/products/clearcase/index.jsp +Comment[ja]=大規模なバージョンコントロールやビルド管理システムの合理的な ClearCase の支援を提供するプラグイン。http://www.rational.com/products/clearcase/index.jsp +Comment[ms]=Plugin yang menyediakan sokongan untuk Rational ClearCase, sistem kawalan versi dan pengurus pembinaan yang besar. http://www.rational.com/products/clearcase/index.jsp +Comment[nds]=En Moduul, dat Ünnerstütten för "Rational ClearCase" praatstellt, en groot Verschoonkuntrull- un Opstellen-Pleegsysteem. http://www.rational.com/products/clearcase/index.jsp +Comment[ne]=एउटा प्लगइन जसले र्यासनल क्लेयरकेस, एउटा ठूलो संस्करण नियन्त्रण र निर्माण व्यवस्थापन प्रणालीका लागि समर्थन प्रदान गर्दछ । http://www.rational.com/products/clearcase/index.jsp +Comment[nl]=Een plugin die ondersteuning biedt voor Rational ClearCase, een omvangrijk versiebeheer en buildmanagement-systeem. Zie http://www.rational.com/products/clearcase/index.jsp +Comment[pl]=Wtyczka udostępniająca obsługę Rational ClearCase, dużego systemu kontroli wersji i zarządzania budowaniem. http://www.rational.com/products/clearcase/index.jsp +Comment[pt]=Um 'plugin' que oferece o suporte para o ClearCase da Rational, um sistema grande de controlo de versões e de gestão de compilações. http://www.rational.com/products/clearcase/index.jsp +Comment[pt_BR]=Um plug-in que fornece suporte para o Rational ClearCase, um grande sistema de controle de versão e gerenciamento de compilação. http://www.rational.com/products/clearcase/index.jsp +Comment[ru]=Модуль поддержки Rational ClearCase, мощной системы контроля версий и управления проектом. http://www.rational.com/products/clearcase/index.jsp +Comment[sk]=Modul poskytuje podporu pre Rational ClearCase, riadenie verzií a projektový manažment. +Comment[sl]=Vstavek, ki omogoča podporo za Rational ClearCase, velik sistem za upravljanje z različicami in grajenjem. http://www.rational.com/products/clearcase/index.jsp +Comment[sr]=Прикључак који обезбеђује подршку за Rational-ов ClearCase, велики систем за контролу верзија и управљање градњом. http://www.rational.com/products/clearcase/index.jsp +Comment[sr@Latn]=Priključak koji obezbeđuje podršku za Rational-ov ClearCase, veliki sistem za kontrolu verzija i upravljanje gradnjom. http://www.rational.com/products/clearcase/index.jsp +Comment[sv]=Ett insticksprogram som stöder Rational ClearCase, ett omfattande versions- och bygghanteringssystem. http://www.rational.com/products/clearcase/index.jsp +Comment[ta]=சொருகி ரெஷியனல் தெளிவான எழுத்தை ஆதரிக்கும்,கடைசி பதிப்பை இயக்க மற்றும் மேலாளர் அமைப்பை கட்ட.http://www.rational.com/products/clearcase/index.jsp +Comment[tg]=Модули тарафдори Rational ClearCase, барномаи назораткунандаи калони тафсир ва идоракунии лоиҳаҳо мебошад.http://www.rational.com/products/clearcase/index.jsp +Comment[tr]=Mantıksal ClearCase, büyük bir kontrol ve yapım yönetim sistemi, için destek sağlayan bir eklenti. http://www.rational.com/products/clearcase/index.jsp +Comment[zh_CN]=提供 Rational ClearCase 支持,一个大型的版本控制和编译管理系统。http://www.rational.com/products/clearcase/index.jsp +Comment[zh_TW]=提供支援 Rational ClearCase,大型的版本控制與建立管理系統的外掛程式。http://www.rational.com/products/clearcase/index.jsp +Name=KDevClearCase +Name[da]=TDevelop ClearCase +Name[de]=Unterstützung für ClearCase (TDevelop) +Name[hi]=के-डेव-क्लीयर-केस +Name[nds]=ClearCase-Ünnerstütten för TDevelop +Name[sk]=KDev ClearCase +Name[sv]=TDevelop ClearCase +Name[ta]=KDevதெளிவானஎழுத்து +Name[zh_TW]=TDevelop ClearCase +GenericName=ClearCase Integration +GenericName[ca]=Integració amb ClearClase +GenericName[da]=ClearCase integration +GenericName[de]=ClearCase-Integration +GenericName[el]=Ενσωμάτωση ClearCase +GenericName[es]=Integración con ClearClase +GenericName[et]=ClearCase'i integratsioon +GenericName[eu]=ClearCase integrazioa +GenericName[fa]=مجتمع‌سازی ClearCase +GenericName[fr]=Intégration de « ClearCase » +GenericName[ga]=Comhtháthú ClearCase +GenericName[gl]=Integración de ClearCase +GenericName[hi]=क्लीयर-केस इंटीग्रेशन +GenericName[hu]=ClearCase-integráció +GenericName[it]=Integrazione di ClearCase +GenericName[ja]=ClearCase 統合 +GenericName[ms]=Intergrasi ClearCase +GenericName[nds]=ClearCase-Integreren +GenericName[ne]=क्लेयरकेस एकिकरण +GenericName[nl]=ClearCase-integratie +GenericName[pl]=Integracja z ClearCase +GenericName[pt]=Integração com o ClearCase +GenericName[pt_BR]=Integração com o ClearCase +GenericName[ru]=Интеграция ClearCase +GenericName[sk]=Integrácia ClearCase +GenericName[sl]=Integracija ClearCase +GenericName[sr]=Интеграција ClearCase-а +GenericName[sr@Latn]=Integracija ClearCase-a +GenericName[sv]=Integrering av ClearCase +GenericName[ta]=தெளிவான எழுத்து ஒருங்கிணைப்பு +GenericName[tg]=Интегратсияи ClearCase +GenericName[tr]=ClearCase Bütünleştirmesi +GenericName[zh_CN]=ClearCase集成 +GenericName[zh_TW]=ClearCase 整合 +ServiceTypes=TDevelop/VersionControl +X-TDE-Library=libkdevclearcase +X-TDevelop-Version=5 +X-TDevelop-Properties=VCS,ClearcaseVCS diff --git a/vcs/clearcase/tdevclearcase.desktop b/vcs/clearcase/tdevclearcase.desktop deleted file mode 100644 index 687e5c67..00000000 --- a/vcs/clearcase/tdevclearcase.desktop +++ /dev/null @@ -1,82 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=A plugin that provides support for Rational ClearCase, a large version control and build management system. http://www.rational.com/products/clearcase/index.jsp -Comment[ca]=Un connector que proporciona suport per a ClearCase de Rational, un potent sistema de control de versions i gestió de compilacions. http://www.rational.com/products/clearcase/index.jsp -Comment[da]=Et plugin der sørger for støtte for Rational ClearCase, et stort versionskontrol og byggehåndteringssystem. http://www.rational.com/products/clearcase/index.jsp -Comment[de]=Eine Komponente, die eine Schnittstelle zu Rational ClearCase zur Verfügung stellt, einem umfangreichen Werkzeug zur Verwaltung von Versionen und Erstellungsvorgängen. http://www.rational.com/products/clearcase/index.jsp -Comment[el]=Ένα πρόσθετο που προσφέρει υποστήριξη για το Rational ClearCase, ένα μεγάλο σύστημα διαχείρισης ελέγχου εκδόσεων και κατασκευής. http://www.rational.com/products/clearcase/index.jsp -Comment[es]=Un complemento que proporciona soporte para Rational ClearCase, un potente sistema de control de versiones y administración de compilaciones (http://www.rational.com/products/clearcase/index.jsp) -Comment[et]=See plugin pakub suure versioonikontrolli ja ehitamise haldamise süsteemi Rational ClearCase toetust. http://www.rational.com/products/clearcase/index.jsp -Comment[eu]=Rational ClearCase euskarri plugin bat. ClearCase bertsio kontrol eta eraikuntza kudeaketa sistema handi bat da. http://www.rational.com/products/clearcase/index.jsp -Comment[fa]=وصله‌ای که پشتیبانی برای Rational ClearCase، یک کنترل نسخۀ بزرگ و سیستم مدیریت ساختن فراهم ‌می‌کند. http://www.rational.com/products/clearcase/index.jsp -Comment[fr]=Un module externe qui offre une prise en charge pour Rational ClearCase, un puissant système de contrôle de versions et de gestion de compilation. http://www.rational.com/products/clearcase/index.jsp -Comment[gl]=Extensión que proporciona soporte para Rational ClearCase, un gran sistema de control de versións e xestión da compilación. http://www.rational.com/products/clearcase/index.jsp -Comment[hu]=Bővítőmodul a Rational ClearCase komplex verziókövető rendszerhez. http://www.rational.com/products/clearcase/index.jsp -Comment[it]=Un plugin che offre il supporto per Rational ClearCase, un sistema molto vasto per il controllo di versione e la compilazione. http://www.rational.com/products/clearcase/index.jsp -Comment[ja]=大規模なバージョンコントロールやビルド管理システムの合理的な ClearCase の支援を提供するプラグイン。http://www.rational.com/products/clearcase/index.jsp -Comment[ms]=Plugin yang menyediakan sokongan untuk Rational ClearCase, sistem kawalan versi dan pengurus pembinaan yang besar. http://www.rational.com/products/clearcase/index.jsp -Comment[nds]=En Moduul, dat Ünnerstütten för "Rational ClearCase" praatstellt, en groot Verschoonkuntrull- un Opstellen-Pleegsysteem. http://www.rational.com/products/clearcase/index.jsp -Comment[ne]=एउटा प्लगइन जसले र्यासनल क्लेयरकेस, एउटा ठूलो संस्करण नियन्त्रण र निर्माण व्यवस्थापन प्रणालीका लागि समर्थन प्रदान गर्दछ । http://www.rational.com/products/clearcase/index.jsp -Comment[nl]=Een plugin die ondersteuning biedt voor Rational ClearCase, een omvangrijk versiebeheer en buildmanagement-systeem. Zie http://www.rational.com/products/clearcase/index.jsp -Comment[pl]=Wtyczka udostępniająca obsługę Rational ClearCase, dużego systemu kontroli wersji i zarządzania budowaniem. http://www.rational.com/products/clearcase/index.jsp -Comment[pt]=Um 'plugin' que oferece o suporte para o ClearCase da Rational, um sistema grande de controlo de versões e de gestão de compilações. http://www.rational.com/products/clearcase/index.jsp -Comment[pt_BR]=Um plug-in que fornece suporte para o Rational ClearCase, um grande sistema de controle de versão e gerenciamento de compilação. http://www.rational.com/products/clearcase/index.jsp -Comment[ru]=Модуль поддержки Rational ClearCase, мощной системы контроля версий и управления проектом. http://www.rational.com/products/clearcase/index.jsp -Comment[sk]=Modul poskytuje podporu pre Rational ClearCase, riadenie verzií a projektový manažment. -Comment[sl]=Vstavek, ki omogoča podporo za Rational ClearCase, velik sistem za upravljanje z različicami in grajenjem. http://www.rational.com/products/clearcase/index.jsp -Comment[sr]=Прикључак који обезбеђује подршку за Rational-ов ClearCase, велики систем за контролу верзија и управљање градњом. http://www.rational.com/products/clearcase/index.jsp -Comment[sr@Latn]=Priključak koji obezbeđuje podršku za Rational-ov ClearCase, veliki sistem za kontrolu verzija i upravljanje gradnjom. http://www.rational.com/products/clearcase/index.jsp -Comment[sv]=Ett insticksprogram som stöder Rational ClearCase, ett omfattande versions- och bygghanteringssystem. http://www.rational.com/products/clearcase/index.jsp -Comment[ta]=சொருகி ரெஷியனல் தெளிவான எழுத்தை ஆதரிக்கும்,கடைசி பதிப்பை இயக்க மற்றும் மேலாளர் அமைப்பை கட்ட.http://www.rational.com/products/clearcase/index.jsp -Comment[tg]=Модули тарафдори Rational ClearCase, барномаи назораткунандаи калони тафсир ва идоракунии лоиҳаҳо мебошад.http://www.rational.com/products/clearcase/index.jsp -Comment[tr]=Mantıksal ClearCase, büyük bir kontrol ve yapım yönetim sistemi, için destek sağlayan bir eklenti. http://www.rational.com/products/clearcase/index.jsp -Comment[zh_CN]=提供 Rational ClearCase 支持,一个大型的版本控制和编译管理系统。http://www.rational.com/products/clearcase/index.jsp -Comment[zh_TW]=提供支援 Rational ClearCase,大型的版本控制與建立管理系統的外掛程式。http://www.rational.com/products/clearcase/index.jsp -Name=KDevClearCase -Name[da]=TDevelop ClearCase -Name[de]=Unterstützung für ClearCase (TDevelop) -Name[hi]=के-डेव-क्लीयर-केस -Name[nds]=ClearCase-Ünnerstütten för TDevelop -Name[sk]=KDev ClearCase -Name[sv]=TDevelop ClearCase -Name[ta]=KDevதெளிவானஎழுத்து -Name[zh_TW]=TDevelop ClearCase -GenericName=ClearCase Integration -GenericName[ca]=Integració amb ClearClase -GenericName[da]=ClearCase integration -GenericName[de]=ClearCase-Integration -GenericName[el]=Ενσωμάτωση ClearCase -GenericName[es]=Integración con ClearClase -GenericName[et]=ClearCase'i integratsioon -GenericName[eu]=ClearCase integrazioa -GenericName[fa]=مجتمع‌سازی ClearCase -GenericName[fr]=Intégration de « ClearCase » -GenericName[ga]=Comhtháthú ClearCase -GenericName[gl]=Integración de ClearCase -GenericName[hi]=क्लीयर-केस इंटीग्रेशन -GenericName[hu]=ClearCase-integráció -GenericName[it]=Integrazione di ClearCase -GenericName[ja]=ClearCase 統合 -GenericName[ms]=Intergrasi ClearCase -GenericName[nds]=ClearCase-Integreren -GenericName[ne]=क्लेयरकेस एकिकरण -GenericName[nl]=ClearCase-integratie -GenericName[pl]=Integracja z ClearCase -GenericName[pt]=Integração com o ClearCase -GenericName[pt_BR]=Integração com o ClearCase -GenericName[ru]=Интеграция ClearCase -GenericName[sk]=Integrácia ClearCase -GenericName[sl]=Integracija ClearCase -GenericName[sr]=Интеграција ClearCase-а -GenericName[sr@Latn]=Integracija ClearCase-a -GenericName[sv]=Integrering av ClearCase -GenericName[ta]=தெளிவான எழுத்து ஒருங்கிணைப்பு -GenericName[tg]=Интегратсияи ClearCase -GenericName[tr]=ClearCase Bütünleştirmesi -GenericName[zh_CN]=ClearCase集成 -GenericName[zh_TW]=ClearCase 整合 -ServiceTypes=TDevelop/VersionControl -X-TDE-Library=libtdevclearcase -X-TDevelop-Version=5 -X-TDevelop-Properties=VCS,ClearcaseVCS diff --git a/vcs/cvsservice/CMakeLists.txt b/vcs/cvsservice/CMakeLists.txt index c8cd2b35..dc50d646 100644 --- a/vcs/cvsservice/CMakeLists.txt +++ b/vcs/cvsservice/CMakeLists.txt @@ -30,14 +30,14 @@ link_directories( ##### other data ################################ tde_install_icons( ) -install( FILES tdevcvsservice.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -install( FILES tdev_cvs.png DESTINATION ${DATA_INSTALL_DIR}/tdevcvsservice/pics ) -install( FILES buildcvs.sh DESTINATION ${DATA_INSTALL_DIR}/tdevcvsservice ) +install( FILES kdevcvsservice.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdev_cvs.png DESTINATION ${DATA_INSTALL_DIR}/kdevcvsservice/pics ) +install( FILES buildcvs.sh DESTINATION ${DATA_INSTALL_DIR}/kdevcvsservice ) -##### libtdevcvsservice (module) ################ +##### libkdevcvsservice (module) ################ -tde_add_kpart( libtdevcvsservice AUTOMOC +tde_add_kpart( libkdevcvsservice AUTOMOC SOURCES cvspart.cpp cvspartimpl.cpp cvsformbase.ui cvsform.cpp commitdialogbase.ui commitdlg.cpp cvsoptionswidgetbase.ui @@ -52,7 +52,7 @@ tde_add_kpart( libtdevcvsservice AUTOMOC editorsdialogbase.ui editorsdialog.cpp annotatedialog.cpp annotatepage.cpp annotateview.cpp LINK - tdevextensions-static tdevwidgets-shared tdevelop-shared + kdevextensions-static kdevwidgets-shared tdevelop-shared cvsservice tdehtml-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/vcs/cvsservice/Makefile.am b/vcs/cvsservice/Makefile.am index 3ce9dc40..63560056 100644 --- a/vcs/cvsservice/Makefile.am +++ b/vcs/cvsservice/Makefile.am @@ -3,12 +3,12 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util -I$(top_srcdir)/lib/widgets $(all_includes) -I$(kde_includes)/tde -kde_module_LTLIBRARIES = libtdevcvsservice.la -libtdevcvsservice_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevcvsservice_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ - $(top_builddir)/lib/widgets/libtdevwidgets.la $(LIB_TDEHTML) -lcvsservice $(top_builddir)/lib/interfaces/extensions/libtdevextensions.la +kde_module_LTLIBRARIES = libkdevcvsservice.la +libkdevcvsservice_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevcvsservice_la_LIBADD = $(top_builddir)/lib/libtdevelop.la \ + $(top_builddir)/lib/widgets/libkdevwidgets.la $(LIB_TDEHTML) -lcvsservice $(top_builddir)/lib/interfaces/extensions/libkdevextensions.la -libtdevcvsservice_la_SOURCES = cvspart.cpp cvspartimpl.cpp cvsformbase.ui \ +libkdevcvsservice_la_SOURCES = cvspart.cpp cvspartimpl.cpp cvsformbase.ui \ cvsform.cpp commitdialogbase.ui commitdlg.cpp cvsoptionswidgetbase.ui \ cvsoptionswidget.cpp cvsprocesswidget.cpp cvsentry.cpp cvsdir.cpp changelog.cpp \ cvsoptions.cpp checkoutdialogbase.ui checkoutdialog.cpp tagdialog.cpp tagdialogbase.ui \ @@ -29,12 +29,12 @@ METASOURCES = AUTO ICONS = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevcvsservice.desktop +service_DATA = kdevcvsservice.desktop -servicepicsdir = $(kde_datadir)/tdevcvsservice/pics -servicepics_DATA = tdev_cvs.png +servicepicsdir = $(kde_datadir)/kdevcvsservice/pics +servicepics_DATA = kdev_cvs.png -rcdir = $(kde_datadir)/tdevcvsservice +rcdir = $(kde_datadir)/kdevcvsservice rc_DATA = buildcvs.sh SUBDIRS = integrator diff --git a/vcs/cvsservice/README.dox b/vcs/cvsservice/README.dox index bb6dfd60..1ff0b528 100644 --- a/vcs/cvsservice/README.dox +++ b/vcs/cvsservice/README.dox @@ -37,7 +37,7 @@ Implementation of this component is done by: one wants to perform: exception to this are the cvslog* classes which do start cvs jobs independently archiving parallelism with the CvsProcesssWidget. - CVSDir and CVSEntry provide abstraction for accessing to local CVS information - - CVSFileInfoProvider is an implementation of TDevVCSFileInfoProvider interface + - CVSFileInfoProvider is an implementation of KDevVCSFileInfoProvider interface and collects data about files stats: for CVS, both synch (fetch data from local sandbox) and asynch (fetch from repository server) are working with some minor bugs in the parsing of 'cvs status' output for the latter. (Sync means that information are collected diff --git a/vcs/cvsservice/bufferedstringreader.h b/vcs/cvsservice/bufferedstringreader.h index 05ce6ad6..c7548b59 100644 --- a/vcs/cvsservice/bufferedstringreader.h +++ b/vcs/cvsservice/bufferedstringreader.h @@ -16,7 +16,7 @@ class CvsServicePart; class TDEConfig; -class TDevProject; +class KDevProject; /* This class helps when we have to collect a string list from a text * stream, just as many cvs commands do. The problem is that the these commands diff --git a/vcs/cvsservice/cvsentry.h b/vcs/cvsservice/cvsentry.h index d4e51de8..9a2e4d6d 100644 --- a/vcs/cvsservice/cvsentry.h +++ b/vcs/cvsservice/cvsentry.h @@ -15,7 +15,7 @@ #include #include -#include +#include class CVSDir; diff --git a/vcs/cvsservice/cvsfileinfoprovider.cpp b/vcs/cvsservice/cvsfileinfoprovider.cpp index 2e0c960a..cbfc726f 100644 --- a/vcs/cvsservice/cvsfileinfoprovider.cpp +++ b/vcs/cvsservice/cvsfileinfoprovider.cpp @@ -15,7 +15,7 @@ #include #include -#include +#include #include #include @@ -32,7 +32,7 @@ /////////////////////////////////////////////////////////////////////////////// CVSFileInfoProvider::CVSFileInfoProvider( CvsServicePart *parent, CvsService_stub *cvsService ) - : TDevVCSFileInfoProvider( parent, "cvsfileinfoprovider" ), + : KDevVCSFileInfoProvider( parent, "cvsfileinfoprovider" ), m_requestStatusJob( 0 ), m_cvsService( cvsService ), m_cachedDirEntries( 0 ) { connect( this, TQT_SIGNAL(needStatusUpdate(const CVSDir&)), this, TQT_SLOT(updateStatusFor(const CVSDir&))); diff --git a/vcs/cvsservice/cvsfileinfoprovider.h b/vcs/cvsservice/cvsfileinfoprovider.h index 09b7b9b8..8bc3a6fe 100644 --- a/vcs/cvsservice/cvsfileinfoprovider.h +++ b/vcs/cvsservice/cvsfileinfoprovider.h @@ -14,7 +14,7 @@ #include -#include +#include #include "cvsservicedcopIface.h" #include "cvsdir.h" #include "bufferedstringreader.h" @@ -28,7 +28,7 @@ Provider for CVS file information @author Mario Scalas */ -class CVSFileInfoProvider : public TDevVCSFileInfoProvider, virtual public CVSServiceDCOPIface +class CVSFileInfoProvider : public KDevVCSFileInfoProvider, virtual public CVSServiceDCOPIface { Q_OBJECT diff --git a/vcs/cvsservice/cvsoptions.cpp b/vcs/cvsservice/cvsoptions.cpp index 6511a38f..2cdf5c92 100644 --- a/vcs/cvsservice/cvsoptions.cpp +++ b/vcs/cvsservice/cvsoptions.cpp @@ -17,7 +17,7 @@ #include #include "domutil.h" -#include "tdevproject.h" +#include "kdevproject.h" #include "cvsoptions.h" /////////////////////////////////////////////////////////////////////////////// @@ -80,9 +80,9 @@ CvsOptions* CvsOptions::instance() /////////////////////////////////////////////////////////////////////////////// -void CvsOptions::save( TDevProject *project ) +void CvsOptions::save( KDevProject *project ) { - kdDebug( 9006 ) << " **** CvsOptions::save( TDevProject* ) here" << endl; + kdDebug( 9006 ) << " **** CvsOptions::save( KDevProject* ) here" << endl; Q_ASSERT( project ); TQDomDocument &dom = *project->projectDom(); @@ -105,9 +105,9 @@ void CvsOptions::save( TDevProject *project ) /////////////////////////////////////////////////////////////////////////////// -void CvsOptions::load( TDevProject *project ) +void CvsOptions::load( KDevProject *project ) { - kdDebug( 9006 ) << " **** CvsOptions::load( TDevProject* ) here" << endl; + kdDebug( 9006 ) << " **** CvsOptions::load( KDevProject* ) here" << endl; Q_ASSERT( project ); TQDomDocument &dom = *project->projectDom(); diff --git a/vcs/cvsservice/cvsoptions.h b/vcs/cvsservice/cvsoptions.h index f54e6273..c4daf301 100644 --- a/vcs/cvsservice/cvsoptions.h +++ b/vcs/cvsservice/cvsoptions.h @@ -17,7 +17,7 @@ class CvsServicePart; class TDEConfig; -class TDevProject; +class KDevProject; /* This class represents the command line options for the used cvs commands. * It uses the singleton pattern. @@ -32,9 +32,9 @@ public: virtual ~CvsOptions(); - void save( TDevProject *project ); + void save( KDevProject *project ); /// \FIXME parameter should be const!! - void load( TDevProject *project ); + void load( KDevProject *project ); void setRecursiveWhenCommitRemove( bool b ); bool recursiveWhenCommitRemove() const; diff --git a/vcs/cvsservice/cvspart.cpp b/vcs/cvsservice/cvspart.cpp index 276a4d15..2bda55f1 100644 --- a/vcs/cvsservice/cvspart.cpp +++ b/vcs/cvsservice/cvspart.cpp @@ -37,17 +37,17 @@ #include #include -#include -#include - -#include "tdevcore.h" -#include "tdevmakefrontend.h" -#include "tdevdifffrontend.h" -#include "tdevappfrontend.h" -#include "tdevplugininfo.h" +#include +#include + +#include "kdevcore.h" +#include "kdevmakefrontend.h" +#include "kdevdifffrontend.h" +#include "kdevappfrontend.h" +#include "kdevplugininfo.h" #include "domutil.h" -#include "tdevmainwindow.h" -#include "tdevproject.h" +#include "kdevmainwindow.h" +#include "kdevproject.h" #include "urlutil.h" #include "cvsform.h" @@ -72,16 +72,16 @@ bool g_projectWasJustCreated = false; // Plugin factory /////////////////////////////////////////////////////////////////////////////// -static const TDevPluginInfo data("tdevcvsservice"); -typedef TDevGenericFactory CvsFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevcvsservice, CvsFactory( data ) ) +static const KDevPluginInfo data("kdevcvsservice"); +typedef KDevGenericFactory CvsFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevcvsservice, CvsFactory( data ) ) /////////////////////////////////////////////////////////////////////////////// // class CvsServicePart /////////////////////////////////////////////////////////////////////////////// CvsServicePart::CvsServicePart( TQObject *parent, const char *name, const TQStringList & ) - : TDevVersionControl( &data, parent, + : KDevVersionControl( &data, parent, name ? name : "CvsService" ), actionCommit( 0 ), actionDiff( 0 ), actionLog( 0 ), actionAnnotate(0), actionAdd( 0 ), actionAddBinary( 0 ), actionRemove( 0 ), actionUpdate( 0 ), @@ -126,10 +126,10 @@ void CvsServicePart::init() this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *)) ); connect( core(), TQT_SIGNAL(projectConfigWidget(KDialogBase*)), this, TQT_SLOT(projectConfigWidget(KDialogBase*)) ); - connect( core(), TQT_SIGNAL(stopButtonClicked(TDevPlugin*)), - this, TQT_SLOT(slotStopButtonClicked(TDevPlugin*)) ); + connect( core(), TQT_SIGNAL(stopButtonClicked(KDevPlugin*)), + this, TQT_SLOT(slotStopButtonClicked(KDevPlugin*)) ); - m_impl->m_widget->setIcon( UserIcon( "tdev_cvs", TDEIcon::DefaultState, CvsFactory::instance()) ); + m_impl->m_widget->setIcon( UserIcon( "kdev_cvs", TDEIcon::DefaultState, CvsFactory::instance()) ); TQWhatsThis::add( m_impl->processWidget(), i18n("CVS

    Concurrent Versions System operations window. Shows output of Cervisia CVS Service.") ); m_impl->processWidget()->setCaption(i18n("CvsService Output")); mainWindow()->embedOutputView( m_impl->processWidget(), i18n("CvsService"), i18n("cvs output") ); @@ -243,7 +243,7 @@ bool CvsServicePart::fetchFromRepository() /////////////////////////////////////////////////////////////////////////////// -TDevVCSFileInfoProvider *CvsServicePart::fileInfoProvider() const +KDevVCSFileInfoProvider *CvsServicePart::fileInfoProvider() const { return m_impl->fileInfoProvider(); } @@ -704,7 +704,7 @@ void CvsServicePart::slotRemoveFromIgnoreList() /////////////////////////////////////////////////////////////////////////////// -void CvsServicePart::slotStopButtonClicked( TDevPlugin* which ) +void CvsServicePart::slotStopButtonClicked( KDevPlugin* which ) { if ( which != 0 && which != this ) return; diff --git a/vcs/cvsservice/cvspart.h b/vcs/cvsservice/cvspart.h index 61015fda..e2df8ce0 100644 --- a/vcs/cvsservice/cvspart.h +++ b/vcs/cvsservice/cvspart.h @@ -17,7 +17,7 @@ #include #include #include -#include "tdevversioncontrol.h" +#include "kdevversioncontrol.h" class Context; class TQPopupMenu; @@ -34,7 +34,7 @@ class CvsService_stub; class Repository_stub; class CvsServicePartImpl; -class CvsServicePart : public TDevVersionControl +class CvsServicePart : public KDevVersionControl { Q_OBJECT @@ -63,7 +63,7 @@ public: /** * @return the info provider for VCS sandboxes */ - virtual TDevVCSFileInfoProvider *fileInfoProvider() const; + virtual KDevVCSFileInfoProvider *fileInfoProvider() const; /** * @param dirPath absolute path of the directory * @return true if the the directory is a valid CVS sandbox @@ -129,7 +129,7 @@ private slots: void projectConfigWidget( KDialogBase *dlg ); //! Called when the user wishes to stop an operation. - void slotStopButtonClicked( TDevPlugin* ); + void slotStopButtonClicked( KDevPlugin* ); private slots: void init(); diff --git a/vcs/cvsservice/cvspartimpl.cpp b/vcs/cvsservice/cvspartimpl.cpp index 112ea997..01c85df3 100644 --- a/vcs/cvsservice/cvspartimpl.cpp +++ b/vcs/cvsservice/cvspartimpl.cpp @@ -29,12 +29,12 @@ #include // KDevelop SDK stuff #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include // Part's widgets #include "cvsprocesswidget.h" #include "checkoutdialog.h" @@ -309,7 +309,7 @@ CvsProcessWidget *CvsServicePartImpl::processWidget() const /////////////////////////////////////////////////////////////////////////////// -TDevMainWindow *CvsServicePartImpl::mainWindow() const +KDevMainWindow *CvsServicePartImpl::mainWindow() const { return m_part->mainWindow(); } @@ -323,16 +323,16 @@ TQString CvsServicePartImpl::projectDirectory() const /////////////////////////////////////////////////////////////////////////////// -TDevCore *CvsServicePartImpl::core() const +KDevCore *CvsServicePartImpl::core() const { return m_part->core(); } /////////////////////////////////////////////////////////////////////////////// -TDevDiffFrontend *CvsServicePartImpl::diffFrontend() const +KDevDiffFrontend *CvsServicePartImpl::diffFrontend() const { - return m_part->extension("TDevelop/DiffFrontend"); + return m_part->extension("TDevelop/DiffFrontend"); } /////////////////////////////////////////////////////////////////////////////// @@ -774,7 +774,7 @@ void CvsServicePartImpl::createNewProject( const TQString &dirName, kdDebug( 9006 ) << " ** Will run the following command: " << endl << cmdLine << endl; kdDebug( 9006 ) << " ** on directory: " << dirName << endl; - if (TDevMakeFrontend *makeFrontend = m_part->extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = m_part->extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand( dirName, cmdLine ); } @@ -902,7 +902,7 @@ void CvsServicePartImpl::emitFileStateModified( const KURL::List &/*urls*/, VCSF /////////////////////////////////////////////////////////////////////////////// -TDevVCSFileInfoProvider *CvsServicePartImpl::fileInfoProvider() const +KDevVCSFileInfoProvider *CvsServicePartImpl::fileInfoProvider() const { return m_fileInfoProvider; } diff --git a/vcs/cvsservice/cvspartimpl.h b/vcs/cvsservice/cvspartimpl.h index 32ee04f5..ade7ffe4 100644 --- a/vcs/cvsservice/cvspartimpl.h +++ b/vcs/cvsservice/cvspartimpl.h @@ -17,18 +17,18 @@ #include #include -#include +#include class CvsServicePart; class KDialogBase; class KURL; class CvsProcessWidget; -class TDevMainWindow; -class TDevCore; -class TDevDiffFrontend; +class KDevMainWindow; +class KDevCore; +class KDevDiffFrontend; class TQDir; class JobScheduler; -class TDevVCSFileInfoProvider; +class KDevVCSFileInfoProvider; class CVSFileInfoProvider; /** @@ -183,7 +183,7 @@ public: /** * @return a reference to the custom FileInforProvider object (FORWARDER) */ - TDevVCSFileInfoProvider *fileInfoProvider() const; + KDevVCSFileInfoProvider *fileInfoProvider() const; // Helpers @@ -309,10 +309,10 @@ private: static const TQString changeLogPrependString; // Internal short-cuts - TDevMainWindow *mainWindow() const; - TDevCore *core() const; + KDevMainWindow *mainWindow() const; + KDevCore *core() const; TQString projectDirectory() const; - TDevDiffFrontend *diffFrontend() const; + KDevDiffFrontend *diffFrontend() const; /** Locate and setup DCOP CvsService */ bool requestCvsService(); diff --git a/vcs/cvsservice/cvsprocesswidget.cpp b/vcs/cvsservice/cvsprocesswidget.cpp index e218e00e..bb8fb459 100644 --- a/vcs/cvsservice/cvsprocesswidget.cpp +++ b/vcs/cvsservice/cvsprocesswidget.cpp @@ -18,9 +18,9 @@ #include #include -#include "tdevpartcontroller.h" -#include "tdevmainwindow.h" -#include "tdevcore.h" +#include "kdevpartcontroller.h" +#include "kdevmainwindow.h" +#include "kdevcore.h" #include "cvspart.h" #include "cvsprocesswidget.h" diff --git a/vcs/cvsservice/integrator/CMakeLists.txt b/vcs/cvsservice/integrator/CMakeLists.txt index e615784e..a17393d8 100644 --- a/vcs/cvsservice/integrator/CMakeLists.txt +++ b/vcs/cvsservice/integrator/CMakeLists.txt @@ -25,7 +25,7 @@ link_directories( ##### other data ################################ -install( FILES tdevcvsserviceintegrator.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevcvsserviceintegrator.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) ##### libcvsserviceintegrator (module) ########## @@ -35,6 +35,6 @@ tde_add_kpart( libcvsserviceintegrator AUTOMOC cvsserviceintegrator.cpp integratordlgbase.ui fetcherdlgbase.ui integratordlg.cpp initdlg.ui LINK - tdevextras-shared tdevelop-shared cvsservice + kdevextras-shared tdevelop-shared cvsservice DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/vcs/cvsservice/integrator/Makefile.am b/vcs/cvsservice/integrator/Makefile.am index 36f5dcee..f3eb47fe 100644 --- a/vcs/cvsservice/integrator/Makefile.am +++ b/vcs/cvsservice/integrator/Makefile.am @@ -5,8 +5,8 @@ METASOURCES = AUTO kde_module_LTLIBRARIES = libcvsserviceintegrator.la libcvsserviceintegrator_la_LDFLAGS = -avoid-version -no-undefined $(all_libraries) libcvsserviceintegrator_la_LIBADD = \ - $(top_builddir)/lib/interfaces/extras/libtdevextras.la $(top_builddir)/lib/libtdevelop.la -lcvsservice + $(top_builddir)/lib/interfaces/extras/libkdevextras.la $(top_builddir)/lib/libtdevelop.la -lcvsservice noinst_HEADERS = cvsserviceintegrator.h integratordlg.h libcvsserviceintegrator_la_SOURCES = cvsserviceintegrator.cpp \ integratordlgbase.ui fetcherdlgbase.ui integratordlg.cpp initdlg.ui -kde_services_DATA = tdevcvsserviceintegrator.desktop +kde_services_DATA = kdevcvsserviceintegrator.desktop diff --git a/vcs/cvsservice/integrator/cvsserviceintegrator.cpp b/vcs/cvsservice/integrator/cvsserviceintegrator.cpp index 7f2fbbeb..1bbc3b11 100644 --- a/vcs/cvsservice/integrator/cvsserviceintegrator.cpp +++ b/vcs/cvsservice/integrator/cvsserviceintegrator.cpp @@ -19,18 +19,18 @@ ***************************************************************************/ #include "cvsserviceintegrator.h" -#include -#include +#include +#include #include "integratordlg.h" -static const TDevPluginInfo data("tdevcvsserviceintegrator"); -typedef TDevGenericFactory CVSIntegratorFactory; +static const KDevPluginInfo data("kdevcvsserviceintegrator"); +typedef KDevGenericFactory CVSIntegratorFactory; K_EXPORT_COMPONENT_FACTORY( libcvsserviceintegrator, CVSIntegratorFactory(data) ) CVSServiceIntegrator::CVSServiceIntegrator(TQObject* parent, const char* name, const TQStringList args) - :TDevVCSIntegrator(parent, name) + :KDevVCSIntegrator(parent, name) { } diff --git a/vcs/cvsservice/integrator/cvsserviceintegrator.h b/vcs/cvsservice/integrator/cvsserviceintegrator.h index b3a8af9a..ebf4224e 100644 --- a/vcs/cvsservice/integrator/cvsserviceintegrator.h +++ b/vcs/cvsservice/integrator/cvsserviceintegrator.h @@ -20,11 +20,11 @@ #ifndef CVSSERVICEINTEGRATOR_H #define CVSSERVICEINTEGRATOR_H -#include +#include #include -class CVSServiceIntegrator: public TDevVCSIntegrator { +class CVSServiceIntegrator: public KDevVCSIntegrator { Q_OBJECT public: diff --git a/vcs/cvsservice/integrator/tdevcvsserviceintegrator.desktop b/vcs/cvsservice/integrator/kdevcvsserviceintegrator.desktop similarity index 100% rename from vcs/cvsservice/integrator/tdevcvsserviceintegrator.desktop rename to vcs/cvsservice/integrator/kdevcvsserviceintegrator.desktop diff --git a/vcs/cvsservice/tdev_cvs.png b/vcs/cvsservice/kdev_cvs.png similarity index 100% rename from vcs/cvsservice/tdev_cvs.png rename to vcs/cvsservice/kdev_cvs.png diff --git a/vcs/cvsservice/tdev_cvs.xcf b/vcs/cvsservice/kdev_cvs.xcf similarity index 100% rename from vcs/cvsservice/tdev_cvs.xcf rename to vcs/cvsservice/kdev_cvs.xcf diff --git a/vcs/cvsservice/kdevcvsservice.desktop b/vcs/cvsservice/kdevcvsservice.desktop new file mode 100644 index 00000000..921e91d1 --- /dev/null +++ b/vcs/cvsservice/kdevcvsservice.desktop @@ -0,0 +1,77 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=CVS Integration using Cervisia's cvsservice. http://www.kde.org/apps/cervisia/ +Comment[ca]=Integració amb el CVS emprant el cvsservice de Cervisia. http://www.kde.org/apps/cervisia/ +Comment[da]=CVS Integration ved brug af Cervisias cvsservice. http://www.kde.org/apps/cervisia/ +Comment[de]=CVS-Integration mit Hilfe von Cervisias cvsservice. http://www.kde.org/apps/cervisia/ +Comment[el]=Ενσωμάτωση CVS χρησιμοποιώντας τη cvsservice του Cervisia. http://www.kde.org/apps/cervisia/ +Comment[es]=Integración con CVS utilizando el cvsservice. http://www.kde.org/apps/cervisia/ +Comment[et]=CVS põimimine Cervisia cvsservice'i abil. http://www.kde.org/apps/cervisia/ +Comment[eu]=CVS integrazioa Cervisia-ren cvsservice erabiliz. http://www.kde.org/apps/cervisia/ +Comment[fa]=مجتمع‌سازی CVS، با استفاده از خدمت cvs متعلق به Cervisia. http://www.kde.org/apps/cervisia/ +Comment[fr]=Intégration de CVS à l'aide du processus « cvsservice » de Cervisia. http://www.kde.org/apps/cervisia/ +Comment[ga]=Comhtháthú CVS le cvsservice Cervisia. http://www.kde.org/apps/cervisia/ +Comment[gl]=Integración CVS usando o servizo cvsservice de Cervisia. http://www.kde.org/apps/cervisia/ +Comment[hu]=CVS-integráció a Cervisia cvsservice segítségével. http://www.kde.org/apps/cervisia/ +Comment[it]=Integrazione del CVS utilizzando il cvsservice di Cervisia. http://www.kde.org/apps/cervisia/ +Comment[ja]=CVS 統合は、Cervisia の CVS サービスを利用します。http://www.kde.org/apps/cervisia/ +Comment[ms]=Integrasi CVS menggunakan cvsservice Cervisia. http://www.kde.org/apps/cervisia/ +Comment[nds]=CVS-Integreren över den CVS-Service vun Cervisia. http://www.kde.org/apps/cervisia/ +Comment[ne]= Cervisia's cvsservice प्रयोग गरेर CVS एकिकरण । http://www.kde.org/apps/cervisia/ +Comment[nl]=CVS-integratie via Cervisia's cvsservice. Zie http://www.kde.org/apps/cervisia/ +Comment[pl]=Integracja z CVS-em za pomocą usługi CVS Cervisii http://www.kde.org/apps/cervisia/ +Comment[pt]=Integração do CVS usando o cvsservice do Cervisia. http://www.kde.org/apps/cervisia/ +Comment[pt_BR]=Integração com o CVS usando o cvsservice do Cervisia. http://www.kde.org/apps/cervisia/ +Comment[ru]=Интеграция CVS с использованием Cervisia cvsservice. http://www.kde.org/apps/cervisia/ +Comment[sk]=Integrácia CVS pomocou Cervisia Cvs služby. http://www.kde.org/apps/cervisia/ +Comment[sl]=Integracija CVS z uporabo Cervisijeve cvsservice. http://www.kde.org/apps/cervisia/ +Comment[sr]=Интеграција CVS-а помоћу Cervisia-jиног cvsservice. http://www.kde.org/apps/cervisia/ +Comment[sr@Latn]=Integracija CVS-a pomoću Cervisia-jinog cvsservice. http://www.kde.org/apps/cervisia/ +Comment[sv]=Integrering av CVS med användning av Cervisias CVS-tjänst. http://www.kde.org/apps/cervisia/ +Comment[tr]=Cervisia'nın cvsservice'i kullanılarak CVS bütünleştirilmesi http://www.kde.org/apps/cervisia/ +Comment[zh_CN]=使用 Cervisia 的 cvsservice 的 CVS 集成。http://www.kde.org/apps/cervisia/ +Comment[zh_TW]=使用 Cervisia 服務做 CVS 整合。http://www.kde.org/apps/cervisia/ +Name=KDevCvsService +Name[da]=TDevelop CVS-service +Name[nds]=TDevelop-CVS-Deenst +Name[sk]=KDev Cvs služba +Name[sv]=TDevelop CVS-tjänst +Name[zh_TW]=TDevelop CVS 服務 +GenericName=CVS Integration (Cervisia) +GenericName[ca]=Integració amb CVS (Cervisia) +GenericName[de]=Unterstützung für CVS (Cervisia) +GenericName[el]=Ενσωμάτωση CVS (Cervisia) +GenericName[es]=Integración con CVS (Cervisia) +GenericName[et]=CVS põimimine (Cervisia) +GenericName[eu]=CVS integrazioa (Cervisia) +GenericName[fa]=مجتمع‌سازی CVS (Cervisia) +GenericName[fr]=Intégration de CVS (Cervisia) +GenericName[ga]=Comhtháthú CVS (Cervisia) +GenericName[gl]=Integración CVS (Cervisia) +GenericName[hu]=CVS-integráció (Cervisia) +GenericName[it]=Integrazione CVS (Cervisia) +GenericName[ja]=CVS 統合 (Cervisia) +GenericName[ms]=Integrasi CVS (Cervisia) +GenericName[nds]=Ünnerstütten för CVS (Cervisia) +GenericName[ne]=CVS एकिकरण (Cervisia) +GenericName[nl]=CVS-integratie (Cervisia) +GenericName[pl]=Integracja z CVS-em (Cervisia) +GenericName[pt]=Integração com CVS (Cervisia) +GenericName[pt_BR]=Integração com o CVS (Cervisia) +GenericName[ru]=Интеграция CVS (Cervisia) +GenericName[sk]=CVS integrácia (Cervisia) +GenericName[sl]=Integracija CVS (Cervisia) +GenericName[sr]=Интеграција CVS-а (Cervisia) +GenericName[sr@Latn]=Integracija CVS-a (Cervisia) +GenericName[sv]=Integrering av CVS (Cervisia) +GenericName[ta]=CVS ஒருங்கிணை (செர்விசியா) +GenericName[tg]=Интегратсияи CVS (Cervisia) +GenericName[tr]=CVS Bütünleştirmesi (Cervisia) +GenericName[zh_CN]=CVS 集成(Cervisia) +GenericName[zh_TW]=CVS 整合(Cervisia) +Icon=cervisia +ServiceTypes=TDevelop/VersionControl +X-TDE-Library=libkdevcvsservice +X-TDevelop-Version=5 +X-TDevelop-Properties=VCS,CVSService diff --git a/vcs/cvsservice/tdevcvsservicepart.rc b/vcs/cvsservice/kdevcvsservicepart.rc similarity index 100% rename from vcs/cvsservice/tdevcvsservicepart.rc rename to vcs/cvsservice/kdevcvsservicepart.rc diff --git a/vcs/cvsservice/tdevcvsservice.desktop b/vcs/cvsservice/tdevcvsservice.desktop deleted file mode 100644 index 5b8bb530..00000000 --- a/vcs/cvsservice/tdevcvsservice.desktop +++ /dev/null @@ -1,77 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=CVS Integration using Cervisia's cvsservice. http://www.kde.org/apps/cervisia/ -Comment[ca]=Integració amb el CVS emprant el cvsservice de Cervisia. http://www.kde.org/apps/cervisia/ -Comment[da]=CVS Integration ved brug af Cervisias cvsservice. http://www.kde.org/apps/cervisia/ -Comment[de]=CVS-Integration mit Hilfe von Cervisias cvsservice. http://www.kde.org/apps/cervisia/ -Comment[el]=Ενσωμάτωση CVS χρησιμοποιώντας τη cvsservice του Cervisia. http://www.kde.org/apps/cervisia/ -Comment[es]=Integración con CVS utilizando el cvsservice. http://www.kde.org/apps/cervisia/ -Comment[et]=CVS põimimine Cervisia cvsservice'i abil. http://www.kde.org/apps/cervisia/ -Comment[eu]=CVS integrazioa Cervisia-ren cvsservice erabiliz. http://www.kde.org/apps/cervisia/ -Comment[fa]=مجتمع‌سازی CVS، با استفاده از خدمت cvs متعلق به Cervisia. http://www.kde.org/apps/cervisia/ -Comment[fr]=Intégration de CVS à l'aide du processus « cvsservice » de Cervisia. http://www.kde.org/apps/cervisia/ -Comment[ga]=Comhtháthú CVS le cvsservice Cervisia. http://www.kde.org/apps/cervisia/ -Comment[gl]=Integración CVS usando o servizo cvsservice de Cervisia. http://www.kde.org/apps/cervisia/ -Comment[hu]=CVS-integráció a Cervisia cvsservice segítségével. http://www.kde.org/apps/cervisia/ -Comment[it]=Integrazione del CVS utilizzando il cvsservice di Cervisia. http://www.kde.org/apps/cervisia/ -Comment[ja]=CVS 統合は、Cervisia の CVS サービスを利用します。http://www.kde.org/apps/cervisia/ -Comment[ms]=Integrasi CVS menggunakan cvsservice Cervisia. http://www.kde.org/apps/cervisia/ -Comment[nds]=CVS-Integreren över den CVS-Service vun Cervisia. http://www.kde.org/apps/cervisia/ -Comment[ne]= Cervisia's cvsservice प्रयोग गरेर CVS एकिकरण । http://www.kde.org/apps/cervisia/ -Comment[nl]=CVS-integratie via Cervisia's cvsservice. Zie http://www.kde.org/apps/cervisia/ -Comment[pl]=Integracja z CVS-em za pomocą usługi CVS Cervisii http://www.kde.org/apps/cervisia/ -Comment[pt]=Integração do CVS usando o cvsservice do Cervisia. http://www.kde.org/apps/cervisia/ -Comment[pt_BR]=Integração com o CVS usando o cvsservice do Cervisia. http://www.kde.org/apps/cervisia/ -Comment[ru]=Интеграция CVS с использованием Cervisia cvsservice. http://www.kde.org/apps/cervisia/ -Comment[sk]=Integrácia CVS pomocou Cervisia Cvs služby. http://www.kde.org/apps/cervisia/ -Comment[sl]=Integracija CVS z uporabo Cervisijeve cvsservice. http://www.kde.org/apps/cervisia/ -Comment[sr]=Интеграција CVS-а помоћу Cervisia-jиног cvsservice. http://www.kde.org/apps/cervisia/ -Comment[sr@Latn]=Integracija CVS-a pomoću Cervisia-jinog cvsservice. http://www.kde.org/apps/cervisia/ -Comment[sv]=Integrering av CVS med användning av Cervisias CVS-tjänst. http://www.kde.org/apps/cervisia/ -Comment[tr]=Cervisia'nın cvsservice'i kullanılarak CVS bütünleştirilmesi http://www.kde.org/apps/cervisia/ -Comment[zh_CN]=使用 Cervisia 的 cvsservice 的 CVS 集成。http://www.kde.org/apps/cervisia/ -Comment[zh_TW]=使用 Cervisia 服務做 CVS 整合。http://www.kde.org/apps/cervisia/ -Name=KDevCvsService -Name[da]=TDevelop CVS-service -Name[nds]=TDevelop-CVS-Deenst -Name[sk]=KDev Cvs služba -Name[sv]=TDevelop CVS-tjänst -Name[zh_TW]=TDevelop CVS 服務 -GenericName=CVS Integration (Cervisia) -GenericName[ca]=Integració amb CVS (Cervisia) -GenericName[de]=Unterstützung für CVS (Cervisia) -GenericName[el]=Ενσωμάτωση CVS (Cervisia) -GenericName[es]=Integración con CVS (Cervisia) -GenericName[et]=CVS põimimine (Cervisia) -GenericName[eu]=CVS integrazioa (Cervisia) -GenericName[fa]=مجتمع‌سازی CVS (Cervisia) -GenericName[fr]=Intégration de CVS (Cervisia) -GenericName[ga]=Comhtháthú CVS (Cervisia) -GenericName[gl]=Integración CVS (Cervisia) -GenericName[hu]=CVS-integráció (Cervisia) -GenericName[it]=Integrazione CVS (Cervisia) -GenericName[ja]=CVS 統合 (Cervisia) -GenericName[ms]=Integrasi CVS (Cervisia) -GenericName[nds]=Ünnerstütten för CVS (Cervisia) -GenericName[ne]=CVS एकिकरण (Cervisia) -GenericName[nl]=CVS-integratie (Cervisia) -GenericName[pl]=Integracja z CVS-em (Cervisia) -GenericName[pt]=Integração com CVS (Cervisia) -GenericName[pt_BR]=Integração com o CVS (Cervisia) -GenericName[ru]=Интеграция CVS (Cervisia) -GenericName[sk]=CVS integrácia (Cervisia) -GenericName[sl]=Integracija CVS (Cervisia) -GenericName[sr]=Интеграција CVS-а (Cervisia) -GenericName[sr@Latn]=Integracija CVS-a (Cervisia) -GenericName[sv]=Integrering av CVS (Cervisia) -GenericName[ta]=CVS ஒருங்கிணை (செர்விசியா) -GenericName[tg]=Интегратсияи CVS (Cervisia) -GenericName[tr]=CVS Bütünleştirmesi (Cervisia) -GenericName[zh_CN]=CVS 集成(Cervisia) -GenericName[zh_TW]=CVS 整合(Cervisia) -Icon=cervisia -ServiceTypes=TDevelop/VersionControl -X-TDE-Library=libtdevcvsservice -X-TDevelop-Version=5 -X-TDevelop-Properties=VCS,CVSService diff --git a/vcs/perforce/CMakeLists.txt b/vcs/perforce/CMakeLists.txt index f0964379..549eadb8 100644 --- a/vcs/perforce/CMakeLists.txt +++ b/vcs/perforce/CMakeLists.txt @@ -27,13 +27,13 @@ link_directories( ##### other data ################################ -install( FILES tdevperforce.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevperforce.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) -##### libtdevperforce (module) ################## +##### libkdevperforce (module) ################## -tde_add_kpart( libtdevperforce AUTOMOC +tde_add_kpart( libkdevperforce AUTOMOC SOURCES perforcepart.cpp commitdlg.cpp - LINK tdevextensions-static tdevelop-shared + LINK kdevextensions-static tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/vcs/perforce/Makefile.am b/vcs/perforce/Makefile.am index 09fb0e9e..36e19325 100644 --- a/vcs/perforce/Makefile.am +++ b/vcs/perforce/Makefile.am @@ -3,17 +3,17 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces \ -I$(top_srcdir)/lib/interfaces/extensions -I$(top_srcdir)/lib/util $(all_includes) -kde_module_LTLIBRARIES = libtdevperforce.la -libtdevperforce_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -libtdevperforce_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/interfaces/extensions/libtdevextensions.la +kde_module_LTLIBRARIES = libkdevperforce.la +libkdevperforce_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevperforce_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/interfaces/extensions/libkdevextensions.la -libtdevperforce_la_SOURCES = perforcepart.cpp commitdlg.cpp +libkdevperforce_la_SOURCES = perforcepart.cpp commitdlg.cpp METASOURCES = AUTO servicedir = $(kde_servicesdir) -service_DATA = tdevperforce.desktop +service_DATA = kdevperforce.desktop -rcdir = $(kde_datadir)/tdevperforce +rcdir = $(kde_datadir)/kdevperforce SUBDIRS = integrator diff --git a/vcs/perforce/integrator/CMakeLists.txt b/vcs/perforce/integrator/CMakeLists.txt index 95985418..e939e3ba 100644 --- a/vcs/perforce/integrator/CMakeLists.txt +++ b/vcs/perforce/integrator/CMakeLists.txt @@ -26,7 +26,7 @@ link_directories( ##### other data ################################ -install( FILES tdevperforceintegrator.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevperforceintegrator.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) ##### libperforceintegrator (module) ############ @@ -35,6 +35,6 @@ tde_add_kpart( libperforceintegrator AUTOMOC SOURCES perforceintegrator.cpp pfintegratordlgbase.ui pfintegratordlg.cpp - LINK tdevextras-shared tdevelop-shared + LINK kdevextras-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/vcs/perforce/integrator/Makefile.am b/vcs/perforce/integrator/Makefile.am index e400e241..38e80bcd 100644 --- a/vcs/perforce/integrator/Makefile.am +++ b/vcs/perforce/integrator/Makefile.am @@ -5,9 +5,9 @@ METASOURCES = AUTO kde_module_LTLIBRARIES = libperforceintegrator.la libperforceintegrator_la_LDFLAGS = -avoid-version -no-undefined $(all_libraries) libperforceintegrator_la_LIBADD =\ - $(top_builddir)/lib/interfaces/extras/libtdevextras.la\ + $(top_builddir)/lib/interfaces/extras/libkdevextras.la\ $(top_builddir)/lib/libtdevelop.la -kde_services_DATA = tdevperforceintegrator.desktop +kde_services_DATA = kdevperforceintegrator.desktop noinst_HEADERS = perforceintegrator.h pfintegratordlg.h libperforceintegrator_la_SOURCES = perforceintegrator.cpp \ pfintegratordlgbase.ui pfintegratordlg.cpp diff --git a/vcs/perforce/integrator/tdevperforceintegrator.desktop b/vcs/perforce/integrator/kdevperforceintegrator.desktop similarity index 100% rename from vcs/perforce/integrator/tdevperforceintegrator.desktop rename to vcs/perforce/integrator/kdevperforceintegrator.desktop diff --git a/vcs/perforce/integrator/perforceintegrator.cpp b/vcs/perforce/integrator/perforceintegrator.cpp index 74fdf54f..bc7c0988 100644 --- a/vcs/perforce/integrator/perforceintegrator.cpp +++ b/vcs/perforce/integrator/perforceintegrator.cpp @@ -19,19 +19,19 @@ ***************************************************************************/ #include "perforceintegrator.h" -#include -#include +#include +#include #include "pfintegratordlg.h" -static const TDevPluginInfo data("tdevperforceintegrator"); -typedef TDevGenericFactory PerforceIntegratorFactory; +static const KDevPluginInfo data("kdevperforceintegrator"); +typedef KDevGenericFactory PerforceIntegratorFactory; K_EXPORT_COMPONENT_FACTORY( libperforceintegrator, PerforceIntegratorFactory(data) ) PerforceIntegrator::PerforceIntegrator(TQObject* parent, const char* name, const TQStringList // args ) - :TDevVCSIntegrator(parent, name) + :KDevVCSIntegrator(parent, name) { } diff --git a/vcs/perforce/integrator/perforceintegrator.h b/vcs/perforce/integrator/perforceintegrator.h index c97ff82f..2b82046f 100644 --- a/vcs/perforce/integrator/perforceintegrator.h +++ b/vcs/perforce/integrator/perforceintegrator.h @@ -20,11 +20,11 @@ #ifndef PERFORCEINTEGRATOR_H #define PERFORCEINTEGRATOR_H -#include +#include #include -class PerforceIntegrator : public TDevVCSIntegrator +class PerforceIntegrator : public KDevVCSIntegrator { Q_OBJECT diff --git a/vcs/perforce/integrator/pfintegratordlg.h b/vcs/perforce/integrator/pfintegratordlg.h index 5398475b..3e7bf4de 100644 --- a/vcs/perforce/integrator/pfintegratordlg.h +++ b/vcs/perforce/integrator/pfintegratordlg.h @@ -21,7 +21,7 @@ #define PFINTEGRATORDLG_H #include "pfintegratordlgbase.h" -#include +#include class PFIntegratorDlg: public PFIntegratorDlgBase, public VCSDialog { Q_OBJECT diff --git a/vcs/perforce/kdevperforce.desktop b/vcs/perforce/kdevperforce.desktop new file mode 100644 index 00000000..d837faeb --- /dev/null +++ b/vcs/perforce/kdevperforce.desktop @@ -0,0 +1,82 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Integrates Perforce, a software configuration management system. http://www.perforce.com/ +Comment[ca]=Integra Perforce, un sistema de gestió de la configuració del programari. http://www.perforce.com/ +Comment[da]=Integrerer Perforce, et software-indstilling håndteringssystem. http://www.perforce.com/ +Comment[de]=Integration von Perforce, einem System zur Verwaltung von Software-Konfigurationen. http://www.perforce.com/ +Comment[el]=Ενσωματώνει το Perforce, ένα σύστημα διαχείρισης και ρύθμισης λογισμικού.http://www.perforce.com/ +Comment[es]=Integra Perforce, un sistema de adminsitración de la configuración del software. http://www.perforce.com/ +Comment[et]=Integreerib tarkvaraseadistuste haldamise süsteemi Perforce. http://www.perforce.com/ +Comment[eu]=Perforce integratzen du, software konfiguazio kudeaketa sistema bat. http://www.perforce.com/ +Comment[fa]=Perforce را مجتمع‌سازی می‌کند. یک سیستم مدیریت پیکربندی نرم‌افزار. http://www.perforce.com/ +Comment[fr]=Intègre « PerForce », un système de gestion de configuration de logiciels. http:/www.perforce.com/ +Comment[gl]=Integra Perforce, un sistema de xestións de configuracións. http://www.perforce.com/ +Comment[hi]=परफ़ोर्स को इंटीग्रेट करता है, जो कि सॉफ्टवेयर कॉन्फ़िगरेशन प्रबंधन तंत्र है. http://www.perforce.com/ +Comment[hu]=Integrációt biztosít a Perforce szoftverkonfigurációs rendszerrel - http://www.perforce.com/ +Comment[it]=Integra Perforce, un sistema per la configurazione software. http://www.perforce.com/ +Comment[ja]=ソフトウェア設定管理システム Perforce を統合します。 +Comment[ms]=Menggabungkan Perforce, sebuah sistem pengurusan tetapan perisian. http://www.perforce.com/ +Comment[nds]=Integreren vun Perforce, en Systeem för't Plegen vun Programminstellen. http://www.perforce.com/ +Comment[ne]=परफोर्स एकिकरण गर्दछ, सफ्टवेयर कन्फिगरेसन व्यवस्थापन प्रणाली http://www.perforce.com/ +Comment[nl]=Integreert Perforce, een systeem voor softwareconfiguratie. Zie http://www.perforce.com/ +Comment[pl]=Integracja z Perforce, systemem zarządzania konfiguracją oprogramowania. http://www.perforce.com/ +Comment[pt]=Integra o Perforce, um sistema de gestão de configurações de 'software'. http://www.perforce.com/ +Comment[pt_BR]=Integra o Perforce, um software de configuração e gerenciamento do sistema. http://www.perforce.com/ +Comment[ru]=Интегрирует Perforce, систему управления конфигурациями программного обеспечения. http://www.perforce.com/ +Comment[sk]=Integrácia Perforce, konfiguračný projektový manažment. http://www.perforce.com/ +Comment[sl]=Integrira Perforce, upravljalni sistem programja. http://www.perforce.com/ +Comment[sr]=Интегрише Perforce, систем за управљање подешавањем софтвера. http://www.perforce.com/ +Comment[sr@Latn]=Integriše Perforce, sistem za upravljanje podešavanjem softvera. http://www.perforce.com/ +Comment[sv]=Integrerar Perforce, ett konfigurationshanteringsverktyg för programvara. http://www.perforce.com/ +Comment[ta]=ஒருங்கிணைக்கும் Perforce, ஒரு மென்பொருள் மேலாளர் அமைப்பு. http://www.perforce.com/ +Comment[tg]=Интеграл намудани Perforce, барномаи идоракунандаро шарҳи барномаҳои таъмин нигоҳ медорад.http://www.perforce.com/ +Comment[tr]=Bir yazılım ayar yönetimi sistemi olan Perforce'u bütünleştirir. http://www.perforce.com/ +Comment[zh_CN]=集成 Perforce,系统配置管理软件 http://www.perforce.com/ +Comment[zh_TW]=整合 Perforce,一套軟體設定管理系統。http://www.perforce.com/ +Name=KDevPerforce +Name[da]=TDevelop Perforce +Name[de]=Unterstützung für Perforce (TDevelop) +Name[hi]=के-डेव-परफ़ोर्स +Name[nds]=Perforce-Ünnerstütten för TDevelop +Name[sk]=KDev Perforce +Name[sv]=TDevelop Perforce +Name[ta]=Kdev Perforce +Name[zh_TW]=TDevelop Perforce +GenericName=Perforce Integration +GenericName[ca]=Integració amb Perforce +GenericName[da]=Perforce integration +GenericName[de]=Perforce-Integration +GenericName[el]=Ενσωμάτωση Perforce +GenericName[es]=Integración de Perforce +GenericName[et]=Perforce'i põimimine +GenericName[eu]=Perforce integrazioa +GenericName[fa]=مجتمع‌سازی Perforce +GenericName[fr]=Intégration de « Perforce » +GenericName[ga]=Comhtháthú Perforce +GenericName[gl]=Integración de Perforce +GenericName[hi]=परफ़ोर्स इंटीग्रेशन +GenericName[hu]=Perforce-integráció +GenericName[it]=Integrazione di Perforce +GenericName[ms]=Intergrasi Perforce +GenericName[nds]=Perforce-Integreren +GenericName[ne]=परफोर्स इन्टिग्रेसन +GenericName[nl]=Perforce-integratie +GenericName[pl]=Integracja z Perforce +GenericName[pt]=Integração com o Perforce +GenericName[pt_BR]=Integração com o Perforce +GenericName[ru]=Интеграция Perforce +GenericName[sk]=Perforce integrácia +GenericName[sl]=Integracija Perforce +GenericName[sr]=Интеграција perforce-а +GenericName[sr@Latn]=Integracija perforce-a +GenericName[sv]=Integrering av Perforce +GenericName[ta]=Perforce ஒருங்கிணைப்பு +GenericName[tg]=Интегратсия Perforce +GenericName[tr]=Perforce Bütünleştirmesi +GenericName[zh_CN]=Perforce 集成 +GenericName[zh_TW]=Perforce 整合 +ServiceTypes=TDevelop/VersionControl +X-TDE-Library=libkdevperforce +X-TDevelop-Version=5 +X-TDevelop-Properties=VCS,PerforceVCS diff --git a/vcs/perforce/tdevperforcepart.rc b/vcs/perforce/kdevperforcepart.rc similarity index 100% rename from vcs/perforce/tdevperforcepart.rc rename to vcs/perforce/kdevperforcepart.rc diff --git a/vcs/perforce/perforcepart.cpp b/vcs/perforce/perforcepart.cpp index 72672b1e..f92666b6 100644 --- a/vcs/perforce/perforcepart.cpp +++ b/vcs/perforce/perforcepart.cpp @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include #include #include @@ -25,21 +25,21 @@ #include #include -#include "tdevpartcontroller.h" -#include "tdevcore.h" -#include "tdevmakefrontend.h" -#include "tdevdifffrontend.h" -#include "tdevplugininfo.h" +#include "kdevpartcontroller.h" +#include "kdevcore.h" +#include "kdevmakefrontend.h" +#include "kdevdifffrontend.h" +#include "kdevplugininfo.h" #include "commitdlg.h" #include "execcommand.h" -static const TDevPluginInfo data("tdevperforce"); +static const KDevPluginInfo data("kdevperforce"); -typedef TDevGenericFactory PerforceFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevperforce, PerforceFactory( data ) ) +typedef KDevGenericFactory PerforceFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevperforce, PerforceFactory( data ) ) PerforcePart::PerforcePart( TQObject *parent, const char *name, const TQStringList & ) - : TDevVersionControl( &data, parent, name ? name : "PerforcePart" ) + : KDevVersionControl( &data, parent, name ? name : "PerforcePart" ) { setInstance(PerforceFactory::instance()); setupActions(); @@ -140,7 +140,7 @@ void PerforcePart::execCommand( const TQString& cmd, const TQString& filename ) command += " && p4 " + cmd + " "; command += name; - if (TDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand(dir, command); } @@ -183,7 +183,7 @@ void PerforcePart::commit( const TQString& filename ) TQString command("echo " + message); command += " | p4 submit -i"; - if (TDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand("", command); } @@ -208,7 +208,7 @@ void PerforcePart::update( const TQString& filename ) command += " && p4 sync "; command += name; - if (TDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) + if (KDevMakeFrontend *makeFrontend = extension("TDevelop/MakeFrontend")) makeFrontend->queueCommand(dir, command); } @@ -277,7 +277,7 @@ void PerforcePart::slotDiffFinished( const TQString& diff, const TQString& err ) TQString strippedDiff = diff; strippedDiff.replace( rx, "--- \\2\n+++ \\2\n" ); - if (TDevDiffFrontend *diffFrontend = extension("TDevelop/DiffFrontend")) + if (KDevDiffFrontend *diffFrontend = extension("TDevelop/DiffFrontend")) diffFrontend->showDiff( strippedDiff ); } diff --git a/vcs/perforce/perforcepart.h b/vcs/perforce/perforcepart.h index 2af8ff5f..7c034424 100644 --- a/vcs/perforce/perforcepart.h +++ b/vcs/perforce/perforcepart.h @@ -13,14 +13,14 @@ #ifndef _PERFORCEPART_H_ #define _PERFORCEPART_H_ -#include +#include #include class Context; class TQPopupMenu; class TDEAction; -class PerforcePart : public TDevVersionControl +class PerforcePart : public KDevVersionControl { Q_OBJECT @@ -34,7 +34,7 @@ public: virtual void createNewProject(const TQString& /* dir */) {} virtual bool fetchFromRepository() { return true; } - virtual TDevVCSFileInfoProvider *fileInfoProvider() const { return 0; } + virtual KDevVCSFileInfoProvider *fileInfoProvider() const { return 0; } virtual bool isValidDirectory(const TQString& /* dirPath*/) const { return true; } diff --git a/vcs/perforce/tdevperforce.desktop b/vcs/perforce/tdevperforce.desktop deleted file mode 100644 index 4f73f5e9..00000000 --- a/vcs/perforce/tdevperforce.desktop +++ /dev/null @@ -1,82 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Integrates Perforce, a software configuration management system. http://www.perforce.com/ -Comment[ca]=Integra Perforce, un sistema de gestió de la configuració del programari. http://www.perforce.com/ -Comment[da]=Integrerer Perforce, et software-indstilling håndteringssystem. http://www.perforce.com/ -Comment[de]=Integration von Perforce, einem System zur Verwaltung von Software-Konfigurationen. http://www.perforce.com/ -Comment[el]=Ενσωματώνει το Perforce, ένα σύστημα διαχείρισης και ρύθμισης λογισμικού.http://www.perforce.com/ -Comment[es]=Integra Perforce, un sistema de adminsitración de la configuración del software. http://www.perforce.com/ -Comment[et]=Integreerib tarkvaraseadistuste haldamise süsteemi Perforce. http://www.perforce.com/ -Comment[eu]=Perforce integratzen du, software konfiguazio kudeaketa sistema bat. http://www.perforce.com/ -Comment[fa]=Perforce را مجتمع‌سازی می‌کند. یک سیستم مدیریت پیکربندی نرم‌افزار. http://www.perforce.com/ -Comment[fr]=Intègre « PerForce », un système de gestion de configuration de logiciels. http:/www.perforce.com/ -Comment[gl]=Integra Perforce, un sistema de xestións de configuracións. http://www.perforce.com/ -Comment[hi]=परफ़ोर्स को इंटीग्रेट करता है, जो कि सॉफ्टवेयर कॉन्फ़िगरेशन प्रबंधन तंत्र है. http://www.perforce.com/ -Comment[hu]=Integrációt biztosít a Perforce szoftverkonfigurációs rendszerrel - http://www.perforce.com/ -Comment[it]=Integra Perforce, un sistema per la configurazione software. http://www.perforce.com/ -Comment[ja]=ソフトウェア設定管理システム Perforce を統合します。 -Comment[ms]=Menggabungkan Perforce, sebuah sistem pengurusan tetapan perisian. http://www.perforce.com/ -Comment[nds]=Integreren vun Perforce, en Systeem för't Plegen vun Programminstellen. http://www.perforce.com/ -Comment[ne]=परफोर्स एकिकरण गर्दछ, सफ्टवेयर कन्फिगरेसन व्यवस्थापन प्रणाली http://www.perforce.com/ -Comment[nl]=Integreert Perforce, een systeem voor softwareconfiguratie. Zie http://www.perforce.com/ -Comment[pl]=Integracja z Perforce, systemem zarządzania konfiguracją oprogramowania. http://www.perforce.com/ -Comment[pt]=Integra o Perforce, um sistema de gestão de configurações de 'software'. http://www.perforce.com/ -Comment[pt_BR]=Integra o Perforce, um software de configuração e gerenciamento do sistema. http://www.perforce.com/ -Comment[ru]=Интегрирует Perforce, систему управления конфигурациями программного обеспечения. http://www.perforce.com/ -Comment[sk]=Integrácia Perforce, konfiguračný projektový manažment. http://www.perforce.com/ -Comment[sl]=Integrira Perforce, upravljalni sistem programja. http://www.perforce.com/ -Comment[sr]=Интегрише Perforce, систем за управљање подешавањем софтвера. http://www.perforce.com/ -Comment[sr@Latn]=Integriše Perforce, sistem za upravljanje podešavanjem softvera. http://www.perforce.com/ -Comment[sv]=Integrerar Perforce, ett konfigurationshanteringsverktyg för programvara. http://www.perforce.com/ -Comment[ta]=ஒருங்கிணைக்கும் Perforce, ஒரு மென்பொருள் மேலாளர் அமைப்பு. http://www.perforce.com/ -Comment[tg]=Интеграл намудани Perforce, барномаи идоракунандаро шарҳи барномаҳои таъмин нигоҳ медорад.http://www.perforce.com/ -Comment[tr]=Bir yazılım ayar yönetimi sistemi olan Perforce'u bütünleştirir. http://www.perforce.com/ -Comment[zh_CN]=集成 Perforce,系统配置管理软件 http://www.perforce.com/ -Comment[zh_TW]=整合 Perforce,一套軟體設定管理系統。http://www.perforce.com/ -Name=KDevPerforce -Name[da]=TDevelop Perforce -Name[de]=Unterstützung für Perforce (TDevelop) -Name[hi]=के-डेव-परफ़ोर्स -Name[nds]=Perforce-Ünnerstütten för TDevelop -Name[sk]=KDev Perforce -Name[sv]=TDevelop Perforce -Name[ta]=Kdev Perforce -Name[zh_TW]=TDevelop Perforce -GenericName=Perforce Integration -GenericName[ca]=Integració amb Perforce -GenericName[da]=Perforce integration -GenericName[de]=Perforce-Integration -GenericName[el]=Ενσωμάτωση Perforce -GenericName[es]=Integración de Perforce -GenericName[et]=Perforce'i põimimine -GenericName[eu]=Perforce integrazioa -GenericName[fa]=مجتمع‌سازی Perforce -GenericName[fr]=Intégration de « Perforce » -GenericName[ga]=Comhtháthú Perforce -GenericName[gl]=Integración de Perforce -GenericName[hi]=परफ़ोर्स इंटीग्रेशन -GenericName[hu]=Perforce-integráció -GenericName[it]=Integrazione di Perforce -GenericName[ms]=Intergrasi Perforce -GenericName[nds]=Perforce-Integreren -GenericName[ne]=परफोर्स इन्टिग्रेसन -GenericName[nl]=Perforce-integratie -GenericName[pl]=Integracja z Perforce -GenericName[pt]=Integração com o Perforce -GenericName[pt_BR]=Integração com o Perforce -GenericName[ru]=Интеграция Perforce -GenericName[sk]=Perforce integrácia -GenericName[sl]=Integracija Perforce -GenericName[sr]=Интеграција perforce-а -GenericName[sr@Latn]=Integracija perforce-a -GenericName[sv]=Integrering av Perforce -GenericName[ta]=Perforce ஒருங்கிணைப்பு -GenericName[tg]=Интегратсия Perforce -GenericName[tr]=Perforce Bütünleştirmesi -GenericName[zh_CN]=Perforce 集成 -GenericName[zh_TW]=Perforce 整合 -ServiceTypes=TDevelop/VersionControl -X-TDE-Library=libtdevperforce -X-TDevelop-Version=5 -X-TDevelop-Properties=VCS,PerforceVCS diff --git a/vcs/subversion/CMakeLists.txt b/vcs/subversion/CMakeLists.txt index 63ffad4b..fb51fe3d 100644 --- a/vcs/subversion/CMakeLists.txt +++ b/vcs/subversion/CMakeLists.txt @@ -31,19 +31,19 @@ link_directories( ##### other data ################################ install( FILES - tdevsubversion.desktop tdevsvn+file.protocol - tdevsvn+http.protocol tdevsvn+https.protocol - tdevsvn+ssh.protocol tdevsvn+svn.protocol + kdevsubversion.desktop kdevsvn+file.protocol + kdevsvn+http.protocol kdevsvn+https.protocol + kdevsvn+ssh.protocol kdevsvn+svn.protocol DESTINATION ${SERVICES_INSTALL_DIR} ) install( FILES - tdevsvnd.desktop + kdevsvnd.desktop DESTINATION ${SERVICES_INSTALL_DIR}/kded ) -##### libtdevsubversion (module) ################ +##### libkdevsubversion (module) ################ -tde_add_kpart( libtdevsubversion AUTOMOC +tde_add_kpart( libkdevsubversion AUTOMOC SOURCES subversion_core.cpp subversion_fileinfo.cpp subversion_fileinfo.skel subversion_part.cpp @@ -54,14 +54,14 @@ tde_add_kpart( libtdevsubversion AUTOMOC svn_logviewoptiondlgbase.ui svn_logviewwidget.cpp svn_mergeoptiondlgbase.ui svn_mergewidget.cpp svn_switchdlgbase.ui svn_switchwidget.cpp - LINK tdevextensions-static tdevelop-shared + LINK kdevextensions-static tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) -##### tdeio_tdevsvn (module) ###################### +##### tdeio_kdevsvn (module) ###################### -tde_add_kpart( tdeio_tdevsvn AUTOMOC +tde_add_kpart( tdeio_kdevsvn AUTOMOC SOURCES svn_tdeio.cpp LINK tdeio-shared ${SVN_LIBRARIES} ${APR_LIBRARIES} @@ -69,12 +69,12 @@ tde_add_kpart( tdeio_tdevsvn AUTOMOC ) -##### kded_tdevsvnd (module) #################### +##### kded_kdevsvnd (module) #################### -tde_add_kpart( kded_tdevsvnd AUTOMOC +tde_add_kpart( kded_kdevsvnd AUTOMOC SOURCES - commitdlg.cpp commitdlgbase.ui tdevsvnd.cpp tdevsvnd.skel - tdevsvnd_widgets.cpp svnssltrustpromptbase.ui + commitdlg.cpp commitdlgbase.ui kdevsvnd.cpp kdevsvnd.skel + kdevsvnd_widgets.cpp svnssltrustpromptbase.ui LINK tdeio-shared tdeinit_kded-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/vcs/subversion/Makefile.am b/vcs/subversion/Makefile.am index 2f650195..a66b80dd 100644 --- a/vcs/subversion/Makefile.am +++ b/vcs/subversion/Makefile.am @@ -2,37 +2,37 @@ INCLUDES = -I$(top_srcdir)/lib/interfaces -I$(top_srcdir)/lib/util -I$(top_srcdi METASOURCES = AUTO -kde_module_LTLIBRARIES = libtdevsubversion.la tdeio_tdevsvn.la kded_tdevsvnd.la +kde_module_LTLIBRARIES = libkdevsubversion.la tdeio_kdevsvn.la kded_kdevsvnd.la -libtdevsubversion_la_SOURCES = subversion_core.cpp subversion_fileinfo.cpp \ +libkdevsubversion_la_SOURCES = subversion_core.cpp subversion_fileinfo.cpp \ subversion_fileinfo.skel subversion_part.cpp subversion_widget.cpp subversiondiff.ui \ subversionprojectwidget.ui svn_blamewidget.cpp svn_co.ui svn_commitdlgbase.ui svn_copydlgwidget.ui \ svn_copywidget.cpp svn_fileselectdlg_commit.cpp svn_logviewoptiondlgbase.ui \ svn_logviewwidget.cpp svn_mergeoptiondlgbase.ui svn_mergewidget.cpp svn_switchdlgbase.ui \ svn_switchwidget.cpp -libtdevsubversion_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/interfaces/extensions/libtdevextensions.la -libtdevsubversion_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) +libkdevsubversion_la_LIBADD = $(top_builddir)/lib/libtdevelop.la $(top_builddir)/lib/interfaces/extensions/libkdevextensions.la +libkdevsubversion_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -tdeio_tdevsvn_la_SOURCES = svn_tdeio.cpp -tdeio_tdevsvn_la_LIBADD = $(LIB_TDEIO) -tdeio_tdevsvn_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) $(SVN_LIB) +tdeio_kdevsvn_la_SOURCES = svn_tdeio.cpp +tdeio_kdevsvn_la_LIBADD = $(LIB_TDEIO) +tdeio_kdevsvn_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) $(SVN_LIB) -kded_tdevsvnd_la_SOURCES = commitdlg.cpp commitdlgbase.ui tdevsvnd.cpp \ - tdevsvnd.skel tdevsvnd_widgets.cpp svnssltrustpromptbase.ui -kded_tdevsvnd_la_LIBADD = $(LIB_TDEIO) -ltdeinit_kded -kded_tdevsvnd_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) +kded_kdevsvnd_la_SOURCES = commitdlg.cpp commitdlgbase.ui kdevsvnd.cpp \ + kdevsvnd.skel kdevsvnd_widgets.cpp svnssltrustpromptbase.ui +kded_kdevsvnd_la_LIBADD = $(LIB_TDEIO) -ltdeinit_kded +kded_kdevsvnd_la_LDFLAGS = -module $(all_libraries) $(KDE_PLUGIN) kdeddir = $(kde_servicesdir)/kded -kded_DATA = tdevsvnd.desktop +kded_DATA = kdevsvnd.desktop servicedir = $(kde_servicesdir) -service_DATA = tdevsubversion.desktop +service_DATA = kdevsubversion.desktop protocoldir = $(kde_servicesdir) -protocol_DATA = tdevsvn+file.protocol tdevsvn+http.protocol tdevsvn+https.protocol tdevsvn+ssh.protocol tdevsvn+svn.protocol +protocol_DATA = kdevsvn+file.protocol kdevsvn+http.protocol kdevsvn+https.protocol kdevsvn+ssh.protocol kdevsvn+svn.protocol SUBDIRS = integrator -noinst_HEADERS = commitdlg.h tdevsvnd.h svn_blamewidget.h svn_copywidget.h \ +noinst_HEADERS = commitdlg.h kdevsvnd.h svn_blamewidget.h svn_copywidget.h \ svn_fileselectdlg_commit.h svn_logviewwidget.h svn_mergewidget.h svn_switchwidget.h diff --git a/vcs/subversion/integrator/CMakeLists.txt b/vcs/subversion/integrator/CMakeLists.txt index 3d6c7ad3..2256b8e3 100644 --- a/vcs/subversion/integrator/CMakeLists.txt +++ b/vcs/subversion/integrator/CMakeLists.txt @@ -26,7 +26,7 @@ link_directories( ##### other data ################################ -install( FILES tdevsubversionintegrator.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) +install( FILES kdevsubversionintegrator.desktop DESTINATION ${SERVICES_INSTALL_DIR} ) ##### libsubversionintegrator (module) ########## @@ -35,6 +35,6 @@ tde_add_kpart( libsubversionintegrator AUTOMOC SOURCES subversionintegrator.cpp svnintegratordlgbase.ui svnintegratordlg.cpp - LINK tdevextras-shared tdevelop-shared + LINK kdevextras-shared tdevelop-shared DESTINATION ${PLUGIN_INSTALL_DIR} ) diff --git a/vcs/subversion/integrator/Makefile.am b/vcs/subversion/integrator/Makefile.am index aded8465..231dc3c7 100644 --- a/vcs/subversion/integrator/Makefile.am +++ b/vcs/subversion/integrator/Makefile.am @@ -6,9 +6,9 @@ METASOURCES = AUTO kde_module_LTLIBRARIES = libsubversionintegrator.la libsubversionintegrator_la_LDFLAGS = -avoid-version -no-undefined $(all_libraries) libsubversionintegrator_la_LIBADD =\ - $(top_builddir)/lib/interfaces/extras/libtdevextras.la\ + $(top_builddir)/lib/interfaces/extras/libkdevextras.la\ $(top_builddir)/lib/libtdevelop.la -kde_services_DATA = tdevsubversionintegrator.desktop +kde_services_DATA = kdevsubversionintegrator.desktop noinst_HEADERS = subversionintegrator.h svnintegratordlg.h libsubversionintegrator_la_SOURCES = subversionintegrator.cpp \ svnintegratordlgbase.ui svnintegratordlg.cpp diff --git a/vcs/subversion/integrator/tdevsubversionintegrator.desktop b/vcs/subversion/integrator/kdevsubversionintegrator.desktop similarity index 100% rename from vcs/subversion/integrator/tdevsubversionintegrator.desktop rename to vcs/subversion/integrator/kdevsubversionintegrator.desktop diff --git a/vcs/subversion/integrator/subversionintegrator.cpp b/vcs/subversion/integrator/subversionintegrator.cpp index da8fed8c..32d28d27 100644 --- a/vcs/subversion/integrator/subversionintegrator.cpp +++ b/vcs/subversion/integrator/subversionintegrator.cpp @@ -19,19 +19,19 @@ ***************************************************************************/ #include "subversionintegrator.h" -#include -#include +#include +#include #include "svnintegratordlg.h" -static const TDevPluginInfo data("tdevsubversionintegrator"); -typedef TDevGenericFactory SubversionIntegratorFactory; +static const KDevPluginInfo data("kdevsubversionintegrator"); +typedef KDevGenericFactory SubversionIntegratorFactory; K_EXPORT_COMPONENT_FACTORY( libsubversionintegrator, SubversionIntegratorFactory(data) ) SubversionIntegrator::SubversionIntegrator(TQObject* parent, const char* name, const TQStringList // args ) - :TDevVCSIntegrator(parent, name) + :KDevVCSIntegrator(parent, name) { } diff --git a/vcs/subversion/integrator/subversionintegrator.h b/vcs/subversion/integrator/subversionintegrator.h index 6c7d16ac..01c43516 100644 --- a/vcs/subversion/integrator/subversionintegrator.h +++ b/vcs/subversion/integrator/subversionintegrator.h @@ -20,11 +20,11 @@ #ifndef SUBVERSIONINTEGRATOR_H #define SUBVERSIONINTEGRATOR_H -#include +#include #include -class SubversionIntegrator : public TDevVCSIntegrator +class SubversionIntegrator : public KDevVCSIntegrator { Q_OBJECT diff --git a/vcs/subversion/integrator/svnintegratordlg.cpp b/vcs/subversion/integrator/svnintegratordlg.cpp index 35e4216b..87ccf488 100644 --- a/vcs/subversion/integrator/svnintegratordlg.cpp +++ b/vcs/subversion/integrator/svnintegratordlg.cpp @@ -47,7 +47,7 @@ SvnIntegratorDlg::SvnIntegratorDlg( TQWidget *parent, const char *name ) void SvnIntegratorDlg::accept() { // to let ioslave know which protocol it should start. - KURL protocolUrl = KURL("tdevsvn+svn://blah/"); + KURL protocolUrl = KURL("kdevsvn+svn://blah/"); KURL servURL( repos1->url() ); if ( servURL.isEmpty() ) return; diff --git a/vcs/subversion/integrator/svnintegratordlg.h b/vcs/subversion/integrator/svnintegratordlg.h index bc8e8407..ccf1686f 100644 --- a/vcs/subversion/integrator/svnintegratordlg.h +++ b/vcs/subversion/integrator/svnintegratordlg.h @@ -21,7 +21,7 @@ #define SVNINTEGRATORDLG_H #include "svnintegratordlgbase.h" -#include +#include class SvnIntegratorDlg: public SvnIntegratorDlgBase, public VCSDialog { Q_OBJECT diff --git a/vcs/subversion/tdevpart_subversion.rc b/vcs/subversion/kdevpart_subversion.rc similarity index 100% rename from vcs/subversion/tdevpart_subversion.rc rename to vcs/subversion/kdevpart_subversion.rc diff --git a/vcs/subversion/kdevsubversion.desktop b/vcs/subversion/kdevsubversion.desktop new file mode 100644 index 00000000..bf52db8c --- /dev/null +++ b/vcs/subversion/kdevsubversion.desktop @@ -0,0 +1,34 @@ +[Desktop Entry] +Type=Service +Exec=blubb +Comment=Subversion +Comment[fa]=زیرنسخه +Comment[hi]=सबवर्सन +Comment[ne]=सबभर्सन +Comment[pt_BR]=Subversão +Comment[ru]=Интеграция Subversion +Comment[ta]=உப பதிப்பு +Comment[tg]=Интегратсия Subversion +Name=KDevsubversion +Name[da]=TDevelop Subversion +Name[de]=Unterstützung für Subversion (TDevelop) +Name[hi]=के-डेव-सबवर्सन +Name[nds]=Subversion-Ünnerstütten för TDevelop +Name[sk]=KDev Subversion +Name[sv]=TDevelop Subversion +Name[ta]=kdev உப பதிப்பு +Name[tg]=KDevзер-ривоят +Name[zh_TW]=TDevelop Subversion +GenericName=Subversion +GenericName[fa]=زیرنسخه +GenericName[hi]=सबवर्सन +GenericName[ne]=सबभर्सन +GenericName[pt_BR]=Subversão +GenericName[ru]=Интеграция Subversion +GenericName[ta]=துணை பதிப்பு +GenericName[tg]=Зер-ривоят +Icon=misc +ServiceTypes=TDevelop/VersionControl +X-TDE-Library=libkdevsubversion +X-TDevelop-Version=5 +X-TDevelop-Properties=VCS,SubversionVCS diff --git a/vcs/subversion/tdevsvn+file.protocol b/vcs/subversion/kdevsvn+file.protocol similarity index 100% rename from vcs/subversion/tdevsvn+file.protocol rename to vcs/subversion/kdevsvn+file.protocol diff --git a/vcs/subversion/tdevsvn+http.protocol b/vcs/subversion/kdevsvn+http.protocol similarity index 100% rename from vcs/subversion/tdevsvn+http.protocol rename to vcs/subversion/kdevsvn+http.protocol diff --git a/vcs/subversion/tdevsvn+https.protocol b/vcs/subversion/kdevsvn+https.protocol similarity index 100% rename from vcs/subversion/tdevsvn+https.protocol rename to vcs/subversion/kdevsvn+https.protocol diff --git a/vcs/subversion/tdevsvn+ssh.protocol b/vcs/subversion/kdevsvn+ssh.protocol similarity index 100% rename from vcs/subversion/tdevsvn+ssh.protocol rename to vcs/subversion/kdevsvn+ssh.protocol diff --git a/vcs/subversion/tdevsvn+svn.protocol b/vcs/subversion/kdevsvn+svn.protocol similarity index 100% rename from vcs/subversion/tdevsvn+svn.protocol rename to vcs/subversion/kdevsvn+svn.protocol diff --git a/vcs/subversion/kdevsvnd.cpp b/vcs/subversion/kdevsvnd.cpp new file mode 100644 index 00000000..c1faf65e --- /dev/null +++ b/vcs/subversion/kdevsvnd.cpp @@ -0,0 +1,394 @@ +/* + This file is part of the KDE Project + + Copyright (C) 2003, 2004 Mickael Marchand + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + This software 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 + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "config.h" + +#include "kdevsvnd.h" + +#include "kdevsvnd_widgets.h" +#include "commitdlg.h" + +extern "C" { + KDE_EXPORT KDEDModule *create_kdevsvnd(const TQCString &name) { + return new KDevSvnd(name); + } +} + +KDevSvnd::KDevSvnd(const TQCString &name) + : KDEDModule(name) { +} +KDevSvnd::~KDevSvnd() +{} + +TQString KDevSvnd::commitDialog(TQString modifiedFiles) { + CommitDlg commitDlg; + commitDlg.setCaption(i18n("Enter Commit Log Message:")); + commitDlg.listMessage->setText( modifiedFiles ); + int result = commitDlg.exec(); + if ( result == TQDialog::Accepted ) { + return commitDlg.textMessage->text(); + } else + return TQString(); +} +int KDevSvnd::sslServerTrustPrompt( TQString errmsg, TQString hostname, TQString fingerPrint, TQString validfrom, TQString validuntil, TQString issuerName, TQString ascii_cert ) +{ + SvnSSLTrustPrompt dlg; + dlg.setupCertInfo( hostname, fingerPrint, validfrom, validuntil, issuerName, ascii_cert ); + dlg.setupFailedReasonMsg( errmsg ); + int result = dlg.exec(); + if ( result == TQDialog::Accepted ){ + return dlg.code(); + } else{ + return -1; + } +} +TQString KDevSvnd::sslCertFile() +{ + TQString fileName = KFileDialog::getOpenFileName(TQString(),TQString(),0, i18n("Open SSL certificate file")); + return fileName; +} +TQCString KDevSvnd::sslPasswdDlg(TQString promptMsg) +{ + TQCString passwd; + int ret = KPasswordDialog::getPassword( passwd,promptMsg ); + if( ret == KPasswordDialog::Accepted ){ + TQCString retstr; + retstr.setNum(1); + return retstr + passwd; + } else{ + TQCString nullstr; + nullstr.setNum(-1); + return nullstr; + } +} + + +// void KDevSvnd::registerMe(const TQCString &app) +// { +// insert(app, "test", new TestObject(app)); +// // When 'app' unregisters with DCOP, the TestObject will get deleted. +// } + +// bool KSvnd::AreAnyFilesInSvn( const KURL::List& wclist ) { +// for ( TQValueListConstIterator it = wclist.begin(); it != wclist.end() ; ++it ) { +// kdDebug( 9036 ) << "Checking file " << ( *it ) << endl; +// TQDir bdir ( ( *it ).path() ); +// if ( bdir.exists() && TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) { +// return true; +// } else if ( !bdir.exists() ) { +// if ( isFileInSvnEntries( ( *it ).fileName(), ( *it ).directory() + "/.svn/entries" ) || isFileInExternals ( ( *it ).fileName(), ( *it ).directory()+"/.svn/dir-props" ) ) +// return true; +// } +// } +// return false; +// } +// +// bool KSvnd::AreAnyFilesNotInSvn( const KURL::List& wclist ) { +// for ( TQValueListConstIterator it = wclist.begin(); it != wclist.end() ; ++it ) { +// kdDebug( 9036 ) << "Checking file " << ( *it ) << endl; +// TQDir bdir ( ( *it ).path() ); +// if ( bdir.exists() && !TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) { +// return true; +// } else if ( !bdir.exists() ) { +// if ( !isFileInSvnEntries( ( *it ).fileName(),( *it ).directory() + "/.svn/entries" ) && !isFileInExternals ( ( *it ).fileName(), ( *it ).directory()+"/.svn/dir-props" ) ) +// return true; +// } +// } +// return false; +// } +// +// bool KSvnd::AreAllFilesInSvn( const KURL::List& wclist ) { +// for ( TQValueListConstIterator it = wclist.begin(); it != wclist.end() ; ++it ) { +// kdDebug( 9036 ) << "Checking file " << ( *it ) << endl; +// TQDir bdir ( ( *it ).path() ); +// if ( bdir.exists() && !TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) { +// return false; +// } else if ( !bdir.exists() ) { +// if ( !isFileInSvnEntries( ( *it ).fileName(),( *it ).directory() + "/.svn/entries" ) && !isFileInExternals ( ( *it ).fileName(), ( *it ).directory()+"/.svn/dir-props" ) ) +// return false; +// } +// } +// return true; +// } +// +// bool KSvnd::AreAllFilesNotInSvn( const KURL::List& wclist ) { +// for ( TQValueListConstIterator it = wclist.begin(); it != wclist.end() ; ++it ) { +// kdDebug( 9036 ) << "Checking file " << ( *it ) << endl; +// TQDir bdir ( ( *it ).path() ); +// if ( bdir.exists() && TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) { +// return false; +// } else if ( !bdir.exists() ) { +// if ( isFileInSvnEntries( ( *it ).fileName(),( *it ).directory() + "/.svn/entries" ) || isFileInExternals ( ( *it ).fileName(), ( *it ).directory()+"/.svn/dir-props" ) ) +// return false; +// } +// } +// return true; +// } +// +// bool KSvnd::isFileInSvnEntries ( const TQString filename, const TQString entfile ) { +// TQFile file( entfile ); +// if ( file.open( IO_ReadOnly ) ) { +// TQTextStream stream( &file ); +// TQString line; +// while ( !stream.atEnd() ) { +// line = stream.readLine().simplifyWhiteSpace(); +// if ( line == "name=\""+ filename + "\"" ) { +// file.close(); +// return true; +// } +// } +// file.close(); +// } +// return false; +// } +// +// bool KSvnd::isFileInExternals ( const TQString filename, const TQString propfile ) { +// TQFile file( propfile ); +// if ( file.open( IO_ReadOnly ) ) { +// TQTextStream stream( &file ); +// TQStringList line; +// while ( !stream.atEnd() ) +// line << stream.readLine().simplifyWhiteSpace(); +// for ( uint i = 0 ; i < line.count(); i++ ) { +// if ( line[ i ] == "K 13" && line[ i+1 ] == "svn:externals" ) { //Key 13 : svn:externals +// //next line should be "V xx" +// if ( line [ i+2 ].startsWith( "V " ) ) { +// //ok browse the values now +// i+=2; +// while ( i < line.count() ) { +// if ( line[ i ].startsWith( filename+" " ) ) { //found it ! +// file.close( ); +// return true; +// } else if ( line[ i ].isEmpty() ) { +// file.close( ); +// return false; //we are out of svn:externals now... +// } +// i++; +// } +// } +// } +// } +// file.close(); +// } +// return false; +// } +// +// bool KSvnd::anyNotValidWorkingCopy( const KURL::List& wclist ) { +// bool result = true; //one negative match is enough +// for ( TQValueListConstIterator it = wclist.begin(); it != wclist.end() ; ++it ) { +// //exception for .svn dirs +// if ( ( *it ).path(-1).endsWith( "/.svn" ) ) +// return true; +// //if is a directory check whether it contains a .svn/entries file +// TQDir dir( ( *it ).path() ); +// if ( dir.exists() ) { //it's a dir +// if ( !TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) +// result = false; +// } +// +// //else check if ./.svn/entries exists +// if ( !TQFile::exists( ( *it ).directory() + "/.svn/entries" ) ) +// result = false; +// } +// return result; +// } +// +// bool KSvnd::anyValidWorkingCopy( const KURL::List& wclist ) { +// for ( TQValueListConstIterator it = wclist.begin(); it != wclist.end() ; ++it ) { +// //skip .svn dirs +// if ( ( *it ).path(-1).endsWith( "/.svn" ) ) +// continue; +// //if is a directory check whether it contains a .svn/entries file +// TQDir dir( ( *it ).path() ); +// if ( dir.exists() ) { //it's a dir +// if ( TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) +// return true; +// } +// +// //else check if ./.svn/entries exists +// if ( TQFile::exists( ( *it ).directory() + "/.svn/entries" ) ) +// return true; +// } +// return false; +// } +// +// int KSvnd::getStatus( const KURL::List& list ) { +// int result = 0; +// uint files = 0, folders = 0, parentsentries = 0, parentshavesvn = 0, subdirhavesvn = 0, external = 0; +// for ( TQValueListConstIterator it = list.begin(); it != list.end() ; ++it ) { +// if ( isFolder ( ( *it ) ) ) { +// folders++; +// } else { +// files++; +// } +// if ( isFileInSvnEntries ( (*it).filename(),( *it ).directory() + "/.svn/entries" ) ) { // normal subdir known in the working copy +// parentsentries++; +// } else if ( isFolder( *it ) ) { // other subfolders (either another module checkouted or an external, or something not known at all) +// if ( TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) +// subdirhavesvn++; +// if ( isFileInExternals( (*it).filename(), ( *it ).directory() + "/.svn/dir-props" ) ) { +// external++; +// } +// } +// if ( ( isFolder( ( *it ) ) && TQFile::exists( ( *it ).directory() + "../.svn/entries" ) ) || TQFile::exists( ( *it ).directory() + "/.svn/entries" ) ) //parent has a .svn ? +// parentshavesvn++; +// } +// if ( files > 0 ) +// result |= SomeAreFiles; +// if ( folders == list.count() ) { +// result |= AllAreFolders; +// result |= SomeAreFolders; +// } +// if ( folders > 0 ) +// result |= SomeAreFolders; +// if ( parentsentries == list.count() ) { +// result |= AllAreInParentsEntries; +// result |= SomeAreInParentsEntries; +// } else if ( parentsentries != 0 ) +// result |= SomeAreInParentsEntries; +// if ( parentshavesvn == list.count() ) { +// result |= AllParentsHaveSvn; +// result |= SomeParentsHaveSvn; +// } else if ( parentshavesvn > 0 ) +// result |= SomeParentsHaveSvn; +// if ( subdirhavesvn == list.count() ) { +// result |= AllHaveSvn; +// result |= SomeHaveSvn; +// } else if ( subdirhavesvn > 0 ) +// result |= SomeHaveSvn; +// if ( external == list.count() ) { +// result |= AllAreExternalToParent; +// result |= SomeAreExternalToParent; +// } else if ( external > 0 ) +// result |= SomeAreExternalToParent; +// +// return result; +// } +// +// bool KSvnd::isFolder( const KURL& url ) { +// TQDir d( url.path() ); +// return d.exists(); +// } +// +// TQStringList KSvnd::getActionMenu ( const KURL::List &list ) { +// TQStringList result; +// int listStatus = getStatus( list ); +// +// if ( !(listStatus & SomeAreInParentsEntries) && +// !(listStatus & SomeAreExternalToParent) && +// !(listStatus & SomeHaveSvn)) { +// if( list.size() == 1 && listStatus & SomeAreFolders) { +// result << "Checkout"; +// result << "Export"; +// // result << "CreateRepository"; +// result << "Import"; +// } +// } else if ( (listStatus & AllAreInParentsEntries) ) { +// result << "Diff"; +// //In SVN +// // result << "ShowLog"; +// // result << "CheckForModifications"; +// // result << "RevisionGraph"; +// // result << "_SEPARATOR_"; +// // result << "Update to revision..." +// result << "Rename"; +// result << "Delete"; +// if( listStatus & SomeAreFolders && !(listStatus & SomeAreFiles)) { +// result << "Revert"; +// // result << "Cleanup"; +// } +// result << "_SEPARATOR_"; +// // result << "BranchTag"; +// result << "Switch"; +// result << "Merge"; +// if( listStatus & SomeAreFolders && !(listStatus & SomeAreFiles)) { +// // result << "Export"; +// // result << "Relocate"; +// result << "_SEPARATOR_"; +// result << "Add"; +// } +// result << "_SEPARATOR_"; +// if( listStatus & SomeAreFiles && !(listStatus & SomeAreFolders)) { +// result << "Blame"; +// } +// result << "CreatePatch"; +// +// if( list.size() == 1 && listStatus & SomeAreFolders) { +// // result << "ApplyPatchToFolder"; +// } +// } +// return result; +// } +// +// TQStringList KSvnd::getTopLevelActionMenu ( const KURL::List &list ) { +// TQStringList result; +// int listStatus = getStatus( list ); +// +// +// if ( ( listStatus & AllParentsHaveSvn && +// ( ( listStatus & SomeAreExternalToParent ) || ( listStatus & SomeAreInParentsEntries ) ) +// || ( listStatus & SomeHaveSvn ) ) +// ) { +// result << "Update"; +// result << "Commit"; +// } +// +// return result; +// } +// +// #if 0 +// void KSvnd::notify(const TQString& path, int action, int kind, const TQString& mime_type, int content_state, int prop_state, long int revision, const TQString& userstring) { +// kdDebug(9036) << "KDED/Subversion : notify " << path << " action : " << action << " mime_type : " << mime_type << " content_state : " << content_state << " prop_state : " << prop_state << " revision : " << revision << " userstring : " << userstring << endl; +// TQByteArray params; +// +// TQDataStream stream(params, IO_WriteOnly); +// stream << path << action << kind << mime_type << content_state << prop_state << revision << userstring; +// +// emitDCOPSignal( "subversionNotify(TQString,int,int,TQString,int,int,long int,TQString)", params ); +// } +// +// void KSvnd::status(const TQString& path, int text_status, int prop_status, int repos_text_status, int repos_prop_status, long int rev ) { +// kdDebug(9036) << "KDED/Subversion : status " << path << " " << text_status << " " << prop_status << " " +// << repos_text_status << " " << repos_prop_status << " " << rev << endl; +// TQByteArray params; +// +// TQDataStream stream(params, IO_WriteOnly); +// stream << path << text_status << prop_status << repos_text_status << repos_prop_status << rev; +// +// emitDCOPSignal( "subversionStatus(TQString,int,int,int,int,long int)", params ); +// } +// +// void KSvnd::popupMessage( const TQString& message ) { +// kdDebug(9036) << "KDED/Subversion : popupMessage" << message << endl; +// KMessageBox::information(0, message, i18n( "Subversion" ) ); +// } +// #endif + +#include "kdevsvnd.moc" diff --git a/vcs/subversion/tdevsvnd.desktop b/vcs/subversion/kdevsvnd.desktop similarity index 100% rename from vcs/subversion/tdevsvnd.desktop rename to vcs/subversion/kdevsvnd.desktop diff --git a/vcs/subversion/kdevsvnd.h b/vcs/subversion/kdevsvnd.h new file mode 100644 index 00000000..438520e1 --- /dev/null +++ b/vcs/subversion/kdevsvnd.h @@ -0,0 +1,51 @@ +/* + This file is part of the KDE Project + + Copyright (C) 2003-2005 Mickael Marchand + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License + version 2 as published by the Free Software Foundation. + + This software 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 + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this library; see the file COPYING. If not, write to + the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. +*/ + +#ifndef KSVND_H +#define KSVND_H + +#include +#include +#include +#include + +class KDevSvnd : public KDEDModule +{ +Q_OBJECT +// + +K_DCOP + + //note: InSVN means parent is added. InRepos means itself is added + enum { SomeAreFiles = 1, SomeAreFolders = 2, SomeAreInParentsEntries = 4, SomeParentsHaveSvn = 8, SomeHaveSvn = 16, SomeAreExternalToParent = 32, AllAreInParentsEntries = 64, AllParentsHaveSvn = 128, AllHaveSvn = 256, AllAreExternalToParent = 512, AllAreFolders = 1024 }; +public: + KDevSvnd(const TQCString &); + ~KDevSvnd(); + +k_dcop: +// void addAuthInfo(TDEIO::AuthInfo, long); + TQString commitDialog(TQString); + int sslServerTrustPrompt(TQString certFailMsg, TQString hostname, TQString fingerPrint, TQString validfrom, TQString validuntil, TQString issuerName, TQString ascii_cert ); + TQString sslCertFile(); + TQCString sslPasswdDlg(TQString promptMsg); + +}; + +#endif diff --git a/vcs/subversion/kdevsvnd_widgets.cpp b/vcs/subversion/kdevsvnd_widgets.cpp new file mode 100644 index 00000000..0fd2c20b --- /dev/null +++ b/vcs/subversion/kdevsvnd_widgets.cpp @@ -0,0 +1,70 @@ +/* + * Copyright (C) 2007 Dukju Ahn (dukjuahn@gmail.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This program 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. + */ + +#include "kdevsvnd_widgets.h" +#include +#include +#include +#include + +SvnSSLTrustPrompt::SvnSSLTrustPrompt( TQWidget* parent, const char* name, bool modal, WFlags f ) + :SvnSSLTrustPromptBase( parent, name, modal, f ) + , m_code(-1) +{ + listView1->setColumnText( 0, "Items" ); + listView1->setColumnText( 1, "Values" ); + btnPermanent->setText(i18n("Accept Permanently")); + btnTemporary->setText(i18n("Accept Temporarily")); + btnReject->setText(i18n("Reject")); + connect( btnPermanent, TQT_SIGNAL(clicked()), this, TQT_SLOT(setPermanent()) ); + connect( btnTemporary, TQT_SIGNAL(clicked()), this, TQT_SLOT(setTemporary()) ); + connect( btnReject, TQT_SIGNAL(clicked()), this, TQT_SLOT(setRejected ()) ); +} +SvnSSLTrustPrompt::~SvnSSLTrustPrompt() +{} + +void SvnSSLTrustPrompt::setupCertInfo( TQString hostname, TQString fingerPrint, TQString validfrom, TQString validuntil, TQString issuerName, TQString ascii_cert ) +{ + // setup texts + TQListViewItem *host= new TQListViewItem(listView1, i18n("Hostname"), hostname ); + TQListViewItem *finger = new TQListViewItem(listView1, i18n("FingerPrint"), fingerPrint ); + TQListViewItem *validFrom = new TQListViewItem(listView1, i18n("Valid From"), validfrom ); + TQListViewItem *validUntil = new TQListViewItem(listView1, i18n("Valid Until"), validuntil ); + TQListViewItem *issName = new TQListViewItem(listView1, i18n("Issuer"), issuerName ); + TQListViewItem *cert = new TQListViewItem(listView1, i18n("Cert"), ascii_cert ); +} +void SvnSSLTrustPrompt::setupFailedReasonMsg( TQString msg ) +{ + errMsgLabel->setText( msg ); +} +int SvnSSLTrustPrompt::code() +{ + return m_code; +} + +void SvnSSLTrustPrompt::setPermanent() +{ + m_code = 1; +} + +void SvnSSLTrustPrompt::setTemporary() +{ + m_code = 0; +} + +void SvnSSLTrustPrompt::setRejected() +{ + m_code = -1; +} +#include "kdevsvnd_widgets.moc" diff --git a/vcs/subversion/kdevsvnd_widgets.h b/vcs/subversion/kdevsvnd_widgets.h new file mode 100644 index 00000000..3967cb35 --- /dev/null +++ b/vcs/subversion/kdevsvnd_widgets.h @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2007 Dukju Ahn (dukjuahn@gmail.com) + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This program 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. + */ + +#ifndef KDEVSVND_WIDGETS_H +#define KDEVSVND_WIDGETS_H + +#include "svnssltrustpromptbase.h" + +class SvnSSLTrustPrompt : public SvnSSLTrustPromptBase{ +Q_OBJECT + +public: + SvnSSLTrustPrompt( TQWidget* parent=0, const char* name=0, bool modal=true, WFlags f=0 ); + ~SvnSSLTrustPrompt(); + void setupCertInfo( TQString hostname, TQString fingerPrint, TQString validfrom, TQString validuntil, TQString issuerName, TQString ascii_cert ); + void setupFailedReasonMsg( TQString msg ); + int code(); + +public slots: + void setPermanent(); + void setTemporary(); + void setRejected(); + +protected: + // -1 for reject + // 0 for accept temporarily + // 1 for accept permanently + int m_code; +}; + +#endif diff --git a/vcs/subversion/subversion_core.cpp b/vcs/subversion/subversion_core.cpp index 108bf298..e9c89ece 100644 --- a/vcs/subversion/subversion_core.cpp +++ b/vcs/subversion/subversion_core.cpp @@ -18,15 +18,15 @@ */ #include -#include -#include +#include +#include #include "subversion_part.h" #include "subversion_core.h" #include "subversion_widget.h" #include "svn_blamewidget.h" #include "svn_logviewwidget.h" #include "subversiondiff.h" -#include +#include #include "svn_co.h" #include #include @@ -82,7 +82,7 @@ subversionCore::~subversionCore() { //FIXME delete m_fileInfoProvider here? } -TDevVCSFileInfoProvider *subversionCore::fileInfoProvider() const { +KDevVCSFileInfoProvider *subversionCore::fileInfoProvider() const { return m_fileInfoProvider; } @@ -114,8 +114,8 @@ subversionWidget *subversionCore::processWidget() const { void subversionCore::resolve( const KURL::List& list ) { KURL servURL = m_part->baseURL(); if ( servURL.isEmpty() ) servURL="kdevsvn+svn://blah/"; - if ( ! servURL.protocol().startsWith( "tdevsvn+" ) ) { - servURL.setProtocol( "tdevsvn+" + servURL.protocol() ); //make sure it starts with "svn" + if ( ! servURL.protocol().startsWith( "kdevsvn+" ) ) { + servURL.setProtocol( "kdevsvn+" + servURL.protocol() ); //make sure it starts with "svn" } kdDebug(9036) << "servURL : " << servURL.prettyURL() << endl; for ( TQValueListConstIterator it = list.begin(); it != list.end() ; ++it ) { @@ -248,8 +248,8 @@ void subversionCore::diffAsync( const KURL &pathOrUrl1, const KURL &pathOrUrl2, void subversionCore::commit( const KURL::List& list, bool recurse, bool keeplocks ) { KURL servURL = m_part->baseURL(); if ( servURL.isEmpty() ) servURL="kdevsvn+svn://blah/"; - if ( ! servURL.protocol().startsWith( "tdevsvn+" ) ) { - servURL.setProtocol( "tdevsvn+" + servURL.protocol() ); //make sure it starts with "svn" + if ( ! servURL.protocol().startsWith( "kdevsvn+" ) ) { + servURL.setProtocol( "kdevsvn+" + servURL.protocol() ); //make sure it starts with "svn" } kdDebug(9036) << "servURL : " << servURL.prettyURL() << endl; TQByteArray parms; @@ -277,8 +277,8 @@ void subversionCore::svnLog( const KURL::List& list, clientInfo( KURL(m_part->project()->projectDirectory()), false, m_part->m_prjInfoMap ); KURL servURL = m_part->baseURL(); if ( servURL.isEmpty() ) servURL="kdevsvn+svn://blah/"; - if ( ! servURL.protocol().startsWith( "tdevsvn+" ) ) { - servURL.setProtocol( "tdevsvn+" + servURL.protocol() ); //make sure it starts with "svn" + if ( ! servURL.protocol().startsWith( "kdevsvn+" ) ) { + servURL.setProtocol( "kdevsvn+" + servURL.protocol() ); //make sure it starts with "svn" } kdDebug(9036) << "servURL : " << servURL.prettyURL() << endl; TQByteArray parms; @@ -304,8 +304,8 @@ void subversionCore::blame( const KURL &url, UrlMode mode, int revstart, TQStrin { KURL servURL = m_part->baseURL(); if ( servURL.isEmpty() ) servURL="kdevsvn+svn://blah/"; - if ( ! servURL.protocol().startsWith( "tdevsvn+" ) ) { - servURL.setProtocol( "tdevsvn+" + servURL.protocol() ); //make sure it starts with "svn" + if ( ! servURL.protocol().startsWith( "kdevsvn+" ) ) { + servURL.setProtocol( "kdevsvn+" + servURL.protocol() ); //make sure it starts with "svn" } kdDebug(9036) << "servURL : " << servURL.prettyURL() << endl; TQByteArray parms; @@ -374,7 +374,7 @@ void subversionCore::checkout() { int cmd = 1; int rev = -1; s << cmd << servURL << KURL( wcPath ) << rev << TQString( "HEAD" ); - servURL.setProtocol( "tdevsvn+" + servURL.protocol() ); //make sure it starts with "svn" + servURL.setProtocol( "kdevsvn+" + servURL.protocol() ); //make sure it starts with "svn" SimpleJob * job = TDEIO::special(servURL,parms, true); job->setWindow( m_part->mainWindow()->main() ); connect( job, TQT_SIGNAL( result( TDEIO::Job * ) ), this, TQT_SLOT( slotEndCheckout( TDEIO::Job * ) ) ); diff --git a/vcs/subversion/subversion_core.h b/vcs/subversion/subversion_core.h index 60cd8cfc..f2f3f6da 100644 --- a/vcs/subversion/subversion_core.h +++ b/vcs/subversion/subversion_core.h @@ -29,7 +29,7 @@ #include "subversion_fileinfo.h" #include "subversion_global.h" -class TDevProject; +class KDevProject; class subversionPart; class subversionWidget; class TDEApplication; @@ -76,7 +76,7 @@ public: // Return true on success. Otherwise return false. bool clientInfo( KURL path_or_url, bool recurse, TQMap< KURL, SvnGlobal::SvnInfoHolder> &holderMap ); void createNewProject( const TQString& dirName, const KURL& importURL, bool init ); - TDevVCSFileInfoProvider *fileInfoProvider() const; + KDevVCSFileInfoProvider *fileInfoProvider() const; void initProcessDlg( TDEIO::Job *job, const TQString &src, const TQString &dest ); // k_dcop: diff --git a/vcs/subversion/subversion_fileinfo.cpp b/vcs/subversion/subversion_fileinfo.cpp index c41ff9ef..45d44d1e 100644 --- a/vcs/subversion/subversion_fileinfo.cpp +++ b/vcs/subversion/subversion_fileinfo.cpp @@ -22,10 +22,10 @@ #include #include #include -#include +#include #include #include -#include +#include #include #include @@ -33,7 +33,7 @@ #include SVNFileInfoProvider::SVNFileInfoProvider(subversionPart *parent, const char *name) - : TDevVCSFileInfoProvider( parent, "svnfileinfoprovider" ), + : KDevVCSFileInfoProvider( parent, "svnfileinfoprovider" ), m_cachedDirEntries( 0 ), m_recursiveDirEntries(0) { Q_UNUSED(name); m_part = parent; diff --git a/vcs/subversion/subversion_fileinfo.h b/vcs/subversion/subversion_fileinfo.h index 1d144270..9b322463 100644 --- a/vcs/subversion/subversion_fileinfo.h +++ b/vcs/subversion/subversion_fileinfo.h @@ -23,7 +23,7 @@ #include -#include +#include #include #include #include @@ -34,7 +34,7 @@ Provider for SVN file information @author Mickael Marchand */ -class SVNFileInfoProvider : public TDevVCSFileInfoProvider, public DCOPObject/*, virtual public DCOPClient*/ +class SVNFileInfoProvider : public KDevVCSFileInfoProvider, public DCOPObject/*, virtual public DCOPClient*/ { Q_OBJECT // diff --git a/vcs/subversion/subversion_part.cpp b/vcs/subversion/subversion_part.cpp index 3df326d9..f3f43cd9 100644 --- a/vcs/subversion/subversion_part.cpp +++ b/vcs/subversion/subversion_part.cpp @@ -21,18 +21,18 @@ #include #include #include -#include +#include #include #include -#include "tdevcore.h" -#include "tdevmainwindow.h" +#include "kdevcore.h" +#include "kdevmainwindow.h" #include "subversion_core.h" #include "subversion_widget.h" #include "subversionprojectwidget.h" #include "subversion_fileinfo.h" #include "subversion_global.h" -#include "tdevversioncontrol.h" +#include "kdevversioncontrol.h" #include "svn_fileselectdlg_commit.h" #include "svn_logviewwidget.h" #include "svn_switchwidget.h" @@ -43,28 +43,28 @@ #include #include #include -#include -#include +#include +#include #include #include #include #include #include -#include +#include #include using namespace SvnGlobal; -static const TDevPluginInfo data("tdevsubversion"); +static const KDevPluginInfo data("kdevsubversion"); -typedef TDevGenericFactory subversionFactory; -K_EXPORT_COMPONENT_FACTORY( libtdevsubversion, subversionFactory( data ) ) +typedef KDevGenericFactory subversionFactory; +K_EXPORT_COMPONENT_FACTORY( libkdevsubversion, subversionFactory( data ) ) //bool g_projectWasJustCreated = false; subversionPart::subversionPart(TQObject *parent, const char *name, const TQStringList& ) - : TDevVersionControl(&data, parent, name ? name : "Subversion" ) { + : KDevVersionControl(&data, parent, name ? name : "Subversion" ) { setInstance(subversionFactory::instance()); m_projWidget = 0; @@ -79,7 +79,7 @@ subversionPart::subversionPart(TQObject *parent, const char *name, const TQStrin // Context menu connect( core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)), this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *)) ); connect( core(), TQT_SIGNAL(projectConfigWidget(KDialogBase*)), this, TQT_SLOT(projectConfigWidget(KDialogBase*)) ); - connect( core(), TQT_SIGNAL(stopButtonClicked(TDevPlugin*)), this, TQT_SLOT(slotStopButtonClicked(TDevPlugin*)) ); + connect( core(), TQT_SIGNAL(stopButtonClicked(KDevPlugin*)), this, TQT_SLOT(slotStopButtonClicked(KDevPlugin*)) ); connect( core(), TQT_SIGNAL(projectOpened()), this, TQT_SLOT(slotProjectOpened()) ); connect( core(), TQT_SIGNAL(projectClosed()), this, TQT_SLOT(slotProjectClosed()) ); @@ -177,7 +177,7 @@ bool subversionPart::fetchFromRepository() { return true; } -TDevVCSFileInfoProvider * subversionPart::fileInfoProvider() const { +KDevVCSFileInfoProvider * subversionPart::fileInfoProvider() const { return m_impl->fileInfoProvider(); } diff --git a/vcs/subversion/subversion_part.h b/vcs/subversion/subversion_part.h index 9296152a..1847567d 100644 --- a/vcs/subversion/subversion_part.h +++ b/vcs/subversion/subversion_part.h @@ -16,16 +16,16 @@ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef __TDEVPART_SUBVERSION_H__ -#define __TDEVPART_SUBVERSION_H__ +#ifndef __KDEVPART_SUBVERSION_H__ +#define __KDEVPART_SUBVERSION_H__ #include -#include +#include #include #include #include -#include "tdevversioncontrol.h" +#include "kdevversioncontrol.h" class subversionCore; class subversionOptionsWidget; @@ -36,7 +36,7 @@ namespace SvnGlobal class SvnInfoHolder; }; -class subversionPart : public TDevVersionControl +class subversionPart : public KDevVersionControl { Q_OBJECT @@ -49,7 +49,7 @@ public: TQWidget* newProjectWidget( TQWidget* parent ); void createNewProject( const TQString& dirname ); bool fetchFromRepository(); - TDevVCSFileInfoProvider * fileInfoProvider() const; + KDevVCSFileInfoProvider * fileInfoProvider() const; bool urlFocusedDocument( KURL &url ); void restorePartialProjectSession(const TQDomElement* ); void savePartialProjectSession(TQDomElement* ); diff --git a/vcs/subversion/subversion_widget.cpp b/vcs/subversion/subversion_widget.cpp index 9b29e1fa..95b31f6b 100644 --- a/vcs/subversion/subversion_widget.cpp +++ b/vcs/subversion/subversion_widget.cpp @@ -18,7 +18,7 @@ */ #include -#include +#include #include #include diff --git a/vcs/subversion/svn_fileselectdlg_commit.cpp b/vcs/subversion/svn_fileselectdlg_commit.cpp index 9c210a37..e042df84 100644 --- a/vcs/subversion/svn_fileselectdlg_commit.cpp +++ b/vcs/subversion/svn_fileselectdlg_commit.cpp @@ -29,10 +29,10 @@ #include #include #include -#include "tdevmainwindow.h" +#include "kdevmainwindow.h" #include -#include +#include SVNFileSelectDlgCommit::SVNFileSelectDlgCommit( KURL::List &urls, subversionPart *part, TQWidget* parent) :SvnCommitDlgBase( parent, "svnfileselectcommitdlg", true ) diff --git a/vcs/subversion/svn_logviewwidget.cpp b/vcs/subversion/svn_logviewwidget.cpp index e872a586..10e55a9f 100644 --- a/vcs/subversion/svn_logviewwidget.cpp +++ b/vcs/subversion/svn_logviewwidget.cpp @@ -22,7 +22,7 @@ #include "svn_blamewidget.h" #include "subversion_core.h" #include "subversion_global.h" -#include +#include #include #include #include diff --git a/vcs/subversion/svn_tdeio.cpp b/vcs/subversion/svn_tdeio.cpp index 0abac2b8..23f1d2ff 100644 --- a/vcs/subversion/svn_tdeio.cpp +++ b/vcs/subversion/svn_tdeio.cpp @@ -124,7 +124,7 @@ tdeio_svnProtocol::tdeio_svnProtocol(const TQCString &pool_socket, const TQCStri apr_initialize(); // Make sure to properly initialize svn client, besides other things, this sets up // NLS support for environments that don't use UTF-8 - svn_cmdline_init("tdevsvnd",NULL); + svn_cmdline_init("kdevsvnd",NULL); // CleanUP ctx preventing crash in svn_client_update and other memset(&ctx, 0, sizeof(ctx)); pool = svn_pool_create (NULL); @@ -1861,7 +1861,7 @@ svn_error_t *tdeio_svnProtocol::commitLogPrompt( const char **log_msg, const cha kdDebug(9036) << " __TIME__ " << __TIME__ << endl; if ( !p->dcopClient()->call( "kded","kdevsvnd","commitDialog(TQString)", params, replyType, reply ) ) { - kdWarning() << "Communication with KDED:TDevSvnd failed" << endl; + kdWarning() << "Communication with KDED:KDevSvnd failed" << endl; svn_error_t *err = svn_error_create( SVN_ERR_EXTERNAL_PROGRAM, NULL, apr_pstrdup( pool, "Fail to call kded_kdevsvnd via DCOP. If this is your first problem, try to restart KDE" ) ); return err; diff --git a/vcs/subversion/tdevsubversion.desktop b/vcs/subversion/tdevsubversion.desktop deleted file mode 100644 index 7643c755..00000000 --- a/vcs/subversion/tdevsubversion.desktop +++ /dev/null @@ -1,34 +0,0 @@ -[Desktop Entry] -Type=Service -Exec=blubb -Comment=Subversion -Comment[fa]=زیرنسخه -Comment[hi]=सबवर्सन -Comment[ne]=सबभर्सन -Comment[pt_BR]=Subversão -Comment[ru]=Интеграция Subversion -Comment[ta]=உப பதிப்பு -Comment[tg]=Интегратсия Subversion -Name=KDevsubversion -Name[da]=TDevelop Subversion -Name[de]=Unterstützung für Subversion (TDevelop) -Name[hi]=के-डेव-सबवर्सन -Name[nds]=Subversion-Ünnerstütten för TDevelop -Name[sk]=KDev Subversion -Name[sv]=TDevelop Subversion -Name[ta]=kdev உப பதிப்பு -Name[tg]=KDevзер-ривоят -Name[zh_TW]=TDevelop Subversion -GenericName=Subversion -GenericName[fa]=زیرنسخه -GenericName[hi]=सबवर्सन -GenericName[ne]=सबभर्सन -GenericName[pt_BR]=Subversão -GenericName[ru]=Интеграция Subversion -GenericName[ta]=துணை பதிப்பு -GenericName[tg]=Зер-ривоят -Icon=misc -ServiceTypes=TDevelop/VersionControl -X-TDE-Library=libtdevsubversion -X-TDevelop-Version=5 -X-TDevelop-Properties=VCS,SubversionVCS diff --git a/vcs/subversion/tdevsvnd.cpp b/vcs/subversion/tdevsvnd.cpp deleted file mode 100644 index ea42667b..00000000 --- a/vcs/subversion/tdevsvnd.cpp +++ /dev/null @@ -1,394 +0,0 @@ -/* - This file is part of the KDE Project - - Copyright (C) 2003, 2004 Mickael Marchand - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - version 2 as published by the Free Software Foundation. - - This software 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 - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this library; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "config.h" - -#include "tdevsvnd.h" - -#include "tdevsvnd_widgets.h" -#include "commitdlg.h" - -extern "C" { - KDE_EXPORT KDEDModule *create_kdevsvnd(const TQCString &name) { - return new TDevSvnd(name); - } -} - -TDevSvnd::TDevSvnd(const TQCString &name) - : KDEDModule(name) { -} -TDevSvnd::~TDevSvnd() -{} - -TQString TDevSvnd::commitDialog(TQString modifiedFiles) { - CommitDlg commitDlg; - commitDlg.setCaption(i18n("Enter Commit Log Message:")); - commitDlg.listMessage->setText( modifiedFiles ); - int result = commitDlg.exec(); - if ( result == TQDialog::Accepted ) { - return commitDlg.textMessage->text(); - } else - return TQString(); -} -int TDevSvnd::sslServerTrustPrompt( TQString errmsg, TQString hostname, TQString fingerPrint, TQString validfrom, TQString validuntil, TQString issuerName, TQString ascii_cert ) -{ - SvnSSLTrustPrompt dlg; - dlg.setupCertInfo( hostname, fingerPrint, validfrom, validuntil, issuerName, ascii_cert ); - dlg.setupFailedReasonMsg( errmsg ); - int result = dlg.exec(); - if ( result == TQDialog::Accepted ){ - return dlg.code(); - } else{ - return -1; - } -} -TQString TDevSvnd::sslCertFile() -{ - TQString fileName = KFileDialog::getOpenFileName(TQString(),TQString(),0, i18n("Open SSL certificate file")); - return fileName; -} -TQCString TDevSvnd::sslPasswdDlg(TQString promptMsg) -{ - TQCString passwd; - int ret = KPasswordDialog::getPassword( passwd,promptMsg ); - if( ret == KPasswordDialog::Accepted ){ - TQCString retstr; - retstr.setNum(1); - return retstr + passwd; - } else{ - TQCString nullstr; - nullstr.setNum(-1); - return nullstr; - } -} - - -// void TDevSvnd::registerMe(const TQCString &app) -// { -// insert(app, "test", new TestObject(app)); -// // When 'app' unregisters with DCOP, the TestObject will get deleted. -// } - -// bool KSvnd::AreAnyFilesInSvn( const KURL::List& wclist ) { -// for ( TQValueListConstIterator it = wclist.begin(); it != wclist.end() ; ++it ) { -// kdDebug( 9036 ) << "Checking file " << ( *it ) << endl; -// TQDir bdir ( ( *it ).path() ); -// if ( bdir.exists() && TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) { -// return true; -// } else if ( !bdir.exists() ) { -// if ( isFileInSvnEntries( ( *it ).fileName(), ( *it ).directory() + "/.svn/entries" ) || isFileInExternals ( ( *it ).fileName(), ( *it ).directory()+"/.svn/dir-props" ) ) -// return true; -// } -// } -// return false; -// } -// -// bool KSvnd::AreAnyFilesNotInSvn( const KURL::List& wclist ) { -// for ( TQValueListConstIterator it = wclist.begin(); it != wclist.end() ; ++it ) { -// kdDebug( 9036 ) << "Checking file " << ( *it ) << endl; -// TQDir bdir ( ( *it ).path() ); -// if ( bdir.exists() && !TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) { -// return true; -// } else if ( !bdir.exists() ) { -// if ( !isFileInSvnEntries( ( *it ).fileName(),( *it ).directory() + "/.svn/entries" ) && !isFileInExternals ( ( *it ).fileName(), ( *it ).directory()+"/.svn/dir-props" ) ) -// return true; -// } -// } -// return false; -// } -// -// bool KSvnd::AreAllFilesInSvn( const KURL::List& wclist ) { -// for ( TQValueListConstIterator it = wclist.begin(); it != wclist.end() ; ++it ) { -// kdDebug( 9036 ) << "Checking file " << ( *it ) << endl; -// TQDir bdir ( ( *it ).path() ); -// if ( bdir.exists() && !TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) { -// return false; -// } else if ( !bdir.exists() ) { -// if ( !isFileInSvnEntries( ( *it ).fileName(),( *it ).directory() + "/.svn/entries" ) && !isFileInExternals ( ( *it ).fileName(), ( *it ).directory()+"/.svn/dir-props" ) ) -// return false; -// } -// } -// return true; -// } -// -// bool KSvnd::AreAllFilesNotInSvn( const KURL::List& wclist ) { -// for ( TQValueListConstIterator it = wclist.begin(); it != wclist.end() ; ++it ) { -// kdDebug( 9036 ) << "Checking file " << ( *it ) << endl; -// TQDir bdir ( ( *it ).path() ); -// if ( bdir.exists() && TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) { -// return false; -// } else if ( !bdir.exists() ) { -// if ( isFileInSvnEntries( ( *it ).fileName(),( *it ).directory() + "/.svn/entries" ) || isFileInExternals ( ( *it ).fileName(), ( *it ).directory()+"/.svn/dir-props" ) ) -// return false; -// } -// } -// return true; -// } -// -// bool KSvnd::isFileInSvnEntries ( const TQString filename, const TQString entfile ) { -// TQFile file( entfile ); -// if ( file.open( IO_ReadOnly ) ) { -// TQTextStream stream( &file ); -// TQString line; -// while ( !stream.atEnd() ) { -// line = stream.readLine().simplifyWhiteSpace(); -// if ( line == "name=\""+ filename + "\"" ) { -// file.close(); -// return true; -// } -// } -// file.close(); -// } -// return false; -// } -// -// bool KSvnd::isFileInExternals ( const TQString filename, const TQString propfile ) { -// TQFile file( propfile ); -// if ( file.open( IO_ReadOnly ) ) { -// TQTextStream stream( &file ); -// TQStringList line; -// while ( !stream.atEnd() ) -// line << stream.readLine().simplifyWhiteSpace(); -// for ( uint i = 0 ; i < line.count(); i++ ) { -// if ( line[ i ] == "K 13" && line[ i+1 ] == "svn:externals" ) { //Key 13 : svn:externals -// //next line should be "V xx" -// if ( line [ i+2 ].startsWith( "V " ) ) { -// //ok browse the values now -// i+=2; -// while ( i < line.count() ) { -// if ( line[ i ].startsWith( filename+" " ) ) { //found it ! -// file.close( ); -// return true; -// } else if ( line[ i ].isEmpty() ) { -// file.close( ); -// return false; //we are out of svn:externals now... -// } -// i++; -// } -// } -// } -// } -// file.close(); -// } -// return false; -// } -// -// bool KSvnd::anyNotValidWorkingCopy( const KURL::List& wclist ) { -// bool result = true; //one negative match is enough -// for ( TQValueListConstIterator it = wclist.begin(); it != wclist.end() ; ++it ) { -// //exception for .svn dirs -// if ( ( *it ).path(-1).endsWith( "/.svn" ) ) -// return true; -// //if is a directory check whether it contains a .svn/entries file -// TQDir dir( ( *it ).path() ); -// if ( dir.exists() ) { //it's a dir -// if ( !TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) -// result = false; -// } -// -// //else check if ./.svn/entries exists -// if ( !TQFile::exists( ( *it ).directory() + "/.svn/entries" ) ) -// result = false; -// } -// return result; -// } -// -// bool KSvnd::anyValidWorkingCopy( const KURL::List& wclist ) { -// for ( TQValueListConstIterator it = wclist.begin(); it != wclist.end() ; ++it ) { -// //skip .svn dirs -// if ( ( *it ).path(-1).endsWith( "/.svn" ) ) -// continue; -// //if is a directory check whether it contains a .svn/entries file -// TQDir dir( ( *it ).path() ); -// if ( dir.exists() ) { //it's a dir -// if ( TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) -// return true; -// } -// -// //else check if ./.svn/entries exists -// if ( TQFile::exists( ( *it ).directory() + "/.svn/entries" ) ) -// return true; -// } -// return false; -// } -// -// int KSvnd::getStatus( const KURL::List& list ) { -// int result = 0; -// uint files = 0, folders = 0, parentsentries = 0, parentshavesvn = 0, subdirhavesvn = 0, external = 0; -// for ( TQValueListConstIterator it = list.begin(); it != list.end() ; ++it ) { -// if ( isFolder ( ( *it ) ) ) { -// folders++; -// } else { -// files++; -// } -// if ( isFileInSvnEntries ( (*it).filename(),( *it ).directory() + "/.svn/entries" ) ) { // normal subdir known in the working copy -// parentsentries++; -// } else if ( isFolder( *it ) ) { // other subfolders (either another module checkouted or an external, or something not known at all) -// if ( TQFile::exists( ( *it ).path() + "/.svn/entries" ) ) -// subdirhavesvn++; -// if ( isFileInExternals( (*it).filename(), ( *it ).directory() + "/.svn/dir-props" ) ) { -// external++; -// } -// } -// if ( ( isFolder( ( *it ) ) && TQFile::exists( ( *it ).directory() + "../.svn/entries" ) ) || TQFile::exists( ( *it ).directory() + "/.svn/entries" ) ) //parent has a .svn ? -// parentshavesvn++; -// } -// if ( files > 0 ) -// result |= SomeAreFiles; -// if ( folders == list.count() ) { -// result |= AllAreFolders; -// result |= SomeAreFolders; -// } -// if ( folders > 0 ) -// result |= SomeAreFolders; -// if ( parentsentries == list.count() ) { -// result |= AllAreInParentsEntries; -// result |= SomeAreInParentsEntries; -// } else if ( parentsentries != 0 ) -// result |= SomeAreInParentsEntries; -// if ( parentshavesvn == list.count() ) { -// result |= AllParentsHaveSvn; -// result |= SomeParentsHaveSvn; -// } else if ( parentshavesvn > 0 ) -// result |= SomeParentsHaveSvn; -// if ( subdirhavesvn == list.count() ) { -// result |= AllHaveSvn; -// result |= SomeHaveSvn; -// } else if ( subdirhavesvn > 0 ) -// result |= SomeHaveSvn; -// if ( external == list.count() ) { -// result |= AllAreExternalToParent; -// result |= SomeAreExternalToParent; -// } else if ( external > 0 ) -// result |= SomeAreExternalToParent; -// -// return result; -// } -// -// bool KSvnd::isFolder( const KURL& url ) { -// TQDir d( url.path() ); -// return d.exists(); -// } -// -// TQStringList KSvnd::getActionMenu ( const KURL::List &list ) { -// TQStringList result; -// int listStatus = getStatus( list ); -// -// if ( !(listStatus & SomeAreInParentsEntries) && -// !(listStatus & SomeAreExternalToParent) && -// !(listStatus & SomeHaveSvn)) { -// if( list.size() == 1 && listStatus & SomeAreFolders) { -// result << "Checkout"; -// result << "Export"; -// // result << "CreateRepository"; -// result << "Import"; -// } -// } else if ( (listStatus & AllAreInParentsEntries) ) { -// result << "Diff"; -// //In SVN -// // result << "ShowLog"; -// // result << "CheckForModifications"; -// // result << "RevisionGraph"; -// // result << "_SEPARATOR_"; -// // result << "Update to revision..." -// result << "Rename"; -// result << "Delete"; -// if( listStatus & SomeAreFolders && !(listStatus & SomeAreFiles)) { -// result << "Revert"; -// // result << "Cleanup"; -// } -// result << "_SEPARATOR_"; -// // result << "BranchTag"; -// result << "Switch"; -// result << "Merge"; -// if( listStatus & SomeAreFolders && !(listStatus & SomeAreFiles)) { -// // result << "Export"; -// // result << "Relocate"; -// result << "_SEPARATOR_"; -// result << "Add"; -// } -// result << "_SEPARATOR_"; -// if( listStatus & SomeAreFiles && !(listStatus & SomeAreFolders)) { -// result << "Blame"; -// } -// result << "CreatePatch"; -// -// if( list.size() == 1 && listStatus & SomeAreFolders) { -// // result << "ApplyPatchToFolder"; -// } -// } -// return result; -// } -// -// TQStringList KSvnd::getTopLevelActionMenu ( const KURL::List &list ) { -// TQStringList result; -// int listStatus = getStatus( list ); -// -// -// if ( ( listStatus & AllParentsHaveSvn && -// ( ( listStatus & SomeAreExternalToParent ) || ( listStatus & SomeAreInParentsEntries ) ) -// || ( listStatus & SomeHaveSvn ) ) -// ) { -// result << "Update"; -// result << "Commit"; -// } -// -// return result; -// } -// -// #if 0 -// void KSvnd::notify(const TQString& path, int action, int kind, const TQString& mime_type, int content_state, int prop_state, long int revision, const TQString& userstring) { -// kdDebug(9036) << "KDED/Subversion : notify " << path << " action : " << action << " mime_type : " << mime_type << " content_state : " << content_state << " prop_state : " << prop_state << " revision : " << revision << " userstring : " << userstring << endl; -// TQByteArray params; -// -// TQDataStream stream(params, IO_WriteOnly); -// stream << path << action << kind << mime_type << content_state << prop_state << revision << userstring; -// -// emitDCOPSignal( "subversionNotify(TQString,int,int,TQString,int,int,long int,TQString)", params ); -// } -// -// void KSvnd::status(const TQString& path, int text_status, int prop_status, int repos_text_status, int repos_prop_status, long int rev ) { -// kdDebug(9036) << "KDED/Subversion : status " << path << " " << text_status << " " << prop_status << " " -// << repos_text_status << " " << repos_prop_status << " " << rev << endl; -// TQByteArray params; -// -// TQDataStream stream(params, IO_WriteOnly); -// stream << path << text_status << prop_status << repos_text_status << repos_prop_status << rev; -// -// emitDCOPSignal( "subversionStatus(TQString,int,int,int,int,long int)", params ); -// } -// -// void KSvnd::popupMessage( const TQString& message ) { -// kdDebug(9036) << "KDED/Subversion : popupMessage" << message << endl; -// KMessageBox::information(0, message, i18n( "Subversion" ) ); -// } -// #endif - -#include "tdevsvnd.moc" diff --git a/vcs/subversion/tdevsvnd.h b/vcs/subversion/tdevsvnd.h deleted file mode 100644 index 4bec5ae7..00000000 --- a/vcs/subversion/tdevsvnd.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - This file is part of the KDE Project - - Copyright (C) 2003-2005 Mickael Marchand - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License - version 2 as published by the Free Software Foundation. - - This software 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 - General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this library; see the file COPYING. If not, write to - the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. -*/ - -#ifndef KSVND_H -#define KSVND_H - -#include -#include -#include -#include - -class TDevSvnd : public KDEDModule -{ -Q_OBJECT -// - -K_DCOP - - //note: InSVN means parent is added. InRepos means itself is added - enum { SomeAreFiles = 1, SomeAreFolders = 2, SomeAreInParentsEntries = 4, SomeParentsHaveSvn = 8, SomeHaveSvn = 16, SomeAreExternalToParent = 32, AllAreInParentsEntries = 64, AllParentsHaveSvn = 128, AllHaveSvn = 256, AllAreExternalToParent = 512, AllAreFolders = 1024 }; -public: - TDevSvnd(const TQCString &); - ~TDevSvnd(); - -k_dcop: -// void addAuthInfo(TDEIO::AuthInfo, long); - TQString commitDialog(TQString); - int sslServerTrustPrompt(TQString certFailMsg, TQString hostname, TQString fingerPrint, TQString validfrom, TQString validuntil, TQString issuerName, TQString ascii_cert ); - TQString sslCertFile(); - TQCString sslPasswdDlg(TQString promptMsg); - -}; - -#endif diff --git a/vcs/subversion/tdevsvnd_widgets.cpp b/vcs/subversion/tdevsvnd_widgets.cpp deleted file mode 100644 index ba688423..00000000 --- a/vcs/subversion/tdevsvnd_widgets.cpp +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (C) 2007 Dukju Ahn (dukjuahn@gmail.com) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This program 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. - */ - -#include "tdevsvnd_widgets.h" -#include -#include -#include -#include - -SvnSSLTrustPrompt::SvnSSLTrustPrompt( TQWidget* parent, const char* name, bool modal, WFlags f ) - :SvnSSLTrustPromptBase( parent, name, modal, f ) - , m_code(-1) -{ - listView1->setColumnText( 0, "Items" ); - listView1->setColumnText( 1, "Values" ); - btnPermanent->setText(i18n("Accept Permanently")); - btnTemporary->setText(i18n("Accept Temporarily")); - btnReject->setText(i18n("Reject")); - connect( btnPermanent, TQT_SIGNAL(clicked()), this, TQT_SLOT(setPermanent()) ); - connect( btnTemporary, TQT_SIGNAL(clicked()), this, TQT_SLOT(setTemporary()) ); - connect( btnReject, TQT_SIGNAL(clicked()), this, TQT_SLOT(setRejected ()) ); -} -SvnSSLTrustPrompt::~SvnSSLTrustPrompt() -{} - -void SvnSSLTrustPrompt::setupCertInfo( TQString hostname, TQString fingerPrint, TQString validfrom, TQString validuntil, TQString issuerName, TQString ascii_cert ) -{ - // setup texts - TQListViewItem *host= new TQListViewItem(listView1, i18n("Hostname"), hostname ); - TQListViewItem *finger = new TQListViewItem(listView1, i18n("FingerPrint"), fingerPrint ); - TQListViewItem *validFrom = new TQListViewItem(listView1, i18n("Valid From"), validfrom ); - TQListViewItem *validUntil = new TQListViewItem(listView1, i18n("Valid Until"), validuntil ); - TQListViewItem *issName = new TQListViewItem(listView1, i18n("Issuer"), issuerName ); - TQListViewItem *cert = new TQListViewItem(listView1, i18n("Cert"), ascii_cert ); -} -void SvnSSLTrustPrompt::setupFailedReasonMsg( TQString msg ) -{ - errMsgLabel->setText( msg ); -} -int SvnSSLTrustPrompt::code() -{ - return m_code; -} - -void SvnSSLTrustPrompt::setPermanent() -{ - m_code = 1; -} - -void SvnSSLTrustPrompt::setTemporary() -{ - m_code = 0; -} - -void SvnSSLTrustPrompt::setRejected() -{ - m_code = -1; -} -#include "tdevsvnd_widgets.moc" diff --git a/vcs/subversion/tdevsvnd_widgets.h b/vcs/subversion/tdevsvnd_widgets.h deleted file mode 100644 index da7942b2..00000000 --- a/vcs/subversion/tdevsvnd_widgets.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (C) 2007 Dukju Ahn (dukjuahn@gmail.com) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public - * License as published by the Free Software Foundation; either - * version 2 of the License, or (at your option) any later version. - * - * This program 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. - */ - -#ifndef TDEVSVND_WIDGETS_H -#define TDEVSVND_WIDGETS_H - -#include "svnssltrustpromptbase.h" - -class SvnSSLTrustPrompt : public SvnSSLTrustPromptBase{ -Q_OBJECT - -public: - SvnSSLTrustPrompt( TQWidget* parent=0, const char* name=0, bool modal=true, WFlags f=0 ); - ~SvnSSLTrustPrompt(); - void setupCertInfo( TQString hostname, TQString fingerPrint, TQString validfrom, TQString validuntil, TQString issuerName, TQString ascii_cert ); - void setupFailedReasonMsg( TQString msg ); - int code(); - -public slots: - void setPermanent(); - void setTemporary(); - void setRejected(); - -protected: - // -1 for reject - // 0 for accept temporarily - // 1 for accept permanently - int m_code; -}; - -#endif