summaryrefslogtreecommitdiffstats
path: root/parts/documentation/documentation_part.cpp
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2014-05-25 15:37:31 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2014-05-25 15:37:31 +0900
commit6392f5a9dfce2bf83617d49bb7f332181ec6004e (patch)
treeab69e390f7962b7e7dda1a3a64f035c61c751cf4 /parts/documentation/documentation_part.cpp
parentaba2788b428dc53243407902e9ccbb20b97a69fd (diff)
downloadtdevelop-6392f5a9dfce2bf83617d49bb7f332181ec6004e.tar.gz
tdevelop-6392f5a9dfce2bf83617d49bb7f332181ec6004e.zip
Revert "Finish renaming tdevelop components"
This reverts commit 722ce1efbac31c61b1d4b13f7e075c9f311e3e73.
Diffstat (limited to 'parts/documentation/documentation_part.cpp')
-rw-r--r--parts/documentation/documentation_part.cpp111
1 files changed, 50 insertions, 61 deletions
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 <twin.h>
#include <tdetexteditor/document.h>
-#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<DocumentationPart> DocumentationFactory;
-K_EXPORT_COMPONENT_FACTORY( libtdevdocumentation, DocumentationFactory( data ) )
+typedef KDevGenericFactory<DocumentationPart> 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("<b>Open the TDevelop Programming Handbook</b><p>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<KTextEditor::Document*>( partController()->activePart() ) );
+ TQString word = KDevEditorUtil::currentWord( dynamic_cast<KTextEditor::Document*>( 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<KTextEditor::Document*>( partController()->activePart() ) );
+ TQString word = KDevEditorUtil::currentWord( dynamic_cast<KTextEditor::Document*>( 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<KTextEditor::Document*>( partController()->activePart() ) );
+ TQString word = KDevEditorUtil::currentWord( dynamic_cast<KTextEditor::Document*>( 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<KTextEditor::Document*>( partController()->activePart() ) );
+ TQString word = KDevEditorUtil::currentWord( dynamic_cast<KTextEditor::Document*>( 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<KTextEditor::Document*>( partController()->activePart() ) );
+ TQString word = KDevEditorUtil::currentWord( dynamic_cast<KTextEditor::Document*>( 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<DocumentationPlugin*>::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)