Add prototyype storage class
This commit is contained in:
@@ -45,6 +45,7 @@ from novelwriter.core.item import NWItem
|
|||||||
from novelwriter.core.index import NWIndex
|
from novelwriter.core.index import NWIndex
|
||||||
from novelwriter.core.status import NWStatus
|
from novelwriter.core.status import NWStatus
|
||||||
from novelwriter.core.options import OptionState
|
from novelwriter.core.options import OptionState
|
||||||
|
from novelwriter.core.storage import NWStorage
|
||||||
from novelwriter.core.document import NWDoc
|
from novelwriter.core.document import NWDoc
|
||||||
from novelwriter.core.projectxml import ProjectXMLReader, ProjectXMLWriter, XMLReadState
|
from novelwriter.core.projectxml import ProjectXMLReader, ProjectXMLWriter, XMLReadState
|
||||||
from novelwriter.common import (
|
from novelwriter.common import (
|
||||||
@@ -68,8 +69,9 @@ class NWProject(QObject):
|
|||||||
self.mainGui = mainGui
|
self.mainGui = mainGui
|
||||||
|
|
||||||
# Core Elements
|
# Core Elements
|
||||||
self._data = NWProjectData(self) # The project settings
|
|
||||||
self._options = OptionState(self) # Project-specific GUI options
|
self._options = OptionState(self) # Project-specific GUI options
|
||||||
|
self._storage = NWStorage(self) # The project storage handler
|
||||||
|
self._data = NWProjectData(self) # The project settings
|
||||||
self._tree = NWTree(self) # The project tree
|
self._tree = NWTree(self) # The project tree
|
||||||
self._index = NWIndex(self) # The projecty index
|
self._index = NWIndex(self) # The projecty index
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,79 @@
|
|||||||
|
"""
|
||||||
|
novelWriter – Project Storage Class
|
||||||
|
===================================
|
||||||
|
The main class handling the project storage
|
||||||
|
|
||||||
|
File History:
|
||||||
|
Created: 2022-11-01 [2.0rc1] NWStorage
|
||||||
|
|
||||||
|
This file is a part of novelWriter
|
||||||
|
Copyright 2018–2022, Veronica Berglyd Olsen
|
||||||
|
|
||||||
|
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 3 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, see <https://www.gnu.org/licenses/>.
|
||||||
|
"""
|
||||||
|
|
||||||
|
import logging
|
||||||
|
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
|
class NWStorage:
|
||||||
|
|
||||||
|
def __init__(self, theProject):
|
||||||
|
self.theProject = theProject
|
||||||
|
return
|
||||||
|
|
||||||
|
##
|
||||||
|
# Core Methods
|
||||||
|
##
|
||||||
|
|
||||||
|
def openProjectFolder(self, path):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def openProjectArchive(self, path):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def close(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
##
|
||||||
|
# Content Access Methods
|
||||||
|
##
|
||||||
|
|
||||||
|
def getXmlReader(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def getXmlWriter(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def getDocument(self, tHandle):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def getMetaFile(self, kind):
|
||||||
|
pass
|
||||||
|
|
||||||
|
##
|
||||||
|
# Internal Functions
|
||||||
|
##
|
||||||
|
|
||||||
|
def _zipIt(self, target):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def _reeadLockFile(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def _writeLockFile(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
# END Class NWStorage
|
||||||
Reference in New Issue
Block a user