summaryrefslogtreecommitdiffstats
path: root/karm
diff options
context:
space:
mode:
Diffstat (limited to 'karm')
-rw-r--r--karm/csvexportdialog.cpp14
-rw-r--r--karm/csvexportdialog.h2
-rw-r--r--karm/desktoplist.h4
-rw-r--r--karm/desktoptracker.cpp14
-rw-r--r--karm/desktoptracker.h4
-rw-r--r--karm/edittaskdialog.cpp104
-rw-r--r--karm/edittaskdialog.h24
-rw-r--r--karm/idletimedetector.cpp20
-rw-r--r--karm/idletimedetector.h10
-rw-r--r--karm/kaccelmenuwatch.cpp18
-rw-r--r--karm/kaccelmenuwatch.h24
-rw-r--r--karm/karm_part.cpp222
-rw-r--r--karm/karm_part.h48
-rw-r--r--karm/karmdcopiface.h26
-rw-r--r--karm/karmstorage.cpp266
-rw-r--r--karm/karmstorage.h86
-rw-r--r--karm/karmutility.cpp4
-rw-r--r--karm/karmutility.h4
-rw-r--r--karm/ktimewidget.cpp42
-rw-r--r--karm/ktimewidget.h6
-rw-r--r--karm/main.cpp2
-rw-r--r--karm/mainwindow.cpp226
-rw-r--r--karm/mainwindow.h38
-rw-r--r--karm/plannerparser.cpp14
-rw-r--r--karm/plannerparser.h6
-rw-r--r--karm/preferences.cpp132
-rw-r--r--karm/preferences.h34
-rw-r--r--karm/print.cpp40
-rw-r--r--karm/print.h6
-rw-r--r--karm/printdialog.cpp52
-rw-r--r--karm/printdialog.h10
-rw-r--r--karm/reportcriteria.h10
-rw-r--r--karm/task.cpp102
-rw-r--r--karm/task.h70
-rw-r--r--karm/taskview.cpp170
-rw-r--r--karm/taskview.h52
-rw-r--r--karm/taskviewwhatsthis.cpp10
-rw-r--r--karm/taskviewwhatsthis.h6
-rw-r--r--karm/test/lockerthread.cpp10
-rw-r--r--karm/test/lockerthread.h8
-rw-r--r--karm/test/locking.cpp16
-rw-r--r--karm/test/runscripts.cpp44
-rw-r--r--karm/test/script.cpp36
-rw-r--r--karm/test/script.h10
-rw-r--r--karm/timekard.cpp128
-rw-r--r--karm/timekard.h42
-rw-r--r--karm/tray.cpp50
-rw-r--r--karm/tray.h16
48 files changed, 1141 insertions, 1141 deletions
diff --git a/karm/csvexportdialog.cpp b/karm/csvexportdialog.cpp
index 4a5536d40..f1e0fce66 100644
--- a/karm/csvexportdialog.cpp
+++ b/karm/csvexportdialog.cpp
@@ -25,15 +25,15 @@
#include <klocale.h>
#include <kpushbutton.h>
#include <kurlrequester.h>
-#include <qbuttongroup.h>
-#include <qcombobox.h>
-#include <qradiobutton.h>
+#include <tqbuttongroup.h>
+#include <tqcombobox.h>
+#include <tqradiobutton.h>
#include "csvexportdialog.h"
#include "reportcriteria.h"
CSVExportDialog::CSVExportDialog( ReportCriteria::REPORTTYPE rt,
- QWidget *parent,
+ TQWidget *parent,
const char *name
)
: CSVExportDialogBase( parent, name )
@@ -55,7 +55,7 @@ CSVExportDialog::CSVExportDialog( ReportCriteria::REPORTTYPE rt,
// If decimal symbol is a comma, then default field seperator to semi-colon.
// In France and Germany, one-and-a-half is written as 1,5 not 1.5
- QString d = KGlobal::locale()->decimalSymbol();
+ TQString d = KGlobal::locale()->decimalSymbol();
if ( "," == d ) CSVExportDialogBase::radioSemicolon->setChecked(true);
else CSVExportDialogBase::radioComma->setChecked(true);
@@ -83,10 +83,10 @@ ReportCriteria CSVExportDialog::reportCriteria()
// moment.
rc.allTasks = true;
- QString t = grpTimeFormat->selected()->name();
+ TQString t = grpTimeFormat->selected()->name();
rc.decimalMinutes = ( t == i18n( "radioDecimal" ) );
- QString d = grpDelimiter->selected()->name();
+ TQString d = grpDelimiter->selected()->name();
if ( d == "radioComma" ) rc.delimiter = ",";
else if ( d == "radioTab" ) rc.delimiter = "\t";
else if ( d == "radioSemicolon" ) rc.delimiter = ";";
diff --git a/karm/csvexportdialog.h b/karm/csvexportdialog.h
index eae6bd4ab..fe13cf9c6 100644
--- a/karm/csvexportdialog.h
+++ b/karm/csvexportdialog.h
@@ -30,7 +30,7 @@ class CSVExportDialog : public CSVExportDialogBase
public:
CSVExportDialog( ReportCriteria::REPORTTYPE rt,
- QWidget *parent = 0,
+ TQWidget *parent = 0,
const char *name = 0
);
diff --git a/karm/desktoplist.h b/karm/desktoplist.h
index ab8404822..5956d0e7f 100644
--- a/karm/desktoplist.h
+++ b/karm/desktoplist.h
@@ -1,8 +1,8 @@
#ifndef KARM_DESKTOP_LIST_H
#define KARM_DESKTOP_LIST_H
-#include <qvaluevector.h>
+#include <tqvaluevector.h>
-typedef QValueVector<int> DesktopList;
+typedef TQValueVector<int> DesktopList;
#endif // KARM_DESKTOP_LIST_H
diff --git a/karm/desktoptracker.cpp b/karm/desktoptracker.cpp
index 52eb67210..deab87548 100644
--- a/karm/desktoptracker.cpp
+++ b/karm/desktoptracker.cpp
@@ -1,6 +1,6 @@
#include <algorithm> // std::find
-#include <qtimer.h>
+#include <tqtimer.h>
#include <kdebug.h>
#include "desktoptracker.h"
@@ -11,8 +11,8 @@ const int minimumInterval = 5; // seconds
DesktopTracker::DesktopTracker ()
{
// Setup desktop change handling
- connect( &kWinModule, SIGNAL( currentDesktopChanged(int) ),
- this, SLOT( handleDesktopChange(int) ));
+ connect( &kWinModule, TQT_SIGNAL( currentDesktopChanged(int) ),
+ this, TQT_SLOT( handleDesktopChange(int) ));
_desktopCount = kWinModule.numberOfDesktops();
_previousDesktop = kWinModule.currentDesktop()-1;
@@ -20,8 +20,8 @@ DesktopTracker::DesktopTracker ()
// currentDesktop will return 0 if no window manager is started
if( _previousDesktop < 0 ) _previousDesktop = 0;
- _timer = new QTimer(this);
- connect( _timer, SIGNAL( timeout() ), this, SLOT( changeTimers() ) );
+ _timer = new TQTimer(this);
+ connect( _timer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( changeTimers() ) );
}
void DesktopTracker::handleDesktopChange( int desktop )
@@ -57,9 +57,9 @@ void DesktopTracker::changeTimers()
// emit updateButtons();
}
-QString DesktopTracker::startTracking()
+TQString DesktopTracker::startTracking()
{
- QString err;
+ TQString err;
int currentDesktop = kWinModule.currentDesktop() -1;
// TODO: removed? fixed by Lubos?
// currentDesktop will return 0 if no window manager is started
diff --git a/karm/desktoptracker.h b/karm/desktoptracker.h
index fee7a026f..a0377b68d 100644
--- a/karm/desktoptracker.h
+++ b/karm/desktoptracker.h
@@ -25,7 +25,7 @@ class DesktopTracker: public QObject
public:
DesktopTracker();
void printTrackers();
- QString startTracking();
+ TQString startTracking();
void registerForDesktops( Task* task, DesktopList dl );
int desktopCount() const { return _desktopCount; };
@@ -39,7 +39,7 @@ class DesktopTracker: public QObject
int _previousDesktop;
int _desktopCount;
int _desktop;
- QTimer *_timer;
+ TQTimer *_timer;
signals:
void reachedtActiveDesktop( Task* task );
diff --git a/karm/edittaskdialog.cpp b/karm/edittaskdialog.cpp
index fb3c49b88..74d3417bd 100644
--- a/karm/edittaskdialog.cpp
+++ b/karm/edittaskdialog.cpp
@@ -20,18 +20,18 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
-#include <qbuttongroup.h>
-#include <qcombobox.h>
-#include <qgroupbox.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qradiobutton.h>
-#include <qsizepolicy.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qwhatsthis.h>
+#include <tqbuttongroup.h>
+#include <tqcombobox.h>
+#include <tqgroupbox.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqradiobutton.h>
+#include <tqsizepolicy.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqwhatsthis.h>
#include <klocale.h> // i18n
#include <kwinmodule.h>
@@ -40,27 +40,27 @@
#include "ktimewidget.h"
#include "kdebug.h"
-EditTaskDialog::EditTaskDialog( QString caption, bool editDlg,
+EditTaskDialog::EditTaskDialog( TQString caption, bool editDlg,
DesktopList* desktopList)
: KDialogBase(0, "EditTaskDialog", true, caption, Ok|Cancel, Ok, true ),
origTime( 0 ), origSession( 0 )
{
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget(page);
KWinModule kwinmodule(0, KWinModule::INFO_DESKTOP);
- QVBoxLayout *lay1 = new QVBoxLayout(page);
+ TQVBoxLayout *lay1 = new TQVBoxLayout(page);
- QHBoxLayout *lay2 = new QHBoxLayout();
+ TQHBoxLayout *lay2 = new TQHBoxLayout();
lay1->addLayout(lay2);
// The name of the widget
- QLabel *label = new QLabel( i18n("Task &name:"), page, "name" );
+ TQLabel *label = new TQLabel( i18n("Task &name:"), page, "name" );
lay2->addWidget( label );
lay2->addSpacing(5);
- _name = new QLineEdit( page, "lineedit" );
+ _name = new TQLineEdit( page, "lineedit" );
_name->setMinimumWidth(fontMetrics().maxWidth()*15);
lay2->addWidget( _name );
@@ -69,26 +69,26 @@ EditTaskDialog::EditTaskDialog( QString caption, bool editDlg,
// The "Edit Absolut" radio button
lay1->addSpacing(10);lay1->addStretch(1);
- _absoluteRB = new QRadioButton( i18n( "Edit &absolute" ), page,
+ _absoluteRB = new TQRadioButton( i18n( "Edit &absolute" ), page,
"_absoluteRB" );
lay1->addWidget( _absoluteRB );
- connect( _absoluteRB, SIGNAL( clicked() ), this, SLOT( slotAbsolutePressed() ) );
+ connect( _absoluteRB, TQT_SIGNAL( clicked() ), this, TQT_SLOT( slotAbsolutePressed() ) );
// Absolute times
- QHBoxLayout *lay5 = new QHBoxLayout();
+ TQHBoxLayout *lay5 = new TQHBoxLayout();
lay1->addLayout(lay5);
lay5->addSpacing(20);
- QGridLayout *lay3 = new QGridLayout( 2, 2, -1, "lay3" );
+ TQGridLayout *lay3 = new TQGridLayout( 2, 2, -1, "lay3" );
lay5->addLayout(lay3);
- _sessionLA = new QLabel( i18n("&Session time: "), page, "session time" );
+ _sessionLA = new TQLabel( i18n("&Session time: "), page, "session time" );
// Time
- _timeLA = new QLabel( i18n("&Time:"), page, "time" );
+ _timeLA = new TQLabel( i18n("&Time:"), page, "time" );
lay3->addWidget( _timeLA, 0, 0 );
- _timeLA->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1,
- (QSizePolicy::SizeType)0,
+ _timeLA->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1,
+ (TQSizePolicy::SizeType)0,
0,
0,
_timeLA->sizePolicy().hasHeightForWidth()) );
@@ -110,8 +110,8 @@ EditTaskDialog::EditTaskDialog( QString caption, bool editDlg,
_sessionTW = new KArmTimeWidget( page, "_sessionTW" );
lay3->addWidget( _sessionTW, 1, 1 );
_sessionLA->setBuddy( _sessionTW );
- _sessionLA->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1,
- (QSizePolicy::SizeType)0,
+ _sessionLA->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1,
+ (TQSizePolicy::SizeType)0,
0,
0,
_sessionLA->sizePolicy().hasHeightForWidth()) );
@@ -121,21 +121,21 @@ EditTaskDialog::EditTaskDialog( QString caption, bool editDlg,
// The "Edit relative" radio button
lay1->addSpacing(10);
lay1->addStretch(1);
- _relativeRB = new QRadioButton( i18n( "Edit &relative (apply to both time and"
+ _relativeRB = new TQRadioButton( i18n( "Edit &relative (apply to both time and"
" session time)" ), page, "_relativeRB" );
lay1->addWidget( _relativeRB );
- connect( _relativeRB, SIGNAL( clicked() ), this, SLOT(slotRelativePressed()) );
+ connect( _relativeRB, TQT_SIGNAL( clicked() ), this, TQT_SLOT(slotRelativePressed()) );
// The relative times
- QHBoxLayout *lay4 = new QHBoxLayout();
+ TQHBoxLayout *lay4 = new TQHBoxLayout();
lay1->addLayout( lay4 );
lay4->addSpacing(20);
- _operator = new QComboBox(page);
- _operator->insertItem( QString::fromLatin1( "+" ) );
- _operator->insertItem( QString::fromLatin1( "-" ) );
- _operator->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1,
- (QSizePolicy::SizeType)0,
+ _operator = new TQComboBox(page);
+ _operator->insertItem( TQString::fromLatin1( "+" ) );
+ _operator->insertItem( TQString::fromLatin1( "-" ) );
+ _operator->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1,
+ (TQSizePolicy::SizeType)0,
0,
0,
_operator->sizePolicy().hasHeightForWidth()) );
@@ -165,24 +165,24 @@ EditTaskDialog::EditTaskDialog( QString caption, bool editDlg,
lay1->addSpacing(10);
lay1->addStretch(1);
- _desktopCB = new QCheckBox(i18n("A&uto tracking"), page);
+ _desktopCB = new TQCheckBox(i18n("A&uto tracking"), page);
_desktopCB->setEnabled(true);
lay1->addWidget(_desktopCB);
- QGroupBox* groupBox;
+ TQGroupBox* groupBox;
{
int lines = (int)(desktopCount/2);
if (lines*2 != desktopCount) lines++;
- groupBox = new QButtonGroup( lines, QGroupBox::Horizontal,
+ groupBox = new TQButtonGroup( lines, TQGroupBox::Horizontal,
i18n("In Desktop"), page, "_desktopsGB");
}
lay1->addWidget(groupBox);
- QHBoxLayout *lay6 = new QHBoxLayout();
+ TQHBoxLayout *lay6 = new TQHBoxLayout();
lay1->addLayout(lay6);
for (int i=0; i<desktopCount; i++) {
- _deskBox.push_back(new QCheckBox(groupBox,QString::number(i).latin1()));
+ _deskBox.push_back(new TQCheckBox(groupBox,TQString::number(i).latin1()));
_deskBox[i]->setText(kwinmodule.desktopName(i+1));
_deskBox[i]->setChecked(false);
@@ -207,7 +207,7 @@ EditTaskDialog::EditTaskDialog( QString caption, bool editDlg,
for (int i=0; i<desktopCount; i++)
_deskBox[i]->setEnabled(enableDesktops);
- connect(_desktopCB, SIGNAL(clicked()), this, SLOT(slotAutoTrackingPressed()));
+ connect(_desktopCB, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAutoTrackingPressed()));
lay1->addStretch(1);
@@ -224,32 +224,32 @@ EditTaskDialog::EditTaskDialog( QString caption, bool editDlg,
slotRelativePressed();
// Whats this help.
- QWhatsThis::add( _name,
+ TQWhatsThis::add( _name,
i18n( "Enter the name of the task here. "
"This name is for your eyes only."));
- QWhatsThis::add( _absoluteRB,
+ TQWhatsThis::add( _absoluteRB,
i18n( "Use this option to set the time spent on this task "
"to an absolute value.\n\nFor example, if you have "
"worked exactly four hours on this task during the current "
"session, you would set the Session time to 4 hr." ) );
- QWhatsThis::add( _relativeRB,
+ TQWhatsThis::add( _relativeRB,
i18n( "Use this option to change the time spent on this task "
"relative to its current value.\n\nFor example, if you worked "
"on this task for one hour without the timer running, you "
"would add 1 hr." ) );
- QWhatsThis::add( _timeTW,
+ TQWhatsThis::add( _timeTW,
i18n( "This is the time the task has been "
"running since all times were reset."));
- QWhatsThis::add( _sessionTW,
+ TQWhatsThis::add( _sessionTW,
i18n( "This is the time the task has been running this "
"session."));
- QWhatsThis::add( _diffTW, i18n( "Specify how much time to add or subtract "
+ TQWhatsThis::add( _diffTW, i18n( "Specify how much time to add or subtract "
"to the overall and session time"));
- QWhatsThis::add( _desktopCB,
+ TQWhatsThis::add( _desktopCB,
i18n( "Use this option to automatically start the timer "
"on this task when you switch to the specified desktop(s)." ) );
- QWhatsThis::add( groupBox,
+ TQWhatsThis::add( groupBox,
i18n( "Select the desktop(s) that will automatically start the "
"timer on this task." ) );
}
@@ -294,7 +294,7 @@ void EditTaskDialog::slotAutoTrackingPressed()
_deskBox[i]->setChecked(false);
}
-void EditTaskDialog::setTask( const QString &name, long time, long session )
+void EditTaskDialog::setTask( const TQString &name, long time, long session )
{
_name->setText( name );
@@ -305,7 +305,7 @@ void EditTaskDialog::setTask( const QString &name, long time, long session )
}
-QString EditTaskDialog::taskName() const
+TQString EditTaskDialog::taskName() const
{
return( _name->text() );
}
diff --git a/karm/edittaskdialog.h b/karm/edittaskdialog.h
index 0954d8b5d..91eb361d8 100644
--- a/karm/edittaskdialog.h
+++ b/karm/edittaskdialog.h
@@ -24,7 +24,7 @@
#include <vector>
#include <kdialogbase.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include "desktoplist.h"
@@ -45,9 +45,9 @@ class EditTaskDialog : public KDialogBase
Q_OBJECT
public:
- EditTaskDialog(QString caption, bool editDlg, DesktopList* desktopList=0);
- void setTask(const QString &name, long time, long sessionTime);
- QString taskName() const;
+ EditTaskDialog(TQString caption, bool editDlg, DesktopList* desktopList=0);
+ void setTask(const TQString &name, long time, long sessionTime);
+ TQString taskName() const;
// return user choices
void status( long *time, long *timeDiff,
@@ -60,25 +60,25 @@ class EditTaskDialog : public KDialogBase
void slotAutoTrackingPressed();
private:
- QLineEdit* _name;
+ TQLineEdit* _name;
KArmTimeWidget* _timeTW;
KArmTimeWidget* _sessionTW;
KArmTimeWidget* _diffTW;
- QComboBox* _operator;
- std::vector<QCheckBox*> _deskBox; // we only need an array, but ISO forbids
+ TQComboBox* _operator;
+ std::vector<TQCheckBox*> _deskBox; // we only need an array, but ISO forbids
// passing an array as a function argument
long origTime;
long origSession;
- QRadioButton *_absoluteRB;
- QRadioButton *_relativeRB;
+ TQRadioButton *_absoluteRB;
+ TQRadioButton *_relativeRB;
- QCheckBox *_desktopCB;
+ TQCheckBox *_desktopCB;
int desktopCount;
- QLabel* _timeLA;
- QLabel* _sessionLA;
+ TQLabel* _timeLA;
+ TQLabel* _sessionLA;
};
diff --git a/karm/idletimedetector.cpp b/karm/idletimedetector.cpp
index 878993798..b2b17a29c 100644
--- a/karm/idletimedetector.cpp
+++ b/karm/idletimedetector.cpp
@@ -1,8 +1,8 @@
#include "idletimedetector.h"
-#include <qdatetime.h>
-#include <qmessagebox.h>
-#include <qtimer.h>
+#include <tqdatetime.h>
+#include <tqmessagebox.h>
+#include <tqtimer.h>
#include <kglobal.h>
#include <klocale.h> // i18n
@@ -25,8 +25,8 @@ IdleTimeDetector::IdleTimeDetector(int maxIdle)
_idleDetectionPossible = false;
}
- _timer = new QTimer(this);
- connect(_timer, SIGNAL(timeout()), this, SLOT(check()));
+ _timer = new TQTimer(this);
+ connect(_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(check()));
#else
_idleDetectionPossible = false;
#endif // HAVE_LIBXSS
@@ -67,22 +67,22 @@ void IdleTimeDetector::informOverrun(int idleSeconds)
_timer->stop();
- QDateTime idleStart = QDateTime::currentDateTime().addSecs(-idleSeconds);
- QString idleStartQString = KGlobal::locale()->formatTime(idleStart.time());
+ TQDateTime idleStart = TQDateTime::currentDateTime().addSecs(-idleSeconds);
+ TQString idleStartQString = KGlobal::locale()->formatTime(idleStart.time());
- int id = QMessageBox::warning( 0, i18n("Idle Detection"),
+ int id = TQMessageBox::warning( 0, i18n("Idle Detection"),
i18n("Desktop has been idle since %1."
" What should we do?").arg(idleStartQString),
i18n("Revert && Stop"),
i18n("Revert && Continue"),
i18n("Continue Timing"),0,2);
- QDateTime end = QDateTime::currentDateTime();
+ TQDateTime end = TQDateTime::currentDateTime();
int diff = idleStart.secsTo(end)/secsPerMinute;
if (id == 0)
{
// Revert And Stop
- kdDebug(5970) << "Now it is " << QDateTime::currentDateTime() << endl;
+ kdDebug(5970) << "Now it is " << TQDateTime::currentDateTime() << endl;
kdDebug(5970) << "Reverting timer to " << KGlobal::locale()->formatTime(idleStart.time()).ascii() << endl;
emit(extractTime(idleSeconds/60+diff)); // we need to subtract the time that has been added during idleness.
emit(stopAllTimersAt(idleStart));
diff --git a/karm/idletimedetector.h b/karm/idletimedetector.h
index b7092930c..8234b427b 100644
--- a/karm/idletimedetector.h
+++ b/karm/idletimedetector.h
@@ -1,9 +1,9 @@
#ifndef KARM_IDLE_TIME_DETECTOR_H
#define KARM_IDLE_TIME_DETECTOR_H
-#include <qobject.h>
+#include <tqobject.h>
#include "config.h" // HAVE_LIBXSS
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kdebug.h>
class QTimer;
@@ -55,8 +55,8 @@ signals:
/** Tells the listener to stop timing **/
void stopAllTimers();
- /** Tells the listener to stop timing for QDateTime **/
- void stopAllTimersAt(QDateTime qdt);
+ /** Tells the listener to stop timing for TQDateTime **/
+ void stopAllTimersAt(TQDateTime qdt);
public slots:
/**
@@ -98,7 +98,7 @@ private:
bool _idleDetectionPossible;
bool _overAllIdleDetect; // Based on preferences.
int _maxIdle;
- QTimer *_timer;
+ TQTimer *_timer;
};
#endif // KARM_IDLE_TIME_DETECTOR_H
diff --git a/karm/kaccelmenuwatch.cpp b/karm/kaccelmenuwatch.cpp
index f3aac3230..ddabb1d86 100644
--- a/karm/kaccelmenuwatch.cpp
+++ b/karm/kaccelmenuwatch.cpp
@@ -5,12 +5,12 @@
*/
#include <assert.h>
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include "kaccelmenuwatch.h"
-KAccelMenuWatch::KAccelMenuWatch( KAccel *accel, QObject *parent )
- : QObject( parent ),
+KAccelMenuWatch::KAccelMenuWatch( KAccel *accel, TQObject *parent )
+ : TQObject( parent ),
_accel( accel ),
_menu ( 0 )
{
@@ -18,7 +18,7 @@ KAccelMenuWatch::KAccelMenuWatch( KAccel *accel, QObject *parent )
_menuList.setAutoDelete( false );
}
-void KAccelMenuWatch::setMenu( QPopupMenu *menu )
+void KAccelMenuWatch::setMenu( TQPopupMenu *menu )
{
assert( menu );
@@ -27,7 +27,7 @@ void KAccelMenuWatch::setMenu( QPopupMenu *menu )
if ( !_menuList.findRef( menu ) ) {
_menuList.append( menu );
- connect( menu, SIGNAL(destroyed()), this, SLOT(removeDeadMenu()) );
+ connect( menu, TQT_SIGNAL(destroyed()), this, TQT_SLOT(removeDeadMenu()) );
}
_menu = menu;
@@ -36,7 +36,7 @@ void KAccelMenuWatch::setMenu( QPopupMenu *menu )
void KAccelMenuWatch::connectAccel( int itemId, const char *action )
{
AccelItem *item = newAccelItem( _menu, itemId, StringAccel ) ;
- item->action = QString::fromLocal8Bit( action );
+ item->action = TQString::fromLocal8Bit( action );
}
void KAccelMenuWatch::connectAccel( int itemId, KStdAccel::StdAccel accel )
@@ -49,7 +49,7 @@ void KAccelMenuWatch::updateMenus()
{
assert( _accel != 0 );
- QPtrListIterator<AccelItem> iter( _accList );
+ TQPtrListIterator<AccelItem> iter( _accList );
AccelItem *item;
for( ; (item = iter.current()) ; ++iter ) {
@@ -71,7 +71,7 @@ void KAccelMenuWatch::updateMenus()
void KAccelMenuWatch::removeDeadMenu()
{
- QPopupMenu *sdr = (QPopupMenu *) sender();
+ TQPopupMenu *sdr = (TQPopupMenu *) sender();
assert( sdr );
if ( !_menuList.findRef( sdr ) )
@@ -96,7 +96,7 @@ loop:
return;
}
-KAccelMenuWatch::AccelItem *KAccelMenuWatch::newAccelItem( QPopupMenu *,
+KAccelMenuWatch::AccelItem *KAccelMenuWatch::newAccelItem( TQPopupMenu *,
int itemId, AccelType type )
{
AccelItem *item = new AccelItem;
diff --git a/karm/kaccelmenuwatch.h b/karm/kaccelmenuwatch.h
index 76b27f018..89da1ce8f 100644
--- a/karm/kaccelmenuwatch.h
+++ b/karm/kaccelmenuwatch.h
@@ -5,8 +5,8 @@
#ifndef KARM_K_ACCEL_MENU_WATCH_H
#define KARM_K_ACCEL_MENU_WATCH_H
-#include <qobject.h>
-#include <qptrlist.h>
+#include <tqobject.h>
+#include <tqptrlist.h>
#include <kaccel.h>
@@ -40,30 +40,30 @@ class KAccelMenuWatch : public QObject
enum AccelType { StdAccel, StringAccel };
typedef struct AccelItem {
- QPopupMenu *menu;
+ TQPopupMenu *menu;
int itemId;
AccelType type;
// only one of these is used at a time
- QString action;
+ TQString action;
KStdAccel::StdAccel stdAction;
} AccelItem;
KAccel *_accel;
- QPtrList<AccelItem> _accList;
- QPtrList<QPopupMenu> _menuList;
+ TQPtrList<AccelItem> _accList;
+ TQPtrList<TQPopupMenu> _menuList;
- QPopupMenu *_menu;
+ TQPopupMenu *_menu;
- KAccelMenuWatch::AccelItem *newAccelItem( QPopupMenu *menu,
+ KAccelMenuWatch::AccelItem *newAccelItem( TQPopupMenu *menu,
int itemId, AccelType type );
public:
/**
* KAccelMenuWatch Constructor
*/
- KAccelMenuWatch( KAccel *accel, QObject *parent = 0 );
+ KAccelMenuWatch( KAccel *accel, TQObject *parent = 0 );
/**
* KAccelMenuWatch Destructor
@@ -76,13 +76,13 @@ class KAccelMenuWatch : public QObject
* with this menu. You can call this function any number of
* times, so multiple menus can be handled.
*/
- void setMenu( QPopupMenu *menu );
+ void setMenu( TQPopupMenu *menu );
/**
- * Return the last menu set with KAccelMenuWatch::setMenu(QPopupMenu*),
+ * Return the last menu set with KAccelMenuWatch::setMenu(TQPopupMenu*),
* or 0 if none has been set.
*/
- QPopupMenu *currentMenu() const { return _menu; }
+ TQPopupMenu *currentMenu() const { return _menu; }
/**
* Connect the menu item identified to currentMenu()/id to
diff --git a/karm/karm_part.cpp b/karm/karm_part.cpp
index c7729f0fa..c535bec41 100644
--- a/karm/karm_part.cpp
+++ b/karm/karm_part.cpp
@@ -15,14 +15,14 @@
#include <kglobal.h>
#include <klocale.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qmultilineedit.h>
-#include <qpopupmenu.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqmultilineedit.h>
+#include <tqpopupmenu.h>
#include "mainwindow.h"
-karmPart::karmPart( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name )
+karmPart::karmPart( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name )
: DCOPObject ( "KarmDCOPIface" ), KParts::ReadWritePart(parent, name),
_accel ( new KAccel( parentWidget ) ),
_watcher ( new KAccelMenuWatch( _accel, parentWidget ) )
@@ -40,9 +40,9 @@ karmPart::karmPart( QWidget *parentWidget, const char *widgetName,
setWidget(_taskView);
// create our actions
- KStdAction::open(this, SLOT(fileOpen()), actionCollection());
- KStdAction::saveAs(this, SLOT(fileSaveAs()), actionCollection());
- KStdAction::save(this, SLOT(save()), actionCollection());
+ KStdAction::open(this, TQT_SLOT(fileOpen()), actionCollection());
+ KStdAction::saveAs(this, TQT_SLOT(fileSaveAs()), actionCollection());
+ KStdAction::save(this, TQT_SLOT(save()), actionCollection());
makeMenus();
@@ -50,29 +50,29 @@ karmPart::karmPart( QWidget *parentWidget, const char *widgetName,
// connections
- connect( _taskView, SIGNAL( totalTimesChanged( long, long ) ),
- this, SLOT( updateTime( long, long ) ) );
- connect( _taskView, SIGNAL( selectionChanged ( QListViewItem * )),
- this, SLOT(slotSelectionChanged()));
- connect( _taskView, SIGNAL( updateButtons() ),
- this, SLOT(slotSelectionChanged()));
+ connect( _taskView, TQT_SIGNAL( totalTimesChanged( long, long ) ),
+ this, TQT_SLOT( updateTime( long, long ) ) );
+ connect( _taskView, TQT_SIGNAL( selectionChanged ( TQListViewItem * )),
+ this, TQT_SLOT(slotSelectionChanged()));
+ connect( _taskView, TQT_SIGNAL( updateButtons() ),
+ this, TQT_SLOT(slotSelectionChanged()));
// Setup context menu request handling
connect( _taskView,
- SIGNAL( contextMenuRequested( QListViewItem*, const QPoint&, int )),
+ TQT_SIGNAL( contextMenuRequested( TQListViewItem*, const TQPoint&, int )),
this,
- SLOT( contextMenuRequest( QListViewItem*, const QPoint&, int )));
+ TQT_SLOT( contextMenuRequest( TQListViewItem*, const TQPoint&, int )));
_tray = new KarmTray( this );
- connect( _tray, SIGNAL( quitSelected() ), SLOT( quit() ) );
+ connect( _tray, TQT_SIGNAL( quitSelected() ), TQT_SLOT( quit() ) );
- connect( _taskView, SIGNAL( timersActive() ), _tray, SLOT( startClock() ) );
- connect( _taskView, SIGNAL( timersActive() ), this, SLOT( enableStopAll() ));
- connect( _taskView, SIGNAL( timersInactive() ), _tray, SLOT( stopClock() ) );
- connect( _taskView, SIGNAL( timersInactive() ), this, SLOT( disableStopAll()));
- connect( _taskView, SIGNAL( tasksChanged( QPtrList<Task> ) ),
- _tray, SLOT( updateToolTip( QPtrList<Task> ) ));
+ connect( _taskView, TQT_SIGNAL( timersActive() ), _tray, TQT_SLOT( startClock() ) );
+ connect( _taskView, TQT_SIGNAL( timersActive() ), this, TQT_SLOT( enableStopAll() ));
+ connect( _taskView, TQT_SIGNAL( timersInactive() ), _tray, TQT_SLOT( stopClock() ) );
+ connect( _taskView, TQT_SIGNAL( timersInactive() ), this, TQT_SLOT( disableStopAll()));
+ connect( _taskView, TQT_SIGNAL( tasksChanged( TQPtrList<Task> ) ),
+ _tray, TQT_SLOT( updateToolTip( TQPtrList<Task> ) ));
_taskView->load();
@@ -113,119 +113,119 @@ void karmPart::makeMenus()
*actionNew,
*actionNewSub;
- (void) KStdAction::quit( this, SLOT( quit() ), actionCollection());
- (void) KStdAction::print( this, SLOT( print() ), actionCollection());
- actionKeyBindings = KStdAction::keyBindings( this, SLOT( keyBindings() ),
+ (void) KStdAction::quit( this, TQT_SLOT( quit() ), actionCollection());
+ (void) KStdAction::print( this, TQT_SLOT( print() ), actionCollection());
+ actionKeyBindings = KStdAction::keyBindings( this, TQT_SLOT( keyBindings() ),
actionCollection() );
actionPreferences = KStdAction::preferences(_preferences,
- SLOT(showDialog()),
+ TQT_SLOT(showDialog()),
actionCollection() );
- (void) KStdAction::save( this, SLOT( save() ), actionCollection() );
+ (void) KStdAction::save( this, TQT_SLOT( save() ), actionCollection() );
KAction* actionStartNewSession = new KAction( i18n("Start &New Session"),
0,
this,
- SLOT( startNewSession() ),
+ TQT_SLOT( startNewSession() ),
actionCollection(),
"start_new_session");
KAction* actionResetAll = new KAction( i18n("&Reset All Times"),
0,
this,
- SLOT( resetAllTimes() ),
+ TQT_SLOT( resetAllTimes() ),
actionCollection(),
"reset_all_times");
actionStart = new KAction( i18n("&Start"),
- QString::fromLatin1("1rightarrow"), Key_S,
+ TQString::fromLatin1("1rightarrow"), Key_S,
_taskView,
- SLOT( startCurrentTimer() ), actionCollection(),
+ TQT_SLOT( startCurrentTimer() ), actionCollection(),
"start");
actionStop = new KAction( i18n("S&top"),
- QString::fromLatin1("stop"), 0,
+ TQString::fromLatin1("stop"), 0,
_taskView,
- SLOT( stopCurrentTimer() ), actionCollection(),
+ TQT_SLOT( stopCurrentTimer() ), actionCollection(),
"stop");
actionStopAll = new KAction( i18n("Stop &All Timers"),
Key_Escape,
_taskView,
- SLOT( stopAllTimers() ), actionCollection(),
+ TQT_SLOT( stopAllTimers() ), actionCollection(),
"stopAll");
actionStopAll->setEnabled(false);
actionNew = new KAction( i18n("&New..."),
- QString::fromLatin1("filenew"), CTRL+Key_N,
+ TQString::fromLatin1("filenew"), CTRL+Key_N,
_taskView,
- SLOT( newTask() ), actionCollection(),
+ TQT_SLOT( newTask() ), actionCollection(),
"new_task");
actionNewSub = new KAction( i18n("New &Subtask..."),
- QString::fromLatin1("kmultiple"), CTRL+ALT+Key_N,
+ TQString::fromLatin1("kmultiple"), CTRL+ALT+Key_N,
_taskView,
- SLOT( newSubTask() ), actionCollection(),
+ TQT_SLOT( newSubTask() ), actionCollection(),
"new_sub_task");
actionDelete = new KAction( i18n("&Delete"),
- QString::fromLatin1("editdelete"), Key_Delete,
+ TQString::fromLatin1("editdelete"), Key_Delete,
_taskView,
- SLOT( deleteTask() ), actionCollection(),
+ TQT_SLOT( deleteTask() ), actionCollection(),
"delete_task");
actionEdit = new KAction( i18n("&Edit..."),
- QString::fromLatin1("edit"), CTRL + Key_E,
+ TQString::fromLatin1("edit"), CTRL + Key_E,
_taskView,
- SLOT( editTask() ), actionCollection(),
+ TQT_SLOT( editTask() ), actionCollection(),
"edit_task");
// actionAddComment = new KAction( i18n("&Add Comment..."),
-// QString::fromLatin1("document"),
+// TQString::fromLatin1("document"),
// CTRL+ALT+Key_E,
// _taskView,
-// SLOT( addCommentToTask() ),
+// TQT_SLOT( addCommentToTask() ),
// actionCollection(),
// "add_comment_to_task");
actionMarkAsComplete = new KAction( i18n("&Mark as Complete"),
- QString::fromLatin1("document"),
+ TQString::fromLatin1("document"),
CTRL+Key_M,
_taskView,
- SLOT( markTaskAsComplete() ),
+ TQT_SLOT( markTaskAsComplete() ),
actionCollection(),
"mark_as_complete");
actionMarkAsIncomplete = new KAction( i18n("&Mark as Incomplete"),
- QString::fromLatin1("document"),
+ TQString::fromLatin1("document"),
CTRL+Key_M,
_taskView,
- SLOT( markTaskAsIncomplete() ),
+ TQT_SLOT( markTaskAsIncomplete() ),
actionCollection(),
"mark_as_incomplete");
actionClipTotals = new KAction( i18n("&Copy Totals to Clipboard"),
- QString::fromLatin1("klipper"),
+ TQString::fromLatin1("klipper"),
CTRL+Key_C,
_taskView,
- SLOT( clipTotals() ),
+ TQT_SLOT( clipTotals() ),
actionCollection(),
"clip_totals");
actionClipHistory = new KAction( i18n("Copy &History to Clipboard"),
- QString::fromLatin1("klipper"),
+ TQString::fromLatin1("klipper"),
CTRL+ALT+Key_C,
_taskView,
- SLOT( clipHistory() ),
+ TQT_SLOT( clipHistory() ),
actionCollection(),
"clip_history");
new KAction( i18n("Import &Legacy Flat File..."), 0,
- _taskView, SLOT(loadFromFlatFile()), actionCollection(),
+ _taskView, TQT_SLOT(loadFromFlatFile()), actionCollection(),
"import_flatfile");
new KAction( i18n("&Export to CSV File..."), 0,
- _taskView, SLOT(exportcsvFile()), actionCollection(),
+ _taskView, TQT_SLOT(exportcsvFile()), actionCollection(),
"export_csvfile");
new KAction( i18n("Export &History to CSV File..."), 0,
- this, SLOT(exportcsvHistory()), actionCollection(),
+ this, TQT_SLOT(exportcsvHistory()), actionCollection(),
"export_csvhistory");
new KAction( i18n("Import Tasks From &Planner..."), 0,
- _taskView, SLOT(importPlanner()), actionCollection(),
+ _taskView, TQT_SLOT(importPlanner()), actionCollection(),
"import_planner");
new KAction( i18n("Configure KArm..."), 0,
- _preferences, SLOT(showDialog()), actionCollection(),
+ _preferences, TQT_SLOT(showDialog()), actionCollection(),
"configure_karm");
/*
new KAction( i18n("Import E&vents"), 0,
_taskView,
- SLOT( loadFromKOrgEvents() ), actionCollection(),
+ TQT_SLOT( loadFromKOrgEvents() ), actionCollection(),
"import_korg_events");
*/
@@ -287,12 +287,12 @@ void karmPart::setReadWrite(bool rw)
{
// notify your internal widget of the read-write state
if (rw)
- connect(_taskView, SIGNAL(textChanged()),
- this, SLOT(setModified()));
+ connect(_taskView, TQT_SIGNAL(textChanged()),
+ this, TQT_SLOT(setModified()));
else
{
- disconnect(_taskView, SIGNAL(textChanged()),
- this, SLOT(setModified()));
+ disconnect(_taskView, TQT_SIGNAL(textChanged()),
+ this, TQT_SLOT(setModified()));
}
ReadWritePart::setReadWrite(rw);
@@ -318,7 +318,7 @@ void karmPart::setModified(bool modified)
bool karmPart::openFile()
{
- // m_file is always local so we can use QFile on it
+ // m_file is always local so we can use TQFile on it
_taskView->load(m_file);
// just for fun, set the status bar
@@ -334,12 +334,12 @@ bool karmPart::saveFile()
return false;
// m_file is always local, so we use QFile
- QFile file(m_file);
+ TQFile file(m_file);
if (file.open(IO_WriteOnly) == false)
return false;
- // use QTextStream to dump the text to the file
- QTextStream stream(&file);
+ // use TQTextStream to dump the text to the file
+ TQTextStream stream(&file);
file.close();
@@ -351,7 +351,7 @@ void karmPart::fileOpen()
// this slot is called whenever the File->Open menu is selected,
// the Open shortcut is pressed (usually CTRL+O) or the Open toolbar
// button is clicked
- QString file_name = KFileDialog::getOpenFileName();
+ TQString file_name = KFileDialog::getOpenFileName();
if (file_name.isEmpty() == false)
openURL(file_name);
@@ -360,7 +360,7 @@ void karmPart::fileOpen()
void karmPart::fileSaveAs()
{
// this slot is called whenever the File->Save As menu is selected,
- QString file_name = KFileDialog::getSaveFileName();
+ TQString file_name = KFileDialog::getSaveFileName();
if (file_name.isEmpty() == false)
saveAs(file_name);
}
@@ -387,15 +387,15 @@ karmPartFactory::~karmPartFactory()
s_instance = 0L;
}
-KParts::Part* karmPartFactory::createPartObject( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const char *classname, const QStringList &args )
+KParts::Part* karmPartFactory::createPartObject( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const char *classname, const TQStringList &args )
{
// Create an instance of our Part
karmPart* obj = new karmPart( parentWidget, widgetName, parent, name );
// See if we are to be read-write or not
- if (QCString(classname) == "KParts::ReadOnlyPart")
+ if (TQCString(classname) == "KParts::ReadOnlyPart")
obj->setReadWrite(false);
return obj;
@@ -421,9 +421,9 @@ extern "C"
}
}
-void karmPart::contextMenuRequest( QListViewItem*, const QPoint& point, int )
+void karmPart::contextMenuRequest( TQListViewItem*, const TQPoint& point, int )
{
- QPopupMenu* pop = dynamic_cast<QPopupMenu*>(
+ TQPopupMenu* pop = dynamic_cast<TQPopupMenu*>(
factory()->container( i18n( "task_popup" ), this ) );
if ( pop )
pop->popup( point );
@@ -435,12 +435,12 @@ void karmPart::contextMenuRequest( QListViewItem*, const QPoint& point, int )
//
//----------------------------------------------------------------------------
-QString karmPart::version() const
+TQString karmPart::version() const
{
return KARM_VERSION;
}
-QString karmPart::deletetodo()
+TQString karmPart::deletetodo()
{
_taskView->deleteTask();
return "";
@@ -451,15 +451,15 @@ bool karmPart::getpromptdelete()
return _preferences->promptDelete();
}
-QString karmPart::setpromptdelete( bool prompt )
+TQString karmPart::setpromptdelete( bool prompt )
{
_preferences->setPromptDelete( prompt );
return "";
}
-QString karmPart::taskIdFromName( const QString &taskname ) const
+TQString karmPart::taskIdFromName( const TQString &taskname ) const
{
- QString rval = "";
+ TQString rval = "";
Task* task = _taskView->first_child();
while ( rval.isEmpty() && task )
@@ -479,17 +479,17 @@ void karmPart::quit()
bool karmPart::save()
{
kdDebug(5970) << "Saving time data to disk." << endl;
- QString err=_taskView->save(); // untranslated error msg.
+ TQString err=_taskView->save(); // untranslated error msg.
// TODO:
/* if (err.isEmpty()) statusBar()->message(i18n("Successfully saved tasks and history"),1807);
else statusBar()->message(i18n(err.ascii()),7707); // no msgbox since save is called when exiting */
return true;
}
-int karmPart::addTask( const QString& taskname )
+int karmPart::addTask( const TQString& taskname )
{
DesktopList desktopList;
- QString uid = _taskView->addTask( taskname, 0, 0, desktopList );
+ TQString uid = _taskView->addTask( taskname, 0, 0, desktopList );
kdDebug(5970) << "MainWindow::addTask( " << taskname << " ) returns " << uid << endl;
if ( uid.length() > 0 ) return 0;
else
@@ -500,20 +500,20 @@ int karmPart::addTask( const QString& taskname )
}
}
-QString karmPart::setPerCentComplete( const QString& taskName, int perCent )
+TQString karmPart::setPerCentComplete( const TQString& taskName, int perCent )
{
int index = 0;
- QString err="no such task";
+ TQString err="no such task";
for (int i=0; i<_taskView->count(); i++)
{
if ((_taskView->item_at_index(i)->name()==taskName))
{
index=i;
- if (err==QString::null) err="task name is abigious";
- if (err=="no such task") err=QString::null;
+ if (err==TQString::null) err="task name is abigious";
+ if (err=="no such task") err=TQString::null;
}
}
- if (err==QString::null)
+ if (err==TQString::null)
{
_taskView->item_at_index(index)->setPercentComplete( perCent, _taskView->storage() );
}
@@ -521,12 +521,12 @@ QString karmPart::setPerCentComplete( const QString& taskName, int perCent )
}
int karmPart::bookTime
-( const QString& taskId, const QString& datetime, long minutes )
+( const TQString& taskId, const TQString& datetime, long minutes )
{
int rval = 0;
- QDate startDate;
- QTime startTime;
- QDateTime startDateTime;
+ TQDate startDate;
+ TQTime startTime;
+ TQDateTime startDateTime;
Task *task, *t;
if ( minutes <= 0 ) rval = KARM_ERR_INVALID_DURATION;
@@ -544,15 +544,15 @@ int karmPart::bookTime
// Parse datetime
if ( !rval )
{
- startDate = QDate::fromString( datetime, Qt::ISODate );
+ startDate = TQDate::fromString( datetime, Qt::ISODate );
if ( datetime.length() > 10 ) // "YYYY-MM-DD".length() = 10
{
- startTime = QTime::fromString( datetime, Qt::ISODate );
+ startTime = TQTime::fromString( datetime, Qt::ISODate );
}
- else startTime = QTime( 12, 0 );
+ else startTime = TQTime( 12, 0 );
if ( startDate.isValid() && startTime.isValid() )
{
- startDateTime = QDateTime( startDate, startTime );
+ startDateTime = TQDateTime( startDate, startTime );
}
else rval = KARM_ERR_INVALID_DATE;
@@ -573,13 +573,13 @@ int karmPart::bookTime
// There was something really bad going on with DCOP when I used a particular
// argument name; if I recall correctly, the argument name was errno.
-QString karmPart::getError( int mkb ) const
+TQString karmPart::getError( int mkb ) const
{
if ( mkb <= KARM_MAX_ERROR_NO ) return m_error[ mkb ];
else return i18n( "Invalid error number: %1" ).arg( mkb );
}
-int karmPart::totalMinutesForTaskId( const QString& taskId )
+int karmPart::totalMinutesForTaskId( const TQString& taskId )
{
int rval = 0;
Task *task, *t;
@@ -608,9 +608,9 @@ int karmPart::totalMinutesForTaskId( const QString& taskId )
return rval;
}
-QString karmPart::_hasTask( Task* task, const QString &taskname ) const
+TQString karmPart::_hasTask( Task* task, const TQString &taskname ) const
{
- QString rval = "";
+ TQString rval = "";
if ( task->name() == taskname )
{
rval = task->uid();
@@ -627,7 +627,7 @@ QString karmPart::_hasTask( Task* task, const QString &taskname ) const
return rval;
}
-Task* karmPart::_hasUid( Task* task, const QString &uid ) const
+Task* karmPart::_hasUid( Task* task, const TQString &uid ) const
{
Task *rval = NULL;
@@ -646,9 +646,9 @@ Task* karmPart::_hasUid( Task* task, const QString &uid ) const
return rval;
}
-QString karmPart::starttimerfor( const QString& taskname )
+TQString karmPart::starttimerfor( const TQString& taskname )
{
- QString err="no such task";
+ TQString err="no such task";
for (int i=0; i<_taskView->count(); i++)
{
if ((_taskView->item_at_index(i)->name()==taskname))
@@ -660,9 +660,9 @@ QString karmPart::starttimerfor( const QString& taskname )
return err;
}
-QString karmPart::stoptimerfor( const QString& taskname )
+TQString karmPart::stoptimerfor( const TQString& taskname )
{
- QString err="no such task";
+ TQString err="no such task";
for (int i=0; i<_taskView->count(); i++)
{
if ((_taskView->item_at_index(i)->name()==taskname))
@@ -674,21 +674,21 @@ QString karmPart::stoptimerfor( const QString& taskname )
return err;
}
-QString karmPart::exportcsvfile( QString filename, QString from, QString to, int type, bool decimalMinutes, bool allTasks, QString delimiter, QString quote )
+TQString karmPart::exportcsvfile( TQString filename, TQString from, TQString to, int type, bool decimalMinutes, bool allTasks, TQString delimiter, TQString quote )
{
ReportCriteria rc;
rc.allTasks=allTasks;
rc.decimalMinutes=decimalMinutes;
rc.delimiter=delimiter;
- rc.from=QDate::fromString( from );
+ rc.from=TQDate::fromString( from );
rc.quote=quote;
rc.reportType=(ReportCriteria::REPORTTYPE) type;
- rc.to=QDate::fromString( to );
+ rc.to=TQDate::fromString( to );
rc.url=filename;
return _taskView->report( rc );
}
-QString karmPart::importplannerfile( QString fileName )
+TQString karmPart::importplannerfile( TQString fileName )
{
return _taskView->importPlanner(fileName);
}
@@ -699,5 +699,5 @@ void karmPart::startNewSession()
_taskView->save();
}
-#include <qpopupmenu.h>
+#include <tqpopupmenu.h>
#include "karm_part.moc"
diff --git a/karm/karm_part.h b/karm/karm_part.h
index 85c1e99f7..86308b09c 100644
--- a/karm/karm_part.h
+++ b/karm/karm_part.h
@@ -6,7 +6,7 @@
#include <kparts/factory.h>
#include <karmdcopiface.h>
#include "reportcriteria.h"
-#include <qlistview.h>
+#include <tqlistview.h>
class KAccel;
class KAccelMenuWatch;
@@ -33,9 +33,9 @@ class karmPart : public KParts::ReadWritePart, virtual public KarmDCOPIface
private:
void makeMenus();
- QString _hastodo( Task* task, const QString &taskname ) const;
- QString _hasTask( Task* task, const QString &taskname ) const;
- Task* _hasUid( Task* task, const QString &uid ) const;
+ TQString _hastodo( Task* task, const TQString &taskname ) const;
+ TQString _hasTask( Task* task, const TQString &taskname ) const;
+ Task* _hasUid( Task* task, const TQString &uid ) const;
KAccel* _accel;
KAccelMenuWatch* _watcher;
@@ -53,34 +53,34 @@ class karmPart : public KParts::ReadWritePart, virtual public KarmDCOPIface
KAction* actionPreferences;
KAction* actionClipTotals;
KAction* actionClipHistory;
- QString m_error[ KARM_MAX_ERROR_NO + 1 ];
+ TQString m_error[ KARM_MAX_ERROR_NO + 1 ];
friend class KarmTray;
public:
- karmPart(QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name);
+ karmPart(TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name);
// DCOP
void quit();
virtual bool save();
- QString version() const;
- QString taskIdFromName( const QString &taskName ) const;
+ TQString version() const;
+ TQString taskIdFromName( const TQString &taskName ) const;
/** @reimp from KarmDCOPIface */
- int addTask( const QString &taskName );
+ int addTask( const TQString &taskName );
/** @reimp from KarmDCOPIface */
- QString setPerCentComplete( const QString& taskName, int PerCent );
+ TQString setPerCentComplete( const TQString& taskName, int PerCent );
/** @reimp from KarmDCOPIface */
- int bookTime( const QString& taskId, const QString& iso8601StartDateTime, long durationInMinutes );
+ int bookTime( const TQString& taskId, const TQString& iso8601StartDateTime, long durationInMinutes );
/** @reimp from KarmDCOPIface */
- QString getError( int karmErrorNumber ) const;
- int totalMinutesForTaskId( const QString& taskId );
- QString starttimerfor( const QString &taskname );
- QString stoptimerfor( const QString &taskname );
- QString deletetodo();
+ TQString getError( int karmErrorNumber ) const;
+ int totalMinutesForTaskId( const TQString& taskId );
+ TQString starttimerfor( const TQString &taskname );
+ TQString stoptimerfor( const TQString &taskname );
+ TQString deletetodo();
bool getpromptdelete();
- QString setpromptdelete( bool prompt );
- QString exportcsvfile( QString filename, QString from, QString to, int type = 0, bool decimalMinutes=true, bool allTasks=true, QString delimiter="r", QString quote="q" );
- QString importplannerfile( QString filename );
+ TQString setpromptdelete( bool prompt );
+ TQString exportcsvfile( TQString filename, TQString from, TQString to, int type = 0, bool decimalMinutes=true, bool allTasks=true, TQString delimiter="r", TQString quote="q" );
+ TQString importplannerfile( TQString filename );
virtual ~karmPart();
@@ -108,7 +108,7 @@ protected:
virtual bool saveFile();
protected slots:
- void contextMenuRequest( QListViewItem*, const QPoint& point, int );
+ void contextMenuRequest( TQListViewItem*, const TQPoint& point, int );
void fileOpen();
void fileSaveAs();
void slotSelectionChanged();
@@ -124,9 +124,9 @@ class karmPartFactory : public KParts::Factory
public:
karmPartFactory();
virtual ~karmPartFactory();
- virtual KParts::Part* createPartObject( QWidget *parentWidget, const char *widgetName,
- QObject *parent, const char *name,
- const char *classname, const QStringList &args );
+ virtual KParts::Part* createPartObject( TQWidget *parentWidget, const char *widgetName,
+ TQObject *parent, const char *name,
+ const char *classname, const TQStringList &args );
static KInstance* instance();
private:
diff --git a/karm/karmdcopiface.h b/karm/karmdcopiface.h
index 1135c81e6..6c0480336 100644
--- a/karm/karmdcopiface.h
+++ b/karm/karmdcopiface.h
@@ -30,10 +30,10 @@ class KarmDCOPIface : virtual public DCOPObject
k_dcop:
/** Return karm version. */
- virtual QString version() const = 0;
+ virtual TQString version() const = 0;
/** Return id of task found, empty string if no match. */
- virtual QString taskIdFromName( const QString& taskName ) const = 0;
+ virtual TQString taskIdFromName( const TQString& taskName ) const = 0;
/**
* Add a new top-level task.
@@ -44,7 +44,7 @@ class KarmDCOPIface : virtual public DCOPObject
*
* @return 0 on success, error number on failure.
*/
- virtual int addTask( const QString& taskName ) = 0;
+ virtual int addTask( const TQString& taskName ) = 0;
/**
* Set percent complete to a task
@@ -54,7 +54,7 @@ class KarmDCOPIface : virtual public DCOPObject
*
* @return "" on success, error msg on failure.
*/
- virtual QString setPerCentComplete( const QString& taskName, int perCent ) = 0;
+ virtual TQString setPerCentComplete( const TQString& taskName, int perCent ) = 0;
/**
* Add time to a task.
@@ -74,7 +74,7 @@ class KarmDCOPIface : virtual public DCOPObject
* @param durationInMinutes The amount of time to book against the taskId.
*
*/
- virtual int bookTime( const QString& taskId, const QString& iso8601StartDateTime,
+ virtual int bookTime( const TQString& taskId, const TQString& iso8601StartDateTime,
long durationInMinutes ) = 0;
/**
@@ -87,7 +87,7 @@ class KarmDCOPIface : virtual public DCOPObject
* the return value.
*
*/
- virtual QString getError( int karmErrorNumber ) const = 0;
+ virtual TQString getError( int karmErrorNumber ) const = 0;
/**
* Total time currently associated with a task.
@@ -97,30 +97,30 @@ class KarmDCOPIface : virtual public DCOPObject
*
* @param taskId Unique ID of task to lookup bookings for.
*/
- virtual int totalMinutesForTaskId( const QString& taskId ) = 0;
+ virtual int totalMinutesForTaskId( const TQString& taskId ) = 0;
/** Start timer for all tasks with the summary taskname. */
// may conflict with unitaskmode
- virtual QString starttimerfor( const QString& taskname ) = 0;
+ virtual TQString starttimerfor( const TQString& taskname ) = 0;
/** Stop timer for all tasks with the summary taskname. */
// may conflict with unitaskmode
- virtual QString stoptimerfor( const QString& taskname ) = 0;
+ virtual TQString stoptimerfor( const TQString& taskname ) = 0;
/** delete the current item */
- virtual QString deletetodo() = 0;
+ virtual TQString deletetodo() = 0;
/** set if prompted on deleting a task */
- virtual QString setpromptdelete( bool prompt ) = 0;
+ virtual TQString setpromptdelete( bool prompt ) = 0;
/** get if prompted on deleting a task */
virtual bool getpromptdelete() = 0;
/** export csv history or totals file */
- virtual QString exportcsvfile( QString filename, QString from, QString to, int type = 0, bool decimalMinutes=true, bool allTasks=true, QString delimiter=";", QString quote="'" ) = 0;
+ virtual TQString exportcsvfile( TQString filename, TQString from, TQString to, int type = 0, bool decimalMinutes=true, bool allTasks=true, TQString delimiter=";", TQString quote="'" ) = 0;
/** import planner project file */
- virtual QString importplannerfile( QString filename ) = 0;
+ virtual TQString importplannerfile( TQString filename ) = 0;
/** save your tasks */
virtual bool save() = 0;
diff --git a/karm/karmstorage.cpp b/karm/karmstorage.cpp
index 7e150d057..e895d2639 100644
--- a/karm/karmstorage.cpp
+++ b/karm/karmstorage.cpp
@@ -27,12 +27,12 @@
#include <cassert>
-#include <qfile.h>
-#include <qsize.h>
-#include <qdict.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqfile.h>
+#include <tqsize.h>
+#include <tqdict.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
#include "incidence.h"
#include "kapplication.h" // kapp
@@ -80,7 +80,7 @@ KarmStorage::KarmStorage()
_calendar = 0;
}
-QString KarmStorage::load (TaskView* view, const Preferences* preferences, QString fileName )
+TQString KarmStorage::load (TaskView* view, const Preferences* preferences, TQString fileName )
// loads data from filename into view. If no filename is given, filename from preferences is used.
// filename might be of use if this program is run as embedded konqueror plugin.
{
@@ -92,7 +92,7 @@ QString KarmStorage::load (TaskView* view, const Preferences* preferences, QStri
// Use KDE_CXXFLAGS=$(USE_EXCEPTIONS) in Makefile.am if you want to use
// exceptions (David Faure)
- QString err;
+ TQString err;
KEMailSettings settings;
if ( fileName.isEmpty() ) fileName = preferences->iCalFile();
@@ -107,7 +107,7 @@ QString KarmStorage::load (TaskView* view, const Preferences* preferences, QStri
{
int handle;
handle = open (
- QFile::encodeName( fileName ),
+ TQFile::encodeName( fileName ),
O_CREAT|O_EXCL|O_WRONLY,
S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH
);
@@ -132,10 +132,10 @@ QString KarmStorage::load (TaskView* view, const Preferences* preferences, QStri
}
_calendar = resource;
- QObject::connect (_calendar, SIGNAL(resourceChanged(ResourceCalendar *)),
- view, SLOT(iCalFileModified(ResourceCalendar *)));
+ TQObject::connect (_calendar, TQT_SIGNAL(resourceChanged(ResourceCalendar *)),
+ view, TQT_SLOT(iCalFileModified(ResourceCalendar *)));
_calendar->setTimeZoneId( KPimPrefs::timezone() );
- _calendar->setResourceName( QString::fromLatin1("KArm") );
+ _calendar->setResourceName( TQString::fromLatin1("KArm") );
_calendar->open();
_calendar->load();
@@ -153,10 +153,10 @@ QString KarmStorage::load (TaskView* view, const Preferences* preferences, QStri
{
KCal::Todo::List todoList;
KCal::Todo::List::ConstIterator todo;
- QDict< Task > map;
+ TQDict< Task > map;
// Build dictionary to look up Task object from Todo uid. Each task is a
- // QListViewItem, and is initially added with the view as the parent.
+ // TQListViewItem, and is initially added with the view as the parent.
todoList = _calendar->rawTodos();
kdDebug(5970) << "KarmStorage::load "
<< "rawTodo count (includes completed todos) ="
@@ -213,21 +213,21 @@ QString KarmStorage::load (TaskView* view, const Preferences* preferences, QStri
return err;
}
-QString KarmStorage::icalfile()
+TQString KarmStorage::icalfile()
{
kdDebug(5970) << "Entering KarmStorage::icalfile" << endl;
return _icalfile;
}
-QString KarmStorage::buildTaskView(KCal::ResourceCalendar *rc, TaskView *view)
+TQString KarmStorage::buildTaskView(KCal::ResourceCalendar *rc, TaskView *view)
// makes *view contain the tasks out of *rc.
{
- QString err;
+ TQString err;
KCal::Todo::List todoList;
KCal::Todo::List::ConstIterator todo;
- QDict< Task > map;
- vector<QString> runningTasks;
- vector<QDateTime> startTimes;
+ TQDict< Task > map;
+ vector<TQString> runningTasks;
+ vector<TQDateTime> startTimes;
// remember tasks that are running and their start times
for ( int i=0; i<view->count(); i++)
@@ -245,7 +245,7 @@ QString KarmStorage::buildTaskView(KCal::ResourceCalendar *rc, TaskView *view)
// 1. insert tasks form rc into taskview
// 1.1. Build dictionary to look up Task object from Todo uid. Each task is a
- // QListViewItem, and is initially added with the view as the parent.
+ // TQListViewItem, and is initially added with the view as the parent.
todoList = rc->rawTodos();
for( todo = todoList.begin(); todo != todoList.end(); ++todo )
{
@@ -305,12 +305,12 @@ void KarmStorage::closeStorage(TaskView* view)
}
}
-QString KarmStorage::save(TaskView* taskview)
+TQString KarmStorage::save(TaskView* taskview)
{
kdDebug(5970) << "entering KarmStorage::save" << endl;
- QString err=QString();
+ TQString err=TQString();
- QPtrStack< KCal::Todo > parents;
+ TQPtrStack< KCal::Todo > parents;
for (Task* task=taskview->first_child(); task; task = task->nextSibling())
{
@@ -336,10 +336,10 @@ QString KarmStorage::save(TaskView* taskview)
return err;
}
-QString KarmStorage::writeTaskAsTodo(Task* task, const int level,
- QPtrStack< KCal::Todo >& parents )
+TQString KarmStorage::writeTaskAsTodo(Task* task, const int level,
+ TQPtrStack< KCal::Todo >& parents )
{
- QString err;
+ TQString err;
KCal::Todo* todo;
todo = _calendar->todo(task->uid());
@@ -381,15 +381,15 @@ bool KarmStorage::isNewStorage(const Preferences* preferences) const
// These only stored total and session times.
//
-QString KarmStorage::loadFromFlatFile(TaskView* taskview,
- const QString& filename)
+TQString KarmStorage::loadFromFlatFile(TaskView* taskview,
+ const TQString& filename)
{
- QString err;
+ TQString err;
kdDebug(5970)
<< "KarmStorage::loadFromFlatFile: " << filename << endl;
- QFile f(filename);
+ TQFile f(filename);
if( !f.exists() )
err = i18n("File \"%1\" not found.").arg(filename);
@@ -402,12 +402,12 @@ QString KarmStorage::loadFromFlatFile(TaskView* taskview,
if (!err)
{
- QString line;
+ TQString line;
- QPtrStack<Task> stack;
+ TQPtrStack<Task> stack;
Task *task;
- QTextStream stream(&f);
+ TQTextStream stream(&f);
while( !stream.atEnd() ) {
// lukas: this breaks for non-latin1 chars!!!
@@ -422,7 +422,7 @@ QString KarmStorage::loadFromFlatFile(TaskView* taskview,
long minutes;
int level;
- QString name;
+ TQString name;
DesktopList desktopList;
if (!parseLine(line, &minutes, &name, &level, &desktopList))
continue;
@@ -464,10 +464,10 @@ QString KarmStorage::loadFromFlatFile(TaskView* taskview,
return err;
}
-QString KarmStorage::loadFromFlatFileCumulative(TaskView* taskview,
- const QString& filename)
+TQString KarmStorage::loadFromFlatFileCumulative(TaskView* taskview,
+ const TQString& filename)
{
- QString err = loadFromFlatFile(taskview, filename);
+ TQString err = loadFromFlatFile(taskview, filename);
if (!err)
{
for (Task* task = taskview->first_child(); task;
@@ -479,7 +479,7 @@ QString KarmStorage::loadFromFlatFileCumulative(TaskView* taskview,
return err;
}
-bool KarmStorage::parseLine(QString line, long *time, QString *name,
+bool KarmStorage::parseLine(TQString line, long *time, TQString *name,
int *level, DesktopList* desktopList)
{
if (line.find('#') == 0) {
@@ -493,8 +493,8 @@ bool KarmStorage::parseLine(QString line, long *time, QString *name,
return false;
}
- QString levelStr = line.left(index);
- QString rest = line.remove(0,index+1);
+ TQString levelStr = line.left(index);
+ TQString rest = line.remove(0,index+1);
index = rest.find('\t');
if (index == -1) {
@@ -502,7 +502,7 @@ bool KarmStorage::parseLine(QString line, long *time, QString *name,
return false;
}
- QString timeStr = rest.left(index);
+ TQString timeStr = rest.left(index);
rest = rest.remove(0,index+1);
bool ok;
@@ -510,11 +510,11 @@ bool KarmStorage::parseLine(QString line, long *time, QString *name,
index = rest.find('\t'); // check for optional desktops string
if (index >= 0) {
*name = rest.left(index);
- QString deskLine = rest.remove(0,index+1);
+ TQString deskLine = rest.remove(0,index+1);
// now transform the ds string (e.g. "3", or "1,4,5") into
// an DesktopList
- QString ds;
+ TQString ds;
int d;
int commaIdx = deskLine.find(',');
while (commaIdx >= 0) {
@@ -572,22 +572,22 @@ void KarmStorage::adjustFromLegacyFileFormat(Task* task)
//----------------------------------------------------------------------------
// Routines that handle Comma-Separated Values export file format.
//
-QString KarmStorage::exportcsvFile( TaskView *taskview,
+TQString KarmStorage::exportcsvFile( TaskView *taskview,
const ReportCriteria &rc )
{
- QString delim = rc.delimiter;
- QString dquote = rc.quote;
- QString double_dquote = dquote + dquote;
+ TQString delim = rc.delimiter;
+ TQString dquote = rc.quote;
+ TQString double_dquote = dquote + dquote;
bool to_quote = true;
- QString err;
+ TQString err;
Task* task;
int maxdepth=0;
kdDebug(5970)
<< "KarmStorage::exportcsvFile: " << rc.url << endl;
- QString title = i18n("Export Progress");
+ TQString title = i18n("Export Progress");
KProgressDialog dialog( taskview, 0, title );
dialog.setAutoClose( true );
dialog.setAllowCancel( true );
@@ -595,13 +595,13 @@ QString KarmStorage::exportcsvFile( TaskView *taskview,
// The default dialog was not displaying all the text in the title bar.
int width = taskview->fontMetrics().width(title) * 3;
- QSize dialogsize;
+ TQSize dialogsize;
dialogsize.setWidth(width);
dialog.setInitialSize( dialogsize, true );
if ( taskview->count() > 1 ) dialog.show();
- QString retval;
+ TQString retval;
// Find max task depth
int tasknr = 0;
@@ -663,15 +663,15 @@ QString KarmStorage::exportcsvFile( TaskView *taskview,
// save, either locally or remote
if ((rc.url.isLocalFile()) || (!rc.url.url().contains("/")))
{
- QString filename=rc.url.path();
+ TQString filename=rc.url.path();
if (filename.isEmpty()) filename=rc.url.url();
- QFile f( filename );
+ TQFile f( filename );
if( !f.open( IO_WriteOnly ) ) {
err = i18n( "Could not open \"%1\"." ).arg( filename );
}
if (!err)
{
- QTextStream stream(&f);
+ TQTextStream stream(&f);
// Export to file
stream << retval;
f.close();
@@ -680,13 +680,13 @@ QString KarmStorage::exportcsvFile( TaskView *taskview,
else // use remote file
{
KTempFile tmpFile;
- if ( tmpFile.status() != 0 ) err = QString::fromLatin1( "Unable to get temporary file" );
+ if ( tmpFile.status() != 0 ) err = TQString::fromLatin1( "Unable to get temporary file" );
else
{
- QTextStream *stream=tmpFile.textStream();
+ TQTextStream *stream=tmpFile.textStream();
*stream << retval;
tmpFile.close();
- if (!KIO::NetAccess::upload( tmpFile.name(), rc.url, 0 )) err=QString::fromLatin1("Could not upload");
+ if (!KIO::NetAccess::upload( tmpFile.name(), rc.url, 0 )) err=TQString::fromLatin1("Could not upload");
}
}
@@ -701,10 +701,10 @@ QString KarmStorage::exportcsvFile( TaskView *taskview,
// public routines:
//
-QString KarmStorage::addTask(const Task* task, const Task* parent)
+TQString KarmStorage::addTask(const Task* task, const Task* parent)
{
KCal::Todo* todo;
- QString uid;
+ TQString uid;
todo = new KCal::Todo();
if ( _calendar->addTodo( todo ) )
@@ -755,7 +755,7 @@ bool KarmStorage::removeTask(Task* task)
return true;
}
-void KarmStorage::addComment(const Task* task, const QString& comment)
+void KarmStorage::addComment(const Task* task, const TQString& comment)
{
KCal::Todo* todo;
@@ -764,7 +764,7 @@ void KarmStorage::addComment(const Task* task, const QString& comment)
// Do this to avoid compiler warnings about comment not being used. once we
// transition to using the addComment method, we need this second param.
- QString s = comment;
+ TQString s = comment;
// TODO: Use libkcal comments
// todo->addComment(comment);
@@ -776,28 +776,28 @@ void KarmStorage::addComment(const Task* task, const QString& comment)
long KarmStorage::printTaskHistory (
const Task *task,
- const QMap<QString,long> &taskdaytotals,
- QMap<QString,long> &daytotals,
- const QDate &from,
- const QDate &to,
+ const TQMap<TQString,long> &taskdaytotals,
+ TQMap<TQString,long> &daytotals,
+ const TQDate &from,
+ const TQDate &to,
const int level,
- vector <QString> &matrix,
+ vector <TQString> &matrix,
const ReportCriteria &rc)
// to>=from is precondition
{
long ownline=linenr++; // the how many-th instance of this function is this
long colrectot=0; // colum where to write the task's total recursive time
- vector <QString> cell; // each line of the matrix is stored in an array of cells, one containing the recursive total
+ vector <TQString> cell; // each line of the matrix is stored in an array of cells, one containing the recursive total
long add; // total recursive time of all subtasks
- QString delim = rc.delimiter;
- QString dquote = rc.quote;
- QString double_dquote = dquote + dquote;
+ TQString delim = rc.delimiter;
+ TQString dquote = rc.quote;
+ TQString double_dquote = dquote + dquote;
bool to_quote = true;
- const QString cr = QString::fromLatin1("\n");
- QString buf;
- QString daytaskkey, daykey;
- QDate day;
+ const TQString cr = TQString::fromLatin1("\n");
+ TQString buf;
+ TQString daytaskkey, daykey;
+ TQDate day;
long sum;
if ( !task ) return 0;
@@ -807,14 +807,14 @@ long KarmStorage::printTaskHistory (
while (day <= to)
{
// write the time in seconds for the given task for the given day to s
- daykey = day.toString(QString::fromLatin1("yyyyMMdd"));
- daytaskkey = QString::fromLatin1("%1_%2")
+ daykey = day.toString(TQString::fromLatin1("yyyyMMdd"));
+ daytaskkey = TQString::fromLatin1("%1_%2")
.arg(daykey)
.arg(task->uid());
if (taskdaytotals.contains(daytaskkey))
{
- cell.push_back(QString::fromLatin1("%1")
+ cell.push_back(TQString::fromLatin1("%1")
.arg(formatTime(taskdaytotals[daytaskkey]/60, rc.decimalMinutes)));
sum += taskdaytotals[daytaskkey]; // in seconds
@@ -829,7 +829,7 @@ long KarmStorage::printTaskHistory (
}
// Total for task
- cell.push_back(QString::fromLatin1("%1").arg(formatTime(sum/60, rc.decimalMinutes)));
+ cell.push_back(TQString::fromLatin1("%1").arg(formatTime(sum/60, rc.decimalMinutes)));
// room for the recursive total time (that cannot be calculated now)
cell.push_back(delim);
@@ -865,14 +865,14 @@ long KarmStorage::printTaskHistory (
add += printTaskHistory( subTask, taskdaytotals, daytotals, from, to , level+1, matrix,
rc );
}
- cell[colrectot]=(QString::fromLatin1("%1").arg(formatTime((add+sum)/60, rc.decimalMinutes )));
+ cell[colrectot]=(TQString::fromLatin1("%1").arg(formatTime((add+sum)/60, rc.decimalMinutes )));
for (unsigned int i=0; i < cell.size(); i++) matrix[ownline]+=cell[i];
return add+sum;
}
-QString KarmStorage::report( TaskView *taskview, const ReportCriteria &rc )
+TQString KarmStorage::report( TaskView *taskview, const ReportCriteria &rc )
{
- QString err;
+ TQString err;
if ( rc.reportType == ReportCriteria::CSVHistoryExport )
err = exportcsvHistory( taskview, rc.from, rc.to, rc );
else if ( rc.reportType == ReportCriteria::CSVTotalsExport )
@@ -884,33 +884,33 @@ QString KarmStorage::report( TaskView *taskview, const ReportCriteria &rc )
}
// export history report as csv, all tasks X all dates in one block
-QString KarmStorage::exportcsvHistory ( TaskView *taskview,
- const QDate &from,
- const QDate &to,
+TQString KarmStorage::exportcsvHistory ( TaskView *taskview,
+ const TQDate &from,
+ const TQDate &to,
const ReportCriteria &rc)
{
- QString delim = rc.delimiter;
- const QString cr = QString::fromLatin1("\n");
- QString err;
+ TQString delim = rc.delimiter;
+ const TQString cr = TQString::fromLatin1("\n");
+ TQString err;
// below taken from timekard.cpp
- QString retval;
- QString taskhdr, totalhdr;
- QString line, buf;
+ TQString retval;
+ TQString taskhdr, totalhdr;
+ TQString line, buf;
long sum;
- QValueList<HistoryEvent> events;
- QValueList<HistoryEvent>::iterator event;
- QMap<QString, long> taskdaytotals;
- QMap<QString, long> daytotals;
- QString daytaskkey, daykey;
- QDate day;
- QDate dayheading;
+ TQValueList<HistoryEvent> events;
+ TQValueList<HistoryEvent>::iterator event;
+ TQMap<TQString, long> taskdaytotals;
+ TQMap<TQString, long> daytotals;
+ TQString daytaskkey, daykey;
+ TQDate day;
+ TQDate dayheading;
// parameter-plausi
if ( from > to )
{
- err = QString::fromLatin1 (
+ err = TQString::fromLatin1 (
"'to' has to be a date later than or equal to 'from'.");
}
@@ -921,7 +921,7 @@ QString KarmStorage::exportcsvHistory ( TaskView *taskview,
.arg(KGlobal::locale()->formatDate(to));
retval += cr;
retval += i18n("Printed on: %1")
- .arg(KGlobal::locale()->formatDateTime(QDateTime::currentDateTime()));
+ .arg(KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime()));
retval += cr;
day=from;
@@ -936,8 +936,8 @@ QString KarmStorage::exportcsvHistory ( TaskView *taskview,
// so times are accumulated for each task.
for (event = events.begin(); event != events.end(); ++event)
{
- daykey = (*event).start().date().toString(QString::fromLatin1("yyyyMMdd"));
- daytaskkey = QString(QString::fromLatin1("%1_%2"))
+ daykey = (*event).start().date().toString(TQString::fromLatin1("yyyyMMdd"));
+ daytaskkey = TQString(TQString::fromLatin1("%1_%2"))
.arg(daykey)
.arg((*event).todoUid());
@@ -953,7 +953,7 @@ QString KarmStorage::exportcsvHistory ( TaskView *taskview,
while ( dayheading <= to )
{
// Use ISO 8601 format for date.
- retval += dayheading.toString(QString::fromLatin1("yyyy-MM-dd"));
+ retval += dayheading.toString(TQString::fromLatin1("yyyy-MM-dd"));
retval += delim;
dayheading=dayheading.addDays(1);
}
@@ -962,7 +962,7 @@ QString KarmStorage::exportcsvHistory ( TaskView *taskview,
retval += line;
// the tasks
- vector <QString> matrix;
+ vector <TQString> matrix;
linenr=0;
for (int i=0; i<=taskview->count()+1; i++) matrix.push_back("");
if (events.empty())
@@ -993,11 +993,11 @@ QString KarmStorage::exportcsvHistory ( TaskView *taskview,
day = from;
while (day<=to)
{
- daykey = day.toString(QString::fromLatin1("yyyyMMdd"));
+ daykey = day.toString(TQString::fromLatin1("yyyyMMdd"));
if (daytotals.contains(daykey))
{
- retval += QString::fromLatin1("%1")
+ retval += TQString::fromLatin1("%1")
.arg(formatTime(daytotals[daykey]/60, rc.decimalMinutes));
sum += daytotals[daykey]; // in seconds
}
@@ -1005,7 +1005,7 @@ QString KarmStorage::exportcsvHistory ( TaskView *taskview,
day = day.addDays(1);
}
- retval += QString::fromLatin1("%1%2%3%4")
+ retval += TQString::fromLatin1("%1%2%3%4")
.arg( formatTime( sum/60, rc.decimalMinutes ) )
.arg( delim ).arg( delim )
.arg( i18n( "Total" ) );
@@ -1017,15 +1017,15 @@ QString KarmStorage::exportcsvHistory ( TaskView *taskview,
if ((rc.url.isLocalFile()) || (!rc.url.url().contains("/")))
{
- QString filename=rc.url.path();
+ TQString filename=rc.url.path();
if (filename.isEmpty()) filename=rc.url.url();
- QFile f( filename );
+ TQFile f( filename );
if( !f.open( IO_WriteOnly ) ) {
err = i18n( "Could not open \"%1\"." ).arg( filename );
}
if (!err)
{
- QTextStream stream(&f);
+ TQTextStream stream(&f);
// Export to file
stream << retval;
f.close();
@@ -1036,20 +1036,20 @@ QString KarmStorage::exportcsvHistory ( TaskView *taskview,
KTempFile tmpFile;
if ( tmpFile.status() != 0 )
{
- err = QString::fromLatin1( "Unable to get temporary file" );
+ err = TQString::fromLatin1( "Unable to get temporary file" );
}
else
{
- QTextStream *stream=tmpFile.textStream();
+ TQTextStream *stream=tmpFile.textStream();
*stream << retval;
tmpFile.close();
- if (!KIO::NetAccess::upload( tmpFile.name(), rc.url, 0 )) err=QString::fromLatin1("Could not upload");
+ if (!KIO::NetAccess::upload( tmpFile.name(), rc.url, 0 )) err=TQString::fromLatin1("Could not upload");
}
}
return err;
}
-void KarmStorage::stopTimer(const Task* task, QDateTime when)
+void KarmStorage::stopTimer(const Task* task, TQDateTime when)
{
kdDebug(5970) << "Entering KarmStorage::stopTimer" << endl;
long delta = task->startTime().secsTo(when);
@@ -1057,12 +1057,12 @@ void KarmStorage::stopTimer(const Task* task, QDateTime when)
}
bool KarmStorage::bookTime(const Task* task,
- const QDateTime& startDateTime,
+ const TQDateTime& startDateTime,
const long durationInSeconds)
{
// Ignores preferences setting re: logging history.
KCal::Event* e;
- QDateTime end;
+ TQDateTime end;
e = baseEvent( task );
e->setDtStart( startDateTime );
@@ -1070,8 +1070,8 @@ bool KarmStorage::bookTime(const Task* task,
// Use a custom property to keep a record of negative durations
e->setCustomProperty( kapp->instanceName(),
- QCString("duration"),
- QString::number(durationInSeconds));
+ TQCString("duration"),
+ TQString::number(durationInSeconds));
return _calendar->addEvent(e);
}
@@ -1080,7 +1080,7 @@ void KarmStorage::changeTime(const Task* task, const long deltaSeconds)
{
kdDebug(5970) << "Entering KarmStorage::changeTime ( " << task->name() << "," << deltaSeconds << " )" << endl;
KCal::Event* e;
- QDateTime end;
+ TQDateTime end;
// Don't write events (with timer start/stop duration) if user has turned
// this off in the settings dialog.
@@ -1096,8 +1096,8 @@ void KarmStorage::changeTime(const Task* task, const long deltaSeconds)
// Use a custom property to keep a record of negative durations
e->setCustomProperty( kapp->instanceName(),
- QCString("duration"),
- QString::number(deltaSeconds));
+ TQCString("duration"),
+ TQString::number(deltaSeconds));
_calendar->addEvent(e);
@@ -1116,7 +1116,7 @@ void KarmStorage::changeTime(const Task* task, const long deltaSeconds)
KCal::Event* KarmStorage::baseEvent(const Task * task)
{
KCal::Event* e;
- QStringList categories;
+ TQStringList categories;
e = new KCal::Event;
e->setSummary(task->name());
@@ -1138,8 +1138,8 @@ KCal::Event* KarmStorage::baseEvent(const Task * task)
return e;
}
-HistoryEvent::HistoryEvent(QString uid, QString name, long duration,
- QDateTime start, QDateTime stop, QString todoUid)
+HistoryEvent::HistoryEvent(TQString uid, TQString name, long duration,
+ TQDateTime start, TQDateTime stop, TQString todoUid)
{
_uid = uid;
_name = name;
@@ -1150,16 +1150,16 @@ HistoryEvent::HistoryEvent(QString uid, QString name, long duration,
}
-QValueList<HistoryEvent> KarmStorage::getHistory(const QDate& from,
- const QDate& to)
+TQValueList<HistoryEvent> KarmStorage::getHistory(const TQDate& from,
+ const TQDate& to)
{
- QValueList<HistoryEvent> retval;
- QStringList processed;
+ TQValueList<HistoryEvent> retval;
+ TQStringList processed;
KCal::Event::List events;
KCal::Event::List::iterator event;
- QString duration;
+ TQString duration;
- for(QDate d = from; d <= to; d = d.addDays(1))
+ for(TQDate d = from; d <= to; d = d.addDays(1))
{
events = _calendar->rawEventsForDate( d );
for (event = events.begin(); event != events.end(); ++event)
@@ -1176,7 +1176,7 @@ QValueList<HistoryEvent> KarmStorage::getHistory(const QDate& from,
processed.append( (*event)->uid());
duration = (*event)->customProperty(kapp->instanceName(),
- QCString("duration"));
+ TQCString("duration"));
if ( ! duration.isNull() )
{
if ( (*event)->relatedTo()
@@ -1206,9 +1206,9 @@ QValueList<HistoryEvent> KarmStorage::getHistory(const QDate& from,
return retval;
}
-bool KarmStorage::remoteResource( const QString& file ) const
+bool KarmStorage::remoteResource( const TQString& file ) const
{
- QString f = file.lower();
+ TQString f = file.lower();
bool rval = f.startsWith( "http://" ) || f.startsWith( "ftp://" );
kdDebug(5970) << "KarmStorage::remoteResource( " << file << " ) returns " << rval << endl;
diff --git a/karm/karmstorage.h b/karm/karmstorage.h
index c84658297..6c02ca901 100644
--- a/karm/karmstorage.h
+++ b/karm/karmstorage.h
@@ -23,8 +23,8 @@
#ifndef KARM_STORAGE_H
#define KARM_STORAGE_H
-#include <qdict.h>
-#include <qptrstack.h>
+#include <tqdict.h>
+#include <tqptrstack.h>
#include "journal.h"
#include "reportcriteria.h"
@@ -100,19 +100,19 @@ class KarmStorage
* @return empty string if success, error message if error.
*
*/
- QString load(TaskView* taskview, const Preferences* preferences, QString fileName="" );
+ TQString load(TaskView* taskview, const Preferences* preferences, TQString fileName="" );
/*
* Return the name of the iCal file
*/
- QString icalfile();
+ TQString icalfile();
/*
* Build up the taskview.
*
* This is needed if the iCal file has been modified
*/
- QString buildTaskView(KCal::ResourceCalendar *rc, TaskView *view);
+ TQString buildTaskView(KCal::ResourceCalendar *rc, TaskView *view);
/* Close calendar and clear view. Release lock if holding one. */
void closeStorage(TaskView* view);
@@ -127,7 +127,7 @@ class KarmStorage
*
* @param taskview The list group used in the TaskView
*/
- QString save(TaskView* taskview);
+ TQString save(TaskView* taskview);
/**
* Read tasks and their total times from a text file (legacy storage).
@@ -142,7 +142,7 @@ class KarmStorage
* string task name
* [string] desktops, in which to count. e.g. "1,2,5" (optional)
*/
- QString loadFromFlatFile(TaskView* taskview, const QString& filename);
+ TQString loadFromFlatFile(TaskView* taskview, const TQString& filename);
/**
* Reads tasks and their total times from text file (legacy).
@@ -152,13 +152,13 @@ class KarmStorage
*
* @see loadFromFlatFile
*/
- QString loadFromFlatFileCumulative(TaskView* taskview,
- const QString& filename);
+ TQString loadFromFlatFileCumulative(TaskView* taskview,
+ const TQString& filename);
/**
Output a report based on contents of ReportCriteria.
*/
- QString report( TaskView *taskview, const ReportCriteria &rc );
+ TQString report( TaskView *taskview, const ReportCriteria &rc );
/**
* Log the change in a task's time.
@@ -203,7 +203,7 @@ class KarmStorage
* @return true if event was added, false if not (if, for example, the
* attempted file lock failed).
*/
- bool bookTime(const Task* task, const QDateTime& startDateTime,
+ bool bookTime(const Task* task, const TQDateTime& startDateTime,
long durationInSeconds);
/**
@@ -217,7 +217,7 @@ class KarmStorage
* @param oldname The old name of the task. The new name is in the task
* object already.
*/
- void setName(const Task* task, const QString& oldname) { Q_UNUSED(task); Q_UNUSED(oldname); }
+ void setName(const Task* task, const TQString& oldname) { Q_UNUSED(task); Q_UNUSED(oldname); }
/**
@@ -239,7 +239,7 @@ class KarmStorage
*
* @param task The task the timer was stopped for.
*/
- void stopTimer(const Task* task, QDateTime when=QDateTime::currentDateTime());
+ void stopTimer(const Task* task, TQDateTime when=TQDateTime::currentDateTime());
/**
* Log a new comment for this task.
@@ -250,7 +250,7 @@ class KarmStorage
* @param task The task that gets the comment
* @param comment The comment
*/
- void addComment(const Task* task, const QString& comment);
+ void addComment(const Task* task, const TQString& comment);
/**
@@ -272,10 +272,10 @@ class KarmStorage
* @param task The task to be removed.
* @param parent The parent of this task. Must have a uid() that is in
* the existing calendar. If zero, this task is considered a root task.
- * @return The unique ID for the new VTODO. Return an null QString if
+ * @return The unique ID for the new VTODO. Return an null TQString if
* there was an error creating the new calendar object.
*/
- QString addTask(const Task* task, const Task* parent);
+ TQString addTask(const Task* task, const Task* parent);
/**
* Check if the iCalendar file currently loaded has any Todos in it.
@@ -297,23 +297,23 @@ class KarmStorage
bool isNewStorage(const Preferences* preferences) const;
/** Return a list of start/stop events for the given date range. */
- QValueList<HistoryEvent> getHistory(const QDate& from, const QDate& to);
+ TQValueList<HistoryEvent> getHistory(const TQDate& from, const TQDate& to);
private:
static KarmStorage *_instance;
KCal::ResourceCalendar *_calendar;
- QString _icalfile;
+ TQString _icalfile;
KarmStorage();
void adjustFromLegacyFileFormat(Task* task);
- bool parseLine(QString line, long *time, QString *name, int *level,
+ bool parseLine(TQString line, long *time, TQString *name, int *level,
DesktopList* desktopList);
- QString writeTaskAsTodo
- (Task* task, const int level, QPtrStack< KCal::Todo >& parents);
+ TQString writeTaskAsTodo
+ (Task* task, const int level, TQPtrStack< KCal::Todo >& parents);
bool saveCalendar();
KCal::Event* baseEvent(const Task*);
- bool remoteResource( const QString& file ) const;
+ bool remoteResource( const TQString& file ) const;
/**
* Writes all tasks and their totals to a Comma-Separated Values file.
@@ -322,26 +322,26 @@ class KarmStorage
* taskName,subtaskName,..,sessionTime,time,totalSessionTime,totalTime
* the number of subtasks is determined at runtime.
*/
- QString exportcsvFile( TaskView *taskview, const ReportCriteria &rc );
+ TQString exportcsvFile( TaskView *taskview, const ReportCriteria &rc );
/**
* Write task history to file as comma-delimited data.
*/
- QString exportcsvHistory (
+ TQString exportcsvHistory (
TaskView* taskview,
- const QDate& from,
- const QDate& to,
+ const TQDate& from,
+ const TQDate& to,
const ReportCriteria &rc
);
long printTaskHistory (
const Task *task,
- const QMap<QString,long>& taskdaytotals,
- QMap<QString,long>& daytotals,
- const QDate& from,
- const QDate& to,
+ const TQMap<TQString,long>& taskdaytotals,
+ TQMap<TQString,long>& daytotals,
+ const TQDate& from,
+ const TQDate& to,
const int level,
- std::vector <QString> &matrix,
+ std::vector <TQString> &matrix,
const ReportCriteria &rc
);
};
@@ -358,23 +358,23 @@ class HistoryEvent
public:
/** Needed to be used in a value list. */
HistoryEvent() {}
- HistoryEvent(QString uid, QString name, long duration,
- QDateTime start, QDateTime stop, QString todoUid);
- QString uid() {return _uid; }
- QString name() {return _name; }
+ HistoryEvent(TQString uid, TQString name, long duration,
+ TQDateTime start, TQDateTime stop, TQString todoUid);
+ TQString uid() {return _uid; }
+ TQString name() {return _name; }
/** In seconds. */
long duration() {return _duration; }
- QDateTime start() {return _start; }
- QDateTime stop() { return _stop; }
- QString todoUid() {return _todoUid; }
+ TQDateTime start() {return _start; }
+ TQDateTime stop() { return _stop; }
+ TQString todoUid() {return _todoUid; }
private:
- QString _uid;
- QString _todoUid;
- QString _name;
+ TQString _uid;
+ TQString _todoUid;
+ TQString _name;
long _duration;
- QDateTime _start;
- QDateTime _stop;
+ TQDateTime _start;
+ TQDateTime _stop;
};
diff --git a/karm/karmutility.cpp b/karm/karmutility.cpp
index 1663b178c..8a2de530a 100644
--- a/karm/karmutility.cpp
+++ b/karm/karmutility.cpp
@@ -7,9 +7,9 @@
#include <klocale.h>
#include "karmutility.h"
-QString formatTime( long minutes, bool decimal )
+TQString formatTime( long minutes, bool decimal )
{
- QString time;
+ TQString time;
if ( decimal ) {
time.sprintf("%.2f", minutes / 60.0);
time.replace( '.', KGlobal::locale()->decimalSymbol() );
diff --git a/karm/karmutility.h b/karm/karmutility.h
index 28fbdc029..7c5608fbe 100644
--- a/karm/karmutility.h
+++ b/karm/karmutility.h
@@ -1,7 +1,7 @@
#ifndef KARMUTILITY_H
#define KARMUTILITY_H
-#include <qstring.h>
+#include <tqstring.h>
/**
* Format time for output. All times output on screen or report output go
@@ -11,6 +11,6 @@
* Otherwise the format is hh:mi.
*
*/
-QString formatTime( long minutes, bool decimal=false );
+TQString formatTime( long minutes, bool decimal=false );
#endif
diff --git a/karm/ktimewidget.cpp b/karm/ktimewidget.cpp
index e7040f4f7..9de79d9dd 100644
--- a/karm/ktimewidget.cpp
+++ b/karm/ktimewidget.cpp
@@ -1,11 +1,11 @@
#include <stdlib.h> // abs()
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qstring.h>
-#include <qvalidator.h>
-#include <qwidget.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqstring.h>
+#include <tqvalidator.h>
+#include <tqwidget.h>
#include <klocale.h> // i18n
#include <kglobal.h>
@@ -16,12 +16,12 @@ enum ValidatorType { HOUR, MINUTE };
class TimeValidator : public QValidator
{
public:
- TimeValidator( ValidatorType tp, QWidget *parent=0, const char *name=0)
- : QValidator(parent, name)
+ TimeValidator( ValidatorType tp, TQWidget *parent=0, const char *name=0)
+ : TQValidator(parent, name)
{
_tp = tp;
}
- State validate(QString &str, int &) const
+ State validate(TQString &str, int &) const
{
if (str.isEmpty())
return Acceptable;
@@ -46,26 +46,26 @@ class KarmLineEdit : public QLineEdit
{
public:
- KarmLineEdit( QWidget* parent, const char* name = 0 )
- : QLineEdit( parent, name ) {}
+ KarmLineEdit( TQWidget* parent, const char* name = 0 )
+ : TQLineEdit( parent, name ) {}
protected:
- virtual void keyPressEvent( QKeyEvent *event )
+ virtual void keyPressEvent( TQKeyEvent *event )
{
- QLineEdit::keyPressEvent( event );
+ TQLineEdit::keyPressEvent( event );
if ( text().length() == 2 && !event->text().isEmpty() )
focusNextPrevChild(true);
}
};
-KArmTimeWidget::KArmTimeWidget( QWidget* parent, const char* name )
- : QWidget(parent, name)
+KArmTimeWidget::KArmTimeWidget( TQWidget* parent, const char* name )
+ : TQWidget(parent, name)
{
- QHBoxLayout *layout = new QHBoxLayout(this);
+ TQHBoxLayout *layout = new TQHBoxLayout(this);
- _hourLE = new QLineEdit( this);
+ _hourLE = new TQLineEdit( this);
// 9999 hours > 1 year!
// 999 hours = 41 days (That should be enough ...)
_hourLE->setFixedWidth( fontMetrics().maxWidth() * 3
@@ -77,7 +77,7 @@ KArmTimeWidget::KArmTimeWidget( QWidget* parent, const char* name )
_hourLE->setAlignment( Qt::AlignRight );
- QLabel *hr = new QLabel( i18n( "abbreviation for hours", " hr. " ), this );
+ TQLabel *hr = new TQLabel( i18n( "abbreviation for hours", " hr. " ), this );
layout->addWidget( hr );
_minuteLE = new KarmLineEdit(this);
@@ -91,7 +91,7 @@ KArmTimeWidget::KArmTimeWidget( QWidget* parent, const char* name )
_minuteLE->setMaxLength(2);
_minuteLE->setAlignment( Qt::AlignRight );
- QLabel *min = new QLabel( i18n( "abbreviation for minutes", " min. " ), this );
+ TQLabel *min = new TQLabel( i18n( "abbreviation for minutes", " min. " ), this );
layout->addWidget( min );
layout->addStretch(1);
@@ -100,7 +100,7 @@ KArmTimeWidget::KArmTimeWidget( QWidget* parent, const char* name )
void KArmTimeWidget::setTime( long minutes )
{
- QString dummy;
+ TQString dummy;
long hourpart = labs(minutes) / 60;
long minutepart = labs(minutes) % 60;
@@ -111,7 +111,7 @@ void KArmTimeWidget::setTime( long minutes )
dummy.setNum( minutepart );
if (minutepart < 10 ) {
- dummy = QString::fromLatin1( "0" ) + dummy;
+ dummy = TQString::fromLatin1( "0" ) + dummy;
}
_minuteLE->setText( dummy );
}
diff --git a/karm/ktimewidget.h b/karm/ktimewidget.h
index 9c6eb3b42..a079fdc9a 100644
--- a/karm/ktimewidget.h
+++ b/karm/ktimewidget.h
@@ -10,15 +10,15 @@ class KarmLineEdit;
* Widget used for entering minutes and seconds with validation.
*/
-class KArmTimeWidget : public QWidget
+class KArmTimeWidget : public TQWidget
{
public:
- KArmTimeWidget( QWidget* parent = 0, const char* name = 0 );
+ KArmTimeWidget( TQWidget* parent = 0, const char* name = 0 );
void setTime( long minutes );
long time() const;
private:
- QLineEdit *_hourLE;
+ TQLineEdit *_hourLE;
KarmLineEdit *_minuteLE;
};
diff --git a/karm/main.cpp b/karm/main.cpp
index cc1fc1cde..b075b55c3 100644
--- a/karm/main.cpp
+++ b/karm/main.cpp
@@ -56,7 +56,7 @@ int main( int argc, char *argv[] )
MainWindow *mainWindow;
if ( args->count() > 0 )
{
- QString icsfile = QString::fromLocal8Bit( args->arg( 0 ) );
+ TQString icsfile = TQString::fromLocal8Bit( args->arg( 0 ) );
// FIXME: there is probably a Qt or KDE fcn for this test
if ( icsfile.startsWith( "/" )
|| icsfile.lower().startsWith( "http://" )
diff --git a/karm/mainwindow.cpp b/karm/mainwindow.cpp
index 141eafef9..6a80fa009 100644
--- a/karm/mainwindow.cpp
+++ b/karm/mainwindow.cpp
@@ -18,10 +18,10 @@
#include <kmessagebox.h>
#include <kstatusbar.h> // statusBar()
#include <kstdaction.h>
-#include <qkeycode.h>
-#include <qpopupmenu.h>
-#include <qptrlist.h>
-#include <qstring.h>
+#include <tqkeycode.h>
+#include <tqpopupmenu.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
#include "karmerrors.h"
#include "karmutility.h"
@@ -34,7 +34,7 @@
#include "tray.h"
#include "version.h"
-MainWindow::MainWindow( const QString &icsfile )
+MainWindow::MainWindow( const TQString &icsfile )
: DCOPObject ( "KarmDCOPIface" ),
KParts::MainWindow(0,Qt::WStyle_ContextHelp),
_accel ( new KAccel( this ) ),
@@ -57,33 +57,33 @@ MainWindow::MainWindow( const QString &icsfile )
_watcher->updateMenus();
// connections
- connect( _taskView, SIGNAL( totalTimesChanged( long, long ) ),
- this, SLOT( updateTime( long, long ) ) );
- connect( _taskView, SIGNAL( selectionChanged ( QListViewItem * )),
- this, SLOT(slotSelectionChanged()));
- connect( _taskView, SIGNAL( updateButtons() ),
- this, SLOT(slotSelectionChanged()));
- connect( _taskView, SIGNAL( setStatusBar( QString ) ),
- this, SLOT(setStatusBar( QString )));
+ connect( _taskView, TQT_SIGNAL( totalTimesChanged( long, long ) ),
+ this, TQT_SLOT( updateTime( long, long ) ) );
+ connect( _taskView, TQT_SIGNAL( selectionChanged ( TQListViewItem * )),
+ this, TQT_SLOT(slotSelectionChanged()));
+ connect( _taskView, TQT_SIGNAL( updateButtons() ),
+ this, TQT_SLOT(slotSelectionChanged()));
+ connect( _taskView, TQT_SIGNAL( setStatusBar( TQString ) ),
+ this, TQT_SLOT(setStatusBar( TQString )));
loadGeometry();
// Setup context menu request handling
connect( _taskView,
- SIGNAL( contextMenuRequested( QListViewItem*, const QPoint&, int )),
+ TQT_SIGNAL( contextMenuRequested( TQListViewItem*, const TQPoint&, int )),
this,
- SLOT( contextMenuRequest( QListViewItem*, const QPoint&, int )));
+ TQT_SLOT( contextMenuRequest( TQListViewItem*, const TQPoint&, int )));
_tray = new KarmTray( this );
- connect( _tray, SIGNAL( quitSelected() ), SLOT( quit() ) );
+ connect( _tray, TQT_SIGNAL( quitSelected() ), TQT_SLOT( quit() ) );
- connect( _taskView, SIGNAL( timersActive() ), _tray, SLOT( startClock() ) );
- connect( _taskView, SIGNAL( timersActive() ), this, SLOT( enableStopAll() ));
- connect( _taskView, SIGNAL( timersInactive() ), _tray, SLOT( stopClock() ) );
- connect( _taskView, SIGNAL( timersInactive() ), this, SLOT( disableStopAll()));
- connect( _taskView, SIGNAL( tasksChanged( QPtrList<Task> ) ),
- _tray, SLOT( updateToolTip( QPtrList<Task> ) ));
+ connect( _taskView, TQT_SIGNAL( timersActive() ), _tray, TQT_SLOT( startClock() ) );
+ connect( _taskView, TQT_SIGNAL( timersActive() ), this, TQT_SLOT( enableStopAll() ));
+ connect( _taskView, TQT_SIGNAL( timersInactive() ), _tray, TQT_SLOT( stopClock() ) );
+ connect( _taskView, TQT_SIGNAL( timersInactive() ), this, TQT_SLOT( disableStopAll()));
+ connect( _taskView, TQT_SIGNAL( tasksChanged( TQPtrList<Task> ) ),
+ _tray, TQT_SLOT( updateToolTip( TQPtrList<Task> ) ));
_taskView->load();
@@ -134,7 +134,7 @@ void MainWindow::slotSelectionChanged()
// actionAddComment->setEnabled( on );
//}
-void MainWindow::setStatusBar(QString qs)
+void MainWindow::setStatusBar(TQString qs)
{
statusBar()->message(i18n(qs.ascii()));
}
@@ -142,7 +142,7 @@ void MainWindow::setStatusBar(QString qs)
bool MainWindow::save()
{
kdDebug(5970) << "Saving time data to disk." << endl;
- QString err=_taskView->save(); // untranslated error msg.
+ TQString err=_taskView->save(); // untranslated error msg.
if (err.isEmpty()) statusBar()->message(i18n("Successfully saved tasks and history"),1807);
else statusBar()->message(i18n(err.ascii()),7707); // no msgbox since save is called when exiting
saveGeometry();
@@ -152,7 +152,7 @@ bool MainWindow::save()
void MainWindow::exportcsvHistory()
{
kdDebug(5970) << "Exporting History to disk." << endl;
- QString err=_taskView->exportcsvHistory();
+ TQString err=_taskView->exportcsvHistory();
if (err.isEmpty()) statusBar()->message(i18n("Successfully exported History to CSV-file"),1807);
else KMessageBox::error(this, err.ascii());
saveGeometry();
@@ -199,7 +199,7 @@ void MainWindow::updateTime( long sessionDiff, long totalDiff )
void MainWindow::updateStatusBar( )
{
- QString time;
+ TQString time;
time = formatTime( _sessionSum );
statusBar()->changeItem( i18n("Session: %1").arg(time), 0 );
@@ -251,128 +251,128 @@ void MainWindow::makeMenus()
*actionNew,
*actionNewSub;
- (void) KStdAction::quit( this, SLOT( quit() ), actionCollection());
- (void) KStdAction::print( this, SLOT( print() ), actionCollection());
- actionKeyBindings = KStdAction::keyBindings( this, SLOT( keyBindings() ),
+ (void) KStdAction::quit( this, TQT_SLOT( quit() ), actionCollection());
+ (void) KStdAction::print( this, TQT_SLOT( print() ), actionCollection());
+ actionKeyBindings = KStdAction::keyBindings( this, TQT_SLOT( keyBindings() ),
actionCollection() );
actionPreferences = KStdAction::preferences(_preferences,
- SLOT(showDialog()),
+ TQT_SLOT(showDialog()),
actionCollection() );
- (void) KStdAction::save( this, SLOT( save() ), actionCollection() );
+ (void) KStdAction::save( this, TQT_SLOT( save() ), actionCollection() );
KAction* actionStartNewSession = new KAction( i18n("Start &New Session"),
0,
this,
- SLOT( startNewSession() ),
+ TQT_SLOT( startNewSession() ),
actionCollection(),
"start_new_session");
KAction* actionResetAll = new KAction( i18n("&Reset All Times"),
0,
this,
- SLOT( resetAllTimes() ),
+ TQT_SLOT( resetAllTimes() ),
actionCollection(),
"reset_all_times");
actionStart = new KAction( i18n("&Start"),
- QString::fromLatin1("1rightarrow"), Key_S,
+ TQString::fromLatin1("1rightarrow"), Key_S,
_taskView,
- SLOT( startCurrentTimer() ), actionCollection(),
+ TQT_SLOT( startCurrentTimer() ), actionCollection(),
"start");
actionStop = new KAction( i18n("S&top"),
- QString::fromLatin1("stop"), Key_S,
+ TQString::fromLatin1("stop"), Key_S,
_taskView,
- SLOT( stopCurrentTimer() ), actionCollection(),
+ TQT_SLOT( stopCurrentTimer() ), actionCollection(),
"stop");
actionStopAll = new KAction( i18n("Stop &All Timers"),
Key_Escape,
_taskView,
- SLOT( stopAllTimers() ), actionCollection(),
+ TQT_SLOT( stopAllTimers() ), actionCollection(),
"stopAll");
actionStopAll->setEnabled(false);
actionNew = new KAction( i18n("&New..."),
- QString::fromLatin1("filenew"), CTRL+Key_N,
+ TQString::fromLatin1("filenew"), CTRL+Key_N,
_taskView,
- SLOT( newTask() ), actionCollection(),
+ TQT_SLOT( newTask() ), actionCollection(),
"new_task");
actionNewSub = new KAction( i18n("New &Subtask..."),
- QString::fromLatin1("kmultiple"), CTRL+ALT+Key_N,
+ TQString::fromLatin1("kmultiple"), CTRL+ALT+Key_N,
_taskView,
- SLOT( newSubTask() ), actionCollection(),
+ TQT_SLOT( newSubTask() ), actionCollection(),
"new_sub_task");
actionDelete = new KAction( i18n("&Delete"),
- QString::fromLatin1("editdelete"), Key_Delete,
+ TQString::fromLatin1("editdelete"), Key_Delete,
_taskView,
- SLOT( deleteTask() ), actionCollection(),
+ TQT_SLOT( deleteTask() ), actionCollection(),
"delete_task");
actionEdit = new KAction( i18n("&Edit..."),
- QString::fromLatin1("edit"), CTRL + Key_E,
+ TQString::fromLatin1("edit"), CTRL + Key_E,
_taskView,
- SLOT( editTask() ), actionCollection(),
+ TQT_SLOT( editTask() ), actionCollection(),
"edit_task");
// actionAddComment = new KAction( i18n("&Add Comment..."),
-// QString::fromLatin1("document"),
+// TQString::fromLatin1("document"),
// CTRL+ALT+Key_E,
// _taskView,
-// SLOT( addCommentToTask() ),
+// TQT_SLOT( addCommentToTask() ),
// actionCollection(),
// "add_comment_to_task");
actionMarkAsComplete = new KAction( i18n("&Mark as Complete"),
- QString::fromLatin1("document"),
+ TQString::fromLatin1("document"),
CTRL+Key_M,
_taskView,
- SLOT( markTaskAsComplete() ),
+ TQT_SLOT( markTaskAsComplete() ),
actionCollection(),
"mark_as_complete");
actionMarkAsIncomplete = new KAction( i18n("&Mark as Incomplete"),
- QString::fromLatin1("document"),
+ TQString::fromLatin1("document"),
CTRL+Key_M,
_taskView,
- SLOT( markTaskAsIncomplete() ),
+ TQT_SLOT( markTaskAsIncomplete() ),
actionCollection(),
"mark_as_incomplete");
actionClipTotals = new KAction( i18n("&Copy Totals to Clipboard"),
- QString::fromLatin1("klipper"),
+ TQString::fromLatin1("klipper"),
CTRL+Key_C,
_taskView,
- SLOT( clipTotals() ),
+ TQT_SLOT( clipTotals() ),
actionCollection(),
"clip_totals");
// actionClipTotals will never be used again, overwrite it
actionClipTotals = new KAction( i18n("&Copy Session Time to Clipboard"),
- QString::fromLatin1("klipper"),
+ TQString::fromLatin1("klipper"),
0,
_taskView,
- SLOT( clipSession() ),
+ TQT_SLOT( clipSession() ),
actionCollection(),
"clip_session");
actionClipHistory = new KAction( i18n("Copy &History to Clipboard"),
- QString::fromLatin1("klipper"),
+ TQString::fromLatin1("klipper"),
CTRL+ALT+Key_C,
_taskView,
- SLOT( clipHistory() ),
+ TQT_SLOT( clipHistory() ),
actionCollection(),
"clip_history");
new KAction( i18n("Import &Legacy Flat File..."), 0,
- _taskView, SLOT(loadFromFlatFile()), actionCollection(),
+ _taskView, TQT_SLOT(loadFromFlatFile()), actionCollection(),
"import_flatfile");
new KAction( i18n("&Export to CSV File..."), 0,
- _taskView, SLOT(exportcsvFile()), actionCollection(),
+ _taskView, TQT_SLOT(exportcsvFile()), actionCollection(),
"export_csvfile");
new KAction( i18n("Export &History to CSV File..."), 0,
- this, SLOT(exportcsvHistory()), actionCollection(),
+ this, TQT_SLOT(exportcsvHistory()), actionCollection(),
"export_csvhistory");
new KAction( i18n("Import Tasks From &Planner..."), 0,
- _taskView, SLOT(importPlanner()), actionCollection(),
+ _taskView, TQT_SLOT(importPlanner()), actionCollection(),
"import_planner");
/*
new KAction( i18n("Import E&vents"), 0,
_taskView,
- SLOT( loadFromKOrgEvents() ), actionCollection(),
+ TQT_SLOT( loadFromKOrgEvents() ), actionCollection(),
"import_korg_events");
*/
- setXMLFile( QString::fromLatin1("karmui.rc") );
+ setXMLFile( TQString::fromLatin1("karmui.rc") );
createGUI( 0 );
// Tool tips must be set after the createGUI.
@@ -442,9 +442,9 @@ void MainWindow::loadGeometry()
{
KConfig &config = *kapp->config();
- config.setGroup( QString::fromLatin1("Main Window Geometry") );
- int w = config.readNumEntry( QString::fromLatin1("Width"), 100 );
- int h = config.readNumEntry( QString::fromLatin1("Height"), 100 );
+ config.setGroup( TQString::fromLatin1("Main Window Geometry") );
+ int w = config.readNumEntry( TQString::fromLatin1("Width"), 100 );
+ int h = config.readNumEntry( TQString::fromLatin1("Height"), 100 );
w = QMAX( w, sizeHint().width() );
h = QMAX( h, sizeHint().height() );
resize(w, h);
@@ -455,9 +455,9 @@ void MainWindow::loadGeometry()
void MainWindow::saveGeometry()
{
KConfig &config = *KGlobal::config();
- config.setGroup( QString::fromLatin1("Main Window Geometry"));
- config.writeEntry( QString::fromLatin1("Width"), width());
- config.writeEntry( QString::fromLatin1("Height"), height());
+ config.setGroup( TQString::fromLatin1("Main Window Geometry"));
+ config.writeEntry( TQString::fromLatin1("Width"), width());
+ config.writeEntry( TQString::fromLatin1("Height"), height());
config.sync();
}
@@ -470,9 +470,9 @@ bool MainWindow::queryClose()
return KMainWindow::queryClose();
}
-void MainWindow::contextMenuRequest( QListViewItem*, const QPoint& point, int )
+void MainWindow::contextMenuRequest( TQListViewItem*, const TQPoint& point, int )
{
- QPopupMenu* pop = dynamic_cast<QPopupMenu*>(
+ TQPopupMenu* pop = dynamic_cast<TQPopupMenu*>(
factory()->container( i18n( "task_popup" ), this ) );
if ( pop )
pop->popup( point );
@@ -484,12 +484,12 @@ void MainWindow::contextMenuRequest( QListViewItem*, const QPoint& point, int )
//
//----------------------------------------------------------------------------
-QString MainWindow::version() const
+TQString MainWindow::version() const
{
return KARM_VERSION;
}
-QString MainWindow::deletetodo()
+TQString MainWindow::deletetodo()
{
_taskView->deleteTask();
return "";
@@ -500,15 +500,15 @@ bool MainWindow::getpromptdelete()
return _preferences->promptDelete();
}
-QString MainWindow::setpromptdelete( bool prompt )
+TQString MainWindow::setpromptdelete( bool prompt )
{
_preferences->setPromptDelete( prompt );
return "";
}
-QString MainWindow::taskIdFromName( const QString &taskname ) const
+TQString MainWindow::taskIdFromName( const TQString &taskname ) const
{
- QString rval = "";
+ TQString rval = "";
Task* task = _taskView->first_child();
while ( rval.isEmpty() && task )
@@ -520,10 +520,10 @@ QString MainWindow::taskIdFromName( const QString &taskname ) const
return rval;
}
-int MainWindow::addTask( const QString& taskname )
+int MainWindow::addTask( const TQString& taskname )
{
DesktopList desktopList;
- QString uid = _taskView->addTask( taskname, 0, 0, desktopList );
+ TQString uid = _taskView->addTask( taskname, 0, 0, desktopList );
kdDebug(5970) << "MainWindow::addTask( " << taskname << " ) returns " << uid << endl;
if ( uid.length() > 0 ) return 0;
else
@@ -534,20 +534,20 @@ int MainWindow::addTask( const QString& taskname )
}
}
-QString MainWindow::setPerCentComplete( const QString& taskName, int perCent )
+TQString MainWindow::setPerCentComplete( const TQString& taskName, int perCent )
{
int index;
- QString err="no such task";
+ TQString err="no such task";
for (int i=0; i<_taskView->count(); i++)
{
if ((_taskView->item_at_index(i)->name()==taskName))
{
index=i;
- if (err==QString::null) err="task name is abigious";
- if (err=="no such task") err=QString::null;
+ if (err==TQString::null) err="task name is abigious";
+ if (err=="no such task") err=TQString::null;
}
}
- if (err==QString::null)
+ if (err==TQString::null)
{
_taskView->item_at_index(index)->setPercentComplete( perCent, _taskView->storage() );
}
@@ -555,12 +555,12 @@ QString MainWindow::setPerCentComplete( const QString& taskName, int perCent )
}
int MainWindow::bookTime
-( const QString& taskId, const QString& datetime, long minutes )
+( const TQString& taskId, const TQString& datetime, long minutes )
{
int rval = 0;
- QDate startDate;
- QTime startTime;
- QDateTime startDateTime;
+ TQDate startDate;
+ TQTime startTime;
+ TQDateTime startDateTime;
Task *task, *t;
if ( minutes <= 0 ) rval = KARM_ERR_INVALID_DURATION;
@@ -578,15 +578,15 @@ int MainWindow::bookTime
// Parse datetime
if ( !rval )
{
- startDate = QDate::fromString( datetime, Qt::ISODate );
+ startDate = TQDate::fromString( datetime, Qt::ISODate );
if ( datetime.length() > 10 ) // "YYYY-MM-DD".length() = 10
{
- startTime = QTime::fromString( datetime, Qt::ISODate );
+ startTime = TQTime::fromString( datetime, Qt::ISODate );
}
- else startTime = QTime( 12, 0 );
+ else startTime = TQTime( 12, 0 );
if ( startDate.isValid() && startTime.isValid() )
{
- startDateTime = QDateTime( startDate, startTime );
+ startDateTime = TQDateTime( startDate, startTime );
}
else rval = KARM_ERR_INVALID_DATE;
@@ -607,13 +607,13 @@ int MainWindow::bookTime
// There was something really bad going on with DCOP when I used a particular
// argument name; if I recall correctly, the argument name was errno.
-QString MainWindow::getError( int mkb ) const
+TQString MainWindow::getError( int mkb ) const
{
if ( mkb <= KARM_MAX_ERROR_NO ) return m_error[ mkb ];
else return i18n( "Invalid error number: %1" ).arg( mkb );
}
-int MainWindow::totalMinutesForTaskId( const QString& taskId )
+int MainWindow::totalMinutesForTaskId( const TQString& taskId )
{
int rval = 0;
Task *task, *t;
@@ -642,9 +642,9 @@ int MainWindow::totalMinutesForTaskId( const QString& taskId )
return rval;
}
-QString MainWindow::_hasTask( Task* task, const QString &taskname ) const
+TQString MainWindow::_hasTask( Task* task, const TQString &taskname ) const
{
- QString rval = "";
+ TQString rval = "";
if ( task->name() == taskname )
{
rval = task->uid();
@@ -661,7 +661,7 @@ QString MainWindow::_hasTask( Task* task, const QString &taskname ) const
return rval;
}
-Task* MainWindow::_hasUid( Task* task, const QString &uid ) const
+Task* MainWindow::_hasUid( Task* task, const TQString &uid ) const
{
Task *rval = NULL;
@@ -679,49 +679,49 @@ Task* MainWindow::_hasUid( Task* task, const QString &uid ) const
}
return rval;
}
-QString MainWindow::starttimerfor( const QString& taskname )
+TQString MainWindow::starttimerfor( const TQString& taskname )
{
int index;
- QString err="no such task";
+ TQString err="no such task";
for (int i=0; i<_taskView->count(); i++)
{
if ((_taskView->item_at_index(i)->name()==taskname))
{
index=i;
- if (err==QString::null) err="task name is abigious";
- if (err=="no such task") err=QString::null;
+ if (err==TQString::null) err="task name is abigious";
+ if (err=="no such task") err=TQString::null;
}
}
- if (err==QString::null) _taskView->startTimerFor( _taskView->item_at_index(index) );
+ if (err==TQString::null) _taskView->startTimerFor( _taskView->item_at_index(index) );
return err;
}
-QString MainWindow::stoptimerfor( const QString& taskname )
+TQString MainWindow::stoptimerfor( const TQString& taskname )
{
int index;
- QString err="no such task";
+ TQString err="no such task";
for (int i=0; i<_taskView->count(); i++)
{
if ((_taskView->item_at_index(i)->name()==taskname))
{
index=i;
- if (err==QString::null) err="task name is abigious";
- if (err=="no such task") err=QString::null;
+ if (err==TQString::null) err="task name is abigious";
+ if (err=="no such task") err=TQString::null;
}
}
- if (err==QString::null) _taskView->stopTimerFor( _taskView->item_at_index(index) );
+ if (err==TQString::null) _taskView->stopTimerFor( _taskView->item_at_index(index) );
return err;
}
-QString MainWindow::exportcsvfile( QString filename, QString from, QString to, int type, bool decimalMinutes, bool allTasks, QString delimiter, QString quote )
+TQString MainWindow::exportcsvfile( TQString filename, TQString from, TQString to, int type, bool decimalMinutes, bool allTasks, TQString delimiter, TQString quote )
{
ReportCriteria rc;
rc.url=filename;
- rc.from=QDate::fromString( from );
- if ( rc.from.isNull() ) rc.from=QDate::fromString( from, Qt::ISODate );
+ rc.from=TQDate::fromString( from );
+ if ( rc.from.isNull() ) rc.from=TQDate::fromString( from, Qt::ISODate );
kdDebug(5970) << "rc.from " << rc.from << endl;
- rc.to=QDate::fromString( to );
- if ( rc.to.isNull() ) rc.to=QDate::fromString( to, Qt::ISODate );
+ rc.to=TQDate::fromString( to );
+ if ( rc.to.isNull() ) rc.to=TQDate::fromString( to, Qt::ISODate );
kdDebug(5970) << "rc.to " << rc.to << endl;
rc.reportType=(ReportCriteria::REPORTTYPE) type; // history report or totals report
rc.decimalMinutes=decimalMinutes;
@@ -731,7 +731,7 @@ QString MainWindow::exportcsvfile( QString filename, QString from, QString to, i
return _taskView->report( rc );
}
-QString MainWindow::importplannerfile( QString fileName )
+TQString MainWindow::importplannerfile( TQString fileName )
{
return _taskView->importPlanner(fileName);
}
diff --git a/karm/mainwindow.h b/karm/mainwindow.h
index 7f066af30..f4f25f7d1 100644
--- a/karm/mainwindow.h
+++ b/karm/mainwindow.h
@@ -29,8 +29,8 @@ class MainWindow : public KParts::MainWindow, virtual public KarmDCOPIface
private:
void makeMenus();
- QString _hasTask( Task* task, const QString &taskname ) const;
- Task* _hasUid( Task* task, const QString &uid ) const;
+ TQString _hasTask( Task* task, const TQString &taskname ) const;
+ Task* _hasUid( Task* task, const TQString &uid ) const;
KAccel* _accel;
KAccelMenuWatch* _watcher;
@@ -49,7 +49,7 @@ class MainWindow : public KParts::MainWindow, virtual public KarmDCOPIface
KAction* actionPreferences;
KAction* actionClipTotals;
KAction* actionClipHistory;
- QString m_error[ KARM_MAX_ERROR_NO + 1 ];
+ TQString m_error[ KARM_MAX_ERROR_NO + 1 ];
friend class KarmTray;
@@ -60,35 +60,35 @@ class MainWindow : public KParts::MainWindow, virtual public KarmDCOPIface
public:
- MainWindow( const QString &icsfile = "" );
+ MainWindow( const TQString &icsfile = "" );
virtual ~MainWindow();
// DCOP
- QString version() const;
- QString taskIdFromName( const QString &taskName ) const;
+ TQString version() const;
+ TQString taskIdFromName( const TQString &taskName ) const;
/** @reimp from KarmDCOPIface::addTask */
- int addTask( const QString &storage );
+ int addTask( const TQString &storage );
/** @reimp from KarmDCOPIface::setPerCentComplete */
- QString setPerCentComplete( const QString& taskName, int PerCent );
+ TQString setPerCentComplete( const TQString& taskName, int PerCent );
/** @reimp from KarmDCOPIface::bookTime */
- int bookTime( const QString& taskId, const QString& iso8601StartDateTime, long durationInMinutes );
+ int bookTime( const TQString& taskId, const TQString& iso8601StartDateTime, long durationInMinutes );
/** @reimp from KarmDCOPIface::getError */
- QString getError( int karmErrorNumber ) const;
- int totalMinutesForTaskId( const QString& taskId );
+ TQString getError( int karmErrorNumber ) const;
+ int totalMinutesForTaskId( const TQString& taskId );
/** start the timer for taskname */
- QString starttimerfor( const QString &taskname );
+ TQString starttimerfor( const TQString &taskname );
/** stop the timer for taskname */
- QString stoptimerfor( const QString &taskname );
- QString deletetodo();
+ TQString stoptimerfor( const TQString &taskname );
+ TQString deletetodo();
/** shall there be a "really delete" question */
bool getpromptdelete();
/** set if there will be a "really delete" question */
- QString setpromptdelete( bool prompt );
- QString exportcsvfile( QString filename, QString from, QString to, int type, bool decimalMinutes, bool allTasks, QString delimiter, QString quote );
- QString importplannerfile( QString filename );
+ TQString setpromptdelete( bool prompt );
+ TQString exportcsvfile( TQString filename, TQString from, TQString to, int type, bool decimalMinutes, bool allTasks, TQString delimiter, TQString quote );
+ TQString importplannerfile( TQString filename );
public slots:
- void setStatusBar( QString );
+ void setStatusBar( TQString );
void quit();
protected slots:
@@ -101,7 +101,7 @@ class MainWindow : public KParts::MainWindow, virtual public KarmDCOPIface
void exportcsvHistory();
void print();
void slotSelectionChanged();
- void contextMenuRequest( QListViewItem*, const QPoint&, int );
+ void contextMenuRequest( TQListViewItem*, const TQPoint&, int );
void enableStopAll();
void disableStopAll();
// void timeLoggingChanged( bool on );
diff --git a/karm/plannerparser.cpp b/karm/plannerparser.cpp
index 21e0c4f76..67f7bd53f 100644
--- a/karm/plannerparser.cpp
+++ b/karm/plannerparser.cpp
@@ -48,22 +48,22 @@ test cases:
return true;
}
- bool PlannerParser::startElement( const QString&, const QString&, const QString& qName, const QXmlAttributes& att )
+ bool PlannerParser::startElement( const TQString&, const TQString&, const TQString& qName, const TQXmlAttributes& att )
{
kdDebug() << "entering startElement" << endl;
- QString taskName;
+ TQString taskName;
int taskComplete=0;
// only <task>s within <tasks> are processed
- if (qName == QString::fromLatin1("tasks")) withInTasks=true;
- if ((qName == QString::fromLatin1("task")) && (withInTasks))
+ if (qName == TQString::fromLatin1("tasks")) withInTasks=true;
+ if ((qName == TQString::fromLatin1("task")) && (withInTasks))
{
// find out name and percent-complete
for (int i=0; i<att.length(); i++)
{
- if (att.qName(i) == QString::fromLatin1("name")) taskName=att.value(i);
- if (att.qName(i)==QString::fromLatin1("percent-complete")) taskComplete=att.value(i).toInt();
+ if (att.qName(i) == TQString::fromLatin1("name")) taskName=att.value(i);
+ if (att.qName(i)==TQString::fromLatin1("percent-complete")) taskComplete=att.value(i).toInt();
}
// at the moment, task is still the old task or the old father task (if an endElement occurred) or not existing (if the
@@ -87,7 +87,7 @@ test cases:
return true;
}
- bool PlannerParser::endElement( const QString&, const QString&, const QString& qName)
+ bool PlannerParser::endElement( const TQString&, const TQString&, const TQString& qName)
{
// only <task>s within <tasks> increased level, so only decrease for <task>s within <tasks>
if (withInTasks)
diff --git a/karm/plannerparser.h b/karm/plannerparser.h
index a626d6f03..6a7ff0281 100644
--- a/karm/plannerparser.h
+++ b/karm/plannerparser.h
@@ -27,7 +27,7 @@ test cases:
@author Thorsten Staerk
*/
-#include <qxml.h>
+#include <tqxml.h>
#include <klocale.h>
#include "taskview.h"
#include "task.h"
@@ -45,10 +45,10 @@ public:
bool startDocument();
/** given by the framework from qxml. Called when the reader occurs an open tag (e.g. \<b\> ) */
- bool startElement( const QString&, const QString&, const QString& qName, const QXmlAttributes& att );
+ bool startElement( const TQString&, const TQString&, const TQString& qName, const TQXmlAttributes& att );
/** given by the framework from qxml. Called when the reader occurs a closed tag (e.g. \</b\> )*/
- bool endElement( const QString&, const QString&, const QString& qName);
+ bool endElement( const TQString&, const TQString&, const TQString& qName);
private:
bool withInTasks; // within <tasks> ?
diff --git a/karm/preferences.cpp b/karm/preferences.cpp
index 9316aa440..efc621802 100644
--- a/karm/preferences.cpp
+++ b/karm/preferences.cpp
@@ -1,9 +1,9 @@
#undef Unsorted // for --enable-final
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qstring.h>
-#include <qspinbox.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqstring.h>
+#include <tqspinbox.h>
+#include <tqlayout.h>
#include <kapplication.h> // kapp
#include <kconfig.h>
@@ -19,7 +19,7 @@
Preferences *Preferences::_instance = 0;
-Preferences::Preferences( const QString& icsFile )
+Preferences::Preferences( const TQString& icsFile )
: KDialogBase( IconList, i18n("Preferences"), Ok|Cancel, Ok )
{
@@ -36,7 +36,7 @@ Preferences::Preferences( const QString& icsFile )
}
-Preferences *Preferences::instance( const QString &icsfile )
+Preferences *Preferences::instance( const TQString &icsfile )
{
if (_instance == 0) {
_instance = new Preferences( icsfile );
@@ -46,12 +46,12 @@ Preferences *Preferences::instance( const QString &icsfile )
void Preferences::makeBehaviorPage()
{
- QPixmap icon = SmallIcon( "kcmsystem", KIcon::SizeMedium);
- QFrame* behaviorPage = addPage( i18n("Behavior"), i18n("Behavior Settings"),
+ TQPixmap icon = SmallIcon( "kcmsystem", KIcon::SizeMedium);
+ TQFrame* behaviorPage = addPage( i18n("Behavior"), i18n("Behavior Settings"),
icon );
- QVBoxLayout* topLevel = new QVBoxLayout( behaviorPage, 0, spacingHint() );
- QGridLayout* layout = new QGridLayout( topLevel, 2, 2 );
+ TQVBoxLayout* topLevel = new TQVBoxLayout( behaviorPage, 0, spacingHint() );
+ TQGridLayout* layout = new TQGridLayout( topLevel, 2, 2 );
layout->setColStretch( 1, 1 );
_doIdleDetectionW = new QCheckBox
@@ -68,29 +68,29 @@ void Preferences::makeBehaviorPage()
topLevel->addStretch();
- connect( _doIdleDetectionW, SIGNAL( clicked() ), this,
- SLOT( idleDetectCheckBoxChanged() ));
+ connect( _doIdleDetectionW, TQT_SIGNAL( clicked() ), this,
+ TQT_SLOT( idleDetectCheckBoxChanged() ));
}
void Preferences::makeDisplayPage()
{
- QPixmap icon = SmallIcon( "viewmag", KIcon::SizeMedium );
- QFrame* displayPage = addPage( i18n("Display"), i18n("Display Settings"),
+ TQPixmap icon = SmallIcon( "viewmag", KIcon::SizeMedium );
+ TQFrame* displayPage = addPage( i18n("Display"), i18n("Display Settings"),
icon );
- QVBoxLayout* topLevel = new QVBoxLayout( displayPage, 0, spacingHint() );
- QGridLayout* layout = new QGridLayout( topLevel, 5, 2 );
+ TQVBoxLayout* topLevel = new TQVBoxLayout( displayPage, 0, spacingHint() );
+ TQGridLayout* layout = new TQGridLayout( topLevel, 5, 2 );
layout->setColStretch( 1, 1 );
- QLabel* _displayColumnsLabelW = new QLabel( i18n("Columns displayed:"),
+ TQLabel* _displayColumnsLabelW = new TQLabel( i18n("Columns displayed:"),
displayPage );
- _displaySessionW = new QCheckBox ( i18n("Session time"),
+ _displaySessionW = new TQCheckBox ( i18n("Session time"),
displayPage, "_displaySessionW");
- _displayTimeW = new QCheckBox ( i18n("Cumulative task time"),
+ _displayTimeW = new TQCheckBox ( i18n("Cumulative task time"),
displayPage, "_displayTimeW");
- _displayTotalSessionW = new QCheckBox( i18n("Total session time"),
+ _displayTotalSessionW = new TQCheckBox( i18n("Total session time"),
displayPage, "_displayTotalSessionW");
- _displayTotalTimeW = new QCheckBox ( i18n("Total task time"),
+ _displayTotalTimeW = new TQCheckBox ( i18n("Total task time"),
displayPage, "_displayTotalTimeW");
layout->addMultiCellWidget( _displayColumnsLabelW, 0, 0, 0, 1 );
@@ -104,28 +104,28 @@ void Preferences::makeDisplayPage()
void Preferences::makeStoragePage()
{
- QPixmap icon = SmallIcon( "kfm", KIcon::SizeMedium );
- QFrame* storagePage = addPage( i18n("Storage"), i18n("Storage Settings"),
+ TQPixmap icon = SmallIcon( "kfm", KIcon::SizeMedium );
+ TQFrame* storagePage = addPage( i18n("Storage"), i18n("Storage Settings"),
icon );
- QVBoxLayout* topLevel = new QVBoxLayout( storagePage, 0, spacingHint() );
- QGridLayout* layout = new QGridLayout( topLevel, 4, 2 );
+ TQVBoxLayout* topLevel = new TQVBoxLayout( storagePage, 0, spacingHint() );
+ TQGridLayout* layout = new TQGridLayout( topLevel, 4, 2 );
layout->setColStretch( 1, 1 );
// autosave
_doAutoSaveW = new QCheckBox
( i18n("Save tasks every"), storagePage, "_doAutoSaveW" );
- _autoSaveValueW = new QSpinBox(1, 60*24, 1, storagePage, "_autoSaveValueW");
+ _autoSaveValueW = new TQSpinBox(1, 60*24, 1, storagePage, "_autoSaveValueW");
_autoSaveValueW->setSuffix(i18n(" min"));
// iCalendar
- QLabel* _iCalFileLabel = new QLabel( i18n("iCalendar file:"), storagePage);
+ TQLabel* _iCalFileLabel = new TQLabel( i18n("iCalendar file:"), storagePage);
_iCalFileW = new KURLRequester(storagePage, "_iCalFileW");
- _iCalFileW->setFilter(QString::fromLatin1("*.ics"));
+ _iCalFileW->setFilter(TQString::fromLatin1("*.ics"));
_iCalFileW->setMode(KFile::File);
// Log time?
- _loggingW = new QCheckBox
+ _loggingW = new TQCheckBox
( i18n("Log history"), storagePage, "_loggingW" );
// add widgets to layout
@@ -138,8 +138,8 @@ void Preferences::makeStoragePage()
topLevel->addStretch();
// checkboxes disable file selection controls
- connect( _doAutoSaveW, SIGNAL( clicked() ),
- this, SLOT( autoSaveCheckBoxChanged() ));
+ connect( _doAutoSaveW, TQT_SIGNAL( clicked() ),
+ this, TQT_SLOT( autoSaveCheckBoxChanged() ));
}
void Preferences::disableIdleDetection()
@@ -234,17 +234,17 @@ void Preferences::emitSignals()
emit setupChanged();
}
-QString Preferences::iCalFile() const { return _iCalFileV; }
-QString Preferences::activeCalendarFile() const { return _iCalFileV; }
+TQString Preferences::iCalFile() const { return _iCalFileV; }
+TQString Preferences::activeCalendarFile() const { return _iCalFileV; }
bool Preferences::detectIdleness() const { return _doIdleDetectionV; }
int Preferences::idlenessTimeout() const { return _idleDetectValueV; }
bool Preferences::autoSave() const { return _doAutoSaveV; }
int Preferences::autoSavePeriod() const { return _autoSaveValueV; }
bool Preferences::logging() const { return _loggingV; }
bool Preferences::promptDelete() const { return _promptDeleteV; }
-QString Preferences::setPromptDelete(bool prompt) { _promptDeleteV=prompt; return ""; }
+TQString Preferences::setPromptDelete(bool prompt) { _promptDeleteV=prompt; return ""; }
bool Preferences::displayColumn(int n) const { return _displayColumnV[n]; }
-QString Preferences::userRealName() const { return _userRealName; }
+TQString Preferences::userRealName() const { return _userRealName; }
//---------------------------------------------------------------------------
// Load and Save
@@ -253,32 +253,32 @@ void Preferences::load()
{
KConfig &config = *kapp->config();
- config.setGroup( QString::fromLatin1("Idle detection") );
- _doIdleDetectionV = config.readBoolEntry( QString::fromLatin1("enabled"),
+ config.setGroup( TQString::fromLatin1("Idle detection") );
+ _doIdleDetectionV = config.readBoolEntry( TQString::fromLatin1("enabled"),
true );
- _idleDetectValueV = config.readNumEntry(QString::fromLatin1("period"), 15);
+ _idleDetectValueV = config.readNumEntry(TQString::fromLatin1("period"), 15);
- config.setGroup( QString::fromLatin1("Saving") );
+ config.setGroup( TQString::fromLatin1("Saving") );
_iCalFileV = config.readPathEntry
- ( QString::fromLatin1("ical file"),
- locateLocal( "appdata", QString::fromLatin1( "karm.ics")));
+ ( TQString::fromLatin1("ical file"),
+ locateLocal( "appdata", TQString::fromLatin1( "karm.ics")));
_doAutoSaveV = config.readBoolEntry
- ( QString::fromLatin1("auto save"), true);
+ ( TQString::fromLatin1("auto save"), true);
_autoSaveValueV = config.readNumEntry
- ( QString::fromLatin1("auto save period"), 5);
+ ( TQString::fromLatin1("auto save period"), 5);
_promptDeleteV = config.readBoolEntry
- ( QString::fromLatin1("prompt delete"), true);
+ ( TQString::fromLatin1("prompt delete"), true);
_loggingV = config.readBoolEntry
- ( QString::fromLatin1("logging"), true);
+ ( TQString::fromLatin1("logging"), true);
_displayColumnV[0] = config.readBoolEntry
- ( QString::fromLatin1("display session time"), true);
+ ( TQString::fromLatin1("display session time"), true);
_displayColumnV[1] = config.readBoolEntry
- ( QString::fromLatin1("display time"), true);
+ ( TQString::fromLatin1("display time"), true);
_displayColumnV[2] = config.readBoolEntry
- ( QString::fromLatin1("display total session time"), true);
+ ( TQString::fromLatin1("display total session time"), true);
_displayColumnV[3] = config.readBoolEntry
- ( QString::fromLatin1("display total time"), true);
+ ( TQString::fromLatin1("display total time"), true);
KEMailSettings settings;
_userRealName = settings.getSetting( KEMailSettings::RealName );
@@ -288,44 +288,44 @@ void Preferences::save()
{
KConfig &config = *KGlobal::config();
- config.setGroup( QString::fromLatin1("Idle detection"));
- config.writeEntry( QString::fromLatin1("enabled"), _doIdleDetectionV);
- config.writeEntry( QString::fromLatin1("period"), _idleDetectValueV);
+ config.setGroup( TQString::fromLatin1("Idle detection"));
+ config.writeEntry( TQString::fromLatin1("enabled"), _doIdleDetectionV);
+ config.writeEntry( TQString::fromLatin1("period"), _idleDetectValueV);
- config.setGroup( QString::fromLatin1("Saving"));
- config.writePathEntry( QString::fromLatin1("ical file"), _iCalFileV);
- config.writeEntry( QString::fromLatin1("auto save"), _doAutoSaveV);
- config.writeEntry( QString::fromLatin1("logging"), _loggingV);
- config.writeEntry( QString::fromLatin1("auto save period"), _autoSaveValueV);
- config.writeEntry( QString::fromLatin1("prompt delete"), _promptDeleteV);
+ config.setGroup( TQString::fromLatin1("Saving"));
+ config.writePathEntry( TQString::fromLatin1("ical file"), _iCalFileV);
+ config.writeEntry( TQString::fromLatin1("auto save"), _doAutoSaveV);
+ config.writeEntry( TQString::fromLatin1("logging"), _loggingV);
+ config.writeEntry( TQString::fromLatin1("auto save period"), _autoSaveValueV);
+ config.writeEntry( TQString::fromLatin1("prompt delete"), _promptDeleteV);
- config.writeEntry( QString::fromLatin1("display session time"),
+ config.writeEntry( TQString::fromLatin1("display session time"),
_displayColumnV[0]);
- config.writeEntry( QString::fromLatin1("display time"),
+ config.writeEntry( TQString::fromLatin1("display time"),
_displayColumnV[1]);
- config.writeEntry( QString::fromLatin1("display total session time"),
+ config.writeEntry( TQString::fromLatin1("display total session time"),
_displayColumnV[2]);
- config.writeEntry( QString::fromLatin1("display total time"),
+ config.writeEntry( TQString::fromLatin1("display total time"),
_displayColumnV[3]);
config.sync();
}
// HACK: this entire config dialog should be upgraded to KConfigXT
-bool Preferences::readBoolEntry( const QString& key )
+bool Preferences::readBoolEntry( const TQString& key )
{
KConfig &config = *KGlobal::config();
return config.readBoolEntry ( key, true );
}
-void Preferences::writeEntry( const QString &key, bool value)
+void Preferences::writeEntry( const TQString &key, bool value)
{
KConfig &config = *KGlobal::config();
config.writeEntry( key, value );
config.sync();
}
-void Preferences::deleteEntry( const QString &key )
+void Preferences::deleteEntry( const TQString &key )
{
KConfig &config = *KGlobal::config();
config.deleteEntry( key );
diff --git a/karm/preferences.h b/karm/preferences.h
index e917d70bb..adfcd14ec 100644
--- a/karm/preferences.h
+++ b/karm/preferences.h
@@ -18,26 +18,26 @@ class Preferences :public KDialogBase
Q_OBJECT
public:
- static Preferences *instance( const QString& icsfile = "" );
+ static Preferences *instance( const TQString& icsfile = "" );
void disableIdleDetection();
// Retrive information about settings
bool detectIdleness() const;
int idlenessTimeout() const;
- QString iCalFile() const;
- QString activeCalendarFile() const;
+ TQString iCalFile() const;
+ TQString activeCalendarFile() const;
bool autoSave() const;
bool logging() const;
int autoSavePeriod() const;
bool promptDelete() const;
- QString setPromptDelete( bool prompt );
+ TQString setPromptDelete( bool prompt );
bool displayColumn(int n) const;
- QString userRealName() const;
+ TQString userRealName() const;
void emitSignals();
- bool readBoolEntry( const QString& uid );
- void writeEntry( const QString &key, bool value );
- void deleteEntry( const QString &key );
+ bool readBoolEntry( const TQString& uid );
+ void writeEntry( const TQString &key, bool value );
+ void deleteEntry( const TQString &key );
public slots:
void showDialog();
@@ -47,7 +47,7 @@ class Preferences :public KDialogBase
signals:
void detectIdleness(bool on);
void idlenessTimeout(int minutes);
- void iCalFile(QString);
+ void iCalFile(TQString);
void autoSave(bool on);
void autoSavePeriod(int minutes);
void setupChanged();
@@ -63,27 +63,27 @@ class Preferences :public KDialogBase
void makeBehaviorPage();
void makeStoragePage();
- Preferences( const QString& icsfile = "" );
+ Preferences( const TQString& icsfile = "" );
static Preferences *_instance;
bool _unsavedChanges;
// Widgets
- QCheckBox *_doIdleDetectionW, *_doAutoSaveW, *_promptDeleteW;
- QCheckBox *_displayTimeW, *_displaySessionW,
+ TQCheckBox *_doIdleDetectionW, *_doAutoSaveW, *_promptDeleteW;
+ TQCheckBox *_displayTimeW, *_displaySessionW,
*_displayTotalTimeW, *_displayTotalSessionW;
- QCheckBox *_loggingW;
- QLabel *_idleDetectLabelW, *_displayColumnsLabelW;
- QSpinBox *_idleDetectValueW, *_autoSaveValueW;
+ TQCheckBox *_loggingW;
+ TQLabel *_idleDetectLabelW, *_displayColumnsLabelW;
+ TQSpinBox *_idleDetectValueW, *_autoSaveValueW;
KURLRequester *_iCalFileW ;
// Values
bool _doIdleDetectionV, _doAutoSaveV, _promptDeleteV, _loggingV;
bool _displayColumnV[4];
int _idleDetectValueV, _autoSaveValueV;
- QString _iCalFileV;
+ TQString _iCalFileV;
/** real name of the user, used during ICAL saving */
- QString _userRealName;
+ TQString _userRealName;
};
#endif // KARM_PREFERENCES_H
diff --git a/karm/print.cpp b/karm/print.cpp
index ff00a3bc3..1badb4f9f 100644
--- a/karm/print.cpp
+++ b/karm/print.cpp
@@ -1,8 +1,8 @@
// #include <iostream>
-#include <qdatetime.h>
-#include <qpaintdevicemetrics.h>
-#include <qpainter.h>
+#include <tqdatetime.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqpainter.h>
#include <kglobal.h>
#include <klocale.h> // i18n
@@ -24,9 +24,9 @@ void MyPrinter::print()
// FIXME: make a better caption for the printingdialog
if (setup(0L, i18n("Print Times"))) {
// setup
- QPainter painter(this);
- QPaintDeviceMetrics deviceMetrics(this);
- QFontMetrics metrics = painter.fontMetrics();
+ TQPainter painter(this);
+ TQPaintDeviceMetrics deviceMetrics(this);
+ TQFontMetrics metrics = painter.fontMetrics();
pageHeight = deviceMetrics.height();
int pageWidth = deviceMetrics.width();
xMargin = margins().width();
@@ -68,17 +68,17 @@ void MyPrinter::print()
int realPageWidth = nameFieldWidth + timeWidth + sessionTimeWidth + 2*5;
// Print the header
- QFont origFont, newFont;
+ TQFont origFont, newFont;
origFont = painter.font();
newFont = origFont;
newFont.setPixelSize( static_cast<int>(origFont.pixelSize() * 1.5) );
painter.setFont(newFont);
int height = metrics.height();
- QString now = KGlobal::locale()->formatDateTime(QDateTime::currentDateTime());
+ TQString now = KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime());
painter.drawText(xMargin, yoff, pageWidth, height,
- QPainter::AlignCenter,
+ TQPainter::AlignCenter,
i18n("KArm - %1").arg(now));
painter.setFont(origFont);
@@ -106,12 +106,12 @@ void MyPrinter::print()
// Print the Totals
printLine( formatTime( totalTotal ),
formatTime( sessionTotal ),
- QString(), painter, 0);
+ TQString(), painter, 0);
}
}
int MyPrinter::calculateReqNameWidth( Task* task,
- QFontMetrics &metrics,
+ TQFontMetrics &metrics,
int level)
{
int width = metrics.width(task->name()) + level * levelIndent;
@@ -125,11 +125,11 @@ int MyPrinter::calculateReqNameWidth( Task* task,
return width;
}
-void MyPrinter::printTask(Task *task, QPainter &painter, int level)
+void MyPrinter::printTask(Task *task, TQPainter &painter, int level)
{
- QString time = formatTime(task->totalTime());
- QString sessionTime = formatTime(task->totalSessionTime());
- QString name = task->name();
+ TQString time = formatTime(task->totalTime());
+ TQString sessionTime = formatTime(task->totalSessionTime());
+ TQString name = task->name();
printLine(time, sessionTime, name, painter, level);
for ( Task* subTask = task->firstChild();
@@ -140,21 +140,21 @@ void MyPrinter::printTask(Task *task, QPainter &painter, int level)
}
}
-void MyPrinter::printLine( QString total, QString session, QString name,
- QPainter &painter, int level )
+void MyPrinter::printLine( TQString total, TQString session, TQString name,
+ TQPainter &painter, int level )
{
int xoff = xMargin + 10 * level;
painter.drawText( xoff, yoff, nameFieldWidth, lineHeight,
- QPainter::AlignLeft, name);
+ TQPainter::AlignLeft, name);
xoff = xMargin + nameFieldWidth;
painter.drawText( xoff, yoff, sessionTimeWidth, lineHeight,
- QPainter::AlignRight, session);
+ TQPainter::AlignRight, session);
xoff += sessionTimeWidth+ 5;
painter.drawText( xoff, yoff, timeWidth, lineHeight,
- QPainter::AlignRight, total);
+ TQPainter::AlignRight, total);
xoff += timeWidth+5;
yoff += lineHeight;
diff --git a/karm/print.h b/karm/print.h
index 5c51a2c45..22e0d6570 100644
--- a/karm/print.h
+++ b/karm/print.h
@@ -20,10 +20,10 @@ class MyPrinter : public KPrinter
public:
MyPrinter( const TaskView *taskView );
void print();
- void printLine( QString total, QString session, QString name, QPainter &,
+ void printLine( TQString total, TQString session, TQString name, TQPainter &,
int );
- void printTask( Task *task, QPainter &, int level );
- int calculateReqNameWidth( Task *task, QFontMetrics &metrics,
+ void printTask( Task *task, TQPainter &, int level );
+ int calculateReqNameWidth( Task *task, TQFontMetrics &metrics,
int level);
private:
diff --git a/karm/printdialog.cpp b/karm/printdialog.cpp
index b2e4635d9..92a306a01 100644
--- a/karm/printdialog.cpp
+++ b/karm/printdialog.cpp
@@ -20,17 +20,17 @@
*
*/
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qhbox.h>
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qlineedit.h>
-#include <qpixmap.h>
-#include <qpushbutton.h>
-#include <qstring.h>
-#include <qwidget.h>
-#include <qwhatsthis.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqhbox.h>
+#include <tqlabel.h>
+#include <tqlayout.h>
+#include <tqlineedit.h>
+#include <tqpixmap.h>
+#include <tqpushbutton.h>
+#include <tqstring.h>
+#include <tqwidget.h>
+#include <tqwhatsthis.h>
#include <kiconloader.h>
#include <klocale.h> // i18n
@@ -44,57 +44,57 @@ PrintDialog::PrintDialog()
: KDialogBase(0, "PrintDialog", true, i18n("Print Dialog"), Ok|Cancel,
Ok, true )
{
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget(page);
int year, month;
- QVBoxLayout *layout = new QVBoxLayout(page, KDialog::spacingHint());
+ TQVBoxLayout *layout = new TQVBoxLayout(page, KDialog::spacingHint());
layout->addSpacing(10);
layout->addStretch(1);
// Date Range
- QGroupBox *rangeGroup = new QGroupBox(1, Horizontal, i18n("Date Range"),
+ TQGroupBox *rangeGroup = new TQGroupBox(1, Horizontal, i18n("Date Range"),
page);
layout->addWidget(rangeGroup);
- QWidget *rangeWidget = new QWidget(rangeGroup);
- QHBoxLayout *rangeLayout = new QHBoxLayout(rangeWidget, 0, spacingHint());
+ TQWidget *rangeWidget = new TQWidget(rangeGroup);
+ TQHBoxLayout *rangeLayout = new TQHBoxLayout(rangeWidget, 0, spacingHint());
- rangeLayout->addWidget(new QLabel(i18n("From:"), rangeWidget));
+ rangeLayout->addWidget(new TQLabel(i18n("From:"), rangeWidget));
_from = new KDateEdit(rangeWidget);
// Default from date to beginning of the month
- year = QDate::currentDate().year();
- month = QDate::currentDate().month();
- _from->setDate(QDate(year, month, 1));
+ year = TQDate::currentDate().year();
+ month = TQDate::currentDate().month();
+ _from->setDate(TQDate(year, month, 1));
rangeLayout->addWidget(_from);
- rangeLayout->addWidget(new QLabel(i18n("To:"), rangeWidget));
+ rangeLayout->addWidget(new TQLabel(i18n("To:"), rangeWidget));
_to = new KDateEdit(rangeWidget);
rangeLayout->addWidget(_to);
layout->addSpacing(10);
layout->addStretch(1);
- _allTasks = new QComboBox( page );
+ _allTasks = new TQComboBox( page );
_allTasks->insertItem( i18n( "Selected Task" ) );
_allTasks->insertItem( i18n( "All Tasks" ) );
layout->addWidget( _allTasks );
- _perWeek = new QCheckBox( i18n( "Summarize per week" ), page );
+ _perWeek = new TQCheckBox( i18n( "Summarize per week" ), page );
layout->addWidget( _perWeek );
- _totalsOnly = new QCheckBox( i18n( "Totals only" ), page );
+ _totalsOnly = new TQCheckBox( i18n( "Totals only" ), page );
layout->addWidget( _totalsOnly );
layout->addSpacing(10);
layout->addStretch(1);
}
-QDate PrintDialog::from() const
+TQDate PrintDialog::from() const
{
return _from->date();
}
-QDate PrintDialog::to() const
+TQDate PrintDialog::to() const
{
return _to->date();
}
diff --git a/karm/printdialog.h b/karm/printdialog.h
index 6c2c4c581..089950f8e 100644
--- a/karm/printdialog.h
+++ b/karm/printdialog.h
@@ -36,10 +36,10 @@ class PrintDialog : public KDialogBase
PrintDialog();
/* Return the from date entered. */
- QDate from() const;
+ TQDate from() const;
/* Return the to date entered. */
- QDate to() const;
+ TQDate to() const;
/* Whether to summarize per week */
bool perWeek() const;
@@ -52,9 +52,9 @@ class PrintDialog : public KDialogBase
private:
KDateEdit *_from, *_to;
- QCheckBox *_perWeek;
- QComboBox *_allTasks;
- QCheckBox *_totalsOnly;
+ TQCheckBox *_perWeek;
+ TQComboBox *_allTasks;
+ TQCheckBox *_totalsOnly;
};
#endif // KARM_PRINT_DIALOG_H
diff --git a/karm/reportcriteria.h b/karm/reportcriteria.h
index 66b5b8a02..e8b4c248e 100644
--- a/karm/reportcriteria.h
+++ b/karm/reportcriteria.h
@@ -21,7 +21,7 @@
#ifndef REPORTCRITERIA_H
#define REPORTCRITERIA_H
-#include <qdatetime.h>
+#include <tqdatetime.h>
#include <kurl.h>
class QString;
@@ -57,12 +57,12 @@ class ReportCriteria
/**
For history reports, the lower bound of the date range to report on.
*/
- QDate from;
+ TQDate from;
/**
For history reports, the upper bound of the date range to report on.
*/
- QDate to;
+ TQDate to;
/**
True if the report should contain all tasks in Karm.
@@ -80,12 +80,12 @@ class ReportCriteria
/**
The delimiter to use when outputting comma-seperated value reports.
*/
- QString delimiter;
+ TQString delimiter;
/**
The quote to use for text fields when outputting comma-seperated reports.
*/
- QString quote;
+ TQString quote;
};
#endif
diff --git a/karm/task.cpp b/karm/task.cpp
index 07e934e53..5ade426f0 100644
--- a/karm/task.cpp
+++ b/karm/task.cpp
@@ -1,7 +1,7 @@
-#include <qcstring.h>
-#include <qdatetime.h>
-#include <qstring.h>
-#include <qtimer.h>
+#include <tqcstring.h>
+#include <tqdatetime.h>
+#include <tqstring.h>
+#include <tqtimer.h>
#include <kiconloader.h>
@@ -19,27 +19,27 @@
const int gSecondsPerMinute = 60;
-QPtrVector<QPixmap> *Task::icons = 0;
+TQPtrVector<TQPixmap> *Task::icons = 0;
-Task::Task( const QString& taskName, long minutes, long sessionTime,
+Task::Task( const TQString& taskName, long minutes, long sessionTime,
DesktopList desktops, TaskView *parent)
- : QObject(), QListViewItem(parent)
+ : TQObject(), TQListViewItem(parent)
{
init(taskName, minutes, sessionTime, desktops, 0);
}
-Task::Task( const QString& taskName, long minutes, long sessionTime,
+Task::Task( const TQString& taskName, long minutes, long sessionTime,
DesktopList desktops, Task *parent)
- : QObject(), QListViewItem(parent)
+ : TQObject(), TQListViewItem(parent)
{
init(taskName, minutes, sessionTime, desktops, 0);
}
Task::Task( KCal::Todo* todo, TaskView* parent )
- : QObject(), QListViewItem( parent )
+ : TQObject(), TQListViewItem( parent )
{
long minutes = 0;
- QString name;
+ TQString name;
long sessionTime = 0;
int percent_complete = 0;
DesktopList desktops;
@@ -48,25 +48,25 @@ Task::Task( KCal::Todo* todo, TaskView* parent )
init(name, minutes, sessionTime, desktops, percent_complete);
}
-void Task::init( const QString& taskName, long minutes, long sessionTime,
+void Task::init( const TQString& taskName, long minutes, long sessionTime,
DesktopList desktops, int percent_complete)
{
// If our parent is the taskview then connect our totalTimesChanged
// signal to its receiver
if ( ! parent() )
- connect( this, SIGNAL( totalTimesChanged ( long, long ) ),
- listView(), SLOT( taskTotalTimesChanged( long, long) ));
+ connect( this, TQT_SIGNAL( totalTimesChanged ( long, long ) ),
+ listView(), TQT_SLOT( taskTotalTimesChanged( long, long) ));
- connect( this, SIGNAL( deletingTask( Task* ) ),
- listView(), SLOT( deletingTask( Task* ) ));
+ connect( this, TQT_SIGNAL( deletingTask( Task* ) ),
+ listView(), TQT_SLOT( deletingTask( Task* ) ));
if (icons == 0) {
- icons = new QPtrVector<QPixmap>(8);
+ icons = new TQPtrVector<TQPixmap>(8);
KIconLoader kil("karm"); // always load icons from the KArm application
for (int i=0; i<8; i++)
{
- QPixmap *icon = new QPixmap();
- QString name;
+ TQPixmap *icon = new TQPixmap();
+ TQString name;
name.sprintf("watch-%d.xpm",i);
*icon = kil.loadIcon( name, KIcon::User );
icons->insert(i,icon);
@@ -75,13 +75,13 @@ void Task::init( const QString& taskName, long minutes, long sessionTime,
_removing = false;
_name = taskName.stripWhiteSpace();
- _lastStart = QDateTime::currentDateTime();
+ _lastStart = TQDateTime::currentDateTime();
_totalTime = _time = minutes;
_totalSessionTime = _sessionTime = sessionTime;
- _timer = new QTimer(this);
+ _timer = new TQTimer(this);
_desktops = desktops;
- connect(_timer, SIGNAL(timeout()), this, SLOT(updateActiveIcon()));
- setPixmap(1, UserIcon(QString::fromLatin1("empty-watch.xpm")));
+ connect(_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateActiveIcon()));
+ setPixmap(1, UserIcon(TQString::fromLatin1("empty-watch.xpm")));
_currentPic = 0;
_percentcomplete = percent_complete;
@@ -94,7 +94,7 @@ Task::~Task() {
delete _timer;
}
-void Task::setRunning( bool on, KarmStorage* storage, QDateTime whenStarted, QDateTime whenStopped )
+void Task::setRunning( bool on, KarmStorage* storage, TQDateTime whenStarted, TQDateTime whenStopped )
// Sets a task running or stopped. If the task is to be stopped, whenStarted is not evaluated.
// on=true if the task shall be started on=false if the task shall be stopped
// This is the back-end, the front-end is StartTimerFor()
@@ -119,13 +119,13 @@ void Task::setRunning( bool on, KarmStorage* storage, QDateTime whenStarted, QDa
if ( ! _removing )
{
storage->stopTimer(this, whenStopped);
- setPixmap(1, UserIcon(QString::fromLatin1("empty-watch.xpm")));
+ setPixmap(1, UserIcon(TQString::fromLatin1("empty-watch.xpm")));
}
}
}
}
-void Task::setUid(QString uid) {
+void Task::setUid(TQString uid) {
_uid = uid;
}
@@ -134,11 +134,11 @@ bool Task::isRunning() const
return _timer->isActive();
}
-void Task::setName( const QString& name, KarmStorage* storage )
+void Task::setName( const TQString& name, KarmStorage* storage )
{
kdDebug(5970) << "Task:setName: " << name << endl;
- QString oldname = _name;
+ TQString oldname = _name;
if ( oldname != name ) {
_name = name;
storage->setName(this, oldname);
@@ -183,7 +183,7 @@ void Task::setPercentComplete(const int percent, KarmStorage *storage)
void Task::setPixmapProgress()
{
- QPixmap* icon = new QPixmap();
+ TQPixmap* icon = new TQPixmap();
if (_percentcomplete >= 100)
*icon = UserIcon("task-complete.xpm");
else
@@ -255,7 +255,7 @@ void Task::changeParentTotalTimes( long minutesSession, long minutes )
parent()->changeTotalTimes( minutesSession, minutes );
}
-bool Task::remove( QPtrList<Task>& activeTasks, KarmStorage* storage)
+bool Task::remove( TQPtrList<Task>& activeTasks, KarmStorage* storage)
{
kdDebug(5970) << "Task::remove: " << _name << endl;
@@ -285,12 +285,12 @@ void Task::updateActiveIcon()
setPixmap(1, *(*icons)[_currentPic]);
}
-QString Task::fullName() const
+TQString Task::fullName() const
{
if (isRoot())
return name();
else
- return parent()->fullName() + QString::fromLatin1("/") + name();
+ return parent()->fullName() + TQString::fromLatin1("/") + name();
}
KCal::Todo* Task::asTodo(KCal::Todo* todo) const
@@ -307,15 +307,15 @@ KCal::Todo* Task::asTodo(KCal::Todo* todo) const
// todo->setDtStart( current );
todo->setCustomProperty( kapp->instanceName(),
- QCString( "totalTaskTime" ), QString::number( _time ) );
+ TQCString( "totalTaskTime" ), TQString::number( _time ) );
todo->setCustomProperty( kapp->instanceName(),
- QCString( "totalSessionTime" ), QString::number( _sessionTime) );
+ TQCString( "totalSessionTime" ), TQString::number( _sessionTime) );
if (getDesktopStr().isEmpty())
- todo->removeCustomProperty(kapp->instanceName(), QCString("desktopList"));
+ todo->removeCustomProperty(kapp->instanceName(), TQCString("desktopList"));
else
todo->setCustomProperty( kapp->instanceName(),
- QCString( "desktopList" ), getDesktopStr() );
+ TQCString( "desktopList" ), getDesktopStr() );
todo->setOrganizer( Preferences::instance()->userRealName() );
@@ -325,7 +325,7 @@ KCal::Todo* Task::asTodo(KCal::Todo* todo) const
}
bool Task::parseIncidence( KCal::Incidence* incident, long& minutes,
- long& sessionMinutes, QString& name, DesktopList& desktops,
+ long& sessionMinutes, TQString& name, DesktopList& desktops,
int& percent_complete )
{
bool ok;
@@ -337,23 +337,23 @@ bool Task::parseIncidence( KCal::Incidence* incident, long& minutes,
ok = false;
minutes = incident->customProperty( kapp->instanceName(),
- QCString( "totalTaskTime" )).toInt( &ok );
+ TQCString( "totalTaskTime" )).toInt( &ok );
if ( !ok )
minutes = 0;
ok = false;
sessionMinutes = incident->customProperty( kapp->instanceName(),
- QCString( "totalSessionTime" )).toInt( &ok );
+ TQCString( "totalSessionTime" )).toInt( &ok );
if ( !ok )
sessionMinutes = 0;
- QString desktopList = incident->customProperty( kapp->instanceName(),
- QCString( "desktopList" ) );
- QStringList desktopStrList = QStringList::split( QString::fromLatin1(","),
+ TQString desktopList = incident->customProperty( kapp->instanceName(),
+ TQCString( "desktopList" ) );
+ TQStringList desktopStrList = TQStringList::split( TQString::fromLatin1(","),
desktopList );
desktops.clear();
- for ( QStringList::iterator iter = desktopStrList.begin();
+ for ( TQStringList::iterator iter = desktopStrList.begin();
iter != desktopStrList.end();
++iter ) {
int desktopInt = (*iter).toInt( &ok );
@@ -371,16 +371,16 @@ bool Task::parseIncidence( KCal::Incidence* incident, long& minutes,
return true;
}
-QString Task::getDesktopStr() const
+TQString Task::getDesktopStr() const
{
if ( _desktops.empty() )
- return QString();
+ return TQString();
- QString desktopstr;
+ TQString desktopstr;
for ( DesktopList::const_iterator iter = _desktops.begin();
iter != _desktops.end();
++iter ) {
- desktopstr += QString::number( *iter ) + QString::fromLatin1( "," );
+ desktopstr += TQString::number( *iter ) + TQString::fromLatin1( "," );
}
desktopstr.remove( desktopstr.length() - 1, 1 );
return desktopstr;
@@ -417,18 +417,18 @@ void Task::update()
setText(4, formatTime(_totalTime));
}
-void Task::addComment( QString comment, KarmStorage* storage )
+void Task::addComment( TQString comment, KarmStorage* storage )
{
- _comment = _comment + QString::fromLatin1("\n") + comment;
+ _comment = _comment + TQString::fromLatin1("\n") + comment;
storage->addComment(this, comment);
}
-QString Task::comment() const
+TQString Task::comment() const
{
return _comment;
}
-int Task::compare ( QListViewItem * i, int col, bool ascending ) const
+int Task::compare ( TQListViewItem * i, int col, bool ascending ) const
{
long thistime = 0;
long thattime = 0;
diff --git a/karm/task.h b/karm/task.h
index 8a9ca7833..37e75f12a 100644
--- a/karm/task.h
+++ b/karm/task.h
@@ -1,13 +1,13 @@
#ifndef KARM_TASK_H
#define KARM_TASK_H
-// Required b/c QPtrList is a struct, not a class.
-#include <qptrlist.h>
+// Required b/c TQPtrList is a struct, not a class.
+#include <tqptrlist.h>
-// Requred b/c/ QPtrVector is a template (?)
-#include <qptrvector.h>
+// Requred b/c/ TQPtrVector is a template (?)
+#include <tqptrvector.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
// Required b/c DesktopList is a typedef not a class.
#include "desktoplist.h"
@@ -38,17 +38,17 @@ class QPixmap;
* too.
*
* It can also contain subtasks - these are managed using the
- * QListViewItem class.
+ * TQListViewItem class.
*/
-class Task : public QObject, public QListViewItem
+class Task : public TQObject, public QListViewItem
{
Q_OBJECT
public:
//@{ constructors
- Task( const QString& taskame, long minutes, long sessionTime,
+ Task( const TQString& taskame, long minutes, long sessionTime,
DesktopList desktops, TaskView* parent = 0);
- Task( const QString& taskame, long minutes, long sessionTime,
+ Task( const TQString& taskame, long minutes, long sessionTime,
DesktopList desktops, Task* parent = 0);
Task( KCal::Todo* incident, TaskView* parent );
//@}
@@ -56,11 +56,11 @@ class Task : public QObject, public QListViewItem
~Task();
/** return parent Task or null in case of TaskView.
- * same as QListViewItem::parent()
+ * same as TQListViewItem::parent()
*/
- Task* firstChild() const { return (Task*)QListViewItem::firstChild(); }
- Task* nextSibling() const { return (Task*)QListViewItem::nextSibling(); }
- Task* parent() const { return (Task*)QListViewItem::parent(); }
+ Task* firstChild() const { return (Task*)TQListViewItem::firstChild(); }
+ Task* nextSibling() const { return (Task*)TQListViewItem::nextSibling(); }
+ Task* parent() const { return (Task*)TQListViewItem::parent(); }
/** Return task view for this task */
TaskView* taskView() const {
@@ -68,7 +68,7 @@ class Task : public QObject, public QListViewItem
}
/** Return unique iCalendar Todo ID for this task. */
- QString uid() const { return _uid; }
+ TQString uid() const { return _uid; }
/**
* Set unique id for the task.
@@ -77,7 +77,7 @@ class Task : public QObject, public QListViewItem
*
* @param uid The new unique id.
*/
- void setUid(const QString uid);
+ void setUid(const TQString uid);
/** cut Task out of parent Task or the TaskView */
void cut();
@@ -88,7 +88,7 @@ class Task : public QObject, public QListViewItem
void paste(Task* destination);
/** Sort times numerically, not alphabetically. */
- int compare ( QListViewItem * i, int col, bool ascending ) const;
+ int compare ( TQListViewItem * i, int col, bool ascending ) const;
//@{ timing related functions
@@ -135,7 +135,7 @@ class Task : public QObject, public QListViewItem
/**
* Return time the task was started.
*/
- QDateTime startTime() const { return _lastStart; };
+ TQDateTime startTime() const { return _lastStart; };
/** sets session time to zero. */
void startNewSession() { changeTimes( -_sessionTime, 0 ); };
@@ -146,7 +146,7 @@ class Task : public QObject, public QListViewItem
void setDesktopList ( DesktopList dl );
DesktopList getDesktops() const { return _desktops;}
- QString getDesktopStr() const;
+ TQString getDesktopStr() const;
//@}
//@{ name related functions
@@ -155,19 +155,19 @@ class Task : public QObject, public QListViewItem
* @param name a pointer to the name. A deep copy will be made.
* @param storage a pointer to a KarmStorage object.
*/
- void setName( const QString& name, KarmStorage* storage );
+ void setName( const TQString& name, KarmStorage* storage );
/** returns the name of this task.
* @return a pointer to the name.
*/
- QString name() const { return _name; };
+ TQString name() const { return _name; };
/**
* Returns that task name, prefixed by parent tree up to root.
*
* Task names are seperated by a forward slash: /
*/
- QString fullName() const;
+ TQString fullName() const;
//@}
/** Update the display of the task (all columns) in the UI. */
@@ -179,11 +179,11 @@ class Task : public QObject, public QListViewItem
* @param on true or false for starting or stopping a task
* @param storage a pointer to a KarmStorage object.
* @param whenStarted time when the task was started. Normally
- QDateTime::currentDateTime, but if calendar has
+ TQDateTime::currentDateTime, but if calendar has
been changed by another program and being reloaded
the task is set to running with another start date
*/
- void setRunning( bool on, KarmStorage* storage, QDateTime whenStarted=QDateTime::currentDateTime(), QDateTime whenStopped=QDateTime::currentDateTime());
+ void setRunning( bool on, KarmStorage* storage, TQDateTime whenStarted=TQDateTime::currentDateTime(), TQDateTime whenStopped=TQDateTime::currentDateTime());
/** return the state of a task - if it's running or not
* @return true or false depending on whether the task is running
@@ -192,7 +192,7 @@ class Task : public QObject, public QListViewItem
//@}
bool parseIncidence(KCal::Incidence*, long& minutes,
- long& sessionMinutes, QString& name, DesktopList& desktops,
+ long& sessionMinutes, TQString& name, DesktopList& desktops,
int& percent_complete);
/**
@@ -201,10 +201,10 @@ class Task : public QObject, public QListViewItem
KCal::Todo* asTodo(KCal::Todo* calendar) const;
/** Add a comment to this task. */
- void addComment( QString comment, KarmStorage* storage );
+ void addComment( TQString comment, KarmStorage* storage );
/** Retrieve the entire comment for the task. */
- QString comment() const;
+ TQString comment() const;
/** tells you whether this task is the root of the task tree */
bool isRoot() const { return parent() == 0; }
@@ -213,7 +213,7 @@ class Task : public QObject, public QListViewItem
* @param activeTasks - list of aktive tasks
* @param storage a pointer to a KarmStorage object.
*/
- bool remove( QPtrList<Task>& activeTasks, KarmStorage* storage );
+ bool remove( TQPtrList<Task>& activeTasks, KarmStorage* storage );
/**
* Update percent complete for this task.
@@ -236,7 +236,7 @@ class Task : public QObject, public QListViewItem
void removeFromView();
/** delivers when the task was started last */
- QDateTime lastStart() { return _lastStart; }
+ TQDateTime lastStart() { return _lastStart; }
protected:
void changeParentTotalTimes( long minutesSession, long minutes );
@@ -253,10 +253,10 @@ class Task : public QObject, public QListViewItem
private:
/** The iCal unique ID of the Todo for this task. */
- QString _uid;
+ TQString _uid;
/** The comment associated with this Task. */
- QString _comment;
+ TQString _comment;
int _percentcomplete;
@@ -266,15 +266,15 @@ class Task : public QObject, public QListViewItem
void noNegativeTimes();
/** initialize a task */
- void init( const QString& taskame, long minutes, long sessionTime,
+ void init( const TQString& taskame, long minutes, long sessionTime,
DesktopList desktops, int percent_complete);
/** task name */
- QString _name;
+ TQString _name;
/** Last time this task was started. */
- QDateTime _lastStart;
+ TQDateTime _lastStart;
//@{ totals of the whole subtree including self
long _totalTime;
@@ -286,9 +286,9 @@ class Task : public QObject, public QListViewItem
long _sessionTime;
//@}
DesktopList _desktops;
- QTimer *_timer;
+ TQTimer *_timer;
int _currentPic;
- static QPtrVector<QPixmap> *icons;
+ static TQPtrVector<TQPixmap> *icons;
/** Don't need to update storage when deleting task from list. */
bool _removing;
diff --git a/karm/taskview.cpp b/karm/taskview.cpp
index 590744408..0af5c7bd4 100644
--- a/karm/taskview.cpp
+++ b/karm/taskview.cpp
@@ -1,14 +1,14 @@
-#include <qclipboard.h>
-#include <qfile.h>
-#include <qlayout.h>
-#include <qlistbox.h>
-#include <qlistview.h>
-#include <qptrlist.h>
-#include <qptrstack.h>
-#include <qstring.h>
-#include <qtextstream.h>
-#include <qtimer.h>
-#include <qxml.h>
+#include <tqclipboard.h>
+#include <tqfile.h>
+#include <tqlayout.h>
+#include <tqlistbox.h>
+#include <tqlistview.h>
+#include <tqptrlist.h>
+#include <tqptrstack.h>
+#include <tqstring.h>
+#include <tqtextstream.h>
+#include <tqtimer.h>
+#include <tqxml.h>
#include "kapplication.h" // kapp
#include <kconfig.h>
@@ -37,15 +37,15 @@
class DesktopTracker;
-TaskView::TaskView(QWidget *parent, const char *name, const QString &icsfile ):KListView(parent,name)
+TaskView::TaskView(TQWidget *parent, const char *name, const TQString &icsfile ):KListView(parent,name)
{
_preferences = Preferences::instance( icsfile );
_storage = KarmStorage::instance();
- connect( this, SIGNAL( expanded( QListViewItem * ) ),
- this, SLOT( itemStateChanged( QListViewItem * ) ) );
- connect( this, SIGNAL( collapsed( QListViewItem * ) ),
- this, SLOT( itemStateChanged( QListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( expanded( TQListViewItem * ) ),
+ this, TQT_SLOT( itemStateChanged( TQListViewItem * ) ) );
+ connect( this, TQT_SIGNAL( collapsed( TQListViewItem * ) ),
+ this, TQT_SLOT( itemStateChanged( TQListViewItem * ) ) );
// setup default values
previousColumnWidths[0] = previousColumnWidths[1]
@@ -64,50 +64,50 @@ TaskView::TaskView(QWidget *parent, const char *name, const QString &icsfile ):K
setAllColumnsShowFocus( true );
// set up the minuteTimer
- _minuteTimer = new QTimer(this);
- connect( _minuteTimer, SIGNAL( timeout() ), this, SLOT( minuteUpdate() ));
+ _minuteTimer = new TQTimer(this);
+ connect( _minuteTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( minuteUpdate() ));
_minuteTimer->start(1000 * secsPerMinute);
// React when user changes iCalFile
- connect(_preferences, SIGNAL(iCalFile(QString)),
- this, SLOT(iCalFileChanged(QString)));
+ connect(_preferences, TQT_SIGNAL(iCalFile(TQString)),
+ this, TQT_SLOT(iCalFileChanged(TQString)));
// resize columns when config is changed
- connect(_preferences, SIGNAL( setupChanged() ), this,SLOT( adaptColumns() ));
+ connect(_preferences, TQT_SIGNAL( setupChanged() ), this,TQT_SLOT( adaptColumns() ));
_minuteTimer->start(1000 * secsPerMinute);
// Set up the idle detection.
_idleTimeDetector = new IdleTimeDetector( _preferences->idlenessTimeout() );
- connect( _idleTimeDetector, SIGNAL( extractTime(int) ),
- this, SLOT( extractTime(int) ));
- connect( _idleTimeDetector, SIGNAL( stopAllTimersAt(QDateTime) ),
- this, SLOT( stopAllTimersAt(QDateTime) ));
- connect( _preferences, SIGNAL( idlenessTimeout(int) ),
- _idleTimeDetector, SLOT( setMaxIdle(int) ));
- connect( _preferences, SIGNAL( detectIdleness(bool) ),
- _idleTimeDetector, SLOT( toggleOverAllIdleDetection(bool) ));
+ connect( _idleTimeDetector, TQT_SIGNAL( extractTime(int) ),
+ this, TQT_SLOT( extractTime(int) ));
+ connect( _idleTimeDetector, TQT_SIGNAL( stopAllTimersAt(TQDateTime) ),
+ this, TQT_SLOT( stopAllTimersAt(TQDateTime) ));
+ connect( _preferences, TQT_SIGNAL( idlenessTimeout(int) ),
+ _idleTimeDetector, TQT_SLOT( setMaxIdle(int) ));
+ connect( _preferences, TQT_SIGNAL( detectIdleness(bool) ),
+ _idleTimeDetector, TQT_SLOT( toggleOverAllIdleDetection(bool) ));
if (!_idleTimeDetector->isIdleDetectionPossible())
_preferences->disableIdleDetection();
// Setup auto save timer
- _autoSaveTimer = new QTimer(this);
- connect( _preferences, SIGNAL( autoSave(bool) ),
- this, SLOT( autoSaveChanged(bool) ));
- connect( _preferences, SIGNAL( autoSavePeriod(int) ),
- this, SLOT( autoSavePeriodChanged(int) ));
- connect( _autoSaveTimer, SIGNAL( timeout() ), this, SLOT( save() ));
+ _autoSaveTimer = new TQTimer(this);
+ connect( _preferences, TQT_SIGNAL( autoSave(bool) ),
+ this, TQT_SLOT( autoSaveChanged(bool) ));
+ connect( _preferences, TQT_SIGNAL( autoSavePeriod(int) ),
+ this, TQT_SLOT( autoSavePeriodChanged(int) ));
+ connect( _autoSaveTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( save() ));
// Setup manual save timer (to save changes a little while after they happen)
- _manualSaveTimer = new QTimer(this);
- connect( _manualSaveTimer, SIGNAL( timeout() ), this, SLOT( save() ));
+ _manualSaveTimer = new TQTimer(this);
+ connect( _manualSaveTimer, TQT_SIGNAL( timeout() ), this, TQT_SLOT( save() ));
// Connect desktop tracker events to task starting/stopping
_desktopTracker = new DesktopTracker();
- connect( _desktopTracker, SIGNAL( reachedtActiveDesktop( Task* ) ),
- this, SLOT( startTimerFor(Task*) ));
- connect( _desktopTracker, SIGNAL( leftActiveDesktop( Task* ) ),
- this, SLOT( stopTimerFor(Task*) ));
+ connect( _desktopTracker, TQT_SIGNAL( reachedtActiveDesktop( Task* ) ),
+ this, TQT_SLOT( startTimerFor(Task*) ));
+ connect( _desktopTracker, TQT_SIGNAL( leftActiveDesktop( Task* ) ),
+ this, TQT_SLOT( stopTimerFor(Task*) ));
new TaskViewWhatsThis( this );
}
@@ -116,7 +116,7 @@ KarmStorage* TaskView::storage()
return _storage;
}
-void TaskView::contentsMousePressEvent ( QMouseEvent * e )
+void TaskView::contentsMousePressEvent ( TQMouseEvent * e )
{
kdDebug(5970) << "entering contentsMousePressEvent" << endl;
KListView::contentsMousePressEvent(e);
@@ -139,7 +139,7 @@ void TaskView::contentsMousePressEvent ( QMouseEvent * e )
}
}
-void TaskView::contentsMouseDoubleClickEvent ( QMouseEvent * e )
+void TaskView::contentsMouseDoubleClickEvent ( TQMouseEvent * e )
// if the user double-clicks onto a tasks, he says "I am now working exclusively
// on that task". That means, on a doubleclick, we check if it occurs on an item
// not in the blank space, if yes, stop all other tasks and start the new timer.
@@ -184,12 +184,12 @@ Task* TaskView::item_at_index(int i)
return static_cast<Task*>(itemAtIndex(i));
}
-void TaskView::load( QString fileName )
+void TaskView::load( TQString fileName )
{
// if the program is used as an embedded plugin for konqueror, there may be a need
// to load from a file without touching the preferences.
_isloading = true;
- QString err = _storage->load(this, _preferences, fileName);
+ TQString err = _storage->load(this, _preferences, fileName);
if (!err.isEmpty())
{
@@ -207,13 +207,13 @@ void TaskView::load( QString fileName )
setSelected(first_child(), true);
setCurrentItem(first_child());
- if ( _desktopTracker->startTracking() != QString() )
+ if ( _desktopTracker->startTracking() != TQString() )
KMessageBox::error( 0, i18n("You are on a too high logical desktop, desktop tracking will not work") );
_isloading = false;
refresh();
}
-void TaskView::restoreItemState( QListViewItem *item )
+void TaskView::restoreItemState( TQListViewItem *item )
{
while( item )
{
@@ -224,7 +224,7 @@ void TaskView::restoreItemState( QListViewItem *item )
}
}
-void TaskView::itemStateChanged( QListViewItem *item )
+void TaskView::itemStateChanged( TQListViewItem *item )
{
if ( !item || _isloading ) return;
Task *t = (Task *)item;
@@ -278,10 +278,10 @@ void TaskView::loadFromFlatFile()
//KFileDialog::getSaveFileName("icalout.ics",i18n("*.ics|ICalendars"),this);
- QString fileName(KFileDialog::getOpenFileName(QString::null, QString::null,
+ TQString fileName(KFileDialog::getOpenFileName(TQString::null, TQString::null,
0));
if (!fileName.isEmpty()) {
- QString err = _storage->loadFromFlatFile(this, fileName);
+ TQString err = _storage->loadFromFlatFile(this, fileName);
if (!err.isEmpty())
{
KMessageBox::error(this, err);
@@ -300,26 +300,26 @@ void TaskView::loadFromFlatFile()
setSelected(first_child(), true);
setCurrentItem(first_child());
- if ( _desktopTracker->startTracking() != QString() )
+ if ( _desktopTracker->startTracking() != TQString() )
KMessageBox::error(0, i18n("You are on a too high logical desktop, desktop tracking will not work") );
}
}
-QString TaskView::importPlanner(QString fileName)
+TQString TaskView::importPlanner(TQString fileName)
{
kdDebug(5970) << "entering importPlanner" << endl;
PlannerParser* handler=new PlannerParser(this);
- if (fileName.isEmpty()) fileName=KFileDialog::getOpenFileName(QString::null, QString::null, 0);
- QFile xmlFile( fileName );
- QXmlInputSource source( xmlFile );
- QXmlSimpleReader reader;
+ if (fileName.isEmpty()) fileName=KFileDialog::getOpenFileName(TQString::null, TQString::null, 0);
+ TQFile xmlFile( fileName );
+ TQXmlInputSource source( xmlFile );
+ TQXmlSimpleReader reader;
reader.setContentHandler( handler );
reader.parse( source );
refresh();
return "";
}
-QString TaskView::report( const ReportCriteria& rc )
+TQString TaskView::report( const ReportCriteria& rc )
{
return _storage->report( this, rc );
}
@@ -333,15 +333,15 @@ void TaskView::exportcsvFile()
dialog.enableTasksToExportQuestion();
dialog.urlExportTo->KURLRequester::setMode(KFile::File);
if ( dialog.exec() ) {
- QString err = _storage->report( this, dialog.reportCriteria() );
+ TQString err = _storage->report( this, dialog.reportCriteria() );
if ( !err.isEmpty() ) KMessageBox::error( this, i18n(err.ascii()) );
}
}
-QString TaskView::exportcsvHistory()
+TQString TaskView::exportcsvHistory()
{
kdDebug(5970) << "TaskView::exportcsvHistory()" << endl;
- QString err;
+ TQString err;
CSVExportDialog dialog( ReportCriteria::CSVHistoryExport, this );
if ( current_item() && current_item()->isRoot() )
@@ -362,11 +362,11 @@ void TaskView::scheduleSave()
Preferences* TaskView::preferences() { return _preferences; }
-QString TaskView::save()
+TQString TaskView::save()
// This saves the tasks. If they do not yet have an endDate, their startDate is also not saved.
{
kdDebug(5970) << "Entering TaskView::save" << endl;
- QString err = _storage->save(this);
+ TQString err = _storage->save(this);
emit(setStatusBar(err));
return err;
}
@@ -383,10 +383,10 @@ long TaskView::count()
return n;
}
-void TaskView::startTimerFor(Task* task, QDateTime startTime )
+void TaskView::startTimerFor(Task* task, TQDateTime startTime )
{
kdDebug(5970) << "Entering TaskView::startTimerFor" << endl;
- if (save()==QString())
+ if (save()==TQString())
{
if (task != 0 && activeTasks.findRef(task) == -1)
{
@@ -423,7 +423,7 @@ void TaskView::stopAllTimers()
emit tasksChanged( activeTasks );
}
-void TaskView::stopAllTimersAt(QDateTime qdt)
+void TaskView::stopAllTimersAt(TQDateTime qdt)
// stops all timers for the time qdt. This makes sense, if the idletimedetector detected
// the last work has been done 50 minutes ago.
{
@@ -443,7 +443,7 @@ void TaskView::stopAllTimersAt(QDateTime qdt)
void TaskView::startNewSession()
{
- QListViewItemIterator item( first_child());
+ TQListViewItemIterator item( first_child());
for ( ; item.current(); ++item ) {
Task * task = (Task *) item.current();
task->startNewSession();
@@ -452,7 +452,7 @@ void TaskView::startNewSession()
void TaskView::resetTimeForAllTasks()
{
- QListViewItemIterator item( first_child());
+ TQListViewItemIterator item( first_child());
for ( ; item.current(); ++item ) {
Task * task = (Task *) item.current();
task->resetTimes();
@@ -495,15 +495,15 @@ void TaskView::newTask()
newTask(i18n("New Task"), 0);
}
-void TaskView::newTask(QString caption, Task *parent)
+void TaskView::newTask(TQString caption, Task *parent)
{
EditTaskDialog *dialog = new EditTaskDialog(caption, false);
long total, totalDiff, session, sessionDiff;
DesktopList desktopList;
int result = dialog->exec();
- if ( result == QDialog::Accepted ) {
- QString taskName = i18n( "Unnamed Task" );
+ if ( result == TQDialog::Accepted ) {
+ TQString taskName = i18n( "Unnamed Task" );
if ( !dialog->taskName().isEmpty()) taskName = dialog->taskName();
total = totalDiff = session = sessionDiff = 0;
@@ -514,7 +514,7 @@ void TaskView::newTask(QString caption, Task *parent)
if ( desktopList.size() == ( unsigned int ) _desktopTracker->desktopCount() )
desktopList.clear();
- QString uid = addTask( taskName, total, session, desktopList, parent );
+ TQString uid = addTask( taskName, total, session, desktopList, parent );
if ( uid.isNull() )
{
KMessageBox::error( 0, i18n(
@@ -525,8 +525,8 @@ void TaskView::newTask(QString caption, Task *parent)
}
}
-QString TaskView::addTask
-( const QString& taskname, long total, long session,
+TQString TaskView::addTask
+( const TQString& taskname, long total, long session,
const DesktopList& desktops, Task* parent )
{
Task *task;
@@ -536,7 +536,7 @@ QString TaskView::addTask
else task = new Task( taskname, total, session, desktops, this );
task->setUid( _storage->addTask( task, parent ) );
- QString taskuid=task->uid();
+ TQString taskuid=task->uid();
if ( ! taskuid.isNull() )
{
_desktopTracker->registerForDesktops( task, desktops );
@@ -574,8 +574,8 @@ void TaskView::editTask()
task->time(),
task->sessionTime() );
int result = dialog->exec();
- if (result == QDialog::Accepted) {
- QString taskName = i18n("Unnamed Task");
+ if (result == TQDialog::Accepted) {
+ TQString taskName = i18n("Unnamed Task");
if (!dialog->taskName().isEmpty()) {
taskName = dialog->taskName();
}
@@ -612,9 +612,9 @@ void TaskView::editTask()
// return;
// bool ok;
-// QString comment = KLineEditDlg::getText(i18n("Comment"),
+// TQString comment = KLineEditDlg::getText(i18n("Comment"),
// i18n("Log comment for task '%1':").arg(task->name()),
-// QString(), &ok, this);
+// TQString(), &ok, this);
// if ( ok )
// task->addComment( comment, _storage );
//}
@@ -681,7 +681,7 @@ void TaskView::deleteTask(bool markingascomplete)
}
else
{
- QString uid=task->uid();
+ TQString uid=task->uid();
task->remove(activeTasks, _storage);
task->removeFromView();
if( _preferences ) _preferences->deleteEntry( uid ); // forget if the item was expanded or collapsed
@@ -741,14 +741,14 @@ void TaskView::adaptColumns()
{
setColumnWidth( x, previousColumnWidths[x-1] );
previousColumnWidths[x-1] = HIDDEN_COLUMN;
- setColumnWidthMode( x, QListView::Maximum );
+ setColumnWidthMode( x, TQListView::Maximum );
}
// the column was visible before and were switching it off now
else
if( ! _preferences->displayColumn(x-1)
&& previousColumnWidths[x-1] == HIDDEN_COLUMN )
{
- setColumnWidthMode( x, QListView::Manual ); // we don't want update()
+ setColumnWidthMode( x, TQListView::Manual ); // we don't want update()
// to resize/unhide the col
previousColumnWidths[x-1] = columnWidth( x );
setColumnWidth( x, 0 );
@@ -766,7 +766,7 @@ void TaskView::deletingTask(Task* deletedTask)
emit tasksChanged( activeTasks);
}
-void TaskView::iCalFileChanged(QString file)
+void TaskView::iCalFileChanged(TQString file)
// User might have picked a new file in the preferences dialog.
// This is not iCalFileModified.
{
@@ -779,8 +779,8 @@ void TaskView::iCalFileChanged(QString file)
}
}
-QValueList<HistoryEvent> TaskView::getHistory(const QDate& from,
- const QDate& to) const
+TQValueList<HistoryEvent> TaskView::getHistory(const TQDate& from,
+ const TQDate& to) const
{
return _storage->getHistory(from, to);
}
@@ -860,7 +860,7 @@ void TaskView::clipSession()
void TaskView::clipHistory()
{
PrintDialog dialog;
- if (dialog.exec()== QDialog::Accepted)
+ if (dialog.exec()== TQDialog::Accepted)
{
TimeKard t;
KApplication::clipboard()->
diff --git a/karm/taskview.h b/karm/taskview.h
index f1cf78078..7b60f7e8f 100644
--- a/karm/taskview.h
+++ b/karm/taskview.h
@@ -1,9 +1,9 @@
#ifndef KARM_TASK_VIEW_H
#define KARM_TASK_VIEW_H
-#include <qdict.h>
-#include <qptrlist.h>
-#include <qptrstack.h>
+#include <tqdict.h>
+#include <tqptrlist.h>
+#include <tqptrstack.h>
#include <klistview.h>
@@ -12,7 +12,7 @@
#include "karmstorage.h"
#include "mainwindow.h"
#include "reportcriteria.h"
-#include <qtimer.h>
+#include <tqtimer.h>
//#include "desktoptracker.h"
//#include "karmutility.h"
@@ -44,7 +44,7 @@ class TaskView : public KListView
Q_OBJECT
public:
- TaskView( QWidget *parent = 0, const char *name = 0, const QString &icsfile = "" );
+ TaskView( TQWidget *parent = 0, const char *name = 0, const TQString &icsfile = "" );
virtual ~TaskView();
/** Return the first item in the view, cast to a Task pointer. */
@@ -57,7 +57,7 @@ class TaskView : public KListView
Task* item_at_index(int i);
/** Load the view from storage. */
- void load( QString filename="" );
+ void load( TQString filename="" );
/** Close the storage and release lock. */
void closeStorage();
@@ -72,7 +72,7 @@ class TaskView : public KListView
long count();
/** Return list of start/stop events for given date range. */
- QValueList<HistoryEvent> getHistory(const QDate& from, const QDate& to) const;
+ TQValueList<HistoryEvent> getHistory(const TQDate& from, const TQDate& to) const;
/** Schedule that we should save very soon */
void scheduleSave();
@@ -81,12 +81,12 @@ class TaskView : public KListView
Preferences *preferences();
/** Add a task to view and storage. */
- QString addTask( const QString& taskame, long total, long session, const DesktopList& desktops,
+ TQString addTask( const TQString& taskame, long total, long session, const DesktopList& desktops,
Task* parent = 0 );
public slots:
/** Save to persistent storage. */
- QString save();
+ TQString save();
/** Start the timer on the current item (task) in view. */
void startCurrentTimer();
@@ -98,13 +98,13 @@ class TaskView : public KListView
void stopAllTimers();
/** Stop all running timers as if it was qdt */
- void stopAllTimersAt(QDateTime qdt);
+ void stopAllTimersAt(TQDateTime qdt);
/** Calls newTask dialog with caption "New Task". */
void newTask();
/** Display edit task dialog and create a new task with results. */
- void newTask( QString caption, Task* parent );
+ void newTask( TQString caption, Task* parent );
/** Used to refresh (e.g. after import) */
void refresh();
@@ -113,16 +113,16 @@ class TaskView : public KListView
void loadFromFlatFile();
/** used to import tasks from imendio planner */
- QString importPlanner( QString fileName="" );
+ TQString importPlanner( TQString fileName="" );
/** call export function for csv totals or history */
- QString report( const ReportCriteria &rc );
+ TQString report( const ReportCriteria &rc );
/** Export comma separated values format for task time totals. */
void exportcsvFile();
/** Export comma-separated values format for task history. */
- QString exportcsvHistory();
+ TQString exportcsvHistory();
/** Calls newTask dialog with caption "New Sub Task". */
void newSubTask();
@@ -172,7 +172,7 @@ class TaskView : public KListView
* @param task task to start timer of
* @param startTime if taskview has been modified by another program, we
have to set the starting time to not-now. */
- void startTimerFor( Task* task, QDateTime startTime = QDateTime::currentDateTime() );
+ void startTimerFor( Task* task, TQDateTime startTime = TQDateTime::currentDateTime() );
void stopTimerFor( Task* task );
/** clears all active tasks. Needed e.g. if iCal file was modified by
@@ -183,7 +183,7 @@ class TaskView : public KListView
/** User might have picked a new iCalendar file on preferences screen.
Verify the file is not the same as before and load the new one.
This is not iCalFileModified. */
- void iCalFileChanged(QString file);
+ void iCalFileChanged(TQString file);
/** Copy totals for current and all sub tasks to clipboard. */
void clipTotals();
@@ -199,16 +199,16 @@ class TaskView : public KListView
void updateButtons();
void timersActive();
void timersInactive();
- void tasksChanged( QPtrList<Task> activeTasks );
- void setStatusBar( QString );
+ void tasksChanged( TQPtrList<Task> activeTasks );
+ void setStatusBar( TQString );
private: // member variables
IdleTimeDetector *_idleTimeDetector;
- QTimer *_minuteTimer;
- QTimer *_autoSaveTimer;
- QTimer *_manualSaveTimer;
+ TQTimer *_minuteTimer;
+ TQTimer *_autoSaveTimer;
+ TQTimer *_manualSaveTimer;
Preferences *_preferences;
- QPtrList<Task> activeTasks;
+ TQPtrList<Task> activeTasks;
int previousColumnWidths[4];
DesktopTracker* _desktopTracker;
bool _isloading;
@@ -217,20 +217,20 @@ class TaskView : public KListView
KarmStorage * _storage;
private:
- void contentsMousePressEvent ( QMouseEvent * e );
- void contentsMouseDoubleClickEvent ( QMouseEvent * e );
+ void contentsMousePressEvent ( TQMouseEvent * e );
+ void contentsMouseDoubleClickEvent ( TQMouseEvent * e );
void updateParents( Task* task, long totalDiff, long sesssionDiff);
void deleteChildTasks( Task *item );
void addTimeToActiveTasks( int minutes, bool save_data = true );
/** item state stores if a task is expanded so you can see the subtasks */
- void restoreItemState( QListViewItem *item );
+ void restoreItemState( TQListViewItem *item );
protected slots:
void autoSaveChanged( bool );
void autoSavePeriodChanged( int period );
void minuteUpdate();
/** item state stores if a task is expanded so you can see the subtasks */
- void itemStateChanged( QListViewItem *item );
+ void itemStateChanged( TQListViewItem *item );
/** React on another process having modified the iCal file we rely on. */
void iCalFileModified(ResourceCalendar *);
};
diff --git a/karm/taskviewwhatsthis.cpp b/karm/taskviewwhatsthis.cpp
index 9beb163df..72d640e9d 100644
--- a/karm/taskviewwhatsthis.cpp
+++ b/karm/taskviewwhatsthis.cpp
@@ -2,7 +2,7 @@
// C++ Implementation: taskviewwhatsthis
//
// Description:
-// This is a subclass of QWhatsThis, specially adapted for karm's taskview.
+// This is a subclass of TQWhatsThis, specially adapted for karm's taskview.
//
// Author: Thorsten Staerk <thorsten@staerk.de>, (C) 2005
//
@@ -14,8 +14,8 @@
#include <klistview.h>
#include <klocale.h>
-TaskViewWhatsThis::TaskViewWhatsThis( QWidget* qw )
- : QWhatsThis( qw )
+TaskViewWhatsThis::TaskViewWhatsThis( TQWidget* qw )
+ : TQWhatsThis( qw )
{
_listView=(KListView *) qw;
}
@@ -24,9 +24,9 @@ TaskViewWhatsThis::~TaskViewWhatsThis()
{
}
-QString TaskViewWhatsThis::text ( const QPoint & pos )
+TQString TaskViewWhatsThis::text ( const TQPoint & pos )
{
- QString desc = QString::null;
+ TQString desc = TQString::null;
kdDebug(5970) << "entering TaskViewWhatsThis::text" << endl;
kdDebug(5970) << "x-pos:" << pos.x() << endl;
if ( pos.x() < _listView->columnWidth( 0 ) )
diff --git a/karm/taskviewwhatsthis.h b/karm/taskviewwhatsthis.h
index af8a82969..65f40f9f5 100644
--- a/karm/taskviewwhatsthis.h
+++ b/karm/taskviewwhatsthis.h
@@ -10,7 +10,7 @@
#ifndef TASKVIEWWHATSTHIS_H
#define TASKVIEWWHATSTHIS_H
-#include <qwhatsthis.h>
+#include <tqwhatsthis.h>
#include <klistview.h>
/**
@@ -21,10 +21,10 @@ this is the karm-taskview-specific implementation of qwhatsthis
class TaskViewWhatsThis : public QWhatsThis
{
public:
- TaskViewWhatsThis( QWidget* );
+ TaskViewWhatsThis( TQWidget* );
~TaskViewWhatsThis();
- QString text ( const QPoint & );
+ TQString text ( const TQPoint & );
private:
KListView* _listView; // stores the associated listview for column widths
diff --git a/karm/test/lockerthread.cpp b/karm/test/lockerthread.cpp
index 6ec6e7ba2..914682210 100644
--- a/karm/test/lockerthread.cpp
+++ b/karm/test/lockerthread.cpp
@@ -1,5 +1,5 @@
-#include <qthread.h>
-#include <qstring.h>
+#include <tqthread.h>
+#include <tqstring.h>
#include <resourcecalendar.h>
#include <resourcelocal.h>
@@ -7,14 +7,14 @@
#include "lockerthread.h"
-LockerThread::LockerThread( const QString &icsfile )
+LockerThread::LockerThread( const TQString &icsfile )
{
m_gotlock = false;
m_icsfile = icsfile;
}
/*
-void LockerThread::setIcsFile( const QString &filename )
+void LockerThread::setIcsFile( const TQString &filename )
{
m_icsfile = filename;
}
@@ -26,7 +26,7 @@ void LockerThread::run()
KCal::ResourceCalendar *calendar = 0;
KCal::CalendarResources::Ticket *lock = 0;
- calendars = new KCal::CalendarResources( QString::fromLatin1( "UTC" ) );
+ calendars = new KCal::CalendarResources( TQString::fromLatin1( "UTC" ) );
calendar = new KCal::ResourceLocal( m_icsfile );
lock = calendars->requestSaveTicket( calendar );
if ( lock )
diff --git a/karm/test/lockerthread.h b/karm/test/lockerthread.h
index d40f234ad..95915b478 100644
--- a/karm/test/lockerthread.h
+++ b/karm/test/lockerthread.h
@@ -1,4 +1,4 @@
-#include <qthread.h>
+#include <tqthread.h>
class QString;
@@ -10,12 +10,12 @@ class QString;
class LockerThread : public QThread
{
public:
- LockerThread( const QString &filename );
- //void setIcsFile( const QString &filename );
+ LockerThread( const TQString &filename );
+ //void setIcsFile( const TQString &filename );
void run();
bool gotlock() const { return m_gotlock; };
private:
- QString m_icsfile;
+ TQString m_icsfile;
bool m_gotlock;
};
diff --git a/karm/test/locking.cpp b/karm/test/locking.cpp
index 49c7637d3..940a344d1 100644
--- a/karm/test/locking.cpp
+++ b/karm/test/locking.cpp
@@ -1,8 +1,8 @@
#include <assert.h>
-#include <qstring.h>
-#include <qfile.h>
-#include <qdir.h>
+#include <tqstring.h>
+#include <tqfile.h>
+#include <tqdir.h>
#include <kcmdlineargs.h>
#include <kapplication.h>
@@ -12,7 +12,7 @@
#include "lockerthread.h"
-const QString icalfilename = "karmtest.ics";
+const TQString icalfilename = "karmtest.ics";
// If one thread has the file is locked, the other cannot get the lock.
short test1()
@@ -23,7 +23,7 @@ short test1()
KCal::ResourceCalendar *calendar = 0;
KCal::CalendarResources::Ticket *lock = 0;
- calendars = new KCal::CalendarResources( QString::fromLatin1( "UTC" ) );
+ calendars = new KCal::CalendarResources( TQString::fromLatin1( "UTC" ) );
calendar = new KCal::ResourceLocal( icalfilename );
lock = calendars->requestSaveTicket( calendar );
@@ -62,7 +62,7 @@ short test2()
KCal::ResourceCalendar *calendar = 0;
KCal::CalendarResources::Ticket *lock = 0;
- calendars = new KCal::CalendarResources( QString::fromLatin1( "UTC" ) );
+ calendars = new KCal::CalendarResources( TQString::fromLatin1( "UTC" ) );
calendar = new KCal::ResourceLocal( icalfilename );
LockerThread thread( icalfilename );
@@ -88,7 +88,7 @@ short test3()
KCal::ResourceCalendar *calendar = 0;
KCal::CalendarResources::Ticket *lock = 0;
- calendars = new KCal::CalendarResources( QString::fromLatin1( "UTC" ) );
+ calendars = new KCal::CalendarResources( TQString::fromLatin1( "UTC" ) );
calendar = new KCal::ResourceLocal( icalfilename );
// lock then unlock
@@ -130,7 +130,7 @@ int main( int argc, char *argv[] )
// Use another directory than the real one, just to keep things clean
// KDEHOME needs to be writable though, for a ksycoca database
// FIXME: Delete this directory when done with test.
- setenv( "KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kde-testresource" ), true );
+ setenv( "KDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kde-testresource" ), true );
// Copied from Till's test in libkcal. Not sure what this is for.
setenv( "KDE_FORK_SLAVES", "yes", true ); // simpler, for the final cleanup
diff --git a/karm/test/runscripts.cpp b/karm/test/runscripts.cpp
index aa5449541..1b44f4821 100644
--- a/karm/test/runscripts.cpp
+++ b/karm/test/runscripts.cpp
@@ -18,32 +18,32 @@
*/
#include <kdebug.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtextstream.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtextstream.h>
#include "script.h"
-static QString srcdir();
+static TQString srcdir();
static int runscripts
-( const QString &interpreter, const QString &extension, const QString &path );
+( const TQString &interpreter, const TQString &extension, const TQString &path );
-const QString dots = "..................................................";
-const QString not_a_test_filename_prefix = "__";
+const TQString dots = "..................................................";
+const TQString not_a_test_filename_prefix = "__";
// Read srcdir from Makefile (for builddir != srcdir).
-QString srcdir()
+TQString srcdir()
{
bool found = false;
- QString dir;
+ TQString dir;
- QFile file( "Makefile" );
+ TQFile file( "Makefile" );
if ( !file.open( IO_ReadOnly | IO_Translate ) ) return "";
- QTextStream in( &file );
- QString line;
+ TQTextStream in( &file );
+ TQString line;
while ( !found && !in.atEnd() )
{
line = in.readLine();
@@ -60,29 +60,29 @@ QString srcdir()
}
int runscripts
-( const QString &interpreter, const QString &extension, const QString &path )
+( const TQString &interpreter, const TQString &extension, const TQString &path )
{
int rval = 0;
int oneBadApple = 0;
- QStringList files;
+ TQStringList files;
- QDir dir( path );
+ TQDir dir( path );
Script* s = new Script( dir );
dir.setNameFilter( extension );
- dir.setFilter( QDir::Files );
- dir.setSorting( QDir::Name | QDir::IgnoreCase );
+ dir.setFilter( TQDir::Files );
+ dir.setSorting( TQDir::Name | TQDir::IgnoreCase );
const QFileInfoList *list = dir.entryInfoList();
QFileInfoListIterator it( *list );
- QFileInfo *fi;
+ TQFileInfo *fi;
while ( !rval && ( fi = it.current() ) != 0 )
{
// Don't run scripts that are shared routines.
if ( ! fi->fileName().startsWith( not_a_test_filename_prefix ) )
{
s->addArgument( interpreter );
- s->addArgument( path + QDir::separator() + fi->fileName().latin1() );
+ s->addArgument( path + TQDir::separator() + fi->fileName().latin1() );
// Thorsten's xautomation tests run with user interaction by default.
if ( interpreter == "sh" ) s->addArgument( "--batch" );
@@ -116,7 +116,7 @@ int main( int, char** )
{
int rval = 0;
- QString path = srcdir();
+ TQString path = srcdir();
if ( !rval ) rval = runscripts( "python", "*.py *.Py *.PY *.pY", path );
diff --git a/karm/test/script.cpp b/karm/test/script.cpp
index 37fe058d3..f9fa9d9e0 100644
--- a/karm/test/script.cpp
+++ b/karm/test/script.cpp
@@ -17,11 +17,11 @@
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
-#include <qdir.h>
-#include <qprocess.h>
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qtimer.h>
+#include <tqdir.h>
+#include <tqprocess.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
+#include <tqtimer.h>
#include <kdebug.h>
@@ -38,23 +38,23 @@
// kill() doesn't let script interpreter try to clean up.
const int NICE_KILL_TIMEOUT_IN_SECS = 5;
-Script::Script( const QDir& workingDirectory )
+Script::Script( const TQDir& workingDirectory )
{
m_status = 0;
m_stderr = false;
m_timeoutInSeconds = 5;
- m_proc = new QProcess( this );
+ m_proc = new TQProcess( this );
m_proc->setWorkingDirectory( workingDirectory );
- connect ( m_proc, SIGNAL( readyReadStdout() ),
- this , SLOT ( stdout() )
+ connect ( m_proc, TQT_SIGNAL( readyReadStdout() ),
+ this , TQT_SLOT ( stdout() )
);
- connect ( m_proc, SIGNAL( readyReadStderr() ),
- this , SLOT ( stderr() )
+ connect ( m_proc, TQT_SIGNAL( readyReadStderr() ),
+ this , TQT_SLOT ( stderr() )
);
- connect ( m_proc, SIGNAL( processExited() ),
- this , SLOT ( exit() )
+ connect ( m_proc, TQT_SIGNAL( processExited() ),
+ this , TQT_SLOT ( exit() )
);
}
@@ -64,7 +64,7 @@ Script::~Script()
m_proc = 0;
}
-void Script::addArgument( const QString &arg )
+void Script::addArgument( const TQString &arg )
{
m_proc->addArgument( arg );
}
@@ -79,7 +79,7 @@ int Script::run()
{
m_proc->start();
// This didn't work. But Ctrl-C does. :P
- //QTimer::singleShot( m_timeoutInSeconds * 1000, m_proc, SLOT( kill() ) );
+ //TQTimer::singleShot( m_timeoutInSeconds * 1000, m_proc, TQT_SLOT( kill() ) );
//while ( ! m_proc->normalExit() );
while ( m_proc->isRunning() );
return m_status;
@@ -89,7 +89,7 @@ void Script::terminate()
{
// These both trigger processExited, so exit() will run.
m_proc->tryTerminate();
- QTimer::singleShot( NICE_KILL_TIMEOUT_IN_SECS*1000, m_proc, SLOT( kill() ) );
+ TQTimer::singleShot( NICE_KILL_TIMEOUT_IN_SECS*1000, m_proc, TQT_SLOT( kill() ) );
}
void Script::exit()
@@ -103,13 +103,13 @@ void Script::stderr()
{
// Treat any output to std err as a script failure
m_status = 1;
- QString data = QString( m_proc->readStderr() );
+ TQString data = TQString( m_proc->readStderr() );
m_stderr= true;
}
void Script::stdout()
{
- QString data = QString( m_proc->readStdout() );
+ TQString data = TQString( m_proc->readStdout() );
}
#include "script.moc"
diff --git a/karm/test/script.h b/karm/test/script.h
index f5ae1e227..318d2872b 100644
--- a/karm/test/script.h
+++ b/karm/test/script.h
@@ -20,8 +20,8 @@
#ifndef _script_h_
#define _script_h_
-//#include <qvariant.h>
-#include <qobject.h>
+//#include <tqvariant.h>
+#include <tqobject.h>
class QDir;
class QProcess;
@@ -32,9 +32,9 @@ class Script : public QObject
{
Q_OBJECT
public:
- Script( const QDir& workingDirectory );
+ Script( const TQDir& workingDirectory );
virtual ~Script();
- void addArgument( const QString &arg );
+ void addArgument( const TQString &arg );
void setTimeout( int seconds );
int run();
private slots:
@@ -43,7 +43,7 @@ private slots:
void stdout();
void terminate();
private:
- QProcess *m_proc;
+ TQProcess *m_proc;
int m_status;
bool m_stderr;
int m_timeoutInSeconds;
diff --git a/karm/timekard.cpp b/karm/timekard.cpp
index b7ff21f0e..984baf741 100644
--- a/karm/timekard.cpp
+++ b/karm/timekard.cpp
@@ -22,10 +22,10 @@
// #include <iostream>
-#include <qdatetime.h>
-#include <qpaintdevicemetrics.h>
-#include <qpainter.h>
-#include <qmap.h>
+#include <tqdatetime.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqpainter.h>
+#include <tqmap.h>
#include <kglobal.h>
#include <kdebug.h>
@@ -43,15 +43,15 @@ const int timeWidth = 6;
const int totalTimeWidth = 7;
const int reportWidth = taskWidth + timeWidth;
-const QString cr = QString::fromLatin1("\n");
+const TQString cr = TQString::fromLatin1("\n");
-QString TimeKard::totalsAsText(TaskView* taskview, bool justThisTask, WhichTime which)
+TQString TimeKard::totalsAsText(TaskView* taskview, bool justThisTask, WhichTime which)
// Print the total Times as text. If justThisTask, use activeTask, else, all tasks
{
kdDebug(5970) << "Entering TimeKard::totalsAsText" << endl;
- QString retval;
- QString line;
- QString buf;
+ TQString retval;
+ TQString line;
+ TQString buf;
long sum;
line.fill('-', reportWidth);
@@ -59,9 +59,9 @@ QString TimeKard::totalsAsText(TaskView* taskview, bool justThisTask, WhichTime
// header
retval += i18n("Task Totals") + cr;
- retval += KGlobal::locale()->formatDateTime(QDateTime::currentDateTime());
+ retval += KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime());
retval += cr + cr;
- retval += QString(QString::fromLatin1("%1 %2"))
+ retval += TQString(TQString::fromLatin1("%1 %2"))
.arg(i18n("Time"), timeWidth)
.arg(i18n("Task"));
retval += cr;
@@ -92,8 +92,8 @@ QString TimeKard::totalsAsText(TaskView* taskview, bool justThisTask, WhichTime
// total
buf.fill('-', reportWidth);
- retval += QString(QString::fromLatin1("%1")).arg(buf, timeWidth) + cr;
- retval += QString(QString::fromLatin1("%1 %2"))
+ retval += TQString(TQString::fromLatin1("%1")).arg(buf, timeWidth) + cr;
+ retval += TQString(TQString::fromLatin1("%1 %2"))
.arg(formatTime(sum),timeWidth)
.arg(i18n("Total"));
}
@@ -104,12 +104,12 @@ QString TimeKard::totalsAsText(TaskView* taskview, bool justThisTask, WhichTime
}
// Print out "<indent for level> <task total> <task>", for task and subtasks. Used by totalsAsText.
-void TimeKard::printTask(Task *task, QString &s, int level, WhichTime which)
+void TimeKard::printTask(Task *task, TQString &s, int level, WhichTime which)
{
- QString buf;
+ TQString buf;
s += buf.fill(' ', level);
- s += QString(QString::fromLatin1("%1 %2"))
+ s += TQString(TQString::fromLatin1("%1 %2"))
.arg(formatTime(which == TotalTime?task->totalTime():task->totalSessionTime()), timeWidth)
.arg(task->name());
s += cr;
@@ -125,17 +125,17 @@ void TimeKard::printTask(Task *task, QString &s, int level, WhichTime which)
}
void TimeKard::printTaskHistory(const Task *task,
- const QMap<QString,long>& taskdaytotals,
- QMap<QString,long>& daytotals,
- const QDate& from,
- const QDate& to,
- const int level, QString& s, bool totalsOnly)
+ const TQMap<TQString,long>& taskdaytotals,
+ TQMap<TQString,long>& daytotals,
+ const TQDate& from,
+ const TQDate& to,
+ const int level, TQString& s, bool totalsOnly)
{
long sectionsum = 0;
- for ( QDate day = from; day <= to; day = day.addDays(1) )
+ for ( TQDate day = from; day <= to; day = day.addDays(1) )
{
- QString daykey = day.toString(QString::fromLatin1("yyyyMMdd"));
- QString daytaskkey = QString::fromLatin1("%1_%2")
+ TQString daykey = day.toString(TQString::fromLatin1("yyyyMMdd"));
+ TQString daytaskkey = TQString::fromLatin1("%1_%2")
.arg(daykey)
.arg(task->uid());
@@ -143,7 +143,7 @@ void TimeKard::printTaskHistory(const Task *task,
{
if ( !totalsOnly )
{
- s += QString::fromLatin1("%1")
+ s += TQString::fromLatin1("%1")
.arg(formatTime(taskdaytotals[daytaskkey]/60), timeWidth);
}
sectionsum += taskdaytotals[daytaskkey]; // in seconds
@@ -155,19 +155,19 @@ void TimeKard::printTaskHistory(const Task *task,
}
else if ( !totalsOnly )
{
- QString buf;
+ TQString buf;
buf.fill(' ', timeWidth);
s += buf;
}
}
// Total for task this section (e.g. week)
- s += QString::fromLatin1("%1").arg(formatTime(sectionsum/60), totalTimeWidth);
+ s += TQString::fromLatin1("%1").arg(formatTime(sectionsum/60), totalTimeWidth);
// Task name
- QString buf;
+ TQString buf;
s += buf.fill(' ', level + 1);
- s += QString::fromLatin1("%1").arg(task->name());
+ s += TQString::fromLatin1("%1").arg(task->name());
s += cr;
for (Task* subTask = task->firstChild();
@@ -179,21 +179,21 @@ void TimeKard::printTaskHistory(const Task *task,
}
}
-QString TimeKard::sectionHistoryAsText(
+TQString TimeKard::sectionHistoryAsText(
TaskView* taskview,
- const QDate& sectionFrom, const QDate& sectionTo,
- const QDate& from, const QDate& to,
- const QString& name,
+ const TQDate& sectionFrom, const TQDate& sectionTo,
+ const TQDate& from, const TQDate& to,
+ const TQString& name,
bool justThisTask, bool totalsOnly)
{
const int sectionReportWidth = taskWidth + ( totalsOnly ? 0 : sectionFrom.daysTo(sectionTo) * timeWidth ) + totalTimeWidth;
assert( sectionReportWidth > 0 );
- QString line;
+ TQString line;
line.fill('-', sectionReportWidth);
line += cr;
- QValueList<HistoryEvent> events;
+ TQValueList<HistoryEvent> events;
if ( sectionFrom < from && sectionTo > to)
{
events = taskview->getHistory(from, to);
@@ -211,18 +211,18 @@ QString TimeKard::sectionHistoryAsText(
events = taskview->getHistory(sectionFrom, sectionTo);
}
- QMap<QString, long> taskdaytotals;
- QMap<QString, long> daytotals;
+ TQMap<TQString, long> taskdaytotals;
+ TQMap<TQString, long> daytotals;
// Build lookup dictionary used to output data in table cells. keys are
// in this format: YYYYMMDD_NNNNNN, where Y = year, M = month, d = day and
// NNNNN = the VTODO uid. The value is the total seconds logged against
// that task on that day. Note the UID is the todo id, not the event id,
// so times are accumulated for each task.
- for (QValueList<HistoryEvent>::iterator event = events.begin(); event != events.end(); ++event)
+ for (TQValueList<HistoryEvent>::iterator event = events.begin(); event != events.end(); ++event)
{
- QString daykey = (*event).start().date().toString(QString::fromLatin1("yyyyMMdd"));
- QString daytaskkey = QString::fromLatin1("%1_%2")
+ TQString daykey = (*event).start().date().toString(TQString::fromLatin1("yyyyMMdd"));
+ TQString daytaskkey = TQString::fromLatin1("%1_%2")
.arg(daykey)
.arg((*event).todoUid());
@@ -233,10 +233,10 @@ QString TimeKard::sectionHistoryAsText(
taskdaytotals.insert(daytaskkey, (*event).duration());
}
- QString retval;
+ TQString retval;
// section name (e.g. week name)
retval += cr + cr;
- QString buf;
+ TQString buf;
if ( name.length() < (unsigned int)sectionReportWidth )
buf.fill(' ', int((sectionReportWidth - name.length()) / 2));
retval += buf + name + cr;
@@ -244,9 +244,9 @@ QString TimeKard::sectionHistoryAsText(
if ( !totalsOnly )
{
// day headings
- for (QDate day = sectionFrom; day <= sectionTo; day = day.addDays(1))
+ for (TQDate day = sectionFrom; day <= sectionTo; day = day.addDays(1))
{
- retval += QString::fromLatin1("%1").arg(day.day(), timeWidth);
+ retval += TQString::fromLatin1("%1").arg(day.day(), timeWidth);
}
retval += cr;
retval += line;
@@ -278,15 +278,15 @@ QString TimeKard::sectionHistoryAsText(
// per-day totals at the bottom of the section
long sum = 0;
- for (QDate day = sectionFrom; day <= sectionTo; day = day.addDays(1))
+ for (TQDate day = sectionFrom; day <= sectionTo; day = day.addDays(1))
{
- QString daykey = day.toString(QString::fromLatin1("yyyyMMdd"));
+ TQString daykey = day.toString(TQString::fromLatin1("yyyyMMdd"));
if (daytotals.contains(daykey))
{
if ( !totalsOnly )
{
- retval += QString::fromLatin1("%1")
+ retval += TQString::fromLatin1("%1")
.arg(formatTime(daytotals[daykey]/60), timeWidth);
}
sum += daytotals[daykey]; // in seconds
@@ -298,18 +298,18 @@ QString TimeKard::sectionHistoryAsText(
}
}
- retval += QString::fromLatin1("%1 %2")
+ retval += TQString::fromLatin1("%1 %2")
.arg(formatTime(sum/60), totalTimeWidth)
.arg(i18n("Total"));
}
return retval;
}
-QString TimeKard::historyAsText(TaskView* taskview, const QDate& from,
- const QDate& to, bool justThisTask, bool perWeek, bool totalsOnly)
+TQString TimeKard::historyAsText(TaskView* taskview, const TQDate& from,
+ const TQDate& to, bool justThisTask, bool perWeek, bool totalsOnly)
{
// header
- QString retval;
+ TQString retval;
retval += totalsOnly ? i18n("Task Totals") : i18n("Task History");
retval += cr;
retval += i18n("From %1 to %2")
@@ -317,13 +317,13 @@ QString TimeKard::historyAsText(TaskView* taskview, const QDate& from,
.arg(KGlobal::locale()->formatDate(to));
retval += cr;
retval += i18n("Printed on: %1")
- .arg(KGlobal::locale()->formatDateTime(QDateTime::currentDateTime()));
+ .arg(KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime()));
if ( perWeek )
{
// output one time card table for each week in the date range
- QValueList<Week> weeks = Week::weeksFromDateRange(from, to);
- for (QValueList<Week>::iterator week = weeks.begin(); week != weeks.end(); ++week)
+ TQValueList<Week> weeks = Week::weeksFromDateRange(from, to);
+ for (TQValueList<Week>::iterator week = weeks.begin(); week != weeks.end(); ++week)
{
retval += sectionHistoryAsText( taskview, (*week).start(), (*week).end(), from, to, (*week).name(), justThisTask, totalsOnly );
}
@@ -336,37 +336,37 @@ QString TimeKard::historyAsText(TaskView* taskview, const QDate& from,
Week::Week() {}
-Week::Week(QDate from)
+Week::Week(TQDate from)
{
_start = from;
}
-QDate Week::start() const
+TQDate Week::start() const
{
return _start;
}
-QDate Week::end() const
+TQDate Week::end() const
{
return _start.addDays(6);
}
-QString Week::name() const
+TQString Week::name() const
{
return i18n("Week of %1").arg(KGlobal::locale()->formatDate(start()));
}
-QValueList<Week> Week::weeksFromDateRange(const QDate& from, const QDate& to)
+TQValueList<Week> Week::weeksFromDateRange(const TQDate& from, const TQDate& to)
{
- QDate start;
- QValueList<Week> weeks;
+ TQDate start;
+ TQValueList<Week> weeks;
- // The QDate weekNumber() method always puts monday as the first day of the
+ // The TQDate weekNumber() method always puts monday as the first day of the
// week.
//
// Not that it matters here, but week 1 always includes the first Thursday
// of the year. For example, January 1, 2000 was a Saturday, so
- // QDate(2000,1,1).weekNumber() returns 52.
+ // TQDate(2000,1,1).weekNumber() returns 52.
// Since report always shows a full week, we generate a full week of dates,
// even if from and to are the same date. The week starts on the day
@@ -374,7 +374,7 @@ QValueList<Week> Week::weeksFromDateRange(const QDate& from, const QDate& to)
start = from.addDays(
-((7 - KGlobal::locale()->weekStartDay() + from.dayOfWeek()) % 7));
- for (QDate d = start; d <= to; d = d.addDays(7))
+ for (TQDate d = start; d <= to; d = d.addDays(7))
weeks.append(Week(d));
return weeks;
diff --git a/karm/timekard.h b/karm/timekard.h
index f47129fda..df0bd3285 100644
--- a/karm/timekard.h
+++ b/karm/timekard.h
@@ -46,12 +46,12 @@ class TaskView;
class Week
{
public:
- /** Need an empty constructor to use in a QValueList. */
+ /** Need an empty constructor to use in a TQValueList. */
Week();
- Week(QDate from);
- QDate start() const;
- QDate end() const;
- QValueList<QDate> days() const;
+ Week(TQDate from);
+ TQDate start() const;
+ TQDate end() const;
+ TQValueList<TQDate> days() const;
/**
* Returns a list of weeks for the given date range.
@@ -63,8 +63,8 @@ class Week
* days, one being a Sunday and the other being a Monday, you will get two
* weeks back in the list.
*/
- static QValueList<Week> weeksFromDateRange(const QDate& from,
- const QDate& to);
+ static TQValueList<Week> weeksFromDateRange(const TQDate& from,
+ const TQDate& to);
/**
* Return the name of the week.
@@ -72,11 +72,11 @@ class Week
* Uses whatever the user has set up for the long date format in
* KControlPanel, prefixed by "Week of".
*/
- QString name() const;
+ TQString name() const;
private:
- QDate _start;
+ TQDate _start;
};
/**
@@ -101,28 +101,28 @@ class TimeKard
* print the task subtree for a root task and when they want to print
* all tasks.
*/
- QString totalsAsText(TaskView* taskview, bool justThisTask, WhichTime which);
+ TQString totalsAsText(TaskView* taskview, bool justThisTask, WhichTime which);
/**
* Generates ascii text of weekly task history, for current task on down.
*
* Formatted for pasting into clipboard.
*/
- QString historyAsText(TaskView* taskview, const QDate& from,
- const QDate& to, bool justThisTask, bool perWeek, bool totalsOnly);
+ TQString historyAsText(TaskView* taskview, const TQDate& from,
+ const TQDate& to, bool justThisTask, bool perWeek, bool totalsOnly);
private:
- void printTask(Task *t, QString &s, int level, WhichTime which);
+ void printTask(Task *t, TQString &s, int level, WhichTime which);
- void printTaskHistory(const Task *t, const QMap<QString, long>& datamap,
- QMap<QString, long>& daytotals,
- const QDate& from, const QDate& to,
- const int level, QString& retval, bool totalsOnly);
+ void printTaskHistory(const Task *t, const TQMap<TQString, long>& datamap,
+ TQMap<TQString, long>& daytotals,
+ const TQDate& from, const TQDate& to,
+ const int level, TQString& retval, bool totalsOnly);
- QString sectionHistoryAsText(TaskView* taskview,
- const QDate& sectionFrom, const QDate& sectionTo,
- const QDate& from, const QDate& to,
- const QString& name,
+ TQString sectionHistoryAsText(TaskView* taskview,
+ const TQDate& sectionFrom, const TQDate& sectionTo,
+ const TQDate& from, const TQDate& to,
+ const TQString& name,
bool justThisTask, bool totalsOnly);
};
diff --git a/karm/tray.cpp b/karm/tray.cpp
index 228d807d8..ac820abbb 100644
--- a/karm/tray.cpp
+++ b/karm/tray.cpp
@@ -8,13 +8,13 @@
*/
-// #include <qkeycode.h>
-// #include <qlayout.h>
-#include <qpixmap.h>
-#include <qptrlist.h>
-#include <qstring.h>
-#include <qtimer.h>
-#include <qtooltip.h>
+// #include <tqkeycode.h>
+// #include <tqlayout.h>
+#include <tqpixmap.h>
+#include <tqptrlist.h>
+#include <tqstring.h>
+#include <tqtimer.h>
+#include <tqtooltip.h>
#include <kaction.h> // actionPreferences()
#include <kglobal.h>
@@ -28,21 +28,21 @@
#include "task.h"
#include "tray.h"
-QPtrVector<QPixmap> *KarmTray::icons = 0;
+TQPtrVector<TQPixmap> *KarmTray::icons = 0;
KarmTray::KarmTray(MainWindow* parent)
: KSystemTray(parent, "Karm Tray")
{
// the timer that updates the "running" icon in the tray
- _taskActiveTimer = new QTimer(this);
- connect( _taskActiveTimer, SIGNAL( timeout() ), this,
- SLOT( advanceClock()) );
+ _taskActiveTimer = new TQTimer(this);
+ connect( _taskActiveTimer, TQT_SIGNAL( timeout() ), this,
+ TQT_SLOT( advanceClock()) );
if (icons == 0) {
- icons = new QPtrVector<QPixmap>(8);
+ icons = new TQPtrVector<TQPixmap>(8);
for (int i=0; i<8; i++) {
- QPixmap *icon = new QPixmap();
- QString name;
+ TQPixmap *icon = new TQPixmap();
+ TQString name;
name.sprintf("active-icon-%d.xpm",i);
*icon = UserIcon(name);
icons->insert(i,icon);
@@ -66,7 +66,7 @@ KarmTray::KarmTray(MainWindow* parent)
// experimenting with menus for the tray
/*
trayPopupMenu = contextMenu();
- trayPopupMenu2 = new QPopupMenu();
+ trayPopupMenu2 = new TQPopupMenu();
trayPopupMenu->insertItem(i18n("Submenu"), *trayPopupMenu2);
*/
}
@@ -85,7 +85,7 @@ KarmTray::~KarmTray()
// experiment
/*
-void KarmTray::insertTitle(QString title)
+void KarmTray::insertTitle(TQString title)
{
trayPopupMenu->insertTitle(title);
}
@@ -125,29 +125,29 @@ void KarmTray::resetClock()
void KarmTray::initToolTip()
{
- updateToolTip(QPtrList<Task> ());
+ updateToolTip(TQPtrList<Task> ());
}
-void KarmTray::updateToolTip(QPtrList<Task> activeTasks)
+void KarmTray::updateToolTip(TQPtrList<Task> activeTasks)
{
if ( activeTasks.isEmpty() ) {
- QToolTip::add( this, i18n("No active tasks") );
+ TQToolTip::add( this, i18n("No active tasks") );
return;
}
- QFontMetrics fm( QToolTip::font() );
- const QString continued = i18n( ", ..." );
+ TQFontMetrics fm( TQToolTip::font() );
+ const TQString continued = i18n( ", ..." );
const int buffer = fm.boundingRect( continued ).width();
const int desktopWidth = KGlobalSettings::desktopGeometry(this).width();
const int maxWidth = desktopWidth - buffer;
- QString qTip;
- QString s;
+ TQString qTip;
+ TQString s;
// Build the tool tip with all of the names of the active tasks.
// If at any time the width of the tool tip is larger than the desktop,
// stop building it.
- QPtrListIterator<Task> item( activeTasks );
+ TQPtrListIterator<Task> item( activeTasks );
for ( int i = 0; item.current(); ++item, ++i ) {
Task* task = item.current();
if ( i > 0 )
@@ -162,7 +162,7 @@ void KarmTray::updateToolTip(QPtrList<Task> activeTasks)
qTip = s;
}
- QToolTip::add( this, qTip );
+ TQToolTip::add( this, qTip );
}
#include "tray.moc"
diff --git a/karm/tray.h b/karm/tray.h
index 34701cff4..6868e060b 100644
--- a/karm/tray.h
+++ b/karm/tray.h
@@ -1,9 +1,9 @@
#ifndef KARM_TRAY_H
#define KARM_TRAY_H
-#include <qptrvector.h>
-#include <qpixmap.h>
-#include <qptrlist.h>
+#include <tqptrvector.h>
+#include <tqpixmap.h>
+#include <tqptrlist.h>
// experiement
// #include <kpopupmenu.h>
#include <ksystemtray.h>
@@ -32,14 +32,14 @@ class KarmTray : public KSystemTray
private:
int _activeIcon;
- static QPtrVector<QPixmap> *icons;
- QTimer *_taskActiveTimer;
+ static TQPtrVector<TQPixmap> *icons;
+ TQTimer *_taskActiveTimer;
public slots:
void startClock();
void stopClock();
void resetClock();
- void updateToolTip( QPtrList<Task> activeTasks);
+ void updateToolTip( TQPtrList<Task> activeTasks);
void initToolTip();
protected slots:
@@ -47,11 +47,11 @@ class KarmTray : public KSystemTray
// experiment
/*
- void insertTitle(QString title);
+ void insertTitle(TQString title);
private:
KPopupMenu *trayPopupMenu;
- QPopupMenu *trayPopupMenu2;
+ TQPopupMenu *trayPopupMenu2;
*/
};