summaryrefslogtreecommitdiffstats
path: root/atlantik/client/eventlogwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'atlantik/client/eventlogwidget.cpp')
-rw-r--r--atlantik/client/eventlogwidget.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/atlantik/client/eventlogwidget.cpp b/atlantik/client/eventlogwidget.cpp
index b0f77ab8..6bc81b04 100644
--- a/atlantik/client/eventlogwidget.cpp
+++ b/atlantik/client/eventlogwidget.cpp
@@ -16,9 +16,9 @@
#include <iostream>
-#include <qheader.h>
-#include <qlayout.h>
-#include <qdatetime.h>
+#include <tqheader.h>
+#include <tqlayout.h>
+#include <tqdatetime.h>
#include <klocale.h>
#include <klistview.h>
@@ -35,30 +35,30 @@ EventLog::EventLog()
{
}
-void EventLog::addEvent(const QString &description, const QString &icon)
+void EventLog::addEvent(const TQString &description, const TQString &icon)
{
- Event *event = new Event(QDateTime::currentDateTime(), description, icon);
+ Event *event = new Event(TQDateTime::currentDateTime(), description, icon);
m_events.append(event);
emit newEvent(event);
}
-QPtrList<Event> EventLog::events()
+TQPtrList<Event> EventLog::events()
{
return m_events;
}
-EventLogWidget::EventLogWidget(EventLog *eventLog, QWidget *parent, const char *name)
- : QWidget(parent, name,
+EventLogWidget::EventLogWidget(EventLog *eventLog, TQWidget *parent, const char *name)
+ : TQWidget(parent, name,
WType_Dialog | WStyle_Customize | WStyle_DialogBorder | WStyle_Title |
WStyle_Minimize | WStyle_ContextHelp )
{
m_eventLog = eventLog;
- connect(m_eventLog, SIGNAL(newEvent(Event *)), this, SLOT(addEvent(Event *)));
+ connect(m_eventLog, TQT_SIGNAL(newEvent(Event *)), this, TQT_SLOT(addEvent(Event *)));
setCaption(i18n("Event Log"));
- QVBoxLayout *listCompBox = new QVBoxLayout(this, KDialog::marginHint());
+ TQVBoxLayout *listCompBox = new TQVBoxLayout(this, KDialog::marginHint());
m_eventList = new KListView(this, "eventList");
listCompBox->addWidget(m_eventList);
@@ -67,19 +67,19 @@ EventLogWidget::EventLogWidget(EventLog *eventLog, QWidget *parent, const char *
m_eventList->addColumn(i18n("Description"));
m_eventList->header()->setClickEnabled( false );
- QHBoxLayout *actionBox = new QHBoxLayout(this, 0, KDialog::spacingHint());
+ TQHBoxLayout *actionBox = new TQHBoxLayout(this, 0, KDialog::spacingHint());
listCompBox->addItem(actionBox);
- actionBox->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum));
+ actionBox->addItem(new TQSpacerItem(20, 20, TQSizePolicy::Expanding, TQSizePolicy::Minimum));
m_saveButton = new KPushButton(BarIcon("filesave", KIcon::SizeSmall), i18n("&Save As..."), this);
actionBox->addWidget(m_saveButton);
- connect(m_saveButton, SIGNAL(clicked()), this, SLOT(save()));
+ connect(m_saveButton, TQT_SIGNAL(clicked()), this, TQT_SLOT(save()));
// Populate
- QPtrList<Event> events = m_eventLog->events();
- for (QPtrListIterator<Event> it( events ); (*it) ; ++it)
+ TQPtrList<Event> events = m_eventLog->events();
+ for (TQPtrListIterator<Event> it( events ); (*it) ; ++it)
addEvent( (*it) );
}
@@ -91,32 +91,32 @@ void EventLogWidget::addEvent(Event *event)
if ( m_eventList->childCount() >= 25 )
delete m_eventList->firstChild();
- QString description = KStringHandler::rsqueeze( event->description(), 200 );
+ TQString description = KStringHandler::rsqueeze( event->description(), 200 );
KListViewItem *item = new KListViewItem(m_eventList, event->dateTime().toString("yyyy-MM-dd hh:mm:ss zzz"), description);
if (event->icon().isEmpty())
- item->setPixmap(1, QPixmap(SmallIcon("atlantik")));
+ item->setPixmap(1, TQPixmap(SmallIcon("atlantik")));
else
- item->setPixmap(1, QPixmap(SmallIcon(event->icon())));
+ item->setPixmap(1, TQPixmap(SmallIcon(event->icon())));
m_eventList->ensureItemVisible(item);
}
-void EventLogWidget::closeEvent(QCloseEvent *e)
+void EventLogWidget::closeEvent(TQCloseEvent *e)
{
e->accept();
}
void EventLogWidget::save()
{
- QFile file( KFileDialog::getSaveFileName() );
+ TQFile file( KFileDialog::getSaveFileName() );
if ( file.open( IO_WriteOnly ) )
{
- QTextStream stream(&file);
+ TQTextStream stream(&file);
- stream << i18n( "Atlantik log file, saved at %1." ).arg( QDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss") ) << endl;
+ stream << i18n( "Atlantik log file, saved at %1." ).arg( TQDateTime::currentDateTime().toString("yyyy-MM-dd hh:mm:ss") ) << endl;
- QPtrList<Event> events = m_eventLog->events();
- for (QPtrListIterator<Event> it( events ); (*it) ; ++it)
+ TQPtrList<Event> events = m_eventLog->events();
+ for (TQPtrListIterator<Event> it( events ); (*it) ; ++it)
stream << (*it)->dateTime().toString("yyyy-MM-dd hh:mm:ss") << " " << (*it)->description() << endl;
file.close();
}