KVIrc 5.2.4
Developer APIs
Public Types | Public Member Functions | Private Attributes | List of all members
LogFile Class Reference

The LogFile class which handle any log file. More...

#include <LogFile.h>

Public Types

enum  ExportType { PlainText , HTML }
 Holds the type of the exported log file. More...
 
enum  Type {
  Channel = 0 , Console = 1 , Query = 2 , DccChat = 3 ,
  Other = 4
}
 Holds the type of the log file. More...
 

Public Member Functions

void createLog (ExportType exportType, QString szLog, QString *pszFile=nullptr) const
 Exports the log and creates the file in the selected format.
 
const QDate & date () const
 Returns the date of the log.
 
const QString & fileName () const
 Returns the filename of the log.
 
void getText (QString &szText) const
 Returns the text of the log file.
 
 LogFile (const QString &szName)
 Constructs the log file object.
 
const QString & name () const
 Returns the name of the log.
 
const QString & network () const
 Returns the network of the log.
 
Type type () const
 Returns the type of the log.
 
const QString & typeString () const
 Returns the type of the log.
 

Private Attributes

bool m_bCompressed
 
QDate m_date
 
Type m_eType
 
QString m_szFilename
 
QString m_szName
 
QString m_szNetwork
 
QString m_szType
 

Detailed Description

The LogFile class which handle any log file.

Log is in the format: $type_$nick.$network_$YYYY.$MM.$DD.log Examples: query_noldor.azzurra_2009.05.20.log channel_::slackware.azzurra_2009.11.03.log

Member Enumeration Documentation

◆ ExportType

Holds the type of the exported log file.

Enumerator
PlainText 

export log in plain text file

HTML 

export log in a HTML archive

◆ Type

Holds the type of the log file.

Enumerator
Channel 

the log file of a channel

Console 

the log file of a console

Query 

the log file of a query

DccChat 

the log file of a dcc chat

Other 

any other log file

Constructor & Destructor Documentation

◆ LogFile()

LogFile::LogFile ( const QString &  szName)

Member Function Documentation

◆ createLog()

void LogFile::createLog ( ExportType  exportType,
QString  szLog,
QString *  pszFile = nullptr 
) const

◆ date()

const QDate & LogFile::date ( ) const
inline

Returns the date of the log.

Returns
const QDate &

References m_date.

Referenced by createLog().

◆ fileName()

const QString & LogFile::fileName ( ) const
inline

Returns the filename of the log.

Returns
const QString &

References m_szFilename.

Referenced by getText().

◆ getText()

void LogFile::getText ( QString &  szText) const

Returns the text of the log file.

Parameters
szTextThe buffer where to save the contents of the log
Returns
void

References fileName(), and m_bCompressed.

Referenced by createLog().

◆ name()

const QString & LogFile::name ( ) const
inline

Returns the name of the log.

Returns
const QString &

References m_szName.

Referenced by createLog().

◆ network()

const QString & LogFile::network ( ) const
inline

Returns the network of the log.

Returns
const QString &

References m_szNetwork.

Referenced by createLog().

◆ type()

Type LogFile::type ( ) const
inline

Returns the type of the log.

Returns
Type

References m_eType.

Referenced by createLog().

◆ typeString()

const QString & LogFile::typeString ( ) const
inline

Returns the type of the log.

Returns
const QString &

References m_szType.

Member Data Documentation

◆ m_bCompressed

bool LogFile::m_bCompressed
private

Referenced by getText(), and LogFile().

◆ m_date

QDate LogFile::m_date
private

Referenced by date(), and LogFile().

◆ m_eType

Type LogFile::m_eType
private

Referenced by LogFile(), and type().

◆ m_szFilename

QString LogFile::m_szFilename
private

Referenced by fileName(), and LogFile().

◆ m_szName

QString LogFile::m_szName
private

Referenced by LogFile(), and name().

◆ m_szNetwork

QString LogFile::m_szNetwork
private

Referenced by LogFile(), and network().

◆ m_szType

QString LogFile::m_szType
private

Referenced by LogFile(), and typeString().


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