/* * Copyright (C) 2002 Ewald Kraemer - Mail: ewald72@yahoo.com * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef SCROLLDISPLAY_H #define SCROLLDISPLAY_H #include #include #include #include #include class PaintArea : public QWidget { Q_OBJECT public: PaintArea(QWidget *parent=0, const char *name=0, WFlags flags=0); ~PaintArea(); QPixmap *pm; void paintEvent(QPaintEvent *e); void setImage (QImage&); bool load (QString); bool save (QString, const char*); signals: void pressed(QMouseEvent*); void draggedBy(int,int); private: void mousePressEvent (QMouseEvent*); void mouseReleaseEvent(QMouseEvent*); void mouseMoveEvent (QMouseEvent*); bool dragging; int sx,sy; }; class ScrollDisplay : public QScrollView { Q_OBJECT public: PaintArea *paint_area; ScrollDisplay(QWidget *parent=0, const char *name=0, WFlags flags=0); ~ScrollDisplay(); }; #endif