summaryrefslogtreecommitdiffstats
path: root/src/app/treeview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/treeview.cpp')
-rw-r--r--src/app/treeview.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/src/app/treeview.cpp b/src/app/treeview.cpp
index ecde019..a8c7b59 100644
--- a/src/app/treeview.cpp
+++ b/src/app/treeview.cpp
@@ -20,9 +20,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "treeview.moc"
-// Qt
-#include <qheader.h>
-#include <qtimer.h>
+// TQt
+#include <tqheader.h>
+#include <tqtimer.h>
// KDE
#include <kdebug.h>
@@ -53,12 +53,12 @@ struct TreeView::Private {
TreeView* mView;
KFileTreeBranch* mBranch;
KFileTreeViewItem* mDropTarget;
- QTimer* mAutoOpenTimer;
+ TQTimer* mAutoOpenTimer;
- KFileTreeViewItem* findViewItem(KFileTreeViewItem* parent,const QString& text) {
- QListViewItem* item;
+ KFileTreeViewItem* findViewItem(KFileTreeViewItem* tqparent,const TQString& text) {
+ TQListViewItem* item;
- for (item=parent->firstChild();item;item=item->nextSibling()) {
+ for (item=tqparent->firstChild();item;item=item->nextSibling()) {
if (item->text(0)==text) {
return static_cast<KFileTreeViewItem*>(item);
}
@@ -68,7 +68,7 @@ struct TreeView::Private {
void setURLInternal(const KURL& url) {
LOG(url.prettyURL() );
- QString path=url.path();
+ TQString path=url.path();
if (!mBranch || !mBranch->rootUrl().isParentOf(url)) {
mView->createBranch(url);
@@ -84,9 +84,9 @@ struct TreeView::Private {
LOG("Path=" << path);
// Finds the deepest existing view item
- QStringList folderParts=QStringList::split('/',path);
- QStringList::Iterator folderIter=folderParts.begin();
- QStringList::Iterator endFolderIter=folderParts.end();
+ TQStringList folderParts=TQStringList::split('/',path);
+ TQStringList::Iterator folderIter=folderParts.begin();
+ TQStringList::Iterator endFolderIter=folderParts.end();
KFileTreeViewItem* viewItem=mBranch->root();
for(;folderIter!=endFolderIter;++folderIter) {
@@ -114,16 +114,16 @@ struct TreeView::Private {
};
-TreeView::TreeView(QWidget* parent)
-: KFileTreeView(parent) {
+TreeView::TreeView(TQWidget* tqparent)
+: KFileTreeView(tqparent) {
d=new Private;
d->mView=this;
d->mBranch=0;
d->mDropTarget=0;
- d->mAutoOpenTimer=new QTimer(this);
+ d->mAutoOpenTimer=new TQTimer(this);
// Look
- addColumn(QString::null);
+ addColumn(TQString());
header()->hide();
setAllColumnsShowFocus(true);
setRootIsDecorated(false);
@@ -135,8 +135,8 @@ TreeView::TreeView(QWidget* parent)
setDropHighlighter(true);
setAcceptDrops(true);
- connect(d->mAutoOpenTimer, SIGNAL(timeout()),
- this, SLOT(autoOpenDropTarget()));
+ connect(d->mAutoOpenTimer, TQT_SIGNAL(timeout()),
+ TQT_TQOBJECT(this), TQT_SLOT(autoOpenDropTarget()));
}
@@ -163,7 +163,7 @@ void TreeView::setURL(const KURL& url) {
void TreeView::slotTreeViewPopulateFinished(KFileTreeViewItem* item) {
- QListViewItem* child;
+ TQListViewItem* child;
if (!item) return;
KURL url=item->url();
@@ -180,7 +180,7 @@ void TreeView::slotTreeViewPopulateFinished(KFileTreeViewItem* item) {
return;
}
- // This URL is not a parent of a wanted URL, get out
+ // This URL is not a tqparent of a wanted URL, get out
if (!url.isParentOf(m_nextUrlToSelect)) return;
// Find the next child item and open it
@@ -201,14 +201,14 @@ void TreeView::createBranch(const KURL& url) {
if (d->mBranch) {
removeBranch(d->mBranch);
}
- QString title=url.prettyURL(0, KURL::StripFileProtocol);
+ TQString title=url.prettyURL(0, KURL::StripFileProtocol);
d->mBranch=addBranch(url, title, SmallIcon(KMimeType::iconForURL(url)) );
setDirOnlyMode(d->mBranch, true);
d->mBranch->setChildRecurse(false);
d->mBranch->root()->setOpen(true);
- connect(d->mBranch, SIGNAL(populateFinished(KFileTreeViewItem*) ),
- this, SLOT(slotTreeViewPopulateFinished(KFileTreeViewItem*)) );
+ connect(d->mBranch, TQT_SIGNAL(populateFinished(KFileTreeViewItem*) ),
+ TQT_TQOBJECT(this), TQT_SLOT(slotTreeViewPopulateFinished(KFileTreeViewItem*)) );
}
@@ -248,23 +248,23 @@ void TreeView::slotNewTreeViewItems(KFileTreeBranch* branch, const KFileTreeView
* dir when it's shown. Since the view doesn't update if it's
* hidden
*/
-void TreeView::showEvent(QShowEvent* event) {
+void TreeView::showEvent(TQShowEvent* event) {
LOG("m_nextUrlToSelect=" << m_nextUrlToSelect.pathOrURL());
if (m_nextUrlToSelect.isValid() && !currentURL().equals(m_nextUrlToSelect,true)) {
d->setURLInternal(m_nextUrlToSelect);
}
- QWidget::showEvent(event);
+ TQWidget::showEvent(event);
}
-void TreeView::contentsDragMoveEvent(QDragMoveEvent* event) {
+void TreeView::contentsDragMoveEvent(TQDragMoveEvent* event) {
if (!KURLDrag::canDecode(event)) {
event->ignore();
return;
}
// Get a pointer to the new drop item
- QPoint point(0,event->pos().y());
+ TQPoint point(0,event->pos().y());
KFileTreeViewItem* newDropTarget=static_cast<KFileTreeViewItem*>( itemAt(contentsToViewport(point)) );
if (!newDropTarget) {
event->ignore();
@@ -290,7 +290,7 @@ void TreeView::contentsDragMoveEvent(QDragMoveEvent* event) {
}
-void TreeView::contentsDragLeaveEvent(QDragLeaveEvent*) {
+void TreeView::contentsDragLeaveEvent(TQDragLeaveEvent*) {
d->mAutoOpenTimer->stop();
if (d->mDropTarget) {
stopAnimation(d->mDropTarget);
@@ -299,7 +299,7 @@ void TreeView::contentsDragLeaveEvent(QDragLeaveEvent*) {
}
-void TreeView::contentsDropEvent(QDropEvent* event) {
+void TreeView::contentsDropEvent(TQDropEvent* event) {
d->mAutoOpenTimer->stop();
// Get data from drop (do it before showing menu to avoid mDropTarget changes)