// // C++ Interface: ucdesktop // // Description: // // Author: , (C) 2007 // // Copyright: See COPYING file that comes with this distribution // // // Here we avoid loading the header multiple times #ifndef Ucdesktop_HEADER #define Ucdesktop_HEADER // We need the Plasma Applet headers #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "ucditem.h" #include "ucdpile.h" // Define our plasma Applet class UCDesktop : public Plasma::Applet { Q_OBJECT public: // Basic Create/Destroy UCDesktop(QObject *parent, const QStringList &args); ~UCDesktop(); // This function returns the size of your applet QRectF boundingRect() const; // The paintInterface procedure paints the applet to screen void paintInterface(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget =0); //autosave; //grouping; //slot-steuerung; public Q_SLOTS: void addItem(UCDItem *item); void addPile(UCDPile *pile); private: Plasma::Svg m_ucdesktop_theme; KIcon m_ucdesktop_icon; std::vector items; std::vector piles; protected: virtual void mouseMoveEvent ( QGraphicsSceneMouseEvent * event ); virtual void mousePressEvent ( QGraphicsSceneMouseEvent * event ); virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event ); }; // This is the command that links your applet to the .desktop file K_EXPORT_PLASMA_APPLET(ucdesktop, UCDesktop) #endif