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

0001 /***************************************************************************
0002                               coredocument.cpp
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 #include "coredocument.h"
0019 
0020 #include <QDebug>
0021 #include <QFile>
0022 #include <QXmlStreamReader>
0023 
0024 #include "objectstore.h"
0025 
0026 namespace Kst {
0027 
0028 CoreDocument::CoreDocument()
0029 : _objectStore(new ObjectStore()), _dirty(false), _isOpen(false) {
0030   _fileName.clear();
0031 }
0032 
0033 
0034 CoreDocument::~CoreDocument() {
0035   delete _objectStore;
0036   _objectStore = 0;
0037 }
0038 
0039 
0040 QString CoreDocument::fileName() const {
0041   return _fileName;
0042 }
0043 
0044 
0045 ObjectStore* CoreDocument::objectStore() const {
0046   return _objectStore;
0047 }
0048 
0049 
0050 bool CoreDocument::save(const QString& to) {
0051   Q_UNUSED(to);
0052   return true;
0053 }
0054 
0055 
0056 bool CoreDocument::open(const QString& file) {
0057   Q_UNUSED(file);
0058   _isOpen = false;
0059 
0060   return _isOpen = true;
0061 }
0062 
0063 
0064 QString CoreDocument::lastError() const {
0065   return _lastError;
0066 }
0067 
0068 
0069 bool CoreDocument::isChanged() const {
0070   return _dirty;
0071 }
0072 
0073 
0074 bool CoreDocument::isOpen() const {
0075   return _isOpen;
0076 }
0077 
0078 
0079 void CoreDocument::setChanged(bool dirty) {
0080   _dirty = dirty;
0081 }
0082 
0083 
0084 }
0085 
0086 // vim: ts=2 sw=2 et