summaryrefslogtreecommitdiffstats
path: root/parts/tools
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
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')
-rw-r--r--parts/tools/addtooldlg.ui.h8
-rw-r--r--parts/tools/kapplicationtree.cpp76
-rw-r--r--parts/tools/kapplicationtree.h36
-rw-r--r--parts/tools/tools_part.cpp110
-rw-r--r--parts/tools/tools_part.h14
-rw-r--r--parts/tools/toolsconfig.cpp62
-rw-r--r--parts/tools/toolsconfig.h26
-rw-r--r--parts/tools/toolsconfigwidget.cpp50
-rw-r--r--parts/tools/toolsconfigwidget.h20
9 files changed, 201 insertions, 201 deletions
diff --git a/parts/tools/addtooldlg.ui.h b/parts/tools/addtooldlg.ui.h
index d01c4da7..045e7809 100644
--- a/parts/tools/addtooldlg.ui.h
+++ b/parts/tools/addtooldlg.ui.h
@@ -6,22 +6,22 @@
** a constructor, and a destroy() slot in place of a destructor.
*****************************************************************************/
-#include <qheader.h>
+#include <tqheader.h>
#include <kurlrequester.h>
#include "kapplicationtree.h"
void AddToolDialog::init()
{
- connect( tree, SIGNAL(selectionChanged(QListViewItem*)), this, SLOT(treeSelectionChanged(QListViewItem*)) );
+ connect( tree, TQT_SIGNAL(selectionChanged(TQListViewItem*)), this, TQT_SLOT(treeSelectionChanged(TQListViewItem*)) );
tree->header()->hide();
}
-QString AddToolDialog::getApp()
+TQString AddToolDialog::getApp()
{
return execEdit->url() + " " + paramEdit->text();
}
-void AddToolDialog::treeSelectionChanged( QListViewItem * lvi )
+void AddToolDialog::treeSelectionChanged( TQListViewItem * lvi )
{
KDevAppTreeListItem* item = dynamic_cast<KDevAppTreeListItem*> ( lvi );
if ( !item || item->isDirectory() )
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);
}
diff --git a/parts/tools/kapplicationtree.h b/parts/tools/kapplicationtree.h
index 2e376ba7..60a35ac6 100644
--- a/parts/tools/kapplicationtree.h
+++ b/parts/tools/kapplicationtree.h
@@ -40,24 +40,24 @@ class KDevAppTreeListItem : public QListViewItem
{
bool parsed;
bool directory;
- QString path;
- QString exec;
- QString dEntry;
+ TQString path;
+ TQString exec;
+ TQString dEntry;
protected:
- QString key(int column, bool ascending) const;
+ TQString key(int column, bool ascending) const;
- void init(const QPixmap& pixmap, bool parse, bool dir, const QString& _path, const QString& _exec, const QString& _dEntry);
+ void init(const TQPixmap& pixmap, bool parse, bool dir, const TQString& _path, const TQString& _exec, const TQString& _dEntry);
public:
- KDevAppTreeListItem( KListView* parent, const QString & name, const QPixmap& pixmap,
- bool parse, bool dir, const QString& p, const QString& c, const QString& dE );
- KDevAppTreeListItem( QListViewItem* parent, const QString & name, const QPixmap& pixmap,
- bool parse, bool dir, const QString& p, const QString& c, const QString& dE );
+ KDevAppTreeListItem( KListView* parent, const TQString & name, const TQPixmap& pixmap,
+ bool parse, bool dir, const TQString& p, const TQString& c, const TQString& dE );
+ KDevAppTreeListItem( TQListViewItem* parent, const TQString & name, const TQPixmap& pixmap,
+ bool parse, bool dir, const TQString& p, const TQString& c, const TQString& dE );
bool isDirectory();
- QString desktopEntryPath() const { return dEntry; }
- QString executable() const { return exec; }
+ TQString desktopEntryPath() const { return dEntry; }
+ TQString executable() const { return exec; }
protected:
virtual void activate();
@@ -75,26 +75,26 @@ class KDevApplicationTree : public KListView
{
Q_OBJECT
public:
- KDevApplicationTree( QWidget *parent, const char* name = 0 );
+ KDevApplicationTree( TQWidget *parent, const char* name = 0 );
/**
* Add a group of .desktop/.kdelnk entries
*/
- void addDesktopGroup( QString relPath, KDevAppTreeListItem *item = 0 );
+ void addDesktopGroup( TQString relPath, KDevAppTreeListItem *item = 0 );
bool isDirSel();
protected:
- void resizeEvent( QResizeEvent *_ev );
+ void resizeEvent( TQResizeEvent *_ev );
KDevAppTreeListItem* currentitem;
public slots:
- void slotItemHighlighted(QListViewItem* i);
- void slotSelectionChanged(QListViewItem* i);
+ void slotItemHighlighted(TQListViewItem* i);
+ void slotSelectionChanged(TQListViewItem* i);
signals:
- void selected( const QString& _name, const QString& _exec );
- void highlighted( const QString& _name, const QString& _exec );
+ void selected( const TQString& _name, const TQString& _exec );
+ void highlighted( const TQString& _name, const TQString& _exec );
};
/* ------------------------------------------------------------------------- */
diff --git a/parts/tools/tools_part.cpp b/parts/tools/tools_part.cpp
index f4285546..f04e4ae3 100644
--- a/parts/tools/tools_part.cpp
+++ b/parts/tools/tools_part.cpp
@@ -1,11 +1,11 @@
#include "tools_part.h"
-#include <qfile.h>
-#include <qpopupmenu.h>
-#include <qregexp.h>
-#include <qtimer.h>
-#include <qvbox.h>
-#include <qwhatsthis.h>
+#include <tqfile.h>
+#include <tqpopupmenu.h>
+#include <tqregexp.h>
+#include <tqtimer.h>
+#include <tqvbox.h>
+#include <tqwhatsthis.h>
#include <kaction.h>
#include <kapplication.h>
@@ -37,9 +37,9 @@
static const KDevPluginInfo data("kdevtools");
K_EXPORT_COMPONENT_FACTORY( libkdevtools, ToolsFactory( data ) )
-QMap<int, QString> externalToolMenuEntries;
+TQMap<int, TQString> externalToolMenuEntries;
-ToolsPart::ToolsPart(QObject *parent, const char *name, const QStringList &)
+ToolsPart::ToolsPart(TQObject *parent, const char *name, const TQStringList &)
: KDevPlugin( &data, parent, name ? name : "ToolsPart")
{
setInstance(ToolsFactory::instance());
@@ -49,17 +49,17 @@ ToolsPart::ToolsPart(QObject *parent, const char *name, const QStringList &)
m_configProxy = new ConfigWidgetProxy( core() );
m_configProxy->createGlobalConfigPage( i18n("Tools Menu"), TOOLSSETTINGS, info()->icon() );
m_configProxy->createGlobalConfigPage( i18n("External Tools"), EXTRATOOLSSETTINGS, info()->icon() );
- connect( m_configProxy, SIGNAL(insertConfigWidget(const KDialogBase*, QWidget*, unsigned int )),
- this, SLOT(insertConfigWidget(const KDialogBase*, QWidget*, unsigned int )) );
+ connect( m_configProxy, TQT_SIGNAL(insertConfigWidget(const KDialogBase*, TQWidget*, unsigned int )),
+ this, TQT_SLOT(insertConfigWidget(const KDialogBase*, TQWidget*, unsigned int )) );
- connect(core(), SIGNAL(coreInitialized()), this, SLOT(updateMenu()));
+ connect(core(), TQT_SIGNAL(coreInitialized()), this, TQT_SLOT(updateMenu()));
- connect( core(), SIGNAL(contextMenu(QPopupMenu *, const Context *)),
- this, SLOT(contextMenu(QPopupMenu *, const Context *)) );
+ connect( core(), TQT_SIGNAL(contextMenu(TQPopupMenu *, const Context *)),
+ this, TQT_SLOT(contextMenu(TQPopupMenu *, const Context *)) );
// Apparently action lists can only be plugged after the
// xmlgui client has been registered
- QTimer::singleShot(0, this, SLOT(updateToolsMenu()));
+ TQTimer::singleShot(0, this, TQT_SLOT(updateToolsMenu()));
}
@@ -68,42 +68,42 @@ ToolsPart::~ToolsPart()
delete m_configProxy;
}
-void ToolsPart::insertConfigWidget( const KDialogBase * dlg, QWidget * page, unsigned int pagenumber )
+void ToolsPart::insertConfigWidget( const KDialogBase * dlg, TQWidget * page, unsigned int pagenumber )
{
if ( pagenumber == TOOLSSETTINGS )
{
ToolsConfig *w = new ToolsConfig( page, "tools config widget" );
- connect(dlg, SIGNAL(okClicked()), w, SLOT(accept()));
- connect(dlg, SIGNAL(destroyed()), this, SLOT(updateMenu()));
+ connect(dlg, TQT_SIGNAL(okClicked()), w, TQT_SLOT(accept()));
+ connect(dlg, TQT_SIGNAL(destroyed()), this, TQT_SLOT(updateMenu()));
}
else if ( pagenumber == EXTRATOOLSSETTINGS )
{
ToolsConfigWidget *w2 = new ToolsConfigWidget( page, "tools config widget" );
- connect(dlg, SIGNAL(okClicked()), w2, SLOT(accept()));
- connect(dlg, SIGNAL(destroyed()), this, SLOT(updateToolsMenu()));
+ connect(dlg, TQT_SIGNAL(okClicked()), w2, TQT_SLOT(accept()));
+ connect(dlg, TQT_SIGNAL(destroyed()), this, TQT_SLOT(updateToolsMenu()));
}
}
void ToolsPart::updateMenu()
{
- QPtrList<KAction> actions;
+ TQPtrList<KAction> actions;
unplugActionList("tools_list");
KConfig *config = ToolsFactory::instance()->config();
config->setGroup("Tools");
- QStringList list = config->readListEntry("Tools");
- for (QStringList::Iterator it = list.begin(); it != list.end(); ++it)
+ TQStringList list = config->readListEntry("Tools");
+ for (TQStringList::Iterator it = list.begin(); it != list.end(); ++it)
{
- QString name = *it;
+ TQString name = *it;
KDesktopFile df(name, true);
if (df.readName().isNull())
continue;
KAction *action = new KAction(df.readName(), df.readIcon(), 0,
- this, SLOT(slotToolActivated()), (QObject*)0, name.latin1());
+ this, TQT_SLOT(slotToolActivated()), (TQObject*)0, name.latin1());
actions.append(action);
}
@@ -113,48 +113,48 @@ void ToolsPart::updateMenu()
void ToolsPart::slotToolActivated()
{
- QString df = sender()->name();
+ TQString df = sender()->name();
kapp->startServiceByDesktopPath(df);
}
-void ToolsPart::startCommand(QString cmdline, bool captured, QString fileName)
+void ToolsPart::startCommand(TQString cmdline, bool captured, TQString fileName)
{
KTextEditor::Document * doc = dynamic_cast<KTextEditor::Document*>( partController()->activePart() );
if ( fileName.isNull() && doc )
fileName = doc->url().path();
- QString projectDirectory;
+ TQString projectDirectory;
if (project())
projectDirectory = project()->projectDirectory();
- QString selection = KDevEditorUtil::currentSelection( doc );
+ TQString selection = KDevEditorUtil::currentSelection( doc );
if ( !selection.isEmpty() )
selection = KShellProcess::quote( selection );
- QString word = KDevEditorUtil::currentWord( doc );
+ TQString word = KDevEditorUtil::currentWord( doc );
// This should really be checked before inserting into the popup
if (cmdline.contains("%D") && projectDirectory.isNull())
return;
- cmdline.replace(QRegExp("%D"), projectDirectory);
+ cmdline.replace(TQRegExp("%D"), projectDirectory);
if (cmdline.contains("%S") && fileName.isNull())
return;
- cmdline.replace(QRegExp("%S"), fileName);
+ cmdline.replace(TQRegExp("%S"), fileName);
if (cmdline.contains("%T") && selection.isNull())
return;
- cmdline.replace(QRegExp("%T"), selection);
+ cmdline.replace(TQRegExp("%T"), selection);
if (cmdline.contains("%W") && word.isNull())
return;
- cmdline.replace(QRegExp("%W"), word);
+ cmdline.replace(TQRegExp("%W"), word);
if (captured)
{
if (KDevAppFrontend *appFrontend = extension<KDevAppFrontend>("KDevelop/AppFrontend"))
- appFrontend->startAppCommand(QString::QString(), cmdline, false);
+ appFrontend->startAppCommand(TQString::TQString(), cmdline, false);
}
else
{
@@ -169,19 +169,19 @@ void ToolsPart::updateToolsMenu()
{
KConfig *config = ToolsFactory::instance()->config();
config->setGroup("External Tools");
- QStringList l = config->readListEntry("Tool Menu");
+ TQStringList l = config->readListEntry("Tool Menu");
- QPtrList<KAction> actions;
- QStringList::ConstIterator it;
+ TQPtrList<KAction> actions;
+ TQStringList::ConstIterator it;
for (it = l.begin(); it != l.end(); ++it) {
- QString menutext = *it;
+ TQString menutext = *it;
KConfig *config = ToolsFactory::instance()->config();
config->setGroup("Tool Menu " + menutext);
bool isdesktopfile = config->readBoolEntry("DesktopFile");
KAction *action = new KAction(*it, 0,
- this, SLOT(toolsMenuActivated()),
- (QObject*) 0, menutext.utf8());
+ this, TQT_SLOT(toolsMenuActivated()),
+ (TQObject*) 0, menutext.utf8());
if (isdesktopfile) {
KDesktopFile df(config->readPathEntry("CommandLine"));
action->setIcon(df.readIcon());
@@ -194,7 +194,7 @@ void ToolsPart::updateToolsMenu()
}
-void ToolsPart::contextMenu(QPopupMenu *popup, const Context *context)
+void ToolsPart::contextMenu(TQPopupMenu *popup, const Context *context)
{
if (!context->hasType( Context::FileContext ))
return;
@@ -206,28 +206,28 @@ void ToolsPart::contextMenu(QPopupMenu *popup, const Context *context)
KConfig *config = ToolsFactory::instance()->config();
config->setGroup("External Tools");
- QStringList filecontextList = config->readListEntry("File Context");
+ TQStringList filecontextList = config->readListEntry("File Context");
if (URLUtil::isDirectory(m_contextFileName)) {
- QStringList l = config->readListEntry("Dir Context");
- QStringList::ConstIterator it;
+ TQStringList l = config->readListEntry("Dir Context");
+ TQStringList::ConstIterator it;
for (it = l.begin(); it != l.end(); ++it)
- externalToolMenuEntries.insert( popup->insertItem( (*it), this, SLOT(dirContextActivated(int)) ), (*it) );
+ externalToolMenuEntries.insert( popup->insertItem( (*it), this, TQT_SLOT(dirContextActivated(int)) ), (*it) );
} else {
- QStringList l = config->readListEntry("File Context");
- QStringList::ConstIterator it;
+ TQStringList l = config->readListEntry("File Context");
+ TQStringList::ConstIterator it;
for (it = l.begin(); it != l.end(); ++it)
- externalToolMenuEntries.insert( popup->insertItem( (*it), this, SLOT(fileContextActivated(int)) ), (*it) );
+ externalToolMenuEntries.insert( popup->insertItem( (*it), this, TQT_SLOT(fileContextActivated(int)) ), (*it) );
}
}
void ToolsPart::toolsMenuActivated()
{
- QString menutext = sender()->name();
+ TQString menutext = sender()->name();
KConfig *config = ToolsFactory::instance()->config();
config->setGroup("Tool Menu " + menutext);
- QString cmdline = config->readPathEntry("CommandLine");
+ TQString cmdline = config->readPathEntry("CommandLine");
bool isdesktopfile = config->readBoolEntry("DesktopFile");
bool captured = config->readBoolEntry("Captured");
kdDebug() << "tools:" << "activating " << menutext
@@ -236,17 +236,17 @@ void ToolsPart::toolsMenuActivated()
if (isdesktopfile)
kapp->startServiceByDesktopPath(cmdline);
else
- startCommand(cmdline, captured, QString::null);
+ startCommand(cmdline, captured, TQString::null);
}
void ToolsPart::fileContextActivated(int id)
{
- QString menutext = externalToolMenuEntries[ id ];
+ TQString menutext = externalToolMenuEntries[ id ];
KConfig *config = ToolsFactory::instance()->config();
config->setGroup("File Context " + menutext);
- QString cmdline = config->readPathEntry("CommandLine");
+ TQString cmdline = config->readPathEntry("CommandLine");
bool captured = config->readBoolEntry("Captured");
kdDebug() << "filecontext:" << "activating " << menutext
<< " with cmdline " << cmdline
@@ -257,11 +257,11 @@ void ToolsPart::fileContextActivated(int id)
void ToolsPart::dirContextActivated(int id)
{
- QString menutext = externalToolMenuEntries[ id ];
+ TQString menutext = externalToolMenuEntries[ id ];
KConfig *config = ToolsFactory::instance()->config();
config->setGroup("Dir Context " + menutext);
- QString cmdline = config->readPathEntry("CommandLine");
+ TQString cmdline = config->readPathEntry("CommandLine");
bool captured = config->readBoolEntry("Captured");
kdDebug() << "dircontext:" << "activating " << menutext
<< "with cmdline " << cmdline
diff --git a/parts/tools/tools_part.h b/parts/tools/tools_part.h
index b0d82c99..172b11b6 100644
--- a/parts/tools/tools_part.h
+++ b/parts/tools/tools_part.h
@@ -7,7 +7,7 @@
#define __KDEVPART_TOOLS_H__
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include <kdevplugin.h>
#include <kdevgenericfactory.h>
@@ -26,27 +26,27 @@ class ToolsPart : public KDevPlugin
public:
- ToolsPart( QObject *parent, const char *name, const QStringList & );
+ ToolsPart( TQObject *parent, const char *name, const TQStringList & );
~ToolsPart();
private slots:
- void insertConfigWidget( const KDialogBase * dlg, QWidget * page, unsigned int pagenumber );
+ void insertConfigWidget( const KDialogBase * dlg, TQWidget * page, unsigned int pagenumber );
void updateMenu();
void slotToolActivated();
- void contextMenu(QPopupMenu *popup, const Context *context);
+ void contextMenu(TQPopupMenu *popup, const Context *context);
void updateToolsMenu();
void toolsMenuActivated();
void fileContextActivated(int id);
void dirContextActivated(int id);
private:
- void startCommand(QString cmdline, bool captured, QString fileName);
+ void startCommand(TQString cmdline, bool captured, TQString fileName);
- QPopupMenu *m_contextPopup;
- QString m_contextFileName;
+ TQPopupMenu *m_contextPopup;
+ TQString m_contextFileName;
ConfigWidgetProxy * m_configProxy;
};
diff --git a/parts/tools/toolsconfig.cpp b/parts/tools/toolsconfig.cpp
index 523fe388..c8b4566f 100644
--- a/parts/tools/toolsconfig.cpp
+++ b/parts/tools/toolsconfig.cpp
@@ -1,11 +1,11 @@
#include "toolsconfig.h"
-#include <qapplication.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlistbox.h>
-#include <qpushbutton.h>
-#include <qheader.h>
+#include <tqapplication.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlistbox.h>
+#include <tqpushbutton.h>
+#include <tqheader.h>
#include <kapplication.h>
#include <kdesktopfile.h>
@@ -17,63 +17,63 @@
#include "kapplicationtree.h"
-ToolsConfig::ToolsConfig(QWidget *parent, const char *name)
- : QWidget(parent, name), _tree(0)
+ToolsConfig::ToolsConfig(TQWidget *parent, const char *name)
+ : TQWidget(parent, name), _tree(0)
{
_entries.setAutoDelete(true);
}
-void ToolsConfig::showEvent(QShowEvent *e)
+void ToolsConfig::showEvent(TQShowEvent *e)
{
- QWidget::showEvent(e);
+ TQWidget::showEvent(e);
if (!_tree)
{
- QApplication::setOverrideCursor(Qt::waitCursor);
+ TQApplication::setOverrideCursor(Qt::waitCursor);
- QHBoxLayout *hbox = new QHBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
+ TQHBoxLayout *hbox = new TQHBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
- QVBoxLayout *vbox = new QVBoxLayout(hbox);
+ TQVBoxLayout *vbox = new TQVBoxLayout(hbox);
_tree = new KDevApplicationTree(this);
_tree->header()->hide();
- QLabel *l = new QLabel(_tree, i18n("&Applications:"), this);
+ TQLabel *l = new TQLabel(_tree, i18n("&Applications:"), this);
l->show();
_tree->show();
vbox->addWidget(l);
vbox->addWidget(_tree);
- vbox = new QVBoxLayout(hbox);
+ vbox = new TQVBoxLayout(hbox);
- _toList = new QPushButton(QApplication::reverseLayout() ? "<<" : ">>", this);
+ _toList = new TQPushButton(TQApplication::reverseLayout() ? "<<" : ">>", this);
_toList->show();
vbox->addWidget(_toList);
- connect(_toList, SIGNAL(clicked()), this, SLOT(toList()));
+ connect(_toList, TQT_SIGNAL(clicked()), this, TQT_SLOT(toList()));
- _toTree = new QPushButton(QApplication::reverseLayout() ? ">>" : "<<", this);
+ _toTree = new TQPushButton(TQApplication::reverseLayout() ? ">>" : "<<", this);
_toTree->show();
vbox->addWidget(_toTree);
- connect(_toTree, SIGNAL(clicked()), this, SLOT(toTree()));
+ connect(_toTree, TQT_SIGNAL(clicked()), this, TQT_SLOT(toTree()));
- vbox = new QVBoxLayout(hbox);
- _list = new QListBox(this);
- l = new QLabel(_list, i18n("&Tools menu:"), this);
+ vbox = new TQVBoxLayout(hbox);
+ _list = new TQListBox(this);
+ l = new TQLabel(_list, i18n("&Tools menu:"), this);
l->show();
_list->show();
vbox->addWidget(l);
vbox->addWidget(_list);
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
}
fill();
checkButtons();
- connect(_tree, SIGNAL(selectionChanged()), this, SLOT(checkButtons()));
- connect(_list, SIGNAL(selectionChanged()), this, SLOT(checkButtons()));
+ connect(_tree, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(checkButtons()));
+ connect(_list, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(checkButtons()));
}
@@ -91,14 +91,14 @@ void ToolsConfig::fill()
KConfig *config = ToolsFactory::instance()->config();
config->setGroup("Tools");
- QStringList list = config->readListEntry("Tools");
+ TQStringList list = config->readListEntry("Tools");
- for (QStringList::Iterator it = list.begin(); it != list.end(); ++it)
+ for (TQStringList::Iterator it = list.begin(); it != list.end(); ++it)
add(*it);
}
-void ToolsConfig::add(const QString &desktopFile)
+void ToolsConfig::add(const TQString &desktopFile)
{
KDesktopFile df(desktopFile, true);
if (df.readName().isEmpty())
@@ -141,8 +141,8 @@ void ToolsConfig::accept()
KConfig *config = ToolsFactory::instance()->config();
config->setGroup("Tools");
- QStringList l;
- QPtrListIterator<Entry> it(_entries);
+ TQStringList l;
+ TQPtrListIterator<Entry> it(_entries);
for ( ; it.current(); ++it)
l.append(it.current()->desktopFile);
@@ -157,7 +157,7 @@ void ToolsConfig::updateList()
_list->clear();
- QPtrListIterator<Entry> it(_entries);
+ TQPtrListIterator<Entry> it(_entries);
for ( ; it.current(); ++it)
_list->insertItem(it.current()->icon, it.current()->name);
diff --git a/parts/tools/toolsconfig.h b/parts/tools/toolsconfig.h
index 5dc87d70..46855256 100644
--- a/parts/tools/toolsconfig.h
+++ b/parts/tools/toolsconfig.h
@@ -2,9 +2,9 @@
#define __TOOLS_CONFIG_H__
-#include <qwidget.h>
-#include <qptrlist.h>
-#include <qpixmap.h>
+#include <tqwidget.h>
+#include <tqptrlist.h>
+#include <tqpixmap.h>
class QListBox;
@@ -17,9 +17,9 @@ public:
Entry() {};
- QString name;
- QString desktopFile;
- QPixmap icon;
+ TQString name;
+ TQString desktopFile;
+ TQPixmap icon;
};
@@ -30,7 +30,7 @@ class ToolsConfig : public QWidget
public:
- ToolsConfig(QWidget *parent = 0, const char *name = 0);
+ ToolsConfig(TQWidget *parent = 0, const char *name = 0);
public slots:
@@ -40,11 +40,11 @@ public slots:
protected:
- void showEvent(QShowEvent *);
+ void showEvent(TQShowEvent *);
void fill();
- void add(const QString &desktopFile);
- void remove(const QString &desktopFile);
+ void add(const TQString &desktopFile);
+ void remove(const TQString &desktopFile);
private slots:
@@ -60,10 +60,10 @@ private slots:
private:
KDevApplicationTree *_tree;
- QListBox *_list;
- QPushButton *_toList, *_toTree;
+ TQListBox *_list;
+ TQPushButton *_toList, *_toTree;
- QPtrList<Entry> _entries;
+ TQPtrList<Entry> _entries;
};
diff --git a/parts/tools/toolsconfigwidget.cpp b/parts/tools/toolsconfigwidget.cpp
index 72b102be..b4643b26 100644
--- a/parts/tools/toolsconfigwidget.cpp
+++ b/parts/tools/toolsconfigwidget.cpp
@@ -11,9 +11,9 @@
#include "toolsconfigwidget.h"
-#include <qcheckbox.h>
-#include <qlistbox.h>
-#include <qtimer.h>
+#include <tqcheckbox.h>
+#include <tqlistbox.h>
+#include <tqtimer.h>
#include <klineedit.h>
#include <kconfig.h>
@@ -31,8 +31,8 @@
struct ToolsConfigEntry
{
- QString menutext;
- QString cmdline;
+ TQString menutext;
+ TQString cmdline;
bool isdesktopfile;
bool captured;
bool isEmpty() const {
@@ -41,7 +41,7 @@ struct ToolsConfigEntry
};
-ToolsConfigWidget::ToolsConfigWidget(QWidget *parent, const char *name)
+ToolsConfigWidget::ToolsConfigWidget(TQWidget *parent, const char *name)
: ToolsConfigWidgetBase(parent, name)
{
m_toolsmenuEntries.setAutoDelete(true);
@@ -61,16 +61,16 @@ ToolsConfigWidget::~ToolsConfigWidget()
{}
-void ToolsConfigWidget::readGroup(const QString &group, QDict<ToolsConfigEntry> *entryDict)
+void ToolsConfigWidget::readGroup(const TQString &group, TQDict<ToolsConfigEntry> *entryDict)
{
KConfig *config = ToolsFactory::instance()->config();
config->setGroup("External Tools");
- QStringList list = config->readListEntry(group);
+ TQStringList list = config->readListEntry(group);
- QStringList::ConstIterator it;
+ TQStringList::ConstIterator it;
for (it = list.begin(); it != list.end(); ++it) {
config->setGroup(group + " " + (*it));
- QString cmdline = config->readPathEntry("CommandLine");
+ TQString cmdline = config->readPathEntry("CommandLine");
bool isdesktopfile = config->readBoolEntry("DesktopFile");
bool captured = config->readBoolEntry("Captured");
ToolsConfigEntry *entry = new ToolsConfigEntry;
@@ -83,13 +83,13 @@ void ToolsConfigWidget::readGroup(const QString &group, QDict<ToolsConfigEntry>
}
-void ToolsConfigWidget::storeGroup(const QString &group, const QDict<ToolsConfigEntry> &entryDict)
+void ToolsConfigWidget::storeGroup(const TQString &group, const TQDict<ToolsConfigEntry> &entryDict)
{
KConfig *config = ToolsFactory::instance()->config();
- QStringList list;
+ TQStringList list;
- QDictIterator<ToolsConfigEntry> it(entryDict);
+ TQDictIterator<ToolsConfigEntry> it(entryDict);
for (; it.current(); ++it) {
ToolsConfigEntry *entry = it.current();
list << entry->menutext;
@@ -105,11 +105,11 @@ void ToolsConfigWidget::storeGroup(const QString &group, const QDict<ToolsConfig
-void ToolsConfigWidget::fillListBox(QListBox *lb, const QDict<ToolsConfigEntry> &entryDict)
+void ToolsConfigWidget::fillListBox(TQListBox *lb, const TQDict<ToolsConfigEntry> &entryDict)
{
lb->clear();
- QDictIterator<ToolsConfigEntry> it(entryDict);
+ TQDictIterator<ToolsConfigEntry> it(entryDict);
for (; it.current(); ++it) {
ToolsConfigEntry *entry = it.current();
if (entry->isdesktopfile) {
@@ -122,9 +122,9 @@ void ToolsConfigWidget::fillListBox(QListBox *lb, const QDict<ToolsConfigEntry>
}
-bool ToolsConfigWidget::addEntry(ToolsConfigEntry *entry, QDict<ToolsConfigEntry> *entryDict)
+bool ToolsConfigWidget::addEntry(ToolsConfigEntry *entry, TQDict<ToolsConfigEntry> *entryDict)
{
- QString menutext = entry->menutext;
+ TQString menutext = entry->menutext;
if (entryDict->find(menutext)) {
delete entry;
KMessageBox::sorry(this, i18n("An entry with this title exists already."));
@@ -185,7 +185,7 @@ void ToolsConfigWidget::toolsmenuaddClicked()
void ToolsConfigWidget::toolsmenuremoveClicked()
{
- QString menutext = toolsmenuBox->currentText();
+ TQString menutext = toolsmenuBox->currentText();
m_toolsmenuEntries.remove(menutext);
updateListBoxes();
}
@@ -213,7 +213,7 @@ void ToolsConfigWidget::filecontextaddClicked()
void ToolsConfigWidget::filecontextremoveClicked()
{
- QString menutext = filecontextBox->currentText();
+ TQString menutext = filecontextBox->currentText();
m_filecontextEntries.remove(menutext);
updateListBoxes();
}
@@ -240,21 +240,21 @@ void ToolsConfigWidget::dircontextaddClicked()
void ToolsConfigWidget::dircontextremoveClicked()
{
- QString menutext = dircontextBox->currentText();
+ TQString menutext = dircontextBox->currentText();
m_dircontextEntries.remove(menutext);
updateListBoxes();
}
-bool ToolsConfigWidget::eventFilter(QObject *o, QEvent *e)
+bool ToolsConfigWidget::eventFilter(TQObject *o, TQEvent *e)
{
- if (e->type() == QEvent::DragEnter || e->type() == QEvent::DragMove) {
- QDragMoveEvent *dme = static_cast<QDragMoveEvent*>(e);
+ if (e->type() == TQEvent::DragEnter || e->type() == TQEvent::DragMove) {
+ TQDragMoveEvent *dme = static_cast<TQDragMoveEvent*>(e);
if (KURLDrag::canDecode(dme))
dme->accept();
return true;
- } else if (e->type() == QEvent::Drop) {
- QDropEvent *de = static_cast<QDropEvent*>(e);
+ } else if (e->type() == TQEvent::Drop) {
+ TQDropEvent *de = static_cast<TQDropEvent*>(e);
KURL::List fileList;
if (KURLDrag::decode(de, fileList)) {
KURL::List::ConstIterator it;
diff --git a/parts/tools/toolsconfigwidget.h b/parts/tools/toolsconfigwidget.h
index 51e1b005..b58c9ea4 100644
--- a/parts/tools/toolsconfigwidget.h
+++ b/parts/tools/toolsconfigwidget.h
@@ -14,7 +14,7 @@
#include "toolsconfigwidgetbase.h"
#include "tools_part.h"
-#include <qdict.h>
+#include <tqdict.h>
struct ToolsConfigEntry;
@@ -25,7 +25,7 @@ class ToolsConfigWidget : public ToolsConfigWidgetBase
Q_OBJECT
public:
- ToolsConfigWidget(QWidget *parent=0, const char *name=0);
+ ToolsConfigWidget(TQWidget *parent=0, const char *name=0);
~ToolsConfigWidget();
public slots:
@@ -39,20 +39,20 @@ private:
virtual void dircontextaddClicked();
virtual void dircontextremoveClicked();
- virtual bool eventFilter(QObject *o, QEvent *e);
+ virtual bool eventFilter(TQObject *o, TQEvent *e);
- void readGroup(const QString &group, QDict<ToolsConfigEntry> *entryDict);
- void storeGroup(const QString &group, const QDict<ToolsConfigEntry> &entryDict);
- void fillListBox(QListBox *lb, const QDict<ToolsConfigEntry> &entryDict);
- bool addEntry(ToolsConfigEntry *entry, QDict<ToolsConfigEntry> *entryDict);
+ void readGroup(const TQString &group, TQDict<ToolsConfigEntry> *entryDict);
+ void storeGroup(const TQString &group, const TQDict<ToolsConfigEntry> &entryDict);
+ void fillListBox(TQListBox *lb, const TQDict<ToolsConfigEntry> &entryDict);
+ bool addEntry(ToolsConfigEntry *entry, TQDict<ToolsConfigEntry> *entryDict);
void readConfig();
void storeConfig();
void updateListBoxes();
- QDict<ToolsConfigEntry> m_toolsmenuEntries;
- QDict<ToolsConfigEntry> m_filecontextEntries;
- QDict<ToolsConfigEntry> m_dircontextEntries;
+ TQDict<ToolsConfigEntry> m_toolsmenuEntries;
+ TQDict<ToolsConfigEntry> m_filecontextEntries;
+ TQDict<ToolsConfigEntry> m_dircontextEntries;
ToolsPart *m_part;
};