karm

taskviewwhatsthis.cpp
1//
2// C++ Implementation: taskviewwhatsthis
3//
4// Description:
5// This is a subclass of TQWhatsThis, specially adapted for karm's taskview.
6//
7// Author: Thorsten Staerk <thorsten@staerk.de>, (C) 2005
8//
9// Copyright: See COPYING file that comes with this distribution
10//
11//
12#include "taskviewwhatsthis.h"
13#include <kdebug.h>
14#include <tdelistview.h>
15#include <tdelocale.h>
16
17TaskViewWhatsThis::TaskViewWhatsThis( TQWidget* qw )
18 : TQWhatsThis( qw )
19{
20 _listView=(TDEListView *) qw;
21}
22
23TaskViewWhatsThis::~TaskViewWhatsThis()
24{
25}
26
27TQString TaskViewWhatsThis::text ( const TQPoint & pos )
28{
29 TQString desc = TQString();
30 kdDebug(5970) << "entering TaskViewWhatsThis::text" << endl;
31 kdDebug(5970) << "x-pos:" << pos.x() << endl;
32 if ( pos.x() < _listView->columnWidth( 0 ) )
33 {
34 desc=i18n("Task Name shows the name of a task or subtask you are working on.");
35 }
36 else
37 {
38 desc=i18n("Session time: Time for this task since you chose \"Start New Session\".\nTotal Session time: Time for this task and all its subtasks since you chose \"Start New Session\".\nTime: Overall time for this task.\nTotal Time: Overall time for this task and all its subtasks.");
39 }
40 return desc;
41}