diff --git a/i18n/snowflaQe.pro b/i18n/snowflaQe.pro
index 2fa9ef8..90f18bf 100644
--- a/i18n/snowflaQe.pro
+++ b/i18n/snowflaQe.pro
@@ -13,6 +13,10 @@ SOURCES += ../src/ui/editors/customTextEdit.py
SOURCES += ../src/ui/editors/editorWidget.py
SOURCES += ../src/ui/views/corkDelegate.py
SOURCES += ../src/ui/views/outlineBasics.py
+SOURCES += ../src/ui/views/cmbOutlineLabelChoser.py
+SOURCES += ../src/ui/views/cmbOutlinePersoChoser.py
+SOURCES += ../src/ui/views/cmbOutlineStatusChoser.py
+SOURCES += ../src/ui/views/lineEditView.py
SOURCES += ../src/settingsWindow.py
diff --git a/i18n/snowflaQe_fr.qm b/i18n/snowflaQe_fr.qm
index 8f480a2..fa4f20b 100644
Binary files a/i18n/snowflaQe_fr.qm and b/i18n/snowflaQe_fr.qm differ
diff --git a/i18n/snowflaQe_fr.ts b/i18n/snowflaQe_fr.ts
index 58ea2b9..f378224 100644
--- a/i18n/snowflaQe_fr.ts
+++ b/i18n/snowflaQe_fr.ts
@@ -129,7 +129,7 @@
Noms
-
+
Filtre
@@ -149,7 +149,7 @@
Motivation
-
+
Goal
@@ -174,7 +174,7 @@
<html><head/><body><p align="right">Résumé<br/>en un paragraphe</p></body></html>
-
+
Notes
@@ -244,7 +244,7 @@
Contexte
-
+
Plan
@@ -269,7 +269,7 @@
Goal:
-
+
Résumé en une ligne
@@ -284,7 +284,7 @@
Rédaction
-
+
@@ -294,310 +294,260 @@
Scène
-
+
Propriétés
-
-
- POV
-
-
-
-
-
-
-
-
-
- Compile
-
-
-
+
Résumé de la scène
-
+
Outils
-
+
Aide-mémoire
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
Fichier
-
+
Aide
-
+
Ouvrir
-
+
-
+
Récents
-
+
-
+
Enregistrer
-
+
Ctrl+S
-
+
Enregistrer sous...
-
+
-
+
Quitter
-
+
-
+
-
+
Nouveau
-
+
-
+
Montrer les bulles d'aides
-
+
-
+
Correcteur orthographique
-
+
-
+
Nombre de mots
-
+
Mode
-
+
Nouveau perso
-
+
(~{} pages)
-
+
Entrez toutes les informations relatives au livre, ainsi qu'à vous.
-
+
Prenez le temps de réfléchir à un résumé de votre livre, en une phrase (~50 mots). Puis augmentez cette phrase en un paragraphe, puis en une page, puis en un résumé complet.
-
+
Créez ici vos personnage.
-
+
Développez vos intrigues.
-
+
Créez le plan de votre chef-d'œuvre.
-
+
Écrivez.
-
+
Des infos pour débugger des fois pendant qu'on code c'est utile.
-
+
Dictionnaire
-
+
Installez PyEnchant pour profiter du correcteur orthographique
-
+
Mots: {}{}
-
+
Texte
-
+
Cork
-
-
- Label
-
-
-
+
Labels
-
+
Édition
-
+
Labels...
-
+
Status...
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -633,6 +583,36 @@
Final
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
SpellAction
@@ -655,6 +635,30 @@
La traduction pour {} n'a pas pu être chargée...
+
+ cmbOutlineLabelChoser
+
+
+
+ Différentes valeurs
+
+
+
+ cmbOutlinePersoChoser
+
+
+
+ Différentes valeurs
+
+
+
+ cmbOutlineStatusChoser
+
+
+
+ Différentes valeurs
+
+
corkDelegate
@@ -671,12 +675,12 @@
editorWidget
-
+
{} mots / {}
-
+
{} mots
@@ -697,6 +701,14 @@
Infobulle: Si tu me trouve dérengant, tu peux me cacher via le menu Aide.
+
+ lineEditView
+
+
+
+ Différentes valeurs
+
+
outlineBasics
@@ -755,6 +767,44 @@
Nouveau
+
+ propertiesView
+
+
+
+ Form
+
+
+
+
+ POV
+
+
+
+
+ Status
+
+
+
+
+ Label
+
+
+
+
+ Compile
+
+
+
+
+ Goal
+
+
+
+
+ Nombre de mots
+
+
qApp
diff --git a/src/ui/mainWindow.py b/src/ui/mainWindow.py
index 92e7d6d..9e23229 100644
--- a/src/ui/mainWindow.py
+++ b/src/ui/mainWindow.py
@@ -1299,10 +1299,10 @@ class Ui_MainWindow(object):
self.actLabels.setText(_translate("MainWindow", "Labels..."))
self.actStatus.setText(_translate("MainWindow", "Status..."))
-from ui.views.treeView import treeView
-from ui.cmbOutlinePersoChoser import cmbOutlinePersoChoser
from ui.views.outlineView import outlineView
-from ui.sldImportance import sldImportance
-from ui.collapsibleGroupBox2 import collapsibleGroupBox2
from ui.editors.editorWidget import editorWidget
from ui.views.propertiesView import propertiesView
+from ui.collapsibleGroupBox2 import collapsibleGroupBox2
+from ui.sldImportance import sldImportance
+from ui.views.cmbOutlinePersoChoser import cmbOutlinePersoChoser
+from ui.views.treeView import treeView
diff --git a/src/ui/mainWindow.ui b/src/ui/mainWindow.ui
index 5677e7d..0ec7879 100644
--- a/src/ui/mainWindow.ui
+++ b/src/ui/mainWindow.ui
@@ -2239,7 +2239,7 @@
cmbOutlinePersoChoser
QComboBox
- ui.cmbOutlinePersoChoser.h
+ ui.views.cmbOutlinePersoChoser.h
editorWidget
diff --git a/src/ui/chkOutlineCompile.py b/src/ui/views/chkOutlineCompile.py
similarity index 100%
rename from src/ui/chkOutlineCompile.py
rename to src/ui/views/chkOutlineCompile.py
diff --git a/src/ui/cmbOutlineLabelChoser.py b/src/ui/views/cmbOutlineLabelChoser.py
similarity index 81%
rename from src/ui/cmbOutlineLabelChoser.py
rename to src/ui/views/cmbOutlineLabelChoser.py
index 1eeb48e..68d1f54 100644
--- a/src/ui/cmbOutlineLabelChoser.py
+++ b/src/ui/views/cmbOutlineLabelChoser.py
@@ -13,6 +13,7 @@ class cmbOutlineLabelChoser(QComboBox):
self._index = None
self._indexes = None
self._updating = False
+ self._various = False
def setModels(self, mdlLabels, mdlOutline):
self.mdlLabels = mdlLabels
@@ -28,6 +29,8 @@ class cmbOutlineLabelChoser(QComboBox):
if item:
self.addItem(item.icon(),
item.text())
+
+ self._various = False
if self._index or self._indexes:
self.updateSelectedItem()
@@ -37,6 +40,7 @@ class cmbOutlineLabelChoser(QComboBox):
if index.column() != self._column:
index = index.sibling(index.row(), self._column)
self._index = index
+ self.updateItems()
self.updateSelectedItem()
def setCurrentModelIndexes(self, indexes):
@@ -49,6 +53,7 @@ class cmbOutlineLabelChoser(QComboBox):
i = i.sibling(i.row(), self._column)
self._indexes.append(i)
+ self.updateItems()
self.updateSelectedItem()
def update(self, topLeft, bottomRight):
@@ -98,9 +103,17 @@ class cmbOutlineLabelChoser(QComboBox):
break
if same:
+ self._various = False
self.setCurrentIndex(labels[0])
else:
+ if not self._various:
+ self.insertItem(0, self.tr("Various"))
+ f = self.font()
+ f.setItalic(True)
+ self.setItemData(0, f, Qt.FontRole)
+ self.setItemData(0, QBrush(Qt.darkGray), Qt.ForegroundRole)
+ self._various = True
self.setCurrentIndex(0)
else:
@@ -111,8 +124,16 @@ class cmbOutlineLabelChoser(QComboBox):
self.mdlOutline.setData(self._index, self.currentIndex())
elif self._indexes:
+ value = self.currentIndex()
+
+ if self._various:
+ if value == 0:
+ return
+
+ value -= 1
+
self._updating = True
for i in self._indexes:
- self.mdlOutline.setData(i, self.currentIndex())
+ self.mdlOutline.setData(i, value)
self._updating = False
\ No newline at end of file
diff --git a/src/ui/cmbOutlinePersoChoser.py b/src/ui/views/cmbOutlinePersoChoser.py
similarity index 82%
rename from src/ui/cmbOutlinePersoChoser.py
rename to src/ui/views/cmbOutlinePersoChoser.py
index f188622..000c1cd 100644
--- a/src/ui/cmbOutlinePersoChoser.py
+++ b/src/ui/views/cmbOutlinePersoChoser.py
@@ -16,6 +16,7 @@ class cmbOutlinePersoChoser(QComboBox):
self._index = None
self._indexes = None
self._updating = False
+ self._various = False
def setModels(self, mdlPersos, mdlOutline):
self.mdlPersos = mdlPersos
@@ -33,7 +34,9 @@ class cmbOutlinePersoChoser(QComboBox):
self.setItemData(i+1, self.mdlPersos.item(i, Perso.name.value).text(), Qt.ToolTipRole)
except:
pass
-
+
+ self._various = False
+
if self._index or self._indexes:
self.updateSelectedItem()
@@ -42,19 +45,21 @@ class cmbOutlinePersoChoser(QComboBox):
if index.column() != self._column:
index = index.sibling(index.row(), self._column)
self._index = index
- self.updateSelectedItem()
+ self.updateItems()
def setCurrentModelIndexes(self, indexes):
- self._indexes = []
self._index = None
+ idxes = []
for i in indexes:
if i.isValid():
if i.column() != self._column:
i = i.sibling(i.row(), self._column)
- self._indexes.append(i)
+ idxes.append(i)
- self.updateSelectedItem()
+ if idxes != self._indexes:
+ self._indexes = idxes
+ self.updateItems()
def update(self, topLeft, bottomRight):
@@ -108,9 +113,17 @@ class cmbOutlinePersoChoser(QComboBox):
break
if same:
+ self._various = False
self.selectPOV(POVs[0])
else:
+ if not self._various:
+ self.insertItem(0, self.tr("Various"))
+ f = self.font()
+ f.setItalic(True)
+ self.setItemData(0, f, Qt.FontRole)
+ self.setItemData(0, QBrush(Qt.darkGray), Qt.ForegroundRole)
+ self._various = True
self.setCurrentIndex(0)
else:
@@ -121,6 +134,9 @@ class cmbOutlinePersoChoser(QComboBox):
self.mdlOutline.setData(self._index, self.currentData())
elif self._indexes:
+ if self._various and self.currentIndex() == 0:
+ return
+
self._updating = True
for i in self._indexes:
self.mdlOutline.setData(i, self.currentData())
diff --git a/src/ui/cmbOutlineStatusChoser.py b/src/ui/views/cmbOutlineStatusChoser.py
similarity index 81%
rename from src/ui/cmbOutlineStatusChoser.py
rename to src/ui/views/cmbOutlineStatusChoser.py
index aec34f3..89d442d 100644
--- a/src/ui/cmbOutlineStatusChoser.py
+++ b/src/ui/views/cmbOutlineStatusChoser.py
@@ -14,6 +14,7 @@ class cmbOutlineStatusChoser(QComboBox):
self._index = None
self._indexes = None
self._updating = False
+ self._various = False
def setModels(self, mdlStatus, mdlOutline):
self.mdlStatus = mdlStatus
@@ -29,6 +30,8 @@ class cmbOutlineStatusChoser(QComboBox):
if item:
self.addItem(item.text())
+ self._various = False
+
if self._index or self._indexes:
self.updateSelectedItem()
@@ -37,6 +40,7 @@ class cmbOutlineStatusChoser(QComboBox):
if index.column() != self._column:
index = index.sibling(index.row(), self._column)
self._index = index
+ self.updateItems()
self.updateSelectedItem()
def setCurrentModelIndexes(self, indexes):
@@ -49,6 +53,7 @@ class cmbOutlineStatusChoser(QComboBox):
i = i.sibling(i.row(), self._column)
self._indexes.append(i)
+ self.updateItems()
self.updateSelectedItem()
def update(self, topLeft, bottomRight):
@@ -98,9 +103,17 @@ class cmbOutlineStatusChoser(QComboBox):
break
if same:
+ self._various = False
self.setCurrentIndex(statuses[0])
else:
+ if not self._various:
+ self.insertItem(0, self.tr("Various"))
+ f = self.font()
+ f.setItalic(True)
+ self.setItemData(0, f, Qt.FontRole)
+ self.setItemData(0, QBrush(Qt.darkGray), Qt.ForegroundRole)
+ self._various = True
self.setCurrentIndex(0)
else:
@@ -111,7 +124,15 @@ class cmbOutlineStatusChoser(QComboBox):
self.mdlOutline.setData(self._index, self.currentIndex())
elif self._indexes:
+ value = self.currentIndex()
+
+ if self._various:
+ if value == 0:
+ return
+
+ value -= 1
+
self._updating = True
for i in self._indexes:
- self.mdlOutline.setData(i, self.currentIndex())
+ self.mdlOutline.setData(i, value)
self._updating = False
\ No newline at end of file
diff --git a/src/ui/views/lineEditView.py b/src/ui/views/lineEditView.py
index b6a395d..ce4e7b5 100644
--- a/src/ui/views/lineEditView.py
+++ b/src/ui/views/lineEditView.py
@@ -107,5 +107,5 @@ class lineEditView(QLineEdit):
if not self._placeholderText:
self._placeholderText = self.placeholderText()
- self.setPlaceholderText("Various")
+ self.setPlaceholderText(self.tr("Various"))
\ No newline at end of file
diff --git a/src/ui/views/propertiesView_ui.py b/src/ui/views/propertiesView_ui.py
index 120f0ae..9b75a93 100644
--- a/src/ui/views/propertiesView_ui.py
+++ b/src/ui/views/propertiesView_ui.py
@@ -11,7 +11,7 @@ from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_propertiesView(object):
def setupUi(self, propertiesView):
propertiesView.setObjectName("propertiesView")
- propertiesView.resize(192, 153)
+ propertiesView.resize(192, 159)
self.verticalLayout = QtWidgets.QVBoxLayout(propertiesView)
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
self.verticalLayout.setObjectName("verticalLayout")
@@ -181,8 +181,8 @@ class Ui_propertiesView(object):
self.label_36.setText(_translate("propertiesView", "Goal"))
self.txtGoalMulti.setPlaceholderText(_translate("propertiesView", "Word count"))
+from ui.views.cmbOutlineLabelChoser import cmbOutlineLabelChoser
+from ui.views.cmbOutlinePersoChoser import cmbOutlinePersoChoser
from ui.views.lineEditView import lineEditView
-from ui.chkOutlineCompile import chkOutlineCompile
-from ui.cmbOutlineLabelChoser import cmbOutlineLabelChoser
-from ui.cmbOutlineStatusChoser import cmbOutlineStatusChoser
-from ui.cmbOutlinePersoChoser import cmbOutlinePersoChoser
+from ui.views.cmbOutlineStatusChoser import cmbOutlineStatusChoser
+from ui.views.chkOutlineCompile import chkOutlineCompile
diff --git a/src/ui/views/propertiesView_ui.ui b/src/ui/views/propertiesView_ui.ui
index a17f821..8c638a5 100644
--- a/src/ui/views/propertiesView_ui.ui
+++ b/src/ui/views/propertiesView_ui.ui
@@ -7,7 +7,7 @@
0
0
192
- 153
+ 159
@@ -277,22 +277,22 @@
cmbOutlinePersoChoser
QComboBox
- ui.cmbOutlinePersoChoser.h
+ ui.views.cmbOutlinePersoChoser.h
cmbOutlineStatusChoser
QComboBox
- ui.cmbOutlineStatusChoser.h
+ ui.views.cmbOutlineStatusChoser.h
chkOutlineCompile
QCheckBox
-
+ ui.views.chkOutlineCompile.h
cmbOutlineLabelChoser
QComboBox
- ui.cmbOutlineLabelChoser.h
+ ui.views.cmbOutlineLabelChoser.h
lineEditView
diff --git a/test_project/outline.xml b/test_project/outline.xml
index 8590255..2172658 100644
--- a/test_project/outline.xml
+++ b/test_project/outline.xml
@@ -3,7 +3,7 @@
-
+
@@ -51,13 +51,13 @@
-
-
+
+
-
+