diff --git a/src/Makefile.in b/src/Makefile.in index e04401b..4d94125 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1374,7 +1374,7 @@ firstrunwizard.cpp: $(srcdir)/firstrunwizard.ui firstrunwizard.h firstrunwizard. firstrunwizard.h: $(srcdir)/firstrunwizard.ui rm -rf firstrunwizard.h; - $(UIC) $(srcdir)/firstrunwizard.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include ,#include ,g" >> firstrunwizard.h ; + $(UIC) $(srcdir)/firstrunwizard.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include ,#include ,g" >> firstrunwizard.h ; firstrunwizard.moc: firstrunwizard.h $(MOC) firstrunwizard.h -o firstrunwizard.moc @@ -1389,7 +1389,7 @@ specialfiletypes.cpp: $(srcdir)/specialfiletypes.ui specialfiletypes.h specialfi specialfiletypes.h: $(srcdir)/specialfiletypes.ui rm -rf specialfiletypes.h; - $(UIC) $(srcdir)/specialfiletypes.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include ,#include ,g" >> specialfiletypes.h ; + $(UIC) $(srcdir)/specialfiletypes.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include ,#include ,g" >> specialfiletypes.h ; specialfiletypes.moc: specialfiletypes.h $(MOC) specialfiletypes.h -o specialfiletypes.moc @@ -1404,7 +1404,7 @@ autoscanoptions.cpp: $(srcdir)/autoscanoptions.ui autoscanoptions.h autoscanopti autoscanoptions.h: $(srcdir)/autoscanoptions.ui rm -rf autoscanoptions.h; - $(UIC) $(srcdir)/autoscanoptions.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include ,#include ,g" >> autoscanoptions.h ; + $(UIC) $(srcdir)/autoscanoptions.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include ,#include ,g" >> autoscanoptions.h ; autoscanoptions.moc: autoscanoptions.h $(MOC) autoscanoptions.h -o autoscanoptions.moc @@ -1425,7 +1425,7 @@ archivetypes.cpp: $(srcdir)/archivetypes.ui archivetypes.h archivetypes.moc archivetypes.h: $(srcdir)/archivetypes.ui rm -rf archivetypes.h; - $(UIC) $(srcdir)/archivetypes.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include ,#include ,g" >> archivetypes.h ; + $(UIC) $(srcdir)/archivetypes.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include ,#include ,g" >> archivetypes.h ; archivetypes.moc: archivetypes.h $(MOC) archivetypes.h -o archivetypes.moc @@ -1440,7 +1440,7 @@ logoptions.cpp: $(srcdir)/logoptions.ui logoptions.h logoptions.moc logoptions.h: $(srcdir)/logoptions.ui rm -rf logoptions.h; - $(UIC) $(srcdir)/logoptions.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include ,#include ,g" >> logoptions.h ; + $(UIC) $(srcdir)/logoptions.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include ,#include ,g" >> logoptions.h ; logoptions.moc: logoptions.h $(MOC) logoptions.h -o logoptions.moc @@ -1455,6 +1455,6 @@ archivelimits.cpp: $(srcdir)/archivelimits.ui archivelimits.h archivelimits.moc archivelimits.h: $(srcdir)/archivelimits.ui rm -rf archivelimits.h; - $(UIC) $(srcdir)/archivelimits.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include ,#include ,g" >> archivelimits.h ; + $(UIC) $(srcdir)/archivelimits.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include ,#include ,g" >> archivelimits.h ; archivelimits.moc: archivelimits.h $(MOC) archivelimits.h -o archivelimits.moc diff --git a/src/about/main-pt_BR.html b/src/about/main-pt_BR.html index 25ce946..2e760da 100644 --- a/src/about/main-pt_BR.html +++ b/src/about/main-pt_BR.html @@ -39,10 +39,10 @@ A:HOVER {

Browser de Vírus do KlamAV

Home
Notícias
Notas de Segurança










-

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:

-

  • Clicar com o botao direito no nome do vírus para escolher aonde deseja pesquisar sobre ele, seja usando o Google ou o VirusPool.
  • -

  • Clicar com o botão da direita em um vírus detectado na aba "Verificar" para pesquisar no browser de vírus.
  • -

  • Clicar com o botão da direita em um vírua na aba de "Quarentena" para pesquisar no browser de vírus.
  • +

    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:

    +

  • Clicar com o botao direito no nome do vírus para escolher aonde deseja pestquisar sobre ele, seja usando o Google ou o VirusPool.
  • +

  • Clicar com o botão da direita em um vírus detectado na aba "Verificar" para pestquisar no browser de vírus.
  • +

  • Clicar com o botão da direita em um vírua na aba de "Quarentena" para pestquisar no browser de vírus.
  • Nota: O filtro de vírus no topo a esquerda é experimental, Usar esse recurso consome tempo, portanto use com cuidado!!

    diff --git a/src/aboutklamav.cpp b/src/aboutklamav.cpp index 403ac49..e06c18d 100644 --- a/src/aboutklamav.cpp +++ b/src/aboutklamav.cpp @@ -12,31 +12,31 @@ #include #include -#include +#include using namespace KlamAV; -Aboutklamav::Aboutklamav(QWidget *parent, const char *name) - : QWidget(parent, name) +Aboutklamav::Aboutklamav(TQWidget *parent, const char *name) + : TQWidget(parent, name) { -// QString location = locate("data", "klamav/about/klam.png"); -// QPixmap image0; -// QImage img; +// TQString location = locate("data", "klamav/about/klam.png"); +// TQPixmap image0; +// TQImage img; // // //img.loadFromData( image0_data, sizeof( image0_data ), "PNG" ); // img.load(location,"PNG"); // image0 = img; - QVBoxLayout *vbox = new QVBoxLayout(this, KDialog::marginHint(), + TQVBoxLayout *vbox = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint(), "vbox"); - QWidget* privateLayoutWidget = new QWidget( this, "dblayout" ); + TQWidget* privateLayoutWidget = new TQWidget( this, "dblayout" ); 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); tabBrowser = new TabWidget(privateLayoutWidget); @@ -44,8 +44,8 @@ Aboutklamav::Aboutklamav(QWidget *parent, const char *name) homepage = new PageViewer(this, "page"); - connect( homepage, SIGNAL(setWindowCaption (const QString &)), - this, SLOT(slotTabCaption (const QString &)) ); + connect( homepage, SIGNAL(setWindowCaption (const TQString &)), + this, SLOT(slotTabCaption (const TQString &)) ); connect( homepage, SIGNAL(urlClicked(const KURL &,bool)), this, SLOT(slotOpenTabPlain(const KURL &,bool)) ); @@ -55,43 +55,43 @@ Aboutklamav::Aboutklamav(QWidget *parent, const char *name) tabBrowser->showPage(homepage->widget()); setFocus(); - QString location = locate("data", "klamav/about/aboutklamav.html"); + TQString location = locate("data", "klamav/about/aboutklamav.html"); homepage->openURL(location); - //slotTabCaption(QString("KlamAV %1").arg(KLAMAV_VERSION)); + //slotTabCaption(TQString("KlamAV %1").arg(KLAMAV_VERSION)); //KMessageBox::information (this,nooffilters); -/* QGroupBox *groupBox1 = new QGroupBox( "About KlamAV",this ); +/* TQGroupBox *groupBox1 = new TQGroupBox( "About KlamAV",this ); vbox->addWidget(groupBox1); - groupBox1->setGeometry( QRect( 20, 40, 551, 391 ) ); + groupBox1->setGeometry( TQRect( 20, 40, 551, 391 ) ); - QLabel *pixmapLabel1 = new QLabel( groupBox1, "pixmapLabel1" ); - pixmapLabel1->setGeometry( QRect( 60, 110, 140, 140 ) ); + TQLabel *pixmapLabel1 = new TQLabel( groupBox1, "pixmapLabel1" ); + pixmapLabel1->setGeometry( TQRect( 60, 110, 140, 140 ) ); pixmapLabel1->setPixmap( image0 ); pixmapLabel1->setScaledContents( TRUE ); - QLabel *textLabel1_2 = new QLabel( "KlamAV \n(C) Robert Hogan ",groupBox1 ); - textLabel1_2->setGeometry( QRect( 230, 80, 421, 61 ) ); + TQLabel *textLabel1_2 = new TQLabel( "KlamAV \n(C) Robert Hogan ",groupBox1 ); + textLabel1_2->setGeometry( TQRect( 230, 80, 421, 61 ) ); - QLabel *textLabel1_3 = new QLabel( "http://klamav.sourceforge.net",groupBox1 ); - textLabel1_3->setGeometry( QRect( 230, 130, 221, 21 ) ); + TQLabel *textLabel1_3 = new TQLabel( "http://klamav.sourceforge.net",groupBox1 ); + textLabel1_3->setGeometry( TQRect( 230, 130, 221, 21 ) ); - QLabel *textLabel1 = new QLabel( "Translators:\nRussian, Vitaly Lipatov \n German, Marc Hansen",groupBox1 ); - textLabel1->setGeometry( QRect( 230, 150, 401, 61 ) ); + TQLabel *textLabel1 = new TQLabel( "Translators:\nRussian, Vitaly Lipatov \n German, Marc Hansen",groupBox1 ); + textLabel1->setGeometry( TQRect( 230, 150, 401, 61 ) ); - QLabel *textLabel1 = new QLabel( "ClamAV \n(C) Tomasz Kojm ",groupBox1 ); - textLabel1->setGeometry( QRect( 230, 20, 401, 61 ) ); + TQLabel *textLabel1 = new TQLabel( "ClamAV \n(C) Tomasz Kojm ",groupBox1 ); + textLabel1->setGeometry( TQRect( 230, 20, 401, 61 ) ); - QLabel *textLabel1_4 = new QLabel( "http://www.clamav.net",groupBox1 ); - textLabel1_4->setGeometry( QRect( 230, 250, 221, 21 ) ); + TQLabel *textLabel1_4 = new TQLabel( "http://www.clamav.net",groupBox1 ); + textLabel1_4->setGeometry( TQRect( 230, 250, 221, 21 ) ); pixmapLabel1->setPixmap( image0 ); 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"); //connect( m_part, SIGNAL(signalSettingsChanged()), page, SLOT(slotPaletteOrFontChanged())); -/* connect( page, SIGNAL(setTabIcon(const QPixmap&)), - this, SLOT(setTabIcon(const QPixmap&)));*/ - connect( page, SIGNAL(setWindowCaption (const QString &)), - this, SLOT(slotTabCaption (const QString &)) ); +/* connect( page, SIGNAL(setTabIcon(const TQPixmap&)), + this, SLOT(setTabIcon(const TQPixmap&)));*/ + connect( page, SIGNAL(setWindowCaption (const TQString &)), + this, SLOT(slotTabCaption (const TQString &)) ); connect( page, SIGNAL(urlClicked(const KURL &,bool)), this, SLOT(slotOpenTabPlain(const KURL &,bool)) ); @@ -131,7 +131,7 @@ void Aboutklamav::slotOpenTabPlain(const KURL& url, bool background) page->openURL(url); } -void Aboutklamav::slotTabCaption(const QString &caption) +void Aboutklamav::slotTabCaption(const TQString &caption) { if (!caption.isEmpty()) { diff --git a/src/aboutklamav.h b/src/aboutklamav.h index 9bd2167..0d3452c 100644 --- a/src/aboutklamav.h +++ b/src/aboutklamav.h @@ -17,12 +17,12 @@ class KPrinter; class KToggleAction; class KURL; -class QLineEdit; -class QComboBox; -class QCheckBox; -class QListBox; -class QPushButton; -class QLabel; +class TQLineEdit; +class TQComboBox; +class TQCheckBox; +class TQListBox; +class TQPushButton; +class TQLabel; class KProcess; class KConfig; class KURLRequester; @@ -42,14 +42,14 @@ namespace KlamAV * @author $AUTHOR <$EMAIL> * @version $APP_VERSION */ -class Aboutklamav : public QWidget +class Aboutklamav : public TQWidget { Q_OBJECT public: /** * Default Constructor */ - Aboutklamav(QWidget *parent, const char *name=0); + Aboutklamav(TQWidget *parent, const char *name=0); /** * Default Destructor @@ -60,14 +60,14 @@ public: * Use this method to load whatever file/URL you have */ void load(const KURL& url); - void setDirName(QString); + void setDirName(TQString); protected: /** - * Overridden virtuals for Qt drag 'n drop (XDND) + * Overridden virtuals for TQt drag 'n drop (XDND) */ - /*virtual void dragEnterEvent(QDragEnterEvent *event); - virtual void dropEvent(QDropEvent *event);*/ + /*virtual void dragEnterEvent(TQDragEnterEvent *event); + virtual void dropEvent(TQDropEvent *event);*/ protected: /** @@ -97,8 +97,8 @@ private slots: void optionsPreferences(); void newToolbarConfig(); */ - //void changeStatusbar(const QString& text); - //void changeCaption(const QString& text); + //void changeStatusbar(const TQString& text); + //void changeCaption(const TQString& text); private: void setupAccel(); @@ -113,7 +113,7 @@ private: KlamAV::PageViewer* homepage; KlamAV::TabWidget* tabBrowser; signals: - void itemSelected(QString abs_filename, int line); + void itemSelected(TQString abs_filename, int line); public slots: @@ -121,14 +121,14 @@ private slots: protected slots: void slotOpenTabPlain(const KURL& url, bool background = false); - void slotTabCaption(const QString &capt); + void slotTabCaption(const TQString &capt); private: - QPushButton *about_button; + TQPushButton *about_button; KConfig *config; - QComboBox *check_combo; - QLabel *notes_label; + TQComboBox *check_combo; + TQLabel *notes_label; }; #endif // _Aboutklamav_H_ diff --git a/src/activityviewer.cpp b/src/activityviewer.cpp index 849c0ad..6df81b6 100644 --- a/src/activityviewer.cpp +++ b/src/activityviewer.cpp @@ -27,10 +27,10 @@ #include #include #include -#include +#include #include #include -#include +#include const char *log_type[] = { "All Types", @@ -57,36 +57,36 @@ const char *log_days[] = { }; -Activityviewer::Activityviewer(QWidget *parent, const char *name) - : QWidget(parent, name) +Activityviewer::Activityviewer(TQWidget *parent, const char *name) + : TQWidget(parent, name) { //Create GUI - QVBoxLayout *vbox = new QVBoxLayout(this, KDialog::marginHint(), + TQVBoxLayout *vbox = new TQVBoxLayout(this, KDialog::marginHint(), 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()); layout->addWidget(combo_label,0,0); combo_label->adjustSize(); - check_combo = new QComboBox(false, privateLayoutWidget2); + check_combo = new TQComboBox(false, privateLayoutWidget2); check_combo->insertStrList(log_type); check_combo->adjustSize(); //check_combo->setFixedSize(check_combo->size()); 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()); layout->addWidget(days_label,0,2); days_label->adjustSize(); - days_combo = new QComboBox(false, privateLayoutWidget2); + days_combo = new TQComboBox(false, privateLayoutWidget2); days_combo->insertStrList(log_days); days_combo->adjustSize(); //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->setTextLabel("Options"); - options->setTextPosition(QToolButton::Right); + options->setTextPosition(TQToolButton::Right); options->setUsesTextLabel(true); options->adjustSize(); 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); - 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(1, group2->fontMetrics().height()); //layout2->setColStretch(0, 1); //layout2->setColStretch(1, 1); - QWidget *hlp2 = new QWidget( group2 ); + TQWidget *hlp2 = new TQWidget( group2 ); 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 ); 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->setShowSortIndicator(true); - QFontMetrics rb_fm(currentbox->fontMetrics()); + TQFontMetrics rb_fm(currentbox->fontMetrics()); //currentbox->setMinimumSize(rb_fm.width("0")*55, // rb_fm.lineSpacing()*15); ////kdDebug() << ((currentbox->width())/3) << endl; @@ -144,17 +144,17 @@ Activityviewer::Activityviewer(QWidget *parent, const char *name) currentbox->addColumn( "Type",0); currentbox->addColumn( "Event",0); currentbox->addColumn( "File",0); - currentbox->setResizeMode(QListView::AllColumns); - currentbox->setSelectionMode( QListView::Extended ); + currentbox->setResizeMode(TQListView::AllColumns); + currentbox->setSelectionMode( TQListView::Extended ); currentbox->setAllColumnsShowFocus(true); -// qmenu = new QPopupMenu( currentbox ); +// qmenu = new TQPopupMenu( currentbox ); -// connect(currentbox, SIGNAL( contextMenuRequested( QListViewItem *, const QPoint& , int ) ), -// this, SLOT( slotRMB( QListViewItem *, const QPoint &, int ) ) ); +// connect(currentbox, SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint& , int ) ), +// this, SLOT( slotRMB( TQListViewItem *, const TQPoint &, int ) ) ); - kLineEdit1 = new KListViewSearchLine( (QWidget *)searchToolBar, currentbox,"klinedit1"); -/* QValueList columns; + kLineEdit1 = new KListViewSearchLine( (TQWidget *)searchToolBar, currentbox,"klinedit1"); +/* TQValueList columns; columns.append(0); columns.append(1); columns.append(2);*/ @@ -162,10 +162,10 @@ Activityviewer::Activityviewer(QWidget *parent, const char *name) //kLineEdit1->setMaxLength(2); connect(button, SIGNAL( clicked() ), kLineEdit1, SLOT(clear()) ); - connect(check_combo, SIGNAL( activated(const QString &) ), - this, SLOT(allActivityOfType(const QString &) )); - connect(days_combo, SIGNAL( activated(const QString &) ), - this, SLOT(allActivityOfDate(const QString &) )); + connect(check_combo, SIGNAL( activated(const TQString &) ), + this, SLOT(allActivityOfType(const TQString &) )); + connect(days_combo, SIGNAL( activated(const TQString &) ), + this, SLOT(allActivityOfDate(const TQString &) )); searchToolBar->setStretchableWidget( kLineEdit1 ); @@ -176,7 +176,7 @@ Activityviewer::Activityviewer(QWidget *parent, const char *name) //layout->addMultiCellWidget(currentbox); - CollectionDB::instance()->expireActivity( QString("%1").arg(KlamavConfig::expireDays()) ); + CollectionDB::instance()->expireActivity( TQString("%1").arg(KlamavConfig::expireDays()) ); allActivityOfDate(days_combo->currentText()); @@ -191,11 +191,11 @@ void Activityviewer::populateActivity() if (!(activity.isEmpty())){ int i=0; - QString eventdate; - QString eventtype; - QString event; - QString file; - for (QStringList::Iterator it = activity.begin(); it != activity.end(); it++ ){ + TQString eventdate; + TQString eventtype; + TQString event; + TQString file; + for (TQStringList::Iterator it = activity.begin(); it != activity.end(); it++ ){ ////kdDebug() << *it << endl; if (i==0){ eventdate = *it; @@ -223,29 +223,29 @@ void Activityviewer::allActivity() 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); 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"); - QString type = check_combo->currentText(); + TQString type = check_combo->currentText(); activity = CollectionDB::instance()->allActivityOfType(type,stripdays); 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")) @@ -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 ) { } @@ -276,17 +276,17 @@ EventListItem::~EventListItem() // 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"))) - cg2.setColor(QColorGroup::Text, Qt::red); + cg2.setColor(TQColorGroup::Text, TQt::red); else if ( this->text(1) == "Updates") - cg2.setColor(QColorGroup::Text, Qt::blue); + cg2.setColor(TQColorGroup::Text, TQt::blue); 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 ); diff --git a/src/activityviewer.h b/src/activityviewer.h index 5c1b28a..e027ee0 100644 --- a/src/activityviewer.h +++ b/src/activityviewer.h @@ -16,12 +16,12 @@ class KToggleAction; class KURL; -class QLineEdit; -class QComboBox; -class QCheckBox; +class TQLineEdit; +class TQComboBox; +class TQCheckBox; class KListView; -class QPushButton; -class QLabel; +class TQPushButton; +class TQLabel; class KProcess; class KConfig; class KURLRequester; @@ -37,14 +37,14 @@ class KListViewSearchLine; * @author $AUTHOR <$EMAIL> * @version $APP_VERSION */ -class Activityviewer : public QWidget +class Activityviewer : public TQWidget { Q_OBJECT public: /** * Default Constructor */ - Activityviewer(QWidget *parent, const char *name=0); + Activityviewer(TQWidget *parent, const char *name=0); /** * Default Destructor @@ -55,21 +55,21 @@ public: * Use this method to load whatever file/URL you have */ void load(); - void setDirName(QString); + void setDirName(TQString); void createQuarDir(); - QString getFileName(QString); - QString getVirusName(QString); - QString getWhen(QString); - QString getSelectedVirusName(); - void insertItem(const QString &date, const QString &type, const QString &event, const QString &file); + TQString getFileName(TQString); + TQString getVirusName(TQString); + TQString getWhen(TQString); + TQString getSelectedVirusName(); + void insertItem(const TQString &date, const TQString &type, const TQString &event, const TQString &file); KListViewSearchLine* kLineEdit1; protected: /** - * Overridden virtuals for Qt drag 'n drop (XDND) + * Overridden virtuals for TQt drag 'n drop (XDND) */ - /*virtual void dragEnterEvent(QDragEnterEvent *event); - virtual void dropEvent(QDropEvent *event);*/ + /*virtual void dragEnterEvent(TQDragEnterEvent *event); + virtual void dropEvent(TQDropEvent *event);*/ protected: /** @@ -88,8 +88,8 @@ protected: private slots: void allActivity(); - void allActivityOfType(const QString &type); - void allActivityOfDate(const QString &days); + void allActivityOfType(const TQString &type); + void allActivityOfDate(const TQString &days); private: void setupAccel(); @@ -105,44 +105,44 @@ private: signals: - void itemSelected(QString abs_filename, int line); + void itemSelected(TQString abs_filename, int line); public slots: private slots: void slotOptions(); - //void patternTextChanged( const QString &); + //void patternTextChanged( const TQString &); private: - QLineEdit *template_edit; - QComboBox *check_combo, *days_combo; + TQLineEdit *template_edit; + TQComboBox *check_combo, *days_combo; KURLRequester *dir_combo; - QCheckBox *recursive_box; + TQCheckBox *recursive_box; KListView *currentbox; - QPushButton *search_button, *cancel_button, *refresh_button, *search_button3, *cancel_button3; - QLabel *status_label, *matches_label; + TQPushButton *search_button, *cancel_button, *refresh_button, *search_button3, *cancel_button3; + TQLabel *status_label, *matches_label; KProcess *childproc; - QString buf; + TQString buf; KConfig* config; - QStringList lastQuarItems; - QStringList lastHistoryItems; - QStringList lastQuarLocations; - QStringList lastSearchPaths; - QString quarloc; - QPopupMenu* qmenu; - QPopupMenu* hmenu; - QStringList activity; + TQStringList lastQuarItems; + TQStringList lastHistoryItems; + TQStringList lastQuarLocations; + TQStringList lastSearchPaths; + TQString quarloc; + TQPopupMenu* qmenu; + TQPopupMenu* hmenu; + TQStringList activity; }; class EventListItem : public KListViewItem { 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(); - 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 ); }; diff --git a/src/archivelimits.ui b/src/archivelimits.ui index 43ff6a1..5d631cc 100644 --- a/src/archivelimits.ui +++ b/src/archivelimits.ui @@ -1,6 +1,6 @@ ArchiveLimits - + ArchiveLimits @@ -40,7 +40,7 @@ - + LimitsGroup @@ -55,7 +55,7 @@ Archive Limits - + layout35 @@ -71,7 +71,7 @@ unnamed - + layout34 @@ -79,7 +79,7 @@ unnamed - + MaxFilesExt @@ -138,7 +138,7 @@ - + MaxLevRecur @@ -146,7 +146,7 @@ Maximum Level of Recursion - + kcfg_MaxScanSize @@ -157,7 +157,7 @@ 9999 - + MaxMBsEx @@ -182,7 +182,7 @@ - + kcfg_MaxFileSize @@ -193,7 +193,7 @@ 9999 - + kcfg_NoFilesToExtract @@ -204,7 +204,7 @@ 9999 - + kcfg_RecursionLevel @@ -215,7 +215,7 @@ 9999 - + MaxCompRatio diff --git a/src/archivetypes.ui b/src/archivetypes.ui index e30e7bd..3d9fdfa 100644 --- a/src/archivetypes.ui +++ b/src/archivetypes.ui @@ -1,6 +1,6 @@ ArchiveTypes - + ArchiveTypes @@ -19,14 +19,14 @@ unnamed - + Archive_Types Archive Types - + layout8 @@ -42,7 +42,7 @@ unnamed - + kcfg_ScanDeb @@ -53,7 +53,7 @@ - + kcfg_ScanJar @@ -64,7 +64,7 @@ - + kcfg_ScanTar @@ -75,7 +75,7 @@ - + kcfg_ScanLzh @@ -91,7 +91,7 @@ kcfg_TarUsing - + kcfg_ScanZoo @@ -117,7 +117,7 @@ kcfg_ZipUsing - + kcfg_ScanRar @@ -128,7 +128,7 @@ - + kcfg_ScanZip @@ -159,7 +159,7 @@ kcfg_TgzUsing - + kcfg_ScanTgz @@ -175,7 +175,7 @@ kcfg_ArjUsing - + kcfg_ScanArj diff --git a/src/arkollon/Makefile.in b/src/arkollon/Makefile.in index ed0fd47..c13c0e9 100644 --- a/src/arkollon/Makefile.in +++ b/src/arkollon/Makefile.in @@ -815,7 +815,7 @@ wizardbase.cpp: $(srcdir)/wizardbase.ui wizardbase.h wizardbase.moc wizardbase.h: $(srcdir)/wizardbase.ui rm -rf wizardbase.h; - $(UIC) $(srcdir)/wizardbase.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include ,#include ,g" >> wizardbase.h ; + $(UIC) $(srcdir)/wizardbase.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include ,#include ,g" >> wizardbase.h ; wizardbase.moc: wizardbase.h $(MOC) wizardbase.h -o wizardbase.moc @@ -830,6 +830,6 @@ logdialog.cpp: $(srcdir)/logdialog.ui logdialog.h logdialog.moc logdialog.h: $(srcdir)/logdialog.ui rm -rf logdialog.h; - $(UIC) $(srcdir)/logdialog.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include ,#include ,g" >> logdialog.h ; + $(UIC) $(srcdir)/logdialog.ui | $(PERL) -pi -e "s,public QWizard,public KWizard,g; s,#include ,#include ,g" >> logdialog.h ; logdialog.moc: logdialog.h $(MOC) logdialog.h -o logdialog.moc diff --git a/src/arkollon/data.h b/src/arkollon/data.h index 8fe17bb..bb80031 100644 --- a/src/arkollon/data.h +++ b/src/arkollon/data.h @@ -169,9 +169,9 @@ static const unsigned char uninstaller_sh_data[] = { 0x74,0x0a,0x64,0x6f,0x6e,0x65,0x0a,0x09,0x09,0x0a }; -#include -#include -static const QRgb misc_data[] = { +#include +#include +static const TQRgb misc_data[] = { 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, 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 }; -static const QRgb splash_data[] = { +static const TQRgb splash_data[] = { 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, 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 }; -static const QRgb packageIcon_data[] = { +static const TQRgb packageIcon_data[] = { 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, 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 }; -#include +#include static struct Embed { unsigned int size; const unsigned char *data; @@ -3070,14 +3070,14 @@ static struct Embed { { 0, 0, 0 } }; -static const QByteArray& qembed_findData( const char* name ) +static const TQByteArray& qembed_findData( const char* name ) { - static QDict dict; - QByteArray* ba = dict.find( name ); + static TQDict dict; + TQByteArray* ba = dict.find( name ); if ( !ba ) { for ( int i = 0; embed_vec[i].data; i++ ) { if ( strcmp(embed_vec[i].name, name) == 0 ) { - ba = new QByteArray; + ba = new TQByteArray; ba->setRawData( (char*)embed_vec[i].data, embed_vec[i].size ); dict.insert( name, ba ); @@ -3085,7 +3085,7 @@ static const QByteArray& qembed_findData( const char* name ) } } if ( !ba ) { - static QByteArray dummy; + static TQByteArray dummy; return dummy; } } @@ -3096,7 +3096,7 @@ static struct EmbedImage { int width, height, depth; const unsigned char *data; int numColors; - const QRgb *colorTable; + const TQRgb *colorTable; bool alpha; const char *name; } embed_image_vec[] = { @@ -3106,20 +3106,20 @@ static struct EmbedImage { { 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 dict; - QImage* img = dict.find( name ); + static TQDict dict; + TQImage* img = dict.find( name ); if ( !img ) { for ( int i = 0; embed_image_vec[i].data; i++ ) { 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].height, embed_image_vec[i].depth, - (QRgb*)embed_image_vec[i].colorTable, + (TQRgb*)embed_image_vec[i].colorTable, embed_image_vec[i].numColors, - QImage::BigEndian ); + TQImage::BigEndian ); if ( embed_image_vec[i].alpha ) img->setAlphaBuffer( TRUE ); dict.insert( name, img ); @@ -3127,7 +3127,7 @@ static const QImage& qembed_findImage( const QString& name ) } } if ( !img ) { - static QImage dummy; + static TQImage dummy; return dummy; } } diff --git a/src/arkollon/headerlistitem.cpp b/src/arkollon/headerlistitem.cpp index b7d0631..0c30b39 100644 --- a/src/arkollon/headerlistitem.cpp +++ b/src/arkollon/headerlistitem.cpp @@ -19,19 +19,19 @@ ***************************************************************************/ #include "headerlistitem.h" -#include -#include -#include +#include +#include +#include #include "uninstallwizard.h" #include "wizard.h" -HeaderListItem::HeaderListItem(QListView* parent) - : QListViewItem(parent) +HeaderListItem::HeaderListItem(TQListView* 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()) { @@ -64,20 +64,20 @@ int HeaderListItem::compare(QListViewItem* i, int col, bool ascending) const 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()); - QFont boldFont = p->font(); + TQFont boldFont = p->font(); boldFont.setBold(true); 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()); - QColor ca = cg.highlight(); - QColor cb = cg.base(); + TQColor ca = cg.highlight(); + TQColor cb = cg.base(); // Taken from KPixmapEffect::gradient int rDiff, gDiff, bDiff; int rca, gca, bca /*, rcb, gcb, bcb*/; @@ -101,26 +101,26 @@ void HeaderListItem::paintCell(QPainter* p, const QColorGroup& cg, int column, i gl += gcdelta; 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); } } -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); - QFontMetrics metrics(boldFont); + TQFontMetrics metrics(boldFont); return metrics.width(text(0)) + lv->itemMargin() + 10; } void HeaderListItem::setup() { - setHeight(qApp->fontMetrics().height() + listView()->itemMargin()*3 + 4); + setHeight(tqApp->fontMetrics().height() + listView()->itemMargin()*3 + 4); } diff --git a/src/arkollon/headerlistitem.h b/src/arkollon/headerlistitem.h index 4585785..bfecda2 100644 --- a/src/arkollon/headerlistitem.h +++ b/src/arkollon/headerlistitem.h @@ -20,17 +20,17 @@ #ifndef HEADERLISTITEM_H #define HEADERLISTITEM_H -#include +#include -class HeaderListItem : public QListViewItem +class HeaderListItem : public TQListViewItem { public: - HeaderListItem(QListView* parent); - int compare(QListViewItem* i, int col, bool ascending) const; - void paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align); - void paintFocus(QPainter* p, const QColorGroup& cg, const QRect& r); + HeaderListItem(TQListView* parent); + int compare(TQListViewItem* i, int col, bool ascending) const; + void paintCell(TQPainter* p, const TQColorGroup& cg, int column, int width, int align); + void paintFocus(TQPainter* p, const TQColorGroup& cg, const TQRect& r); 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 section; diff --git a/src/arkollon/klamarkollon.cpp b/src/arkollon/klamarkollon.cpp index 12429bc..0dc7b08 100644 --- a/src/arkollon/klamarkollon.cpp +++ b/src/arkollon/klamarkollon.cpp @@ -27,25 +27,25 @@ #include #include -#include +#include #include "wizard.h" #include "uninstallwizard.h" int main(int argc, char *argv[]) { - QApplication app(argc, argv); + TQApplication app(argc, argv); // Check if we're root if (getuid() != 0) { - QString command = "kdesu -i klamav -n -c \""; + TQString command = "kdesu -i klamav -n -c \""; for (int i=0 ; i LogDialog - + LogDialog @@ -22,7 +22,7 @@ unnamed - + logBox @@ -33,7 +33,7 @@ true - + layout8 @@ -58,7 +58,7 @@ - + buttonOk diff --git a/src/arkollon/rcparser.cpp b/src/arkollon/rcparser.cpp index 147be1b..10124ac 100644 --- a/src/arkollon/rcparser.cpp +++ b/src/arkollon/rcparser.cpp @@ -19,9 +19,9 @@ ***************************************************************************/ #include "rcparser.h" -#include -#include -#include +#include +#include +#include RcParser::RcParser() { @@ -32,18 +32,18 @@ RcParser::~RcParser() { } -void RcParser::addSearchDir(QString dir) +void RcParser::addSearchDir(TQString dir) { dirs.append(dir); } -bool RcParser::openFile(QString name) +bool RcParser::openFile(TQString name) { // Check if it exists 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; break; @@ -57,17 +57,17 @@ bool RcParser::openFile(QString name) sections.clear(); // Read the file's contents - QFile file(fileName); + TQFile file(fileName); file.open(IO_ReadOnly); - QTextStream stream(&file); + TQTextStream stream(&file); - QRegExp sectionRegExp("^\\[([^\\]]*)\\]$"); - QRegExp pairRegExp("^([^=\\s]*)([=\\s]*)(.*)$"); + TQRegExp sectionRegExp("^\\[([^\\]]*)\\]$"); + TQRegExp pairRegExp("^([^=\\s]*)([=\\s]*)(.*)$"); currentSection = "RcParserDefaultSection"; while (!stream.atEnd()) { - QString line = stream.readLine(); + TQString line = stream.readLine(); if (line.left(1) == "#") // Comment continue; @@ -81,8 +81,8 @@ bool RcParser::openFile(QString name) } if (pairRegExp.search(line) != -1) { - QString key = pairRegExp.cap(1); - QString value = pairRegExp.cap(3); + TQString key = pairRegExp.cap(1); + TQString value = pairRegExp.cap(3); sections[currentSection][key] = value; //printf("Found pair \"%s\" = \"%s\"\n", key.latin1(), value.latin1()); continue; @@ -95,25 +95,25 @@ bool RcParser::openFile(QString name) return true; } -void RcParser::setSection(QString section) +void RcParser::setSection(TQString section) { currentSection = section; } -QStringList RcParser::sectionList() +TQStringList RcParser::sectionList() { 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()) return def; return ret; } -int RcParser::readInt(QString key, int def) +int RcParser::readInt(TQString key, int def) { bool ok; int ret = sections[currentSection][key].toInt(&ok); @@ -122,7 +122,7 @@ int RcParser::readInt(QString key, int def) return ret; } -bool RcParser::readBool(QString key, bool def) +bool RcParser::readBool(TQString key, bool def) { bool ret = def; if (sections[currentSection][key].lower() == "true") @@ -136,9 +136,9 @@ bool RcParser::readBool(QString key, bool def) return ret; } -QStringList RcParser::readList(QString key) +TQStringList RcParser::readList(TQString key) { - return QStringList::split(",", sections[currentSection][key]); + return TQStringList::split(",", sections[currentSection][key]); } diff --git a/src/arkollon/rcparser.h b/src/arkollon/rcparser.h index af8b011..c875aa3 100644 --- a/src/arkollon/rcparser.h +++ b/src/arkollon/rcparser.h @@ -20,8 +20,8 @@ #ifndef RCPARSER_H #define RCPARSER_H -#include -#include +#include +#include class RcParser { @@ -29,22 +29,22 @@ public: RcParser(); ~RcParser(); - void addSearchDir(QString dir); - bool openFile(QString name); + void addSearchDir(TQString dir); + bool openFile(TQString name); - QStringList sectionList(); - void setSection(QString section); + TQStringList sectionList(); + void setSection(TQString section); - QString readString(QString key, QString def=QString::null); - int readInt(QString key, int def=0); - bool readBool(QString key, bool def=false); - QStringList readList(QString key); + TQString readString(TQString key, TQString def=TQString::null); + int readInt(TQString key, int def=0); + bool readBool(TQString key, bool def=false); + TQStringList readList(TQString key); private: - QStringList dirs; - QString fileName; - QString currentSection; - QMap< QString, QMap< QString, QString> > sections; + TQStringList dirs; + TQString fileName; + TQString currentSection; + TQMap< TQString, TQMap< TQString, TQString> > sections; }; #endif diff --git a/src/arkollon/uninstallwizard.cpp b/src/arkollon/uninstallwizard.cpp index 7b4fbfa..0833117 100644 --- a/src/arkollon/uninstallwizard.cpp +++ b/src/arkollon/uninstallwizard.cpp @@ -23,20 +23,20 @@ #include "headerlistitem.h" #include "data.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include -AppListItem::AppListItem(QString nN, QString n, QListView* parent) - : QCheckListItem(parent, "", QCheckListItem::CheckBox) +AppListItem::AppListItem(TQString nN, TQString n, TQListView* parent) + : TQCheckListItem(parent, "", TQCheckListItem::CheckBox) { niceName = nN; name = n; @@ -45,7 +45,7 @@ AppListItem::AppListItem(QString nN, QString n, QListView* parent) 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()) { @@ -56,7 +56,7 @@ int AppListItem::compare(QListViewItem* i, int col, bool ascending) const return -1; if (section > item->section) return 1; - return QListViewItem::compare(i, col, ascending); + return TQListViewItem::compare(i, col, ascending); } 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) { mainStack->raiseWidget(1); @@ -89,16 +89,16 @@ UninstallWizard::UninstallWizard(QWidget* parent, const char* name, bool modal, icon.convertFromImage(qembed_findImage("misc")); - externalProcess = new QProcess(this); + externalProcess = new TQProcess(this); connect(externalProcess, SIGNAL(processExited()), SLOT(processExited())); connect(externalProcess, SIGNAL(readyReadStdout()), SLOT(readyReadStdout())); connect(externalProcess, SIGNAL(readyReadStderr()), SLOT(readyReadStderr())); - QFile uninstallScript("/tmp/arkollon-uninstall.sh"); + TQFile uninstallScript("/tmp/arkollon-uninstall.sh"); if (uninstallScript.exists()) uninstallScript.remove(); uninstallScript.open(IO_WriteOnly); - QDataStream stream(&uninstallScript); + TQDataStream stream(&uninstallScript); stream.writeRawBytes((const char*)uninstaller_sh_data, uninstaller_sh_len); uninstallScript.close(); @@ -111,7 +111,7 @@ UninstallWizard::UninstallWizard(QWidget* parent, const char* name, bool modal, UninstallWizard::~UninstallWizard() { - QFile uninstallScript("/tmp/arkollon-uninstall.sh"); + TQFile uninstallScript("/tmp/arkollon-uninstall.sh"); if (uninstallScript.exists()) uninstallScript.remove(); } @@ -151,10 +151,10 @@ void UninstallWizard::nextPressed() if (currentId == 0) { bool checked = false; - QStringList argList; + TQStringList argList; argList.append("/bin/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) continue; @@ -167,7 +167,7 @@ void UninstallWizard::nextPressed() } 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; } fileList->clear(); @@ -192,7 +192,7 @@ void UninstallWizard::processExited() case ListingPackages: 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(); return; } @@ -216,14 +216,14 @@ void UninstallWizard::readyReadStdout() { while (externalProcess->canReadLineStdout()) { - QString line = externalProcess->readLineStdout(); + TQString line = externalProcess->readLineStdout(); if (line.isEmpty()) continue; // See if it already exists 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) continue; @@ -237,7 +237,7 @@ void UninstallWizard::readyReadStdout() if (exists) continue; - QString niceName = line.left(line.findRev(':')); + TQString niceName = line.left(line.findRev(':')); niceName = niceName.left(1).upper() + niceName.right(niceName.length()-1); new AppListItem(niceName, line, appList); @@ -254,7 +254,7 @@ void UninstallWizard::readyReadStdout() { while (externalProcess->canReadLineStdout()) { - QString line = externalProcess->readLineStdout(); + TQString line = externalProcess->readLineStdout(); if (line.isEmpty()) continue; fileList->insertItem(icon, line.left(line.find(" "))); @@ -264,10 +264,10 @@ void UninstallWizard::readyReadStdout() case RemovingGlobal: while (externalProcess->canReadLineStdout()) { - QString line = externalProcess->readLineStdout(); + TQString line = externalProcess->readLineStdout(); if (line.isEmpty()) continue; - line.replace(QRegExp("\\033[^m]*m"), ""); + line.replace(TQRegExp("\\033[^m]*m"), ""); logDialog->logBox->append(line); } break; @@ -278,10 +278,10 @@ void UninstallWizard::readyReadStderr() { while (externalProcess->canReadLineStdout()) { - QString line = externalProcess->readLineStdout(); + TQString line = externalProcess->readLineStdout(); if (line.isEmpty()) continue; - line.replace(QRegExp("\\033[^m]*m"), ""); + line.replace(TQRegExp("\\033[^m]*m"), ""); logDialog->logBox->append(line); } } @@ -292,10 +292,10 @@ void UninstallWizard::removeUserPackages() previousButton->setEnabled(false); // Find out which packages belong to the user, and uninstall them - QStringList argList; + TQStringList argList; argList.append("/bin/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) continue; diff --git a/src/arkollon/uninstallwizard.h b/src/arkollon/uninstallwizard.h index 12180db..e70c0ee 100644 --- a/src/arkollon/uninstallwizard.h +++ b/src/arkollon/uninstallwizard.h @@ -25,20 +25,20 @@ #include "logdialog.h" #include "headerlistitem.h" -#include -#include -#include +#include +#include +#include -class AppListItem : public QCheckListItem +class AppListItem : public TQCheckListItem { public: - AppListItem(QString nN, QString n, QListView* lv); - int compare(QListViewItem* i, int col, bool ascending) const; + AppListItem(TQString nN, TQString n, TQListView* lv); + int compare(TQListViewItem* i, int col, bool ascending) const; int rtti() const { return 1003; } - QString niceName; - QString name; + TQString niceName; + TQString name; int section; }; @@ -49,7 +49,7 @@ class UninstallWizard : public WizardBase Q_OBJECT 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(); public slots: @@ -77,10 +77,10 @@ private: } currentStage; LogDialog* logDialog; - QProcess* externalProcess; + TQProcess* externalProcess; HeaderListItem* globalHeader; - QPixmap icon; + TQPixmap icon; }; #endif diff --git a/src/arkollon/wizard.cpp b/src/arkollon/wizard.cpp index ba267a6..a15491b 100644 --- a/src/arkollon/wizard.cpp +++ b/src/arkollon/wizard.cpp @@ -19,31 +19,31 @@ ***************************************************************************/ #include "wizard.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include "data.h" #include "rcparser.h" #include "headerlistitem.h" -ComponentListItem::ComponentListItem(struct Component c, QListView* parent) - : QCheckListItem(parent, "", QCheckListItem::CheckBox) +ComponentListItem::ComponentListItem(struct Component c, TQListView* parent) + : TQCheckListItem(parent, "", TQCheckListItem::CheckBox) { component = c; setText(0, c.niceName); @@ -59,7 +59,7 @@ ComponentListItem::ComponentListItem(struct Component c, QListView* parent) 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()) { @@ -70,7 +70,7 @@ int ComponentListItem::compare(QListViewItem* i, int col, bool ascending) const return -1; if (section > item->section) return 1; - return QListViewItem::compare(i, col, ascending); + return TQListViewItem::compare(i, col, ascending); } 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) { componentInfo->setMaximumSize(32767,70); componentList->header()->hide(); //progressLabel2->setMaximumSize(32767, progressLabel2->fontMetrics().height()*2); - externalProcess = new QProcess(this); + externalProcess = new TQProcess(this); connect(externalProcess, SIGNAL(processExited()), SLOT(processExited())); connect(externalProcess, SIGNAL(readyReadStdout()), SLOT(readyReadStdout())); connect(externalProcess, SIGNAL(readyReadStderr()), SLOT(readyReadStderr())); @@ -105,7 +105,7 @@ Wizard::Wizard(QWidget *parent, const char *name) createActionFormats(); - kdeDirProcess = new QProcess(this); + kdeDirProcess = new TQProcess(this); connect(kdeDirProcess, SIGNAL(readyReadStdout()), SLOT(kdeDirReady())); connect(kdeDirProcess, SIGNAL(processExited()), SLOT(getInstalledComponents())); kdeDirProcess->addArgument("kde-config"); @@ -140,7 +140,7 @@ void Wizard::kdeDirReady() { while (kdeDirProcess->canReadLineStdout()) { - QString line = kdeDirProcess->readLineStdout(); + TQString line = kdeDirProcess->readLineStdout(); if (!line.isEmpty()) kdeDir = line; } @@ -148,15 +148,15 @@ void Wizard::kdeDirReady() void Wizard::getInstalledComponents() { - QFile uninstallScript("/tmp/arkollon-uninstall.sh"); + TQFile uninstallScript("/tmp/arkollon-uninstall.sh"); if (uninstallScript.exists()) uninstallScript.remove(); uninstallScript.open(IO_WriteOnly); - QDataStream stream(&uninstallScript); + TQDataStream stream(&uninstallScript); stream.writeRawBytes((const char*)uninstaller_sh_data, uninstaller_sh_len); uninstallScript.close(); - installedComponentsProcess = new QProcess(this); + installedComponentsProcess = new TQProcess(this); connect(installedComponentsProcess, SIGNAL(readyReadStdout()), SLOT(installedComponentsReady())); connect(installedComponentsProcess, SIGNAL(processExited()), SLOT(setup())); installedComponentsProcess->addArgument("/bin/sh"); @@ -170,7 +170,7 @@ void Wizard::installedComponentsReady() { while (installedComponentsProcess->canReadLineStdout()) { - QString line = installedComponentsProcess->readLineStdout(); + TQString line = installedComponentsProcess->readLineStdout(); if (line.isEmpty()) continue; @@ -185,7 +185,7 @@ void Wizard::installedComponentsReady() void Wizard::setup() { - QFile uninstallScript("/tmp/arkollon-uninstall.sh"); + TQFile uninstallScript("/tmp/arkollon-uninstall.sh"); if (uninstallScript.exists()) uninstallScript.remove(); @@ -194,14 +194,14 @@ void Wizard::setup() // Firstly check if there's an arkollonrc file in the current directory // If there is, use it. - dir = QDir::currentDirPath(); - if (qApp->argc() > 1) + dir = TQDir::currentDirPath(); + if (tqApp->argc() > 1) { // The directory specified on the command line overrides the current dir. - QDir d(qApp->argv()[1]); + TQDir d(tqApp->argv()[1]); dir = d.absPath(); } - if (QFile::exists(dir + "/arkollonrc")) + if (TQFile::exists(dir + "/arkollonrc")) { setupFromRc(); } @@ -209,7 +209,7 @@ void Wizard::setup() { 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(); return; } @@ -223,37 +223,37 @@ void Wizard::setupFromRc() parser.addSearchDir(dir); 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(); return; } parser.setSection("Arkollon"); - QString appName = parser.readString("AppName"); + TQString appName = parser.readString("AppName"); 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(); return; } setAppName(appName); - QString icon32Path = parser.readString("Icon32"); - QString icon16Path = parser.readString("Icon16"); - if ((!icon32Path.isEmpty()) && (QFile::exists(dir + "/" + icon32Path))) + TQString icon32Path = parser.readString("Icon32"); + TQString icon16Path = parser.readString("Icon16"); + if ((!icon32Path.isEmpty()) && (TQFile::exists(dir + "/" + icon32Path))) { - QPixmap icon32(dir + "/" + icon32Path); + TQPixmap icon32(dir + "/" + icon32Path); 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); } buildOrder = parser.readList("BuildOrder"); - QStringList compNames = parser.readList("Components"); - QStringList::Iterator it = compNames.begin(); + TQStringList compNames = parser.readList("Components"); + TQStringList::Iterator it = compNames.begin(); while( it != compNames.end() ) { parser.setSection(*it); @@ -271,15 +271,15 @@ void Wizard::setupFromRc() c.alreadyInstalled = false; // Load the buildtimes data - if (QFile::exists(dir + "/" + c.subDir + "/buildtimes")) + if (TQFile::exists(dir + "/" + c.subDir + "/buildtimes")) { - QRegExp re("([^,]*,[^,]*),(\\d*)"); - QFile file(dir + "/" + c.subDir + "/buildtimes"); + TQRegExp re("([^,]*,[^,]*),(\\d*)"); + TQFile file(dir + "/" + c.subDir + "/buildtimes"); file.open(IO_ReadOnly); - QTextStream stream(&file); + TQTextStream stream(&file); for (;;) { - QString line = stream.readLine(); + TQString line = stream.readLine(); if (line.isNull()) break; if (re.search(line) == -1) @@ -305,13 +305,13 @@ void Wizard::setupFromRc() } // Check if it's already installed - QStringList::Iterator it2 = installedComponents.begin(); + TQStringList::Iterator it2 = installedComponents.begin(); while( it2 != installedComponents.end() ) { int dashPos = c.subDir.findRev('-'); if (dashPos < 0) 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()) { item->setOn(false); @@ -329,18 +329,18 @@ void Wizard::setupFromRc() bool Wizard::setupFromDir() { - if ((!QFile::exists(dir + "/configure")) && - (!QFile::exists(dir + "/autogen.sh")) && - (!QFile::exists(dir + "/auto-gen.sh"))) + if ((!TQFile::exists(dir + "/configure")) && + (!TQFile::exists(dir + "/autogen.sh")) && + (!TQFile::exists(dir + "/auto-gen.sh"))) { - QDir myDir(dir + "/" + selectedComponents[currentComponent].subDir); - if (myDir.entryList("*.pro", QDir::Files).count() <= 0) + TQDir myDir(dir + "/" + selectedComponents[currentComponent].subDir); + if (myDir.entryList("*.pro", TQDir::Files).count() <= 0) return false; } // Use the directory name as the appname - QDir myDir2(dir); - QString dirName = myDir2.dirName(); + TQDir myDir2(dir); + TQString dirName = myDir2.dirName(); setAppName(makeDirNice(dirName)); buildOrder.append(dirName); @@ -358,13 +358,13 @@ bool Wizard::setupFromDir() header->setText(0, "Required components"); header->section = 0; - QStringList::Iterator it2 = installedComponents.begin(); + TQStringList::Iterator it2 = installedComponents.begin(); while( it2 != installedComponents.end() ) { int dashPos = dirName.findRev('-'); if (dashPos < 0) 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()) item->component.alreadyInstalled = true; ++it2; @@ -379,13 +379,13 @@ Wizard::~Wizard() } -void Wizard::componentSelected(QListViewItem* item) +void Wizard::componentSelected(TQListViewItem* item) { if (item->rtti() != 1001) return; ComponentListItem* i = (ComponentListItem*) item; - QString text = "

    " + item->text(0) + ""; + TQString text = "

    " + item->text(0) + ""; if (i->component.alreadyInstalled) text += " (Already installed)"; text += "

    "; @@ -396,13 +396,13 @@ void Wizard::componentSelected(QListViewItem* item) } -QString Wizard::makeDirNice(QString name) +TQString Wizard::makeDirNice(TQString name) { int dashPos = name.findRev('-'); if (dashPos < 0) dashPos = name.length(); - QString ret = name.left(dashPos); + TQString ret = name.left(dashPos); ret = ret.left(1).upper() + ret.right(ret.length()-1); return ret; @@ -422,32 +422,32 @@ void Wizard::nextPressed() int currentId = installStack->id(installStack->visibleWidget()); if (currentId == 3) { - QDir d(kdeDir); + TQDir d(kdeDir); d.mkdir("share/apps/kdesktop/Desktop"); if (shortcutBox->isChecked()) { - QFile source(dir + "/" + desktop); - QString destDir = kdeDir + "/share/apps/kdesktop/Desktop"; + TQFile source(dir + "/" + desktop); + TQString destDir = kdeDir + "/share/apps/kdesktop/Desktop"; int slashPos = desktop.findRev('/'); if (slashPos < 0) slashPos = 0; - QFile dest(destDir + "/" + desktop.right(desktop.length() - slashPos)); + TQFile dest(destDir + "/" + desktop.right(desktop.length() - slashPos)); source.open(IO_ReadOnly); dest.open(IO_WriteOnly | IO_Truncate); - QDataStream destStream(&dest); - QByteArray data = source.readAll(); + TQDataStream destStream(&dest); + TQByteArray data = source.readAll(); destStream.writeRawBytes(data.data(), data.size()); source.close(); dest.close(); } if (uninstallBox->isChecked()) { - QFile source(dir + "/Uninstall KlamAV.desktop"); - QFile dest(kdeDir + "/share/apps/kdesktop/Desktop/Uinstall KlamAV.desktop"); + TQFile source(dir + "/Uninstall KlamAV.desktop"); + TQFile dest(kdeDir + "/share/apps/kdesktop/Desktop/Uinstall KlamAV.desktop"); source.open(IO_ReadOnly); dest.open(IO_WriteOnly | IO_Truncate); - QDataStream destStream(&dest); - QByteArray data = source.readAll(); + TQDataStream destStream(&dest); + TQByteArray data = source.readAll(); destStream.writeRawBytes(data.data(), data.size()); source.close(); dest.close(); @@ -465,7 +465,7 @@ void Wizard::nextPressed() { bool itemsSelected = false; - QListViewItemIterator it( componentList ); + TQListViewItemIterator it( componentList ); while ( it.current() ) { if (it.current()->rtti() != 1001) @@ -480,7 +480,7 @@ void Wizard::nextPressed() } 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; } } @@ -524,9 +524,9 @@ void Wizard::startProcess() totalBTime = 0; elapsedTime = 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() ) { if (it2.current()->rtti() != 1001) @@ -540,7 +540,7 @@ void Wizard::startProcess() if (item->isOn()) { selectedComponents.append(item->component); - QMap::iterator it3; + TQMap::iterator it3; for ( it3 = item->component.buildTimes.begin(); it3 != item->component.buildTimes.end(); ++it3 ) totalBTime += it3.data(); } @@ -554,7 +554,7 @@ void Wizard::startProcess() currentComponent = 0; currentStage = None; - currentIsQMake = false; + currentIsTQMake = false; nextStep(); } @@ -572,24 +572,24 @@ void Wizard::nextStep() setProgress2Text(""); //progressLabel2->setCursorPosition(0); currentStage = Autogen; - QDir myDir(dir + "/" + selectedComponents[currentComponent].subDir); - if (myDir.entryList("*.pro", QDir::Files).count() > 0) + TQDir myDir(dir + "/" + selectedComponents[currentComponent].subDir); + if (myDir.entryList("*.pro", TQDir::Files).count() > 0) { - currentIsQMake = true; + currentIsTQMake = true; nextStep(); return; } - if (QFile::exists(dir + "/" + selectedComponents[currentComponent].subDir + "/configure")) + if (TQFile::exists(dir + "/" + selectedComponents[currentComponent].subDir + "/configure")) { nextStep(); return; } - QString autogenName; - if (QFile::exists(dir + "/" + selectedComponents[currentComponent].subDir + "/autogen.sh")) + TQString autogenName; + if (TQFile::exists(dir + "/" + selectedComponents[currentComponent].subDir + "/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"; else { @@ -608,7 +608,7 @@ void Wizard::nextStep() { //progressBar->setProgress(progressBar->progress() + 1); currentStage = Configure; - if (currentIsQMake) + if (currentIsTQMake) { progressLabel1->setText("Running qmake for " + selectedComponents[currentComponent].niceName + ""); setProgress2Text(""); @@ -617,7 +617,7 @@ void Wizard::nextStep() externalProcess->setWorkingDirectory(dir + "/" + selectedComponents[currentComponent].subDir); 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(); return; } @@ -634,8 +634,8 @@ void Wizard::nextStep() //externalProcess->addArgument("--prefix=" + prefix); if (!selectedComponents[currentComponent].confOptions.isEmpty()) { - QStringList extraArgs = QStringList::split(" ", sub(selectedComponents[currentComponent].confOptions)); - for ( QStringList::Iterator it = extraArgs.begin(); it != extraArgs.end(); ++it ) + TQStringList extraArgs = TQStringList::split(" ", sub(selectedComponents[currentComponent].confOptions)); + for ( TQStringList::Iterator it = extraArgs.begin(); it != extraArgs.end(); ++it ) externalProcess->addArgument(*it); } externalProcess->setWorkingDirectory(dir + "/" + selectedComponents[currentComponent].subDir); @@ -685,25 +685,25 @@ void Wizard::nextStep() progressLabel1->setText("Writing uninstall information for " + selectedComponents[currentComponent].niceName + ""); setProgress2Text(""); - QFile postInstallScript("/tmp/arkollon-postinstall.sh"); + TQFile postInstallScript("/tmp/arkollon-postinstall.sh"); if (postInstallScript.exists()) postInstallScript.remove(); postInstallScript.open(IO_WriteOnly); - QDataStream stream(&postInstallScript); + TQDataStream stream(&postInstallScript); stream.writeRawBytes((const char*)postinstall_sh_data, postinstall_sh_len); postInstallScript.close(); - QFile fileList("/tmp/arkollon-filelist"); + TQFile fileList("/tmp/arkollon-filelist"); if (fileList.exists()) fileList.remove(); fileList.open(IO_WriteOnly); - QTextStream fileStream(&fileList); - QStringList doneFiles; - for ( QStringList::Iterator it = installedFiles.begin(); it != installedFiles.end(); ++it ) + TQTextStream fileStream(&fileList); + TQStringList doneFiles; + for ( TQStringList::Iterator it = installedFiles.begin(); it != installedFiles.end(); ++it ) { if (doneFiles.find(*it) != doneFiles.end()) continue; - QFileInfo fileInfo(*it); + TQFileInfo fileInfo(*it); if (fileInfo.isDir()) continue; fileStream << (*it) << '\n'; @@ -715,8 +715,8 @@ void Wizard::nextStep() int dashPos = c.subDir.findRev('-'); if (dashPos < 0) dashPos = c.subDir.length(); - QString appname = c.subDir.left(dashPos); - QString version = c.subDir.right(c.subDir.length() - dashPos - 1); + TQString appname = c.subDir.left(dashPos); + TQString version = c.subDir.right(c.subDir.length() - dashPos - 1); externalProcess->addArgument("/bin/sh"); externalProcess->addArgument("/tmp/arkollon-postinstall.sh"); @@ -733,7 +733,7 @@ void Wizard::nextStep() { currentStage = None; currentComponent++; - currentIsQMake = false; + currentIsTQMake = false; if (currentComponent >= selectedComponents.count()) { progressLabel1->setText("Installation completed!"); @@ -766,11 +766,11 @@ void Wizard::processExited() if (currentStage == WriteUninstallInfo) { // Remove temp files from the last stage - QFile postInstallScript("/tmp/arkollon-postinstall.sh"); + TQFile postInstallScript("/tmp/arkollon-postinstall.sh"); if (postInstallScript.exists()) postInstallScript.remove(); - QFile fileList("/tmp/arkollon-filelist"); + TQFile fileList("/tmp/arkollon-filelist"); if (fileList.exists()) fileList.remove(); } @@ -782,7 +782,7 @@ void Wizard::processExited() } if (externalProcess->exitStatus() != 0) { - logLine("Return value " + QString::number(externalProcess->exitStatus())); + logLine("Return value " + TQString::number(externalProcess->exitStatus())); errorOccured(); return; } @@ -795,7 +795,7 @@ void Wizard::readyReadStderr() { while (externalProcess->canReadLineStderr()) { - QString line = externalProcess->readLineStderr().latin1(); + TQString line = externalProcess->readLineStderr().latin1(); logDialog->logBox->append(" * "+line); } } @@ -804,7 +804,7 @@ void Wizard::readyReadStdout() { while (externalProcess->canReadLineStdout()) { - QString line = externalProcess->readLineStdout().latin1(); + TQString line = externalProcess->readLineStdout().latin1(); logDialog->logBox->append(line); if (currentStage == Configure) @@ -816,7 +816,7 @@ void Wizard::readyReadStdout() if (line.right(1) == "\\") continue; commandLine = commandLine.left(commandLine.find(';')); - for ( QValueList::Iterator it = actionFormats.begin(); it != actionFormats.end(); ++it ) + for ( TQValueList::Iterator it = actionFormats.begin(); it != actionFormats.end(); ++it ) { if ((*it).regExp.search(commandLine) == -1) continue; @@ -831,7 +831,7 @@ void Wizard::readyReadStdout() } } -void Wizard::updateTime(QString key) +void Wizard::updateTime(TQString key) { if (!timer.isNull()) { @@ -841,7 +841,7 @@ void Wizard::updateTime(QString key) int remainingTime = (int)((float)(totalBTime - elapsedBTime) * ratio) / 60000; if (remainingTime < 0) remainingTime = 0; - QString text = QString::number(remainingTime + 1) + " minutes"; + TQString text = TQString::number(remainingTime + 1) + " minutes"; if (remainingTime == 0) text = "1 minute"; timeRemaining->setText("Estimated time remaining: " + text + ""); @@ -850,11 +850,11 @@ void Wizard::updateTime(QString key) timer.start(); } -void Wizard::logLine(QString line) +void Wizard::logLine(TQString line) { - QString tmp = line; - QStringList lines = QStringList::split("\n", tmp); - for ( QStringList::Iterator it = lines.begin(); it != lines.end(); ++it ) + TQString tmp = line; + TQStringList lines = TQStringList::split("\n", tmp); + for ( TQStringList::Iterator it = lines.begin(); it != lines.end(); ++it ) { if ((*it).isEmpty()) 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(); - QFont boldFont = progressLabel2->font(); + TQFont boldFont = progressLabel2->font(); boldFont.setBold(true); - QFontMetrics boldFontMetrics(boldFont); + TQFontMetrics boldFontMetrics(boldFont); while (boldFontMetrics.width(croppedText) > progressLabel2->width()) { croppedText = croppedText.left(--i); @@ -887,24 +887,24 @@ void Wizard::errorOccured() previousButton->setEnabled(true); } -QString Wizard::sub(QString s) +TQString Wizard::sub(TQString s) { - QString tmp = s; - tmp.replace(QRegExp("\\$KDEDIR"), kdeDir); - tmp.replace(QRegExp("\\$HOMEDIR"), QDir::homeDirPath()); - tmp.replace(QRegExp("~"), QDir::homeDirPath()); - tmp.replace(QRegExp("\\$PREFIX"), "/usr/local"); + TQString tmp = s; + tmp.replace(TQRegExp("\\$KDEDIR"), kdeDir); + tmp.replace(TQRegExp("\\$HOMEDIR"), TQDir::homeDirPath()); + tmp.replace(TQRegExp("~"), TQDir::homeDirPath()); + tmp.replace(TQRegExp("\\$PREFIX"), "/usr/local"); return tmp; } void Wizard::runPressed() { - QProcess* proc = new QProcess(this); + TQProcess* proc = new TQProcess(this); proc->addArgument(exec); if (!proc->start()) { - QMessageBox::warning(this, "Warning", "The application could not be started
    "+exec, QMessageBox::Ok, QMessageBox::NoButton, QMessageBox::NoButton); + TQMessageBox::warning(this, "Warning", "The application could not be started
    "+exec, TQMessageBox::Ok, TQMessageBox::NoButton, TQMessageBox::NoButton); } } diff --git a/src/arkollon/wizard.h b/src/arkollon/wizard.h index 887f68d..6f2fdb7 100644 --- a/src/arkollon/wizard.h +++ b/src/arkollon/wizard.h @@ -21,37 +21,37 @@ #define WIZARD_H #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "logdialog.h" class HeaderListItem; struct Component { - QString name; - QString niceName; - QString subDir; - QString forceDir; + TQString name; + TQString niceName; + TQString subDir; + TQString forceDir; bool optional; bool kdeOnly; bool gnomeOnly; - QString description; - QString confOptions; + TQString description; + TQString confOptions; - QMap buildTimes; + TQMap buildTimes; bool alreadyInstalled; }; -class ComponentListItem : public QCheckListItem +class ComponentListItem : public TQCheckListItem { public: - ComponentListItem(struct Component c, QListView* parent); - int compare(QListViewItem* i, int col, bool ascending) const; + ComponentListItem(struct Component c, TQListView* parent); + int compare(TQListViewItem* i, int col, bool ascending) const; int rtti() const { return 1001; } struct Component component; @@ -62,12 +62,12 @@ class ActionFormat { public: 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() {} - QString action; - QString tool; - QRegExp regExp; + TQString action; + TQString tool; + TQRegExp regExp; }; @@ -79,7 +79,7 @@ class Wizard : public WizardBase Q_OBJECT public: - Wizard(QWidget *parent = 0, const char *name = 0); + Wizard(TQWidget *parent = 0, const char *name = 0); ~Wizard(); @@ -90,16 +90,16 @@ private: void nextStep(); void checkPassword(); - void updateTime(QString key); - QString lastTimeLine; + void updateTime(TQString key); + TQString lastTimeLine; - void logLine(QString line); + void logLine(TQString line); void errorOccured(); - QString makeDirNice(QString name); + TQString makeDirNice(TQString name); - QString sub(QString s); + TQString sub(TQString s); - QString rootPassword; + TQString rootPassword; private slots: void processExited(); @@ -114,8 +114,8 @@ private slots: void previousPressed(); void runPressed(); void logPressed(); - void componentSelected(QListViewItem* item); - void setProgress2Text(QString text); + void componentSelected(TQListViewItem* item); + void setProgress2Text(TQString text); void setup(); void setupFromRc(); @@ -132,34 +132,34 @@ private: WriteUninstallInfo }; - QString dir; - QStringList buildOrder; - QValueList selectedComponents; + TQString dir; + TQStringList buildOrder; + TQValueList selectedComponents; uint totalBTime; uint elapsedBTime; uint elapsedTime; - QTime timer; - QProcess* externalProcess; - QProcess* kdeDirProcess; - QProcess* installedComponentsProcess; - QString commandLine; - bool currentIsQMake; + TQTime timer; + TQProcess* externalProcess; + TQProcess* kdeDirProcess; + TQProcess* installedComponentsProcess; + TQString commandLine; + bool currentIsTQMake; int currentComponent; enum Stage currentStage; bool needRoot; - QString prefix; + TQString prefix; - QStringList installedComponents; - QString exec; - QString desktop; + TQStringList installedComponents; + TQString exec; + TQString desktop; - QString kdeDir; + TQString kdeDir; LogDialog* logDialog; - QMap headers; - QValueList actionFormats; - QStringList installedFiles; + TQMap headers; + TQValueList actionFormats; + TQStringList installedFiles; }; #endif diff --git a/src/arkollon/wizardbase.ui b/src/arkollon/wizardbase.ui index 6fc9d12..e359fb3 100644 --- a/src/arkollon/wizardbase.ui +++ b/src/arkollon/wizardbase.ui @@ -1,6 +1,6 @@ WizardBase - + WizardBase @@ -36,7 +36,7 @@ Fixed - + layout8 @@ -44,7 +44,7 @@ unnamed - + splash @@ -66,7 +66,7 @@ false - + layout7 @@ -74,7 +74,7 @@ unnamed - + titleLabel @@ -107,11 +107,11 @@ Horizontal - + mainStack - + WStackPage @@ -128,11 +128,11 @@ 0 - + installStack - + Introduction @@ -143,7 +143,7 @@ unnamed - + textLabel2 @@ -154,7 +154,7 @@ WordBreak|AlignVCenter - + layout12 @@ -179,7 +179,7 @@ - + appIcon @@ -187,7 +187,7 @@ false - + appNameLabel @@ -222,7 +222,7 @@ - + textLabel4 @@ -249,7 +249,7 @@ - + Components @@ -260,7 +260,7 @@ unnamed - + textLabel5 @@ -271,7 +271,7 @@ WordBreak|AlignVCenter - + Component name @@ -287,7 +287,7 @@ componentList - + componentInfo @@ -306,7 +306,7 @@ - + WStackPage @@ -317,7 +317,7 @@ unnamed - + pleaseWaitLabel @@ -345,7 +345,7 @@ - + progressLabel1 @@ -353,7 +353,7 @@ Progress Label 1 - + progressLabel2 @@ -375,7 +375,7 @@ WordBreak|AlignTop|AlignLeft - + progressBar @@ -383,7 +383,7 @@ 0 - + timeRemaining @@ -411,7 +411,7 @@ - + logFrame @@ -456,7 +456,7 @@ - + logButton @@ -468,7 +468,7 @@ - + WStackPage @@ -479,7 +479,7 @@ unnamed - + textLabel1 @@ -507,7 +507,7 @@ - + layout7 @@ -532,7 +532,7 @@ - + uninstallBox @@ -543,7 +543,7 @@ true - + shortcutBox @@ -578,7 +578,7 @@ - + WStackPage @@ -595,11 +595,11 @@ 0 - + uninstallStack - + WStackPage @@ -610,7 +610,7 @@ unnamed - + textLabel1_3 @@ -618,7 +618,7 @@ Please select from the list below the applications you wish to uninstall. - + Application Name @@ -636,7 +636,7 @@ - + WStackPage @@ -647,7 +647,7 @@ unnamed - + textLabel2_3 @@ -659,14 +659,14 @@ Please check this list, and click <b>next</b> to continue. RichText - + fileList - + WStackPage @@ -694,7 +694,7 @@ Please check this list, and click <b>next</b> to continue. - + pleaseWaitLabel2 @@ -719,7 +719,7 @@ Please check this list, and click <b>next</b> to continue. - + logFrame_2 @@ -764,7 +764,7 @@ Please check this list, and click <b>next</b> to continue. - + logButton2 @@ -798,7 +798,7 @@ Please check this list, and click <b>next</b> to continue. Horizontal - + layout2 @@ -823,7 +823,7 @@ Please check this list, and click <b>next</b> to continue. - + previousButton @@ -834,7 +834,7 @@ Please check this list, and click <b>next</b> to continue. < Previous - + nextButton @@ -845,7 +845,7 @@ Please check this list, and click <b>next</b> to continue. true - + cancelButton @@ -872,9 +872,9 @@ Please check this list, and click <b>next</b> to continue. componentList - selectionChanged(QListViewItem*) + selectionChanged(TQListViewItem*) WizardBase - componentSelected(QListViewItem*) + componentSelected(TQListViewItem*) logButton @@ -905,17 +905,17 @@ Please check this list, and click <b>next</b> to continue. wizardbase.ui.h - qwidgetstack.h + ntqwidgetstack.h - setAppName( QString n ) + setAppName( TQString n ) nextPressed() previousPressed() cancelPressed() browsePressed() runPressed() logPressed() - componentSelected( QListViewItem * item ) + componentSelected( TQListViewItem * item ) diff --git a/src/arkollon/wizardbase.ui.h b/src/arkollon/wizardbase.ui.h index 8eb2420..ccc1764 100644 --- a/src/arkollon/wizardbase.ui.h +++ b/src/arkollon/wizardbase.ui.h @@ -1,8 +1,8 @@ #include "data.h" -void WizardBase::setAppName( QString n ) +void WizardBase::setAppName( TQString n ) { - QPixmap tmp; + TQPixmap tmp; tmp.convertFromImage(qembed_findImage("packageIcon")); appIcon->setPixmap(tmp); tmp.convertFromImage(qembed_findImage("splash")); @@ -52,7 +52,7 @@ void WizardBase::logPressed() -void WizardBase::componentSelected( QListViewItem * item ) +void WizardBase::componentSelected( TQListViewItem * item ) { } diff --git a/src/autoscanoptions.ui b/src/autoscanoptions.ui index 1a31b78..62b88c0 100644 --- a/src/autoscanoptions.ui +++ b/src/autoscanoptions.ui @@ -1,6 +1,6 @@ AutoScanOptions - + AutoScanOptions @@ -40,7 +40,7 @@ - + LimitsGroup @@ -105,7 +105,7 @@ - + layout4 @@ -121,7 +121,7 @@ unnamed - + kcfg_Executed @@ -132,7 +132,7 @@ Alt+E - + kcfg_Created @@ -146,7 +146,7 @@ Alt+Y - + kcfg_Opened @@ -157,7 +157,7 @@ Alt+F - + kcfg_Closed diff --git a/src/clicklineedit.cpp b/src/clicklineedit.cpp index a4ceb21..e3cb6db 100644 --- a/src/clicklineedit.cpp +++ b/src/clicklineedit.cpp @@ -24,9 +24,9 @@ #include "klamscan.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 ) { /* mDrawClickMsg = true; @@ -38,17 +38,17 @@ ClickComboBox::ClickComboBox( bool rw,QWidget *parent, const char* name ) : // PUBLIC ///////////////////////////////////////////////////////////////////////////////////// -// void ClickComboBox::setClickMessage( const QString &msg ) +// void ClickComboBox::setClickMessage( const TQString &msg ) // { // mClickMessage = msg; // repaint(); // } -void ClickComboBox::mousePressEvent( QMouseEvent * e ) +void ClickComboBox::mousePressEvent( TQMouseEvent * e ) { - QComboBox::mousePressEvent( e ); + TQComboBox::mousePressEvent( e ); repaint(); } @@ -58,42 +58,42 @@ void ClickComboBox::mousePressEvent( QMouseEvent * e ) // PROTECTED ///////////////////////////////////////////////////////////////////////////////////// -void ClickComboBox::paintEvent( QPaintEvent * ev) +void ClickComboBox::paintEvent( TQPaintEvent * ev) { KComboBox::paintEvent(ev); if (kmain->klamscan->isMultiScan()){ //kdDebug() << "drawing text" << endl; - QPainter p (this->lineEdit()); - p.setPen( palette().color( QPalette::Disabled, QColorGroup::Text ) ); - QRect cr = this->lineEdit()->contentsRect(); + TQPainter p (this->lineEdit()); + p.setPen( palette().color( TQPalette::Disabled, TQColorGroup::Text ) ); + TQRect cr = this->lineEdit()->contentsRect(); // Add two pixel margin on the left side //cr.setRight( cr.right() + 800 ); cr.setWidth(800); //kdDebug() << cr << endl; 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 ) { mDrawClickMsg = false; repaint(); }*/ - QComboBox::focusInEvent( ev ); + TQComboBox::focusInEvent( ev ); } -void ClickComboBox::focusOutEvent( QFocusEvent *ev ) +void ClickComboBox::focusOutEvent( TQFocusEvent *ev ) { /* if ( currentText().isEmpty() ) { mDrawClickMsg = true; repaint(); }*/ - QComboBox::focusOutEvent( ev ); + TQComboBox::focusOutEvent( ev ); } diff --git a/src/clicklineedit.h b/src/clicklineedit.h index 1202aba..171aa28 100644 --- a/src/clicklineedit.h +++ b/src/clicklineedit.h @@ -33,23 +33,23 @@ class ClickComboBox : public KComboBox { public: - ClickComboBox( bool rw, QWidget *parent, const char* name = 0 ); + ClickComboBox( bool rw, TQWidget *parent, const char* name = 0 ); -/* void setClickMessage( const QString &msg );*/ -// QString clickMessage() const { return mClickMessage; } +/* void setClickMessage( const TQString &msg );*/ +// TQString clickMessage() const { return mClickMessage; } signals: - virtual void mousePressEvent( QMouseEvent * e ); + virtual void mousePressEvent( TQMouseEvent * e ); protected: - virtual void paintEvent( QPaintEvent * ); - virtual void focusInEvent( QFocusEvent *ev ); - virtual void focusOutEvent( QFocusEvent *ev ); + virtual void paintEvent( TQPaintEvent * ); + virtual void focusInEvent( TQFocusEvent *ev ); + virtual void focusOutEvent( TQFocusEvent *ev ); private: - QString mClickMessage; + TQString mClickMessage; bool mDrawClickMsg; - QString text; + TQString text; }; diff --git a/src/collectiondb.cpp b/src/collectiondb.cpp index ebb9742..a729282 100644 --- a/src/collectiondb.cpp +++ b/src/collectiondb.cpp @@ -15,8 +15,8 @@ #include "sqlite/sqlite3.h" -#include -#include +#include +#include #include #include @@ -89,10 +89,10 @@ CollectionDB::returnStaticDbConnection( DbConnection *conn ) /** * Executes a SQL query on the already opened database * @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 -CollectionDB::query( const QString& statement, DbConnection *conn ) +TQStringList +CollectionDB::query( const TQString& statement, DbConnection *conn ) { clock_t start; if ( DEBUGSQL ) @@ -113,7 +113,7 @@ CollectionDB::query( const QString& statement, DbConnection *conn ) //kdDebug() << statement << endl; - QStringList values = dbConn->query( statement ); + TQStringList values = dbConn->query( statement ); //kdDebug() << values << endl; @@ -138,7 +138,7 @@ CollectionDB::query( const QString& statement, DbConnection *conn ) * @return The rowid of the inserted item. */ int -CollectionDB::insert( const QString& statement, const QString& table, DbConnection *conn ) +CollectionDB::insert( const TQString& statement, const TQString& table, DbConnection *conn ) { clock_t start; if ( DEBUGSQL ) @@ -181,7 +181,7 @@ CollectionDB::insert( const QString& statement, const QString& table, DbConnecti bool CollectionDB::isEmpty() { - QStringList values; + TQStringList values; values = query( "SELECT COUNT( type ) FROM klamav_activity LIMIT 0, 1;" ); @@ -190,12 +190,12 @@ CollectionDB::isEmpty() bool -CollectionDB::isValid(const QString &column, const QString &table) +CollectionDB::isValid(const TQString &column, const TQString &table) { - QStringList values1; - QStringList values2; + TQStringList values1; + 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 (&&)??? return !values1.isEmpty(); @@ -211,7 +211,7 @@ CollectionDB::createTables( DbConnection */*conn*/ ) //createMetaDBTable(); //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 );*/ } @@ -236,18 +236,18 @@ void 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;*/ - QFile file( location ); + TQFile file( location ); if ( file.open( IO_ReadOnly ) ) { - QTextStream stream( &file ); - QString line; + TQTextStream stream( &file ); + TQString line; while ( !stream.atEnd() ) { 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) insertMetaDBEntry(columns[0],columns[1],columns[2],columns[3],columns[4],columns[5]); } @@ -259,8 +259,8 @@ void CollectionDB::dropTables( DbConnection *conn ) { - query( QString( "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_activity%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 ) { - QString clearCommand = "DELETE FROM"; + TQString clearCommand = "DELETE FROM"; - query( QString( "%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_activity%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 -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 ) name.append( "_temp" ); else conn = NULL; - QStringList values = - query( QString( + TQStringList values = + query( TQString( "SELECT id, name FROM %1 WHERE name LIKE '%2';" ) .arg( name ) .arg( CollectionDB::instance()->escapeString( value ) ), conn ); 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( values.first() ) .arg( CollectionDB::instance()->escapeString( value ) ) @@ -313,7 +313,7 @@ CollectionDB::IDFromValue( QString name, QString value, bool autocreate, const b uint id; 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( CollectionDB::instance()->escapeString( value ) ), name, conn ); @@ -324,11 +324,11 @@ CollectionDB::IDFromValue( QString name, QString value, bool autocreate, const b } -QString -CollectionDB::valueFromID( QString table, uint id ) +TQString +CollectionDB::valueFromID( TQString table, uint id ) { - QStringList values = - query( QString( + TQStringList values = + query( TQString( "SELECT name FROM %1 WHERE id=%2;" ) .arg( table ) .arg( id ) ); @@ -338,23 +338,23 @@ CollectionDB::valueFromID( QString table, uint id ) } -QString -CollectionDB::typeCount( const QString &type_id ) +TQString +CollectionDB::typeCount( const TQString &type_id ) { - QStringList values = - query( QString( + TQStringList values = + query( TQString( "SELECT COUNT( type ) FROM klamav_activity WHERE type = %1;" ) .arg( type_id ) ); return values.first(); } -QStringList -CollectionDB::messagesForType( const QString &type_id, const bool isValue ) +TQStringList +CollectionDB::messagesForType( const TQString &type_id, const bool isValue ) { if ( isValue) { - return query( QString( "SELECT * FROM klamav_activity " + return query( TQString( "SELECT * FROM klamav_activity " "WHERE (type = \"%1\" ) ;" ) .arg( type_id ) ); } @@ -438,16 +438,16 @@ SqliteConnection::SqliteConnection( SqliteConfig* config ) : DbConnection( config ) { - QString homepath = getenv("HOME"); - const QCString path = (homepath+"/.klamav/activity.db").local8Bit(); + TQString homepath = getenv("HOME"); + const TQCString path = (homepath+"/.klamav/activity.db").local8Bit(); // Open database file and check for correctness m_initialized = false; - QFile file( path ); + TQFile file( path ); if ( file.open( IO_ReadOnly ) ) { - QString format; + TQString format; file.readLine( format, 50 ); if ( !format.startsWith( "SQLite format 3" ) ) { @@ -465,7 +465,7 @@ SqliteConnection::SqliteConnection( SqliteConfig* config ) if ( !m_initialized ) { // Remove old db file; create new - QFile::remove( path ); + TQFile::remove( path ); if ( sqlite3_open( path, &m_db ) == SQLITE_OK ) { 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; const char* tail; sqlite3_stmt* stmt; @@ -505,7 +505,7 @@ QStringList SqliteConnection::query( const QString& statement ) kdDebug() << k_funcinfo << " sqlite3_compile error:" << endl; kdDebug() << sqlite3_errmsg( m_db ) << endl; kdDebug() << "on query: " << statement << endl; - values = QStringList(); + values = TQStringList(); } else { @@ -533,7 +533,7 @@ QStringList SqliteConnection::query( const QString& statement ) //iterate over columns 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 @@ -544,7 +544,7 @@ QStringList SqliteConnection::query( const QString& statement ) kdDebug() << k_funcinfo << "sqlite_step error.\n"; kdDebug() << sqlite3_errmsg( m_db ) << 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; const char* tail; @@ -629,7 +629,7 @@ void SqliteConnection::sqlite_power(sqlite3_context *context, int argc, sqlite3_ // CLASS SqliteConfig ////////////////////////////////////////////////////////////////////////////////////////// -SqliteConfig::SqliteConfig( const QString& dbfile ) +SqliteConfig::SqliteConfig( const TQString& dbfile ) : m_dbfile( dbfile ) { } @@ -709,37 +709,37 @@ void DbConnectionPool::putDbConnection( const DbConnection *conn ) void -CollectionDB::expireActivity(const QString &days ) +CollectionDB::expireActivity(const TQString &days ) { int intdays = days.toInt(); if (intdays > 0) 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( ) { - return query( QString( "SELECT * FROM klamav_activity" ) ); + return query( TQString( "SELECT * FROM klamav_activity" ) ); } -QStringList -CollectionDB::allActivityOfType(const QString &type,const QString &days ) +TQStringList +CollectionDB::allActivityOfType(const TQString &type,const TQString &days ) { int intdays = days.toInt(); intdays--; 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) ); } -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")) || @@ -752,8 +752,8 @@ void CollectionDB::insertEvent(const QString &type, const QString &event, const ((!(KlamavConfig::startedStoppedCancelled())) && (type == "Auto-Scan"))) return; - QString date = query( QString( "select datetime('now','localtime')" ) ).first(); - insert( QString( "INSERT INTO klamav_activity ( type, date, event, file )" + TQString date = query( TQString( "select datetime('now','localtime')" ) ).first(); + insert( TQString( "INSERT INTO klamav_activity ( type, date, event, file )" " VALUES ( '%1', '%2', '%3', '%4' );" ) .arg( type ) .arg( date ) @@ -764,10 +764,10 @@ void CollectionDB::insertEvent(const QString &type, const QString &event, const 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\");" ) .arg( date ) .arg( submission.toInt() ) @@ -779,10 +779,10 @@ void CollectionDB::insertMetaDBEntry(const QString &date, const QString &submis } -QString +TQString 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(); } diff --git a/src/collectiondb.h b/src/collectiondb.h index 8ff12b7..92ea88a 100644 --- a/src/collectiondb.h +++ b/src/collectiondb.h @@ -8,12 +8,12 @@ #define KLAMAV_COLLECTIONDB_H #include -#include //stack allocated -#include -#include //baseclass -#include //baseclass -#include //stack allocated -#include //stack allocated +#include //stack allocated +#include +#include //baseclass +#include //baseclass +#include //stack allocated +#include //stack allocated class DbConnection; class DbConnectionPool; @@ -26,12 +26,12 @@ class DbConfig class SqliteConfig : public DbConfig { public: - SqliteConfig( const QString& /* dbfile */ ); + SqliteConfig( const TQString& /* dbfile */ ); - const QString dbFile() const { return m_dbfile; } + const TQString dbFile() const { return m_dbfile; } private: - QString m_dbfile; + TQString m_dbfile; }; @@ -44,11 +44,11 @@ class DbConnection DbConnection( DbConfig* /* config */ ); virtual ~DbConnection() = 0; - virtual QStringList query( const QString& /* statement */ ) = 0; - virtual int insert( const QString& /* statement */, const QString& /* table */ ) = 0; + virtual TQStringList query( const TQString& /* statement */ ) = 0; + virtual int insert( const TQString& /* statement */, const TQString& /* table */ ) = 0; const bool isInitialized() const { return m_initialized; } virtual bool isConnected() const = 0; - virtual const QString lastError() const { return "None"; } + virtual const TQString lastError() const { return "None"; } protected: bool m_initialized; DbConfig *m_config; @@ -65,8 +65,8 @@ class SqliteConnection : public DbConnection SqliteConnection( SqliteConfig* /* config */ ); ~SqliteConnection(); - QStringList query( const QString& /* statement */ ); - int insert( const QString& /* statement */, const QString& /* table */ ); + TQStringList query( const TQString& /* statement */ ); + int insert( const TQString& /* statement */, const TQString& /* table */ ); bool isConnected()const { return true; } private: static void sqlite_rand(sqlite3_context *context, int /*argc*/, sqlite3_value ** /*argv*/); @@ -78,7 +78,7 @@ class SqliteConnection : public DbConnection -class DbConnectionPool : QPtrQueue +class DbConnectionPool : TQPtrQueue { public: DbConnectionPool( bool temporary ); @@ -91,7 +91,7 @@ class DbConnectionPool : QPtrQueue DbConnection *getDbConnection(); void putDbConnection( const DbConnection* /* conn */ ); - QString escapeString( QString string ) + TQString escapeString( TQString string ) { return string.replace( '\'', "''" ); @@ -101,13 +101,13 @@ class DbConnectionPool : QPtrQueue static const int POOL_SIZE = 5; bool m_isTemporary; - QSemaphore m_semaphore; + TQSemaphore m_semaphore; DbConnection::DbConnectionType m_dbConnType; DbConfig *m_dbConfig; }; -class CollectionDB : public QObject +class CollectionDB : public TQObject { Q_OBJECT @@ -120,14 +120,14 @@ class CollectionDB : public QObject static CollectionDB *instance(); - const QString escapeString( const QString &string ) { return m_dbConnPool->escapeString(string); } - const QString 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 QString 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 escapeString( const TQString &string ) { return m_dbConnPool->escapeString(string); } + const TQString boolT() { if (m_dbConnPool->getDbConnectionType() == DbConnection::postgresql) return "'t'"; else return "1"; } + const TQString boolF() { if (m_dbConnPool->getDbConnectionType() == DbConnection::postgresql) return "'f'"; else return "0"; } + const TQString textColumnType() { if ( m_dbConnPool->getDbConnectionType() == DbConnection::postgresql ) return "TEXT"; else return "VARCHAR(255)"; } + 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..??? - const QString 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 longTextColumnType() { if ( m_dbConnPool->getDbConnectionType() == DbConnection::postgresql ) return "TEXT"; else return "TEXT"; } + const TQString randomFunc() { if ( m_dbConnPool->getDbConnectionType() == DbConnection::postgresql ) return "random()"; else return "RAND()"; } int getType() { return m_dbConnPool->getDbConnectionType(); } @@ -149,12 +149,12 @@ class CollectionDB : public QObject void returnStaticDbConnection( DbConnection *conn ); //sql helper methods - QStringList query( const QString& statement, DbConnection *conn = NULL ); - int insert( const QString& statement, const QString& table, DbConnection *conn = NULL ); + TQStringList query( const TQString& statement, DbConnection *conn = NULL ); + int insert( const TQString& statement, const TQString& table, DbConnection *conn = NULL ); //table management methods bool isEmpty(); - bool isValid(const QString &column, const QString &table); + bool isValid(const TQString &column, const TQString &table); void createTables( DbConnection *conn = NULL ); void createActivityTable( DbConnection *conn = NULL ); void createMetaDBTable( DbConnection *conn = NULL ); @@ -164,17 +164,17 @@ class CollectionDB : public QObject void moveTempTables( DbConnection *conn ); - QString typeCount( const QString &type_id ); - QStringList messagesForType( const QString &type_id, const bool isValue ); - QStringList allActivity( ); - QStringList allActivityOfType(const QString &type, const QString &days ); - void insertEvent(const QString &type, const QString &event,const QString &file = NULL, DbConnection *conn = NULL ); - void expireActivity(const QString &days ); - void insertMetaDBEntry(const QString &date, const QString &submission, const QString &creator,const QString &virus,const QString &alias, const QString &sender,DbConnection *conn = NULL); - QString latestMetaDBDate( ); + TQString typeCount( const TQString &type_id ); + TQStringList messagesForType( const TQString &type_id, const bool isValue ); + TQStringList allActivity( ); + TQStringList allActivityOfType(const TQString &type, const TQString &days ); + void insertEvent(const TQString &type, const TQString &event,const TQString &file = NULL, DbConnection *conn = NULL ); + void expireActivity(const TQString &days ); + void insertMetaDBEntry(const TQString &date, const TQString &submission, const TQString &creator,const TQString &virus,const TQString &alias, const TQString &sender,DbConnection *conn = NULL); + TQString latestMetaDBDate( ); 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 */ public slots: @@ -194,10 +194,10 @@ class CollectionDB : public QObject //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 ); - QString valueFromID( QString table, uint id ); + TQString valueFromID( TQString table, uint id ); //member variables diff --git a/src/configdialog.cpp b/src/configdialog.cpp index 29d513e..6c02371 100644 --- a/src/configdialog.cpp +++ b/src/configdialog.cpp @@ -20,19 +20,19 @@ email : markey@web.de #include "autoscanoptions.h" #include "logoptions.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include #include //kapp #include @@ -45,7 +45,7 @@ email : markey@web.de // PUBLIC ////////////////////////////////////////////////////////////////////////////////////////// -KlamavConfigDialog::KlamavConfigDialog( QWidget *parent, const char* name, KConfigSkeleton *config ) +KlamavConfigDialog::KlamavConfigDialog( TQWidget *parent, const char* name, KConfigSkeleton *config ) : KConfigDialog( parent, name, config ) { 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_logoptions, i18n( "Event Logging" ), "kate", i18n( "Configure Events to Log" ) ); - QObjectList *list = queryList( "QLabel", "infoPixmap" ); - for( QObject *label = list->first(); label; label = list->next() ) - static_cast(label)->setPixmap( QMessageBox::standardIcon( QMessageBox::Information ) ); + TQObjectList *list = queryList( "TQLabel", "infoPixmap" ); + for( TQObject *label = list->first(); label; label = list->next() ) + static_cast(label)->setPixmap( TQMessageBox::standardIcon( TQMessageBox::Information ) ); delete list; //stop KFont Requesters getting stupidly large - list = queryList( "QLabel", "m_sampleLabel" ); - for( QObject *label = list->first(); label; label = list->next() ) - static_cast(label)->setMaximumWidth( 250 ); + list = queryList( "TQLabel", "m_sampleLabel" ); + for( TQObject *label = list->first(); label; label = list->next() ) + static_cast(label)->setMaximumWidth( 250 ); delete list; @@ -85,7 +85,7 @@ KlamavConfigDialog::~KlamavConfigDialog() /** 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++ ) { if ( m_pageList[index]->name() == page ) { @@ -96,7 +96,7 @@ void KlamavConfigDialog::showPage( const QCString& page ) } /** 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 m_pageList << page; diff --git a/src/configdialog.h b/src/configdialog.h index bc47898..dfaf901 100644 --- a/src/configdialog.h +++ b/src/configdialog.h @@ -17,14 +17,14 @@ email : markey@web.de #define KLAMAVCONFIGDIALOG_H -#include -#include +#include +#include #include -class QComboBox; -class QGroupBox; -class QVBox; +class TQComboBox; +class TQGroupBox; +class TQVBox; class KlamavConfigDialog : public KConfigDialog @@ -32,13 +32,13 @@ class KlamavConfigDialog : public KConfigDialog Q_OBJECT public: - KlamavConfigDialog( QWidget *parent, const char* name, KConfigSkeleton *config ); + KlamavConfigDialog( TQWidget *parent, const char* name, KConfigSkeleton *config ); ~KlamavConfigDialog(); - void addPage( QWidget *page, const QString &itemName, const QString &pixmapName, - const QString &header=QString::null, bool manage=true); + void addPage( TQWidget *page, const TQString &itemName, const TQString &pixmapName, + const TQString &header=TQString::null, bool manage=true); - void showPage( const QCString& page ); + void showPage( const TQCString& page ); private: @@ -50,9 +50,9 @@ class KlamavConfigDialog : public KConfigDialog class AutoScanOptions *m_autoscanoptions; class LogOptions *m_logoptions; - QValueList m_pageList; - QMap m_pluginName; - QMap m_pluginKlamavName; + TQValueList m_pageList; + TQMap m_pluginName; + TQMap m_pluginKlamavName; }; diff --git a/src/ctcron.cpp b/src/ctcron.cpp index 68a6483..d5bfd07 100644 --- a/src/ctcron.cpp +++ b/src/ctcron.cpp @@ -9,7 +9,7 @@ * (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 #include "ctcron.h" @@ -19,7 +19,7 @@ #include // pwd, getpwnam(), getpwuid() #include -#include +#include #include #include @@ -37,7 +37,7 @@ CTCron::CTCron(bool _syscron, string ) : tmp.close(); tmpFileName = tmp.name(); - QString readCommand; + TQString readCommand; /* if (uid == 0) // root, so provide requested crontab @@ -51,8 +51,8 @@ CTCron::CTCron(bool _syscron, string ) : } else { - readCommand = QString("crontab -u ") + _login.c_str() + " -l > " + KProcess::quote(tmpFileName); - writeCommand = QString("crontab -u ") + _login.c_str() + " " + KProcess::quote(tmpFileName); + readCommand = TQString("crontab -u ") + _login.c_str() + " -l > " + KProcess::quote(tmpFileName); + writeCommand = TQString("crontab -u ") + _login.c_str() + " " + KProcess::quote(tmpFileName); if (!initFromPasswd(getpwnam(_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 // 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; } @@ -101,8 +101,8 @@ CTCron::CTCron(const struct passwd *pwd) : tmp.close(); tmpFileName = tmp.name(); - QString readCommand = QString("crontab -u ") + QString(pwd->pw_name) + " -l > " + KProcess::quote(tmpFileName); - writeCommand = QString("crontab -u ") + QString(pwd->pw_name) + " " + KProcess::quote(tmpFileName); + TQString readCommand = TQString("crontab -u ") + TQString(pwd->pw_name) + " -l > " + KProcess::quote(tmpFileName); + writeCommand = TQString("crontab -u ") + TQString(pwd->pw_name) + " " + KProcess::quote(tmpFileName); 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 // 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; } @@ -264,17 +264,17 @@ CTCron::~CTCron() void CTCron::apply() { // write to temp file - ofstream cronfile(QFile::encodeName(tmpFileName)); + ofstream cronfile(TQFile::encodeName(tmpFileName)); cronfile << *this << flush; // 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."); } // remove the temp file - (void) unlink(QFile::encodeName(tmpFileName)); + (void) unlink(TQFile::encodeName(tmpFileName)); if (isError()) return; diff --git a/src/ctcron.h b/src/ctcron.h index b8d03fe..4843dfc 100644 --- a/src/ctcron.h +++ b/src/ctcron.h @@ -12,14 +12,14 @@ #ifndef 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 #include #include #include -#include // Anarchy! -WABA +#include // Anarchy! -WABA class CTException; class CTTask; @@ -94,7 +94,7 @@ public: /** * 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 initialVariableCount; - QString writeCommand; - QString tmpFileName; + TQString writeCommand; + TQString tmpFileName; - QString error; + TQString error; protected: // Initialize member variables from the struct passwd. diff --git a/src/ctdom.cpp b/src/ctdom.cpp index b4c1f74..223523a 100644 --- a/src/ctdom.cpp +++ b/src/ctdom.cpp @@ -9,7 +9,7 @@ * (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 #include "ctdom.h" diff --git a/src/ctdom.h b/src/ctdom.h index 4e66747..daadd1f 100644 --- a/src/ctdom.h +++ b/src/ctdom.h @@ -12,7 +12,7 @@ #ifndef 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 #include "ctunit.h" diff --git a/src/ctdow.cpp b/src/ctdow.cpp index 8ce2f06..b4e5ae7 100644 --- a/src/ctdow.cpp +++ b/src/ctdow.cpp @@ -9,7 +9,7 @@ * (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 #include "ctdow.h" diff --git a/src/ctdow.h b/src/ctdow.h index 05b6357..8616185 100644 --- a/src/ctdow.h +++ b/src/ctdow.h @@ -12,7 +12,7 @@ #ifndef 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 #include "ctunit.h" diff --git a/src/cthost.cpp b/src/cthost.cpp index 9cc1e7d..77d72c3 100644 --- a/src/cthost.cpp +++ b/src/cthost.cpp @@ -10,7 +10,7 @@ * (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 #include "cthost.h" diff --git a/src/cthost.h b/src/cthost.h index 6d601c3..f76f0b1 100644 --- a/src/cthost.h +++ b/src/cthost.h @@ -12,13 +12,13 @@ #ifndef 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 #include #include -#include // Whatever +#include // Whatever class CTCron; struct passwd; @@ -78,7 +78,7 @@ public: /** * 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(const struct passwd *); - QString error; + TQString error; }; typedef std::vector::iterator CTCronIterator; diff --git a/src/cthour.h b/src/cthour.h index 702c410..f11d0f8 100644 --- a/src/cthour.h +++ b/src/cthour.h @@ -12,7 +12,7 @@ #ifndef 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 #include "ctunit.h" diff --git a/src/cti18n.h b/src/cti18n.h index e3a1757..a5b96ec 100644 --- a/src/cti18n.h +++ b/src/cti18n.h @@ -12,13 +12,13 @@ #ifndef 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 // // Note: I do make an exception to the above rule for this file, as it is // 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 #include diff --git a/src/ctminute.h b/src/ctminute.h index 6d93e08..1f1c7ad 100644 --- a/src/ctminute.h +++ b/src/ctminute.h @@ -12,7 +12,7 @@ #ifndef 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 #include "ctunit.h" diff --git a/src/ctmonth.cpp b/src/ctmonth.cpp index a83ed85..a250718 100644 --- a/src/ctmonth.cpp +++ b/src/ctmonth.cpp @@ -9,7 +9,7 @@ * (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 #include "ctmonth.h" diff --git a/src/ctmonth.h b/src/ctmonth.h index f7aa8af..048dd78 100644 --- a/src/ctmonth.h +++ b/src/ctmonth.h @@ -12,7 +12,7 @@ #ifndef 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 #include "ctunit.h" diff --git a/src/cttask.cpp b/src/cttask.cpp index 058fee3..bd57968 100644 --- a/src/cttask.cpp +++ b/src/cttask.cpp @@ -9,7 +9,7 @@ * (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 #include "cttask.h" diff --git a/src/cttask.h b/src/cttask.h index 3665c61..67672c8 100644 --- a/src/cttask.h +++ b/src/cttask.h @@ -12,7 +12,7 @@ #ifndef 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 #include diff --git a/src/ctunit.cpp b/src/ctunit.cpp index e76b00d..8284b33 100644 --- a/src/ctunit.cpp +++ b/src/ctunit.cpp @@ -9,7 +9,7 @@ * (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 #include "cti18n.h" diff --git a/src/ctunit.h b/src/ctunit.h index df4759c..df49472 100644 --- a/src/ctunit.h +++ b/src/ctunit.h @@ -12,7 +12,7 @@ #ifndef 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 #include diff --git a/src/ctvariable.cpp b/src/ctvariable.cpp index f736c76..6777341 100644 --- a/src/ctvariable.cpp +++ b/src/ctvariable.cpp @@ -9,7 +9,7 @@ * (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 #include "ctvariable.h" diff --git a/src/ctvariable.h b/src/ctvariable.h index 3f20600..11d8af1 100644 --- a/src/ctvariable.h +++ b/src/ctvariable.h @@ -12,7 +12,7 @@ #ifndef 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 #include diff --git a/src/datepicker.cpp b/src/datepicker.cpp index 360c713..7a7b589 100644 --- a/src/datepicker.cpp +++ b/src/datepicker.cpp @@ -29,51 +29,51 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include -DatePicker::DatePicker(QWidget *parent, const QDate& date) - : QVBox( parent, 0,(WType_TopLevel | WDestructiveClose | WStyle_StaysOnTop)) +DatePicker::DatePicker(TQWidget *parent, const TQDate& date) + : TQVBox( parent, 0,(WType_TopLevel | WDestructiveClose | WStyle_StaysOnTop)) { - setFrameStyle( QFrame::PopupPanel | QFrame::Raised ); + setFrameStyle( TQFrame::PopupPanel | TQFrame::Raised ); KWin::setType( winId(), NET::Utility ); KWin::setOnAllDesktops( handle(), true ); picker = new KDatePicker(this, date); picker->setCloseButton(true); - connect( picker, SIGNAL(dateSelected(QDate)),this, - SLOT(slotEmitSelectedDate(QDate)) ); + connect( picker, SIGNAL(dateSelected(TQDate)),this, + SLOT(slotEmitSelectedDate(TQDate)) ); /* name and icon for kicker's taskbar */ setCaption(i18n("Calendar")); setIcon(SmallIcon("date")); } -void DatePicker::closeEvent(QCloseEvent* e) +void DatePicker::closeEvent(TQCloseEvent* e) { /* 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(); } } -bool DatePicker::setDate(const QDate& date) +bool DatePicker::setDate(const TQDate& date) { return picker->setDate(date); } -void DatePicker::slotEmitSelectedDate(QDate newdate) +void DatePicker::slotEmitSelectedDate(TQDate newdate) { emit signalSelectedDate(newdate); //kdDebug() << "here date" << endl; close(); } -QDate DatePicker::date() +TQDate DatePicker::date() { return picker->date(); } diff --git a/src/datepicker.h b/src/datepicker.h index e38f9c5..5485cae 100644 --- a/src/datepicker.h +++ b/src/datepicker.h @@ -28,32 +28,32 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #endif -#include -#include +#include +#include class KDatePicker; // class Prefs; -class DatePicker : public QVBox +class DatePicker : public TQVBox { Q_OBJECT public: - DatePicker(QWidget*, const QDate&); - bool setDate(const QDate& date); - QDate date(); + DatePicker(TQWidget*, const TQDate&); + bool setDate(const TQDate& date); + TQDate date(); protected: - void closeEvent(QCloseEvent* e); - void keyPressEvent(QKeyEvent *e); + void closeEvent(TQCloseEvent* e); + void keyPressEvent(TQKeyEvent *e); private: KDatePicker *picker; private slots: - void slotEmitSelectedDate(QDate); + void slotEmitSelectedDate(TQDate); signals: - void signalSelectedDate(QDate); + void signalSelectedDate(TQDate); }; diff --git a/src/dbviewer.cpp b/src/dbviewer.cpp index ed45a23..4e53574 100644 --- a/src/dbviewer.cpp +++ b/src/dbviewer.cpp @@ -14,9 +14,9 @@ #include "freshklam.h" #include "../config.h" -#include -#include -#include +#include +#include +#include #include //ctor #include @@ -49,20 +49,20 @@ using namespace KlamAV; * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */ -KlamDB::KlamDB( QWidget* parent, const char* name, bool modal, WFlags fl ) - : QDialog( parent, name, modal, fl ) +KlamDB::KlamDB( TQWidget* parent, const char* name, bool modal, WFlags fl ) + : TQDialog( parent, name, modal, fl ) { if ( !name ) setName( "KlamDB" ); loadinprogress = false; - QVBoxLayout *vbox = new QVBoxLayout(this, KDialog::marginHint(), + TQVBoxLayout *vbox = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint(), "vbox"); - QWidget* privateLayoutWidget = new QWidget( this, "dblayout" ); + TQWidget* privateLayoutWidget = new TQWidget( this, "dblayout" ); 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); 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->addColumn( i18n( "All Known Viruses" ),150 ); - connect(VirusList, SIGNAL( doubleClicked( QListViewItem * , const QPoint &, int ) ), - this, SLOT(slotOpenTab(QListViewItem * , const QPoint &, int )) ); + connect(VirusList, SIGNAL( doubleClicked( TQListViewItem * , const TQPoint &, int ) ), + this, SLOT(slotOpenTab(TQListViewItem * , const TQPoint &, int )) ); - menu = new QPopupMenu( VirusList ); + menu = new TQPopupMenu( VirusList ); - QPixmap gicon; - QPixmap vicon; - QPixmap ticon; + TQPixmap gicon; + TQPixmap vicon; + 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() ) vicon = SmallIcon("find"); else - vicon = QPixmap( iconPath ); + vicon = TQPixmap( iconPath ); iconPath = locate("cache", KMimeType::favIconForURL("http://www.google.com")+".png"); if ( iconPath.isEmpty() ) gicon = SmallIcon("find"); else - gicon = QPixmap( iconPath ); + gicon = TQPixmap( iconPath ); iconPath = locate("cache", KMimeType::favIconForURL("http://www.trendmicro.com")+".png"); if ( iconPath.isEmpty() ) ticon = SmallIcon("find"); else - ticon = QPixmap( iconPath ); + ticon = TQPixmap( iconPath ); menu->insertItem(vicon, i18n("Search in VirusList"), this,SLOT(slotVirusList()) ); menu->insertItem(vicon, i18n("Search in VirusPool"), this,SLOT(slotVirusPool()) ); menu->insertItem(ticon, i18n("Search with Trend Micro"), this,SLOT(slotTrendMicro()) ); menu->insertItem(gicon, i18n("Search with Google"), this,SLOT(slotGoogle()) ); - connect(VirusList, SIGNAL( contextMenuRequested( QListViewItem *, const QPoint& , int ) ), - this, SLOT( slotRMB( QListViewItem *, const QPoint &, int ) ) ); + connect(VirusList, SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint& , int ) ), + this, SLOT( slotRMB( TQListViewItem *, const TQPoint &, int ) ) ); - kLineEdit1 = new KListViewSearchLine( (QWidget *)searchToolBar, VirusList,"klinedit1"); - QValueList columns; + kLineEdit1 = new KListViewSearchLine( (TQWidget *)searchToolBar, VirusList,"klinedit1"); + TQValueList columns; columns.append(0); kLineEdit1->setSearchColumns(columns); kLineEdit1->setMaxLength(2); @@ -140,7 +140,7 @@ KlamDB::KlamDB( QWidget* parent, const char* name, bool modal, WFlags fl ) */ 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; } -void KlamDB::shouldIShow(QWidget * current) +void KlamDB::shouldIShow(TQWidget * current) { static struct cl_stat *dbstat=NULL; - QString location; + TQString location; if ((current == this) && (!(loadinprogress))){ - QString db = kmain->freshklam->getCurrentDBDir(); + TQString db = kmain->freshklam->getCurrentDBDir(); if (checkdir((const char *)db) == -1){ kdDebug() << "returned -1" << endl; @@ -732,7 +732,7 @@ void KlamDB::shouldIShow(QWidget * current) prog->setProgress (count); kapp->processEvents(); -// QString db = kmain->freshklam->getCurrentDBDir(); +// TQString db = kmain->freshklam->getCurrentDBDir(); listdir((const char *)db); @@ -754,8 +754,8 @@ void KlamDB::shouldIShow(QWidget * current) loadinprogress = false; // Default english - QString location = locate( "data", "klamav/about/main-" + KGlobal::locale()->language() + ".html" ); - if( location != QString::null ) + TQString location = locate( "data", "klamav/about/main-" + KGlobal::locale()->language() + ".html" ); + if( location != TQString::null ) homepage->openURL( location ); else homepage->openURL( locate("data", "klamav/about/main.html") ); @@ -771,12 +771,12 @@ void KlamDB::addVirusName(char *start) kapp->processEvents(); if ((count % 500) == 0){ - //progress->setLabel("Loading " + QString(start)); + //progress->setLabel("Loading " + TQString(start)); progress->setLabel( i18n( "Loading ClamAV's Database of Virus Signatures") ); prog->setProgress (count); kapp->processEvents(); } - new KListViewItem( VirusList, QString(start)); + new KListViewItem( VirusList, TQString(start)); kapp->processEvents(); } @@ -788,9 +788,9 @@ unsigned int KlamDB::getSigNos() unsigned int ret= 0; unsigned int no = 0; struct cl_engine *engine = NULL; - QStringList lastDownloadPaths; - QString dbdir; - QString db; + TQStringList lastDownloadPaths; + TQString dbdir; + TQString db; KConfig* config = KGlobal::config(); 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"); //connect( m_part, SIGNAL(signalSettingsChanged()), page, SLOT(slotPaletteOrFontChanged())); - //connect( page, SIGNAL(setTabIcon(const QPixmap&)), - // this, SLOT(setTabIcon(const QPixmap&))); - //connect( page, SIGNAL(setWindowCaption (const QString &)), - // this, SLOT(slotTabCaption (const QString &)) ); + //connect( page, SIGNAL(setTabIcon(const TQPixmap&)), + // this, SLOT(setTabIcon(const TQPixmap&))); + //connect( page, SIGNAL(setWindowCaption (const TQString &)), + // this, SLOT(slotTabCaption (const TQString &)) ); connect( page, SIGNAL(urlClicked(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)); //connectFrame(frame); @@ -850,10 +850,10 @@ void KlamDB::slotOpenTabPlain(const KURL& url, bool background) PageViewer* page = new PageViewer(this, "page"); //connect( m_part, SIGNAL(signalSettingsChanged()), page, SLOT(slotPaletteOrFontChanged())); -/* connect( page, SIGNAL(setTabIcon(const QPixmap&)), - this, SLOT(setTabIcon(const QPixmap&)));*/ - connect( page, SIGNAL(setWindowCaption (const QString &)), - this, SLOT(slotTabCaption (const QString &)) ); +/* connect( page, SIGNAL(setTabIcon(const TQPixmap&)), + this, SLOT(setTabIcon(const TQPixmap&)));*/ + connect( page, SIGNAL(setWindowCaption (const TQString &)), + this, SLOT(slotTabCaption (const TQString &)) ); connect( page, SIGNAL(urlClicked(const KURL &,bool)), this, SLOT(slotOpenTabPlain(const KURL &,bool)) ); @@ -873,7 +873,7 @@ void KlamDB::slotOpenTabPlain(const KURL& url, bool background) page->openURL(url); } -void KlamDB::slotTabCaption(const QString &caption) +void KlamDB::slotTabCaption(const TQString &caption) { if (!caption.isEmpty()) { @@ -896,20 +896,20 @@ void KlamDB::slotOpenHome() // else setFocus(); - QString location = locate( "data", "klamav/about/wait-" + KGlobal::locale()->language() + ".html" ); - if( location != QString::null ) + TQString location = locate( "data", "klamav/about/wait-" + KGlobal::locale()->language() + ".html" ); + if( location != TQString::null ) homepage->openURL( location ); else 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 ) 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"); @@ -926,47 +926,47 @@ void KlamDB::slotOpenPrefix(QString prefix, QString title,QString url) void KlamDB::slotVirusPool() { - QString url = VirusList->selectedItem()->text(0); - QString prefix = QString("http://www.viruspool.net/virus.cms?&name="); + TQString url = VirusList->selectedItem()->text(0); + TQString prefix = TQString("http://www.viruspool.net/virus.cms?&name="); slotOpenPrefix(prefix,"VirusPool",url); } void KlamDB::slotVirusList() { - QString url = VirusList->selectedItem()->text(0); - QString prefix = QString("http://www.viruslist.com/en/find?search_mode=virus&words="); + TQString url = VirusList->selectedItem()->text(0); + TQString prefix = TQString("http://www.viruslist.com/en/find?search_mode=virus&words="); slotOpenPrefix(prefix,"VirusList",url); } void KlamDB::slotGoogle() { - QString url = VirusList->selectedItem()->text(0); - QString prefix = QString("http://www.google.com/search?ie=ISO-8859-1&q="); + TQString url = VirusList->selectedItem()->text(0); + TQString prefix = TQString("http://www.google.com/search?ie=ISO-8859-1&q="); slotOpenPrefix(prefix,"Google",url); } void KlamDB::slotTrendMicro() { - QString url = VirusList->selectedItem()->text(0); - QString prefix = QString("http://www.trendmicro.com/vinfo/virusencyclo/default2.asp?m=q&virus="); + TQString url = VirusList->selectedItem()->text(0); + TQString prefix = TQString("http://www.trendmicro.com/vinfo/virusencyclo/default2.asp?m=q&virus="); slotOpenPrefix(prefix,"TrendMicro",url); } -void KlamDB::slotExternal(QString name,QString service) +void KlamDB::slotExternal(TQString name,TQString service) { kmain->showVirusBrowser(); shouldIShow(this); - QString prefix; + TQString prefix; 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") - 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") - 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 - 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); } diff --git a/src/dbviewer.h b/src/dbviewer.h index 8855449..6f0b280 100644 --- a/src/dbviewer.h +++ b/src/dbviewer.h @@ -10,26 +10,26 @@ #ifndef KLAMDB_H #define KLAMDB_H -#include -#include +#include +#include #include -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QSpacerItem; -class QTabWidget; -class QWidget; +class TQVBoxLayout; +class TQHBoxLayout; +class TQGridLayout; +class TQSpacerItem; +class TQTabWidget; +class TQWidget; class KListViewSearchLine; -class QListView; +class TQListView; class KListView; class KListViewItem; -class QListViewItem; +class TQListViewItem; class KProgress; class KProgressDialog; -class QLabel; -class QPopupMenu; +class TQLabel; +class TQPopupMenu; namespace KlamAV @@ -38,25 +38,25 @@ namespace KlamAV class PageViewer; } -class KlamDB : public QDialog +class KlamDB : public TQDialog { Q_OBJECT 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(); KlamAV::TabWidget* tabBrowser; - QWidget* tab; + TQWidget* tab; KListViewSearchLine* kLineEdit1; KListView* VirusList; - void slotExternal(QString name, QString service); + void slotExternal(TQString name, TQString service); public slots: - void shouldIShow(QWidget * current); + void shouldIShow(TQWidget * current); protected: - QGridLayout* dblayout; + TQGridLayout* dblayout; private: int listdir(const char *dirname); @@ -69,18 +69,18 @@ private: int count; int sigs; int newsigs; - QLabel* label; + TQLabel* label; void slotOpenHome(); - QPopupMenu* menu; - void slotOpenPrefix(QString prefix, QString title,QString url); + TQPopupMenu* menu; + void slotOpenPrefix(TQString prefix, TQString title,TQString url); KlamAV::PageViewer* homepage; bool loadinprogress; protected slots: 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 slotTabCaption(const QString &capt); - void slotRMB( QListViewItem* Item, const QPoint & point, int num); + void slotTabCaption(const TQString &capt); + void slotRMB( TQListViewItem* Item, const TQPoint & point, int num); void slotVirusPool(); void slotVirusList(); void slotGoogle(); diff --git a/src/dcopklamscan.h b/src/dcopklamscan.h index d73b83c..d58db86 100644 --- a/src/dcopklamscan.h +++ b/src/dcopklamscan.h @@ -34,7 +34,7 @@ class DCOPKlamscan : virtual public DCOPObject k_dcop: - virtual void scanURLs(const QString &urls) = 0; + virtual void scanURLs(const TQString &urls) = 0; }; #endif // DCOPDEMOIFACE_H diff --git a/src/directorylist.cpp b/src/directorylist.cpp index 66f80d9..f830ecd 100644 --- a/src/directorylist.cpp +++ b/src/directorylist.cpp @@ -16,15 +16,15 @@ * * ***************************************************************************/ -#include -#include -#include +#include +#include +#include #include #include #include #include -#include +#include #include #include #include @@ -39,23 +39,23 @@ using Collection::DeviceItem; CollectionSetup* CollectionSetup::s_instance; -CollectionSetup::CollectionSetup( QWidget *parent, bool recursive ) - : QVBox( parent ) +CollectionSetup::CollectionSetup( TQWidget *parent, bool recursive ) + : TQVBox( parent ) { s_instance = this; -// (new QLabel( i18n( -// "Select the folder(s) to scan. "), this ))->setAlignment( Qt::WordBreak ); +// (new TQLabel( i18n( +// "Select the folder(s) to scan. "), this ))->setAlignment( TQt::WordBreak ); - m_view = new QListView( this ); -/* m_recursive = new QCheckBox( i18n("&Scan folders recursively"), this );*/ + m_view = new TQListView( this ); +/* m_recursive = new TQCheckBox( i18n("&Scan folders recursively"), this );*/ m_recursive = recursive; -// m_monitor = new QCheckBox( i18n("&Watch folders for changes"), this ); -// m_playlists = new QCheckBox( i18n("&Import playlists"), this ); +// m_monitor = new TQCheckBox( i18n("&Watch folders for changes"), this ); +// m_playlists = new TQCheckBox( i18n("&Import playlists"), this ); // -// QToolTip::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." ) ); -// QToolTip::add( m_playlists, i18n( "If selected, playlist files (.m3u) will automatically be added to the Playlist-Browser." ) ); +// TQToolTip::add( m_recursive, i18n( "If selected, amaroK reads all folders recursively." ) ); +// 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." ) ); +// TQToolTip::add( m_playlists, i18n( "If selected, playlist files (.m3u) will automatically be added to the Playlist-Browser." ) ); // Read config values // m_dirs = AmarokConfig::collectionFolders(); @@ -63,11 +63,11 @@ CollectionSetup::CollectionSetup( QWidget *parent, bool recursive ) // m_monitor->setChecked( AmarokConfig::monitorChanges() ); // m_playlists->setChecked( AmarokConfig::importPlaylists() ); - m_view->addColumn( QString::null ); + m_view->addColumn( TQString::null ); m_view->setRootIsDecorated( true ); - reinterpret_cast(m_view->header())->hide(); + reinterpret_cast(m_view->header())->hide(); 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 ); setSpacing( 6 ); @@ -82,8 +82,8 @@ void CollectionSetup::slotRecursiveToggled(bool on) ////////////////////////////////////////////////////////////////////////////////////////// // CLASS Item ////////////////////////////////////////////////////////////////////////////////////////// -Item::Item( QListView *parent , const QString &name, const QString &path, const QString &icon ) - : QCheckListItem( parent, name, QCheckListItem::CheckBox ) +Item::Item( TQListView *parent , const TQString &name, const TQString &path, const TQString &icon ) + : TQCheckListItem( parent, name, TQCheckListItem::CheckBox ) , m_lister( true ) , m_url( "file:" + path ) , 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 ) - : QCheckListItem( parent, url.fileName(), QCheckListItem::CheckBox ) +Item::Item( TQListViewItem *parent, const KURL &url ) + : TQCheckListItem( parent, url.fileName(), TQCheckListItem::CheckBox ) , m_lister( true ) , m_url( url ) , m_listed( false ) @@ -117,12 +117,12 @@ Item::Item( QListViewItem *parent, const KURL &url ) } -QString +TQString Item::fullPath() const { - QString path; + TQString path; - for ( const QListViewItem *item = this; dynamic_cast( item ); item = item->parent() ) + for ( const TQListViewItem *item = this; dynamic_cast( item ); item = item->parent() ) { path.prepend( '/' ); path.prepend( item->text( 1 ) ); @@ -140,7 +140,7 @@ Item::setOpen( bool b ) m_listed = true; } - QListViewItem::setOpen( b ); + TQListViewItem::setOpen( b ); } @@ -148,11 +148,11 @@ void Item::stateChange( bool b ) { if( CollectionSetup::instance()->recursive() ) - for( QListViewItem *item = firstChild(); item; item = item->nextSibling() ) - static_cast(item)->QCheckListItem::setOn( b ); + for( TQListViewItem *item = firstChild(); item; item = item->nextSibling() ) + static_cast(item)->TQCheckListItem::setOn( b ); // 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 ( it == CollectionSetup::instance()->m_dirs.end() ) { @@ -180,7 +180,7 @@ void Item::activate() { if( !isDisabled() ) - QCheckListItem::activate(); + TQCheckListItem::activate(); } @@ -200,7 +200,7 @@ Item::newItems( const KFileItemList &list ) //SLOT 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; @@ -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 - QColorGroup _cg = cg; - if ( dirty ) _cg.setColor( QColorGroup::Text, Qt::blue ); + TQColorGroup _cg = cg; + 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) setOn(false); } @@ -228,8 +228,8 @@ Item::paintCell( QPainter * p, const QColorGroup & cg, int column, int width, in // CLASS DeviceItem ////////////////////////////////////////////////////////////////////////////////////////// -DeviceItem::DeviceItem( QListView *parent ) - : QCheckListItem( parent, i18n("Devices"), QCheckListItem::CheckBox ) +DeviceItem::DeviceItem( TQListView *parent ) + : TQCheckListItem( parent, i18n("Devices"), TQCheckListItem::CheckBox ) , m_lister( true ) , m_listed( false ) { @@ -250,8 +250,8 @@ DeviceItem::DeviceItem( QListView *parent ) } -DeviceItem::DeviceItem( QListViewItem *parent, const QString &name, const KURL &url ) - : QCheckListItem( parent, name, QCheckListItem::CheckBox ) +DeviceItem::DeviceItem( TQListViewItem *parent, const TQString &name, const KURL &url ) + : TQCheckListItem( parent, name, TQCheckListItem::CheckBox ) , m_lister( true ) , m_url( url ) , m_listed( false ) @@ -262,14 +262,14 @@ DeviceItem::DeviceItem( QListViewItem *parent, const QString &name, const KURL & else ////kdDebug() << "attached" << endl; - QByteArray data; - QByteArray param; - QCString retType; - QStringList retVal; - QDataStream streamout(param,IO_WriteOnly); + TQByteArray data; + TQByteArray param; + TQCString retType; + TQStringList retVal; + TQDataStream streamout(param,IO_WriteOnly); streamout<< url.fileName(); - QCString mediacall="mediamanager"; - QCString devicecall="properties"; + TQCString mediacall="mediamanager"; + TQCString devicecall="properties"; if ( KDE::versionMajor() == 3 && KDE::versionMinor() < 4 ) { mediacall="mountwatcher"; @@ -299,10 +299,10 @@ DeviceItem::DeviceItem( QListViewItem *parent, const QString &name, const KURL & } -QString +TQString DeviceItem::fullPath() const { - QString path = text(1); + TQString path = text(1); if (path != "devices") return path; return ""; @@ -318,7 +318,7 @@ DeviceItem::setOpen( bool b ) } m_listed = true; - QListViewItem::setOpen( b ); + TQListViewItem::setOpen( b ); } @@ -326,13 +326,13 @@ void DeviceItem::stateChange( bool b ) { if( CollectionSetup::instance()->recursive() ) - for( QListViewItem *item = firstChild(); item; item = item->nextSibling() ) - static_cast(item)->QCheckListItem::setOn( b ); + for( TQListViewItem *item = firstChild(); item; item = item->nextSibling() ) + static_cast(item)->TQCheckListItem::setOn( b ); if (text(1) != "devices") { // 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 ( it == CollectionSetup::instance()->m_dirs.end() ) { @@ -363,7 +363,7 @@ void DeviceItem::activate() { if( !isDisabled() ) - QCheckListItem::activate(); + TQCheckListItem::activate(); } @@ -386,11 +386,11 @@ DeviceItem::newItems( const KFileItemList &list ) //SLOT 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; - QColorGroup _cg = cg; + TQColorGroup _cg = cg; ////kdDebug() << text(1) << endl; if (text(1) != "devices") @@ -409,7 +409,7 @@ DeviceItem::paintCell( QPainter * p, const QColorGroup & cg, int column, int wid } else { - for( QListViewItem *item = firstChild(); item; item = item->nextSibling() ) + for( TQListViewItem *item = firstChild(); item; item = item->nextSibling() ) { DeviceItem *itm = dynamic_cast(item); 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 - if ( dirty ) _cg.setColor( QColorGroup::Text, Qt::blue ); - QCheckListItem::paintCell( p, isDisabled() ? listView()->palette().disabled() : _cg, column, width, align ); + if ( dirty ) _cg.setColor( TQColorGroup::Text, TQt::blue ); + TQCheckListItem::paintCell( p, isDisabled() ? listView()->palette().disabled() : _cg, column, width, align ); } void -DeviceItem::mountDevice( const QString & device) +DeviceItem::mountDevice( const TQString & device) { if (!kapp->dcopClient()->isAttached()) @@ -442,9 +442,9 @@ DeviceItem::mountDevice( const QString & device) //Set Up our DCOP Calls - QStringList retVal; - QCString mediacall="mediamanager"; - QCString devicecall="properties"; + TQStringList retVal; + TQCString mediacall="mediamanager"; + TQCString devicecall="properties"; if ( KDE::versionMajor() == 3 && KDE::versionMinor() < 4 ) { mediacall="mountwatcher"; diff --git a/src/directorylist.h b/src/directorylist.h index 6be1b59..343c3fa 100644 --- a/src/directorylist.h +++ b/src/directorylist.h @@ -19,9 +19,9 @@ #ifndef _DIRECTORYLIST_H #define _DIRECTORYLIST_H -#include //inlined functions -#include //baseclass -#include //baseclass +#include //inlined functions +#include //baseclass +#include //baseclass #include //stack allocated #include //stack allocated @@ -30,7 +30,7 @@ namespace Collection { class Item; } -class CollectionSetup : public QVBox +class CollectionSetup : public TQVBox { Q_OBJECT friend class Collection::Item; @@ -38,17 +38,17 @@ Q_OBJECT public: 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 monitor() const { return m_monitor->isChecked(); } // bool importPlaylists() const { return m_playlists->isChecked(); } - QStringList m_dirs; - QMap m_refcount; + TQStringList m_dirs; + TQMap m_refcount; signals: - void dirsSelected(QStringList& dirs); + void dirsSelected(TQStringList& dirs); public slots: @@ -57,30 +57,30 @@ public slots: private: static CollectionSetup* s_instance; - QListView *m_view; + TQListView *m_view; bool m_recursive; - QCheckBox *m_monitor; - QCheckBox *m_playlists; + TQCheckBox *m_monitor; + TQCheckBox *m_playlists; }; 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 public: - Item( QListView *parent, const QString &name, const QString &path, const QString &icon=QString::null ); - Item( QListViewItem *parent, const KURL &url ); + Item( TQListView *parent, const TQString &name, const TQString &path, const TQString &icon=TQString::null ); + 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(); } - QString fullPath() const; + TQString fullPath() const; void setOpen( bool b ); // reimpl. void stateChange( bool ); // 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: void newItems( const KFileItemList& ); @@ -93,26 +93,26 @@ private: }; -class DeviceItem : public QObject, public QCheckListItem +class DeviceItem : public TQObject, public TQCheckListItem { Q_OBJECT public: - DeviceItem( QListView *parent ); - DeviceItem( QListViewItem *parent, const QString &name, const KURL &url ); + DeviceItem( TQListView *parent ); + 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(); } - QString fullPath() const; + TQString fullPath() const; void setOpen( bool b ); // reimpl. void stateChange( bool ); // 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: void newItems( const KFileItemList& ); void completed() { if( childCount() == 0 ) { setExpandable( false ); repaint(); } } private: - void mountDevice(const QString & device); + void mountDevice(const TQString & device); KDirLister m_lister; KURL m_url; bool m_listed; diff --git a/src/firstrunwizard.ui b/src/firstrunwizard.ui index 384a7b7..8dadb07 100644 --- a/src/firstrunwizard.ui +++ b/src/firstrunwizard.ui @@ -1,6 +1,6 @@ FirstRunWizard - + FirstRunWizard @@ -15,7 +15,7 @@ First-Run Wizard - + WizardPage @@ -44,7 +44,7 @@ - + preview @@ -82,7 +82,7 @@ - + WizardPage_1 @@ -152,7 +152,7 @@ - + CheckForDatabaseUpdates @@ -174,7 +174,7 @@ true - + CheckForClamAVUpdates @@ -196,7 +196,7 @@ false - + groupBox1 @@ -243,7 +243,7 @@ 6 - + textLabel1 @@ -259,7 +259,7 @@ Signature Database Location: - + textLabel1_2 @@ -372,11 +372,11 @@ init() - showPage( QWidget * w ) + showPage( TQWidget * w ) databasePath() quarantinePath() - defaultDatabasePath() - defaultQuarantinePath() + defaultDatabasePath() + defaultQuarantinePath() downloadDatabase() downloadClamAV() diff --git a/src/firstrunwizard.ui.h b/src/firstrunwizard.ui.h index e56c59f..2f74980 100644 --- a/src/firstrunwizard.ui.h +++ b/src/firstrunwizard.ui.h @@ -2,7 +2,7 @@ ** ui.h extension file, included from the uic-generated form implementation. ** ** 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. ** Instead, write your code in functions called init() and destroy(). @@ -13,14 +13,14 @@ #include "klamav.h" #include #include -#include -#include +#include +#include #include #include #include -QString databasepath; -QString quarantinepath; +TQString databasepath; +TQString quarantinepath; @@ -32,20 +32,20 @@ FirstRunWizard::init() cancelButton()->setFixedSize( cancelButton()->sizeHint() ); helpButton()->hide(); - QString homepath = getenv("HOME"); + TQString homepath = getenv("HOME"); databasepath = homepath + "/.klamav/database"; DatabaseLocation->setURL(databasepath); quarantinepath = homepath + "/.klamav/quarantine"; 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" ) ); // picture4->setPixmap( *picture1->pixmap() ); - ClamBanner->setText(QString("\"ClamAV").arg(locate("data", "klamav/about/tshirt.png"))); + ClamBanner->setText(TQString("\"ClamAV").arg(locate("data", "klamav/about/tshirt.png"))); setFinishEnabled ( WizardPage_1, true ); @@ -53,9 +53,9 @@ FirstRunWizard::init() } 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"); // // //Configure Database Path -// QStringList lastDownloadPaths; +// TQStringList lastDownloadPaths; // if (DatabaseLocation->url() != "") -// lastDownloadPaths.prepend( QString("%1").arg(DatabaseLocation->url())); +// lastDownloadPaths.prepend( TQString("%1").arg(DatabaseLocation->url())); // else -// lastDownloadPaths.prepend( QString("%1").arg(databasepath)); +// lastDownloadPaths.prepend( TQString("%1").arg(databasepath)); // config->writeEntry("lastDownloadPaths", lastDownloadPaths); // config->sync(); // // //Configure Quarantine Path -// QStringList lastQuarLocations; +// TQStringList lastQuarLocations; // // config->setGroup("Kuarantine"); // // if (QuarantineLocation->url() != "") -// lastQuarLocations.prepend( QString("%1").arg(QuarantineLocation->url())); +// lastQuarLocations.prepend( TQString("%1").arg(QuarantineLocation->url())); // else -// lastQuarLocations.prepend( QString("%1").arg(quarantinepath)); +// lastQuarLocations.prepend( TQString("%1").arg(quarantinepath)); // config->writeEntry("KuarantineLocations", lastQuarLocations); // config->sync(); // @@ -109,13 +109,13 @@ FirstRunWizard::quarantinePath( ) //virtual return QuarantineLocation->url(); } -QString +TQString FirstRunWizard::defaultDatabasePath( ) //virtual { return databasepath; } -QString +TQString FirstRunWizard::defaultQuarantinePath( ) //virtual { return quarantinepath; diff --git a/src/frame.cpp b/src/frame.cpp index 6d2c9e9..eabb217 100644 --- a/src/frame.cpp +++ b/src/frame.cpp @@ -13,8 +13,8 @@ using namespace KlamAV; -Frame::Frame(QObject * parent, KParts::ReadOnlyPart *p, QWidget *visWidget, const QString& tit, bool watchSignals) - :QObject(parent, "KlamAVFrame") +Frame::Frame(TQObject * parent, KParts::ReadOnlyPart *p, TQWidget *visWidget, const TQString& tit, bool watchSignals) + :TQObject(parent, "KlamAVFrame") { m_part=p; 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 { - connect(m_part, SIGNAL(setWindowCaption (const QString &)), this, SLOT(setCaption (const QString &))); - connect(m_part, SIGNAL(setStatusBarText (const QString &)), this, SLOT(setStatusText (const QString &))); + connect(m_part, SIGNAL(setWindowCaption (const TQString &)), this, SLOT(setCaption (const TQString &))); + connect(m_part, SIGNAL(setStatusBarText (const TQString &)), this, SLOT(setStatusText (const TQString &))); KParts::BrowserExtension *ext=KParts::BrowserExtension::childObject( p ); 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(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())); /* KActionCollection *coll=p->actionCollection(); if (coll) { - connect( coll, SIGNAL( actionStatusText( const QString & ) ), - this, SLOT( slotActionStatusText( const QString & ) ) ); + connect( coll, SIGNAL( actionStatusText( const TQString & ) ), + this, SLOT( slotActionStatusText( const TQString & ) ) ); connect( coll, SIGNAL( clearStatusText() ), this, SLOT( slotClearStatusText() ) ); } @@ -66,24 +66,24 @@ KParts::ReadOnlyPart *Frame::part() const return m_part; } -QWidget *Frame::widget() const +TQWidget *Frame::widget() const { return m_widget; } -void Frame::setTitle(const QString &s) +void Frame::setTitle(const TQString &s) { m_title=s; } -void Frame::setCaption(const QString &s) +void Frame::setCaption(const TQString &s) { /* if(m_progressItem) m_progressItem->setLabel(s);*/ m_caption=s; emit captionChanged(s); } -void Frame::setStatusText(const QString &s) +void Frame::setStatusText(const TQString &s) { m_statusText=s; emit statusText(s); @@ -108,7 +108,7 @@ void Frame::setState(int a) emit started(); break; case Frame::Canceled: - emit canceled(QString::null); + emit canceled(TQString::null); break; case Frame::Idle: 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; } -const QString Frame::caption() const +const TQString Frame::caption() const { return m_caption; } -const QString Frame::statusText() const +const TQString Frame::statusText() const { return m_statusText; } @@ -136,14 +136,14 @@ const QString Frame::statusText() const void Frame::setStarted() { //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...")); //connect(m_progressItem, SIGNAL(progressItemCanceled(KPIM::ProgressItem*)), SLOT(slotAbortFetch())); m_state=Started; emit started(); } -void Frame::setCanceled(const QString &s) +void Frame::setCanceled(const TQString &s) { /* if(m_progressItem) { m_progressItem->setStatus(i18n("Loading canceled")); diff --git a/src/frame.h b/src/frame.h index 813db1e..da37fff 100644 --- a/src/frame.h +++ b/src/frame.h @@ -10,7 +10,7 @@ #include -#include +#include namespace KPIM { @@ -20,51 +20,51 @@ namespace KPIM namespace KlamAV { - class Frame : public QObject + class Frame : public TQObject { Q_OBJECT 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(); enum {Idle, Started, Completed, Canceled}; KParts::ReadOnlyPart *part() const; - QWidget *widget() const; - const QString title() const; - const QString caption() const; + TQWidget *widget() const; + const TQString title() const; + const TQString caption() const; int state() const; int progress() const; - const QString statusText() const; + const TQString statusText() const; public slots: void setStarted(); - void setCanceled(const QString &); + void setCanceled(const TQString &); void setCompleted(); void setState(int); void setProgress(int); - void setCaption(const QString &); - void setTitle(const QString &); - void setStatusText(const QString &); + void setCaption(const TQString &); + void setTitle(const TQString &); + void setStatusText(const TQString &); signals: - void captionChanged(const QString &); + void captionChanged(const TQString &); void started(); - void canceled(const QString &); + void canceled(const TQString &); void completed(); void loadingProgress(int); - void statusText(const QString &); + void statusText(const TQString &); private: KParts::ReadOnlyPart *m_part; - QWidget *m_widget; - QString m_title; - QString m_caption; + TQWidget *m_widget; + TQString m_title; + TQString m_caption; int m_state; int m_progress; - QString m_statusText; - QString m_progressId; + TQString m_statusText; + TQString m_progressId; KPIM::ProgressItem *m_progressItem; }; } diff --git a/src/freshklam.cpp b/src/freshklam.cpp index e356939..77bfe27 100644 --- a/src/freshklam.cpp +++ b/src/freshklam.cpp @@ -18,12 +18,12 @@ #include -#include +#include #include #include #include #include -#include +#include #include #include #include @@ -37,7 +37,7 @@ #include #include -#include +#include #include #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) - : QWidget(parent, name) +Freshklam::Freshklam(TQWidget *parent, const char *name) + : TQWidget(parent, name) { // MetaDB* updater = new MetaDB(); @@ -98,27 +98,27 @@ Freshklam::Freshklam(QWidget *parent, const char *name) lastDownloadPaths = config->readListEntry("lastDownloadPaths"); getCurrentVersionOfClamAV( ); - if ((lastDownloadPaths.isEmpty()) || (!(KIO::NetAccess::exists(QString((*lastDownloadPaths.begin())),TRUE,NULL)))){ + if ((lastDownloadPaths.isEmpty()) || (!(KIO::NetAccess::exists(TQString((*lastDownloadPaths.begin())),TRUE,NULL)))){ createDBDir(); } - QString proxyIPText = config->readEntry("ProxyIP"); - QString proxyPortText = config->readEntry("ProxyPort"); - QString proxyUserText = config->readEntry("ProxyUser"); - QString proxyPassText = config->readEntry("ProxyPass"); + TQString proxyIPText = config->readEntry("ProxyIP"); + TQString proxyPortText = config->readEntry("ProxyPort"); + TQString proxyUserText = config->readEntry("ProxyUser"); + TQString proxyPassText = config->readEntry("ProxyPass"); //Data Directory Widget - QVBoxLayout *vbox = new QVBoxLayout(this, KDialog::marginHint(), + TQVBoxLayout *vbox = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint(), "vbox"); //Proxy Widget - QGroupBox *software_group = new QGroupBox(i18n("Software Updates"), this); + TQGroupBox *software_group = new TQGroupBox(i18n("Software Updates"), this); 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"); software_layout->addRowSpacing(0, software_group->fontMetrics().height()); software_layout->setColStretch(0, 1); @@ -126,28 +126,28 @@ Freshklam::Freshklam(QWidget *parent, const char *name) //Dazuko - QWidget *dazuko_hlp = new QWidget( software_group ); + TQWidget *dazuko_hlp = new TQWidget( software_group ); 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()); 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()); 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); clamav_options->setFixedSize(clamav_options->sizeHint()); connect( clamav_options, SIGNAL( clicked() ), this, 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); klamav_options->setFixedSize(klamav_options->sizeHint()); connect( klamav_options, SIGNAL( clicked() ), this, @@ -160,11 +160,11 @@ Freshklam::Freshklam(QWidget *parent, const char *name) klamav_options->setEnabled(false); #endif //Virus Database Directory - QGroupBox *group = new QGroupBox(i18n("Virus Database Directory"), this); + TQGroupBox *group = new TQGroupBox(i18n("Virus Database Directory"), this); vbox->addWidget(group); - QGridLayout *layout = new QGridLayout( group, 9, 2, KDialog::spacingHint(), + TQGridLayout *layout = new TQGridLayout( group, 9, 2, KDialog::spacingHint(), KDialog::spacingHint(), "layout"); layout->addRowSpacing(0, group->fontMetrics().height()); @@ -172,44 +172,44 @@ Freshklam::Freshklam(QWidget *parent, const char *name) layout->setColStretch(1, 1); - QWidget *hlp = new QWidget( group ); + TQWidget *hlp = new TQWidget( group ); 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->completionObject()->setMode(KURLCompletion::DirCompletion); dir_combo->comboBox()->insertStringList(lastDownloadPaths); 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_layout->addWidget(dir_label); dir_layout->addWidget(dir_combo); //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); - 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"); proxy_layout->addRowSpacing(0, proxy_group->fontMetrics().height()); proxy_layout->setColStretch(0, 1); proxy_layout->setColStretch(1, 1); //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); - 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_layout->addWidget(proxy_dir_label,0,0); proxyIP = new KLineEdit(proxy_hlp); proxy_dir_layout->addWidget(proxyIP,0,1); 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_dir_layout->addWidget(proxy_port_label,0,3); proxyPort = new KLineEdit(proxy_hlp); @@ -217,14 +217,14 @@ Freshklam::Freshklam(QWidget *parent, const char *name) 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_dir_layout->addWidget(proxy_user_label,1,0); proxyUser = new KLineEdit(proxy_hlp); proxy_dir_layout->addWidget(proxyUser,1,1); 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_dir_layout->addWidget(proxy_pass_label,1,3); proxyPass = new KLineEdit(proxy_hlp); @@ -234,11 +234,11 @@ Freshklam::Freshklam(QWidget *parent, const char *name) //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); - 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"); daemon_layout->addRowSpacing(0, 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); - QWidget *daemonhlp = new QWidget( daemon_group ); + TQWidget *daemonhlp = new TQWidget( daemon_group ); daemon_layout->addMultiCellWidget(daemonhlp, 1,1, 0,1); - QHBoxLayout *daemon_check_layout = new QHBoxLayout(daemonhlp, KDialog::spacingHint() ); - daemon_box = new QCheckBox(i18n("Update Virus Database Automatically"), daemonhlp); + TQHBoxLayout *daemon_check_layout = new TQHBoxLayout(daemonhlp, KDialog::spacingHint() ); + daemon_box = new TQCheckBox(i18n("Update Virus Database Automatically"), daemonhlp); daemon_box->setMinimumWidth(daemon_box->sizeHint().width()); daemon_check_layout->addSpacing(10); daemon_check_layout->addWidget(daemon_box); - check_combo = new QComboBox(false, daemonhlp); + check_combo = new TQComboBox(false, daemonhlp); check_combo->insertStrList(check_desc); if (!(config->readEntry("NoOfUpdates").isEmpty())) 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()); 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); actionbox->addStretch(); search_button = actionbox->addButton(i18n("&Update Now")); @@ -283,11 +283,11 @@ Freshklam::Freshklam(QWidget *parent, const char *name) actionbox->addStretch(); actionbox->layout(); - QFrame *status_frame = new QFrame(this); - status_frame->setFrameStyle(QFrame::Panel | QFrame::Sunken); - QBoxLayout *status_layout = new QHBoxLayout(status_frame, 2); + TQFrame *status_frame = new TQFrame(this); + status_frame->setFrameStyle(TQFrame::Panel | TQFrame::Sunken); + 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->activate(); @@ -318,14 +318,14 @@ void Freshklam::processOutput() { int pos; int pos2; - QString item2; + TQString item2; while (( (pos = buf.find('\n')) != -1) || ( (pos = buf.find(']')) != -1)) { - QString item = buf.left(pos); - QDate today = QDate::currentDate(); - QTime now = QTime::currentTime(); - QString suffix = QString("%1 %2") + TQString item = buf.left(pos); + TQDate today = TQDate::currentDate(); + TQTime now = TQTime::currentTime(); + TQString suffix = TQString("%1 %2") .arg(today.toString("ddd MMMM d yyyy")) .arg(now.toString("hh:mm:ss ap : ")); @@ -361,7 +361,7 @@ void Freshklam::processOutput() kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_update_required")); 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())){ @@ -374,7 +374,7 @@ void Freshklam::processOutput() updater->downloadComponent("clamav",version,"tar.gz"); } }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); cancel_button->setEnabled(true); - QString filepattern = dir_combo->url(); + TQString filepattern = dir_combo->url(); CollectionDB::instance()->insertEvent("Updates","Commencing DB Update", filepattern); @@ -395,9 +395,9 @@ void Freshklam::slotSearch() childproc = new KShellProcess(); - QString command = "freshclam --stdout "; + TQString command = "freshclam --stdout "; - QString user = KUser().loginName(); + TQString user = KUser().loginName(); command += " --user=" + user + " "; if (!(filepattern.isEmpty())){ @@ -424,7 +424,7 @@ void Freshklam::slotSearch() if (!(KApplication::kApplication()->isRestored())){ if (kmain->klamd->isKlamdAlive()){ - QString klamdconf = kmain->klamd->getKlamdConfFile(); + TQString klamdconf = kmain->klamd->getKlamdConfFile(); ////kdDebug() << klamdconf << endl; command += " --daemon-notify="; command += klamdconf; @@ -488,8 +488,8 @@ void Freshklam::finish() void Freshklam::updateMetaDB() { - QDate latestDate = QDate::fromString(CollectionDB::instance()->latestMetaDBDate(),Qt::ISODate); - QDate today = QDate::currentDate(); + TQDate latestDate = TQDate::fromString(CollectionDB::instance()->latestMetaDBDate(),TQt::ISODate); + TQDate today = TQDate::currentDate(); kdDebug() << latestDate << " " << today << endl; if (latestDate.daysTo(today) > 31){ @@ -618,29 +618,29 @@ void Freshklam::updateMailClient() KConfig* mailconfig = new KConfig("kmailrc"); mailconfig->setGroup("General"); - QVariant nooffilters = mailconfig->readEntry("filters"); + TQVariant nooffilters = mailconfig->readEntry("filters"); int result; int numfilters = nooffilters.toInt(); nooffilters = numfilters; for (int j=0; j != numfilters; j++ ){ - QVariant numb = j; - QString filtername=QString("Filter #%1").arg(numb.toString()); + TQVariant numb = j; + TQString filtername=TQString("Filter #%1").arg(numb.toString()); mailconfig->setGroup(filtername); - QString binary = mailconfig->readEntry("action-args-0"); + TQString binary = mailconfig->readEntry("action-args-0"); if (binary.find("klammail") != -1){ - QString pathonly = binary.section(" ",2,2); + TQString pathonly = binary.section(" ",2,2); if (pathonly == dir_combo->url()) break; if (binary.find(" " + dir_combo->url() + " ") == -1){ - QString 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" )); + 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'. "),TQString("New filter command: klammail -d %1").arg(dir_combo->url()),i18n( "Update KMail Filters" ),i18n( "Update" )); switch (result) { case 2 : KMessageBox::information (this,"KMail has not been updated with the new database location."); break; 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(); break; @@ -657,7 +657,7 @@ void Freshklam::updateMailClient() void Freshklam::receivedOutput(KProcess */*proc*/, char *buffer, int buflen) { //kdDebug() << buffer << endl; - buf += QCString(buffer, buflen+1); + buf += TQCString(buffer, buflen+1); processOutput(); } @@ -672,7 +672,7 @@ void Freshklam::slotClear() } -void Freshklam::setDirName(QString dir){ +void Freshklam::setDirName(TQString dir){ // dir_combo->setEditText(dir); dir_combo->setURL(dir); } @@ -692,20 +692,20 @@ void Freshklam::writeConf() //tf->setAutoDelete(TRUE); tempFileName = tf.name(); - QTextStream &ts = *(tf.textStream()); + TQTextStream &ts = *(tf.textStream()); ts << "DatabaseMirror database.clamav.net" << "\n"; ts << "DNSDatabaseInfo current.cvd.clamav.net" << "\n"; ts << "Foreground True" << "\n"; 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() ) { - ts << QString("HTTPProxyPort %1").arg(proxyPort->text()) << "\n"; + ts << TQString("HTTPProxyPort %1").arg(proxyPort->text()) << "\n"; } 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() ) { - 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(){ - QFile inf(pidFileName); + TQFile inf(pidFileName); if (!inf.open(IO_ReadOnly)) return false; - QTextStream is(&inf); - QString line; + TQTextStream is(&inf); + TQString line; while (!is.eof()) line = is.readLine(); inf.close(); @@ -822,18 +822,18 @@ void Freshklam::enableInputs(){ proxyPass->setEnabled(true); } -QString Freshklam::getCurrentDBDir(){ +TQString Freshklam::getCurrentDBDir(){ unsigned int ret= 0; unsigned int no = 0; struct cl_engine *engine = NULL; - QStringList lastDownloadPaths; - QString dbdir; - QString db; + TQStringList lastDownloadPaths; + TQString dbdir; + TQString db; config = KGlobal::config(); config->setGroup("Freshklam"); 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; } @@ -866,18 +866,18 @@ QString Freshklam::getCurrentDBDir(){ void Freshklam::createDBDir(){ - QString path = getenv("HOME"); + TQString path = getenv("HOME"); bool ok = true; // directory exist? path += "/.klamav"; - QDir klamavdir(path); + TQDir klamavdir(path); if (!klamavdir.exists() && !klamavdir.mkdir(path)) ok = false; path += "/database"; if (ok) { - QDir klamavqdir(path); + TQDir klamavqdir(path); if (!klamavqdir.exists() && !klamavqdir.mkdir(path)) ok = false; else @@ -885,7 +885,7 @@ void Freshklam::createDBDir(){ } if (ok){ - lastDownloadPaths.prepend( QString("%1").arg(path)); + lastDownloadPaths.prepend( TQString("%1").arg(path)); config = KGlobal::config(); config->setGroup("Freshklam"); 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){ 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; - QString suCommand=QString("clamscan -V"); + TQString suCommand=TQString("clamscan -V"); versionproc = new KProcIO(); versionproc->setUseShell(TRUE); @@ -1007,7 +1007,7 @@ void Freshklam::versionExited() void Freshklam::readVersionLine(KProcIO *) { - QString lineout = ""; + TQString lineout = ""; int pos; if ((pos = (versionproc->readln(lineout))) != -1) { @@ -1015,7 +1015,7 @@ void Freshklam::readVersionLine(KProcIO *) lineout = lineout.stripWhiteSpace(); int StartPoint = (lineout.find("ClamAV") + 6); int EndPoint = lineout.find("/"); - QString currentClamAVVersion = lineout.mid(StartPoint,(EndPoint - StartPoint)); + TQString currentClamAVVersion = lineout.mid(StartPoint,(EndPoint - StartPoint)); currentClamAVVersion = currentClamAVVersion.stripWhiteSpace(); KlamavConfig::setClamAVVersion(currentClamAVVersion); KlamavConfig::writeConfig(); diff --git a/src/freshklam.h b/src/freshklam.h index 1ee716d..96e1f99 100644 --- a/src/freshklam.h +++ b/src/freshklam.h @@ -27,12 +27,12 @@ using namespace KNetwork; class KPrinter; class KToggleAction; class KURL; -class QLineEdit; -class QComboBox; -class QCheckBox; -class QListBox; -class QPushButton; -class QLabel; +class TQLineEdit; +class TQComboBox; +class TQCheckBox; +class TQListBox; +class TQPushButton; +class TQLabel; class KProcess; class KConfig; class KURLRequester; @@ -50,14 +50,14 @@ class KlamavUpdate; * @author $AUTHOR <$EMAIL> * @version $APP_VERSION */ -class Freshklam : public QWidget +class Freshklam : public TQWidget { Q_OBJECT public: /** * Default Constructor */ - Freshklam(QWidget *parent, const char *name=0); + Freshklam(TQWidget *parent, const char *name=0); /** * Default Destructor @@ -67,18 +67,18 @@ public: /** * Use this method to load whatever file/URL you have */ - void setDirName(QString); - QString getCurrentDBDir(); + void setDirName(TQString); + TQString getCurrentDBDir(); bool isFreshklamAlive(); - QPushButton *search_button, *cancel_button; + TQPushButton *search_button, *cancel_button; void enableAutoUpdates(); protected: /** - * Overridden virtuals for Qt drag 'n drop (XDND) + * Overridden virtuals for TQt drag 'n drop (XDND) */ - /*virtual void dragEnterEvent(QDragEnterEvent *event); - virtual void dropEvent(QDropEvent *event);*/ + /*virtual void dragEnterEvent(TQDragEnterEvent *event); + virtual void dropEvent(TQDropEvent *event);*/ protected: /** @@ -106,7 +106,7 @@ private: signals: - void itemSelected(QString abs_filename, int line); + void itemSelected(TQString abs_filename, int line); public slots: @@ -145,52 +145,52 @@ private: void disableInputs(); bool killPID(); void createDBDir(); -/* void downloadComponent(QString component, QString version, QString extension);*/ - void startProgressDialog( const QString & text ); +/* void downloadComponent(TQString component, TQString version, TQString extension);*/ + void startProgressDialog( const TQString & text ); void checkInternet(); void connectToHost(); /* void checkForNewKlamAV();*/ void initCheckBoxes(); /* void getVersionFromLink( const DOM::Node &n ); - void completedSearchForUpdates(const QString &component, const QString &extension);*/ + void completedSearchForUpdates(const TQString &component, const TQString &extension);*/ void updateMetaDB(); -/* QString getMirror();*/ - QLineEdit *template_edit; - QComboBox *check_combo; +/* TQString getMirror();*/ + TQLineEdit *template_edit; + TQComboBox *check_combo; KURLRequester *dir_combo; KURLRequester *proxy_dir_combo; - QCheckBox *daemon_box; - QCheckBox* clamav_box; - QCheckBox* klamav_box; - QCheckBox *recursive_box; - QListBox *resultbox; - QLabel *status_label, *matches_label; + TQCheckBox *daemon_box; + TQCheckBox* clamav_box; + TQCheckBox* klamav_box; + TQCheckBox *recursive_box; + TQListBox *resultbox; + TQLabel *status_label, *matches_label; KProcess *childproc; KProcIO *versionproc; - QString buf; + TQString buf; KConfig* config; - QStringList lastSearchItems; - QStringList lastDownloadPaths; + TQStringList lastSearchItems; + TQStringList lastDownloadPaths; KLineEdit *proxyIP; KLineEdit *proxyPort; KLineEdit *proxyUser; KLineEdit *proxyPass; - QString tempFileName; - QString errorMessage; - QString pidFileName; + TQString tempFileName; + TQString errorMessage; + TQString pidFileName; bool freshklamAlive; KProgressDialog *progressDialog; - QTimer *timer; + TQTimer *timer; /* bool upgradeinprogress;*/ bool checkingDirectly; /* double highestsofarnumeric; - QString highestsofarraw; - QString highestsofarfilename;*/ + TQString highestsofarraw; + TQString highestsofarfilename;*/ KResolver m_resolver; -/* QString currentClamAVVersion; +/* TQString currentClamAVVersion; KHTMLPart *filelist;*/ - QPushButton *clamav_options; - QPushButton *klamav_options; + TQPushButton *clamav_options; + TQPushButton *klamav_options; // private: // KDirLister clamav_lister; diff --git a/src/k3bjobprogressosd_mod.cpp b/src/k3bjobprogressosd_mod.cpp index a531c64..1431bf3 100644 --- a/src/k3bjobprogressosd_mod.cpp +++ b/src/k3bjobprogressosd_mod.cpp @@ -29,15 +29,15 @@ #include #include -#include -#include -#include +#include +#include +#include #include -K3bJobProgressOSD::K3bJobProgressOSD( QWidget* parent, const char* name ) - : QWidget( parent, name, WType_TopLevel | WNoAutoErase | WStyle_Customize | WX11BypassWM | WStyle_StaysOnTop ), +K3bJobProgressOSD::K3bJobProgressOSD( TQWidget* parent, const char* name ) + : TQWidget( parent, name, WType_TopLevel | WNoAutoErase | WStyle_Customize | WX11BypassWM | WStyle_StaysOnTop ), m_dirty(true), m_dragging(false), m_screen(0), @@ -67,11 +67,11 @@ void K3bJobProgressOSD::show() if( m_dirty ) renderOSD(); - QWidget::show(); + TQWidget::show(); } -void K3bJobProgressOSD::setText( const QString& text ) +void K3bJobProgressOSD::setText( const TQString& text ) { if( 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; reposition(); @@ -115,39 +115,39 @@ void K3bJobProgressOSD::renderOSD() // ---------------------------------------- // 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 textWidth = fontMetrics().width( m_text ); // 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() ), - QMAX( 2*margin + icon.height(), 2*margin + fontMetrics().height()*2 ) ); + TQSize newSize( TQMAX( TQMAX( 2*margin + icon.width() + margin + textWidth, 100 ), width() ), + TQMAX( 2*margin + icon.height(), 2*margin + fontMetrics().height()*2 ) ); 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 - QRect thisRect( 0, 0, newSize.width(), newSize.height() ); - p.fillRect( thisRect, Qt::white ); + TQRect thisRect( 0, 0, newSize.width(), newSize.height() ); + p.fillRect( thisRect, TQt::white ); p.drawRect( thisRect ); // draw the k3b icon p.drawPixmap( margin, (newSize.height()-icon.height())/2, icon ); // draw the text - QSize textSize = fontMetrics().size( 0, m_text ); + TQSize textSize = fontMetrics().size( 0, m_text ); int textX = 2*margin + icon.width(); int textY = margin + fontMetrics().ascent(); p.drawText( textX, textY, m_text ); // draw the progress 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 ); 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( newSize ); @@ -160,19 +160,19 @@ void K3bJobProgressOSD::renderOSD() void K3bJobProgressOSD::setScreen( int screen ) { - const int n = QApplication::desktop()->numScreens(); + const int n = TQApplication::desktop()->numScreens(); m_screen = (screen >= n) ? n-1 : screen; reposition(); } -void K3bJobProgressOSD::reposition( QSize newSize ) +void K3bJobProgressOSD::reposition( TQSize newSize ) { if( !newSize.isValid() ) newSize = size(); - QPoint newPos = m_position; - const QRect& screen = QApplication::desktop()->screenGeometry( m_screen ); + TQPoint newPos = m_position; + const TQRect& screen = TQApplication::desktop()->screenGeometry( m_screen ); // now to properly resize if put into one of the corners we interpret the position // 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 ); } -void K3bJobProgressOSD::mousePressEvent( QMouseEvent* e ) +void K3bJobProgressOSD::mousePressEvent( TQMouseEvent* e ) { m_dragOffset = e->pos(); @@ -219,7 +219,7 @@ void K3bJobProgressOSD::mousePressEvent( QMouseEvent* e ) } -void K3bJobProgressOSD::mouseReleaseEvent( QMouseEvent* ) +void K3bJobProgressOSD::mouseReleaseEvent( TQMouseEvent* ) { if( m_dragging ) { 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() ) { // 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 ) 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 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); - const QRect& screen = QApplication::desktop()->screenGeometry( m_screen ); + TQPoint p(pp); + const TQRect& screen = TQApplication::desktop()->screenGeometry( m_screen ); int maxY = screen.height() - height() - s_outerMargin; int maxX = screen.width() - width() - s_outerMargin; @@ -281,7 +281,7 @@ QPoint K3bJobProgressOSD::fixupPosition( const QPoint& pp ) void K3bJobProgressOSD::readSettings( KConfigBase* c ) { - QString oldGroup = c->group(); + TQString oldGroup = c->group(); c->setGroup( "KlamOSD Position" ); setPosition( c->readPointEntry( "Position", 0 ) ); @@ -293,7 +293,7 @@ void K3bJobProgressOSD::readSettings( KConfigBase* c ) void K3bJobProgressOSD::saveSettings( KConfigBase* c ) { - QString oldGroup = c->group(); + TQString oldGroup = c->group(); c->setGroup( "KlamOSD Position" ); c->writeEntry( "Position", m_position ); diff --git a/src/k3bjobprogressosd_mod.h b/src/k3bjobprogressosd_mod.h index 8b4ffb1..123f43a 100644 --- a/src/k3bjobprogressosd_mod.h +++ b/src/k3bjobprogressosd_mod.h @@ -16,11 +16,11 @@ #ifndef _K3B_JOB_PROGRESS_OSD_H_ #define _K3B_JOB_PROGRESS_OSD_H_ -#include -#include +#include +#include -class QPaintEvent; -class QMouseEvent; +class TQPaintEvent; +class TQMouseEvent; class KConfigBase; /** @@ -28,23 +28,23 @@ class KConfigBase; * * Insprired by Amarok's OSD (I also took a bit of their code. :) */ -class K3bJobProgressOSD : public QWidget +class K3bJobProgressOSD : public TQWidget { Q_OBJECT public: - K3bJobProgressOSD( QWidget* parent = 0, const char* name = 0 ); + K3bJobProgressOSD( TQWidget* parent = 0, const char* name = 0 ); ~K3bJobProgressOSD(); int screen() const { return m_screen; } - const QPoint& position() const { return m_position; } + const TQPoint& position() const { return m_position; } void readSettings( KConfigBase* ); void saveSettings( KConfigBase* ); public slots: void setScreen( int ); - void setText( const QString& ); + void setText( const TQString& ); void setProgress( int ); /** @@ -53,34 +53,34 @@ class K3bJobProgressOSD : public QWidget * If for example the x coordinate is bigger than half the screen * width it refers to the left edge of the widget. */ - void setPosition( const QPoint& ); + void setPosition( const TQPoint& ); void show(); protected: - void paintEvent( QPaintEvent* ); - void mousePressEvent( QMouseEvent* ); - void mouseReleaseEvent( QMouseEvent* ); - void mouseMoveEvent( QMouseEvent* ); + void paintEvent( TQPaintEvent* ); + void mousePressEvent( TQMouseEvent* ); + void mouseReleaseEvent( TQMouseEvent* ); + void mouseMoveEvent( TQMouseEvent* ); void renderOSD(); void refresh(); - void reposition( QSize size = QSize() ); + void reposition( TQSize size = TQSize() ); private: /** * Ensure that the position is inside m_screen */ - QPoint fixupPosition( const QPoint& p ); + TQPoint fixupPosition( const TQPoint& p ); static const int s_outerMargin = 15; - QPixmap m_osdBuffer; + TQPixmap m_osdBuffer; bool m_dirty; - QString m_text; + TQString m_text; int m_progress; bool m_dragging; - QPoint m_dragOffset; + TQPoint m_dragOffset; int m_screen; - QPoint m_position; + TQPoint m_position; }; #endif diff --git a/src/klamav.cpp b/src/klamav.cpp index 282b117..4778c11 100644 --- a/src/klamav.cpp +++ b/src/klamav.cpp @@ -21,16 +21,16 @@ #include -#include -#include +#include +#include #include #include #include #include #include -#include -#include +#include +#include Klamav *kmain = 0L; @@ -44,8 +44,8 @@ Klamav::Klamav() downloadClamAVForWizard = false; kmain = this; - QVBoxLayout *top = new QVBoxLayout(this,10,10); - tab = new QTabWidget(this); + TQVBoxLayout *top = new TQVBoxLayout(this,10,10); + tab = new TQTabWidget(this); _tray = new KSystemTray(kmain, "klamav tray"); _tray->setPixmap(KSystemTray::loadIcon("klamav_on_acc_disabled")); @@ -63,7 +63,7 @@ Klamav::Klamav() EnableKlamd->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(); DisableFreshklam->setEnabled(FALSE); @@ -73,10 +73,10 @@ Klamav::Klamav() KConfig* config = KGlobal::config(); config->setGroup("Freshklam"); - QStringList DatabasePaths = config->readListEntry("lastDownloadPaths"); + TQStringList DatabasePaths = config->readListEntry("lastDownloadPaths"); config->setGroup("Kuarantine"); - QStringList QuarantinePaths = config->readListEntry("KuarantineLocations"); + TQStringList QuarantinePaths = config->readListEntry("KuarantineLocations"); if ((DatabasePaths.isEmpty()) && (QuarantinePaths.isEmpty())){ @@ -122,14 +122,14 @@ Klamav::Klamav() 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()); if (KApplication::kApplication()->isRestored()){ /* config = KGlobal::config(); config->setGroup("Klamd"); - QString RunKlamd = config->readEntry("Enabled"); + TQString RunKlamd = config->readEntry("Enabled"); if (RunKlamd == "Yes"){ _tray->setPixmap(KSystemTray::loadIcon("klamav")); @@ -156,7 +156,7 @@ Klamav::Klamav() 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() @@ -244,43 +244,43 @@ void Klamav::firstRunWizard() { FirstRunWizard wizard; wizard.setCaption( i18n( "First-Run Wizard" )); - QString homepath = getenv("HOME"); - QString defaultdb = homepath + "/.klamav/database"; - QString defaultquar = homepath + "/.klamav/quarantine"; - if( wizard.exec() != QDialog::Rejected ){ + TQString homepath = getenv("HOME"); + TQString defaultdb = homepath + "/.klamav/database"; + TQString defaultquar = homepath + "/.klamav/quarantine"; + if( wizard.exec() != TQDialog::Rejected ){ KConfig* config = KGlobal::config(); config->setGroup("Freshklam"); - QString wizardDBPath = wizard.databasePath().path(-1); - QString wizardQRPath = wizard.quarantinePath().path(-1); + TQString wizardDBPath = wizard.databasePath().path(-1); + TQString wizardTQRPath = wizard.quarantinePath().path(-1); /* kdDebug() << wizard.databasePath() << endl; kdDebug() << wizard.defaultDatabasePath() << endl;*/ //Configure Database Path - QStringList lastDownloadPaths; - if ((wizardDBPath != "") && (QDir::cleanDirPath(wizardDBPath) != defaultdb)){ - lastDownloadPaths.prepend( QString("%1").arg(wizardDBPath)); + TQStringList lastDownloadPaths; + if ((wizardDBPath != "") && (TQDir::cleanDirPath(wizardDBPath) != defaultdb)){ + lastDownloadPaths.prepend( TQString("%1").arg(wizardDBPath)); checkDir(wizardDBPath); }else{ - lastDownloadPaths.prepend( QString("%1").arg(wizard.defaultDatabasePath())); + lastDownloadPaths.prepend( TQString("%1").arg(wizard.defaultDatabasePath())); createDefaultKlamAVDir("database"); } config->writeEntry("lastDownloadPaths", lastDownloadPaths); config->sync(); //Configure Quarantine Path - QStringList lastQuarLocations; + TQStringList lastQuarLocations; config->setGroup("Kuarantine"); /* kdDebug() << wizard.quarantinePath() << endl; kdDebug() << wizard.defaultQuarantinePath() << endl; kdDebug() << defaultquar << endl;*/ - if ((wizardQRPath != "") && (QDir::cleanDirPath(wizardQRPath) != defaultquar)){ - lastQuarLocations.prepend( QString("%1").arg(wizardQRPath)); - checkDir(wizardQRPath); + if ((wizardTQRPath != "") && (TQDir::cleanDirPath(wizardTQRPath) != defaultquar)){ + lastQuarLocations.prepend( TQString("%1").arg(wizardTQRPath)); + checkDir(wizardTQRPath); }else{ - lastQuarLocations.prepend( QString("%1").arg(wizard.defaultQuarantinePath())); + lastQuarLocations.prepend( TQString("%1").arg(wizard.defaultQuarantinePath())); createDefaultKlamAVDir("quarantine"); } 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; // directory exist? path += "/.klamav"; - QDir klamavdir(path); + TQDir klamavdir(path); if (!klamavdir.exists() && !klamavdir.mkdir(path)) ok = false; path += "/" + type; if (ok) { - QDir klamavqdir(path); + TQDir klamavqdir(path); if (!klamavqdir.exists() && !klamavqdir.mkdir(path)) ok = false; else @@ -321,17 +321,17 @@ void Klamav::createDefaultKlamAVDir(QString type){ } -void Klamav::checkDir(QString path){ +void Klamav::checkDir(TQString path){ - QDir klamavdir(path); - QFile f1( path ); + TQDir klamavdir(path); + TQFile f1( path ); 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)); f1.close(); } -void Klamav::slotConfigKlamav( const QCString& page ) +void Klamav::slotConfigKlamav( const TQCString& page ) { KlamavConfigDialog* dialog = (KlamavConfigDialog*) KConfigDialog::exists( "settings" ); diff --git a/src/klamav.h b/src/klamav.h index e543a70..80552fa 100644 --- a/src/klamav.h +++ b/src/klamav.h @@ -11,19 +11,19 @@ #include #include -#include +#include #include class KPrinter; class KToggleAction; class KURL; -class QLineEdit; -class QComboBox; -class QCheckBox; -class QListBox; -class QPushButton; -class QLabel; +class TQLineEdit; +class TQComboBox; +class TQCheckBox; +class TQListBox; +class TQPushButton; +class TQLabel; class KProcess; class KConfig; class KURLRequester; @@ -63,7 +63,7 @@ public: /** * Use this method to load whatever file/URL you have */ - void setDirName(QString); + void setDirName(TQString); KlamavDock *m_dock; KSystemTray *_tray; @@ -82,15 +82,15 @@ public: Activityviewer *activityviewer; void showVirusBrowser(); void resetAutoScan(); - QTabWidget *tab; + TQTabWidget *tab; protected: /** - * Overridden virtuals for Qt drag 'n drop (XDND) + * Overridden virtuals for TQt drag 'n drop (XDND) */ - /*virtual void dragEnterEvent(QDragEnterEvent *event); - virtual void dropEvent(QDropEvent *event);*/ + /*virtual void dragEnterEvent(TQDragEnterEvent *event); + virtual void dropEvent(TQDropEvent *event);*/ virtual bool queryClose(); @@ -111,7 +111,7 @@ protected: public slots: void contextDisable(); void clamdStopped(); - void slotConfigKlamav( const QCString& page ); + void slotConfigKlamav( const TQCString& page ); private slots: void contextEnable(); void contextEnableFK(); @@ -122,8 +122,8 @@ private: void setupAccel(); void setupActions(); void firstRunWizard(); - void createDefaultKlamAVDir(QString type); - void checkDir(QString path); + void createDefaultKlamAVDir(TQString type); + void checkDir(TQString path); private: //KlamavView *m_view; @@ -131,7 +131,7 @@ private: signals: - void itemSelected(QString abs_filename, int line); + void itemSelected(TQString abs_filename, int line); public slots: private slots: @@ -141,18 +141,18 @@ private: void finish(); void getout(); - QLineEdit *template_edit; - QComboBox *files_combo, *pattern_combo/*, *dir_combo*/; + TQLineEdit *template_edit; + TQComboBox *files_combo, *pattern_combo/*, *dir_combo*/; KURLRequester *dir_combo; - QCheckBox *recursive_box; - QListBox *resultbox; - QPushButton *search_button, *cancel_button; - QLabel *status_label, *matches_label; + TQCheckBox *recursive_box; + TQListBox *resultbox; + TQPushButton *search_button, *cancel_button; + TQLabel *status_label, *matches_label; KProcess *childproc; - QString buf; + TQString buf; KConfig* config; - QStringList lastSearchItems; - QStringList lastSearchPaths; + TQStringList lastSearchItems; + TQStringList lastSearchPaths; Sigtool *sigtool; Aboutklamav *aboutklamav; diff --git a/src/klamav_run.cpp b/src/klamav_run.cpp index 8f011c1..ab32cd4 100644 --- a/src/klamav_run.cpp +++ b/src/klamav_run.cpp @@ -12,7 +12,7 @@ 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) { m_viewer=viewer; @@ -26,7 +26,7 @@ BrowserRun::~BrowserRun() //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" ) m_viewer->openPage(url()); diff --git a/src/klamav_run.h b/src/klamav_run.h index 1914508..0e9280f 100644 --- a/src/klamav_run.h +++ b/src/klamav_run.h @@ -19,11 +19,11 @@ namespace KlamAV { Q_OBJECT public: - BrowserRun(Viewer *, QWidget *, KParts::ReadOnlyPart *, const KURL & , const KParts::URLArgs &); + BrowserRun(Viewer *, TQWidget *, KParts::ReadOnlyPart *, const KURL & , const KParts::URLArgs &); virtual ~BrowserRun(); protected: - virtual void foundMimeType( const QString & _type ); + virtual void foundMimeType( const TQString & _type ); private slots: void killMyself(); diff --git a/src/klamd.cpp b/src/klamd.cpp index 55a934d..f8b6c89 100644 --- a/src/klamd.cpp +++ b/src/klamd.cpp @@ -18,15 +18,15 @@ #include -#include +#include #include #include #include -#include +#include #include #include #include -#include +#include #include @@ -46,8 +46,8 @@ const char *check_desc2[] = { }; -Klamd::Klamd(QWidget *_parent, const char *name) - : QWidget(_parent, name) +Klamd::Klamd(TQWidget *_parent, const char *name) + : TQWidget(_parent, name) { parent = _parent; @@ -57,24 +57,24 @@ Klamd::Klamd(QWidget *_parent, const char *name) //Data Directory Widget - //QString dt = QDateTime::currentDateTime().toString(); + //TQString dt = TQDateTime::currentDateTime().toString(); //KMessageBox::information (this,dt); - QVBoxLayout *vbox = new QVBoxLayout(this, KDialog::marginHint(), + TQVBoxLayout *vbox = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint(), "vbox"); - QGroupBox *group = new QGroupBox(i18n("Include Directories"), this); + TQGroupBox *group = new TQGroupBox(i18n("Include Directories"), this); vbox->addWidget(group); - QGridLayout *layout = new QGridLayout( group, 9, 3, KDialog::spacingHint(), + TQGridLayout *layout = new TQGridLayout( group, 9, 3, KDialog::spacingHint(), KDialog::spacingHint(), "layout"); layout->addRowSpacing(0, group->fontMetrics().height()); layout->setColStretch(0, 1); layout->setColStretch(1, 1); - hlp = new QWidget( group ); + hlp = new TQWidget( group ); 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( "/" ); m_fileTreeView = new KFileTreeView( hlp ); @@ -113,19 +113,19 @@ Klamd::Klamd(QWidget *_parent, const char *name) dir_layout->addWidget(btndown); dir_layout->addWidget(sessionslb); - QGroupBox *group2 = new QGroupBox(i18n("Exclude Directories"), this); + TQGroupBox *group2 = new TQGroupBox(i18n("Exclude Directories"), this); vbox->addWidget(group2); - QGridLayout *layout2 = new QGridLayout( group2, 9, 3, KDialog::spacingHint(), + TQGridLayout *layout2 = new TQGridLayout( group2, 9, 3, KDialog::spacingHint(), KDialog::spacingHint(), "layout2"); layout2->addRowSpacing(0, group2->fontMetrics().height()); layout2->setColStretch(0, 1); layout2->setColStretch(1, 1); - hlp2 = new QWidget( group2 ); + hlp2 = new TQWidget( group2 ); 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( "/" ); m_fileTreeView2 = new KFileTreeView( hlp2 ); @@ -161,21 +161,21 @@ Klamd::Klamd(QWidget *_parent, const char *name) dir_layout2->addWidget(btndown2); dir_layout2->addWidget(sessionslb2); - QGroupBox *group3 = new QGroupBox(i18n("Options"), this); + TQGroupBox *group3 = new TQGroupBox(i18n("Options"), this); vbox->addWidget(group3); - QGridLayout *layout3 = new QGridLayout( group3, 9, 10, KDialog::spacingHint(), + TQGridLayout *layout3 = new TQGridLayout( group3, 9, 10, KDialog::spacingHint(), KDialog::spacingHint(), "layout3"); layout3->addRowSpacing(0, group3->fontMetrics().height()); //layout3->setColStretch(0, 1); //layout3->setColStretch(1, 1); - hlp3 = new QWidget( group3 ); + hlp3 = new TQWidget( group3 ); 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()); if ((config->readEntry("Quarantine")) == "Yes") @@ -187,7 +187,7 @@ Klamd::Klamd(QWidget *_parent, const char *name) //dir_layout3->addSpacing(10); 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()); if ((config->readEntry("Warn")) == "Yes") @@ -199,7 +199,7 @@ Klamd::Klamd(QWidget *_parent, const char *name) //dir_layout3->addSpacing(10); 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()); if ((config->readEntry("Run Docked")) == "Yes") @@ -211,11 +211,11 @@ Klamd::Klamd(QWidget *_parent, const char *name) dir_layout3->addWidget(recursive_box2); 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()); dir_layout3->addWidget(combo_label); - check_combo = new QComboBox(false, hlp3); + check_combo = new TQComboBox(false, hlp3); check_combo->insertStrList(check_desc1); check_combo->adjustSize(); //check_combo->setFixedSize(check_combo->size()); @@ -224,33 +224,33 @@ Klamd::Klamd(QWidget *_parent, const char *name) 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->setTextLabel("Options"); - adv_options->setTextPosition(QToolButton::Right); + adv_options->setTextPosition(TQToolButton::Right); adv_options->setUsesTextLabel(true); -// adv_options = new QPushButton ("Advanced", hlp3); +// adv_options = new TQPushButton ("Advanced", hlp3); dir_layout3->addWidget(adv_options); //adv_options->setFixedSize(adv_options->sizeHint()); connect( adv_options, SIGNAL(clicked()), SLOT(slotAdvOptions()) ); -/* QLabel *combo_label2 = new QLabel(i18n("Scan:"), hlp3); +/* TQLabel *combo_label2 = new TQLabel(i18n("Scan:"), hlp3); combo_label2->setFixedSize(combo_label2->sizeHint()); dir_layout3->addWidget(combo_label2); - check_combo2 = new QComboBox(false, hlp3); + check_combo2 = new TQComboBox(false, hlp3); check_combo2->insertStrList(check_desc2); check_combo2->adjustSize(); check_combo2->setFixedSize(check_combo2->size()); 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); actionbox->addStretch(); search_button = actionbox->addButton(i18n("&Enable Auto-Scan")); @@ -301,8 +301,8 @@ void Klamd::processOutput() item2 = item2.stripWhiteSpace(); int fnameStartPoint = (item2.find(":") + 1); int fnameEndPoint = item2.findRev(":"); - QString tmpFName = item2.mid(fnameStartPoint,(fnameEndPoint - fnameStartPoint)); - QString tmpVirusName = item2.mid((fnameEndPoint+1),(item2.length() - (fnameEndPoint+1))); + TQString tmpFName = item2.mid(fnameStartPoint,(fnameEndPoint - fnameStartPoint)); + TQString tmpVirusName = item2.mid((fnameEndPoint+1),(item2.length() - (fnameEndPoint+1))); tmpVirusName.replace("FOUND",""); CollectionDB::instance()->insertEvent("Virus Found",tmpVirusName,tmpFName); if (recursive_box1->isChecked()) @@ -412,7 +412,7 @@ void Klamd::childExited() void Klamd::receivedOutput(KProcIO *) { - //buf += QCString(buffer, buflen+1); + //buf += TQCString(buffer, buflen+1); processOutput(); } @@ -424,7 +424,7 @@ void Klamd::slotClear() } -void Klamd::setDirName(QString dir){ +void Klamd::setDirName(TQString dir){ // dir_combo->setEditText(dir); dir_combo->setURL(dir); } @@ -433,7 +433,7 @@ void Klamd::slotAddIncludeDir() { KURL filepattern = m_fileTreeView->currentURL(); - QString filepa = filepattern.path(); + TQString filepa = filepattern.path(); if(filepa) if ((includePaths.contains(filepa) == 0) && (excludePaths.contains(filepa) == 0)){ sessionslb->insertItem(filepa); @@ -482,7 +482,7 @@ void Klamd::slotAddExcludeDir() //KFileTreeViewItem* treeItem = dynamic_cast(KFileTreeViewItem::currentKFileTreeViewItem()); KURL filepattern = m_fileTreeView2->currentURL(); - QString filepa = filepattern.path(); + TQString filepa = filepattern.path(); if(filepa) if ((includePaths.contains(filepa) == 0) && (excludePaths.contains(filepa) == 0)){ sessionslb2->insertItem(filepa); @@ -537,30 +537,30 @@ void Klamd::writeConf() //config = KGlobal::config(); config->setGroup("Kuarantine"); - QStringList lastQuarLocations = config->readListEntry("KuarantineLocations"); - QString quarloc; - for (QStringList::Iterator ita = lastQuarLocations.begin(); ita == lastQuarLocations.begin() ; ita++){ + TQStringList lastQuarLocations = config->readListEntry("KuarantineLocations"); + TQString quarloc; + for (TQStringList::Iterator ita = lastQuarLocations.begin(); ita == lastQuarLocations.begin() ; ita++){ quarloc = *ita; } - QString db = kmain->freshklam->getCurrentDBDir(); + TQString db = kmain->freshklam->getCurrentDBDir(); //tf->setAutoDelete(TRUE); 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 << "ClamukoExcludePath " <firstItem() ; bi != 0; bi = bi->next() ) + for ( TQListBoxItem *bi = sessionslb2->firstItem() ; bi != 0; bi = bi->next() ) ts << "ClamukoExcludePath " << bi->text() << "\n"; config->setGroup("Klamd"); @@ -577,7 +577,7 @@ void Klamd::writeConf() ts << "ScanArchive" << "\n"; ts << "FixStaleSocket" << "\n"; ts << "SelfCheck 1800" << "\n"; - ts << QString("DatabaseDirectory %1").arg(db) << "\n"; + ts << TQString("DatabaseDirectory %1").arg(db) << "\n"; ts << "ClamukoScanOnLine" << "\n"; if (KlamavConfig::executed()) @@ -592,7 +592,7 @@ void Klamd::writeConf() ts << "ScanArchive True" << "\n"; ts << "FixStaleSocket True" << "\n"; ts << "SelfCheck 1800" << "\n"; - ts << QString("DatabaseDirectory %1").arg(db) << "\n"; + ts << TQString("DatabaseDirectory %1").arg(db) << "\n"; ts << "ClamukoScanOnAccess True" << "\n"; if (KlamavConfig::executed()) @@ -605,39 +605,39 @@ void Klamd::writeConf() ts << "ClamukoScanOnClose True" << "\n"; } - QString curtex = check_combo->currentText(); + TQString curtex = check_combo->currentText(); ts << "ClamukoMaxFileSize " << curtex << "M\n"; tf.close(); } -void Klamd::Quarantine(QString fname, QString virusname){ +void Klamd::Quarantine(TQString fname, TQString virusname){ //config = KGlobal::config(); config->setGroup("Kuarantine"); //object.replace("Clamuko:",""); //object = object.stripWhiteSpace(); ////kdDebug() << object << endl; - //QString QuarLocation = config->readEntry("KuarantineLocations"); - QStringList lastQuarLocations = config->readListEntry("KuarantineLocations"); + //TQString QuarLocation = config->readEntry("KuarantineLocations"); + TQStringList lastQuarLocations = config->readListEntry("KuarantineLocations"); - QString quarloc; - for (QStringList::Iterator it = lastQuarLocations.begin(); it == lastQuarLocations.begin() ; it++){ + TQString quarloc; + for (TQStringList::Iterator it = lastQuarLocations.begin(); it == lastQuarLocations.begin() ; it++){ quarloc = *it; } - lastQuarItems = config->readListEntry(QString("Items %1").arg(quarloc)); + lastQuarItems = config->readListEntry(TQString("Items %1").arg(quarloc)); if (!(fname.isEmpty())){ - QDate today = QDate::currentDate(); - QTime now = QTime::currentTime(); - QString suffix = QString(":%1 %2") + TQDate today = TQDate::currentDate(); + TQTime now = TQTime::currentTime(); + TQString suffix = TQString(":%1 %2") .arg(today.toString("ddd MMMM d yyyy")) .arg(now.toString("hh-mm-ss ap")); - QString object = fname + ": " + virusname + suffix; - QStringList tokens = QStringList::split ( "/", fname, FALSE ); - QString qname = tokens.last(); + TQString object = fname + ": " + virusname + suffix; + TQStringList tokens = TQStringList::split ( "/", fname, FALSE ); + TQString qname = tokens.last(); qname.prepend("/"); qname.prepend(quarloc); qname.append(suffix); @@ -646,7 +646,7 @@ void Klamd::Quarantine(QString fname, QString virusname){ //kdDebug() << qname << endl; //kdDebug() << object << endl; 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; proc = new KProcIO(); proc->setUseShell(TRUE); @@ -667,7 +667,7 @@ void Klamd::Quarantine(QString fname, QString virusname){ }else{ if (recursive_box1->isChecked()) - KMessageBox::queuedMessageBox(0, KMessageBox::Information, i18n("

    Infected file found:

    Filename: %1
    Virus found: %2

    I'm going to quarantine this file. You can restore it later if you want.

    ").arg(fname).arg(QString(virusname).replace("FOUND","")), + KMessageBox::queuedMessageBox(0, KMessageBox::Information, i18n("

    Infected file found:

    Filename: %1
    Virus found: %2

    I'm going to quarantine this file. You can restore it later if you want.

    ").arg(fname).arg(TQString(virusname).replace("FOUND","")), //i18n( "Infected File Found!" ), //i18n( "Quarantine" ) 0); @@ -680,7 +680,7 @@ void Klamd::Quarantine(QString fname, QString virusname){ }else{ //kdDebug() << "rename worked" << endl; if (recursive_box1->isChecked()) - KMessageBox::queuedMessageBox(0, KMessageBox::Information, i18n("

    Infected file found:

    Filename: %1
    Virus found: %2

    I'm going to quarantine this file. You can restore it later if you want.
    If the file already exists in the quarantine directory it will be overwritten.

    ").arg(fname).arg(QString(virusname).replace("FOUND","")), + KMessageBox::queuedMessageBox(0, KMessageBox::Information, i18n("

    Infected file found:

    Filename: %1
    Virus found: %2

    I'm going to quarantine this file. You can restore it later if you want.
    If the file already exists in the quarantine directory it will be overwritten.

    ").arg(fname).arg(TQString(virusname).replace("FOUND","")), //i18n( "Infected File Found!" ), //i18n( "Quarantine" ) 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(); //kmain->kuarantine->refresh(); @@ -705,7 +705,7 @@ void Klamd::receivedmvOutput(KProcIO *) mvbuffer = ""; proc->readln(mvbuffer); - bufmv += QString(mvbuffer); + bufmv += TQString(mvbuffer); } @@ -714,9 +714,9 @@ int Klamd::runDazuko(bool caller){ dazukoLoaded = FALSE; - QString lsmodCommand="lsmod"; + TQString lsmodCommand="lsmod"; 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"); @@ -767,12 +767,12 @@ void Klamd::loadKlamd() klamdAlive = TRUE; - //QString suCommand=QString("kdesu -t -c '" +clamdcommand+" -c '%1'").arg(tempFileName)+"'"; - QString suCommand=QString(clamdcommand+" -c '%1'").arg(tempFileName); + //TQString suCommand=TQString("kdesu -t -c '" +clamdcommand+" -c '%1'").arg(tempFileName)+"'"; + TQString suCommand=TQString(clamdcommand+" -c '%1'").arg(tempFileName); childproc = new KProcIO(); childproc->setUseShell(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"); kdDebug() << suCommand << endl; @@ -814,15 +814,15 @@ void Klamd::loadDazuko() // return; // } // -// QString release = QString(info.release); +// TQString release = TQString(info.release); // // //kdDebug() << release << endl; -// QString insmodCommand="insmod /lib/modules/" + release + "/dazuko.o"; - QString insmodCommand="modprobe dazuko"; - //QString insmodCommand="insmod /opt/kde/bin/dazuko.o"; +// TQString insmodCommand="insmod /lib/modules/" + release + "/dazuko.o"; + TQString insmodCommand="modprobe dazuko"; + //TQString insmodCommand="insmod /opt/kde/bin/dazuko.o"; 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->setUseShell(TRUE); @@ -861,7 +861,7 @@ void Klamd::lsmodCheck() void Klamd::checkForDazuko() { - QString item = ""; + TQString item = ""; int pos; pos = lsmodproc->readln(item,TRUE); //KMessageBox::information (this,item); @@ -880,7 +880,7 @@ void Klamd::restoreKlamd(){ config = KGlobal::config(); config->setGroup("Klamd"); - QString RunKlamd = config->readEntry("Enabled"); + TQString RunKlamd = config->readEntry("Enabled"); if (RunKlamd == "Yes"){ startKlamd(); @@ -918,7 +918,7 @@ bool Klamd::isKlamdAlive(){ } -QString Klamd::getKlamdConfFile(){ +TQString Klamd::getKlamdConfFile(){ return tempFileName; } @@ -927,7 +927,7 @@ void Klamd::slotAdvOptions(){ /* config = KGlobal::config(); config->setGroup("Klamd"); - QString RunKlamd = config->readEntry("Enabled"); + TQString RunKlamd = config->readEntry("Enabled"); KlamdOptions *dialog = new KlamdOptions( this, "settings"); diff --git a/src/klamd.h b/src/klamd.h index 8d11e0b..66f8d71 100644 --- a/src/klamd.h +++ b/src/klamd.h @@ -11,8 +11,8 @@ #include #include -#include -#include +#include +#include #include "kfiletreeview.h" @@ -20,12 +20,12 @@ class KPrinter; class KToggleAction; class KURL; -class QLineEdit; -class QComboBox; -class QCheckBox; -class QListBox; -class QPushButton; -class QLabel; +class TQLineEdit; +class TQComboBox; +class TQCheckBox; +class TQListBox; +class TQPushButton; +class TQLabel; class KProcess; class KConfig; class KURLRequester; @@ -34,11 +34,11 @@ class KArrowButton; class KProcIO; class KSystemTray; -class MyListBox : public QListBox +class MyListBox : public TQListBox { public: - MyListBox(QWidget *parent) : QListBox(parent) {} + MyListBox(TQWidget *parent) : TQListBox(parent) {} bool isItemVisible(int id) { return itemVisible(id); } }; @@ -50,14 +50,14 @@ public: * @author $AUTHOR <$EMAIL> * @version $APP_VERSION */ -class Klamd : public QWidget +class Klamd : public TQWidget { Q_OBJECT public: /** * Default Constructor */ - Klamd(QWidget *parent, const char *name=0); + Klamd(TQWidget *parent, const char *name=0); /** * Default Destructor @@ -67,9 +67,9 @@ public: /** * Use this method to load whatever file/URL you have */ - void setDirName(QString); + void setDirName(TQString); bool isKlamdAlive(); - QString getKlamdConfFile(); + TQString getKlamdConfFile(); public slots: bool startKlamd(); @@ -77,10 +77,10 @@ public slots: protected: /** - * Overridden virtuals for Qt drag 'n drop (XDND) + * Overridden virtuals for TQt drag 'n drop (XDND) */ - /*virtual void dragEnterEvent(QDragEnterEvent *event); - virtual void dropEvent(QDropEvent *event);*/ + /*virtual void dragEnterEvent(TQDragEnterEvent *event); + virtual void dropEvent(TQDropEvent *event);*/ protected: /** @@ -111,7 +111,7 @@ private: 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 childExited(); void receivedOutput(KProcIO *); - //void itemSelected(const QString&); + //void itemSelected(const TQString&); void slotClear(); void slotAddIncludeDir(); void slotAddExcludeDir(); void slotDelIncludeDir(); void slotDelExcludeDir(); void writeConf(); - void Quarantine(QString fname, QString virusname); + void Quarantine(TQString fname, TQString virusname); void restoreKlamd(); void handleChecks(); void checkForDazuko(); @@ -138,7 +138,7 @@ private slots: void receivedmvOutput(KProcIO *); void slotAdvOptions(); - //void patternTextChanged( const QString &); + //void patternTextChanged( const TQString &); private: void processOutput(); void finish(); @@ -147,23 +147,23 @@ private: void loadKlamd(); void enableInputs(); void disableInputs(); - QLineEdit *template_edit; - QComboBox *files_combo, *pattern_combo/*, *dir_combo*/; + TQLineEdit *template_edit; + TQComboBox *files_combo, *pattern_combo/*, *dir_combo*/; KURLRequester *dir_combo; - QCheckBox *recursive_box; - QCheckBox *recursive_box1; - QCheckBox *recursive_box2; - QListBox *resultbox; - QLabel *status_label, *matches_label; + TQCheckBox *recursive_box; + TQCheckBox *recursive_box1; + TQCheckBox *recursive_box2; + TQListBox *resultbox; + TQLabel *status_label, *matches_label; KProcIO *childproc; KProcIO *proc; KProcIO *lsmodproc; - QString buf, bufmv, mvbuffer; + TQString buf, bufmv, mvbuffer; KConfig* config; - QStringList lastSearchItems; - QStringList lastSearchPaths; - QStringList lastQuarItems; - QListView* table; + TQStringList lastSearchItems; + TQStringList lastSearchPaths; + TQStringList lastQuarItems; + TQListView* table; MyListBox *sessionslb; KArrowButton *btnup, *btndown; KFileTreeView* m_fileTreeView; @@ -172,23 +172,23 @@ private: KArrowButton *btnup2, *btndown2; KFileTreeView* m_fileTreeView2; KFileTreeBranch* treeBranch2; - QString tempFileName; - QComboBox *check_combo; - QComboBox *check_combo2; - QString item2; - QStringList includePaths; - QStringList excludePaths; + TQString tempFileName; + TQComboBox *check_combo; + TQComboBox *check_combo2; + TQString item2; + TQStringList includePaths; + TQStringList excludePaths; bool dazukoLoaded; bool klamdAlive; - QWidget *parent; - QString tmpit; - QString clamdcommand; - //QPushButton *adv_options; - QWidget *hlp; - QWidget *hlp2; - QWidget *hlp3; + TQWidget *parent; + TQString tmpit; + TQString clamdcommand; + //TQPushButton *adv_options; + TQWidget *hlp; + TQWidget *hlp2; + TQWidget *hlp3; public: - QPushButton *search_button, *cancel_button; + TQPushButton *search_button, *cancel_button; }; diff --git a/src/klamdoptions.cpp b/src/klamdoptions.cpp index 875d248..ff7ccb6 100644 --- a/src/klamdoptions.cpp +++ b/src/klamdoptions.cpp @@ -9,18 +9,18 @@ #include "klamdoptions.h" -#include -#include +#include +#include #include #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include #include @@ -40,77 +40,77 @@ const char *check_desc3[] = { * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */ -KlamdOptions::KlamdOptions( QWidget* parent, const char* name, bool modal, WFlags fl ) - : QDialog( parent, name, modal, fl ) +KlamdOptions::KlamdOptions( TQWidget* parent, const char* name, bool modal, WFlags fl ) + : TQDialog( parent, name, modal, fl ) { if ( !name ) setName( "KlamdOptions" ); setModal( TRUE ); OK = new KPushButton( this, "OK" ); - OK->setGeometry( QRect( 80, 220, 86, 31 ) ); + OK->setGeometry( TQRect( 80, 220, 86, 31 ) ); OK->setDefault( TRUE ); connect( OK, SIGNAL(clicked()), SLOT(updateSettings()) ); Cancel = new KPushButton( this, "Cancel" ); - Cancel->setGeometry( QRect( 180, 220, 86, 31 ) ); + Cancel->setGeometry( TQRect( 180, 220, 86, 31 ) ); Cancel->setDefault( FALSE ); connect( Cancel, SIGNAL(clicked()), SLOT(close()) ); 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" ); - privateLayoutWidget->setGeometry( QRect( 10, 10, 333, 200 ) ); - layout7 = new QGridLayout( privateLayoutWidget, 1, 1, 11, 6, "layout7"); + TQWidget* privateLayoutWidget = new TQWidget( this, "layout7" ); + privateLayoutWidget->setGeometry( TQRect( 10, 10, 333, 200 ) ); + 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->adjustSize(); - MaxSize->setGeometry( QRect( 170, 20, 40, 21 ) ); + MaxSize->setGeometry( TQRect( 170, 20, 40, 21 ) ); - ScanArchives = new QCheckBox( Archives, "ScanArchives" ); - ScanArchives->setGeometry( QRect( 20, 20, 150, 21 ) ); + ScanArchives = new TQCheckBox( Archives, "ScanArchives" ); + ScanArchives->setGeometry( TQRect( 20, 20, 150, 21 ) ); connect( ScanArchives, SIGNAL(toggled(bool)),MaxSize, SLOT(setEnabled(bool)) ); - textLabel1 = new QLabel( Archives, "textLabel1" ); - textLabel1->setGeometry( QRect( 230, 20, 70, 21 ) ); + textLabel1 = new TQLabel( Archives, "textLabel1" ); + textLabel1->setGeometry( TQRect( 230, 20, 70, 21 ) ); layout7->addWidget( Archives, 1, 0 ); - ScanFilesWhen = new QGroupBox( privateLayoutWidget, "ScanFilesWhen" ); + ScanFilesWhen = new TQGroupBox( privateLayoutWidget, "ScanFilesWhen" ); - QWidget* privateLayoutWidget_2 = new QWidget( ScanFilesWhen, "layout6" ); - privateLayoutWidget_2->setGeometry( QRect( 20, 20, 140, 60 ) ); - layout6 = new QGridLayout( privateLayoutWidget_2, 1, 1, 11, 6, "layout6"); + TQWidget* privateLayoutWidget_2 = new TQWidget( ScanFilesWhen, "layout6" ); + privateLayoutWidget_2->setGeometry( TQRect( 20, 20, 140, 60 ) ); + 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 ); connect( Created, SIGNAL(clicked()), SLOT(warn()) ); - Executed = new QCheckBox( privateLayoutWidget_2, "Executed" ); + Executed = new TQCheckBox( privateLayoutWidget_2, "Executed" ); layout6->addWidget( Executed, 2, 0 ); - QWidget* privateLayoutWidget_3 = new QWidget( ScanFilesWhen, "layout7" ); - privateLayoutWidget_3->setGeometry( QRect( 181, 20, 90, 60 ) ); - layout7_2 = new QGridLayout( privateLayoutWidget_3, 1, 1, 11, 6, "layout7_2"); + TQWidget* privateLayoutWidget_3 = new TQWidget( ScanFilesWhen, "layout7" ); + privateLayoutWidget_3->setGeometry( TQRect( 181, 20, 90, 60 ) ); + 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 ); - Closed = new QCheckBox( privateLayoutWidget_3, "Closed" ); + Closed = new TQCheckBox( privateLayoutWidget_3, "Closed" ); 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 ); languageChange(); - resize( QSize(351, 270).expandedTo(minimumSizeHint()) ); + resize( TQSize(351, 270).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); fetchSettings(); @@ -132,7 +132,7 @@ KlamdOptions::KlamdOptions( QWidget* parent, const char* name, bool modal, WFlag */ 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 } /* diff --git a/src/klamdoptions.h b/src/klamdoptions.h index d9949be..3a5a696 100644 --- a/src/klamdoptions.h +++ b/src/klamdoptions.h @@ -10,41 +10,41 @@ #ifndef KLAMDOPTIONS_H #define KLAMDOPTIONS_H -#include -#include +#include +#include -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QSpacerItem; +class TQVBoxLayout; +class TQHBoxLayout; +class TQGridLayout; +class TQSpacerItem; class KPushButton; class KDialog; -class QGroupBox; -class QComboBox; -class QCheckBox; -class QLabel; +class TQGroupBox; +class TQComboBox; +class TQCheckBox; +class TQLabel; class KConfig; -class KlamdOptions : public QDialog +class KlamdOptions : public TQDialog { Q_OBJECT 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(); KPushButton* OK; KPushButton* Cancel; KDialog* AdvOptions; - QGroupBox* Archives; - QComboBox* MaxSize; - QCheckBox* ScanArchives; - QLabel* textLabel1; - QGroupBox* ScanFilesWhen; - QCheckBox* Created; - QCheckBox* Executed; - QCheckBox* Opened; - QCheckBox* Closed; + TQGroupBox* Archives; + TQComboBox* MaxSize; + TQCheckBox* ScanArchives; + TQLabel* textLabel1; + TQGroupBox* ScanFilesWhen; + TQCheckBox* Created; + TQCheckBox* Executed; + TQCheckBox* Opened; + TQCheckBox* Closed; KConfig* config; private: @@ -55,9 +55,9 @@ private slots: void warn(); protected: - QGridLayout* layout7; - QGridLayout* layout6; - QGridLayout* layout7_2; + TQGridLayout* layout7; + TQGridLayout* layout6; + TQGridLayout* layout7_2; protected slots: virtual void languageChange(); diff --git a/src/klamscan.cpp b/src/klamscan.cpp index bb32553..a5dc91c 100644 --- a/src/klamscan.cpp +++ b/src/klamscan.cpp @@ -20,22 +20,22 @@ #include -#include -#include +#include +#include #include #include -#include -#include +#include +#include #include -#include +#include #include #include #include using namespace KlamAV; -Klamscan::Klamscan(QWidget *parent, const char *name) - : QWidget(parent, name), DCOPObject( "DCOPKlamscan" ) +Klamscan::Klamscan(TQWidget *parent, const char *name) + : TQWidget(parent, name), DCOPObject( "DCOPKlamscan" ) { @@ -43,7 +43,7 @@ Klamscan::Klamscan(QWidget *parent, const char *name) /* scanInProgress = FALSE; multiScan = FALSE; */ setDefaults(); - QBoxLayout *top = new QVBoxLayout(this,10,10); + TQBoxLayout *top = new TQVBoxLayout(this,10,10); tabBrowser = new TabWidget(this); @@ -53,10 +53,10 @@ Klamscan::Klamscan(QWidget *parent, const char *name) /* dblayout->addMultiCellWidget( tabBrowser, 0, 1, 1, 1 );*/ - //QGridLayout *layout = new QGridLayout(this, 6, 3, 10, 4); - QWidget* privateLayoutWidget2 = new QWidget( this, "dblayout" ); + //TQGridLayout *layout = new TQGridLayout(this, 6, 3, 10, 4); + 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->addColSpacing(1, 10); layout->setColStretch(1, 0); @@ -74,12 +74,12 @@ Klamscan::Klamscan(QWidget *parent, const char *name) 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()); layout->addWidget(combo_label,0,0); 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( "Quarantine file" ) ); check_combo->insertItem( i18n( "Just report" ) ); @@ -88,18 +88,18 @@ Klamscan::Klamscan(QWidget *parent, const char *name) 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->setChecked(true); // dir_layout2->addSpacing(10); 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->setTextLabel(i18n( "Schedule" )); - schedule->setTextPosition(QToolButton::Right); + schedule->setTextPosition(TQToolButton::Right); schedule->setUsesTextLabel(true); schedule->adjustSize(); layout->addWidget(schedule,0,4); @@ -108,10 +108,10 @@ Klamscan::Klamscan(QWidget *parent, const char *name) SLOT(slotSchedule()) ); - QToolButton* adv_options = new QToolButton( privateLayoutWidget2,"play" ); + TQToolButton* adv_options = new TQToolButton( privateLayoutWidget2,"play" ); adv_options->setIconSet( SmallIconSet( "configure" ) ); adv_options->setTextLabel(i18n("Options")); - adv_options->setTextPosition(QToolButton::Right); + adv_options->setTextPosition(TQToolButton::Right); adv_options->setUsesTextLabel(true); layout->addWidget(adv_options,0,5); //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->setMargin(2); - play = new QToolButton( controls,"play" ); + play = new TQToolButton( controls,"play" ); play->setIconSet( SmallIconSet( "player_play" ) ); play->setTextLabel(i18n( "Scan" )); - play->setTextPosition(QToolButton::Right); + play->setTextPosition(TQToolButton::Right); play->setUsesTextLabel(true); play->adjustSize(); play->setFixedHeight(play->height() - 1); - stop = new QToolButton( controls,"stop" ); + stop = new TQToolButton( controls,"stop" ); stop->setIconSet( SmallIconSet( "player_stop" ) ); stop->setTextLabel(i18n( "Stop" )); - stop->setTextPosition(QToolButton::Right); + stop->setTextPosition(TQToolButton::Right); stop->setUsesTextLabel(true); stop->adjustSize(); 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->setTextLabel(i18n( "Close" )); - m_tabsClose->setTextPosition(QToolButton::Right); + m_tabsClose->setTextPosition(TQToolButton::Right); m_tabsClose->setUsesTextLabel(true); m_tabsClose->adjustSize(); m_tabsClose->setFixedHeight(m_tabsClose->height() - 1); @@ -174,8 +174,8 @@ Klamscan::Klamscan(QWidget *parent, const char *name) layout->activate(); - connect(tabBrowser, SIGNAL(currentChanged(QWidget *)),this, - SLOT(slotManageButtons(QWidget *)) ); + connect(tabBrowser, SIGNAL(currentChanged(TQWidget *)),this, + SLOT(slotManageButtons(TQWidget *)) ); // Register with DCOP @@ -206,18 +206,18 @@ void Klamscan::slotScan() ScanViewer* homepage = new ScanViewer(this, "page"); - connect( homepage, SIGNAL( scanFinished(QWidget *) ), this, - SLOT( slotManageButtons(QWidget *) ) ); + connect( homepage, SIGNAL( scanFinished(TQWidget *) ), this, + SLOT( slotManageButtons(TQWidget *) ) ); - connect( homepage, SIGNAL( scanStartingAgain(QWidget *) ), this, - SLOT( slotManageButtons(QWidget *) ) ); + connect( homepage, SIGNAL( scanStartingAgain(TQWidget *) ), this, + SLOT( slotManageButtons(TQWidget *) ) ); kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_scanning")); - QDate today = QDate::currentDate(); - QTime now = QTime::currentTime(); - QString suffix = QString("%1 %2") + TQDate today = TQDate::currentDate(); + TQTime now = TQTime::currentTime(); + TQString suffix = TQString("%1 %2") .arg(today.toString("ddd MMMM d yyyy")) .arg(now.toString("hh:mm ap")); @@ -225,16 +225,16 @@ void Klamscan::slotScan() tabBrowser->setCurrentPage(tabBrowser->count() - 1); //return; - QStringList filepattern; + TQStringList filepattern; KCmdLineArgs *args = KCmdLineArgs::parsedArgs(); if( args->isSet( "scanthis" ) ) { listOfUrlsToScan.clear(); 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)); - listOfUrlsToScan.prepend(QString(args->arg(i))); + listOfUrlsToScan.prepend(TQString(args->arg(i))); } prevdir = listOfUrlsToScan.first(); @@ -242,7 +242,7 @@ void Klamscan::slotScan() filepattern = pruneSelectedDirs(); } //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); @@ -267,7 +267,7 @@ void Klamscan::slotAdvOptions(){ void Klamscan::slotSchedule(){ - QStringList filepattern = pruneSelectedDirs(); + TQStringList filepattern = pruneSelectedDirs(); if (filepattern.isEmpty()){ @@ -341,36 +341,36 @@ void Klamscan::setDefaults(){ } -void Klamscan::scanURLs(const QString &urls) +void Klamscan::scanURLs(const TQString &urls) { setActiveWindow(); raise(); kmain->tab->setCurrentPage(0); - QString tmpurls = urls; + TQString tmpurls = urls; //urlsToScan = urlsToScan.replace("*"," "); - urlsToScan = QStringList::split("*", tmpurls); - //for ( QStringList::Iterator it = temp.begin(); it != temp.end(); ++it ) + urlsToScan = TQStringList::split("*", tmpurls); + //for ( TQStringList::Iterator it = temp.begin(); it != temp.end(); ++it ) // (*it).sprintf("\"%s\"", (*it).latin1()); //urlsToScan = temp; ScanViewer* homepage = new ScanViewer(this, "page"); - connect( homepage, SIGNAL( scanFinished(QWidget *) ), this, - SLOT( slotManageButtons(QWidget *) ) ); - connect( homepage, SIGNAL( scanStartingAgain(QWidget *) ), this, - SLOT( slotManageButtons(QWidget *) ) ); + connect( homepage, SIGNAL( scanFinished(TQWidget *) ), this, + SLOT( slotManageButtons(TQWidget *) ) ); + connect( homepage, SIGNAL( scanStartingAgain(TQWidget *) ), this, + SLOT( slotManageButtons(TQWidget *) ) ); - QDate today = QDate::currentDate(); - QTime now = QTime::currentTime(); - QString suffix = QString("%1 %2") + TQDate today = TQDate::currentDate(); + TQTime now = TQTime::currentTime(); + TQString suffix = TQString("%1 %2") .arg(today.toString("ddd MMMM d yyyy")) .arg(now.toString("hh:mm ap")); tabBrowser->addTab(homepage,suffix); 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); @@ -419,7 +419,7 @@ void Klamscan::slotRemoveTab(){ } } -void Klamscan::slotManageButtons(QWidget * current){ +void Klamscan::slotManageButtons(TQWidget * current){ ScanViewer* cur = static_cast(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. - QStringList filepattern; - QStringList listOfUrlsToScan = setup->dirs(); + TQStringList filepattern; + TQStringList listOfUrlsToScan = setup->dirs(); listOfUrlsToScan.sort(); - QString prev; - QStringList prevdirs; - for (QStringList::Iterator it = listOfUrlsToScan.begin(); it != listOfUrlsToScan.end(); it++ ){ + TQString prev; + TQStringList prevdirs; + for (TQStringList::Iterator it = listOfUrlsToScan.begin(); it != listOfUrlsToScan.end(); it++ ){ //kdDebug() << "dir: " << (*it) << endl; (*it) = (*it).stripWhiteSpace() + "/"; if (prevdirs.isEmpty()){ @@ -461,7 +461,7 @@ QStringList Klamscan::pruneSelectedDirs(){ }else{ filepattern.append(*it); 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)){ //kdDebug() << (*it) << endl; filepattern.remove((*it)); diff --git a/src/klamscan.h b/src/klamscan.h index 2403e55..a765364 100644 --- a/src/klamscan.h +++ b/src/klamscan.h @@ -17,21 +17,21 @@ class KPrinter; class KToggleAction; class KURL; -class QLineEdit; -class QComboBox; -class QCheckBox; -class QListBox; -class QListView; -class QListViewItem; -class QPushButton; -class QLabel; +class TQLineEdit; +class TQComboBox; +class TQCheckBox; +class TQListBox; +class TQListView; +class TQListViewItem; +class TQPushButton; +class TQLabel; class KProcess; class KConfig; class KURLRequester; class CollectionSetup; -class QToolButton; -class QHBoxLayout; -class QDir; +class TQToolButton; +class TQHBoxLayout; +class TQDir; namespace KlamAV { @@ -46,14 +46,14 @@ namespace KlamAV * @author $AUTHOR <$EMAIL> * @version $APP_VERSION */ -class Klamscan : public QWidget, virtual public DCOPKlamscan +class Klamscan : public TQWidget, virtual public DCOPKlamscan { Q_OBJECT public: /** * Default Constructor */ - Klamscan(QWidget *parent, const char *name=0); + Klamscan(TQWidget *parent, const char *name=0); /** * Default Destructor @@ -64,11 +64,11 @@ public: * Use this method to load whatever file/URL you have */ - void setDirName(QString); + void setDirName(TQString); bool isMultiScan(); protected: /** - * Overridden virtuals for Qt drag 'n drop (XDND) + * Overridden virtuals for TQt drag 'n drop (XDND) */ protected: @@ -96,7 +96,7 @@ private: signals: public slots: - void scanURLs(const QString &urls); + void scanURLs(const TQString &urls); private slots: void slotScan(); void slotAdvOptions(); @@ -105,32 +105,32 @@ private slots: void slotStopScanning(); void slotStartAgain(); void slotRemoveTab(); - void slotManageButtons(QWidget *current); + void slotManageButtons(TQWidget *current); private: void setDefaults(); - QStringList pruneSelectedDirs(); - QLineEdit *template_edit; - QComboBox *files_combo, *pattern_combo, *check_combo; - QCheckBox *recursive_box; - QListView *resultview; - QPushButton *search_button, *cancel_button; - QLabel *status_label, *status2_label,*matches_label,*matches2_label; + TQStringList pruneSelectedDirs(); + TQLineEdit *template_edit; + TQComboBox *files_combo, *pattern_combo, *check_combo; + TQCheckBox *recursive_box; + TQListView *resultview; + TQPushButton *search_button, *cancel_button; + TQLabel *status_label, *status2_label,*matches_label,*matches2_label; KProcess *childproc; - QString buf; + TQString buf; KConfig* config; bool errorsEncountered; - QPopupMenu* menu; - QToolButton* adv_options; - QStringList urlsToScan; - QString prevdir; - QStringList listOfUrlsToScan; + TQPopupMenu* menu; + TQToolButton* adv_options; + TQStringList urlsToScan; + TQString prevdir; + TQStringList listOfUrlsToScan; bool multi_recursive; KlamAV::TabWidget* tabBrowser; CollectionSetup* setup; - QToolButton *m_tabsClose; - QToolButton* play; - QToolButton* stop; - QHBoxLayout* controls; + TQToolButton *m_tabsClose; + TQToolButton* play; + TQToolButton* stop; + TQHBoxLayout* controls; }; diff --git a/src/klamscan.hpre b/src/klamscan.hpre index e1166f8..994328a 100644 --- a/src/klamscan.hpre +++ b/src/klamscan.hpre @@ -17,14 +17,14 @@ class KPrinter; class KToggleAction; class KURL; -class QLineEdit; -class QComboBox; -class QCheckBox; -class QListBox; -class QListView; -class QListViewItem; -class QPushButton; -class QLabel; +class TQLineEdit; +class TQComboBox; +class TQCheckBox; +class TQListBox; +class TQListView; +class TQListViewItem; +class TQPushButton; +class TQLabel; class KProcess; class KConfig; class KURLRequester; @@ -38,14 +38,14 @@ class KURLRequester; * @author $AUTHOR <$EMAIL> * @version $APP_VERSION */ -class Klamscan : public QWidget, virtual public DCOPKlamscan +class Klamscan : public TQWidget, virtual public DCOPKlamscan { Q_OBJECT public: /** * Default Constructor */ - Klamscan(QWidget *parent, const char *name=0); + Klamscan(TQWidget *parent, const char *name=0); /** * Default Destructor @@ -56,14 +56,14 @@ public: * Use this method to load whatever file/URL you have */ - void setDirName(QString); + void setDirName(TQString); bool isMultiScan(); protected: /** - * Overridden virtuals for Qt drag 'n drop (XDND) + * Overridden virtuals for TQt drag 'n drop (XDND) */ - /*virtual void dragEnterEvent(QDragEnterEvent *event); - virtual void dropEvent(QDropEvent *event);*/ + /*virtual void dragEnterEvent(TQDragEnterEvent *event); + virtual void dropEvent(TQDropEvent *event);*/ protected: /** @@ -93,8 +93,8 @@ private slots: void optionsPreferences(); void newToolbarConfig(); */ - //void changeStatusbar(const QString& text); - //void changeCaption(const QString& text); + //void changeStatusbar(const TQString& text); + //void changeCaption(const TQString& text); private: void setupAccel(); @@ -108,27 +108,27 @@ private: KToggleAction *m_statusbarAction;*/ signals: - void itemSelected(QString abs_filename, int line); + void itemSelected(TQString abs_filename, int line); public slots: - void scanURLs(const QString &urls); - void resetMultiScan( QMouseEvent * e); + void scanURLs(const TQString &urls); + void resetMultiScan( TQMouseEvent * e); private slots: //void dirButtonClicked(); //void templateActivated(int index); void childExited(); void receivedOutput(KProcess *proc, char *buffer, int buflen); - //void itemSelected(const QString&); + //void itemSelected(const TQString&); void slotSearch(); void slotCancel(); void slotClear(); - void slotRMB( QListViewItem *, const QPoint &, int ); + void slotRMB( TQListViewItem *, const TQPoint &, int ); void slotQuarantineSelected(); void slotAdvOptions(); void slotSchedule(); void slotVirusPool(); void slotGoogle(); - //void patternTextChanged( const QString &); + //void patternTextChanged( const TQString &); private: void processOutput(); void finish(); @@ -136,32 +136,32 @@ private: void Quarantine(); void askUser(); void setDefaults(); - QLineEdit *template_edit; - QComboBox *files_combo, *pattern_combo, *check_combo; + TQLineEdit *template_edit; + TQComboBox *files_combo, *pattern_combo, *check_combo; KComboBox *dir_combo; - QCheckBox *recursive_box; - QCheckBox *recursive_box2; - QListView *resultview; - QPushButton *search_button, *cancel_button; - QLabel *status_label, *status2_label,*matches_label,*matches2_label; + TQCheckBox *recursive_box; + TQCheckBox *recursive_box2; + TQListView *resultview; + TQPushButton *search_button, *cancel_button; + TQLabel *status_label, *status2_label,*matches_label,*matches2_label; KProcess *childproc; - QString buf; + TQString buf; KConfig* config; - QStringList lastSearchItems; - QStringList lastScanPaths; - QStringList lastQuarItems; - QStringList QuarantineList; + TQStringList lastSearchItems; + TQStringList lastScanPaths; + TQStringList lastQuarItems; + TQStringList QuarantineList; bool errorsEncountered; - QPopupMenu* menu; - QPushButton* adv_options; - QPushButton* schedule; - QString selectedVirus; + TQPopupMenu* menu; + TQPushButton* adv_options; + TQPushButton* schedule; + TQString selectedVirus; bool multiScan; - QString urlsToScan; + TQString urlsToScan; bool scanInProgress; - QString prevdir; - QStringList listOfUrlsToScan; - void updateScanPaths(const QStringList &paths); + TQString prevdir; + TQStringList listOfUrlsToScan; + void updateScanPaths(const TQStringList &paths); bool multi_recursive; }; diff --git a/src/klamscanoptions.cpp b/src/klamscanoptions.cpp index 73e99ac..428cd5c 100644 --- a/src/klamscanoptions.cpp +++ b/src/klamscanoptions.cpp @@ -9,10 +9,10 @@ #include "klamscanoptions.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -25,152 +25,152 @@ * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */ -KlamscanOptions::KlamscanOptions( QWidget* parent, const char* name, bool modal, WFlags fl ) - : QDialog( parent, name, modal, fl ) +KlamscanOptions::KlamscanOptions( TQWidget* parent, const char* name, bool modal, WFlags fl ) + : TQDialog( parent, name, modal, fl ) { if ( !name ) setName( "KlamscanOptions" ); - Archive_Support = new QGroupBox( this, "Archive_Support" ); - Archive_Support->setGeometry( QRect( 20, 10, 551, 130 ) ); + Archive_Support = new TQGroupBox( this, "Archive_Support" ); + Archive_Support->setGeometry( TQRect( 20, 10, 551, 130 ) ); - textLabel1_2_2 = new QLabel( Archive_Support, "textLabel1_2_2" ); - textLabel1_2_2->setGeometry( QRect( 13, 52, 222, 21 ) ); + textLabel1_2_2 = new TQLabel( Archive_Support, "textLabel1_2_2" ); + textLabel1_2_2->setGeometry( TQRect( 13, 52, 222, 21 ) ); - textLabel1_2 = new QLabel( Archive_Support, "textLabel1_2" ); - textLabel1_2->setGeometry( QRect( 314, 19, 222, 21 ) ); + textLabel1_2 = new TQLabel( Archive_Support, "textLabel1_2" ); + textLabel1_2->setGeometry( TQRect( 314, 19, 222, 21 ) ); - textLabel1_2_3 = new QLabel( Archive_Support, "textLabel1_2_3" ); - textLabel1_2_3->setGeometry( QRect( 314, 51, 222, 21 ) ); + textLabel1_2_3 = new TQLabel( Archive_Support, "textLabel1_2_3" ); + textLabel1_2_3->setGeometry( TQRect( 314, 51, 222, 21 ) ); - textLabel1 = new QLabel( Archive_Support, "textLabel1" ); - textLabel1->setGeometry( QRect( 13, 20, 222, 21 ) ); + textLabel1 = new TQLabel( Archive_Support, "textLabel1" ); + textLabel1->setGeometry( TQRect( 13, 20, 222, 21 ) ); - NoFilesToExtract = new QSpinBox(1,999,1, Archive_Support, "NoFilesToExtract" ); - NoFilesToExtract->setGeometry( QRect( 240, 20, 40, 21 ) ); + NoFilesToExtract = new TQSpinBox(1,999,1, Archive_Support, "NoFilesToExtract" ); + NoFilesToExtract->setGeometry( TQRect( 240, 20, 40, 21 ) ); - MBsToExtract = new QSpinBox(1,999,1, Archive_Support, "MBsToExtract" ); - MBsToExtract->setGeometry( QRect( 474, 19, 40, 21 ) ); + MBsToExtract = new TQSpinBox(1,999,1, Archive_Support, "MBsToExtract" ); + MBsToExtract->setGeometry( TQRect( 474, 19, 40, 21 ) ); - RecursionLevel = new QSpinBox(1,999,1, Archive_Support, "RecursionLevel" ); - RecursionLevel->setGeometry( QRect( 241, 51, 40, 21 ) ); + RecursionLevel = new TQSpinBox(1,999,1, Archive_Support, "RecursionLevel" ); + RecursionLevel->setGeometry( TQRect( 241, 51, 40, 21 ) ); - CompressionRatio = new QSpinBox(1,999,1, Archive_Support, "CompressionRatio" ); - CompressionRatio->setGeometry( QRect( 474, 51, 40, 21 ) ); + CompressionRatio = new TQSpinBox(1,999,1, Archive_Support, "CompressionRatio" ); + CompressionRatio->setGeometry( TQRect( 474, 51, 40, 21 ) ); - VirusLimitsExceeded = new QCheckBox( Archive_Support, "VirusLimitsExceeded" ); - VirusLimitsExceeded->setGeometry( QRect( 11, 81, 220, 20 ) ); - VirusLimitsExceeded->setPaletteForegroundColor( QColor( 255, 0, 0 ) ); + VirusLimitsExceeded = new TQCheckBox( Archive_Support, "VirusLimitsExceeded" ); + VirusLimitsExceeded->setGeometry( TQRect( 11, 81, 220, 20 ) ); + VirusLimitsExceeded->setPaletteForegroundColor( TQColor( 255, 0, 0 ) ); - VirusEncrypted = new QCheckBox( Archive_Support, "VirusEncrypted" ); - VirusEncrypted->setGeometry( QRect( 318, 82, 220, 20 ) ); - VirusEncrypted->setPaletteForegroundColor( QColor( 255, 0, 0 ) ); + VirusEncrypted = new TQCheckBox( Archive_Support, "VirusEncrypted" ); + VirusEncrypted->setGeometry( TQRect( 318, 82, 220, 20 ) ); + VirusEncrypted->setPaletteForegroundColor( TQColor( 255, 0, 0 ) ); - ArchiveTypes = new QButtonGroup( this, "ArchiveTypes" ); - ArchiveTypes->setGeometry( QRect( 20, 150, 551, 320 ) ); + ArchiveTypes = new TQButtonGroup( this, "ArchiveTypes" ); + ArchiveTypes->setGeometry( TQRect( 20, 150, 551, 320 ) ); - ScanZip = new QCheckBox( ArchiveTypes, "ScanZip" ); - ScanZip->setGeometry( QRect( 20, 30, 150, 21 ) ); + ScanZip = new TQCheckBox( ArchiveTypes, "ScanZip" ); + ScanZip->setGeometry( TQRect( 20, 30, 150, 21 ) ); KComboBox* zipUrl = new KComboBox(true, this); 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->setGeometry( QRect( 20, 60, 150, 21 ) ); + ScanRar = new TQCheckBox( ArchiveTypes, "ScanRar" ); + ScanRar->setGeometry( TQRect( 20, 60, 150, 21 ) ); KComboBox* rarUrl = new KComboBox(true, this); 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->setGeometry( QRect( 20, 90, 150, 21 ) ); + ScanArj = new TQCheckBox( ArchiveTypes, "ScanArj" ); + ScanArj->setGeometry( TQRect( 20, 90, 150, 21 ) ); KComboBox* arjUrl = new KComboBox(true, this); 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->setGeometry( QRect( 20, 120, 150, 21 ) ); + ScanZoo = new TQCheckBox( ArchiveTypes, "ScanZoo" ); + ScanZoo->setGeometry( TQRect( 20, 120, 150, 21 ) ); KComboBox* zooUrl = new KComboBox(true, this); 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->setGeometry( QRect( 20, 150, 150, 21 ) ); + ScanLzh = new TQCheckBox( ArchiveTypes, "ScanLzh" ); + ScanLzh->setGeometry( TQRect( 20, 150, 150, 21 ) ); KComboBox* lzhUrl = new KComboBox(true, this); 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->setGeometry( QRect( 20, 180, 150, 21 ) ); + ScanJar = new TQCheckBox( ArchiveTypes, "ScanJar" ); + ScanJar->setGeometry( TQRect( 20, 180, 150, 21 ) ); KComboBox* jarUrl = new KComboBox(true, this); 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->setGeometry( QRect( 20, 210, 150, 21 ) ); + ScanDeb = new TQCheckBox( ArchiveTypes, "ScanDeb" ); + ScanDeb->setGeometry( TQRect( 20, 210, 150, 21 ) ); KComboBox* debUrl = new KComboBox(true, this); 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->setGeometry( QRect( 20, 240, 150, 21 ) ); + ScanTar = new TQCheckBox( ArchiveTypes, "ScanTar" ); + ScanTar->setGeometry( TQRect( 20, 240, 150, 21 ) ); KComboBox* tarUrl = new KComboBox(true, this); 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->setGeometry( QRect( 20, 270, 150, 21 ) ); + ScanTgz = new TQCheckBox( ArchiveTypes, "ScanTgz" ); + ScanTgz->setGeometry( TQRect( 20, 270, 150, 21 ) ); KComboBox* tgzUrl = new KComboBox(true, this); 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->setGeometry( QRect( 20, 490, 551, 120 ) ); + FileTypes = new TQGroupBox( this, "FileTypes" ); + FileTypes->setGeometry( TQRect( 20, 490, 551, 120 ) ); - ScanMail = new QCheckBox( FileTypes, "ScanMail" ); - ScanMail->setGeometry( QRect( 20, 20, 200, 21 ) ); + ScanMail = new TQCheckBox( FileTypes, "ScanMail" ); + ScanMail->setGeometry( TQRect( 20, 20, 200, 21 ) ); - ScanHTML = new QCheckBox( FileTypes, "ScanHTML" ); - ScanHTML->setGeometry( QRect( 270, 20, 200, 21 ) ); + ScanHTML = new TQCheckBox( FileTypes, "ScanHTML" ); + ScanHTML->setGeometry( TQRect( 270, 20, 200, 21 ) ); - ScanPE = new QCheckBox( FileTypes, "ScanPE" ); - ScanPE->setGeometry( QRect( 20, 50, 220, 21 ) ); + ScanPE = new TQCheckBox( FileTypes, "ScanPE" ); + ScanPE->setGeometry( TQRect( 20, 50, 220, 21 ) ); - ScanOle = new QCheckBox( FileTypes, "ScanOle" ); - ScanOle->setGeometry( QRect( 270, 50, 270, 21 ) ); + ScanOle = new TQCheckBox( FileTypes, "ScanOle" ); + ScanOle->setGeometry( TQRect( 270, 50, 270, 21 ) ); ScanOle->setChecked( FALSE ); - VirusBroken = new QCheckBox( FileTypes, "VirusBroken" ); - VirusBroken->setGeometry( QRect( 20, 80, 240, 20 ) ); - VirusBroken->setPaletteForegroundColor( QColor( 255, 0, 0 ) ); + VirusBroken = new TQCheckBox( FileTypes, "VirusBroken" ); + VirusBroken->setGeometry( TQRect( 20, 80, 240, 20 ) ); + VirusBroken->setPaletteForegroundColor( TQColor( 255, 0, 0 ) ); - ExcludeQuarantine = new QCheckBox( FileTypes, "ExcludeQuarantine" ); - ExcludeQuarantine->setGeometry( QRect( 270, 80, 270, 21 ) ); + ExcludeQuarantine = new TQCheckBox( FileTypes, "ExcludeQuarantine" ); + ExcludeQuarantine->setGeometry( TQRect( 270, 80, 270, 21 ) ); ExcludeQuarantine->setChecked( FALSE ); - OK = new QPushButton( this, i18n( "OK" ) ); - OK->setGeometry( QRect( 190, 626, 91, 31 ) ); + OK = new TQPushButton( this, i18n( "OK" ) ); + OK->setGeometry( TQRect( 190, 626, 91, 31 ) ); OK->setDefault( TRUE ); connect( OK, SIGNAL(clicked()), SLOT(updateSettings()) ); - Cancel = new QPushButton( this, i18n( "Cancel" ) ); - Cancel->setGeometry( QRect( 300, 626, 91, 31 ) ); + Cancel = new TQPushButton( this, i18n( "Cancel" ) ); + Cancel->setGeometry( TQRect( 300, 626, 91, 31 ) ); connect( Cancel, SIGNAL(clicked()), SLOT(close()) ); languageChange(); - resize( QSize(589, 667).expandedTo(minimumSizeHint()) ); + resize( TQSize(589, 667).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); fetchSettings(); @@ -181,7 +181,7 @@ KlamscanOptions::KlamscanOptions( QWidget* parent, const char* name, bool modal, */ 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"); - NoFilesToExtract->setValue(QString(config->readEntry("NoFilesToExtract")).toInt()); - MBsToExtract->setValue(QString(config->readEntry("MBsToExtract")).replace("M","").toInt()); - CompressionRatio->setValue(QString(config->readEntry("CompressionRatio")).toInt()); - RecursionLevel->setValue(QString(config->readEntry("RecursionLevel")).toInt()); + NoFilesToExtract->setValue(TQString(config->readEntry("NoFilesToExtract")).toInt()); + MBsToExtract->setValue(TQString(config->readEntry("MBsToExtract")).replace("M","").toInt()); + CompressionRatio->setValue(TQString(config->readEntry("CompressionRatio")).toInt()); + RecursionLevel->setValue(TQString(config->readEntry("RecursionLevel")).toInt()); if (config->readEntry("VirusLimitsExceeded") == "Yes") VirusLimitsExceeded->setChecked(true); diff --git a/src/klamscanoptions.h b/src/klamscanoptions.h index b412242..3ceeb29 100644 --- a/src/klamscanoptions.h +++ b/src/klamscanoptions.h @@ -10,70 +10,70 @@ #ifndef KLAMSCANOPTIONS_H #define KLAMSCANOPTIONS_H -#include -#include +#include +#include -class QVBoxLayout; -class QHBoxLayout; -class QGridLayout; -class QSpacerItem; -class QGroupBox; -class QLabel; -class QSpinBox; -class QCheckBox; -class QButtonGroup; +class TQVBoxLayout; +class TQHBoxLayout; +class TQGridLayout; +class TQSpacerItem; +class TQGroupBox; +class TQLabel; +class TQSpinBox; +class TQCheckBox; +class TQButtonGroup; class KURLRequester; -class QPushButton; +class TQPushButton; class KConfig; class KComboBox; -class KlamscanOptions : public QDialog +class KlamscanOptions : public TQDialog { Q_OBJECT 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(); - QGroupBox* Archive_Support; - QLabel* textLabel1_2_2; - QLabel* textLabel1_2; - QLabel* textLabel1_2_3; - QLabel* textLabel1; - QSpinBox* NoFilesToExtract; - QSpinBox* MBsToExtract; - QSpinBox* RecursionLevel; - QSpinBox* CompressionRatio; - QCheckBox* VirusLimitsExceeded; - QCheckBox* VirusEncrypted; - QButtonGroup* ArchiveTypes; - QCheckBox* ScanZip; + TQGroupBox* Archive_Support; + TQLabel* textLabel1_2_2; + TQLabel* textLabel1_2; + TQLabel* textLabel1_2_3; + TQLabel* textLabel1; + TQSpinBox* NoFilesToExtract; + TQSpinBox* MBsToExtract; + TQSpinBox* RecursionLevel; + TQSpinBox* CompressionRatio; + TQCheckBox* VirusLimitsExceeded; + TQCheckBox* VirusEncrypted; + TQButtonGroup* ArchiveTypes; + TQCheckBox* ScanZip; KURLRequester* ZipUsing; - QCheckBox* ScanRar; + TQCheckBox* ScanRar; KURLRequester* RarUsing; - QCheckBox* ScanArj; + TQCheckBox* ScanArj; KURLRequester* ArjUsing; - QCheckBox* ScanZoo; + TQCheckBox* ScanZoo; KURLRequester* ZooUsing; - QCheckBox* ScanLzh; + TQCheckBox* ScanLzh; KURLRequester* LzhUsing; - QCheckBox* ScanJar; + TQCheckBox* ScanJar; KURLRequester* JarUsing; - QCheckBox* ScanDeb; + TQCheckBox* ScanDeb; KURLRequester* DebUsing; - QCheckBox* ScanTar; + TQCheckBox* ScanTar; KURLRequester* TarUsing; - QCheckBox* ScanTgz; + TQCheckBox* ScanTgz; KURLRequester* TgzUsing; - QGroupBox* FileTypes; - QCheckBox* ScanMail; - QCheckBox* ScanHTML; - QCheckBox* ScanPE; - QCheckBox* ScanOle; - QCheckBox* VirusBroken; - QCheckBox* ExcludeQuarantine; - QPushButton* OK; - QPushButton* Cancel; + TQGroupBox* FileTypes; + TQCheckBox* ScanMail; + TQCheckBox* ScanHTML; + TQCheckBox* ScanPE; + TQCheckBox* ScanOle; + TQCheckBox* VirusBroken; + TQCheckBox* ExcludeQuarantine; + TQPushButton* OK; + TQPushButton* Cancel; KConfig* config; KComboBox* zipedit; diff --git a/src/kticon.cpp b/src/kticon.cpp index 6256b14..9fff86d 100644 --- a/src/kticon.cpp +++ b/src/kticon.cpp @@ -19,17 +19,17 @@ // #include "ktsystem.xpm" // #include "ktmsystem.xpm" -QPixmap KTIcon::getMiniIcon(const QString& name) +TQPixmap KTIcon::getMiniIcon(const TQString& name) { return SmallIcon(name); } -QPixmap KTIcon::getIcon(const QString& name) +TQPixmap KTIcon::getIcon(const TQString& name) { return BarIcon(name); } -QPixmap KTIcon::application(bool mini) +TQPixmap KTIcon::application(bool mini) { if (mini) return getMiniIcon("kcron"); @@ -37,7 +37,7 @@ QPixmap KTIcon::application(bool mini) return getIcon("kcron"); } -QPixmap KTIcon::system(bool mini) +TQPixmap KTIcon::system(bool mini) { if (mini) return getMiniIcon("openterm"); @@ -45,7 +45,7 @@ QPixmap KTIcon::system(bool mini) return getIcon("openterm"); } -QPixmap KTIcon::user(bool mini) +TQPixmap KTIcon::user(bool mini) { if (mini) return getMiniIcon("kuser"); @@ -53,7 +53,7 @@ QPixmap KTIcon::user(bool mini) return getIcon("kuser"); } -QPixmap KTIcon::variables(bool mini) +TQPixmap KTIcon::variables(bool mini) { if (mini) return getMiniIcon("folder"); @@ -61,7 +61,7 @@ QPixmap KTIcon::variables(bool mini) return getIcon("folder"); } -QPixmap KTIcon::variable(bool mini) +TQPixmap KTIcon::variable(bool mini) { if (mini) return getMiniIcon("mime_empty"); @@ -69,7 +69,7 @@ QPixmap KTIcon::variable(bool mini) return getIcon("mime_empty"); } -QPixmap KTIcon::mail(bool mini) +TQPixmap KTIcon::mail(bool mini) { if (mini) return getMiniIcon("mail_generic"); @@ -77,7 +77,7 @@ QPixmap KTIcon::mail(bool mini) return getIcon("mail_generic"); } -QPixmap KTIcon::shell(bool mini) +TQPixmap KTIcon::shell(bool mini) { if (mini) return getMiniIcon("openterm"); @@ -85,7 +85,7 @@ QPixmap KTIcon::shell(bool mini) return getIcon("openterm"); } -QPixmap KTIcon::home(bool mini) +TQPixmap KTIcon::home(bool mini) { if (mini) return getMiniIcon("gohome"); @@ -93,7 +93,7 @@ QPixmap KTIcon::home(bool mini) return getIcon("gohome"); } -QPixmap KTIcon::path(bool mini) +TQPixmap KTIcon::path(bool mini) { if (mini) return getMiniIcon("folder"); @@ -101,7 +101,7 @@ QPixmap KTIcon::path(bool mini) return getIcon("folder"); } -QPixmap KTIcon::tasks(bool mini) +TQPixmap KTIcon::tasks(bool mini) { if (mini) return getMiniIcon("folder"); @@ -109,7 +109,7 @@ QPixmap KTIcon::tasks(bool mini) return getIcon("folder"); } -QPixmap KTIcon::task(bool mini) +TQPixmap KTIcon::task(bool mini) { if (mini) return getMiniIcon("gear"); diff --git a/src/kticon.h b/src/kticon.h index 013f726..15a8a91 100644 --- a/src/kticon.h +++ b/src/kticon.h @@ -12,8 +12,8 @@ #ifndef KTICON_H #define KTICON_H -#include -#include +#include +#include /** * Wraps all icons used by the application. @@ -24,19 +24,19 @@ class KTIcon public: - static QPixmap getMiniIcon(const QString& name); - static QPixmap getIcon(const QString& name); - static QPixmap application(bool mini); - static QPixmap system(bool mini); - static QPixmap user(bool mini); - static QPixmap variables(bool mini); - static QPixmap variable(bool mini); - static QPixmap mail(bool mini); - static QPixmap shell(bool mini); - static QPixmap home(bool mini); - static QPixmap path(bool mini); - static QPixmap tasks(bool mini); - static QPixmap task(bool mini); + static TQPixmap getMiniIcon(const TQString& name); + static TQPixmap getIcon(const TQString& name); + static TQPixmap application(bool mini); + static TQPixmap system(bool mini); + static TQPixmap user(bool mini); + static TQPixmap variables(bool mini); + static TQPixmap variable(bool mini); + static TQPixmap mail(bool mini); + static TQPixmap shell(bool mini); + static TQPixmap home(bool mini); + static TQPixmap path(bool mini); + static TQPixmap tasks(bool mini); + static TQPixmap task(bool mini); }; diff --git a/src/ktlistcron.cpp b/src/ktlistcron.cpp index ba03d2a..d45b723 100644 --- a/src/ktlistcron.cpp +++ b/src/ktlistcron.cpp @@ -25,14 +25,14 @@ KTListCron::KTListCron(KTListItem* parent, const char* name, refresh(); } -KTListCron::KTListCron(QListView* parent, const char* name, +KTListCron::KTListCron(TQListView* parent, const char* name, CTCron* _ctcron) : KTListItem(parent, name, _ctcron) { refresh(); } -KTListCron::KTListCron(QListView* parent, CTCron* _ctcron) : +KTListCron::KTListCron(TQListView* parent, CTCron* _ctcron) : KTListItem(parent, (const char*)0, _ctcron) { refresh(); @@ -43,24 +43,24 @@ void KTListCron::refresh() setPixmap(0, getCTCron()->login.c_str() == (i18n("(System Crontab)")) ? 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) { - userName += QString(" ("); - userName += QString::fromLocal8Bit(getCTCron()->name.c_str()); - userName += QString(")"); + userName += TQString(" ("); + userName += TQString::fromLocal8Bit(getCTCron()->name.c_str()); + userName += TQString(")"); } setText(0, userName); } // void KTListCron::print (KTPrint& printer) const // { -// QString userInfo; -// userInfo = QString::fromLocal8Bit(getCTCron()->name.c_str()); +// TQString userInfo; +// userInfo = TQString::fromLocal8Bit(getCTCron()->name.c_str()); // // KTListItem* ktli = (KTListItem*)this->firstChild(); -// Q_CHECK_PTR(ktli); +// TQ_CHECK_PTR(ktli); // while (ktli) { // ktli->print(printer); // ktli = (KTListItem*)ktli->nextSibling(); diff --git a/src/ktlistcron.h b/src/ktlistcron.h index eb668b4..812cc49 100644 --- a/src/ktlistcron.h +++ b/src/ktlistcron.h @@ -19,7 +19,7 @@ #include "ktlistitem.h" /** - * QListViewItem view of a CTCron. + * TQListViewItem view of a CTCron. */ class KTListCron : public KTListItem { @@ -33,12 +33,12 @@ public: /** * 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. */ - KTListCron(QListView* parent, CTCron* _ctcron); + KTListCron(TQListView* parent, CTCron* _ctcron); /** * Refresh. diff --git a/src/ktlistitem.cpp b/src/ktlistitem.cpp index 02c921c..27fd7be 100644 --- a/src/ktlistitem.cpp +++ b/src/ktlistitem.cpp @@ -14,13 +14,13 @@ KTListItem::KTListItem(KTListItem* parent, const char* name, CTCron* _ctcron) : - QListViewItem(parent, name), + TQListViewItem(parent, name), ctcron(_ctcron) { } -KTListItem::KTListItem(QListView* parent, const char* name, CTCron* _ctcron) : - QListViewItem(parent, name), +KTListItem::KTListItem(TQListView* parent, const char* name, CTCron* _ctcron) : + TQListViewItem(parent, name), ctcron(_ctcron) { } diff --git a/src/ktlistitem.h b/src/ktlistitem.h index de7f70c..94d9de2 100644 --- a/src/ktlistitem.h +++ b/src/ktlistitem.h @@ -16,16 +16,16 @@ #include #endif -#include +#include class KTPrint; 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. */ -class KTListItem : public QListViewItem +class KTListItem : public TQListViewItem { public: @@ -37,7 +37,7 @@ public: /** * 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. diff --git a/src/ktlisttask.cpp b/src/ktlisttask.cpp index 5f137c5..e6d376a 100644 --- a/src/ktlisttask.cpp +++ b/src/ktlisttask.cpp @@ -30,10 +30,10 @@ KTListTask::KTListTask(KTListItem* parent, 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")){ - setText(0, QString::fromLocal8Bit(cttask->comment.c_str())); + setText(0, TQString::fromLocal8Bit(cttask->comment.c_str())); /* if (cttask->enabled) {*/ @@ -42,9 +42,9 @@ void KTListTask::refresh() if (command.contains("Autostart")) - setText(2, QString::fromLocal8Bit("At Login")); + setText(2, TQString::fromLocal8Bit("At Login")); 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 // { -// 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) { -// printer.print(QString::fromLocal8Bit(cttask->command.c_str()),2, KTPrint::alignTextCenter); -// printer.print(QString::fromLocal8Bit(cttask->describe().c_str()),3, KTPrint::alignTextRight); +// printer.print(TQString::fromLocal8Bit(cttask->command.c_str()),2, KTPrint::alignTextCenter); +// printer.print(TQString::fromLocal8Bit(cttask->describe().c_str()),3, KTPrint::alignTextRight); // } // else // printer.print(i18n("Disabled."), 3, KTPrint::alignTextRight); diff --git a/src/ktlisttask.h b/src/ktlisttask.h index 1f71e57..bf28487 100644 --- a/src/ktlisttask.h +++ b/src/ktlisttask.h @@ -21,7 +21,7 @@ class CTTask; /** - * QListViewItem with a CTTask. + * TQListViewItem with a CTTask. */ class KTListTask : public KTListItem { diff --git a/src/ktlisttasks.cpp b/src/ktlisttasks.cpp index 7349b0f..a5eba31 100644 --- a/src/ktlisttasks.cpp +++ b/src/ktlisttasks.cpp @@ -25,13 +25,13 @@ KTListTasks::KTListTasks(KTListItem* parent, CTCron* _ctcron) : refresh(); } -KTListTasks::KTListTasks(QListView* parent, CTCron* _ctcron) : +KTListTasks::KTListTasks(TQListView* parent, CTCron* _ctcron) : KTListItem(parent, 0, _ctcron) { refresh(); } -QString KTListTasks::getDescription() +TQString KTListTasks::getDescription() { return i18n("Tasks"); } @@ -45,7 +45,7 @@ QString KTListTasks::getDescription() // if (temptask->dirty()) // { // getCTCron()->task.push_back(temptask); -// new KTListTask(this, getCTCron(), temptask); // Qt will clean up +// new KTListTask(this, getCTCron(), temptask); // TQt will clean up // } // else // { @@ -61,11 +61,11 @@ void KTListTasks::refresh() // void KTListTasks::print (KTPrint& printer) const // { -// QFont stnd; +// TQFont stnd; // // 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("Program:"), 2, KTPrint::alignTextCenter); // printer.print (i18n("Description:"),3,KTPrint::alignTextRight); @@ -83,7 +83,7 @@ void KTListTasks::refresh() // } // // KTListItem* ktli = (KTListItem*)this->firstChild(); -// Q_CHECK_PTR(ktli); +// TQ_CHECK_PTR(ktli); // // while (ktli) { // ktli->print(printer); diff --git a/src/ktlisttasks.h b/src/ktlisttasks.h index 6fdd9a3..607ed2a 100644 --- a/src/ktlisttasks.h +++ b/src/ktlisttasks.h @@ -18,10 +18,10 @@ #include "ktlistitem.h" -class QString; +class TQString; /** - * QListViewItem of a "tasks" folder. + * TQListViewItem of a "tasks" folder. */ class KTListTasks : public KTListItem { @@ -35,12 +35,12 @@ public: /** * Construct tasks folder from root. */ - KTListTasks(QListView* parent, CTCron* _ctcron); + KTListTasks(TQListView* parent, CTCron* _ctcron); /** * Internationalized description. */ - static QString getDescription(); + static TQString getDescription(); /** * Create. diff --git a/src/ktview.cpp b/src/ktview.cpp index e5836d4..4225595 100644 --- a/src/ktview.cpp +++ b/src/ktview.cpp @@ -21,7 +21,7 @@ // #endif -#include +#include #include "cthost.h" #include "ctcron.h" @@ -44,8 +44,8 @@ #include // system -KTView::KTView(QWidget *parent, const char* name) : - QWidget(parent, name), +KTView::KTView(TQWidget *parent, const char* name) : + TQWidget(parent, name), listView(0), currentCTCron(0), currentIsTask(true), @@ -79,18 +79,18 @@ KTView::KTView(QWidget *parent, const char* name) : // emit(enablePaste(clipboardCTVariable)); // emit(enableRunNow(false)); - listView->setColumnWidthMode(1, QListView::Manual); + listView->setColumnWidthMode(1, TQListView::Manual); listView->hideColumn(1); } 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->setAllColumnsShowFocus(true); listView->setShowSortIndicator(true); @@ -107,7 +107,7 @@ void KTView::refresh() listView->addColumn(i18n("When to Scan")); //for (int item = 0; item <=2; item++) - //listView->setColumnWidthMode(item, QListView::Maximum); + //listView->setColumnWidthMode(item, TQListView::Maximum); // for each user for (CTCronIterator i = const_cast(cth).cron.begin(); @@ -161,17 +161,17 @@ void KTView::refresh() resizeEvent(); - connect(listView, SIGNAL(contextMenuRequested(QListViewItem*, const QPoint&, int)), - SLOT(slotMenu(QListViewItem*, const QPoint&, int))); + connect(listView, SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint&, int)), + SLOT(slotMenu(TQListViewItem*, const TQPoint&, int))); - connect(listView, SIGNAL(selectionChanged(QListViewItem*)), - SLOT(slotSetCurrent(QListViewItem*))); + connect(listView, SIGNAL(selectionChanged(TQListViewItem*)), + SLOT(slotSetCurrent(TQListViewItem*))); - connect(listView, SIGNAL(doubleClicked(QListViewItem*)), - SLOT(slotEdit(QListViewItem*))); + connect(listView, SIGNAL(doubleClicked(TQListViewItem*)), + SLOT(slotEdit(TQListViewItem*))); - connect(listView, SIGNAL(returnPressed(QListViewItem*)), - SLOT(slotEdit(QListViewItem*))); + connect(listView, SIGNAL(returnPressed(TQListViewItem*)), + SLOT(slotEdit(TQListViewItem*))); // switch to the new view @@ -183,14 +183,14 @@ void KTView::refresh() delete tmpListView; } - listView->setColumnWidthMode(1, QListView::Manual); + listView->setColumnWidthMode(1, TQListView::Manual); listView->hideColumn(1); - QListViewItemIterator it( listView); + TQListViewItemIterator it( listView); while ( it.current() ) { - QListViewItem* tItem = it.current(); + TQListViewItem* tItem = it.current(); //kdDebug() << tItem->text(1) << endl; 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 // { -// QFont stnd; -// QString logonInfo; -// QDateTime now (QDateTime::currentDateTime()); +// TQFont stnd; +// TQString logonInfo; +// TQDateTime now (TQDateTime::currentDateTime()); // char hostName[20]; // // gethostname(hostName, 20); // // SSA : Fix Me user name, logon name and host name musst be // // SSA : not only in us-ascii ?? // logonInfo = i18n("user on host", "%1 <%2> on %3") -// .arg(QString::fromLocal8Bit(user->getCTCron()->name.c_str())) -// .arg(QString::fromLocal8Bit(user->getCTCron()->login.c_str())) -// .arg(QString::fromLocal8Bit(hostName)); +// .arg(TQString::fromLocal8Bit(user->getCTCron()->name.c_str())) +// .arg(TQString::fromLocal8Bit(user->getCTCron()->login.c_str())) +// .arg(TQString::fromLocal8Bit(hostName)); // // 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 (logonInfo, 2, KTPrint::alignTextCenter, false); @@ -328,7 +328,7 @@ KTView::~KTView() delete listView; } -void KTView::resizeEvent (QResizeEvent*) +void KTView::resizeEvent (TQResizeEvent*) { listView->setFixedWidth(width()); listView->setFixedHeight(height()); @@ -386,7 +386,7 @@ void KTView::create() if ((ktli->text(0) != KTListTasks::getDescription()) ) { ktli = (KTListItem*)ktli->parent(); } - Q_CHECK_PTR(ktli); + TQ_CHECK_PTR(ktli); ktli->create(); listView->triggerUpdate(); } @@ -394,7 +394,7 @@ void KTView::create() // void KTView::edit() // { // KTListItem* ktli = (KTListItem*)listView->currentItem(); -// Q_CHECK_PTR(ktli); +// TQ_CHECK_PTR(ktli); // ktli->edit(); // listView->triggerUpdate(); // } @@ -440,46 +440,46 @@ void KTView::remove() refresh(); } -QString KTView::absolute() const +TQString KTView::absolute() const { - QString fullCommand = QString::fromLocal8Bit(currentCTTask->command.c_str()); - QString command(fullCommand); + TQString fullCommand = TQString::fromLocal8Bit(currentCTTask->command.c_str()); + TQString command(fullCommand); int pos(command.find(" ")); if (pos > 0) command = command.left(pos); if (command.find("/") == 0) return fullCommand; - QString path = QString::fromLocal8Bit(currentCTCron->path().c_str()); + TQString path = TQString::fromLocal8Bit(currentCTCron->path().c_str()); int begin(0); int end(0); - QString prefix; - QString full; + TQString prefix; + TQString full; while ((end = path.find(":", begin)) > 0) { prefix = path.mid(begin, begin + end) + "/"; full = prefix + command; - if (QFileInfo(full).isExecutable()) - return QString(prefix + fullCommand); + if (TQFileInfo(full).isExecutable()) + return TQString(prefix + fullCommand); begin = end + 1; } prefix = path.mid(begin, begin + end) + "/"; full = prefix + command; - if (QFileInfo(full).isExecutable()) - return QString(prefix + fullCommand); - return QString(""); + if (TQFileInfo(full).isExecutable()) + return TQString(prefix + fullCommand); + return TQString(""); } void KTView::run() const { - QString command(absolute() + " &"); - system(QFile::encodeName(command)); + TQString command(absolute() + " &"); + system(TQFile::encodeName(command)); } void KTView::enable(bool enable) { - QListViewItem* qlvi = listView->currentItem(); + TQListViewItem* qlvi = listView->currentItem(); 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 ) { 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(); } -void KTView::slotSetCurrent (QListViewItem* qlvi) +void KTView::slotSetCurrent (TQListViewItem* qlvi) { - QListViewItem* parent = qlvi->parent(); + TQListViewItem* parent = qlvi->parent(); /* if (qlvi->text(0) == KTListVars::getDescription()) { @@ -595,7 +595,7 @@ CTCron* KTView::getCTCron() return currentCTCron; } -QListViewItem* KTView::currentItem() +TQListViewItem* KTView::currentItem() { //kdDebug() << listView->currentItem()->text(1) << endl; return listView->currentItem(); diff --git a/src/ktview.h b/src/ktview.h index 061b28a..4d73619 100644 --- a/src/ktview.h +++ b/src/ktview.h @@ -16,12 +16,12 @@ #include #endif -#include +#include #include "cthost.h" -class QString; -class QListView; -class QListViewItem; +class TQString; +class TQListView; +class TQListViewItem; class KTApp; class KTPrint; class KTListItem; @@ -33,7 +33,7 @@ class Schedule; /** * Main GUI view of the crontab entries. */ -class KTView : public QWidget +class KTView : public TQWidget { Q_OBJECT @@ -42,7 +42,7 @@ public: /** * Initializes view. */ - KTView (QWidget* parent = 0, const char* name=0); + KTView (TQWidget* parent = 0, const char* name=0); /** * Destructor. @@ -107,7 +107,7 @@ public: CTCron* getCTCron(); - QListViewItem* currentItem(); + TQListViewItem* currentItem(); void hideCommand(); signals: @@ -141,33 +141,33 @@ public slots: /** * 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. */ - void slotEdit(QListViewItem* qlvi = 0); + void slotEdit(TQListViewItem* qlvi = 0); protected slots: /** * Set current and update menu */ - void slotSetCurrent (QListViewItem* qlvi); + void slotSetCurrent (TQListViewItem* qlvi); protected: /** * Resize view contents. */ - virtual void resizeEvent (QResizeEvent* = 0); + virtual void resizeEvent (TQResizeEvent* = 0); private: /** * Get absolute path of command. */ - QString absolute() const; + TQString absolute() const; /** @@ -179,7 +179,7 @@ private: /** * Tree view of the crontab entries. */ - QListView* listView; + TQListView* listView; /** * Current user's crontab. diff --git a/src/kuarantine.cpp b/src/kuarantine.cpp index 27e4ea0..fdb335f 100644 --- a/src/kuarantine.cpp +++ b/src/kuarantine.cpp @@ -23,13 +23,13 @@ #include #include #include -#include +#include #include #include -Kuarantine::Kuarantine(QWidget *parent, const char *name) - : QWidget(parent, name) +Kuarantine::Kuarantine(TQWidget *parent, const char *name) + : TQWidget(parent, name) { config = KGlobal::config(); @@ -40,7 +40,7 @@ Kuarantine::Kuarantine(QWidget *parent, const char *name) if (lastQuarLocations.isEmpty()){ createQuarDir(); }else{ - for (QStringList::Iterator it = lastQuarLocations.begin(); it == lastQuarLocations.begin(); it++ ) + for (TQStringList::Iterator it = lastQuarLocations.begin(); it == lastQuarLocations.begin(); it++ ) quarloc = *it; 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)); @@ -52,42 +52,42 @@ Kuarantine::Kuarantine(QWidget *parent, const char *name) //Get Items for this location - lastQuarItems = config->readListEntry(QString("Items %1").arg(quarloc)); + lastQuarItems = config->readListEntry(TQString("Items %1").arg(quarloc)); if (lastQuarItems.isEmpty()){ - config->writeEntry(QString("Items %1").arg(quarloc), ""); - lastQuarItems = config->readListEntry(QString("Items %1").arg(quarloc)); + config->writeEntry(TQString("Items %1").arg(quarloc), ""); + lastQuarItems = config->readListEntry(TQString("Items %1").arg(quarloc)); } //Get History for this location - lastHistoryItems = config->readListEntry(QString("History %1").arg(quarloc)); + lastHistoryItems = config->readListEntry(TQString("History %1").arg(quarloc)); if (lastHistoryItems.isEmpty()){ - config->writeEntry(QString("History %1").arg(quarloc), ""); + config->writeEntry(TQString("History %1").arg(quarloc), ""); config->sync(); - lastHistoryItems = config->readListEntry(QString("History %1").arg(quarloc)); + lastHistoryItems = config->readListEntry(TQString("History %1").arg(quarloc)); } //Create GUI - QVBoxLayout *vbox = new QVBoxLayout(this, KDialog::marginHint(), + TQVBoxLayout *vbox = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint(), "vbox"); - QGroupBox *group = new QGroupBox(i18n("Quarantine Location"), this); + TQGroupBox *group = new TQGroupBox(i18n("Quarantine Location"), this); vbox->addWidget(group); - QGridLayout *layout = new QGridLayout( group, 9, 3, KDialog::spacingHint(), + TQGridLayout *layout = new TQGridLayout( group, 9, 3, KDialog::spacingHint(), KDialog::spacingHint(), "layout"); layout->addRowSpacing(0, group->fontMetrics().height()); layout->setColStretch(0, 1); layout->setColStretch(1, 1); - QWidget *hlp = new QWidget( group ); + TQWidget *hlp = new TQWidget( group ); 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->adjustSize(); dir_layout->addWidget(dir_label); @@ -102,51 +102,51 @@ Kuarantine::Kuarantine(QWidget *parent, const char *name) dir_layout->addWidget(dir_combo); dir_label->setBuddy(dir_combo); - connect( dir_combo, SIGNAL(urlSelected(const QString &)), + connect( dir_combo, SIGNAL(urlSelected(const TQString &)), SLOT(updateLastQuarLocations()) ); - connect( dir_combo, SIGNAL(textChanged(const QString &)), + connect( dir_combo, SIGNAL(textChanged(const TQString &)), SLOT(updateLastQuarLocations()) ); - QGroupBox *group2 = new QGroupBox(i18n("Contents Of Quarantine"), this); + TQGroupBox *group2 = new TQGroupBox(i18n("Contents Of Quarantine"), this); vbox->addWidget(group2); - QGridLayout *layout2 = new QGridLayout( group2, 9, 3, KDialog::spacingHint(), + TQGridLayout *layout2 = new TQGridLayout( group2, 9, 3, KDialog::spacingHint(), KDialog::spacingHint(), "layout2"); layout2->addRowSpacing(0, group2->fontMetrics().height()); layout2->setColStretch(0, 1); layout2->setColStretch(1, 1); - QWidget *hlp2 = new QWidget( group2 ); + TQWidget *hlp2 = new TQWidget( group2 ); 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); -// QFontMetrics rb_fm(currentbox->fontMetrics()); +// currentbox = new TQListBox(hlp2); +// TQFontMetrics rb_fm(currentbox->fontMetrics()); // currentbox->setMinimumSize(rb_fm.width("0")*25, // rb_fm.lineSpacing()*8); // dir_layout2->addWidget(currentbox); - currentbox = new QListView(hlp2); + currentbox = new TQListView(hlp2); currentbox->setShowSortIndicator(true); - QFontMetrics rb_fm(currentbox->fontMetrics()); + TQFontMetrics rb_fm(currentbox->fontMetrics()); //currentbox->setMinimumSize(rb_fm.width("0")*55, // rb_fm.lineSpacing()*15); //kdDebug() << ((currentbox->width())/3) << endl; currentbox->addColumn( i18n( "Name of File" ),0); currentbox->addColumn( i18n( "Name of Virus Found" ),0); currentbox->addColumn( i18n( "Date Quarantined" ),0); - currentbox->setResizeMode(QListView::AllColumns); - currentbox->setSelectionMode( QListView::Extended ); + currentbox->setResizeMode(TQListView::AllColumns); + currentbox->setSelectionMode( TQListView::Extended ); currentbox->setAllColumnsShowFocus(true); - qmenu = new QPopupMenu( currentbox ); + qmenu = new TQPopupMenu( currentbox ); - connect(currentbox, SIGNAL( contextMenuRequested( QListViewItem *, const QPoint& , int ) ), - this, SLOT( slotRMB( QListViewItem *, const QPoint &, int ) ) ); + connect(currentbox, SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint& , int ) ), + this, SLOT( slotRMB( TQListViewItem *, const TQPoint &, int ) ) ); dir_layout2->addWidget(currentbox); @@ -154,7 +154,7 @@ Kuarantine::Kuarantine(QWidget *parent, const char *name) refresh(); - KButtonBox *actionbox = new KButtonBox(hlp2, Qt::Vertical); + KButtonBox *actionbox = new KButtonBox(hlp2, TQt::Vertical); actionbox->addStretch(); refresh_button = actionbox->addButton(i18n("&Refresh")); 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); - QGridLayout *layout3 = new QGridLayout( group3, 9, 2, KDialog::spacingHint(), + TQGridLayout *layout3 = new TQGridLayout( group3, 9, 2, KDialog::spacingHint(), KDialog::spacingHint(), "layout3"); layout3->addRowSpacing(0, group3->fontMetrics().height()); layout3->setColStretch(0, 1); layout3->setColStretch(1, 1); - QWidget *hlp3 = new QWidget( group3 ); + TQWidget *hlp3 = new TQWidget( group3 ); 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); -// QFontMetrics rb_fm3(historybox->fontMetrics()); +// historybox = new TQListBox(hlp3); +// TQFontMetrics rb_fm3(historybox->fontMetrics()); // historybox->setMinimumSize(rb_fm3.width("0")*25, // rb_fm3.lineSpacing()*8); // dir_layout3->addWidget(historybox); - historybox = new QListView(hlp3); + historybox = new TQListView(hlp3); historybox->setShowSortIndicator(true); - QFontMetrics rb_fm2(historybox->fontMetrics()); + TQFontMetrics rb_fm2(historybox->fontMetrics()); //historybox->setMinimumSize(rb_fm2.width("0")*55, // rb_fm2.lineSpacing()*15); historybox->addColumn( i18n( "Name of File" ),(historybox->width())); historybox->addColumn( i18n( "Name of Virus Found" ),(historybox->width())); historybox->addColumn( i18n( "Date Quarantined" ),(historybox->width())); - historybox->setResizeMode(QListView::AllColumns); - historybox->setSelectionMode( QListView::Extended ); + historybox->setResizeMode(TQListView::AllColumns); + historybox->setSelectionMode( TQListView::Extended ); historybox->setAllColumnsShowFocus(true); - hmenu = new QPopupMenu( historybox ); + hmenu = new TQPopupMenu( historybox ); - connect(historybox, SIGNAL( contextMenuRequested( QListViewItem *, const QPoint& , int ) ), - this, SLOT( slotRMB( QListViewItem *, const QPoint &, int ) ) ); + connect(historybox, SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint& , int ) ), + this, SLOT( slotRMB( TQListViewItem *, const TQPoint &, int ) ) ); dir_layout3->addWidget(historybox); //layout->addMultiCellWidget(historybox, 2, 2, 0, 2); - KButtonBox *actionbox3 = new KButtonBox(hlp3, Qt::Vertical); + KButtonBox *actionbox3 = new KButtonBox(hlp3, TQt::Vertical); actionbox3->addStretch(); search_button3 = actionbox3->addButton(i18n("&Clear All")); search_button3->setDefault(true); @@ -249,10 +249,10 @@ void Kuarantine::refresh() { - QStringList obsoleteQuarItems; + TQStringList obsoleteQuarItems; config = KGlobal::config(); 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))){ 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{ 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); - QString itemname = getVirusName(*it); - QString when = getWhen(*it); + TQString fname = getFileName(*it); + TQString itemname = getVirusName(*it); + TQString when = getWhen(*it); - QStringList tokens = QStringList::split ( "/", fname, FALSE ); - QString qname = tokens.last(); + TQStringList tokens = TQStringList::split ( "/", fname, FALSE ); + TQString qname = tokens.last(); qname.prepend("/"); qname.prepend(quarloc); @@ -275,17 +275,17 @@ void Kuarantine::refresh() //kdDebug() << qname << endl; if (KIO::NetAccess::exists(qname,TRUE,NULL)){ //currentbox->insertItem(*it); - new QListViewItem( currentbox, fname, itemname,when); + new TQListViewItem( currentbox, fname, itemname,when); }else{ //kdDebug() << qname << "doesna exist" << endl; 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); - config->writeEntry(QString("Items %1").arg(quarloc), lastQuarItems); + config->writeEntry(TQString("Items %1").arg(quarloc), lastQuarItems); } config->sync(); @@ -295,32 +295,32 @@ void Kuarantine::refreshhistory() { config = KGlobal::config(); config->setGroup("Kuarantine"); - lastHistoryItems = config->readListEntry(QString("History %1").arg(quarloc)); + lastHistoryItems = config->readListEntry(TQString("History %1").arg(quarloc)); historybox->clear(); - for (QStringList::Iterator it = lastHistoryItems.begin(); it != lastHistoryItems.end(); it++ ){ - QString fname = getFileName(*it); - QString itemname = getVirusName(*it); - QString when = getWhen(*it); + for (TQStringList::Iterator it = lastHistoryItems.begin(); it != lastHistoryItems.end(); it++ ){ + TQString fname = getFileName(*it); + TQString itemname = getVirusName(*it); + TQString when = getWhen(*it); - new QListViewItem( historybox, fname, itemname,when); + new TQListViewItem( historybox, fname, itemname,when); } } void Kuarantine::load() { - QString target; + TQString target; // the below code is what you should normally do. in this // example case, we want the url to our own. you probably // want to use this code instead for your app currentbox->clear(); - for (QStringList::Iterator it = lastQuarItems.begin(); it != lastQuarItems.end(); it++ ){ - QString fname = getFileName(*it); - QString itemname = getVirusName(*it); - QString when = getWhen(*it); + for (TQStringList::Iterator it = lastQuarItems.begin(); it != lastQuarItems.end(); it++ ){ + TQString fname = getFileName(*it); + TQString itemname = getVirusName(*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())) // return; - QPtrList list; + TQPtrList list; - QListViewItemIterator it( currentbox, QListViewItemIterator::Selected ); + TQListViewItemIterator it( currentbox, TQListViewItemIterator::Selected ); while ( it.current() ) { - QListViewItem* tItem = it.current(); + TQListViewItem* tItem = it.current(); config = KGlobal::config(); config->setGroup("Kuarantine"); - lastQuarItems = config->readListEntry(QString("Items %1").arg(quarloc)); - lastHistoryItems = config->readListEntry(QString("History %1").arg(quarloc)); + lastQuarItems = config->readListEntry(TQString("Items %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 ); - QString qname = tokens.last(); + TQStringList tokens = TQStringList::split ( "/", fname, FALSE ); + TQString qname = tokens.last(); qname.prepend("/"); qname.prepend(quarloc); qname.append(":"+tItem->text(2)); @@ -357,7 +357,7 @@ void Kuarantine::slotSearch() //currentbox->takeItem(currentbox->currentItem()); list.prepend( it.current() ); - config->writeEntry(QString("Items %1").arg(quarloc), lastQuarItems); + config->writeEntry(TQString("Items %1").arg(quarloc), lastQuarItems); config->sync(); }else{ KMessageBox::information (this,i18n("

    There was a problem restoring %1. 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.

    ").arg(fname)); @@ -365,7 +365,7 @@ void Kuarantine::slotSearch() ++it; } -for( QListViewItem *item = list.first(); item; item = list.next() ) +for( TQListViewItem *item = list.first(); item; item = list.next() ) { delete item; } @@ -408,30 +408,30 @@ void Kuarantine::slotCancel() //if (!(currentbox->selectedItem())) // return; - QPtrList list; + TQPtrList list; - QListViewItemIterator it( currentbox, QListViewItemIterator::Selected ); + TQListViewItemIterator it( currentbox, TQListViewItemIterator::Selected ); while ( it.current() ) { - //QListViewItem* tItem = ( *it ); + //TQListViewItem* tItem = ( *it ); //if (tItem->isSelected()){ config = KGlobal::config(); config->setGroup("Kuarantine"); - lastQuarItems = config->readListEntry(QString("Items %1").arg(quarloc)); - lastHistoryItems = config->readListEntry(QString("History %1").arg(quarloc)); + lastQuarItems = config->readListEntry(TQString("Items %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 ); - QString fname = ( it.current() )->text(0); - QString itemname = ( it.current() )->text(1); - QString when = ( it.current() )->text(2); + //TQStringList tokens = TQStringList::split ( ":", ( it.current() )->text(), FALSE ); + TQString fname = ( it.current() )->text(0); + TQString itemname = ( it.current() )->text(1); + TQString when = ( it.current() )->text(2); - QStringList tokens = QStringList::split ( "/", fname, FALSE ); - QString qname = tokens.last(); + TQStringList tokens = TQStringList::split ( "/", fname, FALSE ); + TQString qname = tokens.last(); qname.prepend("/"); qname.prepend(QuarLocation); 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)); 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()); //currentbox->takeItem(( it.current() )); @@ -453,13 +453,13 @@ void Kuarantine::slotCancel() ++it; } - for( QListViewItem *item = list.first(); item; item = list.next() ) + for( TQListViewItem *item = list.first(); item; item = list.next() ) { delete item; } - config->writeEntry(QString("Items %1").arg(quarloc), lastQuarItems); - config->writeEntry(QString("History %1").arg(quarloc), lastHistoryItems); + config->writeEntry(TQString("Items %1").arg(quarloc), lastQuarItems); + config->writeEntry(TQString("History %1").arg(quarloc), lastHistoryItems); config->sync(); @@ -475,14 +475,14 @@ void Kuarantine::slotClearHistory() historybox->clear(); config = KGlobal::config(); config->setGroup("Kuarantine"); - lastHistoryItems = config->readListEntry(QString("History %1").arg(quarloc)); + lastHistoryItems = config->readListEntry(TQString("History %1").arg(quarloc)); if (lastHistoryItems.isEmpty()) return; lastHistoryItems.clear(); - config->writeEntry(QString("History %1").arg(quarloc), lastHistoryItems); + config->writeEntry(TQString("History %1").arg(quarloc), lastHistoryItems); config->sync(); @@ -495,14 +495,14 @@ void Kuarantine::slotDeleteHistory() //if (!(historybox->selectedItem())) // return; - //QListViewItem* tItem = historybox->selectedItem(); + //TQListViewItem* tItem = historybox->selectedItem(); config->setGroup("Kuarantine"); - lastHistoryItems = config->readListEntry(QString("History %1").arg(quarloc)); + lastHistoryItems = config->readListEntry(TQString("History %1").arg(quarloc)); - QPtrList list; + TQPtrList list; - QListViewItemIterator it( historybox, QListViewItemIterator::Selected ); + TQListViewItemIterator it( historybox, TQListViewItemIterator::Selected ); while ( it.current() ) { @@ -512,36 +512,36 @@ void Kuarantine::slotDeleteHistory() ++it; } - for( QListViewItem *item = list.first(); item; item = list.next() ) + for( TQListViewItem *item = list.first(); item; item = list.next() ) { delete item; } - config->writeEntry(QString("History %1").arg(quarloc), lastHistoryItems); + config->writeEntry(TQString("History %1").arg(quarloc), lastHistoryItems); config->sync(); } -void Kuarantine::setDirName(QString dir){ +void Kuarantine::setDirName(TQString dir){ // dir_combo->setEditText(dir); dir_combo->setURL(dir); } void Kuarantine::createQuarDir(){ - QString path = getenv("HOME"); + TQString path = getenv("HOME"); bool ok = true; // directory exist? path += "/.klamav"; - QDir klamavdir(path); + TQDir klamavdir(path); if (!klamavdir.exists() && !klamavdir.mkdir(path)) ok = false; path += "/quarantine"; if (ok) { - QDir klamavqdir(path); + TQDir klamavqdir(path); if (!klamavqdir.exists() && !klamavqdir.mkdir(path)) ok = false; else @@ -549,8 +549,8 @@ void Kuarantine::createQuarDir(){ } if (ok){ - quarloc = QString("%1").arg(path); - lastQuarLocations.append( QString("%1").arg(path)); + quarloc = TQString("%1").arg(path); + lastQuarLocations.append( TQString("%1").arg(path)); config = KGlobal::config(); config->setGroup("Kuarantine"); 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 dtStartPoint = entry.findRev(":"); 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; @@ -576,12 +576,12 @@ QString Kuarantine::getFileName(QString entry){ } -QString Kuarantine::getVirusName(QString entry){ +TQString Kuarantine::getVirusName(TQString entry){ int dtStartPoint = entry.findRev(":"); 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; @@ -589,11 +589,11 @@ QString Kuarantine::getVirusName(QString entry){ } -QString Kuarantine::getWhen(QString entry){ +TQString Kuarantine::getWhen(TQString entry){ 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; @@ -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 ){ - QPixmap gicon; - QPixmap vicon; - QPixmap ticon; - QPixmap vlicon; + TQPixmap gicon; + TQPixmap vicon; + TQPixmap ticon; + 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() ) vicon = SmallIcon("find"); else - vicon = QPixmap( iconPath ); + vicon = TQPixmap( iconPath ); iconPath = locate("cache", KMimeType::favIconForURL("http://www.google.com")+".png"); if ( iconPath.isEmpty() ) gicon = SmallIcon("find"); else - gicon = QPixmap( iconPath ); + gicon = TQPixmap( iconPath ); iconPath = locate("cache", KMimeType::favIconForURL("http://www.trendmicro.com")+".png"); if ( iconPath.isEmpty() ) ticon = SmallIcon("find"); else - ticon = QPixmap( iconPath ); + ticon = TQPixmap( iconPath ); iconPath = locate("cache", KMimeType::favIconForURL("http://www.viruslist.com")+".png"); if ( iconPath.isEmpty() ) vlicon = SmallIcon("find"); else - vlicon = QPixmap( iconPath ); + vlicon = TQPixmap( iconPath ); if (Item->listView() == currentbox){ @@ -657,50 +657,50 @@ void Kuarantine::slotRMB( QListViewItem* Item, const QPoint & point, int ) void Kuarantine::slotVirusPoolCurrent() { - QString name = currentbox->currentItem()->text(1); + TQString name = currentbox->currentItem()->text(1); kmain->klamdb->slotExternal(name,"VirusPool"); } void Kuarantine::slotVirusListCurrent() { - QString name = currentbox->currentItem()->text(1); + TQString name = currentbox->currentItem()->text(1); kmain->klamdb->slotExternal(name,"VirusList"); } void Kuarantine::slotGoogleCurrent() { - QString name = currentbox->currentItem()->text(1); + TQString name = currentbox->currentItem()->text(1); kmain->klamdb->slotExternal(name,"Google"); } void Kuarantine::slotTrendMicroCurrent() { - QString name = currentbox->currentItem()->text(1); + TQString name = currentbox->currentItem()->text(1); kmain->klamdb->slotExternal(name, "TrendMicro"); } void Kuarantine::slotVirusPoolHistory() { - QString name = historybox->currentItem()->text(1); + TQString name = historybox->currentItem()->text(1); kmain->klamdb->slotExternal(name,"VirusPool"); } void Kuarantine::slotVirusListHistory() { - QString name = historybox->currentItem()->text(1); + TQString name = historybox->currentItem()->text(1); kmain->klamdb->slotExternal(name,"VirusList"); } void Kuarantine::slotGoogleHistory() { - QString name = historybox->currentItem()->text(1); + TQString name = historybox->currentItem()->text(1); kmain->klamdb->slotExternal(name,"Google"); } void Kuarantine::slotTrendMicroHistory() { - QString name = historybox->currentItem()->text(1); + TQString name = historybox->currentItem()->text(1); kmain->klamdb->slotExternal(name, "TrendMicro"); } diff --git a/src/kuarantine.h b/src/kuarantine.h index 2b63709..4dfc9bd 100644 --- a/src/kuarantine.h +++ b/src/kuarantine.h @@ -17,16 +17,16 @@ class KPrinter; class KToggleAction; class KURL; -class QLineEdit; -class QComboBox; -class QCheckBox; -class QListView; -class QPushButton; -class QLabel; +class TQLineEdit; +class TQComboBox; +class TQCheckBox; +class TQListView; +class TQPushButton; +class TQLabel; class KProcess; class KConfig; class KURLRequester; -class QListViewItem; +class TQListViewItem; /** @@ -37,14 +37,14 @@ class QListViewItem; * @author $AUTHOR <$EMAIL> * @version $APP_VERSION */ -class Kuarantine : public QWidget +class Kuarantine : public TQWidget { Q_OBJECT public: /** * Default Constructor */ - Kuarantine(QWidget *parent, const char *name=0); + Kuarantine(TQWidget *parent, const char *name=0); /** * Default Destructor @@ -55,19 +55,19 @@ public: * Use this method to load whatever file/URL you have */ void load(); - void setDirName(QString); + void setDirName(TQString); void createQuarDir(); - QString getFileName(QString); - QString getVirusName(QString); - QString getWhen(QString); - QString getSelectedVirusName(); + TQString getFileName(TQString); + TQString getVirusName(TQString); + TQString getWhen(TQString); + TQString getSelectedVirusName(); protected: /** - * Overridden virtuals for Qt drag 'n drop (XDND) + * Overridden virtuals for TQt drag 'n drop (XDND) */ - /*virtual void dragEnterEvent(QDragEnterEvent *event); - virtual void dropEvent(QDropEvent *event);*/ + /*virtual void dragEnterEvent(TQDragEnterEvent *event); + virtual void dropEvent(TQDropEvent *event);*/ protected: /** @@ -97,10 +97,10 @@ private slots: void optionsPreferences(); void newToolbarConfig(); */ - //void changeStatusbar(const QString& text); - //void changeCaption(const QString& text); - void slotRMB( QListViewItem *, const QPoint &, int ); - //void resizeEvent ( QResizeEvent * ); + //void changeStatusbar(const TQString& text); + //void changeCaption(const TQString& text); + void slotRMB( TQListViewItem *, const TQPoint &, int ); + //void resizeEvent ( TQResizeEvent * ); private: void setupAccel(); void setupActions(); @@ -114,7 +114,7 @@ private: signals: - void itemSelected(QString abs_filename, int line); + void itemSelected(TQString abs_filename, int line); public slots: @@ -135,28 +135,28 @@ private slots: void slotTrendMicroHistory(); void slotVirusListHistory(); - //void patternTextChanged( const QString &); + //void patternTextChanged( const TQString &); private: void getout(); - QLineEdit *template_edit; - QComboBox *files_combo, *pattern_combo/*, *dir_combo*/; + TQLineEdit *template_edit; + TQComboBox *files_combo, *pattern_combo/*, *dir_combo*/; KURLRequester *dir_combo; - QCheckBox *recursive_box; - QListView *currentbox; - QListView *historybox; - QPushButton *search_button, *cancel_button, *refresh_button, *search_button3, *cancel_button3; - QLabel *status_label, *matches_label; + TQCheckBox *recursive_box; + TQListView *currentbox; + TQListView *historybox; + TQPushButton *search_button, *cancel_button, *refresh_button, *search_button3, *cancel_button3; + TQLabel *status_label, *matches_label; KProcess *childproc; - QString buf; + TQString buf; KConfig* config; - QStringList lastQuarItems; - QStringList lastHistoryItems; - QStringList lastQuarLocations; - QStringList lastSearchPaths; - QString quarloc; - QPopupMenu* qmenu; - QPopupMenu* hmenu; + TQStringList lastQuarItems; + TQStringList lastHistoryItems; + TQStringList lastQuarLocations; + TQStringList lastSearchPaths; + TQString quarloc; + TQPopupMenu* qmenu; + TQPopupMenu* hmenu; }; diff --git a/src/logoptions.ui b/src/logoptions.ui index d696136..ac9473d 100644 --- a/src/logoptions.ui +++ b/src/logoptions.ui @@ -1,6 +1,6 @@ LogOptions - + LogOptions @@ -15,7 +15,7 @@ Options for Logging - + LimitsGroup @@ -30,7 +30,7 @@ Logging Options - + textLabel2 @@ -46,7 +46,7 @@ Log the following events: - + layout4 @@ -62,7 +62,7 @@ unnamed - + kcfg_LaunchShutdown @@ -73,7 +73,7 @@ Alt+A - + kcfg_StartedStoppedCancelled @@ -84,7 +84,7 @@ Alt+D - + kcfg_Quarantined @@ -95,7 +95,7 @@ Alt+F - + kcfg_DBUpdates @@ -106,7 +106,7 @@ Alt+B - + kcfg_SoftwareUpdates @@ -117,7 +117,7 @@ Alt+U - + kcfg_VirusFound @@ -128,7 +128,7 @@ Alt+V - + kcfg_Error @@ -141,7 +141,7 @@ - + layout5 @@ -157,12 +157,12 @@ unnamed - + kcfg_ExpireDays - + MaxMBsEx @@ -170,7 +170,7 @@ Expire events after - + MaxMBsEx_2 diff --git a/src/pageviewer.cpp b/src/pageviewer.cpp index 2af253b..64b3265 100644 --- a/src/pageviewer.cpp +++ b/src/pageviewer.cpp @@ -17,12 +17,12 @@ #include -#include +#include #include using namespace KlamAV; -PageViewer::PageViewer(QWidget *parent, const char *name) +PageViewer::PageViewer(TQWidget *parent, const char *name) : Viewer(parent, name) { // 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()), 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_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(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(), SIGNAL(openURLRequest(const KURL&, const KParts::URLArgs&)), @@ -107,7 +107,7 @@ void PageViewer::slotBackAboutToShow() if ( m_current == m_history.begin() ) return; - QValueList::Iterator it = m_current; + TQValueList::Iterator it = m_current; --it; int i = 0; @@ -133,7 +133,7 @@ void PageViewer::slotForwardAboutToShow() if ( m_current == m_history.fromLast() ) return; - QValueList::Iterator it = m_current; + TQValueList::Iterator it = m_current; ++it; int i = 0; @@ -173,9 +173,9 @@ bool PageViewer::openURL(const KURL &url) m_backAction->setEnabled( m_current != m_history.begin() ); m_forwardAction->setEnabled( m_current != m_history.fromLast() ); - /* QString favicon = FeedIconManager::self()->iconLocation(url); + /* TQString favicon = FeedIconManager::self()->iconLocation(url); if (!favicon.isEmpty()) - emit setTabIcon(QPixmap(KGlobal::dirs()->findResource("cache", favicon+".png"))); + emit setTabIcon(TQPixmap(KGlobal::dirs()->findResource("cache", favicon+".png"))); else emit setTabIcon(SmallIcon("html")); */ @@ -192,7 +192,7 @@ void PageViewer::slotOpenURLRequest(const KURL& url, const KParts::URLArgs& args void PageViewer::slotPopupActivated( int id ) { - QValueList::Iterator it = m_history.begin(); + TQValueList::Iterator it = m_history.begin(); while( it != m_history.end() ) { if ( (*it).id == id ) @@ -210,7 +210,7 @@ void PageViewer::slotPopupActivated( int id ) // Taken from KDevelop (lib/widgets/kdevhtmlpart.cpp) void PageViewer::addHistoryEntry(const KURL& url) { - QValueList::Iterator it = m_current; + TQValueList::Iterator it = m_current; // 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() ) @@ -241,13 +241,13 @@ void PageViewer::slotCompleted( ) } // Taken from KDevelop (lib/widgets/kdevhtmlpart.cpp) -void PageViewer::slotCancelled( const QString & /*errMsg*/ ) +void PageViewer::slotCancelled( const TQString & /*errMsg*/ ) { m_stopAction->setEnabled(false); } -void PageViewer::slotSetCaption(const QString& cap) { +void PageViewer::slotSetCaption(const TQString& cap) { m_caption = cap; (*m_current).title = cap; } @@ -257,16 +257,16 @@ void PageViewer::slotPaletteOrFontChanged() //kdDebug() << "PageViewer::slotPaletteOrFontChanged()" << endl; // 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 ! return; int id = obj->metaObject()->findSlot("reparseConfiguration()"); if (id == -1) 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 // 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; - 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 bool isLink = kurl != Viewer::url(); diff --git a/src/pageviewer.h b/src/pageviewer.h index 1b28e4f..80a4ff5 100644 --- a/src/pageviewer.h +++ b/src/pageviewer.h @@ -11,8 +11,8 @@ #include using std::abs; -#include -#include +#include +#include #include "viewer.h" @@ -28,13 +28,13 @@ namespace KlamAV struct PageViewerHistoryEntry { KURL url; - QString title; + TQString title; int id; 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 public: - PageViewer(QWidget* parent, const char* name); + PageViewer(TQWidget* parent, const char* name); virtual bool openURL(const KURL &url); @@ -52,7 +52,7 @@ namespace KlamAV void slotForward(); void slotReload(); void slotStop(); - void slotSetCaption(const QString& cap); + void slotSetCaption(const TQString& cap); virtual void slotPaletteOrFontChanged(); protected: @@ -62,11 +62,11 @@ namespace KlamAV protected slots: void slotStarted(KIO::Job *); void slotCompleted(); - void slotCancelled(const QString &errMsg); + void slotCancelled(const TQString &errMsg); void slotBackAboutToShow(); void slotForwardAboutToShow(); 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 formClicked(const KURL& url, const KParts::URLArgs& args); @@ -74,11 +74,11 @@ namespace KlamAV virtual void slotOpenURLRequest(const KURL& url, const KParts::URLArgs& args); signals: - void setTabIcon(const QPixmap&); + void setTabIcon(const TQPixmap&); private: - QValueList m_history; - QValueList::Iterator m_current; + TQValueList m_history; + TQValueList::Iterator m_current; KToolBarPopupAction* m_backAction; KToolBarPopupAction* m_forwardAction; @@ -86,7 +86,7 @@ namespace KlamAV KAction* m_stopAction; bool m_restoring; - QString m_caption; + TQString m_caption; }; diff --git a/src/scanviewer.cpp b/src/scanviewer.cpp index 19d1f09..22ccb42 100644 --- a/src/scanviewer.cpp +++ b/src/scanviewer.cpp @@ -21,30 +21,30 @@ #include #include #include -#include +#include #include #include #include #include #include -#include -#include -#include -#include //QToolTip::palette() +#include +#include +#include +#include //TQToolTip::palette() #include static int counter = 0; -ScanViewer::ScanViewer(QWidget *parent, const char *name) - : QWidget(parent, name) +ScanViewer::ScanViewer(TQWidget *parent, const char *name) + : TQWidget(parent, name) { scanInProgress = TRUE; multiScan = FALSE; - //QGridLayout *layout = new QGridLayout(this, 6, 3, 10, 4); - layout = new QGridLayout(this, 6, 3, 10, 4); + //TQGridLayout *layout = new TQGridLayout(this, 6, 3, 10, 4); + layout = new TQGridLayout(this, 6, 3, 10, 4); layout->setColStretch(0, 10); layout->addColSpacing(1, 10); 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); - QFontMetrics rb_fm(resultview->fontMetrics()); + TQFontMetrics rb_fm(resultview->fontMetrics()); //resultview->setMinimumSize(rb_fm.width("0")*55, // rb_fm.lineSpacing()*15); resultview->addColumn( i18n( "Name of File" ),(resultview->width()/3)); resultview->addColumn( i18n( "Name of Problem Found" ),(resultview->width()/3)); resultview->addColumn( i18n( "Status" ),(resultview->width()/3)); - resultview->setResizeMode(QListView::AllColumns); - resultview->setSelectionMode( QListView::Extended ); + resultview->setResizeMode(TQListView::AllColumns); + resultview->setSelectionMode( TQListView::Extended ); resultview->setAllColumnsShowFocus(true); layout->addMultiCellWidget(resultview, 2, 2, 0, 2); - connect( resultview, SIGNAL(onItem ( QListViewItem * )), - SLOT(slotOnItem ( QListViewItem * ))); + connect( resultview, SIGNAL(onItem ( TQListViewItem * )), + SLOT(slotOnItem ( TQListViewItem * ))); connect( resultview, SIGNAL(onViewport ( )), SLOT(slotOffItem ( ))); - menu = new QPopupMenu( resultview ); + menu = new TQPopupMenu( resultview ); - connect(resultview, SIGNAL( contextMenuRequested( QListViewItem *, const QPoint& , int ) ), - this, SLOT( slotRMB( QListViewItem *, const QPoint &, int ) ) ); + connect(resultview, SIGNAL( contextMenuRequested( TQListViewItem *, const TQPoint& , int ) ), + this, SLOT( slotRMB( TQListViewItem *, const TQPoint &, int ) ) ); - status_frame = new QFrame(this); - status_frame->setFrameStyle(QFrame::Panel | QFrame::Sunken); - QBoxLayout *status_layout = new QHBoxLayout(status_frame, 2); + status_frame = new TQFrame(this); + status_frame->setFrameStyle(TQFrame::Panel | TQFrame::Sunken); + 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); - //matches_label = new QLabel(status_frame); - //QFontMetrics ml_fm(matches_label->fontMetrics()); + //matches_label = new TQLabel(status_frame); + //TQFontMetrics ml_fm(matches_label->fontMetrics()); //matches_label->setFixedWidth(ml_fm.width(i18n("9999 viruseses/errors found"))); //matches_label->setFixedHeight(ml_fm.lineSpacing()); //status_layout->addWidget(matches_label, 0); @@ -101,11 +101,11 @@ ScanViewer::ScanViewer(QWidget *parent, const char *name) status_frame->setMinimumSize(status_frame->size()); layout->addMultiCellWidget(status_frame, 3, 3, 0, 2); - status2_frame = new QFrame(this); - status2_frame->setFrameStyle(QFrame::Panel | QFrame::Sunken); - status2_layout = new QHBoxLayout(status2_frame, 2); + status2_frame = new TQFrame(this); + status2_frame->setFrameStyle(TQFrame::Panel | TQFrame::Sunken); + 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_label->hide(); @@ -119,25 +119,25 @@ ScanViewer::ScanViewer(QWidget *parent, const char *name) prog->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)")); status2_layout->addWidget(scan_time,10); scan_time->adjustSize(); scan_time->show(); - //status_frame->setPaletteBackgroundColor(QColor::Yellow); + //status_frame->setPaletteBackgroundColor(TQColor::Yellow); connect( scan_time, SIGNAL(clicked()), SLOT(slotCancelScanTime()) ); - matches2_label = new QLabel(status2_frame); - QFontMetrics ml_fm2(matches2_label->fontMetrics()); + matches2_label = new TQLabel(status2_frame); + TQFontMetrics ml_fm2(matches2_label->fontMetrics()); matches2_label->setFixedWidth(ml_fm2.width(i18n("9999 viruseses/problems found"))); matches2_label->setFixedHeight(ml_fm2.lineSpacing()); 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_frame->adjustSize(); @@ -167,7 +167,7 @@ ScanViewer::~ScanViewer() void ScanViewer::processOutput() { int pos; - QString item2; + TQString item2; if (!(childproc)) return; @@ -182,25 +182,25 @@ void ScanViewer::processOutput() //buf.replace("//","/"); // don't know why they're getting two slashes while ((childproc) && ((pos = (childproc->readln(item2,true))) != -1)) { - QListViewItem* tm; + TQListViewItem* tm; //item2 = (buf.section('\n',j,j)).stripWhiteSpace(); item2 = item2.stripWhiteSpace(); int fnameStartPoint = 0; int fnameEndPoint = item2.findRev(":"); - QString tmpFName = item2.mid(fnameStartPoint,(fnameEndPoint - fnameStartPoint)); + TQString tmpFName = item2.mid(fnameStartPoint,(fnameEndPoint - fnameStartPoint)); tmpFName = i18n(tmpFName); if ((pos = (item2.find(" FOUND"))) != -1){ //if ((pos = buf.section('\n',j,j).find("FOUND")) != -1){ - QString tmpVirusName = item2.mid((fnameEndPoint+1),(item2.length() - (fnameEndPoint+1))); - QDate today = QDate::currentDate(); - QTime now = QTime::currentTime(); - QString suffix = QString(":%1 %2") + TQString tmpVirusName = item2.mid((fnameEndPoint+1),(item2.length() - (fnameEndPoint+1))); + TQDate today = TQDate::currentDate(); + TQTime now = TQTime::currentTime(); + TQString suffix = TQString(":%1 %2") .arg(today.toString("ddd MMMM d yyyy")) .arg(now.toString("hh-mm-ss-zzz ap")); if ((tmpVirusName.find("FOUND")) != -1){ 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") ); //resultview->insertItem(buf.section('\n',j,j)); 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 = (item2.find("ERROR:"))) != -1){ - QString tmpVirusName = item2.mid((fnameEndPoint+1),(item2.length() - (fnameEndPoint+1))); - tm = new QListViewItem( resultview, tmpFName, tmpVirusName.stripWhiteSpace(),"Not a Virus"); + TQString tmpVirusName = item2.mid((fnameEndPoint+1),(item2.length() - (fnameEndPoint+1))); + tm = new TQListViewItem( resultview, tmpFName, tmpVirusName.stripWhiteSpace(),"Not a Virus"); tm->setPixmap( 0, SmallIcon("klamav_error") ); //resultview->insertItem(buf.section('\n',j,j)); CollectionDB::instance()->insertEvent("Error Found",tmpVirusName,tmpFName); @@ -225,7 +225,7 @@ void ScanViewer::processOutput() status2_label->setText(i18n("Files scanned: %1").arg(filesscanned)); //}else if ((pos = buf.section('\n',j,j).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); //}else if ((pos = buf.section('\n',j,j).find(": OK")) != -1){ }else if ((pos = (item2.find(": OK"))) != -1){ @@ -238,7 +238,7 @@ void ScanViewer::processOutput() filesscanned++; if (!(showProgress)) 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)); CollectionDB::instance()->insertEvent("Error Found","Access Denied",tmpFName); //}else if ((pos = buf.section('\n',j,j).find(": Can't open")) != -1){ @@ -248,7 +248,7 @@ void ScanViewer::processOutput() filesscanned++; if (!(showProgress)) 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)); CollectionDB::instance()->insertEvent("Error Found","Access Denied",tmpFName); }else if ((pos = (item2.find(": Empty file"))) != -1){ @@ -256,14 +256,14 @@ void ScanViewer::processOutput() filesscanned++; if (!(showProgress)) 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)); CollectionDB::instance()->insertEvent("Error Found","Empty File",tmpFName); } item2 = ""; } - QString str; + TQString str; str.setNum(resultview->childCount()); 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); @@ -318,15 +318,15 @@ void ScanViewer::slotScan(const QStringList & filepattern, int mode, bool recurs //progosd->setProgress(0); kdDebug() << filepattern << endl; - QStringList tmpfilepattern = filepattern; + TQStringList tmpfilepattern = filepattern; cnt = 0; - //QStringList temp = QStringList::split(" ", tmpfilepattern.replace("\"","")); + //TQStringList temp = TQStringList::split(" ", tmpfilepattern.replace("\"","")); //kdDebug() << temp << endl; if (calculateTime){ - for ( QStringList::Iterator it = tmpfilepattern.begin(); it != tmpfilepattern.end(); ++it ){ - QDir d( QString((*it).latin1()).stripWhiteSpace() ); - kdDebug() << "dir " << QString((*it).latin1()).stripWhiteSpace() << endl; + for ( TQStringList::Iterator it = tmpfilepattern.begin(); it != tmpfilepattern.end(); ++it ){ + TQDir d( TQString((*it).latin1()).stripWhiteSpace() ); + kdDebug() << "dir " << TQString((*it).latin1()).stripWhiteSpace() << endl; counter = 0; cnt = cnt + countFiles(d); if (scanCancelled) @@ -353,36 +353,36 @@ void ScanViewer::slotScan(const QStringList & filepattern, int mode, bool recurs filesscanned = 0; //status2_label->setText(i18n("Scan in Progress...")); - QString db; + TQString db; if(!( args->isSet( "scanthis" ) ) ) db = kmain->freshklam->getCurrentDBDir(); else{ config->setGroup("Freshklam"); - QStringList lastDownloadPaths = config->readListEntry("lastDownloadPaths"); - for (QStringList::Iterator ita = lastDownloadPaths.begin(); ita == lastDownloadPaths.begin() ; ita++){ + TQStringList lastDownloadPaths = config->readListEntry("lastDownloadPaths"); + for (TQStringList::Iterator ita = lastDownloadPaths.begin(); ita == lastDownloadPaths.begin() ; ita++){ db = *ita; } } ////kdDebug() << "here 2" << endl; - QString dbpath; - QString excludes; - QString options; + TQString dbpath; + TQString excludes; + TQString options; if (!(db.isEmpty())) - dbpath = QString(" -d %1 ").arg(db); + dbpath = TQString(" -d %1 ").arg(db); config->setGroup("Klamscan"); if (config->readEntry("ExcludeQuarantine") == "Yes"){ config->setGroup("Kuarantine"); - QStringList lastQuarLocations = config->readListEntry("KuarantineLocations"); - QString quarloc; - for (QStringList::Iterator ita = lastQuarLocations.begin(); ita == lastQuarLocations.begin() ; ita++){ + TQStringList lastQuarLocations = config->readListEntry("KuarantineLocations"); + TQString quarloc; + for (TQStringList::Iterator ita = lastQuarLocations.begin(); ita == lastQuarLocations.begin() ; 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) - options += "--max-files=" + QString("%1").arg(KlamavConfig::noFilesToExtract()) + " "; + options += "--max-files=" + TQString("%1").arg(KlamavConfig::noFilesToExtract()) + " "; // if (KlamavConfig::mBsToExtract() > 0) -// options += "--max-space=" + QString("%1").arg(KlamavConfig::mBsToExtract()) + " "; +// options += "--max-space=" + TQString("%1").arg(KlamavConfig::mBsToExtract()) + " "; // // if (KlamavConfig::compressionRatio() > 0) -// options += "--max-ratio=" + QString("%1").arg(KlamavConfig::compressionRatio()) + " "; +// options += "--max-ratio=" + TQString("%1").arg(KlamavConfig::compressionRatio()) + " "; if (KlamavConfig::recursionLevel() > 0) - options += "--max-recursion=" + QString("%1").arg(KlamavConfig::recursionLevel()) + " "; + options += "--max-recursion=" + TQString("%1").arg(KlamavConfig::recursionLevel()) + " "; 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) - options += "--max-scansize=" + QString("%1").arg(KlamavConfig::maxScanSize()) + "M "; + options += "--max-scansize=" + TQString("%1").arg(KlamavConfig::maxScanSize()) + "M "; //config->setGroup("Klamscan"); // if (KlamavConfig::virusLimitsExceeded()) @@ -588,7 +588,7 @@ void ScanViewer::slotCancel() //status2_frame->adjustSize(); 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; 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){ kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_scan_safe")); - QTimer::singleShot( 10000, this, SLOT(resetSysTray()) ); + TQTimer::singleShot( 10000, this, SLOT(resetSysTray()) ); if (!(errorsEncountered)) KNotifyClient::event(kmain->_tray->winId(),i18n( "ScanCompleteNoVirus" ), i18n( "Scan Complete - No Viruses Found!" )); else @@ -624,7 +624,7 @@ void ScanViewer::childExited() 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" )); 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; case 5 : Quarantine(); break; } @@ -681,7 +681,7 @@ void ScanViewer::childExited() void ScanViewer::receivedOutput(KProcIO *) { - //buf += QCString(buffer, buflen+1); + //buf += TQCString(buffer, buflen+1); processOutput(); //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->setCurrentText(dir); // } @@ -707,30 +707,30 @@ void ScanViewer::slotClear() void ScanViewer::Quarantine(){ bool allQuarantined=TRUE; config->setGroup("Kuarantine"); - QStringList lastQuarLocations = config->readListEntry("KuarantineLocations"); + TQStringList lastQuarLocations = config->readListEntry("KuarantineLocations"); kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_quarantining")); - QString quarloc; - for (QStringList::Iterator it = lastQuarLocations.begin(); it == lastQuarLocations.begin() ; it++){ + TQString quarloc; + for (TQStringList::Iterator it = lastQuarLocations.begin(); it == lastQuarLocations.begin() ; 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) { lastQuarItems.remove(*it); } - QString item2 = (*it).stripWhiteSpace(); + TQString item2 = (*it).stripWhiteSpace(); int fnameStartPoint = 0; int dtStartPoint = item2.findRev(":"); int fnameEndPoint = item2.findRev(":", (signed int)-((item2.length() - dtStartPoint)+1)); - QString fname = item2.mid(fnameStartPoint,(fnameEndPoint - fnameStartPoint)); - QString itemName = item2.mid((fnameEndPoint+1),((dtStartPoint+1) - (fnameEndPoint+2))); - QString when = item2.mid((dtStartPoint+1),(item2.length() - (dtStartPoint+1))); + TQString fname = item2.mid(fnameStartPoint,(fnameEndPoint - fnameStartPoint)); + TQString itemName = item2.mid((fnameEndPoint+1),((dtStartPoint+1) - (fnameEndPoint+2))); + TQString when = item2.mid((dtStartPoint+1),(item2.length() - (dtStartPoint+1))); if (!(fname.isEmpty())){ - QStringList tokens = QStringList::split ( "/", fname, FALSE ); - QString qname = tokens.last(); + TQStringList tokens = TQStringList::split ( "/", fname, FALSE ); + TQString qname = tokens.last(); qname.prepend("/"); qname.prepend(quarloc); qname.append(":"+when); @@ -741,7 +741,7 @@ void ScanViewer::Quarantine(){ (resultview->findItem(fname,0))->setText(2,"Quarantined"); (resultview->findItem(fname,0))->setPixmap( 0, SmallIcon("klamav") ); chmod((const char *)qname,0400); - CollectionDB::instance()->insertEvent("Quarantine",QString("Quarantined"),fname); + CollectionDB::instance()->insertEvent("Quarantine",TQString("Quarantined"),fname); }else{ KMessageBox::information (this,i18n("

    There was a problem quarantining %1. Check your diskspace, the permissions on your quarantine location and whether a file with the same name already exists in the quarantine.

    ").arg(fname)); @@ -757,7 +757,7 @@ void ScanViewer::Quarantine(){ kmain->_tray->setPixmap(KSystemTray::loadIcon("klamav_on_acc_disabled")); }else 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(); //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 ){ - QPixmap gicon; - QPixmap vicon; - QPixmap vlicon; - QPixmap ticon; + TQPixmap gicon; + TQPixmap vicon; + TQPixmap vlicon; + 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() ) vicon = SmallIcon("find"); else - vicon = QPixmap( iconPath ); + vicon = TQPixmap( iconPath ); iconPath = locate("cache", KMimeType::favIconForURL("http://www.google.com")+".png"); if ( iconPath.isEmpty() ) gicon = SmallIcon("find"); else - gicon = QPixmap( iconPath ); + gicon = TQPixmap( iconPath ); iconPath = locate("cache", KMimeType::favIconForURL("http://www.trendmicro.com")+".png"); if ( iconPath.isEmpty() ) ticon = SmallIcon("find"); else - ticon = QPixmap( iconPath ); + ticon = TQPixmap( iconPath ); iconPath = locate("cache", KMimeType::favIconForURL("http://www.viruslist.com")+".png"); if ( iconPath.isEmpty() ) vlicon = SmallIcon("find"); else - vlicon = QPixmap( iconPath ); + vlicon = TQPixmap( iconPath ); menu->clear(); menu->insertItem( "Quarantine Selected", this,SLOT(slotQuarantineSelected()) ); @@ -814,16 +814,16 @@ void ScanViewer::slotRMB( QListViewItem* Item, const QPoint & point, int ) void ScanViewer::slotQuarantineSelected() { - QPtrList list; - QListViewItemIterator it( resultview, QListViewItemIterator::Selected ); + TQPtrList list; + TQListViewItemIterator it( resultview, TQListViewItemIterator::Selected ); QuarantineList = ""; while ( it.current() ) { - QListViewItem* tItem = it.current(); + TQListViewItem* tItem = it.current(); - QDate today = QDate::currentDate(); - QTime now = QTime::currentTime(); - QString suffix = QString(":%1 %2") + TQDate today = TQDate::currentDate(); + TQTime now = TQTime::currentTime(); + TQString suffix = TQString(":%1 %2") .arg(today.toString("ddd MMMM d yyyy")) .arg(now.toString("hh-mm-ss ap")); @@ -838,25 +838,25 @@ void ScanViewer::slotQuarantineSelected() void ScanViewer::slotGoogle() { - QString name = resultview->currentItem()->text(1); + TQString name = resultview->currentItem()->text(1); kmain->klamdb->slotExternal(name, "Google"); } void ScanViewer::slotVirusPool() { - QString name = resultview->currentItem()->text(1); + TQString name = resultview->currentItem()->text(1); kmain->klamdb->slotExternal(name, "VirusPool"); } void ScanViewer::slotTrendMicro() { - QString name = resultview->currentItem()->text(1); + TQString name = resultview->currentItem()->text(1); kmain->klamdb->slotExternal(name, "TrendMicro"); } void ScanViewer::slotVirusList() { - QString name = resultview->currentItem()->text(1); + TQString name = resultview->currentItem()->text(1); kmain->klamdb->slotExternal(name, "VirusList"); } @@ -889,7 +889,7 @@ void ScanViewer::slotCancelScanTime() // // cnt = 0; // //kdDebug() << "m_filepattern" << m_filepattern << endl; -// QDir d( m_filepattern ); +// TQDir d( m_filepattern ); // // int num = countFiles(d); // // if (countFiles(d) > 0) // // //kdDebug() << "count" << num << endl; @@ -904,7 +904,7 @@ void ScanViewer::slotCancelScanTime() // // } -int ScanViewer::countFiles( QDir & root) +int ScanViewer::countFiles( TQDir & root) { kapp->processEvents(); @@ -913,38 +913,38 @@ int ScanViewer::countFiles( QDir & root) // kapp->processEvents(); 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; - 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 == "..") continue; - QFileInfo fi(root, entry ); + TQFileInfo fi(root, entry ); entry = fi.absFilePath(); - entry = QDir::convertSeparators(entry); + entry = TQDir::convertSeparators(entry); if ((fi.isFile()) && !(fi.isSymLink())){ counter++; }else if ((fi.isDir()) && !(fi.isSymLink())){ - QDir temp(entry); + TQDir temp(entry); countFiles(temp); } } return counter; } -void ScanViewer::startProgressDialog( const QString & text ) +void ScanViewer::startProgressDialog( const TQString & text ) { //if ( 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->showCancelButton( true ); @@ -956,7 +956,7 @@ void ScanViewer::startProgressDialog( const QString & text ) progressDialog->setMinimumDuration( 500 ); progressDialog->show(); - timer = new QTimer( this ); + timer = new TQTimer( this ); connect( timer, SIGNAL( timeout() ), this, SLOT( slotProg() ) ); timer->start( 200, FALSE ); @@ -969,17 +969,17 @@ void ScanViewer::slotProg() 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(); - QString message = problem + " is probably a virus. Right-click and select a service to research it."; + TQString problem = lineitem->text(1).stripWhiteSpace(); + TQString message = problem + " is probably a virus. Right-click and select a service to research it."; - QString path( lineitem->text(0).stripWhiteSpace() ); - QString file = path.section( '/', -1 ); + TQString path( lineitem->text(0).stripWhiteSpace() ); + TQString file = path.section( '/', -1 ); if ((problem.contains("ExceededFile")) || (problem == "Archive.ExceededRecursionLimit") || diff --git a/src/scanviewer.h b/src/scanviewer.h index ffb8d11..00de43b 100644 --- a/src/scanviewer.h +++ b/src/scanviewer.h @@ -17,22 +17,22 @@ class KPrinter; class KToggleAction; class KURL; -class QLineEdit; -class QComboBox; -class QCheckBox; -class QListBox; -class QListView; -class QListViewItem; -class QPushButton; -class QLabel; +class TQLineEdit; +class TQComboBox; +class TQCheckBox; +class TQListBox; +class TQListView; +class TQListViewItem; +class TQPushButton; +class TQLabel; class KProcIO; class KConfig; class KURLRequester; class KProgress; class K3bJobProgressOSD; class KProgressDialog; -class QDir; -class QGridLayout; +class TQDir; +class TQGridLayout; /** * This class serves as the main window for ScanViewer. It handles the @@ -42,14 +42,14 @@ class QGridLayout; * @author $AUTHOR <$EMAIL> * @version $APP_VERSION */ -class ScanViewer : public QWidget +class ScanViewer : public TQWidget { Q_OBJECT public: /** * Default Constructor */ - ScanViewer(QWidget *parent, const char *name=0); + ScanViewer(TQWidget *parent, const char *name=0); /** * Default Destructor @@ -60,18 +60,18 @@ public: * Use this method to load whatever file/URL you have */ - //void setDirName(QString); - void slotScan(const QStringList & filepattern, int mode, bool recursive, bool dcopscan); + //void setDirName(TQString); + void slotScan(const TQStringList & filepattern, int mode, bool recursive, bool dcopscan); void slotCancel(); void slotStartAgain(); bool scanGoingOn(); protected: /** - * Overridden virtuals for Qt drag 'n drop (XDND) + * Overridden virtuals for TQt drag 'n drop (XDND) */ - /*virtual void dragEnterEvent(QDragEnterEvent *event); - virtual void dropEvent(QDropEvent *event);*/ + /*virtual void dragEnterEvent(TQDragEnterEvent *event); + virtual void dropEvent(TQDropEvent *event);*/ protected: /** @@ -91,19 +91,19 @@ protected: private slots: void slotProg(); - void slotOnItem( QListViewItem * lineitem); + void slotOnItem( TQListViewItem * lineitem); void slotOffItem(); private: void setupAccel(); void setupActions(); - void startProgressDialog( const QString & text ); + void startProgressDialog( const TQString & text ); private: signals: - void itemSelected(QString abs_filename, int line); - void scanFinished(QWidget *); - void scanStartingAgain(QWidget *); + void itemSelected(TQString abs_filename, int line); + void scanFinished(TQWidget *); + void scanStartingAgain(TQWidget *); public slots: @@ -113,68 +113,68 @@ private slots: void childExited(); void resetSysTray(); void receivedOutput(KProcIO *); - //void itemSelected(const QString&); + //void itemSelected(const TQString&); void slotClear(); - void slotRMB( QListViewItem *, const QPoint &, int ); + void slotRMB( TQListViewItem *, const TQPoint &, int ); void slotQuarantineSelected(); void slotVirusPool(); void slotVirusList(); void slotGoogle(); void slotTrendMicro(); void slotCancelScanTime(); - //void patternTextChanged( const QString &); + //void patternTextChanged( const TQString &); private: void processOutput(); void finish(); void getout(); void Quarantine(); void askUser(); - int countFiles( QDir & root); + int countFiles( TQDir & root); //void ScanViewer::startProgress(); - QLineEdit *template_edit; - QComboBox *files_combo, *pattern_combo, *check_combo; + TQLineEdit *template_edit; + TQComboBox *files_combo, *pattern_combo, *check_combo; //KComboBox *dir_combo; - QCheckBox *recursive_box; - QCheckBox *recursive_box2; - QListView *resultview; - QPushButton *search_button, *cancel_button; - QLabel *status_label, *status2_label,*matches_label,*matches2_label; + TQCheckBox *recursive_box; + TQCheckBox *recursive_box2; + TQListView *resultview; + TQPushButton *search_button, *cancel_button; + TQLabel *status_label, *status2_label,*matches_label,*matches2_label; KProcIO *childproc; - QString buf; + TQString buf; KConfig* config; - QStringList lastSearchItems; - QStringList lastScanPaths; - QStringList lastQuarItems; - QStringList QuarantineList; + TQStringList lastSearchItems; + TQStringList lastScanPaths; + TQStringList lastQuarItems; + TQStringList QuarantineList; bool errorsEncountered; - QPopupMenu* menu; - QPushButton* adv_options; - QPushButton* schedule; - QString selectedVirus; + TQPopupMenu* menu; + TQPushButton* adv_options; + TQPushButton* schedule; + TQString selectedVirus; bool multiScan; - QString urlsToScan; + TQString urlsToScan; bool scanInProgress; bool scanCancelled; - QString prevdir; - QStringList listOfUrlsToScan; + TQString prevdir; + TQStringList listOfUrlsToScan; bool multi_recursive; int m_mode; - QStringList m_filepattern; + TQStringList m_filepattern; bool m_recursive; int filesscanned; int cnt; KProgressDialog* progress; KProgress* prog; K3bJobProgressOSD* progosd; - QBoxLayout *status2_layout; - QFrame *status2_frame; - QGridLayout *layout; + TQBoxLayout *status2_layout; + TQFrame *status2_frame; + TQGridLayout *layout; KProgressDialog *progressDialog; - QTimer *timer; - QPushButton* scan_time; + TQTimer *timer; + TQPushButton* scan_time; bool calculateTime; bool showProgress; - QFrame *status_frame; + TQFrame *status_frame; }; #endif // _SCANVIEWER_H_ diff --git a/src/schedule.cpp b/src/schedule.cpp index 1400f62..56c03d2 100644 --- a/src/schedule.cpp +++ b/src/schedule.cpp @@ -10,10 +10,10 @@ #include "ktview.h" -#include +#include #include -#include -#include +#include +#include //#include #include #include @@ -22,8 +22,8 @@ #include -Schedule::Schedule( QWidget* parent, QStringList filepattern, const char* name, bool modal, WFlags fl ) - : QDialog( parent, name, modal, fl ) +Schedule::Schedule( TQWidget* parent, TQStringList filepattern, const char* name, bool modal, WFlags fl ) + : TQDialog( parent, name, modal, fl ) { setCaption( i18n( "Schedule Scan" ) ); @@ -37,16 +37,16 @@ Schedule::Schedule( QWidget* parent, QStringList filepattern, const char* name, _filepattern = filepattern; - //bool isRTL = QApplication::reverseLayout(); - QVBoxLayout *vbox = new QVBoxLayout(this, KDialog::marginHint(), + //bool isRTL = TQApplication::reverseLayout(); + TQVBoxLayout *vbox = new TQVBoxLayout(this, KDialog::marginHint(), 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); - QGridLayout *layout = new QGridLayout( group, 6, 6, KDialog::spacingHint(), + TQGridLayout *layout = new TQGridLayout( group, 6, 6, KDialog::spacingHint(), KDialog::spacingHint(), "layout"); layout->addRowSpacing(0, group->fontMetrics().height()); 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("Every day at ")); 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)); layout->addWidget(hour, 1, 1); - QLabel *dots1 = new QLabel(":", group); + TQLabel *dots1 = new TQLabel(":", group); dots1->setMinimumWidth( 7 ); - dots1->setAlignment( QLabel::AlignCenter ); + dots1->setAlignment( TQLabel::AlignCenter ); layout->addWidget(dots1, 1, 2); 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); //add->setFixedSize(add->sizeHint()); connect( add, SIGNAL(clicked()), SLOT(slotScheduleScan()) ); - QPushButton* del = new QPushButton ("Delete", group); + TQPushButton* del = new TQPushButton ("Delete", group); layout->addWidget(del,1,6); //del->setFixedSize(del->sizeHint()); @@ -108,21 +108,21 @@ Schedule::Schedule( QWidget* parent, QStringList filepattern, const char* name, SLOT(slotDelete()) ); - //schedulebox = new QListView(group); + //schedulebox = new TQListView(group); schedulebox = new KTView(group); - QFontMetrics rb_fm(schedulebox->fontMetrics()); + TQFontMetrics rb_fm(schedulebox->fontMetrics()); schedulebox->setMinimumSize(rb_fm.width("0")*55, rb_fm.lineSpacing()*15); /* //kdDebug() << ((schedulebox->width())/2) << endl; schedulebox->addColumn( "Paths to Scan",(group->width())); schedulebox->addColumn( "When to Scan",(group->width())); - schedulebox->setResizeMode(QListView::AllColumns); - schedulebox->setSelectionMode( QListView::Extended ); + schedulebox->setResizeMode(TQListView::AllColumns); + schedulebox->setSelectionMode( TQListView::Extended ); schedulebox->setAllColumnsShowFocus(true);*/ layout->addMultiCellWidget(schedulebox, 2, 4,0,6); - QHBoxLayout *h5 = new QHBoxLayout( vbox, KDialog::spacingHint() ); + TQHBoxLayout *h5 = new TQHBoxLayout( vbox, KDialog::spacingHint() ); h5->addStretch( 1 ); // OK @@ -151,25 +151,25 @@ void Schedule::slotQueryDatePicker(int) if (check_combo->currentText().contains(i18n("specific date")) ){ DatePicker *_calendar; - _calendar = new DatePicker(this, QDateTime::currentDateTime().date()); + _calendar = new DatePicker(this, TQDateTime::currentDateTime().date()); int x = this->width() - (this->width()/2); int y = this->height() - (this->height()/2); - _calendar->move(QPoint(x,y)); + _calendar->move(TQPoint(x,y)); _calendar->show(); _calendar->setFocus(); - connect( _calendar, SIGNAL(signalSelectedDate(QDate)),this, - SLOT(slotAddDateToCombo(QDate)) ); + connect( _calendar, SIGNAL(signalSelectedDate(TQDate)),this, + SLOT(slotAddDateToCombo(TQDate)) ); } } -void Schedule::slotAddDateToCombo(QDate newdate) +void Schedule::slotAddDateToCombo(TQDate newdate) { //check_combo->insertItem _date = newdate; //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->setCurrentItem(check_combo->count()-1); @@ -194,7 +194,7 @@ void Schedule::slotScheduleScan() CTCron* ctcron((CTCron*)*i); */ //delete cttask; - QString command = check_combo->currentText(); + TQString command = check_combo->currentText(); @@ -203,28 +203,28 @@ void Schedule::slotScheduleScan() cttask->user = ""; 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->command = (const char *)QString("%1").arg(startupcommand).local8Bit(); + cttask->command = (const char *)TQString("%1").arg(startupcommand).local8Bit(); cttask->enabled = FALSE; }else{ 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->silent = FALSE; - int curhour = (QTime::currentTime()).hour(); - unsigned int curmin = (QTime::currentTime()).minute(); + int curhour = (TQTime::currentTime()).hour(); + unsigned int curmin = (TQTime::currentTime()).minute(); - int shour = QString(hour->text()).toInt(); - unsigned int smin = QString(minute->text()).toInt(); + int shour = TQString(hour->text()).toInt(); + unsigned int smin = TQString(minute->text()).toInt(); int sdatedayofweek = _date.dayOfWeek(); - int todaydayofweek = QDate::currentDate().dayOfWeek(); + int todaydayofweek = TQDate::currentDate().dayOfWeek(); if (command.contains(i18n("at the current time")) ){ @@ -251,7 +251,7 @@ void Schedule::slotScheduleScan() }else if (command.contains(i18n("Every month")) ){ if (command.contains(i18n("from now on") )) - cttask->dayOfMonth.set(QDate::currentDate().day(), TRUE); + cttask->dayOfMonth.set(TQDate::currentDate().day(), TRUE); else cttask->dayOfMonth.set(_date.day(), TRUE); 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()); if (cttask->dirty()) ctcron->task.push_back(cttask); - //new KTListTask(this, ctcron, cttask); // Qt will clean up + //new KTListTask(this, ctcron, cttask); // TQt will clean up else delete cttask; @@ -303,7 +303,7 @@ void Schedule::slotScheduleScan() schedulebox->refresh(); cthost->apply(); - //QListViewItem* tm = new QListViewItem( schedulebox, _filepattern, description); + //TQListViewItem* tm = new TQListViewItem( schedulebox, _filepattern, description); /* if (cthost->isError()) { @@ -320,7 +320,7 @@ void Schedule::slotDelete() { //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(); schedulebox->remove(); cthost->apply(); @@ -337,33 +337,33 @@ void Schedule::slotCancel() close(); } -QString Schedule::createScanScript() +TQString Schedule::createScanScript() { - QString path = getenv("HOME"); + TQString path = getenv("HOME"); path += "/.klamav"; - QDir klamavdir(path); + TQDir klamavdir(path); if (!klamavdir.exists() && !klamavdir.mkdir(path)) - return QString("Error"); + return TQString("Error"); - QTime now = QTime::currentTime(); - QDate today = QDate::currentDate(); - QString timestring = QString("%1%2") + TQTime now = TQTime::currentTime(); + TQDate today = TQDate::currentDate(); + TQString timestring = TQString("%1%2") .arg(today.toString("ddMMyy")) .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 ) ) { - QTextStream ts( &file ); + TQTextStream ts( &file ); - QString kdedir = getenv("KDEDIR"); + TQString kdedir = getenv("KDEDIR"); ts << "#!/bin/bash" << "\n"; ts << "HOSTNAME=`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 << "DCOPSERVER=`cat /home/${USER}/.DCOPserver_${HOSTNAME}_:0 | grep local`" << "\n"; ts << "export DCOPSERVER" << "\n"; @@ -396,33 +396,33 @@ QString Schedule::createScanScript() chmod((const char *)file.name(), S_IWUSR | S_IRUSR | S_IEXEC ); return file.name(); }else - return QString("Error"); + return TQString("Error"); } -QString Schedule::createStartupScript() +TQString Schedule::createStartupScript() { - QString path = KGlobalSettings::autostartPath(); - QDir startupdir(path); + TQString path = KGlobalSettings::autostartPath(); + TQDir startupdir(path); if (!startupdir.exists()) - return QString("Error"); + return TQString("Error"); - QTime now = QTime::currentTime(); - QDate today = QDate::currentDate(); - QString timestring = QString("%1%2") + TQTime now = TQTime::currentTime(); + TQDate today = TQDate::currentDate(); + TQString timestring = TQString("%1%2") .arg(today.toString("ddMMyy")) .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 ) ) { - QTextStream ts( &file ); + TQTextStream ts( &file ); ts << "[Desktop Entry]" << "\n"; ts << "Encoding=UTF-8" << "\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 << "Type=Application" << "\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 ); return file.name(); }else - return QString("Error"); + return TQString("Error"); } -HMSTimeWidget::HMSTimeWidget(QWidget *parent, const char *name) : +HMSTimeWidget::HMSTimeWidget(TQWidget *parent, const char *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 ) { s = "0" + s; } return s; } -QValidator::State KStrictIntValidator::validate( QString & input, int & d ) const +TQValidator::State KStrictIntValidator::validate( TQString & input, int & d ) const { if( input.isEmpty() ) return Valid; - State st = QIntValidator::validate( input, d ); + State st = TQIntValidator::validate( input, d ); if( st == Intermediate ) return Invalid; diff --git a/src/schedule.h b/src/schedule.h index f93d379..adc99eb 100644 --- a/src/schedule.h +++ b/src/schedule.h @@ -5,17 +5,17 @@ #ifndef _SCHEDULE_H_ #define _SCHEDULE_H_ -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include #include "cthost.h" #include "cttask.h" @@ -28,39 +28,39 @@ class KPrinter; class KToggleAction; class KURL; -class QLineEdit; -class QComboBox; -class QCheckBox; -class QListBox; -//class QListView; +class TQLineEdit; +class TQComboBox; +class TQCheckBox; +class TQListBox; +//class TQListView; class KTView; -class QListViewItem; -class QPushButton; -class QLabel; +class TQListViewItem; +class TQPushButton; +class TQLabel; class KProcess; class KConfig; class KURLRequester; class CollectionSetup; -class QToolButton; -class QHBoxLayout; +class TQToolButton; +class TQHBoxLayout; class HMSTimeWidget : public KIntSpinBox { Q_OBJECT public: - HMSTimeWidget(QWidget *parent=0, const char *name=0); + HMSTimeWidget(TQWidget *parent=0, const char *name=0); protected: - QString mapValueToText(int); + TQString mapValueToText(int); }; -class KStrictIntValidator : public QIntValidator +class KStrictIntValidator : public TQIntValidator { public: - KStrictIntValidator(int bottom, int top, QWidget * parent, + KStrictIntValidator(int bottom, int top, TQWidget * parent, 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> * @version $APP_VERSION */ -class Schedule : public QDialog +class Schedule : public TQDialog { Q_OBJECT public: /** * 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 @@ -89,16 +89,16 @@ public: * Use this method to load whatever file/URL you have */ - void setDirName(QString); + void setDirName(TQString); bool isMultiScan(); const CTHost& getCTHost() const; protected: /** - * Overridden virtuals for Qt drag 'n drop (XDND) + * Overridden virtuals for TQt drag 'n drop (XDND) */ - /*virtual void dragEnterEvent(QDragEnterEvent *event); - virtual void dropEvent(QDropEvent *event);*/ + /*virtual void dragEnterEvent(TQDragEnterEvent *event); + virtual void dropEvent(TQDropEvent *event);*/ protected: /** @@ -118,7 +118,7 @@ protected: private slots: void slotQueryDatePicker(int index); - void slotAddDateToCombo(QDate newdate); + void slotAddDateToCombo(TQDate newdate); void slotScheduleScan(); void slotDelete(); void slotOK(); @@ -126,8 +126,8 @@ private slots: private: void setupAccel(); void setupActions(); - QString createScanScript(); - QString createStartupScript(); + TQString createScanScript(); + TQString createStartupScript(); private: signals: @@ -135,30 +135,30 @@ signals: public slots: private slots: private: - QLineEdit *template_edit; - QComboBox *files_combo, *pattern_combo, *check_combo; - QCheckBox *recursive_box; -// QListView *resultview; - QPushButton *search_button, *cancel_button; - QLabel *status_label, *status2_label,*matches_label,*matches2_label; + TQLineEdit *template_edit; + TQComboBox *files_combo, *pattern_combo, *check_combo; + TQCheckBox *recursive_box; +// TQListView *resultview; + TQPushButton *search_button, *cancel_button; + TQLabel *status_label, *status2_label,*matches_label,*matches2_label; KProcess *childproc; - QString buf; + TQString buf; KConfig* config; bool errorsEncountered; - QPushButton* adv_options; - QString urlsToScan; - QString prevdir; - QStringList listOfUrlsToScan; + TQPushButton* adv_options; + TQString urlsToScan; + TQString prevdir; + TQStringList listOfUrlsToScan; bool multi_recursive; CollectionSetup* setup; - QToolButton *m_tabsClose; - QToolButton* play; - QToolButton* stop; - QHBoxLayout* controls; - QDate _date; + TQToolButton *m_tabsClose; + TQToolButton* play; + TQToolButton* stop; + TQHBoxLayout* controls; + TQDate _date; HMSTimeWidget* hour; HMSTimeWidget* minute; - QStringList _filepattern; + TQStringList _filepattern; KTView *schedulebox; CTHost* cthost; CTTask* cttask; diff --git a/src/sigtool.cpp b/src/sigtool.cpp index 77c92a0..779047b 100644 --- a/src/sigtool.cpp +++ b/src/sigtool.cpp @@ -12,7 +12,7 @@ #include -#include +#include #include const char *mail_clients[] = { @@ -21,57 +21,57 @@ const char *mail_clients[] = { 0 }; -Sigtool::Sigtool(QWidget *parent, const char *name) - : QWidget(parent, name) +Sigtool::Sigtool(TQWidget *parent, const char *name) + : TQWidget(parent, name) { - QVBoxLayout *vbox = new QVBoxLayout(this, KDialog::marginHint(), + TQVBoxLayout *vbox = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint(), "vbox"); //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); - 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"); mail_layout->addRowSpacing(0, mail_group->fontMetrics().height()); mail_layout->setColStretch(1, 1); mail_layout->setColStretch(2, 1); //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); - 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); - mail_dir_label->setAlignment(Qt::AlignRight); + TQLabel *mail_dir_label = new TQLabel(i18n("Choose your email client:"), mail_hlp); + mail_dir_label->setAlignment(TQt::AlignRight); //mail_dir_label->setFixedSize(mail_dir_label->sizeHint()); 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->adjustSize(); //check_combo->setFixedSize(check_combo->size()); mail_dir_layout->addWidget(check_combo,0,3); //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); -// 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); //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); //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); // actionbox->addStretch(); // 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); - QGridLayout *notes_layout = new QGridLayout( Notes, 5, 2, KDialog::spacingHint(), + TQGridLayout *notes_layout = new TQGridLayout( Notes, 5, 2, KDialog::spacingHint(), KDialog::spacingHint(), "notes_layout"); notes_layout->addRowSpacing(0, Notes->fontMetrics().height()); notes_layout->setColStretch(0, 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); - 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->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) ); + notes_label = new TQLabel(i18n(text), notes_hlp); + notes_label->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) ); //notes_label->setFixedSize(notes_label->sizeHint()); notes_box->addWidget(notes_label); @@ -112,7 +112,7 @@ Sigtool::Sigtool(QWidget *parent, const char *name) SLOT(configureKMail()) ); connect( manual_button, SIGNAL(clicked()), SLOT(manual()) ); - connect( check_combo, SIGNAL(activated(const QString &)), + connect( check_combo, SIGNAL(activated(const TQString &)), SLOT(dobuttons()) ); @@ -129,25 +129,25 @@ void Sigtool::configureKMail(){ KMessageBox::information (this,i18n( "Please ensure KMail is not open before we proceed.") ); - QString DatabaseLocation; + TQString DatabaseLocation; config = KGlobal::config(); config->setGroup("Freshklam"); - QStringList lastDownloadPaths = config->readListEntry("lastDownloadPaths"); - for (QStringList::Iterator it = lastDownloadPaths.begin(); it == lastDownloadPaths.begin() ; it++){ + TQStringList lastDownloadPaths = config->readListEntry("lastDownloadPaths"); + for (TQStringList::Iterator it = lastDownloadPaths.begin(); it == lastDownloadPaths.begin() ; it++){ DatabaseLocation = *it; } config = new KConfig("kmailrc"); config->setGroup("General"); - QVariant nooffilters = config->readEntry("filters"); + TQVariant nooffilters = config->readEntry("filters"); int numfilters = nooffilters.toInt(); nooffilters = numfilters; for (int j=0; j != numfilters; j++ ){ - QVariant numb = j; - QString filtername=QString("Filter #%1").arg(numb.toString()); + TQVariant numb = j; + TQString filtername=TQString("Filter #%1").arg(numb.toString()); config->setGroup(filtername); - QString binary = config->readEntry("action-args-0"); + TQString binary = config->readEntry("action-args-0"); if (binary.find("klammail") != -1){ KMessageBox::information (this,i18n( "You're already set up! Sure you haven't already configured KMail for KlamAV scanning?") ); 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->writeEntry("ConfigureShortcut", "false"); config->writeEntry("Icon", ""); 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("actions","1"); config->writeEntry("apply-on","check-mail","manual-filtering"); @@ -174,7 +174,7 @@ void Sigtool::configureKMail(){ numfilters++; nooffilters = numfilters; - filtername=QString("Filter #%1").arg(nooffilters.toString()); + filtername=TQString("Filter #%1").arg(nooffilters.toString()); config->setGroup(filtername); config->writeEntry("ConfigureShortcut","false"); @@ -203,7 +203,7 @@ void Sigtool::configureKMail(){ 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 ); @@ -212,10 +212,10 @@ void Sigtool::manualKMail(){ 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->setAlignment( int( QLabel::WordBreak | QLabel::AlignVCenter ) ); + notes_label->setAlignment( int( TQLabel::WordBreak | TQLabel::AlignVCenter ) ); } diff --git a/src/sigtool.h b/src/sigtool.h index 4b73b6b..bb5da38 100644 --- a/src/sigtool.h +++ b/src/sigtool.h @@ -17,12 +17,12 @@ class KPrinter; class KToggleAction; class KURL; -class QLineEdit; -class QComboBox; -class QCheckBox; -class QListBox; -class QPushButton; -class QLabel; +class TQLineEdit; +class TQComboBox; +class TQCheckBox; +class TQListBox; +class TQPushButton; +class TQLabel; class KProcess; class KConfig; class KURLRequester; @@ -36,14 +36,14 @@ class KURLRequester; * @author $AUTHOR <$EMAIL> * @version $APP_VERSION */ -class Sigtool : public QWidget +class Sigtool : public TQWidget { Q_OBJECT public: /** * Default Constructor */ - Sigtool(QWidget *parent, const char *name=0); + Sigtool(TQWidget *parent, const char *name=0); /** * Default Destructor @@ -53,14 +53,14 @@ public: /** * Use this method to load whatever file/URL you have */ - void setDirName(QString); + void setDirName(TQString); protected: /** - * Overridden virtuals for Qt drag 'n drop (XDND) + * Overridden virtuals for TQt drag 'n drop (XDND) */ - /*virtual void dragEnterEvent(QDragEnterEvent *event); - virtual void dropEvent(QDropEvent *event);*/ + /*virtual void dragEnterEvent(TQDragEnterEvent *event); + virtual void dropEvent(TQDropEvent *event);*/ protected: /** @@ -90,8 +90,8 @@ private slots: void optionsPreferences(); void newToolbarConfig(); */ - //void changeStatusbar(const QString& text); - //void changeCaption(const QString& text); + //void changeStatusbar(const TQString& text); + //void changeCaption(const TQString& text); private: void setupAccel(); @@ -106,7 +106,7 @@ private: signals: - void itemSelected(QString abs_filename, int line); + void itemSelected(TQString abs_filename, int line); public slots: @@ -118,20 +118,20 @@ private slots: void dobuttons(); private: - QLineEdit *template_edit; - QComboBox *files_combo, *pattern_combo/*, *dir_combo*/; + TQLineEdit *template_edit; + TQComboBox *files_combo, *pattern_combo/*, *dir_combo*/; KURLRequester *dir_combo; - QCheckBox *recursive_box; - QListBox *resultbox; - QPushButton *search_button, *manual_button; - QLabel *status_label, *matches_label; + TQCheckBox *recursive_box; + TQListBox *resultbox; + TQPushButton *search_button, *manual_button; + TQLabel *status_label, *matches_label; KProcess *childproc; - QString buf; + TQString buf; KConfig *config; - QStringList lastSearchItems; - QStringList lastSearchPaths; - QComboBox *check_combo; - QLabel *notes_label; + TQStringList lastSearchItems; + TQStringList lastSearchPaths; + TQComboBox *check_combo; + TQLabel *notes_label; }; #endif // _Sigtool_H_ diff --git a/src/specialfiletypes.ui b/src/specialfiletypes.ui index 7a7be28..3e6e8ba 100644 --- a/src/specialfiletypes.ui +++ b/src/specialfiletypes.ui @@ -1,6 +1,6 @@ SpecialFileTypes - + SpecialFileTypes @@ -19,14 +19,14 @@ unnamed - + Special_File_Types Special File Types - + layout9 @@ -42,7 +42,7 @@ unnamed - + kcfg_VirusEncrypted @@ -60,7 +60,7 @@ Alt+Y - + kcfg_VirusBroken @@ -78,7 +78,7 @@ Alt+A - + kcfg_ExcludeQuarantine @@ -89,7 +89,7 @@ Alt+Q - + kcfg_ScanMacros @@ -100,7 +100,7 @@ Alt+S - + kcfg_ScanPE @@ -111,7 +111,7 @@ Alt+X - + kcfg_ScanMail @@ -122,7 +122,7 @@ Alt+G - + kcfg_ScanHTML diff --git a/src/sqlite/func.c b/src/sqlite/func.c index 6b05335..ae0fb8a 100644 --- a/src/sqlite/func.c +++ b/src/sqlite/func.c @@ -539,7 +539,7 @@ static void versionFunc( ** change. This function may disappear. Do not write code that depends ** 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 ** the argument. If the argument is NULL, the return value is the string ** "NULL". Otherwise, the argument is enclosed in single quotes with diff --git a/src/tabwidget.cpp b/src/tabwidget.cpp index 3103b72..e2d4577 100644 --- a/src/tabwidget.cpp +++ b/src/tabwidget.cpp @@ -7,8 +7,8 @@ #include "tabwidget.h" -#include -#include +#include +#include #include #include @@ -22,13 +22,13 @@ using namespace KlamAV; -TabWidget::TabWidget(QWidget * parent, const char *name) +TabWidget::TabWidget(TQWidget * parent, const char *name) :KTabWidget(parent, name), m_CurrentMaxLength(30) { setTabReorderingEnabled(false); - connect( this, SIGNAL( currentChanged(QWidget *) ), this, - SLOT( slotTabChanged(QWidget *) ) ); - connect(this, SIGNAL(closeRequest(QWidget*)), this, SLOT(slotCloseRequest(QWidget*))); + connect( this, SIGNAL( currentChanged(TQWidget *) ), this, + SLOT( slotTabChanged(TQWidget *) ) ); + connect(this, SIGNAL(closeRequest(TQWidget*)), this, SLOT(slotCloseRequest(TQWidget*))); //setHoverCloseButton(Settings::closeButtonOnTabs()); } @@ -51,12 +51,12 @@ void TabWidget::addFrame(Frame *f) Frame *TabWidget::currentFrame() { - QWidget *w=currentPage(); + TQWidget *w=currentPage(); if (!w) return 0; return m_frames[w]; } -void TabWidget::slotTabChanged(QWidget *w) +void TabWidget::slotTabChanged(TQWidget *w) { emit currentFrameChanged(m_frames[w]); } @@ -73,29 +73,29 @@ void TabWidget::removeFrame(Frame *f) unsigned int TabWidget::tabBarWidthForMaxChars( uint maxLength ) { int hframe, overlap; - hframe = tabBar()->style().pixelMetric( QStyle::PM_TabBarTabHSpace, this ); - overlap = tabBar()->style().pixelMetric( QStyle::PM_TabBarTabOverlap, this ); + hframe = tabBar()->style().pixelMetric( TQStyle::PM_TabBarTabHSpace, this ); + overlap = tabBar()->style().pixelMetric( TQStyle::PM_TabBarTabOverlap, this ); - QFontMetrics fm = tabBar()->fontMetrics(); + TQFontMetrics fm = tabBar()->fontMetrics(); int x = 0; for( int i=0; i < count(); ++i ) { Frame *f=m_frames[page(i)]; - QString newTitle=f->title(); + TQString newTitle=f->title(); if ( newTitle.length() > maxLength ) newTitle = newTitle.left( maxLength-3 ) + "..."; - QTab* tab = tabBar()->tabAt( i ); + TQTab* tab = tabBar()->tabAt( i ); int lw = fm.width( newTitle ); int iw = 0; 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; } -void TabWidget::setTitle( const QString &title , QWidget* sender) +void TabWidget::setTitle( const TQString &title , TQWidget* sender) { removeTabToolTip( sender ); @@ -106,9 +106,9 @@ void TabWidget::setTitle( const QString &title , QWidget* sender) uint lcw=0, rcw=0; int tabBarHeight = tabBar()->sizeHint().height(); if ( cornerWidget( TopLeft ) && cornerWidget( TopLeft )->isVisible() ) - lcw = QMAX( cornerWidget( TopLeft )->width(), tabBarHeight ); + lcw = TQMAX( cornerWidget( TopLeft )->width(), tabBarHeight ); if ( cornerWidget( TopRight ) && cornerWidget( TopRight )->isVisible() ) - rcw = QMAX( cornerWidget( TopRight )->width(), tabBarHeight ); + rcw = TQMAX( cornerWidget( TopRight )->width(), tabBarHeight ); uint maxTabBarWidth = width() - lcw - rcw; uint newMaxLength=30; @@ -116,7 +116,7 @@ void TabWidget::setTitle( const QString &title , QWidget* sender) if ( tabBarWidthForMaxChars( newMaxLength ) < maxTabBarWidth ) break; } - QString newTitle = title; + TQString newTitle = title; if ( newTitle.length() > newMaxLength ) { 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); KPopupMenu popup; @@ -183,7 +183,7 @@ void TabWidget::slotCopyLinkAddress() KURL url; if (KHTMLView *view = dynamic_cast(currentItem)) url = view->part()->url(); else return; - QClipboard *cb = QApplication::clipboard(); + TQClipboard *cb = TQApplication::clipboard(); if(cb) cb->setText(url.prettyURL()); } @@ -195,7 +195,7 @@ void TabWidget::slotCloseTab() currentItem = 0; } -void TabWidget::slotCloseRequest(QWidget* widget) +void TabWidget::slotCloseRequest(TQWidget* widget) { if (m_frames.find(widget) != NULL) removeFrame(m_frames.find(widget)); diff --git a/src/tabwidget.h b/src/tabwidget.h index dcf0361..37bd4b4 100644 --- a/src/tabwidget.h +++ b/src/tabwidget.h @@ -12,7 +12,7 @@ #include -#include +#include namespace KlamAV { @@ -22,14 +22,14 @@ class TabWidget:public KTabWidget Q_OBJECT public: - TabWidget(QWidget * parent = 0, const char *name = 0); + TabWidget(TQWidget * parent = 0, const char *name = 0); ~TabWidget(); void addFrame(Frame *f); Frame *currentFrame(); void removeFrame(Frame *f); unsigned int tabBarWidthForMaxChars( uint maxLength ); - void setTitle( const QString &title , QWidget* sender); + void setTitle( const TQString &title , TQWidget* sender); public slots: @@ -45,15 +45,15 @@ class TabWidget:public KTabWidget void slotDetachTab(); void slotCopyLinkAddress(); void slotCloseTab(); - void slotCloseRequest(QWidget* widget); - void contextMenu (int item, const QPoint &p); - void slotTabChanged(QWidget *w); + void slotCloseRequest(TQWidget* widget); + void contextMenu (int item, const TQPoint &p); + void slotTabChanged(TQWidget *w); private: // attributes - QPtrDict m_frames; + TQPtrDict m_frames; unsigned int m_CurrentMaxLength; - QWidget* currentItem; + TQWidget* currentItem; }; } diff --git a/src/update.cpp b/src/update.cpp index 93393dd..f8497d0 100644 --- a/src/update.cpp +++ b/src/update.cpp @@ -31,12 +31,12 @@ #include -#include +#include #include #include #include #include -#include +#include #include #include #include @@ -50,7 +50,7 @@ #include #include -#include +#include #include "version.h" @@ -77,8 +77,8 @@ const char *mirrors[] = { 0 }; -KlamavUpdate::KlamavUpdate(QWidget *parent, const char *name) - : QWidget(parent, name),filelist(new KHTMLPart(this)) +KlamavUpdate::KlamavUpdate(TQWidget *parent, const char *name) + : TQWidget(parent, name),filelist(new KHTMLPart(this)) { 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; - QString location = getenv("HOME"); + TQString location = getenv("HOME"); location += "/.klamav"; - QDir klamavdir(location); + TQDir klamavdir(location); if (!klamavdir.exists() && !klamavdir.mkdir(location)) location = getenv("HOME"); - QString currentclamav = location + QString("/%1-%2").arg(component).arg(version); - QDir clamavdir(currentclamav); + TQString currentclamav = location + TQString("/%1-%2").arg(component).arg(version); + TQDir clamavdir(currentclamav); - QString configure; + TQString configure; /* 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{*/ - 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; @@ -139,8 +139,8 @@ void KlamavUpdate::downloadComponent(QString component, QString version, QString startProgressDialog( i18n( "Downloading %1-%2..." ).arg(component).arg(version) ); - QString 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 ) ){ + TQString tmpFile; + 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)); delete timer; timer=0; @@ -201,7 +201,7 @@ void KlamavUpdate::downloadComponent(QString component, QString version, QString chmod((const char *)configure,0700); // 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); // } @@ -217,17 +217,17 @@ void KlamavUpdate::downloadComponent(QString component, QString version, QString KProcess* arkollonproc = new KShellProcess(); //make sure we catch arkollon in the .klamav directory -// QString curpath = (QString) getenv("PATH"); -// QString homedir = (QString) getenv("HOME"); +// TQString curpath = (TQString) getenv("PATH"); +// TQString homedir = (TQString) getenv("HOME"); // arkollonproc->setEnvironment("PATH",homedir+"/.klamav/bin:" + curpath); KMessageBox::information (this,i18n( "

    If this the first time you've compiled software then here are a few useful tips:
    " - "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.
    " "2. Any package provided by your distribution with 'lib' or 'devel' in the name is a development library, e.g. qt-devel, libkde.
    " "3. If you encounter errors installing Dazuko, just deselect it at installation time and try the instructions at www.dazuko.org.
    " "4. Some distributions provide a dazuko package, see if yours does.

    " ),"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; if (component == "klamav") 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; @@ -292,7 +292,7 @@ void KlamavUpdate::completedSearchForUpdates(const QString &component, const QSt if (component == "KlamAV") currentversion = VERSION_KLAMAV; else{ - QString currentClamAVVersion = KlamavConfig::clamAVVersion(); + TQString currentClamAVVersion = KlamavConfig::clamAVVersion(); 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 ) // 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->showCancelButton( true ); @@ -338,7 +338,7 @@ void KlamavUpdate::startProgressDialog( const QString & text ) progressDialog->setMinimumDuration( 500 ); progressDialog->show(); - timer = new QTimer( this ); + timer = new TQTimer( this ); connect( timer, SIGNAL( timeout() ), this, SLOT( slotProg() ) ); timer->start( 200, FALSE ); @@ -492,7 +492,7 @@ void KlamavUpdate::parseSFPageHack() void KlamavUpdate::getVersionFromLink( const DOM::Node &n ) { double numericversion; - QString tmpversion; + TQString tmpversion; if ( n.isNull() || n.nodeType() != DOM::Node::ELEMENT_NODE ) return; @@ -503,11 +503,11 @@ void KlamavUpdate::getVersionFromLink( const DOM::Node &n ) kdDebug() << elem.getAttribute( "href" ).string() << endl; - QString name = elem.getAttribute( "href" ).string(); - QString version = name.replace(".tar.bz2","").replace(".tar.gz",""); + TQString name = elem.getAttribute( "href" ).string(); + TQString version = name.replace(".tar.bz2","").replace(".tar.gz",""); version = version.replace("clamav-","").replace("klamav-",""); - QString rawversion = version; + TQString rawversion = version; if (m_alpha) 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)); static int previousmirror = 0; @@ -537,11 +537,11 @@ QString KlamavUpdate::getMirror() return mirrors[r]; } -double KlamavUpdate::numericizeVersion(QString &version) +double KlamavUpdate::numericizeVersion(TQString &version) { - QString tmpversion = version; - QStringList tokens = QStringList::split(".",tmpversion); - for ( QStringList::Iterator it = tokens.begin(); it != tokens.end(); it++ ) + TQString tmpversion = version; + TQStringList tokens = TQStringList::split(".",tmpversion); + for ( TQStringList::Iterator it = tokens.begin(); it != tokens.end(); it++ ) { if ((*it).length() < 2) (*it).prepend("0"); diff --git a/src/update.h b/src/update.h index 4d70d1d..da0ffe3 100644 --- a/src/update.h +++ b/src/update.h @@ -55,19 +55,19 @@ class KHTMLPart; * @author $AUTHOR <$EMAIL> * @version $APP_VERSION */ -class KlamavUpdate : public QWidget +class KlamavUpdate : public TQWidget { Q_OBJECT public: - KlamavUpdate(QWidget *parent = 0, const char *name=0); + KlamavUpdate(TQWidget *parent = 0, const char *name=0); /** * Default Destrucclamav */ virtual ~KlamavUpdate(); - void downloadComponent(QString component, QString version, QString extension); + void downloadComponent(TQString component, TQString version, TQString extension); void checkForNewClamAVDirectly(); void checkForNewKlamAVDirectly(); void checkForNewKlamAV(); @@ -90,27 +90,27 @@ private slots: private: void getLatestVersionFromSF(KURL url); void getLatestVersionFromSFHack(KURL url); - void startProgressDialog( const QString & text ); + void startProgressDialog( const TQString & text ); void checkInternet(); void connectToHost(); void getVersionFromLink( const DOM::Node &n ); - void completedSearchForUpdates(const QString &component, const QString &extension); - double numericizeVersion(QString &version); - QString getMirror(); + void completedSearchForUpdates(const TQString &component, const TQString &extension); + double numericizeVersion(TQString &version); + TQString getMirror(); KProcess *childproc; KProcIO *versionproc; - QString tempFileName; - QString errorMessage; - QString pidFileName; + TQString tempFileName; + TQString errorMessage; + TQString pidFileName; KProgressDialog *progressDialog; - QTimer *timer; + TQTimer *timer; bool upgradeinprogress; bool checkingDirectly; double highestsofarnumeric; - QString highestsofarraw; - QString highestsofarfilename; + TQString highestsofarraw; + TQString highestsofarfilename; KResolver m_resolver; - QString currentClamavVersion; + TQString currentClamavVersion; bool m_alpha; KHTMLPart *filelist; private: diff --git a/src/viewer.cpp b/src/viewer.cpp index 3d763f5..1cbf083 100644 --- a/src/viewer.cpp +++ b/src/viewer.cpp @@ -12,8 +12,8 @@ #include #include -#include -#include +#include +#include #include "viewer.h" #include "klamav_run.h" @@ -21,7 +21,7 @@ using namespace KlamAV; -Viewer::Viewer(QWidget *parent, const char *name) +Viewer::Viewer(TQWidget *parent, const char *name) : KHTMLPart(parent, name), m_url(0) { setZoomFactor(100); @@ -43,8 +43,8 @@ Viewer::Viewer(QWidget *parent, const char *name) connect( browserExtension(), -SIGNAL(popupMenu (KXMLGUIClient*, const QPoint&, const KURL&, const - KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t)), this, SLOT(slotPopupMenu(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 TQPoint&, const KURL&, const KParts::URLArgs&, KParts::BrowserExtension::PopupFlags, mode_t))); 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) { - new KlamAV::BrowserRun(this, (QWidget*)parent(), this, url, KParts::URLArgs()); + new KlamAV::BrowserRun(this, (TQWidget*)parent(), this, url, KParts::URLArgs()); emit started(0); return true; } @@ -71,17 +71,17 @@ bool Viewer::openURL(const KURL &url) bool Viewer::closeURL() { emit browserExtension()->loadingProgress(-1); - emit canceled(QString::null); + emit canceled(TQString::null); return KHTMLPart::closeURL(); } int Viewer::pointsToPixel(int pointSize) const { - const QPaintDeviceMetrics metrics(view()); + const TQPaintDeviceMetrics metrics(view()); 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 (Settings::externalBrowserUseKdeDefault()) @@ -93,11 +93,11 @@ void Viewer::displayInExternalBrowser(const KURL &url, const QString &mimetype) /* } else { - QString cmd = Settings::externalBrowserCustomCommand(); - QString urlStr = url.url(); - cmd.replace(QRegExp("%u"), urlStr); + TQString cmd = Settings::externalBrowserCustomCommand(); + TQString urlStr = url.url(); + cmd.replace(TQRegExp("%u"), urlStr); KProcess *proc = new KProcess; - QStringList cmdAndArgs = KShell::splitArgs(cmd); + TQStringList cmdAndArgs = KShell::splitArgs(cmd); *proc << cmdAndArgs; proc->start(KProcess::DontCare); 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; m_url = url; KPopupMenu popup; @@ -168,9 +168,9 @@ void Viewer::slotPopupMenu(KXMLGUIClient*, const QPoint& p, const KURL& kurl, co // taken from KDevelop void Viewer::slotCopy() { - QString text = selectedText(); - text.replace( QChar( 0xa0 ), ' ' ); - QClipboard *cb = QApplication::clipboard(); + TQString text = selectedText(); + text.replace( TQChar( 0xa0 ), ' ' ); + TQClipboard *cb = TQApplication::clipboard(); disconnect( cb, SIGNAL( selectionChanged() ), this, SLOT( slotClearSelection() ) ); cb->setText(text); connect( cb, SIGNAL( selectionChanged() ), this, SLOT( slotClearSelection() ) ); @@ -179,9 +179,9 @@ void Viewer::slotCopy() void Viewer::slotCopyLinkAddress() { if(m_url.isEmpty()) return; - QClipboard *cb = QApplication::clipboard(); - cb->setText(m_url.prettyURL(), QClipboard::Clipboard); - cb->setText(m_url.prettyURL(), QClipboard::Selection); + TQClipboard *cb = TQApplication::clipboard(); + cb->setText(m_url.prettyURL(), TQClipboard::Clipboard); + cb->setText(m_url.prettyURL(), TQClipboard::Selection); } void Viewer::slotSelectionChanged() @@ -207,7 +207,7 @@ void Viewer::slotOpenLinkInBackgroundTab() void Viewer::slotOpenLinkInBrowser() { kdDebug() << "display external" << endl; - displayInExternalBrowser(m_url, QString::null); + displayInExternalBrowser(m_url, TQString::null); } void Viewer::slotStarted(KIO::Job *) diff --git a/src/viewer.h b/src/viewer.h index 9f47889..de0fcfc 100644 --- a/src/viewer.h +++ b/src/viewer.h @@ -23,7 +23,7 @@ namespace KlamAV { Q_OBJECT public: - Viewer(QWidget* parent, const char* name); + Viewer(TQWidget* parent, const char* name); virtual bool closeURL(); virtual bool openURL(const KURL &); @@ -51,7 +51,7 @@ namespace KlamAV protected slots: 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. */ void slotCopyLinkAddress(); @@ -86,7 +86,7 @@ namespace KlamAV /** * Display article in external browser. */ - void displayInExternalBrowser(const KURL &url, const QString &mime); + void displayInExternalBrowser(const KURL &url, const TQString &mime); }; }