~ubuntu-branches/ubuntu/quantal/kiten/quantal-proposed

« back to all changes in this revision

Viewing changes to lib/DictEdict/deinflection.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2011-12-16 13:14:44 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20111216131444-fxt8pt2pha54qmdu
Tags: 4:4.7.90-0ubuntu1
New upstream beta release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*****************************************************************************
 
2
 * This file is part of Kiten, a KDE Japanese Reference Tool                 *
 
3
 * Copyright (C) 2001 Jason Katz-Brown <jason@katzbrown.com>                 *
 
4
 * Copyright (C) 2006 Joseph Kerian <jkerian@gmail.com>                      *
 
5
 * Copyright (C) 2006 Eric Kjeldergaard <kjelderg@gmail.com>                 *
 
6
 * Copyright (C) 2011 Daniel E. Moctezuma <democtezuma@gmail.com>            *
 
7
 *                                                                           *
 
8
 * This library is free software; you can redistribute it and/or             *
 
9
 * modify it under the terms of the GNU Library General Public               *
 
10
 * License as published by the Free Software Foundation; either              *
 
11
 * version 2 of the License, or (at your option) any later version.          *
 
12
 *                                                                           *
 
13
 * This library is distributed in the hope that it will be useful,           *
 
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of            *
 
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
 
16
 * Library General Public License for more details.                          *
 
17
 *                                                                           *
 
18
 * You should have received a copy of the GNU Library General Public License *
 
19
 * along with this library; see the file COPYING.LIB.  If not, write to      *
 
20
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,      *
 
21
 * Boston, MA 02110-1301, USA.                                               *
 
22
 *****************************************************************************/
 
23
 
 
24
#ifndef KITEN_DEINFLECTION_H
 
25
#define KITEN_DEINFLECTION_H
 
26
 
 
27
#include <QStringList>
 
28
 
 
29
#include "dictfile.h"
 
30
 
 
31
class DictQuery;
 
32
class EntryEdict;
 
33
class EntryList;
 
34
class QString;
 
35
 
 
36
class Deinflection
 
37
{
 
38
  public:
 
39
                Deinflection( const QString name );
 
40
 
 
41
    QString    *getDeinflectionLabel();
 
42
    QString    *getWordType();
 
43
    EntryList  *search( const DictQuery &query, const QVector<QString> &preliminaryResults );
 
44
    bool        load();
 
45
 
 
46
  private:
 
47
    struct Conjugation
 
48
    {
 
49
      //The ending we are replacing
 
50
      QString ending;
 
51
      //The replacement (dictionary form) ending
 
52
      QString replace;
 
53
      //What this type of replacement is called
 
54
      QString label;
 
55
    };
 
56
 
 
57
    EntryEdict *makeEntry( QString entry );
 
58
 
 
59
    static QList<Conjugation> *conjugationList;
 
60
 
 
61
    QString                    m_deinflectionLabel;
 
62
    QString                    m_wordType;
 
63
    const QString              m_dictionaryName;
 
64
};
 
65
 
 
66
#endif