KVIrc  4.9.2
DeveloperAPIs
Functions
KviUserInput Namespace Reference

Namespace that contains parsing function for the user input. More...

Functions

KVIRC_API void escapeString (QString &szData)
 Escapes any kvs special character from a string. More...
 
bool parse (QString &szData, KviWindow *pWindow, const QString &szContext=KviQString::Empty, bool bUserFriendlyCommandline=false)
 Returns false if szData is a command and it fails to run. More...
 
bool parseCommand (const QString &szData, KviWindow *pWindow, const QString &szContext=KviQString::Empty, bool bUserFriendlyCommandline=false)
 Returns true if the command run. More...
 
void parseNonCommand (QString &szData, KviWindow *pWindow)
 Parses the non command input data. More...
 

Detailed Description

Namespace that contains parsing function for the user input.

Function Documentation

KVIRC_API void KviUserInput::escapeString ( QString &  szData)

Escapes any kvs special character from a string.

Parameters
szDataThe string to escape
Returns
void
KVIRC_API bool KviUserInput::parse ( QString &  szData,
KviWindow pWindow,
const QString &  szContext = KviQString::Empty,
bool  bUserFriendlyCommandline = false 
)

Returns false if szData is a command and it fails to run.

Parameters
szDataThe input data to parse
pWindowThe window associated to the input
szContextThe context associated to the input
bUserFriendlyCommandlineWhether the commandline is in user friendly mode
Returns
bool
Warning
May destroy szData

References c, KviEvent_OnTextInput, KVS_TRIGGER_EVENT_1_HALTED, parseCommand(), and parseNonCommand().

Referenced by KviInput::inputEditorEnterPressed(), KviInput::keyPressEvent(), KviKvsCoreSimpleCommands::KVSCSC(), and NotifierWindow::returnPressed().

KVIRC_API bool KviUserInput::parseCommand ( const QString &  szData,
KviWindow pWindow,
const QString &  szContext = KviQString::Empty,
bool  bUserFriendlyCommandline = false 
)

Returns true if the command run.

Parameters
szDataThe input data to parse
pWindowThe window associated to the input
szContextThe context associated to the input
bUserFriendlyCommandlineWhether the commandline is in user friendly mode
Returns
bool

References __tr2qs, KviKvsScript::Error, KviQString::escapeKvs(), and KviQString::EscapeParenthesis.

Referenced by parse(), parseNonCommand(), and KviInputEditor::sendKvs().

KVIRC_API void KviUserInput::parseNonCommand ( QString &  szData,
KviWindow pWindow 
)