diff options
Diffstat (limited to 'karm')
47 files changed, 258 insertions, 244 deletions
@@ -1,6 +1,6 @@ * KarmWindow::makeMenus -> export KAction? KarmWindow::contextMenuRequest * QPopupMenu should be static! put connect( ..contextMenu at the right place -* mainwindow: move tray signals into tray.cpp add mouse double-click action +* mainwindow: move tray Q_SIGNALS into tray.cpp add mouse double-click action * (start new timer, stop old) to "Configure Shortcuts" dialog. diff --git a/karm/csvexportdialog.cpp b/karm/csvexportdialog.cpp index f1e0fce66..7cb7774ff 100644 --- a/karm/csvexportdialog.cpp +++ b/karm/csvexportdialog.cpp @@ -33,10 +33,10 @@ #include "reportcriteria.h" CSVExportDialog::CSVExportDialog( ReportCriteria::REPORTTYPE rt, - TQWidget *parent, + TQWidget *tqparent, const char *name ) - : CSVExportDialogBase( parent, name ) + : CSVExportDialogBase( tqparent, name ) { switch ( rt ) { case ReportCriteria::CSVTotalsExport: diff --git a/karm/csvexportdialog.h b/karm/csvexportdialog.h index fe13cf9c6..51aaf3bd6 100644 --- a/karm/csvexportdialog.h +++ b/karm/csvexportdialog.h @@ -27,10 +27,11 @@ class CSVExportDialog : public CSVExportDialogBase { Q_OBJECT + TQ_OBJECT public: CSVExportDialog( ReportCriteria::REPORTTYPE rt, - TQWidget *parent = 0, + TQWidget *tqparent = 0, const char *name = 0 ); diff --git a/karm/csvexportdialog_base.ui b/karm/csvexportdialog_base.ui index 0c985127a..8d4232af4 100644 --- a/karm/csvexportdialog_base.ui +++ b/karm/csvexportdialog_base.ui @@ -1,6 +1,6 @@ <!DOCTYPE UI><UI version="3.3" stdsetdef="1"> <class>CSVExportDialogBase</class> -<widget class="QDialog"> +<widget class="TQDialog"> <property name="name"> <cstring>CSVExportDialogBase</cstring> </property> @@ -75,7 +75,7 @@ <string>&Cancel</string> </property> </widget> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1_3</cstring> </property> @@ -91,7 +91,7 @@ <string>The file where Karm will write the data.</string> </property> </widget> - <widget class="QLabel" row="4" column="0" rowspan="1" colspan="2"> + <widget class="TQLabel" row="4" column="0" rowspan="1" colspan="2"> <property name="name"> <cstring>quotesLabel</cstring> </property> @@ -110,7 +110,7 @@ <string>Quotes:</string> </property> </widget> - <widget class="QComboBox" row="4" column="2" rowspan="1" colspan="2"> + <widget class="TQComboBox" row="4" column="2" rowspan="1" colspan="2"> <item> <property name="text"> <string>"</string> @@ -139,7 +139,7 @@ <string>All fields are quoted in the output.</string> </property> </widget> - <widget class="QGroupBox" row="1" column="0" rowspan="1" colspan="4"> + <widget class="TQGroupBox" row="1" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>grpDateRange</cstring> </property> @@ -156,7 +156,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QLabel" row="0" column="0"> + <widget class="TQLabel" row="0" column="0"> <property name="name"> <cstring>textLabel1</cstring> </property> @@ -180,7 +180,7 @@ <enum>StrongFocus</enum> </property> </widget> - <widget class="QLabel" row="0" column="1"> + <widget class="TQLabel" row="0" column="1"> <property name="name"> <cstring>textLabel1_2</cstring> </property> @@ -206,7 +206,7 @@ </widget> </grid> </widget> - <widget class="QButtonGroup" row="2" column="0" rowspan="1" colspan="4"> + <widget class="TQButtonGroup" row="2" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>grpTimeFormat</cstring> </property> @@ -221,7 +221,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton" row="0" column="1"> + <widget class="TQRadioButton" row="0" column="1"> <property name="name"> <cstring>radioHoursMinutes</cstring> </property> @@ -232,7 +232,7 @@ <string>Hours:Minutes</string> </property> </widget> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>radioDecimal</cstring> </property> @@ -245,7 +245,7 @@ </widget> </grid> </widget> - <widget class="QButtonGroup" row="3" column="0" rowspan="1" colspan="4"> + <widget class="TQButtonGroup" row="3" column="0" rowspan="1" colspan="4"> <property name="name"> <cstring>grpDelimiter</cstring> </property> @@ -267,7 +267,7 @@ <property name="name"> <cstring>unnamed</cstring> </property> - <widget class="QRadioButton" row="1" column="0"> + <widget class="TQRadioButton" row="1" column="0"> <property name="name"> <cstring>radioTab</cstring> </property> @@ -275,7 +275,7 @@ <string>Tab</string> </property> </widget> - <widget class="QRadioButton" row="0" column="2"> + <widget class="TQRadioButton" row="0" column="2"> <property name="name"> <cstring>radioOther</cstring> </property> @@ -283,7 +283,7 @@ <string>Other:</string> </property> </widget> - <widget class="QRadioButton" row="1" column="1"> + <widget class="TQRadioButton" row="1" column="1"> <property name="name"> <cstring>radioSpace</cstring> </property> @@ -291,7 +291,7 @@ <string>Space</string> </property> </widget> - <widget class="QRadioButton" row="0" column="0"> + <widget class="TQRadioButton" row="0" column="0"> <property name="name"> <cstring>radioComma</cstring> </property> @@ -302,7 +302,7 @@ <bool>true</bool> </property> </widget> - <widget class="QLineEdit" row="1" column="2"> + <widget class="TQLineEdit" row="1" column="2"> <property name="name"> <cstring>txtOther</cstring> </property> @@ -330,7 +330,7 @@ <number>1</number> </property> </widget> - <widget class="QRadioButton" row="0" column="1"> + <widget class="TQRadioButton" row="0" column="1"> <property name="name"> <cstring>radioSemicolon</cstring> </property> @@ -402,9 +402,9 @@ <tabstop>btnExport</tabstop> <tabstop>btnCancel</tabstop> </tabstops> -<slots> +<Q_SLOTS> <slot>enableExportButton()</slot> -</slots> +</Q_SLOTS> <tqlayoutdefaults spacing="6" margin="11"/> <includehints> <includehint>kdateedit.h</includehint> diff --git a/karm/desktoptracker.cpp b/karm/desktoptracker.cpp index 04f4d9d13..3c9e5e846 100644 --- a/karm/desktoptracker.cpp +++ b/karm/desktoptracker.cpp @@ -1,4 +1,4 @@ -#include <algorithm> // std::find +#include <algorithm> // std::tqfind #include <tqtimer.h> #include <kdebug.h> @@ -84,7 +84,7 @@ void DesktopTracker::registerForDesktops( Task* task, DesktopList desktopList) if (desktopList.size()==0) { for (int i=0; i<maxDesktops; i++) { TaskVector *v = &(desktopTracker[i]); - TaskVector::iterator tit = std::find(v->begin(), v->end(), task); + TaskVector::iterator tit = std::tqfind(v->begin(), v->end(), task); if (tit != v->end()) desktopTracker[i].erase(tit); // if the task was priviously tracking this desktop then @@ -96,15 +96,15 @@ void DesktopTracker::registerForDesktops( Task* task, DesktopList desktopList) return; } - // If desktop tqcontains entries then configure desktopTracker + // If desktop contains entries then configure desktopTracker // If a desktop was disabled, it will not be stopped automatically. // If enabled: Start it now. if (desktopList.size()>0) { for (int i=0; i<maxDesktops; i++) { TaskVector& v = desktopTracker[i]; - TaskVector::iterator tit = std::find(v.begin(), v.end(), task); + TaskVector::iterator tit = std::tqfind(v.begin(), v.end(), task); // Is desktop i in the desktop list? - if ( std::find( desktopList.begin(), desktopList.end(), i) + if ( std::tqfind( desktopList.begin(), desktopList.end(), i) != desktopList.end()) { if (tit == v.end()) // not yet in start vector v.push_back(task); // track in desk i diff --git a/karm/desktoptracker.h b/karm/desktoptracker.h index f7fdd69c7..b24b77389 100644 --- a/karm/desktoptracker.h +++ b/karm/desktoptracker.h @@ -18,9 +18,10 @@ const int maxDesktops = 20; * each task tracking that all tasks that want to track that desktop */ -class DesktopTracker: public QObject +class DesktopTracker: public TQObject { Q_OBJECT + TQ_OBJECT public: DesktopTracker(); @@ -33,7 +34,7 @@ class DesktopTracker: public QObject KWinModule kWinModule; // define vectors for at most 16 virtual desktops - // E.g.: desktopTrackerStop[3] tqcontains a vector with + // E.g.: desktopTrackerStop[3] contains a vector with // all tasks to be notified, when switching to/from desk 3. TaskVector desktopTracker[maxDesktops]; int _previousDesktop; diff --git a/karm/doc/Mainpage.dox b/karm/doc/Mainpage.dox index 7c8aee5f5..4bb930f3f 100644 --- a/karm/doc/Mainpage.dox +++ b/karm/doc/Mainpage.dox @@ -24,7 +24,7 @@ order and can return a pointer to a KCal::Todo object that holds the same information. Preferences is a singleton that stores configuration options. It raises -signals when options change (for example, the location where the karm data is +Q_SIGNALS when options change (for example, the location where the karm data is stored) so the application can react and adjust. KarmStorage is a singleton that creates an interface for storing KArm data. @@ -35,7 +35,7 @@ format. /** \page sig_slot_index Index of Signals and Slots -To get an understanding of the flow program, it may be useful to see an overview of all of the signals, slots, and +To get an understanding of the flow program, it may be useful to see an overview of all of the Q_SIGNALS, Q_SLOTS, and connections. See \see connections to get an index of what signal is connected to which slot. \section overview Summary of what each class provides @@ -60,9 +60,9 @@ connections. See \see connections to get an index of what signal is connected to <tr><td>Task</td> <td> </td> <td> </td> <td>Y </td> <td> </td></tr> </table> -\section signals Listing of all of the signals +\section Q_SIGNALS Listing of all of the Q_SIGNALS -These are the signals: +These are the Q_SIGNALS: <ol> <li>IdleTimer::extractTime(int) <li>IdleTimer::stopTimer() @@ -83,7 +83,7 @@ These are the signals: <li>Preferences::hideOnClose(bool) </ol> -\section slots Listing of the slots +\section Q_SLOTS Listing of the Q_SLOTS \subsection public Public Slots diff --git a/karm/doc/design b/karm/doc/design index be9a425fa..fe37a3002 100644 --- a/karm/doc/design +++ b/karm/doc/design @@ -35,24 +35,24 @@ On Thursday 24 October 2002 06:37 pm, tomas pospisek wrote: > > Id Description > > --------------------------------------------------------------------- > > 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 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 +> > has at least one subtask it will be referred to as a tqparent task. +> > If a task has no tqchildren it will be referred to as a leaf task. +> > If a task has no tqparent tasks it will be referred to as a root > > task. > > 2 A new task can be created as a child of any existing task. -> > 2.1 If the parent had a timer active, it will continue to be active +> > 2.1 If the tqparent had a timer active, it will continue to be active > > It depends on how you start it. If you double click it. Any other timer > will be stopped and the new task started. If you start it through the > start button, both tasks will be active. This a bug IMO. See at the bottom > for my proposal. > -> > 2.2 The session time for the parent will not be changed by adding +> > 2.2 The session time for the tqparent will not be changed by adding > > the new child task. -> > 2.3 The total time for the parent will not be changed by adding a +> > 2.3 The total time for the tqparent will not be changed by adding a > > the new child task. -> > 3 Any task (parent, leaf, or root) may have an independent timer. -> > 4 The time (both session and total) for a parent will be the sum +> > 3 Any task (tqparent, leaf, or root) may have an independent timer. +> > 4 The time (both session and total) for a tqparent will be the sum > > of its independent timer and the sum of all of its child timers. > > > > Unstable Development @@ -62,21 +62,21 @@ On Thursday 24 October 2002 06:37 pm, tomas pospisek wrote: > > Id Description > > --------------------------------------------------------------------- > > 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 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 +> > has at least one subtask it will be referred to as a tqparent task. +> > If a task has no tqchildren it will be referred to as a leaf task. +> > If a task has no tqparent tasks it will be referred to as a root > > task. > > 2 A new task can be created as a child of any existing task. -> > 2.1 If the parent had a timer active, it will be deactivated -> > 2.2 The session time for the parent will set to zero +> > 2.1 If the tqparent had a timer active, it will be deactivated +> > 2.2 The session time for the tqparent will set to zero > > 2.2.1 The session time for the child will be initialized to the last -> > session time of the parent. -> > 2.3 The total time for the parent will be set to zero. -> > 2.3.1 The total time for the parent will be initialized to the last -> > total time of the parent. -> > 3 Only a leaf task may have a timer. A parent may not have its own +> > session time of the tqparent. +> > 2.3 The total time for the tqparent will be set to zero. +> > 2.3.1 The total time for the tqparent will be initialized to the last +> > total time of the tqparent. +> > 3 Only a leaf task may have a timer. A tqparent may not have its own > > timer. -> > 4 The time (both session and total) for a parent will be the sum +> > 4 The time (both session and total) for a tqparent will be the sum > > only of its child timers. > > I see where you want to go, but I think it's not the right direction for @@ -134,7 +134,7 @@ idea but can't quite see how the interface should work. Ok. So, I'll undo the changes related to: * summing only leaf tasks -* disallowing edits on parent tasks +* disallowing edits on tqparent tasks _______________________________________________ kde-pim mailing list kde-pim@mail.kde.org diff --git a/karm/doc/updating_parents.html b/karm/doc/updating_parents.html index 3b55ce30f..63587952f 100644 --- a/karm/doc/updating_parents.html +++ b/karm/doc/updating_parents.html @@ -34,6 +34,6 @@ You should get something like this.</p> <tr><td> </td> <td>Session: 3</td> <td>Total: 18</td></tr> </table> -<p>Since a parent task can have a timer active on it, it needs to be included in the summary +<p>Since a tqparent task can have a timer active on it, it needs to be included in the summary Session and Total times. So, in this example, the Session time will jump three minutes for every minute the timer is active.</p> diff --git a/karm/edittaskdialog.cpp b/karm/edittaskdialog.cpp index b7b1abe75..a556550a9 100644 --- a/karm/edittaskdialog.cpp +++ b/karm/edittaskdialog.cpp @@ -148,7 +148,7 @@ EditTaskDialog::EditTaskDialog( TQString caption, bool editDlg, desktopCount = kwinmodule.numberOfDesktops(); - // If desktopList tqcontains higher numbered desktops than desktopCount then + // If desktopList contains higher numbered desktops than desktopCount then // delete those from desktopList. This may be the case if the user has // configured virtual desktops. The values in desktopList are sorted. if ( (desktopList != 0) && (desktopList->size() > 0) ) @@ -201,7 +201,7 @@ EditTaskDialog::EditTaskDialog( TQString caption, bool editDlg, } enableDesktops = true; } - // if some desktops were specified, then enable the parent box + // if some desktops were specified, then enable the tqparent box _desktopCB->setChecked(enableDesktops); for (int i=0; i<desktopCount; i++) diff --git a/karm/edittaskdialog.h b/karm/edittaskdialog.h index 2586d491e..6b928925b 100644 --- a/karm/edittaskdialog.h +++ b/karm/edittaskdialog.h @@ -43,6 +43,7 @@ class KArmTimeWidget; class EditTaskDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: EditTaskDialog(TQString caption, bool editDlg, DesktopList* desktopList=0); diff --git a/karm/idletimedetector.cpp b/karm/idletimedetector.cpp index 53f17c8c6..46ae03e93 100644 --- a/karm/idletimedetector.cpp +++ b/karm/idletimedetector.cpp @@ -68,11 +68,11 @@ void IdleTimeDetector::informOverrun(int idleSeconds) _timer->stop(); TQDateTime idleStart = TQDateTime::tqcurrentDateTime().addSecs(-idleSeconds); - TQString idleStartQString = KGlobal::locale()->formatTime(idleStart.time()); + 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?").arg(idleStartQString), + " What should we do?").arg(idleStartTQString), i18n("Revert && Stop"), i18n("Revert && Continue"), i18n("Continue Timing"),0,2); diff --git a/karm/idletimedetector.h b/karm/idletimedetector.h index 42b41d083..185bc5f23 100644 --- a/karm/idletimedetector.h +++ b/karm/idletimedetector.h @@ -25,9 +25,10 @@ const int testInterval= secsPerMinute * 1000; * Keep track of how long the computer has been idle. */ -class IdleTimeDetector :public QObject +class IdleTimeDetector :public TQObject { Q_OBJECT + TQ_OBJECT public: /** diff --git a/karm/kaccelmenuwatch.cpp b/karm/kaccelmenuwatch.cpp index ddabb1d86..75e4854e7 100644 --- a/karm/kaccelmenuwatch.cpp +++ b/karm/kaccelmenuwatch.cpp @@ -9,8 +9,8 @@ #include "kaccelmenuwatch.h" -KAccelMenuWatch::KAccelMenuWatch( KAccel *accel, TQObject *parent ) - : TQObject( parent ), +KAccelMenuWatch::KAccelMenuWatch( KAccel *accel, TQObject *tqparent ) + : TQObject( tqparent ), _accel( accel ), _menu ( 0 ) { diff --git a/karm/kaccelmenuwatch.h b/karm/kaccelmenuwatch.h index 042e4fda7..4b9c3058b 100644 --- a/karm/kaccelmenuwatch.h +++ b/karm/kaccelmenuwatch.h @@ -32,9 +32,10 @@ class TQPopupMenu; * @author Sirtaj Singh Kang (taj@kde.org) */ -class KAccelMenuWatch : public QObject +class KAccelMenuWatch : public TQObject { Q_OBJECT + TQ_OBJECT private: enum AccelType { StdAccel, StringAccel }; @@ -63,7 +64,7 @@ class KAccelMenuWatch : public QObject /** * KAccelMenuWatch Constructor */ - KAccelMenuWatch( KAccel *accel, TQObject *parent = 0 ); + KAccelMenuWatch( KAccel *accel, TQObject *tqparent = 0 ); /** * KAccelMenuWatch Destructor diff --git a/karm/karm_part.cpp b/karm/karm_part.cpp index 85259fe80..d8982e2eb 100644 --- a/karm/karm_part.cpp +++ b/karm/karm_part.cpp @@ -22,8 +22,8 @@ #include "mainwindow.h" karmPart::karmPart( TQWidget *tqparentWidget, const char *widgetName, - TQObject *parent, const char *name ) - : DCOPObject ( "KarmDCOPIface" ), KParts::ReadWritePart(parent, name), + TQObject *tqparent, const char *name ) + : DCOPObject ( "KarmDCOPIface" ), KParts::ReadWritePart(tqparent, name), _accel ( new KAccel( tqparentWidget ) ), _watcher ( new KAccelMenuWatch( _accel, tqparentWidget ) ) { @@ -312,7 +312,7 @@ void karmPart::setModified(bool modified) else save->setEnabled(false); - // in any event, we want our parent to do it's thing + // in any event, we want our tqparent to do it's thing ReadWritePart::setModified(modified); } @@ -333,7 +333,7 @@ bool karmPart::saveFile() if (isReadWrite() == false) return false; - // m_file is always local, so we use QFile + // m_file is always local, so we use TQFile TQFile file(m_file); if (file.open(IO_WriteOnly) == false) return false; @@ -388,11 +388,11 @@ karmPartFactory::~karmPartFactory() } KParts::Part* karmPartFactory::createPartObject( TQWidget *tqparentWidget, const char *widgetName, - TQObject *parent, const char *name, + TQObject *tqparent, const char *name, const char *classname, const TQStringList &args ) { // Create an instance of our Part - karmPart* obj = new karmPart( tqparentWidget, widgetName, parent, name ); + karmPart* obj = new karmPart( tqparentWidget, widgetName, tqparent, name ); // See if we are to be read-write or not if (TQCString(classname) == "KParts::ReadOnlyPart") @@ -509,11 +509,11 @@ TQString karmPart::setPerCentComplete( const TQString& taskName, int perCent ) if ((_taskView->item_at_index(i)->name()==taskName)) { index=i; - if (err==TQString::null) err="task name is abigious"; - if (err=="no such task") err=TQString::null; + if (err==TQString()) err="task name is abigious"; + if (err=="no such task") err=TQString(); } } - if (err==TQString::null) + if (err==TQString()) { _taskView->item_at_index(index)->setPercentComplete( perCent, _taskView->storage() ); } @@ -544,10 +544,10 @@ int karmPart::bookTime // Parse datetime if ( !rval ) { - startDate = TQDate::fromString( datetime, Qt::ISODate ); + startDate = TQDate::fromString( datetime, TQt::ISODate ); if ( datetime.length() > 10 ) // "YYYY-MM-DD".length() = 10 { - startTime = TQTime::fromString( datetime, Qt::ISODate ); + startTime = TQTime::fromString( datetime, TQt::ISODate ); } else startTime = TQTime( 12, 0 ); if ( startDate.isValid() && startTime.isValid() ) diff --git a/karm/karm_part.desktop b/karm/karm_part.desktop index 566678597..652d705d8 100644 --- a/karm/karm_part.desktop +++ b/karm/karm_part.desktop @@ -10,7 +10,7 @@ Name[pt]=Componente KArm Name[pt_BR]=Componente do KArm Name[sv]=Karm-delprogram Name[tr]=karmpart -MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++; +MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-tqmoc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++; ServiceTypes=KParts/ReadOnlyPart,KParts/ReadWritePart X-KDE-Library=libkarmpart Type=Service diff --git a/karm/karm_part.h b/karm/karm_part.h index 2d5b98bfe..bca83e32e 100644 --- a/karm/karm_part.h +++ b/karm/karm_part.h @@ -30,6 +30,7 @@ class TaskView; class karmPart : public KParts::ReadWritePart, virtual public KarmDCOPIface { Q_OBJECT + TQ_OBJECT private: void makeMenus(); @@ -59,7 +60,7 @@ class karmPart : public KParts::ReadWritePart, virtual public KarmDCOPIface public: karmPart(TQWidget *tqparentWidget, const char *widgetName, - TQObject *parent, const char *name); + TQObject *tqparent, const char *name); // DCOP void quit(); virtual bool save(); @@ -121,11 +122,12 @@ class KAboutData; class karmPartFactory : public KParts::Factory { Q_OBJECT + TQ_OBJECT public: karmPartFactory(); virtual ~karmPartFactory(); virtual KParts::Part* createPartObject( TQWidget *tqparentWidget, const char *widgetName, - TQObject *parent, const char *name, + TQObject *tqparent, const char *name, const char *classname, const TQStringList &args ); static KInstance* instance(); diff --git a/karm/karmdcopiface.h b/karm/karmdcopiface.h index 6c0480336..67e599383 100644 --- a/karm/karmdcopiface.h +++ b/karm/karmdcopiface.h @@ -38,7 +38,7 @@ class KarmDCOPIface : virtual public DCOPObject /** * Add a new top-level task. * - * A top-level task is one that has no parent tasks. + * A top-level task is one that has no tqparent tasks. * * @param taskName Name of new task. * @@ -67,7 +67,7 @@ class KarmDCOPIface : virtual public DCOPObject * * @param iso8601StartDateTime Date and time the booking starts, in extended * ISO-8601 format; for example, YYYY-MM-DDTHH:MI:SS format (see - * Qt::ISODate). No timezone support--time is interpreted as the local time. + * TQt::ISODate). No timezone support--time is interpreted as the local time. * If just the date is passed in (i.e., YYYY-MM-DD) , then the time is set to * noon. * diff --git a/karm/karmstorage.cpp b/karm/karmstorage.cpp index 7a6bfcb9b..4a7dabc2a 100644 --- a/karm/karmstorage.cpp +++ b/karm/karmstorage.cpp @@ -156,7 +156,7 @@ TQString KarmStorage::load (TaskView* view, const Preferences* preferences, TQSt TQDict< Task > map; // Build dictionary to look up Task object from Todo uid. Each task is a - // TQListViewItem, and is initially added with the view as the parent. + // TQListViewItem, and is initially added with the view as the tqparent. todoList = _calendar->rawTodos(); kdDebug(5970) << "KarmStorage::load " << "rawTodo count (includes completed todos) =" @@ -186,19 +186,19 @@ TQString KarmStorage::load (TaskView* view, const Preferences* preferences, TQSt task->setPixmapProgress(); } - // Load each task under it's parent task. + // Load each task under it's tqparent task. for( todo = todoList.begin(); todo != todoList.end(); ++todo ) { - Task* task = map.find( (*todo)->uid() ); + Task* task = map.tqfind( (*todo)->uid() ); // No relatedTo incident just means this is a top-level task. if ( (*todo)->relatedTo() ) { - Task* newParent = map.find( (*todo)->relatedToUid() ); + Task* newParent = map.tqfind( (*todo)->relatedToUid() ); // Complete the loading but return a message if ( !newParent ) - err = i18n("Error loading \"%1\": could not find parent (uid=%2)") + err = i18n("Error loading \"%1\": could not find tqparent (uid=%2)") .arg(task->name()) .arg((*todo)->relatedToUid()); @@ -245,7 +245,7 @@ TQString 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 - // TQListViewItem, and is initially added with the view as the parent. + // TQListViewItem, and is initially added with the view as the tqparent. todoList = rc->rawTodos(); for( todo = todoList.begin(); todo != todoList.end(); ++todo ) { @@ -255,19 +255,19 @@ TQString KarmStorage::buildTaskView(KCal::ResourceCalendar *rc, TaskView *view) task->setPixmapProgress(); } - // 1.1. Load each task under it's parent task. + // 1.1. Load each task under it's tqparent task. for( todo = todoList.begin(); todo != todoList.end(); ++todo ) { - Task* task = map.find( (*todo)->uid() ); + Task* task = map.tqfind( (*todo)->uid() ); // No relatedTo incident just means this is a top-level task. if ( (*todo)->relatedTo() ) { - Task* newParent = map.find( (*todo)->relatedToUid() ); + Task* newParent = map.tqfind( (*todo)->relatedToUid() ); // Complete the loading but return a message if ( !newParent ) - err = i18n("Error loading \"%1\": could not find parent (uid=%2)") + err = i18n("Error loading \"%1\": could not find tqparent (uid=%2)") .arg(task->name()) .arg((*todo)->relatedToUid()); @@ -310,11 +310,11 @@ TQString KarmStorage::save(TaskView* taskview) kdDebug(5970) << "entering KarmStorage::save" << endl; TQString err=TQString(); - TQPtrStack< KCal::Todo > parents; + TQPtrStack< KCal::Todo > tqparents; for (Task* task=taskview->first_child(); task; task = task->nextSibling()) { - err=writeTaskAsTodo(task, 1, parents ); + err=writeTaskAsTodo(task, 1, tqparents ); } if ( !saveCalendar() ) @@ -337,7 +337,7 @@ TQString KarmStorage::save(TaskView* taskview) } TQString KarmStorage::writeTaskAsTodo(Task* task, const int level, - TQPtrStack< KCal::Todo >& parents ) + TQPtrStack< KCal::Todo >& tqparents ) { TQString err; KCal::Todo* todo; @@ -349,16 +349,16 @@ TQString KarmStorage::writeTaskAsTodo(Task* task, const int level, return "Could not get todo from calendar"; } task->asTodo(todo); - if ( !parents.isEmpty() ) todo->setRelatedTo( parents.top() ); - parents.push( todo ); + if ( !tqparents.isEmpty() ) todo->setRelatedTo( tqparents.top() ); + tqparents.push( todo ); for ( Task* nextTask = task->firstChild(); nextTask; nextTask = nextTask->nextSibling() ) { - err = writeTaskAsTodo(nextTask, level+1, parents ); + err = writeTaskAsTodo(nextTask, level+1, tqparents ); } - parents.pop(); + tqparents.pop(); return err; } @@ -439,17 +439,17 @@ TQString KarmStorage::loadFromFlatFile(TaskView* taskview, task->setUid(addTask(task, 0)); } else { - Task *parent = stack.top(); + Task *tqparent = stack.top(); kdDebug(5970) << "KarmStorage::loadFromFlatFile - task: " << name - << " min: " << minutes << " parent" << parent->name() << "\n"; - task = new Task(name, minutes, 0, desktopList, parent); + << " min: " << minutes << " tqparent" << tqparent->name() << "\n"; + task = new Task(name, minutes, 0, desktopList, tqparent); - task->setUid(addTask(task, parent)); + task->setUid(addTask(task, tqparent)); // Legacy File Format (!): - parent->changeTimes(0, -minutes); + tqparent->changeTimes(0, -minutes); taskview->setRootIsDecorated(true); - parent->setOpen(true); + tqparent->setOpen(true); } if (!task->uid().isNull()) stack.push(task); @@ -482,12 +482,12 @@ TQString KarmStorage::loadFromFlatFileCumulative(TaskView* taskview, bool KarmStorage::parseLine(TQString line, long *time, TQString *name, int *level, DesktopList* desktopList) { - if (line.find('#') == 0) { + if (line.tqfind('#') == 0) { // A comment line return false; } - int index = line.find('\t'); + int index = line.tqfind('\t'); if (index == -1) { // This doesn't seem like a valid record return false; @@ -496,7 +496,7 @@ bool KarmStorage::parseLine(TQString line, long *time, TQString *name, TQString levelStr = line.left(index); TQString rest = line.remove(0,index+1); - index = rest.find('\t'); + index = rest.tqfind('\t'); if (index == -1) { // This doesn't seem like a valid record return false; @@ -507,7 +507,7 @@ bool KarmStorage::parseLine(TQString line, long *time, TQString *name, bool ok; - index = rest.find('\t'); // check for optional desktops string + index = rest.tqfind('\t'); // check for optional desktops string if (index >= 0) { *name = rest.left(index); TQString deskLine = rest.remove(0,index+1); @@ -516,7 +516,7 @@ bool KarmStorage::parseLine(TQString line, long *time, TQString *name, // an DesktopList TQString ds; int d; - int commaIdx = deskLine.find(','); + int commaIdx = deskLine.tqfind(','); while (commaIdx >= 0) { ds = deskLine.left(commaIdx); d = ds.toInt(&ok); @@ -525,7 +525,7 @@ bool KarmStorage::parseLine(TQString line, long *time, TQString *name, desktopList->push_back(d); deskLine.remove(0,commaIdx+1); - commaIdx = deskLine.find(','); + commaIdx = deskLine.tqfind(','); } d = deskLine.toInt(&ok); @@ -556,12 +556,12 @@ bool KarmStorage::parseLine(TQString line, long *time, TQString *name, void KarmStorage::adjustFromLegacyFileFormat(Task* task) { - // unless the parent is the listView - if ( task->parent() ) - task->parent()->changeTimes(-task->sessionTime(), -task->time()); + // unless the tqparent is the listView + if ( task->tqparent() ) + task->tqparent()->changeTimes(-task->sessionTime(), -task->time()); // traverse depth first - - // as soon as we're in a leaf, we'll substract it's time from the parent + // as soon as we're in a leaf, we'll substract it's time from the tqparent // then, while descending back we'll do the same for each node untill // we reach the root for ( Task* subtask = task->firstChild(); subtask; @@ -639,7 +639,7 @@ TQString KarmStorage::exportcsvFile( TaskView *taskview, if (to_quote) retval += dquote; - // Double quotes tqreplaced by a pair of consecutive double quotes + // Double quotes replaced by a pair of consecutive double quotes retval += task->name().tqreplace( dquote, double_dquote ); if (to_quote) @@ -701,7 +701,7 @@ TQString KarmStorage::exportcsvFile( TaskView *taskview, // public routines: // -TQString KarmStorage::addTask(const Task* task, const Task* parent) +TQString KarmStorage::addTask(const Task* task, const Task* tqparent) { KCal::Todo* todo; TQString uid; @@ -710,8 +710,8 @@ TQString KarmStorage::addTask(const Task* task, const Task* parent) if ( _calendar->addTodo( todo ) ) { task->asTodo( todo ); - if (parent) - todo->setRelatedTo(_calendar->todo(parent->uid())); + if (tqparent) + todo->setRelatedTo(_calendar->todo(tqparent->uid())); uid = todo->uid(); } else @@ -850,7 +850,7 @@ long KarmStorage::printTaskHistory ( if ( to_quote) cell.push_back(dquote); - // Double quotes tqreplaced by a pair of consecutive double quotes + // Double quotes replaced by a pair of consecutive double quotes cell.push_back(task->name().tqreplace( dquote, double_dquote )); if ( to_quote) cell.push_back(dquote); diff --git a/karm/karmstorage.h b/karm/karmstorage.h index af2d3be02..214dab53e 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 children's + * the tqparent task times do not include the sum of all their tqchildren'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 - * children totals. + * tqchildren totals. * * @see loadFromFlatFile */ @@ -266,15 +266,15 @@ class KarmStorage * Add this task from iCalendar file. * * Create a new KCal::Todo object and load with task information. If - * parent is not zero, then set the RELATED-TO attribute for this Todo. + * tqparent is not zero, then set the RELATED-TO attribute for this Todo. * * @param task The task to be removed. - * @param parent The parent of this task. Must have a uid() that is in + * @param tqparent The tqparent 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 TQString if * there was an error creating the new calendar object. */ - TQString addTask(const Task* task, const Task* parent); + TQString addTask(const Task* task, const Task* tqparent); /** * Check if the iCalendar file currently loaded has any Todos in it. @@ -308,7 +308,7 @@ class KarmStorage bool parseLine(TQString line, long *time, TQString *name, int *level, DesktopList* desktopList); TQString writeTaskAsTodo - (Task* task, const int level, TQPtrStack< KCal::Todo >& parents); + (Task* task, const int level, TQPtrStack< KCal::Todo >& tqparents); bool saveCalendar(); KCal::Event* baseEvent(const Task*); diff --git a/karm/ktimewidget.cpp b/karm/ktimewidget.cpp index dba305fef..b1f7790f6 100644 --- a/karm/ktimewidget.cpp +++ b/karm/ktimewidget.cpp @@ -13,11 +13,11 @@ enum ValidatorType { HOUR, MINUTE }; -class TimeValidator : public QValidator +class TimeValidator : public TQValidator { public: - TimeValidator( ValidatorType tp, TQWidget *parent=0, const char *name=0) - : TQValidator(parent, name) + TimeValidator( ValidatorType tp, TQWidget *tqparent=0, const char *name=0) + : TQValidator(tqparent, name) { _tp = tp; } @@ -42,12 +42,12 @@ class TimeValidator : public QValidator }; -class KarmLineEdit : public QLineEdit +class KarmLineEdit : public TQLineEdit { public: - KarmLineEdit( TQWidget* parent, const char* name = 0 ) - : TQLineEdit( parent, name ) {} + KarmLineEdit( TQWidget* tqparent, const char* name = 0 ) + : TQLineEdit( tqparent, name ) {} protected: @@ -60,8 +60,8 @@ protected: }; -KArmTimeWidget::KArmTimeWidget( TQWidget* parent, const char* name ) - : TQWidget(parent, name) +KArmTimeWidget::KArmTimeWidget( TQWidget* tqparent, const char* name ) + : TQWidget(tqparent, name) { TQHBoxLayout *tqlayout = new TQHBoxLayout(this); @@ -74,7 +74,7 @@ KArmTimeWidget::KArmTimeWidget( TQWidget* parent, const char* name ) TimeValidator *validator = new TimeValidator( HOUR, _hourLE, "Validator for _hourLE"); _hourLE->setValidator( validator ); - _hourLE->tqsetAlignment( Qt::AlignRight ); + _hourLE->tqsetAlignment( TQt::AlignRight ); TQLabel *hr = new TQLabel( i18n( "abbreviation for hours", " hr. " ), this ); @@ -89,7 +89,7 @@ KArmTimeWidget::KArmTimeWidget( TQWidget* parent, const char* name ) validator = new TimeValidator( MINUTE, _minuteLE, "Validator for _minuteLE"); _minuteLE->setValidator( validator ); _minuteLE->setMaxLength(2); - _minuteLE->tqsetAlignment( Qt::AlignRight ); + _minuteLE->tqsetAlignment( TQt::AlignRight ); TQLabel *min = new TQLabel( i18n( "abbreviation for minutes", " min. " ), this ); tqlayout->addWidget( min ); diff --git a/karm/ktimewidget.h b/karm/ktimewidget.h index 88f298b22..62f81f77c 100644 --- a/karm/ktimewidget.h +++ b/karm/ktimewidget.h @@ -13,7 +13,7 @@ class KarmLineEdit; class KArmTimeWidget : public TQWidget { public: - KArmTimeWidget( TQWidget* parent = 0, const char* name = 0 ); + KArmTimeWidget( TQWidget* tqparent = 0, const char* name = 0 ); void setTime( long minutes ); long time() const; diff --git a/karm/main.cpp b/karm/main.cpp index b075b55c3..bc91e7cf4 100644 --- a/karm/main.cpp +++ b/karm/main.cpp @@ -57,7 +57,7 @@ int main( int argc, char *argv[] ) if ( args->count() > 0 ) { TQString icsfile = TQString::fromLocal8Bit( args->arg( 0 ) ); - // FIXME: there is probably a Qt or KDE fcn for this test + // FIXME: there is probably a TQt or KDE fcn for this test if ( icsfile.startsWith( "/" ) || icsfile.lower().startsWith( "http://" ) || icsfile.lower().startsWith( "ftp://" ) diff --git a/karm/mainwindow.cpp b/karm/mainwindow.cpp index 4440ab1a5..2ab850aa6 100644 --- a/karm/mainwindow.cpp +++ b/karm/mainwindow.cpp @@ -36,7 +36,7 @@ MainWindow::MainWindow( const TQString &icsfile ) : DCOPObject ( "KarmDCOPIface" ), - KParts::MainWindow(0,Qt::WStyle_ContextHelp), + KParts::MainWindow(0,TQt::WStyle_ContextHelp), _accel ( new KAccel( this ) ), _watcher ( new KAccelMenuWatch( _accel, this ) ), _totalSum ( 0 ), @@ -445,8 +445,8 @@ void MainWindow::loadGeometry() config.setGroup( TQString::tqfromLatin1("Main Window Geometry") ); int w = config.readNumEntry( TQString::tqfromLatin1("Width"), 100 ); int h = config.readNumEntry( TQString::tqfromLatin1("Height"), 100 ); - w = QMAX( w, tqsizeHint().width() ); - h = QMAX( h, tqsizeHint().height() ); + w = TQMAX( w, tqsizeHint().width() ); + h = TQMAX( h, tqsizeHint().height() ); resize(w, h); } } @@ -543,11 +543,11 @@ TQString MainWindow::setPerCentComplete( const TQString& taskName, int perCent ) if ((_taskView->item_at_index(i)->name()==taskName)) { index=i; - if (err==TQString::null) err="task name is abigious"; - if (err=="no such task") err=TQString::null; + if (err==TQString()) err="task name is abigious"; + if (err=="no such task") err=TQString(); } } - if (err==TQString::null) + if (err==TQString()) { _taskView->item_at_index(index)->setPercentComplete( perCent, _taskView->storage() ); } @@ -578,10 +578,10 @@ int MainWindow::bookTime // Parse datetime if ( !rval ) { - startDate = TQDate::fromString( datetime, Qt::ISODate ); + startDate = TQDate::fromString( datetime, TQt::ISODate ); if ( datetime.length() > 10 ) // "YYYY-MM-DD".length() = 10 { - startTime = TQTime::fromString( datetime, Qt::ISODate ); + startTime = TQTime::fromString( datetime, TQt::ISODate ); } else startTime = TQTime( 12, 0 ); if ( startDate.isValid() && startTime.isValid() ) @@ -688,11 +688,11 @@ TQString MainWindow::starttimerfor( const TQString& taskname ) if ((_taskView->item_at_index(i)->name()==taskname)) { index=i; - if (err==TQString::null) err="task name is abigious"; - if (err=="no such task") err=TQString::null; + if (err==TQString()) err="task name is abigious"; + if (err=="no such task") err=TQString(); } } - if (err==TQString::null) _taskView->startTimerFor( _taskView->item_at_index(index) ); + if (err==TQString()) _taskView->startTimerFor( _taskView->item_at_index(index) ); return err; } @@ -705,11 +705,11 @@ TQString MainWindow::stoptimerfor( const TQString& taskname ) if ((_taskView->item_at_index(i)->name()==taskname)) { index=i; - if (err==TQString::null) err="task name is abigious"; - if (err=="no such task") err=TQString::null; + if (err==TQString()) err="task name is abigious"; + if (err=="no such task") err=TQString(); } } - if (err==TQString::null) _taskView->stopTimerFor( _taskView->item_at_index(index) ); + if (err==TQString()) _taskView->stopTimerFor( _taskView->item_at_index(index) ); return err; } @@ -718,10 +718,10 @@ TQString MainWindow::exportcsvfile( TQString filename, TQString from, TQString t ReportCriteria rc; rc.url=filename; rc.from=TQDate::fromString( from ); - if ( rc.from.isNull() ) rc.from=TQDate::fromString( from, Qt::ISODate ); + if ( rc.from.isNull() ) rc.from=TQDate::fromString( from, TQt::ISODate ); kdDebug(5970) << "rc.from " << rc.from << endl; rc.to=TQDate::fromString( to ); - if ( rc.to.isNull() ) rc.to=TQDate::fromString( to, Qt::ISODate ); + if ( rc.to.isNull() ) rc.to=TQDate::fromString( to, TQt::ISODate ); kdDebug(5970) << "rc.to " << rc.to << endl; rc.reportType=(ReportCriteria::REPORTTYPE) type; // history report or totals report rc.decimalMinutes=decimalMinutes; diff --git a/karm/mainwindow.h b/karm/mainwindow.h index 2f275be16..9ff525b05 100644 --- a/karm/mainwindow.h +++ b/karm/mainwindow.h @@ -26,6 +26,7 @@ class TaskView; class MainWindow : public KParts::MainWindow, virtual public KarmDCOPIface { Q_OBJECT + TQ_OBJECT private: void makeMenus(); diff --git a/karm/plannerparser.cpp b/karm/plannerparser.cpp index 7ac13a5e3..a1f83eb2a 100644 --- a/karm/plannerparser.cpp +++ b/karm/plannerparser.cpp @@ -35,9 +35,9 @@ test cases: kdDebug() << "entering constructor to import planner tasks" << endl; _taskView=tv; level=0; - if (_taskView->current_item()) if (_taskView->current_item()->parent()) + if (_taskView->current_item()) if (_taskView->current_item()->tqparent()) { - task = _taskView->current_item()->parent(); + task = _taskView->current_item()->tqparent(); level=1; } } @@ -67,13 +67,13 @@ test cases: } // at the moment, task is still the old task or the old father task (if an endElement occurred) or not existing (if the - // new task is a top-level-task). Make task the parenttask, if existing. + // new task is a top-level-task). Make task the tqparenttask, if existing. DesktopList dl; if (level++>0) { - parentTask=task; - task = new Task(taskName, 0, 0, dl, parentTask); - task->setUid(_taskView->storage()->addTask(task, parentTask)); + tqparentTask=task; + task = new Task(taskName, 0, 0, dl, tqparentTask); + task->setUid(_taskView->storage()->addTask(task, tqparentTask)); } else { @@ -92,7 +92,7 @@ test cases: // only <task>s within <tasks> increased level, so only decrease for <task>s within <tasks> if (withInTasks) { - if (qName=="task") if (level-->=0) task=task->parent(); + if (qName=="task") if (level-->=0) task=task->tqparent(); if (qName=="tasks") withInTasks=false; } return true; diff --git a/karm/plannerparser.h b/karm/plannerparser.h index 6a7ff0281..9334b8a5c 100644 --- a/karm/plannerparser.h +++ b/karm/plannerparser.h @@ -34,7 +34,7 @@ test cases: #include "karmstorage.h" #include "kapplication.h" -class PlannerParser : public QXmlDefaultHandler +class PlannerParser : public TQXmlDefaultHandler { public: @@ -54,7 +54,7 @@ private: bool withInTasks; // within <tasks> ? TaskView *_taskView; Task *task; - Task *parentTask; + Task *tqparentTask; int level; // level=1: task is top-level-task }; diff --git a/karm/preferences.cpp b/karm/preferences.cpp index b270a2b2e..24a5e8c41 100644 --- a/karm/preferences.cpp +++ b/karm/preferences.cpp @@ -54,12 +54,12 @@ void Preferences::makeBehaviorPage() TQGridLayout* tqlayout = new TQGridLayout( topLevel, 2, 2 ); tqlayout->setColStretch( 1, 1 ); - _doIdleDetectionW = new QCheckBox + _doIdleDetectionW = new TQCheckBox ( i18n("Detect desktop as idle after"), behaviorPage, "_doIdleDetectionW"); - _idleDetectValueW = new QSpinBox + _idleDetectValueW = new TQSpinBox (1,60*24, 1, behaviorPage, "_idleDetectValueW"); _idleDetectValueW->setSuffix(i18n(" min")); - _promptDeleteW = new QCheckBox + _promptDeleteW = new TQCheckBox ( i18n( "Prompt before deleting tasks" ), behaviorPage, "_promptDeleteW" ); tqlayout->addWidget(_doIdleDetectionW, 0, 0 ); @@ -113,7 +113,7 @@ void Preferences::makeStoragePage() tqlayout->setColStretch( 1, 1 ); // autosave - _doAutoSaveW = new QCheckBox + _doAutoSaveW = new TQCheckBox ( i18n("Save tasks every"), storagePage, "_doAutoSaveW" ); _autoSaveValueW = new TQSpinBox(1, 60*24, 1, storagePage, "_autoSaveValueW"); _autoSaveValueW->setSuffix(i18n(" min")); diff --git a/karm/preferences.h b/karm/preferences.h index 33d51dd0c..0cd116383 100644 --- a/karm/preferences.h +++ b/karm/preferences.h @@ -16,6 +16,7 @@ class KURLRequester; class Preferences :public KDialogBase { Q_OBJECT + TQ_OBJECT public: static Preferences *instance( const TQString& icsfile = "" ); diff --git a/karm/print.cpp b/karm/print.cpp index a7ddd4ba9..891c06fe2 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 deviceMetrics(this); + TQPaintDeviceMetrics tqdeviceMetrics(this); TQFontMetrics metrics = painter.fontMetrics(); - pageHeight = deviceMetrics.height(); - int pageWidth = deviceMetrics.width(); + pageHeight = tqdeviceMetrics.height(); + int pageWidth = tqdeviceMetrics.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 children. + // totals are increased together with its tqchildren. int totalTotal = 0; int sessionTotal = 0; for (Task* task = _taskView->first_child(); @@ -47,9 +47,9 @@ void MyPrinter::print() } // Calculate the needed width for each of the fields - timeWidth = QMAX(metrics.width(i18n("Total")), + timeWidth = TQMAX(metrics.width(i18n("Total")), metrics.width(formatTime(totalTotal))); - sessionTimeWidth = QMAX(metrics.width(i18n("Session")), + sessionTimeWidth = TQMAX(metrics.width(i18n("Session")), metrics.width(formatTime(sessionTotal))); nameFieldWidth = pageWidth - xMargin - timeWidth - sessionTimeWidth - 2*5; @@ -61,9 +61,9 @@ void MyPrinter::print() task = static_cast<Task *>(task->nextSibling())) { int width = calculateReqNameWidth(task, metrics, 0); - maxReqNameFieldWidth = QMAX(maxReqNameFieldWidth, width); + maxReqNameFieldWidth = TQMAX(maxReqNameFieldWidth, width); } - nameFieldWidth = QMIN(nameFieldWidth, maxReqNameFieldWidth); + nameFieldWidth = TQMIN(nameFieldWidth, maxReqNameFieldWidth); int realPageWidth = nameFieldWidth + timeWidth + sessionTimeWidth + 2*5; @@ -120,7 +120,7 @@ int MyPrinter::calculateReqNameWidth( Task* task, subTask; subTask = subTask->nextSibling() ) { int subTaskWidth = calculateReqNameWidth(subTask, metrics, level+1); - width = QMAX(width, subTaskWidth); + width = TQMAX(width, subTaskWidth); } return width; } diff --git a/karm/printdialog.h b/karm/printdialog.h index 1bd1604ec..8ed2394f7 100644 --- a/karm/printdialog.h +++ b/karm/printdialog.h @@ -31,6 +31,7 @@ class KDateEdit; class PrintDialog : public KDialogBase { Q_OBJECT + TQ_OBJECT public: PrintDialog(); diff --git a/karm/reportcriteria.h b/karm/reportcriteria.h index dae6a48e4..c6c1106e5 100644 --- a/karm/reportcriteria.h +++ b/karm/reportcriteria.h @@ -29,7 +29,7 @@ class TQString; Stores entries from export dialog. Keeps details (like CSV export dialog control names) out of the TaskView - class, which tqcontains the slot triggered by the export action. + class, which contains the slot triggered by the export action. The dialog and the report logic can change all they want and the TaskView logic can stay the same. diff --git a/karm/task.cpp b/karm/task.cpp index b150a94db..cf37ee43a 100644 --- a/karm/task.cpp +++ b/karm/task.cpp @@ -22,21 +22,21 @@ const int gSecondsPerMinute = 60; TQPtrVector<TQPixmap> *Task::icons = 0; Task::Task( const TQString& taskName, long minutes, long sessionTime, - DesktopList desktops, TaskView *parent) - : TQObject(), TQListViewItem(parent) + DesktopList desktops, TaskView *tqparent) + : TQObject(), TQListViewItem(tqparent) { init(taskName, minutes, sessionTime, desktops, 0); } Task::Task( const TQString& taskName, long minutes, long sessionTime, - DesktopList desktops, Task *parent) - : TQObject(), TQListViewItem(parent) + DesktopList desktops, Task *tqparent) + : TQObject(), TQListViewItem(tqparent) { init(taskName, minutes, sessionTime, desktops, 0); } -Task::Task( KCal::Todo* todo, TaskView* parent ) - : TQObject(), TQListViewItem( parent ) +Task::Task( KCal::Todo* todo, TaskView* tqparent ) + : TQObject(), TQListViewItem( tqparent ) { long minutes = 0; TQString name; @@ -51,9 +51,9 @@ Task::Task( KCal::Todo* todo, TaskView* parent ) 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 + // If our tqparent is the taskview then connect our totalTimesChanged // signal to its receiver - if ( ! parent() ) + if ( ! tqparent() ) connect( this, TQT_SIGNAL( totalTimesChanged ( long, long ) ), listView(), TQT_SLOT( taskTotalTimesChanged( long, long) )); @@ -164,13 +164,13 @@ void Task::setPercentComplete(const int percent, KarmStorage *storage) setPixmapProgress(); - // 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 children are not, then we get an error + // When tqparent marked as complete, mark all tqchildren as complete as well. + // Complete tasks are not displayed in the task view, so if a tqparent is + // marked as complete and some of the tqchildren 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 children should be + // if you mark a tqparent task as complete, then all tqchildren should be // complete as well. // // This behavior is consistent with KOrganizer (as of 2003-09-24). @@ -252,7 +252,7 @@ void Task::changeParentTotalTimes( long minutesSession, long minutes ) if ( isRoot() ) emit totalTimesChanged( minutesSession, minutes ); else - parent()->changeTotalTimes( minutesSession, minutes ); + tqparent()->changeTotalTimes( minutesSession, minutes ); } bool Task::remove( TQPtrList<Task>& activeTasks, KarmStorage* storage) @@ -290,7 +290,7 @@ TQString Task::fullName() const if (isRoot()) return name(); else - return parent()->fullName() + TQString::tqfromLatin1("/") + name(); + return tqparent()->fullName() + TQString::tqfromLatin1("/") + name(); } KCal::Todo* Task::asTodo(KCal::Todo* todo) const @@ -390,10 +390,10 @@ void Task::cut() { //kdDebug(5970) << "Task::cut - " << name() << endl; changeParentTotalTimes( -_totalSessionTime, -_totalTime); - if ( ! parent()) + if ( ! tqparent()) listView()->takeItem(this); else - parent()->takeItem(this); + tqparent()->takeItem(this); } void Task::move(Task* destination) diff --git a/karm/task.h b/karm/task.h index 200612aed..acf2cd998 100644 --- a/karm/task.h +++ b/karm/task.h @@ -13,7 +13,7 @@ #include "desktoplist.h" // Required b/c of static cast below? (How else can compiler know that a -// TaskView is a subclass or QListView?) +// TaskView is a subclass or TQListView?) #include "taskview.h" class TQFile; @@ -38,27 +38,28 @@ class TQPixmap; * It can also contain subtasks - these are managed using the * TQListViewItem class. */ -class Task : public TQObject, public QListViewItem +class Task : public TQObject, public TQListViewItem { Q_OBJECT + TQ_OBJECT public: //@{ constructors Task( const TQString& taskame, long minutes, long sessionTime, - DesktopList desktops, TaskView* parent = 0); + DesktopList desktops, TaskView* tqparent = 0); Task( const TQString& taskame, long minutes, long sessionTime, - DesktopList desktops, Task* parent = 0); - Task( KCal::Todo* incident, TaskView* parent ); + DesktopList desktops, Task* tqparent = 0); + Task( KCal::Todo* incident, TaskView* tqparent ); //@} /* destructor */ ~Task(); - /** return parent Task or null in case of TaskView. - * same as TQListViewItem::parent() + /** return tqparent Task or null in case of TaskView. + * same as TQListViewItem::tqparent() */ Task* firstChild() const { return (Task*)TQListViewItem::firstChild(); } Task* nextSibling() const { return (Task*)TQListViewItem::nextSibling(); } - Task* parent() const { return (Task*)TQListViewItem::parent(); } + Task* tqparent() const { return (Task*)TQListViewItem::tqparent(); } /** Return task view for this task */ TaskView* taskView() const { @@ -77,9 +78,9 @@ class Task : public TQObject, public QListViewItem */ void setUid(const TQString uid); - /** cut Task out of parent Task or the TaskView */ + /** cut Task out of tqparent Task or the TaskView */ void cut(); - /** cut Task out of parent Task or the TaskView and into the + /** cut Task out of tqparent Task or the TaskView and into the * destination Task */ void move(Task* destination); /** insert Task into the destination Task */ @@ -161,7 +162,7 @@ class Task : public TQObject, public QListViewItem TQString name() const { return _name; }; /** - * Returns that task name, prefixed by parent tree up to root. + * Returns that task name, prefixed by tqparent tree up to root. * * Task names are seperated by a forward slash: / */ @@ -205,9 +206,9 @@ class Task : public TQObject, public QListViewItem TQString comment() const; /** tells you whether this task is the root of the task tree */ - bool isRoot() const { return parent() == 0; } + bool isRoot() const { return tqparent() == 0; } - /** remove Task with all it's children + /** remove Task with all it's tqchildren * @param activeTasks - list of aktive tasks * @param storage a pointer to a KarmStorage object. */ @@ -230,7 +231,7 @@ class Task : public TQObject, public QListViewItem /** Return true if task is complete (percent complete equals 100). */ bool isComplete(); - /** Remove current task and all it's children from the view. */ + /** Remove current task and all it's tqchildren from the view. */ void removeFromView(); /** delivers when the task was started last */ diff --git a/karm/taskview.cpp b/karm/taskview.cpp index a410806a0..1ac108e01 100644 --- a/karm/taskview.cpp +++ b/karm/taskview.cpp @@ -37,7 +37,7 @@ class DesktopTracker; -TaskView::TaskView(TQWidget *parent, const char *name, const TQString &icsfile ):KListView(parent,name) +TaskView::TaskView(TQWidget *tqparent, const char *name, const TQString &icsfile ):KListView(tqparent,name) { _preferences = Preferences::instance( icsfile ); _storage = KarmStorage::instance(); @@ -56,10 +56,10 @@ TaskView::TaskView(TQWidget *parent, const char *name, const TQString &icsfile ) addColumn( i18n("Time") ); addColumn( i18n("Total Session Time") ); addColumn( i18n("Total Time") ); - setColumnAlignment( 1, Qt::AlignRight ); - setColumnAlignment( 2, Qt::AlignRight ); - setColumnAlignment( 3, Qt::AlignRight ); - setColumnAlignment( 4, Qt::AlignRight ); + setColumnAlignment( 1, TQt::AlignRight ); + setColumnAlignment( 2, TQt::AlignRight ); + setColumnAlignment( 3, TQt::AlignRight ); + setColumnAlignment( 4, TQt::AlignRight ); adaptColumns(); setAllColumnsShowFocus( true ); @@ -255,7 +255,7 @@ void TaskView::refresh() t->setPixmapProgress(); } - // remove root decoration if there is no more children. + // remove root decoration if there is no more tqchildren. bool anyChilds = false; for(Task* child = first_child(); child; @@ -278,7 +278,7 @@ void TaskView::loadFromFlatFile() //KFileDialog::getSaveFileName("icalout.ics",i18n("*.ics|ICalendars"),this); - TQString fileName(KFileDialog::getOpenFileName(TQString::null, TQString::null, + TQString fileName(KFileDialog::getOpenFileName(TQString(), TQString(), 0)); if (!fileName.isEmpty()) { TQString err = _storage->loadFromFlatFile(this, fileName); @@ -309,7 +309,7 @@ TQString TaskView::importPlanner(TQString fileName) { kdDebug(5970) << "entering importPlanner" << endl; PlannerParser* handler=new PlannerParser(this); - if (fileName.isEmpty()) fileName=KFileDialog::getOpenFileName(TQString::null, TQString::null, 0); + if (fileName.isEmpty()) fileName=KFileDialog::getOpenFileName(TQString(), TQString(), 0); TQFile xmlFile( fileName ); TQXmlInputSource source( xmlFile ); TQXmlSimpleReader reader; @@ -495,7 +495,7 @@ void TaskView::newTask() newTask(i18n("New Task"), 0); } -void TaskView::newTask(TQString caption, Task *parent) +void TaskView::newTask(TQString caption, Task *tqparent) { EditTaskDialog *dialog = new EditTaskDialog(caption, false); long total, totalDiff, session, sessionDiff; @@ -514,7 +514,7 @@ void TaskView::newTask(TQString caption, Task *parent) if ( desktopList.size() == ( unsigned int ) _desktopTracker->desktopCount() ) desktopList.clear(); - TQString uid = addTask( taskName, total, session, desktopList, parent ); + TQString uid = addTask( taskName, total, session, desktopList, tqparent ); if ( uid.isNull() ) { KMessageBox::error( 0, i18n( @@ -527,15 +527,15 @@ void TaskView::newTask(TQString caption, Task *parent) TQString TaskView::addTask ( const TQString& taskname, long total, long session, - const DesktopList& desktops, Task* parent ) + const DesktopList& desktops, Task* tqparent ) { Task *task; kdDebug(5970) << "TaskView::addTask: taskname = " << taskname << endl; - if ( parent ) task = new Task( taskname, total, session, desktops, parent ); + if ( tqparent ) task = new Task( taskname, total, session, desktops, tqparent ); else task = new Task( taskname, total, session, desktops, this ); - task->setUid( _storage->addTask( task, parent ) ); + task->setUid( _storage->addTask( task, tqparent ) ); TQString taskuid=task->uid(); if ( ! taskuid.isNull() ) { @@ -688,7 +688,7 @@ void TaskView::deleteTask(bool markingascomplete) save(); } - // remove root decoration if there is no more children. + // remove root decoration if there is no more tqchildren. refresh(); // Stop idle detection if no more counters are running diff --git a/karm/taskview.h b/karm/taskview.h index a3b88413d..7b9bc4414 100644 --- a/karm/taskview.h +++ b/karm/taskview.h @@ -42,9 +42,10 @@ using namespace KCal; class TaskView : public KListView { Q_OBJECT + TQ_OBJECT public: - TaskView( TQWidget *parent = 0, const char *name = 0, const TQString &icsfile = "" ); + TaskView( TQWidget *tqparent = 0, const char *name = 0, const TQString &icsfile = "" ); virtual ~TaskView(); /** Return the first item in the view, cast to a Task pointer. */ @@ -82,7 +83,7 @@ class TaskView : public KListView /** Add a task to view and storage. */ TQString addTask( const TQString& taskame, long total, long session, const DesktopList& desktops, - Task* parent = 0 ); + Task* tqparent = 0 ); public slots: /** Save to persistent storage. */ @@ -104,7 +105,7 @@ class TaskView : public KListView void newTask(); /** Display edit task dialog and create a new task with results. */ - void newTask( TQString caption, Task* parent ); + void newTask( TQString caption, Task* tqparent ); /** Used to refresh (e.g. after import) */ void refresh(); @@ -136,16 +137,16 @@ class TaskView : public KListView * expose wrappers around the storage methods we want to access instead of * giving clients full access to objects that we own. * - * Hopefully, this will be redesigned as part of the Qt4 migration. + * Hopefully, this will be redesigned as part of the TQt4 migration. */ KarmStorage* storage(); /** - * Delete task (and children) from view. + * Delete task (and tqchildren) from view. * * @param markingascomplete If false (the default), deletes history for - * 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 + * 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 * list view. */ void deleteTask(bool markingascomplete=false); diff --git a/karm/taskviewwhatsthis.cpp b/karm/taskviewwhatsthis.cpp index 72d640e9d..164023f2a 100644 --- a/karm/taskviewwhatsthis.cpp +++ b/karm/taskviewwhatsthis.cpp @@ -26,7 +26,7 @@ TaskViewWhatsThis::~TaskViewWhatsThis() TQString TaskViewWhatsThis::text ( const TQPoint & pos ) { - TQString desc = TQString::null; + TQString desc = TQString(); 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 65f40f9f5..1742c58db 100644 --- a/karm/taskviewwhatsthis.h +++ b/karm/taskviewwhatsthis.h @@ -18,7 +18,7 @@ this is the karm-taskview-specific implementation of qwhatsthis @author Thorsten Staerk */ -class TaskViewWhatsThis : public QWhatsThis +class TaskViewWhatsThis : public TQWhatsThis { public: TaskViewWhatsThis( TQWidget* ); diff --git a/karm/test/README b/karm/test/README index 31dbc8d24..c245b182b 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 shape. +It's in very rough tqshape. How you start: diff --git a/karm/test/lifetest.php b/karm/test/lifetest.php index 7a24bd3d7..afd423ccb 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 keyboardlayout (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 keyboardtqlayout (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 --geometry 200x100+0+0 /tmp/karmtest.ics >/dev/null 2>&1", 'w'); + $process=popen("karm --tqgeometry 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.h b/karm/test/lockerthread.h index 3aee4a6a2..38b5b1f00 100644 --- a/karm/test/lockerthread.h +++ b/karm/test/lockerthread.h @@ -7,7 +7,7 @@ class TQString; * * Result of attempt returned by gotlock(). */ -class LockerThread : public QThread +class LockerThread : public TQThread { public: LockerThread( const TQString &filename ); diff --git a/karm/test/runscripts.cpp b/karm/test/runscripts.cpp index 1b44f4821..e3a25a15f 100644 --- a/karm/test/runscripts.cpp +++ b/karm/test/runscripts.cpp @@ -73,8 +73,8 @@ int runscripts dir.setNameFilter( extension ); dir.setFilter( TQDir::Files ); dir.setSorting( TQDir::Name | TQDir::IgnoreCase ); - const QFileInfoList *list = dir.entryInfoList(); - QFileInfoListIterator it( *list ); + const TQFileInfoList *list = dir.entryInfoList(); + TQFileInfoListIterator it( *list ); TQFileInfo *fi; while ( !rval && ( fi = it.current() ) != 0 ) { diff --git a/karm/test/script.cpp b/karm/test/script.cpp index 816314368..58e5af3bc 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->exiStatus(); + m_status = m_proc->exitqStatus(); delete m_proc; m_proc = 0; } diff --git a/karm/test/script.h b/karm/test/script.h index 207d64b54..2f5647503 100644 --- a/karm/test/script.h +++ b/karm/test/script.h @@ -28,9 +28,10 @@ class TQProcess; class TQString; class TQStringList; -class Script : public QObject +class Script : public TQObject { Q_OBJECT + TQ_OBJECT public: Script( const TQDir& workingDirectory ); virtual ~Script(); diff --git a/karm/tray.cpp b/karm/tray.cpp index ac820abbb..3758dd7f8 100644 --- a/karm/tray.cpp +++ b/karm/tray.cpp @@ -30,8 +30,8 @@ TQPtrVector<TQPixmap> *KarmTray::icons = 0; -KarmTray::KarmTray(MainWindow* parent) - : KSystemTray(parent, "Karm Tray") +KarmTray::KarmTray(MainWindow* tqparent) + : KSystemTray(tqparent, "Karm Tray") { // the timer that updates the "running" icon in the tray _taskActiveTimer = new TQTimer(this); @@ -49,8 +49,8 @@ KarmTray::KarmTray(MainWindow* parent) } } - parent->actionPreferences->plug( contextMenu() ); - parent->actionStopAll->plug( contextMenu() ); + tqparent->actionPreferences->plug( contextMenu() ); + tqparent->actionStopAll->plug( contextMenu() ); resetClock(); initToolTip(); @@ -71,7 +71,7 @@ KarmTray::KarmTray(MainWindow* parent) */ } -KarmTray::KarmTray(karmPart * parent) +KarmTray::KarmTray(karmPart * tqparent) : KSystemTray( 0 , "Karm Tray") { // it is not convenient if every kpart gets an icon in the systray. diff --git a/karm/tray.h b/karm/tray.h index 255e2d960..b299a6edb 100644 --- a/karm/tray.h +++ b/karm/tray.h @@ -24,10 +24,11 @@ class MainWindow; class KarmTray : public KSystemTray { Q_OBJECT + TQ_OBJECT public: - KarmTray(MainWindow * parent); - KarmTray(karmPart * parent); + KarmTray(MainWindow * tqparent); + KarmTray(karmPart * tqparent); ~KarmTray(); private: |