From c71ff96bf5e0e7d874ac56b244f1bcf48ad0645e Mon Sep 17 00:00:00 2001 From: "Veronica K. B. Olsen" Date: Wed, 24 Apr 2019 23:23:36 +0200 Subject: [PATCH] Added some more sample text to test some features. --- nw/gui/docdetails.py | 4 +- nw/project/project.py | 6 ++- .../sampleNovel/data_1/4298de4d9524_main.nwd | 3 ++ .../sampleNovel/data_6/36b6aa9b697b_main.nwd | 7 ++- .../sampleNovel/data_b/3e74dbc1f584_main.nwd | 3 ++ .../sampleNovel/data_b/b2c23b3c42cc_main.nwd | 3 ++ sample/sampleNovel/nwProject.nwx | 43 ++++++++++++------- 7 files changed, 50 insertions(+), 19 deletions(-) create mode 100644 sample/sampleNovel/data_1/4298de4d9524_main.nwd create mode 100644 sample/sampleNovel/data_b/3e74dbc1f584_main.nwd create mode 100644 sample/sampleNovel/data_b/b2c23b3c42cc_main.nwd diff --git a/nw/gui/docdetails.py b/nw/gui/docdetails.py index 180d16ca..9366a042 100644 --- a/nw/gui/docdetails.py +++ b/nw/gui/docdetails.py @@ -53,7 +53,7 @@ class GuiDocDetails(QFrame): for nRow in range(4): lblOne = QLabel(colOne[nRow]) lblOne.setFont(self.fntOne) - self.mainBox.addWidget(lblOne,nRow+1,0) + self.mainBox.addWidget(lblOne,nRow,0) self.mainBox.setColumnStretch(0,0) self.mainBox.setColumnStretch(1,1) @@ -79,7 +79,7 @@ class GuiDocDetails(QFrame): for nRow in range(4): lblTwo = QLabel(colTwo[nRow]) lblTwo.setFont(self.fntTwo) - self.mainBox.addWidget(lblTwo,nRow+1,1) + self.mainBox.addWidget(lblTwo,nRow,1) return diff --git a/nw/project/project.py b/nw/project/project.py index 4c22b12c..95449462 100644 --- a/nw/project/project.py +++ b/nw/project/project.py @@ -21,7 +21,7 @@ from time import time from PyQt5.QtGui import QIcon, QPixmap, QColor -from nw.enum import nwItemType, nwItemClass, nwItemAction +from nw.enum import nwItemType, nwItemClass, nwItemLayout, nwItemAction from nw.project.item import NWItem logger = logging.getLogger(__name__) @@ -79,6 +79,10 @@ class NWProject(): newItem = NWItem() newItem.setName(fileName) newItem.setType(nwItemType.FILE) + if fileClass == nwItemClass.NOVEL: + newItem.setLayout(nwItemLayout.SCENE) + else: + newItem.setLayout(nwItemLayout.NOTE) newItem.setClass(fileClass) self._appendItem(None,pHandle,newItem) return newItem.itemHandle diff --git a/sample/sampleNovel/data_1/4298de4d9524_main.nwd b/sample/sampleNovel/data_1/4298de4d9524_main.nwd new file mode 100644 index 00000000..3665ee3c --- /dev/null +++ b/sample/sampleNovel/data_1/4298de4d9524_main.nwd @@ -0,0 +1,3 @@ +# John Smith + +He’s pretty cool. Nor Brad Pitt though. \ No newline at end of file diff --git a/sample/sampleNovel/data_6/36b6aa9b697b_main.nwd b/sample/sampleNovel/data_6/36b6aa9b697b_main.nwd index b30f5024..30579a92 100644 --- a/sample/sampleNovel/data_6/36b6aa9b697b_main.nwd +++ b/sample/sampleNovel/data_6/36b6aa9b697b_main.nwd @@ -1,6 +1,6 @@ # This is the Title -## ... and this is a subtitle +## This is the Subtitle % Begin Meta @POV: Sam @@ -11,3 +11,8 @@ Some text here would look good as well, and maybe some "dialogue"? **Some Section** +So, this is some text that we’ve been adding to this document. It is utterly meaningless text, but since this is just dummy text, that doesn’t really matter. The text is perfectly happy to live in this document regardless. + +This paragraph is also meaningless. + + diff --git a/sample/sampleNovel/data_b/3e74dbc1f584_main.nwd b/sample/sampleNovel/data_b/3e74dbc1f584_main.nwd new file mode 100644 index 00000000..9ae46188 --- /dev/null +++ b/sample/sampleNovel/data_b/3e74dbc1f584_main.nwd @@ -0,0 +1,3 @@ +# Earth + +Third planet from the sun, fairly dense and with lots of people on it. \ No newline at end of file diff --git a/sample/sampleNovel/data_b/b2c23b3c42cc_main.nwd b/sample/sampleNovel/data_b/b2c23b3c42cc_main.nwd new file mode 100644 index 00000000..409a428a --- /dev/null +++ b/sample/sampleNovel/data_b/b2c23b3c42cc_main.nwd @@ -0,0 +1,3 @@ +# Jane Smith + +She’s pretty cool. Not Angelina Jolie though. \ No newline at end of file diff --git a/sample/sampleNovel/nwProject.nwx b/sample/sampleNovel/nwProject.nwx index 773a6f65..0e2e2c4b 100644 --- a/sample/sampleNovel/nwProject.nwx +++ b/sample/sampleNovel/nwProject.nwx @@ -1,12 +1,12 @@ - + Sample Project Sample Project Jane Smith Jay Doh - + Novel ROOT @@ -17,7 +17,7 @@ True - New Chapter + Some Chapter FOLDER NOVEL 1 @@ -39,7 +39,7 @@ 5 - Test File + File With Stuff FILE NOVEL 1 @@ -47,9 +47,9 @@ False False SCENE - 125 - 24 - 2 + 376 + 66 + 4 Characters @@ -61,7 +61,7 @@ True - Jon Smith + John Smith FILE CHARACTER 0 @@ -69,9 +69,9 @@ False False NOTE - 0 - 0 - 0 + 42 + 8 + 1 Jane Smith @@ -82,18 +82,31 @@ False False NOTE - 0 - 0 - 0 + 51 + 9 + 1 - World + Locations ROOT WORLD 0 0 + True + True + + + Earth + FILE + WORLD + 0 + 1 False False + NOTE + 66 + 13 + 1