Mgraesslin (Talk | contribs) |
Mgraesslin (Talk | contribs) (→Functions) |
||
| Line 13: | Line 13: | ||
* '''print(QVariant ... values)''': Prints all provided values to kDebug and as a D-Bus signal | * '''print(QVariant ... values)''': Prints all provided values to kDebug and as a D-Bus signal | ||
* ''QVariant'' '''readConfig(QString key, QVariant defaultValue = QVariant())''': Reads the config value for key in the Script's configuration with the optional default value. If not providing a default value and no value stored in the configuration an undefined value is returned. | * ''QVariant'' '''readConfig(QString key, QVariant defaultValue = QVariant())''': Reads the config value for key in the Script's configuration with the optional default value. If not providing a default value and no value stored in the configuration an undefined value is returned. | ||
| + | * ''bool'' '''registerScreenEdge(ElectricBorder border, QScriptValue callback)''': Registers the callback for the screen edge. When the mouse gets pushed against the given edge the callback will be invoked. | ||
* ''bool'' '''registerShortcut(QString title, QString text, QString keySequence, QScriptValue callback)''': Registers keySequence as a global shortcut. When the shortcut is invoked the callback will be called. Title and text are used to name the shortcut and make it available to the global shortcut configuration module. | * ''bool'' '''registerShortcut(QString title, QString text, QString keySequence, QScriptValue callback)''': Registers keySequence as a global shortcut. When the shortcut is invoked the callback will be called. Title and text are used to name the shortcut and make it available to the global shortcut configuration module. | ||
| + | * ''bool'' '''assert(bool value, QString message = QString())''': Aborts the execution of the script if value does not evaluate to true. If message is provided an error is thrown with the given message, if not provided an error with default message is thrown. | ||
| + | * ''bool'' '''assertTrue(bool value, QString message = QString())''': Aborts the execution of the script if value does not evaluate to true. If message is provided an error is thrown with the given message, if not provided an error with default message is thrown. | ||
| + | * ''bool'' '''assertFalse(bool value, QString message = QString())''': Aborts the execution of the script if value does not evaluate to false. If message is provided an error is thrown with the given message, if not provided an error with default message is thrown. | ||
| + | * ''bool'' '''assertEquals(QVariant expected, QVariant actual, QString message = QString())''': Aborts the execution of the script if the actual value is not equal to the expected value. If message is provided an error is thrown with the given message, if not provided an error with default message is thrown. | ||
| + | * ''bool'' '''assertNull(QVariant value, QString message = QString())''': Aborts the execution of the script if value is not null. If message is provided an error is thrown with the given message, if not provided an error with default message is thrown. | ||
| + | * ''bool'' '''assertNotNull(QVariant value, QString message = QString())''': Aborts the execution of the script if value is null. If message is provided an error is thrown with the given message, if not provided an error with default message is thrown. | ||
| − | |||
== KWin::WorkspaceWrapper == | == KWin::WorkspaceWrapper == | ||
Contents |
Methods and properties added to the global JavaScript object.
Inherits: KDecorationOptions
Inherits: KDecorationDefines
The Client class encapsulates a window decoration frame. Inherits: KWin::Toplevel