summaryrefslogtreecommitdiff
path: root/editor/widget.h
diff options
context:
space:
mode:
authordeva <deva>2008-07-11 12:54:42 +0000
committerdeva <deva>2008-07-11 12:54:42 +0000
commit5a19d9218a5f3ed7d02b7fabd8f025922e9f7a13 (patch)
tree49ee6645bf55e620db824d0c95508a65d4d596e7 /editor/widget.h
parent12bd3e7ff088b097bf4e280161aee646fbbb50dc (diff)
Now we have a nice little editor.
Diffstat (limited to 'editor/widget.h')
-rw-r--r--editor/widget.h32
1 files changed, 27 insertions, 5 deletions
diff --git a/editor/widget.h b/editor/widget.h
index 1cb7d9e..20baef9 100644
--- a/editor/widget.h
+++ b/editor/widget.h
@@ -27,21 +27,43 @@
#ifndef __PRACRO_WIDGET_H__
#define __PRACRO_WIDGET_H__
-#include <QLabel>
+#include <QWidget>
#include <QPixmap>
#include <QMouseEvent>
+#include <QDomElement>
+#include <QPoint>
-class Widget : public QLabel {
+class Widget : public QWidget {
Q_OBJECT
public:
- Widget(QString type);
+ Widget(QDomNode &node);
+
+ QString type;
+
+ void setValue(QString name, QString value);
+
+ QDomElement elem;
protected:
void mousePressEvent(QMouseEvent *event);
+ void mouseMoveEvent(QMouseEvent *event);
+
+ void dragEnterEvent(QDragEnterEvent *event);
+ void dragLeaveEvent(QDragLeaveEvent *event);
+ void dragMoveEvent(QDragMoveEvent *event);
+ void dropEvent(QDropEvent *event);
+
+ void paintEvent(QPaintEvent *event);
private:
- QPixmap pixmap;
- QString widget;
+ bool iscontainer;
+ Qt::Orientation orientation;
+
+ QWidget *dragObject;
+ QWidget *findWidget(QPoint pos);
+
+ QWidget *widget;
+ QPoint dragStartPosition;
};
#endif/*__PRACRO_WIDGET_H__*/