From 6392f5a9dfce2bf83617d49bb7f332181ec6004e Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Sun, 25 May 2014 15:37:31 +0900 Subject: Revert "Finish renaming tdevelop components" This reverts commit 722ce1efbac31c61b1d4b13f7e075c9f311e3e73. --- parts/tools/kapplicationtree.cpp | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'parts/tools/kapplicationtree.cpp') diff --git a/parts/tools/kapplicationtree.cpp b/parts/tools/kapplicationtree.cpp index 18e31265..8c13a4ea 100644 --- a/parts/tools/kapplicationtree.cpp +++ b/parts/tools/kapplicationtree.cpp @@ -1,5 +1,5 @@ /* This file is part of the KDE libraries - Nicked from KDElibs since TDevApplicationTree is not a public class.. + Nicked from KDElibs since KDevApplicationTree is not a public class.. Copyright (C) 1997 Torben Weis Copyright (C) 1999 Dirk A. Mueller @@ -65,7 +65,7 @@ template class TQPtrList; // ---------------------------------------------------------------------- -TDevAppTreeListItem::TDevAppTreeListItem( TDEListView* parent, const TQString & name, +KDevAppTreeListItem::KDevAppTreeListItem( TDEListView* parent, const TQString & name, const TQPixmap& pixmap, bool parse, bool dir, const TQString& p, const TQString& c, const TQString& dE ) : TQListViewItem( parent, name ) { @@ -75,7 +75,7 @@ TDevAppTreeListItem::TDevAppTreeListItem( TDEListView* parent, const TQString & // ---------------------------------------------------------------------- -TDevAppTreeListItem::TDevAppTreeListItem( TQListViewItem* parent, const TQString & name, +KDevAppTreeListItem::KDevAppTreeListItem( TQListViewItem* parent, const TQString & name, const TQPixmap& pixmap, bool parse, bool dir, const TQString& p, const TQString& c, const TQString& dE ) : TQListViewItem( parent, name ) { @@ -85,7 +85,7 @@ TDevAppTreeListItem::TDevAppTreeListItem( TQListViewItem* parent, const TQString // ---------------------------------------------------------------------- -void TDevAppTreeListItem::init(const TQPixmap& pixmap, bool parse, bool dir, const TQString& _path, const TQString& _exec, const TQString& _dEntry) +void KDevAppTreeListItem::init(const TQPixmap& pixmap, bool parse, bool dir, const TQString& _path, const TQString& _exec, const TQString& _dEntry) { setPixmap(0, pixmap); parsed = parse; @@ -101,7 +101,7 @@ void TDevAppTreeListItem::init(const TQPixmap& pixmap, bool parse, bool dir, con // ---------------------------------------------------------------------- // Ensure that dirs are sorted in front of files and case is ignored -TQString TDevAppTreeListItem::key(int column, bool /*ascending*/) const +TQString KDevAppTreeListItem::key(int column, bool /*ascending*/) const { if (directory) return TQString::fromLatin1(" ") + text(column).upper(); @@ -109,29 +109,29 @@ TQString TDevAppTreeListItem::key(int column, bool /*ascending*/) const return text(column).upper(); } -void TDevAppTreeListItem::activate() +void KDevAppTreeListItem::activate() { if ( directory ) setOpen(!isOpen()); } -void TDevAppTreeListItem::setOpen( bool o ) +void KDevAppTreeListItem::setOpen( bool o ) { if( o && !parsed ) { // fill the children before opening - ((TDevApplicationTree *) parent())->addDesktopGroup( path, this ); + ((KDevApplicationTree *) parent())->addDesktopGroup( path, this ); parsed = true; } TQListViewItem::setOpen( o ); } -bool TDevAppTreeListItem::isDirectory() +bool KDevAppTreeListItem::isDirectory() { return directory; } // ---------------------------------------------------------------------- -TDevApplicationTree::TDevApplicationTree( TQWidget *parent, const char* name ) +KDevApplicationTree::KDevApplicationTree( TQWidget *parent, const char* name ) : TDEListView( parent, name ), currentitem(0) { addColumn( i18n("Known Applications") ); @@ -145,7 +145,7 @@ TDevApplicationTree::TDevApplicationTree( TQWidget *parent, const char* name ) // ---------------------------------------------------------------------- -bool TDevApplicationTree::isDirSel() +bool KDevApplicationTree::isDirSel() { if (!currentitem) return false; // if currentitem isn't set return currentitem->isDirectory(); @@ -153,12 +153,12 @@ bool TDevApplicationTree::isDirSel() // ---------------------------------------------------------------------- -void TDevApplicationTree::addDesktopGroup( TQString relPath, TDevAppTreeListItem *item) +void KDevApplicationTree::addDesktopGroup( TQString relPath, KDevAppTreeListItem *item) { KServiceGroup::Ptr root = KServiceGroup::group(relPath); KServiceGroup::List list = root->entries(); - TDevAppTreeListItem * newItem; + KDevAppTreeListItem * newItem; for( KServiceGroup::List::ConstIterator it = list.begin(); it != list.end(); it++) { @@ -200,10 +200,10 @@ void TDevApplicationTree::addDesktopGroup( TQString relPath, TDevAppTreeListItem TQPixmap pixmap = SmallIcon( icon ); if (item) - newItem = new TDevAppTreeListItem( item, text, pixmap, false, isDir, + newItem = new KDevAppTreeListItem( item, text, pixmap, false, isDir, relPath, exec, dEntry ); else - newItem = new TDevAppTreeListItem( this, text, pixmap, false, isDir, + newItem = new KDevAppTreeListItem( this, text, pixmap, false, isDir, relPath, exec, dEntry ); if (isDir) newItem->setExpandable( true ); @@ -213,13 +213,13 @@ void TDevApplicationTree::addDesktopGroup( TQString relPath, TDevAppTreeListItem // ---------------------------------------------------------------------- -void TDevApplicationTree::slotItemHighlighted(TQListViewItem* i) +void KDevApplicationTree::slotItemHighlighted(TQListViewItem* i) { // i may be 0 (see documentation) if(!i) return; - TDevAppTreeListItem *item = (TDevAppTreeListItem *) i; + KDevAppTreeListItem *item = (KDevAppTreeListItem *) i; currentitem = item; @@ -230,13 +230,13 @@ void TDevApplicationTree::slotItemHighlighted(TQListViewItem* i) // ---------------------------------------------------------------------- -void TDevApplicationTree::slotSelectionChanged(TQListViewItem* i) +void KDevApplicationTree::slotSelectionChanged(TQListViewItem* i) { // i may be 0 (see documentation) if(!i) return; - TDevAppTreeListItem *item = (TDevAppTreeListItem *) i; + KDevAppTreeListItem *item = (KDevAppTreeListItem *) i; currentitem = item; @@ -246,7 +246,7 @@ void TDevApplicationTree::slotSelectionChanged(TQListViewItem* i) // ---------------------------------------------------------------------- -void TDevApplicationTree::resizeEvent( TQResizeEvent * e) +void KDevApplicationTree::resizeEvent( TQResizeEvent * e) { setColumnWidth(0, width()-TQApplication::style().pixelMetric(TQStyle::PM_ScrollBarExtent)); TDEListView::resizeEvent(e); -- cgit v1.2.3