summaryrefslogtreecommitdiffstats
path: root/kcron/ktview.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:25:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:25:18 +0000
commitaa3a1ca934bc541bddd3fa136a85f106f7da266e (patch)
tree9ad0b795aed8fa4ac30c2fe0fd1aacb8175714c0 /kcron/ktview.cpp
parentb10cf7066791a2f362495890cd50c984e8025412 (diff)
downloadtdeadmin-aa3a1ca934bc541bddd3fa136a85f106f7da266e.tar.gz
tdeadmin-aa3a1ca934bc541bddd3fa136a85f106f7da266e.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeadmin@1157635 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcron/ktview.cpp')
-rw-r--r--kcron/ktview.cpp108
1 files changed, 54 insertions, 54 deletions
diff --git a/kcron/ktview.cpp b/kcron/ktview.cpp
index 87c90c0..27341de 100644
--- a/kcron/ktview.cpp
+++ b/kcron/ktview.cpp
@@ -24,12 +24,12 @@
#include <string>
-#include <qstring.h>
-#include <qheader.h>
-#include <qpopupmenu.h>
-#include <qfileinfo.h>
-#include <qfile.h>
-#include <qdatetime.h>
+#include <tqstring.h>
+#include <tqheader.h>
+#include <tqpopupmenu.h>
+#include <tqfileinfo.h>
+#include <tqfile.h>
+#include <tqdatetime.h>
#include <kapplication.h>
#include <kglobalsettings.h>
@@ -51,8 +51,8 @@
#include "kttask.h"
#include "ktprint.h"
-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),
@@ -67,17 +67,17 @@ KTView::KTView(QWidget *parent, const char* name) :
refresh();
listView->setSelected(listView->firstChild(), true);
- connect(this, SIGNAL(enableModificationButtons(bool)), parent,
- SLOT(slotEnableModificationButtons(bool)));
+ connect(this, TQT_SIGNAL(enableModificationButtons(bool)), parent,
+ TQT_SLOT(slotEnableModificationButtons(bool)));
- connect(this, SIGNAL(enablePaste(bool)), parent,
- SLOT(slotEnablePaste(bool)));
+ connect(this, TQT_SIGNAL(enablePaste(bool)), parent,
+ TQT_SLOT(slotEnablePaste(bool)));
- connect(this, SIGNAL(enableRunNow(bool)), parent,
- SLOT(slotEnableRunNow(bool)));
+ connect(this, TQT_SIGNAL(enableRunNow(bool)), parent,
+ TQT_SLOT(slotEnableRunNow(bool)));
- connect(this, SIGNAL(enableEnabled(bool)), parent,
- SLOT(slotEnableEnabled(bool)));
+ connect(this, TQT_SIGNAL(enableEnabled(bool)), parent,
+ TQT_SLOT(slotEnableEnabled(bool)));
}
void KTView::disableIcons()
@@ -89,11 +89,11 @@ void KTView::disableIcons()
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);
@@ -109,7 +109,7 @@ void KTView::refresh()
listView->addColumn(i18n("Description"));
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();
@@ -163,17 +163,17 @@ void KTView::refresh()
resizeEvent();
- connect(listView, SIGNAL(contextMenuRequested(QListViewItem*, const QPoint&, int)),
- SLOT(slotMenu(QListViewItem*, const QPoint&, int)));
+ connect(listView, TQT_SIGNAL(contextMenuRequested(TQListViewItem*, const TQPoint&, int)),
+ TQT_SLOT(slotMenu(TQListViewItem*, const TQPoint&, int)));
- connect(listView, SIGNAL(selectionChanged(QListViewItem*)),
- SLOT(slotSetCurrent(QListViewItem*)));
+ connect(listView, TQT_SIGNAL(selectionChanged(TQListViewItem*)),
+ TQT_SLOT(slotSetCurrent(TQListViewItem*)));
- connect(listView, SIGNAL(doubleClicked(QListViewItem*)),
- SLOT(slotEdit(QListViewItem*)));
+ connect(listView, TQT_SIGNAL(doubleClicked(TQListViewItem*)),
+ TQT_SLOT(slotEdit(TQListViewItem*)));
- connect(listView, SIGNAL(returnPressed(QListViewItem*)),
- SLOT(slotEdit(QListViewItem*)));
+ connect(listView, TQT_SIGNAL(returnPressed(TQListViewItem*)),
+ TQT_SLOT(slotEdit(TQListViewItem*)));
// switch to the new view
if (tmpListView)
@@ -264,21 +264,21 @@ void KTView::print () const
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);
@@ -311,7 +311,7 @@ KTView::~KTView()
delete listView;
}
-void KTView::resizeEvent (QResizeEvent*)
+void KTView::resizeEvent (TQResizeEvent*)
{
listView->setFixedWidth(width());
listView->setFixedHeight(height());
@@ -423,46 +423,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)
{
@@ -482,7 +482,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);
@@ -491,14 +491,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())
{