Merge branch 'file_headers' into source_code_maintenance

This commit is contained in:
Veronica K. B. Olsen
2021-01-16 17:51:32 +01:00
73 changed files with 1399 additions and 848 deletions
@@ -23,7 +23,6 @@ link = 44, 152, 247
linkvisited = 44, 152, 247 linkvisited = 44, 152, 247
[GUI] [GUI]
treewordcount = 197, 200, 198
statusnone = 150, 152, 150 statusnone = 150, 152, 150
statussaved = 39, 135, 78 statussaved = 39, 135, 78
statusunsaved = 138, 32, 32 statusunsaved = 138, 32, 32
+18 -19
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Common Functions """
novelWriter Common Functions
==============================
Various common functions
novelWriter Common Functions File History:
================================ Created: 2019-05-12 [0.1.0]
Various functions used multiple places
File History: This file is a part of novelWriter
Created: 2019-05-12 [0.1.0] Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 import logging
+18 -19
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Config Class """
novelWriter Config Class
==========================
Class holding the user preferences and handling the config file
novelWriter Config Class File History:
============================ Created: 2018-09-22 [0.0.1]
Class reading and holding the preferences of the application
File History: This file is a part of novelWriter
Created: 2018-09-22 [0.0.1] Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 import logging
+18 -19
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Constants """
novelWriter Constants
=======================
Constants and maps for translating flags and enums to text
novelWriter Constants File History:
========================= Created: 2019-04-28 [0.0.1]
Constants for translating flags and enums to text
File History: This file is a part of novelWriter
Created: 2019-04-28 [0.0.1] Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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/>.
""" """
from nw.constants.enum import ( from nw.constants.enum import (
+18 -19
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Enums """
novelWriter Enums
===================
Global enum values
novelWriter Enums File History:
===================== Created: 2018-11-02 [0.0.1]
All enum values
File History: This file is a part of novelWriter
Created: 2018-11-02 [0.0.1] Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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/>.
""" """
from enum import Enum from enum import Enum
+18 -19
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter ISO Codes """
novelWriter ISO Codes
=======================
Handles translating language codes to language names
novelWriter ISO Codes File History:
========================= Created: 2019-11-05 [0.4.0]
Handles translating language codes to language names
File History: This file is a part of novelWriter
Created: 2019-11-05 [0.4.0] Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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/>.
""" """
class isoLanguage(): class isoLanguage():
+18 -19
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Project Document """
novelWriter Project Document
==============================
Data class for a single novelWriter document
novelWriter Project Document File History:
================================ Created: 2018-09-29 [0.0.1]
Class holding a single novelWriter document
File History: This file is a part of novelWriter
Created: 2018-09-29 [0.0.1] Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 import logging
+18 -19
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Project Index """
novelWriter Project Index
===========================
Data class for the project index of tags, headers and references
novelWriter Project Index File History:
============================= Created: 2019-05-27 [0.1.4]
Class holding the project index of tags, headers and references
File History: This file is a part of novelWriter
Created: 2019-05-27 [0.1.4] Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 nw import nw
+18 -19
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Project Item Class """
novelWriter Project Item Class
================================
Data class for a project tree item
novelWriter Project Item Class File History:
================================== Created: 2018-10-27 [0.0.1]
Class holding the data of a project tree item
File History: This file is a part of novelWriter
Created: 2018-10-27 [0.0.1] Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 import logging
+19 -20
View File
@@ -1,29 +1,28 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Project Options Cache """
novelWriter Project Options Cache
===================================
Data class for user-defined GUI project options
novelWriter Project Options Cache File History:
===================================== Created: 2019-10-21 [0.3.1]
Class wrapping the project options state Rewritten: 2020-02-19 [0.4.5]
File History: This file is a part of novelWriter
Created: 2019-10-21 [0.3.1] Copyright 20182021, Veronica Berglyd Olsen
Rewritten: 2020-02-19 [0.4.5]
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 import logging
+18 -19
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Project Wrapper """
novelWriter Project Wrapper
=============================
Data class for novelWriter projects
novelWriter Project Wrapper File History:
=============================== Created: 2018-09-29 [0.0.1]
Class wrapping the data of a novelWriter project
File History: This file is a part of novelWriter
Created: 2018-09-29 [0.0.1] Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 nw import nw
+18 -19
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Spell Check Classes """
novelWriter Spell Check Classes
=================================
Wrapper classes for spell checking tools
novelWriter Spell Check Classes File History:
=================================== Created: 2019-06-11 [0.1.5]
Wrapper class for spell checking tools
File History: This file is a part of novelWriter
Created: 2019-06-11 [0.1.5] Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 nw import nw
+18 -19
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Project Item Status Class """
novelWriter Project Item Status Class
=======================================
Data class for the status/importance settings of a project item
novelWriter Project Item Status Class File History:
========================================= Created: 2019-05-19 [0.1.3]
Class holding the status/importance elements of a project item
File History: This file is a part of novelWriter
Created: 2019-05-19 [0.1.3] Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 import logging
+18 -19
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter HTML Text Converter """
novelWriter HTML Text Converter
=================================
Extends the Tokenizer class to generate HTML output
novelWriter HTML Text Converter File History:
=================================== Created: 2019-05-07 [0.0.1]
Extends the Tokenizer class to write HTML
File History: This file is a part of novelWriter
Created: 2019-05-07 [0.0.1] Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 import logging
+18 -19
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Text Tokenizer """
novelWriter Text Tokenizer
============================
Splits a piece of novelWriter markdown text into its elements
novelWriter Text Tokenizer File History:
============================== Created: 2019-05-05 [0.0.1]
Splits a piece of novelWriter markdown text into its elements
File History: This file is a part of novelWriter
Created: 2019-05-05 [0.0.1] Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 import logging
+21 -22
View File
@@ -1,31 +1,30 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Various Tools """
novelWriter Various Tools
===========================
Various core tool functions
novelWriter Various Tools File History:
============================= Created: 2019-04-22 [0.0.1] countWords
Various core tool functions Created: 2019-10-13 [0.2.3] numberToWord, _numberToWordEN
Merged: 2020-05-08 [0.4.5] All of the above into this file
Created: 2020-07-05 [0.10.0] numberToRoman
File History: This file is a part of novelWriter
Created: 2019-04-22 [0.0.1] countWords Copyright 20182021, Veronica Berglyd Olsen
Created: 2019-10-13 [0.2.3] numberToWord, _numberToWordEN
Merged: 2020-05-08 [0.4.5] All of the above into this file
Created: 2020-07-05 [0.10.0] numberToRoman
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 import logging
+18 -19
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Project Tree Class """
novelWriter Project Tree Class
================================
Data class for the project's tree of project items
novelWriter Project Tree Class File History:
================================== Created: 2020-05-07 [0.4.5]
Class holding the project's tree of project items
File History: This file is a part of novelWriter
Created: 2020-05-07 [0.4.5] Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 import logging
+18 -19
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Exception Handling """
novelWriter Exception Handling
================================
Error handling function and error dialog
novelWriter Exception Handling File History:
================================== Created: 2020-08-02 [0.10.2]
Error handling functions
File History: This file is a part of novelWriter
Created: 2020-08-02 [0.10.2] Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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/>.
""" """
from PyQt5.QtCore import Qt from PyQt5.QtCore import Qt
+18 -19
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter GUI About Box """
novelWriter GUI About Box
===========================
The about novelWriter dialog box
novelWriter GUI About Box File History:
============================= Created: 2020-05-21 [0.5.2]
The about novelWriter dialog box
File History: This file is a part of novelWriter
Created: 2020-05-21 [0.5.2] Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 nw import nw
+18 -19
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter GUI Build Novel Project """
novelWriter GUI Build Novel Project
=====================================
GUI classes for the build novel project dialog
novelWriter GUI Build Novel Project File History:
======================================= Created: 2020-05-09 [0.5]
Class holding the build novel project dialog
File History: This file is a part of novelWriter
Created: 2020-05-09 [0.5] Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 nw import nw
+20 -21
View File
@@ -1,30 +1,29 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Custom Widgets and Layouts """
novelWriter Custom Widgets and Layouts
========================================
Various custom widget and layout classes
novelWriter Custom Widgets and Layouts File History:
========================================== Created: 2020-05-03 [0.4.5] QConfigLayout
Various custom widget and layout classes Created: 2020-05-03 [0.4.5] QSwitch
Created: 2020-05-17 [0.5.1] PagedDialog
File History: This file is a part of novelWriter
Created: 2020-05-03 [0.4.5] QConfigLayout Copyright 20182021, Veronica Berglyd Olsen
Created: 2020-05-03 [0.4.5] QSwitch
Created: 2020-05-17 [0.5.1] PagedDialog
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 nw import nw
+24 -25
View File
@@ -1,34 +1,33 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter GUI Document Editor """
novelWriter GUI Document Editor
=================================
GUI classes for the main document editor
novelWriter GUI Document Editor File History:
=================================== Created: 2018-09-29 [0.0.1] GuiDocEditor
Class holding the main document editor Created: 2019-04-22 [0.0.1] BackgroundWordCounter
Created: 2019-09-29 [0.2.1] GuiDocEditSearch
Created: 2020-04-25 [0.4.5] GuiDocEditHeader
Rewritten: 2020-06-15 [0.9.0] GuiDocEditSearch
Created: 2020-06-27 [0.10.0] GuiDocEditFooter
Rewritten: 2020-10-07 [1.0b3] BackgroundWordCounter
File History: This file is a part of novelWriter
Created: 2018-09-29 [0.0.1] GuiDocEditor Copyright 20182021, Veronica Berglyd Olsen
Created: 2019-04-22 [0.0.1] BackgroundWordCounter
Created: 2019-09-29 [0.2.1] GuiDocEditSearch
Created: 2020-04-25 [0.4.5] GuiDocEditHeader
Rewritten: 2020-06-15 [0.9.0] GuiDocEditSearch
Created: 2020-06-27 [0.10.0] GuiDocEditFooter
Rewritten: 2020-10-07 [1.0b3] BackgroundWordCounter
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 nw import nw
+18 -19
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter GUI Document Highlighter """
novelWriter GUI Syntax Highlighter
====================================
Class for the main document editor syntax highlighter
novelWriter GUI Document Highlighter File History:
======================================== Created: 2019-04-06 [0.0.1]
Subclass for the main editor syntax highlighting
File History: This file is a part of novelWriter
Created: 2019-04-06 [0.0.1] Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 nw import nw
+18 -19
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter GUI Doc Merge """
novelWriter GUI Doc Merge Tool
================================
GUI class for merging multiple documents to one document
novelWriter GUI Doc Merge File History:
============================= Created: 2020-01-23 [0.4.3]
Tool for merging multiple documents to one document
File History: This file is a part of novelWriter
Created: 2020-01-23 [0.4.3] Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 nw import nw
+18 -19
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter GUI Doc Split """
novelWriter GUI Doc Split Tool
================================
GUI class for splitting a single document into multiple documents
novelWriter GUI Doc Split File History:
============================= Created: 2020-02-01 [0.4.3]
Tool for splitting a single document into multiple documents
File History: This file is a part of novelWriter
Created: 2020-02-01 [0.4.3] Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 nw import nw
+22 -23
View File
@@ -1,32 +1,31 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter GUI Document Viewer """
novelWriter GUI Document Viewer
=================================
GUI classes for the main document viewer
novelWriter GUI Document Viewer File History:
=================================== Created: 2019-05-10 [0.0.1] GuiDocViewer
Class holding the main document viewer Created: 2019-10-31 [0.3.2] GuiDocViewDetails
Created: 2020-04-25 [0.4.5] GuiDocViewHeader
Created: 2020-06-09 [0.8.0] GuiDocViewFooter
Created: 2020-09-08 [1.0b1] GuiDocViewHistory
File History: This file is a part of novelWriter
Created: 2019-05-10 [0.0.1] GuiDocViewer Copyright 20182021, Veronica Berglyd Olsen
Created: 2019-10-31 [0.3.2] GuiDocViewDetails
Created: 2020-04-25 [0.4.5] GuiDocViewHeader
Created: 2020-06-09 [0.8.0] GuiDocViewFooter
Created: 2020-09-08 [1.0b1] GuiDocViewHistory
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 nw import nw
+17 -18
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter GUI Document Details """
novelWriter GUI Item Details Panel
novelWriter GUI Document Details
==================================== ====================================
Class holding the project tree item details panel GUI class for the project tree item details panel
File History: File History:
Created: 2019-04-24 [0.0.1] Created: 2019-04-24 [0.0.1]
This file is a part of novelWriter This file is a part of novelWriter
Copyright 20182021, Veronica Berglyd Olsen Copyright 20182021, Veronica Berglyd Olsen
This program is free software: you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or the Free Software Foundation, either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
This program is distributed in the hope that it will be useful, but This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details. General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. along with this program. If not, see <https://www.gnu.org/licenses/>.
""" """
import nw import nw
+18 -19
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter GUI Item Editor """
novelWriter GUI Item Editor
=============================
GUI class for the item editor dialog
novelWriter GUI Item Editor File History:
=============================== Created: 2019-04-27 [0.0.1]
Class holding the item editor dialog
File History: This file is a part of novelWriter
Created: 2019-04-27 [0.0.1] Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 nw import nw
+18 -19
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter GUI Main Menu """
novelWriter GUI Main Menu
===========================
GUI class for the main window menu
novelWriter GUI Main Menu File History:
============================= Created: 2019-04-27 [0.0.1]
Class holding the main window menu
File History: This file is a part of novelWriter
Created: 2019-04-27 [0.0.1] Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 nw import nw
+18 -19
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter GUI Project Outline """
novelWriter GUI Project Outline
=================================
GUI class for the project outline view
novelWriter GUI Project Outline File History:
=================================== Created: 2019-11-16 [0.4.1]
Class holding the project outline view
File History: This file is a part of novelWriter
Created: 2019-11-16 [0.4.1] Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 nw import nw
+18 -19
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter GUI Project Outline Details """
novelWriter GUI Project Outline Details
=========================================
GUI class for the project outline details panel
novelWriter GUI Project Outline Details File History:
=========================================== Created: 2020-06-02 [0.7.0]
Class holding the project outline details panel
File History: This file is a part of novelWriter
Created: 2020-06-02 [0.7.0] Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 nw import nw
+18 -19
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter GUI Preferences """
novelWriter GUI Preferences
=============================
GUI classes for the user preferences dialog
novelWriter GUI Preferences File History:
=============================== Created: 2019-06-10 [0.1.5]
Class holding the preferences dialog
File History: This file is a part of novelWriter
Created: 2019-06-10 [0.1.5] Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 nw import nw
+18 -19
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter GUI Open Project """
novelWriter GUI Open Project
==============================
GUI class for the load/browse/new project dialog
novelWriter GUI Open Project File History:
================================ Created: 2020-02-26 [0.4.5]
Class holding the load/browse/new project dialog
File History: This file is a part of novelWriter
Created: 2020-02-26 [0.4.5] Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 nw import nw
+18 -19
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter GUI Project Settings """
novelWriter GUI Project Settings
==================================
GUI classes for the project settings dialog
novelWriter GUI Project Settings File History:
==================================== Created: 2018-09-29 [0.0.1]
Class holding the project settings dialog
File History: This file is a part of novelWriter
Created: 2018-09-29 [0.0.1] Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 nw import nw
+19 -20
View File
@@ -1,29 +1,28 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter GUI Project Tree """
novelWriter GUI Project Tree
==============================
GUI classes for the main window project tree
novelWriter GUI project Tree File History:
================================ Created: 2018-09-29 [0.0.1] GuiProjectTree
Class holding the project tree view Created: 2020-06-04 [0.7.0] GuiProjectTreeMenu
File History: This file is a part of novelWriter
Created: 2018-09-29 [0.0.1] GuiProjectTree Copyright 20182021, Veronica Berglyd Olsen
Created: 2020-06-04 [0.7.0] GuiProjectTreeMenu
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 nw import nw
+18 -19
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter GUI New Project Wizard """
novelWriter GUI New Project Wizard
====================================
GUI classes for the new project wizard dialog
novelWriter GUI New project Wizard File History:
====================================== Created: 2020-07-11 [0.10.1]
Class holding the new project wizard dialog
File History: This file is a part of novelWriter
Created: 2020-07-11 [0.10.1] Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 nw import nw
+18 -19
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter GUI Main Window StatusBar """
novelWriter GUI Main Window Status Bar
========================================
GUI class for the main window status bar
novelWriter GUI Main Window StatusBar File History:
========================================= Created: 2019-04-20 [0.0.1]
Class holding the main window status bar
File History: This file is a part of novelWriter
Created: 2019-04-20 [0.0.1] Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 nw import nw
+22 -25
View File
@@ -1,29 +1,28 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Theme and Icons Classes """
novelWriter Theme and Icons Classes
=====================================
Classes managing and caching themes and icons
novelWriter Theme and Icons Classs File History:
====================================== Created: 2019-05-18 [0.1.3] GuiTheme
Class managing and caching themes and icons Created: 2019-11-08 [0.4.0] GuiIcons
File History: This file is a part of novelWriter
Created: 2019-05-18 [0.1.3] GuiTheme Copyright 20182021, Veronica Berglyd Olsen
Created: 2019-11-08 [0.4.0] GuiIcons
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 nw import nw
@@ -76,11 +75,10 @@ class GuiTheme:
self.themeLicenseUrl = "" self.themeLicenseUrl = ""
## GUI ## GUI
self.treeWCount = [0, 0, 0]
self.statNone = [120, 120, 120] self.statNone = [120, 120, 120]
self.statUnsaved = [120, 120, 40] self.statUnsaved = [200, 15, 39]
self.statSaved = [40, 120, 0] self.statSaved = [2, 133, 37]
self.helpText = [0, 0, 0] self.helpText = [0, 0, 0]
# Loaded Syntax Settings # Loaded Syntax Settings
@@ -309,7 +307,6 @@ class GuiTheme:
## GUI ## GUI
cnfSec = "GUI" cnfSec = "GUI"
if confParser.has_section(cnfSec): if confParser.has_section(cnfSec):
self.treeWCount = self._loadColour(confParser, cnfSec, "treewordcount")
self.statNone = self._loadColour(confParser, cnfSec, "statusnone") self.statNone = self._loadColour(confParser, cnfSec, "statusnone")
self.statUnsaved = self._loadColour(confParser, cnfSec, "statusunsaved") self.statUnsaved = self._loadColour(confParser, cnfSec, "statusunsaved")
self.statSaved = self._loadColour(confParser, cnfSec, "statussaved") self.statSaved = self._loadColour(confParser, cnfSec, "statussaved")
+18 -19
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter GUI Writing Statistics """
novelWriter GUI Writing Statistics
====================================
GUI class for the session statistics dialog
novelWriter GUI Writing Statistics File History:
====================================== Created: 2019-10-20 [0.3]
Class holding the word count and session statistics dialog
File History: This file is a part of novelWriter
Created: 2019-10-20 [0.3] Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 nw import nw
+38 -31
View File
@@ -1,28 +1,27 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter GUI Main Window """
novelWriter GUI Main Window
=============================
The main application window
novelWriter GUI Main Window File History:
=============================== Created: 2018-09-22 [0.0.1]
Class holding the main application window
File History: This file is a part of novelWriter
Created: 2018-09-22 [0.0.1] Copyright 20182021, Veronica Berglyd Olsen
This file is a part of novelWriter This program is free software: you can redistribute it and/or modify
Copyright 20182021, Veronica Berglyd Olsen 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 free software: you can redistribute it and/or modify This program is distributed in the hope that it will be useful, but
it under the terms of the GNU General Public License as published by WITHOUT ANY WARRANTY; without even the implied warranty of
the Free Software Foundation, either version 3 of the License, or MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
(at your option) any later version. General Public License for more details.
This program is distributed in the hope that it will be useful, but You should have received a copy of the GNU General Public License
WITHOUT ANY WARRANTY; without even the implied warranty of along with this program. If not, see <https://www.gnu.org/licenses/>.
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 nw import nw
@@ -90,7 +89,7 @@ class GuiMain(QMainWindow):
# Prepare Main Window # Prepare Main Window
self.resize(*self.mainConf.getWinSize()) self.resize(*self.mainConf.getWinSize())
self._setWindowTitle() self._updateWindowTitle()
self.setWindowIcon(QIcon(self.mainConf.appIcon)) self.setWindowIcon(QIcon(self.mainConf.appIcon))
# Build the GUI # Build the GUI
@@ -300,10 +299,13 @@ class GuiMain(QMainWindow):
# Work Area # Work Area
self.docEditor.clearEditor() self.docEditor.clearEditor()
self.docEditor.setDictionaries()
self.closeDocViewer() self.closeDocViewer()
self.projMeta.clearDetails()
# General # General
self.statusBar.clearStatus() self.statusBar.clearStatus()
self._updateWindowTitle()
return True return True
@@ -322,11 +324,12 @@ class GuiMain(QMainWindow):
"""Create new project via the new project wizard. """Create new project via the new project wizard.
""" """
if self.hasProject: if self.hasProject:
self.makeAlert( if not self.closeProject():
"Please close the current project before making a new one.", self.makeAlert(
nwAlert.ERROR "Cannot create new project when another project is open.",
) nwAlert.ERROR
return False )
return False
if projData is None: if projData is None:
projData = self.showNewProjectDialog() projData = self.showNewProjectDialog()
@@ -351,8 +354,13 @@ class GuiMain(QMainWindow):
self.rebuildTrees() self.rebuildTrees()
self.saveProject() self.saveProject()
self.hasProject = True self.hasProject = True
self.statusBar.setRefTime(self.theProject.projOpened) self.docEditor.setDictionaries()
self.rebuildIndex(beQuiet=True) self.rebuildIndex(beQuiet=True)
self.statusBar.setRefTime(self.theProject.projOpened)
self.statusBar.setProjectStatus(True)
self.statusBar.setDocumentStatus(None)
self.statusBar.setStatus("New project created ...")
self._updateWindowTitle(self.theProject.projName)
else: else:
self.theProject.clearProject() self.theProject.clearProject()
return False return False
@@ -399,7 +407,6 @@ class GuiMain(QMainWindow):
self.closeDocument() self.closeDocument()
self.docViewer.clearNavHistory() self.docViewer.clearNavHistory()
self.projView.closeOutline() self.projView.closeOutline()
self.projMeta.clearDetails()
self.theProject.closeProject() self.theProject.closeProject()
self.theIndex.clearIndex() self.theIndex.clearIndex()
self.clearGUI() self.clearGUI()
@@ -471,8 +478,8 @@ class GuiMain(QMainWindow):
self.theIndex.loadIndex() self.theIndex.loadIndex()
# Update GUI # Update GUI
self._setWindowTitle(self.theProject.projName) self._updateWindowTitle(self.theProject.projName)
self.rebuildTrees() self.rebuildTree()
self.docEditor.setDictionaries() self.docEditor.setDictionaries()
self.docEditor.setSpellCheck(self.theProject.spellCheck) self.docEditor.setSpellCheck(self.theProject.spellCheck)
self.mainMenu.setAutoOutline(self.theProject.autoOutline) self.mainMenu.setAutoOutline(self.theProject.autoOutline)
@@ -942,7 +949,7 @@ class GuiMain(QMainWindow):
if dlgProj.result() == QDialog.Accepted: if dlgProj.result() == QDialog.Accepted:
logger.debug("Applying new project settings") logger.debug("Applying new project settings")
self.docEditor.setDictionaries() self.docEditor.setDictionaries()
self._setWindowTitle(self.theProject.projName) self._updateWindowTitle(self.theProject.projName)
return return
@@ -1265,7 +1272,7 @@ class GuiMain(QMainWindow):
return True return True
def _setWindowTitle(self, projName=None): def _updateWindowTitle(self, projName=None):
"""Set the window title and add the project's working title. """Set the window title and add the project's working title.
""" """
winTitle = self.mainConf.appName winTitle = self.mainConf.appName
+44 -40
View File
@@ -8,6 +8,7 @@ import shutil
import os import os
from dummy import DummyMain from dummy import DummyMain
from tools import cleanProject
sys.path.insert(1, os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir))) sys.path.insert(1, os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir)))
@@ -129,21 +130,20 @@ def nwGUI(qtbot, fncDir):
def nwMinimal(tmpDir): def nwMinimal(tmpDir):
"""A minimal novelWriter example project. """A minimal novelWriter example project.
""" """
testDir = os.path.dirname(__file__) tstDir = os.path.dirname(__file__)
minimalStore = os.path.join(testDir, "minimal") srcDir = os.path.join(tstDir, "minimal")
minimalDir = os.path.join(tmpDir, "minimal") dstDir = os.path.join(tmpDir, "minimal")
if os.path.isdir(minimalDir): if os.path.isdir(dstDir):
shutil.rmtree(minimalDir) shutil.rmtree(dstDir)
shutil.copytree(minimalStore, minimalDir)
cacheDir = os.path.join(minimalDir, "cache") shutil.copytree(srcDir, dstDir)
if os.path.isdir(cacheDir): cleanProject(dstDir)
shutil.rmtree(cacheDir)
metaDir = os.path.join(minimalDir, "meta") yield dstDir
if os.path.isdir(metaDir):
shutil.rmtree(metaDir) if os.path.isdir(dstDir):
yield minimalDir shutil.rmtree(dstDir)
if os.path.isdir(minimalDir):
shutil.rmtree(minimalDir)
return return
@pytest.fixture(scope="function") @pytest.fixture(scope="function")
@@ -151,34 +151,38 @@ def nwLipsum(tmpDir):
"""A medium sized novelWriter example project with a lot of Lorem """A medium sized novelWriter example project with a lot of Lorem
Ipsum dummy text. Ipsum dummy text.
""" """
testDir = os.path.dirname(__file__) tstDir = os.path.dirname(__file__)
lipsumStore = os.path.join(testDir, "lipsum") srcDir = os.path.join(tstDir, "lipsum")
lipsumDir = os.path.join(tmpDir, "lipsum") dstDir = os.path.join(tmpDir, "lipsum")
if os.path.isdir(lipsumDir): if os.path.isdir(dstDir):
shutil.rmtree(lipsumDir) shutil.rmtree(dstDir)
shutil.copytree(lipsumStore, lipsumDir)
cacheDir = os.path.join(lipsumDir, "cache") shutil.copytree(srcDir, dstDir)
if os.path.isdir(cacheDir): cleanProject(dstDir)
shutil.rmtree(cacheDir)
metaDir = os.path.join(lipsumDir, "meta") yield dstDir
if os.path.isdir(metaDir):
shutil.rmtree(metaDir) if os.path.isdir(dstDir):
yield lipsumDir shutil.rmtree(dstDir)
if os.path.isdir(lipsumDir):
shutil.rmtree(lipsumDir)
return return
@pytest.fixture(scope="function") @pytest.fixture(scope="function")
def nwOldProj(tmpDir): def nwOldProj(tmpDir):
"""A minimal movelWriter project using the old folder structure. """A minimal movelWriter project using the old folder structure used
for storage versions < 1.2.
""" """
testDir = os.path.dirname(__file__) tstDir = os.path.dirname(__file__)
oldProjStore = os.path.join(testDir, "oldproj") srcDir = os.path.join(tstDir, "oldproj")
oldProjDir = os.path.join(tmpDir, "oldproj") dstDir = os.path.join(tmpDir, "oldproj")
if os.path.isdir(oldProjDir): if os.path.isdir(dstDir):
shutil.rmtree(oldProjDir) shutil.rmtree(dstDir)
shutil.copytree(oldProjStore, oldProjDir)
yield oldProjDir shutil.copytree(srcDir, dstDir)
if os.path.isdir(oldProjDir):
shutil.rmtree(oldProjDir) yield dstDir
if os.path.isdir(dstDir):
shutil.rmtree(dstDir)
return return
+19 -1
View File
@@ -1,5 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Common Functions Tester """
novelWriter Common Functions Tester
=====================================
This file is a part of novelWriter
Copyright 20182021, 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 time import time
+19 -1
View File
@@ -1,5 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Config Class Tester """
novelWriter Config Class Tester
=================================
This file is a part of novelWriter
Copyright 20182021, 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 pytest import pytest
+19 -1
View File
@@ -1,5 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Error Tester """
novelWriter Error Tester
==========================
This file is a part of novelWriter
Copyright 20182021, 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 nw import nw
+19 -1
View File
@@ -1,5 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Main Init Tester """
novelWriter Main Init Tester
==============================
This file is a part of novelWriter
Copyright 20182021, 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 nw import nw
+19 -1
View File
@@ -1,5 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter NWDoc Class Tester """
novelWriter NWDoc Class Tester
================================
This file is a part of novelWriter
Copyright 20182021, 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 os import os
+19 -1
View File
@@ -1,5 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Project Class Tester """
novelWriter Project Class Tester
==================================
This file is a part of novelWriter
Copyright 20182021, 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 pytest import pytest
+19 -1
View File
@@ -1,5 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter NWItem Class Tester """
novelWriter NWItem Class Tester
=================================
This file is a part of novelWriter
Copyright 20182021, 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 pytest import pytest
+19 -1
View File
@@ -1,5 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter OptionState Class Tester """
novelWriter OptionState Class Tester
======================================
This file is a part of novelWriter
Copyright 20182021, 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 os import os
+19 -1
View File
@@ -1,5 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Project Class Tester """
novelWriter Project Class Tester
==================================
This file is a part of novelWriter
Copyright 20182021, 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 pytest import pytest
+19 -1
View File
@@ -1,5 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Spell Check Class Tester """
novelWriter Spell Check Class Tester
======================================
This file is a part of novelWriter
Copyright 20182021, 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 os import os
+19 -1
View File
@@ -1,5 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Status Class Tester """
novelWriter Status Class Tester
=================================
This file is a part of novelWriter
Copyright 20182021, 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 pytest import pytest
+19 -1
View File
@@ -1,5 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter ToHtml Class Tester """
novelWriter ToHtml Class Tester
=================================
This file is a part of novelWriter
Copyright 20182021, 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 pytest import pytest
+19 -1
View File
@@ -1,5 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Tokenizer Class Tester """
novelWriter Tokenizer Class Tester
====================================
This file is a part of novelWriter
Copyright 20182021, 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 pytest import pytest
+19 -1
View File
@@ -1,5 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Tools Tester """
novelWriter Tools Tester
==========================
This file is a part of novelWriter
Copyright 20182021, 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 pytest import pytest
+19 -1
View File
@@ -1,5 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter NWTree Class Tester """
novelWriter NWTree Class Tester
=================================
This file is a part of novelWriter
Copyright 20182021, 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 os import os
+19 -1
View File
@@ -1,5 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter About Dialog Class Tester """
novelWriter About Dialog Class Tester
=======================================
This file is a part of novelWriter
Copyright 20182021, 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 pytest import pytest
+19 -1
View File
@@ -1,5 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Build Dialog Class Tester """
novelWriter Build Dialog Class Tester
=======================================
This file is a part of novelWriter
Copyright 20182021, 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 pytest import pytest
+19 -1
View File
@@ -1,5 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Dialog Class Tester """
novelWriter Dialog Class Tester
=================================
This file is a part of novelWriter
Copyright 20182021, 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 pytest import pytest
+19 -1
View File
@@ -1,5 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Main GUI Editor Class Tester """
novelWriter Main GUI Editor Class Tester
==========================================
This file is a part of novelWriter
Copyright 20182021, 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 pytest import pytest
+19 -1
View File
@@ -1,5 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Main GUI Viewer Class Tester """
novelWriter Main GUI Viewer Class Tester
==========================================
This file is a part of novelWriter
Copyright 20182021, 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 pytest import pytest
+19 -1
View File
@@ -1,5 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Item Editor Dialog Class Tester """
novelWriter Item Editor Dialog Class Tester
=============================================
This file is a part of novelWriter
Copyright 20182021, 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 pytest import pytest
+19 -1
View File
@@ -1,5 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Main GUI Main Menu Class Tester """
novelWriter Main GUI Main Menu Class Tester
=============================================
This file is a part of novelWriter
Copyright 20182021, 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 pytest import pytest
+19 -1
View File
@@ -1,5 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Merge and Split Dialog Classes Tester """
novelWriter Merge and Split Dialog Classes Tester
===================================================
This file is a part of novelWriter
Copyright 20182021, 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 pytest import pytest
+19 -1
View File
@@ -1,5 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Main GUI Outline Class Tester """
novelWriter Main GUI Outline Class Tester
===========================================
This file is a part of novelWriter
Copyright 20182021, 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 pytest import pytest
+19 -1
View File
@@ -1,5 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Dialog Class Tester """
novelWriter Dialog Class Tester
=================================
This file is a part of novelWriter
Copyright 20182021, 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 nw import nw
+19 -1
View File
@@ -1,5 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Dialog Class Tester """
novelWriter Dialog Class Tester
=================================
This file is a part of novelWriter
Copyright 20182021, 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 pytest import pytest
+19 -1
View File
@@ -1,5 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Project Settings Dialog Class Tester """
novelWriter Project Settings Dialog Class Tester
==================================================
This file is a part of novelWriter
Copyright 20182021, 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 pytest import pytest
+19 -1
View File
@@ -1,5 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Main GUI Project Tree Class Tester """
novelWriter Main GUI Project Tree Class Tester
================================================
This file is a part of novelWriter
Copyright 20182021, 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 pytest import pytest
+19 -1
View File
@@ -1,5 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Project Wizard Class Tester """
novelWriter Project Wizard Class Tester
=========================================
This file is a part of novelWriter
Copyright 20182021, 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 pytest import pytest
+19 -2
View File
@@ -1,5 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Main GUI Class Tester """
novelWriter Main GUI Class Tester
===================================
This file is a part of novelWriter
Copyright 20182021, 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 nw import nw
@@ -73,7 +91,6 @@ def testGuiTheme_Main(qtbot, monkeypatch, nwMinimal, tmpDir):
assert thePalette.link().color() == QColor(44, 152, 247) assert thePalette.link().color() == QColor(44, 152, 247)
assert thePalette.linkVisited().color() == QColor(44, 152, 247) assert thePalette.linkVisited().color() == QColor(44, 152, 247)
assert nwGUI.theTheme.treeWCount == [197, 200, 198]
assert nwGUI.theTheme.statNone == [150, 152, 150] assert nwGUI.theTheme.statNone == [150, 152, 150]
assert nwGUI.theTheme.statSaved == [39, 135, 78] assert nwGUI.theTheme.statSaved == [39, 135, 78]
assert nwGUI.theTheme.statUnsaved == [138, 32, 32] assert nwGUI.theTheme.statUnsaved == [138, 32, 32]
+19 -1
View File
@@ -1,5 +1,23 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
"""novelWriter Writing Stats Dialog Class Tester """
novelWriter Writing Stats Dialog Class Tester
===============================================
This file is a part of novelWriter
Copyright 20182021, 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 pytest import pytest
+24
View File
@@ -2,6 +2,9 @@
"""novelWriter Test Tools """novelWriter Test Tools
""" """
import os
import shutil
from itertools import chain from itertools import chain
from PyQt5.QtWidgets import qApp from PyQt5.QtWidgets import qApp
@@ -82,3 +85,24 @@ def writeFile(fileName, fileData):
""" """
with open(fileName, mode="w", encoding="utf8") as outFile: with open(fileName, mode="w", encoding="utf8") as outFile:
outFile.write(fileData) outFile.write(fileData)
def cleanProject(projPath):
"""Delete all generated files in a project.
"""
cacheDir = os.path.join(projPath, "cache")
if os.path.isdir(cacheDir):
shutil.rmtree(cacheDir)
metaDir = os.path.join(projPath, "meta")
if os.path.isdir(metaDir):
shutil.rmtree(metaDir)
bakFile = os.path.join(projPath, "nwProject.bak")
if os.path.isfile(bakFile):
os.unlink(bakFile)
tocFile = os.path.join(projPath, "ToC.txt")
if os.path.isfile(tocFile):
os.unlink(tocFile)
return