KVIrc 5.2.0
Developer APIs
Public Member Functions | Static Public Member Functions | Protected Attributes | Static Private Attributes | List of all members
KviInputHistory Class Reference

Input history class. More...

#include <KviInputHistory.h>

Public Member Functions

void add (const QString &szString)
 Adds a string to the history.
 
unsigned int count ()
 Returns the number of instances of the class.
 
std::vector< QString > list ()
 Returns the list of string in the history.
 
void load (const QString &szFileName)
 Loads the history.
 
void save (const QString &szFileName)
 Saves the history.
 

Static Public Member Functions

static void addRef ()
 Adds a reference to the class.
 
static void delRef ()
 Removes a reference to the class.
 
static void done ()
 Destroys the class instance.
 
static void init ()
 Initializes the class instance.
 
static KviInputHistoryinstance ()
 Returns the instance of the class.
 

Protected Attributes

std::vector< QString > m_StringList
 

Static Private Attributes

static KviInputHistorym_pSelf = nullptr
 
static unsigned int m_uCount = 0
 

Detailed Description

Input history class.

Member Function Documentation

◆ add()

void KviInputHistory::add ( const QString &  szString)

Adds a string to the history.

Parameters
szStringThe string to add
Returns
void

References KVI_INPUT_MAX_GLOBAL_HISTORY_ENTRIES, and m_StringList.

Referenced by KviInputEditor::finishInput(), load(), KviInputEditor::sendKvs(), and KviInputEditor::sendPlain().

◆ addRef()

void KviInputHistory::addRef ( )
static

Adds a reference to the class.

Returns
void

References m_uCount.

Referenced by init().

◆ count()

unsigned int KviInputHistory::count ( )
inline

Returns the number of instances of the class.

Returns
unsigned int

Referenced by done(), and init().

◆ delRef()

void KviInputHistory::delRef ( )
static

Removes a reference to the class.

Returns
void

References m_uCount.

Referenced by done().

◆ done()

void KviInputHistory::done ( )
static

Destroys the class instance.

Returns
void

References count(), delRef(), and m_pSelf.

Referenced by KviApplication::~KviApplication().

◆ init()

void KviInputHistory::init ( )
static

Initializes the class instance.

Returns
void

References addRef(), count(), and m_pSelf.

Referenced by KviApplication::setup().

◆ instance()

static KviInputHistory * KviInputHistory::instance ( )
inlinestatic

◆ list()

std::vector< QString > KviInputHistory::list ( )
inline

Returns the list of string in the history.

Returns
KviPointerList<QString> *

Referenced by KviHistoryWindow::fill().

◆ load()

void KviInputHistory::load ( const QString &  szFileName)

◆ save()

void KviInputHistory::save ( const QString &  szFileName)

Saves the history.

Parameters
szFileNameThe name of the file where to save
Returns
void

References KviConfigurationFile::clear(), m_StringList, KviCString::ptr(), KviCString::sprintf(), KviConfigurationFile::Write, and KviConfigurationFile::writeEntry().

Referenced by KviApplication::saveInputHistory().

Member Data Documentation

◆ m_pSelf

KviInputHistory * KviInputHistory::m_pSelf = nullptr
staticprivate

Referenced by done(), and init().

◆ m_StringList

std::vector<QString> KviInputHistory::m_StringList
protected

Referenced by add(), and save().

◆ m_uCount

unsigned int KviInputHistory::m_uCount = 0
staticprivate

Referenced by addRef(), and delRef().


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