diff options
Diffstat (limited to 'src/ktview.cpp')
-rw-r--r-- | src/ktview.cpp | 96 |
1 files changed, 48 insertions, 48 deletions
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 <qfileinfo.h> +#include <tqfileinfo.h> #include "cthost.h" #include "ctcron.h" @@ -44,8 +44,8 @@ #include <stdlib.h> // 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<CTHost&>(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(); |