eliot-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Eliot-dev] eliot po/eliot.pot po/fr.po qt/dic_tools_widget...


From: eliot-dev
Subject: [Eliot-dev] eliot po/eliot.pot po/fr.po qt/dic_tools_widget...
Date: Sun, 14 Sep 2008 21:12:24 +0000

CVSROOT:        /cvsroot/eliot
Module name:    eliot
Changes by:     Olivier Teulière <ipkiss>      08/09/14 21:12:24

Modified files:
        po             : eliot.pot fr.po 
        qt             : dic_tools_widget.cpp dic_tools_widget.h 
        qt/ui          : dic_tools_widget.ui 

Log message:
        New tab in the dictionary tools, to display parts of the dictionary 
header.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/eliot/po/eliot.pot?cvsroot=eliot&r1=1.15&r2=1.16
http://cvs.savannah.gnu.org/viewcvs/eliot/po/fr.po?cvsroot=eliot&r1=1.16&r2=1.17
http://cvs.savannah.gnu.org/viewcvs/eliot/qt/dic_tools_widget.cpp?cvsroot=eliot&r1=1.2&r2=1.3
http://cvs.savannah.gnu.org/viewcvs/eliot/qt/dic_tools_widget.h?cvsroot=eliot&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/eliot/qt/ui/dic_tools_widget.ui?cvsroot=eliot&r1=1.3&r2=1.4

Patches:
Index: po/eliot.pot
===================================================================
RCS file: /cvsroot/eliot/eliot/po/eliot.pot,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -b -r1.15 -r1.16
--- po/eliot.pot        13 Sep 2008 21:32:46 -0000      1.15
+++ po/eliot.pot        14 Sep 2008 21:12:23 -0000      1.16
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-09-11 23:04+0200\n"
+"POT-Creation-Date: 2008-09-14 23:07+0200\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <address@hidden>\n"
 "Language-Team: LANGUAGE <address@hidden>\n"
@@ -1207,45 +1207,58 @@
 msgid "Regular expressions"
 msgstr ""
 
-#: qt/bag_widget.cpp:49
+#: qt/bag_widget.cpp:49 qt/dic_tools_widget.cpp:98
 msgid "Letter"
 msgstr ""
 
-#: qt/bag_widget.cpp:50 qt/history_widget.cpp:55 qt/training_widget.cpp:60
+#: qt/bag_widget.cpp:50 qt/dic_tools_widget.cpp:99 qt/history_widget.cpp:55
+#: qt/training_widget.cpp:60
 msgid "Points"
 msgstr ""
 
-#: qt/dic_tools_widget.cpp:87 qt/dic_tools_widget.cpp:92
+#: qt/dic_tools_widget.cpp:88 qt/dic_tools_widget.cpp:93
 #: qt/ui/player_widget.ui:16 qt/ui/training_widget.ui:21
 msgid "Rack:"
 msgstr ""
 
-#: qt/dic_tools_widget.cpp:122 qt/dic_tools_widget.cpp:155
-#: qt/dic_tools_widget.cpp:208
+#: qt/dic_tools_widget.cpp:100
+msgid "Frequency"
+msgstr ""
+
+#: qt/dic_tools_widget.cpp:101
+msgid "Vowel?"
+msgstr ""
+
+#: qt/dic_tools_widget.cpp:102
+msgid "Consonant?"
+msgstr ""
+
+#: qt/dic_tools_widget.cpp:133 qt/dic_tools_widget.cpp:166
+#: qt/dic_tools_widget.cpp:219
 msgid "Please select a dictionary"
 msgstr ""
 
-#: qt/dic_tools_widget.cpp:133
+#: qt/dic_tools_widget.cpp:144
 msgid "The word '%1' exists"
 msgstr ""
 
-#: qt/dic_tools_widget.cpp:138
+#: qt/dic_tools_widget.cpp:149
 msgid "The word '%1' does not exist"
 msgstr ""
 
-#: qt/dic_tools_widget.cpp:162
+#: qt/dic_tools_widget.cpp:173
 msgid "Rack: %1"
 msgstr ""
 
-#: qt/dic_tools_widget.cpp:181
+#: qt/dic_tools_widget.cpp:192
 msgid "Anagrams"
 msgstr ""
 
-#: qt/dic_tools_widget.cpp:215
+#: qt/dic_tools_widget.cpp:226
 msgid "Regular expression: %1"
 msgstr ""
 
-#: qt/dic_tools_widget.cpp:238
+#: qt/dic_tools_widget.cpp:249
 msgid "Invalid regular expression: %1"
 msgstr ""
 
@@ -1523,14 +1536,14 @@
 msgid "Duplicate"
 msgstr ""
 
-#: qt/player_widget.cpp:81
+#: qt/player_widget.cpp:82
 msgid ""
 "Enter the word to play (case-insensitive).\n"
 "A joker from the rack must be written in parentheses.\n"
 "E.g.: w(o)rd or W(O)RD"
 msgstr ""
 
-#: qt/player_widget.cpp:84
+#: qt/player_widget.cpp:85
 msgid ""
 "Enter the coordinates of the word.\n"
 "Specify the row before the column for horizontal words,\n"
@@ -1538,71 +1551,71 @@
 "E.g.: H4 or 4H"
 msgstr ""
 
-#: qt/player_widget.cpp:177
+#: qt/player_widget.cpp:183
 msgid "Cannot play word: misplaced parentheses"
 msgstr ""
 
-#: qt/player_widget.cpp:199
+#: qt/player_widget.cpp:205
 msgid "Cannot play '%1' at position '%2':\n"
 msgstr ""
 
-#: qt/player_widget.cpp:204
+#: qt/player_widget.cpp:210
 msgid "Some letters are not valid for the current dictionary"
 msgstr ""
 
-#: qt/player_widget.cpp:207
+#: qt/player_widget.cpp:213
 msgid "Invalid coordinates"
 msgstr ""
 
-#: qt/player_widget.cpp:210
+#: qt/player_widget.cpp:216
 msgid "The word does not exist"
 msgstr ""
 
-#: qt/player_widget.cpp:213
+#: qt/player_widget.cpp:219
 msgid "The rack doesn't contain the letters needed to play this word"
 msgstr ""
 
-#: qt/player_widget.cpp:216
+#: qt/player_widget.cpp:222
 msgid "The word is part of a longer one"
 msgstr ""
 
-#: qt/player_widget.cpp:219
+#: qt/player_widget.cpp:225
 msgid "The word tries to replace an existing letter"
 msgstr ""
 
-#: qt/player_widget.cpp:222
+#: qt/player_widget.cpp:228
 msgid "An orthogonal word is not valid"
 msgstr ""
 
-#: qt/player_widget.cpp:225
+#: qt/player_widget.cpp:231
 msgid "The word is already present on the board at these coordinates"
 msgstr ""
 
-#: qt/player_widget.cpp:228
+#: qt/player_widget.cpp:234
 msgid "A word cannot be isolated (not connected to the placed words)"
 msgstr ""
 
-#: qt/player_widget.cpp:231
+#: qt/player_widget.cpp:237
 msgid "The first word of the game must be horizontal"
 msgstr ""
 
-#: qt/player_widget.cpp:234
+#: qt/player_widget.cpp:240
 msgid "The first word of the game must cover the H8 square"
 msgstr ""
 
-#: qt/player_widget.cpp:237
+#: qt/player_widget.cpp:243
 msgid "The word is going out of the board"
 msgstr ""
 
-#: qt/player_widget.cpp:240
+#: qt/player_widget.cpp:246
 msgid "Incorrect or misplaced word (%1)"
 msgstr ""
 
-#: qt/player_widget.cpp:264
+#: qt/player_widget.cpp:270
 msgid "Cannot pass turn (%1)"
 msgstr ""
 
-#: qt/player_widget.cpp:266
+#: qt/player_widget.cpp:272
 msgid "Cannot change letters '%1' (%2)"
 msgstr ""
 
@@ -1626,6 +1639,22 @@
 msgid "Note: only the 1000 first results have been displayed"
 msgstr ""
 
+#: qt/ui/dic_tools_widget.ui:168
+msgid "Dic. info."
+msgstr ""
+
+#: qt/ui/dic_tools_widget.ui:174
+msgid "Dictionary name:"
+msgstr ""
+
+#: qt/ui/dic_tools_widget.ui:188
+msgid "Letters:"
+msgstr ""
+
+#: qt/ui/dic_tools_widget.ui:202
+msgid "Number of words:"
+msgstr ""
+
 #: qt/ui/main_window.ui:62 qt/ui/new_game.ui:77
 msgid "Players"
 msgstr ""
@@ -1666,56 +1695,56 @@
 msgid "Remove player"
 msgstr ""
 
-#: qt/ui/player_widget.ui:33
+#: qt/ui/player_widget.ui:30
 msgid "Shuffle"
 msgstr ""
 
-#: qt/ui/player_widget.ui:40
+#: qt/ui/player_widget.ui:37
 msgid "Play a word:"
 msgstr ""
 
-#: qt/ui/player_widget.ui:52
+#: qt/ui/player_widget.ui:49
 msgid ""
 "Enter the word to play (case-insensitive). A joker from the rack must be "
 "written in parentheses. E.g.: w(o)rd or W(O)RD"
 msgstr ""
 
-#: qt/ui/player_widget.ui:80
+#: qt/ui/player_widget.ui:77
 msgid ""
 "Enter the coordinates of the word. Specify the row before the column for "
 "horizontal words, and the column before the row for vertical words. E.g.: H4 "
 "or 4H"
 msgstr ""
 
-#: qt/ui/player_widget.ui:87 qt/ui/training_widget.ui:62
+#: qt/ui/player_widget.ui:84 qt/ui/training_widget.ui:62
 msgid "Play"
 msgstr ""
 
-#: qt/ui/player_widget.ui:94
+#: qt/ui/player_widget.ui:91
 msgid "Change letters:"
 msgstr ""
 
-#: qt/ui/player_widget.ui:101
+#: qt/ui/player_widget.ui:98
 msgid "Enter the letters you want to change"
 msgstr ""
 
-#: qt/ui/player_widget.ui:111
+#: qt/ui/player_widget.ui:108
 msgid "Change"
 msgstr ""
 
-#: qt/ui/player_widget.ui:118
+#: qt/ui/player_widget.ui:115
 msgid "Pass"
 msgstr ""
 
-#: qt/ui/player_widget.ui:125
+#: qt/ui/player_widget.ui:122
 msgid "Ref.:"
 msgstr ""
 
-#: qt/ui/player_widget.ui:74
+#: qt/ui/player_widget.ui:71
 msgid "Enter the coordinates of the word."
 msgstr ""
 
-#: qt/ui/player_widget.ui:47
+#: qt/ui/player_widget.ui:44
 msgid "Enter the word to play (case-insensitive)."
 msgstr ""
 

Index: po/fr.po
===================================================================
RCS file: /cvsroot/eliot/eliot/po/fr.po,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- po/fr.po    13 Sep 2008 21:32:46 -0000      1.16
+++ po/fr.po    14 Sep 2008 21:12:23 -0000      1.17
@@ -8,7 +8,7 @@
 msgstr ""
 "Project-Id-Version: eliot 1.7\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2008-09-11 23:04+0200\n"
+"POT-Creation-Date: 2008-09-14 23:07+0200\n"
 "PO-Revision-Date: 2008-08-31 10:43+0100\n"
 "Last-Translator: Olivier Teuliere <address@hidden>\n"
 "Language-Team: French <address@hidden>\n"
@@ -1237,45 +1237,58 @@
 msgid "Regular expressions"
 msgstr "Expressions régulières"
 
-#: qt/bag_widget.cpp:49
+#: qt/bag_widget.cpp:49 qt/dic_tools_widget.cpp:98
 msgid "Letter"
 msgstr "Lettre"
 
-#: qt/bag_widget.cpp:50 qt/history_widget.cpp:55 qt/training_widget.cpp:60
+#: qt/bag_widget.cpp:50 qt/dic_tools_widget.cpp:99 qt/history_widget.cpp:55
+#: qt/training_widget.cpp:60
 msgid "Points"
 msgstr "Points"
 
-#: qt/dic_tools_widget.cpp:87 qt/dic_tools_widget.cpp:92
+#: qt/dic_tools_widget.cpp:88 qt/dic_tools_widget.cpp:93
 #: qt/ui/player_widget.ui:16 qt/ui/training_widget.ui:21
 msgid "Rack:"
 msgstr "Tirage :"
 
-#: qt/dic_tools_widget.cpp:122 qt/dic_tools_widget.cpp:155
-#: qt/dic_tools_widget.cpp:208
+#: qt/dic_tools_widget.cpp:100
+msgid "Frequency"
+msgstr "Fréquence"
+
+#: qt/dic_tools_widget.cpp:101
+msgid "Vowel?"
+msgstr "Voyelle ?"
+
+#: qt/dic_tools_widget.cpp:102
+msgid "Consonant?"
+msgstr "Consonne ?"
+
+#: qt/dic_tools_widget.cpp:133 qt/dic_tools_widget.cpp:166
+#: qt/dic_tools_widget.cpp:219
 msgid "Please select a dictionary"
 msgstr "Choisir un dictionnaire"
 
-#: qt/dic_tools_widget.cpp:133
+#: qt/dic_tools_widget.cpp:144
 msgid "The word '%1' exists"
 msgstr "Le mot '%1' existe"
 
-#: qt/dic_tools_widget.cpp:138
+#: qt/dic_tools_widget.cpp:149
 msgid "The word '%1' does not exist"
 msgstr "Le mot '%1' n'existe pas"
 
-#: qt/dic_tools_widget.cpp:162
+#: qt/dic_tools_widget.cpp:173
 msgid "Rack: %1"
 msgstr "Tirage : %1"
 
-#: qt/dic_tools_widget.cpp:181
+#: qt/dic_tools_widget.cpp:192
 msgid "Anagrams"
 msgstr "Anagrammes"
 
-#: qt/dic_tools_widget.cpp:215
+#: qt/dic_tools_widget.cpp:226
 msgid "Regular expression: %1"
 msgstr "Expression régulière : %1"
 
-#: qt/dic_tools_widget.cpp:238
+#: qt/dic_tools_widget.cpp:249
 msgid "Invalid regular expression: %1"
 msgstr "Expression régulière invalide : %1"
 
@@ -1565,7 +1578,7 @@
 msgid "Duplicate"
 msgstr "Duplicate"
 
-#: qt/player_widget.cpp:81
+#: qt/player_widget.cpp:82
 msgid ""
 "Enter the word to play (case-insensitive).\n"
 "A joker from the rack must be written in parentheses.\n"
@@ -1575,7 +1588,7 @@
 "Un joker provenant du chevalet doit être écrit entre parenthèses.\n"
 "Ex. : m(o)( ou M(O)T"
 
-#: qt/player_widget.cpp:84
+#: qt/player_widget.cpp:85
 msgid ""
 "Enter the coordinates of the word.\n"
 "Specify the row before the column for horizontal words,\n"
@@ -1587,72 +1600,72 @@
 "et la colonne avant la rangée pour les mots verticaux.\n"
 "Ex. : H4 ou 4H"
 
-#: qt/player_widget.cpp:177
+#: qt/player_widget.cpp:183
 msgid "Cannot play word: misplaced parentheses"
 msgstr "Impossible de jouer le mot : parenthèses mal placées"
 
-#: qt/player_widget.cpp:199
+#: qt/player_widget.cpp:205
 msgid "Cannot play '%1' at position '%2':\n"
 msgstr "Impossible de jouer '%1' en '%2' :\n"
 
-#: qt/player_widget.cpp:204
+#: qt/player_widget.cpp:210
 msgid "Some letters are not valid for the current dictionary"
 msgstr ""
 "Le tirage contient des lettres incorrectes pour le dictionnaire courant"
 
-#: qt/player_widget.cpp:207
+#: qt/player_widget.cpp:213
 msgid "Invalid coordinates"
 msgstr "Coordonnées invalides"
 
-#: qt/player_widget.cpp:210
+#: qt/player_widget.cpp:216
 msgid "The word does not exist"
 msgstr "Le mot n'existe pas"
 
-#: qt/player_widget.cpp:213
+#: qt/player_widget.cpp:219
 msgid "The rack doesn't contain the letters needed to play this word"
 msgstr "Le chevalet ne contient pas les lettres permettant de jouer ce mot"
 
-#: qt/player_widget.cpp:216
+#: qt/player_widget.cpp:222
 msgid "The word is part of a longer one"
 msgstr "Le mot fait partie d'un autre mot plus long"
 
-#: qt/player_widget.cpp:219
+#: qt/player_widget.cpp:225
 msgid "The word tries to replace an existing letter"
 msgstr "Le mot remplace une lettre existante"
 
-#: qt/player_widget.cpp:222
+#: qt/player_widget.cpp:228
 msgid "An orthogonal word is not valid"
 msgstr "Un mot perpendiculaire est invalide"
 
-#: qt/player_widget.cpp:225
+#: qt/player_widget.cpp:231
 msgid "The word is already present on the board at these coordinates"
 msgstr "Le mot est déjà présent sur la grille à cette position"
 
-#: qt/player_widget.cpp:228
+#: qt/player_widget.cpp:234
 msgid "A word cannot be isolated (not connected to the placed words)"
 msgstr "Un mot ne peut pas être isolé (non connecté aux autres mots 
placés)"
 
-#: qt/player_widget.cpp:231
+#: qt/player_widget.cpp:237
 msgid "The first word of the game must be horizontal"
 msgstr "Le premier mot de la partie doit être horizontal"
 
-#: qt/player_widget.cpp:234
+#: qt/player_widget.cpp:240
 msgid "The first word of the game must cover the H8 square"
 msgstr "Le premier mot de la partie doit couvrir la case H8"
 
-#: qt/player_widget.cpp:237
+#: qt/player_widget.cpp:243
 msgid "The word is going out of the board"
 msgstr "Le mot sort de la grille"
 
-#: qt/player_widget.cpp:240
+#: qt/player_widget.cpp:246
 msgid "Incorrect or misplaced word (%1)"
 msgstr "Mot incorrect ou mal placé (%1)"
 
-#: qt/player_widget.cpp:264
+#: qt/player_widget.cpp:270
 msgid "Cannot pass turn (%1)"
 msgstr "Impossible de passer le tour (%1)"
 
-#: qt/player_widget.cpp:266
+#: qt/player_widget.cpp:272
 msgid "Cannot change letters '%1' (%2)"
 msgstr "Impossible de changer les lettres '%1' (%2)"
 
@@ -1676,13 +1689,29 @@
 msgid "Note: only the 1000 first results have been displayed"
 msgstr "Note : seuls les 1000 premiers résultats ont été affichés"
 
+#: qt/ui/dic_tools_widget.ui:168
+msgid "Dic. info."
+msgstr "Infos dic."
+
+#: qt/ui/dic_tools_widget.ui:174
+msgid "Dictionary name:"
+msgstr "Nom du dictionnaire :"
+
+#: qt/ui/dic_tools_widget.ui:188
+msgid "Letters:"
+msgstr "Lettres:"
+
+#: qt/ui/dic_tools_widget.ui:202
+msgid "Number of words:"
+msgstr "Nombre de mots :"
+
 #: qt/ui/main_window.ui:62 qt/ui/new_game.ui:77
 msgid "Players"
 msgstr "Joueurs"
 
 #: qt/ui/main_window.ui:108
 msgid "External board"
-msgstr "&Plateau de jeu externe"
+msgstr "Plateau de jeu externe"
 
 #: qt/ui/new_game.ui:13
 msgid "New game"
@@ -1716,15 +1745,15 @@
 msgid "Remove player"
 msgstr "Supprimer un joueur"
 
-#: qt/ui/player_widget.ui:33
+#: qt/ui/player_widget.ui:30
 msgid "Shuffle"
 msgstr "Mélanger"
 
-#: qt/ui/player_widget.ui:40
+#: qt/ui/player_widget.ui:37
 msgid "Play a word:"
 msgstr "Jouer le mot :"
 
-#: qt/ui/player_widget.ui:52
+#: qt/ui/player_widget.ui:49
 msgid ""
 "Enter the word to play (case-insensitive). A joker from the rack must be "
 "written in parentheses. E.g.: w(o)rd or W(O)RD"
@@ -1732,7 +1761,7 @@
 "Entrer le mot à jouer (insensible à la casse). Un joker provenant du "
 "chevalet doit être écrit entre parenthèses. Ex. : m(o)( ou M(O)T"
 
-#: qt/ui/player_widget.ui:80
+#: qt/ui/player_widget.ui:77
 msgid ""
 "Enter the coordinates of the word. Specify the row before the column for "
 "horizontal words, and the column before the row for vertical words. E.g.: H4 "
@@ -1742,35 +1771,35 @@
 "mots horizontaux, et la colonne avant la rangée pour les mots verticaux. "
 "Ex. : H4 ou 4H"
 
-#: qt/ui/player_widget.ui:87 qt/ui/training_widget.ui:62
+#: qt/ui/player_widget.ui:84 qt/ui/training_widget.ui:62
 msgid "Play"
 msgstr "Jouer"
 
-#: qt/ui/player_widget.ui:94
+#: qt/ui/player_widget.ui:91
 msgid "Change letters:"
 msgstr "Lettres à changer :"
 
-#: qt/ui/player_widget.ui:101
+#: qt/ui/player_widget.ui:98
 msgid "Enter the letters you want to change"
 msgstr "Entrer les lettres à changer"
 
-#: qt/ui/player_widget.ui:111
+#: qt/ui/player_widget.ui:108
 msgid "Change"
 msgstr "Changer"
 
-#: qt/ui/player_widget.ui:118
+#: qt/ui/player_widget.ui:115
 msgid "Pass"
 msgstr "Passer"
 
-#: qt/ui/player_widget.ui:125
+#: qt/ui/player_widget.ui:122
 msgid "Ref.:"
 msgstr "Ref. :"
 
-#: qt/ui/player_widget.ui:74
+#: qt/ui/player_widget.ui:71
 msgid "Enter the coordinates of the word."
 msgstr "Entrer les coordonnées du mot."
 
-#: qt/ui/player_widget.ui:47
+#: qt/ui/player_widget.ui:44
 msgid "Enter the word to play (case-insensitive)."
 msgstr "Entrer le mot à jouer (non sensible à la casse)."
 

Index: qt/dic_tools_widget.cpp
===================================================================
RCS file: /cvsroot/eliot/eliot/qt/dic_tools_widget.cpp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -b -r1.2 -r1.3
--- qt/dic_tools_widget.cpp     31 Aug 2008 11:48:18 -0000      1.2
+++ qt/dic_tools_widget.cpp     14 Sep 2008 21:12:24 -0000      1.3
@@ -32,6 +32,7 @@
 #include "dic_tools_widget.h"
 #include "qtcommon.h"
 #include "dic.h"
+#include "header.h"
 #include "dic_exception.h"
 
 using namespace std;
@@ -90,6 +91,15 @@
     treeViewRegexp->setModel(m_regexpModel);
     m_regexpModel->setColumnCount(1);
     m_regexpModel->setHeaderData(0, Qt::Horizontal, _q("Rack:"), 
Qt::DisplayRole);
+
+    m_dicInfoModel = new QStandardItemModel(this);
+    treeViewDicLetters->setModel(m_dicInfoModel);
+    m_dicInfoModel->setColumnCount(5);
+    m_dicInfoModel->setHeaderData(0, Qt::Horizontal, _q("Letter"), 
Qt::DisplayRole);
+    m_dicInfoModel->setHeaderData(1, Qt::Horizontal, _q("Points"), 
Qt::DisplayRole);
+    m_dicInfoModel->setHeaderData(2, Qt::Horizontal, _q("Frequency"), 
Qt::DisplayRole);
+    m_dicInfoModel->setHeaderData(3, Qt::Horizontal, _q("Vowel?"), 
Qt::DisplayRole);
+    m_dicInfoModel->setHeaderData(4, Qt::Horizontal, _q("Consonant?"), 
Qt::DisplayRole);
 }
 
 
@@ -110,6 +120,7 @@
         refreshCheck();
         refreshPlus1();
         refreshRegexp();
+        refreshDicInfo();
     }
 }
 
@@ -255,6 +266,47 @@
 }
 
 
+void DicToolsWidget::refreshDicInfo()
+{
+    if (m_dic == NULL)
+    {
+        lineEditName->setText("");
+        lineEditLetters->setText("");
+        spinBoxWords->setValue(0);
+        m_dicInfoModel->clear();
+    }
+    else
+    {
+        const Header &header = m_dic->getHeader();
+        lineEditName->setText(qfw(header.getName()));
+        lineEditLetters->setText(qfw(header.getLetters()));
+        spinBoxWords->setValue(header.getNbWords());
+
+        QStandardItemModel *model = m_dicInfoModel;
+        model->removeRows(0, model->rowCount());
+        const vector<Tile> &allTiles = m_dic->getAllTiles();
+        vector<Tile>::const_iterator it;
+        int rowNum = 0;
+        for (it = allTiles.begin(); it != allTiles.end(); ++it)
+        {
+            model->insertRow(rowNum);
+            model->setData(model->index(rowNum, 0),
+                           qfw(wstring(1, it->toChar())));
+            model->setData(model->index(rowNum, 1), it->getPoints());
+            model->setData(model->index(rowNum, 2), it->maxNumber());
+            model->setData(model->index(rowNum, 3), it->isVowel());
+            model->setData(model->index(rowNum, 4), it->isConsonant());
+            ++rowNum;
+        }
+        treeViewDicLetters->resizeColumnToContents(0);
+        treeViewDicLetters->resizeColumnToContents(1);
+        treeViewDicLetters->resizeColumnToContents(2);
+        treeViewDicLetters->resizeColumnToContents(3);
+        treeViewDicLetters->resizeColumnToContents(4);
+    }
+}
+
+
 
 DicRackValidator::DicRackValidator(QObject *parent,
                                    const Dictionary *iDic)

Index: qt/dic_tools_widget.h
===================================================================
RCS file: /cvsroot/eliot/eliot/qt/dic_tools_widget.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- qt/dic_tools_widget.h       27 Aug 2008 21:20:17 -0000      1.1
+++ qt/dic_tools_widget.h       14 Sep 2008 21:12:24 -0000      1.2
@@ -48,6 +48,8 @@
     QStandardItemModel *m_plus1Model;
     /// Model of the tree view for the "regexp" search
     QStandardItemModel *m_regexpModel;
+    /// Model of the tree view for the dictionary letters
+    QStandardItemModel *m_dicInfoModel;
 
     /// Palette to write text in red
     QPalette redPalette;
@@ -61,6 +63,8 @@
     void refreshPlus1();
     /// Force synchronizing the model with the "regexp" results
     void refreshRegexp();
+    /// Force synchronizing the model with the dictionary letters
+    void refreshDicInfo();
 };
 
 #endif

Index: qt/ui/dic_tools_widget.ui
===================================================================
RCS file: /cvsroot/eliot/eliot/qt/ui/dic_tools_widget.ui,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- qt/ui/dic_tools_widget.ui   7 Sep 2008 13:17:42 -0000       1.3
+++ qt/ui/dic_tools_widget.ui   14 Sep 2008 21:12:24 -0000      1.4
@@ -5,7 +5,7 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>462</width>
+    <width>431</width>
     <height>354</height>
    </rect>
   </property>
@@ -23,7 +23,7 @@
        <rect>
         <x>0</x>
         <y>0</y>
-        <width>440</width>
+        <width>409</width>
         <height>308</height>
        </rect>
       </property>
@@ -61,7 +61,7 @@
        <rect>
         <x>0</x>
         <y>0</y>
-        <width>440</width>
+        <width>409</width>
         <height>308</height>
        </rect>
       </property>
@@ -86,7 +86,7 @@
        <rect>
         <x>0</x>
         <y>0</y>
-        <width>440</width>
+        <width>409</width>
         <height>308</height>
        </rect>
       </property>
@@ -163,9 +163,81 @@
        </item>
       </layout>
      </widget>
+     <widget class="QWidget" name="tabDicInfo" >
+      <attribute name="title" >
+       <string>_("Dic. info.")</string>
+      </attribute>
+      <layout class="QGridLayout" name="gridLayout_2" >
+       <item row="0" column="0" >
+        <widget class="QLabel" name="label_3" >
+         <property name="text" >
+          <string>_("Dictionary name:")</string>
+         </property>
+        </widget>
+       </item>
+       <item row="0" column="1" >
+        <widget class="QLineEdit" name="lineEditName" >
+         <property name="readOnly" >
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="0" >
+        <widget class="QLabel" name="label_4" >
+         <property name="text" >
+          <string>_("Letters:")</string>
+         </property>
+        </widget>
+       </item>
+       <item row="1" column="1" >
+        <widget class="QLineEdit" name="lineEditLetters" >
+         <property name="readOnly" >
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+       <item row="2" column="0" >
+        <widget class="QLabel" name="label_5" >
+         <property name="text" >
+          <string>_("Number of words:")</string>
+         </property>
+        </widget>
+       </item>
+       <item row="2" column="1" >
+        <widget class="QSpinBox" name="spinBoxWords" >
+         <property name="sizePolicy" >
+          <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="minimumSize" >
+          <size>
+           <width>90</width>
+           <height>0</height>
+          </size>
+         </property>
+         <property name="readOnly" >
+          <bool>true</bool>
+         </property>
+         <property name="maximum" >
+          <number>100000000</number>
+         </property>
+        </widget>
+       </item>
+       <item row="3" column="0" colspan="2" >
+        <widget class="QTreeView" name="treeViewDicLetters" >
+         <property name="rootIsDecorated" >
+          <bool>false</bool>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </widget>
     </widget>
    </item>
   </layout>
+  <zorder>tabWidget</zorder>
  </widget>
  <resources/>
  <connections/>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]