summaryrefslogtreecommitdiffstats
path: root/src/kbstatustip.cpp
blob: 18b604326b73a04f9707fe0844648fa4d6e9f0eb (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 <tqcursor.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);
	}
}