summaryrefslogtreecommitdiffstats
path: root/kcron
diff options
context:
space:
mode:
Diffstat (limited to 'kcron')
-rw-r--r--kcron/ctcron.cpp26
-rw-r--r--kcron/ctcron.h10
-rw-r--r--kcron/cthost.h6
-rw-r--r--kcron/ktapp.cpp62
-rw-r--r--kcron/ktapp.h8
-rw-r--r--kcron/kticon.cpp28
-rw-r--r--kcron/kticon.h30
-rw-r--r--kcron/ktlistcron.cpp18
-rw-r--r--kcron/ktlistcron.h6
-rw-r--r--kcron/ktlistitem.cpp6
-rw-r--r--kcron/ktlistitem.h6
-rw-r--r--kcron/ktlisttask.cpp12
-rw-r--r--kcron/ktlisttask.h2
-rw-r--r--kcron/ktlisttasks.cpp10
-rw-r--r--kcron/ktlisttasks.h6
-rw-r--r--kcron/ktlistvar.cpp12
-rw-r--r--kcron/ktlistvar.h2
-rw-r--r--kcron/ktlistvars.cpp10
-rw-r--r--kcron/ktlistvars.h6
-rw-r--r--kcron/ktprint.cpp18
-rw-r--r--kcron/ktprint.h8
-rw-r--r--kcron/ktprintopt.cpp16
-rw-r--r--kcron/ktprintopt.h8
-rw-r--r--kcron/kttask.cpp226
-rw-r--r--kcron/kttask.h62
-rw-r--r--kcron/ktvariable.cpp38
-rw-r--r--kcron/ktvariable.h24
-rw-r--r--kcron/ktview.cpp108
-rw-r--r--kcron/ktview.h16
29 files changed, 395 insertions, 395 deletions
diff --git a/kcron/ctcron.cpp b/kcron/ctcron.cpp
index 853f6de..bcc51e4 100644
--- a/kcron/ctcron.cpp
+++ b/kcron/ctcron.cpp
@@ -22,7 +22,7 @@
#include <stdio.h>
#include <assert.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kprocess.h>
#include <klocale.h>
@@ -42,7 +42,7 @@ CTCron::CTCron(bool _syscron, string _login) :
tmp.close();
tmpFileName = tmp.name();
- QString readCommand;
+ TQString readCommand;
if (uid == 0)
// root, so provide requested crontab
@@ -56,8 +56,8 @@ CTCron::CTCron(bool _syscron, string _login) :
}
else
{
- readCommand = QString("crontab -u ") + _login.c_str() + " -l > " + KProcess::quote(tmpFileName);
- writeCommand = QString("crontab -u ") + _login.c_str() + " " + KProcess::quote(tmpFileName);
+ readCommand = TQString("crontab -u ") + _login.c_str() + " -l > " + KProcess::quote(tmpFileName);
+ writeCommand = TQString("crontab -u ") + _login.c_str() + " " + KProcess::quote(tmpFileName);
if (!initFromPasswd(getpwnam(_login.c_str())))
{
error = i18n("No password entry found for user '%1'").arg(_login.c_str());
@@ -86,9 +86,9 @@ CTCron::CTCron(bool _syscron, string _login) :
// Don't set error if it can't be read, it means the user
// doesn't have a crontab.
- if (system(QFile::encodeName(readCommand)) == 0)
+ if (system(TQFile::encodeName(readCommand)) == 0)
{
- ifstream cronfile(QFile::encodeName(tmpFileName));
+ ifstream cronfile(TQFile::encodeName(tmpFileName));
cronfile >> *this;
}
@@ -106,8 +106,8 @@ CTCron::CTCron(const struct passwd *pwd) :
tmp.close();
tmpFileName = tmp.name();
- QString readCommand = QString("crontab -u ") + QString(pwd->pw_name) + " -l > " + KProcess::quote(tmpFileName);
- writeCommand = QString("crontab -u ") + QString(pwd->pw_name) + " " + KProcess::quote(tmpFileName);
+ TQString readCommand = TQString("crontab -u ") + TQString(pwd->pw_name) + " -l > " + KProcess::quote(tmpFileName);
+ writeCommand = TQString("crontab -u ") + TQString(pwd->pw_name) + " " + KProcess::quote(tmpFileName);
initFromPasswd(pwd);
@@ -119,9 +119,9 @@ CTCron::CTCron(const struct passwd *pwd) :
// Don't set error if it can't be read, it means the user
// doesn't have a crontab.
- if (system(QFile::encodeName(readCommand)) == 0)
+ if (system(TQFile::encodeName(readCommand)) == 0)
{
- ifstream cronfile(QFile::encodeName(tmpFileName));
+ ifstream cronfile(TQFile::encodeName(tmpFileName));
cronfile >> *this;
}
@@ -265,17 +265,17 @@ CTCron::~CTCron()
void CTCron::apply()
{
// write to temp file
- ofstream cronfile(QFile::encodeName(tmpFileName));
+ ofstream cronfile(TQFile::encodeName(tmpFileName));
cronfile << *this << flush;
// install temp file into crontab
- if (system(QFile::encodeName(writeCommand)) != 0)
+ if (system(TQFile::encodeName(writeCommand)) != 0)
{
error = i18n("An error occurred while updating crontab.");
}
// remove the temp file
- (void) unlink(QFile::encodeName(tmpFileName));
+ (void) unlink(TQFile::encodeName(tmpFileName));
if (isError())
return;
diff --git a/kcron/ctcron.h b/kcron/ctcron.h
index b8d03fe..2aaf01b 100644
--- a/kcron/ctcron.h
+++ b/kcron/ctcron.h
@@ -19,7 +19,7 @@
#include <string>
#include <iostream>
-#include <qstring.h> // Anarchy! -WABA
+#include <tqstring.h> // Anarchy! -WABA
class CTException;
class CTTask;
@@ -94,7 +94,7 @@ public:
/**
* Return error description
*/
- QString errorMessage() { QString r = error; error = QString::null; return r; }
+ TQString errorMessage() { TQString r = error; error = TQString::null; return r; }
/**
@@ -138,10 +138,10 @@ private:
unsigned int initialTaskCount;
unsigned int initialVariableCount;
- QString writeCommand;
- QString tmpFileName;
+ TQString writeCommand;
+ TQString tmpFileName;
- QString error;
+ TQString error;
protected:
// Initialize member variables from the struct passwd.
diff --git a/kcron/cthost.h b/kcron/cthost.h
index 6d601c3..022ff54 100644
--- a/kcron/cthost.h
+++ b/kcron/cthost.h
@@ -18,7 +18,7 @@
#include <vector>
#include <string>
-#include <qstring.h> // Whatever
+#include <tqstring.h> // Whatever
class CTCron;
struct passwd;
@@ -78,7 +78,7 @@ public:
/**
* Error message
*/
- QString errorMessage() { QString r = error; error = QString::null; return r; }
+ TQString errorMessage() { TQString r = error; error = TQString::null; return r; }
/**
@@ -110,7 +110,7 @@ private:
CTCron* createCTCron(bool _syscron = false, std::string _login = "");
CTCron* createCTCron(const struct passwd *);
- QString error;
+ TQString error;
};
typedef std::vector<CTCron*>::iterator CTCronIterator;
diff --git a/kcron/ktapp.cpp b/kcron/ktapp.cpp
index 76f0e08..35c009c 100644
--- a/kcron/ktapp.cpp
+++ b/kcron/ktapp.cpp
@@ -59,8 +59,8 @@ KTApp::KTApp() : KMainWindow(0)
KPopupMenu *editMenu = static_cast<KPopupMenu*>(guiFactory()->container("edit", this));
KPopupMenu *settingsMenu = static_cast<KPopupMenu*>(guiFactory()->container("settings", this));
- connect(editMenu,SIGNAL(highlighted(int)),this,SLOT(statusEditCallback(int)));
- connect(settingsMenu,SIGNAL(highlighted(int)),this,SLOT(statusSettingsCallback(int)));
+ connect(editMenu,TQT_SIGNAL(highlighted(int)),this,TQT_SLOT(statusEditCallback(int)));
+ connect(settingsMenu,TQT_SIGNAL(highlighted(int)),this,TQT_SLOT(statusSettingsCallback(int)));
// Read options.
readOptions();
}
@@ -111,33 +111,33 @@ const CTHost& KTApp::getCTHost() const
}
-QString KTApp::caption()
+TQString KTApp::caption()
{
- QString cap(kapp->caption());
+ TQString cap(kapp->caption());
return cap;
}
void KTApp::setupActions()
{
//File Menu
- KStdAction::save(this, SLOT(slotFileSave()), actionCollection());
- KStdAction::print(this, SLOT(slotFilePrint()), actionCollection());
- KStdAction::quit(this, SLOT(slotFileQuit()), actionCollection());
+ KStdAction::save(this, TQT_SLOT(slotFileSave()), actionCollection());
+ KStdAction::print(this, TQT_SLOT(slotFilePrint()), actionCollection());
+ KStdAction::quit(this, TQT_SLOT(slotFileQuit()), actionCollection());
//Edit menu
- KStdAction::cut(this, SLOT(slotEditCut()), actionCollection());
- KStdAction::copy(this, SLOT(slotEditCopy()), actionCollection());
- KStdAction::paste(this, SLOT(slotEditPaste()), actionCollection());
- (void)new KAction(i18n("&New..."), KStdAccel::openNew(), this,SLOT(slotEditNew()),actionCollection(),"edit_new");
+ KStdAction::cut(this, TQT_SLOT(slotEditCut()), actionCollection());
+ KStdAction::copy(this, TQT_SLOT(slotEditCopy()), actionCollection());
+ KStdAction::paste(this, TQT_SLOT(slotEditPaste()), actionCollection());
+ (void)new KAction(i18n("&New..."), KStdAccel::openNew(), this,TQT_SLOT(slotEditNew()),actionCollection(),"edit_new");
//I don't like this KStdAccel::open() for modifying, but I'm just porting this to xmlui
- (void)new KAction(i18n("M&odify..."), KStdAccel::open(), this,SLOT(slotEditModify()),actionCollection(),"edit_modify");
- (void)new KAction(i18n("&Delete"), 0, this,SLOT(slotEditDelete()),actionCollection(),"edit_delete");
- (void)new KAction(i18n("&Enabled"), 0, this,SLOT(slotEditEnable()),actionCollection(),"edit_enable");
- (void)new KAction(i18n("&Run Now"), 0, this,SLOT(slotEditRunNow()),actionCollection(),"edit_run");
+ (void)new KAction(i18n("M&odify..."), KStdAccel::open(), this,TQT_SLOT(slotEditModify()),actionCollection(),"edit_modify");
+ (void)new KAction(i18n("&Delete"), 0, this,TQT_SLOT(slotEditDelete()),actionCollection(),"edit_delete");
+ (void)new KAction(i18n("&Enabled"), 0, this,TQT_SLOT(slotEditEnable()),actionCollection(),"edit_enable");
+ (void)new KAction(i18n("&Run Now"), 0, this,TQT_SLOT(slotEditRunNow()),actionCollection(),"edit_run");
//Settings menu
- (void)new KAction(i18n("Show &Toolbar"), 0, this,SLOT(slotViewToolBar()),actionCollection(),"show_toolbar");
- (void)new KAction(i18n("Show &Statusbar"), 0, this,SLOT(slotViewStatusBar()),actionCollection(),"show_statusbar");
+ (void)new KAction(i18n("Show &Toolbar"), 0, this,TQT_SLOT(slotViewToolBar()),actionCollection(),"show_toolbar");
+ (void)new KAction(i18n("Show &Statusbar"), 0, this,TQT_SLOT(slotViewStatusBar()),actionCollection(),"show_statusbar");
}
@@ -149,26 +149,26 @@ void KTApp::initStatusBar()
void KTApp::saveOptions()
{
- config->setGroup(QString("General Options"));
- config->writeEntry(QString("Geometry"), size());
- config->writeEntry(QString("Show Toolbar"), toolBar()->isVisible());
- config->writeEntry(QString("Show Statusbar"), statusBar()->isVisible());
- config->writeEntry(QString("ToolBarPos"), (int)toolBar()->barPos());
+ config->setGroup(TQString("General Options"));
+ config->writeEntry(TQString("Geometry"), size());
+ config->writeEntry(TQString("Show Toolbar"), toolBar()->isVisible());
+ config->writeEntry(TQString("Show Statusbar"), statusBar()->isVisible());
+ config->writeEntry(TQString("ToolBarPos"), (int)toolBar()->barPos());
}
void KTApp::readOptions()
{
- config->setGroup(QString("General Options"));
+ config->setGroup(TQString("General Options"));
KPopupMenu *settingsMenu = static_cast<KPopupMenu*>(guiFactory()->container("settings", this));
// bar status settings
- bool bViewToolbar = config->readBoolEntry(QString("Show Toolbar"), true);
+ bool bViewToolbar = config->readBoolEntry(TQString("Show Toolbar"), true);
settingsMenu->setItemChecked(settingsMenu->idAt(0),bViewToolbar);
if (!bViewToolbar)
toolBar()->hide();
- bool bViewStatusbar = config->readBoolEntry(QString("Show Statusbar"), true);
+ bool bViewStatusbar = config->readBoolEntry(TQString("Show Statusbar"), true);
settingsMenu->setItemChecked(settingsMenu->idAt(1),bViewStatusbar);
if (!bViewStatusbar)
statusBar()->hide();
@@ -176,12 +176,12 @@ void KTApp::readOptions()
// bar position settings
KToolBar::BarPosition tool_bar_pos;
tool_bar_pos=(KToolBar::BarPosition)
- config->readNumEntry(QString("ToolBarPos"),
+ config->readNumEntry(TQString("ToolBarPos"),
KToolBar::Top);
toolBar()->setBarPos(tool_bar_pos);
- QSize size=config->readSizeEntry(QString("Geometry"));
+ TQSize size=config->readSizeEntry(TQString("Geometry"));
// Minimum size is 350 by 250
@@ -212,7 +212,7 @@ bool KTApp::queryClose()
int retVal = KMessageBox::warningYesNoCancel(win,
i18n("Scheduled tasks have been modified.\nDo you want to save changes?"),
- QString::null,
+ TQString::null,
KStdGuiItem::save(), KStdGuiItem::discard()
);
@@ -274,7 +274,7 @@ void KTApp::slotFileQuit()
close();
}
-void KTApp::slotEdit(const QPoint& qp)
+void KTApp::slotEdit(const TQPoint& qp)
{
KPopupMenu *editMenu = static_cast<KPopupMenu*>(guiFactory()->container("edit", this));
editMenu->exec(qp, 0);
@@ -374,14 +374,14 @@ void KTApp::slotViewStatusBar()
slotStatusMsg(i18n("Ready."));
}
-void KTApp::slotStatusMsg(const QString & text)
+void KTApp::slotStatusMsg(const TQString & text)
{
statusBar()->clear();
statusBar()->changeItem(text, statusMessage);
setCaption(i18n("Task Scheduler"), cthost->dirty());
}
-void KTApp::slotStatusHelpMsg(const QString & text)
+void KTApp::slotStatusHelpMsg(const TQString & text)
{
statusBar()->message(text, 2000);
}
diff --git a/kcron/ktapp.h b/kcron/ktapp.h
index c42ad06..37a830b 100644
--- a/kcron/ktapp.h
+++ b/kcron/ktapp.h
@@ -125,7 +125,7 @@ public slots:
/**
* Pop up an edit menu.
*/
- void slotEdit(const QPoint& qp);
+ void slotEdit(const TQPoint& qp);
/**
* Put the marked objects on the clipboard and remove it from the
@@ -182,7 +182,7 @@ public slots:
* Changes the status bar contents for the standard label permanently;
* used to indicate current actions.
*/
- void slotStatusMsg(const QString & text);
+ void slotStatusMsg(const TQString & text);
/**
* Changes the status message of the whole status bar for two seconds,
@@ -190,7 +190,7 @@ public slots:
* messages that give information about actions for toolbar icons and
* menu entries.
*/
- void slotStatusHelpMsg(const QString & text);
+ void slotStatusHelpMsg(const TQString & text);
/** Enables/disables modification buttons
*/
@@ -223,7 +223,7 @@ private:
/**
* Get application caption.
*/
- QString caption();
+ TQString caption();
/**
* Initialize actions.
diff --git a/kcron/kticon.cpp b/kcron/kticon.cpp
index eff9f3e..ef6b861 100644
--- a/kcron/kticon.cpp
+++ b/kcron/kticon.cpp
@@ -11,22 +11,22 @@
#include "kticon.h"
-#include <qimage.h>
+#include <tqimage.h>
#include <kglobal.h>
#include <kiconloader.h>
-QPixmap KTIcon::getMiniIcon(const QString& name)
+TQPixmap KTIcon::getMiniIcon(const TQString& name)
{
return SmallIcon(name);
}
-QPixmap KTIcon::getIcon(const QString& name)
+TQPixmap KTIcon::getIcon(const TQString& name)
{
return BarIcon(name);
}
-QPixmap KTIcon::application(bool mini)
+TQPixmap KTIcon::application(bool mini)
{
if (mini)
return getMiniIcon("kcron");
@@ -34,7 +34,7 @@ QPixmap KTIcon::application(bool mini)
return getIcon("kcron");
}
-QPixmap KTIcon::system(bool mini)
+TQPixmap KTIcon::system(bool mini)
{
if (mini)
return getMiniIcon("openterm");
@@ -42,7 +42,7 @@ QPixmap KTIcon::system(bool mini)
return getIcon("openterm");
}
-QPixmap KTIcon::user(bool mini)
+TQPixmap KTIcon::user(bool mini)
{
if (mini)
return getMiniIcon("kuser");
@@ -50,7 +50,7 @@ QPixmap KTIcon::user(bool mini)
return getIcon("kuser");
}
-QPixmap KTIcon::variables(bool mini)
+TQPixmap KTIcon::variables(bool mini)
{
if (mini)
return getMiniIcon("folder");
@@ -58,7 +58,7 @@ QPixmap KTIcon::variables(bool mini)
return getIcon("folder");
}
-QPixmap KTIcon::variable(bool mini)
+TQPixmap KTIcon::variable(bool mini)
{
if (mini)
return getMiniIcon("mime_empty");
@@ -66,7 +66,7 @@ QPixmap KTIcon::variable(bool mini)
return getIcon("mime_empty");
}
-QPixmap KTIcon::mail(bool mini)
+TQPixmap KTIcon::mail(bool mini)
{
if (mini)
return getMiniIcon("mail_generic");
@@ -74,7 +74,7 @@ QPixmap KTIcon::mail(bool mini)
return getIcon("mail_generic");
}
-QPixmap KTIcon::shell(bool mini)
+TQPixmap KTIcon::shell(bool mini)
{
if (mini)
return getMiniIcon("openterm");
@@ -82,7 +82,7 @@ QPixmap KTIcon::shell(bool mini)
return getIcon("openterm");
}
-QPixmap KTIcon::home(bool mini)
+TQPixmap KTIcon::home(bool mini)
{
if (mini)
return getMiniIcon("gohome");
@@ -90,7 +90,7 @@ QPixmap KTIcon::home(bool mini)
return getIcon("gohome");
}
-QPixmap KTIcon::path(bool mini)
+TQPixmap KTIcon::path(bool mini)
{
if (mini)
return getMiniIcon("folder");
@@ -98,7 +98,7 @@ QPixmap KTIcon::path(bool mini)
return getIcon("folder");
}
-QPixmap KTIcon::tasks(bool mini)
+TQPixmap KTIcon::tasks(bool mini)
{
if (mini)
return getMiniIcon("folder");
@@ -106,7 +106,7 @@ QPixmap KTIcon::tasks(bool mini)
return getIcon("folder");
}
-QPixmap KTIcon::task(bool mini)
+TQPixmap KTIcon::task(bool mini)
{
if (mini)
return getMiniIcon("gear");
diff --git a/kcron/kticon.h b/kcron/kticon.h
index 013f726..15a8a91 100644
--- a/kcron/kticon.h
+++ b/kcron/kticon.h
@@ -12,8 +12,8 @@
#ifndef KTICON_H
#define KTICON_H
-#include <qpixmap.h>
-#include <qstring.h>
+#include <tqpixmap.h>
+#include <tqstring.h>
/**
* Wraps all icons used by the application.
@@ -24,19 +24,19 @@ class KTIcon
public:
- static QPixmap getMiniIcon(const QString& name);
- static QPixmap getIcon(const QString& name);
- static QPixmap application(bool mini);
- static QPixmap system(bool mini);
- static QPixmap user(bool mini);
- static QPixmap variables(bool mini);
- static QPixmap variable(bool mini);
- static QPixmap mail(bool mini);
- static QPixmap shell(bool mini);
- static QPixmap home(bool mini);
- static QPixmap path(bool mini);
- static QPixmap tasks(bool mini);
- static QPixmap task(bool mini);
+ static TQPixmap getMiniIcon(const TQString& name);
+ static TQPixmap getIcon(const TQString& name);
+ static TQPixmap application(bool mini);
+ static TQPixmap system(bool mini);
+ static TQPixmap user(bool mini);
+ static TQPixmap variables(bool mini);
+ static TQPixmap variable(bool mini);
+ static TQPixmap mail(bool mini);
+ static TQPixmap shell(bool mini);
+ static TQPixmap home(bool mini);
+ static TQPixmap path(bool mini);
+ static TQPixmap tasks(bool mini);
+ static TQPixmap task(bool mini);
};
diff --git a/kcron/ktlistcron.cpp b/kcron/ktlistcron.cpp
index e2535bb..05dadb3 100644
--- a/kcron/ktlistcron.cpp
+++ b/kcron/ktlistcron.cpp
@@ -11,7 +11,7 @@
#include "ktlistcron.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <klocale.h>
#include "ctcron.h"
@@ -26,14 +26,14 @@ KTListCron::KTListCron(KTListItem* parent, const char* name,
refresh();
}
-KTListCron::KTListCron(QListView* parent, const char* name,
+KTListCron::KTListCron(TQListView* parent, const char* name,
CTCron* _ctcron) :
KTListItem(parent, name, _ctcron)
{
refresh();
}
-KTListCron::KTListCron(QListView* parent, CTCron* _ctcron) :
+KTListCron::KTListCron(TQListView* parent, CTCron* _ctcron) :
KTListItem(parent, (const char*)0, _ctcron)
{
refresh();
@@ -44,21 +44,21 @@ void KTListCron::refresh()
setPixmap(0, getCTCron()->login.c_str() == (i18n("(System Crontab)")) ?
KTIcon::system(true) : KTIcon::user(true));
- QString userName = QString::fromLocal8Bit(getCTCron()->login.c_str());
+ TQString userName = TQString::fromLocal8Bit(getCTCron()->login.c_str());
if (getCTCron()->login != getCTCron()->name)
{
- userName += QString(" (");
- userName += QString::fromLocal8Bit(getCTCron()->name.c_str());
- userName += QString(")");
+ userName += TQString(" (");
+ userName += TQString::fromLocal8Bit(getCTCron()->name.c_str());
+ userName += TQString(")");
}
setText(0, userName);
}
void KTListCron::print (KTPrint& printer) const
{
- QString userInfo;
- userInfo = QString::fromLocal8Bit(getCTCron()->name.c_str());
+ TQString userInfo;
+ userInfo = TQString::fromLocal8Bit(getCTCron()->name.c_str());
KTListItem* ktli = (KTListItem*)this->firstChild();
Q_CHECK_PTR(ktli);
diff --git a/kcron/ktlistcron.h b/kcron/ktlistcron.h
index 9fe5fe2..713a375 100644
--- a/kcron/ktlistcron.h
+++ b/kcron/ktlistcron.h
@@ -19,7 +19,7 @@
#include "ktlistitem.h"
/**
- * QListViewItem view of a CTCron.
+ * TQListViewItem view of a CTCron.
*/
class KTListCron : public KTListItem
{
@@ -33,12 +33,12 @@ public:
/**
* Construct tasks or variables folder from root.
*/
- KTListCron(QListView* parent, const char* name, CTCron* _ctcron);
+ KTListCron(TQListView* parent, const char* name, CTCron* _ctcron);
/**
* Construct user folder from root.
*/
- KTListCron(QListView* parent, CTCron* _ctcron);
+ KTListCron(TQListView* parent, CTCron* _ctcron);
/**
* Refresh.
diff --git a/kcron/ktlistitem.cpp b/kcron/ktlistitem.cpp
index 02cd163..ef2ad0e 100644
--- a/kcron/ktlistitem.cpp
+++ b/kcron/ktlistitem.cpp
@@ -15,13 +15,13 @@
#include "ctcron.h"
KTListItem::KTListItem(KTListItem* parent, const char* name, CTCron* _ctcron) :
- QListViewItem(parent, name),
+ TQListViewItem(parent, name),
ctcron(_ctcron)
{
}
-KTListItem::KTListItem(QListView* parent, const char* name, CTCron* _ctcron) :
- QListViewItem(parent, name),
+KTListItem::KTListItem(TQListView* parent, const char* name, CTCron* _ctcron) :
+ TQListViewItem(parent, name),
ctcron(_ctcron)
{
}
diff --git a/kcron/ktlistitem.h b/kcron/ktlistitem.h
index 6d10974..718fb79 100644
--- a/kcron/ktlistitem.h
+++ b/kcron/ktlistitem.h
@@ -16,13 +16,13 @@
#include <config.h>
#endif
-#include <qlistview.h>
+#include <tqlistview.h>
class KTPrint;
class CTCron;
/**
- * An enhanced QListViewItem that ensures all list view items have the
+ * An enhanced TQListViewItem that ensures all list view items have the
* same interface.
*/
class KTListItem : public QListViewItem
@@ -37,7 +37,7 @@ public:
/**
* Construct a non-root list view item from a CTCron.
*/
- KTListItem(QListView* parent, const char* name, CTCron* _ctcron);
+ KTListItem(TQListView* parent, const char* name, CTCron* _ctcron);
/**
* Destructor.
diff --git a/kcron/ktlisttask.cpp b/kcron/ktlisttask.cpp
index b496b77..17a1378 100644
--- a/kcron/ktlisttask.cpp
+++ b/kcron/ktlisttask.cpp
@@ -30,12 +30,12 @@ KTListTask::KTListTask(KTListItem* parent,
void KTListTask::refresh()
{
- setText(0, QString::fromLocal8Bit(cttask->comment.c_str()));
+ setText(0, TQString::fromLocal8Bit(cttask->comment.c_str()));
if (cttask->enabled)
{
- setText(1, QString::fromLocal8Bit(cttask->command.c_str()));
- setText(2, QString::fromLocal8Bit(cttask->describe().c_str()));
+ setText(1, TQString::fromLocal8Bit(cttask->command.c_str()));
+ setText(2, TQString::fromLocal8Bit(cttask->describe().c_str()));
}
else
{
@@ -48,10 +48,10 @@ void KTListTask::refresh()
void KTListTask::print (KTPrint &printer) const
{
- printer.print(QString::fromLocal8Bit(cttask->comment.c_str()), 1, KTPrint::alignTextLeft);
+ printer.print(TQString::fromLocal8Bit(cttask->comment.c_str()), 1, KTPrint::alignTextLeft);
if (cttask->enabled) {
- printer.print(QString::fromLocal8Bit(cttask->command.c_str()),2, KTPrint::alignTextCenter);
- printer.print(QString::fromLocal8Bit(cttask->describe().c_str()),3, KTPrint::alignTextRight);
+ printer.print(TQString::fromLocal8Bit(cttask->command.c_str()),2, KTPrint::alignTextCenter);
+ printer.print(TQString::fromLocal8Bit(cttask->describe().c_str()),3, KTPrint::alignTextRight);
}
else
printer.print(i18n("Disabled."), 3, KTPrint::alignTextRight);
diff --git a/kcron/ktlisttask.h b/kcron/ktlisttask.h
index bd8054e..3384745 100644
--- a/kcron/ktlisttask.h
+++ b/kcron/ktlisttask.h
@@ -21,7 +21,7 @@
class CTTask;
/**
- * QListViewItem with a CTTask.
+ * TQListViewItem with a CTTask.
*/
class KTListTask : public KTListItem
{
diff --git a/kcron/ktlisttasks.cpp b/kcron/ktlisttasks.cpp
index e1fc19b..95c7779 100644
--- a/kcron/ktlisttasks.cpp
+++ b/kcron/ktlisttasks.cpp
@@ -11,7 +11,7 @@
#include "ktlisttasks.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <klocale.h> // i18n()
#include <kglobalsettings.h>
@@ -30,13 +30,13 @@ KTListTasks::KTListTasks(KTListItem* parent, CTCron* _ctcron) :
refresh();
}
-KTListTasks::KTListTasks(QListView* parent, CTCron* _ctcron) :
+KTListTasks::KTListTasks(TQListView* parent, CTCron* _ctcron) :
KTListItem(parent, 0, _ctcron)
{
refresh();
}
-QString KTListTasks::getDescription()
+TQString KTListTasks::getDescription()
{
return i18n("Tasks");
}
@@ -66,11 +66,11 @@ void KTListTasks::refresh()
void KTListTasks::print (KTPrint& printer) const
{
- QFont stnd;
+ TQFont stnd;
stnd = printer.getFont();
- printer.setFont(QFont( KGlobalSettings::generalFont().family(), 10, QFont::Bold ));
+ printer.setFont(TQFont( KGlobalSettings::generalFont().family(), 10, TQFont::Bold ));
printer.print (i18n("Task name:"), 1, KTPrint::alignTextLeft);
printer.print (i18n("Program:"), 2, KTPrint::alignTextCenter);
printer.print (i18n("Description:"),3,KTPrint::alignTextRight);
diff --git a/kcron/ktlisttasks.h b/kcron/ktlisttasks.h
index 075edde..6d3ec3b 100644
--- a/kcron/ktlisttasks.h
+++ b/kcron/ktlisttasks.h
@@ -21,7 +21,7 @@
class QString;
/**
- * QListViewItem of a "tasks" folder.
+ * TQListViewItem of a "tasks" folder.
*/
class KTListTasks : public KTListItem
{
@@ -35,12 +35,12 @@ public:
/**
* Construct tasks folder from root.
*/
- KTListTasks(QListView* parent, CTCron* _ctcron);
+ KTListTasks(TQListView* parent, CTCron* _ctcron);
/**
* Internationalized description.
*/
- static QString getDescription();
+ static TQString getDescription();
/**
* Create.
diff --git a/kcron/ktlistvar.cpp b/kcron/ktlistvar.cpp
index 1157683..e6c4f6a 100644
--- a/kcron/ktlistvar.cpp
+++ b/kcron/ktlistvar.cpp
@@ -30,12 +30,12 @@ KTListVar::KTListVar(KTListItem* parent, CTCron* _ctcron,
void KTListVar::refresh()
{
- setText (0,QString::fromLocal8Bit(ctvar->variable.c_str()));
+ setText (0,TQString::fromLocal8Bit(ctvar->variable.c_str()));
if (ctvar->enabled)
{
- setText (1,QString::fromLocal8Bit(ctvar->value.c_str()));
- setText (2,QString::fromLocal8Bit(ctvar->comment.c_str()));
+ setText (1,TQString::fromLocal8Bit(ctvar->value.c_str()));
+ setText (2,TQString::fromLocal8Bit(ctvar->comment.c_str()));
}
else
{
@@ -57,10 +57,10 @@ void KTListVar::refresh()
void KTListVar::print(KTPrint& printer) const
{
- printer.print(QString::fromLocal8Bit(ctvar->variable.c_str()), 1, KTPrint::alignTextLeft);
+ printer.print(TQString::fromLocal8Bit(ctvar->variable.c_str()), 1, KTPrint::alignTextLeft);
if (ctvar->enabled) {
- printer.print(QString::fromLocal8Bit(ctvar->value.c_str()),2, KTPrint::alignTextCenter);
- printer.print(QString::fromLocal8Bit(ctvar->comment.c_str()),3,KTPrint::alignTextRight);
+ printer.print(TQString::fromLocal8Bit(ctvar->value.c_str()),2, KTPrint::alignTextCenter);
+ printer.print(TQString::fromLocal8Bit(ctvar->comment.c_str()),3,KTPrint::alignTextRight);
}
else
printer.print(i18n("Disabled."),3, KTPrint::alignTextRight);
diff --git a/kcron/ktlistvar.h b/kcron/ktlistvar.h
index c5880a4..0d4e7f0 100644
--- a/kcron/ktlistvar.h
+++ b/kcron/ktlistvar.h
@@ -21,7 +21,7 @@
class CTVariable;
/**
- * QListViewItem with a CTVariable.
+ * TQListViewItem with a CTVariable.
*/
class KTListVar : public KTListItem
{
diff --git a/kcron/ktlistvars.cpp b/kcron/ktlistvars.cpp
index 6bdde2d..64d43a1 100644
--- a/kcron/ktlistvars.cpp
+++ b/kcron/ktlistvars.cpp
@@ -12,7 +12,7 @@
#include "ktlistvars.h"
-#include <qstring.h>
+#include <tqstring.h>
#include <klocale.h> // i18n()
#include <kglobalsettings.h>
@@ -31,7 +31,7 @@ KTListVars::KTListVars(KTListItem* parent, CTCron* _ctcron) :
refresh();
}
-KTListVars::KTListVars(QListView* parent, CTCron* _ctcron) :
+KTListVars::KTListVars(TQListView* parent, CTCron* _ctcron) :
KTListItem(parent, 0, _ctcron)
{
refresh();
@@ -62,10 +62,10 @@ void KTListVars::refresh()
void KTListVars::print(KTPrint& printer) const
{
- QFont stnd;
+ TQFont stnd;
stnd = printer.getFont() ;
- printer.setFont(QFont( KGlobalSettings::generalFont().family(), 10, QFont::Bold ));
+ printer.setFont(TQFont( KGlobalSettings::generalFont().family(), 10, TQFont::Bold ));
printer.print(i18n("Variable:"), 1, KTPrint::alignTextLeft);
printer.print(i18n("Value:"), 2, KTPrint::alignTextCenter);
@@ -93,7 +93,7 @@ void KTListVars::print(KTPrint& printer) const
printer.levelColumns(20);
}
-QString KTListVars::getDescription()
+TQString KTListVars::getDescription()
{
return i18n("Variables");
}
diff --git a/kcron/ktlistvars.h b/kcron/ktlistvars.h
index b338082..91a145a 100644
--- a/kcron/ktlistvars.h
+++ b/kcron/ktlistvars.h
@@ -22,7 +22,7 @@
class QString;
/**
- * QListViewItem of a "variables" folder.
+ * TQListViewItem of a "variables" folder.
*/
class KTListVars : public KTListItem
{
@@ -36,12 +36,12 @@ public:
/**
* Construct variables folder from root.
*/
- KTListVars(QListView* parent, CTCron* _ctcron);
+ KTListVars(TQListView* parent, CTCron* _ctcron);
/**
* Internationalized description.
*/
- static QString getDescription();
+ static TQString getDescription();
/**
* Refresh.
diff --git a/kcron/ktprint.cpp b/kcron/ktprint.cpp
index 423b6a1..b1de5c6 100644
--- a/kcron/ktprint.cpp
+++ b/kcron/ktprint.cpp
@@ -11,9 +11,9 @@
* (at your option) any later version. *
***************************************************************************/
-#include <qpainter.h>
-#include <qstring.h>
-#include <qpaintdevicemetrics.h>
+#include <tqpainter.h>
+#include <tqstring.h>
+#include <tqpaintdevicemetrics.h>
#include <ktprintopt.h>
#include <klocale.h>
@@ -80,12 +80,12 @@ bool KTPrint:: start ()
if (prnt->setup(0L, i18n("Print Cron Tab"))) { //Setup a printer
if (paint!=NULL) delete paint;
- paint = new QPainter ();
+ paint = new TQPainter ();
paint->begin(prnt);
paint->setTabStops(20); // Setup a defualt tab stop size
//Get the information about the page size
- QPaintDeviceMetrics metrics (prnt);
+ TQPaintDeviceMetrics metrics (prnt);
width = metrics.width () - (leftMargin + rightMargin);
height = metrics.height () - (topMargin + bottomMargin);
return true;
@@ -94,17 +94,17 @@ bool KTPrint:: start ()
return false;
}
-void KTPrint :: setFont (const QFont &font)
+void KTPrint :: setFont (const TQFont &font)
{
paint->setFont(font);
}
-QFont KTPrint :: getFont () const
+TQFont KTPrint :: getFont () const
{
return paint->font();
}
-void KTPrint :: print (const QString &str, int col, int alignment, bool wordWrap)
+void KTPrint :: print (const TQString &str, int col, int alignment, bool wordWrap)
{
//Prints the string str into the column col using
//the remaining arguments as format flags
@@ -132,7 +132,7 @@ void KTPrint :: print (const QString &str, int col, int alignment, bool wordWrap
//Whats left of the page
int remainder (height - columns[col-1]->height);
- QRect rect=paint->boundingRect(columns[col-1]->start,columns[col-1]->height, columns[col-1]->width(), remainder,format, str);
+ TQRect rect=paint->boundingRect(columns[col-1]->start,columns[col-1]->height, columns[col-1]->width(), remainder,format, str);
if (rect.height() <= remainder)
{
diff --git a/kcron/ktprint.h b/kcron/ktprint.h
index da22ff3..c5351e1 100644
--- a/kcron/ktprint.h
+++ b/kcron/ktprint.h
@@ -77,17 +77,17 @@ public:
/**
* Set the font to be used
*/
- void setFont (const QFont &font);
+ void setFont (const TQFont &font);
/**
* Get the current font
*/
- QFont getFont ()const;
+ TQFont getFont ()const;
/**
* Print text
*/
- void print (const QString &str, int col =1, int alignment=KTPrint::defaultLeftMargin, bool wordWrap = true);
+ void print (const TQString &str, int col =1, int alignment=KTPrint::defaultLeftMargin, bool wordWrap = true);
/**
* Constructs the columns
@@ -165,7 +165,7 @@ private:
/**
* Pointer to a painter object
*/
- QPainter *paint;
+ TQPainter *paint;
/**
* Whether we are root or not
diff --git a/kcron/ktprintopt.cpp b/kcron/ktprintopt.cpp
index 68315c5..f609869 100644
--- a/kcron/ktprintopt.cpp
+++ b/kcron/ktprintopt.cpp
@@ -11,8 +11,8 @@
* (at your option) any later version. *
***************************************************************************/
-#include <qcheckbox.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
#include <kdialog.h>
#include <kaccel.h>
@@ -25,12 +25,12 @@ KTPrintOpt::KTPrintOpt(bool root) :
{
m_title = i18n("Cron Options");
- QVBoxLayout *main_ = new QVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
+ TQVBoxLayout *main_ = new TQVBoxLayout(this, KDialog::marginHint(), KDialog::spacingHint());
- chkPrintCrontab = new QCheckBox(i18n("Print cron&tab"), this, "chkPrintCrontab");
+ chkPrintCrontab = new TQCheckBox(i18n("Print cron&tab"), this, "chkPrintCrontab");
main_->addWidget(chkPrintCrontab);
- chkPrintAllUsers = new QCheckBox(i18n("Print &all users"), this, "chkPrintAllUsers");
+ chkPrintAllUsers = new TQCheckBox(i18n("Print &all users"), this, "chkPrintAllUsers");
main_->addWidget(chkPrintAllUsers);
if (!root) {
@@ -44,9 +44,9 @@ KTPrintOpt::~KTPrintOpt()
}
void
-KTPrintOpt::setOptions(const QMap<QString,QString>& opts)
+KTPrintOpt::setOptions(const TQMap<TQString,TQString>& opts)
{
- QString value;
+ TQString value;
value = opts["crontab"];
chkPrintCrontab->setChecked(value == "true");
@@ -58,7 +58,7 @@ KTPrintOpt::setOptions(const QMap<QString,QString>& opts)
}
}
-void KTPrintOpt::getOptions(QMap<QString,QString>& opts, bool)
+void KTPrintOpt::getOptions(TQMap<TQString,TQString>& opts, bool)
{
opts["crontab"] = chkPrintCrontab->isChecked() ? "true" : "false";
opts["allusers"] = chkPrintAllUsers->isChecked() ? "true" : "false";
diff --git a/kcron/ktprintopt.h b/kcron/ktprintopt.h
index 0ab1810..8523432 100644
--- a/kcron/ktprintopt.h
+++ b/kcron/ktprintopt.h
@@ -40,13 +40,13 @@ public:
~KTPrintOpt();
- void setOptions(const QMap<QString,QString>& options);
- void getOptions(QMap<QString,QString>& options, bool incldef = false);
+ void setOptions(const TQMap<TQString,TQString>& options);
+ void getOptions(TQMap<TQString,TQString>& options, bool incldef = false);
private:
- QCheckBox* chkPrintCrontab;
- QCheckBox* chkPrintAllUsers;
+ TQCheckBox* chkPrintCrontab;
+ TQCheckBox* chkPrintAllUsers;
};
#endif
diff --git a/kcron/kttask.cpp b/kcron/kttask.cpp
index 500cab4..88e5567 100644
--- a/kcron/kttask.cpp
+++ b/kcron/kttask.cpp
@@ -11,15 +11,15 @@
#include "kttask.h"
-#include <qlabel.h>
-#include <qstring.h>
-#include <qfileinfo.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qbuttongroup.h>
-#include <qpainter.h>
-#include <qpalette.h>
+#include <tqlabel.h>
+#include <tqstring.h>
+#include <tqfileinfo.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
+#include <tqbuttongroup.h>
+#include <tqpainter.h>
+#include <tqpalette.h>
#include <kapplication.h>
#include <kaccel.h>
@@ -36,37 +36,37 @@
class KTPushButton : public QPushButton
{
public:
- KTPushButton(QWidget * parent, const char * name = 0 )
- : QPushButton(parent, name), isSelected(false), isDirty(false)
+ KTPushButton(TQWidget * parent, const char * name = 0 )
+ : TQPushButton(parent, name), isSelected(false), isDirty(false)
{
updatePalette();
}
void updatePalette()
{
- palNormal = ((QWidget *)parent())->palette();
+ palNormal = ((TQWidget *)parent())->palette();
palSelected = palNormal;
- for(int cg = (int) QPalette::Disabled; cg < (int) QPalette::NColorGroups; cg++)
+ for(int cg = (int) TQPalette::Disabled; cg < (int) TQPalette::NColorGroups; cg++)
{
- palSelected.setColor((QPalette::ColorGroup)cg, QColorGroup::Button,
- palSelected.color((QPalette::ColorGroup)cg, QColorGroup::Highlight));
- palSelected.setColor((QPalette::ColorGroup)cg, QColorGroup::ButtonText,
- palSelected.color((QPalette::ColorGroup)cg, QColorGroup::HighlightedText));
+ palSelected.setColor((TQPalette::ColorGroup)cg, TQColorGroup::Button,
+ palSelected.color((TQPalette::ColorGroup)cg, TQColorGroup::Highlight));
+ palSelected.setColor((TQPalette::ColorGroup)cg, TQColorGroup::ButtonText,
+ palSelected.color((TQPalette::ColorGroup)cg, TQColorGroup::HighlightedText));
}
isDirty = true;
}
- bool event( QEvent *e)
+ bool event( TQEvent *e)
{
- if (e->type() == QEvent::ParentPaletteChange)
+ if (e->type() == TQEvent::ParentPaletteChange)
{
updatePalette();
update();
}
- return QPushButton::event(e);
+ return TQPushButton::event(e);
}
- void drawButton ( QPainter *p )
+ void drawButton ( TQPainter *p )
{
if (isDirty || (isOn() != isSelected)) // Prevent infinite recursion
{
@@ -77,48 +77,48 @@ public:
else
setPalette(palNormal);
}
- QPushButton::drawButton(p);
+ TQPushButton::drawButton(p);
}
- void drawButtonLabel ( QPainter *p )
+ void drawButtonLabel ( TQPainter *p )
{
p->save();
if (isOn())
{
- QFont f = p->font();
+ TQFont f = p->font();
f.setUnderline(true);
p->setFont(f);
}
- QPushButton::drawButtonLabel(p);
+ TQPushButton::drawButtonLabel(p);
p->restore();
}
bool isSelected;
bool isDirty;
- QPalette palSelected;
- QPalette palNormal;
+ TQPalette palSelected;
+ TQPalette palNormal;
};
-KTTask::KTTask(CTTask* _cttask, const QString & _caption)
+KTTask::KTTask(CTTask* _cttask, const TQString & _caption)
:KDialog( 0, "kttask", true, WStyle_DialogBorder )
{
cttask = _cttask;
bool everyDay(true);
- QVBoxLayout *ml = new QVBoxLayout( this, KDialogBase::spacingHint() );
+ TQVBoxLayout *ml = new TQVBoxLayout( this, KDialogBase::spacingHint() );
- QHBoxLayout *h1 = new QHBoxLayout( ml, KDialogBase::spacingHint() );
+ TQHBoxLayout *h1 = new TQHBoxLayout( ml, KDialogBase::spacingHint() );
// user
- labUser = new QLabel( i18n("&Run as:"), this, "labUser" );
+ labUser = new TQLabel( i18n("&Run as:"), this, "labUser" );
h1->addWidget( labUser );
- leUser = new QLineEdit( this, "leUser");
+ leUser = new TQLineEdit( this, "leUser");
labUser->setBuddy(leUser);
h1->addWidget( leUser );
if (cttask->system())
{
- leUser->setText(QString::fromLocal8Bit(cttask->user.c_str()));
+ leUser->setText(TQString::fromLocal8Bit(cttask->user.c_str()));
}
else
{
@@ -127,92 +127,92 @@ KTTask::KTTask(CTTask* _cttask, const QString & _caption)
}
// icon
- labIcon = new QLabel(this, "labIcon");
+ labIcon = new TQLabel(this, "labIcon");
labIcon->setFixedSize(32, 32);
h1->addStretch( 1 );
h1->addWidget( labIcon );
// comment
- QHBoxLayout *h2 = new QHBoxLayout( ml, KDialogBase::spacingHint() );
+ TQHBoxLayout *h2 = new TQHBoxLayout( ml, KDialogBase::spacingHint() );
- labComment = new QLabel( i18n("&Comment:"), this, "labComment" );
+ labComment = new TQLabel( i18n("&Comment:"), this, "labComment" );
h2->addWidget( labComment );
- leComment = new QLineEdit(this, "leComment");
+ leComment = new TQLineEdit(this, "leComment");
labComment->setBuddy(leComment);
h2->addWidget( leComment );
- leComment->setText(QString::fromLocal8Bit(cttask->comment.c_str()));
+ leComment->setText(TQString::fromLocal8Bit(cttask->comment.c_str()));
// command
- QHBoxLayout *h3 = new QHBoxLayout( ml, KDialogBase::spacingHint() );
+ TQHBoxLayout *h3 = new TQHBoxLayout( ml, KDialogBase::spacingHint() );
- labCommand = new QLabel( i18n("&Program:"), this, "labCommand" );
+ labCommand = new TQLabel( i18n("&Program:"), this, "labCommand" );
h3->addWidget( labCommand );
- leCommand = new QLineEdit(this, "leCommand");
+ leCommand = new TQLineEdit(this, "leCommand");
labCommand->setBuddy(leCommand);
h3->addWidget( leCommand );
- leCommand->setText(QString::fromLocal8Bit(cttask->command.c_str()));
+ leCommand->setText(TQString::fromLocal8Bit(cttask->command.c_str()));
labComment->setFixedWidth( QMAX( labComment->width(), labCommand->width()) );
labCommand->setFixedWidth( QMAX( labComment->width(), labCommand->width()) );
slotCommandChanged();
- pbBrowse = new QPushButton(this, "pbBrowse");
+ pbBrowse = new TQPushButton(this, "pbBrowse");
pbBrowse->setText(i18n("&Browse..."));
h3->addWidget( pbBrowse );
- QHBoxLayout *h3a = new QHBoxLayout( ml, KDialogBase::spacingHint() );
+ TQHBoxLayout *h3a = new TQHBoxLayout( ml, KDialogBase::spacingHint() );
// enabled
- chkEnabled = new QCheckBox(i18n("&Enabled"), this, "chkEnabled");
+ chkEnabled = new TQCheckBox(i18n("&Enabled"), this, "chkEnabled");
chkEnabled->setChecked(cttask->enabled);
h3a->addWidget( chkEnabled );
- QHBoxLayout *h4 = new QHBoxLayout( ml, KDialogBase::spacingHint() );
+ TQHBoxLayout *h4 = new TQHBoxLayout( ml, KDialogBase::spacingHint() );
ml->addSpacing( 2 * KDialogBase::spacingHint() );
// months
- bgMonth = new QButtonGroup( i18n("Months"), this, "bgMonth");
+ bgMonth = new TQButtonGroup( i18n("Months"), this, "bgMonth");
h4->addWidget( bgMonth );
- QVBoxLayout *vmonths = new QVBoxLayout( bgMonth, KDialogBase::spacingHint() );
+ TQVBoxLayout *vmonths = new TQVBoxLayout( bgMonth, KDialogBase::spacingHint() );
vmonths->addSpacing( 2 * KDialogBase::spacingHint() );
for (int mo = 1; mo <= 12; mo++)
{
- cbMonth[mo] = new QCheckBox(bgMonth, "cbMonth");
- cbMonth[mo]->setText(QString::fromLocal8Bit(cttask->month.getName(mo).c_str()));
+ cbMonth[mo] = new TQCheckBox(bgMonth, "cbMonth");
+ cbMonth[mo]->setText(TQString::fromLocal8Bit(cttask->month.getName(mo).c_str()));
cbMonth[mo]->setChecked(cttask->month.get(mo));
vmonths->addWidget( cbMonth[mo], AlignLeft );
if (!cttask->month.get(mo)) everyDay = false;
}
- pbAllMonths = new QPushButton(bgMonth, "pbAllMonths");
+ pbAllMonths = new TQPushButton(bgMonth, "pbAllMonths");
pbAllMonths->setText( i18n("Set All") );
vmonths->addWidget( pbAllMonths, AlignLeft );
- QVBoxLayout *v1 = new QVBoxLayout( h4, KDialogBase::spacingHint() );
+ TQVBoxLayout *v1 = new TQVBoxLayout( h4, KDialogBase::spacingHint() );
// days of the month
- bgDayOfMonth = new QButtonGroup( i18n("Days of Month"), this, "bgDayOfMonth");
+ bgDayOfMonth = new TQButtonGroup( i18n("Days of Month"), this, "bgDayOfMonth");
v1->addWidget( bgDayOfMonth );
- QPushButton* day;
- QString tmp;
+ TQPushButton* day;
+ TQString tmp;
- QVBoxLayout *vdays = new QVBoxLayout( bgDayOfMonth, KDialogBase::spacingHint() );
+ TQVBoxLayout *vdays = new TQVBoxLayout( bgDayOfMonth, KDialogBase::spacingHint() );
vdays->addSpacing( 2 * KDialogBase::spacingHint() );
- QHBoxLayout *hdays = 0;
+ TQHBoxLayout *hdays = 0;
for (int dm = 1; dm <= 31; dm++)
{
if( (dm % 7) == 1 )
- hdays = new QHBoxLayout( vdays, KDialogBase::spacingHint() );
+ hdays = new TQHBoxLayout( vdays, KDialogBase::spacingHint() );
day = new KTPushButton(bgDayOfMonth);
day->setFixedSize(25, 25);
@@ -225,50 +225,50 @@ KTTask::KTTask(CTTask* _cttask, const QString & _caption)
hdays->addWidget( day, AlignLeft );
}
hdays->addStretch( 1 );
- pbAllDaysOfMonth = new QPushButton(bgDayOfMonth, "pbAllDaysOfMonth");
+ pbAllDaysOfMonth = new TQPushButton(bgDayOfMonth, "pbAllDaysOfMonth");
pbAllDaysOfMonth->setText( i18n("Set All") );
hdays->addWidget( pbAllDaysOfMonth, AlignLeft );
// days of the week
- bgDayOfWeek = new QButtonGroup( i18n("Days of Week"), this, "bgDayOfWeek");
+ bgDayOfWeek = new TQButtonGroup( i18n("Days of Week"), this, "bgDayOfWeek");
v1->addWidget( bgDayOfWeek );
- QVBoxLayout *v3 = new QVBoxLayout( bgDayOfWeek, KDialogBase::spacingHint() );
+ TQVBoxLayout *v3 = new TQVBoxLayout( bgDayOfWeek, KDialogBase::spacingHint() );
v3->addSpacing( 2 * KDialogBase::spacingHint() );
for (int dw = 1; dw <= 7; dw++)
{
- cbDayOfWeek[dw] = new QCheckBox(bgDayOfWeek);
- cbDayOfWeek[dw]->setText(QString::fromLocal8Bit(cttask->dayOfWeek.getName(dw).c_str()));
+ cbDayOfWeek[dw] = new TQCheckBox(bgDayOfWeek);
+ cbDayOfWeek[dw]->setText(TQString::fromLocal8Bit(cttask->dayOfWeek.getName(dw).c_str()));
cbDayOfWeek[dw]->setChecked(cttask->dayOfWeek.get(dw));
v3->addWidget( cbDayOfWeek[dw] );
if (!cttask->dayOfWeek.get(dw)) everyDay = false;
}
- pbAllDaysOfWeek = new QPushButton(bgDayOfWeek, "pbAllDaysOfWeek");
+ pbAllDaysOfWeek = new TQPushButton(bgDayOfWeek, "pbAllDaysOfWeek");
pbAllDaysOfWeek->setText( i18n("Set All") );
v3->addWidget( pbAllDaysOfWeek, AlignLeft );
- QVBoxLayout *v2 = new QVBoxLayout( h4, KDialogBase::spacingHint() );
+ TQVBoxLayout *v2 = new TQVBoxLayout( h4, KDialogBase::spacingHint() );
// daily
- bgEveryDay = new QButtonGroup( i18n("Daily"), this, "bgEveryDay");
+ bgEveryDay = new TQButtonGroup( i18n("Daily"), this, "bgEveryDay");
v2->addWidget( bgEveryDay );
- QVBoxLayout *v9 = new QVBoxLayout( bgEveryDay, KDialogBase::spacingHint() );
+ TQVBoxLayout *v9 = new TQVBoxLayout( bgEveryDay, KDialogBase::spacingHint() );
v9->addSpacing( 2 * KDialogBase::spacingHint() );
- cbEveryDay = new QCheckBox( i18n("Run every day"), bgEveryDay, "cbEveryDay");
+ cbEveryDay = new TQCheckBox( i18n("Run every day"), bgEveryDay, "cbEveryDay");
cbEveryDay->setChecked(everyDay);
v9->addWidget( cbEveryDay );
// hours
- bgHour = new QButtonGroup( i18n("Hours"), this, "bgHour");
+ bgHour = new TQButtonGroup( i18n("Hours"), this, "bgHour");
v2->addWidget( bgHour );
- QVBoxLayout *v4 = new QVBoxLayout( bgHour, KDialogBase::spacingHint() );
+ TQVBoxLayout *v4 = new TQVBoxLayout( bgHour, KDialogBase::spacingHint() );
v4->addSpacing( 2 * KDialogBase::spacingHint() );
- labAM = new QLabel( i18n("AM"), bgHour, "labAM");
+ labAM = new TQLabel( i18n("AM"), bgHour, "labAM");
labAM->setAlignment(AlignRight | AlignVCenter);
v4->addWidget( labAM );
@@ -282,37 +282,37 @@ KTTask::KTTask(CTTask* _cttask, const QString & _caption)
pbHour[ho]->setFixedSize(25, 25);
}
- QHBoxLayout *hhours = new QHBoxLayout( v4, KDialogBase::spacingHint() );
+ TQHBoxLayout *hhours = new TQHBoxLayout( v4, KDialogBase::spacingHint() );
for (int ho1 = 0; ho1 <= 11; ho1++)
{
if( ho1 == 6 )
- hhours = new QHBoxLayout( v4, KDialogBase::spacingHint() );
+ hhours = new TQHBoxLayout( v4, KDialogBase::spacingHint() );
hhours->addWidget( pbHour[ho1] );
}
- labPM = new QLabel( i18n("PM"), bgHour, "labPM");
+ labPM = new TQLabel( i18n("PM"), bgHour, "labPM");
labPM->setAlignment(AlignRight | AlignVCenter);
v4->addWidget( labPM );
- hhours = new QHBoxLayout( v4, KDialogBase::spacingHint() );
+ hhours = new TQHBoxLayout( v4, KDialogBase::spacingHint() );
for (int ho1 = 12; ho1 <= 23; ho1++)
{
if( ho1 == 18 )
- hhours = new QHBoxLayout( v4, KDialogBase::spacingHint() );
+ hhours = new TQHBoxLayout( v4, KDialogBase::spacingHint() );
hhours->addWidget( pbHour[ho1] );
}
- hhours = new QHBoxLayout( v4, KDialogBase::spacingHint() );
- pbAllHours = new QPushButton(bgHour, "pbAllHours");
+ hhours = new TQHBoxLayout( v4, KDialogBase::spacingHint() );
+ pbAllHours = new TQPushButton(bgHour, "pbAllHours");
pbAllHours->setText( i18n("Set All") );
hhours->addWidget( pbAllHours, AlignLeft );
// minutes
- bgMinute = new QButtonGroup( i18n("Minutes"), this, "bgMinute");
+ bgMinute = new TQButtonGroup( i18n("Minutes"), this, "bgMinute");
v2->addWidget( bgMinute );
- QVBoxLayout *vmin = new QVBoxLayout( bgMinute, KDialogBase::spacingHint() );
+ TQVBoxLayout *vmin = new TQVBoxLayout( bgMinute, KDialogBase::spacingHint() );
vmin->addSpacing( 2 * KDialogBase::spacingHint() );
for (int mi = 0; mi <= 55; mi+=5)
@@ -324,21 +324,21 @@ KTTask::KTTask(CTTask* _cttask, const QString & _caption)
pbMinute[mi]->setFixedSize(25, 25);
}
- QHBoxLayout *hmin = new QHBoxLayout( vmin, KDialogBase::spacingHint() );
+ TQHBoxLayout *hmin = new TQHBoxLayout( vmin, KDialogBase::spacingHint() );
for (int mi1 = 0; mi1 <= 55; mi1+=5)
{
if( mi1 == 30 )
- hmin = new QHBoxLayout( vmin, KDialogBase::spacingHint() );
+ hmin = new TQHBoxLayout( vmin, KDialogBase::spacingHint() );
hmin->addWidget( pbMinute[mi1] );
}
- hmin = new QHBoxLayout( vmin, KDialogBase::spacingHint() );
- pbAllMinutes = new QPushButton(bgMinute, "pbAllMinutes");
+ hmin = new TQHBoxLayout( vmin, KDialogBase::spacingHint() );
+ pbAllMinutes = new TQPushButton(bgMinute, "pbAllMinutes");
pbAllMinutes->setText( i18n("Set All") );
hmin->addWidget( pbAllMinutes, AlignLeft );
- QHBoxLayout *h5 = new QHBoxLayout( ml, KDialogBase::spacingHint() );
+ TQHBoxLayout *h5 = new TQHBoxLayout( ml, KDialogBase::spacingHint() );
h5->addStretch( 1 );
// OK
@@ -365,42 +365,42 @@ KTTask::KTTask(CTTask* _cttask, const QString & _caption)
}
// connect them up
- connect(pbBrowse, SIGNAL(clicked()), SLOT(slotBrowse()));
- connect(leCommand, SIGNAL(textChanged(const QString&)),
- SLOT(slotCommandChanged()));
- connect(cbEveryDay, SIGNAL(clicked()), SLOT(slotDailyChanged()));
- connect(pbOk, SIGNAL(clicked()), SLOT(slotOK()));
- connect(pbCancel, SIGNAL(clicked()), SLOT(slotCancel()));
- connect(pbAllMonths, SIGNAL(clicked()), SLOT(slotAllMonths()));
+ connect(pbBrowse, TQT_SIGNAL(clicked()), TQT_SLOT(slotBrowse()));
+ connect(leCommand, TQT_SIGNAL(textChanged(const TQString&)),
+ TQT_SLOT(slotCommandChanged()));
+ connect(cbEveryDay, TQT_SIGNAL(clicked()), TQT_SLOT(slotDailyChanged()));
+ connect(pbOk, TQT_SIGNAL(clicked()), TQT_SLOT(slotOK()));
+ connect(pbCancel, TQT_SIGNAL(clicked()), TQT_SLOT(slotCancel()));
+ connect(pbAllMonths, TQT_SIGNAL(clicked()), TQT_SLOT(slotAllMonths()));
for (int mo = 1; mo <= 12; mo++) {
- connect(cbMonth[mo], SIGNAL(clicked()), SLOT(slotMonthChanged()));
+ connect(cbMonth[mo], TQT_SIGNAL(clicked()), TQT_SLOT(slotMonthChanged()));
}
- connect(pbAllDaysOfMonth, SIGNAL(clicked()), SLOT(slotAllDaysOfMonth()));
+ connect(pbAllDaysOfMonth, TQT_SIGNAL(clicked()), TQT_SLOT(slotAllDaysOfMonth()));
for (int dm = 1; dm <= 31; dm++)
{
- connect(pbDayOfMonth[dm], SIGNAL(clicked()), SLOT(slotDayOfMonthChanged()));
+ connect(pbDayOfMonth[dm], TQT_SIGNAL(clicked()), TQT_SLOT(slotDayOfMonthChanged()));
}
- connect(pbAllDaysOfWeek, SIGNAL(clicked()), SLOT(slotAllDaysOfWeek()));
+ connect(pbAllDaysOfWeek, TQT_SIGNAL(clicked()), TQT_SLOT(slotAllDaysOfWeek()));
for (int dw = 1; dw <= 7; dw++)
{
- connect(cbDayOfWeek[dw], SIGNAL(clicked()), SLOT(slotDayOfWeekChanged()));
+ connect(cbDayOfWeek[dw], TQT_SIGNAL(clicked()), TQT_SLOT(slotDayOfWeekChanged()));
}
- connect(pbAllHours, SIGNAL(clicked()), SLOT(slotAllHours()));
+ connect(pbAllHours, TQT_SIGNAL(clicked()), TQT_SLOT(slotAllHours()));
for (int ho = 0; ho <= 23; ho++)
{
- connect(pbHour[ho], SIGNAL(clicked()), SLOT(slotHourChanged()));
+ connect(pbHour[ho], TQT_SIGNAL(clicked()), TQT_SLOT(slotHourChanged()));
}
- connect(pbAllMinutes, SIGNAL(clicked()), SLOT(slotAllMinutes()));
+ connect(pbAllMinutes, TQT_SIGNAL(clicked()), TQT_SLOT(slotAllMinutes()));
for (int mi = 0; mi <= 55; mi+=5)
{
- connect(pbMinute[mi], SIGNAL(clicked()), SLOT(slotMinuteChanged()));
+ connect(pbMinute[mi], TQT_SIGNAL(clicked()), TQT_SLOT(slotMinuteChanged()));
}
// key acceleration
key_accel = new KAccel(this);
- key_accel->insert(KStdAccel::Open, this, SLOT(slotOK()));
- key_accel->insert(KStdAccel::Close, this, SLOT(slotCancel()));
- key_accel->insert(KStdAccel::Quit, this, SLOT(slotCancel()));
+ key_accel->insert(KStdAccel::Open, this, TQT_SLOT(slotOK()));
+ key_accel->insert(KStdAccel::Close, this, TQT_SLOT(slotCancel()));
+ key_accel->insert(KStdAccel::Quit, this, TQT_SLOT(slotCancel()));
key_accel->readSettings();
setFixedSize( minimumSize() );
@@ -419,7 +419,7 @@ KTTask::~KTTask()
void KTTask::slotCommandChanged()
{
/*
- QString qs(leCommand->text());
+ TQString qs(leCommand->text());
int beginPos(qs.findRev("/", qs.length()) + 1);
if (beginPos < 0) beginPos = 0;
@@ -427,9 +427,9 @@ void KTTask::slotCommandChanged()
int endPos(qs.findRev(" ", qs.length()));
if (endPos < 0) endPos = qs.length();
- QString iconName(qs.mid(beginPos, endPos-beginPos) + ".xpm");
+ TQString iconName(qs.mid(beginPos, endPos-beginPos) + ".xpm");
- QPixmap qp(KTIcon::getIcon(iconName));
+ TQPixmap qp(KTIcon::getIcon(iconName));
if (qp.isNull())
labIcon->setPixmap(KTIcon::task(false));
else
@@ -520,8 +520,8 @@ void KTTask::slotOK()
}
// Now validate
- QString message(i18n("Please enter the following to schedule the task:\n"));
- QString sep("\n- ");
+ TQString message(i18n("Please enter the following to schedule the task:\n"));
+ TQString sep("\n- ");
bool showMessage(false);
if (leCommand->text().isEmpty())
@@ -608,13 +608,13 @@ void KTTask::slotOK()
// make sure the file name is a good one if we have an
// absolute path
- QString qs(leCommand->text());
+ TQString qs(leCommand->text());
if (qs.find("/") == 0)
{
int spacePos(qs.find(" "));
if (spacePos < 0) spacePos = qs.length();
- QString programName(qs.left(spacePos));
- QFileInfo file(programName);
+ TQString programName(qs.left(spacePos));
+ TQFileInfo file(programName);
if (!file.isReadable())
{
@@ -636,7 +636,7 @@ void KTTask::slotOK()
// save work in process
if (!cttask->user.empty())
{
- cttask->user = QFile::encodeName(leUser->text());
+ cttask->user = TQFile::encodeName(leUser->text());
}
else
{
diff --git a/kcron/kttask.h b/kcron/kttask.h
index c4d24bf..ae925d1 100644
--- a/kcron/kttask.h
+++ b/kcron/kttask.h
@@ -37,7 +37,7 @@ public:
/**
* Initialize from CTTask.
*/
- KTTask(CTTask* _cttask = 0, const QString &_caption="");
+ KTTask(CTTask* _cttask = 0, const TQString &_caption="");
/**
* Destroy.
@@ -136,47 +136,47 @@ private:
// Widgets.
- QLabel* labUser;
- QLineEdit* leUser;
+ TQLabel* labUser;
+ TQLineEdit* leUser;
- QLabel* labIcon;
+ TQLabel* labIcon;
- QLabel* labComment;
- QLineEdit* leComment;
+ TQLabel* labComment;
+ TQLineEdit* leComment;
- QLabel* labCommand;
- QLineEdit* leCommand;
- QPushButton* pbBrowse;
+ TQLabel* labCommand;
+ TQLineEdit* leCommand;
+ TQPushButton* pbBrowse;
- QCheckBox* chkEnabled;
+ TQCheckBox* chkEnabled;
- QButtonGroup* bgMonth;
- QCheckBox* cbMonth[13];
- QPushButton* pbAllMonths;
+ TQButtonGroup* bgMonth;
+ TQCheckBox* cbMonth[13];
+ TQPushButton* pbAllMonths;
- QButtonGroup* bgDayOfMonth;
- QPushButton* pbDayOfMonth[32];
- QPushButton* pbAllDaysOfMonth;
+ TQButtonGroup* bgDayOfMonth;
+ TQPushButton* pbDayOfMonth[32];
+ TQPushButton* pbAllDaysOfMonth;
- QButtonGroup* bgDayOfWeek;
- QCheckBox* cbDayOfWeek[8];
- QPushButton* pbAllDaysOfWeek;
+ TQButtonGroup* bgDayOfWeek;
+ TQCheckBox* cbDayOfWeek[8];
+ TQPushButton* pbAllDaysOfWeek;
- QButtonGroup* bgEveryDay;
- QCheckBox* cbEveryDay;
+ TQButtonGroup* bgEveryDay;
+ TQCheckBox* cbEveryDay;
- QButtonGroup* bgHour;
- QLabel* labAM;
- QLabel* labPM;
- QPushButton* pbHour[25];
- QPushButton* pbAllHours;
+ TQButtonGroup* bgHour;
+ TQLabel* labAM;
+ TQLabel* labPM;
+ TQPushButton* pbHour[25];
+ TQPushButton* pbAllHours;
- QButtonGroup* bgMinute;
- QPushButton* pbMinute[61];
- QPushButton* pbAllMinutes;
+ TQButtonGroup* bgMinute;
+ TQPushButton* pbMinute[61];
+ TQPushButton* pbAllMinutes;
- QPushButton* pbOk;
- QPushButton* pbCancel;
+ TQPushButton* pbOk;
+ TQPushButton* pbCancel;
};
diff --git a/kcron/ktvariable.cpp b/kcron/ktvariable.cpp
index 014bdf6..19cbba0 100644
--- a/kcron/ktvariable.cpp
+++ b/kcron/ktvariable.cpp
@@ -11,7 +11,7 @@
#include "ktvariable.h"
-#include <qlayout.h>
+#include <tqlayout.h>
#include <kapplication.h> // kapp
#include <klocale.h> // i18n()
@@ -22,22 +22,22 @@
#include "kticon.h"
-KTVariable::KTVariable(CTVariable* _ctvar,const QString &_caption) :
+KTVariable::KTVariable(CTVariable* _ctvar,const TQString &_caption) :
KDialogBase(0, "ktvariable", true, _caption, Ok|Cancel, Ok, true),
ctvar( _ctvar)
{
- QFrame *page = makeMainWidget();
- QGridLayout *layout = new QGridLayout( page, 5, 3, 0, spacingHint() );
+ TQFrame *page = makeMainWidget();
+ TQGridLayout *layout = new TQGridLayout( page, 5, 3, 0, spacingHint() );
layout->setRowStretch(3, 1);
layout->setColStretch(1, 1);
setIcon(KTIcon::application(true));
// variable
- labVariable = new QLabel(i18n("&Variable:"), page, "labVariable");
+ labVariable = new TQLabel(i18n("&Variable:"), page, "labVariable");
layout->addWidget(labVariable, 1, 0, Qt::AlignLeft | Qt::AlignTop);
- cmbVariable = new QComboBox(true, page, "cmbVariable");
+ cmbVariable = new TQComboBox(true, page, "cmbVariable");
layout->addWidget(cmbVariable, 1, 1);
cmbVariable->insertItem("HOME");
@@ -48,20 +48,20 @@ KTVariable::KTVariable(CTVariable* _ctvar,const QString &_caption) :
labVariable->setBuddy(cmbVariable);
// icon
- labIcon = new QLabel(page, "labIcon");
+ labIcon = new TQLabel(page, "labIcon");
layout->addMultiCellWidget(labIcon, 0, 1, 2, 2);
// value
- labValue = new QLabel(i18n("Va&lue:"), page, "labValue");
+ labValue = new TQLabel(i18n("Va&lue:"), page, "labValue");
layout->addWidget(labValue, 2, 0, Qt::AlignLeft | Qt::AlignTop);
- leValue = new QLineEdit(page, "leValue");
+ leValue = new TQLineEdit(page, "leValue");
layout->addMultiCellWidget(leValue, 2, 2, 1, 2);
leValue->setMaxLength(255);
labValue->setBuddy(leValue);
// comment
- labComment = new QLabel(i18n("Co&mment:"), page, "labComment");
+ labComment = new TQLabel(i18n("Co&mment:"), page, "labComment");
layout->addWidget(labComment, 3, 0, Qt::AlignLeft | Qt::AlignTop);
teComment = new KTextEdit(page, "teComment");
@@ -71,26 +71,26 @@ KTVariable::KTVariable(CTVariable* _ctvar,const QString &_caption) :
labComment->setBuddy(teComment);
// enabled
- chkEnabled = new QCheckBox(i18n("&Enabled"), page, "chkEnabled");
+ chkEnabled = new TQCheckBox(i18n("&Enabled"), page, "chkEnabled");
layout->addWidget(chkEnabled, 4, 0);
// set starting field values
- cmbVariable->setEditText(QString::fromLocal8Bit(ctvar->variable.c_str()));
+ cmbVariable->setEditText(TQString::fromLocal8Bit(ctvar->variable.c_str()));
slotVariableChanged();
- leValue->setText(QString::fromLocal8Bit(ctvar->value.c_str()));
+ leValue->setText(TQString::fromLocal8Bit(ctvar->value.c_str()));
- teComment->setText(QString::fromLocal8Bit(ctvar->comment.c_str()));
+ teComment->setText(TQString::fromLocal8Bit(ctvar->comment.c_str()));
chkEnabled->setChecked(ctvar->enabled);
cmbVariable->setFocus();
// connect them up
- connect(cmbVariable,SIGNAL(highlighted(const QString&)),
- SLOT(slotVariableChanged()));
- connect(cmbVariable,SIGNAL(activated(const QString&)),
- SLOT(slotVariableChanged()));
+ connect(cmbVariable,TQT_SIGNAL(highlighted(const TQString&)),
+ TQT_SLOT(slotVariableChanged()));
+ connect(cmbVariable,TQT_SIGNAL(activated(const TQString&)),
+ TQT_SLOT(slotVariableChanged()));
}
KTVariable::~KTVariable()
@@ -99,7 +99,7 @@ KTVariable::~KTVariable()
void KTVariable::slotVariableChanged()
{
- QString variable = cmbVariable->currentText();
+ TQString variable = cmbVariable->currentText();
if (variable == "HOME")
{
labIcon->setPixmap(KTIcon::home(false));
diff --git a/kcron/ktvariable.h b/kcron/ktvariable.h
index eb5eb57..7870ef3 100644
--- a/kcron/ktvariable.h
+++ b/kcron/ktvariable.h
@@ -16,10 +16,10 @@
#include <config.h>
#endif
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qcombobox.h>
-#include <qcheckbox.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqcombobox.h>
+#include <tqcheckbox.h>
#include <kdialogbase.h>
@@ -39,7 +39,7 @@ public:
/**
* Initialize from CTVariable.
*/
- KTVariable(CTVariable* _ctvar = 0, const QString &_caption="");
+ KTVariable(CTVariable* _ctvar = 0, const TQString &_caption="");
/**
* Destroy.
@@ -67,18 +67,18 @@ private:
// Widgets.
- QLabel* labIcon;
+ TQLabel* labIcon;
- QLabel* labVariable;
- QComboBox* cmbVariable;
+ TQLabel* labVariable;
+ TQComboBox* cmbVariable;
- QLabel* labValue;
- QLineEdit* leValue;
+ TQLabel* labValue;
+ TQLineEdit* leValue;
- QLabel* labComment;
+ TQLabel* labComment;
KTextEdit* teComment;
- QCheckBox* chkEnabled;
+ TQCheckBox* chkEnabled;
};
#endif // KTVARIABLE_H
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())
{
diff --git a/kcron/ktview.h b/kcron/ktview.h
index e25129a..1588661 100644
--- a/kcron/ktview.h
+++ b/kcron/ktview.h
@@ -16,7 +16,7 @@
#include <config.h>
#endif
-#include <qwidget.h>
+#include <tqwidget.h>
class QString;
class QListView;
@@ -40,7 +40,7 @@ public:
/**
* Initializes view.
*/
- KTView (QWidget* parent = 0, const char* name=0);
+ KTView (TQWidget* parent = 0, const char* name=0);
/**
* Destructor.
@@ -132,33 +132,33 @@ public slots:
/**
* Pop up context sensitive menu.
*/
- void slotMenu(QListViewItem* qlvi, const QPoint& qp, int i);
+ void slotMenu(TQListViewItem* qlvi, const TQPoint& qp, int i);
/**
* Default action, edit.
*/
- void slotEdit(QListViewItem* qlvi = 0);
+ void slotEdit(TQListViewItem* qlvi = 0);
protected slots:
/**
* Set current and update menu
*/
- void slotSetCurrent (QListViewItem* qlvi);
+ void slotSetCurrent (TQListViewItem* qlvi);
protected:
/**
* Resize view contents.
*/
- virtual void resizeEvent (QResizeEvent* = 0);
+ virtual void resizeEvent (TQResizeEvent* = 0);
private:
/**
* Get absolute path of command.
*/
- QString absolute() const;
+ TQString absolute() const;
/**
* Refresh view from underlying objects.
@@ -173,7 +173,7 @@ private:
/**
* Tree view of the crontab entries.
*/
- QListView* listView;
+ TQListView* listView;
/**
* Current user's crontab.