diff options
Diffstat (limited to 'parts/documentation/interfaces')
-rw-r--r-- | parts/documentation/interfaces/kdevdocumentationplugin.cpp | 58 | ||||
-rw-r--r-- | parts/documentation/interfaces/kdevdocumentationplugin.h | 28 |
2 files changed, 44 insertions, 42 deletions
diff --git a/parts/documentation/interfaces/kdevdocumentationplugin.cpp b/parts/documentation/interfaces/kdevdocumentationplugin.cpp index 3364f71a..22c375d2 100644 --- a/parts/documentation/interfaces/kdevdocumentationplugin.cpp +++ b/parts/documentation/interfaces/kdevdocumentationplugin.cpp @@ -33,30 +33,30 @@ //class DocumentationItem -DocumentationItem::DocumentationItem(DocumentationItem::Type type, KListView *parent, +DocumentationItem::DocumentationItem(DocumentationItem::Type type, KListView *tqparent, const TQString &name) - :KListViewItem(parent, name), m_type(type) + :KListViewItem(tqparent, name), m_type(type) { init(); } -DocumentationItem::DocumentationItem(DocumentationItem::Type type, KListViewItem *parent, +DocumentationItem::DocumentationItem(DocumentationItem::Type type, KListViewItem *tqparent, const TQString &name) - :KListViewItem(parent, name), m_type(type) + :KListViewItem(tqparent, name), m_type(type) { init(); } -DocumentationItem::DocumentationItem(DocumentationItem::Type type, KListView *parent, +DocumentationItem::DocumentationItem(DocumentationItem::Type type, KListView *tqparent, KListViewItem *after, const TQString &name) - :KListViewItem(parent, after, name), m_type(type) + :KListViewItem(tqparent, after, name), m_type(type) { init(); } -DocumentationItem::DocumentationItem(DocumentationItem::Type type, KListViewItem * parent, +DocumentationItem::DocumentationItem(DocumentationItem::Type type, KListViewItem * tqparent, KListViewItem * after, const TQString & name ) - :KListViewItem(parent, after, name), m_type(type) + :KListViewItem(tqparent, after, name), m_type(type) { init(); } @@ -90,8 +90,8 @@ void DocumentationItem::init( ) DocumentationCatalogItem::DocumentationCatalogItem(DocumentationPlugin* plugin, - KListView *parent, const TQString &name) - :DocumentationItem(DocumentationItem::Catalog, parent, name), m_plugin(plugin), + KListView *tqparent, const TQString &name) + :DocumentationItem(DocumentationItem::Catalog, tqparent, name), m_plugin(plugin), isLoaded(false), isActivated(false), m_isProjectDocumentationItem(false) { setExpandable(true); @@ -99,8 +99,8 @@ DocumentationCatalogItem::DocumentationCatalogItem(DocumentationPlugin* plugin, } DocumentationCatalogItem::DocumentationCatalogItem(DocumentationPlugin* plugin, - DocumentationItem *parent, const TQString &name) - :DocumentationItem(DocumentationItem::Catalog, parent, name), m_plugin(plugin), + DocumentationItem *tqparent, const TQString &name) + :DocumentationItem(DocumentationItem::Catalog, tqparent, name), m_plugin(plugin), isLoaded(false), isActivated(false), m_isProjectDocumentationItem(false) { setExpandable(true); @@ -172,7 +172,7 @@ IndexItem::List IndexItem::urls() const 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())); + urlList.append(tqMakePair((*it)->description(), (*it)->url())); return urlList; } @@ -181,9 +181,9 @@ IndexItem::List IndexItem::urls() const //class ConfigurationItem -ConfigurationItem::ConfigurationItem(TQListView *parent, DocumentationPlugin * plugin, const TQString &title, const TQString &url, +ConfigurationItem::ConfigurationItem(TQListView *tqparent, DocumentationPlugin * plugin, const TQString &title, const TQString &url, bool indexPossible, bool fullTextSearchPossible) - :TQCheckListItem(parent, "", TQCheckListItem::CheckBox), m_title(title), m_url(url), + :TQCheckListItem(tqparent, "", 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 ) @@ -209,7 +209,7 @@ void ConfigurationItem::paintCell(TQPainter *p, const TQColorGroup &cg, int colu p->fillRect(0, 0, width, height(), cg.brush(crole)); TQFontMetrics fm(lv->fontMetrics()); - int boxsize = lv->style().pixelMetric(TQStyle::PM_CheckListButtonSize, lv); + int boxsize = lv->tqstyle().tqpixelMetric(TQStyle::PM_CheckListButtonSize, lv); int marg = lv->itemMargin(); int styleflags = TQStyle::Style_Default; @@ -229,7 +229,7 @@ void ConfigurationItem::paintCell(TQPainter *p, const TQColorGroup &cg, int colu y = (fm.height() + 2 + marg - boxsize) / 2; TQStyleOption opt(this); - lv->style().drawPrimitive(TQStyle::PE_CheckListIndicator, p, + lv->tqstyle().tqdrawPrimitive(TQStyle::PE_CheckListIndicator, p, TQRect(x, y, boxsize, fm.height() + 2 + marg), cg, styleflags, opt); return; @@ -240,7 +240,7 @@ void ConfigurationItem::paintCell(TQPainter *p, const TQColorGroup &cg, int colu 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 lv->tqstyle().tqpixelMetric(TQStyle::PM_CheckListButtonSize, lv) + 4; return TQListViewItem::width(fm, lv, c); } @@ -253,8 +253,8 @@ int ConfigurationItem::width(const TQFontMetrics &fm, const TQListView *lv, int //class DocumentationPlugin -DocumentationPlugin::DocumentationPlugin(KConfig *pluginConfig, TQObject *parent, const char *name) - :TQObject(parent, name), config(pluginConfig), m_indexCreated(false) +DocumentationPlugin::DocumentationPlugin(KConfig *pluginConfig, TQObject *tqparent, const char *name) + :TQObject(tqparent, name), config(pluginConfig), m_indexCreated(false) { } @@ -462,7 +462,7 @@ void DocumentationPlugin::reinit(KListView *contents, IndexBox *index, TQStringL for (TQStringList::const_iterator it = deletedConfigurationItems.constBegin(); it != deletedConfigurationItems.constEnd(); ++it) { - if (namedCatalogs.contains(*it)) + if (namedCatalogs.tqcontains(*it)) delete namedCatalogs[*it]; } deletedConfigurationItems.clear(); @@ -472,15 +472,15 @@ void DocumentationPlugin::reinit(KListView *contents, IndexBox *index, TQStringL it != entryMap.end(); ++it) { config->setGroup("Locations"); - if (restrictions.contains(it.key()) || (!catalogEnabled(it.key()))) + if (restrictions.tqcontains(it.key()) || (!catalogEnabled(it.key()))) { - if (namedCatalogs.contains(it.key())) + if (namedCatalogs.tqcontains(it.key())) delete namedCatalogs[it.key()]; } else { kdDebug() << "updating 1" << endl; - if (!namedCatalogs.contains(it.key())) //create catalog if it does not exist + if (!namedCatalogs.tqcontains(it.key())) //create catalog if it does not exist { DocumentationCatalogItem * item = createCatalog(contents, it.key(), config->readPathEntry(it.key())); loadIndex(index, item); @@ -493,7 +493,7 @@ void DocumentationPlugin::reinit(KListView *contents, IndexBox *index, TQStringL 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()])) ) + && (!indexes.tqcontains(namedCatalogs[it.key()])) ) { kdDebug() << " index requested " << endl; loadIndex(index, namedCatalogs[it.key()]); @@ -512,7 +512,7 @@ void DocumentationPlugin::loadCatalogConfiguration(KListView *configurationView) for (TQMap<TQString, TQString>::const_iterator it = entryMap.begin(); it != entryMap.end(); ++it) { - if (namedCatalogs.contains(it.key()) + if (namedCatalogs.tqcontains(it.key()) && namedCatalogs[it.key()]->isProjectDocumentationItem()) continue; @@ -613,8 +613,8 @@ void DocumentationPlugin::setCatalogEnabled(const TQString &name, bool e) //class IndexBox -IndexBox::IndexBox(TQWidget *parent, const char *name) - :KListBox(parent, name), m_dirty(false) +IndexBox::IndexBox(TQWidget *tqparent, const char *name) + :KListBox(tqparent, name), m_dirty(false) { } @@ -630,7 +630,7 @@ void IndexBox::removeIndexItem(IndexItemProto *item) if (items[text].count() == 0) { items.remove(text); - TQListBoxItem *item = findItem(text, Qt::CaseSensitive | Qt::ExactMatch); + TQListBoxItem *item = tqfindItem(text, TQt::CaseSensitive | TQt::ExactMatch); if (item) delete item; } diff --git a/parts/documentation/interfaces/kdevdocumentationplugin.h b/parts/documentation/interfaces/kdevdocumentationplugin.h index 0c1dcf0d..fc7af7e3 100644 --- a/parts/documentation/interfaces/kdevdocumentationplugin.h +++ b/parts/documentation/interfaces/kdevdocumentationplugin.h @@ -43,10 +43,10 @@ public: Document /**<Document.*/ }; - 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); + DocumentationItem(Type type, KListView *tqparent, const TQString &name); + DocumentationItem(Type type, KListView *tqparent, KListViewItem *after, const TQString &name); + DocumentationItem(Type type, KListViewItem *tqparent, const TQString &name); + DocumentationItem(Type type, KListViewItem *tqparent, 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 TQString &name); - DocumentationCatalogItem(DocumentationPlugin* plugin, DocumentationItem *parent, const TQString &name); + DocumentationCatalogItem(DocumentationPlugin* plugin, KListView *tqparent, const TQString &name); + DocumentationCatalogItem(DocumentationPlugin* plugin, DocumentationItem *tqparent, const TQString &name); virtual ~DocumentationCatalogItem(); DocumentationPlugin* plugin() const { return m_plugin; } @@ -122,7 +122,7 @@ private: /**Documentation index item.*/ class IndexItem: public TQListBoxText { public: - typedef QPair<TQString, KURL> URL; + typedef TQPair<TQString, KURL> URL; typedef TQValueList<URL> List; IndexItem(IndexBox *listbox, const TQString &text); @@ -136,7 +136,7 @@ private: /**Documentation index view.*/ class IndexBox: public KListBox{ public: - IndexBox(TQWidget *parent = 0, const char *name = 0); + IndexBox(TQWidget *tqparent = 0, const char *name = 0); virtual void addIndexItem(IndexItemProto *item); virtual void removeIndexItem(IndexItemProto *item); @@ -158,10 +158,10 @@ class TQFontMetrics; class DocumentationPlugin; /**Documentation configuration item.*/ -class ConfigurationItem: public QCheckListItem +class ConfigurationItem: public TQCheckListItem { public: - ConfigurationItem(TQListView *parent, DocumentationPlugin * plugin, const TQString &title, const TQString &url, + ConfigurationItem(TQListView *tqparent, DocumentationPlugin * plugin, const TQString &title, const TQString &url, bool indexPossible, bool fullTextSearchPossible); virtual TQString title() const { return m_title; } @@ -214,9 +214,10 @@ 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 QObject +class DocumentationPlugin: public TQObject { Q_OBJECT + TQ_OBJECT public: /**Capability of documentation plugin.*/ enum Capability { Index=1 /**<index can be built for catalogs*/, @@ -233,7 +234,7 @@ public: setCapabilities(Index | FullTextSearch); @endcode */ - DocumentationPlugin(KConfig *pluginConfig, TQObject *parent =0, const char *name =0); + DocumentationPlugin(KConfig *pluginConfig, TQObject *tqparent =0, const char *name =0); virtual ~DocumentationPlugin(); /**Returns the i18n name of the plugin.*/ @@ -310,7 +311,7 @@ public: virtual void deleteCatalogConfiguration(const ConfigurationItem *const configurationItem); /**Returns a mode and a filter for catalog locator dialogs.*/ - virtual QPair<KFile::Mode, TQString> catalogLocatorProps() = 0; + virtual TQPair<KFile::Mode, TQString> catalogLocatorProps() = 0; /**Returns a title of catalog defined by an url parameter.*/ virtual TQString catalogTitle(const TQString &url) = 0; @@ -389,6 +390,7 @@ Represents functionality to display project documentation catalog and index in d */ class ProjectDocumentationPlugin: public TQObject { Q_OBJECT + TQ_OBJECT public: ProjectDocumentationPlugin(DocumentationPlugin *docPlugin, DocumentationPlugin::ProjectDocType type); virtual ~ProjectDocumentationPlugin(); |