summaryrefslogtreecommitdiffstats
path: root/src/dbviewer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dbviewer.cpp')
-rw-r--r--src/dbviewer.cpp126
1 files changed, 63 insertions, 63 deletions
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 <qheader.h>
-#include <qlayout.h>
-#include <qpopupmenu.h>
+#include <tqheader.h>
+#include <tqlayout.h>
+#include <tqpopupmenu.h>
#include <ktoolbarbutton.h> //ctor
#include <ktempfile.h>
@@ -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<int> columns;
+ kLineEdit1 = new KListViewSearchLine( (TQWidget *)searchToolBar, VirusList,"klinedit1");
+ TQValueList<int> 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);
}