summaryrefslogtreecommitdiffstats
path: root/kate/kpybrowser/kpybrowser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kate/kpybrowser/kpybrowser.cpp')
-rw-r--r--kate/kpybrowser/kpybrowser.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/kate/kpybrowser/kpybrowser.cpp b/kate/kpybrowser/kpybrowser.cpp
index 9023e65..183e1e7 100644
--- a/kate/kpybrowser/kpybrowser.cpp
+++ b/kate/kpybrowser/kpybrowser.cpp
@@ -16,10 +16,10 @@
***************************************************************************/
#include "kpybrowser.h"
-#include <qheader.h>
+#include <tqheader.h>
#include <kmessagebox.h>
#include <klocale.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include "kpybrowser.moc"
@@ -165,7 +165,7 @@ static const char *container_xpm[] = {
};
void
-getOpenNodes (QValueList < QString > *open_nodes, PyBrowseNode * node)
+getOpenNodes (TQValueList < TQString > *open_nodes, PyBrowseNode * node)
{
if (node == NULL)
return;
@@ -181,23 +181,23 @@ getOpenNodes (QValueList < QString > *open_nodes, PyBrowseNode * node)
}
-KPyBrowser::KPyBrowser (QWidget * parent, const char *name):
+KPyBrowser::KPyBrowser (TQWidget * parent, const char *name):
KListView (parent, name)
{
addColumn(i18n("Name"));
header ()->hide ();
class_root =
- new PyBrowseNode (this, QString ("Classes"), i18n("Classes"),
+ new PyBrowseNode (this, TQString ("Classes"), i18n("Classes"),
PYOTHER);
- class_root->setPixmap (0, QPixmap (container_xpm));
+ class_root->setPixmap (0, TQPixmap (container_xpm));
function_root =
- new PyBrowseNode (this, QString ("Globals"), i18n("Globals"),
+ new PyBrowseNode (this, TQString ("Globals"), i18n("Globals"),
PYOTHER);
- function_root->setPixmap (0, QPixmap (container_xpm));
+ function_root->setPixmap (0, TQPixmap (container_xpm));
setRootIsDecorated (1);
- connect (this, SIGNAL (executed (QListViewItem *)), this,
- SLOT (nodeSelected (QListViewItem *)));
+ connect (this, TQT_SIGNAL (executed (TQListViewItem *)), this,
+ TQT_SLOT (nodeSelected (TQListViewItem *)));
setTooltipColumn (1);
setShowToolTips (1);
tooltip = new KPBToolTip (this);
@@ -208,7 +208,7 @@ KPyBrowser::~KPyBrowser ()
}
void
-KPyBrowser::nodeSelected (QListViewItem * node)
+KPyBrowser::nodeSelected (TQListViewItem * node)
{
PyBrowseNode *browse_node = dynamic_cast < PyBrowseNode * >(node);
@@ -217,41 +217,41 @@ KPyBrowser::nodeSelected (QListViewItem * node)
return;
}
- QString method_name;
+ TQString method_name;
int line_no;
line_no = browse_node->getLine();
method_name = browse_node->getName();
if (browse_node->getType () == PYCLASS)
{
- method_name = QString ("class ") + browse_node->getName ();
+ method_name = TQString ("class ") + browse_node->getName ();
}
else if (browse_node->getType () == PYMETHOD
|| browse_node->getType () == PYFUNCTION)
{
- method_name = QString ("def ") + browse_node->getName ();
+ method_name = TQString ("def ") + browse_node->getName ();
}
emit selected(method_name, line_no);
}
void
-KPyBrowser::parseText (QString & pytext)
+KPyBrowser::parseText (TQString & pytext)
{
- QRegExp class_rx (QString ("^class [a-zA-Z0-9_,\\s\\(\\).]+:"));
- QRegExp function_rx (QString ("^def [a-zA-Z_]+[^#]*:"));
- QRegExp method_rx (QString ("[\\s]+def [a-zA-Z_]+[^#]*:"));
+ TQRegExp class_rx (TQString ("^class [a-zA-Z0-9_,\\s\\(\\).]+:"));
+ TQRegExp function_rx (TQString ("^def [a-zA-Z_]+[^#]*:"));
+ TQRegExp method_rx (TQString ("[\\s]+def [a-zA-Z_]+[^#]*:"));
int paren_i;
- QStringList lines = QStringList::split ("\n", pytext, TRUE);
- QStringList::Iterator iter;
- QString *line;
- QString class_name, method_name, function_name, class_sig, method_sig,
+ TQStringList lines = TQStringList::split ("\n", pytext, TRUE);
+ TQStringList::Iterator iter;
+ TQString *line;
+ TQString class_name, method_name, function_name, class_sig, method_sig,
function_sig;
PyBrowseNode *last_class_node = NULL;
PyBrowseNode *last_method_node = NULL;
PyBrowseNode *last_function_node = NULL;
- QValueList < QString > open_nodes;
+ TQValueList < TQString > open_nodes;
getOpenNodes (&open_nodes, class_root);
getOpenNodes (&open_nodes, function_root);
@@ -267,13 +267,13 @@ KPyBrowser::parseText (QString & pytext)
delete function_root;
}
class_root =
- new PyBrowseNode (this, QString ("Classes"), i18n("Classes"),
+ new PyBrowseNode (this, TQString ("Classes"), i18n("Classes"),
PYOTHER);
- class_root->setPixmap (0, QPixmap (container_xpm));
+ class_root->setPixmap (0, TQPixmap (container_xpm));
function_root =
- new PyBrowseNode (this, QString ("Globals"), i18n("Globals"),
+ new PyBrowseNode (this, TQString ("Globals"), i18n("Globals"),
PYOTHER);
- function_root->setPixmap (0, QPixmap (container_xpm));
+ function_root->setPixmap (0, TQPixmap (container_xpm));
node_dict.insert (class_root->getQualifiedName (), class_root);
node_dict.insert (function_root->getQualifiedName (), function_root);
@@ -286,7 +286,7 @@ KPyBrowser::parseText (QString & pytext)
line = &(*iter);
if (class_rx.search(*line) >= 0)
{
- //KMessageBox::information(this, *line, QString("Found class on line %1").arg(line_no));
+ //KMessageBox::information(this, *line, TQString("Found class on line %1").arg(line_no));
//strip out the beginning class and ending colon
class_sig = line->stripWhiteSpace ().mid (6);
class_sig = class_sig.left (class_sig.length () - 1);
@@ -318,7 +318,7 @@ KPyBrowser::parseText (QString & pytext)
}
if ((function_rx.search(*line) >= 0))
{
- //KMessageBox::information(this, *line, QString("Found function on line %1").arg(line_no));
+ //KMessageBox::information(this, *line, TQString("Found function on line %1").arg(line_no));
function_sig = line->stripWhiteSpace ().mid (4);
function_sig = function_sig.left (function_sig.find (":"));
paren_i = function_sig.find ("(");
@@ -336,7 +336,7 @@ KPyBrowser::parseText (QString & pytext)
//now go through the list of old open nodes and open them in the new
//tree. For each node name in the open_nodes list, attempt to find that
//node and in the new dict and open it.
- QValueList<QString>::iterator it;
+ TQValueList<TQString>::iterator it;
PyBrowseNode *tmp_node;
for (it=open_nodes.begin(); it != open_nodes.end(); ++it)
{
@@ -351,9 +351,9 @@ KPyBrowser::parseText (QString & pytext)
void
-KPyBrowser::tip (const QPoint & p, QRect & r, QString & str)
+KPyBrowser::tip (const TQPoint & p, TQRect & r, TQString & str)
{
- QListViewItem *item = (QListViewItem *) itemAt (p);
+ TQListViewItem *item = (TQListViewItem *) itemAt (p);
if (item == NULL)
{
str = "";
@@ -380,15 +380,15 @@ KPyBrowser::tip (const QPoint & p, QRect & r, QString & str)
/////////////////////////////////////////////////////////////////////
// KateFileList::KFLToolTip implementation
-KPyBrowser::KPBToolTip::KPBToolTip (QWidget * parent):QToolTip (parent)
+KPyBrowser::KPBToolTip::KPBToolTip (TQWidget * parent):TQToolTip (parent)
{
}
void
-KPyBrowser::KPBToolTip::maybeTip (const QPoint & p)
+KPyBrowser::KPBToolTip::maybeTip (const TQPoint & p)
{
- QString str;
- QRect r;
+ TQString str;
+ TQRect r;
((KPyBrowser *) parentWidget ())->tip (p, r, str);