export (TARGET.CAPABILITY)
export (LIBS)
export (QMAKE_EXTRA_TARGETS)
+export (installPrefix)
}
#endif
ui->setupUi(this);
setupcodedUI();
+ initverbiste();
}
void MainWindow::setupcodedUI()
void MainWindow::startLookup()
{
- QString text = wordinput->text();
- labVerb->setText(text);
+ const std::set<std::string> *templateSet = NULL;
+ QString input = wordinput->text();
+ labVerb->setText(input);
+ FrenchVerbDictionary::Language lang = FrenchVerbDictionary::parseLanguageCode(langCode);
+ if (lang != FrenchVerbDictionary::FRENCH)
+ {
+ //wordinput->setText(QString("Fr"));
+ }
+ /*
+ std::string conjFileName, verbsFileName;
+ FrenchVerbDictionary::getXMLFilenames(conjFileName, verbsFileName, lang);
+ */
+ freVerbDic = new FrenchVerbDictionary(false);
+ const std::string word = input.toUtf8().constData();
+ templateSet = &freVerbDic->getVerbTemplateSet(word);
+ for (std::set<std::string>::const_iterator it = templateSet->begin();
+ it != templateSet->end(); ++it)
+ {
+ const std::string &tname = *it;
+
+ FrenchVerbDictionary::getRadical(word, tname);
+ }
+}
+
+void MainWindow::initverbiste()
+{
+ langCode = "fr";
}
#include <QtGui/QScrollArea>
#include <QtGui/QLabel>
+/* Verbiste */
+#include <iostream>
+#include <vector>
+#include <string.h>
+#include <verbiste/FrenchVerbDictionary.h>
+using namespace verbiste;
+
namespace Ui {
class MainWindow;
}
void setOrientation(ScreenOrientation orientation);
void showExpanded();
+ void initverbiste();
public slots:
void startLookup();
QLineEdit *wordinput; // Word input
QPushButton *btnLookup; // Lookup button
QLabel *labVerb;
+ std::string langCode;
+ FrenchVerbDictionary *freVerbDic;
};
#endif // MAINWINDOW_H
# by adapting the examples below.
# file1.source = myfile
# dir1.source = mydir
-DEPLOYMENTFOLDERS = # file1 dir1
+DEPLOYMENTFOLDERS = xmldata # file1 dir1
+xmldata.source = data
symbian:TARGET.UID3 = 0xE214283E
verbiste/Trie.cpp \
verbiste/misc-types.cpp \
verbiste/FrenchVerbDictionary.cpp \
- verbiste/c-api.cpp
+ verbiste/c-api.cpp \
+ gui/conjugation.cpp
HEADERS += mainwindow.h \
verbiste/Trie.h \
verbiste/misc-types.h \
verbiste/FrenchVerbDictionary.h \
- verbiste/c-api.h
+ verbiste/c-api.h \
+ gui/conjugation.h
FORMS += mainwindow.ui
# Please do not modify the following two lines. Required for deployment.
verbiste/verbiste.dox \
verbiste/Makefile.in \
verbiste/Makefile.am \
- data/verbs-it.xml \
- data/verbs-fr.xml \
- data/verbs-el.xml \
- data/conjugation-it.xml \
- data/conjugation-fr.xml \
- data/conjugation-el.xml \
- data/check-data.pl
+ gui/Makefile.in \
+ gui/Makefile.am
# To build verbiste
unix: CONFIG += link_pkgconfig
unix: PKGCONFIG += libxml-2.0
-QMAKE_CXXFLAGS += -DLIBDATADIR=\\\"data\\\" -DICONV_CONST= -DVERBSFRXML=\\\"data/verbs-fr.xml\\\"
+
+DEFINES += ICONV_CONST=
+# installPrefix must be explicitly exported from deployment.pri first
+DEFINES += LIBDATADIR=\\\"$${installPrefix}/data\\\"