File indexing completed on 2024-09-15 03:28:21
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 RADICAL_H 0009 #define RADICAL_H 0010 0011 #include <QSet> 0012 #include <QString> 0013 0014 class Radical 0015 { 0016 public: 0017 Radical(); 0018 explicit Radical(const QString &irad, unsigned int strokes = 0, unsigned int index = 0); 0019 0020 QString toString() const; 0021 0022 const QSet<QString> &getKanji() const; 0023 void addKanji(const QSet<QString> &newKanji); 0024 unsigned int strokes() const; 0025 0026 static bool compareIndices(const Radical &a, const Radical &b); 0027 static bool compareFrequencies(const Radical &a, const Radical &b); 0028 0029 protected: 0030 QString string; 0031 unsigned int strokeCount; 0032 unsigned int idx; 0033 QSet<QString> kanji; 0034 QSet<QString> components; 0035 }; 0036 0037 #endif