libplasma
widget.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef WIDGET_H_
00023 #define WIDGET_H_
00024
00025 #include <QtGui/QGraphicsWidget>
00026 #include <QtGui/QPixmap>
00027
00028 #include <QtCore/QRectF>
00029 #include <QtCore/QSizeF>
00030 #include <QtCore/QString>
00031
00032 #include <plasma/plasma_export.h>
00033
00034 class QGraphicsView;
00035 class QGraphicsSceneHoverEvent;
00036
00037 namespace Plasma
00038 {
00039
00040 struct PLASMA_EXPORT ToolTipData
00041 {
00042 ToolTipData() : windowToPreview( 0 ) {}
00043 QString mainText;
00044 QString subText;
00045 QPixmap image;
00046 WId windowToPreview;
00047 };
00048
00049 class Layout;
00050 class WidgetPrivate;
00051
00065 class PLASMA_EXPORT Widget : public QGraphicsWidget
00066 {
00067 Q_OBJECT
00068 public:
00073 explicit Widget(QGraphicsItem *parent = 0 , QObject *parentObject = 0);
00074
00078 virtual ~Widget();
00079
00080
00081 #ifdef TOOLTIPMANAGER
00082
00086 const ToolTipData* toolTip() const;
00087
00092 void setToolTip(const ToolTipData &dt);
00093
00102 virtual void updateToolTip(bool update);
00103
00104 #endif
00105
00106 protected:
00107 #ifdef TOOLTIPMANAGER
00108 virtual bool sceneEvent(QEvent *event);
00109 #endif
00110 private:
00111
00112 WidgetPrivate *const d;
00113 };
00114
00115 }
00116
00117 #endif