summaryrefslogtreecommitdiffstats
path: root/quanta/treeviews/doctreeview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'quanta/treeviews/doctreeview.cpp')
-rw-r--r--quanta/treeviews/doctreeview.cpp74
1 files changed, 37 insertions, 37 deletions
diff --git a/quanta/treeviews/doctreeview.cpp b/quanta/treeviews/doctreeview.cpp
index fd9abf65..d0234faf 100644
--- a/quanta/treeviews/doctreeview.cpp
+++ b/quanta/treeviews/doctreeview.cpp
@@ -16,10 +16,10 @@
***************************************************************************/
// QT clases
-#include <qstrlist.h>
-#include <qheader.h>
-#include <qpixmap.h>
-#include <qdir.h>
+#include <tqstrlist.h>
+#include <tqheader.h>
+#include <tqpixmap.h>
+#include <tqdir.h>
// KDE clases
#include <kconfig.h>
@@ -35,11 +35,11 @@
#include "docfolder.h"
#include "docitem.h"
-DocTreeView::DocTreeView(QWidget *parent, const char *name )
+DocTreeView::DocTreeView(TQWidget *parent, const char *name )
: KListView(parent,name)
{
- contextHelpDict = new QDict<QString>( 101, false );
+ contextHelpDict = new TQDict<TQString>( 101, false );
setRootIsDecorated( true );
header()->hide();
@@ -54,17 +54,17 @@ DocTreeView::DocTreeView(QWidget *parent, const char *name )
projectDocFolder = new KListViewItem(this, i18n("Project Documentation"));
projectDocFolder->setOpen(true);
slotRefreshTree();
- setFocusPolicy(QWidget::ClickFocus);
+ setFocusPolicy(TQWidget::ClickFocus);
- connect(this, SIGNAL(executed(QListViewItem *)), SLOT(clickItem(QListViewItem *)) );
- connect(this, SIGNAL(returnPressed(QListViewItem *)), SLOT(clickItem(QListViewItem *)));
- connect(this, SIGNAL(doubleClicked(QListViewItem *)), SLOT(slotDoubleClicked(QListViewItem *)));
+ connect(this, TQT_SIGNAL(executed(TQListViewItem *)), TQT_SLOT(clickItem(TQListViewItem *)) );
+ connect(this, TQT_SIGNAL(returnPressed(TQListViewItem *)), TQT_SLOT(clickItem(TQListViewItem *)));
+ connect(this, TQT_SIGNAL(doubleClicked(TQListViewItem *)), TQT_SLOT(slotDoubleClicked(TQListViewItem *)));
m_contextMenu = new KPopupMenu(this);
- m_menuReload = m_contextMenu->insertItem(i18n("&Reload"), this, SLOT(slotReloadProjectDocs()));
- m_contextMenu->insertItem(SmallIcon("network"), i18n("&Download Documentation..."), this, SIGNAL(downloadDoc()));
- connect(this, SIGNAL(contextMenu(KListView*, QListViewItem*, const QPoint&)),
- this, SLOT(slotMenu(KListView*, QListViewItem*, const QPoint&)));
+ m_menuReload = m_contextMenu->insertItem(i18n("&Reload"), this, TQT_SLOT(slotReloadProjectDocs()));
+ m_contextMenu->insertItem(SmallIcon("network"), i18n("&Download Documentation..."), this, TQT_SIGNAL(downloadDoc()));
+ connect(this, TQT_SIGNAL(contextMenu(KListView*, TQListViewItem*, const TQPoint&)),
+ this, TQT_SLOT(slotMenu(KListView*, TQListViewItem*, const TQPoint&)));
}
@@ -75,41 +75,41 @@ DocTreeView::~DocTreeView(){
void DocTreeView::slotRefreshTree()
{
- for (QValueList<DocFolder *>::Iterator it = m_folderList.begin(); it != m_folderList.end(); ++it)
+ for (TQValueList<DocFolder *>::Iterator it = m_folderList.begin(); it != m_folderList.end(); ++it)
{
delete *it;
}
m_folderList.clear();
- QStringList docDirs = KGlobal::instance()->dirs()->findDirs("appdata", "doc");
+ TQStringList docDirs = KGlobal::instance()->dirs()->findDirs("appdata", "doc");
- for ( QStringList::Iterator it = docDirs.begin(); it != docDirs.end(); ++it )
+ for ( TQStringList::Iterator it = docDirs.begin(); it != docDirs.end(); ++it )
{
- QString docDir = *it;
- QDir dir(docDir, "*.docrc");
- QStringList files = dir.entryList();
+ TQString docDir = *it;
+ TQDir dir(docDir, "*.docrc");
+ TQStringList files = dir.entryList();
- for ( QStringList::Iterator it_f = files.begin(); it_f != files.end(); ++it_f )
+ for ( TQStringList::Iterator it_f = files.begin(); it_f != files.end(); ++it_f )
{
KConfig config( docDir + *it_f );
config.setGroup("Tree");
- QString relDocDir = config.readEntry("Doc dir");
- QString name = config.readEntry("Name").lower();
+ TQString relDocDir = config.readEntry("Doc dir");
+ TQString name = config.readEntry("Name").lower();
- DocFolder *folder = new DocFolder(this, config.readEntry("Top Element"), &config , QDir::cleanDirPath(docDir+relDocDir)+"/");
+ DocFolder *folder = new DocFolder(this, config.readEntry("Top Element"), &config , TQDir::cleanDirPath(docDir+relDocDir)+"/");
folder->setPixmap( 0, SmallIcon("folder_open") );
folder->topLevel = true;
folder->setOpen(true);
m_folderList.append(folder);
config.setGroup("Context");
- QStrList list;
+ TQStrList list;
config.readListEntry("ContextList", list );
for ( unsigned int i=0; i<list.count(); i++ )
{
- QString keyword = list.at(i);
- QString *url = new QString(QDir::cleanDirPath(docDir + relDocDir + "/" + config.readEntry( list.at(i) )));
+ TQString keyword = list.at(i);
+ TQString *url = new TQString(TQDir::cleanDirPath(docDir + relDocDir + "/" + config.readEntry( list.at(i) )));
contextHelpDict->insert( name + "|" + keyword, url );
}
}
@@ -117,9 +117,9 @@ void DocTreeView::slotRefreshTree()
}
-void DocTreeView::clickItem( QListViewItem *)
+void DocTreeView::clickItem( TQListViewItem *)
{
- QListViewItem *it = currentItem();
+ TQListViewItem *it = currentItem();
if ( !it )
return;
DocItem *dit = dynamic_cast< DocItem *>(it);
@@ -136,16 +136,16 @@ void DocTreeView::clickItem( QListViewItem *)
}
-QString * DocTreeView::contextHelp(const QString &keyword)
+TQString * DocTreeView::contextHelp(const TQString &keyword)
{
- QString word = keyword.mid(keyword.find("|"));
+ TQString word = keyword.mid(keyword.find("|"));
if (contextHelpDict->find(keyword))
return contextHelpDict->find(keyword);
else
return contextHelpDict->find(word); //to support old documentation packages
}
-void DocTreeView::slotDoubleClicked(QListViewItem *item )
+void DocTreeView::slotDoubleClicked(TQListViewItem *item )
{
if (item)
{
@@ -155,13 +155,13 @@ void DocTreeView::slotDoubleClicked(QListViewItem *item )
void DocTreeView::slotAddProjectDoc(const KURL& url)
{
- QString path = url.path();
+ TQString path = url.path();
int pos = path.find("/doc/");
path = path.mid(pos + 5);
new DocItem(projectDocFolder, path, url.url());
}
-void DocTreeView::slotMenu(KListView *, QListViewItem *item, const QPoint &point)
+void DocTreeView::slotMenu(KListView *, TQListViewItem *item, const TQPoint &point)
{
m_contextMenu->setItemVisible(m_menuReload, false);
if (item)
@@ -175,16 +175,16 @@ void DocTreeView::slotMenu(KListView *, QListViewItem *item, const QPoint &point
m_contextMenu->popup(point);
}
-void DocTreeView::slotNewProjectLoaded(const QString &, const KURL &, const KURL &)
+void DocTreeView::slotNewProjectLoaded(const TQString &, const KURL &, const KURL &)
{
slotReloadProjectDocs();
}
void DocTreeView::slotReloadProjectDocs()
{
- QListViewItem *child = projectDocFolder->firstChild();
+ TQListViewItem *child = projectDocFolder->firstChild();
while (child) {
- QListViewItem *c = child;
+ TQListViewItem *c = child;
child = child->nextSibling();
delete c;
}