]> git.nothing2do.fr Git - diary-mobile.git/commitdiff
I've added download(QString, QString) to save anything (URL in first
authorNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Thu, 5 Jun 2014 09:20:43 +0000 (11:20 +0200)
committerNorbert Moutarde <norbert.moutarde@nothing2do.eu>
Thu, 5 Jun 2014 09:20:43 +0000 (11:20 +0200)
QString) anywhere (filename in second QString)

diary-mobile_en_EN.ts
diary-mobile_fr_FR.ts
mainwindow.cpp
mainwindow.h

index 0e1549b683513b225edb94fb3e5a43df6b26262d..cef814ae5cbf7fd598a9be3c260f6de394d42f6f 100644 (file)
         <source>Enter the URL to download the first buttons file</source>
         <translation type="unfinished"></translation>
     </message>
-    <message>
-        <location filename="mainwindow.cpp" line="190"/>
-        <source>choice</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="mainwindow.cpp" line="190"/>
-        <source>Please choose an action.</source>
-        <translation type="unfinished"></translation>
-    </message>
     <message>
         <location filename="mainwindow.cpp" line="201"/>
         <source>get file</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="247"/>
+        <location filename="mainwindow.cpp" line="250"/>
         <source>&amp;File</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="248"/>
+        <location filename="mainwindow.cpp" line="251"/>
         <source>&amp;Start</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="248"/>
+        <location filename="mainwindow.cpp" line="251"/>
         <source>Ctrl+S</source>
         <comment>File|Start</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="249"/>
+        <location filename="mainwindow.cpp" line="252"/>
         <source>&amp;Back</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="249"/>
+        <location filename="mainwindow.cpp" line="252"/>
         <source>Ctrl+B</source>
         <comment>File|Back</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="251"/>
+        <location filename="mainwindow.cpp" line="254"/>
         <source>sendRAW</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="251"/>
+        <location filename="mainwindow.cpp" line="254"/>
         <source>Ctrl+L</source>
         <comment>File|Upload</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="252"/>
+        <location filename="mainwindow.cpp" line="255"/>
         <source>Reset RAW</source>
         <oldsource>Reset Ui</oldsource>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="253"/>
+        <location filename="mainwindow.cpp" line="256"/>
         <source>&amp;Quit</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="253"/>
+        <location filename="mainwindow.cpp" line="256"/>
         <source>Ctrl+Q</source>
         <comment>File|Quit</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="255"/>
+        <location filename="mainwindow.cpp" line="258"/>
         <source>&amp;Buttons</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="257"/>
+        <location filename="mainwindow.cpp" line="260"/>
         <source>Ctrl+D</source>
         <comment>Buttons|Add</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="258"/>
+        <location filename="mainwindow.cpp" line="261"/>
         <source>Ctrl+V</source>
         <comment>Buttons|Save</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="260"/>
+        <location filename="mainwindow.cpp" line="263"/>
         <source>Ctrl+E</source>
         <comment>Buttons|&amp;Edit</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="250"/>
+        <location filename="mainwindow.cpp" line="253"/>
         <source>&amp;View/Hide menu</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="262"/>
+        <location filename="mainwindow.cpp" line="265"/>
         <source>&amp;Help</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="263"/>
-        <location filename="mainwindow.cpp" line="405"/>
+        <location filename="mainwindow.cpp" line="266"/>
+        <location filename="mainwindow.cpp" line="408"/>
         <source>New entry</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="264"/>
+        <location filename="mainwindow.cpp" line="267"/>
         <source>getButtons</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="265"/>
+        <location filename="mainwindow.cpp" line="268"/>
         <source>About Qt</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="265"/>
+        <location filename="mainwindow.cpp" line="268"/>
         <source>ctrl+H</source>
         <comment>Help|About Qt</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="266"/>
+        <location filename="mainwindow.cpp" line="269"/>
         <source>C&amp;reate Database</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="266"/>
+        <location filename="mainwindow.cpp" line="269"/>
         <source>Ctrl+R</source>
         <comment>Help|CreateDB</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="427"/>
+        <location filename="mainwindow.cpp" line="430"/>
         <source>label</source>
         <comment>Title of box where ask for new button&apos;s label</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="427"/>
+        <location filename="mainwindow.cpp" line="430"/>
         <source>Enter his label</source>
         <comment>his/her/?they? I&apos;ve forget my school lesson</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="429"/>
+        <location filename="mainwindow.cpp" line="432"/>
         <source>keyword</source>
         <comment>Title of box where ask for new button&apos;s keyword</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="429"/>
+        <location filename="mainwindow.cpp" line="432"/>
         <source>Enter they keyword (no limit !)</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="431"/>
+        <location filename="mainwindow.cpp" line="434"/>
         <source>action</source>
         <comment>Title of box where ask for new button&apos;s action</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="431"/>
+        <location filename="mainwindow.cpp" line="434"/>
         <source>Enter his action</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="250"/>
+        <location filename="mainwindow.cpp" line="253"/>
         <source>Ctrl+T</source>
         <comment>File|View menu</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="256"/>
+        <location filename="mainwindow.cpp" line="190"/>
+        <source>choice</source>
+        <comment>title of box who ask multiple choice</comment>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.cpp" line="190"/>
+        <source>Please choose an action.</source>
+        <comment>text to ask multiple choice</comment>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.cpp" line="259"/>
         <source>&amp;Download</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="256"/>
+        <location filename="mainwindow.cpp" line="259"/>
         <source>Ctrl+W</source>
         <comment>Buttons|Downlad</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="257"/>
+        <location filename="mainwindow.cpp" line="260"/>
         <source>A&amp;dd</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="258"/>
+        <location filename="mainwindow.cpp" line="261"/>
         <source>Sa&amp;v</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="259"/>
+        <location filename="mainwindow.cpp" line="262"/>
         <source>Reset</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="259"/>
+        <location filename="mainwindow.cpp" line="262"/>
         <source>Ctrl+Z</source>
         <comment>Buttons|Reset</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="260"/>
+        <location filename="mainwindow.cpp" line="263"/>
         <source>&amp;Edit</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="468"/>
+        <location filename="mainwindow.cpp" line="471"/>
         <source>chooseButtonDB</source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="468"/>
+        <location filename="mainwindow.cpp" line="471"/>
         <source>Enter the keyword : </source>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="489"/>
+        <location filename="mainwindow.cpp" line="492"/>
         <source>keyword</source>
         <comment>Title of box where ask for button&apos;s keyword</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="489"/>
+        <location filename="mainwindow.cpp" line="492"/>
         <source>new keyword</source>
         <comment>question to get new button&apos;s keyword</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="491"/>
+        <location filename="mainwindow.cpp" line="494"/>
         <source>label</source>
         <comment>Title of box where ask for button&apos;s label</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="491"/>
+        <location filename="mainwindow.cpp" line="494"/>
         <source>new label</source>
         <comment>question to get new button&apos;s label</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="493"/>
+        <location filename="mainwindow.cpp" line="496"/>
         <source>action</source>
         <comment>Title of box where ask for button&apos;s action</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="493"/>
+        <location filename="mainwindow.cpp" line="496"/>
         <source>new action</source>
         <comment>question to get new button&apos;s action</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="537"/>
+        <location filename="mainwindow.cpp" line="540"/>
         <source>RAWsent</source>
         <comment>message title when data has been send</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="537"/>
+        <location filename="mainwindow.cpp" line="540"/>
         <source>sendRAW finish</source>
         <comment>message text when data has been send</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="620"/>
+        <location filename="mainwindow.cpp" line="623"/>
         <source>Upload finish : </source>
         <comment>pop-up when data has been sent</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="624"/>
+        <location filename="mainwindow.cpp" line="627"/>
         <source>uploadDB</source>
         <comment>pop-up title when data has been sent</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="671"/>
+        <location filename="mainwindow.cpp" line="681"/>
         <source>Uisent</source>
         <comment>pop-up title when buttons has been sent</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="671"/>
+        <location filename="mainwindow.cpp" line="681"/>
         <source>savbuttons finish</source>
         <comment>pop-up text when buttons has been sent</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="677"/>
+        <location filename="mainwindow.cpp" line="687"/>
         <source>Enter the keyword : </source>
         <comment>ask keyword to get buttons</comment>
         <translation type="unfinished"></translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="677"/>
+        <location filename="mainwindow.cpp" line="687"/>
         <source>getButtons</source>
         <comment>title to ask keyword fot getbuttons</comment>
         <translation type="unfinished"></translation>
     </message>
+    <message>
+        <location filename="mainwindow.cpp" line="744"/>
+        <source>writeFile</source>
+        <comment>pop-up title when file has been write</comment>
+        <translation type="unfinished"></translation>
+    </message>
+    <message>
+        <location filename="mainwindow.cpp" line="744"/>
+        <source>File writen</source>
+        <comment>pop-up text when file has been written</comment>
+        <translation type="unfinished"></translation>
+    </message>
 </context>
 </TS>
index 31df93d653d31d06a880902d24c25f2d33fa48bf..119b343ed8e5d9a7ada7fabccd097d525f479ecc 100644 (file)
         <translation>Entrez l&apos;URL pour télécharger vos boutons</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="190"/>
         <source>choice</source>
-        <translation>Choix</translation>
+        <translation type="obsolete">Choix</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="190"/>
         <source>Please choose an action.</source>
-        <translation>choisissez une action</translation>
+        <translation type="obsolete">choisissez une action</translation>
     </message>
     <message>
         <location filename="mainwindow.cpp" line="201"/>
         <translation>Entrez l&apos;ID du bouton à éditer</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="247"/>
+        <location filename="mainwindow.cpp" line="250"/>
         <source>&amp;File</source>
         <translation>&amp;Fichier</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="248"/>
+        <location filename="mainwindow.cpp" line="251"/>
         <source>&amp;Start</source>
         <translation>&amp;Départ</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="248"/>
+        <location filename="mainwindow.cpp" line="251"/>
         <source>Ctrl+S</source>
         <comment>File|Start</comment>
         <translation>Ctrl+D</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="249"/>
+        <location filename="mainwindow.cpp" line="252"/>
         <source>&amp;Back</source>
         <translation>&amp;Retour</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="249"/>
+        <location filename="mainwindow.cpp" line="252"/>
         <source>Ctrl+B</source>
         <comment>File|Back</comment>
         <translation>Ctrl+R</translation>
     </message>
     <message>
+        <location filename="mainwindow.cpp" line="259"/>
         <source>Ctrl+W</source>
         <comment>Buttons|Downlad</comment>
         <translation>Ctrl+D</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="251"/>
+        <location filename="mainwindow.cpp" line="254"/>
         <source>sendRAW</source>
         <translation>Envoyer les données</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="251"/>
+        <location filename="mainwindow.cpp" line="254"/>
         <source>Ctrl+L</source>
         <comment>File|Upload</comment>
         <translation>Ctrl+L</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="252"/>
+        <location filename="mainwindow.cpp" line="255"/>
         <source>Reset RAW</source>
         <oldsource>Reset Ui</oldsource>
-        <translation type="unfinished">Réinitialiser les boutons</translation>
+        <translation>Réinitialiser les boutons</translation>
     </message>
     <message>
         <source>Ctrl+Z</source>
         <comment>Buttons|ResetUi</comment>
-        <translation>Ctrl+Z</translation>
+        <translation type="obsolete">Ctrl+Z</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="253"/>
+        <location filename="mainwindow.cpp" line="256"/>
         <source>&amp;Quit</source>
         <translation>&amp;Quitter</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="253"/>
+        <location filename="mainwindow.cpp" line="256"/>
         <source>Ctrl+Q</source>
         <comment>File|Quit</comment>
         <translation>Ctrl+Q</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="255"/>
+        <location filename="mainwindow.cpp" line="258"/>
         <source>&amp;Buttons</source>
         <translation>Boutons</translation>
     </message>
     <message>
         <source>A&amp;dd buttons</source>
-        <translation>A&amp;jouter un boutons</translation>
+        <translation type="obsolete">A&amp;jouter un boutons</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="257"/>
+        <location filename="mainwindow.cpp" line="260"/>
         <source>Ctrl+D</source>
         <comment>Buttons|Add</comment>
         <translation>Ctrl+J</translation>
         <translation type="obsolete">Sauvegardez les boutons</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="258"/>
+        <location filename="mainwindow.cpp" line="261"/>
         <source>Ctrl+V</source>
         <comment>Buttons|Save</comment>
         <translation>Ctrl+V</translation>
         <translation type="obsolete">&amp;Editer les boutons</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="260"/>
+        <location filename="mainwindow.cpp" line="263"/>
         <source>Ctrl+E</source>
         <comment>Buttons|&amp;Edit</comment>
         <translation>Ctrl+E</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="250"/>
+        <location filename="mainwindow.cpp" line="253"/>
         <source>&amp;View/Hide menu</source>
         <translation>Voir/Cacher le menu</translation>
     </message>
     <message>
+        <location filename="mainwindow.cpp" line="190"/>
+        <source>choice</source>
+        <comment>title of box who ask multiple choice</comment>
+        <translation>Choix</translation>
+    </message>
+    <message>
+        <location filename="mainwindow.cpp" line="190"/>
+        <source>Please choose an action.</source>
+        <comment>text to ask multiple choice</comment>
+        <translation>Choisissez une action</translation>
+    </message>
+    <message>
+        <location filename="mainwindow.cpp" line="253"/>
         <source>Ctrl+T</source>
         <comment>File|View menu</comment>
         <translation>Ctrl+C</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="262"/>
+        <location filename="mainwindow.cpp" line="265"/>
         <source>&amp;Help</source>
         <translation>Aide</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="263"/>
-        <location filename="mainwindow.cpp" line="405"/>
+        <location filename="mainwindow.cpp" line="266"/>
+        <location filename="mainwindow.cpp" line="408"/>
         <source>New entry</source>
         <translation>Nouvelle entré</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="264"/>
+        <location filename="mainwindow.cpp" line="267"/>
         <source>getButtons</source>
         <translation>getButtons</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="265"/>
+        <location filename="mainwindow.cpp" line="268"/>
         <source>About Qt</source>
         <translation>A propos de Qt</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="265"/>
+        <location filename="mainwindow.cpp" line="268"/>
         <source>ctrl+H</source>
         <comment>Help|About Qt</comment>
         <translation>Ctrl+A</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="266"/>
+        <location filename="mainwindow.cpp" line="269"/>
         <source>C&amp;reate Database</source>
         <translation>C&amp;réer une base de donné</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="266"/>
+        <location filename="mainwindow.cpp" line="269"/>
         <source>Ctrl+R</source>
         <comment>Help|CreateDB</comment>
         <translation>Ctrl+R</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="427"/>
+        <location filename="mainwindow.cpp" line="430"/>
         <source>label</source>
         <comment>Title of box where ask for new button&apos;s label</comment>
         <translation>Etiquette</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="427"/>
+        <location filename="mainwindow.cpp" line="430"/>
         <source>Enter his label</source>
         <comment>his/her/?they? I&apos;ve forget my school lesson</comment>
         <translation>Entrez son étiquette</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="429"/>
+        <location filename="mainwindow.cpp" line="432"/>
         <source>keyword</source>
         <comment>Title of box where ask for new button&apos;s keyword</comment>
         <translation>mot-clé</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="429"/>
+        <location filename="mainwindow.cpp" line="432"/>
         <source>Enter they keyword (no limit !)</source>
         <translation>Entrez les mots clé (no limit !)</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="431"/>
+        <location filename="mainwindow.cpp" line="434"/>
         <source>action</source>
         <comment>Title of box where ask for new button&apos;s action</comment>
         <translation>action</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="431"/>
+        <location filename="mainwindow.cpp" line="434"/>
         <source>Enter his action</source>
         <translation>Entrez son action</translation>
     </message>
     <message>
         <source>askkeyword</source>
         <comment>Title of box where ask for keyword to getbuttons</comment>
-        <translation type="obsolete">mot-clé ?</translation>
+        <translation type="obsolete">0 (non) ou 1 (oui)?</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="250"/>
-        <source>Ctrl+T</source>
-        <comment>File|View menu</comment>
-        <translation type="unfinished">Ctrl+C</translation>
-    </message>
-    <message>
-        <location filename="mainwindow.cpp" line="256"/>
+        <location filename="mainwindow.cpp" line="259"/>
         <source>&amp;Download</source>
-        <translation type="unfinished"></translation>
-    </message>
-    <message>
-        <location filename="mainwindow.cpp" line="256"/>
-        <source>Ctrl+W</source>
-        <comment>Buttons|Downlad</comment>
-        <translation type="unfinished">Ctrl+D</translation>
+        <translation>&amp;Téléchargement</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="257"/>
+        <location filename="mainwindow.cpp" line="260"/>
         <source>A&amp;dd</source>
-        <translation type="unfinished"></translation>
+        <translation>Nouveau</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="258"/>
+        <location filename="mainwindow.cpp" line="261"/>
         <source>Sa&amp;v</source>
-        <translation type="unfinished"></translation>
+        <translation>Sauvegardez</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="259"/>
+        <location filename="mainwindow.cpp" line="262"/>
         <source>Reset</source>
-        <translation type="unfinished"></translation>
+        <translation>Remise à zéro</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="259"/>
+        <location filename="mainwindow.cpp" line="262"/>
         <source>Ctrl+Z</source>
         <comment>Buttons|Reset</comment>
-        <translation type="unfinished">Ctrl+Z</translation>
+        <translation>Ctrl+Z</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="260"/>
+        <location filename="mainwindow.cpp" line="263"/>
         <source>&amp;Edit</source>
-        <translation type="unfinished"></translation>
+        <translation>Editez</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="468"/>
+        <location filename="mainwindow.cpp" line="471"/>
         <source>chooseButtonDB</source>
         <translation>chooseButtonDB</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="468"/>
+        <location filename="mainwindow.cpp" line="471"/>
         <source>Enter the keyword : </source>
         <translation>Entrez le mot-clé : </translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="489"/>
+        <location filename="mainwindow.cpp" line="492"/>
         <source>keyword</source>
         <comment>Title of box where ask for button&apos;s keyword</comment>
         <translation>mot-clé</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="489"/>
+        <location filename="mainwindow.cpp" line="492"/>
         <source>new keyword</source>
         <comment>question to get new button&apos;s keyword</comment>
         <translation>nouveau mot-clé</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="491"/>
+        <location filename="mainwindow.cpp" line="494"/>
         <source>label</source>
         <comment>Title of box where ask for button&apos;s label</comment>
         <translation>étiquette</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="491"/>
+        <location filename="mainwindow.cpp" line="494"/>
         <source>new label</source>
         <comment>question to get new button&apos;s label</comment>
         <translation>nouvel étiquette</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="493"/>
+        <location filename="mainwindow.cpp" line="496"/>
         <source>action</source>
         <comment>Title of box where ask for button&apos;s action</comment>
         <translation>action</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="493"/>
+        <location filename="mainwindow.cpp" line="496"/>
         <source>new action</source>
         <comment>question to get new button&apos;s action</comment>
         <translation>nouvelle action</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="537"/>
+        <location filename="mainwindow.cpp" line="540"/>
         <source>RAWsent</source>
         <comment>message title when data has been send</comment>
         <translation>RAWsent</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="537"/>
+        <location filename="mainwindow.cpp" line="540"/>
         <source>sendRAW finish</source>
         <comment>message text when data has been send</comment>
         <translation>données envoyées</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="620"/>
+        <location filename="mainwindow.cpp" line="623"/>
         <source>Upload finish : </source>
         <comment>pop-up when data has been sent</comment>
         <translation>Upload finit : </translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="624"/>
+        <location filename="mainwindow.cpp" line="627"/>
         <source>uploadDB</source>
         <comment>pop-up title when data has been sent</comment>
         <translation>uploadDB</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="671"/>
+        <location filename="mainwindow.cpp" line="681"/>
         <source>Uisent</source>
         <comment>pop-up title when buttons has been sent</comment>
         <translation>Envoyé</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="671"/>
+        <location filename="mainwindow.cpp" line="681"/>
         <source>savbuttons finish</source>
         <comment>pop-up text when buttons has been sent</comment>
         <translation>boutons sauvegardés sur le serveur</translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="677"/>
+        <location filename="mainwindow.cpp" line="687"/>
         <source>Enter the keyword : </source>
         <comment>ask keyword to get buttons</comment>
         <translation>Entrez le mot-clé : </translation>
     </message>
     <message>
-        <location filename="mainwindow.cpp" line="677"/>
+        <location filename="mainwindow.cpp" line="687"/>
         <source>getButtons</source>
         <comment>title to ask keyword fot getbuttons</comment>
         <translation>getBoutons</translation>
     </message>
+    <message>
+        <location filename="mainwindow.cpp" line="744"/>
+        <source>writeFile</source>
+        <comment>pop-up title when file has been write</comment>
+        <translation>writeFile</translation>
+    </message>
+    <message>
+        <location filename="mainwindow.cpp" line="744"/>
+        <source>File writen</source>
+        <comment>pop-up text when file has been written</comment>
+        <translation>Fichier écrit</translation>
+    </message>
 </context>
 </TS>
index f0fb0d4e57c5781a58288b73b852487dfac9e540..55a3cc31b73af047348f0352eecc5f9bd006f53e 100644 (file)
@@ -187,7 +187,7 @@ void MainWindow::action(const QString &a){
     }
     else if(b[0]==QString("a/b")){
         bool ok;
-        QString e=QInputDialog::getItem(this, trUtf8("choice"), trUtf8("Please choose an action."), c.split(conf->value(QString("sepchc")).toString()), 0, 0, &ok);
+        QString e=QInputDialog::getItem(this, trUtf8("choice", "title of box who ask multiple choice"), trUtf8("Please choose an action.", "text to ask multiple choice"), c.split(conf->value(QString("sepchc")).toString()), 0, 0, &ok);
         if(ok)action(e);
     }
     else if(b[0]==QString("back")){
@@ -197,7 +197,7 @@ void MainWindow::action(const QString &a){
         }
     } 
     else if(b[0]==QString("setfile")){
-        bool ok;
+        bool ok=0;
         QString e=QFileDialog::getSaveFileName(this, trUtf8("get file", "title to ask file"), conf->value(b[1]).toString());
         if(ok)conf->setValue(b[1], e);
     }
@@ -238,6 +238,9 @@ void MainWindow::action(const QString &a){
         download(c);
         connect(m, SIGNAL(downloaded()), SLOT(writeUi()));
     }
+    else if(b[0]==QString("down")){
+        download(b[1], b[2]);
+    }
     else {
         getButtons(a);
 
@@ -646,6 +649,13 @@ void MainWindow::download(const QString & a){
     QUrl url(a);
     m = new FileDownloader(url, this);
 }
+void MainWindow::download(const QString & a, const QString & b){
+    qDebug()<<"download("<<a<<") in "<<b;
+    QUrl url(a);
+    m = new FileDownloader(url, this);
+    file=b;
+    connect(m, SIGNAL(downloaded()), this, SLOT(writeFile()));
+}
 void MainWindow::savButtons(){
     exec(QList<QString> ({conf->value(QString("selectbuttons")).toString()}));
     QFile a(conf->value(QString("buttonfile")).toString());
@@ -725,3 +735,11 @@ void MainWindow::writeTr(){
     file.write(m->downloadedData());
     file.close();
 }
+void MainWindow::writeFile(){
+    QFile tmp(file);
+    tmp.open(QIODevice::WriteOnly);
+    QDataStream str(&tmp);
+    str<<m->downloadedData();
+    m->disconnect();
+    QMessageBox::information(this, trUtf8("writeFile", "pop-up title when file has been write"), trUtf8("File writen", "pop-up text when file has been written"));
+}
index 84536b24b2db22092b9aab8d5ca53ac40d882e29..c6986e98b245792f1bd163c8c6d620985064644e 100644 (file)
@@ -155,6 +155,7 @@ private slots:
     void downloadUi();
     void writeUi();
     void writeTr();
+    void writeFile();
     void sendRAW();
     void RAWsent();
     void Uisent();
@@ -163,6 +164,7 @@ private slots:
     void resetUi();
     void downloadDB();
     void download(const QString &);
+    void download(const QString &,const QString &);
 public slots:
 
 signals:
@@ -176,7 +178,7 @@ private:
     QGridLayout *grid;
     QLabel *label;
     QSettings *conf;
-    QString tmp;//host, user, tmp, password, servercert,database, file;
+    QString tmp, file;//host, user, tmp, password, servercert,database;
     QMenu *FileMenu, *EditMenu, *HelpMenu;
     //unsigned short int port;// j'ai lu les docs sur internet et 0<="unsigned short int"<65536
     QSignalMapper *signalmap;