Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/ui/ui-drv/qt/fractalwidget.h
diff options
context:
space:
mode:
authorBernie Innocenti <bernie@codewiz.org>2010-05-03 21:53:47 (GMT)
committer Bernie Innocenti <bernie@codewiz.org>2010-05-03 21:53:47 (GMT)
commit1030dc837b10a03a02a85d5504cbeec168ce49e2 (patch)
tree698eefa87ac437deaf36a4141b326f8ce7986692 /src/ui/ui-drv/qt/fractalwidget.h
Import XaoS r489 (trunk after version 3.5)
Diffstat (limited to 'src/ui/ui-drv/qt/fractalwidget.h')
-rw-r--r--src/ui/ui-drv/qt/fractalwidget.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/src/ui/ui-drv/qt/fractalwidget.h b/src/ui/ui-drv/qt/fractalwidget.h
new file mode 100644
index 0000000..8fcdd8f
--- /dev/null
+++ b/src/ui/ui-drv/qt/fractalwidget.h
@@ -0,0 +1,57 @@
+#ifndef FRACTALWIDGET_H
+#define FRACTALWIDGET_H
+
+#include <QWidget>
+
+class QImage;
+class QPoint;
+
+class FractalWidget : public QWidget
+{
+ Q_OBJECT
+
+private:
+ QImage *m_image[2];
+ int m_activeImage;
+ QPoint m_mousePosition;
+ Qt::MouseButtons m_mouseButtons;
+ Qt::KeyboardModifiers m_keyboardModifiers;
+ int m_keyCombination;
+ QSize m_sizeHint;
+
+ void updateMouse(QMouseEvent *event);
+
+protected:
+ void mousePressEvent(QMouseEvent *event);
+ void mouseReleaseEvent(QMouseEvent *event);
+ void mouseMoveEvent(QMouseEvent *event);
+ void wheelEvent(QWheelEvent *event);
+ void keyPressEvent(QKeyEvent *event);
+ void keyReleaseEvent(QKeyEvent *event);
+ void paintEvent (QPaintEvent *event);
+ void resizeEvent(QResizeEvent *event);
+
+public:
+ FractalWidget();
+
+ void createImages();
+ void destroyImages();
+
+ char *imageBuffer1();
+ char *imageBuffer2();
+ int imageBytesPerLine();
+ QSize imageSize();
+
+ void switchActiveImage();
+
+ QPoint mousePosition();
+ int mouseButtons();
+ int keyCombination();
+
+ void setCursorType(int type);
+
+ QSize sizeHint() const;
+ void setSizeHint(const QSize &size);
+};
+
+#endif // FRACTALWIDGET_H