korganizer

koincidencetooltip.h
1/*
2 This file is part of KOrganizer.
3 Copyright (c) 2003 Reinhold Kainhofer <reinhhold@kainhofer.com>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18
19 As a special exception, permission is given to link this program
20 with any edition of TQt, and distribute the resulting executable,
21 without including the source code for TQt in the source distribution.
22*/
23#ifndef KOINCIDENCETOOLTIP_H
24#define KOINCIDENCETOOLTIP_H
25
26#include <tqtooltip.h>
27
28namespace KCal
29{
30class Calendar;
31class Incidence;
32}
33using namespace KCal;
34
35class KOAgendaItem;
36
40class KOIncidenceToolTip : public TQToolTip
41{
42 public:
43 KOIncidenceToolTip( TQWidget *widget, Calendar *calendar, const TQDate &date, TQToolTipGroup *group = 0 )
44 : TQToolTip (widget, group), mCalendar( calendar ), mDate( date ), mText(0) {}
45/* ~KOIncidenceToolTip();*/
46
47 public:
48 static void add ( TQWidget *widget, Calendar *calendar,
49 Incidence *incidence, const TQDate &date=TQDate(),
50 TQToolTipGroup *group = 0, const TQString &longText = "" );
51 static void add( KOAgendaItem *item, Calendar *calendar,
52 Incidence *incidence = 0, const TQDate &date=TQDate(),
53 TQToolTipGroup *group = 0 );
54
55 /* reimplmented from TQToolTip */
56 void maybeTip( const TQPoint &pos );
57
58 private:
59 Calendar *mCalendar;
60 TQDate mDate;
61 TQString mText;
62};
63
64#endif
static void add(TQWidget *widget, Calendar *calendar, Incidence *incidence, const TQDate &date=TQDate(), TQToolTipGroup *group=0, const TQString &longText="")