diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:50:21 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:50:21 -0600 |
commit | 3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12 (patch) | |
tree | 89de88213bd261e4ccaade899ab2d6ec34b3a5a7 /karm | |
parent | 1dad5f662a09dfc5cc041caffe0f674044a4dcec (diff) | |
download | tdepim-3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.tar.gz tdepim-3ca10fd9a2dc631429d3b5d5c5e42a7d211d5a12.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'karm')
-rw-r--r-- | karm/csvexportdialog_base.ui | 6 | ||||
-rw-r--r-- | karm/doc/design | 4 | ||||
-rw-r--r-- | karm/edittaskdialog.cpp | 12 | ||||
-rw-r--r-- | karm/idletimedetector.cpp | 8 | ||||
-rw-r--r-- | karm/karm_part.cpp | 26 | ||||
-rw-r--r-- | karm/karmstorage.cpp | 78 | ||||
-rw-r--r-- | karm/karmstorage.h | 6 | ||||
-rw-r--r-- | karm/ktimewidget.cpp | 20 | ||||
-rw-r--r-- | karm/mainwindow.cpp | 48 | ||||
-rw-r--r-- | karm/plannerparser.cpp | 8 | ||||
-rw-r--r-- | karm/preferences.cpp | 98 | ||||
-rw-r--r-- | karm/print.cpp | 12 | ||||
-rw-r--r-- | karm/printdialog.cpp | 28 | ||||
-rw-r--r-- | karm/task.cpp | 20 | ||||
-rw-r--r-- | karm/task.h | 8 | ||||
-rw-r--r-- | karm/taskview.cpp | 30 | ||||
-rw-r--r-- | karm/taskview.h | 8 | ||||
-rw-r--r-- | karm/test/README | 2 | ||||
-rw-r--r-- | karm/test/lifetest.php | 4 | ||||
-rw-r--r-- | karm/test/lockerthread.cpp | 2 | ||||
-rw-r--r-- | karm/test/locking.cpp | 6 | ||||
-rw-r--r-- | karm/test/runscripts.cpp | 2 | ||||
-rw-r--r-- | karm/test/script.cpp | 2 | ||||
-rw-r--r-- | karm/timekard.cpp | 70 | ||||
-rw-r--r-- | karm/tray.cpp | 6 |
25 files changed, 257 insertions, 257 deletions
diff --git a/karm/csvexportdialog_base.ui b/karm/csvexportdialog_base.ui index 906ba139b..1b06db1dd 100644 --- a/karm/csvexportdialog_base.ui +++ b/karm/csvexportdialog_base.ui @@ -29,7 +29,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>20</width> <height>29</height> @@ -46,7 +46,7 @@ <property name="sizeType"> <enum>Expanding</enum> </property> - <property name="tqsizeHint"> + <property name="sizeHint"> <size> <width>160</width> <height>20</height> @@ -317,7 +317,7 @@ <verstretch>0</verstretch> </sizepolicy> </property> - <property name="tqmaximumSize"> + <property name="maximumSize"> <size> <width>30</width> <height>32767</height> diff --git a/karm/doc/design b/karm/doc/design index b647f2822..be9a425fa 100644 --- a/karm/doc/design +++ b/karm/doc/design @@ -36,7 +36,7 @@ On Thursday 24 October 2002 06:37 pm, tomas pospisek wrote: > > --------------------------------------------------------------------- > > 1 Karm shall provide a hierarchical structure of tasks. If a task > > has at least one subtask it will be referred to as a parent task. -> > If a task has no tqchildren it will be referred to as a leaf task. +> > If a task has no children it will be referred to as a leaf task. > > If a task has no parent tasks it will be referred to as a root > > task. > > 2 A new task can be created as a child of any existing task. @@ -63,7 +63,7 @@ On Thursday 24 October 2002 06:37 pm, tomas pospisek wrote: > > --------------------------------------------------------------------- > > 1 Karm shall provide a hierarchical structure of tasks. If a task > > has at least one subtask it will be referred to as a parent task. -> > If a task has no tqchildren it will be referred to as a leaf task. +> > If a task has no children it will be referred to as a leaf task. > > If a task has no parent tasks it will be referred to as a root > > task. > > 2 A new task can be created as a child of any existing task. diff --git a/karm/edittaskdialog.cpp b/karm/edittaskdialog.cpp index 9b404d0af..b0286dd14 100644 --- a/karm/edittaskdialog.cpp +++ b/karm/edittaskdialog.cpp @@ -25,7 +25,7 @@ #include <tqgroupbox.h> #include <tqhbox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include <tqradiobutton.h> #include <tqsizepolicy.h> @@ -87,7 +87,7 @@ EditTaskDialog::EditTaskDialog( TQString caption, bool editDlg, // Time _timeLA = new TQLabel( i18n("&Time:"), page, "time" ); lay3->addWidget( _timeLA, 0, 0 ); - _timeLA->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, + _timeLA->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, @@ -110,7 +110,7 @@ EditTaskDialog::EditTaskDialog( TQString caption, bool editDlg, _sessionTW = new KArmTimeWidget( page, "_sessionTW" ); lay3->addWidget( _sessionTW, 1, 1 ); _sessionLA->setBuddy( _sessionTW ); - _sessionLA->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, + _sessionLA->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, @@ -132,9 +132,9 @@ EditTaskDialog::EditTaskDialog( TQString caption, bool editDlg, lay4->addSpacing(20); _operator = new TQComboBox(page); - _operator->insertItem( TQString::tqfromLatin1( "+" ) ); - _operator->insertItem( TQString::tqfromLatin1( "-" ) ); - _operator->tqsetSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, + _operator->insertItem( TQString::fromLatin1( "+" ) ); + _operator->insertItem( TQString::fromLatin1( "-" ) ); + _operator->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)0, 0, 0, diff --git a/karm/idletimedetector.cpp b/karm/idletimedetector.cpp index 38ae04d7a..bd0b253c2 100644 --- a/karm/idletimedetector.cpp +++ b/karm/idletimedetector.cpp @@ -67,22 +67,22 @@ void IdleTimeDetector::informOverrun(int idleSeconds) _timer->stop(); - TQDateTime idleStart = TQDateTime::tqcurrentDateTime().addSecs(-idleSeconds); + TQDateTime idleStart = TQDateTime::currentDateTime().addSecs(-idleSeconds); TQString idleStartTQString = KGlobal::locale()->formatTime(idleStart.time()); int id = TQMessageBox::warning( 0, i18n("Idle Detection"), i18n("Desktop has been idle since %1." - " What should we do?").tqarg(idleStartTQString), + " What should we do?").arg(idleStartTQString), i18n("Revert && Stop"), i18n("Revert && Continue"), i18n("Continue Timing"),0,2); - TQDateTime end = TQDateTime::tqcurrentDateTime(); + TQDateTime end = TQDateTime::currentDateTime(); int diff = idleStart.secsTo(end)/secsPerMinute; if (id == 0) { // Revert And Stop - kdDebug(5970) << "Now it is " << TQDateTime::tqcurrentDateTime() << 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/karm_part.cpp b/karm/karm_part.cpp index db6204491..7d0c7a22a 100644 --- a/karm/karm_part.cpp +++ b/karm/karm_part.cpp @@ -16,7 +16,7 @@ #include <klocale.h> #include <tqfile.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqmultilineedit.h> #include <tqpopupmenu.h> #include "mainwindow.h" @@ -134,12 +134,12 @@ void karmPart::makeMenus() actionCollection(), "reset_all_times"); actionStart = new KAction( i18n("&Start"), - TQString::tqfromLatin1("1rightarrow"), Key_S, + TQString::fromLatin1("1rightarrow"), Key_S, TQT_TQOBJECT(_taskView), TQT_SLOT( startCurrentTimer() ), actionCollection(), "start"); actionStop = new KAction( i18n("S&top"), - TQString::tqfromLatin1("stop"), 0, + TQString::fromLatin1("stop"), 0, TQT_TQOBJECT(_taskView), TQT_SLOT( stopCurrentTimer() ), actionCollection(), "stop"); @@ -151,55 +151,55 @@ void karmPart::makeMenus() actionStopAll->setEnabled(false); actionNew = new KAction( i18n("&New..."), - TQString::tqfromLatin1("filenew"), CTRL+Key_N, + TQString::fromLatin1("filenew"), CTRL+Key_N, TQT_TQOBJECT(_taskView), TQT_SLOT( newTask() ), actionCollection(), "new_task"); actionNewSub = new KAction( i18n("New &Subtask..."), - TQString::tqfromLatin1("kmultiple"), CTRL+ALT+Key_N, + TQString::fromLatin1("kmultiple"), CTRL+ALT+Key_N, TQT_TQOBJECT(_taskView), TQT_SLOT( newSubTask() ), actionCollection(), "new_sub_task"); actionDelete = new KAction( i18n("&Delete"), - TQString::tqfromLatin1("editdelete"), Key_Delete, + TQString::fromLatin1("editdelete"), Key_Delete, TQT_TQOBJECT(_taskView), TQT_SLOT( deleteTask() ), actionCollection(), "delete_task"); actionEdit = new KAction( i18n("&Edit..."), - TQString::tqfromLatin1("edit"), CTRL + Key_E, + TQString::fromLatin1("edit"), CTRL + Key_E, TQT_TQOBJECT(_taskView), TQT_SLOT( editTask() ), actionCollection(), "edit_task"); // actionAddComment = new KAction( i18n("&Add Comment..."), -// TQString::tqfromLatin1("document"), +// TQString::fromLatin1("document"), // CTRL+ALT+Key_E, // TQT_TQOBJECT(_taskView), // TQT_SLOT( addCommentToTask() ), // actionCollection(), // "add_comment_to_task"); actionMarkAsComplete = new KAction( i18n("&Mark as Complete"), - TQString::tqfromLatin1("document"), + TQString::fromLatin1("document"), CTRL+Key_M, TQT_TQOBJECT(_taskView), TQT_SLOT( markTaskAsComplete() ), actionCollection(), "mark_as_complete"); actionMarkAsIncomplete = new KAction( i18n("&Mark as Incomplete"), - TQString::tqfromLatin1("document"), + TQString::fromLatin1("document"), CTRL+Key_M, TQT_TQOBJECT(_taskView), TQT_SLOT( markTaskAsIncomplete() ), actionCollection(), "mark_as_incomplete"); actionClipTotals = new KAction( i18n("&Copy Totals to Clipboard"), - TQString::tqfromLatin1("klipper"), + TQString::fromLatin1("klipper"), CTRL+Key_C, TQT_TQOBJECT(_taskView), TQT_SLOT( clipTotals() ), actionCollection(), "clip_totals"); actionClipHistory = new KAction( i18n("Copy &History to Clipboard"), - TQString::tqfromLatin1("klipper"), + TQString::fromLatin1("klipper"), CTRL+ALT+Key_C, TQT_TQOBJECT(_taskView), TQT_SLOT( clipHistory() ), @@ -576,7 +576,7 @@ int karmPart::bookTime TQString karmPart::getError( int mkb ) const { if ( mkb <= KARM_MAX_ERROR_NO ) return m_error[ mkb ]; - else return i18n( "Invalid error number: %1" ).tqarg( mkb ); + else return i18n( "Invalid error number: %1" ).arg( mkb ); } int karmPart::totalMinutesForTaskId( const TQString& taskId ) diff --git a/karm/karmstorage.cpp b/karm/karmstorage.cpp index 1e4f92a1f..e895d2639 100644 --- a/karm/karmstorage.cpp +++ b/karm/karmstorage.cpp @@ -135,7 +135,7 @@ TQString KarmStorage::load (TaskView* view, const Preferences* preferences, TQSt TQObject::connect (_calendar, TQT_SIGNAL(resourceChanged(ResourceCalendar *)), view, TQT_SLOT(iCalFileModified(ResourceCalendar *))); _calendar->setTimeZoneId( KPimPrefs::timezone() ); - _calendar->setResourceName( TQString::tqfromLatin1("KArm") ); + _calendar->setResourceName( TQString::fromLatin1("KArm") ); _calendar->open(); _calendar->load(); @@ -199,8 +199,8 @@ TQString KarmStorage::load (TaskView* view, const Preferences* preferences, TQSt // Complete the loading but return a message if ( !newParent ) err = i18n("Error loading \"%1\": could not find parent (uid=%2)") - .tqarg(task->name()) - .tqarg((*todo)->relatedToUid()); + .arg(task->name()) + .arg((*todo)->relatedToUid()); if (!err) task->move( newParent); } @@ -268,8 +268,8 @@ TQString KarmStorage::buildTaskView(KCal::ResourceCalendar *rc, TaskView *view) // Complete the loading but return a message if ( !newParent ) err = i18n("Error loading \"%1\": could not find parent (uid=%2)") - .tqarg(task->name()) - .tqarg((*todo)->relatedToUid()); + .arg(task->name()) + .arg((*todo)->relatedToUid()); if (!err) task->move( newParent); } @@ -391,12 +391,12 @@ TQString KarmStorage::loadFromFlatFile(TaskView* taskview, TQFile f(filename); if( !f.exists() ) - err = i18n("File \"%1\" not found.").tqarg(filename); + err = i18n("File \"%1\" not found.").arg(filename); if (!err) { if( !f.open( IO_ReadOnly ) ) - err = i18n("Could not open \"%1\".").tqarg(filename); + err = i18n("Could not open \"%1\".").arg(filename); } if (!err) @@ -667,7 +667,7 @@ TQString KarmStorage::exportcsvFile( TaskView *taskview, if (filename.isEmpty()) filename=rc.url.url(); TQFile f( filename ); if( !f.open( IO_WriteOnly ) ) { - err = i18n( "Could not open \"%1\"." ).tqarg( filename ); + err = i18n( "Could not open \"%1\"." ).arg( filename ); } if (!err) { @@ -680,13 +680,13 @@ TQString KarmStorage::exportcsvFile( TaskView *taskview, else // use remote file { KTempFile tmpFile; - if ( tmpFile.status() != 0 ) err = TQString::tqfromLatin1( "Unable to get temporary file" ); + if ( tmpFile.status() != 0 ) err = TQString::fromLatin1( "Unable to get temporary file" ); else { TQTextStream *stream=tmpFile.textStream(); *stream << retval; tmpFile.close(); - if (!KIO::NetAccess::upload( tmpFile.name(), rc.url, 0 )) err=TQString::tqfromLatin1("Could not upload"); + if (!KIO::NetAccess::upload( tmpFile.name(), rc.url, 0 )) err=TQString::fromLatin1("Could not upload"); } } @@ -794,7 +794,7 @@ long KarmStorage::printTaskHistory ( TQString double_dquote = dquote + dquote; bool to_quote = true; - const TQString cr = TQString::tqfromLatin1("\n"); + const TQString cr = TQString::fromLatin1("\n"); TQString buf; TQString daytaskkey, daykey; TQDate day; @@ -807,15 +807,15 @@ long KarmStorage::printTaskHistory ( while (day <= to) { // write the time in seconds for the given task for the given day to s - daykey = day.toString(TQString::tqfromLatin1("yyyyMMdd")); - daytaskkey = TQString::tqfromLatin1("%1_%2") - .tqarg(daykey) - .tqarg(task->uid()); + daykey = day.toString(TQString::fromLatin1("yyyyMMdd")); + daytaskkey = TQString::fromLatin1("%1_%2") + .arg(daykey) + .arg(task->uid()); if (taskdaytotals.contains(daytaskkey)) { - cell.push_back(TQString::tqfromLatin1("%1") - .tqarg(formatTime(taskdaytotals[daytaskkey]/60, rc.decimalMinutes))); + cell.push_back(TQString::fromLatin1("%1") + .arg(formatTime(taskdaytotals[daytaskkey]/60, rc.decimalMinutes))); sum += taskdaytotals[daytaskkey]; // in seconds if (daytotals.contains(daykey)) @@ -829,7 +829,7 @@ long KarmStorage::printTaskHistory ( } // Total for task - cell.push_back(TQString::tqfromLatin1("%1").tqarg(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,7 +865,7 @@ long KarmStorage::printTaskHistory ( add += printTaskHistory( subTask, taskdaytotals, daytotals, from, to , level+1, matrix, rc ); } - cell[colrectot]=(TQString::tqfromLatin1("%1").tqarg(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; } @@ -890,7 +890,7 @@ TQString KarmStorage::exportcsvHistory ( TaskView *taskview, const ReportCriteria &rc) { TQString delim = rc.delimiter; - const TQString cr = TQString::tqfromLatin1("\n"); + const TQString cr = TQString::fromLatin1("\n"); TQString err; // below taken from timekard.cpp @@ -910,18 +910,18 @@ TQString KarmStorage::exportcsvHistory ( TaskView *taskview, // parameter-plausi if ( from > to ) { - err = TQString::tqfromLatin1 ( + err = TQString::fromLatin1 ( "'to' has to be a date later than or equal to 'from'."); } // header retval += i18n("Task History\n"); retval += i18n("From %1 to %2") - .tqarg(KGlobal::locale()->formatDate(from)) - .tqarg(KGlobal::locale()->formatDate(to)); + .arg(KGlobal::locale()->formatDate(from)) + .arg(KGlobal::locale()->formatDate(to)); retval += cr; retval += i18n("Printed on: %1") - .tqarg(KGlobal::locale()->formatDateTime(TQDateTime::tqcurrentDateTime())); + .arg(KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime())); retval += cr; day=from; @@ -936,10 +936,10 @@ TQString KarmStorage::exportcsvHistory ( TaskView *taskview, // so times are accumulated for each task. for (event = events.begin(); event != events.end(); ++event) { - daykey = (*event).start().date().toString(TQString::tqfromLatin1("yyyyMMdd")); - daytaskkey = TQString(TQString::tqfromLatin1("%1_%2")) - .tqarg(daykey) - .tqarg((*event).todoUid()); + daykey = (*event).start().date().toString(TQString::fromLatin1("yyyyMMdd")); + daytaskkey = TQString(TQString::fromLatin1("%1_%2")) + .arg(daykey) + .arg((*event).todoUid()); if (taskdaytotals.contains(daytaskkey)) taskdaytotals.replace(daytaskkey, @@ -953,7 +953,7 @@ TQString KarmStorage::exportcsvHistory ( TaskView *taskview, while ( dayheading <= to ) { // Use ISO 8601 format for date. - retval += dayheading.toString(TQString::tqfromLatin1("yyyy-MM-dd")); + retval += dayheading.toString(TQString::fromLatin1("yyyy-MM-dd")); retval += delim; dayheading=dayheading.addDays(1); } @@ -993,22 +993,22 @@ TQString KarmStorage::exportcsvHistory ( TaskView *taskview, day = from; while (day<=to) { - daykey = day.toString(TQString::tqfromLatin1("yyyyMMdd")); + daykey = day.toString(TQString::fromLatin1("yyyyMMdd")); if (daytotals.contains(daykey)) { - retval += TQString::tqfromLatin1("%1") - .tqarg(formatTime(daytotals[daykey]/60, rc.decimalMinutes)); + retval += TQString::fromLatin1("%1") + .arg(formatTime(daytotals[daykey]/60, rc.decimalMinutes)); sum += daytotals[daykey]; // in seconds } retval += delim; day = day.addDays(1); } - retval += TQString::tqfromLatin1("%1%2%3%4") - .tqarg( formatTime( sum/60, rc.decimalMinutes ) ) - .tqarg( delim ).tqarg( delim ) - .tqarg( i18n( "Total" ) ); + retval += TQString::fromLatin1("%1%2%3%4") + .arg( formatTime( sum/60, rc.decimalMinutes ) ) + .arg( delim ).arg( delim ) + .arg( i18n( "Total" ) ); } // above taken from timekard.cpp @@ -1021,7 +1021,7 @@ TQString KarmStorage::exportcsvHistory ( TaskView *taskview, if (filename.isEmpty()) filename=rc.url.url(); TQFile f( filename ); if( !f.open( IO_WriteOnly ) ) { - err = i18n( "Could not open \"%1\"." ).tqarg( filename ); + err = i18n( "Could not open \"%1\"." ).arg( filename ); } if (!err) { @@ -1036,14 +1036,14 @@ TQString KarmStorage::exportcsvHistory ( TaskView *taskview, KTempFile tmpFile; if ( tmpFile.status() != 0 ) { - err = TQString::tqfromLatin1( "Unable to get temporary file" ); + err = TQString::fromLatin1( "Unable to get temporary file" ); } else { TQTextStream *stream=tmpFile.textStream(); *stream << retval; tmpFile.close(); - if (!KIO::NetAccess::upload( tmpFile.name(), rc.url, 0 )) err=TQString::tqfromLatin1("Could not upload"); + if (!KIO::NetAccess::upload( tmpFile.name(), rc.url, 0 )) err=TQString::fromLatin1("Could not upload"); } } return err; diff --git a/karm/karmstorage.h b/karm/karmstorage.h index 573c55239..7e8b04b1a 100644 --- a/karm/karmstorage.h +++ b/karm/karmstorage.h @@ -132,7 +132,7 @@ class KarmStorage * Read tasks and their total times from a text file (legacy storage). * * This reads from one of the two legacy file formats. In this version, - * the parent task times do not include the sum of all their tqchildren's + * the parent task times do not include the sum of all their children's * times. * * The format of the file is zero or more lines of: @@ -147,7 +147,7 @@ class KarmStorage * Reads tasks and their total times from text file (legacy). * * This is the older legacy format, where the task totals included the - * tqchildren totals. + * children totals. * * @see loadFromFlatFile */ @@ -238,7 +238,7 @@ class KarmStorage * * @param task The task the timer was stopped for. */ - void stopTimer(const Task* task, TQDateTime when=TQDateTime::tqcurrentDateTime()); + void stopTimer(const Task* task, TQDateTime when=TQDateTime::currentDateTime()); /** * Log a new comment for this task. diff --git a/karm/ktimewidget.cpp b/karm/ktimewidget.cpp index 2eaf32b20..c287867d3 100644 --- a/karm/ktimewidget.cpp +++ b/karm/ktimewidget.cpp @@ -1,7 +1,7 @@ #include <stdlib.h> // abs() #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include <tqstring.h> #include <tqvalidator.h> @@ -63,38 +63,38 @@ protected: KArmTimeWidget::KArmTimeWidget( TQWidget* parent, const char* name ) : TQWidget(parent, name) { - TQHBoxLayout *tqlayout = new TQHBoxLayout(this); + TQHBoxLayout *layout = new TQHBoxLayout(this); _hourLE = new TQLineEdit( this); // 9999 hours > 1 year! // 999 hours = 41 days (That should be enough ...) _hourLE->setFixedWidth( fontMetrics().maxWidth() * 3 + 2 * _hourLE->frameWidth() + 2); - tqlayout->addWidget(_hourLE); + layout->addWidget(_hourLE); TimeValidator *validator = new TimeValidator( HOUR, _hourLE, "Validator for _hourLE"); _hourLE->setValidator( validator ); - _hourLE->tqsetAlignment( TQt::AlignRight ); + _hourLE->setAlignment( TQt::AlignRight ); TQLabel *hr = new TQLabel( i18n( "abbreviation for hours", " hr. " ), this ); - tqlayout->addWidget( hr ); + layout->addWidget( hr ); _minuteLE = new KarmLineEdit(this); // Minutes lineedit: Make room for 2 digits _minuteLE->setFixedWidth( fontMetrics().maxWidth() * 2 + 2 * _minuteLE->frameWidth() + 2); - tqlayout->addWidget(_minuteLE); + layout->addWidget(_minuteLE); validator = new TimeValidator( MINUTE, _minuteLE, "Validator for _minuteLE"); _minuteLE->setValidator( validator ); _minuteLE->setMaxLength(2); - _minuteLE->tqsetAlignment( TQt::AlignRight ); + _minuteLE->setAlignment( TQt::AlignRight ); TQLabel *min = new TQLabel( i18n( "abbreviation for minutes", " min. " ), this ); - tqlayout->addWidget( min ); + layout->addWidget( min ); - tqlayout->addStretch(1); + layout->addStretch(1); setFocusProxy( _hourLE ); } @@ -111,7 +111,7 @@ void KArmTimeWidget::setTime( long minutes ) dummy.setNum( minutepart ); if (minutepart < 10 ) { - dummy = TQString::tqfromLatin1( "0" ) + dummy; + dummy = TQString::fromLatin1( "0" ) + dummy; } _minuteLE->setText( dummy ); } diff --git a/karm/mainwindow.cpp b/karm/mainwindow.cpp index 6d1ce29ea..287c5a96f 100644 --- a/karm/mainwindow.cpp +++ b/karm/mainwindow.cpp @@ -202,10 +202,10 @@ void MainWindow::updateStatusBar( ) TQString time; time = formatTime( _sessionSum ); - statusBar()->changeItem( i18n("Session: %1").tqarg(time), 0 ); + statusBar()->changeItem( i18n("Session: %1").arg(time), 0 ); time = formatTime( _totalSum ); - statusBar()->changeItem( i18n("Total: %1" ).tqarg(time), 1); + statusBar()->changeItem( i18n("Total: %1" ).arg(time), 1); } void MainWindow::starStatusBar() @@ -272,12 +272,12 @@ void MainWindow::makeMenus() actionCollection(), "reset_all_times"); actionStart = new KAction( i18n("&Start"), - TQString::tqfromLatin1("1rightarrow"), Key_S, + TQString::fromLatin1("1rightarrow"), Key_S, TQT_TQOBJECT(_taskView), TQT_SLOT( startCurrentTimer() ), actionCollection(), "start"); actionStop = new KAction( i18n("S&top"), - TQString::tqfromLatin1("stop"), Key_S, + TQString::fromLatin1("stop"), Key_S, TQT_TQOBJECT(_taskView), TQT_SLOT( stopCurrentTimer() ), actionCollection(), "stop"); @@ -289,48 +289,48 @@ void MainWindow::makeMenus() actionStopAll->setEnabled(false); actionNew = new KAction( i18n("&New..."), - TQString::tqfromLatin1("filenew"), CTRL+Key_N, + TQString::fromLatin1("filenew"), CTRL+Key_N, TQT_TQOBJECT(_taskView), TQT_SLOT( newTask() ), actionCollection(), "new_task"); actionNewSub = new KAction( i18n("New &Subtask..."), - TQString::tqfromLatin1("kmultiple"), CTRL+ALT+Key_N, + TQString::fromLatin1("kmultiple"), CTRL+ALT+Key_N, TQT_TQOBJECT(_taskView), TQT_SLOT( newSubTask() ), actionCollection(), "new_sub_task"); actionDelete = new KAction( i18n("&Delete"), - TQString::tqfromLatin1("editdelete"), Key_Delete, + TQString::fromLatin1("editdelete"), Key_Delete, TQT_TQOBJECT(_taskView), TQT_SLOT( deleteTask() ), actionCollection(), "delete_task"); actionEdit = new KAction( i18n("&Edit..."), - TQString::tqfromLatin1("edit"), CTRL + Key_E, + TQString::fromLatin1("edit"), CTRL + Key_E, TQT_TQOBJECT(_taskView), TQT_SLOT( editTask() ), actionCollection(), "edit_task"); // actionAddComment = new KAction( i18n("&Add Comment..."), -// TQString::tqfromLatin1("document"), +// TQString::fromLatin1("document"), // CTRL+ALT+Key_E, // TQT_TQOBJECT(_taskView), // TQT_SLOT( addCommentToTask() ), // actionCollection(), // "add_comment_to_task"); actionMarkAsComplete = new KAction( i18n("&Mark as Complete"), - TQString::tqfromLatin1("document"), + TQString::fromLatin1("document"), CTRL+Key_M, TQT_TQOBJECT(_taskView), TQT_SLOT( markTaskAsComplete() ), actionCollection(), "mark_as_complete"); actionMarkAsIncomplete = new KAction( i18n("&Mark as Incomplete"), - TQString::tqfromLatin1("document"), + TQString::fromLatin1("document"), CTRL+Key_M, TQT_TQOBJECT(_taskView), TQT_SLOT( markTaskAsIncomplete() ), actionCollection(), "mark_as_incomplete"); actionClipTotals = new KAction( i18n("&Copy Totals to Clipboard"), - TQString::tqfromLatin1("klipper"), + TQString::fromLatin1("klipper"), CTRL+Key_C, TQT_TQOBJECT(_taskView), TQT_SLOT( clipTotals() ), @@ -338,14 +338,14 @@ void MainWindow::makeMenus() "clip_totals"); // actionClipTotals will never be used again, overwrite it actionClipTotals = new KAction( i18n("&Copy Session Time to Clipboard"), - TQString::tqfromLatin1("klipper"), + TQString::fromLatin1("klipper"), 0, TQT_TQOBJECT(_taskView), TQT_SLOT( clipSession() ), actionCollection(), "clip_session"); actionClipHistory = new KAction( i18n("Copy &History to Clipboard"), - TQString::tqfromLatin1("klipper"), + TQString::fromLatin1("klipper"), CTRL+ALT+Key_C, TQT_TQOBJECT(_taskView), TQT_SLOT( clipHistory() ), @@ -372,7 +372,7 @@ void MainWindow::makeMenus() "import_korg_events"); */ - setXMLFile( TQString::tqfromLatin1("karmui.rc") ); + setXMLFile( TQString::fromLatin1("karmui.rc") ); createGUI( 0 ); // Tool tips must be set after the createGUI. @@ -442,11 +442,11 @@ void MainWindow::loadGeometry() { KConfig &config = *kapp->config(); - config.setGroup( TQString::tqfromLatin1("Main Window Geometry") ); - int w = config.readNumEntry( TQString::tqfromLatin1("Width"), 100 ); - int h = config.readNumEntry( TQString::tqfromLatin1("Height"), 100 ); - w = TQMAX( w, tqsizeHint().width() ); - h = TQMAX( h, tqsizeHint().height() ); + config.setGroup( TQString::fromLatin1("Main Window Geometry") ); + int w = config.readNumEntry( TQString::fromLatin1("Width"), 100 ); + int h = config.readNumEntry( TQString::fromLatin1("Height"), 100 ); + w = TQMAX( w, sizeHint().width() ); + h = TQMAX( h, sizeHint().height() ); resize(w, h); } } @@ -455,9 +455,9 @@ void MainWindow::loadGeometry() void MainWindow::saveGeometry() { KConfig &config = *KGlobal::config(); - config.setGroup( TQString::tqfromLatin1("Main Window Geometry")); - config.writeEntry( TQString::tqfromLatin1("Width"), width()); - config.writeEntry( TQString::tqfromLatin1("Height"), height()); + config.setGroup( TQString::fromLatin1("Main Window Geometry")); + config.writeEntry( TQString::fromLatin1("Width"), width()); + config.writeEntry( TQString::fromLatin1("Height"), height()); config.sync(); } @@ -610,7 +610,7 @@ int MainWindow::bookTime TQString MainWindow::getError( int mkb ) const { if ( mkb <= KARM_MAX_ERROR_NO ) return m_error[ mkb ]; - else return i18n( "Invalid error number: %1" ).tqarg( mkb ); + else return i18n( "Invalid error number: %1" ).arg( mkb ); } int MainWindow::totalMinutesForTaskId( const TQString& taskId ) diff --git a/karm/plannerparser.cpp b/karm/plannerparser.cpp index 7ac13a5e3..67f7bd53f 100644 --- a/karm/plannerparser.cpp +++ b/karm/plannerparser.cpp @@ -55,15 +55,15 @@ test cases: int taskComplete=0; // only <task>s within <tasks> are processed - if (qName == TQString::tqfromLatin1("tasks")) withInTasks=true; - if ((qName == TQString::tqfromLatin1("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) == TQString::tqfromLatin1("name")) taskName=att.value(i); - if (att.qName(i)==TQString::tqfromLatin1("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 diff --git a/karm/preferences.cpp b/karm/preferences.cpp index 24a5e8c41..464842b8f 100644 --- a/karm/preferences.cpp +++ b/karm/preferences.cpp @@ -3,7 +3,7 @@ #include <tqlabel.h> #include <tqstring.h> #include <tqspinbox.h> -#include <tqlayout.h> +#include <layout.h> #include <kapplication.h> // kapp #include <kconfig.h> @@ -51,8 +51,8 @@ void Preferences::makeBehaviorPage() icon ); TQVBoxLayout* topLevel = new TQVBoxLayout( behaviorPage, 0, spacingHint() ); - TQGridLayout* tqlayout = new TQGridLayout( topLevel, 2, 2 ); - tqlayout->setColStretch( 1, 1 ); + TQGridLayout* layout = new TQGridLayout( topLevel, 2, 2 ); + layout->setColStretch( 1, 1 ); _doIdleDetectionW = new TQCheckBox ( i18n("Detect desktop as idle after"), behaviorPage, "_doIdleDetectionW"); @@ -62,9 +62,9 @@ void Preferences::makeBehaviorPage() _promptDeleteW = new TQCheckBox ( i18n( "Prompt before deleting tasks" ), behaviorPage, "_promptDeleteW" ); - tqlayout->addWidget(_doIdleDetectionW, 0, 0 ); - tqlayout->addWidget(_idleDetectValueW, 0, 1 ); - tqlayout->addWidget(_promptDeleteW, 1, 0 ); + layout->addWidget(_doIdleDetectionW, 0, 0 ); + layout->addWidget(_idleDetectValueW, 0, 1 ); + layout->addWidget(_promptDeleteW, 1, 0 ); topLevel->addStretch(); @@ -79,8 +79,8 @@ void Preferences::makeDisplayPage() icon ); TQVBoxLayout* topLevel = new TQVBoxLayout( displayPage, 0, spacingHint() ); - TQGridLayout* tqlayout = new TQGridLayout( topLevel, 5, 2 ); - tqlayout->setColStretch( 1, 1 ); + TQGridLayout* layout = new TQGridLayout( topLevel, 5, 2 ); + layout->setColStretch( 1, 1 ); TQLabel* _displayColumnsLabelW = new TQLabel( i18n("Columns displayed:"), displayPage ); @@ -93,11 +93,11 @@ void Preferences::makeDisplayPage() _displayTotalTimeW = new TQCheckBox ( i18n("Total task time"), displayPage, "_displayTotalTimeW"); - tqlayout->addMultiCellWidget( _displayColumnsLabelW, 0, 0, 0, 1 ); - tqlayout->addWidget(_displaySessionW, 1, 1 ); - tqlayout->addWidget(_displayTimeW, 2, 1 ); - tqlayout->addWidget(_displayTotalSessionW, 3, 1 ); - tqlayout->addWidget(_displayTotalTimeW, 4, 1 ); + layout->addMultiCellWidget( _displayColumnsLabelW, 0, 0, 0, 1 ); + layout->addWidget(_displaySessionW, 1, 1 ); + layout->addWidget(_displayTimeW, 2, 1 ); + layout->addWidget(_displayTotalSessionW, 3, 1 ); + layout->addWidget(_displayTotalTimeW, 4, 1 ); topLevel->addStretch(); } @@ -109,8 +109,8 @@ void Preferences::makeStoragePage() icon ); TQVBoxLayout* topLevel = new TQVBoxLayout( storagePage, 0, spacingHint() ); - TQGridLayout* tqlayout = new TQGridLayout( topLevel, 4, 2 ); - tqlayout->setColStretch( 1, 1 ); + TQGridLayout* layout = new TQGridLayout( topLevel, 4, 2 ); + layout->setColStretch( 1, 1 ); // autosave _doAutoSaveW = new TQCheckBox @@ -121,19 +121,19 @@ void Preferences::makeStoragePage() // iCalendar TQLabel* _iCalFileLabel = new TQLabel( i18n("iCalendar file:"), storagePage); _iCalFileW = new KURLRequester(storagePage, "_iCalFileW"); - _iCalFileW->setFilter(TQString::tqfromLatin1("*.ics")); + _iCalFileW->setFilter(TQString::fromLatin1("*.ics")); _iCalFileW->setMode(KFile::File); // Log time? _loggingW = new TQCheckBox ( i18n("Log history"), storagePage, "_loggingW" ); - // add widgets to tqlayout - tqlayout->addWidget(_doAutoSaveW, 0, 0); - tqlayout->addWidget(_autoSaveValueW, 0, 1); - tqlayout->addWidget(_iCalFileLabel, 1, 0 ); - tqlayout->addWidget(_iCalFileW, 1, 1 ); - tqlayout->addWidget(_loggingW, 2, 0 ); + // add widgets to layout + layout->addWidget(_doAutoSaveW, 0, 0); + layout->addWidget(_autoSaveValueW, 0, 1); + layout->addWidget(_iCalFileLabel, 1, 0 ); + layout->addWidget(_iCalFileW, 1, 1 ); + layout->addWidget(_loggingW, 2, 0 ); topLevel->addStretch(); @@ -253,32 +253,32 @@ void Preferences::load() { KConfig &config = *kapp->config(); - config.setGroup( TQString::tqfromLatin1("Idle detection") ); - _doIdleDetectionV = config.readBoolEntry( TQString::tqfromLatin1("enabled"), + config.setGroup( TQString::fromLatin1("Idle detection") ); + _doIdleDetectionV = config.readBoolEntry( TQString::fromLatin1("enabled"), true ); - _idleDetectValueV = config.readNumEntry(TQString::tqfromLatin1("period"), 15); + _idleDetectValueV = config.readNumEntry(TQString::fromLatin1("period"), 15); - config.setGroup( TQString::tqfromLatin1("Saving") ); + config.setGroup( TQString::fromLatin1("Saving") ); _iCalFileV = config.readPathEntry - ( TQString::tqfromLatin1("ical file"), - locateLocal( "appdata", TQString::tqfromLatin1( "karm.ics"))); + ( TQString::fromLatin1("ical file"), + locateLocal( "appdata", TQString::fromLatin1( "karm.ics"))); _doAutoSaveV = config.readBoolEntry - ( TQString::tqfromLatin1("auto save"), true); + ( TQString::fromLatin1("auto save"), true); _autoSaveValueV = config.readNumEntry - ( TQString::tqfromLatin1("auto save period"), 5); + ( TQString::fromLatin1("auto save period"), 5); _promptDeleteV = config.readBoolEntry - ( TQString::tqfromLatin1("prompt delete"), true); + ( TQString::fromLatin1("prompt delete"), true); _loggingV = config.readBoolEntry - ( TQString::tqfromLatin1("logging"), true); + ( TQString::fromLatin1("logging"), true); _displayColumnV[0] = config.readBoolEntry - ( TQString::tqfromLatin1("display session time"), true); + ( TQString::fromLatin1("display session time"), true); _displayColumnV[1] = config.readBoolEntry - ( TQString::tqfromLatin1("display time"), true); + ( TQString::fromLatin1("display time"), true); _displayColumnV[2] = config.readBoolEntry - ( TQString::tqfromLatin1("display total session time"), true); + ( TQString::fromLatin1("display total session time"), true); _displayColumnV[3] = config.readBoolEntry - ( TQString::tqfromLatin1("display total time"), true); + ( TQString::fromLatin1("display total time"), true); KEMailSettings settings; _userRealName = settings.getSetting( KEMailSettings::RealName ); @@ -288,24 +288,24 @@ void Preferences::save() { KConfig &config = *KGlobal::config(); - config.setGroup( TQString::tqfromLatin1("Idle detection")); - config.writeEntry( TQString::tqfromLatin1("enabled"), _doIdleDetectionV); - config.writeEntry( TQString::tqfromLatin1("period"), _idleDetectValueV); + config.setGroup( TQString::fromLatin1("Idle detection")); + config.writeEntry( TQString::fromLatin1("enabled"), _doIdleDetectionV); + config.writeEntry( TQString::fromLatin1("period"), _idleDetectValueV); - config.setGroup( TQString::tqfromLatin1("Saving")); - config.writePathEntry( TQString::tqfromLatin1("ical file"), _iCalFileV); - config.writeEntry( TQString::tqfromLatin1("auto save"), _doAutoSaveV); - config.writeEntry( TQString::tqfromLatin1("logging"), _loggingV); - config.writeEntry( TQString::tqfromLatin1("auto save period"), _autoSaveValueV); - config.writeEntry( TQString::tqfromLatin1("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( TQString::tqfromLatin1("display session time"), + config.writeEntry( TQString::fromLatin1("display session time"), _displayColumnV[0]); - config.writeEntry( TQString::tqfromLatin1("display time"), + config.writeEntry( TQString::fromLatin1("display time"), _displayColumnV[1]); - config.writeEntry( TQString::tqfromLatin1("display total session time"), + config.writeEntry( TQString::fromLatin1("display total session time"), _displayColumnV[2]); - config.writeEntry( TQString::tqfromLatin1("display total time"), + config.writeEntry( TQString::fromLatin1("display total time"), _displayColumnV[3]); config.sync(); diff --git a/karm/print.cpp b/karm/print.cpp index d045a6658..536883687 100644 --- a/karm/print.cpp +++ b/karm/print.cpp @@ -25,10 +25,10 @@ void MyPrinter::print() if (setup(0L, i18n("Print Times"))) { // setup TQPainter painter(this); - TQPaintDeviceMetrics tqdeviceMetrics(this); + TQPaintDeviceMetrics deviceMetrics(this); TQFontMetrics metrics = painter.fontMetrics(); - pageHeight = tqdeviceMetrics.height(); - int pageWidth = tqdeviceMetrics.width(); + pageHeight = deviceMetrics.height(); + int pageWidth = deviceMetrics.width(); xMargin = margins().width(); yMargin = margins().height(); yoff = yMargin; @@ -36,7 +36,7 @@ void MyPrinter::print() // Calculate the totals // Note the totals are only calculated at the top most levels, as the - // totals are increased together with its tqchildren. + // totals are increased together with its children. int totalTotal = 0; int sessionTotal = 0; for (Task* task = _taskView->first_child(); @@ -75,11 +75,11 @@ void MyPrinter::print() painter.setFont(newFont); int height = metrics.height(); - TQString now = KGlobal::locale()->formatDateTime(TQDateTime::tqcurrentDateTime()); + TQString now = KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime()); painter.drawText(xMargin, yoff, pageWidth, height, TQPainter::AlignCenter, - i18n("KArm - %1").tqarg(now)); + i18n("KArm - %1").arg(now)); painter.setFont(origFont); yoff += height + 10; diff --git a/karm/printdialog.cpp b/karm/printdialog.cpp index 197875491..3e57fa092 100644 --- a/karm/printdialog.cpp +++ b/karm/printdialog.cpp @@ -24,7 +24,7 @@ #include <tqcheckbox.h> #include <tqhbox.h> #include <tqlabel.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlineedit.h> #include <tqpixmap.h> #include <tqpushbutton.h> @@ -48,14 +48,14 @@ PrintDialog::PrintDialog() setMainWidget(page); int year, month; - TQVBoxLayout *tqlayout = new TQVBoxLayout(page, KDialog::spacingHint()); - tqlayout->addSpacing(10); - tqlayout->addStretch(1); + TQVBoxLayout *layout = new TQVBoxLayout(page, KDialog::spacingHint()); + layout->addSpacing(10); + layout->addStretch(1); // Date Range TQGroupBox *rangeGroup = new TQGroupBox(1, Qt::Horizontal, i18n("Date Range"), page); - tqlayout->addWidget(rangeGroup); + layout->addWidget(rangeGroup); TQWidget *rangeWidget = new TQWidget(rangeGroup); TQHBoxLayout *rangeLayout = new TQHBoxLayout(rangeWidget, 0, spacingHint()); @@ -64,29 +64,29 @@ PrintDialog::PrintDialog() _from = new KDateEdit(rangeWidget); // Default from date to beginning of the month - year = TQDate::tqcurrentDate().year(); - month = TQDate::tqcurrentDate().month(); + year = TQDate::currentDate().year(); + month = TQDate::currentDate().month(); _from->setDate(TQDate(year, month, 1)); rangeLayout->addWidget(_from); rangeLayout->addWidget(new TQLabel(i18n("To:"), rangeWidget)); _to = new KDateEdit(rangeWidget); rangeLayout->addWidget(_to); - tqlayout->addSpacing(10); - tqlayout->addStretch(1); + layout->addSpacing(10); + layout->addStretch(1); _allTasks = new TQComboBox( page ); _allTasks->insertItem( i18n( "Selected Task" ) ); _allTasks->insertItem( i18n( "All Tasks" ) ); - tqlayout->addWidget( _allTasks ); + layout->addWidget( _allTasks ); _perWeek = new TQCheckBox( i18n( "Summarize per week" ), page ); - tqlayout->addWidget( _perWeek ); + layout->addWidget( _perWeek ); _totalsOnly = new TQCheckBox( i18n( "Totals only" ), page ); - tqlayout->addWidget( _totalsOnly ); + layout->addWidget( _totalsOnly ); - tqlayout->addSpacing(10); - tqlayout->addStretch(1); + layout->addSpacing(10); + layout->addStretch(1); } TQDate PrintDialog::from() const diff --git a/karm/task.cpp b/karm/task.cpp index 03eb1d3b2..7d84bcd2c 100644 --- a/karm/task.cpp +++ b/karm/task.cpp @@ -75,13 +75,13 @@ void Task::init( const TQString& taskName, long minutes, long sessionTime, _removing = false; _name = taskName.stripWhiteSpace(); - _lastStart = TQDateTime::tqcurrentDateTime(); + _lastStart = TQDateTime::currentDateTime(); _totalTime = _time = minutes; _totalSessionTime = _sessionTime = sessionTime; _timer = new TQTimer(this); _desktops = desktops; connect(_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(updateActiveIcon())); - setPixmap(1, UserIcon(TQString::tqfromLatin1("empty-watch.xpm"))); + setPixmap(1, UserIcon(TQString::fromLatin1("empty-watch.xpm"))); _currentPic = 0; _percentcomplete = percent_complete; @@ -119,7 +119,7 @@ void Task::setRunning( bool on, KarmStorage* storage, TQDateTime whenStarted, TQ if ( ! _removing ) { storage->stopTimer(this, whenStopped); - setPixmap(1, UserIcon(TQString::tqfromLatin1("empty-watch.xpm"))); + setPixmap(1, UserIcon(TQString::fromLatin1("empty-watch.xpm"))); } } } @@ -164,13 +164,13 @@ void Task::setPercentComplete(const int percent, KarmStorage *storage) setPixmapProgress(); - // When parent marked as complete, mark all tqchildren as complete as well. + // When parent marked as complete, mark all children as complete as well. // Complete tasks are not displayed in the task view, so if a parent is - // marked as complete and some of the tqchildren are not, then we get an error + // marked as complete and some of the children are not, then we get an error // message. KArm actually keep chugging along in this case and displays the // child tasks just fine, so an alternative solution is to remove that error // message (from KarmStorage::load). But I think it makes more sense that - // if you mark a parent task as complete, then all tqchildren should be + // if you mark a parent task as complete, then all children should be // complete as well. // // This behavior is consistent with KOrganizer (as of 2003-09-24). @@ -290,7 +290,7 @@ TQString Task::fullName() const if (isRoot()) return name(); else - return parent()->fullName() + TQString::tqfromLatin1("/") + name(); + return parent()->fullName() + TQString::fromLatin1("/") + name(); } KCal::Todo* Task::asTodo(KCal::Todo* todo) const @@ -349,7 +349,7 @@ bool Task::parseIncidence( KCal::Incidence* incident, long& minutes, TQString desktopList = incident->customProperty( kapp->instanceName(), TQCString( "desktopList" ) ); - TQStringList desktopStrList = TQStringList::split( TQString::tqfromLatin1(","), + TQStringList desktopStrList = TQStringList::split( TQString::fromLatin1(","), desktopList ); desktops.clear(); @@ -380,7 +380,7 @@ TQString Task::getDesktopStr() const for ( DesktopList::const_iterator iter = _desktops.begin(); iter != _desktops.end(); ++iter ) { - desktopstr += TQString::number( *iter ) + TQString::tqfromLatin1( "," ); + desktopstr += TQString::number( *iter ) + TQString::fromLatin1( "," ); } desktopstr.remove( desktopstr.length() - 1, 1 ); return desktopstr; @@ -419,7 +419,7 @@ void Task::update() void Task::addComment( TQString comment, KarmStorage* storage ) { - _comment = _comment + TQString::tqfromLatin1("\n") + comment; + _comment = _comment + TQString::fromLatin1("\n") + comment; storage->addComment(this, comment); } diff --git a/karm/task.h b/karm/task.h index 53c7abcc9..2d3d5a55a 100644 --- a/karm/task.h +++ b/karm/task.h @@ -178,11 +178,11 @@ class Task : public TQObject, public TQListViewItem * @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 - TQDateTime::tqcurrentDateTime, 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, TQDateTime whenStarted=TQDateTime::tqcurrentDateTime(), TQDateTime whenStopped=TQDateTime::tqcurrentDateTime()); + 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 @@ -208,7 +208,7 @@ class Task : public TQObject, public TQListViewItem /** tells you whether this task is the root of the task tree */ bool isRoot() const { return parent() == 0; } - /** remove Task with all it's tqchildren + /** remove Task with all it's children * @param activeTasks - list of aktive tasks * @param storage a pointer to a KarmStorage object. */ @@ -231,7 +231,7 @@ class Task : public TQObject, public TQListViewItem /** Return true if task is complete (percent complete equals 100). */ bool isComplete(); - /** Remove current task and all it's tqchildren from the view. */ + /** Remove current task and all it's children from the view. */ void removeFromView(); /** delivers when the task was started last */ diff --git a/karm/taskview.cpp b/karm/taskview.cpp index b4f655ff9..d59ec65bf 100644 --- a/karm/taskview.cpp +++ b/karm/taskview.cpp @@ -1,12 +1,12 @@ -#include <tqclipboard.h> +#include <clipboard.h> #include <tqfile.h> -#include <tqlayout.h> +#include <layout.h> #include <tqlistbox.h> #include <tqlistview.h> #include <tqptrlist.h> #include <tqptrstack.h> #include <tqstring.h> -#include <tqtextstream.h> +#include <textstream.h> #include <tqtimer.h> #include <tqxml.h> @@ -255,7 +255,7 @@ void TaskView::refresh() t->setPixmapProgress(); } - // remove root decoration if there is no more tqchildren. + // remove root decoration if there is no more children. bool anyChilds = false; for(Task* child = first_child(); child; @@ -613,7 +613,7 @@ void TaskView::editTask() // bool ok; // TQString comment = KLineEditDlg::getText(i18n("Comment"), -// i18n("Log comment for task '%1':").tqarg(task->name()), +// i18n("Log comment for task '%1':").arg(task->name()), // TQString(), &ok, this); // if ( ok ) // task->addComment( comment, _storage ); @@ -651,7 +651,7 @@ void TaskView::deleteTask(bool markingascomplete) response = KMessageBox::warningContinueCancel( 0, i18n( "Are you sure you want to delete " "the task named\n\"%1\" and its entire history?") - .tqarg(task->name()), + .arg(task->name()), i18n( "Deleting Task"), KStdGuiItem::del()); } else { @@ -659,7 +659,7 @@ void TaskView::deleteTask(bool markingascomplete) i18n( "Are you sure you want to delete the task named" "\n\"%1\" and its entire history?\n" "NOTE: all its subtasks and their history will also " - "be deleted.").tqarg(task->name()), + "be deleted.").arg(task->name()), i18n( "Deleting Task"), KStdGuiItem::del()); } } @@ -688,7 +688,7 @@ void TaskView::deleteTask(bool markingascomplete) save(); } - // remove root decoration if there is no more tqchildren. + // remove root decoration if there is no more children. refresh(); // Stop idle detection if no more counters are running @@ -820,16 +820,16 @@ void TaskView::clipTotals() i18n("Copy This Task"), i18n("Copy All Tasks") ); if (response == KMessageBox::Yes) // This task only { - KApplication::tqclipboard()->setText(t.totalsAsText(this, true, TimeKard::TotalTime)); + KApplication::clipboard()->setText(t.totalsAsText(this, true, TimeKard::TotalTime)); } else // All tasks { - KApplication::tqclipboard()->setText(t.totalsAsText(this, false, TimeKard::TotalTime)); + KApplication::clipboard()->setText(t.totalsAsText(this, false, TimeKard::TotalTime)); } } else { - KApplication::tqclipboard()->setText(t.totalsAsText(this, true, TimeKard::TotalTime)); + KApplication::clipboard()->setText(t.totalsAsText(this, true, TimeKard::TotalTime)); } } @@ -844,16 +844,16 @@ void TaskView::clipSession() i18n("Copy This Task"), i18n("Copy All Tasks") ); if (response == KMessageBox::Yes) // this task only { - KApplication::tqclipboard()->setText(t.totalsAsText(this, true, TimeKard::SessionTime)); + KApplication::clipboard()->setText(t.totalsAsText(this, true, TimeKard::SessionTime)); } else // only task { - KApplication::tqclipboard()->setText(t.totalsAsText(this, false, TimeKard::SessionTime)); + KApplication::clipboard()->setText(t.totalsAsText(this, false, TimeKard::SessionTime)); } } else { - KApplication::tqclipboard()->setText(t.totalsAsText(this, true, TimeKard::SessionTime)); + KApplication::clipboard()->setText(t.totalsAsText(this, true, TimeKard::SessionTime)); } } @@ -863,7 +863,7 @@ void TaskView::clipHistory() if (dialog.exec()== TQDialog::Accepted) { TimeKard t; - KApplication::tqclipboard()-> + KApplication::clipboard()-> setText( t.historyAsText(this, dialog.from(), dialog.to(), !dialog.allTasks(), dialog.perWeek(), dialog.totalsOnly() ) ); } } diff --git a/karm/taskview.h b/karm/taskview.h index f1b22048f..4c5df371a 100644 --- a/karm/taskview.h +++ b/karm/taskview.h @@ -142,11 +142,11 @@ class TaskView : public KListView KarmStorage* storage(); /** - * Delete task (and tqchildren) from view. + * Delete task (and children) from view. * * @param markingascomplete If false (the default), deletes history for - * current task and all tqchildren. If markingascomplete is true, then sets - * percent complete to 100 and removes task and all it's tqchildren from the + * current task and all children. If markingascomplete is true, then sets + * percent complete to 100 and removes task and all it's children from the * list view. */ void deleteTask(bool markingascomplete=false); @@ -173,7 +173,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, TQDateTime startTime = TQDateTime::tqcurrentDateTime() ); + 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 diff --git a/karm/test/README b/karm/test/README index a5307e6ee..32a32f6e2 100644 --- a/karm/test/README +++ b/karm/test/README @@ -1,6 +1,6 @@ This directory holds automated tests for karm. -It's in very rough tqshape. +It's in very rough shape. How you start: diff --git a/karm/test/lifetest.php b/karm/test/lifetest.php index afd423ccb..7a24bd3d7 100644 --- a/karm/test/lifetest.php +++ b/karm/test/lifetest.php @@ -96,7 +96,7 @@ if ($argv[1]!="--batch") echo "(b) make sure the code still builds (make)\n"; echo "(c) run automated test routines like this (make check)\n\n"; - echo "This program simulates keypresses, so please leave the keyboard alone during the test. Please use a us or de keyboardtqlayout (setxkbmap us). This must be run in X environment.\n + echo "This program simulates keypresses, so please leave the keyboard alone during the test. Please use a us or de keyboardlayout (setxkbmap us). This must be run in X environment.\n You must have XAutomation installed to run this."; system("xte -h 2&>/dev/null",$rc); if ($rc==0) echo " You have.\n"; @@ -132,7 +132,7 @@ else // the mouse can be in the way, so, move it out. This here even works with "focus strictly under mouse". system("xte 'mousemove 1 1'"); echo "\nStarting karm"; - $process=popen("karm --tqgeometry 200x100+0+0 /tmp/karmtest.ics >/dev/null 2>&1", 'w'); + $process=popen("karm --geometry 200x100+0+0 /tmp/karmtest.ics >/dev/null 2>&1", 'w'); $rc=1; while ($rc==1) system("dcop `dcop 2>/dev/null | grep karm` KarmDCOPIface version",$rc); echo "mainwindow is ready"; diff --git a/karm/test/lockerthread.cpp b/karm/test/lockerthread.cpp index aeff6cc76..914682210 100644 --- a/karm/test/lockerthread.cpp +++ b/karm/test/lockerthread.cpp @@ -26,7 +26,7 @@ void LockerThread::run() KCal::ResourceCalendar *calendar = 0; KCal::CalendarResources::Ticket *lock = 0; - calendars = new KCal::CalendarResources( TQString::tqfromLatin1( "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/locking.cpp b/karm/test/locking.cpp index cdf5e41a5..71113f79b 100644 --- a/karm/test/locking.cpp +++ b/karm/test/locking.cpp @@ -23,7 +23,7 @@ short test1() KCal::ResourceCalendar *calendar = 0; KCal::CalendarResources::Ticket *lock = 0; - calendars = new KCal::CalendarResources( TQString::tqfromLatin1( "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( TQString::tqfromLatin1( "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( TQString::tqfromLatin1( "UTC" ) ); + calendars = new KCal::CalendarResources( TQString::fromLatin1( "UTC" ) ); calendar = new KCal::ResourceLocal( icalfilename ); // lock then unlock diff --git a/karm/test/runscripts.cpp b/karm/test/runscripts.cpp index e3a25a15f..1d9be75c1 100644 --- a/karm/test/runscripts.cpp +++ b/karm/test/runscripts.cpp @@ -22,7 +22,7 @@ #include <tqfile.h> #include <tqstring.h> #include <tqstringlist.h> -#include <tqtextstream.h> +#include <textstream.h> #include "script.h" diff --git a/karm/test/script.cpp b/karm/test/script.cpp index 58e5af3bc..816314368 100644 --- a/karm/test/script.cpp +++ b/karm/test/script.cpp @@ -94,7 +94,7 @@ void Script::terminate() void Script::exit() { - m_status = m_proc->exitqStatus(); + m_status = m_proc->exiStatus(); delete m_proc; m_proc = 0; } diff --git a/karm/timekard.cpp b/karm/timekard.cpp index d9b8d4a76..984baf741 100644 --- a/karm/timekard.cpp +++ b/karm/timekard.cpp @@ -43,7 +43,7 @@ const int timeWidth = 6; const int totalTimeWidth = 7; const int reportWidth = taskWidth + timeWidth; -const TQString cr = TQString::tqfromLatin1("\n"); +const TQString cr = TQString::fromLatin1("\n"); TQString TimeKard::totalsAsText(TaskView* taskview, bool justThisTask, WhichTime which) // Print the total Times as text. If justThisTask, use activeTask, else, all tasks @@ -59,11 +59,11 @@ TQString TimeKard::totalsAsText(TaskView* taskview, bool justThisTask, WhichTime // header retval += i18n("Task Totals") + cr; - retval += KGlobal::locale()->formatDateTime(TQDateTime::tqcurrentDateTime()); + retval += KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime()); retval += cr + cr; - retval += TQString(TQString::tqfromLatin1("%1 %2")) - .tqarg(i18n("Time"), timeWidth) - .tqarg(i18n("Task")); + retval += TQString(TQString::fromLatin1("%1 %2")) + .arg(i18n("Time"), timeWidth) + .arg(i18n("Task")); retval += cr; retval += line; @@ -92,10 +92,10 @@ TQString TimeKard::totalsAsText(TaskView* taskview, bool justThisTask, WhichTime // total buf.fill('-', reportWidth); - retval += TQString(TQString::tqfromLatin1("%1")).tqarg(buf, timeWidth) + cr; - retval += TQString(TQString::tqfromLatin1("%1 %2")) - .tqarg(formatTime(sum),timeWidth) - .tqarg(i18n("Total")); + retval += TQString(TQString::fromLatin1("%1")).arg(buf, timeWidth) + cr; + retval += TQString(TQString::fromLatin1("%1 %2")) + .arg(formatTime(sum),timeWidth) + .arg(i18n("Total")); } else retval += i18n("No tasks."); @@ -109,9 +109,9 @@ void TimeKard::printTask(Task *task, TQString &s, int level, WhichTime which) TQString buf; s += buf.fill(' ', level); - s += TQString(TQString::tqfromLatin1("%1 %2")) - .tqarg(formatTime(which == TotalTime?task->totalTime():task->totalSessionTime()), timeWidth) - .tqarg(task->name()); + s += TQString(TQString::fromLatin1("%1 %2")) + .arg(formatTime(which == TotalTime?task->totalTime():task->totalSessionTime()), timeWidth) + .arg(task->name()); s += cr; for (Task* subTask = task->firstChild(); @@ -134,17 +134,17 @@ void TimeKard::printTaskHistory(const Task *task, long sectionsum = 0; for ( TQDate day = from; day <= to; day = day.addDays(1) ) { - TQString daykey = day.toString(TQString::tqfromLatin1("yyyyMMdd")); - TQString daytaskkey = TQString::tqfromLatin1("%1_%2") - .tqarg(daykey) - .tqarg(task->uid()); + TQString daykey = day.toString(TQString::fromLatin1("yyyyMMdd")); + TQString daytaskkey = TQString::fromLatin1("%1_%2") + .arg(daykey) + .arg(task->uid()); if (taskdaytotals.contains(daytaskkey)) { if ( !totalsOnly ) { - s += TQString::tqfromLatin1("%1") - .tqarg(formatTime(taskdaytotals[daytaskkey]/60), timeWidth); + s += TQString::fromLatin1("%1") + .arg(formatTime(taskdaytotals[daytaskkey]/60), timeWidth); } sectionsum += taskdaytotals[daytaskkey]; // in seconds @@ -162,12 +162,12 @@ void TimeKard::printTaskHistory(const Task *task, } // Total for task this section (e.g. week) - s += TQString::tqfromLatin1("%1").tqarg(formatTime(sectionsum/60), totalTimeWidth); + s += TQString::fromLatin1("%1").arg(formatTime(sectionsum/60), totalTimeWidth); // Task name TQString buf; s += buf.fill(' ', level + 1); - s += TQString::tqfromLatin1("%1").tqarg(task->name()); + s += TQString::fromLatin1("%1").arg(task->name()); s += cr; for (Task* subTask = task->firstChild(); @@ -221,10 +221,10 @@ TQString TimeKard::sectionHistoryAsText( // so times are accumulated for each task. for (TQValueList<HistoryEvent>::iterator event = events.begin(); event != events.end(); ++event) { - TQString daykey = (*event).start().date().toString(TQString::tqfromLatin1("yyyyMMdd")); - TQString daytaskkey = TQString::tqfromLatin1("%1_%2") - .tqarg(daykey) - .tqarg((*event).todoUid()); + TQString daykey = (*event).start().date().toString(TQString::fromLatin1("yyyyMMdd")); + TQString daytaskkey = TQString::fromLatin1("%1_%2") + .arg(daykey) + .arg((*event).todoUid()); if (taskdaytotals.contains(daytaskkey)) taskdaytotals.replace(daytaskkey, @@ -246,7 +246,7 @@ TQString TimeKard::sectionHistoryAsText( // day headings for (TQDate day = sectionFrom; day <= sectionTo; day = day.addDays(1)) { - retval += TQString::tqfromLatin1("%1").tqarg(day.day(), timeWidth); + retval += TQString::fromLatin1("%1").arg(day.day(), timeWidth); } retval += cr; retval += line; @@ -280,14 +280,14 @@ TQString TimeKard::sectionHistoryAsText( long sum = 0; for (TQDate day = sectionFrom; day <= sectionTo; day = day.addDays(1)) { - TQString daykey = day.toString(TQString::tqfromLatin1("yyyyMMdd")); + TQString daykey = day.toString(TQString::fromLatin1("yyyyMMdd")); if (daytotals.contains(daykey)) { if ( !totalsOnly ) { - retval += TQString::tqfromLatin1("%1") - .tqarg(formatTime(daytotals[daykey]/60), timeWidth); + retval += TQString::fromLatin1("%1") + .arg(formatTime(daytotals[daykey]/60), timeWidth); } sum += daytotals[daykey]; // in seconds } @@ -298,9 +298,9 @@ TQString TimeKard::sectionHistoryAsText( } } - retval += TQString::tqfromLatin1("%1 %2") - .tqarg(formatTime(sum/60), totalTimeWidth) - .tqarg(i18n("Total")); + retval += TQString::fromLatin1("%1 %2") + .arg(formatTime(sum/60), totalTimeWidth) + .arg(i18n("Total")); } return retval; } @@ -313,11 +313,11 @@ TQString TimeKard::historyAsText(TaskView* taskview, const TQDate& from, retval += totalsOnly ? i18n("Task Totals") : i18n("Task History"); retval += cr; retval += i18n("From %1 to %2") - .tqarg(KGlobal::locale()->formatDate(from)) - .tqarg(KGlobal::locale()->formatDate(to)); + .arg(KGlobal::locale()->formatDate(from)) + .arg(KGlobal::locale()->formatDate(to)); retval += cr; retval += i18n("Printed on: %1") - .tqarg(KGlobal::locale()->formatDateTime(TQDateTime::tqcurrentDateTime())); + .arg(KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime())); if ( perWeek ) { @@ -353,7 +353,7 @@ TQDate Week::end() const TQString Week::name() const { - return i18n("Week of %1").tqarg(KGlobal::locale()->formatDate(start())); + return i18n("Week of %1").arg(KGlobal::locale()->formatDate(start())); } TQValueList<Week> Week::weeksFromDateRange(const TQDate& from, const TQDate& to) diff --git a/karm/tray.cpp b/karm/tray.cpp index 20c2f51e6..55e050c52 100644 --- a/karm/tray.cpp +++ b/karm/tray.cpp @@ -9,7 +9,7 @@ // #include <tqkeycode.h> -// #include <tqlayout.h> +// #include <layout.h> #include <tqpixmap.h> #include <tqptrlist.h> #include <tqstring.h> @@ -59,9 +59,9 @@ KarmTray::KarmTray(MainWindow* parent) // this are experiments/tests /* for (int i=0; i<30; i++) - _tray->insertTitle(i 18n("bla ").tqarg(i)); + _tray->insertTitle(i 18n("bla ").arg(i)); for (int i=0; i<30; i++) - _tray->insertTitle2(i 18n("bli ").tqarg(i)); + _tray->insertTitle2(i 18n("bli ").arg(i)); */ // experimenting with menus for the tray /* |