File indexing completed on 2024-04-21 03:41:53
0001 /*************************************************************************** 0002 * Copyright (C) 2004-2005 by Albert Astals Cid * 0003 * aacid@kde.org * 0004 * * 0005 * This program is free software; you can redistribute it and/or modify * 0006 * it under the terms of the GNU General Public License as published by * 0007 * the Free Software Foundation; either version 2 of the License, or * 0008 * (at your option) any later version. * 0009 ***************************************************************************/ 0010 0011 #ifndef POPUPMANAGER_H 0012 #define POPUPMANAGER_H 0013 0014 #include <QObject> 0015 0016 class QWidget; 0017 0018 class myPopup; 0019 class QPoint; 0020 0021 class popupManager : public QObject 0022 { 0023 Q_OBJECT 0024 public: 0025 popupManager(); 0026 0027 // sets the parent widget of the popups 0028 void setWidget(QWidget *w); 0029 0030 // shows text at p and the flag 0031 void show(const QString &text, const QString &wikiLink, const QString &text2, const QPoint &p, const QString &flagFile); 0032 0033 // shows text at p 0034 void show(const QString &text, const QString &wikiLink, const QString &text2, const QPoint &p); 0035 0036 // shows text at p 0037 void show(const QString &text, const QString &wikiLink, const QPoint &p); 0038 0039 public Q_SLOTS: 0040 void clear(); 0041 0042 private: 0043 void init(const QPoint &p); 0044 0045 myPopup *p_mp; 0046 QWidget *p_parent; 0047 }; 0048 0049 #endif