mirror of
https://github.com/olivierkes/manuskript.git
synced 2024-05-14 01:42:28 +12:00
Fullscreen editor locker, for distracted writers
This commit is contained in:
parent
e9b4f9435e
commit
d1c4633cee
|
@ -7,6 +7,7 @@ FORMS += ../src/ui/compileDialog_ui.ui
|
|||
FORMS += ../src/ui/revisions_ui.ui
|
||||
|
||||
FORMS += ../src/ui/editors/editorWidget_ui.ui
|
||||
FORMS += ../src/ui/editors/locker_ui.ui
|
||||
|
||||
FORMS += ../src/ui/views/propertiesView_ui.ui
|
||||
FORMS += ../src/ui/views/basicItemView_ui.ui
|
||||
|
@ -34,6 +35,7 @@ SOURCES += ../src/ui/revisions.py
|
|||
|
||||
SOURCES += ../src/ui/editors/editorWidget.py
|
||||
SOURCES += ../src/ui/editors/fullScreenEditor.py
|
||||
SOURCES += ../src/ui/editors/locker.py
|
||||
SOURCES += ../src/ui/editors/textFormat.py
|
||||
SOURCES += ../src/ui/editors/completer.py
|
||||
SOURCES += ../src/ui/editors/mainEditor.py
|
||||
|
|
Binary file not shown.
|
@ -59,7 +59,7 @@
|
|||
<translation>Email</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1302"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1308"/>
|
||||
<source>Summary</source>
|
||||
<translation>Résumé</translation>
|
||||
</message>
|
||||
|
@ -79,7 +79,7 @@
|
|||
<translation>Suivant</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1315"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1321"/>
|
||||
<source>One paragraph</source>
|
||||
<translation>Un paragraphe</translation>
|
||||
</message>
|
||||
|
@ -89,7 +89,7 @@
|
|||
<translation>Résumé en un paragraphe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1320"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1326"/>
|
||||
<source>One page</source>
|
||||
<translation>Une page</translation>
|
||||
</message>
|
||||
|
@ -99,7 +99,7 @@
|
|||
<translation>Développez chaque phrase du paragraphe précédent en un paragraphe complet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1325"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1331"/>
|
||||
<source>Full</source>
|
||||
<translation>Complet</translation>
|
||||
</message>
|
||||
|
@ -179,7 +179,7 @@
|
|||
<translation>Informations détaillées</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1717"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1723"/>
|
||||
<source>Plots</source>
|
||||
<translation>Intrigues</translation>
|
||||
</message>
|
||||
|
@ -204,207 +204,207 @@
|
|||
<translation>Résultat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1216"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1219"/>
|
||||
<source>Resolution steps</source>
|
||||
<translation>Étapes de résolution</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1366"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1372"/>
|
||||
<source>Context</source>
|
||||
<translation>Contexte</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="1042"/>
|
||||
<location filename="../src/mainWindow.py" line="1071"/>
|
||||
<source>Outline</source>
|
||||
<translation>Plan</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1509"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1515"/>
|
||||
<source>Redaction</source>
|
||||
<translation>Rédaction</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1818"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1824"/>
|
||||
<source>Tools</source>
|
||||
<translation>Outils</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1625"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1631"/>
|
||||
<source>Cheat sheet</source>
|
||||
<translation>Aide-mémoire</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1681"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1687"/>
|
||||
<source>Debug</source>
|
||||
<translation>Debug</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1694"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1700"/>
|
||||
<source>FlatData</source>
|
||||
<translation>FlatData</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1704"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1710"/>
|
||||
<source>Persos</source>
|
||||
<translation>Persos</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1785"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1791"/>
|
||||
<source>File</source>
|
||||
<translation>Fichier</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1812"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1818"/>
|
||||
<source>Help</source>
|
||||
<translation>Aide</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1849"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1855"/>
|
||||
<source>Open</source>
|
||||
<translation>Ouvrir</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1852"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1858"/>
|
||||
<source>Ctrl+O</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1789"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1795"/>
|
||||
<source>Recents</source>
|
||||
<translation>Récents</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1861"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1867"/>
|
||||
<source>Save</source>
|
||||
<translation>Enregistrer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1864"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1870"/>
|
||||
<source>Ctrl+S</source>
|
||||
<translation>Ctrl+S</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1873"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1879"/>
|
||||
<source>Save as...</source>
|
||||
<translation>Enregistrer sous...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1876"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1882"/>
|
||||
<source>Ctrl+Shift+S</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1885"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1891"/>
|
||||
<source>Quit</source>
|
||||
<translation>Quitter</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1888"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1894"/>
|
||||
<source>Ctrl+Q</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1903"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1909"/>
|
||||
<source>Show help texts</source>
|
||||
<translation>Montrer les bulles d'aides</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1906"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1912"/>
|
||||
<source>Ctrl+Shift+B</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1921"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1927"/>
|
||||
<source>Spellcheck</source>
|
||||
<translation>Correcteur orthographique</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1988"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1994"/>
|
||||
<source>F8</source>
|
||||
<translation></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1804"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1810"/>
|
||||
<source>Mode</source>
|
||||
<translation>Mode</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="875"/>
|
||||
<location filename="../src/mainWindow.py" line="904"/>
|
||||
<source> (~{} pages)</source>
|
||||
<translation> (~{} pages)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="901"/>
|
||||
<location filename="../src/mainWindow.py" line="930"/>
|
||||
<source>Enter infos about your book, and yourself.</source>
|
||||
<translation>Entrez toutes les informations relatives au livre, ainsi qu'à vous.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="907"/>
|
||||
<location filename="../src/mainWindow.py" line="936"/>
|
||||
<source>Take time to think about a one sentance (~50 words) summary of your book. Then expand it to a paragraph, then to a page, then to a full summary.</source>
|
||||
<translation>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.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="910"/>
|
||||
<location filename="../src/mainWindow.py" line="939"/>
|
||||
<source>Create your characters.</source>
|
||||
<translation>Créez ici vos personnage.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="913"/>
|
||||
<location filename="../src/mainWindow.py" line="942"/>
|
||||
<source>Develop plots.</source>
|
||||
<translation>Développez vos intrigues.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="916"/>
|
||||
<location filename="../src/mainWindow.py" line="945"/>
|
||||
<source>Create the outline of your masterpiece.</source>
|
||||
<translation>Créez le plan de votre chef-d'œuvre.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="919"/>
|
||||
<location filename="../src/mainWindow.py" line="948"/>
|
||||
<source>Write.</source>
|
||||
<translation>Écrivez.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="922"/>
|
||||
<location filename="../src/mainWindow.py" line="951"/>
|
||||
<source>Debug infos. Sometimes useful.</source>
|
||||
<translation>Des infos pour débugger des fois pendant qu'on code c'est utile.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="936"/>
|
||||
<location filename="../src/mainWindow.py" line="965"/>
|
||||
<source>Dictionary</source>
|
||||
<translation>Dictionnaire</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="949"/>
|
||||
<location filename="../src/mainWindow.py" line="978"/>
|
||||
<source>Install PyEnchant to use spellcheck</source>
|
||||
<translation>Installez PyEnchant pour profiter du correcteur orthographique</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="879"/>
|
||||
<location filename="../src/mainWindow.py" line="908"/>
|
||||
<source>Words: {}{}</source>
|
||||
<translation>Mots: {}{}</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="1053"/>
|
||||
<location filename="../src/mainWindow.py" line="1082"/>
|
||||
<source>Text</source>
|
||||
<translation>Texte</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1751"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1757"/>
|
||||
<source>Labels</source>
|
||||
<translation>Labels</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1824"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1830"/>
|
||||
<source>Edit</source>
|
||||
<translation>Édition</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1929"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1935"/>
|
||||
<source>Labels...</source>
|
||||
<translation>Labels...</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1934"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1940"/>
|
||||
<source>Status...</source>
|
||||
<translation>Status...</translation>
|
||||
</message>
|
||||
|
@ -414,7 +414,7 @@
|
|||
<translation>Situation:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1232"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1238"/>
|
||||
<source>Summary:</source>
|
||||
<translation>Résumé:</translation>
|
||||
</message>
|
||||
|
@ -424,159 +424,159 @@
|
|||
<translation>Et si...?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="1041"/>
|
||||
<location filename="../src/mainWindow.py" line="1070"/>
|
||||
<source>Index cards</source>
|
||||
<translation>Cartes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1594"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1600"/>
|
||||
<source>Metadata</source>
|
||||
<translation>Métadonnées</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1832"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1838"/>
|
||||
<source>View</source>
|
||||
<translation>Vue</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1924"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1930"/>
|
||||
<source>F9</source>
|
||||
<translation>F9</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="1040"/>
|
||||
<location filename="../src/mainWindow.py" line="1069"/>
|
||||
<source>Tree</source>
|
||||
<translation>Arbre</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1950"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1956"/>
|
||||
<source>Normal</source>
|
||||
<translation>Normal</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1958"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1964"/>
|
||||
<source>Simple</source>
|
||||
<translation>Simple</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1966"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1972"/>
|
||||
<source>Fractal</source>
|
||||
<translation>Fractal</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1985"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1991"/>
|
||||
<source>Settings</source>
|
||||
<translation>Réglages</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="533"/>
|
||||
<location filename="../src/mainWindow.py" line="557"/>
|
||||
<source>Project {} saved.</source>
|
||||
<translation>Le projet {} a été enregistré.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="604"/>
|
||||
<location filename="../src/mainWindow.py" line="628"/>
|
||||
<source>Project {} loaded.</source>
|
||||
<translation>Le projet {} a été chargé.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="904"/>
|
||||
<location filename="../src/mainWindow.py" line="933"/>
|
||||
<source>The basic situation, in the form of a 'What if...?' question. Ex: 'What if the most dangerous evil wizard could wasn't abled to kill a baby?' (Harry Potter)</source>
|
||||
<translation>La situation de base, sous la forme d'une question: "Et si...?" Par exemple: "Et si le plus dangereux magiciens mauvais n'était pas capable de tuer un bébé?" (Harry Potter)</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="1032"/>
|
||||
<location filename="../src/mainWindow.py" line="1061"/>
|
||||
<source>Nothing</source>
|
||||
<translation>Rien</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="1033"/>
|
||||
<location filename="../src/mainWindow.py" line="1062"/>
|
||||
<source>POV</source>
|
||||
<translation>POV</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="1034"/>
|
||||
<location filename="../src/mainWindow.py" line="1063"/>
|
||||
<source>Label</source>
|
||||
<translation>Label</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="1035"/>
|
||||
<location filename="../src/mainWindow.py" line="1064"/>
|
||||
<source>Progress</source>
|
||||
<translation>Progrès</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="1036"/>
|
||||
<location filename="../src/mainWindow.py" line="1065"/>
|
||||
<source>Compile</source>
|
||||
<translation>Compilation</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="1059"/>
|
||||
<location filename="../src/mainWindow.py" line="1088"/>
|
||||
<source>Icon color</source>
|
||||
<translation>Couleur de l'icone</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="1060"/>
|
||||
<location filename="../src/mainWindow.py" line="1089"/>
|
||||
<source>Text color</source>
|
||||
<translation>Couleur du texte</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="1061"/>
|
||||
<location filename="../src/mainWindow.py" line="1090"/>
|
||||
<source>Background color</source>
|
||||
<translation>Couleur de l'arrière-plan</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="1052"/>
|
||||
<location filename="../src/mainWindow.py" line="1081"/>
|
||||
<source>Icon</source>
|
||||
<translation>Icone</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="1054"/>
|
||||
<location filename="../src/mainWindow.py" line="1083"/>
|
||||
<source>Background</source>
|
||||
<translation>Arrière-plan</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="1055"/>
|
||||
<location filename="../src/mainWindow.py" line="1084"/>
|
||||
<source>Border</source>
|
||||
<translation>Bordure</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="1056"/>
|
||||
<location filename="../src/mainWindow.py" line="1085"/>
|
||||
<source>Corner</source>
|
||||
<translation>Coin</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1998"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="2004"/>
|
||||
<source>Close project</source>
|
||||
<translation>Fermer le projet</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="347"/>
|
||||
<location filename="../src/mainWindow.py" line="370"/>
|
||||
<source>The file {} does not exist. Try again.</source>
|
||||
<translation>Le fichier {} n'existe pas. Essayez encore.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="607"/>
|
||||
<location filename="../src/mainWindow.py" line="631"/>
|
||||
<source>Project {} loaded with some errors:</source>
|
||||
<translation>Le projet {} a été chargé, avec des erreurs:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="609"/>
|
||||
<location filename="../src/mainWindow.py" line="633"/>
|
||||
<source> * {} wasn't found in project file.</source>
|
||||
<translation>* {} n'a pas été trouvé dans le fichier du projet.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/mainWindow.py" line="610"/>
|
||||
<location filename="../src/mainWindow.py" line="634"/>
|
||||
<source>Project {} loaded with some errors.</source>
|
||||
<translation>Le projet {} a été chargé avec des erreurs.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1653"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="1659"/>
|
||||
<source>Search</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Recherche</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/mainWindow.ui" line="2006"/>
|
||||
<location filename="../src/ui/mainWindow.ui" line="2012"/>
|
||||
<source>F6</source>
|
||||
<translation type="unfinished">F6</translation>
|
||||
<translation>F6</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
@ -1055,7 +1055,7 @@ des lignes:</translation>
|
|||
<message>
|
||||
<location filename="../src/ui/settings.ui" line="444"/>
|
||||
<source>Revisions are a way to keep track of modifications. For each text item, it stores any changes you make to the main text, allowing you to see and restoring previous versions.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>Les révisions sont un moyen de garder une trace des modifications apportées à un texte. Pour chaque texte, chaque changement que vous apportez est enregistré, vous permettant de comparer la version actuelle avec des versions antérieures, et de les restaurer.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/settings.ui" line="454"/>
|
||||
|
@ -1075,32 +1075,32 @@ des lignes:</translation>
|
|||
<message>
|
||||
<location filename="../src/ui/settings.ui" line="498"/>
|
||||
<source>Smart remove allows you to keep only a certain number of revisions. It is strongly recommended to use it, lest you file will becomes full of thousands of insignificant changes.</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>La suppression intelligente vous permet de ne garder qu'un certain nombre de révisions. Il est fortement recommander de l'utiliser, sous peine de voir ses documents envahis de millieurs de modifications insignifiantes.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/settings.ui" line="514"/>
|
||||
<source>revisions per day for the last month</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>révision(s) par jour pour le dernier mois</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/settings.ui" line="552"/>
|
||||
<source>revisions per minute for the last 10 minutes</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>révision(s) par minute pour les dernières 10 minutes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/settings.ui" line="565"/>
|
||||
<source>revisions per hour for the last day</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>révision(s) par heure pour le dernier jour</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/settings.ui" line="578"/>
|
||||
<source>revisions per 10 minutes for the last hour</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>révision(s) par tranche de 10 minutes pour la dernière heure</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/settings.ui" line="691"/>
|
||||
<source>revisions per week till the end of time</source>
|
||||
<translation type="unfinished"></translation>
|
||||
<translation>révision(s) par semaine jusqu'à la fin des temps</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
|
@ -1170,30 +1170,35 @@ des lignes:</translation>
|
|||
<translation>Filtre</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/cheatSheet.py" line="58"/>
|
||||
<location filename="../src/ui/cheatSheet.py" line="87"/>
|
||||
<source>Minor</source>
|
||||
<translation>Mineur</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/cheatSheet.py" line="58"/>
|
||||
<location filename="../src/ui/cheatSheet.py" line="87"/>
|
||||
<source>Secondary</source>
|
||||
<translation>Secondaire</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/cheatSheet.py" line="58"/>
|
||||
<location filename="../src/ui/cheatSheet.py" line="87"/>
|
||||
<source>Main</source>
|
||||
<translation>Principal</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/cheatSheet.py" line="61"/>
|
||||
<location filename="../src/ui/cheatSheet.py" line="65"/>
|
||||
<source>Characters</source>
|
||||
<translation>Personnages</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/cheatSheet.py" line="73"/>
|
||||
<location filename="../src/ui/cheatSheet.py" line="78"/>
|
||||
<source>Texts</source>
|
||||
<translation>Textes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/cheatSheet.py" line="90"/>
|
||||
<source>Plots</source>
|
||||
<translation>Intrigues</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>cmbOutlineLabelChoser</name>
|
||||
|
@ -1344,17 +1349,17 @@ des lignes:</translation>
|
|||
<context>
|
||||
<name>fullScreenEditor</name>
|
||||
<message>
|
||||
<location filename="../src/ui/editors/fullScreenEditor.py" line="79"/>
|
||||
<location filename="../src/ui/editors/fullScreenEditor.py" line="95"/>
|
||||
<source>Theme:</source>
|
||||
<translation>Thème:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/editors/fullScreenEditor.py" line="238"/>
|
||||
<location filename="../src/ui/editors/fullScreenEditor.py" line="271"/>
|
||||
<source>{} words / {}</source>
|
||||
<translation>{} mots / {}</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/editors/fullScreenEditor.py" line="241"/>
|
||||
<location filename="../src/ui/editors/fullScreenEditor.py" line="274"/>
|
||||
<source>{} words</source>
|
||||
<translation>{} mots</translation>
|
||||
</message>
|
||||
|
@ -1375,6 +1380,74 @@ des lignes:</translation>
|
|||
<translation>Différentes valeurs</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>locker</name>
|
||||
<message>
|
||||
<location filename="../src/ui/editors/locker_ui.ui" line="14"/>
|
||||
<source>Form</source>
|
||||
<translation>Form</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/editors/locker_ui.ui" line="26"/>
|
||||
<source>Lock screen:</source>
|
||||
<translation>Bloquer l'écran:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/editors/locker_ui.ui" line="33"/>
|
||||
<source>Word target</source>
|
||||
<translation>Cible: mots</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/editors/locker_ui.ui" line="40"/>
|
||||
<source>Time target</source>
|
||||
<translation>Cible: temps</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/editors/locker_ui.ui" line="47"/>
|
||||
<source> words</source>
|
||||
<translation> mots</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/editors/locker_ui.ui" line="63"/>
|
||||
<source> minutes</source>
|
||||
<translation> minutes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/editors/locker_ui.ui" line="79"/>
|
||||
<source>Lock !</source>
|
||||
<translation>Bloquer !</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/editors/locker.py" line="81"/>
|
||||
<source>~{} h.</source>
|
||||
<translation>~{} h.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/editors/locker.py" line="83"/>
|
||||
<source>~{} mn.</source>
|
||||
<translation>~{} mn.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/editors/locker.py" line="87"/>
|
||||
<source>{}:{}</source>
|
||||
<translation>{}:{}</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/editors/locker.py" line="89"/>
|
||||
<source>{} s.</source>
|
||||
<translation>{} s.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/editors/locker.py" line="91"/>
|
||||
<source>{} remaining</source>
|
||||
<translation>{} restant</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/editors/locker.py" line="96"/>
|
||||
<source>{} words remaining</source>
|
||||
<translation>{} mots restants</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>mainEditor</name>
|
||||
<message>
|
||||
|
@ -1614,45 +1687,55 @@ des lignes:</translation>
|
|||
<translation>Nouvelle intrigue</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/plotModel.py" line="117"/>
|
||||
<location filename="../src/models/plotModel.py" line="147"/>
|
||||
<source>New subplot</source>
|
||||
<translation>Nouvelle sous-intrigue</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/plotModel.py" line="173"/>
|
||||
<location filename="../src/models/plotModel.py" line="203"/>
|
||||
<source>Main</source>
|
||||
<translation>Principale</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/plotModel.py" line="173"/>
|
||||
<location filename="../src/models/plotModel.py" line="203"/>
|
||||
<source>Secondary</source>
|
||||
<translation>Secondaire</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/plotModel.py" line="173"/>
|
||||
<location filename="../src/models/plotModel.py" line="203"/>
|
||||
<source>Minor</source>
|
||||
<translation>Mineure</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/plotModel.py" line="110"/>
|
||||
<source>Name</source>
|
||||
<translation>Nom</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/plotModel.py" line="112"/>
|
||||
<source>Meta</source>
|
||||
<translation>Meta</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>plotTreeView</name>
|
||||
<message>
|
||||
<location filename="../src/ui/views/plotTreeView.py" line="112"/>
|
||||
<location filename="../src/ui/views/plotTreeView.py" line="119"/>
|
||||
<source>Main</source>
|
||||
<translation>Principale</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/views/plotTreeView.py" line="112"/>
|
||||
<location filename="../src/ui/views/plotTreeView.py" line="119"/>
|
||||
<source>Secondary</source>
|
||||
<translation>Secondaire</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/views/plotTreeView.py" line="112"/>
|
||||
<location filename="../src/ui/views/plotTreeView.py" line="119"/>
|
||||
<source>Minor</source>
|
||||
<translation>Mineure</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/views/plotTreeView.py" line="173"/>
|
||||
<location filename="../src/ui/views/plotTreeView.py" line="180"/>
|
||||
<source>**Plot:** {}</source>
|
||||
<translation>**Intrigue:** {}</translation>
|
||||
</message>
|
||||
|
@ -1703,110 +1786,145 @@ des lignes:</translation>
|
|||
<context>
|
||||
<name>references</name>
|
||||
<message>
|
||||
<location filename="../src/models/references.py" line="240"/>
|
||||
<location filename="../src/models/references.py" line="348"/>
|
||||
<source>Unknown reference: {}.</source>
|
||||
<translation>Référence inconnue: {}.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/references.py" line="229"/>
|
||||
<location filename="../src/models/references.py" line="332"/>
|
||||
<source>Text: <b>{}</b></source>
|
||||
<translation>Texte: <b>{}</b></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/references.py" line="237"/>
|
||||
<location filename="../src/models/references.py" line="340"/>
|
||||
<source>Character: <b>{}</b></source>
|
||||
<translation>Personnage: <b>{}</b></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/references.py" line="136"/>
|
||||
<location filename="../src/models/references.py" line="153"/>
|
||||
<source>Basic infos</source>
|
||||
<translation>Informations générales</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/references.py" line="137"/>
|
||||
<location filename="../src/models/references.py" line="154"/>
|
||||
<source>Detailed infos</source>
|
||||
<translation>Informations détaillées</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/references.py" line="138"/>
|
||||
<location filename="../src/models/references.py" line="155"/>
|
||||
<source>POV of:</source>
|
||||
<translation>POV de:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/references.py" line="139"/>
|
||||
<location filename="../src/models/references.py" line="156"/>
|
||||
<source>Referenced in:</source>
|
||||
<translation>Référencé dans:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/references.py" line="144"/>
|
||||
<location filename="../src/models/references.py" line="165"/>
|
||||
<source>Motivation</source>
|
||||
<translation>Motivation</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/references.py" line="145"/>
|
||||
<location filename="../src/models/references.py" line="166"/>
|
||||
<source>Goal</source>
|
||||
<translation>Goal</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/references.py" line="146"/>
|
||||
<location filename="../src/models/references.py" line="167"/>
|
||||
<source>Conflict</source>
|
||||
<translation>Conflit</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/references.py" line="147"/>
|
||||
<location filename="../src/models/references.py" line="168"/>
|
||||
<source>Epiphany</source>
|
||||
<translation>Épiphanie</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/references.py" line="148"/>
|
||||
<location filename="../src/models/references.py" line="169"/>
|
||||
<source>Short summary</source>
|
||||
<translation>Résumé court</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/references.py" line="149"/>
|
||||
<location filename="../src/models/references.py" line="170"/>
|
||||
<source>Longer summary</source>
|
||||
<translation>Résumé long</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/references.py" line="51"/>
|
||||
<location filename="../src/models/references.py" line="62"/>
|
||||
<source>Path:</source>
|
||||
<translation>Chemin:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/references.py" line="52"/>
|
||||
<location filename="../src/models/references.py" line="63"/>
|
||||
<source>Stats:</source>
|
||||
<translation>Stats:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/references.py" line="53"/>
|
||||
<location filename="../src/models/references.py" line="64"/>
|
||||
<source>POV:</source>
|
||||
<translation>POV:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/references.py" line="54"/>
|
||||
<location filename="../src/models/references.py" line="65"/>
|
||||
<source>Status:</source>
|
||||
<translation>Status:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/references.py" line="55"/>
|
||||
<location filename="../src/models/references.py" line="66"/>
|
||||
<source>Label:</source>
|
||||
<translation>Label:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/references.py" line="56"/>
|
||||
<location filename="../src/models/references.py" line="67"/>
|
||||
<source>Short summary:</source>
|
||||
<translation>Résumé court:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/references.py" line="57"/>
|
||||
<location filename="../src/models/references.py" line="68"/>
|
||||
<source>Long summary:</source>
|
||||
<translation>Résumé long:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/references.py" line="58"/>
|
||||
<location filename="../src/models/references.py" line="69"/>
|
||||
<source>Notes:</source>
|
||||
<translation>Notes:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/references.py" line="318"/>
|
||||
<source>Not a reference: {}.</source>
|
||||
<translation>Pas une référence: {}.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/references.py" line="247"/>
|
||||
<source>Go to {}.</source>
|
||||
<translation>Aller à {}.</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/references.py" line="241"/>
|
||||
<source>Description</source>
|
||||
<translation>Description</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/references.py" line="242"/>
|
||||
<source>Result</source>
|
||||
<translation>Résultat</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/references.py" line="243"/>
|
||||
<source>Characters</source>
|
||||
<translation>Personnages</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/references.py" line="244"/>
|
||||
<source>Resolution steps</source>
|
||||
<translation>Étapes de résolution</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/models/references.py" line="345"/>
|
||||
<source>Plot: <b>{}</b></source>
|
||||
<translation>Intrigue: <b>{}</b></translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>revisions</name>
|
||||
|
@ -1816,12 +1934,12 @@ des lignes:</translation>
|
|||
<translation>Form</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/revisions_ui.ui" line="100"/>
|
||||
<location filename="../src/ui/revisions_ui.ui" line="97"/>
|
||||
<source>Restore</source>
|
||||
<translation>Restaurer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/ui/revisions_ui.ui" line="110"/>
|
||||
<location filename="../src/ui/revisions_ui.ui" line="104"/>
|
||||
<source>Delete</source>
|
||||
<translation>Supprimer</translation>
|
||||
</message>
|
||||
|
|
|
@ -19,7 +19,7 @@ from settingsWindow import *
|
|||
import settings
|
||||
import imp
|
||||
|
||||
# Spell checker support
|
||||
# Spellcheck support
|
||||
try:
|
||||
import enchant
|
||||
except ImportError:
|
||||
|
|
|
@ -6,10 +6,17 @@ from enums import *
|
|||
from ui.views.textEditView import *
|
||||
from ui.editors.themes import *
|
||||
from ui.editors.textFormat import *
|
||||
from ui.editors.locker import locker
|
||||
|
||||
from functions import *
|
||||
import settings
|
||||
|
||||
# Spell checker support
|
||||
try:
|
||||
import enchant
|
||||
except ImportError:
|
||||
enchant = None
|
||||
|
||||
class fullScreenEditor(QWidget):
|
||||
|
||||
def __init__(self, index, parent=None):
|
||||
|
@ -41,13 +48,15 @@ class fullScreenEditor(QWidget):
|
|||
#self.topPanel.layout().addStretch(1)
|
||||
|
||||
# Spell checking
|
||||
self.btnSpellCheck = QPushButton(self)
|
||||
self.btnSpellCheck.setFlat(True)
|
||||
self.btnSpellCheck.setIcon(QIcon.fromTheme("tools-check-spelling"))
|
||||
self.btnSpellCheck.setCheckable(True)
|
||||
self.btnSpellCheck.setChecked(self.editor.spellcheck)
|
||||
self.btnSpellCheck.toggled.connect(self.editor.toggleSpellcheck)
|
||||
self.topPanel.layout().addWidget(self.btnSpellCheck)
|
||||
if enchant:
|
||||
self.btnSpellCheck = QPushButton(self)
|
||||
self.btnSpellCheck.setFlat(True)
|
||||
self.btnSpellCheck.setIcon(QIcon.fromTheme("tools-check-spelling"))
|
||||
self.btnSpellCheck.setCheckable(True)
|
||||
self.btnSpellCheck.setChecked(self.editor.spellcheck)
|
||||
self.btnSpellCheck.toggled.connect(self.editor.toggleSpellcheck)
|
||||
self.topPanel.layout().addWidget(self.btnSpellCheck)
|
||||
|
||||
self.topPanel.layout().addStretch(1)
|
||||
|
||||
# Formatting
|
||||
|
@ -55,11 +64,18 @@ class fullScreenEditor(QWidget):
|
|||
self.topPanel.layout().addWidget(self.textFormat)
|
||||
self.topPanel.layout().addStretch(1)
|
||||
|
||||
b = QPushButton(self)
|
||||
b.setIcon(qApp.style().standardIcon(QStyle.SP_DialogCloseButton))
|
||||
b.clicked.connect(self.close)
|
||||
b.setFlat(True)
|
||||
self.topPanel.layout().addWidget(b)
|
||||
self.btnClose = QPushButton(self)
|
||||
self.btnClose.setIcon(qApp.style().standardIcon(QStyle.SP_DialogCloseButton))
|
||||
self.btnClose.clicked.connect(self.close)
|
||||
self.btnClose.setFlat(True)
|
||||
self.topPanel.layout().addWidget(self.btnClose)
|
||||
|
||||
# Left Panel
|
||||
self._locked = False
|
||||
self.leftPanel = myPanel(vertical=True, parent=self)
|
||||
self.locker = locker(self)
|
||||
self.locker.lockChanged.connect(self.setLocked)
|
||||
self.leftPanel.layout().addWidget(self.locker)
|
||||
|
||||
# Bottom Panel
|
||||
self.bottomPanel = myPanel(parent=self)
|
||||
|
@ -98,6 +114,10 @@ class fullScreenEditor(QWidget):
|
|||
#self.showMaximized()
|
||||
#self.show()
|
||||
|
||||
def setLocked(self, val):
|
||||
self._locked = val
|
||||
self.btnClose.setVisible(not val)
|
||||
|
||||
def setTheme(self, themeName):
|
||||
settings.fullScreenTheme = themeName
|
||||
self._theme = findThemePath(themeName)
|
||||
|
@ -139,7 +159,17 @@ class fullScreenEditor(QWidget):
|
|||
|
||||
self.scrollBar.setColor(self._bgcolor)
|
||||
|
||||
# Panels
|
||||
# Left Panel
|
||||
r = self.locker.geometry()
|
||||
r.moveTopLeft(QPoint(
|
||||
0,
|
||||
self.geometry().height() / 2 - r.height() / 2
|
||||
))
|
||||
self.leftPanel.setGeometry(r)
|
||||
self.hideWidget(self.leftPanel)
|
||||
self.leftPanel.setColor(self._bgcolor)
|
||||
|
||||
# Top / Bottom Panels
|
||||
r = QRect(0, 0, 0, 24)
|
||||
r.setWidth(rect.width())
|
||||
#r.moveLeft(rect.center().x() - r.width() / 2)
|
||||
|
@ -181,7 +211,8 @@ class fullScreenEditor(QWidget):
|
|||
self.updateTheme()
|
||||
|
||||
def keyPressEvent(self, event):
|
||||
if event.key() in [Qt.Key_Escape, Qt.Key_F11]:
|
||||
if event.key() in [Qt.Key_Escape, Qt.Key_F11] and \
|
||||
not self._locked:
|
||||
self.close()
|
||||
else:
|
||||
QWidget.keyPressEvent(self, event)
|
||||
|
@ -189,7 +220,8 @@ class fullScreenEditor(QWidget):
|
|||
def mouseMoveEvent(self, event):
|
||||
r = self.geometry()
|
||||
|
||||
for w in [self.scrollBar, self.topPanel, self.bottomPanel]:
|
||||
for w in [self.scrollBar, self.topPanel,
|
||||
self.bottomPanel, self.leftPanel]:
|
||||
#w.setVisible(w.geometry().contains(event.pos()))
|
||||
if self._geometries[w].contains(event.pos()):
|
||||
self.showWidget(w)
|
||||
|
@ -207,7 +239,8 @@ class fullScreenEditor(QWidget):
|
|||
|
||||
def eventFilter(self, obj, event):
|
||||
if obj == self.editor and event.type() == QEvent.Enter:
|
||||
for w in [self.scrollBar, self.topPanel, self.bottomPanel]:
|
||||
for w in [self.scrollBar, self.topPanel,
|
||||
self.bottomPanel, self.leftPanel]:
|
||||
#w.setVisible(False)
|
||||
self.hideWidget(w)
|
||||
return QWidget.eventFilter(self, obj, event)
|
||||
|
@ -239,6 +272,11 @@ class fullScreenEditor(QWidget):
|
|||
else:
|
||||
self.lblProgress.hide()
|
||||
self.lblWC.setText(self.tr("{} words").format(wc))
|
||||
|
||||
self.locker.setWordCount(wc)
|
||||
if not self.locker.isLocked():
|
||||
if goal - wc > 0:
|
||||
self.locker.spnWordTarget.setValue(goal - wc)
|
||||
|
||||
class myScrollBar(QScrollBar):
|
||||
def __init__(self, color=Qt.white, parent=None):
|
||||
|
@ -274,12 +312,15 @@ class myScrollBar(QScrollBar):
|
|||
painter.end()
|
||||
|
||||
class myPanel(QWidget):
|
||||
def __init__(self, color=Qt.white, parent=None):
|
||||
def __init__(self, color=Qt.white, vertical=False, parent=None):
|
||||
QWidget.__init__(self, parent)
|
||||
self._color = color
|
||||
self.show()
|
||||
self.setAttribute(Qt.WA_TranslucentBackground)
|
||||
self.setLayout(QHBoxLayout())
|
||||
if not vertical:
|
||||
self.setLayout(QHBoxLayout())
|
||||
else:
|
||||
self.setLayout(QVBoxLayout())
|
||||
self.layout().setContentsMargins(0, 0, 0, 0)
|
||||
|
||||
def setColor(self, color):
|
||||
|
|
98
src/ui/editors/locker.py
Normal file
98
src/ui/editors/locker.py
Normal file
|
@ -0,0 +1,98 @@
|
|||
#!/usr/bin/env python
|
||||
#--!-- coding: utf8 --!--
|
||||
|
||||
from qt import *
|
||||
from enums import *
|
||||
from ui.editors.locker_ui import Ui_locker
|
||||
from functions import *
|
||||
import models.references as Ref
|
||||
|
||||
class locker(QWidget, Ui_locker):
|
||||
|
||||
locked = pyqtSignal()
|
||||
unlocked = pyqtSignal()
|
||||
lockChanged = pyqtSignal(bool)
|
||||
|
||||
|
||||
def __init__(self, parent=None):
|
||||
QWidget.__init__(self, parent)
|
||||
self.setupUi(self)
|
||||
self._btnText = None
|
||||
self._words = None
|
||||
self._target = None
|
||||
|
||||
self.timer = QTimer(self)
|
||||
self.timer.setSingleShot(True)
|
||||
self.timer.timeout.connect(self.unlock)
|
||||
self.timer.stop()
|
||||
self.timerSec = QTimer(self)
|
||||
self.timerSec.setInterval(500)
|
||||
self.timerSec.timeout.connect(self.updateBtnText)
|
||||
self.timerSec.stop()
|
||||
self.rbtnWordTarget.toggled.connect(self.spnWordTarget.setVisible)
|
||||
self.rbtnTimeTarget.toggled.connect(self.spnTimeTarget.setVisible)
|
||||
self.rbtnWordTarget.setChecked(True)
|
||||
self.spnTimeTarget.setVisible(False)
|
||||
|
||||
self.btnLock.clicked.connect(self.lock)
|
||||
|
||||
def lock(self):
|
||||
if self.rbtnWordTarget.isChecked():
|
||||
self._target = self._words + self.spnWordTarget.value()
|
||||
|
||||
elif self.rbtnTimeTarget.isChecked():
|
||||
self.timer.setInterval(self.spnTimeTarget.value() * 1000 * 60)
|
||||
self.timer.start()
|
||||
self.timerSec.start()
|
||||
self.updateBtnText()
|
||||
|
||||
self.setEnabled(False)
|
||||
self.locked.emit()
|
||||
self.lockChanged.emit(True)
|
||||
|
||||
def unlock(self):
|
||||
self.setEnabled(True)
|
||||
self.btnLock.setText(self._btnText)
|
||||
self.timer.stop()
|
||||
self.timerSec.stop()
|
||||
self._target = None
|
||||
self.unlocked.emit()
|
||||
self.lockChanged.emit(False)
|
||||
|
||||
def isLocked(self):
|
||||
return not self.isEnabled()
|
||||
|
||||
def setWordCount(self, wc):
|
||||
self._words = wc
|
||||
if self.isLocked():
|
||||
self.updateBtnText()
|
||||
if self._words >= self._target:
|
||||
self.unlock()
|
||||
|
||||
def updateBtnText(self):
|
||||
if not self._btnText:
|
||||
self._btnText = self.btnLock.text()
|
||||
|
||||
# Time locked
|
||||
if self.timer.remainingTime() != -1:
|
||||
t = self.timer.remainingTime()
|
||||
t = int(t / 1000)
|
||||
if t > 60 * 60:
|
||||
text = self.tr("~{} h.").format(str(int(t / 60 / 60)))
|
||||
elif t > 60 * 5:
|
||||
text = self.tr("~{} mn.").format(str(int(t / 60)))
|
||||
elif t > 60:
|
||||
mn = int(t / 60)
|
||||
sec = t - 60 * mn
|
||||
text = self.tr("{}:{}").format(str(mn), str(sec))
|
||||
else:
|
||||
text = self.tr("{} s.").format(str(t))
|
||||
|
||||
self.btnLock.setText(self.tr("{} remaining").format(
|
||||
text))
|
||||
|
||||
# Word locked
|
||||
elif self._target != None:
|
||||
self.btnLock.setText(self.tr("{} words remaining").format(
|
||||
self._target - self._words))
|
||||
|
59
src/ui/editors/locker_ui.py
Normal file
59
src/ui/editors/locker_ui.py
Normal file
|
@ -0,0 +1,59 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'src/ui/editors/locker_ui.ui'
|
||||
#
|
||||
# Created: Tue Jul 7 17:57:16 2015
|
||||
# by: PyQt5 UI code generator 5.2.1
|
||||
#
|
||||
# WARNING! All changes made in this file will be lost!
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
class Ui_locker(object):
|
||||
def setupUi(self, locker):
|
||||
locker.setObjectName("locker")
|
||||
locker.resize(157, 155)
|
||||
self.verticalLayout = QtWidgets.QVBoxLayout(locker)
|
||||
self.verticalLayout.setObjectName("verticalLayout")
|
||||
self.label = QtWidgets.QLabel(locker)
|
||||
font = QtGui.QFont()
|
||||
font.setBold(True)
|
||||
font.setWeight(75)
|
||||
self.label.setFont(font)
|
||||
self.label.setObjectName("label")
|
||||
self.verticalLayout.addWidget(self.label)
|
||||
self.rbtnWordTarget = QtWidgets.QRadioButton(locker)
|
||||
self.rbtnWordTarget.setObjectName("rbtnWordTarget")
|
||||
self.verticalLayout.addWidget(self.rbtnWordTarget)
|
||||
self.rbtnTimeTarget = QtWidgets.QRadioButton(locker)
|
||||
self.rbtnTimeTarget.setObjectName("rbtnTimeTarget")
|
||||
self.verticalLayout.addWidget(self.rbtnTimeTarget)
|
||||
self.spnWordTarget = QtWidgets.QSpinBox(locker)
|
||||
self.spnWordTarget.setMinimum(1)
|
||||
self.spnWordTarget.setMaximum(99999)
|
||||
self.spnWordTarget.setProperty("value", 500)
|
||||
self.spnWordTarget.setObjectName("spnWordTarget")
|
||||
self.verticalLayout.addWidget(self.spnWordTarget)
|
||||
self.spnTimeTarget = QtWidgets.QSpinBox(locker)
|
||||
self.spnTimeTarget.setMinimum(1)
|
||||
self.spnTimeTarget.setMaximum(9999)
|
||||
self.spnTimeTarget.setProperty("value", 5)
|
||||
self.spnTimeTarget.setObjectName("spnTimeTarget")
|
||||
self.verticalLayout.addWidget(self.spnTimeTarget)
|
||||
self.btnLock = QtWidgets.QPushButton(locker)
|
||||
self.btnLock.setObjectName("btnLock")
|
||||
self.verticalLayout.addWidget(self.btnLock)
|
||||
|
||||
self.retranslateUi(locker)
|
||||
QtCore.QMetaObject.connectSlotsByName(locker)
|
||||
|
||||
def retranslateUi(self, locker):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
locker.setWindowTitle(_translate("locker", "Form"))
|
||||
self.label.setText(_translate("locker", "Lock screen:"))
|
||||
self.rbtnWordTarget.setText(_translate("locker", "Word target"))
|
||||
self.rbtnTimeTarget.setText(_translate("locker", "Time target"))
|
||||
self.spnWordTarget.setSuffix(_translate("locker", " words"))
|
||||
self.spnTimeTarget.setSuffix(_translate("locker", " minutes"))
|
||||
self.btnLock.setText(_translate("locker", "Lock !"))
|
||||
|
87
src/ui/editors/locker_ui.ui
Normal file
87
src/ui/editors/locker_ui.ui
Normal file
|
@ -0,0 +1,87 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>locker</class>
|
||||
<widget class="QWidget" name="locker">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>157</width>
|
||||
<height>155</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Form</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="font">
|
||||
<font>
|
||||
<weight>75</weight>
|
||||
<bold>true</bold>
|
||||
</font>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Lock screen:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rbtnWordTarget">
|
||||
<property name="text">
|
||||
<string>Word target</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rbtnTimeTarget">
|
||||
<property name="text">
|
||||
<string>Time target</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spnWordTarget">
|
||||
<property name="suffix">
|
||||
<string> words</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>99999</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>500</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="spnTimeTarget">
|
||||
<property name="suffix">
|
||||
<string> minutes</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>9999</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>5</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="btnLock">
|
||||
<property name="text">
|
||||
<string>Lock !</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
Loading…
Reference in a new issue