summaryrefslogtreecommitdiffstats
path: root/karm/taskviewwhatsthis.cpp
blob: 9beb163dfa3956822d774cf2a6ef08653096aa0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//
// C++ Implementation: taskviewwhatsthis
//
// Description: 
// This is a subclass of QWhatsThis, specially adapted for karm's taskview.
//
// Author: Thorsten Staerk <thorsten@staerk.de>, (C) 2005
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "taskviewwhatsthis.h"
#include <kdebug.h>
#include <klistview.h>
#include <klocale.h>

TaskViewWhatsThis::TaskViewWhatsThis( QWidget* qw )
 : QWhatsThis( qw )
{
  _listView=(KListView *) qw;
}

TaskViewWhatsThis::~TaskViewWhatsThis()
{
}

QString TaskViewWhatsThis::text ( const QPoint & pos )
{
  QString desc = QString::null;
  kdDebug(5970) << "entering TaskViewWhatsThis::text" << endl;
  kdDebug(5970) << "x-pos:" << pos.x() << endl;
  if ( pos.x() < _listView->columnWidth( 0 ) ) 
  {
    desc=i18n("Task Name shows the name of a task or subtask you are working on.");
  }
  else
  {
    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.");
  }
  return desc;
}