00001 /*************************************************************************** 00002 * * 00003 * DrawPad - a drawing program for Opie Environment * 00004 * * 00005 * (C) 2002 by S. Prud'homme <prudhomme@laposte.net> * 00006 * * 00007 * This program is free software; you can redistribute it and/or modify * 00008 * it under the terms of the GNU General Public License as published by * 00009 * the Free Software Foundation; either version 2 of the License, or * 00010 * (at your option) any later version. * 00011 * * 00012 ***************************************************************************/ 00013 00014 #ifndef PAGE_H 00015 #define PAGE_H 00016 00017 #include <qobject.h> 00018 00019 #include <qdatetime.h> 00020 #include <qlist.h> 00021 #include <qpixmap.h> 00022 00023 class Page : public QObject 00024 { 00025 public: 00026 Page(); 00027 Page(QString title, int w, int h); 00028 Page(QString title, const QSize& size); 00029 00030 ~Page(); 00031 00032 QString title() const; 00033 QDateTime lastModified() const; 00034 QPixmap* pixmap() const; 00035 00036 void setTitle(QString title); 00037 void setLastModified(QDateTime lastModified); 00038 00039 bool undoEnabled(); 00040 bool redoEnabled(); 00041 00042 void backup(); 00043 void undo(); 00044 void redo(); 00045 00046 private: 00047 QString m_title; 00048 QDateTime m_lastModified; 00049 QPixmap* m_pPixmap; 00050 00051 QList<QPixmap> m_backHistory; 00052 QList<QPixmap> m_forwardHistory; 00053 }; 00054 00055 #endif // PAGE_H
1.4.2