• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

libplasma

widget.h

Go to the documentation of this file.
00001 /*
00002  *   Copyright 2007 by Alexander Wiedenbruch <mail@wiedenbruch.de>
00003  *                      and Matias Valdenegro <mvaldenegro@informatica.utem.cl>
00004  *
00005  *   This program is free software; you can redistribute it and/or modify
00006  *   it under the terms of the GNU Library General Public License as
00007  *   published by the Free Software Foundation; either version 2, or
00008  *   (at your option) any later version.
00009 
00010  *
00011  *   This program is distributed in the hope that it will be useful,
00012  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *   GNU General Public License for more details
00015  *
00016  *   You should have received a copy of the GNU Library General Public
00017  *   License along with this program; if not, write to the
00018  *   Free Software Foundation, Inc.,
00019  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
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; //Important information
00044     QString subText; //Elaborates on the Main Text
00045     QPixmap image; // Icon to show;
00046     WId windowToPreview; // Id of window to show preview
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 } // Plasma namespace
00116 
00117 #endif

libplasma

Skip menu "libplasma"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libplasma
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal