1
/*****************************************************************************
2
* This file is part of Kiten, a KDE Japanese Reference Tool *
3
* Copyright (C) 2006 Joseph Kerian <jkerian@gmail.com> *
4
* Copyright (C) 2006 Eric Kjeldergaard <kjelderg@gmail.com> *
6
* This library is free software; you can redistribute it and/or *
7
* modify it under the terms of the GNU Library General Public *
8
* License as published by the Free Software Foundation; either *
9
* version 2 of the License, or (at your option) any later version. *
11
* This library is distributed in the hope that it will be useful, *
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
14
* Library General Public License for more details. *
16
* You should have received a copy of the GNU Library General Public License *
17
* along with this library; see the file COPYING.LIB. If not, write to *
18
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, *
19
* Boston, MA 02110-1301, USA. *
20
*****************************************************************************/
22
#include "entrydeinflect.h"
28
EntryDeinflect::EntryDeinflect( const QString &correction
31
, const QString &matchedEnding )
32
: Entry( QString( "Deinflect" ) )
33
, m_correction( correction )
34
, m_matchedEnding( matchedEnding )
40
EntryDeinflect::EntryDeinflect( const EntryDeinflect &old )
42
, m_correction( old.m_correction )
43
, m_type( old.m_type )
44
, m_index( old.m_index )
48
EntryDeinflect* EntryDeinflect::clone() const
50
return new EntryDeinflect( *this );
53
QString EntryDeinflect::dumpEntry() const
58
bool EntryDeinflect::loadEntry( const QString &entry )
63
bool EntryDeinflect::matchesQuery( const DictQuery &query ) const
65
return query.toString().contains( m_matchedEnding );
68
QString EntryDeinflect::toHTML() const
70
return QString( "<div class=\"Deinflect\">" )
71
+ i18n( "Possible de-conjugation %1 as %2", makeLink( m_correction ), m_type )