File indexing completed on 2022-11-29 18:12:55

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 <QSet>
0012 #include <QString>
0013 
0014 #include "radical.h"
0015 
0016 class Kanji : public QString
0017 {
0018   public:
0019                          Kanji();
0020     explicit             Kanji(  const QString &kanji
0021                                , const QSet<QString> &radicals );
0022 
0023     void                 addRadical( const QString &it );
0024     void                 setStrokes( unsigned int strokes );
0025     const QSet<QString>& getRadicals() const;
0026     unsigned int         strokes() const;
0027 
0028     bool operator<( const Kanji &other ) const;
0029 
0030   protected:
0031     unsigned int  strokeCount;
0032     QSet<QString> components;
0033 };
0034 
0035 #endif