Conversion Qt3->TQt

Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
pull/24/head
Mavridis Philippe 3 years ago
parent c6cbd71bc1
commit 357ddeb8af
No known key found for this signature in database
GPG Key ID: F8D2D7E2F989A494

@ -1374,7 +1374,7 @@ firstrunwizard.cpp: $(srcdir)/firstrunwizard.ui firstrunwizard.h firstrunwizard.
firstrunwizard.h: $(srcdir)/firstrunwizard.ui firstrunwizard.h: $(srcdir)/firstrunwizard.ui
rm -rf firstrunwizard.h; rm -rf firstrunwizard.h;
$(UIC) $(srcdir)/firstrunwizard.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include <qwizard.h>,#include <kwizard.h>,g" >> firstrunwizard.h ; $(UIC) $(srcdir)/firstrunwizard.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include <tqwizard.h>,#include <kwizard.h>,g" >> firstrunwizard.h ;
firstrunwizard.moc: firstrunwizard.h firstrunwizard.moc: firstrunwizard.h
$(MOC) firstrunwizard.h -o firstrunwizard.moc $(MOC) firstrunwizard.h -o firstrunwizard.moc
@ -1389,7 +1389,7 @@ specialfiletypes.cpp: $(srcdir)/specialfiletypes.ui specialfiletypes.h specialfi
specialfiletypes.h: $(srcdir)/specialfiletypes.ui specialfiletypes.h: $(srcdir)/specialfiletypes.ui
rm -rf specialfiletypes.h; rm -rf specialfiletypes.h;
$(UIC) $(srcdir)/specialfiletypes.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include <qwizard.h>,#include <kwizard.h>,g" >> specialfiletypes.h ; $(UIC) $(srcdir)/specialfiletypes.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include <tqwizard.h>,#include <kwizard.h>,g" >> specialfiletypes.h ;
specialfiletypes.moc: specialfiletypes.h specialfiletypes.moc: specialfiletypes.h
$(MOC) specialfiletypes.h -o specialfiletypes.moc $(MOC) specialfiletypes.h -o specialfiletypes.moc
@ -1404,7 +1404,7 @@ autoscanoptions.cpp: $(srcdir)/autoscanoptions.ui autoscanoptions.h autoscanopti
autoscanoptions.h: $(srcdir)/autoscanoptions.ui autoscanoptions.h: $(srcdir)/autoscanoptions.ui
rm -rf autoscanoptions.h; rm -rf autoscanoptions.h;
$(UIC) $(srcdir)/autoscanoptions.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include <qwizard.h>,#include <kwizard.h>,g" >> autoscanoptions.h ; $(UIC) $(srcdir)/autoscanoptions.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include <tqwizard.h>,#include <kwizard.h>,g" >> autoscanoptions.h ;
autoscanoptions.moc: autoscanoptions.h autoscanoptions.moc: autoscanoptions.h
$(MOC) autoscanoptions.h -o autoscanoptions.moc $(MOC) autoscanoptions.h -o autoscanoptions.moc
@ -1425,7 +1425,7 @@ archivetypes.cpp: $(srcdir)/archivetypes.ui archivetypes.h archivetypes.moc
archivetypes.h: $(srcdir)/archivetypes.ui archivetypes.h: $(srcdir)/archivetypes.ui
rm -rf archivetypes.h; rm -rf archivetypes.h;
$(UIC) $(srcdir)/archivetypes.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include <qwizard.h>,#include <kwizard.h>,g" >> archivetypes.h ; $(UIC) $(srcdir)/archivetypes.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include <tqwizard.h>,#include <kwizard.h>,g" >> archivetypes.h ;
archivetypes.moc: archivetypes.h archivetypes.moc: archivetypes.h
$(MOC) archivetypes.h -o archivetypes.moc $(MOC) archivetypes.h -o archivetypes.moc
@ -1440,7 +1440,7 @@ logoptions.cpp: $(srcdir)/logoptions.ui logoptions.h logoptions.moc
logoptions.h: $(srcdir)/logoptions.ui logoptions.h: $(srcdir)/logoptions.ui
rm -rf logoptions.h; rm -rf logoptions.h;
$(UIC) $(srcdir)/logoptions.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include <qwizard.h>,#include <kwizard.h>,g" >> logoptions.h ; $(UIC) $(srcdir)/logoptions.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include <tqwizard.h>,#include <kwizard.h>,g" >> logoptions.h ;
logoptions.moc: logoptions.h logoptions.moc: logoptions.h
$(MOC) logoptions.h -o logoptions.moc $(MOC) logoptions.h -o logoptions.moc
@ -1455,6 +1455,6 @@ archivelimits.cpp: $(srcdir)/archivelimits.ui archivelimits.h archivelimits.moc
archivelimits.h: $(srcdir)/archivelimits.ui archivelimits.h: $(srcdir)/archivelimits.ui
rm -rf archivelimits.h; rm -rf archivelimits.h;
$(UIC) $(srcdir)/archivelimits.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include <qwizard.h>,#include <kwizard.h>,g" >> archivelimits.h ; $(UIC) $(srcdir)/archivelimits.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include <tqwizard.h>,#include <kwizard.h>,g" >> archivelimits.h ;
archivelimits.moc: archivelimits.h archivelimits.moc: archivelimits.h
$(MOC) archivelimits.h -o archivelimits.moc $(MOC) archivelimits.h -o archivelimits.moc

@ -39,10 +39,10 @@ A:HOVER {
<BODY> <BODY>
<table><tr><td><img src=klam.png width=100 height=100></td><td><h2>Browser de Vírus do KlamAV</H2></td></tr></table><table width=100% height=100%><tr><td class=KASmall align=left valign=top width=25% height=100%><a href="http://klamav.sourceforge.net/index.php?content=ka_home"><b>Home</b></a><br><a href="http://klamav.sourceforge.net/index.php?content=ka_news"><b>Notícias</b></a><br><a href="http://klamav.sourceforge.net/index.php?content=ka_security_notes"><b>Notas de Segurança</b></a><br><br><br><br><br><p class=KANormal></p><br><br><br><br><br><br></td><td class=KANormal align=left valign=top width=75% height=100%> <table><tr><td><img src=klam.png width=100 height=100></td><td><h2>Browser de Vírus do KlamAV</H2></td></tr></table><table width=100% height=100%><tr><td class=KASmall align=left valign=top width=25% height=100%><a href="http://klamav.sourceforge.net/index.php?content=ka_home"><b>Home</b></a><br><a href="http://klamav.sourceforge.net/index.php?content=ka_news"><b>Notícias</b></a><br><a href="http://klamav.sourceforge.net/index.php?content=ka_security_notes"><b>Notas de Segurança</b></a><br><br><br><br><br><p class=KANormal></p><br><br><br><br><br><br></td><td class=KANormal align=left valign=top width=75% height=100%>
<p class=KANormal> <p class=KANormal>
<p>O Browser de Vírus do KlamAV permite que você pesquise os vírus detectados pelo ClamAV. Com este browser de vírus você pode:</p> <p>O Browser de Vírus do KlamAV permite que você pestquise os vírus detectados pelo ClamAV. Com este browser de vírus você pode:</p>
<p><li> Clicar com o botao direito no nome do vírus para escolher aonde deseja pesquisar sobre ele, seja usando o Google ou o VirusPool.</li></p> <p><li> Clicar com o botao direito no nome do vírus para escolher aonde deseja pestquisar sobre ele, seja usando o Google ou o VirusPool.</li></p>
<p><li> Clicar com o botão da direita em um vírus detectado na aba "Verificar" para pesquisar no browser de vírus.</li></p> <p><li> Clicar com o botão da direita em um vírus detectado na aba "Verificar" para pestquisar no browser de vírus.</li></p>
<p><li> Clicar com o botão da direita em um vírua na aba de "Quarentena" para pesquisar no browser de vírus.</li></p> <p><li> Clicar com o botão da direita em um vírua na aba de "Quarentena" para pestquisar no browser de vírus.</li></p>
<p></p> <p></p>
<p>Nota: O filtro de vírus no topo a esquerda é experimental, Usar esse recurso consome tempo, portanto use com cuidado!!</p> <p>Nota: O filtro de vírus no topo a esquerda é experimental, Usar esse recurso consome tempo, portanto use com cuidado!!</p>

@ -12,31 +12,31 @@
#include <kstandarddirs.h> #include <kstandarddirs.h>
#include <kstandarddirs.h> #include <kstandarddirs.h>
#include <qlayout.h> #include <tqlayout.h>
using namespace KlamAV; using namespace KlamAV;
Aboutklamav::Aboutklamav(QWidget *parent, const char *name) Aboutklamav::Aboutklamav(TQWidget *parent, const char *name)
: QWidget(parent, name) : TQWidget(parent, name)
{ {
// QString location = locate("data", "klamav/about/klam.png"); // TQString location = locate("data", "klamav/about/klam.png");
// QPixmap image0; // TQPixmap image0;
// QImage img; // TQImage img;
// //
// //img.loadFromData( image0_data, sizeof( image0_data ), "PNG" ); // //img.loadFromData( image0_data, sizeof( image0_data ), "PNG" );
// img.load(location,"PNG"); // img.load(location,"PNG");
// image0 = img; // image0 = img;
QVBoxLayout *vbox = new QVBoxLayout(this, KDialog::marginHint(), TQVBoxLayout *vbox = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint(), "vbox"); KDialog::spacingHint(), "vbox");
QWidget* privateLayoutWidget = new QWidget( this, "dblayout" ); TQWidget* privateLayoutWidget = new TQWidget( this, "dblayout" );
vbox->addWidget(privateLayoutWidget); vbox->addWidget(privateLayoutWidget);
QGridLayout* dblayout = new QGridLayout( privateLayoutWidget, 1, 1, 2, 2, "dblayout"); TQGridLayout* dblayout = new TQGridLayout( privateLayoutWidget, 1, 1, 2, 2, "dblayout");
dblayout->setColStretch(1, 1); dblayout->setColStretch(1, 1);
tabBrowser = new TabWidget(privateLayoutWidget); tabBrowser = new TabWidget(privateLayoutWidget);
@ -44,8 +44,8 @@ Aboutklamav::Aboutklamav(QWidget *parent, const char *name)
homepage = new PageViewer(this, "page"); homepage = new PageViewer(this, "page");
connect( homepage, SIGNAL(setWindowCaption (const QString &)), connect( homepage, SIGNAL(setWindowCaption (const TQString &)),
this, SLOT(slotTabCaption (const QString &)) ); this, SLOT(slotTabCaption (const TQString &)) );
connect( homepage, SIGNAL(urlClicked(const KURL &,bool)), connect( homepage, SIGNAL(urlClicked(const KURL &,bool)),
this, SLOT(slotOpenTabPlain(const KURL &,bool)) ); this, SLOT(slotOpenTabPlain(const KURL &,bool)) );
@ -55,43 +55,43 @@ Aboutklamav::Aboutklamav(QWidget *parent, const char *name)
tabBrowser->showPage(homepage->widget()); tabBrowser->showPage(homepage->widget());
setFocus(); setFocus();
QString location = locate("data", "klamav/about/aboutklamav.html"); TQString location = locate("data", "klamav/about/aboutklamav.html");
homepage->openURL(location); homepage->openURL(location);
//slotTabCaption(QString("KlamAV %1").arg(KLAMAV_VERSION)); //slotTabCaption(TQString("KlamAV %1").arg(KLAMAV_VERSION));
//KMessageBox::information (this,nooffilters); //KMessageBox::information (this,nooffilters);
/* QGroupBox *groupBox1 = new QGroupBox( "About KlamAV",this ); /* TQGroupBox *groupBox1 = new TQGroupBox( "About KlamAV",this );
vbox->addWidget(groupBox1); vbox->addWidget(groupBox1);
groupBox1->setGeometry( QRect( 20, 40, 551, 391 ) ); groupBox1->setGeometry( TQRect( 20, 40, 551, 391 ) );
QLabel *pixmapLabel1 = new QLabel( groupBox1, "pixmapLabel1" ); TQLabel *pixmapLabel1 = new TQLabel( groupBox1, "pixmapLabel1" );
pixmapLabel1->setGeometry( QRect( 60, 110, 140, 140 ) ); pixmapLabel1->setGeometry( TQRect( 60, 110, 140, 140 ) );
pixmapLabel1->setPixmap( image0 ); pixmapLabel1->setPixmap( image0 );
pixmapLabel1->setScaledContents( TRUE ); pixmapLabel1->setScaledContents( TRUE );
QLabel *textLabel1_2 = new QLabel( "KlamAV \n(C) Robert Hogan <hoganrobert@klamav.sf.net>",groupBox1 ); TQLabel *textLabel1_2 = new TQLabel( "KlamAV \n(C) Robert Hogan <hoganrobert@klamav.sf.net>",groupBox1 );
textLabel1_2->setGeometry( QRect( 230, 80, 421, 61 ) ); textLabel1_2->setGeometry( TQRect( 230, 80, 421, 61 ) );
QLabel *textLabel1_3 = new QLabel( "http://klamav.sourceforge.net",groupBox1 ); TQLabel *textLabel1_3 = new TQLabel( "http://klamav.sourceforge.net",groupBox1 );
textLabel1_3->setGeometry( QRect( 230, 130, 221, 21 ) ); textLabel1_3->setGeometry( TQRect( 230, 130, 221, 21 ) );
QLabel *textLabel1 = new QLabel( "Translators:\nRussian, Vitaly Lipatov \n German, Marc Hansen",groupBox1 ); TQLabel *textLabel1 = new TQLabel( "Translators:\nRussian, Vitaly Lipatov \n German, Marc Hansen",groupBox1 );
textLabel1->setGeometry( QRect( 230, 150, 401, 61 ) ); textLabel1->setGeometry( TQRect( 230, 150, 401, 61 ) );
QLabel *textLabel1 = new QLabel( "ClamAV \n(C) Tomasz Kojm <tkojm@clamav.net>",groupBox1 ); TQLabel *textLabel1 = new TQLabel( "ClamAV \n(C) Tomasz Kojm <tkojm@clamav.net>",groupBox1 );
textLabel1->setGeometry( QRect( 230, 20, 401, 61 ) ); textLabel1->setGeometry( TQRect( 230, 20, 401, 61 ) );
QLabel *textLabel1_4 = new QLabel( "http://www.clamav.net",groupBox1 ); TQLabel *textLabel1_4 = new TQLabel( "http://www.clamav.net",groupBox1 );
textLabel1_4->setGeometry( QRect( 230, 250, 221, 21 ) ); textLabel1_4->setGeometry( TQRect( 230, 250, 221, 21 ) );
pixmapLabel1->setPixmap( image0 ); pixmapLabel1->setPixmap( image0 );
pixmapLabel1->setScaledContents( TRUE ); pixmapLabel1->setScaledContents( TRUE );
*/ */
//resize( QSize(600, 480).expandedTo(minimumSizeHint()) ); //resize( TQSize(600, 480).expandedTo(minimumSizeHint()) );
@ -108,10 +108,10 @@ void Aboutklamav::slotOpenTabPlain(const KURL& url, bool background)
PageViewer* page = new PageViewer(this, "page"); PageViewer* page = new PageViewer(this, "page");
//connect( m_part, SIGNAL(signalSettingsChanged()), page, SLOT(slotPaletteOrFontChanged())); //connect( m_part, SIGNAL(signalSettingsChanged()), page, SLOT(slotPaletteOrFontChanged()));
/* connect( page, SIGNAL(setTabIcon(const QPixmap&)), /* connect( page, SIGNAL(setTabIcon(const TQPixmap&)),
this, SLOT(setTabIcon(const QPixmap&)));*/ this, SLOT(setTabIcon(const TQPixmap&)));*/
connect( page, SIGNAL(setWindowCaption (const QString &)), connect( page, SIGNAL(setWindowCaption (const TQString &)),
this, SLOT(slotTabCaption (const QString &)) ); this, SLOT(slotTabCaption (const TQString &)) );
connect( page, SIGNAL(urlClicked(const KURL &,bool)), connect( page, SIGNAL(urlClicked(const KURL &,bool)),
this, SLOT(slotOpenTabPlain(const KURL &,bool)) ); this, SLOT(slotOpenTabPlain(const KURL &,bool)) );
@ -131,7 +131,7 @@ void Aboutklamav::slotOpenTabPlain(const KURL& url, bool background)
page->openURL(url); page->openURL(url);
} }
void Aboutklamav::slotTabCaption(const QString &caption) void Aboutklamav::slotTabCaption(const TQString &caption)
{ {
if (!caption.isEmpty()) if (!caption.isEmpty())
{ {

@ -17,12 +17,12 @@
class KPrinter; class KPrinter;
class KToggleAction; class KToggleAction;
class KURL; class KURL;
class QLineEdit; class TQLineEdit;
class QComboBox; class TQComboBox;
class QCheckBox; class TQCheckBox;
class QListBox; class TQListBox;
class QPushButton; class TQPushButton;
class QLabel; class TQLabel;
class KProcess; class KProcess;
class KConfig; class KConfig;
class KURLRequester; class KURLRequester;
@ -42,14 +42,14 @@ namespace KlamAV
* @author $AUTHOR <$EMAIL> * @author $AUTHOR <$EMAIL>
* @version $APP_VERSION * @version $APP_VERSION
*/ */
class Aboutklamav : public QWidget class Aboutklamav : public TQWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
/** /**
* Default Constructor * Default Constructor
*/ */
Aboutklamav(QWidget *parent, const char *name=0); Aboutklamav(TQWidget *parent, const char *name=0);
/** /**
* Default Destructor * Default Destructor
@ -60,14 +60,14 @@ public:
* Use this method to load whatever file/URL you have * Use this method to load whatever file/URL you have
*/ */
void load(const KURL& url); void load(const KURL& url);
void setDirName(QString); void setDirName(TQString);
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:
/** /**
@ -97,8 +97,8 @@ private slots:
void optionsPreferences(); void optionsPreferences();
void newToolbarConfig(); void newToolbarConfig();
*/ */
//void changeStatusbar(const QString& text); //void changeStatusbar(const TQString& text);
//void changeCaption(const QString& text); //void changeCaption(const TQString& text);
private: private:
void setupAccel(); void setupAccel();
@ -113,7 +113,7 @@ private:
KlamAV::PageViewer* homepage; KlamAV::PageViewer* homepage;
KlamAV::TabWidget* tabBrowser; KlamAV::TabWidget* tabBrowser;
signals: signals:
void itemSelected(QString abs_filename, int line); void itemSelected(TQString abs_filename, int line);
public slots: public slots:
@ -121,14 +121,14 @@ private slots:
protected slots: protected slots:
void slotOpenTabPlain(const KURL& url, bool background = false); void slotOpenTabPlain(const KURL& url, bool background = false);
void slotTabCaption(const QString &capt); void slotTabCaption(const TQString &capt);
private: private:
QPushButton *about_button; TQPushButton *about_button;
KConfig *config; KConfig *config;
QComboBox *check_combo; TQComboBox *check_combo;
QLabel *notes_label; TQLabel *notes_label;
}; };
#endif // _Aboutklamav_H_ #endif // _Aboutklamav_H_

@ -27,10 +27,10 @@
#include <kurlrequester.h> #include <kurlrequester.h>
#include <kurlcompletion.h> #include <kurlcompletion.h>
#include <kcombobox.h> #include <kcombobox.h>
#include <qlayout.h> #include <tqlayout.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include <kstandarddirs.h> #include <kstandarddirs.h>
#include <qtoolbutton.h> #include <tqtoolbutton.h>
const char *log_type[] = { const char *log_type[] = {
"All Types", "All Types",
@ -57,36 +57,36 @@ const char *log_days[] = {
}; };
Activityviewer::Activityviewer(QWidget *parent, const char *name) Activityviewer::Activityviewer(TQWidget *parent, const char *name)
: QWidget(parent, name) : TQWidget(parent, name)
{ {
//Create GUI //Create GUI
QVBoxLayout *vbox = new QVBoxLayout(this, KDialog::marginHint(), TQVBoxLayout *vbox = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint(), "vbox"); KDialog::spacingHint(), "vbox");
QWidget* privateLayoutWidget2 = new QWidget( this, "dblayout" ); TQWidget* privateLayoutWidget2 = new TQWidget( this, "dblayout" );
QGridLayout *layout = new QGridLayout(privateLayoutWidget2, 2, 6, 10, 4); TQGridLayout *layout = new TQGridLayout(privateLayoutWidget2, 2, 6, 10, 4);
QLabel *combo_label = new QLabel(i18n("Display Event Type:"), privateLayoutWidget2); TQLabel *combo_label = new TQLabel(i18n("Display Event Type:"), privateLayoutWidget2);
//combo_label->setFixedSize(combo_label->sizeHint()); //combo_label->setFixedSize(combo_label->sizeHint());
layout->addWidget(combo_label,0,0); layout->addWidget(combo_label,0,0);
combo_label->adjustSize(); combo_label->adjustSize();
check_combo = new QComboBox(false, privateLayoutWidget2); check_combo = new TQComboBox(false, privateLayoutWidget2);
check_combo->insertStrList(log_type); check_combo->insertStrList(log_type);
check_combo->adjustSize(); check_combo->adjustSize();
//check_combo->setFixedSize(check_combo->size()); //check_combo->setFixedSize(check_combo->size());
layout->addWidget(check_combo,0,1); layout->addWidget(check_combo,0,1);
QLabel *days_label = new QLabel(i18n(" from the "), privateLayoutWidget2); TQLabel *days_label = new TQLabel(i18n(" from the "), privateLayoutWidget2);
//combo_label->setFixedSize(combo_label->sizeHint()); //combo_label->setFixedSize(combo_label->sizeHint());
layout->addWidget(days_label,0,2); layout->addWidget(days_label,0,2);
days_label->adjustSize(); days_label->adjustSize();
days_combo = new QComboBox(false, privateLayoutWidget2); days_combo = new TQComboBox(false, privateLayoutWidget2);
days_combo->insertStrList(log_days); days_combo->insertStrList(log_days);
days_combo->adjustSize(); days_combo->adjustSize();
//check_combo->setFixedSize(check_combo->size()); //check_combo->setFixedSize(check_combo->size());
@ -94,10 +94,10 @@ Activityviewer::Activityviewer(QWidget *parent, const char *name)
QToolButton* options = new QToolButton( privateLayoutWidget2,"play" ); TQToolButton* options = new TQToolButton( privateLayoutWidget2,"play" );
options->setIconSet( SmallIconSet( "configure" ) ); options->setIconSet( SmallIconSet( "configure" ) );
options->setTextLabel("Options"); options->setTextLabel("Options");
options->setTextPosition(QToolButton::Right); options->setTextPosition(TQToolButton::Right);
options->setUsesTextLabel(true); options->setUsesTextLabel(true);
options->adjustSize(); options->adjustSize();
layout->addWidget(options,0,6); layout->addWidget(options,0,6);
@ -107,18 +107,18 @@ Activityviewer::Activityviewer(QWidget *parent, const char *name)
QGroupBox *group2 = new QGroupBox(i18n("Activity"), this); TQGroupBox *group2 = new TQGroupBox(i18n("Activity"), this);
vbox->addWidget(group2); vbox->addWidget(group2);
QGridLayout *layout2 = new QGridLayout( group2, 1, 1, KDialog::spacingHint(), KDialog::spacingHint(), "layout2"); TQGridLayout *layout2 = new TQGridLayout( group2, 1, 1, KDialog::spacingHint(), KDialog::spacingHint(), "layout2");
layout2->addRowSpacing(0, group2->fontMetrics().height()); layout2->addRowSpacing(0, group2->fontMetrics().height());
layout2->addRowSpacing(1, group2->fontMetrics().height()); layout2->addRowSpacing(1, group2->fontMetrics().height());
//layout2->setColStretch(0, 1); //layout2->setColStretch(0, 1);
//layout2->setColStretch(1, 1); //layout2->setColStretch(1, 1);
QWidget *hlp2 = new QWidget( group2 ); TQWidget *hlp2 = new TQWidget( group2 );
layout2->addMultiCellWidget(hlp2, 1,1, 0,0); layout2->addMultiCellWidget(hlp2, 1,1, 0,0);
QVBoxLayout *dir_layout2 = new QVBoxLayout(hlp2, KDialog::spacingHint() ); TQVBoxLayout *dir_layout2 = new TQVBoxLayout(hlp2, KDialog::spacingHint() );
@ -130,13 +130,13 @@ Activityviewer::Activityviewer(QWidget *parent, const char *name)
searchToolBar->setEnableContextMenu( false ); searchToolBar->setEnableContextMenu( false );
button = new KToolBarButton( "locationbar_erase", 0, searchToolBar ); button = new KToolBarButton( "locationbar_erase", 0, searchToolBar );
/*QLabel *filter_label =*/ new QLabel( i18n("Search:") + " ", searchToolBar ); /*TQLabel *filter_label =*/ new TQLabel( i18n("Search:") + " ", searchToolBar );
currentbox = new KListView(hlp2); currentbox = new KListView(hlp2);
currentbox->setShowSortIndicator(true); currentbox->setShowSortIndicator(true);
QFontMetrics rb_fm(currentbox->fontMetrics()); TQFontMetrics rb_fm(currentbox->fontMetrics());
//currentbox->setMinimumSize(rb_fm.width("0")*55, //currentbox->setMinimumSize(rb_fm.width("0")*55,
// rb_fm.lineSpacing()*15); // rb_fm.lineSpacing()*15);
////kdDebug() << ((currentbox->width())/3) << endl; ////kdDebug() << ((currentbox->width())/3) << endl;
@ -144,17 +144,17 @@ Activityviewer::Activityviewer(QWidget *parent, const char *name)
currentbox->addColumn( "Type",0); currentbox->addColumn( "Type",0);
currentbox->addColumn( "Event",0); currentbox->addColumn( "Event",0);
currentbox->addColumn( "File",0); currentbox->addColumn( "File",0);
currentbox->setResizeMode(QListView::AllColumns); currentbox->setResizeMode(TQListView::AllColumns);
currentbox->setSelectionMode( QListView::Extended ); currentbox->setSelectionMode( TQListView::Extended );
currentbox->setAllColumnsShowFocus(true); currentbox->setAllColumnsShowFocus(true);
// qmenu = new QPopupMenu( currentbox ); // qmenu = new TQPopupMenu( currentbox );
// connect(currentbox, SIGNAL( contextMenuRequested( QListViewItem *, const QPoint& , int ) ), // connect(currentbox, SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint& , int ) ),
// this, SLOT( slotRMB( QListViewItem *, const QPoint &, int ) ) ); // this, SLOT( slotRMB( TQListViewItem *, const TQPoint &, int ) ) );
kLineEdit1 = new KListViewSearchLine( (QWidget *)searchToolBar, currentbox,"klinedit1"); kLineEdit1 = new KListViewSearchLine( (TQWidget *)searchToolBar, currentbox,"klinedit1");
/* QValueList<int> columns; /* TQValueList<int> columns;
columns.append(0); columns.append(0);
columns.append(1); columns.append(1);
columns.append(2);*/ columns.append(2);*/
@ -162,10 +162,10 @@ Activityviewer::Activityviewer(QWidget *parent, const char *name)
//kLineEdit1->setMaxLength(2); //kLineEdit1->setMaxLength(2);
connect(button, SIGNAL( clicked() ), connect(button, SIGNAL( clicked() ),
kLineEdit1, SLOT(clear()) ); kLineEdit1, SLOT(clear()) );
connect(check_combo, SIGNAL( activated(const QString &) ), connect(check_combo, SIGNAL( activated(const TQString &) ),
this, SLOT(allActivityOfType(const QString &) )); this, SLOT(allActivityOfType(const TQString &) ));
connect(days_combo, SIGNAL( activated(const QString &) ), connect(days_combo, SIGNAL( activated(const TQString &) ),
this, SLOT(allActivityOfDate(const QString &) )); this, SLOT(allActivityOfDate(const TQString &) ));
searchToolBar->setStretchableWidget( kLineEdit1 ); searchToolBar->setStretchableWidget( kLineEdit1 );
@ -176,7 +176,7 @@ Activityviewer::Activityviewer(QWidget *parent, const char *name)
//layout->addMultiCellWidget(currentbox); //layout->addMultiCellWidget(currentbox);
CollectionDB::instance()->expireActivity( QString("%1").arg(KlamavConfig::expireDays()) ); CollectionDB::instance()->expireActivity( TQString("%1").arg(KlamavConfig::expireDays()) );
allActivityOfDate(days_combo->currentText()); allActivityOfDate(days_combo->currentText());
@ -191,11 +191,11 @@ void Activityviewer::populateActivity()
if (!(activity.isEmpty())){ if (!(activity.isEmpty())){
int i=0; int i=0;
QString eventdate; TQString eventdate;
QString eventtype; TQString eventtype;
QString event; TQString event;
QString file; TQString file;
for (QStringList::Iterator it = activity.begin(); it != activity.end(); it++ ){ for (TQStringList::Iterator it = activity.begin(); it != activity.end(); it++ ){
////kdDebug() << *it << endl; ////kdDebug() << *it << endl;
if (i==0){ if (i==0){
eventdate = *it; eventdate = *it;
@ -223,29 +223,29 @@ void Activityviewer::allActivity()
populateActivity(); populateActivity();
} }
void Activityviewer::allActivityOfType(const QString &type) void Activityviewer::allActivityOfType(const TQString &type)
{ {
QString days = days_combo->currentText().remove("Last ").remove(" Days").remove(" Day"); TQString days = days_combo->currentText().remove("Last ").remove(" Days").remove(" Day");
activity = CollectionDB::instance()->allActivityOfType(type,days); activity = CollectionDB::instance()->allActivityOfType(type,days);
populateActivity(); populateActivity();
} }
void Activityviewer::allActivityOfDate(const QString &days) void Activityviewer::allActivityOfDate(const TQString &days)
{ {
QString stripdays = days; TQString stripdays = days;
stripdays = stripdays.remove("Last ").remove(" Days").remove(" Day"); stripdays = stripdays.remove("Last ").remove(" Days").remove(" Day");
QString type = check_combo->currentText(); TQString type = check_combo->currentText();
activity = CollectionDB::instance()->allActivityOfType(type,stripdays); activity = CollectionDB::instance()->allActivityOfType(type,stripdays);
populateActivity(); populateActivity();
} }
void Activityviewer::insertItem(const QString &date, const QString &type, const QString &event, const QString &file) void Activityviewer::insertItem(const TQString &date, const TQString &type, const TQString &event, const TQString &file)
{ {
if ((check_combo->currentText() == type) || (check_combo->currentText() == "All Types")) if ((check_combo->currentText() == type) || (check_combo->currentText() == "All Types"))
@ -265,7 +265,7 @@ Activityviewer::~Activityviewer()
{ {
} }
EventListItem::EventListItem( KListView *parent, QString label1, QString label2 , QString label3, QString label4) EventListItem::EventListItem( KListView *parent, TQString label1, TQString label2 , TQString label3, TQString label4)
: KListViewItem( parent, label1, label2 , label3, label4 ) : KListViewItem( parent, label1, label2 , label3, label4 )
{ {
} }
@ -276,17 +276,17 @@ EventListItem::~EventListItem()
// paint ze peons // paint ze peons
void EventListItem::paintCell ( QPainter * p, const QColorGroup & cg, int column, int width, int align ) void EventListItem::paintCell ( TQPainter * p, const TQColorGroup & cg, int column, int width, int align )
{ {
QColorGroup cg2(cg); TQColorGroup cg2(cg);
if (( this->text(1).contains( "Virus")) || ( this->text(1).contains( "Error"))) if (( this->text(1).contains( "Virus")) || ( this->text(1).contains( "Error")))
cg2.setColor(QColorGroup::Text, Qt::red); cg2.setColor(TQColorGroup::Text, TQt::red);
else if ( this->text(1) == "Updates") else if ( this->text(1) == "Updates")
cg2.setColor(QColorGroup::Text, Qt::blue); cg2.setColor(TQColorGroup::Text, TQt::blue);
else if ( this->text(1) == "Quarantine") else if ( this->text(1) == "Quarantine")
cg2.setColor(QColorGroup::Text, Qt::green); cg2.setColor(TQColorGroup::Text, TQt::green);
KListViewItem::paintCell( p, cg2, column, width, align ); KListViewItem::paintCell( p, cg2, column, width, align );

@ -16,12 +16,12 @@
class KToggleAction; class KToggleAction;
class KURL; class KURL;
class QLineEdit; class TQLineEdit;
class QComboBox; class TQComboBox;
class QCheckBox; class TQCheckBox;
class KListView; class KListView;
class QPushButton; class TQPushButton;
class QLabel; class TQLabel;
class KProcess; class KProcess;
class KConfig; class KConfig;
class KURLRequester; class KURLRequester;
@ -37,14 +37,14 @@ class KListViewSearchLine;
* @author $AUTHOR <$EMAIL> * @author $AUTHOR <$EMAIL>
* @version $APP_VERSION * @version $APP_VERSION
*/ */
class Activityviewer : public QWidget class Activityviewer : public TQWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
/** /**
* Default Constructor * Default Constructor
*/ */
Activityviewer(QWidget *parent, const char *name=0); Activityviewer(TQWidget *parent, const char *name=0);
/** /**
* Default Destructor * Default Destructor
@ -55,21 +55,21 @@ public:
* Use this method to load whatever file/URL you have * Use this method to load whatever file/URL you have
*/ */
void load(); void load();
void setDirName(QString); void setDirName(TQString);
void createQuarDir(); void createQuarDir();
QString getFileName(QString); TQString getFileName(TQString);
QString getVirusName(QString); TQString getVirusName(TQString);
QString getWhen(QString); TQString getWhen(TQString);
QString getSelectedVirusName(); TQString getSelectedVirusName();
void insertItem(const QString &date, const QString &type, const QString &event, const QString &file); void insertItem(const TQString &date, const TQString &type, const TQString &event, const TQString &file);
KListViewSearchLine* kLineEdit1; KListViewSearchLine* kLineEdit1;
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:
/** /**
@ -88,8 +88,8 @@ protected:
private slots: private slots:
void allActivity(); void allActivity();
void allActivityOfType(const QString &type); void allActivityOfType(const TQString &type);
void allActivityOfDate(const QString &days); void allActivityOfDate(const TQString &days);
private: private:
void setupAccel(); void setupAccel();
@ -105,44 +105,44 @@ private:
signals: signals:
void itemSelected(QString abs_filename, int line); void itemSelected(TQString abs_filename, int line);
public slots: public slots:
private slots: private slots:
void slotOptions(); void slotOptions();
//void patternTextChanged( const QString &); //void patternTextChanged( const TQString &);
private: private:
QLineEdit *template_edit; TQLineEdit *template_edit;
QComboBox *check_combo, *days_combo; TQComboBox *check_combo, *days_combo;
KURLRequester *dir_combo; KURLRequester *dir_combo;
QCheckBox *recursive_box; TQCheckBox *recursive_box;
KListView *currentbox; KListView *currentbox;
QPushButton *search_button, *cancel_button, *refresh_button, *search_button3, *cancel_button3; TQPushButton *search_button, *cancel_button, *refresh_button, *search_button3, *cancel_button3;
QLabel *status_label, *matches_label; TQLabel *status_label, *matches_label;
KProcess *childproc; KProcess *childproc;
QString buf; TQString buf;
KConfig* config; KConfig* config;
QStringList lastQuarItems; TQStringList lastQuarItems;
QStringList lastHistoryItems; TQStringList lastHistoryItems;
QStringList lastQuarLocations; TQStringList lastQuarLocations;
QStringList lastSearchPaths; TQStringList lastSearchPaths;
QString quarloc; TQString quarloc;
QPopupMenu* qmenu; TQPopupMenu* qmenu;
QPopupMenu* hmenu; TQPopupMenu* hmenu;
QStringList activity; TQStringList activity;
}; };
class EventListItem : public KListViewItem class EventListItem : public KListViewItem
{ {
public: public:
EventListItem( KListView *parent, QString label1, QString label2 = QString::null, QString label3 = QString::null, QString label4 = QString::null); EventListItem( KListView *parent, TQString label1, TQString label2 = TQString::null, TQString label3 = TQString::null, TQString label4 = TQString::null);
~EventListItem(); ~EventListItem();
void paintCell ( QPainter * p, const QColorGroup & cg, int column, int width, int align ); void paintCell ( TQPainter * p, const TQColorGroup & cg, int column, int width, int align );
}; };

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ArchiveLimits</class> <class>ArchiveLimits</class>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>ArchiveLimits</cstring> <cstring>ArchiveLimits</cstring>
</property> </property>
@ -40,7 +40,7 @@
</rect> </rect>
</property> </property>
</spacer> </spacer>
<widget class="QGroupBox"> <widget class="TQGroupBox">
<property name="name"> <property name="name">
<cstring>LimitsGroup</cstring> <cstring>LimitsGroup</cstring>
</property> </property>
@ -55,7 +55,7 @@
<property name="title"> <property name="title">
<string>Archive Limits</string> <string>Archive Limits</string>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout35</cstring> <cstring>layout35</cstring>
</property> </property>
@ -71,7 +71,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLayoutWidget" row="0" column="0"> <widget class="TQLayoutWidget" row="0" column="0">
<property name="name"> <property name="name">
<cstring>layout34</cstring> <cstring>layout34</cstring>
</property> </property>
@ -79,7 +79,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QLabel" row="0" column="0"> <widget class="TQLabel" row="0" column="0">
<property name="name"> <property name="name">
<cstring>MaxFilesExt</cstring> <cstring>MaxFilesExt</cstring>
</property> </property>
@ -138,7 +138,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel" row="2" column="0"> <widget class="TQLabel" row="2" column="0">
<property name="name"> <property name="name">
<cstring>MaxLevRecur</cstring> <cstring>MaxLevRecur</cstring>
</property> </property>
@ -146,7 +146,7 @@
<string>Maximum Level of Recursion</string> <string>Maximum Level of Recursion</string>
</property> </property>
</widget> </widget>
<widget class="QSpinBox" row="3" column="2"> <widget class="TQSpinBox" row="3" column="2">
<property name="name"> <property name="name">
<cstring>kcfg_MaxScanSize</cstring> <cstring>kcfg_MaxScanSize</cstring>
</property> </property>
@ -157,7 +157,7 @@
<number>9999</number> <number>9999</number>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="1" column="0"> <widget class="TQLabel" row="1" column="0">
<property name="name"> <property name="name">
<cstring>MaxMBsEx</cstring> <cstring>MaxMBsEx</cstring>
</property> </property>
@ -182,7 +182,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QSpinBox" row="1" column="2"> <widget class="TQSpinBox" row="1" column="2">
<property name="name"> <property name="name">
<cstring>kcfg_MaxFileSize</cstring> <cstring>kcfg_MaxFileSize</cstring>
</property> </property>
@ -193,7 +193,7 @@
<number>9999</number> <number>9999</number>
</property> </property>
</widget> </widget>
<widget class="QSpinBox" row="0" column="2"> <widget class="TQSpinBox" row="0" column="2">
<property name="name"> <property name="name">
<cstring>kcfg_NoFilesToExtract</cstring> <cstring>kcfg_NoFilesToExtract</cstring>
</property> </property>
@ -204,7 +204,7 @@
<number>9999</number> <number>9999</number>
</property> </property>
</widget> </widget>
<widget class="QSpinBox" row="2" column="2"> <widget class="TQSpinBox" row="2" column="2">
<property name="name"> <property name="name">
<cstring>kcfg_RecursionLevel</cstring> <cstring>kcfg_RecursionLevel</cstring>
</property> </property>
@ -215,7 +215,7 @@
<number>9999</number> <number>9999</number>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="3" column="0"> <widget class="TQLabel" row="3" column="0">
<property name="name"> <property name="name">
<cstring>MaxCompRatio</cstring> <cstring>MaxCompRatio</cstring>
</property> </property>

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>ArchiveTypes</class> <class>ArchiveTypes</class>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>ArchiveTypes</cstring> <cstring>ArchiveTypes</cstring>
</property> </property>
@ -19,14 +19,14 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QGroupBox"> <widget class="TQGroupBox">
<property name="name"> <property name="name">
<cstring>Archive_Types</cstring> <cstring>Archive_Types</cstring>
</property> </property>
<property name="title"> <property name="title">
<string>Archive Types</string> <string>Archive Types</string>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout8</cstring> <cstring>layout8</cstring>
</property> </property>
@ -42,7 +42,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QCheckBox" row="6" column="0"> <widget class="TQCheckBox" row="6" column="0">
<property name="name"> <property name="name">
<cstring>kcfg_ScanDeb</cstring> <cstring>kcfg_ScanDeb</cstring>
</property> </property>
@ -53,7 +53,7 @@
<string></string> <string></string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="5" column="0"> <widget class="TQCheckBox" row="5" column="0">
<property name="name"> <property name="name">
<cstring>kcfg_ScanJar</cstring> <cstring>kcfg_ScanJar</cstring>
</property> </property>
@ -64,7 +64,7 @@
<string></string> <string></string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="7" column="0"> <widget class="TQCheckBox" row="7" column="0">
<property name="name"> <property name="name">
<cstring>kcfg_ScanTar</cstring> <cstring>kcfg_ScanTar</cstring>
</property> </property>
@ -75,7 +75,7 @@
<string></string> <string></string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="4" column="0"> <widget class="TQCheckBox" row="4" column="0">
<property name="name"> <property name="name">
<cstring>kcfg_ScanLzh</cstring> <cstring>kcfg_ScanLzh</cstring>
</property> </property>
@ -91,7 +91,7 @@
<cstring>kcfg_TarUsing</cstring> <cstring>kcfg_TarUsing</cstring>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="3" column="0"> <widget class="TQCheckBox" row="3" column="0">
<property name="name"> <property name="name">
<cstring>kcfg_ScanZoo</cstring> <cstring>kcfg_ScanZoo</cstring>
</property> </property>
@ -117,7 +117,7 @@
<cstring>kcfg_ZipUsing</cstring> <cstring>kcfg_ZipUsing</cstring>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="1" column="0"> <widget class="TQCheckBox" row="1" column="0">
<property name="name"> <property name="name">
<cstring>kcfg_ScanRar</cstring> <cstring>kcfg_ScanRar</cstring>
</property> </property>
@ -128,7 +128,7 @@
<string></string> <string></string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="0" column="0"> <widget class="TQCheckBox" row="0" column="0">
<property name="name"> <property name="name">
<cstring>kcfg_ScanZip</cstring> <cstring>kcfg_ScanZip</cstring>
</property> </property>
@ -159,7 +159,7 @@
<cstring>kcfg_TgzUsing</cstring> <cstring>kcfg_TgzUsing</cstring>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="8" column="0"> <widget class="TQCheckBox" row="8" column="0">
<property name="name"> <property name="name">
<cstring>kcfg_ScanTgz</cstring> <cstring>kcfg_ScanTgz</cstring>
</property> </property>
@ -175,7 +175,7 @@
<cstring>kcfg_ArjUsing</cstring> <cstring>kcfg_ArjUsing</cstring>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="2" column="0"> <widget class="TQCheckBox" row="2" column="0">
<property name="name"> <property name="name">
<cstring>kcfg_ScanArj</cstring> <cstring>kcfg_ScanArj</cstring>
</property> </property>

@ -815,7 +815,7 @@ wizardbase.cpp: $(srcdir)/wizardbase.ui wizardbase.h wizardbase.moc
wizardbase.h: $(srcdir)/wizardbase.ui wizardbase.h: $(srcdir)/wizardbase.ui
rm -rf wizardbase.h; rm -rf wizardbase.h;
$(UIC) $(srcdir)/wizardbase.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include <qwizard.h>,#include <kwizard.h>,g" >> wizardbase.h ; $(UIC) $(srcdir)/wizardbase.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include <tqwizard.h>,#include <kwizard.h>,g" >> wizardbase.h ;
wizardbase.moc: wizardbase.h wizardbase.moc: wizardbase.h
$(MOC) wizardbase.h -o wizardbase.moc $(MOC) wizardbase.h -o wizardbase.moc
@ -830,6 +830,6 @@ logdialog.cpp: $(srcdir)/logdialog.ui logdialog.h logdialog.moc
logdialog.h: $(srcdir)/logdialog.ui logdialog.h: $(srcdir)/logdialog.ui
rm -rf logdialog.h; rm -rf logdialog.h;
$(UIC) $(srcdir)/logdialog.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include <qwizard.h>,#include <kwizard.h>,g" >> logdialog.h ; $(UIC) $(srcdir)/logdialog.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include <tqwizard.h>,#include <kwizard.h>,g" >> logdialog.h ;
logdialog.moc: logdialog.h logdialog.moc: logdialog.h
$(MOC) logdialog.h -o logdialog.moc $(MOC) logdialog.h -o logdialog.moc

@ -169,9 +169,9 @@ static const unsigned char uninstaller_sh_data[] = {
0x74,0x0a,0x64,0x6f,0x6e,0x65,0x0a,0x09,0x09,0x0a 0x74,0x0a,0x64,0x6f,0x6e,0x65,0x0a,0x09,0x09,0x0a
}; };
#include <qimage.h> #include <tqimage.h>
#include <qdict.h> #include <tqdict.h>
static const QRgb misc_data[] = { static const TQRgb misc_data[] = {
0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f, 0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,
0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffcfcfc,0xfffbfbfb,0xfff9f9f9, 0xff8f8f8f,0xff8f8f8f,0xff8f8f8f,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffcfcfc,0xfffbfbfb,0xfff9f9f9,
0xfff7f7f7,0xfff6f6f6,0xffffffff,0xff8f8f8f,0xff8f8f8f,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffbfbfb,0xfffafafa,0xfff8f8f8, 0xfff7f7f7,0xfff6f6f6,0xffffffff,0xff8f8f8f,0xff8f8f8f,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xffffffff,0xfffefefe,0xfffbfbfb,0xfffafafa,0xfff8f8f8,
@ -193,7 +193,7 @@ static const QRgb misc_data[] = {
0x0,0x0,0x0,0x0 0x0,0x0,0x0,0x0
}; };
static const QRgb splash_data[] = { static const TQRgb splash_data[] = {
0xff40bdff,0xff60cbff,0xff50c5ff,0xff61ccff,0xff51c5ff,0xff62ccff,0xff62ccff,0xff63ccff,0xff63ccff,0xff43c1ff,0xff64cdff,0xff54c8ff,0xff65ceff,0xff65ceff, 0xff40bdff,0xff60cbff,0xff50c5ff,0xff61ccff,0xff51c5ff,0xff62ccff,0xff62ccff,0xff63ccff,0xff63ccff,0xff43c1ff,0xff64cdff,0xff54c8ff,0xff65ceff,0xff65ceff,
0xff55c8ff,0xff46c3ff,0xff67cfff,0xff47c3ff,0xff57cbff,0xff78d5ff,0xff68cfff,0xff57cbff,0xff46c3ff,0xff46c3ff,0xff66cfff,0xff45c2ff,0xff54c8ff,0xff75d3ff, 0xff55c8ff,0xff46c3ff,0xff67cfff,0xff47c3ff,0xff57cbff,0xff78d5ff,0xff68cfff,0xff57cbff,0xff46c3ff,0xff46c3ff,0xff66cfff,0xff45c2ff,0xff54c8ff,0xff75d3ff,
0xff43c1ff,0xff44c0ff,0xff43c1ff,0xff42c0ff,0xff63ccff,0xff41c0ff,0xff41bfff,0xff61ccff,0xff60ccff,0xff60ccff,0xff5fcbff,0xff3fbcff,0xff4fc2ff,0xff5fc9ff, 0xff43c1ff,0xff44c0ff,0xff43c1ff,0xff42c0ff,0xff63ccff,0xff41c0ff,0xff41bfff,0xff61ccff,0xff60ccff,0xff60ccff,0xff5fcbff,0xff3fbcff,0xff4fc2ff,0xff5fc9ff,
@ -2982,7 +2982,7 @@ static const QRgb splash_data[] = {
0xff26b0ff,0xff51bfff,0xff26afff,0xff26b0ff,0xff26b0ff,0xff52c1ff,0xff27b1ff,0xff28b2ff,0xff54c1ff,0xff29b2ff 0xff26b0ff,0xff51bfff,0xff26afff,0xff26b0ff,0xff26b0ff,0xff52c1ff,0xff27b1ff,0xff28b2ff,0xff54c1ff,0xff29b2ff
}; };
static const QRgb packageIcon_data[] = { static const TQRgb packageIcon_data[] = {
0xffffff,0xd06e6e6e,0xf68e8f8f,0xf2898a8b,0xf288898b,0xf288898b,0xf288898a,0xf288888a,0xf287888a,0xf288898a,0xf288898a,0xf288888a,0xf288888a,0xf287888a, 0xffffff,0xd06e6e6e,0xf68e8f8f,0xf2898a8b,0xf288898b,0xf288898b,0xf288898a,0xf288888a,0xf287888a,0xf288898a,0xf288898a,0xf288888a,0xf288888a,0xf287888a,
0xf2878889,0xf2878889,0xf2878889,0xf2868789,0xf2868789,0xf2868788,0xf2868788,0xf2868688,0xf2858688,0xf2858688,0xf2858687,0xf2858687,0xf2848687,0xf2848587, 0xf2878889,0xf2878889,0xf2878889,0xf2868789,0xf2868789,0xf2868788,0xf2868788,0xf2868688,0xf2858688,0xf2858688,0xf2858687,0xf2858687,0xf2848687,0xf2848587,
0xf3858688,0xf2838384,0xc56b6b6b,0xffffff,0xffffff,0xd76f6f6f,0xfff7faff,0xfff0f5ff,0xffedf3ff,0xffeef4ff,0xffebf2fe,0xffeaf1fe,0xffebf2fe,0xffdce8fb, 0xf3858688,0xf2838384,0xc56b6b6b,0xffffff,0xffffff,0xd76f6f6f,0xfff7faff,0xfff0f5ff,0xffedf3ff,0xffeef4ff,0xffebf2fe,0xffeaf1fe,0xffebf2fe,0xffdce8fb,
@ -3059,7 +3059,7 @@ static const QRgb packageIcon_data[] = {
0x0,0xffffff 0x0,0xffffff
}; };
#include <qcstring.h> #include <tqcstring.h>
static struct Embed { static struct Embed {
unsigned int size; unsigned int size;
const unsigned char *data; const unsigned char *data;
@ -3070,14 +3070,14 @@ static struct Embed {
{ 0, 0, 0 } { 0, 0, 0 }
}; };
static const QByteArray& qembed_findData( const char* name ) static const TQByteArray& qembed_findData( const char* name )
{ {
static QDict<QByteArray> dict; static TQDict<TQByteArray> dict;
QByteArray* ba = dict.find( name ); TQByteArray* ba = dict.find( name );
if ( !ba ) { if ( !ba ) {
for ( int i = 0; embed_vec[i].data; i++ ) { for ( int i = 0; embed_vec[i].data; i++ ) {
if ( strcmp(embed_vec[i].name, name) == 0 ) { if ( strcmp(embed_vec[i].name, name) == 0 ) {
ba = new QByteArray; ba = new TQByteArray;
ba->setRawData( (char*)embed_vec[i].data, ba->setRawData( (char*)embed_vec[i].data,
embed_vec[i].size ); embed_vec[i].size );
dict.insert( name, ba ); dict.insert( name, ba );
@ -3085,7 +3085,7 @@ static const QByteArray& qembed_findData( const char* name )
} }
} }
if ( !ba ) { if ( !ba ) {
static QByteArray dummy; static TQByteArray dummy;
return dummy; return dummy;
} }
} }
@ -3096,7 +3096,7 @@ static struct EmbedImage {
int width, height, depth; int width, height, depth;
const unsigned char *data; const unsigned char *data;
int numColors; int numColors;
const QRgb *colorTable; const TQRgb *colorTable;
bool alpha; bool alpha;
const char *name; const char *name;
} embed_image_vec[] = { } embed_image_vec[] = {
@ -3106,20 +3106,20 @@ static struct EmbedImage {
{ 0, 0, 0, 0, 0, 0, 0, 0 } { 0, 0, 0, 0, 0, 0, 0, 0 }
}; };
static const QImage& qembed_findImage( const QString& name ) static const TQImage& qembed_findImage( const TQString& name )
{ {
static QDict<QImage> dict; static TQDict<TQImage> dict;
QImage* img = dict.find( name ); TQImage* img = dict.find( name );
if ( !img ) { if ( !img ) {
for ( int i = 0; embed_image_vec[i].data; i++ ) { for ( int i = 0; embed_image_vec[i].data; i++ ) {
if ( strcmp(embed_image_vec[i].name, name.latin1()) == 0 ) { if ( strcmp(embed_image_vec[i].name, name.latin1()) == 0 ) {
img = new QImage((uchar*)embed_image_vec[i].data, img = new TQImage((uchar*)embed_image_vec[i].data,
embed_image_vec[i].width, embed_image_vec[i].width,
embed_image_vec[i].height, embed_image_vec[i].height,
embed_image_vec[i].depth, embed_image_vec[i].depth,
(QRgb*)embed_image_vec[i].colorTable, (TQRgb*)embed_image_vec[i].colorTable,
embed_image_vec[i].numColors, embed_image_vec[i].numColors,
QImage::BigEndian ); TQImage::BigEndian );
if ( embed_image_vec[i].alpha ) if ( embed_image_vec[i].alpha )
img->setAlphaBuffer( TRUE ); img->setAlphaBuffer( TRUE );
dict.insert( name, img ); dict.insert( name, img );
@ -3127,7 +3127,7 @@ static const QImage& qembed_findImage( const QString& name )
} }
} }
if ( !img ) { if ( !img ) {
static QImage dummy; static TQImage dummy;
return dummy; return dummy;
} }
} }

@ -19,19 +19,19 @@
***************************************************************************/ ***************************************************************************/
#include "headerlistitem.h" #include "headerlistitem.h"
#include <qfontmetrics.h> #include <tqfontmetrics.h>
#include <qpainter.h> #include <tqpainter.h>
#include <qapplication.h> #include <tqapplication.h>
#include "uninstallwizard.h" #include "uninstallwizard.h"
#include "wizard.h" #include "wizard.h"
HeaderListItem::HeaderListItem(QListView* parent) HeaderListItem::HeaderListItem(TQListView* parent)
: QListViewItem(parent) : TQListViewItem(parent)
{ {
} }
int HeaderListItem::compare(QListViewItem* i, int col, bool ascending) const int HeaderListItem::compare(TQListViewItem* i, int col, bool ascending) const
{ {
switch (i->rtti()) switch (i->rtti())
{ {
@ -64,20 +64,20 @@ int HeaderListItem::compare(QListViewItem* i, int col, bool ascending) const
return 0; return 0;
} }
void HeaderListItem::paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align) void HeaderListItem::paintCell(TQPainter* p, const TQColorGroup& cg, int column, int width, int align)
{ {
p->fillRect(0, 0, width, height(), cg.base()); p->fillRect(0, 0, width, height(), cg.base());
QFont boldFont = p->font(); TQFont boldFont = p->font();
boldFont.setBold(true); boldFont.setBold(true);
p->setFont(boldFont); p->setFont(boldFont);
p->drawText(listView()->itemMargin(), listView()->itemMargin(), width, QFontMetrics(boldFont).height(), Qt::AlignLeft, text(0)); p->drawText(listView()->itemMargin(), listView()->itemMargin(), width, TQFontMetrics(boldFont).height(), TQt::AlignLeft, text(0));
int textWidth = QFontMetrics(boldFont).width(text(0)); int textWidth = TQFontMetrics(boldFont).width(text(0));
p->fillRect(0, height() - 4 - listView()->itemMargin(), textWidth-10, 4, cg.highlight()); p->fillRect(0, height() - 4 - listView()->itemMargin(), textWidth-10, 4, cg.highlight());
QColor ca = cg.highlight(); TQColor ca = cg.highlight();
QColor cb = cg.base(); TQColor cb = cg.base();
// Taken from KPixmapEffect::gradient // Taken from KPixmapEffect::gradient
int rDiff, gDiff, bDiff; int rDiff, gDiff, bDiff;
int rca, gca, bca /*, rcb, gcb, bcb*/; int rca, gca, bca /*, rcb, gcb, bcb*/;
@ -101,26 +101,26 @@ void HeaderListItem::paintCell(QPainter* p, const QColorGroup& cg, int column, i
gl += gcdelta; gl += gcdelta;
bl += bcdelta; bl += bcdelta;
p->setPen(QColor(rl>>16, gl>>16, bl>>16)); p->setPen(TQColor(rl>>16, gl>>16, bl>>16));
p->drawLine(x, height() - 4 - listView()->itemMargin(), x, height() - listView()->itemMargin() - 1); p->drawLine(x, height() - 4 - listView()->itemMargin(), x, height() - listView()->itemMargin() - 1);
} }
} }
void HeaderListItem::paintFocus(QPainter* p, const QColorGroup& cg, const QRect& r) void HeaderListItem::paintFocus(TQPainter* p, const TQColorGroup& cg, const TQRect& r)
{ {
} }
int HeaderListItem::width(const QFontMetrics& fm, const QListView* lv, int c) const int HeaderListItem::width(const TQFontMetrics& fm, const TQListView* lv, int c) const
{ {
QFont boldFont = qApp->font(); TQFont boldFont = tqApp->font();
boldFont.setBold(true); boldFont.setBold(true);
QFontMetrics metrics(boldFont); TQFontMetrics metrics(boldFont);
return metrics.width(text(0)) + lv->itemMargin() + 10; return metrics.width(text(0)) + lv->itemMargin() + 10;
} }
void HeaderListItem::setup() void HeaderListItem::setup()
{ {
setHeight(qApp->fontMetrics().height() + listView()->itemMargin()*3 + 4); setHeight(tqApp->fontMetrics().height() + listView()->itemMargin()*3 + 4);
} }

@ -20,17 +20,17 @@
#ifndef HEADERLISTITEM_H #ifndef HEADERLISTITEM_H
#define HEADERLISTITEM_H #define HEADERLISTITEM_H
#include <qlistview.h> #include <tqlistview.h>
class HeaderListItem : public QListViewItem class HeaderListItem : public TQListViewItem
{ {
public: public:
HeaderListItem(QListView* parent); HeaderListItem(TQListView* parent);
int compare(QListViewItem* i, int col, bool ascending) const; int compare(TQListViewItem* i, int col, bool ascending) const;
void paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align); void paintCell(TQPainter* p, const TQColorGroup& cg, int column, int width, int align);
void paintFocus(QPainter* p, const QColorGroup& cg, const QRect& r); void paintFocus(TQPainter* p, const TQColorGroup& cg, const TQRect& r);
void setup(); void setup();
int width(const QFontMetrics& fm, const QListView* lv, int c) const; int width(const TQFontMetrics& fm, const TQListView* lv, int c) const;
int rtti() const { return 1002; } int rtti() const { return 1002; }
int section; int section;

@ -27,25 +27,25 @@
#include <unistd.h> #include <unistd.h>
#include <sys/types.h> #include <sys/types.h>
#include <qapplication.h> #include <tqapplication.h>
#include "wizard.h" #include "wizard.h"
#include "uninstallwizard.h" #include "uninstallwizard.h"
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
QApplication app(argc, argv); TQApplication app(argc, argv);
// Check if we're root // Check if we're root
if (getuid() != 0) if (getuid() != 0)
{ {
QString command = "kdesu -i klamav -n -c \""; TQString command = "kdesu -i klamav -n -c \"";
for (int i=0 ; i<app.argc() ; i++) for (int i=0 ; i<app.argc() ; i++)
{ {
if (QString(app.argv()[i]).contains(" ")) if (TQString(app.argv()[i]).contains(" "))
command += "\\\"" + QString(app.argv()[i]) + "\\\" "; command += "\\\"" + TQString(app.argv()[i]) + "\\\" ";
else else
command += QString(app.argv()[i]) + " "; command += TQString(app.argv()[i]) + " ";
} }
command += "\""; command += "\"";
return system(command.latin1()); return system(command.latin1());
@ -55,14 +55,14 @@ int main(int argc, char *argv[])
for ( int i = 1; i < app.argc(); i++ ) for ( int i = 1; i < app.argc(); i++ )
{ {
if (QString(app.argv()[i]) == "--help") if (TQString(app.argv()[i]) == "--help")
{ {
printf("Arkollon is a utility to aid installation and removal of packages from source.\n"); printf("Arkollon is a utility to aid installation and removal of packages from source.\n");
printf("Usage: arkollon DIRECTORY Installs a source package from DIRECTORY\n"); printf("Usage: arkollon DIRECTORY Installs a source package from DIRECTORY\n");
printf(" arkollon --uninstall Starts the uninstaller\n"); printf(" arkollon --uninstall Starts the uninstaller\n");
return 0; return 0;
} }
if (QString(app.argv()[i]) == "--uninstall") if (TQString(app.argv()[i]) == "--uninstall")
wizard = new UninstallWizard(NULL); wizard = new UninstallWizard(NULL);
} }

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>LogDialog</class> <class>LogDialog</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>LogDialog</cstring> <cstring>LogDialog</cstring>
</property> </property>
@ -22,7 +22,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QTextEdit"> <widget class="TQTextEdit">
<property name="name"> <property name="name">
<cstring>logBox</cstring> <cstring>logBox</cstring>
</property> </property>
@ -33,7 +33,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout8</cstring> <cstring>layout8</cstring>
</property> </property>
@ -58,7 +58,7 @@
</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>

@ -19,9 +19,9 @@
***************************************************************************/ ***************************************************************************/
#include "rcparser.h" #include "rcparser.h"
#include <qregexp.h> #include <tqregexp.h>
#include <qfile.h> #include <tqfile.h>
#include <qtextstream.h> #include <tqtextstream.h>
RcParser::RcParser() RcParser::RcParser()
{ {
@ -32,18 +32,18 @@ RcParser::~RcParser()
{ {
} }
void RcParser::addSearchDir(QString dir) void RcParser::addSearchDir(TQString dir)
{ {
dirs.append(dir); dirs.append(dir);
} }
bool RcParser::openFile(QString name) bool RcParser::openFile(TQString name)
{ {
// Check if it exists // Check if it exists
fileName = ""; fileName = "";
for ( QStringList::Iterator it = dirs.begin(); it != dirs.end(); ++it ) for ( TQStringList::Iterator it = dirs.begin(); it != dirs.end(); ++it )
{ {
if (QFile::exists((*it) + "/" + name)) if (TQFile::exists((*it) + "/" + name))
{ {
fileName = (*it) + "/" + name; fileName = (*it) + "/" + name;
break; break;
@ -57,17 +57,17 @@ bool RcParser::openFile(QString name)
sections.clear(); sections.clear();
// Read the file's contents // Read the file's contents
QFile file(fileName); TQFile file(fileName);
file.open(IO_ReadOnly); file.open(IO_ReadOnly);
QTextStream stream(&file); TQTextStream stream(&file);
QRegExp sectionRegExp("^\\[([^\\]]*)\\]$"); TQRegExp sectionRegExp("^\\[([^\\]]*)\\]$");
QRegExp pairRegExp("^([^=\\s]*)([=\\s]*)(.*)$"); TQRegExp pairRegExp("^([^=\\s]*)([=\\s]*)(.*)$");
currentSection = "RcParserDefaultSection"; currentSection = "RcParserDefaultSection";
while (!stream.atEnd()) while (!stream.atEnd())
{ {
QString line = stream.readLine(); TQString line = stream.readLine();
if (line.left(1) == "#") // Comment if (line.left(1) == "#") // Comment
continue; continue;
@ -81,8 +81,8 @@ bool RcParser::openFile(QString name)
} }
if (pairRegExp.search(line) != -1) if (pairRegExp.search(line) != -1)
{ {
QString key = pairRegExp.cap(1); TQString key = pairRegExp.cap(1);
QString value = pairRegExp.cap(3); TQString value = pairRegExp.cap(3);
sections[currentSection][key] = value; sections[currentSection][key] = value;
//printf("Found pair \"%s\" = \"%s\"\n", key.latin1(), value.latin1()); //printf("Found pair \"%s\" = \"%s\"\n", key.latin1(), value.latin1());
continue; continue;
@ -95,25 +95,25 @@ bool RcParser::openFile(QString name)
return true; return true;
} }
void RcParser::setSection(QString section) void RcParser::setSection(TQString section)
{ {
currentSection = section; currentSection = section;
} }
QStringList RcParser::sectionList() TQStringList RcParser::sectionList()
{ {
return sections.keys(); return sections.keys();
} }
QString RcParser::readString(QString key, QString def) TQString RcParser::readString(TQString key, TQString def)
{ {
QString ret = sections[currentSection][key]; TQString ret = sections[currentSection][key];
if (ret.isEmpty()) if (ret.isEmpty())
return def; return def;
return ret; return ret;
} }
int RcParser::readInt(QString key, int def) int RcParser::readInt(TQString key, int def)
{ {
bool ok; bool ok;
int ret = sections[currentSection][key].toInt(&ok); int ret = sections[currentSection][key].toInt(&ok);
@ -122,7 +122,7 @@ int RcParser::readInt(QString key, int def)
return ret; return ret;
} }
bool RcParser::readBool(QString key, bool def) bool RcParser::readBool(TQString key, bool def)
{ {
bool ret = def; bool ret = def;
if (sections[currentSection][key].lower() == "true") if (sections[currentSection][key].lower() == "true")
@ -136,9 +136,9 @@ bool RcParser::readBool(QString key, bool def)
return ret; return ret;
} }
QStringList RcParser::readList(QString key) TQStringList RcParser::readList(TQString key)
{ {
return QStringList::split(",", sections[currentSection][key]); return TQStringList::split(",", sections[currentSection][key]);
} }

@ -20,8 +20,8 @@
#ifndef RCPARSER_H #ifndef RCPARSER_H
#define RCPARSER_H #define RCPARSER_H
#include <qstringlist.h> #include <tqstringlist.h>
#include <qmap.h> #include <tqmap.h>
class RcParser class RcParser
{ {
@ -29,22 +29,22 @@ public:
RcParser(); RcParser();
~RcParser(); ~RcParser();
void addSearchDir(QString dir); void addSearchDir(TQString dir);
bool openFile(QString name); bool openFile(TQString name);
QStringList sectionList(); TQStringList sectionList();
void setSection(QString section); void setSection(TQString section);
QString readString(QString key, QString def=QString::null); TQString readString(TQString key, TQString def=TQString::null);
int readInt(QString key, int def=0); int readInt(TQString key, int def=0);
bool readBool(QString key, bool def=false); bool readBool(TQString key, bool def=false);
QStringList readList(QString key); TQStringList readList(TQString key);
private: private:
QStringList dirs; TQStringList dirs;
QString fileName; TQString fileName;
QString currentSection; TQString currentSection;
QMap< QString, QMap< QString, QString> > sections; TQMap< TQString, TQMap< TQString, TQString> > sections;
}; };
#endif #endif

@ -23,20 +23,20 @@
#include "headerlistitem.h" #include "headerlistitem.h"
#include "data.h" #include "data.h"
#include <qregexp.h> #include <tqregexp.h>
#include <qwidgetstack.h> #include <tqwidgetstack.h>
#include <qfile.h> #include <tqfile.h>
#include <qtextstream.h> #include <tqtextstream.h>
#include <qheader.h> #include <tqheader.h>
#include <qlistbox.h> #include <tqlistbox.h>
#include <qmessagebox.h> #include <tqmessagebox.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qlineedit.h> #include <tqlineedit.h>
#include <qtextedit.h> #include <tqtextedit.h>
#include <qlabel.h> #include <tqlabel.h>
AppListItem::AppListItem(QString nN, QString n, QListView* parent) AppListItem::AppListItem(TQString nN, TQString n, TQListView* parent)
: QCheckListItem(parent, "", QCheckListItem::CheckBox) : TQCheckListItem(parent, "", TQCheckListItem::CheckBox)
{ {
niceName = nN; niceName = nN;
name = n; name = n;
@ -45,7 +45,7 @@ AppListItem::AppListItem(QString nN, QString n, QListView* parent)
setText(0, niceName); setText(0, niceName);
} }
int AppListItem::compare(QListViewItem* i, int col, bool ascending) const int AppListItem::compare(TQListViewItem* i, int col, bool ascending) const
{ {
switch (i->rtti()) switch (i->rtti())
{ {
@ -56,7 +56,7 @@ int AppListItem::compare(QListViewItem* i, int col, bool ascending) const
return -1; return -1;
if (section > item->section) if (section > item->section)
return 1; return 1;
return QListViewItem::compare(i, col, ascending); return TQListViewItem::compare(i, col, ascending);
} }
break; break;
@ -73,7 +73,7 @@ int AppListItem::compare(QListViewItem* i, int col, bool ascending) const
} }
UninstallWizard::UninstallWizard(QWidget* parent, const char* name, bool modal, WFlags fl) UninstallWizard::UninstallWizard(TQWidget* parent, const char* name, bool modal, WFlags fl)
: WizardBase(parent,name, modal,fl) : WizardBase(parent,name, modal,fl)
{ {
mainStack->raiseWidget(1); mainStack->raiseWidget(1);
@ -89,16 +89,16 @@ UninstallWizard::UninstallWizard(QWidget* parent, const char* name, bool modal,
icon.convertFromImage(qembed_findImage("misc")); icon.convertFromImage(qembed_findImage("misc"));
externalProcess = new QProcess(this); externalProcess = new TQProcess(this);
connect(externalProcess, SIGNAL(processExited()), SLOT(processExited())); connect(externalProcess, SIGNAL(processExited()), SLOT(processExited()));
connect(externalProcess, SIGNAL(readyReadStdout()), SLOT(readyReadStdout())); connect(externalProcess, SIGNAL(readyReadStdout()), SLOT(readyReadStdout()));
connect(externalProcess, SIGNAL(readyReadStderr()), SLOT(readyReadStderr())); connect(externalProcess, SIGNAL(readyReadStderr()), SLOT(readyReadStderr()));
QFile uninstallScript("/tmp/arkollon-uninstall.sh"); TQFile uninstallScript("/tmp/arkollon-uninstall.sh");
if (uninstallScript.exists()) if (uninstallScript.exists())
uninstallScript.remove(); uninstallScript.remove();
uninstallScript.open(IO_WriteOnly); uninstallScript.open(IO_WriteOnly);
QDataStream stream(&uninstallScript); TQDataStream stream(&uninstallScript);
stream.writeRawBytes((const char*)uninstaller_sh_data, uninstaller_sh_len); stream.writeRawBytes((const char*)uninstaller_sh_data, uninstaller_sh_len);
uninstallScript.close(); uninstallScript.close();
@ -111,7 +111,7 @@ UninstallWizard::UninstallWizard(QWidget* parent, const char* name, bool modal,
UninstallWizard::~UninstallWizard() UninstallWizard::~UninstallWizard()
{ {
QFile uninstallScript("/tmp/arkollon-uninstall.sh"); TQFile uninstallScript("/tmp/arkollon-uninstall.sh");
if (uninstallScript.exists()) if (uninstallScript.exists())
uninstallScript.remove(); uninstallScript.remove();
} }
@ -151,10 +151,10 @@ void UninstallWizard::nextPressed()
if (currentId == 0) if (currentId == 0)
{ {
bool checked = false; bool checked = false;
QStringList argList; TQStringList argList;
argList.append("/bin/sh"); argList.append("/bin/sh");
argList.append("/tmp/arkollon-uninstall.sh"); argList.append("/tmp/arkollon-uninstall.sh");
for ( QListViewItem * myChild = appList->firstChild() ; myChild != NULL ; myChild = myChild->nextSibling()) for ( TQListViewItem * myChild = appList->firstChild() ; myChild != NULL ; myChild = myChild->nextSibling())
{ {
if (myChild->rtti() != 1003) if (myChild->rtti() != 1003)
continue; continue;
@ -167,7 +167,7 @@ void UninstallWizard::nextPressed()
} }
if (!checked) if (!checked)
{ {
QMessageBox::warning(this, "Error", "You need to select at least one package to remove", QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton); TQMessageBox::warning(this, "Error", "You need to select at least one package to remove", TQMessageBox::Ok, TQMessageBox::NoButton, TQMessageBox::NoButton);
return; return;
} }
fileList->clear(); fileList->clear();
@ -192,7 +192,7 @@ void UninstallWizard::processExited()
case ListingPackages: case ListingPackages:
if (appList->childCount() <= 0) if (appList->childCount() <= 0)
{ {
QMessageBox::warning(NULL, "Warning", "There are no packages installed", QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton); TQMessageBox::warning(NULL, "Warning", "There are no packages installed", TQMessageBox::Ok, TQMessageBox::NoButton, TQMessageBox::NoButton);
reject(); reject();
return; return;
} }
@ -216,14 +216,14 @@ void UninstallWizard::readyReadStdout()
{ {
while (externalProcess->canReadLineStdout()) while (externalProcess->canReadLineStdout())
{ {
QString line = externalProcess->readLineStdout(); TQString line = externalProcess->readLineStdout();
if (line.isEmpty()) if (line.isEmpty())
continue; continue;
// See if it already exists // See if it already exists
bool exists = false; bool exists = false;
for ( QListViewItem * myChild = appList->firstChild() ; myChild != NULL ; myChild = myChild->nextSibling()) for ( TQListViewItem * myChild = appList->firstChild() ; myChild != NULL ; myChild = myChild->nextSibling())
{ {
if (myChild->rtti() != 1003) if (myChild->rtti() != 1003)
continue; continue;
@ -237,7 +237,7 @@ void UninstallWizard::readyReadStdout()
if (exists) if (exists)
continue; continue;
QString niceName = line.left(line.findRev(':')); TQString niceName = line.left(line.findRev(':'));
niceName = niceName.left(1).upper() + niceName.right(niceName.length()-1); niceName = niceName.left(1).upper() + niceName.right(niceName.length()-1);
new AppListItem(niceName, line, appList); new AppListItem(niceName, line, appList);
@ -254,7 +254,7 @@ void UninstallWizard::readyReadStdout()
{ {
while (externalProcess->canReadLineStdout()) while (externalProcess->canReadLineStdout())
{ {
QString line = externalProcess->readLineStdout(); TQString line = externalProcess->readLineStdout();
if (line.isEmpty()) if (line.isEmpty())
continue; continue;
fileList->insertItem(icon, line.left(line.find(" "))); fileList->insertItem(icon, line.left(line.find(" ")));
@ -264,10 +264,10 @@ void UninstallWizard::readyReadStdout()
case RemovingGlobal: case RemovingGlobal:
while (externalProcess->canReadLineStdout()) while (externalProcess->canReadLineStdout())
{ {
QString line = externalProcess->readLineStdout(); TQString line = externalProcess->readLineStdout();
if (line.isEmpty()) if (line.isEmpty())
continue; continue;
line.replace(QRegExp("\\033[^m]*m"), ""); line.replace(TQRegExp("\\033[^m]*m"), "");
logDialog->logBox->append(line); logDialog->logBox->append(line);
} }
break; break;
@ -278,10 +278,10 @@ void UninstallWizard::readyReadStderr()
{ {
while (externalProcess->canReadLineStdout()) while (externalProcess->canReadLineStdout())
{ {
QString line = externalProcess->readLineStdout(); TQString line = externalProcess->readLineStdout();
if (line.isEmpty()) if (line.isEmpty())
continue; continue;
line.replace(QRegExp("\\033[^m]*m"), ""); line.replace(TQRegExp("\\033[^m]*m"), "");
logDialog->logBox->append(line); logDialog->logBox->append(line);
} }
} }
@ -292,10 +292,10 @@ void UninstallWizard::removeUserPackages()
previousButton->setEnabled(false); previousButton->setEnabled(false);
// Find out which packages belong to the user, and uninstall them // Find out which packages belong to the user, and uninstall them
QStringList argList; TQStringList argList;
argList.append("/bin/sh"); argList.append("/bin/sh");
argList.append("/tmp/arkollon-uninstall.sh"); argList.append("/tmp/arkollon-uninstall.sh");
for ( QListViewItem * myChild = appList->firstChild() ; myChild != NULL ; myChild = myChild->nextSibling()) for ( TQListViewItem * myChild = appList->firstChild() ; myChild != NULL ; myChild = myChild->nextSibling())
{ {
if (myChild->rtti() != 1003) if (myChild->rtti() != 1003)
continue; continue;

@ -25,20 +25,20 @@
#include "logdialog.h" #include "logdialog.h"
#include "headerlistitem.h" #include "headerlistitem.h"
#include <qlistview.h> #include <tqlistview.h>
#include <qprocess.h> #include <tqprocess.h>
#include <qpixmap.h> #include <tqpixmap.h>
class AppListItem : public QCheckListItem class AppListItem : public TQCheckListItem
{ {
public: public:
AppListItem(QString nN, QString n, QListView* lv); AppListItem(TQString nN, TQString n, TQListView* lv);
int compare(QListViewItem* i, int col, bool ascending) const; int compare(TQListViewItem* i, int col, bool ascending) const;
int rtti() const { return 1003; } int rtti() const { return 1003; }
QString niceName; TQString niceName;
QString name; TQString name;
int section; int section;
}; };
@ -49,7 +49,7 @@ class UninstallWizard : public WizardBase
Q_OBJECT Q_OBJECT
public: public:
UninstallWizard(QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); UninstallWizard(TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~UninstallWizard(); ~UninstallWizard();
public slots: public slots:
@ -77,10 +77,10 @@ private:
} currentStage; } currentStage;
LogDialog* logDialog; LogDialog* logDialog;
QProcess* externalProcess; TQProcess* externalProcess;
HeaderListItem* globalHeader; HeaderListItem* globalHeader;
QPixmap icon; TQPixmap icon;
}; };
#endif #endif

@ -19,31 +19,31 @@
***************************************************************************/ ***************************************************************************/
#include "wizard.h" #include "wizard.h"
#include <qfiledialog.h> #include <tqfiledialog.h>
#include <qwidgetstack.h> #include <tqwidgetstack.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qpainter.h> #include <tqpainter.h>
#include <qheader.h> #include <tqheader.h>
#include <qapplication.h> #include <tqapplication.h>
#include <qmessagebox.h> #include <tqmessagebox.h>
#include <qprogressbar.h> #include <tqprogressbar.h>
#include <qradiobutton.h> #include <tqradiobutton.h>
#include <qtextedit.h> #include <tqtextedit.h>
#include <qlineedit.h> #include <tqlineedit.h>
#include <qpopupmenu.h> #include <tqpopupmenu.h>
#include <qhbox.h> #include <tqhbox.h>
#include <qfileinfo.h> #include <tqfileinfo.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qfontmetrics.h> #include <tqfontmetrics.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include "data.h" #include "data.h"
#include "rcparser.h" #include "rcparser.h"
#include "headerlistitem.h" #include "headerlistitem.h"
ComponentListItem::ComponentListItem(struct Component c, QListView* parent) ComponentListItem::ComponentListItem(struct Component c, TQListView* parent)
: QCheckListItem(parent, "", QCheckListItem::CheckBox) : TQCheckListItem(parent, "", TQCheckListItem::CheckBox)
{ {
component = c; component = c;
setText(0, c.niceName); setText(0, c.niceName);
@ -59,7 +59,7 @@ ComponentListItem::ComponentListItem(struct Component c, QListView* parent)
section=0; section=0;
} }
int ComponentListItem::compare(QListViewItem* i, int col, bool ascending) const int ComponentListItem::compare(TQListViewItem* i, int col, bool ascending) const
{ {
switch (i->rtti()) switch (i->rtti())
{ {
@ -70,7 +70,7 @@ int ComponentListItem::compare(QListViewItem* i, int col, bool ascending) const
return -1; return -1;
if (section > item->section) if (section > item->section)
return 1; return 1;
return QListViewItem::compare(i, col, ascending); return TQListViewItem::compare(i, col, ascending);
} }
break; break;
@ -88,13 +88,13 @@ int ComponentListItem::compare(QListViewItem* i, int col, bool ascending) const
Wizard::Wizard(QWidget *parent, const char *name) Wizard::Wizard(TQWidget *parent, const char *name)
: WizardBase(parent, name, false, WDestructiveClose) : WizardBase(parent, name, false, WDestructiveClose)
{ {
componentInfo->setMaximumSize(32767,70); componentInfo->setMaximumSize(32767,70);
componentList->header()->hide(); componentList->header()->hide();
//progressLabel2->setMaximumSize(32767, progressLabel2->fontMetrics().height()*2); //progressLabel2->setMaximumSize(32767, progressLabel2->fontMetrics().height()*2);
externalProcess = new QProcess(this); externalProcess = new TQProcess(this);
connect(externalProcess, SIGNAL(processExited()), SLOT(processExited())); connect(externalProcess, SIGNAL(processExited()), SLOT(processExited()));
connect(externalProcess, SIGNAL(readyReadStdout()), SLOT(readyReadStdout())); connect(externalProcess, SIGNAL(readyReadStdout()), SLOT(readyReadStdout()));
connect(externalProcess, SIGNAL(readyReadStderr()), SLOT(readyReadStderr())); connect(externalProcess, SIGNAL(readyReadStderr()), SLOT(readyReadStderr()));
@ -105,7 +105,7 @@ Wizard::Wizard(QWidget *parent, const char *name)
createActionFormats(); createActionFormats();
kdeDirProcess = new QProcess(this); kdeDirProcess = new TQProcess(this);
connect(kdeDirProcess, SIGNAL(readyReadStdout()), SLOT(kdeDirReady())); connect(kdeDirProcess, SIGNAL(readyReadStdout()), SLOT(kdeDirReady()));
connect(kdeDirProcess, SIGNAL(processExited()), SLOT(getInstalledComponents())); connect(kdeDirProcess, SIGNAL(processExited()), SLOT(getInstalledComponents()));
kdeDirProcess->addArgument("kde-config"); kdeDirProcess->addArgument("kde-config");
@ -140,7 +140,7 @@ void Wizard::kdeDirReady()
{ {
while (kdeDirProcess->canReadLineStdout()) while (kdeDirProcess->canReadLineStdout())
{ {
QString line = kdeDirProcess->readLineStdout(); TQString line = kdeDirProcess->readLineStdout();
if (!line.isEmpty()) if (!line.isEmpty())
kdeDir = line; kdeDir = line;
} }
@ -148,15 +148,15 @@ void Wizard::kdeDirReady()
void Wizard::getInstalledComponents() void Wizard::getInstalledComponents()
{ {
QFile uninstallScript("/tmp/arkollon-uninstall.sh"); TQFile uninstallScript("/tmp/arkollon-uninstall.sh");
if (uninstallScript.exists()) if (uninstallScript.exists())
uninstallScript.remove(); uninstallScript.remove();
uninstallScript.open(IO_WriteOnly); uninstallScript.open(IO_WriteOnly);
QDataStream stream(&uninstallScript); TQDataStream stream(&uninstallScript);
stream.writeRawBytes((const char*)uninstaller_sh_data, uninstaller_sh_len); stream.writeRawBytes((const char*)uninstaller_sh_data, uninstaller_sh_len);
uninstallScript.close(); uninstallScript.close();
installedComponentsProcess = new QProcess(this); installedComponentsProcess = new TQProcess(this);
connect(installedComponentsProcess, SIGNAL(readyReadStdout()), SLOT(installedComponentsReady())); connect(installedComponentsProcess, SIGNAL(readyReadStdout()), SLOT(installedComponentsReady()));
connect(installedComponentsProcess, SIGNAL(processExited()), SLOT(setup())); connect(installedComponentsProcess, SIGNAL(processExited()), SLOT(setup()));
installedComponentsProcess->addArgument("/bin/sh"); installedComponentsProcess->addArgument("/bin/sh");
@ -170,7 +170,7 @@ void Wizard::installedComponentsReady()
{ {
while (installedComponentsProcess->canReadLineStdout()) while (installedComponentsProcess->canReadLineStdout())
{ {
QString line = installedComponentsProcess->readLineStdout(); TQString line = installedComponentsProcess->readLineStdout();
if (line.isEmpty()) if (line.isEmpty())
continue; continue;
@ -185,7 +185,7 @@ void Wizard::installedComponentsReady()
void Wizard::setup() void Wizard::setup()
{ {
QFile uninstallScript("/tmp/arkollon-uninstall.sh"); TQFile uninstallScript("/tmp/arkollon-uninstall.sh");
if (uninstallScript.exists()) if (uninstallScript.exists())
uninstallScript.remove(); uninstallScript.remove();
@ -194,14 +194,14 @@ void Wizard::setup()
// Firstly check if there's an arkollonrc file in the current directory // Firstly check if there's an arkollonrc file in the current directory
// If there is, use it. // If there is, use it.
dir = QDir::currentDirPath(); dir = TQDir::currentDirPath();
if (qApp->argc() > 1) if (tqApp->argc() > 1)
{ {
// The directory specified on the command line overrides the current dir. // The directory specified on the command line overrides the current dir.
QDir d(qApp->argv()[1]); TQDir d(tqApp->argv()[1]);
dir = d.absPath(); dir = d.absPath();
} }
if (QFile::exists(dir + "/arkollonrc")) if (TQFile::exists(dir + "/arkollonrc"))
{ {
setupFromRc(); setupFromRc();
} }
@ -209,7 +209,7 @@ void Wizard::setup()
{ {
if (!setupFromDir()) if (!setupFromDir())
{ {
QMessageBox::critical(NULL, "Error", "This directory does not contain any recognised buildsystem", QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton); TQMessageBox::critical(NULL, "Error", "This directory does not contain any recognised buildsystem", TQMessageBox::Ok, TQMessageBox::NoButton, TQMessageBox::NoButton);
reject(); reject();
return; return;
} }
@ -223,37 +223,37 @@ void Wizard::setupFromRc()
parser.addSearchDir(dir); parser.addSearchDir(dir);
if (!parser.openFile("arkollonrc")) if (!parser.openFile("arkollonrc"))
{ {
QMessageBox::critical(NULL, "Error", "The \"arkollonrc\" file in this directory could not be read", QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton); TQMessageBox::critical(NULL, "Error", "The \"arkollonrc\" file in this directory could not be read", TQMessageBox::Ok, TQMessageBox::NoButton, TQMessageBox::NoButton);
reject(); reject();
return; return;
} }
parser.setSection("Arkollon"); parser.setSection("Arkollon");
QString appName = parser.readString("AppName"); TQString appName = parser.readString("AppName");
if (appName.isEmpty()) if (appName.isEmpty())
{ {
QMessageBox::critical(NULL, "Error", "The \"arkollonrc\" file in this directory contains no application name!", QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton); TQMessageBox::critical(NULL, "Error", "The \"arkollonrc\" file in this directory contains no application name!", TQMessageBox::Ok, TQMessageBox::NoButton, TQMessageBox::NoButton);
reject(); reject();
return; return;
} }
setAppName(appName); setAppName(appName);
QString icon32Path = parser.readString("Icon32"); TQString icon32Path = parser.readString("Icon32");
QString icon16Path = parser.readString("Icon16"); TQString icon16Path = parser.readString("Icon16");
if ((!icon32Path.isEmpty()) && (QFile::exists(dir + "/" + icon32Path))) if ((!icon32Path.isEmpty()) && (TQFile::exists(dir + "/" + icon32Path)))
{ {
QPixmap icon32(dir + "/" + icon32Path); TQPixmap icon32(dir + "/" + icon32Path);
appIcon->setPixmap(icon32); appIcon->setPixmap(icon32);
} }
if ((!icon16Path.isEmpty()) && (QFile::exists(dir + "/" + icon16Path))) if ((!icon16Path.isEmpty()) && (TQFile::exists(dir + "/" + icon16Path)))
{ {
QPixmap icon16(dir + "/" + icon16Path); TQPixmap icon16(dir + "/" + icon16Path);
setIcon(icon16); setIcon(icon16);
} }
buildOrder = parser.readList("BuildOrder"); buildOrder = parser.readList("BuildOrder");
QStringList compNames = parser.readList("Components"); TQStringList compNames = parser.readList("Components");
QStringList::Iterator it = compNames.begin(); TQStringList::Iterator it = compNames.begin();
while( it != compNames.end() ) while( it != compNames.end() )
{ {
parser.setSection(*it); parser.setSection(*it);
@ -271,15 +271,15 @@ void Wizard::setupFromRc()
c.alreadyInstalled = false; c.alreadyInstalled = false;
// Load the buildtimes data // Load the buildtimes data
if (QFile::exists(dir + "/" + c.subDir + "/buildtimes")) if (TQFile::exists(dir + "/" + c.subDir + "/buildtimes"))
{ {
QRegExp re("([^,]*,[^,]*),(\\d*)"); TQRegExp re("([^,]*,[^,]*),(\\d*)");
QFile file(dir + "/" + c.subDir + "/buildtimes"); TQFile file(dir + "/" + c.subDir + "/buildtimes");
file.open(IO_ReadOnly); file.open(IO_ReadOnly);
QTextStream stream(&file); TQTextStream stream(&file);
for (;;) for (;;)
{ {
QString line = stream.readLine(); TQString line = stream.readLine();
if (line.isNull()) if (line.isNull())
break; break;
if (re.search(line) == -1) if (re.search(line) == -1)
@ -305,13 +305,13 @@ void Wizard::setupFromRc()
} }
// Check if it's already installed // Check if it's already installed
QStringList::Iterator it2 = installedComponents.begin(); TQStringList::Iterator it2 = installedComponents.begin();
while( it2 != installedComponents.end() ) while( it2 != installedComponents.end() )
{ {
int dashPos = c.subDir.findRev('-'); int dashPos = c.subDir.findRev('-');
if (dashPos < 0) if (dashPos < 0)
dashPos = c.subDir.length(); dashPos = c.subDir.length();
QString version = c.subDir.left(dashPos) + ":" + c.subDir.right(c.subDir.length() - dashPos - 1); TQString version = c.subDir.left(dashPos) + ":" + c.subDir.right(c.subDir.length() - dashPos - 1);
if (*it2 == version.lower()) if (*it2 == version.lower())
{ {
item->setOn(false); item->setOn(false);
@ -329,18 +329,18 @@ void Wizard::setupFromRc()
bool Wizard::setupFromDir() bool Wizard::setupFromDir()
{ {
if ((!QFile::exists(dir + "/configure")) && if ((!TQFile::exists(dir + "/configure")) &&
(!QFile::exists(dir + "/autogen.sh")) && (!TQFile::exists(dir + "/autogen.sh")) &&
(!QFile::exists(dir + "/auto-gen.sh"))) (!TQFile::exists(dir + "/auto-gen.sh")))
{ {
QDir myDir(dir + "/" + selectedComponents[currentComponent].subDir); TQDir myDir(dir + "/" + selectedComponents[currentComponent].subDir);
if (myDir.entryList("*.pro", QDir::Files).count() <= 0) if (myDir.entryList("*.pro", TQDir::Files).count() <= 0)
return false; return false;
} }
// Use the directory name as the appname // Use the directory name as the appname
QDir myDir2(dir); TQDir myDir2(dir);
QString dirName = myDir2.dirName(); TQString dirName = myDir2.dirName();
setAppName(makeDirNice(dirName)); setAppName(makeDirNice(dirName));
buildOrder.append(dirName); buildOrder.append(dirName);
@ -358,13 +358,13 @@ bool Wizard::setupFromDir()
header->setText(0, "Required components"); header->setText(0, "Required components");
header->section = 0; header->section = 0;
QStringList::Iterator it2 = installedComponents.begin(); TQStringList::Iterator it2 = installedComponents.begin();
while( it2 != installedComponents.end() ) while( it2 != installedComponents.end() )
{ {
int dashPos = dirName.findRev('-'); int dashPos = dirName.findRev('-');
if (dashPos < 0) if (dashPos < 0)
dashPos = dirName.length(); dashPos = dirName.length();
QString version = dirName.left(dashPos) + ":" + dirName.right(dirName.length() - dashPos - 1); TQString version = dirName.left(dashPos) + ":" + dirName.right(dirName.length() - dashPos - 1);
if (*it2 == version.lower()) if (*it2 == version.lower())
item->component.alreadyInstalled = true; item->component.alreadyInstalled = true;
++it2; ++it2;
@ -379,13 +379,13 @@ Wizard::~Wizard()
} }
void Wizard::componentSelected(QListViewItem* item) void Wizard::componentSelected(TQListViewItem* item)
{ {
if (item->rtti() != 1001) if (item->rtti() != 1001)
return; return;
ComponentListItem* i = (ComponentListItem*) item; ComponentListItem* i = (ComponentListItem*) item;
QString text = "<p><b>" + item->text(0) + "</b>"; TQString text = "<p><b>" + item->text(0) + "</b>";
if (i->component.alreadyInstalled) if (i->component.alreadyInstalled)
text += " <i>(Already installed)</i>"; text += " <i>(Already installed)</i>";
text += "</p><p>"; text += "</p><p>";
@ -396,13 +396,13 @@ void Wizard::componentSelected(QListViewItem* item)
} }
QString Wizard::makeDirNice(QString name) TQString Wizard::makeDirNice(TQString name)
{ {
int dashPos = name.findRev('-'); int dashPos = name.findRev('-');
if (dashPos < 0) if (dashPos < 0)
dashPos = name.length(); dashPos = name.length();
QString ret = name.left(dashPos); TQString ret = name.left(dashPos);
ret = ret.left(1).upper() + ret.right(ret.length()-1); ret = ret.left(1).upper() + ret.right(ret.length()-1);
return ret; return ret;
@ -422,32 +422,32 @@ void Wizard::nextPressed()
int currentId = installStack->id(installStack->visibleWidget()); int currentId = installStack->id(installStack->visibleWidget());
if (currentId == 3) if (currentId == 3)
{ {
QDir d(kdeDir); TQDir d(kdeDir);
d.mkdir("share/apps/kdesktop/Desktop"); d.mkdir("share/apps/kdesktop/Desktop");
if (shortcutBox->isChecked()) if (shortcutBox->isChecked())
{ {
QFile source(dir + "/" + desktop); TQFile source(dir + "/" + desktop);
QString destDir = kdeDir + "/share/apps/kdesktop/Desktop"; TQString destDir = kdeDir + "/share/apps/kdesktop/Desktop";
int slashPos = desktop.findRev('/'); int slashPos = desktop.findRev('/');
if (slashPos < 0) if (slashPos < 0)
slashPos = 0; slashPos = 0;
QFile dest(destDir + "/" + desktop.right(desktop.length() - slashPos)); TQFile dest(destDir + "/" + desktop.right(desktop.length() - slashPos));
source.open(IO_ReadOnly); source.open(IO_ReadOnly);
dest.open(IO_WriteOnly | IO_Truncate); dest.open(IO_WriteOnly | IO_Truncate);
QDataStream destStream(&dest); TQDataStream destStream(&dest);
QByteArray data = source.readAll(); TQByteArray data = source.readAll();
destStream.writeRawBytes(data.data(), data.size()); destStream.writeRawBytes(data.data(), data.size());
source.close(); source.close();
dest.close(); dest.close();
} }
if (uninstallBox->isChecked()) if (uninstallBox->isChecked())
{ {
QFile source(dir + "/Uninstall KlamAV.desktop"); TQFile source(dir + "/Uninstall KlamAV.desktop");
QFile dest(kdeDir + "/share/apps/kdesktop/Desktop/Uinstall KlamAV.desktop"); TQFile dest(kdeDir + "/share/apps/kdesktop/Desktop/Uinstall KlamAV.desktop");
source.open(IO_ReadOnly); source.open(IO_ReadOnly);
dest.open(IO_WriteOnly | IO_Truncate); dest.open(IO_WriteOnly | IO_Truncate);
QDataStream destStream(&dest); TQDataStream destStream(&dest);
QByteArray data = source.readAll(); TQByteArray data = source.readAll();
destStream.writeRawBytes(data.data(), data.size()); destStream.writeRawBytes(data.data(), data.size());
source.close(); source.close();
dest.close(); dest.close();
@ -465,7 +465,7 @@ void Wizard::nextPressed()
{ {
bool itemsSelected = false; bool itemsSelected = false;
QListViewItemIterator it( componentList ); TQListViewItemIterator it( componentList );
while ( it.current() ) while ( it.current() )
{ {
if (it.current()->rtti() != 1001) if (it.current()->rtti() != 1001)
@ -480,7 +480,7 @@ void Wizard::nextPressed()
} }
if (!itemsSelected) if (!itemsSelected)
{ {
QMessageBox::warning(this, "Warning", "You need to select at least one component", QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton); TQMessageBox::warning(this, "Warning", "You need to select at least one component", TQMessageBox::Ok, TQMessageBox::NoButton, TQMessageBox::NoButton);
return; return;
} }
} }
@ -524,9 +524,9 @@ void Wizard::startProcess()
totalBTime = 0; totalBTime = 0;
elapsedTime = 0; elapsedTime = 0;
elapsedBTime = 0; elapsedBTime = 0;
for ( QStringList::Iterator it = buildOrder.begin(); it != buildOrder.end(); ++it ) for ( TQStringList::Iterator it = buildOrder.begin(); it != buildOrder.end(); ++it )
{ {
QListViewItemIterator it2( componentList ); TQListViewItemIterator it2( componentList );
while ( it2.current() ) while ( it2.current() )
{ {
if (it2.current()->rtti() != 1001) if (it2.current()->rtti() != 1001)
@ -540,7 +540,7 @@ void Wizard::startProcess()
if (item->isOn()) if (item->isOn())
{ {
selectedComponents.append(item->component); selectedComponents.append(item->component);
QMap<QString, uint>::iterator it3; TQMap<TQString, uint>::iterator it3;
for ( it3 = item->component.buildTimes.begin(); it3 != item->component.buildTimes.end(); ++it3 ) for ( it3 = item->component.buildTimes.begin(); it3 != item->component.buildTimes.end(); ++it3 )
totalBTime += it3.data(); totalBTime += it3.data();
} }
@ -554,7 +554,7 @@ void Wizard::startProcess()
currentComponent = 0; currentComponent = 0;
currentStage = None; currentStage = None;
currentIsQMake = false; currentIsTQMake = false;
nextStep(); nextStep();
} }
@ -572,24 +572,24 @@ void Wizard::nextStep()
setProgress2Text(""); setProgress2Text("");
//progressLabel2->setCursorPosition(0); //progressLabel2->setCursorPosition(0);
currentStage = Autogen; currentStage = Autogen;
QDir myDir(dir + "/" + selectedComponents[currentComponent].subDir); TQDir myDir(dir + "/" + selectedComponents[currentComponent].subDir);
if (myDir.entryList("*.pro", QDir::Files).count() > 0) if (myDir.entryList("*.pro", TQDir::Files).count() > 0)
{ {
currentIsQMake = true; currentIsTQMake = true;
nextStep(); nextStep();
return; return;
} }
if (QFile::exists(dir + "/" + selectedComponents[currentComponent].subDir + "/configure")) if (TQFile::exists(dir + "/" + selectedComponents[currentComponent].subDir + "/configure"))
{ {
nextStep(); nextStep();
return; return;
} }
QString autogenName; TQString autogenName;
if (QFile::exists(dir + "/" + selectedComponents[currentComponent].subDir + "/autogen.sh")) if (TQFile::exists(dir + "/" + selectedComponents[currentComponent].subDir + "/autogen.sh"))
autogenName = "autogen.sh"; autogenName = "autogen.sh";
else if (QFile::exists(dir + "/" + selectedComponents[currentComponent].subDir + "/auto-gen.sh")) else if (TQFile::exists(dir + "/" + selectedComponents[currentComponent].subDir + "/auto-gen.sh"))
autogenName = "auto-gen.sh"; autogenName = "auto-gen.sh";
else else
{ {
@ -608,7 +608,7 @@ void Wizard::nextStep()
{ {
//progressBar->setProgress(progressBar->progress() + 1); //progressBar->setProgress(progressBar->progress() + 1);
currentStage = Configure; currentStage = Configure;
if (currentIsQMake) if (currentIsTQMake)
{ {
progressLabel1->setText("<b>Running qmake for " + selectedComponents[currentComponent].niceName + "</b>"); progressLabel1->setText("<b>Running qmake for " + selectedComponents[currentComponent].niceName + "</b>");
setProgress2Text(""); setProgress2Text("");
@ -617,7 +617,7 @@ void Wizard::nextStep()
externalProcess->setWorkingDirectory(dir + "/" + selectedComponents[currentComponent].subDir); externalProcess->setWorkingDirectory(dir + "/" + selectedComponents[currentComponent].subDir);
if (!externalProcess->start()) if (!externalProcess->start())
{ {
logLine("Error: qmake was not found. Try installing the Qt-devel libraries."); logLine("Error: qmake was not found. Try installing the TQt-devel libraries.");
errorOccured(); errorOccured();
return; return;
} }
@ -634,8 +634,8 @@ void Wizard::nextStep()
//externalProcess->addArgument("--prefix=" + prefix); //externalProcess->addArgument("--prefix=" + prefix);
if (!selectedComponents[currentComponent].confOptions.isEmpty()) if (!selectedComponents[currentComponent].confOptions.isEmpty())
{ {
QStringList extraArgs = QStringList::split(" ", sub(selectedComponents[currentComponent].confOptions)); TQStringList extraArgs = TQStringList::split(" ", sub(selectedComponents[currentComponent].confOptions));
for ( QStringList::Iterator it = extraArgs.begin(); it != extraArgs.end(); ++it ) for ( TQStringList::Iterator it = extraArgs.begin(); it != extraArgs.end(); ++it )
externalProcess->addArgument(*it); externalProcess->addArgument(*it);
} }
externalProcess->setWorkingDirectory(dir + "/" + selectedComponents[currentComponent].subDir); externalProcess->setWorkingDirectory(dir + "/" + selectedComponents[currentComponent].subDir);
@ -685,25 +685,25 @@ void Wizard::nextStep()
progressLabel1->setText("<b>Writing uninstall information for " + selectedComponents[currentComponent].niceName + "</b>"); progressLabel1->setText("<b>Writing uninstall information for " + selectedComponents[currentComponent].niceName + "</b>");
setProgress2Text(""); setProgress2Text("");
QFile postInstallScript("/tmp/arkollon-postinstall.sh"); TQFile postInstallScript("/tmp/arkollon-postinstall.sh");
if (postInstallScript.exists()) if (postInstallScript.exists())
postInstallScript.remove(); postInstallScript.remove();
postInstallScript.open(IO_WriteOnly); postInstallScript.open(IO_WriteOnly);
QDataStream stream(&postInstallScript); TQDataStream stream(&postInstallScript);
stream.writeRawBytes((const char*)postinstall_sh_data, postinstall_sh_len); stream.writeRawBytes((const char*)postinstall_sh_data, postinstall_sh_len);
postInstallScript.close(); postInstallScript.close();
QFile fileList("/tmp/arkollon-filelist"); TQFile fileList("/tmp/arkollon-filelist");
if (fileList.exists()) if (fileList.exists())
fileList.remove(); fileList.remove();
fileList.open(IO_WriteOnly); fileList.open(IO_WriteOnly);
QTextStream fileStream(&fileList); TQTextStream fileStream(&fileList);
QStringList doneFiles; TQStringList doneFiles;
for ( QStringList::Iterator it = installedFiles.begin(); it != installedFiles.end(); ++it ) for ( TQStringList::Iterator it = installedFiles.begin(); it != installedFiles.end(); ++it )
{ {
if (doneFiles.find(*it) != doneFiles.end()) if (doneFiles.find(*it) != doneFiles.end())
continue; continue;
QFileInfo fileInfo(*it); TQFileInfo fileInfo(*it);
if (fileInfo.isDir()) if (fileInfo.isDir())
continue; continue;
fileStream << (*it) << '\n'; fileStream << (*it) << '\n';
@ -715,8 +715,8 @@ void Wizard::nextStep()
int dashPos = c.subDir.findRev('-'); int dashPos = c.subDir.findRev('-');
if (dashPos < 0) if (dashPos < 0)
dashPos = c.subDir.length(); dashPos = c.subDir.length();
QString appname = c.subDir.left(dashPos); TQString appname = c.subDir.left(dashPos);
QString version = c.subDir.right(c.subDir.length() - dashPos - 1); TQString version = c.subDir.right(c.subDir.length() - dashPos - 1);
externalProcess->addArgument("/bin/sh"); externalProcess->addArgument("/bin/sh");
externalProcess->addArgument("/tmp/arkollon-postinstall.sh"); externalProcess->addArgument("/tmp/arkollon-postinstall.sh");
@ -733,7 +733,7 @@ void Wizard::nextStep()
{ {
currentStage = None; currentStage = None;
currentComponent++; currentComponent++;
currentIsQMake = false; currentIsTQMake = false;
if (currentComponent >= selectedComponents.count()) if (currentComponent >= selectedComponents.count())
{ {
progressLabel1->setText("<b>Installation completed!</b>"); progressLabel1->setText("<b>Installation completed!</b>");
@ -766,11 +766,11 @@ void Wizard::processExited()
if (currentStage == WriteUninstallInfo) if (currentStage == WriteUninstallInfo)
{ {
// Remove temp files from the last stage // Remove temp files from the last stage
QFile postInstallScript("/tmp/arkollon-postinstall.sh"); TQFile postInstallScript("/tmp/arkollon-postinstall.sh");
if (postInstallScript.exists()) if (postInstallScript.exists())
postInstallScript.remove(); postInstallScript.remove();
QFile fileList("/tmp/arkollon-filelist"); TQFile fileList("/tmp/arkollon-filelist");
if (fileList.exists()) if (fileList.exists())
fileList.remove(); fileList.remove();
} }
@ -782,7 +782,7 @@ void Wizard::processExited()
} }
if (externalProcess->exitStatus() != 0) if (externalProcess->exitStatus() != 0)
{ {
logLine("Return value " + QString::number(externalProcess->exitStatus())); logLine("Return value " + TQString::number(externalProcess->exitStatus()));
errorOccured(); errorOccured();
return; return;
} }
@ -795,7 +795,7 @@ void Wizard::readyReadStderr()
{ {
while (externalProcess->canReadLineStderr()) while (externalProcess->canReadLineStderr())
{ {
QString line = externalProcess->readLineStderr().latin1(); TQString line = externalProcess->readLineStderr().latin1();
logDialog->logBox->append(" * "+line); logDialog->logBox->append(" * "+line);
} }
} }
@ -804,7 +804,7 @@ void Wizard::readyReadStdout()
{ {
while (externalProcess->canReadLineStdout()) while (externalProcess->canReadLineStdout())
{ {
QString line = externalProcess->readLineStdout().latin1(); TQString line = externalProcess->readLineStdout().latin1();
logDialog->logBox->append(line); logDialog->logBox->append(line);
if (currentStage == Configure) if (currentStage == Configure)
@ -816,7 +816,7 @@ void Wizard::readyReadStdout()
if (line.right(1) == "\\") if (line.right(1) == "\\")
continue; continue;
commandLine = commandLine.left(commandLine.find(';')); commandLine = commandLine.left(commandLine.find(';'));
for ( QValueList<ActionFormat>::Iterator it = actionFormats.begin(); it != actionFormats.end(); ++it ) for ( TQValueList<ActionFormat>::Iterator it = actionFormats.begin(); it != actionFormats.end(); ++it )
{ {
if ((*it).regExp.search(commandLine) == -1) if ((*it).regExp.search(commandLine) == -1)
continue; continue;
@ -831,7 +831,7 @@ void Wizard::readyReadStdout()
} }
} }
void Wizard::updateTime(QString key) void Wizard::updateTime(TQString key)
{ {
if (!timer.isNull()) if (!timer.isNull())
{ {
@ -841,7 +841,7 @@ void Wizard::updateTime(QString key)
int remainingTime = (int)((float)(totalBTime - elapsedBTime) * ratio) / 60000; int remainingTime = (int)((float)(totalBTime - elapsedBTime) * ratio) / 60000;
if (remainingTime < 0) if (remainingTime < 0)
remainingTime = 0; remainingTime = 0;
QString text = QString::number(remainingTime + 1) + " minutes"; TQString text = TQString::number(remainingTime + 1) + " minutes";
if (remainingTime == 0) if (remainingTime == 0)
text = "1 minute"; text = "1 minute";
timeRemaining->setText("Estimated time remaining: <b>" + text + "</b>"); timeRemaining->setText("Estimated time remaining: <b>" + text + "</b>");
@ -850,11 +850,11 @@ void Wizard::updateTime(QString key)
timer.start(); timer.start();
} }
void Wizard::logLine(QString line) void Wizard::logLine(TQString line)
{ {
QString tmp = line; TQString tmp = line;
QStringList lines = QStringList::split("\n", tmp); TQStringList lines = TQStringList::split("\n", tmp);
for ( QStringList::Iterator it = lines.begin(); it != lines.end(); ++it ) for ( TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it )
{ {
if ((*it).isEmpty()) if ((*it).isEmpty())
continue; continue;
@ -862,14 +862,14 @@ void Wizard::logLine(QString line)
} }
} }
void Wizard::setProgress2Text(QString text) void Wizard::setProgress2Text(TQString text)
{ {
QString croppedText = text; TQString croppedText = text;
int i = croppedText.length(); int i = croppedText.length();
QFont boldFont = progressLabel2->font(); TQFont boldFont = progressLabel2->font();
boldFont.setBold(true); boldFont.setBold(true);
QFontMetrics boldFontMetrics(boldFont); TQFontMetrics boldFontMetrics(boldFont);
while (boldFontMetrics.width(croppedText) > progressLabel2->width()) while (boldFontMetrics.width(croppedText) > progressLabel2->width())
{ {
croppedText = croppedText.left(--i); croppedText = croppedText.left(--i);
@ -887,24 +887,24 @@ void Wizard::errorOccured()
previousButton->setEnabled(true); previousButton->setEnabled(true);
} }
QString Wizard::sub(QString s) TQString Wizard::sub(TQString s)
{ {
QString tmp = s; TQString tmp = s;
tmp.replace(QRegExp("\\$KDEDIR"), kdeDir); tmp.replace(TQRegExp("\\$KDEDIR"), kdeDir);
tmp.replace(QRegExp("\\$HOMEDIR"), QDir::homeDirPath()); tmp.replace(TQRegExp("\\$HOMEDIR"), TQDir::homeDirPath());
tmp.replace(QRegExp("~"), QDir::homeDirPath()); tmp.replace(TQRegExp("~"), TQDir::homeDirPath());
tmp.replace(QRegExp("\\$PREFIX"), "/usr/local"); tmp.replace(TQRegExp("\\$PREFIX"), "/usr/local");
return tmp; return tmp;
} }
void Wizard::runPressed() void Wizard::runPressed()
{ {
QProcess* proc = new QProcess(this); TQProcess* proc = new TQProcess(this);
proc->addArgument(exec); proc->addArgument(exec);
if (!proc->start()) if (!proc->start())
{ {
QMessageBox::warning(this, "Warning", "The application could not be started<br>"+exec, QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton); TQMessageBox::warning(this, "Warning", "The application could not be started<br>"+exec, TQMessageBox::Ok, TQMessageBox::NoButton, TQMessageBox::NoButton);
} }
} }

@ -21,37 +21,37 @@
#define WIZARD_H #define WIZARD_H
#include <wizardbase.h> #include <wizardbase.h>
#include <qlistview.h> #include <tqlistview.h>
#include <qprocess.h> #include <tqprocess.h>
#include <qsettings.h> #include <tqsettings.h>
#include <qiconview.h> #include <tqiconview.h>
#include <qregexp.h> #include <tqregexp.h>
#include "logdialog.h" #include "logdialog.h"
class HeaderListItem; class HeaderListItem;
struct Component struct Component
{ {
QString name; TQString name;
QString niceName; TQString niceName;
QString subDir; TQString subDir;
QString forceDir; TQString forceDir;
bool optional; bool optional;
bool kdeOnly; bool kdeOnly;
bool gnomeOnly; bool gnomeOnly;
QString description; TQString description;
QString confOptions; TQString confOptions;
QMap<QString, uint> buildTimes; TQMap<TQString, uint> buildTimes;
bool alreadyInstalled; bool alreadyInstalled;
}; };
class ComponentListItem : public QCheckListItem class ComponentListItem : public TQCheckListItem
{ {
public: public:
ComponentListItem(struct Component c, QListView* parent); ComponentListItem(struct Component c, TQListView* parent);
int compare(QListViewItem* i, int col, bool ascending) const; int compare(TQListViewItem* i, int col, bool ascending) const;
int rtti() const { return 1001; } int rtti() const { return 1001; }
struct Component component; struct Component component;
@ -62,12 +62,12 @@ class ActionFormat
{ {
public: public:
ActionFormat() {} ActionFormat() {}
ActionFormat(QString a, QString t, QString r, int) { action=a; tool=t; regExp=r; } ActionFormat(TQString a, TQString t, TQString r, int) { action=a; tool=t; regExp=r; }
~ActionFormat() {} ~ActionFormat() {}
QString action; TQString action;
QString tool; TQString tool;
QRegExp regExp; TQRegExp regExp;
}; };
@ -79,7 +79,7 @@ class Wizard : public WizardBase
Q_OBJECT Q_OBJECT
public: public:
Wizard(QWidget *parent = 0, const char *name = 0); Wizard(TQWidget *parent = 0, const char *name = 0);
~Wizard(); ~Wizard();
@ -90,16 +90,16 @@ private:
void nextStep(); void nextStep();
void checkPassword(); void checkPassword();
void updateTime(QString key); void updateTime(TQString key);
QString lastTimeLine; TQString lastTimeLine;
void logLine(QString line); void logLine(TQString line);
void errorOccured(); void errorOccured();
QString makeDirNice(QString name); TQString makeDirNice(TQString name);
QString sub(QString s); TQString sub(TQString s);
QString rootPassword; TQString rootPassword;
private slots: private slots:
void processExited(); void processExited();
@ -114,8 +114,8 @@ private slots:
void previousPressed(); void previousPressed();
void runPressed(); void runPressed();
void logPressed(); void logPressed();
void componentSelected(QListViewItem* item); void componentSelected(TQListViewItem* item);
void setProgress2Text(QString text); void setProgress2Text(TQString text);
void setup(); void setup();
void setupFromRc(); void setupFromRc();
@ -132,34 +132,34 @@ private:
WriteUninstallInfo WriteUninstallInfo
}; };
QString dir; TQString dir;
QStringList buildOrder; TQStringList buildOrder;
QValueList<struct Component> selectedComponents; TQValueList<struct Component> selectedComponents;
uint totalBTime; uint totalBTime;
uint elapsedBTime; uint elapsedBTime;
uint elapsedTime; uint elapsedTime;
QTime timer; TQTime timer;
QProcess* externalProcess; TQProcess* externalProcess;
QProcess* kdeDirProcess; TQProcess* kdeDirProcess;
QProcess* installedComponentsProcess; TQProcess* installedComponentsProcess;
QString commandLine; TQString commandLine;
bool currentIsQMake; bool currentIsTQMake;
int currentComponent; int currentComponent;
enum Stage currentStage; enum Stage currentStage;
bool needRoot; bool needRoot;
QString prefix; TQString prefix;
QStringList installedComponents; TQStringList installedComponents;
QString exec; TQString exec;
QString desktop; TQString desktop;
QString kdeDir; TQString kdeDir;
LogDialog* logDialog; LogDialog* logDialog;
QMap<int, HeaderListItem*> headers; TQMap<int, HeaderListItem*> headers;
QValueList<ActionFormat> actionFormats; TQValueList<ActionFormat> actionFormats;
QStringList installedFiles; TQStringList installedFiles;
}; };
#endif #endif

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.1" stdsetdef="1"> <!DOCTYPE UI><UI version="3.1" stdsetdef="1">
<class>WizardBase</class> <class>WizardBase</class>
<widget class="QDialog"> <widget class="TQDialog">
<property name="name"> <property name="name">
<cstring>WizardBase</cstring> <cstring>WizardBase</cstring>
</property> </property>
@ -36,7 +36,7 @@
<property name="resizeMode"> <property name="resizeMode">
<enum>Fixed</enum> <enum>Fixed</enum>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout8</cstring> <cstring>layout8</cstring>
</property> </property>
@ -44,7 +44,7 @@
<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>splash</cstring> <cstring>splash</cstring>
</property> </property>
@ -66,7 +66,7 @@
<bool>false</bool> <bool>false</bool>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout7</cstring> <cstring>layout7</cstring>
</property> </property>
@ -74,7 +74,7 @@
<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>titleLabel</cstring> <cstring>titleLabel</cstring>
</property> </property>
@ -107,11 +107,11 @@
<enum>Horizontal</enum> <enum>Horizontal</enum>
</property> </property>
</widget> </widget>
<widget class="QWidgetStack"> <widget class="TQWidgetStack">
<property name="name"> <property name="name">
<cstring>mainStack</cstring> <cstring>mainStack</cstring>
</property> </property>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>WStackPage</cstring> <cstring>WStackPage</cstring>
</property> </property>
@ -128,11 +128,11 @@
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
<widget class="QWidgetStack"> <widget class="TQWidgetStack">
<property name="name"> <property name="name">
<cstring>installStack</cstring> <cstring>installStack</cstring>
</property> </property>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>Introduction</cstring> <cstring>Introduction</cstring>
</property> </property>
@ -143,7 +143,7 @@
<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>
@ -154,7 +154,7 @@
<set>WordBreak|AlignVCenter</set> <set>WordBreak|AlignVCenter</set>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout12</cstring> <cstring>layout12</cstring>
</property> </property>
@ -179,7 +179,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>appIcon</cstring> <cstring>appIcon</cstring>
</property> </property>
@ -187,7 +187,7 @@
<bool>false</bool> <bool>false</bool>
</property> </property>
</widget> </widget>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>appNameLabel</cstring> <cstring>appNameLabel</cstring>
</property> </property>
@ -222,7 +222,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel4</cstring> <cstring>textLabel4</cstring>
</property> </property>
@ -249,7 +249,7 @@
</spacer> </spacer>
</vbox> </vbox>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>Components</cstring> <cstring>Components</cstring>
</property> </property>
@ -260,7 +260,7 @@
<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>textLabel5</cstring> <cstring>textLabel5</cstring>
</property> </property>
@ -271,7 +271,7 @@
<set>WordBreak|AlignVCenter</set> <set>WordBreak|AlignVCenter</set>
</property> </property>
</widget> </widget>
<widget class="QListView"> <widget class="TQListView">
<column> <column>
<property name="text"> <property name="text">
<string>Component name</string> <string>Component name</string>
@ -287,7 +287,7 @@
<cstring>componentList</cstring> <cstring>componentList</cstring>
</property> </property>
</widget> </widget>
<widget class="QTextEdit"> <widget class="TQTextEdit">
<property name="name"> <property name="name">
<cstring>componentInfo</cstring> <cstring>componentInfo</cstring>
</property> </property>
@ -306,7 +306,7 @@
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>WStackPage</cstring> <cstring>WStackPage</cstring>
</property> </property>
@ -317,7 +317,7 @@
<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>pleaseWaitLabel</cstring> <cstring>pleaseWaitLabel</cstring>
</property> </property>
@ -345,7 +345,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>progressLabel1</cstring> <cstring>progressLabel1</cstring>
</property> </property>
@ -353,7 +353,7 @@
<string>Progress Label 1</string> <string>Progress Label 1</string>
</property> </property>
</widget> </widget>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>progressLabel2</cstring> <cstring>progressLabel2</cstring>
</property> </property>
@ -375,7 +375,7 @@
<set>WordBreak|AlignTop|AlignLeft</set> <set>WordBreak|AlignTop|AlignLeft</set>
</property> </property>
</widget> </widget>
<widget class="QProgressBar"> <widget class="TQProgressBar">
<property name="name"> <property name="name">
<cstring>progressBar</cstring> <cstring>progressBar</cstring>
</property> </property>
@ -383,7 +383,7 @@
<number>0</number> <number>0</number>
</property> </property>
</widget> </widget>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>timeRemaining</cstring> <cstring>timeRemaining</cstring>
</property> </property>
@ -411,7 +411,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QFrame"> <widget class="TQFrame">
<property name="name"> <property name="name">
<cstring>logFrame</cstring> <cstring>logFrame</cstring>
</property> </property>
@ -456,7 +456,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>logButton</cstring> <cstring>logButton</cstring>
</property> </property>
@ -468,7 +468,7 @@
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>WStackPage</cstring> <cstring>WStackPage</cstring>
</property> </property>
@ -479,7 +479,7 @@
<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>textLabel1</cstring> <cstring>textLabel1</cstring>
</property> </property>
@ -507,7 +507,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout7</cstring> <cstring>layout7</cstring>
</property> </property>
@ -532,7 +532,7 @@
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QCheckBox" row="2" column="1"> <widget class="TQCheckBox" row="2" column="1">
<property name="name"> <property name="name">
<cstring>uninstallBox</cstring> <cstring>uninstallBox</cstring>
</property> </property>
@ -543,7 +543,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="1" column="1"> <widget class="TQCheckBox" row="1" column="1">
<property name="name"> <property name="name">
<cstring>shortcutBox</cstring> <cstring>shortcutBox</cstring>
</property> </property>
@ -578,7 +578,7 @@
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>WStackPage</cstring> <cstring>WStackPage</cstring>
</property> </property>
@ -595,11 +595,11 @@
<property name="spacing"> <property name="spacing">
<number>0</number> <number>0</number>
</property> </property>
<widget class="QWidgetStack"> <widget class="TQWidgetStack">
<property name="name"> <property name="name">
<cstring>uninstallStack</cstring> <cstring>uninstallStack</cstring>
</property> </property>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>WStackPage</cstring> <cstring>WStackPage</cstring>
</property> </property>
@ -610,7 +610,7 @@
<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>textLabel1_3</cstring> <cstring>textLabel1_3</cstring>
</property> </property>
@ -618,7 +618,7 @@
<string>Please select from the list below the applications you wish to uninstall.</string> <string>Please select from the list below the applications you wish to uninstall.</string>
</property> </property>
</widget> </widget>
<widget class="QListView"> <widget class="TQListView">
<column> <column>
<property name="text"> <property name="text">
<string>Application Name</string> <string>Application Name</string>
@ -636,7 +636,7 @@
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>WStackPage</cstring> <cstring>WStackPage</cstring>
</property> </property>
@ -647,7 +647,7 @@
<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_3</cstring> <cstring>textLabel2_3</cstring>
</property> </property>
@ -659,14 +659,14 @@ Please check this list, and click &lt;b&gt;next&lt;/b&gt; to continue.</string>
<enum>RichText</enum> <enum>RichText</enum>
</property> </property>
</widget> </widget>
<widget class="QListBox"> <widget class="TQListBox">
<property name="name"> <property name="name">
<cstring>fileList</cstring> <cstring>fileList</cstring>
</property> </property>
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>WStackPage</cstring> <cstring>WStackPage</cstring>
</property> </property>
@ -694,7 +694,7 @@ Please check this list, and click &lt;b&gt;next&lt;/b&gt; to continue.</string>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>pleaseWaitLabel2</cstring> <cstring>pleaseWaitLabel2</cstring>
</property> </property>
@ -719,7 +719,7 @@ Please check this list, and click &lt;b&gt;next&lt;/b&gt; to continue.</string>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QFrame"> <widget class="TQFrame">
<property name="name"> <property name="name">
<cstring>logFrame_2</cstring> <cstring>logFrame_2</cstring>
</property> </property>
@ -764,7 +764,7 @@ Please check this list, and click &lt;b&gt;next&lt;/b&gt; to continue.</string>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>logButton2</cstring> <cstring>logButton2</cstring>
</property> </property>
@ -798,7 +798,7 @@ Please check this list, and click &lt;b&gt;next&lt;/b&gt; to continue.</string>
<enum>Horizontal</enum> <enum>Horizontal</enum>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout2</cstring> <cstring>layout2</cstring>
</property> </property>
@ -823,7 +823,7 @@ Please check this list, and click &lt;b&gt;next&lt;/b&gt; to continue.</string>
</size> </size>
</property> </property>
</spacer> </spacer>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>previousButton</cstring> <cstring>previousButton</cstring>
</property> </property>
@ -834,7 +834,7 @@ Please check this list, and click &lt;b&gt;next&lt;/b&gt; to continue.</string>
<string>&lt; Previous</string> <string>&lt; Previous</string>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>nextButton</cstring> <cstring>nextButton</cstring>
</property> </property>
@ -845,7 +845,7 @@ Please check this list, and click &lt;b&gt;next&lt;/b&gt; to continue.</string>
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QPushButton"> <widget class="TQPushButton">
<property name="name"> <property name="name">
<cstring>cancelButton</cstring> <cstring>cancelButton</cstring>
</property> </property>
@ -872,9 +872,9 @@ Please check this list, and click &lt;b&gt;next&lt;/b&gt; to continue.</string>
</connection> </connection>
<connection> <connection>
<sender>componentList</sender> <sender>componentList</sender>
<signal>selectionChanged(QListViewItem*)</signal> <signal>selectionChanged(TQListViewItem*)</signal>
<receiver>WizardBase</receiver> <receiver>WizardBase</receiver>
<slot>componentSelected(QListViewItem*)</slot> <slot>componentSelected(TQListViewItem*)</slot>
</connection> </connection>
<connection> <connection>
<sender>logButton</sender> <sender>logButton</sender>
@ -905,17 +905,17 @@ Please check this list, and click &lt;b&gt;next&lt;/b&gt; to continue.</string>
</tabstops> </tabstops>
<includes> <includes>
<include location="local" impldecl="in implementation">wizardbase.ui.h</include> <include location="local" impldecl="in implementation">wizardbase.ui.h</include>
<include location="global" impldecl="in implementation">qwidgetstack.h</include> <include location="global" impldecl="in implementation">ntqwidgetstack.h</include>
</includes> </includes>
<slots> <slots>
<slot>setAppName( QString n )</slot> <slot>setAppName( TQString n )</slot>
<slot>nextPressed()</slot> <slot>nextPressed()</slot>
<slot>previousPressed()</slot> <slot>previousPressed()</slot>
<slot>cancelPressed()</slot> <slot>cancelPressed()</slot>
<slot>browsePressed()</slot> <slot>browsePressed()</slot>
<slot>runPressed()</slot> <slot>runPressed()</slot>
<slot>logPressed()</slot> <slot>logPressed()</slot>
<slot>componentSelected( QListViewItem * item )</slot> <slot>componentSelected( TQListViewItem * item )</slot>
</slots> </slots>
<layoutdefaults spacing="6" margin="11"/> <layoutdefaults spacing="6" margin="11"/>
</UI> </UI>

@ -1,8 +1,8 @@
#include "data.h" #include "data.h"
void WizardBase::setAppName( QString n ) void WizardBase::setAppName( TQString n )
{ {
QPixmap tmp; TQPixmap tmp;
tmp.convertFromImage(qembed_findImage("packageIcon")); tmp.convertFromImage(qembed_findImage("packageIcon"));
appIcon->setPixmap(tmp); appIcon->setPixmap(tmp);
tmp.convertFromImage(qembed_findImage("splash")); tmp.convertFromImage(qembed_findImage("splash"));
@ -52,7 +52,7 @@ void WizardBase::logPressed()
void WizardBase::componentSelected( QListViewItem * item ) void WizardBase::componentSelected( TQListViewItem * item )
{ {
} }

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>AutoScanOptions</class> <class>AutoScanOptions</class>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>AutoScanOptions</cstring> <cstring>AutoScanOptions</cstring>
</property> </property>
@ -40,7 +40,7 @@
</rect> </rect>
</property> </property>
</spacer> </spacer>
<widget class="QGroupBox"> <widget class="TQGroupBox">
<property name="name"> <property name="name">
<cstring>LimitsGroup</cstring> <cstring>LimitsGroup</cstring>
</property> </property>
@ -105,7 +105,7 @@
</rect> </rect>
</property> </property>
</spacer> </spacer>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout4</cstring> <cstring>layout4</cstring>
</property> </property>
@ -121,7 +121,7 @@
<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>kcfg_Executed</cstring> <cstring>kcfg_Executed</cstring>
</property> </property>
@ -132,7 +132,7 @@
<string>Alt+E</string> <string>Alt+E</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>kcfg_Created</cstring> <cstring>kcfg_Created</cstring>
</property> </property>
@ -146,7 +146,7 @@
<string>Alt+Y</string> <string>Alt+Y</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>kcfg_Opened</cstring> <cstring>kcfg_Opened</cstring>
</property> </property>
@ -157,7 +157,7 @@
<string>Alt+F</string> <string>Alt+F</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>kcfg_Closed</cstring> <cstring>kcfg_Closed</cstring>
</property> </property>

@ -24,9 +24,9 @@
#include "klamscan.h" #include "klamscan.h"
#include "klamav.h" #include "klamav.h"
#include "qpainter.h" #include "ntqpainter.h"
ClickComboBox::ClickComboBox( bool rw,QWidget *parent, const char* name ) : ClickComboBox::ClickComboBox( bool rw,TQWidget *parent, const char* name ) :
KComboBox( rw,parent, name ) KComboBox( rw,parent, name )
{ {
/* mDrawClickMsg = true; /* mDrawClickMsg = true;
@ -38,17 +38,17 @@ ClickComboBox::ClickComboBox( bool rw,QWidget *parent, const char* name ) :
// PUBLIC // PUBLIC
///////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////
// void ClickComboBox::setClickMessage( const QString &msg ) // void ClickComboBox::setClickMessage( const TQString &msg )
// { // {
// mClickMessage = msg; // mClickMessage = msg;
// repaint(); // repaint();
// } // }
void ClickComboBox::mousePressEvent( QMouseEvent * e ) void ClickComboBox::mousePressEvent( TQMouseEvent * e )
{ {
QComboBox::mousePressEvent( e ); TQComboBox::mousePressEvent( e );
repaint(); repaint();
} }
@ -58,42 +58,42 @@ void ClickComboBox::mousePressEvent( QMouseEvent * e )
// PROTECTED // PROTECTED
///////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////
void ClickComboBox::paintEvent( QPaintEvent * ev) void ClickComboBox::paintEvent( TQPaintEvent * ev)
{ {
KComboBox::paintEvent(ev); KComboBox::paintEvent(ev);
if (kmain->klamscan->isMultiScan()){ if (kmain->klamscan->isMultiScan()){
//kdDebug() << "drawing text" << endl; //kdDebug() << "drawing text" << endl;
QPainter p (this->lineEdit()); TQPainter p (this->lineEdit());
p.setPen( palette().color( QPalette::Disabled, QColorGroup::Text ) ); p.setPen( palette().color( TQPalette::Disabled, TQColorGroup::Text ) );
QRect cr = this->lineEdit()->contentsRect(); TQRect cr = this->lineEdit()->contentsRect();
// Add two pixel margin on the left side // Add two pixel margin on the left side
//cr.setRight( cr.right() + 800 ); //cr.setRight( cr.right() + 800 );
cr.setWidth(800); cr.setWidth(800);
//kdDebug() << cr << endl; //kdDebug() << cr << endl;
p.drawText( cr, AlignAuto , i18n( "Multiple Directories Selected" ) ); p.drawText( cr, AlignAuto , i18n( "Multiple Directories Selected" ) );
//this->setPaletteForegroundColor(palette().color( QPalette::Disabled, QColorGroup::Text )); //this->setPaletteForegroundColor(palette().color( TQPalette::Disabled, TQColorGroup::Text ));
} }
} }
void ClickComboBox::focusInEvent( QFocusEvent *ev ) void ClickComboBox::focusInEvent( TQFocusEvent *ev )
{ {
/* if ( mDrawClickMsg == true ) { /* if ( mDrawClickMsg == true ) {
mDrawClickMsg = false; mDrawClickMsg = false;
repaint(); repaint();
}*/ }*/
QComboBox::focusInEvent( ev ); TQComboBox::focusInEvent( ev );
} }
void ClickComboBox::focusOutEvent( QFocusEvent *ev ) void ClickComboBox::focusOutEvent( TQFocusEvent *ev )
{ {
/* if ( currentText().isEmpty() ) { /* if ( currentText().isEmpty() ) {
mDrawClickMsg = true; mDrawClickMsg = true;
repaint(); repaint();
}*/ }*/
QComboBox::focusOutEvent( ev ); TQComboBox::focusOutEvent( ev );
} }

@ -33,23 +33,23 @@
class ClickComboBox : public KComboBox class ClickComboBox : public KComboBox
{ {
public: public:
ClickComboBox( bool rw, QWidget *parent, const char* name = 0 ); ClickComboBox( bool rw, TQWidget *parent, const char* name = 0 );
/* void setClickMessage( const QString &msg );*/ /* void setClickMessage( const TQString &msg );*/
// QString clickMessage() const { return mClickMessage; } // TQString clickMessage() const { return mClickMessage; }
signals: signals:
virtual void mousePressEvent( QMouseEvent * e ); virtual void mousePressEvent( TQMouseEvent * e );
protected: protected:
virtual void paintEvent( QPaintEvent * ); virtual void paintEvent( TQPaintEvent * );
virtual void focusInEvent( QFocusEvent *ev ); virtual void focusInEvent( TQFocusEvent *ev );
virtual void focusOutEvent( QFocusEvent *ev ); virtual void focusOutEvent( TQFocusEvent *ev );
private: private:
QString mClickMessage; TQString mClickMessage;
bool mDrawClickMsg; bool mDrawClickMsg;
QString text; TQString text;
}; };

@ -15,8 +15,8 @@
#include "sqlite/sqlite3.h" #include "sqlite/sqlite3.h"
#include <qfile.h> #include <tqfile.h>
#include <qtimer.h> #include <tqtimer.h>
#include <kapplication.h> #include <kapplication.h>
#include <kconfig.h> #include <kconfig.h>
@ -89,10 +89,10 @@ CollectionDB::returnStaticDbConnection( DbConnection *conn )
/** /**
* Executes a SQL query on the already opened database * Executes a SQL query on the already opened database
* @param statement SQL program to execute. Only one SQL statement is allowed. * @param statement SQL program to execute. Only one SQL statement is allowed.
* @return The queried data, or QStringList() on error. * @return The queried data, or TQStringList() on error.
*/ */
QStringList TQStringList
CollectionDB::query( const QString& statement, DbConnection *conn ) CollectionDB::query( const TQString& statement, DbConnection *conn )
{ {
clock_t start; clock_t start;
if ( DEBUGSQL ) if ( DEBUGSQL )
@ -113,7 +113,7 @@ CollectionDB::query( const QString& statement, DbConnection *conn )
//kdDebug() << statement << endl; //kdDebug() << statement << endl;
QStringList values = dbConn->query( statement ); TQStringList values = dbConn->query( statement );
//kdDebug() << values << endl; //kdDebug() << values << endl;
@ -138,7 +138,7 @@ CollectionDB::query( const QString& statement, DbConnection *conn )
* @return The rowid of the inserted item. * @return The rowid of the inserted item.
*/ */
int int
CollectionDB::insert( const QString& statement, const QString& table, DbConnection *conn ) CollectionDB::insert( const TQString& statement, const TQString& table, DbConnection *conn )
{ {
clock_t start; clock_t start;
if ( DEBUGSQL ) if ( DEBUGSQL )
@ -181,7 +181,7 @@ CollectionDB::insert( const QString& statement, const QString& table, DbConnecti
bool bool
CollectionDB::isEmpty() CollectionDB::isEmpty()
{ {
QStringList values; TQStringList values;
values = query( "SELECT COUNT( type ) FROM klamav_activity LIMIT 0, 1;" ); values = query( "SELECT COUNT( type ) FROM klamav_activity LIMIT 0, 1;" );
@ -190,12 +190,12 @@ CollectionDB::isEmpty()
bool bool
CollectionDB::isValid(const QString &column, const QString &table) CollectionDB::isValid(const TQString &column, const TQString &table)
{ {
QStringList values1; TQStringList values1;
QStringList values2; TQStringList values2;
values1 = query( QString("SELECT COUNT( %1 ) FROM %2 LIMIT 0, 1;").arg(column).arg(table) ); values1 = query( TQString("SELECT COUNT( %1 ) FROM %2 LIMIT 0, 1;").arg(column).arg(table) );
//TODO? this returns true if value1 or value2 is not empty. Shouldn't this be and (&&)??? //TODO? this returns true if value1 or value2 is not empty. Shouldn't this be and (&&)???
return !values1.isEmpty(); return !values1.isEmpty();
@ -211,7 +211,7 @@ CollectionDB::createTables( DbConnection */*conn*/ )
//createMetaDBTable(); //createMetaDBTable();
//create indexes //create indexes
/* query( QString( "CREATE INDEX date_idx%1 ON klamav_activity%2( date );" ) /* query( TQString( "CREATE INDEX date_idx%1 ON klamav_activity%2( date );" )
.arg( conn ? "_temp" : "" ).arg( conn ? "_temp" : "" ), conn );*/ .arg( conn ? "_temp" : "" ).arg( conn ? "_temp" : "" ), conn );*/
} }
@ -236,18 +236,18 @@ void
CollectionDB::loadMetaDBTable( DbConnection */*conn*/ ) CollectionDB::loadMetaDBTable( DbConnection */*conn*/ )
{ {
QString location = locate("data", "klamav/about/metadb.txt"); TQString location = locate("data", "klamav/about/metadb.txt");
/* query( QString( ".import %1 klamav_activity;" ).arg(location), conn ); /* query( TQString( ".import %1 klamav_activity;" ).arg(location), conn );
return;*/ return;*/
QFile file( location ); TQFile file( location );
if ( file.open( IO_ReadOnly ) ) { if ( file.open( IO_ReadOnly ) ) {
QTextStream stream( &file ); TQTextStream stream( &file );
QString line; TQString line;
while ( !stream.atEnd() ) { while ( !stream.atEnd() ) {
line = stream.readLine(); // line of text excluding '\n' line = stream.readLine(); // line of text excluding '\n'
QStringList columns = QStringList::split("\t",line.remove("\"")); TQStringList columns = TQStringList::split("\t",line.remove("\""));
if (columns.count() >= 5) if (columns.count() >= 5)
insertMetaDBEntry(columns[0],columns[1],columns[2],columns[3],columns[4],columns[5]); insertMetaDBEntry(columns[0],columns[1],columns[2],columns[3],columns[4],columns[5]);
} }
@ -259,8 +259,8 @@ void
CollectionDB::dropTables( DbConnection *conn ) CollectionDB::dropTables( DbConnection *conn )
{ {
query( QString( "DROP TABLE klamav_activity%1;" ).arg( conn ? "_temp" : "" ), conn ); query( TQString( "DROP TABLE klamav_activity%1;" ).arg( conn ? "_temp" : "" ), conn );
query( QString( "DROP TABLE klamav_metadb%1;" ).arg( conn ? "_temp" : "" ), conn ); query( TQString( "DROP TABLE klamav_metadb%1;" ).arg( conn ? "_temp" : "" ), conn );
} }
@ -268,10 +268,10 @@ void
CollectionDB::clearTables( DbConnection *conn ) CollectionDB::clearTables( DbConnection *conn )
{ {
QString clearCommand = "DELETE FROM"; TQString clearCommand = "DELETE FROM";
query( QString( "%1 klamav_activity%2;" ).arg( clearCommand ).arg( conn ? "_temp" : "" ), conn ); query( TQString( "%1 klamav_activity%2;" ).arg( clearCommand ).arg( conn ? "_temp" : "" ), conn );
query( QString( "%1 klamav_metadb%2;" ).arg( clearCommand ).arg( conn ? "_temp" : "" ), conn ); query( TQString( "%1 klamav_metadb%2;" ).arg( clearCommand ).arg( conn ? "_temp" : "" ), conn );
} }
@ -287,22 +287,22 @@ CollectionDB::moveTempTables( DbConnection *conn )
uint uint
CollectionDB::IDFromValue( QString name, QString value, bool autocreate, const bool temporary, const bool updateSpelling, DbConnection *conn ) CollectionDB::IDFromValue( TQString name, TQString value, bool autocreate, const bool temporary, const bool updateSpelling, DbConnection *conn )
{ {
if ( temporary ) if ( temporary )
name.append( "_temp" ); name.append( "_temp" );
else else
conn = NULL; conn = NULL;
QStringList values = TQStringList values =
query( QString( query( TQString(
"SELECT id, name FROM %1 WHERE name LIKE '%2';" ) "SELECT id, name FROM %1 WHERE name LIKE '%2';" )
.arg( name ) .arg( name )
.arg( CollectionDB::instance()->escapeString( value ) ), conn ); .arg( CollectionDB::instance()->escapeString( value ) ), conn );
if ( updateSpelling && !values.isEmpty() && ( values[1] != value ) ) if ( updateSpelling && !values.isEmpty() && ( values[1] != value ) )
{ {
query( QString( "UPDATE %1 SET id = %2, name = '%3' WHERE id = %4;" ) query( TQString( "UPDATE %1 SET id = %2, name = '%3' WHERE id = %4;" )
.arg( name ) .arg( name )
.arg( values.first() ) .arg( values.first() )
.arg( CollectionDB::instance()->escapeString( value ) ) .arg( CollectionDB::instance()->escapeString( value ) )
@ -313,7 +313,7 @@ CollectionDB::IDFromValue( QString name, QString value, bool autocreate, const b
uint id; uint id;
if ( values.isEmpty() && autocreate ) if ( values.isEmpty() && autocreate )
{ {
id = insert( QString( "INSERT INTO %1 ( name ) VALUES ( '%2' );" ) id = insert( TQString( "INSERT INTO %1 ( name ) VALUES ( '%2' );" )
.arg( name ) .arg( name )
.arg( CollectionDB::instance()->escapeString( value ) ), name, conn ); .arg( CollectionDB::instance()->escapeString( value ) ), name, conn );
@ -324,11 +324,11 @@ CollectionDB::IDFromValue( QString name, QString value, bool autocreate, const b
} }
QString TQString
CollectionDB::valueFromID( QString table, uint id ) CollectionDB::valueFromID( TQString table, uint id )
{ {
QStringList values = TQStringList values =
query( QString( query( TQString(
"SELECT name FROM %1 WHERE id=%2;" ) "SELECT name FROM %1 WHERE id=%2;" )
.arg( table ) .arg( table )
.arg( id ) ); .arg( id ) );
@ -338,23 +338,23 @@ CollectionDB::valueFromID( QString table, uint id )
} }
QString TQString
CollectionDB::typeCount( const QString &type_id ) CollectionDB::typeCount( const TQString &type_id )
{ {
QStringList values = TQStringList values =
query( QString( query( TQString(
"SELECT COUNT( type ) FROM klamav_activity WHERE type = %1;" ) "SELECT COUNT( type ) FROM klamav_activity WHERE type = %1;" )
.arg( type_id ) ); .arg( type_id ) );
return values.first(); return values.first();
} }
QStringList TQStringList
CollectionDB::messagesForType( const QString &type_id, const bool isValue ) CollectionDB::messagesForType( const TQString &type_id, const bool isValue )
{ {
if ( isValue) if ( isValue)
{ {
return query( QString( "SELECT * FROM klamav_activity " return query( TQString( "SELECT * FROM klamav_activity "
"WHERE (type = \"%1\" ) ;" ) "WHERE (type = \"%1\" ) ;" )
.arg( type_id ) ); .arg( type_id ) );
} }
@ -438,16 +438,16 @@ SqliteConnection::SqliteConnection( SqliteConfig* config )
: DbConnection( config ) : DbConnection( config )
{ {
QString homepath = getenv("HOME"); TQString homepath = getenv("HOME");
const QCString path = (homepath+"/.klamav/activity.db").local8Bit(); const TQCString path = (homepath+"/.klamav/activity.db").local8Bit();
// Open database file and check for correctness // Open database file and check for correctness
m_initialized = false; m_initialized = false;
QFile file( path ); TQFile file( path );
if ( file.open( IO_ReadOnly ) ) if ( file.open( IO_ReadOnly ) )
{ {
QString format; TQString format;
file.readLine( format, 50 ); file.readLine( format, 50 );
if ( !format.startsWith( "SQLite format 3" ) ) if ( !format.startsWith( "SQLite format 3" ) )
{ {
@ -465,7 +465,7 @@ SqliteConnection::SqliteConnection( SqliteConfig* config )
if ( !m_initialized ) if ( !m_initialized )
{ {
// Remove old db file; create new // Remove old db file; create new
QFile::remove( path ); TQFile::remove( path );
if ( sqlite3_open( path, &m_db ) == SQLITE_OK ) if ( sqlite3_open( path, &m_db ) == SQLITE_OK )
{ {
m_initialized = true; m_initialized = true;
@ -490,9 +490,9 @@ SqliteConnection::~SqliteConnection()
} }
QStringList SqliteConnection::query( const QString& statement ) TQStringList SqliteConnection::query( const TQString& statement )
{ {
QStringList values; TQStringList values;
int error; int error;
const char* tail; const char* tail;
sqlite3_stmt* stmt; sqlite3_stmt* stmt;
@ -505,7 +505,7 @@ QStringList SqliteConnection::query( const QString& statement )
kdDebug() << k_funcinfo << " sqlite3_compile error:" << endl; kdDebug() << k_funcinfo << " sqlite3_compile error:" << endl;
kdDebug() << sqlite3_errmsg( m_db ) << endl; kdDebug() << sqlite3_errmsg( m_db ) << endl;
kdDebug() << "on query: " << statement << endl; kdDebug() << "on query: " << statement << endl;
values = QStringList(); values = TQStringList();
} }
else else
{ {
@ -533,7 +533,7 @@ QStringList SqliteConnection::query( const QString& statement )
//iterate over columns //iterate over columns
for ( int i = 0; i < number; i++ ) for ( int i = 0; i < number; i++ )
{ {
values << QString::fromUtf8( (const char*) sqlite3_column_text( stmt, i ) ); values << TQString::fromUtf8( (const char*) sqlite3_column_text( stmt, i ) );
} }
} }
//deallocate vm ressources //deallocate vm ressources
@ -544,7 +544,7 @@ QStringList SqliteConnection::query( const QString& statement )
kdDebug() << k_funcinfo << "sqlite_step error.\n"; kdDebug() << k_funcinfo << "sqlite_step error.\n";
kdDebug() << sqlite3_errmsg( m_db ) << endl; kdDebug() << sqlite3_errmsg( m_db ) << endl;
kdDebug() << "on query: " << statement << endl; kdDebug() << "on query: " << statement << endl;
values = QStringList(); values = TQStringList();
} }
} }
@ -552,7 +552,7 @@ QStringList SqliteConnection::query( const QString& statement )
} }
int SqliteConnection::insert( const QString& statement, const QString& /* table */ ) int SqliteConnection::insert( const TQString& statement, const TQString& /* table */ )
{ {
int error; int error;
const char* tail; const char* tail;
@ -629,7 +629,7 @@ void SqliteConnection::sqlite_power(sqlite3_context *context, int argc, sqlite3_
// CLASS SqliteConfig // CLASS SqliteConfig
////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////
SqliteConfig::SqliteConfig( const QString& dbfile ) SqliteConfig::SqliteConfig( const TQString& dbfile )
: m_dbfile( dbfile ) : m_dbfile( dbfile )
{ {
} }
@ -709,37 +709,37 @@ void DbConnectionPool::putDbConnection( const DbConnection *conn )
void void
CollectionDB::expireActivity(const QString &days ) CollectionDB::expireActivity(const TQString &days )
{ {
int intdays = days.toInt(); int intdays = days.toInt();
if (intdays > 0) if (intdays > 0)
intdays--; intdays--;
query( QString( "DELETE FROM klamav_activity WHERE date < datetime('now','localtime','-%2 days', 'start of day');" ).arg(intdays) ); query( TQString( "DELETE FROM klamav_activity WHERE date < datetime('now','localtime','-%2 days', 'start of day');" ).arg(intdays) );
} }
QStringList TQStringList
CollectionDB::allActivity( ) CollectionDB::allActivity( )
{ {
return query( QString( "SELECT * FROM klamav_activity" ) ); return query( TQString( "SELECT * FROM klamav_activity" ) );
} }
QStringList TQStringList
CollectionDB::allActivityOfType(const QString &type,const QString &days ) CollectionDB::allActivityOfType(const TQString &type,const TQString &days )
{ {
int intdays = days.toInt(); int intdays = days.toInt();
intdays--; intdays--;
if (type == "All Types") if (type == "All Types")
return query( QString( "SELECT * FROM klamav_activity WHERE date > datetime('now','localtime','-%2 days', 'start of day');" ).arg(intdays) ); return query( TQString( "SELECT * FROM klamav_activity WHERE date > datetime('now','localtime','-%2 days', 'start of day');" ).arg(intdays) );
return query( QString( "SELECT * FROM klamav_activity where type = '%1'" return query( TQString( "SELECT * FROM klamav_activity where type = '%1'"
" and date > datetime('now','localtime','-%2 days', 'start of day');" ).arg(type).arg(intdays) ); " and date > datetime('now','localtime','-%2 days', 'start of day');" ).arg(type).arg(intdays) );
} }
void CollectionDB::insertEvent(const QString &type, const QString &event, const QString &file, DbConnection *conn) void CollectionDB::insertEvent(const TQString &type, const TQString &event, const TQString &file, DbConnection *conn)
{ {
if (((!(KlamavConfig::launchShutdown())) && (type == "Launch")) || if (((!(KlamavConfig::launchShutdown())) && (type == "Launch")) ||
@ -752,8 +752,8 @@ void CollectionDB::insertEvent(const QString &type, const QString &event, const
((!(KlamavConfig::startedStoppedCancelled())) && (type == "Auto-Scan"))) ((!(KlamavConfig::startedStoppedCancelled())) && (type == "Auto-Scan")))
return; return;
QString date = query( QString( "select datetime('now','localtime')" ) ).first(); TQString date = query( TQString( "select datetime('now','localtime')" ) ).first();
insert( QString( "INSERT INTO klamav_activity ( type, date, event, file )" insert( TQString( "INSERT INTO klamav_activity ( type, date, event, file )"
" VALUES ( '%1', '%2', '%3', '%4' );" ) " VALUES ( '%1', '%2', '%3', '%4' );" )
.arg( type ) .arg( type )
.arg( date ) .arg( date )
@ -764,10 +764,10 @@ void CollectionDB::insertEvent(const QString &type, const QString &event, const
kmain->activityviewer->insertItem(date,type,event,file); kmain->activityviewer->insertItem(date,type,event,file);
} }
void CollectionDB::insertMetaDBEntry(const QString &date, const QString &submission, const QString &creator,const QString &virus,const QString &alias, const QString &sender,DbConnection *conn) void CollectionDB::insertMetaDBEntry(const TQString &date, const TQString &submission, const TQString &creator,const TQString &virus,const TQString &alias, const TQString &sender,DbConnection *conn)
{ {
insert( QString( "INSERT INTO klamav_metadb ( id, date, submission, creator, virus, alias, sender )" insert( TQString( "INSERT INTO klamav_metadb ( id, date, submission, creator, virus, alias, sender )"
" VALUES ( NULL, \"%1\", \"%2\", \"%3\", \"%4\", \"%5\", \"%6\");" ) " VALUES ( NULL, \"%1\", \"%2\", \"%3\", \"%4\", \"%5\", \"%6\");" )
.arg( date ) .arg( date )
.arg( submission.toInt() ) .arg( submission.toInt() )
@ -779,10 +779,10 @@ void CollectionDB::insertMetaDBEntry(const QString &date, const QString &submis
} }
QString TQString
CollectionDB::latestMetaDBDate( ) CollectionDB::latestMetaDBDate( )
{ {
QStringList highest = query( QString( "SELECT MAX(date) FROM klamav_metadb;" )); TQStringList highest = query( TQString( "SELECT MAX(date) FROM klamav_metadb;" ));
return highest.first(); return highest.first();
} }

@ -8,12 +8,12 @@
#define KLAMAV_COLLECTIONDB_H #define KLAMAV_COLLECTIONDB_H
#include <kurl.h> #include <kurl.h>
#include <qdir.h> //stack allocated #include <tqdir.h> //stack allocated
#include <qimage.h> #include <tqimage.h>
#include <qobject.h> //baseclass #include <tqobject.h> //baseclass
#include <qptrqueue.h> //baseclass #include <tqptrqueue.h> //baseclass
#include <qsemaphore.h> //stack allocated #include <tqsemaphore.h> //stack allocated
#include <qstringlist.h> //stack allocated #include <tqstringlist.h> //stack allocated
class DbConnection; class DbConnection;
class DbConnectionPool; class DbConnectionPool;
@ -26,12 +26,12 @@ class DbConfig
class SqliteConfig : public DbConfig class SqliteConfig : public DbConfig
{ {
public: public:
SqliteConfig( const QString& /* dbfile */ ); SqliteConfig( const TQString& /* dbfile */ );
const QString dbFile() const { return m_dbfile; } const TQString dbFile() const { return m_dbfile; }
private: private:
QString m_dbfile; TQString m_dbfile;
}; };
@ -44,11 +44,11 @@ class DbConnection
DbConnection( DbConfig* /* config */ ); DbConnection( DbConfig* /* config */ );
virtual ~DbConnection() = 0; virtual ~DbConnection() = 0;
virtual QStringList query( const QString& /* statement */ ) = 0; virtual TQStringList query( const TQString& /* statement */ ) = 0;
virtual int insert( const QString& /* statement */, const QString& /* table */ ) = 0; virtual int insert( const TQString& /* statement */, const TQString& /* table */ ) = 0;
const bool isInitialized() const { return m_initialized; } const bool isInitialized() const { return m_initialized; }
virtual bool isConnected() const = 0; virtual bool isConnected() const = 0;
virtual const QString lastError() const { return "None"; } virtual const TQString lastError() const { return "None"; }
protected: protected:
bool m_initialized; bool m_initialized;
DbConfig *m_config; DbConfig *m_config;
@ -65,8 +65,8 @@ class SqliteConnection : public DbConnection
SqliteConnection( SqliteConfig* /* config */ ); SqliteConnection( SqliteConfig* /* config */ );
~SqliteConnection(); ~SqliteConnection();
QStringList query( const QString& /* statement */ ); TQStringList query( const TQString& /* statement */ );
int insert( const QString& /* statement */, const QString& /* table */ ); int insert( const TQString& /* statement */, const TQString& /* table */ );
bool isConnected()const { return true; } bool isConnected()const { return true; }
private: private:
static void sqlite_rand(sqlite3_context *context, int /*argc*/, sqlite3_value ** /*argv*/); static void sqlite_rand(sqlite3_context *context, int /*argc*/, sqlite3_value ** /*argv*/);
@ -78,7 +78,7 @@ class SqliteConnection : public DbConnection
class DbConnectionPool : QPtrQueue<DbConnection> class DbConnectionPool : TQPtrQueue<DbConnection>
{ {
public: public:
DbConnectionPool( bool temporary ); DbConnectionPool( bool temporary );
@ -91,7 +91,7 @@ class DbConnectionPool : QPtrQueue<DbConnection>
DbConnection *getDbConnection(); DbConnection *getDbConnection();
void putDbConnection( const DbConnection* /* conn */ ); void putDbConnection( const DbConnection* /* conn */ );
QString escapeString( QString string ) TQString escapeString( TQString string )
{ {
return return
string.replace( '\'', "''" ); string.replace( '\'', "''" );
@ -101,13 +101,13 @@ class DbConnectionPool : QPtrQueue<DbConnection>
static const int POOL_SIZE = 5; static const int POOL_SIZE = 5;
bool m_isTemporary; bool m_isTemporary;
QSemaphore m_semaphore; TQSemaphore m_semaphore;
DbConnection::DbConnectionType m_dbConnType; DbConnection::DbConnectionType m_dbConnType;
DbConfig *m_dbConfig; DbConfig *m_dbConfig;
}; };
class CollectionDB : public QObject class CollectionDB : public TQObject
{ {
Q_OBJECT Q_OBJECT
@ -120,14 +120,14 @@ class CollectionDB : public QObject
static CollectionDB *instance(); static CollectionDB *instance();
const QString escapeString( const QString &string ) { return m_dbConnPool->escapeString(string); } const TQString escapeString( const TQString &string ) { return m_dbConnPool->escapeString(string); }
const QString boolT() { if (m_dbConnPool->getDbConnectionType() == DbConnection::postgresql) return "'t'"; else return "1"; } const TQString boolT() { if (m_dbConnPool->getDbConnectionType() == DbConnection::postgresql) return "'t'"; else return "1"; }
const QString boolF() { if (m_dbConnPool->getDbConnectionType() == DbConnection::postgresql) return "'f'"; else return "0"; } const TQString boolF() { if (m_dbConnPool->getDbConnectionType() == DbConnection::postgresql) return "'f'"; else return "0"; }
const QString textColumnType() { if ( m_dbConnPool->getDbConnectionType() == DbConnection::postgresql ) return "TEXT"; else return "VARCHAR(255)"; } const TQString textColumnType() { if ( m_dbConnPool->getDbConnectionType() == DbConnection::postgresql ) return "TEXT"; else return "VARCHAR(255)"; }
const QString textColumnType(int length){ if ( m_dbConnPool->getDbConnectionType() == DbConnection::postgresql ) return "TEXT"; else return QString("VARCHAR(%1)").arg(length); } const TQString textColumnType(int length){ if ( m_dbConnPool->getDbConnectionType() == DbConnection::postgresql ) return "TEXT"; else return TQString("VARCHAR(%1)").arg(length); }
// We might consider using LONGTEXT type, as some lyrics could be VERY long..??? // We might consider using LONGTEXT type, as some lyrics could be VERY long..???
const QString longTextColumnType() { if ( m_dbConnPool->getDbConnectionType() == DbConnection::postgresql ) return "TEXT"; else return "TEXT"; } const TQString longTextColumnType() { if ( m_dbConnPool->getDbConnectionType() == DbConnection::postgresql ) return "TEXT"; else return "TEXT"; }
const QString randomFunc() { if ( m_dbConnPool->getDbConnectionType() == DbConnection::postgresql ) return "random()"; else return "RAND()"; } const TQString randomFunc() { if ( m_dbConnPool->getDbConnectionType() == DbConnection::postgresql ) return "random()"; else return "RAND()"; }
int getType() { return m_dbConnPool->getDbConnectionType(); } int getType() { return m_dbConnPool->getDbConnectionType(); }
@ -149,12 +149,12 @@ class CollectionDB : public QObject
void returnStaticDbConnection( DbConnection *conn ); void returnStaticDbConnection( DbConnection *conn );
//sql helper methods //sql helper methods
QStringList query( const QString& statement, DbConnection *conn = NULL ); TQStringList query( const TQString& statement, DbConnection *conn = NULL );
int insert( const QString& statement, const QString& table, DbConnection *conn = NULL ); int insert( const TQString& statement, const TQString& table, DbConnection *conn = NULL );
//table management methods //table management methods
bool isEmpty(); bool isEmpty();
bool isValid(const QString &column, const QString &table); bool isValid(const TQString &column, const TQString &table);
void createTables( DbConnection *conn = NULL ); void createTables( DbConnection *conn = NULL );
void createActivityTable( DbConnection *conn = NULL ); void createActivityTable( DbConnection *conn = NULL );
void createMetaDBTable( DbConnection *conn = NULL ); void createMetaDBTable( DbConnection *conn = NULL );
@ -164,17 +164,17 @@ class CollectionDB : public QObject
void moveTempTables( DbConnection *conn ); void moveTempTables( DbConnection *conn );
QString typeCount( const QString &type_id ); TQString typeCount( const TQString &type_id );
QStringList messagesForType( const QString &type_id, const bool isValue ); TQStringList messagesForType( const TQString &type_id, const bool isValue );
QStringList allActivity( ); TQStringList allActivity( );
QStringList allActivityOfType(const QString &type, const QString &days ); TQStringList allActivityOfType(const TQString &type, const TQString &days );
void insertEvent(const QString &type, const QString &event,const QString &file = NULL, DbConnection *conn = NULL ); void insertEvent(const TQString &type, const TQString &event,const TQString &file = NULL, DbConnection *conn = NULL );
void expireActivity(const QString &days ); void expireActivity(const TQString &days );
void insertMetaDBEntry(const QString &date, const QString &submission, const QString &creator,const QString &virus,const QString &alias, const QString &sender,DbConnection *conn = NULL); void insertMetaDBEntry(const TQString &date, const TQString &submission, const TQString &creator,const TQString &virus,const TQString &alias, const TQString &sender,DbConnection *conn = NULL);
QString latestMetaDBDate( ); TQString latestMetaDBDate( );
protected: protected:
QCString md5sum( const QString& artist, const QString& album, const QString& file = QString::null ); TQCString md5sum( const TQString& artist, const TQString& album, const TQString& file = TQString::null );
/** Manages regular folder monitoring scan */ /** Manages regular folder monitoring scan */
public slots: public slots:
@ -194,10 +194,10 @@ class CollectionDB : public QObject
//general management methods //general management methods
uint IDFromValue( QString name, QString value, bool autocreate = true, const bool temporary = false, uint IDFromValue( TQString name, TQString value, bool autocreate = true, const bool temporary = false,
const bool updateSpelling = false, DbConnection *conn = NULL ); const bool updateSpelling = false, DbConnection *conn = NULL );
QString valueFromID( QString table, uint id ); TQString valueFromID( TQString table, uint id );
//member variables //member variables

@ -20,19 +20,19 @@ email : markey@web.de
#include "autoscanoptions.h" #include "autoscanoptions.h"
#include "logoptions.h" #include "logoptions.h"
#include <qcombobox.h> #include <tqcombobox.h>
#include <qgroupbox.h> #include <tqgroupbox.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qlineedit.h> #include <tqlineedit.h>
#include <qmessagebox.h> #include <tqmessagebox.h>
#include <qobjectlist.h> #include <tqobjectlist.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qradiobutton.h> #include <tqradiobutton.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <qtextcodec.h> #include <tqtextcodec.h>
#include <qtooltip.h> #include <tqtooltip.h>
#include <qvbox.h> #include <tqvbox.h>
#include <kapplication.h> //kapp #include <kapplication.h> //kapp
#include <kcombobox.h> #include <kcombobox.h>
@ -45,7 +45,7 @@ email : markey@web.de
// PUBLIC // PUBLIC
////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////
KlamavConfigDialog::KlamavConfigDialog( QWidget *parent, const char* name, KConfigSkeleton *config ) KlamavConfigDialog::KlamavConfigDialog( TQWidget *parent, const char* name, KConfigSkeleton *config )
: KConfigDialog( parent, name, config ) : KConfigDialog( parent, name, config )
{ {
setWFlags( WDestructiveClose ); setWFlags( WDestructiveClose );
@ -64,15 +64,15 @@ KlamavConfigDialog::KlamavConfigDialog( QWidget *parent, const char* name, KConf
addPage( m_autoscanoptions, i18n( "Auto-Scan" ), "filefind", i18n( "Configure Auto-Scan" ) ); addPage( m_autoscanoptions, i18n( "Auto-Scan" ), "filefind", i18n( "Configure Auto-Scan" ) );
addPage( m_logoptions, i18n( "Event Logging" ), "kate", i18n( "Configure Events to Log" ) ); addPage( m_logoptions, i18n( "Event Logging" ), "kate", i18n( "Configure Events to Log" ) );
QObjectList *list = queryList( "QLabel", "infoPixmap" ); TQObjectList *list = queryList( "TQLabel", "infoPixmap" );
for( QObject *label = list->first(); label; label = list->next() ) for( TQObject *label = list->first(); label; label = list->next() )
static_cast<QLabel*>(label)->setPixmap( QMessageBox::standardIcon( QMessageBox::Information ) ); static_cast<TQLabel*>(label)->setPixmap( TQMessageBox::standardIcon( TQMessageBox::Information ) );
delete list; delete list;
//stop KFont Requesters getting stupidly large //stop KFont Requesters getting stupidly large
list = queryList( "QLabel", "m_sampleLabel" ); list = queryList( "TQLabel", "m_sampleLabel" );
for( QObject *label = list->first(); label; label = list->next() ) for( TQObject *label = list->first(); label; label = list->next() )
static_cast<QLabel*>(label)->setMaximumWidth( 250 ); static_cast<TQLabel*>(label)->setMaximumWidth( 250 );
delete list; delete list;
@ -85,7 +85,7 @@ KlamavConfigDialog::~KlamavConfigDialog()
/** Show page by object name */ /** Show page by object name */
void KlamavConfigDialog::showPage( const QCString& page ) void KlamavConfigDialog::showPage( const TQCString& page )
{ {
for( uint index = 0; index < m_pageList.count(); index++ ) { for( uint index = 0; index < m_pageList.count(); index++ ) {
if ( m_pageList[index]->name() == page ) { if ( m_pageList[index]->name() == page ) {
@ -96,7 +96,7 @@ void KlamavConfigDialog::showPage( const QCString& page )
} }
/** Reimplemented from KConfigDialog */ /** Reimplemented from KConfigDialog */
void KlamavConfigDialog::addPage( QWidget *page, const QString &itemName, const QString &pixmapName, const QString &header, bool manage ) void KlamavConfigDialog::addPage( TQWidget *page, const TQString &itemName, const TQString &pixmapName, const TQString &header, bool manage )
{ {
// Add the widget pointer to our list, for later reference // Add the widget pointer to our list, for later reference
m_pageList << page; m_pageList << page;

@ -17,14 +17,14 @@ email : markey@web.de
#define KLAMAVCONFIGDIALOG_H #define KLAMAVCONFIGDIALOG_H
#include <qmap.h> #include <tqmap.h>
#include <qvaluelist.h> #include <tqvaluelist.h>
#include <kconfigdialog.h> #include <kconfigdialog.h>
class QComboBox; class TQComboBox;
class QGroupBox; class TQGroupBox;
class QVBox; class TQVBox;
class KlamavConfigDialog : public KConfigDialog class KlamavConfigDialog : public KConfigDialog
@ -32,13 +32,13 @@ class KlamavConfigDialog : public KConfigDialog
Q_OBJECT Q_OBJECT
public: public:
KlamavConfigDialog( QWidget *parent, const char* name, KConfigSkeleton *config ); KlamavConfigDialog( TQWidget *parent, const char* name, KConfigSkeleton *config );
~KlamavConfigDialog(); ~KlamavConfigDialog();
void addPage( QWidget *page, const QString &itemName, const QString &pixmapName, void addPage( TQWidget *page, const TQString &itemName, const TQString &pixmapName,
const QString &header=QString::null, bool manage=true); const TQString &header=TQString::null, bool manage=true);
void showPage( const QCString& page ); void showPage( const TQCString& page );
private: private:
@ -50,9 +50,9 @@ class KlamavConfigDialog : public KConfigDialog
class AutoScanOptions *m_autoscanoptions; class AutoScanOptions *m_autoscanoptions;
class LogOptions *m_logoptions; class LogOptions *m_logoptions;
QValueList<QWidget*> m_pageList; TQValueList<TQWidget*> m_pageList;
QMap<QString, QString> m_pluginName; TQMap<TQString, TQString> m_pluginName;
QMap<QString, QString> m_pluginKlamavName; TQMap<TQString, TQString> m_pluginKlamavName;
}; };

@ -9,7 +9,7 @@
* (at your option) any later version. * * (at your option) any later version. *
***************************************************************************/ ***************************************************************************/
// Do not introduce any Qt or KDE dependencies into the "CT"-prefixed classes. // Do not introduce any TQt or KDE dependencies into the "CT"-prefixed classes.
// I want to be able to reuse these classes with another GUI toolkit. -GM 11/99 // I want to be able to reuse these classes with another GUI toolkit. -GM 11/99
#include "ctcron.h" #include "ctcron.h"
@ -19,7 +19,7 @@
#include <pwd.h> // pwd, getpwnam(), getpwuid() #include <pwd.h> // pwd, getpwnam(), getpwuid()
#include <assert.h> #include <assert.h>
#include <qfile.h> #include <tqfile.h>
#include <kprocess.h> #include <kprocess.h>
#include <ktempfile.h> #include <ktempfile.h>
@ -37,7 +37,7 @@ CTCron::CTCron(bool _syscron, string ) :
tmp.close(); tmp.close();
tmpFileName = tmp.name(); tmpFileName = tmp.name();
QString readCommand; TQString readCommand;
/* if (uid == 0) /* if (uid == 0)
// root, so provide requested crontab // root, so provide requested crontab
@ -51,8 +51,8 @@ CTCron::CTCron(bool _syscron, string ) :
} }
else else
{ {
readCommand = QString("crontab -u ") + _login.c_str() + " -l > " + KProcess::quote(tmpFileName); readCommand = TQString("crontab -u ") + _login.c_str() + " -l > " + KProcess::quote(tmpFileName);
writeCommand = QString("crontab -u ") + _login.c_str() + " " + KProcess::quote(tmpFileName); writeCommand = TQString("crontab -u ") + _login.c_str() + " " + KProcess::quote(tmpFileName);
if (!initFromPasswd(getpwnam(_login.c_str()))) if (!initFromPasswd(getpwnam(_login.c_str())))
{ {
error = i18n("No password entry found for user '%1'").arg(_login.c_str()); error = i18n("No password entry found for user '%1'").arg(_login.c_str());
@ -81,9 +81,9 @@ CTCron::CTCron(bool _syscron, string ) :
// Don't set error if it can't be read, it means the user // Don't set error if it can't be read, it means the user
// doesn't have a crontab. // doesn't have a crontab.
if (system(QFile::encodeName(readCommand)) == 0) if (system(TQFile::encodeName(readCommand)) == 0)
{ {
ifstream cronfile(QFile::encodeName(tmpFileName)); ifstream cronfile(TQFile::encodeName(tmpFileName));
cronfile >> *this; cronfile >> *this;
} }
@ -101,8 +101,8 @@ CTCron::CTCron(const struct passwd *pwd) :
tmp.close(); tmp.close();
tmpFileName = tmp.name(); tmpFileName = tmp.name();
QString readCommand = QString("crontab -u ") + QString(pwd->pw_name) + " -l > " + KProcess::quote(tmpFileName); TQString readCommand = TQString("crontab -u ") + TQString(pwd->pw_name) + " -l > " + KProcess::quote(tmpFileName);
writeCommand = QString("crontab -u ") + QString(pwd->pw_name) + " " + KProcess::quote(tmpFileName); writeCommand = TQString("crontab -u ") + TQString(pwd->pw_name) + " " + KProcess::quote(tmpFileName);
initFromPasswd(pwd); initFromPasswd(pwd);
@ -114,9 +114,9 @@ CTCron::CTCron(const struct passwd *pwd) :
// Don't set error if it can't be read, it means the user // Don't set error if it can't be read, it means the user
// doesn't have a crontab. // doesn't have a crontab.
if (system(QFile::encodeName(readCommand)) == 0) if (system(TQFile::encodeName(readCommand)) == 0)
{ {
ifstream cronfile(QFile::encodeName(tmpFileName)); ifstream cronfile(TQFile::encodeName(tmpFileName));
cronfile >> *this; cronfile >> *this;
} }
@ -264,17 +264,17 @@ CTCron::~CTCron()
void CTCron::apply() void CTCron::apply()
{ {
// write to temp file // write to temp file
ofstream cronfile(QFile::encodeName(tmpFileName)); ofstream cronfile(TQFile::encodeName(tmpFileName));
cronfile << *this << flush; cronfile << *this << flush;
// install temp file into crontab // install temp file into crontab
if (system(QFile::encodeName(writeCommand)) != 0) if (system(TQFile::encodeName(writeCommand)) != 0)
{ {
error = i18n("An error occurred while updating crontab."); error = i18n("An error occurred while updating crontab.");
} }
// remove the temp file // remove the temp file
(void) unlink(QFile::encodeName(tmpFileName)); (void) unlink(TQFile::encodeName(tmpFileName));
if (isError()) if (isError())
return; return;

@ -12,14 +12,14 @@
#ifndef CTCRON_H #ifndef CTCRON_H
#define CTCRON_H #define CTCRON_H
// Do not introduce any Qt or KDE dependencies into the "CT"-prefixed classes. // Do not introduce any TQt or KDE dependencies into the "CT"-prefixed classes.
// I want to be able to reuse these classes with another GUI toolkit. -GM 11/99 // I want to be able to reuse these classes with another GUI toolkit. -GM 11/99
#include <vector> #include <vector>
#include <string> #include <string>
#include <iostream> #include <iostream>
#include <qstring.h> // Anarchy! -WABA #include <tqstring.h> // Anarchy! -WABA
class CTException; class CTException;
class CTTask; class CTTask;
@ -94,7 +94,7 @@ public:
/** /**
* Return error description * Return error description
*/ */
QString errorMessage() { QString r = error; error = QString::null; return r; } TQString errorMessage() { TQString r = error; error = TQString::null; return r; }
/** /**
@ -138,10 +138,10 @@ private:
unsigned int initialTaskCount; unsigned int initialTaskCount;
unsigned int initialVariableCount; unsigned int initialVariableCount;
QString writeCommand; TQString writeCommand;
QString tmpFileName; TQString tmpFileName;
QString error; TQString error;
protected: protected:
// Initialize member variables from the struct passwd. // Initialize member variables from the struct passwd.

@ -9,7 +9,7 @@
* (at your option) any later version. * * (at your option) any later version. *
***************************************************************************/ ***************************************************************************/
// Do not introduce any Qt or KDE dependencies into the "CT"-prefixed classes. // Do not introduce any TQt or KDE dependencies into the "CT"-prefixed classes.
// I want to be able to reuse these classes with another GUI toolkit. -GM 11/99 // I want to be able to reuse these classes with another GUI toolkit. -GM 11/99
#include "ctdom.h" #include "ctdom.h"

@ -12,7 +12,7 @@
#ifndef CTDOM_H #ifndef CTDOM_H
#define CTDOM_H #define CTDOM_H
// Do not introduce any Qt or KDE dependencies into the "CT"-prefixed classes. // Do not introduce any TQt or KDE dependencies into the "CT"-prefixed classes.
// I want to be able to reuse these classes with another GUI toolkit. -GM 11/99 // I want to be able to reuse these classes with another GUI toolkit. -GM 11/99
#include "ctunit.h" #include "ctunit.h"

@ -9,7 +9,7 @@
* (at your option) any later version. * * (at your option) any later version. *
***************************************************************************/ ***************************************************************************/
// Do not introduce any Qt or KDE dependencies into the "CT"-prefixed classes. // Do not introduce any TQt or KDE dependencies into the "CT"-prefixed classes.
// I want to be able to reuse these classes with another GUI toolkit. -GM 11/99 // I want to be able to reuse these classes with another GUI toolkit. -GM 11/99
#include "ctdow.h" #include "ctdow.h"

@ -12,7 +12,7 @@
#ifndef CTDOW_H #ifndef CTDOW_H
#define CTDOW_H #define CTDOW_H
// Do not introduce any Qt or KDE dependencies into the "CT"-prefixed classes. // Do not introduce any TQt or KDE dependencies into the "CT"-prefixed classes.
// I want to be able to reuse these classes with another GUI toolkit. -GM 11/99 // I want to be able to reuse these classes with another GUI toolkit. -GM 11/99
#include "ctunit.h" #include "ctunit.h"

@ -10,7 +10,7 @@
* (at your option) any later version. * * (at your option) any later version. *
***************************************************************************/ ***************************************************************************/
// Do not introduce any Qt or KDE dependencies into the "CT"-prefixed classes. // Do not introduce any TQt or KDE dependencies into the "CT"-prefixed classes.
// I want to be able to reuse these classes with another GUI toolkit. -GM 11/99 // I want to be able to reuse these classes with another GUI toolkit. -GM 11/99
#include "cthost.h" #include "cthost.h"

@ -12,13 +12,13 @@
#ifndef CTHOST_H #ifndef CTHOST_H
#define CTHOST_H #define CTHOST_H
// Do not introduce any Qt or KDE dependencies into the "CT"-prefixed classes. // Do not introduce any TQt or KDE dependencies into the "CT"-prefixed classes.
// I want to be able to reuse these classes with another GUI toolkit. -GM 11/99 // I want to be able to reuse these classes with another GUI toolkit. -GM 11/99
#include <vector> #include <vector>
#include <string> #include <string>
#include <qstring.h> // Whatever #include <tqstring.h> // Whatever
class CTCron; class CTCron;
struct passwd; struct passwd;
@ -78,7 +78,7 @@ public:
/** /**
* Error message * Error message
*/ */
QString errorMessage() { QString r = error; error = QString::null; return r; } TQString errorMessage() { TQString r = error; error = TQString::null; return r; }
/** /**
@ -110,7 +110,7 @@ private:
CTCron* createCTCron(bool _syscron = false, std::string _login = ""); CTCron* createCTCron(bool _syscron = false, std::string _login = "");
CTCron* createCTCron(const struct passwd *); CTCron* createCTCron(const struct passwd *);
QString error; TQString error;
}; };
typedef std::vector<CTCron*>::iterator CTCronIterator; typedef std::vector<CTCron*>::iterator CTCronIterator;

@ -12,7 +12,7 @@
#ifndef CTHOUR_H #ifndef CTHOUR_H
#define CTHOUR_H #define CTHOUR_H
// Do not introduce any Qt or KDE dependencies into the "CT"-prefixed classes. // Do not introduce any TQt or KDE dependencies into the "CT"-prefixed classes.
// I want to be able to reuse these classes with another GUI toolkit. -GM 11/99 // I want to be able to reuse these classes with another GUI toolkit. -GM 11/99
#include "ctunit.h" #include "ctunit.h"

@ -12,13 +12,13 @@
#ifndef CTI18N_H #ifndef CTI18N_H
#define CTI18N_H #define CTI18N_H
// Do not introduce any Qt or KDE dependencies into the "CT"-prefixed classes. // Do not introduce any TQt or KDE dependencies into the "CT"-prefixed classes.
// I want to be able to reuse these classes with another GUI toolkit. -GM 11/99 // I want to be able to reuse these classes with another GUI toolkit. -GM 11/99
// //
// Note: I do make an exception to the above rule for this file, as it is // Note: I do make an exception to the above rule for this file, as it is
// necessary to support internationalization. // necessary to support internationalization.
// //
// Regardless, please don't introduce any other Qt or KDE dependencies here. // Regardless, please don't introduce any other TQt or KDE dependencies here.
// -GM 11/99 // -GM 11/99
#include <klocale.h> #include <klocale.h>

@ -12,7 +12,7 @@
#ifndef CTMINUTE_H #ifndef CTMINUTE_H
#define CTMINUTE_H #define CTMINUTE_H
// Do not introduce any Qt or KDE dependencies into the "CT"-prefixed classes. // Do not introduce any TQt or KDE dependencies into the "CT"-prefixed classes.
// I want to be able to reuse these classes with another GUI toolkit. -GM 11/99 // I want to be able to reuse these classes with another GUI toolkit. -GM 11/99
#include "ctunit.h" #include "ctunit.h"

@ -9,7 +9,7 @@
* (at your option) any later version. * * (at your option) any later version. *
***************************************************************************/ ***************************************************************************/
// Do not introduce any Qt or KDE dependencies into the "CT"-prefixed classes. // Do not introduce any TQt or KDE dependencies into the "CT"-prefixed classes.
// I want to be able to reuse these classes with another GUI toolkit. -GM 11/99 // I want to be able to reuse these classes with another GUI toolkit. -GM 11/99
#include "ctmonth.h" #include "ctmonth.h"

@ -12,7 +12,7 @@
#ifndef CTMONTH_H #ifndef CTMONTH_H
#define CTMONTH_H #define CTMONTH_H
// Do not introduce any Qt or KDE dependencies into the "CT"-prefixed classes. // Do not introduce any TQt or KDE dependencies into the "CT"-prefixed classes.
// I want to be able to reuse these classes with another GUI toolkit. -GM 11/99 // I want to be able to reuse these classes with another GUI toolkit. -GM 11/99
#include "ctunit.h" #include "ctunit.h"

@ -9,7 +9,7 @@
* (at your option) any later version. * * (at your option) any later version. *
***************************************************************************/ ***************************************************************************/
// Do not introduce any Qt or KDE dependencies into the "CT"-prefixed classes. // Do not introduce any TQt or KDE dependencies into the "CT"-prefixed classes.
// I want to be able to reuse these classes with another GUI toolkit. -GM 11/99 // I want to be able to reuse these classes with another GUI toolkit. -GM 11/99
#include "cttask.h" #include "cttask.h"

@ -12,7 +12,7 @@
#ifndef CTTASK_H #ifndef CTTASK_H
#define CTTASK_H #define CTTASK_H
// Do not introduce any Qt or KDE dependencies into the "CT"-prefixed classes. // Do not introduce any TQt or KDE dependencies into the "CT"-prefixed classes.
// I want to be able to reuse these classes with another GUI toolkit. -GM 11/99 // I want to be able to reuse these classes with another GUI toolkit. -GM 11/99
#include <string> #include <string>

@ -9,7 +9,7 @@
* (at your option) any later version. * * (at your option) any later version. *
***************************************************************************/ ***************************************************************************/
// Do not introduce any Qt or KDE dependencies into the "CT"-prefixed classes. // Do not introduce any TQt or KDE dependencies into the "CT"-prefixed classes.
// I want to be able to reuse these classes with another GUI toolkit. -GM 11/99 // I want to be able to reuse these classes with another GUI toolkit. -GM 11/99
#include "cti18n.h" #include "cti18n.h"

@ -12,7 +12,7 @@
#ifndef CTUNIT_H #ifndef CTUNIT_H
#define CTUNIT_H #define CTUNIT_H
// Do not introduce any Qt or KDE dependencies into the "CT"-prefixed classes. // Do not introduce any TQt or KDE dependencies into the "CT"-prefixed classes.
// I want to be able to reuse these classes with another GUI toolkit. -GM 11/99 // I want to be able to reuse these classes with another GUI toolkit. -GM 11/99
#include <string> #include <string>

@ -9,7 +9,7 @@
* (at your option) any later version. * * (at your option) any later version. *
***************************************************************************/ ***************************************************************************/
// Do not introduce any Qt or KDE dependencies into the "CT"-prefixed classes. // Do not introduce any TQt or KDE dependencies into the "CT"-prefixed classes.
// I want to be able to reuse these classes with another GUI toolkit. -GM 11/99 // I want to be able to reuse these classes with another GUI toolkit. -GM 11/99
#include "ctvariable.h" #include "ctvariable.h"

@ -12,7 +12,7 @@
#ifndef CTVARIABLE_H #ifndef CTVARIABLE_H
#define CTVARIABLE_H #define CTVARIABLE_H
// Do not introduce any Qt or KDE dependencies into the "CT"-prefixed classes. // Do not introduce any TQt or KDE dependencies into the "CT"-prefixed classes.
// I want to be able to reuse these classes with another GUI toolkit. -GM 11/99 // I want to be able to reuse these classes with another GUI toolkit. -GM 11/99
#include <string> #include <string>

@ -29,51 +29,51 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <klocale.h> #include <klocale.h>
#include <kwin.h> #include <kwin.h>
DatePicker::DatePicker(QWidget *parent, const QDate& date) DatePicker::DatePicker(TQWidget *parent, const TQDate& date)
: QVBox( parent, 0,(WType_TopLevel | WDestructiveClose | WStyle_StaysOnTop)) : TQVBox( parent, 0,(WType_TopLevel | WDestructiveClose | WStyle_StaysOnTop))
{ {
setFrameStyle( QFrame::PopupPanel | QFrame::Raised ); setFrameStyle( TQFrame::PopupPanel | TQFrame::Raised );
KWin::setType( winId(), NET::Utility ); KWin::setType( winId(), NET::Utility );
KWin::setOnAllDesktops( handle(), true ); KWin::setOnAllDesktops( handle(), true );
picker = new KDatePicker(this, date); picker = new KDatePicker(this, date);
picker->setCloseButton(true); picker->setCloseButton(true);
connect( picker, SIGNAL(dateSelected(QDate)),this, connect( picker, SIGNAL(dateSelected(TQDate)),this,
SLOT(slotEmitSelectedDate(QDate)) ); SLOT(slotEmitSelectedDate(TQDate)) );
/* name and icon for kicker's taskbar */ /* name and icon for kicker's taskbar */
setCaption(i18n("Calendar")); setCaption(i18n("Calendar"));
setIcon(SmallIcon("date")); setIcon(SmallIcon("date"));
} }
void DatePicker::closeEvent(QCloseEvent* e) void DatePicker::closeEvent(TQCloseEvent* e)
{ {
/* prefs->setCalendarSize(size());*/ /* prefs->setCalendarSize(size());*/
QVBox::closeEvent(e); TQVBox::closeEvent(e);
} }
void DatePicker::keyPressEvent(QKeyEvent *e) void DatePicker::keyPressEvent(TQKeyEvent *e)
{ {
QVBox::keyPressEvent(e); TQVBox::keyPressEvent(e);
if (e->key() == Qt::Key_Escape) if (e->key() == TQt::Key_Escape)
{ {
close(); close();
} }
} }
bool DatePicker::setDate(const QDate& date) bool DatePicker::setDate(const TQDate& date)
{ {
return picker->setDate(date); return picker->setDate(date);
} }
void DatePicker::slotEmitSelectedDate(QDate newdate) void DatePicker::slotEmitSelectedDate(TQDate newdate)
{ {
emit signalSelectedDate(newdate); emit signalSelectedDate(newdate);
//kdDebug() << "here date" << endl; //kdDebug() << "here date" << endl;
close(); close();
} }
QDate DatePicker::date() TQDate DatePicker::date()
{ {
return picker->date(); return picker->date();
} }

@ -28,32 +28,32 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include <config.h> #include <config.h>
#endif #endif
#include <qvbox.h> #include <tqvbox.h>
#include <qdatetime.h> #include <tqdatetime.h>
class KDatePicker; class KDatePicker;
// class Prefs; // class Prefs;
class DatePicker : public QVBox class DatePicker : public TQVBox
{ {
Q_OBJECT Q_OBJECT
public: public:
DatePicker(QWidget*, const QDate&); DatePicker(TQWidget*, const TQDate&);
bool setDate(const QDate& date); bool setDate(const TQDate& date);
QDate date(); TQDate date();
protected: protected:
void closeEvent(QCloseEvent* e); void closeEvent(TQCloseEvent* e);
void keyPressEvent(QKeyEvent *e); void keyPressEvent(TQKeyEvent *e);
private: private:
KDatePicker *picker; KDatePicker *picker;
private slots: private slots:
void slotEmitSelectedDate(QDate); void slotEmitSelectedDate(TQDate);
signals: signals:
void signalSelectedDate(QDate); void signalSelectedDate(TQDate);
}; };

@ -14,9 +14,9 @@
#include "freshklam.h" #include "freshklam.h"
#include "../config.h" #include "../config.h"
#include <qheader.h> #include <tqheader.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qpopupmenu.h> #include <tqpopupmenu.h>
#include <ktoolbarbutton.h> //ctor #include <ktoolbarbutton.h> //ctor
#include <ktempfile.h> #include <ktempfile.h>
@ -49,20 +49,20 @@ using namespace KlamAV;
* The dialog will by default be modeless, unless you set 'modal' to * The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog. * TRUE to construct a modal dialog.
*/ */
KlamDB::KlamDB( QWidget* parent, const char* name, bool modal, WFlags fl ) KlamDB::KlamDB( TQWidget* parent, const char* name, bool modal, WFlags fl )
: QDialog( parent, name, modal, fl ) : TQDialog( parent, name, modal, fl )
{ {
if ( !name ) if ( !name )
setName( "KlamDB" ); setName( "KlamDB" );
loadinprogress = false; loadinprogress = false;
QVBoxLayout *vbox = new QVBoxLayout(this, KDialog::marginHint(), TQVBoxLayout *vbox = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint(), "vbox"); KDialog::spacingHint(), "vbox");
QWidget* privateLayoutWidget = new QWidget( this, "dblayout" ); TQWidget* privateLayoutWidget = new TQWidget( this, "dblayout" );
vbox->addWidget(privateLayoutWidget); vbox->addWidget(privateLayoutWidget);
dblayout = new QGridLayout( privateLayoutWidget, 1, 1, 2, 2, "dblayout"); dblayout = new TQGridLayout( privateLayoutWidget, 1, 1, 2, 2, "dblayout");
dblayout->setColStretch(1, 1); dblayout->setColStretch(1, 1);
tabBrowser = new TabWidget(privateLayoutWidget); tabBrowser = new TabWidget(privateLayoutWidget);
@ -81,43 +81,43 @@ KlamDB::KlamDB( QWidget* parent, const char* name, bool modal, WFlags fl )
VirusList = new KListView( privateLayoutWidget, "VirusList" ); VirusList = new KListView( privateLayoutWidget, "VirusList" );
VirusList->addColumn( i18n( "All Known Viruses" ),150 ); VirusList->addColumn( i18n( "All Known Viruses" ),150 );
connect(VirusList, SIGNAL( doubleClicked( QListViewItem * , const QPoint &, int ) ), connect(VirusList, SIGNAL( doubleClicked( TQListViewItem * , const TQPoint &, int ) ),
this, SLOT(slotOpenTab(QListViewItem * , const QPoint &, int )) ); this, SLOT(slotOpenTab(TQListViewItem * , const TQPoint &, int )) );
menu = new QPopupMenu( VirusList ); menu = new TQPopupMenu( VirusList );
QPixmap gicon; TQPixmap gicon;
QPixmap vicon; TQPixmap vicon;
QPixmap ticon; TQPixmap ticon;
QString iconPath = locate("cache", KMimeType::favIconForURL("http://www.viruspool.net")+".png"); TQString iconPath = locate("cache", KMimeType::favIconForURL("http://www.viruspool.net")+".png");
if ( iconPath.isEmpty() ) if ( iconPath.isEmpty() )
vicon = SmallIcon("find"); vicon = SmallIcon("find");
else else
vicon = QPixmap( iconPath ); vicon = TQPixmap( iconPath );
iconPath = locate("cache", KMimeType::favIconForURL("http://www.google.com")+".png"); iconPath = locate("cache", KMimeType::favIconForURL("http://www.google.com")+".png");
if ( iconPath.isEmpty() ) if ( iconPath.isEmpty() )
gicon = SmallIcon("find"); gicon = SmallIcon("find");
else else
gicon = QPixmap( iconPath ); gicon = TQPixmap( iconPath );
iconPath = locate("cache", KMimeType::favIconForURL("http://www.trendmicro.com")+".png"); iconPath = locate("cache", KMimeType::favIconForURL("http://www.trendmicro.com")+".png");
if ( iconPath.isEmpty() ) if ( iconPath.isEmpty() )
ticon = SmallIcon("find"); ticon = SmallIcon("find");
else else
ticon = QPixmap( iconPath ); ticon = TQPixmap( iconPath );
menu->insertItem(vicon, i18n("Search in VirusList"), this,SLOT(slotVirusList()) ); menu->insertItem(vicon, i18n("Search in VirusList"), this,SLOT(slotVirusList()) );
menu->insertItem(vicon, i18n("Search in VirusPool"), this,SLOT(slotVirusPool()) ); menu->insertItem(vicon, i18n("Search in VirusPool"), this,SLOT(slotVirusPool()) );
menu->insertItem(ticon, i18n("Search with Trend Micro"), this,SLOT(slotTrendMicro()) ); menu->insertItem(ticon, i18n("Search with Trend Micro"), this,SLOT(slotTrendMicro()) );
menu->insertItem(gicon, i18n("Search with Google"), this,SLOT(slotGoogle()) ); menu->insertItem(gicon, i18n("Search with Google"), this,SLOT(slotGoogle()) );
connect(VirusList, SIGNAL( contextMenuRequested( QListViewItem *, const QPoint& , int ) ), connect(VirusList, SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint& , int ) ),
this, SLOT( slotRMB( QListViewItem *, const QPoint &, int ) ) ); this, SLOT( slotRMB( TQListViewItem *, const TQPoint &, int ) ) );
kLineEdit1 = new KListViewSearchLine( (QWidget *)searchToolBar, VirusList,"klinedit1"); kLineEdit1 = new KListViewSearchLine( (TQWidget *)searchToolBar, VirusList,"klinedit1");
QValueList<int> columns; TQValueList<int> columns;
columns.append(0); columns.append(0);
kLineEdit1->setSearchColumns(columns); kLineEdit1->setSearchColumns(columns);
kLineEdit1->setMaxLength(2); kLineEdit1->setMaxLength(2);
@ -140,7 +140,7 @@ KlamDB::KlamDB( QWidget* parent, const char* name, bool modal, WFlags fl )
*/ */
KlamDB::~KlamDB() KlamDB::~KlamDB()
{ {
// no need to delete child widgets, Qt does it all for us // no need to delete child widgets, TQt does it all for us
} }
/* /*
@ -691,14 +691,14 @@ char *cli_strtok(const char *line, int fieldno, const char *delim)
return buffer; return buffer;
} }
void KlamDB::shouldIShow(QWidget * current) void KlamDB::shouldIShow(TQWidget * current)
{ {
static struct cl_stat *dbstat=NULL; static struct cl_stat *dbstat=NULL;
QString location; TQString location;
if ((current == this) && (!(loadinprogress))){ if ((current == this) && (!(loadinprogress))){
QString db = kmain->freshklam->getCurrentDBDir(); TQString db = kmain->freshklam->getCurrentDBDir();
if (checkdir((const char *)db) == -1){ if (checkdir((const char *)db) == -1){
kdDebug() << "returned -1" << endl; kdDebug() << "returned -1" << endl;
@ -732,7 +732,7 @@ void KlamDB::shouldIShow(QWidget * current)
prog->setProgress (count); prog->setProgress (count);
kapp->processEvents(); kapp->processEvents();
// QString db = kmain->freshklam->getCurrentDBDir(); // TQString db = kmain->freshklam->getCurrentDBDir();
listdir((const char *)db); listdir((const char *)db);
@ -754,8 +754,8 @@ void KlamDB::shouldIShow(QWidget * current)
loadinprogress = false; loadinprogress = false;
// Default english // Default english
QString location = locate( "data", "klamav/about/main-" + KGlobal::locale()->language() + ".html" ); TQString location = locate( "data", "klamav/about/main-" + KGlobal::locale()->language() + ".html" );
if( location != QString::null ) if( location != TQString::null )
homepage->openURL( location ); homepage->openURL( location );
else else
homepage->openURL( locate("data", "klamav/about/main.html") ); homepage->openURL( locate("data", "klamav/about/main.html") );
@ -771,12 +771,12 @@ void KlamDB::addVirusName(char *start)
kapp->processEvents(); kapp->processEvents();
if ((count % 500) == 0){ if ((count % 500) == 0){
//progress->setLabel("Loading " + QString(start)); //progress->setLabel("Loading " + TQString(start));
progress->setLabel( i18n( "Loading ClamAV's Database of Virus Signatures") ); progress->setLabel( i18n( "Loading ClamAV's Database of Virus Signatures") );
prog->setProgress (count); prog->setProgress (count);
kapp->processEvents(); kapp->processEvents();
} }
new KListViewItem( VirusList, QString(start)); new KListViewItem( VirusList, TQString(start));
kapp->processEvents(); kapp->processEvents();
} }
@ -788,9 +788,9 @@ unsigned int KlamDB::getSigNos()
unsigned int ret= 0; unsigned int ret= 0;
unsigned int no = 0; unsigned int no = 0;
struct cl_engine *engine = NULL; struct cl_engine *engine = NULL;
QStringList lastDownloadPaths; TQStringList lastDownloadPaths;
QString dbdir; TQString dbdir;
QString db; TQString db;
KConfig* config = KGlobal::config(); KConfig* config = KGlobal::config();
config->setGroup("Freshklam"); config->setGroup("Freshklam");
@ -817,19 +817,19 @@ unsigned int KlamDB::getSigNos()
} }
void KlamDB::slotOpenTab(QListViewItem * item, const QPoint& , int ) void KlamDB::slotOpenTab(TQListViewItem * item, const TQPoint& , int )
{ {
PageViewer* page = new PageViewer(this, "page"); PageViewer* page = new PageViewer(this, "page");
//connect( m_part, SIGNAL(signalSettingsChanged()), page, SLOT(slotPaletteOrFontChanged())); //connect( m_part, SIGNAL(signalSettingsChanged()), page, SLOT(slotPaletteOrFontChanged()));
//connect( page, SIGNAL(setTabIcon(const QPixmap&)), //connect( page, SIGNAL(setTabIcon(const TQPixmap&)),
// this, SLOT(setTabIcon(const QPixmap&))); // this, SLOT(setTabIcon(const TQPixmap&)));
//connect( page, SIGNAL(setWindowCaption (const QString &)), //connect( page, SIGNAL(setWindowCaption (const TQString &)),
// this, SLOT(slotTabCaption (const QString &)) ); // this, SLOT(slotTabCaption (const TQString &)) );
connect( page, SIGNAL(urlClicked(const KURL &,bool)), connect( page, SIGNAL(urlClicked(const KURL &,bool)),
this, SLOT(slotOpenTabPlain(const KURL &,bool)) ); this, SLOT(slotOpenTabPlain(const KURL &,bool)) );
QString url = item->text(0); TQString url = item->text(0);
Frame *frame=new Frame(this, page, page->widget(), "VirusList : "+item->text(0)); Frame *frame=new Frame(this, page, page->widget(), "VirusList : "+item->text(0));
//connectFrame(frame); //connectFrame(frame);
@ -850,10 +850,10 @@ void KlamDB::slotOpenTabPlain(const KURL& url, bool background)
PageViewer* page = new PageViewer(this, "page"); PageViewer* page = new PageViewer(this, "page");
//connect( m_part, SIGNAL(signalSettingsChanged()), page, SLOT(slotPaletteOrFontChanged())); //connect( m_part, SIGNAL(signalSettingsChanged()), page, SLOT(slotPaletteOrFontChanged()));
/* connect( page, SIGNAL(setTabIcon(const QPixmap&)), /* connect( page, SIGNAL(setTabIcon(const TQPixmap&)),
this, SLOT(setTabIcon(const QPixmap&)));*/ this, SLOT(setTabIcon(const TQPixmap&)));*/
connect( page, SIGNAL(setWindowCaption (const QString &)), connect( page, SIGNAL(setWindowCaption (const TQString &)),
this, SLOT(slotTabCaption (const QString &)) ); this, SLOT(slotTabCaption (const TQString &)) );
connect( page, SIGNAL(urlClicked(const KURL &,bool)), connect( page, SIGNAL(urlClicked(const KURL &,bool)),
this, SLOT(slotOpenTabPlain(const KURL &,bool)) ); this, SLOT(slotOpenTabPlain(const KURL &,bool)) );
@ -873,7 +873,7 @@ void KlamDB::slotOpenTabPlain(const KURL& url, bool background)
page->openURL(url); page->openURL(url);
} }
void KlamDB::slotTabCaption(const QString &caption) void KlamDB::slotTabCaption(const TQString &caption)
{ {
if (!caption.isEmpty()) if (!caption.isEmpty())
{ {
@ -896,20 +896,20 @@ void KlamDB::slotOpenHome()
// else // else
setFocus(); setFocus();
QString location = locate( "data", "klamav/about/wait-" + KGlobal::locale()->language() + ".html" ); TQString location = locate( "data", "klamav/about/wait-" + KGlobal::locale()->language() + ".html" );
if( location != QString::null ) if( location != TQString::null )
homepage->openURL( location ); homepage->openURL( location );
else else
homepage->openURL( locate("data", "klamav/about/wait.html") ); homepage->openURL( locate("data", "klamav/about/wait.html") );
} }
void KlamDB::slotRMB( QListViewItem* Item, const QPoint & point, int ) void KlamDB::slotRMB( TQListViewItem* Item, const TQPoint & point, int )
{ {
if( Item ) if( Item )
menu->popup( point ); menu->popup( point );
} }
void KlamDB::slotOpenPrefix(QString prefix, QString title,QString url) void KlamDB::slotOpenPrefix(TQString prefix, TQString title,TQString url)
{ {
PageViewer* page = new PageViewer(this, "page"); PageViewer* page = new PageViewer(this, "page");
@ -926,47 +926,47 @@ void KlamDB::slotOpenPrefix(QString prefix, QString title,QString url)
void KlamDB::slotVirusPool() void KlamDB::slotVirusPool()
{ {
QString url = VirusList->selectedItem()->text(0); TQString url = VirusList->selectedItem()->text(0);
QString prefix = QString("http://www.viruspool.net/virus.cms?&name="); TQString prefix = TQString("http://www.viruspool.net/virus.cms?&name=");
slotOpenPrefix(prefix,"VirusPool",url); slotOpenPrefix(prefix,"VirusPool",url);
} }
void KlamDB::slotVirusList() void KlamDB::slotVirusList()
{ {
QString url = VirusList->selectedItem()->text(0); TQString url = VirusList->selectedItem()->text(0);
QString prefix = QString("http://www.viruslist.com/en/find?search_mode=virus&words="); TQString prefix = TQString("http://www.viruslist.com/en/find?search_mode=virus&words=");
slotOpenPrefix(prefix,"VirusList",url); slotOpenPrefix(prefix,"VirusList",url);
} }
void KlamDB::slotGoogle() void KlamDB::slotGoogle()
{ {
QString url = VirusList->selectedItem()->text(0); TQString url = VirusList->selectedItem()->text(0);
QString prefix = QString("http://www.google.com/search?ie=ISO-8859-1&q="); TQString prefix = TQString("http://www.google.com/search?ie=ISO-8859-1&q=");
slotOpenPrefix(prefix,"Google",url); slotOpenPrefix(prefix,"Google",url);
} }
void KlamDB::slotTrendMicro() void KlamDB::slotTrendMicro()
{ {
QString url = VirusList->selectedItem()->text(0); TQString url = VirusList->selectedItem()->text(0);
QString prefix = QString("http://www.trendmicro.com/vinfo/virusencyclo/default2.asp?m=q&virus="); TQString prefix = TQString("http://www.trendmicro.com/vinfo/virusencyclo/default2.asp?m=q&virus=");
slotOpenPrefix(prefix,"TrendMicro",url); slotOpenPrefix(prefix,"TrendMicro",url);
} }
void KlamDB::slotExternal(QString name,QString service) void KlamDB::slotExternal(TQString name,TQString service)
{ {
kmain->showVirusBrowser(); kmain->showVirusBrowser();
shouldIShow(this); shouldIShow(this);
QString prefix; TQString prefix;
if (service == "VirusPool") if (service == "VirusPool")
prefix = QString("http://www.viruspool.net/virus.cms?&name="); prefix = TQString("http://www.viruspool.net/virus.cms?&name=");
else if (service == "Google") else if (service == "Google")
prefix = QString("http://www.google.com/search?ie=ISO-8859-1&q="); prefix = TQString("http://www.google.com/search?ie=ISO-8859-1&q=");
else if (service == "VirusList") else if (service == "VirusList")
prefix = QString("http://www.viruslist.com/en/find?search_mode=virus&words="); prefix = TQString("http://www.viruslist.com/en/find?search_mode=virus&words=");
else else
prefix = QString("http://www.trendmicro.com/vinfo/virusencyclo/default2.asp?m=q&virus="); prefix = TQString("http://www.trendmicro.com/vinfo/virusencyclo/default2.asp?m=q&virus=");
slotOpenPrefix(prefix,service,name); slotOpenPrefix(prefix,service,name);
} }

@ -10,26 +10,26 @@
#ifndef KLAMDB_H #ifndef KLAMDB_H
#define KLAMDB_H #define KLAMDB_H
#include <qvariant.h> #include <tqvariant.h>
#include <qdialog.h> #include <tqdialog.h>
#include <kurl.h> #include <kurl.h>
class QVBoxLayout; class TQVBoxLayout;
class QHBoxLayout; class TQHBoxLayout;
class QGridLayout; class TQGridLayout;
class QSpacerItem; class TQSpacerItem;
class QTabWidget; class TQTabWidget;
class QWidget; class TQWidget;
class KListViewSearchLine; class KListViewSearchLine;
class QListView; class TQListView;
class KListView; class KListView;
class KListViewItem; class KListViewItem;
class QListViewItem; class TQListViewItem;
class KProgress; class KProgress;
class KProgressDialog; class KProgressDialog;
class QLabel; class TQLabel;
class QPopupMenu; class TQPopupMenu;
namespace KlamAV namespace KlamAV
@ -38,25 +38,25 @@ namespace KlamAV
class PageViewer; class PageViewer;
} }
class KlamDB : public QDialog class KlamDB : public TQDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
KlamDB( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); KlamDB( TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~KlamDB(); ~KlamDB();
KlamAV::TabWidget* tabBrowser; KlamAV::TabWidget* tabBrowser;
QWidget* tab; TQWidget* tab;
KListViewSearchLine* kLineEdit1; KListViewSearchLine* kLineEdit1;
KListView* VirusList; KListView* VirusList;
void slotExternal(QString name, QString service); void slotExternal(TQString name, TQString service);
public slots: public slots:
void shouldIShow(QWidget * current); void shouldIShow(TQWidget * current);
protected: protected:
QGridLayout* dblayout; TQGridLayout* dblayout;
private: private:
int listdir(const char *dirname); int listdir(const char *dirname);
@ -69,18 +69,18 @@ private:
int count; int count;
int sigs; int sigs;
int newsigs; int newsigs;
QLabel* label; TQLabel* label;
void slotOpenHome(); void slotOpenHome();
QPopupMenu* menu; TQPopupMenu* menu;
void slotOpenPrefix(QString prefix, QString title,QString url); void slotOpenPrefix(TQString prefix, TQString title,TQString url);
KlamAV::PageViewer* homepage; KlamAV::PageViewer* homepage;
bool loadinprogress; bool loadinprogress;
protected slots: protected slots:
virtual void languageChange(); virtual void languageChange();
void slotOpenTab(QListViewItem * item , const QPoint &point, int num ); void slotOpenTab(TQListViewItem * item , const TQPoint &point, int num );
void slotOpenTabPlain(const KURL& url, bool background = false); void slotOpenTabPlain(const KURL& url, bool background = false);
void slotTabCaption(const QString &capt); void slotTabCaption(const TQString &capt);
void slotRMB( QListViewItem* Item, const QPoint & point, int num); void slotRMB( TQListViewItem* Item, const TQPoint & point, int num);
void slotVirusPool(); void slotVirusPool();
void slotVirusList(); void slotVirusList();
void slotGoogle(); void slotGoogle();

@ -34,7 +34,7 @@ class DCOPKlamscan : virtual public DCOPObject
k_dcop: k_dcop:
virtual void scanURLs(const QString &urls) = 0; virtual void scanURLs(const TQString &urls) = 0;
}; };
#endif // DCOPDEMOIFACE_H #endif // DCOPDEMOIFACE_H

@ -16,15 +16,15 @@
* * * *
***************************************************************************/ ***************************************************************************/
#include <qlabel.h> #include <tqlabel.h>
#include <qtooltip.h> #include <tqtooltip.h>
#include <qdir.h> #include <tqdir.h>
#include <kfileitem.h> #include <kfileitem.h>
#include <klocale.h> #include <klocale.h>
#include <kdebug.h> #include <kdebug.h>
#include <kdeversion.h> #include <kdeversion.h>
#include <qregexp.h> #include <tqregexp.h>
#include <kiconloader.h> #include <kiconloader.h>
#include <kapplication.h> #include <kapplication.h>
#include <dcopref.h> #include <dcopref.h>
@ -39,23 +39,23 @@ using Collection::DeviceItem;
CollectionSetup* CollectionSetup::s_instance; CollectionSetup* CollectionSetup::s_instance;
CollectionSetup::CollectionSetup( QWidget *parent, bool recursive ) CollectionSetup::CollectionSetup( TQWidget *parent, bool recursive )
: QVBox( parent ) : TQVBox( parent )
{ {
s_instance = this; s_instance = this;
// (new QLabel( i18n( // (new TQLabel( i18n(
// "Select the folder(s) to scan. "), this ))->setAlignment( Qt::WordBreak ); // "Select the folder(s) to scan. "), this ))->setAlignment( TQt::WordBreak );
m_view = new QListView( this ); m_view = new TQListView( this );
/* m_recursive = new QCheckBox( i18n("&Scan folders recursively"), this );*/ /* m_recursive = new TQCheckBox( i18n("&Scan folders recursively"), this );*/
m_recursive = recursive; m_recursive = recursive;
// m_monitor = new QCheckBox( i18n("&Watch folders for changes"), this ); // m_monitor = new TQCheckBox( i18n("&Watch folders for changes"), this );
// m_playlists = new QCheckBox( i18n("&Import playlists"), this ); // m_playlists = new TQCheckBox( i18n("&Import playlists"), this );
// //
// QToolTip::add( m_recursive, i18n( "If selected, amaroK reads all folders recursively." ) ); // TQToolTip::add( m_recursive, i18n( "If selected, amaroK reads all folders recursively." ) );
// QToolTip::add( m_monitor, i18n( "If selected, folders will automatically get rescanned when the content is modified, e.g. when a new file was added." ) ); // TQToolTip::add( m_monitor, i18n( "If selected, folders will automatically get rescanned when the content is modified, e.g. when a new file was added." ) );
// QToolTip::add( m_playlists, i18n( "If selected, playlist files (.m3u) will automatically be added to the Playlist-Browser." ) ); // TQToolTip::add( m_playlists, i18n( "If selected, playlist files (.m3u) will automatically be added to the Playlist-Browser." ) );
// Read config values // Read config values
// m_dirs = AmarokConfig::collectionFolders(); // m_dirs = AmarokConfig::collectionFolders();
@ -63,11 +63,11 @@ CollectionSetup::CollectionSetup( QWidget *parent, bool recursive )
// m_monitor->setChecked( AmarokConfig::monitorChanges() ); // m_monitor->setChecked( AmarokConfig::monitorChanges() );
// m_playlists->setChecked( AmarokConfig::importPlaylists() ); // m_playlists->setChecked( AmarokConfig::importPlaylists() );
m_view->addColumn( QString::null ); m_view->addColumn( TQString::null );
m_view->setRootIsDecorated( true ); m_view->setRootIsDecorated( true );
reinterpret_cast<QWidget*>(m_view->header())->hide(); reinterpret_cast<TQWidget*>(m_view->header())->hide();
new Item( m_view, i18n( "System Folder" ), "/", "folder_red" ); new Item( m_view, i18n( "System Folder" ), "/", "folder_red" );
new Item( m_view, i18n( "Home Folder" ), QDir::homeDirPath(), "folder_home" ); new Item( m_view, i18n( "Home Folder" ), TQDir::homeDirPath(), "folder_home" );
new DeviceItem( m_view ); new DeviceItem( m_view );
setSpacing( 6 ); setSpacing( 6 );
@ -82,8 +82,8 @@ void CollectionSetup::slotRecursiveToggled(bool on)
////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////
// CLASS Item // CLASS Item
////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////
Item::Item( QListView *parent , const QString &name, const QString &path, const QString &icon ) Item::Item( TQListView *parent , const TQString &name, const TQString &path, const TQString &icon )
: QCheckListItem( parent, name, QCheckListItem::CheckBox ) : TQCheckListItem( parent, name, TQCheckListItem::CheckBox )
, m_lister( true ) , m_lister( true )
, m_url( "file:" + path ) , m_url( "file:" + path )
, m_listed( false ) , m_listed( false )
@ -101,8 +101,8 @@ Item::Item( QListView *parent , const QString &name, const QString &path, const
} }
Item::Item( QListViewItem *parent, const KURL &url ) Item::Item( TQListViewItem *parent, const KURL &url )
: QCheckListItem( parent, url.fileName(), QCheckListItem::CheckBox ) : TQCheckListItem( parent, url.fileName(), TQCheckListItem::CheckBox )
, m_lister( true ) , m_lister( true )
, m_url( url ) , m_url( url )
, m_listed( false ) , m_listed( false )
@ -117,12 +117,12 @@ Item::Item( QListViewItem *parent, const KURL &url )
} }
QString TQString
Item::fullPath() const Item::fullPath() const
{ {
QString path; TQString path;
for ( const QListViewItem *item = this; dynamic_cast<const QListViewItem*>( item ); item = item->parent() ) for ( const TQListViewItem *item = this; dynamic_cast<const TQListViewItem*>( item ); item = item->parent() )
{ {
path.prepend( '/' ); path.prepend( '/' );
path.prepend( item->text( 1 ) ); path.prepend( item->text( 1 ) );
@ -140,7 +140,7 @@ Item::setOpen( bool b )
m_listed = true; m_listed = true;
} }
QListViewItem::setOpen( b ); TQListViewItem::setOpen( b );
} }
@ -148,11 +148,11 @@ void
Item::stateChange( bool b ) Item::stateChange( bool b )
{ {
if( CollectionSetup::instance()->recursive() ) if( CollectionSetup::instance()->recursive() )
for( QListViewItem *item = firstChild(); item; item = item->nextSibling() ) for( TQListViewItem *item = firstChild(); item; item = item->nextSibling() )
static_cast<QCheckListItem*>(item)->QCheckListItem::setOn( b ); static_cast<TQCheckListItem*>(item)->TQCheckListItem::setOn( b );
// Update folder list // Update folder list
QStringList::Iterator it = CollectionSetup::instance()->m_dirs.find( m_url.path() ); TQStringList::Iterator it = CollectionSetup::instance()->m_dirs.find( m_url.path() );
if ( isOn() ) { if ( isOn() ) {
if ( it == CollectionSetup::instance()->m_dirs.end() ) if ( it == CollectionSetup::instance()->m_dirs.end() )
{ {
@ -180,7 +180,7 @@ void
Item::activate() Item::activate()
{ {
if( !isDisabled() ) if( !isDisabled() )
QCheckListItem::activate(); TQCheckListItem::activate();
} }
@ -200,7 +200,7 @@ Item::newItems( const KFileItemList &list ) //SLOT
void void
Item::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int align ) Item::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int align )
{ {
bool dirty = false; bool dirty = false;
@ -216,10 +216,10 @@ Item::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, in
} }
// Use a different color if this folder has an activated child folder // Use a different color if this folder has an activated child folder
QColorGroup _cg = cg; TQColorGroup _cg = cg;
if ( dirty ) _cg.setColor( QColorGroup::Text, Qt::blue ); if ( dirty ) _cg.setColor( TQColorGroup::Text, TQt::blue );
QCheckListItem::paintCell( p, isDisabled() ? listView()->palette().disabled() : _cg, column, width, align ); TQCheckListItem::paintCell( p, isDisabled() ? listView()->palette().disabled() : _cg, column, width, align );
if (!dirty) if (!dirty)
setOn(false); setOn(false);
} }
@ -228,8 +228,8 @@ Item::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, in
// CLASS DeviceItem // CLASS DeviceItem
////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////
DeviceItem::DeviceItem( QListView *parent ) DeviceItem::DeviceItem( TQListView *parent )
: QCheckListItem( parent, i18n("Devices"), QCheckListItem::CheckBox ) : TQCheckListItem( parent, i18n("Devices"), TQCheckListItem::CheckBox )
, m_lister( true ) , m_lister( true )
, m_listed( false ) , m_listed( false )
{ {
@ -250,8 +250,8 @@ DeviceItem::DeviceItem( QListView *parent )
} }
DeviceItem::DeviceItem( QListViewItem *parent, const QString &name, const KURL &url ) DeviceItem::DeviceItem( TQListViewItem *parent, const TQString &name, const KURL &url )
: QCheckListItem( parent, name, QCheckListItem::CheckBox ) : TQCheckListItem( parent, name, TQCheckListItem::CheckBox )
, m_lister( true ) , m_lister( true )
, m_url( url ) , m_url( url )
, m_listed( false ) , m_listed( false )
@ -262,14 +262,14 @@ DeviceItem::DeviceItem( QListViewItem *parent, const QString &name, const KURL &
else else
////kdDebug() << "attached" << endl; ////kdDebug() << "attached" << endl;
QByteArray data; TQByteArray data;
QByteArray param; TQByteArray param;
QCString retType; TQCString retType;
QStringList retVal; TQStringList retVal;
QDataStream streamout(param,IO_WriteOnly); TQDataStream streamout(param,IO_WriteOnly);
streamout<< url.fileName(); streamout<< url.fileName();
QCString mediacall="mediamanager"; TQCString mediacall="mediamanager";
QCString devicecall="properties"; TQCString devicecall="properties";
if ( KDE::versionMajor() == 3 && KDE::versionMinor() < 4 ) if ( KDE::versionMajor() == 3 && KDE::versionMinor() < 4 )
{ {
mediacall="mountwatcher"; mediacall="mountwatcher";
@ -299,10 +299,10 @@ DeviceItem::DeviceItem( QListViewItem *parent, const QString &name, const KURL &
} }
QString TQString
DeviceItem::fullPath() const DeviceItem::fullPath() const
{ {
QString path = text(1); TQString path = text(1);
if (path != "devices") if (path != "devices")
return path; return path;
return ""; return "";
@ -318,7 +318,7 @@ DeviceItem::setOpen( bool b )
} }
m_listed = true; m_listed = true;
QListViewItem::setOpen( b ); TQListViewItem::setOpen( b );
} }
@ -326,13 +326,13 @@ void
DeviceItem::stateChange( bool b ) DeviceItem::stateChange( bool b )
{ {
if( CollectionSetup::instance()->recursive() ) if( CollectionSetup::instance()->recursive() )
for( QListViewItem *item = firstChild(); item; item = item->nextSibling() ) for( TQListViewItem *item = firstChild(); item; item = item->nextSibling() )
static_cast<QCheckListItem*>(item)->QCheckListItem::setOn( b ); static_cast<TQCheckListItem*>(item)->TQCheckListItem::setOn( b );
if (text(1) != "devices") if (text(1) != "devices")
{ {
// Update folder list // Update folder list
QStringList::Iterator it = CollectionSetup::instance()->m_dirs.find( text(1) ); TQStringList::Iterator it = CollectionSetup::instance()->m_dirs.find( text(1) );
if ( isOn() ) { if ( isOn() ) {
if ( it == CollectionSetup::instance()->m_dirs.end() ) if ( it == CollectionSetup::instance()->m_dirs.end() )
{ {
@ -363,7 +363,7 @@ void
DeviceItem::activate() DeviceItem::activate()
{ {
if( !isDisabled() ) if( !isDisabled() )
QCheckListItem::activate(); TQCheckListItem::activate();
} }
@ -386,11 +386,11 @@ DeviceItem::newItems( const KFileItemList &list ) //SLOT
void void
DeviceItem::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int align ) DeviceItem::paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int align )
{ {
bool dirty = false; bool dirty = false;
QColorGroup _cg = cg; TQColorGroup _cg = cg;
////kdDebug() << text(1) << endl; ////kdDebug() << text(1) << endl;
if (text(1) != "devices") if (text(1) != "devices")
@ -409,7 +409,7 @@ DeviceItem::paintCell( QPainter * p, const QColorGroup & cg, int column, int wid
} }
else else
{ {
for( QListViewItem *item = firstChild(); item; item = item->nextSibling() ) for( TQListViewItem *item = firstChild(); item; item = item->nextSibling() )
{ {
DeviceItem *itm = dynamic_cast<DeviceItem*>(item); DeviceItem *itm = dynamic_cast<DeviceItem*>(item);
for ( uint i = 0; i < CollectionSetup::instance()->m_dirs.count(); i++ ) for ( uint i = 0; i < CollectionSetup::instance()->m_dirs.count(); i++ )
@ -428,12 +428,12 @@ DeviceItem::paintCell( QPainter * p, const QColorGroup & cg, int column, int wid
} }
} }
// Use a different color if this folder has an activated child folder // Use a different color if this folder has an activated child folder
if ( dirty ) _cg.setColor( QColorGroup::Text, Qt::blue ); if ( dirty ) _cg.setColor( TQColorGroup::Text, TQt::blue );
QCheckListItem::paintCell( p, isDisabled() ? listView()->palette().disabled() : _cg, column, width, align ); TQCheckListItem::paintCell( p, isDisabled() ? listView()->palette().disabled() : _cg, column, width, align );
} }
void void
DeviceItem::mountDevice( const QString & device) DeviceItem::mountDevice( const TQString & device)
{ {
if (!kapp->dcopClient()->isAttached()) if (!kapp->dcopClient()->isAttached())
@ -442,9 +442,9 @@ DeviceItem::mountDevice( const QString & device)
//Set Up our DCOP Calls //Set Up our DCOP Calls
QStringList retVal; TQStringList retVal;
QCString mediacall="mediamanager"; TQCString mediacall="mediamanager";
QCString devicecall="properties"; TQCString devicecall="properties";
if ( KDE::versionMajor() == 3 && KDE::versionMinor() < 4 ) if ( KDE::versionMajor() == 3 && KDE::versionMinor() < 4 )
{ {
mediacall="mountwatcher"; mediacall="mountwatcher";

@ -19,9 +19,9 @@
#ifndef _DIRECTORYLIST_H #ifndef _DIRECTORYLIST_H
#define _DIRECTORYLIST_H #define _DIRECTORYLIST_H
#include <qcheckbox.h> //inlined functions #include <tqcheckbox.h> //inlined functions
#include <qlistview.h> //baseclass #include <tqlistview.h> //baseclass
#include <qvbox.h> //baseclass #include <tqvbox.h> //baseclass
#include <kdirlister.h> //stack allocated #include <kdirlister.h> //stack allocated
#include <kurl.h> //stack allocated #include <kurl.h> //stack allocated
@ -30,7 +30,7 @@
namespace Collection { class Item; } namespace Collection { class Item; }
class CollectionSetup : public QVBox class CollectionSetup : public TQVBox
{ {
Q_OBJECT Q_OBJECT
friend class Collection::Item; friend class Collection::Item;
@ -38,17 +38,17 @@ Q_OBJECT
public: public:
static CollectionSetup* instance() { return s_instance; } static CollectionSetup* instance() { return s_instance; }
CollectionSetup( QWidget* ,bool ); CollectionSetup( TQWidget* ,bool );
QStringList dirs() const { return m_dirs; } TQStringList dirs() const { return m_dirs; }
bool recursive() const { return m_recursive; } bool recursive() const { return m_recursive; }
// bool monitor() const { return m_monitor->isChecked(); } // bool monitor() const { return m_monitor->isChecked(); }
// bool importPlaylists() const { return m_playlists->isChecked(); } // bool importPlaylists() const { return m_playlists->isChecked(); }
QStringList m_dirs; TQStringList m_dirs;
QMap<QString,int> m_refcount; TQMap<TQString,int> m_refcount;
signals: signals:
void dirsSelected(QStringList& dirs); void dirsSelected(TQStringList& dirs);
public slots: public slots:
@ -57,30 +57,30 @@ public slots:
private: private:
static CollectionSetup* s_instance; static CollectionSetup* s_instance;
QListView *m_view; TQListView *m_view;
bool m_recursive; bool m_recursive;
QCheckBox *m_monitor; TQCheckBox *m_monitor;
QCheckBox *m_playlists; TQCheckBox *m_playlists;
}; };
namespace Collection { //just to keep it out of the global namespace namespace Collection { //just to keep it out of the global namespace
class Item : public QObject, public QCheckListItem class Item : public TQObject, public TQCheckListItem
{ {
Q_OBJECT Q_OBJECT
public: public:
Item( QListView *parent, const QString &name, const QString &path, const QString &icon=QString::null ); Item( TQListView *parent, const TQString &name, const TQString &path, const TQString &icon=TQString::null );
Item( QListViewItem *parent, const KURL &url ); Item( TQListViewItem *parent, const KURL &url );
QCheckListItem *parent() const { return (QCheckListItem*)QListViewItem::parent(); } TQCheckListItem *parent() const { return (TQCheckListItem*)TQListViewItem::parent(); }
bool isDisabled() const { return CollectionSetup::instance()->recursive() && parent() && parent()->isOn(); } bool isDisabled() const { return CollectionSetup::instance()->recursive() && parent() && parent()->isOn(); }
QString fullPath() const; TQString fullPath() const;
void setOpen( bool b ); // reimpl. void setOpen( bool b ); // reimpl.
void stateChange( bool ); // reimpl. void stateChange( bool ); // reimpl.
void activate(); // reimpl. void activate(); // reimpl.
void paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int align ); // reimpl. void paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int align ); // reimpl.
public slots: public slots:
void newItems( const KFileItemList& ); void newItems( const KFileItemList& );
@ -93,26 +93,26 @@ private:
}; };
class DeviceItem : public QObject, public QCheckListItem class DeviceItem : public TQObject, public TQCheckListItem
{ {
Q_OBJECT Q_OBJECT
public: public:
DeviceItem( QListView *parent ); DeviceItem( TQListView *parent );
DeviceItem( QListViewItem *parent, const QString &name, const KURL &url ); DeviceItem( TQListViewItem *parent, const TQString &name, const KURL &url );
QCheckListItem *parent() const { return (QCheckListItem*)QListViewItem::parent(); } TQCheckListItem *parent() const { return (TQCheckListItem*)TQListViewItem::parent(); }
bool isDisabled() const { return CollectionSetup::instance()->recursive() && parent() && parent()->isOn(); } bool isDisabled() const { return CollectionSetup::instance()->recursive() && parent() && parent()->isOn(); }
QString fullPath() const; TQString fullPath() const;
void setOpen( bool b ); // reimpl. void setOpen( bool b ); // reimpl.
void stateChange( bool ); // reimpl. void stateChange( bool ); // reimpl.
void activate(); // reimpl. void activate(); // reimpl.
void paintCell( QPainter * p, const QColorGroup & cg, int column, int width, int align ); // reimpl. void paintCell( TQPainter * p, const TQColorGroup & cg, int column, int width, int align ); // reimpl.
public slots: public slots:
void newItems( const KFileItemList& ); void newItems( const KFileItemList& );
void completed() { if( childCount() == 0 ) { setExpandable( false ); repaint(); } } void completed() { if( childCount() == 0 ) { setExpandable( false ); repaint(); } }
private: private:
void mountDevice(const QString & device); void mountDevice(const TQString & device);
KDirLister m_lister; KDirLister m_lister;
KURL m_url; KURL m_url;
bool m_listed; bool m_listed;

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>FirstRunWizard</class> <class>FirstRunWizard</class>
<widget class="QWizard"> <widget class="TQWizard">
<property name="name"> <property name="name">
<cstring>FirstRunWizard</cstring> <cstring>FirstRunWizard</cstring>
</property> </property>
@ -15,7 +15,7 @@
<property name="caption"> <property name="caption">
<string>First-Run Wizard</string> <string>First-Run Wizard</string>
</property> </property>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>WizardPage</cstring> <cstring>WizardPage</cstring>
</property> </property>
@ -44,7 +44,7 @@
</string> </string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="2"> <widget class="TQLabel" row="0" column="2">
<property name="name"> <property name="name">
<cstring>preview</cstring> <cstring>preview</cstring>
</property> </property>
@ -82,7 +82,7 @@
</spacer> </spacer>
</grid> </grid>
</widget> </widget>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>WizardPage_1</cstring> <cstring>WizardPage_1</cstring>
</property> </property>
@ -152,7 +152,7 @@
</rect> </rect>
</property> </property>
</spacer> </spacer>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>CheckForDatabaseUpdates</cstring> <cstring>CheckForDatabaseUpdates</cstring>
</property> </property>
@ -174,7 +174,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>CheckForClamAVUpdates</cstring> <cstring>CheckForClamAVUpdates</cstring>
</property> </property>
@ -196,7 +196,7 @@
<bool>false</bool> <bool>false</bool>
</property> </property>
</widget> </widget>
<widget class="QGroupBox"> <widget class="TQGroupBox">
<property name="name"> <property name="name">
<cstring>groupBox1</cstring> <cstring>groupBox1</cstring>
</property> </property>
@ -243,7 +243,7 @@
<number>6</number> <number>6</number>
</property> </property>
</widget> </widget>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1</cstring> <cstring>textLabel1</cstring>
</property> </property>
@ -259,7 +259,7 @@
<string>Signature Database Location:</string> <string>Signature Database Location:</string>
</property> </property>
</widget> </widget>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel1_2</cstring> <cstring>textLabel1_2</cstring>
</property> </property>
@ -372,11 +372,11 @@
</variables> </variables>
<functions> <functions>
<function access="private" specifier="non virtual">init()</function> <function access="private" specifier="non virtual">init()</function>
<function access="protected">showPage( QWidget * w )</function> <function access="protected">showPage( TQWidget * w )</function>
<function returnType="KURL">databasePath()</function> <function returnType="KURL">databasePath()</function>
<function returnType="KURL">quarantinePath()</function> <function returnType="KURL">quarantinePath()</function>
<function returnType="QString">defaultDatabasePath()</function> <function returnType="TQString">defaultDatabasePath()</function>
<function returnType="QString">defaultQuarantinePath()</function> <function returnType="TQString">defaultQuarantinePath()</function>
<function returnType="bool">downloadDatabase()</function> <function returnType="bool">downloadDatabase()</function>
<function returnType="bool">downloadClamAV()</function> <function returnType="bool">downloadClamAV()</function>
</functions> </functions>

@ -2,7 +2,7 @@
** ui.h extension file, included from the uic-generated form implementation. ** ui.h extension file, included from the uic-generated form implementation.
** **
** If you want to add, delete, or rename functions or slots, use ** If you want to add, delete, or rename functions or slots, use
** Qt Designer to update this file, preserving your code. ** TQt Designer to update this file, preserving your code.
** **
** You should not define a constructor or destructor in this file. ** You should not define a constructor or destructor in this file.
** Instead, write your code in functions called init() and destroy(). ** Instead, write your code in functions called init() and destroy().
@ -13,14 +13,14 @@
#include "klamav.h" #include "klamav.h"
#include <kapplication.h> #include <kapplication.h>
#include <klocale.h> #include <klocale.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include <stdlib.h> #include <stdlib.h>
#include <kstandarddirs.h> #include <kstandarddirs.h>
#include <kurl.h> #include <kurl.h>
QString databasepath; TQString databasepath;
QString quarantinepath; TQString quarantinepath;
@ -32,20 +32,20 @@ FirstRunWizard::init()
cancelButton()->setFixedSize( cancelButton()->sizeHint() ); cancelButton()->setFixedSize( cancelButton()->sizeHint() );
helpButton()->hide(); helpButton()->hide();
QString homepath = getenv("HOME"); TQString homepath = getenv("HOME");
databasepath = homepath + "/.klamav/database"; databasepath = homepath + "/.klamav/database";
DatabaseLocation->setURL(databasepath); DatabaseLocation->setURL(databasepath);
quarantinepath = homepath + "/.klamav/quarantine"; quarantinepath = homepath + "/.klamav/quarantine";
QuarantineLocation->setURL(quarantinepath); QuarantineLocation->setURL(quarantinepath);
preview->setPixmap( QPixmap(locate("data", "klamav/about/klam.png")) ); preview->setPixmap( TQPixmap(locate("data", "klamav/about/klam.png")) );
// picture1->setPixmap( getJPG( "amarok_rocks" ) ); // picture1->setPixmap( getJPG( "amarok_rocks" ) );
// picture4->setPixmap( *picture1->pixmap() ); // picture4->setPixmap( *picture1->pixmap() );
ClamBanner->setText(QString("<a href=\"http://ads.clamav.net/adclick.php?n=a9141dd1\" target=\"_blank\"><img src=\"%1\" border=\"0\" alt=\"ClamAV banner\" /></a>").arg(locate("data", "klamav/about/tshirt.png"))); ClamBanner->setText(TQString("<a href=\"http://ads.clamav.net/adclick.php?n=a9141dd1\" target=\"_blank\"><img src=\"%1\" border=\"0\" alt=\"ClamAV banner\" /></a>").arg(locate("data", "klamav/about/tshirt.png")));
setFinishEnabled ( WizardPage_1, true ); setFinishEnabled ( WizardPage_1, true );
@ -53,9 +53,9 @@ FirstRunWizard::init()
} }
void void
FirstRunWizard::showPage( QWidget *w ) //virtual FirstRunWizard::showPage( TQWidget *w ) //virtual
{ {
QWizard::showPage( w ); TQWizard::showPage( w );
@ -72,23 +72,23 @@ FirstRunWizard::showPage( QWidget *w ) //virtual
// config->setGroup("Freshklam"); // config->setGroup("Freshklam");
// //
// //Configure Database Path // //Configure Database Path
// QStringList lastDownloadPaths; // TQStringList lastDownloadPaths;
// if (DatabaseLocation->url() != "") // if (DatabaseLocation->url() != "")
// lastDownloadPaths.prepend( QString("%1").arg(DatabaseLocation->url())); // lastDownloadPaths.prepend( TQString("%1").arg(DatabaseLocation->url()));
// else // else
// lastDownloadPaths.prepend( QString("%1").arg(databasepath)); // lastDownloadPaths.prepend( TQString("%1").arg(databasepath));
// config->writeEntry("lastDownloadPaths", lastDownloadPaths); // config->writeEntry("lastDownloadPaths", lastDownloadPaths);
// config->sync(); // config->sync();
// //
// //Configure Quarantine Path // //Configure Quarantine Path
// QStringList lastQuarLocations; // TQStringList lastQuarLocations;
// //
// config->setGroup("Kuarantine"); // config->setGroup("Kuarantine");
// //
// if (QuarantineLocation->url() != "") // if (QuarantineLocation->url() != "")
// lastQuarLocations.prepend( QString("%1").arg(QuarantineLocation->url())); // lastQuarLocations.prepend( TQString("%1").arg(QuarantineLocation->url()));
// else // else
// lastQuarLocations.prepend( QString("%1").arg(quarantinepath)); // lastQuarLocations.prepend( TQString("%1").arg(quarantinepath));
// config->writeEntry("KuarantineLocations", lastQuarLocations); // config->writeEntry("KuarantineLocations", lastQuarLocations);
// config->sync(); // config->sync();
// //
@ -109,13 +109,13 @@ FirstRunWizard::quarantinePath( ) //virtual
return QuarantineLocation->url(); return QuarantineLocation->url();
} }
QString TQString
FirstRunWizard::defaultDatabasePath( ) //virtual FirstRunWizard::defaultDatabasePath( ) //virtual
{ {
return databasepath; return databasepath;
} }
QString TQString
FirstRunWizard::defaultQuarantinePath( ) //virtual FirstRunWizard::defaultQuarantinePath( ) //virtual
{ {
return quarantinepath; return quarantinepath;

@ -13,8 +13,8 @@
using namespace KlamAV; using namespace KlamAV;
Frame::Frame(QObject * parent, KParts::ReadOnlyPart *p, QWidget *visWidget, const QString& tit, bool watchSignals) Frame::Frame(TQObject * parent, KParts::ReadOnlyPart *p, TQWidget *visWidget, const TQString& tit, bool watchSignals)
:QObject(parent, "KlamAVFrame") :TQObject(parent, "KlamAVFrame")
{ {
m_part=p; m_part=p;
m_widget=visWidget; m_widget=visWidget;
@ -25,8 +25,8 @@ Frame::Frame(QObject * parent, KParts::ReadOnlyPart *p, QWidget *visWidget, cons
if (watchSignals) // e.g, articles tab has no part if (watchSignals) // e.g, articles tab has no part
{ {
connect(m_part, SIGNAL(setWindowCaption (const QString &)), this, SLOT(setCaption (const QString &))); connect(m_part, SIGNAL(setWindowCaption (const TQString &)), this, SLOT(setCaption (const TQString &)));
connect(m_part, SIGNAL(setStatusBarText (const QString &)), this, SLOT(setStatusText (const QString &))); connect(m_part, SIGNAL(setStatusBarText (const TQString &)), this, SLOT(setStatusText (const TQString &)));
KParts::BrowserExtension *ext=KParts::BrowserExtension::childObject( p ); KParts::BrowserExtension *ext=KParts::BrowserExtension::childObject( p );
if (ext) if (ext)
@ -34,14 +34,14 @@ Frame::Frame(QObject * parent, KParts::ReadOnlyPart *p, QWidget *visWidget, cons
connect(p, SIGNAL(started(KIO::Job*)), this, SLOT(setStarted())); connect(p, SIGNAL(started(KIO::Job*)), this, SLOT(setStarted()));
connect(p, SIGNAL(completed()), this, SLOT(setCompleted())); connect(p, SIGNAL(completed()), this, SLOT(setCompleted()));
connect(p, SIGNAL(canceled(const QString &)), this, SLOT(setCanceled(const QString&))); connect(p, SIGNAL(canceled(const TQString &)), this, SLOT(setCanceled(const TQString&)));
connect(p, SIGNAL(completed(bool)), this, SLOT(setCompleted())); connect(p, SIGNAL(completed(bool)), this, SLOT(setCompleted()));
/* KActionCollection *coll=p->actionCollection(); /* KActionCollection *coll=p->actionCollection();
if (coll) if (coll)
{ {
connect( coll, SIGNAL( actionStatusText( const QString & ) ), connect( coll, SIGNAL( actionStatusText( const TQString & ) ),
this, SLOT( slotActionStatusText( const QString & ) ) ); this, SLOT( slotActionStatusText( const TQString & ) ) );
connect( coll, SIGNAL( clearStatusText() ), connect( coll, SIGNAL( clearStatusText() ),
this, SLOT( slotClearStatusText() ) ); this, SLOT( slotClearStatusText() ) );
} }
@ -66,24 +66,24 @@ KParts::ReadOnlyPart *Frame::part() const
return m_part; return m_part;
} }
QWidget *Frame::widget() const TQWidget *Frame::widget() const
{ {
return m_widget; return m_widget;
} }
void Frame::setTitle(const QString &s) void Frame::setTitle(const TQString &s)
{ {
m_title=s; m_title=s;
} }
void Frame::setCaption(const QString &s) void Frame::setCaption(const TQString &s)
{ {
/* if(m_progressItem) m_progressItem->setLabel(s);*/ /* if(m_progressItem) m_progressItem->setLabel(s);*/
m_caption=s; m_caption=s;
emit captionChanged(s); emit captionChanged(s);
} }
void Frame::setStatusText(const QString &s) void Frame::setStatusText(const TQString &s)
{ {
m_statusText=s; m_statusText=s;
emit statusText(s); emit statusText(s);
@ -108,7 +108,7 @@ void Frame::setState(int a)
emit started(); emit started();
break; break;
case Frame::Canceled: case Frame::Canceled:
emit canceled(QString::null); emit canceled(TQString::null);
break; break;
case Frame::Idle: case Frame::Idle:
case Frame::Completed: case Frame::Completed:
@ -118,17 +118,17 @@ void Frame::setState(int a)
const QString Frame::title() const const TQString Frame::title() const
{ {
return m_title; return m_title;
} }
const QString Frame::caption() const const TQString Frame::caption() const
{ {
return m_caption; return m_caption;
} }
const QString Frame::statusText() const const TQString Frame::statusText() const
{ {
return m_statusText; return m_statusText;
} }
@ -136,14 +136,14 @@ const QString Frame::statusText() const
void Frame::setStarted() void Frame::setStarted()
{ {
//if(m_progressId.isNull() || m_progressId.isEmpty()) m_progressId = KPIM::ProgressManager::getUniqueID(); //if(m_progressId.isNull() || m_progressId.isEmpty()) m_progressId = KPIM::ProgressManager::getUniqueID();
//m_progressItem = KPIM::ProgressManager::createProgressItem(m_progressId, title(), QString::null, false); //m_progressItem = KPIM::ProgressManager::createProgressItem(m_progressId, title(), TQString::null, false);
//m_progressItem->setStatus(i18n("Loading...")); //m_progressItem->setStatus(i18n("Loading..."));
//connect(m_progressItem, SIGNAL(progressItemCanceled(KPIM::ProgressItem*)), SLOT(slotAbortFetch())); //connect(m_progressItem, SIGNAL(progressItemCanceled(KPIM::ProgressItem*)), SLOT(slotAbortFetch()));
m_state=Started; m_state=Started;
emit started(); emit started();
} }
void Frame::setCanceled(const QString &s) void Frame::setCanceled(const TQString &s)
{ {
/* if(m_progressItem) { /* if(m_progressItem) {
m_progressItem->setStatus(i18n("Loading canceled")); m_progressItem->setStatus(i18n("Loading canceled"));

@ -10,7 +10,7 @@
#include <kparts/part.h> #include <kparts/part.h>
#include <qobject.h> #include <tqobject.h>
namespace KPIM namespace KPIM
{ {
@ -20,51 +20,51 @@ namespace KPIM
namespace KlamAV namespace KlamAV
{ {
class Frame : public QObject class Frame : public TQObject
{ {
Q_OBJECT Q_OBJECT
public: public:
Frame(QObject *parent, KParts::ReadOnlyPart *part, QWidget *w, const QString& tit, bool watch=true); Frame(TQObject *parent, KParts::ReadOnlyPart *part, TQWidget *w, const TQString& tit, bool watch=true);
~Frame(); ~Frame();
enum {Idle, Started, Completed, Canceled}; enum {Idle, Started, Completed, Canceled};
KParts::ReadOnlyPart *part() const; KParts::ReadOnlyPart *part() const;
QWidget *widget() const; TQWidget *widget() const;
const QString title() const; const TQString title() const;
const QString caption() const; const TQString caption() const;
int state() const; int state() const;
int progress() const; int progress() const;
const QString statusText() const; const TQString statusText() const;
public slots: public slots:
void setStarted(); void setStarted();
void setCanceled(const QString &); void setCanceled(const TQString &);
void setCompleted(); void setCompleted();
void setState(int); void setState(int);
void setProgress(int); void setProgress(int);
void setCaption(const QString &); void setCaption(const TQString &);
void setTitle(const QString &); void setTitle(const TQString &);
void setStatusText(const QString &); void setStatusText(const TQString &);
signals: signals:
void captionChanged(const QString &); void captionChanged(const TQString &);
void started(); void started();
void canceled(const QString &); void canceled(const TQString &);
void completed(); void completed();
void loadingProgress(int); void loadingProgress(int);
void statusText(const QString &); void statusText(const TQString &);
private: private:
KParts::ReadOnlyPart *m_part; KParts::ReadOnlyPart *m_part;
QWidget *m_widget; TQWidget *m_widget;
QString m_title; TQString m_title;
QString m_caption; TQString m_caption;
int m_state; int m_state;
int m_progress; int m_progress;
QString m_statusText; TQString m_statusText;
QString m_progressId; TQString m_progressId;
KPIM::ProgressItem *m_progressItem; KPIM::ProgressItem *m_progressItem;
}; };
} }

@ -18,12 +18,12 @@
#include <kaction.h> #include <kaction.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <kbuttonbox.h> #include <kbuttonbox.h>
#include <kurlrequester.h> #include <kurlrequester.h>
#include <kurlcompletion.h> #include <kurlcompletion.h>
#include <kcombobox.h> #include <kcombobox.h>
#include <qlayout.h> #include <tqlayout.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include <klineedit.h> #include <klineedit.h>
#include <ktempfile.h> #include <ktempfile.h>
@ -37,7 +37,7 @@
#include <dcopclient.h> #include <dcopclient.h>
#include <kuser.h> #include <kuser.h>
#include <qtimer.h> #include <tqtimer.h>
#include <clamav.h> #include <clamav.h>
#include "version.h" #include "version.h"
@ -74,10 +74,10 @@ const char *check_desc[] = {
}; };
QString readymessage = i18n("KlamAV ") + KLAMAV_VERSION + i18n(" - Ready"); TQString readymessage = i18n("KlamAV ") + KLAMAV_VERSION + i18n(" - Ready");
Freshklam::Freshklam(QWidget *parent, const char *name) Freshklam::Freshklam(TQWidget *parent, const char *name)
: QWidget(parent, name) : TQWidget(parent, name)
{ {
// MetaDB* updater = new MetaDB(); // MetaDB* updater = new MetaDB();
@ -98,27 +98,27 @@ Freshklam::Freshklam(QWidget *parent, const char *name)
lastDownloadPaths = config->readListEntry("lastDownloadPaths"); lastDownloadPaths = config->readListEntry("lastDownloadPaths");
getCurrentVersionOfClamAV( ); getCurrentVersionOfClamAV( );
if ((lastDownloadPaths.isEmpty()) || (!(KIO::NetAccess::exists(QString((*lastDownloadPaths.begin())),TRUE,NULL)))){ if ((lastDownloadPaths.isEmpty()) || (!(KIO::NetAccess::exists(TQString((*lastDownloadPaths.begin())),TRUE,NULL)))){
createDBDir(); createDBDir();
} }
QString proxyIPText = config->readEntry("ProxyIP"); TQString proxyIPText = config->readEntry("ProxyIP");
QString proxyPortText = config->readEntry("ProxyPort"); TQString proxyPortText = config->readEntry("ProxyPort");
QString proxyUserText = config->readEntry("ProxyUser"); TQString proxyUserText = config->readEntry("ProxyUser");
QString proxyPassText = config->readEntry("ProxyPass"); TQString proxyPassText = config->readEntry("ProxyPass");
//Data Directory Widget //Data Directory Widget
QVBoxLayout *vbox = new QVBoxLayout(this, KDialog::marginHint(), TQVBoxLayout *vbox = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint(), "vbox"); KDialog::spacingHint(), "vbox");
//Proxy Widget //Proxy Widget
QGroupBox *software_group = new QGroupBox(i18n("Software Updates"), this); TQGroupBox *software_group = new TQGroupBox(i18n("Software Updates"), this);
vbox->addWidget(software_group); vbox->addWidget(software_group);
QGridLayout *software_layout = new QGridLayout( software_group, 5, 2, KDialog::spacingHint(), TQGridLayout *software_layout = new TQGridLayout( software_group, 5, 2, KDialog::spacingHint(),
KDialog::spacingHint(), "software_layout"); KDialog::spacingHint(), "software_layout");
software_layout->addRowSpacing(0, software_group->fontMetrics().height()); software_layout->addRowSpacing(0, software_group->fontMetrics().height());
software_layout->setColStretch(0, 1); software_layout->setColStretch(0, 1);
@ -126,28 +126,28 @@ Freshklam::Freshklam(QWidget *parent, const char *name)
//Dazuko //Dazuko
QWidget *dazuko_hlp = new QWidget( software_group ); TQWidget *dazuko_hlp = new TQWidget( software_group );
software_layout->addMultiCellWidget(dazuko_hlp, 1,2, 0,2); software_layout->addMultiCellWidget(dazuko_hlp, 1,2, 0,2);
QGridLayout *dazuko_dir_layout = new QGridLayout(dazuko_hlp,2,2, KDialog::spacingHint() ); TQGridLayout *dazuko_dir_layout = new TQGridLayout(dazuko_hlp,2,2, KDialog::spacingHint() );
clamav_box = new QCheckBox(i18n("Update ClamAV Automatically"), dazuko_hlp); clamav_box = new TQCheckBox(i18n("Update ClamAV Automatically"), dazuko_hlp);
clamav_box->setMinimumWidth(clamav_box->sizeHint().width()); clamav_box->setMinimumWidth(clamav_box->sizeHint().width());
dazuko_dir_layout->addWidget(clamav_box,0,0); dazuko_dir_layout->addWidget(clamav_box,0,0);
klamav_box = new QCheckBox(i18n("Update KlamAV Automatically"), dazuko_hlp); klamav_box = new TQCheckBox(i18n("Update KlamAV Automatically"), dazuko_hlp);
klamav_box->setMinimumWidth(klamav_box->sizeHint().width()); klamav_box->setMinimumWidth(klamav_box->sizeHint().width());
dazuko_dir_layout->addWidget(klamav_box,0,1); dazuko_dir_layout->addWidget(klamav_box,0,1);
clamav_options = new QPushButton (i18n( "Upgrade ClamAV Now" ), dazuko_hlp); clamav_options = new TQPushButton (i18n( "Upgrade ClamAV Now" ), dazuko_hlp);
dazuko_dir_layout->addWidget(clamav_options,1,0); dazuko_dir_layout->addWidget(clamav_options,1,0);
clamav_options->setFixedSize(clamav_options->sizeHint()); clamav_options->setFixedSize(clamav_options->sizeHint());
connect( clamav_options, SIGNAL( clicked() ), this, connect( clamav_options, SIGNAL( clicked() ), this,
SLOT( checkForNewClamAVNow() ) ); SLOT( checkForNewClamAVNow() ) );
klamav_options = new QPushButton (i18n( "Upgrade KlamAV Now" ), dazuko_hlp); klamav_options = new TQPushButton (i18n( "Upgrade KlamAV Now" ), dazuko_hlp);
dazuko_dir_layout->addWidget(klamav_options,1,1); dazuko_dir_layout->addWidget(klamav_options,1,1);
klamav_options->setFixedSize(klamav_options->sizeHint()); klamav_options->setFixedSize(klamav_options->sizeHint());
connect( klamav_options, SIGNAL( clicked() ), this, connect( klamav_options, SIGNAL( clicked() ), this,
@ -160,11 +160,11 @@ Freshklam::Freshklam(QWidget *parent, const char *name)
klamav_options->setEnabled(false); klamav_options->setEnabled(false);
#endif #endif
//Virus Database Directory //Virus Database Directory
QGroupBox *group = new QGroupBox(i18n("Virus Database Directory"), this); TQGroupBox *group = new TQGroupBox(i18n("Virus Database Directory"), this);
vbox->addWidget(group); vbox->addWidget(group);
QGridLayout *layout = new QGridLayout( group, 9, 2, KDialog::spacingHint(), TQGridLayout *layout = new TQGridLayout( group, 9, 2, KDialog::spacingHint(),
KDialog::spacingHint(), "layout"); KDialog::spacingHint(), "layout");
layout->addRowSpacing(0, group->fontMetrics().height()); layout->addRowSpacing(0, group->fontMetrics().height());
@ -172,44 +172,44 @@ Freshklam::Freshklam(QWidget *parent, const char *name)
layout->setColStretch(1, 1); layout->setColStretch(1, 1);
QWidget *hlp = new QWidget( group ); TQWidget *hlp = new TQWidget( group );
layout->addMultiCellWidget(hlp, 1,1, 0,1); layout->addMultiCellWidget(hlp, 1,1, 0,1);
QHBoxLayout *dir_layout = new QHBoxLayout(hlp,KDialog::spacingHint() ); TQHBoxLayout *dir_layout = new TQHBoxLayout(hlp,KDialog::spacingHint() );
dir_combo = new KURLRequester( new KComboBox(true, this), hlp, "dir combo" ); dir_combo = new KURLRequester( new KComboBox(true, this), hlp, "dir combo" );
dir_combo->completionObject()->setMode(KURLCompletion::DirCompletion); dir_combo->completionObject()->setMode(KURLCompletion::DirCompletion);
dir_combo->comboBox()->insertStringList(lastDownloadPaths); dir_combo->comboBox()->insertStringList(lastDownloadPaths);
dir_combo->setMode( KFile::Directory|KFile::LocalOnly ); dir_combo->setMode( KFile::Directory|KFile::LocalOnly );
QLabel *dir_label = new QLabel(i18n("Directory:"), hlp); TQLabel *dir_label = new TQLabel(i18n("Directory:"), hlp);
dir_label->setFixedSize(dir_label->sizeHint()); dir_label->setFixedSize(dir_label->sizeHint());
dir_layout->addWidget(dir_label); dir_layout->addWidget(dir_label);
dir_layout->addWidget(dir_combo); dir_layout->addWidget(dir_combo);
//Proxy Widget //Proxy Widget
QGroupBox *proxy_group = new QGroupBox(i18n("Proxy for Database Updates"), this); TQGroupBox *proxy_group = new TQGroupBox(i18n("Proxy for Database Updates"), this);
vbox->addWidget(proxy_group); vbox->addWidget(proxy_group);
QGridLayout *proxy_layout = new QGridLayout( proxy_group, 2, 5, KDialog::spacingHint(), TQGridLayout *proxy_layout = new TQGridLayout( proxy_group, 2, 5, KDialog::spacingHint(),
KDialog::spacingHint(), "proxy_layout"); KDialog::spacingHint(), "proxy_layout");
proxy_layout->addRowSpacing(0, proxy_group->fontMetrics().height()); proxy_layout->addRowSpacing(0, proxy_group->fontMetrics().height());
proxy_layout->setColStretch(0, 1); proxy_layout->setColStretch(0, 1);
proxy_layout->setColStretch(1, 1); proxy_layout->setColStretch(1, 1);
//IP Address & Port //IP Address & Port
QWidget *proxy_hlp = new QWidget( proxy_group ); TQWidget *proxy_hlp = new TQWidget( proxy_group );
proxy_layout->addMultiCellWidget(proxy_hlp, 1,2, 0,2); proxy_layout->addMultiCellWidget(proxy_hlp, 1,2, 0,2);
QGridLayout *proxy_dir_layout = new QGridLayout(proxy_hlp, 2,4,KDialog::spacingHint() ); TQGridLayout *proxy_dir_layout = new TQGridLayout(proxy_hlp, 2,4,KDialog::spacingHint() );
QLabel *proxy_dir_label = new QLabel(i18n("IP Address:"), proxy_hlp); TQLabel *proxy_dir_label = new TQLabel(i18n("IP Address:"), proxy_hlp);
//proxy_dir_label->setFixedSize(proxy_dir_label->sizeHint()); //proxy_dir_label->setFixedSize(proxy_dir_label->sizeHint());
proxy_dir_layout->addWidget(proxy_dir_label,0,0); proxy_dir_layout->addWidget(proxy_dir_label,0,0);
proxyIP = new KLineEdit(proxy_hlp); proxyIP = new KLineEdit(proxy_hlp);
proxy_dir_layout->addWidget(proxyIP,0,1); proxy_dir_layout->addWidget(proxyIP,0,1);
proxyIP->setText(proxyIPText); proxyIP->setText(proxyIPText);
QLabel *proxy_port_label = new QLabel(i18n("Port:"), proxy_hlp); TQLabel *proxy_port_label = new TQLabel(i18n("Port:"), proxy_hlp);
//proxy_port_label->setFixedSize(proxy_port_label->sizeHint()); //proxy_port_label->setFixedSize(proxy_port_label->sizeHint());
proxy_dir_layout->addWidget(proxy_port_label,0,3); proxy_dir_layout->addWidget(proxy_port_label,0,3);
proxyPort = new KLineEdit(proxy_hlp); proxyPort = new KLineEdit(proxy_hlp);
@ -217,14 +217,14 @@ Freshklam::Freshklam(QWidget *parent, const char *name)
proxyPort->setText(proxyPortText); proxyPort->setText(proxyPortText);
QLabel *proxy_user_label = new QLabel(i18n("User:"), proxy_hlp); TQLabel *proxy_user_label = new TQLabel(i18n("User:"), proxy_hlp);
//proxy_user_label->setFixedSize(proxy_user_label->sizeHint()); //proxy_user_label->setFixedSize(proxy_user_label->sizeHint());
proxy_dir_layout->addWidget(proxy_user_label,1,0); proxy_dir_layout->addWidget(proxy_user_label,1,0);
proxyUser = new KLineEdit(proxy_hlp); proxyUser = new KLineEdit(proxy_hlp);
proxy_dir_layout->addWidget(proxyUser,1,1); proxy_dir_layout->addWidget(proxyUser,1,1);
proxyUser->setText(proxyUserText); proxyUser->setText(proxyUserText);
QLabel *proxy_pass_label = new QLabel(i18n("Password:"), proxy_hlp); TQLabel *proxy_pass_label = new TQLabel(i18n("Password:"), proxy_hlp);
//proxy_pass_label->setFixedSize(proxy_pass_label->sizeHint()); //proxy_pass_label->setFixedSize(proxy_pass_label->sizeHint());
proxy_dir_layout->addWidget(proxy_pass_label,1,3); proxy_dir_layout->addWidget(proxy_pass_label,1,3);
proxyPass = new KLineEdit(proxy_hlp); proxyPass = new KLineEdit(proxy_hlp);
@ -234,11 +234,11 @@ Freshklam::Freshklam(QWidget *parent, const char *name)
//Daemon Widget //Daemon Widget
QGroupBox *daemon_group = new QGroupBox(i18n("Database AutoUpdate Settings"), this); TQGroupBox *daemon_group = new TQGroupBox(i18n("Database AutoUpdate Settings"), this);
vbox->addWidget(daemon_group); vbox->addWidget(daemon_group);
QGridLayout *daemon_layout = new QGridLayout( daemon_group, 5, 4, KDialog::spacingHint(), TQGridLayout *daemon_layout = new TQGridLayout( daemon_group, 5, 4, KDialog::spacingHint(),
KDialog::spacingHint(), "daemon_layout"); KDialog::spacingHint(), "daemon_layout");
daemon_layout->addRowSpacing(0, daemon_group->fontMetrics().height()); daemon_layout->addRowSpacing(0, daemon_group->fontMetrics().height());
daemon_layout->addRowSpacing(1, daemon_group->fontMetrics().height()); daemon_layout->addRowSpacing(1, daemon_group->fontMetrics().height());
@ -246,18 +246,18 @@ Freshklam::Freshklam(QWidget *parent, const char *name)
//daemon_layout->setColStretch(1, 1); //daemon_layout->setColStretch(1, 1);
QWidget *daemonhlp = new QWidget( daemon_group ); TQWidget *daemonhlp = new TQWidget( daemon_group );
daemon_layout->addMultiCellWidget(daemonhlp, 1,1, 0,1); daemon_layout->addMultiCellWidget(daemonhlp, 1,1, 0,1);
QHBoxLayout *daemon_check_layout = new QHBoxLayout(daemonhlp, KDialog::spacingHint() ); TQHBoxLayout *daemon_check_layout = new TQHBoxLayout(daemonhlp, KDialog::spacingHint() );
daemon_box = new QCheckBox(i18n("Update Virus Database Automatically"), daemonhlp); daemon_box = new TQCheckBox(i18n("Update Virus Database Automatically"), daemonhlp);
daemon_box->setMinimumWidth(daemon_box->sizeHint().width()); daemon_box->setMinimumWidth(daemon_box->sizeHint().width());
daemon_check_layout->addSpacing(10); daemon_check_layout->addSpacing(10);
daemon_check_layout->addWidget(daemon_box); daemon_check_layout->addWidget(daemon_box);
check_combo = new QComboBox(false, daemonhlp); check_combo = new TQComboBox(false, daemonhlp);
check_combo->insertStrList(check_desc); check_combo->insertStrList(check_desc);
if (!(config->readEntry("NoOfUpdates").isEmpty())) if (!(config->readEntry("NoOfUpdates").isEmpty()))
check_combo->setCurrentText(config->readEntry("NoOfUpdates")); check_combo->setCurrentText(config->readEntry("NoOfUpdates"));
@ -267,13 +267,13 @@ Freshklam::Freshklam(QWidget *parent, const char *name)
QLabel *combo_label = new QLabel(i18n("Times a Day"), daemonhlp); TQLabel *combo_label = new TQLabel(i18n("Times a Day"), daemonhlp);
//combo_label->setFixedSize(combo_label->sizeHint()); //combo_label->setFixedSize(combo_label->sizeHint());
daemon_check_layout->addWidget(combo_label); daemon_check_layout->addWidget(combo_label);
KButtonBox *actionbox = new KButtonBox(this, Qt::Horizontal); KButtonBox *actionbox = new KButtonBox(this, TQt::Horizontal);
vbox->addWidget(actionbox, 2, 0); vbox->addWidget(actionbox, 2, 0);
actionbox->addStretch(); actionbox->addStretch();
search_button = actionbox->addButton(i18n("&Update Now")); search_button = actionbox->addButton(i18n("&Update Now"));
@ -283,11 +283,11 @@ Freshklam::Freshklam(QWidget *parent, const char *name)
actionbox->addStretch(); actionbox->addStretch();
actionbox->layout(); actionbox->layout();
QFrame *status_frame = new QFrame(this); TQFrame *status_frame = new TQFrame(this);
status_frame->setFrameStyle(QFrame::Panel | QFrame::Sunken); status_frame->setFrameStyle(TQFrame::Panel | TQFrame::Sunken);
QBoxLayout *status_layout = new QHBoxLayout(status_frame, 2); TQBoxLayout *status_layout = new TQHBoxLayout(status_frame, 2);
status_label = new QLabel(readymessage, status_frame); status_label = new TQLabel(readymessage, status_frame);
status_layout->addWidget(status_label, 10); status_layout->addWidget(status_label, 10);
status_layout->activate(); status_layout->activate();
@ -318,14 +318,14 @@ void Freshklam::processOutput()
{ {
int pos; int pos;
int pos2; int pos2;
QString item2; TQString item2;
while (( (pos = buf.find('\n')) != -1) || ( (pos = buf.find(']')) != -1)) while (( (pos = buf.find('\n')) != -1) || ( (pos = buf.find(']')) != -1))
{ {
QString item = buf.left(pos); TQString item = buf.left(pos);
QDate today = QDate::currentDate(); TQDate today = TQDate::currentDate();
QTime now = QTime::currentTime(); TQTime now = TQTime::currentTime();
QString suffix = QString("%1 %2") TQString suffix = TQString("%1 %2")
.arg(today.toString("ddd MMMM d yyyy")) .arg(today.toString("ddd MMMM d yyyy"))
.arg(now.toString("hh:mm:ss ap : ")); .arg(now.toString("hh:mm:ss ap : "));
@ -361,7 +361,7 @@ void Freshklam::processOutput()
kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_update_required")); kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_update_required"));
pos2 = item2.find('\n',pos); pos2 = item2.find('\n',pos);
QString version = item2.mid((pos+20),pos2 - (pos+20)).stripWhiteSpace(); TQString version = item2.mid((pos+20),pos2 - (pos+20)).stripWhiteSpace();
if ((clamav_box->isChecked())){ if ((clamav_box->isChecked())){
@ -374,7 +374,7 @@ void Freshklam::processOutput()
updater->downloadComponent("clamav",version,"tar.gz"); updater->downloadComponent("clamav",version,"tar.gz");
} }
}else if (!(clamav_box->isChecked())) }else if (!(clamav_box->isChecked()))
KNotifyClient::event(kmain->_tray->winId(),"ClamAVOutDated", QString("Your copy of ClamAV is out of date! Please Upgrade to ClamAV %1!").arg(version)); KNotifyClient::event(kmain->_tray->winId(),"ClamAVOutDated", TQString("Your copy of ClamAV is out of date! Please Upgrade to ClamAV %1!").arg(version));
} }
@ -387,7 +387,7 @@ void Freshklam::slotSearch()
search_button->setEnabled(false); search_button->setEnabled(false);
cancel_button->setEnabled(true); cancel_button->setEnabled(true);
QString filepattern = dir_combo->url(); TQString filepattern = dir_combo->url();
CollectionDB::instance()->insertEvent("Updates","Commencing DB Update", filepattern); CollectionDB::instance()->insertEvent("Updates","Commencing DB Update", filepattern);
@ -395,9 +395,9 @@ void Freshklam::slotSearch()
childproc = new KShellProcess(); childproc = new KShellProcess();
QString command = "freshclam --stdout "; TQString command = "freshclam --stdout ";
QString user = KUser().loginName(); TQString user = KUser().loginName();
command += " --user=" + user + " "; command += " --user=" + user + " ";
if (!(filepattern.isEmpty())){ if (!(filepattern.isEmpty())){
@ -424,7 +424,7 @@ void Freshklam::slotSearch()
if (!(KApplication::kApplication()->isRestored())){ if (!(KApplication::kApplication()->isRestored())){
if (kmain->klamd->isKlamdAlive()){ if (kmain->klamd->isKlamdAlive()){
QString klamdconf = kmain->klamd->getKlamdConfFile(); TQString klamdconf = kmain->klamd->getKlamdConfFile();
////kdDebug() << klamdconf << endl; ////kdDebug() << klamdconf << endl;
command += " --daemon-notify="; command += " --daemon-notify=";
command += klamdconf; command += klamdconf;
@ -488,8 +488,8 @@ void Freshklam::finish()
void Freshklam::updateMetaDB() void Freshklam::updateMetaDB()
{ {
QDate latestDate = QDate::fromString(CollectionDB::instance()->latestMetaDBDate(),Qt::ISODate); TQDate latestDate = TQDate::fromString(CollectionDB::instance()->latestMetaDBDate(),TQt::ISODate);
QDate today = QDate::currentDate(); TQDate today = TQDate::currentDate();
kdDebug() << latestDate << " " << today << endl; kdDebug() << latestDate << " " << today << endl;
if (latestDate.daysTo(today) > 31){ if (latestDate.daysTo(today) > 31){
@ -618,29 +618,29 @@ void Freshklam::updateMailClient()
KConfig* mailconfig = new KConfig("kmailrc"); KConfig* mailconfig = new KConfig("kmailrc");
mailconfig->setGroup("General"); mailconfig->setGroup("General");
QVariant nooffilters = mailconfig->readEntry("filters"); TQVariant nooffilters = mailconfig->readEntry("filters");
int result; int result;
int numfilters = nooffilters.toInt(); int numfilters = nooffilters.toInt();
nooffilters = numfilters; nooffilters = numfilters;
for (int j=0; j != numfilters; j++ ){ for (int j=0; j != numfilters; j++ ){
QVariant numb = j; TQVariant numb = j;
QString filtername=QString("Filter #%1").arg(numb.toString()); TQString filtername=TQString("Filter #%1").arg(numb.toString());
mailconfig->setGroup(filtername); mailconfig->setGroup(filtername);
QString binary = mailconfig->readEntry("action-args-0"); TQString binary = mailconfig->readEntry("action-args-0");
if (binary.find("klammail") != -1){ if (binary.find("klammail") != -1){
QString pathonly = binary.section(" ",2,2); TQString pathonly = binary.section(" ",2,2);
if (pathonly == dir_combo->url()) if (pathonly == dir_combo->url())
break; break;
if (binary.find(" " + dir_combo->url() + " ") == -1){ if (binary.find(" " + dir_combo->url() + " ") == -1){
QString path = getenv("HOME"); TQString path = getenv("HOME");
result = KMessageBox::warningContinueCancelList(this, i18n( "Since you have changed the database location, KlamAV needs to change the parameters used for mail scanning in KMail. The change is displayed below. If you have KMail open you will need to close it now so that the change can take effect. If you want to make the change manually just click 'Cancel'. "),QString("New filter command: klammail -d %1").arg(dir_combo->url()),i18n( "Update KMail Filters" ),i18n( "Update" )); result = KMessageBox::warningContinueCancelList(this, i18n( "Since you have changed the database location, KlamAV needs to change the parameters used for mail scanning in KMail. The change is displayed below. If you have KMail open you will need to close it now so that the change can take effect. If you want to make the change manually just click 'Cancel'. "),TQString("New filter command: klammail -d %1").arg(dir_combo->url()),i18n( "Update KMail Filters" ),i18n( "Update" ));
switch (result) { switch (result) {
case 2 : KMessageBox::information (this,"KMail has not been updated with the new database location."); break; case 2 : KMessageBox::information (this,"KMail has not been updated with the new database location."); break;
case 5 : case 5 :
mailconfig->writeEntry("action-args-0",QString("klammail -d %1").arg(dir_combo->url())); mailconfig->writeEntry("action-args-0",TQString("klammail -d %1").arg(dir_combo->url()));
mailconfig->sync(); mailconfig->sync();
break; break;
@ -657,7 +657,7 @@ void Freshklam::updateMailClient()
void Freshklam::receivedOutput(KProcess */*proc*/, char *buffer, int buflen) void Freshklam::receivedOutput(KProcess */*proc*/, char *buffer, int buflen)
{ {
//kdDebug() << buffer << endl; //kdDebug() << buffer << endl;
buf += QCString(buffer, buflen+1); buf += TQCString(buffer, buflen+1);
processOutput(); processOutput();
} }
@ -672,7 +672,7 @@ void Freshklam::slotClear()
} }
void Freshklam::setDirName(QString dir){ void Freshklam::setDirName(TQString dir){
// dir_combo->setEditText(dir); // dir_combo->setEditText(dir);
dir_combo->setURL(dir); dir_combo->setURL(dir);
} }
@ -692,20 +692,20 @@ void Freshklam::writeConf()
//tf->setAutoDelete(TRUE); //tf->setAutoDelete(TRUE);
tempFileName = tf.name(); tempFileName = tf.name();
QTextStream &ts = *(tf.textStream()); TQTextStream &ts = *(tf.textStream());
ts << "DatabaseMirror database.clamav.net" << "\n"; ts << "DatabaseMirror database.clamav.net" << "\n";
ts << "DNSDatabaseInfo current.cvd.clamav.net" << "\n"; ts << "DNSDatabaseInfo current.cvd.clamav.net" << "\n";
ts << "Foreground True" << "\n"; ts << "Foreground True" << "\n";
if ( (proxyIP->hasAcceptableInput()) && (!(proxyIP->text().isEmpty()))) { if ( (proxyIP->hasAcceptableInput()) && (!(proxyIP->text().isEmpty()))) {
ts << QString("HTTPProxyServer %1").arg(proxyIP->text()) << "\n"; ts << TQString("HTTPProxyServer %1").arg(proxyIP->text()) << "\n";
if ( proxyPort->hasAcceptableInput() ) { if ( proxyPort->hasAcceptableInput() ) {
ts << QString("HTTPProxyPort %1").arg(proxyPort->text()) << "\n"; ts << TQString("HTTPProxyPort %1").arg(proxyPort->text()) << "\n";
} }
if ( proxyUser->hasAcceptableInput() && ! proxyUser->text().isEmpty() ) { if ( proxyUser->hasAcceptableInput() && ! proxyUser->text().isEmpty() ) {
ts << QString("HTTPProxyUsername %1").arg(proxyUser->text()) << "\n"; ts << TQString("HTTPProxyUsername %1").arg(proxyUser->text()) << "\n";
if ( proxyPass->hasAcceptableInput() ) { if ( proxyPass->hasAcceptableInput() ) {
ts << QString("HTTPProxyPassword %1").arg(proxyPass->text()) << "\n"; ts << TQString("HTTPProxyPassword %1").arg(proxyPass->text()) << "\n";
} }
} }
} }
@ -777,11 +777,11 @@ void Freshklam::handleChecks(){
bool Freshklam::killPID(){ bool Freshklam::killPID(){
QFile inf(pidFileName); TQFile inf(pidFileName);
if (!inf.open(IO_ReadOnly)) if (!inf.open(IO_ReadOnly))
return false; return false;
QTextStream is(&inf); TQTextStream is(&inf);
QString line; TQString line;
while (!is.eof()) while (!is.eof())
line = is.readLine(); line = is.readLine();
inf.close(); inf.close();
@ -822,18 +822,18 @@ void Freshklam::enableInputs(){
proxyPass->setEnabled(true); proxyPass->setEnabled(true);
} }
QString Freshklam::getCurrentDBDir(){ TQString Freshklam::getCurrentDBDir(){
unsigned int ret= 0; unsigned int ret= 0;
unsigned int no = 0; unsigned int no = 0;
struct cl_engine *engine = NULL; struct cl_engine *engine = NULL;
QStringList lastDownloadPaths; TQStringList lastDownloadPaths;
QString dbdir; TQString dbdir;
QString db; TQString db;
config = KGlobal::config(); config = KGlobal::config();
config->setGroup("Freshklam"); config->setGroup("Freshklam");
lastDownloadPaths = config->readListEntry("lastDownloadPaths"); lastDownloadPaths = config->readListEntry("lastDownloadPaths");
for (QStringList::Iterator ita = lastDownloadPaths.begin(); ita == lastDownloadPaths.begin() ; ita++){ for (TQStringList::Iterator ita = lastDownloadPaths.begin(); ita == lastDownloadPaths.begin() ; ita++){
dbdir = *ita; dbdir = *ita;
} }
@ -866,18 +866,18 @@ QString Freshklam::getCurrentDBDir(){
void Freshklam::createDBDir(){ void Freshklam::createDBDir(){
QString path = getenv("HOME"); TQString path = getenv("HOME");
bool ok = true; bool ok = true;
// directory exist? // directory exist?
path += "/.klamav"; path += "/.klamav";
QDir klamavdir(path); TQDir klamavdir(path);
if (!klamavdir.exists() && !klamavdir.mkdir(path)) if (!klamavdir.exists() && !klamavdir.mkdir(path))
ok = false; ok = false;
path += "/database"; path += "/database";
if (ok) if (ok)
{ {
QDir klamavqdir(path); TQDir klamavqdir(path);
if (!klamavqdir.exists() && !klamavqdir.mkdir(path)) if (!klamavqdir.exists() && !klamavqdir.mkdir(path))
ok = false; ok = false;
else else
@ -885,7 +885,7 @@ void Freshklam::createDBDir(){
} }
if (ok){ if (ok){
lastDownloadPaths.prepend( QString("%1").arg(path)); lastDownloadPaths.prepend( TQString("%1").arg(path));
config = KGlobal::config(); config = KGlobal::config();
config->setGroup("Freshklam"); config->setGroup("Freshklam");
config->writeEntry("lastDownloadPaths", lastDownloadPaths); config->writeEntry("lastDownloadPaths", lastDownloadPaths);
@ -894,7 +894,7 @@ void Freshklam::createDBDir(){
} }
KMessageBox::information (this,QString(ok ? i18n( "Your Virus Database location has been set up as '%1'. You can change this to something else if you want to." ) : i18n( "I cannot create the directory '%1' for you. Something is wrong with your HOME or klamav directory. You have to adjust your Virus Database directory by your self." )).arg(path)); KMessageBox::information (this,TQString(ok ? i18n( "Your Virus Database location has been set up as '%1'. You can change this to something else if you want to." ) : i18n( "I cannot create the directory '%1' for you. Something is wrong with your HOME or klamav directory. You have to adjust your Virus Database directory by your self." )).arg(path));
if (ok){ if (ok){
int result = KMessageBox::warningContinueCancel(this, i18n( "Would you like to download the latest Virus Database to your new database location now? (You can do this later manually if you want.)"),i18n( "Download Virus Database" ),i18n( "Download" )); int result = KMessageBox::warningContinueCancel(this, i18n( "Would you like to download the latest Virus Database to your new database location now? (You can do this later manually if you want.)"),i18n( "Download Virus Database" ),i18n( "Download" ));
@ -982,7 +982,7 @@ Freshklam::getCurrentVersionOfClamAV( )
{ {
////kdDebug() << "version clamav" << endl; ////kdDebug() << "version clamav" << endl;
QString suCommand=QString("clamscan -V"); TQString suCommand=TQString("clamscan -V");
versionproc = new KProcIO(); versionproc = new KProcIO();
versionproc->setUseShell(TRUE); versionproc->setUseShell(TRUE);
@ -1007,7 +1007,7 @@ void Freshklam::versionExited()
void Freshklam::readVersionLine(KProcIO *) void Freshklam::readVersionLine(KProcIO *)
{ {
QString lineout = ""; TQString lineout = "";
int pos; int pos;
if ((pos = (versionproc->readln(lineout))) != -1) { if ((pos = (versionproc->readln(lineout))) != -1) {
@ -1015,7 +1015,7 @@ void Freshklam::readVersionLine(KProcIO *)
lineout = lineout.stripWhiteSpace(); lineout = lineout.stripWhiteSpace();
int StartPoint = (lineout.find("ClamAV") + 6); int StartPoint = (lineout.find("ClamAV") + 6);
int EndPoint = lineout.find("/"); int EndPoint = lineout.find("/");
QString currentClamAVVersion = lineout.mid(StartPoint,(EndPoint - StartPoint)); TQString currentClamAVVersion = lineout.mid(StartPoint,(EndPoint - StartPoint));
currentClamAVVersion = currentClamAVVersion.stripWhiteSpace(); currentClamAVVersion = currentClamAVVersion.stripWhiteSpace();
KlamavConfig::setClamAVVersion(currentClamAVVersion); KlamavConfig::setClamAVVersion(currentClamAVVersion);
KlamavConfig::writeConfig(); KlamavConfig::writeConfig();

@ -27,12 +27,12 @@ using namespace KNetwork;
class KPrinter; class KPrinter;
class KToggleAction; class KToggleAction;
class KURL; class KURL;
class QLineEdit; class TQLineEdit;
class QComboBox; class TQComboBox;
class QCheckBox; class TQCheckBox;
class QListBox; class TQListBox;
class QPushButton; class TQPushButton;
class QLabel; class TQLabel;
class KProcess; class KProcess;
class KConfig; class KConfig;
class KURLRequester; class KURLRequester;
@ -50,14 +50,14 @@ class KlamavUpdate;
* @author $AUTHOR <$EMAIL> * @author $AUTHOR <$EMAIL>
* @version $APP_VERSION * @version $APP_VERSION
*/ */
class Freshklam : public QWidget class Freshklam : public TQWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
/** /**
* Default Constructor * Default Constructor
*/ */
Freshklam(QWidget *parent, const char *name=0); Freshklam(TQWidget *parent, const char *name=0);
/** /**
* Default Destructor * Default Destructor
@ -67,18 +67,18 @@ public:
/** /**
* Use this method to load whatever file/URL you have * Use this method to load whatever file/URL you have
*/ */
void setDirName(QString); void setDirName(TQString);
QString getCurrentDBDir(); TQString getCurrentDBDir();
bool isFreshklamAlive(); bool isFreshklamAlive();
QPushButton *search_button, *cancel_button; TQPushButton *search_button, *cancel_button;
void enableAutoUpdates(); void enableAutoUpdates();
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:
/** /**
@ -106,7 +106,7 @@ private:
signals: signals:
void itemSelected(QString abs_filename, int line); void itemSelected(TQString abs_filename, int line);
public slots: public slots:
@ -145,52 +145,52 @@ private:
void disableInputs(); void disableInputs();
bool killPID(); bool killPID();
void createDBDir(); void createDBDir();
/* void downloadComponent(QString component, QString version, QString extension);*/ /* void downloadComponent(TQString component, TQString version, TQString extension);*/
void startProgressDialog( const QString & text ); void startProgressDialog( const TQString & text );
void checkInternet(); void checkInternet();
void connectToHost(); void connectToHost();
/* void checkForNewKlamAV();*/ /* void checkForNewKlamAV();*/
void initCheckBoxes(); void initCheckBoxes();
/* void getVersionFromLink( const DOM::Node &n ); /* void getVersionFromLink( const DOM::Node &n );
void completedSearchForUpdates(const QString &component, const QString &extension);*/ void completedSearchForUpdates(const TQString &component, const TQString &extension);*/
void updateMetaDB(); void updateMetaDB();
/* QString getMirror();*/ /* TQString getMirror();*/
QLineEdit *template_edit; TQLineEdit *template_edit;
QComboBox *check_combo; TQComboBox *check_combo;
KURLRequester *dir_combo; KURLRequester *dir_combo;
KURLRequester *proxy_dir_combo; KURLRequester *proxy_dir_combo;
QCheckBox *daemon_box; TQCheckBox *daemon_box;
QCheckBox* clamav_box; TQCheckBox* clamav_box;
QCheckBox* klamav_box; TQCheckBox* klamav_box;
QCheckBox *recursive_box; TQCheckBox *recursive_box;
QListBox *resultbox; TQListBox *resultbox;
QLabel *status_label, *matches_label; TQLabel *status_label, *matches_label;
KProcess *childproc; KProcess *childproc;
KProcIO *versionproc; KProcIO *versionproc;
QString buf; TQString buf;
KConfig* config; KConfig* config;
QStringList lastSearchItems; TQStringList lastSearchItems;
QStringList lastDownloadPaths; TQStringList lastDownloadPaths;
KLineEdit *proxyIP; KLineEdit *proxyIP;
KLineEdit *proxyPort; KLineEdit *proxyPort;
KLineEdit *proxyUser; KLineEdit *proxyUser;
KLineEdit *proxyPass; KLineEdit *proxyPass;
QString tempFileName; TQString tempFileName;
QString errorMessage; TQString errorMessage;
QString pidFileName; TQString pidFileName;
bool freshklamAlive; bool freshklamAlive;
KProgressDialog *progressDialog; KProgressDialog *progressDialog;
QTimer *timer; TQTimer *timer;
/* bool upgradeinprogress;*/ /* bool upgradeinprogress;*/
bool checkingDirectly; bool checkingDirectly;
/* double highestsofarnumeric; /* double highestsofarnumeric;
QString highestsofarraw; TQString highestsofarraw;
QString highestsofarfilename;*/ TQString highestsofarfilename;*/
KResolver m_resolver; KResolver m_resolver;
/* QString currentClamAVVersion; /* TQString currentClamAVVersion;
KHTMLPart *filelist;*/ KHTMLPart *filelist;*/
QPushButton *clamav_options; TQPushButton *clamav_options;
QPushButton *klamav_options; TQPushButton *klamav_options;
// private: // private:
// KDirLister clamav_lister; // KDirLister clamav_lister;

@ -29,15 +29,15 @@
#include <klocale.h> #include <klocale.h>
#include <kpopupmenu.h> #include <kpopupmenu.h>
#include <qpixmap.h> #include <tqpixmap.h>
#include <qpainter.h> #include <tqpainter.h>
#include <qapplication.h> #include <tqapplication.h>
#include <X11/Xlib.h> #include <X11/Xlib.h>
K3bJobProgressOSD::K3bJobProgressOSD( QWidget* parent, const char* name ) K3bJobProgressOSD::K3bJobProgressOSD( TQWidget* parent, const char* name )
: QWidget( parent, name, WType_TopLevel | WNoAutoErase | WStyle_Customize | WX11BypassWM | WStyle_StaysOnTop ), : TQWidget( parent, name, WType_TopLevel | WNoAutoErase | WStyle_Customize | WX11BypassWM | WStyle_StaysOnTop ),
m_dirty(true), m_dirty(true),
m_dragging(false), m_dragging(false),
m_screen(0), m_screen(0),
@ -67,11 +67,11 @@ void K3bJobProgressOSD::show()
if( m_dirty ) if( m_dirty )
renderOSD(); renderOSD();
QWidget::show(); TQWidget::show();
} }
void K3bJobProgressOSD::setText( const QString& text ) void K3bJobProgressOSD::setText( const TQString& text )
{ {
if( m_text != text ) { if( m_text != text ) {
m_text = text; m_text = text;
@ -90,7 +90,7 @@ void K3bJobProgressOSD::setProgress( int p )
} }
void K3bJobProgressOSD::setPosition( const QPoint& p ) void K3bJobProgressOSD::setPosition( const TQPoint& p )
{ {
m_position = p; m_position = p;
reposition(); reposition();
@ -115,39 +115,39 @@ void K3bJobProgressOSD::renderOSD()
// ---------------------------------------- // ----------------------------------------
// calculate needed size // calculate needed size
QPixmap icon = KGlobal::iconLoader()->loadIcon( "klamav", KIcon::NoGroup, 32 ); TQPixmap icon = KGlobal::iconLoader()->loadIcon( "klamav", KIcon::NoGroup, 32 );
int margin = 10; int margin = 10;
int textWidth = fontMetrics().width( m_text ); int textWidth = fontMetrics().width( m_text );
// do not change the size everytime the text changes, just in case we are too small // do not change the size everytime the text changes, just in case we are too small
QSize newSize( QMAX( QMAX( 2*margin + icon.width() + margin + textWidth, 100 ), width() ), TQSize newSize( TQMAX( TQMAX( 2*margin + icon.width() + margin + textWidth, 100 ), width() ),
QMAX( 2*margin + icon.height(), 2*margin + fontMetrics().height()*2 ) ); TQMAX( 2*margin + icon.height(), 2*margin + fontMetrics().height()*2 ) );
m_osdBuffer.resize( newSize ); m_osdBuffer.resize( newSize );
QPainter p( &m_osdBuffer ); TQPainter p( &m_osdBuffer );
p.setPen( Qt::black ); p.setPen( TQt::black );
// draw the background and the frame // draw the background and the frame
QRect thisRect( 0, 0, newSize.width(), newSize.height() ); TQRect thisRect( 0, 0, newSize.width(), newSize.height() );
p.fillRect( thisRect, Qt::white ); p.fillRect( thisRect, TQt::white );
p.drawRect( thisRect ); p.drawRect( thisRect );
// draw the k3b icon // draw the k3b icon
p.drawPixmap( margin, (newSize.height()-icon.height())/2, icon ); p.drawPixmap( margin, (newSize.height()-icon.height())/2, icon );
// draw the text // draw the text
QSize textSize = fontMetrics().size( 0, m_text ); TQSize textSize = fontMetrics().size( 0, m_text );
int textX = 2*margin + icon.width(); int textX = 2*margin + icon.width();
int textY = margin + fontMetrics().ascent(); int textY = margin + fontMetrics().ascent();
p.drawText( textX, textY, m_text ); p.drawText( textX, textY, m_text );
// draw the progress // draw the progress
textY += fontMetrics().descent() + 4; textY += fontMetrics().descent() + 4;
QRect progressRect( textX, textY, newSize.width()-textX-margin, newSize.height()-textY-margin ); TQRect progressRect( textX, textY, newSize.width()-textX-margin, newSize.height()-textY-margin );
p.drawRect( progressRect ); p.drawRect( progressRect );
progressRect.setWidth( m_progress > 0 ? m_progress*progressRect.width()/100 : 0 ); progressRect.setWidth( m_progress > 0 ? m_progress*progressRect.width()/100 : 0 );
p.fillRect( progressRect, Qt::black ); p.fillRect( progressRect, TQt::black );
// reposition the osd // reposition the osd
reposition( newSize ); reposition( newSize );
@ -160,19 +160,19 @@ void K3bJobProgressOSD::renderOSD()
void K3bJobProgressOSD::setScreen( int screen ) void K3bJobProgressOSD::setScreen( int screen )
{ {
const int n = QApplication::desktop()->numScreens(); const int n = TQApplication::desktop()->numScreens();
m_screen = (screen >= n) ? n-1 : screen; m_screen = (screen >= n) ? n-1 : screen;
reposition(); reposition();
} }
void K3bJobProgressOSD::reposition( QSize newSize ) void K3bJobProgressOSD::reposition( TQSize newSize )
{ {
if( !newSize.isValid() ) if( !newSize.isValid() )
newSize = size(); newSize = size();
QPoint newPos = m_position; TQPoint newPos = m_position;
const QRect& screen = QApplication::desktop()->screenGeometry( m_screen ); const TQRect& screen = TQApplication::desktop()->screenGeometry( m_screen );
// now to properly resize if put into one of the corners we interpret the position // now to properly resize if put into one of the corners we interpret the position
// depending on the quadrant // depending on the quadrant
@ -197,13 +197,13 @@ void K3bJobProgressOSD::reposition( QSize newSize )
} }
void K3bJobProgressOSD::paintEvent( QPaintEvent* ) void K3bJobProgressOSD::paintEvent( TQPaintEvent* )
{ {
bitBlt( this, 0, 0, &m_osdBuffer ); bitBlt( this, 0, 0, &m_osdBuffer );
} }
void K3bJobProgressOSD::mousePressEvent( QMouseEvent* e ) void K3bJobProgressOSD::mousePressEvent( TQMouseEvent* e )
{ {
m_dragOffset = e->pos(); m_dragOffset = e->pos();
@ -219,7 +219,7 @@ void K3bJobProgressOSD::mousePressEvent( QMouseEvent* e )
} }
void K3bJobProgressOSD::mouseReleaseEvent( QMouseEvent* ) void K3bJobProgressOSD::mouseReleaseEvent( TQMouseEvent* )
{ {
if( m_dragging ) { if( m_dragging ) {
m_dragging = false; m_dragging = false;
@ -228,16 +228,16 @@ void K3bJobProgressOSD::mouseReleaseEvent( QMouseEvent* )
} }
void K3bJobProgressOSD::mouseMoveEvent( QMouseEvent* e ) void K3bJobProgressOSD::mouseMoveEvent( TQMouseEvent* e )
{ {
if( m_dragging && this == mouseGrabber() ) { if( m_dragging && this == mouseGrabber() ) {
// check if the osd has been dragged out of the current screen // check if the osd has been dragged out of the current screen
int currentScreen = QApplication::desktop()->screenNumber( e->globalPos() ); int currentScreen = TQApplication::desktop()->screenNumber( e->globalPos() );
if( currentScreen != -1 ) if( currentScreen != -1 )
m_screen = currentScreen; m_screen = currentScreen;
const QRect& screen = QApplication::desktop()->screenGeometry( m_screen ); const TQRect& screen = TQApplication::desktop()->screenGeometry( m_screen );
// make sure the position is valid // make sure the position is valid
m_position = fixupPosition( e->globalPos() - m_dragOffset - screen.topLeft() ); m_position = fixupPosition( e->globalPos() - m_dragOffset - screen.topLeft() );
@ -256,10 +256,10 @@ void K3bJobProgressOSD::mouseMoveEvent( QMouseEvent* e )
} }
QPoint K3bJobProgressOSD::fixupPosition( const QPoint& pp ) TQPoint K3bJobProgressOSD::fixupPosition( const TQPoint& pp )
{ {
QPoint p(pp); TQPoint p(pp);
const QRect& screen = QApplication::desktop()->screenGeometry( m_screen ); const TQRect& screen = TQApplication::desktop()->screenGeometry( m_screen );
int maxY = screen.height() - height() - s_outerMargin; int maxY = screen.height() - height() - s_outerMargin;
int maxX = screen.width() - width() - s_outerMargin; int maxX = screen.width() - width() - s_outerMargin;
@ -281,7 +281,7 @@ QPoint K3bJobProgressOSD::fixupPosition( const QPoint& pp )
void K3bJobProgressOSD::readSettings( KConfigBase* c ) void K3bJobProgressOSD::readSettings( KConfigBase* c )
{ {
QString oldGroup = c->group(); TQString oldGroup = c->group();
c->setGroup( "KlamOSD Position" ); c->setGroup( "KlamOSD Position" );
setPosition( c->readPointEntry( "Position", 0 ) ); setPosition( c->readPointEntry( "Position", 0 ) );
@ -293,7 +293,7 @@ void K3bJobProgressOSD::readSettings( KConfigBase* c )
void K3bJobProgressOSD::saveSettings( KConfigBase* c ) void K3bJobProgressOSD::saveSettings( KConfigBase* c )
{ {
QString oldGroup = c->group(); TQString oldGroup = c->group();
c->setGroup( "KlamOSD Position" ); c->setGroup( "KlamOSD Position" );
c->writeEntry( "Position", m_position ); c->writeEntry( "Position", m_position );

@ -16,11 +16,11 @@
#ifndef _K3B_JOB_PROGRESS_OSD_H_ #ifndef _K3B_JOB_PROGRESS_OSD_H_
#define _K3B_JOB_PROGRESS_OSD_H_ #define _K3B_JOB_PROGRESS_OSD_H_
#include <qwidget.h> #include <tqwidget.h>
#include <qpixmap.h> #include <tqpixmap.h>
class QPaintEvent; class TQPaintEvent;
class QMouseEvent; class TQMouseEvent;
class KConfigBase; class KConfigBase;
/** /**
@ -28,23 +28,23 @@ class KConfigBase;
* *
* Insprired by Amarok's OSD (I also took a bit of their code. :) * Insprired by Amarok's OSD (I also took a bit of their code. :)
*/ */
class K3bJobProgressOSD : public QWidget class K3bJobProgressOSD : public TQWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
K3bJobProgressOSD( QWidget* parent = 0, const char* name = 0 ); K3bJobProgressOSD( TQWidget* parent = 0, const char* name = 0 );
~K3bJobProgressOSD(); ~K3bJobProgressOSD();
int screen() const { return m_screen; } int screen() const { return m_screen; }
const QPoint& position() const { return m_position; } const TQPoint& position() const { return m_position; }
void readSettings( KConfigBase* ); void readSettings( KConfigBase* );
void saveSettings( KConfigBase* ); void saveSettings( KConfigBase* );
public slots: public slots:
void setScreen( int ); void setScreen( int );
void setText( const QString& ); void setText( const TQString& );
void setProgress( int ); void setProgress( int );
/** /**
@ -53,34 +53,34 @@ class K3bJobProgressOSD : public QWidget
* If for example the x coordinate is bigger than half the screen * If for example the x coordinate is bigger than half the screen
* width it refers to the left edge of the widget. * width it refers to the left edge of the widget.
*/ */
void setPosition( const QPoint& ); void setPosition( const TQPoint& );
void show(); void show();
protected: protected:
void paintEvent( QPaintEvent* ); void paintEvent( TQPaintEvent* );
void mousePressEvent( QMouseEvent* ); void mousePressEvent( TQMouseEvent* );
void mouseReleaseEvent( QMouseEvent* ); void mouseReleaseEvent( TQMouseEvent* );
void mouseMoveEvent( QMouseEvent* ); void mouseMoveEvent( TQMouseEvent* );
void renderOSD(); void renderOSD();
void refresh(); void refresh();
void reposition( QSize size = QSize() ); void reposition( TQSize size = TQSize() );
private: private:
/** /**
* Ensure that the position is inside m_screen * Ensure that the position is inside m_screen
*/ */
QPoint fixupPosition( const QPoint& p ); TQPoint fixupPosition( const TQPoint& p );
static const int s_outerMargin = 15; static const int s_outerMargin = 15;
QPixmap m_osdBuffer; TQPixmap m_osdBuffer;
bool m_dirty; bool m_dirty;
QString m_text; TQString m_text;
int m_progress; int m_progress;
bool m_dragging; bool m_dragging;
QPoint m_dragOffset; TQPoint m_dragOffset;
int m_screen; int m_screen;
QPoint m_position; TQPoint m_position;
}; };
#endif #endif

@ -21,16 +21,16 @@
#include <kaction.h> #include <kaction.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qlayout.h> #include <tqlayout.h>
#include <ksystemtray.h> #include <ksystemtray.h>
#include <kpopupmenu.h> #include <kpopupmenu.h>
#include <kdebug.h> #include <kdebug.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include <kurl.h> #include <kurl.h>
#include <qdir.h> #include <tqdir.h>
#include <qfile.h> #include <tqfile.h>
Klamav *kmain = 0L; Klamav *kmain = 0L;
@ -44,8 +44,8 @@ Klamav::Klamav()
downloadClamAVForWizard = false; downloadClamAVForWizard = false;
kmain = this; kmain = this;
QVBoxLayout *top = new QVBoxLayout(this,10,10); TQVBoxLayout *top = new TQVBoxLayout(this,10,10);
tab = new QTabWidget(this); tab = new TQTabWidget(this);
_tray = new KSystemTray(kmain, "klamav tray"); _tray = new KSystemTray(kmain, "klamav tray");
_tray->setPixmap(KSystemTray::loadIcon("klamav_on_acc_disabled")); _tray->setPixmap(KSystemTray::loadIcon("klamav_on_acc_disabled"));
@ -63,7 +63,7 @@ Klamav::Klamav()
EnableKlamd->plug(conf_menu); EnableKlamd->plug(conf_menu);
DisableKlamd->plug(conf_menu); DisableKlamd->plug(conf_menu);
QToolTip::add( _tray, i18n( "KlamAV - Virus Protection for KDE" ) ); TQToolTip::add( _tray, i18n( "KlamAV - Virus Protection for KDE" ) );
_tray->show(); _tray->show();
DisableFreshklam->setEnabled(FALSE); DisableFreshklam->setEnabled(FALSE);
@ -73,10 +73,10 @@ Klamav::Klamav()
KConfig* config = KGlobal::config(); KConfig* config = KGlobal::config();
config->setGroup("Freshklam"); config->setGroup("Freshklam");
QStringList DatabasePaths = config->readListEntry("lastDownloadPaths"); TQStringList DatabasePaths = config->readListEntry("lastDownloadPaths");
config->setGroup("Kuarantine"); config->setGroup("Kuarantine");
QStringList QuarantinePaths = config->readListEntry("KuarantineLocations"); TQStringList QuarantinePaths = config->readListEntry("KuarantineLocations");
if ((DatabasePaths.isEmpty()) && (QuarantinePaths.isEmpty())){ if ((DatabasePaths.isEmpty()) && (QuarantinePaths.isEmpty())){
@ -122,14 +122,14 @@ Klamav::Klamav()
top->addWidget(tab); top->addWidget(tab);
connect(tab,SIGNAL(currentChanged ( QWidget * ) ),klamdb,SLOT(shouldIShow(QWidget *))); connect(tab,SIGNAL(currentChanged ( TQWidget * ) ),klamdb,SLOT(shouldIShow(TQWidget *)));
KStdAction::quit(this, SLOT(shuttingDown()), actionCollection()); KStdAction::quit(this, SLOT(shuttingDown()), actionCollection());
if (KApplication::kApplication()->isRestored()){ if (KApplication::kApplication()->isRestored()){
/* config = KGlobal::config(); /* config = KGlobal::config();
config->setGroup("Klamd"); config->setGroup("Klamd");
QString RunKlamd = config->readEntry("Enabled"); TQString RunKlamd = config->readEntry("Enabled");
if (RunKlamd == "Yes"){ if (RunKlamd == "Yes"){
_tray->setPixmap(KSystemTray::loadIcon("klamav")); _tray->setPixmap(KSystemTray::loadIcon("klamav"));
@ -156,7 +156,7 @@ Klamav::Klamav()
CollectionDB::instance()->insertEvent("Launch","KlamAV Launched"); CollectionDB::instance()->insertEvent("Launch","KlamAV Launched");
setCaption(QString("KlamAV %1 (Using ClamAV %2)").arg(KLAMAV_VERSION).arg(KlamavConfig::clamAVVersion())); setCaption(TQString("KlamAV %1 (Using ClamAV %2)").arg(KLAMAV_VERSION).arg(KlamavConfig::clamAVVersion()));
} }
Klamav::~Klamav() Klamav::~Klamav()
@ -244,43 +244,43 @@ void Klamav::firstRunWizard() {
FirstRunWizard wizard; FirstRunWizard wizard;
wizard.setCaption( i18n( "First-Run Wizard" )); wizard.setCaption( i18n( "First-Run Wizard" ));
QString homepath = getenv("HOME"); TQString homepath = getenv("HOME");
QString defaultdb = homepath + "/.klamav/database"; TQString defaultdb = homepath + "/.klamav/database";
QString defaultquar = homepath + "/.klamav/quarantine"; TQString defaultquar = homepath + "/.klamav/quarantine";
if( wizard.exec() != QDialog::Rejected ){ if( wizard.exec() != TQDialog::Rejected ){
KConfig* config = KGlobal::config(); KConfig* config = KGlobal::config();
config->setGroup("Freshklam"); config->setGroup("Freshklam");
QString wizardDBPath = wizard.databasePath().path(-1); TQString wizardDBPath = wizard.databasePath().path(-1);
QString wizardQRPath = wizard.quarantinePath().path(-1); TQString wizardTQRPath = wizard.quarantinePath().path(-1);
/* kdDebug() << wizard.databasePath() << endl; /* kdDebug() << wizard.databasePath() << endl;
kdDebug() << wizard.defaultDatabasePath() << endl;*/ kdDebug() << wizard.defaultDatabasePath() << endl;*/
//Configure Database Path //Configure Database Path
QStringList lastDownloadPaths; TQStringList lastDownloadPaths;
if ((wizardDBPath != "") && (QDir::cleanDirPath(wizardDBPath) != defaultdb)){ if ((wizardDBPath != "") && (TQDir::cleanDirPath(wizardDBPath) != defaultdb)){
lastDownloadPaths.prepend( QString("%1").arg(wizardDBPath)); lastDownloadPaths.prepend( TQString("%1").arg(wizardDBPath));
checkDir(wizardDBPath); checkDir(wizardDBPath);
}else{ }else{
lastDownloadPaths.prepend( QString("%1").arg(wizard.defaultDatabasePath())); lastDownloadPaths.prepend( TQString("%1").arg(wizard.defaultDatabasePath()));
createDefaultKlamAVDir("database"); createDefaultKlamAVDir("database");
} }
config->writeEntry("lastDownloadPaths", lastDownloadPaths); config->writeEntry("lastDownloadPaths", lastDownloadPaths);
config->sync(); config->sync();
//Configure Quarantine Path //Configure Quarantine Path
QStringList lastQuarLocations; TQStringList lastQuarLocations;
config->setGroup("Kuarantine"); config->setGroup("Kuarantine");
/* kdDebug() << wizard.quarantinePath() << endl; /* kdDebug() << wizard.quarantinePath() << endl;
kdDebug() << wizard.defaultQuarantinePath() << endl; kdDebug() << wizard.defaultQuarantinePath() << endl;
kdDebug() << defaultquar << endl;*/ kdDebug() << defaultquar << endl;*/
if ((wizardQRPath != "") && (QDir::cleanDirPath(wizardQRPath) != defaultquar)){ if ((wizardTQRPath != "") && (TQDir::cleanDirPath(wizardTQRPath) != defaultquar)){
lastQuarLocations.prepend( QString("%1").arg(wizardQRPath)); lastQuarLocations.prepend( TQString("%1").arg(wizardTQRPath));
checkDir(wizardQRPath); checkDir(wizardTQRPath);
}else{ }else{
lastQuarLocations.prepend( QString("%1").arg(wizard.defaultQuarantinePath())); lastQuarLocations.prepend( TQString("%1").arg(wizard.defaultQuarantinePath()));
createDefaultKlamAVDir("quarantine"); createDefaultKlamAVDir("quarantine");
} }
config->writeEntry("KuarantineLocations", lastQuarLocations); config->writeEntry("KuarantineLocations", lastQuarLocations);
@ -299,20 +299,20 @@ void Klamav::firstRunWizard() {
} }
void Klamav::createDefaultKlamAVDir(QString type){ void Klamav::createDefaultKlamAVDir(TQString type){
QString path = getenv("HOME"); TQString path = getenv("HOME");
bool ok = true; bool ok = true;
// directory exist? // directory exist?
path += "/.klamav"; path += "/.klamav";
QDir klamavdir(path); TQDir klamavdir(path);
if (!klamavdir.exists() && !klamavdir.mkdir(path)) if (!klamavdir.exists() && !klamavdir.mkdir(path))
ok = false; ok = false;
path += "/" + type; path += "/" + type;
if (ok) if (ok)
{ {
QDir klamavqdir(path); TQDir klamavqdir(path);
if (!klamavqdir.exists() && !klamavqdir.mkdir(path)) if (!klamavqdir.exists() && !klamavqdir.mkdir(path))
ok = false; ok = false;
else else
@ -321,17 +321,17 @@ void Klamav::createDefaultKlamAVDir(QString type){
} }
void Klamav::checkDir(QString path){ void Klamav::checkDir(TQString path){
QDir klamavdir(path); TQDir klamavdir(path);
QFile f1( path ); TQFile f1( path );
if ((!klamavdir.exists()) || (f1.open( IO_ReadWrite ))) if ((!klamavdir.exists()) || (f1.open( IO_ReadWrite )))
KMessageBox::information(this, i18n("Either the directory %1 does not exist or you are not able to write to it. Either way, you will have to change it as it cannot be used. Sorry!").arg(path)); KMessageBox::information(this, i18n("Either the directory %1 does not exist or you are not able to write to it. Either way, you will have to change it as it cannot be used. Sorry!").arg(path));
f1.close(); f1.close();
} }
void Klamav::slotConfigKlamav( const QCString& page ) void Klamav::slotConfigKlamav( const TQCString& page )
{ {
KlamavConfigDialog* dialog = (KlamavConfigDialog*) KConfigDialog::exists( "settings" ); KlamavConfigDialog* dialog = (KlamavConfigDialog*) KConfigDialog::exists( "settings" );

@ -11,19 +11,19 @@
#include <kapplication.h> #include <kapplication.h>
#include <kmainwindow.h> #include <kmainwindow.h>
#include <qtabwidget.h> #include <tqtabwidget.h>
#include <stdlib.h> #include <stdlib.h>
class KPrinter; class KPrinter;
class KToggleAction; class KToggleAction;
class KURL; class KURL;
class QLineEdit; class TQLineEdit;
class QComboBox; class TQComboBox;
class QCheckBox; class TQCheckBox;
class QListBox; class TQListBox;
class QPushButton; class TQPushButton;
class QLabel; class TQLabel;
class KProcess; class KProcess;
class KConfig; class KConfig;
class KURLRequester; class KURLRequester;
@ -63,7 +63,7 @@ public:
/** /**
* Use this method to load whatever file/URL you have * Use this method to load whatever file/URL you have
*/ */
void setDirName(QString); void setDirName(TQString);
KlamavDock *m_dock; KlamavDock *m_dock;
KSystemTray *_tray; KSystemTray *_tray;
@ -82,15 +82,15 @@ public:
Activityviewer *activityviewer; Activityviewer *activityviewer;
void showVirusBrowser(); void showVirusBrowser();
void resetAutoScan(); void resetAutoScan();
QTabWidget *tab; TQTabWidget *tab;
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);*/
virtual bool queryClose(); virtual bool queryClose();
@ -111,7 +111,7 @@ protected:
public slots: public slots:
void contextDisable(); void contextDisable();
void clamdStopped(); void clamdStopped();
void slotConfigKlamav( const QCString& page ); void slotConfigKlamav( const TQCString& page );
private slots: private slots:
void contextEnable(); void contextEnable();
void contextEnableFK(); void contextEnableFK();
@ -122,8 +122,8 @@ private:
void setupAccel(); void setupAccel();
void setupActions(); void setupActions();
void firstRunWizard(); void firstRunWizard();
void createDefaultKlamAVDir(QString type); void createDefaultKlamAVDir(TQString type);
void checkDir(QString path); void checkDir(TQString path);
private: private:
//KlamavView *m_view; //KlamavView *m_view;
@ -131,7 +131,7 @@ private:
signals: signals:
void itemSelected(QString abs_filename, int line); void itemSelected(TQString abs_filename, int line);
public slots: public slots:
private slots: private slots:
@ -141,18 +141,18 @@ private:
void finish(); void finish();
void getout(); void getout();
QLineEdit *template_edit; TQLineEdit *template_edit;
QComboBox *files_combo, *pattern_combo/*, *dir_combo*/; TQComboBox *files_combo, *pattern_combo/*, *dir_combo*/;
KURLRequester *dir_combo; KURLRequester *dir_combo;
QCheckBox *recursive_box; TQCheckBox *recursive_box;
QListBox *resultbox; TQListBox *resultbox;
QPushButton *search_button, *cancel_button; TQPushButton *search_button, *cancel_button;
QLabel *status_label, *matches_label; TQLabel *status_label, *matches_label;
KProcess *childproc; KProcess *childproc;
QString buf; TQString buf;
KConfig* config; KConfig* config;
QStringList lastSearchItems; TQStringList lastSearchItems;
QStringList lastSearchPaths; TQStringList lastSearchPaths;
Sigtool *sigtool; Sigtool *sigtool;
Aboutklamav *aboutklamav; Aboutklamav *aboutklamav;

@ -12,7 +12,7 @@
using namespace KlamAV; using namespace KlamAV;
BrowserRun::BrowserRun(Viewer *viewer, QWidget *parent, KParts::ReadOnlyPart *part, const KURL & url, const KParts::URLArgs &args) BrowserRun::BrowserRun(Viewer *viewer, TQWidget *parent, KParts::ReadOnlyPart *part, const KURL & url, const KParts::URLArgs &args)
: KParts::BrowserRun(url, args, part, parent, false, true) : KParts::BrowserRun(url, args, part, parent, false, true)
{ {
m_viewer=viewer; m_viewer=viewer;
@ -26,7 +26,7 @@ BrowserRun::~BrowserRun()
//kdDebug() << "BrowserRun::~BrowserRun()" << endl; //kdDebug() << "BrowserRun::~BrowserRun()" << endl;
} }
void BrowserRun::foundMimeType( const QString & type ) void BrowserRun::foundMimeType( const TQString & type )
{ {
if (type=="text/html" ||type=="text/xml" || type=="application/xhtml+xml" ) if (type=="text/html" ||type=="text/xml" || type=="application/xhtml+xml" )
m_viewer->openPage(url()); m_viewer->openPage(url());

@ -19,11 +19,11 @@ namespace KlamAV
{ {
Q_OBJECT Q_OBJECT
public: public:
BrowserRun(Viewer *, QWidget *, KParts::ReadOnlyPart *, const KURL & , const KParts::URLArgs &); BrowserRun(Viewer *, TQWidget *, KParts::ReadOnlyPart *, const KURL & , const KParts::URLArgs &);
virtual ~BrowserRun(); virtual ~BrowserRun();
protected: protected:
virtual void foundMimeType( const QString & _type ); virtual void foundMimeType( const TQString & _type );
private slots: private slots:
void killMyself(); void killMyself();

@ -18,15 +18,15 @@
#include <kaction.h> #include <kaction.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <kbuttonbox.h> #include <kbuttonbox.h>
#include <kprocio.h> #include <kprocio.h>
#include <kurlrequester.h> #include <kurlrequester.h>
#include <qlayout.h> #include <tqlayout.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include <ktempfile.h> #include <ktempfile.h>
#include <ksystemtray.h> #include <ksystemtray.h>
#include <qtoolbutton.h> #include <tqtoolbutton.h>
#include <knotifyclient.h> #include <knotifyclient.h>
@ -46,8 +46,8 @@ const char *check_desc2[] = {
}; };
Klamd::Klamd(QWidget *_parent, const char *name) Klamd::Klamd(TQWidget *_parent, const char *name)
: QWidget(_parent, name) : TQWidget(_parent, name)
{ {
parent = _parent; parent = _parent;
@ -57,24 +57,24 @@ Klamd::Klamd(QWidget *_parent, const char *name)
//Data Directory Widget //Data Directory Widget
//QString dt = QDateTime::currentDateTime().toString(); //TQString dt = TQDateTime::currentDateTime().toString();
//KMessageBox::information (this,dt); //KMessageBox::information (this,dt);
QVBoxLayout *vbox = new QVBoxLayout(this, KDialog::marginHint(), TQVBoxLayout *vbox = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint(), "vbox"); KDialog::spacingHint(), "vbox");
QGroupBox *group = new QGroupBox(i18n("Include Directories"), this); TQGroupBox *group = new TQGroupBox(i18n("Include Directories"), this);
vbox->addWidget(group); vbox->addWidget(group);
QGridLayout *layout = new QGridLayout( group, 9, 3, KDialog::spacingHint(), TQGridLayout *layout = new TQGridLayout( group, 9, 3, KDialog::spacingHint(),
KDialog::spacingHint(), "layout"); KDialog::spacingHint(), "layout");
layout->addRowSpacing(0, group->fontMetrics().height()); layout->addRowSpacing(0, group->fontMetrics().height());
layout->setColStretch(0, 1); layout->setColStretch(0, 1);
layout->setColStretch(1, 1); layout->setColStretch(1, 1);
hlp = new QWidget( group ); hlp = new TQWidget( group );
layout->addMultiCellWidget(hlp, 1,1, 0,2); layout->addMultiCellWidget(hlp, 1,1, 0,2);
QHBoxLayout *dir_layout = new QHBoxLayout(hlp, KDialog::spacingHint() ); TQHBoxLayout *dir_layout = new TQHBoxLayout(hlp, KDialog::spacingHint() );
KURL root = KURL( "/" ); KURL root = KURL( "/" );
m_fileTreeView = new KFileTreeView( hlp ); m_fileTreeView = new KFileTreeView( hlp );
@ -113,19 +113,19 @@ Klamd::Klamd(QWidget *_parent, const char *name)
dir_layout->addWidget(btndown); dir_layout->addWidget(btndown);
dir_layout->addWidget(sessionslb); dir_layout->addWidget(sessionslb);
QGroupBox *group2 = new QGroupBox(i18n("Exclude Directories"), this); TQGroupBox *group2 = new TQGroupBox(i18n("Exclude Directories"), this);
vbox->addWidget(group2); vbox->addWidget(group2);
QGridLayout *layout2 = new QGridLayout( group2, 9, 3, KDialog::spacingHint(), TQGridLayout *layout2 = new TQGridLayout( group2, 9, 3, KDialog::spacingHint(),
KDialog::spacingHint(), "layout2"); KDialog::spacingHint(), "layout2");
layout2->addRowSpacing(0, group2->fontMetrics().height()); layout2->addRowSpacing(0, group2->fontMetrics().height());
layout2->setColStretch(0, 1); layout2->setColStretch(0, 1);
layout2->setColStretch(1, 1); layout2->setColStretch(1, 1);
hlp2 = new QWidget( group2 ); hlp2 = new TQWidget( group2 );
layout2->addMultiCellWidget(hlp2, 1,1, 0,2); layout2->addMultiCellWidget(hlp2, 1,1, 0,2);
QHBoxLayout *dir_layout2 = new QHBoxLayout(hlp2, KDialog::spacingHint() ); TQHBoxLayout *dir_layout2 = new TQHBoxLayout(hlp2, KDialog::spacingHint() );
KURL root2 = KURL( "/" ); KURL root2 = KURL( "/" );
m_fileTreeView2 = new KFileTreeView( hlp2 ); m_fileTreeView2 = new KFileTreeView( hlp2 );
@ -161,21 +161,21 @@ Klamd::Klamd(QWidget *_parent, const char *name)
dir_layout2->addWidget(btndown2); dir_layout2->addWidget(btndown2);
dir_layout2->addWidget(sessionslb2); dir_layout2->addWidget(sessionslb2);
QGroupBox *group3 = new QGroupBox(i18n("Options"), this); TQGroupBox *group3 = new TQGroupBox(i18n("Options"), this);
vbox->addWidget(group3); vbox->addWidget(group3);
QGridLayout *layout3 = new QGridLayout( group3, 9, 10, KDialog::spacingHint(), TQGridLayout *layout3 = new TQGridLayout( group3, 9, 10, KDialog::spacingHint(),
KDialog::spacingHint(), "layout3"); KDialog::spacingHint(), "layout3");
layout3->addRowSpacing(0, group3->fontMetrics().height()); layout3->addRowSpacing(0, group3->fontMetrics().height());
//layout3->setColStretch(0, 1); //layout3->setColStretch(0, 1);
//layout3->setColStretch(1, 1); //layout3->setColStretch(1, 1);
hlp3 = new QWidget( group3 ); hlp3 = new TQWidget( group3 );
layout3->addMultiCellWidget(hlp3, 1,1, 0,10); layout3->addMultiCellWidget(hlp3, 1,1, 0,10);
QHBoxLayout *dir_layout3 = new QHBoxLayout(hlp3, KDialog::spacingHint() ); TQHBoxLayout *dir_layout3 = new TQHBoxLayout(hlp3, KDialog::spacingHint() );
recursive_box = new QCheckBox(i18n("&Quarantine"), hlp3); recursive_box = new TQCheckBox(i18n("&Quarantine"), hlp3);
//recursive_box->setMinimumWidth(recursive_box->sizeHint().width()); //recursive_box->setMinimumWidth(recursive_box->sizeHint().width());
if ((config->readEntry("Quarantine")) == "Yes") if ((config->readEntry("Quarantine")) == "Yes")
@ -187,7 +187,7 @@ Klamd::Klamd(QWidget *_parent, const char *name)
//dir_layout3->addSpacing(10); //dir_layout3->addSpacing(10);
dir_layout3->addWidget(recursive_box); dir_layout3->addWidget(recursive_box);
recursive_box1 = new QCheckBox(i18n("&Display Warnings"), hlp3); recursive_box1 = new TQCheckBox(i18n("&Display Warnings"), hlp3);
//recursive_box1->setMinimumWidth(recursive_box1->sizeHint().width()); //recursive_box1->setMinimumWidth(recursive_box1->sizeHint().width());
if ((config->readEntry("Warn")) == "Yes") if ((config->readEntry("Warn")) == "Yes")
@ -199,7 +199,7 @@ Klamd::Klamd(QWidget *_parent, const char *name)
//dir_layout3->addSpacing(10); //dir_layout3->addSpacing(10);
dir_layout3->addWidget(recursive_box1); dir_layout3->addWidget(recursive_box1);
recursive_box2 = new QCheckBox(i18n("&Run Docked"), hlp3); recursive_box2 = new TQCheckBox(i18n("&Run Docked"), hlp3);
//recursive_box2->setMinimumWidth(recursive_box2->sizeHint().width()); //recursive_box2->setMinimumWidth(recursive_box2->sizeHint().width());
if ((config->readEntry("Run Docked")) == "Yes") if ((config->readEntry("Run Docked")) == "Yes")
@ -211,11 +211,11 @@ Klamd::Klamd(QWidget *_parent, const char *name)
dir_layout3->addWidget(recursive_box2); dir_layout3->addWidget(recursive_box2);
dir_layout3->addSpacing(40); dir_layout3->addSpacing(40);
QLabel *combo_label = new QLabel(i18n("Max File Size (MBs):"), hlp3); TQLabel *combo_label = new TQLabel(i18n("Max File Size (MBs):"), hlp3);
//combo_label->setFixedSize(combo_label->sizeHint()); //combo_label->setFixedSize(combo_label->sizeHint());
dir_layout3->addWidget(combo_label); dir_layout3->addWidget(combo_label);
check_combo = new QComboBox(false, hlp3); check_combo = new TQComboBox(false, hlp3);
check_combo->insertStrList(check_desc1); check_combo->insertStrList(check_desc1);
check_combo->adjustSize(); check_combo->adjustSize();
//check_combo->setFixedSize(check_combo->size()); //check_combo->setFixedSize(check_combo->size());
@ -224,33 +224,33 @@ Klamd::Klamd(QWidget *_parent, const char *name)
dir_layout3->addSpacing(20); dir_layout3->addSpacing(20);
QToolButton* adv_options = new QToolButton( hlp3,"play" ); TQToolButton* adv_options = new TQToolButton( hlp3,"play" );
adv_options->setIconSet( SmallIconSet( "configure" ) ); adv_options->setIconSet( SmallIconSet( "configure" ) );
adv_options->setTextLabel("Options"); adv_options->setTextLabel("Options");
adv_options->setTextPosition(QToolButton::Right); adv_options->setTextPosition(TQToolButton::Right);
adv_options->setUsesTextLabel(true); adv_options->setUsesTextLabel(true);
// adv_options = new QPushButton ("Advanced", hlp3); // adv_options = new TQPushButton ("Advanced", hlp3);
dir_layout3->addWidget(adv_options); dir_layout3->addWidget(adv_options);
//adv_options->setFixedSize(adv_options->sizeHint()); //adv_options->setFixedSize(adv_options->sizeHint());
connect( adv_options, SIGNAL(clicked()), connect( adv_options, SIGNAL(clicked()),
SLOT(slotAdvOptions()) ); SLOT(slotAdvOptions()) );
/* QLabel *combo_label2 = new QLabel(i18n("Scan:"), hlp3); /* TQLabel *combo_label2 = new TQLabel(i18n("Scan:"), hlp3);
combo_label2->setFixedSize(combo_label2->sizeHint()); combo_label2->setFixedSize(combo_label2->sizeHint());
dir_layout3->addWidget(combo_label2); dir_layout3->addWidget(combo_label2);
check_combo2 = new QComboBox(false, hlp3); check_combo2 = new TQComboBox(false, hlp3);
check_combo2->insertStrList(check_desc2); check_combo2->insertStrList(check_desc2);
check_combo2->adjustSize(); check_combo2->adjustSize();
check_combo2->setFixedSize(check_combo2->size()); check_combo2->setFixedSize(check_combo2->size());
dir_layout3->addWidget(check_combo2); dir_layout3->addWidget(check_combo2);
QToolTip::add( check_combo2, "'On Access' scans every file accessed. 'On Execute' only scans files/programs that your system tries to execute." );*/ TQToolTip::add( check_combo2, "'On Access' scans every file accessed. 'On Execute' only scans files/programs that your system tries to execute." );*/
KButtonBox *actionbox = new KButtonBox(this, Qt::Horizontal); KButtonBox *actionbox = new KButtonBox(this, TQt::Horizontal);
vbox->addWidget(actionbox, 2, 0); vbox->addWidget(actionbox, 2, 0);
actionbox->addStretch(); actionbox->addStretch();
search_button = actionbox->addButton(i18n("&Enable Auto-Scan")); search_button = actionbox->addButton(i18n("&Enable Auto-Scan"));
@ -301,8 +301,8 @@ void Klamd::processOutput()
item2 = item2.stripWhiteSpace(); item2 = item2.stripWhiteSpace();
int fnameStartPoint = (item2.find(":") + 1); int fnameStartPoint = (item2.find(":") + 1);
int fnameEndPoint = item2.findRev(":"); int fnameEndPoint = item2.findRev(":");
QString tmpFName = item2.mid(fnameStartPoint,(fnameEndPoint - fnameStartPoint)); TQString tmpFName = item2.mid(fnameStartPoint,(fnameEndPoint - fnameStartPoint));
QString tmpVirusName = item2.mid((fnameEndPoint+1),(item2.length() - (fnameEndPoint+1))); TQString tmpVirusName = item2.mid((fnameEndPoint+1),(item2.length() - (fnameEndPoint+1)));
tmpVirusName.replace("FOUND",""); tmpVirusName.replace("FOUND","");
CollectionDB::instance()->insertEvent("Virus Found",tmpVirusName,tmpFName); CollectionDB::instance()->insertEvent("Virus Found",tmpVirusName,tmpFName);
if (recursive_box1->isChecked()) if (recursive_box1->isChecked())
@ -412,7 +412,7 @@ void Klamd::childExited()
void Klamd::receivedOutput(KProcIO *) void Klamd::receivedOutput(KProcIO *)
{ {
//buf += QCString(buffer, buflen+1); //buf += TQCString(buffer, buflen+1);
processOutput(); processOutput();
} }
@ -424,7 +424,7 @@ void Klamd::slotClear()
} }
void Klamd::setDirName(QString dir){ void Klamd::setDirName(TQString dir){
// dir_combo->setEditText(dir); // dir_combo->setEditText(dir);
dir_combo->setURL(dir); dir_combo->setURL(dir);
} }
@ -433,7 +433,7 @@ void Klamd::slotAddIncludeDir()
{ {
KURL filepattern = m_fileTreeView->currentURL(); KURL filepattern = m_fileTreeView->currentURL();
QString filepa = filepattern.path(); TQString filepa = filepattern.path();
if(filepa) if(filepa)
if ((includePaths.contains(filepa) == 0) && (excludePaths.contains(filepa) == 0)){ if ((includePaths.contains(filepa) == 0) && (excludePaths.contains(filepa) == 0)){
sessionslb->insertItem(filepa); sessionslb->insertItem(filepa);
@ -482,7 +482,7 @@ void Klamd::slotAddExcludeDir()
//KFileTreeViewItem* treeItem = dynamic_cast<KFileTreeViewItem*>(KFileTreeViewItem::currentKFileTreeViewItem()); //KFileTreeViewItem* treeItem = dynamic_cast<KFileTreeViewItem*>(KFileTreeViewItem::currentKFileTreeViewItem());
KURL filepattern = m_fileTreeView2->currentURL(); KURL filepattern = m_fileTreeView2->currentURL();
QString filepa = filepattern.path(); TQString filepa = filepattern.path();
if(filepa) if(filepa)
if ((includePaths.contains(filepa) == 0) && (excludePaths.contains(filepa) == 0)){ if ((includePaths.contains(filepa) == 0) && (excludePaths.contains(filepa) == 0)){
sessionslb2->insertItem(filepa); sessionslb2->insertItem(filepa);
@ -537,30 +537,30 @@ void Klamd::writeConf()
//config = KGlobal::config(); //config = KGlobal::config();
config->setGroup("Kuarantine"); config->setGroup("Kuarantine");
QStringList lastQuarLocations = config->readListEntry("KuarantineLocations"); TQStringList lastQuarLocations = config->readListEntry("KuarantineLocations");
QString quarloc; TQString quarloc;
for (QStringList::Iterator ita = lastQuarLocations.begin(); ita == lastQuarLocations.begin() ; ita++){ for (TQStringList::Iterator ita = lastQuarLocations.begin(); ita == lastQuarLocations.begin() ; ita++){
quarloc = *ita; quarloc = *ita;
} }
QString db = kmain->freshklam->getCurrentDBDir(); TQString db = kmain->freshklam->getCurrentDBDir();
//tf->setAutoDelete(TRUE); //tf->setAutoDelete(TRUE);
tempFileName = tf.name(); tempFileName = tf.name();
QTextStream &ts = *(tf.textStream()); TQTextStream &ts = *(tf.textStream());
for ( QListBoxItem *bi = sessionslb->firstItem() ; bi != 0; bi = bi->next() ) for ( TQListBoxItem *bi = sessionslb->firstItem() ; bi != 0; bi = bi->next() )
ts << "ClamukoIncludePath " << bi->text() << "\n"; ts << "ClamukoIncludePath " << bi->text() << "\n";
ts << "ClamukoExcludePath " <<quarloc << "\n"; ts << "ClamukoExcludePath " <<quarloc << "\n";
for ( QListBoxItem *bi = sessionslb2->firstItem() ; bi != 0; bi = bi->next() ) for ( TQListBoxItem *bi = sessionslb2->firstItem() ; bi != 0; bi = bi->next() )
ts << "ClamukoExcludePath " << bi->text() << "\n"; ts << "ClamukoExcludePath " << bi->text() << "\n";
config->setGroup("Klamd"); config->setGroup("Klamd");
@ -577,7 +577,7 @@ void Klamd::writeConf()
ts << "ScanArchive" << "\n"; ts << "ScanArchive" << "\n";
ts << "FixStaleSocket" << "\n"; ts << "FixStaleSocket" << "\n";
ts << "SelfCheck 1800" << "\n"; ts << "SelfCheck 1800" << "\n";
ts << QString("DatabaseDirectory %1").arg(db) << "\n"; ts << TQString("DatabaseDirectory %1").arg(db) << "\n";
ts << "ClamukoScanOnLine" << "\n"; ts << "ClamukoScanOnLine" << "\n";
if (KlamavConfig::executed()) if (KlamavConfig::executed())
@ -592,7 +592,7 @@ void Klamd::writeConf()
ts << "ScanArchive True" << "\n"; ts << "ScanArchive True" << "\n";
ts << "FixStaleSocket True" << "\n"; ts << "FixStaleSocket True" << "\n";
ts << "SelfCheck 1800" << "\n"; ts << "SelfCheck 1800" << "\n";
ts << QString("DatabaseDirectory %1").arg(db) << "\n"; ts << TQString("DatabaseDirectory %1").arg(db) << "\n";
ts << "ClamukoScanOnAccess True" << "\n"; ts << "ClamukoScanOnAccess True" << "\n";
if (KlamavConfig::executed()) if (KlamavConfig::executed())
@ -605,39 +605,39 @@ void Klamd::writeConf()
ts << "ClamukoScanOnClose True" << "\n"; ts << "ClamukoScanOnClose True" << "\n";
} }
QString curtex = check_combo->currentText(); TQString curtex = check_combo->currentText();
ts << "ClamukoMaxFileSize " << curtex << "M\n"; ts << "ClamukoMaxFileSize " << curtex << "M\n";
tf.close(); tf.close();
} }
void Klamd::Quarantine(QString fname, QString virusname){ void Klamd::Quarantine(TQString fname, TQString virusname){
//config = KGlobal::config(); //config = KGlobal::config();
config->setGroup("Kuarantine"); config->setGroup("Kuarantine");
//object.replace("Clamuko:",""); //object.replace("Clamuko:","");
//object = object.stripWhiteSpace(); //object = object.stripWhiteSpace();
////kdDebug() << object << endl; ////kdDebug() << object << endl;
//QString QuarLocation = config->readEntry("KuarantineLocations"); //TQString QuarLocation = config->readEntry("KuarantineLocations");
QStringList lastQuarLocations = config->readListEntry("KuarantineLocations"); TQStringList lastQuarLocations = config->readListEntry("KuarantineLocations");
QString quarloc; TQString quarloc;
for (QStringList::Iterator it = lastQuarLocations.begin(); it == lastQuarLocations.begin() ; it++){ for (TQStringList::Iterator it = lastQuarLocations.begin(); it == lastQuarLocations.begin() ; it++){
quarloc = *it; quarloc = *it;
} }
lastQuarItems = config->readListEntry(QString("Items %1").arg(quarloc)); lastQuarItems = config->readListEntry(TQString("Items %1").arg(quarloc));
if (!(fname.isEmpty())){ if (!(fname.isEmpty())){
QDate today = QDate::currentDate(); TQDate today = TQDate::currentDate();
QTime now = QTime::currentTime(); TQTime now = TQTime::currentTime();
QString suffix = QString(":%1 %2") TQString suffix = TQString(":%1 %2")
.arg(today.toString("ddd MMMM d yyyy")) .arg(today.toString("ddd MMMM d yyyy"))
.arg(now.toString("hh-mm-ss ap")); .arg(now.toString("hh-mm-ss ap"));
QString object = fname + ": " + virusname + suffix; TQString object = fname + ": " + virusname + suffix;
QStringList tokens = QStringList::split ( "/", fname, FALSE ); TQStringList tokens = TQStringList::split ( "/", fname, FALSE );
QString qname = tokens.last(); TQString qname = tokens.last();
qname.prepend("/"); qname.prepend("/");
qname.prepend(quarloc); qname.prepend(quarloc);
qname.append(suffix); qname.append(suffix);
@ -646,7 +646,7 @@ void Klamd::Quarantine(QString fname, QString virusname){
//kdDebug() << qname << endl; //kdDebug() << qname << endl;
//kdDebug() << object << endl; //kdDebug() << object << endl;
if (rename ((const char *)fname, (const char *)qname) != 0){ if (rename ((const char *)fname, (const char *)qname) != 0){
QString suCommand=QString("mv '%1' '%2'").arg(fname).arg(qname); TQString suCommand=TQString("mv '%1' '%2'").arg(fname).arg(qname);
//kdDebug() << suCommand << endl; //kdDebug() << suCommand << endl;
proc = new KProcIO(); proc = new KProcIO();
proc->setUseShell(TRUE); proc->setUseShell(TRUE);
@ -667,7 +667,7 @@ void Klamd::Quarantine(QString fname, QString virusname){
}else{ }else{
if (recursive_box1->isChecked()) if (recursive_box1->isChecked())
KMessageBox::queuedMessageBox(0, KMessageBox::Information, i18n("<p>Infected file found: <br><br>Filename: <b>%1</b> <br>Virus found: <b>%2</b> <br><br>I'm going to quarantine this file. You can restore it later if you want.<br></p>").arg(fname).arg(QString(virusname).replace("FOUND","")), KMessageBox::queuedMessageBox(0, KMessageBox::Information, i18n("<p>Infected file found: <br><br>Filename: <b>%1</b> <br>Virus found: <b>%2</b> <br><br>I'm going to quarantine this file. You can restore it later if you want.<br></p>").arg(fname).arg(TQString(virusname).replace("FOUND","")),
//i18n( "Infected File Found!" ), //i18n( "Infected File Found!" ),
//i18n( "Quarantine" ) //i18n( "Quarantine" )
0); 0);
@ -680,7 +680,7 @@ void Klamd::Quarantine(QString fname, QString virusname){
}else{ }else{
//kdDebug() << "rename worked" << endl; //kdDebug() << "rename worked" << endl;
if (recursive_box1->isChecked()) if (recursive_box1->isChecked())
KMessageBox::queuedMessageBox(0, KMessageBox::Information, i18n("<p>Infected file found: <br><br>Filename: <b>%1</b> <br>Virus found: <b>%2</b> <br><br>I'm going to quarantine this file. You can restore it later if you want.<br> If the file already exists in the quarantine directory it will be overwritten.</p>").arg(fname).arg(QString(virusname).replace("FOUND","")), KMessageBox::queuedMessageBox(0, KMessageBox::Information, i18n("<p>Infected file found: <br><br>Filename: <b>%1</b> <br>Virus found: <b>%2</b> <br><br>I'm going to quarantine this file. You can restore it later if you want.<br> If the file already exists in the quarantine directory it will be overwritten.</p>").arg(fname).arg(TQString(virusname).replace("FOUND","")),
//i18n( "Infected File Found!" ), //i18n( "Infected File Found!" ),
//i18n( "Quarantine" ) //i18n( "Quarantine" )
0); 0);
@ -692,7 +692,7 @@ void Klamd::Quarantine(QString fname, QString virusname){
} }
} }
config->writeEntry(QString("Items %1").arg(quarloc), lastQuarItems); config->writeEntry(TQString("Items %1").arg(quarloc), lastQuarItems);
//config->sync(); //config->sync();
//kmain->kuarantine->refresh(); //kmain->kuarantine->refresh();
@ -705,7 +705,7 @@ void Klamd::receivedmvOutput(KProcIO *)
mvbuffer = ""; mvbuffer = "";
proc->readln(mvbuffer); proc->readln(mvbuffer);
bufmv += QString(mvbuffer); bufmv += TQString(mvbuffer);
} }
@ -714,9 +714,9 @@ int Klamd::runDazuko(bool caller){
dazukoLoaded = FALSE; dazukoLoaded = FALSE;
QString lsmodCommand="lsmod"; TQString lsmodCommand="lsmod";
lsmodproc = new KProcIO(); lsmodproc = new KProcIO();
QString curpath = (QString) getenv("PATH"); TQString curpath = (TQString) getenv("PATH");
lsmodproc->setEnvironment("PATH",curpath + ":/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin"); lsmodproc->setEnvironment("PATH",curpath + ":/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin");
@ -767,12 +767,12 @@ void Klamd::loadKlamd()
klamdAlive = TRUE; klamdAlive = TRUE;
//QString suCommand=QString("kdesu -t -c '" +clamdcommand+" -c '%1'").arg(tempFileName)+"'"; //TQString suCommand=TQString("kdesu -t -c '" +clamdcommand+" -c '%1'").arg(tempFileName)+"'";
QString suCommand=QString(clamdcommand+" -c '%1'").arg(tempFileName); TQString suCommand=TQString(clamdcommand+" -c '%1'").arg(tempFileName);
childproc = new KProcIO(); childproc = new KProcIO();
childproc->setUseShell(TRUE); childproc->setUseShell(TRUE);
childproc->setUsePty (KProcIO::Stdout,TRUE); childproc->setUsePty (KProcIO::Stdout,TRUE);
QString curpath = (QString) getenv("PATH"); TQString curpath = (TQString) getenv("PATH");
childproc->setEnvironment("PATH",curpath + ":/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin"); childproc->setEnvironment("PATH",curpath + ":/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin");
kdDebug() << suCommand << endl; kdDebug() << suCommand << endl;
@ -814,15 +814,15 @@ void Klamd::loadDazuko()
// return; // return;
// } // }
// //
// QString release = QString(info.release); // TQString release = TQString(info.release);
// //
// //kdDebug() << release << endl; // //kdDebug() << release << endl;
// QString insmodCommand="insmod /lib/modules/" + release + "/dazuko.o"; // TQString insmodCommand="insmod /lib/modules/" + release + "/dazuko.o";
QString insmodCommand="modprobe dazuko"; TQString insmodCommand="modprobe dazuko";
//QString insmodCommand="insmod /opt/kde/bin/dazuko.o"; //TQString insmodCommand="insmod /opt/kde/bin/dazuko.o";
KProcIO *insmodproc = new KProcIO(); KProcIO *insmodproc = new KProcIO();
QString curpath = (QString) getenv("PATH"); TQString curpath = (TQString) getenv("PATH");
insmodproc->setEnvironment("PATH",curpath + ":/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin"); insmodproc->setEnvironment("PATH",curpath + ":/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin");
insmodproc->setUseShell(TRUE); insmodproc->setUseShell(TRUE);
@ -861,7 +861,7 @@ void Klamd::lsmodCheck()
void Klamd::checkForDazuko() void Klamd::checkForDazuko()
{ {
QString item = ""; TQString item = "";
int pos; int pos;
pos = lsmodproc->readln(item,TRUE); pos = lsmodproc->readln(item,TRUE);
//KMessageBox::information (this,item); //KMessageBox::information (this,item);
@ -880,7 +880,7 @@ void Klamd::restoreKlamd(){
config = KGlobal::config(); config = KGlobal::config();
config->setGroup("Klamd"); config->setGroup("Klamd");
QString RunKlamd = config->readEntry("Enabled"); TQString RunKlamd = config->readEntry("Enabled");
if (RunKlamd == "Yes"){ if (RunKlamd == "Yes"){
startKlamd(); startKlamd();
@ -918,7 +918,7 @@ bool Klamd::isKlamdAlive(){
} }
QString Klamd::getKlamdConfFile(){ TQString Klamd::getKlamdConfFile(){
return tempFileName; return tempFileName;
} }
@ -927,7 +927,7 @@ void Klamd::slotAdvOptions(){
/* config = KGlobal::config(); /* config = KGlobal::config();
config->setGroup("Klamd"); config->setGroup("Klamd");
QString RunKlamd = config->readEntry("Enabled"); TQString RunKlamd = config->readEntry("Enabled");
KlamdOptions *dialog = new KlamdOptions( this, "settings"); KlamdOptions *dialog = new KlamdOptions( this, "settings");

@ -11,8 +11,8 @@
#include <kapplication.h> #include <kapplication.h>
#include <kmainwindow.h> #include <kmainwindow.h>
#include <qlistview.h> #include <tqlistview.h>
#include <qlistbox.h> #include <tqlistbox.h>
#include "kfiletreeview.h" #include "kfiletreeview.h"
@ -20,12 +20,12 @@
class KPrinter; class KPrinter;
class KToggleAction; class KToggleAction;
class KURL; class KURL;
class QLineEdit; class TQLineEdit;
class QComboBox; class TQComboBox;
class QCheckBox; class TQCheckBox;
class QListBox; class TQListBox;
class QPushButton; class TQPushButton;
class QLabel; class TQLabel;
class KProcess; class KProcess;
class KConfig; class KConfig;
class KURLRequester; class KURLRequester;
@ -34,11 +34,11 @@ class KArrowButton;
class KProcIO; class KProcIO;
class KSystemTray; class KSystemTray;
class MyListBox : public QListBox class MyListBox : public TQListBox
{ {
public: public:
MyListBox(QWidget *parent) : QListBox(parent) {} MyListBox(TQWidget *parent) : TQListBox(parent) {}
bool isItemVisible(int id) { return itemVisible(id); } bool isItemVisible(int id) { return itemVisible(id); }
}; };
@ -50,14 +50,14 @@ public:
* @author $AUTHOR <$EMAIL> * @author $AUTHOR <$EMAIL>
* @version $APP_VERSION * @version $APP_VERSION
*/ */
class Klamd : public QWidget class Klamd : public TQWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
/** /**
* Default Constructor * Default Constructor
*/ */
Klamd(QWidget *parent, const char *name=0); Klamd(TQWidget *parent, const char *name=0);
/** /**
* Default Destructor * Default Destructor
@ -67,9 +67,9 @@ public:
/** /**
* Use this method to load whatever file/URL you have * Use this method to load whatever file/URL you have
*/ */
void setDirName(QString); void setDirName(TQString);
bool isKlamdAlive(); bool isKlamdAlive();
QString getKlamdConfFile(); TQString getKlamdConfFile();
public slots: public slots:
bool startKlamd(); bool startKlamd();
@ -77,10 +77,10 @@ public slots:
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:
/** /**
@ -111,7 +111,7 @@ private:
signals: signals:
void itemSelected(QString abs_filename, int line); void itemSelected(TQString abs_filename, int line);
@ -120,14 +120,14 @@ private slots:
//void templateActivated(int index); //void templateActivated(int index);
void childExited(); void childExited();
void receivedOutput(KProcIO *); void receivedOutput(KProcIO *);
//void itemSelected(const QString&); //void itemSelected(const TQString&);
void slotClear(); void slotClear();
void slotAddIncludeDir(); void slotAddIncludeDir();
void slotAddExcludeDir(); void slotAddExcludeDir();
void slotDelIncludeDir(); void slotDelIncludeDir();
void slotDelExcludeDir(); void slotDelExcludeDir();
void writeConf(); void writeConf();
void Quarantine(QString fname, QString virusname); void Quarantine(TQString fname, TQString virusname);
void restoreKlamd(); void restoreKlamd();
void handleChecks(); void handleChecks();
void checkForDazuko(); void checkForDazuko();
@ -138,7 +138,7 @@ private slots:
void receivedmvOutput(KProcIO *); void receivedmvOutput(KProcIO *);
void slotAdvOptions(); void slotAdvOptions();
//void patternTextChanged( const QString &); //void patternTextChanged( const TQString &);
private: private:
void processOutput(); void processOutput();
void finish(); void finish();
@ -147,23 +147,23 @@ private:
void loadKlamd(); void loadKlamd();
void enableInputs(); void enableInputs();
void disableInputs(); void disableInputs();
QLineEdit *template_edit; TQLineEdit *template_edit;
QComboBox *files_combo, *pattern_combo/*, *dir_combo*/; TQComboBox *files_combo, *pattern_combo/*, *dir_combo*/;
KURLRequester *dir_combo; KURLRequester *dir_combo;
QCheckBox *recursive_box; TQCheckBox *recursive_box;
QCheckBox *recursive_box1; TQCheckBox *recursive_box1;
QCheckBox *recursive_box2; TQCheckBox *recursive_box2;
QListBox *resultbox; TQListBox *resultbox;
QLabel *status_label, *matches_label; TQLabel *status_label, *matches_label;
KProcIO *childproc; KProcIO *childproc;
KProcIO *proc; KProcIO *proc;
KProcIO *lsmodproc; KProcIO *lsmodproc;
QString buf, bufmv, mvbuffer; TQString buf, bufmv, mvbuffer;
KConfig* config; KConfig* config;
QStringList lastSearchItems; TQStringList lastSearchItems;
QStringList lastSearchPaths; TQStringList lastSearchPaths;
QStringList lastQuarItems; TQStringList lastQuarItems;
QListView* table; TQListView* table;
MyListBox *sessionslb; MyListBox *sessionslb;
KArrowButton *btnup, *btndown; KArrowButton *btnup, *btndown;
KFileTreeView* m_fileTreeView; KFileTreeView* m_fileTreeView;
@ -172,23 +172,23 @@ private:
KArrowButton *btnup2, *btndown2; KArrowButton *btnup2, *btndown2;
KFileTreeView* m_fileTreeView2; KFileTreeView* m_fileTreeView2;
KFileTreeBranch* treeBranch2; KFileTreeBranch* treeBranch2;
QString tempFileName; TQString tempFileName;
QComboBox *check_combo; TQComboBox *check_combo;
QComboBox *check_combo2; TQComboBox *check_combo2;
QString item2; TQString item2;
QStringList includePaths; TQStringList includePaths;
QStringList excludePaths; TQStringList excludePaths;
bool dazukoLoaded; bool dazukoLoaded;
bool klamdAlive; bool klamdAlive;
QWidget *parent; TQWidget *parent;
QString tmpit; TQString tmpit;
QString clamdcommand; TQString clamdcommand;
//QPushButton *adv_options; //TQPushButton *adv_options;
QWidget *hlp; TQWidget *hlp;
QWidget *hlp2; TQWidget *hlp2;
QWidget *hlp3; TQWidget *hlp3;
public: public:
QPushButton *search_button, *cancel_button; TQPushButton *search_button, *cancel_button;
}; };

@ -9,18 +9,18 @@
#include "klamdoptions.h" #include "klamdoptions.h"
#include <qvariant.h> #include <tqvariant.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <kpushbutton.h> #include <kpushbutton.h>
#include <kdialog.h> #include <kdialog.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include <qgroupbox.h> #include <tqgroupbox.h>
#include <qcombobox.h> #include <tqcombobox.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <qlabel.h> #include <tqlabel.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qtooltip.h> #include <tqtooltip.h>
#include <qwhatsthis.h> #include <tqwhatsthis.h>
#include <kconfig.h> #include <kconfig.h>
#include <klocale.h> #include <klocale.h>
@ -40,77 +40,77 @@ const char *check_desc3[] = {
* The dialog will by default be modeless, unless you set 'modal' to * The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog. * TRUE to construct a modal dialog.
*/ */
KlamdOptions::KlamdOptions( QWidget* parent, const char* name, bool modal, WFlags fl ) KlamdOptions::KlamdOptions( TQWidget* parent, const char* name, bool modal, WFlags fl )
: QDialog( parent, name, modal, fl ) : TQDialog( parent, name, modal, fl )
{ {
if ( !name ) if ( !name )
setName( "KlamdOptions" ); setName( "KlamdOptions" );
setModal( TRUE ); setModal( TRUE );
OK = new KPushButton( this, "OK" ); OK = new KPushButton( this, "OK" );
OK->setGeometry( QRect( 80, 220, 86, 31 ) ); OK->setGeometry( TQRect( 80, 220, 86, 31 ) );
OK->setDefault( TRUE ); OK->setDefault( TRUE );
connect( OK, SIGNAL(clicked()), connect( OK, SIGNAL(clicked()),
SLOT(updateSettings()) ); SLOT(updateSettings()) );
Cancel = new KPushButton( this, "Cancel" ); Cancel = new KPushButton( this, "Cancel" );
Cancel->setGeometry( QRect( 180, 220, 86, 31 ) ); Cancel->setGeometry( TQRect( 180, 220, 86, 31 ) );
Cancel->setDefault( FALSE ); Cancel->setDefault( FALSE );
connect( Cancel, SIGNAL(clicked()), connect( Cancel, SIGNAL(clicked()),
SLOT(close()) ); SLOT(close()) );
AdvOptions = new KDialog( this, "AdvOptions" ); AdvOptions = new KDialog( this, "AdvOptions" );
AdvOptions->setGeometry( QRect( 590, 470, 20, 20 ) ); AdvOptions->setGeometry( TQRect( 590, 470, 20, 20 ) );
QWidget* privateLayoutWidget = new QWidget( this, "layout7" ); TQWidget* privateLayoutWidget = new TQWidget( this, "layout7" );
privateLayoutWidget->setGeometry( QRect( 10, 10, 333, 200 ) ); privateLayoutWidget->setGeometry( TQRect( 10, 10, 333, 200 ) );
layout7 = new QGridLayout( privateLayoutWidget, 1, 1, 11, 6, "layout7"); layout7 = new TQGridLayout( privateLayoutWidget, 1, 1, 11, 6, "layout7");
Archives = new QGroupBox( privateLayoutWidget, "Archives" ); Archives = new TQGroupBox( privateLayoutWidget, "Archives" );
MaxSize = new QComboBox( FALSE, Archives, "MaxSize" ); MaxSize = new TQComboBox( FALSE, Archives, "MaxSize" );
MaxSize->insertStrList(check_desc3); MaxSize->insertStrList(check_desc3);
MaxSize->adjustSize(); MaxSize->adjustSize();
MaxSize->setGeometry( QRect( 170, 20, 40, 21 ) ); MaxSize->setGeometry( TQRect( 170, 20, 40, 21 ) );
ScanArchives = new QCheckBox( Archives, "ScanArchives" ); ScanArchives = new TQCheckBox( Archives, "ScanArchives" );
ScanArchives->setGeometry( QRect( 20, 20, 150, 21 ) ); ScanArchives->setGeometry( TQRect( 20, 20, 150, 21 ) );
connect( ScanArchives, SIGNAL(toggled(bool)),MaxSize, connect( ScanArchives, SIGNAL(toggled(bool)),MaxSize,
SLOT(setEnabled(bool)) ); SLOT(setEnabled(bool)) );
textLabel1 = new QLabel( Archives, "textLabel1" ); textLabel1 = new TQLabel( Archives, "textLabel1" );
textLabel1->setGeometry( QRect( 230, 20, 70, 21 ) ); textLabel1->setGeometry( TQRect( 230, 20, 70, 21 ) );
layout7->addWidget( Archives, 1, 0 ); layout7->addWidget( Archives, 1, 0 );
ScanFilesWhen = new QGroupBox( privateLayoutWidget, "ScanFilesWhen" ); ScanFilesWhen = new TQGroupBox( privateLayoutWidget, "ScanFilesWhen" );
QWidget* privateLayoutWidget_2 = new QWidget( ScanFilesWhen, "layout6" ); TQWidget* privateLayoutWidget_2 = new TQWidget( ScanFilesWhen, "layout6" );
privateLayoutWidget_2->setGeometry( QRect( 20, 20, 140, 60 ) ); privateLayoutWidget_2->setGeometry( TQRect( 20, 20, 140, 60 ) );
layout6 = new QGridLayout( privateLayoutWidget_2, 1, 1, 11, 6, "layout6"); layout6 = new TQGridLayout( privateLayoutWidget_2, 1, 1, 11, 6, "layout6");
Created = new QCheckBox( privateLayoutWidget_2, "Created" ); Created = new TQCheckBox( privateLayoutWidget_2, "Created" );
layout6->addWidget( Created, 0, 0 ); layout6->addWidget( Created, 0, 0 );
connect( Created, SIGNAL(clicked()), connect( Created, SIGNAL(clicked()),
SLOT(warn()) ); SLOT(warn()) );
Executed = new QCheckBox( privateLayoutWidget_2, "Executed" ); Executed = new TQCheckBox( privateLayoutWidget_2, "Executed" );
layout6->addWidget( Executed, 2, 0 ); layout6->addWidget( Executed, 2, 0 );
QWidget* privateLayoutWidget_3 = new QWidget( ScanFilesWhen, "layout7" ); TQWidget* privateLayoutWidget_3 = new TQWidget( ScanFilesWhen, "layout7" );
privateLayoutWidget_3->setGeometry( QRect( 181, 20, 90, 60 ) ); privateLayoutWidget_3->setGeometry( TQRect( 181, 20, 90, 60 ) );
layout7_2 = new QGridLayout( privateLayoutWidget_3, 1, 1, 11, 6, "layout7_2"); layout7_2 = new TQGridLayout( privateLayoutWidget_3, 1, 1, 11, 6, "layout7_2");
Opened = new QCheckBox( privateLayoutWidget_3, "Opened" ); Opened = new TQCheckBox( privateLayoutWidget_3, "Opened" );
layout7_2->addWidget( Opened, 0, 0 ); layout7_2->addWidget( Opened, 0, 0 );
Closed = new QCheckBox( privateLayoutWidget_3, "Closed" ); Closed = new TQCheckBox( privateLayoutWidget_3, "Closed" );
layout7_2->addWidget( Closed, 1, 0 ); layout7_2->addWidget( Closed, 1, 0 );
@ -121,7 +121,7 @@ KlamdOptions::KlamdOptions( QWidget* parent, const char* name, bool modal, WFlag
layout7->addWidget( ScanFilesWhen, 0, 0 ); layout7->addWidget( ScanFilesWhen, 0, 0 );
languageChange(); languageChange();
resize( QSize(351, 270).expandedTo(minimumSizeHint()) ); resize( TQSize(351, 270).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished ); clearWState( WState_Polished );
fetchSettings(); fetchSettings();
@ -132,7 +132,7 @@ KlamdOptions::KlamdOptions( QWidget* parent, const char* name, bool modal, WFlag
*/ */
KlamdOptions::~KlamdOptions() KlamdOptions::~KlamdOptions()
{ {
// no need to delete child widgets, Qt does it all for us // no need to delete child widgets, TQt does it all for us
} }
/* /*

@ -10,41 +10,41 @@
#ifndef KLAMDOPTIONS_H #ifndef KLAMDOPTIONS_H
#define KLAMDOPTIONS_H #define KLAMDOPTIONS_H
#include <qvariant.h> #include <tqvariant.h>
#include <qdialog.h> #include <tqdialog.h>
class QVBoxLayout; class TQVBoxLayout;
class QHBoxLayout; class TQHBoxLayout;
class QGridLayout; class TQGridLayout;
class QSpacerItem; class TQSpacerItem;
class KPushButton; class KPushButton;
class KDialog; class KDialog;
class QGroupBox; class TQGroupBox;
class QComboBox; class TQComboBox;
class QCheckBox; class TQCheckBox;
class QLabel; class TQLabel;
class KConfig; class KConfig;
class KlamdOptions : public QDialog class KlamdOptions : public TQDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
KlamdOptions( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); KlamdOptions( TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~KlamdOptions(); ~KlamdOptions();
KPushButton* OK; KPushButton* OK;
KPushButton* Cancel; KPushButton* Cancel;
KDialog* AdvOptions; KDialog* AdvOptions;
QGroupBox* Archives; TQGroupBox* Archives;
QComboBox* MaxSize; TQComboBox* MaxSize;
QCheckBox* ScanArchives; TQCheckBox* ScanArchives;
QLabel* textLabel1; TQLabel* textLabel1;
QGroupBox* ScanFilesWhen; TQGroupBox* ScanFilesWhen;
QCheckBox* Created; TQCheckBox* Created;
QCheckBox* Executed; TQCheckBox* Executed;
QCheckBox* Opened; TQCheckBox* Opened;
QCheckBox* Closed; TQCheckBox* Closed;
KConfig* config; KConfig* config;
private: private:
@ -55,9 +55,9 @@ private slots:
void warn(); void warn();
protected: protected:
QGridLayout* layout7; TQGridLayout* layout7;
QGridLayout* layout6; TQGridLayout* layout6;
QGridLayout* layout7_2; TQGridLayout* layout7_2;
protected slots: protected slots:
virtual void languageChange(); virtual void languageChange();

@ -20,22 +20,22 @@
#include <ksystemtray.h> #include <ksystemtray.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qlayout.h> #include <tqlayout.h>
#include <kcmdlineargs.h> #include <kcmdlineargs.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include <qtooltip.h> #include <tqtooltip.h>
#include <qtoolbutton.h> #include <tqtoolbutton.h>
#include <dcopclient.h> #include <dcopclient.h>
#include <qdir.h> #include <tqdir.h>
#include <kprogress.h> #include <kprogress.h>
#include <dcopref.h> #include <dcopref.h>
#include <dcopclient.h> #include <dcopclient.h>
using namespace KlamAV; using namespace KlamAV;
Klamscan::Klamscan(QWidget *parent, const char *name) Klamscan::Klamscan(TQWidget *parent, const char *name)
: QWidget(parent, name), DCOPObject( "DCOPKlamscan" ) : TQWidget(parent, name), DCOPObject( "DCOPKlamscan" )
{ {
@ -43,7 +43,7 @@ Klamscan::Klamscan(QWidget *parent, const char *name)
/* scanInProgress = FALSE; /* scanInProgress = FALSE;
multiScan = FALSE; */ multiScan = FALSE; */
setDefaults(); setDefaults();
QBoxLayout *top = new QVBoxLayout(this,10,10); TQBoxLayout *top = new TQVBoxLayout(this,10,10);
tabBrowser = new TabWidget(this); tabBrowser = new TabWidget(this);
@ -53,10 +53,10 @@ Klamscan::Klamscan(QWidget *parent, const char *name)
/* dblayout->addMultiCellWidget( tabBrowser, 0, 1, 1, 1 );*/ /* dblayout->addMultiCellWidget( tabBrowser, 0, 1, 1, 1 );*/
//QGridLayout *layout = new QGridLayout(this, 6, 3, 10, 4); //TQGridLayout *layout = new TQGridLayout(this, 6, 3, 10, 4);
QWidget* privateLayoutWidget2 = new QWidget( this, "dblayout" ); TQWidget* privateLayoutWidget2 = new TQWidget( this, "dblayout" );
QGridLayout *layout = new QGridLayout(privateLayoutWidget2, 6, 6, 10, 4); TQGridLayout *layout = new TQGridLayout(privateLayoutWidget2, 6, 6, 10, 4);
layout->setColStretch(0, 10); layout->setColStretch(0, 10);
layout->addColSpacing(1, 10); layout->addColSpacing(1, 10);
layout->setColStretch(1, 0); layout->setColStretch(1, 0);
@ -74,12 +74,12 @@ Klamscan::Klamscan(QWidget *parent, const char *name)
KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
QLabel *combo_label = new QLabel(i18n("When a virus is found:"), privateLayoutWidget2); TQLabel *combo_label = new TQLabel(i18n("When a virus is found:"), privateLayoutWidget2);
//combo_label->setFixedSize(combo_label->sizeHint()); //combo_label->setFixedSize(combo_label->sizeHint());
layout->addWidget(combo_label,0,0); layout->addWidget(combo_label,0,0);
combo_label->adjustSize(); combo_label->adjustSize();
check_combo = new QComboBox(false, privateLayoutWidget2); check_combo = new TQComboBox(false, privateLayoutWidget2);
check_combo->insertItem( i18n( "Ask me" ) ); check_combo->insertItem( i18n( "Ask me" ) );
check_combo->insertItem( i18n( "Quarantine file" ) ); check_combo->insertItem( i18n( "Quarantine file" ) );
check_combo->insertItem( i18n( "Just report" ) ); check_combo->insertItem( i18n( "Just report" ) );
@ -88,18 +88,18 @@ Klamscan::Klamscan(QWidget *parent, const char *name)
layout->addWidget(check_combo,0,1); layout->addWidget(check_combo,0,1);
recursive_box = new QCheckBox(i18n("&Scan Folders Recursively"), privateLayoutWidget2); recursive_box = new TQCheckBox(i18n("&Scan Folders Recursively"), privateLayoutWidget2);
recursive_box->setMinimumWidth(recursive_box->sizeHint().width()); recursive_box->setMinimumWidth(recursive_box->sizeHint().width());
recursive_box->setChecked(true); recursive_box->setChecked(true);
// dir_layout2->addSpacing(10); // dir_layout2->addSpacing(10);
layout->addWidget(recursive_box,0,3); layout->addWidget(recursive_box,0,3);
QToolTip::add( recursive_box, i18n( "Scan all directories under the specified path." ) ); TQToolTip::add( recursive_box, i18n( "Scan all directories under the specified path." ) );
QToolButton* schedule = new QToolButton( privateLayoutWidget2,"play" ); TQToolButton* schedule = new TQToolButton( privateLayoutWidget2,"play" );
schedule->setIconSet( SmallIconSet( "xclock" ) ); schedule->setIconSet( SmallIconSet( "xclock" ) );
schedule->setTextLabel(i18n( "Schedule" )); schedule->setTextLabel(i18n( "Schedule" ));
schedule->setTextPosition(QToolButton::Right); schedule->setTextPosition(TQToolButton::Right);
schedule->setUsesTextLabel(true); schedule->setUsesTextLabel(true);
schedule->adjustSize(); schedule->adjustSize();
layout->addWidget(schedule,0,4); layout->addWidget(schedule,0,4);
@ -108,10 +108,10 @@ Klamscan::Klamscan(QWidget *parent, const char *name)
SLOT(slotSchedule()) ); SLOT(slotSchedule()) );
QToolButton* adv_options = new QToolButton( privateLayoutWidget2,"play" ); TQToolButton* adv_options = new TQToolButton( privateLayoutWidget2,"play" );
adv_options->setIconSet( SmallIconSet( "configure" ) ); adv_options->setIconSet( SmallIconSet( "configure" ) );
adv_options->setTextLabel(i18n("Options")); adv_options->setTextLabel(i18n("Options"));
adv_options->setTextPosition(QToolButton::Right); adv_options->setTextPosition(TQToolButton::Right);
adv_options->setUsesTextLabel(true); adv_options->setUsesTextLabel(true);
layout->addWidget(adv_options,0,5); layout->addWidget(adv_options,0,5);
//adv_options->setFixedSize(adv_options->sizeHint()); //adv_options->setFixedSize(adv_options->sizeHint());
@ -127,30 +127,30 @@ Klamscan::Klamscan(QWidget *parent, const char *name)
QHBox* controls = new QHBox(tabBrowser); TQHBox* controls = new TQHBox(tabBrowser);
//controls->setSpacing(5); //controls->setSpacing(5);
controls->setMargin(2); controls->setMargin(2);
play = new QToolButton( controls,"play" ); play = new TQToolButton( controls,"play" );
play->setIconSet( SmallIconSet( "player_play" ) ); play->setIconSet( SmallIconSet( "player_play" ) );
play->setTextLabel(i18n( "Scan" )); play->setTextLabel(i18n( "Scan" ));
play->setTextPosition(QToolButton::Right); play->setTextPosition(TQToolButton::Right);
play->setUsesTextLabel(true); play->setUsesTextLabel(true);
play->adjustSize(); play->adjustSize();
play->setFixedHeight(play->height() - 1); play->setFixedHeight(play->height() - 1);
stop = new QToolButton( controls,"stop" ); stop = new TQToolButton( controls,"stop" );
stop->setIconSet( SmallIconSet( "player_stop" ) ); stop->setIconSet( SmallIconSet( "player_stop" ) );
stop->setTextLabel(i18n( "Stop" )); stop->setTextLabel(i18n( "Stop" ));
stop->setTextPosition(QToolButton::Right); stop->setTextPosition(TQToolButton::Right);
stop->setUsesTextLabel(true); stop->setUsesTextLabel(true);
stop->adjustSize(); stop->adjustSize();
stop->setFixedHeight(stop->height() - 1); stop->setFixedHeight(stop->height() - 1);
m_tabsClose = new QToolButton( controls,"tab_remove" ); m_tabsClose = new TQToolButton( controls,"tab_remove" );
m_tabsClose->setIconSet( SmallIconSet( "tab_remove" ) ); m_tabsClose->setIconSet( SmallIconSet( "tab_remove" ) );
m_tabsClose->setTextLabel(i18n( "Close" )); m_tabsClose->setTextLabel(i18n( "Close" ));
m_tabsClose->setTextPosition(QToolButton::Right); m_tabsClose->setTextPosition(TQToolButton::Right);
m_tabsClose->setUsesTextLabel(true); m_tabsClose->setUsesTextLabel(true);
m_tabsClose->adjustSize(); m_tabsClose->adjustSize();
m_tabsClose->setFixedHeight(m_tabsClose->height() - 1); m_tabsClose->setFixedHeight(m_tabsClose->height() - 1);
@ -174,8 +174,8 @@ Klamscan::Klamscan(QWidget *parent, const char *name)
layout->activate(); layout->activate();
connect(tabBrowser, SIGNAL(currentChanged(QWidget *)),this, connect(tabBrowser, SIGNAL(currentChanged(TQWidget *)),this,
SLOT(slotManageButtons(QWidget *)) ); SLOT(slotManageButtons(TQWidget *)) );
// Register with DCOP // Register with DCOP
@ -206,18 +206,18 @@ void Klamscan::slotScan()
ScanViewer* homepage = new ScanViewer(this, "page"); ScanViewer* homepage = new ScanViewer(this, "page");
connect( homepage, SIGNAL( scanFinished(QWidget *) ), this, connect( homepage, SIGNAL( scanFinished(TQWidget *) ), this,
SLOT( slotManageButtons(QWidget *) ) ); SLOT( slotManageButtons(TQWidget *) ) );
connect( homepage, SIGNAL( scanStartingAgain(QWidget *) ), this, connect( homepage, SIGNAL( scanStartingAgain(TQWidget *) ), this,
SLOT( slotManageButtons(QWidget *) ) ); SLOT( slotManageButtons(TQWidget *) ) );
kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_scanning")); kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_scanning"));
QDate today = QDate::currentDate(); TQDate today = TQDate::currentDate();
QTime now = QTime::currentTime(); TQTime now = TQTime::currentTime();
QString suffix = QString("%1 %2") TQString suffix = TQString("%1 %2")
.arg(today.toString("ddd MMMM d yyyy")) .arg(today.toString("ddd MMMM d yyyy"))
.arg(now.toString("hh:mm ap")); .arg(now.toString("hh:mm ap"));
@ -225,16 +225,16 @@ void Klamscan::slotScan()
tabBrowser->setCurrentPage(tabBrowser->count() - 1); tabBrowser->setCurrentPage(tabBrowser->count() - 1);
//return; //return;
QStringList filepattern; TQStringList filepattern;
KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
if( args->isSet( "scanthis" ) ) { if( args->isSet( "scanthis" ) ) {
listOfUrlsToScan.clear(); listOfUrlsToScan.clear();
for( int i = 0; i < args->count(); i++ ) { for( int i = 0; i < args->count(); i++ ) {
//KMessageBox::information (this,QString(args->arg(i))); //KMessageBox::information (this,TQString(args->arg(i)));
filepattern.append(args->arg(i)); filepattern.append(args->arg(i));
listOfUrlsToScan.prepend(QString(args->arg(i))); listOfUrlsToScan.prepend(TQString(args->arg(i)));
} }
prevdir = listOfUrlsToScan.first(); prevdir = listOfUrlsToScan.first();
@ -242,7 +242,7 @@ void Klamscan::slotScan()
filepattern = pruneSelectedDirs(); filepattern = pruneSelectedDirs();
} }
//kdDebug() << filepattern << endl; //kdDebug() << filepattern << endl;
CollectionDB::instance()->insertEvent("Manual Scan",QString("Commencing Scan"),filepattern.join(" ")); CollectionDB::instance()->insertEvent("Manual Scan",TQString("Commencing Scan"),filepattern.join(" "));
homepage->slotScan(filepattern, check_combo->currentItem(),setup->recursive(),false); homepage->slotScan(filepattern, check_combo->currentItem(),setup->recursive(),false);
@ -267,7 +267,7 @@ void Klamscan::slotAdvOptions(){
void Klamscan::slotSchedule(){ void Klamscan::slotSchedule(){
QStringList filepattern = pruneSelectedDirs(); TQStringList filepattern = pruneSelectedDirs();
if (filepattern.isEmpty()){ if (filepattern.isEmpty()){
@ -341,36 +341,36 @@ void Klamscan::setDefaults(){
} }
void Klamscan::scanURLs(const QString &urls) void Klamscan::scanURLs(const TQString &urls)
{ {
setActiveWindow(); setActiveWindow();
raise(); raise();
kmain->tab->setCurrentPage(0); kmain->tab->setCurrentPage(0);
QString tmpurls = urls; TQString tmpurls = urls;
//urlsToScan = urlsToScan.replace("*"," "); //urlsToScan = urlsToScan.replace("*"," ");
urlsToScan = QStringList::split("*", tmpurls); urlsToScan = TQStringList::split("*", tmpurls);
//for ( QStringList::Iterator it = temp.begin(); it != temp.end(); ++it ) //for ( TQStringList::Iterator it = temp.begin(); it != temp.end(); ++it )
// (*it).sprintf("\"%s\"", (*it).latin1()); // (*it).sprintf("\"%s\"", (*it).latin1());
//urlsToScan = temp; //urlsToScan = temp;
ScanViewer* homepage = new ScanViewer(this, "page"); ScanViewer* homepage = new ScanViewer(this, "page");
connect( homepage, SIGNAL( scanFinished(QWidget *) ), this, connect( homepage, SIGNAL( scanFinished(TQWidget *) ), this,
SLOT( slotManageButtons(QWidget *) ) ); SLOT( slotManageButtons(TQWidget *) ) );
connect( homepage, SIGNAL( scanStartingAgain(QWidget *) ), this, connect( homepage, SIGNAL( scanStartingAgain(TQWidget *) ), this,
SLOT( slotManageButtons(QWidget *) ) ); SLOT( slotManageButtons(TQWidget *) ) );
QDate today = QDate::currentDate(); TQDate today = TQDate::currentDate();
QTime now = QTime::currentTime(); TQTime now = TQTime::currentTime();
QString suffix = QString("%1 %2") TQString suffix = TQString("%1 %2")
.arg(today.toString("ddd MMMM d yyyy")) .arg(today.toString("ddd MMMM d yyyy"))
.arg(now.toString("hh:mm ap")); .arg(now.toString("hh:mm ap"));
tabBrowser->addTab(homepage,suffix); tabBrowser->addTab(homepage,suffix);
tabBrowser->setCurrentPage(tabBrowser->count() - 1); tabBrowser->setCurrentPage(tabBrowser->count() - 1);
CollectionDB::instance()->insertEvent("Manual Scan",QString("Commencing Scan"),urlsToScan.join(" ")); CollectionDB::instance()->insertEvent("Manual Scan",TQString("Commencing Scan"),urlsToScan.join(" "));
homepage->slotScan(urlsToScan, check_combo->currentItem(),setup->recursive(),true); homepage->slotScan(urlsToScan, check_combo->currentItem(),setup->recursive(),true);
@ -419,7 +419,7 @@ void Klamscan::slotRemoveTab(){
} }
} }
void Klamscan::slotManageButtons(QWidget * current){ void Klamscan::slotManageButtons(TQWidget * current){
ScanViewer* cur = static_cast<ScanViewer*>(current); ScanViewer* cur = static_cast<ScanViewer*>(current);
@ -441,17 +441,17 @@ void Klamscan::slotManageButtons(QWidget * current){
} }
QStringList Klamscan::pruneSelectedDirs(){ TQStringList Klamscan::pruneSelectedDirs(){
//This gets rid of redundant sub-directories from the list of dirs to be scanned. //This gets rid of redundant sub-directories from the list of dirs to be scanned.
QStringList filepattern; TQStringList filepattern;
QStringList listOfUrlsToScan = setup->dirs(); TQStringList listOfUrlsToScan = setup->dirs();
listOfUrlsToScan.sort(); listOfUrlsToScan.sort();
QString prev; TQString prev;
QStringList prevdirs; TQStringList prevdirs;
for (QStringList::Iterator it = listOfUrlsToScan.begin(); it != listOfUrlsToScan.end(); it++ ){ for (TQStringList::Iterator it = listOfUrlsToScan.begin(); it != listOfUrlsToScan.end(); it++ ){
//kdDebug() << "dir: " << (*it) << endl; //kdDebug() << "dir: " << (*it) << endl;
(*it) = (*it).stripWhiteSpace() + "/"; (*it) = (*it).stripWhiteSpace() + "/";
if (prevdirs.isEmpty()){ if (prevdirs.isEmpty()){
@ -461,7 +461,7 @@ QStringList Klamscan::pruneSelectedDirs(){
}else{ }else{
filepattern.append(*it); filepattern.append(*it);
bool shouldappend = true; bool shouldappend = true;
for (QStringList::Iterator it2 = prevdirs.begin(); it2 != prevdirs.end(); it2++ ){ for (TQStringList::Iterator it2 = prevdirs.begin(); it2 != prevdirs.end(); it2++ ){
if ((*it).contains(*it2)){ if ((*it).contains(*it2)){
//kdDebug() << (*it) << endl; //kdDebug() << (*it) << endl;
filepattern.remove((*it)); filepattern.remove((*it));

@ -17,21 +17,21 @@
class KPrinter; class KPrinter;
class KToggleAction; class KToggleAction;
class KURL; class KURL;
class QLineEdit; class TQLineEdit;
class QComboBox; class TQComboBox;
class QCheckBox; class TQCheckBox;
class QListBox; class TQListBox;
class QListView; class TQListView;
class QListViewItem; class TQListViewItem;
class QPushButton; class TQPushButton;
class QLabel; class TQLabel;
class KProcess; class KProcess;
class KConfig; class KConfig;
class KURLRequester; class KURLRequester;
class CollectionSetup; class CollectionSetup;
class QToolButton; class TQToolButton;
class QHBoxLayout; class TQHBoxLayout;
class QDir; class TQDir;
namespace KlamAV namespace KlamAV
{ {
@ -46,14 +46,14 @@ namespace KlamAV
* @author $AUTHOR <$EMAIL> * @author $AUTHOR <$EMAIL>
* @version $APP_VERSION * @version $APP_VERSION
*/ */
class Klamscan : public QWidget, virtual public DCOPKlamscan class Klamscan : public TQWidget, virtual public DCOPKlamscan
{ {
Q_OBJECT Q_OBJECT
public: public:
/** /**
* Default Constructor * Default Constructor
*/ */
Klamscan(QWidget *parent, const char *name=0); Klamscan(TQWidget *parent, const char *name=0);
/** /**
* Default Destructor * Default Destructor
@ -64,11 +64,11 @@ public:
* Use this method to load whatever file/URL you have * Use this method to load whatever file/URL you have
*/ */
void setDirName(QString); void setDirName(TQString);
bool isMultiScan(); bool isMultiScan();
protected: protected:
/** /**
* Overridden virtuals for Qt drag 'n drop (XDND) * Overridden virtuals for TQt drag 'n drop (XDND)
*/ */
protected: protected:
@ -96,7 +96,7 @@ private:
signals: signals:
public slots: public slots:
void scanURLs(const QString &urls); void scanURLs(const TQString &urls);
private slots: private slots:
void slotScan(); void slotScan();
void slotAdvOptions(); void slotAdvOptions();
@ -105,32 +105,32 @@ private slots:
void slotStopScanning(); void slotStopScanning();
void slotStartAgain(); void slotStartAgain();
void slotRemoveTab(); void slotRemoveTab();
void slotManageButtons(QWidget *current); void slotManageButtons(TQWidget *current);
private: private:
void setDefaults(); void setDefaults();
QStringList pruneSelectedDirs(); TQStringList pruneSelectedDirs();
QLineEdit *template_edit; TQLineEdit *template_edit;
QComboBox *files_combo, *pattern_combo, *check_combo; TQComboBox *files_combo, *pattern_combo, *check_combo;
QCheckBox *recursive_box; TQCheckBox *recursive_box;
QListView *resultview; TQListView *resultview;
QPushButton *search_button, *cancel_button; TQPushButton *search_button, *cancel_button;
QLabel *status_label, *status2_label,*matches_label,*matches2_label; TQLabel *status_label, *status2_label,*matches_label,*matches2_label;
KProcess *childproc; KProcess *childproc;
QString buf; TQString buf;
KConfig* config; KConfig* config;
bool errorsEncountered; bool errorsEncountered;
QPopupMenu* menu; TQPopupMenu* menu;
QToolButton* adv_options; TQToolButton* adv_options;
QStringList urlsToScan; TQStringList urlsToScan;
QString prevdir; TQString prevdir;
QStringList listOfUrlsToScan; TQStringList listOfUrlsToScan;
bool multi_recursive; bool multi_recursive;
KlamAV::TabWidget* tabBrowser; KlamAV::TabWidget* tabBrowser;
CollectionSetup* setup; CollectionSetup* setup;
QToolButton *m_tabsClose; TQToolButton *m_tabsClose;
QToolButton* play; TQToolButton* play;
QToolButton* stop; TQToolButton* stop;
QHBoxLayout* controls; TQHBoxLayout* controls;
}; };

@ -17,14 +17,14 @@
class KPrinter; class KPrinter;
class KToggleAction; class KToggleAction;
class KURL; class KURL;
class QLineEdit; class TQLineEdit;
class QComboBox; class TQComboBox;
class QCheckBox; class TQCheckBox;
class QListBox; class TQListBox;
class QListView; class TQListView;
class QListViewItem; class TQListViewItem;
class QPushButton; class TQPushButton;
class QLabel; class TQLabel;
class KProcess; class KProcess;
class KConfig; class KConfig;
class KURLRequester; class KURLRequester;
@ -38,14 +38,14 @@ class KURLRequester;
* @author $AUTHOR <$EMAIL> * @author $AUTHOR <$EMAIL>
* @version $APP_VERSION * @version $APP_VERSION
*/ */
class Klamscan : public QWidget, virtual public DCOPKlamscan class Klamscan : public TQWidget, virtual public DCOPKlamscan
{ {
Q_OBJECT Q_OBJECT
public: public:
/** /**
* Default Constructor * Default Constructor
*/ */
Klamscan(QWidget *parent, const char *name=0); Klamscan(TQWidget *parent, const char *name=0);
/** /**
* Default Destructor * Default Destructor
@ -56,14 +56,14 @@ public:
* Use this method to load whatever file/URL you have * Use this method to load whatever file/URL you have
*/ */
void setDirName(QString); void setDirName(TQString);
bool isMultiScan(); bool isMultiScan();
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:
/** /**
@ -93,8 +93,8 @@ private slots:
void optionsPreferences(); void optionsPreferences();
void newToolbarConfig(); void newToolbarConfig();
*/ */
//void changeStatusbar(const QString& text); //void changeStatusbar(const TQString& text);
//void changeCaption(const QString& text); //void changeCaption(const TQString& text);
private: private:
void setupAccel(); void setupAccel();
@ -108,27 +108,27 @@ private:
KToggleAction *m_statusbarAction;*/ KToggleAction *m_statusbarAction;*/
signals: signals:
void itemSelected(QString abs_filename, int line); void itemSelected(TQString abs_filename, int line);
public slots: public slots:
void scanURLs(const QString &urls); void scanURLs(const TQString &urls);
void resetMultiScan( QMouseEvent * e); void resetMultiScan( TQMouseEvent * e);
private slots: private slots:
//void dirButtonClicked(); //void dirButtonClicked();
//void templateActivated(int index); //void templateActivated(int index);
void childExited(); void childExited();
void receivedOutput(KProcess *proc, char *buffer, int buflen); void receivedOutput(KProcess *proc, char *buffer, int buflen);
//void itemSelected(const QString&); //void itemSelected(const TQString&);
void slotSearch(); void slotSearch();
void slotCancel(); void slotCancel();
void slotClear(); void slotClear();
void slotRMB( QListViewItem *, const QPoint &, int ); void slotRMB( TQListViewItem *, const TQPoint &, int );
void slotQuarantineSelected(); void slotQuarantineSelected();
void slotAdvOptions(); void slotAdvOptions();
void slotSchedule(); void slotSchedule();
void slotVirusPool(); void slotVirusPool();
void slotGoogle(); void slotGoogle();
//void patternTextChanged( const QString &); //void patternTextChanged( const TQString &);
private: private:
void processOutput(); void processOutput();
void finish(); void finish();
@ -136,32 +136,32 @@ private:
void Quarantine(); void Quarantine();
void askUser(); void askUser();
void setDefaults(); void setDefaults();
QLineEdit *template_edit; TQLineEdit *template_edit;
QComboBox *files_combo, *pattern_combo, *check_combo; TQComboBox *files_combo, *pattern_combo, *check_combo;
KComboBox *dir_combo; KComboBox *dir_combo;
QCheckBox *recursive_box; TQCheckBox *recursive_box;
QCheckBox *recursive_box2; TQCheckBox *recursive_box2;
QListView *resultview; TQListView *resultview;
QPushButton *search_button, *cancel_button; TQPushButton *search_button, *cancel_button;
QLabel *status_label, *status2_label,*matches_label,*matches2_label; TQLabel *status_label, *status2_label,*matches_label,*matches2_label;
KProcess *childproc; KProcess *childproc;
QString buf; TQString buf;
KConfig* config; KConfig* config;
QStringList lastSearchItems; TQStringList lastSearchItems;
QStringList lastScanPaths; TQStringList lastScanPaths;
QStringList lastQuarItems; TQStringList lastQuarItems;
QStringList QuarantineList; TQStringList QuarantineList;
bool errorsEncountered; bool errorsEncountered;
QPopupMenu* menu; TQPopupMenu* menu;
QPushButton* adv_options; TQPushButton* adv_options;
QPushButton* schedule; TQPushButton* schedule;
QString selectedVirus; TQString selectedVirus;
bool multiScan; bool multiScan;
QString urlsToScan; TQString urlsToScan;
bool scanInProgress; bool scanInProgress;
QString prevdir; TQString prevdir;
QStringList listOfUrlsToScan; TQStringList listOfUrlsToScan;
void updateScanPaths(const QStringList &paths); void updateScanPaths(const TQStringList &paths);
bool multi_recursive; bool multi_recursive;
}; };

@ -9,10 +9,10 @@
#include "klamscanoptions.h" #include "klamscanoptions.h"
#include <qlabel.h> #include <tqlabel.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <qbuttongroup.h> #include <tqbuttongroup.h>
#include <kurlrequester.h> #include <kurlrequester.h>
#include <kconfig.h> #include <kconfig.h>
#include <kcombobox.h> #include <kcombobox.h>
@ -25,152 +25,152 @@
* The dialog will by default be modeless, unless you set 'modal' to * The dialog will by default be modeless, unless you set 'modal' to
* TRUE to construct a modal dialog. * TRUE to construct a modal dialog.
*/ */
KlamscanOptions::KlamscanOptions( QWidget* parent, const char* name, bool modal, WFlags fl ) KlamscanOptions::KlamscanOptions( TQWidget* parent, const char* name, bool modal, WFlags fl )
: QDialog( parent, name, modal, fl ) : TQDialog( parent, name, modal, fl )
{ {
if ( !name ) if ( !name )
setName( "KlamscanOptions" ); setName( "KlamscanOptions" );
Archive_Support = new QGroupBox( this, "Archive_Support" ); Archive_Support = new TQGroupBox( this, "Archive_Support" );
Archive_Support->setGeometry( QRect( 20, 10, 551, 130 ) ); Archive_Support->setGeometry( TQRect( 20, 10, 551, 130 ) );
textLabel1_2_2 = new QLabel( Archive_Support, "textLabel1_2_2" ); textLabel1_2_2 = new TQLabel( Archive_Support, "textLabel1_2_2" );
textLabel1_2_2->setGeometry( QRect( 13, 52, 222, 21 ) ); textLabel1_2_2->setGeometry( TQRect( 13, 52, 222, 21 ) );
textLabel1_2 = new QLabel( Archive_Support, "textLabel1_2" ); textLabel1_2 = new TQLabel( Archive_Support, "textLabel1_2" );
textLabel1_2->setGeometry( QRect( 314, 19, 222, 21 ) ); textLabel1_2->setGeometry( TQRect( 314, 19, 222, 21 ) );
textLabel1_2_3 = new QLabel( Archive_Support, "textLabel1_2_3" ); textLabel1_2_3 = new TQLabel( Archive_Support, "textLabel1_2_3" );
textLabel1_2_3->setGeometry( QRect( 314, 51, 222, 21 ) ); textLabel1_2_3->setGeometry( TQRect( 314, 51, 222, 21 ) );
textLabel1 = new QLabel( Archive_Support, "textLabel1" ); textLabel1 = new TQLabel( Archive_Support, "textLabel1" );
textLabel1->setGeometry( QRect( 13, 20, 222, 21 ) ); textLabel1->setGeometry( TQRect( 13, 20, 222, 21 ) );
NoFilesToExtract = new QSpinBox(1,999,1, Archive_Support, "NoFilesToExtract" ); NoFilesToExtract = new TQSpinBox(1,999,1, Archive_Support, "NoFilesToExtract" );
NoFilesToExtract->setGeometry( QRect( 240, 20, 40, 21 ) ); NoFilesToExtract->setGeometry( TQRect( 240, 20, 40, 21 ) );
MBsToExtract = new QSpinBox(1,999,1, Archive_Support, "MBsToExtract" ); MBsToExtract = new TQSpinBox(1,999,1, Archive_Support, "MBsToExtract" );
MBsToExtract->setGeometry( QRect( 474, 19, 40, 21 ) ); MBsToExtract->setGeometry( TQRect( 474, 19, 40, 21 ) );
RecursionLevel = new QSpinBox(1,999,1, Archive_Support, "RecursionLevel" ); RecursionLevel = new TQSpinBox(1,999,1, Archive_Support, "RecursionLevel" );
RecursionLevel->setGeometry( QRect( 241, 51, 40, 21 ) ); RecursionLevel->setGeometry( TQRect( 241, 51, 40, 21 ) );
CompressionRatio = new QSpinBox(1,999,1, Archive_Support, "CompressionRatio" ); CompressionRatio = new TQSpinBox(1,999,1, Archive_Support, "CompressionRatio" );
CompressionRatio->setGeometry( QRect( 474, 51, 40, 21 ) ); CompressionRatio->setGeometry( TQRect( 474, 51, 40, 21 ) );
VirusLimitsExceeded = new QCheckBox( Archive_Support, "VirusLimitsExceeded" ); VirusLimitsExceeded = new TQCheckBox( Archive_Support, "VirusLimitsExceeded" );
VirusLimitsExceeded->setGeometry( QRect( 11, 81, 220, 20 ) ); VirusLimitsExceeded->setGeometry( TQRect( 11, 81, 220, 20 ) );
VirusLimitsExceeded->setPaletteForegroundColor( QColor( 255, 0, 0 ) ); VirusLimitsExceeded->setPaletteForegroundColor( TQColor( 255, 0, 0 ) );
VirusEncrypted = new QCheckBox( Archive_Support, "VirusEncrypted" ); VirusEncrypted = new TQCheckBox( Archive_Support, "VirusEncrypted" );
VirusEncrypted->setGeometry( QRect( 318, 82, 220, 20 ) ); VirusEncrypted->setGeometry( TQRect( 318, 82, 220, 20 ) );
VirusEncrypted->setPaletteForegroundColor( QColor( 255, 0, 0 ) ); VirusEncrypted->setPaletteForegroundColor( TQColor( 255, 0, 0 ) );
ArchiveTypes = new QButtonGroup( this, "ArchiveTypes" ); ArchiveTypes = new TQButtonGroup( this, "ArchiveTypes" );
ArchiveTypes->setGeometry( QRect( 20, 150, 551, 320 ) ); ArchiveTypes->setGeometry( TQRect( 20, 150, 551, 320 ) );
ScanZip = new QCheckBox( ArchiveTypes, "ScanZip" ); ScanZip = new TQCheckBox( ArchiveTypes, "ScanZip" );
ScanZip->setGeometry( QRect( 20, 30, 150, 21 ) ); ScanZip->setGeometry( TQRect( 20, 30, 150, 21 ) );
KComboBox* zipUrl = new KComboBox(true, this); KComboBox* zipUrl = new KComboBox(true, this);
ZipUsing = new KURLRequester( zipUrl,ArchiveTypes, "ZipUsing" ); ZipUsing = new KURLRequester( zipUrl,ArchiveTypes, "ZipUsing" );
ZipUsing->setGeometry( QRect( 178, 29, 340, 26 ) ); ZipUsing->setGeometry( TQRect( 178, 29, 340, 26 ) );
ScanRar = new QCheckBox( ArchiveTypes, "ScanRar" ); ScanRar = new TQCheckBox( ArchiveTypes, "ScanRar" );
ScanRar->setGeometry( QRect( 20, 60, 150, 21 ) ); ScanRar->setGeometry( TQRect( 20, 60, 150, 21 ) );
KComboBox* rarUrl = new KComboBox(true, this); KComboBox* rarUrl = new KComboBox(true, this);
RarUsing = new KURLRequester( rarUrl, ArchiveTypes, "RarUsing" ); RarUsing = new KURLRequester( rarUrl, ArchiveTypes, "RarUsing" );
RarUsing->setGeometry( QRect( 178, 59, 340, 26 ) ); RarUsing->setGeometry( TQRect( 178, 59, 340, 26 ) );
ScanArj = new QCheckBox( ArchiveTypes, "ScanArj" ); ScanArj = new TQCheckBox( ArchiveTypes, "ScanArj" );
ScanArj->setGeometry( QRect( 20, 90, 150, 21 ) ); ScanArj->setGeometry( TQRect( 20, 90, 150, 21 ) );
KComboBox* arjUrl = new KComboBox(true, this); KComboBox* arjUrl = new KComboBox(true, this);
ArjUsing = new KURLRequester( arjUrl,ArchiveTypes, "ArjUsing" ); ArjUsing = new KURLRequester( arjUrl,ArchiveTypes, "ArjUsing" );
ArjUsing->setGeometry( QRect( 178, 89, 340, 26 ) ); ArjUsing->setGeometry( TQRect( 178, 89, 340, 26 ) );
ScanZoo = new QCheckBox( ArchiveTypes, "ScanZoo" ); ScanZoo = new TQCheckBox( ArchiveTypes, "ScanZoo" );
ScanZoo->setGeometry( QRect( 20, 120, 150, 21 ) ); ScanZoo->setGeometry( TQRect( 20, 120, 150, 21 ) );
KComboBox* zooUrl = new KComboBox(true, this); KComboBox* zooUrl = new KComboBox(true, this);
ZooUsing = new KURLRequester( zooUrl,ArchiveTypes, "ZooUsing" ); ZooUsing = new KURLRequester( zooUrl,ArchiveTypes, "ZooUsing" );
ZooUsing->setGeometry( QRect( 178, 119, 340, 26 ) ); ZooUsing->setGeometry( TQRect( 178, 119, 340, 26 ) );
ScanLzh = new QCheckBox( ArchiveTypes, "ScanLzh" ); ScanLzh = new TQCheckBox( ArchiveTypes, "ScanLzh" );
ScanLzh->setGeometry( QRect( 20, 150, 150, 21 ) ); ScanLzh->setGeometry( TQRect( 20, 150, 150, 21 ) );
KComboBox* lzhUrl = new KComboBox(true, this); KComboBox* lzhUrl = new KComboBox(true, this);
LzhUsing = new KURLRequester( lzhUrl,ArchiveTypes, "LzhUsing" ); LzhUsing = new KURLRequester( lzhUrl,ArchiveTypes, "LzhUsing" );
LzhUsing->setGeometry( QRect( 178, 149, 340, 26 ) ); LzhUsing->setGeometry( TQRect( 178, 149, 340, 26 ) );
ScanJar = new QCheckBox( ArchiveTypes, "ScanJar" ); ScanJar = new TQCheckBox( ArchiveTypes, "ScanJar" );
ScanJar->setGeometry( QRect( 20, 180, 150, 21 ) ); ScanJar->setGeometry( TQRect( 20, 180, 150, 21 ) );
KComboBox* jarUrl = new KComboBox(true, this); KComboBox* jarUrl = new KComboBox(true, this);
JarUsing = new KURLRequester( jarUrl,ArchiveTypes, "JarUsing" ); JarUsing = new KURLRequester( jarUrl,ArchiveTypes, "JarUsing" );
JarUsing->setGeometry( QRect( 178, 179, 340, 26 ) ); JarUsing->setGeometry( TQRect( 178, 179, 340, 26 ) );
ScanDeb = new QCheckBox( ArchiveTypes, "ScanDeb" ); ScanDeb = new TQCheckBox( ArchiveTypes, "ScanDeb" );
ScanDeb->setGeometry( QRect( 20, 210, 150, 21 ) ); ScanDeb->setGeometry( TQRect( 20, 210, 150, 21 ) );
KComboBox* debUrl = new KComboBox(true, this); KComboBox* debUrl = new KComboBox(true, this);
DebUsing = new KURLRequester( debUrl,ArchiveTypes, "DebUsing" ); DebUsing = new KURLRequester( debUrl,ArchiveTypes, "DebUsing" );
DebUsing->setGeometry( QRect( 178, 209, 340, 26 ) ); DebUsing->setGeometry( TQRect( 178, 209, 340, 26 ) );
ScanTar = new QCheckBox( ArchiveTypes, "ScanTar" ); ScanTar = new TQCheckBox( ArchiveTypes, "ScanTar" );
ScanTar->setGeometry( QRect( 20, 240, 150, 21 ) ); ScanTar->setGeometry( TQRect( 20, 240, 150, 21 ) );
KComboBox* tarUrl = new KComboBox(true, this); KComboBox* tarUrl = new KComboBox(true, this);
TarUsing = new KURLRequester( tarUrl,ArchiveTypes, "TarUsing" ); TarUsing = new KURLRequester( tarUrl,ArchiveTypes, "TarUsing" );
TarUsing->setGeometry( QRect( 178, 239, 340, 26 ) ); TarUsing->setGeometry( TQRect( 178, 239, 340, 26 ) );
ScanTgz = new QCheckBox( ArchiveTypes, "ScanTgz" ); ScanTgz = new TQCheckBox( ArchiveTypes, "ScanTgz" );
ScanTgz->setGeometry( QRect( 20, 270, 150, 21 ) ); ScanTgz->setGeometry( TQRect( 20, 270, 150, 21 ) );
KComboBox* tgzUrl = new KComboBox(true, this); KComboBox* tgzUrl = new KComboBox(true, this);
TgzUsing = new KURLRequester( tgzUrl,ArchiveTypes, "TgzUsing" ); TgzUsing = new KURLRequester( tgzUrl,ArchiveTypes, "TgzUsing" );
TgzUsing->setGeometry( QRect( 178, 269, 340, 26 ) ); TgzUsing->setGeometry( TQRect( 178, 269, 340, 26 ) );
FileTypes = new QGroupBox( this, "FileTypes" ); FileTypes = new TQGroupBox( this, "FileTypes" );
FileTypes->setGeometry( QRect( 20, 490, 551, 120 ) ); FileTypes->setGeometry( TQRect( 20, 490, 551, 120 ) );
ScanMail = new QCheckBox( FileTypes, "ScanMail" ); ScanMail = new TQCheckBox( FileTypes, "ScanMail" );
ScanMail->setGeometry( QRect( 20, 20, 200, 21 ) ); ScanMail->setGeometry( TQRect( 20, 20, 200, 21 ) );
ScanHTML = new QCheckBox( FileTypes, "ScanHTML" ); ScanHTML = new TQCheckBox( FileTypes, "ScanHTML" );
ScanHTML->setGeometry( QRect( 270, 20, 200, 21 ) ); ScanHTML->setGeometry( TQRect( 270, 20, 200, 21 ) );
ScanPE = new QCheckBox( FileTypes, "ScanPE" ); ScanPE = new TQCheckBox( FileTypes, "ScanPE" );
ScanPE->setGeometry( QRect( 20, 50, 220, 21 ) ); ScanPE->setGeometry( TQRect( 20, 50, 220, 21 ) );
ScanOle = new QCheckBox( FileTypes, "ScanOle" ); ScanOle = new TQCheckBox( FileTypes, "ScanOle" );
ScanOle->setGeometry( QRect( 270, 50, 270, 21 ) ); ScanOle->setGeometry( TQRect( 270, 50, 270, 21 ) );
ScanOle->setChecked( FALSE ); ScanOle->setChecked( FALSE );
VirusBroken = new QCheckBox( FileTypes, "VirusBroken" ); VirusBroken = new TQCheckBox( FileTypes, "VirusBroken" );
VirusBroken->setGeometry( QRect( 20, 80, 240, 20 ) ); VirusBroken->setGeometry( TQRect( 20, 80, 240, 20 ) );
VirusBroken->setPaletteForegroundColor( QColor( 255, 0, 0 ) ); VirusBroken->setPaletteForegroundColor( TQColor( 255, 0, 0 ) );
ExcludeQuarantine = new QCheckBox( FileTypes, "ExcludeQuarantine" ); ExcludeQuarantine = new TQCheckBox( FileTypes, "ExcludeQuarantine" );
ExcludeQuarantine->setGeometry( QRect( 270, 80, 270, 21 ) ); ExcludeQuarantine->setGeometry( TQRect( 270, 80, 270, 21 ) );
ExcludeQuarantine->setChecked( FALSE ); ExcludeQuarantine->setChecked( FALSE );
OK = new QPushButton( this, i18n( "OK" ) ); OK = new TQPushButton( this, i18n( "OK" ) );
OK->setGeometry( QRect( 190, 626, 91, 31 ) ); OK->setGeometry( TQRect( 190, 626, 91, 31 ) );
OK->setDefault( TRUE ); OK->setDefault( TRUE );
connect( OK, SIGNAL(clicked()), connect( OK, SIGNAL(clicked()),
SLOT(updateSettings()) ); SLOT(updateSettings()) );
Cancel = new QPushButton( this, i18n( "Cancel" ) ); Cancel = new TQPushButton( this, i18n( "Cancel" ) );
Cancel->setGeometry( QRect( 300, 626, 91, 31 ) ); Cancel->setGeometry( TQRect( 300, 626, 91, 31 ) );
connect( Cancel, SIGNAL(clicked()), connect( Cancel, SIGNAL(clicked()),
SLOT(close()) ); SLOT(close()) );
languageChange(); languageChange();
resize( QSize(589, 667).expandedTo(minimumSizeHint()) ); resize( TQSize(589, 667).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished ); clearWState( WState_Polished );
fetchSettings(); fetchSettings();
@ -181,7 +181,7 @@ KlamscanOptions::KlamscanOptions( QWidget* parent, const char* name, bool modal,
*/ */
KlamscanOptions::~KlamscanOptions() KlamscanOptions::~KlamscanOptions()
{ {
// no need to delete child widgets, Qt does it all for us // no need to delete child widgets, TQt does it all for us
} }
/* /*
@ -336,10 +336,10 @@ void KlamscanOptions::fetchSettings()
config->setGroup("Klamscan"); config->setGroup("Klamscan");
NoFilesToExtract->setValue(QString(config->readEntry("NoFilesToExtract")).toInt()); NoFilesToExtract->setValue(TQString(config->readEntry("NoFilesToExtract")).toInt());
MBsToExtract->setValue(QString(config->readEntry("MBsToExtract")).replace("M","").toInt()); MBsToExtract->setValue(TQString(config->readEntry("MBsToExtract")).replace("M","").toInt());
CompressionRatio->setValue(QString(config->readEntry("CompressionRatio")).toInt()); CompressionRatio->setValue(TQString(config->readEntry("CompressionRatio")).toInt());
RecursionLevel->setValue(QString(config->readEntry("RecursionLevel")).toInt()); RecursionLevel->setValue(TQString(config->readEntry("RecursionLevel")).toInt());
if (config->readEntry("VirusLimitsExceeded") == "Yes") if (config->readEntry("VirusLimitsExceeded") == "Yes")
VirusLimitsExceeded->setChecked(true); VirusLimitsExceeded->setChecked(true);

@ -10,70 +10,70 @@
#ifndef KLAMSCANOPTIONS_H #ifndef KLAMSCANOPTIONS_H
#define KLAMSCANOPTIONS_H #define KLAMSCANOPTIONS_H
#include <qvariant.h> #include <tqvariant.h>
#include <qdialog.h> #include <tqdialog.h>
class QVBoxLayout; class TQVBoxLayout;
class QHBoxLayout; class TQHBoxLayout;
class QGridLayout; class TQGridLayout;
class QSpacerItem; class TQSpacerItem;
class QGroupBox; class TQGroupBox;
class QLabel; class TQLabel;
class QSpinBox; class TQSpinBox;
class QCheckBox; class TQCheckBox;
class QButtonGroup; class TQButtonGroup;
class KURLRequester; class KURLRequester;
class QPushButton; class TQPushButton;
class KConfig; class KConfig;
class KComboBox; class KComboBox;
class KlamscanOptions : public QDialog class KlamscanOptions : public TQDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
KlamscanOptions( QWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); KlamscanOptions( TQWidget* parent = 0, const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
~KlamscanOptions(); ~KlamscanOptions();
QGroupBox* Archive_Support; TQGroupBox* Archive_Support;
QLabel* textLabel1_2_2; TQLabel* textLabel1_2_2;
QLabel* textLabel1_2; TQLabel* textLabel1_2;
QLabel* textLabel1_2_3; TQLabel* textLabel1_2_3;
QLabel* textLabel1; TQLabel* textLabel1;
QSpinBox* NoFilesToExtract; TQSpinBox* NoFilesToExtract;
QSpinBox* MBsToExtract; TQSpinBox* MBsToExtract;
QSpinBox* RecursionLevel; TQSpinBox* RecursionLevel;
QSpinBox* CompressionRatio; TQSpinBox* CompressionRatio;
QCheckBox* VirusLimitsExceeded; TQCheckBox* VirusLimitsExceeded;
QCheckBox* VirusEncrypted; TQCheckBox* VirusEncrypted;
QButtonGroup* ArchiveTypes; TQButtonGroup* ArchiveTypes;
QCheckBox* ScanZip; TQCheckBox* ScanZip;
KURLRequester* ZipUsing; KURLRequester* ZipUsing;
QCheckBox* ScanRar; TQCheckBox* ScanRar;
KURLRequester* RarUsing; KURLRequester* RarUsing;
QCheckBox* ScanArj; TQCheckBox* ScanArj;
KURLRequester* ArjUsing; KURLRequester* ArjUsing;
QCheckBox* ScanZoo; TQCheckBox* ScanZoo;
KURLRequester* ZooUsing; KURLRequester* ZooUsing;
QCheckBox* ScanLzh; TQCheckBox* ScanLzh;
KURLRequester* LzhUsing; KURLRequester* LzhUsing;
QCheckBox* ScanJar; TQCheckBox* ScanJar;
KURLRequester* JarUsing; KURLRequester* JarUsing;
QCheckBox* ScanDeb; TQCheckBox* ScanDeb;
KURLRequester* DebUsing; KURLRequester* DebUsing;
QCheckBox* ScanTar; TQCheckBox* ScanTar;
KURLRequester* TarUsing; KURLRequester* TarUsing;
QCheckBox* ScanTgz; TQCheckBox* ScanTgz;
KURLRequester* TgzUsing; KURLRequester* TgzUsing;
QGroupBox* FileTypes; TQGroupBox* FileTypes;
QCheckBox* ScanMail; TQCheckBox* ScanMail;
QCheckBox* ScanHTML; TQCheckBox* ScanHTML;
QCheckBox* ScanPE; TQCheckBox* ScanPE;
QCheckBox* ScanOle; TQCheckBox* ScanOle;
QCheckBox* VirusBroken; TQCheckBox* VirusBroken;
QCheckBox* ExcludeQuarantine; TQCheckBox* ExcludeQuarantine;
QPushButton* OK; TQPushButton* OK;
QPushButton* Cancel; TQPushButton* Cancel;
KConfig* config; KConfig* config;
KComboBox* zipedit; KComboBox* zipedit;

@ -19,17 +19,17 @@
// #include "ktsystem.xpm" // #include "ktsystem.xpm"
// #include "ktmsystem.xpm" // #include "ktmsystem.xpm"
QPixmap KTIcon::getMiniIcon(const QString& name) TQPixmap KTIcon::getMiniIcon(const TQString& name)
{ {
return SmallIcon(name); return SmallIcon(name);
} }
QPixmap KTIcon::getIcon(const QString& name) TQPixmap KTIcon::getIcon(const TQString& name)
{ {
return BarIcon(name); return BarIcon(name);
} }
QPixmap KTIcon::application(bool mini) TQPixmap KTIcon::application(bool mini)
{ {
if (mini) if (mini)
return getMiniIcon("kcron"); return getMiniIcon("kcron");
@ -37,7 +37,7 @@ QPixmap KTIcon::application(bool mini)
return getIcon("kcron"); return getIcon("kcron");
} }
QPixmap KTIcon::system(bool mini) TQPixmap KTIcon::system(bool mini)
{ {
if (mini) if (mini)
return getMiniIcon("openterm"); return getMiniIcon("openterm");
@ -45,7 +45,7 @@ QPixmap KTIcon::system(bool mini)
return getIcon("openterm"); return getIcon("openterm");
} }
QPixmap KTIcon::user(bool mini) TQPixmap KTIcon::user(bool mini)
{ {
if (mini) if (mini)
return getMiniIcon("kuser"); return getMiniIcon("kuser");
@ -53,7 +53,7 @@ QPixmap KTIcon::user(bool mini)
return getIcon("kuser"); return getIcon("kuser");
} }
QPixmap KTIcon::variables(bool mini) TQPixmap KTIcon::variables(bool mini)
{ {
if (mini) if (mini)
return getMiniIcon("folder"); return getMiniIcon("folder");
@ -61,7 +61,7 @@ QPixmap KTIcon::variables(bool mini)
return getIcon("folder"); return getIcon("folder");
} }
QPixmap KTIcon::variable(bool mini) TQPixmap KTIcon::variable(bool mini)
{ {
if (mini) if (mini)
return getMiniIcon("mime_empty"); return getMiniIcon("mime_empty");
@ -69,7 +69,7 @@ QPixmap KTIcon::variable(bool mini)
return getIcon("mime_empty"); return getIcon("mime_empty");
} }
QPixmap KTIcon::mail(bool mini) TQPixmap KTIcon::mail(bool mini)
{ {
if (mini) if (mini)
return getMiniIcon("mail_generic"); return getMiniIcon("mail_generic");
@ -77,7 +77,7 @@ QPixmap KTIcon::mail(bool mini)
return getIcon("mail_generic"); return getIcon("mail_generic");
} }
QPixmap KTIcon::shell(bool mini) TQPixmap KTIcon::shell(bool mini)
{ {
if (mini) if (mini)
return getMiniIcon("openterm"); return getMiniIcon("openterm");
@ -85,7 +85,7 @@ QPixmap KTIcon::shell(bool mini)
return getIcon("openterm"); return getIcon("openterm");
} }
QPixmap KTIcon::home(bool mini) TQPixmap KTIcon::home(bool mini)
{ {
if (mini) if (mini)
return getMiniIcon("gohome"); return getMiniIcon("gohome");
@ -93,7 +93,7 @@ QPixmap KTIcon::home(bool mini)
return getIcon("gohome"); return getIcon("gohome");
} }
QPixmap KTIcon::path(bool mini) TQPixmap KTIcon::path(bool mini)
{ {
if (mini) if (mini)
return getMiniIcon("folder"); return getMiniIcon("folder");
@ -101,7 +101,7 @@ QPixmap KTIcon::path(bool mini)
return getIcon("folder"); return getIcon("folder");
} }
QPixmap KTIcon::tasks(bool mini) TQPixmap KTIcon::tasks(bool mini)
{ {
if (mini) if (mini)
return getMiniIcon("folder"); return getMiniIcon("folder");
@ -109,7 +109,7 @@ QPixmap KTIcon::tasks(bool mini)
return getIcon("folder"); return getIcon("folder");
} }
QPixmap KTIcon::task(bool mini) TQPixmap KTIcon::task(bool mini)
{ {
if (mini) if (mini)
return getMiniIcon("gear"); return getMiniIcon("gear");

@ -12,8 +12,8 @@
#ifndef KTICON_H #ifndef KTICON_H
#define KTICON_H #define KTICON_H
#include <qpixmap.h> #include <tqpixmap.h>
#include <qstring.h> #include <tqstring.h>
/** /**
* Wraps all icons used by the application. * Wraps all icons used by the application.
@ -24,19 +24,19 @@ class KTIcon
public: public:
static QPixmap getMiniIcon(const QString& name); static TQPixmap getMiniIcon(const TQString& name);
static QPixmap getIcon(const QString& name); static TQPixmap getIcon(const TQString& name);
static QPixmap application(bool mini); static TQPixmap application(bool mini);
static QPixmap system(bool mini); static TQPixmap system(bool mini);
static QPixmap user(bool mini); static TQPixmap user(bool mini);
static QPixmap variables(bool mini); static TQPixmap variables(bool mini);
static QPixmap variable(bool mini); static TQPixmap variable(bool mini);
static QPixmap mail(bool mini); static TQPixmap mail(bool mini);
static QPixmap shell(bool mini); static TQPixmap shell(bool mini);
static QPixmap home(bool mini); static TQPixmap home(bool mini);
static QPixmap path(bool mini); static TQPixmap path(bool mini);
static QPixmap tasks(bool mini); static TQPixmap tasks(bool mini);
static QPixmap task(bool mini); static TQPixmap task(bool mini);
}; };

@ -25,14 +25,14 @@ KTListCron::KTListCron(KTListItem* parent, const char* name,
refresh(); refresh();
} }
KTListCron::KTListCron(QListView* parent, const char* name, KTListCron::KTListCron(TQListView* parent, const char* name,
CTCron* _ctcron) : CTCron* _ctcron) :
KTListItem(parent, name, _ctcron) KTListItem(parent, name, _ctcron)
{ {
refresh(); refresh();
} }
KTListCron::KTListCron(QListView* parent, CTCron* _ctcron) : KTListCron::KTListCron(TQListView* parent, CTCron* _ctcron) :
KTListItem(parent, (const char*)0, _ctcron) KTListItem(parent, (const char*)0, _ctcron)
{ {
refresh(); refresh();
@ -43,24 +43,24 @@ void KTListCron::refresh()
setPixmap(0, getCTCron()->login.c_str() == (i18n("(System Crontab)")) ? setPixmap(0, getCTCron()->login.c_str() == (i18n("(System Crontab)")) ?
KTIcon::system(true) : KTIcon::user(true)); KTIcon::system(true) : KTIcon::user(true));
QString userName = QString::fromLocal8Bit(getCTCron()->login.c_str()); TQString userName = TQString::fromLocal8Bit(getCTCron()->login.c_str());
if (getCTCron()->login != getCTCron()->name) if (getCTCron()->login != getCTCron()->name)
{ {
userName += QString(" ("); userName += TQString(" (");
userName += QString::fromLocal8Bit(getCTCron()->name.c_str()); userName += TQString::fromLocal8Bit(getCTCron()->name.c_str());
userName += QString(")"); userName += TQString(")");
} }
setText(0, userName); setText(0, userName);
} }
// void KTListCron::print (KTPrint& printer) const // void KTListCron::print (KTPrint& printer) const
// { // {
// QString userInfo; // TQString userInfo;
// userInfo = QString::fromLocal8Bit(getCTCron()->name.c_str()); // userInfo = TQString::fromLocal8Bit(getCTCron()->name.c_str());
// //
// KTListItem* ktli = (KTListItem*)this->firstChild(); // KTListItem* ktli = (KTListItem*)this->firstChild();
// Q_CHECK_PTR(ktli); // TQ_CHECK_PTR(ktli);
// while (ktli) { // while (ktli) {
// ktli->print(printer); // ktli->print(printer);
// ktli = (KTListItem*)ktli->nextSibling(); // ktli = (KTListItem*)ktli->nextSibling();

@ -19,7 +19,7 @@
#include "ktlistitem.h" #include "ktlistitem.h"
/** /**
* QListViewItem view of a CTCron. * TQListViewItem view of a CTCron.
*/ */
class KTListCron : public KTListItem class KTListCron : public KTListItem
{ {
@ -33,12 +33,12 @@ public:
/** /**
* Construct tasks or variables folder from root. * Construct tasks or variables folder from root.
*/ */
KTListCron(QListView* parent, const char* name, CTCron* _ctcron); KTListCron(TQListView* parent, const char* name, CTCron* _ctcron);
/** /**
* Construct user folder from root. * Construct user folder from root.
*/ */
KTListCron(QListView* parent, CTCron* _ctcron); KTListCron(TQListView* parent, CTCron* _ctcron);
/** /**
* Refresh. * Refresh.

@ -14,13 +14,13 @@
KTListItem::KTListItem(KTListItem* parent, const char* name, CTCron* _ctcron) : KTListItem::KTListItem(KTListItem* parent, const char* name, CTCron* _ctcron) :
QListViewItem(parent, name), TQListViewItem(parent, name),
ctcron(_ctcron) ctcron(_ctcron)
{ {
} }
KTListItem::KTListItem(QListView* parent, const char* name, CTCron* _ctcron) : KTListItem::KTListItem(TQListView* parent, const char* name, CTCron* _ctcron) :
QListViewItem(parent, name), TQListViewItem(parent, name),
ctcron(_ctcron) ctcron(_ctcron)
{ {
} }

@ -16,16 +16,16 @@
#include <config.h> #include <config.h>
#endif #endif
#include <qlistview.h> #include <tqlistview.h>
class KTPrint; class KTPrint;
class CTCron; class CTCron;
/** /**
* An enhanced QListViewItem that ensures all list view items have the * An enhanced TQListViewItem that ensures all list view items have the
* same interface. * same interface.
*/ */
class KTListItem : public QListViewItem class KTListItem : public TQListViewItem
{ {
public: public:
@ -37,7 +37,7 @@ public:
/** /**
* Construct a non-root list view item from a CTCron. * Construct a non-root list view item from a CTCron.
*/ */
KTListItem(QListView* parent, const char* name, CTCron* _ctcron); KTListItem(TQListView* parent, const char* name, CTCron* _ctcron);
/** /**
* Destructor. * Destructor.

@ -30,10 +30,10 @@ KTListTask::KTListTask(KTListItem* parent,
void KTListTask::refresh() void KTListTask::refresh()
{ {
QString command = QString::fromLocal8Bit(cttask->command.c_str()); TQString command = TQString::fromLocal8Bit(cttask->command.c_str());
if (command.contains("klamav") || command.contains("Klamav")){ if (command.contains("klamav") || command.contains("Klamav")){
setText(0, QString::fromLocal8Bit(cttask->comment.c_str())); setText(0, TQString::fromLocal8Bit(cttask->comment.c_str()));
/* if (cttask->enabled) /* if (cttask->enabled)
{*/ {*/
@ -42,9 +42,9 @@ void KTListTask::refresh()
if (command.contains("Autostart")) if (command.contains("Autostart"))
setText(2, QString::fromLocal8Bit("At Login")); setText(2, TQString::fromLocal8Bit("At Login"));
else else
setText(2, QString::fromLocal8Bit(cttask->describe().c_str())); setText(2, TQString::fromLocal8Bit(cttask->describe().c_str()));
/* } /* }
@ -61,10 +61,10 @@ void KTListTask::refresh()
// void KTListTask::print (KTPrint &printer) const // void KTListTask::print (KTPrint &printer) const
// { // {
// printer.print(QString::fromLocal8Bit(cttask->comment.c_str()), 1, KTPrint::alignTextLeft); // printer.print(TQString::fromLocal8Bit(cttask->comment.c_str()), 1, KTPrint::alignTextLeft);
// if (cttask->enabled) { // if (cttask->enabled) {
// printer.print(QString::fromLocal8Bit(cttask->command.c_str()),2, KTPrint::alignTextCenter); // printer.print(TQString::fromLocal8Bit(cttask->command.c_str()),2, KTPrint::alignTextCenter);
// printer.print(QString::fromLocal8Bit(cttask->describe().c_str()),3, KTPrint::alignTextRight); // printer.print(TQString::fromLocal8Bit(cttask->describe().c_str()),3, KTPrint::alignTextRight);
// } // }
// else // else
// printer.print(i18n("Disabled."), 3, KTPrint::alignTextRight); // printer.print(i18n("Disabled."), 3, KTPrint::alignTextRight);

@ -21,7 +21,7 @@
class CTTask; class CTTask;
/** /**
* QListViewItem with a CTTask. * TQListViewItem with a CTTask.
*/ */
class KTListTask : public KTListItem class KTListTask : public KTListItem
{ {

@ -25,13 +25,13 @@ KTListTasks::KTListTasks(KTListItem* parent, CTCron* _ctcron) :
refresh(); refresh();
} }
KTListTasks::KTListTasks(QListView* parent, CTCron* _ctcron) : KTListTasks::KTListTasks(TQListView* parent, CTCron* _ctcron) :
KTListItem(parent, 0, _ctcron) KTListItem(parent, 0, _ctcron)
{ {
refresh(); refresh();
} }
QString KTListTasks::getDescription() TQString KTListTasks::getDescription()
{ {
return i18n("Tasks"); return i18n("Tasks");
} }
@ -45,7 +45,7 @@ QString KTListTasks::getDescription()
// if (temptask->dirty()) // if (temptask->dirty())
// { // {
// getCTCron()->task.push_back(temptask); // getCTCron()->task.push_back(temptask);
// new KTListTask(this, getCTCron(), temptask); // Qt will clean up // new KTListTask(this, getCTCron(), temptask); // TQt will clean up
// } // }
// else // else
// { // {
@ -61,11 +61,11 @@ void KTListTasks::refresh()
// void KTListTasks::print (KTPrint& printer) const // void KTListTasks::print (KTPrint& printer) const
// { // {
// QFont stnd; // TQFont stnd;
// //
// stnd = printer.getFont(); // stnd = printer.getFont();
// //
// printer.setFont(QFont( KGlobalSettings::generalFont().family(), 10, QFont::Bold )); // printer.setFont(TQFont( KGlobalSettings::generalFont().family(), 10, TQFont::Bold ));
// printer.print (i18n("Task name:"), 1, KTPrint::alignTextLeft); // printer.print (i18n("Task name:"), 1, KTPrint::alignTextLeft);
// printer.print (i18n("Program:"), 2, KTPrint::alignTextCenter); // printer.print (i18n("Program:"), 2, KTPrint::alignTextCenter);
// printer.print (i18n("Description:"),3,KTPrint::alignTextRight); // printer.print (i18n("Description:"),3,KTPrint::alignTextRight);
@ -83,7 +83,7 @@ void KTListTasks::refresh()
// } // }
// //
// KTListItem* ktli = (KTListItem*)this->firstChild(); // KTListItem* ktli = (KTListItem*)this->firstChild();
// Q_CHECK_PTR(ktli); // TQ_CHECK_PTR(ktli);
// //
// while (ktli) { // while (ktli) {
// ktli->print(printer); // ktli->print(printer);

@ -18,10 +18,10 @@
#include "ktlistitem.h" #include "ktlistitem.h"
class QString; class TQString;
/** /**
* QListViewItem of a "tasks" folder. * TQListViewItem of a "tasks" folder.
*/ */
class KTListTasks : public KTListItem class KTListTasks : public KTListItem
{ {
@ -35,12 +35,12 @@ public:
/** /**
* Construct tasks folder from root. * Construct tasks folder from root.
*/ */
KTListTasks(QListView* parent, CTCron* _ctcron); KTListTasks(TQListView* parent, CTCron* _ctcron);
/** /**
* Internationalized description. * Internationalized description.
*/ */
static QString getDescription(); static TQString getDescription();
/** /**
* Create. * Create.

@ -21,7 +21,7 @@
// #endif // #endif
#include <qfileinfo.h> #include <tqfileinfo.h>
#include "cthost.h" #include "cthost.h"
#include "ctcron.h" #include "ctcron.h"
@ -44,8 +44,8 @@
#include <stdlib.h> // system #include <stdlib.h> // system
KTView::KTView(QWidget *parent, const char* name) : KTView::KTView(TQWidget *parent, const char* name) :
QWidget(parent, name), TQWidget(parent, name),
listView(0), listView(0),
currentCTCron(0), currentCTCron(0),
currentIsTask(true), currentIsTask(true),
@ -79,18 +79,18 @@ KTView::KTView(QWidget *parent, const char* name) :
// emit(enablePaste(clipboardCTVariable)); // emit(enablePaste(clipboardCTVariable));
// emit(enableRunNow(false)); // emit(enableRunNow(false));
listView->setColumnWidthMode(1, QListView::Manual); listView->setColumnWidthMode(1, TQListView::Manual);
listView->hideColumn(1); listView->hideColumn(1);
} }
void KTView::refresh() void KTView::refresh()
{ {
QListView* tmpListView(listView); TQListView* tmpListView(listView);
listView = new QListView(this); listView = new TQListView(this);
listView->setFrameStyle(QListView::Panel | QListView::Sunken); listView->setFrameStyle(TQListView::Panel | TQListView::Sunken);
listView->setRootIsDecorated(true); listView->setRootIsDecorated(true);
listView->setAllColumnsShowFocus(true); listView->setAllColumnsShowFocus(true);
listView->setShowSortIndicator(true); listView->setShowSortIndicator(true);
@ -107,7 +107,7 @@ void KTView::refresh()
listView->addColumn(i18n("When to Scan")); listView->addColumn(i18n("When to Scan"));
//for (int item = 0; item <=2; item++) //for (int item = 0; item <=2; item++)
//listView->setColumnWidthMode(item, QListView::Maximum); //listView->setColumnWidthMode(item, TQListView::Maximum);
// for each user // for each user
for (CTCronIterator i = const_cast<CTHost&>(cth).cron.begin(); for (CTCronIterator i = const_cast<CTHost&>(cth).cron.begin();
@ -161,17 +161,17 @@ void KTView::refresh()
resizeEvent(); resizeEvent();
connect(listView, SIGNAL(contextMenuRequested(QListViewItem*, const QPoint&, int)), connect(listView, SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint&, int)),
SLOT(slotMenu(QListViewItem*, const QPoint&, int))); SLOT(slotMenu(TQListViewItem*, const TQPoint&, int)));
connect(listView, SIGNAL(selectionChanged(QListViewItem*)), connect(listView, SIGNAL(selectionChanged(TQListViewItem*)),
SLOT(slotSetCurrent(QListViewItem*))); SLOT(slotSetCurrent(TQListViewItem*)));
connect(listView, SIGNAL(doubleClicked(QListViewItem*)), connect(listView, SIGNAL(doubleClicked(TQListViewItem*)),
SLOT(slotEdit(QListViewItem*))); SLOT(slotEdit(TQListViewItem*)));
connect(listView, SIGNAL(returnPressed(QListViewItem*)), connect(listView, SIGNAL(returnPressed(TQListViewItem*)),
SLOT(slotEdit(QListViewItem*))); SLOT(slotEdit(TQListViewItem*)));
// switch to the new view // switch to the new view
@ -183,14 +183,14 @@ void KTView::refresh()
delete tmpListView; delete tmpListView;
} }
listView->setColumnWidthMode(1, QListView::Manual); listView->setColumnWidthMode(1, TQListView::Manual);
listView->hideColumn(1); listView->hideColumn(1);
QListViewItemIterator it( listView); TQListViewItemIterator it( listView);
while ( it.current() ) { while ( it.current() ) {
QListViewItem* tItem = it.current(); TQListViewItem* tItem = it.current();
//kdDebug() << tItem->text(1) << endl; //kdDebug() << tItem->text(1) << endl;
if ((tItem->text(1).contains("klamav")) || (tItem->text(1).contains("Klamav")) || (tItem->text(0).contains("Tasks"))) if ((tItem->text(1).contains("klamav")) || (tItem->text(1).contains("Klamav")) || (tItem->text(0).contains("Tasks")))
@ -281,21 +281,21 @@ void KTView::refresh()
// void KTView :: pageHeading (KTListItem* user, KTPrint &printer) const // void KTView :: pageHeading (KTListItem* user, KTPrint &printer) const
// { // {
// QFont stnd; // TQFont stnd;
// QString logonInfo; // TQString logonInfo;
// QDateTime now (QDateTime::currentDateTime()); // TQDateTime now (TQDateTime::currentDateTime());
// char hostName[20]; // char hostName[20];
// //
// gethostname(hostName, 20); // gethostname(hostName, 20);
// // SSA : Fix Me user name, logon name and host name musst be // // SSA : Fix Me user name, logon name and host name musst be
// // SSA : not only in us-ascii ?? // // SSA : not only in us-ascii ??
// logonInfo = i18n("user on host", "%1 <%2> on %3") // logonInfo = i18n("user on host", "%1 <%2> on %3")
// .arg(QString::fromLocal8Bit(user->getCTCron()->name.c_str())) // .arg(TQString::fromLocal8Bit(user->getCTCron()->name.c_str()))
// .arg(QString::fromLocal8Bit(user->getCTCron()->login.c_str())) // .arg(TQString::fromLocal8Bit(user->getCTCron()->login.c_str()))
// .arg(QString::fromLocal8Bit(hostName)); // .arg(TQString::fromLocal8Bit(hostName));
// //
// stnd = printer.getFont(); // stnd = printer.getFont();
// printer.setFont(QFont( KGlobalSettings::generalFont().family(), 14, QFont::Bold )); // printer.setFont(TQFont( KGlobalSettings::generalFont().family(), 14, TQFont::Bold ));
// //
// printer.print (i18n("Scheduled Tasks"), 2, KTPrint::alignTextCenter, false); // printer.print (i18n("Scheduled Tasks"), 2, KTPrint::alignTextCenter, false);
// printer.print (logonInfo, 2, KTPrint::alignTextCenter, false); // printer.print (logonInfo, 2, KTPrint::alignTextCenter, false);
@ -328,7 +328,7 @@ KTView::~KTView()
delete listView; delete listView;
} }
void KTView::resizeEvent (QResizeEvent*) void KTView::resizeEvent (TQResizeEvent*)
{ {
listView->setFixedWidth(width()); listView->setFixedWidth(width());
listView->setFixedHeight(height()); listView->setFixedHeight(height());
@ -386,7 +386,7 @@ void KTView::create()
if ((ktli->text(0) != KTListTasks::getDescription()) ) { if ((ktli->text(0) != KTListTasks::getDescription()) ) {
ktli = (KTListItem*)ktli->parent(); ktli = (KTListItem*)ktli->parent();
} }
Q_CHECK_PTR(ktli); TQ_CHECK_PTR(ktli);
ktli->create(); ktli->create();
listView->triggerUpdate(); listView->triggerUpdate();
} }
@ -394,7 +394,7 @@ void KTView::create()
// void KTView::edit() // void KTView::edit()
// { // {
// KTListItem* ktli = (KTListItem*)listView->currentItem(); // KTListItem* ktli = (KTListItem*)listView->currentItem();
// Q_CHECK_PTR(ktli); // TQ_CHECK_PTR(ktli);
// ktli->edit(); // ktli->edit();
// listView->triggerUpdate(); // listView->triggerUpdate();
// } // }
@ -440,46 +440,46 @@ void KTView::remove()
refresh(); refresh();
} }
QString KTView::absolute() const TQString KTView::absolute() const
{ {
QString fullCommand = QString::fromLocal8Bit(currentCTTask->command.c_str()); TQString fullCommand = TQString::fromLocal8Bit(currentCTTask->command.c_str());
QString command(fullCommand); TQString command(fullCommand);
int pos(command.find(" ")); int pos(command.find(" "));
if (pos > 0) command = command.left(pos); if (pos > 0) command = command.left(pos);
if (command.find("/") == 0) if (command.find("/") == 0)
return fullCommand; return fullCommand;
QString path = QString::fromLocal8Bit(currentCTCron->path().c_str()); TQString path = TQString::fromLocal8Bit(currentCTCron->path().c_str());
int begin(0); int begin(0);
int end(0); int end(0);
QString prefix; TQString prefix;
QString full; TQString full;
while ((end = path.find(":", begin)) > 0) while ((end = path.find(":", begin)) > 0)
{ {
prefix = path.mid(begin, begin + end) + "/"; prefix = path.mid(begin, begin + end) + "/";
full = prefix + command; full = prefix + command;
if (QFileInfo(full).isExecutable()) if (TQFileInfo(full).isExecutable())
return QString(prefix + fullCommand); return TQString(prefix + fullCommand);
begin = end + 1; begin = end + 1;
} }
prefix = path.mid(begin, begin + end) + "/"; prefix = path.mid(begin, begin + end) + "/";
full = prefix + command; full = prefix + command;
if (QFileInfo(full).isExecutable()) if (TQFileInfo(full).isExecutable())
return QString(prefix + fullCommand); return TQString(prefix + fullCommand);
return QString(""); return TQString("");
} }
void KTView::run() const void KTView::run() const
{ {
QString command(absolute() + " &"); TQString command(absolute() + " &");
system(QFile::encodeName(command)); system(TQFile::encodeName(command));
} }
void KTView::enable(bool enable) void KTView::enable(bool enable)
{ {
QListViewItem* qlvi = listView->currentItem(); TQListViewItem* qlvi = listView->currentItem();
if (currentIsTask) if (currentIsTask)
{ {
@ -499,7 +499,7 @@ void KTView::enable(bool enable)
}*/ }*/
} }
void KTView::slotMenu(QListViewItem* qlvi, const QPoint& /*qp*/, int /*i*/) void KTView::slotMenu(TQListViewItem* qlvi, const TQPoint& /*qp*/, int /*i*/)
{ {
if (qlvi !=0 ) { if (qlvi !=0 ) {
listView->setSelected(qlvi, true); listView->setSelected(qlvi, true);
@ -508,14 +508,14 @@ void KTView::slotMenu(QListViewItem* qlvi, const QPoint& /*qp*/, int /*i*/)
} }
} }
void KTView::slotEdit(QListViewItem* /*qlvi*/) void KTView::slotEdit(TQListViewItem* /*qlvi*/)
{ {
//edit(); //edit();
} }
void KTView::slotSetCurrent (QListViewItem* qlvi) void KTView::slotSetCurrent (TQListViewItem* qlvi)
{ {
QListViewItem* parent = qlvi->parent(); TQListViewItem* parent = qlvi->parent();
/* if (qlvi->text(0) == KTListVars::getDescription()) /* if (qlvi->text(0) == KTListVars::getDescription())
{ {
@ -595,7 +595,7 @@ CTCron* KTView::getCTCron()
return currentCTCron; return currentCTCron;
} }
QListViewItem* KTView::currentItem() TQListViewItem* KTView::currentItem()
{ {
//kdDebug() << listView->currentItem()->text(1) << endl; //kdDebug() << listView->currentItem()->text(1) << endl;
return listView->currentItem(); return listView->currentItem();

@ -16,12 +16,12 @@
#include <config.h> #include <config.h>
#endif #endif
#include <qwidget.h> #include <tqwidget.h>
#include "cthost.h" #include "cthost.h"
class QString; class TQString;
class QListView; class TQListView;
class QListViewItem; class TQListViewItem;
class KTApp; class KTApp;
class KTPrint; class KTPrint;
class KTListItem; class KTListItem;
@ -33,7 +33,7 @@ class Schedule;
/** /**
* Main GUI view of the crontab entries. * Main GUI view of the crontab entries.
*/ */
class KTView : public QWidget class KTView : public TQWidget
{ {
Q_OBJECT Q_OBJECT
@ -42,7 +42,7 @@ public:
/** /**
* Initializes view. * Initializes view.
*/ */
KTView (QWidget* parent = 0, const char* name=0); KTView (TQWidget* parent = 0, const char* name=0);
/** /**
* Destructor. * Destructor.
@ -107,7 +107,7 @@ public:
CTCron* getCTCron(); CTCron* getCTCron();
QListViewItem* currentItem(); TQListViewItem* currentItem();
void hideCommand(); void hideCommand();
signals: signals:
@ -141,33 +141,33 @@ public slots:
/** /**
* Pop up context sensitive menu. * Pop up context sensitive menu.
*/ */
void slotMenu(QListViewItem* qlvi, const QPoint& qp, int i); void slotMenu(TQListViewItem* qlvi, const TQPoint& qp, int i);
/** /**
* Default action, edit. * Default action, edit.
*/ */
void slotEdit(QListViewItem* qlvi = 0); void slotEdit(TQListViewItem* qlvi = 0);
protected slots: protected slots:
/** /**
* Set current and update menu * Set current and update menu
*/ */
void slotSetCurrent (QListViewItem* qlvi); void slotSetCurrent (TQListViewItem* qlvi);
protected: protected:
/** /**
* Resize view contents. * Resize view contents.
*/ */
virtual void resizeEvent (QResizeEvent* = 0); virtual void resizeEvent (TQResizeEvent* = 0);
private: private:
/** /**
* Get absolute path of command. * Get absolute path of command.
*/ */
QString absolute() const; TQString absolute() const;
/** /**
@ -179,7 +179,7 @@ private:
/** /**
* Tree view of the crontab entries. * Tree view of the crontab entries.
*/ */
QListView* listView; TQListView* listView;
/** /**
* Current user's crontab. * Current user's crontab.

@ -23,13 +23,13 @@
#include <kurlrequester.h> #include <kurlrequester.h>
#include <kurlcompletion.h> #include <kurlcompletion.h>
#include <kcombobox.h> #include <kcombobox.h>
#include <qlayout.h> #include <tqlayout.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include <kstandarddirs.h> #include <kstandarddirs.h>
Kuarantine::Kuarantine(QWidget *parent, const char *name) Kuarantine::Kuarantine(TQWidget *parent, const char *name)
: QWidget(parent, name) : TQWidget(parent, name)
{ {
config = KGlobal::config(); config = KGlobal::config();
@ -40,7 +40,7 @@ Kuarantine::Kuarantine(QWidget *parent, const char *name)
if (lastQuarLocations.isEmpty()){ if (lastQuarLocations.isEmpty()){
createQuarDir(); createQuarDir();
}else{ }else{
for (QStringList::Iterator it = lastQuarLocations.begin(); it == lastQuarLocations.begin(); it++ ) for (TQStringList::Iterator it = lastQuarLocations.begin(); it == lastQuarLocations.begin(); it++ )
quarloc = *it; quarloc = *it;
if (!(KIO::NetAccess::exists(quarloc,TRUE,NULL))){ if (!(KIO::NetAccess::exists(quarloc,TRUE,NULL))){
KMessageBox::information (this,i18n( "Your current quarantine location ('%1') no longer exists. I'm going to attempt to create a new one.").arg(quarloc)); KMessageBox::information (this,i18n( "Your current quarantine location ('%1') no longer exists. I'm going to attempt to create a new one.").arg(quarloc));
@ -52,42 +52,42 @@ Kuarantine::Kuarantine(QWidget *parent, const char *name)
//Get Items for this location //Get Items for this location
lastQuarItems = config->readListEntry(QString("Items %1").arg(quarloc)); lastQuarItems = config->readListEntry(TQString("Items %1").arg(quarloc));
if (lastQuarItems.isEmpty()){ if (lastQuarItems.isEmpty()){
config->writeEntry(QString("Items %1").arg(quarloc), ""); config->writeEntry(TQString("Items %1").arg(quarloc), "");
lastQuarItems = config->readListEntry(QString("Items %1").arg(quarloc)); lastQuarItems = config->readListEntry(TQString("Items %1").arg(quarloc));
} }
//Get History for this location //Get History for this location
lastHistoryItems = config->readListEntry(QString("History %1").arg(quarloc)); lastHistoryItems = config->readListEntry(TQString("History %1").arg(quarloc));
if (lastHistoryItems.isEmpty()){ if (lastHistoryItems.isEmpty()){
config->writeEntry(QString("History %1").arg(quarloc), ""); config->writeEntry(TQString("History %1").arg(quarloc), "");
config->sync(); config->sync();
lastHistoryItems = config->readListEntry(QString("History %1").arg(quarloc)); lastHistoryItems = config->readListEntry(TQString("History %1").arg(quarloc));
} }
//Create GUI //Create GUI
QVBoxLayout *vbox = new QVBoxLayout(this, KDialog::marginHint(), TQVBoxLayout *vbox = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint(), "vbox"); KDialog::spacingHint(), "vbox");
QGroupBox *group = new QGroupBox(i18n("Quarantine Location"), this); TQGroupBox *group = new TQGroupBox(i18n("Quarantine Location"), this);
vbox->addWidget(group); vbox->addWidget(group);
QGridLayout *layout = new QGridLayout( group, 9, 3, KDialog::spacingHint(), TQGridLayout *layout = new TQGridLayout( group, 9, 3, KDialog::spacingHint(),
KDialog::spacingHint(), "layout"); KDialog::spacingHint(), "layout");
layout->addRowSpacing(0, group->fontMetrics().height()); layout->addRowSpacing(0, group->fontMetrics().height());
layout->setColStretch(0, 1); layout->setColStretch(0, 1);
layout->setColStretch(1, 1); layout->setColStretch(1, 1);
QWidget *hlp = new QWidget( group ); TQWidget *hlp = new TQWidget( group );
layout->addMultiCellWidget(hlp, 1,1, 0,2); layout->addMultiCellWidget(hlp, 1,1, 0,2);
QHBoxLayout *dir_layout = new QHBoxLayout(hlp, KDialog::spacingHint() ); TQHBoxLayout *dir_layout = new TQHBoxLayout(hlp, KDialog::spacingHint() );
QLabel *dir_label = new QLabel(i18n("&Directory:"), hlp); TQLabel *dir_label = new TQLabel(i18n("&Directory:"), hlp);
dir_label->setFixedSize(dir_label->sizeHint()); dir_label->setFixedSize(dir_label->sizeHint());
dir_label->adjustSize(); dir_label->adjustSize();
dir_layout->addWidget(dir_label); dir_layout->addWidget(dir_label);
@ -102,51 +102,51 @@ Kuarantine::Kuarantine(QWidget *parent, const char *name)
dir_layout->addWidget(dir_combo); dir_layout->addWidget(dir_combo);
dir_label->setBuddy(dir_combo); dir_label->setBuddy(dir_combo);
connect( dir_combo, SIGNAL(urlSelected(const QString &)), connect( dir_combo, SIGNAL(urlSelected(const TQString &)),
SLOT(updateLastQuarLocations()) ); SLOT(updateLastQuarLocations()) );
connect( dir_combo, SIGNAL(textChanged(const QString &)), connect( dir_combo, SIGNAL(textChanged(const TQString &)),
SLOT(updateLastQuarLocations()) ); SLOT(updateLastQuarLocations()) );
QGroupBox *group2 = new QGroupBox(i18n("Contents Of Quarantine"), this); TQGroupBox *group2 = new TQGroupBox(i18n("Contents Of Quarantine"), this);
vbox->addWidget(group2); vbox->addWidget(group2);
QGridLayout *layout2 = new QGridLayout( group2, 9, 3, KDialog::spacingHint(), TQGridLayout *layout2 = new TQGridLayout( group2, 9, 3, KDialog::spacingHint(),
KDialog::spacingHint(), "layout2"); KDialog::spacingHint(), "layout2");
layout2->addRowSpacing(0, group2->fontMetrics().height()); layout2->addRowSpacing(0, group2->fontMetrics().height());
layout2->setColStretch(0, 1); layout2->setColStretch(0, 1);
layout2->setColStretch(1, 1); layout2->setColStretch(1, 1);
QWidget *hlp2 = new QWidget( group2 ); TQWidget *hlp2 = new TQWidget( group2 );
layout2->addMultiCellWidget(hlp2, 1,1, 0,2); layout2->addMultiCellWidget(hlp2, 1,1, 0,2);
QHBoxLayout *dir_layout2 = new QHBoxLayout(hlp2, KDialog::spacingHint() ); TQHBoxLayout *dir_layout2 = new TQHBoxLayout(hlp2, KDialog::spacingHint() );
// currentbox = new QListBox(hlp2); // currentbox = new TQListBox(hlp2);
// QFontMetrics rb_fm(currentbox->fontMetrics()); // TQFontMetrics rb_fm(currentbox->fontMetrics());
// currentbox->setMinimumSize(rb_fm.width("0")*25, // currentbox->setMinimumSize(rb_fm.width("0")*25,
// rb_fm.lineSpacing()*8); // rb_fm.lineSpacing()*8);
// dir_layout2->addWidget(currentbox); // dir_layout2->addWidget(currentbox);
currentbox = new QListView(hlp2); currentbox = new TQListView(hlp2);
currentbox->setShowSortIndicator(true); currentbox->setShowSortIndicator(true);
QFontMetrics rb_fm(currentbox->fontMetrics()); TQFontMetrics rb_fm(currentbox->fontMetrics());
//currentbox->setMinimumSize(rb_fm.width("0")*55, //currentbox->setMinimumSize(rb_fm.width("0")*55,
// rb_fm.lineSpacing()*15); // rb_fm.lineSpacing()*15);
//kdDebug() << ((currentbox->width())/3) << endl; //kdDebug() << ((currentbox->width())/3) << endl;
currentbox->addColumn( i18n( "Name of File" ),0); currentbox->addColumn( i18n( "Name of File" ),0);
currentbox->addColumn( i18n( "Name of Virus Found" ),0); currentbox->addColumn( i18n( "Name of Virus Found" ),0);
currentbox->addColumn( i18n( "Date Quarantined" ),0); currentbox->addColumn( i18n( "Date Quarantined" ),0);
currentbox->setResizeMode(QListView::AllColumns); currentbox->setResizeMode(TQListView::AllColumns);
currentbox->setSelectionMode( QListView::Extended ); currentbox->setSelectionMode( TQListView::Extended );
currentbox->setAllColumnsShowFocus(true); currentbox->setAllColumnsShowFocus(true);
qmenu = new QPopupMenu( currentbox ); qmenu = new TQPopupMenu( currentbox );
connect(currentbox, SIGNAL( contextMenuRequested( QListViewItem *, const QPoint& , int ) ), connect(currentbox, SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint& , int ) ),
this, SLOT( slotRMB( QListViewItem *, const QPoint &, int ) ) ); this, SLOT( slotRMB( TQListViewItem *, const TQPoint &, int ) ) );
dir_layout2->addWidget(currentbox); dir_layout2->addWidget(currentbox);
@ -154,7 +154,7 @@ Kuarantine::Kuarantine(QWidget *parent, const char *name)
refresh(); refresh();
KButtonBox *actionbox = new KButtonBox(hlp2, Qt::Vertical); KButtonBox *actionbox = new KButtonBox(hlp2, TQt::Vertical);
actionbox->addStretch(); actionbox->addStretch();
refresh_button = actionbox->addButton(i18n("&Refresh")); refresh_button = actionbox->addButton(i18n("&Refresh"));
refresh_button->setDefault(true); refresh_button->setDefault(true);
@ -178,48 +178,48 @@ Kuarantine::Kuarantine(QWidget *parent, const char *name)
QGroupBox *group3 = new QGroupBox(i18n("Quarantine History"), this); TQGroupBox *group3 = new TQGroupBox(i18n("Quarantine History"), this);
vbox->addWidget(group3); vbox->addWidget(group3);
QGridLayout *layout3 = new QGridLayout( group3, 9, 2, KDialog::spacingHint(), TQGridLayout *layout3 = new TQGridLayout( group3, 9, 2, KDialog::spacingHint(),
KDialog::spacingHint(), "layout3"); KDialog::spacingHint(), "layout3");
layout3->addRowSpacing(0, group3->fontMetrics().height()); layout3->addRowSpacing(0, group3->fontMetrics().height());
layout3->setColStretch(0, 1); layout3->setColStretch(0, 1);
layout3->setColStretch(1, 1); layout3->setColStretch(1, 1);
QWidget *hlp3 = new QWidget( group3 ); TQWidget *hlp3 = new TQWidget( group3 );
layout3->addMultiCellWidget(hlp3, 1,1, 0,2); layout3->addMultiCellWidget(hlp3, 1,1, 0,2);
QHBoxLayout *dir_layout3 = new QHBoxLayout(hlp3, KDialog::spacingHint() ); TQHBoxLayout *dir_layout3 = new TQHBoxLayout(hlp3, KDialog::spacingHint() );
// historybox = new QListBox(hlp3); // historybox = new TQListBox(hlp3);
// QFontMetrics rb_fm3(historybox->fontMetrics()); // TQFontMetrics rb_fm3(historybox->fontMetrics());
// historybox->setMinimumSize(rb_fm3.width("0")*25, // historybox->setMinimumSize(rb_fm3.width("0")*25,
// rb_fm3.lineSpacing()*8); // rb_fm3.lineSpacing()*8);
// dir_layout3->addWidget(historybox); // dir_layout3->addWidget(historybox);
historybox = new QListView(hlp3); historybox = new TQListView(hlp3);
historybox->setShowSortIndicator(true); historybox->setShowSortIndicator(true);
QFontMetrics rb_fm2(historybox->fontMetrics()); TQFontMetrics rb_fm2(historybox->fontMetrics());
//historybox->setMinimumSize(rb_fm2.width("0")*55, //historybox->setMinimumSize(rb_fm2.width("0")*55,
// rb_fm2.lineSpacing()*15); // rb_fm2.lineSpacing()*15);
historybox->addColumn( i18n( "Name of File" ),(historybox->width())); historybox->addColumn( i18n( "Name of File" ),(historybox->width()));
historybox->addColumn( i18n( "Name of Virus Found" ),(historybox->width())); historybox->addColumn( i18n( "Name of Virus Found" ),(historybox->width()));
historybox->addColumn( i18n( "Date Quarantined" ),(historybox->width())); historybox->addColumn( i18n( "Date Quarantined" ),(historybox->width()));
historybox->setResizeMode(QListView::AllColumns); historybox->setResizeMode(TQListView::AllColumns);
historybox->setSelectionMode( QListView::Extended ); historybox->setSelectionMode( TQListView::Extended );
historybox->setAllColumnsShowFocus(true); historybox->setAllColumnsShowFocus(true);
hmenu = new QPopupMenu( historybox ); hmenu = new TQPopupMenu( historybox );
connect(historybox, SIGNAL( contextMenuRequested( QListViewItem *, const QPoint& , int ) ), connect(historybox, SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint& , int ) ),
this, SLOT( slotRMB( QListViewItem *, const QPoint &, int ) ) ); this, SLOT( slotRMB( TQListViewItem *, const TQPoint &, int ) ) );
dir_layout3->addWidget(historybox); dir_layout3->addWidget(historybox);
//layout->addMultiCellWidget(historybox, 2, 2, 0, 2); //layout->addMultiCellWidget(historybox, 2, 2, 0, 2);
KButtonBox *actionbox3 = new KButtonBox(hlp3, Qt::Vertical); KButtonBox *actionbox3 = new KButtonBox(hlp3, TQt::Vertical);
actionbox3->addStretch(); actionbox3->addStretch();
search_button3 = actionbox3->addButton(i18n("&Clear All")); search_button3 = actionbox3->addButton(i18n("&Clear All"));
search_button3->setDefault(true); search_button3->setDefault(true);
@ -249,10 +249,10 @@ void Kuarantine::refresh()
{ {
QStringList obsoleteQuarItems; TQStringList obsoleteQuarItems;
config = KGlobal::config(); config = KGlobal::config();
config->setGroup("Kuarantine"); config->setGroup("Kuarantine");
lastQuarItems = config->readListEntry(QString("Items %1").arg(quarloc)); lastQuarItems = config->readListEntry(TQString("Items %1").arg(quarloc));
if (!(KIO::NetAccess::exists(quarloc,TRUE,NULL))){ if (!(KIO::NetAccess::exists(quarloc,TRUE,NULL))){
KMessageBox::information (this,i18n("Your current quarantine location ('%1') no longer exists. I'm going to attempt to create a new one.").arg(quarloc)); KMessageBox::information (this,i18n("Your current quarantine location ('%1') no longer exists. I'm going to attempt to create a new one.").arg(quarloc));
@ -260,14 +260,14 @@ void Kuarantine::refresh()
}else{ }else{
currentbox->clear(); currentbox->clear();
for (QStringList::Iterator it = lastQuarItems.begin(); it != lastQuarItems.end(); it++ ){ for (TQStringList::Iterator it = lastQuarItems.begin(); it != lastQuarItems.end(); it++ ){
QString fname = getFileName(*it); TQString fname = getFileName(*it);
QString itemname = getVirusName(*it); TQString itemname = getVirusName(*it);
QString when = getWhen(*it); TQString when = getWhen(*it);
QStringList tokens = QStringList::split ( "/", fname, FALSE ); TQStringList tokens = TQStringList::split ( "/", fname, FALSE );
QString qname = tokens.last(); TQString qname = tokens.last();
qname.prepend("/"); qname.prepend("/");
qname.prepend(quarloc); qname.prepend(quarloc);
@ -275,17 +275,17 @@ void Kuarantine::refresh()
//kdDebug() << qname << endl; //kdDebug() << qname << endl;
if (KIO::NetAccess::exists(qname,TRUE,NULL)){ if (KIO::NetAccess::exists(qname,TRUE,NULL)){
//currentbox->insertItem(*it); //currentbox->insertItem(*it);
new QListViewItem( currentbox, fname, itemname,when); new TQListViewItem( currentbox, fname, itemname,when);
}else{ }else{
//kdDebug() << qname << "doesna exist" << endl; //kdDebug() << qname << "doesna exist" << endl;
obsoleteQuarItems.append(*it); obsoleteQuarItems.append(*it);
} }
} }
for (QStringList::Iterator it = obsoleteQuarItems.begin(); it != obsoleteQuarItems.end(); it++ ) for (TQStringList::Iterator it = obsoleteQuarItems.begin(); it != obsoleteQuarItems.end(); it++ )
lastQuarItems.remove(*it); lastQuarItems.remove(*it);
config->writeEntry(QString("Items %1").arg(quarloc), lastQuarItems); config->writeEntry(TQString("Items %1").arg(quarloc), lastQuarItems);
} }
config->sync(); config->sync();
@ -295,32 +295,32 @@ void Kuarantine::refreshhistory()
{ {
config = KGlobal::config(); config = KGlobal::config();
config->setGroup("Kuarantine"); config->setGroup("Kuarantine");
lastHistoryItems = config->readListEntry(QString("History %1").arg(quarloc)); lastHistoryItems = config->readListEntry(TQString("History %1").arg(quarloc));
historybox->clear(); historybox->clear();
for (QStringList::Iterator it = lastHistoryItems.begin(); it != lastHistoryItems.end(); it++ ){ for (TQStringList::Iterator it = lastHistoryItems.begin(); it != lastHistoryItems.end(); it++ ){
QString fname = getFileName(*it); TQString fname = getFileName(*it);
QString itemname = getVirusName(*it); TQString itemname = getVirusName(*it);
QString when = getWhen(*it); TQString when = getWhen(*it);
new QListViewItem( historybox, fname, itemname,when); new TQListViewItem( historybox, fname, itemname,when);
} }
} }
void Kuarantine::load() void Kuarantine::load()
{ {
QString target; TQString target;
// the below code is what you should normally do. in this // the below code is what you should normally do. in this
// example case, we want the url to our own. you probably // example case, we want the url to our own. you probably
// want to use this code instead for your app // want to use this code instead for your app
currentbox->clear(); currentbox->clear();
for (QStringList::Iterator it = lastQuarItems.begin(); it != lastQuarItems.end(); it++ ){ for (TQStringList::Iterator it = lastQuarItems.begin(); it != lastQuarItems.end(); it++ ){
QString fname = getFileName(*it); TQString fname = getFileName(*it);
QString itemname = getVirusName(*it); TQString itemname = getVirusName(*it);
QString when = getWhen(*it); TQString when = getWhen(*it);
new QListViewItem( currentbox, fname, itemname,when); new TQListViewItem( currentbox, fname, itemname,when);
} }
} }
@ -331,22 +331,22 @@ void Kuarantine::slotSearch()
//if (!(currentbox->selectedItem())) //if (!(currentbox->selectedItem()))
// return; // return;
QPtrList<QListViewItem> list; TQPtrList<TQListViewItem> list;
QListViewItemIterator it( currentbox, QListViewItemIterator::Selected ); TQListViewItemIterator it( currentbox, TQListViewItemIterator::Selected );
while ( it.current() ) { while ( it.current() ) {
QListViewItem* tItem = it.current(); TQListViewItem* tItem = it.current();
config = KGlobal::config(); config = KGlobal::config();
config->setGroup("Kuarantine"); config->setGroup("Kuarantine");
lastQuarItems = config->readListEntry(QString("Items %1").arg(quarloc)); lastQuarItems = config->readListEntry(TQString("Items %1").arg(quarloc));
lastHistoryItems = config->readListEntry(QString("History %1").arg(quarloc)); lastHistoryItems = config->readListEntry(TQString("History %1").arg(quarloc));
QString fname = tItem->text(0); TQString fname = tItem->text(0);
QStringList tokens = QStringList::split ( "/", fname, FALSE ); TQStringList tokens = TQStringList::split ( "/", fname, FALSE );
QString qname = tokens.last(); TQString qname = tokens.last();
qname.prepend("/"); qname.prepend("/");
qname.prepend(quarloc); qname.prepend(quarloc);
qname.append(":"+tItem->text(2)); qname.append(":"+tItem->text(2));
@ -357,7 +357,7 @@ void Kuarantine::slotSearch()
//currentbox->takeItem(currentbox->currentItem()); //currentbox->takeItem(currentbox->currentItem());
list.prepend( it.current() ); list.prepend( it.current() );
config->writeEntry(QString("Items %1").arg(quarloc), lastQuarItems); config->writeEntry(TQString("Items %1").arg(quarloc), lastQuarItems);
config->sync(); config->sync();
}else{ }else{
KMessageBox::information (this,i18n("<p>There was a problem restoring <b>%1</b>. Check your diskspace, the permissions on the location you are restoring to, and whether a file with the same name already exists in that location. </p>").arg(fname)); KMessageBox::information (this,i18n("<p>There was a problem restoring <b>%1</b>. Check your diskspace, the permissions on the location you are restoring to, and whether a file with the same name already exists in that location. </p>").arg(fname));
@ -365,7 +365,7 @@ void Kuarantine::slotSearch()
++it; ++it;
} }
for( QListViewItem *item = list.first(); item; item = list.next() ) for( TQListViewItem *item = list.first(); item; item = list.next() )
{ {
delete item; delete item;
} }
@ -408,30 +408,30 @@ void Kuarantine::slotCancel()
//if (!(currentbox->selectedItem())) //if (!(currentbox->selectedItem()))
// return; // return;
QPtrList<QListViewItem> list; TQPtrList<TQListViewItem> list;
QListViewItemIterator it( currentbox, QListViewItemIterator::Selected ); TQListViewItemIterator it( currentbox, TQListViewItemIterator::Selected );
while ( it.current() ) { while ( it.current() ) {
//QListViewItem* tItem = ( *it ); //TQListViewItem* tItem = ( *it );
//if (tItem->isSelected()){ //if (tItem->isSelected()){
config = KGlobal::config(); config = KGlobal::config();
config->setGroup("Kuarantine"); config->setGroup("Kuarantine");
lastQuarItems = config->readListEntry(QString("Items %1").arg(quarloc)); lastQuarItems = config->readListEntry(TQString("Items %1").arg(quarloc));
lastHistoryItems = config->readListEntry(QString("History %1").arg(quarloc)); lastHistoryItems = config->readListEntry(TQString("History %1").arg(quarloc));
QString QuarLocation = dir_combo->url(); TQString QuarLocation = dir_combo->url();
//QStringList tokens = QStringList::split ( ":", ( it.current() )->text(), FALSE ); //TQStringList tokens = TQStringList::split ( ":", ( it.current() )->text(), FALSE );
QString fname = ( it.current() )->text(0); TQString fname = ( it.current() )->text(0);
QString itemname = ( it.current() )->text(1); TQString itemname = ( it.current() )->text(1);
QString when = ( it.current() )->text(2); TQString when = ( it.current() )->text(2);
QStringList tokens = QStringList::split ( "/", fname, FALSE ); TQStringList tokens = TQStringList::split ( "/", fname, FALSE );
QString qname = tokens.last(); TQString qname = tokens.last();
qname.prepend("/"); qname.prepend("/");
qname.prepend(QuarLocation); qname.prepend(QuarLocation);
qname.append(":"+( it.current() )->text(2)); qname.append(":"+( it.current() )->text(2));
@ -441,7 +441,7 @@ void Kuarantine::slotCancel()
lastQuarItems.remove(( it.current() )->text(0)+":"+( it.current() )->text(1)+":"+( it.current() )->text(2)); lastQuarItems.remove(( it.current() )->text(0)+":"+( it.current() )->text(1)+":"+( it.current() )->text(2));
lastHistoryItems.prepend(( it.current() )->text(0)+":"+( it.current() )->text(1)+":"+( it.current() )->text(2)); lastHistoryItems.prepend(( it.current() )->text(0)+":"+( it.current() )->text(1)+":"+( it.current() )->text(2));
new QListViewItem( historybox, fname, itemname,when); new TQListViewItem( historybox, fname, itemname,when);
//historybox->inser( it.current() )(( it.current() )->text()); //historybox->inser( it.current() )(( it.current() )->text());
//currentbox->takeItem(( it.current() )); //currentbox->takeItem(( it.current() ));
@ -453,13 +453,13 @@ void Kuarantine::slotCancel()
++it; ++it;
} }
for( QListViewItem *item = list.first(); item; item = list.next() ) for( TQListViewItem *item = list.first(); item; item = list.next() )
{ {
delete item; delete item;
} }
config->writeEntry(QString("Items %1").arg(quarloc), lastQuarItems); config->writeEntry(TQString("Items %1").arg(quarloc), lastQuarItems);
config->writeEntry(QString("History %1").arg(quarloc), lastHistoryItems); config->writeEntry(TQString("History %1").arg(quarloc), lastHistoryItems);
config->sync(); config->sync();
@ -475,14 +475,14 @@ void Kuarantine::slotClearHistory()
historybox->clear(); historybox->clear();
config = KGlobal::config(); config = KGlobal::config();
config->setGroup("Kuarantine"); config->setGroup("Kuarantine");
lastHistoryItems = config->readListEntry(QString("History %1").arg(quarloc)); lastHistoryItems = config->readListEntry(TQString("History %1").arg(quarloc));
if (lastHistoryItems.isEmpty()) if (lastHistoryItems.isEmpty())
return; return;
lastHistoryItems.clear(); lastHistoryItems.clear();
config->writeEntry(QString("History %1").arg(quarloc), lastHistoryItems); config->writeEntry(TQString("History %1").arg(quarloc), lastHistoryItems);
config->sync(); config->sync();
@ -495,14 +495,14 @@ void Kuarantine::slotDeleteHistory()
//if (!(historybox->selectedItem())) //if (!(historybox->selectedItem()))
// return; // return;
//QListViewItem* tItem = historybox->selectedItem(); //TQListViewItem* tItem = historybox->selectedItem();
config->setGroup("Kuarantine"); config->setGroup("Kuarantine");
lastHistoryItems = config->readListEntry(QString("History %1").arg(quarloc)); lastHistoryItems = config->readListEntry(TQString("History %1").arg(quarloc));
QPtrList<QListViewItem> list; TQPtrList<TQListViewItem> list;
QListViewItemIterator it( historybox, QListViewItemIterator::Selected ); TQListViewItemIterator it( historybox, TQListViewItemIterator::Selected );
while ( it.current() ) { while ( it.current() ) {
@ -512,36 +512,36 @@ void Kuarantine::slotDeleteHistory()
++it; ++it;
} }
for( QListViewItem *item = list.first(); item; item = list.next() ) for( TQListViewItem *item = list.first(); item; item = list.next() )
{ {
delete item; delete item;
} }
config->writeEntry(QString("History %1").arg(quarloc), lastHistoryItems); config->writeEntry(TQString("History %1").arg(quarloc), lastHistoryItems);
config->sync(); config->sync();
} }
void Kuarantine::setDirName(QString dir){ void Kuarantine::setDirName(TQString dir){
// dir_combo->setEditText(dir); // dir_combo->setEditText(dir);
dir_combo->setURL(dir); dir_combo->setURL(dir);
} }
void Kuarantine::createQuarDir(){ void Kuarantine::createQuarDir(){
QString path = getenv("HOME"); TQString path = getenv("HOME");
bool ok = true; bool ok = true;
// directory exist? // directory exist?
path += "/.klamav"; path += "/.klamav";
QDir klamavdir(path); TQDir klamavdir(path);
if (!klamavdir.exists() && !klamavdir.mkdir(path)) if (!klamavdir.exists() && !klamavdir.mkdir(path))
ok = false; ok = false;
path += "/quarantine"; path += "/quarantine";
if (ok) if (ok)
{ {
QDir klamavqdir(path); TQDir klamavqdir(path);
if (!klamavqdir.exists() && !klamavqdir.mkdir(path)) if (!klamavqdir.exists() && !klamavqdir.mkdir(path))
ok = false; ok = false;
else else
@ -549,8 +549,8 @@ void Kuarantine::createQuarDir(){
} }
if (ok){ if (ok){
quarloc = QString("%1").arg(path); quarloc = TQString("%1").arg(path);
lastQuarLocations.append( QString("%1").arg(path)); lastQuarLocations.append( TQString("%1").arg(path));
config = KGlobal::config(); config = KGlobal::config();
config->setGroup("Kuarantine"); config->setGroup("Kuarantine");
config->writeEntry("KuarantineLocations", lastQuarLocations); config->writeEntry("KuarantineLocations", lastQuarLocations);
@ -559,16 +559,16 @@ void Kuarantine::createQuarDir(){
} }
KMessageBox::information (this,QString(ok ? i18n( "Your default quarantine location has been set up as '%1'. You can change this to something else if you want to." ) : i18n( "I cannot create the directory '%1' for you. Something is wrong with your HOME or klamav directory. You have to adjust your quarantine directory by your self." )).arg(path)); KMessageBox::information (this,TQString(ok ? i18n( "Your default quarantine location has been set up as '%1'. You can change this to something else if you want to." ) : i18n( "I cannot create the directory '%1' for you. Something is wrong with your HOME or klamav directory. You have to adjust your quarantine directory by your self." )).arg(path));
} }
QString Kuarantine::getFileName(QString entry){ TQString Kuarantine::getFileName(TQString entry){
int fnameStartPoint = 0; int fnameStartPoint = 0;
int dtStartPoint = entry.findRev(":"); int dtStartPoint = entry.findRev(":");
int fnameEndPoint = entry.findRev(":", (signed int)-((entry.length() - dtStartPoint)+1)); int fnameEndPoint = entry.findRev(":", (signed int)-((entry.length() - dtStartPoint)+1));
QString fname = entry.mid(fnameStartPoint,(fnameEndPoint - fnameStartPoint)); TQString fname = entry.mid(fnameStartPoint,(fnameEndPoint - fnameStartPoint));
//kdDebug() << fname << endl; //kdDebug() << fname << endl;
@ -576,12 +576,12 @@ QString Kuarantine::getFileName(QString entry){
} }
QString Kuarantine::getVirusName(QString entry){ TQString Kuarantine::getVirusName(TQString entry){
int dtStartPoint = entry.findRev(":"); int dtStartPoint = entry.findRev(":");
int fnameEndPoint = entry.findRev(":", (signed int)-((entry.length() - dtStartPoint)+1)); int fnameEndPoint = entry.findRev(":", (signed int)-((entry.length() - dtStartPoint)+1));
QString itemName = entry.mid((fnameEndPoint+1),((dtStartPoint+1) - (fnameEndPoint+2))); TQString itemName = entry.mid((fnameEndPoint+1),((dtStartPoint+1) - (fnameEndPoint+2)));
//kdDebug() << itemName << endl; //kdDebug() << itemName << endl;
@ -589,11 +589,11 @@ QString Kuarantine::getVirusName(QString entry){
} }
QString Kuarantine::getWhen(QString entry){ TQString Kuarantine::getWhen(TQString entry){
int dtStartPoint = entry.findRev(":"); int dtStartPoint = entry.findRev(":");
QString when = entry.mid((dtStartPoint+1),(entry.length() - (dtStartPoint+1))); TQString when = entry.mid((dtStartPoint+1),(entry.length() - (dtStartPoint+1)));
//kdDebug() << when << endl; //kdDebug() << when << endl;
@ -601,38 +601,38 @@ QString Kuarantine::getWhen(QString entry){
} }
void Kuarantine::slotRMB( QListViewItem* Item, const QPoint & point, int ) void Kuarantine::slotRMB( TQListViewItem* Item, const TQPoint & point, int )
{ {
if( Item ){ if( Item ){
QPixmap gicon; TQPixmap gicon;
QPixmap vicon; TQPixmap vicon;
QPixmap ticon; TQPixmap ticon;
QPixmap vlicon; TQPixmap vlicon;
QString iconPath = locate("cache", KMimeType::favIconForURL("http://www.viruspool.net")+".png"); TQString iconPath = locate("cache", KMimeType::favIconForURL("http://www.viruspool.net")+".png");
if ( iconPath.isEmpty() ) if ( iconPath.isEmpty() )
vicon = SmallIcon("find"); vicon = SmallIcon("find");
else else
vicon = QPixmap( iconPath ); vicon = TQPixmap( iconPath );
iconPath = locate("cache", KMimeType::favIconForURL("http://www.google.com")+".png"); iconPath = locate("cache", KMimeType::favIconForURL("http://www.google.com")+".png");
if ( iconPath.isEmpty() ) if ( iconPath.isEmpty() )
gicon = SmallIcon("find"); gicon = SmallIcon("find");
else else
gicon = QPixmap( iconPath ); gicon = TQPixmap( iconPath );
iconPath = locate("cache", KMimeType::favIconForURL("http://www.trendmicro.com")+".png"); iconPath = locate("cache", KMimeType::favIconForURL("http://www.trendmicro.com")+".png");
if ( iconPath.isEmpty() ) if ( iconPath.isEmpty() )
ticon = SmallIcon("find"); ticon = SmallIcon("find");
else else
ticon = QPixmap( iconPath ); ticon = TQPixmap( iconPath );
iconPath = locate("cache", KMimeType::favIconForURL("http://www.viruslist.com")+".png"); iconPath = locate("cache", KMimeType::favIconForURL("http://www.viruslist.com")+".png");
if ( iconPath.isEmpty() ) if ( iconPath.isEmpty() )
vlicon = SmallIcon("find"); vlicon = SmallIcon("find");
else else
vlicon = QPixmap( iconPath ); vlicon = TQPixmap( iconPath );
if (Item->listView() == currentbox){ if (Item->listView() == currentbox){
@ -657,50 +657,50 @@ void Kuarantine::slotRMB( QListViewItem* Item, const QPoint & point, int )
void Kuarantine::slotVirusPoolCurrent() void Kuarantine::slotVirusPoolCurrent()
{ {
QString name = currentbox->currentItem()->text(1); TQString name = currentbox->currentItem()->text(1);
kmain->klamdb->slotExternal(name,"VirusPool"); kmain->klamdb->slotExternal(name,"VirusPool");
} }
void Kuarantine::slotVirusListCurrent() void Kuarantine::slotVirusListCurrent()
{ {
QString name = currentbox->currentItem()->text(1); TQString name = currentbox->currentItem()->text(1);
kmain->klamdb->slotExternal(name,"VirusList"); kmain->klamdb->slotExternal(name,"VirusList");
} }
void Kuarantine::slotGoogleCurrent() void Kuarantine::slotGoogleCurrent()
{ {
QString name = currentbox->currentItem()->text(1); TQString name = currentbox->currentItem()->text(1);
kmain->klamdb->slotExternal(name,"Google"); kmain->klamdb->slotExternal(name,"Google");
} }
void Kuarantine::slotTrendMicroCurrent() void Kuarantine::slotTrendMicroCurrent()
{ {
QString name = currentbox->currentItem()->text(1); TQString name = currentbox->currentItem()->text(1);
kmain->klamdb->slotExternal(name, "TrendMicro"); kmain->klamdb->slotExternal(name, "TrendMicro");
} }
void Kuarantine::slotVirusPoolHistory() void Kuarantine::slotVirusPoolHistory()
{ {
QString name = historybox->currentItem()->text(1); TQString name = historybox->currentItem()->text(1);
kmain->klamdb->slotExternal(name,"VirusPool"); kmain->klamdb->slotExternal(name,"VirusPool");
} }
void Kuarantine::slotVirusListHistory() void Kuarantine::slotVirusListHistory()
{ {
QString name = historybox->currentItem()->text(1); TQString name = historybox->currentItem()->text(1);
kmain->klamdb->slotExternal(name,"VirusList"); kmain->klamdb->slotExternal(name,"VirusList");
} }
void Kuarantine::slotGoogleHistory() void Kuarantine::slotGoogleHistory()
{ {
QString name = historybox->currentItem()->text(1); TQString name = historybox->currentItem()->text(1);
kmain->klamdb->slotExternal(name,"Google"); kmain->klamdb->slotExternal(name,"Google");
} }
void Kuarantine::slotTrendMicroHistory() void Kuarantine::slotTrendMicroHistory()
{ {
QString name = historybox->currentItem()->text(1); TQString name = historybox->currentItem()->text(1);
kmain->klamdb->slotExternal(name, "TrendMicro"); kmain->klamdb->slotExternal(name, "TrendMicro");
} }

@ -17,16 +17,16 @@
class KPrinter; class KPrinter;
class KToggleAction; class KToggleAction;
class KURL; class KURL;
class QLineEdit; class TQLineEdit;
class QComboBox; class TQComboBox;
class QCheckBox; class TQCheckBox;
class QListView; class TQListView;
class QPushButton; class TQPushButton;
class QLabel; class TQLabel;
class KProcess; class KProcess;
class KConfig; class KConfig;
class KURLRequester; class KURLRequester;
class QListViewItem; class TQListViewItem;
/** /**
@ -37,14 +37,14 @@ class QListViewItem;
* @author $AUTHOR <$EMAIL> * @author $AUTHOR <$EMAIL>
* @version $APP_VERSION * @version $APP_VERSION
*/ */
class Kuarantine : public QWidget class Kuarantine : public TQWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
/** /**
* Default Constructor * Default Constructor
*/ */
Kuarantine(QWidget *parent, const char *name=0); Kuarantine(TQWidget *parent, const char *name=0);
/** /**
* Default Destructor * Default Destructor
@ -55,19 +55,19 @@ public:
* Use this method to load whatever file/URL you have * Use this method to load whatever file/URL you have
*/ */
void load(); void load();
void setDirName(QString); void setDirName(TQString);
void createQuarDir(); void createQuarDir();
QString getFileName(QString); TQString getFileName(TQString);
QString getVirusName(QString); TQString getVirusName(TQString);
QString getWhen(QString); TQString getWhen(TQString);
QString getSelectedVirusName(); TQString getSelectedVirusName();
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:
/** /**
@ -97,10 +97,10 @@ private slots:
void optionsPreferences(); void optionsPreferences();
void newToolbarConfig(); void newToolbarConfig();
*/ */
//void changeStatusbar(const QString& text); //void changeStatusbar(const TQString& text);
//void changeCaption(const QString& text); //void changeCaption(const TQString& text);
void slotRMB( QListViewItem *, const QPoint &, int ); void slotRMB( TQListViewItem *, const TQPoint &, int );
//void resizeEvent ( QResizeEvent * ); //void resizeEvent ( TQResizeEvent * );
private: private:
void setupAccel(); void setupAccel();
void setupActions(); void setupActions();
@ -114,7 +114,7 @@ private:
signals: signals:
void itemSelected(QString abs_filename, int line); void itemSelected(TQString abs_filename, int line);
public slots: public slots:
@ -135,28 +135,28 @@ private slots:
void slotTrendMicroHistory(); void slotTrendMicroHistory();
void slotVirusListHistory(); void slotVirusListHistory();
//void patternTextChanged( const QString &); //void patternTextChanged( const TQString &);
private: private:
void getout(); void getout();
QLineEdit *template_edit; TQLineEdit *template_edit;
QComboBox *files_combo, *pattern_combo/*, *dir_combo*/; TQComboBox *files_combo, *pattern_combo/*, *dir_combo*/;
KURLRequester *dir_combo; KURLRequester *dir_combo;
QCheckBox *recursive_box; TQCheckBox *recursive_box;
QListView *currentbox; TQListView *currentbox;
QListView *historybox; TQListView *historybox;
QPushButton *search_button, *cancel_button, *refresh_button, *search_button3, *cancel_button3; TQPushButton *search_button, *cancel_button, *refresh_button, *search_button3, *cancel_button3;
QLabel *status_label, *matches_label; TQLabel *status_label, *matches_label;
KProcess *childproc; KProcess *childproc;
QString buf; TQString buf;
KConfig* config; KConfig* config;
QStringList lastQuarItems; TQStringList lastQuarItems;
QStringList lastHistoryItems; TQStringList lastHistoryItems;
QStringList lastQuarLocations; TQStringList lastQuarLocations;
QStringList lastSearchPaths; TQStringList lastSearchPaths;
QString quarloc; TQString quarloc;
QPopupMenu* qmenu; TQPopupMenu* qmenu;
QPopupMenu* hmenu; TQPopupMenu* hmenu;
}; };

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>LogOptions</class> <class>LogOptions</class>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>LogOptions</cstring> <cstring>LogOptions</cstring>
</property> </property>
@ -15,7 +15,7 @@
<property name="caption"> <property name="caption">
<string>Options for Logging</string> <string>Options for Logging</string>
</property> </property>
<widget class="QGroupBox"> <widget class="TQGroupBox">
<property name="name"> <property name="name">
<cstring>LimitsGroup</cstring> <cstring>LimitsGroup</cstring>
</property> </property>
@ -30,7 +30,7 @@
<property name="title"> <property name="title">
<string>Logging Options</string> <string>Logging Options</string>
</property> </property>
<widget class="QLabel"> <widget class="TQLabel">
<property name="name"> <property name="name">
<cstring>textLabel2</cstring> <cstring>textLabel2</cstring>
</property> </property>
@ -46,7 +46,7 @@
<string>Log the following events:</string> <string>Log the following events:</string>
</property> </property>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout4</cstring> <cstring>layout4</cstring>
</property> </property>
@ -62,7 +62,7 @@
<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>kcfg_LaunchShutdown</cstring> <cstring>kcfg_LaunchShutdown</cstring>
</property> </property>
@ -73,7 +73,7 @@
<string>Alt+A</string> <string>Alt+A</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>kcfg_StartedStoppedCancelled</cstring> <cstring>kcfg_StartedStoppedCancelled</cstring>
</property> </property>
@ -84,7 +84,7 @@
<string>Alt+D</string> <string>Alt+D</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>kcfg_Quarantined</cstring> <cstring>kcfg_Quarantined</cstring>
</property> </property>
@ -95,7 +95,7 @@
<string>Alt+F</string> <string>Alt+F</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>kcfg_DBUpdates</cstring> <cstring>kcfg_DBUpdates</cstring>
</property> </property>
@ -106,7 +106,7 @@
<string>Alt+B</string> <string>Alt+B</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>kcfg_SoftwareUpdates</cstring> <cstring>kcfg_SoftwareUpdates</cstring>
</property> </property>
@ -117,7 +117,7 @@
<string>Alt+U</string> <string>Alt+U</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>kcfg_VirusFound</cstring> <cstring>kcfg_VirusFound</cstring>
</property> </property>
@ -128,7 +128,7 @@
<string>Alt+V</string> <string>Alt+V</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox"> <widget class="TQCheckBox">
<property name="name"> <property name="name">
<cstring>kcfg_Error</cstring> <cstring>kcfg_Error</cstring>
</property> </property>
@ -141,7 +141,7 @@
</widget> </widget>
</vbox> </vbox>
</widget> </widget>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout5</cstring> <cstring>layout5</cstring>
</property> </property>
@ -157,12 +157,12 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QSpinBox" row="0" column="1"> <widget class="TQSpinBox" row="0" column="1">
<property name="name"> <property name="name">
<cstring>kcfg_ExpireDays</cstring> <cstring>kcfg_ExpireDays</cstring>
</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>MaxMBsEx</cstring> <cstring>MaxMBsEx</cstring>
</property> </property>
@ -170,7 +170,7 @@
<string>Expire events after</string> <string>Expire events after</string>
</property> </property>
</widget> </widget>
<widget class="QLabel" row="0" column="2"> <widget class="TQLabel" row="0" column="2">
<property name="name"> <property name="name">
<cstring>MaxMBsEx_2</cstring> <cstring>MaxMBsEx_2</cstring>
</property> </property>

@ -17,12 +17,12 @@
#include <kpopupmenu.h> #include <kpopupmenu.h>
#include <qmetaobject.h> #include <tqmetaobject.h>
#include <private/qucomextra_p.h> #include <private/qucomextra_p.h>
using namespace KlamAV; using namespace KlamAV;
PageViewer::PageViewer(QWidget *parent, const char *name) PageViewer::PageViewer(TQWidget *parent, const char *name)
: Viewer(parent, name) : Viewer(parent, name)
{ {
// this hack is necessary since the part looks for []HTML Settings] in // this hack is necessary since the part looks for []HTML Settings] in
@ -54,7 +54,7 @@ PageViewer::PageViewer(QWidget *parent, const char *name)
this, SLOT(slotStop()), this, SLOT(slotStop()),
actionCollection(), "pageviewer_stop"); actionCollection(), "pageviewer_stop");
//connect( this, SIGNAL(popupMenu(const QString &, const QPoint &)), this, SLOT(slotPopupMenu(const QString &, const QPoint &))); //connect( this, SIGNAL(popupMenu(const TQString &, const TQPoint &)), this, SLOT(slotPopupMenu(const TQString &, const TQPoint &)));
m_backAction->setEnabled(false); m_backAction->setEnabled(false);
m_forwardAction->setEnabled(false); m_forwardAction->setEnabled(false);
@ -62,7 +62,7 @@ PageViewer::PageViewer(QWidget *parent, const char *name)
connect(this, SIGNAL(started(KIO::Job *)), this, SLOT(slotStarted(KIO::Job* ))); connect(this, SIGNAL(started(KIO::Job *)), this, SLOT(slotStarted(KIO::Job* )));
connect(this, SIGNAL(completed()), this, SLOT(slotCompleted())); connect(this, SIGNAL(completed()), this, SLOT(slotCompleted()));
connect(this, SIGNAL(canceled(const QString &)), this, SLOT(slotCancelled(const QString &))); connect(this, SIGNAL(canceled(const TQString &)), this, SLOT(slotCancelled(const TQString &)));
connect(browserExtension(), connect(browserExtension(),
SIGNAL(openURLRequest(const KURL&, const KParts::URLArgs&)), SIGNAL(openURLRequest(const KURL&, const KParts::URLArgs&)),
@ -107,7 +107,7 @@ void PageViewer::slotBackAboutToShow()
if ( m_current == m_history.begin() ) if ( m_current == m_history.begin() )
return; return;
QValueList<PageViewerHistoryEntry>::Iterator it = m_current; TQValueList<PageViewerHistoryEntry>::Iterator it = m_current;
--it; --it;
int i = 0; int i = 0;
@ -133,7 +133,7 @@ void PageViewer::slotForwardAboutToShow()
if ( m_current == m_history.fromLast() ) if ( m_current == m_history.fromLast() )
return; return;
QValueList<PageViewerHistoryEntry>::Iterator it = m_current; TQValueList<PageViewerHistoryEntry>::Iterator it = m_current;
++it; ++it;
int i = 0; int i = 0;
@ -173,9 +173,9 @@ bool PageViewer::openURL(const KURL &url)
m_backAction->setEnabled( m_current != m_history.begin() ); m_backAction->setEnabled( m_current != m_history.begin() );
m_forwardAction->setEnabled( m_current != m_history.fromLast() ); m_forwardAction->setEnabled( m_current != m_history.fromLast() );
/* QString favicon = FeedIconManager::self()->iconLocation(url); /* TQString favicon = FeedIconManager::self()->iconLocation(url);
if (!favicon.isEmpty()) if (!favicon.isEmpty())
emit setTabIcon(QPixmap(KGlobal::dirs()->findResource("cache", favicon+".png"))); emit setTabIcon(TQPixmap(KGlobal::dirs()->findResource("cache", favicon+".png")));
else else
emit setTabIcon(SmallIcon("html")); emit setTabIcon(SmallIcon("html"));
*/ */
@ -192,7 +192,7 @@ void PageViewer::slotOpenURLRequest(const KURL& url, const KParts::URLArgs& args
void PageViewer::slotPopupActivated( int id ) void PageViewer::slotPopupActivated( int id )
{ {
QValueList<PageViewerHistoryEntry>::Iterator it = m_history.begin(); TQValueList<PageViewerHistoryEntry>::Iterator it = m_history.begin();
while( it != m_history.end() ) while( it != m_history.end() )
{ {
if ( (*it).id == id ) if ( (*it).id == id )
@ -210,7 +210,7 @@ void PageViewer::slotPopupActivated( int id )
// Taken from KDevelop (lib/widgets/kdevhtmlpart.cpp) // Taken from KDevelop (lib/widgets/kdevhtmlpart.cpp)
void PageViewer::addHistoryEntry(const KURL& url) void PageViewer::addHistoryEntry(const KURL& url)
{ {
QValueList<PageViewerHistoryEntry>::Iterator it = m_current; TQValueList<PageViewerHistoryEntry>::Iterator it = m_current;
// if We're not already the last entry, we truncate the list here before adding an entry // if We're not already the last entry, we truncate the list here before adding an entry
if ( it != m_history.end() && it != m_history.fromLast() ) if ( it != m_history.end() && it != m_history.fromLast() )
@ -241,13 +241,13 @@ void PageViewer::slotCompleted( )
} }
// Taken from KDevelop (lib/widgets/kdevhtmlpart.cpp) // Taken from KDevelop (lib/widgets/kdevhtmlpart.cpp)
void PageViewer::slotCancelled( const QString & /*errMsg*/ ) void PageViewer::slotCancelled( const TQString & /*errMsg*/ )
{ {
m_stopAction->setEnabled(false); m_stopAction->setEnabled(false);
} }
void PageViewer::slotSetCaption(const QString& cap) { void PageViewer::slotSetCaption(const TQString& cap) {
m_caption = cap; m_caption = cap;
(*m_current).title = cap; (*m_current).title = cap;
} }
@ -257,16 +257,16 @@ void PageViewer::slotPaletteOrFontChanged()
//kdDebug() << "PageViewer::slotPaletteOrFontChanged()" << endl; //kdDebug() << "PageViewer::slotPaletteOrFontChanged()" << endl;
// taken from KonqView (kdebase/konqueror/konq_view.cc) // taken from KonqView (kdebase/konqueror/konq_view.cc)
QObject *obj = KParts::BrowserExtension::childObject(this); TQObject *obj = KParts::BrowserExtension::childObject(this);
if ( !obj ) // not all views have a browser extension ! if ( !obj ) // not all views have a browser extension !
return; return;
int id = obj->metaObject()->findSlot("reparseConfiguration()"); int id = obj->metaObject()->findSlot("reparseConfiguration()");
if (id == -1) if (id == -1)
return; return;
QUObject o[1]; TQUObject o[1];
obj->qt_invoke(id, o); obj->tqt_invoke(id, o);
// this hack is necessary since the part looks for []HTML Settings] in // this hack is necessary since the part looks for []HTML Settings] in
// KGlobal::config() by default, which is wrong when running in Kontact // KGlobal::config() by default, which is wrong when running in Kontact
@ -285,10 +285,10 @@ void PageViewer::slotGlobalBookmarkArticle()
} }
void PageViewer::slotPopupMenu(KXMLGUIClient*, const QPoint& p, const KURL& kurl, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t) void PageViewer::slotPopupMenu(KXMLGUIClient*, const TQPoint& p, const KURL& kurl, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t)
{ {
m_url = kurl; m_url = kurl;
QString url = kurl.url(); // maximal url confusion TQString url = kurl.url(); // maximal url confusion
// if true show popup menu for link. Maybe that doesn't work properly when using frames // if true show popup menu for link. Maybe that doesn't work properly when using frames
bool isLink = kurl != Viewer::url(); bool isLink = kurl != Viewer::url();

@ -11,8 +11,8 @@
#include <cstdlib> #include <cstdlib>
using std::abs; using std::abs;
#include <qdatetime.h> #include <tqdatetime.h>
#include <qstring.h> #include <tqstring.h>
#include "viewer.h" #include "viewer.h"
@ -28,13 +28,13 @@ namespace KlamAV
struct PageViewerHistoryEntry struct PageViewerHistoryEntry
{ {
KURL url; KURL url;
QString title; TQString title;
int id; int id;
PageViewerHistoryEntry() {} PageViewerHistoryEntry() {}
PageViewerHistoryEntry(const KURL& u, const QString& t=QString::null): url(u), title(t) PageViewerHistoryEntry(const KURL& u, const TQString& t=TQString::null): url(u), title(t)
{ {
id = abs( QTime::currentTime().msecsTo( QTime() ) ); // nasty, but should provide a reasonably unique number id = abs( TQTime::currentTime().msecsTo( TQTime() ) ); // nasty, but should provide a reasonably unique number
} }
}; };
@ -43,7 +43,7 @@ namespace KlamAV
{ {
Q_OBJECT Q_OBJECT
public: public:
PageViewer(QWidget* parent, const char* name); PageViewer(TQWidget* parent, const char* name);
virtual bool openURL(const KURL &url); virtual bool openURL(const KURL &url);
@ -52,7 +52,7 @@ namespace KlamAV
void slotForward(); void slotForward();
void slotReload(); void slotReload();
void slotStop(); void slotStop();
void slotSetCaption(const QString& cap); void slotSetCaption(const TQString& cap);
virtual void slotPaletteOrFontChanged(); virtual void slotPaletteOrFontChanged();
protected: protected:
@ -62,11 +62,11 @@ namespace KlamAV
protected slots: protected slots:
void slotStarted(KIO::Job *); void slotStarted(KIO::Job *);
void slotCompleted(); void slotCompleted();
void slotCancelled(const QString &errMsg); void slotCancelled(const TQString &errMsg);
void slotBackAboutToShow(); void slotBackAboutToShow();
void slotForwardAboutToShow(); void slotForwardAboutToShow();
void slotPopupActivated( int id ); void slotPopupActivated( int id );
virtual void slotPopupMenu(KXMLGUIClient*, const QPoint&, const KURL&, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t); virtual void slotPopupMenu(KXMLGUIClient*, const TQPoint&, const KURL&, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t);
void slotGlobalBookmarkArticle(); void slotGlobalBookmarkArticle();
void formClicked(const KURL& url, const KParts::URLArgs& args); void formClicked(const KURL& url, const KParts::URLArgs& args);
@ -74,11 +74,11 @@ namespace KlamAV
virtual void slotOpenURLRequest(const KURL& url, const KParts::URLArgs& args); virtual void slotOpenURLRequest(const KURL& url, const KParts::URLArgs& args);
signals: signals:
void setTabIcon(const QPixmap&); void setTabIcon(const TQPixmap&);
private: private:
QValueList<PageViewerHistoryEntry> m_history; TQValueList<PageViewerHistoryEntry> m_history;
QValueList<PageViewerHistoryEntry>::Iterator m_current; TQValueList<PageViewerHistoryEntry>::Iterator m_current;
KToolBarPopupAction* m_backAction; KToolBarPopupAction* m_backAction;
KToolBarPopupAction* m_forwardAction; KToolBarPopupAction* m_forwardAction;
@ -86,7 +86,7 @@ namespace KlamAV
KAction* m_stopAction; KAction* m_stopAction;
bool m_restoring; bool m_restoring;
QString m_caption; TQString m_caption;
}; };

@ -21,30 +21,30 @@
#include <kio/netaccess.h> #include <kio/netaccess.h>
#include <knotifyclient.h> #include <knotifyclient.h>
#include <kprocio.h> #include <kprocio.h>
#include <qlayout.h> #include <tqlayout.h>
#include <kcmdlineargs.h> #include <kcmdlineargs.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include <kstandarddirs.h> #include <kstandarddirs.h>
#include <ksystemtray.h> #include <ksystemtray.h>
#include <kprogress.h> #include <kprogress.h>
#include <qtimer.h> #include <tqtimer.h>
#include <qpushbutton.h> #include <tqpushbutton.h>
#include <qcolor.h> #include <tqcolor.h>
#include <qtooltip.h> //QToolTip::palette() #include <tqtooltip.h> //TQToolTip::palette()
#include <kdebug.h> #include <kdebug.h>
static int counter = 0; static int counter = 0;
ScanViewer::ScanViewer(QWidget *parent, const char *name) ScanViewer::ScanViewer(TQWidget *parent, const char *name)
: QWidget(parent, name) : TQWidget(parent, name)
{ {
scanInProgress = TRUE; scanInProgress = TRUE;
multiScan = FALSE; multiScan = FALSE;
//QGridLayout *layout = new QGridLayout(this, 6, 3, 10, 4); //TQGridLayout *layout = new TQGridLayout(this, 6, 3, 10, 4);
layout = new QGridLayout(this, 6, 3, 10, 4); layout = new TQGridLayout(this, 6, 3, 10, 4);
layout->setColStretch(0, 10); layout->setColStretch(0, 10);
layout->addColSpacing(1, 10); layout->addColSpacing(1, 10);
layout->setColStretch(1, 0); layout->setColStretch(1, 0);
@ -57,40 +57,40 @@ ScanViewer::ScanViewer(QWidget *parent, const char *name)
resultview = new QListView(this); resultview = new TQListView(this);
resultview->setShowSortIndicator(true); resultview->setShowSortIndicator(true);
QFontMetrics rb_fm(resultview->fontMetrics()); TQFontMetrics rb_fm(resultview->fontMetrics());
//resultview->setMinimumSize(rb_fm.width("0")*55, //resultview->setMinimumSize(rb_fm.width("0")*55,
// rb_fm.lineSpacing()*15); // rb_fm.lineSpacing()*15);
resultview->addColumn( i18n( "Name of File" ),(resultview->width()/3)); resultview->addColumn( i18n( "Name of File" ),(resultview->width()/3));
resultview->addColumn( i18n( "Name of Problem Found" ),(resultview->width()/3)); resultview->addColumn( i18n( "Name of Problem Found" ),(resultview->width()/3));
resultview->addColumn( i18n( "Status" ),(resultview->width()/3)); resultview->addColumn( i18n( "Status" ),(resultview->width()/3));
resultview->setResizeMode(QListView::AllColumns); resultview->setResizeMode(TQListView::AllColumns);
resultview->setSelectionMode( QListView::Extended ); resultview->setSelectionMode( TQListView::Extended );
resultview->setAllColumnsShowFocus(true); resultview->setAllColumnsShowFocus(true);
layout->addMultiCellWidget(resultview, 2, 2, 0, 2); layout->addMultiCellWidget(resultview, 2, 2, 0, 2);
connect( resultview, SIGNAL(onItem ( QListViewItem * )), connect( resultview, SIGNAL(onItem ( TQListViewItem * )),
SLOT(slotOnItem ( QListViewItem * ))); SLOT(slotOnItem ( TQListViewItem * )));
connect( resultview, SIGNAL(onViewport ( )), connect( resultview, SIGNAL(onViewport ( )),
SLOT(slotOffItem ( ))); SLOT(slotOffItem ( )));
menu = new QPopupMenu( resultview ); menu = new TQPopupMenu( resultview );
connect(resultview, SIGNAL( contextMenuRequested( QListViewItem *, const QPoint& , int ) ), connect(resultview, SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint& , int ) ),
this, SLOT( slotRMB( QListViewItem *, const QPoint &, int ) ) ); this, SLOT( slotRMB( TQListViewItem *, const TQPoint &, int ) ) );
status_frame = new QFrame(this); status_frame = new TQFrame(this);
status_frame->setFrameStyle(QFrame::Panel | QFrame::Sunken); status_frame->setFrameStyle(TQFrame::Panel | TQFrame::Sunken);
QBoxLayout *status_layout = new QHBoxLayout(status_frame, 2); TQBoxLayout *status_layout = new TQHBoxLayout(status_frame, 2);
status_label = new QLabel("", status_frame); status_label = new TQLabel("", status_frame);
status_layout->addWidget(status_label, 10); status_layout->addWidget(status_label, 10);
//matches_label = new QLabel(status_frame); //matches_label = new TQLabel(status_frame);
//QFontMetrics ml_fm(matches_label->fontMetrics()); //TQFontMetrics ml_fm(matches_label->fontMetrics());
//matches_label->setFixedWidth(ml_fm.width(i18n("9999 viruseses/errors found"))); //matches_label->setFixedWidth(ml_fm.width(i18n("9999 viruseses/errors found")));
//matches_label->setFixedHeight(ml_fm.lineSpacing()); //matches_label->setFixedHeight(ml_fm.lineSpacing());
//status_layout->addWidget(matches_label, 0); //status_layout->addWidget(matches_label, 0);
@ -101,11 +101,11 @@ ScanViewer::ScanViewer(QWidget *parent, const char *name)
status_frame->setMinimumSize(status_frame->size()); status_frame->setMinimumSize(status_frame->size());
layout->addMultiCellWidget(status_frame, 3, 3, 0, 2); layout->addMultiCellWidget(status_frame, 3, 3, 0, 2);
status2_frame = new QFrame(this); status2_frame = new TQFrame(this);
status2_frame->setFrameStyle(QFrame::Panel | QFrame::Sunken); status2_frame->setFrameStyle(TQFrame::Panel | TQFrame::Sunken);
status2_layout = new QHBoxLayout(status2_frame, 2); status2_layout = new TQHBoxLayout(status2_frame, 2);
status2_label = new QLabel(i18n("Files scanned: 0"), status2_frame); status2_label = new TQLabel(i18n("Files scanned: 0"), status2_frame);
status2_layout->addWidget(status2_label, 10); status2_layout->addWidget(status2_label, 10);
status2_label->hide(); status2_label->hide();
@ -119,25 +119,25 @@ ScanViewer::ScanViewer(QWidget *parent, const char *name)
prog->hide(); prog->hide();
progosd->hide(); progosd->hide();
scan_time = new QPushButton( status2_frame ); scan_time = new TQPushButton( status2_frame );
scan_time->setText(i18n("Calculating Scan Time... (Click To By-Pass)")); scan_time->setText(i18n("Calculating Scan Time... (Click To By-Pass)"));
status2_layout->addWidget(scan_time,10); status2_layout->addWidget(scan_time,10);
scan_time->adjustSize(); scan_time->adjustSize();
scan_time->show(); scan_time->show();
//status_frame->setPaletteBackgroundColor(QColor::Yellow); //status_frame->setPaletteBackgroundColor(TQColor::Yellow);
connect( scan_time, SIGNAL(clicked()), connect( scan_time, SIGNAL(clicked()),
SLOT(slotCancelScanTime()) ); SLOT(slotCancelScanTime()) );
matches2_label = new QLabel(status2_frame); matches2_label = new TQLabel(status2_frame);
QFontMetrics ml_fm2(matches2_label->fontMetrics()); TQFontMetrics ml_fm2(matches2_label->fontMetrics());
matches2_label->setFixedWidth(ml_fm2.width(i18n("9999 viruseses/problems found"))); matches2_label->setFixedWidth(ml_fm2.width(i18n("9999 viruseses/problems found")));
matches2_label->setFixedHeight(ml_fm2.lineSpacing()); matches2_label->setFixedHeight(ml_fm2.lineSpacing());
status2_layout->addWidget(matches2_label, 0); status2_layout->addWidget(matches2_label, 0);
QToolTip::add(matches2_label, i18n("cf. 'Flanderseses' - Homer Simpson. This childish joke will be removed when KlamAV is more mature.")); TQToolTip::add(matches2_label, i18n("cf. 'Flanderseses' - Homer Simpson. This childish joke will be removed when KlamAV is more mature."));
status2_layout->activate(); status2_layout->activate();
status2_frame->adjustSize(); status2_frame->adjustSize();
@ -167,7 +167,7 @@ ScanViewer::~ScanViewer()
void ScanViewer::processOutput() void ScanViewer::processOutput()
{ {
int pos; int pos;
QString item2; TQString item2;
if (!(childproc)) if (!(childproc))
return; return;
@ -182,25 +182,25 @@ void ScanViewer::processOutput()
//buf.replace("//","/"); // don't know why they're getting two slashes //buf.replace("//","/"); // don't know why they're getting two slashes
while ((childproc) && ((pos = (childproc->readln(item2,true))) != -1)) { while ((childproc) && ((pos = (childproc->readln(item2,true))) != -1)) {
QListViewItem* tm; TQListViewItem* tm;
//item2 = (buf.section('\n',j,j)).stripWhiteSpace(); //item2 = (buf.section('\n',j,j)).stripWhiteSpace();
item2 = item2.stripWhiteSpace(); item2 = item2.stripWhiteSpace();
int fnameStartPoint = 0; int fnameStartPoint = 0;
int fnameEndPoint = item2.findRev(":"); int fnameEndPoint = item2.findRev(":");
QString tmpFName = item2.mid(fnameStartPoint,(fnameEndPoint - fnameStartPoint)); TQString tmpFName = item2.mid(fnameStartPoint,(fnameEndPoint - fnameStartPoint));
tmpFName = i18n(tmpFName); tmpFName = i18n(tmpFName);
if ((pos = (item2.find(" FOUND"))) != -1){ if ((pos = (item2.find(" FOUND"))) != -1){
//if ((pos = buf.section('\n',j,j).find("FOUND")) != -1){ //if ((pos = buf.section('\n',j,j).find("FOUND")) != -1){
QString tmpVirusName = item2.mid((fnameEndPoint+1),(item2.length() - (fnameEndPoint+1))); TQString tmpVirusName = item2.mid((fnameEndPoint+1),(item2.length() - (fnameEndPoint+1)));
QDate today = QDate::currentDate(); TQDate today = TQDate::currentDate();
QTime now = QTime::currentTime(); TQTime now = TQTime::currentTime();
QString suffix = QString(":%1 %2") TQString suffix = TQString(":%1 %2")
.arg(today.toString("ddd MMMM d yyyy")) .arg(today.toString("ddd MMMM d yyyy"))
.arg(now.toString("hh-mm-ss-zzz ap")); .arg(now.toString("hh-mm-ss-zzz ap"));
if ((tmpVirusName.find("FOUND")) != -1){ if ((tmpVirusName.find("FOUND")) != -1){
tmpVirusName.replace("FOUND",""); tmpVirusName.replace("FOUND","");
tm = new QListViewItem( resultview, tmpFName, tmpVirusName.stripWhiteSpace(),"Loose"); tm = new TQListViewItem( resultview, tmpFName, tmpVirusName.stripWhiteSpace(),"Loose");
tm->setPixmap( 0, SmallIcon("klamav_virus") ); tm->setPixmap( 0, SmallIcon("klamav_virus") );
//resultview->insertItem(buf.section('\n',j,j)); //resultview->insertItem(buf.section('\n',j,j));
QuarantineList.append(tmpFName+":"+tmpVirusName+suffix); QuarantineList.append(tmpFName+":"+tmpVirusName+suffix);
@ -213,8 +213,8 @@ void ScanViewer::processOutput()
//}else if ((pos = buf.section('\n',j,j).find("ERROR:")) != -1){ //}else if ((pos = buf.section('\n',j,j).find("ERROR:")) != -1){
}else if ((pos = (item2.find("ERROR:"))) != -1){ }else if ((pos = (item2.find("ERROR:"))) != -1){
QString tmpVirusName = item2.mid((fnameEndPoint+1),(item2.length() - (fnameEndPoint+1))); TQString tmpVirusName = item2.mid((fnameEndPoint+1),(item2.length() - (fnameEndPoint+1)));
tm = new QListViewItem( resultview, tmpFName, tmpVirusName.stripWhiteSpace(),"Not a Virus"); tm = new TQListViewItem( resultview, tmpFName, tmpVirusName.stripWhiteSpace(),"Not a Virus");
tm->setPixmap( 0, SmallIcon("klamav_error") ); tm->setPixmap( 0, SmallIcon("klamav_error") );
//resultview->insertItem(buf.section('\n',j,j)); //resultview->insertItem(buf.section('\n',j,j));
CollectionDB::instance()->insertEvent("Error Found",tmpVirusName,tmpFName); CollectionDB::instance()->insertEvent("Error Found",tmpVirusName,tmpFName);
@ -225,7 +225,7 @@ void ScanViewer::processOutput()
status2_label->setText(i18n("Files scanned: %1").arg(filesscanned)); status2_label->setText(i18n("Files scanned: %1").arg(filesscanned));
//}else if ((pos = buf.section('\n',j,j).find("Scanning ")) != -1){ //}else if ((pos = buf.section('\n',j,j).find("Scanning ")) != -1){
}else if ((pos = (item2.find("Scanning"))) != -1){ }else if ((pos = (item2.find("Scanning"))) != -1){
if (status_label->palette() != QToolTip::palette()) if (status_label->palette() != TQToolTip::palette())
status_label->setText(item2); status_label->setText(item2);
//}else if ((pos = buf.section('\n',j,j).find(": OK")) != -1){ //}else if ((pos = buf.section('\n',j,j).find(": OK")) != -1){
}else if ((pos = (item2.find(": OK"))) != -1){ }else if ((pos = (item2.find(": OK"))) != -1){
@ -238,7 +238,7 @@ void ScanViewer::processOutput()
filesscanned++; filesscanned++;
if (!(showProgress)) if (!(showProgress))
status2_label->setText(i18n("Files scanned: %1").arg(filesscanned)); status2_label->setText(i18n("Files scanned: %1").arg(filesscanned));
KNotifyClient::event(kmain->_tray->winId(),"ScanAccessDenied", QString("Can't scan %1 " KNotifyClient::event(kmain->_tray->winId(),"ScanAccessDenied", TQString("Can't scan %1 "
"- Access Denied!").arg(tmpFName)); "- Access Denied!").arg(tmpFName));
CollectionDB::instance()->insertEvent("Error Found","Access Denied",tmpFName); CollectionDB::instance()->insertEvent("Error Found","Access Denied",tmpFName);
//}else if ((pos = buf.section('\n',j,j).find(": Can't open")) != -1){ //}else if ((pos = buf.section('\n',j,j).find(": Can't open")) != -1){
@ -248,7 +248,7 @@ void ScanViewer::processOutput()
filesscanned++; filesscanned++;
if (!(showProgress)) if (!(showProgress))
status2_label->setText(i18n("Files scanned: %1").arg(filesscanned)); status2_label->setText(i18n("Files scanned: %1").arg(filesscanned));
KNotifyClient::event(kmain->_tray->winId(),"ScanAccessDenied", QString("Can't scan %1 " KNotifyClient::event(kmain->_tray->winId(),"ScanAccessDenied", TQString("Can't scan %1 "
"- Access Denied!").arg(tmpFName)); "- Access Denied!").arg(tmpFName));
CollectionDB::instance()->insertEvent("Error Found","Access Denied",tmpFName); CollectionDB::instance()->insertEvent("Error Found","Access Denied",tmpFName);
}else if ((pos = (item2.find(": Empty file"))) != -1){ }else if ((pos = (item2.find(": Empty file"))) != -1){
@ -256,14 +256,14 @@ void ScanViewer::processOutput()
filesscanned++; filesscanned++;
if (!(showProgress)) if (!(showProgress))
status2_label->setText(i18n("Files scanned: %1").arg(filesscanned)); status2_label->setText(i18n("Files scanned: %1").arg(filesscanned));
//KNotifyClient::event(kmain->_tray->winId(),"ScanAccessDenied", QString("Can't scan %1 " //KNotifyClient::event(kmain->_tray->winId(),"ScanAccessDenied", TQString("Can't scan %1 "
// "- Empty File!").arg(tmpFName)); // "- Empty File!").arg(tmpFName));
CollectionDB::instance()->insertEvent("Error Found","Empty File",tmpFName); CollectionDB::instance()->insertEvent("Error Found","Empty File",tmpFName);
} }
item2 = ""; item2 = "";
} }
QString str; TQString str;
str.setNum(resultview->childCount()); str.setNum(resultview->childCount());
str += i18n(" viruseses/problems found"); str += i18n(" viruseses/problems found");
@ -278,7 +278,7 @@ void ScanViewer::processOutput()
} }
void ScanViewer::slotScan(const QStringList & filepattern, int mode, bool recursive, bool dcopscan) void ScanViewer::slotScan(const TQStringList & filepattern, int mode, bool recursive, bool dcopscan)
{ {
//KMessageBox::information (this, filepattern); //KMessageBox::information (this, filepattern);
@ -318,15 +318,15 @@ void ScanViewer::slotScan(const QStringList & filepattern, int mode, bool recurs
//progosd->setProgress(0); //progosd->setProgress(0);
kdDebug() << filepattern << endl; kdDebug() << filepattern << endl;
QStringList tmpfilepattern = filepattern; TQStringList tmpfilepattern = filepattern;
cnt = 0; cnt = 0;
//QStringList temp = QStringList::split(" ", tmpfilepattern.replace("\"","")); //TQStringList temp = TQStringList::split(" ", tmpfilepattern.replace("\"",""));
//kdDebug() << temp << endl; //kdDebug() << temp << endl;
if (calculateTime){ if (calculateTime){
for ( QStringList::Iterator it = tmpfilepattern.begin(); it != tmpfilepattern.end(); ++it ){ for ( TQStringList::Iterator it = tmpfilepattern.begin(); it != tmpfilepattern.end(); ++it ){
QDir d( QString((*it).latin1()).stripWhiteSpace() ); TQDir d( TQString((*it).latin1()).stripWhiteSpace() );
kdDebug() << "dir " << QString((*it).latin1()).stripWhiteSpace() << endl; kdDebug() << "dir " << TQString((*it).latin1()).stripWhiteSpace() << endl;
counter = 0; counter = 0;
cnt = cnt + countFiles(d); cnt = cnt + countFiles(d);
if (scanCancelled) if (scanCancelled)
@ -353,36 +353,36 @@ void ScanViewer::slotScan(const QStringList & filepattern, int mode, bool recurs
filesscanned = 0; filesscanned = 0;
//status2_label->setText(i18n("Scan in Progress...")); //status2_label->setText(i18n("Scan in Progress..."));
QString db; TQString db;
if(!( args->isSet( "scanthis" ) ) ) if(!( args->isSet( "scanthis" ) ) )
db = kmain->freshklam->getCurrentDBDir(); db = kmain->freshklam->getCurrentDBDir();
else{ else{
config->setGroup("Freshklam"); config->setGroup("Freshklam");
QStringList lastDownloadPaths = config->readListEntry("lastDownloadPaths"); TQStringList lastDownloadPaths = config->readListEntry("lastDownloadPaths");
for (QStringList::Iterator ita = lastDownloadPaths.begin(); ita == lastDownloadPaths.begin() ; ita++){ for (TQStringList::Iterator ita = lastDownloadPaths.begin(); ita == lastDownloadPaths.begin() ; ita++){
db = *ita; db = *ita;
} }
} }
////kdDebug() << "here 2" << endl; ////kdDebug() << "here 2" << endl;
QString dbpath; TQString dbpath;
QString excludes; TQString excludes;
QString options; TQString options;
if (!(db.isEmpty())) if (!(db.isEmpty()))
dbpath = QString(" -d %1 ").arg(db); dbpath = TQString(" -d %1 ").arg(db);
config->setGroup("Klamscan"); config->setGroup("Klamscan");
if (config->readEntry("ExcludeQuarantine") == "Yes"){ if (config->readEntry("ExcludeQuarantine") == "Yes"){
config->setGroup("Kuarantine"); config->setGroup("Kuarantine");
QStringList lastQuarLocations = config->readListEntry("KuarantineLocations"); TQStringList lastQuarLocations = config->readListEntry("KuarantineLocations");
QString quarloc; TQString quarloc;
for (QStringList::Iterator ita = lastQuarLocations.begin(); ita == lastQuarLocations.begin() ; ita++){ for (TQStringList::Iterator ita = lastQuarLocations.begin(); ita == lastQuarLocations.begin() ; ita++){
quarloc = *ita; quarloc = *ita;
} }
excludes += QString(" --exclude=%1 ").arg(quarloc); excludes += TQString(" --exclude=%1 ").arg(quarloc);
} }
@ -394,23 +394,23 @@ void ScanViewer::slotScan(const QStringList & filepattern, int mode, bool recurs
if (KlamavConfig::noFilesToExtract() > 0) if (KlamavConfig::noFilesToExtract() > 0)
options += "--max-files=" + QString("%1").arg(KlamavConfig::noFilesToExtract()) + " "; options += "--max-files=" + TQString("%1").arg(KlamavConfig::noFilesToExtract()) + " ";
// if (KlamavConfig::mBsToExtract() > 0) // if (KlamavConfig::mBsToExtract() > 0)
// options += "--max-space=" + QString("%1").arg(KlamavConfig::mBsToExtract()) + " "; // options += "--max-space=" + TQString("%1").arg(KlamavConfig::mBsToExtract()) + " ";
// //
// if (KlamavConfig::compressionRatio() > 0) // if (KlamavConfig::compressionRatio() > 0)
// options += "--max-ratio=" + QString("%1").arg(KlamavConfig::compressionRatio()) + " "; // options += "--max-ratio=" + TQString("%1").arg(KlamavConfig::compressionRatio()) + " ";
if (KlamavConfig::recursionLevel() > 0) if (KlamavConfig::recursionLevel() > 0)
options += "--max-recursion=" + QString("%1").arg(KlamavConfig::recursionLevel()) + " "; options += "--max-recursion=" + TQString("%1").arg(KlamavConfig::recursionLevel()) + " ";
if (KlamavConfig::maxFileSize() > 0) if (KlamavConfig::maxFileSize() > 0)
options += "--max-filesize=" + QString("%1").arg(KlamavConfig::maxFileSize()) + "M "; options += "--max-filesize=" + TQString("%1").arg(KlamavConfig::maxFileSize()) + "M ";
if (KlamavConfig::maxScanSize() > 0) if (KlamavConfig::maxScanSize() > 0)
options += "--max-scansize=" + QString("%1").arg(KlamavConfig::maxScanSize()) + "M "; options += "--max-scansize=" + TQString("%1").arg(KlamavConfig::maxScanSize()) + "M ";
//config->setGroup("Klamscan"); //config->setGroup("Klamscan");
// if (KlamavConfig::virusLimitsExceeded()) // if (KlamavConfig::virusLimitsExceeded())
@ -588,7 +588,7 @@ void ScanViewer::slotCancel()
//status2_frame->adjustSize(); //status2_frame->adjustSize();
status2_label->setText(i18n("Cancelled")); status2_label->setText(i18n("Cancelled"));
CollectionDB::instance()->insertEvent("Manual Scan",QString("Scan Cancelled"),m_filepattern.join(" ")); CollectionDB::instance()->insertEvent("Manual Scan",TQString("Scan Cancelled"),m_filepattern.join(" "));
} }
@ -607,11 +607,11 @@ void ScanViewer::childExited()
int result; int result;
status2_label->setText( i18n("Scan Complete") ); status2_label->setText( i18n("Scan Complete") );
CollectionDB::instance()->insertEvent("Manual Scan",QString("Scan Complete"),m_filepattern.join(" ")); CollectionDB::instance()->insertEvent("Manual Scan",TQString("Scan Complete"),m_filepattern.join(" "));
if (status == 0){ if (status == 0){
kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_scan_safe")); kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_scan_safe"));
QTimer::singleShot( 10000, this, SLOT(resetSysTray()) ); TQTimer::singleShot( 10000, this, SLOT(resetSysTray()) );
if (!(errorsEncountered)) if (!(errorsEncountered))
KNotifyClient::event(kmain->_tray->winId(),i18n( "ScanCompleteNoVirus" ), i18n( "Scan Complete - No Viruses Found!" )); KNotifyClient::event(kmain->_tray->winId(),i18n( "ScanCompleteNoVirus" ), i18n( "Scan Complete - No Viruses Found!" ));
else else
@ -624,7 +624,7 @@ void ScanViewer::childExited()
progosd->setText("Problems found!"); progosd->setText("Problems found!");
result = KMessageBox::warningContinueCancelList(this, i18n( "I'm going to quarantine this lot, you can restore them later if you want. If you don't want to quarantine, just press cancel."),QuarantineList,i18n( "Quarantine Infected Files" ),i18n( "Quarantine" )); result = KMessageBox::warningContinueCancelList(this, i18n( "I'm going to quarantine this lot, you can restore them later if you want. If you don't want to quarantine, just press cancel."),QuarantineList,i18n( "Quarantine Infected Files" ),i18n( "Quarantine" ));
switch (result) { switch (result) {
case 2 :KNotifyClient::event(kmain->_tray->winId(),"ScanAccessDenied", QString("Suspicious Items Not " case 2 :KNotifyClient::event(kmain->_tray->winId(),"ScanAccessDenied", TQString("Suspicious Items Not "
"Quarantined!")); break; "Quarantined!")); break;
case 5 : Quarantine(); break; case 5 : Quarantine(); break;
} }
@ -681,7 +681,7 @@ void ScanViewer::childExited()
void ScanViewer::receivedOutput(KProcIO *) void ScanViewer::receivedOutput(KProcIO *)
{ {
//buf += QCString(buffer, buflen+1); //buf += TQCString(buffer, buflen+1);
processOutput(); processOutput();
//childproc->ackRead(); //childproc->ackRead();
@ -699,7 +699,7 @@ void ScanViewer::slotClear()
} }
// void ScanViewer::setDirName(QString dir){ // void ScanViewer::setDirName(TQString dir){
// // dir_combo->setEditText(dir); // // dir_combo->setEditText(dir);
// dir_combo->setCurrentText(dir); // dir_combo->setCurrentText(dir);
// } // }
@ -707,30 +707,30 @@ void ScanViewer::slotClear()
void ScanViewer::Quarantine(){ void ScanViewer::Quarantine(){
bool allQuarantined=TRUE; bool allQuarantined=TRUE;
config->setGroup("Kuarantine"); config->setGroup("Kuarantine");
QStringList lastQuarLocations = config->readListEntry("KuarantineLocations"); TQStringList lastQuarLocations = config->readListEntry("KuarantineLocations");
kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_quarantining")); kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_quarantining"));
QString quarloc; TQString quarloc;
for (QStringList::Iterator it = lastQuarLocations.begin(); it == lastQuarLocations.begin() ; it++){ for (TQStringList::Iterator it = lastQuarLocations.begin(); it == lastQuarLocations.begin() ; it++){
quarloc = *it; quarloc = *it;
} }
lastQuarItems = config->readListEntry(QString("Items %1").arg(quarloc)); lastQuarItems = config->readListEntry(TQString("Items %1").arg(quarloc));
for (QStringList::Iterator it = QuarantineList.begin(); it != QuarantineList.end(); it++ ){ for (TQStringList::Iterator it = QuarantineList.begin(); it != QuarantineList.end(); it++ ){
if (lastQuarItems.contains(*it) != 0) { if (lastQuarItems.contains(*it) != 0) {
lastQuarItems.remove(*it); lastQuarItems.remove(*it);
} }
QString item2 = (*it).stripWhiteSpace(); TQString item2 = (*it).stripWhiteSpace();
int fnameStartPoint = 0; int fnameStartPoint = 0;
int dtStartPoint = item2.findRev(":"); int dtStartPoint = item2.findRev(":");
int fnameEndPoint = item2.findRev(":", (signed int)-((item2.length() - dtStartPoint)+1)); int fnameEndPoint = item2.findRev(":", (signed int)-((item2.length() - dtStartPoint)+1));
QString fname = item2.mid(fnameStartPoint,(fnameEndPoint - fnameStartPoint)); TQString fname = item2.mid(fnameStartPoint,(fnameEndPoint - fnameStartPoint));
QString itemName = item2.mid((fnameEndPoint+1),((dtStartPoint+1) - (fnameEndPoint+2))); TQString itemName = item2.mid((fnameEndPoint+1),((dtStartPoint+1) - (fnameEndPoint+2)));
QString when = item2.mid((dtStartPoint+1),(item2.length() - (dtStartPoint+1))); TQString when = item2.mid((dtStartPoint+1),(item2.length() - (dtStartPoint+1)));
if (!(fname.isEmpty())){ if (!(fname.isEmpty())){
QStringList tokens = QStringList::split ( "/", fname, FALSE ); TQStringList tokens = TQStringList::split ( "/", fname, FALSE );
QString qname = tokens.last(); TQString qname = tokens.last();
qname.prepend("/"); qname.prepend("/");
qname.prepend(quarloc); qname.prepend(quarloc);
qname.append(":"+when); qname.append(":"+when);
@ -741,7 +741,7 @@ void ScanViewer::Quarantine(){
(resultview->findItem(fname,0))->setText(2,"Quarantined"); (resultview->findItem(fname,0))->setText(2,"Quarantined");
(resultview->findItem(fname,0))->setPixmap( 0, SmallIcon("klamav") ); (resultview->findItem(fname,0))->setPixmap( 0, SmallIcon("klamav") );
chmod((const char *)qname,0400); chmod((const char *)qname,0400);
CollectionDB::instance()->insertEvent("Quarantine",QString("Quarantined"),fname); CollectionDB::instance()->insertEvent("Quarantine",TQString("Quarantined"),fname);
}else{ }else{
KMessageBox::information (this,i18n("<p>There was a problem quarantining <b>%1</b>. Check your diskspace, the permissions on your quarantine location and whether a file with the same name already exists in the quarantine. </p>").arg(fname)); KMessageBox::information (this,i18n("<p>There was a problem quarantining <b>%1</b>. Check your diskspace, the permissions on your quarantine location and whether a file with the same name already exists in the quarantine. </p>").arg(fname));
@ -757,7 +757,7 @@ void ScanViewer::Quarantine(){
kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_on_acc_disabled")); kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_on_acc_disabled"));
}else }else
kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_scan_found")); kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_scan_found"));
config->writeEntry(QString("Items %1").arg(quarloc), lastQuarItems); config->writeEntry(TQString("Items %1").arg(quarloc), lastQuarItems);
config->sync(); config->sync();
//kmain->kuarantine->refresh(); //kmain->kuarantine->refresh();
@ -766,38 +766,38 @@ void ScanViewer::Quarantine(){
} }
void ScanViewer::slotRMB( QListViewItem* Item, const QPoint & point, int ) void ScanViewer::slotRMB( TQListViewItem* Item, const TQPoint & point, int )
{ {
if( Item ){ if( Item ){
QPixmap gicon; TQPixmap gicon;
QPixmap vicon; TQPixmap vicon;
QPixmap vlicon; TQPixmap vlicon;
QPixmap ticon; TQPixmap ticon;
QString iconPath = locate("cache", KMimeType::favIconForURL("http://www.viruspool.net")+".png"); TQString iconPath = locate("cache", KMimeType::favIconForURL("http://www.viruspool.net")+".png");
if ( iconPath.isEmpty() ) if ( iconPath.isEmpty() )
vicon = SmallIcon("find"); vicon = SmallIcon("find");
else else
vicon = QPixmap( iconPath ); vicon = TQPixmap( iconPath );
iconPath = locate("cache", KMimeType::favIconForURL("http://www.google.com")+".png"); iconPath = locate("cache", KMimeType::favIconForURL("http://www.google.com")+".png");
if ( iconPath.isEmpty() ) if ( iconPath.isEmpty() )
gicon = SmallIcon("find"); gicon = SmallIcon("find");
else else
gicon = QPixmap( iconPath ); gicon = TQPixmap( iconPath );
iconPath = locate("cache", KMimeType::favIconForURL("http://www.trendmicro.com")+".png"); iconPath = locate("cache", KMimeType::favIconForURL("http://www.trendmicro.com")+".png");
if ( iconPath.isEmpty() ) if ( iconPath.isEmpty() )
ticon = SmallIcon("find"); ticon = SmallIcon("find");
else else
ticon = QPixmap( iconPath ); ticon = TQPixmap( iconPath );
iconPath = locate("cache", KMimeType::favIconForURL("http://www.viruslist.com")+".png"); iconPath = locate("cache", KMimeType::favIconForURL("http://www.viruslist.com")+".png");
if ( iconPath.isEmpty() ) if ( iconPath.isEmpty() )
vlicon = SmallIcon("find"); vlicon = SmallIcon("find");
else else
vlicon = QPixmap( iconPath ); vlicon = TQPixmap( iconPath );
menu->clear(); menu->clear();
menu->insertItem( "Quarantine Selected", this,SLOT(slotQuarantineSelected()) ); menu->insertItem( "Quarantine Selected", this,SLOT(slotQuarantineSelected()) );
@ -814,16 +814,16 @@ void ScanViewer::slotRMB( QListViewItem* Item, const QPoint & point, int )
void ScanViewer::slotQuarantineSelected() void ScanViewer::slotQuarantineSelected()
{ {
QPtrList<QListViewItem> list; TQPtrList<TQListViewItem> list;
QListViewItemIterator it( resultview, QListViewItemIterator::Selected ); TQListViewItemIterator it( resultview, TQListViewItemIterator::Selected );
QuarantineList = ""; QuarantineList = "";
while ( it.current() ) { while ( it.current() ) {
QListViewItem* tItem = it.current(); TQListViewItem* tItem = it.current();
QDate today = QDate::currentDate(); TQDate today = TQDate::currentDate();
QTime now = QTime::currentTime(); TQTime now = TQTime::currentTime();
QString suffix = QString(":%1 %2") TQString suffix = TQString(":%1 %2")
.arg(today.toString("ddd MMMM d yyyy")) .arg(today.toString("ddd MMMM d yyyy"))
.arg(now.toString("hh-mm-ss ap")); .arg(now.toString("hh-mm-ss ap"));
@ -838,25 +838,25 @@ void ScanViewer::slotQuarantineSelected()
void ScanViewer::slotGoogle() void ScanViewer::slotGoogle()
{ {
QString name = resultview->currentItem()->text(1); TQString name = resultview->currentItem()->text(1);
kmain->klamdb->slotExternal(name, "Google"); kmain->klamdb->slotExternal(name, "Google");
} }
void ScanViewer::slotVirusPool() void ScanViewer::slotVirusPool()
{ {
QString name = resultview->currentItem()->text(1); TQString name = resultview->currentItem()->text(1);
kmain->klamdb->slotExternal(name, "VirusPool"); kmain->klamdb->slotExternal(name, "VirusPool");
} }
void ScanViewer::slotTrendMicro() void ScanViewer::slotTrendMicro()
{ {
QString name = resultview->currentItem()->text(1); TQString name = resultview->currentItem()->text(1);
kmain->klamdb->slotExternal(name, "TrendMicro"); kmain->klamdb->slotExternal(name, "TrendMicro");
} }
void ScanViewer::slotVirusList() void ScanViewer::slotVirusList()
{ {
QString name = resultview->currentItem()->text(1); TQString name = resultview->currentItem()->text(1);
kmain->klamdb->slotExternal(name, "VirusList"); kmain->klamdb->slotExternal(name, "VirusList");
} }
@ -889,7 +889,7 @@ void ScanViewer::slotCancelScanTime()
// //
// cnt = 0; // cnt = 0;
// //kdDebug() << "m_filepattern" << m_filepattern << endl; // //kdDebug() << "m_filepattern" << m_filepattern << endl;
// QDir d( m_filepattern ); // TQDir d( m_filepattern );
// // int num = countFiles(d); // // int num = countFiles(d);
// // if (countFiles(d) > 0) // // if (countFiles(d) > 0)
// // //kdDebug() << "count" << num << endl; // // //kdDebug() << "count" << num << endl;
@ -904,7 +904,7 @@ void ScanViewer::slotCancelScanTime()
// //
// } // }
int ScanViewer::countFiles( QDir & root) int ScanViewer::countFiles( TQDir & root)
{ {
kapp->processEvents(); kapp->processEvents();
@ -913,38 +913,38 @@ int ScanViewer::countFiles( QDir & root)
// kapp->processEvents(); // kapp->processEvents();
return 0; return 0;
} }
QStringList entries = root.entryList( QDir::Dirs | QDir::Files | QDir::Hidden); TQStringList entries = root.entryList( TQDir::Dirs | TQDir::Files | TQDir::Hidden);
////kdDebug() << "count" << counter << endl; ////kdDebug() << "count" << counter << endl;
for (QStringList::size_type j = 0; j < entries.size(); j++ ) for (TQStringList::size_type j = 0; j < entries.size(); j++ )
{ {
QString entry = entries[j]; TQString entry = entries[j];
if( entry == "." || entry == "..") if( entry == "." || entry == "..")
continue; continue;
QFileInfo fi(root, entry ); TQFileInfo fi(root, entry );
entry = fi.absFilePath(); entry = fi.absFilePath();
entry = QDir::convertSeparators(entry); entry = TQDir::convertSeparators(entry);
if ((fi.isFile()) && !(fi.isSymLink())){ if ((fi.isFile()) && !(fi.isSymLink())){
counter++; counter++;
}else if ((fi.isDir()) && !(fi.isSymLink())){ }else if ((fi.isDir()) && !(fi.isSymLink())){
QDir temp(entry); TQDir temp(entry);
countFiles(temp); countFiles(temp);
} }
} }
return counter; return counter;
} }
void ScanViewer::startProgressDialog( const QString & text ) void ScanViewer::startProgressDialog( const TQString & text )
{ {
//if ( progressDialog ) //if ( progressDialog )
// delete progressDialog; // delete progressDialog;
progressDialog = new KProgressDialog( this, "progress_dialog", QString::null, text, false ); progressDialog = new KProgressDialog( this, "progress_dialog", TQString::null, text, false );
progressDialog->setAllowCancel( true ); progressDialog->setAllowCancel( true );
progressDialog->showCancelButton( true ); progressDialog->showCancelButton( true );
@ -956,7 +956,7 @@ void ScanViewer::startProgressDialog( const QString & text )
progressDialog->setMinimumDuration( 500 ); progressDialog->setMinimumDuration( 500 );
progressDialog->show(); progressDialog->show();
timer = new QTimer( this ); timer = new TQTimer( this );
connect( timer, SIGNAL( timeout() ), this, SLOT( slotProg() ) ); connect( timer, SIGNAL( timeout() ), this, SLOT( slotProg() ) );
timer->start( 200, FALSE ); timer->start( 200, FALSE );
@ -969,17 +969,17 @@ void ScanViewer::slotProg()
progressDialog->progressBar()->setProgress(progressDialog->progressBar()->progress() + 4 ); progressDialog->progressBar()->setProgress(progressDialog->progressBar()->progress() + 4 );
} }
void ScanViewer::slotOnItem( QListViewItem * lineitem) void ScanViewer::slotOnItem( TQListViewItem * lineitem)
{ {
status_label->setPalette(QToolTip::palette()); status_label->setPalette(TQToolTip::palette());
QString problem = lineitem->text(1).stripWhiteSpace(); TQString problem = lineitem->text(1).stripWhiteSpace();
QString message = problem + " is probably a virus. Right-click and select a service to research it."; TQString message = problem + " is probably a virus. Right-click and select a service to research it.";
QString path( lineitem->text(0).stripWhiteSpace() ); TQString path( lineitem->text(0).stripWhiteSpace() );
QString file = path.section( '/', -1 ); TQString file = path.section( '/', -1 );
if ((problem.contains("ExceededFile")) || if ((problem.contains("ExceededFile")) ||
(problem == "Archive.ExceededRecursionLimit") || (problem == "Archive.ExceededRecursionLimit") ||

@ -17,22 +17,22 @@
class KPrinter; class KPrinter;
class KToggleAction; class KToggleAction;
class KURL; class KURL;
class QLineEdit; class TQLineEdit;
class QComboBox; class TQComboBox;
class QCheckBox; class TQCheckBox;
class QListBox; class TQListBox;
class QListView; class TQListView;
class QListViewItem; class TQListViewItem;
class QPushButton; class TQPushButton;
class QLabel; class TQLabel;
class KProcIO; class KProcIO;
class KConfig; class KConfig;
class KURLRequester; class KURLRequester;
class KProgress; class KProgress;
class K3bJobProgressOSD; class K3bJobProgressOSD;
class KProgressDialog; class KProgressDialog;
class QDir; class TQDir;
class QGridLayout; class TQGridLayout;
/** /**
* This class serves as the main window for ScanViewer. It handles the * This class serves as the main window for ScanViewer. It handles the
@ -42,14 +42,14 @@ class QGridLayout;
* @author $AUTHOR <$EMAIL> * @author $AUTHOR <$EMAIL>
* @version $APP_VERSION * @version $APP_VERSION
*/ */
class ScanViewer : public QWidget class ScanViewer : public TQWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
/** /**
* Default Constructor * Default Constructor
*/ */
ScanViewer(QWidget *parent, const char *name=0); ScanViewer(TQWidget *parent, const char *name=0);
/** /**
* Default Destructor * Default Destructor
@ -60,18 +60,18 @@ public:
* Use this method to load whatever file/URL you have * Use this method to load whatever file/URL you have
*/ */
//void setDirName(QString); //void setDirName(TQString);
void slotScan(const QStringList & filepattern, int mode, bool recursive, bool dcopscan); void slotScan(const TQStringList & filepattern, int mode, bool recursive, bool dcopscan);
void slotCancel(); void slotCancel();
void slotStartAgain(); void slotStartAgain();
bool scanGoingOn(); bool scanGoingOn();
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:
/** /**
@ -91,19 +91,19 @@ protected:
private slots: private slots:
void slotProg(); void slotProg();
void slotOnItem( QListViewItem * lineitem); void slotOnItem( TQListViewItem * lineitem);
void slotOffItem(); void slotOffItem();
private: private:
void setupAccel(); void setupAccel();
void setupActions(); void setupActions();
void startProgressDialog( const QString & text ); void startProgressDialog( const TQString & text );
private: private:
signals: signals:
void itemSelected(QString abs_filename, int line); void itemSelected(TQString abs_filename, int line);
void scanFinished(QWidget *); void scanFinished(TQWidget *);
void scanStartingAgain(QWidget *); void scanStartingAgain(TQWidget *);
public slots: public slots:
@ -113,68 +113,68 @@ private slots:
void childExited(); void childExited();
void resetSysTray(); void resetSysTray();
void receivedOutput(KProcIO *); void receivedOutput(KProcIO *);
//void itemSelected(const QString&); //void itemSelected(const TQString&);
void slotClear(); void slotClear();
void slotRMB( QListViewItem *, const QPoint &, int ); void slotRMB( TQListViewItem *, const TQPoint &, int );
void slotQuarantineSelected(); void slotQuarantineSelected();
void slotVirusPool(); void slotVirusPool();
void slotVirusList(); void slotVirusList();
void slotGoogle(); void slotGoogle();
void slotTrendMicro(); void slotTrendMicro();
void slotCancelScanTime(); void slotCancelScanTime();
//void patternTextChanged( const QString &); //void patternTextChanged( const TQString &);
private: private:
void processOutput(); void processOutput();
void finish(); void finish();
void getout(); void getout();
void Quarantine(); void Quarantine();
void askUser(); void askUser();
int countFiles( QDir & root); int countFiles( TQDir & root);
//void ScanViewer::startProgress(); //void ScanViewer::startProgress();
QLineEdit *template_edit; TQLineEdit *template_edit;
QComboBox *files_combo, *pattern_combo, *check_combo; TQComboBox *files_combo, *pattern_combo, *check_combo;
//KComboBox *dir_combo; //KComboBox *dir_combo;
QCheckBox *recursive_box; TQCheckBox *recursive_box;
QCheckBox *recursive_box2; TQCheckBox *recursive_box2;
QListView *resultview; TQListView *resultview;
QPushButton *search_button, *cancel_button; TQPushButton *search_button, *cancel_button;
QLabel *status_label, *status2_label,*matches_label,*matches2_label; TQLabel *status_label, *status2_label,*matches_label,*matches2_label;
KProcIO *childproc; KProcIO *childproc;
QString buf; TQString buf;
KConfig* config; KConfig* config;
QStringList lastSearchItems; TQStringList lastSearchItems;
QStringList lastScanPaths; TQStringList lastScanPaths;
QStringList lastQuarItems; TQStringList lastQuarItems;
QStringList QuarantineList; TQStringList QuarantineList;
bool errorsEncountered; bool errorsEncountered;
QPopupMenu* menu; TQPopupMenu* menu;
QPushButton* adv_options; TQPushButton* adv_options;
QPushButton* schedule; TQPushButton* schedule;
QString selectedVirus; TQString selectedVirus;
bool multiScan; bool multiScan;
QString urlsToScan; TQString urlsToScan;
bool scanInProgress; bool scanInProgress;
bool scanCancelled; bool scanCancelled;
QString prevdir; TQString prevdir;
QStringList listOfUrlsToScan; TQStringList listOfUrlsToScan;
bool multi_recursive; bool multi_recursive;
int m_mode; int m_mode;
QStringList m_filepattern; TQStringList m_filepattern;
bool m_recursive; bool m_recursive;
int filesscanned; int filesscanned;
int cnt; int cnt;
KProgressDialog* progress; KProgressDialog* progress;
KProgress* prog; KProgress* prog;
K3bJobProgressOSD* progosd; K3bJobProgressOSD* progosd;
QBoxLayout *status2_layout; TQBoxLayout *status2_layout;
QFrame *status2_frame; TQFrame *status2_frame;
QGridLayout *layout; TQGridLayout *layout;
KProgressDialog *progressDialog; KProgressDialog *progressDialog;
QTimer *timer; TQTimer *timer;
QPushButton* scan_time; TQPushButton* scan_time;
bool calculateTime; bool calculateTime;
bool showProgress; bool showProgress;
QFrame *status_frame; TQFrame *status_frame;
}; };
#endif // _SCANVIEWER_H_ #endif // _SCANVIEWER_H_

@ -10,10 +10,10 @@
#include "ktview.h" #include "ktview.h"
#include <qlabel.h> #include <tqlabel.h>
#include <kurlrequester.h> #include <kurlrequester.h>
#include <qlayout.h> #include <tqlayout.h>
#include <qlistview.h> #include <tqlistview.h>
//#include <qlistviewitem.h> //#include <qlistviewitem.h>
#include <kglobalsettings.h> #include <kglobalsettings.h>
#include <kdialog.h> #include <kdialog.h>
@ -22,8 +22,8 @@
#include <sys/stat.h> #include <sys/stat.h>
Schedule::Schedule( QWidget* parent, QStringList filepattern, const char* name, bool modal, WFlags fl ) Schedule::Schedule( TQWidget* parent, TQStringList filepattern, const char* name, bool modal, WFlags fl )
: QDialog( parent, name, modal, fl ) : TQDialog( parent, name, modal, fl )
{ {
setCaption( i18n( "Schedule Scan" ) ); setCaption( i18n( "Schedule Scan" ) );
@ -37,16 +37,16 @@ Schedule::Schedule( QWidget* parent, QStringList filepattern, const char* name,
_filepattern = filepattern; _filepattern = filepattern;
//bool isRTL = QApplication::reverseLayout(); //bool isRTL = TQApplication::reverseLayout();
QVBoxLayout *vbox = new QVBoxLayout(this, KDialog::marginHint(), TQVBoxLayout *vbox = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint(), "vbox"); KDialog::spacingHint(), "vbox");
QGroupBox *group = new QGroupBox("Schedule Scan of Selected Folders", this); TQGroupBox *group = new TQGroupBox("Schedule Scan of Selected Folders", this);
vbox->addWidget(group); vbox->addWidget(group);
QGridLayout *layout = new QGridLayout( group, 6, 6, KDialog::spacingHint(), TQGridLayout *layout = new TQGridLayout( group, 6, 6, KDialog::spacingHint(),
KDialog::spacingHint(), "layout"); KDialog::spacingHint(), "layout");
layout->addRowSpacing(0, group->fontMetrics().height()); layout->addRowSpacing(0, group->fontMetrics().height());
layout->setColStretch(0, 1); layout->setColStretch(0, 1);
@ -54,7 +54,7 @@ Schedule::Schedule( QWidget* parent, QStringList filepattern, const char* name,
check_combo = new QComboBox(false, group); check_combo = new TQComboBox(false, group);
check_combo->insertItem( i18n("When I log in to KDE")); check_combo->insertItem( i18n("When I log in to KDE"));
check_combo->insertItem( i18n("Every day at ")); check_combo->insertItem( i18n("Every day at "));
check_combo->insertItem( i18n("Every day at the current time")); check_combo->insertItem( i18n("Every day at the current time"));
@ -78,9 +78,9 @@ Schedule::Schedule( QWidget* parent, QStringList filepattern, const char* name,
hour->setValidator(new KStrictIntValidator(0, 23, hour)); hour->setValidator(new KStrictIntValidator(0, 23, hour));
layout->addWidget(hour, 1, 1); layout->addWidget(hour, 1, 1);
QLabel *dots1 = new QLabel(":", group); TQLabel *dots1 = new TQLabel(":", group);
dots1->setMinimumWidth( 7 ); dots1->setMinimumWidth( 7 );
dots1->setAlignment( QLabel::AlignCenter ); dots1->setAlignment( TQLabel::AlignCenter );
layout->addWidget(dots1, 1, 2); layout->addWidget(dots1, 1, 2);
minute = new HMSTimeWidget( group ); minute = new HMSTimeWidget( group );
@ -93,14 +93,14 @@ Schedule::Schedule( QWidget* parent, QStringList filepattern, const char* name,
QPushButton* add = new QPushButton ("Add", group); TQPushButton* add = new TQPushButton ("Add", group);
layout->addWidget(add,1,5); layout->addWidget(add,1,5);
//add->setFixedSize(add->sizeHint()); //add->setFixedSize(add->sizeHint());
connect( add, SIGNAL(clicked()), connect( add, SIGNAL(clicked()),
SLOT(slotScheduleScan()) ); SLOT(slotScheduleScan()) );
QPushButton* del = new QPushButton ("Delete", group); TQPushButton* del = new TQPushButton ("Delete", group);
layout->addWidget(del,1,6); layout->addWidget(del,1,6);
//del->setFixedSize(del->sizeHint()); //del->setFixedSize(del->sizeHint());
@ -108,21 +108,21 @@ Schedule::Schedule( QWidget* parent, QStringList filepattern, const char* name,
SLOT(slotDelete()) ); SLOT(slotDelete()) );
//schedulebox = new QListView(group); //schedulebox = new TQListView(group);
schedulebox = new KTView(group); schedulebox = new KTView(group);
QFontMetrics rb_fm(schedulebox->fontMetrics()); TQFontMetrics rb_fm(schedulebox->fontMetrics());
schedulebox->setMinimumSize(rb_fm.width("0")*55, schedulebox->setMinimumSize(rb_fm.width("0")*55,
rb_fm.lineSpacing()*15); rb_fm.lineSpacing()*15);
/* //kdDebug() << ((schedulebox->width())/2) << endl; /* //kdDebug() << ((schedulebox->width())/2) << endl;
schedulebox->addColumn( "Paths to Scan",(group->width())); schedulebox->addColumn( "Paths to Scan",(group->width()));
schedulebox->addColumn( "When to Scan",(group->width())); schedulebox->addColumn( "When to Scan",(group->width()));
schedulebox->setResizeMode(QListView::AllColumns); schedulebox->setResizeMode(TQListView::AllColumns);
schedulebox->setSelectionMode( QListView::Extended ); schedulebox->setSelectionMode( TQListView::Extended );
schedulebox->setAllColumnsShowFocus(true);*/ schedulebox->setAllColumnsShowFocus(true);*/
layout->addMultiCellWidget(schedulebox, 2, 4,0,6); layout->addMultiCellWidget(schedulebox, 2, 4,0,6);
QHBoxLayout *h5 = new QHBoxLayout( vbox, KDialog::spacingHint() ); TQHBoxLayout *h5 = new TQHBoxLayout( vbox, KDialog::spacingHint() );
h5->addStretch( 1 ); h5->addStretch( 1 );
// OK // OK
@ -151,25 +151,25 @@ void Schedule::slotQueryDatePicker(int)
if (check_combo->currentText().contains(i18n("specific date")) ){ if (check_combo->currentText().contains(i18n("specific date")) ){
DatePicker *_calendar; DatePicker *_calendar;
_calendar = new DatePicker(this, QDateTime::currentDateTime().date()); _calendar = new DatePicker(this, TQDateTime::currentDateTime().date());
int x = this->width() - (this->width()/2); int x = this->width() - (this->width()/2);
int y = this->height() - (this->height()/2); int y = this->height() - (this->height()/2);
_calendar->move(QPoint(x,y)); _calendar->move(TQPoint(x,y));
_calendar->show(); _calendar->show();
_calendar->setFocus(); _calendar->setFocus();
connect( _calendar, SIGNAL(signalSelectedDate(QDate)),this, connect( _calendar, SIGNAL(signalSelectedDate(TQDate)),this,
SLOT(slotAddDateToCombo(QDate)) ); SLOT(slotAddDateToCombo(TQDate)) );
} }
} }
void Schedule::slotAddDateToCombo(QDate newdate) void Schedule::slotAddDateToCombo(TQDate newdate)
{ {
//check_combo->insertItem //check_combo->insertItem
_date = newdate; _date = newdate;
//kdDebug() << newdate.toString() << endl; //kdDebug() << newdate.toString() << endl;
QString newstring = check_combo->currentText().replace("a specific date",newdate.toString()); TQString newstring = check_combo->currentText().replace("a specific date",newdate.toString());
check_combo->insertItem(newstring); check_combo->insertItem(newstring);
check_combo->setCurrentItem(check_combo->count()-1); check_combo->setCurrentItem(check_combo->count()-1);
@ -194,7 +194,7 @@ void Schedule::slotScheduleScan()
CTCron* ctcron((CTCron*)*i); */ CTCron* ctcron((CTCron*)*i); */
//delete cttask; //delete cttask;
QString command = check_combo->currentText(); TQString command = check_combo->currentText();
@ -203,28 +203,28 @@ void Schedule::slotScheduleScan()
cttask->user = ""; cttask->user = "";
if (command.contains(i18n("When I log in to KDE")) ){ if (command.contains(i18n("When I log in to KDE")) ){
QString startupcommand = createStartupScript(); TQString startupcommand = createStartupScript();
cttask->comment = (const char *)i18n("KlamAV Scheduled Scan at KDE Login of %1").arg(_filepattern.join(" ")).local8Bit(); cttask->comment = (const char *)i18n("KlamAV Scheduled Scan at KDE Login of %1").arg(_filepattern.join(" ")).local8Bit();
cttask->command = (const char *)QString("%1").arg(startupcommand).local8Bit(); cttask->command = (const char *)TQString("%1").arg(startupcommand).local8Bit();
cttask->enabled = FALSE; cttask->enabled = FALSE;
}else{ }else{
cttask->comment = (const char *)i18n("KlamAV Scheduled Scan of %1").arg(_filepattern.join(" ")).local8Bit(); cttask->comment = (const char *)i18n("KlamAV Scheduled Scan of %1").arg(_filepattern.join(" ")).local8Bit();
cttask->command = (const char *)QString("%1 '%2'").arg(createScanScript()).arg(_filepattern.join("' '")).local8Bit(); cttask->command = (const char *)TQString("%1 '%2'").arg(createScanScript()).arg(_filepattern.join("' '")).local8Bit();
cttask->enabled = TRUE; cttask->enabled = TRUE;
} }
cttask->silent = FALSE; cttask->silent = FALSE;
int curhour = (QTime::currentTime()).hour(); int curhour = (TQTime::currentTime()).hour();
unsigned int curmin = (QTime::currentTime()).minute(); unsigned int curmin = (TQTime::currentTime()).minute();
int shour = QString(hour->text()).toInt(); int shour = TQString(hour->text()).toInt();
unsigned int smin = QString(minute->text()).toInt(); unsigned int smin = TQString(minute->text()).toInt();
int sdatedayofweek = _date.dayOfWeek(); int sdatedayofweek = _date.dayOfWeek();
int todaydayofweek = QDate::currentDate().dayOfWeek(); int todaydayofweek = TQDate::currentDate().dayOfWeek();
if (command.contains(i18n("at the current time")) ){ if (command.contains(i18n("at the current time")) ){
@ -251,7 +251,7 @@ void Schedule::slotScheduleScan()
}else if (command.contains(i18n("Every month")) ){ }else if (command.contains(i18n("Every month")) ){
if (command.contains(i18n("from now on") )) if (command.contains(i18n("from now on") ))
cttask->dayOfMonth.set(QDate::currentDate().day(), TRUE); cttask->dayOfMonth.set(TQDate::currentDate().day(), TRUE);
else else
cttask->dayOfMonth.set(_date.day(), TRUE); cttask->dayOfMonth.set(_date.day(), TRUE);
for (int dw = 1; dw <= 7; dw++) for (int dw = 1; dw <= 7; dw++)
@ -291,11 +291,11 @@ void Schedule::slotScheduleScan()
QString description = QString::fromLocal8Bit(cttask->describe().c_str()); TQString description = TQString::fromLocal8Bit(cttask->describe().c_str());
CTCron* ctcron(schedulebox->getCTCron()); CTCron* ctcron(schedulebox->getCTCron());
if (cttask->dirty()) if (cttask->dirty())
ctcron->task.push_back(cttask); ctcron->task.push_back(cttask);
//new KTListTask(this, ctcron, cttask); // Qt will clean up //new KTListTask(this, ctcron, cttask); // TQt will clean up
else else
delete cttask; delete cttask;
@ -303,7 +303,7 @@ void Schedule::slotScheduleScan()
schedulebox->refresh(); schedulebox->refresh();
cthost->apply(); cthost->apply();
//QListViewItem* tm = new QListViewItem( schedulebox, _filepattern, description); //TQListViewItem* tm = new TQListViewItem( schedulebox, _filepattern, description);
/* if (cthost->isError()) /* if (cthost->isError())
{ {
@ -320,7 +320,7 @@ void Schedule::slotDelete()
{ {
//kdDebug() << schedulebox->currentItem()->text(1) << endl; //kdDebug() << schedulebox->currentItem()->text(1) << endl;
QFile file(schedulebox->currentItem()->text(1).section(" ",0,0).stripWhiteSpace()); TQFile file(schedulebox->currentItem()->text(1).section(" ",0,0).stripWhiteSpace());
file.remove(); file.remove();
schedulebox->remove(); schedulebox->remove();
cthost->apply(); cthost->apply();
@ -337,33 +337,33 @@ void Schedule::slotCancel()
close(); close();
} }
QString Schedule::createScanScript() TQString Schedule::createScanScript()
{ {
QString path = getenv("HOME"); TQString path = getenv("HOME");
path += "/.klamav"; path += "/.klamav";
QDir klamavdir(path); TQDir klamavdir(path);
if (!klamavdir.exists() && !klamavdir.mkdir(path)) if (!klamavdir.exists() && !klamavdir.mkdir(path))
return QString("Error"); return TQString("Error");
QTime now = QTime::currentTime(); TQTime now = TQTime::currentTime();
QDate today = QDate::currentDate(); TQDate today = TQDate::currentDate();
QString timestring = QString("%1%2") TQString timestring = TQString("%1%2")
.arg(today.toString("ddMMyy")) .arg(today.toString("ddMMyy"))
.arg(now.toString("hhmmss")); .arg(now.toString("hhmmss"));
QFile file( QString("%1/ScanWithKlamav_%2.sh").arg(path).arg(timestring )); TQFile file( TQString("%1/ScanWithKlamav_%2.sh").arg(path).arg(timestring ));
if ( file.open( IO_WriteOnly ) ) { if ( file.open( IO_WriteOnly ) ) {
QTextStream ts( &file ); TQTextStream ts( &file );
QString kdedir = getenv("KDEDIR"); TQString kdedir = getenv("KDEDIR");
ts << "#!/bin/bash" << "\n"; ts << "#!/bin/bash" << "\n";
ts << "HOSTNAME=`hostname`" << "\n"; ts << "HOSTNAME=`hostname`" << "\n";
ts << "export HOSTNAME" << "\n"; ts << "export HOSTNAME" << "\n";
ts << QString("PATH=%1").arg(QString(getenv("PATH"))) << "\n"; ts << TQString("PATH=%1").arg(TQString(getenv("PATH"))) << "\n";
ts << "export PATH" << "\n"; ts << "export PATH" << "\n";
ts << "DCOPSERVER=`cat /home/${USER}/.DCOPserver_${HOSTNAME}_:0 | grep local`" << "\n"; ts << "DCOPSERVER=`cat /home/${USER}/.DCOPserver_${HOSTNAME}_:0 | grep local`" << "\n";
ts << "export DCOPSERVER" << "\n"; ts << "export DCOPSERVER" << "\n";
@ -396,33 +396,33 @@ QString Schedule::createScanScript()
chmod((const char *)file.name(), S_IWUSR | S_IRUSR | S_IEXEC ); chmod((const char *)file.name(), S_IWUSR | S_IRUSR | S_IEXEC );
return file.name(); return file.name();
}else }else
return QString("Error"); return TQString("Error");
} }
QString Schedule::createStartupScript() TQString Schedule::createStartupScript()
{ {
QString path = KGlobalSettings::autostartPath(); TQString path = KGlobalSettings::autostartPath();
QDir startupdir(path); TQDir startupdir(path);
if (!startupdir.exists()) if (!startupdir.exists())
return QString("Error"); return TQString("Error");
QTime now = QTime::currentTime(); TQTime now = TQTime::currentTime();
QDate today = QDate::currentDate(); TQDate today = TQDate::currentDate();
QString timestring = QString("%1%2") TQString timestring = TQString("%1%2")
.arg(today.toString("ddMMyy")) .arg(today.toString("ddMMyy"))
.arg(now.toString("hhmmss")); .arg(now.toString("hhmmss"));
QFile file( QString("%1klamav_%2.desktop").arg(path).arg(timestring )); TQFile file( TQString("%1klamav_%2.desktop").arg(path).arg(timestring ));
if ( file.open( IO_WriteOnly ) ) { if ( file.open( IO_WriteOnly ) ) {
QTextStream ts( &file ); TQTextStream ts( &file );
ts << "[Desktop Entry]" << "\n"; ts << "[Desktop Entry]" << "\n";
ts << "Encoding=UTF-8" << "\n"; ts << "Encoding=UTF-8" << "\n";
ts << "Name=Klamav" << "\n"; ts << "Name=Klamav" << "\n";
ts << QString("Exec=klamav %i %m -caption \"%c\" --scanthis '%1'").arg(_filepattern.join("' '")) << "\n"; ts << TQString("Exec=klamav %i %m -caption \"%c\" --scanthis '%1'").arg(_filepattern.join("' '")) << "\n";
ts << "Icon=klamav" << "\n"; ts << "Icon=klamav" << "\n";
ts << "Type=Application" << "\n"; ts << "Type=Application" << "\n";
ts << "DocPath=klamav/klamav.html" << "\n"; ts << "DocPath=klamav/klamav.html" << "\n";
@ -462,33 +462,33 @@ QString Schedule::createStartupScript()
chmod((const char *)file.name(), S_IWUSR | S_IRUSR | S_IEXEC ); chmod((const char *)file.name(), S_IWUSR | S_IRUSR | S_IEXEC );
return file.name(); return file.name();
}else }else
return QString("Error"); return TQString("Error");
} }
HMSTimeWidget::HMSTimeWidget(QWidget *parent, const char *name) : HMSTimeWidget::HMSTimeWidget(TQWidget *parent, const char *name) :
KIntSpinBox(parent, name) KIntSpinBox(parent, name)
{ {
} }
QString HMSTimeWidget::mapValueToText(int value) TQString HMSTimeWidget::mapValueToText(int value)
{ {
QString s = QString::number(value); TQString s = TQString::number(value);
if( value < 10 ) { if( value < 10 ) {
s = "0" + s; s = "0" + s;
} }
return s; return s;
} }
QValidator::State KStrictIntValidator::validate( QString & input, int & d ) const TQValidator::State KStrictIntValidator::validate( TQString & input, int & d ) const
{ {
if( input.isEmpty() ) if( input.isEmpty() )
return Valid; return Valid;
State st = QIntValidator::validate( input, d ); State st = TQIntValidator::validate( input, d );
if( st == Intermediate ) if( st == Intermediate )
return Invalid; return Invalid;

@ -5,17 +5,17 @@
#ifndef _SCHEDULE_H_ #ifndef _SCHEDULE_H_
#define _SCHEDULE_H_ #define _SCHEDULE_H_
#include <qvariant.h> #include <tqvariant.h>
#include <qdialog.h> #include <tqdialog.h>
#include <qspinbox.h> #include <tqspinbox.h>
#include <qdatetime.h> #include <tqdatetime.h>
#include <qlineedit.h> #include <tqlineedit.h>
#include <qstring.h> #include <tqstring.h>
#include <qtimer.h> #include <tqtimer.h>
#include <qvalidator.h> #include <tqvalidator.h>
#include <qwidget.h> #include <tqwidget.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include "cthost.h" #include "cthost.h"
#include "cttask.h" #include "cttask.h"
@ -28,39 +28,39 @@
class KPrinter; class KPrinter;
class KToggleAction; class KToggleAction;
class KURL; class KURL;
class QLineEdit; class TQLineEdit;
class QComboBox; class TQComboBox;
class QCheckBox; class TQCheckBox;
class QListBox; class TQListBox;
//class QListView; //class TQListView;
class KTView; class KTView;
class QListViewItem; class TQListViewItem;
class QPushButton; class TQPushButton;
class QLabel; class TQLabel;
class KProcess; class KProcess;
class KConfig; class KConfig;
class KURLRequester; class KURLRequester;
class CollectionSetup; class CollectionSetup;
class QToolButton; class TQToolButton;
class QHBoxLayout; class TQHBoxLayout;
class HMSTimeWidget : public KIntSpinBox class HMSTimeWidget : public KIntSpinBox
{ {
Q_OBJECT Q_OBJECT
public: public:
HMSTimeWidget(QWidget *parent=0, const char *name=0); HMSTimeWidget(TQWidget *parent=0, const char *name=0);
protected: protected:
QString mapValueToText(int); TQString mapValueToText(int);
}; };
class KStrictIntValidator : public QIntValidator class KStrictIntValidator : public TQIntValidator
{ {
public: public:
KStrictIntValidator(int bottom, int top, QWidget * parent, KStrictIntValidator(int bottom, int top, TQWidget * parent,
const char * name = 0 ) const char * name = 0 )
: QIntValidator(bottom, top, parent, name) {}; : TQIntValidator(bottom, top, parent, name) {};
QValidator::State validate( QString & input, int & d ) const; TQValidator::State validate( TQString & input, int & d ) const;
}; };
/** /**
@ -71,14 +71,14 @@ public:
* @author $AUTHOR <$EMAIL> * @author $AUTHOR <$EMAIL>
* @version $APP_VERSION * @version $APP_VERSION
*/ */
class Schedule : public QDialog class Schedule : public TQDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
/** /**
* Default Constructor * Default Constructor
*/ */
Schedule( QWidget* parent = 0, QStringList filepattern = 0,const char* name = 0, bool modal = FALSE, WFlags fl = 0 ); Schedule( TQWidget* parent = 0, TQStringList filepattern = 0,const char* name = 0, bool modal = FALSE, WFlags fl = 0 );
/** /**
* Default Destructor * Default Destructor
@ -89,16 +89,16 @@ public:
* Use this method to load whatever file/URL you have * Use this method to load whatever file/URL you have
*/ */
void setDirName(QString); void setDirName(TQString);
bool isMultiScan(); bool isMultiScan();
const CTHost& getCTHost() const; const CTHost& getCTHost() const;
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:
/** /**
@ -118,7 +118,7 @@ protected:
private slots: private slots:
void slotQueryDatePicker(int index); void slotQueryDatePicker(int index);
void slotAddDateToCombo(QDate newdate); void slotAddDateToCombo(TQDate newdate);
void slotScheduleScan(); void slotScheduleScan();
void slotDelete(); void slotDelete();
void slotOK(); void slotOK();
@ -126,8 +126,8 @@ private slots:
private: private:
void setupAccel(); void setupAccel();
void setupActions(); void setupActions();
QString createScanScript(); TQString createScanScript();
QString createStartupScript(); TQString createStartupScript();
private: private:
signals: signals:
@ -135,30 +135,30 @@ signals:
public slots: public slots:
private slots: private slots:
private: private:
QLineEdit *template_edit; TQLineEdit *template_edit;
QComboBox *files_combo, *pattern_combo, *check_combo; TQComboBox *files_combo, *pattern_combo, *check_combo;
QCheckBox *recursive_box; TQCheckBox *recursive_box;
// QListView *resultview; // TQListView *resultview;
QPushButton *search_button, *cancel_button; TQPushButton *search_button, *cancel_button;
QLabel *status_label, *status2_label,*matches_label,*matches2_label; TQLabel *status_label, *status2_label,*matches_label,*matches2_label;
KProcess *childproc; KProcess *childproc;
QString buf; TQString buf;
KConfig* config; KConfig* config;
bool errorsEncountered; bool errorsEncountered;
QPushButton* adv_options; TQPushButton* adv_options;
QString urlsToScan; TQString urlsToScan;
QString prevdir; TQString prevdir;
QStringList listOfUrlsToScan; TQStringList listOfUrlsToScan;
bool multi_recursive; bool multi_recursive;
CollectionSetup* setup; CollectionSetup* setup;
QToolButton *m_tabsClose; TQToolButton *m_tabsClose;
QToolButton* play; TQToolButton* play;
QToolButton* stop; TQToolButton* stop;
QHBoxLayout* controls; TQHBoxLayout* controls;
QDate _date; TQDate _date;
HMSTimeWidget* hour; HMSTimeWidget* hour;
HMSTimeWidget* minute; HMSTimeWidget* minute;
QStringList _filepattern; TQStringList _filepattern;
KTView *schedulebox; KTView *schedulebox;
CTHost* cthost; CTHost* cthost;
CTTask* cttask; CTTask* cttask;

@ -12,7 +12,7 @@
#include <kurlrequester.h> #include <kurlrequester.h>
#include <qlayout.h> #include <tqlayout.h>
#include <kmessagebox.h> #include <kmessagebox.h>
const char *mail_clients[] = { const char *mail_clients[] = {
@ -21,57 +21,57 @@ const char *mail_clients[] = {
0 0
}; };
Sigtool::Sigtool(QWidget *parent, const char *name) Sigtool::Sigtool(TQWidget *parent, const char *name)
: QWidget(parent, name) : TQWidget(parent, name)
{ {
QVBoxLayout *vbox = new QVBoxLayout(this, KDialog::marginHint(), TQVBoxLayout *vbox = new TQVBoxLayout(this, KDialog::marginHint(),
KDialog::spacingHint(), "vbox"); KDialog::spacingHint(), "vbox");
//KMessageBox::information (this,nooffilters); //KMessageBox::information (this,nooffilters);
QGroupBox *mail_group = new QGroupBox(i18n("Email Client"), this); TQGroupBox *mail_group = new TQGroupBox(i18n("Email Client"), this);
vbox->addWidget(mail_group); vbox->addWidget(mail_group);
QGridLayout *mail_layout = new QGridLayout( mail_group, 2, 6, KDialog::spacingHint(), TQGridLayout *mail_layout = new TQGridLayout( mail_group, 2, 6, KDialog::spacingHint(),
KDialog::spacingHint(), "mail_layout"); KDialog::spacingHint(), "mail_layout");
mail_layout->addRowSpacing(0, mail_group->fontMetrics().height()); mail_layout->addRowSpacing(0, mail_group->fontMetrics().height());
mail_layout->setColStretch(1, 1); mail_layout->setColStretch(1, 1);
mail_layout->setColStretch(2, 1); mail_layout->setColStretch(2, 1);
//IP Address & Port //IP Address & Port
QWidget *mail_hlp = new QWidget( mail_group ); TQWidget *mail_hlp = new TQWidget( mail_group );
mail_layout->addMultiCellWidget(mail_hlp, 1,2, 1,6); mail_layout->addMultiCellWidget(mail_hlp, 1,2, 1,6);
QGridLayout *mail_dir_layout = new QGridLayout(mail_hlp,2,6, KDialog::spacingHint() ); TQGridLayout *mail_dir_layout = new TQGridLayout(mail_hlp,2,6, KDialog::spacingHint() );
QLabel *mail_dir_label = new QLabel(i18n("Choose your email client:"), mail_hlp); TQLabel *mail_dir_label = new TQLabel(i18n("Choose your email client:"), mail_hlp);
mail_dir_label->setAlignment(Qt::AlignRight); mail_dir_label->setAlignment(TQt::AlignRight);
//mail_dir_label->setFixedSize(mail_dir_label->sizeHint()); //mail_dir_label->setFixedSize(mail_dir_label->sizeHint());
mail_dir_layout->addWidget(mail_dir_label,0,2); mail_dir_layout->addWidget(mail_dir_label,0,2);
check_combo = new QComboBox(false, mail_hlp); check_combo = new TQComboBox(false, mail_hlp);
check_combo->insertStrList(mail_clients); check_combo->insertStrList(mail_clients);
check_combo->adjustSize(); check_combo->adjustSize();
//check_combo->setFixedSize(check_combo->size()); //check_combo->setFixedSize(check_combo->size());
mail_dir_layout->addWidget(check_combo,0,3); mail_dir_layout->addWidget(check_combo,0,3);
//User & Pass //User & Pass
// QWidget *mail_hlp2 = new QWidget( mail_group ); // TQWidget *mail_hlp2 = new TQWidget( mail_group );
// mail_layout->addMultiCellWidget(mail_hlp2, 2,2, 1,2); // mail_layout->addMultiCellWidget(mail_hlp2, 2,2, 1,2);
// QHBoxLayout *mail_userpass_layout = new QHBoxLayout(mail_hlp2, KDialog::spacingHint() ); // TQHBoxLayout *mail_userpass_layout = new TQHBoxLayout(mail_hlp2, KDialog::spacingHint() );
search_button = new QPushButton (i18n( "Configure Automatically" ), mail_hlp); search_button = new TQPushButton (i18n( "Configure Automatically" ), mail_hlp);
mail_dir_layout->addWidget(search_button,1,2); mail_dir_layout->addWidget(search_button,1,2);
//search_button->setFixedSize(search_button->sizeHint()); //search_button->setFixedSize(search_button->sizeHint());
manual_button = new QPushButton (i18n( "Tell me how to do it" ), mail_hlp); manual_button = new TQPushButton (i18n( "Tell me how to do it" ), mail_hlp);
mail_dir_layout->addWidget(manual_button,1,3); mail_dir_layout->addWidget(manual_button,1,3);
//manual_button->setFixedSize(manual_button->sizeHint()); //manual_button->setFixedSize(manual_button->sizeHint());
// KButtonBox *actionbox = new KButtonBox(mail_hlp, Qt::Horizontal); // KButtonBox *actionbox = new KButtonBox(mail_hlp, TQt::Horizontal);
// mail_userpass_layout->addWidget(actionbox); // mail_userpass_layout->addWidget(actionbox);
// actionbox->addStretch(); // actionbox->addStretch();
// search_button = actionbox->addButton(i18n("&Configure Automatically")); // search_button = actionbox->addButton(i18n("&Configure Automatically"));
@ -81,25 +81,25 @@ Sigtool::Sigtool(QWidget *parent, const char *name)
QString text = i18n( "This will help you configure your email client to scan incoming and outgoing mail with KlamAV. Not all mail clients are fully supported yet. Infected mail is clearly marked as such and is wrapped in another email from KlamAV telling you the name of the virus and other relevant details." ); TQString text = i18n( "This will help you configure your email client to scan incoming and outgoing mail with KlamAV. Not all mail clients are fully supported yet. Infected mail is clearly marked as such and is wrapped in another email from KlamAV telling you the name of the virus and other relevant details." );
QGroupBox *Notes = new QGroupBox(i18n("Notes"), this); TQGroupBox *Notes = new TQGroupBox(i18n("Notes"), this);
vbox->addWidget(Notes); vbox->addWidget(Notes);
QGridLayout *notes_layout = new QGridLayout( Notes, 5, 2, KDialog::spacingHint(), TQGridLayout *notes_layout = new TQGridLayout( Notes, 5, 2, KDialog::spacingHint(),
KDialog::spacingHint(), "notes_layout"); KDialog::spacingHint(), "notes_layout");
notes_layout->addRowSpacing(0, Notes->fontMetrics().height()); notes_layout->addRowSpacing(0, Notes->fontMetrics().height());
notes_layout->setColStretch(0, 1); notes_layout->setColStretch(0, 1);
notes_layout->setColStretch(1, 1); notes_layout->setColStretch(1, 1);
QWidget *notes_hlp = new QWidget( Notes ); TQWidget *notes_hlp = new TQWidget( Notes );
notes_layout->addMultiCellWidget(notes_hlp, 1,1, 0,1); notes_layout->addMultiCellWidget(notes_hlp, 1,1, 0,1);
QHBoxLayout *notes_box = new QHBoxLayout(notes_hlp, KDialog::spacingHint() ); TQHBoxLayout *notes_box = new TQHBoxLayout(notes_hlp, KDialog::spacingHint() );
notes_label = new QLabel(i18n(text), notes_hlp); notes_label = new TQLabel(i18n(text), notes_hlp);
notes_label->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) ); notes_label->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );
//notes_label->setFixedSize(notes_label->sizeHint()); //notes_label->setFixedSize(notes_label->sizeHint());
notes_box->addWidget(notes_label); notes_box->addWidget(notes_label);
@ -112,7 +112,7 @@ Sigtool::Sigtool(QWidget *parent, const char *name)
SLOT(configureKMail()) ); SLOT(configureKMail()) );
connect( manual_button, SIGNAL(clicked()), connect( manual_button, SIGNAL(clicked()),
SLOT(manual()) ); SLOT(manual()) );
connect( check_combo, SIGNAL(activated(const QString &)), connect( check_combo, SIGNAL(activated(const TQString &)),
SLOT(dobuttons()) ); SLOT(dobuttons()) );
@ -129,25 +129,25 @@ void Sigtool::configureKMail(){
KMessageBox::information (this,i18n( "Please ensure KMail is not open before we proceed.") ); KMessageBox::information (this,i18n( "Please ensure KMail is not open before we proceed.") );
QString DatabaseLocation; TQString DatabaseLocation;
config = KGlobal::config(); config = KGlobal::config();
config->setGroup("Freshklam"); config->setGroup("Freshklam");
QStringList lastDownloadPaths = config->readListEntry("lastDownloadPaths"); TQStringList lastDownloadPaths = config->readListEntry("lastDownloadPaths");
for (QStringList::Iterator it = lastDownloadPaths.begin(); it == lastDownloadPaths.begin() ; it++){ for (TQStringList::Iterator it = lastDownloadPaths.begin(); it == lastDownloadPaths.begin() ; it++){
DatabaseLocation = *it; DatabaseLocation = *it;
} }
config = new KConfig("kmailrc"); config = new KConfig("kmailrc");
config->setGroup("General"); config->setGroup("General");
QVariant nooffilters = config->readEntry("filters"); TQVariant nooffilters = config->readEntry("filters");
int numfilters = nooffilters.toInt(); int numfilters = nooffilters.toInt();
nooffilters = numfilters; nooffilters = numfilters;
for (int j=0; j != numfilters; j++ ){ for (int j=0; j != numfilters; j++ ){
QVariant numb = j; TQVariant numb = j;
QString filtername=QString("Filter #%1").arg(numb.toString()); TQString filtername=TQString("Filter #%1").arg(numb.toString());
config->setGroup(filtername); config->setGroup(filtername);
QString binary = config->readEntry("action-args-0"); TQString binary = config->readEntry("action-args-0");
if (binary.find("klammail") != -1){ if (binary.find("klammail") != -1){
KMessageBox::information (this,i18n( "You're already set up! Sure you haven't already configured KMail for KlamAV scanning?") ); KMessageBox::information (this,i18n( "You're already set up! Sure you haven't already configured KMail for KlamAV scanning?") );
return; return;
@ -155,13 +155,13 @@ void Sigtool::configureKMail(){
} }
QString filtername=QString("Filter #%1").arg(nooffilters.toString()); TQString filtername=TQString("Filter #%1").arg(nooffilters.toString());
config->setGroup(filtername); config->setGroup(filtername);
config->writeEntry("ConfigureShortcut", "false"); config->writeEntry("ConfigureShortcut", "false");
config->writeEntry("Icon", ""); config->writeEntry("Icon", "");
config->writeEntry("StopProcessingHere","false"); config->writeEntry("StopProcessingHere","false");
config->writeEntry("action-args-0", QString("klammail -d %1").arg(DatabaseLocation)); config->writeEntry("action-args-0", TQString("klammail -d %1").arg(DatabaseLocation));
config->writeEntry("action-name-0","filter app"); config->writeEntry("action-name-0","filter app");
config->writeEntry("actions","1"); config->writeEntry("actions","1");
config->writeEntry("apply-on","check-mail","manual-filtering"); config->writeEntry("apply-on","check-mail","manual-filtering");
@ -174,7 +174,7 @@ void Sigtool::configureKMail(){
numfilters++; numfilters++;
nooffilters = numfilters; nooffilters = numfilters;
filtername=QString("Filter #%1").arg(nooffilters.toString()); filtername=TQString("Filter #%1").arg(nooffilters.toString());
config->setGroup(filtername); config->setGroup(filtername);
config->writeEntry("ConfigureShortcut","false"); config->writeEntry("ConfigureShortcut","false");
@ -203,7 +203,7 @@ void Sigtool::configureKMail(){
void Sigtool::manualKMail(){ void Sigtool::manualKMail(){
QString text = i18n( "Mail scanning support is provided by a program called 'klammail'. This was installed automatically as part of the KlamAV installation. To use this program to scan your email as you send and receive it you need to set up a 'filter' in KMail to 'pipe' mail through klammail as it is coming in/going out. You should then set up a filter after this one to put any mail with the word 'virus-found' in the header into the quarantine folder of your choice. The mail will be clearly marked as infected and will tell you the name of the virus and who the mail is from." ); TQString text = i18n( "Mail scanning support is provided by a program called 'klammail'. This was installed automatically as part of the KlamAV installation. To use this program to scan your email as you send and receive it you need to set up a 'filter' in KMail to 'pipe' mail through klammail as it is coming in/going out. You should then set up a filter after this one to put any mail with the word 'virus-found' in the header into the quarantine folder of your choice. The mail will be clearly marked as infected and will tell you the name of the virus and who the mail is from." );
notes_label->setText( text ); notes_label->setText( text );
@ -212,10 +212,10 @@ void Sigtool::manualKMail(){
void Sigtool::manualXimian(){ void Sigtool::manualXimian(){
QString text = i18n( "Mail scanning support is provided by a program called 'klammail'. This was installed automatically as part of the KlamAV installation. To use this program to scan your email as you send and receive it you need to set up a 'filter' in Ximian Evolution to 'pipe' mail through klammail as it is coming in/going out. You should then set up a filter after this one to put any mail with the word 'virus-found' in the header into the quarantine folder of your choice. The mail will be clearly marked as infected and will tell you the name of the virus and who the mail is from." ); TQString text = i18n( "Mail scanning support is provided by a program called 'klammail'. This was installed automatically as part of the KlamAV installation. To use this program to scan your email as you send and receive it you need to set up a 'filter' in Ximian Evolution to 'pipe' mail through klammail as it is coming in/going out. You should then set up a filter after this one to put any mail with the word 'virus-found' in the header into the quarantine folder of your choice. The mail will be clearly marked as infected and will tell you the name of the virus and who the mail is from." );
notes_label->setText( text ); notes_label->setText( text );
notes_label->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) ); notes_label->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) );
} }

@ -17,12 +17,12 @@
class KPrinter; class KPrinter;
class KToggleAction; class KToggleAction;
class KURL; class KURL;
class QLineEdit; class TQLineEdit;
class QComboBox; class TQComboBox;
class QCheckBox; class TQCheckBox;
class QListBox; class TQListBox;
class QPushButton; class TQPushButton;
class QLabel; class TQLabel;
class KProcess; class KProcess;
class KConfig; class KConfig;
class KURLRequester; class KURLRequester;
@ -36,14 +36,14 @@ class KURLRequester;
* @author $AUTHOR <$EMAIL> * @author $AUTHOR <$EMAIL>
* @version $APP_VERSION * @version $APP_VERSION
*/ */
class Sigtool : public QWidget class Sigtool : public TQWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
/** /**
* Default Constructor * Default Constructor
*/ */
Sigtool(QWidget *parent, const char *name=0); Sigtool(TQWidget *parent, const char *name=0);
/** /**
* Default Destructor * Default Destructor
@ -53,14 +53,14 @@ public:
/** /**
* Use this method to load whatever file/URL you have * Use this method to load whatever file/URL you have
*/ */
void setDirName(QString); void setDirName(TQString);
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:
/** /**
@ -90,8 +90,8 @@ private slots:
void optionsPreferences(); void optionsPreferences();
void newToolbarConfig(); void newToolbarConfig();
*/ */
//void changeStatusbar(const QString& text); //void changeStatusbar(const TQString& text);
//void changeCaption(const QString& text); //void changeCaption(const TQString& text);
private: private:
void setupAccel(); void setupAccel();
@ -106,7 +106,7 @@ private:
signals: signals:
void itemSelected(QString abs_filename, int line); void itemSelected(TQString abs_filename, int line);
public slots: public slots:
@ -118,20 +118,20 @@ private slots:
void dobuttons(); void dobuttons();
private: private:
QLineEdit *template_edit; TQLineEdit *template_edit;
QComboBox *files_combo, *pattern_combo/*, *dir_combo*/; TQComboBox *files_combo, *pattern_combo/*, *dir_combo*/;
KURLRequester *dir_combo; KURLRequester *dir_combo;
QCheckBox *recursive_box; TQCheckBox *recursive_box;
QListBox *resultbox; TQListBox *resultbox;
QPushButton *search_button, *manual_button; TQPushButton *search_button, *manual_button;
QLabel *status_label, *matches_label; TQLabel *status_label, *matches_label;
KProcess *childproc; KProcess *childproc;
QString buf; TQString buf;
KConfig *config; KConfig *config;
QStringList lastSearchItems; TQStringList lastSearchItems;
QStringList lastSearchPaths; TQStringList lastSearchPaths;
QComboBox *check_combo; TQComboBox *check_combo;
QLabel *notes_label; TQLabel *notes_label;
}; };
#endif // _Sigtool_H_ #endif // _Sigtool_H_

@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>SpecialFileTypes</class> <class>SpecialFileTypes</class>
<widget class="QWidget"> <widget class="TQWidget">
<property name="name"> <property name="name">
<cstring>SpecialFileTypes</cstring> <cstring>SpecialFileTypes</cstring>
</property> </property>
@ -19,14 +19,14 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QGroupBox" row="0" column="0"> <widget class="TQGroupBox" row="0" column="0">
<property name="name"> <property name="name">
<cstring>Special_File_Types</cstring> <cstring>Special_File_Types</cstring>
</property> </property>
<property name="title"> <property name="title">
<string>Special File Types</string> <string>Special File Types</string>
</property> </property>
<widget class="QLayoutWidget"> <widget class="TQLayoutWidget">
<property name="name"> <property name="name">
<cstring>layout9</cstring> <cstring>layout9</cstring>
</property> </property>
@ -42,7 +42,7 @@
<property name="name"> <property name="name">
<cstring>unnamed</cstring> <cstring>unnamed</cstring>
</property> </property>
<widget class="QCheckBox" row="6" column="0"> <widget class="TQCheckBox" row="6" column="0">
<property name="name"> <property name="name">
<cstring>kcfg_VirusEncrypted</cstring> <cstring>kcfg_VirusEncrypted</cstring>
</property> </property>
@ -60,7 +60,7 @@
<string>Alt+Y</string> <string>Alt+Y</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="5" column="0"> <widget class="TQCheckBox" row="5" column="0">
<property name="name"> <property name="name">
<cstring>kcfg_VirusBroken</cstring> <cstring>kcfg_VirusBroken</cstring>
</property> </property>
@ -78,7 +78,7 @@
<string>Alt+A</string> <string>Alt+A</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="4" column="0"> <widget class="TQCheckBox" row="4" column="0">
<property name="name"> <property name="name">
<cstring>kcfg_ExcludeQuarantine</cstring> <cstring>kcfg_ExcludeQuarantine</cstring>
</property> </property>
@ -89,7 +89,7 @@
<string>Alt+Q</string> <string>Alt+Q</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="3" column="0"> <widget class="TQCheckBox" row="3" column="0">
<property name="name"> <property name="name">
<cstring>kcfg_ScanMacros</cstring> <cstring>kcfg_ScanMacros</cstring>
</property> </property>
@ -100,7 +100,7 @@
<string>Alt+S</string> <string>Alt+S</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="1" column="0"> <widget class="TQCheckBox" row="1" column="0">
<property name="name"> <property name="name">
<cstring>kcfg_ScanPE</cstring> <cstring>kcfg_ScanPE</cstring>
</property> </property>
@ -111,7 +111,7 @@
<string>Alt+X</string> <string>Alt+X</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="0" column="0"> <widget class="TQCheckBox" row="0" column="0">
<property name="name"> <property name="name">
<cstring>kcfg_ScanMail</cstring> <cstring>kcfg_ScanMail</cstring>
</property> </property>
@ -122,7 +122,7 @@
<string>Alt+G</string> <string>Alt+G</string>
</property> </property>
</widget> </widget>
<widget class="QCheckBox" row="2" column="0"> <widget class="TQCheckBox" row="2" column="0">
<property name="name"> <property name="name">
<cstring>kcfg_ScanHTML</cstring> <cstring>kcfg_ScanHTML</cstring>
</property> </property>

@ -539,7 +539,7 @@ static void versionFunc(
** change. This function may disappear. Do not write code that depends ** change. This function may disappear. Do not write code that depends
** on this function. ** on this function.
** **
** Implementation of the QUOTE() function. This function takes a single ** Implementation of the TQUOTE() function. This function takes a single
** argument. If the argument is numeric, the return value is the same as ** argument. If the argument is numeric, the return value is the same as
** the argument. If the argument is NULL, the return value is the string ** the argument. If the argument is NULL, the return value is the string
** "NULL". Otherwise, the argument is enclosed in single quotes with ** "NULL". Otherwise, the argument is enclosed in single quotes with

@ -7,8 +7,8 @@
#include "tabwidget.h" #include "tabwidget.h"
#include <qstyle.h> #include <tqstyle.h>
#include <qclipboard.h> #include <tqclipboard.h>
#include <kapplication.h> #include <kapplication.h>
#include <ktabbar.h> #include <ktabbar.h>
@ -22,13 +22,13 @@
using namespace KlamAV; using namespace KlamAV;
TabWidget::TabWidget(QWidget * parent, const char *name) TabWidget::TabWidget(TQWidget * parent, const char *name)
:KTabWidget(parent, name), m_CurrentMaxLength(30) :KTabWidget(parent, name), m_CurrentMaxLength(30)
{ {
setTabReorderingEnabled(false); setTabReorderingEnabled(false);
connect( this, SIGNAL( currentChanged(QWidget *) ), this, connect( this, SIGNAL( currentChanged(TQWidget *) ), this,
SLOT( slotTabChanged(QWidget *) ) ); SLOT( slotTabChanged(TQWidget *) ) );
connect(this, SIGNAL(closeRequest(QWidget*)), this, SLOT(slotCloseRequest(QWidget*))); connect(this, SIGNAL(closeRequest(TQWidget*)), this, SLOT(slotCloseRequest(TQWidget*)));
//setHoverCloseButton(Settings::closeButtonOnTabs()); //setHoverCloseButton(Settings::closeButtonOnTabs());
} }
@ -51,12 +51,12 @@ void TabWidget::addFrame(Frame *f)
Frame *TabWidget::currentFrame() Frame *TabWidget::currentFrame()
{ {
QWidget *w=currentPage(); TQWidget *w=currentPage();
if (!w) return 0; if (!w) return 0;
return m_frames[w]; return m_frames[w];
} }
void TabWidget::slotTabChanged(QWidget *w) void TabWidget::slotTabChanged(TQWidget *w)
{ {
emit currentFrameChanged(m_frames[w]); emit currentFrameChanged(m_frames[w]);
} }
@ -73,29 +73,29 @@ void TabWidget::removeFrame(Frame *f)
unsigned int TabWidget::tabBarWidthForMaxChars( uint maxLength ) unsigned int TabWidget::tabBarWidthForMaxChars( uint maxLength )
{ {
int hframe, overlap; int hframe, overlap;
hframe = tabBar()->style().pixelMetric( QStyle::PM_TabBarTabHSpace, this ); hframe = tabBar()->style().pixelMetric( TQStyle::PM_TabBarTabHSpace, this );
overlap = tabBar()->style().pixelMetric( QStyle::PM_TabBarTabOverlap, this ); overlap = tabBar()->style().pixelMetric( TQStyle::PM_TabBarTabOverlap, this );
QFontMetrics fm = tabBar()->fontMetrics(); TQFontMetrics fm = tabBar()->fontMetrics();
int x = 0; int x = 0;
for( int i=0; i < count(); ++i ) { for( int i=0; i < count(); ++i ) {
Frame *f=m_frames[page(i)]; Frame *f=m_frames[page(i)];
QString newTitle=f->title(); TQString newTitle=f->title();
if ( newTitle.length() > maxLength ) if ( newTitle.length() > maxLength )
newTitle = newTitle.left( maxLength-3 ) + "..."; newTitle = newTitle.left( maxLength-3 ) + "...";
QTab* tab = tabBar()->tabAt( i ); TQTab* tab = tabBar()->tabAt( i );
int lw = fm.width( newTitle ); int lw = fm.width( newTitle );
int iw = 0; int iw = 0;
if ( tab->iconSet() ) if ( tab->iconSet() )
iw = tab->iconSet()->pixmap( QIconSet::Small, QIconSet::Normal ).width() + 4; iw = tab->iconSet()->pixmap( TQIconSet::Small, TQIconSet::Normal ).width() + 4;
x += ( tabBar()->style().sizeFromContents( QStyle::CT_TabBarTab, this, QSize( QMAX( lw + hframe + iw, QApplication::globalStrut().width() ), 0 ), QStyleOption( tab ) ) ).width(); x += ( tabBar()->style().sizeFromContents( TQStyle::CT_TabBarTab, this, TQSize( TQMAX( lw + hframe + iw, TQApplication::globalStrut().width() ), 0 ), TQStyleOption( tab ) ) ).width();
} }
return x; return x;
} }
void TabWidget::setTitle( const QString &title , QWidget* sender) void TabWidget::setTitle( const TQString &title , TQWidget* sender)
{ {
removeTabToolTip( sender ); removeTabToolTip( sender );
@ -106,9 +106,9 @@ void TabWidget::setTitle( const QString &title , QWidget* sender)
uint lcw=0, rcw=0; uint lcw=0, rcw=0;
int tabBarHeight = tabBar()->sizeHint().height(); int tabBarHeight = tabBar()->sizeHint().height();
if ( cornerWidget( TopLeft ) && cornerWidget( TopLeft )->isVisible() ) if ( cornerWidget( TopLeft ) && cornerWidget( TopLeft )->isVisible() )
lcw = QMAX( cornerWidget( TopLeft )->width(), tabBarHeight ); lcw = TQMAX( cornerWidget( TopLeft )->width(), tabBarHeight );
if ( cornerWidget( TopRight ) && cornerWidget( TopRight )->isVisible() ) if ( cornerWidget( TopRight ) && cornerWidget( TopRight )->isVisible() )
rcw = QMAX( cornerWidget( TopRight )->width(), tabBarHeight ); rcw = TQMAX( cornerWidget( TopRight )->width(), tabBarHeight );
uint maxTabBarWidth = width() - lcw - rcw; uint maxTabBarWidth = width() - lcw - rcw;
uint newMaxLength=30; uint newMaxLength=30;
@ -116,7 +116,7 @@ void TabWidget::setTitle( const QString &title , QWidget* sender)
if ( tabBarWidthForMaxChars( newMaxLength ) < maxTabBarWidth ) if ( tabBarWidthForMaxChars( newMaxLength ) < maxTabBarWidth )
break; break;
} }
QString newTitle = title; TQString newTitle = title;
if ( newTitle.length() > newMaxLength ) if ( newTitle.length() > newMaxLength )
{ {
setTabToolTip( sender, newTitle ); setTabToolTip( sender, newTitle );
@ -148,7 +148,7 @@ void TabWidget::setTitle( const QString &title , QWidget* sender)
} }
} }
void TabWidget::contextMenu(int i, const QPoint &p) void TabWidget::contextMenu(int i, const TQPoint &p)
{ {
currentItem = page(i); currentItem = page(i);
KPopupMenu popup; KPopupMenu popup;
@ -183,7 +183,7 @@ void TabWidget::slotCopyLinkAddress()
KURL url; KURL url;
if (KHTMLView *view = dynamic_cast<KHTMLView*>(currentItem)) url = view->part()->url(); if (KHTMLView *view = dynamic_cast<KHTMLView*>(currentItem)) url = view->part()->url();
else return; else return;
QClipboard *cb = QApplication::clipboard(); TQClipboard *cb = TQApplication::clipboard();
if(cb) cb->setText(url.prettyURL()); if(cb) cb->setText(url.prettyURL());
} }
@ -195,7 +195,7 @@ void TabWidget::slotCloseTab()
currentItem = 0; currentItem = 0;
} }
void TabWidget::slotCloseRequest(QWidget* widget) void TabWidget::slotCloseRequest(TQWidget* widget)
{ {
if (m_frames.find(widget) != NULL) if (m_frames.find(widget) != NULL)
removeFrame(m_frames.find(widget)); removeFrame(m_frames.find(widget));

@ -12,7 +12,7 @@
#include <ktabwidget.h> #include <ktabwidget.h>
#include <qptrdict.h> #include <tqptrdict.h>
namespace KlamAV namespace KlamAV
{ {
@ -22,14 +22,14 @@ class TabWidget:public KTabWidget
Q_OBJECT Q_OBJECT
public: public:
TabWidget(QWidget * parent = 0, const char *name = 0); TabWidget(TQWidget * parent = 0, const char *name = 0);
~TabWidget(); ~TabWidget();
void addFrame(Frame *f); void addFrame(Frame *f);
Frame *currentFrame(); Frame *currentFrame();
void removeFrame(Frame *f); void removeFrame(Frame *f);
unsigned int tabBarWidthForMaxChars( uint maxLength ); unsigned int tabBarWidthForMaxChars( uint maxLength );
void setTitle( const QString &title , QWidget* sender); void setTitle( const TQString &title , TQWidget* sender);
public slots: public slots:
@ -45,15 +45,15 @@ class TabWidget:public KTabWidget
void slotDetachTab(); void slotDetachTab();
void slotCopyLinkAddress(); void slotCopyLinkAddress();
void slotCloseTab(); void slotCloseTab();
void slotCloseRequest(QWidget* widget); void slotCloseRequest(TQWidget* widget);
void contextMenu (int item, const QPoint &p); void contextMenu (int item, const TQPoint &p);
void slotTabChanged(QWidget *w); void slotTabChanged(TQWidget *w);
private: // attributes private: // attributes
QPtrDict<Frame> m_frames; TQPtrDict<Frame> m_frames;
unsigned int m_CurrentMaxLength; unsigned int m_CurrentMaxLength;
QWidget* currentItem; TQWidget* currentItem;
}; };
} }

@ -31,12 +31,12 @@
#include <kaction.h> #include <kaction.h>
#include <qcheckbox.h> #include <tqcheckbox.h>
#include <kbuttonbox.h> #include <kbuttonbox.h>
#include <kurlrequester.h> #include <kurlrequester.h>
#include <kurlcompletion.h> #include <kurlcompletion.h>
#include <kcombobox.h> #include <kcombobox.h>
#include <qlayout.h> #include <tqlayout.h>
#include <kmessagebox.h> #include <kmessagebox.h>
#include <klineedit.h> #include <klineedit.h>
#include <ktempfile.h> #include <ktempfile.h>
@ -50,7 +50,7 @@
#include <dcopclient.h> #include <dcopclient.h>
#include <kuser.h> #include <kuser.h>
#include <qtimer.h> #include <tqtimer.h>
#include "version.h" #include "version.h"
@ -77,8 +77,8 @@ const char *mirrors[] = {
0 0
}; };
KlamavUpdate::KlamavUpdate(QWidget *parent, const char *name) KlamavUpdate::KlamavUpdate(TQWidget *parent, const char *name)
: QWidget(parent, name),filelist(new KHTMLPart(this)) : TQWidget(parent, name),filelist(new KHTMLPart(this))
{ {
filelist->hide(); filelist->hide();
@ -98,29 +98,29 @@ KlamavUpdate::~KlamavUpdate()
void KlamavUpdate::downloadComponent(QString component, QString version, QString extension) void KlamavUpdate::downloadComponent(TQString component, TQString version, TQString extension)
{ {
upgradeinprogress = true; upgradeinprogress = true;
QString location = getenv("HOME"); TQString location = getenv("HOME");
location += "/.klamav"; location += "/.klamav";
QDir klamavdir(location); TQDir klamavdir(location);
if (!klamavdir.exists() && !klamavdir.mkdir(location)) if (!klamavdir.exists() && !klamavdir.mkdir(location))
location = getenv("HOME"); location = getenv("HOME");
QString currentclamav = location + QString("/%1-%2").arg(component).arg(version); TQString currentclamav = location + TQString("/%1-%2").arg(component).arg(version);
QDir clamavdir(currentclamav); TQDir clamavdir(currentclamav);
QString configure; TQString configure;
/* if (component == "klamav"){ /* if (component == "klamav"){
configure = QString("%1/%2-%3/%4-%5/configure").arg(location).arg(component).arg(version).arg(component).arg(version); configure = TQString("%1/%2-%3/%4-%5/configure").arg(location).arg(component).arg(version).arg(component).arg(version);
}else{*/ }else{*/
configure = QString("%1/%2-%3/configure").arg(location).arg(component).arg(version); configure = TQString("%1/%2-%3/configure").arg(location).arg(component).arg(version);
// } // }
QFile configurefile(configure); TQFile configurefile(configure);
bool download = true; bool download = true;
@ -139,8 +139,8 @@ void KlamavUpdate::downloadComponent(QString component, QString version, QString
startProgressDialog( i18n( "Downloading %1-%2..." ).arg(component).arg(version) ); startProgressDialog( i18n( "Downloading %1-%2..." ).arg(component).arg(version) );
QString tmpFile; TQString tmpFile;
if ( !KIO::NetAccess::download( QString("http://%1.dl.sourceforge.net/sourceforge/%2/%3-%4.%5").arg(getMirror()).arg(component).arg(component).arg(version).arg(extension), tmpFile, 0L ) ){ if ( !KIO::NetAccess::download( TQString("http://%1.dl.sourceforge.net/sourceforge/%2/%3-%4.%5").arg(getMirror()).arg(component).arg(component).arg(version).arg(extension), tmpFile, 0L ) ){
KMessageBox::information (this,i18n("Couldn't download %1.").arg(component)); KMessageBox::information (this,i18n("Couldn't download %1.").arg(component));
delete timer; delete timer;
timer=0; timer=0;
@ -201,7 +201,7 @@ void KlamavUpdate::downloadComponent(QString component, QString version, QString
chmod((const char *)configure,0700); chmod((const char *)configure,0700);
// if (component == "klamav"){ // if (component == "klamav"){
// QString dazukoconfigure = i18n("%1/%2-%3/dazuko/configure").arg(location).arg(component).arg(version); // TQString dazukoconfigure = i18n("%1/%2-%3/dazuko/configure").arg(location).arg(component).arg(version);
// //
// chmod((const char *)dazukoconfigure,0700); // chmod((const char *)dazukoconfigure,0700);
// } // }
@ -217,17 +217,17 @@ void KlamavUpdate::downloadComponent(QString component, QString version, QString
KProcess* arkollonproc = new KShellProcess(); KProcess* arkollonproc = new KShellProcess();
//make sure we catch arkollon in the .klamav directory //make sure we catch arkollon in the .klamav directory
// QString curpath = (QString) getenv("PATH"); // TQString curpath = (TQString) getenv("PATH");
// QString homedir = (QString) getenv("HOME"); // TQString homedir = (TQString) getenv("HOME");
// arkollonproc->setEnvironment("PATH",homedir+"/.klamav/bin:" + curpath); // arkollonproc->setEnvironment("PATH",homedir+"/.klamav/bin:" + curpath);
KMessageBox::information (this,i18n( "<p><b>If this the first time you've compiled software then here are a few useful tips:</b><br>" KMessageBox::information (this,i18n( "<p><b>If this the first time you've compiled software then here are a few useful tips:</b><br>"
"1. Any error messages in the log file with the words 'KDE', 'Qt','curl' or 'X' in them mean that you need to install " "1. Any error messages in the log file with the words 'KDE', 'TQt','curl' or 'X' in them mean that you need to install "
"the appropriate development libraries.<br>" "the appropriate development libraries.<br>"
"2. Any package provided by your distribution with 'lib' or 'devel' in the name is a development library, e.g. qt-devel, libkde.<br>" "2. Any package provided by your distribution with 'lib' or 'devel' in the name is a development library, e.g. qt-devel, libkde.<br>"
"3. If you encounter errors installing Dazuko, just deselect it at installation time and try the instructions at www.dazuko.org.<br>" "3. If you encounter errors installing Dazuko, just deselect it at installation time and try the instructions at www.dazuko.org.<br>"
"4. Some distributions provide a dazuko package, see if yours does.</p>" ),"Compilation Tips","compiler"); "4. Some distributions provide a dazuko package, see if yours does.</p>" ),"Compilation Tips","compiler");
QString command = QString("klamarkollon %1/%2-%3").arg(location).arg(component).arg(version); TQString command = TQString("klamarkollon %1/%2-%3").arg(location).arg(component).arg(version);
*arkollonproc << command; *arkollonproc << command;
if (component == "klamav") if (component == "klamav")
connect( arkollonproc, SIGNAL(processExited(KProcess *)), SLOT(klamavInstallationExited(KProcess *)) ); connect( arkollonproc, SIGNAL(processExited(KProcess *)), SLOT(klamavInstallationExited(KProcess *)) );
@ -284,7 +284,7 @@ void KlamavUpdate::checkForNewClamAVDirectly()
} }
void KlamavUpdate::completedSearchForUpdates(const QString &component, const QString &extension) void KlamavUpdate::completedSearchForUpdates(const TQString &component, const TQString &extension)
{ {
double currentversion; double currentversion;
@ -292,7 +292,7 @@ void KlamavUpdate::completedSearchForUpdates(const QString &component, const QSt
if (component == "KlamAV") if (component == "KlamAV")
currentversion = VERSION_KLAMAV; currentversion = VERSION_KLAMAV;
else{ else{
QString currentClamAVVersion = KlamavConfig::clamAVVersion(); TQString currentClamAVVersion = KlamavConfig::clamAVVersion();
currentversion = numericizeVersion(currentClamAVVersion); currentversion = numericizeVersion(currentClamAVVersion);
} }
@ -321,12 +321,12 @@ void KlamavUpdate::completedSearchForUpdates(const QString &component, const QSt
void KlamavUpdate::startProgressDialog( const QString & text ) void KlamavUpdate::startProgressDialog( const TQString & text )
{ {
//if ( progressDialog ) //if ( progressDialog )
// delete progressDialog; // delete progressDialog;
progressDialog = new KProgressDialog( this, "progress_dialog", QString::null, text, false ); progressDialog = new KProgressDialog( this, "progress_dialog", TQString::null, text, false );
progressDialog->setAllowCancel( true ); progressDialog->setAllowCancel( true );
progressDialog->showCancelButton( true ); progressDialog->showCancelButton( true );
@ -338,7 +338,7 @@ void KlamavUpdate::startProgressDialog( const QString & text )
progressDialog->setMinimumDuration( 500 ); progressDialog->setMinimumDuration( 500 );
progressDialog->show(); progressDialog->show();
timer = new QTimer( this ); timer = new TQTimer( this );
connect( timer, SIGNAL( timeout() ), this, SLOT( slotProg() ) ); connect( timer, SIGNAL( timeout() ), this, SLOT( slotProg() ) );
timer->start( 200, FALSE ); timer->start( 200, FALSE );
@ -492,7 +492,7 @@ void KlamavUpdate::parseSFPageHack()
void KlamavUpdate::getVersionFromLink( const DOM::Node &n ) void KlamavUpdate::getVersionFromLink( const DOM::Node &n )
{ {
double numericversion; double numericversion;
QString tmpversion; TQString tmpversion;
if ( n.isNull() || n.nodeType() != DOM::Node::ELEMENT_NODE ) if ( n.isNull() || n.nodeType() != DOM::Node::ELEMENT_NODE )
return; return;
@ -503,11 +503,11 @@ void KlamavUpdate::getVersionFromLink( const DOM::Node &n )
kdDebug() << elem.getAttribute( "href" ).string() << endl; kdDebug() << elem.getAttribute( "href" ).string() << endl;
QString name = elem.getAttribute( "href" ).string(); TQString name = elem.getAttribute( "href" ).string();
QString version = name.replace(".tar.bz2","").replace(".tar.gz",""); TQString version = name.replace(".tar.bz2","").replace(".tar.gz","");
version = version.replace("clamav-","").replace("klamav-",""); version = version.replace("clamav-","").replace("klamav-","");
QString rawversion = version; TQString rawversion = version;
if (m_alpha) if (m_alpha)
version.remove("-alpha").remove("-beta").remove("-rc"); version.remove("-alpha").remove("-beta").remove("-rc");
@ -523,7 +523,7 @@ void KlamavUpdate::getVersionFromLink( const DOM::Node &n )
} }
QString KlamavUpdate::getMirror() TQString KlamavUpdate::getMirror()
{ {
int r = 1+(int) (16.0*rand()/(RAND_MAX+1.0)); int r = 1+(int) (16.0*rand()/(RAND_MAX+1.0));
static int previousmirror = 0; static int previousmirror = 0;
@ -537,11 +537,11 @@ QString KlamavUpdate::getMirror()
return mirrors[r]; return mirrors[r];
} }
double KlamavUpdate::numericizeVersion(QString &version) double KlamavUpdate::numericizeVersion(TQString &version)
{ {
QString tmpversion = version; TQString tmpversion = version;
QStringList tokens = QStringList::split(".",tmpversion); TQStringList tokens = TQStringList::split(".",tmpversion);
for ( QStringList::Iterator it = tokens.begin(); it != tokens.end(); it++ ) for ( TQStringList::Iterator it = tokens.begin(); it != tokens.end(); it++ )
{ {
if ((*it).length() < 2) if ((*it).length() < 2)
(*it).prepend("0"); (*it).prepend("0");

@ -55,19 +55,19 @@ class KHTMLPart;
* @author $AUTHOR <$EMAIL> * @author $AUTHOR <$EMAIL>
* @version $APP_VERSION * @version $APP_VERSION
*/ */
class KlamavUpdate : public QWidget class KlamavUpdate : public TQWidget
{ {
Q_OBJECT Q_OBJECT
public: public:
KlamavUpdate(QWidget *parent = 0, const char *name=0); KlamavUpdate(TQWidget *parent = 0, const char *name=0);
/** /**
* Default Destrucclamav * Default Destrucclamav
*/ */
virtual ~KlamavUpdate(); virtual ~KlamavUpdate();
void downloadComponent(QString component, QString version, QString extension); void downloadComponent(TQString component, TQString version, TQString extension);
void checkForNewClamAVDirectly(); void checkForNewClamAVDirectly();
void checkForNewKlamAVDirectly(); void checkForNewKlamAVDirectly();
void checkForNewKlamAV(); void checkForNewKlamAV();
@ -90,27 +90,27 @@ private slots:
private: private:
void getLatestVersionFromSF(KURL url); void getLatestVersionFromSF(KURL url);
void getLatestVersionFromSFHack(KURL url); void getLatestVersionFromSFHack(KURL url);
void startProgressDialog( const QString & text ); void startProgressDialog( const TQString & text );
void checkInternet(); void checkInternet();
void connectToHost(); void connectToHost();
void getVersionFromLink( const DOM::Node &n ); void getVersionFromLink( const DOM::Node &n );
void completedSearchForUpdates(const QString &component, const QString &extension); void completedSearchForUpdates(const TQString &component, const TQString &extension);
double numericizeVersion(QString &version); double numericizeVersion(TQString &version);
QString getMirror(); TQString getMirror();
KProcess *childproc; KProcess *childproc;
KProcIO *versionproc; KProcIO *versionproc;
QString tempFileName; TQString tempFileName;
QString errorMessage; TQString errorMessage;
QString pidFileName; TQString pidFileName;
KProgressDialog *progressDialog; KProgressDialog *progressDialog;
QTimer *timer; TQTimer *timer;
bool upgradeinprogress; bool upgradeinprogress;
bool checkingDirectly; bool checkingDirectly;
double highestsofarnumeric; double highestsofarnumeric;
QString highestsofarraw; TQString highestsofarraw;
QString highestsofarfilename; TQString highestsofarfilename;
KResolver m_resolver; KResolver m_resolver;
QString currentClamavVersion; TQString currentClamavVersion;
bool m_alpha; bool m_alpha;
KHTMLPart *filelist; KHTMLPart *filelist;
private: private:

@ -12,8 +12,8 @@
#include <klocale.h> #include <klocale.h>
#include <kpopupmenu.h> #include <kpopupmenu.h>
#include <qclipboard.h> #include <tqclipboard.h>
#include <qpaintdevicemetrics.h> #include <tqpaintdevicemetrics.h>
#include "viewer.h" #include "viewer.h"
#include "klamav_run.h" #include "klamav_run.h"
@ -21,7 +21,7 @@
using namespace KlamAV; using namespace KlamAV;
Viewer::Viewer(QWidget *parent, const char *name) Viewer::Viewer(TQWidget *parent, const char *name)
: KHTMLPart(parent, name), m_url(0) : KHTMLPart(parent, name), m_url(0)
{ {
setZoomFactor(100); setZoomFactor(100);
@ -43,8 +43,8 @@ Viewer::Viewer(QWidget *parent, const char *name)
connect( browserExtension(), connect( browserExtension(),
SIGNAL(popupMenu (KXMLGUIClient*, const QPoint&, const KURL&, const SIGNAL(popupMenu (KXMLGUIClient*, const TQPoint&, const KURL&, const
KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t)), this, SLOT(slotPopupMenu(KXMLGUIClient*, const QPoint&, const KURL&, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t)), this, SLOT(slotPopupMenu(KXMLGUIClient*, const TQPoint&, const KURL&, const
KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t))); KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t)));
KStdAction::print(this, SLOT(slotPrint()), actionCollection(), "viewer_print"); KStdAction::print(this, SLOT(slotPrint()), actionCollection(), "viewer_print");
@ -62,7 +62,7 @@ SIGNAL(popupMenu (KXMLGUIClient*, const QPoint&, const KURL&, const
bool Viewer::openURL(const KURL &url) bool Viewer::openURL(const KURL &url)
{ {
new KlamAV::BrowserRun(this, (QWidget*)parent(), this, url, KParts::URLArgs()); new KlamAV::BrowserRun(this, (TQWidget*)parent(), this, url, KParts::URLArgs());
emit started(0); emit started(0);
return true; return true;
} }
@ -71,17 +71,17 @@ bool Viewer::openURL(const KURL &url)
bool Viewer::closeURL() bool Viewer::closeURL()
{ {
emit browserExtension()->loadingProgress(-1); emit browserExtension()->loadingProgress(-1);
emit canceled(QString::null); emit canceled(TQString::null);
return KHTMLPart::closeURL(); return KHTMLPart::closeURL();
} }
int Viewer::pointsToPixel(int pointSize) const int Viewer::pointsToPixel(int pointSize) const
{ {
const QPaintDeviceMetrics metrics(view()); const TQPaintDeviceMetrics metrics(view());
return ( pointSize * metrics.logicalDpiY() + 36 ) / 72 ; return ( pointSize * metrics.logicalDpiY() + 36 ) / 72 ;
} }
void Viewer::displayInExternalBrowser(const KURL &url, const QString &mimetype) void Viewer::displayInExternalBrowser(const KURL &url, const TQString &mimetype)
{ {
if (!url.isValid()) return; if (!url.isValid()) return;
/* if (Settings::externalBrowserUseKdeDefault()) /* if (Settings::externalBrowserUseKdeDefault())
@ -93,11 +93,11 @@ void Viewer::displayInExternalBrowser(const KURL &url, const QString &mimetype)
/* } /* }
else else
{ {
QString cmd = Settings::externalBrowserCustomCommand(); TQString cmd = Settings::externalBrowserCustomCommand();
QString urlStr = url.url(); TQString urlStr = url.url();
cmd.replace(QRegExp("%u"), urlStr); cmd.replace(TQRegExp("%u"), urlStr);
KProcess *proc = new KProcess; KProcess *proc = new KProcess;
QStringList cmdAndArgs = KShell::splitArgs(cmd); TQStringList cmdAndArgs = KShell::splitArgs(cmd);
*proc << cmdAndArgs; *proc << cmdAndArgs;
proc->start(KProcess::DontCare); proc->start(KProcess::DontCare);
delete proc; delete proc;
@ -140,9 +140,9 @@ void Viewer::slotOpenURLRequest(const KURL& url, const KParts::URLArgs& args)
} }
} }
void Viewer::slotPopupMenu(KXMLGUIClient*, const QPoint& p, const KURL& kurl, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t) void Viewer::slotPopupMenu(KXMLGUIClient*, const TQPoint& p, const KURL& kurl, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t)
{ {
QString url = kurl.url(); TQString url = kurl.url();
if(this->url() == url) return; if(this->url() == url) return;
m_url = url; m_url = url;
KPopupMenu popup; KPopupMenu popup;
@ -168,9 +168,9 @@ void Viewer::slotPopupMenu(KXMLGUIClient*, const QPoint& p, const KURL& kurl, co
// taken from KDevelop // taken from KDevelop
void Viewer::slotCopy() void Viewer::slotCopy()
{ {
QString text = selectedText(); TQString text = selectedText();
text.replace( QChar( 0xa0 ), ' ' ); text.replace( TQChar( 0xa0 ), ' ' );
QClipboard *cb = QApplication::clipboard(); TQClipboard *cb = TQApplication::clipboard();
disconnect( cb, SIGNAL( selectionChanged() ), this, SLOT( slotClearSelection() ) ); disconnect( cb, SIGNAL( selectionChanged() ), this, SLOT( slotClearSelection() ) );
cb->setText(text); cb->setText(text);
connect( cb, SIGNAL( selectionChanged() ), this, SLOT( slotClearSelection() ) ); connect( cb, SIGNAL( selectionChanged() ), this, SLOT( slotClearSelection() ) );
@ -179,9 +179,9 @@ void Viewer::slotCopy()
void Viewer::slotCopyLinkAddress() void Viewer::slotCopyLinkAddress()
{ {
if(m_url.isEmpty()) return; if(m_url.isEmpty()) return;
QClipboard *cb = QApplication::clipboard(); TQClipboard *cb = TQApplication::clipboard();
cb->setText(m_url.prettyURL(), QClipboard::Clipboard); cb->setText(m_url.prettyURL(), TQClipboard::Clipboard);
cb->setText(m_url.prettyURL(), QClipboard::Selection); cb->setText(m_url.prettyURL(), TQClipboard::Selection);
} }
void Viewer::slotSelectionChanged() void Viewer::slotSelectionChanged()
@ -207,7 +207,7 @@ void Viewer::slotOpenLinkInBackgroundTab()
void Viewer::slotOpenLinkInBrowser() void Viewer::slotOpenLinkInBrowser()
{ {
kdDebug() << "display external" << endl; kdDebug() << "display external" << endl;
displayInExternalBrowser(m_url, QString::null); displayInExternalBrowser(m_url, TQString::null);
} }
void Viewer::slotStarted(KIO::Job *) void Viewer::slotStarted(KIO::Job *)

@ -23,7 +23,7 @@ namespace KlamAV
{ {
Q_OBJECT Q_OBJECT
public: public:
Viewer(QWidget* parent, const char* name); Viewer(TQWidget* parent, const char* name);
virtual bool closeURL(); virtual bool closeURL();
virtual bool openURL(const KURL &); virtual bool openURL(const KURL &);
@ -51,7 +51,7 @@ namespace KlamAV
protected slots: protected slots:
virtual void slotOpenURLRequest(const KURL& url, const KParts::URLArgs& args); virtual void slotOpenURLRequest(const KURL& url, const KParts::URLArgs& args);
virtual void slotPopupMenu(KXMLGUIClient*, const QPoint&, const KURL&, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t); virtual void slotPopupMenu(KXMLGUIClient*, const TQPoint&, const KURL&, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t);
/** Copies current link to clipboard. */ /** Copies current link to clipboard. */
void slotCopyLinkAddress(); void slotCopyLinkAddress();
@ -86,7 +86,7 @@ namespace KlamAV
/** /**
* Display article in external browser. * Display article in external browser.
*/ */
void displayInExternalBrowser(const KURL &url, const QString &mime); void displayInExternalBrowser(const KURL &url, const TQString &mime);
}; };
} }

Loading…
Cancel
Save