1 /* This file is part of the KDE Libraries
2 * Copyright (C) 2004 Peter Rockai (mornfall) <mornfall@danill.sk>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public License
15 * along with this library; see the file COPYING.LIB. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
19 #ifndef KWHATSTHISMANAGER_P_H
20 #define KWHATSTHISMANAGER_P_H
22 #include <kdeui_export.h>
27 * This class is used automatically by KMainWindow and KDialog to attach a
28 * What's This templates to all new widgets. If you don't use either of those
29 * classes and want this functionality, call KWhatsThisManager::init () before
30 * creating any widgets.
32 * It works by watching for child creation events and if the new objects are
33 * widgets, it attachs the whatsthis template to them (unless there already is
34 * What's This defined). This template will be overridden by any custom What's
38 * @author Peter Rockai (mornfall) <mornfall@danill.sk>
40 class KDEUI_EXPORT KWhatsThisManager
: public QObject
46 bool eventFilter( QObject
*object
, QEvent
*event
);
49 static KWhatsThisManager
*s_instance
;
53 void clicked( const QString
&, QWidget
* );