diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:56:07 +0000 |
commit | d6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch) | |
tree | d109539636691d7b03036ca1c0ed29dbae6577cf /parts/documentation/interfaces | |
parent | 3331a47a9cad24795c7440ee8107143ce444ef34 (diff) | |
download | tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.tar.gz tdevelop-d6f8bbb45b267065a6907e71ff9c98bb6d161241.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdevelop@1157658 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'parts/documentation/interfaces')
-rw-r--r-- | parts/documentation/interfaces/kdevdocumentationplugin.cpp | 176 | ||||
-rw-r--r-- | parts/documentation/interfaces/kdevdocumentationplugin.h | 106 |
2 files changed, 141 insertions, 141 deletions
diff --git a/parts/documentation/interfaces/kdevdocumentationplugin.cpp b/parts/documentation/interfaces/kdevdocumentationplugin.cpp index fc63d9e8..3364f71a 100644 --- a/parts/documentation/interfaces/kdevdocumentationplugin.cpp +++ b/parts/documentation/interfaces/kdevdocumentationplugin.cpp @@ -18,11 +18,11 @@ */ #include "kdevdocumentationplugin.h" -#include <qfile.h> -#include <qpainter.h> -#include <qstyle.h> -#include <qheader.h> -#include <qtextstream.h> +#include <tqfile.h> +#include <tqpainter.h> +#include <tqstyle.h> +#include <tqheader.h> +#include <tqtextstream.h> #include <kstandarddirs.h> #include <kiconloader.h> @@ -34,28 +34,28 @@ //class DocumentationItem DocumentationItem::DocumentationItem(DocumentationItem::Type type, KListView *parent, - const QString &name) + const TQString &name) :KListViewItem(parent, name), m_type(type) { init(); } DocumentationItem::DocumentationItem(DocumentationItem::Type type, KListViewItem *parent, - const QString &name) + const TQString &name) :KListViewItem(parent, name), m_type(type) { init(); } DocumentationItem::DocumentationItem(DocumentationItem::Type type, KListView *parent, - KListViewItem *after, const QString &name) + KListViewItem *after, const TQString &name) :KListViewItem(parent, after, name), m_type(type) { init(); } DocumentationItem::DocumentationItem(DocumentationItem::Type type, KListViewItem * parent, - KListViewItem * after, const QString & name ) + KListViewItem * after, const TQString & name ) :KListViewItem(parent, after, name), m_type(type) { init(); @@ -64,7 +64,7 @@ DocumentationItem::DocumentationItem(DocumentationItem::Type type, KListViewItem void DocumentationItem::init( ) { - QString icon; + TQString icon; switch (m_type) { @@ -90,7 +90,7 @@ void DocumentationItem::init( ) DocumentationCatalogItem::DocumentationCatalogItem(DocumentationPlugin* plugin, - KListView *parent, const QString &name) + KListView *parent, const TQString &name) :DocumentationItem(DocumentationItem::Catalog, parent, name), m_plugin(plugin), isLoaded(false), isActivated(false), m_isProjectDocumentationItem(false) { @@ -99,7 +99,7 @@ DocumentationCatalogItem::DocumentationCatalogItem(DocumentationPlugin* plugin, } DocumentationCatalogItem::DocumentationCatalogItem(DocumentationPlugin* plugin, - DocumentationItem *parent, const QString &name) + DocumentationItem *parent, const TQString &name) :DocumentationItem(DocumentationItem::Catalog, parent, name), m_plugin(plugin), isLoaded(false), isActivated(false), m_isProjectDocumentationItem(false) { @@ -146,7 +146,7 @@ void DocumentationCatalogItem::activate() //class IndexItemProto IndexItemProto::IndexItemProto(DocumentationPlugin *plugin, DocumentationCatalogItem *catalog, - IndexBox *listbox, const QString &text, const QString &description) + IndexBox *listbox, const TQString &text, const TQString &description) : m_listbox(listbox), m_text(text), m_description(description) { plugin->indexes[catalog].append(this); @@ -161,16 +161,16 @@ IndexItemProto::~IndexItemProto() //class IndexItem -IndexItem::IndexItem(IndexBox *listbox, const QString &text) - :QListBoxText(listbox, text), m_listbox(listbox) +IndexItem::IndexItem(IndexBox *listbox, const TQString &text) + :TQListBoxText(listbox, text), m_listbox(listbox) { } IndexItem::List IndexItem::urls() const { List urlList; - QValueList<IndexItemProto*> itemProtos = m_listbox->items[text()]; - for (QValueList<IndexItemProto*>::const_iterator it = itemProtos.begin(); + TQValueList<IndexItemProto*> itemProtos = m_listbox->items[text()]; + for (TQValueList<IndexItemProto*>::const_iterator it = itemProtos.begin(); it != itemProtos.end(); ++it) urlList.append(qMakePair((*it)->description(), (*it)->url())); return urlList; @@ -181,9 +181,9 @@ IndexItem::List IndexItem::urls() const //class ConfigurationItem -ConfigurationItem::ConfigurationItem(QListView *parent, DocumentationPlugin * plugin, const QString &title, const QString &url, +ConfigurationItem::ConfigurationItem(TQListView *parent, DocumentationPlugin * plugin, const TQString &title, const TQString &url, bool indexPossible, bool fullTextSearchPossible) - :QCheckListItem(parent, "", QCheckListItem::CheckBox), m_title(title), m_url(url), + :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 ) @@ -192,7 +192,7 @@ ConfigurationItem::ConfigurationItem(QListView *parent, DocumentationPlugin * pl setText(4, m_url); } -void ConfigurationItem::paintCell(QPainter *p, const QColorGroup &cg, int column, +void ConfigurationItem::paintCell(TQPainter *p, const TQColorGroup &cg, int column, int width, int align) { if ( (column == 0) || (column == 1) || (column == 2) ) @@ -200,25 +200,25 @@ void ConfigurationItem::paintCell(QPainter *p, const QColorGroup &cg, int column if ( !p ) return; - QListView *lv = listView(); + TQListView *lv = listView(); if ( !lv ) return; const BackgroundMode bgmode = lv->viewport()->backgroundMode(); - const QColorGroup::ColorRole crole = QPalette::backgroundRoleFromMode( bgmode ); + const TQColorGroup::ColorRole crole = TQPalette::backgroundRoleFromMode( bgmode ); p->fillRect(0, 0, width, height(), cg.brush(crole)); - QFontMetrics fm(lv->fontMetrics()); - int boxsize = lv->style().pixelMetric(QStyle::PM_CheckListButtonSize, lv); + TQFontMetrics fm(lv->fontMetrics()); + int boxsize = lv->style().pixelMetric(TQStyle::PM_CheckListButtonSize, lv); int marg = lv->itemMargin(); - int styleflags = QStyle::Style_Default; + int styleflags = TQStyle::Style_Default; if (((column == 0) && m_contents) || ((column == 1) && m_index) || ((column == 2) && m_fullTextSearch)) - styleflags |= QStyle::Style_On; + styleflags |= TQStyle::Style_On; else - styleflags |= QStyle::Style_Off; + styleflags |= TQStyle::Style_Off; if ((column == 0) || ((column == 1) && m_indexPossible) || ((column == 2) && m_fullTextSearchPossible)) - styleflags |= QStyle::Style_Enabled; + styleflags |= TQStyle::Style_Enabled; int x = 0; int y = 0; @@ -228,20 +228,20 @@ void ConfigurationItem::paintCell(QPainter *p, const QColorGroup &cg, int column else y = (fm.height() + 2 + marg - boxsize) / 2; - QStyleOption opt(this); - lv->style().drawPrimitive(QStyle::PE_CheckListIndicator, p, - QRect(x, y, boxsize, fm.height() + 2 + marg), cg, styleflags, opt); + TQStyleOption opt(this); + lv->style().drawPrimitive(TQStyle::PE_CheckListIndicator, p, + TQRect(x, y, boxsize, fm.height() + 2 + marg), cg, styleflags, opt); return; } - QListViewItem::paintCell(p, cg, column, width, align); + TQListViewItem::paintCell(p, cg, column, width, align); } -int ConfigurationItem::width(const QFontMetrics &fm, const QListView *lv, int c) const +int ConfigurationItem::width(const TQFontMetrics &fm, const TQListView *lv, int c) const { if ((c == 0) || (c == 1) || (c == 2)) - return lv->style().pixelMetric(QStyle::PM_CheckListButtonSize, lv) + 4; - return QListViewItem::width(fm, lv, c); + return lv->style().pixelMetric(TQStyle::PM_CheckListButtonSize, lv) + 4; + return TQListViewItem::width(fm, lv, c); } @@ -253,8 +253,8 @@ int ConfigurationItem::width(const QFontMetrics &fm, const QListView *lv, int c) //class DocumentationPlugin -DocumentationPlugin::DocumentationPlugin(KConfig *pluginConfig, QObject *parent, const char *name) - :QObject(parent, name), config(pluginConfig), m_indexCreated(false) +DocumentationPlugin::DocumentationPlugin(KConfig *pluginConfig, TQObject *parent, const char *name) + :TQObject(parent, name), config(pluginConfig), m_indexCreated(false) { } @@ -277,7 +277,7 @@ void DocumentationPlugin::autoSetup() void DocumentationPlugin::reload() { clear(); - for (QValueList<DocumentationCatalogItem *>::iterator it = catalogs.begin(); + for (TQValueList<DocumentationCatalogItem *>::iterator it = catalogs.begin(); it != catalogs.end(); ++it) { createTOC(*it); @@ -286,7 +286,7 @@ void DocumentationPlugin::reload() void DocumentationPlugin::clear() { - for (QValueList<DocumentationCatalogItem *>::iterator it = catalogs.begin(); + for (TQValueList<DocumentationCatalogItem *>::iterator it = catalogs.begin(); it != catalogs.end(); ++it) { clearCatalog(*it); @@ -296,7 +296,7 @@ void DocumentationPlugin::clear() void DocumentationPlugin::clearCatalog(DocumentationCatalogItem *item) { //clear named catalog map - for (QMap<QString, DocumentationCatalogItem*>::iterator it = namedCatalogs.begin(); + for (TQMap<TQString, DocumentationCatalogItem*>::iterator it = namedCatalogs.begin(); it != namedCatalogs.end(); ++it) { if (it.data() == item) @@ -306,8 +306,8 @@ void DocumentationPlugin::clearCatalog(DocumentationCatalogItem *item) } } //clear indexes for catalog - QValueList<IndexItemProto *> idx = indexes[item]; - for (QValueList<IndexItemProto *>::iterator it = idx.begin(); it != idx.end(); ++it) + TQValueList<IndexItemProto *> idx = indexes[item]; + for (TQValueList<IndexItemProto *>::iterator it = idx.begin(); it != idx.end(); ++it) { delete *it; } @@ -322,7 +322,7 @@ void DocumentationPlugin::createIndex(IndexBox *index) if (m_indexCreated) return; - for (QValueList<DocumentationCatalogItem *>::iterator it = catalogs.begin(); + for (TQValueList<DocumentationCatalogItem *>::iterator it = catalogs.begin(); it != catalogs.end(); ++it) { loadIndex(index, *it); @@ -334,17 +334,17 @@ void DocumentationPlugin::cacheIndex(DocumentationCatalogItem *item) { kdDebug() << "Creating index cache for " << item->text(0) << endl; - QString cacheName = locateLocal("data", QString("kdevdocumentation/index/cache_") + item->text(0)); - QFile cacheFile(cacheName); + TQString cacheName = locateLocal("data", TQString("kdevdocumentation/index/cache_") + item->text(0)); + TQFile cacheFile(cacheName); if (!cacheFile.open(IO_WriteOnly)) return; - QTextStream str(&cacheFile); - str.setEncoding(QTextStream::Unicode); + TQTextStream str(&cacheFile); + str.setEncoding(TQTextStream::Unicode); str << CACHE_VERSION << endl; - QValueList<IndexItemProto*> catalogIndexes = indexes[item]; - for (QValueList<IndexItemProto*>::const_iterator it = catalogIndexes.constBegin(); + TQValueList<IndexItemProto*> catalogIndexes = indexes[item]; + for (TQValueList<IndexItemProto*>::const_iterator it = catalogIndexes.constBegin(); it != catalogIndexes.constEnd(); ++it) { str << (*it)->text() << endl; @@ -357,26 +357,26 @@ void DocumentationPlugin::cacheIndex(DocumentationCatalogItem *item) bool DocumentationPlugin::loadCachedIndex(IndexBox *index, DocumentationCatalogItem *item) { - QString cacheName = locateLocal("data", QString("kdevdocumentation/index/cache_") + item->cacheVersion() + item->text(0)); - QFile cacheFile(cacheName); + 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; - QTextStream str(&cacheFile); - str.setEncoding(QTextStream::Unicode); - QString cache = str.read(); - QStringList cacheList = QStringList::split("\n", cache, true); - QString ver = cacheList.first(); + 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; } - QStringList::const_iterator it = cacheList.begin(); + TQStringList::const_iterator it = cacheList.begin(); it++; - QString s[3]; int c = 0; + TQString s[3]; int c = 0; for (; it != cacheList.end(); ++it) { s[c] = *it; @@ -397,18 +397,18 @@ void DocumentationPlugin::addCatalog(DocumentationCatalogItem *item) { catalogs.append(item); namedCatalogs[item->text(0)] = item; -// indexes[item] = QValueList<IndexItem*>(); +// indexes[item] = TQValueList<IndexItem*>(); } void DocumentationPlugin::addCatalogConfiguration(KListView *configurationView, - const QString &title, const QString &url) + const TQString &title, const TQString &url) { new ConfigurationItem(configurationView, this, title, url, hasCapability(Index), hasCapability(FullTextSearch)); } void DocumentationPlugin::editCatalogConfiguration(ConfigurationItem *configurationItem, - const QString &title, const QString &url) + const TQString &title, const TQString &url) { configurationItem->setTitle(title); configurationItem->setURL(url); @@ -422,8 +422,8 @@ void DocumentationPlugin::deleteCatalogConfiguration(const ConfigurationItem *co void DocumentationPlugin::clearCatalogIndex(DocumentationCatalogItem *item) { //clear indexes for catalog - QValueList<IndexItemProto *> idx = indexes[item]; - for (QValueList<IndexItemProto *>::iterator it = idx.begin(); it != idx.end(); ++it) + TQValueList<IndexItemProto *> idx = indexes[item]; + for (TQValueList<IndexItemProto *>::iterator it = idx.begin(); it != idx.end(); ++it) { delete *it; } @@ -443,9 +443,9 @@ void DocumentationPlugin::loadIndex(IndexBox *index, DocumentationCatalogItem *i void DocumentationPlugin::init(KListView *contents) { config->setGroup("Locations"); - QMap<QString, QString> entryMap = config->entryMap("Locations"); + TQMap<TQString, TQString> entryMap = config->entryMap("Locations"); - for (QMap<QString, QString>::const_iterator it = entryMap.begin(); + for (TQMap<TQString, TQString>::const_iterator it = entryMap.begin(); it != entryMap.end(); ++it) { if (catalogEnabled(it.key())) @@ -453,13 +453,13 @@ void DocumentationPlugin::init(KListView *contents) } } -void DocumentationPlugin::reinit(KListView *contents, IndexBox *index, QStringList restrictions) +void DocumentationPlugin::reinit(KListView *contents, IndexBox *index, TQStringList restrictions) { config->setGroup("Locations"); - QMap<QString, QString> entryMap = config->entryMap("Locations"); + TQMap<TQString, TQString> entryMap = config->entryMap("Locations"); //remove deleted in configuration catalogs - for (QStringList::const_iterator it = deletedConfigurationItems.constBegin(); + for (TQStringList::const_iterator it = deletedConfigurationItems.constBegin(); it != deletedConfigurationItems.constEnd(); ++it) { if (namedCatalogs.contains(*it)) @@ -468,7 +468,7 @@ void DocumentationPlugin::reinit(KListView *contents, IndexBox *index, QStringLi deletedConfigurationItems.clear(); //update configuration - for (QMap<QString, QString>::const_iterator it = entryMap.begin(); + for (TQMap<TQString, TQString>::const_iterator it = entryMap.begin(); it != entryMap.end(); ++it) { config->setGroup("Locations"); @@ -507,9 +507,9 @@ void DocumentationPlugin::reinit(KListView *contents, IndexBox *index, QStringLi void DocumentationPlugin::loadCatalogConfiguration(KListView *configurationView) { config->setGroup("Locations"); - QMap<QString, QString> entryMap = config->entryMap("Locations"); + TQMap<TQString, TQString> entryMap = config->entryMap("Locations"); - for (QMap<QString, QString>::const_iterator it = entryMap.begin(); + for (TQMap<TQString, TQString>::const_iterator it = entryMap.begin(); it != entryMap.end(); ++it) { if (namedCatalogs.contains(it.key()) @@ -533,13 +533,13 @@ void DocumentationPlugin::saveCatalogConfiguration(KListView *configurationView) { config->setGroup("Locations"); - for (QStringList::const_iterator it = deletedConfigurationItems.constBegin(); + for (TQStringList::const_iterator it = deletedConfigurationItems.constBegin(); it != deletedConfigurationItems.constEnd(); ++it) { config->deleteEntry(*it); } - QListViewItemIterator it(configurationView); + TQListViewItemIterator it(configurationView); while (it.current()) { ConfigurationItem *confItem = dynamic_cast<ConfigurationItem*>(it.current()); @@ -576,7 +576,7 @@ void DocumentationPlugin::saveCatalogConfiguration(KListView *configurationView) void DocumentationPlugin::setIndexEnabled( DocumentationCatalogItem * item, bool e ) { - QString group = config->group(); + TQString group = config->group(); config->setGroup("Index Settings"); config->writeEntry(item->text(0), e); config->setGroup(group); @@ -584,25 +584,25 @@ void DocumentationPlugin::setIndexEnabled( DocumentationCatalogItem * item, bool bool DocumentationPlugin::indexEnabled( DocumentationCatalogItem * item ) const { - QString group = config->group(); + 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 QString &name) const +bool DocumentationPlugin::catalogEnabled(const TQString &name) const { - QString group = config->group(); + TQString group = config->group(); config->setGroup("TOC Settings"); bool b = config->readBoolEntry(name, true); config->setGroup(group); return b; } -void DocumentationPlugin::setCatalogEnabled(const QString &name, bool e) +void DocumentationPlugin::setCatalogEnabled(const TQString &name, bool e) { - QString group = config->group(); + TQString group = config->group(); config->setGroup("TOC Settings"); config->writeEntry(name, e); config->setGroup(group); @@ -613,7 +613,7 @@ void DocumentationPlugin::setCatalogEnabled(const QString &name, bool e) //class IndexBox -IndexBox::IndexBox(QWidget *parent, const char *name) +IndexBox::IndexBox(TQWidget *parent, const char *name) :KListBox(parent, name), m_dirty(false) { } @@ -625,12 +625,12 @@ void IndexBox::addIndexItem(IndexItemProto *item) void IndexBox::removeIndexItem(IndexItemProto *item) { - QString text = item->text(); + TQString text = item->text(); items[text].remove(item); if (items[text].count() == 0) { items.remove(text); - QListBoxItem *item = findItem(text, Qt::CaseSensitive | Qt::ExactMatch); + TQListBoxItem *item = findItem(text, Qt::CaseSensitive | Qt::ExactMatch); if (item) delete item; } @@ -638,7 +638,7 @@ void IndexBox::removeIndexItem(IndexItemProto *item) void IndexBox::fill() { - for (QMap<QString, QValueList<IndexItemProto*> >::const_iterator it = items.begin(); + for (TQMap<TQString, TQValueList<IndexItemProto*> >::const_iterator it = items.begin(); it != items.end(); ++it) { new IndexItem(this, it.key()); @@ -662,12 +662,12 @@ void IndexBox::refill() ProjectDocumentationPlugin::ProjectDocumentationPlugin(DocumentationPlugin *docPlugin, DocumentationPlugin::ProjectDocType type) - :QObject(0, 0), m_docPlugin(docPlugin), m_catalog(0), m_type(type), m_contents(0), m_index(0) + :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, SIGNAL(dirty(const QString&)), this, SLOT(reinit())); + connect(m_watch, TQT_SIGNAL(dirty(const TQString&)), this, TQT_SLOT(reinit())); m_watch->startScan(); } @@ -676,7 +676,7 @@ ProjectDocumentationPlugin::~ProjectDocumentationPlugin() deinit(); } -void ProjectDocumentationPlugin::init(KListView *contents, IndexBox *index, const QString &url) +void ProjectDocumentationPlugin::init(KListView *contents, IndexBox *index, const TQString &url) { m_contents = contents; m_index = index; @@ -708,12 +708,12 @@ void ProjectDocumentationPlugin::deinit() m_catalog = 0; } -QString ProjectDocumentationPlugin::pluginName() const +TQString ProjectDocumentationPlugin::pluginName() const { return m_docPlugin->pluginName(); } -QString ProjectDocumentationPlugin::catalogURL() const +TQString ProjectDocumentationPlugin::catalogURL() const { return m_url; } diff --git a/parts/documentation/interfaces/kdevdocumentationplugin.h b/parts/documentation/interfaces/kdevdocumentationplugin.h index 5d905085..658a4e7a 100644 --- a/parts/documentation/interfaces/kdevdocumentationplugin.h +++ b/parts/documentation/interfaces/kdevdocumentationplugin.h @@ -19,9 +19,9 @@ #ifndef KDEV_DOC_PLUGIN_H #define KDEV_DOC_PLUGIN_H -#include <qmap.h> -#include <qvaluelist.h> -#include <qpair.h> +#include <tqmap.h> +#include <tqvaluelist.h> +#include <tqpair.h> #include <klistbox.h> #include <klistview.h> @@ -43,10 +43,10 @@ public: Document /**<Document.*/ }; - DocumentationItem(Type type, KListView *parent, const QString &name); - DocumentationItem(Type type, KListView *parent, KListViewItem *after, const QString &name); - DocumentationItem(Type type, KListViewItem *parent, const QString &name); - DocumentationItem(Type type, KListViewItem *parent, KListViewItem *after, const QString &name); + DocumentationItem(Type type, KListView *parent, const TQString &name); + DocumentationItem(Type type, KListView *parent, KListViewItem *after, const TQString &name); + DocumentationItem(Type type, KListViewItem *parent, const TQString &name); + DocumentationItem(Type type, KListViewItem *parent, KListViewItem *after, const TQString &name); virtual void setURL(const KURL &url) { m_url = url; } virtual KURL url() const { return m_url; } @@ -72,8 +72,8 @@ class DocumentationPlugin; class DocumentationCatalogItem: public DocumentationItem { public: - DocumentationCatalogItem(DocumentationPlugin* plugin, KListView *parent, const QString &name); - DocumentationCatalogItem(DocumentationPlugin* plugin, DocumentationItem *parent, const QString &name); + DocumentationCatalogItem(DocumentationPlugin* plugin, KListView *parent, const TQString &name); + DocumentationCatalogItem(DocumentationPlugin* plugin, DocumentationItem *parent, const TQString &name); virtual ~DocumentationCatalogItem(); DocumentationPlugin* plugin() const { return m_plugin; } @@ -84,7 +84,7 @@ public: virtual bool isProjectDocumentationItem() const { return m_isProjectDocumentationItem; } virtual void setProjectDocumentationItem(bool b) { m_isProjectDocumentationItem = b; } - virtual QString cacheVersion() const { return ""; } /// should return a short string that identifies the version of the catalog + virtual TQString cacheVersion() const { return ""; } /// should return a short string that identifies the version of the catalog protected: virtual void activate(); @@ -104,28 +104,28 @@ class IndexItemProto { public: IndexItemProto(DocumentationPlugin *plugin, DocumentationCatalogItem *catalog, IndexBox *listbox, - const QString &text, const QString &description); + const TQString &text, const TQString &description); ~IndexItemProto(); void addURL(const KURL &url) { m_url = url; } KURL url() const { return m_url; } - QString text() const { return m_text; } - QString description() const { return m_description; } + TQString text() const { return m_text; } + TQString description() const { return m_description; } private: KURL m_url; IndexBox *m_listbox; - QString m_text; - QString m_description; + TQString m_text; + TQString m_description; }; /**Documentation index item.*/ -class IndexItem: public QListBoxText { +class IndexItem: public TQListBoxText { public: - typedef QPair<QString, KURL> URL; - typedef QValueList<URL> List; + typedef QPair<TQString, KURL> URL; + typedef TQValueList<URL> List; - IndexItem(IndexBox *listbox, const QString &text); + IndexItem(IndexBox *listbox, const TQString &text); List urls() const; @@ -136,17 +136,17 @@ private: /**Documentation index view.*/ class IndexBox: public KListBox{ public: - IndexBox(QWidget *parent = 0, const char *name = 0); + 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(QValueList<IndexItemProto*> &items); +// virtual void refill(TQValueList<IndexItemProto*> &items); private: - QMap<QString, QValueList<IndexItemProto*> > items; + TQMap<TQString, TQValueList<IndexItemProto*> > items; friend class IndexItem; bool m_dirty; @@ -161,19 +161,19 @@ class DocumentationPlugin; class ConfigurationItem: public QCheckListItem { public: - ConfigurationItem(QListView *parent, DocumentationPlugin * plugin, const QString &title, const QString &url, + ConfigurationItem(TQListView *parent, DocumentationPlugin * plugin, const TQString &title, const TQString &url, bool indexPossible, bool fullTextSearchPossible); - virtual QString title() const { return m_title; } - virtual void setTitle(const QString title) { setText(3, m_title = title); } - virtual QString url() const { return m_url; } - virtual void setURL(const QString url) { setText(4, m_url = url); } + 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 QString origTitle() const {return m_origTitle; } + virtual TQString origTitle() const {return m_origTitle; } - virtual void paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int align); - virtual int width(const QFontMetrics &fm, const QListView *lv, int c) const; + 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; } @@ -188,9 +188,9 @@ public: DocumentationPlugin * docPlugin() { return m_docPlugin; } private: - QString m_title; - QString m_url; - QString m_origTitle; + TQString m_title; + TQString m_url; + TQString m_origTitle; bool m_contents; bool m_index; @@ -233,14 +233,14 @@ public: setCapabilities(Index | FullTextSearch); @endcode */ - DocumentationPlugin(KConfig *pluginConfig, QObject *parent =0, const char *name =0); + DocumentationPlugin(KConfig *pluginConfig, TQObject *parent =0, const char *name =0); virtual ~DocumentationPlugin(); /**Returns the i18n name of the plugin.*/ - virtual QString pluginName() const = 0; + virtual TQString pluginName() const = 0; /**Creates documentation catalog with given title and url.*/ - virtual DocumentationCatalogItem *createCatalog(KListView *contents, const QString &title, const QString &url) = 0; + virtual DocumentationCatalogItem *createCatalog(KListView *contents, const TQString &title, const TQString &url) = 0; /**Initialize a list of catalogs. @param contents the listview to fill with catalogs @@ -252,7 +252,7 @@ public: @param index the listbox with index to update @param restrictions the list of catalogs names to remove */ - virtual void reinit(KListView *contents, IndexBox *index, QStringList restrictions); + virtual void reinit(KListView *contents, IndexBox *index, TQStringList restrictions); /**Initializes plugin configuration. Documentation plugins should be able to initialize the default configuration on startup without any user interaction. Call this in the constructor of your plugin.*/ @@ -263,9 +263,9 @@ public: /**Indicates if a catalog with specified name is enabled. Documentation plugin should check this and do not load catalogs disabled in configuration. All catalogs are enabled by default.*/ - virtual bool catalogEnabled(const QString &name) const; + virtual bool catalogEnabled(const TQString &name) const; /**Enables or disables documentation catalog.*/ - virtual void setCatalogEnabled(const QString &name, bool e); + virtual void setCatalogEnabled(const TQString &name, bool e); /**Indicates if an index of given catalog should be rebuilt. This method is used by index caching algorythm to make a descision to rebuild index @@ -292,7 +292,7 @@ public: clicks the documentation item. If it is too much overhead to determine the documentation catalog url in @ref createCatalog method then you can set it here.*/ virtual void setCatalogURL(DocumentationCatalogItem *item) = 0; - virtual QStringList fullTextSearchLocations() = 0; + virtual TQStringList fullTextSearchLocations() = 0; /**Loads catalog configuration and fills configurationView with ConfigurationItem objects.*/ virtual void loadCatalogConfiguration(KListView *configurationView); @@ -302,17 +302,17 @@ public: virtual void saveCatalogConfiguration(KListView *configurationView); /**Adds new catalog to a configuration.*/ virtual void addCatalogConfiguration(KListView *configurationView, - const QString &title, const QString &url); + const TQString &title, const TQString &url); /**Edits catalog configuration.*/ virtual void editCatalogConfiguration(ConfigurationItem *configurationItem, - const QString &title, const QString &url); + const TQString &title, const TQString &url); /**Removes catalog from configuration. configurationItem should not be removed here.*/ virtual void deleteCatalogConfiguration(const ConfigurationItem *const configurationItem); /**Returns a mode and a filter for catalog locator dialogs.*/ - virtual QPair<KFile::Mode, QString> catalogLocatorProps() = 0; + virtual QPair<KFile::Mode, TQString> catalogLocatorProps() = 0; /**Returns a title of catalog defined by an url parameter.*/ - virtual QString catalogTitle(const QString &url) = 0; + virtual TQString catalogTitle(const TQString &url) = 0; /**Reloads documentation catalogs and indices.*/ virtual void reload(); @@ -347,11 +347,11 @@ public slots: protected: /**A list of loaded documentation catalogs.*/ - QValueList<DocumentationCatalogItem*> catalogs; + TQValueList<DocumentationCatalogItem*> catalogs; /**A map of names of loaded documentation catalogs.*/ - QMap<QString, DocumentationCatalogItem*> namedCatalogs; + TQMap<TQString, DocumentationCatalogItem*> namedCatalogs; /**A map of indices of loaded documentation catalogs.*/ - QMap<DocumentationCatalogItem*, QValueList<IndexItemProto*> > indexes; + TQMap<DocumentationCatalogItem*, TQValueList<IndexItemProto*> > indexes; /**Sets capabilities of documentation plugin.*/ void setCapabilities(int caps) { m_capabilities = caps; } @@ -362,7 +362,7 @@ protected: /**Stores items deleted from configuration. @ref saveCatalogConfiguration uses this to remove entries from configuration file.*/ - QStringList deletedConfigurationItems; + TQStringList deletedConfigurationItems; /**Configuration object used by a plugin.*/ KConfig *config; @@ -387,19 +387,19 @@ friend class DocumentationCatalogItem; Represents functionality to display project documentation catalog and index in documentation browser. */ -class ProjectDocumentationPlugin: public QObject { +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(KListView *contents, IndexBox *index, const QString &url); + virtual void init(KListView *contents, IndexBox *index, const TQString &url); /**Deinitializes project documentation plugin - removes documentation catalog.*/ virtual void deinit(); - QString pluginName() const; - QString catalogURL() const; + TQString pluginName() const; + TQString catalogURL() const; public slots: /**Performs reinitialization if project documentation has changed (after building api documentation).*/ @@ -415,7 +415,7 @@ private: class KDirWatch *m_watch; class KListView *m_contents; class IndexBox *m_index; - QString m_url; + TQString m_url; }; #endif |