BibleTime
Signals | Public Member Functions | Protected Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
BtInstallThread Class Reference

#include <btinstallthread.h>

Inheritance diagram for BtInstallThread:

Signals

void downloadStarted (int moduleIndex)
 
void installCompleted (int moduleIndex, bool success)
 
void preparingInstall (int moduleIndex)
 
void statusUpdated (int moduleIndex, int progressPercent)
 

Public Member Functions

 BtInstallThread (const QList< CSwordModuleInfo * > &modules, const QString &destination, QObject *const parent=nullptr)
 
void stopInstall ()
 

Protected Member Functions

void run () override
 

Private Slots

void slotDownloadStarted ()
 
void slotManagerStatusUpdated (int totalProgress, int fileProgress)
 

Private Member Functions

void installModule ()
 
bool removeModule ()
 

Private Attributes

int m_currentModuleIndex = 0
 
const QString m_destination
 
BtInstallMgr m_iMgr
 
const QList< CSwordModuleInfo * > & m_modules
 
std::atomic< bool > m_stopRequested
 

Detailed Description

Definition at line 28 of file btinstallthread.h.

Constructor & Destructor Documentation

◆ BtInstallThread()

BtInstallThread::BtInstallThread ( const QList< CSwordModuleInfo * > &  modules,
const QString &  destination,
QObject *const  parent = nullptr 
)
inline

Member Function Documentation

◆ downloadStarted

void BtInstallThread::downloadStarted ( int  moduleIndex)
signal

Emitted when the first file download has been started.

Referenced by BtBookshelfInstallFinalPage::initializePage(), and slotDownloadStarted().

◆ installCompleted

void BtInstallThread::installCompleted ( int  moduleIndex,
bool  success 
)
signal

Emitted when installing is complete.

Referenced by BtBookshelfInstallFinalPage::initializePage(), and installModule().

◆ installModule()

void BtInstallThread::installModule ( )
private
Todo:
silently removing without undo if the user cancels the update is WRONG!!!

Definition at line 67 of file btinstallthread.cpp.

References installCompleted(), BtInstallBackend::isRemote(), m_currentModuleIndex, m_destination, m_iMgr, m_modules, m_stopRequested, CSwordModuleInfo::name(), preparingInstall(), removeModule(), BtInstallBackend::source(), and statusUpdated().

Referenced by run().

◆ preparingInstall

void BtInstallThread::preparingInstall ( int  moduleIndex)
signal

Emitted when starting the installation.

Referenced by BtBookshelfInstallFinalPage::initializePage(), and installModule().

◆ removeModule()

bool BtInstallThread::removeModule ( )
private

◆ run()

void BtInstallThread::run ( )
overrideprotected

◆ slotDownloadStarted

void BtInstallThread::slotDownloadStarted ( )
privateslot

Definition at line 113 of file btinstallthread.cpp.

References downloadStarted(), and m_currentModuleIndex.

Referenced by BtInstallThread().

◆ slotManagerStatusUpdated

void BtInstallThread::slotManagerStatusUpdated ( int  totalProgress,
int  fileProgress 
)
privateslot

Definition at line 109 of file btinstallthread.cpp.

References m_currentModuleIndex, and statusUpdated().

Referenced by BtInstallThread().

◆ statusUpdated

void BtInstallThread::statusUpdated ( int  moduleIndex,
int  progressPercent 
)
signal

Emitted when the install progress status is updated.

Referenced by BtBookshelfInstallFinalPage::initializePage(), installModule(), and slotManagerStatusUpdated().

◆ stopInstall()

void BtInstallThread::stopInstall ( )
inline

Member Data Documentation

◆ m_currentModuleIndex

int BtInstallThread::m_currentModuleIndex = 0
private

◆ m_destination

const QString BtInstallThread::m_destination
private

Definition at line 84 of file btinstallthread.h.

Referenced by installModule(), removeModule(), and run().

◆ m_iMgr

BtInstallMgr BtInstallThread::m_iMgr
private

Definition at line 85 of file btinstallthread.h.

Referenced by BtInstallThread(), and installModule().

◆ m_modules

const QList<CSwordModuleInfo *>& BtInstallThread::m_modules
private

Definition at line 83 of file btinstallthread.h.

Referenced by installModule(), removeModule(), and run().

◆ m_stopRequested

std::atomic<bool> BtInstallThread::m_stopRequested
private

Definition at line 87 of file btinstallthread.h.

Referenced by installModule(), run(), and stopInstall().


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