summaryrefslogtreecommitdiffstats
path: root/parts/tools/kapplicationtree.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:56:07 +0000
commitd6f8bbb45b267065a6907e71ff9c98bb6d161241 (patch)
treed109539636691d7b03036ca1c0ed29dbae6577cf /parts/tools/kapplicationtree.cpp
parent3331a47a9cad24795c7440ee8107143ce444ef34 (diff)
downloadtdevelop-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/tools/kapplicationtree.cpp')
-rw-r--r--parts/tools/kapplicationtree.cpp76
1 files changed, 38 insertions, 38 deletions
diff --git a/parts/tools/kapplicationtree.cpp b/parts/tools/kapplicationtree.cpp
index cbe3f3b4..c6517d8f 100644
--- a/parts/tools/kapplicationtree.cpp
+++ b/parts/tools/kapplicationtree.cpp
@@ -21,17 +21,17 @@
Boston, MA 02110-1301, USA.
*/
-#include <qfile.h>
-#include <qdir.h>
-#include <qdialog.h>
-#include <qpixmap.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qtoolbutton.h>
-#include <qcheckbox.h>
-#include <qtooltip.h>
-#include <qstyle.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqdialog.h>
+#include <tqpixmap.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqtoolbutton.h>
+#include <tqcheckbox.h>
+#include <tqtooltip.h>
+#include <tqstyle.h>
#include <kapplication.h>
#include <kbuttonbox.h>
@@ -58,16 +58,16 @@
#include "kapplicationtree.h"
-template class QPtrList<QString>;
+template class TQPtrList<TQString>;
-#define SORT_SPEC (QDir::DirsFirst | QDir::Name | QDir::IgnoreCase)
+#define SORT_SPEC (TQDir::DirsFirst | TQDir::Name | TQDir::IgnoreCase)
// ----------------------------------------------------------------------
-KDevAppTreeListItem::KDevAppTreeListItem( KListView* parent, const QString & name,
- const QPixmap& pixmap, bool parse, bool dir, const QString& p, const QString& c, const QString& dE )
- : QListViewItem( parent, name )
+KDevAppTreeListItem::KDevAppTreeListItem( KListView* parent, const TQString & name,
+ const TQPixmap& pixmap, bool parse, bool dir, const TQString& p, const TQString& c, const TQString& dE )
+ : TQListViewItem( parent, name )
{
init(pixmap, parse, dir, p, c, dE);
}
@@ -75,9 +75,9 @@ KDevAppTreeListItem::KDevAppTreeListItem( KListView* parent, const QString & nam
// ----------------------------------------------------------------------
-KDevAppTreeListItem::KDevAppTreeListItem( QListViewItem* parent, const QString & name,
- const QPixmap& pixmap, bool parse, bool dir, const QString& p, const QString& c, const QString& dE )
- : QListViewItem( parent, 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 )
{
init(pixmap, parse, dir, p, c, dE);
}
@@ -85,7 +85,7 @@ KDevAppTreeListItem::KDevAppTreeListItem( QListViewItem* parent, const QString &
// ----------------------------------------------------------------------
-void KDevAppTreeListItem::init(const QPixmap& pixmap, bool parse, bool dir, const QString& _path, const QString& _exec, const QString& _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,10 +101,10 @@ void KDevAppTreeListItem::init(const QPixmap& pixmap, bool parse, bool dir, cons
// ----------------------------------------------------------------------
// Ensure that dirs are sorted in front of files and case is ignored
-QString KDevAppTreeListItem::key(int column, bool /*ascending*/) const
+TQString KDevAppTreeListItem::key(int column, bool /*ascending*/) const
{
if (directory)
- return QString::fromLatin1(" ") + text(column).upper();
+ return TQString::fromLatin1(" ") + text(column).upper();
else
return text(column).upper();
}
@@ -121,7 +121,7 @@ void KDevAppTreeListItem::setOpen( bool o )
((KDevApplicationTree *) parent())->addDesktopGroup( path, this );
parsed = true;
}
- QListViewItem::setOpen( o );
+ TQListViewItem::setOpen( o );
}
bool KDevAppTreeListItem::isDirectory()
@@ -131,16 +131,16 @@ bool KDevAppTreeListItem::isDirectory()
// ----------------------------------------------------------------------
-KDevApplicationTree::KDevApplicationTree( QWidget *parent, const char* name )
+KDevApplicationTree::KDevApplicationTree( TQWidget *parent, const char* name )
: KListView( parent, name ), currentitem(0)
{
addColumn( i18n("Known Applications") );
setRootIsDecorated( true );
- addDesktopGroup( QString::null );
+ addDesktopGroup( TQString::null );
- connect( this, SIGNAL( currentChanged(QListViewItem*) ), SLOT( slotItemHighlighted(QListViewItem*) ) );
- connect( this, SIGNAL( selectionChanged(QListViewItem*) ), SLOT( slotSelectionChanged(QListViewItem*) ) );
+ connect( this, TQT_SIGNAL( currentChanged(TQListViewItem*) ), TQT_SLOT( slotItemHighlighted(TQListViewItem*) ) );
+ connect( this, TQT_SIGNAL( selectionChanged(TQListViewItem*) ), TQT_SLOT( slotSelectionChanged(TQListViewItem*) ) );
}
// ----------------------------------------------------------------------
@@ -153,7 +153,7 @@ bool KDevApplicationTree::isDirSel()
// ----------------------------------------------------------------------
-void KDevApplicationTree::addDesktopGroup( QString relPath, KDevAppTreeListItem *item)
+void KDevApplicationTree::addDesktopGroup( TQString relPath, KDevAppTreeListItem *item)
{
KServiceGroup::Ptr root = KServiceGroup::group(relPath);
KServiceGroup::List list = root->entries();
@@ -162,11 +162,11 @@ void KDevApplicationTree::addDesktopGroup( QString relPath, KDevAppTreeListItem
for( KServiceGroup::List::ConstIterator it = list.begin();
it != list.end(); it++)
{
- QString icon;
- QString text;
- QString relPath;
- QString exec;
- QString dEntry;
+ TQString icon;
+ TQString text;
+ TQString relPath;
+ TQString exec;
+ TQString dEntry;
bool isDir = false;
KSycocaEntry *p = (*it);
if (p->isType(KST_KService))
@@ -197,7 +197,7 @@ void KDevApplicationTree::addDesktopGroup( QString relPath, KDevAppTreeListItem
continue;
}
- QPixmap pixmap = SmallIcon( icon );
+ TQPixmap pixmap = SmallIcon( icon );
if (item)
newItem = new KDevAppTreeListItem( item, text, pixmap, false, isDir,
@@ -213,7 +213,7 @@ void KDevApplicationTree::addDesktopGroup( QString relPath, KDevAppTreeListItem
// ----------------------------------------------------------------------
-void KDevApplicationTree::slotItemHighlighted(QListViewItem* i)
+void KDevApplicationTree::slotItemHighlighted(TQListViewItem* i)
{
// i may be 0 (see documentation)
if(!i)
@@ -230,7 +230,7 @@ void KDevApplicationTree::slotItemHighlighted(QListViewItem* i)
// ----------------------------------------------------------------------
-void KDevApplicationTree::slotSelectionChanged(QListViewItem* i)
+void KDevApplicationTree::slotSelectionChanged(TQListViewItem* i)
{
// i may be 0 (see documentation)
if(!i)
@@ -246,9 +246,9 @@ void KDevApplicationTree::slotSelectionChanged(QListViewItem* i)
// ----------------------------------------------------------------------
-void KDevApplicationTree::resizeEvent( QResizeEvent * e)
+void KDevApplicationTree::resizeEvent( TQResizeEvent * e)
{
- setColumnWidth(0, width()-QApplication::style().pixelMetric(QStyle::PM_ScrollBarExtent));
+ setColumnWidth(0, width()-TQApplication::style().pixelMetric(TQStyle::PM_ScrollBarExtent));
KListView::resizeEvent(e);
}