TQt4 port ksystemlog

This enables compilation under both Qt3 and Qt4


git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ksystemlog@1239000 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 13 years ago
parent 437249c714
commit 9902f14bc9

@ -18,14 +18,14 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/ ***************************************************************************/
//Qt includes //TQt includes
#include <qlayout.h> #include <tqlayout.h>
#include <qvgroupbox.h> #include <tqvgroupbox.h>
#include <qbuttongroup.h> #include <tqbuttongroup.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qvbox.h> #include <tqvbox.h>
#include <qhbox.h> #include <tqhbox.h>
//KDE includes //KDE includes
#include <klocale.h> #include <klocale.h>
@ -42,17 +42,17 @@
#include "acpidOptions.h" #include "acpidOptions.h"
#include "ksystemlogConfig.h" #include "ksystemlogConfig.h"
AcpidOptions::AcpidOptions(QWidget *parent) : AcpidOptions::AcpidOptions(TQWidget *tqparent) :
QWidget(parent) TQWidget(tqparent)
{ {
QHBoxLayout *layout = new QHBoxLayout(this); TQHBoxLayout *tqlayout = new TQHBoxLayout(this);
layout->setAutoAdd(true); tqlayout->setAutoAdd(true);
QString description=i18n("<qt><p>These files will be analyzed to display <b>ACPId log</b>. This list also determines the order in which the files are read.</p></qt>"); TQString description=i18n("<qt><p>These files will be analyzed to display <b>ACPId log</b>. This list also determines the order in which the files are read.</p></qt>");
fileList=new FileList(this, description); fileList=new FileList(this, description);
connect(fileList, SIGNAL(fileListChanged(int)), this, SLOT(slotFileListChanged(int))); connect(fileList, TQT_SIGNAL(fileListChanged(int)), this, TQT_SLOT(slotFileListChanged(int)));
readConfig(); readConfig();
@ -80,7 +80,7 @@ void AcpidOptions::slotFileListChanged(int itemLeft) {
void AcpidOptions::saveConfig() { void AcpidOptions::saveConfig() {
kdDebug() << "Save config from AcpidOptions" << endl; kdDebug() << "Save config from AcpidOptions" << endl;
QStringList list; TQStringList list;
int count=fileList->count(); int count=fileList->count();
@ -92,9 +92,9 @@ void AcpidOptions::saveConfig() {
} }
void AcpidOptions::readConfig() { void AcpidOptions::readConfig() {
QStringList files(KSystemLogConfig::acpidPaths()); TQStringList files(KSystemLogConfig::acpidPaths());
QStringList::iterator it; TQStringList::iterator it;
for(it=files.begin(); it!=files.end(); ++it) { for(it=files.begin(); it!=files.end(); ++it) {
fileList->insertItem(*it); fileList->insertItem(*it);
} }

@ -21,8 +21,8 @@
#ifndef _ACPID_OPTIONS_H_ #ifndef _ACPID_OPTIONS_H_
#define _ACPID_OPTIONS_H_ #define _ACPID_OPTIONS_H_
#include <qframe.h> #include <tqframe.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <kpopupmenu.h> #include <kpopupmenu.h>
#include <kconfig.h> #include <kconfig.h>
@ -35,12 +35,13 @@
#include "fileList.h" #include "fileList.h"
class AcpidOptions : public QWidget { class AcpidOptions : public TQWidget {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
AcpidOptions(QWidget *parent = 0); AcpidOptions(TQWidget *tqparent = 0);
~AcpidOptions(); ~AcpidOptions();
bool isValid(); bool isValid();

@ -25,8 +25,8 @@
#include "acpidReader.h" #include "acpidReader.h"
AcpidReader::AcpidReader(QObject *parent, const char *name) : AcpidReader::AcpidReader(TQObject *tqparent, const char *name) :
DefaultReader(parent, name) DefaultReader(tqparent, name)
{ {
} }
@ -43,46 +43,46 @@ void AcpidReader::initColumns(LogViewColumns* columns) {
} }
LogLine* AcpidReader::parseMessage(QString& logLine, LogFile* logFile) { LogLine* AcpidReader::parseMessage(TQString& logLine, LogFile* logFile) {
int dateBegin=logLine.find("["); int dateBegin=logLine.tqfind("[");
int dateEnd=logLine.find("]"); int dateEnd=logLine.tqfind("]");
QString type; TQString type;
QString message; TQString message;
QDate date; TQDate date;
QTime time; TQTime time;
//If there is a format problem in the line //If there is a format problem in the line
if (dateBegin==-1 || dateEnd==-1) { if (dateBegin==-1 || dateEnd==-1) {
type=i18n("none"); type=i18n("none");
message=logLine; message=logLine;
date=QDate::currentDate(); date=TQDate::tqcurrentDate();
time=QTime::currentTime(); time=TQTime::currentTime();
} }
else { else {
QString strDate=logLine.mid(dateBegin+1, dateEnd-dateBegin-1); TQString strDate=logLine.mid(dateBegin+1, dateEnd-dateBegin-1);
QString month=strDate.mid(4, 3); TQString month=strDate.mid(4, 3);
QString day=strDate.mid(8, 2); TQString day=strDate.mid(8, 2);
QString hour=strDate.mid(11, 2); TQString hour=strDate.mid(11, 2);
QString min=strDate.mid(14, 2); TQString min=strDate.mid(14, 2);
QString sec=strDate.mid(17, 2); TQString sec=strDate.mid(17, 2);
QString year=strDate.mid(20, 4); TQString year=strDate.mid(20, 4);
date=QDate(year.toInt(), ParsingHelper::parseMonthNumber(month), day.toInt()); date=TQDate(year.toInt(), ParsingHelper::parseMonthNumber(month), day.toInt());
time=QTime(hour.toInt(), min.toInt(), sec.toInt()); time=TQTime(hour.toInt(), min.toInt(), sec.toInt());
//kdDebug() << "Date=" << date.toString() << endl; //kdDebug() << "Date=" << date.toString() << endl;
//kdDebug() << "Time=" << time.toString() << endl; //kdDebug() << "Time=" << time.toString() << endl;
logLine=logLine.remove(0, dateEnd+2); logLine=logLine.remove(0, dateEnd+2);
int endType=logLine.find("\""); int endType=logLine.tqfind("\"");
//If the " character does not exist, it means that there is no Type category //If the " character does not exist, it means that there is no Type category
if (endType==-1) { if (endType==-1) {
@ -99,12 +99,12 @@ LogLine* AcpidReader::parseMessage(QString& logLine, LogFile* logFile) {
} }
QStringList list; TQStringList list;
list.push_back(type); list.push_back(type);
list.push_back(message); list.push_back(message);
QString filePath=logFile->url.path(); TQString filePath=logFile->url.path();
LogLine* line=new LogLine(date, time, list, filePath, Globals::informationLogLevel, Globals::acpidMode->id); LogLine* line=new LogLine(date, time, list, filePath, Globals::informationLogLevel, Globals::acpidMode->id);
return(line); return(line);
} }

@ -21,10 +21,10 @@
#ifndef _ACPID_READER_H_ #ifndef _ACPID_READER_H_
#define _ACPID_READER_H_ #define _ACPID_READER_H_
#include <qobject.h> #include <tqobject.h>
#include <qstringlist.h> #include <tqstringlist.h>
#include <kurl.h> #include <kurl.h>
#include <qfile.h> #include <tqfile.h>
#include "view.h" #include "view.h"
#include "globals.h" #include "globals.h"
@ -37,9 +37,10 @@
*/ */
class AcpidReader : public DefaultReader { class AcpidReader : public DefaultReader {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
AcpidReader(QObject *parent = 0, const char *name = 0); AcpidReader(TQObject *tqparent = 0, const char *name = 0);
virtual ~AcpidReader(); virtual ~AcpidReader();
@ -47,7 +48,7 @@ class AcpidReader : public DefaultReader {
protected: protected:
virtual LogLine* parseMessage(QString& logLine, LogFile* logFile); virtual LogLine* parseMessage(TQString& logLine, LogFile* logFile);
}; };

@ -24,8 +24,8 @@
#include "parsingHelper.h" #include "parsingHelper.h"
#include "apacheAccessReader.h" #include "apacheAccessReader.h"
ApacheAccessReader::ApacheAccessReader(QObject *parent, const char *name) : ApacheAccessReader::ApacheAccessReader(TQObject *tqparent, const char *name) :
DefaultReader(parent, name) DefaultReader(tqparent, name)
{ {
} }
@ -48,57 +48,57 @@ void ApacheAccessReader::initColumns(LogViewColumns* columns) {
} }
LogLine* ApacheAccessReader::parseMessage(QString& logLine, LogFile* logFile) { LogLine* ApacheAccessReader::parseMessage(TQString& logLine, LogFile* logFile) {
int spacePos=logLine.find(' '); int spacePos=logLine.tqfind(' ');
QString hostName=logLine.left(spacePos); TQString hostName=logLine.left(spacePos);
logLine=logLine.remove(0, spacePos+1); logLine=logLine.remove(0, spacePos+1);
spacePos=logLine.find(' '); spacePos=logLine.tqfind(' ');
QString identd=logLine.left(spacePos); TQString identd=logLine.left(spacePos);
logLine=logLine.remove(0, spacePos+1); logLine=logLine.remove(0, spacePos+1);
spacePos=logLine.find(' '); spacePos=logLine.tqfind(' ');
QString userName=logLine.left(spacePos); TQString userName=logLine.left(spacePos);
logLine=logLine.remove(0, spacePos+1); logLine=logLine.remove(0, spacePos+1);
int endDate=logLine.find(']'); int endDate=logLine.tqfind(']');
QString strDateTime=logLine.left(endDate); TQString strDateTime=logLine.left(endDate);
logLine=logLine.remove(0, endDate+3); logLine=logLine.remove(0, endDate+3);
QDateTime dateTime=ParsingHelper::parseDateTimeFromHTTP(strDateTime); TQDateTime dateTime=ParsingHelper::parseDateTimeFromHTTP(strDateTime);
QDate date=dateTime.date(); TQDate date=dateTime.date();
QTime time=dateTime.time(); TQTime time=dateTime.time();
int endQuote=logLine.find('\"'); int endQuote=logLine.tqfind('\"');
QString message=logLine.left(endQuote); TQString message=logLine.left(endQuote);
logLine=logLine.remove(0, endQuote+2); logLine=logLine.remove(0, endQuote+2);
spacePos=logLine.find(' '); spacePos=logLine.tqfind(' ');
QString httpResponse=ParsingHelper::parseHTTPResponse(logLine.left(spacePos)); TQString httpResponse=ParsingHelper::parseHTTPResponse(logLine.left(spacePos));
logLine=logLine.remove(0, spacePos+1); logLine=logLine.remove(0, spacePos+1);
spacePos=logLine.find(' '); spacePos=logLine.tqfind(' ');
QString bytesSent=ParsingHelper::parseSize(logLine.left(spacePos)); TQString bytesSent=ParsingHelper::parseSize(logLine.left(spacePos));
logLine=logLine.remove(0, spacePos+2); logLine=logLine.remove(0, spacePos+2);
QString url; TQString url;
endQuote=logLine.find('\"'); endQuote=logLine.tqfind('\"');
if (endQuote!=-1) { if (endQuote!=-1) {
url=logLine.left(endQuote); url=logLine.left(endQuote);
logLine=logLine.remove(0, endQuote+3); logLine=logLine.remove(0, endQuote+3);
} }
QString agent; TQString agent;
//TODO Convert this value to find a more simple name for the Agent //TODO Convert this value to find a more simple name for the Agent
endQuote=logLine.find('\"'); endQuote=logLine.tqfind('\"');
if (endQuote!=-1) { if (endQuote!=-1) {
agent=ParsingHelper::parseAgent(logLine.left(endQuote)); agent=ParsingHelper::parseAgent(logLine.left(endQuote));
} }
QStringList list; TQStringList list;
list.push_back(hostName); list.push_back(hostName);
list.push_back(identd); list.push_back(identd);
list.push_back(userName); list.push_back(userName);
@ -109,7 +109,7 @@ LogLine* ApacheAccessReader::parseMessage(QString& logLine, LogFile* logFile) {
list.push_back(url); list.push_back(url);
QString filePath=logFile->url.path(); TQString filePath=logFile->url.path();
LogLine* line=new LogLine(date, time, list, filePath, Globals::informationLogLevel, Globals::apacheAccessMode->id); LogLine* line=new LogLine(date, time, list, filePath, Globals::informationLogLevel, Globals::apacheAccessMode->id);
return(line); return(line);
} }

@ -21,10 +21,10 @@
#ifndef _APACHE_ACCESS_READER_H_ #ifndef _APACHE_ACCESS_READER_H_
#define _APACHE_ACCESS_READER_H_ #define _APACHE_ACCESS_READER_H_
#include <qobject.h> #include <tqobject.h>
#include <qstringlist.h> #include <tqstringlist.h>
#include <kurl.h> #include <kurl.h>
#include <qfile.h> #include <tqfile.h>
#include "view.h" #include "view.h"
#include "globals.h" #include "globals.h"
@ -37,9 +37,10 @@
*/ */
class ApacheAccessReader : public DefaultReader { class ApacheAccessReader : public DefaultReader {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
ApacheAccessReader(QObject *parent = 0, const char *name = 0); ApacheAccessReader(TQObject *tqparent = 0, const char *name = 0);
virtual ~ApacheAccessReader(); virtual ~ApacheAccessReader();
@ -47,7 +48,7 @@ class ApacheAccessReader : public DefaultReader {
protected: protected:
virtual LogLine* parseMessage(QString& logLine, LogFile* logFile); virtual LogLine* parseMessage(TQString& logLine, LogFile* logFile);
}; };

@ -18,14 +18,14 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/ ***************************************************************************/
//Qt includes //TQt includes
#include <qlayout.h> #include <tqlayout.h>
#include <qvgroupbox.h> #include <tqvgroupbox.h>
#include <qbuttongroup.h> #include <tqbuttongroup.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qvbox.h> #include <tqvbox.h>
#include <qhbox.h> #include <tqhbox.h>
//KDE includes //KDE includes
#include <klocale.h> #include <klocale.h>
@ -42,21 +42,21 @@
#include "apacheOptions.h" #include "apacheOptions.h"
#include "ksystemlogConfig.h" #include "ksystemlogConfig.h"
ApacheOptions::ApacheOptions(QWidget *parent) : ApacheOptions::ApacheOptions(TQWidget *tqparent) :
QWidget(parent), TQWidget(tqparent),
tabs(this, "tabs"), tabs(this, "tabs"),
apacheFileList(this, i18n("<qt><p>These files will be analyzed to display <b>Apache log</b>. This list also determines the order in which the files are read.</p></qt>")), apacheFileList(this, i18n("<qt><p>These files will be analyzed to display <b>Apache log</b>. This list also determines the order in which the files are read.</p></qt>")),
apacheAccessFileList(this, i18n("<qt><p>These files will be analyzed to display <b>Apache Access log</b>. This list also determines the order in which the files are read.</p></qt>")) apacheAccessFileList(this, i18n("<qt><p>These files will be analyzed to display <b>Apache Access log</b>. This list also determines the order in which the files are read.</p></qt>"))
{ {
QHBoxLayout *layout = new QHBoxLayout(this); TQHBoxLayout *tqlayout = new TQHBoxLayout(this);
layout->setAutoAdd(true); tqlayout->setAutoAdd(true);
tabs.addTab(&apacheFileList, Globals::apacheMode->pixmap, Globals::apacheMode->name); tabs.addTab(&apacheFileList, Globals::apacheMode->pixmap, Globals::apacheMode->name);
tabs.addTab(&apacheAccessFileList, Globals::apacheAccessMode->pixmap, Globals::apacheAccessMode->name); tabs.addTab(&apacheAccessFileList, Globals::apacheAccessMode->pixmap, Globals::apacheAccessMode->name);
connect(&apacheFileList, SIGNAL(fileListChanged(int)), this, SLOT(slotFileListChanged(int))); connect(&apacheFileList, TQT_SIGNAL(fileListChanged(int)), this, TQT_SLOT(slotFileListChanged(int)));
connect(&apacheAccessFileList, SIGNAL(fileListChanged(int)), this, SLOT(slotFileListChanged(int))); connect(&apacheAccessFileList, TQT_SIGNAL(fileListChanged(int)), this, TQT_SLOT(slotFileListChanged(int)));
readConfig(); readConfig();
@ -84,7 +84,7 @@ void ApacheOptions::slotFileListChanged(int itemLeft) {
void ApacheOptions::saveConfig() { void ApacheOptions::saveConfig() {
kdDebug() << "Save config from ApacheOptions" << endl; kdDebug() << "Save config from ApacheOptions" << endl;
QStringList list; TQStringList list;
int count=apacheFileList.count(); int count=apacheFileList.count();
@ -107,14 +107,14 @@ void ApacheOptions::saveConfig() {
} }
void ApacheOptions::readConfig() { void ApacheOptions::readConfig() {
QStringList apacheFiles(KSystemLogConfig::apachePaths()); TQStringList apacheFiles(KSystemLogConfig::apachePaths());
QStringList::iterator it; TQStringList::iterator it;
for(it=apacheFiles.begin(); it!=apacheFiles.end(); ++it) { for(it=apacheFiles.begin(); it!=apacheFiles.end(); ++it) {
apacheFileList.insertItem(*it); apacheFileList.insertItem(*it);
} }
QStringList apacheAccessFiles(KSystemLogConfig::apacheAccessPaths()); TQStringList apacheAccessFiles(KSystemLogConfig::apacheAccessPaths());
for(it=apacheAccessFiles.begin(); it!=apacheAccessFiles.end(); ++it) { for(it=apacheAccessFiles.begin(); it!=apacheAccessFiles.end(); ++it) {
apacheAccessFileList.insertItem(*it); apacheAccessFileList.insertItem(*it);

@ -21,8 +21,8 @@
#ifndef _APACHE_OPTIONS_H_ #ifndef _APACHE_OPTIONS_H_
#define _APACHE_OPTIONS_H_ #define _APACHE_OPTIONS_H_
#include <qframe.h> #include <tqframe.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <kpopupmenu.h> #include <kpopupmenu.h>
#include <kconfig.h> #include <kconfig.h>
@ -37,12 +37,13 @@
#include "logMode.h" #include "logMode.h"
class ApacheOptions : public QWidget { class ApacheOptions : public TQWidget {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
ApacheOptions(QWidget *parent = 0); ApacheOptions(TQWidget *tqparent = 0);
~ApacheOptions(); ~ApacheOptions();
bool isValid(); bool isValid();

@ -25,8 +25,8 @@
#include "parsingHelper.h" #include "parsingHelper.h"
#include "apacheReader.h" #include "apacheReader.h"
ApacheReader::ApacheReader(QObject *parent, const char *name) : ApacheReader::ApacheReader(TQObject *tqparent, const char *name) :
DefaultReader(parent, name) DefaultReader(tqparent, name)
{ {
initializeTypeLevels(); initializeTypeLevels();
@ -45,7 +45,7 @@ void ApacheReader::initColumns(LogViewColumns* columns) {
} }
LogLine* ApacheReader::parseMessage(QString& logLine, LogFile* logFile) { LogLine* ApacheReader::parseMessage(TQString& logLine, LogFile* logFile) {
/* /*
* Log line examples : * Log line examples :
@ -57,59 +57,59 @@ LogLine* ApacheReader::parseMessage(QString& logLine, LogFile* logFile) {
*/ */
QDate date; TQDate date;
QTime time; TQTime time;
QString level; TQString level;
//Temporary variable //Temporary variable
int squareBracket; int squareBracket;
//Special case which sometimes happens //Special case which sometimes happens
if (logLine.find("[client")==0) { if (logLine.tqfind("[client")==0) {
date=QDate::currentDate(); date=TQDate::tqcurrentDate();
time=QTime::currentTime(); time=TQTime::currentTime();
level="notice"; level="notice";
} }
else { else {
//The Date //The Date
int dateBegin=logLine.find("["); int dateBegin=logLine.tqfind("[");
int dateEnd=logLine.find("]"); int dateEnd=logLine.tqfind("]");
QString type; TQString type;
QString message; TQString message;
QString strDate=logLine.mid(dateBegin+1, dateEnd-dateBegin-1); TQString strDate=logLine.mid(dateBegin+1, dateEnd-dateBegin-1);
QString month=strDate.mid(4, 3); TQString month=strDate.mid(4, 3);
QString day=strDate.mid(8, 2); TQString day=strDate.mid(8, 2);
QString hour=strDate.mid(11, 2); TQString hour=strDate.mid(11, 2);
QString min=strDate.mid(14, 2); TQString min=strDate.mid(14, 2);
QString sec=strDate.mid(17, 2); TQString sec=strDate.mid(17, 2);
QString year=strDate.mid(20, 4); TQString year=strDate.mid(20, 4);
date=QDate(year.toInt(), ParsingHelper::parseMonthNumber(month), day.toInt()); date=TQDate(year.toInt(), ParsingHelper::parseMonthNumber(month), day.toInt());
time=QTime(hour.toInt(), min.toInt(), sec.toInt()); time=TQTime(hour.toInt(), min.toInt(), sec.toInt());
logLine=logLine.remove(0, dateEnd+3); logLine=logLine.remove(0, dateEnd+3);
//The log level //The log level
squareBracket=logLine.find("]"); squareBracket=logLine.tqfind("]");
level=logLine.left(squareBracket); level=logLine.left(squareBracket);
logLine=logLine.remove(0, squareBracket+2); logLine=logLine.remove(0, squareBracket+2);
} }
//The client //The client
int beginSquareBracket=logLine.find("[client"); int beginSquareBracket=logLine.tqfind("[client");
squareBracket=logLine.find("]"); squareBracket=logLine.tqfind("]");
QString client; TQString client;
if (beginSquareBracket==-1 || squareBracket==-1) { if (beginSquareBracket==-1 || squareBracket==-1) {
client=""; client="";
} }
@ -119,11 +119,11 @@ LogLine* ApacheReader::parseMessage(QString& logLine, LogFile* logFile) {
} }
QStringList list; TQStringList list;
list.push_back(client); list.push_back(client);
list.push_back(logLine); list.push_back(logLine);
QString filePath=logFile->url.path(); TQString filePath=logFile->url.path();
LogLine* line=new LogLine(date, time, list, filePath, getTypeLevel(level), Globals::apacheMode->id); LogLine* line=new LogLine(date, time, list, filePath, getTypeLevel(level), Globals::apacheMode->id);
@ -137,10 +137,10 @@ void ApacheReader::initializeTypeLevels() {
mapTypeLevels["error"]=Globals::errorLogLevel; mapTypeLevels["error"]=Globals::errorLogLevel;
} }
LogLevel* ApacheReader::getTypeLevel(const QString& type) { LogLevel* ApacheReader::getTypeLevel(const TQString& type) {
QMap<QString, LogLevel*>::iterator it; TQMap<TQString, LogLevel*>::iterator it;
it=mapTypeLevels.find(type); it=mapTypeLevels.tqfind(type);
if (it!=mapTypeLevels.end()) { if (it!=mapTypeLevels.end()) {
return(*it); return(*it);
} }

@ -21,10 +21,10 @@
#ifndef _APACHE_READER_H_ #ifndef _APACHE_READER_H_
#define _APACHE_READER_H_ #define _APACHE_READER_H_
#include <qobject.h> #include <tqobject.h>
#include <qstringlist.h> #include <tqstringlist.h>
#include <kurl.h> #include <kurl.h>
#include <qfile.h> #include <tqfile.h>
#include "view.h" #include "view.h"
#include "globals.h" #include "globals.h"
@ -37,9 +37,10 @@
*/ */
class ApacheReader : public DefaultReader { class ApacheReader : public DefaultReader {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
ApacheReader(QObject *parent = 0, const char *name = 0); ApacheReader(TQObject *tqparent = 0, const char *name = 0);
virtual ~ApacheReader(); virtual ~ApacheReader();
@ -47,14 +48,14 @@ class ApacheReader : public DefaultReader {
protected: protected:
virtual LogLine* parseMessage(QString& logLine, LogFile* logFile); virtual LogLine* parseMessage(TQString& logLine, LogFile* logFile);
private: private:
QMap<QString, LogLevel*> mapTypeLevels; TQMap<TQString, LogLevel*> mapTypeLevels;
void initializeTypeLevels(); void initializeTypeLevels();
LogLevel* getTypeLevel(const QString& type); LogLevel* getTypeLevel(const TQString& type);
}; };

@ -19,14 +19,14 @@
***************************************************************************/ ***************************************************************************/
//Qt includes //TQt includes
#include <qlayout.h> #include <tqlayout.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qvgroupbox.h> #include <tqvgroupbox.h>
#include <qbutton.h> #include <tqbutton.h>
#include <qradiobutton.h> #include <tqradiobutton.h>
#include <qwhatsthis.h> #include <tqwhatsthis.h>
#include <qtooltip.h> #include <tqtooltip.h>
//KDE includes //KDE includes
#include <kfile.h> #include <kfile.h>
@ -42,49 +42,49 @@
#include "ksystemlogConfig.h" #include "ksystemlogConfig.h"
BootAuthenticationOptions::BootAuthenticationOptions(QWidget *parent) : BootAuthenticationOptions::BootAuthenticationOptions(TQWidget *tqparent) :
QWidget(parent) TQWidget(tqparent)
{ {
QVBoxLayout *layout = new QVBoxLayout(this); TQVBoxLayout *tqlayout = new TQVBoxLayout(this);
layout->setSpacing(10); tqlayout->setSpacing(10);
//Boot log file //Boot log file
QVGroupBox* bootBox=new QVGroupBox(i18n("Boot Log File"), this); TQVGroupBox* bootBox=new TQVGroupBox(i18n("Boot Log File"), this);
new QLabel(i18n("Boot Log File:"), bootBox); new TQLabel(i18n("Boot Log File:"), bootBox);
bootURLRequester=new KURLRequester(bootBox); bootURLRequester=new KURLRequester(bootBox);
bootURLRequester->setMode(KFile::File); bootURLRequester->setMode(KFile::File);
QToolTip::add(bootURLRequester, i18n("<qt>Here, you can type or choose the boot log file (example: <i>/var/log/boot.log</i>).</qt>")); TQToolTip::add(bootURLRequester, i18n("<qt>Here, you can type or choose the boot log file (example: <i>/var/log/boot.log</i>).</qt>"));
QWhatsThis::add(bootURLRequester, i18n("<qt>You can type or choose here the boot log file. This file will be analyzed by KSystemLog when you will choose the <b>Boot log</b> menu item. Generally, its name is <i>/var/log/boot.log</i></qt>")); TQWhatsThis::add(bootURLRequester, i18n("<qt>You can type or choose here the boot log file. This file will be analyzed by KSystemLog when you will choose the <b>Boot log</b> menu item. Generally, its name is <i>/var/log/boot.log</i></qt>"));
connect(bootURLRequester, SIGNAL(textChanged(const QString&)), this, SLOT(onOptionsChanged(const QString&))); connect(bootURLRequester, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(onOptionsChanged(const TQString&)));
//Authentication log file //Authentication log file
QVGroupBox* authenticationBox=new QVGroupBox(i18n("Authentication Log File"), this); TQVGroupBox* authenticationBox=new TQVGroupBox(i18n("Authentication Log File"), this);
new QLabel(i18n("Authentication Log File:"), authenticationBox); new TQLabel(i18n("Authentication Log File:"), authenticationBox);
authenticationURLRequester=new KURLRequester(authenticationBox); authenticationURLRequester=new KURLRequester(authenticationBox);
authenticationURLRequester->setMode(KFile::File); authenticationURLRequester->setMode(KFile::File);
QToolTip::add(authenticationURLRequester, i18n("<qt>Here, you can type or choose the authentication log file (example: <i>/var/log/auth.log</i>).</qt>")); TQToolTip::add(authenticationURLRequester, i18n("<qt>Here, you can type or choose the authentication log file (example: <i>/var/log/auth.log</i>).</qt>"));
QWhatsThis::add(authenticationURLRequester, i18n("<qt>You can type or choose here the authentication log file. This file will be analyzed by KSystemLog when you will choose the <b>Authentication log</b> menu item. Generally, its name is <i>/var/log/auth.log</i></qt>")); TQWhatsThis::add(authenticationURLRequester, i18n("<qt>You can type or choose here the authentication log file. This file will be analyzed by KSystemLog when you will choose the <b>Authentication log</b> menu item. Generally, its name is <i>/var/log/auth.log</i></qt>"));
connect(authenticationURLRequester, SIGNAL(textChanged(const QString&)), this, SLOT(onOptionsChanged(const QString&))); connect(authenticationURLRequester, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(onOptionsChanged(const TQString&)));
QSpacerItem* spacer=new QSpacerItem(0, 0, QSizePolicy::Preferred, QSizePolicy::Expanding); TQSpacerItem* spacer=new TQSpacerItem(0, 0, TQSizePolicy::Preferred, TQSizePolicy::Expanding);
layout->addWidget(bootBox); tqlayout->addWidget(bootBox);
layout->addWidget(authenticationBox); tqlayout->addWidget(authenticationBox);
layout->addItem(spacer); tqlayout->addItem(spacer);
readConfig(); readConfig();
} }
void BootAuthenticationOptions::readConfig() { void BootAuthenticationOptions::readConfig() {
QString file=KSystemLogConfig::bootPath(); TQString file=KSystemLogConfig::bootPath();
bootURLRequester->setURL(file); bootURLRequester->setURL(file);
file=KSystemLogConfig::authenticationPath(); file=KSystemLogConfig::authenticationPath();
@ -112,7 +112,7 @@ bool BootAuthenticationOptions::isValid() {
} }
void BootAuthenticationOptions::onOptionsChanged(const QString& /*text*/) { void BootAuthenticationOptions::onOptionsChanged(const TQString& /*text*/) {
emit optionsChanged(true); emit optionsChanged(true);
} }

@ -21,9 +21,9 @@
#ifndef _BOOT_AUTHENTICATION_OPTIONS_H_ #ifndef _BOOT_AUTHENTICATION_OPTIONS_H_
#define _BOOT_AUTHENTICATION_OPTIONS_H_ #define _BOOT_AUTHENTICATION_OPTIONS_H_
#include <qframe.h> #include <tqframe.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <qbuttongroup.h> #include <tqbuttongroup.h>
#include <kconfig.h> #include <kconfig.h>
#include <kdialogbase.h> #include <kdialogbase.h>
@ -34,10 +34,11 @@
class BootAuthenticationOptions : public QWidget { class BootAuthenticationOptions : public TQWidget {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
BootAuthenticationOptions(QWidget *parent = 0); BootAuthenticationOptions(TQWidget *tqparent = 0);
bool isValid(); bool isValid();
@ -49,7 +50,7 @@ class BootAuthenticationOptions : public QWidget {
void optionsChanged(bool valid); void optionsChanged(bool valid);
private slots: private slots:
void onOptionsChanged(const QString&); void onOptionsChanged(const TQString&);
private: private:
KURLRequester* bootURLRequester; KURLRequester* bootURLRequester;

@ -22,9 +22,9 @@
#include "childLogLine.h" #include "childLogLine.h"
ChildLogLine::ChildLogLine(QDate& date, QTime& time, QStringList& list, QString& file, LogLevel* level, int type) : ChildLogLine::ChildLogLine(TQDate& date, TQTime& time, TQStringList& list, TQString& file, LogLevel* level, int type) :
LogLine(date, time, list, file, level, type), LogLine(date, time, list, file, level, type),
parent(NULL) { tqparent(NULL) {
} }
@ -33,11 +33,11 @@ ChildLogLine::~ChildLogLine() {
} }
void ChildLogLine::setParent(ParentLogLine* line) { void ChildLogLine::setParent(ParentLogLine* line) {
parent=line; tqparent=line;
} }
ParentLogLine* ChildLogLine::getParent() { ParentLogLine* ChildLogLine::getParent() {
return(parent); return(tqparent);
} }
bool ChildLogLine::isChildLogLine() { bool ChildLogLine::isChildLogLine() {

@ -21,7 +21,7 @@
#ifndef _CHILD_LOG_LINE_H_ #ifndef _CHILD_LOG_LINE_H_
#define _CHILD_LOG_LINE_H_ #define _CHILD_LOG_LINE_H_
#include <qobject.h> #include <tqobject.h>
#include <kurl.h> #include <kurl.h>
@ -38,7 +38,7 @@ class ParentLogLine;
class ChildLogLine : public LogLine { class ChildLogLine : public LogLine {
public: public:
ChildLogLine(QDate& date, QTime& time, QStringList& list, QString& originalFile, LogLevel* level, int tpe); ChildLogLine(TQDate& date, TQTime& time, TQStringList& list, TQString& originalFile, LogLevel* level, int tpe);
virtual ~ChildLogLine(); virtual ~ChildLogLine();
@ -48,7 +48,7 @@ class ChildLogLine : public LogLine {
virtual bool isChildLogLine(); virtual bool isChildLogLine();
protected: protected:
ParentLogLine* parent; ParentLogLine* tqparent;
}; };

@ -18,14 +18,14 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/ ***************************************************************************/
//Qt includes //TQt includes
#include <qlayout.h> #include <tqlayout.h>
#include <qvgroupbox.h> #include <tqvgroupbox.h>
#include <qbuttongroup.h> #include <tqbuttongroup.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qvbox.h> #include <tqvbox.h>
#include <qhbox.h> #include <tqhbox.h>
//KDE includes //KDE includes
#include <klocale.h> #include <klocale.h>
@ -42,17 +42,17 @@
#include "cronOptions.h" #include "cronOptions.h"
#include "ksystemlogConfig.h" #include "ksystemlogConfig.h"
CronOptions::CronOptions(QWidget *parent) : CronOptions::CronOptions(TQWidget *tqparent) :
QWidget(parent) TQWidget(tqparent)
{ {
QHBoxLayout *layout = new QHBoxLayout(this); TQHBoxLayout *tqlayout = new TQHBoxLayout(this);
layout->setAutoAdd(true); tqlayout->setAutoAdd(true);
QString description= i18n("<qt><p>These files will be analyzed to display <b>Cron Logs</b> (i.e. planned tasks logs). This list also determines the order in which the files are read.</p></qt>"); TQString description= i18n("<qt><p>These files will be analyzed to display <b>Cron Logs</b> (i.e. planned tasks logs). This list also determines the order in which the files are read.</p></qt>");
fileList=new SpecificFileList(this, description); fileList=new SpecificFileList(this, description);
connect(fileList, SIGNAL(fileListChanged(int)), this, SLOT(slotFileListChanged(int))); connect(fileList, TQT_SIGNAL(fileListChanged(int)), this, TQT_SLOT(slotFileListChanged(int)));
readConfig(); readConfig();
@ -80,8 +80,8 @@ void CronOptions::slotFileListChanged(int itemLeft) {
void CronOptions::saveConfig() { void CronOptions::saveConfig() {
kdDebug() << "Saving config from Cron Options..." << endl; kdDebug() << "Saving config from Cron Options..." << endl;
QStringList stringList; TQStringList stringList;
QValueList<int> valueList; TQValueList<int> valueList;
fileList->saveConfig(stringList, valueList); fileList->saveConfig(stringList, valueList);
@ -90,8 +90,8 @@ void CronOptions::saveConfig() {
} }
void CronOptions::readConfig() { void CronOptions::readConfig() {
QStringList stringList=KSystemLogConfig::cronPaths(); TQStringList stringList=KSystemLogConfig::cronPaths();
QValueList<int> valueList=KSystemLogConfig::cronLevels(); TQValueList<int> valueList=KSystemLogConfig::cronLevels();
fileList->readConfig(stringList, valueList); fileList->readConfig(stringList, valueList);
} }

@ -21,8 +21,8 @@
#ifndef _CRON_OPTIONS_H_ #ifndef _CRON_OPTIONS_H_
#define _CRON_OPTIONS_H_ #define _CRON_OPTIONS_H_
#include <qframe.h> #include <tqframe.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <kpopupmenu.h> #include <kpopupmenu.h>
#include <kconfig.h> #include <kconfig.h>
@ -37,10 +37,11 @@
#include "logLevel.h" #include "logLevel.h"
class CronOptions : public QWidget { class CronOptions : public TQWidget {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
CronOptions(QWidget *parent = 0); CronOptions(TQWidget *tqparent = 0);
~CronOptions(); ~CronOptions();
bool isValid(); bool isValid();

@ -23,8 +23,8 @@
#include <klocale.h> #include <klocale.h>
#include <kmessagebox.h> #include <kmessagebox.h>
CronReader::CronReader(QObject *parent, const char *name) : CronReader::CronReader(TQObject *tqparent, const char *name) :
DefaultReader(parent, name) DefaultReader(tqparent, name)
{ {
} }
@ -47,22 +47,22 @@ void CronReader::initColumns(LogViewColumns* columns) {
/** /**
* TODO Improve speed of this method * TODO Improve speed of this method
*/ */
LogLine* CronReader::parseMessage(QString& line, LogFile* logFile) { LogLine* CronReader::parseMessage(TQString& line, LogFile* logFile) {
//Use the default parsing //Use the default parsing
LogLine* logLine=DefaultReader::parseMessage(line, logFile); LogLine* logLine=DefaultReader::parseMessage(line, logFile);
QStringList& list=logLine->getItemList(); TQStringList& list=logLine->getItemList();
//Gets the message column (last item) and deletes it //Gets the message column (last item) and deletes it
QString message=list.back(); TQString message=list.back();
list.pop_back(); list.pop_back();
int leftBracket=message.find('('); int leftBracket=message.tqfind('(');
int rightBracket=message.find(')'); int rightBracket=message.tqfind(')');
QString user=message.mid(leftBracket+1, rightBracket-leftBracket-1); TQString user=message.mid(leftBracket+1, rightBracket-leftBracket-1);
list.push_back(user); list.push_back(user);

@ -21,10 +21,10 @@
#ifndef _CRON_READER_H_ #ifndef _CRON_READER_H_
#define _CRON_READER_H_ #define _CRON_READER_H_
#include <qobject.h> #include <tqobject.h>
#include <qstringlist.h> #include <tqstringlist.h>
#include <kurl.h> #include <kurl.h>
#include <qfile.h> #include <tqfile.h>
#include "view.h" #include "view.h"
#include "globals.h" #include "globals.h"
@ -37,9 +37,10 @@
*/ */
class CronReader : public DefaultReader { class CronReader : public DefaultReader {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
CronReader(QObject *parent = 0, const char *name = 0); CronReader(TQObject *tqparent = 0, const char *name = 0);
virtual ~CronReader(); virtual ~CronReader();
@ -47,7 +48,7 @@ class CronReader : public DefaultReader {
protected: protected:
virtual LogLine* parseMessage(QString& logLine, LogFile* logFile); virtual LogLine* parseMessage(TQString& logLine, LogFile* logFile);
}; };

@ -24,8 +24,8 @@
#include "parsingHelper.h" #include "parsingHelper.h"
#include "cupsAccessReader.h" #include "cupsAccessReader.h"
CupsAccessReader::CupsAccessReader(QObject *parent, const char *name) : CupsAccessReader::CupsAccessReader(TQObject *tqparent, const char *name) :
DefaultReader(parent, name) DefaultReader(tqparent, name)
{ {
} }
@ -46,41 +46,41 @@ void CupsAccessReader::initColumns(LogViewColumns* columns) {
} }
LogLine* CupsAccessReader::parseMessage(QString& logLine, LogFile* logFile) { LogLine* CupsAccessReader::parseMessage(TQString& logLine, LogFile* logFile) {
int spacePos=logLine.find(' '); int spacePos=logLine.tqfind(' ');
QString hostName=logLine.left(spacePos); TQString hostName=logLine.left(spacePos);
logLine=logLine.remove(0, spacePos+1); logLine=logLine.remove(0, spacePos+1);
spacePos=logLine.find(' '); spacePos=logLine.tqfind(' ');
QString identd=logLine.left(spacePos); TQString identd=logLine.left(spacePos);
logLine=logLine.remove(0, spacePos+1); logLine=logLine.remove(0, spacePos+1);
spacePos=logLine.find(' '); spacePos=logLine.tqfind(' ');
QString userName=logLine.left(spacePos); TQString userName=logLine.left(spacePos);
logLine=logLine.remove(0, spacePos+1); logLine=logLine.remove(0, spacePos+1);
int endDate=logLine.find(']'); int endDate=logLine.tqfind(']');
QString strDateTime=logLine.left(endDate); TQString strDateTime=logLine.left(endDate);
logLine=logLine.remove(0, endDate+3); logLine=logLine.remove(0, endDate+3);
QDateTime dateTime=ParsingHelper::parseDateTimeFromHTTP(strDateTime); TQDateTime dateTime=ParsingHelper::parseDateTimeFromHTTP(strDateTime);
QDate date=dateTime.date(); TQDate date=dateTime.date();
QTime time=dateTime.time(); TQTime time=dateTime.time();
int endQuote=logLine.find('\"'); int endQuote=logLine.tqfind('\"');
QString message=logLine.left(endQuote); TQString message=logLine.left(endQuote);
logLine=logLine.remove(0, endQuote+2); logLine=logLine.remove(0, endQuote+2);
spacePos=logLine.find(' '); spacePos=logLine.tqfind(' ');
QString httpResponse=ParsingHelper::parseHTTPResponse(logLine.left(spacePos)); TQString httpResponse=ParsingHelper::parseHTTPResponse(logLine.left(spacePos));
logLine=logLine.remove(0, spacePos+1); logLine=logLine.remove(0, spacePos+1);
spacePos=logLine.find(' '); spacePos=logLine.tqfind(' ');
QString bytesSent=ParsingHelper::parseSize(logLine.left(spacePos)); TQString bytesSent=ParsingHelper::parseSize(logLine.left(spacePos));
QStringList list; TQStringList list;
list.push_back(hostName); list.push_back(hostName);
list.push_back(identd); list.push_back(identd);
@ -90,7 +90,7 @@ LogLine* CupsAccessReader::parseMessage(QString& logLine, LogFile* logFile) {
list.push_back(message); list.push_back(message);
QString filePath=logFile->url.path(); TQString filePath=logFile->url.path();
LogLine* line=new LogLine(date, time, list, filePath, Globals::informationLogLevel, Globals::cupsAccessMode->id); LogLine* line=new LogLine(date, time, list, filePath, Globals::informationLogLevel, Globals::cupsAccessMode->id);
return(line); return(line);
} }

@ -21,10 +21,10 @@
#ifndef _CUPS_ACCESS_READER_H_ #ifndef _CUPS_ACCESS_READER_H_
#define _CUPS_ACCESS_READER_H_ #define _CUPS_ACCESS_READER_H_
#include <qobject.h> #include <tqobject.h>
#include <qstringlist.h> #include <tqstringlist.h>
#include <kurl.h> #include <kurl.h>
#include <qfile.h> #include <tqfile.h>
#include "view.h" #include "view.h"
#include "globals.h" #include "globals.h"
@ -37,9 +37,10 @@
*/ */
class CupsAccessReader : public DefaultReader { class CupsAccessReader : public DefaultReader {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
CupsAccessReader(QObject *parent = 0, const char *name = 0); CupsAccessReader(TQObject *tqparent = 0, const char *name = 0);
virtual ~CupsAccessReader(); virtual ~CupsAccessReader();
@ -47,7 +48,7 @@ class CupsAccessReader : public DefaultReader {
protected: protected:
virtual LogLine* parseMessage(QString& logLine, LogFile* logFile); virtual LogLine* parseMessage(TQString& logLine, LogFile* logFile);
}; };

@ -18,14 +18,14 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/ ***************************************************************************/
//Qt includes //TQt includes
#include <qlayout.h> #include <tqlayout.h>
#include <qvgroupbox.h> #include <tqvgroupbox.h>
#include <qbuttongroup.h> #include <tqbuttongroup.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qvbox.h> #include <tqvbox.h>
#include <qhbox.h> #include <tqhbox.h>
//KDE includes //KDE includes
#include <klocale.h> #include <klocale.h>
@ -42,21 +42,21 @@
#include "cupsOptions.h" #include "cupsOptions.h"
#include "ksystemlogConfig.h" #include "ksystemlogConfig.h"
CupsOptions::CupsOptions(QWidget *parent) : CupsOptions::CupsOptions(TQWidget *tqparent) :
QWidget(parent), TQWidget(tqparent),
tabs(this, "tabs"), tabs(this, "tabs"),
cupsFileList(this, i18n("<qt><p>These files will be analyzed to display <b>Cups log</b>. This list also determines the order in which the files are read.</p></qt>")), cupsFileList(this, i18n("<qt><p>These files will be analyzed to display <b>Cups log</b>. This list also determines the order in which the files are read.</p></qt>")),
cupsAccessFileList(this, i18n("<qt><p>These files will be analyzed to display <b>Cups Web Server log</b>. This list also determines the order in which the files are read.</p></qt>")) cupsAccessFileList(this, i18n("<qt><p>These files will be analyzed to display <b>Cups Web Server log</b>. This list also determines the order in which the files are read.</p></qt>"))
{ {
QHBoxLayout *layout = new QHBoxLayout(this); TQHBoxLayout *tqlayout = new TQHBoxLayout(this);
layout->setAutoAdd(true); tqlayout->setAutoAdd(true);
tabs.addTab(&cupsFileList, Globals::cupsMode->pixmap, Globals::cupsMode->name); tabs.addTab(&cupsFileList, Globals::cupsMode->pixmap, Globals::cupsMode->name);
tabs.addTab(&cupsAccessFileList, Globals::cupsAccessMode->pixmap, Globals::cupsAccessMode->name); tabs.addTab(&cupsAccessFileList, Globals::cupsAccessMode->pixmap, Globals::cupsAccessMode->name);
connect(&cupsFileList, SIGNAL(fileListChanged(int)), this, SLOT(slotFileListChanged(int))); connect(&cupsFileList, TQT_SIGNAL(fileListChanged(int)), this, TQT_SLOT(slotFileListChanged(int)));
connect(&cupsAccessFileList, SIGNAL(fileListChanged(int)), this, SLOT(slotFileListChanged(int))); connect(&cupsAccessFileList, TQT_SIGNAL(fileListChanged(int)), this, TQT_SLOT(slotFileListChanged(int)));
readConfig(); readConfig();
@ -84,7 +84,7 @@ void CupsOptions::slotFileListChanged(int itemLeft) {
void CupsOptions::saveConfig() { void CupsOptions::saveConfig() {
kdDebug() << "Save config from CupsOptions" << endl; kdDebug() << "Save config from CupsOptions" << endl;
QStringList list; TQStringList list;
int count=cupsFileList.count(); int count=cupsFileList.count();
@ -107,14 +107,14 @@ void CupsOptions::saveConfig() {
} }
void CupsOptions::readConfig() { void CupsOptions::readConfig() {
QStringList cupsFiles(KSystemLogConfig::cupsPaths()); TQStringList cupsFiles(KSystemLogConfig::cupsPaths());
QStringList::iterator it; TQStringList::iterator it;
for(it=cupsFiles.begin(); it!=cupsFiles.end(); ++it) { for(it=cupsFiles.begin(); it!=cupsFiles.end(); ++it) {
cupsFileList.insertItem(*it); cupsFileList.insertItem(*it);
} }
QStringList cupsAccessFiles(KSystemLogConfig::cupsAccessPaths()); TQStringList cupsAccessFiles(KSystemLogConfig::cupsAccessPaths());
for(it=cupsAccessFiles.begin(); it!=cupsAccessFiles.end(); ++it) { for(it=cupsAccessFiles.begin(); it!=cupsAccessFiles.end(); ++it) {
cupsAccessFileList.insertItem(*it); cupsAccessFileList.insertItem(*it);

@ -21,8 +21,8 @@
#ifndef _CUPS_OPTIONS_H_ #ifndef _CUPS_OPTIONS_H_
#define _CUPS_OPTIONS_H_ #define _CUPS_OPTIONS_H_
#include <qframe.h> #include <tqframe.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <kpopupmenu.h> #include <kpopupmenu.h>
#include <kconfig.h> #include <kconfig.h>
@ -37,12 +37,13 @@
#include "logMode.h" #include "logMode.h"
class CupsOptions : public QWidget { class CupsOptions : public TQWidget {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
CupsOptions(QWidget *parent = 0); CupsOptions(TQWidget *tqparent = 0);
~CupsOptions(); ~CupsOptions();
bool isValid(); bool isValid();

@ -26,8 +26,8 @@
#define DEBUG2_LOG_LEVEL_ICON "source" #define DEBUG2_LOG_LEVEL_ICON "source"
CupsReader::CupsReader(QObject *parent, const char *name) : CupsReader::CupsReader(TQObject *tqparent, const char *name) :
DefaultReader(parent, name) DefaultReader(tqparent, name)
{ {
initializeTypeLevels(); initializeTypeLevels();
@ -46,28 +46,28 @@ void CupsReader::initColumns(LogViewColumns* columns) {
} }
LogLine* CupsReader::parseMessage(QString& logLine, LogFile* logFile) { LogLine* CupsReader::parseMessage(TQString& logLine, LogFile* logFile) {
/* /*
* Log line examples : * Log line examples :
* I [15/Feb/2004:01:29:32 +0100] LoadPPDs: No new or changed PPDs... * I [15/Feb/2004:01:29:32 +0100] LoadPPDs: No new or changed PPDs...
* E [15/Feb/2004:01:43:15 +0100] Scheduler shutting down due to SIGTERM. * E [15/Feb/2004:01:43:15 +0100] Scheduler shutting down due to SIGTERM.
*/ */
QChar level=logLine[0]; TQChar level=logLine[0];
QString strDateTime=logLine.mid(2, 28); TQString strDateTime=logLine.mid(2, 28);
QDateTime dateTime=ParsingHelper::parseDateTimeFromHTTP(strDateTime); TQDateTime dateTime=ParsingHelper::parseDateTimeFromHTTP(strDateTime);
QDate date=dateTime.date(); TQDate date=dateTime.date();
QTime time=dateTime.time(); TQTime time=dateTime.time();
QString message=logLine.remove(0, 31); TQString message=logLine.remove(0, 31);
LogLevel* logLevel=getTypeLevel(level); LogLevel* logLevel=getTypeLevel(level);
QStringList list; TQStringList list;
list.push_back(message); list.push_back(message);
QString filePath=logFile->url.path(); TQString filePath=logFile->url.path();
LogLine* line=new LogLine(date, time, list, filePath, logLevel, Globals::cupsMode->id); LogLine* line=new LogLine(date, time, list, filePath, logLevel, Globals::cupsMode->id);
@ -76,7 +76,7 @@ LogLine* CupsReader::parseMessage(QString& logLine, LogFile* logFile) {
void CupsReader::initializeTypeLevels() { void CupsReader::initializeTypeLevels() {
mapTypeLevels['d']=new LogLevel(20, i18n("debug 2"), DEBUG2_LOG_LEVEL_ICON, QColor(169, 189, 165)); mapTypeLevels['d']=new LogLevel(20, i18n("debug 2"), DEBUG2_LOG_LEVEL_ICON, TQColor(169, 189, 165));
mapTypeLevels['D']=Globals::debugLogLevel; mapTypeLevels['D']=Globals::debugLogLevel;
mapTypeLevels['I']=Globals::informationLogLevel; mapTypeLevels['I']=Globals::informationLogLevel;
mapTypeLevels['N']=Globals::noticeLogLevel; mapTypeLevels['N']=Globals::noticeLogLevel;
@ -88,10 +88,10 @@ void CupsReader::initializeTypeLevels() {
mapTypeLevels[' ']=Globals::noneLogLevel; mapTypeLevels[' ']=Globals::noneLogLevel;
} }
LogLevel* CupsReader::getTypeLevel(const QChar& type) { LogLevel* CupsReader::getTypeLevel(const TQChar& type) {
QMap<QChar, LogLevel*>::iterator it; TQMap<TQChar, LogLevel*>::iterator it;
it=mapTypeLevels.find(type); it=mapTypeLevels.tqfind(type);
if (it!=mapTypeLevels.end()) { if (it!=mapTypeLevels.end()) {
return(*it); return(*it);
} }

@ -21,10 +21,10 @@
#ifndef _CUPS_READER_H_ #ifndef _CUPS_READER_H_
#define _CUPS_READER_H_ #define _CUPS_READER_H_
#include <qobject.h> #include <tqobject.h>
#include <qstringlist.h> #include <tqstringlist.h>
#include <kurl.h> #include <kurl.h>
#include <qfile.h> #include <tqfile.h>
#include "view.h" #include "view.h"
#include "globals.h" #include "globals.h"
@ -37,9 +37,10 @@
*/ */
class CupsReader : public DefaultReader { class CupsReader : public DefaultReader {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
CupsReader(QObject *parent = 0, const char *name = 0); CupsReader(TQObject *tqparent = 0, const char *name = 0);
virtual ~CupsReader(); virtual ~CupsReader();
@ -47,14 +48,14 @@ class CupsReader : public DefaultReader {
protected: protected:
virtual LogLine* parseMessage(QString& logLine, LogFile* logFile); virtual LogLine* parseMessage(TQString& logLine, LogFile* logFile);
private: private:
QMap<QChar, LogLevel*> mapTypeLevels; TQMap<TQChar, LogLevel*> mapTypeLevels;
void initializeTypeLevels(); void initializeTypeLevels();
LogLevel* getTypeLevel(const QChar& type); LogLevel* getTypeLevel(const TQChar& type);

@ -18,14 +18,14 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/ ***************************************************************************/
//Qt includes //TQt includes
#include <qlayout.h> #include <tqlayout.h>
#include <qvgroupbox.h> #include <tqvgroupbox.h>
#include <qbuttongroup.h> #include <tqbuttongroup.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qvbox.h> #include <tqvbox.h>
#include <qhbox.h> #include <tqhbox.h>
//KDE includes //KDE includes
#include <klocale.h> #include <klocale.h>
@ -42,17 +42,17 @@
#include "daemonOptions.h" #include "daemonOptions.h"
#include "ksystemlogConfig.h" #include "ksystemlogConfig.h"
DaemonOptions::DaemonOptions(QWidget *parent) : DaemonOptions::DaemonOptions(TQWidget *tqparent) :
QWidget(parent) TQWidget(tqparent)
{ {
QHBoxLayout *layout = new QHBoxLayout(this); TQHBoxLayout *tqlayout = new TQHBoxLayout(this);
layout->setAutoAdd(true); tqlayout->setAutoAdd(true);
QString description= i18n("<qt><p>These files will be analyzed to display <b>daemons Logs</b>. This list also determine the order in which the files are read.</p></qt>"); TQString description= i18n("<qt><p>These files will be analyzed to display <b>daemons Logs</b>. This list also determine the order in which the files are read.</p></qt>");
fileList=new SpecificFileList(this, description); fileList=new SpecificFileList(this, description);
connect(fileList, SIGNAL(fileListChanged(int)), this, SLOT(slotFileListChanged(int))); connect(fileList, TQT_SIGNAL(fileListChanged(int)), this, TQT_SLOT(slotFileListChanged(int)));
readConfig(); readConfig();
@ -80,8 +80,8 @@ void DaemonOptions::slotFileListChanged(int itemLeft) {
void DaemonOptions::saveConfig() { void DaemonOptions::saveConfig() {
kdDebug() << "Saving config from Daemon Options..." << endl; kdDebug() << "Saving config from Daemon Options..." << endl;
QStringList stringList; TQStringList stringList;
QValueList<int> valueList; TQValueList<int> valueList;
fileList->saveConfig(stringList, valueList); fileList->saveConfig(stringList, valueList);
@ -90,8 +90,8 @@ void DaemonOptions::saveConfig() {
} }
void DaemonOptions::readConfig() { void DaemonOptions::readConfig() {
QStringList stringList=KSystemLogConfig::daemonPaths(); TQStringList stringList=KSystemLogConfig::daemonPaths();
QValueList<int> valueList=KSystemLogConfig::daemonLevels(); TQValueList<int> valueList=KSystemLogConfig::daemonLevels();
fileList->readConfig(stringList, valueList); fileList->readConfig(stringList, valueList);
} }

@ -21,8 +21,8 @@
#ifndef _DAEMON_OPTIONS_H_ #ifndef _DAEMON_OPTIONS_H_
#define _DAEMON_OPTIONS_H_ #define _DAEMON_OPTIONS_H_
#include <qframe.h> #include <tqframe.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <kpopupmenu.h> #include <kpopupmenu.h>
#include <kconfig.h> #include <kconfig.h>
@ -35,10 +35,11 @@
#include "specificFileList.h" #include "specificFileList.h"
#include "logLevel.h" #include "logLevel.h"
class DaemonOptions : public QWidget { class DaemonOptions : public TQWidget {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
DaemonOptions(QWidget *parent = 0); DaemonOptions(TQWidget *tqparent = 0);
~DaemonOptions(); ~DaemonOptions();
bool isValid(); bool isValid();

@ -31,8 +31,8 @@
#include "defaultReader.h" #include "defaultReader.h"
DefaultReader::DefaultReader(QObject *parent, const char *name) : DefaultReader::DefaultReader(TQObject *tqparent, const char *name) :
Reader(parent, name), Reader(tqparent, name),
buffers(NULL) buffers(NULL)
{ {
@ -60,7 +60,7 @@ void DefaultReader::readLog() {
LogFiles& files=logManager->getLogFiles(); LogFiles& files=logManager->getLogFiles();
//Inform connected QObject that the reading has begun //Inform connected TQObject that the reading has begun
emit readingBegin(); emit readingBegin();
//Read each file of the list, and place their lines in the buffer //Read each file of the list, and place their lines in the buffer
@ -82,7 +82,7 @@ void DefaultReader::readLog() {
if (!buffers->isEmpty()) if (!buffers->isEmpty())
buffers->setFirstReadPerformed(true); buffers->setFirstReadPerformed(true);
//Inform connected QObject that the reading is now finished //Inform connected TQObject that the reading is now finished
emit readingEnd(); emit readingEnd();
//Emit a signal which informs connected slots that there are new lines //Emit a signal which informs connected slots that there are new lines
@ -90,11 +90,11 @@ void DefaultReader::readLog() {
} }
void DefaultReader::readFile(LogFile* logFile) { void DefaultReader::readFile(LogFile* logFile) {
QString message=i18n("Opening file '%1'...").arg(logFile->url.path()); TQString message=i18n("Opening file '%1'...").tqarg(logFile->url.path());
emit statusbarChanged(message); emit statusbarChanged(message);
//Inform connected QObject that we are now reading the "index" file //Inform connected TQObject that we are now reading the "index" file
emit readingFile(logManager->getLogFiles().count() - logManager->getLogFiles().findIndex(logFile)); emit readingFile(logManager->getLogFiles().count() - logManager->getLogFiles().tqfindIndex(logFile));
//We initialize these values from configuration to be used by the insert methods //We initialize these values from configuration to be used by the insert methods
@ -104,23 +104,23 @@ void DefaultReader::readFile(LogFile* logFile) {
tmpMaxCharacters=KSystemLogConfig::maxReadCharacters(); tmpMaxCharacters=KSystemLogConfig::maxReadCharacters();
//Open the file //Open the file
QFile* file=this->openFile(logFile->url.path()); TQFile* file=this->openFile(logFile->url.path());
//If an error occurs, end this method //If an error occurs, end this method
if (file==NULL) { if (file==NULL) {
return; return;
} }
QString buffer; TQString buffer;
QString filePath=logFile->url.path(); TQString filePath=logFile->url.path();
//Insert the content of the file in a string list //Insert the content of the file in a string list
QStringList* rawBuffer=getRawBuffer(file); TQStringList* rawBuffer=getRawBuffer(file);
//If there is no line //If there is no line
if (rawBuffer->size()==0) { if (rawBuffer->size()==0) {
QString message=i18n("No log line in '%1'.").arg(logFile->url.path()); TQString message=i18n("No log line in '%1'.").tqarg(logFile->url.path());
emit statusbarChanged(message); emit statusbarChanged(message);
delete rawBuffer; delete rawBuffer;
@ -129,7 +129,7 @@ void DefaultReader::readFile(LogFile* logFile) {
kdDebug() << "Testing each line..." << endl; kdDebug() << "Testing each line..." << endl;
QStringList::iterator it; TQStringList::iterator it;
it=rawBuffer->end(); it=rawBuffer->end();
it--; it--;
@ -174,7 +174,7 @@ void DefaultReader::readFile(LogFile* logFile) {
// Close the file // Close the file
this->closeFile(file); this->closeFile(file);
message=i18n("Log file '%1' loaded successfully.").arg(logFile->url.path()); message=i18n("Log file '%1' loaded successfully.").tqarg(logFile->url.path());
emit statusbarChanged(message); emit statusbarChanged(message);
} }
@ -190,10 +190,10 @@ void DefaultReader::logChanged(LogFile* logFile) {
tmpMaxLines=KSystemLogConfig::maxLines(); tmpMaxLines=KSystemLogConfig::maxLines();
tmpMaxCharacters=KSystemLogConfig::maxReadCharacters(); tmpMaxCharacters=KSystemLogConfig::maxReadCharacters();
QString buffer; TQString buffer;
QString filePath=logFile->url.path(); TQString filePath=logFile->url.path();
QFile* file=this->openFile(filePath); TQFile* file=this->openFile(filePath);
if (file==NULL) if (file==NULL)
return; return;
@ -209,8 +209,8 @@ void DefaultReader::logChanged(LogFile* logFile) {
//Get the maximum number of line read from LogManager //Get the maximum number of line read from LogManager
int maxLines=KSystemLogConfig::maxLines(); int maxLines=KSystemLogConfig::maxLines();
QString buffer; TQString buffer;
QStringList* rawBuffer=getRawBuffer(file); TQStringList* rawBuffer=getRawBuffer(file);
//If there is no line //If there is no line
if (rawBuffer->size()==0) { if (rawBuffer->size()==0) {
@ -220,7 +220,7 @@ void DefaultReader::logChanged(LogFile* logFile) {
kdDebug() << "Testing each line..." << endl; kdDebug() << "Testing each line..." << endl;
QStringList::iterator it; TQStringList::iterator it;
it=rawBuffer->end(); it=rawBuffer->end();
it--; it--;
@ -267,8 +267,8 @@ void DefaultReader::logChanged(LogFile* logFile) {
// Close the file // Close the file
this->closeFile(file); this->closeFile(file);
QString message; TQString message;
message=i18n("Log file '%1' has changed.").arg(logFile->url.path()); message=i18n("Log file '%1' has changed.").tqarg(logFile->url.path());
emit statusbarChanged(message); emit statusbarChanged(message);
//Emit a signal which informs connected slots that there are new lines //Emit a signal which informs connected slots that there are new lines
@ -278,7 +278,7 @@ void DefaultReader::logChanged(LogFile* logFile) {
bool DefaultReader::insertLine(QString& buffer, LogFile* originalFile) { bool DefaultReader::insertLine(TQString& buffer, LogFile* originalFile) {
LogLine* line=this->parseMessage(buffer, originalFile); LogLine* line=this->parseMessage(buffer, originalFile);
//Do not insert the line if it NULL //Do not insert the line if it NULL
@ -312,7 +312,7 @@ bool DefaultReader::insertLine(QString& buffer, LogFile* originalFile) {
} }
bool DefaultReader::insertOrReplaceLine(QString& buffer, LogFile* originalFile) { bool DefaultReader::insertOrReplaceLine(TQString& buffer, LogFile* originalFile) {
LogLine* line=this->parseMessage(buffer, originalFile); LogLine* line=this->parseMessage(buffer, originalFile);
//Do not insert the line if it NULL //Do not insert the line if it NULL
@ -353,34 +353,34 @@ bool DefaultReader::insertOrReplaceLine(QString& buffer, LogFile* originalFile)
/** /**
* TODO Improve speed of this method (with KRegExp class for example) * TODO Improve speed of this method (with KRegExp class for example)
*/ */
LogLine* DefaultReader::parseMessage(QString& logLine, LogFile* originalFile) { LogLine* DefaultReader::parseMessage(TQString& logLine, LogFile* originalFile) {
//kdDebug() << "Please don't use parseMessage() from SortedReader class" << endl; //kdDebug() << "Please don't use parseMessage() from SortedReader class" << endl;
int year=QDate::currentDate().year(); int year=TQDate::tqcurrentDate().year();
//Month number //Month number
QString month; TQString month;
month=logLine.left(3); month=logLine.left(3);
logLine=logLine.remove(0, 4); logLine=logLine.remove(0, 4);
int monthNum=ParsingHelper::parseMonthNumber(month); int monthNum=ParsingHelper::parseMonthNumber(month);
//Day number //Day number
QString day; TQString day;
day=logLine.left(2); day=logLine.left(2);
int dayNum=day.toInt(); int dayNum=day.toInt();
logLine=logLine.remove(0, 3); logLine=logLine.remove(0, 3);
QDate date(year, monthNum, dayNum); TQDate date(year, monthNum, dayNum);
if (!date.isValid()) { if (!date.isValid()) {
kdDebug() << "Malformed date" << endl; kdDebug() << "Malformed date" << endl;
date=QDate::currentDate(); date=TQDate::tqcurrentDate();
} }
//Time //Time
QString stringTime; TQString stringTime;
stringTime=logLine.left(8); stringTime=logLine.left(8);
int h=stringTime.left(2).toInt(); int h=stringTime.left(2).toInt();
stringTime.remove(0, 3); stringTime.remove(0, 3);
@ -389,37 +389,37 @@ LogLine* DefaultReader::parseMessage(QString& logLine, LogFile* originalFile) {
int s=stringTime.left(2).toInt(); int s=stringTime.left(2).toInt();
stringTime.remove(0, 3); stringTime.remove(0, 3);
QTime time(h, m, s); TQTime time(h, m, s);
if (!time.isValid()) { if (!time.isValid()) {
kdDebug() << "Malformed time" << endl; kdDebug() << "Malformed time" << endl;
time=QTime::currentTime(); time=TQTime::currentTime();
} }
//QStringList //TQStringList
logLine=logLine.remove(0, 9); logLine=logLine.remove(0, 9);
int nextSpace; int nextSpace;
nextSpace=logLine.find(' '); nextSpace=logLine.tqfind(' ');
//Host name //Host name
QString hostname; TQString hostname;
hostname=logLine.left(nextSpace); hostname=logLine.left(nextSpace);
logLine=logLine.remove(0, nextSpace+1); logLine=logLine.remove(0, nextSpace+1);
QString process; TQString process;
QString message; TQString message;
//Process name //Process name
nextSpace=logLine.find(':'); nextSpace=logLine.tqfind(':');
if (nextSpace!=-1) { if (nextSpace!=-1) {
process=logLine.left(nextSpace); process=logLine.left(nextSpace);
//If the delete process identifier option is enabled //If the delete process identifier option is enabled
if (tmpDeleteProcessId==true) { if (tmpDeleteProcessId==true) {
int squareBracket=process.find('['); int squareBracket=process.tqfind('[');
//If we find a bracket, we remove the useless part //If we find a bracket, we remove the useless part
if (squareBracket!=-1) { if (squareBracket!=-1) {
@ -443,7 +443,7 @@ LogLine* DefaultReader::parseMessage(QString& logLine, LogFile* originalFile) {
QStringList list; TQStringList list;
list.append(hostname); list.append(hostname);
list.append(process); list.append(process);
list.append(message); list.append(message);
@ -460,19 +460,19 @@ LogLine* DefaultReader::parseMessage(QString& logLine, LogFile* originalFile) {
} }
*/ */
QString filePath=originalFile->url.path(); TQString filePath=originalFile->url.path();
LogLine* logLineObject=new LogLine(date, time, list, filePath, originalFile->level, Globals::noMode->id); LogLine* logLineObject=new LogLine(date, time, list, filePath, originalFile->level, Globals::noMode->id);
return(logLineObject); return(logLineObject);
} }
QStringList* DefaultReader::getRawBuffer(QFile* file) { TQStringList* DefaultReader::getRawBuffer(TQFile* file) {
kdDebug() << "Retrieving the raw buffer..." << endl; kdDebug() << "Retrieving the raw buffer..." << endl;
QString buffer; TQString buffer;
QString tmpBuffer; TQString tmpBuffer;
QStringList* rawBuffer=new QStringList(); TQStringList* rawBuffer=new TQStringList();
int res; int res;

@ -20,10 +20,10 @@
#ifndef _DEFAULT_READER_H_ #ifndef _DEFAULT_READER_H_
#define _DEFAULT_READER_H_ #define _DEFAULT_READER_H_
#include <qobject.h> #include <tqobject.h>
#include <qstringlist.h> #include <tqstringlist.h>
#include <qfile.h> #include <tqfile.h>
#include <qdatetime.h> #include <tqdatetime.h>
#include <kurl.h> #include <kurl.h>
#include <kdebug.h> #include <kdebug.h>
@ -45,9 +45,10 @@
*/ */
class DefaultReader : public Reader { class DefaultReader : public Reader {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
DefaultReader(QObject *parent = 0, const char *name = 0); DefaultReader(TQObject *tqparent = 0, const char *name = 0);
virtual ~DefaultReader(); virtual ~DefaultReader();
@ -56,11 +57,11 @@ class DefaultReader : public Reader {
virtual void logChanged(LogFile* file); virtual void logChanged(LogFile* file);
protected: protected:
virtual LogLine* parseMessage(QString& logLine, LogFile* originalFile); virtual LogLine* parseMessage(TQString& logLine, LogFile* originalFile);
void readFile(LogFile* logFile); void readFile(LogFile* logFile);
virtual QStringList* getRawBuffer(QFile* file); virtual TQStringList* getRawBuffer(TQFile* file);
LogLineList* buffers; LogLineList* buffers;
@ -72,10 +73,10 @@ class DefaultReader : public Reader {
private: private:
//Returns false if the line has not been inserted //Returns false if the line has not been inserted
bool insertLine(QString& buffer, LogFile* originalFile); bool insertLine(TQString& buffer, LogFile* originalFile);
//Returns false if the line has not been inserted //Returns false if the line has not been inserted
bool insertOrReplaceLine(QString& buffer, LogFile* originalFile); bool insertOrReplaceLine(TQString& buffer, LogFile* originalFile);
}; };

@ -18,10 +18,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/ ***************************************************************************/
//Qt includes //TQt includes
#include <qlayout.h> #include <tqlayout.h>
#include <qtooltip.h> #include <tqtooltip.h>
#include <qwhatsthis.h> #include <tqwhatsthis.h>
//KDE includes //KDE includes
#include <kstdguiitem.h> #include <kstdguiitem.h>
@ -36,88 +36,88 @@
#include "detailDialog.h" #include "detailDialog.h"
DetailDialog::DetailDialog(View* v, QWidget *parent, const char *name) : DetailDialog::DetailDialog(View* v, TQWidget *tqparent, const char *name) :
//KDialogBase(parent, name, false, i18n("Log Line Details"), 0 /*KDialogBase::Ok*/), //KDialogBase(tqparent, name, false, i18n("Log Line Details"), 0 /*KDialogBase::Ok*/),
DetailDialogBase(parent, name, false, 0), DetailDialogBase(tqparent, name, false, 0),
view(v), view(v),
currentLine(NULL) { currentLine(NULL) {
previous->setText(i18n("&Previous")); previous->setText(i18n("&Previous"));
connect(previous, SIGNAL(clicked()), this, SLOT(previousItem())); connect(previous, TQT_SIGNAL(clicked()), this, TQT_SLOT(previousItem()));
next->setText(i18n("&Next")); next->setText(i18n("&Next"));
connect(next, SIGNAL(clicked()), this, SLOT(nextItem())); connect(next, TQT_SIGNAL(clicked()), this, TQT_SLOT(nextItem()));
//close->setText(KStdGuiItem::close().text()); //close->setText(KStdGuiItem::close().text());
//close->setIcon(KStdGuiItem::close().iconSet()); //close->setIcon(KStdGuiItem::close().iconSet());
connect(closeButton, SIGNAL(clicked()), this, SLOT(closeDetails())); connect(closeButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(closeDetails()));
updateDetails(); updateDetails();
/* This code has been replaced by a pretty drawing of the Detail Dialog with Qt Designer /* This code has been replaced by a pretty drawing of the Detail Dialog with TQt Designer
setMinimumHeight(200); setMinimumHeight(200);
setMinimumWidth(450); setMinimumWidth(450);
QWhatsThis::add(this, i18n("This dialog displays detailed information about the currently selected log line.")); TQWhatsThis::add(this, i18n("This dialog displays detailed information about the currently selected log line."));
QWidget* widget=new QWidget(this); TQWidget* widget=new TQWidget(this);
QVBoxLayout* mainLayout = new QVBoxLayout(widget, 0, 10); TQVBoxLayout* mainLayout = new TQVBoxLayout(widget, 0, 10);
QHBoxLayout* l1 = new QHBoxLayout(0, 0, 5); TQHBoxLayout* l1 = new TQHBoxLayout(0, 0, 5);
icon=new QLabel(widget); icon=new TQLabel(widget);
//icon->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum ) ); //icon->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum ) );
l1->addWidget(icon, 0, Qt::AlignVCenter); l1->addWidget(icon, 0, TQt::AlignVCenter);
//header=new KActiveLabel(widget, "header"); //header=new KActiveLabel(widget, "header");
header=new QLabel(widget, "header"); header=new TQLabel(widget, "header");
//header->setSizePolicy( QSizePolicy( QSizePolicy::Maximum, QSizePolicy::Minimum) ); //header->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Maximum, TQSizePolicy::Minimum) );
//header->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Minimum ) ); //header->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::Minimum ) );
l1->addWidget(header, 0, Qt::AlignVCenter || Qt::AlignHCenter); l1->addWidget(header, 0, TQt::AlignVCenter || TQt::AlignHCenter);
mainLayout->addLayout(l1); mainLayout->addLayout(l1);
message=new QTextEdit(widget); message=new TQTextEdit(widget);
message->setReadOnly(true); message->setReadOnly(true);
//message->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Minimum) ); //message->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Minimum) );
//message->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding ) ); //message->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::MinimumExpanding, TQSizePolicy::MinimumExpanding ) );
//message->setMinimumHeight(40); //message->setMinimumHeight(40);
//message->setMinimumHeight(60); //message->setMinimumHeight(60);
//message->setMinimumWidth(400); //message->setMinimumWidth(400);
mainLayout->addWidget(message); mainLayout->addWidget(message);
QHBoxLayout* buttons=new QHBoxLayout(0, 0, 10); TQHBoxLayout* buttons=new TQHBoxLayout(0, 0, 10);
previous=new QPushButton(KStdGuiItem::back().iconSet(), i18n("&Previous"), widget); previous=new TQPushButton(KStdGuiItem::back().iconSet(), i18n("&Previous"), widget);
connect(previous, SIGNAL(clicked()), this, SLOT(previousItem())); connect(previous, TQT_SIGNAL(clicked()), this, TQT_SLOT(previousItem()));
//1=Stretch factor (ratio between object in the QHBoxLayout) //1=Stretch factor (ratio between object in the TQHBoxLayout)
buttons->addWidget(previous, 1, Qt::AlignRight); buttons->addWidget(previous, 1, TQt::AlignRight);
QToolTip::add(previous, i18n("Move to the previous line")); TQToolTip::add(previous, i18n("Move to the previous line"));
QWhatsThis::add(previous, i18n("Moves to the previous line. This button is deactivated if there is no previous log line.")); TQWhatsThis::add(previous, i18n("Moves to the previous line. This button is deactivated if there is no previous log line."));
buttons->setStretchFactor(previous, 1); buttons->setStretchFactor(previous, 1);
next=new QPushButton(KStdGuiItem::forward().iconSet(), i18n("&Next"), widget); next=new TQPushButton(KStdGuiItem::forward().iconSet(), i18n("&Next"), widget);
connect(next, SIGNAL(clicked()), this, SLOT(nextItem())); connect(next, TQT_SIGNAL(clicked()), this, TQT_SLOT(nextItem()));
//1=Stretch factor (ratio between object in the QHBoxLayout) //1=Stretch factor (ratio between object in the TQHBoxLayout)
buttons->addWidget(next, 1, Qt::AlignLeft); buttons->addWidget(next, 1, TQt::AlignLeft);
QToolTip::add(next, i18n("Move to the next line")); TQToolTip::add(next, i18n("Move to the next line"));
QWhatsThis::add(next, i18n("Moves to the next line. This button is deactivated if there is no next log line.")); TQWhatsThis::add(next, i18n("Moves to the next line. This button is deactivated if there is no next log line."));
QPushButton* close=new QPushButton(KStdGuiItem::close().iconSet(), KStdGuiItem::close().text(), widget); TQPushButton* close=new TQPushButton(KStdGuiItem::close().iconSet(), KStdGuiItem::close().text(), widget);
connect(close, SIGNAL(clicked()), this, SLOT(closeDetails())); connect(close, TQT_SIGNAL(clicked()), this, TQT_SLOT(closeDetails()));
buttons->addWidget(close, 0, Qt::AlignRight); buttons->addWidget(close, 0, TQt::AlignRight);
QToolTip::add(next, i18n("Close the Detail dialog.")); TQToolTip::add(next, i18n("Close the Detail dialog."));
QWhatsThis::add(next, i18n("Closes this Detail dialog.")); TQWhatsThis::add(next, i18n("Closes this Detail dialog."));
mainLayout->addLayout(buttons); mainLayout->addLayout(buttons);
@ -205,10 +205,10 @@ void DetailDialog::previousItem() {
} }
currentLine->setSelected(false); currentLine->setSelected(false);
currentLine->repaint(); currentLine->tqrepaint();
currentLine=static_cast<LogListItem*> (currentLine->itemAbove()); currentLine=static_cast<LogListItem*> (currentLine->itemAbove());
currentLine->setSelected(true); currentLine->setSelected(true);
currentLine->repaint(); currentLine->tqrepaint();
updateDetails(); updateDetails();
@ -230,10 +230,10 @@ void DetailDialog::nextItem() {
} }
currentLine->setSelected(false); currentLine->setSelected(false);
currentLine->repaint(); currentLine->tqrepaint();
currentLine=static_cast<LogListItem*> (currentLine->itemBelow()); currentLine=static_cast<LogListItem*> (currentLine->itemBelow());
currentLine->setSelected(true); currentLine->setSelected(true);
currentLine->repaint(); currentLine->tqrepaint();
updateDetails(); updateDetails();

@ -21,9 +21,9 @@
#ifndef _DETAIL_DIALOG_H_ #ifndef _DETAIL_DIALOG_H_
#define _DETAIL_DIALOG_H_ #define _DETAIL_DIALOG_H_
#include <qwidget.h> #include <tqwidget.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qlabel.h> #include <tqlabel.h>
#include <kdialogbase.h> #include <kdialogbase.h>
#include <kactivelabel.h> #include <kactivelabel.h>
@ -37,9 +37,10 @@
class DetailDialog : public DetailDialogBase { class DetailDialog : public DetailDialogBase {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
DetailDialog(View* v, QWidget *parent=NULL, const char* name=NULL); DetailDialog(View* v, TQWidget *tqparent=NULL, const char* name=NULL);
~DetailDialog(); ~DetailDialog();
@ -60,13 +61,13 @@ class DetailDialog : public DetailDialogBase {
//KActiveLabel* header; //KActiveLabel* header;
/* /*
QLabel* header; TQLabel* header;
QTextEdit* message; TQTextEdit* message;
QLabel* icon; TQLabel* icon;
QPushButton* previous; TQPushButton* previous;
QPushButton* next; TQPushButton* next;
*/ */
View* view; View* view;
LogListItem* currentLine; LogListItem* currentLine;

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>DetailDialogBase</class> <class>DetailDialogBase</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>detailDialog</cstring> <cstring>detailDialog</cstring>
</property> </property>
@ -41,7 +41,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>icon</cstring> <cstring>icon</cstring>
</property> </property>
@ -57,7 +57,7 @@
<string>Icon</string> <string>Icon</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="1"> <widget class="TQLabel" row="0" column="1">
<property name="name"> <property name="name">
<cstring>header</cstring> <cstring>header</cstring>
</property> </property>
@ -73,9 +73,9 @@
<string>Main information</string> <string>Main information</string>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="2"> <widget class="TQLayoutWidget" row="2" column="0" rowspan="1" colspan="2">
<property name="name"> <property name="name">
<cstring>layout2</cstring> <cstring>tqlayout2</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -147,7 +147,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>100</width> <width>100</width>
<height>31</height> <height>31</height>
@ -189,7 +189,7 @@
<tabstops> <tabstops>
<tabstop>message</tabstop> <tabstop>message</tabstop>
</tabstops> </tabstops>
<layoutdefaults spacing="6" margin="8"/> <tqlayoutdefaults spacing="6" margin="8"/>
<includehints> <includehints>
<includehint>ktextedit.h</includehint> <includehint>ktextedit.h</includehint>
<includehint>kpushbutton.h</includehint> <includehint>kpushbutton.h</includehint>

@ -20,15 +20,15 @@
#include "fileList.h" #include "fileList.h"
#include <qlayout.h> #include <tqlayout.h>
#include <qvgroupbox.h> #include <tqvgroupbox.h>
#include <qbuttongroup.h> #include <tqbuttongroup.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qvbox.h> #include <tqvbox.h>
#include <qhbox.h> #include <tqhbox.h>
#include <qwhatsthis.h> #include <tqwhatsthis.h>
#include <qtooltip.h> #include <tqtooltip.h>
// KDE includes // KDE includes
#include <klocale.h> #include <klocale.h>
@ -40,72 +40,72 @@
#include <kmessagebox.h> #include <kmessagebox.h>
#include <kiconloader.h> #include <kiconloader.h>
FileList::FileList(QWidget *parent, QString description) : FileList::FileList(TQWidget *tqparent, TQString description) :
QWidget(parent) TQWidget(tqparent)
{ {
QHBoxLayout *layout = new QHBoxLayout(this); TQHBoxLayout *tqlayout = new TQHBoxLayout(this);
layout->setAutoAdd(true); tqlayout->setAutoAdd(true);
QVGroupBox* dirBox = new QVGroupBox(i18n( "Files" ), this); TQVGroupBox* dirBox = new TQVGroupBox(i18n( "Files" ), this);
QLabel *defaultPathLabel = new QLabel(description, dirBox); TQLabel *defaultPathLabel = new TQLabel(description, dirBox);
defaultPathLabel->setTextFormat(RichText); defaultPathLabel->setTextFormat(RichText);
QHBox* center= new QHBox(dirBox); TQHBox* center= new TQHBox(dirBox);
center->setSpacing(10); center->setSpacing(10);
fileList=new KListBox(center); fileList=new KListBox(center);
buttons=new QVBox(center); buttons=new TQVBox(center);
fileList->setSelectionMode(QListBox::Extended); fileList->setSelectionMode(TQListBox::Extended);
QToolTip::add(fileList, i18n("List of files used by this log type")); TQToolTip::add(fileList, i18n("List of files used by this log type"));
QWhatsThis::add(fileList, i18n("<qt>Here is a list of every files that will be read by KSystemLog to display the current log lines.</qt>")); TQWhatsThis::add(fileList, i18n("<qt>Here is a list of every files that will be read by KSystemLog to display the current log lines.</qt>"));
add=new QPushButton(SmallIcon("fileopen"), i18n("&Add File..."), buttons); add=new TQPushButton(SmallIcon("fileopen"), i18n("&Add File..."), buttons);
connect(add, SIGNAL(clicked()), this, SLOT(addItem())); connect(add, TQT_SIGNAL(clicked()), this, TQT_SLOT(addItem()));
QToolTip::add(add, i18n("Choose a new file")); TQToolTip::add(add, i18n("Choose a new file"));
QWhatsThis::add(add, i18n("Opens a dialog box to choose a new file to be added to the list.")); TQWhatsThis::add(add, i18n("Opens a dialog box to choose a new file to be added to the list."));
remove=new QPushButton(SmallIconSet("edit_remove"), i18n("&Remove"), buttons); remove=new TQPushButton(SmallIconSet("edit_remove"), i18n("&Remove"), buttons);
connect(remove, SIGNAL(clicked()), this, SLOT(removeSelectedItem())); connect(remove, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeSelectedItem()));
QToolTip::add(remove, i18n("Delete the current file(s)")); TQToolTip::add(remove, i18n("Delete the current file(s)"));
QWhatsThis::add(remove, i18n("Deletes the selected files of the list.")); TQWhatsThis::add(remove, i18n("Deletes the selected files of the list."));
up=new QPushButton(SmallIconSet("up"), i18n("Move &Up"), buttons); up=new TQPushButton(SmallIconSet("up"), i18n("Move &Up"), buttons);
connect(up, SIGNAL(clicked()), this, SLOT(moveUpItem())); connect(up, TQT_SIGNAL(clicked()), this, TQT_SLOT(moveUpItem()));
QToolTip::add(up, i18n("Move up the current file(s)")); TQToolTip::add(up, i18n("Move up the current file(s)"));
QWhatsThis::add(up, i18n("<qt>Moves up the selected files in the list. This option allows the files to be read <b>in first</b> by KSystemLog.</qt>")); TQWhatsThis::add(up, i18n("<qt>Moves up the selected files in the list. This option allows the files to be read <b>in first</b> by KSystemLog.</qt>"));
down=new QPushButton(SmallIconSet("down"), i18n("Move &Down"), buttons); down=new TQPushButton(SmallIconSet("down"), i18n("Move &Down"), buttons);
connect(down, SIGNAL(clicked()), this, SLOT(moveDownItem())); connect(down, TQT_SIGNAL(clicked()), this, TQT_SLOT(moveDownItem()));
QToolTip::add(down, i18n("Move down the current file(s)")); TQToolTip::add(down, i18n("Move down the current file(s)"));
QWhatsThis::add(down, i18n("<qt>Moves down the selected files in the list. This option allows the files to be read <b>at last</b> by KSystemLog.</qt>")); TQWhatsThis::add(down, i18n("<qt>Moves down the selected files in the list. This option allows the files to be read <b>at last</b> by KSystemLog.</qt>"));
removeAll=new QPushButton(SmallIconSet("cancel"), i18n("Re&move All"), buttons); removeAll=new TQPushButton(SmallIconSet("cancel"), i18n("Re&move All"), buttons);
connect(removeAll, SIGNAL(clicked()), this, SLOT(removeAllItem())); connect(removeAll, TQT_SIGNAL(clicked()), this, TQT_SLOT(removeAllItem()));
QToolTip::add(removeAll, i18n("Remove all files")); TQToolTip::add(removeAll, i18n("Remove all files"));
QWhatsThis::add(removeAll, i18n("<qt>Remove all files of the list, even if they are not selected.</qt>")); TQWhatsThis::add(removeAll, i18n("<qt>Remove all files of the list, even if they are not selected.</qt>"));
fileListMenu=new KPopupMenu(this); fileListMenu=new KPopupMenu(this);
fileListMenu->insertTitle(i18n("File List")); fileListMenu->insertTitle(i18n("File List"));
fileListMenu->insertItem(SmallIcon("fileopen"), i18n("&Add File..."), this, SLOT(addItem()), 0, ADD_FILE_MENU_ID); fileListMenu->insertItem(SmallIcon("fileopen"), i18n("&Add File..."), this, TQT_SLOT(addItem()), 0, ADD_FILE_MENU_ID);
fileListMenu->insertItem(SmallIcon("edit_remove"), i18n("&Remove"), this, SLOT(removeSelectedItem()), 0, REMOVE_MENU_ID); fileListMenu->insertItem(SmallIcon("edit_remove"), i18n("&Remove"), this, TQT_SLOT(removeSelectedItem()), 0, REMOVE_MENU_ID);
fileListMenu->insertSeparator(); fileListMenu->insertSeparator();
fileListMenu->insertItem(SmallIcon("up"), i18n("Move &Up"), this, SLOT(moveUpItem()), 0, MOVE_UP_MENU_ID); fileListMenu->insertItem(SmallIcon("up"), i18n("Move &Up"), this, TQT_SLOT(moveUpItem()), 0, MOVE_UP_MENU_ID);
fileListMenu->insertItem(SmallIcon("down"), i18n("Move &Down"), this, SLOT(moveDownItem()), 0, MOVE_DOWN_MENU_ID); fileListMenu->insertItem(SmallIcon("down"), i18n("Move &Down"), this, TQT_SLOT(moveDownItem()), 0, MOVE_DOWN_MENU_ID);
fileListMenu->insertSeparator(); fileListMenu->insertSeparator();
fileListMenu->insertItem(SmallIcon("cancel"), i18n("Re&move All"), this, SLOT(removeAllItem()), 0, REMOVE_ALL_MENU_ID); fileListMenu->insertItem(SmallIcon("cancel"), i18n("Re&move All"), this, TQT_SLOT(removeAllItem()), 0, REMOVE_ALL_MENU_ID);
connect(fileList, SIGNAL(selectionChanged()), this, SLOT(updateButtons())); connect(fileList, TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(updateButtons()));
connect(this, SIGNAL(fileListChanged(int)), this, SLOT(updateButtons())); connect(this, TQT_SIGNAL(fileListChanged(int)), this, TQT_SLOT(updateButtons()));
connect(fileList, SIGNAL(rightButtonClicked(QListBoxItem*, const QPoint &)), this, SLOT(displayPopupMenu(QListBoxItem*, const QPoint&))); connect(fileList, TQT_SIGNAL(rightButtonClicked(TQListBoxItem*, const TQPoint &)), this, TQT_SLOT(displayPopupMenu(TQListBoxItem*, const TQPoint&)));
updateButtons(); updateButtons();
@ -115,13 +115,13 @@ FileList::~FileList() {
} }
QString FileList::getText(int i) { TQString FileList::getText(int i) {
return(fileList->text(i)); return(fileList->text(i));
} }
void FileList::insertItem(QString& item) { void FileList::insertItem(TQString& item) {
fileList->insertItem(item); fileList->insertItem(item);
} }
@ -129,7 +129,7 @@ int FileList::count() {
return(fileList->count()); return(fileList->count());
} }
void FileList::displayPopupMenu(QListBoxItem*, const QPoint& point) { void FileList::displayPopupMenu(TQListBoxItem*, const TQPoint& point) {
fileListMenu->popup(point); fileListMenu->popup(point);
} }
@ -152,25 +152,25 @@ void FileList::addItem() {
} }
bool FileList::isValidFile(KURL url) { bool FileList::isValidFile(KURL url) {
QString message; TQString message;
//If it is not valid //If it is not valid
if (!url.isValid()) { if (!url.isValid()) {
message=i18n("'%1' is not valid.").arg(url.path()); message=i18n("'%1' is not valid.").tqarg(url.path());
KMessageBox::error(this, message, i18n("File selection failed"), KMessageBox::Notify); KMessageBox::error(this, message, i18n("File selection failed"), KMessageBox::Notify);
return(false); return(false);
} }
//If it is not a local file //If it is not a local file
if (!url.isLocalFile()) { if (!url.isLocalFile()) {
message=i18n("'%1' is not a local file.").arg(url.path()); message=i18n("'%1' is not a local file.").tqarg(url.path());
KMessageBox::error(this, message, i18n("File selection failed"), KMessageBox::Notify); KMessageBox::error(this, message, i18n("File selection failed"), KMessageBox::Notify);
return(false); return(false);
} }
//If it's a directory, it's not valid //If it's a directory, it's not valid
if (QDir(url.path()).exists()) { if (TQDir(url.path()).exists()) {
message=i18n("'%1' is a folder.").arg(url.path()); message=i18n("'%1' is a folder.").tqarg(url.path());
KMessageBox::error(this, message, i18n("File selection failed"), KMessageBox::Notify); KMessageBox::error(this, message, i18n("File selection failed"), KMessageBox::Notify);
return(false); return(false);
} }
@ -200,7 +200,7 @@ void FileList::removeSelectedItem() {
void FileList::moveUpItem() { void FileList::moveUpItem() {
int count=fileList->count(); int count=fileList->count();
QListBoxItem* item; TQListBoxItem* item;
int index; int index;
for (int i=1; i<count; i++) { for (int i=1; i<count; i++) {
if (fileList->isSelected(i)==true && fileList->isSelected(i-1)==false) { if (fileList->isSelected(i)==true && fileList->isSelected(i-1)==false) {
@ -220,7 +220,7 @@ void FileList::moveUpItem() {
void FileList::moveDownItem() { void FileList::moveDownItem() {
int count=fileList->count(); int count=fileList->count();
QListBoxItem* item; TQListBoxItem* item;
int index; int index;
for (int i=count-2; i>=0; i--) { for (int i=count-2; i>=0; i--) {
if (fileList->isSelected(i)==true && fileList->isSelected(i+1)==false) { if (fileList->isSelected(i)==true && fileList->isSelected(i+1)==false) {

@ -21,8 +21,8 @@
#ifndef _FILE_LIST_H_ #ifndef _FILE_LIST_H_
#define _FILE_LIST_H_ #define _FILE_LIST_H_
#include <qvbox.h> #include <tqvbox.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <kpopupmenu.h> #include <kpopupmenu.h>
#include <klistbox.h> #include <klistbox.h>
@ -36,22 +36,23 @@
#define MOVE_DOWN_MENU_ID 3 #define MOVE_DOWN_MENU_ID 3
#define REMOVE_ALL_MENU_ID 4 #define REMOVE_ALL_MENU_ID 4
//TODO Maybe draw this class with Qt Designer //TODO Maybe draw this class with TQt Designer
class FileList : public QWidget { class FileList : public TQWidget {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
FileList(QWidget *parent, QString description); FileList(TQWidget *tqparent, TQString description);
~FileList(); ~FileList();
virtual void insertItem(QString& item); virtual void insertItem(TQString& item);
virtual void removeItem(int id); virtual void removeItem(int id);
void insertItem(QPixmap& pixmap, QString& item); void insertItem(TQPixmap& pixmap, TQString& item);
int count(); int count();
QString getText(int i); TQString getText(int i);
signals: signals:
void fileListChanged(int itemLeft); void fileListChanged(int itemLeft);
@ -65,12 +66,12 @@ class FileList : public QWidget {
void removeAllItem(); void removeAllItem();
virtual void addItem(); virtual void addItem();
void displayPopupMenu(QListBoxItem* item, const QPoint& point); void displayPopupMenu(TQListBoxItem* item, const TQPoint& point);
protected: protected:
bool isValidFile(KURL url); bool isValidFile(KURL url);
QVBox* buttons; TQVBox* buttons;
KPopupMenu* fileListMenu; KPopupMenu* fileListMenu;
@ -78,11 +79,11 @@ class FileList : public QWidget {
private: private:
QPushButton* add; TQPushButton* add;
QPushButton* remove; TQPushButton* remove;
QPushButton* up; TQPushButton* up;
QPushButton* down; TQPushButton* down;
QPushButton* removeAll; TQPushButton* removeAll;
}; };

@ -16,9 +16,9 @@
#include "ksystemlog.h" #include "ksystemlog.h"
FindManager::FindManager(KSystemLog* parent, const char* name) : FindManager::FindManager(KSystemLog* tqparent, const char* name) :
QObject(parent, name), TQObject(tqparent, name),
main(parent), main(tqparent),
findDialog(NULL), findDialog(NULL),
findManager(NULL), findManager(NULL),
previousItemFound(NULL), previousItemFound(NULL),
@ -46,7 +46,7 @@ void FindManager::slotFind() {
kdDebug() << "KFindDialog creation" << endl; kdDebug() << "KFindDialog creation" << endl;
//TODO Save the Find options to Config file //TODO Save the Find options to Config file
findDialog=new KFindDialog(false, main, "find_dialog"); findDialog=new KFindDialog(false, main, "find_dialog");
connect(findDialog, SIGNAL(okClicked()), this, SLOT(slotFindNext())); connect(findDialog, TQT_SIGNAL(okClicked()), this, TQT_SLOT(slotFindNext()));
findDialog->show(); findDialog->show();
} }
@ -77,10 +77,10 @@ void FindManager::slotFirstFind() {
list->setSelected(previousItemFound, false); list->setSelected(previousItemFound, false);
} }
//This creates a find-next-prompt dialog if needed. //This creates a tqfind-next-prompt dialog if needed.
findManager=new KFind(findDialog->pattern(), findDialog->options(), main, findDialog); findManager=new KFind(findDialog->pattern(), findDialog->options(), main, findDialog);
connect(findManager, SIGNAL(highlight(const QString&, int, int)), this, SLOT(highlightSearch(const QString&, int, int))); connect(findManager, TQT_SIGNAL(highlight(const TQString&, int, int)), this, TQT_SLOT(highlightSearch(const TQString&, int, int)));
connect(findManager, SIGNAL(findNext()), this, SLOT(slotFindNext())); connect(findManager, TQT_SIGNAL(findNext()), this, TQT_SLOT(slotFindNext()));
//Do not keep the KFindDialog open //Do not keep the KFindDialog open
findDialog->hide(); findDialog->hide();
@ -88,7 +88,7 @@ void FindManager::slotFirstFind() {
//findManager->closeFindNextDialog(); //findManager->closeFindNextDialog();
QListViewItemIterator it(list, QListViewItemIterator::Selected); TQListViewItemIterator it(list, TQListViewItemIterator::Selected);
int itemPos=-1; int itemPos=-1;
int currentPos; int currentPos;
while (it.current()) { while (it.current()) {
@ -188,7 +188,7 @@ void FindManager::slotFindNext() {
} }
void FindManager::highlightSearch(const QString& /*text*/, int /*matchingIndex*/, int /*matchingLength*/) { void FindManager::highlightSearch(const TQString& /*text*/, int /*matchingIndex*/, int /*matchingLength*/) {
LogManager* currentManager=main->activeLogManager(); LogManager* currentManager=main->activeLogManager();
KListView* list=currentManager->getView()->getLogList(); KListView* list=currentManager->getView()->getLogList();

@ -13,8 +13,8 @@
#ifndef FIND_MANAGER_H #ifndef FIND_MANAGER_H
#define FIND_MANAGER_H #define FIND_MANAGER_H
//Qt includes //TQt includes
#include <qobject.h> #include <tqobject.h>
//KDE includes //KDE includes
#include <kfinddialog.h> #include <kfinddialog.h>
@ -33,15 +33,16 @@ class KSystemLog;
* @author Nicolas Ternisien <nicolas.ternisien@gmail.com> * @author Nicolas Ternisien <nicolas.ternisien@gmail.com>
* @version 0.1 * @version 0.1
*/ */
class FindManager : public QObject { class FindManager : public TQObject {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
/** /**
* Default Constructor * Default Constructor
*/ */
FindManager(KSystemLog* parent, const char* name); FindManager(KSystemLog* tqparent, const char* name);
virtual ~FindManager(); virtual ~FindManager();
@ -50,7 +51,7 @@ class FindManager : public QObject {
void slotFindNext(); void slotFindNext();
void slotFirstFind(); void slotFirstFind();
void highlightSearch(const QString& text, int matchingIndex, int matchingLength); void highlightSearch(const TQString& text, int matchingIndex, int matchingLength);
private: private:

@ -20,13 +20,13 @@
#include <qlayout.h> #include <tqlayout.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qvgroupbox.h> #include <tqvgroupbox.h>
#include <qbutton.h> #include <tqbutton.h>
#include <qradiobutton.h> #include <tqradiobutton.h>
#include <qwhatsthis.h> #include <tqwhatsthis.h>
#include <qtooltip.h> #include <tqtooltip.h>
#include <klocale.h> #include <klocale.h>
#include <kdialogbase.h> #include <kdialogbase.h>
@ -38,61 +38,61 @@
#include "ksystemlogConfig.h" #include "ksystemlogConfig.h"
#include "generalOptions.h" #include "generalOptions.h"
GeneralOptions::GeneralOptions(QWidget *parent) : GeneralOptions::GeneralOptions(TQWidget *tqparent) :
QWidget(parent) TQWidget(tqparent)
{ {
QVBoxLayout *layout = new QVBoxLayout(this); TQVBoxLayout *tqlayout = new TQVBoxLayout(this);
layout->setSpacing(10); tqlayout->setSpacing(10);
//Maximum Lines //Maximum Lines
QVGroupBox* logLinesBox=new QVGroupBox(i18n("Log Lines List"), this); TQVGroupBox* logLinesBox=new TQVGroupBox(i18n("Log Lines List"), this);
new QLabel(i18n("Maximum lines displayed:"), logLinesBox); new TQLabel(i18n("Maximum lines displayed:"), logLinesBox);
maxLines=new QSpinBox(10, 30000, 10, logLinesBox); maxLines=new TQSpinBox(10, 30000, 10, logLinesBox);
connect(maxLines, SIGNAL(valueChanged(int)), this, SLOT(onOptionsChanged())); connect(maxLines, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(onOptionsChanged()));
QToolTip::add(maxLines, i18n("<qt>Choose here the maximum number of log lines displayed in the main view.</qt>")); TQToolTip::add(maxLines, i18n("<qt>Choose here the maximum number of log lines displayed in the main view.</qt>"));
QWhatsThis::add(maxLines, i18n("<qt>You can choose here the maximum number of log lines displayed in the main view.</qt>")); TQWhatsThis::add(maxLines, i18n("<qt>You can choose here the maximum number of log lines displayed in the main view.</qt>"));
deleteDuplicatedLines=new QCheckBox(i18n("Delete duplicated log lines (may be slow)"), logLinesBox); deleteDuplicatedLines=new TQCheckBox(i18n("Delete duplicated log lines (may be slow)"), logLinesBox);
connect(deleteDuplicatedLines, SIGNAL(clicked()), this, SLOT(onOptionsChanged())); connect(deleteDuplicatedLines, TQT_SIGNAL(clicked()), this, TQT_SLOT(onOptionsChanged()));
QToolTip::add(deleteDuplicatedLines, i18n("<qt>Select this option if you want to delete duplicated log lines <b>(may be slow)</b>.</qt>")); TQToolTip::add(deleteDuplicatedLines, i18n("<qt>Select this option if you want to delete duplicated log lines <b>(may be slow)</b>.</qt>"));
QWhatsThis::add(deleteDuplicatedLines, i18n("<qt>You can select this option if you want to delete duplicated log lines. <b>This option can slow the reading</b>.</qt>")); TQWhatsThis::add(deleteDuplicatedLines, i18n("<qt>You can select this option if you want to delete duplicated log lines. <b>This option can slow the reading</b>.</qt>"));
//Maximum Characters per line //Maximum Characters per line
QVGroupBox* maxCharBox=new QVGroupBox(i18n("Maximum Characters to Read per Line"), this); TQVGroupBox* maxCharBox=new TQVGroupBox(i18n("Maximum Characters to Read per Line"), this);
new QLabel(i18n("Number of characters:"), maxCharBox); new TQLabel(i18n("Number of characters:"), maxCharBox);
maxCharacters=new QSpinBox(10, 30000, 10, maxCharBox); maxCharacters=new TQSpinBox(10, 30000, 10, maxCharBox);
connect(maxCharacters, SIGNAL(valueChanged(int)), this, SLOT(onOptionsChanged())); connect(maxCharacters, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(onOptionsChanged()));
QToolTip::add(maxCharacters, i18n("<qt>Choose here the maximum number of characters to read from each log line.</qt>")); TQToolTip::add(maxCharacters, i18n("<qt>Choose here the maximum number of characters to read from each log line.</qt>"));
QWhatsThis::add(maxCharacters, i18n("<qt>You can choose here the maximum number of characters to read from each log line.</qt>")); TQWhatsThis::add(maxCharacters, i18n("<qt>You can choose here the maximum number of characters to read from each log line.</qt>"));
QVGroupBox* options= new QVGroupBox( i18n( "Options" ), this ); TQVGroupBox* options= new TQVGroupBox( i18n( "Options" ), this );
deleteProcessId=new QCheckBox(i18n("Delete process identifier from process name"), options); deleteProcessId=new TQCheckBox(i18n("Delete process identifier from process name"), options);
connect(deleteProcessId, SIGNAL(clicked()), this, SLOT(onOptionsChanged())); connect(deleteProcessId, TQT_SIGNAL(clicked()), this, TQT_SLOT(onOptionsChanged()));
QToolTip::add(deleteProcessId, i18n("<qt>Delete process identifier from process name.</qt>")); TQToolTip::add(deleteProcessId, i18n("<qt>Delete process identifier from process name.</qt>"));
QWhatsThis::add(deleteProcessId, i18n("<qt>You can select this option if you want to delete the process identifier from process name. For example, you will sometimes see in the <b>Process</b> column something like <i>cron<b>[3433]</b></i>. If this option is activated, the annoying bold part will be erased.</qt>")); TQWhatsThis::add(deleteProcessId, i18n("<qt>You can select this option if you want to delete the process identifier from process name. For example, you will sometimes see in the <b>Process</b> column something like <i>cron<b>[3433]</b></i>. If this option is activated, the annoying bold part will be erased.</qt>"));
colorizeLogLines=new QCheckBox(i18n("Colorize log lines"), options); colorizeLogLines=new TQCheckBox(i18n("Colorize log lines"), options);
connect(colorizeLogLines, SIGNAL(clicked()), this, SLOT(onOptionsChanged())); connect(colorizeLogLines, TQT_SIGNAL(clicked()), this, TQT_SLOT(onOptionsChanged()));
QToolTip::add(colorizeLogLines, i18n("<qt>This option allows the colorization of log lines, depending on their log level.</qt>")); TQToolTip::add(colorizeLogLines, i18n("<qt>This option allows the colorization of log lines, depending on their log level.</qt>"));
QWhatsThis::add(colorizeLogLines, i18n("<qt>This option allows the colorization of log lines, depending on their log level. For example, an error will be in red, a warning in orange... This will help you to better see problems.</qt>")); TQWhatsThis::add(colorizeLogLines, i18n("<qt>This option allows the colorization of log lines, depending on their log level. For example, an error will be in red, a warning in orange... This will help you to better see problems.</qt>"));
QSpacerItem* spacer=new QSpacerItem(0, 0, QSizePolicy::Preferred, QSizePolicy::Expanding); TQSpacerItem* spacer=new TQSpacerItem(0, 0, TQSizePolicy::Preferred, TQSizePolicy::Expanding);
layout->addWidget(logLinesBox); tqlayout->addWidget(logLinesBox);
layout->addWidget(maxCharBox); tqlayout->addWidget(maxCharBox);
layout->addWidget(options); tqlayout->addWidget(options);
layout->addItem(spacer); tqlayout->addItem(spacer);
readConfig(); readConfig();
} }

@ -21,10 +21,10 @@
#ifndef _GENERAL_OPTIONS_H_ #ifndef _GENERAL_OPTIONS_H_
#define _GENERAL_OPTIONS_H_ #define _GENERAL_OPTIONS_H_
#include <qframe.h> #include <tqframe.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <qbuttongroup.h> #include <tqbuttongroup.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <kconfig.h> #include <kconfig.h>
#include <kdialogbase.h> #include <kdialogbase.h>
@ -32,10 +32,11 @@
#include "globals.h" #include "globals.h"
class GeneralOptions : public QWidget { class GeneralOptions : public TQWidget {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
GeneralOptions(QWidget *parent = 0); GeneralOptions(TQWidget *tqparent = 0);
bool isValid(); bool isValid();
@ -50,12 +51,12 @@ class GeneralOptions : public QWidget {
void onOptionsChanged(); void onOptionsChanged();
private: private:
QSpinBox* maxLines; TQSpinBox* maxLines;
QSpinBox* maxCharacters; TQSpinBox* maxCharacters;
QCheckBox* deleteDuplicatedLines; TQCheckBox* deleteDuplicatedLines;
QCheckBox* deleteProcessId; TQCheckBox* deleteProcessId;
QCheckBox* colorizeLogLines; TQCheckBox* colorizeLogLines;
}; };
#endif // _GENERAL_PREFERENCES_H_ #endif // _GENERAL_PREFERENCES_H_

@ -39,31 +39,31 @@ LogLevel* Globals::alertLogLevel=NULL;
LogLevel* Globals::emergencyLogLevel=NULL; LogLevel* Globals::emergencyLogLevel=NULL;
void Globals::setupLogLevels() { void Globals::setupLogLevels() {
Globals::noneLogLevel=new LogLevel(NONE_LOG_LEVEL_ID, i18n("none"), NONE_LOG_LEVEL_ICON, QColor(208, 210, 220)); Globals::noneLogLevel=new LogLevel(NONE_LOG_LEVEL_ID, i18n("none"), NONE_LOG_LEVEL_ICON, TQColor(208, 210, 220));
Globals::logLevels.append(Globals::noneLogLevel); Globals::logLevels.append(Globals::noneLogLevel);
Globals::debugLogLevel=new LogLevel(DEBUG_LOG_LEVEL_ID, i18n("debug"), DEBUG_LOG_LEVEL_ICON, QColor(156, 157, 165)); Globals::debugLogLevel=new LogLevel(DEBUG_LOG_LEVEL_ID, i18n("debug"), DEBUG_LOG_LEVEL_ICON, TQColor(156, 157, 165));
Globals::logLevels.append(debugLogLevel); Globals::logLevels.append(debugLogLevel);
Globals::informationLogLevel=new LogLevel(INFORMATION_LOG_LEVEL_ID, i18n("information"), INFORMATION_LOG_LEVEL_ICON, QColor(36, 49, 103) /*QColor(0, 0, 0)*/); Globals::informationLogLevel=new LogLevel(INFORMATION_LOG_LEVEL_ID, i18n("information"), INFORMATION_LOG_LEVEL_ICON, TQColor(36, 49, 103) /*TQColor(0, 0, 0)*/);
Globals::logLevels.append(Globals::informationLogLevel); Globals::logLevels.append(Globals::informationLogLevel);
Globals::noticeLogLevel=new LogLevel(NOTICE_LOG_LEVEL_ID, i18n("notice"), NOTICE_LOG_LEVEL_ICON, QColor(36, 138, 22)); Globals::noticeLogLevel=new LogLevel(NOTICE_LOG_LEVEL_ID, i18n("notice"), NOTICE_LOG_LEVEL_ICON, TQColor(36, 138, 22));
Globals::logLevels.append(Globals::noticeLogLevel); Globals::logLevels.append(Globals::noticeLogLevel);
Globals::warningLogLevel=new LogLevel(WARNING_LOG_LEVEL_ID, i18n("warning"), WARNING_LOG_LEVEL_ICON, QColor(238, 144, 21)); Globals::warningLogLevel=new LogLevel(WARNING_LOG_LEVEL_ID, i18n("warning"), WARNING_LOG_LEVEL_ICON, TQColor(238, 144, 21));
Globals::logLevels.append(Globals::warningLogLevel); Globals::logLevels.append(Globals::warningLogLevel);
Globals::errorLogLevel=new LogLevel(ERROR_LOG_LEVEL_ID, i18n("error"), ERROR_LOG_LEVEL_ICON, QColor(173, 28, 28)); Globals::errorLogLevel=new LogLevel(ERROR_LOG_LEVEL_ID, i18n("error"), ERROR_LOG_LEVEL_ICON, TQColor(173, 28, 28));
Globals::logLevels.append(Globals::errorLogLevel); Globals::logLevels.append(Globals::errorLogLevel);
Globals::criticalLogLevel=new LogLevel(CRITICAL_LOG_LEVEL_ID, i18n("critical"), CRITICAL_LOG_LEVEL_ICON, QColor(214, 26, 26)); Globals::criticalLogLevel=new LogLevel(CRITICAL_LOG_LEVEL_ID, i18n("critical"), CRITICAL_LOG_LEVEL_ICON, TQColor(214, 26, 26));
Globals::logLevels.append(criticalLogLevel); Globals::logLevels.append(criticalLogLevel);
Globals::alertLogLevel=new LogLevel(ALERT_LOG_LEVEL_ID, i18n("alert"), ALERT_LOG_LEVEL_ICON, QColor(214, 0, 0)); Globals::alertLogLevel=new LogLevel(ALERT_LOG_LEVEL_ID, i18n("alert"), ALERT_LOG_LEVEL_ICON, TQColor(214, 0, 0));
Globals::logLevels.append(alertLogLevel); Globals::logLevels.append(alertLogLevel);
Globals::emergencyLogLevel=new LogLevel(EMERGENCY_LOG_LEVEL_ID, i18n("emergency"), EMERGENCY_LOG_LEVEL_ICON, QColor(255, 0, 0)); Globals::emergencyLogLevel=new LogLevel(EMERGENCY_LOG_LEVEL_ID, i18n("emergency"), EMERGENCY_LOG_LEVEL_ICON, TQColor(255, 0, 0));
Globals::logLevels.append(emergencyLogLevel); Globals::logLevels.append(emergencyLogLevel);
} }

@ -21,18 +21,18 @@
#ifndef _GLOBALS_H_ #ifndef _GLOBALS_H_
#define _GLOBALS_H_ #define _GLOBALS_H_
#include <qptrlist.h> #include <tqptrlist.h>
#include <qstring.h> #include <tqstring.h>
//Redefined here to compile correctly (crossed-header problem) //Redefined here to compile correctly (crossed-header problem)
class LogLevel; class LogLevel;
typedef QPtrList<LogLevel> LogLevels; typedef TQPtrList<LogLevel> LogLevels;
//Redefined here to compile correctly (crossed-header problem) //Redefined here to compile correctly (crossed-header problem)
class LogMode; class LogMode;
typedef QPtrList<LogMode> LogModes; typedef TQPtrList<LogMode> LogModes;
#define DEFAULT_FOLDER "/var/log" #define DEFAULT_FOLDER "/var/log"

@ -35,9 +35,9 @@
#include "itemFactory.h" #include "itemFactory.h"
LogListItem* ItemFactory::createLogListItem(QListView* view, LogLine* line) { LogListItem* ItemFactory::createLogListItem(TQListView* view, LogLine* line) {
//If it is a parent Log Line //If it is a tqparent Log Line
if (line->isParentLogLine()==true) if (line->isParentLogLine()==true)
return(createParentItem(view, (ParentLogLine*)line)); return(createParentItem(view, (ParentLogLine*)line));
@ -60,8 +60,8 @@ LogListItem* ItemFactory::createLogListItem(QListView* view, LogLine* line) {
} }
LogListItem* ItemFactory::createParentItem(QListView* view, ParentLogLine* line) { LogListItem* ItemFactory::createParentItem(TQListView* view, ParentLogLine* line) {
//kdDebug() << "Creating a parent item : " << line->getLogLevel()->name << endl; //kdDebug() << "Creating a tqparent item : " << line->getLogLevel()->name << endl;
LogListItem* item=new LogListItem(view, line); LogListItem* item=new LogListItem(view, line);
@ -84,10 +84,10 @@ LogListItem* ItemFactory::createParentItem(QListView* view, ParentLogLine* line)
//Group by Day //Group by Day
else if (line->getGroupBy()==GROUP_BY_DAY) { else if (line->getGroupBy()==GROUP_BY_DAY) {
//TODO Move these tests to a dedicated static method (to be able to reuse it) //TODO Move these tests to a dedicated static method (to be able to reuse it)
QDate today=QDate::currentDate(); TQDate today=TQDate::tqcurrentDate();
QDate yesterday=today.addDays(-1); TQDate yesterday=today.addDays(-1);
QDate date=line->getTime().date(); TQDate date=line->getTime().date();
if (date==today) { if (date==today) {
item->setText(0, i18n("Today")); item->setText(0, i18n("Today"));
@ -107,15 +107,15 @@ LogListItem* ItemFactory::createParentItem(QListView* view, ParentLogLine* line)
} }
//Group by Hour //Group by Hour
else if (line->getGroupBy()==GROUP_BY_HOUR) { else if (line->getGroupBy()==GROUP_BY_HOUR) {
QString string(i18n("%1, %2h").arg(line->getTime().date().toString(), line->getTime().time().toString("h"))); TQString string(i18n("%1, %2h").tqarg(line->getTime().date().toString(), line->getTime().time().toString("h")));
item->setText(0, string); item->setText(0, string);
item->setPixmap(0, SmallIcon(GROUP_BY_HOUR_ICON)); item->setPixmap(0, SmallIcon(GROUP_BY_HOUR_ICON));
QDate today=QDate::currentDate(); TQDate today=TQDate::tqcurrentDate();
QTime time=QTime::currentTime(); TQTime time=TQTime::currentTime();
if (line->getTime().date()==today && line->getTime().time().hour()==time.hour()) { if (line->getTime().date()==today && line->getTime().time().hour()==time.hour()) {
kdDebug() << "Date equals, hour equals" << line->getTime().date().toString() << " and " << line->getTime().time().toString() << endl; kdDebug() << "Date equals, hour equals" << TQString(line->getTime().date().toString()) << " and " << TQString(line->getTime().time().toString()) << endl;
item->setOpen(true); item->setOpen(true);
view->ensureItemVisible(item); view->ensureItemVisible(item);
} }
@ -133,7 +133,7 @@ LogListItem* ItemFactory::createParentItem(QListView* view, ParentLogLine* line)
else { else {
int index=ParentLogLine::getGroupedColumnIndex(line->getColumns(), line->getGroupByColumn()); int index=ParentLogLine::getGroupedColumnIndex(line->getColumns(), line->getGroupByColumn());
QStringList& list=line->getItemList(); TQStringList& list=line->getItemList();
if (index<0 || index>=(int)list.size()) if (index<0 || index>=(int)list.size())
item->setText(0, i18n("none")); item->setText(0, i18n("none"));
@ -146,23 +146,23 @@ LogListItem* ItemFactory::createParentItem(QListView* view, ParentLogLine* line)
return(item); return(item);
} }
LogListItem* ItemFactory::createChildItem(QListView* /*view*/, ChildLogLine* line) { LogListItem* ItemFactory::createChildItem(TQListView* /*view*/, ChildLogLine* line) {
LogListItem* parent=line->getParent()->getLogListItem(); LogListItem* tqparent=line->getParent()->getLogListItem();
if (parent==NULL) if (tqparent==NULL)
kdDebug() << "Parent log list item NULL !!!" << endl; kdDebug() << "Parent log list item NULL !!!" << endl;
//kdDebug() << "The log level of the parent is " << parent->getLogLine()->getLogLevel()->name << endl; //kdDebug() << "The log level of the tqparent is " << tqparent->getLogLine()->getLogLevel()->name << endl;
LogListItem* item=new LogListItem(parent, line); LogListItem* item=new LogListItem(tqparent, line);
initItem(item); initItem(item);
return(item); return(item);
} }
LogListItem* ItemFactory::createBasicItem(QListView* view, LogLine* line) { LogListItem* ItemFactory::createBasicItem(TQListView* view, LogLine* line) {
LogListItem* item=new LogListItem(view, line); LogListItem* item=new LogListItem(view, line);
initItem(item); initItem(item);
@ -190,8 +190,8 @@ void ItemFactory::initDefaultItem(LogListItem* item) {
item->setText(0, line->getTime().toString(Qt::LocalDate)); item->setText(0, line->getTime().toString(Qt::LocalDate));
int i=1; int i=1;
QStringList& labels=line->getItemList(); TQStringList& labels=line->getItemList();
QStringList::iterator it; TQStringList::iterator it;
for(it=labels.begin(); it!=labels.end(); ++it) { for(it=labels.begin(); it!=labels.end(); ++it) {
item->setText(i, *it); item->setText(i, *it);
i++; i++;
@ -207,8 +207,8 @@ void ItemFactory::initXorgItem(LogListItem* item) {
item->setText(0, ""); item->setText(0, "");
int i=1; int i=1;
QStringList& labels=line->getItemList(); TQStringList& labels=line->getItemList();
QStringList::iterator it; TQStringList::iterator it;
for(it=labels.begin(); it!=labels.end(); ++it) { for(it=labels.begin(); it!=labels.end(); ++it) {
item->setText(i, *it); item->setText(i, *it);
i++; i++;
@ -220,7 +220,7 @@ void ItemFactory::initXorgItem(LogListItem* item) {
QString ItemFactory::createFormattedText(LogLine* line) { TQString ItemFactory::createFormattedText(LogLine* line) {
//Special case if this is a ParentLogLine (Group By feature) //Special case if this is a ParentLogLine (Group By feature)
if (line->isParentLogLine()) if (line->isParentLogLine())
@ -256,7 +256,7 @@ QString ItemFactory::createFormattedText(LogLine* line) {
} }
QString ItemFactory::createToolTipText(LogLine* line) { TQString ItemFactory::createToolTipText(LogLine* line) {
if (line->getType() == Globals::xorgMode->id) if (line->getType() == Globals::xorgMode->id)
return(createXorgToolTipText(line)); return(createXorgToolTipText(line));
else else
@ -264,41 +264,41 @@ QString ItemFactory::createToolTipText(LogLine* line) {
} }
QString ItemFactory::createParentFormattedText(LogLine* line) { TQString ItemFactory::createParentFormattedText(LogLine* line) {
QString result; TQString result;
ParentLogLine* parent=(ParentLogLine*) line; ParentLogLine* tqparent=(ParentLogLine*) line;
//All Group By cases are showed here //All Group By cases are showed here
if (parent->getGroupBy()==GROUP_BY_LOG_LEVEL) { if (tqparent->getGroupBy()==GROUP_BY_LOG_LEVEL) {
result.append(i18n("<div align='center'><b>Group:</b> %1</div>").arg(line->getLogLevel()->name)); result.append(i18n("<div align='center'><b>Group:</b> %1</div>").tqarg(line->getLogLevel()->name));
} }
else if (parent->getGroupBy()==GROUP_BY_DAY) { else if (tqparent->getGroupBy()==GROUP_BY_DAY) {
result.append(i18n("<div align='center'><b>Group:</b> %1</div>").arg(line->getTime().date().toString())); result.append(i18n("<div align='center'><b>Group:</b> %1</div>").tqarg(line->getTime().date().toString()));
} }
else if (parent->getGroupBy()==GROUP_BY_HOUR) { else if (tqparent->getGroupBy()==GROUP_BY_HOUR) {
QString string(i18n("%1, %2 hour").arg(line->getTime().date().toString(), line->getTime().time().toString("h"))); TQString string(i18n("%1, %2 hour").tqarg(line->getTime().date().toString(), line->getTime().time().toString("h")));
result.append(i18n("<div align='center'><b>Group:</b> %1</div>").arg(string)); result.append(i18n("<div align='center'><b>Group:</b> %1</div>").tqarg(string));
} }
else if (parent->getGroupBy()==GROUP_BY_LOG_FILE) { else if (tqparent->getGroupBy()==GROUP_BY_LOG_FILE) {
result.append(i18n("<div align='center'><b>Group:</b> %1</div>").arg(line->getOriginalFile())); result.append(i18n("<div align='center'><b>Group:</b> %1</div>").tqarg(line->getOriginalFile()));
} }
else { else {
QStringList& list=line->getItemList(); TQStringList& list=line->getItemList();
int index=ParentLogLine::getGroupedColumnIndex(parent->getColumns(), parent->getGroupByColumn()); int index=ParentLogLine::getGroupedColumnIndex(tqparent->getColumns(), tqparent->getGroupByColumn());
if (index<0 || index>=(int) list.size()) if (index<0 || index>=(int) list.size())
result.append(i18n("<div align='center'><b>Group:</b> none</div>")); result.append(i18n("<div align='center'><b>Group:</b> none</div>"));
else else
result.append(i18n("<div align='center'><b>Group:</b> %1</div>").arg(list[index])); result.append(i18n("<div align='center'><b>Group:</b> %1</div>").tqarg(list[index]));
} }
return(result); return(result);
} }
QString ItemFactory::createCronFormattedText(LogLine* line) { TQString ItemFactory::createCronFormattedText(LogLine* line) {
QString result; TQString result;
QStringList& items=line->getItemList(); TQStringList& items=line->getItemList();
result.append("<table>"); result.append("<table>");
@ -314,10 +314,10 @@ QString ItemFactory::createCronFormattedText(LogLine* line) {
return(result); return(result);
} }
QString ItemFactory::createDefaultFormattedText(LogLine* line) { TQString ItemFactory::createDefaultFormattedText(LogLine* line) {
QString result; TQString result;
QStringList& items=line->getItemList(); TQStringList& items=line->getItemList();
result.append("<table>"); result.append("<table>");
@ -332,10 +332,10 @@ QString ItemFactory::createDefaultFormattedText(LogLine* line) {
return(result); return(result);
} }
QString ItemFactory::createAcpidFormattedText(LogLine* line) { TQString ItemFactory::createAcpidFormattedText(LogLine* line) {
QString result; TQString result;
QStringList& items=line->getItemList(); TQStringList& items=line->getItemList();
result.append("<table>"); result.append("<table>");
@ -348,8 +348,8 @@ QString ItemFactory::createAcpidFormattedText(LogLine* line) {
return(result); return(result);
} }
QString ItemFactory::createCupsFormattedText(LogLine* line) { TQString ItemFactory::createCupsFormattedText(LogLine* line) {
QString result; TQString result;
result.append("<table>"); result.append("<table>");
@ -361,10 +361,10 @@ QString ItemFactory::createCupsFormattedText(LogLine* line) {
return(result); return(result);
} }
QString ItemFactory::createCupsAccessFormattedText(LogLine* line) { TQString ItemFactory::createCupsAccessFormattedText(LogLine* line) {
QString result; TQString result;
QStringList& items=line->getItemList(); TQStringList& items=line->getItemList();
result.append("<table>"); result.append("<table>");
@ -382,10 +382,10 @@ QString ItemFactory::createCupsAccessFormattedText(LogLine* line) {
} }
QString ItemFactory::createApacheFormattedText(LogLine* line) { TQString ItemFactory::createApacheFormattedText(LogLine* line) {
QString result; TQString result;
QStringList& items=line->getItemList(); TQStringList& items=line->getItemList();
result.append("<table>"); result.append("<table>");
@ -398,10 +398,10 @@ QString ItemFactory::createApacheFormattedText(LogLine* line) {
return(result); return(result);
} }
QString ItemFactory::createApacheAccessFormattedText(LogLine* line) { TQString ItemFactory::createApacheAccessFormattedText(LogLine* line) {
QString result; TQString result;
QStringList& items=line->getItemList(); TQStringList& items=line->getItemList();
result.append("<table>"); result.append("<table>");
@ -421,10 +421,10 @@ QString ItemFactory::createApacheAccessFormattedText(LogLine* line) {
} }
QString ItemFactory::createSambaFormattedText(LogLine* line) { TQString ItemFactory::createSambaFormattedText(LogLine* line) {
QString result; TQString result;
QStringList& items=line->getItemList(); TQStringList& items=line->getItemList();
result.append("<table>"); result.append("<table>");
@ -440,13 +440,13 @@ QString ItemFactory::createSambaFormattedText(LogLine* line) {
} }
QString ItemFactory::createXorgFormattedText(LogLine* line) { TQString ItemFactory::createXorgFormattedText(LogLine* line) {
//It uses the same formating than the Tooltip //It uses the same formating than the Tooltip
return(createXorgToolTipText(line)); return(createXorgToolTipText(line));
} }
QString ItemFactory::createDefaultToolTipText(LogLine* line) { TQString ItemFactory::createDefaultToolTipText(LogLine* line) {
QString result; TQString result;
result.append("<table>"); result.append("<table>");
@ -459,10 +459,10 @@ QString ItemFactory::createDefaultToolTipText(LogLine* line) {
return(result); return(result);
} }
QString ItemFactory::createXorgToolTipText(LogLine* line) { TQString ItemFactory::createXorgToolTipText(LogLine* line) {
QString result; TQString result;
QStringList& items=line->getItemList(); TQStringList& items=line->getItemList();
result.append("<table>"); result.append("<table>");
@ -481,14 +481,14 @@ QString ItemFactory::createXorgToolTipText(LogLine* line) {
QString ItemFactory::labelMessageFormat(QString label, QString value) { TQString ItemFactory::labelMessageFormat(TQString label, TQString value) {
return ("<tr><td align='right'><b><nobr>" + label + "</nobr></b></td><td>" + messageFormat(value) + "</td></tr>"); return ("<tr><td align='right'><b><nobr>" + label + "</nobr></b></td><td>" + messageFormat(value) + "</td></tr>");
} }
QString ItemFactory::messageFormat(QString& message) { TQString ItemFactory::messageFormat(TQString& message) {
QString transformation(message); TQString transformation(message);
transformation.replace(QRegExp("&"), "&amp;"); transformation.tqreplace(TQRegExp("&"), "&amp;");
transformation.replace(QRegExp("<"), "&lt;"); transformation.tqreplace(TQRegExp("<"), "&lt;");
transformation.replace(QRegExp(">"), "&gt;"); transformation.tqreplace(TQRegExp(">"), "&gt;");
return(transformation); return(transformation);
} }

@ -21,8 +21,8 @@
#ifndef _ITEM_FACTORY_H_ #ifndef _ITEM_FACTORY_H_
#define _ITEM_FACTORY_H_ #define _ITEM_FACTORY_H_
#include <qobject.h> #include <tqobject.h>
#include <qlistview.h> #include <tqlistview.h>
class LogLine; class LogLine;
class ParentLogLine; class ParentLogLine;
@ -35,23 +35,23 @@ class LogListItem;
class ItemFactory { class ItemFactory {
public: public:
static LogListItem* createLogListItem(QListView* view, LogLine* line); static LogListItem* createLogListItem(TQListView* view, LogLine* line);
static QString createFormattedText(LogLine* line); static TQString createFormattedText(LogLine* line);
static QString createToolTipText(LogLine* line); static TQString createToolTipText(LogLine* line);
//Global useful methods //Global useful methods
static QString messageFormat(QString& message); static TQString messageFormat(TQString& message);
static QString labelMessageFormat(QString label, QString value); static TQString labelMessageFormat(TQString label, TQString value);
private: private:
static LogListItem* createItem(QListView* view, LogLine* line); static LogListItem* createItem(TQListView* view, LogLine* line);
static LogListItem* createParentItem(QListView* view, ParentLogLine* line); static LogListItem* createParentItem(TQListView* view, ParentLogLine* line);
static LogListItem* createChildItem(QListView* view, ChildLogLine* line); static LogListItem* createChildItem(TQListView* view, ChildLogLine* line);
static LogListItem* createBasicItem(QListView* view, LogLine* line); static LogListItem* createBasicItem(TQListView* view, LogLine* line);
static void initXorgItem(LogListItem* item); static void initXorgItem(LogListItem* item);
static void initDefaultItem(LogListItem* item); static void initDefaultItem(LogListItem* item);
@ -63,23 +63,23 @@ class ItemFactory {
static QString createXorgFormattedText(LogLine* line); static TQString createXorgFormattedText(LogLine* line);
static QString createCronFormattedText(LogLine* line); static TQString createCronFormattedText(LogLine* line);
static QString createAcpidFormattedText(LogLine* line); static TQString createAcpidFormattedText(LogLine* line);
static QString createCupsFormattedText(LogLine* line); static TQString createCupsFormattedText(LogLine* line);
static QString createCupsAccessFormattedText(LogLine* line); static TQString createCupsAccessFormattedText(LogLine* line);
static QString createParentFormattedText(LogLine* line); static TQString createParentFormattedText(LogLine* line);
static QString createDefaultFormattedText(LogLine* line); static TQString createDefaultFormattedText(LogLine* line);
static QString createApacheFormattedText(LogLine* line); static TQString createApacheFormattedText(LogLine* line);
static QString createApacheAccessFormattedText(LogLine* line); static TQString createApacheAccessFormattedText(LogLine* line);
static QString createSambaFormattedText(LogLine* line); static TQString createSambaFormattedText(LogLine* line);
static QString createXorgToolTipText(LogLine* line); static TQString createXorgToolTipText(LogLine* line);
static QString createDefaultToolTipText(LogLine* line); static TQString createDefaultToolTipText(LogLine* line);
}; };

@ -18,14 +18,14 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/ ***************************************************************************/
//Qt includes //TQt includes
#include <qlayout.h> #include <tqlayout.h>
#include <qvgroupbox.h> #include <tqvgroupbox.h>
#include <qbuttongroup.h> #include <tqbuttongroup.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qvbox.h> #include <tqvbox.h>
#include <qhbox.h> #include <tqhbox.h>
//KDE includes //KDE includes
#include <klocale.h> #include <klocale.h>
@ -43,17 +43,17 @@
#include "kernelOptions.h" #include "kernelOptions.h"
#include "ksystemlogConfig.h" #include "ksystemlogConfig.h"
KernelOptions::KernelOptions(QWidget *parent) : KernelOptions::KernelOptions(TQWidget *tqparent) :
QWidget(parent) TQWidget(tqparent)
{ {
QHBoxLayout *layout = new QHBoxLayout(this); TQHBoxLayout *tqlayout = new TQHBoxLayout(this);
layout->setAutoAdd(true); tqlayout->setAutoAdd(true);
QString description= i18n("<qt><p>These files will be analyzed to display <b>Kernel logs</b>. This list also determines the order in which the files are read.</p></qt>"); TQString description= i18n("<qt><p>These files will be analyzed to display <b>Kernel logs</b>. This list also determines the order in which the files are read.</p></qt>");
fileList=new SpecificFileList(this, description); fileList=new SpecificFileList(this, description);
connect(fileList, SIGNAL(fileListChanged(int)), this, SLOT(slotFileListChanged(int))); connect(fileList, TQT_SIGNAL(fileListChanged(int)), this, TQT_SLOT(slotFileListChanged(int)));
readConfig(); readConfig();
@ -81,8 +81,8 @@ void KernelOptions::slotFileListChanged(int itemLeft) {
void KernelOptions::saveConfig() { void KernelOptions::saveConfig() {
kdDebug() << "Saving config from Kernel Options..." << endl; kdDebug() << "Saving config from Kernel Options..." << endl;
QStringList stringList; TQStringList stringList;
QValueList<int> valueList; TQValueList<int> valueList;
fileList->saveConfig(stringList, valueList); fileList->saveConfig(stringList, valueList);
@ -91,8 +91,8 @@ void KernelOptions::saveConfig() {
} }
void KernelOptions::readConfig() { void KernelOptions::readConfig() {
QStringList stringList=KSystemLogConfig::kernelPaths(); TQStringList stringList=KSystemLogConfig::kernelPaths();
QValueList<int> valueList=KSystemLogConfig::kernelLevels(); TQValueList<int> valueList=KSystemLogConfig::kernelLevels();
fileList->readConfig(stringList, valueList); fileList->readConfig(stringList, valueList);
} }

@ -21,8 +21,8 @@
#ifndef _KERNEL_OPTIONS_H_ #ifndef _KERNEL_OPTIONS_H_
#define _KERNEL_OPTIONS_H_ #define _KERNEL_OPTIONS_H_
#include <qframe.h> #include <tqframe.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <kpopupmenu.h> #include <kpopupmenu.h>
#include <kconfig.h> #include <kconfig.h>
@ -36,10 +36,11 @@
#include "logLevel.h" #include "logLevel.h"
class KernelOptions : public QWidget { class KernelOptions : public TQWidget {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
KernelOptions(QWidget *parent = 0); KernelOptions(TQWidget *tqparent = 0);
~KernelOptions(); ~KernelOptions();
bool isValid(); bool isValid();

@ -19,16 +19,16 @@
***************************************************************************/ ***************************************************************************/
//Qt includes //TQt includes
#include <qdragobject.h> #include <tqdragobject.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include <qpainter.h> #include <tqpainter.h>
#include <qpaintdevicemetrics.h> #include <tqpaintdevicemetrics.h>
#include <qwhatsthis.h> #include <tqwhatsthis.h>
#include <qtooltip.h> #include <tqtooltip.h>
#include <qlistview.h> #include <tqlistview.h>
//KDE includes //KDE includes
@ -96,7 +96,7 @@ KSystemLog::KSystemLog() :
//Accept Drag and Drop //Accept Drag and Drop
setAcceptDrops(true); setAcceptDrops(true);
//Initialize the Status Bar //Initialize the tqStatus Bar
setupStatusBar(); setupStatusBar();
//Initialize the find manager //Initialize the find manager
@ -151,22 +151,22 @@ KSystemLog::KSystemLog() :
void KSystemLog::setupTabBar() { void KSystemLog::setupTabBar() {
tabs=new KTabWidget(this, "tabs"); tabs=new KTabWidget(this, "tabs");
connect(tabs, SIGNAL(currentChanged(QWidget*)), this, SLOT(currentTabChanged(QWidget*))); connect(tabs, TQT_SIGNAL(currentChanged(TQWidget*)), TQT_TQOBJECT(this), TQT_SLOT(currentTabChanged(TQWidget*)));
QPushButton* tabNewTabButton=new QPushButton(SmallIcon("tab_new"), "", tabs); TQPushButton* tabNewTabButton=new TQPushButton(SmallIcon("tab_new"), "", tabs);
connect(tabNewTabButton, SIGNAL(clicked()), this, SLOT(newTab())); connect(tabNewTabButton, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(newTab()));
QToolTip::add(tabNewTabButton, i18n("Create a new tab")); TQToolTip::add(tabNewTabButton, i18n("Create a new tab"));
QWhatsThis::add(tabNewTabButton, i18n("Creates a new tab which can display another log.")); TQWhatsThis::add(tabNewTabButton, i18n("Creates a new tab which can display another log."));
QPushButton* tabCloseTabButton=new QPushButton(SmallIcon("tab_remove"), "", tabs); TQPushButton* tabCloseTabButton=new TQPushButton(SmallIcon("tab_remove"), "", tabs);
connect(tabCloseTabButton, SIGNAL(clicked()), this, SLOT(closeTab())); connect(tabCloseTabButton, TQT_SIGNAL(clicked()), TQT_TQOBJECT(this), TQT_SLOT(closeTab()));
QToolTip::add(tabCloseTabButton, i18n("Close the current tab")); TQToolTip::add(tabCloseTabButton, i18n("Close the current tab"));
QWhatsThis::add(tabCloseTabButton, i18n("Closes the current tab.")); TQWhatsThis::add(tabCloseTabButton, i18n("Closes the current tab."));
tabs->setCornerWidget(tabNewTabButton, Qt::TopLeft); tabs->setCornerWidget(tabNewTabButton, TQt::TopLeft);
tabs->setCornerWidget(tabCloseTabButton, Qt::TopRight); tabs->setCornerWidget(tabCloseTabButton, TQt::TopRight);
} }
@ -195,7 +195,7 @@ LogManager* KSystemLog::activeLogManager() {
View* currentView=static_cast<View*> (tabs->currentPage()); View* currentView=static_cast<View*> (tabs->currentPage());
QPtrListIterator<LogManager> it(logManagers); TQPtrListIterator<LogManager> it(logManagers);
LogManager* manager=it.current(); LogManager* manager=it.current();
while(manager!=NULL) { while(manager!=NULL) {
@ -215,7 +215,7 @@ LogManager* KSystemLog::activeLogManager() {
} }
void KSystemLog::currentTabChanged(QWidget* /*widget*/) { void KSystemLog::currentTabChanged(TQWidget* /*widget*/) {
kdDebug() << "Tab has changed" << endl; kdDebug() << "Tab has changed" << endl;
LogManager* currentManager=activeLogManager(); LogManager* currentManager=activeLogManager();
@ -266,106 +266,106 @@ void KSystemLog::setupStatusBar() {
statusBar()->insertItem("", STATUS_BAR_LINE_COUNT, 0, true); statusBar()->insertItem("", STATUS_BAR_LINE_COUNT, 0, true);
statusBar()->insertItem("", STATUS_BAR_LAST_MODIFICATION, 0, true); statusBar()->insertItem("", STATUS_BAR_LAST_MODIFICATION, 0, true);
//Displays the Status Bar //Displays the tqStatus Bar
statusBar()->show(); statusBar()->show();
} }
void KSystemLog::setupActions() { void KSystemLog::setupActions() {
KStdAction::open(this, SLOT(fileOpen()), actionCollection(), "file_open"); KStdAction::open(TQT_TQOBJECT(this), TQT_SLOT(fileOpen()), actionCollection(), "file_open");
actionCollection()->action("file_open")->setToolTip(i18n("Open a file in KSystemLog")); actionCollection()->action("file_open")->setToolTip(i18n("Open a file in KSystemLog"));
actionCollection()->action("file_open")->setWhatsThis(i18n("Opens a file in KSystemLog and displays its content in the current tab.")); actionCollection()->action("file_open")->setWhatsThis(i18n("Opens a file in KSystemLog and displays its content in the current tab."));
//TODO Not used for the moment //TODO Not used for the moment
//KStdAction::print(this, SLOT(filePrint()), actionCollection()); //KStdAction::print(TQT_TQOBJECT(this), TQT_SLOT(filePrint()), actionCollection());
saveAction=KStdAction::saveAs(this, NULL, actionCollection(), "file_save"); saveAction=KStdAction::saveAs(TQT_TQOBJECT(this), NULL, actionCollection(), "file_save");
//TODO Retrieve the system's shortcut of the save action (and not Save as...) //TODO Retrieve the system's shortcut of the save action (and not Save as...)
saveAction->setShortcut(CTRL+Key_S); saveAction->setShortcut(CTRL+Key_S);
saveAction->setToolTip(i18n("Save the selection to a file")); saveAction->setToolTip(i18n("Save the selection to a file"));
saveAction->setWhatsThis(i18n("Saves the selection to a file. This action is useful if you want to create an attachment or a backup of a particular log.")); saveAction->setWhatsThis(i18n("Saves the selection to a file. This action is useful if you want to create an attachment or a backup of a particular log."));
saveAction->setEnabled(false); saveAction->setEnabled(false);
KStdAction::quit(this, SLOT(quit()), actionCollection(), "file_quit"); KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(quit()), actionCollection(), "file_quit");
actionCollection()->action("file_quit")->setToolTip(i18n("Quit KSystemLog")); actionCollection()->action("file_quit")->setToolTip(i18n("Quit KSystemLog"));
actionCollection()->action("file_quit")->setWhatsThis(i18n("Quits KSystemLog.")); actionCollection()->action("file_quit")->setWhatsThis(i18n("Quits KSystemLog."));
copyAction=KStdAction::copy(this, NULL, actionCollection(), "copy"); copyAction=KStdAction::copy(TQT_TQOBJECT(this), NULL, actionCollection(), "copy");
copyAction->setToolTip(i18n("Copy the selection to the clipboard")); copyAction->setToolTip(i18n("Copy the selection to the clipboard"));
copyAction->setWhatsThis(i18n("Copies the selection to the clipboard. This action is useful if you want to paste the selection in a chat or an email.")); copyAction->setWhatsThis(i18n("Copies the selection to the clipboard. This action is useful if you want to paste the selection in a chat or an email."));
copyAction->setEnabled(false); copyAction->setEnabled(false);
expandAllAction=new KAction(i18n("Ex&pand All"), NULL, CTRL+Key_X, this, NULL, actionCollection(), "expand_all" ); expandAllAction=new KAction(i18n("Ex&pand All"), NULL, CTRL+Key_X, TQT_TQOBJECT(this), NULL, actionCollection(), "expand_all" );
expandAllAction->setToolTip(i18n("Expand all categories")); expandAllAction->setToolTip(i18n("Expand all categories"));
expandAllAction->setWhatsThis(i18n("<qt>This action opens all main categories. This is enabled only if an option has been selected in the <b>Group By</b> menu.</qt>")); expandAllAction->setWhatsThis(i18n("<qt>This action opens all main categories. This is enabled only if an option has been selected in the <b>Group By</b> menu.</qt>"));
expandAllAction->setEnabled(false); expandAllAction->setEnabled(false);
collapseAllAction=new KAction(i18n("Col&lapse All"), NULL, CTRL+Key_L, this, NULL, actionCollection(), "collapse_all" ); collapseAllAction=new KAction(i18n("Col&lapse All"), NULL, CTRL+Key_L, TQT_TQOBJECT(this), NULL, actionCollection(), "collapse_all" );
collapseAllAction->setToolTip(i18n("Collapse all categories")); collapseAllAction->setToolTip(i18n("Collapse all categories"));
collapseAllAction->setWhatsThis(i18n("<qt>This action closes all main categories. This is enabled only if an option has been selected in the <b>Group By</b> menu.</qt>")); collapseAllAction->setWhatsThis(i18n("<qt>This action closes all main categories. This is enabled only if an option has been selected in the <b>Group By</b> menu.</qt>"));
collapseAllAction->setEnabled(false); collapseAllAction->setEnabled(false);
sendMailAction=new KAction(i18n("&Email Selection..."), "mail_generic", CTRL+Key_M, this, NULL, actionCollection(), "send_mail" ); sendMailAction=new KAction(i18n("&Email Selection..."), "mail_generic", CTRL+Key_M, TQT_TQOBJECT(this), NULL, actionCollection(), "send_mail" );
sendMailAction->setToolTip(i18n("Send the selection by mail")); sendMailAction->setToolTip(i18n("Send the selection by mail"));
sendMailAction->setWhatsThis(i18n("Sends the selection by mail. Simply select the important lines and click on this menu entry to send the selection to a friend or a mailing list.")); sendMailAction->setWhatsThis(i18n("Sends the selection by mail. Simply select the important lines and click on this menu entry to send the selection to a friend or a mailing list."));
sendMailAction->setEnabled(false); sendMailAction->setEnabled(false);
logMessageAction=new KAction(i18n("&Send Message..."), "filenew", CTRL+Key_L, this, SLOT(slotLogMessage()), actionCollection(), "log_message" ); logMessageAction=new KAction(i18n("&Send Message..."), "filenew", CTRL+Key_L, TQT_TQOBJECT(this), TQT_SLOT(slotLogMessage()), actionCollection(), "log_message" );
logMessageAction->setToolTip(i18n("Send a message to the log system")); logMessageAction->setToolTip(i18n("Send a message to the log system"));
logMessageAction->setWhatsThis(i18n("This action will open a dialog which lets you send a message to the log system.")); logMessageAction->setWhatsThis(i18n("This action will open a dialog which lets you send a message to the log system."));
KStdAction::selectAll(this, SLOT(slotSelectAll()), actionCollection(), "select_all"); KStdAction::selectAll(TQT_TQOBJECT(this), TQT_SLOT(slotSelectAll()), actionCollection(), "select_all");
actionCollection()->action("select_all")->setToolTip(i18n("Select all lines of the current log")); actionCollection()->action("select_all")->setToolTip(i18n("Select all lines of the current log"));
actionCollection()->action("select_all")->setWhatsThis(i18n("Selects all lines of the current log. This action is useful if you want, for example, to save all the content of the current log in a file.")); actionCollection()->action("select_all")->setWhatsThis(i18n("Selects all lines of the current log. This action is useful if you want, for example, to save all the content of the current log in a file."));
KStdAction::find(findManager, SLOT(slotFind()), actionCollection(), "find"); KStdAction::find(findManager, TQT_SLOT(slotFind()), actionCollection(), "tqfind");
KStdAction::findNext(findManager, SLOT(slotFindNext()), actionCollection(), "find_next"); KStdAction::findNext(findManager, TQT_SLOT(slotFindNext()), actionCollection(), "find_next");
//TODO Find a solution to display at the right place this action (see Akregator interface) //TODO Find a solution to display at the right place this action (see Akregator interface)
filterBarAction=new KToggleAction(i18n("Show &Filter Bar"), QString::null, 0, this, SLOT(slotToggleFilterBar()), actionCollection(), "toggle_filter_bar"); filterBarAction=new KToggleAction(i18n("Show &Filter Bar"), TQString(), 0, TQT_TQOBJECT(this), TQT_SLOT(slotToggleFilterBar()), actionCollection(), "toggle_filter_bar");
#if defined(KDE_MAKE_VERSION) && KDE_VERSION >= KDE_MAKE_VERSION(3,3,0) #if defined(KDE_MAKE_VERSION) && KDE_VERSION >= KDE_MAKE_VERSION(3,3,0)
filterBarAction->setEnabled(true); filterBarAction->setEnabled(true);
#else #else
filterBarAction->setEnabled(false); filterBarAction->setEnabled(false);
#endif #endif
KStdAction::preferences(this, SLOT(slotOptions()), actionCollection()); KStdAction::preferences(TQT_TQOBJECT(this), TQT_SLOT(slotOptions()), actionCollection());
newTabAction=new KAction(i18n("&New Tab"), "tab_new", CTRL+Key_T, this, SLOT(newTab()), actionCollection(), "new_tab" ); newTabAction=new KAction(i18n("&New Tab"), "tab_new", CTRL+Key_T, TQT_TQOBJECT(this), TQT_SLOT(newTab()), actionCollection(), "new_tab" );
newTabAction->setToolTip(i18n("Create a new tab")); newTabAction->setToolTip(i18n("Create a new tab"));
newTabAction->setWhatsThis(i18n("Creates a new tab which can display another log.")); newTabAction->setWhatsThis(i18n("Creates a new tab which can display another log."));
closeTabAction=new KAction(i18n("&Close Tab"), "tab_remove", CTRL+Key_W, this, SLOT(closeTab()), actionCollection(), "close_tab" ); closeTabAction=new KAction(i18n("&Close Tab"), "tab_remove", CTRL+Key_W, TQT_TQOBJECT(this), TQT_SLOT(closeTab()), actionCollection(), "close_tab" );
closeTabAction->setToolTip(i18n("Close the current tab")); closeTabAction->setToolTip(i18n("Close the current tab"));
closeTabAction->setWhatsThis(i18n("Closes the current tab.")); closeTabAction->setWhatsThis(i18n("Closes the current tab."));
duplicateTabAction=new KAction(i18n("&Duplicate Tab"), "tab_duplicate", SHIFT+CTRL+Key_N, this, SLOT(duplicateTab()), actionCollection(), "duplicate_tab" ); duplicateTabAction=new KAction(i18n("&Duplicate Tab"), "tab_duplicate", SHIFT+CTRL+Key_N, TQT_TQOBJECT(this), TQT_SLOT(duplicateTab()), actionCollection(), "duplicate_tab" );
duplicateTabAction->setToolTip(i18n("Duplicate the current tab")); duplicateTabAction->setToolTip(i18n("Duplicate the current tab"));
duplicateTabAction->setWhatsThis(i18n("Duplicates the current tab.")); duplicateTabAction->setWhatsThis(i18n("Duplicates the current tab."));
moveTabLeftAction=new KAction(i18n("Move Tab &Left"), "1leftarrow", SHIFT+CTRL+Key_Left, this, SLOT(moveTabLeft()), actionCollection(), "move_tab_left" ); moveTabLeftAction=new KAction(i18n("Move Tab &Left"), "1leftarrow", SHIFT+CTRL+Key_Left, TQT_TQOBJECT(this), TQT_SLOT(moveTabLeft()), actionCollection(), "move_tab_left" );
moveTabLeftAction->setToolTip(i18n("Move the current tab to the left")); moveTabLeftAction->setToolTip(i18n("Move the current tab to the left"));
moveTabLeftAction->setWhatsThis(i18n("Moves the current tab to the left.")); moveTabLeftAction->setWhatsThis(i18n("Moves the current tab to the left."));
moveTabRightAction=new KAction(i18n("Move Tab &Right"), "1rightarrow", SHIFT+CTRL+Key_Right, this, SLOT(moveTabRight()), actionCollection(), "move_tab_right" ); moveTabRightAction=new KAction(i18n("Move Tab &Right"), "1rightarrow", SHIFT+CTRL+Key_Right, TQT_TQOBJECT(this), TQT_SLOT(moveTabRight()), actionCollection(), "move_tab_right" );
moveTabRightAction->setToolTip(i18n("Move the current tab to the right")); moveTabRightAction->setToolTip(i18n("Move the current tab to the right"));
moveTabRightAction->setWhatsThis(i18n("Moves the current tab to the right.")); moveTabRightAction->setWhatsThis(i18n("Moves the current tab to the right."));
reloadAction=new KAction(i18n("&Reload"), "reload", Key_F5, this, SLOT(reloadCurrent()), actionCollection(), "reload" ); reloadAction=new KAction(i18n("&Reload"), "reload", Key_F5, TQT_TQOBJECT(this), TQT_SLOT(reloadCurrent()), actionCollection(), "reload" );
reloadAction->setToolTip(i18n("Reload the current log")); reloadAction->setToolTip(i18n("Reload the current log"));
reloadAction->setWhatsThis(i18n("Reloads the current log, if you want to be sure that the view is correctly updated.")); reloadAction->setWhatsThis(i18n("Reloads the current log, if you want to be sure that the view is correctly updated."));
resumeParsingAction=new KAction(i18n("Resu&me Parsing"), "player_play", CTRL+Key_M, this, SLOT(resumeParsing()), actionCollection(), "resume_parsing"); resumeParsingAction=new KAction(i18n("Resu&me Parsing"), "player_play", CTRL+Key_M, TQT_TQOBJECT(this), TQT_SLOT(resumeParsing()), actionCollection(), "resume_parsing");
resumeParsingAction->setToolTip(i18n("Resume the watching of the current log")); resumeParsingAction->setToolTip(i18n("Resume the watching of the current log"));
resumeParsingAction->setWhatsThis(i18n("Resumes the watching of the current log. This action is only available when the user has already paused the reading.")); resumeParsingAction->setWhatsThis(i18n("Resumes the watching of the current log. This action is only available when the user has already paused the reading."));
resumeParsingAction->setEnabled(true); resumeParsingAction->setEnabled(true);
pauseParsingAction=new KAction(i18n("S&top Parsing"), "player_stop", CTRL+Key_P, this, SLOT(pauseParsing()), actionCollection(), "pause_parsing"); pauseParsingAction=new KAction(i18n("S&top Parsing"), "player_stop", CTRL+Key_P, TQT_TQOBJECT(this), TQT_SLOT(pauseParsing()), actionCollection(), "pause_parsing");
pauseParsingAction->setToolTip(i18n("Pause the watching of the current log")); pauseParsingAction->setToolTip(i18n("Pause the watching of the current log"));
pauseParsingAction->setWhatsThis(i18n("Pauses the watching of the current log. This action is particularly useful when the system is writing too many lines to log files, causing KSystemLog to reload too frequently.")); pauseParsingAction->setWhatsThis(i18n("Pauses the watching of the current log. This action is particularly useful when the system is writing too many lines to log files, causing KSystemLog to reload too frequently."));
detailAction=new KAction(i18n("&Details"), "viewmag", ALT+Key_Return, this, SLOT(slotDetails()), actionCollection(), "details"); detailAction=new KAction(i18n("&Details"), "viewmag", ALT+Key_Return, TQT_TQOBJECT(this), TQT_SLOT(slotDetails()), actionCollection(), "details");
detailAction->setToolTip(i18n("Display details on the currently selected line")); detailAction->setToolTip(i18n("Display details on the currently selected line"));
detailAction->setWhatsThis(i18n("Displays a dialog box which contains details on the currently selected line. You are able to navigate through the logs from this dialog box with the <b>Previous</b> / <b>Next</b> buttons.")); detailAction->setWhatsThis(i18n("Displays a dialog box which contains details on the currently selected line. You are able to navigate through the logs from this dialog box with the <b>Previous</b> / <b>Next</b> buttons."));
detailAction->setEnabled(false); detailAction->setEnabled(false);
@ -375,13 +375,13 @@ void KSystemLog::setupActions() {
tooltipEnabledAction->setWhatsThis(i18n("Disables/Enables the tooltips displayed when the cursor hovers a log line.")); tooltipEnabledAction->setWhatsThis(i18n("Disables/Enables the tooltips displayed when the cursor hovers a log line."));
connect(tooltipEnabledAction, SIGNAL(toggled(bool)), this, SLOT(slotTooltipEnabled(bool))); connect(tooltipEnabledAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotTooltipEnabled(bool)));
newLinesDisplayedAction=new KToggleAction(i18n("&Display New Lines"), 0, actionCollection(), "display_new_line"); newLinesDisplayedAction=new KToggleAction(i18n("&Display New Lines"), 0, actionCollection(), "display_new_line");
newLinesDisplayedAction->setToolTip(i18n("Display or not new lines if the log changes")); newLinesDisplayedAction->setToolTip(i18n("Display or not new lines if the log changes"));
newLinesDisplayedAction->setWhatsThis(i18n("Displays or not the new lines if the log changes. This option is useful when you want to see an old log lines and that KSystemLog often refreshes the current view.")); newLinesDisplayedAction->setWhatsThis(i18n("Displays or not the new lines if the log changes. This option is useful when you want to see an old log lines and that KSystemLog often refreshes the current view."));
connect(newLinesDisplayedAction, SIGNAL(toggled(bool)), this, SLOT(slotNewLinesDisplayed(bool))); connect(newLinesDisplayedAction, TQT_SIGNAL(toggled(bool)), TQT_TQOBJECT(this), TQT_SLOT(slotNewLinesDisplayed(bool)));
setupGroupBy(); setupGroupBy();
@ -394,16 +394,16 @@ void KSystemLog::setupLogActions() {
//Define a macro allowing the connection of the signal from log action to the slotLogAction object //Define a macro allowing the connection of the signal from log action to the slotLogAction object
#if defined(KDE_MAKE_VERSION) && KDE_VERSION >= KDE_MAKE_VERSION(3,4,0) #if defined(KDE_MAKE_VERSION) && KDE_VERSION >= KDE_MAKE_VERSION(3,4,0)
#define CONNECTED_SLOT(action) connect(action, SIGNAL(activated(KAction::ActivationReason, Qt::ButtonState)), slotLogAction, SLOT(slotLogAction(KAction::ActivationReason, Qt::ButtonState))); #define CONNECTED_SLOT(action) connect(action, TQT_SIGNAL(activated(KAction::ActivationReason, TQt::ButtonState)), slotLogAction, TQT_SLOT(slotLogAction(KAction::ActivationReason, TQt::ButtonState)));
#else #else
#define CONNECTED_SLOT(action) connect(action, SIGNAL(activated()), slotLogAction, SLOT(slotLogAction())); #define CONNECTED_SLOT(action) connect(action, TQT_SIGNAL(activated()), slotLogAction, TQT_SLOT(slotLogAction()));
#endif #endif
//Construct the slotLogAction object //Construct the slotLogAction object
slotLogAction=new SlotLogAction(this); slotLogAction=new SlotLogAction(this);
QString exclusiveGroup="LogActions"; TQString exclusiveGroup="LogActions";
//System Log Action //System Log Action
KToggleAction* systemAction=new KToggleAction(i18n("S&ystem Log"), SYSTEM_MODE_ICON, 0, NULL, NULL, actionCollection(), "system_log" ); KToggleAction* systemAction=new KToggleAction(i18n("S&ystem Log"), SYSTEM_MODE_ICON, 0, NULL, NULL, actionCollection(), "system_log" );
@ -532,7 +532,7 @@ void KSystemLog::reloadCurrent() {
void KSystemLog::reloadAll() { void KSystemLog::reloadAll() {
QPtrListIterator<LogManager> it(logManagers); TQPtrListIterator<LogManager> it(logManagers);
//Inform the Loading Dialog on how many Log Managers we have to load //Inform the Loading Dialog on how many Log Managers we have to load
loadingDialog->setTabCount(logManagers.count()); loadingDialog->setTabCount(logManagers.count());
@ -657,22 +657,22 @@ LogManager* KSystemLog::newTab() {
LogManager* manager=new LogManager(this, loadingDialog); LogManager* manager=new LogManager(this, loadingDialog);
//Signals from LogManager to Main Class //Signals from LogManager to Main Class
connect(manager, SIGNAL(changeTitle(View*, const QString&)), this, SLOT(changeTab(View*, const QString& ))); connect(manager, TQT_SIGNAL(changeTitle(View*, const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(changeTab(View*, const TQString& )));
connect(manager, SIGNAL(changeTitle(View*, const QIconSet&, const QString&)), this, SLOT(changeTab(View*, const QIconSet&, const QString&))); connect(manager, TQT_SIGNAL(changeTitle(View*, const TQIconSet&, const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(changeTab(View*, const TQIconSet&, const TQString&)));
connect(manager, SIGNAL(changeCaption(const QString&)), this, SLOT(setCaption(const QString&))); connect(manager, TQT_SIGNAL(changeCaption(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(setCaption(const TQString&)));
connect(manager, SIGNAL(changeStatusbar(const QString&)), this, SLOT(changeStatusbar(const QString&))); connect(manager, TQT_SIGNAL(changeStatusbar(const TQString&)), TQT_TQOBJECT(this), TQT_SLOT(changeStatusbar(const TQString&)));
connect(manager, SIGNAL(logUpdated(int)), this, SLOT(logUpdated(int))); connect(manager, TQT_SIGNAL(logUpdated(int)), TQT_TQOBJECT(this), TQT_SLOT(logUpdated(int)));
connect(manager, SIGNAL(reloaded()), this, SLOT(logManagerReloaded())); connect(manager, TQT_SIGNAL(reloaded()), TQT_TQOBJECT(this), TQT_SLOT(logManagerReloaded()));
connect(manager, SIGNAL(GUIUpdated()), this, SLOT(updateGUI())); connect(manager, TQT_SIGNAL(GUIUpdated()), TQT_TQOBJECT(this), TQT_SLOT(updateGUI()));
connect(manager, SIGNAL(detailsCalled()), this, SLOT(slotDetails())); connect(manager, TQT_SIGNAL(detailsCalled()), TQT_TQOBJECT(this), TQT_SLOT(slotDetails()));
connect(manager, SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged())); connect(manager, TQT_SIGNAL(selectionChanged()), TQT_TQOBJECT(this), TQT_SLOT(slotSelectionChanged()));
//Signals from Main Actions to LogManager //Signals from Main Actions to LogManager
connect(expandAllAction, SIGNAL(activated()), manager, SLOT(slotExpandAll())); connect(expandAllAction, TQT_SIGNAL(activated()), manager, TQT_SLOT(slotExpandAll()));
connect(collapseAllAction, SIGNAL(activated()), manager, SLOT(slotCollapseAll())); connect(collapseAllAction, TQT_SIGNAL(activated()), manager, TQT_SLOT(slotCollapseAll()));
connect(saveAction, SIGNAL(activated()), manager, SLOT(slotFileSave())); connect(saveAction, TQT_SIGNAL(activated()), manager, TQT_SLOT(slotFileSave()));
connect(copyAction, SIGNAL(activated()), manager, SLOT(slotCopyToClipboard())); connect(copyAction, TQT_SIGNAL(activated()), manager, TQT_SLOT(slotCopyToClipboard()));
connect(sendMailAction, SIGNAL(activated()), manager, SLOT(slotSendMail())); connect(sendMailAction, TQT_SIGNAL(activated()), manager, TQT_SLOT(slotSendMail()));
logManagers.append(manager); logManagers.append(manager);
@ -689,24 +689,24 @@ LogManager* KSystemLog::newTab() {
tabs->setCurrentPage(tabs->count()-1); tabs->setCurrentPage(tabs->count()-1);
//Correctly initialize the Status Bar //Correctly initialize the tqStatus Bar
updateStatusBar(); updateStatusBar();
//Returns the newly created LogManager //Returns the newly created LogManager
return(manager); return(manager);
} }
void KSystemLog::changeTab(View* view, const QString& label) { void KSystemLog::changeTab(View* view, const TQString& label) {
tabs->changeTab(view, label); tabs->changeTab(view, label);
} }
void KSystemLog::changeTab(View* view, const QIconSet& icon, const QString& label) { void KSystemLog::changeTab(View* view, const TQIconSet& icon, const TQString& label) {
tabs->changeTab(view, icon, label); tabs->changeTab(view, icon, label);
} }
int KSystemLog::getIndex(LogManager* manager) { int KSystemLog::getIndex(LogManager* manager) {
QPtrListIterator<LogManager> it(logManagers); TQPtrListIterator<LogManager> it(logManagers);
LogManager* temp=it.current(); LogManager* temp=it.current();
int pos=0; int pos=0;
@ -730,7 +730,7 @@ int KSystemLog::getIndex(LogManager* manager) {
void KSystemLog::setCurrentLogManager(LogManager* currentManager) { void KSystemLog::setCurrentLogManager(LogManager* currentManager) {
currentManager->setCurrent(true); currentManager->setCurrent(true);
QPtrListIterator<LogManager> it(logManagers); TQPtrListIterator<LogManager> it(logManagers);
LogManager* manager=it.current(); LogManager* manager=it.current();
while(manager!=NULL) { while(manager!=NULL) {
@ -797,7 +797,7 @@ void KSystemLog::slotToggleFilterBar() {
KSystemLogConfig::setToggleFilterBar(filterBarAction->isChecked()); KSystemLogConfig::setToggleFilterBar(filterBarAction->isChecked());
//And call an updating method on each Log Manager //And call an updating method on each Log Manager
QPtrListIterator<LogManager> it(logManagers); TQPtrListIterator<LogManager> it(logManagers);
LogManager* current=it.current(); LogManager* current=it.current();
while (current!=NULL) { while (current!=NULL) {
@ -821,8 +821,8 @@ void KSystemLog::slotDetails() {
//If the dialog has not been created, we create it //If the dialog has not been created, we create it
if (detailDialog==NULL) { if (detailDialog==NULL) {
detailDialog=new DetailDialog(activeLogManager()->getView(), this, "detail_dialog"); detailDialog=new DetailDialog(activeLogManager()->getView(), this, "detail_dialog");
connect(activeLogManager()->getView()->getLogList(), SIGNAL(selectionChanged()), detailDialog, SLOT(selectionChanged())); connect(activeLogManager()->getView()->getLogList(), TQT_SIGNAL(selectionChanged()), detailDialog, TQT_SLOT(selectionChanged()));
//connect(activeLogManager()->getView()->getLogList(), SIGNAL(triggerUpdate()), detailDialog, SLOT(selectionChanged())); //connect(activeLogManager()->getView()->getLogList(), TQT_SIGNAL(triggerUpdate()), detailDialog, TQT_SLOT(selectionChanged()));
} }
detailDialog->show(); detailDialog->show();
@ -836,7 +836,7 @@ void KSystemLog::slotSelectAll() {
void KSystemLog::slotTooltipEnabled(bool enabled) { void KSystemLog::slotTooltipEnabled(bool enabled) {
KSystemLogConfig::setTooltipEnabled(enabled); KSystemLogConfig::setTooltipEnabled(enabled);
QPtrListIterator<LogManager> it(logManagers); TQPtrListIterator<LogManager> it(logManagers);
while(it.current()!=NULL) { while(it.current()!=NULL) {
(it.current())->setTooltipEnabled(enabled); (it.current())->setTooltipEnabled(enabled);
++it; ++it;
@ -847,7 +847,7 @@ void KSystemLog::slotTooltipEnabled(bool enabled) {
void KSystemLog::slotNewLinesDisplayed(bool displayed) { void KSystemLog::slotNewLinesDisplayed(bool displayed) {
KSystemLogConfig::setNewLinesDisplayed(displayed); KSystemLogConfig::setNewLinesDisplayed(displayed);
QPtrListIterator<LogManager> it(logManagers); TQPtrListIterator<LogManager> it(logManagers);
while(it.current()!=NULL) { while(it.current()!=NULL) {
(it.current())->setNewLinesDisplayed(displayed); (it.current())->setNewLinesDisplayed(displayed);
++it; ++it;
@ -866,11 +866,11 @@ void KSystemLog::logUpdated(int /*lines*/) {
void KSystemLog::updateStatusBar() { void KSystemLog::updateStatusBar() {
LogManager* currentManager=activeLogManager(); LogManager* currentManager=activeLogManager();
QString lineCount=i18n("1 log line.", "%n log lines.", currentManager->getView()->getItemCount()); TQString lineCount=i18n("1 log line.", "%n log lines.", currentManager->getView()->getItemCount());
statusBar()->changeItem(lineCount, STATUS_BAR_LINE_COUNT); statusBar()->changeItem(lineCount, STATUS_BAR_LINE_COUNT);
QString time=i18n("Last updated: %1.").arg(currentManager->getLastUpdate().toString(Qt::LocalDate)); TQString time=i18n("Last updated: %1.").tqarg(currentManager->getLastUpdate().toString(Qt::LocalDate));
statusBar()->changeItem(time, STATUS_BAR_LAST_MODIFICATION); statusBar()->changeItem(time, STATUS_BAR_LAST_MODIFICATION);
@ -896,10 +896,10 @@ void KSystemLog::resumeParsing() {
//If no actions are selected, than all are deselected //If no actions are selected, than all are deselected
void KSystemLog::deactiveLogActions() { void KSystemLog::deactiveLogActions() {
QValueList<KToggleAction*> actions=mapActionLogModes.keys(); TQValueList<KToggleAction*> actions=mapActionLogModes.keys();
KToggleAction* action; KToggleAction* action;
QValueList<KToggleAction*>::iterator it; TQValueList<KToggleAction*>::iterator it;
for (it=actions.begin(); it!=actions.end(); ++it) { for (it=actions.begin(); it!=actions.end(); ++it) {
action=*it; action=*it;
@ -914,9 +914,9 @@ KToggleAction* KSystemLog::getCorrespondingLogAction(LogMode* mode) {
if (mode==Globals::noMode || mode==Globals::openingMode) if (mode==Globals::noMode || mode==Globals::openingMode)
return(NULL); return(NULL);
QValueList<KToggleAction*> keys=mapActionLogModes.keys(); TQValueList<KToggleAction*> keys=mapActionLogModes.keys();
QValueList<KToggleAction*>::iterator it; TQValueList<KToggleAction*>::iterator it;
KToggleAction* key; KToggleAction* key;
@ -938,9 +938,9 @@ KToggleAction* KSystemLog::getLogAction(const char* name) {
} }
#if defined(KDE_MAKE_VERSION) && KDE_VERSION >= KDE_MAKE_VERSION(3,4,0) #if defined(KDE_MAKE_VERSION) && KDE_VERSION >= KDE_MAKE_VERSION(3,4,0)
void KSystemLog::logActionClicked(const QObject* sender, KAction::ActivationReason reason, Qt::ButtonState state) { void KSystemLog::logActionClicked(const TQObject* sender, KAction::ActivationReason reason, TQt::ButtonState state) {
#else #else
void KSystemLog::logActionClicked(const QObject* sender) { void KSystemLog::logActionClicked(const TQObject* sender) {
#endif #endif
KToggleAction* action=getLogAction(sender->name()); KToggleAction* action=getLogAction(sender->name());
@ -952,10 +952,10 @@ void KSystemLog::logActionClicked(const QObject* sender) {
return; return;
} }
//TODO Be sure that the + is the right symbol to combine Qt Constants //TODO Be sure that the + is the right symbol to combine TQt Constants
//If the user uses the middle button OR left button + shift OR left button + control : = it opens the log in a new tab //If the user uses the middle button OR left button + shift OR left button + control : = it opens the log in a new tab
#if defined(KDE_MAKE_VERSION) && KDE_VERSION >= KDE_MAKE_VERSION(3,4,0) #if defined(KDE_MAKE_VERSION) && KDE_VERSION >= KDE_MAKE_VERSION(3,4,0)
if (state==Qt::MidButton || (state==Qt::ControlButton+Qt::LeftButton) || (state==Qt::ShiftButton+Qt::LeftButton)) if (state==Qt::MidButton || (state==TQt::ControlButton+Qt::LeftButton) || (state==TQt::ShiftButton+Qt::LeftButton))
newTab(); newTab();
#endif #endif
@ -969,7 +969,7 @@ void KSystemLog::logActionClicked(const QObject* sender) {
void KSystemLog::fileOpen() { void KSystemLog::fileOpen() {
//Open a standard Filedialog //Open a standard Filedialog
KURL openingFileName(KFileDialog::getOpenURL(QString::null, QString::null, this, i18n("Open Location"))); KURL openingFileName(KFileDialog::getOpenURL(TQString(), TQString(), this, i18n("Open Location")));
kdDebug() << "Opening file : " << openingFileName.url() << endl; kdDebug() << "Opening file : " << openingFileName.url() << endl;
if (!openingFileName.isEmpty()) { if (!openingFileName.isEmpty()) {
@ -982,7 +982,7 @@ void KSystemLog::fileOpen() {
this->load(Globals::openingMode, activeLogManager()); this->load(Globals::openingMode, activeLogManager());
} }
else { else {
QString message(i18n("Malformed URL. Unable to open this file.")); TQString message(i18n("Malformed URL. Unable to open this file."));
KMessageBox::error(this, message, i18n("Unable to open this file."), KMessageBox::Notify); KMessageBox::error(this, message, i18n("Unable to open this file."), KMessageBox::Notify);
} }
} }
@ -998,14 +998,14 @@ void KSystemLog::filePrint() {
printer=new KPrinter(); printer=new KPrinter();
if (printer->setup(this)) { if (printer->setup(this)) {
// setup the printer. with Qt, you always "print" to a // setup the printer. with TQt, you always "print" to a
// QPainter.. whether the output medium is a pixmap, a screen, // TQPainter.. whether the output medium is a pixmap, a screen,
// or paper // or paper
QPainter p; TQPainter p;
p.begin(printer); p.begin(printer);
// we let our view do the actual printing // we let our view do the actual printing
QPaintDeviceMetrics metrics(printer); TQPaintDeviceMetrics metrics(printer);
activeLogManager()->getView()->print(&p, metrics.height(), metrics.width()); activeLogManager()->getView()->print(&p, metrics.height(), metrics.width());
// and send the result to the printer // and send the result to the printer
@ -1035,19 +1035,19 @@ void KSystemLog::slotLogMessage() {
} }
void KSystemLog::changeStatusbar(const QString& text) { void KSystemLog::changeStatusbar(const TQString& text) {
//Display this text on the statusbar //Display this text on the statusbar
statusBar()->message(text); statusBar()->message(text);
} }
void KSystemLog::changeCaption(const QString& text) { void KSystemLog::changeCaption(const TQString& text) {
//Display this text on the caption //Display this text on the caption
setCaption(text); setCaption(text);
} }
void KSystemLog::setupProgressDialog() { void KSystemLog::setupProgressDialog() {
//TODO Move this to the LoadingDialog constructor //TODO Move this to the LoadingDialog constructor
loadingDialog=new LoadingDialog((QWidget*)this, "progress_dialog", true); loadingDialog=new LoadingDialog((TQWidget*)this, "progress_dialog", true);
loadingDialog->setAllowCancel(false); loadingDialog->setAllowCancel(false);
loadingDialog->setAutoClose(false); loadingDialog->setAutoClose(false);
loadingDialog->setMinimumDuration(500); loadingDialog->setMinimumDuration(500);
@ -1062,17 +1062,17 @@ void KSystemLog::readConfig() {
//Filter Bar is displayed depending on the config file //Filter Bar is displayed depending on the config file
filterBarAction->setChecked(KSystemLogConfig::toggleFilterBar()); filterBarAction->setChecked(KSystemLogConfig::toggleFilterBar());
QValueList<int> groupByTypes=KSystemLogConfig::groupBy(); TQValueList<int> groupByTypes=KSystemLogConfig::groupBy();
QValueList<int> groupByColumns=KSystemLogConfig::groupByColumns(); TQValueList<int> groupByColumns=KSystemLogConfig::groupByColumns();
QValueList<int>::iterator itGroupBy=groupByTypes.begin(); TQValueList<int>::iterator itGroupBy=groupByTypes.begin();
QValueList<int>::iterator itGroupByColumn=groupByColumns.begin(); TQValueList<int>::iterator itGroupByColumn=groupByColumns.begin();
QValueList<int> modes=KSystemLogConfig::logModes(); TQValueList<int> modes=KSystemLogConfig::logModes();
QStringList fileList=KSystemLogConfig::openedURLs(); TQStringList fileList=KSystemLogConfig::openedURLs();
QValueList<int>::iterator it; TQValueList<int>::iterator it;
QStringList::iterator itString=fileList.begin(); TQStringList::iterator itString=fileList.begin();
//Inform the Loading Dialog on how many Log Managers we have to load //Inform the Loading Dialog on how many Log Managers we have to load
loadingDialog->setTabCount(modes.count()); loadingDialog->setTabCount(modes.count());
@ -1192,10 +1192,10 @@ void KSystemLog::readConfig() {
void KSystemLog::saveConfig() { void KSystemLog::saveConfig() {
kdDebug() << "Last configuration saving..." << endl; kdDebug() << "Last configuration saving..." << endl;
QValueList<int> intList; TQValueList<int> intList;
QStringList stringList; TQStringList stringList;
QPtrListIterator<LogManager> it(logManagers); TQPtrListIterator<LogManager> it(logManagers);
LogManager* manager=it.current(); LogManager* manager=it.current();
@ -1203,7 +1203,7 @@ void KSystemLog::saveConfig() {
//If it's an opening mode, then we save its open file //If it's an opening mode, then we save its open file
if (manager->getLogMode()==Globals::openingMode) { if (manager->getLogMode()==Globals::openingMode) {
//We retrieve the path of the URL of the first file of the file list of the current manager ;-) //We retrieve the path of the URL of the first file of the file list of the current manager ;-)
QString file(manager->getLogFiles().first()->url.path()); TQString file(manager->getLogFiles().first()->url.path());
stringList.push_back(file); stringList.push_back(file);
} }
@ -1223,8 +1223,8 @@ void KSystemLog::saveConfig() {
/** /**
* Save the group by type and the column * Save the group by type and the column
*/ */
QValueList<int> groupByTypes; TQValueList<int> groupByTypes;
QValueList<int> groupByColumns; TQValueList<int> groupByColumns;
it=logManagers; it=logManagers;
manager=it.current(); manager=it.current();
@ -1311,13 +1311,13 @@ void KSystemLog::readProperties(KConfig* /*config*/) {
kdDebug() << "readProperties method." << endl; kdDebug() << "readProperties method." << endl;
} }
void KSystemLog::dragEnterEvent(QDragEnterEvent *event) { void KSystemLog::dragEnterEvent(TQDragEnterEvent *event) {
//Accept URI drops only //Accept URI drops only
event->accept(KURLDrag::canDecode(event)); event->accept(KURLDrag::canDecode(event));
} }
void KSystemLog::setupGroupBy() { void KSystemLog::setupGroupBy() {
groupBy=new KActionMenu(i18n("Group By"), SmallIcon(GROUP_BY_ICON), this, "group_by"); groupBy=new KActionMenu(i18n("Group By"), SmallIcon(GROUP_BY_ICON), TQT_TQOBJECT(this), "group_by");
actionCollection()->insert(groupBy); actionCollection()->insert(groupBy);
KPopupMenu* menu=groupBy->popupMenu(); KPopupMenu* menu=groupBy->popupMenu();
@ -1336,7 +1336,7 @@ void KSystemLog::setupGroupBy() {
menu->insertSeparator(); menu->insertSeparator();
connect(menu, SIGNAL(activated(int)), this, SLOT(groupByChanged(int))); connect(menu, TQT_SIGNAL(activated(int)), TQT_TQOBJECT(this), TQT_SLOT(groupByChanged(int)));
} }
@ -1457,10 +1457,10 @@ void KSystemLog::updateGroupBy() {
/** /**
* This is a very simplistic implementation of a drop event. we * This is a very simplistic implementation of a drop event. we
* will only accept a dropped URL. the Qt dnd code can do *much* * will only accept a dropped URL. the TQt dnd code can do *much*
* much more, so please read the docs there * much more, so please read the docs there
*/ */
void KSystemLog::dropEvent(QDropEvent *event) { void KSystemLog::dropEvent(TQDropEvent *event) {
KURL::List urls; KURL::List urls;
//See if we can decode a URI //See if we can decode a URI

@ -27,9 +27,9 @@
#endif #endif
//Qt includes //TQt includes
#include <qlistview.h> #include <tqlistview.h>
#include <qvaluevector.h> #include <tqvaluevector.h>
//KDE includes //KDE includes
#include <kapplication.h> #include <kapplication.h>
@ -63,7 +63,7 @@
#define STATUS_BAR_LAST_MODIFICATION 2 #define STATUS_BAR_LAST_MODIFICATION 2
class LogFile; class LogFile;
typedef QValueList<LogFile*> LogFiles; typedef TQValueList<LogFile*> LogFiles;
class KPrinter; class KPrinter;
@ -81,6 +81,7 @@ class KURL;
class KSystemLog : public KMainWindow { class KSystemLog : public KMainWindow {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
/** /**
* Default Constructor * Default Constructor
@ -100,7 +101,7 @@ class KSystemLog : public KMainWindow {
/** /**
* Specialized methods about LogManagers * Specialized methods about LogManagers
* TODO Maybe move them to a dedicated LogManagers class * TODO Maybe move them to a dedicated LogManagers class
* (which can subclass QValueList<LogManager*>) * (which can subclass TQValueList<LogManager*>)
*/ */
LogManager* activeLogManager(); LogManager* activeLogManager();
@ -109,10 +110,10 @@ class KSystemLog : public KMainWindow {
#if defined(KDE_MAKE_VERSION) && KDE_VERSION >= KDE_MAKE_VERSION(3,4,0) #if defined(KDE_MAKE_VERSION) && KDE_VERSION >= KDE_MAKE_VERSION(3,4,0)
//Actual KDE method //Actual KDE method
void logActionClicked(const QObject* sender, KAction::ActivationReason reason, Qt::ButtonState state); void logActionClicked(const TQObject* sender, KAction::ActivationReason reason, TQt::ButtonState state);
#else #else
//Method for old versions of KDE //Method for old versions of KDE
void logActionClicked(const QObject* sender); void logActionClicked(const TQObject* sender);
#endif #endif
void load(LogMode* logMode, LogManager* manager); void load(LogMode* logMode, LogManager* manager);
@ -120,10 +121,10 @@ class KSystemLog : public KMainWindow {
protected: protected:
/** /**
* Overridden virtuals for Qt drag'n drop (XDND) * Overridden virtuals for TQt drag'n drop (XDND)
*/ */
virtual void dragEnterEvent(QDragEnterEvent *event); virtual void dragEnterEvent(TQDragEnterEvent *event);
virtual void dropEvent(QDropEvent *event); virtual void dropEvent(TQDropEvent *event);
protected: protected:
@ -150,11 +151,11 @@ class KSystemLog : public KMainWindow {
public slots: public slots:
void changeStatusbar(const QString& text); void changeStatusbar(const TQString& text);
void changeCaption(const QString& text); void changeCaption(const TQString& text);
void changeTab(View* view, const QString& label); void changeTab(View* view, const TQString& label);
void changeTab(View* view, const QIconSet& icon, const QString& label); void changeTab(View* view, const TQIconSet& icon, const TQString& label);
void updateStatusBar(); void updateStatusBar();
@ -183,7 +184,7 @@ class KSystemLog : public KMainWindow {
void logManagerReloaded(); void logManagerReloaded();
void currentTabChanged(QWidget* view); void currentTabChanged(TQWidget* view);
void slotTooltipEnabled(bool enabled); void slotTooltipEnabled(bool enabled);
void slotNewLinesDisplayed(bool displayed); void slotNewLinesDisplayed(bool displayed);
@ -286,7 +287,7 @@ class KSystemLog : public KMainWindow {
*/ */
KTabWidget* tabs; KTabWidget* tabs;
QMap<KToggleAction*, LogMode*> mapActionLogModes; TQMap<KToggleAction*, LogMode*> mapActionLogModes;
}; };

@ -30,7 +30,7 @@ class KSystemLogInterface : virtual public DCOPObject {
public: public:
k_dcop: k_dcop:
virtual void openURL(QString url) = 0; virtual void openURL(TQString url) = 0;
}; };

@ -22,8 +22,8 @@
#include "loadingDialog.h" #include "loadingDialog.h"
LoadingDialog::LoadingDialog(QWidget* parent, const char* name, bool modal) : LoadingDialog::LoadingDialog(TQWidget* tqparent, const char* name, bool modal) :
KProgressDialog(parent, name, i18n("Loading Progress"), "", modal), KProgressDialog(tqparent, name, i18n("Loading Progress"), "", modal),
tabCount(0), tabCount(0),
currentTab(0), currentTab(0),
@ -102,22 +102,22 @@ void LoadingDialog::hide() {
} }
} }
void LoadingDialog::setLoadingLog(const QString& text) { void LoadingDialog::setLoadingLog(const TQString& text) {
//Several files to load //Several files to load
if (fileCount>1 && currentFile>=1) { if (fileCount>1 && currentFile>=1) {
//Several tabs to load //Several tabs to load
if (tabCount>1 && currentTab>=1) { if (tabCount>1 && currentTab>=1) {
if (firstLoading) if (firstLoading)
setLabel(i18n("<qt>Loading <b>%1</b> [<b>%2</b>/%3 file] (<b>%4</b>/%5)...</qt>").arg(text).arg(currentFile).arg(fileCount).arg(currentTab).arg(tabCount)); setLabel(i18n("<qt>Loading <b>%1</b> [<b>%2</b>/%3 file] (<b>%4</b>/%5)...</qt>").tqarg(text).tqarg(currentFile).tqarg(fileCount).tqarg(currentTab).tqarg(tabCount));
else else
setLabel(i18n("<qt>Reloading <b>%1</b> [<b>%2</b>/%3 file] (<b>%4</b>/%5)...</qt>").arg(text).arg(currentFile).arg(fileCount).arg(currentTab).arg(tabCount)); setLabel(i18n("<qt>Reloading <b>%1</b> [<b>%2</b>/%3 file] (<b>%4</b>/%5)...</qt>").tqarg(text).tqarg(currentFile).tqarg(fileCount).tqarg(currentTab).tqarg(tabCount));
} }
//Only one tab to load //Only one tab to load
else { else {
if (firstLoading) if (firstLoading)
setLabel(i18n("<qt>Loading <b>%1</b> [<b>%2</b>/%3 file]...</qt>").arg(text).arg(currentFile).arg(fileCount)); setLabel(i18n("<qt>Loading <b>%1</b> [<b>%2</b>/%3 file]...</qt>").tqarg(text).tqarg(currentFile).tqarg(fileCount));
else else
setLabel(i18n("<qt>Reloading <b>%1</b> [<b>%2</b>/%3 file]...</qt>").arg(text).arg(currentFile).arg(fileCount)); setLabel(i18n("<qt>Reloading <b>%1</b> [<b>%2</b>/%3 file]...</qt>").tqarg(text).tqarg(currentFile).tqarg(fileCount));
} }
} }
@ -126,16 +126,16 @@ void LoadingDialog::setLoadingLog(const QString& text) {
//Several tabs to load //Several tabs to load
if (tabCount>1 && currentTab>=1) { if (tabCount>1 && currentTab>=1) {
if (firstLoading) if (firstLoading)
setLabel(i18n("<qt>Loading <b>%1</b> (<b>%2</b>/%3)...</qt>").arg(text).arg(currentTab).arg(tabCount)); setLabel(i18n("<qt>Loading <b>%1</b> (<b>%2</b>/%3)...</qt>").tqarg(text).tqarg(currentTab).tqarg(tabCount));
else else
setLabel(i18n("<qt>Reloading <b>%1</b> (<b>%2</b>/%3)...</qt>").arg(text).arg(currentTab).arg(tabCount)); setLabel(i18n("<qt>Reloading <b>%1</b> (<b>%2</b>/%3)...</qt>").tqarg(text).tqarg(currentTab).tqarg(tabCount));
} }
//Only one tab to load //Only one tab to load
else { else {
if (firstLoading) if (firstLoading)
setLabel(i18n("<qt>Loading <b>%1</b>...</qt>").arg(text)); setLabel(i18n("<qt>Loading <b>%1</b>...</qt>").tqarg(text));
else else
setLabel(i18n("<qt>Reloading <b>%1</b>...</qt>").arg(text)); setLabel(i18n("<qt>Reloading <b>%1</b>...</qt>").tqarg(text));
} }
} }

@ -21,9 +21,9 @@
#ifndef _LOADING_DIALOG_H_ #ifndef _LOADING_DIALOG_H_
#define _LOADING_DIALOG_H_ #define _LOADING_DIALOG_H_
#include <qwidget.h> #include <tqwidget.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qlabel.h> #include <tqlabel.h>
#include <kprogress.h> #include <kprogress.h>
#include <kiconloader.h> #include <kiconloader.h>
@ -43,13 +43,14 @@
class LoadingDialog : public KProgressDialog { class LoadingDialog : public KProgressDialog {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
LoadingDialog(QWidget* parent=0, const char* name=0, bool modal=false); LoadingDialog(TQWidget* tqparent=0, const char* name=0, bool modal=false);
~LoadingDialog(); ~LoadingDialog();
void setLoadingLog(const QString& text); void setLoadingLog(const TQString& text);
//Methods managing the position in the tab loading //Methods managing the position in the tab loading
int getTabCount(); int getTabCount();

@ -20,14 +20,14 @@
#ifndef _LOG_FILE_H_ #ifndef _LOG_FILE_H_
#define _LOG_FILE_H_ #define _LOG_FILE_H_
#include <qobject.h> #include <tqobject.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include <qstringlist.h> #include <tqstringlist.h>
#include <qfile.h> #include <tqfile.h>
#include <qdatetime.h> #include <tqdatetime.h>
#include <qlistview.h> #include <tqlistview.h>
#include <qvaluevector.h> #include <tqvaluevector.h>
#include <qvaluelist.h> #include <tqvaluelist.h>
#include <kurl.h> #include <kurl.h>
@ -40,7 +40,7 @@
class LogFile; class LogFile;
typedef QValueList<LogFile*> LogFiles; typedef TQValueList<LogFile*> LogFiles;
/** /**
* @author Nicolas Ternisien * @author Nicolas Ternisien

@ -23,7 +23,7 @@
#include "logLevel.h" #include "logLevel.h"
LogLevel::LogLevel(int id, QString& nm, QString& ic, QColor& col) : LogLevel::LogLevel(int id, TQString& nm, TQString& ic, TQColor& col) :
id(id), id(id),
name(nm), name(nm),
icon(ic), icon(ic),
@ -32,7 +32,7 @@ LogLevel::LogLevel(int id, QString& nm, QString& ic, QColor& col) :
} }
LogLevel::LogLevel(int id, QString name, const char* ic, QColor col) : LogLevel::LogLevel(int id, TQString name, const char* ic, TQColor col) :
id(id), id(id),
name(name), name(name),
icon(ic), icon(ic),
@ -47,7 +47,7 @@ LogLevel::~LogLevel() {
} }
/* /*
QString& LogLevel::getName() { TQString& LogLevel::getName() {
return(name); return(name);
} }
*/ */

@ -20,14 +20,14 @@
#ifndef _LOG_LEVEL_H_ #ifndef _LOG_LEVEL_H_
#define _LOG_LEVEL_H_ #define _LOG_LEVEL_H_
#include <qobject.h> #include <tqobject.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include <qstringlist.h> #include <tqstringlist.h>
#include <qfile.h> #include <tqfile.h>
#include <qvaluevector.h> #include <tqvaluevector.h>
#include <qvaluelist.h> #include <tqvaluelist.h>
#include <qptrlist.h> #include <tqptrlist.h>
#include <qcolor.h> #include <tqcolor.h>
#include <kurl.h> #include <kurl.h>
@ -36,7 +36,7 @@
class LogLevel; class LogLevel;
typedef QPtrList<LogLevel> LogLevels; typedef TQPtrList<LogLevel> LogLevels;
@ -46,21 +46,21 @@ typedef QPtrList<LogLevel> LogLevels;
class LogLevel { class LogLevel {
public: public:
LogLevel(int id, QString& name, QString& icon, QColor& color); LogLevel(int id, TQString& name, TQString& icon, TQColor& color);
LogLevel(int id, QString name, const char* icon, QColor color); LogLevel(int id, TQString name, const char* icon, TQColor color);
virtual ~LogLevel(); virtual ~LogLevel();
int id; int id;
QString name; TQString name;
QString icon; TQString icon;
QColor color; TQColor color;
QPixmap pixmap; TQPixmap pixmap;
}; };

@ -27,7 +27,7 @@
#include "logLine.h" #include "logLine.h"
LogLine::LogLine(QDate& date, QTime& time, QStringList& list, QString& file, LogLevel* level, int type) : LogLine::LogLine(TQDate& date, TQTime& time, TQStringList& list, TQString& file, LogLevel* level, int type) :
time(date, time), time(date, time),
itemList(list), itemList(list),
originalFile(file), originalFile(file),
@ -62,7 +62,7 @@ void LogLine::setRecent(bool recent) {
this->recent=recent; this->recent=recent;
if (item!=NULL) { if (item!=NULL) {
//TODO This is certainly the main problem of the unknown crash bug ! //TODO This is certainly the main problem of the unknown crash bug !
//item->repaint(); //item->tqrepaint();
} }
} }
@ -74,7 +74,7 @@ LogListItem* LogLine::getLogListItem() {
return(item); return(item);
} }
LogListItem* LogLine::insertItem(QListView* view) { LogListItem* LogLine::insertItem(TQListView* view) {
if (item==NULL) { if (item==NULL) {
item=ItemFactory::createLogListItem(view, this); item=ItemFactory::createLogListItem(view, this);
} }
@ -103,7 +103,7 @@ bool LogLine::equals(LogLine& other) {
return(true); return(true);
} }
void LogLine::removeItem(QListView* view) { void LogLine::removeItem(TQListView* view) {
if (item==NULL) if (item==NULL)
return; return;
@ -119,15 +119,15 @@ void LogLine::setLogLevel(LogLevel* level) {
logLevel=level; logLevel=level;
} }
QDateTime& LogLine::getTime() { TQDateTime& LogLine::getTime() {
return(time); return(time);
} }
QStringList& LogLine::getItemList() { TQStringList& LogLine::getItemList() {
return(itemList); return(itemList);
} }
QString& LogLine::getOriginalFile() { TQString& LogLine::getOriginalFile() {
return(originalFile); return(originalFile);
} }
@ -139,11 +139,11 @@ bool LogLine::isNewerThan(LogLine& other) {
return(time>=other.getTime()); return(time>=other.getTime());
} }
bool LogLine::isOlderThan(QDateTime& other) { bool LogLine::isOlderThan(TQDateTime& other) {
return(time<=other); return(time<=other);
} }
bool LogLine::isNewerThan(QDateTime& other) { bool LogLine::isNewerThan(TQDateTime& other) {
return(time>=other); return(time>=other);
} }
@ -160,7 +160,7 @@ bool LogLine::operator>(LogLine& other) {
return(isNewerThan(other)); return(isNewerThan(other));
} }
void LogLine::ensureItemVisible(QListView* view) { void LogLine::ensureItemVisible(TQListView* view) {
if (item!=NULL) if (item!=NULL)
view->ensureItemVisible(item); view->ensureItemVisible(item);
} }

@ -20,10 +20,10 @@
#ifndef _LOG_LINE_H_ #ifndef _LOG_LINE_H_
#define _LOG_LINE_H_ #define _LOG_LINE_H_
#include <qobject.h> #include <tqobject.h>
#include <qstringlist.h> #include <tqstringlist.h>
#include <qdatetime.h> #include <tqdatetime.h>
#include <qlistview.h> #include <tqlistview.h>
#include <kurl.h> #include <kurl.h>
@ -44,15 +44,15 @@ class ChildLogLine;
class LogLine { class LogLine {
public: public:
LogLine(QDate& date, QTime& time, QStringList& list, QString& originalFile, LogLevel* level, int tpe); LogLine(TQDate& date, TQTime& time, TQStringList& list, TQString& originalFile, LogLevel* level, int tpe);
virtual ~LogLine(); virtual ~LogLine();
bool isOlderThan(LogLine& other); bool isOlderThan(LogLine& other);
bool isNewerThan(LogLine& other); bool isNewerThan(LogLine& other);
bool isOlderThan(QDateTime& other); bool isOlderThan(TQDateTime& other);
bool isNewerThan(QDateTime& other); bool isNewerThan(TQDateTime& other);
bool equals(LogLine& other); bool equals(LogLine& other);
@ -65,9 +65,9 @@ class LogLine {
LogLevel* getLogLevel(); LogLevel* getLogLevel();
void setLogLevel(LogLevel* level); void setLogLevel(LogLevel* level);
QDateTime& getTime(); TQDateTime& getTime();
QStringList& getItemList(); TQStringList& getItemList();
QString& getOriginalFile(); TQString& getOriginalFile();
int getType(); int getType();
void setType(int t); void setType(int t);
@ -81,21 +81,21 @@ class LogLine {
//Use this function carefully (don't delete the returned object for example) //Use this function carefully (don't delete the returned object for example)
LogListItem* getLogListItem(); LogListItem* getLogListItem();
virtual LogListItem* insertItem(QListView* view); virtual LogListItem* insertItem(TQListView* view);
void removeItem(QListView* view); void removeItem(TQListView* view);
void ensureItemVisible(QListView* view); void ensureItemVisible(TQListView* view);
virtual bool isParentLogLine(); virtual bool isParentLogLine();
virtual bool isChildLogLine(); virtual bool isChildLogLine();
protected: protected:
QDateTime time; TQDateTime time;
QStringList itemList; TQStringList itemList;
QString originalFile; TQString originalFile;
LogLevel* logLevel; LogLevel* logLevel;

@ -24,28 +24,28 @@
//The filter is activated only if KDE version >= 3.3 //The filter is activated only if KDE version >= 3.3
#if defined(KDE_MAKE_VERSION) && KDE_VERSION >= KDE_MAKE_VERSION(3,3,0) #if defined(KDE_MAKE_VERSION) && KDE_VERSION >= KDE_MAKE_VERSION(3,3,0)
#include <qpainter.h> #include <tqpainter.h>
#include <klocale.h> #include <klocale.h>
#include "logLineFilter.h" #include "logLineFilter.h"
LogLineFilter::LogLineFilter(QWidget* parent, KListView* listView, const char* name) : LogLineFilter::LogLineFilter(TQWidget* tqparent, KListView* listView, const char* name) :
KListViewSearchLine(parent, listView, name) { KListViewSearchLine(tqparent, listView, name) {
drawFilterMessage = true; drawFilterMessage = true;
repaint(); tqrepaint();
} }
void LogLineFilter::drawContents(QPainter *p) { void LogLineFilter::drawContents(TQPainter *p) {
KListViewSearchLine::drawContents( p ); KListViewSearchLine::drawContents( p );
if ( drawFilterMessage == true && !hasFocus() ) { if ( drawFilterMessage == true && !hasFocus() ) {
QPen tmp = p->pen(); TQPen tmp = p->pen();
p->setPen( palette().color( QPalette::Disabled, QColorGroup::Text ) ); p->setPen( palette().color( TQPalette::Disabled, TQColorGroup::Text ) );
QRect cr = contentsRect(); TQRect cr = contentsRect();
//p->drawPixmap( 3, 3, SmallIcon("filter") ); //p->drawPixmap( 3, 3, SmallIcon("filter") );
@ -57,21 +57,21 @@ void LogLineFilter::drawContents(QPainter *p) {
} }
void LogLineFilter::focusInEvent( QFocusEvent *ev ) void LogLineFilter::focusInEvent( TQFocusEvent *ev )
{ {
if ( drawFilterMessage == true ) { if ( drawFilterMessage == true ) {
drawFilterMessage = false; drawFilterMessage = false;
repaint(); tqrepaint();
} }
KListViewSearchLine::focusInEvent( ev ); KListViewSearchLine::focusInEvent( ev );
} }
void LogLineFilter::focusOutEvent( QFocusEvent *ev ) void LogLineFilter::focusOutEvent( TQFocusEvent *ev )
{ {
if ( text().isEmpty() ) { if ( text().isEmpty() ) {
drawFilterMessage = true; drawFilterMessage = true;
repaint(); tqrepaint();
} }
KListViewSearchLine::focusOutEvent( ev ); KListViewSearchLine::focusOutEvent( ev );
} }

@ -40,12 +40,12 @@
class LogLineFilter : public KListViewSearchLine class LogLineFilter : public KListViewSearchLine
{ {
public: public:
LogLineFilter(QWidget* parent=NULL, KListView* listView=NULL, const char* name=NULL); LogLineFilter(TQWidget* tqparent=NULL, KListView* listView=NULL, const char* name=NULL);
protected: protected:
virtual void drawContents( QPainter *p ); virtual void drawContents( TQPainter *p );
virtual void focusInEvent( QFocusEvent *ev ); virtual void focusInEvent( TQFocusEvent *ev );
virtual void focusOutEvent( QFocusEvent *ev ); virtual void focusOutEvent( TQFocusEvent *ev );
private: private:
bool drawFilterMessage; bool drawFilterMessage;

@ -82,7 +82,7 @@ void LogLineList::insert(LogLine* line) {
} }
bool LogLineList::lineAlreadyExists(LogLine* line) { bool LogLineList::lineAlreadyExists(LogLine* line) {
QPtrListIterator<LogLine> it(list); TQPtrListIterator<LogLine> it(list);
LogLine* other=it.current(); LogLine* other=it.current();
while (other!=NULL) { while (other!=NULL) {
@ -98,7 +98,7 @@ bool LogLineList::lineAlreadyExists(LogLine* line) {
bool LogLineList::remove(LogLine* removedLine) { bool LogLineList::remove(LogLine* removedLine) {
QPtrListIterator<LogLine> it(list); TQPtrListIterator<LogLine> it(list);
LogLine* line=it.current(); LogLine* line=it.current();
while (line!=NULL) { while (line!=NULL) {
@ -133,7 +133,7 @@ int LogLineList::getItemCount() {
} }
void LogLineList::clear() { void LogLineList::clear() {
QPtrListIterator<LogLine> it(list); TQPtrListIterator<LogLine> it(list);
LogLine* line=it.current(); LogLine* line=it.current();
while (line!=NULL) { while (line!=NULL) {
@ -167,7 +167,7 @@ LogLine* LogLineList::synchronize(View* view) {
} }
void LogLineList::synchronizeRemovedLines(View* view) { void LogLineList::synchronizeRemovedLines(View* view) {
QPtrListIterator<LogLine> it(removedList); TQPtrListIterator<LogLine> it(removedList);
LogLine* line=it.current(); LogLine* line=it.current();
@ -193,7 +193,7 @@ LogLine* LogLineList::synchronizeAddedLines(View* view) {
kdDebug() << "Adding new items to the list..." << endl; kdDebug() << "Adding new items to the list..." << endl;
//We add the new items //We add the new items
QPtrListIterator<LogLine> it(addedList); TQPtrListIterator<LogLine> it(addedList);
LogLine* line=it.current(); LogLine* line=it.current();
@ -219,7 +219,7 @@ void LogLineList::synchronizeRecentLines() {
kdDebug() << "Recent items become normal..." << endl; kdDebug() << "Recent items become normal..." << endl;
//The older lines are no longer recent //The older lines are no longer recent
QPtrListIterator<LogLine> it(recentList); TQPtrListIterator<LogLine> it(recentList);
LogLine* line=it.current(); LogLine* line=it.current();
while (line!=NULL) { while (line!=NULL) {
@ -253,7 +253,7 @@ void LogLineList::setFirstReadPerformed(bool add) {
void LogLineList::updateOldestLine() { void LogLineList::updateOldestLine() {
QPtrListIterator<LogLine> it(list); TQPtrListIterator<LogLine> it(list);
if (it.current()==NULL) if (it.current()==NULL)
oldestLogLine=NULL; oldestLogLine=NULL;

@ -21,14 +21,14 @@
#ifndef _LOG_LINE_LIST_H_ #ifndef _LOG_LINE_LIST_H_
#define _LOG_LINE_LIST_H_ #define _LOG_LINE_LIST_H_
#include <qobject.h> #include <tqobject.h>
#include <qptrlist.h> #include <tqptrlist.h>
#include <qmap.h> #include <tqmap.h>
#include <kdebug.h> #include <kdebug.h>
#include "globals.h" #include "globals.h"
#include "qlistview.h" #include "tqlistview.h"
#include "logLine.h" #include "logLine.h"
class View; class View;
@ -96,13 +96,13 @@ class LogLineList {
void updateOldestLine(); void updateOldestLine();
QPtrList<LogLine> list; TQPtrList<LogLine> list;
QPtrList<LogLine> addedList; TQPtrList<LogLine> addedList;
QPtrList<LogLine> removedList; TQPtrList<LogLine> removedList;
QPtrList<LogLine> recentList; TQPtrList<LogLine> recentList;
LogLine* oldestLogLine; LogLine* oldestLogLine;

@ -43,7 +43,7 @@ LogLineTree::~LogLineTree() {
void LogLineTree::synchronizeRemovedLines(View* view) { void LogLineTree::synchronizeRemovedLines(View* view) {
QPtrListIterator<LogLine> it(removedList); TQPtrListIterator<LogLine> it(removedList);
LogLine* line=it.current(); LogLine* line=it.current();
@ -73,18 +73,18 @@ LogLine* LogLineTree::synchronizeAddedLines(View* view) {
* This code wasn't able to find Parent Log Lines in the addedList object * This code wasn't able to find Parent Log Lines in the addedList object
*/ */
/* /*
//We first add the new parent items //We first add the new tqparent items
QPtrListIterator<LogLine> it(addedList); TQPtrListIterator<LogLine> it(addedList);
LogLine* line=it.current(); LogLine* line=it.current();
kdDebug() << "Inserting " << parents.count() << " parent log item" << endl; kdDebug() << "Inserting " << tqparents.count() << " tqparent log item" << endl;
int i=0; int i=0;
while (line!=NULL) { while (line!=NULL) {
if (line->isParentLogLine()==true) { if (line->isParentLogLine()==true) {
ParentLogLine* parent=(ParentLogLine*) (line); ParentLogLine* tqparent=(ParentLogLine*) (line);
parent->insertItem(view->getLogList()); tqparent->insertItem(view->getLogList());
addedList.remove(it.current()); addedList.remove(it.current());
++i; ++i;
@ -95,18 +95,18 @@ LogLine* LogLineTree::synchronizeAddedLines(View* view) {
line=it.current(); line=it.current();
} }
kdDebug() << "Insertion of " << i << " parent log items" << endl; kdDebug() << "Insertion of " << i << " tqparent log items" << endl;
*/ */
kdDebug() << "Adding parent items to the tree..." << endl; kdDebug() << "Adding tqparent items to the tree..." << endl;
//We first add the new parent items //We first add the new tqparent items
QPtrListIterator<ParentLogLine> it(parents); TQPtrListIterator<ParentLogLine> it(tqparents);
LogLine* line=it.current(); LogLine* line=it.current();
while (line!=NULL) { while (line!=NULL) {
//Even if the parent has already been added, it will automatically be added once time //Even if the tqparent has already been added, it will automatically be added once time
line->insertItem(view->getLogList()); line->insertItem(view->getLogList());
addedList.remove(it.current()); addedList.remove(it.current());
@ -123,35 +123,35 @@ LogLine* LogLineTree::synchronizeAddedLines(View* view) {
bool LogLineTree::remove(LogLine* line) { bool LogLineTree::remove(LogLine* line) {
/** /**
* Parent log line actions : * Parent log line actions :
* - Only remove this line is it does not have any children left * - Only remove this line is it does not have any tqchildren left
*/ */
if (line->isParentLogLine()==true) { if (line->isParentLogLine()==true) {
ParentLogLine* parent=(ParentLogLine*) line; ParentLogLine* tqparent=(ParentLogLine*) line;
if (parent->hasChildren()==false) { if (tqparent->hasChildren()==false) {
parents.remove(parent); tqparents.remove(tqparent);
return(LogLineList::remove(line)); return(LogLineList::remove(line));
} }
} }
/** /**
* Child log line actions : * Child log line actions :
* - First remove the dependency from the parent * - First remove the dependency from the tqparent
* - Remove parent if it does not have child left * - Remove tqparent if it does not have child left
* - Finally remove child * - Finally remove child
*/ */
else if (line->isChildLogLine()==true) { else if (line->isChildLogLine()==true) {
ChildLogLine* child=(ChildLogLine*) line; ChildLogLine* child=(ChildLogLine*) line;
ParentLogLine* parent=child->getParent(); ParentLogLine* tqparent=child->getParent();
parent->removeChild(child); tqparent->removeChild(child);
//Remove parent if it does not have longer children //Remove tqparent if it does not have longer tqchildren
if (parent->hasChildren()==false) { if (tqparent->hasChildren()==false) {
parents.remove(parent); tqparents.remove(tqparent);
LogLineList::remove(parent); LogLineList::remove(tqparent);
} }
//Remove the children //Remove the tqchildren
return(LogLineList::remove(line)); return(LogLineList::remove(line));
} }
@ -163,22 +163,22 @@ bool LogLineTree::remove(LogLine* line) {
void LogLineTree::insert(LogLine* line) { void LogLineTree::insert(LogLine* line) {
QPtrListIterator<ParentLogLine> it(parents); TQPtrListIterator<ParentLogLine> it(tqparents);
ParentLogLine* parent=it.current(); ParentLogLine* tqparent=it.current();
bool insertion=false; bool insertion=false;
while (parent!=NULL) { while (tqparent!=NULL) {
insertion=parent->isChild(line); insertion=tqparent->isChild(line);
if (insertion==true) { if (insertion==true) {
QDate date=line->getTime().date(); TQDate date=line->getTime().date();
QTime time=line->getTime().time(); TQTime time=line->getTime().time();
ChildLogLine* newChild=new ChildLogLine(date, time, line->getItemList(), line->getOriginalFile(), line->getLogLevel(), line->getType()); ChildLogLine* newChild=new ChildLogLine(date, time, line->getItemList(), line->getOriginalFile(), line->getLogLevel(), line->getType());
parent->addChild(newChild); tqparent->addChild(newChild);
newChild->setParent(parent); newChild->setParent(tqparent);
//Insert this child by the classical way //Insert this child by the classical way
LogLineList::insert(newChild); LogLineList::insert(newChild);
@ -189,17 +189,17 @@ void LogLineTree::insert(LogLine* line) {
} }
++it; ++it;
parent=it.current(); tqparent=it.current();
} }
QDate date=line->getTime().date(); TQDate date=line->getTime().date();
QTime time=line->getTime().time(); TQTime time=line->getTime().time();
ParentLogLine* newParent=new ParentLogLine(date, time, line->getItemList(), line->getOriginalFile(), line->getLogLevel(), line->getType(), this->groupBy, this->groupByColumn, this->columns); ParentLogLine* newParent=new ParentLogLine(date, time, line->getItemList(), line->getOriginalFile(), line->getLogLevel(), line->getType(), this->groupBy, this->groupByColumn, this->columns);
//Insert this parent by the classical way //Insert this tqparent by the classical way
LogLineList::insert(newParent); LogLineList::insert(newParent);
parents.append(newParent); tqparents.append(newParent);
ChildLogLine* newChild=new ChildLogLine(date, time, line->getItemList(), line->getOriginalFile(), line->getLogLevel(), line->getType()); ChildLogLine* newChild=new ChildLogLine(date, time, line->getItemList(), line->getOriginalFile(), line->getLogLevel(), line->getType());
newParent->addChild(newChild); newParent->addChild(newChild);

@ -21,9 +21,9 @@
#ifndef _LOG_LINE_TREE_H_ #ifndef _LOG_LINE_TREE_H_
#define _LOG_LINE_TREE_H_ #define _LOG_LINE_TREE_H_
#include <qobject.h> #include <tqobject.h>
#include <qptrlist.h> #include <tqptrlist.h>
#include <qmap.h> #include <tqmap.h>
#include <kdebug.h> #include <kdebug.h>
@ -49,7 +49,7 @@ class LogLineTree : public LogLineList {
virtual void insert(LogLine* line); virtual void insert(LogLine* line);
protected: protected:
QPtrList<ParentLogLine> parents; TQPtrList<ParentLogLine> tqparents;
groupByType groupBy; groupByType groupBy;
int groupByColumn; int groupByColumn;

@ -18,15 +18,15 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/ ***************************************************************************/
//Qt includes //TQt includes
#include <qstringlist.h> #include <tqstringlist.h>
#include <qdatetime.h> #include <tqdatetime.h>
#include <qobject.h> #include <tqobject.h>
#include <qpainter.h> #include <tqpainter.h>
#include <qpen.h> #include <tqpen.h>
#include <qclipboard.h> #include <tqclipboard.h>
#include <qcolor.h> #include <tqcolor.h>
//KDE includes //KDE includes
#include <klocale.h> #include <klocale.h>
@ -45,15 +45,15 @@
#include "logListItem.h" #include "logListItem.h"
LogListItem::LogListItem(QListView* list, LogLine* l) : LogListItem::LogListItem(TQListView* list, LogLine* l) :
KListViewItem(list), KListViewItem(list),
line(l) line(l)
{ {
} }
LogListItem::LogListItem(QListViewItem* parent, LogLine* l) : LogListItem::LogListItem(TQListViewItem* tqparent, LogLine* l) :
KListViewItem(parent), KListViewItem(tqparent),
line(l) line(l)
{ {
@ -64,11 +64,11 @@ LogListItem::~LogListItem() {
} }
QString LogListItem::getFormattedText() { TQString LogListItem::getFormattedText() {
return(ItemFactory::createFormattedText(line)); return(ItemFactory::createFormattedText(line));
} }
QString LogListItem::getToolTipText() { TQString LogListItem::getToolTipText() {
return(ItemFactory::createToolTipText(line)); return(ItemFactory::createToolTipText(line));
} }
@ -76,7 +76,7 @@ LogLine* LogListItem::getLogLine() {
return(line); return(line);
} }
int LogListItem::compare(QListViewItem* it, int col, bool ascending) const { int LogListItem::compare(TQListViewItem* it, int col, bool ascending) const {
if (col==0) { if (col==0) {
@ -94,19 +94,19 @@ int LogListItem::compare(QListViewItem* it, int col, bool ascending) const {
return(1); return(1);
} }
else { else {
return(QListViewItem::compare(it, col, ascending)); return(TQListViewItem::compare(it, col, ascending));
} }
} }
QDateTime& LogListItem::getTime() { TQDateTime& LogListItem::getTime() {
return(line->getTime()); return(line->getTime());
} }
QString LogListItem::exportToText() { TQString LogListItem::exportToText() {
int columnCount=listView()->columns(); int columnCount=listView()->columns();
QString exporting; TQString exporting;
if (columnCount==0) if (columnCount==0)
return(exporting); return(exporting);
@ -131,7 +131,7 @@ QString LogListItem::exportToText() {
* TODO Retest this method * TODO Retest this method
*/ */
void LogListItem::paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align) { void LogListItem::paintCell(TQPainter* p, const TQColorGroup& cg, int column, int width, int align) {
/* For debugging /* For debugging
KListViewItem::paintCell( p, cg, column, width, align ); KListViewItem::paintCell( p, cg, column, width, align );
return; return;
@ -146,12 +146,12 @@ void LogListItem::paintCell(QPainter* p, const QColorGroup& cg, int column, int
} }
//flicker-free drawing //flicker-free drawing
static QPixmap buffer; static TQPixmap buffer;
buffer.resize(width, height()); buffer.resize(width, height());
//If there is a problem, let KListViewItem class draw this item //If there is a problem, let KListViewItem class draw this item
if( buffer.isNull() ) { if( buffer.isNull() ) {
kdDebug() << "LogListItem::paintCell() : QPixmap null" << endl; kdDebug() << "LogListItem::paintCell() : TQPixmap null" << endl;
KListViewItem::paintCell(p, cg, column, width, align); KListViewItem::paintCell(p, cg, column, width, align);
return; return;
} }
@ -159,7 +159,7 @@ void LogListItem::paintCell(QPainter* p, const QColorGroup& cg, int column, int
//kdDebug() << "LogListItem::paintCell() : Painting the cell" << endl; //kdDebug() << "LogListItem::paintCell() : Painting the cell" << endl;
//Initialize our drawing object //Initialize our drawing object
QPainter pBuf( &buffer, true ); TQPainter pBuf( &buffer, true );
//Use or not an alternate background //Use or not an alternate background
@ -180,12 +180,12 @@ void LogListItem::paintCell(QPainter* p, const QColorGroup& cg, int column, int
pBuf.drawLine(width-1, 0, width-1, height()); pBuf.drawLine(width-1, 0, width-1, height());
//Gets the current font and font metric //Gets the current font and font metric
QFont font(p->font()); TQFont font(p->font());
QFontMetrics fm(p->fontMetrics()); TQFontMetrics fm(p->fontMetrics());
if (line->isParentLogLine()==true && column==0) { if (line->isParentLogLine()==true && column==0) {
//Draw 3 gray lines around the parent item //Draw 3 gray lines around the tqparent item
pBuf.setPen(cg.button()); pBuf.setPen(cg.button());
pBuf.drawLine(0, 0, width, 0); pBuf.drawLine(0, 0, width, 0);
pBuf.drawLine(0, height()-1, width, height()-1); pBuf.drawLine(0, height()-1, width, height()-1);
@ -200,7 +200,7 @@ void LogListItem::paintCell(QPainter* p, const QColorGroup& cg, int column, int
//Draw the item name in bold if it is a recent one //Draw the item name in bold if it is a recent one
if (line->isRecent()==true && column==lv->columns()-1) if (line->isRecent()==true && column==lv->columns()-1)
font.setBold(true); font.setBold(true);
//Draw in italic and bold if it's a parent item //Draw in italic and bold if it's a tqparent item
else if (line->isParentLogLine()==true && column==0) { else if (line->isParentLogLine()==true && column==0) {
font.setItalic(true); font.setItalic(true);
font.setBold(true); font.setBold(true);
@ -211,7 +211,7 @@ void LogListItem::paintCell(QPainter* p, const QColorGroup& cg, int column, int
pBuf.setFont(font); pBuf.setFont(font);
QFontMetrics fmName(font); TQFontMetrics fmName(font);
//Draw the pixmap m_loadingPix //Draw the pixmap m_loadingPix
if (pixmap(column)) { if (pixmap(column)) {
@ -227,7 +227,7 @@ void LogListItem::paintCell(QPainter* p, const QColorGroup& cg, int column, int
text_x=1; text_x=1;
//If this is the first column and also a parent log line //If this is the first column and also a tqparent log line
if (line->isParentLogLine()==true && column==0) { if (line->isParentLogLine()==true && column==0) {
if (KSystemLogConfig::colorizeLogLines() && ((ParentLogLine*)line)->getGroupBy()==GROUP_BY_LOG_LEVEL) if (KSystemLogConfig::colorizeLogLines() && ((ParentLogLine*)line)->getGroupBy()==GROUP_BY_LOG_LEVEL)
pBuf.setPen( isSelected() ? cg.text() : line->getLogLevel()->color); pBuf.setPen( isSelected() ? cg.text() : line->getLogLevel()->color);
@ -243,10 +243,10 @@ void LogListItem::paintCell(QPainter* p, const QColorGroup& cg, int column, int
pBuf.setPen( isSelected() ? cg.highlightedText() : cg.text() ); pBuf.setPen( isSelected() ? cg.highlightedText() : cg.text() );
} }
QString name = text(column); TQString name = text(column);
if( fmName.width(name) + text_x + lv->itemMargin()*2 > width ) { if( fmName.width(name) + text_x + lv->itemMargin()*2 > width ) {
int ellWidth = fmName.width( "..." ); int ellWidth = fmName.width( "..." );
QString text = QString::fromLatin1(""); TQString text = TQString::tqfromLatin1("");
int i = 0; int i = 0;
int len = name.length(); int len = name.length();
while ( i < len && fmName.width( text + name[ i ] ) + ellWidth < width - text_x - lv->itemMargin()*2 ) { while ( i < len && fmName.width( text + name[ i ] ) + ellWidth < width - text_x - lv->itemMargin()*2 ) {
@ -271,7 +271,7 @@ void LogListItem::paintCell(QPainter* p, const QColorGroup& cg, int column, int
bool detailedView = PlaylistBrowser::instance()->viewMode() == PlaylistBrowser::DetailedView; bool detailedView = PlaylistBrowser::instance()->viewMode() == PlaylistBrowser::DetailedView;
//flicker-free drawing //flicker-free drawing
static QPixmap buffer; static TQPixmap buffer;
buffer.resize( width, height() ); buffer.resize( width, height() );
if( buffer.isNull() ) { if( buffer.isNull() ) {
@ -279,7 +279,7 @@ if( buffer.isNull() ) {
return; return;
} }
QPainter pBuf( &buffer, true ); TQPainter pBuf( &buffer, true );
// use alternate background // use alternate background
pBuf.fillRect( buffer.rect(), isSelected() ? cg.highlight() : backgroundColor() ); pBuf.fillRect( buffer.rect(), isSelected() ? cg.highlight() : backgroundColor() );
@ -291,7 +291,7 @@ if( detailedView ) {
KListView *lv = (KListView *)listView(); KListView *lv = (KListView *)listView();
QRect rect( ((lv->treeStepSize()-9) / 2) + 1, (height()-9) / 2, 9, 9 ); TQRect rect( ((lv->treeStepSize()-9) / 2) + 1, (height()-9) / 2, 9, 9 );
if( m_loading && m_loadingPix ) { if( m_loading && m_loadingPix ) {
pBuf.drawPixmap( (lv->treeStepSize() - m_loadingPix->width())/2, pBuf.drawPixmap( (lv->treeStepSize() - m_loadingPix->width())/2,
@ -304,7 +304,7 @@ else if( m_trackCount ) {
pBuf.setPen( cg.mid() ); pBuf.setPen( cg.mid() );
pBuf.drawRect( rect ); pBuf.drawRect( rect );
//fill the rect with base color if the item has alternate color and viceversa //fill the rect with base color if the item has alternate color and viceversa
QColor color = backgroundColor() == lv->alternateBackground() ? cg.base() : lv->alternateBackground(); TQColor color = backgroundColor() == lv->alternateBackground() ? cg.base() : lv->alternateBackground();
pBuf.fillRect( rect.x()+1, rect.y()+1, rect.width()-2, rect.height()-2, color ); pBuf.fillRect( rect.x()+1, rect.y()+1, rect.width()-2, rect.height()-2, color );
// +/- drawing // +/- drawing
pBuf.setPen( cg.text() ); pBuf.setPen( cg.text() );
@ -313,8 +313,8 @@ else if( m_trackCount ) {
pBuf.drawLine( rect.x()+4, rect.y()+2, rect.x()+4, rect.y()+6 ); pBuf.drawLine( rect.x()+4, rect.y()+2, rect.x()+4, rect.y()+6 );
} }
QFont font( p->font() ); TQFont font( p->font() );
QFontMetrics fm( p->fontMetrics() ); TQFontMetrics fm( p->fontMetrics() );
// Use underlined font for "Current Playlist" // Use underlined font for "Current Playlist"
if ( m_url.protocol() == "cur" ) if ( m_url.protocol() == "cur" )
@ -342,12 +342,12 @@ if( m_modified && m_savePix ) {
// draw the playlist name in bold // draw the playlist name in bold
font.setBold( PlaylistBrowser::instance()->viewMode() == PlaylistBrowser::DetailedView ); font.setBold( PlaylistBrowser::instance()->viewMode() == PlaylistBrowser::DetailedView );
pBuf.setFont( font ); pBuf.setFont( font );
QFontMetrics fmName( font ); TQFontMetrics fmName( font );
QString name = text(0); TQString name = text(0);
if( fmName.width( name ) + text_x + lv->itemMargin()*2 > width ) { if( fmName.width( name ) + text_x + lv->itemMargin()*2 > width ) {
int ellWidth = fmName.width( "..." ); int ellWidth = fmName.width( "..." );
QString text = QString::fromLatin1(""); TQString text = TQString::tqfromLatin1("");
int i = 0; int i = 0;
int len = name.length(); int len = name.length();
while ( i < len && fmName.width( text + name[ i ] ) + ellWidth < width - text_x - lv->itemMargin()*2 ) { while ( i < len && fmName.width( text + name[ i ] ) + ellWidth < width - text_x - lv->itemMargin()*2 ) {
@ -360,7 +360,7 @@ if( fmName.width( name ) + text_x + lv->itemMargin()*2 > width ) {
pBuf.drawText( text_x, 0, width, textHeight, AlignVCenter, name ); pBuf.drawText( text_x, 0, width, textHeight, AlignVCenter, name );
if( detailedView ) { if( detailedView ) {
QString info; TQString info;
text_x = lv->treeStepSize() + 3; text_x = lv->treeStepSize() + 3;
font.setBold( false ); font.setBold( false );
@ -375,7 +375,7 @@ if( fmName.width( name ) + text_x + lv->itemMargin()*2 > width ) {
// draw the number of tracks and the total length of the playlist // draw the number of tracks and the total length of the playlist
info += i18n("1 Track", "%n Tracks", m_trackCount); info += i18n("1 Track", "%n Tracks", m_trackCount);
if( m_length ) if( m_length )
info += QString(" - [%2]").arg( MetaBundle::prettyTime( m_length ) ); info += TQString(" - [%2]").tqarg( MetaBundle::prettyTime( m_length ) );
} }
pBuf.drawText( text_x, textHeight, width, fm.lineSpacing(), AlignVCenter, info); pBuf.drawText( text_x, textHeight, width, fm.lineSpacing(), AlignVCenter, info);

@ -20,12 +20,12 @@
#ifndef LOG_LIST_ITEM_H #ifndef LOG_LIST_ITEM_H
#define LOG_LIST_ITEM_H #define LOG_LIST_ITEM_H
#include <qobject.h> #include <tqobject.h>
#include <qstringlist.h> #include <tqstringlist.h>
#include <qfile.h> #include <tqfile.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include <qmap.h> #include <tqmap.h>
#include <qregexp.h> #include <tqregexp.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <kurl.h> #include <kurl.h>
@ -48,24 +48,24 @@ class XorgLogLine;
class LogListItem : public KListViewItem { class LogListItem : public KListViewItem {
public: public:
LogListItem(QListView* list, LogLine* l); LogListItem(TQListView* list, LogLine* l);
LogListItem(QListViewItem* parent, LogLine* l); LogListItem(TQListViewItem* tqparent, LogLine* l);
~LogListItem(); ~LogListItem();
QDateTime& getTime(); TQDateTime& getTime();
virtual int compare(QListViewItem * i, int col, bool ascending) const; virtual int compare(TQListViewItem * i, int col, bool ascending) const;
QString getFormattedText(); TQString getFormattedText();
QString getToolTipText(); TQString getToolTipText();
LogLine* getLogLine(); LogLine* getLogLine();
virtual void paintCell(QPainter* p, const QColorGroup &cg, int column, int width, int align); virtual void paintCell(TQPainter* p, const TQColorGroup &cg, int column, int width, int align);
QString exportToText(); TQString exportToText();
protected: protected:
LogLine* line; LogLine* line;

@ -18,8 +18,8 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/ ***************************************************************************/
//Qt includes //TQt includes
#include <qclipboard.h> #include <tqclipboard.h>
//KDE includes //KDE includes
#include <kpopupmenu.h> #include <kpopupmenu.h>
@ -54,7 +54,7 @@ LogManager::LogManager(KSystemLog* m, LoadingDialog* progress) :
groupByColumn(-1), groupByColumn(-1),
columns(NULL), columns(NULL),
sortOrder(Qt::Ascending), sortOrder(TQt::Ascending),
sortColumn(0), sortColumn(0),
tooltipEnabled(true), tooltipEnabled(true),
@ -65,7 +65,7 @@ LogManager::LogManager(KSystemLog* m, LoadingDialog* progress) :
current(false), current(false),
newLinesSinceLastSelection(0), newLinesSinceLastSelection(0),
lastUpdate(QTime::currentTime()), lastUpdate(TQTime::currentTime()),
logMode(Globals::noMode) { logMode(Globals::noMode) {
@ -73,12 +73,12 @@ LogManager::LogManager(KSystemLog* m, LoadingDialog* progress) :
view=new View(main); view=new View(main);
view->setLogManager(this); view->setLogManager(this);
connect(view, SIGNAL(changeStatusbar(const QString&)), this, SLOT(slotChangeStatusbar(const QString&))); connect(view, TQT_SIGNAL(changeStatusbar(const TQString&)), this, TQT_SLOT(slotChangeStatusbar(const TQString&)));
connect(view, SIGNAL(changeCaption(const QString&)), this, SLOT(slotChangeCaption(const QString&))); connect(view, TQT_SIGNAL(changeCaption(const TQString&)), this, TQT_SLOT(slotChangeCaption(const TQString&)));
connect(view->getLogList(), SIGNAL(doubleClicked(QListViewItem *, const QPoint&, int)), this, SLOT(slotDetails(QListViewItem *, const QPoint&, int))); connect(view->getLogList(), TQT_SIGNAL(doubleClicked(TQListViewItem *, const TQPoint&, int)), this, TQT_SLOT(slotDetails(TQListViewItem *, const TQPoint&, int)));
connect(view->getLogList(), SIGNAL(selectionChanged()), this, SLOT(slotSelectionChanged())); connect(view->getLogList(), TQT_SIGNAL(selectionChanged()), this, TQT_SLOT(slotSelectionChanged()));
connect(view->getLogList(), SIGNAL(rightButtonPressed(QListViewItem*, const QPoint&, int)), this, SLOT(slotOpenContextualMenu(QListViewItem*, const QPoint&, int))); connect(view->getLogList(), TQT_SIGNAL(rightButtonPressed(TQListViewItem*, const TQPoint&, int)), this, TQT_SLOT(slotOpenContextualMenu(TQListViewItem*, const TQPoint&, int)));
} }
@ -168,7 +168,7 @@ void LogManager::openingProgress(int percent) {
//Move this signal to Loading Dialog class //Move this signal to Loading Dialog class
emit GUIUpdated(); emit GUIUpdated();
//((KSystemLog*)( view->parent()))->kapp->processEvents(); //((KSystemLog*)( view->tqparent()))->kapp->processEvents();
} }
@ -176,15 +176,15 @@ void LogManager::toggleFilterBar() {
view->toggleFilterBar(); view->toggleFilterBar();
} }
void LogManager::slotDetails(QListViewItem *, const QPoint &, int) { void LogManager::slotDetails(TQListViewItem *, const TQPoint &, int) {
emit detailsCalled(); emit detailsCalled();
} }
void LogManager::slotChangeCaption(const QString& message) { void LogManager::slotChangeCaption(const TQString& message) {
emit changeCaption(message); emit changeCaption(message);
} }
void LogManager::slotChangeStatusbar(const QString& message) { void LogManager::slotChangeStatusbar(const TQString& message) {
emit changeStatusbar(message); emit changeStatusbar(message);
} }
@ -221,7 +221,7 @@ LogMode* LogManager::getLogMode() {
return(logMode); return(logMode);
} }
QTime& LogManager::getLastUpdate() { TQTime& LogManager::getLastUpdate() {
return(lastUpdate); return(lastUpdate);
} }
@ -234,14 +234,14 @@ void LogManager::slotLogUpdated(int lineCount) {
newLinesSinceLastSelection+=lineCount; newLinesSinceLastSelection+=lineCount;
lastUpdate=QTime::currentTime(); lastUpdate=TQTime::currentTime();
//Emit this signal even if the current LogManager is selected //Emit this signal even if the current LogManager is selected
emit logUpdated(newLinesSinceLastSelection); emit logUpdated(newLinesSinceLastSelection);
//If the user is in this log manager, he does have to see that some new log lines have appeared //If the user is in this log manager, he does have to see that some new log lines have appeared
if (isCurrent()==false) { if (isCurrent()==false) {
QString title(i18n("%1 (%2)").arg(logMode->name).arg(newLinesSinceLastSelection)); TQString title(i18n("%1 (%2)").tqarg(logMode->name).tqarg(newLinesSinceLastSelection));
//This signal is emitted only if the selected tab is not this one //This signal is emitted only if the selected tab is not this one
emit changeTitle(view, title); emit changeTitle(view, title);
@ -252,7 +252,7 @@ void LogManager::slotLogUpdated(int lineCount) {
void LogManager::slotExpandAll() { void LogManager::slotExpandAll() {
//If this LogManager is the currently displayed one //If this LogManager is the currently displayed one
if (isCurrent()) { if (isCurrent()) {
QListViewItem* item=view->getLogList()->firstChild(); TQListViewItem* item=view->getLogList()->firstChild();
while (item!=NULL) { while (item!=NULL) {
item->setOpen(true); item->setOpen(true);
@ -265,7 +265,7 @@ void LogManager::slotExpandAll() {
void LogManager::slotCollapseAll() { void LogManager::slotCollapseAll() {
//If this LogManager is the currently displayed one //If this LogManager is the currently displayed one
if (isCurrent()) { if (isCurrent()) {
QListViewItem* item=view->getLogList()->firstChild(); TQListViewItem* item=view->getLogList()->firstChild();
while (item!=NULL) { while (item!=NULL) {
item->setOpen(false); item->setOpen(false);
@ -277,7 +277,7 @@ void LogManager::slotCollapseAll() {
void LogManager::slotFileSave() { void LogManager::slotFileSave() {
//If this LogManager is the currently displayed one //If this LogManager is the currently displayed one
if (isCurrent()) { if (isCurrent()) {
QListViewItemIterator it(view->getLogList(), QListViewItemIterator::Selected); TQListViewItemIterator it(view->getLogList(), TQListViewItemIterator::Selected);
//No item selected //No item selected
if (it.current()==NULL) { if (it.current()==NULL) {
@ -286,16 +286,16 @@ void LogManager::slotFileSave() {
} }
QString filename = KFileDialog::getSaveFileName(QString::null, QString::null, main); TQString filename = KFileDialog::getSaveFileName(TQString(), TQString(), main);
if (!filename.isEmpty()) { if (!filename.isEmpty()) {
QIODevice* ioDev = KFilterDev::deviceForFile( filename ); TQIODevice* ioDev = KFilterDev::deviceForFile( filename );
if (ioDev->open(IO_WriteOnly)) { if (ioDev->open(IO_WriteOnly)) {
QTextStream stream(ioDev); TQTextStream stream(ioDev);
int nbCopied=0; int nbCopied=0;
QListViewItem* qtItem=it.current(); TQListViewItem* qtItem=it.current();
while (qtItem!=NULL) { while (qtItem!=NULL) {
LogListItem* item=static_cast<LogListItem*> (qtItem); LogListItem* item=static_cast<LogListItem*> (qtItem);
@ -311,10 +311,10 @@ void LogManager::slotFileSave() {
ioDev->close(); ioDev->close();
emit changeStatusbar(i18n("1 log line saved to '%1'.", "%n log lines saved to '%1'.", nbCopied).arg(filename)); emit changeStatusbar(i18n("1 log line saved to '%1'.", "%n log lines saved to '%1'.", nbCopied).tqarg(filename));
} }
else { else {
QString message(i18n("Unable to save file '%1': Permission Denied.").arg(filename)); TQString message(i18n("Unable to save file '%1': Permission Denied.").tqarg(filename));
KMessageBox::error(main, message, i18n("Unable to save file."), KMessageBox::Notify); KMessageBox::error(main, message, i18n("Unable to save file."), KMessageBox::Notify);
} }
@ -342,16 +342,16 @@ void LogManager::initialize(LogMode* mode) {
//Find the reader instance used for this new mode //Find the reader instance used for this new mode
reader=ReaderFactory::createReader(mode); reader=ReaderFactory::createReader(mode);
connect(reader, SIGNAL(statusbarChanged(const QString&)), this, SLOT(slotChangeStatusbar(const QString&))); connect(reader, TQT_SIGNAL(statusbarChanged(const TQString&)), this, TQT_SLOT(slotChangeStatusbar(const TQString&)));
connect(reader, SIGNAL(logUpdated(int)), this, SLOT(slotLogUpdated(int))); connect(reader, TQT_SIGNAL(logUpdated(int)), this, TQT_SLOT(slotLogUpdated(int)));
connect(reader, SIGNAL(openingProgressed(int)), this, SLOT(openingProgress(int))); connect(reader, TQT_SIGNAL(openingProgressed(int)), this, TQT_SLOT(openingProgress(int)));
connect(reader, SIGNAL(readingBegin()), this, SLOT(readingBegun())); connect(reader, TQT_SIGNAL(readingBegin()), this, TQT_SLOT(readingBegun()));
connect(reader, SIGNAL(readingFile(int)), this, SLOT(readingFile(int))); connect(reader, TQT_SIGNAL(readingFile(int)), this, TQT_SLOT(readingFile(int)));
connect(reader, SIGNAL(readingEnd()), this, SLOT(readingEnded())); connect(reader, TQT_SIGNAL(readingEnd()), this, TQT_SLOT(readingEnded()));
//Inform this reader that this LogManager is now its parent //Inform this reader that this LogManager is now its tqparent
reader->setLogManager(this); reader->setLogManager(this);
//Find the log files used for this kind of mode, and set them to our log manager //Find the log files used for this kind of mode, and set them to our log manager
@ -445,15 +445,15 @@ void LogManager::slotSendMail() {
//If this LogManager is the currently displayed one //If this LogManager is the currently displayed one
if (isCurrent()) { if (isCurrent()) {
QString body(i18n("Here are my logs:\n")); TQString body(i18n("Here are my logs:\n"));
body+=i18n("---------------------------------------\n"); body+=i18n("---------------------------------------\n");
QListViewItemIterator it(view->getLogList(), QListViewItemIterator::Selected); TQListViewItemIterator it(view->getLogList(), TQListViewItemIterator::Selected);
int i=0; int i=0;
QListViewItem* qtItem=it.current(); TQListViewItem* qtItem=it.current();
while (qtItem!=NULL) { while (qtItem!=NULL) {
LogListItem* item=static_cast<LogListItem*> (qtItem); LogListItem* item=static_cast<LogListItem*> (qtItem);
@ -473,16 +473,16 @@ void LogManager::slotSendMail() {
} }
/* Parameters list of this method /* Parameters list of this method
const QString & to, const TQString & to,
const QString & cc, const TQString & cc,
const QString & bcc, const TQString & bcc,
const QString & subject, const TQString & subject,
const QString & body, const TQString & body,
const QString & messageFile, const TQString & messageFile,
const QStringList & attachURLs, const TQStringList & attachURLs,
const QCString & startup_id const TQCString & startup_id
*/ */
kapp->invokeMailer("", "", "", i18n("Log Lines of my problem"), body, "", QStringList(), kapp->startupId()); kapp->invokeMailer("", "", "", i18n("Log Lines of my problem"), body, "", TQStringList(), kapp->startupId());
} }
} }
@ -492,15 +492,15 @@ void LogManager::slotCopyToClipboard() {
if (isCurrent()) { if (isCurrent()) {
kdDebug() << "Copy to the clipboard" << endl; kdDebug() << "Copy to the clipboard" << endl;
QListView* listView=view->getLogList(); TQListView* listView=view->getLogList();
QListViewItemIterator it(listView, QListViewItemIterator::Selected); TQListViewItemIterator it(listView, TQListViewItemIterator::Selected);
int nbCopied=0; int nbCopied=0;
LogListItem* item=static_cast<LogListItem*> (it.current()); LogListItem* item=static_cast<LogListItem*> (it.current());
QString text; TQString text;
while (item!=NULL) { while (item!=NULL) {
@ -521,8 +521,8 @@ void LogManager::slotCopyToClipboard() {
} }
else { else {
//Copy both to clipboard and X11-selection //Copy both to clipboard and X11-selection
QApplication::clipboard()->setText(text, QClipboard::Clipboard); TQApplication::tqclipboard()->setText(text, TQClipboard::Clipboard);
QApplication::clipboard()->setText(text, QClipboard::Selection); TQApplication::tqclipboard()->setText(text, TQClipboard::Selection);
emit changeStatusbar(i18n("1 log line copied to clipboard.", "%n log lines copied to clipboard.", nbCopied)); emit changeStatusbar(i18n("1 log line copied to clipboard.", "%n log lines copied to clipboard.", nbCopied));
} }
@ -573,8 +573,8 @@ void LogManager::synchronize(LogLineList* buffer) {
} }
//TODO Change the method name //TODO Change the method name
void LogManager::slotOpenContextualMenu(QListViewItem* /*item*/, const QPoint& pos, int /*other*/) { void LogManager::slotOpenContextualMenu(TQListViewItem* /*item*/, const TQPoint& pos, int /*other*/) {
QPopupMenu menu(main); TQPopupMenu menu(main);
main->actionCollection()->action("reload")->plug(&menu); main->actionCollection()->action("reload")->plug(&menu);
main->actionCollection()->action("select_all")->plug(&menu); main->actionCollection()->action("select_all")->plug(&menu);

@ -20,18 +20,18 @@
#ifndef LOG_MANAGER_H #ifndef LOG_MANAGER_H
#define LOG_MANAGER_H #define LOG_MANAGER_H
//Qt includes //TQt includes
#include <qobject.h> #include <tqobject.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include <qstringlist.h> #include <tqstringlist.h>
#include <qfile.h> #include <tqfile.h>
#include <qdatetime.h> #include <tqdatetime.h>
#include <qlistview.h> #include <tqlistview.h>
#include <qptrlist.h> #include <tqptrlist.h>
#include <qvaluevector.h> #include <tqvaluevector.h>
#include <qvaluelist.h> #include <tqvaluelist.h>
//KDE includes //KDE includes
#include <kurl.h> #include <kurl.h>
@ -51,14 +51,15 @@ class LoadingDialog;
class LogManager; class LogManager;
typedef QPtrList<LogManager> LogManagers; typedef TQPtrList<LogManager> LogManagers;
/** /**
* @author Nicolas Ternisien * @author Nicolas Ternisien
* TODO !!!!!!!!!!!!! Separate OpeningFileName from LogManager !!!!!!!!!!!! * TODO !!!!!!!!!!!!! Separate OpeningFileName from LogManager !!!!!!!!!!!!
*/ */
class LogManager : public QObject { class LogManager : public TQObject {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
@ -73,7 +74,7 @@ class LogManager : public QObject {
groupByType getGroupBy(); groupByType getGroupBy();
int getGroupByColumn(); int getGroupByColumn();
QTime& getLastUpdate(); TQTime& getLastUpdate();
LogMode* getLogMode(); LogMode* getLogMode();
void initialize(LogMode* mode); void initialize(LogMode* mode);
@ -128,7 +129,7 @@ class LogManager : public QObject {
protected slots: protected slots:
//TODO Change the method name //TODO Change the method name
void slotOpenContextualMenu(QListViewItem *item, const QPoint& pos, int value); void slotOpenContextualMenu(TQListViewItem *item, const TQPoint& pos, int value);
//Redirect the openingProgressed signal from Reader to connected object //Redirect the openingProgressed signal from Reader to connected object
void openingProgress(int percent); void openingProgress(int percent);
@ -138,21 +139,21 @@ class LogManager : public QObject {
void slotSelectionChanged(); void slotSelectionChanged();
void slotChangeCaption(const QString& message); void slotChangeCaption(const TQString& message);
void slotChangeStatusbar(const QString& message); void slotChangeStatusbar(const TQString& message);
void slotDetails(QListViewItem *, const QPoint &, int); void slotDetails(TQListViewItem *, const TQPoint &, int);
void readingBegun(); void readingBegun();
void readingFile(int currentFile); void readingFile(int currentFile);
void readingEnded(); void readingEnded();
signals: signals:
void changeTitle(View* view, const QString& label); void changeTitle(View* view, const TQString& label);
void changeTitle(View* view, const QIconSet& icon, const QString& label); void changeTitle(View* view, const TQIconSet& icon, const TQString& label);
void changeCaption(const QString& caption); void changeCaption(const TQString& caption);
void changeStatusbar(const QString& message); void changeStatusbar(const TQString& message);
void detailsCalled(); void detailsCalled();
@ -166,7 +167,7 @@ class LogManager : public QObject {
protected: protected:
KSystemLog* main; KSystemLog* main;
QTime lastUpdate; TQTime lastUpdate;
LogMode* logMode; LogMode* logMode;

@ -23,7 +23,7 @@
#include "logMode.h" #include "logMode.h"
LogMode::LogMode(int id, QString& nm, QString& ic) : LogMode::LogMode(int id, TQString& nm, TQString& ic) :
id(id), id(id),
name(nm), name(nm),
icon(ic), icon(ic),
@ -31,7 +31,7 @@ LogMode::LogMode(int id, QString& nm, QString& ic) :
} }
LogMode::LogMode(int id, QString name, const char* ic) : LogMode::LogMode(int id, TQString name, const char* ic) :
id(id), id(id),
name(name), name(name),
icon(ic), icon(ic),

@ -20,13 +20,13 @@
#ifndef LOG_MODE_H #ifndef LOG_MODE_H
#define LOG_MODE_H #define LOG_MODE_H
#include <qobject.h> #include <tqobject.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include <qstringlist.h> #include <tqstringlist.h>
#include <qfile.h> #include <tqfile.h>
#include <qvaluevector.h> #include <tqvaluevector.h>
#include <qvaluelist.h> #include <tqvaluelist.h>
#include <qptrlist.h> #include <tqptrlist.h>
#include <kurl.h> #include <kurl.h>
@ -35,7 +35,7 @@
class LogMode; class LogMode;
typedef QPtrList<LogMode> LogModes; typedef TQPtrList<LogMode> LogModes;
@ -45,19 +45,19 @@ typedef QPtrList<LogMode> LogModes;
class LogMode { class LogMode {
public: public:
LogMode(int id, QString& name, QString& icon); LogMode(int id, TQString& name, TQString& icon);
LogMode(int id, QString name, const char* icon); LogMode(int id, TQString name, const char* icon);
virtual ~LogMode(); virtual ~LogMode();
int id; int id;
QString name; TQString name;
QString icon; TQString icon;
QPixmap pixmap; TQPixmap pixmap;
}; };

@ -23,13 +23,13 @@
#include "logViewColumn.h" #include "logViewColumn.h"
LogViewColumn::LogViewColumn(QString& name, bool filtred, bool grouped) : LogViewColumn::LogViewColumn(TQString& name, bool filtred, bool grouped) :
columnName(name), columnName(name),
isFiltred(filtred), isFiltred(filtred),
isGrouped(grouped) { isGrouped(grouped) {
} }
LogViewColumn::LogViewColumn(QString name, bool filtred, bool grouped) : LogViewColumn::LogViewColumn(TQString name, bool filtred, bool grouped) :
columnName(name), columnName(name),
isFiltred(filtred), isFiltred(filtred),
isGrouped(grouped) { isGrouped(grouped) {

@ -21,12 +21,12 @@
#ifndef LOG_VIEW_COLUMN_H #ifndef LOG_VIEW_COLUMN_H
#define LOG_VIEW_COLUMN_H #define LOG_VIEW_COLUMN_H
#include <qobject.h> #include <tqobject.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include <qstringlist.h> #include <tqstringlist.h>
#include <qfile.h> #include <tqfile.h>
#include <qvaluevector.h> #include <tqvaluevector.h>
#include <qvaluelist.h> #include <tqvaluelist.h>
#include <kurl.h> #include <kurl.h>
@ -38,12 +38,12 @@
class LogViewColumn { class LogViewColumn {
public: public:
LogViewColumn(QString& name, bool filtred=true, bool grouped=true); LogViewColumn(TQString& name, bool filtred=true, bool grouped=true);
LogViewColumn(QString name, bool filtred=true, bool grouped=true); LogViewColumn(TQString name, bool filtred=true, bool grouped=true);
virtual ~LogViewColumn(); virtual ~LogViewColumn();
QString columnName; TQString columnName;
bool isFiltred; bool isFiltred;
bool isGrouped; bool isGrouped;

@ -21,7 +21,7 @@
#include "logViewColumns.h" #include "logViewColumns.h"
LogViewColumns::LogViewColumns() : LogViewColumns::LogViewColumns() :
QValueVector<LogViewColumn*>(), TQValueVector<LogViewColumn*>(),
groupByLogLevel(true), groupByLogLevel(true),
groupByDay(true), groupByDay(true),
groupByHour(true), groupByHour(true),

@ -20,12 +20,12 @@
#ifndef _LOG_VIEW_COLUMNS_H_ #ifndef _LOG_VIEW_COLUMNS_H_
#define _LOG_VIEW_COLUMNS_H_ #define _LOG_VIEW_COLUMNS_H_
#include <qobject.h> #include <tqobject.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include <qstringlist.h> #include <tqstringlist.h>
#include <qfile.h> #include <tqfile.h>
#include <qvaluevector.h> #include <tqvaluevector.h>
#include <qvaluelist.h> #include <tqvaluelist.h>
#include <kurl.h> #include <kurl.h>
@ -35,7 +35,7 @@
/** /**
* @author Nicolas Ternisien * @author Nicolas Ternisien
*/ */
class LogViewColumns : public QValueVector<LogViewColumn*> { class LogViewColumns : public TQValueVector<LogViewColumn*> {
public: public:
LogViewColumns(); LogViewColumns();

@ -18,10 +18,10 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/ ***************************************************************************/
//Qt includes //TQt includes
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qradiobutton.h> #include <tqradiobutton.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
//KDE includes //KDE includes
#include <klocale.h> #include <klocale.h>
@ -38,26 +38,26 @@
#include "loggerDialog.h" #include "loggerDialog.h"
LoggerDialog::LoggerDialog(QWidget *parent, const char *name) : LoggerDialog::LoggerDialog(TQWidget *tqparent, const char *name) :
LoggerDialogBase(parent, name) { LoggerDialogBase(tqparent, name) {
connect(buttonOK, SIGNAL(clicked()), this, SLOT(sendMessage())); connect(buttonOK, TQT_SIGNAL(clicked()), this, TQT_SLOT(sendMessage()));
connect(tagActivation, SIGNAL(toggled(bool)), this, SLOT(tagActivationChanged(bool))); connect(tagActivation, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(tagActivationChanged(bool)));
connect(fileActivation, SIGNAL(toggled(bool)), this, SLOT(fileActivationChanged(bool))); connect(fileActivation, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(fileActivationChanged(bool)));
connect(messageActivation, SIGNAL(toggled(bool)), this, SLOT(messageActivationChanged(bool))); connect(messageActivation, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(messageActivationChanged(bool)));
connect(file, SIGNAL(textChanged(const QString&)), this, SLOT(textChanged(const QString&))); connect(file, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(textChanged(const TQString&)));
connect(message, SIGNAL(textChanged(const QString&)), this, SLOT(textChanged(const QString&))); connect(message, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(textChanged(const TQString&)));
connect(tag, SIGNAL(textChanged(const QString&)), this, SLOT(textChanged(const QString&))); connect(tag, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(textChanged(const TQString&)));
buildMaps(); buildMaps();
//Fill the priority ComboBox //Fill the priority ComboBox
QValueList<QString> prioKeys(priorities.keys()); TQValueList<TQString> prioKeys(priorities.keys());
QValueList<QString>::Iterator itPriority; TQValueList<TQString>::Iterator itPriority;
for (itPriority=prioKeys.begin(); itPriority!=prioKeys.end(); ++itPriority) { for (itPriority=prioKeys.begin(); itPriority!=prioKeys.end(); ++itPriority) {
priority->insertItem(priorityIcons[*itPriority], *itPriority); priority->insertItem(priorityIcons[*itPriority], *itPriority);
} }
@ -72,9 +72,9 @@ LoggerDialog::LoggerDialog(QWidget *parent, const char *name) :
} }
//Fill the priority ComboBox //Fill the priority ComboBox
QValueList<QString> keys(facilities.keys()); TQValueList<TQString> keys(facilities.keys());
QValueList<QString>::Iterator itFacility; TQValueList<TQString>::Iterator itFacility;
for (itFacility=keys.begin(); itFacility!=keys.end(); ++itFacility) { for (itFacility=keys.begin(); itFacility!=keys.end(); ++itFacility) {
facility->insertItem(*itFacility); facility->insertItem(*itFacility);
} }
@ -136,7 +136,7 @@ void LoggerDialog::buildMaps() {
} }
void LoggerDialog::textChanged(const QString& /*text*/) { void LoggerDialog::textChanged(const TQString& /*text*/) {
if (fileActivation->isChecked() && file->url().isEmpty()) { if (fileActivation->isChecked() && file->url().isEmpty()) {
buttonOK->setEnabled(false); buttonOK->setEnabled(false);
return; return;
@ -192,12 +192,12 @@ void LoggerDialog::sendMessage() {
process << tag->text(); process << tag->text();
} }
QString prioritySelected=priority->currentText(); TQString prioritySelected=priority->currentText();
if (prioritySelected!=Globals::noneLogLevel->name) { if (prioritySelected!=Globals::noneLogLevel->name) {
process << "-p"; process << "-p";
QString p(facilities[facility->currentText()]); TQString p(facilities[facility->currentText()]);
p+="."; p+=".";
p+=priorities[priority->currentText()]; p+=priorities[priority->currentText()];
@ -213,7 +213,7 @@ void LoggerDialog::sendMessage() {
//Else, the user types the content of its message //Else, the user types the content of its message
else { else {
//Remove bad "\n" characters //Remove bad "\n" characters
QString msg=message->text().replace("\n", " "); TQString msg=message->text().tqreplace("\n", " ");
process << msg; process << msg;
} }

@ -22,21 +22,22 @@
#define LOGGER_DIALOG_H #define LOGGER_DIALOG_H
#include <qmap.h> #include <tqmap.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include "loggerDialogBase.h" #include "loggerDialogBase.h"
class LoggerDialog: public LoggerDialogBase { class LoggerDialog: public LoggerDialogBase {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
LoggerDialog(QWidget *parent = 0, const char *name = 0); LoggerDialog(TQWidget *tqparent = 0, const char *name = 0);
protected slots: protected slots:
void sendMessage(); void sendMessage();
void textChanged(const QString&); void textChanged(const TQString&);
void tagActivationChanged(bool activation); void tagActivationChanged(bool activation);
void fileActivationChanged(bool activation); void fileActivationChanged(bool activation);
@ -45,10 +46,10 @@ class LoggerDialog: public LoggerDialogBase {
protected: protected:
void buildMaps(); void buildMaps();
QMap<QString, QString> facilities; TQMap<TQString, TQString> facilities;
QMap<QString, QString> priorities; TQMap<TQString, TQString> priorities;
QMap<QString, QPixmap> priorityIcons; TQMap<TQString, TQPixmap> priorityIcons;
}; };

@ -2,7 +2,7 @@
<class>LoggerDialogBase</class> <class>LoggerDialogBase</class>
<comment>Dialog that allows the user to send a message with the logger command</comment> <comment>Dialog that allows the user to send a message with the logger command</comment>
<author>Nicolas Ternisien</author> <author>Nicolas Ternisien</author>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>loggerDialogBase</cstring> <cstring>loggerDialogBase</cstring>
</property> </property>
@ -33,7 +33,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QButtonGroup"> <widget class="TQButtonGroup">
<property name="name"> <property name="name">
<cstring>buttonGroup1</cstring> <cstring>buttonGroup1</cstring>
</property> </property>
@ -66,7 +66,7 @@
<number>2</number> <number>2</number>
</property> </property>
</widget> </widget>
<widget class="QRadioButton" row="0" column="0"> <widget class="TQRadioButton" row="0" column="0">
<property name="name"> <property name="name">
<cstring>messageActivation</cstring> <cstring>messageActivation</cstring>
</property> </property>
@ -93,7 +93,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
</widget> </widget>
<widget class="QRadioButton" row="1" column="0" rowspan="1" colspan="2"> <widget class="TQRadioButton" row="1" column="0" rowspan="1" colspan="2">
<property name="name"> <property name="name">
<cstring>fileActivation</cstring> <cstring>fileActivation</cstring>
</property> </property>
@ -103,7 +103,7 @@
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QGroupBox"> <widget class="TQGroupBox">
<property name="name"> <property name="name">
<cstring>groupBox1</cstring> <cstring>groupBox1</cstring>
</property> </property>
@ -114,15 +114,15 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget" row="1" column="0"> <widget class="TQLayoutWidget" row="1" column="0">
<property name="name"> <property name="name">
<cstring>layout9_2</cstring> <cstring>tqlayout9_2</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel2_2</cstring> <cstring>textLabel2_2</cstring>
</property> </property>
@ -151,7 +151,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>84</width> <width>84</width>
<height>24</height> <height>24</height>
@ -173,15 +173,15 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QLayoutWidget" row="0" column="0"> <widget class="TQLayoutWidget" row="0" column="0">
<property name="name"> <property name="name">
<cstring>layout9</cstring> <cstring>tqlayout9</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel2</cstring> <cstring>textLabel2</cstring>
</property> </property>
@ -210,7 +210,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>84</width> <width>84</width>
<height>24</height> <height>24</height>
@ -234,7 +234,7 @@
</widget> </widget>
</grid> </grid>
</widget> </widget>
<widget class="QButtonGroup"> <widget class="TQButtonGroup">
<property name="name"> <property name="name">
<cstring>options</cstring> <cstring>options</cstring>
</property> </property>
@ -253,15 +253,15 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget" row="3" column="0"> <widget class="TQLayoutWidget" row="3" column="0">
<property name="name"> <property name="name">
<cstring>layout11</cstring> <cstring>tqlayout11</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>tagActivation</cstring> <cstring>tagActivation</cstring>
</property> </property>
@ -282,7 +282,7 @@
<property name="sizeType"> <property name="sizeType">
<enum>Minimum</enum> <enum>Minimum</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>100</width> <width>100</width>
<height>24</height> <height>24</height>
@ -310,7 +310,7 @@
</widget> </widget>
</hbox> </hbox>
</widget> </widget>
<widget class="QCheckBox" row="4" column="0"> <widget class="TQCheckBox" row="4" column="0">
<property name="name"> <property name="name">
<cstring>useProcessIdentifier</cstring> <cstring>useProcessIdentifier</cstring>
</property> </property>
@ -333,16 +333,16 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>31</width> <width>31</width>
<height>41</height> <height>41</height>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout6</cstring> <cstring>tqlayout6</cstring>
</property> </property>
<hbox> <hbox>
<property name="name"> <property name="name">
@ -374,14 +374,14 @@
<property name="sizeType"> <property name="sizeType">
<enum>Expanding</enum> <enum>Expanding</enum>
</property> </property>
<property name="sizeHint"> <property name="tqsizeHint">
<size> <size>
<width>155</width> <width>155</width>
<height>26</height> <height>26</height>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonOK</cstring> <cstring>buttonOK</cstring>
</property> </property>
@ -401,7 +401,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>buttonCancel</cstring> <cstring>buttonCancel</cstring>
</property> </property>
@ -439,7 +439,7 @@
<tabstop>buttonCancel</tabstop> <tabstop>buttonCancel</tabstop>
<tabstop>loggerManual</tabstop> <tabstop>loggerManual</tabstop>
</tabstops> </tabstops>
<layoutdefaults spacing="6" margin="11"/> <tqlayoutdefaults spacing="6" margin="11"/>
<includehints> <includehints>
<includehint>klineedit.h</includehint> <includehint>klineedit.h</includehint>
<includehint>kurlrequester.h</includehint> <includehint>kurlrequester.h</includehint>

@ -19,8 +19,8 @@
***************************************************************************/ ***************************************************************************/
#include <qlayout.h> #include <tqlayout.h>
#include <qlabel.h> #include <tqlabel.h>
#include <klocale.h> #include <klocale.h>
@ -35,8 +35,8 @@
#include "options.h" #include "options.h"
Options::Options(QWidget* parent, const char *name, bool modal) : Options::Options(TQWidget* tqparent, const char *name, bool modal) :
KDialogBase(IconList, i18n("Configuration"), Ok|Apply|Cancel, Ok, parent, name, modal, true) KDialogBase(IconList, i18n("Configuration"), Ok|Apply|Cancel, Ok, tqparent, name, modal, true)
{ {
this->setMinimumSize(480, 500); this->setMinimumSize(480, 500);
@ -58,8 +58,8 @@ Options::Options(QWidget* parent, const char *name, bool modal) :
disableApplyButton(); disableApplyButton();
connect(this, SIGNAL(applyClicked()), this, SLOT(saveConfig())); connect(this, TQT_SIGNAL(applyClicked()), this, TQT_SLOT(saveConfig()));
connect(this, SIGNAL(okClicked()), this, SLOT(saveConfig())); connect(this, TQT_SIGNAL(okClicked()), this, TQT_SLOT(saveConfig()));
//Really update size of this Configuration Dialog Box //Really update size of this Configuration Dialog Box
@ -86,17 +86,17 @@ void Options::saveConfig() {
} }
void Options::setupGeneralOptions() { void Options::setupGeneralOptions() {
QFrame* frame=addPage(i18n("General"), i18n("General"), DesktopIcon(KSYSTEMLOG_ICON)); TQFrame* frame=addPage(i18n("General"), i18n("General"), DesktopIcon(KSYSTEMLOG_ICON));
QGridLayout* frameLayout=new QGridLayout(frame); TQGridLayout* frameLayout=new TQGridLayout(frame);
frameLayout->setSpacing(0); frameLayout->setSpacing(0);
frameLayout->setMargin(0); frameLayout->setMargin(0);
frameLayout->setAutoAdd(true); frameLayout->setAutoAdd(true);
QScrollView* container = new QScrollView(frame); TQScrollView* container = new TQScrollView(frame);
container->setResizePolicy(QScrollView::AutoOneFit); container->setResizePolicy(TQScrollView::AutoOneFit);
container->setFrameShadow(QScrollView::Plain); container->setFrameShadow(TQScrollView::Plain);
container->setFrameShape(QScrollView::MenuBarPanel); container->setFrameShape(TQScrollView::MenuBarPanel);
container->setLineWidth(0); container->setLineWidth(0);
container->setMidLineWidth(0); container->setMidLineWidth(0);
@ -106,54 +106,54 @@ void Options::setupGeneralOptions() {
//Done by the setAutoAdd method //Done by the setAutoAdd method
//frameLayout->addWidget(container, 0, 0, 0); //frameLayout->addWidget(container, 0, 0, 0);
connect(generalOptions, SIGNAL(optionsChanged(bool)), this, SLOT(optionsChanged(bool))); connect(generalOptions, TQT_SIGNAL(optionsChanged(bool)), this, TQT_SLOT(optionsChanged(bool)));
connect(this, SIGNAL(applyClicked()), generalOptions, SLOT(saveConfig())); connect(this, TQT_SIGNAL(applyClicked()), generalOptions, TQT_SLOT(saveConfig()));
connect(this, SIGNAL(okClicked()), generalOptions, SLOT(saveConfig())); connect(this, TQT_SIGNAL(okClicked()), generalOptions, TQT_SLOT(saveConfig()));
} }
void Options::setupBootAuthenticationOptions() { void Options::setupBootAuthenticationOptions() {
QFrame* frame=addPage(i18n("Boot / Authentication"), i18n("Boot & Authentication Logs"), DesktopIcon(BOOT_MODE_ICON)); TQFrame* frame=addPage(i18n("Boot / Authentication"), i18n("Boot & Authentication Logs"), DesktopIcon(BOOT_MODE_ICON));
QGridLayout* frameLayout=new QGridLayout(frame); TQGridLayout* frameLayout=new TQGridLayout(frame);
frameLayout->setSpacing(0); frameLayout->setSpacing(0);
frameLayout->setMargin(0); frameLayout->setMargin(0);
frameLayout->setAutoAdd(true); frameLayout->setAutoAdd(true);
QScrollView* container = new QScrollView(frame); TQScrollView* container = new TQScrollView(frame);
container->setResizePolicy(QScrollView::AutoOneFit); container->setResizePolicy(TQScrollView::AutoOneFit);
container->setFrameShadow(QScrollView::Plain); container->setFrameShadow(TQScrollView::Plain);
container->setFrameShape(QScrollView::MenuBarPanel); container->setFrameShape(TQScrollView::MenuBarPanel);
container->setLineWidth(0); container->setLineWidth(0);
container->setMidLineWidth(0); container->setMidLineWidth(0);
bootAuthenticationOptions = new BootAuthenticationOptions(container->viewport()); bootAuthenticationOptions = new BootAuthenticationOptions(container->viewport());
container->addChild(bootAuthenticationOptions, 0, 0); container->addChild(bootAuthenticationOptions, 0, 0);
connect(bootAuthenticationOptions, SIGNAL(optionsChanged(bool)), this, SLOT(optionsChanged(bool))); connect(bootAuthenticationOptions, TQT_SIGNAL(optionsChanged(bool)), this, TQT_SLOT(optionsChanged(bool)));
connect(this, SIGNAL(applyClicked()), bootAuthenticationOptions, SLOT(saveConfig())); connect(this, TQT_SIGNAL(applyClicked()), bootAuthenticationOptions, TQT_SLOT(saveConfig()));
connect(this, SIGNAL(okClicked()), bootAuthenticationOptions, SLOT(saveConfig())); connect(this, TQT_SIGNAL(okClicked()), bootAuthenticationOptions, TQT_SLOT(saveConfig()));
} }
void Options::setupSystemOptions() { void Options::setupSystemOptions() {
QFrame* frame=addPage(i18n("System Log"), i18n("System Log"), DesktopIcon(SYSTEM_MODE_ICON)); TQFrame* frame=addPage(i18n("System Log"), i18n("System Log"), DesktopIcon(SYSTEM_MODE_ICON));
QGridLayout* frameLayout=new QGridLayout(frame); TQGridLayout* frameLayout=new TQGridLayout(frame);
frameLayout->setSpacing(0); frameLayout->setSpacing(0);
frameLayout->setMargin(0); frameLayout->setMargin(0);
frameLayout->setAutoAdd(true); frameLayout->setAutoAdd(true);
QScrollView* container=new QScrollView(frame); TQScrollView* container=new TQScrollView(frame);
container->setResizePolicy(QScrollView::AutoOneFit); container->setResizePolicy(TQScrollView::AutoOneFit);
container->setFrameShadow(QScrollView::Plain); container->setFrameShadow(TQScrollView::Plain);
container->setFrameShape(QScrollView::MenuBarPanel); container->setFrameShape(TQScrollView::MenuBarPanel);
container->setLineWidth(0); container->setLineWidth(0);
container->setMidLineWidth(0); container->setMidLineWidth(0);
@ -163,24 +163,24 @@ void Options::setupSystemOptions() {
//Done by the setAutoAdd method //Done by the setAutoAdd method
//frameLayout->addWidget(container, 0, 0, 0); //frameLayout->addWidget(container, 0, 0, 0);
connect(systemOptions, SIGNAL(optionsChanged(bool)), this, SLOT(optionsChanged(bool))); connect(systemOptions, TQT_SIGNAL(optionsChanged(bool)), this, TQT_SLOT(optionsChanged(bool)));
connect(this, SIGNAL(applyClicked()), systemOptions, SLOT(saveConfig())); connect(this, TQT_SIGNAL(applyClicked()), systemOptions, TQT_SLOT(saveConfig()));
connect(this, SIGNAL(okClicked()), systemOptions, SLOT(saveConfig())); connect(this, TQT_SIGNAL(okClicked()), systemOptions, TQT_SLOT(saveConfig()));
} }
void Options::setupKernelOptions() { void Options::setupKernelOptions() {
QFrame* frame=addPage(i18n("Kernel Log"), i18n("Kernel Log"), DesktopIcon(KERNEL_MODE_ICON)); TQFrame* frame=addPage(i18n("Kernel Log"), i18n("Kernel Log"), DesktopIcon(KERNEL_MODE_ICON));
QGridLayout* frameLayout=new QGridLayout(frame); TQGridLayout* frameLayout=new TQGridLayout(frame);
frameLayout->setSpacing(0); frameLayout->setSpacing(0);
frameLayout->setMargin(0); frameLayout->setMargin(0);
frameLayout->setAutoAdd(true); frameLayout->setAutoAdd(true);
QScrollView* container=new QScrollView(frame); TQScrollView* container=new TQScrollView(frame);
container->setResizePolicy(QScrollView::AutoOneFit); container->setResizePolicy(TQScrollView::AutoOneFit);
container->setFrameShadow(QScrollView::Plain); container->setFrameShadow(TQScrollView::Plain);
container->setFrameShape(QScrollView::MenuBarPanel); container->setFrameShape(TQScrollView::MenuBarPanel);
container->setLineWidth(0); container->setLineWidth(0);
container->setMidLineWidth(0); container->setMidLineWidth(0);
@ -190,24 +190,24 @@ void Options::setupKernelOptions() {
//Done by the setAutoAdd method //Done by the setAutoAdd method
//frameLayout->addWidget(container, 0, 0, 0); //frameLayout->addWidget(container, 0, 0, 0);
connect(kernelOptions, SIGNAL(optionsChanged(bool)), this, SLOT(optionsChanged(bool))); connect(kernelOptions, TQT_SIGNAL(optionsChanged(bool)), this, TQT_SLOT(optionsChanged(bool)));
connect(this, SIGNAL(applyClicked()), kernelOptions, SLOT(saveConfig())); connect(this, TQT_SIGNAL(applyClicked()), kernelOptions, TQT_SLOT(saveConfig()));
connect(this, SIGNAL(okClicked()), kernelOptions, SLOT(saveConfig())); connect(this, TQT_SIGNAL(okClicked()), kernelOptions, TQT_SLOT(saveConfig()));
} }
void Options::setupCronOptions() { void Options::setupCronOptions() {
QFrame* frame=addPage(i18n("Cron Log"), i18n("Cron Log"), DesktopIcon(CRON_MODE_ICON)); TQFrame* frame=addPage(i18n("Cron Log"), i18n("Cron Log"), DesktopIcon(CRON_MODE_ICON));
QGridLayout* frameLayout=new QGridLayout(frame); TQGridLayout* frameLayout=new TQGridLayout(frame);
frameLayout->setSpacing(0); frameLayout->setSpacing(0);
frameLayout->setMargin(0); frameLayout->setMargin(0);
frameLayout->setAutoAdd(true); frameLayout->setAutoAdd(true);
QScrollView* container=new QScrollView(frame); TQScrollView* container=new TQScrollView(frame);
container->setResizePolicy(QScrollView::AutoOneFit); container->setResizePolicy(TQScrollView::AutoOneFit);
container->setFrameShadow(QScrollView::Plain); container->setFrameShadow(TQScrollView::Plain);
container->setFrameShape(QScrollView::MenuBarPanel); container->setFrameShape(TQScrollView::MenuBarPanel);
container->setLineWidth(0); container->setLineWidth(0);
container->setMidLineWidth(0); container->setMidLineWidth(0);
@ -217,24 +217,24 @@ void Options::setupCronOptions() {
//Done by the setAutoAdd method //Done by the setAutoAdd method
//frameLayout->addWidget(container, 0, 0, 0); //frameLayout->addWidget(container, 0, 0, 0);
connect(cronOptions, SIGNAL(optionsChanged(bool)), this, SLOT(optionsChanged(bool))); connect(cronOptions, TQT_SIGNAL(optionsChanged(bool)), this, TQT_SLOT(optionsChanged(bool)));
connect(this, SIGNAL(applyClicked()), cronOptions, SLOT(saveConfig())); connect(this, TQT_SIGNAL(applyClicked()), cronOptions, TQT_SLOT(saveConfig()));
connect(this, SIGNAL(okClicked()), cronOptions, SLOT(saveConfig())); connect(this, TQT_SIGNAL(okClicked()), cronOptions, TQT_SLOT(saveConfig()));
} }
void Options::setupDaemonOptions() { void Options::setupDaemonOptions() {
QFrame* frame=addPage(i18n("Daemons Log"), i18n("Daemons Log"), DesktopIcon(DAEMON_MODE_ICON)); TQFrame* frame=addPage(i18n("Daemons Log"), i18n("Daemons Log"), DesktopIcon(DAEMON_MODE_ICON));
QGridLayout* frameLayout=new QGridLayout(frame); TQGridLayout* frameLayout=new TQGridLayout(frame);
frameLayout->setSpacing(0); frameLayout->setSpacing(0);
frameLayout->setMargin(0); frameLayout->setMargin(0);
frameLayout->setAutoAdd(true); frameLayout->setAutoAdd(true);
QScrollView* container=new QScrollView(frame); TQScrollView* container=new TQScrollView(frame);
container->setResizePolicy(QScrollView::AutoOneFit); container->setResizePolicy(TQScrollView::AutoOneFit);
container->setFrameShadow(QScrollView::Plain); container->setFrameShadow(TQScrollView::Plain);
container->setFrameShape(QScrollView::MenuBarPanel); container->setFrameShape(TQScrollView::MenuBarPanel);
container->setLineWidth(0); container->setLineWidth(0);
container->setMidLineWidth(0); container->setMidLineWidth(0);
@ -244,24 +244,24 @@ void Options::setupDaemonOptions() {
//Done by the setAutoAdd method //Done by the setAutoAdd method
//frameLayout->addWidget(container, 0, 0, 0); //frameLayout->addWidget(container, 0, 0, 0);
connect(daemonOptions, SIGNAL(optionsChanged(bool)), this, SLOT(optionsChanged(bool))); connect(daemonOptions, TQT_SIGNAL(optionsChanged(bool)), this, TQT_SLOT(optionsChanged(bool)));
connect(this, SIGNAL(applyClicked()), daemonOptions, SLOT(saveConfig())); connect(this, TQT_SIGNAL(applyClicked()), daemonOptions, TQT_SLOT(saveConfig()));
connect(this, SIGNAL(okClicked()), daemonOptions, SLOT(saveConfig())); connect(this, TQT_SIGNAL(okClicked()), daemonOptions, TQT_SLOT(saveConfig()));
} }
void Options::setupXorgOptions() { void Options::setupXorgOptions() {
QFrame* frame=addPage(i18n("X.org Log"), i18n("X.org Log"), DesktopIcon(XORG_MODE_ICON)); TQFrame* frame=addPage(i18n("X.org Log"), i18n("X.org Log"), DesktopIcon(XORG_MODE_ICON));
QGridLayout* frameLayout=new QGridLayout(frame); TQGridLayout* frameLayout=new TQGridLayout(frame);
frameLayout->setSpacing(0); frameLayout->setSpacing(0);
frameLayout->setMargin(0); frameLayout->setMargin(0);
frameLayout->setAutoAdd(true); frameLayout->setAutoAdd(true);
QScrollView* container=new QScrollView(frame); TQScrollView* container=new TQScrollView(frame);
container->setResizePolicy(QScrollView::AutoOneFit); container->setResizePolicy(TQScrollView::AutoOneFit);
container->setFrameShadow(QScrollView::Plain); container->setFrameShadow(TQScrollView::Plain);
container->setFrameShape(QScrollView::MenuBarPanel); container->setFrameShape(TQScrollView::MenuBarPanel);
container->setLineWidth(0); container->setLineWidth(0);
container->setMidLineWidth(0); container->setMidLineWidth(0);
@ -271,26 +271,26 @@ void Options::setupXorgOptions() {
//Done by the setAutoAdd method //Done by the setAutoAdd method
//frameLayout->addWidget(container, 0, 0, 0); //frameLayout->addWidget(container, 0, 0, 0);
connect(xorgOptions, SIGNAL(optionsChanged(bool)), this, SLOT(optionsChanged(bool))); connect(xorgOptions, TQT_SIGNAL(optionsChanged(bool)), this, TQT_SLOT(optionsChanged(bool)));
connect(this, SIGNAL(applyClicked()), xorgOptions, SLOT(saveConfig())); connect(this, TQT_SIGNAL(applyClicked()), xorgOptions, TQT_SLOT(saveConfig()));
connect(this, SIGNAL(okClicked()), xorgOptions, SLOT(saveConfig())); connect(this, TQT_SIGNAL(okClicked()), xorgOptions, TQT_SLOT(saveConfig()));
} }
void Options::setupAcpidOptions() { void Options::setupAcpidOptions() {
QFrame* frame=addPage(i18n("ACPI Log"), i18n("ACPI Daemon Log"), DesktopIcon(ACPID_MODE_ICON)); TQFrame* frame=addPage(i18n("ACPI Log"), i18n("ACPI Daemon Log"), DesktopIcon(ACPID_MODE_ICON));
QGridLayout* frameLayout=new QGridLayout(frame); TQGridLayout* frameLayout=new TQGridLayout(frame);
frameLayout->setSpacing(0); frameLayout->setSpacing(0);
frameLayout->setMargin(0); frameLayout->setMargin(0);
frameLayout->setAutoAdd(true); frameLayout->setAutoAdd(true);
QScrollView* container=new QScrollView(frame); TQScrollView* container=new TQScrollView(frame);
container->setResizePolicy(QScrollView::AutoOneFit); container->setResizePolicy(TQScrollView::AutoOneFit);
container->setFrameShadow(QScrollView::Plain); container->setFrameShadow(TQScrollView::Plain);
container->setFrameShape(QScrollView::MenuBarPanel); container->setFrameShape(TQScrollView::MenuBarPanel);
container->setLineWidth(0); container->setLineWidth(0);
container->setMidLineWidth(0); container->setMidLineWidth(0);
@ -300,26 +300,26 @@ void Options::setupAcpidOptions() {
//Done by the setAutoAdd method //Done by the setAutoAdd method
//frameLayout->addWidget(container, 0, 0, 0); //frameLayout->addWidget(container, 0, 0, 0);
connect(acpidOptions, SIGNAL(optionsChanged(bool)), this, SLOT(optionsChanged(bool))); connect(acpidOptions, TQT_SIGNAL(optionsChanged(bool)), this, TQT_SLOT(optionsChanged(bool)));
connect(this, SIGNAL(applyClicked()), acpidOptions, SLOT(saveConfig())); connect(this, TQT_SIGNAL(applyClicked()), acpidOptions, TQT_SLOT(saveConfig()));
connect(this, SIGNAL(okClicked()), acpidOptions, SLOT(saveConfig())); connect(this, TQT_SIGNAL(okClicked()), acpidOptions, TQT_SLOT(saveConfig()));
} }
void Options::setupCupsOptions() { void Options::setupCupsOptions() {
QFrame* frame=addPage(i18n("CUPS Log"), i18n("CUPS & CUPS Web Server Log"), DesktopIcon(CUPS_MODE_ICON)); TQFrame* frame=addPage(i18n("CUPS Log"), i18n("CUPS & CUPS Web Server Log"), DesktopIcon(CUPS_MODE_ICON));
QGridLayout* frameLayout=new QGridLayout(frame); TQGridLayout* frameLayout=new TQGridLayout(frame);
frameLayout->setSpacing(0); frameLayout->setSpacing(0);
frameLayout->setMargin(0); frameLayout->setMargin(0);
frameLayout->setAutoAdd(true); frameLayout->setAutoAdd(true);
QScrollView* container=new QScrollView(frame); TQScrollView* container=new TQScrollView(frame);
container->setResizePolicy(QScrollView::AutoOneFit); container->setResizePolicy(TQScrollView::AutoOneFit);
container->setFrameShadow(QScrollView::Plain); container->setFrameShadow(TQScrollView::Plain);
container->setFrameShape(QScrollView::MenuBarPanel); container->setFrameShape(TQScrollView::MenuBarPanel);
container->setLineWidth(0); container->setLineWidth(0);
container->setMidLineWidth(0); container->setMidLineWidth(0);
@ -329,25 +329,25 @@ void Options::setupCupsOptions() {
//Done by the setAutoAdd method //Done by the setAutoAdd method
//frameLayout->addWidget(container, 0, 0, 0); //frameLayout->addWidget(container, 0, 0, 0);
connect(cupsOptions, SIGNAL(optionsChanged(bool)), this, SLOT(optionsChanged(bool))); connect(cupsOptions, TQT_SIGNAL(optionsChanged(bool)), this, TQT_SLOT(optionsChanged(bool)));
connect(this, SIGNAL(applyClicked()), cupsOptions, SLOT(saveConfig())); connect(this, TQT_SIGNAL(applyClicked()), cupsOptions, TQT_SLOT(saveConfig()));
connect(this, SIGNAL(okClicked()), cupsOptions, SLOT(saveConfig())); connect(this, TQT_SIGNAL(okClicked()), cupsOptions, TQT_SLOT(saveConfig()));
} }
void Options::setupApacheOptions() { void Options::setupApacheOptions() {
QFrame* frame=addPage(i18n("Apache Log"), i18n("Apache and Web Access Logs"), DesktopIcon(APACHE_MODE_ICON)); TQFrame* frame=addPage(i18n("Apache Log"), i18n("Apache and Web Access Logs"), DesktopIcon(APACHE_MODE_ICON));
QGridLayout* frameLayout=new QGridLayout(frame); TQGridLayout* frameLayout=new TQGridLayout(frame);
frameLayout->setSpacing(0); frameLayout->setSpacing(0);
frameLayout->setMargin(0); frameLayout->setMargin(0);
frameLayout->setAutoAdd(true); frameLayout->setAutoAdd(true);
QScrollView* container=new QScrollView(frame); TQScrollView* container=new TQScrollView(frame);
container->setResizePolicy(QScrollView::AutoOneFit); container->setResizePolicy(TQScrollView::AutoOneFit);
container->setFrameShadow(QScrollView::Plain); container->setFrameShadow(TQScrollView::Plain);
container->setFrameShape(QScrollView::MenuBarPanel); container->setFrameShape(TQScrollView::MenuBarPanel);
container->setLineWidth(0); container->setLineWidth(0);
container->setMidLineWidth(0); container->setMidLineWidth(0);
@ -357,26 +357,26 @@ void Options::setupApacheOptions() {
//Done by the setAutoAdd method //Done by the setAutoAdd method
//frameLayout->addWidget(container, 0, 0, 0); //frameLayout->addWidget(container, 0, 0, 0);
connect(apacheOptions, SIGNAL(optionsChanged(bool)), this, SLOT(optionsChanged(bool))); connect(apacheOptions, TQT_SIGNAL(optionsChanged(bool)), this, TQT_SLOT(optionsChanged(bool)));
connect(this, SIGNAL(applyClicked()), apacheOptions, SLOT(saveConfig())); connect(this, TQT_SIGNAL(applyClicked()), apacheOptions, TQT_SLOT(saveConfig()));
connect(this, SIGNAL(okClicked()), apacheOptions, SLOT(saveConfig())); connect(this, TQT_SIGNAL(okClicked()), apacheOptions, TQT_SLOT(saveConfig()));
} }
void Options::setupPostfixOptions() { void Options::setupPostfixOptions() {
QFrame* frame=addPage(i18n("Postfix Log"), i18n("Postfix Log"), DesktopIcon(POSTFIX_MODE_ICON)); TQFrame* frame=addPage(i18n("Postfix Log"), i18n("Postfix Log"), DesktopIcon(POSTFIX_MODE_ICON));
QGridLayout* frameLayout=new QGridLayout(frame); TQGridLayout* frameLayout=new TQGridLayout(frame);
frameLayout->setSpacing(0); frameLayout->setSpacing(0);
frameLayout->setMargin(0); frameLayout->setMargin(0);
frameLayout->setAutoAdd(true); frameLayout->setAutoAdd(true);
QScrollView* container=new QScrollView(frame); TQScrollView* container=new TQScrollView(frame);
container->setResizePolicy(QScrollView::AutoOneFit); container->setResizePolicy(TQScrollView::AutoOneFit);
container->setFrameShadow(QScrollView::Plain); container->setFrameShadow(TQScrollView::Plain);
container->setFrameShape(QScrollView::MenuBarPanel); container->setFrameShape(TQScrollView::MenuBarPanel);
container->setLineWidth(0); container->setLineWidth(0);
container->setMidLineWidth(0); container->setMidLineWidth(0);
@ -386,10 +386,10 @@ void Options::setupPostfixOptions() {
//Done by the setAutoAdd method //Done by the setAutoAdd method
//frameLayout->addWidget(container, 0, 0, 0); //frameLayout->addWidget(container, 0, 0, 0);
connect(postfixOptions, SIGNAL(optionsChanged(bool)), this, SLOT(optionsChanged(bool))); connect(postfixOptions, TQT_SIGNAL(optionsChanged(bool)), this, TQT_SLOT(optionsChanged(bool)));
connect(this, SIGNAL(applyClicked()), postfixOptions, SLOT(saveConfig())); connect(this, TQT_SIGNAL(applyClicked()), postfixOptions, TQT_SLOT(saveConfig()));
connect(this, SIGNAL(okClicked()), postfixOptions, SLOT(saveConfig())); connect(this, TQT_SIGNAL(okClicked()), postfixOptions, TQT_SLOT(saveConfig()));
} }

@ -22,8 +22,8 @@
#ifndef OPTIONS_H #ifndef OPTIONS_H
#define OPTIONS_H #define OPTIONS_H
#include <qframe.h> #include <tqframe.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <kconfig.h> #include <kconfig.h>
#include <kdialogbase.h> #include <kdialogbase.h>
@ -49,9 +49,10 @@
class Options: public KDialogBase { class Options: public KDialogBase {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
Options(QWidget *parent, const char *name, bool modal); Options(TQWidget *tqparent, const char *name, bool modal);
~Options(); ~Options();
public slots: public slots:

@ -23,7 +23,7 @@
#include "parentLogLine.h" #include "parentLogLine.h"
ParentLogLine::ParentLogLine( ParentLogLine::ParentLogLine(
QDate& date, QTime& time, QStringList& list, QString& file, LogLevel* level, int type, TQDate& date, TQTime& time, TQStringList& list, TQString& file, LogLevel* level, int type,
groupByType group, int column, LogViewColumns* cols) : groupByType group, int column, LogViewColumns* cols) :
LogLine(date, time, list, file, level, type), LogLine(date, time, list, file, level, type),
@ -51,7 +51,7 @@ LogViewColumns* ParentLogLine::getColumns() {
} }
void ParentLogLine::addChild(LogLine* child) { void ParentLogLine::addChild(LogLine* child) {
children.append(child); tqchildren.append(child);
} }
bool ParentLogLine::isParentLogLine() { bool ParentLogLine::isParentLogLine() {
@ -75,10 +75,10 @@ bool ParentLogLine::isChild(LogLine* child) {
} }
//Group by Hour //Group by Hour
else if (groupBy==GROUP_BY_HOUR) { else if (groupBy==GROUP_BY_HOUR) {
QTime parentTime=getTime().time(); TQTime tqparentTime=getTime().time();
QTime childTime=child->getTime().time(); TQTime childTime=child->getTime().time();
if (getTime().date()==child->getTime().date() && parentTime.hour()==childTime.hour()) if (getTime().date()==child->getTime().date() && tqparentTime.hour()==childTime.hour())
return(true); return(true);
else else
return(false); return(false);
@ -96,7 +96,7 @@ bool ParentLogLine::isChild(LogLine* child) {
int index=ParentLogLine::getGroupedColumnIndex(columns, getGroupByColumn()); int index=ParentLogLine::getGroupedColumnIndex(columns, getGroupByColumn());
QStringList& list=getItemList(); TQStringList& list=getItemList();
if (index<0 || index>=(int)list.size()) if (index<0 || index>=(int)list.size())
return(false); return(false);
else { else {
@ -153,10 +153,10 @@ int ParentLogLine::getGroupedColumnIndex(LogViewColumns* columns, int column) {
} }
void ParentLogLine::removeChild(LogLine* child) { void ParentLogLine::removeChild(LogLine* child) {
children.remove(child); tqchildren.remove(child);
} }
bool ParentLogLine::hasChildren() { bool ParentLogLine::hasChildren() {
return(children.count()!=0); return(tqchildren.count()!=0);
} }

@ -20,8 +20,8 @@
#ifndef _PARENT_LOG_LINE_H_ #ifndef _PARENT_LOG_LINE_H_
#define _PARENT_LOG_LINE_H_ #define _PARENT_LOG_LINE_H_
//Qt includes //TQt includes
#include <qobject.h> #include <tqobject.h>
//KDE includes //KDE includes
#include <kurl.h> #include <kurl.h>
@ -40,7 +40,7 @@ class ParentLogLine : public LogLine {
public: public:
ParentLogLine( ParentLogLine(
QDate& date, QTime& time, QStringList& list, QString& originalFile, LogLevel* level, int tpe, TQDate& date, TQTime& time, TQStringList& list, TQString& originalFile, LogLevel* level, int tpe,
groupByType group, int column, LogViewColumns* cols groupByType group, int column, LogViewColumns* cols
); );
@ -61,7 +61,7 @@ class ParentLogLine : public LogLine {
static int getGroupedColumnIndex(LogViewColumns* columns, int column); static int getGroupedColumnIndex(LogViewColumns* columns, int column);
protected: protected:
QPtrList<LogLine> children; TQPtrList<LogLine> tqchildren;
groupByType groupBy; groupByType groupBy;
int groupByColumn; int groupByColumn;

@ -22,36 +22,36 @@
#include "parsingHelper.h" #include "parsingHelper.h"
QMap<QString, int> ParsingHelper::mapMonths; TQMap<TQString, int> ParsingHelper::mapMonths;
QMap<QString, QString> ParsingHelper::mapHTTPResponse; TQMap<TQString, TQString> ParsingHelper::mapHTTPResponse;
QDateTime ParsingHelper::parseDateTimeFromHTTP(QString& logLine) { TQDateTime ParsingHelper::parseDateTimeFromHTTP(TQString& logLine) {
//Format example : [22/May/2005:01:50:34 +0200] //Format example : [22/May/2005:01:50:34 +0200]
QString day=logLine.mid(1,2); TQString day=logLine.mid(1,2);
QString month=logLine.mid(4,3); TQString month=logLine.mid(4,3);
QString year=logLine.mid(8,4); TQString year=logLine.mid(8,4);
QDate date(year.toInt(), ParsingHelper::parseMonthNumber(month), day.toInt()); TQDate date(year.toInt(), ParsingHelper::parseMonthNumber(month), day.toInt());
QString hour=logLine.mid(13,2); TQString hour=logLine.mid(13,2);
QString min=logLine.mid(16,2); TQString min=logLine.mid(16,2);
QString sec=logLine.mid(19,2); TQString sec=logLine.mid(19,2);
QTime time(hour.toInt(), min.toInt(), sec.toInt()); TQTime time(hour.toInt(), min.toInt(), sec.toInt());
//QString zone=logLine.mid(22,5); //TQString zone=logLine.mid(22,5);
return(QDateTime(date, time)); return(TQDateTime(date, time));
} }
/** /**
* Improve speed of this method with a static Map in the class * Improve speed of this method with a static Map in the class
*/ */
int ParsingHelper::parseMonthNumber(QString& string) { int ParsingHelper::parseMonthNumber(TQString& string) {
//If this is the first time we call this method, we instanciate the map //If this is the first time we call this method, we instanciate the map
if (ParsingHelper::mapMonths.isEmpty()) { if (ParsingHelper::mapMonths.isEmpty()) {
ParsingHelper::mapMonths["Jan"]=1; ParsingHelper::mapMonths["Jan"]=1;
@ -68,10 +68,10 @@ int ParsingHelper::parseMonthNumber(QString& string) {
ParsingHelper::mapMonths["Dec"]=12; ParsingHelper::mapMonths["Dec"]=12;
} }
QMap<QString, int>::Iterator it; TQMap<TQString, int>::Iterator it;
//Search the month name in the map //Search the month name in the map
it=ParsingHelper::mapMonths.find(string); it=ParsingHelper::mapMonths.tqfind(string);
if (it!=ParsingHelper::mapMonths.end()) if (it!=ParsingHelper::mapMonths.end())
return(*it); return(*it);
@ -80,26 +80,26 @@ int ParsingHelper::parseMonthNumber(QString& string) {
} }
QString ParsingHelper::parseSize(const QString& stringSize) { TQString ParsingHelper::parseSize(const TQString& stringSize) {
long size=stringSize.toLong(); long size=stringSize.toLong();
if (size<1024) if (size<1024)
return(i18n("Size format", "%1 B").arg(size)); return(i18n("Size format", "%1 B").tqarg(size));
else if (size<1024*1024) { else if (size<1024*1024) {
double newSize=size / 1024.; double newSize=size / 1024.;
QString strNewSize; TQString strNewSize;
strNewSize.sprintf("%0.2f", newSize); strNewSize.sprintf("%0.2f", newSize);
return(i18n("Size format", "%1 KB").arg(strNewSize)); return(i18n("Size format", "%1 KB").tqarg(strNewSize));
} }
else { else {
double newSize=size / (1024.*1024.); double newSize=size / (1024.*1024.);
QString strNewSize; TQString strNewSize;
strNewSize.sprintf("%0.2f", newSize); strNewSize.sprintf("%0.2f", newSize);
return(i18n("Size format", "%1 MB").arg(strNewSize)); return(i18n("Size format", "%1 MB").tqarg(strNewSize));
} }
} }
QString ParsingHelper::parseHTTPResponse(const QString& response) { TQString ParsingHelper::parseHTTPResponse(const TQString& response) {
if (ParsingHelper::mapHTTPResponse.isEmpty()) { if (ParsingHelper::mapHTTPResponse.isEmpty()) {
//1xx Responses //1xx Responses
mapHTTPResponse["100"]="Continue"; mapHTTPResponse["100"]="Continue";
@ -154,15 +154,15 @@ QString ParsingHelper::parseHTTPResponse(const QString& response) {
} }
//Search the response string in the map //Search the response string in the map
QMap<QString, QString>::Iterator it=ParsingHelper::mapHTTPResponse.find(response); TQMap<TQString, TQString>::Iterator it=ParsingHelper::mapHTTPResponse.tqfind(response);
if (it!=ParsingHelper::mapHTTPResponse.end()) if (it!=ParsingHelper::mapHTTPResponse.end())
return(QString("%1 %2").arg(response).arg(*it)); return(TQString("%1 %2").tqarg(response).tqarg(*it));
else else
return(response); return(response);
} }
QString ParsingHelper::parseAgent(const QString& agent) { TQString ParsingHelper::parseAgent(const TQString& agent) {
return(agent); return(agent);
} }

@ -21,11 +21,11 @@
#ifndef _PARSING_HELPER_H_ #ifndef _PARSING_HELPER_H_
#define _PARSING_HELPER_H_ #define _PARSING_HELPER_H_
#include <qobject.h> #include <tqobject.h>
#include <qstringlist.h> #include <tqstringlist.h>
#include <qfile.h> #include <tqfile.h>
#include <qmap.h> #include <tqmap.h>
#include <qpair.h> #include <tqpair.h>
#include <kdirwatch.h> #include <kdirwatch.h>
#include <kurl.h> #include <kurl.h>
@ -49,17 +49,17 @@ class ParsingHelper {
public: public:
/** /**
* Returns the months number represented by the 3 first letters in the QString parameter * Returns the months number represented by the 3 first letters in the TQString parameter
*/ */
static int parseMonthNumber(QString& month); static int parseMonthNumber(TQString& month);
static QDateTime parseDateTimeFromHTTP(QString& logLine); static TQDateTime parseDateTimeFromHTTP(TQString& logLine);
static QString parseSize(const QString& size); static TQString parseSize(const TQString& size);
static QString parseHTTPResponse(const QString& response); static TQString parseHTTPResponse(const TQString& response);
static QString parseAgent(const QString& agent); static TQString parseAgent(const TQString& agent);
@ -68,12 +68,12 @@ class ParsingHelper {
/** /**
* Map used by the static parseMonthNumber() method * Map used by the static parseMonthNumber() method
*/ */
static QMap<QString, int> mapMonths; static TQMap<TQString, int> mapMonths;
/** /**
* Map used by the static parseMonthNumber() method * Map used by the static parseMonthNumber() method
*/ */
static QMap<QString, QString> mapHTTPResponse; static TQMap<TQString, TQString> mapHTTPResponse;
}; };
#endif #endif

@ -18,14 +18,14 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/ ***************************************************************************/
//Qt includes //TQt includes
#include <qlayout.h> #include <tqlayout.h>
#include <qvgroupbox.h> #include <tqvgroupbox.h>
#include <qbuttongroup.h> #include <tqbuttongroup.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qvbox.h> #include <tqvbox.h>
#include <qhbox.h> #include <tqhbox.h>
//KDE includes //KDE includes
#include <klocale.h> #include <klocale.h>
@ -43,17 +43,17 @@
#include "postfixOptions.h" #include "postfixOptions.h"
#include "ksystemlogConfig.h" #include "ksystemlogConfig.h"
PostfixOptions::PostfixOptions(QWidget *parent) : PostfixOptions::PostfixOptions(TQWidget *tqparent) :
QWidget(parent) TQWidget(tqparent)
{ {
QHBoxLayout *layout = new QHBoxLayout(this); TQHBoxLayout *tqlayout = new TQHBoxLayout(this);
layout->setAutoAdd(true); tqlayout->setAutoAdd(true);
QString description= i18n("<qt><p>These files will be analyzed to display <b>Postfix Logs</b>. This list also determine the order in which the files are read.</p></qt>"); TQString description= i18n("<qt><p>These files will be analyzed to display <b>Postfix Logs</b>. This list also determine the order in which the files are read.</p></qt>");
fileList=new SpecificFileList(this, description); fileList=new SpecificFileList(this, description);
connect(fileList, SIGNAL(fileListChanged(int)), this, SLOT(slotFileListChanged(int))); connect(fileList, TQT_SIGNAL(fileListChanged(int)), this, TQT_SLOT(slotFileListChanged(int)));
readConfig(); readConfig();
@ -81,8 +81,8 @@ void PostfixOptions::slotFileListChanged(int itemLeft) {
void PostfixOptions::saveConfig() { void PostfixOptions::saveConfig() {
kdDebug() << "Saving config from Daemon Options..." << endl; kdDebug() << "Saving config from Daemon Options..." << endl;
QStringList stringList; TQStringList stringList;
QValueList<int> valueList; TQValueList<int> valueList;
fileList->saveConfig(stringList, valueList); fileList->saveConfig(stringList, valueList);
@ -91,8 +91,8 @@ void PostfixOptions::saveConfig() {
} }
void PostfixOptions::readConfig() { void PostfixOptions::readConfig() {
QStringList stringList=KSystemLogConfig::postfixPaths(); TQStringList stringList=KSystemLogConfig::postfixPaths();
QValueList<int> valueList=KSystemLogConfig::postfixLevels(); TQValueList<int> valueList=KSystemLogConfig::postfixLevels();
fileList->readConfig(stringList, valueList); fileList->readConfig(stringList, valueList);
} }

@ -21,8 +21,8 @@
#ifndef _POSTFIX_OPTIONS_H_ #ifndef _POSTFIX_OPTIONS_H_
#define _POSTFIX_OPTIONS_H_ #define _POSTFIX_OPTIONS_H_
#include <qframe.h> #include <tqframe.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <kpopupmenu.h> #include <kpopupmenu.h>
#include <kconfig.h> #include <kconfig.h>
@ -35,10 +35,11 @@
#include "specificFileList.h" #include "specificFileList.h"
#include "logLevel.h" #include "logLevel.h"
class PostfixOptions : public QWidget { class PostfixOptions : public TQWidget {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
PostfixOptions(QWidget *parent = 0); PostfixOptions(TQWidget *tqparent = 0);
~PostfixOptions(); ~PostfixOptions();
bool isValid(); bool isValid();

@ -22,21 +22,21 @@
#include "view.h" #include "view.h"
#include <qpixmap.h> #include <tqpixmap.h>
#include <klocale.h> #include <klocale.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include <kdebug.h> #include <kdebug.h>
Reader::Reader(QObject *parent, const char *name) : Reader::Reader(TQObject *tqparent, const char *name) :
QObject(parent, name), TQObject(tqparent, name),
logManager(NULL) logManager(NULL)
{ {
watch=new KDirWatch(); watch=new KDirWatch();
kdDebug() << watch->internalMethod() << endl; kdDebug() << watch->internalMethod() << endl;
connect(watch, SIGNAL(dirty(const QString&)), this, SLOT(logChanged(const QString&))); connect(watch, TQT_SIGNAL(dirty(const TQString&)), this, TQT_SLOT(logChanged(const TQString&)));
} }
Reader::~Reader() { Reader::~Reader() {
@ -98,7 +98,7 @@ void Reader::relaunchLogChanged() {
} }
void Reader::logChanged(const QString& name) { void Reader::logChanged(const TQString& name) {
if (!logManager->isParsingPaused()) { if (!logManager->isParsingPaused()) {
LogFiles& files=logManager->getLogFiles(); LogFiles& files=logManager->getLogFiles();
LogFiles::iterator it; LogFiles::iterator it;
@ -114,13 +114,13 @@ void Reader::logChanged(const QString& name) {
} }
void Reader::closeFile(QFile* file) { void Reader::closeFile(TQFile* file) {
file->close(); file->close();
delete file; delete file;
} }
QFile* Reader::openFile(QString name) { TQFile* Reader::openFile(TQString name) {
QString message; TQString message;
KURL testURL(name); KURL testURL(name);
@ -131,13 +131,13 @@ QFile* Reader::openFile(QString name) {
return(NULL); return(NULL);
} }
QString path=testURL.path(); TQString path=testURL.path();
QFile* file=new QFile(path); TQFile* file=new TQFile(path);
//If the file does not exist //If the file does not exist
if(! file->exists()) { if(! file->exists()) {
message=i18n("The file '%1' does not exist.").arg(name); message=i18n("The file '%1' does not exist.").tqarg(name);
KMessageBox::error(logManager->getView(), message, i18n("The File Does Not Exist"), KMessageBox::Notify); KMessageBox::error(logManager->getView(), message, i18n("The File Does Not Exist"), KMessageBox::Notify);
emit statusbarChanged(message); emit statusbarChanged(message);
return(NULL); return(NULL);
@ -146,7 +146,7 @@ QFile* Reader::openFile(QString name) {
//If we can open the file //If we can open the file
if( !file->open( IO_ReadOnly ) ) { if( !file->open( IO_ReadOnly ) ) {
//It could not be opened //It could not be opened
message=i18n("You do not have sufficient permissions to read '%1'.").arg(name); message=i18n("You do not have sufficient permissions to read '%1'.").tqarg(name);
KMessageBox::error(logManager->getView(), message, i18n("Insufficient Permissions"), KMessageBox::Notify); KMessageBox::error(logManager->getView(), message, i18n("Insufficient Permissions"), KMessageBox::Notify);
emit statusbarChanged(message); emit statusbarChanged(message);
return(NULL); return(NULL);

@ -21,11 +21,11 @@
#ifndef _READER_H_ #ifndef _READER_H_
#define _READER_H_ #define _READER_H_
#include <qobject.h> #include <tqobject.h>
#include <qstringlist.h> #include <tqstringlist.h>
#include <qfile.h> #include <tqfile.h>
#include <qmap.h> #include <tqmap.h>
#include <qpair.h> #include <tqpair.h>
#include <kdirwatch.h> #include <kdirwatch.h>
#include <kurl.h> #include <kurl.h>
@ -46,12 +46,13 @@ class View;
/** /**
* @author Nicolas Ternisien * @author Nicolas Ternisien
*/ */
class Reader : public QObject { class Reader : public TQObject {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
Reader(QObject* parent=NULL, const char* name=NULL); Reader(TQObject* tqparent=NULL, const char* name=NULL);
~Reader(); ~Reader();
@ -69,14 +70,14 @@ class Reader : public QObject {
protected: protected:
QFile* openFile(QString name); TQFile* openFile(TQString name);
void closeFile(QFile* file); void closeFile(TQFile* file);
public slots: public slots:
void logChanged(const QString&); void logChanged(const TQString&);
signals: signals:
void statusbarChanged(const QString& message); void statusbarChanged(const TQString& message);
void logUpdated(int lineTotal); void logUpdated(int lineTotal);
void openingProgressed(int percent); void openingProgressed(int percent);

@ -329,13 +329,13 @@ LogFiles* ReaderFactory::createLogFiles(LogMode* logMode) {
LogFile* ReaderFactory::getGenericLogFile(QString& file) { LogFile* ReaderFactory::getGenericLogFile(TQString& file) {
LogLevel* level=Globals::informationLogLevel; LogLevel* level=Globals::informationLogLevel;
KURL url(file); KURL url(file);
if (!url.isValid()) { if (!url.isValid()) {
kdDebug() << i18n("URL '%1' is not valid, skipping this URL.").arg(url.path()) << endl; kdDebug() << i18n("URL '%1' is not valid, skipping this URL.").tqarg(url.path()) << endl;
return(NULL); return(NULL);
} }
@ -343,7 +343,7 @@ LogFile* ReaderFactory::getGenericLogFile(QString& file) {
return(logFile); return(logFile);
} }
LogFiles* ReaderFactory::getGenericLogFiles(QStringList& stringList, QValueList<int>& valueList) { LogFiles* ReaderFactory::getGenericLogFiles(TQStringList& stringList, TQValueList<int>& valueList) {
LogFiles* logFiles=new LogFiles(); LogFiles* logFiles=new LogFiles();
@ -356,8 +356,8 @@ LogFiles* ReaderFactory::getGenericLogFiles(QStringList& stringList, QValueList<
LogLevel* level; LogLevel* level;
QStringList::Iterator itString=stringList.begin(); TQStringList::Iterator itString=stringList.begin();
QValueList<int>::Iterator itInt=valueList.begin(); TQValueList<int>::Iterator itInt=valueList.begin();
while(itString!=stringList.end()) { while(itString!=stringList.end()) {
if (*itInt>=0 && *itInt<(int) Globals::logLevels.count()) if (*itInt>=0 && *itInt<(int) Globals::logLevels.count())
@ -367,7 +367,7 @@ LogFiles* ReaderFactory::getGenericLogFiles(QStringList& stringList, QValueList<
KURL url(*itString); KURL url(*itString);
if (!url.isValid()) { if (!url.isValid()) {
kdDebug() << i18n("URL '%1' is not valid, skipping this URL.").arg(url.path()) << endl; kdDebug() << i18n("URL '%1' is not valid, skipping this URL.").tqarg(url.path()) << endl;
continue; continue;
itString++; itString++;
itInt++; itInt++;
@ -384,7 +384,7 @@ LogFiles* ReaderFactory::getGenericLogFiles(QStringList& stringList, QValueList<
return(logFiles); return(logFiles);
} }
LogFiles* ReaderFactory::getNoModeLogFiles(QStringList& stringList) { LogFiles* ReaderFactory::getNoModeLogFiles(TQStringList& stringList) {
LogFiles* logFiles=new LogFiles(); LogFiles* logFiles=new LogFiles();
@ -393,12 +393,12 @@ LogFiles* ReaderFactory::getNoModeLogFiles(QStringList& stringList) {
//Default level used for No Mode logs //Default level used for No Mode logs
LogLevel* level=Globals::noneLogLevel; LogLevel* level=Globals::noneLogLevel;
QStringList::Iterator it; TQStringList::Iterator it;
for(it=stringList.begin(); it!=stringList.end(); it++) { for(it=stringList.begin(); it!=stringList.end(); it++) {
KURL url(*it); KURL url(*it);
if (!url.isValid()) { if (!url.isValid()) {
kdDebug() << i18n("URL '%1' is not valid, skipping this URL.").arg(url.path()) << endl; kdDebug() << i18n("URL '%1' is not valid, skipping this URL.").tqarg(url.path()) << endl;
continue; continue;
} }
@ -411,79 +411,79 @@ LogFiles* ReaderFactory::getNoModeLogFiles(QStringList& stringList) {
} }
LogFile* ReaderFactory::getBootLogFile() { LogFile* ReaderFactory::getBootLogFile() {
QString file=KSystemLogConfig::bootPath(); TQString file=KSystemLogConfig::bootPath();
return(getGenericLogFile(file)); return(getGenericLogFile(file));
} }
LogFile* ReaderFactory::getAuthenticationLogFile() { LogFile* ReaderFactory::getAuthenticationLogFile() {
QString file=KSystemLogConfig::authenticationPath(); TQString file=KSystemLogConfig::authenticationPath();
return(getGenericLogFile(file)); return(getGenericLogFile(file));
} }
LogFiles* ReaderFactory::getSystemLogFiles() { LogFiles* ReaderFactory::getSystemLogFiles() {
QStringList files=KSystemLogConfig::systemPaths(); TQStringList files=KSystemLogConfig::systemPaths();
QValueList<int> levels=KSystemLogConfig::systemLevels(); TQValueList<int> levels=KSystemLogConfig::systemLevels();
return(ReaderFactory::getGenericLogFiles(files, levels)); return(ReaderFactory::getGenericLogFiles(files, levels));
} }
LogFiles* ReaderFactory::getAcpidLogFiles() { LogFiles* ReaderFactory::getAcpidLogFiles() {
QStringList files=KSystemLogConfig::acpidPaths(); TQStringList files=KSystemLogConfig::acpidPaths();
return(getNoModeLogFiles(files)); return(getNoModeLogFiles(files));
} }
LogFiles* ReaderFactory::getKernelLogFiles() { LogFiles* ReaderFactory::getKernelLogFiles() {
QStringList files=KSystemLogConfig::kernelPaths(); TQStringList files=KSystemLogConfig::kernelPaths();
QValueList<int> levels=KSystemLogConfig::kernelLevels(); TQValueList<int> levels=KSystemLogConfig::kernelLevels();
return(ReaderFactory::getGenericLogFiles(files, levels)); return(ReaderFactory::getGenericLogFiles(files, levels));
} }
LogFiles* ReaderFactory::getDaemonLogFiles() { LogFiles* ReaderFactory::getDaemonLogFiles() {
QStringList files=KSystemLogConfig::daemonPaths(); TQStringList files=KSystemLogConfig::daemonPaths();
QValueList<int> levels=KSystemLogConfig::daemonLevels(); TQValueList<int> levels=KSystemLogConfig::daemonLevels();
return(ReaderFactory::getGenericLogFiles(files, levels)); return(ReaderFactory::getGenericLogFiles(files, levels));
} }
LogFiles* ReaderFactory::getCronLogFiles() { LogFiles* ReaderFactory::getCronLogFiles() {
QStringList files=KSystemLogConfig::cronPaths(); TQStringList files=KSystemLogConfig::cronPaths();
QValueList<int> levels=KSystemLogConfig::cronLevels(); TQValueList<int> levels=KSystemLogConfig::cronLevels();
return(ReaderFactory::getGenericLogFiles(files, levels)); return(ReaderFactory::getGenericLogFiles(files, levels));
} }
LogFiles* ReaderFactory::getXorgLogFiles() { LogFiles* ReaderFactory::getXorgLogFiles() {
QStringList stringList=KSystemLogConfig::xorgPaths(); TQStringList stringList=KSystemLogConfig::xorgPaths();
return(getNoModeLogFiles(stringList)); return(getNoModeLogFiles(stringList));
} }
LogFiles* ReaderFactory::getCupsLogFiles() { LogFiles* ReaderFactory::getCupsLogFiles() {
QStringList stringList=KSystemLogConfig::cupsPaths(); TQStringList stringList=KSystemLogConfig::cupsPaths();
return(getNoModeLogFiles(stringList)); return(getNoModeLogFiles(stringList));
} }
LogFiles* ReaderFactory::getCupsAccessLogFiles() { LogFiles* ReaderFactory::getCupsAccessLogFiles() {
QStringList stringList=KSystemLogConfig::cupsAccessPaths(); TQStringList stringList=KSystemLogConfig::cupsAccessPaths();
return(getNoModeLogFiles(stringList)); return(getNoModeLogFiles(stringList));
} }
LogFiles* ReaderFactory::getApacheLogFiles() { LogFiles* ReaderFactory::getApacheLogFiles() {
QStringList stringList=KSystemLogConfig::apachePaths(); TQStringList stringList=KSystemLogConfig::apachePaths();
return(getNoModeLogFiles(stringList)); return(getNoModeLogFiles(stringList));
} }
LogFiles* ReaderFactory::getApacheAccessLogFiles() { LogFiles* ReaderFactory::getApacheAccessLogFiles() {
QStringList stringList=KSystemLogConfig::apacheAccessPaths(); TQStringList stringList=KSystemLogConfig::apacheAccessPaths();
return(getNoModeLogFiles(stringList)); return(getNoModeLogFiles(stringList));
} }
LogFiles* ReaderFactory::getPostfixLogFiles() { LogFiles* ReaderFactory::getPostfixLogFiles() {
QStringList files=KSystemLogConfig::postfixPaths(); TQStringList files=KSystemLogConfig::postfixPaths();
QValueList<int> levels=KSystemLogConfig::postfixLevels(); TQValueList<int> levels=KSystemLogConfig::postfixLevels();
return(ReaderFactory::getGenericLogFiles(files, levels)); return(ReaderFactory::getGenericLogFiles(files, levels));
} }
LogFiles* ReaderFactory::getSambaLogFiles() { LogFiles* ReaderFactory::getSambaLogFiles() {
QStringList stringList=KSystemLogConfig::sambaPaths(); TQStringList stringList=KSystemLogConfig::sambaPaths();
return(getNoModeLogFiles(stringList)); return(getNoModeLogFiles(stringList));
} }

@ -20,7 +20,7 @@
#ifndef _READER_FACTORY_H_ #ifndef _READER_FACTORY_H_
#define _READER_FACTORY_H_ #define _READER_FACTORY_H_
#include <qobject.h> #include <tqobject.h>
#include "globals.h" #include "globals.h"
#include "reader.h" #include "reader.h"
@ -45,10 +45,10 @@ class ReaderFactory {
static KURL lastOpenedURL; static KURL lastOpenedURL;
private: private:
static LogFiles* getNoModeLogFiles(QStringList& stringList); static LogFiles* getNoModeLogFiles(TQStringList& stringList);
static LogFiles* getGenericLogFiles(QStringList& stringList, QValueList<int>& valueList); static LogFiles* getGenericLogFiles(TQStringList& stringList, TQValueList<int>& valueList);
static LogFile* getGenericLogFile(QString& file); static LogFile* getGenericLogFile(TQString& file);
/** /**

@ -18,14 +18,14 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/ ***************************************************************************/
//Qt includes //TQt includes
#include <qlayout.h> #include <tqlayout.h>
#include <qvgroupbox.h> #include <tqvgroupbox.h>
#include <qbuttongroup.h> #include <tqbuttongroup.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qvbox.h> #include <tqvbox.h>
#include <qhbox.h> #include <tqhbox.h>
//KDE includes //KDE includes
#include <klocale.h> #include <klocale.h>
@ -42,17 +42,17 @@
#include "sambaOptions.h" #include "sambaOptions.h"
#include "ksystemlogConfig.h" #include "ksystemlogConfig.h"
SambaOptions::SambaOptions(QWidget *parent) : SambaOptions::SambaOptions(TQWidget *tqparent) :
QWidget(parent) TQWidget(tqparent)
{ {
QHBoxLayout *layout = new QHBoxLayout(this); TQHBoxLayout *tqlayout = new TQHBoxLayout(this);
layout->setAutoAdd(true); tqlayout->setAutoAdd(true);
QString description= i18n("<qt><p>These files will be analyzed to display <b>Samba log</b>. This list also determines the order in which the files are read.</p></qt>"); TQString description= i18n("<qt><p>These files will be analyzed to display <b>Samba log</b>. This list also determines the order in which the files are read.</p></qt>");
fileList=new FileList(this, description); fileList=new FileList(this, description);
connect(fileList, SIGNAL(fileListChanged(int)), this, SLOT(slotFileListChanged(int))); connect(fileList, TQT_SIGNAL(fileListChanged(int)), this, TQT_SLOT(slotFileListChanged(int)));
readConfig(); readConfig();
@ -80,7 +80,7 @@ void SambaOptions::slotFileListChanged(int itemLeft) {
void SambaOptions::saveConfig() { void SambaOptions::saveConfig() {
kdDebug() << "Save config from SambaOptions" << endl; kdDebug() << "Save config from SambaOptions" << endl;
QStringList list; TQStringList list;
int count=fileList->count(); int count=fileList->count();
@ -92,9 +92,9 @@ void SambaOptions::saveConfig() {
} }
void SambaOptions::readConfig() { void SambaOptions::readConfig() {
QStringList files(KSystemLogConfig::sambaPaths()); TQStringList files(KSystemLogConfig::sambaPaths());
QStringList::iterator it; TQStringList::iterator it;
for(it=files.begin(); it!=files.end(); ++it) { for(it=files.begin(); it!=files.end(); ++it) {
fileList->insertItem(*it); fileList->insertItem(*it);
} }

@ -21,8 +21,8 @@
#ifndef _SAMBA_OPTIONS_H_ #ifndef _SAMBA_OPTIONS_H_
#define _SAMBA_OPTIONS_H_ #define _SAMBA_OPTIONS_H_
#include <qframe.h> #include <tqframe.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <kpopupmenu.h> #include <kpopupmenu.h>
#include <kconfig.h> #include <kconfig.h>
@ -37,10 +37,11 @@
#include "logLevel.h" #include "logLevel.h"
class SambaOptions : public QWidget { class SambaOptions : public TQWidget {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
SambaOptions(QWidget *parent = 0); SambaOptions(TQWidget *tqparent = 0);
~SambaOptions(); ~SambaOptions();
bool isValid(); bool isValid();

@ -24,8 +24,8 @@
#include "parsingHelper.h" #include "parsingHelper.h"
#include "sambaReader.h" #include "sambaReader.h"
SambaReader::SambaReader(QObject *parent, const char *name) : SambaReader::SambaReader(TQObject *tqparent, const char *name) :
DefaultReader(parent, name) DefaultReader(tqparent, name)
{ {
} }
@ -45,7 +45,7 @@ void SambaReader::initColumns(LogViewColumns* columns) {
} }
LogLine* SambaReader::parseMessage(QString& logLine, LogFile* logFile) { LogLine* SambaReader::parseMessage(TQString& logLine, LogFile* logFile) {
/* /*
* Log line examples : * Log line examples :
@ -65,39 +65,39 @@ LogLine* SambaReader::parseMessage(QString& logLine, LogFile* logFile) {
*/ */
//The Date //The Date
int dateBegin=logLine.find("["); int dateBegin=logLine.tqfind("[");
int dateEnd=logLine.find("]"); int dateEnd=logLine.tqfind("]");
QString strDate=logLine.mid(dateBegin+1, dateEnd-dateBegin-1); TQString strDate=logLine.mid(dateBegin+1, dateEnd-dateBegin-1);
QString year=strDate.mid(0, 4); TQString year=strDate.mid(0, 4);
QString month=strDate.mid(5, 2); TQString month=strDate.mid(5, 2);
QString day=strDate.mid(8, 2); TQString day=strDate.mid(8, 2);
QString hour=strDate.mid(11, 2); TQString hour=strDate.mid(11, 2);
QString min=strDate.mid(14, 2); TQString min=strDate.mid(14, 2);
QString sec=strDate.mid(17, 2); TQString sec=strDate.mid(17, 2);
QDate date=QDate(year.toInt(), month.toInt(), day.toInt()); TQDate date=TQDate(year.toInt(), month.toInt(), day.toInt());
QTime time=QTime(hour.toInt(), min.toInt(), sec.toInt()); TQTime time=TQTime(hour.toInt(), min.toInt(), sec.toInt());
logLine=logLine.remove(0, dateEnd+2); logLine=logLine.remove(0, dateEnd+2);
//The source file //The source file
int doubleDot; int doubleDot;
doubleDot=logLine.find(":"); doubleDot=logLine.tqfind(":");
QString file=logLine.left(doubleDot); TQString file=logLine.left(doubleDot);
logLine=logLine.remove(0, doubleDot+1); logLine=logLine.remove(0, doubleDot+1);
//The function //The function
int bracket=logLine.find("("); int bracket=logLine.tqfind("(");
QString function=logLine.left(bracket); TQString function=logLine.left(bracket);
logLine=logLine.remove(0, bracket+1); logLine=logLine.remove(0, bracket+1);
//The line number //The line number
bracket=logLine.find(")"); bracket=logLine.tqfind(")");
QString lineNumber=logLine.left(bracket); TQString lineNumber=logLine.left(bracket);
//Remove the first return character and the two useless space of the first message line //Remove the first return character and the two useless space of the first message line
logLine=logLine.remove(0, bracket+4); logLine=logLine.remove(0, bracket+4);
@ -106,31 +106,31 @@ LogLine* SambaReader::parseMessage(QString& logLine, LogFile* logFile) {
//Remove the last \n //Remove the last \n
logLine=logLine.left(logLine.length()-1); logLine=logLine.left(logLine.length()-1);
//Remove return characters and 2 first spaces at each lines //Remove return characters and 2 first spaces at each lines
QString message=logLine.replace("\n ", " / "); TQString message=logLine.tqreplace("\n ", " / ");
//QString message=logLine.replace("\n", " / "); //TQString message=logLine.tqreplace("\n", " / ");
QStringList list; TQStringList list;
list.push_back(file); list.push_back(file);
list.push_back(function); list.push_back(function);
list.push_back(lineNumber); list.push_back(lineNumber);
list.push_back(message); list.push_back(message);
QString filePath=logFile->url.path(); TQString filePath=logFile->url.path();
LogLine* line=new LogLine(date, time, list, filePath, Globals::informationLogLevel, Globals::sambaMode->id); LogLine* line=new LogLine(date, time, list, filePath, Globals::informationLogLevel, Globals::sambaMode->id);
return(line); return(line);
} }
QStringList* SambaReader::getRawBuffer(QFile* file) { TQStringList* SambaReader::getRawBuffer(TQFile* file) {
kdDebug() << "Retrieving the raw buffer..." << endl; kdDebug() << "Retrieving the raw buffer..." << endl;
QString line; TQString line;
QString buffer; TQString buffer;
QString tmpBuffer; TQString tmpBuffer;
QStringList* rawBuffer=new QStringList(); TQStringList* rawBuffer=new TQStringList();
int res; int res;

@ -21,10 +21,10 @@
#ifndef _SAMBA_READER_H_ #ifndef _SAMBA_READER_H_
#define _SAMBA_READER_H_ #define _SAMBA_READER_H_
#include <qobject.h> #include <tqobject.h>
#include <qstringlist.h> #include <tqstringlist.h>
#include <kurl.h> #include <kurl.h>
#include <qfile.h> #include <tqfile.h>
#include "view.h" #include "view.h"
#include "globals.h" #include "globals.h"
@ -37,9 +37,10 @@
*/ */
class SambaReader : public DefaultReader { class SambaReader : public DefaultReader {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
SambaReader(QObject *parent = 0, const char *name = 0); SambaReader(TQObject *tqparent = 0, const char *name = 0);
virtual ~SambaReader(); virtual ~SambaReader();
@ -47,9 +48,9 @@ class SambaReader : public DefaultReader {
protected: protected:
virtual LogLine* parseMessage(QString& logLine, LogFile* logFile); virtual LogLine* parseMessage(TQString& logLine, LogFile* logFile);
virtual QStringList* getRawBuffer(QFile* file); virtual TQStringList* getRawBuffer(TQFile* file);
}; };

@ -32,27 +32,27 @@
#endif #endif
SlotLogAction::SlotLogAction(KSystemLog* p) : SlotLogAction::SlotLogAction(KSystemLog* p) :
parent(p) { tqparent(p) {
} }
#if defined(KDE_MAKE_VERSION) && (KDE_VERSION >= KDE_MAKE_VERSION(3,4,0)) #if defined(KDE_MAKE_VERSION) && (KDE_VERSION >= KDE_MAKE_VERSION(3,4,0))
void SlotLogAction::slotLogAction(KAction::ActivationReason reason, Qt::ButtonState state) { void SlotLogAction::slotLogAction(KAction::ActivationReason reason, TQt::ButtonState state) {
const QObject* sender=QObject::sender(); const TQObject* sender=TQT_TQOBJECT(const_cast<TQT_BASE_OBJECT_NAME*>(TQObject::sender()));
//We can call the correct method from KSystemLog, which manage the two parameters //We can call the correct method from KSystemLog, which manage the two parameters
parent->logActionClicked(sender, reason, state); tqparent->logActionClicked(sender, reason, state);
} }
#else #else
void SlotLogAction::slotLogAction() { void SlotLogAction::slotLogAction() {
const QObject* sender=QObject::sender(); const TQObject* sender=TQObject::sender();
//In the other case, We can only call the method from KSystemLog, which keeps compatibility //In the other case, We can only call the method from KSystemLog, which keeps compatibility
parent->logActionClicked(sender); tqparent->logActionClicked(sender);
} }
#endif #endif
//Include the right MOC file, depending of the version of KDE //Include the right TQMOC file, depending of the version of KDE
#if defined(KDE_MAKE_VERSION) && (KDE_VERSION >= KDE_MAKE_VERSION(3,4,0)) #if defined(KDE_MAKE_VERSION) && (KDE_VERSION >= KDE_MAKE_VERSION(3,4,0))
#include "slotLogAction.moc" #include "slotLogAction.moc"
#else #else

@ -27,22 +27,23 @@
class KSystemLog; class KSystemLog;
class SlotLogAction : public QObject { class SlotLogAction : public TQObject {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
SlotLogAction(KSystemLog* parent); SlotLogAction(KSystemLog* tqparent);
public slots: public slots:
/** /**
* This header contains the normal version of the main slot * This header contains the normal version of the main slot
*/ */
void slotLogAction(KAction::ActivationReason reason, Qt::ButtonState state); void slotLogAction(KAction::ActivationReason reason, TQt::ButtonState state);
private: private:
KSystemLog* parent; KSystemLog* tqparent;
}; };
#endif #endif

@ -26,12 +26,13 @@
class KSystemLog; class KSystemLog;
class SlotLogAction : public QObject { class SlotLogAction : public TQObject {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
SlotLogAction(KSystemLog* parent); SlotLogAction(KSystemLog* tqparent);
public slots: public slots:
@ -42,7 +43,7 @@ class SlotLogAction : public QObject {
void slotLogAction(); void slotLogAction();
private: private:
KSystemLog* parent; KSystemLog* tqparent;
}; };
#endif #endif

@ -19,12 +19,12 @@
***************************************************************************/ ***************************************************************************/
#include <qlayout.h> #include <tqlayout.h>
#include <qvbox.h> #include <tqvbox.h>
#include <qhbox.h> #include <tqhbox.h>
#include <qtooltip.h> #include <tqtooltip.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qwhatsthis.h> #include <tqwhatsthis.h>
// KDE includes // KDE includes
#include <klocale.h> #include <klocale.h>
@ -40,18 +40,18 @@
#include "specificFileList.h" #include "specificFileList.h"
SpecificFileList::SpecificFileList(QWidget* parent, QString description) : SpecificFileList::SpecificFileList(TQWidget* tqparent, TQString description) :
FileList(parent, description) FileList(tqparent, description)
{ {
changeItem=new QPushButton(SmallIconSet("colorize"), i18n("&Change Status..."), buttons); changeItem=new TQPushButton(SmallIconSet("colorize"), i18n("&Change tqStatus..."), buttons);
connect(changeItem, SIGNAL(clicked()), this, SLOT(changeItemType())); connect(changeItem, TQT_SIGNAL(clicked()), this, TQT_SLOT(changeItemType()));
QToolTip::add(changeItem, i18n("Change the level of the current file(s)")); TQToolTip::add(changeItem, i18n("Change the level of the current file(s)"));
QWhatsThis::add(changeItem, i18n("<qt>Changes the level of the current file(s). See KSystemLog documentation for more information about each log level.</qt>")); TQWhatsThis::add(changeItem, i18n("<qt>Changes the level of the current file(s). See KSystemLog documentation for more information about each log level.</qt>"));
fileListMenu->insertSeparator(); fileListMenu->insertSeparator();
fileListMenu->insertItem(SmallIcon("colorize"), i18n("&Change Status"), this, SLOT(changeItemType())); fileListMenu->insertItem(SmallIcon("colorize"), i18n("&Change tqStatus"), this, TQT_SLOT(changeItemType()));
changeItem->setEnabled(false); changeItem->setEnabled(false);
@ -62,11 +62,11 @@ SpecificFileList::~SpecificFileList() {
} }
void SpecificFileList::insertItem(QString& item) { void SpecificFileList::insertItem(TQString& item) {
this->insertItem(Globals::informationLogLevel, item); this->insertItem(Globals::informationLogLevel, item);
} }
void SpecificFileList::insertItem(LogLevel* level, QString& item) { void SpecificFileList::insertItem(LogLevel* level, TQString& item) {
fileList->insertItem(level->pixmap, item); fileList->insertItem(level->pixmap, item);
levels[fileList->item(fileList->count()-1)]=level->id; levels[fileList->item(fileList->count()-1)]=level->id;
} }
@ -87,7 +87,7 @@ void SpecificFileList::addItem() {
for(it=urlList.begin(); it!=urlList.end(); ++it) { for(it=urlList.begin(); it!=urlList.end(); ++it) {
url=*it; url=*it;
if (isValidFile(url)) { if (isValidFile(url)) {
QString path=url.path(); TQString path=url.path();
this->insertItem(Globals::informationLogLevel, path); this->insertItem(Globals::informationLogLevel, path);
} }
} }
@ -109,20 +109,20 @@ void SpecificFileList::changeItemType() {
KDialogBase dialog(this, "select_type", true, i18n("Selecting File Type"), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok); KDialogBase dialog(this, "select_type", true, i18n("Selecting File Type"), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok);
QVBox topContents(&dialog); TQVBox topContents(&dialog);
topContents.setSpacing(8); topContents.setSpacing(8);
topContents.setMinimumSize(QSize(100, 230)); topContents.setMinimumSize(TQSize(100, 230));
QLabel text(i18n("Please select the type of this file:"), &topContents); TQLabel text(i18n("Please select the type of this file:"), &topContents);
KListBox choiceList(&topContents, "type_list"); KListBox choiceList(&topContents, "type_list");
QToolTip::add(choiceList.viewport(), i18n("List of existing log levels")); TQToolTip::add(choiceList.viewport(), i18n("List of existing log levels"));
QWhatsThis::add(choiceList.viewport(), i18n("<qt>This is the list of all existing log levels. Please select one of them to be used for the selected files of the list.</qt>")); TQWhatsThis::add(choiceList.viewport(), i18n("<qt>This is the list of all existing log levels. Please select one of them to be used for the selected files of the list.</qt>"));
//TODO Move this code to a specific class //TODO Move this code to a specific class
//connect(&choiceList, SIGNAL(doubleClicked(QListBoxItem*)), &dialog, SLOT(okClicked())); //connect(&choiceList, TQT_SIGNAL(doubleClicked(TQListBoxItem*)), &dialog, TQT_SLOT(okClicked()));
QPtrListIterator<LogLevel> itLevel(Globals::logLevels); TQPtrListIterator<LogLevel> itLevel(Globals::logLevels);
LogLevel* level=itLevel.current(); LogLevel* level=itLevel.current();
while (level!=NULL) { while (level!=NULL) {
@ -139,7 +139,7 @@ void SpecificFileList::changeItemType() {
int choice=dialog.exec(); int choice=dialog.exec();
if (choice==QDialog::Accepted) { if (choice==TQDialog::Accepted) {
int count=fileList->count(); int count=fileList->count();
@ -167,7 +167,7 @@ LogLevel* SpecificFileList::getLevel(int i) {
} }
void SpecificFileList::saveConfig(QStringList& filePathList, QValueList<int>& logLevelList) { void SpecificFileList::saveConfig(TQStringList& filePathList, TQValueList<int>& logLevelList) {
int count=fileList->count(); int count=fileList->count();
for (int i=0; i<count; i++) { for (int i=0; i<count; i++) {
@ -177,7 +177,7 @@ void SpecificFileList::saveConfig(QStringList& filePathList, QValueList<int>& lo
} }
void SpecificFileList::readConfig(QStringList& stringList, QValueList<int>& valueList) { void SpecificFileList::readConfig(TQStringList& stringList, TQValueList<int>& valueList) {
//A little security test //A little security test
if (stringList.size() != valueList.size()) { if (stringList.size() != valueList.size()) {
@ -187,8 +187,8 @@ void SpecificFileList::readConfig(QStringList& stringList, QValueList<int>& valu
LogLevel* level; LogLevel* level;
QStringList::Iterator itString=stringList.begin(); TQStringList::Iterator itString=stringList.begin();
QValueList<int>::Iterator itInt=valueList.begin(); TQValueList<int>::Iterator itInt=valueList.begin();
while(itString!=stringList.end()) { while(itString!=stringList.end()) {
if (*itInt>=0 && *itInt<(int) Globals::logLevels.count()) if (*itInt>=0 && *itInt<(int) Globals::logLevels.count())

@ -21,8 +21,8 @@
#ifndef _SPECIFIC_FILE_LIST_H_ #ifndef _SPECIFIC_FILE_LIST_H_
#define _SPECIFIC_FILE_LIST_H_ #define _SPECIFIC_FILE_LIST_H_
#include <qstringlist.h> #include <tqstringlist.h>
#include <qstring.h> #include <tqstring.h>
#include "globals.h" #include "globals.h"
@ -32,19 +32,20 @@
class SpecificFileList : public FileList { class SpecificFileList : public FileList {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
SpecificFileList(QWidget *parent, QString description); SpecificFileList(TQWidget *tqparent, TQString description);
~SpecificFileList(); ~SpecificFileList();
virtual void insertItem(QString& item); virtual void insertItem(TQString& item);
void insertItem(LogLevel* level, QString& item); void insertItem(LogLevel* level, TQString& item);
virtual void removeItem(int id); virtual void removeItem(int id);
LogLevel* getLevel(int i); LogLevel* getLevel(int i);
void saveConfig(QStringList& filePaths, QValueList<int>& fileLevels); void saveConfig(TQStringList& filePaths, TQValueList<int>& fileLevels);
void readConfig(QStringList& filePaths, QValueList<int>& fileLevels); void readConfig(TQStringList& filePaths, TQValueList<int>& fileLevels);
protected: protected:
@ -56,9 +57,9 @@ class SpecificFileList : public FileList {
void changeItemType(); void changeItemType();
private: private:
QPushButton* changeItem; TQPushButton* changeItem;
QMap<QListBoxItem*, int> levels; TQMap<TQListBoxItem*, int> levels;
}; };

@ -18,14 +18,14 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/ ***************************************************************************/
//Qt includes //TQt includes
#include <qlayout.h> #include <tqlayout.h>
#include <qvgroupbox.h> #include <tqvgroupbox.h>
#include <qbuttongroup.h> #include <tqbuttongroup.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qvbox.h> #include <tqvbox.h>
#include <qhbox.h> #include <tqhbox.h>
//KDE includes //KDE includes
#include <klocale.h> #include <klocale.h>
@ -42,19 +42,19 @@
#include "systemOptions.h" #include "systemOptions.h"
#include "ksystemlogConfig.h" #include "ksystemlogConfig.h"
SystemOptions::SystemOptions(QWidget *parent) : SystemOptions::SystemOptions(TQWidget *tqparent) :
QWidget(parent) TQWidget(tqparent)
{ {
QVBoxLayout* layout = new QVBoxLayout(this); TQVBoxLayout* tqlayout = new TQVBoxLayout(this);
//layout->setAutoAdd(true); //tqlayout->setAutoAdd(true);
QString description= i18n("<qt><p>These files will be analyzed to display <b>System logs</b>. This list also determines the order in which the files are read.</p></qt>"); TQString description= i18n("<qt><p>These files will be analyzed to display <b>System logs</b>. This list also determines the order in which the files are read.</p></qt>");
fileList=new SpecificFileList(this, description); fileList=new SpecificFileList(this, description);
connect(fileList, SIGNAL(fileListChanged(int)), this, SLOT(slotFileListChanged(int))); connect(fileList, TQT_SIGNAL(fileListChanged(int)), this, TQT_SLOT(slotFileListChanged(int)));
layout->addWidget(fileList); tqlayout->addWidget(fileList);
readConfig(); readConfig();
@ -82,8 +82,8 @@ void SystemOptions::slotFileListChanged(int itemLeft) {
void SystemOptions::saveConfig() { void SystemOptions::saveConfig() {
kdDebug() << "Saving config from System Options..." << endl; kdDebug() << "Saving config from System Options..." << endl;
QStringList stringList; TQStringList stringList;
QValueList<int> valueList; TQValueList<int> valueList;
fileList->saveConfig(stringList, valueList); fileList->saveConfig(stringList, valueList);
@ -92,8 +92,8 @@ void SystemOptions::saveConfig() {
} }
void SystemOptions::readConfig() { void SystemOptions::readConfig() {
QStringList stringList=KSystemLogConfig::systemPaths(); TQStringList stringList=KSystemLogConfig::systemPaths();
QValueList<int> valueList=KSystemLogConfig::systemLevels(); TQValueList<int> valueList=KSystemLogConfig::systemLevels();
fileList->readConfig(stringList, valueList); fileList->readConfig(stringList, valueList);
} }

@ -21,10 +21,10 @@
#ifndef _SYSTEM_OPTIONS_H_ #ifndef _SYSTEM_OPTIONS_H_
#define _SYSTEM_OPTIONS_H_ #define _SYSTEM_OPTIONS_H_
#include <qframe.h> #include <tqframe.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <kpopupmenu.h> #include <kpopupmenu.h>
#include <kconfig.h> #include <kconfig.h>
#include <kdialogbase.h> #include <kdialogbase.h>
@ -38,10 +38,11 @@
#include "logLevel.h" #include "logLevel.h"
class SystemOptions : public QWidget { class SystemOptions : public TQWidget {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
SystemOptions(QWidget *parent = 0); SystemOptions(TQWidget *tqparent = 0);
~SystemOptions(); ~SystemOptions();
bool isValid(); bool isValid();

@ -23,8 +23,8 @@
#include <klocale.h> #include <klocale.h>
#include <kmessagebox.h> #include <kmessagebox.h>
SystemReader::SystemReader(QObject *parent, const char *name) : SystemReader::SystemReader(TQObject *tqparent, const char *name) :
DefaultReader(parent, name) DefaultReader(tqparent, name)
{ {
} }
@ -42,7 +42,7 @@ void SystemReader::initColumns(LogViewColumns* columns) {
} }
LogLine* SystemReader::parseMessage(QString& logLine, LogFile* logFile) { LogLine* SystemReader::parseMessage(TQString& logLine, LogFile* logFile) {
//For the moment this method is correct //For the moment this method is correct
return(DefaultReader::parseMessage(logLine, logFile)); return(DefaultReader::parseMessage(logLine, logFile));
} }

@ -20,10 +20,10 @@
#ifndef _SYSTEM_READER_H_ #ifndef _SYSTEM_READER_H_
#define _SYSTEM_READER_H_ #define _SYSTEM_READER_H_
#include <qobject.h> #include <tqobject.h>
#include <qstringlist.h> #include <tqstringlist.h>
#include <kurl.h> #include <kurl.h>
#include <qfile.h> #include <tqfile.h>
#include "view.h" #include "view.h"
#include "globals.h" #include "globals.h"
@ -36,9 +36,10 @@
*/ */
class SystemReader : public DefaultReader { class SystemReader : public DefaultReader {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
SystemReader(QObject *parent = 0, const char *name = 0); SystemReader(TQObject *tqparent = 0, const char *name = 0);
virtual ~SystemReader(); virtual ~SystemReader();
@ -46,7 +47,7 @@ class SystemReader : public DefaultReader {
protected: protected:
virtual LogLine* parseMessage(QString& logLine, LogFile* logFile); virtual LogLine* parseMessage(TQString& logLine, LogFile* logFile);
}; };

@ -18,18 +18,18 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/ ***************************************************************************/
//Qt includes //TQt includes
#include <qpainter.h> #include <tqpainter.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qhbox.h> #include <tqhbox.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qstring.h> #include <tqstring.h>
#include <qwhatsthis.h> #include <tqwhatsthis.h>
#include <qtooltip.h> #include <tqtooltip.h>
#include <qlistview.h> #include <tqlistview.h>
#include <qpixmap.h> #include <tqpixmap.h>
//KDE includes //KDE includes
#include <kurl.h> #include <kurl.h>
@ -55,42 +55,42 @@
#include "ksystemlog.h" #include "ksystemlog.h"
View::View(QWidget *parent) : View::View(TQWidget *tqparent) :
DCOPObject("KSystemLogInterface"), DCOPObject("KSystemLogInterface"),
QWidget(parent), TQWidget(tqparent),
logManager(NULL), logManager(NULL),
table(NULL), table(NULL),
columns(NULL), columns(NULL),
firstLoad(true) firstLoad(true)
{ {
// setup our layout manager to automatically add our widgets // setup our tqlayout manager to automatically add our widgets
QVBoxLayout* topLayout = new QVBoxLayout(this); TQVBoxLayout* topLayout = new TQVBoxLayout(this);
topLayout->setAutoAdd(true); topLayout->setAutoAdd(true);
#if defined(KDE_MAKE_VERSION) && KDE_VERSION >= KDE_MAKE_VERSION(3,3,0) #if defined(KDE_MAKE_VERSION) && KDE_VERSION >= KDE_MAKE_VERSION(3,3,0)
filterBar=new QHBox(this); filterBar=new TQHBox(this);
filterBar->setSpacing(5); filterBar->setSpacing(5);
filterBar->setSizePolicy( QSizePolicy( QSizePolicy::Minimum, QSizePolicy::Fixed ) ); filterBar->tqsetSizePolicy( TQSizePolicy( TQSizePolicy::Minimum, TQSizePolicy::Fixed ) );
clearSearch=new KToolBarButton( QApplication::reverseLayout() ? "clear_left" : "locationbar_erase", 0, filterBar); clearSearch=new KToolBarButton( TQApplication::reverseLayout() ? "clear_left" : "locationbar_erase", 0, filterBar);
clearSearch->setText(i18n("Clear the filter")); clearSearch->setText(i18n("Clear the filter"));
QWhatsThis::add(clearSearch, i18n("This button clears the filter in one click.")); TQWhatsThis::add(clearSearch, i18n("This button clears the filter in one click."));
QToolTip::add(clearSearch, i18n("Clear the filter")); TQToolTip::add(clearSearch, i18n("Clear the filter"));
QLabel* label=new QLabel(i18n("Filter:"), filterBar); TQLabel* label=new TQLabel(i18n("Filter:"), filterBar);
search=new LogLineFilter(filterBar, (KListView*)NULL); search=new LogLineFilter(filterBar, (KListView*)NULL);
label->setBuddy(search); label->setBuddy(search);
QWhatsThis::add(search, i18n("Allows you to select only list items that match the content of this text.")); TQWhatsThis::add(search, i18n("Allows you to select only list items that match the content of this text."));
QToolTip::add(search, i18n("Type your item filter here")); TQToolTip::add(search, i18n("Type your item filter here"));
label=new QLabel(i18n("Column:"), filterBar); label=new TQLabel(i18n("Column:"), filterBar);
this->initSearchFilter(filterBar); this->initSearchFilter(filterBar);
@ -108,7 +108,7 @@ View::View(QWidget *parent) :
search->setListView(table); search->setListView(table);
//Connect the pressed signal of the clear button to the clear slot of "clear" //Connect the pressed signal of the clear button to the clear slot of "clear"
connect(clearSearch, SIGNAL(pressed()), search, SLOT(clear())); connect(clearSearch, TQT_SIGNAL(pressed()), search, TQT_SLOT(clear()));
#endif #endif
} }
@ -133,7 +133,7 @@ void View::saveConfig() {
KSystemLogConfig* configXT=KSystemLogConfig::self(); KSystemLogConfig* configXT=KSystemLogConfig::self();
KConfig* config=configXT->config(); KConfig* config=configXT->config();
QString group="List"; TQString group="List";
group.append(logManager->getIndex()); group.append(logManager->getIndex());
table->saveLayout(config, group); table->saveLayout(config, group);
@ -145,7 +145,7 @@ void View::setLogManager(LogManager* manager) {
} }
//TODO Deprecate this method as soon as possible //TODO Deprecate this method as soon as possible
void View::openURL(QString url) { void View::openURL(TQString url) {
kdDebug() << "DCOP Interface : " << url << endl; kdDebug() << "DCOP Interface : " << url << endl;
} }
@ -169,7 +169,7 @@ void View::toggleFilterBar() {
* Delete the "count" first items * Delete the "count" first items
*/ */
void View::deleteOldItems(int count) { void View::deleteOldItems(int count) {
QListViewItem* item; TQListViewItem* item;
for(int i=0; i<count; i++) { for(int i=0; i<count; i++) {
item=table->lastItem(); item=table->lastItem();
table->takeItem(item); table->takeItem(item);
@ -184,8 +184,8 @@ int View::getItemCount() {
count=table->childCount(); count=table->childCount();
} }
else { else {
QPtrList<QListViewItem> lst; TQPtrList<TQListViewItem> lst;
QListViewItemIterator it(table); TQListViewItemIterator it(table);
while (it.current()!=NULL) { while (it.current()!=NULL) {
count+=it.current()->childCount(); count+=it.current()->childCount();
++it; ++it;
@ -207,10 +207,10 @@ void View::setColumns(LogViewColumns* list) {
//TODO Maybe with the deleting of the config group, this boolean is useless //TODO Maybe with the deleting of the config group, this boolean is useless
if (firstLoad==true) { if (firstLoad==true) {
KSystemLogConfig* configXT=KSystemLogConfig::self(); KSystemLogConfig* configXT=KSystemLogConfig::self();
QString group="List"; TQString group="List";
group.append(logManager->getIndex()); group.append(logManager->getIndex());
//We first restore the layout from the config //We first restore the tqlayout from the config
table->restoreLayout(configXT->config(), group); table->restoreLayout(configXT->config(), group);
//Then we delete it from config, to avoid reloading problem //Then we delete it from config, to avoid reloading problem
@ -304,7 +304,7 @@ void View::initLogList() {
table=new KListView(this, "log_list"); table=new KListView(this, "log_list");
QWhatsThis::add(table, i18n("<qt><p>This is the main view of KSystemLog. It displays the last lines of the selected log. Please see the documentation to discovers the meaning of each icons and existing log.</p><p>Log lines in <b>bold</b> are the last added to the list.</p></qt>")); TQWhatsThis::add(table, i18n("<qt><p>This is the main view of KSystemLog. It displays the last lines of the selected log. Please see the documentation to discovers the meaning of each icons and existing log.</p><p>Log lines in <b>bold</b> are the last added to the list.</p></qt>"));
table->addColumn("Message"); table->addColumn("Message");
@ -320,8 +320,8 @@ void View::initLogList() {
//This is buggy but it's not my fault (I hope :-) //This is buggy but it's not my fault (I hope :-)
table->setFullWidth(true); table->setFullWidth(true);
//TODO Find a color from QColorGroup //TODO Find a color from TQColorGroup
QColor* alternate=new QColor(246,246,255); TQColor* alternate=new TQColor(246,246,255);
table->setAlternateBackground(*alternate); table->setAlternateBackground(*alternate);
table->setSelectionModeExt(KListView::Extended); table->setSelectionModeExt(KListView::Extended);
@ -332,16 +332,16 @@ void View::initLogList() {
LogListItem* View::getFirstSelectedItem() { LogListItem* View::getFirstSelectedItem() {
QListViewItemIterator it(table, QListViewItemIterator::Selected); TQListViewItemIterator it(table, TQListViewItemIterator::Selected);
//Returns the first selected item or NULL is there is no item selected //Returns the first selected item or NULL is there is no item selected
return(static_cast<LogListItem*> (it.current())); return(static_cast<LogListItem*> (it.current()));
} }
LogListItem* View::getLastSelectedItem() { LogListItem* View::getLastSelectedItem() {
QListViewItemIterator it(table, QListViewItemIterator::Selected); TQListViewItemIterator it(table, TQListViewItemIterator::Selected);
QListViewItem* item=NULL; TQListViewItem* item=NULL;
while (it.current()) { while (it.current()) {
item=it.current(); item=it.current();
@ -360,28 +360,28 @@ void View::setSortEnabled(bool enabled) {
table->setSorting(-1); table->setSorting(-1);
} }
void View::initSearchFilter(QWidget* filterBox) { void View::initSearchFilter(TQWidget* filterBox) {
#if defined(KDE_MAKE_VERSION) && KDE_VERSION >= KDE_MAKE_VERSION(3,3,0) #if defined(KDE_MAKE_VERSION) && KDE_VERSION >= KDE_MAKE_VERSION(3,3,0)
searchFilter=new QComboBox(filterBox); searchFilter=new TQComboBox(filterBox);
QWhatsThis::add(searchFilter, i18n("<qt>Allows you to apply the item filter only on the specified column here. \"<i>All</i>\" column means no specific filter.</qt>")); TQWhatsThis::add(searchFilter, i18n("<qt>Allows you to apply the item filter only on the specified column here. \"<i>All</i>\" column means no specific filter.</qt>"));
QToolTip::add(searchFilter, i18n("Choose the filtered column here")); TQToolTip::add(searchFilter, i18n("Choose the filtered column here"));
searchFilter->insertItem(i18n("All")); searchFilter->insertItem(i18n("All"));
//TODO 0 is not a very good value... Improve that. and of course, try to find a better solution //TODO 0 is not a very good value... Improve that. and of course, try to find a better solution
searchFilter->setMinimumSize(70, 0); searchFilter->setMinimumSize(70, 0);
connect(searchFilter, SIGNAL(activated(int)), search, SLOT(setFocus())); connect(searchFilter, TQT_SIGNAL(activated(int)), search, TQT_SLOT(setFocus()));
connect(searchFilter, SIGNAL(activated(int)), this, SLOT(changeColumnFilter(int))); connect(searchFilter, TQT_SIGNAL(activated(int)), this, TQT_SLOT(changeColumnFilter(int)));
connect(searchFilter, SIGNAL(activated(int)), search, SLOT(updateSearch())); connect(searchFilter, TQT_SIGNAL(activated(int)), search, TQT_SLOT(updateSearch()));
#endif #endif
} }
void View::addElement(QStringList* entries, QPixmap* icon) { void View::addElement(TQStringList* entries, TQPixmap* icon) {
QStringList::Iterator it = entries->begin(); TQStringList::Iterator it = entries->begin();
KListViewItem* item=new KListViewItem(table, *(it++), *(it++), *(it++), *(it++), *(it++)); KListViewItem* item=new KListViewItem(table, *(it++), *(it++), *(it++), *(it++), *(it++));
if (icon!=NULL) if (icon!=NULL)
@ -389,8 +389,8 @@ void View::addElement(QStringList* entries, QPixmap* icon) {
} }
void View::addElementAtEnd(QStringList* entries, QPixmap* icon) { void View::addElementAtEnd(TQStringList* entries, TQPixmap* icon) {
QStringList::Iterator it = entries->begin(); TQStringList::Iterator it = entries->begin();
KListViewItem* item=new KListViewItem(table, table->lastItem(), *(it++), *(it++), *(it++), *(it++), *(it++)); KListViewItem* item=new KListViewItem(table, table->lastItem(), *(it++), *(it++), *(it++), *(it++), *(it++));
if (icon!=NULL) if (icon!=NULL)
@ -404,14 +404,14 @@ KListView* View::getLogList() {
void View::changeColumnFilter(int column) { void View::changeColumnFilter(int column) {
#if defined(KDE_MAKE_VERSION) && KDE_VERSION >= KDE_MAKE_VERSION(3,3,0) #if defined(KDE_MAKE_VERSION) && KDE_VERSION >= KDE_MAKE_VERSION(3,3,0)
QValueList<int> filterColumns; TQValueList<int> filterColumns;
//The user select all columns //The user select all columns
if (column==0) { if (column==0) {
search->setSearchColumns(filterColumns); search->setSearchColumns(filterColumns);
} }
else { else {
QString columnName=searchFilter->currentText(); TQString columnName=searchFilter->currentText();
LogViewColumns::Iterator it; LogViewColumns::Iterator it;
LogViewColumn* column; LogViewColumn* column;
@ -435,15 +435,15 @@ void View::changeColumnFilter(int column) {
void View::print(QPainter* /*p*/, int /*height*/, int /*width*/) { void View::print(TQPainter* /*p*/, int /*height*/, int /*width*/) {
//Print log files here //Print log files here
} }
void View::slotOnURL(const QString& url) { void View::slotOnURL(const TQString& url) {
emit changeStatusbar(url); emit changeStatusbar(url);
} }
void View::slotSetTitle(const QString& title) { void View::slotSetTitle(const TQString& title) {
emit changeCaption(title); emit changeCaption(title);
} }

@ -22,9 +22,9 @@
#ifndef VIEW_H #ifndef VIEW_H
#define VIEW_H #define VIEW_H
//Qt includes //TQt includes
#include <qwidget.h> #include <tqwidget.h>
#include <qdatetime.h> #include <tqdatetime.h>
//KDE includes //KDE includes
#include <ktoolbarbutton.h> #include <ktoolbarbutton.h>
@ -62,15 +62,16 @@ class ViewToolTip;
* @author Nicolas Ternisien <nicolas.ternisien@gmail.com> * @author Nicolas Ternisien <nicolas.ternisien@gmail.com>
* @version 0.1 * @version 0.1
*/ */
class View : public QWidget, public KSystemLogInterface { class View : public TQWidget, public KSystemLogInterface {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
/** /**
* Default constructor * Default constructor
*/ */
View(QWidget *parent); View(TQWidget *tqparent);
/** /**
* Destructor * Destructor
@ -79,8 +80,8 @@ class View : public QWidget, public KSystemLogInterface {
void clearLogList(); void clearLogList();
void addElement(QStringList* entries, QPixmap* icon=NULL); void addElement(TQStringList* entries, TQPixmap* icon=NULL);
void addElementAtEnd(QStringList* entries, QPixmap* icon=NULL); void addElementAtEnd(TQStringList* entries, TQPixmap* icon=NULL);
void setColumns(LogViewColumns* list); void setColumns(LogViewColumns* list);
@ -115,33 +116,33 @@ class View : public QWidget, public KSystemLogInterface {
/** /**
* Print this view to any medium -- paper or not * Print this view to any medium -- paper or not
*/ */
void print(QPainter *, int height, int width); void print(TQPainter *, int height, int width);
/** /**
* Method from DCOP Interface * Method from DCOP Interface
*/ */
virtual void openURL(QString url); virtual void openURL(TQString url);
private: private:
void initLogList(); void initLogList();
void initSearchFilter(QWidget* filterBox); void initSearchFilter(TQWidget* filterBox);
signals: signals:
/** /**
* Use this signal to change the content of the statusbar * Use this signal to change the content of the statusbar
*/ */
void changeStatusbar(const QString& text); void changeStatusbar(const TQString& text);
/** /**
* Use this signal to change the content of the caption * Use this signal to change the content of the caption
*/ */
void changeCaption(const QString& text); void changeCaption(const TQString& text);
private slots: private slots:
void slotOnURL(const QString& url); void slotOnURL(const TQString& url);
void slotSetTitle(const QString& title); void slotSetTitle(const TQString& title);
void changeColumnFilter(int column); void changeColumnFilter(int column);
@ -167,7 +168,7 @@ class View : public QWidget, public KSystemLogInterface {
KListView* table; KListView* table;
#if defined(KDE_MAKE_VERSION) && (KDE_VERSION >= KDE_MAKE_VERSION(3,3,0)) #if defined(KDE_MAKE_VERSION) && (KDE_VERSION >= KDE_MAKE_VERSION(3,3,0))
QHBox* filterBar; TQHBox* filterBar;
KToolBarButton* clearSearch; KToolBarButton* clearSearch;
@ -179,7 +180,7 @@ class View : public QWidget, public KSystemLogInterface {
/** /**
* Filter of the column list * Filter of the column list
*/ */
QComboBox* searchFilter; TQComboBox* searchFilter;
#endif #endif

@ -20,7 +20,7 @@
#include <kdebug.h> #include <kdebug.h>
#include <qtooltip.h> #include <tqtooltip.h>
#include <klistview.h> #include <klistview.h>
@ -30,8 +30,8 @@
#include "view.h" #include "view.h"
ViewToolTip::ViewToolTip(QWidget *parent, View *view) : ViewToolTip::ViewToolTip(TQWidget *tqparent, View *view) :
QToolTip(parent), TQToolTip(tqparent),
view(view) { view(view) {
} }
@ -41,19 +41,19 @@ ViewToolTip::~ViewToolTip() {
} }
void ViewToolTip::maybeTip(const QPoint& p) { void ViewToolTip::maybeTip(const TQPoint& p) {
//ViewToolTip::setWakeUpDelay(1000); //ViewToolTip::setWakeUpDelay(1000);
if (!view->isTooltipEnabled() ) if (!view->isTooltipEnabled() )
return; return;
QListViewItem *qtItem = view->getLogList()->itemAt(p); TQListViewItem *qtItem = view->getLogList()->itemAt(p);
if (qtItem && qtItem->childCount() == 0) { if (qtItem && qtItem->childCount() == 0) {
LogListItem* item = static_cast<LogListItem*> (qtItem); LogListItem* item = static_cast<LogListItem*> (qtItem);
QString s=item->getToolTipText(); TQString s=item->getToolTipText();
QRect r= view->getLogList()->itemRect(item); TQRect r= view->getLogList()->tqitemRect(item);
//kdDebug() << "Left=" << r.left() << " Right=" << r.right() << " Top=" << r.top() << " Bottom=" << r.bottom() << endl; //kdDebug() << "Left=" << r.left() << " Right=" << r.right() << " Top=" << r.top() << " Bottom=" << r.bottom() << endl;
tip(r, s); tip(r, s);

@ -21,21 +21,21 @@
#ifndef _VIEW_TOOL_TIP_H_ #ifndef _VIEW_TOOL_TIP_H_
#define _VIEW_TOOL_TIP_H_ #define _VIEW_TOOL_TIP_H_
//#include <qtooltip.h> //#include <tqtooltip.h>
class QToolTip; class TQToolTip;
class View; class View;
//Code taken from KLogTool project //Code taken from KLogTool project
class ViewToolTip : public QToolTip { class ViewToolTip : public TQToolTip {
public: public:
ViewToolTip(QWidget *parent, View* view); ViewToolTip(TQWidget *tqparent, View* view);
virtual ~ViewToolTip(); virtual ~ViewToolTip();
protected: protected:
void maybeTip( const QPoint& ); void maybeTip( const TQPoint& );
private: private:
View *view; View *view;

@ -18,14 +18,14 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. * * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/ ***************************************************************************/
//Qt includes //TQt includes
#include <qlayout.h> #include <tqlayout.h>
#include <qvgroupbox.h> #include <tqvgroupbox.h>
#include <qbuttongroup.h> #include <tqbuttongroup.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qvbox.h> #include <tqvbox.h>
#include <qhbox.h> #include <tqhbox.h>
//KDE includes //KDE includes
#include <klocale.h> #include <klocale.h>
@ -42,17 +42,17 @@
#include "xorgOptions.h" #include "xorgOptions.h"
#include "ksystemlogConfig.h" #include "ksystemlogConfig.h"
XorgOptions::XorgOptions(QWidget *parent) : XorgOptions::XorgOptions(TQWidget *tqparent) :
QWidget(parent) TQWidget(tqparent)
{ {
QHBoxLayout *layout = new QHBoxLayout(this); TQHBoxLayout *tqlayout = new TQHBoxLayout(this);
layout->setAutoAdd(true); tqlayout->setAutoAdd(true);
QString description= i18n("<qt><p>These files will be analyzed to display <b>X.org log</b>. This list also determines the order in which the files are read.</p></qt>"); TQString description= i18n("<qt><p>These files will be analyzed to display <b>X.org log</b>. This list also determines the order in which the files are read.</p></qt>");
fileList=new FileList(this, description); fileList=new FileList(this, description);
connect(fileList, SIGNAL(fileListChanged(int)), this, SLOT(slotFileListChanged(int))); connect(fileList, TQT_SIGNAL(fileListChanged(int)), this, TQT_SLOT(slotFileListChanged(int)));
readConfig(); readConfig();
@ -80,7 +80,7 @@ void XorgOptions::slotFileListChanged(int itemLeft) {
void XorgOptions::saveConfig() { void XorgOptions::saveConfig() {
kdDebug() << "Save config from XorgOptions" << endl; kdDebug() << "Save config from XorgOptions" << endl;
QStringList list; TQStringList list;
int count=fileList->count(); int count=fileList->count();
@ -92,9 +92,9 @@ void XorgOptions::saveConfig() {
} }
void XorgOptions::readConfig() { void XorgOptions::readConfig() {
QStringList files(KSystemLogConfig::xorgPaths()); TQStringList files(KSystemLogConfig::xorgPaths());
QStringList::iterator it; TQStringList::iterator it;
for(it=files.begin(); it!=files.end(); ++it) { for(it=files.begin(); it!=files.end(); ++it) {
fileList->insertItem(*it); fileList->insertItem(*it);
} }

@ -21,8 +21,8 @@
#ifndef _XORG_OPTIONS_H_ #ifndef _XORG_OPTIONS_H_
#define _XORG_OPTIONS_H_ #define _XORG_OPTIONS_H_
#include <qframe.h> #include <tqframe.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <kpopupmenu.h> #include <kpopupmenu.h>
#include <kconfig.h> #include <kconfig.h>
@ -35,12 +35,13 @@
#include "fileList.h" #include "fileList.h"
class XorgOptions : public QWidget { class XorgOptions : public TQWidget {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
XorgOptions(QWidget *parent = 0); XorgOptions(TQWidget *tqparent = 0);
~XorgOptions(); ~XorgOptions();
bool isValid(); bool isValid();

@ -19,7 +19,7 @@
***************************************************************************/ ***************************************************************************/
#include <qpair.h> #include <tqpair.h>
#include <klocale.h> #include <klocale.h>
#include <kmessagebox.h> #include <kmessagebox.h>
@ -32,10 +32,10 @@
#define PROBED_LOG_LEVEL_ICON "wizard" #define PROBED_LOG_LEVEL_ICON "wizard"
#define NOT_IMPLEMENTED_LOG_LEVEL_ICON "filenew" #define NOT_IMPLEMENTED_LOG_LEVEL_ICON "filenew"
XorgReader::XorgReader(QObject *parent, const char *name) : XorgReader::XorgReader(TQObject *tqparent, const char *name) :
DefaultReader(parent, name), DefaultReader(tqparent, name),
newLineTime(), newLineTime(),
newLineDate(QDate::currentDate()), newLineDate(TQDate::tqcurrentDate()),
lineCount(1) lineCount(1)
{ {
@ -60,8 +60,8 @@ void XorgReader::initColumns(LogViewColumns* columns) {
} }
LogLine* XorgReader::parseMessage(QString& string, LogFile* originalFile) { LogLine* XorgReader::parseMessage(TQString& string, LogFile* originalFile) {
QString type; TQString type;
type=string.left(4); type=string.left(4);
@ -75,8 +75,8 @@ LogLine* XorgReader::parseMessage(QString& string, LogFile* originalFile) {
logLineType=Globals::informationLogLevel; logLineType=Globals::informationLogLevel;
} }
QStringList list; TQStringList list;
//list.append(i18n("# %1").arg(lineCount)); //list.append(i18n("# %1").tqarg(lineCount));
list.append(logLineType->name); list.append(logLineType->name);
list.append(string); list.append(string);
@ -85,30 +85,30 @@ LogLine* XorgReader::parseMessage(QString& string, LogFile* originalFile) {
//Substracts 1 millisec to the line time, to allow sorting //Substracts 1 millisec to the line time, to allow sorting
newLineTime=newLineTime.addMSecs(-1); newLineTime=newLineTime.addMSecs(-1);
QString filePath=originalFile->url.path(); TQString filePath=originalFile->url.path();
LogLine* logLine=new LogLine(newLineDate, newLineTime, list, filePath, logLineType, Globals::xorgMode->id); LogLine* logLine=new LogLine(newLineDate, newLineTime, list, filePath, logLineType, Globals::xorgMode->id);
return(logLine); return(logLine);
} }
void XorgReader::initializeTypeName() { void XorgReader::initializeTypeName() {
xorgLevels["(--)"]=new LogLevel(20, i18n("probed"), PROBED_LOG_LEVEL_ICON, QColor(240, 220, 3)); xorgLevels["(--)"]=new LogLevel(20, i18n("probed"), PROBED_LOG_LEVEL_ICON, TQColor(240, 220, 3));
xorgLevels["(**)"]=new LogLevel(21, i18n("from config file"), CONFIG_FILE_LOG_LEVEL_ICON, QColor(161, 133, 240)); xorgLevels["(**)"]=new LogLevel(21, i18n("from config file"), CONFIG_FILE_LOG_LEVEL_ICON, TQColor(161, 133, 240));
xorgLevels["(==)"]=new LogLevel(22, i18n("default setting"), DEFAULT_SETTING_LOG_LEVEL_ICON, QColor(169, 189, 165)); xorgLevels["(==)"]=new LogLevel(22, i18n("default setting"), DEFAULT_SETTING_LOG_LEVEL_ICON, TQColor(169, 189, 165));
xorgLevels["(++)"]=new LogLevel(23, i18n("from command Line"), COMMAND_LINE_LOG_LEVEL_ICON, QColor(179, 181, 214)); xorgLevels["(++)"]=new LogLevel(23, i18n("from command Line"), COMMAND_LINE_LOG_LEVEL_ICON, TQColor(179, 181, 214));
xorgLevels["(!!)"]=Globals::noticeLogLevel; xorgLevels["(!!)"]=Globals::noticeLogLevel;
xorgLevels["(II)"]=Globals::informationLogLevel; xorgLevels["(II)"]=Globals::informationLogLevel;
xorgLevels["(WW)"]=Globals::warningLogLevel; xorgLevels["(WW)"]=Globals::warningLogLevel;
xorgLevels["(EE)"]=Globals::errorLogLevel; xorgLevels["(EE)"]=Globals::errorLogLevel;
xorgLevels["(NI)"]=new LogLevel(24, i18n("not implemented"), NOT_IMPLEMENTED_LOG_LEVEL_ICON, QColor(136, 146, 240)); xorgLevels["(NI)"]=new LogLevel(24, i18n("not implemented"), NOT_IMPLEMENTED_LOG_LEVEL_ICON, TQColor(136, 146, 240));
xorgLevels["(\?\?)"]=Globals::noneLogLevel; xorgLevels["(\?\?)"]=Globals::noneLogLevel;
} }
LogLevel* XorgReader::getTypeName(const QString type) { LogLevel* XorgReader::getTypeName(const TQString type) {
QMap<QString, LogLevel*>::iterator it; TQMap<TQString, LogLevel*>::iterator it;
it=xorgLevels.find(type); it=xorgLevels.tqfind(type);
if (it!=xorgLevels.end()) if (it!=xorgLevels.end())
return(*it); return(*it);
else else

@ -21,11 +21,11 @@
#define _XORG_READER_H_ #define _XORG_READER_H_
#include <qobject.h> #include <tqobject.h>
#include <qstringlist.h> #include <tqstringlist.h>
#include <qmap.h> #include <tqmap.h>
#include <qfile.h> #include <tqfile.h>
#include <qpair.h> #include <tqpair.h>
#include <kurl.h> #include <kurl.h>
@ -40,25 +40,26 @@
*/ */
class XorgReader : public DefaultReader { class XorgReader : public DefaultReader {
Q_OBJECT Q_OBJECT
TQ_OBJECT
public: public:
XorgReader(QObject *parent = 0, const char *name = 0); XorgReader(TQObject *tqparent = 0, const char *name = 0);
virtual ~XorgReader(); virtual ~XorgReader();
virtual void initColumns(LogViewColumns* columns); virtual void initColumns(LogViewColumns* columns);
protected: protected:
virtual LogLine* parseMessage(QString& buffer, LogFile* originalFile); virtual LogLine* parseMessage(TQString& buffer, LogFile* originalFile);
QMap<QString, LogLevel*> xorgLevels; TQMap<TQString, LogLevel*> xorgLevels;
void initializeTypeName(); void initializeTypeName();
LogLevel* getTypeName(const QString type); LogLevel* getTypeName(const TQString type);
QTime newLineTime; TQTime newLineTime;
QDate newLineDate; TQDate newLineDate;
int lineCount; int lineCount;
}; };

Loading…
Cancel
Save