object class

# object class Base class for all the KVIrc objects
Inherits
none
Description
This is the base class for all builtin KVirc object classes. It exports functions to retrieve an object's name, to iterate through child objects and to lookup a child object by name or class. Additionally, this class provides builtin timer functionality. The $constructor and $destructor functions are empty implementations that all the other classes inherit.
Functions
`$constructor()`
Constructor for this object class. The default implementation does nothing.
`$destructor()`
Destructor for this object class. The default implementation emits the signal "destroyed".
`$name()`
Returns the name of this object.
`$parent()`
Returns the parent object of this object or 0 if this object has no parent.
`$timerEvent(<timerId>)`
Handler for the timer events. The default implementation does nothing. See also $startTimer() and $killTimer().
`$startTimer(<timeout>)`
Starts a builtin timer for this object and returns its timer id as a string or '-1' if <timeout> was invalid. The $timerEvent() handler function will be called every <timeout> milliseconds until the timer is stopped by $killTimer().
`$killTimer(<timer id>)`
Stops the timer specified by <timer id>.
`$className()`
Returns the class name of this object instance
`$findChild(<class>,<name>)`
Returns the first child that matches <class> and <name>. If <class> is an empty string, any class matches, if <name> is an empty string, any name matches. This function traverses the entire tree of children but is NOT recursive.
`$childCount()`
Returns the number of child objects
`$emit(<signal_name>[,parameters])`
Emits the signal <signal_name> passing the optional [parameters]. See the objects documentation for an overview of signals and slots.
`$children()`
Returns an array of child object identifiers.
`$signalSender()`
Returns the current signal sender when in a slot connected to a signal. In other contexts this function returns an empty string. You can safely use it to test if the current function has been triggered directly or from a signal emission.
`$signalName()`
Returns the name of the last signal that has triggered one of this object's slots. When called in a slot handler, the triggering signal name is returned.
`$property(<Qt property name>[,bNowarning:boolean])`
This is for really advanced scripting. All KVIrc widgets are based on the Qt library ones. The Qt library allows to set and read special properties. You will have to take a look at the Qt documentation for each widget type to see the available property names. The supported property types are: Rect, Size, Point, Color, String, CString, Int, UInt, Bool and enumeration types. For example, the widget's x coordinate can be retrieved by using the $x() function or by calling $property(x). There are many properties that are available ony through the $property() call: For example, you can find out if the widget accepts drops by calling $property(acceptDrops). This function will be mainly useful in the wrapper class.
`$setProperty(<Qt property>,<property value>)`
Sets a qt property for this widget. This is for advanced scripting, and can control really many features of the Qt widgets. For example, the multilineedit widgets can be set to the "password" echo mode only by using this function call:
        %X=$new(lineedit, 0, a_name)
         %X->$show()
         %X->$setProperty(echoMode,Password)
The available properties to be set are listed by $listProperties() and must appear in the list as writeable. This function will be mainly useful in the wrapper class.
`$listProperties([bArray])`
Lists the properties of this object. If <bArray> is $true then the function returns the properties as an array of descriptive strings, otherwise the properties are dumped to the active window. If <bArray> is not passed then it is assumed to be $false. This function will be mainly useful in the wrapper class.
Signals
`destroyed()`
Emitted by the default implementation of $destructor. If you reimplement $destructor in one of the derived classes (or as a private implementation), and still want this signal to be emitted you must emit it by yourself, or (better) call the base class destructor.

Index, Object Classes

KVIrc 4.2.0.6190 Documentation
Generated by builduser at Sun Jun 5 16:41:09 2016