File indexing completed on 2022-09-27 12:25:39

0001 /*
0002     This file is part of Kiten, a KDE Japanese Reference Tool
0003     SPDX-FileCopyrightText: 2006 Joseph Kerian <jkerian@gmail.com>
0004 
0005     SPDX-License-Identifier: LGPL-2.0-or-later
0006 */
0007 
0008 #ifndef KANJI_H
0009 #define KANJI_H
0010 
0011 #include <QList>
0012 #include <QSet>
0013 #include <QString>
0014 
0015 #include "radical.h"
0016 
0017 class Kanji : public QString
0018 {
0019   public:
0020                          Kanji();
0021     explicit             Kanji(  const QString &kanji
0022                                , const QSet<QString> &radicals );
0023 
0024     void                 addRadical( const QString &it );
0025     void                 setStrokes( unsigned int strokes );
0026     const QSet<QString>& getRadicals() const;
0027     unsigned int         strokes() const;
0028 
0029     bool operator<( const Kanji &other ) const;
0030 
0031   protected:
0032     unsigned int  strokeCount;
0033     QSet<QString> components;
0034 };
0035 
0036 #endif