create PresenceManager that manage global presence state and message
[makneto-zunavac1.git] / src / ui-kde / wbforeign.h
blob84d43de3bc85103fdfc8b9fe7cb9b12af76f9370
1 #ifndef WBFOREIGN_H
2 #define WBFOREIGN_H
4 #include "wbitems.h"
6 class Plugin;
8 class WbForeign : public WbItem
10 Q_OBJECT;
11 enum Types { Poll, Other };
12 private:
13 QDomElement svgElement_;
14 Types _type;
15 QGraphicsItem *m_graphicsItem;
16 Plugin *m_plugin;
17 QGraphicsScene *m_scene;
18 public:
19 WbForeign(Plugin *plugin, QDomElement &svg, const QString &id, const qreal &index, const QString &parent = "root", QGraphicsScene *scene = 0);
21 /*! \brief Returns the type of the item (0x87654998).*/
22 int type() const { return 87654998; }
24 /*! \brief Returns the stored SVG element.*/
25 QDomElement svg();
27 /*! \brief Saves the SVG element.*/
28 QList<QString> parseSvg(QDomElement &, bool emitChanges = false);
30 /*! \brief Returns a deep copy of this object but without a scene association.*/
31 WbItem* clone();
33 QGraphicsItem* graphicsItem();
34 protected:
35 virtual QRectF boundingRect() const;
36 virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0);
38 public slots:
39 void sendChanges();
40 void remove();
43 #endif // WBFOREIGN_H