summaryrefslogtreecommitdiffstats
path: root/src/kbstatustip.cpp
blob: 5cc99f65fd1778b6e6b9fac2dd863f210c769c6a (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
//
// C++ Implementation: kbstatustip
//
// Description: 
//
//
// Author: Magnus Kulke <mkulke@magnusmachine>, (C) 2004
//
// Copyright: See COPYING file that comes with this distribution
//
//

#include <ntqcursor.h>

#include "kbstatustip.h"

KbStatusTip::KbStatusTip(TQWidget * widget) : TQToolTip(widget)
{
}

void KbStatusTip::maybeTip(const TQPoint &)
{
	tip(parentWidget()->rect(), "kasablanca");
}

void KbStatusTip::ShowStatus(TQString msg)
{
	if ((TQCursor::pos().x() > parentWidget()->mapToGlobal(parentWidget()->pos()).x())
		&& (TQCursor::pos().y() > parentWidget()->mapToGlobal(parentWidget()->pos()).y())
		&& (TQCursor::pos().x() < (parentWidget()->mapToGlobal(parentWidget()->pos()).x() + parentWidget()->width()))
		&& (TQCursor::pos().y() < (parentWidget()->mapToGlobal(parentWidget()->pos()).y() + parentWidget()->height())))
	{
		tip(parentWidget()->rect(), msg);
	}
}