File indexing completed on 2024-12-22 04:17:17

0001 /***************************************************************************
0002                               coredocument.h
0003                              -------------------
0004     begin                : October 3, 2007
0005     copyright            : (C) 2007 by The University of Toronto
0006     email                : netterfield@astro.utoronto.ca
0007  ***************************************************************************/
0008 
0009 /***************************************************************************
0010  *                                                                         *
0011  *   This program is free software; you can redistribute it and/or modify  *
0012  *   it under the terms of the GNU General Public License as published by  *
0013  *   the Free Software Foundation; either version 2 of the License, or     *
0014  *   (at your option) any later version.                                   *
0015  *                                                                         *
0016  ***************************************************************************/
0017 
0018 #ifndef COREDOCUMENT_H
0019 #define COREDOCUMENT_H
0020 
0021 #include <QPointer>
0022 #include <QString>
0023 
0024 #include "kst_export.h"
0025 
0026 namespace Kst {
0027 
0028 class ObjectStore;
0029 
0030 class KSTCORE_EXPORT CoreDocument
0031 {
0032   public:
0033     CoreDocument();
0034     virtual ~CoreDocument();
0035 
0036     virtual QString fileName() const;
0037 
0038     virtual ObjectStore *objectStore() const;
0039 
0040     virtual bool open(const QString& file);
0041     virtual bool save(const QString& to = QString());
0042 
0043     virtual bool isChanged() const;
0044     virtual void setChanged(bool changed);
0045     virtual bool isOpen() const;
0046 
0047     virtual QString lastError() const;
0048 
0049   private:
0050     ObjectStore *_objectStore;
0051     bool _dirty;
0052     bool _isOpen;
0053     QString _fileName;
0054     QString _lastError;
0055 };
0056 
0057 }
0058 
0059 #endif
0060 
0061 // vim: ts=2 sw=2 et