BibleTime
Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
BtModuleIndexDialog Class Reference

#include <btmoduleindexdialog.h>

Inheritance diagram for BtModuleIndexDialog:

Static Public Member Functions

static bool indexAllModules (QList< CSwordModuleInfo * > const &modules)
 

Private Member Functions

 BtModuleIndexDialog (int numModules)
 
bool indexAllModulesPrivate (QList< CSwordModuleInfo * > const &modules)
 

Private Attributes

int m_currentModuleIndex
 

Detailed Description

This dialog is used to index a list of modules and to show progress for that. While the indexing is in progress it creates a blocking, top level dialog which shows the progress while the indexing is done.

Definition at line 25 of file btmoduleindexdialog.h.

Constructor & Destructor Documentation

◆ BtModuleIndexDialog()

BtModuleIndexDialog::BtModuleIndexDialog ( int  numModules)
private

Definition at line 35 of file btmoduleindexdialog.cpp.

Member Function Documentation

◆ indexAllModules()

bool BtModuleIndexDialog::indexAllModules ( QList< CSwordModuleInfo * > const &  modules)
static

Creates and shows the indexing progress dialog and starts the actual indexing. It shows the dialog with progress information. In case indexing some module is unsuccessful or cancelled, any indices that were created for other given modules are deleted. After indexing, the dialog is closed.

Parameters
[in]modulesThe list of modules to index.
Precondition
all given modules are unindexed
Returns
whether the indexing was finished successfully.

Definition at line 25 of file btmoduleindexdialog.cpp.

References indexAllModulesPrivate().

Referenced by BtIndexDialog::createIndices(), and Search::CSearchDialog::startSearch().

◆ indexAllModulesPrivate()

bool BtModuleIndexDialog::indexAllModulesPrivate ( QList< CSwordModuleInfo * > const &  modules)
private

Shows the indexing progress dialog and starts the actual indexing. It shows the dialog with progress information. In case indexing some module is unsuccessful or cancelled, any indices that were created for other given modules are deleted. After indexing, the dialog is closed.

Parameters
[in]modulesThe list of modules to index.
Precondition
all given modules are unindexed
Returns
whether the indexing was finished successfully.

Definition at line 44 of file btmoduleindexdialog.cpp.

References BT_ASSERT, BT_CONNECT, BT_DEBUG_ONLY, CSwordModuleInfo::indexingFinished(), CSwordModuleInfo::indexingProgress(), m_currentModuleIndex, r(), and message::showWarning().

Referenced by indexAllModules().

Member Data Documentation

◆ m_currentModuleIndex

int BtModuleIndexDialog::m_currentModuleIndex
private

Definition at line 59 of file btmoduleindexdialog.h.

Referenced by indexAllModulesPrivate().


The documentation for this class was generated from the following files: