Can get infinitive verb now.
authorNguyễn Hồng Quân <ng.hong.quan@gmail.com>
Sat, 27 Oct 2012 02:17:46 +0000 (09:17 +0700)
committerNguyễn Hồng Quân <ng.hong.quan@gmail.com>
Sat, 27 Oct 2012 02:21:56 +0000 (09:21 +0700)
gui/Makefile.am [new file with mode: 0644]
gui/Makefile.in [new file with mode: 0644]
gui/conjugation.cpp [new file with mode: 0644]
gui/conjugation.h [new file with mode: 0644]
mainwindow.cpp
mainwindow.h

diff --git a/gui/Makefile.am b/gui/Makefile.am
new file mode 100644 (file)
index 0000000..5add881
--- /dev/null
@@ -0,0 +1,27 @@
+# $Id: Makefile.am,v 1.2 2006/07/08 03:27:41 sarrazip Exp $
+
+localedir = $(datadir)/locale
+libdatadir = $(datadir)/$(PACKAGE)-$(API)
+
+noinst_LTLIBRARIES = libconjugation.la
+
+libconjugation_la_SOURCES = \
+       conjugation.cpp \
+       conjugation.h
+
+libconjugation_la_CXXFLAGS = \
+       $(LIBXML2_CFLAGS) \
+        -I$(top_srcdir)/src \
+       -DPACKAGE_FULL_NAME=\"$(PACKAGE_FULL_NAME)\" \
+       -DGETTEXT_PACKAGE=\"$(PACKAGE)\" \
+       -DLOCALEDIR=\"$(localedir)\" \
+       -DDATADIR=\"$(datadir)\" \
+       -DLIBDATADIR=\"$(libdatadir)\" \
+       -I../intl -I$(top_srcdir)/intl
+
+libconjugation_la_LIBADD = \
+       $(LIBXML2_LIBS) \
+        ../verbiste/libverbiste-$(API).la \
+       $(INTLLIBS) $(LIBS)
+
+MAINTAINERCLEANFILES = Makefile.in
diff --git a/gui/Makefile.in b/gui/Makefile.in
new file mode 100644 (file)
index 0000000..556de53
--- /dev/null
@@ -0,0 +1,606 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# $Id: Makefile.am,v 1.2 2006/07/08 03:27:41 sarrazip Exp $
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = src/gui
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/macros/ac_compile_warnings.m4 \
+       $(top_srcdir)/macros/ac_prog_perl_modules.m4 \
+       $(top_srcdir)/macros/codeset.m4 \
+       $(top_srcdir)/macros/getopt_long.m4 \
+       $(top_srcdir)/macros/gettext.m4 $(top_srcdir)/macros/glibc2.m4 \
+       $(top_srcdir)/macros/glibc21.m4 $(top_srcdir)/macros/iconv.m4 \
+       $(top_srcdir)/macros/intdiv0.m4 $(top_srcdir)/macros/intmax.m4 \
+       $(top_srcdir)/macros/inttypes-pri.m4 \
+       $(top_srcdir)/macros/inttypes.m4 \
+       $(top_srcdir)/macros/inttypes_h.m4 \
+       $(top_srcdir)/macros/isc-posix.m4 \
+       $(top_srcdir)/macros/lcmessage.m4 \
+       $(top_srcdir)/macros/lib-ld.m4 \
+       $(top_srcdir)/macros/lib-link.m4 \
+       $(top_srcdir)/macros/lib-prefix.m4 \
+       $(top_srcdir)/macros/libtool.m4 \
+       $(top_srcdir)/macros/longdouble.m4 \
+       $(top_srcdir)/macros/longlong.m4 \
+       $(top_srcdir)/macros/ltoptions.m4 \
+       $(top_srcdir)/macros/ltsugar.m4 \
+       $(top_srcdir)/macros/ltversion.m4 \
+       $(top_srcdir)/macros/lt~obsolete.m4 \
+       $(top_srcdir)/macros/nls.m4 $(top_srcdir)/macros/po.m4 \
+       $(top_srcdir)/macros/printf-posix.m4 \
+       $(top_srcdir)/macros/progtest.m4 \
+       $(top_srcdir)/macros/signed.m4 \
+       $(top_srcdir)/macros/size_max.m4 \
+       $(top_srcdir)/macros/stdint_h.m4 \
+       $(top_srcdir)/macros/uintmax_t.m4 \
+       $(top_srcdir)/macros/ulonglong.m4 \
+       $(top_srcdir)/macros/wchar_t.m4 $(top_srcdir)/macros/wint_t.m4 \
+       $(top_srcdir)/macros/xsize.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+       $(ACLOCAL_M4)
+mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+libconjugation_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \
+       ../verbiste/libverbiste-$(API).la $(am__DEPENDENCIES_1) \
+       $(am__DEPENDENCIES_1)
+am_libconjugation_la_OBJECTS = libconjugation_la-conjugation.lo
+libconjugation_la_OBJECTS = $(am_libconjugation_la_OBJECTS)
+libconjugation_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
+       $(libconjugation_la_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+       $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
+       $(LDFLAGS) -o $@
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+       $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+       $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+       --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+       $(LDFLAGS) -o $@
+SOURCES = $(libconjugation_la_SOURCES)
+DIST_SOURCES = $(libconjugation_la_SOURCES)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+AMTAR = @AMTAR@
+API = @API@
+APPLET_CATEGORY = @APPLET_CATEGORY@
+APPLET_CATEGORY_FR = @APPLET_CATEGORY_FR@
+APPLET_DESCRIPTION = @APPLET_DESCRIPTION@
+APPLET_DESCRIPTION_FR = @APPLET_DESCRIPTION_FR@
+APPLET_FULL_NAME = @APPLET_FULL_NAME@
+APPLET_FULL_NAME_FR = @APPLET_FULL_NAME_FR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+COPYRIGHT_YEARS = @COPYRIGHT_YEARS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+GENCAT = @GENCAT@
+GLIBC2 = @GLIBC2@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+GTK_CFLAGS = @GTK_CFLAGS@
+GTK_LIBS = @GTK_LIBS@
+GTK_MINVER = @GTK_MINVER@
+HAVE_ASPRINTF = @HAVE_ASPRINTF@
+HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
+HAVE_SNPRINTF = @HAVE_SNPRINTF@
+HAVE_WPRINTF = @HAVE_WPRINTF@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLBISON = @INTLBISON@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBGNOMEUI_CFLAGS = @LIBGNOMEUI_CFLAGS@
+LIBGNOMEUI_LIBS = @LIBGNOMEUI_LIBS@
+LIBGNOMEUI_MINVER = @LIBGNOMEUI_MINVER@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBOBJS = @LIBOBJS@
+LIBPANELAPPLET_CFLAGS = @LIBPANELAPPLET_CFLAGS@
+LIBPANELAPPLET_LIBS = @LIBPANELAPPLET_LIBS@
+LIBPANELAPPLET_MINVER = @LIBPANELAPPLET_MINVER@
+LIBS = @LIBS@
+LIBTOOL = @LIBTOOL@
+LIBXML2_CFLAGS = @LIBXML2_CFLAGS@
+LIBXML2_LIBS = @LIBXML2_LIBS@
+LIBXML2_MINVER = @LIBXML2_MINVER@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MANIFEST_TOOL = @MANIFEST_TOOL@
+MANUAL_DATE_EN = @MANUAL_DATE_EN@
+MANUAL_DATE_FR = @MANUAL_DATE_FR@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGMERGE = @MSGMERGE@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_FULL_NAME = @PACKAGE_FULL_NAME@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_SUMMARY_EN = @PACKAGE_SUMMARY_EN@
+PACKAGE_SUMMARY_FR = @PACKAGE_SUMMARY_FR@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POSUB = @POSUB@
+RANLIB = @RANLIB@
+RELEASE = @RELEASE@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+XMLLINT = @XMLLINT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_AR = @ac_ct_AR@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = $(datadir)/locale
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+libdatadir = $(datadir)/$(PACKAGE)-$(API)
+noinst_LTLIBRARIES = libconjugation.la
+libconjugation_la_SOURCES = \
+       conjugation.cpp \
+       conjugation.h
+
+libconjugation_la_CXXFLAGS = \
+       $(LIBXML2_CFLAGS) \
+        -I$(top_srcdir)/src \
+       -DPACKAGE_FULL_NAME=\"$(PACKAGE_FULL_NAME)\" \
+       -DGETTEXT_PACKAGE=\"$(PACKAGE)\" \
+       -DLOCALEDIR=\"$(localedir)\" \
+       -DDATADIR=\"$(datadir)\" \
+       -DLIBDATADIR=\"$(libdatadir)\" \
+       -I../intl -I$(top_srcdir)/intl
+
+libconjugation_la_LIBADD = \
+       $(LIBXML2_LIBS) \
+        ../verbiste/libverbiste-$(API).la \
+       $(INTLLIBS) $(LIBS)
+
+MAINTAINERCLEANFILES = Makefile.in
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .cpp .lo .o .obj
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+       @for dep in $?; do \
+         case '$(am__configure_deps)' in \
+           *$$dep*) \
+             ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+               && { if test -f $@; then exit 0; else break; fi; }; \
+             exit 1;; \
+         esac; \
+       done; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/gui/Makefile'; \
+       $(am__cd) $(top_srcdir) && \
+         $(AUTOMAKE) --gnu src/gui/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+       @case '$?' in \
+         *config.status*) \
+           cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+         *) \
+           echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+           cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+       esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure:  $(am__configure_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
+       cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-noinstLTLIBRARIES:
+       -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+       @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+         dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+         test "$$dir" != "$$p" || dir=.; \
+         echo "rm -f \"$${dir}/so_locations\""; \
+         rm -f "$${dir}/so_locations"; \
+       done
+libconjugation.la: $(libconjugation_la_OBJECTS) $(libconjugation_la_DEPENDENCIES) 
+       $(libconjugation_la_LINK)  $(libconjugation_la_OBJECTS) $(libconjugation_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+       -rm -f *.$(OBJEXT)
+
+distclean-compile:
+       -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libconjugation_la-conjugation.Plo@am__quote@
+
+.cpp.o:
+@am__fastdepCXX_TRUE@  $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $<
+
+.cpp.obj:
+@am__fastdepCXX_TRUE@  $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.cpp.lo:
+@am__fastdepCXX_TRUE@  $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $<
+
+libconjugation_la-conjugation.lo: conjugation.cpp
+@am__fastdepCXX_TRUE@  $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconjugation_la_CXXFLAGS) $(CXXFLAGS) -MT libconjugation_la-conjugation.lo -MD -MP -MF $(DEPDIR)/libconjugation_la-conjugation.Tpo -c -o libconjugation_la-conjugation.lo `test -f 'conjugation.cpp' || echo '$(srcdir)/'`conjugation.cpp
+@am__fastdepCXX_TRUE@  $(am__mv) $(DEPDIR)/libconjugation_la-conjugation.Tpo $(DEPDIR)/libconjugation_la-conjugation.Plo
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     source='conjugation.cpp' object='libconjugation_la-conjugation.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@     DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCXX_FALSE@ $(LIBTOOL)  --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libconjugation_la_CXXFLAGS) $(CXXFLAGS) -c -o libconjugation_la-conjugation.lo `test -f 'conjugation.cpp' || echo '$(srcdir)/'`conjugation.cpp
+
+mostlyclean-libtool:
+       -rm -f *.lo
+
+clean-libtool:
+       -rm -rf .libs _libs
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+       list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       mkid -fID $$unique
+tags: TAGS
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       set x; \
+       here=`pwd`; \
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       shift; \
+       if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+         test -n "$$unique" || unique=$$empty_fix; \
+         if test $$# -gt 0; then \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             "$$@" $$unique; \
+         else \
+           $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+             $$unique; \
+         fi; \
+       fi
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+               $(TAGS_FILES) $(LISP)
+       list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
+       unique=`for i in $$list; do \
+           if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+         done | \
+         $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+             END { if (nonempty) { for (i in files) print i; }; }'`; \
+       test -z "$(CTAGS_ARGS)$$unique" \
+         || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+            $$unique
+
+GTAGS:
+       here=`$(am__cd) $(top_builddir) && pwd` \
+         && $(am__cd) $(top_srcdir) \
+         && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+       -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+       @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+       list='$(DISTFILES)'; \
+         dist_files=`for file in $$list; do echo $$file; done | \
+         sed -e "s|^$$srcdirstrip/||;t" \
+             -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+       case $$dist_files in \
+         */*) $(MKDIR_P) `echo "$$dist_files" | \
+                          sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+                          sort -u` ;; \
+       esac; \
+       for file in $$dist_files; do \
+         if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+         if test -d $$d/$$file; then \
+           dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+           fi; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+         else \
+           test -f "$(distdir)/$$file" \
+           || cp -p $$d/$$file "$(distdir)/$$file" \
+           || exit 1; \
+         fi; \
+       done
+check-am: all-am
+check: check-am
+all-am: Makefile $(LTLIBRARIES)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+       @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+       $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+         `test -z '$(STRIP)' || \
+           echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+       -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+       @echo "This command is intended for maintainers to use"
+       @echo "it deletes files that may require special tools to rebuild."
+       -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+       mostlyclean-am
+
+distclean: distclean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+       distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+       -rm -rf ./$(DEPDIR)
+       -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+       mostlyclean-libtool
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+       clean-libtool clean-noinstLTLIBRARIES ctags distclean \
+       distclean-compile distclean-generic distclean-libtool \
+       distclean-tags distdir dvi dvi-am html html-am info info-am \
+       install install-am install-data install-data-am install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-pdf install-pdf-am install-ps install-ps-am \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
+       pdf pdf-am ps ps-am tags uninstall uninstall-am
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/gui/conjugation.cpp b/gui/conjugation.cpp
new file mode 100644 (file)
index 0000000..ab4013a
--- /dev/null
@@ -0,0 +1,203 @@
+/*  $Id: conjugation.cpp,v 1.12 2011/01/25 02:29:44 sarrazip Exp $
+    conjugation.cpp - Generic conjugation interface
+
+    verbiste - French conjugation system
+    Copyright (C) 2003-2006 Pierre Sarrazin <http://sarrazip.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., 59 Temple Place - Suite 330, Boston, MA
+    02111-1307, USA.
+*/
+
+#include "conjugation.h"
+
+#include <libintl.h>
+#define _(x) gettext(x)
+#define N_(x) (x)
+
+#include <iostream>
+#include <string.h>
+
+using namespace std;
+using namespace verbiste;
+
+
+void
+getConjugation(const FrenchVerbDictionary &fvd,
+                        const string &infinitive,
+                        const string &tname,
+                        VVVS &dest,
+                        bool includePronouns)
+{
+    const TemplateSpec *templ = fvd.getTemplate(tname);
+    if (templ == NULL)
+        return;
+
+    try
+    {
+        static const struct { Mode m; Tense t; } table[] =
+        {
+            { INFINITIVE_MODE, PRESENT_TENSE },
+            { INDICATIVE_MODE, PRESENT_TENSE },
+            { INDICATIVE_MODE, IMPERFECT_TENSE },
+            { INDICATIVE_MODE, FUTURE_TENSE },
+            { INDICATIVE_MODE, PAST_TENSE },
+            { CONDITIONAL_MODE, PRESENT_TENSE },
+            { SUBJUNCTIVE_MODE, PRESENT_TENSE },
+            { SUBJUNCTIVE_MODE, IMPERFECT_TENSE },
+            { IMPERATIVE_MODE, PRESENT_TENSE },
+            { PARTICIPLE_MODE, PRESENT_TENSE },
+            { PARTICIPLE_MODE, PAST_TENSE },
+            { GERUND_MODE, PRESENT_TENSE },  // italian only
+            { INVALID_MODE, INVALID_TENSE }  // marks the end
+        };
+
+
+        string radical = FrenchVerbDictionary::getRadical(infinitive, tname);
+
+        bool isItalian = (fvd.getLanguage() == FrenchVerbDictionary::ITALIAN);
+
+        for (int j = 0; table[j].m != INVALID_MODE; j++)
+        {
+            if (table[j].m == GERUND_MODE && !isItalian)
+                continue;
+
+            dest.push_back(VVS());
+            VVS &tenseDest = dest.back();
+
+            VVS conjug;
+            fvd.generateTense(radical, *templ, table[j].m, table[j].t, conjug,
+                                includePronouns,
+                                fvd.isVerbStartingWithAspirateH(infinitive),
+                                isItalian);
+
+            for (VVS::const_iterator p = conjug.begin(); p != conjug.end(); p++)
+            {
+                tenseDest.push_back(VS());
+                for (VS::const_iterator i = p->begin(); i != p->end(); i++)
+                {
+                    string s = *i;
+                    tenseDest.back().push_back(s);
+                }
+            }
+        }
+    }
+    catch (logic_error &e)
+    {
+        dest.clear();
+        return;
+    }
+}
+
+
+static const char *tn[16] =
+{
+    N_("inf. pres."),
+    "",
+    "",
+    "",
+    N_("ind. pres."),
+    N_("ind. imperf."),
+    N_("ind. fut."),
+    N_("ind. past"),
+    N_("cond. pres."),
+    N_("subj. pres."),
+    N_("subj. imperf."),
+    "",
+    N_("imp. pres."),
+    N_("part. pres."),
+    N_("part. past"),
+    N_("gerund pres."),  // italian only
+};
+
+
+string getTenseNameForTableCell(int row, int col, bool isItalian)
+{
+    if (row < 0 || row > 3 || col < 0 || col > 3)
+    {
+        assert(false);
+        return "";
+    }
+
+    if (row == 3 && col == 3 && !isItalian)
+        return string();
+
+    return _(tn[row * 4 + col]);
+}
+
+
+static
+string
+removePronoun(const string &s)
+{
+    string::size_type start = 0;
+    if (s.find("que ") == 0)
+        start = 4;
+    else if (s.find("qu'") == 0)
+        start = 3;
+    else if (s.find("che ") == 0)  // Italian
+        start = 4;
+
+    static const char *pronouns[] =
+    {
+        "je ", "j'", "tu ", "il ", "nous ", "vous ", "ils ",
+        "io ", "tu ", "egli ", "noi ", "voi ", "essi ",  // Italian
+        NULL
+    };
+
+    for (size_t i = 0; pronouns[i] != NULL; i++)
+    {
+        size_t len = strlen(pronouns[i]);
+        if (s.find(pronouns[i], start) == start)
+        {
+            start += len;
+            break;
+        }
+    }
+
+    return string(s, start, string::npos);
+}
+
+
+string
+createTableCellText(verbiste::FrenchVerbDictionary &fvd,
+                    const VVS &tense,
+                    const string &lowerCaseUTF8UserText,
+                    const string &openMark,
+                    const string &closeMark)
+{
+    string userTextWOAccents = fvd.removeUTF8Accents(lowerCaseUTF8UserText);
+
+    string persons;
+    for (VVS::const_iterator it = tense.begin(); it != tense.end(); it++)
+    {
+        const VS &person = *it;
+
+        if (it != tense.begin())
+            persons += "\n";
+
+        for (VS::const_iterator i = person.begin(); i != person.end(); i++)
+        {
+            if (i != person.begin())
+                persons += ", ";
+
+            string inflection = fvd.removeUTF8Accents(removePronoun(*i));
+            if (inflection == userTextWOAccents)
+                persons += openMark + *i + closeMark;
+            else
+                persons += *i;
+        }
+    }
+    return persons;
+}
diff --git a/gui/conjugation.h b/gui/conjugation.h
new file mode 100644 (file)
index 0000000..f940a3c
--- /dev/null
@@ -0,0 +1,98 @@
+/*  $Id: conjugation.h,v 1.12 2011/01/08 19:07:36 sarrazip Exp $
+    conjugation.h - Generic conjugation interface
+
+    verbiste - French conjugation system
+    Copyright (C) 2003-2006 Pierre Sarrazin <http://sarrazip.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., 59 Temple Place - Suite 330, Boston, MA
+    02111-1307, USA.
+*/
+
+#ifndef _H_conjugation
+#define _H_conjugation
+
+#include <verbiste/FrenchVerbDictionary.h>
+
+#include <vector>
+#include <string>
+
+typedef std::vector<std::string> VS;
+typedef std::vector<VS> VVS;
+typedef std::vector<VVS> VVVS;
+
+
+
+/** Obtains the conjugation of the given infinitive.
+    @param  fvd             verb dictionary from which to obtain
+                            the conjugation
+    @param  infinitive      UTF-8 string containing the infinitive form
+                            of the verb to conjugate (e.g., "manger")
+    @param  tname           conjugation template name to use (e.g., "aim:er")
+    @param  dest            structure into which the conjugated is written
+    @param  includePronouns put pronouns before conjugated verbs in the
+                            modes where pronouns are used
+*/
+void getConjugation(const verbiste::FrenchVerbDictionary &fvd,
+                        const std::string &infinitive,
+                        const std::string &tname,
+                        VVVS &dest,
+                        bool includePronouns = false);
+
+
+/** Get the tense name for a certain cell of the conjugation table.
+    The conjugation table is a 4x4 grid and 11 of the 16 cells are
+    used by the tenses to be displayed.
+    @param      row             row number (0..3)
+    @param      col             column number (0..3)
+    @param      isItalian       language used (true for Italian, false for French)
+    @returns            an internationalized (and possibly abbreviated) name
+                        (in UTF-8) for the tense that goes in the cell
+                        designated by row and col;
+                        the returned string is empty if no tense (in the
+                        language used) goes in the designated cell
+*/
+std::string getTenseNameForTableCell(int row, int col, bool isItalian);
+
+
+/** Composes the text of the conjugation in a certain tense.
+    The words of this conjugation that match a certain user text
+    are marked specially.
+
+    @param        tense                 structure that represents a certain
+                                        tense of a certain verb
+    @param        lowerCaseUTF8UserText conjugated verb as entered by the
+                                        user, but converted to lower-case,
+                                        and assumed to be in UTF-8
+    @param        openMark              ASCII string to be used before verbs
+                                        that match lowerCaseUTF8UserText
+                                        (e.g., "<b>")
+    @param        closeMark             ASCII string to be used after verbs
+                                        that match lowerCaseUTF8UserText
+                                        (e.g., "</b>")
+    @returns                            a UTF-8 string containing several
+                                        lines of text, each line being
+                                        separated by a newline ('\n')
+                                        character; the string does not end
+                                        the last line with a newline however;
+                                        e.g., "aie\nayons\nayez"
+*/
+std::string createTableCellText(verbiste::FrenchVerbDictionary &fvd,
+                                const VVS &tense,
+                                const std::string &lowerCaseUTF8UserText,
+                                const std::string &openMark,
+                                const std::string &closeMark);
+
+
+#endif  /* _H_conjugation */
index 31fed0c..c88c514 100644 (file)
@@ -1,5 +1,6 @@
 #include "mainwindow.h"
 #include "ui_mainwindow.h"
 #include "mainwindow.h"
 #include "ui_mainwindow.h"
+#include "gui/conjugation.h"
 
 #include <QtCore/QCoreApplication>
 
 
 #include <QtCore/QCoreApplication>
 
@@ -110,28 +111,53 @@ void MainWindow::showExpanded()
 
 void MainWindow::startLookup()
 {
 
 void MainWindow::startLookup()
 {
-    const std::set<std::string> *templateSet = NULL;
     QString input = wordinput->text();
     QString input = wordinput->text();
-    labVerb->setText(input);
+
     FrenchVerbDictionary::Language lang = FrenchVerbDictionary::parseLanguageCode(langCode);
     if (lang != FrenchVerbDictionary::FRENCH)
     {
     FrenchVerbDictionary::Language lang = FrenchVerbDictionary::parseLanguageCode(langCode);
     if (lang != FrenchVerbDictionary::FRENCH)
     {
-        //wordinput->setText(QString("Fr"));
+        // TODO: If lang code is not supported?
     }
     }
+
+    /* Create verb dictionary, accept non-accent input */
+    freVerbDic = new FrenchVerbDictionary(true);
+
+    /* Get input word to look up */
+    const std::string word = input.toLower().toUtf8().constData();
+
     /*
     /*
-    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);
-       }
+     *  For each possible deconjugation, take the infinitive form and
+     *  obtain its complete conjugation.
+     */
+    std::vector<InflectionDesc> v;
+    bool includePronouns = FALSE;    // TODO: Will get this value from external
+
+    freVerbDic->deconjugate(word, v);
+
+    std::string prevUTF8Infinitive, prevTemplateName;
+    for (std::vector<InflectionDesc>::const_iterator it = v.begin();
+         it != v.end(); it++)
+    {
+        const InflectionDesc &d = *it;
+        VVVS conjug;
+        getConjugation(freVerbDic, d.infinitive, d.templateName, conjug, includePronouns);
+
+        if (conjug.size() == 0           // if no tenses
+            || conjug[0].size() == 0     // if no infinitive tense
+            || conjug[0][0].size() == 0  // if no person in inf. tense
+            || conjug[0][0][0].empty())  // if infinitive string empty
+        {
+            continue;
+        }
+
+        std::string utf8Infinitive = conjug[0][0][0];
+        if (utf8Infinitive == prevUTF8Infinitive && d.templateName == prevTemplateName)
+            // This result is duplicated
+            continue;
+
+        /* Show on GUI */
+        labVerb->setText(QString::fromUtf8(utf8Infinitive.c_str()));
+    }
 }
 
 void  MainWindow::initverbiste()
 }
 
 void  MainWindow::initverbiste()
index 476ecee..fec9694 100644 (file)
@@ -14,6 +14,7 @@
 #include <vector>
 #include <string.h>
 #include <verbiste/FrenchVerbDictionary.h>
 #include <vector>
 #include <string.h>
 #include <verbiste/FrenchVerbDictionary.h>
+#include "gui/conjugation.h"
 using namespace verbiste;
 
 namespace Ui {
 using namespace verbiste;
 
 namespace Ui {