diff options
| author | 2016-03-02 12:15:44 +0000 | |
|---|---|---|
| committer | 2016-03-14 04:57:12 +0000 | |
| commit | f138911b65dfce85c551f9e2e4bbeb595d6c6755 (patch) | |
| tree | 701d5eec803c30160be47f8762b5838e57bc44dd /src/modules | |
| parent | cleanup: add or remove empty lines between documentation blocks & code (diff) | |
| download | KVIrc-f138911b65dfce85c551f9e2e4bbeb595d6c6755.tar.gz KVIrc-f138911b65dfce85c551f9e2e4bbeb595d6c6755.tar.bz2 KVIrc-f138911b65dfce85c551f9e2e4bbeb595d6c6755.zip | |
documentation: formatting/indentation + minor syntax fixes
+ Dont use double quotes to emphasise words in normal circumstances.
+ improve indenting + consistency (good for readability when editing source)
+ also replace single quotes
Diffstat (limited to 'src/modules')
63 files changed, 1457 insertions, 1573 deletions
diff --git a/src/modules/about/libkviabout.cpp b/src/modules/about/libkviabout.cpp index 196fe3e43..9b2d726b6 100644 --- a/src/modules/about/libkviabout.cpp +++ b/src/modules/about/libkviabout.cpp @@ -39,19 +39,19 @@ AboutDialog * g_pAboutDialog = 0; @title: about.kvirc @short: - Shows the "About KVIrc" dialog + Shows the About KVIrc dialog @syntax: about.kvirc @description: - This command is exported by the "about" module. + This command is exported by the [i]about[/i] module. This command opens a dialog which contains various tabs ranging from important to interesting information. - [b]About[/b] tab: shows the current KVIrc base version, release name and splash screen.[/br] + [b]About[/b] tab: shows the current KVIrc base version, release name and splash screen.[br] [b]Executable Information[/b] tab: contains important system and program information you can [b]copy and paste[/b] into e.g. a bug report or support request.[br] [b]Honor & Glory[/b] tab: contains a non exhaustive list of the people who have contributed to help make KVIrc the IRC client you know and use today.[br] [b]Licence[/b] tab: contains a copy (if present in the KVIrc package) of the license type and details associated with the KVIrc package. @examples: [example] - /about.kvirc + about.kvirc [/example] */ diff --git a/src/modules/action/libkviaction.cpp b/src/modules/action/libkviaction.cpp index 3cbdfe6ec..cd61c9cd6 100644 --- a/src/modules/action/libkviaction.cpp +++ b/src/modules/action/libkviaction.cpp @@ -90,7 +90,7 @@ static bool action_kvs_cmd_list(KviKvsModuleCommandCall * c) does not print warnings if the action is not defined or disabled. @examples: [example] - action.trigger connect + action.trigger connect [/example] */ @@ -280,78 +280,72 @@ static bool action_kvs_cmd_destroy(KviKvsModuleCommandCall * c) Specifies that the action needs an IRC context to be executed. When the current window does not belong to an IRC context the action is automatically disabled - + [br] !sw: -c | --bind-to-connection Specifies that the action needs an IRC connection to be executed. When the current window has no associated IRC connection the action is automatically disabled. This switch implies -i. - + [br] !sw: -l | --enable-at-login Specifies that the action needs to be enabled at login time, that is when a link to the server has been established but the login operations haven't been carried out yet (and thus there is no real IRC connection). This switch requires -c to work. - + [br] !sw: -w=<window_types> | --window-types=<window_type> Causes the action to be enabled only when the active window is one of the specified types. <window_types> may be any combination - of the letters 'q' (query), 'c' (channel), 'x' (console), 'd' (dccchat). + of the letters [b]q[/b] (query), [b]c[/b] (channel), [b]x[/b] (console), [b]d[/b] (dccchat). If this switch is omitted then the action is enabled in all the windows.[br] - + [br] !sw: -s | --selected-only Specifies that the action will be activated only if the active window has selected users in the userlist. This switch requires -w with a combination - of flags 'q','c' and 'x' (it doesn't work for DCC chat). - + of flags [b]q[/b], [b]c/b] and [b]x[/b] (it doesn't work for DCC chat). + [br] !sw: -t=<category> | --category=<category> Causes the action to belong to the specified category. - <category> can be one of "IRC","scripting","settings","GUI","channel","tools" and "generic". - If this switch is omitted the "generic" category is automatically assumed. - The actions failing in the "tools" category will appear in the "Tools" KVIrc menu too. - + <category> can be one of [i]IRC[/i], [i]scripting[/i], [i]settings[/i], [i]GUI[/i], [i]channel[/i], [i]tools[/i] and [i]generic[/i]. + If this switch is omitted the [i]generic[/i] category is automatically assumed. + The actions failing in the [i]tools[/i] category will appear in the [i]Tools[/i] KVIrc menu too. + [br] !sw: -k=<key sequence> | --key-sequence=<key sequence> Specifies that the action will be activated also by the <key sequence> which is a string formed from up to four keyboard codes separated by - commas optionally combined with the modifiers "Alt","Ctrl","Shift" and "Meta".[br] - Examples of such sequences are: "Ctrl+X", "Ctrl+Alt+F" or "Ctrl+X,Alt+Space". + commas optionally combined with the modifiers [i]Alt[/i], [i]Ctrl[/i], [i]Shift[/i] and [i]Meta[/i].[br] + Examples of such sequences are: [i]Ctrl+X", [i]Ctrl+Alt+F[/i] or [i]Ctrl+X,Alt+Space[/i]. @description: - [p] + [br] Defines a new script action. - [/p] - [p] + [br] Each action has an unique <name> that must not collide with any core action - (i.e. don't use the "KVIrc." prefix). + (i.e. don't use the [i]KVIrc.[/i] prefix). At any time you can check [cmd]action.list[/cmd] to verify that no core action is already using your <name>. If the <name> was already used for a script action then this action is simply replaced by the new one. - [/p] - [p] + [br] Each action has an associated <visible label> that is the name meant to be presented to the user, possibly even translated. This label will appear on the toolbar buttons, in the tooltips and in the popup menu items. The string will be evaluated just before the actions is displayed so the eventual runtime translation will fetch from the correct language catalogue. - [/p] - [p] + [br] <description> is the descriptive text that will be displayed in the action choice dialog (and maybe in other places). The string will be evaluated just before the actions is displayed so the eventual runtime translation will fetch from the correct language catalogue. - [/p] - [p] + [br]] <big_icon_id> is the [doc:image_id]image identifier[/doc] of the icon that will appear on the toolbar buttons and in the action choice dialog. - [/p] - [p] + [br] <small_icon_id> is optional and is the [doc:image_id]image identifier[/doc] of the icon that will appear in the menu items. Since menu items can be also iconless then this parameter is optional. - [/p] - [p] + [br] <action body> is the callback code snippet that will be triggered when this action is activated either by the means of [cmd]action.trigger[/cmd], a toolbar button or a menu item selection. An empty <action body> causes this command to behave like [cmd]action.destroy[/cmd] <name>. - [/p] + [br] @seealso: [cmd]action.destroy[/cmd], [cmd]action.trigger[/cmd] @examples: @@ -455,8 +449,8 @@ static bool action_kvs_cmd_create(KviKvsModuleCallbackCommandCall * c) @syntax: <boolean> $action.exists(<name:string>) @description: - Returns 1 if the action with the specified <name> is currently defined - and 0 otherwise. + Returns [b]1[/b] if the action with the specified <name> is currently defined + and [b]0[/b] otherwise. */ static bool action_kvs_fnc_exists(KviKvsModuleFunctionCall * c) @@ -480,8 +474,8 @@ static bool action_kvs_fnc_exists(KviKvsModuleFunctionCall * c) @syntax: <boolean> $action.isEnabled(<name:string>) @description: - Returns 1 if the action with the specified <name> is currently enabled - and 0 otherwise. If the action does not exist the function returns 0. + Returns [b]1[/b] if the action with the specified <name> is currently enabled + and [b]0[/b] otherwise. If the action does not exist the function returns [b]0[/b]. */ static bool action_kvs_fnc_isEnabled(KviKvsModuleFunctionCall * c) diff --git a/src/modules/addon/libkviaddon.cpp b/src/modules/addon/libkviaddon.cpp index a33aac16d..33e0c6935 100644 --- a/src/modules/addon/libkviaddon.cpp +++ b/src/modules/addon/libkviaddon.cpp @@ -56,8 +56,8 @@ QRect g_rectManagementDialogGeometry(0,0,0,0); @syntax: <boolean> $addon.exists(<id:string>[,<version:string>]) @description: - Returns 1 if the addon with the specified <id> is currently installed - and 0 otherwise. If <version> is specified then any addon with + Returns [b]1[/b] if the addon with the specified <id> is currently installed + and [b]0[/b] otherwise. If <version> is specified then any addon with a version lower than <version> is ignored (so you can effectively check if a greater or equal version is present). */ @@ -311,7 +311,7 @@ static bool addon_kvs_cmd_help(KviKvsModuleCommandCall * c) } @switches: !sw: -q - Makes the command run quietly + Makes the command run quietly @description: Sets the configure callback for the specified addon. The configure callback will be called by the user either by the @@ -357,7 +357,7 @@ static bool addon_kvs_cmd_setconfigurecallback(KviKvsModuleCallbackCommandCall * } @switches: !sw: -q - Makes the command run quietly + Makes the command run quietly @description: Sets the help callback for the specified addon. The help callback will be called by the user either by the @@ -404,42 +404,33 @@ static bool addon_kvs_cmd_sethelpcallback(KviKvsModuleCallbackCommandCall * c) } @switches: !sw: -f | --force - Registers the addon even if an addon with the same <id> and - a higher version already exists. The usage of this flag - is highly discouraged (i.e. use it only for debugging purposes - on your own machine). + Registers the addon even if an addon with the same <id> and + a higher version already exists. The usage of this flag + is highly discouraged (i.e. use it only for debugging purposes + on your own machine). !sw: -n | --no-uninstall - Performs no uninstallation of existing versions of the addon: - it simply replaces the registration entry with the new data. - Again, do [b]not[/b] use this switch if not for debugging purposes - and on your own machine. + Performs no uninstallation of existing versions of the addon: + it simply replaces the registration entry with the new data. + Again, do [b]not[/b] use this switch if not for debugging purposes + and on your own machine. !sw: -q | --quiet - Makes the command run quietly + Makes the command run quietly @description: - [p] - Registers a script-based addon. - [/p] - [p] - The registration process allows to "show" the addon in the script-addon manager + Registers a script-based addon.[br] + The registration process allows to [i]show[/i] the addon in the script-addon manager dialog and provides a standard way for the user to manage and uninstall the addons. - You simply register your addon BEFORE attempting to install it. - [/p] - [p] + You simply register your addon BEFORE attempting to install it.[br] A script-based addon is a set of scripts, icons, translations and possibly other data files that add functionality to the KVIrc program. - The script-based addons are often simply called "scripts" and - we will adhere to that naming in certain parts of the documentation too. - [/p] - [p] + The script-based addons are often simply called [i]scripts[/i] and + we will adhere to that naming in certain parts of the documentation too.[br] Each script-based addon (a set of scripts) is identified by an UNIQUE <id>. Two addons with the same <id> can't co-exist in the same KVIrc installation (so be sure to choose a token characteristic enough to avoid collisions with others). The <id> itself is used only for identification purposes and the user will almost always see the <visible_name> instead, which can contain the [fnc]$tr[/fnc] function that will handle - the translation for it. - [/p] - [p] + the translation for it.[br] Each addon has also a <version> which is a string in the form x.y.z where x, y and z are numbers (yes.. that's the standard major-minor-patch level version numbering scheme). A <version> of 2.4.23 is greater than 2.4.3 @@ -447,26 +438,18 @@ static bool addon_kvs_cmd_sethelpcallback(KviKvsModuleCallbackCommandCall * c) When an addon with a greater or equal version is installed over an addon with a lower version, the lower one gets uninstalled first. Installing a lower version over a greater one is not possible, unless - the lower version one is uninstalled first. - [/p] - [p] + the lower version one is uninstalled first.[br][br] <description> is another, possibly translated, string that will - be presented to the user in the addon management dialog. - [/p] - [p] + be presented to the user in the addon management dialog.[br][br] <minkvircversion> is the minimum KVIrc version required for the addon to run. If the version of the running KVIrc executable is lower than the requested one then the command will abort with an error. If you want to completely ignore the KVIrc versioning (don't do it), - use "0.0.0" here. If you need fine tuning on cvs features you may add also - the sources date tag at the end of the required version string (e.g 3.2.1.20060303). - [/p] - [p] + use [b][i]0.0.0[/i][/b] here. If you need fine tuning on cvs features you may add also + the sources date tag at the end of the required version string (e.g 3.2.1.20060303).[br][br] <iconid> is the [doc:image_id]image identifier[/doc] of the icon that will be displayed in the addon management dialog. - If not specified, a default icon will be used. - [/p] - [p] + If not specified, a default icon will be used.[br][br] The <uninstall_callback> is a snippet of code that should wipe out the addon from the system. It is ALWAYS a good practice to write a complete uninstallation procedure (think that YOU like @@ -474,9 +457,7 @@ static bool addon_kvs_cmd_sethelpcallback(KviKvsModuleCallbackCommandCall * c) The <uninstall_callback> will be called by KVIrc when the addon uninstallation is requested, either explicitly by using the GUI or the command [cmd]addon.uninstall[/cmd], or implicitly by installing - a newer version of the addon (upgrading). - [/p] - [p] + a newer version of the addon (upgrading).[br] If the user security rules don't allow your addon to be installed or a higher version of a addon with the same name already exists the command will fail with an error (aborting your whole installation addon). @@ -484,28 +465,22 @@ static bool addon_kvs_cmd_sethelpcallback(KviKvsModuleCallbackCommandCall * c) then you should use [fnc]$addon.exists()[/fnc] to check if a addon with the same name and a greater version already exists. You can't gracefully handle security error conditions: your installation - will be always aborted with an error in this case. - [/p] - [p] + will be always aborted with an error in this case.[br] The addon can also have a configuration callback settable with [cmd]addon.setconfigurecallback[/cmd] and a help callback settable with [cmd]addon.sethelpcallback[/cmd]. The first will usually display a configuration dialog, the second will display - some sort of addon's documentation, usually in the help browser. - [/p] - [p] + some sort of addon's documentation, usually in the help browser.[br] The registration process uninstalls any previous addon version by executing its uninstall callback routine. This is another reason for that you should call addon.register BEFORE you attempt to install your addon. Failing to do that may cause your old uninstalled to wipe out your newly installed files or code. - [/p] @seealso: [cmd]addon.uninstall[/cmd], [fnc]$addon.exists[/fnc], [cmd]addon.setconfigurecallback[/cmd], [cmd]addon.configure[/cmd], [cmd]addon.sethelpcallback[/cmd], [cmd]addon.help[/cmd], [cmd]addon.installfiles[/cmd] @examples: [example] - [/example] */ @@ -602,9 +577,9 @@ static bool addon_kvs_cmd_register(KviKvsModuleCallbackCommandCall * c) addon.installfiles <id:string> <target:string> [files] @switches: !sw: -q | --quiet - Makes the command run quietly + Makes the command run quietly !sw: -s | --skip-nonexistent - Skip nonexistent entries in the [files] list + Skip nonexistent entries in the [files] list @description: Installs the [files] for the addon identified by the specified <id>. The files will be automatically removed when the addon is uninstalled. @@ -617,7 +592,7 @@ static bool addon_kvs_cmd_register(KviKvsModuleCallbackCommandCall * c) [li]"config" for configuration files.[/li] [li]"help/<language>" for help files.[/li] [/ul] - Other target paths are allowed and subdirectories are supported (e.g. "pics/myaddon"). + Other target paths are allowed and subdirectories are supported (e.g. [i]pics/myaddon[/i]). [files] is a list of filenames or directory names. Each file will be copied to the specified target path in the local KVIrc directory. Filenames can contain wildcard characters in the last component. @@ -826,7 +801,7 @@ static bool addon_kvs_cmd_install(KviKvsModuleCommandCall * c) @description: Creates a *.kva package containing a KVIrc addon.[br] <package_path> is the absolute path and file name of the package that should be saved.[br] - <addon_name> is the visible name of the addon (something like "My Addon").[br] + <addon_name> is the visible name of the addon (something like [i][b]My Addon[/i][/b]).[br] <addon_version> is the version of the addon in the form X.Y.Z.[br] <description> is a textual description of the addon. <author> is the name of the person that is creating the addon. diff --git a/src/modules/avatar/libkviavatar.cpp b/src/modules/avatar/libkviavatar.cpp index a9735ac00..627aa1d7a 100644 --- a/src/modules/avatar/libkviavatar.cpp +++ b/src/modules/avatar/libkviavatar.cpp @@ -347,12 +347,12 @@ static bool avatar_kvs_cmd_unset(KviKvsModuleCommandCall * c) restricted to KVIrc clients only. In the future other clients may implement it.[br] This command is [doc:connection_dependent_commands]connection dependent[/doc].[br] @examples: - [example] + [example] [comment]# Notify your current avatar to Pragma[/comment] avatar.notify Pragma [comment]# Notify your avatar to the channel #kvirc and to Pragma[/comment] avatar #kvirc,Pragma - [/example] + [/example] @seealso: [cmd]avatar.set[/cmd], [cmd]avatar.unset[/cmd] */ diff --git a/src/modules/chan/libkvichan.cpp b/src/modules/chan/libkvichan.cpp index 03cce9b16..3d7bf9f10 100644 --- a/src/modules/chan/libkvichan.cpp +++ b/src/modules/chan/libkvichan.cpp @@ -144,7 +144,7 @@ static bool chan_kvs_fnc_getUrl(KviKvsModuleFunctionCall * c) <boolean> $chan.isDead <boolean> $chan.isDead(<window_id:string>) @description: - Returns 1 if the channel specified by <window_id> is a dead channel and 0 otherwise.[br] + Returns [b]1[/b] if the channel specified by <window_id> is a dead channel and [b]0[/b] otherwise.[br] The form without parameters works on the current window.[br] */ @@ -499,7 +499,7 @@ static bool chan_kvs_fnc_useropcount(KviKvsModuleFunctionCall * c) @description: The first form returns the number of entries in the ban list of the current channel (assuming that the current window is a channel at all). If the current window is not a channel, a warning is printed - and 0 is returned.[br] + and [b]0[/b] is returned.[br] The second form returns the number entries in the ban list of the channel specified by <window_id>.[br] The number of ban list entries is returned if it is known form at the call time: this means that if the channel is not synchronized with the server (as just after the join, for example) @@ -531,7 +531,7 @@ static bool chan_kvs_fnc_bancount(KviKvsModuleFunctionCall * c) @description: The first form returns the number of entries in the ban exception list of the current channel (assuming that the current window is a channel at all). If the current window is not a channel, a warning is printed - and 0 is returned.[br] + and [b]0[/b] is returned.[br] The second form returns the number entries in the ban exception list of the channel specified by <window_id>.[br] The number of ban exception list entries is returned if it is known form at the call time: this means that if the channel is not synchronized with the server (as just after the join, for example) @@ -563,7 +563,7 @@ static bool chan_kvs_fnc_banexceptioncount(KviKvsModuleFunctionCall * c) @description: The first form returns the number of entries in the invite list of the current channel (assuming that the current window is a channel at all). If the current window is not a channel, a warning is printed - and 0 is returned.[br] + and [b]0[/b] is returned.[br] The second form returns the number entries in the invite list of the channel specified by <window_id>.[br] The number of invite list entries is returned if it is known form at the call time: this means that if the channel is not synchronized with the server (as just after the join, for example) @@ -594,7 +594,7 @@ static bool chan_kvs_fnc_invitecount(KviKvsModuleFunctionCall * c) @description: The first form returns the number of entries in the ban list of the current channel (assuming that the current window is a channel at all). If the current window is not a channel, a warning is printed - and 0 is returned.[br] + and [b]0[/b] is returned.[br] The second form returns the number entries in the ban list of the channel specified by <window_id>.[br] The number of list entries is returned if it is known form at the call time: this means that if the channel is not synchronized with the server (as just after the join, for example) @@ -626,7 +626,7 @@ static bool chan_kvs_fnc_maskcount(KviKvsModuleFunctionCall * c) @syntax: <boolean> $chan.ison(<nickname:string>[,<window_id:string>]) @description: - Returns 1 if <nickname> is on the channel identified by <window_id>, 0 otherwise.[br] + Returns [b]1[/b] if <nickname> is on the channel identified by <window_id>, and [b]0[/b] otherwise.[br] If <window_id> is not specified the current window is used (assuming that it is a channel at all).[br] If the window is not a channel, a warning is printed and an empty string is returned.[br] */ @@ -714,7 +714,7 @@ static bool __clbkname(KviKvsModuleFunctionCall * c) \ @syntax: <boolean> $chan.isowner(<nickname:string>[,<window_id:string>]) @description: - Returns 1 if <nickname> is at least an owner on the channel identified by <window_id>, 0 otherwise.[br] + Returns [b]1[/b] if <nickname> is at least an owner on the channel identified by <window_id>, and [b]0[/b] otherwise.[br] If <window_id> is not specified the current window is used (assuming that it is a channel at all).[br] If the window is not a channel, a warning is printed and an empty string is returned.[br] Note that if the user is not on the channel at all, you will get 0 as return value.[br] @@ -733,7 +733,7 @@ IS_KVS_FUNC(chan_kvs_fnc_isowner,isChanOwner) @syntax: <boolean> $chan.isadmin(<nickname:string>[,<window_id:string>]) @description: - Returns 1 if <nickname> is at least an administrator on the channel identified by <window_id>, 0 otherwise.[br] + Returns [b]1[/b] if <nickname> is at least an administrator on the channel identified by <window_id>, and [b]0[/b] otherwise.[br] If <window_id> is not specified the current window is used (assuming that it is a channel at all).[br] If the window is not a channel, a warning is printed and an empty string is returned.[br] Note that if the user is not on the channel at all, you will get 0 as return value.[br] @@ -752,7 +752,7 @@ IS_KVS_FUNC(chan_kvs_fnc_isadmin,isChanAdmin) @syntax: <boolean> $chan.isop(<nickname:string>[,<window_id:string>]) @description: - Returns 1 if <nickname> is at least an operator on the channel identified by <window_id>, 0 otherwise.[br] + Returns [b]1[/b] if <nickname> is at least an operator on the channel identified by <window_id>, and [b]0[/b] otherwise.[br] If <window_id> is not specified the current window is used (assuming that it is a channel at all).[br] If the window is not a channel, a warning is printed and an empty string is returned.[br] Note that if the user is not on the channel at all, you will get 0 as return value.[br] @@ -771,7 +771,7 @@ IS_KVS_FUNC(chan_kvs_fnc_isop,isOp) @syntax: <boolean> $chan.isvoice(<nickname:string>[,<window_id:string>]) @description: - Returns 1 if <nickname> is at least voiced on the channel identified by <window_id>, 0 otherwise.[br] + Returns [b]1[/b] if <nickname> is at least voiced on the channel identified by <window_id>, and [b]0[/b] otherwise.[br] If <window_id> is not specified the current window is used (assuming that it is a channel at all).[br] If the window is not a channel, a warning is printed and an empty string is returned.[br] Note that if the user is not on the channel at all, you will get 0 as return value.[br] @@ -790,7 +790,7 @@ IS_KVS_FUNC(chan_kvs_fnc_isvoice,isVoice) @syntax: <boolean> $chan.ishalfop(<nickname:string>[,<window_id:string>]) @description: - Returns 1 if <nickname> is at least a half-operator on the channel identified by <window_id>, 0 otherwise.[br] + Returns [b]1[/b] if <nickname> is at least a half-operator on the channel identified by <window_id>, and [b]0[/b] otherwise.[br] If <window_id> is not specified the current window is used (assuming that it is a channel at all).[br] If the window is not a channel, a warning is printed and an empty string is returned.[br] Note that if the user is not on the channel at all, you will get 0 as return value.[br] @@ -809,7 +809,7 @@ IS_KVS_FUNC(chan_kvs_fnc_ishalfop,isHalfOp) @syntax: <boolean> $chan.isuserop(<nickname:string>[,<window_id:string>]) @description: - Returns 1 if <nickname> is at least an user-operator on the channel identified by <window_id>, 0 otherwise.[br] + Returns [b]1[/b] if <nickname> is at least an user-operator on the channel identified by <window_id>, and [b]0[/b] otherwise.[br] If <window_id> is not specified the current window is used (assuming that it is a channel at all).[br] If the window is not a channel, a warning is printed and an empty string is returned.[br] Note that if the user is not on the channel at all, you will get 0 as return value.[br] @@ -841,10 +841,10 @@ static bool __clbkname(KviKvsModuleFunctionCall * c) \ <boolean> $chan.isMeOwner <boolean> $chan.isMeOwner(<window_id:string>) @description: - Returns 1 if the current user is at least an owner on the channel specified by <window_id>, 0 otherwise.[br] + Returns [b]1[/b] if the current user is at least an owner on the channel specified by <window_id>, and [b]0[/b] otherwise.[br] If <window_id> is not passed, the current window is used (assuming it is a channel at all).[br] If the window is not a channel, a warning is printed and an empty string is returned.[br] - This function is a "shortcut" for [fnc]$chan.isowner[/fnc]([fnc]$me[/fnc]).[br] + This function is a [i]shortcut[/i] for [fnc]$chan.isowner[/fnc]([fnc]$me[/fnc]).[br] */ IS_ME_KVS_FUNC(chan_kvs_fnc_ismeowner,isMeChanOwner) @@ -861,10 +861,10 @@ IS_ME_KVS_FUNC(chan_kvs_fnc_ismeowner,isMeChanOwner) <boolean> $chan.isMeAdmin <boolean> $chan.isMeAdmin(<window_id:string>) @description: - Returns 1 if the current user is at least an administrator on the channel specified by <window_id>, 0 otherwise.[br] + Returns [b]1[/b] if the current user is at least an administrator on the channel specified by <window_id>, and [b]0[/b] otherwise.[br] If <window_id> is not passed, the current window is used (assuming it is a channel at all).[br] If the window is not a channel, a warning is printed and an empty string is returned.[br] - This function is a "shortcut" for [fnc]$chan.isadmin[/fnc]([fnc]$me[/fnc]).[br] + This function is a [i]shortcut[/i] for [fnc]$chan.isadmin[/fnc]([fnc]$me[/fnc]).[br] */ IS_ME_KVS_FUNC(chan_kvs_fnc_ismeadmin,isMeChanAdmin) @@ -881,10 +881,10 @@ IS_ME_KVS_FUNC(chan_kvs_fnc_ismeadmin,isMeChanAdmin) <boolean> $chan.isMeOp <boolean> $chan.isMeOp(<window_id:string>) @description: - Returns 1 if the current user is at least op on the channel specified by <window_id>, 0 otherwise.[br] + Returns [b]1[/b] if the current user is at least op on the channel specified by <window_id>, and [b]0[/b] otherwise.[br] If <window_id> is not passed, the current window is used (assuming it is a channel at all).[br] If the window is not a channel, a warning is printed and an empty string is returned.[br] - This function is a "shortcut" for [fnc]$chan.isop[/fnc]([fnc]$me[/fnc]).[br] + This function is a [i]shortcut[/i] for [fnc]$chan.isop[/fnc]([fnc]$me[/fnc]).[br] */ IS_ME_KVS_FUNC(chan_kvs_fnc_ismeop,isMeOp) @@ -901,10 +901,10 @@ IS_ME_KVS_FUNC(chan_kvs_fnc_ismeop,isMeOp) <boolean> $chan.isMeHalfOp <boolean> $chan.isMeHalfOp(<window_id:string>) @description: - Returns 1 if the current user is at least an half operator on the channel specified by <window_id>, 0 otherwise.[br] + Returns [b]1[/b] if the current user is at least an half operator on the channel specified by <window_id>, and [b]0[/b] otherwise.[br] If <window_id> is not passed, the current window is used (assuming it is a channel at all).[br] If the window is not a channel, a warning is printed and an empty string is returned.[br] - This function is a "shortcut" for [fnc]$chan.ishalfop[/fnc]([fnc]$me[/fnc]).[br] + This function is a [i]shortcut[/i] for [fnc]$chan.ishalfop[/fnc]([fnc]$me[/fnc]).[br] */ IS_ME_KVS_FUNC(chan_kvs_fnc_ismehalfop,isMeHalfOp) @@ -921,10 +921,10 @@ IS_ME_KVS_FUNC(chan_kvs_fnc_ismehalfop,isMeHalfOp) <boolean> $chan.isMeVoice <boolean> $chan.isMeVoice(<window_id:string>) @description: - Returns 1 if the current user is at least voice on the channel specified by <window_id>, 0 otherwise.[br] + Returns [b]1[/b] if the current user is at least voice on the channel specified by <window_id>, and [b]0[/b] otherwise.[br] If <window_id> is not passed, the current window is used (assuming it is a channel at all).[br] If the window is not a channel, a warning is printed and an empty string is returned.[br] - This function is a "shortcut" for [fnc]$chan.isvoice[/fnc]([fnc]$me[/fnc]).[br] + This function is a [i]shortcut[/i] for [fnc]$chan.isvoice[/fnc]([fnc]$me[/fnc]).[br] */ IS_ME_KVS_FUNC(chan_kvs_fnc_ismevoice,isMeVoice) @@ -941,10 +941,10 @@ IS_ME_KVS_FUNC(chan_kvs_fnc_ismevoice,isMeVoice) <boolean> $chan.isMeUserOp <boolean> $chan.isMeUserOp(<window_id:String>) @description: - Returns 1 if the current user is at least an user operator on the channel specified by <window_id>, 0 otherwise.[br] + Returns [b]1[/b] if the current user is at least an user operator on the channel specified by <window_id>, and [b]0[/b] otherwise.[br] If <window_id> is not passed, the current window is used (assuming it is a channel at all).[br] If the window is not a channel, a warning is printed and an empty string is returned.[br] - This function is a "shortcut" for [fnc]$chan.isuserop[/fnc]([fnc]$me[/fnc]).[br] + This function is a [i]shortcut[/i] for [fnc]$chan.isuserop[/fnc]([fnc]$me[/fnc]).[br] */ IS_ME_KVS_FUNC(chan_kvs_fnc_ismeuserop,isMeUserOp) @@ -1033,7 +1033,7 @@ static bool chan_kvs_fnc_key(KviKvsModuleFunctionCall * c) If no <window_id> is passed, the current channel limit is returned (assuming that the current window is a channel at all).[br] If the window is not a channel, a warning is printed and an empty string is returned.[br] - If the channel has no limit set, "0" is returned.[br] + If the channel has no limit set, [b]0[/b] is returned.[br] Alternatively, you could use $chan.modeParam(l) to get the current limit. @seealso: [fnc]$chan.mode[/fnc] @@ -1112,11 +1112,11 @@ static bool chan_kvs_fnc_modeParam(KviKvsModuleFunctionCall * c) if it matches the [mask].[br] [flags] may contain a subset of the letters [b]aovhnmi[/b]:[br] [b]ovhn[/b] are mode flags: the users are added to the array only if they are channel administrators [b]a[/b], operators [b]o[/b], - voiced users [b]v[/b], half-operators [b]h[/b], user-operators [b]u[/b] or unflagged [b]n[/b] users. (Unflagged means not operators, not + voiced users [b]v[/b], half-operators [b]h[/b], user-operators [b]u[/b] or unflagged [b]n[b] users. (Unflagged means not operators, not voiced and not half-operators). If none of the [b]ovhun[/b] flags are used, KVIrc behaves like all five were passed.[br] The flag [b]m[/b] causes the entire user masks to be added to the array entries, as known by KVIrc at the moment of this function call.[br] - The flag [b]i[/b] causes KVIrc to invert the match and add only the users that do NOT match [mask].[br] + The flag [b]i[/b] causes KVIrc to invert the match and add only the users that do [b]not[/b] match [mask].[br] Please note that on really large channels this function may be time consuming (especially if [mask] is used): use with care.[br] @example: @@ -1142,7 +1142,7 @@ static bool chan_kvs_fnc_modeParam(KviKvsModuleFunctionCall * c) [comment]# Find all the channel operators[/comment] %test[] = $chan.users(,,o) echo %test[] - [comment]# Find all the voiced users that do NOT come from *.edu[/comment] + [comment]# Find all the voiced users that do not come from *.edu[/comment] [comment]# See also their whole mask[/comment] %test[] = $chan.users(,*!*@*.edu,vim) echo %test[] @@ -1627,14 +1627,14 @@ static bool chan_kvs_fnc_matchinvite(KviKvsModuleFunctionCall * c) Warning: this function is network-specific, makes some (bad) assumptions about a non-standard channel mode and will probably be dropped in a future version.[br] Use [fnc]$chan.matchmask[/fnc] instead.[br] - Some networks use +q channel mode to set "mute bans".[br] + Some networks use +q channel mode to set [i]mute bans[/i].[br] When an user mask matches such a ban, he won't be able to send messages to the channel.[br] - The "mute bans" masks will be inserted in the normal channel bans list, with a percent sign % prepended.[br] - This function returns the "mute ban" mask that matches <complete_mask> on channel identified by [window_id].[br] + The [i]mute bans[/i] masks will be inserted in the normal channel bans list, with a percent sign % prepended.[br] + This function returns the [i]mute ban[/i] mask that matches <complete_mask> on channel identified by [window_id].[br] If no ban mask matches <complete_mask> an empty string is returned.[br] If [window_id] is empty, the current window is used.[br] If the window designated by [window_id] is not a channel a warning is printed and an empty string is returned.[br] - This function is useful to determine if a "mute ban" set on the channel matches an user.[br] + This function is useful to determine if a [i]mute ban[/i] set on the channel matches an user.[br] */ static bool chan_kvs_fnc_matchqban(KviKvsModuleFunctionCall * c) @@ -1745,11 +1745,11 @@ static bool chan_kvs_fnc_matchmask(KviKvsModuleFunctionCall * c) @description: Returns an integer identifying the specified user's channel mode on the channel specified by <window_id>.[br] If <window_id> is not passed, the current window is used.[br] - If the specified window is not a channel, a warning is printed and '0' is returned.[br] + If the specified window is not a channel, a warning is printed and [b]0[/b] is returned.[br] This number can be useful to implement comparison functions between users in order to determine the actions they can issue between each other.[br] For example it is granted that an op will have userModeLevel greater than - a voiced user or that a simple "modeless" user will have + a voiced user or that a simple [i]modeless[/i] user will have an userModeLevel lower than a halfop.[br] IRC allows multiple modes to be applied to a single user on a channel, in that case this function will return the level of the highest mode diff --git a/src/modules/channelsjoin/libkvichannelsjoin.cpp b/src/modules/channelsjoin/libkvichannelsjoin.cpp index 44ce08d55..7af136d9e 100644 --- a/src/modules/channelsjoin/libkvichannelsjoin.cpp +++ b/src/modules/channelsjoin/libkvichannelsjoin.cpp @@ -47,7 +47,7 @@ QRect g_rectChannelsJoinGeometry; channelsjoin.open @description: Shows a dialog that allows the user to enter channels in a visual manner.[br] - This command is exported by the "channelsjoin" module. + This command is exported by the [b][i]channelsjoin[/i][/b] module. */ diff --git a/src/modules/config/libkviconfig.cpp b/src/modules/config/libkviconfig.cpp index dea42cce8..56628baec 100644 --- a/src/modules/config/libkviconfig.cpp +++ b/src/modules/config/libkviconfig.cpp @@ -50,11 +50,11 @@ static int g_iNextConfigId = 0; <filename> may be an absolute path or a relative path: if a relative path is used, KVIrc will complete it with a local KVIrc directory suitable for writing script config files.[br] If the config file doesn't exist, it is opened as empty config file.[br] - Flags can contain a combination of letters 'r' and 'w'.[br] - If only 'r' is specified, the config file is opened in "read-only" mode: no changes will be written to disk.[br] - If only 'w' is specified, the config file is opened in "write-only" mode: the contents of the file on disk + Flags can contain a combination of letters [b]r[/b] and [b]w[/b].[br] + If only [b]r[/b] is specified, the config file is opened in [i]read-only[/i] mode: no changes will be written to disk.[br] + If only [b]w[/b] is specified, the config file is opened in [i]write-only[/i] mode: the contents of the file on disk are not read.[br] - If <flags> are not specified then 'rw' is assumed.[br] + If <flags> are not specified then [b][i]rw[/i][/b] is assumed.[br] The function returns an identifier for the open config file. This identifier is a mandatory parameter in all the other config.* functions and commands.[br] The config section is set to the default section name: you can change it by using @@ -66,13 +66,13 @@ static int g_iNextConfigId = 0; [fnc]$config.id[/fnc]() function.[br] @examples: [example] - # It is a good idea to store the returned ID to a variable :) - %cfg = $config.open(myscript.kvc) - %num = [fnc]$config.read[/fnc](%cfg,Number,0) - [cmd]echo[/cmd] Number of entries is %num - %num++; - [cmd]config.write[/cmd] %cfg Number %num - [cmd]config.close[/cmd] %cfg + [comment]# It is a good idea to store the returned ID to a variable :)[/comment] + %cfg = $config.open(myscript.kvc) + %num = [fnc]$config.read[/fnc](%cfg,Number,0) + [cmd]echo[/cmd] Number of entries is %num + %num++; + [cmd]config.write[/cmd] %cfg Number %num + [cmd]config.close[/cmd] %cfg [/example] @seealso: [module:config]Config module documentation[/module] @@ -142,7 +142,7 @@ static bool config_kvs_fnc_open(KviKvsModuleFunctionCall * c) @description: Returns the ID of an open config file specified by <filename>.[br] (This is the same ID that is returned by [fnc]$config.open[/fnc].[br] - If no such file is open, 0 is returned (that is an invalid config identifier).[br] + If no such file is open, [b]0[/b] is returned (that is an invalid config identifier).[br] @seealso: [module:config]Config module documentation[/module] */ @@ -268,10 +268,10 @@ static bool config_kvs_fnc_section(KviKvsModuleFunctionCall * c) @syntax: $config.readonly(<id>) @description: - Returns 1 if the config file identified by <id> is opened in read-only mode, - 0 otherwise.[br] + Returns [b]1[/b] if the config file identified by <id> is opened in read-only mode, + and [b]0[/b] otherwise.[br] <id> must be a valid config identifier returned by [fnc]$config.open[/fnc]() - If <id> does not identify an open config file, a warning is printed and 0 is returned.[br] + If <id> does not identify an open config file, a warning is printed and [b]0[/b] is returned.[br] @seealso: [module:config]Config module documentation[/module] */ @@ -342,8 +342,8 @@ static bool config_kvs_fnc_filename(KviKvsModuleFunctionCall * c) @syntax: $config.hassection(<id>,<section_name>) @description: - Returns 1 if the section <section_name> exists in the config file identifier by <id>, - 0 otherwise.[br] + Returns [b]1[/b] if the section <section_name> exists in the config file identifier by <id>, + and [b]0[/b] otherwise.[br] <id> must be a valid config identifier returned by [fnc]$config.open[/fnc]() @seealso: [module:config]Config module documentation[/module] @@ -515,7 +515,7 @@ static bool config_kvs_fnc_filelist(KviKvsModuleFunctionCall * c) If the config file was opened as read-write (default), the changes will be stored to disk. If the config was opened as read-only, changes will not be written.[br] If the <id> does not match any open config file, a warning is printed unless - the -q switch is used.[br] + the -q (quiet) switch is used.[br] @seealso: [module:config]Config module documentation[/module] */ @@ -703,7 +703,7 @@ static bool config_kvs_cmd_clearsection(KviKvsModuleCommandCall * c) If <key> already exists in the current section of the config, the corresponding value is replaced with <value>.[br] If <value> is an empty string, the <key> is simply removed from the current section.[br] If a section remains empty (with no keys) at file write time, that section will be removed.[br] - The changes are NOT written to disk: you must call [cmd]config.flush[/cmd] or (better) [cmd]config.close[/cmd] + The changes are [b]not[/b] written to disk: you must call [cmd]config.flush[/cmd] or (better) [cmd]config.close[/cmd] for the changes to be effectively written.[br] @seealso: [module:config]Config module documentation[/module] diff --git a/src/modules/context/libkvicontext.cpp b/src/modules/context/libkvicontext.cpp index bcf8a5813..b0da0cc6c 100644 --- a/src/modules/context/libkvicontext.cpp +++ b/src/modules/context/libkvicontext.cpp @@ -414,7 +414,7 @@ STANDARD_IRC_CONNECTION_TARGET_PARAMETER( <string> $context.state(<irc_context_id:uint>) @description: Returns a string describing the state of the specified IRC context. - The string will be either "idle","connecting","loggingin" or "connected". + The string will be either [i]idle[/i], [i]connecting[/i], [i]logging in[/i] or [i]connected[/i]. If no irc_context_id is specified then the current irc_context is used. If the irc_context_id specification is not valid then this function returns nothing. diff --git a/src/modules/dcc/libkvidcc.cpp b/src/modules/dcc/libkvidcc.cpp index 4115225c7..be15c526e 100644 --- a/src/modules/dcc/libkvidcc.cpp +++ b/src/modules/dcc/libkvidcc.cpp @@ -195,25 +195,22 @@ static bool dcc_kvs_parse_default_parameters(DccDescriptor * d,KviKvsModuleComma if the [fnc]$option[/fnc](boolCreateMinimizedDccChat) returns false.[br] In the same way, by passing -m=0 you will create a non minimized DCC SEND. If no <boolean> value is specified, it defaults to 1.[br] - !sw: -n | --no-ctcp Do [b]not[/b] send the CTCP request to the target user, you will have to do it manually, or the remote user will have to connect manually (for example by using dcc.chat -c).[br] - !sw: -c | --connect Attempt to CONNECT to the remote host specified as <interface> and <port>, instead of listening (active connection instead of a passive one). In this case the -i and -p switches are mandatory.[br] - The 'c' switch takes precedence over 'n' (In fact both should + The [b]c[/b] switch takes precedence over [b]n[/b] (In fact both should be mutually exclusive).[br] - If the 'c' and 'n' switches are missing, this commands + If the [b]c[/b] and [b]n[/b] switches are missing, this commands needs to be executed in a window that is bound to a connected IRC context (you need a third entity to accomplish the negotiation).[br] - !sw: -i=<interface> | --ip=<interface> Bind the local listening socket to the specified <interface> (which is an IP address, IPv4 or IPv6). If this switch is [b]not[/b] specified, the socket is bound to the interface of - the current IRC connection (if any) or to "127.0.0.1".[br] + the current IRC connection (if any) or to [i]127.0.0.1[/i].[br] You can also specify a local interface name to get the address from (this works only for IPv4 interfaces since IPv6 ones seems to be unsupported by the system ioctl() calls at the moment (for Linux at least)).[br] Here go some examples:[br] @@ -221,16 +218,13 @@ static bool dcc_kvs_parse_default_parameters(DccDescriptor * d,KviKvsModuleComma -i=3ffe:1001::1: this will bind to the IPv6 interface with the specified address.[br] -i=ppp0: this will bind to the IPv4 address of the interface ppp0 (if supported by the underlying system).[br] The -i switch parameter may serve also as a target address when the -c switch is used.[br] - !sw: -p=<port> | --port=<port> Bind the local listening socket to the specified <port>. - If this switch is [b]not[/b] specified, the port will be a "random" one chosen by the kernel.[br] - + If this switch is [b]not[/b] specified, the port will be a [i]random[/i] one chosen by the kernel.[br] !sw: -a=<fake address> | --fake-address=<fake address> Send the <fake address> as target for the remote client in the requesting CTCP message. If this switch is not given, the CTCP will contain the real IP address of the listening interface.[br] - !sw: -f=<fake port> | --fake-port=<fake port> Send the <fake port> as target port for the remote client in the requesting CTCP message. If this switch is not given, the CTCP will contain the real port of the listening socket. @@ -238,16 +232,14 @@ static bool dcc_kvs_parse_default_parameters(DccDescriptor * d,KviKvsModuleComma All these switches are meant to allow maximum flexibility of the DCC negotiation, earlier KVIrc releases had serious problems with firewalled and/or masqueraded machines. With the -a and -f switches - you can work around it.[br] - [br] - + you can work around it. + [br][br] !sw: -u | --unlimited If the 'u' switch is given, the connection attempt will never time out; this might be useful if you want to leave a listening socket for a friend of yours while you are sleeping and have the CTCP processing disabled. The 'u' switch works either in active and passive mode.[br] - !sw: -s | --ssl Use a Secure Socket Layer for the transfer; the whole communication will be encrypted with a private key algorithm after a public key handshake.[br] @@ -259,17 +251,16 @@ static bool dcc_kvs_parse_default_parameters(DccDescriptor * d,KviKvsModuleComma When requesting a SSL based DCC SEND to someone you probably will need a certificate. If you don't have one, create it (for example with CA.pl -newcert) and set it in the options dialog. - !sw: -z | --zero-port Use the 0 port method. This is a dirty hack that allows you to use the CHAT protocol with mIrc receiving clients. @description: Attempts a DCC connection to <nickname>.[br] - The simplest case "dcc.chat <nickname>" will work just as in all + The simplest case [i]dcc.chat <nickname>[/i] will work just as in all the other IRC clients, but this command is really more powerful...[br] Before attempting to understand the possibilities of this command, be sure to know how [doc:dcc_connection]DCC negotiation and connections[/doc] work. - If the 'i' switch is specified, the local listening socket + If the [b]i[/b] switch is specified, the local listening socket will be bound to the specified <interface> (which is an IP address, IPv4 or IPv6), otherwise it will be bound to the interface of the current IRC connection.[br] You can also specify a local interface name to get the address from (this works only for IPv4 interfaces @@ -279,14 +270,14 @@ static bool dcc_kvs_parse_default_parameters(DccDescriptor * d,KviKvsModuleComma -i=3ffe:1001::1: This will bind to the IPv6 interface with the specified address.[br] -i=ppp0: This will bind to the IPv4 address of the interface ppp0 (if supported by the underlying system).[br] The -i switch parameter may serve also as a target address when the -c switch is used.[br] - If the 'p' switch is specified, the local listening socket + If the [b]p[/b] switch is specified, the local listening socket will be bound to the <port>, otherwise it will be bound to a random port chosen by the kernel.[br] - If the 'a' switch is specified, the requesting CTCP message + If the [b]a[/b] switch is specified, the requesting CTCP message will contain <fake address> as target for the remote user, otherwise the CTCP message will contain the real IP address of the listening interface. - If the 'f' switch is specified, the requesting CTCP message + If the [b]f[/b] switch is specified, the requesting CTCP message will contain <fake port> as target for the remote user, otherwise the CTCP message will contain the real port of the listening socket. @@ -294,22 +285,22 @@ static bool dcc_kvs_parse_default_parameters(DccDescriptor * d,KviKvsModuleComma DCC negotiation, earlier KVIrc releases had serious problems with firewalled and/or masqueraded machines. With the -a and -f switches you can workaround it. - If the 'n' switch is specified, KVIrc will [b]not[/b] send the CTCP request + If the [b]n[/b] switch is specified, KVIrc will [b]not[/b] send the CTCP request to the target user; you will have to do it manually, or the remote user will have to connect manually (for example by using dcc.chat -c). - If the 'c' switch is specified, KVIrc will attempt to connect + If the [b]c[/b] switch is specified, KVIrc will attempt to connect to the remote host specified as <interface> and <port>, instead of listening (active connection instead of a passive one). In this case the -i and -p switches are mandatory.[br] - The 'c' switch takes precedence over 'n' (In fact both should + The [b]c[/b] switch takes precedence over [b]n[/b] (In fact both should be mutually exclusive).[br] - If the 'c' and 'n' switches are missing, this commands + If the [b]c[/b] and [b]n[/b] switches are missing, this commands needs to be executed in a window that is bound to a connected IRC context (you need a third entity to accomplish the negotiation).[br] - If the 'u' switch is given, the connection attempt will + If the [b]u[/b] switch is given, the connection attempt will never time out; this might be useful if you want to leave a listening socket for a friend of yours while you are sleeping - and have the CTCP processing disabled. The 'u' switch works either + and have the CTCP processing disabled. The [b]u[/b] switch works either in active and passive mode.[br] If the -m switch is passed, the default boolCreateMinimizedDccChat option is overridden with the <boolean> parameter passed. So actually @@ -471,7 +462,7 @@ static bool dcc_kvs_cmd_chat(KviKvsModuleCommandCall * c) It causes the transfer direction to be inverted; your client will receive the file from the remote host instead of sending it.[br] <file size> is the expected file size in bytes. This parameter can be omitted, - and in this case the DCC will "blindly" trust the remote end and assume + and in this case the DCC will [i]blindly[/i] trust the remote end and assume that the file has been transferred correctly when the remote end closes the connection.[br] If you don't pass the -n option, the remote end will receive an informational DCC RECV request, specifying the IP address and the port to connect to.[br] @@ -493,18 +484,15 @@ static bool dcc_kvs_cmd_chat(KviKvsModuleCommandCall * c) If spion had specified the file size, Pragma could use -g=<file size> while setting up the connection, to be able to see the progress indications.[br] If Pragma used the the -n option, the DCC RECV indication wouldn't have been sent, in this case - Pragma would need to communicate the IP address and the port "manually" to spion.[br] - + Pragma would need to communicate the IP address and the port [i]manually[/i] to spion.[br] !sw: -b | --blind Assume that no acknowledges are sent. Assume that the transfer was successful when the whole file has been sent, then close the socket.[br] - This is called a "blind" DCC SEND.[br] - + This is called a [i]blind[/i] DCC SEND.[br] !sw: -t | -tdcc Emulate the TDCC protocol: Use the TDCC CTCP message (DCC TSEND) for requesting the connection and assume that no acknowledges are sent. Wait for the remote end to close the connection.[br] - !sw: -m[=<boolean>] | --minimize[=<boolean>] If the -m switch is passed, the default boolCreateMinimizedDccSend option is overridden with the <boolean> parameter passed. So actually @@ -512,11 +500,9 @@ static bool dcc_kvs_cmd_chat(KviKvsModuleCommandCall * c) if the [fnc]$option[/fnc](boolCreateMinimizedDccSend) returns false.[br] In the same way, by passing -m=0 you will create a non minimized DCC SEND. If no <boolean> value is specified, it defaults to 1.[br] - !sw: -n | --no-ctcp Do [b]not[/b] send the CTCP request to the target user, you will have to do it manually, or the remote user will have to connect manually (for example by using dcc.recv -c).[br] - !sw: -c | --connect Attempt to CONNECT to the remote host specified as <interface> and <port>, instead of listening (active connection instead of a passive one). @@ -526,11 +512,10 @@ static bool dcc_kvs_cmd_chat(KviKvsModuleCommandCall * c) If the 'c' and 'n' switches are missing, this commands needs to be executed in a window that is bound to a connected IRC context (you need a third entity to accomplish the negotiation).[br] - !sw: -i=<interface> | --ip=<interface> Bind the local listening socket to the specified <interface> (which is an IP address, IPv4 or IPv6). If this switch is [b]not[/b] specified, the socket is bound to the interface of - the current IRC connection (if any) or to "127.0.0.1".[br] + the current IRC connection (if any) or to [i]127.0.0.1[/i].[br] You can also specify a local interface name to get the address from (this works only for IPv4 interfaces since IPv6 ones seems to be unsupported by the system ioctl() calls at the moment (for Linux at least)).[br] Here go some examples:[br] @@ -538,16 +523,13 @@ static bool dcc_kvs_cmd_chat(KviKvsModuleCommandCall * c) -i=3ffe:1001::1: this will bind to the IPv6 interface with the specified address.[br] -i=ppp0: this will bind to the IPv4 address of the interface ppp0 (if supported by the underlying system).[br] The -i switch parameter may serve also as a target address when the -c switch is used.[br] - !sw: -p=<port> | --port=<port> Bind the local listening socket to the specified <port>. - If this switch is [b]not[/b] specified, the port will be a "random" one chosen by the kernel.[br] - + If this switch is [b]not[/b] specified, the port will be a [i]random[/i] one chosen by the kernel.[br] !sw: -a=<fake address> | --fake-address=<fake address> Send the <fake address> as target for the remote client in the requesting CTCP message. If this switch is not given, the CTCP will contain the real IP address of the listening interface.[br] - !sw: -f=<fake port> | --fake-port=<fake port> Send the <fake port> as target port for the remote client in the requesting CTCP message. If this switch is not given, the CTCP will contain the real port of the listening socket. @@ -555,16 +537,13 @@ static bool dcc_kvs_cmd_chat(KviKvsModuleCommandCall * c) All these switches are meant to allow maximum flexibility of the DCC negotiation, earlier KVIrc releases had serious problems with firewalled and/or masqueraded machines. With the -a and -f switches - you can work around it.[br] - [br] - + you can work around it.[br][/br] !sw: -u | --unlimited If the 'u' switch is given, the connection attempt will never time out; this might be useful if you want to leave a listening socket for a friend of yours while you are sleeping and have the CTCP processing disabled. The 'u' switch works either in active and passive mode.[br] - !sw: -s | --ssl Use a Secure Socket Layer for the transfer; the whole communication will be encrypted with a private key algorithm after a public key handshake.[br] @@ -576,19 +555,18 @@ static bool dcc_kvs_cmd_chat(KviKvsModuleCommandCall * c) When requesting a SSL based DCC SEND to someone you probably will need a certificate. If you don't have one, create it (for example with CA.pl -newcert) and set it in the options dialog. - @description: Attempts to send the file <filename> to <nickname>.[br] If [filename] is specified it must be an absolute file path, otherwise a file selection dialog is opened.[br] - The simplest case "dcc.send <nickname> <filename>" will work just as in all + The simplest case [i]dcc.send <nickname> <filename>[/i] will work just as in all the other IRC clients, but this command is really more powerful...[br] Before attempting to understand the possibilities of this command, be sure to know how a [doc:dcc_connection]DCC negotiation and connection[/doc] works.[br] The file will be sent as a sequence of packets which must be acknowledged one by one by the active client.[br] - There is a special option (see $option()) called "fast send" (also known - as "send ahead") that makes KVIrc avoid to wait for the acknowledge + There is a special option (see $option()) called [i]fast send[/i] (also known + as [i]send ahead[/i]) that makes KVIrc avoid to wait for the acknowledge of the last packet before sending the next one.[br] Anyway, the connection is declared as successful only when the whole file (all the packets) has been acknowledged.[br] @@ -702,12 +680,10 @@ static bool dcc_kvs_cmd_send(KviKvsModuleCommandCall * c) Assume that no acknowledges are sent. Assume that the transfer was successful when the whole file has been sent, then close the socket.[br] - This is called a "blind" DCC SEND.[br] - + This is called a [i]blind[/i] DCC SEND.[br] !sw: -t | -tdcc Emulate the TDCC protocol: Use the TDCC CTCP message (DCC TSEND) for requesting the connection and assume that no acknowledges are sent. Wait for the remote end to close the connection.[br] - !sw: -m[=<boolean>] | --minimize[=<boolean>] If the -m switch is passed, the default boolCreateMinimizedDccSend option is overridden with the <boolean> parameter passed. So actually @@ -715,15 +691,13 @@ static bool dcc_kvs_cmd_send(KviKvsModuleCommandCall * c) if the [fnc]$option[/fnc](boolCreateMinimizedDccSend) returns false.[br] In the same way, by passing -m=0 you will create a non minimized DCC SEND. If no <boolean> value is specified, it defaults to 1.[br] - !sw: -n | --no-ctcp Do [b]not[/b] send the CTCP request to the target user, you will have to do it manually, or the remote user will have to connect manually (for example by using dcc.recv -c).[br] - !sw: -i=<interface> | --ip=<interface> Bind the local listening socket to the specified <interface> (which is an IP address, IPv4 or IPv6). If this switch is [b]not[/b] specified, the socket is bound to the interface of - the current IRC connection (if any) or to "127.0.0.1".[br] + the current IRC connection (if any) or to [i]127.0.0.1[/i].[br] You can also specify a local interface name to get the address from (this works only for IPv4 interfaces since IPv6 ones seems to be unsupported by the system ioctl() calls at the moment (for Linux at least)).[br] Here go some examples:[br] @@ -731,16 +705,13 @@ static bool dcc_kvs_cmd_send(KviKvsModuleCommandCall * c) -i=3ffe:1001::1: this will bind to the IPv6 interface with the specified address.[br] -i=ppp0: this will bind to the IPv4 address of the interface ppp0 (if supported by the underlying system).[br] The -i switch parameter may serve also as a target address when the -c switch is used.[br] - !sw: -p=<port> | --port=<port> Bind the local listening socket to the specified <port>. - If this switch is [b]not[/b] specified, the port will be a "random" one chosen by the kernel.[br] - + If this switch is [b]not[/b] specified, the port will be a [i]random[/i] one chosen by the kernel.[br] !sw: -a=<fake address> | --fake-address=<fake address> Send the <fake address> as target for the remote client in the requesting CTCP message. If this switch is not given, the CTCP will contain the real IP address of the listening interface.[br] - !sw: -f=<fake port> | --fake-port=<fake port> Send the <fake port> as target port for the remote client in the requesting CTCP message. If this switch is not given, the CTCP will contain the real port of the listening socket. @@ -748,16 +719,14 @@ static bool dcc_kvs_cmd_send(KviKvsModuleCommandCall * c) All these switches are meant to allow maximum flexibility of the DCC negotiation, earlier KVIrc releases had serious problems with firewalled and/or masqueraded machines. With the -a and -f switches - you can work around it.[br] - [br] - + you can work around it. + [br][br] !sw: -u | --unlimited - If the 'u' switch is given, the connection attempt will + If the [b][/b] switch is given, the connection attempt will never time out; this might be useful if you want to leave a listening socket for a friend of yours while you are sleeping and have the CTCP processing disabled. The 'u' switch works either in active and passive mode.[br] - !sw: -s | --ssl Use a Secure Socket Layer for the transfer; the whole communication will be encrypted with a private key algorithm after a public key handshake.[br] @@ -769,7 +738,6 @@ static bool dcc_kvs_cmd_send(KviKvsModuleCommandCall * c) When requesting a SSL based DCC SEND to someone you probably will need a certificate. If you don't have one, create it (for example with CA.pl -newcert) and set it in the options dialog. - !sw: -c | --connect Accepted for compatibility: don't use it! @description: @@ -779,7 +747,7 @@ static bool dcc_kvs_cmd_send(KviKvsModuleCommandCall * c) is a CTCP RECV.[br] This command is the counterpart of [cmd]dcc.send[/cmd] and its parameters are exactly the same, so please refer to that help page for the full discussion. This help page contains only a brief resume of these parameters.[br] - The [doc:dcc_connection]dcc documentation[/doc] explains the DCC RECV subprotocol in detail.[br] + The [doc:dcc_connection]dcc documentation[/doc] explains the DCC RECV sub-protocol in detail.[br] @examples: */ @@ -840,7 +808,6 @@ static bool dcc_kvs_cmd_recv(KviKvsModuleCommandCall * c) @switches: !sw: -t | -tdcc Emulate the TDCC protocol. - !sw: -s | --ssl Use a Secure Socket Layer for the transfer; the whole communication will be encrypted with a private key algorithm after a public key handshake.[br] @@ -861,7 +828,7 @@ static bool dcc_kvs_cmd_recv(KviKvsModuleCommandCall * c) The remote end may acknowledge the request by sending a DCC RECV request. This command effects are similar to [cmd]dcc.send[/cmd], but will work also on machines that can't accept incoming connections (firewalling or masquerading problems).[br] - A 120 seconds file offer is added for the specified file and mask "<nickname>!*@*". + A 120 seconds file offer is added for the specified file and mask [i]<nickname>!*@*[/i]. @examples: */ @@ -922,7 +889,7 @@ static bool dcc_kvs_cmd_rsend(KviKvsModuleCommandCall * c) a TSEND reply.[br] If the -s switch is given, the message will be a DCC SGET, expecting a SSEND reply.[br] - -t and -s can be combined together to obtain a "turbo"+"SSL" extension transfer.[br] + -t and -s can be combined together to obtain a [i]Turbo[/i]+[i]SSL[/i] extension transfer.[br] -s will work only if the KVIrc executable has been compiled with SSL support and the remote client supports it.[br] @examples: @@ -1000,11 +967,9 @@ static bool dcc_kvs_cmd_get(KviKvsModuleCommandCall * c) !sw: -g=<codec> | --codec=<codec> Use the codec specified as parameter. Actually the supported codecs are [i]null[/i], [i]adpcm[/i] and [i]gsm[/i]. - !sw: -h=<rate> | --sample-rate=<rate> Use the sample rate specified by <rage>. Valid sample rates are 8000, 11025, 22050 and 44100 Hz. - !sw: -m[=<boolean>] | --minimize[=<boolean>] If the -m switch is passed, the default boolCreateMinimizedDccSend option is overridden with the <boolean> parameter passed. So actually @@ -1012,25 +977,22 @@ static bool dcc_kvs_cmd_get(KviKvsModuleCommandCall * c) if the [fnc]$option[/fnc](boolCreateMinimizedDccSend) returns false.[br] In the same way, by passing -m=0 you will create a non minimized DCC SEND. If no <boolean> value is specified, it defaults to 1.[br] - !sw: -n | --no-ctcp Do [b]not[/b] send the CTCP request to the target user, you will have to do it manually, or the remote user will have to connect manually (for example by using dcc.recv -c).[br] - !sw: -c | --connect Attempt to CONNECT to the remote host specified as <interface> and <port>, instead of listening (active connection instead of a passive one). In this case the -i and -p switches are mandatory.[br] - The 'c' switch takes precedence over 'n' (In fact both should + The [b]c[/b] switch takes precedence over [b]n[/b] (In fact both should be mutually exclusive).[br] - If the 'c' and 'n' switches are missing, this commands + If the [b]c[/b] and [b]n[/b] switches are missing, this commands needs to be executed in a window that is bound to a connected IRC context (you need a third entity to accomplish the negotiation).[br] - !sw: -i=<interface> | --ip=<interface> Bind the local listening socket to the specified <interface> (which is an IP address, IPv4 or IPv6). If this switch is [b]not[/b] specified, the socket is bound to the interface of - the current IRC connection (if any) or to "127.0.0.1".[br] + the current IRC connection (if any) or to [i]127.0.0.1[/i].[br] You can also specify a local interface name to get the address from (this works only for IPv4 interfaces since IPv6 ones seems to be unsupported by the system ioctl() calls at the moment (for Linux at least)).[br] Here go some examples:[br] @@ -1038,16 +1000,13 @@ static bool dcc_kvs_cmd_get(KviKvsModuleCommandCall * c) -i=3ffe:1001::1: this will bind to the IPv6 interface with the specified address.[br] -i=ppp0: this will bind to the IPv4 address of the interface ppp0 (if supported by the underlying system).[br] The -i switch parameter may serve also as a target address when the -c switch is used.[br] - !sw: -p=<port> | --port=<port> Bind the local listening socket to the specified <port>. - If this switch is [b]not[/b] specified, the port will be a "random" one chosen by the kernel.[br] - + If this switch is [b]not[/b] specified, the port will be a [i]random[/i] one chosen by the kernel.[br] !sw: -a=<fake address> | --fake-address=<fake address> Send the <fake address> as target for the remote client in the requesting CTCP message. If this switch is not given, the CTCP will contain the real IP address of the listening interface.[br] - !sw: -f=<fake port> | --fake-port=<fake port> Send the <fake port> as target port for the remote client in the requesting CTCP message. If this switch is not given, the CTCP will contain the real port of the listening socket. @@ -1057,14 +1016,12 @@ static bool dcc_kvs_cmd_get(KviKvsModuleCommandCall * c) with firewalled and/or masqueraded machines. With the -a and -f switches you can work around it.[br] [br] - !sw: -u | --unlimited If the 'u' switch is given, the connection attempt will never time out; this might be useful if you want to leave a listening socket for a friend of yours while you are sleeping and have the CTCP processing disabled. The 'u' switch works either in active and passive mode.[br] - @description: Attempts a DCC Voice connection to <nickname>.[br] The -g option is used to select the GSM codec, available codecs are [i]gsm[/i], [i]adpcm[/i] and [i]null[/i].[br] @@ -1081,7 +1038,7 @@ static bool dcc_kvs_cmd_get(KviKvsModuleCommandCall * c) the lowest limit is 5 KHz and the upper limit is 44.1 KHz (but some soundcards support 96 KHz). It is also possible that the soundcard can't support a continuous range of frequencies and will select a discrete closest match instead.[br] - The "commonly used" sample rates are 8000, 11025, 22050 and 44100 Hz.[br] + The [i]commonly used[/i] sample rates are 8000, 11025, 22050 and 44100 Hz.[br] The remaining parameters are equivalent to the ones used in [cmd]dcc.send[/cmd], so please refer to that help page for the full discussion. This help page contains only a brief resume of these parameters.[br] @examples: @@ -1386,18 +1343,18 @@ static bool dcc_module_cmd_canvas(KviModule *m,KviCommand *c) 'DCC' stands for Direct Client Connection, it is used to exchange data directly between two IRC clients (with no IRC server in the middle).[br] DCC itself is not a well-defined protocol, but rather a set of - subprotocols with (more or less) standardized rules.[br] + sub-protocols with (more or less) standardized rules.[br] Sub-protocols are also (historically) called [b]DCC types[/b]; this term often leads to confusion and it will become clear later.[br] - Each subprotocol has two main parts: The [b]DCC negotiation[/b] and the [b]DCC transfer[/b].[br] + Each sub-protocol has two main parts: The [b]DCC negotiation[/b] and the [b]DCC transfer[/b].[br] The [b]DCC negotiation[/b] part is used to request the [b]DCC transfer[/b] and define its necessary parameters,[br] while the [b]DCC transfer[/b] part is the real data transfer between clients.[br] The [b]DCC negotiation[/b] requires a third entity that routes the negotiation data between clients, this is usually an IRC server.[br] [br] [big]DCC Negotiation[/big][br] - This part of the protocol is the most tricky and difficult one, and is different for almost every DCC subprotocol.[br] - The "constant" scenario of the negotiation is more or less the following:[br] + This part of the protocol is the most tricky and difficult one, and is different for almost every DCC sub-protocol.[br] + The [i]constant[/i] scenario of the negotiation is more or less the following:[br] There are two IRC clients connected to the same IRC network and they want to exchange some data in a direct client connection.[br] Each client knows the other by nickname only (and eventually by the host displayed by the IRC server, @@ -1411,12 +1368,12 @@ static bool dcc_module_cmd_canvas(KviModule *m,KviCommand *c) The negotiation exchanges these information between clients by using IRC as channel and CTCP messages as encoding method.[br] An example will make things clearer:[br] - DCC chat is the simplest (and most widely implemented) DCC subprotocol: + DCC chat is the simplest (and most widely implemented) DCC sub-protocol: it is used to exchange <cr><lf> separated text data between clients.[br] Assume that you want to establish a DCC chat connection to 'Sarah' that is currently connected to your IRC network (so she/he is an IRC user just like you). - All you have to do is type sth as "/dcc chat Sarah" in your IRC client. + All you have to do is type sth as [i]/dcc chat Sarah[/i] in your IRC client. The client will setup a listening socket on a random port chosen usually by the kernel of your OS. In this case YOU are the [b]passive client[/b], and Sarah is the active one.[br] Once the socket is ready to accept connections, @@ -1432,13 +1389,13 @@ static bool dcc_module_cmd_canvas(KviModule *m,KviCommand *c) Some IRC clients allow modifications of this procedure:[br] First of all, the port to listen on can be specified by the user and not by the kernel; this is useful when the passive client - is behind a firewall that "shades" some sets of ports. + is behind a firewall that [i]shades[/i] some sets of ports. The IP address for the listening socket can be specified by the user as well (especially when the machine has more than one network interface).[br] A more challenging trick is to listen on a specified IP address and port and notify different ones to the remote user (e.g. <ip_address> and <port> parameters of the CTCP message are not the ones that the client is listening on). - This is especially useful with "transparent proxy" firewalls that + This is especially useful with [i]transparent proxy[/i] firewalls that often are not transparent enough to allow the DCC connections. (If you have one of these firewalls you know what I'm talking about, otherwise just read on). KVIrc allows to avoid the usage of a third entity @@ -1450,23 +1407,23 @@ static bool dcc_module_cmd_canvas(KviModule *m,KviCommand *c) Is everything clear?...I don't think so... my English is really bad... [br] [big]DCC Transfer[/big][br] - The DCC transfer part is different for every DCC subprotocol, but + The DCC transfer part is different for every DCC sub-protocol, but it always happens over a direct client to client TCP connection.[br] [br] - [big]DCC Subprotocols[/big][br] - There are two main standardized DCC subprotocols that are widely implemented in IRC clients: + [big]DCC Sub-protocols[/big][br] + There are two main standardized DCC sub-protocols that are widely implemented in IRC clients: [b]DCC chat[/b] and [b]DCC SEND[/b].[br] DCC chat is quite simple and the protocol is more or less completely defined.[br] DCC SEND is a *real mess*, the original definition was not very flexible so many IRC clients tried to enhance both the negotiation and the transfer, leading often to incompatible implementations. (I can remember the Turbo File Transfer implemented by VIrc, the Send-Ahead enhancement implemented in many clients, the RESUME facility...)[br] - Many clients introduced new DCC subprotocols with non-standard implementations, + Many clients introduced new DCC sub-protocols with non-standard implementations, leading again to client incompatibility.[br] - Some of the notable subprotocols are DCC Voice, DCC Draw, DCC Whiteboard...[br] + Some of the notable sub-protocols are DCC Voice, DCC Draw, DCC Whiteboard...[br] [br] [big]DCC Chat[/big][br] - This is the simplest and most standardized DCC subprotocol. Almost every IRC client implements it.[br] + This is the simplest and most standardized DCC sub-protocol. Almost every IRC client implements it.[br] It is used to exchange lines of text between the two clients.[br] The negotiation is quite simple, we assume that [b]client A[/b] wants to establish a DCC chat connection to [b]client B[/b]. [b]client A[/b] sets up a listening socket and retrieves its address (IP address and port).[br] @@ -1475,8 +1432,8 @@ static bool dcc_module_cmd_canvas(KviModule *m,KviCommand *c) Where <ipaddress> is a string representing an positive integer that is the A socket's IP address in network byte order, and where <port> is a string representing an positive integer that is the A socket's port.[br] - The original purpose of the second "chat" string in the CTCP request is quite obscure, it was probably - introduced to have the <ipaddress> as second parameter, as in the DCC SEND subprotocol.[br] + The original purpose of the second [i]chat[/i] string in the CTCP request is quite obscure, it was probably + introduced to have the <ipaddress> as second parameter, as in the DCC SEND sub-protocol.[br] [b]client B[/b] receives the CTCP, parses it, eventually asks the user for permission and connects to the specified IP address and port. The transfer protocol is quite simple, both clients can send text lines separated by <cr><lf> pairs.[br] @@ -1489,12 +1446,12 @@ static bool dcc_module_cmd_canvas(KviModule *m,KviCommand *c) standard string representation of the IP address... missing inet_aton() function on the target system?).[br] KVIrc adds the Secure Sockets Layer to the DCC chat protocol. In this case the negotiation string becomes:[br] [b]DCC SCHAT chat <ipaddress> <port>[/b][br] - where "SCHAT" stands for Secure CHAT.[br] The external protocol is exactly the same but is built on top of a Secure Sockets Layer + where [i]SCHAT[/i] stands for Secure CHAT.[br] The external protocol is exactly the same but is built on top of a Secure Sockets Layer implementation (specifically OpenSSL). The connection will be encrypted with a private key algorithm after a public key handshake.[br] [br] [big]DCC SEND[/big][br] - DCC SEND is another standard subprotocol. Most clients implement this as well, many have tried + DCC SEND is another standard sub-protocol. Most clients implement this as well, many have tried to enhance it.[br] The basic DCC SEND protocol allows transferring a file from the requesting client to the receiving client.[br] The requesting client (the one that sends the file) is always passive and the receiving client is always active.[br] @@ -1503,7 +1460,7 @@ static bool dcc_module_cmd_canvas(KviModule *m,KviCommand *c) [b]client A[/b] sets up a listening socket and retrieves its IP address and port.[br] [b]client A[/b] sends a CTCP request to [b]client B[/b] in the following form:[br] [b]DCC SEND <filename> <ipaddress> <port> <filesize>[/b][br] - <ipaddress> and <port> have the same semantics as in the DCC chat subprotocol.[br] + <ipaddress> and <port> have the same semantics as in the DCC chat sub-protocol.[br] <filename> is the name (without path!) of the file to be sent, and <filesize> is (yeah), the file size.[br] [b]client B[/b] receives the CTCP, parses it, eventually asks the user for confirmation and connects to the specified IP address and port; the transfer then begins.[br] @@ -1512,17 +1469,17 @@ static bool dcc_module_cmd_canvas(KviModule *m,KviCommand *c) of the file received up to that moment.[br] The transmission closes when the last acknowledge is received by [b]client A[/b].[br] The acknowledges were meant to include some sort of coherency check in the transmission, but in fact - no client can "recover" from an acknowledge error/desync, all of them just close the connection declaring the + no client can [i]recover[/i] from an acknowledge error/desync, all of them just close the connection declaring the transfer as failed (the situation is even worse in fact, often acknowledge errors aren't even detected!).[br] Since the packet-acknowledge round trip eats a lot of time, many clients included - the "send-ahead" feature; the [b]client A[/b] does [b]not[/b] wait for the acknowledge of the first packet before sending the second one.[br] + the [i]send-ahead[/i] feature; the [b]client A[/b] does [b]not[/b] wait for the acknowledge of the first packet before sending the second one.[br] The acknowledges are still sent, but just a reverse independent stream.[br] This makes the DCC SEND considerably faster.[br] Since the acknowledge stream has non-zero bandwidth usage, no client can recover from an acknowledge error and - having them as an independent stream is more or less like having no acknowledges, the "Turbo" ( :) ) extension has been added: + having them as an independent stream is more or less like having no acknowledges, the [i]Turbo[/i] ( :) ) extension has been added: [b]client B[/b] will send no acknowledges and will just close the connection when he has received all the expected data.[br] This makes the DCC SEND as fast as FTP transfers.[br] - The "Turbo" extension is specified during the negotiation phase, bu using TSEND as DCC message type (instead of SEND).[br] - The "Turbo" extension is not widely implemented.[br] + The [i]Turbo[/i] extension is specified during the negotiation phase, bu using TSEND as DCC message type (instead of SEND).[br] + The [i]Turbo[/i] extension is not widely implemented.[br] Later implementations have added the support for resuming interrupted DCC SEND transfers:[br] [b]client A[/b] sets up the socket and sends the CTCP request as before.[br] If [b]client B[/b] discovers that the file has been partially received in a previous DCC SEND session it sends @@ -1533,19 +1490,19 @@ static bool dcc_module_cmd_canvas(KviModule *m,KviCommand *c) [b]client A[/b] receives the request, parses it and eventually replies with:[br] [b]DCC ACCEPT <filename> <port> <resume position>[/b][br] [b]client B[/b] receives the ACCEPT message, connects to [b]client A[/b] and the transfer initiates as before.[br] - The "Send-ahead" and "Turbo" extensions can obviously be used also in this case (But 'T' is [b]not[/b] prepended to the RESUME and ACCEPT messages).[br] - The IPv6 extension can be used also in this subprotocol, so <ipaddress> can be also an IPv6 address in hexadecimal notation.[br] + The [i]Send-ahead[/i] and [i]Turbo[/i] extensions can obviously be used also in this case (But [b]T[/b] is [b]not[/b] prepended to the RESUME and ACCEPT messages).[br] + The IPv6 extension can be used also in this sub-protocol, so <ipaddress> can be also an IPv6 address in hexadecimal notation.[br] KVIrc introduces the SSL extension also to DCC SEND. The protocol remains the same again but it is built on top of a Secure Sockets Layer implementation just like DCC chat.[br] With SSL the negotiation string becomes:[br] [b]DCC SSEND <filename> <ipaddress> <port> <filesize>[/b][br] - where "SSEND" stands for Secure SEND.[br] - The "turbo" extension can be combined with the SSL extension too. In this case the second parameter - of the negotiation string must be "TSSEND" or "STSEND".[br] + where [i]SSEND[/i] stands for Secure SEND.[br] + The [i]Turbo[/i] extension can be combined with the SSL extension too. In this case the second parameter + of the negotiation string must be [i]TSSEND[/i] or [i]STSEND[/i].[br] [br] [big]DCC RECV[/big][br] DCC RECV is the counterpart of DCC SEND. This is a KVIrc extension and is not standard yet.[br] - The purpose of this subprotocol will not be immediately clear, but read on for an explanation.[br] + The purpose of this sub-protocol will not be immediately clear, but read on for an explanation.[br] It is used to request a file from another client; we assume that [b]client A[/b] knows that [b]client B[/b] has a specific file and is able/wants to send it.[br] [b]client A[/b] sets up a listening socket, retrieves its address and port and then @@ -1557,38 +1514,38 @@ static bool dcc_module_cmd_canvas(KviModule *m,KviCommand *c) [b]client B[/b] receives the CTCP message, parses it, looks for the file to send (in some unspecified way) and connects to the specified IP address and port. The transfer then begins just as in the DCC SEND, but in the inverse way: [b]client B[/b] sends blocks of data to [b]client A[/b] and [b]client B[/b] sends back acknowledges.[br] - This subprotocol is useful in transferring data from clients that are behind a firewall and are not able to accept + This sub-protocol is useful in transferring data from clients that are behind a firewall and are not able to accept incoming connections (this is not possible with a normal DCC SEND). In this case the client that receives the file is passive and the client that sends it is active (as opposite to DCC SEND).[br] - The "Send ahead" extension can be used also in this case and the "Turbo" extension is activated by prepending a 'T' to the - DCC message, "TRECV" instead of "RECV". The SSL extension is activated by prepending an 'S' to the - DCC message, "SRECV", "STRECV" or "TSRECV".[br] - This subprotocol has an implicit resume capability and thus has no need for RESUME and ACCEPT messages.[br] + The [i]Send ahead[/i] extension can be used also in this case and the [i]Turbo[/i] extension is activated by prepending a [b]T[/b] to the + DCC message, [i]TRECV[/i] instead of [i]RECV[/i]. The SSL extension is activated by prepending an [b]S[/b] to the + DCC message, [i]SRECV", [i]STRECV[/i] or [i]TSRECV[/i].[br] + This sub-protocol has an implicit resume capability and thus has no need for RESUME and ACCEPT messages.[br] DCC RECV requires the initiating (passive) client to know that the file to be transferred is available on the B's side - and probably also know the file size. This subprotocol does not specify how this information is obtained, but it + and probably also know the file size. This sub-protocol does not specify how this information is obtained, but it will become clear soon that it can be obtained either manually (User B can simply tell the info to User A), - or automatically (as in the DCC RSEND subprotocol (keep reading)).[br] + or automatically (as in the DCC RSEND sub-protocol (keep reading)).[br] [br] [big]DCC RSend[/big][br] DCC RSend stands for Reverse Send. This is a KVIrc extension to the SEND protocol to allow firewalled clients - to send files.[br] In fact, this is a "half" subprotocol, since it defines only a part of the DCC negotiation; - the transfer is defined by another subprotocol (and specifically bu DCC RECV).[br] + to send files.[br] In fact, this is a [i]half[/i] sub-protocol, since it defines only a part of the DCC negotiation; + the transfer is defined by another sub-protocol (and specifically bu DCC RECV).[br] The requesting client (the one that sends the file) is active and the receiving client is passive.[br] Assume that [b]client A[/b] wants to send a file to [b]client B[/b] and that [b]client A[/b] cannot accept incoming connections.[br] [b]client A[/b] sends a CTCP request to [b]client B[/b] in the following form:[br] [b]DCC RSEND <filename> <filesize>[/b][br] [b]client B[/b] receives the request, parses it, eventually asks the user for confirmation, sets up a listening socket, retrieves - its IP address and port and switches to the DCC RECV subprotocol by effectively sending the following CTCP message:[br] + its IP address and port and switches to the DCC RECV sub-protocol by effectively sending the following CTCP message:[br] [b]DCC RECV <filename> <ipaddress> <port> <resume position>[/b][br] - The rest of the transfer is defined by the DCC RECV subprotocol.[br] - The "Turbo" extension is again activated by prepending a 'T' to the RSEND string, so the initial CTCP will become:[br] + The rest of the transfer is defined by the DCC RECV sub-protocol.[br] + The [i]Turbo[/i] extension is again activated by prepending a [b]T[/b] to the RSEND string, so the initial CTCP will become:[br] [b]DCC TRSEND <filename> <filesize>[/b][br] - The "SSL" extension is also activated by prepending an 'S' to the RSEND string. It can be again combined - with the "turbo" extension. The negotiation parameter becomes then "SRSEND","TSRSEND" or "STRSEND".[br] + The [i]SSL[/i] extension is also activated by prepending an [b]S[/b] to the RSEND string. It can be again combined + with the [i]Turbo[/i] extension. The negotiation parameter becomes then [i]SRSEND[/i], [i]TSRSEND[/i] or [i]STRSEND[/i].[br] Easy, no? :)[br] [br] [big]DCC Get[/big][br] - This is again a "half" subprotocol in fact since it defines only a part of the negotiation for file transfers.[br] + This is again a [i]half[/i] sub-protocol in fact since it defines only a part of the negotiation for file transfers.[br] It is also NON standard, since actually no client except KVIrc implements it (AFAIK).[br] DCC Get is used to request a file from a remote client. Assume that [b]client A[/b] wants to request a file from [b]client B[/b] (and assume that [b]client A[/b] knows that B has that file and wants to send it).[br] @@ -1596,23 +1553,23 @@ static bool dcc_module_cmd_canvas(KviModule *m,KviCommand *c) [b]DCC GET <filename>[/b][br] Where <filename> is a name of a file without path.[br] [b]client B[/b] receives the message, parses it, looks for an association of the <filename> to a real filesystem file - and starts one of the two DCC file transfer subprotocols, DCC SEND or DCC RSEND.[br] + and starts one of the two DCC file transfer sub-protocols, DCC SEND or DCC RSEND.[br] [b]client B[/b] should prefer the DCC SEND method and choose DCC RSEND only if it is not able to accept incoming connections.[br] - This subprotocol can be used by firewalled clients that can't accept connections but still want to request a file + This sub-protocol can be used by firewalled clients that can't accept connections but still want to request a file from another client, this one can fail only if both clients are firewalled (in this case no DCC transfer is possible at all).[br] - This subprotocol also does not need to "magically" know the file size, the size definition - is found in the subprotocol that the remote client will choose.[br] - The association of <filename> with a real file on the B's machine is not explicitly defined by the subprotocol; - KVIrc uses an internal "file-offer" table with a list of files that are available for download.[br] - The "turbo" and "SSL" extensions are activated as usual, "TGET", "SGET", "TSGET" and "STGET" are supported.[br] + This sub-protocol also does not need to [i]magically[/i] know the file size, the size definition + is found in the sub-protocol that the remote client will choose.[br] + The association of <filename> with a real file on the B's machine is not explicitly defined by the sub-protocol; + KVIrc uses an internal [i]file-offer[/i] table with a list of files that are available for download.[br] + The [i]Turbo[/i] and [i]SSL[/i] extensions are activated as usual, [i]TGET[/i], [i]SGET[/i], [i]TSGET[/i] and [i]STGET[/i] are supported.[br] [br] [big]DCC File Transfer[/big][br] DCC SEND: Send a file, sender is passive, receiver is active (not good for firewalled senders)[br] DCC RECV: Receive a file, sender is active, receiver is passive (not good for firewalled receivers)[br] DCC RSEND: Send a file, sender is active, receiver is passive (not good for firewalled receivers)[br] DCC GGET: Receive a file, sender is passive if not firewalled, receiver active if sender not firewalled (will fail only if both are firewalled)[br] - The "turbo" extension disables the stream of acknowledges and is activated by prepending the 'T' character to the DCC subprotocol name[br] - The "SSL" extension causes a Secure Socket Layer to be used and is activated by prepending the 'S' character to the DCC subprotocol name[br] + The [i]Turbo[/i] extension disables the stream of acknowledges and is activated by prepending the 'T' character to the DCC sub-protocol name[br] + The [i]SSL[/i] extension causes a Secure Socket Layer to be used and is activated by prepending the 'S' character to the DCC sub-protocol name[br] [br] [big]DCC Voice[/big][br] DCC Voice is a KVIrc extension (there is a Windows client called VIrc that implements such @@ -1622,11 +1579,11 @@ static bool dcc_module_cmd_canvas(KviModule *m,KviCommand *c) KVIrc currently supports the ADPCM (core support) and the GSM codec (if the libgsm is available on the target system).[br] [b]TODO: Finish the DCC Voice doc :)[/b] [big]More tricks[/big][br] - KVIrc supports another "hack" to the DCC negotiation, it recognizes "XDCC" as + KVIrc supports another [i]hack[/i] to the DCC negotiation, it recognizes [i]XDCC[/i] as a DCC negotiation CTCP parameter.[br] This can be used to circumvent limitations of some IRC clients (read mIRC) that will not allow you to send a /DCC GET since it is an unrecognized DCC type.[br] - "XDCC" has exactly the same meaning as "DCC" (at least in KVIrc).[br] + [i]XDCC[/i] has exactly the same meaning as [i]DCC[/i] (at least in KVIrc).[br] */ static DccDescriptor * dcc_kvs_find_dcc_descriptor(const kvs_uint_t &uId,KviKvsModuleRunTimeCall * c,bool bWarn = true) @@ -1780,8 +1737,8 @@ static bool dcc_kvs_fnc_protocol(KviKvsModuleFunctionCall * c) <string> $dcc.connectionType(<dcc_id:uint>) @description: Returns the connection type of the specified DCC session.[br] - Returns the string "ACTIVE" for active DCC connections - and the string "PASSIVE" for passive DCC connections. + Returns the string [i]ACTIVE[/i] for active DCC connections + and the string [i]PASSIVE[/i] for passive DCC connections. If <dcc_id> is omitted then the DCC Session associated with the current window is assumed.[br] If <dcc_id> is not a valid DCC session identifier (or it is omitted @@ -1816,8 +1773,8 @@ static bool dcc_kvs_fnc_connectionType(KviKvsModuleFunctionCall * c) <boolean> $dcc.isFileTransfer <boolean> $dcc.isFileTransfer(<dcc_id:uint>) @description: - Returns 1 if the specified DCC - is a file transfer and 0 otherwise.[br] + Returns [b]1[/b] if the specified DCC + is a file transfer and [b]0[/b] otherwise.[br] If <dcc_id> is omitted then the DCC Session associated with the current window is assumed.[br] If <dcc_id> is not a valid DCC session identifier (or it is omitted @@ -1852,8 +1809,8 @@ static bool dcc_kvs_fnc_isFileTransfer(KviKvsModuleFunctionCall * c) <boolean> $dcc.isFileUpload <boolean> $dcc.isFileUpload(<dcc_id:uint>) @description: - Returns 1 if the specified DCC - is an upload file transfer and 0 otherwise.[br] + Returns [b]1[/b] if the specified DCC + is an upload file transfer and [b]0[/b] otherwise.[br] If <dcc_id> is omitted then the DCC Session associated with the current window is assumed.[br] If <dcc_id> is not a valid DCC session identifier (or it is omitted @@ -1888,8 +1845,8 @@ static bool dcc_kvs_fnc_isFileUpload(KviKvsModuleFunctionCall * c) <boolean> $dcc.isFileDownload <boolean> $dcc.isFileDownload(<dcc_id:uint>) @description: - Returns 1 if the specified DCC - is a download file transfer and 0 otherwise.[br] + Returns [b]1[/b] if the specified DCC + is a download file transfer and [b]0[/b] otherwise.[br] If <dcc_id> is omitted then the DCC Session associated with the current window is assumed.[br] If <dcc_id> is not a valid DCC session identifier (or it is omitted @@ -2458,8 +2415,8 @@ static bool dcc_kvs_fnc_ircContext(KviKvsModuleFunctionCall * c) <string> $dcc.transferStatus(<dcc_id:uint>) @description: Returns the status in the specified DCC session.[br] - The status is one of the strings "connecting", "transferring", "success" and "failure". - "success" and "failure" are reported when the transfer is terminated. + The status is one of the strings [i]connecting", [i]transferring[/i], [i]success[/i] and [i]failure[/i]. + [i]success[/i] and [i]failure[/i] are reported when the transfer is terminated. If <dcc_id> is omitted then the DCC session associated with the current window is assumed.[br] If <dcc_id> is not a valid DCC session identifier (or it is omitted @@ -2511,7 +2468,7 @@ static bool dcc_kvs_fnc_transferStatus(KviKvsModuleFunctionCall * c) and the current window has no associated DCC session) then this function prints a warning and returns an empty string.[br] If the DCC session does not refer to a file transfer then - this function returns 0.[br] + this function returns [b]0[/b].[br] See the [module:dcc]dcc module[/module] documentation for more information.[br] */ @@ -2557,7 +2514,7 @@ static bool dcc_kvs_fnc_transferredBytes(KviKvsModuleFunctionCall * c) and the current window has no associated DCC session) then this function prints a warning and returns an empty string.[br] If the DCC session does not refer to a file transfer then - this function returns 0.[br] + this function returns [b]0[/b].[br] See the [module:dcc]dcc module[/module] documentation for more information.[br] */ @@ -2599,7 +2556,7 @@ static bool dcc_kvs_fnc_averageSpeed(KviKvsModuleFunctionCall * c) Returns the DCC session identifier associated with the DCC window specified by <window_id>. If <window_id> is omitted then the DCC session identifier associated with the current window is returned. If the specified window - has no associated DCC session then a warning is printed and 0 is returned.[br] + has no associated DCC session then a warning is printed and [b]0[/b] is returned.[br] */ static bool dcc_kvs_fnc_session(KviKvsModuleFunctionCall * c) @@ -2723,8 +2680,8 @@ static bool dcc_kvs_fnc_sessionList(KviKvsModuleFunctionCall * c) $dcc.getSSLCertInfo(<query:string>[,<type:string='remote'>[,<dcc_id:integer>[,<param1:string>]]]) @description: Returns the requested information about certificates used in an SSL enabled DCC session.[br] - The second <type> parameter can be "local" or "remote", and refers to the certificate you want - to query the information from; if omitted, it defaults to "remote".[br] + The second <type> parameter can be [i]local[/i] or [i]remote[/i], and refers to the certificate you want + to query the information from; if omitted, it defaults to [i]remote[/i].[br] If <dcc_id> is omitted then the DCC Session associated with the current window is assumed.[br] If <dcc_id> is not a valid DCC session identifier (or it is omitted and the current window has no associated DCC session) then this function prints a warning and returns an empty string.[br] @@ -2754,7 +2711,7 @@ static bool dcc_kvs_fnc_sessionList(KviKvsModuleFunctionCall * c) [li]fingerprintIsValid[/li] [li]fingerprintDigestId[/li] [li]fingerprintDigestStr[/li] - [li]fingerprintContents * accepts parameter interpreted as "digest name"[/li] + [li]fingerprintContents * accepts parameter interpreted as [i]digest name[/i][/li] [/ul] @examples: [example] diff --git a/src/modules/dialog/libkvidialog.cpp b/src/modules/dialog/libkvidialog.cpp index e3cbb73e5..17a2ef09b 100644 --- a/src/modules/dialog/libkvidialog.cpp +++ b/src/modules/dialog/libkvidialog.cpp @@ -162,14 +162,14 @@ void KviKvsCallbackMessageBox::done(int code) to be the escape button of the dialog.[br] <magic1>, <magic2>... are the magic parameters - evaluated at dialog.message call time and passed to the <callback_command> as positional parameters.[br] - If the -b or -modal switch is specified the dialog will have blocking modal behavior - + If the -b or -modal switch is specified the dialog will have blocking modal behaviour - it will appear above its parent widget and block its input until the dialog is closed.[br] Once the dialog is displayed, the user will click one of the buttons. At this point the dialog is hidden and the <callback_command> is executed, passing the number of the button clicked - as $0 and the magic parameters as positional parameters $1, $2, $3....[br] + as $0 and the magic parameters as positional parameters $1, $2, $3.[br] @examples: [example] - [comment]//Just a warning dialog[/comment] + [comment]# Just a warning dialog[/comment] dialog.message("Warning","You're being <b>warned</b>",warning,"OK"){ echo The user clicked OK; } [comment]# A question[/comment] dialog.message("And now?","What do you want to do?",information,"Go home","Watch TV","Scream") @@ -467,7 +467,7 @@ void KviKvsCallbackTextInput::showEvent(QShowEvent *e) as $0, and the magic parameters as positional parameters $2, $3, $4....[br] @examples: [example] - [comment]//We need a single line reason[/comment] + [comment]# We need a single line reason[/comment] dialog.textinput -d="Working!" (Away,Please enter the away message,"OK","Cancel") { switch($0) diff --git a/src/modules/file/libkvifile.cpp b/src/modules/file/libkvifile.cpp index d07ac9d15..2ff9022f1 100644 --- a/src/modules/file/libkvifile.cpp +++ b/src/modules/file/libkvifile.cpp @@ -86,6 +86,7 @@ @seealso: [cmd]file.rename[/cmd], [fnc]$file.exists[/fnc] */ + static bool file_kvs_cmd_copy(KviKvsModuleCommandCall * c) { QString szSrc,szDst; @@ -125,6 +126,7 @@ static bool file_kvs_cmd_copy(KviKvsModuleCommandCall * c) @seealso: [cmd]file.delimagepath[/cmd] */ + static bool file_kvs_cmd_addimagepath(KviKvsModuleCommandCall * c) { QString szDst; @@ -157,6 +159,7 @@ static bool file_kvs_cmd_addimagepath(KviKvsModuleCommandCall * c) @seealso: [cmd]file.addimagepath[/cmd] */ + static bool file_kvs_cmd_delimagepath(KviKvsModuleCommandCall * c) { QString szDst; @@ -192,7 +195,7 @@ static bool file_kvs_cmd_delimagepath(KviKvsModuleCommandCall * c) Causes the file to be written in the local 8-bit character set instead of the default UTF-8. @description: Writes <data> (which is a string of characters) to the file <filename>.[br] - It does NOT append a trailing LF character: if you want it you must explicitly specify it in the <data> parameter.[br] + It does [b]not[/b] append a trailing LF character: if you want it you must explicitly specify it in the <data> parameter.[br] -a causes the command to append the <data> to the file instead of overwriting the entire file.[br] The path is adjusted according to the system that KVIrc is running on so you don't have to bother about portability: it [i]should[/i] be automatically @@ -204,6 +207,7 @@ static bool file_kvs_cmd_delimagepath(KviKvsModuleCommandCall * c) @seealso: [cmd]file.rename[/cmd], [fnc]$file.exists[/fnc] */ + static bool file_kvs_cmd_write(KviKvsModuleCommandCall * c) { QString szFileName,szData; @@ -257,6 +261,7 @@ static bool file_kvs_cmd_write(KviKvsModuleCommandCall * c) @seealso: [cmd]file.rename[/cmd], [fnc]$file.exists[/fnc], [fnc]$file.write[/fnc] */ + static bool file_kvs_cmd_writeBytes(KviKvsModuleCommandCall * c) { QString szFileName; @@ -325,6 +330,7 @@ static bool file_kvs_cmd_writeBytes(KviKvsModuleCommandCall * c) @seealso: [cmd]file.copy[/cmd], [fnc]$file.exists[/fnc] */ + static bool file_kvs_cmd_rename(KviKvsModuleCommandCall * c) { QString szOld,szNew; @@ -369,6 +375,7 @@ static bool file_kvs_cmd_rename(KviKvsModuleCommandCall * c) @seealso: [fnc]$file.exists[/fnc] */ + static bool file_kvs_cmd_mkdir(KviKvsModuleCommandCall * c) { QString szDir; @@ -408,6 +415,7 @@ static bool file_kvs_cmd_mkdir(KviKvsModuleCommandCall * c) @seealso: [fnc]$file.exists[/fnc] */ + static bool file_kvs_cmd_remove(KviKvsModuleCommandCall * c) { QString szName; @@ -449,6 +457,7 @@ static bool file_kvs_cmd_remove(KviKvsModuleCommandCall * c) [fnc]$file.exists[/fnc] [cmd]file.remove[/cmd] */ + static bool file_kvs_cmd_rmdir(KviKvsModuleCommandCall * c) { QString szName; @@ -485,6 +494,7 @@ static bool file_kvs_cmd_rmdir(KviKvsModuleCommandCall * c) echo $file.exists(/etc/passwd); [/example] */ + static bool file_kvs_fnc_exists(KviKvsModuleFunctionCall * c) { QString szName; @@ -508,10 +518,11 @@ static bool file_kvs_fnc_exists(KviKvsModuleFunctionCall * c) @syntax: <string> $file.type(<filename:string>) @description: - Returns "f" if the <filename> points to a real file, "d" if <filename> - is the name of a directory or "l" if it is a symbolic link.[br] + Returns [b]f[/b] if the <filename> points to a real file, [b]d[/b] if <filename> + is the name of a directory or [b]l[/b] if it is a symbolic link.[br] The <filename> should be an UNIX style file path and is adjusted according to the system that KVIrc is running on.[br] */ + static bool file_kvs_fnc_type(KviKvsModuleFunctionCall * c) { QString szName; @@ -541,9 +552,10 @@ static bool file_kvs_fnc_type(KviKvsModuleFunctionCall * c) <integer> $file.size(<filename:string>) @description: Returns the size of the file pointed by <filename>.[br] - If the file does not exist, this function returns 0.[br] + If the file does not exist, this function returns [b]0[/b].[br] The <filename> should be an UNIX style file path and is adjusted according to the system that KVIrc is running on.[br] */ + static bool file_kvs_fnc_size(KviKvsModuleFunctionCall * c) { QString szName; @@ -565,11 +577,12 @@ static bool file_kvs_fnc_size(KviKvsModuleFunctionCall * c) @short: Returns the size of each file in a specified directory. @syntax: - <array> $file.allSize(<dirname:string>) + <array> $file.allSize(<dirname:string>) @description: - Returns the size of each file in a specified directory as an array.[br] - This function is not recursive: it won't return the size of files in subdirectories of <dirname>. + Returns the size of each file in a specified directory as an array.[br] + This function is not recursive: it won't return the size of files in subdirectories of <dirname>. */ + static bool file_kvs_fnc_allSizes(KviKvsModuleFunctionCall * c) { QString szDir; @@ -618,17 +631,18 @@ static bool file_kvs_fnc_allSizes(KviKvsModuleFunctionCall * c) <string> $file.fixpath(<filename:string>) @description: Returns the <filename> adjusted to match the current operating - system file path conventions.[br] This means that on UNIX, a path like "C:\folder\file.mp3" - will be returned as "/folder/file.mp3" and vice-versa.[br] + system file path conventions.[br] This means that on UNIX, a path like [i]C:\folder\file.mp3[/i] + will be returned as [i]/folder/file.mp3[/i] and vice-versa.[br] There is a minor problem with UNIX paths converted to the windows system: UNIX - has no "drive" concept thus the UNIX paths do not contain a drive. KVIrc will - always map the paths to the "default" C: drive.[br] + has no [i]drive[/i] concept thus the UNIX paths do not contain a drive. KVIrc will + always map the paths to the [i]default[/i] C: drive.[br] This is a good reason to avoid using absolute hard-coded paths :).[br] Please note that you [b]don't need[/b] to call this function on paths that you pass to the other file.* functions: they are adjusted automatically.[br] @seealso: [fnc]$file.ps[/fnc] */ + static bool file_kvs_fnc_fixpath(KviKvsModuleFunctionCall * c) { QString szName; @@ -652,10 +666,11 @@ static bool file_kvs_fnc_fixpath(KviKvsModuleFunctionCall * c) <string> $file.ps() @description: Returns the file path separator for the current operating system.[br] - On windows, '\' is returned, on UNIX, '/'.[br] + On windows, [b]\[/b] is returned, on UNIX, [b]/[/b].[br] @seealso: [fnc]$file.fixpath[/fnc] */ + static bool file_kvs_fnc_ps(KviKvsModuleFunctionCall * c) { c->returnValue()->setString(QString(QChar(KVI_PATH_SEPARATOR_CHAR))); @@ -676,21 +691,23 @@ static bool file_kvs_fnc_ps(KviKvsModuleFunctionCall * c) Returns the listing of the specified directory as an array.[br] The <directory> should be a UNIX style file path and is adjusted according to the system that KVIrc is running on.[br] <flags> may be a combination of the following characters:[br] - d: list directories[br] - f: list files[br] - l: list symbolic links[br] - r: list readable files[br] - w: list writable files[br] - x: list executable files[br] - h: list hidden files[br] - s: list system files[br] - n: sort files by name[br] - t: sort files by file time[br] - b: sort files by file size[br] - z: put the directories first, then the files[br] - k: invert sort order[br] - i: case insensitive sort[br] - If <flags> is empty then a default of 'dfrwxhs' is set.[br] + [pre] + [b]d:[/b] list directories[br] + [b]f:[/b] list files[br] + [b]l:[/b] list symbolic links[br] + [b]r:[/b] list readable files[br] + [b]w:[/b] list writable files[br] + [b]x:[/b] list executable files[br] + [b]h:[/b] list hidden files[br] + [b]s:[/b] list system files[br] + [b]n:[/b] sort files by name[br] + [b]t:[/b] sort files by file time[br] + [b]b:[/b] sort files by file size[br] + [b]z:[/b] put the directories first, then the files[br] + [b]k:[/b] invert sort order[br] + [b]i:[/b] case insensitive sort[br] + [/pre] + If <flags> is empty then a default of [b]dfrwxhs[/b] is set.[br] If none of the r,w,x flags are set then KVIrc sets all of them by default.[br] If <namefilter> is passed then it is interpreted as a wildcard string that must match the entries to be returned.[br] @@ -704,6 +721,7 @@ static bool file_kvs_fnc_ps(KviKvsModuleFunctionCall * c) [cmd]foreach[/cmd](%f,%dir[])echo %f [/example] */ + static bool file_kvs_fnc_ls(KviKvsModuleFunctionCall * c) { QString szDir,szFlags,szFilter; @@ -792,8 +810,8 @@ static bool file_kvs_fnc_ls(KviKvsModuleFunctionCall * c) allocating memory, before attempting to read anything)[br] An empty string is returned if a serious error occurs.[br] The <filename> is adjusted according to the system that KVIrc is running on.[br] - Flags are actually limited to the single letter 'l'. By default the file - is decoded from the UTF-8 characters set. If 'l' is present the the file + Flags are actually limited to the single letter [b]l[/b]. By default the file + is decoded from the UTF-8 characters set. If [b]l[/b] is present the the file is decoded by using the local 8-bit character set instead. @examples: [example] @@ -802,6 +820,7 @@ static bool file_kvs_fnc_ls(KviKvsModuleFunctionCall * c) @seealso: [fnc]$file.readBytes[/fnc] */ + static bool file_kvs_fnc_read(KviKvsModuleFunctionCall * c) { QString szNameZ; @@ -884,7 +903,7 @@ static bool file_kvs_fnc_read(KviKvsModuleFunctionCall * c) WARNING: always check the file size before attempting to read a whole file... reading a CDROM ISO image may sit down your system :) (and will probably crash while allocating memory, before attempting to read anything)[br] - An empty array (or just "nothing") is returned if a serious error occurs.[br] + An empty array (or just [i]nothing[/i]) is returned if a serious error occurs.[br] The <filename> is adjusted according to the system that KVIrc is running on.[br] @examples: [example] @@ -893,6 +912,7 @@ static bool file_kvs_fnc_read(KviKvsModuleFunctionCall * c) @seealso: [fnc]$file.read[/fnc], [cmd]file.writeBytes[/cmd] */ + static bool file_kvs_fnc_readBytes(KviKvsModuleFunctionCall * c) { QString szNameZ; @@ -971,14 +991,14 @@ static bool file_kvs_fnc_readBytes(KviKvsModuleFunctionCall * c) <array> $file.readLines(<filename:string>[,<startline:integer>,[<count:integer>[,<flags:string>]]]) @description: Reads lines from the specified file and returns them as an array of strings. - The lines are assumed to be separated by linefeed characters (which are NOT returned). + The lines are assumed to be separated by linefeed characters (which are [b]not[/b] returned). Eventual terminating carriage return and line feed characters at the end of the line are stripped. If <startline> is specified, then all the lines with indexes lower that <startline> are discarded. If <count> is specified then at most this number of lines are returned, otherwise the entire file is returned. The <filename> is adjusted according to the system that KVIrc is running on.[br] - Flags are actually limited to the single letter 'l'. By default the file - is decoded from the UTF-8 character set, however if 'l' is present then the file + Flags are actually limited to the single letter [b]l[/b]. By default the file + is decoded from the UTF-8 character set, however if [b]l[/b] is present then the file is decoded by the local 8-bit character set instead. WARNING: Always check the size of the file you're going to read - it is not a good idea attempting to read a 700 MiB binary file with this function since @@ -990,6 +1010,7 @@ static bool file_kvs_fnc_readBytes(KviKvsModuleFunctionCall * c) @seealso: [fnc]$file.read[/fnc], [cmd]file.writeLines[/cmd], [fnc]$lf[/fnc] */ + static bool file_kvs_fnc_readLines(KviKvsModuleFunctionCall * c) { QString szName; @@ -1081,7 +1102,7 @@ static bool file_kvs_fnc_readLines(KviKvsModuleFunctionCall * c) The lines are separated by a carriage-return+line-feed character combination, compatible with windows text mode files. This is the only way to make the file readable in windows notepad, for example. - Please note that this is broken design: do NOT use it :) + Please note that this is broken design: do [b]not[/b] use it :) !sw: -n | --no-separator Do not separate the lines at all (either the separators are already inside the lines array or no line separation is desired at all). @@ -1097,6 +1118,7 @@ static bool file_kvs_fnc_readLines(KviKvsModuleFunctionCall * c) @seealso: [fnc]$file.readLines[/fnc] */ + static bool file_kvs_cmd_writeLines(KviKvsModuleCommandCall * c) { QString szFile,szFlags; @@ -1176,6 +1198,7 @@ static bool file_kvs_cmd_writeLines(KviKvsModuleCommandCall * c) echo panic.png would be translated to $file.localdir(pics/panic.png) [/example] */ + static bool file_kvs_fnc_localdir(KviKvsModuleFunctionCall * c) { QString szName; @@ -1209,6 +1232,7 @@ static bool file_kvs_fnc_localdir(KviKvsModuleFunctionCall * c) that KVIrc is actually running on (thus you do not need to care about path separators in the <relative_path>, KVIrc will adjust them).[br] */ + static bool file_kvs_fnc_homedir(KviKvsModuleFunctionCall * c) { QString szName; @@ -1244,6 +1268,7 @@ static bool file_kvs_fnc_homedir(KviKvsModuleFunctionCall * c) that KVIrc is actually running on (thus you not need to care about path separators in the <relative_path>, KVIrc will adjust them).[br] */ + static bool file_kvs_fnc_rootdir(KviKvsModuleFunctionCall * c) { QString szName; @@ -1278,6 +1303,7 @@ static bool file_kvs_fnc_rootdir(KviKvsModuleFunctionCall * c) that KVIrc is actually running on (thus you do not need to care about path separators in the <relative_path>, KVIrc will adjust them).[br] */ + static bool file_kvs_fnc_cwd(KviKvsModuleFunctionCall * c) { QString szName; @@ -1321,6 +1347,7 @@ static bool file_kvs_fnc_cwd(KviKvsModuleFunctionCall * c) echo panic.png would be translated to $file.globaldir(pics/panic.png) [/example] */ + static bool file_kvs_fnc_globaldir(KviKvsModuleFunctionCall * c) { QString szName; @@ -1349,12 +1376,13 @@ static bool file_kvs_fnc_globaldir(KviKvsModuleFunctionCall * c) @description: Returns the path part of the <filepath> translated to match the current platform filesystem conventions.[br] - The path will NOT contain a trailing path separator.[br] + The path will [b]not[/b] contain a trailing path separator.[br] For example, if <filepath> is /usr/arch/mp3/Carisma_SuonoDelSilenzio.mp3 then this function will return /usr/arch/mp3 on UNIX and C:\usr\arch\mp3 on Windows. @seealso: [fnc]$file.extractFileName[/fnc] */ + static bool file_kvs_fnc_extractpath(KviKvsModuleFunctionCall * c) { QString szName; @@ -1383,6 +1411,7 @@ static bool file_kvs_fnc_extractpath(KviKvsModuleFunctionCall * c) @seealso: [fnc]$file.extractfilename[/fnc] */ + static bool file_kvs_fnc_extractfilename(KviKvsModuleFunctionCall * c) { QString szName; @@ -1406,9 +1435,10 @@ static bool file_kvs_fnc_extractfilename(KviKvsModuleFunctionCall * c) @syntax: <hash> $file.diskspace([dirpath:string]) @description: - Returns as hash, with 'freespace' and 'totalspace' as key, the free diskspace in bytes.[br] + Returns as hash, with [b]freespace[/b] and [b]totalspace[/b] as key, the free diskspace in bytes.[br] Without optional dirpath parameter will be returned the current device's disk space (i.e. the disk on which KVIrc has been started).[br] */ + static bool file_kvs_fnc_diskSpace(KviKvsModuleFunctionCall * c) { QString szPath; @@ -1457,6 +1487,7 @@ static bool file_kvs_fnc_diskSpace(KviKvsModuleFunctionCall * c) Currently supported: md5 (default), md4, md2, sha1, mdc2, ripemd160 and dss1. Requires OpenSSL support, but offers a minimal set of hashes in any case. */ + static bool file_kvs_fnc_digest(KviKvsModuleFunctionCall * c) { QString szFile,szAlgo,szResult; @@ -1553,17 +1584,18 @@ static bool file_kvs_fnc_digest(KviKvsModuleFunctionCall * c) Returns the datetime of a file as the number of milliseconds that have passed since 1970-01-01T00:00:00.000, Coordinated Universal Time (UTC).[br] The path should be given in UNIX-style and is adjusted according to the system that KVIrc is running on.[br] The type have to be:[br] - "a" to retrieve the last time the file was accessed;[br] - "c" to retrieve the creation time of the file (on most UNIX systems, when the creation time or the last status change time - e.g. changing file permissions - are not available, it will fallback to "m";[br] - "m" to retrieve the time of the last modification of the file. This is the default. + [b]a[/b] to retrieve the last time the file was accessed;[br] + [b]c[/b] to retrieve the creation time of the file (on most UNIX systems, when the creation time or the last status change time - e.g. changing file permissions - are not available, it will fallback to "m";[br] + [b]m[/b] to retrieve the time of the last modification of the file. This is the default. @examples: [example] - # Windows + [comment]# Windows[/comment] echo $file.time(c:/file.txt); - # Linux, other UNIX's + [comment]# Linux, other UNIX's[/comment] echo $file.time(/etc/passwd,a); [/example] */ + static bool file_kvs_fnc_time(KviKvsModuleFunctionCall * c) { QString szName, szType; diff --git a/src/modules/lamerizer/libkvilamerizer.cpp b/src/modules/lamerizer/libkvilamerizer.cpp index 96ed3cf44..d5f6ffe37 100644 --- a/src/modules/lamerizer/libkvilamerizer.cpp +++ b/src/modules/lamerizer/libkvilamerizer.cpp @@ -39,8 +39,8 @@ @title: The lamerizer module @body: - This is an example of what you should NOT do with a text transformation - engine. Do NOT use it! :D + This is an example of what you should [b]not[/b] do with a text transformation + engine. Do [b]not[/b] use it! :D */ diff --git a/src/modules/language/libkvilanguage.cpp b/src/modules/language/libkvilanguage.cpp index 6f800d614..cd287ff03 100644 --- a/src/modules/language/libkvilanguage.cpp +++ b/src/modules/language/libkvilanguage.cpp @@ -37,7 +37,7 @@ @title: $language.detect @short: - (Tries to) detect the language and encoding of a string + Tries to detect the language and encoding of a string @syntax: <hash> language.detect(<text: string>) @description: @@ -45,18 +45,18 @@ as [text]. The accuracy of the detection mainly depends on the length of the supplied text. Good results can be achieved with some thousands characters.[br] - This command is exported by the "language" module. + This command is exported by the [i]language[/i] module. @examples: [example] - %dati = $language.detect("I'm a lord and I speak perfect English."); - if(%dati{"error"} != "")echo "Language detection failed: " %dati{"error"}; - %count = %dati{"matchcount"}; - for(%i=0;%i<%count;%i++) - { - echo "LANGUAGE " %i " : " %dati{"matches"}[%i]{"language"}; - echo "ENCODING " %i " : " %dati{"matches"}[%i]{"encoding"}; - echo "SCORE " %i " : "%dati{"matches"}[%i]{"score"}; - } + %dati = $language.detect("I'm a lord and I speak perfect English."); + if(%dati{"error"} != "")echo "Language detection failed: " %dati{"error"}; + %count = %dati{"matchcount"}; + for(%i=0;%i<%count;%i++) + { + echo "LANGUAGE " %i " : " %dati{"matches"}[%i]{"language"}; + echo "ENCODING " %i " : " %dati{"matches"}[%i]{"encoding"}; + echo "SCORE " %i " : "%dati{"matches"}[%i]{"score"}; + } echo "ACCURACY: " %dati{"accuracy"}; [/example] */ diff --git a/src/modules/links/libkvilinks.cpp b/src/modules/links/libkvilinks.cpp index 8b2a586db..523f40470 100644 --- a/src/modules/links/libkvilinks.cpp +++ b/src/modules/links/libkvilinks.cpp @@ -47,14 +47,14 @@ KviPointerList<LinksWindow> * g_pLinksWindowList = 0; @description: Opens a links window attached to the current IRC context.[br] The links window handles the RPL_LINKS server replies and shows - them in a Tree-View form: this is useful in visualizing the + them in a [b]tree-view[/b] form: this is useful in visualizing the current network connections.[br] Please note that the total number of links received (and the total count of servers displayed when all the links have been received) may actually be less than the real number of IRC servers in the network. Servers that contain a wildcard in their name often act as gateways (hubs) - for a "local IRC network"; if you're requesting links from a server that is - external to the gateway, the servers internal to the network "behind the gateway" + for a [i]local IRC network[/i]; if you're requesting links from a server that is + external to the gateway, the servers internal to the network [i]behind the gateway[/i] will not be shown; in the extreme case you will see the gateway as leaf node (and it isn't). To see the internal network server tree you might request links from the gateway server.[br] */ diff --git a/src/modules/log/libkvilog.cpp b/src/modules/log/libkvilog.cpp index 6b8448e4b..15748b1bd 100644 --- a/src/modules/log/libkvilog.cpp +++ b/src/modules/log/libkvilog.cpp @@ -185,7 +185,7 @@ static bool log_kvs_cmd_stop(KviKvsModuleCommandCall * c) If logging is not enabled in the specified window, this command does nothing.[br] If this command is never used, the log file is flushed at regular file-size intervals, depending on the underlying I/O subsystem. This is usually 4KiB.[br] - The "block flushing" is used to achieve a fast I/O on files, but may cause + The [i]block flushing[/i] is used to achieve a fast I/O on files, but may cause the last data block to be lost in case of a program crash.[br] @seealso: [fnc]$window[/fnc], diff --git a/src/modules/mask/libkvimask.cpp b/src/modules/mask/libkvimask.cpp index d5d856821..04e9d24b6 100644 --- a/src/modules/mask/libkvimask.cpp +++ b/src/modules/mask/libkvimask.cpp @@ -38,11 +38,11 @@ @syntax: <boolean> $mask.match(<wildcard_mask:string>,<fixed_mask:string>) @description: - Returns 1 if the <wildcard_mask> matches <fixed_mask> and 0 otherwise. - <wildcard_mask> can obviously contain wildcards ('*' and '?'). + Returns [b]1[/b] if the <wildcard_mask> matches <fixed_mask> and [b]0[/b] otherwise. + <wildcard_mask> can obviously contain wildcards ([b]*[/b] and [b]?[/b]). @example: [example] - [cmd]if[/cmd]($mask.match(*!*@*.linux.it,$0)) + [cmd]if[/cmd]($mask.match(*!*@*.linux.it,$0)) [cmd]op[/cmd] [fnc]$mask.nick[/fnc]($0) [/example] */ @@ -148,7 +148,7 @@ static bool mask_kvs_fnc_host(KviKvsModuleFunctionCall * c) @syntax: <boolean> $mask.hasNumericHost(<mask: string>) @description: - Returns 1 if the hostname part of the mask is numeric (e.g. unresolved IPv4 or IPv6 address). + Returns [b]1[/b] if the hostname part of the mask is numeric (e.g. unresolved IPv4 or IPv6 address). */ diff --git a/src/modules/mediaplayer/libkvimediaplayer.cpp b/src/modules/mediaplayer/libkvimediaplayer.cpp index eff100c60..53ac614c1 100644 --- a/src/modules/mediaplayer/libkvimediaplayer.cpp +++ b/src/modules/mediaplayer/libkvimediaplayer.cpp @@ -545,10 +545,10 @@ MP_KVS_FUNCTION(playerList) selected media player interface. MRL is a standard Media Resource Locator. Examples of such locators are: [example] - file:///home/myfile.mp3 - http://streaming.server.top:123 - dvd:///dev/dvd - dvb://channelname + file:///home/myfile.mp3 + http://streaming.server.top:123 + dvd:///dev/dvd + dvb://channelname [/example] Take a look at the [module:mediaplayer]mediaplayer module documentation[/module] for more details about how it works.[br] @@ -605,7 +605,6 @@ MP_KVS_COMMAND(amipExec) return true; } - /* @doc: mediaplayer.jumpTo @type: @@ -732,7 +731,6 @@ MP_KVS_SIMPLE_INT_FUNCTION(getVol,getVol) MP_KVS_SIMPLE_COMMAND(mute,mute) - /* @doc: mediaplayer.mrl @type: @@ -748,13 +746,13 @@ MP_KVS_SIMPLE_COMMAND(mute,mute) The MRL is a standard Media Resource Locator. Examples of such locators are: [example] - file:///home/myfile.mp3 - http://streaming.server.top:123 - dvd:///dev/dvd - dvb://channelname + file:///home/myfile.mp3 + http://streaming.server.top:123 + dvd:///dev/dvd + dvb://channelname [/example] This means that the returned string may [b]not[/b] refer to a local file: - it refers to the local file only if the 'file://' prefix is found ([fnc]$mediaplayer.localFile()[/fnc] + it refers to the local file only if the [b]file://[/b] prefix is found ([fnc]$mediaplayer.localFile()[/fnc] checks that for you). The returned string is empty if the player isn't currently playing.[br] Take a look at the [module:mediaplayer]mediaplayer module documentation[/module] @@ -774,7 +772,7 @@ MP_KVS_SIMPLE_STRING_FUNCTION(mrl,mrl) @title: $mediaplayer.nowPlaying @short: - Returns a descripting of the currently played media + Returns a description of the currently played media @syntax: $mediaplayer.nowPlaying() @description: @@ -1044,7 +1042,6 @@ MP_KVS_SIMPLE_STRING_FUNCTION(mediaType,mediaType) MP_KVS_SIMPLE_INT_FUNCTION(bitRate,bitRate) - /* @doc: mediaplayer.sampleRate @type: @@ -1059,7 +1056,7 @@ MP_KVS_SIMPLE_INT_FUNCTION(bitRate,bitRate) Returns the sample rate (in Hz) of the multimedia file being played by the remote instance of the media player.This function is not granted to work with all the player interfaces and all the media types so - you may get -1 or 0 in return sometimes.[br] + you may get [b]-1[/b] or [b]0[/b] in return sometimes.[br] Take a look at the [module:mediaplayer]mediaplayer module documentation[/module] for more details about how it works.[br] @seealso: @@ -1074,7 +1071,6 @@ MP_KVS_SIMPLE_INT_FUNCTION(bitRate,bitRate) MP_KVS_SIMPLE_INT_FUNCTION(sampleRate,sampleRate) - /* @doc: mediaplayer.length @type: @@ -1156,7 +1152,6 @@ MP_KVS_SIMPLE_INT_FUNCTION(position,position) MP_KVS_SIMPLE_INT_FUNCTION(channels,channels) - /* @doc: mediaplayer.setPlayListPos @type: @@ -1239,7 +1234,6 @@ MP_KVS_SIMPLE_INT_FUNCTION(getPlayListPos,getPlayListPos) MP_KVS_SIMPLE_INT_FUNCTION(getListLength,getListLength) - /* @doc: mediaplayer.getRepeat @type: @@ -1247,11 +1241,11 @@ MP_KVS_SIMPLE_INT_FUNCTION(getListLength,getListLength) @title: $mediaplayer.getRepeat @short: - Return if "Repeat" is on. + Return if [i]Repeat[/i] is on. @syntax: $mediaplayer.getRepeat() @description: - Return the value of the Repeat flag for the current track (1 for ON, 0 for OFF).[br] + Return the value of the Repeat flag for the current track ([b]1[/b] for [b]ON[/b], [b]0[/b] for [b]OFF[/b]).[br] Take a look at the [module:mediaplayer]mediaplayer module documentation[/module] for more details about how it works.[br] @seealso: @@ -1262,7 +1256,6 @@ MP_KVS_SIMPLE_INT_FUNCTION(getListLength,getListLength) MP_KVS_SIMPLE_INT_FUNCTION(getRepeat,getRepeat) - /* @doc: mediaplayer.getShuffle @type: @@ -1270,11 +1263,11 @@ MP_KVS_SIMPLE_INT_FUNCTION(getRepeat,getRepeat) @title: $mediaplayer.getShuffle @short: - Return if "shuffle" is on. + Return if [i]shuffle[/i] is on. @syntax: $mediaplayer.getShuffle() @description: - Return the value of the Shuffle flag (1 for ON, 0 for OFF).[br] + Return the value of the Shuffle flag ([b]1[/b] for [b]ON[/b], [b]0[/b] for [b]OFF[/b]).[br] Take a look at the [module:mediaplayer]mediaplayer module documentation[/module] for more details about how it works.[br] @seealso: @@ -1297,7 +1290,7 @@ MP_KVS_SIMPLE_BOOL_FUNCTION(getShuffle,getShuffle) $mediaplayer.getEqData(<item:integer>,<options:string>) @description: Return the value of the EQ <item>.[br] - if 'q' is given as an option, it runs in quiet mode.[br] + if [b]q[/b] is given as an option, it runs in quiet mode.[br] Take a look at the [module:mediaplayer]mediaplayer module documentation[/module] for more details about how it works.[br] @seealso: @@ -1450,8 +1443,8 @@ MP_KVS_FUNCTION(amipEval) @syntax: $mediaplayer.status() @description: - Returns the status if the currently selected media player: "playing", - "stopped", "paused" or "unknown". + Returns the status if the currently selected media player: [b][i]playing[/b][/i], + [b][i]stopped[/b][/i], [b][i]paused[/b][/i] or [b][i]unknown[/b][/i]. Take a look at the [module:mediaplayer]mediaplayer module documentation[/module] for more details about how it works.[br] @seealso: @@ -1485,7 +1478,6 @@ MP_KVS_FUNCTION(status) return true; } - /* @doc: mediaplayer @type: @@ -1505,22 +1497,22 @@ MP_KVS_FUNCTION(status) (Amarok2, JuK under KDE). You choose the player interface by either setting the option in the settings dialog, by manually setting [cmd]option[/cmd] stringPreferredMediaPlayer or by running [cmd]mediaplayer.detect[/cmd] that will guess the media player interface for you.[br] - If you're going to use the Winamp media player then you must install the "gen_kvirc.dll" plugin - (included in the KVIrc distribution) as a "general" Winamp plugin. + If you're going to use the Winamp media player then you must install the [i]gen_kvirc.dll[/i] plugin + (included in the KVIrc distribution) as a [i]general[/i] Winamp plugin. This is achieved by simply copying the file gen_kvirc.dll - to the Winamp plugins directory and restarting Winamp.[br] - [br] + to the Winamp plugins directory and restarting Winamp. + [br][br] The commands and functions exported by this module serve mainly for two purposes: control the playback and get information about the currently played media. Playback control is achieved by the means of [cmd]mediaplayer.play[/cmd], [cmd]mediaplayer.stop[/cmd], [cmd]mediaplayer.pause[/cmd], [cmd]mediaplayer.next[/cmd], [cmd]mediaplayer.prev[/cmd] and [fnc]$mediaplayer.status()[/fnc]. The information about the currently played media can be retrieved with - [fnc]$mediaplayer.nowplaying()[/fnc] and [fnc]$mediaplayer.mrl()[/fnc]. + [fnc]$mediaplayer.nowplaying()[/fnc] and [fnc]$mediaplayer.mrl()[/fnc].[br][br] Several other informative function are available as well but they are not granted to work with all the supported media players or media types (e.g. with Winamp you can play video files that probably have no album, genre - or sampleRate information...).[br] + or sampleRate information).[br][br] If you intend to write portable code, you should check the return value of the functions like [fnc]$mediaplayer.artist()[/fnc], [fnc]$mediaplayer.title()[/fnc] or [fnc]$mediaplayer.channels()[/fnc] and be ready to discard it when it @@ -1540,7 +1532,7 @@ MP_KVS_FUNCTION(status) @syntax: mediaplayer.setRepeat [-q] <repeat:bool> @description: - Set the repeat flag to "repeat" (1 for ON, 0 for OFF).[br] + Set the repeat flag to [i]repeat[/i] ([b]1[/b] for [b]ON[/b], [b]0[/b] for [b]OFF[/b]).[br] Take a look at the [module:mediaplayer]mediaplayer module documentation[/module] for more details about how it works.[br] @seealso: @@ -1571,7 +1563,6 @@ MP_KVS_COMMAND(setRepeat) return true; } - /* @doc: mediaplayer.setShuffle @type: @@ -1583,7 +1574,7 @@ MP_KVS_COMMAND(setRepeat) @syntax: mediaplayer.setShuffle [-q] <shuffle:bool> @description: - Set the Shuffle flag to "shuffle" (1 for ON, 0 for OFF).[br] + Set the Shuffle flag to [i]shuffle[/i] ([b]1[/b] for [b]ON[/b], [b]0[/b] for [b]OFF[/b]).[br] Take a look at the [module:mediaplayer]mediaplayer module documentation[/module] for more details about how it works.[br] @seealso: diff --git a/src/modules/my/libkvimy.cpp b/src/modules/my/libkvimy.cpp index 97f0c068f..eae752e08 100644 --- a/src/modules/my/libkvimy.cpp +++ b/src/modules/my/libkvimy.cpp @@ -273,11 +273,11 @@ static bool my_kvs_fnc_ip(KviKvsModuleFunctionCall * c) @title: $my.serverIsIPV6 @short: - Returns 1 if the current server connection use IPv6. + Returns [b]1[/b] if the current server connection use IPv6. @syntax: <boolean> $my.serverIsIPV6([irc_context_id:uint]) @description: - Returns 1 if the server connection use IPv6.[br] + Returns [b]1[/b] if the server connection use IPv6.[br] If the IRC context is not connected then an empty string is returned.[br] If <irc_context_id> is specified this function returns acts as it was called in that irc_context.[br] @@ -302,11 +302,11 @@ static bool my_kvs_fnc_serverIsIPV6(KviKvsModuleFunctionCall * c) @title: $my.serverIsSSL @short: - Returns 1 if the current server connection uses SSL + Returns [b]1[/b] if the current server connection uses SSL @syntax: <boolean> $my.serverIsSSL([irc_context_id:uint]) @description: - Returns 1 if the server connection uses SSL.[br] + Returns [b]1[/b] if the server connection uses SSL.[br] If the IRC context is not connected then an empty string is returned.[br] If <irc_context_id> is specified this function returns acts as it was called in that irc_context.[br] diff --git a/src/modules/notifier/libkvinotifier.cpp b/src/modules/notifier/libkvinotifier.cpp index b6c6584e7..49236b55a 100644 --- a/src/modules/notifier/libkvinotifier.cpp +++ b/src/modules/notifier/libkvinotifier.cpp @@ -68,7 +68,7 @@ kvi_time_t g_tNotifierDisabledUntil = 0; any color and/or font specification since the notifier is skinnable and you don't know which color will result in a visible text. [b]Please note that the user can forcibly disable the notifier - for a limited period of time (a sort of "don't bug me" option).[/b] + for a limited period of time (a sort of [i]don't bug me[/i] option).[/b] @switches: !sw: -n | --noanim Do not animate @@ -111,6 +111,7 @@ kvi_time_t g_tNotifierDisabledUntil = 0; notifier.message -t=10 This message will be shown only for 10 seconds [/example] */ + static bool notifier_kvs_cmd_message(KviKvsModuleCommandCall * c) { QString szMessage; @@ -177,10 +178,11 @@ static bool notifier_kvs_cmd_message(KviKvsModuleCommandCall * c) @description: Hide the notifier window [b]Please note that the user can forcibly disable the notifier - for a limited period of time (a sort of "don't bug me" option).[/b] + for a limited period of time (a sort of [i]don't bug me[/i] option).[/b] @seealso: [cmd]notifier.show[/cmd] [cmd]notifier.message[/cmd] [fnc]$notifier.isEnabled[/fnc] */ + static bool notifier_kvs_cmd_hide(KviKvsModuleCommandCall * c) { if(g_pNotifierWindow) @@ -207,10 +209,11 @@ static bool notifier_kvs_cmd_hide(KviKvsModuleCommandCall * c) not animated.[br] The notifier is shown [b]only[/b] if it contains some messages. [b]Please note that the user can forcibly disable the notifier - for a limited period of time (a sort of "don't bug me" option).[/b] + for a limited period of time (a sort of [i]don't bug me[/i] option).[/b] @seealso: [cmd]notifier.hide[/cmd] [cmd]notifier.message[/cmd] [fnc]$notifier.isEnabled[/fnc] */ + static bool notifier_kvs_cmd_show(KviKvsModuleCommandCall * c) { if(!g_pNotifierWindow) @@ -231,22 +234,23 @@ static bool notifier_kvs_cmd_show(KviKvsModuleCommandCall * c) @title: $notifier.isEnabled @short: - Returns 1 if the notifier window is enabled + Returns [b]1[/b] if the notifier window is enabled @syntax: <boolean> $notifier.isEnabled @description: - Returns 1 if the notifier window is enabled and 0 otherwise. - The user can forcibly disable the notifier as a sort of "don't bug me" + Returns [b]1[/b] if the notifier window is enabled and [b]0[/b] otherwise. + The user can forcibly disable the notifier as a sort of [i]don't bug me[/i] feature for a limited period of time. When the notifier is disabled the messages sent to it will not be shown.[br] The only method that you (the scripter) can use to forcibly re-enable the notifier is to unload the module and - reload it...but [b]don't do it[/b] :)[br] + reload it, but [b]don't do it[/b] :)[br] There is also a global option that allows forcibly disabling the notifier forever, this option could be overridden with [cmd]option[/cmd] - instead.. but again [b]don't do it[/b] :)[br] + instead, but again [b]don't do it[/b] :)[br] */ + static bool notifier_kvs_fnc_isEnabled(KviKvsModuleFunctionCall * c) { bool bCheck; diff --git a/src/modules/objects/KvsObject_buttonGroup.cpp b/src/modules/objects/KvsObject_buttonGroup.cpp index d2be856c0..a7ec6a034 100644 --- a/src/modules/objects/KvsObject_buttonGroup.cpp +++ b/src/modules/objects/KvsObject_buttonGroup.cpp @@ -51,7 +51,7 @@ !fn: <id:integer> $addButton(<checkbutton or radiobutton:object>) Adds the given button to the button group and returns an unique identifier. !fn: <object> $checkedButton() - Returns the button group's checked button, or 0 if no buttons are checked. + Returns the button group's checked button, or [b]0[/b] if no buttons are checked. */ KVSO_BEGIN_REGISTERCLASS(KvsObject_buttonGroup,"buttongroup","object") diff --git a/src/modules/objects/KvsObject_checkBox.cpp b/src/modules/objects/KvsObject_checkBox.cpp index 3056ae91f..25c605b1f 100644 --- a/src/modules/objects/KvsObject_checkBox.cpp +++ b/src/modules/objects/KvsObject_checkBox.cpp @@ -49,7 +49,7 @@ (unchecked). @functions: !fn: <bool> $isChecked() - Returns '1' if the check box is checked, '0' otherwise.[br] + Returns [b]1[/b] if the check box is checked, and [b]0[/b] otherwise.[br] See also [classfnc]$setChecked[/classfnc](). !fn: $setChecked([<bChecked:bool>]) Sets the check box 'checked state' to <bool>. diff --git a/src/modules/objects/KvsObject_colorDialog.cpp b/src/modules/objects/KvsObject_colorDialog.cpp index 2d37bbadc..97b4bb1ea 100644 --- a/src/modules/objects/KvsObject_colorDialog.cpp +++ b/src/modules/objects/KvsObject_colorDialog.cpp @@ -63,7 +63,7 @@ const int option_cod[] = { (unchecked). @functions: !fn: <bool> $isChecked() - Returns '1' if the check box is checked, '0' otherwise.[br] + Returns [b]1[/b] if the check box is checked, and [b]0[/b] otherwise.[br] See also [classfnc]$setChecked[/classfnc](). !fn: $setChecked([<bChecked:bool>]) Sets the check box 'checked state' to <bool>. diff --git a/src/modules/objects/KvsObject_dateTimeEdit.cpp b/src/modules/objects/KvsObject_dateTimeEdit.cpp index b75fba824..d81692d2e 100644 --- a/src/modules/objects/KvsObject_dateTimeEdit.cpp +++ b/src/modules/objects/KvsObject_dateTimeEdit.cpp @@ -49,34 +49,33 @@ @functions: !fn: $setDate(<text:string>,<format:string>) Sets the date of the widget using the format <format>. Possible values for format are: - [br]d the day as number without a leading zero (1 to 31) - [br]dd the day as number with a leading zero (01 to 31) - [br]ddd the abbreviated localized day name (e.g. 'Mon' to 'Sun'). Uses QDate::shortDayName(). - [br]dddd the long localized day name (e.g. 'Monday' to 'Qt::Sunday'). Uses QDate::longDayName(). - [br]M the month as number without a leading zero (1-12) - [br]MM the month as number with a leading zero (01-12) - [br]MMM the abbreviated localized month name (e.g. 'Jan' to 'Dec'). Uses QDate::shortMonthName(). - [br]MMMM the long localized month name (e.g. 'January' to 'December'). Uses QDate::longMonthName(). - [br]yy the year as two digit number (00-99) - [br]yyyy the year as four digit number + [br][b]d[/b]: the day as number without a leading zero (1 to 31) + [br][b]dd[/b]: the day as number with a leading zero (01 to 31) + [br][b]ddd[/b]: the abbreviated localized day name (e.g. [b]Mon[/b] to [b]Sun/b]). Uses QDate::shortDayName(). + [br][b]dddd[/b]: the long localized day name (e.g. [b]Monday[/b] to [b]Sunday[/b]). Uses QDate::longDayName(). + [br][b]M[/b]: the month as number without a leading zero (1-12) + [br][b]MM[/b]: the month as number with a leading zero (01-12) + [br][b]MMM[/b]: the abbreviated localized month name (e.g. [b]Jan[/b] to [b]Dec[/b]). Uses QDate::shortMonthName(). + [br][b]MMMM[/b]: the long localized month name (e.g. [b]January[/b] to [b]December[/b]). Uses QDate::longMonthName(). + [br][b]yy[/b]: the year as two digit number (00-99) + [br][b]yyyy[/b]: the year as four digit number !fn: <string> $date(<format:string>) Returns the widget date according to format. !fn: $setTime(<text:string>,<format:string>) Sets the date of the widget using the format <format>. Possible values for format are: - [br]h the hour without a leading zero - [br]hh the hour with a leading zero - [br]m the minute without a leading zero - [br]mm the minute with a leading zero - [br]s the second without a leading zero - [br]ss the second with a leading zero - [br]z the milliseconds without leading zeroes - [br]zzz the milliseconds with leading zeroes - [br]AP(or ap) use AM/PM display. AP will be replaced by either "AM" or "PM". + [br][b]h[/b]: the hour without a leading zero + [br][b]hh[/b]: the hour with a leading zero + [br][b]m[/b]: the minute without a leading zero + [br][b]mm[/b]: the minute with a leading zero + [br][b]s[/b]: the second without a leading zero + [br][b]ss[/b]: the second with a leading zero + [br][b]z[/b]: the milliseconds without leading zeroes + [br][b]zzz[/b]: the milliseconds with leading zeroes + [br][b]AP / ap[/b]: use AM/PM display. AP will be replaced by either [i]AM[/i] or [i]PM[/i]. !fn: $time(<format:string>) Returns the widget time according to format. */ - KVSO_BEGIN_REGISTERCLASS(KvsObject_dateTimeEdit,"datetimeedit","widget") KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_dateTimeEdit,date) diff --git a/src/modules/objects/KvsObject_dockWindow.cpp b/src/modules/objects/KvsObject_dockWindow.cpp index dcc97379e..02b0545e8 100644 --- a/src/modules/objects/KvsObject_dockWindow.cpp +++ b/src/modules/objects/KvsObject_dockWindow.cpp @@ -51,14 +51,14 @@ The widget must be a child of this dock window (otherwise strange things may happen). !fn: $setAllowedDockAreas(<docks:string>) Sets the allowed main window dock areas for this dock window.[br] - <docks> must be a combination of "l","r","t","b","f" and "m".[br] - "l" stands for left dock area, "r" stands for right dock area, "t" stands for the top dock areas, "b" stands for the bottom dock area, "f" stands for "floating" and "m" for "minimized".[br] + <docks> must be a combination of [i]l[/i], [i]r[/i], [i]t[/i], [i]b[/i], [b]f[/b] and [b]m[/b].[br] + [b]l[/b] stands for left dock area, [b]r[/b] stands for right dock area, [b]t[/b] stands for the top dock areas, [b]b[/b] stands for the bottom dock area, + [b]f[/b] stands for [i]floating[/i] and [b]m[/b] for [i]minimized[/i].[br] If a flag is present then the related block area is enabled,otherwise it is disabled. !fn: $dock(<dockarea:string>) Docks this dock window to the specified dockarea of the main KVIrc window which can be one of "l" (left dock area), "t" (top dock area), "r" (right dock area), "b" (bottom dock area), "f" (floating) and "m" (minimized). */ - KVSO_BEGIN_REGISTERCLASS(KvsObject_dockWindow,"dockwindow","widget") KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_dockWindow,addWidget) KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_dockWindow,setAllowedDockAreas) diff --git a/src/modules/objects/KvsObject_file.cpp b/src/modules/objects/KvsObject_file.cpp index ba5c5d6ce..e0542287a 100644 --- a/src/modules/objects/KvsObject_file.cpp +++ b/src/modules/objects/KvsObject_file.cpp @@ -75,11 +75,11 @@ const QIODevice::OpenMode mod_cod[] = { [class]object[/class] @description: This object class provides access to files - basic I/O - operations, copying, removing etc... + operations, copying, removing etc. @functions: !fn: $setName(<file_name:string>) Sets the file name to <file_name>. It does [b]not move[/b] the file, - it just changes the file the object is "pointing to". You can + it just changes the file the object is [i]pointing to[/i]. You can not change names of already open files.[br] See also: [classfnc]$open[/classfnc](), [classfnc]$name[/classfnc](). @@ -87,15 +87,15 @@ const QIODevice::OpenMode mod_cod[] = { Returns name set by [classfnc]$setName[/classfnc]().[br] See also: [classfnc]$setName[/classfnc](). !fn: $open(<mode1:string>, <mode2:string>) - Attempts to open the file in specified mode or modes "sum". + Attempts to open the file in specified mode or modes [i]sum[/i]. Valid modes are:[br] [pre] - RAW - RAW, non-buffered access[br] - ReadOnly - opens the file read-only[br] - WriteOnly - opens the file write-only[br] - ReadWrite - opens the file in read-write mode[br] - Append - opens the file in append mode. The file index is set to the end of the file.[br] - Truncate - truncates the file[br] + RAW - RAW, non-buffered access[br] + ReadOnly - opens the file read-only[br] + WriteOnly - opens the file write-only[br] + ReadWrite - opens the file in read-write mode[br] + Append - opens the file in append mode. The file index is set to the end of the file.[br] + Truncate - truncates the file[br] [/pre] If you call this function without any parameters, the file is opened in read-only mode.[br] @@ -116,7 +116,7 @@ const QIODevice::OpenMode mod_cod[] = { !fn: <integer> $size() Returns current file size. !fn: <boolean> $atEnd() - Returns '1' if you have reached end of the file, '0' otherwise. + Returns '1' if you have reached end of the file, [b]0[/b] otherwise. [br]See also: [classfnc]$seek[/classfnc](), [classfnc]$where[/classfnc](). !fn: <integer> $where() @@ -149,7 +149,6 @@ const QIODevice::OpenMode mod_cod[] = { $writeBlock() */ - KVSO_BEGIN_REGISTERCLASS(KvsObject_file,"file","object") KVSO_REGISTER_HANDLER(KvsObject_file,"setName",setName) KVSO_REGISTER_HANDLER(KvsObject_file,"name",name) diff --git a/src/modules/objects/KvsObject_groupBox.cpp b/src/modules/objects/KvsObject_groupBox.cpp index 04e5f31ef..74d9236fe 100644 --- a/src/modules/objects/KvsObject_groupBox.cpp +++ b/src/modules/objects/KvsObject_groupBox.cpp @@ -48,7 +48,6 @@ const int align_cod[] = { #define align_num (sizeof(align_tbl) / sizeof(align_tbl[0])) - /* @doc: groupbox @keyterms: @@ -73,13 +72,13 @@ const int align_cod[] = { !fn: <string> $title() Returns the groupbox title text. !fn: $setFlat(<bflag:boolean>) - Sets whether the group box is painted flat. Valid Values are 1 or 0. + Sets whether the group box is painted flat. Valid Values are [b]1[/b] or [b]0[/b]. !fn: <boolean> $isFlat() - Returns 1 (true) if the groupbox is painted flat; otherwise returns 0 (false). + Returns [b]1[/b] (true) if the groupbox is painted flat; otherwise returns [b]0[/b] (false). !fn: <boolean> $isCheckable() - Returns 1 (true) if the group box has a checkbox in its title; otherwise returns 0 (false). + Returns [b]1[/b] (true) if the group box has a checkbox in its title; otherwise returns [b]0[/b] (false). !fn: $setCheckable(<bflag:boolean>) - Sets whether the groupbox has a checkbox in its title: Valid values are 1 or 0. + Sets whether the groupbox has a checkbox in its title: Valid values are [b]1[/b] or [b]0[/b]. !fn: $setInsideMargin(<margin:uint>) Sets the the width of the inside margin to m pixels. !fn: <integer> $insideMargin() @@ -98,35 +97,35 @@ const int align_cod[] = { Sets the groupbox's orientation. Valid values are: Horizontal, Vertical. @examples: [example] - [comment]//First we'll create the main widget. as a dialog[/comment] + [comment]# First we'll create the main widget. as a dialog[/comment] %widget=$new(dialog) %layout=$new(layout,%widget) - [comment]//Then the groupbox[/comment] + [comment]# Then the groupbox[/comment] %gb=$new(groupbox,%widget) %gb->$setTitle(Login) %gb->$setAlignment("Left") - [comment]//Add the groupbox to the main layout[/comment] + [comment]# Add the groupbox to the main layout[/comment] %layout->$addWidget(%gb,0,0) - [comment]//Now we create the user field + [comment]# Now we create the user field (labels + lineedit) in a horizontal box[/comment] %hbox=$new(hbox,%gb) %labeluser=$new(label,%hbox) %labeluser->$settext(User: ) %inputuser=$new(lineedit,%hbox) - [comment]//Now we create the password field + [comment]# Now we create the password field (labels + lineedit) in a horizontal box[/comment] %hbox=$new(hbox,%gb) %labelpass=$new(label,%hbox) %labelpass->$settext(Pass: ) %inputpass=$new(lineedit,%hbox) %inputpass->$setechomode("password") - [comment]//Now we create the OK/Cancel box buttons[/comment] + [comment]# Now we create the OK/Cancel box buttons[/comment] %hbox=$new(hbox,%gb) %btnok=$new(button,%hbox) %btnok->$settext("OK") %btncancel=$new(button,%hbox) %btncancel->$settext("Cancel") - [comment]//Let's show our nice form[/comment] + [comment]# Let's show our nice form[/comment] %widget->$show() [/example] */ diff --git a/src/modules/objects/KvsObject_http.cpp b/src/modules/objects/KvsObject_http.cpp index 3d01509d2..57bb11d74 100644 --- a/src/modules/objects/KvsObject_http.cpp +++ b/src/modules/objects/KvsObject_http.cpp @@ -100,7 +100,7 @@ The function returns a unique identifier which is passed by [b]requestStartedEvent()[/b] and [b]requestFinishedEvent()[/b]. When the request is started the requestStarted() signal is emitted. When it is finished the requestFinished() signal is emitted. !fn: <id:integer>$currentId() - Returns the identifier of the HTTP request being executed or 0 if there is no request being executed. + Returns the identifier of the HTTP request being executed or [b]0[/b] if there is no request being executed. !fn: <id:integer> $setProxy(<host:string>,<port:integer>,[<user:string>,<password:string>]) Enables HTTP proxy support, using the proxy server host on port port. Optionals parameters user and password can be provided if the proxy server requires authentication. diff --git a/src/modules/objects/KvsObject_label.cpp b/src/modules/objects/KvsObject_label.cpp index 6278a029a..e096604b6 100644 --- a/src/modules/objects/KvsObject_label.cpp +++ b/src/modules/objects/KvsObject_label.cpp @@ -88,7 +88,6 @@ const int frame_cod[] = { #define frame_num (sizeof(frame_tbl) / sizeof(frame_tbl[0])) - /* @doc: label @keyterms: @@ -130,14 +129,14 @@ const int frame_cod[] = { This function sets alignment flags, given as parameters, for this label. Valid flags are: [pre] - Right - Text is aligned to right border[br] - Left - Text is aligned to left border[br] - Top - Text is aligned to the top border[br] - Bottom - Text is aligned to the bottom border[br] - HCenter - Text is horizontally centered[br] - VCenter - Text is vertically centered[br] - Center - Equals HCenter + VCenter[br] - Justify - Text is spaced apart to cover available room[br] + Right - Text is aligned to right border[br] + Left - Text is aligned to left border[br] + Top - Text is aligned to the top border[br] + Bottom - Text is aligned to the bottom border[br] + HCenter - Text is horizontally centered[br] + VCenter - Text is vertically centered[br] + Center - Equals HCenter + VCenter[br] + Justify - Text is spaced apart to cover available room[br] [/pre] It is obvious that you can not set [i]Right[/i] and [i]Left[/i] simultaneously - this will [b]not[/b] @@ -156,22 +155,17 @@ const int frame_cod[] = { The flags determine the shape or shadow of the label's frame. Valid shape flags are:[br] [pre] - NoFrame - Draw no frame. You shouldn't specify a shadow when - using this.[br] - Box - Draws a rectangular box. Its borders can be - [i]Raised[/i] or [i]Sunken[/i][br] - Panel - Draws a rectangular panel which can be - [i]Raised[/i] or [i]Sunken[/i][br] - WinPanel - Similar to [i]Panel[/i], but is more in Win95 style[br] - Hline - Draws a horizontal line that frames nothing (useful as separator) + NoFrame - Draw no frame. You shouldn't specify a shadow when using this.[br] + Box - Draws a rectangular box. Its borders can be [i]Raised[/i] or [i]Sunken[/i][br] + Panel - Draws a rectangular panel which can be [i]Raised[/i] or [i]Sunken[/i][br] + WinPanel - Similar to [i]Panel[/i], but is more in Win95 style[br] + Hline - Draws a horizontal line that frames nothing (useful as separator) [/pre] Valid shadow flags are:[br] [pre] - Plain - No 3D effect (draws using foreground color)[br] - Raised - Makes the label look like it was raised above the - parent widget[br] - Sunken - Makes the label look like it was [i]pushed[/i] inside - the parent widget[br] + Plain - No 3D effect (draws using foreground color)[br] + Raised - Makes the label look like it was raised above the parent widget[br] + Sunken - Makes the label look like it was [i]pushed[/i] inside the parent widget[br] [/pre] !fn: $setImage(<image_id>) Sets the image to be displayed on this label. @@ -181,7 +175,6 @@ const int frame_cod[] = { */ - KVSO_BEGIN_REGISTERCLASS(KvsObject_label,"label","widget") KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_label,setText) KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_label,text) diff --git a/src/modules/objects/KvsObject_layout.cpp b/src/modules/objects/KvsObject_layout.cpp index 67ddfa4e3..4953bfba0 100644 --- a/src/modules/objects/KvsObject_layout.cpp +++ b/src/modules/objects/KvsObject_layout.cpp @@ -54,6 +54,7 @@ const int align_cod[] = { Qt::AlignBottom, }; #define align_num (sizeof(align_tbl) / sizeof(align_tbl[0])) + /* @doc: layout @keyterms: @@ -100,13 +101,14 @@ const int align_cod[] = { !fn: $setResizeMode(<resize_mode:string>) Sets the resize mode of the parent widget in relation to this layout. <mode> can be one of:[br] - -Auto: this is the default[br] - -Fixed: the parent widget of this layout is resized to the "sizeHint" value and it cannot be resized by the user.[br] - -Minimum: the minimum size of the parent widget of this layout is set to minimumSize() and it cannot be smaller[br] - -FreeResize: the parent widget of this layout is not constrained at all[br] + [pre] + -Auto: this is the default[br] + -Fixed: the parent widget of this layout is resized to the "sizeHint" value and it cannot be resized by the user.[br] + -Minimum: the minimum size of the parent widget of this layout is set to minimumSize() and it cannot be smaller[br] + -FreeResize: the parent widget of this layout is not constrained at all[br] + [/pre] */ - KVSO_BEGIN_REGISTERCLASS(KvsObject_layout,"layout","object") KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_layout,addWidget) KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_layout,addMultiCellWidget) diff --git a/src/modules/objects/KvsObject_lineEdit.cpp b/src/modules/objects/KvsObject_lineEdit.cpp index 8a194cef7..f6ccd00c3 100644 --- a/src/modules/objects/KvsObject_lineEdit.cpp +++ b/src/modules/objects/KvsObject_lineEdit.cpp @@ -44,7 +44,6 @@ static const int mode_cod[] = { #define mode_num (sizeof(mode_tbl) / sizeof(mode_tbl[0])) - /* @doc: lineedit @keyterms: @@ -72,9 +71,11 @@ static const int mode_cod[] = { See also [classfnc]$text[/classfnc](). !fn: $setEchoMode(<echo_mode:string>) Sets the line edit's echo mode. Possible value are:[br] - -Normal: display chars as they entered[br] - -Noecho: do not display anything[br] - -Password: display asterisks instead of the characters actually entered[br] + [pre] + -Normal: display chars as they entered[br] + -Noecho: do not display anything[br] + -Password: display asterisks instead of the characters actually entered[br] + [/pre] See also [classfnc]$echoMode[/classfnc](). !fn: <string> $echoMode() Return the line edit's echo mode. @@ -134,29 +135,29 @@ static const int mode_cod[] = { Sets the validation input mask to inputMask.[br] [b]Example:[/b][br] [example] - %ledit_example->$setInputMask( "+99 99 99 99 99;_" );[br] - %ledit_example->$setInputMask( "000.000.000.000;_" );[br] - %ledit_example->IP Number Mask.[br] - %ledit_example->setInputMask( ">AAAAA-AAAAA-AAAAA-AAAAA-AAAAA;#" ); + %ledit_example->$setInputMask( "+99 99 99 99 99;_" );[br] + %ledit_example->$setInputMask( "000.000.000.000;_" );[br] + %ledit_example->IP Number Mask.[br] + %ledit_example->setInputMask( ">AAAAA-AAAAA-AAAAA-AAAAA-AAAAA;#" ); [/example] The mask format understands these mask characters:[br] [example] - [b][comment]Character Meaning[/comment][/b][br] - A - ASCII alphabetic character required. A-Z, a-z.[br] - a - ASCII alphabetic character permitted but not required.[br] - N - ASCII alphanumeric character required. A-Z, a-z, 0-9.[br] - n - ASCII alphanumeric character permitted but not required.[br] - X - Any character required.[br] - x - Any character permitted but not required.[br] - 9 - ASCII digit required. 0-9.[br] - 0 - ASCII digit permitted but not required.[br] - D - ASCII digit required. 1-9.[br] - d - ASCII digit permitted but not required.[br] - # - ASCII digit or plus/minus sign permitted but not required.[br] - > - All following alphabetic characters are uppercased.[br] - < - All following alphabetic characters are lowercased.[br] - ! - Switch off case conversion.[br] - \ - Use \ to escape the special characters listed above to use them as separators. + [b][comment]Character Meaning[/comment][/b][br] + A - ASCII alphabetic character required. A-Z, a-z.[br] + a - ASCII alphabetic character permitted but not required.[br] + N - ASCII alphanumeric character required. A-Z, a-z, 0-9.[br] + n - ASCII alphanumeric character permitted but not required.[br] + X - Any character required.[br] + x - Any character permitted but not required.[br] + 9 - ASCII digit required. 0-9.[br] + 0 - ASCII digit permitted but not required.[br] + D - ASCII digit required. 1-9.[br] + d - ASCII digit permitted but not required.[br] + # - ASCII digit or plus/minus sign permitted but not required.[br] + > - All following alphabetic characters are uppercased.[br] + < - All following alphabetic characters are lowercased.[br] + ! - Switch off case conversion.[br] + \ - Use \ to escape the special characters listed above to use them as separators. [/example] The mask consists of a string of mask characters and separators, optionally[br] followed by a semi-colon and the character used for blanks: the blank characters[br] @@ -188,8 +189,6 @@ static const int mode_cod[] = { This signal is emitted by the default implementation of [classfnc]$textChangedEvent[/classfnc](). */ - - KVSO_BEGIN_REGISTERCLASS(KvsObject_lineEdit,"lineedit","widget") KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_lineEdit,text) diff --git a/src/modules/objects/KvsObject_listWidget.cpp b/src/modules/objects/KvsObject_listWidget.cpp index 7b846df13..59c860509 100644 --- a/src/modules/objects/KvsObject_listWidget.cpp +++ b/src/modules/objects/KvsObject_listWidget.cpp @@ -69,14 +69,14 @@ const char * const itemflags_tbl[] = { @description: The listbox class is a widget displaying a list of string items.[br] The listbox can operate in four selection modes: single, multi, extended - and none. In the "single" mode only one item can be selected at a time - and that item is also the current one. In the "multi" mode multiple + and none. In the [i]single[/i] mode only one item can be selected at a time + and that item is also the current one. In the [i]multi[/i] mode multiple items can be selected and unselected and the current item may or may not - be one of the selected items. In the "extended" mode multiple items + be one of the selected items. In the [i]extended[/i] mode multiple items can be selected but they must be selected in a single mouse action or by keeping the shift button pressed while clicking on the item. In this mode the current item is always one of the selected items.[br] - In the "none" mode no items can be selected and the current item + In the [i]none[/i] mode no items can be selected and the current item may be any item in the list.[br] In most situations you will operate the listwidget in [i]single[/i] mode (and this is the default mode set at widget creation). @@ -84,23 +84,23 @@ const char * const itemflags_tbl[] = { !fn: $setSelectionMode(<selection_mode:string>) Sets the current selection mode specified by the parameter <mode> that can be one of the following string:[br] - "single" : only one item can be selected at a time[br] - "multi" : multiple items can be selected at a time[br] - "extended" : multiple items can be selected but only in a single mouse interaction[br] - "none" : no items can be selected[br] - The default mode is "single" + [b]single[/b]: only one item can be selected at a time[br] + [b]multi[/b]: multiple items can be selected at a time[br] + [b]extended[/b]: multiple items can be selected but only in a single mouse interaction[br] + [b]none[/b]: no items can be selected[br] + The default mode is [i]"single" !fn: $setFlag(<idx:integer>,<flag1:string>, <flag2:string>, ...) Sets the flags for the item at index idx to the given flags. These determine whether the item can be selected or modified. This is often used to disable an item.[br] Supported flags are: [example] - [br]- noitemflag : no flag sets; - [br]- selectable : item is selectable; - [br]- editable : item is editable; - [br]- dragEnabled : item can dragged; - [br]- dropEnabled : item can used as drop target; - [br]- userCheckable : item is checkable; - [br]- enabled :item is enabled; - [br]- tristate : item is checkable with three separate states. + - noitemflag : no flag sets;[br] + - selectable : item is selectable;[br] + - editable : item is editable;[br] + - dragEnabled : item can dragged;[br] + - dropEnabled : item can used as drop target;[br] + - userCheckable : item is checkable;[br] + - enabled :item is enabled;[br] + - tristate : item is checkable with three separate states. [/example] !fn: $setChecked(<checkstate:bool>) Sets the eventual item check box 'checked state' to <bool>. @@ -153,8 +153,7 @@ const char * const itemflags_tbl[] = { This signal is emitted by the default implementation of [classfnc]$itemEnteredEvent[/classfnc]().[br] !sg: <string> $selectionChanged() This signal is emitted by the default implementation of [classfnc]$selectionChangedEvent[/classfnc]().[br] - */ - +*/ KVSO_BEGIN_REGISTERCLASS(KvsObject_listWidget,"listbox","widget") KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_listWidget,insertItem) diff --git a/src/modules/objects/KvsObject_multiLineEdit.cpp b/src/modules/objects/KvsObject_multiLineEdit.cpp index c6a77fff6..9bef80f03 100644 --- a/src/modules/objects/KvsObject_multiLineEdit.cpp +++ b/src/modules/objects/KvsObject_multiLineEdit.cpp @@ -64,22 +64,22 @@ Sets the editor to be read-only if bReadOnly is 1 or removes the read-only status if bReadOnly is 0 !fn: <boolean> $atBeginning() - Returns 1 (true) if the cursor is placed at the beginning of the text; otherwise returns 0 (false). + Returns [b]1[/b] (true) if the cursor is placed at the beginning of the text; otherwise returns [b]0[/b] (false). !fn: <boolean> $atEnd() - Returns 1 (true) if the cursor is placed at the end of the text; otherwise returns 0 (false). + Returns [b]1[/b] (true) if the cursor is placed at the end of the text; otherwise returns [b]0[/b] (false). !fn: $setWordWrap(<wrap_mode:string>) Sets the word wrap mode to mode.[br] Valid Values are:[br] [example] - - NoWrap - Do not wrap the text.[br] - - WidgetWidth - Wrap the text at the current width of the widget.[br] - - FixedPixelWidth - Wrap the text at a fixed number of pixels from the widget's left side.[br] - - FixedColumnWidth - Wrap the text at a fixed number of character columns from the widget's left side. + - NoWrap - Do not wrap the text.[br] + - WidgetWidth - Wrap the text at the current width of the widget.[br] + - FixedPixelWidth - Wrap the text at a fixed number of pixels from the widget's left side.[br] + - FixedColumnWidth - Wrap the text at a fixed number of character columns from the widget's left side. [/example] !fn: <string> $wordWrap() Returns the word wrap mode. NoWrap, WidgetWidth, FixedPixelWidth, FixedColumnWidth. !fn: <string> $text() - Returns the multiline edit's text. + Returns the multiline edits text. !fn: <integer> $length() Returns the number of characters in the text This function ignores newlines. !fn: $setMaxLines(<mac_lines:integer>) @@ -99,17 +99,17 @@ !fn: $setFamily(<font_family:string>) Sets the font family of the current format to fontFamily. !fn: $setItalic(<bItalic:boolean>) - If the bool value is 1 sets the current format to italic; otherwise, if it's 0 sets the current format to no-italic. + If the bool value is [b]1[/b] sets the current format to italic; otherwise, if it's [b]0[/b] sets the current format to no-italic. !fn: $setBold(<bBold:boolean>) - If the bool value is 1 sets the current format to bold; otherwise, if it's 0 sets the current format to no-bold. + If the bool value is [b]1[/b] sets the current format to bold; otherwise, if it's [b]0[/b] sets the current format to no-bold. !fn: $setUnderline(<bUnderline:boolean>) - If the bool value is 1 sets the current format to underline; otherwise, if it's 0 sets the current format to no-underline. + If the bool value is [b]1[/b] sets the current format to underline; otherwise, if it's [b]0[/b] sets the current format to no-underline. !fn: <boolean> $italic() - Returns 1 (true) if the current format is italic; otherwise returns 0 (false). + Returns [b]1[/b] (true) if the current format is italic; otherwise returns [b]0[/b] (false). !fn: <boolean> $bold() - Returns 1 (true) if the current format is bold; otherwise returns 0 (false). + Returns [b]1[/b] (true) if the current format is bold; otherwise returns [b]0[/b] (false). !fn: <boolean> $underline() - Returns 1 (true) if the current format is underline; otherwise returns 0 (false). + Returns [b]1[/b] (true) if the current format is underline; otherwise returns [b]0[/b] (false). !fn: $zoomIn(<zoom_range:integer>) Zooms in on the text by making the base font size range points larger. !fn: $zoomOut(<zoom_range:integer>) @@ -123,7 +123,7 @@ !fn: $setUndoRedoEnabled(<bUndoRedo:boolean>) Sets whether undo/redo is enabled to the bool value. !fn: <boolean> $isUndoRedoEnabled() - Returns 1 (true) if undo/redo is enabled; otherwise returns 0 (false). + Returns [b]1[/b] (true) if undo/redo is enabled; otherwise returns [b]0[/b] (false). !fn: <integer> $undoDepth() Returns the depth of the undo history. !fn: $setText(<txt:string>) @@ -142,7 +142,7 @@ !fn: $setPointSize(<point_size:integer)) Sets the point size of the font. !fn: $setLinkUnderline(<bLinkUnderline:boolean>) - Sets to 1 if you want that hypertext links will be underlined; otherwise sets to 0. + Sets to [b]1[/b] if you want that hypertext links will be underlined; otherwise sets to [b]0[/b]. !fn: $setTextFormat(<textformat:string>) Sets the text format. Correct values are RichText, PlainText. !fn: <string> $textFormat() @@ -150,27 +150,27 @@ !fn: $loadFile(<path:string>) Load the file specified in the <path>, also HTML files. !fn: <boolean> $isUndoAvailable () - Returns 1 (true) if undo is available; otherwise returns 0 (false). + Returns [b]1 (true)[/b] if undo is available; otherwise returns [b]0 (false)[/b]. !fn: <boolean> $isRedoAvailable () - Returns 1 (true) if redo is available; otherwise returns 0 (false). + Returns [b]1 (true)[/b] if redo is available; otherwise returns [b]0 (false)[/b]. !fn: <integer> $lines() Returns the number of lines in the multilineedit. !fn: <integer> $lineOfChar(<paragraph:integer>,<index:integer>) Returns the line number of the line in paragraph par in which the character at position index appears.[br] - If there is no such paragraph or no such character at the index position -1 is returned. + If there is no such paragraph or no such character at the index position [b]-1[/b] is returned. !fn: $setModified(<bModified:boolean>) - Sets whether the document has been modified by the user. Valid Values are 1 (true) or 0 (false) + Sets whether the document has been modified by the user. Valid Values are [b]1 (true)[/b] or [b]0 (false)[/b]. !fn: $setAlignment(<alignment:string>) - Sets the alignment of the current paragraph to <alignment>. - Valid values are: + Sets the alignment of the current paragraph to <alignment>.[br] + Valid values are: [example] - - Auto - Aligns according to the language.[br] - - Left - Aligns with the left edge.[br] - - Right - Aligns with the right edge.[br] - - Center - Centers in both dimensions. - - Justify - Justify the text. + - Auto - Aligns according to the language.[br] + - Left - Aligns with the left edge.[br] + - Right - Aligns with the right edge.[br] + - Center - Centers in both dimensions. + - Justify - Justify the text. [/example] - */ +*/ KVSO_BEGIN_REGISTERCLASS(KvsObject_textedit,"multilineedit","widget") diff --git a/src/modules/objects/KvsObject_painter.cpp b/src/modules/objects/KvsObject_painter.cpp index 183e5e276..2d64ea223 100644 --- a/src/modules/objects/KvsObject_painter.cpp +++ b/src/modules/objects/KvsObject_painter.cpp @@ -201,7 +201,6 @@ const char * const brushstyles_tbl[] = { #define brushstyles_num (sizeof(brushstyles_tbl) / sizeof(brushstyles_tbl[0])) - /* @doc: painter @keyterms: @@ -238,10 +237,10 @@ const char * const brushstyles_tbl[] = { All parameters are in integer form. The HSV system, like RGB, has three components:[br] [pre] - * H, for hue, is either 0-359 if the color is chromatic (not gray), or meaningless if it is gray.[br] - It represents degrees on the color wheel familiar to most people. Red is 0 (degrees), green is 120 and blue is 240.[br] - * S, for saturation, is 0-255, and the bigger it is, the stronger the color is. Grayish colors have saturation near 0; very strong colors have saturation near 255.[br] - * V, for value, is 0-255 and represents lightness or brightness of the color. 0 is black; 255 is as far from black as possible.[br] + * H, for hue, is either 0-359 if the color is chromatic (not gray), or meaningless if it is gray.[br] + It represents degrees on the color wheel familiar to most people. Red is 0 (degrees), green is 120 and blue is 240.[br] + * S, for saturation, is 0-255, and the bigger it is, the stronger the color is. Grayish colors have saturation near 0; very strong colors have saturation near 255.[br] + * V, for value, is 0-255 and represents lightness or brightness of the color. 0 is black; 255 is as far from black as possible.[br] [/pre] Examples: [b]Red[/b] is H=0, S=255, V=255.[br] Light red could have H about 0, S about 50-100, and S=255. @@ -251,19 +250,19 @@ const char * const brushstyles_tbl[] = { Sets the painter's brush to have the specified color.[br] Example: [example] - class (wdg,widget)[br] - {[br] - paintevent()[br] - {[br] - %b=$new(painter)[br] - %b->$setBackgroundMode(Opaque)[br] - %b->$setBrush(0,250,250)[br] - %b->$begin($$)[br] - %b->$drawEllipse(50,50,100,50)[br] - }[br] - }[br] - %aa=$new(wdg)[br] - %aa->$show() + class (wdg,widget) + { + paintevent() + { + %b=$new(painter) + %b->$setBackgroundMode(Opaque) + %b->$setBrush(0,250,250) + %b->$begin($$) + %b->$drawEllipse(50,50,100,50) + } + } + %aa=$new(wdg)[br] + %aa->$show() [/example] !fn: $drawRect(<x:integer>,<y:integer>,<w:unsigned integer>,<h:unsigned integer>) Draws a rectangle with upper left corner at (x, y) and with width w and height h. @@ -287,30 +286,30 @@ const char * const brushstyles_tbl[] = { Draws the given <text> within the rectangle specified by <x>,<y> <width> and <height>.[br] The <flag> parameters may be:[br] [pre] - Left[br] - Top[br] - Right[br] - Bottom[br] - HCenter[br] - VCenter[br] - Center[br] - TextSingleLine[br] - TextExpandTabs[br] - TextShowMnemonic[br] - TextWordWrap[br] - TextIncludeTrailingSpaces[br] + Left[br] + Top[br] + Right[br] + Bottom[br] + HCenter[br] + VCenter[br] + Center[br] + TextSingleLine[br] + TextExpandTabs[br] + TextShowMnemonic[br] + TextWordWrap[br] + TextIncludeTrailingSpaces [/pre] !fn: $drawPixmap(<x:integer>,<y:integer>,<pixmap:hobject>,<sx:integer>,<sy:integer>,<ex:integer>,<ey:integer>) Draws a pixmap at x,y coordinates[br] !fn: $setFont(<family:string>,<size:integer>[,<style:enum>,<style:enum>,..])[br] Set the font's family, size and style, valid flag for style are:[br] [pre] - italic[br] - bold [br] - underline [br] - overline [br] - strikeout [br] - fixedpitch [br] + italic[br] + bold [br] + underline [br] + overline [br] + strikeout [br] + fixedpitch [br] [/pre] !fn: $setFontSize(<size:unsigned integer>)[br] Set the current painter font's size.[br] @@ -336,8 +335,8 @@ const char * const brushstyles_tbl[] = { Sets the background mode of the painter to <bgMode>: Valid values are:[br] [pre] - - Transparent (that is the default value);[br] - - Opaque. + - Transparent (that is the default value);[br] + - Opaque. [/pre] !fn: $setOpacity(<opacity_factor:real>) Sets the painter opacity that affects all painter operations (drawpixmap, drawtext...). Valid values range are from 0 (total transparency) to 1 (total opacity)[br] @@ -350,179 +349,175 @@ const char * const brushstyles_tbl[] = { You must call the [classfnc]$begin[/classfnc] before using it. !fn: $setSmoothPixmapTransform(<boolean>) Enable/disable smooth bilinear pixmap transformation algorithm (such as bilinear). - You must call the [classfnc]$begin[/classfnc] before using it. + You must call the [classfnc]$begin[/classfnc] before using it.[br] Example: [example] - [br] - class (hello,widget)[br] - {[br] - constructor()[br] - {[br] - $$->%sintbl[]= $array( 0, 38, 71, 92, 100, 92, 71, 38,0, -38, -71, -92, -100, -92, -71, -38);[br] - $$->%index=0[br] - $$->$starttimer( 30 );[br] - $$->$resize(800,600 );[br] - $$->%string=$0[br] - $$->%waitfor=1;[br] - $$->%nextanim=0[br] - [br] - #zoom and rotation anim[br] - $$->%Zoomindex=11[br] - $$->%degree=0[br] - $$->%Noanim=0[br] - $$->%scrollright=-450[br] - [br] - #anim effect init[br] - $$->%xoffset=4[br] - $$->%yoffset=3[br] - $$->%xstart=270[br] - $$->%ystart=200[br] - $$->%b=0[br] - $$->%yoffs=400[br] - [br] - #parallax parameter[br] - $$->%Off=400[br] - $$->%roll=1[br] - }[br] - timerevent()[br] - {[br] - $$->%b = $(($$->%b + 1) & 15);[br] - if ($$->%nextanim == 1) $$->$repaint(1);[br] - $$->$repaint(0);[br] - }[br] - drawAnim()[br] - {[br] - %P->$setFont(32,"times",bold);[br] - %w=$(%P->$fontMetricsWidth($$->%string[$$->%index]) + 20);[br] - %h=$(%P->$fontMetricsHeight * 2);[br] - %pmx = $(($$->$width/2) -%w/2);[br] - %pmy = $(($$->$height()/2) - %h/2);[br] - %x = 10;[br] - %y= $((%h/2) + $$->$fontDescent());[br] - %i=0[br] - while ( $str.mid("Grifisx/Noldor",%i,1) != "") [br] - {[br] - %i16 = $(($$->%b+%i) & 15);[br] - %char=$str.mid("Grifisx/Noldor",%i,1)[br] - %P->$setPen($((15-%i16)*16),$((15-%i16)*16),$((15-%i16)*16) );[br] - %P->$drawText( $(%x+$$->%xstart),$($$->%ystart+%y-$$->%sintbl[%i16]*%h/800),%char,1,Auto);[br] - %x += %P->$fontMetricsWidth(%char);[br] - %i++;[br] - }[br] - }[br] - matrixeffect()[br] - {[br] - if (($$->%Zoomindex == 99) && ($$->%degree==360)) return %P->$drawPixmap($(400-32),$(300-32),"kvirc.png",0,0,-1,-1)[br] - %P->$scale(0.$$->%Zoomindex,0.$$->%Zoomindex)[br] - if ($$->%Zoomindex != 99) $$->%Zoomindex++;[br] - %P->$rotate($$->%degree)[br] - %P->$translate(400,300)[br] - %P->$drawPixmap(-32,-32,"kvirc.png",0,0,-1,-1)[br] - %P->$setFont(28,"times",bold);[br] - %P->$reset()[br] - if ($$->%scrollright >= 550) return[br] - %P->$scale(0.$$->%Zoomindex,0.$$->%Zoomindex)[br] - %P->$translate(400,350)[br] - %P->$drawText($$->%scrollright,10,"Another cool class brought to you by...",-1,Auto) [br] - $$->%scrollright += 3;[br] - %P->$reset()[br] - }[br] - nextanim()[br] - {[br] - %p=$new(painter)[br] - %p->$setBackgroundMode(Opaque)[br] - %p->$setBrush($rand(255),$rand(255),$rand(255))[br] - %p->$begin($$)[br] - %rand=$rand(5)[br] - %p->$drawrect($rand(800),$rand(400),120,200)[br] - %p->$drawArc($rand(800),$rand(400),120,200,20,$(16*20))[br] - %p->$drawPie($rand(800),$rand(400),120,200,20,$(16*20))[br] - %p->$drawChord($rand(800),$rand(400),120,200,20,$(16*20))[br] - %p->$drawEllipse($rand(800),$rand(400),100,30)[br] - %p->$end()[br] - delete %p[br] - }[br] - paintEvent()[br] - {[br] - if ($$->%nextanim ==1) return $$->$nextanim()[br] - # pixmap creation: every effect will be painted on it then copied on widget[br] - %pixmap=$new(pixmap)[br] - %pixmap->$resize($$->$width(),$$->$height())[br] - [br] - # painter creation [br] - %P=$new(painter);[br] - %P->$begin(%pixmap);[br] - $$->$drawanim[br] - $$->$matrixeffect[br] - %i=0[br] - while (%i != 100)[br] - {[br] - %i16 = $(($$->%b+%i) & 15);[br] - %P->$setPen($((15-%i16)*16),$((15-%i16)*16),$((15-%i16)*16) );[br] - %P->$drawpoint($rand(800),$rand(600))[br] - %i++[br] - }[br] - [br] - # sets the animations order to manage the parallax effect[br] - %P->$end[br] - objects.bitBlt $$ 0 0 %pixmap[br] - delete %pixmap[br] - delete %P[br] - if (%Pauseflag == 1) return[br] - [br] - # manage the animations parameters[br] - if (($$->%Off<=60) && ($$->%roll<182)) $$->%roll += 2;[br] - if ($$->%roll>182) $$->%waitfor=0[br] - if ($$->%Noanim != 1) $$->%degree += 16;[br] - if ($$->%degree >= 360)[br] - {[br] - $$->%degree=0;[br] - if ($$->%Zoomindex == 99) $$->%Noanim=1[br] - } [br] - if ($$->%Noanim != 1) return[br] - [br] - #sinusoid animation[br] - if (($$->%xstart <1) && ($$->%xoffset == -4)) $$->%xoffset=4;[br] - if (($$->%xstart >$($$->$width()-%P->$fontMetricsWidth("Grifisx/Noldor"))) && ($$->%xoffset == 4)) $$->%xoffset=-4;[br] - if (($$->%ystart <1) && ($$->%yoffset == -3)) $$->%yoffset=3;[br] - if (($$->%ystart >$($$->$height()-60)) && ($$->%yoffset == 3)) $$->%yoffset=-3;[br] - $$->%xstart += $$->%xoffset;[br] - $$->%ystart += $$->%yoffset;[br] - }[br] - }[br] - [br] - %Hello=$new(hello)[br] - %Hello->$setWindowTitle("Painter effects" );[br] - %Hello->$setFont(28,"times",bold);[br] - %Btn=$new(button,%Hello)[br] - %Btn->$setmaximumwidth(80)[br] - %Btn->$setmaximumheight(30)[br] - %Btn->$setFont(8,"times",bold);[br] - %Btn->$settext(Next)[br] - [br] - privateimpl(%Btn,mousepressevent)[br] - {[br] - if ($$->$parent->%nextanim==0) [br] - {[br] - $$->$parent->%nextanim=1[br] - $$->$settext(Prev)[br] - } [br] - else[br] - {[br] - $$->$parent->%nextanim=0[br] - $$->$settext(Next)[br] - }[br] - }[br] - [br] - %lay=$new(layout,%Hello)[br] - %lay->$addwidget(%Btn,4,0)[br] - %Hello->$setBackgroundColor("000000");[br] - %Hello->$setmaximumwidth(800)[br] - %Hello->$setminimumwidth(780)[br] - %Hello->$setmaximumheight(600)[br] - %Hello->$setminimumheight(600)[br] - %Hello->$move(10,10)[br] - %Hello->$show();[br] [br] + class (hello,widget) + { + constructor() + { + $$->%sintbl[]= $array( 0, 38, 71, 92, 100, 92, 71, 38,0, -38, -71, -92, -100, -92, -71, -38); + $$->%index=0 + $$->$starttimer( 30 ); + $$->$resize(800,600 ); + $$->%string=$0 + $$->%waitfor=1; + $$->%nextanim=0 + [comment]#zoom and rotation anim[/comment] + $$->%Zoomindex=11 + $$->%degree=0 + $$->%Noanim=0 + $$->%scrollright=-450 + + [comment]#anim effect init[/comment] + $$->%xoffset=4 + $$->%yoffset=3 + $$->%xstart=270 + $$->%ystart=200 + $$->%b=0 + $$->%yoffs=400 + + [comment]#parallax parameter[/comment] + $$->%Off=400 + $$->%roll=1 + } + timerevent() + { + $$->%b = $(($$->%b + 1) & 15); + if ($$->%nextanim == 1) $$->$repaint(1); + $$->$repaint(0); + } + drawAnim() + { + %P->$setFont(32,"times",bold); + %w=$(%P->$fontMetricsWidth($$->%string[$$->%index]) + 20); + %h=$(%P->$fontMetricsHeight * 2); + %pmx = $(($$->$width/2) -%w/2); + %pmy = $(($$->$height()/2) - %h/2); + %x = 10; + %y= $((%h/2) + $$->$fontDescent()); + %i=0 + while ( $str.mid("Grifisx/Noldor",%i,1) != "") + { + %i16 = $(($$->%b+%i) & 15); + %char=$str.mid("Grifisx/Noldor",%i,1) + %P->$setPen($((15-%i16)*16),$((15-%i16)*16),$((15-%i16)*16) ); + %P->$drawText( $(%x+$$->%xstart),$($$->%ystart+%y-$$->%sintbl[%i16]*%h/800),%char,1,Auto); + %x += %P->$fontMetricsWidth(%char); + %i++; + } + } + matrixeffect() + { + if (($$->%Zoomindex == 99) && ($$->%degree==360)) return %P->$drawPixmap($(400-32),$(300-32),"kvirc.png",0,0,-1,-1) + %P->$scale(0.$$->%Zoomindex,0.$$->%Zoomindex) + if ($$->%Zoomindex != 99) $$->%Zoomindex++; + %P->$rotate($$->%degree) + %P->$translate(400,300) + %P->$drawPixmap(-32,-32,"kvirc.png",0,0,-1,-1) + %P->$setFont(28,"times",bold); + %P->$reset() + if ($$->%scrollright >= 550) return + %P->$scale(0.$$->%Zoomindex,0.$$->%Zoomindex) + %P->$translate(400,350) + %P->$drawText($$->%scrollright,10,"Another cool class brought to you by...",-1,Auto) + $$->%scrollright += 3; + %P->$reset() + } + nextanim() + { + %p=$new(painter) + %p->$setBackgroundMode(Opaque) + %p->$setBrush($rand(255),$rand(255),$rand(255)) + %p->$begin($$) + %rand=$rand(5) + %p->$drawrect($rand(800),$rand(400),120,200) + %p->$drawArc($rand(800),$rand(400),120,200,20,$(16*20)) + %p->$drawPie($rand(800),$rand(400),120,200,20,$(16*20)) + %p->$drawChord($rand(800),$rand(400),120,200,20,$(16*20)) + %p->$drawEllipse($rand(800),$rand(400),100,30) + %p->$end() + delete %p + } + paintEvent() + { + if ($$->%nextanim ==1) return $$->$nextanim() + [comment]# pixmap creation: every effect will be painted on it then copied on widget[/comment] + %pixmap=$new(pixmap) + %pixmap->$resize($$->$width(),$$->$height()) + + [comment]# painter creation[/comment] + %P=$new(painter); + %P->$begin(%pixmap); + $$->$drawanim + $$->$matrixeffect + %i=0 + while (%i != 100) + { + %i16 = $(($$->%b+%i) & 15); + %P->$setPen($((15-%i16)*16),$((15-%i16)*16),$((15-%i16)*16) ); + %P->$drawpoint($rand(800),$rand(600)) + %i++ + } + + [comment]# sets the animations order to manage the parallax effect[/comment] + %P->$end + objects.bitBlt $$ 0 0 %pixmap + delete %pixmap + delete %P + if (%Pauseflag == 1) return + [comment]# manage the animations parameters[/comment] + if (($$->%Off<=60) && ($$->%roll<182)) $$->%roll += 2; + if ($$->%roll>182) $$->%waitfor=0 + if ($$->%Noanim != 1) $$->%degree += 16; + if ($$->%degree >= 360) + { + $$->%degree=0; + if ($$->%Zoomindex == 99) $$->%Noanim=1 + } + if ($$->%Noanim != 1) return + [comment]#sinusoid animation[/comment] + if (($$->%xstart <1) && ($$->%xoffset == -4)) $$->%xoffset=4; + if (($$->%xstart >$($$->$width()-%P->$fontMetricsWidth("Grifisx/Noldor"))) && ($$->%xoffset == 4)) $$->%xoffset=-4; + if (($$->%ystart <1) && ($$->%yoffset == -3)) $$->%yoffset=3; + if (($$->%ystart >$($$->$height()-60)) && ($$->%yoffset == 3)) $$->%yoffset=-3; + $$->%xstart += $$->%xoffset; + $$->%ystart += $$->%yoffset; + } + } + + %Hello=$new(hello) + %Hello->$setWindowTitle("Painter effects" ); + %Hello->$setFont(28,"times",bold); + %Btn=$new(button,%Hello) + %Btn->$setmaximumwidth(80) + %Btn->$setmaximumheight(30) + %Btn->$setFont(8,"times",bold); + %Btn->$settext(Next) + + privateimpl(%Btn,mousepressevent) + { + if ($$->$parent->%nextanim==0) + { + $$->$parent->%nextanim=1 + $$->$settext(Prev) + } + else + { + $$->$parent->%nextanim=0 + $$->$settext(Next) + } + } + + %lay=$new(layout,%Hello) + %lay->$addwidget(%Btn,4,0) + %Hello->$setBackgroundColor("000000"); + %Hello->$setmaximumwidth(800) + %Hello->$setminimumwidth(780) + %Hello->$setmaximumheight(600) + %Hello->$setminimumheight(600) + %Hello->$move(10,10) + %Hello->$show(); [/example] */ diff --git a/src/modules/objects/KvsObject_pixmap.cpp b/src/modules/objects/KvsObject_pixmap.cpp index e02cf9106..52eeda284 100644 --- a/src/modules/objects/KvsObject_pixmap.cpp +++ b/src/modules/objects/KvsObject_pixmap.cpp @@ -53,14 +53,16 @@ !fn: $fill(<colorname, RGB or HSV array value or [<red>, <green>, <blue>][<hue>, <saturation>, <value>], [opacity], [system color:RGB or HSV]) Fills the pixmap with color and opacity.[br] !fn: $resize(<width:integer>,<height:integer>) - Resizes the pixmap to w width and h height. Set wh or hg to 0, to have a null pixmap. + Resizes the pixmap to w width and h height. Set [b]wh[/b] or [b]hg to [b]0[/b], to have a null pixmap. !fn: $scale(<width:integer>,<height:integer>,[<aspect_ratio:string>]) - Scales the pixmap or the animation by sx horizontally and sy vertically. + Scales the pixmap or the animation by [b]sx[/b] horizontally and [b]sy[/b] vertically.[br] Aspect_ratio values: - - IgnoreAspectRatio:the pixmap is scaled ignoring his aspect ratio. - - KeepAspectRatio: pixmap is scaled to a rectangle as large as possible inside size, preserving the aspect ratio. - - KeepAspectRatioByExpanding, the pixmap is scaled to a rectangle as small as possible outside size, preserving the aspect ratio. - Default value is KeepAspectRatio. + [pre] + - IgnoreAspectRatio:the pixmap is scaled ignoring his aspect ratio. + - KeepAspectRatio: pixmap is scaled to a rectangle as large as possible inside size, preserving the aspect ratio. + - KeepAspectRatioByExpanding, the pixmap is scaled to a rectangle as small as possible outside size, preserving the aspect ratio. + [/pre] + [b]Default value is KeepAspectRatio.[/b][br][br] !fn: $load(<file_name:string>) Load a pixmap from the file <file_name>. !fn: $save(<file_name:string>) @@ -80,10 +82,8 @@ @signals: !sg: $frameChanged() This signal is emitted by the default implementation of [classfnc]$frameChangedEvent[/classfnc]().[br] - */ - KVSO_BEGIN_REGISTERCLASS(KvsObject_pixmap,"pixmap","object") KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_pixmap,fill) diff --git a/src/modules/objects/KvsObject_popupMenu.cpp b/src/modules/objects/KvsObject_popupMenu.cpp index c368e9a02..8524c171c 100644 --- a/src/modules/objects/KvsObject_popupMenu.cpp +++ b/src/modules/objects/KvsObject_popupMenu.cpp @@ -85,83 +85,83 @@ [br] @examples: [example] - [comment]//First we define a class inherited from popupmenu[/comment] - class(menu,popupmenu) - { - constructor() - { - [comment]//We store the item's ID for checking in activatedEvent[/comment] - @%tile_id=@$insertItem("Tile",118) - @%cascade_id=@$insertItem("Cascade",115) - @$insertSeparator(3) - @%closeactw_id=@$insertItem("Close Active Window",08) - @%closeallw_id=@$insertItem("Close All Window",58) - } - activatedEvent() + [comment]# First we define a class inherited from popupmenu[/comment] + class(menu,popupmenu) { - [comment]//Now we emit a signals to the relative to the user choice[/comment] - %id=$0 - if (%id==@%tile_id) @$emit("tile") - else if(%id==@%cascade_id) @$emit("cascade") - else if (%id==@%closeactw_id) @$emit("closeactive") - else @$emit("closeallwindows") - [comment]//Deleting the popup[/comment] - delete $$ + constructor() + { + [comment]# We store the item's ID for checking in activatedEvent[/comment] + @%tile_id=@$insertItem("Tile",118) + @%cascade_id=@$insertItem("Cascade",115) + @$insertSeparator(3) + @%closeactw_id=@$insertItem("Close Active Window",08) + @%closeallw_id=@$insertItem("Close All Window",58) + } + activatedEvent() + { + [comment]# Now we emit a signals to the relative to the user choice[/comment] + %id=$0 + if (%id==@%tile_id) @$emit("tile") + else if(%id==@%cascade_id) @$emit("cascade") + else if (%id==@%closeactw_id) @$emit("closeactive") + else @$emit("closeallwindows") + [comment]# Deleting the popup[/comment] + delete $$ + } } - } - class (ws,widget)[br] - { - [comment]In the constructor we create everything that belong to the single widget.[/comment] - constructor() + class (ws,widget)[br] { - [comment]//Here we generate a loop to create our labels inside the widget.[/comment] - %lay=$new(layout,$$) - [comment]we use a vbox to managing labels in vertical orientation[/comment] - %vb=$new(vbox,$$) - [comment]Then add the vbox to the main layout[/comment] - %lay->$addWidget(%vb,0,0) - [comment]Let's create our colorful labels[/comment] - for(%i=0;%i<15;%i++) + [comment]In the constructor we create everything that belong to the single widget.[/comment] + constructor() { - @%label=$new(label,%vb) - @%label->$settext("Another class by N\&G") - #We set our foreground's colors using the hex array in a random way. - @%label->$setforegroundcolor($array($rand(255),$rand(255),$rand(255))) + [comment]# Here we generate a loop to create our labels inside the widget.[/comment] + %lay=$new(layout,$$) + [comment]we use a vbox to managing labels in vertical orientation[/comment] + %vb=$new(vbox,$$) + [comment]# Then add the vbox to the main layout[/comment] + %lay->$addWidget(%vb,0,0) + [comment]# Let's create our colorful labels[/comment] + for(%i=0;%i<15;%i++) + { + @%label=$new(label,%vb) + @%label->$settext("Another class by N\&G") + [comment]# We set our foreground's colors using the hex array in a random way.[/comment] + @%label->$setforegroundcolor($array($rand(255),$rand(255),$rand(255))) + } + } + customContextMenuRequestedEvent() + { + [comment]# We create the popupmenu relative to this widget at runtime.[/comment] + %p=$new(menu,$$) + objects.connect %p tile @$parent tile + objects.connect %p cascade @$parent cascade + objects.connect %p closeactive @$parent closeactivewindow + objects.connect %p closeallwindows @$parent closeallwindows + %p->$exec($$,$($0+10),$($1+10)) } } - customContextMenuRequestedEvent() + [comment]# We create the workspace widget[/comment] + %Workspace=$new(workspace) + [comment]# We use as space as we have[/comment] + %size[]=%Workspace->$screenResolution() + [comment]# Resize it[/comment] + %Workspace->$resize(%size[0],%size[1]) + [comment]# Then create 20 subwidget[/comment] + for(%i=0;%i<20;%i++) { - [comment]//We create the popupmenu relative to this widget at runtime.[/comment] - %p=$new(menu,$$) - objects.connect %p tile @$parent tile - objects.connect %p cascade @$parent cascade - objects.connect %p closeactive @$parent closeactivewindow - objects.connect %p closeallwindows @$parent closeallwindows - %p->$exec($$,$($0+10),$($1+10)) + %w=$new(ws,%Workspace) + [comment]# Let's add every widget to the workspace[/comment] + %Workspace->$addSubWindow(%w) + [comment]# Then "shake it" a little bit around :-)[/comment] + %w->$move($rand($(%size[0]-50)),$rand($(%size[1]-50))) } - } - [comment]//We create the workspace widget[/comment] - %Workspace=$new(workspace) - [comment]//We use as space as we have[/comment] - %size[]=%Workspace->$screenResolution() - [comment]//Resize it[/comment] - %Workspace->$resize(%size[0],%size[1]) - [comment]//Then create 20 subwidget[/comment] - for(%i=0;%i<20;%i++) - { - %w=$new(ws,%Workspace) - [comment]//Let's add every widget to the workspace[/comment] - %Workspace->$addSubWindow(%w) - [comment]//Then "shake it" a little bit around :-)[/comment] - %w->$move($rand($(%size[0]-50)),$rand($(%size[1]-50))) - } - [comment]//Reimplement closeEvent to delete all this :-)[/comment] - privateimpl(%Workspace,closeEvent) - { - delete $$ - } - [comment]//Let's show![/comment] - %Workspace->$show() + [comment]# Reimplement closeEvent to delete all this :-)[/comment] + privateimpl(%Workspace,closeEvent) + { + delete $$ + } + [comment]# Let's show![/comment] + %Workspace->$show() [/example] */ diff --git a/src/modules/objects/KvsObject_process.cpp b/src/modules/objects/KvsObject_process.cpp index e7c4b1931..d58ec3f64 100644 --- a/src/modules/objects/KvsObject_process.cpp +++ b/src/modules/objects/KvsObject_process.cpp @@ -44,7 +44,7 @@ [class]object[/class] @description: The Process class is used to start external programs and to communicate with them.[br] - !WARNING AT LAST YOU HAVE TO CLOSE THE PROCESS! + [b]WARNING! at last you have to close the process![/b] @functions: !fn: $addArgument(<process-name:string>) With this command you give the process name (or more arguments) for communication. @@ -53,9 +53,9 @@ Tries to run the process.[br] [b]e.g.[/b] [example] - %process=$new(process);[br] - %process->$addArg("cmd.exe");[br] - %process->$start();[br] + %process=$new(process);[br] + %process->$addArg("cmd.exe");[br] + %process->$start();[br] [/example] !fn: <string> $readStdout() Reads the data that the process has written to standard output. @@ -63,70 +63,70 @@ Reads the data that the process has written to standard error. [b]e.g.[/b] [example] - class (test,object)[br] - {[br] - slotReadStdout()[br] - {[br] - %stdo = %Process->$readStdout()[br] - #%Aoutput->$append(%stdo);// coming soon in the new texteditor class[br] - %Aoutput->$settext(%stdo);[br] - }[br] - slotReadStderr()[br] - {[br] - %stderr= %Process->$readStderr()[br] - #%Aoutput->$append(%stderr);// coming soon in the new texteditor class[br] - %Aoutput->$settext(%stderr);[br] - }[br] - }[br] + class (test,object) + { + slotReadStdout() + { + %stdo = %Process->$readStdout() + #%Aoutput->$append(%stdo);[comment]# coming soon in the new texteditor class[/comment] + %Aoutput->$settext(%stdo); + } + slotReadStderr() + { + %stderr= %Process->$readStderr() + #%Aoutput->$append(%stderr);[comment]# coming soon in the new texteditor class[/comment] + %Aoutput->$settext(%stderr); + } + } - %tt=$new(test)[br] - %A=$new(widget)[br] - %A->$setGeometry(100,100,400,300)[br] - %layoutA=$new(layout,%A)[br] - %Ainput=$new(lineedit,%A)[br] - #%Aoutput=$new(textedit,%A) [comment]//coming soon in the new texteditor class[/commnet][br] - %Aoutput=$new(label,%A)[br] - %bclosekill=$new(button,%A)[br] - %bclosekill->$settext("&CloseKill ")[br] - %bkill=$new(button,%A)[br] - %bkill->$settext("&Kill ")[br] - %bterminate=$new(button,%A)[br] - %bterminate->$settext("&Ask to Terminate ")[br] - %layoutA->$addwidget(%Ainput,0,0)[br] - %layoutA->$addwidget(%Aoutput,1,0)[br] - %layoutA->$addwidget(%bclosekill,3,0)[br] - %layoutA->$addwidget(%bkill,4,0,)[br] - %layoutA->$addwidget(%bterminate,5,0)[br] + %tt=$new(test) + %A=$new(widget) + %A->$setGeometry(100,100,400,300) + %layoutA=$new(layout,%A) + %Ainput=$new(lineedit,%A) + #%Aoutput=$new(textedit,%A)[comment]# coming soon in the new texteditor class[/commnet] + %Aoutput=$new(label,%A) + %bclosekill=$new(button,%A) + %bclosekill->$settext("&CloseKill ") + %bkill=$new(button,%A) + %bkill->$settext("&Kill ") + %bterminate=$new(button,%A) + %bterminate->$settext("&Ask to Terminate ") + %layoutA->$addwidget(%Ainput,0,0) + %layoutA->$addwidget(%Aoutput,1,0) + %layoutA->$addwidget(%bclosekill,3,0) + %layoutA->$addwidget(%bkill,4,0,) + %layoutA->$addwidget(%bterminate,5,0) - %Process=$new(process)[br] - %Process->$addArgument("cmd.exe")[br] - %Process->$startProcess();[br] + %Process=$new(process) + %Process->$addArgument("cmd.exe") + %Process->$startProcess(); - connect %Process readyReadStdout %tt slotReadStdout[br] - connect %Process readyReadStderr %tt slotReadStderr[br] - privateimpl(%Ainput,returnPressedEvent)[br] - { - %command=%Ainput->$text() "\r\n"[br] - %Process->$writeToStdin(%command);[br] - %Ainput->$setText("");[br] - }[br] + connect %Process readyReadStdout %tt slotReadStdout + connect %Process readyReadStderr %tt slotReadStderr + privateimpl(%Ainput,returnPressedEvent) + { + %command=%Ainput->$text() "\r\n" + %Process->$writeToStdin(%command); + %Ainput->$setText(""); + } - privateimpl(%bclosekill,mousepressevent)[br] - {[br] - %Process->$closekill();[br] - delete %A;[br] - }[br] - privateimpl(%bkill,mousepressevent)[br] - {[br] - %Process->$kill();[br] - delete %A;[br] - }[br] - privateimpl(%bterminate,mousepressevent)[br] - {[br] - %Process->$tryTerminate();[br] - delete %A;[br] - }[br] - %A->$show();[br] + privateimpl(%bclosekill,mousepressevent) + { + %Process->$closekill(); + delete %A; + } + privateimpl(%bkill,mousepressevent) + { + %Process->$kill(); + delete %A; + } + privateimpl(%bterminate,mousepressevent) + { + %Process->$tryTerminate(); + delete %A; + } + %A->$show(); [/example] !fn: $writeToStdin(<command:string>) With this command you send a command to the process: @@ -136,7 +136,7 @@ (I think that this is the better way.)[br] [b]e.g.[/b] [pre] - %Process->close_kill(); + %Process->close_kill(); [/pre] !fn: $kill() Kill the process the hard way (Bad Idea). diff --git a/src/modules/objects/KvsObject_radioButton.cpp b/src/modules/objects/KvsObject_radioButton.cpp index e26f3c108..05d732224 100644 --- a/src/modules/objects/KvsObject_radioButton.cpp +++ b/src/modules/objects/KvsObject_radioButton.cpp @@ -30,6 +30,7 @@ #include "KviIconManager.h" #include <QRadioButton> + /* @doc: radiobutton @keyterms: @@ -52,18 +53,15 @@ !fn: $setChecked(<bChecked:boolean>) Sets whether the radio button is checked to check. !fn: $setPixmap(<image_id>) - Sets the pixmap shown on the radiobutton..See the [doc:image_id]image identifier[/doc] documentation for the explanation - of the <image_id> parameter. + Sets the pixmap shown on the radiobutton. See the [doc:image_id]image identifier[/doc] + documentation for the explanation of the <image_id> parameter. !fn: <bool>$toggleEvent() - Called by KVIrc when the radibutton state is toggled. + Called by KVIrc when the radiobutton state is toggled. The default implementation emits the toggled(<bool>) signal. !sg: $toggled() This signal is emitted by the default implementation of [classfnc]$toggleEvent[/classfnc]().[br] - - */ - KVSO_BEGIN_REGISTERCLASS(KvsObject_radioButton,"radiobutton","widget") KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_radioButton,setText) diff --git a/src/modules/objects/KvsObject_slider.cpp b/src/modules/objects/KvsObject_slider.cpp index 06651dfb0..3eac95140 100644 --- a/src/modules/objects/KvsObject_slider.cpp +++ b/src/modules/objects/KvsObject_slider.cpp @@ -31,7 +31,6 @@ #include <QSlider> - /* @doc: slider @keyterms: @@ -67,12 +66,14 @@ !fn: $setTickmarks(<tick_marks:string>) Sets the tickmark settings for this slider.[br] Values are:[br] - NoMarks - do not draw any tickmarks.[br] - Both - draw tickmarks on both sides of the groove.[br] - Above - draw tickmarks above the (horizontal) slider[br] - Below - draw tickmarks below the (horizontal) slider[br] - Left - draw tickmarks to the left of the (vertical) slider[br] - Right - draw tickmarks to the right of the (vertical) slider + [pre] + NoMarks - do not draw any tickmarks.[br] + Both - draw tickmarks on both sides of the groove.[br] + Above - draw tickmarks above the (horizontal) slider[br] + Below - draw tickmarks below the (horizontal) slider[br] + Left - draw tickmarks to the left of the (vertical) slider[br] + Right - draw tickmarks to the right of the (vertical) slider + [/pre] !fn: $setTickInterval(<value>) Sets the interval between tickmarks. !fn: <integer> $value() @@ -95,11 +96,8 @@ !sg: $valueChanged() This signal is emitted by the default implementation of [classfnc]valueChangedEvent[/classfnc]().[br] If you reimplement that function you will have to emit the signal manually (if you still need it). - */ - - KVSO_BEGIN_REGISTERCLASS(KvsObject_slider,"slider","widget") diff --git a/src/modules/objects/KvsObject_socket.cpp b/src/modules/objects/KvsObject_socket.cpp index 7dfe40c00..1f64b4043 100644 --- a/src/modules/objects/KvsObject_socket.cpp +++ b/src/modules/objects/KvsObject_socket.cpp @@ -83,6 +83,7 @@ const char * const sockerrors_tbl[] = { "ProxyProtocol", "UnknownSocket" }; + /* @doc: socket @keyterms: @@ -103,20 +104,20 @@ const char * const sockerrors_tbl[] = { !fn: <integer or string> $status(<asString:boolean>) Returns the status of the socket :[br] [pre] - 0 = Unconnected - 1 = HostLookUp - 2 = Connecting[br] - 3 = Connected[br] - 4 = Bound[br] - 5 = Closing[br] - 6 = Listening + 0 = Unconnected + 1 = HostLookUp + 2 = Connecting[br] + 3 = Connected[br] + 4 = Bound[br] + 5 = Closing[br] + 6 = Listening [/pre] !fn: $connect(<host>,<port>) Attempts a connection to <host> on port <port>.[br] <host> can be a numeric internet address (either IPv4 or IPv6 (if supported)) or a hostname.[br] - If a hostname is used, a DNS lookup is performed (the socket enters the "DNS call" state).[br] - This function returns 1 if the connect attempt can be successfully initiated, - 0 otherwise.[br] In fact, this function returns 0 only if the supplied <port> parameter + If a hostname is used, a DNS lookup is performed (the socket enters the [i]DNS call[i/] state).[br] + This function returns [b]1[/b] if the connect attempt can be successfully initiated, and + [b]0[/b] otherwise.[br] In fact, this function returns [b]0[/b] only if the supplied <port> parameter is invalid or the socket is in an incoherent state (already connected or listening): for a newly created socket and with a valid <port> number you can safely ignore the return value.[br] @@ -124,56 +125,48 @@ const char * const sockerrors_tbl[] = { the socket is [b]not[/b] connected: it has just initiated the connect attempt and you will be notified of the attempt result by an asynchronous event call: in case of failure, $connectFailedEvent() will be called, in case of - succes, $connectEvent() will be called. - + success, $connectEvent() will be called. !fn: $listen([<port>[,<interface>[,<force_ipv6>]]]) Attempts to listen on the specified <port> and <interface>.[br] - If <port> is not passed it is assumed to be 0, if <interface> is not passed, it is assumed to be - "any interface" (INADDR_ANY).[br] Port 0 means that the kernel should choose a "random" port to listen on.[br] + If <port> is not passed it is assumed to be [b]0[/b], if <interface> is not passed, it is assumed to be + [i]any interface[/i] (INADDR_ANY).[br] Port 0 means that the kernel should choose a [i]random[/i] port to listen on.[br] If the <interface> is recognized as IPv6 address, and IPv6 is supported, the socket listens in IPv6 mode. If <interface> is an empty string and <force_ipv6> is 1 the socket listens - on "any ipv6 interface".[br] - This function returns '1' in case of success and '0' in case of failure.[br] + on [i]any IPv6 interface[/i].[br] + This function returns [b]1[/b] in case of success and [b]0[/b] in case of failure.[br] On some systems listening in the IPv6 namespace allows to accept also IPv4 connections (this includes Linux but not windows afaik).[br] When an incoming connection will arrive, $incomingConnectionEvent() will be called. - !fn: $connectedEvent() This function is called when a connection attempt has been successfully completed. The socket is currently connected to [classfnc:socket]$remoteIp[/classfnc]() on [classfnc:socket]$remotePort[/classfnc](). You can start writing data and you may expect [classfnc:socket]$dataAvailableEvent[/classfnc]() to be triggered. - !fn: $incomingConnectionEvent(<socket:h_object>) This function is called when an incoming connection arrives over a socket in listening state.[br] - You must return 1 if you to terminated this incoming connection call [classfnc:socket]$accept[/classfnc]() passing a newly created socket object + You must return [b]1[/b] if you to terminated this incoming connection call [classfnc:socket]$accept[/classfnc]() passing a newly created socket object to accept and handle the connection.[br] If you don't call [classfnc:socket]$accept[/classfnc]() the incoming connection will be automatically terminated. - !fn: $connectFailedEvent(<reason>) This function is called when a connection attempt fails for some reason. <reason> contains the error string.[br] This function may be called only between a call to [classfnc:socket]$connect[/classfnc]() and the [classfnc:socket]$connectEvent[/classfnc](). - !fn: $disconnectEvent([error]) This function is called when a connection is terminated either cleanly or because of an error.[br] - [error] is an empty string in case of a "clean" termination (connection closed by the remote host) + [error] is an empty string in case of a [i]clean[/i] termination (connection closed by the remote host) or is a message describing the socket error that caused the connection to be interrupted. - !fn: $dataAvailableEvent(<data_length>) This function is called when some data is available to be read: the <data_length> parameter specifies the length of the available data in bytes.[br] You can use one of the $read* functions to obtain the data - !fn: $read(<length>[,<hobject>]) - Reads at most <length> bytes of data from the socket. If <length> is anything "outside" the + Reads at most <length> bytes of data from the socket. If <length> is anything [i]outside[/i] the available data range (<length> < 0 or <length> > available_data_length), this function returns all the available data.[br] By default this function can deal ASCII data only: NULL characters are transformed to ASCII characters 255. You can pass a [class]memorybuffer[/class] object to read binary data. - !fn: $write(<data, array,files or hobject>[,length]) Writes <data> to the socket.[br] This function can deal with binary data passing a [class]memorybuffer[/class] object[br] @@ -183,7 +176,6 @@ const char * const sockerrors_tbl[] = { Using an array you can pass bytes or data string like this: @$write($array($(0xff),$(0xff),$(0xff),$(0xff),"This is an example")); If you're going to [cmd]delete[/cmd] this object just after the $write call, you should call [classfnc:socket]$close[/classfnc]() just before [cmd]delete[/cmd] to ensure the data delivery. - !fn: $close() Resets this socket state: kills any pending or active connection. After a close() call the socket may be used for a new connection.[br] @@ -191,97 +183,91 @@ const char * const sockerrors_tbl[] = { You don't need to call $close() if you [cmd]delete[/cmd] the socket: KVIrc will reset the socket state automatically and free the memory. But if you want to ensure data delivery after a $write call sequence and just before a [cmd]delete[/cmd], $close() is the only chance to do it. - !fn: $remoteIp() Returns the IP address of the remote end of this socket.[br] The return value is meaningful only if the socket is in connected or connecting state. - !fn: $setProtocol(<protocol>) Let KVIrc use TCP or UDP protocol - !fn: $remotePort() Returns the port of the remote end of this socket.[br] The return value is meaningful only if the socket is in connected or connecting state. - !fn: $localIp() Returns the IP address of the local end of this socket.[br] The return value is meaningful only if the socket is in connected, listening or connecting state. - !fn: $localPort() Returns the port of the local end of this socket.[br] The return value is meaningful only if the socket is in connected, listening or connecting state. - @examples: [example] - // Server socket: listen 8080 port and answer to requests (multi-threaded) - class("webserver","socket") - { - function incomingConnectionEvent() + [comment]# Server socket: listen 8080 port and answer to requests (multi-threaded)[/comment] + class("webserver","socket") { - // incoming connection socket passed by the framework - %socket = $0 - debug "Webserver incoming Connection from: %socket->$remoteIp : %socket->$remotePort" - %socket->$write("HTTP/1.0 200 OK\n\n<html><head></head><body><h1>KVIrc Webserver</h1></body></html>\n") - // tells KVIrc no need this socket anymore - return $true() - } - function constructor() - { - debug listen @$listen(8080, "127.0.0.1") + function incomingConnectionEvent() + { + [comment]# incoming connection socket passed by the framework[/comment] + %socket = $0 + debug "Webserver incoming Connection from: %socket->$remoteIp : %socket->$remotePort" + %socket->$write("HTTP/1.0 200 OK\n\n<html><head></head><body><h1>KVIrc Webserver</h1></body></html>\n") + [comment]# tells KVIrc no need this socket anymore[/comment] + return $true() + } + function constructor() + { + debug listen @$listen(8080, "127.0.0.1") + } } - } - // finally start webserver - %WebS = $new(webserver) + [comment]# finally start webserver[/comment] + %WebS = $new(webserver) [/example] [example] - // Client socket - go to google and grab request header[br] - class("httprequest","socket") - { - function errorEvent() - { - // the connection to the server failed - debug "Connection failed: "$0 - delete $$ - } - function disconnectedEvent() - { - // connection has been closed - debug "Connection is closed" - delete $$ - } - function destructor() - { - // if the socket is still open close it - if(@$status() == "Connected") @$close() - } - function stateChangedEvent() - { - debug socket state $0 - } - function dataAvailableEvent() + [comment]# Client socket - go to google and grab request header[/comment][br] + class("httprequest","socket") { - // reading the received data - debug reading $0 bytes - %newdata = @$read($0) - debug data: %newdata - // close and delete the socket - @$close() - delete $$ - } - function constructor() - { - // connect to the server - @$connect("www.google.com",80) - } - function connectedEvent() - { - // connection is complete - // send a request to receive the headers only from http://www.google.com/ - debug connected - debug written bytes @$write("HEAD / HTTP/1.1\r\nHost: www.google.de\r\nConnection: Close\r\nUser-Agent: KVIrc socket\r\n\r\n") on socket; + function errorEvent() + { + [comment]# the connection to the server failed[/comment] + debug "Connection failed: "$0 + delete $$ + } + function disconnectedEvent() + { + [comment]# connection has been closed[/comment] + debug "Connection is closed" + delete $$ + } + function destructor() + { + [comment]# if the socket is still open close it[/comment] + if(@$status() == "Connected") @$close() + } + function stateChangedEvent() + { + debug socket state $0 + } + function dataAvailableEvent() + { + [comment]# reading the received data[/comment] + debug reading $0 bytes + %newdata = @$read($0) + debug data: %newdata + [comment]# close and delete the socket[/comment] + @$close() + delete $$ + } + function constructor() + { + [comment]# connect to the server[/comment] + @$connect("www.google.com",80) + } + function connectedEvent() + { + [comment]# connection is complete[/comment] + [comment]# send a request to receive the headers only from http://www.google.com/[/comment] + debug connected + debug written bytes @$write("HEAD / HTTP/1.1\r\nHost: www.google.de\r\nConnection: Close\r\nUser-Agent: KVIrc socket\r\n\r\n") on socket; + } } - } - %Temp = $new(httprequest) + %Temp = $new(httprequest) [/example] */ diff --git a/src/modules/objects/KvsObject_sql.cpp b/src/modules/objects/KvsObject_sql.cpp index 5083a4f9f..722f1724b 100644 --- a/src/modules/objects/KvsObject_sql.cpp +++ b/src/modules/objects/KvsObject_sql.cpp @@ -40,78 +40,75 @@ c->error("No connection has been initialized!");\ return false;} - /* - @doc: sql - @keyterms: - Sql database. - @title: - sql class - @type: - class - @short: - A SQL database interface. - @inherits: - [class]object[/class] - @description: - This class permits KVIrc to have an interface with a SQL database supported by Qt library drivers. - @functions: - !fn: <boolean> $setConnection(<database_name:string>,<connection_name:string>,[<user:string>,<host_name_string>,<password:string>,<database_driver:string>]) - Connects to the DBMS using the connection <connection_name> and selecting the database <database_name>.[br] - If the optional parameter <database_driver> is passed, it will be used the corresponding driver (if present), otherwise Sqlite will be used. - Returns true if the operation is successful, false otherwise. - !fn:: <array or string> $connectionNames([<stringreturnflag>:'s']) - Returns as array or, if the flag 's' is passed, as a comma separate string all the database active connection's names. - !fn: <array> $tablesList(<connection_name:string>) - Returns as array the database tables list. - !fn: $transaction() - Begin a transaction. - !fn: $commit() - Commit the transaction. - !fn: $setCurrentQuery(<connection_name:string>) - Sets the query for the database connection <connection_name>, which has to be already connected, as current query. - !fn: <connection_name:string> $currentQuery() - Returns the name of the database connection for the current query, or an empty string if there aren't any initialized queries. - !fn: $closeConnection(<connection_name:string>) - Closes the connection <connection_name>. - !fn: <size:integer> $queryResultsSize() - Returns the query size in rows or -1 if the query is empty or the database driver doesn't support the function. - !fn: <error:string> $lastError(<more_details:boolean>) - Returns last error occurred. Use the more_details flag for more info about the error. - !fn: <ok:boolean> $queryExec([<query:string>]) - Execs the current query <query>. The string must follow the right syntax against the database in use. - If there are no parameters, it will exec the query previously done. - After the execution, the query will positioned on the first resulting record. - Returns true if the operation is successful, false otherwise. - See also [classfnc]$queryPrepare[/classfnc]() - !fn: <ok:boolean> $queryPrepare(<query_string>) - Prepare the query <query> to execute. The string must follow the right syntax against the database in use. - It's possible to use the placeholders. It's supported either the identifier ':' and '?' but it's not possible to use them together. - Returns true if the operation is successful, false otherwise. - See also [classfnc]$queryExec[/classfnc]and[classfnc]$queryBindValue[/classfnc]. - !fn: $queryBindValue() - Sets the placeholder <placeholder> to be bound to the value <val> in the prepared statement. - Note that the placeholder mark (e.g :) must be included when specifying the placeholder name. - !fn: <boolean> $queryPrevious() - Sets the current query position to the previous resulting record. - Returns true if the operation is successful, false otherwise. - !fn: <boolean> $queryNext() - Sets the current query position to the next resulting record. - Returns true if the operation is successful, false otherwise. - !fn: <boolean> $queryLast() - Sets the current query position to the last resulting record. - Returns true if the operation is successful, false otherwise. - !fn: <boolean> $queryFirst() - Sets the current query position to the first resulting record. - Returns true if the operation is successful, false otherwise. - !fn: <record:hash> $queryRecord() - Returns a hash containing the current query's record fields. - !fn: $queryFinish() - Sets the current query to inactive. + @doc: sql + @keyterms: + Sql database. + @title: + sql class + @type: + class + @short: + A SQL database interface. + @inherits: + [class]object[/class] + @description: + This class permits KVIrc to have an interface with a SQL database supported by Qt library drivers. + @functions: + !fn: <boolean> $setConnection(<database_name:string>,<connection_name:string>,[<user:string>,<host_name_string>,<password:string>,<database_driver:string>]) + Connects to the DBMS using the connection <connection_name> and selecting the database <database_name>.[br] + If the optional parameter <database_driver> is passed, it will be used the corresponding driver (if present), otherwise SQLite will be used. + Returns true if the operation is successful, false otherwise. + !fn:: <array or string> $connectionNames([<stringreturnflag>:'s']) + Returns as array or, if the flag '[b]s[/b] is passed, as a comma separate string all the database active connection's names. + !fn: <array> $tablesList(<connection_name:string>) + Returns as array the database tables list. + !fn: $transaction() + Begin a transaction. + !fn: $commit() + Commit the transaction. + !fn: $setCurrentQuery(<connection_name:string>) + Sets the query for the database connection <connection_name>, which has to be already connected, as current query. + !fn: <connection_name:string> $currentQuery() + Returns the name of the database connection for the current query, or an empty string if there aren't any initialized queries. + !fn: $closeConnection(<connection_name:string>) + Closes the connection <connection_name>. + !fn: <size:integer> $queryResultsSize() + Returns the query size in rows or -1 if the query is empty or the database driver doesn't support the function. + !fn: <error:string> $lastError(<more_details:boolean>) + Returns last error occurred. Use the more_details flag for more info about the error. + !fn: <ok:boolean> $queryExec([<query:string>]) + Execs the current query <query>. The string must follow the right syntax against the database in use. + If there are no parameters, it will exec the query previously done. + After the execution, the query will positioned on the first resulting record. + Returns true if the operation is successful, false otherwise. + See also [classfnc]$queryPrepare[/classfnc]() + !fn: <ok:boolean> $queryPrepare(<query_string>) + Prepare the query <query> to execute. The string must follow the right syntax against the database in use. + It's possible to use the placeholders. It's supported either the identifier [b]:[/b] and [b]?[/b] but it's not possible to use them together. + Returns true if the operation is successful, false otherwise. + See also [classfnc]$queryExec[/classfnc]and[classfnc]$queryBindValue[/classfnc]. + !fn: $queryBindValue() + Sets the placeholder <placeholder> to be bound to the value <val> in the prepared statement. + Note that the placeholder mark (e.g [b]:[/b]) must be included when specifying the placeholder name. + !fn: <boolean> $queryPrevious() + Sets the current query position to the previous resulting record. + Returns true if the operation is successful, false otherwise. + !fn: <boolean> $queryNext() + Sets the current query position to the next resulting record. + Returns true if the operation is successful, false otherwise. + !fn: <boolean> $queryLast() + Sets the current query position to the last resulting record. + Returns true if the operation is successful, false otherwise. + !fn: <boolean> $queryFirst() + Sets the current query position to the first resulting record. + Returns true if the operation is successful, false otherwise. + !fn: <record:hash> $queryRecord() + Returns a hash containing the current query's record fields. + !fn: $queryFinish() + Sets the current query to inactive. */ - - KVSO_BEGIN_REGISTERCLASS(KvsObject_sql,"sql","object") KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_sql,queryLastInsertId) KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_sql,commit) diff --git a/src/modules/objects/KvsObject_tabWidget.cpp b/src/modules/objects/KvsObject_tabWidget.cpp index 4eef1a790..69a9ea652 100644 --- a/src/modules/objects/KvsObject_tabWidget.cpp +++ b/src/modules/objects/KvsObject_tabWidget.cpp @@ -94,16 +94,16 @@ See also [classfnc]$setTabsClosable[/classfnc](). @examples: [example] - [comment]// First we'll create the main tabWidget.[/comment] + [comment]# First we'll create the main tabWidget.[/comment] %Tabwidget=$new(tabWidget) %Tabwidget->$setToolTip("Example of TabWidget class") %Tabwidget->$setTabPosition(Top) %Tabwidget->$resize(300,200) - [comment]// Now we'll create the new widgets and put they in to the main tabWidget.[/comment] + [comment]# Now we'll create the new widgets and put they in to the main tabWidget.[/comment] %firsttab=$new(vbox) %secondtab=$new(vbox) - [comment]// Now we'll create the item to put in to tab's pages.[/comment] - [comment]// First tab[/comment] + [comment]# Now we'll create the item to put in to tab's pages.[/comment] + [comment]# First tab[/comment] %hbox=$new(hbox,%firsttab) %labelbt=$new(label,%hbox) %labelbt->$settext(Botton Tab) @@ -114,11 +114,13 @@ %buttontb->$settext("To &Botton") %buttontt=$new(button,%hbox) %buttontt->$settext("To &Top") - [comment]// Now we'll give a layout to all items.[/comment] - [comment]// This also allows to use privateimpl without making buttons global variables[/comment] - [comment]// Add the page to the main tab.[/comment] + [comment] + # Now we'll give a layout to all items. + # This also allows to use privateimpl without making buttons global variables + # Add the page to the main tab. + [/comment] %Tabwidget->$addTab(%firsttab,Top&Button,33) - [comment]// Implementing the action to do when the user click the buttons.[/comment] + [comment]# Implementing the action to do when the user click the buttons.[/comment] privateimpl(%buttontb,mousepressevent) { %Tabwidget->$setTabPosition(Bottom) @@ -127,7 +129,7 @@ { %Tabwidget->$setTabPosition(Top) } - [comment]// We do the same work with the second tab's page.[/comment] + [comment]# We do the same work with the second tab's page.[/comment] %labelwp=$new(label,%secondtab) %labelwp->$settext("Enjoy the new Class provided by") %labelwp->$setalignment("Center") @@ -135,7 +137,7 @@ %labelgen->$settext(Grifisx \& Noldor) %labelgen->$setalignment("Center") %Tabwidget->$addTab(%secondtab,&About,50) - [comment]// Let's show our example.[/comment] + [comment]# Let's show our example.[/comment] %Tabwidget->$show() [/example] @signals: diff --git a/src/modules/objects/KvsObject_tableWidget.cpp b/src/modules/objects/KvsObject_tableWidget.cpp index 3289d3e99..7cf4b869e 100644 --- a/src/modules/objects/KvsObject_tableWidget.cpp +++ b/src/modules/objects/KvsObject_tableWidget.cpp @@ -127,7 +127,7 @@ const char * const itemflags_tbl[] = { !fn: $setForegroundColor(<row:uinteger>,<col:uinteger>,<rgb(hex string)_array(red:integer,green:integer,blue_integer)_or_red_or_colorname>,[geen:integer],[blue:integer]) Sets the foreground of the cell at <row,<col> according to <colorname> <rgb_value>:valid values are: - hex string: must be a string with 6 hexadecimal digits (like the ones used to - specify colors in html pages). The first two digits specify + specify colors in HTML pages). The first two digits specify the RED component, the third and fourth digit specify the GREEN component and the last two specify the BLUE component. For example "FFFF00" means full red, full green and no blue that gives @@ -136,14 +136,14 @@ const char * const itemflags_tbl[] = { These determine whether the cell can be selected or modified. Supported flags are: [pre] - [br]- noitemflag : no flag sets; - [br]- selectable : cell is selecatble; - [br]- editable : cell is editable; - [br]- dragEnabled : cell can dragged; - [br]- dropEnabled : cell can used as drop target; - [br]- userCheckable : cell is checkable; - [br]- enabled :cell is enabled; - [br]- tristate : cell is checkable with three separate states. + - noitemflag : no flag sets; + - selectable : cell is selectable;[br] + - editable : cell is editable;[br] + - dragEnabled : cell can dragged;[br] + - dropEnabled : cell can used as drop target;[br] + - userCheckable : cell is checkable;[br] + - enabled :cell is enabled;[br] + - tristate : cell is checkable with three separate states. [/pre] !fn: $setCellWidget(<row:uint>,<column:uint>,<widget:hobject>) Sets the given widget to be displayed in the cell in the given row and column, passing the ownership of the widget to the table. @@ -168,7 +168,7 @@ const char * const itemflags_tbl[] = { This event is triggered whenever a cell in the table is double clicked. !fn: $paintCellEvent(<painter:hobject>,<row,uint>,<col:uint>,<cell_width:uint>,<cell_height:uint>) This event handler can be reimplemented to repaint cells. - The framework will pass the row/col coordinates, cell's width and height, and, as parameter, a [class]painter[/class]object. + The framework will pass the row/col coordinates, cell's width and height as parameter, a [class]painter[/class]object. You don't need to begin/end/delete the painter. !fn: $sizeHintCellRequestEvent() This event handler can be reimplemented to pass a custom size hint for this cell to the table layout @@ -179,10 +179,8 @@ const char * const itemflags_tbl[] = { @signals: !sg: $clicked() This signal is emitted by the default implementation of [classfnc]$clickEvent[/classfnc](). - */ - KVSO_BEGIN_REGISTERCLASS(KvsObject_tableWidget,"tablewidget","widget") // Horizontal Header diff --git a/src/modules/objects/KvsObject_toolBar.cpp b/src/modules/objects/KvsObject_toolBar.cpp index 263f1a5c6..861b51c79 100644 --- a/src/modules/objects/KvsObject_toolBar.cpp +++ b/src/modules/objects/KvsObject_toolBar.cpp @@ -52,15 +52,13 @@ !fn: $addSeparator() Adds a separator to the right/bottom of the toolbar. !fn: $setLabel(<text:string>) - Sets the toolbar's label. + Sets the toolbars label. !fn: <string> $label() - Returns the toolbar's label. + Returns the toolbars label. !fn: $clear() - Deletes all the toolbar's child widgets. - + Deletes all the toolbars child widgets. */ - KVSO_BEGIN_REGISTERCLASS(KvsObject_toolBar,"toolbar","widget") KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_toolBar,addSeparator) KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_toolBar,setLabel) diff --git a/src/modules/objects/KvsObject_trayIcon.cpp b/src/modules/objects/KvsObject_trayIcon.cpp index b1aeb90b6..e5dc4a2e1 100644 --- a/src/modules/objects/KvsObject_trayIcon.cpp +++ b/src/modules/objects/KvsObject_trayIcon.cpp @@ -62,12 +62,14 @@ Returns '1' if the tray icon is currently visible. !fn: showMessage(<title:string>,<message:string>,<message_icon:string>,<timeout:integer>) Shows a balloon message for the entry with the given title, message and message_icon for the time specified in millisecondsTimeoutHint. title and message must be plain text strings. - Message can be clicked by the user; the messageClickedEvent() will be triggered when this occurs. + Message can be clicked by the user; the messageClickedEvent() will be triggered when this occurs.[br] Valid values for message_icon are: - [br]- NoIcon : No icon is shown. - [br]- Information : An information icon is shown. - [br]- Warning : A standard warning icon is shown. - [br]- Critical : A critical warning icon is shown. + [pre] + - NoIcon : No icon is shown.[br] + - Information : An information icon is shown.[br] + - Warning : A standard warning icon is shown.[br] + - Critical : A critical warning icon is shown.[br] + [/pre] !fn: setContextMenu(<popupmenu:hobject>). Associates the given <popupmenu> with the tray icon. !fn: activatedEvent(<reason:string>) @@ -75,11 +77,11 @@ If you reimplement this function the reason parameter will be passed as $0. Values for reason are:[br] [pre] - [br]- Unknown : Unknown reason. - [br]- Context : The context menu for the tray icon was requested. - [br]- DoubleClick : The tray icon was double clicked. - [br]- Trigger : The tray icon was clicked. - [br]- MiddleClick : The tray icon was clicked with the middle mouse button. + - Unknown : Unknown reason.[br] + - Context : The context menu for the tray icon was requested.[br] + - DoubleClick : The tray icon was double clicked.[br] + - Trigger : The tray icon was clicked.[br] + - MiddleClick : The tray icon was clicked with the middle mouse button.[br] [/pre] The default implementation emits the [classfnc]$activated[/classfnc]() signal. !fn: messageClickedEvent() diff --git a/src/modules/objects/KvsObject_treeWidget.cpp b/src/modules/objects/KvsObject_treeWidget.cpp index 498375288..cd62e31fc 100644 --- a/src/modules/objects/KvsObject_treeWidget.cpp +++ b/src/modules/objects/KvsObject_treeWidget.cpp @@ -57,7 +57,7 @@ Allocating a [class]listviewtitem[/class] item2 as a child of item1 will insert it to the same listview creating a subtree of items spanning from item1. The subtree can be opened or closed by a simple click either on the parent item or on the little plus sign on the side of it (when [classfnc:listview]$setRootIsDecorated[/classfnc] - is set to $true. The listview can be in Single, Multi, Extended or NoSelection selection mode. + is set to $true. The listview can be in Single, Multi, Extended or NoSelection selection mode.[br][br] In single selection mode there can be only one selected item at a time and the selected item is also the current item (this mode is the default). In Multi and Extended selection mode there can be multiple selected items and the current item is one of them. The difference between multi and extended is in the way @@ -67,7 +67,7 @@ !fn: $addColumn(<text_label:string>,[<width:integer>]) Adds a width pixels wide column with the column header label to the list view. !fn: $setSorting(<column:integer>,<sort_order:string>) - Sets the list view to be sorted by column in ascending order if sort_order is "ascending" or descending order if it is "descending". + Sets the list view to be sorted by column in ascending order if sort_order is [i]ascending[/i] or descending order if it is [i]descending[/i]. !fn: $setSortingEnabled(<bEnabled:boolean>) If <bEnabled> is true, user sorting is enabled for the tree. The default value is false. In order to avoid performance issues, it is recommended that sorting is enabled after inserting the items into the tree. @@ -76,13 +76,13 @@ !fn: $showListViewHeader() Show the listview column header. !fn: <boolean> $isListViewHeaderVisible() - Returns '1' if the listview header is currently visible. Otherwise this function returns '0'. + Returns [b]1[/b] if the listview header is currently visible. Otherwise this function returns [b]0[/b]. !fn: $setAllColumnsShowFocus(<bAllColumnsShowFocus:boolean>) When the argument is $true, causes the listview to display the focus and selection by highlighting all the columns of the item. When the argument is $false then only the first column is selected/highlighted. !fn: $setSelectionMode(<mode:string>) - Sets the selection mode for this listview. <mode> can be one of "Single","NoSelection","Multi" or "Extended". + Sets the selection mode for this listview. <mode> can be one of [i]Single[/i], [i]NoSelection[/i], [i]Multi[/i] or [i]Extended[/i]. !fn: <listviewitem> $selectedItems() Returns the currently selected [class]listviewitem[/class] or $null if no items are selected. This function works only if the list view is in single selection mode. @@ -112,7 +112,7 @@ In its argument is the newly selected item or 0 if the change made no item current.[br] The default implementation emits the [classfnc]$currentChanged[/classfnc]() signal. !fn: $itemActivatedEvent(<item:object>) - This s signal is emitted when the user activates an item by single- or double-clicking or pressing 'Enter'.[br] + This signal is emitted when the user activates an item by single- or double-clicking or pressing Enter.[br] In its argument the current item.[br] The default implementation emits the [classfnc]$itemActivated[/classfnc]() signal. !fn: $spacePressedEvent(<item:object>) @@ -154,10 +154,6 @@ This signal is emitted by the default implementation of [classfnc]$rightButtonClickedEvent[/classfnc](). */ - - -//--------------------------------------------------------------------------------- - KVSO_BEGIN_REGISTERCLASS(KvsObject_treeWidget,"listview","widget") KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_treeWidget,setHeaderLabels) diff --git a/src/modules/objects/KvsObject_treeWidgeteItem.cpp b/src/modules/objects/KvsObject_treeWidgeteItem.cpp index 6cf0ad0d1..fb584a9e4 100644 --- a/src/modules/objects/KvsObject_treeWidgeteItem.cpp +++ b/src/modules/objects/KvsObject_treeWidgeteItem.cpp @@ -56,8 +56,6 @@ const char * const itemflags_tbl[] = { #define itemflags_num (sizeof(itemflags_tbl) / sizeof(itemflags_tbl[0])) - - /* @doc: listviewitem @keyterms: @@ -116,20 +114,17 @@ const char * const itemflags_tbl[] = { This is often used to disable an item. Supported flags are: [pre] - [br]- noitemflag : no flag sets; - [br]- selectable : item is selectable; - [br]- editable : item is editable; - [br]- dragEnabled : item can dragged; - [br]- dropEnabled : item can used as drop target; - [br]- userCheckable : item is checkable; - [br]- enabled :item is enabled; - [br]- tristate : item is checkable with three separate states. + - noitemflag : no flag sets;[br] + - selectable : item is selectable;[br] + - editable : item is editable;[br] + - dragEnabled : item can dragged;[br] + - dropEnabled : item can used as drop target;[br] + - userCheckable : item is checkable;[br] + - enabled :item is enabled;[br] + - tristate : item is checkable with three separate states. [/pre] */ - -//=========================================================================================== - KVSO_BEGIN_REGISTERCLASS(KvsObject_treeWidgetItem,"listviewitem","object") KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_treeWidgetItem,setText) KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_treeWidgetItem,text) diff --git a/src/modules/objects/KvsObject_vBox.cpp b/src/modules/objects/KvsObject_vBox.cpp index 0411cfe86..1f8067d44 100644 --- a/src/modules/objects/KvsObject_vBox.cpp +++ b/src/modules/objects/KvsObject_vBox.cpp @@ -59,6 +59,7 @@ const int align_cod[] = { }; #define align_num (sizeof(align_tbl) / sizeof(align_tbl[0])) + /* @doc: vbox @keyterms: @@ -83,11 +84,20 @@ const int align_cod[] = { !fn: $addStretch(<stretch:integer>) Adds a stretchable space with zero minimum size and stretch factor stretch to the end of this box layout. !fn: $setAlignment(<flag1:string>, <flag2:string>, ...) - Sets the alignment for widget w to flags, given as parameters. - Valid flags are: Right, Left, Top, Bottom, HCenter, VCenter, Center, Justify + Sets the alignment for widget w to flags, given as parameters.[br] + Valid flags are:[br] + [pre] + Right[br] + Left[br] + Top[br] + Bottom[br] + HCenter[br] + VCenter[br] + Center[br] + Justify + [/pre] */ - KVSO_BEGIN_REGISTERCLASS(KvsObject_vBox,"vbox","widget") KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_vBox,setMargin) KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_vBox,setSpacing) diff --git a/src/modules/objects/KvsObject_webView.cpp b/src/modules/objects/KvsObject_webView.cpp index f7d2b0168..da6f4b8fc 100644 --- a/src/modules/objects/KvsObject_webView.cpp +++ b/src/modules/objects/KvsObject_webView.cpp @@ -197,10 +197,10 @@ const char * const actions_tbl[] = { Finds the specified string, in the page, using the given options. Valid flags are: [pre] - FindBackward - Searches backwards instead of forwards; - FindCaseSensitively - Changes the behaviour to a case sensitive find operation. - FindWrapsAroundDocument - Restart from the beginning of the document if the end was reached and the text was not found. - HighlightAllOccurrences - Highlights all existing occurrences. + FindBackward - Searches backwards instead of forwards; + FindCaseSensitively - Changes the behaviour to a case sensitive find operation. + FindWrapsAroundDocument - Restart from the beginning of the document if the end was reached and the text was not found. + HighlightAllOccurrences - Highlights all existing occurrences. [/pre] !fn: <array> $frames() Returns an array containing the names of the document frames. @@ -233,9 +233,9 @@ const char * const actions_tbl[] = { Returns the value of the style with the given name using the specified strategy. If a style with name does not exist, an empty string is returned. Possible value for <style_resolve_strategy> are: [pre] - CascadedStyle - the property's value is determined using the rules defined in the document's stylesheet. This is the default strategy. - InlineStyle - the property's value is determined by element definition, without respecting CSS rules. - ComputedStyle - the property's value is determined by the style property resolved from the environment. + CascadedStyle - the property's value is determined using the rules defined in the document's stylesheet. [b]This is the default strategy[/b]. + InlineStyle - the property's value is determined by element definition, without respecting CSS rules. + ComputedStyle - the property's value is determined by the style property resolved from the environment. [/pre] !fn: pixmap $makePreview() Returns a 212x142 thumbnail of the current webView constants. @@ -305,7 +305,6 @@ const char * const actions_tbl[] = { This signal is emitted by the default implementation of [classfnc:webview]downloadCompletedEvent[/classfnc](). */ - KVSO_BEGIN_REGISTERCLASS(KvsObject_webView,"webview","widget") // page related diff --git a/src/modules/objects/KvsObject_widget.cpp b/src/modules/objects/KvsObject_widget.cpp index bee2b9fa5..79aeb42c1 100644 --- a/src/modules/objects/KvsObject_widget.cpp +++ b/src/modules/objects/KvsObject_widget.cpp @@ -176,6 +176,7 @@ const char * const widgettypes_tbl[] = { #define QT_WIDGET_CLICKFOCUS Qt::ClickFocus #define QT_WIDGET_STRONGFOCUS Qt::StrongFocus #define QT_WIDGET_NOFOCUS Qt::NoFocus + /* @doc: widget @keyterms: @@ -202,7 +203,8 @@ const char * const widgettypes_tbl[] = { Repaints the widget directly by calling [classfnc]$paintEvent[/classfnc]() immediately. !fn: $update([<x:ingeter>,<y:integer>,<width:integer>,<height:integer>]) Updates entirely the widget or a rectangle. - This function does not cause an immediate [classfnc]$paintEvent[/classfnc](); instead it schedules a paint event for processing when KVIrc returns to the main event loop. + This function does not cause an immediate [classfnc]$paintEvent[/classfnc](); + instead it schedules a paint event for processing when KVIrc returns to the main event loop. !fn: $x() Returns the x coordinate of the upper-left corner of this widget relative to the parent widget, @@ -247,7 +249,7 @@ const char * const widgettypes_tbl[] = { Changes the widget's width to <width> and height to <height>. See also [classfnc]$setGeometry[/classfnc](). !fn: $isEnabled() - Returns '1' if the widget is enabled, '0' otherwise. + Returns [b]1[/b] if the widget is enabled, and [b]0[/b] otherwise. See also [classfnc:widget]$setEnabled[/classfnc](). !fn: $setEnabled(<bool>) Sets the widget state to enabled or disabled if <bool> is 1 or 0 respectively. @@ -260,13 +262,12 @@ const char * const widgettypes_tbl[] = { !fn: $windowTitle() Returns the title text of this widget. !fn: $isTopLevel() - Returns '1' if this widget is a toplevel (parentless) one, - '0' otherwise. + Returns [b]1[/b] if this widget is a toplevel (parentless) one, and [b]0[/b] otherwise. !fn: $isVisible() - Returns '1' if this widget is currently visible (read: is managed + Returns [b]1[/b] if this widget is currently visible (read: is managed by the window manager and displayed by the X server; the widget may be hidden behind other widgets). If the widget is not visible - this function returns '0'. + this function returns [b]0[/b]. See also [classfnc]$show[/classfnc]() and [classfnc]$hide[/classfnc](). !fn: $raise() Moves this widget to the top of the stack of the widgets relative @@ -275,13 +276,13 @@ const char * const widgettypes_tbl[] = { Moves this widget to the bottom of the stack of the widgets relative to its parent. See also [classfnc]$raise[/classfnc] !fn: $hasFocus() - Returns '1' if this widget has the keyboard focus. + Returns [b]1[/b] if this widget has the keyboard focus. See also [classfnc]$setFocus[/classfnc]. !fn: $setFocus() Sets this widget to be the one that receives keyboard events. See also [classfnc]$hasFocus[/classfnc] !fn: $parentWidget() - Returns the object ID of the parent widget, or '0' if this + Returns the object ID of the parent widget, or [b]0[/b] if this widget is a toplevel one. !fn: $backgroundColor() Returns the background color of this widget in hexadecimal @@ -317,33 +318,33 @@ const char * const widgettypes_tbl[] = { HTML-like format. See also [classfnc]$setForegroundColor[/classfnc]. !fn: $setMouseTracking(<bool>) - Enables or disables the mouse tracking if <bool> is '1' or '0' respectively. + Enables or disables the mouse tracking if <bool> is [b]1[/b] or [b]0[/b] respectively. When mouse tracking is enabled you will receive mouse move events even if no button is pressed, otherwise you will receive it only when a mouse button is being pressed (so after a mousePressEvent). !fn: $mousePressEvent(<button>,<x>,<y>) This function is called when a mouse button is pressed while - the cursor is in this widget. <button> is 0 if the pressed button - is the left one, 1 if the button is the right one and 2 if it is the middle one. + the cursor is in this widget. <button> is [b]0[/b] if the pressed button + is the left one, [b]1[/b] if the button is the right one and [b]2[/b] if it is the middle one. The <x> and <y> coordinates are relative to this widget upper-left corner and are expressed in pixels. - If you call "[cmd]setreturn[/cmd] 1" you will stop the internal processing + If you call i][cmd]setreturn[/cmd] [b]1[/b][/i] you will stop the internal processing of this event. The default implementation does nothing. !fn: $mouseReleaseEvent(<button>,<x>,<y>) This function is called when a mouse button is released while - the cursor is in this widget. <button> is 0 if the released button - is the left one, 1 if the button is the right one and 2 if it is the middle one. + the cursor is in this widget. <button> is [b]0[/b]if the released button + is the left one, [b]1[/b] if the button is the right one and [b]2[/b] if it is the middle one. The <x> and <y> coordinates are relative to this widget upper-left corner and are expressed in pixels. - If you call "[cmd]setreturn[/cmd] 1" you will stop the internal processing + If you call [i][cmd]setreturn[/cmd] [b]1[/b][/i] you will stop the internal processing of this event. The default implementation does nothing. !fn: $mouseDoubleClickEvent(<button>,<x>,<y>) This function is called when a mouse button is double clicked while - the cursor is in this widget. <button> is 0 if the double clicked button - is the left one, 1 if the button is the right one and 2 if it is the middle one. + the cursor is in this widget. <button> is [b]0[/b]if the double clicked button + is the left one, [b]1[/b] if the button is the right one and [b]2[/b] if it is the middle one. The <x> and <y> coordinates are relative to this widget upper-left corner and are expressed in pixels. - If you call "[cmd]setreturn[/cmd] 1" you will stop the internal processing + If you call [i][cmd]setreturn[/cmd] [b]1[/b][/i] you will stop the internal processing of this event. The default implementation does nothing. !fn: $mouseMoveEvent(<x>,<y>) This function is called when the mouse cursor moves inside this widget. @@ -415,15 +416,15 @@ const char * const widgettypes_tbl[] = { This function sets widget flags, given as parameters. Valid flags are: [pre] - TopLevel - indicates that this widget is a top-level widget[br] - Dialog - indicates that this widget is a top-level window that should be decorated as a dialog[br] - Desktop - indicates that this widget is the desktop[br] - Popup - indicates that this widget is a popup top-level window[br] - Title - gives the window a title bar[br] - StaysOnTop - window stays on top [br] - SysMenu - add a windows system menu[br] - Minimize - add a minimize button for the sysmenu style[br] - Maximize - add a maximixe button for the sysmenu style[br] + TopLevel - indicates that this widget is a top-level widget[br] + Dialog - indicates that this widget is a top-level window that should be decorated as a dialog[br] + Desktop - indicates that this widget is the desktop[br] + Popup - indicates that this widget is a popup top-level window[br] + Title - gives the window a title bar[br] + StaysOnTop - window stays on top [br] + SysMenu - add a windows system menu[br] + Minimize - add a minimize button for the sysmenu style[br] + Maximize - add a maximize button for the sysmenu style[br] [/pre] !fn: $centerToScreen() Centers the window on the screen (useful only for toplevel widgets).[br] @@ -432,48 +433,48 @@ const char * const widgettypes_tbl[] = { Sets the way the widget accepts keyboard focus.[br] Valid parameters are: [pre] - - TabFocus; (widget accepts keyboard focus by tabbing)[br] - - ClickFocus; (widget accepts keyboard focus by clicking)[br] - - StrongFocus; (widget accepts both tabbing/clicking)[br] - - No Focus; (widget does not accept focus at all; this is the default value)[br] + - TabFocus; (widget accepts keyboard focus by tabbing)[br] + - ClickFocus; (widget accepts keyboard focus by clicking)[br] + - StrongFocus; (widget accepts both tabbing/clicking)[br] + - No Focus; (widget does not accept focus at all; this is the default value)[br] [/pre] !fn: $keyPressEvent(<key>) If widget accepts keyboard focus (see [classfnc]$setFocusPolicy[/classfnc] ) this function handles for keys; In its argument the key pressed.[br] Special keys are: [pre] - - Return [br] - - Enter [br] - - Down (cursor arrow down) [br] - - Up (cursor arrow up) [br] - - Left (cursor arrow left) [br] - - Right (cursor arrow right) [br] - - Shift [br] - - Ctrl [br] - - Alt [br] - - CapsLock [br] - - Backspace [br] - - Del [br] - - Esc [br] - - 0 [br] - - 1 [br] - - 2 [br] - - 3 [br] - - 4 [br] - - 5 [br] - - 6 [br] - - 7 [br] - - 8 [br] - - 9 [br] - - + [br] - - - [br] - - * [br] - - / [br] - - ( [br] - - ) [br] - - = [br] - - . [br] - - ^ [br] + - Return [br] + - Enter [br] + - Down (cursor arrow down) [br] + - Up (cursor arrow up) [br] + - Left (cursor arrow left) [br] + - Right (cursor arrow right) [br] + - Shift [br] + - Ctrl [br] + - Alt [br] + - CapsLock [br] + - Backspace [br] + - Del [br] + - Esc [br] + - 0 [br] + - 1 [br] + - 2 [br] + - 3 [br] + - 4 [br] + - 5 [br] + - 6 [br] + - 7 [br] + - 8 [br] + - 9 [br] + - + [br] + - - [br] + - * [br] + - / [br] + - ( [br] + - ) [br] + - = [br] + - . [br] + - ^ [br] [/pre] !fn: $mapFromGlobal(<x>,<y>) Translates the global screen coordinate pos to widget coordinates. @@ -485,40 +486,42 @@ const char * const widgettypes_tbl[] = { Return the y coordinate of the mo>use pointer global position. !fn: <tip:string> $maybeTipEvent(<x_tip_pos:integer>,<y_tip_pos:integer>) This event handler is called when an eventual tip is going to be show. - You can be reimplement this event and set a dynamic tool tip by using "[cmd]return[/cmd] <tooltip_string>". - If a tooltip has setted with [classfnc]$setTooltip[/classfnc] the dynamic tooltip will be ignored. + You can be reimplement this event and set a dynamic tool tip by using [i][cmd]return[/cmd] <tooltip_string>[/i]. + If a tooltip was set with [classfnc]$setTooltip[/classfnc] the dynamic tooltip will be ignored. The default implementation does nothing. !fn: integer $setAttribute(<string>,<bool_flag>) - Sets the attribute attribute on this widget if on is true; otherwise clears the attribute. - Valid attributes are: - OpaquePaintEvent - Indicates that the widget paints all its pixels when it receives a paint event. - NoSystemBackground - Indicates that the widget has no background, i.e. when the widget receives paint events, the background is not automatically repainted. - PaintOnScreen - Indicates that the widget wants to draw directly onto the screen. - NoMousePropagation - Prohibits mouse events from being propagated to the widget's parent. + Sets the attribute attribute on this widget if on is true; otherwise clears the attribute.[br] + Valid attributes are:[br] + [pre] + OpaquePaintEvent - Indicates that the widget paints all its pixels when it receives a paint event. + NoSystemBackground - Indicates that the widget has no background, i.e. when the widget receives paint events, the background is not automatically repainted. + PaintOnScreen - Indicates that the widget wants to draw directly onto the screen. + NoMousePropagation - Prohibits mouse events from being propagated to the widget's parent. + [/pre] !fn: $setStyleSheet(<string>) Set a style sheet for this widget. !fn: $customContextMenuRequestedEvent(<x_mouse_pos:integer>,<y_mouse_pos:integer>) This event is triggered when the user has requested a context menu on the widget (i.e. right clicking on the widget). The x,y coordinates are widget relative. !fn: $array(<red:integer,green:integer,blue:integer) $colorPalette(<color_role:string><color_group:string>) - Returns the color in color_group(disabled, active or inactive), used for color_role. + Returns the color in color_group(disabled, active or inactive), used for color_role.[br] Valid color role are: - Window - A general background color. - WindowText - A general foreground color. - Base - Used as the background color for text. - Text - Used as foreground color for the text. - Button - The general button background color. - ButtonText - A foreground color used with the Button color. - Highlight - A color to indicate a selected item or the current item. - HighlightedText - A text color that contrasts with Highlight. - + [pre] + Window - A general background color. + WindowText - A general foreground color. + Base - Used as the background color for text. + Text - Used as foreground color for the text. + Button - The general button background color. + ButtonText - A foreground color used with the Button color. + Highlight - A color to indicate a selected item or the current item. + HighlightedText - A text color that contrasts with Highlight. + [/pre] !fn: <short_cut_id:integer> $setKeyShortCut(<key:char>) Adds a shortcut with key. A [classfnc]$shortCutEvent[/classfnc] will be triggered when the user will press alt+key. !fn: $shortCutEvent(<shortcut_id:integer>) This function will be called when a shortcut key has been triggered. You must reimplement this event to manage a shortcut system in a custom widget. The default implementation does nothing. - !fn: $insertIntoStatusBar(<index:unsigned integer>) Insert the widget into the statusbar at the given index. If index is out of range, the widget is appended. @@ -528,7 +531,7 @@ const char * const widgettypes_tbl[] = { @examples: [example] %widget = $new(widget) - # This is the main container for other elements. + [comment]# This is the main container for other elements.[/comment] %widget->$setWindowTitle("This is the widget title") @@ -572,9 +575,6 @@ const char * const widgettypes_tbl[] = { [/example] */ - - - // // If you never call c->error(), c->warning() (your function never fails) // and never call a function that can call c->error() or c->warning() @@ -605,10 +605,6 @@ const char * const widgettypes_tbl[] = { // return no errors and results that have to be assumed // as invalid (this allows the minimum overhead: if widget() -//============================================================================================================= - - - KVSO_BEGIN_REGISTERCLASS(KvsObject_widget,"widget","object") KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_widget,setParent) // apparence diff --git a/src/modules/objects/KvsObject_window.cpp b/src/modules/objects/KvsObject_window.cpp index eb7fab173..2f45829b7 100644 --- a/src/modules/objects/KvsObject_window.cpp +++ b/src/modules/objects/KvsObject_window.cpp @@ -90,16 +90,15 @@ QPixmap * KviKvsScriptWindowWindow::myIconPtr() @description: This class represents a window in a KVIrc frame. Regardless of the parent object passed, the window will be always - a "physical" child of the frame window: you can't embed a window object - inside a widget or another window. The parent object will just "own" this + a [i]physical[/i] child of the frame window: you can't embed a window object + inside a widget or another window. The parent object will just [i]own[/i] this window object and eventually destroy it when it dies. This class can manage only a single central child widget that must be set with $setCentralWidget(). - The central widget MUST be set before you initially call show() + The central widget [b]must[/b] be set before you initially call show() @functions: */ - KVSO_BEGIN_REGISTERCLASS(KvsObject_window,"window","widget") KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_window,setWindowTitle) KVSO_REGISTER_HANDLER_BY_NAME(KvsObject_window,setIcon) diff --git a/src/modules/objects/KvsObject_workspace.cpp b/src/modules/objects/KvsObject_workspace.cpp index 52ece77fb..3ec7346fa 100644 --- a/src/modules/objects/KvsObject_workspace.cpp +++ b/src/modules/objects/KvsObject_workspace.cpp @@ -72,101 +72,99 @@ !fn: $activateNextWindow() Activates the next window in the child window chain. !fn: $activatePrevWindow() - Activates the previous window in the child window chain.[br] + Activates the previous window in the child window chain. @examples: [example] - [comment] - //Let's start. - //We start the main class creation, in the constructor we do the - //widget's showing, to give a particular pop-up - //creation appearance. - [/comment] - class (ws,widget)[br] - {[br] - constructor[br] - {[br] - $$->$setGeometry(%X,%Y,100,100)[br](KviKvsObjectFunctionCall *c - $$->%label=$new(label,$$)[br] - $$->%label->$settext("Another class by N\&G")[br] - $$->%label->$setautoresize(1)[br] - $$->$show()[br] - }[br] - }[br] - [comment]//We create the new workspace, and we set a 640x480 size with widget $resize command[/comment][br] - %Workspace=$new(workspace)[br] - %Workspace->$resize(640,480)[br] - [comment] - //Now we make a cycling construction of the widgets(look at the class), - //and give to the widgets a random X and Y coordinates. - //It takes few seconds to show the effects, be patient. - [/comment] - %I=0[br] - while (%I<100)[br] - {[br] - %X=$rand(500)[br] - %Y=$rand(480)[br] - %Widget=$new(ws,%Workspace)[br] - %I++[br] - }[br] - [comment]//Let's show the fireworks! EnJoY![/comment] - %Workspace->$show()[br] + [comment]# Let's start. + # We start the main class creation, in the constructor we do the + # widget's showing, to give a particular popup + # creation appearance. + [/comment] + class (ws,widget) + { + constructor + { + $$->$setGeometry(%X,%Y,100,100)[br](KviKvsObjectFunctionCall *c + $$->%label=$new(label,$$) + $$->%label->$settext("Another class by N\&G") + $$->%label->$setautoresize(1) + $$->$show() + } + } + [comment]# We create the new workspace, and we set a 640x480 size with widget $resize command[/comment] + %Workspace=$new(workspace) + %Workspace->$resize(640,480) + [comment]# Now we make a cycling construction of the widgets (look at the class), + # and give to the widgets a random X and Y coordinates. + # It takes few seconds to show the effects, be patient. + [/comment] + %I=0 + while (%I<100) + + %X=$rand(500) + %Y=$rand(480) + %Widget=$new(ws,%Workspace) + %I++ + } + [comment]# Let's show the fireworks! EnJoY![/comment] + %Workspace->$show() [/example] + [b]Example 2:[/b] [example] - [b]Example 2:[/b] - [comment]//This is like the first example but it has a particular animation effect.[/comment] - %Hex[]=$array(0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F)[br] - class (ws,widget)[br] - {[br] - constructor[br] - {[br] - $$->$setGeometry(%X,%Y,100,100)[br] - $$->%lay=$new(layout,$$)[br] - %i=0[br] - while (%i<10)[br] - {[br] - $$->%label=$new(label,$$)[br] - $$->%label->$settext("Another class by N\&G")[br] - %color=%Hex[$rand(15)]%Hex[$rand(15)]%Hex[$rand(15)]%Hex[$rand(15)]%Hex[$rand(15)]%Hex[$rand(15)][br] - $$->%label->$setforegroundcolor(%color)[br] - $$->%label->$setautoresize(1)[br] - $$->%lay->$addwidget($$->%label,%i,0)[br] - %i++;[br] - }[br] - $$->$show()[br] - }[br] - mousepressevent[br] - {[br] - if ($istimer(cycle) == 1) killtimer cycle[br] - }[br] - }[br] - %Workspace=$new(workspace)[br] - %Workspace->$resize(640,480)[br] - %Workspace->$setWindowTitle("Hit the mouse to stop cycling windows...")[br] - %I=0[br] - %Cycle=1[br] - while (%I<20)[br] - {[br] - %X=$rand(500)[br] - %Y=$rand(480)[br] - %Widget=$new(ws,%Workspace)[br] - %I++[br] - }[br] - %Workspace->$show[br] - timer (cycle,3000)[br] - {[br] - if (%Cycle==1) %Workspace->$tile()[br] - if (%Cycle==2)[br] - {[br] - %Workspace->$cascade()[br] - %Cycle=1[br] - return[br] - }[br] - %Cycle++[br] - }[br] - privateimpl(%Workspace,mousepressevent)[br] - {[br] - if ($istimer(cycle) == 1) killtimer cycle[br] - }[br] + [comment]# This is like the first example but it has a particular animation effect.[/comment] + %Hex[]=$array(0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F) + class (ws,widget) + { + constructor + { + $$->$setGeometry(%X,%Y,100,100) + $$->%lay=$new(layout,$$) + %i=0 + while (%i<10) + { + $$->%label=$new(label,$$) + $$->%label->$settext("Another class by N\&G") + %color=%Hex[$rand(15)]%Hex[$rand(15)]%Hex[$rand(15)]%Hex[$rand(15)]%Hex[$rand(15)]%Hex[$rand(15)] + $$->%label->$setforegroundcolor(%color) + $$->%label->$setautoresize(1) + $$->%lay->$addwidget($$->%label,%i,0) + %i++; + } + $$->$show() + } + mousepressevent + { + if ($istimer(cycle) == 1) killtimer cycle + } + } + %Workspace=$new(workspace) + %Workspace->$resize(640,480) + %Workspace->$setWindowTitle("Hit the mouse to stop cycling windows...") + %I=0 + %Cycle=1 + while (%I<20) + { + %X=$rand(500) + %Y=$rand(480) + %Widget=$new(ws,%Workspace) + %I++ + } + %Workspace->$show + timer (cycle,3000) + { + if (%Cycle==1) %Workspace->$tile() + if (%Cycle==2) + { + %Workspace->$cascade() + %Cycle=1 + return + } + %Cycle++ + } + privateimpl(%Workspace,mousepressevent) + { + if ($istimer(cycle) == 1) killtimer cycle + } [/example] */ diff --git a/src/modules/objects/KvsObject_wrapper.cpp b/src/modules/objects/KvsObject_wrapper.cpp index 0faaed22b..2e73a61a1 100644 --- a/src/modules/objects/KvsObject_wrapper.cpp +++ b/src/modules/objects/KvsObject_wrapper.cpp @@ -35,7 +35,6 @@ #include "KviApplication.h" #include "KviMainWindow.h" - /* @doc: wrapper @keyterms: @@ -50,144 +49,112 @@ [class]object[/class] [class]widget[/class] @description: - [p] This class "wraps" existing KVIrc widgets and allows using the [class]widget[/class] class API to manipulate them. You can use it, for example, to set the geometry of the - KVIrc main window or to apply some crazy graphical changes to the UI. - [/p] - [p] + KVIrc main window or to apply some crazy graphical changes to the UI.[br] The KVIrc Qt widgets are arranged in trees (just as the objects). The difference is that there can be more than one - toplevel widget and so more than one tree. You can use [fnc]$objects.dump()[/fnc] to take a look at the KVIrc Qt objects tree. - [/p] - [p] + toplevel widget and so more than one tree. You can use [fnc]$objects.dump()[/fnc] to take a look at the KVIrc Qt objects tree.[br] Here is a part of the tree: - [/p] [example] - Ptr 23786128: top level object: kvirc_frame, class KviMainWindow, visible, rect = 1678, -3, 1680, 1030 - >Ptr 23496976: object: qt_rubberband, class QRubberBand - >Ptr 23536608: object: main_frame_splitter, class QSplitter - >>Ptr 23795232: object: mdi_manager, class KviWindowStack - >>>Ptr 23863200: object: qt_scrollarea_hcontainer, class QWidget - >>>>Ptr 23418224: object: , class QScrollBar - >>>Ptr 23864832: object: qt_scrollarea_vcontainer, class QWidget - >>>>Ptr 22383424: object: , class QScrollBar - >>Ptr 25750832: object: mdi_manager, class KviWindowStack - >>>Ptr 26112928: object: , class QWidget - >>>>Ptr 45381568: object: , class Oxygen::MdiWindowShadow - >>>>Ptr 45952496: object: mdi_child_Azzurra_#kvirc, class KviMdiChild - >>>>>Ptr 43714656: object: #kvirc, class KviChannelWindow - >Ptr 18004432: object: , class KviStatusBar - >>Ptr 18007408: object: msgstatuslabel, class QLabel - >>>Ptr 24067088: object: , class Oxygen::TransitionWidget - >Ptr 24503248: object: windowlist, class KviTreeWindowList - >>Ptr 24459744: object: qt_dockwidget_floatbutton, class QDockWidgetTitleButton - >>Ptr 24498560: object: qt_dockwidget_closebutton, class QDockWidgetTitleButton - >>Ptr 23996288: object: tree_windowlist, class KviTreeWindowListTreeWidget + Ptr 23786128: top level object: kvirc_frame, class KviMainWindow, visible, rect = 1678, -3, 1680, 1030 + >Ptr 23496976: object: qt_rubberband, class QRubberBand + >Ptr 23536608: object: main_frame_splitter, class QSplitter + >>Ptr 23795232: object: mdi_manager, class KviWindowStack + >>>Ptr 23863200: object: qt_scrollarea_hcontainer, class QWidget + >>>>Ptr 23418224: object: , class QScrollBar + >>>Ptr 23864832: object: qt_scrollarea_vcontainer, class QWidget + >>>>Ptr 22383424: object: , class QScrollBar + >>Ptr 25750832: object: mdi_manager, class KviWindowStack + >>>Ptr 26112928: object: , class QWidget + >>>>Ptr 45381568: object: , class Oxygen::MdiWindowShadow + >>>>Ptr 45952496: object: mdi_child_Azzurra_#kvirc, class KviMdiChild + >>>>>Ptr 43714656: object: #kvirc, class KviChannelWindow + >Ptr 18004432: object: , class KviStatusBar + >>Ptr 18007408: object: msgstatuslabel, class QLabel + >>>Ptr 24067088: object: , class Oxygen::TransitionWidget + >Ptr 24503248: object: windowlist, class KviTreeWindowList + >>Ptr 24459744: object: qt_dockwidget_floatbutton, class QDockWidgetTitleButton + >>Ptr 24498560: object: qt_dockwidget_closebutton, class QDockWidgetTitleButton + >>Ptr 23996288: object: tree_windowlist, class KviTreeWindowListTreeWidget [/example] - [p] As you can see the objects are identified by their names (for example "mdi_manager") and - by their class names (for example KviChannelWindow). - To wrap a specific widget you must provide a path in the tree composed of search specifiers. - Each search specifier can have one of the following forms: - [/p] + by their class names (for example KviChannelWindow).[br] + To wrap a specific widget you must provide a path in the tree composed of search specifiers.[br] + Each search specifier can have one of the following forms:[br] [example] - (1) <class> - (2) <class>::<name> - (3) ::<name> - (4) !Window::<window_identifier> - (5) !Parent::N + (1) <class> + (2) <class>::<name> + (3) ::<name> + (4) !Window::<window_identifier> + (5) !Parent::N [/example] - [p] - The first three forms may be preceded by the prefix '*' which will tell KVS to perform - a recursive search from this point. Let's see some examples. - [/p] - [p] - The form (1) matches the first widget with the specified class name. For instance: - [/p] + The first three forms may be preceded by the prefix [b]*[/b] which will tell KVS to perform + a recursive search from this point. Let's see some examples.[br] + The form (1) matches the first widget with the specified class name.[br] + For instance:[br] [example] - %Frame = $new(wrapper,0,test,KviMainWindow) + %Frame = $new(wrapper,0,test,KviMainWindow) [/example] - [p] This will wrap the first top level object with class KviMainWindow. Now you can use - any [class]widget[/class] or [class]object[/class] methods on it. - [/p] + any [class]widget[/class] or [class]object[/class] methods on it.[br] [example] - %Frame = $new(wrapper,0,test,KviMainWindow) - %Frame->$setGeometry(20,20,400,400); + %Frame = $new(wrapper,0,test,KviMainWindow) + %Frame->$setGeometry(20,20,400,400); [/example] - [p] - If you want to wrap the KVIrc status bar you can use a composite path: - [/p] + If you want to wrap the KVIrc status bar you can use a composite path:[br] [example] - %StatusBar = $new(wrapper,0,test,KviMainWindow,KviStatusBar) - %StatusBar->$setProperty(autoFillBackground,1) - %StatusBar->$setBackgroundColor(80,80,0) + %StatusBar = $new(wrapper,0,test,KviMainWindow,KviStatusBar) + %StatusBar->$setProperty(autoFillBackground,1) + %StatusBar->$setBackgroundColor(80,80,0) [/example] - [p] The form (2) matches both the class and the widget name. In this way you can differentiate - between children that have the same class. For instance: - [/p] + between children that have the same class.[br] + For instance:[br] [example] - %VerticalScrollBar = $new(wrapper,0,test,KviMainWindow,QSplitter,KviWindowStack,QWidget::qt_scrollarea_vcontainer,QScrollBar) - %VerticalScrollBar->$setProperty(invertedAppearance,1); + %VerticalScrollBar = $new(wrapper,0,test,KviMainWindow,QSplitter,KviWindowStack,QWidget::qt_scrollarea_vcontainer,QScrollBar) + %VerticalScrollBar->$setProperty(invertedAppearance,1); [/example] - [p] In this way KVS was able to pick the vertical scrollbar instead of the horizontal one (which comes first in the list). - (Now try to move a window out of the MDI area: the vertical scroll bar will be inverted!). - [/p] - [p] - The form (3) matches only the name and ignores the class. In our sample tree the following example is equivalent to the previous one. - [/p] + (Now try to move a window out of the MDI area: the vertical scroll bar will be inverted!).[br] + The form (3) matches only the name and ignores the class.[br] + In our sample tree the following example is equivalent to the previous one. [example] - %VerticalScrollBar = $new(wrapper,0,test,KviMainWindow,QSplitter,KviWindowStack,::qt_scrollarea_vcontainer,QScrollBar) - %VerticalScrollBar->$setProperty(invertedAppearance,1); + %VerticalScrollBar = $new(wrapper,0,test,KviMainWindow,QSplitter,KviWindowStack,::qt_scrollarea_vcontainer,QScrollBar) + %VerticalScrollBar->$setProperty(invertedAppearance,1); [/example] - [p] If you don't want to specify the full path to the widget you can try to use a recursive search which may skip some levels. - Keep in mind that the recursive search is breadth-first and will return the first widget that matches. - In our sample tree the following would match the first widget with class KviChannelWindow. - [/p] + Keep in mind that the recursive search is breadth-first and will return the first widget that matches.[br] + In our sample tree the following would match the first widget with class KviChannelWindow.[br] [example] - %Chan = $new(wrapper,0,test,*KviChannelWindow) - %Chan->$setBackgroundColor(80,0,0); + %Chan = $new(wrapper,0,test,*KviChannelWindow) + %Chan->$setBackgroundColor(80,0,0); [/example] - [p] - The following would match the first widget with name #kvirc - [/p] + The following would match the first widget with name #kvirc[br] [example] - %Chan = $new(wrapper,0,test,*::#kvirc) - %Chan->$setBackgroundColor(80,0,0); + %Chan = $new(wrapper,0,test,*::#kvirc) + %Chan->$setBackgroundColor(80,0,0); [/example] - [p] The recursive search can start at any level, so if starting from the root does not work properly you might try - specifying a part of the path and then searching recursively. - [/p] + specifying a part of the path and then searching recursively.[br] [example] - %Chan = $new(wrapper,0,test,KviMainWindow,*::#kvirc) - %Chan->$setBackgroundColor(80,0,0); + %Chan = $new(wrapper,0,test,KviMainWindow,*::#kvirc) + %Chan->$setBackgroundColor(80,0,0); [/example] - [p] The form (4) allows you to jump directly to a specific KVIrc channel/query/console window, - without the need of looking it up in the tree. - [/p] + without the need of looking it up in the tree.[br] [example] - %Win = $new(wrapper,0,test,!Window::$window) - %Win->$setBackgroundColor(80,0,0); + %Win = $new(wrapper,0,test,!Window::$window) + %Win->$setBackgroundColor(80,0,0); [/example] - [p] - Finally the last form allows you to jump N levels up in the tree. If N is omitted it is assumed to be 1. - [/p] + Finally the last form allows you to jump N levels up in the tree.[br] + If N is omitted it is assumed to be 1. [example] - %Win = $new(wrapper,0,test,!Window::$window,!Parent::3) - %Win->$setGeometry(10,10,40,40) + %Win = $new(wrapper,0,test,!Window::$window,!Parent::3) + %Win->$setGeometry(10,10,40,40) [/example] - [p] Experiment with it :) - [/p] */ - - KVSO_BEGIN_REGISTERCLASS(KvsObject_wrapper,"wrapper","widget") KVSO_END_REGISTERCLASS(KvsObject_wrapper) diff --git a/src/modules/objects/libkviobjects.cpp b/src/modules/objects/libkviobjects.cpp index c862eed37..caf3f8a04 100644 --- a/src/modules/objects/libkviobjects.cpp +++ b/src/modules/objects/libkviobjects.cpp @@ -624,32 +624,32 @@ static bool objects_kvs_cmd_disconnect(KviKvsModuleCommandCall * c) static bool objects_kvs_fnc_listObjects(KviKvsModuleFunctionCall * cmd) { -/* - @doc: objects.dump - @type: - function - @title: - $objects.dump - @keyterms: - dump objects - @short: - Dump the KVIrc widgets. - @syntax: - <array> $objects.dump(<print:boolean>) - @description: - This function return an array containing a representation of the widgets tree in KVIrc;[br] - If the <print> flag is enabled, the array will be printed in the current window, too. - @examples: - [example] - %A[]=$objects.dump(0) - %i=0 - while (%i != %A[]#) - { - echo %A[%i] - %i++ - } - [/example] -*/ + /* + @doc: objects.dump + @type: + function + @title: + $objects.dump + @keyterms: + dump objects + @short: + Dump the KVIrc widgets. + @syntax: + <array> $objects.dump(<print:boolean>) + @description: + This function return an array containing a representation of the widgets tree in KVIrc;[br] + If the <print> flag is enabled, the array will be printed in the current window, too. + @examples: + [example] + %A[]=$objects.dump(0) + %i=0 + while (%i != %A[]#) + { + echo %A[%i] + %i++ + } + [/example] + */ bool bFlag; diff --git a/src/modules/perl/libkviperl.cpp b/src/modules/perl/libkviperl.cpp index 3e8f3c834..9048d72cc 100644 --- a/src/modules/perl/libkviperl.cpp +++ b/src/modules/perl/libkviperl.cpp @@ -253,11 +253,11 @@ Note also that you must either escape the $ at the beginning of KVIrc identifiers or use single quotes to prevent Perl from interpreting the $ as the beginning of a variable. [example] - [comment]// This will not work as expected[/comment] + [comment]# This will not work as expected[/comment] [cmd]perl.begin[/cmd] KVIrc::echo(KVIrc::eval("return $window.caption")); [cmd]perl.end[/cmd] - [comment]// But these will do[/comment] + [comment]# But these will do[/comment] [cmd]perl.begin[/cmd] KVIrc::echo(KVIrc::eval("return \$window.caption")); KVIrc::echo(KVIrc::eval('return $window.caption')); @@ -304,7 +304,7 @@ eval %tmp; } perlexec "/home/pragma/myperlscript.pl" "param1" "param2" "param3" - [comment]// or even[/comment] + [comment]# or even[/comment] [cmd]echo[/cmd] $perlexec("/home/pragma/computeprimelargerthan.pl","10000") [/example] [br] @@ -543,7 +543,6 @@ static bool perl_kvs_cmd_destroy(KviKvsModuleCommandCall * c) return true; } - /* @doc: perl.isAvailable @type: @@ -555,7 +554,7 @@ static bool perl_kvs_cmd_destroy(KviKvsModuleCommandCall * c) @syntax: $perl.isAvailable @description: - Returns 1 if the Perl scripting support is available and 0 otherwise. + Returns [b]1[/b] if the Perl scripting support is available and [b]0[/b] otherwise. */ static bool perl_kvs_fnc_isAvailable(KviKvsModuleFunctionCall * c) diff --git a/src/modules/proxydb/libkviproxydb.cpp b/src/modules/proxydb/libkviproxydb.cpp index e4a9c79ae..b5fa60f55 100644 --- a/src/modules/proxydb/libkviproxydb.cpp +++ b/src/modules/proxydb/libkviproxydb.cpp @@ -41,13 +41,14 @@ extern KVIRC_API KviProxyDataBase * g_pProxyDataBase; $proxydb.protocol @short: Returns the protocol - @synthax: + @syntax: <string> $proxydb.protocol(<string:proxy>) @description: Returns the protocol of the proxy <proxy> @seealso: [module:serverdb]ServerDB module documentation[/module] */ + static bool proxydb_kvs_fnc_protocol(KviKvsModuleFunctionCall * c) { QString szProxy, szProtocol; @@ -128,13 +129,14 @@ static bool proxydb_kvs_fnc_protocol(KviKvsModuleFunctionCall * c) $proxydb.hostname @short: Returns the hostname - @synthax: + @syntax: <string> $proxydb.hostname(<string:proxy>) @description: Returns the hostname of the proxy <proxy> @seealso: [module:serverdb]ServerDB module documentation[/module] */ + PROXYDB_GET_PROPERTY(proxydb_kvs_fnc_hostname,hostName,setString) /* @@ -145,13 +147,14 @@ PROXYDB_GET_PROPERTY(proxydb_kvs_fnc_hostname,hostName,setString) $proxydb.ip @short: Returns the IP - @synthax: + @syntax: <string> $proxydb.ip(<string:proxy>) @description: Returns the IP of the proxy <proxy> @seealso: [module:serverdb]ServerDB module documentation[/module] */ + PROXYDB_GET_PROPERTY(proxydb_kvs_fnc_ip,ip,setString) /* @@ -162,13 +165,14 @@ PROXYDB_GET_PROPERTY(proxydb_kvs_fnc_ip,ip,setString) $proxydb.password @short: Returns the password - @synthax: + @syntax: <string> $proxydb.password(<string:proxy>) @description: Returns the password of the proxy <proxy>, if set @seealso: [module:serverdb]ServerDB module documentation[/module] */ + PROXYDB_GET_PROPERTY(proxydb_kvs_fnc_password,pass,setString) /* @@ -179,7 +183,7 @@ PROXYDB_GET_PROPERTY(proxydb_kvs_fnc_password,pass,setString) $proxydb.username @short: Returns the username - @synthax: + @syntax: <string> $proxydb.username(<string:proxy>) @description: Returns the username of the proxy <proxy>, if set @@ -196,13 +200,14 @@ PROXYDB_GET_PROPERTY(proxydb_kvs_fnc_username,user,setString) $proxydb.isIPv6 @short: Returns the isIPv6 - @synthax: + @syntax: <bool> $proxydb.isIPv6(<string:proxy>) @description: Returns true if the proxy <proxy> uses IPv6 sockets @seealso: [module:serverdb]ServerDB module documentation[/module] */ + PROXYDB_GET_PROPERTY(proxydb_kvs_fnc_isIPv6,isIPv6,setBoolean) /* @@ -213,13 +218,14 @@ PROXYDB_GET_PROPERTY(proxydb_kvs_fnc_isIPv6,isIPv6,setBoolean) $proxydb.port @short: Returns the port - @synthax: + @syntax: <bool> $proxydb.port(<string:proxy>) @description: Returns the port number of the proxy <proxy> @seealso: [module:serverdb]ServerDB module documentation[/module] */ + PROXYDB_GET_PROPERTY(proxydb_kvs_fnc_port,port,setInteger) /* @@ -238,29 +244,25 @@ PROXYDB_GET_PROPERTY(proxydb_kvs_fnc_port,port,setInteger) @switches: !sw: -i | --ipv6 Use IPv6 socket to connect to the proxy.[br] - !sw: -p=<port> | --port=<port> Use the port <port> to connect to the proxy.[br] - !sw: -q | --quiet Do not print errors if the proxy already exist.[br] - !sw: -r=<protocol> | --protocol=<protocol> Use the protocol <protocol> to connect to the proxy.[br] - !sw: -u=<user> | --user=<user> Use the username <user> to connect to the proxy.[br] - !sw: -w=<password> | --password=<password> Use password <password> to connect to the proxy. @examples: [example] - [comment]Adds the proxy test.com on port 8080 using IPv6 sockets[/comment][br] - proxydb.addProxy -i -p=8080 test.com + [comment]Adds the proxy test.com on port 8080 using IPv6 sockets[/comment][br] + proxydb.addProxy -i -p=8080 test.com [/example] @seealso: [module:serverdb]ServerDB module documentation[/module] */ + static bool proxydb_kvs_cmd_addProxy(KviKvsModuleCommandCall * c) { QString szProxy; @@ -335,8 +337,8 @@ static bool proxydb_kvs_cmd_addProxy(KviKvsModuleCommandCall * c) Do not print errors if the proxy already exist.[br] @examples: [example] - [comment]Sets the port 8080 for the proxy test.com[/comment][br] - proxydb.setPort test.com 8080 + [comment]Sets the port 8080 for the proxy test.com[/comment][br] + proxydb.setPort test.com 8080 [/example] @seealso: [module:serverdb]ServerDB module documentation[/module] @@ -400,20 +402,21 @@ static bool proxydb_kvs_cmd_setPort(KviKvsModuleCommandCall * c) Do not print errors if the proxy already exist.[br] @examples: [example] - [comment]Sets the IPv4 (format a.b.c.d) for the proxy test.com[/comment][br] - proxydb.setIp test.com 1.2.3.4[br] - [comment]Sets the extended IPv6 (format a:b:c:d:e:f:g:h) for the proxy text.com[/comment][br] - proxydb.setIp test.com 1:2:3:4:5:6:7:8[br] - [comment]Sets the compressed IPv6 (format a:b:...::h) for the proxy text.com[/comment][br] - proxydb.setIp test.com 1:2:3:4::8[br] - [comment]Sets the IPv4 mapped IPv6 (format a:b:c:d:e:f:w.x.y.z) for the proxy text.com[/comment][br] - proxydb.setIp test.com 1:2:3:4:5:6:9.8.7.6[br] - [comment]Sets the compressed IPv4 mapped IPv6 (a::b:w.x.y.z) for the proxy text.com[/comment][br] - proxydb.setIp test.com 1::6:9.8.7.6 + [comment]Sets the IPv4 (format a.b.c.d) for the proxy test.com[/comment][br] + proxydb.setIp test.com 1.2.3.4[br] + [comment]Sets the extended IPv6 (format a:b:c:d:e:f:g:h) for the proxy text.com[/comment][br] + proxydb.setIp test.com 1:2:3:4:5:6:7:8[br] + [comment]Sets the compressed IPv6 (format a:b:...::h) for the proxy text.com[/comment][br] + proxydb.setIp test.com 1:2:3:4::8[br] + [comment]Sets the IPv4 mapped IPv6 (format a:b:c:d:e:f:w.x.y.z) for the proxy text.com[/comment][br] + proxydb.setIp test.com 1:2:3:4:5:6:9.8.7.6[br] + [comment]Sets the compressed IPv4 mapped IPv6 (a::b:w.x.y.z) for the proxy text.com[/comment][br] + proxydb.setIp test.com 1::6:9.8.7.6 [/example] @seealso: [module:serverdb]ServerDB module documentation[/module] */ + static bool proxydb_kvs_cmd_setIp(KviKvsModuleCommandCall * c) { QString szProxy, szIp; @@ -476,12 +479,13 @@ static bool proxydb_kvs_cmd_setIp(KviKvsModuleCommandCall * c) Do not print errors if the proxy already exist.[br] @examples: [example] - [comment]Sets the IPv6 sockets for the proxy test.com[/comment][br] - proxydb.setIPv6 test.com $true + [comment]Sets the IPv6 sockets for the proxy test.com[/comment][br] + proxydb.setIPv6 test.com $true [/example] @seealso: [module:serverdb]ServerDB module documentation[/module] */ + static bool proxydb_kvs_cmd_setIPv6(KviKvsModuleCommandCall * c) { QString szProxy; @@ -532,12 +536,13 @@ static bool proxydb_kvs_cmd_setIPv6(KviKvsModuleCommandCall * c) Do not print errors if the proxy already exist.[br] @examples: [example] - [comment]Sets the protocol Socks5 for the proxy test.com[/comment][br] - proxydb.setProtocol test.com Socks5 + [comment]Sets the protocol Socks5 for the proxy test.com[/comment][br] + proxydb.setProtocol test.com Socks5 [/example] @seealso: [module:serverdb]ServerDB module documentation[/module] */ + static bool proxydb_kvs_cmd_setProtocol(KviKvsModuleCommandCall * c) { QString szProxy, szProtocol; @@ -637,12 +642,13 @@ static bool proxydb_kvs_cmd_setProtocol(KviKvsModuleCommandCall * c) Do not print errors if the proxy already exist.[br] @examples: [example] - [comment]Sets the hostname test1.com for the proxy test.com[/comment][br] - proxydb.setHostname test.com test1.com + [comment]Sets the hostname test1.com for the proxy test.com[/comment][br] + proxydb.setHostname test.com test1.com [/example] @seealso: [module:serverdb]ServerDB module documentation[/module] */ + PROXYDB_SET_PROPERTY(proxydb_kvs_cmd_setHostname,setHostname) /* @@ -662,12 +668,13 @@ PROXYDB_SET_PROPERTY(proxydb_kvs_cmd_setHostname,setHostname) Do not print errors if the proxy already exist.[br] @examples: [example] - [comment]Sets the password test for the proxy test.com[/comment][br] - proxydb.setPass test.com test + [comment]Sets the password test for the proxy test.com[/comment][br] + proxydb.setPass test.com test [/example] @seealso: [module:serverdb]ServerDB module documentation[/module] */ + PROXYDB_SET_PROPERTY(proxydb_kvs_cmd_setPass,setPass) /* @@ -687,12 +694,13 @@ PROXYDB_SET_PROPERTY(proxydb_kvs_cmd_setPass,setPass) Do not print errors if the proxy already exist.[br] @examples: [example] - [comment]Sets the username kvirc for the proxy test.com[/comment][br] - proxydb.setUser test.com kvirc + [comment]Sets the username KVIrc for the proxy test.com[/comment][br] + proxydb.setUser test.com kvirc [/example] @seealso: [module:serverdb]ServerDB module documentation[/module] */ + PROXYDB_SET_PROPERTY(proxydb_kvs_cmd_setUser,setUser) static bool proxydb_module_init(KviModule * m) diff --git a/src/modules/python/libkvipython.cpp b/src/modules/python/libkvipython.cpp index f322cba00..7d99636d5 100644 --- a/src/modules/python/libkvipython.cpp +++ b/src/modules/python/libkvipython.cpp @@ -517,7 +517,7 @@ static bool python_kvs_cmd_destroy(KviKvsModuleCommandCall * c) @syntax: $python.isAvailable @description: - Returns 1 if the Python scripting support is available and 0 otherwise. + Returns [b]1[/b] if the Python scripting support is available and [b]0[/b] otherwise. */ static bool python_kvs_fnc_isAvailable(KviKvsModuleFunctionCall * c) { diff --git a/src/modules/regchan/libkviregchan.cpp b/src/modules/regchan/libkviregchan.cpp index c8545cbc2..35d0bf529 100644 --- a/src/modules/regchan/libkviregchan.cpp +++ b/src/modules/regchan/libkviregchan.cpp @@ -346,7 +346,7 @@ static bool regchan_kvs_fnc_property(KviKvsModuleFunctionCall * c) <boolean> $regchan.match(<channel_name:string>,<network:string>) @description: Returns 1 if <channel_name> and <network> match a registered channel entry - and 0 otherwise. + and [b]0[/b] otherwise. @examples: [example] echo $regchan.match(#kvirc,IRCNet) @@ -380,8 +380,8 @@ static bool regchan_kvs_fnc_match(KviKvsModuleFunctionCall * c) @syntax: <boolean> $regchan.find(<channel_name:string>,<netmask:string>) @description: - Returns 1 if the channel identified by <channel_name> and <netmask> - is registered and 0 otherwise. This function is similar to $regchan.match + Returns [b]1[/b] if the channel identified by <channel_name> and <netmask> + is registered and [b]0[/b] otherwise. This function is similar to $regchan.match but for $regchan.find the second parameter is the exact netmask of the registered channel entry. @examples: diff --git a/src/modules/serverdb/libkviserverdb.cpp b/src/modules/serverdb/libkviserverdb.cpp index 3977bd03d..823c6df4d 100644 --- a/src/modules/serverdb/libkviserverdb.cpp +++ b/src/modules/serverdb/libkviserverdb.cpp @@ -109,7 +109,7 @@ extern KVIRC_API KviIrcServerDataBase * g_pServerDataBase; <bool> $serverdb.networkExists(<network_name:string>) @description: Checks if the network already exists in the DB.[br] - It returns 1 if the network exists, 0 otherwise. + It returns [b]1[/b] if the network exists, and [b]0[/b] otherwise. @seealso: [module:serverdb]ServerDB module documentation[/module] */ @@ -151,7 +151,7 @@ static bool serverdb_kvs_fnc_networkExists(KviKvsModuleFunctionCall * c) @description: Checks if the server already exists for a network in the DB.[br] If no network name is provided, the check is made globally.[br] - It returns 1 if the server exists, 0 otherwise + It returns 1 if the server exists, and [b]0[/b] otherwise @seealso: [module:serverdb]ServerDB module documentation[/module] */ @@ -434,7 +434,7 @@ SERVERDB_GET_NETWORK_PROPERTY(serverdb_kvs_fnc_networkLoginCommand,onLoginComman @doc: serverdb.networkName @type: function - @title: + @title: $serverdb.networkName @short: Returns the name diff --git a/src/modules/str/libkvistr.cpp b/src/modules/str/libkvistr.cpp index 2fe470df8..83bafc5d9 100644 --- a/src/modules/str/libkvistr.cpp +++ b/src/modules/str/libkvistr.cpp @@ -291,11 +291,11 @@ static bool str_kvs_fnc_localeupcase(KviKvsModuleFunctionCall * c) @title: $str.isnumber @short: - Returns 1 if the given string represents a number + Returns [b]1[/b] if the given string represents a number @syntax: <bool> $str.isnumber(<givenstring:string>) @description: - Returns 1 if the given string represents a number, 0 if not. + Returns [b]1[/b] if the given string represents a number, and [b]0[/b] otherwise. */ static bool str_kvs_fnc_isnumber(KviKvsModuleFunctionCall * c) { @@ -316,11 +316,11 @@ static bool str_kvs_fnc_isnumber(KviKvsModuleFunctionCall * c) @title: $str.isunsignednumber @short: - Returns 1 if the given string represents an unsigned number + Returns [b]1[/b] if the given string represents an unsigned number @syntax: <bool> $str.isunsignednumber(<givenstring:string>) @description: - Returns 1 if the given string represents an unsigned number, 0 if not. + Returns [b]1[/b] if the given string represents an unsigned number, and [b]0[/b] otherwise. */ static bool str_kvs_fnc_isunsignednumber(KviKvsModuleFunctionCall * c) { @@ -347,11 +347,11 @@ static bool str_kvs_fnc_isunsignednumber(KviKvsModuleFunctionCall * c) @title: $str.isempty @short: - Returns 1 if the given string don't have any character. + Returns [b]1[/b] if the given string don't have any character. @syntax: <string> $str.isEmpty(<givenstring:string>) @description: - Returns 1 if the given string don't have any character (that is, is empty). + Returns [b]1[/b] if the given string don't have any character (that is, is empty). This function is almost useless since it is equivalent to the comparison with an empty string... */ @@ -375,11 +375,11 @@ static bool str_kvs_fnc_isempty(KviKvsModuleFunctionCall * c) @title: $str.contains @short: - Returns 1 if the first parameter contains the second + Returns [b]1[/b] if the first parameter contains the second @syntax: <bool> $str.contains(<container:string>,<tofind:string>[,<case:bool>]) @description: - Returns 1 if the first string parameter contains the second string parameter. + Returns [b]1[/b] if the first string parameter contains the second string parameter. If the third parameter is set to true, then the search is case sensitive. @seealso: [fnc]$str.match[/fnc]() @@ -405,11 +405,11 @@ static bool str_kvs_fnc_contains(KviKvsModuleFunctionCall * c) @title: $str.equal @short: - Returns 1 if the two string parameters are equal + Returns [b]1[/b] if the two string parameters are equal @syntax: <bool> $str.equal(<fromcompare:string>,<tocompare:string>[,<case:bool>]) @description: - Returns 1 if the two string parameters are equal. + Returns [b]1[/b] if the two string parameters are equal. If the third parameter is set to true, then the search is case sensitive. @seealso: [fnc]$str.match[/fnc]() @@ -439,7 +439,7 @@ static bool str_kvs_fnc_equal(KviKvsModuleFunctionCall * c) @syntax: <bool> $str.cmp(<fromcompare:string>,<tocompare:string>[,<case:bool>]) @description: - This function compares two strings alphabetically. If the first string is 'greater' than the second, it will return a positive number, a negative number is the second is greater and 0 if the two strings are equal. + This function compares two strings alphabetically. If the first string is [b]greater[/b] than the second, it will return a positive number, a negative number is the second is greater and 0 if the two strings are equal. If the third parameter is set to true, then the search is case sensitive. @seealso: [fnc]$str.match[/fnc]() @@ -1105,11 +1105,11 @@ static bool str_kvs_fnc_rightfromlast(KviKvsModuleFunctionCall * c) @syntax: <bool> $str.match(<expression:string>,<string:string>[,<flags:string>[,<case:bool>]]) @description: - Returns 1 if the fixed <string> matches the <expression>, 0 otherwise.[br] - If <flags> contains the flag 'r' then <expression> is treated as a full + Returns [b]1[/b] if the fixed <string> matches the <expression>, and [b]0[/b] otherwise.[br] + If <flags> contains the flag [b]r[/b] then <expression> is treated as a full regular expression otherwise it is treated as a simple wildcard expression containing - the classic wildcards '*' and '?'.[br] - If <flags> contains the flag 'e' then only an exact match is considered (e.g. the full + the classic wildcards [b]*[/b] and [b]?[/b].[br] + If <flags> contains the flag [b]e[/b] then only an exact match is considered (e.g. the full <string> is exactly matched by <expression>), otherwise partial matches are allowed too (e.g. <expression> is found inside <string>).[br] If the third parameter is set to true, then the match is case sensitive.[br] @@ -1153,7 +1153,7 @@ static bool str_kvs_fnc_match(KviKvsModuleFunctionCall * c) <string> $str.word(<n:int>,<string:string>) @description: Returns the nth word inside the <string> (with n starting from 0!)[br] - A word is a substring not containing spaces (ASCII chars 32, carriage returns, tabs etc...).[br] + A word is a substring not containing spaces (ASCII chars 32, carriage returns, tabs etc.).[br] If the string contains less than n+1 words then an empty string is returned.[br] This function is faster than a call to [fnc]$str.split[/fnc]() and array indexing if you need a single word to be extracted from a complex string.[br] @@ -1441,7 +1441,7 @@ static bool str_kvs_fnc_digest(KviKvsModuleFunctionCall * c) @description: Joins all the string in the <data> array by using the specified <separator> and returns the result. - If <flags> contains the character "n" then empty strings in the <data> + If <flags> contains the character [b][i]n[/i][/b] then empty strings in the <data> array are skipped. */ @@ -1511,13 +1511,13 @@ static bool str_kvs_fnc_join(KviKvsModuleFunctionCall * c) <array> $str.grep(<match:string>,<strings:array>[,<flags:string>,<offset:integer>]) @description: Returns an array with the elements of <strings> which match the string <match>. - <flags> can be any combination of the characters 's','w' and 'r'.[br] - If the flag 'w' is specified then <match> is assumed to be a wildcard regular - expression (with * and ? wildcards). If the flag 'r' is specified + <flags> can be any combination of the characters [b]s[/b], [b]w[/b] and [b]r[/b].[br] + If the flag [b]w[/b] is specified then <match> is assumed to be a wildcard regular + expression (with [b]*[/b] and [b]?[/b] wildcards). If the flag [b]r[/b] is specified then <match> is assumed to be a standard regular expression. If none of - 'w' and 'r' is specified then <match> is treated as a simple string to be - searched in each element of the <strings> array. 'r' takes precedence over 'w'. - If the flag 's' is specified the matches are case sensitive.[br] + [b]w[/b] and [b]r[/b] is specified then <match> is treated as a simple string to be + searched in each element of the <strings> array. [b]r[/b] takes precedence over [b]w[/b]. + If the flag [b]s[/b] is specified the matches are case sensitive.[br] If the offset is specified attempts to find a match in from position offset in every array's item. [br] If offset is -1, the search starts at the last character; if -2, at the next to last character; etc. [br] Note that since almost any other variable type can be automatically cast @@ -1641,15 +1641,15 @@ static bool str_kvs_fnc_grep(KviKvsModuleFunctionCall * c) <array> $str.split(<separator:string>,<data:string>[,<flags:string>[,<maxfields:integer>]]) @description: Splits the <data> string by <separator> and returns an array of substrings.[br] - <flags> may be a combination of the characters 's', 'w', 'r' and 'n'.[br] - If s is specified, <separator> matching is case sensitive, otherwise it is case insensitive.[br] - If w is specified, <separator> is treated as a wildcard-type regular expression - (with * and ? wildcards).[br] + <flags> may be a combination of the characters [b]s[/b], [b]w[/b], [b]r[/b] and [b]n[/b].[br] + If [b]s[/b] is specified, <separator> matching is case sensitive, otherwise it is case insensitive.[br] + If [b]w[/b] is specified, <separator> is treated as a wildcard-type regular expression + (with [b]*[/b] and [b]?[/b] wildcards).[br] If r is specified, <separator> is treated as a extended-type regular expression - (with character classes, special escapes etc..).[br] - If both w and r are specified, w takes precedence.[br] - If neither w and r are specified <separator> is treated as a simple string to be matched.[br] - If 'n' is specified then any resulting empty fields are discarded.[br] + (with character classes, special escapes etc.).[br] + If both [b]w[/b] and [b]r[/b] are specified, [b]w[/b] takes precedence.[br] + If neither [b]w[/b] and [b]r[/b] are specified <separator> is treated as a simple string to be matched.[br] + If [b]n[/b] is specified then any resulting empty fields are discarded.[br] If <maxfield> is specified, then at most <maxfields> items are returned in the array (i.e. the last item may be not completely split). @examples: @@ -1798,7 +1798,7 @@ static bool str_kvs_fnc_split(KviKvsModuleFunctionCall * c) a string formatted by following the specification in <format> and by using the following corresponding variadic parameters. Since the percent sign is used as variable prefix in KVIrc, - this function uses the question mark '?' instead.[br] + this function uses the question mark [b]?[/b] instead.[br] The <format> string can contain the following escape sequences:[br] [br] [table] diff --git a/src/modules/tmphighlight/libkvitmphighlight.cpp b/src/modules/tmphighlight/libkvitmphighlight.cpp index 3d4117481..70c3fd3c4 100644 --- a/src/modules/tmphighlight/libkvitmphighlight.cpp +++ b/src/modules/tmphighlight/libkvitmphighlight.cpp @@ -218,7 +218,7 @@ static bool tmphighlight_kvs_cmd_removechannel(KviKvsModuleCommandCall * c) @title: $tmphighlight.isNickHighlighted @short: - Returns 1 if the user is highlighted on this channel, 0 otherwise + Returns [b]1[/b] if the user is highlighted on this channel, and [b]0[/b] otherwise @syntax: <boolean> $tmphighlight.isNickHighlighted <nick:string> @description: @@ -254,11 +254,11 @@ static bool tmphighlight_kvs_fnc_isnickhighlighted(KviKvsModuleFunctionCall * c) @title: $tmphighlight.isChannelHighlighted @short: - Returns 1 if the channel is highlighted on this IRC network, 0 otherwise + Returns [b]1[/b] if the channel is highlighted on this IRC network, and [b]0[/b] otherwise @syntax: <boolean> $tmphighlight.isChannelHighlighted[window_id:integer] @description: - This command returns 1 if the channel is highlighted on this IRC network, 0 otherwise. + This command returns 1 if the channel is highlighted on this IRC network, and [b]0[/b] otherwise. @seealso: [fnc]$tmphighlight.addChannel[/fnc] [fnc]$tmphighlight.removeChannel[/fnc] diff --git a/src/modules/toolbar/libkvitoolbar.cpp b/src/modules/toolbar/libkvitoolbar.cpp index 07683170c..38ba32d30 100644 --- a/src/modules/toolbar/libkvitoolbar.cpp +++ b/src/modules/toolbar/libkvitoolbar.cpp @@ -291,7 +291,7 @@ static bool toolbar_kvs_cmd_hide(KviKvsModuleCommandCall * c) @syntax: <boolean> $toolbar.exists(<id:string>) @description: - Returns 1 if the toolbar with the specified <id> has been defined.[br] + Returns [b]1[/b] if the toolbar with the specified <id> has been defined.[br] Note that this doesn't mean that the toolbar is visible! @seealso: [cmd]toolbar.create[/cmd] @@ -320,7 +320,7 @@ static bool toolbar_kvs_fnc_exists(KviKvsModuleFunctionCall * c) @syntax: <boolean> $toolbar.isVisible(<id:string>) @description: - Returns 1 if the toolbar with the specified <id> is visible, + Returns [b]1[/b] if the toolbar with the specified <id> is visible, or 0 when invisible or the given toolbar does not exist. @seealso: [cmd]toolbar.show[/cmd] diff --git a/src/modules/trayicon/libkvitrayicon.cpp b/src/modules/trayicon/libkvitrayicon.cpp index a61df08e8..a66f6864a 100644 --- a/src/modules/trayicon/libkvitrayicon.cpp +++ b/src/modules/trayicon/libkvitrayicon.cpp @@ -682,7 +682,7 @@ static bool trayicon_kvs_cmd_hidewindow(KviKvsModuleCommandCall *) @syntax: $reguser.isVisible() @description: - Returns 1 if the dock widget is actually visible, 0 otherwise. + Returns [b]1[/b] if the dock widget is actually visible, and [b]0[/b] otherwise. @seealso: [cmd]trayicon.show[/cmd] */ diff --git a/src/modules/window/libkviwindow.cpp b/src/modules/window/libkviwindow.cpp index 7f23dfb71..1b9125d1f 100644 --- a/src/modules/window/libkviwindow.cpp +++ b/src/modules/window/libkviwindow.cpp @@ -370,7 +370,7 @@ static bool window_kvs_fnc_activityTemperature(KviKvsModuleFunctionCall * c) $window.isDocked $window.isDocked(<window_id>) @description: - Returns 1 if the window specified by <window_id> is currently docked and 0 otherwise. + Returns [b]1[/b] if the window specified by <window_id> is currently docked and [b]0[/b] otherwise. The form with no parameters works on the current window. If the specified window doesn't exist then 0 is returned. @seealso: @@ -400,7 +400,7 @@ static bool window_kvs_fnc_isDocked(KviKvsModuleFunctionCall * c) $window.hasInput $window.hasInput(<window_id>) @description: - Returns 1 if the window specified by <window_id> has an input field and 0 otherwise. + Returns [b]1[/b] if the window specified by <window_id> has an input field and [b]0[/b] otherwise. The form with no parameters works on the current window. If the specified window doesn't exist then 0 is returned. @seealso: @@ -430,8 +430,8 @@ static bool window_kvs_fnc_hasInput(KviKvsModuleFunctionCall * c) $window.hasUserFocus $window.hasUserFocus(<window_id>) @description: - Returns 1 if the window specified by <window_id> has - currently the user focus and 0 otherwise. + Returns [b]1[/b] if the window specified by <window_id> has + currently the user focus and [b]0[/b] otherwise. The form with no parameters works on the current window. If the specified window doesn't exist then 0 is returned. A window has the user focus if it is the KVIrc's active @@ -493,7 +493,7 @@ static bool window_kvs_fnc_console(KviKvsModuleFunctionCall * c) $window.hasOutput $window.hasOutput(<window_id>) @description: - Returns 1 if the window specified by <window_id> has a text output widget and 0 otherwise. + Returns [b]1[/b] if the window specified by <window_id> has a text output widget and [b]0[/b] otherwise. The form with no parameters works on the current window. If the specified window doesn't exist then 0 is returned. @seealso: |
