summaryrefslogtreecommitdiffstats
path: root/kcachegrind
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:51:49 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:51:49 +0000
commit4ae0c208b66e0f7954e194384464fe2d0a2c56dd (patch)
treeb0a7cd1c184f0003c0292eb416ed27f674f9cc43 /kcachegrind
parent1964ea0fb4ab57493ca2ebb709c8d3b5395fd653 (diff)
downloadtdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.tar.gz
tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcachegrind')
-rw-r--r--kcachegrind/kcachegrind/cachegrindloader.cpp100
-rw-r--r--kcachegrind/kcachegrind/callgraphview.cpp476
-rw-r--r--kcachegrind/kcachegrind/callgraphview.h128
-rw-r--r--kcachegrind/kcachegrind/callitem.cpp32
-rw-r--r--kcachegrind/kcachegrind/callitem.h6
-rw-r--r--kcachegrind/kcachegrind/callmapview.cpp108
-rw-r--r--kcachegrind/kcachegrind/callmapview.h34
-rw-r--r--kcachegrind/kcachegrind/callview.cpp50
-rw-r--r--kcachegrind/kcachegrind/callview.h16
-rw-r--r--kcachegrind/kcachegrind/configdlg.cpp172
-rw-r--r--kcachegrind/kcachegrind/configdlg.h20
-rw-r--r--kcachegrind/kcachegrind/configuration.cpp122
-rw-r--r--kcachegrind/kcachegrind/configuration.h28
-rw-r--r--kcachegrind/kcachegrind/costlistitem.cpp30
-rw-r--r--kcachegrind/kcachegrind/costlistitem.h8
-rw-r--r--kcachegrind/kcachegrind/costtypeitem.cpp22
-rw-r--r--kcachegrind/kcachegrind/costtypeitem.h6
-rw-r--r--kcachegrind/kcachegrind/costtypeview.cpp60
-rw-r--r--kcachegrind/kcachegrind/costtypeview.h18
-rw-r--r--kcachegrind/kcachegrind/coverageitem.cpp76
-rw-r--r--kcachegrind/kcachegrind/coverageitem.h14
-rw-r--r--kcachegrind/kcachegrind/coverageview.cpp46
-rw-r--r--kcachegrind/kcachegrind/coverageview.h16
-rw-r--r--kcachegrind/kcachegrind/dumpmanager.cpp2
-rw-r--r--kcachegrind/kcachegrind/dumpmanager.h12
-rw-r--r--kcachegrind/kcachegrind/dumpselection.cpp2
-rw-r--r--kcachegrind/kcachegrind/dumpselection.h4
-rw-r--r--kcachegrind/kcachegrind/functionitem.cpp38
-rw-r--r--kcachegrind/kcachegrind/functionitem.h10
-rw-r--r--kcachegrind/kcachegrind/functionselection.cpp158
-rw-r--r--kcachegrind/kcachegrind/functionselection.h30
-rw-r--r--kcachegrind/kcachegrind/instritem.cpp92
-rw-r--r--kcachegrind/kcachegrind/instritem.h28
-rw-r--r--kcachegrind/kcachegrind/instrview.cpp98
-rw-r--r--kcachegrind/kcachegrind/instrview.h24
-rw-r--r--kcachegrind/kcachegrind/listutils.cpp48
-rw-r--r--kcachegrind/kcachegrind/listutils.h22
-rw-r--r--kcachegrind/kcachegrind/loader.cpp8
-rw-r--r--kcachegrind/kcachegrind/loader.h24
-rw-r--r--kcachegrind/kcachegrind/main.cpp6
-rw-r--r--kcachegrind/kcachegrind/multiview.cpp24
-rw-r--r--kcachegrind/kcachegrind/multiview.h18
-rw-r--r--kcachegrind/kcachegrind/partgraph.cpp38
-rw-r--r--kcachegrind/kcachegrind/partgraph.h22
-rw-r--r--kcachegrind/kcachegrind/partlistitem.cpp30
-rw-r--r--kcachegrind/kcachegrind/partlistitem.h6
-rw-r--r--kcachegrind/kcachegrind/partselection.cpp54
-rw-r--r--kcachegrind/kcachegrind/partselection.h8
-rw-r--r--kcachegrind/kcachegrind/partview.cpp36
-rw-r--r--kcachegrind/kcachegrind/partview.h12
-rw-r--r--kcachegrind/kcachegrind/pool.cpp2
-rw-r--r--kcachegrind/kcachegrind/sourceitem.cpp92
-rw-r--r--kcachegrind/kcachegrind/sourceitem.h24
-rw-r--r--kcachegrind/kcachegrind/sourceview.cpp104
-rw-r--r--kcachegrind/kcachegrind/sourceview.h20
-rw-r--r--kcachegrind/kcachegrind/stackbrowser.cpp6
-rw-r--r--kcachegrind/kcachegrind/stackbrowser.h2
-rw-r--r--kcachegrind/kcachegrind/stackitem.cpp22
-rw-r--r--kcachegrind/kcachegrind/stackitem.h6
-rw-r--r--kcachegrind/kcachegrind/stackselection.cpp40
-rw-r--r--kcachegrind/kcachegrind/stackselection.h6
-rw-r--r--kcachegrind/kcachegrind/subcost.cpp10
-rw-r--r--kcachegrind/kcachegrind/subcost.h4
-rw-r--r--kcachegrind/kcachegrind/tabview.cpp204
-rw-r--r--kcachegrind/kcachegrind/tabview.h66
-rw-r--r--kcachegrind/kcachegrind/toplevel.cpp486
-rw-r--r--kcachegrind/kcachegrind/toplevel.h52
-rw-r--r--kcachegrind/kcachegrind/tracedata.cpp374
-rw-r--r--kcachegrind/kcachegrind/tracedata.h332
-rw-r--r--kcachegrind/kcachegrind/traceitemview.cpp24
-rw-r--r--kcachegrind/kcachegrind/traceitemview.h22
-rw-r--r--kcachegrind/kcachegrind/treemap.cpp338
-rw-r--r--kcachegrind/kcachegrind/treemap.h178
-rw-r--r--kcachegrind/kcachegrind/utils.cpp10
-rw-r--r--kcachegrind/kcachegrind/utils.h12
75 files changed, 2439 insertions, 2439 deletions
diff --git a/kcachegrind/kcachegrind/cachegrindloader.cpp b/kcachegrind/kcachegrind/cachegrindloader.cpp
index e0bf2b83..0a146de0 100644
--- a/kcachegrind/kcachegrind/cachegrindloader.cpp
+++ b/kcachegrind/kcachegrind/cachegrindloader.cpp
@@ -18,8 +18,8 @@
#include <errno.h>
-#include <qfile.h>
-#include <qcstring.h>
+#include <tqfile.h>
+#include <tqcstring.h>
#include <klocale.h>
#include <kdebug.h>
@@ -42,9 +42,9 @@ class CachegrindLoader: public Loader
public:
CachegrindLoader();
- bool canLoadTrace(QFile* file);
+ bool canLoadTrace(TQFile* file);
bool loadTrace(TracePart*);
- bool isPartOfTrace(QString file, TraceData*);
+ bool isPartOfTrace(TQString file, TraceData*);
private:
bool loadTraceInternal(TracePart*);
@@ -58,17 +58,17 @@ private:
void ensureObject();
void ensureFile();
void ensureFunction();
- void setObject(const QString&);
- void setCalledObject(const QString&);
- void setFile(const QString&);
- void setCalledFile(const QString&);
- void setFunction(const QString&);
- void setCalledFunction(const QString&);
-
- QString _emptyString;
+ void setObject(const TQString&);
+ void setCalledObject(const TQString&);
+ void setFile(const TQString&);
+ void setCalledFile(const TQString&);
+ void setFunction(const TQString&);
+ void setCalledFunction(const TQString&);
+
+ TQString _emptyString;
// current line in file to read in
- QString _filename;
+ TQString _filename;
int _lineNo;
TraceSubMapping* subMapping;
@@ -120,13 +120,13 @@ private:
* "Name" : Regular name
*/
void clearCompression();
- const QString& checkUnknown(const QString& n);
- TraceObject* compressedObject(const QString& name);
- TraceFile* compressedFile(const QString& name);
- TraceFunction* compressedFunction(const QString& name,
+ const TQString& checkUnknown(const TQString& n);
+ TraceObject* compressedObject(const TQString& name);
+ TraceFile* compressedFile(const TQString& name);
+ TraceFunction* compressedFunction(const TQString& name,
TraceFile*, TraceObject*);
- QPtrVector<TraceCostItem> _objectVector, _fileVector, _functionVector;
+ TQPtrVector<TraceCostItem> _objectVector, _fileVector, _functionVector;
};
@@ -140,16 +140,16 @@ CachegrindLoader::CachegrindLoader()
: Loader("Callgrind",
i18n( "Import filter for Cachegrind/Callgrind generated profile data files") )
{
- _emptyString = QString("");
+ _emptyString = TQString("");
}
-bool CachegrindLoader::canLoadTrace(QFile* file)
+bool CachegrindLoader::canLoadTrace(TQFile* file)
{
if (!file) return false;
if (!file->isOpen()) {
if (!file->open( IO_ReadOnly ) ) {
- kdDebug() << QFile::encodeName(_filename) << ": "
+ kdDebug() << TQFile::encodeName(_filename) << ": "
<< strerror( errno ) << endl;
return false;
}
@@ -165,7 +165,7 @@ bool CachegrindLoader::canLoadTrace(QFile* file)
return false;
buf[read] = 0;
- QCString s;
+ TQCString s;
s.setRawData(buf, read+1);
int pos = s.find("events:");
if (pos>0 && buf[pos-1] != '\n') pos = -1;
@@ -181,8 +181,8 @@ bool CachegrindLoader::loadTrace(TracePart* p)
CachegrindLoader l;
/* emit progress signals via the singleton loader */
- connect(&l, SIGNAL(updateStatus(QString, int)),
- this, SIGNAL(updateStatus(QString, int)));
+ connect(&l, TQT_SIGNAL(updateStatus(TQString, int)),
+ this, TQT_SIGNAL(updateStatus(TQString, int)));
return l.loadTraceInternal(p);
}
@@ -335,13 +335,13 @@ void CachegrindLoader::clearCompression()
_functionVector.resize(10000);
}
-const QString& CachegrindLoader::checkUnknown(const QString& n)
+const TQString& CachegrindLoader::checkUnknown(const TQString& n)
{
if (n == "???") return _emptyString;
return n;
}
-TraceObject* CachegrindLoader::compressedObject(const QString& name)
+TraceObject* CachegrindLoader::compressedObject(const TQString& name)
{
if ((name[0] != '(') || !name[1].isDigit()) return _data->object(checkUnknown(name));
@@ -368,7 +368,7 @@ TraceObject* CachegrindLoader::compressedObject(const QString& name)
_objectVector.resize(newSize);
}
- QString realName = checkUnknown(name.mid(p));
+ TQString realName = checkUnknown(name.mid(p));
o = (TraceObject*) _objectVector.at(index);
if (o && (o->name() != realName)) {
kdError() << _filename << ":" << _lineNo
@@ -395,7 +395,7 @@ TraceObject* CachegrindLoader::compressedObject(const QString& name)
// Note: Callgrind sometimes gives different IDs for same file
// (when references to same source file come from different ELF objects)
-TraceFile* CachegrindLoader::compressedFile(const QString& name)
+TraceFile* CachegrindLoader::compressedFile(const TQString& name)
{
if ((name[0] != '(') || !name[1].isDigit()) return _data->file(checkUnknown(name));
@@ -422,7 +422,7 @@ TraceFile* CachegrindLoader::compressedFile(const QString& name)
_fileVector.resize(newSize);
}
- QString realName = checkUnknown(name.mid(p));
+ TQString realName = checkUnknown(name.mid(p));
f = (TraceFile*) _fileVector.at(index);
if (f && (f->name() != realName)) {
kdError() << _filename << ":" << _lineNo
@@ -449,7 +449,7 @@ TraceFile* CachegrindLoader::compressedFile(const QString& name)
// Note: Callgrind gives different IDs even for same function
// when parts of the function are from different source files.
// Thus, it is no error when multiple indexes map to same function.
-TraceFunction* CachegrindLoader::compressedFunction(const QString& name,
+TraceFunction* CachegrindLoader::compressedFunction(const TQString& name,
TraceFile* file,
TraceObject* object)
{
@@ -481,7 +481,7 @@ TraceFunction* CachegrindLoader::compressedFunction(const QString& name,
_functionVector.resize(newSize);
}
- QString realName = checkUnknown(name.mid(p));
+ TQString realName = checkUnknown(name.mid(p));
f = (TraceFunction*) _functionVector.at(index);
if (f && (f->name() != realName)) {
kdError() << _filename << ":" << _lineNo
@@ -528,7 +528,7 @@ void CachegrindLoader::ensureObject()
currentPartObject = currentObject->partObject(_part);
}
-void CachegrindLoader::setObject(const QString& name)
+void CachegrindLoader::setObject(const TQString& name)
{
currentObject = compressedObject(name);
if (!currentObject) {
@@ -543,7 +543,7 @@ void CachegrindLoader::setObject(const QString& name)
currentPartFunction = 0;
}
-void CachegrindLoader::setCalledObject(const QString& name)
+void CachegrindLoader::setCalledObject(const TQString& name)
{
currentCalledObject = compressedObject(name);
@@ -567,7 +567,7 @@ void CachegrindLoader::ensureFile()
currentPartFile = currentFile->partFile(_part);
}
-void CachegrindLoader::setFile(const QString& name)
+void CachegrindLoader::setFile(const TQString& name)
{
currentFile = compressedFile(name);
@@ -583,7 +583,7 @@ void CachegrindLoader::setFile(const QString& name)
currentPartLine = 0;
}
-void CachegrindLoader::setCalledFile(const QString& name)
+void CachegrindLoader::setCalledFile(const TQString& name)
{
currentCalledFile = compressedFile(name);
@@ -616,7 +616,7 @@ void CachegrindLoader::ensureFunction()
currentPartObject);
}
-void CachegrindLoader::setFunction(const QString& name)
+void CachegrindLoader::setFunction(const TQString& name)
{
ensureFile();
ensureObject();
@@ -643,7 +643,7 @@ void CachegrindLoader::setFunction(const QString& name)
currentPartLine = 0;
}
-void CachegrindLoader::setCalledFunction(const QString& name)
+void CachegrindLoader::setCalledFunction(const TQString& name)
{
// if called object/file not set, use current object/file
if (!currentCalledObject) {
@@ -723,7 +723,7 @@ bool CachegrindLoader::loadTraceInternal(TracePart* part)
_part = part;
_data = part->data();
- QFile* pFile = part->file();
+ TQFile* pFile = part->file();
if (!pFile) return false;
@@ -735,7 +735,7 @@ bool CachegrindLoader::loadTraceInternal(TracePart* part)
return false;
}
kdDebug() << "Loading " << _filename << " ..." << endl;
- QString statusMsg = i18n("Loading %1").arg(_filename);
+ TQString statusMsg = i18n("Loading %1").arg(_filename);
int statusProgress = 0;
emit updateStatus(statusMsg,statusProgress);
@@ -762,7 +762,7 @@ bool CachegrindLoader::loadTraceInternal(TracePart* part)
#if TRACE_LOADER
kdDebug() << "[CachegrindLoader] " << _filename << ":" << _lineNo
- << " - '" << QString(line) << "'" << endl;
+ << " - '" << TQString(line) << "'" << endl;
#endif
// if we cannot strip a character, this was an empty line
@@ -776,7 +776,7 @@ bool CachegrindLoader::loadTraceInternal(TracePart* part)
if (!parsePosition(line, currentPos)) {
kdError() << _filename << ":" << _lineNo
<< " - Invalid position specification ('"
- << QString(line) << "')" << endl;
+ << TQString(line) << "')" << endl;
continue;
}
@@ -854,7 +854,7 @@ bool CachegrindLoader::loadTraceInternal(TracePart* part)
// cmd:
if (line.stripPrefix("md:")) {
- QString command = QString(line).stripWhiteSpace();
+ TQString command = TQString(line).stripWhiteSpace();
if (!_data->command().isEmpty() &&
_data->command() != command) {
@@ -953,7 +953,7 @@ bool CachegrindLoader::loadTraceInternal(TracePart* part)
// thread:
if (line.stripPrefix("hread:")) {
- part->setThreadID(QString(line).toInt());
+ part->setThreadID(TQString(line).toInt());
continue;
}
@@ -1017,19 +1017,19 @@ bool CachegrindLoader::loadTraceInternal(TracePart* part)
// part:
if (line.stripPrefix("art:")) {
- part->setPartNumber(QString(line).toInt());
+ part->setPartNumber(TQString(line).toInt());
continue;
}
// pid:
if (line.stripPrefix("id:")) {
- part->setProcessID(QString(line).toInt());
+ part->setProcessID(TQString(line).toInt());
continue;
}
// positions:
if (line.stripPrefix("ositions:")) {
- QString positions(line);
+ TQString positions(line);
hasLineInfo = (positions.find("line")>=0);
hasAddrInfo = (positions.find("instr")>=0);
continue;
@@ -1079,7 +1079,7 @@ bool CachegrindLoader::loadTraceInternal(TracePart* part)
}
kdError() << _filename << ":" << _lineNo
- << " - Invalid line '" << c << QString(line) << "'" << endl;
+ << " - Invalid line '" << c << TQString(line) << "'" << endl;
continue;
}
@@ -1183,7 +1183,7 @@ bool CachegrindLoader::loadTraceInternal(TracePart* part)
if (!line.isEmpty()) {
kdError() << _filename << ":" << _lineNo
<< " - Garbage at end of cost line ('"
- << QString(line) << "')" << endl;
+ << TQString(line) << "')" << endl;
}
}
else if (nextLineType == CallCost) {
@@ -1250,7 +1250,7 @@ bool CachegrindLoader::loadTraceInternal(TracePart* part)
if (!line.isEmpty()) {
kdError() << _filename << ":" << _lineNo
<< " - Garbage at end of call cost line ('"
- << QString(line) << "')" << endl;
+ << TQString(line) << "')" << endl;
}
}
else { // (nextLineType == BoringJump || nextLineType == CondJump)
@@ -1301,7 +1301,7 @@ bool CachegrindLoader::loadTraceInternal(TracePart* part)
if (!line.isEmpty()) {
kdError() << _filename << ":" << _lineNo
<< " - Garbage at end of jump cost line ('"
- << QString(line) << "')" << endl;
+ << TQString(line) << "')" << endl;
}
}
diff --git a/kcachegrind/kcachegrind/callgraphview.cpp b/kcachegrind/kcachegrind/callgraphview.cpp
index f7e50514..990d4014 100644
--- a/kcachegrind/kcachegrind/callgraphview.cpp
+++ b/kcachegrind/kcachegrind/callgraphview.cpp
@@ -23,17 +23,17 @@
#include <stdlib.h>
#include <math.h>
-#include <qtooltip.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qwhatsthis.h>
-#include <qcanvas.h>
-#include <qwmatrix.h>
-#include <qpair.h>
-#include <qpainter.h>
-#include <qpopupmenu.h>
-#include <qstyle.h>
-#include <qprocess.h>
+#include <tqtooltip.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqwhatsthis.h>
+#include <tqcanvas.h>
+#include <tqwmatrix.h>
+#include <tqpair.h>
+#include <tqpainter.h>
+#include <tqpopupmenu.h>
+#include <tqstyle.h>
+#include <tqprocess.h>
#include <kdebug.h>
#include <klocale.h>
@@ -95,8 +95,8 @@ int GraphEdgeList::compareItems(Item item1, Item item2)
dx1 -= x; dy1 -= y;
}
else {
- QPointArray a1 = e1->controlPoints();
- QPointArray a2 = e2->controlPoints();
+ TQPointArray a1 = e1->controlPoints();
+ TQPointArray a2 = e2->controlPoints();
a1.point(a1.count()-2,&x,&y);
a2.point(a2.count()-1,&dx2,&dy2);
dx2 -= x; dy2 -= y;
@@ -300,7 +300,7 @@ GraphEdge::GraphEdge()
_lastFromCaller = true;
}
-QString GraphEdge::prettyName()
+TQString GraphEdge::prettyName()
{
if (_c) return _c->prettyName();
if (_from) return i18n("Call(s) from %1").arg(_from->prettyName());
@@ -369,17 +369,17 @@ TraceCall* GraphEdge::priorVisible()
// GraphOptions
//
-QString GraphOptions::layoutString(Layout l)
+TQString GraphOptions::layoutString(Layout l)
{
- if (l == Circular) return QString("Circular");
- if (l == LeftRight) return QString("LeftRight");
- return QString("TopDown");
+ if (l == Circular) return TQString("Circular");
+ if (l == LeftRight) return TQString("LeftRight");
+ return TQString("TopDown");
}
-GraphOptions::Layout GraphOptions::layout(QString s)
+GraphOptions::Layout GraphOptions::layout(TQString s)
{
- if (s == QString("Circular")) return Circular;
- if (s == QString("LeftRight")) return LeftRight;
+ if (s == TQString("Circular")) return Circular;
+ if (s == TQString("LeftRight")) return LeftRight;
return TopDown;
}
@@ -413,12 +413,12 @@ GraphExporter::GraphExporter()
_go = this;
_tmpFile = 0;
_item = 0;
- reset(0, 0, 0, TraceItem::NoCostType, QString::null);
+ reset(0, 0, 0, TraceItem::NoCostType, TQString::null);
}
GraphExporter::GraphExporter(TraceData* d, TraceFunction* f, TraceCostType* ct,
- TraceItem::CostType gt, QString filename)
+ TraceItem::CostType gt, TQString filename)
{
_go = this;
_tmpFile = 0;
@@ -439,7 +439,7 @@ GraphExporter::~GraphExporter()
void GraphExporter::reset(TraceData*, TraceItem* i, TraceCostType* ct,
- TraceItem::CostType gt, QString filename)
+ TraceItem::CostType gt, TQString filename)
{
_graphCreated = false;
_nodeMap.clear();
@@ -467,7 +467,7 @@ void GraphExporter::reset(TraceData*, TraceItem* i, TraceCostType* ct,
if (!i) return;
if (filename.isEmpty()) {
- _tmpFile = new KTempFile(QString::null, ".dot");
+ _tmpFile = new KTempFile(TQString::null, ".dot");
_dotName = _tmpFile->name();
_useBox = true;
}
@@ -538,18 +538,18 @@ void GraphExporter::writeDot()
{
if (!_item) return;
- QFile* file = 0;
- QTextStream* stream = 0;
+ TQFile* file = 0;
+ TQTextStream* stream = 0;
if (_tmpFile)
stream = _tmpFile->textStream();
else {
- file = new QFile(_dotName);
+ file = new TQFile(_dotName);
if ( !file->open( IO_WriteOnly ) ) {
kdError() << "Can't write dot file '" << _dotName << "'" << endl;
return;
}
- stream = new QTextStream(file);
+ stream = new TQTextStream(file);
}
if (!_graphCreated) createGraph();
@@ -563,7 +563,7 @@ void GraphExporter::writeDot()
*stream << "digraph \"callgraph\" {\n";
if (_go->layout() == LeftRight) {
- *stream << QString(" rankdir=LR;\n");
+ *stream << TQString(" rankdir=LR;\n");
}
else if (_go->layout() == Circular) {
TraceFunction *f = 0;
@@ -579,12 +579,12 @@ void GraphExporter::writeDot()
break;
}
if (f)
- *stream << QString(" center=F%1;\n").arg((long)f, 0, 16);
- *stream << QString(" overlap=false;\n splines=true;\n");
+ *stream << TQString(" center=F%1;\n").arg((long)f, 0, 16);
+ *stream << TQString(" overlap=false;\n splines=true;\n");
}
// for clustering
- QMap<TraceCostItem*,QPtrList<GraphNode> > nLists;
+ TQMap<TraceCostItem*,TQPtrList<GraphNode> > nLists;
GraphNodeMap::Iterator nit;
for ( nit = _nodeMap.begin();
@@ -606,19 +606,19 @@ void GraphExporter::writeDot()
nLists[g].append(&n);
}
- QMap<TraceCostItem*,QPtrList<GraphNode> >::Iterator lit;
+ TQMap<TraceCostItem*,TQPtrList<GraphNode> >::Iterator lit;
int cluster = 0;
for ( lit = nLists.begin();
lit != nLists.end(); ++lit, cluster++ ) {
- QPtrList<GraphNode>& l = lit.data();
+ TQPtrList<GraphNode>& l = lit.data();
TraceCostItem* i = lit.key();
if (_go->clusterGroups() && i) {
- QString iabr = i->prettyName();
+ TQString iabr = i->prettyName();
if ((int)iabr.length() > Configuration::maxSymbolLength())
iabr = iabr.left(Configuration::maxSymbolLength()) + "...";
- *stream << QString("subgraph \"cluster%1\" { label=\"%2\";\n")
+ *stream << TQString("subgraph \"cluster%1\" { label=\"%2\";\n")
.arg(cluster).arg(iabr);
}
@@ -626,25 +626,25 @@ void GraphExporter::writeDot()
for(np = l.first(); np; np = l.next() ) {
TraceFunction* f = np->function();
- QString abr = f->prettyName();
+ TQString abr = f->prettyName();
if ((int)abr.length() > Configuration::maxSymbolLength())
abr = abr.left(Configuration::maxSymbolLength()) + "...";
- *stream << QString(" F%1 [").arg((long)f, 0, 16);
+ *stream << TQString(" F%1 [").arg((long)f, 0, 16);
if (_useBox) {
// make label 3 lines for CallGraphView
- *stream << QString("shape=box,label=\"** %1 **\\n**\\n%2\"];\n")
+ *stream << TQString("shape=box,label=\"** %1 **\\n**\\n%2\"];\n")
.arg(abr)
.arg(SubCost(np->incl).pretty());
}
else
- *stream << QString("label=\"%1\\n%2\"];\n")
+ *stream << TQString("label=\"%1\\n%2\"];\n")
.arg(abr)
.arg(SubCost(np->incl).pretty());
}
if (_go->clusterGroups() && i)
- *stream << QString("}\n");
+ *stream << TQString("}\n");
}
GraphEdgeMap::Iterator eit;
@@ -674,20 +674,20 @@ void GraphExporter::writeDot()
from.callingSet.remove(&e);
to.callerSet.remove(&e);
- *stream << QString(" F%1 -> F%2 [weight=%3")
+ *stream << TQString(" F%1 -> F%2 [weight=%3")
.arg((long)e.from(), 0, 16)
.arg((long)e.to(), 0, 16)
.arg((long)log(log(e.cost)));
if (_go->detailLevel() ==1)
- *stream << QString(",label=\"%1\"")
+ *stream << TQString(",label=\"%1\"")
.arg(SubCost(e.cost).pretty());
else if (_go->detailLevel() ==2)
- *stream << QString(",label=\"%3\\n%4 x\"")
+ *stream << TQString(",label=\"%3\\n%4 x\"")
.arg(SubCost(e.cost).pretty())
.arg(SubCost(e.count).pretty());
- *stream << QString("];\n");
+ *stream << TQString("];\n");
}
if (_go->showSkipped()) {
@@ -713,9 +713,9 @@ void GraphExporter::writeDot()
e->cost = costSum;
e->count = countSum;
- *stream << QString(" R%1 [shape=point,label=\"\"];\n")
+ *stream << TQString(" R%1 [shape=point,label=\"\"];\n")
.arg((long)n.function(), 0, 16);
- *stream << QString(" R%1 -> F%2 [label=\"%3\\n%4 x\",weight=%5];\n")
+ *stream << TQString(" R%1 -> F%2 [label=\"%3\\n%4 x\",weight=%5];\n")
.arg((long)n.function(), 0, 16)
.arg((long)n.function(), 0, 16)
.arg(SubCost(costSum).pretty())
@@ -736,9 +736,9 @@ void GraphExporter::writeDot()
e->cost = costSum;
e->count = countSum;
- *stream << QString(" S%1 [shape=point,label=\"\"];\n")
+ *stream << TQString(" S%1 [shape=point,label=\"\"];\n")
.arg((long)n.function(), 0, 16);
- *stream << QString(" F%1 -> S%2 [label=\"%3\\n%4 x\",weight=%5];\n")
+ *stream << TQString(" F%1 -> S%2 [label=\"%3\\n%4 x\",weight=%5];\n")
.arg((long)n.function(), 0, 16)
.arg((long)n.function(), 0, 16)
.arg(SubCost(costSum).pretty())
@@ -783,7 +783,7 @@ void GraphExporter::sortEdges()
}
}
-TraceFunction* GraphExporter::toFunc(QString s)
+TraceFunction* GraphExporter::toFunc(TQString s)
{
if (s[0] != 'F') return 0;
bool ok;
@@ -963,8 +963,8 @@ void GraphExporter::buildGraph(TraceFunction* f, int d,
//
// PannerView
//
-PannerView::PannerView(QWidget * parent, const char * name)
- : QCanvasView(parent, name, WNoAutoErase | WStaticContents)
+PannerView::PannerView(TQWidget * parent, const char * name)
+ : TQCanvasView(parent, name, WNoAutoErase | WStaticContents)
{
_movingZoomRect = false;
@@ -973,31 +973,31 @@ PannerView::PannerView(QWidget * parent, const char * name)
setBackgroundMode(Qt::NoBackground);
}
-void PannerView::setZoomRect(QRect r)
+void PannerView::setZoomRect(TQRect r)
{
- QRect oldRect = _zoomRect;
+ TQRect oldRect = _zoomRect;
_zoomRect = r;
updateContents(oldRect);
updateContents(_zoomRect);
}
-void PannerView::drawContents(QPainter * p, int clipx, int clipy, int clipw, int cliph)
+void PannerView::drawContents(TQPainter * p, int clipx, int clipy, int clipw, int cliph)
{
- // save/restore around QCanvasView::drawContents seems to be needed
+ // save/restore around TQCanvasView::drawContents seems to be needed
// for QT 3.0 to get the red rectangle drawn correct
p->save();
- QCanvasView::drawContents(p,clipx,clipy,clipw,cliph);
+ TQCanvasView::drawContents(p,clipx,clipy,clipw,cliph);
p->restore();
if (_zoomRect.isValid()) {
p->setPen(red.dark());
p->drawRect(_zoomRect);
p->setPen(red);
- p->drawRect(QRect(_zoomRect.x()+1, _zoomRect.y()+1,
+ p->drawRect(TQRect(_zoomRect.x()+1, _zoomRect.y()+1,
_zoomRect.width()-2, _zoomRect.height()-2));
}
}
-void PannerView::contentsMousePressEvent(QMouseEvent* e)
+void PannerView::contentsMousePressEvent(TQMouseEvent* e)
{
if (_zoomRect.isValid()) {
if (!_zoomRect.contains(e->pos()))
@@ -1009,7 +1009,7 @@ void PannerView::contentsMousePressEvent(QMouseEvent* e)
}
}
-void PannerView::contentsMouseMoveEvent(QMouseEvent* e)
+void PannerView::contentsMouseMoveEvent(TQMouseEvent* e)
{
if (_movingZoomRect) {
emit zoomRectMoved(e->pos().x() - _lastPos.x(), e->pos().y() - _lastPos.y());
@@ -1017,7 +1017,7 @@ void PannerView::contentsMouseMoveEvent(QMouseEvent* e)
}
}
-void PannerView::contentsMouseReleaseEvent(QMouseEvent*)
+void PannerView::contentsMouseReleaseEvent(TQMouseEvent*)
{
_movingZoomRect = false;
emit zoomRectMoveFinished();
@@ -1032,8 +1032,8 @@ void PannerView::contentsMouseReleaseEvent(QMouseEvent*)
//
CanvasNode::CanvasNode(CallGraphView* v, GraphNode* n,
- int x, int y, int w, int h, QCanvas* c)
- : QCanvasRectangle(x, y, w, h, c), _node(n), _view(v)
+ int x, int y, int w, int h, TQCanvas* c)
+ : TQCanvasRectangle(x, y, w, h, c), _node(n), _view(v)
{
setPosition(0, DrawParams::TopCenter);
setPosition(1, DrawParams::BottomCenter);
@@ -1061,7 +1061,7 @@ CanvasNode::CanvasNode(CallGraphView* v, GraphNode* n,
double total = totalCost->subCost(_view->costType());
double inclP = 100.0 * n->incl / total;
if (_view->topLevel()->showPercentage())
- setText(1, QString("%1 %")
+ setText(1, TQString("%1 %")
.arg(inclP, 0, 'f', Configuration::percentPrecision()));
else
setText(1, SubCost(n->incl).pretty());
@@ -1078,15 +1078,15 @@ void CanvasNode::updateGroup()
{
if (!_view || !_node) return;
- QColor c = Configuration::functionColor(_view->groupType(),
+ TQColor c = Configuration::functionColor(_view->groupType(),
_node->function());
setBackColor(c);
update();
}
-void CanvasNode::drawShape(QPainter& p)
+void CanvasNode::drawShape(TQPainter& p)
{
- QRect r = rect(), origRect = r;
+ TQRect r = rect(), origRect = r;
r.setRect(r.x()+1, r.y()+1, r.width()-2, r.height()-2);
@@ -1095,7 +1095,7 @@ void CanvasNode::drawShape(QPainter& p)
r.setRect(r.x()+2, r.y()+2, r.width()-4, r.height()-4);
if (StoredDrawParams::selected() && _view->hasFocus()) {
- _view->style().drawPrimitive( QStyle::PE_FocusRect, &p, r,
+ _view->style().drawPrimitive( TQStyle::PE_FocusRect, &p, r,
_view->colorGroup());
}
@@ -1114,14 +1114,14 @@ void CanvasNode::drawShape(QPainter& p)
//
CanvasEdgeLabel::CanvasEdgeLabel(CallGraphView* v, CanvasEdge* ce,
- int x, int y, int w, int h, QCanvas* c)
- : QCanvasRectangle(x, y, w, h, c), _ce(ce), _view(v)
+ int x, int y, int w, int h, TQCanvas* c)
+ : TQCanvasRectangle(x, y, w, h, c), _ce(ce), _view(v)
{
GraphEdge* e = ce->edge();
if (!e) return;
setPosition(1, DrawParams::TopCenter);
- setText(1, QString("%1 x").arg(SubCost(e->count).pretty()));
+ setText(1, TQString("%1 x").arg(SubCost(e->count).pretty()));
setPosition(0, DrawParams::BottomCenter);
@@ -1141,24 +1141,24 @@ CanvasEdgeLabel::CanvasEdgeLabel(CallGraphView* v, CanvasEdge* ce,
double total = totalCost->subCost(_view->costType());
double inclP = 100.0 * e->cost / total;
if (_view->topLevel()->showPercentage())
- setText(0, QString("%1 %")
+ setText(0, TQString("%1 %")
.arg(inclP, 0, 'f', Configuration::percentPrecision()));
else
setText(0, SubCost(e->cost).pretty());
setPixmap(0, percentagePixmap(25,10,(int)(inclP+.5), Qt::blue, true));
if (e->call() && (e->call()->isRecursion() || e->call()->inCycle())) {
- QString icon = "undo";
+ TQString icon = "undo";
KIconLoader* loader = KApplication::kApplication()->iconLoader();
- QPixmap p= loader->loadIcon(icon, KIcon::Small, 0,
+ TQPixmap p= loader->loadIcon(icon, KIcon::Small, 0,
KIcon::DefaultState, 0, true);
setPixmap(0, p);
}
}
-void CanvasEdgeLabel::drawShape(QPainter& p)
+void CanvasEdgeLabel::drawShape(TQPainter& p)
{
- QRect r = rect();
+ TQRect r = rect();
//p.setPen(blue);
//p.drawRect(r);
RectDrawing d(r);
@@ -1169,23 +1169,23 @@ void CanvasEdgeLabel::drawShape(QPainter& p)
//
// CanvasEdgeArrow
-CanvasEdgeArrow::CanvasEdgeArrow(CanvasEdge* ce, QCanvas* c)
- : QCanvasPolygon(c), _ce(ce)
+CanvasEdgeArrow::CanvasEdgeArrow(CanvasEdge* ce, TQCanvas* c)
+ : TQCanvasPolygon(c), _ce(ce)
{}
-void CanvasEdgeArrow::drawShape(QPainter& p)
+void CanvasEdgeArrow::drawShape(TQPainter& p)
{
if (_ce->isSelected()) p.setBrush(Qt::red);
- QCanvasPolygon::drawShape(p);
+ TQCanvasPolygon::drawShape(p);
}
//
// CanvasEdge
//
-CanvasEdge::CanvasEdge(GraphEdge* e, QCanvas* c)
- : QCanvasSpline(c), _edge(e)
+CanvasEdge::CanvasEdge(GraphEdge* e, TQCanvas* c)
+ : TQCanvasSpline(c), _edge(e)
{
_label = 0;
_arrow = 0;
@@ -1193,12 +1193,12 @@ CanvasEdge::CanvasEdge(GraphEdge* e, QCanvas* c)
void CanvasEdge::setSelected(bool s)
{
- QCanvasItem::setSelected(s);
+ TQCanvasItem::setSelected(s);
update();
if (_arrow) _arrow->setSelected(s);
}
-QPointArray CanvasEdge::areaPoints() const
+TQPointArray CanvasEdge::areaPoints() const
{
int minX = poly[0].x(), minY = poly[0].y();
int maxX = minX, maxY = minY;
@@ -1213,7 +1213,7 @@ QPointArray CanvasEdge::areaPoints() const
if (poly[i].y() > maxY) maxY = poly[i].y();
if (0) qDebug(" P %d: %d/%d", i, poly[i].x(), poly[i].y());
}
- QPointArray a = poly.copy(), b = poly.copy();
+ TQPointArray a = poly.copy(), b = poly.copy();
if (minX == maxX) {
a.translate(-2, 0);
b.translate(2, 0);
@@ -1235,7 +1235,7 @@ QPointArray CanvasEdge::areaPoints() const
return a;
}
-void CanvasEdge::drawShape(QPainter& p)
+void CanvasEdge::drawShape(TQPainter& p)
{
if (isSelected()) p.setPen(Qt::red);
@@ -1247,10 +1247,10 @@ void CanvasEdge::drawShape(QPainter& p)
// CanvasFrame
//
-QPixmap* CanvasFrame::_p = 0;
+TQPixmap* CanvasFrame::_p = 0;
-CanvasFrame::CanvasFrame(CanvasNode* n, QCanvas* c)
- : QCanvasRectangle(c)
+CanvasFrame::CanvasFrame(CanvasNode* n, TQCanvas* c)
+ : TQCanvasRectangle(c)
{
if (!_p) {
@@ -1258,27 +1258,27 @@ CanvasFrame::CanvasFrame(CanvasNode* n, QCanvas* c)
float v1 = 130.0, v2 = 10.0, v = v1, f = 1.03;
// calculate pix size
- QRect r(0, 0, 30, 30);
+ TQRect r(0, 0, 30, 30);
while (v>v2) {
r.setRect(r.x()-d, r.y()-d, r.width()+2*d, r.height()+2*d);
v /= f;
}
- _p = new QPixmap(r.size());
+ _p = new TQPixmap(r.size());
_p->fill(Qt::white);
- QPainter p(_p);
+ TQPainter p(_p);
p.setPen(Qt::NoPen);
r.moveBy(-r.x(), -r.y());
while (v<v1) {
v *= f;
- p.setBrush(QColor(265-(int)v, 265-(int)v, 265-(int)v));
+ p.setBrush(TQColor(265-(int)v, 265-(int)v, 265-(int)v));
- p.drawRect(QRect(r.x(), r.y(), r.width(), d));
- p.drawRect(QRect(r.x(), r.bottom()-d, r.width(), d));
- p.drawRect(QRect(r.x(), r.y()+d, d, r.height()-2*d));
- p.drawRect(QRect(r.right()-d, r.y()+d, d, r.height()-2*d));
+ p.drawRect(TQRect(r.x(), r.y(), r.width(), d));
+ p.drawRect(TQRect(r.x(), r.bottom()-d, r.width(), d));
+ p.drawRect(TQRect(r.x(), r.y()+d, d, r.height()-2*d));
+ p.drawRect(TQRect(r.right()-d, r.y()+d, d, r.height()-2*d));
r.setRect(r.x()+d, r.y()+d, r.width()-2*d, r.height()-2*d);
}
@@ -1290,7 +1290,7 @@ CanvasFrame::CanvasFrame(CanvasNode* n, QCanvas* c)
}
-void CanvasFrame::drawShape(QPainter& p)
+void CanvasFrame::drawShape(TQPainter& p)
{
p.drawPixmap( int(x()), int(y()), *_p );
}
@@ -1305,25 +1305,25 @@ void CanvasFrame::drawShape(QPainter& p)
class CallGraphTip: public QToolTip
{
public:
- CallGraphTip( QWidget* p ):QToolTip(p) {}
+ CallGraphTip( TQWidget* p ):TQToolTip(p) {}
protected:
- void maybeTip( const QPoint & );
+ void maybeTip( const TQPoint & );
};
-void CallGraphTip::maybeTip( const QPoint& pos )
+void CallGraphTip::maybeTip( const TQPoint& pos )
{
if (!parentWidget()->inherits( "CallGraphView" )) return;
CallGraphView* cgv = (CallGraphView*)parentWidget();
- QPoint cPos = cgv->viewportToContents(pos);
+ TQPoint cPos = cgv->viewportToContents(pos);
if (0) qDebug("CallGraphTip for (%d/%d) -> (%d/%d) ?",
pos.x(), pos.y(), cPos.x(), cPos.y());
- QCanvasItemList l = cgv->canvas()->collisions(cPos);
+ TQCanvasItemList l = cgv->canvas()->collisions(cPos);
if (l.count() == 0) return;
- QCanvasItem* i = l.first();
+ TQCanvasItem* i = l.first();
if (i->rtti() == CANVAS_NODE) {
CanvasNode* cn = (CanvasNode*)i;
@@ -1331,10 +1331,10 @@ void CallGraphTip::maybeTip( const QPoint& pos )
if (0) qDebug("CallGraphTip: Mouse on Node '%s'",
n->function()->prettyName().ascii());
- QString tipStr = QString("%1 (%2)").arg(cn->text(0)).arg(cn->text(1));
- QPoint vPosTL = cgv->contentsToViewport(i->boundingRect().topLeft());
- QPoint vPosBR = cgv->contentsToViewport(i->boundingRect().bottomRight());
- tip(QRect(vPosTL, vPosBR), tipStr);
+ TQString tipStr = TQString("%1 (%2)").arg(cn->text(0)).arg(cn->text(1));
+ TQPoint vPosTL = cgv->contentsToViewport(i->boundingRect().topLeft());
+ TQPoint vPosBR = cgv->contentsToViewport(i->boundingRect().bottomRight());
+ tip(TQRect(vPosTL, vPosBR), tipStr);
return;
}
@@ -1351,13 +1351,13 @@ void CallGraphTip::maybeTip( const QPoint& pos )
if (0) qDebug("CallGraphTip: Mouse on Edge '%s'",
e->prettyName().ascii());
- QString tipStr;
+ TQString tipStr;
if (!ce->label())
tipStr = e->prettyName();
else
- tipStr = QString("%1 (%2)")
+ tipStr = TQString("%1 (%2)")
.arg(ce->label()->text(0)).arg(ce->label()->text(1));
- tip(QRect(pos.x()-5,pos.y()-5,pos.x()+5,pos.y()+5), tipStr);
+ tip(TQRect(pos.x()-5,pos.y()-5,pos.x()+5,pos.y()+5), tipStr);
}
}
@@ -1368,8 +1368,8 @@ void CallGraphTip::maybeTip( const QPoint& pos )
// CallGraphView
//
CallGraphView::CallGraphView(TraceItemView* parentView,
- QWidget* parent, const char* name)
- : QCanvasView(parent, name), TraceItemView(parentView)
+ TQWidget* parent, const char* name)
+ : TQCanvasView(parent, name), TraceItemView(parentView)
{
_zoomPosition = DEFAULT_ZOOMPOS;
_lastAutoPosition = TopLeft;
@@ -1383,30 +1383,30 @@ CallGraphView::CallGraphView(TraceItemView* parentView,
_exporter.setGraphOptions(this);
- _completeView->setVScrollBarMode(QScrollView::AlwaysOff);
- _completeView->setHScrollBarMode(QScrollView::AlwaysOff);
+ _completeView->setVScrollBarMode(TQScrollView::AlwaysOff);
+ _completeView->setHScrollBarMode(TQScrollView::AlwaysOff);
_completeView->raise();
_completeView->hide();
- setFocusPolicy(QWidget::StrongFocus);
+ setFocusPolicy(TQWidget::StrongFocus);
setBackgroundMode(Qt::NoBackground);
- connect(this, SIGNAL(contentsMoving(int,int)),
- this, SLOT(contentsMovingSlot(int,int)));
- connect(_completeView, SIGNAL(zoomRectMoved(int,int)),
- this, SLOT(zoomRectMoved(int,int)));
- connect(_completeView, SIGNAL(zoomRectMoveFinished()),
- this, SLOT(zoomRectMoveFinished()));
+ connect(this, TQT_SIGNAL(contentsMoving(int,int)),
+ this, TQT_SLOT(contentsMovingSlot(int,int)));
+ connect(_completeView, TQT_SIGNAL(zoomRectMoved(int,int)),
+ this, TQT_SLOT(zoomRectMoved(int,int)));
+ connect(_completeView, TQT_SIGNAL(zoomRectMoveFinished()),
+ this, TQT_SLOT(zoomRectMoveFinished()));
- QWhatsThis::add( this, whatsThis() );
+ TQWhatsThis::add( this, whatsThis() );
// tooltips...
_tip = new CallGraphTip(this);
_renderProcess = 0;
_prevSelectedNode = 0;
- connect(&_renderTimer, SIGNAL(timeout()),
- this, SLOT(showRenderWarning()));
+ connect(&_renderTimer, TQT_SIGNAL(timeout()),
+ this, TQT_SLOT(showRenderWarning()));
}
CallGraphView::~CallGraphView()
@@ -1420,7 +1420,7 @@ CallGraphView::~CallGraphView()
}
}
-QString CallGraphView::whatsThis() const
+TQString CallGraphView::whatsThis() const
{
return i18n( "<b>Call Graph around active Function</b>"
"<p>Depending on configuration, this view shows "
@@ -1440,11 +1440,11 @@ QString CallGraphView::whatsThis() const
"Call Treemap; the selected function is highlighted.<p>");
}
-void CallGraphView::updateSizes(QSize s)
+void CallGraphView::updateSizes(TQSize s)
{
if (!_canvas) return;
- if (s == QSize(0,0)) s = size();
+ if (s == TQSize(0,0)) s = size();
// the part of the canvas that should be visible
int cWidth = _canvas->width() - 2*_xMargin + 100;
@@ -1478,7 +1478,7 @@ void CallGraphView::updateSizes(QSize s)
_canvas->width(), _canvas->height(),
cWidth, cHeight, zoom);
- QWMatrix wm;
+ TQWMatrix wm;
wm.scale( zoom, zoom );
_completeView->setWorldMatrix(wm);
@@ -1497,22 +1497,22 @@ void CallGraphView::updateSizes(QSize s)
int cvH = _completeView->height();
int x = width()- cvW - verticalScrollBar()->width() -2;
int y = height()-cvH - horizontalScrollBar()->height() -2;
- QPoint oldZoomPos = _completeView->pos();
- QPoint newZoomPos = QPoint(0,0);
+ TQPoint oldZoomPos = _completeView->pos();
+ TQPoint newZoomPos = TQPoint(0,0);
ZoomPosition zp = _zoomPosition;
if (zp == Auto) {
- QPoint tl1Pos = viewportToContents(QPoint(0,0));
- QPoint tl2Pos = viewportToContents(QPoint(cvW,cvH));
- QPoint tr1Pos = viewportToContents(QPoint(x,0));
- QPoint tr2Pos = viewportToContents(QPoint(x+cvW,cvH));
- QPoint bl1Pos = viewportToContents(QPoint(0,y));
- QPoint bl2Pos = viewportToContents(QPoint(cvW,y+cvH));
- QPoint br1Pos = viewportToContents(QPoint(x,y));
- QPoint br2Pos = viewportToContents(QPoint(x+cvW,y+cvH));
- int tlCols = _canvas->collisions(QRect(tl1Pos,tl2Pos)).count();
- int trCols = _canvas->collisions(QRect(tr1Pos,tr2Pos)).count();
- int blCols = _canvas->collisions(QRect(bl1Pos,bl2Pos)).count();
- int brCols = _canvas->collisions(QRect(br1Pos,br2Pos)).count();
+ TQPoint tl1Pos = viewportToContents(TQPoint(0,0));
+ TQPoint tl2Pos = viewportToContents(TQPoint(cvW,cvH));
+ TQPoint tr1Pos = viewportToContents(TQPoint(x,0));
+ TQPoint tr2Pos = viewportToContents(TQPoint(x+cvW,cvH));
+ TQPoint bl1Pos = viewportToContents(TQPoint(0,y));
+ TQPoint bl2Pos = viewportToContents(TQPoint(cvW,y+cvH));
+ TQPoint br1Pos = viewportToContents(TQPoint(x,y));
+ TQPoint br2Pos = viewportToContents(TQPoint(x+cvW,y+cvH));
+ int tlCols = _canvas->collisions(TQRect(tl1Pos,tl2Pos)).count();
+ int trCols = _canvas->collisions(TQRect(tr1Pos,tr2Pos)).count();
+ int blCols = _canvas->collisions(TQRect(bl1Pos,bl2Pos)).count();
+ int brCols = _canvas->collisions(TQRect(br1Pos,br2Pos)).count();
int minCols = tlCols;
zp = _lastAutoPosition;
switch(zp) {
@@ -1532,13 +1532,13 @@ void CallGraphView::updateSizes(QSize s)
switch(zp) {
case TopRight:
- newZoomPos = QPoint(x,0);
+ newZoomPos = TQPoint(x,0);
break;
case BottomLeft:
- newZoomPos = QPoint(0,y);
+ newZoomPos = TQPoint(0,y);
break;
case BottomRight:
- newZoomPos = QPoint(x,y);
+ newZoomPos = TQPoint(x,y);
break;
default:
break;
@@ -1546,7 +1546,7 @@ void CallGraphView::updateSizes(QSize s)
if (newZoomPos != oldZoomPos) _completeView->move(newZoomPos);
}
-void CallGraphView::focusInEvent(QFocusEvent*)
+void CallGraphView::focusInEvent(TQFocusEvent*)
{
if (!_canvas) return;
@@ -1556,13 +1556,13 @@ void CallGraphView::focusInEvent(QFocusEvent*)
}
}
-void CallGraphView::focusOutEvent(QFocusEvent* e)
+void CallGraphView::focusOutEvent(TQFocusEvent* e)
{
// trigger updates as in focusInEvent
focusInEvent(e);
}
-void CallGraphView::keyPressEvent(QKeyEvent* e)
+void CallGraphView::keyPressEvent(TQKeyEvent* e)
{
if (!_canvas) {
e->ignore();
@@ -1639,9 +1639,9 @@ void CallGraphView::keyPressEvent(QKeyEvent* e)
else e->ignore();
}
-void CallGraphView::resizeEvent(QResizeEvent* e)
+void CallGraphView::resizeEvent(TQResizeEvent* e)
{
- QCanvasView::resizeEvent(e);
+ TQCanvasView::resizeEvent(e);
if (_canvas) updateSizes(e->size());
}
@@ -1734,8 +1734,8 @@ void CallGraphView::doUpdate(int changeType)
return;
}
- QCanvasItemList l = _canvas->allItems();
- QCanvasItemList::iterator it;
+ TQCanvasItemList l = _canvas->allItems();
+ TQCanvasItemList::iterator it;
for (it = l.begin();it != l.end(); ++it)
if ((*it)->rtti() == CANVAS_NODE)
((CanvasNode*) (*it))->updateGroup();
@@ -1764,15 +1764,15 @@ void CallGraphView::clear()
setCanvas(0);
}
-void CallGraphView::showText(QString s)
+void CallGraphView::showText(TQString s)
{
clear();
_renderTimer.stop();
- _canvas = new QCanvas(QApplication::desktop()->width(),
- QApplication::desktop()->height());
+ _canvas = new TQCanvas(TQApplication::desktop()->width(),
+ TQApplication::desktop()->height());
- QCanvasText* t = new QCanvasText(s, _canvas);
+ TQCanvasText* t = new TQCanvasText(s, _canvas);
t->move(5, 5);
t->show();
center(0,0);
@@ -1783,7 +1783,7 @@ void CallGraphView::showText(QString s)
void CallGraphView::showRenderWarning()
{
- QString s;
+ TQString s;
if (_renderProcess)
s =i18n("Warning: a long lasting graph layouting is in progress.\n"
@@ -1805,7 +1805,7 @@ void CallGraphView::stopRendering()
_renderProcess->kill();
delete _renderProcess;
_renderProcess = 0;
- _unparsedOutput = QString::null;
+ _unparsedOutput = TQString::null;
_renderTimer.start(200, true);
}
@@ -1817,9 +1817,9 @@ void CallGraphView::refresh()
// we want to keep a selected node item at the same global position
_prevSelectedNode = _selectedNode;
- _prevSelectedPos = QPoint(-1,-1);
+ _prevSelectedPos = TQPoint(-1,-1);
if (_selectedNode) {
- QPoint center = _selectedNode->canvasNode()->boundingRect().center();
+ TQPoint center = _selectedNode->canvasNode()->boundingRect().center();
_prevSelectedPos = contentsToViewport(center);
}
@@ -1846,7 +1846,7 @@ void CallGraphView::refresh()
_exporter.reset(_data, _activeItem, _costType, _groupType);
_exporter.writeDot();
- _renderProcess = new QProcess(this);
+ _renderProcess = new TQProcess(this);
if (_layout == GraphOptions::Circular)
_renderProcess->addArgument( "twopi" );
else
@@ -1854,17 +1854,17 @@ void CallGraphView::refresh()
_renderProcess->addArgument(_exporter.filename());
_renderProcess->addArgument( "-Tplain" );
- connect( _renderProcess, SIGNAL(readyReadStdout()),
- this, SLOT(readDotOutput()) );
- connect( _renderProcess, SIGNAL(processExited()),
- this, SLOT(dotExited()) );
+ connect( _renderProcess, TQT_SIGNAL(readyReadStdout()),
+ this, TQT_SLOT(readDotOutput()) );
+ connect( _renderProcess, TQT_SIGNAL(processExited()),
+ this, TQT_SLOT(dotExited()) );
if (1) kdDebug() << "Running '"
<< _renderProcess->arguments().join(" ")
<< "'..." << endl;
if ( !_renderProcess->start() ) {
- QString e = i18n("No call graph is available because the following\n"
+ TQString e = i18n("No call graph is available because the following\n"
"command cannot be run:\n'%1'\n")
.arg(_renderProcess->arguments().join(" "));
e += i18n("Please check that 'dot' is installed (package GraphViz).");
@@ -1876,7 +1876,7 @@ void CallGraphView::refresh()
return;
}
- _unparsedOutput = QString::null;
+ _unparsedOutput = TQString::null;
// layouting of more than seconds is dubious
_renderTimer.start(1000, true);
@@ -1889,12 +1889,12 @@ void CallGraphView::readDotOutput()
void CallGraphView::dotExited()
{
- QString line, cmd;
+ TQString line, cmd;
CanvasNode *rItem;
- QCanvasEllipse* eItem;
+ TQCanvasEllipse* eItem;
CanvasEdge* sItem;
CanvasEdgeLabel* lItem;
- QTextStream* dotStream;
+ TQTextStream* dotStream;
double scale = 1.0, scaleX = 1.0, scaleY = 1.0;
double dotWidth, dotHeight;
GraphNode* activeNode = 0;
@@ -1903,7 +1903,7 @@ void CallGraphView::dotExited()
_renderTimer.stop();
viewport()->setUpdatesEnabled(false);
clear();
- dotStream = new QTextStream(_unparsedOutput, IO_ReadOnly);
+ dotStream = new TQTextStream(_unparsedOutput, IO_ReadOnly);
int lineno = 0;
while (1) {
@@ -1912,7 +1912,7 @@ void CallGraphView::dotExited()
lineno++;
if (line.isEmpty()) continue;
- QTextStream lineStream(line, IO_ReadOnly);
+ TQTextStream lineStream(line, IO_ReadOnly);
lineStream >> cmd;
if (0) qDebug("%s:%d - line '%s', cmd '%s'",
@@ -1922,7 +1922,7 @@ void CallGraphView::dotExited()
if (cmd == "stop") break;
if (cmd == "graph") {
- QString dotWidthString, dotHeightString;
+ TQString dotWidthString, dotHeightString;
lineStream >> scale >> dotWidthString >> dotHeightString;
dotWidth = dotWidthString.toDouble();
dotHeight = dotHeightString.toDouble();
@@ -1938,14 +1938,14 @@ void CallGraphView::dotExited()
// We use as minimum canvas size the desktop size.
// Otherwise, the canvas would have to be resized on widget resize.
_xMargin = 50;
- if (w < QApplication::desktop()->width())
- _xMargin += (QApplication::desktop()->width()-w)/2;
+ if (w < TQApplication::desktop()->width())
+ _xMargin += (TQApplication::desktop()->width()-w)/2;
_yMargin = 50;
- if (h < QApplication::desktop()->height())
- _yMargin += (QApplication::desktop()->height()-h)/2;
+ if (h < TQApplication::desktop()->height())
+ _yMargin += (TQApplication::desktop()->height()-h)/2;
- _canvas = new QCanvas(int(w+2*_xMargin), int(h+2*_yMargin));
+ _canvas = new TQCanvas(int(w+2*_xMargin), int(h+2*_yMargin));
#if DEBUG_GRAPH
kdDebug() << _exporter.filename().ascii() << ":" << lineno
@@ -1973,7 +1973,7 @@ void CallGraphView::dotExited()
if (cmd == "node") {
// x, y are centered in node
- QString nodeName, label, nodeX, nodeY, nodeWidth, nodeHeight;
+ TQString nodeName, label, nodeX, nodeY, nodeWidth, nodeHeight;
double x, y, width, height;
lineStream >> nodeName >> nodeX >> nodeY >> nodeWidth >> nodeHeight;
x = nodeX.toDouble();
@@ -2001,7 +2001,7 @@ void CallGraphView::dotExited()
// Unnamed nodes with collapsed edges (with 'R' and 'S')
if (nodeName[0] == 'R' || nodeName[0] == 'S') {
w = 10, h = 10;
- eItem = new QCanvasEllipse(w, h, _canvas);
+ eItem = new TQCanvasEllipse(w, h, _canvas);
eItem->move(xx, yy);
eItem->setBrush(Qt::gray);
eItem->setZ(1.0);
@@ -2032,9 +2032,9 @@ void CallGraphView::dotExited()
// edge
- QString node1Name, node2Name, label, edgeX, edgeY;
+ TQString node1Name, node2Name, label, edgeX, edgeY;
double x, y;
- QPointArray pa;
+ TQPointArray pa;
int points, i;
lineStream >> node1Name >> node2Name >> points;
@@ -2074,7 +2074,7 @@ void CallGraphView::dotExited()
}
// calls into/out of cycles are special: make them blue
- QColor arrowColor = Qt::black;
+ TQColor arrowColor = Qt::black;
TraceFunction* caller = e->fromNode() ? e->fromNode()->function() : 0;
TraceFunction* called = e->toNode() ? e->toNode()->function() : 0;
if ( (caller && (caller->cycle() == caller)) ||
@@ -2083,7 +2083,7 @@ void CallGraphView::dotExited()
sItem = new CanvasEdge(e, _canvas);
e->setCanvasEdge(sItem);
sItem->setControlPoints(pa, false);
- sItem->setPen(QPen(arrowColor, 1 /*(int)log(log(e->cost))*/ ));
+ sItem->setPen(TQPen(arrowColor, 1 /*(int)log(log(e->cost))*/ ));
sItem->setZ(0.5);
sItem->show();
@@ -2092,14 +2092,14 @@ void CallGraphView::dotExited()
sItem->setSelected(e == _selectedEdge);
// Arrow head
- QPoint arrowDir;
+ TQPoint arrowDir;
int indexHead = -1;
// check if head is at start of spline...
// this is needed because dot always gives points from top to bottom
CanvasNode* fromNode = e->fromNode() ? e->fromNode()->canvasNode() : 0;
if (fromNode) {
- QPoint toCenter = fromNode->rect().center();
+ TQPoint toCenter = fromNode->rect().center();
int dx0 = pa.point(0).x() - toCenter.x();
int dy0 = pa.point(0).y() - toCenter.y();
int dx1 = pa.point(points-1).x() - toCenter.x();
@@ -2127,11 +2127,11 @@ void CallGraphView::dotExited()
// arrow around pa.point(indexHead) with direction arrowDir
arrowDir *= 10.0/sqrt(double(arrowDir.x()*arrowDir.x() +
arrowDir.y()*arrowDir.y()));
- QPointArray a(3);
+ TQPointArray a(3);
a.setPoint(0, pa.point(indexHead) + arrowDir);
- a.setPoint(1, pa.point(indexHead) + QPoint(arrowDir.y()/2,
+ a.setPoint(1, pa.point(indexHead) + TQPoint(arrowDir.y()/2,
-arrowDir.x()/2));
- a.setPoint(2, pa.point(indexHead) + QPoint(-arrowDir.y()/2,
+ a.setPoint(2, pa.point(indexHead) + TQPoint(-arrowDir.y()/2,
arrowDir.x()/2));
if (0) qDebug(" Arrow: ( %d/%d, %d/%d, %d/%d)",
@@ -2151,7 +2151,7 @@ void CallGraphView::dotExited()
if (lineStream.atEnd()) continue;
// parse quoted label
- QChar c;
+ TQChar c;
lineStream >> c;
while (c.isSpace()) lineStream >> c;
if (c != '\"') {
@@ -2194,19 +2194,19 @@ void CallGraphView::dotExited()
// _exporter.sortEdges();
if (!_canvas) {
- _canvas = new QCanvas(size().width(),size().height());
- QString s = i18n("Error running the graph layouting tool.\n");
+ _canvas = new TQCanvas(size().width(),size().height());
+ TQString s = i18n("Error running the graph layouting tool.\n");
s += i18n("Please check that 'dot' is installed (package GraphViz).");
- QCanvasText* t = new QCanvasText(s, _canvas);
+ TQCanvasText* t = new TQCanvasText(s, _canvas);
t->move(5, 5);
t->show();
center(0,0);
}
else if (!activeNode && !activeEdge) {
- QString s = i18n("There is no call graph available for function\n"
+ TQString s = i18n("There is no call graph available for function\n"
"\t'%1'\n"
"because it has no cost of the selected event type.");
- QCanvasText* t = new QCanvasText(s.arg(_activeItem->name()), _canvas);
+ TQCanvasText* t = new TQCanvasText(s.arg(_activeItem->name()), _canvas);
// t->setTextFlags(Qt::AlignHCenter | Qt::AlignVCenter);
t->move(5,5);
t->show();
@@ -2273,7 +2273,7 @@ void CallGraphView::dotExited()
void CallGraphView::contentsMovingSlot(int x, int y)
{
- QRect z(int(x * _cvZoom), int(y * _cvZoom),
+ TQRect z(int(x * _cvZoom), int(y * _cvZoom),
int(visibleWidth() * _cvZoom)-1, int(visibleHeight() * _cvZoom)-1);
if (0) qDebug("moving: (%d,%d) => (%d/%d - %dx%d)",
x, y, z.x(), z.y(), z.width(), z.height());
@@ -2292,16 +2292,16 @@ void CallGraphView::zoomRectMoveFinished()
if (_zoomPosition == Auto) updateSizes();
}
-void CallGraphView::contentsMousePressEvent(QMouseEvent* e)
+void CallGraphView::contentsMousePressEvent(TQMouseEvent* e)
{
// clicking on the viewport sets focus
setFocus();
_isMoving = true;
- QCanvasItemList l = canvas()->collisions(e->pos());
+ TQCanvasItemList l = canvas()->collisions(e->pos());
if (l.count()>0) {
- QCanvasItem* i = l.first();
+ TQCanvasItem* i = l.first();
if (i->rtti() == CANVAS_NODE) {
GraphNode* n = ((CanvasNode*)i)->node();
@@ -2328,7 +2328,7 @@ void CallGraphView::contentsMousePressEvent(QMouseEvent* e)
_lastPos = e->globalPos();
}
-void CallGraphView::contentsMouseMoveEvent(QMouseEvent* e)
+void CallGraphView::contentsMouseMoveEvent(TQMouseEvent* e)
{
if (_isMoving) {
int dx = e->globalPos().x() - _lastPos.x();
@@ -2338,17 +2338,17 @@ void CallGraphView::contentsMouseMoveEvent(QMouseEvent* e)
}
}
-void CallGraphView::contentsMouseReleaseEvent(QMouseEvent*)
+void CallGraphView::contentsMouseReleaseEvent(TQMouseEvent*)
{
_isMoving = false;
if (_zoomPosition == Auto) updateSizes();
}
-void CallGraphView::contentsMouseDoubleClickEvent(QMouseEvent* e)
+void CallGraphView::contentsMouseDoubleClickEvent(TQMouseEvent* e)
{
- QCanvasItemList l = canvas()->collisions(e->pos());
+ TQCanvasItemList l = canvas()->collisions(e->pos());
if (l.count() == 0) return;
- QCanvasItem* i = l.first();
+ TQCanvasItem* i = l.first();
if (i->rtti() == CANVAS_NODE) {
GraphNode* n = ((CanvasNode*)i)->node();
@@ -2375,12 +2375,12 @@ void CallGraphView::contentsMouseDoubleClickEvent(QMouseEvent* e)
}
}
-void CallGraphView::contentsContextMenuEvent(QContextMenuEvent* e)
+void CallGraphView::contentsContextMenuEvent(TQContextMenuEvent* e)
{
- QCanvasItemList l = canvas()->collisions(e->pos());
- QCanvasItem* i = (l.count() == 0) ? 0 : l.first();
+ TQCanvasItemList l = canvas()->collisions(e->pos());
+ TQCanvasItem* i = (l.count() == 0) ? 0 : l.first();
- QPopupMenu popup;
+ TQPopupMenu popup;
TraceFunction *f = 0, *cycle = 0;
TraceCall* c = 0;
@@ -2392,7 +2392,7 @@ void CallGraphView::contentsContextMenuEvent(QContextMenuEvent* e)
f = n->function();
cycle = f->cycle();
- QString name = f->prettyName();
+ TQString name = f->prettyName();
popup.insertItem(i18n("Go to '%1'")
.arg(Configuration::shortenSymbol(name)), 93);
if (cycle && (cycle != f)) {
@@ -2414,7 +2414,7 @@ void CallGraphView::contentsContextMenuEvent(QContextMenuEvent* e)
e->prettyName().ascii());
c = e->call();
if (c) {
- QString name = c->prettyName();
+ TQString name = c->prettyName();
popup.insertItem(i18n("Go to '%1'")
.arg(Configuration::shortenSymbol(name)), 95);
@@ -2431,14 +2431,14 @@ void CallGraphView::contentsContextMenuEvent(QContextMenuEvent* e)
addGoMenu(&popup);
popup.insertSeparator();
- QPopupMenu epopup;
+ TQPopupMenu epopup;
epopup.insertItem(i18n("As PostScript"), 201);
epopup.insertItem(i18n("As Image ..."), 202);
popup.insertItem(i18n("Export Graph"), &epopup, 200);
popup.insertSeparator();
- QPopupMenu gpopup1;
+ TQPopupMenu gpopup1;
gpopup1.setCheckable(true);
gpopup1.insertItem(i18n("Unlimited"), 100);
gpopup1.setItemEnabled(100, (_funcLimit>0.005));
@@ -2461,7 +2461,7 @@ void CallGraphView::contentsContextMenuEvent(QContextMenuEvent* e)
gpopup1.setItemChecked(106,true); break;
}
- QPopupMenu gpopup2;
+ TQPopupMenu gpopup2;
gpopup2.setCheckable(true);
gpopup2.insertItem(i18n("Unlimited"), 110);
gpopup2.setItemEnabled(110, (_funcLimit>0.005));
@@ -2484,7 +2484,7 @@ void CallGraphView::contentsContextMenuEvent(QContextMenuEvent* e)
gpopup2.setItemChecked(116,true); break;
}
- QPopupMenu gpopup3;
+ TQPopupMenu gpopup3;
gpopup3.setCheckable(true);
gpopup3.insertItem(i18n("No Minimum"), 120);
gpopup3.setItemEnabled(120,
@@ -2511,7 +2511,7 @@ void CallGraphView::contentsContextMenuEvent(QContextMenuEvent* e)
else gpopup3.setItemChecked(128,true);
double oldFuncLimit = _funcLimit;
- QPopupMenu gpopup4;
+ TQPopupMenu gpopup4;
gpopup4.setCheckable(true);
gpopup4.insertItem(i18n("Same as Node"), 160);
gpopup4.insertItem(i18n("50 % of Node"), 161);
@@ -2524,7 +2524,7 @@ void CallGraphView::contentsContextMenuEvent(QContextMenuEvent* e)
else if (_callLimit >= 0.2 * _funcLimit) gpopup4.setItemChecked(162,true);
else gpopup4.setItemChecked(163,true);
- QPopupMenu gpopup;
+ TQPopupMenu gpopup;
gpopup.setCheckable(true);
gpopup.insertItem(i18n("Caller Depth"), &gpopup1, 80);
gpopup.insertItem(i18n("Callee Depth"), &gpopup2, 81);
@@ -2538,7 +2538,7 @@ void CallGraphView::contentsContextMenuEvent(QContextMenuEvent* e)
gpopup.insertItem(i18n("Cluster Groups"), 132);
gpopup.setItemChecked(132,_clusterGroups);
- QPopupMenu vpopup;
+ TQPopupMenu vpopup;
vpopup.setCheckable(true);
vpopup.insertItem(i18n("Compact"), 140);
vpopup.insertItem(i18n("Normal"), 141);
@@ -2554,7 +2554,7 @@ void CallGraphView::contentsContextMenuEvent(QContextMenuEvent* e)
vpopup.setItemChecked(151,_layout == LeftRight);
vpopup.setItemChecked(152,_layout == Circular);
- QPopupMenu opopup;
+ TQPopupMenu opopup;
opopup.insertItem(i18n("TopLeft"), 170);
opopup.insertItem(i18n("TopRight"), 171);
opopup.insertItem(i18n("BottomLeft"), 172);
@@ -2585,7 +2585,7 @@ void CallGraphView::contentsContextMenuEvent(QContextMenuEvent* e)
if (!f) break;
GraphExporter ge(data(), f, costType(), groupType(),
- QString("callgraph.dot"));
+ TQString("callgraph.dot"));
ge.setGraphOptions(this);
ge.writeDot();
@@ -2598,11 +2598,11 @@ void CallGraphView::contentsContextMenuEvent(QContextMenuEvent* e)
{
if (!_canvas) return;
- QString fn = KFileDialog::getSaveFileName(":","*.png");
+ TQString fn = KFileDialog::getSaveFileName(":","*.png");
if (!fn.isEmpty()) {
- QPixmap pix(_canvas->size());
- QPainter p(&pix);
+ TQPixmap pix(_canvas->size());
+ TQPainter p(&pix);
_canvas->drawArea( _canvas->rect(), &p );
pix.save(fn,"PNG");
}
@@ -2664,29 +2664,29 @@ void CallGraphView::contentsContextMenuEvent(QContextMenuEvent* e)
if (r>169 && r<180) updateSizes();
}
-CallGraphView::ZoomPosition CallGraphView::zoomPos(QString s)
+CallGraphView::ZoomPosition CallGraphView::zoomPos(TQString s)
{
- if (s == QString("TopLeft")) return TopLeft;
- if (s == QString("TopRight")) return TopRight;
- if (s == QString("BottomLeft")) return BottomLeft;
- if (s == QString("BottomRight")) return BottomRight;
- if (s == QString("Automatic")) return Auto;
+ if (s == TQString("TopLeft")) return TopLeft;
+ if (s == TQString("TopRight")) return TopRight;
+ if (s == TQString("BottomLeft")) return BottomLeft;
+ if (s == TQString("BottomRight")) return BottomRight;
+ if (s == TQString("Automatic")) return Auto;
return DEFAULT_ZOOMPOS;
}
-QString CallGraphView::zoomPosString(ZoomPosition p)
+TQString CallGraphView::zoomPosString(ZoomPosition p)
{
- if (p == TopRight) return QString("TopRight");
- if (p == BottomLeft) return QString("BottomLeft");
- if (p == BottomRight) return QString("BottomRight");
- if (p == Auto) return QString("Automatic");
+ if (p == TopRight) return TQString("TopRight");
+ if (p == BottomLeft) return TQString("BottomLeft");
+ if (p == BottomRight) return TQString("BottomRight");
+ if (p == Auto) return TQString("Automatic");
- return QString("TopLeft");
+ return TQString("TopLeft");
}
void CallGraphView::readViewConfig(KConfig* c,
- QString prefix, QString postfix, bool)
+ TQString prefix, TQString postfix, bool)
{
KConfigGroup* g = configGroup(c, prefix, postfix);
@@ -2710,7 +2710,7 @@ void CallGraphView::readViewConfig(KConfig* c,
}
void CallGraphView::saveViewConfig(KConfig* c,
- QString prefix, QString postfix, bool)
+ TQString prefix, TQString postfix, bool)
{
KConfigGroup g(c, (prefix+postfix).ascii());
diff --git a/kcachegrind/kcachegrind/callgraphview.h b/kcachegrind/kcachegrind/callgraphview.h
index 8f154e6c..dcabc0ef 100644
--- a/kcachegrind/kcachegrind/callgraphview.h
+++ b/kcachegrind/kcachegrind/callgraphview.h
@@ -23,10 +23,10 @@
#ifndef CALLGRAPHVIEW_H
#define CALLGRAPHVIEW_H
-#include <qcanvas.h>
-#include <qwidget.h>
-#include <qmap.h>
-#include <qtimer.h>
+#include <tqcanvas.h>
+#include <tqwidget.h>
+#include <tqmap.h>
+#include <tqtimer.h>
#include "treemap.h" // for DrawParams
#include "tracedata.h"
@@ -42,7 +42,7 @@ class CallGraphView;
// sorts according start/end position of a call arc
// this depends on attached CanvasEdge's !
-class GraphEdgeList: public QPtrList<GraphEdge>
+class GraphEdgeList: public TQPtrList<GraphEdge>
{
public:
GraphEdgeList();
@@ -56,7 +56,7 @@ class GraphEdgeList: public QPtrList<GraphEdge>
};
-typedef QMap<GraphEdge*, int> GraphEdgeSet;
+typedef TQMap<GraphEdge*, int> GraphEdgeSet;
// temporary parts of call graph to be shown
class GraphNode
@@ -120,7 +120,7 @@ public:
TraceFunction* to() { return _to; }
// has special cases for collapsed edges
- QString prettyName();
+ TQString prettyName();
void setCaller(TraceFunction* f) { _from = f; }
void setCalling(TraceFunction* f) { _to = f; }
@@ -149,8 +149,8 @@ public:
};
-typedef QMap<TraceFunction*, GraphNode> GraphNodeMap;
-typedef QMap<QPair<TraceFunction*, TraceFunction*>, GraphEdge> GraphEdgeMap;
+typedef TQMap<TraceFunction*, GraphNode> GraphNodeMap;
+typedef TQMap<QPair<TraceFunction*, TraceFunction*>, GraphEdge> GraphEdgeMap;
/* Abstract Interface for graph options */
@@ -169,8 +169,8 @@ class GraphOptions
virtual int detailLevel() = 0;
virtual Layout layout() = 0;
- static QString layoutString(Layout);
- static Layout layout(QString);
+ static TQString layoutString(Layout);
+ static Layout layout(TQString);
};
/* Graph Options Storage */
@@ -220,13 +220,13 @@ class GraphExporter: public StorableGraphOptions
public:
GraphExporter();
GraphExporter(TraceData*, TraceFunction*, TraceCostType*,
- TraceItem::CostType, QString filename = QString::null);
+ TraceItem::CostType, TQString filename = TQString::null);
virtual ~GraphExporter();
void reset(TraceData*, TraceItem*, TraceCostType*,
- TraceItem::CostType, QString filename = QString::null);
+ TraceItem::CostType, TQString filename = TQString::null);
- QString filename() { return _dotName; }
+ TQString filename() { return _dotName; }
int edgeCount() { return _edgeMap.count(); }
int nodeCount() { return _nodeMap.count(); }
@@ -246,7 +246,7 @@ public:
* Don't use the returned pointer directly, but only with
* node() or edge(), because it could be a dangling pointer.
*/
- TraceFunction* toFunc(QString);
+ TraceFunction* toFunc(TQString);
GraphNode* node(TraceFunction*);
GraphEdge* edge(TraceFunction*, TraceFunction*);
@@ -259,7 +259,7 @@ public:
private:
void buildGraph(TraceFunction*, int, bool, double);
- QString _dotName;
+ TQString _dotName;
TraceItem* _item;
TraceCostType* _costType;
TraceItem::CostType _groupType;
@@ -286,23 +286,23 @@ class PannerView: public QCanvasView
Q_OBJECT
public:
- PannerView(QWidget * parent = 0, const char * name = 0);
+ PannerView(TQWidget * parent = 0, const char * name = 0);
- void setZoomRect(QRect r);
+ void setZoomRect(TQRect r);
signals:
void zoomRectMoved(int dx, int dy);
void zoomRectMoveFinished();
protected:
- void contentsMousePressEvent(QMouseEvent*);
- void contentsMouseMoveEvent(QMouseEvent*);
- void contentsMouseReleaseEvent(QMouseEvent*);
- void drawContents(QPainter * p, int clipx, int clipy, int clipw, int cliph);
+ void contentsMousePressEvent(TQMouseEvent*);
+ void contentsMouseMoveEvent(TQMouseEvent*);
+ void contentsMouseReleaseEvent(TQMouseEvent*);
+ void drawContents(TQPainter * p, int clipx, int clipy, int clipw, int cliph);
- QRect _zoomRect;
+ TQRect _zoomRect;
bool _movingZoomRect;
- QPoint _lastPos;
+ TQPoint _lastPos;
};
@@ -321,14 +321,14 @@ enum {
CANVAS_FRAME
};
-class CanvasNode: public QCanvasRectangle, public StoredDrawParams
+class CanvasNode: public TQCanvasRectangle, public StoredDrawParams
{
public:
- CanvasNode(CallGraphView*,GraphNode*, int, int, int, int, QCanvas*);
+ CanvasNode(CallGraphView*,GraphNode*, int, int, int, int, TQCanvas*);
void updateGroup();
void setSelected(bool);
- void drawShape(QPainter&);
+ void drawShape(TQPainter&);
GraphNode* node() { return _node; }
int rtti() const { return CANVAS_NODE; }
@@ -338,12 +338,12 @@ private:
CallGraphView* _view;
};
-class CanvasEdgeLabel: public QCanvasRectangle, public StoredDrawParams
+class CanvasEdgeLabel: public TQCanvasRectangle, public StoredDrawParams
{
public:
- CanvasEdgeLabel(CallGraphView*, CanvasEdge*, int, int, int, int, QCanvas*);
+ CanvasEdgeLabel(CallGraphView*, CanvasEdge*, int, int, int, int, TQCanvas*);
- void drawShape(QPainter&);
+ void drawShape(TQPainter&);
CanvasEdge* canvasEdge() { return _ce; }
int rtti() const { return CANVAS_EDGELABEL; }
@@ -356,9 +356,9 @@ private:
class CanvasEdgeArrow: public QCanvasPolygon
{
public:
- CanvasEdgeArrow(CanvasEdge*, QCanvas*);
+ CanvasEdgeArrow(CanvasEdge*, TQCanvas*);
- void drawShape(QPainter&);
+ void drawShape(TQPainter&);
CanvasEdge* canvasEdge() { return _ce; }
int rtti() const { return CANVAS_EDGEARROW; }
@@ -371,11 +371,11 @@ private:
class CanvasEdge: public QCanvasSpline
{
public:
- CanvasEdge(GraphEdge*, QCanvas*);
+ CanvasEdge(GraphEdge*, TQCanvas*);
void setSelected(bool);
- void drawShape(QPainter&);
- QPointArray areaPoints() const;
+ void drawShape(TQPainter&);
+ TQPointArray areaPoints() const;
CanvasEdgeLabel* label() { return _label; }
void setLabel(CanvasEdgeLabel* l) { _label = l; }
@@ -395,13 +395,13 @@ private:
class CanvasFrame: public QCanvasRectangle
{
public:
- CanvasFrame( CanvasNode*, QCanvas *canvas );
+ CanvasFrame( CanvasNode*, TQCanvas *canvas );
int rtti () const { return CANVAS_FRAME; }
- bool hit( const QPoint&) const { return false; }
+ bool hit( const TQPoint&) const { return false; }
protected:
- void drawShape( QPainter & );
+ void drawShape( TQPainter & );
private:
- static QPixmap* _p;
+ static TQPixmap* _p;
};
@@ -412,7 +412,7 @@ class CallGraphTip;
* and another zoomed out CanvasView in a border acting as
* a panner to select to visible part (only if needed)
*/
-class CallGraphView: public QCanvasView, public TraceItemView,
+class CallGraphView: public TQCanvasView, public TraceItemView,
public StorableGraphOptions
{
Q_OBJECT
@@ -421,18 +421,18 @@ public:
enum ZoomPosition { TopLeft, TopRight, BottomLeft, BottomRight, Auto };
CallGraphView(TraceItemView* parentView,
- QWidget* parent=0, const char* name=0);
+ TQWidget* parent=0, const char* name=0);
~CallGraphView();
- void readViewConfig(KConfig*, QString prefix, QString postfix, bool);
- void saveViewConfig(KConfig*, QString prefix, QString postfix, bool);
+ void readViewConfig(KConfig*, TQString prefix, TQString postfix, bool);
+ void saveViewConfig(KConfig*, TQString prefix, TQString postfix, bool);
- QWidget* widget() { return this; }
- QString whatsThis() const;
+ TQWidget* widget() { return this; }
+ TQString whatsThis() const;
ZoomPosition zoomPos() const { return _zoomPosition; }
- static ZoomPosition zoomPos(QString);
- static QString zoomPosString(ZoomPosition);
+ static ZoomPosition zoomPos(TQString);
+ static TQString zoomPosString(ZoomPosition);
public slots:
void contentsMovingSlot(int,int);
@@ -445,26 +445,26 @@ public slots:
void dotExited();
protected:
- void resizeEvent(QResizeEvent*);
- void contentsMousePressEvent(QMouseEvent*);
- void contentsMouseMoveEvent(QMouseEvent*);
- void contentsMouseReleaseEvent(QMouseEvent*);
- void contentsMouseDoubleClickEvent(QMouseEvent*);
- void contentsContextMenuEvent(QContextMenuEvent*);
- void keyPressEvent(QKeyEvent*);
- void focusInEvent(QFocusEvent*);
- void focusOutEvent(QFocusEvent*);
+ void resizeEvent(TQResizeEvent*);
+ void contentsMousePressEvent(TQMouseEvent*);
+ void contentsMouseMoveEvent(TQMouseEvent*);
+ void contentsMouseReleaseEvent(TQMouseEvent*);
+ void contentsMouseDoubleClickEvent(TQMouseEvent*);
+ void contentsContextMenuEvent(TQContextMenuEvent*);
+ void keyPressEvent(TQKeyEvent*);
+ void focusInEvent(TQFocusEvent*);
+ void focusOutEvent(TQFocusEvent*);
private:
- void updateSizes(QSize s = QSize(0,0));
+ void updateSizes(TQSize s = TQSize(0,0));
TraceItem* canShow(TraceItem*);
void doUpdate(int);
void refresh();
void makeFrame(CanvasNode*, bool active);
void clear();
- void showText(QString);
+ void showText(TQString);
- QCanvas *_canvas;
+ TQCanvas *_canvas;
int _xMargin, _yMargin;
PannerView *_completeView;
double _cvZoom;
@@ -472,7 +472,7 @@ private:
CallGraphTip* _tip;
bool _isMoving;
- QPoint _lastPos;
+ TQPoint _lastPos;
GraphExporter _exporter;
@@ -483,11 +483,11 @@ private:
ZoomPosition _zoomPosition, _lastAutoPosition;
// background rendering
- QProcess* _renderProcess;
- QTimer _renderTimer;
+ TQProcess* _renderProcess;
+ TQTimer _renderTimer;
GraphNode* _prevSelectedNode;
- QPoint _prevSelectedPos;
- QString _unparsedOutput;
+ TQPoint _prevSelectedPos;
+ TQString _unparsedOutput;
};
diff --git a/kcachegrind/kcachegrind/callitem.cpp b/kcachegrind/kcachegrind/callitem.cpp
index 67200daa..ebca4903 100644
--- a/kcachegrind/kcachegrind/callitem.cpp
+++ b/kcachegrind/kcachegrind/callitem.cpp
@@ -20,7 +20,7 @@
* Items for caller/callee view.
*/
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <klocale.h>
#include <kapplication.h>
#include <kiconloader.h>
@@ -34,8 +34,8 @@
// CallItem
-CallItem::CallItem(CallView* view, QListView* parent, TraceCall* c)
- : QListViewItem(parent)
+CallItem::CallItem(CallView* view, TQListView* parent, TraceCall* c)
+ : TQListViewItem(parent)
{
_call = c;
_view = view;
@@ -43,7 +43,7 @@ CallItem::CallItem(CallView* view, QListView* parent, TraceCall* c)
_active = _view->activeFunction();
bool baseIsCycle = (_active && (_active == _active->cycle()));
- QString fName;
+ TQString fName;
if (_view->showCallers()) {
_shown = _call->caller(true);
fName = c->callerName(!baseIsCycle);
@@ -62,7 +62,7 @@ CallItem::CallItem(CallView* view, QListView* parent, TraceCall* c)
void CallItem::updateGroup()
{
- QColor c = Configuration::functionColor(_view->groupType(), _shown);
+ TQColor c = Configuration::functionColor(_view->groupType(), _shown);
setPixmap(3, colorPixmap(10, 10, c));
}
@@ -73,7 +73,7 @@ void CallItem::updateCost()
bool selectedIsCycle = (_active == _active->cycle());
if (_call->isRecursion()) sameCycle=true;
- QString cStr;
+ TQString cStr;
if ((selectedIsCycle || shownIsCycle) && sameCycle)
cStr = "-";
else {
@@ -100,16 +100,16 @@ void CallItem::updateCost()
double total = totalCost->subCost(ct);
if (total == 0.0) {
- QString str = "-";
+ TQString str = "-";
setText(0, str);
- setPixmap(0, QPixmap());
+ setPixmap(0, TQPixmap());
}
else {
double sum = 100.0 * _sum / total;
if (_view->topLevel()->showPercentage())
- setText(0, QString("%1")
+ setText(0, TQString("%1")
.arg(sum, 0, 'f', Configuration::percentPrecision()));
else
setText(0, _call->prettySubCost(ct));
@@ -124,16 +124,16 @@ void CallItem::updateCost()
double total = totalCost->subCost(ct2);
if (total == 0.0) {
- QString str = "-";
+ TQString str = "-";
setText(1, str);
- setPixmap(1, QPixmap());
+ setPixmap(1, TQPixmap());
}
else {
double sum = 100.0 * _sum2 / total;
if (_view->topLevel()->showPercentage())
- setText(1, QString("%1")
+ setText(1, TQString("%1")
.arg(sum, 0, 'f', Configuration::percentPrecision()));
else
setText(1, _call->prettySubCost(ct2));
@@ -142,10 +142,10 @@ void CallItem::updateCost()
}
}
- QPixmap p;
+ TQPixmap p;
if (sameCycle && !selectedIsCycle && !shownIsCycle) {
- QString icon = "undo";
+ TQString icon = "undo";
KIconLoader* loader = KApplication::kApplication()->iconLoader();
p= loader->loadIcon(icon, KIcon::Small, 0,
KIcon::DefaultState, 0, true);
@@ -154,7 +154,7 @@ void CallItem::updateCost()
}
-int CallItem::compare(QListViewItem * i, int col, bool ascending ) const
+int CallItem::compare(TQListViewItem * i, int col, bool ascending ) const
{
const CallItem* ci1 = this;
const CallItem* ci2 = (CallItem*) i;
@@ -180,6 +180,6 @@ int CallItem::compare(QListViewItem * i, int col, bool ascending ) const
if (ci1->_cc > ci2->_cc) return 1;
return 0;
}
- return QListViewItem::compare(i, col, ascending);
+ return TQListViewItem::compare(i, col, ascending);
}
diff --git a/kcachegrind/kcachegrind/callitem.h b/kcachegrind/kcachegrind/callitem.h
index 0bebeb71..4eb0ebb0 100644
--- a/kcachegrind/kcachegrind/callitem.h
+++ b/kcachegrind/kcachegrind/callitem.h
@@ -23,7 +23,7 @@
#ifndef CALLITEM_H
#define CALLITEM_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "tracedata.h"
class CallView;
@@ -31,9 +31,9 @@ class CallView;
class CallItem: public QListViewItem
{
public:
- CallItem(CallView*, QListView*, TraceCall* c);
+ CallItem(CallView*, TQListView*, TraceCall* c);
- int compare(QListViewItem * i, int col, bool ascending ) const;
+ int compare(TQListViewItem * i, int col, bool ascending ) const;
TraceCall* call() { return _call; }
CallView* view() { return _view; }
void updateCost();
diff --git a/kcachegrind/kcachegrind/callmapview.cpp b/kcachegrind/kcachegrind/callmapview.cpp
index a10a334b..95930afe 100644
--- a/kcachegrind/kcachegrind/callmapview.cpp
+++ b/kcachegrind/kcachegrind/callmapview.cpp
@@ -20,8 +20,8 @@
* Call Map View
*/
-#include <qwhatsthis.h>
-#include <qpopupmenu.h>
+#include <tqwhatsthis.h>
+#include <tqpopupmenu.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -51,7 +51,7 @@
CallMapView::CallMapView(bool showCallers, TraceItemView* parentView,
- QWidget* parent, const char* name)
+ TQWidget* parent, const char* name)
: TreeMapWidget(new CallMapBaseItem(), parent, name), TraceItemView(parentView)
{
_showCallers = showCallers;
@@ -77,24 +77,24 @@ CallMapView::CallMapView(bool showCallers, TraceItemView* parentView,
setMinimalArea(DEFAULT_MAXAREA);
connect(this,
- SIGNAL(doubleClicked(TreeMapItem*)),
- SLOT(activatedSlot(TreeMapItem*)));
+ TQT_SIGNAL(doubleClicked(TreeMapItem*)),
+ TQT_SLOT(activatedSlot(TreeMapItem*)));
connect(this,
- SIGNAL(returnPressed(TreeMapItem*)),
- SLOT(activatedSlot(TreeMapItem*)));
+ TQT_SIGNAL(returnPressed(TreeMapItem*)),
+ TQT_SLOT(activatedSlot(TreeMapItem*)));
connect(this,
- SIGNAL(currentChanged(TreeMapItem*, bool)),
- SLOT(selectedSlot(TreeMapItem*, bool)));
+ TQT_SIGNAL(currentChanged(TreeMapItem*, bool)),
+ TQT_SLOT(selectedSlot(TreeMapItem*, bool)));
connect(this,
- SIGNAL(contextMenuRequested(TreeMapItem*,const QPoint &)),
- SLOT(context(TreeMapItem*,const QPoint &)));
+ TQT_SIGNAL(contextMenuRequested(TreeMapItem*,const TQPoint &)),
+ TQT_SLOT(context(TreeMapItem*,const TQPoint &)));
- QWhatsThis::add( this, whatsThis());
+ TQWhatsThis::add( this, whatsThis());
}
-QString CallMapView::whatsThis() const
+TQString CallMapView::whatsThis() const
{
- QString s = _showCallers ?
+ TQString s = _showCallers ?
i18n( "<b>Caller Map</b>"
"<p>This graph shows the nested hierarchy of "
"all callers of the current activated function. "
@@ -139,23 +139,23 @@ void CallMapView::setData(TraceData* d)
((CallMapBaseItem*)base())->setFunction(0);
}
-void CallMapView::context(TreeMapItem* i,const QPoint & p)
+void CallMapView::context(TreeMapItem* i,const TQPoint & p)
{
if (!i) return;
- QPopupMenu popup;
- QPopupMenu fpopup; // select function subpopup
- QPopupMenu vpopup; // visualisation subpopup
- QPopupMenu dpopup; // split direction
- QPopupMenu bpopup; // border subpopup
- QPopupMenu l1popup; // depth limit subpopup
- QPopupMenu l2popup; // function limit subpopup
- QPopupMenu l3popup; // area limit subpopup
+ TQPopupMenu popup;
+ TQPopupMenu fpopup; // select function subpopup
+ TQPopupMenu vpopup; // visualisation subpopup
+ TQPopupMenu dpopup; // split direction
+ TQPopupMenu bpopup; // border subpopup
+ TQPopupMenu l1popup; // depth limit subpopup
+ TQPopupMenu l2popup; // function limit subpopup
+ TQPopupMenu l3popup; // area limit subpopup
TreeMapItem* item = i;
int count;
- QString shortCurrentName;
+ TQString shortCurrentName;
if (i) {
shortCurrentName = i->text(0);
if ((int)shortCurrentName.length() > Configuration::maxSymbolLength())
@@ -167,7 +167,7 @@ void CallMapView::context(TreeMapItem* i,const QPoint & p)
popup.insertItem(i18n("Go To"), &fpopup, 100);
count = 0;
while (count<Configuration::maxSymbolCount() && item) {
- QString name = item->text(0);
+ TQString name = item->text(0);
if ((int)name.length()>Configuration::maxSymbolLength())
name = name.left(Configuration::maxSymbolLength()) + "...";
fpopup.insertItem(name, 101+count);
@@ -215,7 +215,7 @@ void CallMapView::context(TreeMapItem* i,const QPoint & p)
l2popup.insertSeparator();
count = 0;
while (count<Configuration::maxSymbolCount() && item) {
- QString name = item->text(0);
+ TQString name = item->text(0);
if ((int)name.length()>Configuration::maxSymbolLength())
name = name.left(Configuration::maxSymbolLength()) + "...";
l2popup.insertItem(name, 201+count);
@@ -229,7 +229,7 @@ void CallMapView::context(TreeMapItem* i,const QPoint & p)
}
if (!foundStopName && !fieldStop(0).isEmpty()) {
l2popup.insertSeparator();
- QString name = fieldStop(0);
+ TQString name = fieldStop(0);
if ((int)name.length()>Configuration::maxSymbolLength())
name = name.left(Configuration::maxSymbolLength()) + "...";
l2popup.insertItem(name, 199);
@@ -272,7 +272,7 @@ void CallMapView::context(TreeMapItem* i,const QPoint & p)
vpopup.setCheckable(true);
popup.insertItem(i18n("Visualisation"), &vpopup, 10);
- QPopupMenu splitpopup;
+ TQPopupMenu splitpopup;
addSplitDirectionItems(&splitpopup, 1001);
vpopup.insertItem(i18n("Split Direction"), &splitpopup, 1000);
@@ -389,7 +389,7 @@ void CallMapView::context(TreeMapItem* i,const QPoint & p)
case 56: setMaxDrawingDepth(maxDepth-1); break;
case 57: setMaxDrawingDepth(maxDepth+1); break;
- case 200: setFieldStop(0, QString::null); break;
+ case 200: setFieldStop(0, TQString::null); break;
case 60: setMinimalArea(-1); break;
case 61: setMinimalArea(10); break;
@@ -428,7 +428,7 @@ void CallMapView::selectedSlot(TreeMapItem* item, bool kbd)
if (item->text(0).isEmpty()) return;
if (kbd) {
- QString msg = i18n("Call Map: Current is '%1'").arg(item->text(0));
+ TQString msg = i18n("Call Map: Current is '%1'").arg(item->text(0));
if (_topLevel)
_topLevel->showMessage(msg, 5000);
}
@@ -528,7 +528,7 @@ void CallMapView::doUpdate(int changeType)
-QColor CallMapView::groupColor(TraceFunction* f) const
+TQColor CallMapView::groupColor(TraceFunction* f) const
{
if (!f)
return colorGroup().button();
@@ -537,9 +537,9 @@ QColor CallMapView::groupColor(TraceFunction* f) const
}
-QString CallMapView::tipString(TreeMapItem* i) const
+TQString CallMapView::tipString(TreeMapItem* i) const
{
- QString tip, itemTip;
+ TQString tip, itemTip;
int count = 0;
//qDebug("CallMapView::tipString for '%s'", i->text(0).ascii());
@@ -592,7 +592,7 @@ void CallMapBaseItem::setFunction(TraceFunction* f)
}
-QString CallMapBaseItem::text(int textNo) const
+TQString CallMapBaseItem::text(int textNo) const
{
if (textNo == 0) {
if (!_f)
@@ -601,11 +601,11 @@ QString CallMapBaseItem::text(int textNo) const
return _f->prettyName();
}
- if (!_f) return QString::null;
+ if (!_f) return TQString::null;
if (textNo == 2) return _f->prettyLocation();
if (textNo == 3) return _f->calledCount().pretty();
- if (textNo != 1) return QString::null;
+ if (textNo != 1) return TQString::null;
TraceCostType* ct = ((CallMapView*)widget())->costType();
TraceCost* t = ((CallMapView*)widget())->totalCost();
@@ -617,15 +617,15 @@ QString CallMapBaseItem::text(int textNo) const
else
sum = 100.0 * _f->inclusive()->subCost(ct) / total;
- return QString("%1 %")
+ return TQString("%1 %")
.arg(sum, 0, 'f', Configuration::percentPrecision());
}
return _f->inclusive()->prettySubCost(ct);
}
-QPixmap CallMapBaseItem::pixmap(int i) const
+TQPixmap CallMapBaseItem::pixmap(int i) const
{
- if ((i != 1) || !_f) return QPixmap();
+ if ((i != 1) || !_f) return TQPixmap();
TraceCostType* ct = ((CallMapView*)widget())->costType();
TraceCost* t = ((CallMapView*)widget())->totalCost();
@@ -709,7 +709,7 @@ TreeMapItemList* CallMapBaseItem::children()
return _children;
}
-QColor CallMapBaseItem::backColor() const
+TQColor CallMapBaseItem::backColor() const
{
return ((CallMapView*)widget())->groupColor(_f);
}
@@ -734,7 +734,7 @@ void CallMapCallingItem::init()
#endif
}
-QString CallMapCallingItem::text(int textNo) const
+TQString CallMapCallingItem::text(int textNo) const
{
if (textNo == 0) {
if (!_c)
@@ -745,7 +745,7 @@ QString CallMapCallingItem::text(int textNo) const
if (textNo == 2) return _c->called()->prettyLocation();
if (textNo == 3) return SubCost(_factor * _c->callCount()).pretty();
- if (textNo != 1) return QString::null;
+ if (textNo != 1) return TQString::null;
TraceCostType* ct;
ct = ((CallMapView*)widget())->costType();
@@ -755,15 +755,15 @@ QString CallMapCallingItem::text(int textNo) const
// percentage relative to function cost
TraceCost* t = ((CallMapView*)widget())->totalCost();
double p = 100.0 * _factor * _c->subCost(ct) / t->subCost(ct);
- return QString("%1 %")
+ return TQString("%1 %")
.arg(p, 0, 'f', Configuration::percentPrecision());
}
return val.pretty();
}
-QPixmap CallMapCallingItem::pixmap(int i) const
+TQPixmap CallMapCallingItem::pixmap(int i) const
{
- if (i != 1) return QPixmap();
+ if (i != 1) return TQPixmap();
// Cost pixmap
TraceCostType* ct = ((CallMapView*)widget())->costType();
@@ -836,7 +836,7 @@ TreeMapItemList* CallMapCallingItem::children()
}
-QColor CallMapCallingItem::backColor() const
+TQColor CallMapCallingItem::backColor() const
{
CallMapView* w = (CallMapView*)widget();
return w->groupColor(_c->called());
@@ -851,7 +851,7 @@ CallMapCallerItem::CallMapCallerItem(double factor, TraceCall* c)
_c = c;
}
-QString CallMapCallerItem::text(int textNo) const
+TQString CallMapCallerItem::text(int textNo) const
{
if (textNo == 0) {
if (!_c)
@@ -862,7 +862,7 @@ QString CallMapCallerItem::text(int textNo) const
if (textNo == 2) return _c->caller()->prettyLocation();
if (textNo == 3) return SubCost(_factor * _c->callCount()).pretty();
- if (textNo != 1) return QString::null;
+ if (textNo != 1) return TQString::null;
TraceCostType* ct;
ct = ((CallMapView*)widget())->costType();
@@ -871,16 +871,16 @@ QString CallMapCallerItem::text(int textNo) const
if (Configuration::showPercentage()) {
TraceCost* t = ((CallMapView*)widget())->totalCost();
double p = 100.0 * _factor * _c->subCost(ct) / t->subCost(ct);
- return QString("%1 %")
+ return TQString("%1 %")
.arg(p, 0, 'f', Configuration::percentPrecision());
}
return val.pretty();
}
-QPixmap CallMapCallerItem::pixmap(int i) const
+TQPixmap CallMapCallerItem::pixmap(int i) const
{
- if (i != 1) return QPixmap();
+ if (i != 1) return TQPixmap();
// Cost pixmap
TraceCostType* ct = ((CallMapView*)widget())->costType();
@@ -942,14 +942,14 @@ TreeMapItemList* CallMapCallerItem::children()
return _children;
}
-QColor CallMapCallerItem::backColor() const
+TQColor CallMapCallerItem::backColor() const
{
CallMapView* w = (CallMapView*)widget();
return w->groupColor(_c->caller());
}
void CallMapView::readViewConfig(KConfig* c,
- QString prefix, QString postfix, bool)
+ TQString prefix, TQString postfix, bool)
{
KConfigGroup* g = configGroup(c, prefix, postfix);
@@ -976,7 +976,7 @@ void CallMapView::readViewConfig(KConfig* c,
}
void CallMapView::saveViewConfig(KConfig* c,
- QString prefix, QString postfix, bool)
+ TQString prefix, TQString postfix, bool)
{
KConfigGroup g(c, (prefix+postfix).ascii());
diff --git a/kcachegrind/kcachegrind/callmapview.h b/kcachegrind/kcachegrind/callmapview.h
index 97cfaec0..e0af71f4 100644
--- a/kcachegrind/kcachegrind/callmapview.h
+++ b/kcachegrind/kcachegrind/callmapview.h
@@ -34,22 +34,22 @@ class CallMapView: public TreeMapWidget, public TraceItemView
public:
CallMapView(bool showCallers, TraceItemView* parentView,
- QWidget* parent=0, const char* name=0);
+ TQWidget* parent=0, const char* name=0);
- QWidget* widget() { return this; }
- QString whatsThis() const;
+ TQWidget* widget() { return this; }
+ TQString whatsThis() const;
void setData(TraceData*);
- void readViewConfig(KConfig*, QString prefix, QString postfix, bool);
- void saveViewConfig(KConfig*, QString prefix, QString postfix, bool);
+ void readViewConfig(KConfig*, TQString prefix, TQString postfix, bool);
+ void saveViewConfig(KConfig*, TQString prefix, TQString postfix, bool);
bool showCallers() const { return _showCallers; }
TraceCost* totalCost();
- QString tipString(TreeMapItem*) const;
- QColor groupColor(TraceFunction*) const;
+ TQString tipString(TreeMapItem*) const;
+ TQColor groupColor(TraceFunction*) const;
private slots:
- void context(TreeMapItem*,const QPoint &);
+ void context(TreeMapItem*,const TQPoint &);
void selectedSlot(TreeMapItem*, bool);
void activatedSlot(TreeMapItem*);
@@ -75,10 +75,10 @@ public:
double sum() const;
double value() const ;
bool isMarked(int) const;
- QString text(int) const;
- QPixmap pixmap(int) const;
+ TQString text(int) const;
+ TQPixmap pixmap(int) const;
TreeMapItemList* children();
- QColor backColor() const;
+ TQColor backColor() const;
private:
TraceFunction* _f;
@@ -96,10 +96,10 @@ public:
double value() const;
double sum() const;
bool isMarked(int) const;
- QString text(int) const;
- QPixmap pixmap(int) const;
+ TQString text(int) const;
+ TQPixmap pixmap(int) const;
TreeMapItemList* children();
- QColor backColor() const;
+ TQColor backColor() const;
private:
TraceCall* _c;
@@ -115,10 +115,10 @@ public:
TraceFunction* function() { return _c->caller(); }
double value() const;
bool isMarked(int) const;
- QString text(int) const;
- QPixmap pixmap(int) const;
+ TQString text(int) const;
+ TQPixmap pixmap(int) const;
TreeMapItemList* children();
- QColor backColor() const;
+ TQColor backColor() const;
private:
TraceCall* _c;
diff --git a/kcachegrind/kcachegrind/callview.cpp b/kcachegrind/kcachegrind/callview.cpp
index 10ec3ea6..4f22b4e9 100644
--- a/kcachegrind/kcachegrind/callview.cpp
+++ b/kcachegrind/kcachegrind/callview.cpp
@@ -20,8 +20,8 @@
* Call Views
*/
-#include <qwhatsthis.h>
-#include <qpopupmenu.h>
+#include <tqwhatsthis.h>
+#include <tqpopupmenu.h>
#include <klocale.h>
#include "configuration.h"
@@ -36,8 +36,8 @@
CallView::CallView(bool showCallers, TraceItemView* parentView,
- QWidget* parent, const char* name)
- : QListView(parent, name), TraceItemView(parentView)
+ TQWidget* parent, const char* name)
+ : TQListView(parent, name), TraceItemView(parentView)
{
_showCallers = showCallers;
@@ -57,29 +57,29 @@ CallView::CallView(bool showCallers, TraceItemView* parentView,
setColumnAlignment(1, Qt::AlignRight);
setColumnAlignment(2, Qt::AlignRight);
setAllColumnsShowFocus(true);
- setResizeMode(QListView::LastColumn);
+ setResizeMode(TQListView::LastColumn);
setMinimumHeight(50);
connect( this,
- SIGNAL( selectionChanged(QListViewItem*) ),
- SLOT( selectedSlot(QListViewItem*) ) );
+ TQT_SIGNAL( selectionChanged(TQListViewItem*) ),
+ TQT_SLOT( selectedSlot(TQListViewItem*) ) );
connect( this,
- SIGNAL(contextMenuRequested(QListViewItem*, const QPoint &, int)),
- SLOT(context(QListViewItem*, const QPoint &, int)));
+ TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint &, int)),
+ TQT_SLOT(context(TQListViewItem*, const TQPoint &, int)));
connect(this,
- SIGNAL(doubleClicked(QListViewItem*)),
- SLOT(activatedSlot(QListViewItem*)));
+ TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ TQT_SLOT(activatedSlot(TQListViewItem*)));
connect(this,
- SIGNAL(returnPressed(QListViewItem*)),
- SLOT(activatedSlot(QListViewItem*)));
+ TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ TQT_SLOT(activatedSlot(TQListViewItem*)));
- QWhatsThis::add( this, whatsThis() );
+ TQWhatsThis::add( this, whatsThis() );
}
-QString CallView::whatsThis() const
+TQString CallView::whatsThis() const
{
return _showCallers ?
i18n( "<b>List of direct Callers</b>"
@@ -107,16 +107,16 @@ QString CallView::whatsThis() const
}
-void CallView::context(QListViewItem* i, const QPoint & p, int col)
+void CallView::context(TQListViewItem* i, const TQPoint & p, int col)
{
- QPopupMenu popup;
+ TQPopupMenu popup;
// Menu entry:
TraceCall* c = i ? ((CallItem*) i)->call() : 0;
TraceFunction *f = 0, *cycle = 0;
if (c) {
- QString name = _showCallers ? c->callerName(true) : c->calledName(true);
+ TQString name = _showCallers ? c->callerName(true) : c->calledName(true);
f = _showCallers ? c->caller(true) : c->called(true);
cycle = f->cycle();
@@ -142,7 +142,7 @@ void CallView::context(QListViewItem* i, const QPoint & p, int col)
else if (r == 94) activated(cycle);
}
-void CallView::selectedSlot(QListViewItem * i)
+void CallView::selectedSlot(TQListViewItem * i)
{
if (!i) return;
TraceCall* c = ((CallItem*) i)->call();
@@ -153,7 +153,7 @@ void CallView::selectedSlot(QListViewItem * i)
selected(f);
}
-void CallView::activatedSlot(QListViewItem * i)
+void CallView::activatedSlot(TQListViewItem * i)
{
if (!i) return;
TraceCall* c = ((CallItem*) i)->call();
@@ -187,7 +187,7 @@ void CallView::doUpdate(int changeType)
return;
}
- CallItem* ci = (CallItem*) QListView::selectedItem();
+ CallItem* ci = (CallItem*) TQListView::selectedItem();
TraceCall* c;
TraceItem* ti;
if (ci) {
@@ -196,7 +196,7 @@ void CallView::doUpdate(int changeType)
if (ti == _selectedItem) return;
}
- QListViewItem *item;
+ TQListViewItem *item;
for (item = firstChild();item;item = item->nextSibling()) {
c = ((CallItem*) item)->call();
ti = _showCallers ? c->caller() : c->called();
@@ -211,7 +211,7 @@ void CallView::doUpdate(int changeType)
}
if (changeType == groupTypeChanged) {
- QListViewItem *item;
+ TQListViewItem *item;
for (item = firstChild();item;item = item->nextSibling())
((CallItem*)item)->updateGroup();
return;
@@ -241,14 +241,14 @@ void CallView::refresh()
TraceCallList l = _showCallers ? f->callers(true) : f->callings(true);
// Allow resizing of column 1
- setColumnWidthMode(1, QListView::Maximum);
+ setColumnWidthMode(1, TQListView::Maximum);
for (call=l.first();call;call=l.next())
if (call->subCost(_costType)>0)
new CallItem(this, this, call);
if (!_costType2) {
- setColumnWidthMode(1, QListView::Manual);
+ setColumnWidthMode(1, TQListView::Manual);
setColumnWidth(1, 0);
}
}
diff --git a/kcachegrind/kcachegrind/callview.h b/kcachegrind/kcachegrind/callview.h
index 1e765bd2..e8d09050 100644
--- a/kcachegrind/kcachegrind/callview.h
+++ b/kcachegrind/kcachegrind/callview.h
@@ -23,26 +23,26 @@
#ifndef CALLVIEW_H
#define CALLVIEW_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "tracedata.h"
#include "traceitemview.h"
-class CallView: public QListView, public TraceItemView
+class CallView: public TQListView, public TraceItemView
{
Q_OBJECT
public:
CallView(bool showCallers, TraceItemView* parentView,
- QWidget* parent=0, const char* name=0);
+ TQWidget* parent=0, const char* name=0);
- virtual QWidget* widget() { return this; }
- QString whatsThis() const;
+ virtual TQWidget* widget() { return this; }
+ TQString whatsThis() const;
bool showCallers() const { return _showCallers; }
private slots:
- void context(QListViewItem*,const QPoint &, int);
- void selectedSlot(QListViewItem*);
- void activatedSlot(QListViewItem*);
+ void context(TQListViewItem*,const TQPoint &, int);
+ void selectedSlot(TQListViewItem*);
+ void activatedSlot(TQListViewItem*);
private:
TraceItem* canShow(TraceItem*);
diff --git a/kcachegrind/kcachegrind/configdlg.cpp b/kcachegrind/kcachegrind/configdlg.cpp
index 36cba569..5ab60e02 100644
--- a/kcachegrind/kcachegrind/configdlg.cpp
+++ b/kcachegrind/kcachegrind/configdlg.cpp
@@ -20,12 +20,12 @@
* Configuration Dialog for KCachegrind
*/
-#include <qcombobox.h>
-#include <qcheckbox.h>
-#include <qlineedit.h>
-#include <qlistview.h>
-#include <qdict.h>
-#include <qmessagebox.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
+#include <tqlineedit.h>
+#include <tqlistview.h>
+#include <tqdict.h>
+#include <tqmessagebox.h>
#include <kcolorbutton.h>
#include <kfiledialog.h>
@@ -38,7 +38,7 @@
ConfigDlg::ConfigDlg(Configuration* c, TraceData* data,
- QWidget* parent, const char* name)
+ TQWidget* parent, const char* name)
:ConfigDlgBase(parent, name)
{
_config = c;
@@ -54,7 +54,7 @@ ConfigDlg::ConfigDlg(Configuration* c, TraceData* data,
contextEdit->setValidator(numValidator );
#if 0
- QListViewItem *oItem, *fItem, *cItem, *fnItem;
+ TQListViewItem *oItem, *fItem, *cItem, *fnItem;
oItem = new(colorList, i18n("ELF Objects"));
fItem = new(colorList, i18n("Source Files"));
@@ -62,36 +62,36 @@ ConfigDlg::ConfigDlg(Configuration* c, TraceData* data,
fnItem = new(colorList, i18n("Function (no Grouping)"));
#endif
- connect(objectCombo, SIGNAL(activated(const QString &)),
- this, SLOT(objectActivated(const QString &)));
- connect(objectCombo, SIGNAL(textChanged(const QString &)),
- this, SLOT(objectActivated(const QString &)));
- connect(objectCheck, SIGNAL(toggled(bool)),
- this, SLOT(objectCheckChanged(bool)));
- connect(objectColor, SIGNAL(changed(const QColor &)),
- this, SLOT(objectColorChanged(const QColor &)));
-
- connect(classCombo, SIGNAL(activated(const QString &)),
- this, SLOT(classActivated(const QString &)));
- connect(classCombo, SIGNAL(textChanged(const QString &)),
- this, SLOT(classActivated(const QString &)));
- connect(classCheck, SIGNAL(toggled(bool)),
- this, SLOT(classCheckChanged(bool)));
- connect(classColor, SIGNAL(changed(const QColor &)),
- this, SLOT(classColorChanged(const QColor &)));
-
- connect(fileCombo, SIGNAL(activated(const QString &)),
- this, SLOT(fileActivated(const QString &)));
- connect(fileCombo, SIGNAL(textChanged(const QString &)),
- this, SLOT(fileActivated(const QString &)));
- connect(fileCheck, SIGNAL(toggled(bool)),
- this, SLOT(fileCheckChanged(bool)));
- connect(fileColor, SIGNAL(changed(const QColor &)),
- this, SLOT(fileColorChanged(const QColor &)));
-
- QString objectPrefix = TraceCost::typeName(TraceCost::Object);
- QString classPrefix = TraceCost::typeName(TraceCost::Class);
- QString filePrefix = TraceCost::typeName(TraceCost::File);
+ connect(objectCombo, TQT_SIGNAL(activated(const TQString &)),
+ this, TQT_SLOT(objectActivated(const TQString &)));
+ connect(objectCombo, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(objectActivated(const TQString &)));
+ connect(objectCheck, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(objectCheckChanged(bool)));
+ connect(objectColor, TQT_SIGNAL(changed(const TQColor &)),
+ this, TQT_SLOT(objectColorChanged(const TQColor &)));
+
+ connect(classCombo, TQT_SIGNAL(activated(const TQString &)),
+ this, TQT_SLOT(classActivated(const TQString &)));
+ connect(classCombo, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(classActivated(const TQString &)));
+ connect(classCheck, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(classCheckChanged(bool)));
+ connect(classColor, TQT_SIGNAL(changed(const TQColor &)),
+ this, TQT_SLOT(classColorChanged(const TQColor &)));
+
+ connect(fileCombo, TQT_SIGNAL(activated(const TQString &)),
+ this, TQT_SLOT(fileActivated(const TQString &)));
+ connect(fileCombo, TQT_SIGNAL(textChanged(const TQString &)),
+ this, TQT_SLOT(fileActivated(const TQString &)));
+ connect(fileCheck, TQT_SIGNAL(toggled(bool)),
+ this, TQT_SLOT(fileCheckChanged(bool)));
+ connect(fileColor, TQT_SIGNAL(changed(const TQColor &)),
+ this, TQT_SLOT(fileColorChanged(const TQColor &)));
+
+ TQString objectPrefix = TraceCost::typeName(TraceCost::Object);
+ TQString classPrefix = TraceCost::typeName(TraceCost::Class);
+ TQString filePrefix = TraceCost::typeName(TraceCost::File);
objectCombo->setDuplicatesEnabled(false);
classCombo->setDuplicatesEnabled(false);
@@ -102,29 +102,29 @@ ConfigDlg::ConfigDlg(Configuration* c, TraceData* data,
// first unspecified cost items from data
TraceObjectMap::Iterator oit;
- QStringList oList;
+ TQStringList oList;
for ( oit = data->objectMap().begin();
oit != data->objectMap().end(); ++oit )
oList.append((*oit).prettyName());
TraceClassMap::Iterator cit;
- QStringList cList;
+ TQStringList cList;
for ( cit = data->classMap().begin();
cit != data->classMap().end(); ++cit )
cList.append((*cit).prettyName());
TraceFileMap::Iterator fit;
- QStringList fList;
+ TQStringList fList;
for ( fit = data->fileMap().begin();
fit != data->fileMap().end(); ++fit )
fList.append((*fit).prettyName());
// then already defined colors (have to check for duplicates!)
- QDictIterator<Configuration::ColorSetting> it( c->_colors );
+ TQDictIterator<Configuration::ColorSetting> it( c->_colors );
for( ; it.current(); ++it ) {
if ((*it)->automatic) continue;
- QString n = it.currentKey();
+ TQString n = it.currentKey();
if (n.startsWith(objectPrefix)) {
n = n.remove(0, objectPrefix.length()+1);
if (oList.findIndex(n) == -1) oList.append(n);
@@ -150,53 +150,53 @@ ConfigDlg::ConfigDlg(Configuration* c, TraceData* data,
classActivated(classCombo->currentText());
fileActivated(fileCombo->currentText());
- maxListEdit->setText(QString::number(c->_maxListCount));
+ maxListEdit->setText(TQString::number(c->_maxListCount));
_dirItem = 0;
- QListViewItem* i = new QListViewItem(dirList, i18n("(always)"));
+ TQListViewItem* i = new TQListViewItem(dirList, i18n("(always)"));
i->setOpen(true);
- QStringList::Iterator sit = c->_generalSourceDirs.begin();
+ TQStringList::Iterator sit = c->_generalSourceDirs.begin();
for(; sit != c->_generalSourceDirs.end(); ++sit ) {
- QString d = (*sit);
+ TQString d = (*sit);
if (d.isEmpty()) d = "/";
- new QListViewItem(i, d);
+ new TQListViewItem(i, d);
}
for ( oit = data->objectMap().begin();
oit != data->objectMap().end(); ++oit ) {
- QString n = (*oit).name();
- i = new QListViewItem(dirList, n);
+ TQString n = (*oit).name();
+ i = new TQListViewItem(dirList, n);
i->setOpen(true);
- QStringList* dirs = c->_objectSourceDirs[n];
+ TQStringList* dirs = c->_objectSourceDirs[n];
if (!dirs) continue;
sit = dirs->begin();
for(; sit != dirs->end(); ++sit ) {
- QString d = (*sit);
+ TQString d = (*sit);
if (d.isEmpty()) d = "/";
- new QListViewItem(i, d);
+ new TQListViewItem(i, d);
}
}
- connect(dirList, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(dirsItemChanged(QListViewItem*)));
- connect(addDirButton, SIGNAL(clicked()),
- this, SLOT(dirsAddPressed()));
- connect(deleteDirButton, SIGNAL(clicked()),
- this, SLOT(dirsDeletePressed()));
+ connect(dirList, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(dirsItemChanged(TQListViewItem*)));
+ connect(addDirButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(dirsAddPressed()));
+ connect(deleteDirButton, TQT_SIGNAL(clicked()),
+ this, TQT_SLOT(dirsDeletePressed()));
dirList->setSelected(dirList->firstChild(), true);
- symbolCount->setText(QString::number(c->_maxSymbolCount));
- symbolLength->setText(QString::number(c->_maxSymbolLength));
- precisionEdit->setText(QString::number(c->_percentPrecision));
- contextEdit->setText(QString::number(c->_context));
+ symbolCount->setText(TQString::number(c->_maxSymbolCount));
+ symbolLength->setText(TQString::number(c->_maxSymbolLength));
+ precisionEdit->setText(TQString::number(c->_percentPrecision));
+ contextEdit->setText(TQString::number(c->_context));
}
ConfigDlg::~ConfigDlg()
{
}
-bool ConfigDlg::configure(Configuration* c, TraceData* d, QWidget* p)
+bool ConfigDlg::configure(Configuration* c, TraceData* d, TQWidget* p)
{
ConfigDlg dlg(c, d, p);
@@ -207,11 +207,11 @@ bool ConfigDlg::configure(Configuration* c, TraceData* d, QWidget* p)
if (ok && newValue < 500)
c->_maxListCount = newValue;
else
- QMessageBox::warning(p, i18n("KCachegrind Configuration"),
+ TQMessageBox::warning(p, i18n("KCachegrind Configuration"),
i18n("The Maximum Number of List Items should be below 500."
"The previous set value (%1) will still be used.")
- .arg(QString::number(c->_maxListCount)),
- QMessageBox::Ok, 0);
+ .arg(TQString::number(c->_maxListCount)),
+ TQMessageBox::Ok, 0);
c->_maxSymbolCount = dlg.symbolCount->text().toInt();
c->_maxSymbolLength = dlg.symbolLength->text().toInt();
@@ -222,13 +222,13 @@ bool ConfigDlg::configure(Configuration* c, TraceData* d, QWidget* p)
return false;
}
-void ConfigDlg::objectActivated(const QString & s)
+void ConfigDlg::objectActivated(const TQString & s)
{
// qDebug("objectActivated: %s", s.ascii());
if (s.isEmpty()) { _objectCS=0; return; }
- QString n = TraceCost::typeName(TraceCost::Object) + "-" + s;
+ TQString n = TraceCost::typeName(TraceCost::Object) + "-" + s;
Configuration* c = Configuration::config();
Configuration::ColorSetting* cs = c->_colors[n];
@@ -262,18 +262,18 @@ void ConfigDlg::objectCheckChanged(bool b)
}
}
-void ConfigDlg::objectColorChanged(const QColor & c)
+void ConfigDlg::objectColorChanged(const TQColor & c)
{
if (_objectCS) _objectCS->color = c;
}
-void ConfigDlg::classActivated(const QString & s)
+void ConfigDlg::classActivated(const TQString & s)
{
// qDebug("classActivated: %s", s.ascii());
if (s.isEmpty()) { _classCS=0; return; }
- QString n = TraceCost::typeName(TraceCost::Class) + "-" + s;
+ TQString n = TraceCost::typeName(TraceCost::Class) + "-" + s;
Configuration* c = Configuration::config();
Configuration::ColorSetting* cs = c->_colors[n];
@@ -293,19 +293,19 @@ void ConfigDlg::classCheckChanged(bool b)
if (_classCS) _classCS->automatic = b;
}
-void ConfigDlg::classColorChanged(const QColor & c)
+void ConfigDlg::classColorChanged(const TQColor & c)
{
if (_classCS) _classCS->color = c;
}
-void ConfigDlg::fileActivated(const QString & s)
+void ConfigDlg::fileActivated(const TQString & s)
{
// qDebug("fileActivated: %s", s.ascii());
if (s.isEmpty()) { _fileCS=0; return; }
- QString n = TraceCost::typeName(TraceCost::File) + "-" + s;
+ TQString n = TraceCost::typeName(TraceCost::File) + "-" + s;
Configuration* c = Configuration::config();
Configuration::ColorSetting* cs = c->_colors[n];
@@ -324,13 +324,13 @@ void ConfigDlg::fileCheckChanged(bool b)
if (_fileCS) _fileCS->automatic = b;
}
-void ConfigDlg::fileColorChanged(const QColor & c)
+void ConfigDlg::fileColorChanged(const TQColor & c)
{
if (_fileCS) _fileCS->color = c;
}
-void ConfigDlg::dirsItemChanged(QListViewItem* i)
+void ConfigDlg::dirsItemChanged(TQListViewItem* i)
{
_dirItem = i;
deleteDirButton->setEnabled(i->depth() == 1);
@@ -340,13 +340,13 @@ void ConfigDlg::dirsItemChanged(QListViewItem* i)
void ConfigDlg::dirsDeletePressed()
{
if (!_dirItem || (_dirItem->depth() == 0)) return;
- QListViewItem* p = _dirItem->parent();
+ TQListViewItem* p = _dirItem->parent();
if (!p) return;
Configuration* c = Configuration::config();
- QString objName = p->text(0);
+ TQString objName = p->text(0);
- QStringList* dirs;
+ TQStringList* dirs;
if (objName == i18n("(always)"))
dirs = &(c->_generalSourceDirs);
else
@@ -365,9 +365,9 @@ void ConfigDlg::dirsAddPressed()
if (!_dirItem || (_dirItem->depth() >0)) return;
Configuration* c = Configuration::config();
- QString objName = _dirItem->text(0);
+ TQString objName = _dirItem->text(0);
- QStringList* dirs;
+ TQStringList* dirs;
if (objName == i18n("(always)"))
dirs = &(c->_generalSourceDirs);
else {
@@ -378,8 +378,8 @@ void ConfigDlg::dirsAddPressed()
}
}
- QString newDir;
- newDir = KFileDialog::getExistingDirectory(QString::null,
+ TQString newDir;
+ newDir = KFileDialog::getExistingDirectory(TQString::null,
this,
i18n("Choose Source Folder"));
if (newDir.isEmpty()) return;
@@ -391,8 +391,8 @@ void ConfigDlg::dirsAddPressed()
if (dirs->findIndex(newDir)>=0) return;
dirs->append(newDir);
- if (newDir.isEmpty()) newDir = QString("/");
- new QListViewItem(_dirItem, newDir);
+ if (newDir.isEmpty()) newDir = TQString("/");
+ new TQListViewItem(_dirItem, newDir);
}
#include "configdlg.moc"
diff --git a/kcachegrind/kcachegrind/configdlg.h b/kcachegrind/kcachegrind/configdlg.h
index ceace6dd..521caf15 100644
--- a/kcachegrind/kcachegrind/configdlg.h
+++ b/kcachegrind/kcachegrind/configdlg.h
@@ -34,22 +34,22 @@ class ConfigDlg : public ConfigDlgBase
public:
ConfigDlg(Configuration*, TraceData*,
- QWidget* parent = 0, const char* name = 0);
+ TQWidget* parent = 0, const char* name = 0);
~ConfigDlg();
- static bool configure(Configuration*, TraceData*, QWidget*);
+ static bool configure(Configuration*, TraceData*, TQWidget*);
protected slots:
- void objectActivated(const QString &);
+ void objectActivated(const TQString &);
void objectCheckChanged(bool);
- void objectColorChanged(const QColor &);
- void classActivated(const QString &);
+ void objectColorChanged(const TQColor &);
+ void classActivated(const TQString &);
void classCheckChanged(bool);
- void classColorChanged(const QColor &);
- void fileActivated(const QString &);
+ void classColorChanged(const TQColor &);
+ void fileActivated(const TQString &);
void fileCheckChanged(bool);
- void fileColorChanged(const QColor &);
- void dirsItemChanged(QListViewItem*);
+ void fileColorChanged(const TQColor &);
+ void dirsItemChanged(TQListViewItem*);
void dirsDeletePressed();
void dirsAddPressed();
@@ -58,7 +58,7 @@ private:
TraceData* _data;
Configuration::ColorSetting *_objectCS, *_classCS, *_fileCS;
- QListViewItem* _dirItem;
+ TQListViewItem* _dirItem;
};
#endif
diff --git a/kcachegrind/kcachegrind/configuration.cpp b/kcachegrind/kcachegrind/configuration.cpp
index 9df92a39..1a6c4d58 100644
--- a/kcachegrind/kcachegrind/configuration.cpp
+++ b/kcachegrind/kcachegrind/configuration.cpp
@@ -34,9 +34,9 @@
// Some predefined cost types...
//
-static QStringList knownTypes()
+static TQStringList knownTypes()
{
- QStringList l;
+ TQStringList l;
l << "Ir" << "Dr" << "Dw"
<< "I1mr" << "D1mr" << "D1mw"
@@ -49,16 +49,16 @@ static QStringList knownTypes()
}
-static QString knownFormula(QString name)
+static TQString knownFormula(TQString name)
{
- if (name =="L1m") return QString("I1mr + D1mr + D1mw");
- if (name =="L2m") return QString("I2mr + D2mr + D2mw");
- if (name =="CEst") return QString("Ir + 10 L1m + 100 L2m");
+ if (name =="L1m") return TQString("I1mr + D1mr + D1mw");
+ if (name =="L2m") return TQString("I2mr + D2mr + D2mw");
+ if (name =="CEst") return TQString("Ir + 10 L1m + 100 L2m");
- return QString::null;
+ return TQString::null;
}
-static QString knownLongName(QString name)
+static TQString knownLongName(TQString name)
{
if (name == "Ir") return i18n("Instruction Fetch");
if (name =="Dr") return i18n("Data Read Access");
@@ -76,7 +76,7 @@ static QString knownLongName(QString name)
if (name =="L2m") return i18n("L2 Miss Sum");
if (name =="CEst") return i18n("Cycle Estimation");
- return QString::null;
+ return TQString::null;
}
@@ -127,14 +127,14 @@ void Configuration::saveOptions(KConfig* kconfig)
Configuration* c = config();
// color options
- KConfigGroup colorConfig(kconfig, QCString("CostColors"));
- QDictIterator<ColorSetting> it( c->_colors );
+ KConfigGroup colorConfig(kconfig, TQCString("CostColors"));
+ TQDictIterator<ColorSetting> it( c->_colors );
int count = 1;
for( ; it.current(); ++it ) {
if ( !(*it)->automatic ) {
- colorConfig.writeEntry( QString("Name%1").arg(count),
+ colorConfig.writeEntry( TQString("Name%1").arg(count),
it.currentKey());
- colorConfig.writeEntry( QString("Color%1").arg(count),
+ colorConfig.writeEntry( TQString("Color%1").arg(count),
(*it)->color);
//qDebug("Written Color %s (%d)", it.currentKey().ascii(), count);
@@ -144,21 +144,21 @@ void Configuration::saveOptions(KConfig* kconfig)
colorConfig.writeEntry( "Count", count-1);
// source options
- KConfigGroup sourceConfig(kconfig, QCString("Source"));
+ KConfigGroup sourceConfig(kconfig, TQCString("Source"));
sourceConfig.writeEntry("Dirs", c->_generalSourceDirs, ':');
- QDictIterator<QStringList> it2( c->_objectSourceDirs );
+ TQDictIterator<TQStringList> it2( c->_objectSourceDirs );
count = 1;
for( ; it2.current(); ++it2 ) {
- sourceConfig.writeEntry( QString("Object%1").arg(count),
+ sourceConfig.writeEntry( TQString("Object%1").arg(count),
it2.currentKey());
- sourceConfig.writeEntry( QString("Dirs%1").arg(count),
+ sourceConfig.writeEntry( TQString("Dirs%1").arg(count),
*(*it2), ':');
count++;
}
sourceConfig.writeEntry( "Count", count-1);
// general options
- KConfigGroup generalConfig(kconfig, QCString("General"));
+ KConfigGroup generalConfig(kconfig, TQCString("General"));
generalConfig.writeEntry("ShowPercentage", c->_showPercentage);
generalConfig.writeEntry("ShowExpanded", c->_showExpanded);
generalConfig.writeEntry("ShowCycles", c->_showCycles);
@@ -171,20 +171,20 @@ void Configuration::saveOptions(KConfig* kconfig)
generalConfig.writeEntry("Context", c->_context);
generalConfig.writeEntry("NoCostInside", c->_noCostInside);
- KConfigGroup ctConfig(kconfig, QCString("CostTypes"));
+ KConfigGroup ctConfig(kconfig, TQCString("CostTypes"));
int ctCount = TraceCostType::knownTypeCount();
ctConfig.writeEntry( "Count", ctCount);
for (int i=0; i<ctCount; i++) {
TraceCostType* t = TraceCostType::knownType(i);
- ctConfig.writeEntry( QString("Name%1").arg(i+1), t->name());
+ ctConfig.writeEntry( TQString("Name%1").arg(i+1), t->name());
// Use localized key
TraceItemView::writeConfigEntry(&ctConfig,
- QString("Longname%1").arg(i+1).ascii(),
+ TQString("Longname%1").arg(i+1).ascii(),
t->longName(),
knownLongName(t->name()).utf8().data() /*, true */ );
TraceItemView::writeConfigEntry(&ctConfig,
- QString("Formula%1").arg(i+1).ascii(),
+ TQString("Formula%1").arg(i+1).ascii(),
t->formula(), knownFormula(t->name()).utf8().data());
}
}
@@ -202,23 +202,23 @@ void Configuration::readOptions(KConfig* kconfig)
// colors for default cost types:
// red for L2 misses, green for L1 misses, blue for normal accesses
- c->color("CostType-I2mr")->color = QColor(240, 0, 0);
- c->color("CostType-D2mr")->color = QColor(180,40,40);
- c->color("CostType-D2mw")->color = QColor(120,80,80);
+ c->color("CostType-I2mr")->color = TQColor(240, 0, 0);
+ c->color("CostType-D2mr")->color = TQColor(180,40,40);
+ c->color("CostType-D2mw")->color = TQColor(120,80,80);
- c->color("CostType-I1mr")->color = QColor(0, 240, 0);
- c->color("CostType-D1mr")->color = QColor(40,180,40);
- c->color("CostType-D1mw")->color = QColor(80,120,80);
+ c->color("CostType-I1mr")->color = TQColor(0, 240, 0);
+ c->color("CostType-D1mr")->color = TQColor(40,180,40);
+ c->color("CostType-D1mw")->color = TQColor(80,120,80);
- c->color("CostType-Ir")->color = QColor(0, 0, 240);
- c->color("CostType-Dr")->color = QColor(40,40,180);
- c->color("CostType-Dw")->color = QColor(80,80,120);
+ c->color("CostType-Ir")->color = TQColor(0, 0, 240);
+ c->color("CostType-Dr")->color = TQColor(40,40,180);
+ c->color("CostType-Dw")->color = TQColor(80,80,120);
- KConfigGroup colorConfig(kconfig, QCString("CostColors"));
+ KConfigGroup colorConfig(kconfig, TQCString("CostColors"));
count = colorConfig.readNumEntry("Count", 0);
for (i=1;i<=count;i++) {
- QString n = colorConfig.readEntry(QString("Name%1").arg(i));
- QColor color = colorConfig.readColorEntry(QString("Color%1").arg(i));
+ TQString n = colorConfig.readEntry(TQString("Name%1").arg(i));
+ TQColor color = colorConfig.readColorEntry(TQString("Color%1").arg(i));
if (n.isEmpty()) continue;
@@ -233,25 +233,25 @@ void Configuration::readOptions(KConfig* kconfig)
}
// source options
- KConfigGroup sourceConfig(kconfig, QCString("Source"));
- QStringList dirs;
+ KConfigGroup sourceConfig(kconfig, TQCString("Source"));
+ TQStringList dirs;
dirs = sourceConfig.readListEntry("Dirs", ':');
if (dirs.count()>0) c->_generalSourceDirs = dirs;
count = sourceConfig.readNumEntry("Count", 0);
c->_objectSourceDirs.clear();
if (count>17) c->_objectSourceDirs.resize(count);
for (i=1;i<=count;i++) {
- QString n = sourceConfig.readEntry(QString("Object%1").arg(i));
- dirs = sourceConfig.readListEntry(QString("Dirs%1").arg(i), ':');
+ TQString n = sourceConfig.readEntry(TQString("Object%1").arg(i));
+ dirs = sourceConfig.readListEntry(TQString("Dirs%1").arg(i), ':');
if (n.isEmpty() || (dirs.count()==0)) continue;
- c->_objectSourceDirs.insert(n, new QStringList(dirs));
+ c->_objectSourceDirs.insert(n, new TQStringList(dirs));
}
// general options
- KConfigGroup generalConfig(kconfig, QCString("General"));
+ KConfigGroup generalConfig(kconfig, TQCString("General"));
c->_showPercentage = generalConfig.readBoolEntry("ShowPercentage", true);
c->_showExpanded = generalConfig.readBoolEntry("ShowExpanded", false);
c->_showCycles = generalConfig.readBoolEntry("ShowCycles", true);
@@ -267,14 +267,14 @@ void Configuration::readOptions(KConfig* kconfig)
// known cost types
if (TraceCostType::knownTypeCount()==0) {
- KConfigGroup ctConfig(kconfig, QCString("CostTypes"));
+ KConfigGroup ctConfig(kconfig, TQCString("CostTypes"));
int ctCount = ctConfig.readNumEntry("Count", 0);
if (ctCount>0) {
for (int i=1;i<=ctCount;i++) {
- QString n = ctConfig.readEntry(QString("Name%1").arg(i));
- QString l = ctConfig.readEntry(QString("Longname%1").arg(i));
+ TQString n = ctConfig.readEntry(TQString("Name%1").arg(i));
+ TQString l = ctConfig.readEntry(TQString("Longname%1").arg(i));
if (l.isEmpty()) l = knownLongName(n);
- QString f = ctConfig.readEntry(QString("Formula%1").arg(i));
+ TQString f = ctConfig.readEntry(TQString("Formula%1").arg(i));
if (f.isEmpty()) f = knownFormula(n);
TraceCostType::add(new TraceCostType(n, l, f));
@@ -283,10 +283,10 @@ void Configuration::readOptions(KConfig* kconfig)
else {
// add default types
- QString longName, formula;
+ TQString longName, formula;
TraceCostType* ct;
- QStringList l = knownTypes();
- for ( QStringList::Iterator it = l.begin();
+ TQStringList l = knownTypes();
+ for ( TQStringList::Iterator it = l.begin();
it != l.end(); ++it ) {
longName = knownLongName(*it);
formula = knownFormula(*it);
@@ -297,35 +297,35 @@ void Configuration::readOptions(KConfig* kconfig)
}
}
-QColor Configuration::groupColor(TraceItem* cost)
+TQColor Configuration::groupColor(TraceItem* cost)
{
- QString n;
+ TQString n;
if (!cost)
- n = QString("default");
+ n = TQString("default");
else
n = TraceCost::typeName(cost->type()) + "-" + cost->prettyName();
return color(n)->color;
}
-QColor Configuration::costTypeColor(TraceCostType* t)
+TQColor Configuration::costTypeColor(TraceCostType* t)
{
- QString n;
+ TQString n;
if (!t)
- n = QString("CostType-default");
+ n = TQString("CostType-default");
else
- n = QString("CostType-%1").arg(t->name());
+ n = TQString("CostType-%1").arg(t->name());
return color(n)->color;
}
-QColor Configuration::functionColor(TraceCost::CostType gt,
+TQColor Configuration::functionColor(TraceCost::CostType gt,
TraceFunction* f)
{
TraceCost* group = f;
- QString n;
+ TQString n;
switch(gt) {
case TraceCost::Object: group = f->object(); break;
@@ -347,7 +347,7 @@ QColor Configuration::functionColor(TraceCost::CostType gt,
return groupColor(group);
}
-Configuration::ColorSetting* Configuration::color(QString n, bool createNew)
+Configuration::ColorSetting* Configuration::color(TQString n, bool createNew)
{
// qDebug("Color for %s", n.latin1());
@@ -366,7 +366,7 @@ Configuration::ColorSetting* Configuration::color(QString n, bool createNew)
}
//qDebug("New color for %s: H %d, S %d", n.ascii(), h, 64+s);
- QColor color = QColor(h, 64+s, 192, QColor::Hsv);
+ TQColor color = TQColor(h, 64+s, 192, TQColor::Hsv);
cs = new ColorSetting;
cs->name = n;
@@ -383,9 +383,9 @@ Configuration::ColorSetting* Configuration::color(QString n, bool createNew)
* current trace. If a special object is given in 2nd argument,
* put its Source Base in front.
*/
-QStringList Configuration::sourceDirs(TraceData* data, TraceObject* o)
+TQStringList Configuration::sourceDirs(TraceData* data, TraceObject* o)
{
- QStringList l = config()->_generalSourceDirs, *ol, *ol2 = 0;
+ TQStringList l = config()->_generalSourceDirs, *ol, *ol2 = 0;
TraceObjectMap::Iterator oit;
for ( oit = data->objectMap().begin();
oit != data->objectMap().end(); ++oit ) {
@@ -462,7 +462,7 @@ int Configuration::maxSymbolLength()
return config()->_maxSymbolLength;
}
-QString Configuration::shortenSymbol(QString s)
+TQString Configuration::shortenSymbol(TQString s)
{
if ((int)s.length() > maxSymbolLength())
s = s.left(maxSymbolLength()) + "...";
diff --git a/kcachegrind/kcachegrind/configuration.h b/kcachegrind/kcachegrind/configuration.h
index 5543ed81..478f6176 100644
--- a/kcachegrind/kcachegrind/configuration.h
+++ b/kcachegrind/kcachegrind/configuration.h
@@ -23,9 +23,9 @@
#ifndef CONFIGURATION_H
#define CONFIGURATION_H
-#include <qcolor.h>
-#include <qstringlist.h>
-#include <qdict.h>
+#include <tqcolor.h>
+#include <tqstringlist.h>
+#include <tqdict.h>
#include "tracedata.h"
@@ -44,10 +44,10 @@ public:
static void readOptions(KConfig*);
// color for visualisation of an object
- static QColor functionColor(TraceItem::CostType gt, TraceFunction*);
- static QColor groupColor(TraceItem*);
- static QColor costTypeColor(TraceCostType*);
- static QStringList sourceDirs(TraceData*, TraceObject* o = 0);
+ static TQColor functionColor(TraceItem::CostType gt, TraceFunction*);
+ static TQColor groupColor(TraceItem*);
+ static TQColor costTypeColor(TraceCostType*);
+ static TQStringList sourceDirs(TraceData*, TraceObject* o = 0);
static bool showPercentage();
static bool showExpanded();
static bool showCycles();
@@ -57,7 +57,7 @@ public:
// max symbol lengths/count in tooltip/popup
static int maxSymbolLength();
// strip a symbol name according to <maxSymbolLength>
- static QString shortenSymbol(QString);
+ static TQString shortenSymbol(TQString);
static int maxSymbolCount();
// max. number of items in lists
static int maxListCount();
@@ -76,17 +76,17 @@ public:
private:
struct ColorSetting {
- QString name;
- QColor color;
+ TQString name;
+ TQColor color;
bool automatic;
};
- static ColorSetting* color(QString, bool createNew = true);
+ static ColorSetting* color(TQString, bool createNew = true);
- QDict<ColorSetting> _colors;
+ TQDict<ColorSetting> _colors;
- QStringList _generalSourceDirs;
- QDict<QStringList> _objectSourceDirs;
+ TQStringList _generalSourceDirs;
+ TQDict<TQStringList> _objectSourceDirs;
bool _showPercentage, _showExpanded, _showCycles;
double _cycleCut;
diff --git a/kcachegrind/kcachegrind/costlistitem.cpp b/kcachegrind/kcachegrind/costlistitem.cpp
index e0136030..1e777b05 100644
--- a/kcachegrind/kcachegrind/costlistitem.cpp
+++ b/kcachegrind/kcachegrind/costlistitem.cpp
@@ -18,8 +18,8 @@
#include <math.h>
-#include <qpainter.h>
-#include <qregexp.h>
+#include <tqpainter.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -33,9 +33,9 @@
// CostListItem
-CostListItem::CostListItem(QListView* parent, TraceCostItem* costItem,
+CostListItem::CostListItem(TQListView* parent, TraceCostItem* costItem,
TraceCostType* ct, int size)
- :QListViewItem(parent)
+ :TQListViewItem(parent)
{
_groupSize = size;
_skipped = 0;
@@ -49,9 +49,9 @@ CostListItem::CostListItem(QListView* parent, TraceCostItem* costItem,
}
}
-CostListItem::CostListItem(QListView* parent, int skipped,
+CostListItem::CostListItem(TQListView* parent, int skipped,
TraceCostItem* costItem, TraceCostType* ct)
- :QListViewItem(parent)
+ :TQListViewItem(parent)
{
_skipped = skipped;
_costItem = costItem;
@@ -70,8 +70,8 @@ void CostListItem::updateName()
{
if (!_costItem) return;
- QString n = _costItem->prettyName();
- if (_groupSize>=0) n += QString(" (%1)").arg(_groupSize);
+ TQString n = _costItem->prettyName();
+ if (_groupSize>=0) n += TQString(" (%1)").arg(_groupSize);
setText(1, n);
}
@@ -89,22 +89,22 @@ void CostListItem::update()
double total = d->subCost(_costType);
if (total == 0.0) {
- setText(0, QString("---"));
- setPixmap(0, QPixmap());
+ setText(0, TQString("---"));
+ setPixmap(0, TQPixmap());
return;
}
_pure = _costItem->subCost(_costType);
double pure = 100.0 * _pure / total;
- QString str;
+ TQString str;
if (Configuration::showPercentage())
- str = QString("%1").arg(pure, 0, 'f', Configuration::percentPrecision());
+ str = TQString("%1").arg(pure, 0, 'f', Configuration::percentPrecision());
else
str = _costItem->prettySubCost(_costType);
if (_skipped) {
// special handling for skip entries...
- setText(0, QString("< %1").arg(str));
+ setText(0, TQString("< %1").arg(str));
return;
}
@@ -112,7 +112,7 @@ void CostListItem::update()
setPixmap(0, costPixmap(_costType, _costItem, total, false));
}
-int CostListItem::compare(QListViewItem * i, int col, bool ascending ) const
+int CostListItem::compare(TQListViewItem * i, int col, bool ascending ) const
{
const CostListItem* fi1 = this;
const CostListItem* fi2 = (CostListItem*) i;
@@ -132,5 +132,5 @@ int CostListItem::compare(QListViewItem * i, int col, bool ascending ) const
if (fi1->_pure > fi2->_pure) return 1;
return 0;
}
- return QListViewItem::compare(i, col, ascending);
+ return TQListViewItem::compare(i, col, ascending);
}
diff --git a/kcachegrind/kcachegrind/costlistitem.h b/kcachegrind/kcachegrind/costlistitem.h
index 0027dfda..6c1ccbc8 100644
--- a/kcachegrind/kcachegrind/costlistitem.h
+++ b/kcachegrind/kcachegrind/costlistitem.h
@@ -19,19 +19,19 @@
#ifndef COSTLISTITEM_H
#define COSTLISTITEM_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "tracedata.h"
class CostListItem: public QListViewItem
{
public:
- CostListItem(QListView* parent, TraceCostItem* cost,
+ CostListItem(TQListView* parent, TraceCostItem* cost,
TraceCostType* ct, int size = -1);
// entry with multiple skipped items
- CostListItem(QListView* parent, int skipped, TraceCostItem* cost,
+ CostListItem(TQListView* parent, int skipped, TraceCostItem* cost,
TraceCostType* ct);
- int compare(QListViewItem * i, int col, bool ascending ) const;
+ int compare(TQListViewItem * i, int col, bool ascending ) const;
TraceCostItem* costItem() { return (_skipped) ? 0 : _costItem; }
void setCostType(TraceCostType* ct);
void update();
diff --git a/kcachegrind/kcachegrind/costtypeitem.cpp b/kcachegrind/kcachegrind/costtypeitem.cpp
index 7bc02ea4..dc35cb2b 100644
--- a/kcachegrind/kcachegrind/costtypeitem.cpp
+++ b/kcachegrind/kcachegrind/costtypeitem.cpp
@@ -20,7 +20,7 @@
* Items of cost type view.
*/
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <klocale.h>
#include "configuration.h"
@@ -31,9 +31,9 @@
// CostTypeItem
-CostTypeItem::CostTypeItem(QListView* parent, TraceCostItem* costItem,
+CostTypeItem::CostTypeItem(TQListView* parent, TraceCostItem* costItem,
TraceCostType* ct, TraceCost::CostType gt)
- :QListViewItem(parent)
+ :TQListViewItem(parent)
{
_costItem = costItem;
_costType = ct;
@@ -42,7 +42,7 @@ CostTypeItem::CostTypeItem(QListView* parent, TraceCostItem* costItem,
if (ct) {
setText(0, ct->longName());
setText(3, ct->name());
- QString formula = ct->formula();
+ TQString formula = ct->formula();
setText(5, formula);
if (!formula.isEmpty()) {
setText(4, "=");
@@ -73,9 +73,9 @@ void CostTypeItem::update()
if (total == 0.0) {
setText(1, "-");
- setPixmap(1, QPixmap());
+ setPixmap(1, TQPixmap());
setText(2, "-");
- setPixmap(2, QPixmap());
+ setPixmap(2, TQPixmap());
return;
}
@@ -103,7 +103,7 @@ void CostTypeItem::update()
_pure = _costItem ? _costItem->subCost(_costType) : SubCost(0);
double pure = 100.0 * _pure / selfTotal;
if (Configuration::showPercentage()) {
- setText(2, QString("%1")
+ setText(2, TQString("%1")
.arg(pure, 0, 'f', Configuration::percentPrecision()));
}
else
@@ -113,14 +113,14 @@ void CostTypeItem::update()
if (!f) {
setText(1, "-");
- setPixmap(1, QPixmap());
+ setPixmap(1, TQPixmap());
return;
}
_sum = f->inclusive()->subCost(_costType);
double sum = 100.0 * _sum / total;
if (Configuration::showPercentage()) {
- setText(1, QString("%1")
+ setText(1, TQString("%1")
.arg(sum, 0, 'f', Configuration::percentPrecision()));
}
else
@@ -130,7 +130,7 @@ void CostTypeItem::update()
}
-int CostTypeItem::compare(QListViewItem * i, int col, bool ascending ) const
+int CostTypeItem::compare(TQListViewItem * i, int col, bool ascending ) const
{
CostTypeItem* fi = (CostTypeItem*) i;
if (col==0) {
@@ -143,7 +143,7 @@ int CostTypeItem::compare(QListViewItem * i, int col, bool ascending ) const
if (_pure > fi->_pure) return 1;
return 0;
}
- return QListViewItem::compare(i, col, ascending);
+ return TQListViewItem::compare(i, col, ascending);
}
diff --git a/kcachegrind/kcachegrind/costtypeitem.h b/kcachegrind/kcachegrind/costtypeitem.h
index 3eb5ea0a..7593151e 100644
--- a/kcachegrind/kcachegrind/costtypeitem.h
+++ b/kcachegrind/kcachegrind/costtypeitem.h
@@ -23,17 +23,17 @@
#ifndef COSTTYEPITEM_H
#define COSTTYEPITEM_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "tracedata.h"
class CostTypeItem: public QListViewItem
{
public:
- CostTypeItem(QListView* parent, TraceCostItem* costItem,
+ CostTypeItem(TQListView* parent, TraceCostItem* costItem,
TraceCostType* ct, TraceCost::CostType gt);
- int compare(QListViewItem * i, int col, bool ascending ) const;
+ int compare(TQListViewItem * i, int col, bool ascending ) const;
void setGroupType(TraceCost::CostType);
TraceCostItem* costItem() { return _costItem; }
TraceCostType* costType() { return _costType; }
diff --git a/kcachegrind/kcachegrind/costtypeview.cpp b/kcachegrind/kcachegrind/costtypeview.cpp
index b3e8f117..6642e7af 100644
--- a/kcachegrind/kcachegrind/costtypeview.cpp
+++ b/kcachegrind/kcachegrind/costtypeview.cpp
@@ -20,8 +20,8 @@
* Cost Type View
*/
-#include <qwhatsthis.h>
-#include <qpopupmenu.h>
+#include <tqwhatsthis.h>
+#include <tqpopupmenu.h>
#include <klocale.h>
#include "configuration.h"
@@ -36,14 +36,14 @@
CostTypeView::CostTypeView(TraceItemView* parentView,
- QWidget* parent, const char* name)
- : QListView(parent, name), TraceItemView(parentView)
+ TQWidget* parent, const char* name)
+ : TQListView(parent, name), TraceItemView(parentView)
{
addColumn( i18n( "Event Type" ) );
addColumn( i18n( "Incl." ) );
addColumn( i18n( "Self" ) );
addColumn( i18n( "Short" ) );
- addColumn( QString::null );
+ addColumn( TQString::null );
addColumn( i18n( "Formula" ) );
setSorting(-1);
@@ -54,29 +54,29 @@ CostTypeView::CostTypeView(TraceItemView* parentView,
setMinimumHeight(50);
connect( this,
- SIGNAL( selectionChanged(QListViewItem*) ),
- SLOT( selectedSlot(QListViewItem*) ) );
+ TQT_SIGNAL( selectionChanged(TQListViewItem*) ),
+ TQT_SLOT( selectedSlot(TQListViewItem*) ) );
connect( this,
- SIGNAL(contextMenuRequested(QListViewItem*, const QPoint &, int)),
- SLOT(context(QListViewItem*, const QPoint &, int)));
+ TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint &, int)),
+ TQT_SLOT(context(TQListViewItem*, const TQPoint &, int)));
connect(this,
- SIGNAL(doubleClicked(QListViewItem*)),
- SLOT(activatedSlot(QListViewItem*)));
+ TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ TQT_SLOT(activatedSlot(TQListViewItem*)));
connect(this,
- SIGNAL(returnPressed(QListViewItem*)),
- SLOT(activatedSlot(QListViewItem*)));
+ TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ TQT_SLOT(activatedSlot(TQListViewItem*)));
connect(this,
- SIGNAL(itemRenamed(QListViewItem*,int,const QString&)),
- SLOT(renamedSlot(QListViewItem*,int,const QString&)));
+ TQT_SIGNAL(itemRenamed(TQListViewItem*,int,const TQString&)),
+ TQT_SLOT(renamedSlot(TQListViewItem*,int,const TQString&)));
- QWhatsThis::add( this, whatsThis() );
+ TQWhatsThis::add( this, whatsThis() );
}
-QString CostTypeView::whatsThis() const
+TQString CostTypeView::whatsThis() const
{
return i18n( "<b>Cost Types List</b>"
"<p>This list shows all cost types available "
@@ -88,9 +88,9 @@ QString CostTypeView::whatsThis() const
}
-void CostTypeView::context(QListViewItem* i, const QPoint & p, int)
+void CostTypeView::context(TQListViewItem* i, const TQPoint & p, int)
{
- QPopupMenu popup;
+ TQPopupMenu popup;
TraceCostType* ct = i ? ((CostTypeItem*) i)->costType() : 0;
@@ -151,22 +151,22 @@ void CostTypeView::context(QListViewItem* i, const QPoint & p, int)
i++;
}
// add same new cost type to this mapping and to known types
- QString shortName = i18n("New%1").arg(i);
- QString longName = i18n("New Cost Type %1").arg(i);
+ TQString shortName = i18n("New%1").arg(i);
+ TQString longName = i18n("New Cost Type %1").arg(i);
TraceCostType::add(new TraceCostType(shortName, longName, "0"));
_data->mapping()->add(new TraceCostType(shortName, longName, "0"));
refresh();
}
}
-void CostTypeView::selectedSlot(QListViewItem * i)
+void CostTypeView::selectedSlot(TQListViewItem * i)
{
TraceCostType* ct = i ? ((CostTypeItem*) i)->costType() : 0;
if (ct)
selectedCostType(ct);
}
-void CostTypeView::activatedSlot(QListViewItem * i)
+void CostTypeView::activatedSlot(TQListViewItem * i)
{
TraceCostType* ct = i ? ((CostTypeItem*) i)->costType() : 0;
if (ct)
@@ -199,7 +199,7 @@ void CostTypeView::doUpdate(int changeType)
if (changeType == costType2Changed) return;
if (changeType == groupTypeChanged) {
- QListViewItem *item;
+ TQListViewItem *item;
for (item = firstChild();item;item = item->nextSibling())
((CostTypeItem*)item)->setGroupType(_groupType);
@@ -207,7 +207,7 @@ void CostTypeView::doUpdate(int changeType)
}
if (changeType == costTypeChanged) {
- QListViewItem *item;
+ TQListViewItem *item;
for (item = firstChild();item;item = item->nextSibling())
if ( ((CostTypeItem*)item)->costType() == _costType) {
setSelected(item, true);
@@ -219,7 +219,7 @@ void CostTypeView::doUpdate(int changeType)
}
if (changeType == partsChanged) {
- QListViewItem *item;
+ TQListViewItem *item;
for (item = firstChild();item;item = item->nextSibling())
((CostTypeItem*)item)->update();
@@ -250,9 +250,9 @@ void CostTypeView::refresh()
TraceCostItem* c = (TraceCostItem*) _activeItem;
TraceCostType* ct =0 ;
- QListViewItem* item = 0;
- QString sumStr, pureStr;
- QListViewItem* costItem=0;
+ TQListViewItem* item = 0;
+ TQString sumStr, pureStr;
+ TQListViewItem* costItem=0;
TraceCostMapping* m = _data->mapping();
for (int i=m->virtualCount()-1;i>=0;i--) {
@@ -276,7 +276,7 @@ void CostTypeView::refresh()
}
-void CostTypeView::renamedSlot(QListViewItem* item,int c,const QString& t)
+void CostTypeView::renamedSlot(TQListViewItem* item,int c,const TQString& t)
{
TraceCostType* ct = item ? ((CostTypeItem*) item)->costType() : 0;
if (!ct || ct->isReal()) return;
diff --git a/kcachegrind/kcachegrind/costtypeview.h b/kcachegrind/kcachegrind/costtypeview.h
index b6eab280..63d95ea7 100644
--- a/kcachegrind/kcachegrind/costtypeview.h
+++ b/kcachegrind/kcachegrind/costtypeview.h
@@ -23,26 +23,26 @@
#ifndef COSTTYPEVIEW_H
#define COSTTYPEVIEW_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "tracedata.h"
#include "traceitemview.h"
-class CostTypeView: public QListView, public TraceItemView
+class CostTypeView: public TQListView, public TraceItemView
{
Q_OBJECT
public:
CostTypeView(TraceItemView* parentView,
- QWidget* parent=0, const char* name=0);
+ TQWidget* parent=0, const char* name=0);
- virtual QWidget* widget() { return this; }
- QString whatsThis() const;
+ virtual TQWidget* widget() { return this; }
+ TQString whatsThis() const;
private slots:
- void context(QListViewItem*,const QPoint &, int);
- void selectedSlot(QListViewItem*);
- void activatedSlot(QListViewItem*);
- void renamedSlot(QListViewItem*,int,const QString&);
+ void context(TQListViewItem*,const TQPoint &, int);
+ void selectedSlot(TQListViewItem*);
+ void activatedSlot(TQListViewItem*);
+ void renamedSlot(TQListViewItem*,int,const TQString&);
private:
TraceItem* canShow(TraceItem*);
diff --git a/kcachegrind/kcachegrind/coverageitem.cpp b/kcachegrind/kcachegrind/coverageitem.cpp
index 3cf5bbc1..3c93a88e 100644
--- a/kcachegrind/kcachegrind/coverageitem.cpp
+++ b/kcachegrind/kcachegrind/coverageitem.cpp
@@ -20,7 +20,7 @@
* Items of coverage view.
*/
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <klocale.h>
#include "configuration.h"
@@ -32,11 +32,11 @@
// CallerCoverageItem
-CallerCoverageItem::CallerCoverageItem(QListView* parent, Coverage* c,
+CallerCoverageItem::CallerCoverageItem(TQListView* parent, Coverage* c,
TraceFunction* base,
TraceCostType* ct,
TraceCost::CostType gt)
- : QListViewItem(parent)
+ : TQListViewItem(parent)
{
_skipped = 0;
_coverage = c;
@@ -50,11 +50,11 @@ CallerCoverageItem::CallerCoverageItem(QListView* parent, Coverage* c,
setGroupType(gt);
}
-CallerCoverageItem::CallerCoverageItem(QListView* parent, int skipped, Coverage* c,
+CallerCoverageItem::CallerCoverageItem(TQListView* parent, int skipped, Coverage* c,
TraceFunction* base,
TraceCostType* ct,
TraceCost::CostType gt)
- : QListViewItem(parent)
+ : TQListViewItem(parent)
{
_skipped = skipped;
_coverage = c;
@@ -74,7 +74,7 @@ void CallerCoverageItem::setGroupType(TraceCost::CostType gt)
if (_groupType == gt) return;
_groupType = gt;
- QColor c = Configuration::functionColor(_groupType, _function);
+ TQColor c = Configuration::functionColor(_groupType, _function);
setPixmap(3, colorPixmap(10, 10, c));
}
@@ -87,22 +87,22 @@ void CallerCoverageItem::setCostType(TraceCostType* ct)
void CallerCoverageItem::update()
{
if (!_coverage) {
- setText(0, QString::null);
- setText(1, QString::null);
+ setText(0, TQString::null);
+ setText(1, TQString::null);
return;
}
_pSum = 100.0 * _coverage->inclusive();
SubCost realSum = _base->inclusive()->subCost(_costType);
_sum = SubCost(realSum * _coverage->inclusive());
- QString str;
+ TQString str;
if (Configuration::showPercentage())
- str = QString("%1").arg(_pSum, 0, 'f', Configuration::percentPrecision());
+ str = TQString("%1").arg(_pSum, 0, 'f', Configuration::percentPrecision());
else
str = _sum.pretty();
if (_skipped) {
- setText(0, QString("< %1").arg(str));
+ setText(0, TQString("< %1").arg(str));
return;
}
@@ -112,15 +112,15 @@ void CallerCoverageItem::update()
// call count
_cc = SubCost(_coverage->callCount());
- setText(2, _cc ? _cc.pretty() : QString("(0)"));
+ setText(2, _cc ? _cc.pretty() : TQString("(0)"));
// distance (min/max/median)
_distance = _coverage->inclusiveMedian();
- QString distString;
+ TQString distString;
if (_coverage->minDistance() == _coverage->maxDistance())
- distString = QString::number(_distance);
+ distString = TQString::number(_distance);
else
- distString = QString("%1-%2 (%3)")
+ distString = TQString("%1-%2 (%3)")
.arg(_coverage->minDistance())
.arg(_coverage->maxDistance())
.arg(_distance);
@@ -128,7 +128,7 @@ void CallerCoverageItem::update()
}
-int CallerCoverageItem::compare(QListViewItem * i,
+int CallerCoverageItem::compare(TQListViewItem * i,
int col, bool ascending ) const
{
const CallerCoverageItem* ci1 = this;
@@ -165,18 +165,18 @@ int CallerCoverageItem::compare(QListViewItem * i,
if (ci1->_cc > ci2->_cc) return 1;
return 0;
}
- return QListViewItem::compare(i, col, ascending);
+ return TQListViewItem::compare(i, col, ascending);
}
// CalleeCoverageItem
-CalleeCoverageItem::CalleeCoverageItem(QListView* parent, Coverage* c,
+CalleeCoverageItem::CalleeCoverageItem(TQListView* parent, Coverage* c,
TraceFunction* base,
TraceCostType* ct,
TraceCost::CostType gt)
- : QListViewItem(parent)
+ : TQListViewItem(parent)
{
_skipped = 0;
_coverage = c;
@@ -190,11 +190,11 @@ CalleeCoverageItem::CalleeCoverageItem(QListView* parent, Coverage* c,
setGroupType(gt);
}
-CalleeCoverageItem::CalleeCoverageItem(QListView* parent, int skipped, Coverage* c,
+CalleeCoverageItem::CalleeCoverageItem(TQListView* parent, int skipped, Coverage* c,
TraceFunction* base,
TraceCostType* ct,
TraceCost::CostType gt)
- : QListViewItem(parent)
+ : TQListViewItem(parent)
{
_skipped = skipped;
_coverage = c;
@@ -214,7 +214,7 @@ void CalleeCoverageItem::setGroupType(TraceCost::CostType gt)
if (_groupType == gt) return;
_groupType = gt;
- QColor c = Configuration::functionColor(_groupType, _function);
+ TQColor c = Configuration::functionColor(_groupType, _function);
setPixmap(4, colorPixmap(10, 10, c));
}
@@ -227,9 +227,9 @@ void CalleeCoverageItem::setCostType(TraceCostType* ct)
void CalleeCoverageItem::update()
{
if (!_coverage) {
- setText(0, QString::null);
- setText(1, QString::null);
- setText(2, QString::null);
+ setText(0, TQString::null);
+ setText(1, TQString::null);
+ setText(2, TQString::null);
return;
}
@@ -240,14 +240,14 @@ void CalleeCoverageItem::update()
_sum = SubCost(realSum * _coverage->inclusive());
- QString str;
+ TQString str;
if (Configuration::showPercentage())
- str = QString("%1").arg(_pSum, 0, 'f', Configuration::percentPrecision());
+ str = TQString("%1").arg(_pSum, 0, 'f', Configuration::percentPrecision());
else
str = _sum.pretty();
if (_skipped) {
- str = QString("< %1").arg(str);
+ str = TQString("< %1").arg(str);
setText(0, str);
setText(1, str);
return;
@@ -258,7 +258,7 @@ void CalleeCoverageItem::update()
_self = SubCost(realSum * _coverage->self());
if (Configuration::showPercentage()) {
- setText(1, QString("%1")
+ setText(1, TQString("%1")
.arg(_pSelf, 0, 'f', Configuration::percentPrecision()));
}
else {
@@ -272,22 +272,22 @@ void CalleeCoverageItem::update()
_cc = SubCost(_coverage->callCount());
- setText(3, _cc ? _cc.pretty() : QString("(0)"));
+ setText(3, _cc ? _cc.pretty() : TQString("(0)"));
// for comparations
_distance = _coverage->inclusiveMedian();
- QString distString;
+ TQString distString;
if (_coverage->minDistance() == _coverage->maxDistance())
- distString = QString::number(_distance);
+ distString = TQString::number(_distance);
else {
int sMed = _coverage->selfMedian();
- QString med;
+ TQString med;
if (_distance == sMed)
- med = QString::number(_distance);
+ med = TQString::number(_distance);
else
- med = QString("%1/%2").arg(_distance).arg(sMed);
+ med = TQString("%1/%2").arg(_distance).arg(sMed);
- distString = QString("%1-%2 (%3)")
+ distString = TQString("%1-%2 (%3)")
.arg(_coverage->minDistance())
.arg(_coverage->maxDistance())
.arg(med);
@@ -296,7 +296,7 @@ void CalleeCoverageItem::update()
}
-int CalleeCoverageItem::compare(QListViewItem * i,
+int CalleeCoverageItem::compare(TQListViewItem * i,
int col, bool ascending ) const
{
CalleeCoverageItem* ci = (CalleeCoverageItem*) i;
@@ -337,7 +337,7 @@ int CalleeCoverageItem::compare(QListViewItem * i,
if (_cc > ci->_cc) return 1;
return 0;
}
- return QListViewItem::compare(i, col, ascending);
+ return TQListViewItem::compare(i, col, ascending);
}
diff --git a/kcachegrind/kcachegrind/coverageitem.h b/kcachegrind/kcachegrind/coverageitem.h
index abd7f6eb..29666890 100644
--- a/kcachegrind/kcachegrind/coverageitem.h
+++ b/kcachegrind/kcachegrind/coverageitem.h
@@ -23,7 +23,7 @@
#ifndef COVERAGEITEM_H
#define COVERAGEITEM_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "tracedata.h"
class Coverage;
@@ -31,12 +31,12 @@ class Coverage;
class CallerCoverageItem: public QListViewItem
{
public:
- CallerCoverageItem(QListView* parent, Coverage* c, TraceFunction* base,
+ CallerCoverageItem(TQListView* parent, Coverage* c, TraceFunction* base,
TraceCostType* ct, TraceCost::CostType gt);
- CallerCoverageItem(QListView* parent, int skipped, Coverage* c, TraceFunction* base,
+ CallerCoverageItem(TQListView* parent, int skipped, Coverage* c, TraceFunction* base,
TraceCostType* ct, TraceCost::CostType gt);
- int compare(QListViewItem * i, int col, bool ascending ) const;
+ int compare(TQListViewItem * i, int col, bool ascending ) const;
TraceFunction* function() { return (_skipped) ? 0 : _function; }
void setCostType(TraceCostType* ct);
void setGroupType(TraceCost::CostType);
@@ -57,12 +57,12 @@ private:
class CalleeCoverageItem: public QListViewItem
{
public:
- CalleeCoverageItem(QListView* parent, Coverage* c, TraceFunction* base,
+ CalleeCoverageItem(TQListView* parent, Coverage* c, TraceFunction* base,
TraceCostType* ct, TraceCost::CostType gt);
- CalleeCoverageItem(QListView* parent, int skipped, Coverage* c, TraceFunction* base,
+ CalleeCoverageItem(TQListView* parent, int skipped, Coverage* c, TraceFunction* base,
TraceCostType* ct, TraceCost::CostType gt);
- int compare(QListViewItem * i, int col, bool ascending ) const;
+ int compare(TQListViewItem * i, int col, bool ascending ) const;
TraceFunction* function() { return (_skipped) ? 0 : _function; }
void setCostType(TraceCostType* ct);
void setGroupType(TraceCost::CostType);
diff --git a/kcachegrind/kcachegrind/coverageview.cpp b/kcachegrind/kcachegrind/coverageview.cpp
index 9ca6b1db..4452efca 100644
--- a/kcachegrind/kcachegrind/coverageview.cpp
+++ b/kcachegrind/kcachegrind/coverageview.cpp
@@ -20,8 +20,8 @@
* Coverage Views
*/
-#include <qwhatsthis.h>
-#include <qpopupmenu.h>
+#include <tqwhatsthis.h>
+#include <tqpopupmenu.h>
#include <klocale.h>
#include "configuration.h"
@@ -37,8 +37,8 @@
CoverageView::CoverageView(bool showCallers, TraceItemView* parentView,
- QWidget* parent, const char* name)
- : QListView(parent, name), TraceItemView(parentView)
+ TQWidget* parent, const char* name)
+ : TQListView(parent, name), TraceItemView(parentView)
{
_showCallers = showCallers;
@@ -62,29 +62,29 @@ CoverageView::CoverageView(bool showCallers, TraceItemView* parentView,
setColumnAlignment(1, Qt::AlignRight);
setColumnAlignment(2, Qt::AlignRight);
setAllColumnsShowFocus(true);
- setResizeMode(QListView::LastColumn);
+ setResizeMode(TQListView::LastColumn);
setMinimumHeight(50);
connect( this,
- SIGNAL( selectionChanged(QListViewItem*) ),
- SLOT( selectedSlot(QListViewItem*) ) );
+ TQT_SIGNAL( selectionChanged(TQListViewItem*) ),
+ TQT_SLOT( selectedSlot(TQListViewItem*) ) );
connect( this,
- SIGNAL(contextMenuRequested(QListViewItem*, const QPoint &, int)),
- SLOT(context(QListViewItem*, const QPoint &, int)));
+ TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint &, int)),
+ TQT_SLOT(context(TQListViewItem*, const TQPoint &, int)));
connect(this,
- SIGNAL(doubleClicked(QListViewItem*)),
- SLOT(activatedSlot(QListViewItem*)));
+ TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ TQT_SLOT(activatedSlot(TQListViewItem*)));
connect(this,
- SIGNAL(returnPressed(QListViewItem*)),
- SLOT(activatedSlot(QListViewItem*)));
+ TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ TQT_SLOT(activatedSlot(TQListViewItem*)));
- QWhatsThis::add( this, whatsThis() );
+ TQWhatsThis::add( this, whatsThis() );
}
-QString CoverageView::whatsThis() const
+TQString CoverageView::whatsThis() const
{
return _showCallers ?
i18n( "<b>List of all Callers</b>"
@@ -148,9 +148,9 @@ QString CoverageView::whatsThis() const
"function of the other panel is changed instead.</p>");
}
-void CoverageView::context(QListViewItem* i, const QPoint & p, int c)
+void CoverageView::context(TQListViewItem* i, const TQPoint & p, int c)
{
- QPopupMenu popup;
+ TQPopupMenu popup;
TraceFunction* f = 0;
if (i) {
@@ -160,7 +160,7 @@ void CoverageView::context(QListViewItem* i, const QPoint & p, int c)
}
if (f) {
- QString name = f->name();
+ TQString name = f->name();
if ((int)name.length()>Configuration::maxSymbolLength())
name = name.left(Configuration::maxSymbolLength()) + "...";
popup.insertItem(i18n("Go to '%1'").arg(name), 93);
@@ -177,7 +177,7 @@ void CoverageView::context(QListViewItem* i, const QPoint & p, int c)
if (r == 93) activated(f);
}
-void CoverageView::selectedSlot(QListViewItem * i)
+void CoverageView::selectedSlot(TQListViewItem * i)
{
TraceFunction* f = 0;
if (i) {
@@ -192,7 +192,7 @@ void CoverageView::selectedSlot(QListViewItem * i)
}
}
-void CoverageView::activatedSlot(QListViewItem * i)
+void CoverageView::activatedSlot(TQListViewItem * i)
{
TraceFunction* f = 0;
if (i) {
@@ -229,7 +229,7 @@ void CoverageView::doUpdate(int changeType)
}
TraceFunction* f = 0;
- QListViewItem* i = QListView::selectedItem();
+ TQListViewItem* i = TQListView::selectedItem();
if (i) {
f = _showCallers ?
((CallerCoverageItem*)i)->function() :
@@ -237,7 +237,7 @@ void CoverageView::doUpdate(int changeType)
}
if (f == _selectedItem) return;
- QListViewItem *item;
+ TQListViewItem *item;
for (item = firstChild();item;item = item->nextSibling()) {
f = _showCallers ?
((CallerCoverageItem*)item)->function() :
@@ -252,7 +252,7 @@ void CoverageView::doUpdate(int changeType)
}
if (changeType == groupTypeChanged) {
- QListViewItem *item;
+ TQListViewItem *item;
for (item = firstChild();item;item = item->nextSibling()) {
if (_showCallers)
((CallerCoverageItem*)item)->setGroupType(_groupType);
diff --git a/kcachegrind/kcachegrind/coverageview.h b/kcachegrind/kcachegrind/coverageview.h
index 4b1b8b20..e0edeea5 100644
--- a/kcachegrind/kcachegrind/coverageview.h
+++ b/kcachegrind/kcachegrind/coverageview.h
@@ -23,26 +23,26 @@
#ifndef COVERAGEVIEW_H
#define COVERAGEVIEW_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "tracedata.h"
#include "traceitemview.h"
#include "listutils.h"
-class CoverageView: public QListView, public TraceItemView
+class CoverageView: public TQListView, public TraceItemView
{
Q_OBJECT
public:
CoverageView(bool showCallers, TraceItemView* parentView,
- QWidget* parent=0, const char* name=0);
+ TQWidget* parent=0, const char* name=0);
- virtual QWidget* widget() { return this; }
- QString whatsThis() const;
+ virtual TQWidget* widget() { return this; }
+ TQString whatsThis() const;
private slots:
- void context(QListViewItem*,const QPoint &, int);
- void selectedSlot(QListViewItem*);
- void activatedSlot(QListViewItem*);
+ void context(TQListViewItem*,const TQPoint &, int);
+ void selectedSlot(TQListViewItem*);
+ void activatedSlot(TQListViewItem*);
private:
TraceItem* canShow(TraceItem*);
diff --git a/kcachegrind/kcachegrind/dumpmanager.cpp b/kcachegrind/kcachegrind/dumpmanager.cpp
index 6dda67e6..2f0891a4 100644
--- a/kcachegrind/kcachegrind/dumpmanager.cpp
+++ b/kcachegrind/kcachegrind/dumpmanager.cpp
@@ -11,7 +11,7 @@
// Dump
//
-Dump::Dump(QString file)
+Dump::Dump(TQString file)
{
_filename = file;
}
diff --git a/kcachegrind/kcachegrind/dumpmanager.h b/kcachegrind/kcachegrind/dumpmanager.h
index 3e2ff9e1..4925819d 100644
--- a/kcachegrind/kcachegrind/dumpmanager.h
+++ b/kcachegrind/kcachegrind/dumpmanager.h
@@ -12,13 +12,13 @@
#ifndef DUMPMANAGER_H
#define DUMPMANAGER_H
-#include <qstring.h>
-#include <qptrlist.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
class Dump;
class TraceData;
-typedef QPtrList<Dump> DumpList;
+typedef TQPtrList<Dump> DumpList;
/**
@@ -27,12 +27,12 @@ typedef QPtrList<Dump> DumpList;
class Dump
{
public:
- Dump(QString);
+ Dump(TQString);
- QString filename() { return _filename; }
+ TQString filename() { return _filename; }
private:
- QString _filename;
+ TQString _filename;
};
diff --git a/kcachegrind/kcachegrind/dumpselection.cpp b/kcachegrind/kcachegrind/dumpselection.cpp
index c16470a7..4d812ef9 100644
--- a/kcachegrind/kcachegrind/dumpselection.cpp
+++ b/kcachegrind/kcachegrind/dumpselection.cpp
@@ -20,7 +20,7 @@
DumpSelection::DumpSelection( TopLevel* top,
- QWidget* parent, const char* name)
+ TQWidget* parent, const char* name)
: DumpSelectionBase(parent, name), TraceItemView(0, top)
{
}
diff --git a/kcachegrind/kcachegrind/dumpselection.h b/kcachegrind/kcachegrind/dumpselection.h
index 8c59d3e4..3bec46ae 100644
--- a/kcachegrind/kcachegrind/dumpselection.h
+++ b/kcachegrind/kcachegrind/dumpselection.h
@@ -20,10 +20,10 @@ class DumpSelection : public DumpSelectionBase, public TraceItemView
Q_OBJECT
public:
- DumpSelection( TopLevel*, QWidget* parent = 0, const char* name = 0);
+ DumpSelection( TopLevel*, TQWidget* parent = 0, const char* name = 0);
virtual ~DumpSelection();
- QWidget* widget() { return this; }
+ TQWidget* widget() { return this; }
};
#endif
diff --git a/kcachegrind/kcachegrind/functionitem.cpp b/kcachegrind/kcachegrind/functionitem.cpp
index d6d93c0d..3b694ddf 100644
--- a/kcachegrind/kcachegrind/functionitem.cpp
+++ b/kcachegrind/kcachegrind/functionitem.cpp
@@ -23,8 +23,8 @@
//#include <math.h>
-//#include <qpainter.h>
-//#include <qregexp.h>
+//#include <tqpainter.h>
+//#include <tqregexp.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -37,9 +37,9 @@
// FunctionItem
-FunctionItem::FunctionItem(QListView* parent, TraceFunction* f,
+FunctionItem::FunctionItem(TQListView* parent, TraceFunction* f,
TraceCostType* ct, TraceCost::CostType gt)
- :QListViewItem(parent)
+ :TQListViewItem(parent)
{
#if 0
_costPixValid = false;
@@ -56,9 +56,9 @@ FunctionItem::FunctionItem(QListView* parent, TraceFunction* f,
setText(4, f->prettyLocation());
}
-FunctionItem::FunctionItem(QListView* parent, int skipped,
+FunctionItem::FunctionItem(TQListView* parent, int skipped,
TraceFunction* f, TraceCostType* ct)
- :QListViewItem(parent)
+ :TQListViewItem(parent)
{
#if 0
_costPixValid = false;
@@ -73,11 +73,11 @@ FunctionItem::FunctionItem(QListView* parent, int skipped,
}
#if 0
-const QPixmap* FunctionItem::pixmap(int column) const
+const TQPixmap* FunctionItem::pixmap(int column) const
{
if (column == 3) {
if (!_groupPixValid) {
- QColor c = Configuration::functionColor(_groupType, _function);
+ TQColor c = Configuration::functionColor(_groupType, _function);
_groupPix = colorPixmap(10, 10, c);
_groupPixValid = true;
}
@@ -105,7 +105,7 @@ void FunctionItem::setGroupType(TraceCost::CostType gt)
_groupPixValid = false;
viewList()->repaint();
#else
- QColor c = Configuration::functionColor(_groupType, _function);
+ TQColor c = Configuration::functionColor(_groupType, _function);
setPixmap(3, colorPixmap(10, 10, c));
#endif
}
@@ -119,7 +119,7 @@ void FunctionItem::setCostType(TraceCostType* c)
void FunctionItem::update()
{
double inclTotal = _function->data()->subCost(_costType);
- QString str;
+ TQString str;
TraceCost* selfCost = _function->data();
if (Configuration::showExpanded()) {
@@ -141,7 +141,7 @@ void FunctionItem::update()
_sum = _function->inclusive()->subCost(_costType);
double incl = 100.0 * _sum / inclTotal;
if (Configuration::showPercentage())
- str = QString("%1").arg(incl, 0, 'f', Configuration::percentPrecision());
+ str = TQString("%1").arg(incl, 0, 'f', Configuration::percentPrecision());
else
str = _function->inclusive()->prettySubCost(_costType);
str = "< " + str;
@@ -155,22 +155,22 @@ void FunctionItem::update()
str = _function->prettyCalledCount();
else {
if (_function == _function->cycle())
- str = QString("-");
+ str = TQString("-");
else
- str = QString("(0)");
+ str = TQString("(0)");
}
setText(2, str);
// Incl. cost
_sum = _function->inclusive()->subCost(_costType);
if (inclTotal == 0.0) {
- setPixmap(0, QPixmap());
+ setPixmap(0, TQPixmap());
setText(0, "-");
}
else {
double incl = 100.0 * _sum / inclTotal;
if (Configuration::showPercentage())
- setText(0, QString("%1")
+ setText(0, TQString("%1")
.arg(incl, 0, 'f', Configuration::percentPrecision()));
else
setText(0, _function->inclusive()->prettySubCost(_costType));
@@ -181,14 +181,14 @@ void FunctionItem::update()
// self
_pure = _function->subCost(_costType);
if (selfTotal == 0.0) {
- setPixmap(1, QPixmap());
+ setPixmap(1, TQPixmap());
setText(1, "-");
}
else {
double self = 100.0 * _pure / selfTotal;
if (Configuration::showPercentage())
- setText(1, QString("%1")
+ setText(1, TQString("%1")
.arg(self, 0, 'f', Configuration::percentPrecision()));
else
setText(1, _function->prettySubCost(_costType));
@@ -198,7 +198,7 @@ void FunctionItem::update()
}
-int FunctionItem::compare(QListViewItem * i, int col, bool ascending ) const
+int FunctionItem::compare(TQListViewItem * i, int col, bool ascending ) const
{
const FunctionItem* fi1 = this;
const FunctionItem* fi2 = (FunctionItem*) i;
@@ -231,6 +231,6 @@ int FunctionItem::compare(QListViewItem * i, int col, bool ascending ) const
return 0;
}
- return QListViewItem::compare(i, col, ascending);
+ return TQListViewItem::compare(i, col, ascending);
}
diff --git a/kcachegrind/kcachegrind/functionitem.h b/kcachegrind/kcachegrind/functionitem.h
index 6a59a14d..1c49e1be 100644
--- a/kcachegrind/kcachegrind/functionitem.h
+++ b/kcachegrind/kcachegrind/functionitem.h
@@ -23,26 +23,26 @@
#ifndef FUNCTIONITEM_H
#define FUNCTIONITEM_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "tracedata.h"
class FunctionItem: public QListViewItem
{
public:
- FunctionItem(QListView* parent, TraceFunction* function,
+ FunctionItem(TQListView* parent, TraceFunction* function,
TraceCostType* ct, TraceCost::CostType gt);
// constructor for a "Skipped ... " entry
- FunctionItem(QListView* parent, int skipped,
+ FunctionItem(TQListView* parent, int skipped,
TraceFunction* function, TraceCostType* ct);
- int compare(QListViewItem * i, int col, bool ascending ) const;
+ int compare(TQListViewItem * i, int col, bool ascending ) const;
TraceFunction* function() { return (_skipped) ? 0 : _function; }
void setCostType(TraceCostType* ct);
void setGroupType(TraceCost::CostType);
void update();
#if 0
- const QPixmap* pixmap (int column) const;
+ const TQPixmap* pixmap (int column) const;
bool _costPixValid, _groupPixValid;
QPixMap _costPix, _groupPix;
#endif
diff --git a/kcachegrind/kcachegrind/functionselection.cpp b/kcachegrind/kcachegrind/functionselection.cpp
index 7df6d13c..212637ec 100644
--- a/kcachegrind/kcachegrind/functionselection.cpp
+++ b/kcachegrind/kcachegrind/functionselection.cpp
@@ -20,14 +20,14 @@
* For function selection, to be put into a QDockWindow
*/
-#include <qtimer.h>
-#include <qlistview.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qregexp.h>
-#include <qpopupmenu.h>
+#include <tqtimer.h>
+#include <tqlistview.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
+#include <tqregexp.h>
+#include <tqpopupmenu.h>
#include <klocale.h>
@@ -41,14 +41,14 @@
#include "toplevel.h"
FunctionSelection::FunctionSelection( TopLevel* top,
- QWidget* parent, const char* name)
+ TQWidget* parent, const char* name)
: FunctionSelectionBase(parent, name), TraceItemView(0, top)
{
_group = 0;
_inSetGroup = false;
_inSetFunction = false;
- QStringList args;
+ TQStringList args;
args << i18n("(No Grouping)")
<< TraceCost::i18nTypeName(TraceItem::Object)
<< TraceCost::i18nTypeName(TraceItem::File)
@@ -57,17 +57,17 @@ FunctionSelection::FunctionSelection( TopLevel* top,
groupBox->insertStringList(args);
// this needs same order of grouptype actionlist!
- connect(groupBox, SIGNAL(activated(int)),
- top, SLOT(groupTypeSelected(int)));
+ connect(groupBox, TQT_SIGNAL(activated(int)),
+ top, TQT_SLOT(groupTypeSelected(int)));
// search while typing...
- connect(searchEdit, SIGNAL(textChanged(const QString&)),
- this, SLOT(searchChanged(const QString&)));
- connect(&_searchTimer, SIGNAL(timeout()),
- this, SLOT(queryDelayed()));
+ connect(searchEdit, TQT_SIGNAL(textChanged(const TQString&)),
+ this, TQT_SLOT(searchChanged(const TQString&)));
+ connect(&_searchTimer, TQT_SIGNAL(timeout()),
+ this, TQT_SLOT(queryDelayed()));
// select first matching group/function on return
- connect(searchEdit, SIGNAL(returnPressed()),
- this, SLOT(searchReturnPressed()));
+ connect(searchEdit, TQT_SIGNAL(returnPressed()),
+ this, TQT_SLOT(searchReturnPressed()));
searchEdit->setMinimumWidth(50);
// we start with desending cost sorting
@@ -78,46 +78,46 @@ FunctionSelection::FunctionSelection( TopLevel* top,
functionList->setAllColumnsShowFocus(true);
// functionList->setShowSortIndicator(true);
// we can have very long function and location names
- functionList->setColumnWidthMode(3, QListView::Manual);
+ functionList->setColumnWidthMode(3, TQListView::Manual);
functionList->setColumnWidth(3, 200);
- functionList->setColumnWidthMode(4, QListView::Manual);
+ functionList->setColumnWidthMode(4, TQListView::Manual);
functionList->setColumnWidth(4, 200);
groupList->setSorting(0,false);
groupList->setColumnAlignment(0, Qt::AlignRight);
groupList->setAllColumnsShowFocus(true);
// groupList->setShowSortIndicator(true);
- groupList->setResizeMode(QListView::LastColumn);
+ groupList->setResizeMode(TQListView::LastColumn);
#if 0
// single click press activation
- connect(functionList, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(functionActivated(QListViewItem*)));
+ connect(functionList, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(functionActivated(TQListViewItem*)));
connect(functionList,
- SIGNAL(contextMenuRequested(QListViewItem*, const QPoint &, int)),
- this, SLOT(functionContext(QListViewItem*, const QPoint &, int)));
+ TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint &, int)),
+ this, TQT_SLOT(functionContext(TQListViewItem*, const TQPoint &, int)));
#else
// single click release activation
- connect(functionList, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(functionSelected(QListViewItem*)));
- connect(functionList, SIGNAL(clicked(QListViewItem*)),
- this, SLOT(functionActivated(QListViewItem*)));
- connect(functionList, SIGNAL(returnPressed(QListViewItem*)),
- this, SLOT(functionActivated(QListViewItem*)));
+ connect(functionList, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(functionSelected(TQListViewItem*)));
+ connect(functionList, TQT_SIGNAL(clicked(TQListViewItem*)),
+ this, TQT_SLOT(functionActivated(TQListViewItem*)));
+ connect(functionList, TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ this, TQT_SLOT(functionActivated(TQListViewItem*)));
connect(functionList,
- SIGNAL(contextMenuRequested(QListViewItem*, const QPoint &, int)),
- this, SLOT(functionContext(QListViewItem*, const QPoint &, int)));
+ TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint &, int)),
+ this, TQT_SLOT(functionContext(TQListViewItem*, const TQPoint &, int)));
#endif
- connect(groupList, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(groupSelected(QListViewItem*)));
- connect(groupList, SIGNAL(doubleClicked(QListViewItem*)),
- this, SLOT(groupDoubleClicked(QListViewItem*)));
- connect(groupList, SIGNAL(returnPressed(QListViewItem*)),
- this, SLOT(groupDoubleClicked(QListViewItem*)));
+ connect(groupList, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(groupSelected(TQListViewItem*)));
+ connect(groupList, TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ this, TQT_SLOT(groupDoubleClicked(TQListViewItem*)));
+ connect(groupList, TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ this, TQT_SLOT(groupDoubleClicked(TQListViewItem*)));
connect(groupList,
- SIGNAL(contextMenuRequested(QListViewItem*, const QPoint &, int)),
- this, SLOT(groupContext(QListViewItem*, const QPoint &, int)));
+ TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint &, int)),
+ this, TQT_SLOT(groupContext(TQListViewItem*, const TQPoint &, int)));
// start hidden
groupList->hide();
@@ -131,7 +131,7 @@ void FunctionSelection::searchReturnPressed()
{
query(searchEdit->text());
- QListViewItem* item;
+ TQListViewItem* item;
if (_groupType != TraceItem::Function) {
// if current group not matching, select first matching group
item = groupList->currentItem();
@@ -150,7 +150,7 @@ void FunctionSelection::searchReturnPressed()
}
// trigger the query after some delay, dependent on length
-void FunctionSelection::searchChanged(const QString& q)
+void FunctionSelection::searchChanged(const TQString& q)
{
_searchDelayed = q;
int ms = 100;
@@ -164,10 +164,10 @@ void FunctionSelection::queryDelayed()
query(_searchDelayed);
}
-void FunctionSelection::functionContext(QListViewItem* i,
- const QPoint & p, int c)
+void FunctionSelection::functionContext(TQListViewItem* i,
+ const TQPoint & p, int c)
{
- QPopupMenu popup;
+ TQPopupMenu popup;
TraceFunction* f = 0;
if (i) {
@@ -190,10 +190,10 @@ void FunctionSelection::functionContext(QListViewItem* i,
if (r == 93) activated(f);
}
-void FunctionSelection::groupContext(QListViewItem* /*i*/,
- const QPoint & p, int c)
+void FunctionSelection::groupContext(TQListViewItem* /*i*/,
+ const TQPoint & p, int c)
{
- QPopupMenu popup;
+ TQPopupMenu popup;
#if 0
TraceCostItem* g = 0;
@@ -217,9 +217,9 @@ void FunctionSelection::groupContext(QListViewItem* /*i*/,
}
-void FunctionSelection::addGroupMenu(QPopupMenu* popup)
+void FunctionSelection::addGroupMenu(TQPopupMenu* popup)
{
- QPopupMenu *popup1 = new QPopupMenu(popup);
+ TQPopupMenu *popup1 = new TQPopupMenu(popup);
popup1->setCheckable(true);
if (_groupType != TraceItem::Function) {
@@ -237,8 +237,8 @@ void FunctionSelection::addGroupMenu(QPopupMenu* popup)
case TraceItem::FunctionCycle: popup1->setItemChecked(4, true); break;
default: break;
}
- connect(popup1,SIGNAL(activated(int)),
- _topLevel,SLOT(groupTypeSelected(int)));
+ connect(popup1,TQT_SIGNAL(activated(int)),
+ _topLevel,TQT_SLOT(groupTypeSelected(int)));
popup->insertItem(i18n("Grouping"), popup1);
}
@@ -298,15 +298,15 @@ void FunctionSelection::doUpdate(int changeType)
TraceFunction* f = (TraceFunction*) _activeItem;
// if already current, nothing to do
- QListViewItem* i = functionList->currentItem();
+ TQListViewItem* i = functionList->currentItem();
if (i && (((FunctionItem*)i)->function() == f)) {
functionList->setSelected(i,true);
return;
}
// reset searchEdit (as not activated from this view)
- _searchString = QString::null;
- query(QString::null);
+ _searchString = TQString::null;
+ query(TQString::null);
// select cost item group of function
switch(_groupType) {
@@ -318,7 +318,7 @@ void FunctionSelection::doUpdate(int changeType)
break;
}
- QListViewItem* item = functionList->firstChild();
+ TQListViewItem* item = functionList->firstChild();
for (;item;item = item->nextSibling())
if (((FunctionItem*)item)->function() == f)
break;
@@ -368,8 +368,8 @@ void FunctionSelection::doUpdate(int changeType)
}
// reset searchEdit
- _searchString = QString::null;
- query(QString::null);
+ _searchString = TQString::null;
+ query(TQString::null);
refresh();
}
@@ -386,7 +386,7 @@ void FunctionSelection::setGroup(TraceCostItem* g)
if (g == _group) return;
_group = g;
- QListViewItem* item = groupList->firstChild();
+ TQListViewItem* item = groupList->firstChild();
for (;item;item = item->nextSibling())
if (((CostListItem*)item)->costItem() == g)
break;
@@ -432,7 +432,7 @@ void FunctionSelection::refresh()
TraceObjectMap::Iterator oit;
TraceClassMap::Iterator cit;
TraceFileMap::Iterator fit;
- QListViewItem *i = 0, *item = 0, *fitem = 0;
+ TQListViewItem *i = 0, *item = 0, *fitem = 0;
// Fill up group list.
// Always show group of current function, even if cost below low limit.
@@ -480,7 +480,7 @@ void FunctionSelection::refresh()
default:
{
- QListViewItem* oldItem = functionList->selectedItem();
+ TQListViewItem* oldItem = functionList->selectedItem();
TraceFunction* oldFunction = 0;
int oldPos = 0;
if (oldItem) {
@@ -491,7 +491,7 @@ void FunctionSelection::refresh()
oldFunction = 0;
}
- // switching off QListView updates is buggy with some QT versions...
+ // switching off TQListView updates is buggy with some QT versions...
//functionList->setUpdatesEnabled(false);
functionList->clear();
setCostColumnWidths();
@@ -585,7 +585,7 @@ void FunctionSelection::refresh()
}
-void FunctionSelection::groupSelected(QListViewItem* i)
+void FunctionSelection::groupSelected(TQListViewItem* i)
{
if (!i) return;
if (!_data) return;
@@ -614,7 +614,7 @@ void FunctionSelection::groupSelected(QListViewItem* i)
return;
}
- // switching off QListView updates is buggy with some QT versions...
+ // switching off TQListView updates is buggy with some QT versions...
//functionList->setUpdatesEnabled(false);
functionList->clear();
@@ -633,7 +633,7 @@ void FunctionSelection::groupSelected(QListViewItem* i)
}
#endif
- QRegExp re(_searchString, false, true);
+ TQRegExp re(_searchString, false, true);
FunctionItem* fitem = 0;
TraceFunction *f;
@@ -677,7 +677,7 @@ void FunctionSelection::groupSelected(QListViewItem* i)
}
}
-void FunctionSelection::groupDoubleClicked(QListViewItem* i)
+void FunctionSelection::groupDoubleClicked(TQListViewItem* i)
{
if (!i) return;
if (!_data) return;
@@ -691,9 +691,9 @@ void FunctionSelection::groupDoubleClicked(QListViewItem* i)
}
-TraceCostItem* FunctionSelection::group(QString s)
+TraceCostItem* FunctionSelection::group(TQString s)
{
- QListViewItem *item;
+ TQListViewItem *item;
item = groupList->firstChild();
for(;item;item = item->nextSibling())
if (((CostListItem*)item)->costItem()->name() == s)
@@ -704,7 +704,7 @@ TraceCostItem* FunctionSelection::group(QString s)
-void FunctionSelection::functionSelected(QListViewItem* i)
+void FunctionSelection::functionSelected(TQListViewItem* i)
{
if (!i) return;
if (!_data) return;
@@ -721,7 +721,7 @@ void FunctionSelection::functionSelected(QListViewItem* i)
}
}
-void FunctionSelection::functionActivated(QListViewItem* i)
+void FunctionSelection::functionActivated(TQListViewItem* i)
{
if (!i) return;
if (!_data) return;
@@ -735,7 +735,7 @@ void FunctionSelection::functionActivated(QListViewItem* i)
void FunctionSelection::updateGroupSizes(bool hideEmpty)
{
- QListViewItem* item = groupList->firstChild();
+ TQListViewItem* item = groupList->firstChild();
for (;item;item = item->nextSibling()) {
CostListItem* i = (CostListItem*)item;
int size = (_groupSize.contains(i->costItem())) ?
@@ -745,7 +745,7 @@ void FunctionSelection::updateGroupSizes(bool hideEmpty)
}
}
-void FunctionSelection::query(QString query)
+void FunctionSelection::query(TQString query)
{
if (searchEdit->text() != query)
searchEdit->setText(query);
@@ -759,7 +759,7 @@ void FunctionSelection::query(QString query)
}
_searchString = query;
- QRegExp re(query, false, true);
+ TQRegExp re(query, false, true);
_groupSize.clear();
TraceFunction* f = 0;
@@ -841,7 +841,7 @@ void FunctionSelection::query(QString query)
bool FunctionSelection::setTopFunction()
{
- QListViewItem* i = functionList->firstChild();
+ TQListViewItem* i = functionList->firstChild();
// this emits a function selection
functionList->setSelected(i, true);
functionActivated(i);
@@ -851,15 +851,15 @@ bool FunctionSelection::setTopFunction()
void FunctionSelection::setCostColumnWidths()
{
if (_costType && (_costType->subCost(_data->callMax())>0) ) {
- functionList->setColumnWidthMode(0, QListView::Maximum);
+ functionList->setColumnWidthMode(0, TQListView::Maximum);
functionList->setColumnWidth(0,50);
- functionList->setColumnWidthMode(2, QListView::Maximum);
+ functionList->setColumnWidthMode(2, TQListView::Maximum);
functionList->setColumnWidth(2,50);
}
else {
- functionList->setColumnWidthMode(0, QListView::Manual);
+ functionList->setColumnWidthMode(0, TQListView::Manual);
functionList->setColumnWidth(0,0);
- functionList->setColumnWidthMode(2, QListView::Manual);
+ functionList->setColumnWidthMode(2, TQListView::Manual);
functionList->setColumnWidth(2,0);
}
diff --git a/kcachegrind/kcachegrind/functionselection.h b/kcachegrind/kcachegrind/functionselection.h
index c5e7c871..4a8db0be 100644
--- a/kcachegrind/kcachegrind/functionselection.h
+++ b/kcachegrind/kcachegrind/functionselection.h
@@ -40,28 +40,28 @@ class FunctionSelection : public FunctionSelectionBase, public TraceItemView
Q_OBJECT
public:
- FunctionSelection( TopLevel*, QWidget* parent = 0, const char* name = 0);
+ FunctionSelection( TopLevel*, TQWidget* parent = 0, const char* name = 0);
~FunctionSelection();
- TraceCostItem* group(QString);
+ TraceCostItem* group(TQString);
void setGroup(TraceCostItem*);
- void query(QString);
+ void query(TQString);
bool setTopFunction();
- QWidget* widget() { return this; }
+ TQWidget* widget() { return this; }
- void addGroupMenu(QPopupMenu*);
+ void addGroupMenu(TQPopupMenu*);
public slots:
void searchReturnPressed();
- void searchChanged(const QString&);
+ void searchChanged(const TQString&);
void queryDelayed();
- void groupDoubleClicked( QListViewItem* );
- void functionActivated( QListViewItem* );
- void groupSelected( QListViewItem* );
- void functionSelected( QListViewItem* );
- void functionContext(QListViewItem*, const QPoint &, int);
- void groupContext(QListViewItem*, const QPoint &, int);
+ void groupDoubleClicked( TQListViewItem* );
+ void functionActivated( TQListViewItem* );
+ void groupSelected( TQListViewItem* );
+ void functionSelected( TQListViewItem* );
+ void functionContext(TQListViewItem*, const TQPoint &, int);
+ void groupContext(TQListViewItem*, const TQPoint &, int);
private:
TraceItem* canShow(TraceItem* i);
@@ -73,9 +73,9 @@ private:
TraceCostItem* _group;
- QString _searchString, _searchDelayed;
- QTimer _searchTimer;
- QMap<TraceCostItem*,int> _groupSize;
+ TQString _searchString, _searchDelayed;
+ TQTimer _searchTimer;
+ TQMap<TraceCostItem*,int> _groupSize;
HighestCostList _hc;
// when setting a
diff --git a/kcachegrind/kcachegrind/instritem.cpp b/kcachegrind/kcachegrind/instritem.cpp
index c7cdfba3..97c09661 100644
--- a/kcachegrind/kcachegrind/instritem.cpp
+++ b/kcachegrind/kcachegrind/instritem.cpp
@@ -20,8 +20,8 @@
* Items of instruction view.
*/
-#include <qpixmap.h>
-#include <qpainter.h>
+#include <tqpixmap.h>
+#include <tqpainter.h>
#include <klocale.h>
#include <kapplication.h>
@@ -37,9 +37,9 @@
// InstrItem
// for messages
-InstrItem::InstrItem(InstrView* iv, QListView* parent,
- Addr addr, const QString& msg)
- : QListViewItem(parent)
+InstrItem::InstrItem(InstrView* iv, TQListView* parent,
+ Addr addr, const TQString& msg)
+ : TQListViewItem(parent)
{
_view = iv;
_addr = addr;
@@ -56,11 +56,11 @@ InstrItem::InstrItem(InstrView* iv, QListView* parent,
}
// for code lines
-InstrItem::InstrItem(InstrView* iv, QListView* parent,
+InstrItem::InstrItem(InstrView* iv, TQListView* parent,
Addr addr, bool inside,
- const QString& code, const QString& cmd,
- const QString& args, TraceInstr* instr)
- : QListViewItem(parent)
+ const TQString& code, const TQString& cmd,
+ const TQString& args, TraceInstr* instr)
+ : TQListViewItem(parent)
{
_view = iv;
_addr = addr;
@@ -86,9 +86,9 @@ InstrItem::InstrItem(InstrView* iv, QListView* parent,
}
// for call lines
-InstrItem::InstrItem(InstrView* iv, QListViewItem* parent, Addr addr,
+InstrItem::InstrItem(InstrView* iv, TQListViewItem* parent, Addr addr,
TraceInstr* instr, TraceInstrCall* instrCall)
- : QListViewItem(parent)
+ : TQListViewItem(parent)
{
_view = iv;
_addr = addr;
@@ -101,13 +101,13 @@ InstrItem::InstrItem(InstrView* iv, QListViewItem* parent, Addr addr,
// fileno, lineno, _lineCall->call()->called()->prettyName().ascii());
SubCost cc = _instrCall->callCount();
- QString templ = " ";
+ TQString templ = " ";
if (cc==0)
templ += i18n("Active call to '%1'");
else
templ += i18n("%n call to '%1'", "%n calls to '%1'", cc);
- QString callStr = templ.arg(_instrCall->call()->calledName());
+ TQString callStr = templ.arg(_instrCall->call()->calledName());
TraceFunction* calledF = _instrCall->call()->called();
calledF->addPrettyLocation(callStr);
@@ -118,9 +118,9 @@ InstrItem::InstrItem(InstrView* iv, QListViewItem* parent, Addr addr,
}
// for jump lines
-InstrItem::InstrItem(InstrView* iv, QListViewItem* parent, Addr addr,
+InstrItem::InstrItem(InstrView* iv, TQListViewItem* parent, Addr addr,
TraceInstr* instr, TraceInstrJump* instrJump)
- : QListViewItem(parent)
+ : TQListViewItem(parent)
{
_view = iv;
_addr = addr;
@@ -132,7 +132,7 @@ InstrItem::InstrItem(InstrView* iv, QListViewItem* parent, Addr addr,
//qDebug("SourceItem: (file %d, line %d) Linecall to %s",
// fileno, lineno, _lineCall->call()->called()->prettyName().ascii());
- QString jStr;
+ TQString jStr;
if (_instrJump->isCondJump())
jStr = i18n("Jump %1 of %2 times to 0x%3")
.arg(_instrJump->followedCount().pretty())
@@ -155,7 +155,7 @@ void InstrItem::updateGroup()
if (!_instrCall) return;
TraceFunction* f = _instrCall->call()->called();
- QColor c = Configuration::functionColor(_view->groupType(), f);
+ TQColor c = Configuration::functionColor(_view->groupType(), f);
setPixmap(6, colorPixmap(10, 10, c));
}
@@ -174,10 +174,10 @@ void InstrItem::updateCost()
if (_instrCall &&
((_instrCall->call()->inCycle()>0) ||
(_instrCall->call()->isRecursion()>0))) {
- QString str;
- QPixmap p;
+ TQString str;
+ TQPixmap p;
- QString icon = "undo";
+ TQString icon = "undo";
KIconLoader* loader = KApplication::kApplication()->iconLoader();
p= loader->loadIcon(icon, KIcon::Small, 0,
KIcon::DefaultState, 0, true);
@@ -200,15 +200,15 @@ void InstrItem::updateCost()
TraceCostType *ct = _view->costType();
_pure = ct ? instrCost->subCost(ct) : SubCost(0);
if (_pure == 0) {
- setText(1, QString::null);
- setPixmap(1, QPixmap());
+ setText(1, TQString::null);
+ setPixmap(1, TQPixmap());
}
else {
double total = totalCost->subCost(ct);
double pure = 100.0 * _pure / total;
if (Configuration::showPercentage())
- setText(1, QString("%1")
+ setText(1, TQString("%1")
.arg(pure, 0, 'f', Configuration::percentPrecision()));
else
setText(1, _pure.pretty());
@@ -219,15 +219,15 @@ void InstrItem::updateCost()
TraceCostType *ct2 = _view->costType2();
_pure2 = ct2 ? instrCost->subCost(ct2) : SubCost(0);
if (_pure2 == 0) {
- setText(2, QString::null);
- setPixmap(2, QPixmap());
+ setText(2, TQString::null);
+ setPixmap(2, TQPixmap());
}
else {
double total = totalCost->subCost(ct2);
double pure = 100.0 * _pure2 / total;
if (Configuration::showPercentage())
- setText(2, QString("%1")
+ setText(2, TQString("%1")
.arg(pure, 0, 'f', Configuration::percentPrecision()));
else
setText(2, _pure2.pretty());
@@ -237,7 +237,7 @@ void InstrItem::updateCost()
}
-int InstrItem::compare(QListViewItem * i, int col, bool ascending ) const
+int InstrItem::compare(TQListViewItem * i, int col, bool ascending ) const
{
const InstrItem* ii1 = this;
const InstrItem* ii2 = (InstrItem*) i;
@@ -293,50 +293,50 @@ int InstrItem::compare(QListViewItem * i, int col, bool ascending ) const
return 0;
}
- return QListViewItem::compare(i, col, ascending);
+ return TQListViewItem::compare(i, col, ascending);
}
-void InstrItem::paintCell( QPainter *p, const QColorGroup &cg,
+void InstrItem::paintCell( TQPainter *p, const TQColorGroup &cg,
int column, int width, int alignment )
{
- QColorGroup _cg( cg );
+ TQColorGroup _cg( cg );
if ( !_inside || ((column==1) || column==2))
- _cg.setColor( QColorGroup::Base, cg.button() );
+ _cg.setColor( TQColorGroup::Base, cg.button() );
else if ((_instrCall || _instrJump) && column>2)
- _cg.setColor( QColorGroup::Base, cg.midlight() );
+ _cg.setColor( TQColorGroup::Base, cg.midlight() );
if (column == 3)
paintArrows(p, _cg, width);
else
- QListViewItem::paintCell( p, _cg, column, width, alignment );
+ TQListViewItem::paintCell( p, _cg, column, width, alignment );
}
-void InstrItem::setJumpArray(const QMemArray<TraceInstrJump*>& a)
+void InstrItem::setJumpArray(const TQMemArray<TraceInstrJump*>& a)
{
_jump.duplicate(a);
}
-void InstrItem::paintArrows(QPainter *p, const QColorGroup &cg, int width)
+void InstrItem::paintArrows(TQPainter *p, const TQColorGroup &cg, int width)
{
- QListView *lv = listView();
+ TQListView *lv = listView();
if ( !lv ) return;
InstrView* iv = (InstrView*) lv;
const BackgroundMode bgmode = lv->viewport()->backgroundMode();
- const QColorGroup::ColorRole crole
- = QPalette::backgroundRoleFromMode( bgmode );
+ const TQColorGroup::ColorRole crole
+ = TQPalette::backgroundRoleFromMode( bgmode );
if ( cg.brush( crole ) != lv->colorGroup().brush( crole ) )
p->fillRect( 0, 0, width, height(), cg.brush( crole ) );
else
- iv->paintEmptyArea( p, QRect( 0, 0, width, height() ) );
+ iv->paintEmptyArea( p, TQRect( 0, 0, width, height() ) );
if ( isSelected() && lv->allColumnsShowFocus() )
- p->fillRect( 0, 0, width, height(), cg.brush( QColorGroup::Highlight ) );
+ p->fillRect( 0, 0, width, height(), cg.brush( TQColorGroup::Highlight ) );
int marg = lv->itemMargin();
int yy = height()/2, y1, y2;
- QColor c;
+ TQColor c;
int start = -1, end = -1;
@@ -372,7 +372,7 @@ void InstrItem::paintArrows(QPainter *p, const QColorGroup &cg, int width)
if (_jump[i] == ((TraceItemView*)_view)->selectedItem()) {
p->fillRect( marg + 6*i-2, (y1==0) ? y1: y1-2,
8, (y2-y1==height())? y2:y2+2,
- cg.brush( QColorGroup::Highlight ) );
+ cg.brush( TQColorGroup::Highlight ) );
c = lv->colorGroup().highlightedText();
}
#endif
@@ -407,7 +407,7 @@ void InstrItem::paintArrows(QPainter *p, const QColorGroup &cg, int width)
x = marg + 6*end;
w = 6*(iv->arrowLevels() - end) + 10;
- QPointArray a;
+ TQPointArray a;
a.putPoints(0, 7, x, y+h,
x,y, x+w-8, y, x+w-8, y-2,
x+w, yy,
@@ -453,10 +453,10 @@ void InstrItem::paintArrows(QPainter *p, const QColorGroup &cg, int width)
}
-int InstrItem::width( const QFontMetrics& fm,
- const QListView* lv, int c ) const
+int InstrItem::width( const TQFontMetrics& fm,
+ const TQListView* lv, int c ) const
{
- if (c != 3) return QListViewItem::width(fm, lv, c);
+ if (c != 3) return TQListViewItem::width(fm, lv, c);
InstrView* iv = (InstrView*) lv;
int levels = iv->arrowLevels();
diff --git a/kcachegrind/kcachegrind/instritem.h b/kcachegrind/kcachegrind/instritem.h
index 33634995..8f04b47a 100644
--- a/kcachegrind/kcachegrind/instritem.h
+++ b/kcachegrind/kcachegrind/instritem.h
@@ -23,7 +23,7 @@
#ifndef INSTRITEM_H
#define INSTRITEM_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "tracedata.h"
class InstrView;
@@ -33,21 +33,21 @@ class InstrItem: public QListViewItem
public:
// for messages
- InstrItem(InstrView* iv, QListView* parent,
- Addr addr, const QString&);
+ InstrItem(InstrView* iv, TQListView* parent,
+ Addr addr, const TQString&);
// for instruction lines
- InstrItem(InstrView* iv, QListView* parent,
+ InstrItem(InstrView* iv, TQListView* parent,
Addr addr, bool inside,
- const QString&, const QString&, const QString&,
+ const TQString&, const TQString&, const TQString&,
TraceInstr* instr);
// for call instr
- InstrItem(InstrView* iv, QListViewItem* parent, Addr addr,
+ InstrItem(InstrView* iv, TQListViewItem* parent, Addr addr,
TraceInstr* instr, TraceInstrCall* instrCall);
// for jump lines
- InstrItem(InstrView* iv, QListViewItem* parent, Addr addr,
+ InstrItem(InstrView* iv, TQListViewItem* parent, Addr addr,
TraceInstr* instr, TraceInstrJump* instrJump);
Addr addr() const { return _addr; }
@@ -55,22 +55,22 @@ public:
TraceInstrCall* instrCall() const { return _instrCall; }
TraceInstrJump* instrJump() const { return _instrJump; }
- int compare(QListViewItem * i, int col, bool ascending ) const;
+ int compare(TQListViewItem * i, int col, bool ascending ) const;
- void paintCell(QPainter *p, const QColorGroup &cg,
+ void paintCell(TQPainter *p, const TQColorGroup &cg,
int column, int width, int alignment );
- int width( const QFontMetrics& fm,
- const QListView* lv, int c ) const;
+ int width( const TQFontMetrics& fm,
+ const TQListView* lv, int c ) const;
void updateGroup();
void updateCost();
// arrow lines
- void setJumpArray(const QMemArray<TraceInstrJump*>& a);
+ void setJumpArray(const TQMemArray<TraceInstrJump*>& a);
protected:
- void paintArrows(QPainter *p, const QColorGroup &cg, int width);
- QMemArray<TraceInstrJump*> _jump;
+ void paintArrows(TQPainter *p, const TQColorGroup &cg, int width);
+ TQMemArray<TraceInstrJump*> _jump;
private:
InstrView* _view;
diff --git a/kcachegrind/kcachegrind/instrview.cpp b/kcachegrind/kcachegrind/instrview.cpp
index d1b023bc..8a67296e 100644
--- a/kcachegrind/kcachegrind/instrview.cpp
+++ b/kcachegrind/kcachegrind/instrview.cpp
@@ -20,10 +20,10 @@
* Instruction View
*/
-#include <qfile.h>
-#include <qregexp.h>
-#include <qwhatsthis.h>
-#include <qpopupmenu.h>
+#include <tqfile.h>
+#include <tqregexp.h>
+#include <tqwhatsthis.h>
+#include <tqpopupmenu.h>
#include <klocale.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -111,8 +111,8 @@ static bool parseLine(char* buf, Addr& addr,
InstrView::InstrView(TraceItemView* parentView,
- QWidget* parent, const char* name)
- : QListView(parent, name), TraceItemView(parentView)
+ TQWidget* parent, const char* name)
+ : TQListView(parent, name), TraceItemView(parentView)
{
_showHexCode = DEFAULT_SHOWHEXCODE;
_lastHexCodeWidth = 50;
@@ -136,29 +136,29 @@ InstrView::InstrView(TraceItemView* parentView,
setColumnAlignment(2, Qt::AlignRight);
connect(this,
- SIGNAL(contextMenuRequested(QListViewItem*, const QPoint &, int)),
- SLOT(context(QListViewItem*, const QPoint &, int)));
+ TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint &, int)),
+ TQT_SLOT(context(TQListViewItem*, const TQPoint &, int)));
- connect(this, SIGNAL(selectionChanged(QListViewItem*)),
- SLOT(selectedSlot(QListViewItem*)));
+ connect(this, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ TQT_SLOT(selectedSlot(TQListViewItem*)));
connect(this,
- SIGNAL(doubleClicked(QListViewItem*)),
- SLOT(activatedSlot(QListViewItem*)));
+ TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ TQT_SLOT(activatedSlot(TQListViewItem*)));
connect(this,
- SIGNAL(returnPressed(QListViewItem*)),
- SLOT(activatedSlot(QListViewItem*)));
+ TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ TQT_SLOT(activatedSlot(TQListViewItem*)));
- QWhatsThis::add( this, whatsThis());
+ TQWhatsThis::add( this, whatsThis());
}
-void InstrView::paintEmptyArea( QPainter * p, const QRect & r)
+void InstrView::paintEmptyArea( TQPainter * p, const TQRect & r)
{
- QListView::paintEmptyArea(p, r);
+ TQListView::paintEmptyArea(p, r);
}
-QString InstrView::whatsThis() const
+TQString InstrView::whatsThis() const
{
return i18n( "<b>Annotated Assembler</b>"
"<p>The annotated assembler list shows the "
@@ -175,9 +175,9 @@ QString InstrView::whatsThis() const
"make the destination function of this call current.</p>");
}
-void InstrView::context(QListViewItem* i, const QPoint & p, int c)
+void InstrView::context(TQListViewItem* i, const TQPoint & p, int c)
{
- QPopupMenu popup;
+ TQPopupMenu popup;
TraceInstrCall* ic = i ? ((InstrItem*) i)->instrCall() : 0;
TraceInstrJump* ij = i ? ((InstrItem*) i)->instrJump() : 0;
@@ -185,7 +185,7 @@ void InstrView::context(QListViewItem* i, const QPoint & p, int c)
TraceInstr* instr = ij ? ij->instrTo() : 0;
if (f) {
- QString name = f->name();
+ TQString name = f->name();
if ((int)name.length()>Configuration::maxSymbolLength())
name = name.left(Configuration::maxSymbolLength()) + "...";
popup.insertItem(i18n("Go to '%1'").arg(name), 93);
@@ -222,7 +222,7 @@ void InstrView::context(QListViewItem* i, const QPoint & p, int c)
}
-void InstrView::selectedSlot(QListViewItem * i)
+void InstrView::selectedSlot(TQListViewItem * i)
{
if (!i) return;
// programatically selected items are not signalled
@@ -250,7 +250,7 @@ void InstrView::selectedSlot(QListViewItem * i)
}
}
-void InstrView::activatedSlot(QListViewItem * i)
+void InstrView::activatedSlot(TQListViewItem * i)
{
if (!i) return;
TraceInstrCall* ic = ((InstrItem*) i)->instrCall();
@@ -311,13 +311,13 @@ void InstrView::doUpdate(int changeType)
return;
}
- InstrItem *ii = (InstrItem*)QListView::selectedItem();
+ InstrItem *ii = (InstrItem*)TQListView::selectedItem();
if (ii) {
if ((ii->instr() == _selectedItem) ||
(ii->instr() && (ii->instr()->line() == _selectedItem))) return;
}
- QListViewItem *item, *item2;
+ TQListViewItem *item, *item2;
for (item = firstChild();item;item = item->nextSibling()) {
ii = (InstrItem*)item;
if ((ii->instr() == _selectedItem) ||
@@ -346,7 +346,7 @@ void InstrView::doUpdate(int changeType)
}
if (changeType == groupTypeChanged) {
- QListViewItem *item, *item2;
+ TQListViewItem *item, *item2;
for (item = firstChild();item;item = item->nextSibling())
for (item2 = item->firstChild();item2;item2 = item2->nextSibling())
((InstrItem*)item2)->updateGroup();
@@ -359,11 +359,11 @@ void InstrView::doUpdate(int changeType)
void InstrView::setColumnWidths()
{
if (_showHexCode) {
- setColumnWidthMode(4, QListView::Maximum);
+ setColumnWidthMode(4, TQListView::Maximum);
setColumnWidth(4, _lastHexCodeWidth);
}
else {
- setColumnWidthMode(4, QListView::Manual);
+ setColumnWidthMode(4, TQListView::Manual);
setColumnWidth(4, 0);
}
}
@@ -373,7 +373,7 @@ void InstrView::refresh()
_arrowLevels = 0;
// reset to automatic sizing to get column width
- setColumnWidthMode(4, QListView::Maximum);
+ setColumnWidthMode(4, TQListView::Maximum);
clear();
setColumnWidth(0, 20);
@@ -406,7 +406,7 @@ void InstrView::refresh()
if (!f) return;
// Allow resizing of column 2
- setColumnWidthMode(2, QListView::Maximum);
+ setColumnWidthMode(2, TQListView::Maximum);
// check for instruction map
TraceInstrMap::Iterator itStart, it, tmpIt, itEnd;
@@ -486,7 +486,7 @@ void InstrView::refresh()
setColumnWidths();
if (!_costType2) {
- setColumnWidthMode(2, QListView::Manual);
+ setColumnWidthMode(2, TQListView::Manual);
setColumnWidth(2, 0);
}
}
@@ -613,17 +613,17 @@ bool InstrView::fillInstrRange(TraceFunction* function,
dumpEndAddr = (*tmpIt).addr() +20;
// generate command
- QString popencmd, objfile;
+ TQString popencmd, objfile;
objfile = function->object()->name();
- objfile = objfile.replace(QRegExp("[\"']"), ""); // security...
- popencmd = QString("objdump -C -d "
+ objfile = objfile.replace(TQRegExp("[\"']"), ""); // security...
+ popencmd = TQString("objdump -C -d "
"--start-address=0x%1 --stop-address=0x%2 \"%3\"")
.arg(dumpStartAddr.toString()).arg(dumpEndAddr.toString())
.arg(objfile);
if (1) qDebug("Running '%s'...", popencmd.ascii());
// and run...
- FILE* iFILE = popen(QFile::encodeName( popencmd ), "r");
+ FILE* iFILE = popen(TQFile::encodeName( popencmd ), "r");
if (iFILE == 0) {
new InstrItem(this, this, 1,
i18n("There is an error trying to execute the command"));
@@ -636,7 +636,7 @@ bool InstrView::fillInstrRange(TraceFunction* function,
i18n("This utility can be found in the 'binutils' package."));
return false;
}
- QFile file;
+ TQFile file;
file.open(IO_ReadOnly, iFILE);
#define BUF_SIZE 256
@@ -648,7 +648,7 @@ bool InstrView::fillInstrRange(TraceFunction* function,
SubCost most = 0;
TraceInstr* currInstr;
InstrItem *ii, *ii2, *item = 0, *first = 0, *selected = 0;
- QString code, cmd, args;
+ TQString code, cmd, args;
bool needObjAddr = true, needCostAddr = true;
costAddr = 0;
@@ -715,9 +715,9 @@ bool InstrView::fillInstrRange(TraceFunction* function,
// this sets addr
parseLine(buf, addr, pos1, pos2, pos3);
- code = QString(buf + pos1);
- cmd = QString(buf + pos2);
- args = QString(buf + pos3);
+ code = TQString(buf + pos1);
+ cmd = TQString(buf + pos2);
+ args = TQString(buf + pos3);
if (costAddr == objAddr) {
currInstr = &(*costIt);
@@ -735,7 +735,7 @@ bool InstrView::fillInstrRange(TraceFunction* function,
}
else {
addr = costAddr;
- code = cmd = QString();
+ code = cmd = TQString();
args = i18n("(No Assembler)");
currInstr = &(*costIt);
@@ -775,8 +775,8 @@ bool InstrView::fillInstrRange(TraceFunction* function,
if (!skipLineWritten) {
skipLineWritten = true;
// a "skipping" line: print "..." instead of a line number
- code = cmd = QString();
- args = QString("...");
+ code = cmd = TQString();
+ args = TQString("...");
}
else
continue;
@@ -847,7 +847,7 @@ bool InstrView::fillInstrRange(TraceFunction* function,
// for arrows: go down the list according to list sorting
sort();
- QListViewItem *item1, *item2;
+ TQListViewItem *item1, *item2;
for (item1=firstChild();item1;item1 = item1->nextSibling()) {
ii = (InstrItem*)item1;
updateJumpArray(ii->addr(), ii, true, false);
@@ -875,7 +875,7 @@ bool InstrView::fillInstrRange(TraceFunction* function,
"There are %n cost lines without assembler code.", noAssLines));
new InstrItem(this, this, 2,
i18n("This happens because the code of"));
- new InstrItem(this, this, 3, QString(" %1").arg(objfile));
+ new InstrItem(this, this, 3, TQString(" %1").arg(objfile));
new InstrItem(this, this, 4,
i18n("does not seem to match the profile data file."));
new InstrItem(this, this, 5, "");
@@ -910,7 +910,7 @@ bool InstrView::fillInstrRange(TraceFunction* function,
void InstrView::updateInstrItems()
{
InstrItem* ii;
- QListViewItem* item = firstChild();
+ TQListViewItem* item = firstChild();
for (;item;item = item->nextSibling()) {
ii = (InstrItem*)item;
TraceInstr* instr = ii->instr();
@@ -918,7 +918,7 @@ void InstrView::updateInstrItems()
ii->updateCost();
- QListViewItem *next, *i = ii->firstChild();
+ TQListViewItem *next, *i = ii->firstChild();
for (;i;i = next) {
next = i->nextSibling();
((InstrItem*)i)->updateCost();
@@ -927,7 +927,7 @@ void InstrView::updateInstrItems()
}
void InstrView::readViewConfig(KConfig* c,
- QString prefix, QString postfix, bool)
+ TQString prefix, TQString postfix, bool)
{
KConfigGroup* g = configGroup(c, prefix, postfix);
@@ -939,7 +939,7 @@ void InstrView::readViewConfig(KConfig* c,
}
void InstrView::saveViewConfig(KConfig* c,
- QString prefix, QString postfix, bool)
+ TQString prefix, TQString postfix, bool)
{
KConfigGroup g(c, (prefix+postfix).ascii());
diff --git a/kcachegrind/kcachegrind/instrview.h b/kcachegrind/kcachegrind/instrview.h
index cc9c7d2d..c807a0a4 100644
--- a/kcachegrind/kcachegrind/instrview.h
+++ b/kcachegrind/kcachegrind/instrview.h
@@ -23,12 +23,12 @@
#ifndef INSTRVIEW_H
#define INSTRVIEW_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "traceitemview.h"
class InstrItem;
-class InstrView : public QListView, public TraceItemView
+class InstrView : public TQListView, public TraceItemView
{
friend class InstrItem;
@@ -36,22 +36,22 @@ class InstrView : public QListView, public TraceItemView
public:
InstrView(TraceItemView* parentView,
- QWidget* parent = 0, const char* name = 0);
+ TQWidget* parent = 0, const char* name = 0);
- virtual QWidget* widget() { return this; }
- QString whatsThis() const;
+ virtual TQWidget* widget() { return this; }
+ TQString whatsThis() const;
- void readViewConfig(KConfig*, QString prefix, QString postfix, bool);
- void saveViewConfig(KConfig*, QString prefix, QString postfix, bool);
+ void readViewConfig(KConfig*, TQString prefix, TQString postfix, bool);
+ void saveViewConfig(KConfig*, TQString prefix, TQString postfix, bool);
protected:
int arrowLevels() { return _arrowLevels; }
- void paintEmptyArea( QPainter *, const QRect & );
+ void paintEmptyArea( TQPainter *, const TQRect & );
private slots:
- void context(QListViewItem*, const QPoint &, int);
- void selectedSlot(QListViewItem *);
- void activatedSlot(QListViewItem *);
+ void context(TQListViewItem*, const TQPoint &, int);
+ void selectedSlot(TQListViewItem *);
+ void activatedSlot(TQListViewItem *);
private:
TraceItem* canShow(TraceItem*);
@@ -69,7 +69,7 @@ private:
// arrows
int _arrowLevels;
// temporary needed on creation...
- QMemArray<TraceInstrJump*> _jump;
+ TQMemArray<TraceInstrJump*> _jump;
TraceInstrJumpList _lowList, _highList;
// remember width of hex code column if hidden
diff --git a/kcachegrind/kcachegrind/listutils.cpp b/kcachegrind/kcachegrind/listutils.cpp
index 0e9ebd32..5c4a838c 100644
--- a/kcachegrind/kcachegrind/listutils.cpp
+++ b/kcachegrind/kcachegrind/listutils.cpp
@@ -17,18 +17,18 @@
*/
/*
- * Some helper functions for QListViewItem derivates
+ * Some helper functions for TQListViewItem derivates
*/
-#include <qpainter.h>
+#include <tqpainter.h>
#include "listutils.h"
#define COSTPIX_WIDTH 25
-QPixmap colorPixmap(int w, int h, QColor c)
+TQPixmap colorPixmap(int w, int h, TQColor c)
{
- static QPixmap* pixs[37];
- static QColor cols[37];
+ static TQPixmap* pixs[37];
+ static TQColor cols[37];
static bool inited = false;
if (!inited) {
@@ -46,9 +46,9 @@ QPixmap colorPixmap(int w, int h, QColor c)
}
- QPixmap* pix = new QPixmap(w, h);
+ TQPixmap* pix = new TQPixmap(w, h);
pix->fill(c);
- QPainter p(pix);
+ TQPainter p(pix);
p.setPen(c.light());
p.drawLine(0, 0, w-1, 0);
p.drawLine(0, 0, 0, h-1);
@@ -65,7 +65,7 @@ QPixmap colorPixmap(int w, int h, QColor c)
* Create a percentage pixmap with a filling rate of p percent (0-100).
* When withFrame==false, the pixmap is truncated to only the filled portion.
*/
-QPixmap percentagePixmap(int w, int h, int percent, QColor c, bool framed)
+TQPixmap percentagePixmap(int w, int h, int percent, TQColor c, bool framed)
{
int iw, ix1, ix2, ih, iy1, iy2;
@@ -82,11 +82,11 @@ QPixmap percentagePixmap(int w, int h, int percent, QColor c, bool framed)
/* Limit bar to 100% */
int filled = (percent>100) ? iw+1 : iw*percent/100+1;
if (!framed) w=filled-1;
- if (w<3) return QPixmap();
+ if (w<3) return TQPixmap();
- QPixmap pix(w, h);
+ TQPixmap pix(w, h);
pix.fill(Qt::white);
- QPainter p(&pix);
+ TQPainter p(&pix);
p.setPen(Qt::black);
if (framed)
p.drawRect(0, 0, w, h);
@@ -108,15 +108,15 @@ QPixmap percentagePixmap(int w, int h, int percent, QColor c, bool framed)
return pix;
}
-inline QColor partitionColor(int d, int max)
+inline TQColor partitionColor(int d, int max)
{
- return QColor( (720*d/max) % 360,
- 255-(128*d/max), 192, QColor::Hsv);
+ return TQColor( (720*d/max) % 360,
+ 255-(128*d/max), 192, TQColor::Hsv);
}
-QPixmap partitionPixmap(int w, int h,
- double* hist, QColor* cArray, int maxIndex, bool framed)
+TQPixmap partitionPixmap(int w, int h,
+ double* hist, TQColor* cArray, int maxIndex, bool framed)
{
int lastPos = 0, nextPos;
double val=0.0, sum=0.0;
@@ -141,18 +141,18 @@ QPixmap partitionPixmap(int w, int h,
int filled = (int)(iw*sum+1);
if (!framed && (filled < w)) w=filled;
- if (w<3) return QPixmap();
+ if (w<3) return TQPixmap();
- QPixmap pix(w, h);
+ TQPixmap pix(w, h);
pix.fill(Qt::white);
- QPainter p(&pix);
+ TQPainter p(&pix);
p.setPen(Qt::black);
if (framed)
p.drawRect(0, 0, w, h);
//qDebug("Sum %f, dw %d", sum,dw);
- QColor c, cLast;
+ TQColor c, cLast;
bool leftDrawn = false;
int x1, x2=0;
int lastDiff=0, diff;
@@ -205,20 +205,20 @@ QPixmap partitionPixmap(int w, int h,
}
-QPixmap costPixmap(TraceCostType* ct, TraceCost* cost, double total, bool framed)
+TQPixmap costPixmap(TraceCostType* ct, TraceCost* cost, double total, bool framed)
{
if (ct->isReal()) {
- QColor color = ct->color();
+ TQColor color = ct->color();
double p = 100.0 * cost->subCost(ct) / total;
return percentagePixmap(COSTPIX_WIDTH, 10, (int)(p+.5), color, framed);
}
int maxIndex;
double h[MaxRealIndexValue];
- QColor* cs = ct->mapping()->realColors();
+ TQColor* cs = ct->mapping()->realColors();
maxIndex = ct->histCost(cost, total, h);
- if (maxIndex ==0) return QPixmap();
+ if (maxIndex ==0) return TQPixmap();
return partitionPixmap(COSTPIX_WIDTH, 10, h, cs, maxIndex, framed);
}
diff --git a/kcachegrind/kcachegrind/listutils.h b/kcachegrind/kcachegrind/listutils.h
index 9a086ae1..e3e13fb5 100644
--- a/kcachegrind/kcachegrind/listutils.h
+++ b/kcachegrind/kcachegrind/listutils.h
@@ -17,23 +17,23 @@
*/
/*
- * Some helper functions for QListViewItem derivates
+ * Some helper functions for TQListViewItem derivates
*/
#ifndef LISTUTILS_H
#define LISTUTILS_H
-#include <qpixmap.h>
-#include <qstring.h>
-#include <qcolor.h>
+#include <tqpixmap.h>
+#include <tqstring.h>
+#include <tqcolor.h>
#include "tracedata.h"
-QString bigNum(SubCost);
-QPixmap colorPixmap(int w, int h, QColor c);
-QPixmap percentagePixmap(int w, int h, int percent, QColor c, bool framed);
-QPixmap partitionPixmap(int w, int h, double* hist, QColor*,
+TQString bigNum(SubCost);
+TQPixmap colorPixmap(int w, int h, TQColor c);
+TQPixmap percentagePixmap(int w, int h, int percent, TQColor c, bool framed);
+TQPixmap partitionPixmap(int w, int h, double* hist, TQColor*,
int maxIndex, bool framed);
-QPixmap costPixmap(TraceCostType* ct, TraceCost* cost, double total, bool framed);
+TQPixmap costPixmap(TraceCostType* ct, TraceCost* cost, double total, bool framed);
/**
* A class to calculate the <maxSize> TraceCost items
@@ -58,8 +58,8 @@ class HighestCostList
TraceCostList _list;
int _maxSize, _count;
TraceCostType* _costType;
- QMemArray<TraceCost*> _item;
- QMemArray<SubCost> _cost;
+ TQMemArray<TraceCost*> _item;
+ TQMemArray<SubCost> _cost;
};
#endif
diff --git a/kcachegrind/kcachegrind/loader.cpp b/kcachegrind/kcachegrind/loader.cpp
index 30199c03..a4aecf56 100644
--- a/kcachegrind/kcachegrind/loader.cpp
+++ b/kcachegrind/kcachegrind/loader.cpp
@@ -27,7 +27,7 @@
LoaderList Loader::_loaderList;
-Loader::Loader(QString name, QString desc)
+Loader::Loader(TQString name, TQString desc)
{
_name = name;
_description = desc;
@@ -36,7 +36,7 @@ Loader::Loader(QString name, QString desc)
Loader::~Loader()
{}
-bool Loader::canLoadTrace(QFile*)
+bool Loader::canLoadTrace(TQFile*)
{
return false;
}
@@ -46,7 +46,7 @@ bool Loader::loadTrace(TracePart*)
return false;
}
-Loader* Loader::matchingLoader(QFile* file)
+Loader* Loader::matchingLoader(TQFile* file)
{
Loader* l;
for (l=_loaderList.first(); l; l = _loaderList.next())
@@ -56,7 +56,7 @@ Loader* Loader::matchingLoader(QFile* file)
return 0;
}
-Loader* Loader::loader(QString name)
+Loader* Loader::loader(TQString name)
{
Loader* l;
for (l=_loaderList.first(); l; l = _loaderList.next())
diff --git a/kcachegrind/kcachegrind/loader.h b/kcachegrind/kcachegrind/loader.h
index d3363c1f..7624c744 100644
--- a/kcachegrind/kcachegrind/loader.h
+++ b/kcachegrind/kcachegrind/loader.h
@@ -23,9 +23,9 @@
#ifndef LOADER_H
#define LOADER_H
-#include <qobject.h>
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
class QFile;
class TraceData;
@@ -33,7 +33,7 @@ class TracePart;
class Loader;
-typedef QPtrList<Loader> LoaderList;
+typedef TQPtrList<Loader> LoaderList;
/**
* To implement a new loader, inherit from the Loader class
@@ -51,25 +51,25 @@ class Loader: public QObject
Q_OBJECT
public:
- Loader(QString name, QString desc);
+ Loader(TQString name, TQString desc);
virtual ~Loader();
- virtual bool canLoadTrace(QFile* file);
+ virtual bool canLoadTrace(TQFile* file);
virtual bool loadTrace(TracePart*);
- static Loader* matchingLoader(QFile* file);
- static Loader* loader(QString name);
+ static Loader* matchingLoader(TQFile* file);
+ static Loader* loader(TQString name);
static void initLoaders();
static void deleteLoaders();
- QString name() const { return _name; }
- QString description() const { return _description; }
+ TQString name() const { return _name; }
+ TQString description() const { return _description; }
signals:
- void updateStatus(QString, int);
+ void updateStatus(TQString, int);
private:
- QString _name, _description;
+ TQString _name, _description;
static LoaderList _loaderList;
};
diff --git a/kcachegrind/kcachegrind/main.cpp b/kcachegrind/kcachegrind/main.cpp
index 50c9d5eb..80455ea0 100644
--- a/kcachegrind/kcachegrind/main.cpp
+++ b/kcachegrind/kcachegrind/main.cpp
@@ -23,7 +23,7 @@
// for KCACHEGRIND_VERSION
#include "../version.h"
-#include <qfile.h>
+#include <tqfile.h>
#include <kapplication.h>
#include <kcmdlineargs.h>
#include <kaboutdata.h>
@@ -73,7 +73,7 @@ int main( int argc, char ** argv )
for(int i = 0; i < args->count(); i++) {
t = new TopLevel();
t->show();
- t->loadDelayed(QFile::decodeName(args->arg(i)));
+ t->loadDelayed(TQFile::decodeName(args->arg(i)));
}
}
else {
@@ -84,7 +84,7 @@ int main( int argc, char ** argv )
}
}
- a.connect( &a, SIGNAL( lastWindowClosed() ), &a, SLOT( quit() ) );
+ a.connect( &a, TQT_SIGNAL( lastWindowClosed() ), &a, TQT_SLOT( quit() ) );
int res = a.exec();
// to make leak checking in valgrind happy...
diff --git a/kcachegrind/kcachegrind/multiview.cpp b/kcachegrind/kcachegrind/multiview.cpp
index da3ed73a..4288e2df 100644
--- a/kcachegrind/kcachegrind/multiview.cpp
+++ b/kcachegrind/kcachegrind/multiview.cpp
@@ -23,7 +23,7 @@
* (with wrap around).
*/
-#include <qobjectlist.h>
+#include <tqobjectlist.h>
#include <kconfig.h>
#include <kdebug.h>
@@ -34,8 +34,8 @@
// MultiView
//
-MultiView::MultiView(TopLevel* top, QWidget* parent, const char* name)
- : QSplitter(parent, name), TraceItemView(0, top)
+MultiView::MultiView(TopLevel* top, TQWidget* parent, const char* name)
+ : TQSplitter(parent, name), TraceItemView(0, top)
{
// default
setOrientation(Qt::Horizontal);
@@ -65,9 +65,9 @@ void MultiView::appendView()
int n = _views.count()+1;
TabView* tv = new TabView(this, this,
- QString("TabView-%1").arg(n).ascii());
- connect(tv, SIGNAL(activated(TabView*)),
- this, SLOT(tabActivated(TabView*)) );
+ TQString("TabView-%1").arg(n).ascii());
+ connect(tv, TQT_SIGNAL(activated(TabView*)),
+ this, TQT_SLOT(tabActivated(TabView*)) );
_views.append(tv);
tv->show();
@@ -166,17 +166,17 @@ void MultiView::doUpdate(int changeType)
void MultiView::readViewConfig(KConfig* c,
- QString prefix, QString postfix,
+ TQString prefix, TQString postfix,
bool withOptions)
{
if (0) qDebug("%s::readConfig(%s%s)", name(),
prefix.ascii(), postfix.ascii());
- QString active;
+ TQString active;
KConfigGroup* g = configGroup(c, prefix, postfix);
int n = g->readNumEntry("Panels", 1);
setChildCount(n);
- setOrientation( (g->readEntry("Orientation") == QString("Horizontal")) ?
+ setOrientation( (g->readEntry("Orientation") == TQString("Horizontal")) ?
Qt::Horizontal : Qt::Vertical );
setSizes(g->readIntListEntry("PanelSizes"));
@@ -187,7 +187,7 @@ void MultiView::readViewConfig(KConfig* c,
TabView* tv, *activeTV = 0;
for(tv=_views.first();tv;tv=_views.next()) {
if (tv->name() == active) activeTV=tv;
- tv->readViewConfig(c, QString("%1-%2").arg(prefix).arg(tv->name()),
+ tv->readViewConfig(c, TQString("%1-%2").arg(prefix).arg(tv->name()),
postfix, withOptions);
}
@@ -201,7 +201,7 @@ void MultiView::readViewConfig(KConfig* c,
}
void MultiView::saveViewConfig(KConfig* c,
- QString prefix, QString postfix,
+ TQString prefix, TQString postfix,
bool withOptions)
{
KConfigGroup g(c, (prefix+postfix).ascii());
@@ -216,7 +216,7 @@ void MultiView::saveViewConfig(KConfig* c,
TabView* tv;
for(tv=_views.first();tv;tv=_views.next())
- tv->saveViewConfig(c, QString("%1-%2").arg(prefix).arg(tv->name()),
+ tv->saveViewConfig(c, TQString("%1-%2").arg(prefix).arg(tv->name()),
postfix, withOptions);
}
diff --git a/kcachegrind/kcachegrind/multiview.h b/kcachegrind/kcachegrind/multiview.h
index adf0b329..b4b53928 100644
--- a/kcachegrind/kcachegrind/multiview.h
+++ b/kcachegrind/kcachegrind/multiview.h
@@ -26,19 +26,19 @@
#ifndef MULTIVIEW_H
#define MULTIVIEW_H
-#include <qsplitter.h>
-#include <qptrlist.h>
+#include <tqsplitter.h>
+#include <tqptrlist.h>
#include "traceitemview.h"
-#include "tabview.h" // because of QPtrList<TabView>
+#include "tabview.h" // because of TQPtrList<TabView>
-class MultiView : public QSplitter, public TraceItemView
+class MultiView : public TQSplitter, public TraceItemView
{
Q_OBJECT
public:
- MultiView(TopLevel* top, QWidget* parent = 0, const char* name = 0);
+ MultiView(TopLevel* top, TQWidget* parent = 0, const char* name = 0);
- QWidget* widget() { return this; }
+ TQWidget* widget() { return this; }
TabView* activeTabView() const { return _active; }
void setData(TraceData*);
@@ -50,8 +50,8 @@ public:
void selected(TraceItemView*, TraceItem*);
void activated(TraceItemView*, TraceItem*);
- void readViewConfig(KConfig*, QString prefix, QString postfix, bool);
- void saveViewConfig(KConfig*, QString prefix, QString postfix, bool);
+ void readViewConfig(KConfig*, TQString prefix, TQString postfix, bool);
+ void saveViewConfig(KConfig*, TQString prefix, TQString postfix, bool);
public slots:
void tabActivated(TabView*);
@@ -60,7 +60,7 @@ public slots:
void doUpdate(int);
TabView* _active;
- QPtrList<TabView> _views;
+ TQPtrList<TabView> _views;
};
#endif
diff --git a/kcachegrind/kcachegrind/partgraph.cpp b/kcachegrind/kcachegrind/partgraph.cpp
index c3ed6064..11f4cd29 100644
--- a/kcachegrind/kcachegrind/partgraph.cpp
+++ b/kcachegrind/kcachegrind/partgraph.cpp
@@ -29,7 +29,7 @@
// PartAreaWidget
-PartAreaWidget::PartAreaWidget(QWidget* parent, const char* name)
+PartAreaWidget::PartAreaWidget(TQWidget* parent, const char* name)
: TreeMapWidget(new BasePartItem(), parent, name)
{
_data = 0;
@@ -128,7 +128,7 @@ bool PartAreaWidget::isHidden(TracePart* part) const
return (_hiddenParts.containsRef(part)>0);
}
-QColor PartAreaWidget::groupColor(TraceFunction* f) const
+TQColor PartAreaWidget::groupColor(TraceFunction* f) const
{
if (!f)
return colorGroup().button();
@@ -136,9 +136,9 @@ QColor PartAreaWidget::groupColor(TraceFunction* f) const
return Configuration::functionColor(_groupType, f);
}
-QString PartAreaWidget::tipString(TreeMapItem* i) const
+TQString PartAreaWidget::tipString(TreeMapItem* i) const
{
- QString tip, itemTip;
+ TQString tip, itemTip;
int count = 0;
//qDebug("PartAreaWidget::tipString for '%s'", i->name().ascii());
@@ -219,7 +219,7 @@ TreeMapItemList* BasePartItem::children()
return _children;
}
-QString BasePartItem::text(int textNo) const
+TQString BasePartItem::text(int textNo) const
{
if (textNo == 0) {
if (!_data)
@@ -228,11 +228,11 @@ QString BasePartItem::text(int textNo) const
if (_data->parts().count() == 0)
return i18n("(no part)");
}
- return QString::null;
+ return TQString::null;
}
-QColor BasePartItem::backColor() const
+TQColor BasePartItem::backColor() const
{
return widget()->colorGroup().base();
}
@@ -257,13 +257,13 @@ PartItem::PartItem(TracePart* p)
_factor=1;
}
-QString PartItem::text(int textNo) const
+TQString PartItem::text(int textNo) const
{
if (textNo == 0)
return _p->prettyName();
if (textNo != 1)
- return QString::null;
+ return TQString::null;
TraceCostType* ct;
PartAreaWidget* w = (PartAreaWidget*)widget();
@@ -275,16 +275,16 @@ QString PartItem::text(int textNo) const
if (Configuration::showPercentage()) {
TraceCost* t = _p->data()->totals();
double p = 100.0 * v / t->subCost(ct);
- return QString("%1 %")
+ return TQString("%1 %")
.arg(p, 0, 'f', Configuration::percentPrecision());
}
return v.pretty();
}
-QPixmap PartItem::pixmap(int i) const
+TQPixmap PartItem::pixmap(int i) const
{
- if (i != 1) return QPixmap();
+ if (i != 1) return TQPixmap();
// Cost pixmap
@@ -401,7 +401,7 @@ TreeMapItemList* PartItem::children()
}
-QColor PartItem::backColor() const
+TQColor PartItem::backColor() const
{
PartAreaWidget* w = (PartAreaWidget*)widget();
return w->groupColor(0);
@@ -416,7 +416,7 @@ SubPartItem::SubPartItem(TraceCost* c)
_factor=1;
}
-QString SubPartItem::text(int textNo) const
+TQString SubPartItem::text(int textNo) const
{
if (textNo == 0) {
if (!_partCostItem)
@@ -426,7 +426,7 @@ QString SubPartItem::text(int textNo) const
}
if (textNo != 1)
- return QString::null;
+ return TQString::null;
TraceCostType* ct;
PartAreaWidget* w = (PartAreaWidget*)widget();
@@ -442,15 +442,15 @@ QString SubPartItem::text(int textNo) const
TraceCost* t = Configuration::showExpanded() ?
_partCostItem->part() : _partCostItem->part()->data()->totals();
double p = 100.0 * v / t->subCost(ct);
- return QString("%1 %")
+ return TQString("%1 %")
.arg(p, 0, 'f', Configuration::percentPrecision());
}
return v.pretty();
}
-QPixmap SubPartItem::pixmap(int i) const
+TQPixmap SubPartItem::pixmap(int i) const
{
- if (i != 1) return QPixmap();
+ if (i != 1) return TQPixmap();
// Cost pixmap
@@ -521,7 +521,7 @@ TreeMapItemList* SubPartItem::children()
}
-QColor SubPartItem::backColor() const
+TQColor SubPartItem::backColor() const
{
PartAreaWidget* w = (PartAreaWidget*)widget();
if (w->visualisation() == PartAreaWidget::Inclusive)
diff --git a/kcachegrind/kcachegrind/partgraph.h b/kcachegrind/kcachegrind/partgraph.h
index d2cf2f73..7b8056a7 100644
--- a/kcachegrind/kcachegrind/partgraph.h
+++ b/kcachegrind/kcachegrind/partgraph.h
@@ -34,7 +34,7 @@ public:
// Visualisation inside of trace parts
enum VisualisationMode { NoVisualisation, Partitioning, Inclusive };
- PartAreaWidget(QWidget* parent=0, const char* name=0);
+ PartAreaWidget(TQWidget* parent=0, const char* name=0);
void setData(TraceData* d);
void setCostType(TraceCostType* ct);
@@ -51,8 +51,8 @@ public:
bool zoomFunction() const { return _zoomFunction; }
int callLevels() const { return _callLevels; }
- QColor groupColor(TraceFunction*) const;
- QString tipString(TreeMapItem*) const;
+ TQColor groupColor(TraceFunction*) const;
+ TQString tipString(TreeMapItem*) const;
void changeHidden(const TracePartList& list);
bool isHidden(TracePart*) const;
@@ -80,10 +80,10 @@ public:
int rtti() const { return 1; }
double value() const;
- QString text(int) const;
+ TQString text(int) const;
int borderWidth() const { return 0; }
TreeMapItemList* children();
- QColor backColor() const;
+ TQColor backColor() const;
private:
TraceData* _data;
@@ -98,10 +98,10 @@ public:
double value() const;
double sum() const;
int borderWidth() const { return 0; }
- QString text(int) const;
- QPixmap pixmap(int) const;
+ TQString text(int) const;
+ TQPixmap pixmap(int) const;
TreeMapItemList* children();
- QColor backColor() const;
+ TQColor backColor() const;
private:
TracePart* _p;
@@ -117,10 +117,10 @@ public:
double value() const;
double sum() const;
SplitMode splitMode() const { return Vertical; }
- QString text(int) const;
- QPixmap pixmap(int) const;
+ TQString text(int) const;
+ TQPixmap pixmap(int) const;
TreeMapItemList* children();
- QColor backColor() const;
+ TQColor backColor() const;
private:
TraceCost* _partCostItem;
diff --git a/kcachegrind/kcachegrind/partlistitem.cpp b/kcachegrind/kcachegrind/partlistitem.cpp
index 19965f7c..40c2db36 100644
--- a/kcachegrind/kcachegrind/partlistitem.cpp
+++ b/kcachegrind/kcachegrind/partlistitem.cpp
@@ -18,8 +18,8 @@
#include <math.h>
-#include <qpainter.h>
-#include <qregexp.h>
+#include <tqpainter.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -33,10 +33,10 @@
// PartListItem
-PartListItem::PartListItem(QListView* parent, TraceCostItem* costItem,
+PartListItem::PartListItem(TQListView* parent, TraceCostItem* costItem,
TraceCostType* ct, TraceCost::CostType gt,
TracePart* part)
- :QListViewItem(parent)
+ :TQListViewItem(parent)
{
_partCostItem = costItem->findDepFromPart(part);
_part = part;
@@ -44,7 +44,7 @@ PartListItem::PartListItem(QListView* parent, TraceCostItem* costItem,
_costType = ct;
#if 0
- QString partName = QString::number(part->partNumber());
+ TQString partName = TQString::number(part->partNumber());
if (part->data()->maxThreadID() >1)
partName += i18n(" (Thread %1)").arg(part->threadID());
setText(0, partName);
@@ -100,13 +100,13 @@ void PartListItem::update()
_sum = pf ? pf->inclusive()->subCost(_costType) : SubCost(0);
if (selfTotal == 0 || !_partCostItem) {
- setText(2, QString("-"));
- setPixmap(2, QPixmap());
+ setText(2, TQString("-"));
+ setPixmap(2, TQPixmap());
}
else {
double pure = 100.0 * _pure / selfTotal;
if (Configuration::showPercentage()) {
- setText(2, QString("%1")
+ setText(2, TQString("%1")
.arg(pure, 0, 'f', Configuration::percentPrecision()));
}
else
@@ -116,13 +116,13 @@ void PartListItem::update()
}
if (total == 0 || !pf) {
- setText(1, QString("-"));
- setPixmap(1, QPixmap());
+ setText(1, TQString("-"));
+ setPixmap(1, TQPixmap());
}
else {
double sum = 100.0 * _sum / total;
if (Configuration::showPercentage()) {
- setText(1, QString("%1")
+ setText(1, TQString("%1")
.arg(sum, 0, 'f', Configuration::percentPrecision()));
}
else
@@ -132,7 +132,7 @@ void PartListItem::update()
}
if (!pf) {
- setText(3, QString("-"));
+ setText(3, TQString("-"));
_callers = 0;
return;
}
@@ -140,7 +140,7 @@ void PartListItem::update()
TracePartCall* pc;
TracePartCallList pl;
SubCost callers, callees;
- QString str;
+ TQString str;
callers = 0;
pl = pf->partCallers();
@@ -158,7 +158,7 @@ void PartListItem::update()
}
-int PartListItem::compare(QListViewItem * i, int col, bool ascending ) const
+int PartListItem::compare(TQListViewItem * i, int col, bool ascending ) const
{
PartListItem* fi = (PartListItem*) i;
if (col==0) {
@@ -185,5 +185,5 @@ int PartListItem::compare(QListViewItem * i, int col, bool ascending ) const
if (_callers > fi->_callers) return 1;
return 0;
}
- return QListViewItem::compare(i, col, ascending);
+ return TQListViewItem::compare(i, col, ascending);
}
diff --git a/kcachegrind/kcachegrind/partlistitem.h b/kcachegrind/kcachegrind/partlistitem.h
index 811762bb..6704f51e 100644
--- a/kcachegrind/kcachegrind/partlistitem.h
+++ b/kcachegrind/kcachegrind/partlistitem.h
@@ -19,7 +19,7 @@
#ifndef PARTLISTITEM_H
#define PARTLISTITEM_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "tracedata.h"
/**
@@ -32,10 +32,10 @@
class PartListItem: public QListViewItem
{
public:
- PartListItem(QListView* parent, TraceCostItem* costItem,
+ PartListItem(TQListView* parent, TraceCostItem* costItem,
TraceCostType* ct, TraceCost::CostType gt, TracePart* part);
- int compare(QListViewItem * i, int col, bool ascending ) const;
+ int compare(TQListViewItem * i, int col, bool ascending ) const;
TraceCost* partCostItem() { return _partCostItem; }
void setCostType(TraceCostType* ct);
void setGroupType(TraceCost::CostType);
diff --git a/kcachegrind/kcachegrind/partselection.cpp b/kcachegrind/kcachegrind/partselection.cpp
index 66d5ec5a..dfd1b096 100644
--- a/kcachegrind/kcachegrind/partselection.cpp
+++ b/kcachegrind/kcachegrind/partselection.cpp
@@ -20,14 +20,14 @@
* For part file selection, to be put into a QDockWindow
*/
-#include <qtimer.h>
-#include <qlistview.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qpopupmenu.h>
-#include <qlayout.h>
+#include <tqtimer.h>
+#include <tqlistview.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
+#include <tqpopupmenu.h>
+#include <tqlayout.h>
#include <klocale.h>
#include <kconfig.h>
@@ -36,7 +36,7 @@
#include "partselection.h"
#include "partgraph.h"
-PartSelection::PartSelection( QWidget* parent, const char* name)
+PartSelection::PartSelection( TQWidget* parent, const char* name)
: PartSelectionBase(parent, name)
{
_data = 0;
@@ -58,16 +58,16 @@ PartSelection::PartSelection( QWidget* parent, const char* name)
partAreaWidget->setFieldType(0, i18n( "Name" ));
partAreaWidget->setFieldType(1, i18n( "Cost" ));
- connect(partAreaWidget, SIGNAL(selectionChanged()),
- this, SLOT(selectionChanged()));
- connect(partAreaWidget, SIGNAL(currentChanged(TreeMapItem*, bool)),
- this, SLOT(currentChangedSlot(TreeMapItem*, bool)));
- connect(partAreaWidget, SIGNAL(doubleClicked(TreeMapItem*)),
- this, SLOT(doubleClicked(TreeMapItem*)));
+ connect(partAreaWidget, TQT_SIGNAL(selectionChanged()),
+ this, TQT_SLOT(selectionChanged()));
+ connect(partAreaWidget, TQT_SIGNAL(currentChanged(TreeMapItem*, bool)),
+ this, TQT_SLOT(currentChangedSlot(TreeMapItem*, bool)));
+ connect(partAreaWidget, TQT_SIGNAL(doubleClicked(TreeMapItem*)),
+ this, TQT_SLOT(doubleClicked(TreeMapItem*)));
connect(partAreaWidget,
- SIGNAL(contextMenuRequested(TreeMapItem*,const QPoint &)),
+ TQT_SIGNAL(contextMenuRequested(TreeMapItem*,const TQPoint &)),
this,
- SLOT(contextMenuRequested(TreeMapItem*,const QPoint &)));
+ TQT_SLOT(contextMenuRequested(TreeMapItem*,const TQPoint &)));
_showInfo = true;
showInfo(false);
@@ -145,10 +145,10 @@ void PartSelection::currentChangedSlot(TreeMapItem* i, bool kbd)
if (!kbd) return;
if (i->text(0).isEmpty()) return;
- QString str = i->text(0);
+ TQString str = i->text(0);
if (!i->text(1).isEmpty())
str += " (" + i->text(1) + ")";
- QString msg = i18n("Profile Part Overview: Current is '%1'").arg(str);
+ TQString msg = i18n("Profile Part Overview: Current is '%1'").arg(str);
emit showMessage(msg, 5000);
if (_showInfo) fillInfo();
@@ -269,15 +269,15 @@ void PartSelection::activePartsChangedSlot(const TracePartList& list)
}
void PartSelection::contextMenuRequested(TreeMapItem* i,
- const QPoint & p)
+ const TQPoint & p)
{
if (!i) return;
- QPopupMenu popup;
- QPopupMenu ppopup;
- QPopupMenu vpopup;
+ TQPopupMenu popup;
+ TQPopupMenu ppopup;
+ TQPopupMenu vpopup;
- QString str;
+ TQString str;
TreeMapItem* s = 0;
if (_data && (_data->parts().count()>1)) {
@@ -465,7 +465,7 @@ void PartSelection::readVisualisationConfig(KConfigGroup* config)
{
bool enable;
- QString mode = config->readEntry("PartitionMode", "Inclusive");
+ TQString mode = config->readEntry("PartitionMode", "Inclusive");
if (mode == "Inclusive")
partAreaWidget->setVisualisation(PartAreaWidget::Inclusive);
else
@@ -502,7 +502,7 @@ void PartSelection::readVisualisationConfig(KConfigGroup* config)
void PartSelection::saveVisualisationConfig(KConfigGroup* config)
{
- QString mode;
+ TQString mode;
if (partAreaWidget->visualisation() == PartAreaWidget::Inclusive)
mode = "Inclusive";
else
@@ -542,7 +542,7 @@ void PartSelection::fillInfo()
return;
}
- QString info = _data->activePartRange();
+ TQString info = _data->activePartRange();
TreeMapItem* i = partAreaWidget->current();
while (i && i->rtti()!=2) i = i->parent();
diff --git a/kcachegrind/kcachegrind/partselection.h b/kcachegrind/kcachegrind/partselection.h
index 7052db79..b3ea10ba 100644
--- a/kcachegrind/kcachegrind/partselection.h
+++ b/kcachegrind/kcachegrind/partselection.h
@@ -24,7 +24,7 @@
#ifndef PARTSELECTION_H
#define PARTSELECTION_H
-#include <qobject.h>
+#include <tqobject.h>
#include "partselectionbase.h"
#include "partgraph.h"
@@ -40,7 +40,7 @@ class PartSelection: public PartSelectionBase
Q_OBJECT
public:
- PartSelection( QWidget* parent = 0, const char* name = 0);
+ PartSelection( TQWidget* parent = 0, const char* name = 0);
~PartSelection();
TraceData* data() { return _data; }
@@ -57,13 +57,13 @@ signals:
void partsUnhideAll();
void groupChanged(TraceCostItem*);
void functionChanged(TraceItem*);
- void showMessage(const QString&, int);
+ void showMessage(const TQString&, int);
void goBack();
public slots:
void selectionChanged();
void doubleClicked(TreeMapItem*);
- void contextMenuRequested(TreeMapItem*, const QPoint &);
+ void contextMenuRequested(TreeMapItem*, const TQPoint &);
void currentChangedSlot(TreeMapItem*, bool);
void setPart(TracePart*);
diff --git a/kcachegrind/kcachegrind/partview.cpp b/kcachegrind/kcachegrind/partview.cpp
index 73799221..470a8dea 100644
--- a/kcachegrind/kcachegrind/partview.cpp
+++ b/kcachegrind/kcachegrind/partview.cpp
@@ -20,9 +20,9 @@
* Part View
*/
-#include <qwhatsthis.h>
-#include <qpopupmenu.h>
-#include <qheader.h>
+#include <tqwhatsthis.h>
+#include <tqpopupmenu.h>
+#include <tqheader.h>
#include <klocale.h>
#include "configuration.h"
@@ -38,8 +38,8 @@
PartView::PartView(TraceItemView* parentView,
- QWidget* parent, const char* name)
- : QListView(parent, name), TraceItemView(parentView)
+ TQWidget* parent, const char* name)
+ : TQListView(parent, name), TraceItemView(parentView)
{
_inSelectionUpdate = false;
@@ -58,17 +58,17 @@ PartView::PartView(TraceItemView* parentView,
setSelectionMode(Extended);
connect( this,
- SIGNAL( selectionChanged() ),
- SLOT( selectionChangedSlot() ) );
+ TQT_SIGNAL( selectionChanged() ),
+ TQT_SLOT( selectionChangedSlot() ) );
connect( this,
- SIGNAL(contextMenuRequested(QListViewItem*, const QPoint &, int)),
- SLOT(context(QListViewItem*, const QPoint &, int)));
+ TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint &, int)),
+ TQT_SLOT(context(TQListViewItem*, const TQPoint &, int)));
- QWhatsThis::add( this, whatsThis() );
+ TQWhatsThis::add( this, whatsThis() );
}
-QString PartView::whatsThis() const
+TQString PartView::whatsThis() const
{
return i18n( "<b>Trace Part List</b>"
"<p>This list shows all trace parts of the loaded "
@@ -96,9 +96,9 @@ QString PartView::whatsThis() const
}
-void PartView::context(QListViewItem* i, const QPoint & pos, int)
+void PartView::context(TQListViewItem* i, const TQPoint & pos, int)
{
- QPopupMenu popup;
+ TQPopupMenu popup;
TracePart* p = i ? ((PartListItem*) i)->part() : 0;
@@ -127,7 +127,7 @@ void PartView::selectionChangedSlot()
if (_inSelectionUpdate) return;
TracePartList l;
- QListViewItem* item = firstChild();
+ TQListViewItem* item = firstChild();
for(;item;item = item->nextSibling())
if (item->isSelected())
l.append( ((PartListItem*)item)->part() );
@@ -150,7 +150,7 @@ void PartView::doUpdate(int changeType)
if (changeType == selectedItemChanged) return;
if (changeType == groupTypeChanged) {
- QListViewItem *item;
+ TQListViewItem *item;
for (item = firstChild();item;item = item->nextSibling())
((PartListItem*)item)->setGroupType(_groupType);
@@ -158,7 +158,7 @@ void PartView::doUpdate(int changeType)
}
if (changeType == costTypeChanged) {
- QListViewItem *item;
+ TQListViewItem *item;
for (item = firstChild();item;item = item->nextSibling())
((PartListItem*)item)->setCostType(_costType);
@@ -169,7 +169,7 @@ void PartView::doUpdate(int changeType)
TracePart* part;
- QListViewItem* item;
+ TQListViewItem* item;
_inSelectionUpdate = true;
item = firstChild();
for(;item;item = item->nextSibling()) {
@@ -212,7 +212,7 @@ void PartView::refresh()
_inSelectionUpdate = true;
- QListViewItem* item = 0;
+ TQListViewItem* item = 0;
for (part = allParts.first(); part; part = allParts.next()) {
if (hidden.findRef(part)>=0) continue;
item = new PartListItem(this, f, _costType, _groupType, part);
diff --git a/kcachegrind/kcachegrind/partview.h b/kcachegrind/kcachegrind/partview.h
index 36f89a1c..03793e36 100644
--- a/kcachegrind/kcachegrind/partview.h
+++ b/kcachegrind/kcachegrind/partview.h
@@ -23,25 +23,25 @@
#ifndef PARTVIEW_H
#define PARTVIEW_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "tracedata.h"
#include "traceitemview.h"
-class PartView: public QListView, public TraceItemView
+class PartView: public TQListView, public TraceItemView
{
Q_OBJECT
public:
PartView(TraceItemView* parentView,
- QWidget* parent=0, const char* name=0);
+ TQWidget* parent=0, const char* name=0);
- virtual QWidget* widget() { return this; }
- QString whatsThis() const;
+ virtual TQWidget* widget() { return this; }
+ TQString whatsThis() const;
void refresh();
private slots:
- void context(QListViewItem*,const QPoint &, int);
+ void context(TQListViewItem*,const TQPoint &, int);
void selectionChangedSlot();
private:
diff --git a/kcachegrind/kcachegrind/pool.cpp b/kcachegrind/kcachegrind/pool.cpp
index 75ed4bb2..d4a89a72 100644
--- a/kcachegrind/kcachegrind/pool.cpp
+++ b/kcachegrind/kcachegrind/pool.cpp
@@ -18,7 +18,7 @@
#include <string.h>
#include <stdlib.h>
-#include <qglobal.h>
+#include <tqglobal.h>
#include "pool.h"
// FixPool
diff --git a/kcachegrind/kcachegrind/sourceitem.cpp b/kcachegrind/kcachegrind/sourceitem.cpp
index cbb8db6e..40a97ca3 100644
--- a/kcachegrind/kcachegrind/sourceitem.cpp
+++ b/kcachegrind/kcachegrind/sourceitem.cpp
@@ -20,9 +20,9 @@
* Items of source view.
*/
-#include <qpixmap.h>
-#include <qregexp.h>
-#include <qpainter.h>
+#include <tqpixmap.h>
+#include <tqregexp.h>
+#include <tqpainter.h>
#include <klocale.h>
#include <kiconloader.h>
@@ -37,11 +37,11 @@
// SourceItem
// for source lines
-SourceItem::SourceItem(SourceView* sv, QListView* parent,
+SourceItem::SourceItem(SourceView* sv, TQListView* parent,
int fileno, unsigned int lineno,
- bool inside, const QString& src,
+ bool inside, const TQString& src,
TraceLine* line)
- : QListViewItem(parent)
+ : TQListViewItem(parent)
{
_view = sv;
_lineno = lineno;
@@ -54,20 +54,20 @@ SourceItem::SourceItem(SourceView* sv, QListView* parent,
if (src == "...")
setText(0, src);
else
- setText(0, QString::number(lineno));
+ setText(0, TQString::number(lineno));
- QString s = src;
- setText(4, s.replace( QRegExp("\t"), " " ));
+ TQString s = src;
+ setText(4, s.replace( TQRegExp("\t"), " " ));
updateGroup();
updateCost();
}
// for call lines
-SourceItem::SourceItem(SourceView* sv, QListViewItem* parent,
+SourceItem::SourceItem(SourceView* sv, TQListViewItem* parent,
int fileno, unsigned int lineno,
TraceLine* line, TraceLineCall* lineCall)
- : QListViewItem(parent)
+ : TQListViewItem(parent)
{
_view = sv;
_lineno = lineno;
@@ -81,13 +81,13 @@ SourceItem::SourceItem(SourceView* sv, QListViewItem* parent,
// fileno, lineno, _lineCall->call()->called()->prettyName().ascii());
SubCost cc = _lineCall->callCount();
- QString templ = " ";
+ TQString templ = " ";
if (cc==0)
templ += i18n("Active call to '%1'");
else
templ += i18n("%n call to '%1'", "%n calls to '%1'", cc);
- QString callStr = templ.arg(_lineCall->call()->calledName());
+ TQString callStr = templ.arg(_lineCall->call()->calledName());
TraceFunction* calledF = _lineCall->call()->called();
calledF->addPrettyLocation(callStr);
@@ -98,10 +98,10 @@ SourceItem::SourceItem(SourceView* sv, QListViewItem* parent,
}
// for jump lines
-SourceItem::SourceItem(SourceView* sv, QListViewItem* parent,
+SourceItem::SourceItem(SourceView* sv, TQListViewItem* parent,
int fileno, unsigned int lineno,
TraceLine* line, TraceLineJump* lineJump)
- : QListViewItem(parent)
+ : TQListViewItem(parent)
{
_view = sv;
_lineno = lineno;
@@ -114,13 +114,13 @@ SourceItem::SourceItem(SourceView* sv, QListViewItem* parent,
//qDebug("SourceItem: (file %d, line %d) Linecall to %s",
// fileno, lineno, _lineCall->call()->called()->prettyName().ascii());
- QString to;
+ TQString to;
if (_lineJump->lineTo()->functionSource() == _line->functionSource())
to = _lineJump->lineTo()->name();
else
to = _lineJump->lineTo()->prettyName();
- QString jStr;
+ TQString jStr;
if (_lineJump->isCondJump())
jStr = i18n("Jump %1 of %2 times to %3")
.arg(_lineJump->followedCount().pretty())
@@ -140,7 +140,7 @@ void SourceItem::updateGroup()
if (!_lineCall) return;
TraceFunction* f = _lineCall->call()->called();
- QColor c = Configuration::functionColor(_view->groupType(), f);
+ TQColor c = Configuration::functionColor(_view->groupType(), f);
setPixmap(4, colorPixmap(10, 10, c));
}
@@ -158,10 +158,10 @@ void SourceItem::updateCost()
if (_lineCall &&
((_lineCall->call()->inCycle()>0) ||
(_lineCall->call()->isRecursion()>0))) {
- QString str;
- QPixmap p;
+ TQString str;
+ TQPixmap p;
- QString icon = "undo";
+ TQString icon = "undo";
KIconLoader* loader = KApplication::kApplication()->iconLoader();
p= loader->loadIcon(icon, KIcon::Small, 0,
KIcon::DefaultState, 0, true);
@@ -184,15 +184,15 @@ void SourceItem::updateCost()
TraceCostType* ct = _view->costType();
_pure = ct ? lineCost->subCost(ct) : SubCost(0);
if (_pure == 0) {
- setText(1, QString::null);
- setPixmap(1, QPixmap());
+ setText(1, TQString::null);
+ setPixmap(1, TQPixmap());
}
else {
double total = totalCost->subCost(ct);
double pure = 100.0 * _pure / total;
if (Configuration::showPercentage())
- setText(1, QString("%1")
+ setText(1, TQString("%1")
.arg(pure, 0, 'f', Configuration::percentPrecision()));
else
setText(1, _pure.pretty());
@@ -203,15 +203,15 @@ void SourceItem::updateCost()
TraceCostType* ct2 = _view->costType2();
_pure2 = ct2 ? lineCost->subCost(ct2) : SubCost(0);
if (_pure2 == 0) {
- setText(2, QString::null);
- setPixmap(2, QPixmap());
+ setText(2, TQString::null);
+ setPixmap(2, TQPixmap());
}
else {
double total = totalCost->subCost(ct2);
double pure2 = 100.0 * _pure2 / total;
if (Configuration::showPercentage())
- setText(2, QString("%1")
+ setText(2, TQString("%1")
.arg(pure2, 0, 'f', Configuration::percentPrecision()));
else
setText(2, _pure2.pretty());
@@ -221,7 +221,7 @@ void SourceItem::updateCost()
}
-int SourceItem::compare(QListViewItem * i, int col, bool ascending ) const
+int SourceItem::compare(TQListViewItem * i, int col, bool ascending ) const
{
const SourceItem* si1 = this;
const SourceItem* si2 = (SourceItem*) i;
@@ -281,50 +281,50 @@ int SourceItem::compare(QListViewItem * i, int col, bool ascending ) const
return 1;
return 0;
}
- return QListViewItem::compare(i, col, ascending);
+ return TQListViewItem::compare(i, col, ascending);
}
-void SourceItem::paintCell( QPainter *p, const QColorGroup &cg,
+void SourceItem::paintCell( TQPainter *p, const TQColorGroup &cg,
int column, int width, int alignment )
{
- QColorGroup _cg( cg );
+ TQColorGroup _cg( cg );
if ( !_inside || ((column==1) || (column==2)))
- _cg.setColor( QColorGroup::Base, cg.button() );
+ _cg.setColor( TQColorGroup::Base, cg.button() );
else if ((_lineCall || _lineJump) && column>2)
- _cg.setColor( QColorGroup::Base, cg.midlight() );
+ _cg.setColor( TQColorGroup::Base, cg.midlight() );
if (column == 3)
paintArrows(p, _cg, width);
else
- QListViewItem::paintCell( p, _cg, column, width, alignment );
+ TQListViewItem::paintCell( p, _cg, column, width, alignment );
}
-void SourceItem::setJumpArray(const QMemArray<TraceLineJump*>& a)
+void SourceItem::setJumpArray(const TQMemArray<TraceLineJump*>& a)
{
_jump.duplicate(a);
}
-void SourceItem::paintArrows(QPainter *p, const QColorGroup &cg, int width)
+void SourceItem::paintArrows(TQPainter *p, const TQColorGroup &cg, int width)
{
- QListView *lv = listView();
+ TQListView *lv = listView();
if ( !lv ) return;
SourceView* sv = (SourceView*) lv;
const BackgroundMode bgmode = lv->viewport()->backgroundMode();
- const QColorGroup::ColorRole crole
- = QPalette::backgroundRoleFromMode( bgmode );
+ const TQColorGroup::ColorRole crole
+ = TQPalette::backgroundRoleFromMode( bgmode );
if ( cg.brush( crole ) != lv->colorGroup().brush( crole ) )
p->fillRect( 0, 0, width, height(), cg.brush( crole ) );
else
- sv->paintEmptyArea( p, QRect( 0, 0, width, height() ) );
+ sv->paintEmptyArea( p, TQRect( 0, 0, width, height() ) );
if ( isSelected() && lv->allColumnsShowFocus() )
- p->fillRect( 0, 0, width, height(), cg.brush( QColorGroup::Highlight ) );
+ p->fillRect( 0, 0, width, height(), cg.brush( TQColorGroup::Highlight ) );
int marg = lv->itemMargin();
int yy = height()/2, y1, y2;
- QColor c;
+ TQColor c;
int start = -1, end = -1;
@@ -382,7 +382,7 @@ void SourceItem::paintArrows(QPainter *p, const QColorGroup &cg, int width)
x = marg + 6*end;
w = 6*(sv->arrowLevels() - end) + 10;
- QPointArray a;
+ TQPointArray a;
a.putPoints(0, 7, x, y+h,
x,y, x+w-8, y, x+w-8, y-2,
x+w, yy,
@@ -428,10 +428,10 @@ void SourceItem::paintArrows(QPainter *p, const QColorGroup &cg, int width)
}
-int SourceItem::width( const QFontMetrics& fm,
- const QListView* lv, int c ) const
+int SourceItem::width( const TQFontMetrics& fm,
+ const TQListView* lv, int c ) const
{
- if (c != 3) return QListViewItem::width(fm, lv, c);
+ if (c != 3) return TQListViewItem::width(fm, lv, c);
SourceView* sv = (SourceView*) lv;
int levels = sv->arrowLevels();
diff --git a/kcachegrind/kcachegrind/sourceitem.h b/kcachegrind/kcachegrind/sourceitem.h
index 0afa7a0b..5f32da4c 100644
--- a/kcachegrind/kcachegrind/sourceitem.h
+++ b/kcachegrind/kcachegrind/sourceitem.h
@@ -23,7 +23,7 @@
#ifndef SOURCEITEM_H
#define SOURCEITEM_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "tracedata.h"
class SourceView;
@@ -32,18 +32,18 @@ class SourceItem: public QListViewItem
{
public:
// for source lines
- SourceItem(SourceView* sv, QListView* parent,
+ SourceItem(SourceView* sv, TQListView* parent,
int fileno, unsigned int lineno,
- bool inside, const QString& src,
+ bool inside, const TQString& src,
TraceLine* line = 0);
// for call lines
- SourceItem(SourceView* sv, QListViewItem* parent,
+ SourceItem(SourceView* sv, TQListViewItem* parent,
int fileno, unsigned int lineno,
TraceLine* line, TraceLineCall* lineCall);
// for jump lines
- SourceItem(SourceView* sv, QListViewItem* parent,
+ SourceItem(SourceView* sv, TQListViewItem* parent,
int fileno, unsigned int lineno,
TraceLine* line, TraceLineJump* lineJump);
@@ -54,21 +54,21 @@ public:
TraceLineCall* lineCall() const { return _lineCall; }
TraceLineJump* lineJump() const { return _lineJump; }
- int compare(QListViewItem * i, int col, bool ascending ) const;
+ int compare(TQListViewItem * i, int col, bool ascending ) const;
- void paintCell( QPainter *p, const QColorGroup &cg,
+ void paintCell( TQPainter *p, const TQColorGroup &cg,
int column, int width, int alignment );
- int width( const QFontMetrics& fm,
- const QListView* lv, int c ) const;
+ int width( const TQFontMetrics& fm,
+ const TQListView* lv, int c ) const;
void updateGroup();
void updateCost();
// arrow lines
- void setJumpArray(const QMemArray<TraceLineJump*>& a);
+ void setJumpArray(const TQMemArray<TraceLineJump*>& a);
protected:
- void paintArrows(QPainter *p, const QColorGroup &cg, int width);
- QMemArray<TraceLineJump*> _jump;
+ void paintArrows(TQPainter *p, const TQColorGroup &cg, int width);
+ TQMemArray<TraceLineJump*> _jump;
private:
SourceView* _view;
diff --git a/kcachegrind/kcachegrind/sourceview.cpp b/kcachegrind/kcachegrind/sourceview.cpp
index 50088a23..a3a301c6 100644
--- a/kcachegrind/kcachegrind/sourceview.cpp
+++ b/kcachegrind/kcachegrind/sourceview.cpp
@@ -20,10 +20,10 @@
* Source View
*/
-#include <qdir.h>
-#include <qfile.h>
-#include <qwhatsthis.h>
-#include <qpopupmenu.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqwhatsthis.h>
+#include <tqpopupmenu.h>
#include <klocale.h>
#include <kdebug.h>
@@ -38,8 +38,8 @@
SourceView::SourceView(TraceItemView* parentView,
- QWidget* parent, const char* name)
- : QListView(parent, name), TraceItemView(parentView)
+ TQWidget* parent, const char* name)
+ : TQListView(parent, name), TraceItemView(parentView)
{
_inSelectionUpdate = false;
@@ -57,34 +57,34 @@ SourceView::SourceView(TraceItemView* parentView,
setColumnAlignment(0, Qt::AlignRight);
setColumnAlignment(1, Qt::AlignRight);
setColumnAlignment(2, Qt::AlignRight);
- setResizeMode(QListView::LastColumn);
+ setResizeMode(TQListView::LastColumn);
connect(this,
- SIGNAL(contextMenuRequested(QListViewItem*, const QPoint &, int)),
- SLOT(context(QListViewItem*, const QPoint &, int)));
+ TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint &, int)),
+ TQT_SLOT(context(TQListViewItem*, const TQPoint &, int)));
connect(this,
- SIGNAL(selectionChanged(QListViewItem*)),
- SLOT(selectedSlot(QListViewItem*)));
+ TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ TQT_SLOT(selectedSlot(TQListViewItem*)));
connect(this,
- SIGNAL(doubleClicked(QListViewItem*)),
- SLOT(activatedSlot(QListViewItem*)));
+ TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ TQT_SLOT(activatedSlot(TQListViewItem*)));
connect(this,
- SIGNAL(returnPressed(QListViewItem*)),
- SLOT(activatedSlot(QListViewItem*)));
+ TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ TQT_SLOT(activatedSlot(TQListViewItem*)));
- QWhatsThis::add( this, whatsThis());
+ TQWhatsThis::add( this, whatsThis());
}
-void SourceView::paintEmptyArea( QPainter * p, const QRect & r)
+void SourceView::paintEmptyArea( TQPainter * p, const TQRect & r)
{
- QListView::paintEmptyArea(p, r);
+ TQListView::paintEmptyArea(p, r);
}
-QString SourceView::whatsThis() const
+TQString SourceView::whatsThis() const
{
return i18n( "<b>Annotated Source</b>"
"<p>The annotated source list shows the "
@@ -99,9 +99,9 @@ QString SourceView::whatsThis() const
"make the destination function current.</p>");
}
-void SourceView::context(QListViewItem* i, const QPoint & p, int c)
+void SourceView::context(TQListViewItem* i, const TQPoint & p, int c)
{
- QPopupMenu popup;
+ TQPopupMenu popup;
// Menu entry:
TraceLineCall* lc = i ? ((SourceItem*) i)->lineCall() : 0;
@@ -110,7 +110,7 @@ void SourceView::context(QListViewItem* i, const QPoint & p, int c)
TraceLine* line = lj ? lj->lineTo() : 0;
if (f) {
- QString name = f->name();
+ TQString name = f->name();
if ((int)name.length()>Configuration::maxSymbolLength())
name = name.left(Configuration::maxSymbolLength()) + "...";
popup.insertItem(i18n("Go to '%1'").arg(name), 93);
@@ -135,7 +135,7 @@ void SourceView::context(QListViewItem* i, const QPoint & p, int c)
}
-void SourceView::selectedSlot(QListViewItem * i)
+void SourceView::selectedSlot(TQListViewItem * i)
{
if (!i) return;
// programatically selected items are not signalled
@@ -167,7 +167,7 @@ void SourceView::selectedSlot(QListViewItem * i)
}
}
-void SourceView::activatedSlot(QListViewItem * i)
+void SourceView::activatedSlot(TQListViewItem * i)
{
if (!i) return;
TraceLineCall* lc = ((SourceItem*) i)->lineCall();
@@ -230,14 +230,14 @@ void SourceView::doUpdate(int changeType)
if (_selectedItem->type() == TraceItem::Instr)
sLine = ((TraceInstr*)_selectedItem)->line();
- SourceItem* si = (SourceItem*)QListView::selectedItem();
+ SourceItem* si = (SourceItem*)TQListView::selectedItem();
if (si) {
if (si->line() == sLine) return;
if (si->lineCall() &&
(si->lineCall()->call()->called() == _selectedItem)) return;
}
- QListViewItem *item, *item2;
+ TQListViewItem *item, *item2;
for (item = firstChild();item;item = item->nextSibling()) {
si = (SourceItem*)item;
if (si->line() == sLine) {
@@ -265,7 +265,7 @@ void SourceView::doUpdate(int changeType)
}
if (changeType == groupTypeChanged) {
- QListViewItem *item, *item2;
+ TQListViewItem *item, *item2;
for (item = firstChild();item;item = item->nextSibling())
for (item2 = item->firstChild();item2;item2 = item2->nextSibling())
((SourceItem*)item2)->updateGroup();
@@ -309,7 +309,7 @@ void SourceView::refresh()
if (!f) return;
// Allow resizing of column 2
- setColumnWidthMode(2, QListView::Maximum);
+ setColumnWidthMode(2, TQListView::Maximum);
TraceFunctionSource* mainSF = f->sourceFile();
@@ -332,7 +332,7 @@ void SourceView::refresh()
fillSourceFile(sf, fileno);
if (!_costType2) {
- setColumnWidthMode(2, QListView::Manual);
+ setColumnWidthMode(2, TQListView::Manual);
setColumnWidth(2, 0);
}
}
@@ -340,19 +340,19 @@ void SourceView::refresh()
// helper for fillSourceList:
// search recursive for a file, starting from a base dir
-static bool checkFileExistance(QString& dir, const QString& name)
+static bool checkFileExistance(TQString& dir, const TQString& name)
{
// we leave this in...
qDebug("Checking %s/%s", dir.ascii(), name.ascii());
- if (QFile::exists(dir + "/" + name)) return true;
+ if (TQFile::exists(dir + "/" + name)) return true;
// check in subdirectories
- QDir d(dir);
- d.setFilter( QDir::Dirs | QDir::NoSymLinks );
- d.setSorting( QDir::Unsorted );
- QStringList subdirs = d.entryList();
- QStringList::Iterator it =subdirs.begin();
+ TQDir d(dir);
+ d.setFilter( TQDir::Dirs | TQDir::NoSymLinks );
+ d.setSorting( TQDir::Unsorted );
+ TQStringList subdirs = d.entryList();
+ TQStringList::Iterator it =subdirs.begin();
for(; it != subdirs.end(); ++it ) {
if (*it == "." || *it == ".." || *it == "CVS") continue;
@@ -513,24 +513,24 @@ void SourceView::fillSourceFile(TraceFunctionSource* sf, int fileno)
new SourceItem(this, this, fileno, 1, false,
i18n("with any source line of this function in file"));
new SourceItem(this, this, fileno, 2, false,
- QString(" '%1'").arg(sf->function()->prettyName()));
+ TQString(" '%1'").arg(sf->function()->prettyName()));
new SourceItem(this, this, fileno, 3, false,
i18n("Thus, no annotated source can be shown."));
return;
}
}
- QString filename = sf->file()->shortName();
- QString dir = sf->file()->directory();
+ TQString filename = sf->file()->shortName();
+ TQString dir = sf->file()->directory();
if (!dir.isEmpty())
filename = dir + "/" + filename;
if (nextCostLineno>0) {
// we have debug info... search for source file
- if (!QFile::exists(filename)) {
- QStringList list = Configuration::sourceDirs(_data,
+ if (!TQFile::exists(filename)) {
+ TQStringList list = Configuration::sourceDirs(_data,
sf->function()->object());
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = list.begin(); it != list.end(); ++it ) {
dir = *it;
@@ -564,7 +564,7 @@ void SourceView::fillSourceFile(TraceFunctionSource* sf, int fileno)
new SourceItem(this, this, fileno, 0, false,
i18n("There is no source available for the following function:"));
new SourceItem(this, this, fileno, 1, false,
- QString(" '%1'").arg(sf->function()->prettyName()));
+ TQString(" '%1'").arg(sf->function()->prettyName()));
if (sf->file()->name().isEmpty()) {
new SourceItem(this, this, fileno, 2, false,
i18n("This is because no debug information is present."));
@@ -574,7 +574,7 @@ void SourceView::fillSourceFile(TraceFunctionSource* sf, int fileno)
new SourceItem(this, this, fileno, 4, false,
i18n("The function is located in this ELF object:"));
new SourceItem(this, this, fileno, 5, false,
- QString(" '%1'")
+ TQString(" '%1'")
.arg(sf->function()->object()->prettyName()));
}
}
@@ -582,7 +582,7 @@ void SourceView::fillSourceFile(TraceFunctionSource* sf, int fileno)
new SourceItem(this, this, fileno, 2, false,
i18n("This is because its source file cannot be found:"));
new SourceItem(this, this, fileno, 3, false,
- QString(" '%1'").arg(sf->file()->name()));
+ TQString(" '%1'").arg(sf->file()->name()));
new SourceItem(this, this, fileno, 4, false,
i18n("Add the folder of this file to the source folder list."));
new SourceItem(this, this, fileno, 5, false,
@@ -636,7 +636,7 @@ void SourceView::fillSourceFile(TraceFunctionSource* sf, int fileno)
TraceLine* currLine;
SourceItem *si, *si2, *item = 0, *first = 0, *selected = 0;
- QFile file(filename);
+ TQFile file(filename);
if (!file.open(IO_ReadOnly)) return;
while (1) {
readBytes=file.readLine(buf, sizeof( buf ));
@@ -702,7 +702,7 @@ void SourceView::fillSourceFile(TraceFunctionSource* sf, int fileno)
skipLineWritten = false;
si = new SourceItem(this, this,
- fileno, fileLineno, inside, QString(buf),
+ fileno, fileLineno, inside, TQString(buf),
currLine);
if (!currLine) continue;
@@ -755,7 +755,7 @@ void SourceView::fillSourceFile(TraceFunctionSource* sf, int fileno)
// for arrows: go down the list according to list sorting
sort();
- QListViewItem *item1, *item2;
+ TQListViewItem *item1, *item2;
for (item1=firstChild();item1;item1 = item1->nextSibling()) {
si = (SourceItem*)item1;
updateJumpArray(si->lineno(), si, true, false);
@@ -781,7 +781,7 @@ void SourceView::updateSourceItems()
setColumnWidth(1, 50);
setColumnWidth(2, _costType2 ? 50:0);
// Allow resizing of column 2
- setColumnWidthMode(2, QListView::Maximum);
+ setColumnWidthMode(2, TQListView::Maximum);
if (_costType)
setColumnText(1, _costType->name());
@@ -789,7 +789,7 @@ void SourceView::updateSourceItems()
setColumnText(2, _costType2->name());
SourceItem* si;
- QListViewItem* item = firstChild();
+ TQListViewItem* item = firstChild();
for (;item;item = item->nextSibling()) {
si = (SourceItem*)item;
TraceLine* l = si->line();
@@ -797,7 +797,7 @@ void SourceView::updateSourceItems()
si->updateCost();
- QListViewItem *next, *i = si->firstChild();
+ TQListViewItem *next, *i = si->firstChild();
for (;i;i = next) {
next = i->nextSibling();
((SourceItem*)i)->updateCost();
@@ -805,7 +805,7 @@ void SourceView::updateSourceItems()
}
if (!_costType2) {
- setColumnWidthMode(2, QListView::Manual);
+ setColumnWidthMode(2, TQListView::Manual);
setColumnWidth(2, 0);
}
}
diff --git a/kcachegrind/kcachegrind/sourceview.h b/kcachegrind/kcachegrind/sourceview.h
index 0e1319af..6856eddb 100644
--- a/kcachegrind/kcachegrind/sourceview.h
+++ b/kcachegrind/kcachegrind/sourceview.h
@@ -23,12 +23,12 @@
#ifndef SOURCEVIEW_H
#define SOURCEVIEW_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "traceitemview.h"
class SourceItem;
-class SourceView : public QListView, public TraceItemView
+class SourceView : public TQListView, public TraceItemView
{
friend class SourceItem;
@@ -36,19 +36,19 @@ class SourceView : public QListView, public TraceItemView
public:
SourceView(TraceItemView* parentView,
- QWidget* parent = 0, const char* name = 0);
+ TQWidget* parent = 0, const char* name = 0);
- QWidget* widget() { return this; }
- QString whatsThis() const;
+ TQWidget* widget() { return this; }
+ TQString whatsThis() const;
protected:
int arrowLevels() { return _arrowLevels; }
- void paintEmptyArea( QPainter *, const QRect & );
+ void paintEmptyArea( TQPainter *, const TQRect & );
private slots:
- void context(QListViewItem*, const QPoint &, int);
- void selectedSlot(QListViewItem *);
- void activatedSlot(QListViewItem *);
+ void context(TQListViewItem*, const TQPoint &, int);
+ void selectedSlot(TQListViewItem *);
+ void activatedSlot(TQListViewItem *);
private:
TraceItem* canShow(TraceItem*);
@@ -63,7 +63,7 @@ private:
// arrows
int _arrowLevels;
// temporary needed on creation...
- QMemArray<TraceLineJump*> _jump;
+ TQMemArray<TraceLineJump*> _jump;
TraceLineJumpList _lowList, _highList;
};
diff --git a/kcachegrind/kcachegrind/stackbrowser.cpp b/kcachegrind/kcachegrind/stackbrowser.cpp
index fa6480ea..78095eb2 100644
--- a/kcachegrind/kcachegrind/stackbrowser.cpp
+++ b/kcachegrind/kcachegrind/stackbrowser.cpp
@@ -16,7 +16,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qlistview.h>
+#include <tqlistview.h>
#include "stackbrowser.h"
@@ -259,9 +259,9 @@ Stack* Stack::split(TraceFunction* f)
return new Stack(_top, calls );
}
-QString Stack::toString()
+TQString Stack::toString()
{
- QString res = _top->name();
+ TQString res = _top->name();
TraceCall *c;
for (c=_calls.first();c;c=_calls.next())
res += "\n > " + c->called()->name();
diff --git a/kcachegrind/kcachegrind/stackbrowser.h b/kcachegrind/kcachegrind/stackbrowser.h
index d1205833..e7d6b802 100644
--- a/kcachegrind/kcachegrind/stackbrowser.h
+++ b/kcachegrind/kcachegrind/stackbrowser.h
@@ -49,7 +49,7 @@ public:
TraceFunction* caller(TraceFunction*, bool extend);
TraceFunction* called(TraceFunction*, bool extend);
- QString toString();
+ TQString toString();
private:
Stack(TraceFunction* top, TraceCallList list);
diff --git a/kcachegrind/kcachegrind/stackitem.cpp b/kcachegrind/kcachegrind/stackitem.cpp
index 075b9111..e3763ab4 100644
--- a/kcachegrind/kcachegrind/stackitem.cpp
+++ b/kcachegrind/kcachegrind/stackitem.cpp
@@ -20,7 +20,7 @@
* Items of stack dockable.
*/
-#include <qpixmap.h>
+#include <tqpixmap.h>
#include <klocale.h>
#include "configuration.h"
@@ -31,8 +31,8 @@
// StackItem
StackItem::StackItem(StackSelection* ss,
- QListView* parent, TraceFunction* f)
- :QListViewItem(parent)
+ TQListView* parent, TraceFunction* f)
+ :TQListViewItem(parent)
{
_view = ss;
_function = f;
@@ -41,13 +41,13 @@ StackItem::StackItem(StackSelection* ss,
updateGroup();
updateCost();
- setText(2, QString("-- "));
+ setText(2, TQString("-- "));
setText(3, f->prettyName());
}
StackItem::StackItem(StackSelection* ss,
- QListView* parent, TraceCall* call)
- :QListViewItem(parent)
+ TQListView* parent, TraceCall* call)
+ :TQListViewItem(parent)
{
_view = ss;
_call = call;
@@ -62,7 +62,7 @@ StackItem::StackItem(StackSelection* ss,
void StackItem::updateGroup()
{
- QColor c = Configuration::functionColor(_view->groupType(),
+ TQColor c = Configuration::functionColor(_view->groupType(),
_function);
setPixmap(3, colorPixmap(10, 10, c));
}
@@ -78,13 +78,13 @@ void StackItem::updateCost()
double total = _call->called()->data()->subCost(ct);
if (total == 0.0) {
setText(0, "-");
- setPixmap(0, QPixmap());
+ setPixmap(0, TQPixmap());
}
else {
double sum = 100.0 * _sum / total;
if (Configuration::showPercentage())
- setText(0, QString("%1")
+ setText(0, TQString("%1")
.arg(sum, 0, 'f', Configuration::percentPrecision()));
else
setText(0, _call->prettySubCost(ct));
@@ -100,13 +100,13 @@ void StackItem::updateCost()
total = _call->called()->data()->subCost(ct2);
if (total == 0.0) {
setText(1, "-");
- setPixmap(1, QPixmap());
+ setPixmap(1, TQPixmap());
}
else {
double sum = 100.0 * _sum / total;
if (Configuration::showPercentage())
- setText(1, QString("%1")
+ setText(1, TQString("%1")
.arg(sum, 0, 'f', Configuration::percentPrecision()));
else
setText(1, _call->prettySubCost(ct2));
diff --git a/kcachegrind/kcachegrind/stackitem.h b/kcachegrind/kcachegrind/stackitem.h
index 7a1dafeb..1701f010 100644
--- a/kcachegrind/kcachegrind/stackitem.h
+++ b/kcachegrind/kcachegrind/stackitem.h
@@ -24,7 +24,7 @@
#ifndef STACKITEM_H
#define STACKITEM_H
-#include <qlistview.h>
+#include <tqlistview.h>
#include "tracedata.h"
class StackSelection;
@@ -36,8 +36,8 @@ class StackItem: public QListViewItem
{
public:
// for top
- StackItem(StackSelection* ss, QListView* parent, TraceFunction* f);
- StackItem(StackSelection* ss, QListView* parent, TraceCall* c);
+ StackItem(StackSelection* ss, TQListView* parent, TraceFunction* f);
+ StackItem(StackSelection* ss, TQListView* parent, TraceCall* c);
TraceFunction* function() { return _function; }
TraceCall* call() { return _call; }
diff --git a/kcachegrind/kcachegrind/stackselection.cpp b/kcachegrind/kcachegrind/stackselection.cpp
index 5ace7d57..1080b860 100644
--- a/kcachegrind/kcachegrind/stackselection.cpp
+++ b/kcachegrind/kcachegrind/stackselection.cpp
@@ -22,12 +22,12 @@
* to be put into a QDockWindow
*/
-#include <qtimer.h>
-#include <qlistview.h>
-#include <qlabel.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qlineedit.h>
+#include <tqtimer.h>
+#include <tqlistview.h>
+#include <tqlabel.h>
+#include <tqpushbutton.h>
+#include <tqcombobox.h>
+#include <tqlineedit.h>
#include <kdebug.h>
@@ -35,7 +35,7 @@
#include "stackselection.h"
#include "stackitem.h"
-StackSelection::StackSelection( QWidget* parent, const char* name)
+StackSelection::StackSelection( TQWidget* parent, const char* name)
: StackSelectionBase(parent, name)
{
_data = 0;
@@ -48,7 +48,7 @@ StackSelection::StackSelection( QWidget* parent, const char* name)
stackList->setSorting(-1);
stackList->setAllColumnsShowFocus(true);
- stackList->setResizeMode(QListView::LastColumn);
+ stackList->setResizeMode(TQListView::LastColumn);
stackList->setColumnAlignment(0, Qt::AlignRight);
stackList->setColumnAlignment(1, Qt::AlignRight);
stackList->setColumnAlignment(2, Qt::AlignRight);
@@ -57,8 +57,8 @@ StackSelection::StackSelection( QWidget* parent, const char* name)
stackList->setColumnWidth(1, 0);
stackList->setColumnWidth(2, 50);
- connect(stackList, SIGNAL(selectionChanged(QListViewItem*)),
- this, SLOT(stackSelected(QListViewItem*)));
+ connect(stackList, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ this, TQT_SLOT(stackSelected(TQListViewItem*)));
}
StackSelection::~StackSelection()
@@ -108,7 +108,7 @@ void StackSelection::rebuildStackList()
TraceFunction* top = item->stack()->top();
if (!top) return;
- stackList->setColumnWidthMode(1, QListView::Maximum);
+ stackList->setColumnWidthMode(1, TQListView::Maximum);
TraceCallList l = item->stack()->calls();
TraceCall* call;
@@ -118,7 +118,7 @@ void StackSelection::rebuildStackList()
new StackItem(this, stackList, top);
// select current function
- QListViewItem* i = stackList->firstChild();
+ TQListViewItem* i = stackList->firstChild();
for (;i;i=i->nextSibling())
if (((StackItem*)i)->function() == item->function())
break;
@@ -130,12 +130,12 @@ void StackSelection::rebuildStackList()
}
if (!_costType2) {
- stackList->setColumnWidthMode(1, QListView::Manual);
+ stackList->setColumnWidthMode(1, TQListView::Manual);
stackList->setColumnWidth(1, 0);
}
}
-void StackSelection::stackSelected(QListViewItem* i)
+void StackSelection::stackSelected(TQListViewItem* i)
{
if (!i) return;
@@ -178,7 +178,7 @@ void StackSelection::browserDown()
void StackSelection::refresh()
{
- QListViewItem* item = stackList->firstChild();
+ TQListViewItem* item = stackList->firstChild();
for(;item;item = item->nextSibling())
((StackItem*)item)->updateCost();
}
@@ -192,7 +192,7 @@ void StackSelection::setCostType(TraceCostType* ct)
if (_costType)
stackList->setColumnText(0, _costType->name());
- QListViewItem* item = stackList->firstChild();
+ TQListViewItem* item = stackList->firstChild();
for(;item;item = item->nextSibling())
((StackItem*)item)->updateCost();
}
@@ -203,16 +203,16 @@ void StackSelection::setCostType2(TraceCostType* ct)
_costType2 = ct;
stackList->setColumnWidth(1, 50);
- stackList->setColumnWidthMode(1, QListView::Maximum);
+ stackList->setColumnWidthMode(1, TQListView::Maximum);
if (_costType2)
stackList->setColumnText(1, _costType2->name());
- QListViewItem* item = stackList->firstChild();
+ TQListViewItem* item = stackList->firstChild();
for(;item;item = item->nextSibling())
((StackItem*)item)->updateCost();
if (!_costType2) {
- stackList->setColumnWidthMode(1, QListView::Manual);
+ stackList->setColumnWidthMode(1, TQListView::Manual);
stackList->setColumnWidth(1, 0);
}
}
@@ -222,7 +222,7 @@ void StackSelection::setGroupType(TraceItem::CostType gt)
if (_groupType == gt) return;
_groupType = gt;
- QListViewItem* item = stackList->firstChild();
+ TQListViewItem* item = stackList->firstChild();
for(;item;item = item->nextSibling())
((StackItem*)item)->updateGroup();
}
diff --git a/kcachegrind/kcachegrind/stackselection.h b/kcachegrind/kcachegrind/stackselection.h
index aa74a178..5d34c7ac 100644
--- a/kcachegrind/kcachegrind/stackselection.h
+++ b/kcachegrind/kcachegrind/stackselection.h
@@ -38,7 +38,7 @@ class StackSelection : public StackSelectionBase
Q_OBJECT
public:
- StackSelection( QWidget* parent = 0, const char* name = 0);
+ StackSelection( TQWidget* parent = 0, const char* name = 0);
~StackSelection();
TraceData* data() const { return _data; }
@@ -57,7 +57,7 @@ public slots:
void setCostType2(TraceCostType*);
void setGroupType(TraceItem::CostType);
- void stackSelected( QListViewItem* );
+ void stackSelected( TQListViewItem* );
void browserBack();
void browserForward();
void browserUp();
@@ -70,7 +70,7 @@ private:
TraceData* _data;
StackBrowser* _browser;
- QListViewItem* _item;
+ TQListViewItem* _item;
TraceFunction* _function;
TraceCostType* _costType;
TraceCostType* _costType2;
diff --git a/kcachegrind/kcachegrind/subcost.cpp b/kcachegrind/kcachegrind/subcost.cpp
index cf87f7f0..7b5034e3 100644
--- a/kcachegrind/kcachegrind/subcost.cpp
+++ b/kcachegrind/kcachegrind/subcost.cpp
@@ -16,7 +16,7 @@
Boston, MA 02110-1301, USA.
*/
-#include <qstring.h>
+#include <tqstring.h>
#include "subcost.h"
@@ -40,19 +40,19 @@ bool SubCost::set(const char** ps)
return true;
}
-QString SubCost::pretty()
+TQString SubCost::pretty()
{
unsigned long long n = v;
- if (n==0) return QString(" 0");
+ if (n==0) return TQString(" 0");
int i = 0;
- QString res = "";
+ TQString res = "";
while (n) {
if ((i>0) && !(i%3)) res = " " + res;
i++;
- res = QChar('0'+int(n%10)) + res;
+ res = TQChar('0'+int(n%10)) + res;
n /= 10;
}
res = " " + res;
diff --git a/kcachegrind/kcachegrind/subcost.h b/kcachegrind/kcachegrind/subcost.h
index ab4ac9bc..81692808 100644
--- a/kcachegrind/kcachegrind/subcost.h
+++ b/kcachegrind/kcachegrind/subcost.h
@@ -55,10 +55,10 @@ class SubCost
bool operator>(const SubCost& s) const { return v > s.v; }
/**
- * Convert SubCost value into a QString,
+ * Convert SubCost value into a TQString,
* spaced every 3 digits.
*/
- QString pretty();
+ TQString pretty();
uint64 v;
};
diff --git a/kcachegrind/kcachegrind/tabview.cpp b/kcachegrind/kcachegrind/tabview.cpp
index 1b1da7b1..318920b6 100644
--- a/kcachegrind/kcachegrind/tabview.cpp
+++ b/kcachegrind/kcachegrind/tabview.cpp
@@ -21,12 +21,12 @@
* two tab widgets, separated by a splitter
*/
-#include <qobjectlist.h>
-#include <qsplitter.h>
-#include <qtabwidget.h>
-#include <qlayout.h>
-#include <qwhatsthis.h>
-#include <qpopupmenu.h>
+#include <tqobjectlist.h>
+#include <tqsplitter.h>
+#include <tqtabwidget.h>
+#include <tqlayout.h>
+#include <tqwhatsthis.h>
+#include <tqpopupmenu.h>
#include <klocale.h>
#include <kconfig.h>
@@ -43,21 +43,21 @@
// TabBar
-TabBar::TabBar(TabView* v, QTabWidget* parent, const char *name)
- : QTabBar(parent, name)
+TabBar::TabBar(TabView* v, TQTabWidget* parent, const char *name)
+ : TQTabBar(parent, name)
{
_tabWidget = parent;
_tabView = v;
}
-void TabBar::mousePressEvent(QMouseEvent *e)
+void TabBar::mousePressEvent(TQMouseEvent *e)
{
if (e->button() == RightButton) {
- QTab *tab = selectTab( e->pos() );
- QWidget* page;
+ TQTab *tab = selectTab( e->pos() );
+ TQWidget* page;
page = tab ? _tabWidget->page( indexOf( tab->identifier() ) ) :0;
- QPopupMenu popup, popup1, popup2, popup3;
+ TQPopupMenu popup, popup1, popup2, popup3;
if (page) {
TraceItemView::Position p = _tabView->tabPosition(page);
if (p != TraceItemView::Top) {
@@ -106,7 +106,7 @@ void TabBar::mousePressEvent(QMouseEvent *e)
if (r>=100 && r<110) _tabView->moveTab(0, p, true);
}
- QTabBar::mousePressEvent( e );
+ TQTabBar::mousePressEvent( e );
}
@@ -114,13 +114,13 @@ void TabBar::mousePressEvent(QMouseEvent *e)
// Splitter
//
-Splitter::Splitter(Orientation o, QWidget* parent, const char* name)
- : QSplitter(o, parent, name)
+Splitter::Splitter(Orientation o, TQWidget* parent, const char* name)
+ : TQSplitter(o, parent, name)
{}
-void Splitter::moveEvent(QMoveEvent* e)
+void Splitter::moveEvent(TQMoveEvent* e)
{
- QSplitter::moveEvent(e);
+ TQSplitter::moveEvent(e);
if (0) qDebug("Splitter %s: Move", name());
checkVisiblity();
@@ -128,9 +128,9 @@ void Splitter::moveEvent(QMoveEvent* e)
void Splitter::checkVisiblity()
{
- const QObjectList *l = children();
- QObjectListIt it( *l );
- QObject *obj;
+ const TQObjectList *l = children();
+ TQObjectListIt it( *l );
+ TQObject *obj;
while ( (obj = it.current()) != 0 ) {
++it;
if (obj->isA("Splitter")) ((Splitter*)obj)->checkVisiblity();
@@ -145,9 +145,9 @@ void Splitter::checkVisiblity()
// TabWidget
//
-TabWidget::TabWidget(TabView* v, QWidget* parent,
+TabWidget::TabWidget(TabView* v, TQWidget* parent,
const char* name, WFlags f)
- : QTabWidget(parent, name, f)
+ : TQTabWidget(parent, name, f)
{
_hasVisibleRect = false;
setTabBar(new TabBar(v, this));
@@ -170,9 +170,9 @@ void TabWidget::checkVisibility()
}
}
-void TabWidget::resizeEvent(QResizeEvent *e)
+void TabWidget::resizeEvent(TQResizeEvent *e)
{
- QTabWidget::resizeEvent(e);
+ TQTabWidget::resizeEvent(e);
if (0) qDebug("TabWidget %s:\n Resize from (%d/%d) to (%d/%d)",
name(),
e->oldSize().width(), e->oldSize().height(),
@@ -180,25 +180,25 @@ void TabWidget::resizeEvent(QResizeEvent *e)
checkVisibility();
}
-void TabWidget::showEvent(QShowEvent* e)
+void TabWidget::showEvent(TQShowEvent* e)
{
- QTabWidget::showEvent(e);
+ TQTabWidget::showEvent(e);
if (0) qDebug("TabWidget %s: Show", name());
checkVisibility();
}
-void TabWidget::hideEvent(QHideEvent* e)
+void TabWidget::hideEvent(TQHideEvent* e)
{
- QTabWidget::hideEvent(e);
+ TQTabWidget::hideEvent(e);
if (0) qDebug("TabWidget %s: Hide", name());
checkVisibility();
}
-void TabWidget::moveEvent(QMoveEvent* e)
+void TabWidget::moveEvent(TQMoveEvent* e)
{
- QTabWidget::moveEvent(e);
+ TQTabWidget::moveEvent(e);
if (0) qDebug("TabWidget %s: Move", name());
checkVisibility();
@@ -229,51 +229,51 @@ void TabWidget::moveEvent(QMoveEvent* e)
*/
TabView::TabView(TraceItemView* parentView,
- QWidget* parent, const char* name)
- : QWidget(parent, name), TraceItemView(parentView)
+ TQWidget* parent, const char* name)
+ : TQWidget(parent, name), TraceItemView(parentView)
{
- setFocusPolicy(QWidget::StrongFocus);
+ setFocusPolicy(TQWidget::StrongFocus);
_isCollapsed = true;
- QVBoxLayout* vbox = new QVBoxLayout( this, 6, 6);
+ TQVBoxLayout* vbox = new TQVBoxLayout( this, 6, 6);
_nameLabel = new KSqueezedTextLabel( this, "nameLabel" );
_nameLabel->setText(i18n("(No profile data file loaded)"));
vbox->addWidget( _nameLabel );
- _mainSplitter = new QSplitter(Qt::Horizontal, this);
+ _mainSplitter = new TQSplitter(Qt::Horizontal, this);
_leftSplitter = new Splitter(Qt::Vertical, _mainSplitter, "Left");
vbox->addWidget( _mainSplitter );
_rightTW = new TabWidget(this, _mainSplitter, "Right");
- connect(_rightTW, SIGNAL(currentChanged(QWidget*)),
- this, SLOT(tabChanged(QWidget*)));
- connect(_rightTW, SIGNAL(visibleRectChanged(TabWidget*)),
- this, SLOT(visibleRectChangedSlot(TabWidget*)));
+ connect(_rightTW, TQT_SIGNAL(currentChanged(TQWidget*)),
+ this, TQT_SLOT(tabChanged(TQWidget*)));
+ connect(_rightTW, TQT_SIGNAL(visibleRectChanged(TabWidget*)),
+ this, TQT_SLOT(visibleRectChangedSlot(TabWidget*)));
_topTW = new TabWidget(this, _leftSplitter, "Top");
- connect(_topTW, SIGNAL(currentChanged(QWidget*)),
- this, SLOT(tabChanged(QWidget*)));
- connect(_topTW, SIGNAL(visibleRectChanged(TabWidget*)),
- this, SLOT(visibleRectChangedSlot(TabWidget*)));
+ connect(_topTW, TQT_SIGNAL(currentChanged(TQWidget*)),
+ this, TQT_SLOT(tabChanged(TQWidget*)));
+ connect(_topTW, TQT_SIGNAL(visibleRectChanged(TabWidget*)),
+ this, TQT_SLOT(visibleRectChangedSlot(TabWidget*)));
_bottomSplitter = new Splitter(Qt::Horizontal,
_leftSplitter, "Bottom");
_leftTW = new TabWidget(this, _bottomSplitter, "Left");
- _leftTW->setTabPosition(QTabWidget::Bottom);
- connect(_leftTW, SIGNAL(currentChanged(QWidget*)),
- this, SLOT(tabChanged(QWidget*)));
- connect(_leftTW, SIGNAL(visibleRectChanged(TabWidget*)),
- this, SLOT(visibleRectChangedSlot(TabWidget*)));
+ _leftTW->setTabPosition(TQTabWidget::Bottom);
+ connect(_leftTW, TQT_SIGNAL(currentChanged(TQWidget*)),
+ this, TQT_SLOT(tabChanged(TQWidget*)));
+ connect(_leftTW, TQT_SIGNAL(visibleRectChanged(TabWidget*)),
+ this, TQT_SLOT(visibleRectChangedSlot(TabWidget*)));
_bottomTW = new TabWidget(this, _bottomSplitter, "Bottom");
- _bottomTW->setTabPosition(QTabWidget::Bottom);
- connect(_bottomTW, SIGNAL(currentChanged(QWidget*)),
- this, SLOT(tabChanged(QWidget*)));
- connect(_bottomTW, SIGNAL(visibleRectChanged(TabWidget*)),
- this, SLOT(visibleRectChangedSlot(TabWidget*)));
+ _bottomTW->setTabPosition(TQTabWidget::Bottom);
+ connect(_bottomTW, TQT_SIGNAL(currentChanged(TQWidget*)),
+ this, TQT_SLOT(tabChanged(TQWidget*)));
+ connect(_bottomTW, TQT_SIGNAL(visibleRectChanged(TabWidget*)),
+ this, TQT_SLOT(visibleRectChangedSlot(TabWidget*)));
// default positions...
@@ -321,7 +321,7 @@ TabView::TabView(TraceItemView* parentView,
updateVisibility();
- QWhatsThis::add( this, whatsThis() );
+ TQWhatsThis::add( this, whatsThis() );
}
void TabView::setData(TraceData* d)
@@ -333,7 +333,7 @@ void TabView::setData(TraceData* d)
v->setData(d);
}
-TraceItemView* TabView::addTab(QString label, TraceItemView* view)
+TraceItemView* TabView::addTab(TQString label, TraceItemView* view)
{
view->setTitle(label);
_tabs.append(view);
@@ -352,7 +352,7 @@ void TabView::addBottom(TraceItemView* view)
_bottomTW->insertTab(view->widget(), view->title());
}
-TraceItemView::Position TabView::tabPosition(QWidget* w)
+TraceItemView::Position TabView::tabPosition(TQWidget* w)
{
TraceItemView* v;
for (v=_tabs.first();v;v=_tabs.next())
@@ -415,7 +415,7 @@ void TabView::updateVisibility()
if (0) qDebug("TabView::updateVisiblity t %d, b %d, l %d, r %d",
t, b, l, r);
- QValueList<int> s;
+ TQValueList<int> s;
s.append(100);
@@ -496,7 +496,7 @@ TabWidget* TabView::tabWidget(Position p)
return 0;
}
-void TabView::moveTab(QWidget* w, Position p, bool wholeArea)
+void TabView::moveTab(TQWidget* w, Position p, bool wholeArea)
{
TraceItemView *v;
Position origPos = Hidden;
@@ -513,7 +513,7 @@ void TabView::moveTab(QWidget* w, Position p, bool wholeArea)
from = tabWidget(origPos);
to = tabWidget(p);
- QPtrList<TraceItemView> tabs;
+ TQPtrList<TraceItemView> tabs;
for (v=_tabs.first();v;v=_tabs.next())
if ((v->position() == origPos) &&
(wholeArea || (v->widget() == w))) tabs.append(v);
@@ -548,7 +548,7 @@ void TabView::moveTab(QWidget* w, Position p, bool wholeArea)
}
-QString TabView::whatsThis() const
+TQString TabView::whatsThis() const
{
return i18n( "<b>Information Tabs</b>"
"<p>This widget shows information for the "
@@ -580,29 +580,29 @@ QString TabView::whatsThis() const
void TabView::installFocusFilters()
{
- QObjectList *l = queryList("QWidget");
- QObjectListIt it( *l );
- QObject *obj;
+ TQObjectList *l = queryList("TQWidget");
+ TQObjectListIt it( *l );
+ TQObject *obj;
while ( (obj = it.current()) != 0 ) {
++it;
- if ( ((QWidget*)obj)->isFocusEnabled() )
+ if ( ((TQWidget*)obj)->isFocusEnabled() )
obj->installEventFilter(this);
}
delete l;
}
-bool TabView::eventFilter(QObject* o, QEvent* e)
+bool TabView::eventFilter(TQObject* o, TQEvent* e)
{
- if (e->type() == QEvent::FocusIn) {
- _lastFocus = o->isWidgetType() ? (QWidget*) o : 0;
+ if (e->type() == TQEvent::FocusIn) {
+ _lastFocus = o->isWidgetType() ? (TQWidget*) o : 0;
setActive(_lastFocus != 0);
}
- return QWidget::eventFilter(o,e);
+ return TQWidget::eventFilter(o,e);
}
-void TabView::mousePressEvent(QMouseEvent*)
+void TabView::mousePressEvent(TQMouseEvent*)
{
if (_lastFocus)
_lastFocus->setFocus();
@@ -614,7 +614,7 @@ void TabView::setActive(bool a)
if (a == _active) return;
_active = a;
- QFont nameLabel_font( _nameLabel->font() );
+ TQFont nameLabel_font( _nameLabel->font() );
nameLabel_font.setBold(a);
_nameLabel->setFont( nameLabel_font );
@@ -636,7 +636,7 @@ void TabView::doUpdate(int changeType)
// invoke tabChanged, which mangles with the lists, too
bool canShow;
TraceItemView *v;
- QPtrListIterator<TraceItemView> it( _tabs );
+ TQPtrListIterator<TraceItemView> it( _tabs );
while ( (v=it.current()) != 0) {
++it;
@@ -668,7 +668,7 @@ void TabView::doUpdate(int changeType)
}
-void TabView::tabChanged(QWidget* w)
+void TabView::tabChanged(TQWidget* w)
{
TraceItemView *v;
for (v=_tabs.first();v;v=_tabs.next())
@@ -683,9 +683,9 @@ void TabView::visibleRectChangedSlot(TabWidget* tw)
if (tw->hasVisibleRect()) doUpdate(0);
}
-void TabView::resizeEvent(QResizeEvent* e)
+void TabView::resizeEvent(TQResizeEvent* e)
{
- QWidget::resizeEvent(e);
+ TQWidget::resizeEvent(e);
bool collapsed = (e->size().width()<=1) || (e->size().height()<=1);
if (_isCollapsed != collapsed) {
@@ -710,7 +710,7 @@ void TabView::selected(TraceItemView*, TraceItem* s)
void TabView::readViewConfig(KConfig* c,
- QString prefix, QString postfix,
+ TQString prefix, TQString postfix,
bool withOptions)
{
if (0) qDebug("%s::readConfig(%s%s)", name(),
@@ -722,15 +722,15 @@ void TabView::readViewConfig(KConfig* c,
_leftSplitter->setSizes(g->readIntListEntry("LeftSizes"));
_bottomSplitter->setSizes(g->readIntListEntry("BottomSizes"));
- QString activeT = g->readEntry("ActiveTop", "CallerView");
- QString activeB = g->readEntry("ActiveBottom", "CalleeView");
- QString activeL = g->readEntry("ActiveLeft", "");
- QString activeR = g->readEntry("ActiveRight", "");
+ TQString activeT = g->readEntry("ActiveTop", "CallerView");
+ TQString activeB = g->readEntry("ActiveBottom", "CalleeView");
+ TQString activeL = g->readEntry("ActiveLeft", "");
+ TQString activeR = g->readEntry("ActiveRight", "");
- QStringList topTabs = g->readListEntry("TopTabs");
- QStringList bottomTabs = g->readListEntry("BottomTabs");
- QStringList leftTabs = g->readListEntry("LeftTabs");
- QStringList rightTabs = g->readListEntry("RightTabs");
+ TQStringList topTabs = g->readListEntry("TopTabs");
+ TQStringList bottomTabs = g->readListEntry("BottomTabs");
+ TQStringList leftTabs = g->readListEntry("LeftTabs");
+ TQStringList rightTabs = g->readListEntry("RightTabs");
if (topTabs.isEmpty() && bottomTabs.isEmpty() &&
rightTabs.isEmpty() && leftTabs.isEmpty()) {
@@ -746,11 +746,11 @@ void TabView::readViewConfig(KConfig* c,
moveTab(0, TraceItemView::Top, true);
TraceItemView *v;
- QPtrListIterator<TraceItemView> it( _tabs );
+ TQPtrListIterator<TraceItemView> it( _tabs );
while ( (v=it.current()) != 0) {
++it;
- QString n = QString(v->widget()->name());
+ TQString n = TQString(v->widget()->name());
if (topTabs.contains(n)) {
moveTab(v->widget(), TraceItemView::Top);
if (n == activeT) activeTop = v;
@@ -770,7 +770,7 @@ void TabView::readViewConfig(KConfig* c,
else moveTab(v->widget(), Hidden);
if (withOptions)
- v->readViewConfig(c, QString("%1-%2")
+ v->readViewConfig(c, TQString("%1-%2")
.arg(prefix).arg(v->widget()->name()),
postfix, true);
}
@@ -779,10 +779,10 @@ void TabView::readViewConfig(KConfig* c,
if (activeLeft) _leftTW->showPage(activeLeft->widget());
if (activeRight) _rightTW->showPage(activeRight->widget());
- QString activeType = g->readEntry("ActiveItemType", "");
- QString activeName = g->readEntry("ActiveItemName", "");
- QString selectedType = g->readEntry("SelectedItemType", "");
- QString selectedName = g->readEntry("SelectedItemName", "");
+ TQString activeType = g->readEntry("ActiveItemType", "");
+ TQString activeName = g->readEntry("ActiveItemName", "");
+ TQString selectedType = g->readEntry("SelectedItemType", "");
+ TQString selectedName = g->readEntry("SelectedItemName", "");
delete g;
if (!_data) return;
@@ -807,7 +807,7 @@ void TabView::readViewConfig(KConfig* c,
}
void TabView::saveViewConfig(KConfig* c,
- QString prefix, QString postfix,
+ TQString prefix, TQString postfix,
bool withOptions)
{
KConfigGroup g(c, (prefix+postfix).ascii());
@@ -816,28 +816,28 @@ void TabView::saveViewConfig(KConfig* c,
g.writeEntry("LeftSizes", _leftSplitter->sizes());
g.writeEntry("BottomSizes", _bottomSplitter->sizes());
- QString a;
+ TQString a;
if ((_topTW->count()>0) &&
(_topTW->isTabEnabled(_topTW->currentPage())))
- a = QString(_topTW->currentPage()->name());
+ a = TQString(_topTW->currentPage()->name());
g.writeEntry("ActiveTop", a);
a.setLength(0);
if ((_bottomTW->count()>0) &&
(_bottomTW->isTabEnabled(_bottomTW->currentPage())))
- a = QString(_bottomTW->currentPage()->name());
+ a = TQString(_bottomTW->currentPage()->name());
g.writeEntry("ActiveBottom", a);
a.setLength(0);
if ((_leftTW->count()>0) &&
(_leftTW->isTabEnabled(_leftTW->currentPage())))
- a = QString(_leftTW->currentPage()->name());
+ a = TQString(_leftTW->currentPage()->name());
g.writeEntry("ActiveLeft", a);
a.setLength(0);
if ((_rightTW->count()>0) &&
(_rightTW->isTabEnabled(_rightTW->currentPage())))
- a = QString(_rightTW->currentPage()->name());
+ a = TQString(_rightTW->currentPage()->name());
g.writeEntry("ActiveRight", a);
if (withOptions)
@@ -852,24 +852,24 @@ void TabView::saveViewConfig(KConfig* c,
}
}
- QStringList topList, bottomList, leftList, rightList;
+ TQStringList topList, bottomList, leftList, rightList;
TraceItemView *v;
for (v=_tabs.first();v;v=_tabs.next()) {
switch(v->position()) {
case TraceItemView::Top:
- topList << QString(v->widget()->name());
+ topList << TQString(v->widget()->name());
break;
case TraceItemView::Bottom:
- bottomList << QString(v->widget()->name());
+ bottomList << TQString(v->widget()->name());
break;
case TraceItemView::Left:
- leftList << QString(v->widget()->name());
+ leftList << TQString(v->widget()->name());
break;
case TraceItemView::Right:
- rightList << QString(v->widget()->name());
+ rightList << TQString(v->widget()->name());
break;
default: break;
@@ -883,7 +883,7 @@ void TabView::saveViewConfig(KConfig* c,
if (withOptions)
for (v=_tabs.first();v;v=_tabs.next())
- v->saveViewConfig(c, QString("%1-%2").arg(prefix)
+ v->saveViewConfig(c, TQString("%1-%2").arg(prefix)
.arg(v->widget()->name()), postfix, true);
}
diff --git a/kcachegrind/kcachegrind/tabview.h b/kcachegrind/kcachegrind/tabview.h
index a9ca5e31..d48c891d 100644
--- a/kcachegrind/kcachegrind/tabview.h
+++ b/kcachegrind/kcachegrind/tabview.h
@@ -24,10 +24,10 @@
#ifndef TABVIEW_H
#define TABVIEW_H
-#include <qptrlist.h>
-#include <qwidget.h>
-#include <qtabwidget.h>
-#include <qtabbar.h>
+#include <tqptrlist.h>
+#include <tqwidget.h>
+#include <tqtabwidget.h>
+#include <tqtabbar.h>
#include <ksqueezedtextlabel.h>
#include "traceitemview.h"
@@ -35,19 +35,19 @@ class QSplitter;
class TabView;
/**
- * Subclass of QTabBar to enable context menu on tabs
+ * Subclass of TQTabBar to enable context menu on tabs
*/
class TabBar : public QTabBar
{
Q_OBJECT
public:
- TabBar(TabView*, QTabWidget* parent, const char *name = 0);
+ TabBar(TabView*, TQTabWidget* parent, const char *name = 0);
protected:
- void mousePressEvent(QMouseEvent *e);
+ void mousePressEvent(TQMouseEvent *e);
private:
- QTabWidget* _tabWidget;
+ TQTabWidget* _tabWidget;
TabView* _tabView;
};
@@ -63,18 +63,18 @@ class Splitter: public QSplitter
Q_OBJECT
public:
- Splitter(Orientation o, QWidget* parent = 0, const char* name = 0);
+ Splitter(Orientation o, TQWidget* parent = 0, const char* name = 0);
void checkVisiblity();
protected:
- void moveEvent(QMoveEvent *);
+ void moveEvent(TQMoveEvent *);
};
/**
* Own TabView:
- * - A QTabWidget able to track its visible rect via resizeEvents.
- * This is needed to track if this widget is collapsed in a QSplitter.
+ * - A TQTabWidget able to track its visible rect via resizeEvents.
+ * This is needed to track if this widget is collapsed in a TQSplitter.
* - Use own TabBar for context menu
*/
class TabWidget: public QTabWidget
@@ -83,7 +83,7 @@ class TabWidget: public QTabWidget
public:
- TabWidget(TabView*, QWidget* parent = 0,
+ TabWidget(TabView*, TQWidget* parent = 0,
const char* name = 0, WFlags f = 0);
bool hasVisibleRect() { return _hasVisibleRect; }
@@ -93,10 +93,10 @@ signals:
void visibleRectChanged(TabWidget*);
protected:
- void resizeEvent(QResizeEvent *);
- void showEvent(QShowEvent *);
- void hideEvent(QHideEvent *);
- void moveEvent(QMoveEvent *);
+ void resizeEvent(TQResizeEvent *);
+ void showEvent(TQShowEvent *);
+ void hideEvent(TQHideEvent *);
+ void moveEvent(TQMoveEvent *);
private:
bool _hasVisibleRect;
@@ -104,17 +104,17 @@ private:
-class TabView : public QWidget, public TraceItemView
+class TabView : public TQWidget, public TraceItemView
{
Q_OBJECT
public:
TabView(TraceItemView* parentView,
- QWidget* parent = 0, const char* name = 0);
+ TQWidget* parent = 0, const char* name = 0);
- virtual QWidget* widget() { return this; }
- QString whatsThis() const ;
+ virtual TQWidget* widget() { return this; }
+ TQString whatsThis() const ;
void setData(TraceData*);
bool isViewVisible() const { return !_isCollapsed; }
void selected(TraceItemView*, TraceItem*);
@@ -125,29 +125,29 @@ public:
* Rearrange tabs
* if <w> == 0, move hidden tabs
*/
- void moveTab(QWidget* w, Position, bool wholeArea = false);
+ void moveTab(TQWidget* w, Position, bool wholeArea = false);
- Position tabPosition(QWidget*);
+ Position tabPosition(TQWidget*);
int visibleTabs();
int visibleAreas();
- void readViewConfig(KConfig*, QString prefix, QString postfix, bool);
- void saveViewConfig(KConfig*, QString prefix, QString postfix, bool);
+ void readViewConfig(KConfig*, TQString prefix, TQString postfix, bool);
+ void saveViewConfig(KConfig*, TQString prefix, TQString postfix, bool);
public slots:
- void tabChanged(QWidget*);
+ void tabChanged(TQWidget*);
void visibleRectChangedSlot(TabWidget*);
signals:
void activated(TabView*);
protected:
- void resizeEvent(QResizeEvent *);
- bool eventFilter(QObject*, QEvent*);
- void mousePressEvent(QMouseEvent*);
+ void resizeEvent(TQResizeEvent *);
+ bool eventFilter(TQObject*, TQEvent*);
+ void mousePressEvent(TQMouseEvent*);
private:
- TraceItemView* addTab(QString, TraceItemView*);
+ TraceItemView* addTab(TQString, TraceItemView*);
void addTop(TraceItemView*);
void addBottom(TraceItemView*);
TabWidget* tabWidget(Position);
@@ -159,11 +159,11 @@ private:
bool _isCollapsed;
KSqueezedTextLabel* _nameLabel;
- QSplitter *_mainSplitter, *_leftSplitter, *_bottomSplitter;
+ TQSplitter *_mainSplitter, *_leftSplitter, *_bottomSplitter;
TabWidget *_topTW, *_leftTW, *_bottomTW, *_rightTW;
- QPtrList<TraceItemView> _tabs;
+ TQPtrList<TraceItemView> _tabs;
- QWidget* _lastFocus;
+ TQWidget* _lastFocus;
bool _active;
};
diff --git a/kcachegrind/kcachegrind/toplevel.cpp b/kcachegrind/kcachegrind/toplevel.cpp
index 8bb2835c..4749f604 100644
--- a/kcachegrind/kcachegrind/toplevel.cpp
+++ b/kcachegrind/kcachegrind/toplevel.cpp
@@ -25,19 +25,19 @@
#include <stdlib.h> // for system()
-#include <qvbox.h>
-#include <qtimer.h>
-#include <qwhatsthis.h>
-#include <qlineedit.h>
-#include <qtextstream.h>
-#include <qsizepolicy.h>
-#include <qprogressbar.h>
-#include <qfile.h>
+#include <tqvbox.h>
+#include <tqtimer.h>
+#include <tqwhatsthis.h>
+#include <tqlineedit.h>
+#include <tqtextstream.h>
+#include <tqsizepolicy.h>
+#include <tqprogressbar.h>
+#include <tqfile.h>
// With Qt 3.1, we can disallow user interaction with long tasks.
-// This needs QEventLoop. Otherwise, QApplication::processEvents is used.
+// This needs TQEventLoop. Otherwise, TQApplication::processEvents is used.
#if (QT_VERSION-0 >= 0x030100)
-#include <qeventloop.h>
+#include <tqeventloop.h>
#endif
#include <kapplication.h>
@@ -87,24 +87,24 @@ TopLevel::TopLevel(const char *name)
_stackDockShown->setChecked(!_stackDock->isHidden());
_functionDockShown->setChecked(!_functionDock->isHidden());
- connect(_partDock, SIGNAL(visibilityChanged(bool)),
- this, SLOT(partVisibilityChanged(bool)));
- connect(_stackDock, SIGNAL(visibilityChanged(bool)),
- this, SLOT(stackVisibilityChanged(bool)));
- connect(_functionDock, SIGNAL(visibilityChanged(bool)),
- this, SLOT(functionVisibilityChanged(bool)));
+ connect(_partDock, TQT_SIGNAL(visibilityChanged(bool)),
+ this, TQT_SLOT(partVisibilityChanged(bool)));
+ connect(_stackDock, TQT_SIGNAL(visibilityChanged(bool)),
+ this, TQT_SLOT(stackVisibilityChanged(bool)));
+ connect(_functionDock, TQT_SIGNAL(visibilityChanged(bool)),
+ this, TQT_SLOT(functionVisibilityChanged(bool)));
#if ENABLE_DUMPDOCK
_dumpDockShown->setChecked(!_dumpDock->isHidden());
- connect(_dumpDock, SIGNAL(visibilityChanged(bool)),
- this, SLOT(dumpVisibilityChanged(bool)));
+ connect(_dumpDock, TQT_SIGNAL(visibilityChanged(bool)),
+ this, TQT_SLOT(dumpVisibilityChanged(bool)));
#endif
_statusbar = statusBar();
- _statusLabel = new QLabel(_statusbar);
+ _statusLabel = new TQLabel(_statusbar);
#if 0
// how to do avoid main window resizing on large statusbar label?
- QSizePolicy p(QSizePolicy::Fixed, QSizePolicy::Expanding);
+ TQSizePolicy p(TQSizePolicy::Fixed, TQSizePolicy::Expanding);
_statusLabel->setSizePolicy(p);
_statusbar->setSizePolicy(p);
#endif
@@ -135,11 +135,11 @@ TopLevel::TopLevel(const char *name)
setAutoSaveSettings();
// restore current state settings (not configuration options)
- restoreCurrentState(QString::null);
+ restoreCurrentState(TQString::null);
// if this is the first toplevel, show tip of day
if (memberList->count() == 1)
- QTimer::singleShot( 200, this, SLOT(slotShowTipOnStart()) );
+ TQTimer::singleShot( 200, this, TQT_SLOT(slotShowTipOnStart()) );
}
void TopLevel::init()
@@ -178,23 +178,23 @@ void TopLevel::setupPartSelection(PartSelection* ps)
{
// setup connections from the part selection widget
- connect(ps, SIGNAL(activePartsChanged(const TracePartList&)),
- this, SLOT(activePartsChangedSlot(const TracePartList&)));
- connect(ps, SIGNAL(groupChanged(TraceCostItem*)),
- this, SLOT(setGroupDelayed(TraceCostItem*)));
- connect(ps, SIGNAL(functionChanged(TraceItem*)),
- this, SLOT(setTraceItemDelayed(TraceItem*)));
+ connect(ps, TQT_SIGNAL(activePartsChanged(const TracePartList&)),
+ this, TQT_SLOT(activePartsChangedSlot(const TracePartList&)));
+ connect(ps, TQT_SIGNAL(groupChanged(TraceCostItem*)),
+ this, TQT_SLOT(setGroupDelayed(TraceCostItem*)));
+ connect(ps, TQT_SIGNAL(functionChanged(TraceItem*)),
+ this, TQT_SLOT(setTraceItemDelayed(TraceItem*)));
- connect(ps, SIGNAL(goBack()),
- _stackSelection, SLOT(browserBack()));
+ connect(ps, TQT_SIGNAL(goBack()),
+ _stackSelection, TQT_SLOT(browserBack()));
- connect(ps, SIGNAL(partsHideSelected()),
- this, SLOT(partsHideSelectedSlotDelayed()));
- connect(ps, SIGNAL(partsUnhideAll()),
- this, SLOT(partsUnhideAllSlotDelayed()));
+ connect(ps, TQT_SIGNAL(partsHideSelected()),
+ this, TQT_SLOT(partsHideSelectedSlotDelayed()));
+ connect(ps, TQT_SIGNAL(partsUnhideAll()),
+ this, TQT_SLOT(partsUnhideAllSlotDelayed()));
- connect(ps, SIGNAL(showMessage(const QString&, int)),
- _statusbar, SLOT(message(const QString&, int)));
+ connect(ps, TQT_SIGNAL(showMessage(const TQString&, int)),
+ _statusbar, TQT_SLOT(message(const TQString&, int)));
}
/**
@@ -204,22 +204,22 @@ void TopLevel::setupPartSelection(PartSelection* ps)
* No positions are saved. These is done automatically for
* KToolbar, and manually in queryExit() for QT docks.
*/
-void TopLevel::saveCurrentState(QString postfix)
+void TopLevel::saveCurrentState(TQString postfix)
{
KConfig* kconfig = KGlobal::config();
- QCString pf = postfix.ascii();
+ TQCString pf = postfix.ascii();
- KConfigGroup psConfig(kconfig, QCString("PartOverview")+pf);
+ KConfigGroup psConfig(kconfig, TQCString("PartOverview")+pf);
_partSelection->saveVisualisationConfig(&psConfig);
- KConfigGroup stateConfig(kconfig, QCString("CurrentState")+pf);
+ KConfigGroup stateConfig(kconfig, TQCString("CurrentState")+pf);
stateConfig.writeEntry("CostType",
- _costType ? _costType->name() : QString("?"));
+ _costType ? _costType->name() : TQString("?"));
stateConfig.writeEntry("CostType2",
- _costType2 ? _costType2->name() : QString("?"));
+ _costType2 ? _costType2->name() : TQString("?"));
stateConfig.writeEntry("GroupType", TraceItem::typeName(_groupType));
- _multiView->saveViewConfig(kconfig, QString("MainView"), postfix, true);
+ _multiView->saveViewConfig(kconfig, TQString("MainView"), postfix, true);
}
/**
@@ -228,25 +228,25 @@ void TopLevel::saveCurrentState(QString postfix)
*/
void TopLevel::saveTraceSettings()
{
- QString key = traceKey();
+ TQString key = traceKey();
- KConfigGroup pConfig(KGlobal::config(), QCString("TracePositions"));
- pConfig.writeEntry(QString("CostType%1").arg(key),
- _costType ? _costType->name() : QString("?"));
- pConfig.writeEntry(QString("CostType2%1").arg(key),
- _costType2 ? _costType2->name() : QString("?"));
- pConfig.writeEntry(QString("GroupType%1").arg(key),
+ KConfigGroup pConfig(KGlobal::config(), TQCString("TracePositions"));
+ pConfig.writeEntry(TQString("CostType%1").arg(key),
+ _costType ? _costType->name() : TQString("?"));
+ pConfig.writeEntry(TQString("CostType2%1").arg(key),
+ _costType2 ? _costType2->name() : TQString("?"));
+ pConfig.writeEntry(TQString("GroupType%1").arg(key),
TraceItem::typeName(_groupType));
if (!_data) return;
- KConfigGroup aConfig(KGlobal::config(), QCString("Layouts"));
- aConfig.writeEntry(QString("Count%1").arg(key), _layoutCount);
- aConfig.writeEntry(QString("Current%1").arg(key), _layoutCurrent);
+ KConfigGroup aConfig(KGlobal::config(), TQCString("Layouts"));
+ aConfig.writeEntry(TQString("Count%1").arg(key), _layoutCount);
+ aConfig.writeEntry(TQString("Current%1").arg(key), _layoutCurrent);
saveCurrentState(key);
- pConfig.writeEntry(QString("Group%1").arg(key),
- _group ? _group->name() : QString::null);
+ pConfig.writeEntry(TQString("Group%1").arg(key),
+ _group ? _group->name() : TQString::null);
}
/**
@@ -256,19 +256,19 @@ void TopLevel::saveTraceSettings()
* This does NOT restore any positions. This is done automatically for
* KToolbar, and manually in the createDocks() for QT docks..
*/
-void TopLevel::restoreCurrentState(QString postfix)
+void TopLevel::restoreCurrentState(TQString postfix)
{
KConfig* kconfig = KGlobal::config();
- QStringList gList = kconfig->groupList();
- QCString pf = postfix.ascii();
+ TQStringList gList = kconfig->groupList();
+ TQCString pf = postfix.ascii();
// dock properties (not position, this should be have done before)
- QCString group = QCString("PartOverview");
+ TQCString group = TQCString("PartOverview");
if (gList.contains(group+pf)) group += pf;
KConfigGroup psConfig(kconfig, group);
_partSelection->readVisualisationConfig(&psConfig);
- _multiView->readViewConfig(kconfig, QString("MainView"), postfix, true);
+ _multiView->readViewConfig(kconfig, TQString("MainView"), postfix, true);
_taSplit->setChecked(_multiView->childCount()>1);
_taSplitDir->setEnabled(_multiView->childCount()>1);
_taSplitDir->setChecked(_multiView->orientation() == Qt::Horizontal);
@@ -277,14 +277,14 @@ void TopLevel::restoreCurrentState(QString postfix)
void TopLevel::createDocks()
{
- _partDock = new QDockWindow(QDockWindow::InDock, this);
+ _partDock = new TQDockWindow(TQDockWindow::InDock, this);
_partDock->setCaption(i18n("Parts Overview"));
- _partDock->setCloseMode( QDockWindow::Always );
+ _partDock->setCloseMode( TQDockWindow::Always );
_partSelection = new PartSelection(_partDock, "partSelection");
_partDock->setWidget(_partSelection);
_partDock->setResizeEnabled(true);
_partDock->setFixedExtentWidth(200);
- QWhatsThis::add( _partSelection, i18n(
+ TQWhatsThis::add( _partSelection, i18n(
"<b>The Parts Overview</b>"
"<p>A trace consists of multiple trace parts when "
"there are several profile data files from one profile run. "
@@ -308,15 +308,15 @@ void TopLevel::createDocks()
"This is split up into smaller rectangles to show the costs of its "
"callees.</li></ul></p>"));
- _stackDock = new QDockWindow(QDockWindow::InDock, this);
+ _stackDock = new TQDockWindow(TQDockWindow::InDock, this);
_stackDock->setResizeEnabled(true);
// Why is the caption only correct with a close button?
- _stackDock->setCloseMode( QDockWindow::Always );
+ _stackDock->setCloseMode( TQDockWindow::Always );
_stackSelection = new StackSelection(_stackDock, "stackSelection");
_stackDock->setWidget(_stackSelection);
_stackDock->setFixedExtentWidth(200);
_stackDock->setCaption(i18n("Top Cost Call Stack"));
- QWhatsThis::add( _stackSelection, i18n(
+ TQWhatsThis::add( _stackSelection, i18n(
"<b>The Top Cost Call Stack</b>"
"<p>This is a purely fictional 'most probable' call stack. "
"It is built up by starting with the current selected "
@@ -326,12 +326,12 @@ void TopLevel::createDocks()
"cost used for all calls from the function in the line "
"above.</p>"));
- connect(_stackSelection, SIGNAL(functionSelected(TraceItem*)),
- this, SLOT(setTraceItemDelayed(TraceItem*)));
+ connect(_stackSelection, TQT_SIGNAL(functionSelected(TraceItem*)),
+ this, TQT_SLOT(setTraceItemDelayed(TraceItem*)));
- _functionDock = new QDockWindow(QDockWindow::InDock, this);
+ _functionDock = new TQDockWindow(TQDockWindow::InDock, this);
_functionDock->setCaption(i18n("Flat Profile"));
- _functionDock->setCloseMode( QDockWindow::Always );
+ _functionDock->setCloseMode( TQDockWindow::Always );
_functionSelection = new FunctionSelection(this, _functionDock,
"functionSelection");
_functionSelection->setTopLevel(this);
@@ -339,7 +339,7 @@ void TopLevel::createDocks()
_functionDock->setWidget(_functionSelection);
_functionDock->setResizeEnabled(true);
_functionDock->setFixedExtentWidth(200);
- QWhatsThis::add( _functionSelection, i18n(
+ TQWhatsThis::add( _functionSelection, i18n(
"<b>The Flat Profile</b>"
"<p>The flat profile contains a group and a function "
"selection list. The group list contains all groups "
@@ -353,9 +353,9 @@ void TopLevel::createDocks()
"costs less than 1% are hidden on default.</p>"));
#if ENABLE_DUMPDOCK
- _dumpDock = new QDockWindow(QDockWindow::InDock, this);
+ _dumpDock = new TQDockWindow(TQDockWindow::InDock, this);
_dumpDock->setCaption(i18n("Profile Dumps"));
- _dumpDock->setCloseMode( QDockWindow::Always );
+ _dumpDock->setCloseMode( TQDockWindow::Always );
_dumpSelection = new DumpSelection(this, _dumpDock,
"dumpSelection");
_dumpSelection->setTopLevel(this);
@@ -363,7 +363,7 @@ void TopLevel::createDocks()
_dumpDock->setWidget(_dumpSelection);
_dumpDock->setResizeEnabled(true);
_dumpDock->setFixedExtentWidth(200);
- QWhatsThis::add( _dumpSelection, i18n(
+ TQWhatsThis::add( _dumpSelection, i18n(
"<b>Profile Dumps</b>"
"<p>This dockable shows in the top part the list of "
"loadable profile dumps in all subdirectories of: "
@@ -393,8 +393,8 @@ void TopLevel::createDocks()
#endif
// Restore QT Dock positions...
- KConfigGroup dockConfig(KGlobal::config(), QCString("Docks"));
- QString str = dockConfig.readEntry("Position", QString::null);
+ KConfigGroup dockConfig(KGlobal::config(), TQCString("Docks"));
+ TQString str = dockConfig.readEntry("Position", TQString::null);
if (0) qDebug("Docks/Position: '%s'", str.ascii());
if (str.isEmpty()) {
// default positions
@@ -408,7 +408,7 @@ void TopLevel::createDocks()
#endif
}
else {
- QTextStream ts( &str, IO_ReadOnly );
+ TQTextStream ts( &str, IO_ReadOnly );
ts >> *this;
}
_forcePartDock = dockConfig.readBoolEntry("ForcePartDockVisible", false);
@@ -420,8 +420,8 @@ void TopLevel::createDocks()
setAppropriate(_dumpDock, true);
setAppropriate(_functionDock, true);
- connect( _partDock, SIGNAL(contextMenuRequested(const QPoint &)),
- this, SLOT(showDockMenu(const QPoint &)));
+ connect( _partDock, TQT_SIGNAL(contextMenuRequested(const TQPoint &)),
+ this, TQT_SLOT(showDockMenu(const TQPoint &)));
#endif
}
@@ -439,7 +439,7 @@ void TopLevel::saveProperties(KConfig* c)
void TopLevel::readProperties(KConfig* c)
{
- QString traceName = c->readEntry("TraceName");
+ TQString traceName = c->readEntry("TraceName");
if (!traceName.isEmpty()) {
TraceData* d = new TraceData(this);
d->load(traceName);
@@ -449,19 +449,19 @@ void TopLevel::readProperties(KConfig* c)
void TopLevel::createLayoutActions()
{
- QString hint;
+ TQString hint;
KAction* action;
action = new KAction( i18n( "&Duplicate" ),
KShortcut(KKey("Ctrl+Plus")),
- this, SLOT(layoutDuplicate()),
+ this, TQT_SLOT(layoutDuplicate()),
actionCollection(), "layout_duplicate" );
hint = i18n("<b>Duplicate Current Layout</b>"
"<p>Make a copy of the current layout.</p>");
action->setWhatsThis( hint );
action = new KAction( i18n( "&Remove" ), KShortcut(),
- this, SLOT(layoutRemove()),
+ this, TQT_SLOT(layoutRemove()),
actionCollection(), "layout_remove" );
hint = i18n("<b>Remove Current Layout</b>"
"<p>Delete current layout and make the previous active.</p>");
@@ -469,26 +469,26 @@ void TopLevel::createLayoutActions()
action = new KAction( i18n( "&Go to Next" ),
KShortcut(KKey("Ctrl+Right")),
- this, SLOT(layoutNext()),
+ this, TQT_SLOT(layoutNext()),
actionCollection(), "layout_next" );
hint = i18n("Go to Next Layout");
action->setWhatsThis( hint );
action = new KAction( i18n( "&Go to Previous" ),
KShortcut(KKey("Ctrl+Left")),
- this, SLOT(layoutPrevious()),
+ this, TQT_SLOT(layoutPrevious()),
actionCollection(), "layout_previous" );
hint = i18n("Go to Previous Layout");
action->setWhatsThis( hint );
action = new KAction( i18n( "&Restore to Default" ), KShortcut(),
- this, SLOT(layoutRestore()),
+ this, TQT_SLOT(layoutRestore()),
actionCollection(), "layout_restore" );
hint = i18n("Restore Layouts to Default");
action->setWhatsThis( hint );
action = new KAction( i18n( "&Save as Default" ), KShortcut(),
- this, SLOT(layoutSave()),
+ this, TQT_SLOT(layoutSave()),
actionCollection(), "layout_save" );
hint = i18n("Save Layouts as Default");
action->setWhatsThis( hint );
@@ -497,15 +497,15 @@ void TopLevel::createLayoutActions()
// TODO: split this up...
void TopLevel::createMiscActions()
{
- QString hint;
+ TQString hint;
KAction* action;
- action = KStdAction::openNew(this, SLOT(newWindow()), actionCollection());
+ action = KStdAction::openNew(this, TQT_SLOT(newWindow()), actionCollection());
hint = i18n("<b>New</b><p>Open new empty KCachegrind window.</p>");
action->setWhatsThis( hint );
action = new KAction( i18n( "&Add..." ), KShortcut(),
- this, SLOT(addTrace()),
+ this, TQT_SLOT(addTrace()),
actionCollection(), "file_add" );
hint = i18n("<b>Add Profile Data</b>"
"<p>This opens an additional profile data file in the current window.</p>");
@@ -518,13 +518,13 @@ void TopLevel::createMiscActions()
#else
KStdAccel::key(KStdAccel::Reload),
#endif
- this, SLOT( reload() ), actionCollection(), "reload" );
+ this, TQT_SLOT( reload() ), actionCollection(), "reload" );
hint = i18n("<b>Reload Profile Data</b>"
"<p>This loads any new created parts, too.</p>");
action->setWhatsThis( hint );
action = new KAction( i18n( "&Export Graph" ), KShortcut(),
- this, SLOT(exportGraph()),
+ this, TQT_SLOT(exportGraph()),
actionCollection(), "export" );
hint = i18n("<b>Export Call Graph</b>"
@@ -540,7 +540,7 @@ void TopLevel::createMiscActions()
#else
KStdAccel::key(KStdAccel::Redo),
#endif
- this, SLOT( forceTrace() ),
+ this, TQT_SLOT( forceTrace() ),
actionCollection(), "dump" );
hint = i18n("<b>Force Dump</b>"
"<p>This forces a dump for a Callgrind profile run "
@@ -566,20 +566,20 @@ void TopLevel::createMiscActions()
"of the program.</p>");
_taDump->setWhatsThis( hint );
- action = KStdAction::open(this, SLOT(loadTrace()), actionCollection());
+ action = KStdAction::open(this, TQT_SLOT(loadTrace()), actionCollection());
hint = i18n("<b>Open Profile Data</b>"
"<p>This opens a profile data file, with possible multiple parts</p>");
action->setToolTip( hint );
action->setWhatsThis( hint );
- _openRecent = KStdAction::openRecent(this, SLOT(loadTrace(const KURL&)),
+ _openRecent = KStdAction::openRecent(this, TQT_SLOT(loadTrace(const KURL&)),
actionCollection());
KStdAction::showStatusbar(this,
- SLOT(toggleStatusBar()), actionCollection());
+ TQT_SLOT(toggleStatusBar()), actionCollection());
_partDockShown = new KToggleAction(i18n("Parts Overview"), KShortcut(),
- this, SLOT(togglePartDock()),
+ this, TQT_SLOT(togglePartDock()),
actionCollection(),
"settings_show_partdock");
@@ -588,7 +588,7 @@ void TopLevel::createMiscActions()
_partDockShown->setWhatsThis( hint );
_stackDockShown = new KToggleAction(i18n("Call Stack"), KShortcut(),
- this, SLOT(toggleStackDock()),
+ this, TQT_SLOT(toggleStackDock()),
actionCollection(),
"settings_show_stackdock");
@@ -597,7 +597,7 @@ void TopLevel::createMiscActions()
_stackDockShown->setWhatsThis( hint );
_functionDockShown = new KToggleAction(i18n("Function Profile"), KShortcut(),
- this, SLOT(toggleFunctionDock()),
+ this, TQT_SLOT(toggleFunctionDock()),
actionCollection(),
"settings_show_profiledock");
@@ -607,7 +607,7 @@ void TopLevel::createMiscActions()
#if ENABLE_DUMPDOCK
_dumpDockShown = new KToggleAction(i18n("Profile Dumps"), KShortcut(),
- this, SLOT(toggleDumpDock()),
+ this, TQT_SLOT(toggleDumpDock()),
actionCollection(),
"settings_show_dumpdock");
@@ -618,7 +618,7 @@ void TopLevel::createMiscActions()
_taPercentage = new KToggleAction(i18n("Show Relative Costs"), "percent",
KShortcut(),
- this, SLOT(togglePercentage()),
+ this, TQT_SLOT(togglePercentage()),
actionCollection(),
"view_percentage");
#if KDE_VERSION >= 0x030290
@@ -632,7 +632,7 @@ void TopLevel::createMiscActions()
_taExpanded = new KToggleAction(i18n("Percentage Relative to Parent"), "move",
KShortcut(),
- this, SLOT(toggleExpanded()),
+ this, TQT_SLOT(toggleExpanded()),
actionCollection(),
"view_expanded");
@@ -657,7 +657,7 @@ void TopLevel::createMiscActions()
_taCycles = new KToggleAction( i18n( "Do Cycle Detection" ), "undo",
KShortcut(),
- this, SLOT( toggleCycles() ), actionCollection(),
+ this, TQT_SLOT( toggleCycles() ), actionCollection(),
"view_cycles" );
#if KDE_VERSION >= 0x030290
// for KDE 3.3: show another text instead of a checkmark
@@ -678,25 +678,25 @@ void TopLevel::createMiscActions()
"is the option to switch this off.");
_taCycles->setWhatsThis( hint );
- KStdAction::quit(this, SLOT(close()), actionCollection());
- KStdAction::preferences(this, SLOT(configure()), actionCollection());
- KStdAction::keyBindings(this, SLOT(configureKeys()), actionCollection());
- KStdAction::configureToolbars(this,SLOT(configureToolbars()),
+ KStdAction::quit(this, TQT_SLOT(close()), actionCollection());
+ KStdAction::preferences(this, TQT_SLOT(configure()), actionCollection());
+ KStdAction::keyBindings(this, TQT_SLOT(configureKeys()), actionCollection());
+ KStdAction::configureToolbars(this,TQT_SLOT(configureToolbars()),
actionCollection());
#if 0
- action = KStdAction::back(_stackSelection, SLOT(browserBack()),
+ action = KStdAction::back(_stackSelection, TQT_SLOT(browserBack()),
actionCollection());
hint = i18n("Go back in function selection history");
action->setToolTip( hint );
action->setWhatsThis( hint );
- action = KStdAction::forward(_stackSelection, SLOT(browserForward()),
+ action = KStdAction::forward(_stackSelection, TQT_SLOT(browserForward()),
actionCollection());
hint = i18n("Go forward in function selection history");
action->setToolTip( hint );
action->setWhatsThis( hint );
- action = KStdAction::up(_stackSelection, SLOT(browserUp()),
+ action = KStdAction::up(_stackSelection, TQT_SLOT(browserUp()),
actionCollection());
hint = i18n("<b>Go Up</b>"
"<p>Go to last selected caller of current function. "
@@ -706,12 +706,12 @@ void TopLevel::createMiscActions()
#else
_paUp = new KToolBarPopupAction( i18n( "&Up" ), "up",
ALT+Key_Up,
- _stackSelection, SLOT( browserUp() ),
+ _stackSelection, TQT_SLOT( browserUp() ),
actionCollection(), "go_up" );
- connect( _paUp->popupMenu(), SIGNAL( aboutToShow() ),
- this, SLOT( upAboutToShow() ) );
- connect( _paUp->popupMenu(), SIGNAL( activated( int ) ),
- this, SLOT( upActivated( int ) ) );
+ connect( _paUp->popupMenu(), TQT_SIGNAL( aboutToShow() ),
+ this, TQT_SLOT( upAboutToShow() ) );
+ connect( _paUp->popupMenu(), TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( upActivated( int ) ) );
hint = i18n("<b>Go Up</b>"
"<p>Go to last selected caller of current function. "
"If no caller was visited, use that with highest cost.</p>");
@@ -720,24 +720,24 @@ void TopLevel::createMiscActions()
QPair< KGuiItem, KGuiItem > backForward = KStdGuiItem::backAndForward();
_paBack = new KToolBarPopupAction( backForward.first, ALT+Key_Left,
- _stackSelection, SLOT(browserBack()),
+ _stackSelection, TQT_SLOT(browserBack()),
actionCollection(), "go_back" );
- connect( _paBack->popupMenu(), SIGNAL( aboutToShow() ),
- this, SLOT( backAboutToShow() ) );
- connect( _paBack->popupMenu(), SIGNAL( activated( int ) ),
- this, SLOT( backActivated( int ) ) );
+ connect( _paBack->popupMenu(), TQT_SIGNAL( aboutToShow() ),
+ this, TQT_SLOT( backAboutToShow() ) );
+ connect( _paBack->popupMenu(), TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( backActivated( int ) ) );
hint = i18n("Go back in function selection history");
_paBack->setToolTip( hint );
_paBack->setWhatsThis( hint );
_paForward = new KToolBarPopupAction( backForward.second, ALT+Key_Right,
_stackSelection,
- SLOT(browserForward()),
+ TQT_SLOT(browserForward()),
actionCollection(), "go_forward" );
- connect( _paForward->popupMenu(), SIGNAL( aboutToShow() ),
- this, SLOT( forwardAboutToShow() ) );
- connect( _paForward->popupMenu(), SIGNAL( activated( int ) ),
- this, SLOT( forwardActivated( int ) ) );
+ connect( _paForward->popupMenu(), TQT_SIGNAL( aboutToShow() ),
+ this, TQT_SLOT( forwardAboutToShow() ) );
+ connect( _paForward->popupMenu(), TQT_SIGNAL( activated( int ) ),
+ this, TQT_SLOT( forwardActivated( int ) ) );
hint = i18n("Go forward in function selection history");
_paForward->setToolTip( hint );
_paForward->setWhatsThis( hint );
@@ -752,8 +752,8 @@ void TopLevel::createMiscActions()
// cost types are dependent on loaded data, thus KSelectAction
// is filled in setData()
- connect( _saCost, SIGNAL(activated(const QString&)),
- this, SLOT(costTypeSelected(const QString&)));
+ connect( _saCost, TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(costTypeSelected(const TQString&)));
_saCost2 = new KSelectAction( i18n("Secondary Event Type"), KShortcut(),
actionCollection(), "view_cost_type2");
@@ -762,8 +762,8 @@ void TopLevel::createMiscActions()
_saCost2->setToolTip( hint );
_saCost2->setWhatsThis( hint );
- connect( _saCost2, SIGNAL(activated(const QString&)),
- this, SLOT(costType2Selected(const QString&)));
+ connect( _saCost2, TQT_SIGNAL(activated(const TQString&)),
+ this, TQT_SLOT(costType2Selected(const TQString&)));
saGroup = new KSelectAction( i18n("Grouping"), KShortcut(),
actionCollection(), "view_group_type");
@@ -772,7 +772,7 @@ void TopLevel::createMiscActions()
saGroup->setToolTip( hint );
saGroup->setWhatsThis( hint );
- QStringList args;
+ TQStringList args;
args << i18n("(No Grouping)")
<< TraceCost::i18nTypeName(TraceItem::Object)
@@ -781,11 +781,11 @@ void TopLevel::createMiscActions()
<< TraceCost::i18nTypeName(TraceItem::FunctionCycle);
saGroup->setItems(args);
- connect( saGroup, SIGNAL(activated(int)),
- this, SLOT(groupTypeSelected(int)));
+ connect( saGroup, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(groupTypeSelected(int)));
_taSplit = new KToggleAction(i18n("Split"), "view_left_right", KShortcut(),
- this, SLOT(splitSlot()),
+ this, TQT_SLOT(splitSlot()),
actionCollection(), "view_split");
hint = i18n("Show two information panels");
@@ -794,7 +794,7 @@ void TopLevel::createMiscActions()
_taSplitDir = new KToggleAction(i18n("Split Horizontal"),
"view_left_right", KShortcut(),
- this, SLOT(splitDirSlot()),
+ this, TQT_SLOT(splitDirSlot()),
actionCollection(), "view_split_dir");
hint = i18n("Change Split Orientation when main window is split.");
@@ -803,11 +803,11 @@ void TopLevel::createMiscActions()
// copied from KMail...
#if KDE_VERSION >= 308 // KDE 3.1
- KStdAction::tipOfDay( this, SLOT( slotShowTip() ), actionCollection() );
+ KStdAction::tipOfDay( this, TQT_SLOT( slotShowTip() ), actionCollection() );
#else
(void) new KAction( KGuiItem( i18n("Tip of the &Day..."), "idea",
i18n("Show \"Tip of the Day\"") ),
- 0, this, SLOT(slotShowTip()),
+ 0, this, TQT_SLOT(slotShowTip()),
actionCollection(), "help_show_tip" );
#endif
}
@@ -1020,7 +1020,7 @@ void TopLevel::loadTrace(const KURL& url)
if (url.isEmpty()) return;
// network transparancy
- QString tmpFile;
+ TQString tmpFile;
#if KDE_VERSION > 0x030190
// for KDE 3.2: KIO::NetAccess::download with 2 args is deprecated
if(KIO::NetAccess::download( url, tmpFile, this )) {
@@ -1035,7 +1035,7 @@ void TopLevel::loadTrace(const KURL& url)
}
}
-void TopLevel::loadTrace(QString file)
+void TopLevel::loadTrace(TQString file)
{
if (file.isEmpty()) return;
@@ -1057,7 +1057,7 @@ void TopLevel::loadTrace(QString file)
void TopLevel::addTrace()
{
- KURL url = KFileDialog::getOpenURL(QString::null,
+ KURL url = KFileDialog::getOpenURL(TQString::null,
i18n("cachegrind.out* callgrind.out*|Callgrind Profile Data\n*|All Files"),
this,
i18n("Add Callgrind Profile Data"));
@@ -1069,7 +1069,7 @@ void TopLevel::addTrace(const KURL& url)
if (url.isEmpty()) return;
// network transparancy
- QString tmpFile;
+ TQString tmpFile;
#if KDE_VERSION > 0x030190
// for KDE 3.2: KIO::NetAccess::download with 2 args is deprecated
if(KIO::NetAccess::download( url, tmpFile, this )) {
@@ -1084,7 +1084,7 @@ void TopLevel::addTrace(const KURL& url)
}
}
-void TopLevel::addTrace(QString file)
+void TopLevel::addTrace(TQString file)
{
if (file.isEmpty()) return;
@@ -1104,10 +1104,10 @@ void TopLevel::addTrace(QString file)
-void TopLevel::loadDelayed(QString file)
+void TopLevel::loadDelayed(TQString file)
{
_loadTraceDelayed = file;
- QTimer::singleShot(0, this, SLOT(loadTraceDelayed()));
+ TQTimer::singleShot(0, this, TQT_SLOT(loadTraceDelayed()));
}
void TopLevel::loadTraceDelayed()
@@ -1115,13 +1115,13 @@ void TopLevel::loadTraceDelayed()
if (_loadTraceDelayed.isEmpty()) return;
loadTrace(_loadTraceDelayed);
- _loadTraceDelayed = QString::null;
+ _loadTraceDelayed = TQString::null;
}
void TopLevel::reload()
{
- QString trace;
+ TQString trace;
if (!_data || _data->parts().count()==0)
trace = "."; // open first trace found in dir
else
@@ -1137,17 +1137,17 @@ void TopLevel::exportGraph()
{
if (!_data || !_function) return;
- QString n = QString("callgraph.dot");
+ TQString n = TQString("callgraph.dot");
GraphExporter ge(_data, _function, _costType, _groupType, n);
ge.writeDot();
- QString cmd = QString("(dot %1 -Tps > %2.ps; kghostview %3.ps)&")
+ TQString cmd = TQString("(dot %1 -Tps > %2.ps; kghostview %3.ps)&")
.arg(n).arg(n).arg(n);
- system(QFile::encodeName( cmd ));
+ system(TQFile::encodeName( cmd ));
}
-bool TopLevel::setCostType(QString s)
+bool TopLevel::setCostType(TQString s)
{
TraceCostType* ct;
@@ -1159,7 +1159,7 @@ bool TopLevel::setCostType(QString s)
return setCostType(ct);
}
-bool TopLevel::setCostType2(QString s)
+bool TopLevel::setCostType2(TQString s)
{
TraceCostType* ct;
@@ -1169,7 +1169,7 @@ bool TopLevel::setCostType2(QString s)
return setCostType2(ct);
}
-void TopLevel::costTypeSelected(const QString& s)
+void TopLevel::costTypeSelected(const TQString& s)
{
TraceCostType* ct;
@@ -1177,7 +1177,7 @@ void TopLevel::costTypeSelected(const QString& s)
setCostType(ct);
}
-void TopLevel::costType2Selected(const QString& s)
+void TopLevel::costType2Selected(const TQString& s)
{
TraceCostType* ct;
@@ -1192,8 +1192,8 @@ bool TopLevel::setCostType(TraceCostType* ct)
if (ct) {
int idx=0;
- QStringList l = _saCost->items();
- for (QStringList::Iterator it = l.begin(); it != l.end(); ++it, ++idx ) {
+ TQStringList l = _saCost->items();
+ for (TQStringList::Iterator it = l.begin(); it != l.end(); ++it, ++idx ) {
if (*it == ct->longName())
_saCost->setCurrentItem(idx);
}
@@ -1218,11 +1218,11 @@ bool TopLevel::setCostType2(TraceCostType* ct)
if (_costType2 == ct) return false;
_costType2 = ct;
- QString longName = ct ? ct->longName() : i18n("(Hidden)");
+ TQString longName = ct ? ct->longName() : i18n("(Hidden)");
int idx=0;
- QStringList l = _saCost2->items();
- for (QStringList::Iterator it = l.begin(); it != l.end(); ++it, ++idx ) {
+ TQStringList l = _saCost2->items();
+ for (TQStringList::Iterator it = l.begin(); it != l.end(); ++it, ++idx ) {
if (*it == longName)
_saCost2->setCurrentItem(idx);
}
@@ -1254,7 +1254,7 @@ void TopLevel::groupTypeSelected(int cg)
}
}
-bool TopLevel::setGroupType(QString s)
+bool TopLevel::setGroupType(TQString s)
{
TraceItem::CostType gt;
@@ -1308,7 +1308,7 @@ bool TopLevel::setGroupType(TraceItem::CostType gt)
return true;
}
-bool TopLevel::setGroup(QString s)
+bool TopLevel::setGroup(TQString s)
{
return true;
TraceCostItem* ci = _functionSelection->group(s);
@@ -1335,7 +1335,7 @@ bool TopLevel::setGroup(TraceCostItem* g)
return true;
}
-bool TopLevel::setFunction(QString s)
+bool TopLevel::setFunction(TQString s)
{
if (!_data) return false;
@@ -1386,13 +1386,13 @@ bool TopLevel::setFunction(TraceFunction* f)
void TopLevel::setCostTypeDelayed(TraceCostType* ct)
{
_costTypeDelayed = ct;
- QTimer::singleShot (0, this, SLOT(setCostTypeDelayed()));
+ TQTimer::singleShot (0, this, TQT_SLOT(setCostTypeDelayed()));
}
void TopLevel::setCostType2Delayed(TraceCostType* ct)
{
_costType2Delayed = ct;
- QTimer::singleShot (0, this, SLOT(setCostType2Delayed()));
+ TQTimer::singleShot (0, this, TQT_SLOT(setCostType2Delayed()));
}
void TopLevel::setCostTypeDelayed()
@@ -1408,7 +1408,7 @@ void TopLevel::setCostType2Delayed()
void TopLevel::setGroupTypeDelayed(TraceItem::CostType gt)
{
_groupTypeDelayed = gt;
- QTimer::singleShot (0, this, SLOT(setGroupTypeDelayed()));
+ TQTimer::singleShot (0, this, TQT_SLOT(setGroupTypeDelayed()));
}
void TopLevel::setGroupTypeDelayed()
@@ -1425,7 +1425,7 @@ void TopLevel::setGroupDelayed(TraceCostItem* g)
#endif
_groupDelayed = g;
- QTimer::singleShot (0, this, SLOT(setGroupDelayed()));
+ TQTimer::singleShot (0, this, TQT_SLOT(setGroupDelayed()));
}
void TopLevel::setGroupDelayed()
@@ -1436,7 +1436,7 @@ void TopLevel::setGroupDelayed()
void TopLevel::setDirectionDelayed(TraceItemView::Direction d)
{
_directionDelayed = d;
- QTimer::singleShot (0, this, SLOT(setDirectionDelayed()));
+ TQTimer::singleShot (0, this, TQT_SLOT(setDirectionDelayed()));
}
void TopLevel::setDirectionDelayed()
@@ -1484,7 +1484,7 @@ void TopLevel::setTraceItemDelayed(TraceItem* i)
_lastSender ? _lastSender->name() :"0" );
#endif
- QTimer::singleShot (0, this, SLOT(setTraceItemDelayed()));
+ TQTimer::singleShot (0, this, TQT_SLOT(setTraceItemDelayed()));
}
void TopLevel::setTraceItemDelayed()
@@ -1553,7 +1553,7 @@ void TopLevel::setData(TraceData* data)
_data = data;
// fill cost type list
- QStringList types;
+ TQStringList types;
if (_data) {
/* add all supported virtual types */
@@ -1591,7 +1591,7 @@ void TopLevel::setData(TraceData* data)
restoreTraceSettings();
- QString caption;
+ TQString caption;
if (_data) {
caption = _data->traceName();
if (!_data->command().isEmpty())
@@ -1611,15 +1611,15 @@ void TopLevel::setData(TraceData* data)
updateStatusBar();
}
-void TopLevel::addCostMenu(QPopupMenu* popup, bool withCost2)
+void TopLevel::addCostMenu(TQPopupMenu* popup, bool withCost2)
{
if (_data) {
- QPopupMenu *popup1 = new QPopupMenu(popup);
- QPopupMenu *popup2 = 0;
+ TQPopupMenu *popup1 = new TQPopupMenu(popup);
+ TQPopupMenu *popup2 = 0;
popup1->setCheckable(true);
if (withCost2) {
- popup2 = new QPopupMenu(popup);
+ popup2 = new TQPopupMenu(popup);
popup2->setCheckable(true);
if (_costType2) {
@@ -1649,18 +1649,18 @@ void TopLevel::addCostMenu(QPopupMenu* popup, bool withCost2)
}
}
popup->insertItem(i18n("Primary Event Type"), popup1);
- connect(popup1,SIGNAL(activated(int)),this,SLOT(setCostType(int)));
+ connect(popup1,TQT_SIGNAL(activated(int)),this,TQT_SLOT(setCostType(int)));
if (popup2) {
popup->insertItem(i18n("Secondary Event Type"), popup2);
- connect(popup2,SIGNAL(activated(int)),this,SLOT(setCostType2(int)));
+ connect(popup2,TQT_SIGNAL(activated(int)),this,TQT_SLOT(setCostType2(int)));
}
}
if (_showPercentage)
popup->insertItem(i18n("Show Absolute Cost"),
- this, SLOT(setAbsoluteCost()));
+ this, TQT_SLOT(setAbsoluteCost()));
else
popup->insertItem(i18n("Show Relative Cost"),
- this, SLOT(setRelativeCost()));
+ this, TQT_SLOT(setRelativeCost()));
}
bool TopLevel::setCostType(int id)
@@ -1687,11 +1687,11 @@ bool TopLevel::setCostType2(int id)
return setCostType2(ct);
}
-void TopLevel::addGoMenu(QPopupMenu* popup)
+void TopLevel::addGoMenu(TQPopupMenu* popup)
{
- popup->insertItem(i18n("Go Back"), this, SLOT(goBack()));
- popup->insertItem(i18n("Go Forward"), this, SLOT(goForward()));
- popup->insertItem(i18n("Go Up"), this, SLOT(goUp()));
+ popup->insertItem(i18n("Go Back"), this, TQT_SLOT(goBack()));
+ popup->insertItem(i18n("Go Forward"), this, TQT_SLOT(goForward()));
+ popup->insertItem(i18n("Go Up"), this, TQT_SLOT(goUp()));
}
void TopLevel::goBack()
@@ -1709,30 +1709,30 @@ void TopLevel::goUp()
setDirectionDelayed(TraceItemView::Up);
}
-QString TopLevel::traceKey()
+TQString TopLevel::traceKey()
{
- if (!_data || _data->command().isEmpty()) return QString::null;
+ if (!_data || _data->command().isEmpty()) return TQString::null;
- QString name = _data->command();
- QString key;
+ TQString name = _data->command();
+ TQString key;
for (unsigned int l=0;l<name.length();l++)
if (name[l].isLetterOrNumber()) key += name[l];
- return QString("-") + key;
+ return TQString("-") + key;
}
void TopLevel::restoreTraceTypes()
{
- QString key = traceKey();
+ TQString key = traceKey();
- KConfigGroup cConfig(KGlobal::config(), QCString("CurrentState"));
- KConfigGroup pConfig(KGlobal::config(), QCString("TracePositions"));
+ KConfigGroup cConfig(KGlobal::config(), TQCString("CurrentState"));
+ KConfigGroup pConfig(KGlobal::config(), TQCString("TracePositions"));
- QString groupType, costType, costType2;
- groupType = pConfig.readEntry(QString("GroupType%1").arg(key));
- costType = pConfig.readEntry(QString("CostType%1").arg(key));
- costType2 = pConfig.readEntry(QString("CostType2%1").arg(key));
+ TQString groupType, costType, costType2;
+ groupType = pConfig.readEntry(TQString("GroupType%1").arg(key));
+ costType = pConfig.readEntry(TQString("CostType%1").arg(key));
+ costType2 = pConfig.readEntry(TQString("CostType2%1").arg(key));
if (groupType.isEmpty()) groupType = cConfig.readEntry("GroupType");
if (costType.isEmpty()) costType = cConfig.readEntry("CostType");
@@ -1746,9 +1746,9 @@ void TopLevel::restoreTraceTypes()
if (!_costType && !_saCost->items().isEmpty())
costTypeSelected(_saCost->items().first());
- KConfigGroup aConfig(KGlobal::config(), QCString("Layouts"));
- _layoutCount = aConfig.readNumEntry(QString("Count%1").arg(key), 0);
- _layoutCurrent = aConfig.readNumEntry(QString("Current%1").arg(key), 0);
+ KConfigGroup aConfig(KGlobal::config(), TQCString("Layouts"));
+ _layoutCount = aConfig.readNumEntry(TQString("Count%1").arg(key), 0);
+ _layoutCurrent = aConfig.readNumEntry(TQString("Current%1").arg(key), 0);
if (_layoutCount == 0) layoutRestore();
updateLayoutActions();
}
@@ -1763,10 +1763,10 @@ void TopLevel::restoreTraceSettings()
{
if (!_data) return;
- QString key = traceKey();
+ TQString key = traceKey();
- KConfigGroup pConfig(KGlobal::config(), QCString("TracePositions"));
- QString group = pConfig.readEntry(QString("Group%1").arg(key));
+ KConfigGroup pConfig(KGlobal::config(), TQCString("TracePositions"));
+ TQString group = pConfig.readEntry(TQString("Group%1").arg(key));
if (!group.isEmpty()) setGroup(group);
restoreCurrentState(key);
@@ -1787,7 +1787,7 @@ void TopLevel::layoutDuplicate()
{
// save current and allocate a new slot
_multiView->saveViewConfig(KGlobal::config(),
- QString("Layout%1-MainView").arg(_layoutCurrent),
+ TQString("Layout%1-MainView").arg(_layoutCurrent),
traceKey(), false);
_layoutCurrent = _layoutCount;
_layoutCount++;
@@ -1805,7 +1805,7 @@ void TopLevel::layoutRemove()
if (_layoutCurrent == from) { _layoutCurrent--; from--; }
// restore from last and decrement count
_multiView->readViewConfig(KGlobal::config(),
- QString("Layout%1-MainView").arg(from),
+ TQString("Layout%1-MainView").arg(from),
traceKey(), false);
_layoutCount--;
@@ -1817,16 +1817,16 @@ void TopLevel::layoutNext()
if (_layoutCount <2) return;
KConfig* config = KGlobal::config();
- QString key = traceKey();
+ TQString key = traceKey();
_multiView->saveViewConfig(config,
- QString("Layout%1-MainView").arg(_layoutCurrent),
+ TQString("Layout%1-MainView").arg(_layoutCurrent),
key, false);
_layoutCurrent++;
if (_layoutCurrent == _layoutCount) _layoutCurrent = 0;
_multiView->readViewConfig(config,
- QString("Layout%1-MainView").arg(_layoutCurrent),
+ TQString("Layout%1-MainView").arg(_layoutCurrent),
key, false);
if (0) kdDebug() << "TopLevel::layoutNext: current "
@@ -1838,16 +1838,16 @@ void TopLevel::layoutPrevious()
if (_layoutCount <2) return;
KConfig* config = KGlobal::config();
- QString key = traceKey();
+ TQString key = traceKey();
_multiView->saveViewConfig(config,
- QString("Layout%1-MainView").arg(_layoutCurrent),
+ TQString("Layout%1-MainView").arg(_layoutCurrent),
key, false);
_layoutCurrent--;
if (_layoutCurrent <0) _layoutCurrent = _layoutCount-1;
_multiView->readViewConfig(config,
- QString("Layout%1-MainView").arg(_layoutCurrent),
+ TQString("Layout%1-MainView").arg(_layoutCurrent),
key, false);
if (0) kdDebug() << "TopLevel::layoutPrevious: current "
@@ -1857,26 +1857,26 @@ void TopLevel::layoutPrevious()
void TopLevel::layoutSave()
{
KConfig* config = KGlobal::config();
- QString key = traceKey();
+ TQString key = traceKey();
_multiView->saveViewConfig(config,
- QString("Layout%1-MainView").arg(_layoutCurrent),
+ TQString("Layout%1-MainView").arg(_layoutCurrent),
key, false);
for(int i=0;i<_layoutCount;i++) {
_multiView->readViewConfig(config,
- QString("Layout%1-MainView").arg(i),
+ TQString("Layout%1-MainView").arg(i),
key, false);
_multiView->saveViewConfig(config,
- QString("Layout%1-MainView").arg(i),
- QString(), false);
+ TQString("Layout%1-MainView").arg(i),
+ TQString(), false);
}
_multiView->readViewConfig(config,
- QString("Layout%1-MainView").arg(_layoutCurrent),
+ TQString("Layout%1-MainView").arg(_layoutCurrent),
key, false);
- KConfigGroup aConfig(config, QCString("Layouts"));
+ KConfigGroup aConfig(config, TQCString("Layouts"));
aConfig.writeEntry("DefaultCount", _layoutCount);
aConfig.writeEntry("DefaultCurrent", _layoutCurrent);
}
@@ -1884,7 +1884,7 @@ void TopLevel::layoutSave()
void TopLevel::layoutRestore()
{
KConfig* config = KGlobal::config();
- KConfigGroup aConfig(config, QCString("Layouts"));
+ KConfigGroup aConfig(config, TQCString("Layouts"));
_layoutCount = aConfig.readNumEntry("DefaultCount", 0);
_layoutCurrent = aConfig.readNumEntry("DefaultCurrent", 0);
if (_layoutCount == 0) {
@@ -1892,18 +1892,18 @@ void TopLevel::layoutRestore()
return;
}
- QString key = traceKey();
+ TQString key = traceKey();
for(int i=0;i<_layoutCount;i++) {
_multiView->readViewConfig(config,
- QString("Layout%1-MainView").arg(i),
- QString(), false);
+ TQString("Layout%1-MainView").arg(i),
+ TQString(), false);
_multiView->saveViewConfig(config,
- QString("Layout%1-MainView").arg(i),
+ TQString("Layout%1-MainView").arg(i),
key, false);
}
_multiView->readViewConfig(config,
- QString("Layout%1-MainView").arg(_layoutCurrent),
+ TQString("Layout%1-MainView").arg(_layoutCurrent),
key, false);
updateLayoutActions();
@@ -1934,7 +1934,7 @@ void TopLevel::updateStatusBar()
return;
}
- QString status = QString("%1 [%2] - ")
+ TQString status = TQString("%1 [%2] - ")
.arg(_data->shortTraceName())
.arg(_data->activePartRange());
@@ -1956,7 +1956,7 @@ void TopLevel::updateStatusBar()
/* Not working... should give group of selected function
if (_groupType != TraceItem::Function) {
- status += QString(" - %1 '%2'")
+ status += TQString(" - %1 '%2'")
.arg(TraceItem::i18nTypeName(_groupType))
.arg(_group ? _group->prettyName() : i18n("(None)"));
}
@@ -1991,7 +1991,7 @@ bool TopLevel::queryExit()
Configuration::setShowCycles(_showCycles);
Configuration::saveOptions(KGlobal::config());
- saveCurrentState(QString::null);
+ saveCurrentState(TQString::null);
// save QT dock positions...
@@ -1999,9 +1999,9 @@ bool TopLevel::queryExit()
// Its already stored.
delete toolBar();
- KConfigGroup dockConfig(KGlobal::config(), QCString("Docks"));
- QString str;
- QTextStream ts( &str, IO_WriteOnly );
+ KConfigGroup dockConfig(KGlobal::config(), TQCString("Docks"));
+ TQString str;
+ TQTextStream ts( &str, IO_WriteOnly );
ts << *this;
#if 1
dockConfig.writeEntry("Position", str);
@@ -2071,7 +2071,7 @@ void TopLevel::slotShowTipOnStart() {
}
void TopLevel::slotShowTip() {
- KTipDialog::showTip( this, QString::null, true );
+ KTipDialog::showTip( this, TQString::null, true );
}
void TopLevel::dummySlot()
@@ -2103,7 +2103,7 @@ void TopLevel::activePartsChangedSlot(const TracePartList& list)
void TopLevel::partsHideSelectedSlotDelayed()
{
- QTimer::singleShot( 0, this, SLOT(partsHideSelectedSlot()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(partsHideSelectedSlot()) );
}
// this puts selected parts into hidden list,
@@ -2136,7 +2136,7 @@ void TopLevel::partsHideSelectedSlot()
void TopLevel::partsUnhideAllSlotDelayed()
{
- QTimer::singleShot( 0, this, SLOT(partsUnhideAllSlot()) );
+ TQTimer::singleShot( 0, this, TQT_SLOT(partsUnhideAllSlot()) );
}
// this unhides all hidden parts. Does NOT change selection
@@ -2157,14 +2157,14 @@ void TopLevel::forceTrace()
// qDebug("forceTrace");
// Needs Callgrind now...
- QFile cmd("callgrind.cmd");
+ TQFile cmd("callgrind.cmd");
if (!cmd.exists()) {
cmd.open(IO_WriteOnly);
cmd.writeBlock("DUMP\n", 5);
cmd.close();
}
if (_taDump->isChecked())
- QTimer::singleShot( 1000, this, SLOT(forceTraceReload()) );
+ TQTimer::singleShot( 1000, this, TQT_SLOT(forceTraceReload()) );
else {
// cancel request
cmd.remove();
@@ -2176,10 +2176,10 @@ void TopLevel::forceTraceReload()
{
// qDebug("forceTraceReload");
- QFile cmd("callgrind.cmd");
+ TQFile cmd("callgrind.cmd");
if (cmd.exists()) {
if (_taDump->isChecked())
- QTimer::singleShot( 1000, this, SLOT(forceTraceReload()) );
+ TQTimer::singleShot( 1000, this, TQT_SLOT(forceTraceReload()) );
return;
}
_taDump->setChecked(false);
@@ -2188,7 +2188,7 @@ void TopLevel::forceTraceReload()
void TopLevel::forwardAboutToShow()
{
- QPopupMenu *popup = _paForward->popupMenu();
+ TQPopupMenu *popup = _paForward->popupMenu();
popup->clear();
StackBrowser* b = _stackSelection ? _stackSelection->browser() : 0;
@@ -2211,7 +2211,7 @@ void TopLevel::forwardAboutToShow()
f = hi->function();
if (!f) break;
- QString name = f->prettyName();
+ TQString name = f->prettyName();
if ((int)name.length()>Configuration::maxSymbolLength())
name = name.left(Configuration::maxSymbolLength()) + "...";
@@ -2224,7 +2224,7 @@ void TopLevel::forwardAboutToShow()
void TopLevel::backAboutToShow()
{
- QPopupMenu *popup = _paBack->popupMenu();
+ TQPopupMenu *popup = _paBack->popupMenu();
popup->clear();
StackBrowser* b = _stackSelection ? _stackSelection->browser() : 0;
@@ -2247,7 +2247,7 @@ void TopLevel::backAboutToShow()
f = hi->function();
if (!f) break;
- QString name = f->prettyName();
+ TQString name = f->prettyName();
if ((int)name.length()>Configuration::maxSymbolLength())
name = name.left(Configuration::maxSymbolLength()) + "...";
@@ -2260,7 +2260,7 @@ void TopLevel::backAboutToShow()
void TopLevel::upAboutToShow()
{
- QPopupMenu *popup = _paUp->popupMenu();
+ TQPopupMenu *popup = _paUp->popupMenu();
popup->clear();
StackBrowser* b = _stackSelection ? _stackSelection->browser() : 0;
@@ -2279,7 +2279,7 @@ void TopLevel::upAboutToShow()
int count = 1;
while (count<Configuration::maxSymbolCount() && f) {
- QString name = f->prettyName();
+ TQString name = f->prettyName();
if ((int)name.length()>Configuration::maxSymbolLength())
name = name.left(Configuration::maxSymbolLength()) + "...";
@@ -2339,13 +2339,13 @@ void TopLevel::upActivated(int id)
}
-void TopLevel::showMessage(const QString& msg, int ms)
+void TopLevel::showMessage(const TQString& msg, int ms)
{
if (_statusbar)
_statusbar->message(msg, ms);
}
-void TopLevel::showStatus(QString msg, int progress)
+void TopLevel::showStatus(TQString msg, int progress)
{
static bool msgUpdateNeeded = true;
@@ -2371,7 +2371,7 @@ void TopLevel::showStatus(QString msg, int progress)
if (_progressStart.elapsed() < 500) return;
if (!_progressBar) {
- _progressBar = new QProgressBar(_statusbar);
+ _progressBar = new TQProgressBar(_statusbar);
_progressBar->setMaximumSize(200, _statusbar->height()-4);
_statusbar->addWidget(_progressBar, 1, true);
_progressBar->show();
@@ -2388,8 +2388,8 @@ void TopLevel::showStatus(QString msg, int progress)
// let the progress bar update itself
#if (QT_VERSION-0 >= 0x030100)
- QEventLoop* l = qApp->eventLoop();
- if (l) l->processEvents(QEventLoop::ExcludeUserInput);
+ TQEventLoop* l = qApp->eventLoop();
+ if (l) l->processEvents(TQEventLoop::ExcludeUserInput);
#else
// for Qt 3.0.x. This allows user input and thus potentially races
qApp->processEvents();
diff --git a/kcachegrind/kcachegrind/toplevel.h b/kcachegrind/kcachegrind/toplevel.h
index a1a4f0ae..c8614f84 100644
--- a/kcachegrind/kcachegrind/toplevel.h
+++ b/kcachegrind/kcachegrind/toplevel.h
@@ -23,7 +23,7 @@
#ifndef TOPLEVEL_H
#define TOPLEVEL_H
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <dcopobject.h>
#include <kmainwindow.h>
@@ -81,20 +81,20 @@ public:
bool showCycles() const { return _showCycles; }
/* convenience functions for often used context menu items */
- void addCostMenu(QPopupMenu*,bool);
- void addGoMenu(QPopupMenu*);
+ void addCostMenu(TQPopupMenu*,bool);
+ void addGoMenu(TQPopupMenu*);
public slots:
void newTrace();
void loadTrace();
void loadTrace(const KURL&);
- void loadTrace(QString);
+ void loadTrace(TQString);
void addTrace();
void addTrace(const KURL&);
- void addTrace(QString);
+ void addTrace(TQString);
// for quick showing the main window...
- void loadDelayed(QString);
+ void loadDelayed(TQString);
void reload();
void exportGraph();
@@ -113,8 +113,8 @@ public slots:
void updateLayoutActions();
void updateStatusBar();
- void costTypeSelected(const QString&);
- void costType2Selected(const QString&);
+ void costTypeSelected(const TQString&);
+ void costType2Selected(const TQString&);
void groupTypeSelected(int);
void splitSlot();
void splitDirSlot();
@@ -148,16 +148,16 @@ public slots:
bool setCostType(TraceCostType*);
bool setCostType2(TraceCostType*);
- bool setCostType(QString);
- bool setCostType2(QString);
+ bool setCostType(TQString);
+ bool setCostType2(TQString);
bool setCostType(int);
bool setCostType2(int);
bool setGroupType(TraceItem::CostType);
- bool setGroupType(QString);
+ bool setGroupType(TQString);
bool setGroup(TraceCostItem*);
- bool setGroup(QString);
+ bool setGroup(TQString);
bool setFunction(TraceFunction*);
- bool setFunction(QString);
+ bool setFunction(TQString);
void activePartsChangedSlot(const TracePartList& list);
void partsHideSelectedSlot();
void partsUnhideAllSlot();
@@ -195,8 +195,8 @@ public slots:
void slotShowTip();
// progress in status bar, empty message disables progress display
- void showStatus(QString msg, int progress);
- void showMessage(const QString&, int msec);
+ void showStatus(TQString msg, int progress);
+ void showMessage(const TQString&, int msec);
private:
void init();
@@ -204,15 +204,15 @@ private:
void createMiscActions();
void setupMainWidget(MainWidget*);
void setupPartSelection(PartSelection*);
- void restoreCurrentState(QString postfix);
- void saveCurrentState(QString postfix);
+ void restoreCurrentState(TQString postfix);
+ void saveCurrentState(TQString postfix);
void saveTraceSettings();
- QString traceKey();
+ TQString traceKey();
void restoreTraceTypes();
void restoreTraceSettings();
KStatusBar* _statusbar;
- QLabel* _statusLabel;
+ TQLabel* _statusLabel;
KRecentFilesAction* _openRecent;
bool _twoMainWidgets;
Orientation _spOrientation;
@@ -222,9 +222,9 @@ private:
DumpSelection* _dumpSelection;
PartSelection* _partSelection;
StackSelection* _stackSelection;
- QLineEdit* queryLineEdit;
+ TQLineEdit* queryLineEdit;
- QDockWindow *_partDock, *_stackDock, *_functionDock, *_dumpDock;
+ TQDockWindow *_partDock, *_stackDock, *_functionDock, *_dumpDock;
bool _forcePartDock;
KSelectAction *_saCost, *_saCost2, *saGroup;
@@ -235,7 +235,7 @@ private:
KToolBarPopupAction *_paForward, *_paBack, *_paUp;
TraceFunction* _function;
- const QObject* _lastSender;
+ const TQObject* _lastSender;
// trace data shown in this window
TraceData* _data;
@@ -259,13 +259,13 @@ private:
TraceItem::CostType _groupTypeDelayed;
TraceCostItem* _groupDelayed;
TraceItem* _traceItemDelayed;
- QString _loadTraceDelayed;
+ TQString _loadTraceDelayed;
TraceItemView::Direction _directionDelayed;
// for status progress display
- QString _progressMsg;
- QTime _progressStart;
- QProgressBar* _progressBar;
+ TQString _progressMsg;
+ TQTime _progressStart;
+ TQProgressBar* _progressBar;
// toplevel configuration options
bool _showPercentage, _showExpanded, _showCycles;
diff --git a/kcachegrind/kcachegrind/tracedata.cpp b/kcachegrind/kcachegrind/tracedata.cpp
index 5b2101dc..4e6a625c 100644
--- a/kcachegrind/kcachegrind/tracedata.cpp
+++ b/kcachegrind/kcachegrind/tracedata.cpp
@@ -19,10 +19,10 @@
#include <stdlib.h>
-#include <qfile.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qregexp.h>
+#include <tqfile.h>
+#include <tqdir.h>
+#include <tqfileinfo.h>
+#include <tqregexp.h>
#include <klocale.h>
#include <kdebug.h>
@@ -70,32 +70,32 @@ int Addr::set(const char *s)
}
-QString Addr::toString() const
+TQString Addr::toString() const
{
- if (_v == 0) return QString("0");
+ if (_v == 0) return TQString("0");
uint64 n = _v;
- QString hex;
+ TQString hex;
#if (QT_VERSION-0 >= 0x030200)
hex.reserve(16);
#endif
while(n>0) {
int d = (n & 15);
- hex = QChar((d<10) ? ('0'+d) : ('A'-10+d)) + hex;
+ hex = TQChar((d<10) ? ('0'+d) : ('A'-10+d)) + hex;
n /= 16;
}
return hex;
}
-QString Addr::pretty() const
+TQString Addr::pretty() const
{
- if (_v == 0) return QString("0");
+ if (_v == 0) return TQString("0");
uint64 n = _v;
int p = 0;
- QString hex;
+ TQString hex;
#if (QT_VERSION-0 >= 0x030200)
hex.reserve(20);
#endif
@@ -103,7 +103,7 @@ QString Addr::pretty() const
while(n>0) {
int d = (n & 15);
if ((p>0) && ((p%4)==0)) hex = " " + hex;
- hex = QChar((d<10) ? ('0'+d) : ('A'-10+d)) + hex;
+ hex = TQChar((d<10) ? ('0'+d) : ('A'-10+d)) + hex;
n /= 16;
p++;
}
@@ -121,8 +121,8 @@ bool Addr::isInRange(Addr a, int distance)
//---------------------------------------------------
// TraceItem
-QString* TraceItem::_typeName = 0;
-QString* TraceItem::_i18nTypeName = 0;
+TQString* TraceItem::_typeName = 0;
+TQString* TraceItem::_i18nTypeName = 0;
TraceItem::TraceItem()
{
@@ -146,13 +146,13 @@ void TraceItem::cleanup()
}
}
-QString TraceItem::typeName(CostType t)
+TQString TraceItem::typeName(CostType t)
{
if (!_typeName) {
- _typeName = new QString [MaxCostType+1];
- QString* strs = _typeName;
+ _typeName = new TQString [MaxCostType+1];
+ TQString* strs = _typeName;
for(int i=0;i<=MaxCostType;i++)
- strs[i] = QString("?");
+ strs[i] = TQString("?");
strs[Item] = I18N_NOOP("Abstract Item");
strs[Cost] = I18N_NOOP("Cost Item");
@@ -187,7 +187,7 @@ QString TraceItem::typeName(CostType t)
return _typeName[t];
}
-TraceItem::CostType TraceItem::costType(QString s)
+TraceItem::CostType TraceItem::costType(TQString s)
{
// This is the default cost Type
if (s.isEmpty()) return Function;
@@ -202,10 +202,10 @@ TraceItem::CostType TraceItem::costType(QString s)
}
// all strings of typeName() are translatable because of I18N_NOOP there
-QString TraceItem::i18nTypeName(CostType t)
+TQString TraceItem::i18nTypeName(CostType t)
{
if (!_i18nTypeName) {
- _i18nTypeName = new QString [MaxCostType+1];
+ _i18nTypeName = new TQString [MaxCostType+1];
for(int i=0;i<=MaxCostType;i++)
_i18nTypeName[i] = i18n(typeName((CostType)i).utf8().data());
}
@@ -213,7 +213,7 @@ QString TraceItem::i18nTypeName(CostType t)
return _i18nTypeName[t];
}
-TraceItem::CostType TraceItem::i18nCostType(QString s)
+TraceItem::CostType TraceItem::i18nCostType(TQString s)
{
// This is the default cost Type
if (s.isEmpty()) return Function;
@@ -234,12 +234,12 @@ void TraceItem::clear()
}
-QString TraceItem::costString(TraceCostMapping*)
+TQString TraceItem::costString(TraceCostMapping*)
{
- return QString("(no cost)");
+ return TQString("(no cost)");
}
-QString TraceItem::name() const
+TQString TraceItem::name() const
{
if (part()) {
return i18n("%1 from %2")
@@ -253,22 +253,22 @@ QString TraceItem::name() const
return i18n("(unknown)");
}
-QString TraceItem::prettyName() const
+TQString TraceItem::prettyName() const
{
if (name().isEmpty()) return i18n("(unknown)");
return name();
}
-QString TraceItem::fullName() const
+TQString TraceItem::fullName() const
{
- return QString("%1 %2")
+ return TQString("%1 %2")
.arg(typeName(type())).arg(prettyName());
}
-QString TraceItem::toString()
+TQString TraceItem::toString()
{
- return QString("%1\n [%3]").arg(fullName()).arg(costString(0));
+ return TQString("%1\n [%3]").arg(fullName()).arg(costString(0));
}
void TraceItem::invalidate()
@@ -678,9 +678,9 @@ TraceCost TraceCost::diff(TraceCost* item)
return res;
}
-QString TraceCost::costString(TraceCostMapping* m)
+TQString TraceCost::costString(TraceCostMapping* m)
{
- QString res;
+ TQString res;
if (_dirty) update();
@@ -733,7 +733,7 @@ SubCost TraceCost::subCost(TraceCostType* t)
return _cachedCost;
}
-QString TraceCost::prettySubCost(TraceCostType* t)
+TQString TraceCost::prettySubCost(TraceCostType* t)
{
return subCost(t).pretty();
}
@@ -766,11 +766,11 @@ SubCost TraceJumpCost::followedCount()
return _followedCount;
}
-QString TraceJumpCost::costString(TraceCostMapping*)
+TQString TraceJumpCost::costString(TraceCostMapping*)
{
if (_dirty) update();
- return QString("%1/%2")
+ return TQString("%1/%2")
.arg(_followedCount.pretty())
.arg(_executedCount.pretty());
}
@@ -793,9 +793,9 @@ void TraceJumpCost::addCost(TraceJumpCost* item)
//---------------------------------------------------
// TraceCostType
-QPtrList<TraceCostType>* TraceCostType::_knownTypes = 0;
+TQPtrList<TraceCostType>* TraceCostType::_knownTypes = 0;
-TraceCostType::TraceCostType(QString name, QString longName, QString formula)
+TraceCostType::TraceCostType(TQString name, TQString longName, TQString formula)
{
_name = name;
_longName = longName;
@@ -809,7 +809,7 @@ TraceCostType::TraceCostType(QString name, QString longName, QString formula)
_coefficient[i] = 0;
}
-void TraceCostType::setFormula(QString formula)
+void TraceCostType::setFormula(TQString formula)
{
_formula = formula;
_realIndex = TraceCost::InvalidIndex;
@@ -830,7 +830,7 @@ void TraceCostType::setRealIndex(int i)
i=TraceCost::InvalidIndex;
_realIndex = i;
- _formula = QString::null;
+ _formula = TQString::null;
}
// checks for existing types and sets coefficients
@@ -852,10 +852,10 @@ bool TraceCostType::parseFormula()
for (int i=0; i<TraceCost::MaxRealIndex;i++)
_coefficient[i] = 0;
- QRegExp rx( "((?:\\+|\\-)?)\\s*(\\d*)\\s*\\*?\\s*(\\w+)" );
+ TQRegExp rx( "((?:\\+|\\-)?)\\s*(\\d*)\\s*\\*?\\s*(\\w+)" );
int factor, pos;
- QString costName;
+ TQString costName;
TraceCostType* costType;
pos = 0;
@@ -896,9 +896,9 @@ bool TraceCostType::parseFormula()
return true;
}
-QString TraceCostType::parsedFormula()
+TQString TraceCostType::parsedFormula()
{
- QString res;
+ TQString res;
if (!parseFormula()) return res;
@@ -911,13 +911,13 @@ QString TraceCostType::parsedFormula()
if (c>0) res += "+ ";
}
if (c<0) { res += "- "; c = -c; }
- res += QString::number(c);
+ res += TQString::number(c);
TraceCostType* t = _mapping->type(i);
if (!t) continue;
if (!t->name().isEmpty())
- res += QString(" * %1").arg(t->name());
+ res += TQString(" * %1").arg(t->name());
}
return res;
@@ -963,7 +963,7 @@ int TraceCostType::histCost(TraceCost* c, double total, double* hist)
-TraceCostType* TraceCostType::knownRealType(QString n)
+TraceCostType* TraceCostType::knownRealType(TQString n)
{
if (!_knownTypes) return 0;
@@ -977,7 +977,7 @@ TraceCostType* TraceCostType::knownRealType(QString n)
return 0;
}
-TraceCostType* TraceCostType::knownVirtualType(QString n)
+TraceCostType* TraceCostType::knownVirtualType(TQString n)
{
if (!_knownTypes) return 0;
@@ -999,7 +999,7 @@ void TraceCostType::add(TraceCostType* t)
t->setMapping(0);
if (!_knownTypes)
- _knownTypes = new QPtrList<TraceCostType>;
+ _knownTypes = new TQPtrList<TraceCostType>;
/* Already known? */
TraceCostType* kt;
@@ -1028,7 +1028,7 @@ int TraceCostType::knownTypeCount()
return _knownTypes->count();
}
-bool TraceCostType::remove(QString n)
+bool TraceCostType::remove(TQString n)
{
if (!_knownTypes) return false;
@@ -1051,9 +1051,9 @@ TraceCostType* TraceCostType::knownType(int i)
return _knownTypes->at(i);
}
-QColor TraceCostType::color()
+TQColor TraceCostType::color()
{
- if (!_mapping) return QColor();
+ if (!_mapping) return TQColor();
return _mapping->realColors()[_realIndex];
}
@@ -1078,7 +1078,7 @@ TraceCostMapping::~TraceCostMapping()
if (_virtual[i]) delete _virtual[i];
}
-TraceSubMapping* TraceCostMapping::subMapping(QString types, bool create)
+TraceSubMapping* TraceCostMapping::subMapping(TQString types, bool create)
{
// first check if there's enough space in the mapping
int newCount = 0;
@@ -1126,7 +1126,7 @@ TraceSubMapping* TraceCostMapping::subMapping(QString types, bool create)
}
-int TraceCostMapping::addReal(QString t)
+int TraceCostMapping::addReal(TQString t)
{
int index = realIndex(t);
if (index>=0) return index;
@@ -1227,7 +1227,7 @@ TraceCostType* TraceCostMapping::type(int t)
return 0;
}
-TraceCostType* TraceCostMapping::type(QString name)
+TraceCostType* TraceCostMapping::type(TQString name)
{
for (int i=0;i<_realCount;i++)
if (_real[i] && (_real[i]->name() == name))
@@ -1240,7 +1240,7 @@ TraceCostType* TraceCostMapping::type(QString name)
return 0;
}
-TraceCostType* TraceCostMapping::typeForLong(QString name)
+TraceCostType* TraceCostMapping::typeForLong(TQString name)
{
for (int i=0;i<_realCount;i++)
if (_real[i] && (_real[i]->longName() == name))
@@ -1254,7 +1254,7 @@ TraceCostType* TraceCostMapping::typeForLong(QString name)
}
-int TraceCostMapping::realIndex(QString name)
+int TraceCostMapping::realIndex(TQString name)
{
for (int i=0;i<_realCount;i++)
if (_real[i] && (_real[i]->name() == name))
@@ -1263,7 +1263,7 @@ int TraceCostMapping::realIndex(QString name)
return TraceCost::InvalidIndex;
}
-int TraceCostMapping::index(QString name)
+int TraceCostMapping::index(TQString name)
{
for (int i=0;i<_realCount;i++)
if (_real[i] && (_real[i]->name() == name))
@@ -1322,7 +1322,7 @@ void TraceSubMapping::clear()
}
}
-bool TraceSubMapping::append(QString type, bool create)
+bool TraceSubMapping::append(TQString type, bool create)
{
if (!_mapping) return false;
int index = create ? _mapping->addReal(type) : _mapping->realIndex(type);
@@ -1363,14 +1363,14 @@ TraceCallCost::~TraceCallCost()
{}
-QString TraceCallCost::costString(TraceCostMapping* m)
+TQString TraceCallCost::costString(TraceCostMapping* m)
{
- return QString("%1, Calls %2")
+ return TQString("%1, Calls %2")
.arg(TraceCost::costString(m))
.arg(_callCount.pretty());
}
-QString TraceCallCost::prettyCallCount()
+TQString TraceCallCost::prettyCallCount()
{
return _callCount.pretty();
}
@@ -1405,9 +1405,9 @@ TraceInclusiveCost::TraceInclusiveCost()
TraceInclusiveCost::~TraceInclusiveCost()
{}
-QString TraceInclusiveCost::costString(TraceCostMapping* m)
+TQString TraceInclusiveCost::costString(TraceCostMapping* m)
{
- return QString("%1, Inclusive %2")
+ return TQString("%1, Inclusive %2")
.arg(TraceCost::costString(m))
.arg(_inclusive.costString(m));
}
@@ -1885,24 +1885,24 @@ TracePartFunction::TracePartFunction(TraceFunction* function,
TracePartFunction::~TracePartFunction()
{}
-QString TracePartFunction::prettyCalledCount()
+TQString TracePartFunction::prettyCalledCount()
{
return _calledCount.pretty();
}
-QString TracePartFunction::prettyCallingCount()
+TQString TracePartFunction::prettyCallingCount()
{
return _callingCount.pretty();
}
-QString TracePartFunction::costString(TraceCostMapping* m)
+TQString TracePartFunction::costString(TraceCostMapping* m)
{
update();
- QString res = TraceInclusiveCost::costString(m);
- res += QString(", called from %1: %2")
+ TQString res = TraceInclusiveCost::costString(m);
+ res += TQString(", called from %1: %2")
.arg(_calledContexts).arg(prettyCalledCount());
- res += QString(", calling from %1: %2")
+ res += TQString(", calling from %1: %2")
.arg(_callingContexts).arg(prettyCallingCount());
return res;
@@ -2137,10 +2137,10 @@ TracePartClass::TracePartClass(TraceClass* cls)
TracePartClass::~TracePartClass()
{}
-QString TracePartClass::prettyName() const
+TQString TracePartClass::prettyName() const
{
- return QString("%1 from %2")
- .arg( _dep->name().isEmpty() ? QString("(global)") : _dep->name())
+ return TQString("%1 from %2")
+ .arg( _dep->name().isEmpty() ? TQString("(global)") : _dep->name())
.arg(part()->name());
}
@@ -2234,9 +2234,9 @@ void TraceInstrJump::update()
#endif
}
-QString TraceInstrJump::name() const
+TQString TraceInstrJump::name() const
{
- return QString("jump at 0x%1 to 0x%2")
+ return TQString("jump at 0x%1 to 0x%2")
.arg(_instrFrom->addr().toString())
.arg(_instrTo->addr().toString());
}
@@ -2317,9 +2317,9 @@ TracePartLineJump* TraceLineJump::partLineJump(TracePart* part)
}
-QString TraceLineJump::name() const
+TQString TraceLineJump::name() const
{
- return QString("jump at %1 to %2")
+ return TQString("jump at %1 to %2")
.arg(_lineFrom->prettyName())
.arg(_lineTo->prettyName());
}
@@ -2397,9 +2397,9 @@ TracePartInstrCall* TraceInstrCall::partInstrCall(TracePart* part,
}
-QString TraceInstrCall::name() const
+TQString TraceInstrCall::name() const
{
- return QString("%1 at %2").arg(_call->name()).arg(_instr->name());
+ return TQString("%1 at %2").arg(_call->name()).arg(_instr->name());
}
@@ -2433,9 +2433,9 @@ TracePartLineCall* TraceLineCall::partLineCall(TracePart* part,
}
-QString TraceLineCall::name() const
+TQString TraceLineCall::name() const
{
- return QString("%1 at %2").arg(_call->name()).arg(_line->name());
+ return TQString("%1 at %2").arg(_call->name()).arg(_line->name());
}
@@ -2529,9 +2529,9 @@ void TraceCall::invalidateDynamicCost()
}
-QString TraceCall::name() const
+TQString TraceCall::name() const
{
- return QString("%1 => %2")
+ return TQString("%1 => %2")
.arg(_caller->name())
.arg(_called->name());
}
@@ -2582,7 +2582,7 @@ TraceFunction* TraceCall::called(bool skipCycle) const
return _called;
}
-QString TraceCall::callerName(bool skipCycle) const
+TQString TraceCall::callerName(bool skipCycle) const
{
if (!_caller) return i18n("(no caller)");
@@ -2590,7 +2590,7 @@ QString TraceCall::callerName(bool skipCycle) const
// if this call goes into a cycle, add the entry function
TraceFunctionCycle* c = _called->cycle();
if (c && _caller && (_caller->cycle() != c)) {
- QString via = _called->prettyName();
+ TQString via = _called->prettyName();
return i18n("%1 via %2").arg(_caller->prettyName()).arg(via);
}
}
@@ -2598,7 +2598,7 @@ QString TraceCall::callerName(bool skipCycle) const
return _caller->prettyName();
}
-QString TraceCall::calledName(bool skipCycle) const
+TQString TraceCall::calledName(bool skipCycle) const
{
if (!_called) return i18n("(no callee)");
@@ -2608,7 +2608,7 @@ QString TraceCall::calledName(bool skipCycle) const
if (c && _caller && (_caller->cycle() != c)) {
// HACK to get rid of cycle postfix...
_called->setCycle(0);
- QString via = _called->prettyName();
+ TQString via = _called->prettyName();
_called->setCycle(c);
return i18n("%1 via %2").arg(c->name()).arg(via);
}
@@ -2706,14 +2706,14 @@ void TraceInstr::addInstrCall(TraceInstrCall* instrCall)
}
-QString TraceInstr::name() const
+TQString TraceInstr::name() const
{
- return QString("0x%1").arg(_addr.toString());
+ return TQString("0x%1").arg(_addr.toString());
}
-QString TraceInstr::prettyName() const
+TQString TraceInstr::prettyName() const
{
- return QString("0x%1").arg(_addr.toString());
+ return TQString("0x%1").arg(_addr.toString());
}
@@ -2821,19 +2821,19 @@ void TraceLine::addLineCall(TraceLineCall* lineCall)
}
-QString TraceLine::name() const
+TQString TraceLine::name() const
{
- QString fileShortName = _sourceFile->file()->shortName();
+ TQString fileShortName = _sourceFile->file()->shortName();
if (fileShortName.isEmpty())
return i18n("(unknown)");
- return QString("%1:%2")
+ return TQString("%1:%2")
.arg(fileShortName).arg(_lineno);
}
-QString TraceLine::prettyName() const
+TQString TraceLine::prettyName() const
{
- return QString("%1 [%2]")
+ return TQString("%1 [%2]")
.arg(name()).arg(_sourceFile->function()->prettyName());
}
@@ -2871,9 +2871,9 @@ TraceFunctionSource::~TraceFunctionSource()
if (_line0) delete _line0;
}
-QString TraceFunctionSource::name() const
+TQString TraceFunctionSource::name() const
{
- return QString("%1 for %2").arg(_file->name()).arg(_function->name());
+ return TQString("%1 for %2").arg(_file->name()).arg(_function->name());
}
uint TraceFunctionSource::firstLineno()
@@ -3221,7 +3221,7 @@ TraceAssoziation* TraceFunction::assoziation(int rtti)
// helper for prettyName
-bool TraceFunction::isUniquePrefix(QString prefix) const
+bool TraceFunction::isUniquePrefix(TQString prefix) const
{
TraceFunctionMap::ConstIterator it, it2;
it = it2 = _myMapIterator;
@@ -3237,9 +3237,9 @@ bool TraceFunction::isUniquePrefix(QString prefix) const
}
-QString TraceFunction::prettyName() const
+TQString TraceFunction::prettyName() const
{
- QString res = _name;
+ TQString res = _name;
if (_name.isEmpty())
return i18n("(unknown)");
@@ -3258,9 +3258,9 @@ QString TraceFunction::prettyName() const
// cycle members
if (_cycle) {
if (_cycle != this)
- res = QString("%1 <cycle %2>").arg(res).arg(_cycle->cycleNo());
+ res = TQString("%1 <cycle %2>").arg(res).arg(_cycle->cycleNo());
else
- res = QString("<cycle %2>").arg(_cycle->cycleNo());
+ res = TQString("<cycle %2>").arg(_cycle->cycleNo());
}
@@ -3270,9 +3270,9 @@ QString TraceFunction::prettyName() const
/*
* Returns location string: ELF object and source file(s).
*/
-QString TraceFunction::location(int maxFiles) const
+TQString TraceFunction::location(int maxFiles) const
{
- QString loc;
+ TQString loc;
// add object file with address range
if (_object) {
@@ -3283,9 +3283,9 @@ QString TraceFunction::location(int maxFiles) const
uint to = lastAddress();
if (from != 0 && to != 0) {
if (from == to)
- loc += QString(" (0x%1)").arg(to, 0, 16);
+ loc += TQString(" (0x%1)").arg(to, 0, 16);
else
- loc += QString(" (0x%1-0x%2)").arg(from, 0, 16).arg(to, 0, 16);
+ loc += TQString(" (0x%1-0x%2)").arg(from, 0, 16).arg(to, 0, 16);
}
#endif
}
@@ -3314,9 +3314,9 @@ QString TraceFunction::location(int maxFiles) const
to = sourceFile->lastLineno();
if (from != 0 && to != 0) {
if (from == to)
- loc += QString(" (%1)").arg(to);
+ loc += TQString(" (%1)").arg(to);
else
- loc += QString(" (%1-%2)").arg(from).arg(to);
+ loc += TQString(" (%1-%2)").arg(from).arg(to);
}
#endif
}
@@ -3325,37 +3325,37 @@ QString TraceFunction::location(int maxFiles) const
}
// pretty version is allowed to mangle the string...
-QString TraceFunction::prettyLocation(int maxFiles) const
+TQString TraceFunction::prettyLocation(int maxFiles) const
{
- QString l = location(maxFiles);
+ TQString l = location(maxFiles);
if (l.isEmpty()) return i18n("(unknown)");
return l;
}
-void TraceFunction::addPrettyLocation(QString& s, int maxFiles) const
+void TraceFunction::addPrettyLocation(TQString& s, int maxFiles) const
{
- QString l = location(maxFiles);
+ TQString l = location(maxFiles);
if (l.isEmpty()) return;
- s += QString(" (%1)").arg(l);
+ s += TQString(" (%1)").arg(l);
}
-QString TraceFunction::prettyNameWithLocation(int maxFiles) const
+TQString TraceFunction::prettyNameWithLocation(int maxFiles) const
{
- QString l = location(maxFiles);
+ TQString l = location(maxFiles);
if (l.isEmpty()) return prettyName();
- return QString("%1 (%2)").arg(prettyName()).arg(l);
+ return TQString("%1 (%2)").arg(prettyName()).arg(l);
}
-QString TraceFunction::info() const
+TQString TraceFunction::info() const
{
- QString l = location();
+ TQString l = location();
if (l.isEmpty())
- return QString("Function %1").arg(name());
+ return TQString("Function %1").arg(name());
- return QString("Function %1 (location %2)")
+ return TQString("Function %1 (location %2)")
.arg(name()).arg(l);
}
@@ -3549,12 +3549,12 @@ int TraceFunction::callingContexts()
return _callingContexts;
}
-QString TraceFunction::prettyCalledCount()
+TQString TraceFunction::prettyCalledCount()
{
return _calledCount.pretty();
}
-QString TraceFunction::prettyCallingCount()
+TQString TraceFunction::prettyCallingCount()
{
return _callingCount.pretty();
}
@@ -3715,7 +3715,7 @@ void TraceFunction::cycleDFS(int d, int& pNo, TraceFunction** pTop)
if (0)
qDebug("%s D%02d > %s (%d)",
- QString().fill(' ', d).ascii(), d, prettyName().ascii(), pNo+1);
+ TQString().fill(' ', d).ascii(), d, prettyName().ascii(), pNo+1);
@@ -3749,7 +3749,7 @@ void TraceFunction::cycleDFS(int d, int& pNo, TraceFunction** pTop)
if (0)
qDebug("%s Cum. %s, Max Caller %s, cut limit %s",
- QString().fill(' ', d).ascii(),
+ TQString().fill(' ', d).ascii(),
inclusive()->subCost(0).pretty().ascii(),
base.pretty().ascii(),
cutLimit.pretty().ascii());
@@ -3762,7 +3762,7 @@ void TraceFunction::cycleDFS(int d, int& pNo, TraceFunction** pTop)
// cycle cut heuristic
if (calling->subCost(0) < cutLimit) {
if (0) qDebug("%s Cut call to %s (cum. %s)",
- QString().fill(' ', d).ascii(),
+ TQString().fill(' ', d).ascii(),
called->prettyName().ascii(),
calling->subCost(0).pretty().ascii());
@@ -3782,13 +3782,13 @@ void TraceFunction::cycleDFS(int d, int& pNo, TraceFunction** pTop)
if (0)
qDebug("%s D%02d - %s (%d)",
- QString().fill(' ', d+1).ascii(), d+1,
+ TQString().fill(' ', d+1).ascii(), d+1,
called->prettyName().ascii(), called->_cycleLow);
}
else {
if (0)
qDebug("%s D%02d - %s (%d) [Not on stack]",
- QString().fill(' ', d+1).ascii(), d+1,
+ TQString().fill(' ', d+1).ascii(), d+1,
called->prettyName().ascii(), called->_cycleLow);
}
}
@@ -3821,7 +3821,7 @@ void TraceFunction::cycleDFS(int d, int& pNo, TraceFunction** pTop)
}
if (0)
qDebug("%s D%02d < %s (%d)",
- QString().fill(' ', d).ascii(), d,
+ TQString().fill(' ', d).ascii(), d,
prettyName().ascii(), _cycleLow);
}
@@ -3955,7 +3955,7 @@ TraceFunctionCycle::TraceFunctionCycle(TraceFunction* f, int n)
_cycle = this;
setPosition(f->data());
- setName(QString("<cycle %1>").arg(n));
+ setName(TQString("<cycle %1>").arg(n));
// reset to attributes of base function
setFile(_base->file());
@@ -4019,10 +4019,10 @@ TraceClass::TraceClass()
TraceClass::~TraceClass()
{}
-QString TraceClass::prettyName() const
+TQString TraceClass::prettyName() const
{
if (_name.isEmpty())
- return QString("(global)");
+ return TQString("(global)");
return _name;
}
@@ -4129,7 +4129,7 @@ void TraceFile::addSourceFile(TraceFunctionSource* sourceFile)
-void TraceFile::setDirectory(const QString& dir)
+void TraceFile::setDirectory(const TQString& dir)
{
if (dir.endsWith("/"))
_dir = dir.left(dir.length()-1);
@@ -4137,7 +4137,7 @@ void TraceFile::setDirectory(const QString& dir)
_dir = dir;
}
-QString TraceFile::directory()
+TQString TraceFile::directory()
{
if (!_dir.isEmpty()) return _dir;
@@ -4145,14 +4145,14 @@ QString TraceFile::directory()
while ( (index=_name.find("/", lastIndex)) >=0)
lastIndex = index+1;
- if (lastIndex==0) return QString::null;
+ if (lastIndex==0) return TQString::null;
// without ending "/"
return _name.left(lastIndex-1);
}
-QString TraceFile::shortName() const
+TQString TraceFile::shortName() const
{
int lastIndex = 0, index;
while ( (index=_name.find("/", lastIndex)) >=0)
@@ -4161,9 +4161,9 @@ QString TraceFile::shortName() const
return _name.mid(lastIndex);
}
-QString TraceFile::prettyName() const
+TQString TraceFile::prettyName() const
{
- QString sn = shortName();
+ TQString sn = shortName();
if (sn.isEmpty())
return i18n("(unknown)");
@@ -4171,7 +4171,7 @@ QString TraceFile::prettyName() const
return sn;
}
-QString TraceFile::prettyLongName() const
+TQString TraceFile::prettyLongName() const
{
if (_name.isEmpty())
return i18n("(unknown)");
@@ -4225,7 +4225,7 @@ void TraceObject::addFunction(TraceFunction* function)
}
// strip path
-void TraceObject::setName(const QString& name)
+void TraceObject::setName(const TQString& name)
{
_name = name;
@@ -4236,7 +4236,7 @@ void TraceObject::setName(const QString& name)
_shortName = _name.mid(lastIndex);
}
-QString TraceObject::prettyName() const
+TQString TraceObject::prettyName() const
{
if (_shortName.isEmpty())
return i18n("(unknown)");
@@ -4247,7 +4247,7 @@ QString TraceObject::prettyName() const
//---------------------------------------------------
// TracePart
-TracePart::TracePart(TraceData* data, QFile* file)
+TracePart::TracePart(TraceData* data, TQFile* file)
{
setPosition(data);
@@ -4291,7 +4291,7 @@ void TracePart::setProcessID(int pid)
// strip path
-QString TracePart::shortName() const
+TQString TracePart::shortName() const
{
int lastIndex = 0, index;
while ( (index=_name.find("/", lastIndex)) >=0)
@@ -4300,11 +4300,11 @@ QString TracePart::shortName() const
return _name.mid(lastIndex);
}
-QString TracePart::prettyName() const
+TQString TracePart::prettyName() const
{
- QString name = QString("%1.%2").arg(_pid).arg(_number);
+ TQString name = TQString("%1.%2").arg(_pid).arg(_number);
if (data()->maxThreadID()>1)
- name += QString("-%3").arg(_tid);
+ name += TQString("-%3").arg(_tid);
return name;
}
@@ -4338,9 +4338,9 @@ int TracePartList::compareItems ( Item item1, Item item2 )
(p1->threadID() - p2->threadID());
}
-QString TracePartList::names() const
+TQString TracePartList::names() const
{
- QString res;
+ TQString res;
TracePart* p;
TracePartList l = *this;
for (p=l.first();p;p=l.next()) {
@@ -4364,7 +4364,7 @@ TraceData::TraceData(TopLevel* top)
init();
}
-TraceData::TraceData(const QString& base)
+TraceData::TraceData(const TQString& base)
{
_topLevel = 0;
init();
@@ -4390,7 +4390,7 @@ TraceData::~TraceData()
if (_dynPool) delete _dynPool;
}
-QString TraceData::shortTraceName() const
+TQString TraceData::shortTraceName() const
{
int lastIndex = 0, index;
while ( (index=_traceName.find("/", lastIndex)) >=0)
@@ -4422,30 +4422,30 @@ DynPool* TraceData::dynPool()
* - <base> is a directory: Load first profile data file available
* - <base> is a file name without part/thread suffixes
*/
-void TraceData::load(const QString& base)
+void TraceData::load(const TQString& base)
{
bool baseExisting = true;
_traceName = base;
- QFileInfo finfo(base);
- QString file = finfo.fileName();
- QDir dir = finfo.dir();
+ TQFileInfo finfo(base);
+ TQString file = finfo.fileName();
+ TQDir dir = finfo.dir();
if (!finfo.exists()) {
baseExisting = false;
}
else if (finfo.isDir()) {
// search for first profile data file in directory
- dir = QDir(base);
+ dir = TQDir(base);
- QStringList prefixList;
+ TQStringList prefixList;
prefixList << "callgrind.out" << "cachegrind.out";
- for ( QStringList::Iterator it = prefixList.begin();
+ for ( TQStringList::Iterator it = prefixList.begin();
it != prefixList.end(); ++it ) {
file = *it;
// search for ".pid"
- QStringList strList = dir.entryList(file+".*", QDir::Files);
+ TQStringList strList = dir.entryList(file+".*", TQDir::Files);
if (strList.count()>0) {
int l = file.length();
file = strList.first();
@@ -4459,11 +4459,11 @@ void TraceData::load(const QString& base)
_traceName = dir.path() + "/" + file;
}
- QStringList strList;
- strList += dir.entryList(file+".*", QDir::Files);
- strList += dir.entryList(file+"-*", QDir::Files);
+ TQStringList strList;
+ strList += dir.entryList(file+".*", TQDir::Files);
+ strList += dir.entryList(file+"-*", TQDir::Files);
- baseExisting = QFile::exists(_traceName);
+ baseExisting = TQFile::exists(_traceName);
if (baseExisting)
strList << file;
@@ -4484,7 +4484,7 @@ void TraceData::load(const QString& base)
f *= 10;
}
- QStringList::Iterator it;
+ TQStringList::Iterator it;
unsigned int maxNumber = 0;
for (it = strList.begin(); it != strList.end(); ++it ) {
TracePart* p = addPart( dir.path(), *it );
@@ -4494,7 +4494,7 @@ void TraceData::load(const QString& base)
continue;
}
- const QString& str = *it;
+ const TQString& str = *it;
unsigned int pos = file.length();
// try to guess part number from file name
@@ -4535,24 +4535,24 @@ void TraceData::load(const QString& base)
updateFunctionCycles();
// clear loading messages from status bar
- if (_topLevel) _topLevel->showStatus(QString::null, 0);
+ if (_topLevel) _topLevel->showStatus(TQString::null, 0);
}
-TracePart* TraceData::addPart(const QString& dir, const QString& name)
+TracePart* TraceData::addPart(const TQString& dir, const TQString& name)
{
- QString filename = QString("%1/%2").arg(dir).arg(name);
+ TQString filename = TQString("%1/%2").arg(dir).arg(name);
#if TRACE_DEBUG
qDebug("TraceData::addPart('%s')", filename.ascii());
#endif
- QFile* file = new QFile(filename);
+ TQFile* file = new TQFile(filename);
Loader* l = Loader::matchingLoader(file);
if (!l) return 0;
if (_topLevel)
- _topLevel->connect(l, SIGNAL(updateStatus(QString, int)),
- SLOT(showStatus(QString, int)));
+ _topLevel->connect(l, TQT_SIGNAL(updateStatus(TQString, int)),
+ TQT_SLOT(showStatus(TQString, int)));
TracePart* part = new TracePart(this, file);
@@ -4615,7 +4615,7 @@ bool TraceData::activateAll(bool active)
}
-TracePart* TraceData::part(QString& name)
+TracePart* TraceData::part(TQString& name)
{
TracePart* part;
for (part=_parts.first();part;part=_parts.next())
@@ -4624,9 +4624,9 @@ TracePart* TraceData::part(QString& name)
return 0;
}
-QString TraceData::activePartRange()
+TQString TraceData::activePartRange()
{
- QString res;
+ TQString res;
int r1=-1, r2=-1, count=1;
TracePart* part;
for (part=_parts.first();part;part=_parts.next(), count++)
@@ -4635,15 +4635,15 @@ QString TraceData::activePartRange()
else if (r2 == count-1) { r2 = count; }
else {
if (!res.isEmpty()) res += ";";
- if (r1==r2) res += QString::number(r1);
- else res += QString("%1-%2").arg(r1).arg(r2);
+ if (r1==r2) res += TQString::number(r1);
+ else res += TQString("%1-%2").arg(r1).arg(r2);
r1 = r2 = count;
}
}
if (r1>=0) {
if (!res.isEmpty()) res += ";";
- if (r1==r2) res += QString::number(r1);
- else res += QString("%1-%2").arg(r1).arg(r2);
+ if (r1==r2) res += TQString::number(r1);
+ else res += TQString("%1-%2").arg(r1).arg(r2);
}
return res;
@@ -4679,7 +4679,7 @@ void TraceData::invalidateDynamicCost()
}
-TraceObject* TraceData::object(const QString& name)
+TraceObject* TraceData::object(const TQString& name)
{
TraceObject& o = _objectMap[name];
if (!o.data()) {
@@ -4696,7 +4696,7 @@ TraceObject* TraceData::object(const QString& name)
}
-TraceFile* TraceData::file(const QString& name)
+TraceFile* TraceData::file(const TQString& name)
{
TraceFile& f = _fileMap[name];
if (!f.data()) {
@@ -4714,7 +4714,7 @@ TraceFile* TraceData::file(const QString& name)
// usually only called by function()
-TraceClass* TraceData::cls(const QString& fnName, QString& shortName)
+TraceClass* TraceData::cls(const TQString& fnName, TQString& shortName)
{
int lastIndex = 0, index, pIndex;
@@ -4733,7 +4733,7 @@ TraceClass* TraceData::cls(const QString& fnName, QString& shortName)
lastIndex = index+2;
}
- QString clsName = (lastIndex < 3) ? QString::null :
+ TQString clsName = (lastIndex < 3) ? TQString::null :
fnName.left(lastIndex-2);
shortName = fnName.mid(lastIndex);
@@ -4753,11 +4753,11 @@ TraceClass* TraceData::cls(const QString& fnName, QString& shortName)
// name is inclusive class/namespace prefix
-TraceFunction* TraceData::function(const QString& name,
+TraceFunction* TraceData::function(const TQString& name,
TraceFile* file, TraceObject* object)
{
// strip class name
- QString shortName;
+ TQString shortName;
TraceClass* c = cls(name, shortName);
if (!file || !object || !c) {
@@ -4767,7 +4767,7 @@ TraceFunction* TraceData::function(const QString& name,
// Don't use file in key: A function can go over many files
// (inlined parts), but still is ONE function.
- QString key = name + object->shortName();
+ TQString key = name + object->shortName();
TraceFunctionMap::Iterator it;
it = _functionMap.find(key);
@@ -4801,7 +4801,7 @@ TraceFunctionMap::Iterator TraceData::functionIterator(TraceFunction* f)
{
// IMPORTANT: build as SAME key as used in function() above !!
- QString key;
+ TQString key;
if (f->cls()) key = f->cls()->name() + "::";
key += f->name();
@@ -4846,7 +4846,7 @@ void TraceData::update()
_dirty = false;
}
-TraceCost* TraceData::search(TraceItem::CostType t, QString name,
+TraceCost* TraceData::search(TraceItem::CostType t, TQString name,
TraceCostType* ct, TraceCost* parent)
{
TraceCost* result = 0;
@@ -5018,7 +5018,7 @@ void TraceData::updateFunctionCycles()
#if 0
int fCount = _functionMap.size(), fNo = 0, progress=0, p;
- QString msg = i18n("Recalculating Function Cycles...");
+ TQString msg = i18n("Recalculating Function Cycles...");
if (_topLevel) _topLevel->showStatus(msg,0);
#endif
@@ -5051,7 +5051,7 @@ void TraceData::updateFunctionCycles()
invalidateDynamicCost();
#if 0
- if (0) if (_topLevel) _topLevel->showStatus(QString::null,0);
+ if (0) if (_topLevel) _topLevel->showStatus(TQString::null,0);
#endif
}
diff --git a/kcachegrind/kcachegrind/tracedata.h b/kcachegrind/kcachegrind/tracedata.h
index fd9f802f..a238ba64 100644
--- a/kcachegrind/kcachegrind/tracedata.h
+++ b/kcachegrind/kcachegrind/tracedata.h
@@ -25,12 +25,12 @@
#ifndef TRACEDATA_H
#define TRACEDATA_H
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qptrlist.h>
-#include <qmap.h>
-#include <qptrvector.h>
-#include <qcolor.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqptrlist.h>
+#include <tqmap.h>
+#include <tqptrvector.h>
+#include <tqcolor.h>
#include "subcost.h"
#include "utils.h"
@@ -161,35 +161,35 @@ class TraceFile;
class TracePart;
class TraceData;
-typedef QPtrList<TraceCost> TraceCostList;
-typedef QPtrList<TraceJumpCost> TraceJumpCostList;
-typedef QPtrList<TraceCallCost> TraceCallCostList;
-typedef QPtrList<TraceInclusiveCost> TraceInclusiveCostList;
-
-typedef QPtrList<TracePartCall> TracePartCallList;
-typedef QPtrList<TracePartInstr> TracePartInstrList;
-typedef QPtrList<TracePartLine> TracePartLineList;
-typedef QPtrList<TracePartLineRegion> TracePartLineRegionList;
-typedef QPtrList<TracePartFunction> TracePartFunctionList;
-typedef QPtrList<TracePartInstrCall> TracePartInstrCallList;
-typedef QPtrList<TracePartLineCall> TracePartLineCallList;
-
-
-typedef QPtrList<TraceInstr> TraceInstrList;
-typedef QPtrList<TraceLine> TraceLineList;
-typedef QPtrList<TraceInstrCall> TraceInstrCallList;
-typedef QPtrList<TraceLineCall> TraceLineCallList;
-typedef QPtrList<TraceCall> TraceCallList;
-typedef QPtrList<TraceFile> TraceFileList;
-typedef QPtrList<TraceLineRegion> TraceLineRegionList;
-typedef QPtrList<TraceFunctionSource> TraceFunctionSourceList;
-typedef QPtrList<TraceFunction> TraceFunctionList;
-typedef QPtrList<TraceFunctionCycle> TraceFunctionCycleList;
-typedef QMap<QString, TraceObject> TraceObjectMap;
-typedef QMap<QString, TraceClass> TraceClassMap;
-typedef QMap<QString, TraceFile> TraceFileMap;
-typedef QMap<QString, TraceFunction> TraceFunctionMap;
-typedef QMap<uint, TraceLine> TraceLineMap;
+typedef TQPtrList<TraceCost> TraceCostList;
+typedef TQPtrList<TraceJumpCost> TraceJumpCostList;
+typedef TQPtrList<TraceCallCost> TraceCallCostList;
+typedef TQPtrList<TraceInclusiveCost> TraceInclusiveCostList;
+
+typedef TQPtrList<TracePartCall> TracePartCallList;
+typedef TQPtrList<TracePartInstr> TracePartInstrList;
+typedef TQPtrList<TracePartLine> TracePartLineList;
+typedef TQPtrList<TracePartLineRegion> TracePartLineRegionList;
+typedef TQPtrList<TracePartFunction> TracePartFunctionList;
+typedef TQPtrList<TracePartInstrCall> TracePartInstrCallList;
+typedef TQPtrList<TracePartLineCall> TracePartLineCallList;
+
+
+typedef TQPtrList<TraceInstr> TraceInstrList;
+typedef TQPtrList<TraceLine> TraceLineList;
+typedef TQPtrList<TraceInstrCall> TraceInstrCallList;
+typedef TQPtrList<TraceLineCall> TraceLineCallList;
+typedef TQPtrList<TraceCall> TraceCallList;
+typedef TQPtrList<TraceFile> TraceFileList;
+typedef TQPtrList<TraceLineRegion> TraceLineRegionList;
+typedef TQPtrList<TraceFunctionSource> TraceFunctionSourceList;
+typedef TQPtrList<TraceFunction> TraceFunctionList;
+typedef TQPtrList<TraceFunctionCycle> TraceFunctionCycleList;
+typedef TQMap<TQString, TraceObject> TraceObjectMap;
+typedef TQMap<TQString, TraceClass> TraceClassMap;
+typedef TQMap<TQString, TraceFile> TraceFileMap;
+typedef TQMap<TQString, TraceFunction> TraceFunctionMap;
+typedef TQMap<uint, TraceLine> TraceLineMap;
/**
@@ -207,9 +207,9 @@ class Addr
// and return number of interpreted chars.
int set(const char *s);
bool set(FixString& s);
- QString toString() const;
+ TQString toString() const;
// similar to toString(), but adds a space every 4 digits
- QString pretty() const;
+ TQString pretty() const;
// returns true if this address is in [a-distance;a+distance]
bool isInRange(Addr a, int distance);
@@ -228,7 +228,7 @@ class Addr
uint64 _v;
};
-typedef QMap<Addr, TraceInstr> TraceInstrMap;
+typedef TQMap<Addr, TraceInstr> TraceInstrMap;
/**
@@ -261,39 +261,39 @@ public:
virtual CostType type() const { return Item; }
// conversion of item type to locale independent string (e.g. for config)
- static QString typeName(CostType);
- static CostType costType(QString);
+ static TQString typeName(CostType);
+ static CostType costType(TQString);
// the versions below should be used for user visible strings, as
// these use localisation settings
- static QString i18nTypeName(CostType);
- static CostType i18nCostType(QString);
+ static TQString i18nTypeName(CostType);
+ static CostType i18nCostType(TQString);
// clean up some static data
static void cleanup();
/**
* Returns dynamic name info (without type)
*/
- virtual QString name() const;
+ virtual TQString name() const;
/**
* Same as name, but sometimes nicer for humans :-)
*/
- virtual QString prettyName() const;
+ virtual TQString prettyName() const;
/**
* Returns text of all cost metrics
*/
- virtual QString costString(TraceCostMapping*);
+ virtual TQString costString(TraceCostMapping*);
/**
* Returns type name + dynamic name
*/
- QString fullName() const;
+ TQString fullName() const;
/**
* Returns full name + cost text
*/
- QString toString();
+ TQString toString();
/**
* Set all cost counters to zero
@@ -342,7 +342,7 @@ public:
TraceItem* _dep;
private:
- static QString *_typeName, *_i18nTypeName;
+ static TQString *_typeName, *_i18nTypeName;
};
@@ -368,7 +368,7 @@ public:
virtual ~TraceCost();
virtual CostType type() const { return Cost; }
- virtual QString costString(TraceCostMapping*);
+ virtual TQString costString(TraceCostMapping*);
virtual void clear();
@@ -403,7 +403,7 @@ public:
/** Returns a cost attribute converted to a string
* (with space after every 3 digits)
*/
- QString prettySubCost(TraceCostType*);
+ TQString prettySubCost(TraceCostType*);
protected:
virtual void update();
@@ -442,30 +442,30 @@ public:
* <longName> is a long localized string, e.g. "L1 Read Miss"
* <formula> uses short names to reference other types
*/
- TraceCostType(QString name,
- QString longName = QString::null,
- QString formula = QString::null);
+ TraceCostType(TQString name,
+ TQString longName = TQString::null,
+ TQString formula = TQString::null);
- void setName(QString n) { _name = n; }
- void setLongName(QString n) { _longName = n; }
+ void setName(TQString n) { _name = n; }
+ void setLongName(TQString n) { _longName = n; }
void setMapping(TraceCostMapping* m);
- void setFormula(QString);
+ void setFormula(TQString);
// default arg is for specifying a real type, but index unknown
void setRealIndex(int r = TraceCost::MaxRealIndex);
- const QString& name() { return _name; }
- const QString& longName() { return _longName; }
- const QString& formula() { return _formula; }
+ const TQString& name() { return _name; }
+ const TQString& longName() { return _longName; }
+ const TQString& formula() { return _formula; }
TraceCostMapping* mapping() { return _mapping; }
int realIndex() { return _realIndex; }
bool isReal() { return _formula.isEmpty(); }
- QColor color();
+ TQColor color();
/*
* returns true if all cost type names can be resolved in formula
*/
bool parseFormula();
- QString parsedFormula();
+ TQString parsedFormula();
SubCost subCost(TraceCost*);
@@ -478,23 +478,23 @@ public:
// application wide known types, referenced by short name
// next 2 functions return a new type object instance
- static TraceCostType* knownRealType(QString);
- static TraceCostType* knownVirtualType(QString);
+ static TraceCostType* knownRealType(TQString);
+ static TraceCostType* knownVirtualType(TQString);
static void add(TraceCostType*);
- static bool remove(QString);
+ static bool remove(TQString);
static int knownTypeCount();
static TraceCostType* knownType(int);
private:
- QString _name, _longName, _formula;
+ TQString _name, _longName, _formula;
TraceCostMapping* _mapping;
bool _parsed, _inParsing;
// index MaxRealIndex is for constant addition
int _coefficient[MaxRealIndexValue];
int _realIndex;
- static QPtrList<TraceCostType>* _knownTypes;
+ static TQPtrList<TraceCostType>* _knownTypes;
};
@@ -515,10 +515,10 @@ public:
* Defines a sub mapping with a list of real types
* If <create> is false, checks if this is a existing sub mapping.
*/
- TraceSubMapping* subMapping(QString types, bool create = true);
+ TraceSubMapping* subMapping(TQString types, bool create = true);
// "knows" about some real types
- int addReal(QString);
+ int addReal(TQString);
int add(TraceCostType*);
bool remove(TraceCostType*);
int realCount() { return _realCount; }
@@ -527,11 +527,11 @@ public:
TraceCostType* type(int);
TraceCostType* realType(int);
TraceCostType* virtualType(int);
- TraceCostType* type(QString);
- TraceCostType* typeForLong(QString);
- int realIndex(QString);
- int index(QString);
- QColor* realColors() { return _realColor; }
+ TraceCostType* type(TQString);
+ TraceCostType* typeForLong(TQString);
+ int realIndex(TQString);
+ int index(TQString);
+ TQColor* realColors() { return _realColor; }
/**
* Adds all known virtual types that can be parsed
@@ -541,7 +541,7 @@ public:
private:
// we support only a fixed number of real and virtual types
TraceCostType* _real[MaxRealIndexValue];
- QColor _realColor[MaxRealIndexValue];
+ TQColor _realColor[MaxRealIndexValue];
TraceCostType* _virtual[MaxRealIndexValue];
int _realCount, _virtualCount;
};
@@ -565,7 +565,7 @@ class TraceSubMapping
public:
TraceSubMapping(TraceCostMapping*);
- bool append(QString, bool create=true);
+ bool append(TQString, bool create=true);
bool append(int);
void clear();
@@ -611,7 +611,7 @@ class TraceJumpCost: public TraceItem
virtual ~TraceJumpCost();
// reimplementations for cost addition
- virtual QString costString(TraceCostMapping* m);
+ virtual TQString costString(TraceCostMapping* m);
virtual void clear();
void addCost(TraceJumpCost*);
@@ -638,12 +638,12 @@ class TraceCallCost: public TraceCost
virtual ~TraceCallCost();
// reimplementations for cost addition
- virtual QString costString(TraceCostMapping* m);
+ virtual TQString costString(TraceCostMapping* m);
virtual void clear();
// additional cost metric
SubCost callCount();
- QString prettyCallCount();
+ TQString prettyCallCount();
void addCallCount(SubCost c);
protected:
@@ -661,7 +661,7 @@ class TraceInclusiveCost: public TraceCost
virtual ~TraceInclusiveCost();
// reimplementations for cost addition
- virtual QString costString(TraceCostMapping* m);
+ virtual TQString costString(TraceCostMapping* m);
virtual void clear();
// additional cost metric
@@ -963,7 +963,7 @@ public:
virtual CostType type() const { return PartFunction; }
virtual void update();
- virtual QString costString(TraceCostMapping* m);
+ virtual TQString costString(TraceCostMapping* m);
void addPartInstr(TracePartInstr*);
void addPartLine(TracePartLine*);
@@ -991,8 +991,8 @@ public:
// additional cost metrics
SubCost calledCount();
SubCost callingCount();
- QString prettyCalledCount();
- QString prettyCallingCount();
+ TQString prettyCalledCount();
+ TQString prettyCallingCount();
int calledContexts();
int callingContexts();
@@ -1026,7 +1026,7 @@ public:
virtual ~TracePartClass();
virtual CostType type() const { return PartClass; }
- QString prettyName() const;
+ TQString prettyName() const;
TraceClass* cls() { return (TraceClass*)_dep; }
void addPartFunction(TracePartFunction* f) { addDep(f); }
@@ -1073,28 +1073,28 @@ public:
class TracePart: public TraceListCost
{
public:
- TracePart(TraceData*, QFile* file);
+ TracePart(TraceData*, TQFile* file);
virtual ~TracePart();
virtual CostType type() const { return Part; }
virtual TracePart* part() { return this; }
virtual const TracePart* part() const { return this; }
- QString shortName() const;
- QString prettyName() const;
- QFile* file() const { return _file; }
- QString name() const { return _name; }
- QString description() const { return _descr; }
- QString trigger() const { return _trigger; }
- QString timeframe() const { return _timeframe; }
- QString version() const { return _version; }
+ TQString shortName() const;
+ TQString prettyName() const;
+ TQFile* file() const { return _file; }
+ TQString name() const { return _name; }
+ TQString description() const { return _descr; }
+ TQString trigger() const { return _trigger; }
+ TQString timeframe() const { return _timeframe; }
+ TQString version() const { return _version; }
int partNumber() { return _number; }
int threadID() { return _tid; }
int processID() { return _pid; }
- void setDescription(const QString& d) { _descr = d; }
- void setTrigger(const QString& t) { _trigger = t; }
- void setTimeframe(const QString& t) { _timeframe = t; }
- void setVersion(const QString& v) { _version = v; }
+ void setDescription(const TQString& d) { _descr = d; }
+ void setTrigger(const TQString& t) { _trigger = t; }
+ void setTimeframe(const TQString& t) { _timeframe = t; }
+ void setVersion(const TQString& v) { _version = v; }
void setPartNumber(int n);
void setThreadID(int t);
void setProcessID(int p);
@@ -1108,12 +1108,12 @@ public:
bool isActive() { return _active; }
private:
- QFile* _file;
- QString _name;
- QString _descr;
- QString _trigger;
- QString _timeframe;
- QString _version;
+ TQFile* _file;
+ TQString _name;
+ TQString _descr;
+ TQString _trigger;
+ TQString _timeframe;
+ TQString _version;
int _number, _tid, _pid;
@@ -1127,10 +1127,10 @@ private:
};
-class TracePartList: public QPtrList<TracePart>
+class TracePartList: public TQPtrList<TracePart>
{
public:
- QString names() const;
+ TQString names() const;
protected:
int compareItems ( Item item1, Item item2 );
};
@@ -1153,7 +1153,7 @@ public:
virtual ~TraceInstrJump();
virtual CostType type() const { return InstrJump; }
- virtual QString name() const;
+ virtual TQString name() const;
virtual void update();
@@ -1171,7 +1171,7 @@ public:
TracePartInstrJump* _first;
};
-class TraceInstrJumpList: public QPtrList<TraceInstrJump>
+class TraceInstrJumpList: public TQPtrList<TraceInstrJump>
{
public:
TraceInstrJumpList() { _sortLow = true; }
@@ -1196,7 +1196,7 @@ class TraceLineJump: public TraceJumpListCost
virtual ~TraceLineJump();
virtual CostType type() const { return LineJump; }
- virtual QString name() const;
+ virtual TQString name() const;
TraceLine* lineFrom() const { return _lineFrom; }
TraceLine* lineTo() const { return _lineTo; }
@@ -1214,7 +1214,7 @@ class TraceLineJump: public TraceJumpListCost
};
-class TraceLineJumpList: public QPtrList<TraceLineJump>
+class TraceLineJumpList: public TQPtrList<TraceLineJump>
{
public:
TraceLineJumpList() { _sortLow = true; }
@@ -1238,7 +1238,7 @@ class TraceInstrCall: public TraceCallListCost
virtual ~TraceInstrCall();
virtual CostType type() const { return InstrCall; }
- virtual QString name() const;
+ virtual TQString name() const;
TraceInstr* instr() const { return _instr; }
TraceCall* call() const { return _call; }
@@ -1265,7 +1265,7 @@ class TraceLineCall: public TraceCallListCost
virtual ~TraceLineCall();
virtual CostType type() const { return LineCall; }
- virtual QString name() const;
+ virtual TQString name() const;
TraceLine* line() const { return _line; }
TraceCall* call() const { return _call; }
@@ -1293,7 +1293,7 @@ class TraceCall: public TraceCallListCost
virtual ~TraceCall();
virtual CostType type() const { return Call; }
- virtual QString name() const;
+ virtual TQString name() const;
// calls a function itself?
bool isRecursion() { return _caller == _called; }
@@ -1313,8 +1313,8 @@ class TraceCall: public TraceCallListCost
TraceFunction* caller(bool skipCycle=false) const;
TraceFunction* called(bool skipCycle=false) const;
- QString callerName(bool skipCycle=false) const;
- QString calledName(bool skipCycle=false) const;
+ TQString callerName(bool skipCycle=false) const;
+ TQString calledName(bool skipCycle=false) const;
const TraceLineCallList& lineCalls() const { return _lineCalls; }
const TraceInstrCallList& instrCalls() const { return _instrCalls; }
@@ -1346,8 +1346,8 @@ class TraceInstr: public TraceListCost
virtual ~TraceInstr();
virtual CostType type() const { return Instr; }
- virtual QString name() const;
- QString prettyName() const;
+ virtual TQString name() const;
+ TQString prettyName() const;
bool isValid() { return _addr != Addr(0); }
@@ -1395,8 +1395,8 @@ public:
virtual ~TraceLine();
virtual CostType type() const { return Line; }
- virtual QString name() const;
- QString prettyName() const;
+ virtual TQString name() const;
+ TQString prettyName() const;
// factories
TracePartLine* partLine(TracePart* part,
@@ -1440,14 +1440,14 @@ class TraceCostItem: public TraceInclusiveListCost
TraceCostItem();
virtual ~TraceCostItem();
- virtual QString name() const { return _name; }
- virtual void setName(const QString& name) { _name = name; }
+ virtual TQString name() const { return _name; }
+ virtual void setName(const TQString& name) { _name = name; }
protected:
bool onlyActiveParts() { return true; }
protected:
- QString _name;
+ TQString _name;
};
@@ -1457,7 +1457,7 @@ class TraceCostItem: public TraceInclusiveListCost
class TraceLineRegion: public TraceInclusiveListCost
{
public:
- TraceLineRegion(uint from, uint to, QString name);
+ TraceLineRegion(uint from, uint to, TQString name);
virtual ~TraceLineRegion();
virtual CostType type() const { return LineRegion; }
@@ -1465,14 +1465,14 @@ public:
uint from() const { return _from; }
uint to() const { return _to; }
- QString name() const { return _name; }
+ TQString name() const { return _name; }
// factories
TracePartLine* partLineRegion(TracePart* part,
TracePartFunction* partFunction);
private:
uint _from, _to;
- QString _name;
+ TQString _name;
};
@@ -1491,7 +1491,7 @@ public:
virtual ~TraceFunctionSource();
virtual CostType type() const { return FunctionSource; }
- virtual QString name() const;
+ virtual TQString name() const;
// reimplementation for dependency map
virtual void update();
@@ -1506,7 +1506,7 @@ public:
/* factories */
TraceLine* line(uint lineno, bool createNew = true);
- TraceLineRegion* region(uint from, uint to, QString name,
+ TraceLineRegion* region(uint from, uint to, TQString name,
bool createNew = true);
private:
@@ -1569,8 +1569,8 @@ class TraceAssoziation
bool _valid;
};
-typedef QPtrList<TraceAssoziation> TraceAssoziationList;
-typedef QMap<TraceFunction*, TraceCall*> TraceCallMap;
+typedef TQPtrList<TraceAssoziation> TraceAssoziationList;
+typedef TQMap<TraceFunction*, TraceCall*> TraceCallMap;
/**
* A traced function
@@ -1583,7 +1583,7 @@ class TraceFunction: public TraceCostItem
{
public:
TraceFunction();
- TraceFunction(TraceData* data, const QString& name,
+ TraceFunction(TraceData* data, const TQString& name,
TraceClass* cls, TraceFile* file, TraceObject* object);
virtual ~TraceFunction();
@@ -1609,14 +1609,14 @@ class TraceFunction: public TraceCostItem
* A function can have a lot of code from different sources (inlined);
* maxItems limits this list. Default is full list
*/
- QString location(int maxFiles = 0) const;
+ TQString location(int maxFiles = 0) const;
- QString prettyName() const;
- QString prettyLocation(int maxFiles = 0) const;
- QString prettyNameWithLocation(int maxFiles = 1) const;
- void addPrettyLocation(QString&, int maxFiles = 1) const;
+ TQString prettyName() const;
+ TQString prettyLocation(int maxFiles = 0) const;
+ TQString prettyNameWithLocation(int maxFiles = 1) const;
+ void addPrettyLocation(TQString&, int maxFiles = 1) const;
// type + name + location
- QString info() const;
+ TQString info() const;
TraceClass* cls() const { return _cls; }
TraceFile* file() const { return _file; }
@@ -1636,8 +1636,8 @@ class TraceFunction: public TraceCostItem
// cost metrics
SubCost calledCount();
SubCost callingCount();
- QString prettyCalledCount();
- QString prettyCallingCount();
+ TQString prettyCalledCount();
+ TQString prettyCallingCount();
int calledContexts();
int callingContexts();
@@ -1669,7 +1669,7 @@ class TraceFunction: public TraceCostItem
TraceFunctionCycle* _cycle;
private:
- bool isUniquePrefix(QString) const;
+ bool isUniquePrefix(TQString) const;
TraceFunctionMap::Iterator _myMapIterator;
TraceClass* _cls;
@@ -1692,7 +1692,7 @@ class TraceFunction: public TraceCostItem
int _calledContexts, _callingContexts;
};
-typedef QMap<TraceFunction*,int> TraceFunctionSet;
+typedef TQMap<TraceFunction*,int> TraceFunctionSet;
/**
* A cycle of recursive calling functions.
@@ -1739,7 +1739,7 @@ class TraceClass: public TraceCostItem
virtual ~TraceClass();
virtual CostType type() const { return Class; }
- virtual QString prettyName() const;
+ virtual TQString prettyName() const;
void addFunction(TraceFunction*);
const TraceFunctionList& functions() const { return _functions; }
@@ -1763,17 +1763,17 @@ class TraceFile: public TraceCostItem
virtual ~TraceFile();
virtual CostType type() const { return File; }
- void setDirectory(const QString& dir);
- void resetDirectory() { _dir = QString::null; }
- QString directory();
+ void setDirectory(const TQString& dir);
+ void resetDirectory() { _dir = TQString::null; }
+ TQString directory();
void addFunction(TraceFunction*);
void addSourceFile(TraceFunctionSource*);
// without path
- QString shortName() const;
- QString prettyName() const;
- QString prettyLongName() const;
+ TQString shortName() const;
+ TQString prettyName() const;
+ TQString prettyLongName() const;
const TraceFunctionList& functions() const { return _functions; }
const TraceFunctionSourceList& sourceFiles() const
{ return _sourceFiles; }
@@ -1784,7 +1784,7 @@ class TraceFile: public TraceCostItem
private:
TraceFunctionList _functions;
TraceFunctionSourceList _sourceFiles;
- QString _dir;
+ TQString _dir;
};
@@ -1802,9 +1802,9 @@ class TraceObject: public TraceCostItem
void addFunction(TraceFunction*);
- virtual void setName(const QString& name);
- QString shortName() const { return _shortName; }
- QString prettyName() const;
+ virtual void setName(const TQString& name);
+ TQString shortName() const { return _shortName; }
+ TQString prettyName() const;
const TraceFunctionList& functions() const { return _functions; }
// part factory
@@ -1812,7 +1812,7 @@ class TraceObject: public TraceCostItem
private:
TraceFunctionList _functions;
- QString _shortName;
+ TQString _shortName;
};
@@ -1826,7 +1826,7 @@ class TraceData: public TraceCost
{
public:
TraceData(TopLevel* top = 0);
- TraceData(const QString& base);
+ TraceData(const TQString& base);
virtual ~TraceData();
virtual CostType type() const { return Data; }
@@ -1838,7 +1838,7 @@ class TraceData: public TraceCost
*
* This adjusts the TraceCostMapping according to given cost types
*/
- void load(const QString&);
+ void load(const TQString&);
/** returns true if something changed. These do NOT
* invalidate the dynamic costs on a activation change,
@@ -1852,14 +1852,14 @@ class TraceData: public TraceCost
bool activateAll(bool active=true);
TracePartList parts() const { return _parts; }
- TracePart* part(QString& name);
+ TracePart* part(TQString& name);
// with path
- QString traceName() const { return _traceName; }
+ TQString traceName() const { return _traceName; }
// without path
- QString shortTraceName() const;
- QString activePartRange();
+ TQString shortTraceName() const;
+ TQString activePartRange();
TraceCostMapping* mapping() { return &_mapping; }
@@ -1868,11 +1868,11 @@ class TraceData: public TraceCost
DynPool* dynPool();
// factories for object/file/class/function/line instances
- TraceObject* object(const QString& name);
- TraceFile* file(const QString& name);
- TraceClass* cls(const QString& fnName, QString& shortName);
+ TraceObject* object(const TQString& name);
+ TraceFile* file(const TQString& name);
+ TraceClass* cls(const TQString& fnName, TQString& shortName);
// function creation involves class creation if needed
- TraceFunction* function(const QString& name, TraceFile*, TraceObject*);
+ TraceFunction* function(const TQString& name, TraceFile*, TraceObject*);
// factory for function cycles
TraceFunctionCycle* functionCycle(TraceFunction*);
@@ -1884,7 +1884,7 @@ class TraceData: public TraceCost
* For Function, a parent of type Obj/File/Class can be given, but
* isn't needed.
*/
- TraceCost* search(TraceItem::CostType, QString,
+ TraceCost* search(TraceItem::CostType, TQString,
TraceCostType* ct = 0, TraceCost* parent = 0);
// for pretty function names without signature if unique...
@@ -1901,8 +1901,8 @@ class TraceData: public TraceCost
TraceCost* callMax() { return &_callMax; }
- void setCommand(const QString& command) { _command = command; }
- QString command() const { return _command; }
+ void setCommand(const TQString& command) { _command = command; }
+ TQString command() const { return _command; }
TraceCost* totals() { return &_totals; }
void setMaxThreadID(int tid) { _maxThreadID = tid; }
int maxThreadID() const { return _maxThreadID; }
@@ -1927,7 +1927,7 @@ class TraceData: public TraceCost
private:
void init();
// add trace part: events from one trace file
- TracePart* addPart(const QString& dir, const QString& file);
+ TracePart* addPart(const TQString& dir, const TQString& file);
// for progress bar callbacks
TopLevel* _topLevel;
@@ -1949,8 +1949,8 @@ class TraceData: public TraceCost
TraceClassMap _classMap;
TraceFileMap _fileMap;
TraceFunctionMap _functionMap;
- QString _command;
- QString _traceName;
+ TQString _command;
+ TQString _traceName;
// Max of all costs of calls: This allows to see if the incl. cost can
// be hidden for a cost type, as it's always the same as self cost
diff --git a/kcachegrind/kcachegrind/traceitemview.cpp b/kcachegrind/kcachegrind/traceitemview.cpp
index 990d2d0e..d11f02b6 100644
--- a/kcachegrind/kcachegrind/traceitemview.cpp
+++ b/kcachegrind/kcachegrind/traceitemview.cpp
@@ -20,7 +20,7 @@
* Trace Item View
*/
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kconfig.h>
#include <klocale.h>
#include <kdebug.h>
@@ -48,7 +48,7 @@ TraceItemView::TraceItemView(TraceItemView* parentView, TopLevel* top)
_pos = Hidden;
}
-QString TraceItemView::whatsThis() const
+TQString TraceItemView::whatsThis() const
{
return i18n("No description available");
}
@@ -59,19 +59,19 @@ void TraceItemView::select(TraceItem* i)
}
KConfigGroup* TraceItemView::configGroup(KConfig* c,
- QString group, QString post)
+ TQString group, TQString post)
{
- QStringList gList = c->groupList();
+ TQStringList gList = c->groupList();
if (gList.contains((group+post).ascii()) ) group += post;
return new KConfigGroup(c, group);
}
void TraceItemView::writeConfigEntry(KConfigBase* c, const char* pKey,
- QString value, const char* def, bool bNLS)
+ TQString value, const char* def, bool bNLS)
{
if (!c) return;
if ((value.isEmpty() && ((def == 0) || (*def == 0))) ||
- (value == QString(def)))
+ (value == TQString(def)))
c->deleteEntry(pKey);
else
c->writeEntry(pKey, value, true, false, bNLS);
@@ -107,15 +107,15 @@ void TraceItemView::writeConfigEntry(KConfigBase* c, const char* pKey,
c->writeEntry(pKey, value);
}
-void TraceItemView::readViewConfig(KConfig*, QString, QString, bool)
+void TraceItemView::readViewConfig(KConfig*, TQString, TQString, bool)
{}
#if 1
-void TraceItemView::saveViewConfig(KConfig*, QString, QString, bool)
+void TraceItemView::saveViewConfig(KConfig*, TQString, TQString, bool)
{}
#else
void TraceItemView::saveViewConfig(KConfig* c,
- QString prefix, QString postfix, bool)
+ TQString prefix, TQString postfix, bool)
{
// write a dummy config entry to see missing virtual functions
KConfigGroup g(c, (prefix+postfix).ascii());
@@ -168,7 +168,7 @@ bool TraceItemView::set(int changeType, TraceData* d,
bool TraceItemView::isViewVisible()
{
- QWidget* w = widget();
+ TQWidget* w = widget();
if (w)
return w->isVisible();
return false;
@@ -432,12 +432,12 @@ void TraceItemView::activated(Direction d)
if (_topLevel) _topLevel->setDirectionDelayed(d);
}
-void TraceItemView::addCostMenu(QPopupMenu* p, bool withCost2)
+void TraceItemView::addCostMenu(TQPopupMenu* p, bool withCost2)
{
if (_topLevel) _topLevel->addCostMenu(p, withCost2);
}
-void TraceItemView::addGoMenu(QPopupMenu* p)
+void TraceItemView::addGoMenu(TQPopupMenu* p)
{
if (_topLevel) _topLevel->addGoMenu(p);
}
diff --git a/kcachegrind/kcachegrind/traceitemview.h b/kcachegrind/kcachegrind/traceitemview.h
index d860072a..d42de924 100644
--- a/kcachegrind/kcachegrind/traceitemview.h
+++ b/kcachegrind/kcachegrind/traceitemview.h
@@ -72,10 +72,10 @@ public:
TraceItemView(TraceItemView* parentView, TopLevel* top = 0);
virtual ~TraceItemView() {}
- virtual QString whatsThis() const;
+ virtual TQString whatsThis() const;
- static KConfigGroup* configGroup(KConfig*, QString prefix, QString postfix);
- static void writeConfigEntry(KConfigBase*, const char* pKey, QString value,
+ static KConfigGroup* configGroup(KConfig*, TQString prefix, TQString postfix);
+ static void writeConfigEntry(KConfigBase*, const char* pKey, TQString value,
const char* def, bool bNLS = false);
static void writeConfigEntry(KConfigBase*, const char* pKey,
int value, int def);
@@ -83,9 +83,9 @@ public:
bool value, bool def);
static void writeConfigEntry(KConfigBase*, const char* pKey,
double value, double def);
- virtual void readViewConfig(KConfig*, QString prefix, QString postfix,
+ virtual void readViewConfig(KConfig*, TQString prefix, TQString postfix,
bool withOptions);
- virtual void saveViewConfig(KConfig*, QString prefix, QString postfix,
+ virtual void saveViewConfig(KConfig*, TQString prefix, TQString postfix,
bool withOptions);
// Immediate remove all references to old data, and set the new.
@@ -142,12 +142,12 @@ public:
void setPosition(Position p) { _pos = p; }
Position position() const { return _pos; }
- void setTitle(QString t) { _title = t; }
- QString title() const { return _title; }
+ void setTitle(TQString t) { _title = t; }
+ TQString title() const { return _title; }
// We depend on derived class to be a widget.
// Force overiding by making this abstract.
- virtual QWidget* widget() = 0;
+ virtual TQWidget* widget() = 0;
/**
* This function is called when a new item should become active.
@@ -161,8 +161,8 @@ public:
virtual TraceItem* canShow(TraceItem* i) { return i; }
/* convenience functions for often used context menu items */
- void addCostMenu(QPopupMenu*,bool withCost2 = true);
- void addGoMenu(QPopupMenu*);
+ void addCostMenu(TQPopupMenu*,bool withCost2 = true);
+ void addGoMenu(TQPopupMenu*);
protected:
// helpers to call selected()/activated() of parentView
@@ -197,7 +197,7 @@ private:
TraceCostType *_newCostType, *_newCostType2;
TraceItem::CostType _newGroupType;
- QString _title;
+ TQString _title;
int _status;
bool _inUpdate;
Position _pos;
diff --git a/kcachegrind/kcachegrind/treemap.cpp b/kcachegrind/kcachegrind/treemap.cpp
index 3ccc34f9..fe01c796 100644
--- a/kcachegrind/kcachegrind/treemap.cpp
+++ b/kcachegrind/kcachegrind/treemap.cpp
@@ -18,16 +18,16 @@
/*
* A Widget for visualizing hierarchical metrics as areas.
- * The API is similar to QListView.
+ * The API is similar to TQListView.
*/
#include <math.h>
-#include <qpainter.h>
-#include <qtooltip.h>
-#include <qregexp.h>
-#include <qstyle.h>
-#include <qpopupmenu.h>
+#include <tqpainter.h>
+#include <tqtooltip.h>
+#include <tqregexp.h>
+#include <tqstyle.h>
+#include <tqpopupmenu.h>
#include <klocale.h>
#include <kconfig.h>
@@ -56,7 +56,7 @@ StoredDrawParams::StoredDrawParams()
// field array has size 0
}
-StoredDrawParams::StoredDrawParams(QColor c,
+StoredDrawParams::StoredDrawParams(TQColor c,
bool selected, bool current)
{
_backColor = c;
@@ -70,18 +70,18 @@ StoredDrawParams::StoredDrawParams(QColor c,
// field array has size 0
}
-QString StoredDrawParams::text(int f) const
+TQString StoredDrawParams::text(int f) const
{
if ((f<0) || (f >= (int)_field.size()))
- return QString::null;
+ return TQString::null;
return _field[f].text;
}
-QPixmap StoredDrawParams::pixmap(int f) const
+TQPixmap StoredDrawParams::pixmap(int f) const
{
if ((f<0) || (f >= (int)_field.size()))
- return QPixmap();
+ return TQPixmap();
return _field[f].pix;
}
@@ -102,10 +102,10 @@ int StoredDrawParams::maxLines(int f) const
return _field[f].maxLines;
}
-const QFont& StoredDrawParams::font() const
+const TQFont& StoredDrawParams::font() const
{
- static QFont* f = 0;
- if (!f) f = new QFont(QApplication::font());
+ static TQFont* f = 0;
+ if (!f) f = new TQFont(TQApplication::font());
return *f;
}
@@ -125,7 +125,7 @@ void StoredDrawParams::ensureField(int f)
}
-void StoredDrawParams::setField(int f, const QString& t, QPixmap pm,
+void StoredDrawParams::setField(int f, const TQString& t, TQPixmap pm,
Position p, int maxLines)
{
if (f<0 || f>=MAX_FIELD) return;
@@ -137,7 +137,7 @@ void StoredDrawParams::setField(int f, const QString& t, QPixmap pm,
_field[f].maxLines = maxLines;
}
-void StoredDrawParams::setText(int f, const QString& t)
+void StoredDrawParams::setText(int f, const TQString& t)
{
if (f<0 || f>=MAX_FIELD) return;
ensureField(f);
@@ -145,7 +145,7 @@ void StoredDrawParams::setText(int f, const QString& t)
_field[f].text = t;
}
-void StoredDrawParams::setPixmap(int f, const QPixmap& pm)
+void StoredDrawParams::setPixmap(int f, const TQPixmap& pm)
{
if (f<0 || f>=MAX_FIELD) return;
ensureField(f);
@@ -175,7 +175,7 @@ void StoredDrawParams::setMaxLines(int f, int m)
// RectDrawing
//
-RectDrawing::RectDrawing(QRect r)
+RectDrawing::RectDrawing(TQRect r)
{
_fm = 0;
_dp = 0;
@@ -204,7 +204,7 @@ void RectDrawing::setDrawParams(DrawParams* dp)
_dp = dp;
}
-void RectDrawing::setRect(QRect r)
+void RectDrawing::setRect(TQRect r)
{
_rect = r;
@@ -218,7 +218,7 @@ void RectDrawing::setRect(QRect r)
_fontHeight = 0;
}
-QRect RectDrawing::remainingRect(DrawParams* dp)
+TQRect RectDrawing::remainingRect(DrawParams* dp)
{
if (!dp) dp = drawParams();
@@ -243,20 +243,20 @@ QRect RectDrawing::remainingRect(DrawParams* dp)
}
-void RectDrawing::drawBack(QPainter* p, DrawParams* dp)
+void RectDrawing::drawBack(TQPainter* p, DrawParams* dp)
{
if (!dp) dp = drawParams();
if (_rect.width()<=0 || _rect.height()<=0) return;
- QRect r = _rect;
- QColor normal = dp->backColor();
+ TQRect r = _rect;
+ TQColor normal = dp->backColor();
if (dp->selected()) normal = normal.light();
bool isCurrent = dp->current();
if (dp->drawFrame() || isCurrent) {
// 3D raised/sunken frame effect...
- QColor high = normal.light();
- QColor low = normal.dark();
+ TQColor high = normal.light();
+ TQColor low = normal.dark();
p->setPen( isCurrent ? low:high);
p->drawLine(r.left(), r.top(), r.right(), r.top());
p->drawLine(r.left(), r.top(), r.left(), r.bottom());
@@ -272,7 +272,7 @@ void RectDrawing::drawBack(QPainter* p, DrawParams* dp)
bool goDark = qGray(normal.rgb())>128;
int rBase, gBase, bBase;
normal.rgb(&rBase, &gBase, &bBase);
- p->setBrush(QBrush::NoBrush);
+ p->setBrush(TQBrush::NoBrush);
// shade parameters:
int d = 7;
@@ -293,7 +293,7 @@ void RectDrawing::drawBack(QPainter* p, DrawParams* dp)
int gDiff = goDark ? -gBase/d : (255-gBase)/d;
int bDiff = goDark ? -bBase/d : (255-bBase)/d;
- QColor shadeColor;
+ TQColor shadeColor;
while (factor<.95) {
shadeColor.setRgb((int)(rBase+factor*rDiff+.5),
(int)(gBase+factor*gDiff+.5),
@@ -332,22 +332,22 @@ void RectDrawing::drawBack(QPainter* p, DrawParams* dp)
}
// fill inside
- p->setPen(QPen::NoPen);
+ p->setPen(TQPen::NoPen);
p->setBrush(normal);
p->drawRect(r);
}
-bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp)
+bool RectDrawing::drawField(TQPainter* p, int f, DrawParams* dp)
{
if (!dp) dp = drawParams();
if (!_fm) {
- _fm = new QFontMetrics(dp->font());
+ _fm = new TQFontMetrics(dp->font());
_fontHeight = _fm->height();
}
- QRect r = _rect;
+ TQRect r = _rect;
if (0) kdDebug(90100) << "DrawField: Rect " << r.x() << "/" << r.y()
<< " - " << r.width() << "x" << r.height() << endl;
@@ -487,9 +487,9 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp)
// get text and pixmap now, only if we need to, because it is possible
// that they are calculated on demand (and this can take some time)
- QString name = dp->text(f);
+ TQString name = dp->text(f);
if (name.isEmpty()) return 0;
- QPixmap pix = dp->pixmap(f);
+ TQPixmap pix = dp->pixmap(f);
// check if pixmap can be drawn
int pixW = pix.width();
@@ -551,14 +551,14 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp)
* If the text is to be written at the bottom, we start with the
* end of the string (so everything is reverted)
*/
- QString remaining;
+ TQString remaining;
int origLines = lines;
while (lines>0) {
if (w>width && lines>1) {
int lastBreakPos = name.length(), lastWidth = w;
int len = name.length();
- QChar::Category caOld, ca;
+ TQChar::Category caOld, ca;
if (!isBottom) {
// start with comparing categories of last 2 chars
@@ -568,8 +568,8 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp)
ca = name[len-1].category();
if (ca != caOld) {
// "Aa" has no break between...
- if (ca == QChar::Letter_Uppercase &&
- caOld == QChar::Letter_Lowercase) {
+ if (ca == TQChar::Letter_Uppercase &&
+ caOld == TQChar::Letter_Lowercase) {
caOld = ca;
continue;
}
@@ -583,7 +583,7 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp)
w = lastWidth;
remaining = name.mid(lastBreakPos);
// remove space on break point
- if (name[lastBreakPos-1].category() == QChar::Separator_Space)
+ if (name[lastBreakPos-1].category() == TQChar::Separator_Space)
name = name.left(lastBreakPos-1);
else
name = name.left(lastBreakPos);
@@ -597,8 +597,8 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp)
if (ca != caOld) {
// "Aa" has no break between...
- if (caOld == QChar::Letter_Uppercase &&
- ca == QChar::Letter_Lowercase) {
+ if (caOld == TQChar::Letter_Uppercase &&
+ ca == TQChar::Letter_Lowercase) {
caOld = ca;
continue;
}
@@ -612,14 +612,14 @@ bool RectDrawing::drawField(QPainter* p, int f, DrawParams* dp)
w = lastWidth;
remaining = name.left(l-lastBreakPos);
// remove space on break point
- if (name[l-lastBreakPos].category() == QChar::Separator_Space)
+ if (name[l-lastBreakPos].category() == TQChar::Separator_Space)
name = name.right(lastBreakPos-1);
else
name = name.right(lastBreakPos);
}
}
else
- remaining = QString::null;
+ remaining = TQString::null;
/* truncate and add ... if needed */
if (w>width) {
@@ -779,8 +779,8 @@ TreeMapItem::TreeMapItem(TreeMapItem* parent, double value)
TreeMapItem::TreeMapItem(TreeMapItem* parent, double value,
- QString text1, QString text2,
- QString text3, QString text4)
+ TQString text1, TQString text2,
+ TQString text3, TQString text4)
{
_value = value;
_parent = parent;
@@ -864,13 +864,13 @@ void TreeMapItem::refresh()
}
-QStringList TreeMapItem::path(int textNo) const
+TQStringList TreeMapItem::path(int textNo) const
{
- QStringList list(text(textNo));
+ TQStringList list(text(textNo));
TreeMapItem* i = _parent;
while (i) {
- QString text = i->text(textNo);
+ TQString text = i->text(textNo);
if (!text.isEmpty())
list.prepend(i->text(textNo));
i = i->_parent;
@@ -937,7 +937,7 @@ DrawParams::Position TreeMapItem::position(int f) const
}
// use widget font
-const QFont& TreeMapItem::font() const
+const TQFont& TreeMapItem::font() const
{
return _widget->currentFont();
}
@@ -1016,7 +1016,7 @@ TreeMapItemList* TreeMapItem::children()
void TreeMapItem::clearItemRect()
{
- _rect = QRect();
+ _rect = TQRect();
clearFreeRects();
}
@@ -1025,13 +1025,13 @@ void TreeMapItem::clearFreeRects()
if (_freeRects) _freeRects->clear();
}
-void TreeMapItem::addFreeRect(const QRect& r)
+void TreeMapItem::addFreeRect(const TQRect& r)
{
// don't add invalid rects
if ((r.width() < 1) || (r.height() < 1)) return;
if (!_freeRects) {
- _freeRects = new QPtrList<QRect>;
+ _freeRects = new TQPtrList<TQRect>;
_freeRects->setAutoDelete(true);
}
@@ -1039,9 +1039,9 @@ void TreeMapItem::addFreeRect(const QRect& r)
<< r.x() << "/" << r.y() << "-"
<< r.width() << "x" << r.height() << ")" << endl;
- QRect* last = _freeRects->last();
+ TQRect* last = _freeRects->last();
if (!last) {
- _freeRects->append(new QRect(r));
+ _freeRects->append(new TQRect(r));
return;
}
@@ -1063,7 +1063,7 @@ void TreeMapItem::addFreeRect(const QRect& r)
}
if (!replaced) {
- _freeRects->append(new QRect(r));
+ _freeRects->append(new TQRect(r));
return;
}
@@ -1078,13 +1078,13 @@ void TreeMapItem::addFreeRect(const QRect& r)
class TreeMapTip: public QToolTip
{
public:
- TreeMapTip( QWidget* p ):QToolTip(p) {}
+ TreeMapTip( TQWidget* p ):TQToolTip(p) {}
protected:
- void maybeTip( const QPoint & );
+ void maybeTip( const TQPoint & );
};
-void TreeMapTip::maybeTip( const QPoint& pos )
+void TreeMapTip::maybeTip( const TQPoint& pos )
{
if ( !parentWidget()->inherits( "TreeMapWidget" ) )
return;
@@ -1092,9 +1092,9 @@ void TreeMapTip::maybeTip( const QPoint& pos )
TreeMapWidget* p = (TreeMapWidget*)parentWidget();
TreeMapItem* i;
i = p->item(pos.x(), pos.y());
- QPtrList<QRect>* rList = i ? i->freeRects() : 0;
+ TQPtrList<TQRect>* rList = i ? i->freeRects() : 0;
if (rList) {
- QRect* r;
+ TQRect* r;
for(r=rList->first();r;r=rList->next())
if (r->contains(pos))
tip(*r, p->tipString(i));
@@ -1106,8 +1106,8 @@ void TreeMapTip::maybeTip( const QPoint& pos )
// TreeMapWidget
TreeMapWidget::TreeMapWidget(TreeMapItem* base,
- QWidget* parent, const char* name)
- : QWidget(parent, name)
+ TQWidget* parent, const char* name)
+ : TQWidget(parent, name)
{
_base = base;
_base->setWidget(this);
@@ -1148,7 +1148,7 @@ TreeMapWidget::TreeMapWidget(TreeMapItem* base,
_needsRefresh = _base;
setBackgroundMode(Qt::NoBackground);
- setFocusPolicy(QWidget::StrongFocus);
+ setFocusPolicy(TQWidget::StrongFocus);
_tip = new TreeMapTip(this);
}
@@ -1158,7 +1158,7 @@ TreeMapWidget::~TreeMapWidget()
delete _tip;
}
-const QFont& TreeMapWidget::currentFont() const
+const TQFont& TreeMapWidget::currentFont() const
{
return _font;
}
@@ -1176,7 +1176,7 @@ TreeMapItem::SplitMode TreeMapWidget::splitMode() const
return _splitMode;
}
-bool TreeMapWidget::setSplitMode(QString mode)
+bool TreeMapWidget::setSplitMode(TQString mode)
{
if (mode == "Bisection") setSplitMode(TreeMapItem::Bisection);
else if (mode == "Columns") setSplitMode(TreeMapItem::Columns);
@@ -1192,9 +1192,9 @@ bool TreeMapWidget::setSplitMode(QString mode)
return true;
}
-QString TreeMapWidget::splitModeString() const
+TQString TreeMapWidget::splitModeString() const
{
- QString mode;
+ TQString mode;
switch(splitMode()) {
case TreeMapItem::Bisection: mode = "Bisection"; break;
case TreeMapItem::Columns: mode = "Columns"; break;
@@ -1276,14 +1276,14 @@ void TreeMapWidget::setMaxDrawingDepth(int d)
redraw();
}
-QString TreeMapWidget::defaultFieldType(int f) const
+TQString TreeMapWidget::defaultFieldType(int f) const
{
return i18n("Text %1").arg(f+1);
}
-QString TreeMapWidget::defaultFieldStop(int) const
+TQString TreeMapWidget::defaultFieldStop(int) const
{
- return QString();
+ return TQString();
}
bool TreeMapWidget::defaultFieldVisible(int f) const
@@ -1328,7 +1328,7 @@ bool TreeMapWidget::resizeAttr(int size)
return true;
}
-void TreeMapWidget::setFieldType(int f, QString type)
+void TreeMapWidget::setFieldType(int f, TQString type)
{
if (((int)_attr.size() < f+1) &&
(type == defaultFieldType(f))) return;
@@ -1337,13 +1337,13 @@ void TreeMapWidget::setFieldType(int f, QString type)
// no need to redraw: the type string is not visible in the TreeMap
}
-QString TreeMapWidget::fieldType(int f) const
+TQString TreeMapWidget::fieldType(int f) const
{
if (f<0 || (int)_attr.size()<f+1) return defaultFieldType(f);
return _attr[f].type;
}
-void TreeMapWidget::setFieldStop(int f, QString stop)
+void TreeMapWidget::setFieldStop(int f, TQString stop)
{
if (((int)_attr.size() < f+1) &&
(stop == defaultFieldStop(f))) return;
@@ -1353,7 +1353,7 @@ void TreeMapWidget::setFieldStop(int f, QString stop)
}
}
-QString TreeMapWidget::fieldStop(int f) const
+TQString TreeMapWidget::fieldStop(int f) const
{
if (f<0 || (int)_attr.size()<f+1) return defaultFieldStop(f);
return _attr[f].stop;
@@ -1416,7 +1416,7 @@ DrawParams::Position TreeMapWidget::fieldPosition(int f) const
return _attr[f].pos;
}
-void TreeMapWidget::setFieldPosition(int f, QString pos)
+void TreeMapWidget::setFieldPosition(int f, TQString pos)
{
if (pos == "TopLeft")
setFieldPosition(f, DrawParams::TopLeft);
@@ -1434,17 +1434,17 @@ void TreeMapWidget::setFieldPosition(int f, QString pos)
setFieldPosition(f, DrawParams::Default);
}
-QString TreeMapWidget::fieldPositionString(int f) const
+TQString TreeMapWidget::fieldPositionString(int f) const
{
TreeMapItem::Position pos = fieldPosition(f);
- if (pos == DrawParams::TopLeft) return QString("TopLeft");
- if (pos == DrawParams::TopCenter) return QString("TopCenter");
- if (pos == DrawParams::TopRight) return QString("TopRight");
- if (pos == DrawParams::BottomLeft) return QString("BottomLeft");
- if (pos == DrawParams::BottomCenter) return QString("BottomCenter");
- if (pos == DrawParams::BottomRight) return QString("BottomRight");
- if (pos == DrawParams::Default) return QString("Default");
- return QString("unknown");
+ if (pos == DrawParams::TopLeft) return TQString("TopLeft");
+ if (pos == DrawParams::TopCenter) return TQString("TopCenter");
+ if (pos == DrawParams::TopRight) return TQString("TopRight");
+ if (pos == DrawParams::BottomLeft) return TQString("BottomLeft");
+ if (pos == DrawParams::BottomCenter) return TQString("BottomCenter");
+ if (pos == DrawParams::BottomRight) return TQString("BottomRight");
+ if (pos == DrawParams::Default) return TQString("Default");
+ return TQString("unknown");
}
void TreeMapWidget::setMinimalArea(int area)
@@ -1479,9 +1479,9 @@ void TreeMapWidget::deletingItem(TreeMapItem* i)
}
-QString TreeMapWidget::tipString(TreeMapItem* i) const
+TQString TreeMapWidget::tipString(TreeMapItem* i) const
{
- QString tip, itemTip;
+ TQString tip, itemTip;
while (i) {
if (!i->text(0).isEmpty()) {
@@ -1598,7 +1598,7 @@ void TreeMapWidget::setSelected(TreeMapItem* item, bool selected)
redraw(changed);
if (0) kdDebug(90100) << (selected ? "S":"Des") << "elected Item "
- << (item ? item->path(0).join("") : QString("(null)"))
+ << (item ? item->path(0).join("") : TQString("(null)"))
<< " (depth " << (item ? item->depth() : -1)
<< ")" << endl;
}
@@ -1790,16 +1790,16 @@ TreeMapItem* TreeMapWidget::setTmpRangeSelection(TreeMapItem* i1,
return changed;
}
-void TreeMapWidget::contextMenuEvent( QContextMenuEvent* e )
+void TreeMapWidget::contextMenuEvent( TQContextMenuEvent* e )
{
//kdDebug(90100) << "TreeMapWidget::contextMenuEvent" << endl;
- if ( receivers( SIGNAL(contextMenuRequested(TreeMapItem*, const QPoint &)) ) )
+ if ( receivers( TQT_SIGNAL(contextMenuRequested(TreeMapItem*, const TQPoint &)) ) )
e->accept();
- if ( e->reason() == QContextMenuEvent::Keyboard ) {
- QRect r = (_current) ? _current->itemRect() : _base->itemRect();
- QPoint p = QPoint(r.left() + r.width()/2, r.top() + r.height()/2);
+ if ( e->reason() == TQContextMenuEvent::Keyboard ) {
+ TQRect r = (_current) ? _current->itemRect() : _base->itemRect();
+ TQPoint p = TQPoint(r.left() + r.width()/2, r.top() + r.height()/2);
emit contextMenuRequested(_current, p);
}
else {
@@ -1809,7 +1809,7 @@ void TreeMapWidget::contextMenuEvent( QContextMenuEvent* e )
}
-void TreeMapWidget::mousePressEvent( QMouseEvent* e )
+void TreeMapWidget::mousePressEvent( TQMouseEvent* e )
{
//kdDebug(90100) << "TreeMapWidget::mousePressEvent" << endl;
@@ -1877,7 +1877,7 @@ void TreeMapWidget::mousePressEvent( QMouseEvent* e )
}
}
-void TreeMapWidget::mouseMoveEvent( QMouseEvent* e )
+void TreeMapWidget::mouseMoveEvent( TQMouseEvent* e )
{
//kdDebug(90100) << "TreeMapWidget::mouseMoveEvent" << endl;
@@ -1920,7 +1920,7 @@ void TreeMapWidget::mouseMoveEvent( QMouseEvent* e )
redraw(changed);
}
-void TreeMapWidget::mouseReleaseEvent( QMouseEvent* )
+void TreeMapWidget::mouseReleaseEvent( TQMouseEvent* )
{
//kdDebug(90100) << "TreeMapWidget::mouseReleaseEvent" << endl;
@@ -1950,7 +1950,7 @@ void TreeMapWidget::mouseReleaseEvent( QMouseEvent* )
}
-void TreeMapWidget::mouseDoubleClickEvent( QMouseEvent* e )
+void TreeMapWidget::mouseDoubleClickEvent( TQMouseEvent* e )
{
TreeMapItem* over = item(e->x(), e->y());
@@ -1969,7 +1969,7 @@ int nextVisible(TreeMapItem* i)
while (idx < (int)p->children()->count()-1) {
idx++;
- QRect r = p->children()->at(idx)->itemRect();
+ TQRect r = p->children()->at(idx)->itemRect();
if (r.width()>1 && r.height()>1)
return idx;
}
@@ -1987,7 +1987,7 @@ int prevVisible(TreeMapItem* i)
while (idx > 0) {
idx--;
- QRect r = p->children()->at(idx)->itemRect();
+ TQRect r = p->children()->at(idx)->itemRect();
if (r.width()>1 && r.height()>1)
return idx;
}
@@ -1997,7 +1997,7 @@ int prevVisible(TreeMapItem* i)
-void TreeMapWidget::keyPressEvent( QKeyEvent* e )
+void TreeMapWidget::keyPressEvent( TQKeyEvent* e )
{
if (e->key() == Key_Escape && _pressed) {
@@ -2111,24 +2111,24 @@ void TreeMapWidget::keyPressEvent( QKeyEvent* e )
}
}
-void TreeMapWidget::fontChange( const QFont& )
+void TreeMapWidget::fontChange( const TQFont& )
{
redraw();
}
-void TreeMapWidget::resizeEvent( QResizeEvent * )
+void TreeMapWidget::resizeEvent( TQResizeEvent * )
{
// this automatically redraws (as size is changed)
drawTreeMap();
}
-void TreeMapWidget::paintEvent( QPaintEvent * )
+void TreeMapWidget::paintEvent( TQPaintEvent * )
{
drawTreeMap();
}
-void TreeMapWidget::showEvent( QShowEvent * )
+void TreeMapWidget::showEvent( TQShowEvent * )
{
// refresh only if needed
drawTreeMap();
@@ -2151,14 +2151,14 @@ void TreeMapWidget::drawTreeMap()
if (_needsRefresh == _base) {
// redraw whole widget
- _pixmap = QPixmap(size());
+ _pixmap = TQPixmap(size());
_pixmap.fill(backgroundColor());
}
- QPainter p(&_pixmap);
+ TQPainter p(&_pixmap);
if (_needsRefresh == _base) {
p.setPen(black);
- p.drawRect(QRect(2, 2, QWidget::width()-4, QWidget::height()-4));
- _base->setItemRect(QRect(3, 3, QWidget::width()-6, QWidget::height()-6));
+ p.drawRect(TQRect(2, 2, TQWidget::width()-4, TQWidget::height()-4));
+ _base->setItemRect(TQRect(3, 3, TQWidget::width()-6, TQWidget::height()-6));
}
else {
// only subitem
@@ -2174,12 +2174,12 @@ void TreeMapWidget::drawTreeMap()
}
bitBlt( this, 0, 0, &_pixmap, 0, 0,
- QWidget::width(), QWidget::height(), CopyROP, true);
+ TQWidget::width(), TQWidget::height(), CopyROP, true);
if (hasFocus()) {
- QPainter p(this);
- style().drawPrimitive( QStyle::PE_FocusRect, &p,
- QRect(0, 0, QWidget::width(), QWidget::height()),
+ TQPainter p(this);
+ style().drawPrimitive( TQStyle::PE_FocusRect, &p,
+ TQRect(0, 0, TQWidget::width(), TQWidget::height()),
colorGroup() );
}
}
@@ -2203,7 +2203,7 @@ void TreeMapWidget::redraw(TreeMapItem* i)
}
}
-void TreeMapWidget::drawItem(QPainter* p,
+void TreeMapWidget::drawItem(TQPainter* p,
TreeMapItem* item)
{
bool isSelected = false;
@@ -2235,7 +2235,7 @@ void TreeMapWidget::drawItem(QPainter* p,
}
-bool TreeMapWidget::horizontal(TreeMapItem* i, const QRect& r)
+bool TreeMapWidget::horizontal(TreeMapItem* i, const TQRect& r)
{
switch(i->splitMode()) {
case TreeMapItem::HAlternate:
@@ -2256,7 +2256,7 @@ bool TreeMapWidget::horizontal(TreeMapItem* i, const QRect& r)
/**
* Draw TreeMapItems recursive, starting from item
*/
-void TreeMapWidget::drawItems(QPainter* p,
+void TreeMapWidget::drawItems(TQPainter* p,
TreeMapItem* item)
{
if (DEBUG_DRAWING)
@@ -2269,9 +2269,9 @@ void TreeMapWidget::drawItems(QPainter* p,
drawItem(p, item);
item->clearFreeRects();
- QRect origRect = item->itemRect();
+ TQRect origRect = item->itemRect();
int bw = item->borderWidth();
- QRect r = QRect(origRect.x()+bw, origRect.y()+bw,
+ TQRect r = TQRect(origRect.x()+bw, origRect.y()+bw,
origRect.width()-2*bw, origRect.height()-2*bw);
TreeMapItemList* list = item->children();
@@ -2295,7 +2295,7 @@ void TreeMapWidget::drawItems(QPainter* p,
// stop drawing if stopAtText is reached
if (!stopDrawing)
for (int no=0;no<(int)_attr.size();no++) {
- QString stopAt = fieldStop(no);
+ TQString stopAt = fieldStop(no);
if (!stopAt.isEmpty() && (item->text(no) == stopAt)) {
stopDrawing = true;
break;
@@ -2349,7 +2349,7 @@ void TreeMapWidget::drawItems(QPainter* p,
<< i->value() << endl;
}
- QRect orig = r;
+ TQRect orig = r;
// if we have space for text...
if ((r.height() >= _fontHeight) && (r.width() >= _fontHeight)) {
@@ -2366,12 +2366,12 @@ void TreeMapWidget::drawItems(QPainter* p,
if (orig.x() == r.x()) {
// Strings on top
- item->addFreeRect(QRect(orig.x(), orig.y(),
+ item->addFreeRect(TQRect(orig.x(), orig.y(),
orig.width(), orig.height()-r.height()));
}
else {
// Strings on the left
- item->addFreeRect(QRect(orig.x(), orig.y(),
+ item->addFreeRect(TQRect(orig.x(), orig.y(),
orig.width()-r.width(), orig.height()));
}
@@ -2418,7 +2418,7 @@ void TreeMapWidget::drawItems(QPainter* p,
self / user_sum + .5);
if (self_length > 0) {
// take space for self cost
- QRect sr = r;
+ TQRect sr = r;
if (rotate) {
sr.setWidth( self_length );
r.setRect(r.x()+sr.width(), r.y(), r.width()-sr.width(), r.height());
@@ -2479,7 +2479,7 @@ void TreeMapWidget::drawItems(QPainter* p,
// we always split horizontally
int nextPos = (int)((double)r.width() * valSum / user_sum);
- QRect firstRect = QRect(r.x(), r.y(), nextPos, r.height());
+ TQRect firstRect = TQRect(r.x(), r.y(), nextPos, r.height());
if (nextPos < _visibleWidth) {
if (item->sorting(0) == -1) {
@@ -2530,7 +2530,7 @@ void TreeMapWidget::drawItems(QPainter* p,
// we always split horizontally
int nextPos = (int)((double)r.height() * valSum / user_sum);
- QRect firstRect = QRect(r.x(), r.y(), r.width(), nextPos);
+ TQRect firstRect = TQRect(r.x(), r.y(), r.width(), nextPos);
if (nextPos < _visibleWidth) {
if (item->sorting(0) == -1) {
@@ -2567,7 +2567,7 @@ void TreeMapWidget::drawItems(QPainter* p,
}
// fills area with a pattern if to small to draw children
-void TreeMapWidget::drawFill(TreeMapItem* i, QPainter* p, QRect& r)
+void TreeMapWidget::drawFill(TreeMapItem* i, TQPainter* p, TQRect& r)
{
p->setBrush(Qt::Dense4Pattern);
p->setPen(Qt::NoPen);
@@ -2576,7 +2576,7 @@ void TreeMapWidget::drawFill(TreeMapItem* i, QPainter* p, QRect& r)
}
// fills area with a pattern if to small to draw children
-void TreeMapWidget::drawFill(TreeMapItem* i, QPainter* p, QRect& r,
+void TreeMapWidget::drawFill(TreeMapItem* i, TQPainter* p, TQRect& r,
TreeMapItemListIterator it, int len, bool goBack)
{
if (DEBUG_DRAWING)
@@ -2606,8 +2606,8 @@ void TreeMapWidget::drawFill(TreeMapItem* i, QPainter* p, QRect& r,
}
// returns false if rect gets to small
-bool TreeMapWidget::drawItemArray(QPainter* p, TreeMapItem* item,
- QRect& r, double user_sum,
+bool TreeMapWidget::drawItemArray(TQPainter* p, TreeMapItem* item,
+ TQRect& r, double user_sum,
TreeMapItemListIterator it, int len,
bool goBack)
{
@@ -2647,14 +2647,14 @@ bool TreeMapWidget::drawItemArray(QPainter* p, TreeMapItem* item,
if (r.width() > r.height()) {
int halfPos = (int)((double)r.width() * valSum / user_sum);
- QRect firstRect = QRect(r.x(), r.y(), halfPos, r.height());
+ TQRect firstRect = TQRect(r.x(), r.y(), halfPos, r.height());
drawOn = drawItemArray(p, item, firstRect,
valSum, first, len-lenLeft, goBack);
r.setRect(r.x()+halfPos, r.y(), r.width()-halfPos, r.height());
}
else {
int halfPos = (int)((double)r.height() * valSum / user_sum);
- QRect firstRect = QRect(r.x(), r.y(), r.width(), halfPos);
+ TQRect firstRect = TQRect(r.x(), r.y(), r.width(), halfPos);
drawOn = drawItemArray(p, item, firstRect,
valSum, first, len-lenLeft, goBack);
r.setRect(r.x(), r.y()+halfPos, r.width(), r.height()-halfPos);
@@ -2723,7 +2723,7 @@ bool TreeMapWidget::drawItemArray(QPainter* p, TreeMapItem* item,
return false;
}
- QRect currRect = r;
+ TQRect currRect = r;
if (hor)
currRect.setWidth(nextPos);
@@ -2798,13 +2798,13 @@ void TreeMapWidget::splitActivated(int id)
}
-void TreeMapWidget::addSplitDirectionItems(QPopupMenu* popup, int id)
+void TreeMapWidget::addSplitDirectionItems(TQPopupMenu* popup, int id)
{
_splitID = id;
popup->setCheckable(true);
- connect(popup, SIGNAL(activated(int)),
- this, SLOT(splitActivated(int)));
+ connect(popup, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(splitActivated(int)));
popup->insertItem(i18n("Recursive Bisection"), id);
popup->insertItem(i18n("Columns"), id+1);
@@ -2853,21 +2853,21 @@ void TreeMapWidget::visualizationActivated(int id)
else if ((id%10) == 8) setFieldPosition(f, DrawParams::BottomRight);
}
-void TreeMapWidget::addVisualizationItems(QPopupMenu* popup, int id)
+void TreeMapWidget::addVisualizationItems(TQPopupMenu* popup, int id)
{
_visID = id;
popup->setCheckable(true);
- QPopupMenu* bpopup = new QPopupMenu();
+ TQPopupMenu* bpopup = new TQPopupMenu();
bpopup->setCheckable(true);
- connect(popup, SIGNAL(activated(int)),
- this, SLOT(visualizationActivated(int)));
- connect(bpopup, SIGNAL(activated(int)),
- this, SLOT(visualizationActivated(int)));
+ connect(popup, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(visualizationActivated(int)));
+ connect(bpopup, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(visualizationActivated(int)));
- QPopupMenu* spopup = new QPopupMenu();
+ TQPopupMenu* spopup = new TQPopupMenu();
addSplitDirectionItems(spopup, id+100);
popup->insertItem(i18n("Nesting"), spopup, id);
@@ -2893,10 +2893,10 @@ void TreeMapWidget::addVisualizationItems(QPopupMenu* popup, int id)
popup->insertSeparator();
int f;
- QPopupMenu* tpopup;
+ TQPopupMenu* tpopup;
id += 20;
for (f=0;f<(int)_attr.size();f++, id+=10) {
- tpopup = new QPopupMenu();
+ tpopup = new TQPopupMenu();
tpopup->setCheckable(true);
popup->insertItem(_attr[f].type, tpopup, id);
tpopup->insertItem(i18n("Visible"), id+1);
@@ -2925,8 +2925,8 @@ void TreeMapWidget::addVisualizationItems(QPopupMenu* popup, int id)
tpopup->setItemChecked(id+7,_attr[f].pos == DrawParams::BottomCenter);
tpopup->setItemChecked(id+8,_attr[f].pos == DrawParams::BottomRight);
- connect(tpopup, SIGNAL(activated(int)),
- this, SLOT(visualizationActivated(int)));
+ connect(tpopup, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(visualizationActivated(int)));
}
}
@@ -2942,7 +2942,7 @@ void TreeMapWidget::selectionActivated(int id)
setSelected(i, true);
}
-void TreeMapWidget::addSelectionItems(QPopupMenu* popup,
+void TreeMapWidget::addSelectionItems(TQPopupMenu* popup,
int id, TreeMapItem* i)
{
if (!i) return;
@@ -2950,11 +2950,11 @@ void TreeMapWidget::addSelectionItems(QPopupMenu* popup,
_selectionID = id;
_menuItem = i;
- connect(popup, SIGNAL(activated(int)),
- this, SLOT(selectionActivated(int)));
+ connect(popup, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(selectionActivated(int)));
while (i) {
- QString name = i->text(0);
+ TQString name = i->text(0);
if (name.isEmpty()) break;
popup->insertItem(i->text(0), id++);
i = i->parent();
@@ -2963,7 +2963,7 @@ void TreeMapWidget::addSelectionItems(QPopupMenu* popup,
void TreeMapWidget::fieldStopActivated(int id)
{
- if (id == _fieldStopID) setFieldStop(0, QString::null);
+ if (id == _fieldStopID) setFieldStop(0, TQString::null);
else {
TreeMapItem* i = _menuItem;
id -= _fieldStopID+1;
@@ -2976,13 +2976,13 @@ void TreeMapWidget::fieldStopActivated(int id)
}
}
-void TreeMapWidget::addFieldStopItems(QPopupMenu* popup,
+void TreeMapWidget::addFieldStopItems(TQPopupMenu* popup,
int id, TreeMapItem* i)
{
_fieldStopID = id;
- connect(popup, SIGNAL(activated(int)),
- this, SLOT(fieldStopActivated(int)));
+ connect(popup, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(fieldStopActivated(int)));
popup->insertItem(i18n("No %1 Limit").arg(fieldType(0)), id);
popup->setItemChecked(id, fieldStop(0).isEmpty());
@@ -2993,7 +2993,7 @@ void TreeMapWidget::addFieldStopItems(QPopupMenu* popup,
while (i) {
id++;
- QString name = i->text(0);
+ TQString name = i->text(0);
if (name.isEmpty()) break;
popup->insertItem(i->text(0), id);
if (fieldStop(0) == i->text(0)) {
@@ -3025,14 +3025,14 @@ void TreeMapWidget::areaStopActivated(int id)
else if (id == _areaStopID+6) setMinimalArea(minimalArea()/2);
}
-void TreeMapWidget::addAreaStopItems(QPopupMenu* popup,
+void TreeMapWidget::addAreaStopItems(TQPopupMenu* popup,
int id, TreeMapItem* i)
{
_areaStopID = id;
_menuItem = i;
- connect(popup, SIGNAL(activated(int)),
- this, SLOT(areaStopActivated(int)));
+ connect(popup, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(areaStopActivated(int)));
bool foundArea = false;
@@ -3087,14 +3087,14 @@ void TreeMapWidget::depthStopActivated(int id)
else if (id == _depthStopID+3) setMaxDrawingDepth(maxDrawingDepth()+1);
}
-void TreeMapWidget::addDepthStopItems(QPopupMenu* popup,
+void TreeMapWidget::addDepthStopItems(TQPopupMenu* popup,
int id, TreeMapItem* i)
{
_depthStopID = id;
_menuItem = i;
- connect(popup, SIGNAL(activated(int)),
- this, SLOT(depthStopActivated(int)));
+ connect(popup, TQT_SIGNAL(activated(int)),
+ this, TQT_SLOT(depthStopActivated(int)));
bool foundDepth = false;
@@ -3132,7 +3132,7 @@ void TreeMapWidget::addDepthStopItems(QPopupMenu* popup,
* Option saving/restoring
*/
-void TreeMapWidget::saveOptions(KConfigGroup* config, QString prefix)
+void TreeMapWidget::saveOptions(KConfigGroup* config, TQString prefix)
{
config->writeEntry(prefix+"Nesting", splitModeString());
config->writeEntry(prefix+"AllowRotation", allowRotation());
@@ -3145,23 +3145,23 @@ void TreeMapWidget::saveOptions(KConfigGroup* config, QString prefix)
int f, fCount = _attr.size();
config->writeEntry(prefix+"FieldCount", fCount);
for (f=0;f<fCount;f++) {
- config->writeEntry(QString(prefix+"FieldVisible%1").arg(f),
+ config->writeEntry(TQString(prefix+"FieldVisible%1").arg(f),
_attr[f].visible);
- config->writeEntry(QString(prefix+"FieldForced%1").arg(f),
+ config->writeEntry(TQString(prefix+"FieldForced%1").arg(f),
_attr[f].forced);
- config->writeEntry(QString(prefix+"FieldStop%1").arg(f),
+ config->writeEntry(TQString(prefix+"FieldStop%1").arg(f),
_attr[f].stop);
- config->writeEntry(QString(prefix+"FieldPosition%1").arg(f),
+ config->writeEntry(TQString(prefix+"FieldPosition%1").arg(f),
fieldPositionString(f));
}
}
-void TreeMapWidget::restoreOptions(KConfigGroup* config, QString prefix)
+void TreeMapWidget::restoreOptions(KConfigGroup* config, TQString prefix)
{
bool enabled;
int num;
- QString str;
+ TQString str;
str = config->readEntry(prefix+"Nesting");
if (!str.isEmpty()) setSplitMode(str);
@@ -3195,18 +3195,18 @@ void TreeMapWidget::restoreOptions(KConfigGroup* config, QString prefix)
int f;
for (f=0;f<num;f++) {
- str = QString(prefix+"FieldVisible%1").arg(f);
+ str = TQString(prefix+"FieldVisible%1").arg(f);
if (config->hasKey(str))
setFieldVisible(f, config->readBoolEntry(str));
- str = QString(prefix+"FieldForced%1").arg(f);
+ str = TQString(prefix+"FieldForced%1").arg(f);
if (config->hasKey(str))
setFieldForced(f, config->readBoolEntry(str));
- str = config->readEntry(QString(prefix+"FieldStop%1").arg(f));
+ str = config->readEntry(TQString(prefix+"FieldStop%1").arg(f));
setFieldStop(f, str);
- str = config->readEntry(QString(prefix+"FieldPosition%1").arg(f));
+ str = config->readEntry(TQString(prefix+"FieldPosition%1").arg(f));
if (!str.isEmpty()) setFieldPosition(f, str);
}
}
diff --git a/kcachegrind/kcachegrind/treemap.h b/kcachegrind/kcachegrind/treemap.h
index 4bb0b4cd..5508d8fd 100644
--- a/kcachegrind/kcachegrind/treemap.h
+++ b/kcachegrind/kcachegrind/treemap.h
@@ -18,7 +18,7 @@
/**
* A Widget for visualizing hierarchical metrics as areas.
- * The API is similar to QListView.
+ * The API is similar to TQListView.
*
* This file defines the following classes:
* DrawParams, RectDrawing, TreeMapItem, TreeMapWidget
@@ -30,14 +30,14 @@
#ifndef TREEMAP_H
#define TREEMAP_H
-#include <qstring.h>
-#include <qwidget.h>
-#include <qpixmap.h>
-#include <qptrlist.h>
-#include <qvaluevector.h>
-#include <qcolor.h>
-#include <qapplication.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqpixmap.h>
+#include <tqptrlist.h>
+#include <tqvaluevector.h>
+#include <tqcolor.h>
+#include <tqapplication.h>
+#include <tqstringlist.h>
class QPopupMenu;
class TreeMapTip;
@@ -74,15 +74,15 @@ public:
// no constructor as this is an abstract class
virtual ~DrawParams() {}
- virtual QString text(int) const = 0;
- virtual QPixmap pixmap(int) const = 0;
+ virtual TQString text(int) const = 0;
+ virtual TQPixmap pixmap(int) const = 0;
virtual Position position(int) const = 0;
// 0: no limit, negative: leave at least -maxLines() free
virtual int maxLines(int) const { return 0; }
virtual int fieldCount() const { return 0; }
- virtual QColor backColor() const { return Qt::white; }
- virtual const QFont& font() const = 0;
+ virtual TQColor backColor() const { return Qt::white; }
+ virtual const TQFont& font() const = 0;
virtual bool selected() const { return false; }
virtual bool current() const { return false; }
@@ -99,33 +99,33 @@ class StoredDrawParams: public DrawParams
{
public:
StoredDrawParams();
- StoredDrawParams(QColor c,
+ StoredDrawParams(TQColor c,
bool selected = false, bool current = false);
// getters
- QString text(int) const;
- QPixmap pixmap(int) const;
+ TQString text(int) const;
+ TQPixmap pixmap(int) const;
Position position(int) const;
int maxLines(int) const;
int fieldCount() const { return _field.size(); }
- QColor backColor() const { return _backColor; }
+ TQColor backColor() const { return _backColor; }
bool selected() const { return _selected; }
bool current() const { return _current; }
bool shaded() const { return _shaded; }
bool rotated() const { return _rotated; }
bool drawFrame() const { return _drawFrame; }
- const QFont& font() const;
+ const TQFont& font() const;
// attribute setters
- void setField(int f, const QString& t, QPixmap pm = QPixmap(),
+ void setField(int f, const TQString& t, TQPixmap pm = TQPixmap(),
Position p = Default, int maxLines = 0);
- void setText(int f, const QString&);
- void setPixmap(int f, const QPixmap&);
+ void setText(int f, const TQString&);
+ void setPixmap(int f, const TQPixmap&);
void setPosition(int f, Position);
void setMaxLines(int f, int);
- void setBackColor(const QColor& c) { _backColor = c; }
+ void setBackColor(const TQColor& c) { _backColor = c; }
void setSelected(bool b) { _selected = b; }
void setCurrent(bool b) { _current = b; }
void setShaded(bool b) { _shaded = b; }
@@ -133,7 +133,7 @@ public:
void drawFrame(bool b) { _drawFrame = b; }
protected:
- QColor _backColor;
+ TQColor _backColor;
bool _selected :1;
bool _current :1;
bool _shaded :1;
@@ -145,13 +145,13 @@ private:
void ensureField(int f);
struct Field {
- QString text;
- QPixmap pix;
+ TQString text;
+ TQPixmap pix;
Position pos;
int maxLines;
};
- QValueVector<Field> _field;
+ TQValueVector<Field> _field;
};
@@ -167,7 +167,7 @@ private:
class RectDrawing
{
public:
- RectDrawing(QRect);
+ RectDrawing(TQRect);
~RectDrawing();
// The default DrawParams object used.
@@ -175,33 +175,33 @@ public:
// we take control over the given object (i.e. delete at destruction)
void setDrawParams(DrawParams*);
- // draw on a given QPainter, use this class as info provider per default
- void drawBack(QPainter*, DrawParams* dp = 0);
+ // draw on a given TQPainter, use this class as info provider per default
+ void drawBack(TQPainter*, DrawParams* dp = 0);
/* Draw field at position() from pixmap()/text() with maxLines().
* Returns true if something was drawn
*/
- bool drawField(QPainter*, int f, DrawParams* dp = 0);
+ bool drawField(TQPainter*, int f, DrawParams* dp = 0);
// resets rectangle for free space
- void setRect(QRect);
+ void setRect(TQRect);
// Returns the rectangle area still free of text/pixmaps after
// a number of drawText() calls.
- QRect remainingRect(DrawParams* dp = 0);
+ TQRect remainingRect(DrawParams* dp = 0);
private:
int _usedTopLeft, _usedTopCenter, _usedTopRight;
int _usedBottomLeft, _usedBottomCenter, _usedBottomRight;
- QRect _rect;
+ TQRect _rect;
// temporary
int _fontHeight;
- QFontMetrics* _fm;
+ TQFontMetrics* _fm;
DrawParams* _dp;
};
-class TreeMapItemList: public QPtrList<TreeMapItem>
+class TreeMapItemList: public TQPtrList<TreeMapItem>
{
public:
TreeMapItem* commonParent();
@@ -209,7 +209,7 @@ protected:
int compareItems ( Item item1, Item item2 );
};
-typedef QPtrListIterator<TreeMapItem> TreeMapItemListIterator;
+typedef TQPtrListIterator<TreeMapItem> TreeMapItemListIterator;
/**
@@ -246,8 +246,8 @@ public:
TreeMapItem(TreeMapItem* parent = 0, double value = 1.0 );
TreeMapItem(TreeMapItem* parent, double value,
- QString text1, QString text2 = QString::null,
- QString text3 = QString::null, QString text4 = QString::null);
+ TQString text1, TQString text2 = TQString::null,
+ TQString text3 = TQString::null, TQString text4 = TQString::null);
virtual ~TreeMapItem();
bool isChildOf(TreeMapItem*);
@@ -279,7 +279,7 @@ public:
* Returns a list of text strings of specified text number,
* from root up to this item.
*/
- QStringList path(int) const;
+ TQStringList path(int) const;
/**
* Depth of this item. This is the distance to root.
@@ -295,9 +295,9 @@ public:
* Temporary rectangle used for drawing this item the last time.
* This is internally used to map from a point to an item.
*/
- void setItemRect(const QRect& r) { _rect = r; }
+ void setItemRect(const TQRect& r) { _rect = r; }
void clearItemRect();
- const QRect& itemRect() const { return _rect; }
+ const TQRect& itemRect() const { return _rect; }
int width() const { return _rect.width(); }
int height() const { return _rect.height(); }
@@ -306,8 +306,8 @@ public:
* Used internally to enable tooltip.
*/
void clearFreeRects();
- QPtrList<QRect>* freeRects() const { return _freeRects; }
- void addFreeRect(const QRect& r);
+ TQPtrList<TQRect>* freeRects() const { return _freeRects; }
+ void addFreeRect(const TQRect& r);
/**
* Temporary child item index of the child that was current() recently.
@@ -330,7 +330,7 @@ public:
virtual double value() const;
// replace "Default" position with setting from TreeMapWidget
virtual Position position(int) const;
- virtual const QFont& font() const;
+ virtual const TQFont& font() const;
virtual bool isMarked(int) const;
virtual int borderWidth() const;
@@ -380,8 +380,8 @@ private:
bool _sortAscending;
// temporary layout
- QRect _rect;
- QPtrList<QRect>* _freeRects;
+ TQRect _rect;
+ TQPtrList<TQRect>* _freeRects;
int _depth;
// temporary self value (when using level skipping)
@@ -408,7 +408,7 @@ public:
enum SelectionMode { Single, Multi, Extended, NoSelection };
/* The widget becomes owner of the base item */
- TreeMapWidget(TreeMapItem* base, QWidget* parent=0, const char* name=0);
+ TreeMapWidget(TreeMapItem* base, TQWidget* parent=0, const char* name=0);
~TreeMapWidget();
/**
@@ -419,7 +419,7 @@ public:
/**
* Returns a reference to the current widget font.
*/
- const QFont& currentFont() const;
+ const TQFont& currentFont() const;
/**
* Returns the area item at position x/y, independent from any
@@ -501,8 +501,8 @@ public:
void setSplitMode(TreeMapItem::SplitMode m);
TreeMapItem::SplitMode splitMode() const;
// returns true if string was recognized
- bool setSplitMode(QString);
- QString splitModeString() const;
+ bool setSplitMode(TQString);
+ TQString splitModeString() const;
/*
@@ -557,8 +557,8 @@ public:
int minimalArea() const { return _minimalArea; }
/* defaults for text attributes */
- QString defaultFieldType(int) const;
- QString defaultFieldStop(int) const;
+ TQString defaultFieldType(int) const;
+ TQString defaultFieldStop(int) const;
bool defaultFieldVisible(int) const;
bool defaultFieldForced(int) const;
DrawParams::Position defaultFieldPosition(int) const;
@@ -568,14 +568,14 @@ public:
* This is important for the visualization menu generated
* with visualizationMenu()
*/
- void setFieldType(int, QString);
- QString fieldType(int) const;
+ void setFieldType(int, TQString);
+ TQString fieldType(int) const;
/**
* Stop drawing at item with name
*/
- void setFieldStop(int, QString);
- QString fieldStop(int) const;
+ void setFieldStop(int, TQString);
+ TQString fieldStop(int) const;
/**
* Should the text with number textNo be visible?
@@ -598,8 +598,8 @@ public:
*/
void setFieldPosition(int, DrawParams::Position);
DrawParams::Position fieldPosition(int) const;
- void setFieldPosition(int, QString);
- QString fieldPositionString(int) const;
+ void setFieldPosition(int, TQString);
+ TQString fieldPositionString(int) const;
/**
* Do we allow the texts to be rotated by 90 degrees for better fitting?
@@ -613,8 +613,8 @@ public:
/**
* Save/restore options.
*/
- void saveOptions(KConfigGroup*, QString prefix = QString::null);
- void restoreOptions(KConfigGroup*, QString prefix = QString::null);
+ void saveOptions(KConfigGroup*, TQString prefix = TQString::null);
+ void restoreOptions(KConfigGroup*, TQString prefix = TQString::null);
/**
* These functions populate given popup menus.
@@ -622,12 +622,12 @@ public:
*
* The int is the menu id where to start for the items (100 IDs reserved).
*/
- void addSplitDirectionItems(QPopupMenu*, int);
- void addSelectionItems(QPopupMenu*, int, TreeMapItem*);
- void addFieldStopItems(QPopupMenu*, int, TreeMapItem*);
- void addAreaStopItems(QPopupMenu*, int, TreeMapItem*);
- void addDepthStopItems(QPopupMenu*, int, TreeMapItem*);
- void addVisualizationItems(QPopupMenu*, int);
+ void addSplitDirectionItems(TQPopupMenu*, int);
+ void addSelectionItems(TQPopupMenu*, int, TreeMapItem*);
+ void addFieldStopItems(TQPopupMenu*, int, TreeMapItem*);
+ void addAreaStopItems(TQPopupMenu*, int, TreeMapItem*);
+ void addDepthStopItems(TQPopupMenu*, int, TreeMapItem*);
+ void addVisualizationItems(TQPopupMenu*, int);
TreeMapWidget* widget() { return this; }
TreeMapItem* current() const { return _current; }
@@ -640,7 +640,7 @@ public:
* Return tooltip string to show for a item (can be rich text)
* Default implementation gives lines with "text0 (text1)" going to root.
*/
- virtual QString tipString(TreeMapItem* i) const;
+ virtual TQString tipString(TreeMapItem* i) const;
/**
* Redraws an item with all children.
@@ -681,20 +681,20 @@ signals:
void clicked(TreeMapItem*);
void returnPressed(TreeMapItem*);
void doubleClicked(TreeMapItem*);
- void rightButtonPressed(TreeMapItem*, const QPoint &);
- void contextMenuRequested(TreeMapItem*, const QPoint &);
+ void rightButtonPressed(TreeMapItem*, const TQPoint &);
+ void contextMenuRequested(TreeMapItem*, const TQPoint &);
protected:
- void mousePressEvent( QMouseEvent * );
- void contextMenuEvent( QContextMenuEvent * );
- void mouseReleaseEvent( QMouseEvent * );
- void mouseMoveEvent( QMouseEvent * );
- void mouseDoubleClickEvent( QMouseEvent * );
- void keyPressEvent( QKeyEvent* );
- void paintEvent( QPaintEvent * );
- void resizeEvent( QResizeEvent * );
- void showEvent( QShowEvent * );
- void fontChange( const QFont& );
+ void mousePressEvent( TQMouseEvent * );
+ void contextMenuEvent( TQContextMenuEvent * );
+ void mouseReleaseEvent( TQMouseEvent * );
+ void mouseMoveEvent( TQMouseEvent * );
+ void mouseDoubleClickEvent( TQMouseEvent * );
+ void keyPressEvent( TQKeyEvent* );
+ void paintEvent( TQPaintEvent * );
+ void resizeEvent( TQResizeEvent * );
+ void showEvent( TQShowEvent * );
+ void fontChange( const TQFont& );
private:
TreeMapItemList diff(TreeMapItemList&, TreeMapItemList&);
@@ -704,13 +704,13 @@ private:
TreeMapItem* i2, bool selected);
bool isTmpSelected(TreeMapItem* i);
- void drawItem(QPainter* p, TreeMapItem*);
- void drawItems(QPainter* p, TreeMapItem*);
- bool horizontal(TreeMapItem* i, const QRect& r);
- void drawFill(TreeMapItem*,QPainter* p, QRect& r);
- void drawFill(TreeMapItem*,QPainter* p, QRect& r,
+ void drawItem(TQPainter* p, TreeMapItem*);
+ void drawItems(TQPainter* p, TreeMapItem*);
+ bool horizontal(TreeMapItem* i, const TQRect& r);
+ void drawFill(TreeMapItem*,TQPainter* p, TQRect& r);
+ void drawFill(TreeMapItem*,TQPainter* p, TQRect& r,
TreeMapItemListIterator it, int len, bool goBack);
- bool drawItemArray(QPainter* p, TreeMapItem*, QRect& r, double,
+ bool drawItemArray(TQPainter* p, TreeMapItem*, TQRect& r, double,
TreeMapItemListIterator it, int len, bool);
bool resizeAttr(int);
@@ -721,11 +721,11 @@ private:
// attributes for field, per textNo
struct FieldAttr {
- QString type, stop;
+ TQString type, stop;
bool visible, forced;
DrawParams::Position pos;
};
- QValueVector<FieldAttr> _attr;
+ TQValueVector<FieldAttr> _attr;
SelectionMode _selectionMode;
TreeMapItem::SplitMode _splitMode;
@@ -748,11 +748,11 @@ private:
bool _inShiftDrag, _inControlDrag;
// temporary widget font metrics while drawing
- QFont _font;
+ TQFont _font;
int _fontHeight;
// back buffer pixmap
- QPixmap _pixmap;
+ TQPixmap _pixmap;
};
#endif
diff --git a/kcachegrind/kcachegrind/utils.cpp b/kcachegrind/kcachegrind/utils.cpp
index 0401a47e..65c7e347 100644
--- a/kcachegrind/kcachegrind/utils.cpp
+++ b/kcachegrind/kcachegrind/utils.cpp
@@ -29,7 +29,7 @@
#include <sys/mman.h>
#endif
-#include <qfile.h>
+#include <tqfile.h>
#include <errno.h>
#include "utils.h"
@@ -171,7 +171,7 @@ bool FixString::stripName(FixString& s)
if (_len==0) return false;
// first char has to be a letter or "_"
- if (!QChar(*_str).isLetter() && (*_str != '_')) return false;
+ if (!TQChar(*_str).isLetter() && (*_str != '_')) return false;
int newLen = 1;
const char* newStr = _str;
@@ -180,7 +180,7 @@ bool FixString::stripName(FixString& s)
_len--;
while(_len>0) {
- if (!QChar(*_str).isLetterOrNumber()
+ if (!TQChar(*_str).isLetterOrNumber()
&& (*_str != '_')) break;
newLen++;
@@ -343,7 +343,7 @@ bool FixString::stripInt64(int64& v, bool stripSpaces)
// class FixFile
-FixFile::FixFile(QFile* file)
+FixFile::FixFile(TQFile* file)
{
if (!file) {
_len = 0;
@@ -354,7 +354,7 @@ FixFile::FixFile(QFile* file)
_filename = file->name();
if (!file->isOpen() && !file->open( IO_ReadOnly ) ) {
- qWarning( "%s: %s", (const char*) QFile::encodeName(_filename),
+ qWarning( "%s: %s", (const char*) TQFile::encodeName(_filename),
strerror( errno ) );
_len = 0;
_currentLeft = 0;
diff --git a/kcachegrind/kcachegrind/utils.h b/kcachegrind/kcachegrind/utils.h
index 259a508e..d02ffceb 100644
--- a/kcachegrind/kcachegrind/utils.h
+++ b/kcachegrind/kcachegrind/utils.h
@@ -23,7 +23,7 @@
#ifndef UTILS_H
#define UTILS_H
-#include <qstring.h>
+#include <tqstring.h>
class QFile;
@@ -85,8 +85,8 @@ class FixString {
bool stripUInt64(uint64&, bool stripSpaces = true);
bool stripInt64(int64&, bool stripSpaces = true);
- operator QString() const
- { return QString::fromLatin1(_str,_len); }
+ operator TQString() const
+ { return TQString::fromLatin1(_str,_len); }
private:
const char* _str;
@@ -100,7 +100,7 @@ class FixString {
class FixFile {
public:
- FixFile(QFile*);
+ FixFile(TQFile*);
~FixFile();
/**
@@ -115,10 +115,10 @@ class FixFile {
private:
char *_base, *_current;
- QByteArray _data;
+ TQByteArray _data;
unsigned _len, _currentLeft;
bool _used_mmap, _openError;
- QString _filename;
+ TQString _filename;
};