1 /*************************************************************************** 2 coredocument.h 3 ------------------- 4 begin : October 3, 2007 5 copyright : (C) 2007 by The University of Toronto 6 email : netterfield@astro.utoronto.ca 7 ***************************************************************************/ 8 9 /*************************************************************************** 10 * * 11 * This program is free software; you can redistribute it and/or modify * 12 * it under the terms of the GNU General Public License as published by * 13 * the Free Software Foundation; either version 2 of the License, or * 14 * (at your option) any later version. * 15 * * 16 ***************************************************************************/ 17 18 #ifndef COREDOCUMENT_H 19 #define COREDOCUMENT_H 20 21 #include <QPointer> 22 #include <QString> 23 24 #include "kst_export.h" 25 26 namespace Kst { 27 28 class ObjectStore; 29 30 class KSTCORE_EXPORT CoreDocument 31 { 32 public: 33 CoreDocument(); 34 virtual ~CoreDocument(); 35 36 virtual QString fileName() const; 37 38 virtual ObjectStore *objectStore() const; 39 40 virtual bool open(const QString& file); 41 virtual bool save(const QString& to = QString()); 42 43 virtual bool isChanged() const; 44 virtual void setChanged(bool changed); 45 virtual bool isOpen() const; 46 47 virtual QString lastError() const; 48 49 private: 50 ObjectStore *_objectStore; 51 bool _dirty; 52 bool _isOpen; 53 QString _fileName; 54 QString _lastError; 55 }; 56 57 } 58 59 #endif 60 61 // vim: ts=2 sw=2 et 62