![]() |
KVIrc
4.9.2
DeveloperAPIs
|
Input history class. More...
#include <KviInputHistory.h>
Public Member Functions | |
| void | add (QString *szString) |
| Adds a string to the history. More... | |
| unsigned int | count () |
| Returns the number of instances of the class. More... | |
| KviInputHistory () | |
| Constructs the input history object. More... | |
| KviPointerList< QString > * | list () |
| Returns the list of string in the history. More... | |
| void | load (const QString &szFileName) |
| Loads the history. More... | |
| void | save (const QString &szFileName) |
| Saves the history. More... | |
| ~KviInputHistory () | |
| Destroys the input history object. More... | |
Static Public Member Functions | |
| static void | addRef () |
| Adds a reference to the class. More... | |
| static void | delRef () |
| Removes a reference to the class. More... | |
| static void | done () |
| Destroys the class instance. More... | |
| static void | init () |
| Initializes the class instance. More... | |
| static KviInputHistory * | instance () |
| Returns the instance of the class. More... | |
Protected Attributes | |
| KviPointerList< QString > * | m_pStringList |
Static Private Attributes | |
| static KviInputHistory * | m_pSelf = nullptr |
| static unsigned int | m_uCount = 0 |
Input history class.
| KviInputHistory::KviInputHistory | ( | ) |
Constructs the input history object.
References m_pStringList, and KviPointerList< T >::setAutoDelete().
Referenced by init().
| KviInputHistory::~KviInputHistory | ( | ) |
Destroys the input history object.
References m_pStringList.
| void KviInputHistory::add | ( | QString * | szString | ) |
Adds a string to the history.
| szString | The string to add |
References KviPointerList< T >::count(), KviPointerList< T >::insert(), KVI_INPUT_MAX_GLOBAL_HISTORY_ENTRIES, m_pStringList, and KviPointerList< T >::removeLast().
Referenced by load(), KviInputEditor::returnPressed(), KviInputEditor::sendKvs(), and KviInputEditor::sendPlain().
|
static |
|
inline |
|
static |
|
static |
Destroys the class instance.
References count(), delRef(), and m_pSelf.
Referenced by KviApplication::~KviApplication().
|
static |
Initializes the class instance.
References addRef(), count(), KviInputHistory(), and m_pSelf.
Referenced by KviApplication::setup().
|
inlinestatic |
Returns the instance of the class.
Referenced by KviHistoryWindow::fill(), KviInput::history(), KviInputEditor::returnPressed(), KviApplication::saveInputHistory(), KviInputEditor::sendKvs(), KviInputEditor::sendPlain(), and KviApplication::setup().
|
inline |
Returns the list of string in the history.
Referenced by KviHistoryWindow::fill().
| void KviInputHistory::load | ( | const QString & | szFileName | ) |
Loads the history.
| szFileName | The name of the file to load |
References add(), c, i, KVI_INPUT_MAX_GLOBAL_HISTORY_ENTRIES, KviCString::ptr(), KviConfigurationFile::Read, KviConfigurationFile::readEntry(), KviConfigurationFile::readIntEntry(), and KviCString::sprintf().
Referenced by KviApplication::setup().
| void KviInputHistory::save | ( | const QString & | szFileName | ) |
Saves the history.
| szFileName | The name of the file where to save |
References c, KviConfigurationFile::clear(), KviPointerList< T >::count(), KviPointerList< T >::first(), m_pStringList, KviPointerList< T >::next(), KviCString::ptr(), KviCString::sprintf(), KviConfigurationFile::Write, and KviConfigurationFile::writeEntry().
Referenced by KviApplication::saveInputHistory().
|
staticprivate |
|
protected |
Referenced by add(), KviInputHistory(), save(), and ~KviInputHistory().
1.8.7