eliot-dev
[Top][All Lists]
Advanced

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

[Eliot-dev] eliot/qt Makefile.am main_window.cpp main_windo...


From: Olivier Teulière
Subject: [Eliot-dev] eliot/qt Makefile.am main_window.cpp main_windo...
Date: Sat, 15 May 2010 12:13:37 +0000

CVSROOT:        /cvsroot/eliot
Module name:    eliot
Changes by:     Olivier Teulière <ipkiss>       10/05/15 12:13:37

Modified files:
        qt             : Makefile.am main_window.cpp main_window.h 
Added files:
        qt             : dic_wizard.cpp dic_wizard.h 
        qt/ui          : dic_wizard_info_page.ui 
                         dic_wizard_letters_def_page.ui 

Log message:
        New wizard, for creating a dictionary from the GUI.
        The wizard is almost ready... except that the dictionary is not 
generated yet!

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/eliot/qt/Makefile.am?cvsroot=eliot&r1=1.16&r2=1.17
http://cvs.savannah.gnu.org/viewcvs/eliot/qt/main_window.cpp?cvsroot=eliot&r1=1.35&r2=1.36
http://cvs.savannah.gnu.org/viewcvs/eliot/qt/main_window.h?cvsroot=eliot&r1=1.16&r2=1.17
http://cvs.savannah.gnu.org/viewcvs/eliot/qt/dic_wizard.cpp?cvsroot=eliot&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/eliot/qt/dic_wizard.h?cvsroot=eliot&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/eliot/qt/ui/dic_wizard_info_page.ui?cvsroot=eliot&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/eliot/qt/ui/dic_wizard_letters_def_page.ui?cvsroot=eliot&rev=1.1

Patches:
Index: Makefile.am
===================================================================
RCS file: /cvsroot/eliot/eliot/qt/Makefile.am,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- Makefile.am 12 May 2010 22:12:31 -0000      1.16
+++ Makefile.am 15 May 2010 12:13:35 -0000      1.17
@@ -41,6 +41,8 @@
 
 EXTRA_DIST = \
     ui/dic_tools_widget.ui \
+    ui/dic_wizard_info_page.ui \
+    ui/dic_wizard_letters_def_page.ui \
     ui/main_window.ui \
     ui/new_game.ui \
     ui/player_widget.ui \
@@ -57,6 +59,7 @@
     dic_tools_widget.cpp dic_tools_widget.h \
     new_game.cpp new_game.h \
     score_widget.cpp score_widget.h \
+    dic_wizard.cpp dic_wizard.h \
     board_widget.cpp board_widget.h \
     history_widget.cpp history_widget.h \
     play_word_mediator.cpp play_word_mediator.h \
@@ -74,11 +77,14 @@
     ui/training_widget.ui.h \
     ui/prefs_dialog.ui.h \
     ui/dic_tools_widget.ui.h \
+    ui/dic_wizard_info_page.ui.h \
+    ui/dic_wizard_letters_def_page.ui.h \
     coord_model.moc.cpp \
     new_game.moc.cpp \
     dic_tools_widget.moc.cpp \
     bag_widget.moc.cpp \
     score_widget.moc.cpp \
+    dic_wizard.moc.cpp \
     board_widget.moc.cpp \
     history_widget.moc.cpp \
     play_word_mediator.moc.cpp \

Index: main_window.cpp
===================================================================
RCS file: /cvsroot/eliot/eliot/qt/main_window.cpp,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -b -r1.35 -r1.36
--- main_window.cpp     9 Mar 2010 22:32:09 -0000       1.35
+++ main_window.cpp     15 May 2010 12:13:36 -0000      1.36
@@ -52,6 +52,7 @@
 #include "player_widget.h"
 #include "history_widget.h"
 #include "dic_tools_widget.h"
+#include "dic_wizard.h"
 #include "aux_window.h"
 #include "qtcommon.h"
 
@@ -424,6 +425,9 @@
     menuSettings->setTitle(_q("&Settings"));
     addMenuAction(menuSettings, _q("&Choose dictionary..."), _q("Ctrl+C"),
                   _q("Select a new dictionary"), SLOT(onSettingsChooseDic()));
+    addMenuAction(menuSettings, _q("Create &new dictionary..."), QString(""),
+                  _q("Start the wizard for creating a new dictionary "
+                     "from an existing word list"), 
SLOT(onSettingsCreateDic()));
     addMenuAction(menuSettings, _q("&Preferences..."), _q("Ctrl+F"),
                   _q("Edit the preferences"), SLOT(onSettingsPreferences()),
                   false, QIcon(":/images/preferences.png"));
@@ -740,6 +744,15 @@
 }
 
 
+void MainWindow::onSettingsCreateDic()
+{
+    DicWizard *wizard = new DicWizard(this);
+    wizard->setWindowTitle(_("Dictionary creation wizard"));
+    wizard->setModal(true);
+    wizard->show();
+}
+
+
 void MainWindow::onWindowsToolbar()
 {
     if (m_ui.toolBar->isVisible())

Index: main_window.h
===================================================================
RCS file: /cvsroot/eliot/eliot/qt/main_window.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- main_window.h       19 Feb 2009 18:25:19 -0000      1.16
+++ main_window.h       15 May 2010 12:13:37 -0000      1.17
@@ -68,6 +68,7 @@
     void onGameSaveAs();
     void onGamePrint();
     void onSettingsChooseDic();
+    void onSettingsCreateDic();
     void onSettingsPreferences();
     void onWindowsToolbar();
     void onWindowsBag();

Index: dic_wizard.cpp
===================================================================
RCS file: dic_wizard.cpp
diff -N dic_wizard.cpp
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ dic_wizard.cpp      15 May 2010 12:13:36 -0000      1.1
@@ -0,0 +1,320 @@
+/*****************************************************************************
+ * Eliot
+ * Copyright (C) 2010 Olivier Teulière
+ * Authors: Olivier Teulière <ipkiss @@ gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *****************************************************************************/
+
+#include <iostream>
+
+#include <QtGui/QLabel>
+#include <QtGui/QVBoxLayout>
+#include <QtGui/QFileDialog>
+#include <QtGui/QStandardItemModel>
+#include <QtGui/QMessageBox>
+#include <QtCore/QFile>
+#include <QtCore/QTextStream>
+#include <QtCore/QSet>
+#include <QtCore/QList>
+
+#include "dic_wizard.h"
+#include "qtcommon.h"
+
+using namespace std;
+
+
+// ---------- WizardInfoPage ----------
+
+WizardInfoPage::WizardInfoPage(QWidget *parent) : QWizardPage(parent)
+{
+    setupUi(this);
+
+    // Define the labels properly
+    setTitle(_q("General information"));
+    setSubTitle(_q("On this page, you can define the main information "
+                   "needed to create a new dictionary."));
+    labelDicNameDesc->setText(_q("Choose a dictionary name. This name will "
+                                 "appear in Eliot status bar when the "
+                                 "dictionary is loaded.\nE.g.: My Dic 1.0"));
+    labelGenDicDesc->setText(_q("Choose the output file. This file will be "
+                                "generated by the wizard, and will contain "
+                                "the compressed dictionary.\n"
+                                "It must have the .dawg extension."));
+    labelWordListDesc->setText(_q("Choose the file containing the word list.\n"
+                                  "It must be encoded in UTF-8, and must "
+                                  "contain one word on each line."));
+
+    // Handle the Browse buttons
+    connect(buttonBrowseGenDic, SIGNAL(clicked(bool)),
+            this, SLOT(onBrowseGenDicClicked()));
+    connect(buttonBrowseWordList, SIGNAL(clicked(bool)),
+            this, SLOT(onBrowseWordListClicked()));
+
+    // Connection needed for proper calls to the isComplete() method
+    connect(editGenDic, SIGNAL(textChanged(const QString&)),
+            this, SIGNAL(completeChanged()));
+
+    // Register fields and make them mandatory
+    registerField("dicName*", editDicName);
+    registerField("genDic*", editGenDic);
+    registerField("wordList*", editWordList);
+}
+
+
+bool WizardInfoPage::isComplete() const
+{
+    return true; // XXX XXX XXX: temporary
+    if (!QWizardPage::isComplete())
+        return false;
+
+    // Make sure the word list file exists
+    if (!QFile(editWordList->text()).exists())
+        return false;
+
+    // Make sure the generated file has the .dawg extension
+    return editGenDic->text().endsWith(".dawg");
+}
+
+
+bool WizardInfoPage::validatePage()
+{
+    // Parse the file to get all the characters
+    QFile file(editWordList->text());
+    if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
+        return false;
+
+    QMap<QChar, int> lettersWithLine;
+    int lineNb = 1;
+    QTextStream in(&file);
+    while (!in.atEnd()) {
+        QString line = in.readLine().toUpper();
+        for (int i = 0; i < line.size(); ++i)
+        {
+            if (!lettersWithLine.contains(line[i]))
+                lettersWithLine.insert(line[i], lineNb);
+        }
+        ++lineNb;
+    }
+
+    // Copy the bad chars (i.e. non letters) to a list
+    QMap<QChar, int>::const_iterator it;
+    QList<QChar> badChars;
+    for (it = lettersWithLine.begin(); it != lettersWithLine.end(); ++it)
+    {
+        if (!it.key().isLetter())
+            badChars.push_back(it.key());
+    }
+
+    // If the list is not empty, then the word list is invalid
+    if (!badChars.empty())
+    {
+        QString msg = _q("Some invalid (non-alphabetical) characters have "
+                         "been found in the word list. They are indicated "
+                         "below, with the first line on which they were 
found:");
+        foreach (QChar ch, badChars)
+        {
+            QString letterMsg = "\n\t" + _q("'%1' (ASCII code %2) at line %3");
+            msg += 
letterMsg.arg(ch).arg((int)ch.toAscii()).arg(lettersWithLine[ch]);
+        }
+        QMessageBox errorBox(QMessageBox::Critical, _q("Eliot"), msg,
+                             QMessageBox::Ok);
+        errorBox.setInformativeText(_q("Please correct the word list."));
+        errorBox.exec();
+
+        return false;
+    }
+
+    return true;
+}
+
+
+void WizardInfoPage::onBrowseGenDicClicked()
+{
+    QString fileName = QFileDialog::getSaveFileName(this,
+            _q("Choose a file for the generated dictionary"), "", "*.dawg");
+    if (fileName != "")
+    {
+        if (!fileName.endsWith(".dawg"))
+            fileName += ".dawg";
+        editGenDic->setText(fileName);
+    }
+}
+
+
+void WizardInfoPage::onBrowseWordListClicked()
+{
+    QString fileName = QFileDialog::getOpenFileName(this,
+            _q("Choose a word list file"));
+    if (fileName != "")
+        editWordList->setText(fileName);
+}
+
+
+// ---------- WizardLettersDefPage ----------
+
+WizardLettersDefPage::WizardLettersDefPage(QWidget *parent) : 
QWizardPage(parent)
+{
+    setupUi(this);
+
+    setTitle(_q("Letters characteristics"));
+    labelTableDesc->setText(_q("The table below lists all the letters found in 
the word list (plus the joker). "
+            "For each letter, you need to define:\n"
+            " - its number of points;\n"
+            " - its frequency (number of occurrences in the game);\n"
+            " - whether the letter can be considered as a vowel;\n"
+            " - whether the letter can be considered as a consonant.\n"
+            "\n"
+            "Note that a letter can be considered both as a vowel and as a 
consonant. "
+            "This is usually the case for the joker and, in French, for the Y 
letter."));
+
+    // Create the model
+    m_model = new QStandardItemModel(0, 5, this);
+    m_model->setHeaderData(0, Qt::Horizontal, _q("Letter"), Qt::DisplayRole);
+    m_model->setHeaderData(1, Qt::Horizontal, _q("Points"), Qt::DisplayRole);
+    m_model->setHeaderData(2, Qt::Horizontal, _q("Frequency"), 
Qt::DisplayRole);
+    m_model->setHeaderData(3, Qt::Horizontal, _q("Vowel?"), Qt::DisplayRole);
+    m_model->setHeaderData(4, Qt::Horizontal, _q("Consonant?"), 
Qt::DisplayRole);
+    tableLetters->setModel(m_model);
+    treeLetters->setModel(m_model);
+    treeLetters->header()->setDefaultAlignment(Qt::AlignCenter);
+
+    connect(buttonLoadLetters, SIGNAL(clicked(bool)),
+            this, SLOT(loadLettersFromWordList()));
+    connect(buttonRemoveLetter, SIGNAL(clicked(bool)),
+            this, SLOT(removeLetter()));
+    // Enable the Remove button only when there is a selection in the tree
+    connect(treeLetters->selectionModel(),
+            SIGNAL(selectionChanged(const QItemSelection&, const 
QItemSelection&)),
+            this,
+            SLOT(enableRemoveButton(const QItemSelection&)));
+}
+
+
+void WizardLettersDefPage::loadLettersFromWordList()
+{
+    // Parse the file to get all the letters
+    QFile file(field("wordList").toString());
+    if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
+        return;
+
+    QSet<QChar> fileLetters;
+    QTextStream in(&file);
+    while (!in.atEnd()) {
+        QString line = in.readLine().toUpper();
+        for (int i = 0; i < line.size(); ++i)
+        {
+            fileLetters.insert(line[i]);
+        }
+    }
+
+    // Sort the letters alphabetically if possible
+    QList<QChar> sortedLetters = QList<QChar>::fromSet(fileLetters);
+    qSort(sortedLetters);
+
+    // Rebuild the model
+    m_model->removeRows(0, m_model->rowCount());
+    foreach (QChar ch, sortedLetters)
+    {
+        const int rowNum = m_model->rowCount();
+        bool res = m_model->insertRow(rowNum);
+        if (!res)
+            return;
+        m_model->setData(m_model->index(rowNum, 0), ch);
+        m_model->setData(m_model->index(rowNum, 1), 0);
+        m_model->setData(m_model->index(rowNum, 2), 0);
+        m_model->setData(m_model->index(rowNum, 3),
+                         (bool)QString("AEIOUY").contains(ch));
+        m_model->setData(m_model->index(rowNum, 4),
+                         (bool)QString("AEIOU").contains(ch));
+    }
+
+    // Add another line for the joker
+    int rowNum = m_model->rowCount();
+    bool res = m_model->insertRow(rowNum);
+    if (!res)
+        return;
+    m_model->setData(m_model->index(rowNum, 0), QString(_q("? (joker)")));
+    m_model->setData(m_model->index(rowNum, 1), 0);
+    m_model->setData(m_model->index(rowNum, 2), 2);
+    m_model->setData(m_model->index(rowNum, 3), true);
+    m_model->setData(m_model->index(rowNum, 4), true);
+
+    // Align everything in the center and prevent editing in the first column
+    for (int i = 0; i < m_model->rowCount(); ++i)
+    {
+        m_model->item(i, 0)->setEditable(false);
+        for (int j = 0; j < m_model->columnCount(); ++j)
+        {
+            m_model->item(i, j)->setTextAlignment(Qt::AlignCenter);
+        }
+    }
+}
+
+
+void WizardLettersDefPage::enableRemoveButton(const QItemSelection &iSelected)
+{
+    // Enable the "Remove" button iff at least one line in the tree view
+    // is selected
+    buttonRemoveLetter->setEnabled(!iSelected.indexes().empty());
+}
+
+
+void WizardLettersDefPage::removeLetter()
+{
+    QModelIndexList indexList = 
treeLetters->selectionModel()->selectedIndexes();
+    if (indexList.empty())
+        return;
+
+    // Warn the user of the consequences
+    QString msg = _q("If you remove this letter, the only way to play words "
+                     "containing this letter will be to use the joker tile(s). 
"
+                     "This might be wanted in some rare cases, but it is "
+                     "usually better to remove the words containing the "
+                     "unwanted letter from the word list.");
+    QMessageBox confoBox(QMessageBox::Warning, _q("Eliot"), msg,
+                         QMessageBox::Yes | QMessageBox::No, this);
+    confoBox.setInformativeText(_q("Do you really want to continue?"));
+    confoBox.setDefaultButton(QMessageBox::Yes);
+    confoBox.setEscapeButton(QMessageBox::No);
+    int ret = confoBox.exec();
+    if (ret != QMessageBox::Yes)
+        return;
+
+    m_model->removeRow(indexList.front().row());
+}
+
+
+bool WizardLettersDefPage::isComplete() const
+{
+    if (!QWizardPage::isComplete())
+        return false;
+
+    // TODO
+    return true;
+}
+
+
+// ---------- DicWizard ----------
+
+DicWizard::DicWizard(QWidget *parent)
+    : QWizard(parent)
+{
+    setOption(QWizard::IndependentPages);
+    addPage(new WizardInfoPage);
+    addPage(new WizardLettersDefPage());
+    // TODO
+}
+

Index: dic_wizard.h
===================================================================
RCS file: dic_wizard.h
diff -N dic_wizard.h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ dic_wizard.h        15 May 2010 12:13:36 -0000      1.1
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ * Eliot
+ * Copyright (C) 2010 Olivier Teulière
+ * Authors: Olivier Teulière <ipkiss @@ gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *****************************************************************************/
+
+#ifndef DIC_WIZARD_H_
+#define DIC_WIZARD_H_
+
+#include <QtGui/QWizard>
+#include <QtGui/QWizardPage>
+
+#include "ui/dic_wizard_info_page.ui.h"
+#include "ui/dic_wizard_letters_def_page.ui.h"
+
+class QStandardItemModel;
+class QItemSelection;
+
+class DicWizard: public QWizard
+{
+    Q_OBJECT;
+
+public:
+    DicWizard(QWidget *parent);
+
+private:
+    QWizardPage *createLettersDefPage() const;
+};
+
+
+class WizardInfoPage: public QWizardPage, private Ui::WizardInfoPage
+{
+    Q_OBJECT
+public:
+    explicit WizardInfoPage(QWidget *parent = 0);
+    virtual bool isComplete() const;
+    virtual bool validatePage();
+
+private slots:
+    void onBrowseGenDicClicked();
+    void onBrowseWordListClicked();
+};
+
+
+class WizardLettersDefPage: public QWizardPage, private 
Ui::WizardLettersDefPage
+{
+    Q_OBJECT
+public:
+    explicit WizardLettersDefPage(QWidget *parent = 0);
+    virtual bool isComplete() const;
+
+private:
+    QStandardItemModel *m_model;
+
+private slots:
+    void loadLettersFromWordList();
+    void enableRemoveButton(const QItemSelection &);
+    void removeLetter();
+};
+
+
+#endif
+

Index: ui/dic_wizard_info_page.ui
===================================================================
RCS file: ui/dic_wizard_info_page.ui
diff -N ui/dic_wizard_info_page.ui
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ ui/dic_wizard_info_page.ui  15 May 2010 12:13:37 -0000      1.1
@@ -0,0 +1,129 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>WizardInfoPage</class>
+ <widget class="QWizardPage" name="WizardInfoPage">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>592</width>
+    <height>565</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>WizardPage</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout">
+   <item row="2" column="0">
+    <widget class="QLabel" name="label_2">
+     <property name="text">
+      <string>_(&quot;Dictionary name:&quot;)</string>
+     </property>
+    </widget>
+   </item>
+   <item row="2" column="1">
+    <widget class="QLineEdit" name="editDicName"/>
+   </item>
+   <item row="5" column="1">
+    <widget class="QLineEdit" name="editGenDic">
+     <property name="minimumSize">
+      <size>
+       <width>300</width>
+       <height>0</height>
+      </size>
+     </property>
+    </widget>
+   </item>
+   <item row="5" column="2">
+    <widget class="QPushButton" name="buttonBrowseGenDic">
+     <property name="text">
+      <string>_(&quot;Browse...&quot;)</string>
+     </property>
+    </widget>
+   </item>
+   <item row="8" column="1">
+    <widget class="QLineEdit" name="editWordList"/>
+   </item>
+   <item row="8" column="2">
+    <widget class="QPushButton" name="buttonBrowseWordList">
+     <property name="text">
+      <string>_(&quot;Browse...&quot;)</string>
+     </property>
+    </widget>
+   </item>
+   <item row="10" column="1">
+    <spacer name="verticalSpacer">
+     <property name="orientation">
+      <enum>Qt::Vertical</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>20</width>
+       <height>40</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item row="1" column="0" colspan="3">
+    <widget class="QLabel" name="labelDicNameDesc">
+     <property name="text">
+      <string>Description 1</string>
+     </property>
+     <property name="wordWrap">
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+   <item row="4" column="0" colspan="3">
+    <widget class="QLabel" name="labelGenDicDesc">
+     <property name="text">
+      <string>Description 2</string>
+     </property>
+     <property name="wordWrap">
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+   <item row="7" column="0" colspan="3">
+    <widget class="QLabel" name="labelWordListDesc">
+     <property name="text">
+      <string>Description 3</string>
+     </property>
+     <property name="wordWrap">
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+   <item row="5" column="0">
+    <widget class="QLabel" name="label_3">
+     <property name="text">
+      <string>_(&quot;Generated dictionary:&quot;)</string>
+     </property>
+    </widget>
+   </item>
+   <item row="8" column="0">
+    <widget class="QLabel" name="label">
+     <property name="text">
+      <string>_(&quot;Word list:&quot;)</string>
+     </property>
+    </widget>
+   </item>
+   <item row="3" column="0" colspan="3">
+    <widget class="Line" name="line">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+    </widget>
+   </item>
+   <item row="6" column="0" colspan="3">
+    <widget class="Line" name="line_2">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>

Index: ui/dic_wizard_letters_def_page.ui
===================================================================
RCS file: ui/dic_wizard_letters_def_page.ui
diff -N ui/dic_wizard_letters_def_page.ui
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ ui/dic_wizard_letters_def_page.ui   15 May 2010 12:13:37 -0000      1.1
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>WizardLettersDefPage</class>
+ <widget class="QWizardPage" name="WizardLettersDefPage">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>507</width>
+    <height>501</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>WizardPage</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout">
+   <item>
+    <widget class="QLabel" name="labelTableDesc">
+     <property name="text">
+      <string>Description</string>
+     </property>
+     <property name="wordWrap">
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <layout class="QHBoxLayout" name="horizontalLayout">
+     <item>
+      <widget class="QPushButton" name="buttonLoadLetters">
+       <property name="text">
+        <string>_(&quot;Load letters from word list&quot;)</string>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer name="horizontalSpacer">
+       <property name="orientation">
+        <enum>Qt::Horizontal</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>40</width>
+         <height>20</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+     <item>
+      <widget class="QPushButton" name="buttonRemoveLetter">
+       <property name="enabled">
+        <bool>false</bool>
+       </property>
+       <property name="text">
+        <string>_(&quot;Remove Letter&quot;)</string>
+       </property>
+      </widget>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <widget class="QTreeView" name="treeLetters">
+     <property name="alternatingRowColors">
+      <bool>true</bool>
+     </property>
+     <property name="rootIsDecorated">
+      <bool>false</bool>
+     </property>
+     <property name="uniformRowHeights">
+      <bool>true</bool>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <widget class="QTableView" name="tableLetters">
+     <property name="editTriggers">
+      
<set>QAbstractItemView::AnyKeyPressed|QAbstractItemView::DoubleClicked|QAbstractItemView::EditKeyPressed|QAbstractItemView::SelectedClicked</set>
+     </property>
+     <property name="alternatingRowColors">
+      <bool>true</bool>
+     </property>
+     <property name="selectionMode">
+      <enum>QAbstractItemView::SingleSelection</enum>
+     </property>
+     <property name="selectionBehavior">
+      <enum>QAbstractItemView::SelectRows</enum>
+     </property>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>



reply via email to

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