![]() |
KVIrc 5.2.4
Developer APIs
|
Input history class. More...
#include <KviInputHistory.h>
Public Member Functions | |
void | add (const QString &szString) |
Adds a string to the history. | |
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 | done () |
Destroys the class instance. | |
static void | init () |
Initializes the class instance. | |
static KviInputHistory * | instance () |
Returns the instance of the class. | |
Protected Attributes | |
std::vector< QString > | m_StringList |
Static Private Attributes | |
static KviInputHistory * | m_pSelf = nullptr |
Input history class.
void KviInputHistory::add | ( | const QString & | szString | ) |
Adds a string to the history.
szString | The string to add |
References KVI_INPUT_MAX_GLOBAL_HISTORY_ENTRIES, and m_StringList.
Referenced by KviInputEditor::finishInput(), load(), KviInputEditor::sendKvs(), and KviInputEditor::sendPlain().
|
static |
Destroys the class instance.
References m_pSelf.
Referenced by KviApplication::~KviApplication().
|
static |
Initializes the class instance.
References m_pSelf.
Referenced by KviApplication::setup().
|
inlinestatic |
Returns the instance of the class.
Referenced by KviHistoryWindow::fill(), KviInputEditor::finishInput(), KviInput::history(), 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(), 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 KviConfigurationFile::clear(), m_StringList, KviCString::ptr(), KviCString::sprintf(), KviConfigurationFile::Write, and KviConfigurationFile::writeEntry().
Referenced by KviApplication::saveInputHistory().
|
staticprivate |