2008-07-16 17:17:44 +02:00
|
|
|
/*
|
|
|
|
* Copyright 2007 by Dan Meltzer <hydrogen@notyetimplemented.com>
|
|
|
|
* Copyright (C) 2008 by Alexis Ménard <darktears31@gmail.com>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Library General Public License as
|
|
|
|
* published by the Free Software Foundation; either version 2, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this program; if not, write to the
|
|
|
|
* Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef PLASMA_TOOLTIP_P_H
|
|
|
|
#define PLASMA_TOOLTIP_P_H
|
|
|
|
|
2008-08-23 18:17:04 +02:00
|
|
|
#include <QWidget> // base class
|
2008-07-16 17:17:44 +02:00
|
|
|
|
2008-10-21 04:31:43 +02:00
|
|
|
#include <plasma/tooltipmanager.h> //Content struct
|
2008-07-16 17:17:44 +02:00
|
|
|
|
|
|
|
namespace Plasma {
|
|
|
|
|
2008-08-23 18:17:04 +02:00
|
|
|
class ToolTipPrivate;
|
2008-07-16 17:17:44 +02:00
|
|
|
|
|
|
|
class ToolTip : public QWidget
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2008-08-23 18:17:04 +02:00
|
|
|
|
2008-07-16 17:17:44 +02:00
|
|
|
public:
|
2008-07-17 01:27:34 +02:00
|
|
|
ToolTip(QObject *source);
|
2008-07-16 17:17:44 +02:00
|
|
|
~ToolTip();
|
2008-08-23 18:17:04 +02:00
|
|
|
|
2008-07-16 17:17:44 +02:00
|
|
|
void updateTheme();
|
2008-10-21 04:31:43 +02:00
|
|
|
void setContent(const ToolTipManager::Content &data);
|
2008-09-18 23:53:52 +02:00
|
|
|
void prepareShowing(bool cueUpdate);
|
2008-08-28 22:23:39 +02:00
|
|
|
void setActivated(bool value);
|
|
|
|
bool isActivated();
|
2008-07-16 17:17:44 +02:00
|
|
|
|
|
|
|
protected:
|
|
|
|
void showEvent(QShowEvent *);
|
2008-07-17 01:27:34 +02:00
|
|
|
void hideEvent(QHideEvent *);
|
2008-07-16 17:17:44 +02:00
|
|
|
void mouseReleaseEvent(QMouseEvent *);
|
|
|
|
|
|
|
|
void resizeEvent(QResizeEvent *);
|
|
|
|
void paintEvent(QPaintEvent *);
|
|
|
|
|
2008-07-17 01:27:34 +02:00
|
|
|
private Q_SLOTS:
|
|
|
|
void sourceDestroyed();
|
|
|
|
|
2008-07-16 17:17:44 +02:00
|
|
|
private:
|
2008-08-23 18:17:04 +02:00
|
|
|
ToolTipPrivate * const d;
|
2008-07-16 17:17:44 +02:00
|
|
|
};
|
|
|
|
|
2008-08-23 18:17:04 +02:00
|
|
|
} // namespace Plasma
|
2008-07-16 17:17:44 +02:00
|
|
|
|
2008-08-23 18:17:04 +02:00
|
|
|
#endif // PLASMA_TOOLTIP_P_H
|
2008-07-16 17:17:44 +02:00
|
|
|
|