kiten/lib
dictFileEdict.h
Go to the documentation of this file.00001 /* This file is part of Kiten, a KDE Japanese Reference Tool... 00002 Copyright (C) 2001 Jason Katz-Brown <jason@katzbrown.com> 00003 (C) 2006 Joseph Kerian <jkerian@gmail.com> 00004 (C) 2006 Eric Kjeldergaard <kjelderg@gmail.com> 00005 00006 This library is free software; you can redistribute it and/or 00007 modify it under the terms of the GNU Library General Public 00008 License as published by the Free Software Foundation; either 00009 version 2 of the License, or (at your option) any later version. 00010 00011 This library is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 Library General Public License for more details. 00015 00016 You should have received a copy of the GNU Library General Public License 00017 along with this library; see the file COPYING.LIB. If not, write to 00018 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00019 Boston, MA 02110-1301, USA. 00020 */ 00021 00022 #ifndef KITEN_DICTFILEEDICT_H_ 00023 #define KITEN_DICTFILEEDICT_H_ 00024 00025 #include <config-kiten.h> 00026 00027 #include "dictFile.h" 00028 #include "indexedEDICTFile.h" 00029 #include "linearEDICTFile.h" 00030 00031 #include <sys/types.h> 00032 #include <QtCore/QFile> 00033 #include <QtCore/QMap> 00034 00035 class QString; 00036 class QByteArray; 00037 class QStringList; 00038 00039 class DictQuery; 00040 class DictionaryPreferenceDialog; 00041 class KConfigSkeleton; 00042 class KConfigSkeletonItem; 00043 00044 #include "entryEdict.h" 00045 00046 class /* NO_EXPORT */ dictFileEdict : public dictFile { 00047 public: 00048 dictFileEdict(); 00049 virtual ~dictFileEdict(); 00050 00051 virtual bool validDictionaryFile(const QString &filename); 00052 bool validQuery(const DictQuery &query); 00053 00054 bool loadDictionary(const QString &file, const QString &name); 00055 00056 virtual EntryList *doSearch(const DictQuery &query); 00057 virtual QStringList listDictDisplayOptions(QStringList) const; 00058 00059 virtual DictionaryPreferenceDialog *preferencesWidget(KConfigSkeleton*,QWidget *parent=NULL); 00060 00061 virtual void loadSettings(KConfigSkeleton*); 00062 00063 protected: 00064 virtual QMap<QString,QString> displayOptions() const; 00065 QStringList *loadListType(KConfigSkeletonItem *, QStringList *, 00066 const QMap<QString,QString> &); 00067 //This is a blatant abuse of protected methods to make the kanji subclass easy 00068 virtual inline Entry *makeEntry(QString x) { return new EntryEDICT(getName(),x); } 00069 00070 linearEDICTFile m_file; 00071 static QStringList *displayFields; 00072 00073 friend class EntryEDICT; 00074 }; 00075 00076 #endif
KDE 4.2 API Reference