You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kasablanca/src/kbstatustip.cpp

36 lines
891 B

//
// 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);
}
}