author | leseb <leseb> | 2002-03-21 17:33:38 (UTC) |
---|---|---|
committer | leseb <leseb> | 2002-03-21 17:33:38 (UTC) |
commit | 29baf8dcda3d05d91d340b739de0fdd9e37f5749 (patch) (side-by-side diff) | |
tree | 5f2958a16cc1f065cdef3e31c2c9500f8aac2e7b /noncore/graphics/drawpad/drawpadcanvas.h | |
parent | 60c9126183ea72c08ad5cb77b8939812627aae17 (diff) | |
download | opie-29baf8dcda3d05d91d340b739de0fdd9e37f5749.zip opie-29baf8dcda3d05d91d340b739de0fdd9e37f5749.tar.gz opie-29baf8dcda3d05d91d340b739de0fdd9e37f5749.tar.bz2 |
Enable any size pages
Diffstat (limited to 'noncore/graphics/drawpad/drawpadcanvas.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/graphics/drawpad/drawpadcanvas.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/noncore/graphics/drawpad/drawpadcanvas.h b/noncore/graphics/drawpad/drawpadcanvas.h index eddcb43..4836a3f 100644 --- a/noncore/graphics/drawpad/drawpadcanvas.h +++ b/noncore/graphics/drawpad/drawpadcanvas.h @@ -11,38 +11,41 @@ * * ***************************************************************************/ #ifndef DRAWPADCANVAS_H #define DRAWPADCANVAS_H -#include <qwidget.h> +#include <qscrollview.h> #include <qlist.h> #include <qpointarray.h> class DrawPad; class QPixmap; -class DrawPadCanvas : public QWidget +class DrawPadCanvas : public QScrollView { Q_OBJECT public: - DrawPadCanvas(DrawPad* drawPad, QWidget* parent = 0, const char* name = 0, WFlags f = 0); + DrawPadCanvas(DrawPad* drawPad, QWidget* parent = 0, const char* name = 0); ~DrawPadCanvas(); void load(QIODevice* ioDevice); + void initialPage(); void save(QIODevice* ioDevice); bool undoEnabled(); bool redoEnabled(); bool goPreviousPageEnabled(); bool goNextPageEnabled(); QPixmap* currentPage(); + uint pagePosition(); + uint pageCount(); public slots: void clearAll(); void newPage(); void clearPage(); void deletePage(); @@ -57,17 +60,16 @@ public slots: signals: void pagesChanged(); void pageBackupsChanged(); protected: - void mousePressEvent(QMouseEvent* e); - void mouseReleaseEvent(QMouseEvent* e); - void mouseMoveEvent(QMouseEvent* e); - void resizeEvent(QResizeEvent* e); - void paintEvent(QPaintEvent* e); + void contentsMousePressEvent(QMouseEvent* e); + void contentsMouseReleaseEvent(QMouseEvent* e); + void contentsMouseMoveEvent(QMouseEvent* e); + void drawContents(QPainter* p, int cx, int cy, int cw, int ch); private: DrawPad* m_pDrawPad; QList<QPixmap> m_pages; QList<QPixmap> m_pageBackups; }; |