File indexing completed on 2024-04-21 03:48:23

0001 /*
0002  * scan a group of KVTML documents to get information from them
0003  * SPDX-FileCopyrightText: 2007 Jeremy Whiting <jpwhiting@kde.org>
0004  * SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #ifndef SHAREDKVTMLFILES_H
0008 #define SHAREDKVTMLFILES_H
0009 
0010 #include "keduvocdocument_export.h"
0011 
0012 #include <QStringList>
0013 
0014 /**
0015  *namespace and singleton class to scan groups of kvtml files
0016  *from shared kvtml location, and give information
0017  *about files found there
0018  *@author Jeremy Whiting
0019  */
0020 namespace SharedKvtmlFiles
0021 {
0022 /** get list of all languages found in any files */
0023 KEDUVOCDOCUMENT_EXPORT QStringList languages();
0024 
0025 /** get list of filenames found of given language
0026  *@param language language requested QString() for all languages
0027  *@return a list of filenames with words in language
0028  */
0029 KEDUVOCDOCUMENT_EXPORT QStringList fileNames(const QString &language = QString());
0030 
0031 /** get the list of document titles found of a given language
0032  *@param language requested language QString() for all titles
0033  *@return a list of document titles with words in language
0034  */
0035 KEDUVOCDOCUMENT_EXPORT QStringList titles(const QString &language = QString());
0036 
0037 /** get the list of document remarks found of a given language
0038  *@param language requested language QString() for all comments
0039  *@return a list of document remarks with words in language
0040  */
0041 KEDUVOCDOCUMENT_EXPORT QStringList comments(const QString &language = QString());
0042 
0043 /** rescan the shared kvtml locations */
0044 KEDUVOCDOCUMENT_EXPORT void rescan();
0045 
0046 /** sort files downloaded to kvtml top-level dir into locale sub-folders */
0047 KEDUVOCDOCUMENT_EXPORT void sortDownloadedFiles();
0048 }
0049 
0050 #endif