summaryrefslogtreecommitdiffstats
path: root/src/activityviewer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/activityviewer.cpp')
-rw-r--r--src/activityviewer.cpp96
1 files changed, 48 insertions, 48 deletions
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 <kurlrequester.h>
#include <kurlcompletion.h>
#include <kcombobox.h>
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kmessagebox.h>
#include <kstandarddirs.h>
-#include <qtoolbutton.h>
+#include <tqtoolbutton.h>
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<int> columns;
+ kLineEdit1 = new KListViewSearchLine( (TQWidget *)searchToolBar, currentbox,"klinedit1");
+/* TQValueList<int> 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 );