diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /karm/task.h | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'karm/task.h')
-rw-r--r-- | karm/task.h | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/karm/task.h b/karm/task.h index 8a9ca7833..37e75f12a 100644 --- a/karm/task.h +++ b/karm/task.h @@ -1,13 +1,13 @@ #ifndef KARM_TASK_H #define KARM_TASK_H -// Required b/c QPtrList is a struct, not a class. -#include <qptrlist.h> +// Required b/c TQPtrList is a struct, not a class. +#include <tqptrlist.h> -// Requred b/c/ QPtrVector is a template (?) -#include <qptrvector.h> +// Requred b/c/ TQPtrVector is a template (?) +#include <tqptrvector.h> -#include <qdatetime.h> +#include <tqdatetime.h> // Required b/c DesktopList is a typedef not a class. #include "desktoplist.h" @@ -38,17 +38,17 @@ class QPixmap; * too. * * It can also contain subtasks - these are managed using the - * QListViewItem class. + * TQListViewItem class. */ -class Task : public QObject, public QListViewItem +class Task : public TQObject, public QListViewItem { Q_OBJECT public: //@{ constructors - Task( const QString& taskame, long minutes, long sessionTime, + Task( const TQString& taskame, long minutes, long sessionTime, DesktopList desktops, TaskView* parent = 0); - Task( const QString& taskame, long minutes, long sessionTime, + Task( const TQString& taskame, long minutes, long sessionTime, DesktopList desktops, Task* parent = 0); Task( KCal::Todo* incident, TaskView* parent ); //@} @@ -56,11 +56,11 @@ class Task : public QObject, public QListViewItem ~Task(); /** return parent Task or null in case of TaskView. - * same as QListViewItem::parent() + * same as TQListViewItem::parent() */ - Task* firstChild() const { return (Task*)QListViewItem::firstChild(); } - Task* nextSibling() const { return (Task*)QListViewItem::nextSibling(); } - Task* parent() const { return (Task*)QListViewItem::parent(); } + Task* firstChild() const { return (Task*)TQListViewItem::firstChild(); } + Task* nextSibling() const { return (Task*)TQListViewItem::nextSibling(); } + Task* parent() const { return (Task*)TQListViewItem::parent(); } /** Return task view for this task */ TaskView* taskView() const { @@ -68,7 +68,7 @@ class Task : public QObject, public QListViewItem } /** Return unique iCalendar Todo ID for this task. */ - QString uid() const { return _uid; } + TQString uid() const { return _uid; } /** * Set unique id for the task. @@ -77,7 +77,7 @@ class Task : public QObject, public QListViewItem * * @param uid The new unique id. */ - void setUid(const QString uid); + void setUid(const TQString uid); /** cut Task out of parent Task or the TaskView */ void cut(); @@ -88,7 +88,7 @@ class Task : public QObject, public QListViewItem void paste(Task* destination); /** Sort times numerically, not alphabetically. */ - int compare ( QListViewItem * i, int col, bool ascending ) const; + int compare ( TQListViewItem * i, int col, bool ascending ) const; //@{ timing related functions @@ -135,7 +135,7 @@ class Task : public QObject, public QListViewItem /** * Return time the task was started. */ - QDateTime startTime() const { return _lastStart; }; + TQDateTime startTime() const { return _lastStart; }; /** sets session time to zero. */ void startNewSession() { changeTimes( -_sessionTime, 0 ); }; @@ -146,7 +146,7 @@ class Task : public QObject, public QListViewItem void setDesktopList ( DesktopList dl ); DesktopList getDesktops() const { return _desktops;} - QString getDesktopStr() const; + TQString getDesktopStr() const; //@} //@{ name related functions @@ -155,19 +155,19 @@ class Task : public QObject, public QListViewItem * @param name a pointer to the name. A deep copy will be made. * @param storage a pointer to a KarmStorage object. */ - void setName( const QString& name, KarmStorage* storage ); + void setName( const TQString& name, KarmStorage* storage ); /** returns the name of this task. * @return a pointer to the name. */ - QString name() const { return _name; }; + TQString name() const { return _name; }; /** * Returns that task name, prefixed by parent tree up to root. * * Task names are seperated by a forward slash: / */ - QString fullName() const; + TQString fullName() const; //@} /** Update the display of the task (all columns) in the UI. */ @@ -179,11 +179,11 @@ class Task : public QObject, public QListViewItem * @param on true or false for starting or stopping a task * @param storage a pointer to a KarmStorage object. * @param whenStarted time when the task was started. Normally - QDateTime::currentDateTime, but if calendar has + TQDateTime::currentDateTime, but if calendar has been changed by another program and being reloaded the task is set to running with another start date */ - void setRunning( bool on, KarmStorage* storage, QDateTime whenStarted=QDateTime::currentDateTime(), QDateTime whenStopped=QDateTime::currentDateTime()); + void setRunning( bool on, KarmStorage* storage, TQDateTime whenStarted=TQDateTime::currentDateTime(), TQDateTime whenStopped=TQDateTime::currentDateTime()); /** return the state of a task - if it's running or not * @return true or false depending on whether the task is running @@ -192,7 +192,7 @@ class Task : public QObject, public QListViewItem //@} bool parseIncidence(KCal::Incidence*, long& minutes, - long& sessionMinutes, QString& name, DesktopList& desktops, + long& sessionMinutes, TQString& name, DesktopList& desktops, int& percent_complete); /** @@ -201,10 +201,10 @@ class Task : public QObject, public QListViewItem KCal::Todo* asTodo(KCal::Todo* calendar) const; /** Add a comment to this task. */ - void addComment( QString comment, KarmStorage* storage ); + void addComment( TQString comment, KarmStorage* storage ); /** Retrieve the entire comment for the task. */ - QString comment() const; + TQString comment() const; /** tells you whether this task is the root of the task tree */ bool isRoot() const { return parent() == 0; } @@ -213,7 +213,7 @@ class Task : public QObject, public QListViewItem * @param activeTasks - list of aktive tasks * @param storage a pointer to a KarmStorage object. */ - bool remove( QPtrList<Task>& activeTasks, KarmStorage* storage ); + bool remove( TQPtrList<Task>& activeTasks, KarmStorage* storage ); /** * Update percent complete for this task. @@ -236,7 +236,7 @@ class Task : public QObject, public QListViewItem void removeFromView(); /** delivers when the task was started last */ - QDateTime lastStart() { return _lastStart; } + TQDateTime lastStart() { return _lastStart; } protected: void changeParentTotalTimes( long minutesSession, long minutes ); @@ -253,10 +253,10 @@ class Task : public QObject, public QListViewItem private: /** The iCal unique ID of the Todo for this task. */ - QString _uid; + TQString _uid; /** The comment associated with this Task. */ - QString _comment; + TQString _comment; int _percentcomplete; @@ -266,15 +266,15 @@ class Task : public QObject, public QListViewItem void noNegativeTimes(); /** initialize a task */ - void init( const QString& taskame, long minutes, long sessionTime, + void init( const TQString& taskame, long minutes, long sessionTime, DesktopList desktops, int percent_complete); /** task name */ - QString _name; + TQString _name; /** Last time this task was started. */ - QDateTime _lastStart; + TQDateTime _lastStart; //@{ totals of the whole subtree including self long _totalTime; @@ -286,9 +286,9 @@ class Task : public QObject, public QListViewItem long _sessionTime; //@} DesktopList _desktops; - QTimer *_timer; + TQTimer *_timer; int _currentPic; - static QPtrVector<QPixmap> *icons; + static TQPtrVector<TQPixmap> *icons; /** Don't need to update storage when deleting task from list. */ bool _removing; |