diff options
Diffstat (limited to 'parts/documentation/plugins/qt/docqtplugin.cpp')
-rw-r--r-- | parts/documentation/plugins/qt/docqtplugin.cpp | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/parts/documentation/plugins/qt/docqtplugin.cpp b/parts/documentation/plugins/qt/docqtplugin.cpp index b4118f97..5efe880f 100644 --- a/parts/documentation/plugins/qt/docqtplugin.cpp +++ b/parts/documentation/plugins/qt/docqtplugin.cpp @@ -37,17 +37,17 @@ #include "../../../../config.h" -class QtDocumentationCatalogItem: public DocumentationCatalogItem +class TQtDocumentationCatalogItem: public DocumentationCatalogItem { public: - QtDocumentationCatalogItem(const TQString &dcfFile, DocumentationPlugin* plugin, - KListView *parent, const TQString &name) - :DocumentationCatalogItem(plugin, parent, name), m_dcfFile(dcfFile) + TQtDocumentationCatalogItem(const TQString &dcfFile, DocumentationPlugin* plugin, + KListView *tqparent, const TQString &name) + :DocumentationCatalogItem(plugin, tqparent, name), m_dcfFile(dcfFile) { } - QtDocumentationCatalogItem(const TQString &dcfFile, DocumentationPlugin* plugin, - DocumentationItem *parent, const TQString &name) - :DocumentationCatalogItem(plugin, parent, name), m_dcfFile(dcfFile) + TQtDocumentationCatalogItem(const TQString &dcfFile, DocumentationPlugin* plugin, + DocumentationItem *tqparent, const TQString &name) + :DocumentationCatalogItem(plugin, tqparent, name), m_dcfFile(dcfFile) { } TQString dcfFile() const { return m_dcfFile; } @@ -57,23 +57,23 @@ private: }; static const KDevPluginInfo data("docqtplugin"); -typedef KDevGenericFactory<DocQtPlugin> DocQtPluginFactory; -K_EXPORT_COMPONENT_FACTORY( libdocqtplugin, DocQtPluginFactory(data) ) +typedef KDevGenericFactory<DocTQtPlugin> DocTQtPluginFactory; +K_EXPORT_COMPONENT_FACTORY( libdocqtplugin, DocTQtPluginFactory(data) ) -DocQtPlugin::DocQtPlugin(TQObject* parent, const char* name, const TQStringList) - :DocumentationPlugin(DocQtPluginFactory::instance()->config(), parent, name) +DocTQtPlugin::DocTQtPlugin(TQObject* tqparent, const char* name, const TQStringList) + :DocumentationPlugin(DocTQtPluginFactory::instance()->config(), tqparent, name) { setCapabilities(Index | FullTextSearch | CustomDocumentationTitles); autoSetup(); } -DocQtPlugin::~DocQtPlugin() +DocTQtPlugin::~DocTQtPlugin() { } -void DocQtPlugin::createTOC(DocumentationCatalogItem *item) +void DocTQtPlugin::createTOC(DocumentationCatalogItem *item) { - QtDocumentationCatalogItem *qtItem = dynamic_cast<QtDocumentationCatalogItem *>(item); + TQtDocumentationCatalogItem *qtItem = dynamic_cast<TQtDocumentationCatalogItem *>(item); if (!qtItem) return; @@ -135,32 +135,32 @@ void DocQtPlugin::createTOC(DocumentationCatalogItem *item) } } -void DocQtPlugin::autoSetupPlugin() +void DocTQtPlugin::autoSetupPlugin() { TQString qtDocDir(QT_DOCDIR); qtDocDir = URLUtil::envExpand(qtDocDir); if (qtDocDir.isEmpty()) { - qtDocDir = getenv("QTDIR"); + qtDocDir = getenv("TQTDIR"); } if (!qtDocDir.isEmpty()) { config->setGroup("Search Settings"); - config->writeEntry("Qt Reference Documentation", true); + config->writeEntry("TQt Reference Documentation", true); config->setGroup("Index Settings"); - config->writeEntry("Qt Reference Documentation", true); + config->writeEntry("TQt Reference Documentation", true); config->setGroup("Locations"); - config->writePathEntry("Qt Reference Documentation", qtDocDir + TQString("/qt.dcf")); - config->writePathEntry("Qt Assistant Manual", qtDocDir + TQString("/assistant.dcf")); - config->writePathEntry("Qt Designer Manual", qtDocDir + TQString("/designer.dcf")); - config->writePathEntry("Guide to the Qt Translation Tools", qtDocDir + TQString("/linguist.dcf")); + config->writePathEntry("TQt Reference Documentation", qtDocDir + TQString("/qt.dcf")); + config->writePathEntry("TQt Assistant Manual", qtDocDir + TQString("/assistant.dcf")); + config->writePathEntry("TQt Designer Manual", qtDocDir + TQString("/designer.dcf")); + config->writePathEntry("Guide to the TQt Translation Tools", qtDocDir + TQString("/linguist.dcf")); config->writePathEntry("qmake User Guide", qtDocDir + TQString("/qmake.dcf")); } } -void DocQtPlugin::setCatalogURL(DocumentationCatalogItem *item) +void DocTQtPlugin::setCatalogURL(DocumentationCatalogItem *item) { - QtDocumentationCatalogItem *qtItem = dynamic_cast<QtDocumentationCatalogItem *>(item); + TQtDocumentationCatalogItem *qtItem = dynamic_cast<TQtDocumentationCatalogItem *>(item); if (!qtItem) return; @@ -185,19 +185,19 @@ void DocQtPlugin::setCatalogURL(DocumentationCatalogItem *item) if (item->url().isEmpty()) { - KURL url(fi.dirPath(true) + "/" + docEl.attribute("ref", TQString::null)); + KURL url(fi.dirPath(true) + "/" + docEl.attribute("ref", TQString())); item->setURL(url); } } -TQString DocQtPlugin::pluginName() const +TQString DocTQtPlugin::pluginName() const { - return i18n("Qt Documentation Collection"); + return i18n("TQt Documentation Collection"); } -bool DocQtPlugin::needRefreshIndex(DocumentationCatalogItem *item) +bool DocTQtPlugin::needRefreshIndex(DocumentationCatalogItem *item) { - QtDocumentationCatalogItem *qtItem = dynamic_cast<QtDocumentationCatalogItem *>(item); + TQtDocumentationCatalogItem *qtItem = dynamic_cast<TQtDocumentationCatalogItem *>(item); if (!qtItem) return false; @@ -213,9 +213,9 @@ bool DocQtPlugin::needRefreshIndex(DocumentationCatalogItem *item) return false; } -void DocQtPlugin::createIndex(IndexBox *index, DocumentationCatalogItem *item) +void DocTQtPlugin::createIndex(IndexBox *index, DocumentationCatalogItem *item) { - QtDocumentationCatalogItem *qtItem = dynamic_cast<QtDocumentationCatalogItem *>(item); + TQtDocumentationCatalogItem *qtItem = dynamic_cast<TQtDocumentationCatalogItem *>(item); if (!qtItem) return; @@ -249,10 +249,10 @@ void DocQtPlugin::createIndex(IndexBox *index, DocumentationCatalogItem *item) } } -void DocQtPlugin::createSectionIndex(TQFileInfo &fi, IndexBox *index, DocumentationCatalogItem *item, +void DocTQtPlugin::createSectionIndex(TQFileInfo &fi, IndexBox *index, DocumentationCatalogItem *item, TQDomElement section) { - //adymo: do not load section to index for Qt reference documentation + //adymo: do not load section to index for TQt reference documentation TQString title = section.attribute("title"); if (fi.fileName() != "qt.dcf") { @@ -285,7 +285,7 @@ void DocQtPlugin::createSectionIndex(TQFileInfo &fi, IndexBox *index, Documentat } } -TQStringList DocQtPlugin::fullTextSearchLocations() +TQStringList DocTQtPlugin::fullTextSearchLocations() { TQStringList locs; @@ -306,34 +306,34 @@ TQStringList DocQtPlugin::fullTextSearchLocations() return locs; } -QPair<KFile::Mode, TQString> DocQtPlugin::catalogLocatorProps() +TQPair<KFile::Mode, TQString> DocTQtPlugin::catalogLocatorProps() { - return QPair<KFile::Mode, TQString>(KFile::File, "*.xml *.dcf"); + return TQPair<KFile::Mode, TQString>(KFile::File, "*.xml *.dcf"); } -TQString DocQtPlugin::catalogTitle(const TQString &url) +TQString DocTQtPlugin::catalogTitle(const TQString &url) { TQFileInfo fi(url); if (!fi.exists()) - return TQString::null; + return TQString(); TQFile f(url); if (!f.open(IO_ReadOnly)) - return TQString::null; + return TQString(); TQDomDocument doc; if (!doc.setContent(&f) || (doc.doctype().name() != "DCF")) - return TQString::null; + return TQString(); f.close(); TQDomElement docEl = doc.documentElement(); - return docEl.attribute("title", TQString::null); + return docEl.attribute("title", TQString()); } -DocumentationCatalogItem *DocQtPlugin::createCatalog(KListView *contents, const TQString &title, const TQString &url) +DocumentationCatalogItem *DocTQtPlugin::createCatalog(KListView *contents, const TQString &title, const TQString &url) { - return new QtDocumentationCatalogItem(url, this, contents, title); + return new TQtDocumentationCatalogItem(url, this, contents, title); } #include "docqtplugin.moc" |