KVIrc 5.2.6
Developer APIs
KviPackageIOEngine Class Reference

This class is the base class engine to work with KVIrc package files. More...

#include <KviPackageIOEngine.h>

+ Inheritance diagram for KviPackageIOEngine:

Public Member Functions

KviPointerHashTable< QString, QByteArray > * binaryInfoFields ()
 Returns the binary info fields.
 
 KviPackageIOEngine ()
 Creates the I/O engine object.
 
const QString & lastError ()
 Returns the last error.
 
KviPointerHashTable< QString, QString > * stringInfoFields ()
 Returns the string info fields.
 
virtual ~KviPackageIOEngine ()
 Destroys the object.
 

Protected Member Functions

void hideProgressDialog ()
 Hides the progress dialog.
 
bool readError ()
 Sets the last error as read error.
 
void setLastError (const QString &szLastError)
 Sets the last error.
 
void showProgressDialog (const QString &szCaption, int iTotalSteps)
 Shows the progress dialog.
 
bool updateProgress (int iProgress, const QString &szLabel)
 Updates the progress dialog.
 
bool writeError ()
 Sets the last error as write error.
 

Private Attributes

KviPointerHashTable< QString, QByteArray > * m_pBinaryInfoFields
 
QProgressDialog * m_pProgressDialog
 
QLabel * m_pProgressDialogLabel = nullptr
 
KviPointerHashTable< QString, QString > * m_pStringInfoFields
 
QString m_szLastError
 

Detailed Description

This class is the base class engine to work with KVIrc package files.

Constructor & Destructor Documentation

◆ KviPackageIOEngine()

KviPackageIOEngine::KviPackageIOEngine ( )

◆ ~KviPackageIOEngine()

KviPackageIOEngine::~KviPackageIOEngine ( )
virtual

Destroys the object.

References m_pBinaryInfoFields, m_pProgressDialog, and m_pStringInfoFields.

Member Function Documentation

◆ binaryInfoFields()

KviPointerHashTable< QString, QByteArray > * KviPackageIOEngine::binaryInfoFields ( )
inline

◆ hideProgressDialog()

void KviPackageIOEngine::hideProgressDialog ( )
protected

Hides the progress dialog.

Returns
void

References m_pProgressDialog.

Referenced by KviPackageWriter::pack(), and KviPackageReader::unpack().

◆ lastError()

const QString & KviPackageIOEngine::lastError ( )
inline

Returns the last error.

Returns
const QString &

Referenced by AddonFunctions::pack().

◆ readError()

bool KviPackageIOEngine::readError ( )
protected

Sets the last error as read error.

This is a shortcut to setLastError()

Returns
bool

References __tr2qs, and setLastError().

Referenced by KviPackageWriter::packFile(), KviPackageReader::readHeaderInternal(), KviPackageReader::unpackFile(), and KviPackageReader::unpackInternal().

◆ setLastError()

void KviPackageIOEngine::setLastError ( const QString & szLastError)
inlineprotected

◆ showProgressDialog()

void KviPackageIOEngine::showProgressDialog ( const QString & szCaption,
int iTotalSteps )
protected

Shows the progress dialog.

Parameters
szCaptionThe caption of the dialog window
iTotalStepsThe total number of steps
Returns
void

References __tr2qs, m_pProgressDialog, and m_pProgressDialogLabel.

Referenced by KviPackageWriter::pack(), and KviPackageReader::unpackInternal().

◆ stringInfoFields()

KviPointerHashTable< QString, QString > * KviPackageIOEngine::stringInfoFields ( )
inline

◆ updateProgress()

bool KviPackageIOEngine::updateProgress ( int iProgress,
const QString & szLabel )
protected

Updates the progress dialog.

Parameters
iProgressThe value in steps of the progress bar
szLabelThe label of the step
Returns
bool

References __tr2qs, m_pProgressDialog, m_pProgressDialogLabel, and setLastError().

Referenced by KviPackageWriter::pack(), KviPackageWriter::packFile(), KviPackageWriter::packInternal(), KviPackageReader::unpackFile(), and KviPackageReader::unpackInternal().

◆ writeError()

bool KviPackageIOEngine::writeError ( )
protected

Sets the last error as write error.

This is a shortcut to setLastError()

Returns
bool

References __tr2qs, and setLastError().

Referenced by KviPackageWriter::packFile(), KviPackageWriter::packInternal(), KviPackageReader::readHeaderInternal(), and KviPackageReader::unpackFile().

Member Data Documentation

◆ m_pBinaryInfoFields

KviPointerHashTable<QString, QByteArray>* KviPackageIOEngine::m_pBinaryInfoFields
private

◆ m_pProgressDialog

QProgressDialog* KviPackageIOEngine::m_pProgressDialog
private

◆ m_pProgressDialogLabel

QLabel* KviPackageIOEngine::m_pProgressDialogLabel = nullptr
private

◆ m_pStringInfoFields

KviPointerHashTable<QString, QString>* KviPackageIOEngine::m_pStringInfoFields
private

◆ m_szLastError

QString KviPackageIOEngine::m_szLastError
private

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