BibleTime
btmoduleindexdialog.h
Go to the documentation of this file.
1 /*********
2 *
3 * In the name of the Father, and of the Son, and of the Holy Spirit.
4 *
5 * This file is part of BibleTime's source code, https://bibletime.info/
6 *
7 * Copyright 1999-2021 by the BibleTime developers.
8 * The BibleTime source code is licensed under the GNU General Public License
9 * version 2.0.
10 *
11 **********/
12 
13 #pragma once
14 
15 #include <QProgressDialog>
16 
17 
18 class CSwordModuleInfo;
19 
20 /**
21  This dialog is used to index a list of modules and to show progress for that.
22  While the indexing is in progress it creates a blocking, top level dialog
23  which shows the progress while the indexing is done.
24 */
26 
27  Q_OBJECT
28 
29 public: // methods:
30 
31  /**
32  Creates and shows the indexing progress dialog and starts the actual
33  indexing. It shows the dialog with progress information. In case indexing
34  some module is unsuccessful or cancelled, any indices that were created
35  for other given modules are deleted. After indexing, the dialog is closed.
36  \param[in] modules The list of modules to index.
37  \pre all given modules are unindexed
38  \returns whether the indexing was finished successfully.
39  */
40  static bool indexAllModules(QList<CSwordModuleInfo *> const & modules);
41 
42 private: // methods:
43 
44  BtModuleIndexDialog(int numModules);
45 
46  /**
47  Shows the indexing progress dialog and starts the actual indexing. It
48  shows the dialog with progress information. In case indexing some module
49  is unsuccessful or cancelled, any indices that were created for other
50  given modules are deleted. After indexing, the dialog is closed.
51  \param[in] modules The list of modules to index.
52  \pre all given modules are unindexed
53  \returns whether the indexing was finished successfully.
54  */
56 
57 private: // fields:
58 
60 
61 };
BtModuleIndexDialog(int numModules)
bool indexAllModulesPrivate(QList< CSwordModuleInfo * > const &modules)
static bool indexAllModules(QList< CSwordModuleInfo * > const &modules)