Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/torch/qtlua.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornicholas-leonard <nick@nikopia.org>2015-08-29 05:26:02 +0300
committernicholas-leonard <nick@nikopia.org>2015-08-29 06:07:03 +0300
commitc69a5ebf9818195e47f43df7c1294feb28b2ff07 (patch)
treee7c6cfeec121c726092a1a7a4af43858f9404e86
parentc4fc6f5c8d8c93ed9fe531a584420a6baf2249a0 (diff)
readthedocs
-rw-r--r--README.md16
-rw-r--r--doc/index.md13
-rw-r--r--doc/qt.md (renamed from packages/qt/doc/README.md)220
-rw-r--r--doc/qtcore.md (renamed from packages/qtcore/doc/README.md)148
-rw-r--r--doc/qtgui.md (renamed from packages/qtgui/doc/README.md)395
-rw-r--r--doc/qtide.md (renamed from packages/qtide/doc/README.md)157
-rw-r--r--doc/qtsvg.md (renamed from packages/qtsvg/doc/README.md)59
-rw-r--r--doc/qtuiloader.md (renamed from packages/qtuiloader/doc/README.md)41
-rw-r--r--doc/qtwidget.md (renamed from packages/qtwidget/doc/README.md)612
-rw-r--r--mkdocs.yml15
10 files changed, 834 insertions, 842 deletions
diff --git a/README.md b/README.md
index c54f294..6a69445 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,14 @@
-QtLua -- a Lua interface to QT
+QtLua: a Lua interface to QT
==============================
This package includes several useful sub-packages:
- - [qt](packages/qt/doc/README.md): the global Qt system
- - [qtcore](packages/qtcore/doc/README.md): Core interface
- - [qtgui](packages/qtgui/doc/README.md): GUI
- - [qtuiloader](packages/qtuiloader/doc/README.md): QT Designer UI files loader
- - [qtide](packages/qtide/doc/README.md): QLua Integrated Development Environment (IDE)
- - [qtsvg](packages/qtsvg/doc/README.md): Qt SVG support
- - [qtwidget](packages/qtwidget/doc/README.md): widgets and events
+ - [qt](doc/qt.md): the global Qt system
+ - [qtcore](doc/qtcore.md): Core interface
+ - [qtgui](doc/qtgui.md): GUI
+ - [qtuiloader](doc/qtuiloader.md): QT Designer UI files loader
+ - [qtide](doc/qtide.md): QLua Integrated Development Environment (IDE)
+ - [qtsvg](doc/qtsvg.md): Qt SVG support
+ - [qtwidget](doc/qtwidget.md): widgets and events
diff --git a/doc/index.md b/doc/index.md
new file mode 100644
index 0000000..981d706
--- /dev/null
+++ b/doc/index.md
@@ -0,0 +1,13 @@
+# QtLua: a Lua interface to QT
+
+This package includes several useful sub-packages:
+
+ - [qt](qt.md): the global Qt system
+ - [qtcore](qtcore.md): Core interface
+ - [qtgui](qtgui.md): GUI
+ - [qtuiloader](qtuiloader.md): QT Designer UI files loader
+ - [qtide](qtide.md): QLua Integrated Development Environment (IDE)
+ - [qtsvg](qtsvg.md): Qt SVG support
+ - [qtwidget](qtwidget.md): widgets and events
+
+
diff --git a/packages/qt/doc/README.md b/doc/qt.md
index 5439171..8b14e9f 100644
--- a/packages/qt/doc/README.md
+++ b/doc/qt.md
@@ -1,5 +1,5 @@
-<a name="qtlua.overview.dok"/>
-# QtLua and Qt Package Reference Manual #
+<a name="qtlua.overview.dok"></a>
+# QtLua and Qt Package Reference Manual
The package `qt` is available when you run the Lua
interpreter using the [qlua](#qlua) program.
@@ -10,34 +10,29 @@ a minimal familiarity with the Qt4 library.
Program [qlua](#qlua) relies in fact on
the [QtLua](#qtlua) C++ library which provides a Qt
-object that encapsulates a Lua interpreter
+object that encapsulates a Lua interpreter.
All properties, slots and signals declared by the C++ Qt objects
are automatically exposed in the Lua interpreter.
Signals can be connected to Lua functions.
-The packages
-[qtcore](..:qtcore:index),
-[qtgui](..:qtgui:index), and
-[qtuiloader](..:qtuiloader:index)
+The packages [qtcore](qtcore.md), [qtgui](qtgui.md), and [qtuiloader](qtuiloader.md)
provide bindings for the classes defined
by the corresponding Qt libraries.
-<a name="qlua"/>
-# Program qlua #
+<a name="qlua"></a>
+# Program qlua
Program `qlua` is a compatible replacement for
-the standard interpreter program `lua`
-with several new capabilities:
-
- * New packages provides a rich interface with the Qt4 library: [qt](#qt), [qtwidget](..:qtwidget:index), [qttorch](..:qttorch:index), [qtuiloader](..:qtuiloader:index).
+the standard interpreter program `lua` with several new capabilities:
+ * New packages provide a rich interface with the Qt4 library: [qt](#qt), [qtwidget](qtwidget.md), [qtuiloader](qtuiloader.md).
* The Lua interpreter runs in a dedicated thread. The main thread remains in charge of graphical interface and user interaction. Therefore all graphical interfaces remain active while the interpreter is running.
-
* Console output can be captured and emitted as Qt signals.
+
Therefore one can program a complete integrated development
environment including a graphical console.
-<a name="qlua.usage"/>
+<a name="qlua.usage"></a>
## Usage ##
Program `qlua` accepts the same command line options and arguments as the
@@ -46,6 +41,8 @@ accepts all the
[Qt command line options](http://doc.trolltech.com/4.4/qapplication.html#QApplication)
as well as a few specific options.
+At any time, one can exit the interpreter using `[CTRL-D]`.
+
```
Usage: qlua [options] [script <scriptargs>]
The lua options are:
@@ -81,16 +78,14 @@ painted, timers are not honored, etc., unless the Lua program calls
normal mode of operation of `qlua` but this can be useful for
debugging purposes.
-<a name="qlua.components"/>
+<a name="qlua.components"></a>
## Components ##
Program `qlua` is a Qt program composed of three objects working
independently in separate threads.
* The [console manager](#qt.qconsole) manages the interactive session using input and output on a terminal or inside a shell window. It can capture all output to the `stdout` file descriptor and publish it as Qt signal for use in graphical interfaces. It also manages the user input with Lua code completion.
-
* The [QtLua engine](#qt.qengine) runs the Lua code and provides the integration with the Qt environment.
-
* The [application manager](#qt.qapp) runs in the main thread. It handles the graphical user interface events and all the notifications emitted by the console manager and the lua engine.
Running the Lua interpreter in a separate thread lets the main thread
@@ -107,7 +102,7 @@ object. Thread hopping can also be performed manually using functions
[qt.qcall](#qt.qcall) or [qt.xqcall](#qtxqcall).
-<a name="qt"/>
+<a name="qt"></a>
# Package qt #
When you run program `qlua`, the package `qt` is readily
@@ -120,7 +115,7 @@ userdata values and a few useful functions. The [QtLua API](#QtLua)
also provides a means to name an arbitrary Qt object and publish it
inside the package `qt`.
-<a name="qt.QVariants"/>
+<a name="qt.QVariants"></a>
## Qt Variants ##
Values represented by the Qt class
@@ -145,7 +140,7 @@ equality test and `__tostring` to return a string representing the
data. In addition, the following methods are predefined in all class
tables:
-<a name="qt.tostring"/>
+<a name="qt.tostring"></a>
### qtdata:tostring() ###
Function `qtdata:tostring()` returns a Lua string
@@ -155,14 +150,14 @@ representing the value contained in the Qt variant.
* Qt variants that can be converted to type `QByteArray`are also transformed into Lua strings.
* Other types are represented using the type name followed by the hexadecimal representation of a pointer to the data.
-<a name="qt.tonumber"/>
+<a name="qt.tonumber"></a>
### qtdata:tonumber() ###
Function `qtdata:tonumber()` returns a Lua number representing the
value contained in the Qt variant. The value `nil` is returned when
the data type cannot be meaningfully converted to a numeric value.
-<a name="qt.tobool"/>
+<a name="qt.tobool"></a>
### qtdata:tobool() ###
Function `qtdata:tobool()` returns a boolean value associated with
@@ -172,7 +167,7 @@ this function can be used to determine if the object has been deleted
or is currently allocated.
-<a name="qt.type"/>
+<a name="qt.type"></a>
### qtdata:type() ###
Function `qtdata:type()` returns a string naming the type of the
@@ -191,7 +186,7 @@ the case of object pointers, this function returns true if the object
inherits the qt object class named `typename`.
-<a name="qt.QObjects"/>
+<a name="qt.QObjects"></a>
## Qt Objects ##
Critical Qt classes are subclasses of class
@@ -209,11 +204,10 @@ to a Qt object.
Such values have a special treatment:
- * A distinct metatable is allocated for each Qt object class. These metatables are available in the `qt` package and follow the same inheritance pattern as the Qt object class hierarchy. Class [qt.QObject](..:qtcore:index#qobject) sits at the top of this hierarchy.
-
+ * A distinct metatable is allocated for each Qt object class. These metatables are available in the `qt` package and follow the same inheritance pattern as the Qt object class hierarchy. Class [qt.QObject](qtcore.md#qobject) sits at the top of this hierarchy.
* Slots, signals and properties are automatically exposed to the Lua interpreter. This is achieved using the information collected by the Qt precompiler `moc`.
-<a name="qt.memorymanagement.dok"/>
+<a name="qt.memorymanagement.dok"></a>
### Memory management ###
Qt organizes the Qt objects hierarchically. An object can be an
@@ -224,7 +218,6 @@ C++, orphan objects must be deleted manually.
Two situations arise when a Qt object is exposed the Lua interpreter.
* An exposed Qt object may be deleted by C++ code, either directly, or indirectly because one of its ascendant has been deleted. The Lua userdata representing the object becomes a "zombie". Zombies can be detected using method [tobool()](#qt.tobool).
-
* An exposed Qt object may be deleted because the Lua garbage collector determines that the Lua program no longer needs this object. Whether this happens is determined when the object is exposed to the Lua interpreter. Such objects are said to be owned by Lua.
In general, orphan objects created from a Lua program are owned by
@@ -233,7 +226,7 @@ are not Lua owned and are not affected by the decisions of the Lua
garbage collector.
-<a name="qt.properties.dok"/>
+<a name="qt.properties.dok"></a>
### Properties ###
Qt object properties are automatically available using the Lua
@@ -241,8 +234,8 @@ indexation syntax
Examples:
```lua
- widget.windowTitle="my window title"
- return widget.windowTitle
+widget.windowTitle="my window title"
+return widget.windowTitle
```
Properties are always manipulated from the thread owning the Qt
@@ -268,7 +261,7 @@ string containing the relevant flag names separated by vertical bars.
-<a name="qt.slots.dok"/>
+<a name="qt.slots.dok"></a>
### Slots and Invokable Methods ###
Public and protected Qt slots can be called using the Lua method
@@ -276,8 +269,8 @@ invokation syntax.
Examples:
```lua
- widget:setEnabled(true)
- widget:show()
+widget:setEnabled(true)
+widget:show()
```
Public and protected member functions whose c++ declaration is marked
@@ -297,7 +290,7 @@ It is always possible to work around these rules by selecting a
particular member function using its signature.
```lua
- widget['setEnabled(bool)'](widget, true)
+widget['setEnabled(bool)'](widget, true)
```
Member functions exposes in this way are always invoked from the
@@ -314,14 +307,14 @@ are returned as string variants.
Inheritance ensures that all methods exposed by a class are also
exposed by its subclasses. Methods exposed by the `QObject` class,
-such as [deleteLater()](..:qtcore:index#qobjectdeletelater), are
+such as [deleteLater()](qtcore.md#qobjectdeletelater), are
inherited by all Qt object classes.
-<a name="qt.namedchildren.dok"/>
+<a name="qt.namedchildren.dok"></a>
### Named Children ###
All Qt objects can be given a name represented by property
-[objectName](..:qtcore:index#qobjectobjectname). The named children
+[objectName](qtcore.md#qobjectobjectname). The named children
of a Qt object can be accessed by name using the indexation syntax.
However, when the name of a child conflicts with a property or an
exposed method, the property or the exposed method has
@@ -329,12 +322,12 @@ precedence. Named children are searched in the whole descendency tree
using the Qt function `qFindChild`.
-<a name="qt.signals.dok"/>
+<a name="qt.signals.dok"></a>
### Signals ###
Lua programs can emit and receive Qt signals.
-<a name="qt.emttingsignals.dok"/>
+<a name="qt.emttingsignals.dok"></a>
#### Emitting Signals ####
Lua programs can emit signals using the function call syntax.
@@ -353,8 +346,8 @@ a Lua program can emit signal `mysignal`
as follows
```lua
- myqobject:mysignal("mymessage") -- or
- myqobject:mysignal("mymessage", 4)
+myqobject:mysignal("mymessage") -- or
+myqobject:mysignal("mymessage", 4)
```
Overloaded signals are resolved like method invokation. In
@@ -367,7 +360,7 @@ using its signature.
myqobject['mysignal(QByteArray,int)'](self,"message",3)
```
-<a name="qt.receivingsignals.dok"/>
+<a name="qt.receivingsignals.dok"></a>
#### Receiving Signals ####
Qt signals can be connected to Lua functions
@@ -376,8 +369,8 @@ using [qt.connect(...)](#qt.connect).
For instance, the clause
```lua
- qt.connect(qobject,'mysignal(QByteArray)',
- function(s) print("mysignal("..s..")") end)
+qt.connect(qobject,'mysignal(QByteArray)',
+ function(s) print("mysignal("..s..")") end)
```
ensures that the specified lua function is called whenever the signal
@@ -388,9 +381,9 @@ types are converted to Lua numbers.
Functions passed to `qt.connect` can of course be closures:
```lua
- local table = some_lua_object()
- qt.connect(qobject,'mysignal(QByteArray)',
- function(s) table:mysignalemitted(s) end)
+local table = some_lua_object()
+qt.connect(qobject,'mysignal(QByteArray)',
+ function(s) table:mysignalemitted(s) end)
```
When the signal occurs while the Lua interpreter is busy, the
@@ -400,10 +393,10 @@ the current Lua code terminates or because function
[qt.doevents()](#qt.doevents) is called.
-<a name="qt.qobjects.dok"/>
+<a name="qt.qobjects.dok"></a>
## Objects ##
-<a name="qt.qapp"/>
+<a name="qt.qapp"></a>
### qt.qApp ###
Expression `qt.qApp` refers to the application object
@@ -411,12 +404,12 @@ which orchestrates the operation of the [qlua](#qlua) program.
This object is the sole instance of class `QLuaApplication`.
A few exposed slots and properties are relevant for Lua programs.
-<a name="qt.qapp.quit"/>
+<a name="qt.qapp.quit"></a>
#### qt.qApp:quit() ####
Function `qt.qApp:quit()` quits the `qlua` application.
-<a name="qt.qapp.restart"/>
+<a name="qt.qapp.restart"></a>
#### qt.qApp:restart(bool) ####
Function `qt.qApp:restart(bool)` reinitializes
@@ -425,39 +418,39 @@ When the optional flag `bool` is true,
the command line arguments passed to the program
[qlua](#qlua) are re-executed.
-<a name="qt.qapp.about"/>
+<a name="qt.qapp.about"></a>
#### qt.qApp:about() ####
Function `qt.qApp:about()` displays an about box dialog displaying
the contents of the property `qt.qApp.aboutMessage`.
-<a name="qt.qapp.aboutmessage"/>
+<a name="qt.qapp.aboutmessage"></a>
#### qt.qApp.aboutMessage ####
Property `qt.qApp.aboutMessage` contains an HTML string that is
displayed in the about box when function `qt.qApp:about()` is
invoked.
-<a name="qt.qapp.readsettings"/>
+<a name="qt.qapp.readsettings"></a>
#### qt.qApp:readSettings(key) ####
Reads the preference settings associated with string `key`.
-<a name="qt.qapp.writesettings"/>
+<a name="qt.qapp.writesettings"></a>
#### qt.qApp:writeSettings(key,value) ####
Sets the preference settings associated with string `key`
to `value`. Argument `value` should be a Lua value
that can be converted into a `QVariant`.
-<a name="qt.qapp.runswithoutgraphics"/>
+<a name="qt.qapp.runswithoutgraphics"></a>
#### qt.qApp:runsWithoutGraphics() ####
This function returns `true` if the `qlua` interpreter
was launched with the option `-nographics`.
-<a name="qt.qconsole"/>
+<a name="qt.qconsole"></a>
### qt.qConsole ###
Expression `qt.qConsole` refers to the console object
@@ -465,7 +458,7 @@ which handles console input and output for the [qlua](#qlua) program.
This object is the sole instance of class `QLuaConsole`.
A few exposed slots, signals and properties are relevant for Lua programs.
-<a name="qt.qconsole.captureoutput"/>
+<a name="qt.qconsole.captureoutput"></a>
#### qt.qConsole.captureOutput ####
When the boolean property `qt.qConsole.captureOutput` is set,
@@ -473,14 +466,14 @@ all output to the `stdout` file descriptor is
captured and reexpressed by emitting signal
`consoleOutput(QByteArray)`.
-<a name="qt.qconsole.printCapturedOutput"/>
+<a name="qt.qconsole.printCapturedOutput"></a>
#### qt.qConsole.printCapturedOutput ####
When `qt.qConsole.captureOutput` is true,
the boolean property `qt.qConsole.printCapturedOutput` determines
whether the captured text is display on the console or not.
-<a name="qt.qconsole.addToHistory"/>
+<a name="qt.qconsole.addToHistory"></a>
#### qt.qConsole:addToHistory(string) ####
Function call `qt.qConsole:addToHistory(string)` adds
@@ -488,7 +481,7 @@ Function call `qt.qConsole:addToHistory(string)` adds
This works only when [qlua](#qlua) is compiled
with command line history support.
-<a name="qt.consoleOutput"/>
+<a name="qt.consoleOutput"></a>
#### [QLuaConsole signal] consoleOutput(QByteArray) ####
When `qt.qConsole.captureOutput` is true,
@@ -497,20 +490,20 @@ whenever a string is output to the file descriptor `stdout`.
Capturing this signal can be useful to program a graphical
replacement for the console.
-<a name="qt.ttyInput"/>
+<a name="qt.ttyInput"></a>
#### [QLuaConsole signal] ttyInput(QByteArray) ####
Signal `ttyInput(QByteArray)` is emitted whenever a new
input line has been validated by the user on the console.
-<a name="qt.ttyEndOfFile"/>
+<a name="qt.ttyEndOfFile"></a>
#### [QLuaConsole signal] ttyEndOfFile() ####
Signal `ttyEndOfFile()` is emitted whenever an end-of-file
condition is detected on the console input. When this happens,
`qlua` asks the user if he really wants to quit the application.
-<a name="qt.ttyBreak"/>
+<a name="qt.ttyBreak"></a>
#### [QLuaConsole signal] ttyBreak() ####
Signal `ttyBreak()` is emitted whenever the interrupt key sequence,
@@ -519,7 +512,7 @@ When this happens, `qlua` stops the execution of Lua programs
and waits for new commands on the console.
-<a name="qt.qengine"/>
+<a name="qt.qengine"></a>
### qt.qEngine ###
Expression `qt.qEngine` refers to the Lua execution engine.
@@ -528,13 +521,13 @@ A few exposed slots, signals and properties are relevant for Lua programs.
See the documentation of class [QtLuaEngine](#qt.QtLuaEngine)
in the [QtLua](#QtLua) API section for more information.
-<a name="qt.qengine.lastErrorMessage"/>
+<a name="qt.qengine.lastErrorMessage"></a>
#### qt.qEngine.lastErrorMessage ####
Read-only property `qt.qEngine.lastErrorMessage` contains the
last error message generated by the Lua interpreter.
-<a name="qt.qengine.lastErrorLocation"/>
+<a name="qt.qengine.lastErrorLocation"></a>
#### qt.qEngine.lastErrorLocation ####
Read-only property `qt.qEngine.lastErrorLocation` contains a
@@ -543,14 +536,14 @@ extracted from the stack when the last error message was recorded.
When a location corresponds to a line in a file,
the string has the format `"@filename:linenumber"`.
-<a name="qt.qengine.printResults"/>
+<a name="qt.qengine.printResults"></a>
#### qt.qEngine.printResults ####
Boolean property `qt.qEngine.printResults` indicates whether
the Lua interpreter should print the results returned by
the evaluation of interactive Lua expressions.
-<a name="qt.qengine.printErrors"/>
+<a name="qt.qengine.printErrors"></a>
#### qt.qEngine.printErrors ####
Boolean property `qt.qEngine.printErrors` indicates whether
@@ -558,10 +551,10 @@ the Lua interpreter should print the error messages
caused by the evaluation of interactive Lua expressions.
-<a name="qt.functions.dok"/>
+<a name="qt.functions.dok"></a>
## Functions ##
-<a name="qt.connect"/>
+<a name="qt.connect"></a>
### qt.connect(qobject, signature, function, [direct] ) ###
Expression `qt.connect(qobject, signature, func)` connects the
@@ -599,12 +592,12 @@ collector will find that the object is in use. Future versions of
QtLua may address this weakness of the interface between the Lua
garbage collector and the Qt static memory allocation. In the mean
time, be careful to
-[delete](..:qtcore:index#qobjectdeletelater) or
+[delete](qtcore.md#qobjectdeletelater) or
[disconnect](#qt.disconnect) connected objects as soon as you do not
need them anymore.
-<a name="qt.connect"/>
+<a name="qt.connect"></a>
### qt.connect(qobject1, signature1, qobject2, signature2) ###
Expression `qt.connect(qobject1, signature1, qobject2, signature2)`
@@ -613,7 +606,7 @@ or signal `signature2` of Qt object `qobject2`.
This is similar to the Qt function
[QObject::connect(...)](http://doc.trolltech.com/4.4/qobject.html#connect).
-<a name="qt.disconnect"/>
+<a name="qt.disconnect"></a>
### qt.disconnect(qobject, signature, function) ###
Expression `qt.disconnect(qobject, signature, func)`
@@ -624,7 +617,7 @@ All connections matching the non-nil arguments
will then be disconnected.
-<a name="qt.disconnect"/>
+<a name="qt.disconnect"></a>
### qt.disconnect(qobject1, signature1, qobject2, signature2) ###
Expression `qt.disconnect(qobject1, signature1, qobject2, signature2)`
@@ -637,7 +630,7 @@ This is similar to the Qt function
[QObject::disconnect(...)](http://doc.trolltech.com/4.4/qobject.html#disconnect).
-<a name="qt.doevents"/>
+<a name="qt.doevents"></a>
### qt.doevents([waitflag]) ###
Function `qt.doevents()` processes all pending events
@@ -655,7 +648,7 @@ of course cause an infinite wait when there are no event source for
the current thread.
-<a name="qt.isa"/>
+<a name="qt.isa"></a>
### qt.isa(arg, typename) ###
If the Lua value `arg` represents a Qt object or variant,
@@ -665,7 +658,7 @@ as if [arg:isa(typename)](#qt.isa) had been called.
Otherwise it simply returns `nil`.
-<a name="qt.pause"/>
+<a name="qt.pause"></a>
### qt.pause() ###
Expression `qt.pause()` causes the interpreter to enter the mode
@@ -678,7 +671,7 @@ interpreter to enter the mode `Paused`. However, in that case, the
Lua functions associated with signals are not executed.
-<a name="qt.qcall"/>
+<a name="qt.qcall"></a>
### qt.qcall(qobject, function, ... ) ###
Expression `qt.qcall(qobject, f, ...)` executes
@@ -716,7 +709,7 @@ owned by the main thread in charge of the user interaction, and object
charge of the evaluation of Lua expressions.
-<a name="qt.require"/>
+<a name="qt.require"></a>
### qt.require(modulename) ###
This function searches and loads the shared library `modulename`
@@ -735,7 +728,7 @@ by the usual function `require`, other than searching a shared
library along `package.cpath`.
-<a name="qt.type"/>
+<a name="qt.type"></a>
### qt.type(arg) ###
If the Lua value `arg` represents a Qt object or variant, expression
@@ -744,7 +737,7 @@ as if [arg:type()](#qt.type) had been called. Otherwise it simply
returns `nil`.
-<a name="qt.xqcall"/>
+<a name="qt.xqcall"></a>
### qt.xqcall(qobject, function, ..., errorhandler) ###
Expression `qt.xqcall(qobject, f, ..., handler)`
@@ -762,7 +755,7 @@ The `xqcall` function then returns `false`
followed by the values returned by the error handler.
-<a name="QtLua"/>
+<a name="QtLua"></a>
# QtLua API #
This section describes the QtLua API. Class
@@ -775,7 +768,7 @@ prefix [luaQ](#luaQ) provide the essential tools for manipulating Qt
data in Lua functions written in C or C++.
-<a name="qt.QtLuaEngine"/>
+<a name="qt.QtLuaEngine"></a>
## Class QtLuaEngine ##
Class `QtLuaEngine` is a `QObject` subclass representing a Lua interpreter.
@@ -785,6 +778,7 @@ with capabilities comparable to those of the
and additional support for multi-threaded execution.
Instances of this class can be in one of three state:
+
* State `QtLuaEngine::Ready` indicates that the interpreter is ready to accept new Lua commands.
* State `QtLuaEngine::Running` indicates that the interpreter is currently executing a Lua program.
* State `QtLuaEngine::Paused` indicates that the interpreter was suspended while executing a Lua program. One can then use the Lua debug library to investigage the Lua state.
@@ -804,7 +798,7 @@ to directly access the Lua state
the Lua API.
-<a name="qt.qtluaengine.constructor"/>
+<a name="qt.qtluaengine.constructor"></a>
### Constructor ###
`QtLuaEngine::QtLuaEngine(QObject *parent = 0)`
@@ -812,7 +806,7 @@ the Lua API.
This is the constructor for class `QtLuaEngine`. Argument
`parent` is the optional parent object.
-<a name="qt.qtluaengine.properties"/>
+<a name="qt.qtluaengine.properties"></a>
### Properties ###
`[QtLuaEngine property, readonly] QtLuaEngine::State state`
@@ -884,7 +878,7 @@ honors the signal handler invokations immediately
instead of queuing them for further processing.
-<a name="qt.qtluaengine.signals"/>
+<a name="qt.qtluaengine.signals"></a>
### Signals ###
`[signal] void QtLuaEngine::stateChanged(int state)`
@@ -899,7 +893,7 @@ message is captured by the error handler set
by functions `eval` or `evaluate`.
-<a name="qt.qtluaengine.execution"/>
+<a name="qt.qtluaengine.execution"></a>
### Execution ###
`[slot] bool QtLuaEngine::eval(QByteArray s, bool async = false)`
@@ -1004,7 +998,7 @@ properly recognized as an object class.
-<a name="qt.QtLuaLocker"/>
+<a name="qt.QtLuaLocker"></a>
## Class QtLuaLocker ##
Class [QtLuaLocker](#qt.QtLuaLocker) provides means
@@ -1066,7 +1060,7 @@ or [lua_pcall](..:LuaManual#luapcall) and expect
the code to run for an extended period of time.
-<a name="luaQ"/>
+<a name="luaQ"></a>
## The luaQ functions ##
The `luaQ` functions complete the Lua API with
@@ -1082,7 +1076,7 @@ functions are accessible in both C and C++.
#endif
```
-<a name="luaqluaopen_qt"/>
+<a name="luaqluaopen_qt"></a>
### luaopen_qt ###
`int luaopen_qt(lua_State *L)`
@@ -1091,7 +1085,7 @@ Load the `qt` package into the interpreter.
This is the function preloaded into `package.preload['qt']`.
-<a name="luaqcall"/>
+<a name="luaqcall"></a>
### luaQ_call ###
`void luaQ_call(lua_State *L, int na, int nr, QObject *obj = 0)`
@@ -1107,7 +1101,7 @@ This is similar to calling
lua_error(L);
```
-<a name="luaqcheckqobject"/>
+<a name="luaqcheckqobject"></a>
### luaQ_checkqobject&lt;TYPE&gt; ###
`TYPE* luaQ_checkqobject&lt;TYPE&gt;(lua_State *L, int index)`
@@ -1116,7 +1110,7 @@ This function causes an error if the Lua value at position `index`
in the stack does not represent a [Qt object](#QObjects) of class `TYPE`.
Otherwise it returns a pointer to the object.
-<a name="luaqcheckqvariant"/>
+<a name="luaqcheckqvariant"></a>
### luaQ_checkqvariant&lt;TYPE&gt; ###
`TYPE luaQ_checkqvariant&lt;TYPE&gt;(lua_State *L, int index)`
@@ -1130,7 +1124,7 @@ The C++ type `TYPE` must be known to the Qt meta type system.
This can always be achieved using the macro
[Q_DECLARE_METATYPE](http://doc.trolltech.com/4.4/qmetatype.html).
-<a name="luaqcomplete"/>
+<a name="luaqcomplete"></a>
### luaQ_complete ###
`int luaQ_complete(lua_State *L)`
@@ -1140,7 +1134,7 @@ The string could contain a symbol or several symbols separated with dots of peri
Function `luaQ_complete` then pushes a table containing potential
completions for the last symbol in the string.
-<a name="luaqconnnect"/>
+<a name="luaqconnnect"></a>
### luaQ_connect ###
`bool luaQ_connect(lua_State*L, QObject*o, const char *s, int fi)`
@@ -1152,7 +1146,7 @@ Returns `false` if the specified signal was not found.
See also [qt.connect(...)](#qt.connect)
-<a name="luaqdisconnect"/>
+<a name="luaqdisconnect"></a>
### luaQ_disconnect ###
`bool luaQ_disconnect(lua_State*L, QObject*o, const char *s, int fi)`
@@ -1166,7 +1160,7 @@ all connections from the specified object to the specified function.
See also [qt.disconnect(...)](#qt.disconnect).
-<a name="luaqdoevents"/>
+<a name="luaqdoevents"></a>
### luaQ_doevents ###
`void luaQ_doevents(lua_State *L, bool wait = false)`
@@ -1178,14 +1172,14 @@ ensure that queued signals are processed timely.
See also [qt.doevents()](#qt.doevents).
-<a name="luaqengine"/>
+<a name="luaqengine"></a>
### luaQ_engine ###
`QtLuaEngine *luaQ_engine(lua_State *L)`
Returns a pointer to the current [Lua engine](#qt.QtLuaEngine).
-<a name="luaqgetfield"/>
+<a name="luaqgetfield"></a>
### luaQ_getfield ###
`void luaQ_getfield(lua_State *L, int index, const char *name)`
@@ -1196,7 +1190,7 @@ but never propagates errors causes by executing the metatable
simply returns `nil`.
-<a name="luaqoptqobject"/>
+<a name="luaqoptqobject"></a>
### luaQ_optqobject&lt;TYPE&gt; ###
`TYPE* luaQ_optqobject&lt;TYPE&gt;(lua_State *L, int index, TYPE *d)`
@@ -1210,7 +1204,7 @@ causes an error.
See also [luaQ_checkqobject](#luaqcheckqobject)
-<a name="luaqoptqvariant"/>
+<a name="luaqoptqvariant"></a>
### luaQ_optqvariant&lt;TYPE&gt; ###
`TYPE luaQ_optqvariant&lt;TYPE&gt;(lua_State *L, int index, TYPE d = TYPE())`
@@ -1224,7 +1218,7 @@ causes an error.
See also [luaQ_checkqvariant](#luaqcheckqvariant)
-<a name="luaqpause"/>
+<a name="luaqpause"></a>
### luaQ_pause ###
`void luaQ_pause(lua_State *L)`
@@ -1236,7 +1230,7 @@ associated with signals are executed
whenever the signal occurs.
-<a name="luaqpcall"/>
+<a name="luaqpcall"></a>
### luaQ_pcall ###
`int luaQ_pcall(lua_State *L, int na, int nr, int eh, QObject *obj = 0)`
@@ -1255,7 +1249,7 @@ This function is the basis for all [thread hopping](#qt.qcall)
operations in the QtLua interface.
-<a name="luaqprint"/>
+<a name="luaqprint"></a>
### luaQ_print ###
`int luaQ_print(lua_State *L, int nr)`
@@ -1264,7 +1258,7 @@ Prints the `nr` top elements of the stack without
changing the stack in any respect.
-<a name="luaqpushmeta"/>
+<a name="luaqpushmeta"></a>
### luaQ_pushmeta ###
`void luaQ_pushmeta(lua_State *L, int type)`
@@ -1297,7 +1291,7 @@ a metatable for a Qt object class `TYPE`:
-<a name="luaqpushqt"/>
+<a name="luaqpushqt"></a>
### luaQ_pushqt ###
`void luaQ_pushqt(lua_State *L)`
@@ -1323,7 +1317,7 @@ should be set to `true` when calling function `luaQ_pushqt`
immediately after creating the C++ object.
-<a name="luaqregister"/>
+<a name="luaqregister"></a>
### luaQ_register ###
`void luaQ_register(lua_State *L, const luaL_Reg *l, QObject *obj)`
@@ -1342,7 +1336,7 @@ the thread associated with their first argument
which is assumed to be a Qt object.
-<a name="luaqtoqobject"/>
+<a name="luaqtoqobject"></a>
### luaQ_toqobject ###
`QObject* luaQ_toqobject(lua_State *L, int i, const QMetaObject *m = 0)`
@@ -1355,7 +1349,7 @@ inherit the class represented by the meta object `m`.
When `m` is null, all Qt objects are accepted.
-<a name="luaqtoqvariant"/>
+<a name="luaqtoqvariant"></a>
### luaQ_toqvariant ###
`QVariant luaQ_toqvariant(lua_State *L, int i, int type = 0)`
@@ -1367,7 +1361,7 @@ When the conversion is not possible, the function
returns a Qt variant of type `QVariant::Invalid`.
-<a name="luaqtraceback"/>
+<a name="luaqtraceback"></a>
### luaQ_traceback ###
`int luaQ_traceback(lua_State *L)`
diff --git a/packages/qtcore/doc/README.md b/doc/qtcore.md
index 1915740..017b6f2 100644
--- a/packages/qtcore/doc/README.md
+++ b/doc/qtcore.md
@@ -1,4 +1,4 @@
-<a name="qtcore.dok"/>
+<a name="qtcore.dok"></a>
# QtCore Bindings #
The package `qtcore`
@@ -7,13 +7,13 @@ contains bindings for classes defined by the Qt module
Besides the capabilites reported below,
all qt variants inherit a set
-of [default methods](..:qt:index#qt.QVariants),
+of [default methods](qt.md#qt.QVariants),
and all qt object classes inherit the capabilities from their
superclasses and automatically expose
-[properties, slots and signals](..:qt:index#qt.QObjects).
+[properties, slots and signals](qt.md#qt.QObjects).
-<a name="qbytearray"/>
+<a name="qbytearray"></a>
## qt.QByteArray ##
Class `qt.QByteArray` represents Qt values of type
@@ -22,35 +22,35 @@ These values are special because lua strings
are automatically converted to QByteArray objects
when such objects are needed.
-<a name="qbytearray"/>
+<a name="qbytearray"></a>
### qt.QByteArray(arg) ###
Expression `qt.QByteArray(arg)` returns a new byte array object.
Argument `arg` may be a lua string or a table containing
the integer values of the successive bytes.
-<a name="qbytearray.totable"/>
+<a name="qbytearray.totable"></a>
### qbytearray:totable() ###
Expression `qbytearray:totable()` returns a table
containing the integer values of the bytes represented
by the bytearray.
-<a name="qcoreapplication"/>
+<a name="qcoreapplication"></a>
## qt.QCoreApplication ##
The Qt class
[QCoreApplication](http://doc.trolltech.com/4.4/qcoreapplication.html)
provides an event loop for console Qt applications and serves
-as a base class for class [QApplication](..:qtgui:index#qapplication).
+as a base class for class [QApplication](qtgui.md#qapplication).
-<a name="qcoreapplication"/>
+<a name="qcoreapplication"></a>
### qt.QCoreApplication() ###
Returns the unique instance of class `QCoreApplication`.make i
-<a name="qline"/>
+<a name="qline"></a>
## qt.QLine, qt.QLineF ##
Classes `qt.QLine` and `qt.QLineF` represent common Qt classes.
@@ -59,9 +59,9 @@ Please refer to the Qt documentation for classes
and [QLineF](http://doc.trolltech.com/4.4/qlinef.html)
for details.
-<a name="qline"/>
+<a name="qline"></a>
### qt.QLine(table), qt.QLineF(table) ###
-<a name="qlineF"/>
+<a name="qlineF"></a>
Expression `qt.QLine(table)` or `qt.QLineF(table)`
constructs a new `qt.QLine` or `qt.QLineF` object
@@ -69,7 +69,7 @@ representing a segment whose endpoints coordinates
are given by fields `x1`, `y1`, `x2`, and `y2`
of table `table`.
-<a name="qline.totable"/>
+<a name="qline.totable"></a>
### qline:totable() ###
Expression `qline:totable()` returns a table whose fields
@@ -77,18 +77,18 @@ Expression `qline:totable()` returns a table whose fields
endpoints of the `qt.QLine` or `qt.QLineF` object `qline`.
-<a name="qobject"/>
+<a name="qobject"></a>
## qt.QObject ##
Qt class
[QObject](http://doc.trolltech.com/4.4/qobject.html).
-is the base class of all [Qt objects](..:qt:index#qt.QObjects).
+is the base class of all [Qt objects](qt.md#qt.QObjects).
All Qt object classes have separate metatables following the
same inheritance pattern as the corresponding Qt classes.
The metatable [qt.QObject](#qobject) sits at the top
of this hierarchy.
-<a name="qobject.children"/>
+<a name="qobject.children"></a>
### qobject:children() ###
Expression `qobject:children()`
@@ -96,7 +96,7 @@ returns a Qt value of class [qt.QVariantList](#qvariantlist)
containing all the children of object `qobject`.
-<a name="qobjectdeletelater"/>
+<a name="qobjectdeletelater"></a>
### qobject:deleteLater() ###
Calling `qobject:deleteLater()` is the recommended way to delete
@@ -105,7 +105,7 @@ The deletion occurs when the object thread is processing
interactive events.
-<a name="qobjectdumobjectinfo"/>
+<a name="qobjectdumobjectinfo"></a>
### qobject:dumpObjectInfo() ###
Function `qobject:dumpObjectInfo` prints a human readable
@@ -114,7 +114,7 @@ This function only works when Qt and QtLua are
compiled in debug mode.
-<a name="qobjectdumobjecttree"/>
+<a name="qobjectdumobjecttree"></a>
### qobject:dumpObjectTree() ###
Function `qobject:dumpObjectTree` prints a human readable
@@ -123,7 +123,7 @@ This function only works when Qt and QtLua are
compiled in debug mode.
-<a name="qobjectobjectname"/>
+<a name="qobjectobjectname"></a>
### qobject.objectName ###
Property `qobject.objectName` contains a string
@@ -137,15 +137,15 @@ The child object can be accessed using the Lua syntax `a.b`.
In case of name conflicts, property and methods have precedence
over named children.
-<a name="qobjectparent"/>
+<a name="qobjectparent"></a>
### qobject:parent() ###
Expression `qobject:parent()` returns the parent of object `qobject`
if such a parent exists. Otherwise it returns `nil`.
-<a name="qpoint"/>
+<a name="qpoint"></a>
## qt.QPoint, qt.QPointF ##
-<a name="qpointf"/>
+<a name="qpointf"></a>
Classes `qt.QPoint` and `qt.QPointF` represent common Qt classes.
Please refer to the Qt documentation for classes
@@ -153,25 +153,25 @@ Please refer to the Qt documentation for classes
and [QPointF](http://doc.trolltech.com/4.4/qpointf.html)
for details.
-<a name="qpoint"/>
+<a name="qpoint"></a>
### qt.QPoint(table), qt.QPointF(table) ###
-<a name="qpointf"/>
+<a name="qpointf"></a>
Expression `qt.QPoint(table)` or `qt.QPointF(table)`
returns a new `qt.QPoint` or `qt.QPointF` object
initialized with the contents of fields `x` and `y`
from table `table`.
-<a name="qpoint.totable"/>
+<a name="qpoint.totable"></a>
### qpoint:totable() ###
Expression `qpoint:totable()` returns a table whose fields `x` and `y`
contain the coordinates of the `qt.QPoint` or `qt.QPointF` object `qpoint`.
-<a name="qrect"/>
+<a name="qrect"></a>
## qt.QRect, qt.QRectF ##
-<a name="qrectf"/>
+<a name="qrectf"></a>
Classes `qt.QRect` and `qt.QRectF` represent common Qt classes.
Please refer to the Qt documentation for classes
@@ -179,9 +179,9 @@ Please refer to the Qt documentation for classes
and [QRectF](http://doc.trolltech.com/4.4/qrectf.html)
for details.
-<a name="qrect"/>
+<a name="qrect"></a>
### qt.QRect(table), qt.QRectF(table) ###
-<a name="qrectf"/>
+<a name="qrectf"></a>
Expression `qt.QRect(table)` or `qt.QRectF(table)`
returns a new `qt.QRect` or `qt.QRectF` object
@@ -190,7 +190,7 @@ specified by table fields `x` and `y`
and whose width and height are specified
by the table fields `width` and `height`.
-<a name="qrect.totable"/>
+<a name="qrect.totable"></a>
### qrect:totable() ###
Expression `qrect:totable()` returns a table
@@ -199,9 +199,9 @@ and whose fields `width` and `height` contain the width and
height of the rectangle.
-<a name="qsize"/>
+<a name="qsize"></a>
## qt.QSize, qt.QSizeF ##
-<a name="qsizef"/>
+<a name="qsizef"></a>
Classes `qt.QSize` and `qt.QSizeF` represent common Qt classes.
Please refer to the Qt documentation for classes
@@ -211,22 +211,22 @@ for details.
Example:
```lua
- require 'qtwidget'
- widget = qt.QWidget()
- widget.size = qt.QSize{width=320,height=200}
- widget:show()
+require 'qtwidget'
+widget = qt.QWidget()
+widget.size = qt.QSize{width=320,height=200}
+widget:show()
```
-<a name="qsize"/>
+<a name="qsize"></a>
### qt.QSize(table), qt.QSizeF(table) ###
-<a name="qsizef"/>
+<a name="qsizef"></a>
Expression `qt.QSize(table)` or `qt.QSizeF(table)`
returns a new `qt.QSize` or `qt.QSizeF` object
initialized with the contents of fields `width` and `height`
from table `table`.
-<a name="qsize.totable"/>
+<a name="qsize.totable"></a>
### qsize:totable() ###
Expression `qsize:totable()` returns a table whose
@@ -234,7 +234,7 @@ fields `width` and `height` are initialized with
the width and height of the size `qsize`.
-<a name="qstring"/>
+<a name="qstring"></a>
## qt.QString ##
Class `qt.QString` represents Qt values of type
@@ -243,7 +243,7 @@ These values are special because lua strings
are automatically converted to string objects
when such objects are needed.
-<a name="qstring"/>
+<a name="qstring"></a>
### qt.QString(arg) ###
Expression `qt.QString(arg)` returns a new string object.
@@ -251,21 +251,21 @@ Argument `arg` may be a lua string representing the string
in locale encoding or a table containing the unicode values
for the string characters.
-<a name="qstring.totable"/>
+<a name="qstring.totable"></a>
### qstring:totable() ###
Expression `qurl:totable()` returns a table
containing the integer values of the successive
unicode characters represented by the string.
-<a name="qstringlist"/>
+<a name="qstringlist"></a>
## qt.QStringList ##
Class `qt.QStringList` represents Qt values of type
[QStringList](http://doc.trolltech.com/4.4/qstringlist.html)
containing a list of Qt strings.
-<a name="qstringlist"/>
+<a name="qstringlist"></a>
### qt.QStringList(table) ###
Expression `qt.QStringList(table)` creates a new `QStringList`
@@ -276,11 +276,11 @@ an empty string list is returned.
Example
```lua
- require 'qt'
- a = qt.QStringList{"a","b","c"}
+require 'qt'
+a = qt.QStringList{"a","b","c"}
```
-<a name="qstringlist.totable"/>
+<a name="qstringlist.totable"></a>
### qstringlist:totable() ###
Expression `qstringlist:totable()` returns a Lua table
@@ -288,13 +288,13 @@ containing the elements of `qstringlist` starting at position `1`.
Example
```lua
- require 'qt'
- a = qt.QStringList{"a","b","c"}
- return a:totable()[2]
+require 'qt'
+a = qt.QStringList{"a","b","c"}
+return a:totable()[2]
```
-<a name="qtimer"/>
+<a name="qtimer"></a>
## qt.QTimer ##
Class `qt.QTimer` is a subclass of [qt.QObject](#qobject)
@@ -314,7 +314,7 @@ timer:start(2000) -- wait for 2 seconds...
```
-<a name="qtimer"/>
+<a name="qtimer"></a>
### qt.QTimer(parent) ###
Expression `qt.QTimer(parent)` returns a
@@ -327,20 +327,20 @@ and will be deleted by the Lua garbage collector
when it is no longer referenced.
-<a name="qurl"/>
+<a name="qurl"></a>
## qt.QUrl ##
Class `qt.QStringList` represents Qt values of type
[QUrl](http://doc.trolltech.com/4.4/qurl.html)
containing an URL.
-<a name="qurl"/>
+<a name="qurl"></a>
### qt.QUrl(string) ###
Expression `qt.QUrl(string)` returns a
QUrl object from string `string`.
-<a name="qurl.tostring"/>
+<a name="qurl.tostring"></a>
### qurl:tostring() ###
Expression `qurl:tostring()` returns a string
@@ -350,7 +350,7 @@ describing the QUrl object `qurl`.
Returns a file url associated with the file named s.
-<a name="qurl.tolocalfile"/>
+<a name="qurl.tolocalfile"></a>
### qurl:tolocalfile() ###
If the url describes a local file,
@@ -359,7 +359,7 @@ describing the local filename associated with the url.
Otherwise it returns nil.
-<a name="qvariantlist"/>
+<a name="qvariantlist"></a>
## qt.QVariantList ##
Class `qt.QVariantList` represents Qt values of type
@@ -367,7 +367,7 @@ Class `qt.QVariantList` represents Qt values of type
containing a list of values represented by class
[QVariant](http://doc.trolltech.com/4.4/qvariant.html).
-<a name="qvariantlist"/>
+<a name="qvariantlist"></a>
### qt.QVariantList(table) ###
Expression `qt.QVariantList(table)` creates a new `QVariantList`
@@ -378,11 +378,11 @@ an empty string list is returned.
Example
```lua
- require 'qt'
- a = qt.QVariantList{"a",32}
+require 'qt'
+a = qt.QVariantList{"a",32}
```
-<a name="qvariantlist.totable"/>
+<a name="qvariantlist.totable"></a>
### qvariantlist:totable() ###
Expression `qvariantlist:totable()` returns a Lua table
@@ -390,13 +390,13 @@ containing the elements of `qstringlist` starting at position `1`.
Example
```lua
- require 'qt'
- a = qt.QVariantList{"a",2,3,4}
- return a:totable()[2]
+require 'qt'
+a = qt.QVariantList{"a",2,3,4}
+return a:totable()[2]
```
-<a name="qvariantmap"/>
+<a name="qvariantmap"></a>
## qt.QVariantMap ##
Class `qt.QVariantList` represents Qt values of type
@@ -405,7 +405,7 @@ containing a dictionary of named values represented by class
[QVariant](http://doc.trolltech.com/4.4/qvariant.html).
-<a name="qvariantmap"/>
+<a name="qvariantmap"></a>
### qt.QVariantMap(table) ###
Expression `qt.QVariantMap(table)` creates a new `QVariantMap`
@@ -415,11 +415,11 @@ an empty map is returned.
Example
```lua
- require 'qt'
- a = qt.QVariantMap{a=23,b=45,c="foo"}
+require 'qt'
+a = qt.QVariantMap{a=23,b=45,c="foo"}
```
-<a name="qvariantmap.totable"/>
+<a name="qvariantmap.totable"></a>
### qvariantmap:totable() ###
Expression `qvariantmap:totable()` returns a Lua table
@@ -427,10 +427,10 @@ containing the contents of the dictonary `qvariantmap`.
Example
```lua
- require 'qt'
- a = qt.QVariantMap{a=23,b=45,c="foo"}
- t = a:totable()
- return t.c
+require 'qt'
+a = qt.QVariantMap{a=23,b=45,c="foo"}
+t = a:totable()
+return t.c
```
diff --git a/packages/qtgui/doc/README.md b/doc/qtgui.md
index 27feebd..9985c94 100644
--- a/packages/qtgui/doc/README.md
+++ b/doc/qtgui.md
@@ -1,4 +1,4 @@
-<a name="qtgui.dok"/>
+<a name="qtgui.dok"></a>
# QtGui Bindings #
The package `qtgui`
@@ -6,24 +6,24 @@ contains bindings for classes defined by the Qt module
[QtGui](http://doc.trolltech.com/4.4/qtcore.html).
Besides the capabilites reported below, all qt variants inherit a set
-of [default methods](..:qt:index#qt.QVariants), and all qt object
+of [default methods](qt.md#qt.QVariants), and all qt object
classes inherit the capabilities from their superclasses and
-automatically expose [[..:qt:index#qt.QObjects|properties, slots and
+automatically expose [[qt.md#qt.QObjects|properties, slots and
signals]].
-<a name="qaction"/>
+<a name="qaction"></a>
## qt.QAction, qt.QtLuaAction ##
-<a name="qtluaaction"/>
+<a name="qtluaaction"></a>
Qt class
[QAction](http://doc.trolltech.com/4.4/qaction.html)
-is a sublass of [qt.QObject](..:qtcore:index#qt.qobject)
+is a sublass of [qt.QObject](qtcore.md#qt.qobject)
that represents actions associated with menu items
and toolbar icons.
-<a name="qaction"/>
+<a name="qaction"></a>
### qt.QAction([arg]) ###
Expression `qt.QAction([arg])` returns a new `QAction` object.
@@ -36,7 +36,7 @@ of the qt action object.
Example:
```lua
- a === qt.QAction { text="Automatic Mode",
+a === qt.QAction { text="Automatic Mode",
checkable === true, checked === false,
function(b) setAutoMode(b) end }
```
@@ -47,20 +47,20 @@ destroyed when the garbage collector determines that
it is no longer referenced.
Actions are always created from the main thread using
-the [thread hopping](..:qt:index#qt.qcall) mechanism.
+the [thread hopping](qt.md#qt.qcall) mechanism.
-<a name="qaction.menu"/>
+<a name="qaction.menu"></a>
### qaction:menu() ###
Same as the C++ function `QAction::menu()`.
-<a name="qaction.setmenu"/>
+<a name="qaction.setmenu"></a>
### qaction:setMenu() ###
Same as the C++ function `QAction::setMenu()`.
-<a name="qtluaaction"/>
+<a name="qtluaaction"></a>
### qt.QtLuaAction([arg]) ###
This constructor takes the same arguments as `qt.QAction`
@@ -74,7 +74,7 @@ functions connected to Qt signals.
Otherwise the action is disabled regardless
of the value of property `enabled`.
-<a name="qtluaaction.autodisable"/>
+<a name="qtluaaction.autodisable"></a>
### qtluaaction.autoDisable ###
This property applies only to action objects of class `qt.QtLuaAction`.
@@ -83,43 +83,43 @@ when the Lua engine is not available.
The default is `true`.
-<a name="qapplication"/>
+<a name="qapplication"></a>
## qt.QApplication ##
Qt class [QApplication](http://doc.trolltech.com/4.4/qapplication.html)
manages the GUI application's control flow and main settings. This is a
-subclass of [QCoreApplication](..:qtcore:index#qcoreapplication).
+subclass of [QCoreApplication](qtcore.md#qcoreapplication).
-<a name="qapplication.changeOverrideCursor"/>
+<a name="qapplication.changeOverrideCursor"></a>
### qt.QApplication.changeOverrideCursor(qcursor) ###
Changes the currently active application override cursor to cursor
without disturbing the cursor stack. This function has no
effect if `setOverrideCursor()` was not called.
-<a name="qapplication.keyboardModifiers"/>
+<a name="qapplication.keyboardModifiers"></a>
### qt.QApplication.keyboardModifiers() ###
Returns a string describing the currently depressed keyboard modifiers.
-<a name="qapplication.mouseButtons"/>
+<a name="qapplication.mouseButtons"></a>
### qt.QApplication.mouseButtons() ###
Returns a string describing the currently depressed mouse buttons.
-<a name="qapplication.overrideCursor"/>
+<a name="qapplication.overrideCursor"></a>
### qt.QApplication.overrideCursor() ###
Returns the active application override cursor.
This function returns `nil` if no application cursor
has been defined (i.e. the internal cursor stack is empty).
-<a name="qapplication.restoreOverrideCursor"/>
+<a name="qapplication.restoreOverrideCursor"></a>
### qt.QApplication.restoreOverrideCursor() ###
Undoes the last `setOverrideCursor()`.
-<a name="qapplication.setoverridecursor"/>
+<a name="qapplication.setoverridecursor"></a>
### qt.QApplication.setOverrideCursor(qcursor) ###
Sets the application override cursor to `qcursor`.
@@ -129,7 +129,7 @@ Override cursors are stored on a stack. Function `setOverrideCursor()` pushes a
Function `restoreOverrideCursor()` pops the stack.
-<a name="qbrush"/>
+<a name="qbrush"></a>
## qt.QBrush ##
Qt class
@@ -139,26 +139,22 @@ are filled and how text is rendered. Brushes are represented
by Qt variants of class `qt.QBrush`.
-<a name="qbrush"/>
+<a name="qbrush"></a>
### qt.QBrush(table) ###
-<a name="qbrushfromtable"/>
+<a name="qbrushfromtable"></a>
Expression `qt.QBrush(table)` returns a brush whose settings
are determined by the fields of table `table`.
The following fields are recognized:
* Field `color` contains a [qt.QColor](#qcolor) value representing the brush color.
-
* Field `texture` contains a [qt.QImage](#qimage) value representing the brush texture.
-
* Field `gradient` contains a [qt.QGradient](#qgradient) value representing a color gradient.
-
* Field `transform` contains a `qt.QTransform` value that defines a additional transformation applied to the brush before painting it into the current coordinate system.
-
* Field `style` contains the name of the [brush style](http://doc.trolltech.com/4.4/qt.html#BrushStyle-enum). The default brush style is `SolidPatter` when field `color` is defined, `TexturePattern` when field `texture` is defined, or one of the gradient styles when field `gradient` is defined. Otherwise the default style is `NoBrush` meaning that nothing is painted.
-<a name="qbrush.totable"/>
+<a name="qbrush.totable"></a>
### qbrush:totable() ###
Expression `qbrush:totable()` returns a table describing the brush.
@@ -166,7 +162,7 @@ See the documentation of [qt.QBrush(table)](#qbrushfromtable)
for a description of the table fields.
-<a name="qcolor"/>
+<a name="qcolor"></a>
## qt.QColor ##
Qt class
@@ -178,7 +174,7 @@ hexadecimal digits representing the intensities of the
color components.
-<a name="qcolor"/>
+<a name="qcolor"></a>
### qt.QColor(...) ###
There are several ways to construct a Qt variant of class `qt.QColor`.
@@ -205,9 +201,9 @@ contain numbers in range `[0,1]` representing the intensities
of the red, green, blue, and alpha channels. Such a table
is returned by function [qcolor:totable()](#qcolortotable).
-<a name="qcolor.totable"/>
+<a name="qcolor.totable"></a>
### qcolor:totable() ###
-<a name="qcolortotable"/>
+<a name="qcolortotable"></a>
Expression `qcolor:totable()` returns a table whose fields
`r`, `g`, `b` and `a` contain numbers in range `[0,1]`
@@ -215,7 +211,7 @@ representing the intensities of the red, green, blue,
and alpha channels.
-<a name="qcolordialog"/>
+<a name="qcolordialog"></a>
## qt.QColorDialog ##
Qt class
@@ -223,7 +219,7 @@ Qt class
implements a dialog for selecting colors.
The recommended way to use this class is the static function `getColor`.
-<a name="qcolordialog.getcolor"/>
+<a name="qcolordialog.getcolor"></a>
### qt.QColorDialog.getColor([font],[parent]) ###
Pops up a dialog for selecting a color.
@@ -232,64 +228,64 @@ Argument `parent` is the parent widget.
This function returns `nil` if the no color was selected.
Otherwise it returns a qvariant of type [qt.QColor](#qcolor).
-<a name="qcursor"/>
+<a name="qcursor"></a>
## qt.QCursor ##
Qt class
[QCursor](http://doc.trolltech.com/4.4/qcursor.html)
provides a mouse cursor with an arbitrary shape.
-<a name="qcursor"/>
+<a name="qcursor"></a>
### qt.QCursor(cursorshape) ###
Returns a standard cursor.
Argument `cursorshape` is the name of a
[standard shape](http://doc.trolltech.com/4.4/qt.html#CursorShape-enum).
-<a name="qcursor"/>
+<a name="qcursor"></a>
### qt.QCursor(image,[mask],[posx,[posy]) ###
Constructs a cursor with the specified image, mask and hot spot.
-<a name="qcursor.hotSpot"/>
+<a name="qcursor.hotSpot"></a>
### qcursor:hotSpot() ###
Return a `qt.QPoint` with the cursor's hot spot coordinates.
-<a name="qcursor.mask"/>
+<a name="qcursor.mask"></a>
### qcursor:mask() ###
Return the cursor's mask.
-<a name="qcursor.pixmap"/>
+<a name="qcursor.pixmap"></a>
### qcursor:pixmap() ###
Return the cursor's pixmap.
-<a name="qcursor.shape"/>
+<a name="qcursor.shape"></a>
### qcursor:shape() ###
Return the name of the cursor's
[standard shape](http://doc.trolltech.com/4.4/qt.html#CursorShape-enum).
-<a name="qcursor.pos"/>
+<a name="qcursor.pos"></a>
### qt.QCursor.pos() ###
Returns a `QPoint` with the global coordinates of the mouse cursor.
-<a name="qcursor.setPos"/>
+<a name="qcursor.setPos"></a>
### qt.QCursor.setPos(qpoint) ###
Sets the global coordinates of the mouse cursor.
-<a name="qdialog"/>
+<a name="qdialog"></a>
## qt.QDialog ##
Qt class
[QDialog](http://doc.trolltech.com/4.4/qdialog.html)
is the base class of dialog windows.
-<a name="qdialog"/>
+<a name="qdialog"></a>
### qt.QDialog([parent]) ###
Expression `qt.QDialog(parent)` returns a new `QDialog` instance.
@@ -299,14 +295,14 @@ the new widget is owned by the Lua interpreter
and is automatically destroyed when the garbage collector
determines that it is no longer referenced.
-<a name="qdialog.result"/>
+<a name="qdialog.result"></a>
### qdialog:result() ###
Gets the dialog's result code as an integer.
This is usually `1` when the dialog has been accepted
and `0` when the dialog has been rejected.
-<a name="qdialog.setresult"/>
+<a name="qdialog.setresult"></a>
### qdialog:setResult(integer) ###
Sets the dialog's result code.
@@ -314,7 +310,7 @@ This is usually `1` when the dialog has been accepted
and `0` when the dialog has been rejected.
-<a name="qfiledialog"/>
+<a name="qfiledialog"></a>
## qt.QFileDialog ##
Qt class
@@ -322,23 +318,25 @@ Qt class
provides a dialog that allow users to select files or directories.
This is a subclass of [qt.QDialog](#qdialog).
-<a name="qfiledialog.getExistingDirectory"/>
+<a name="qfiledialog.getExistingDirectory"></a>
### qt.QFileDialog.getExistingDirectory([p.[c,[d,[opt]]]]) ###
This convenience function shows a file dialog
for selecting an existing directory.
-Argument `p` is the parent widget.
-Argument `c` is the dialog caption.
-Argument `d` is the initial directory shown in the dialog.
-Argument `opt` are the [file dialog options](http://doc.trolltech.com/4.4/qfiledialog.html#Option-enum).
+
+ * Argument `p` is the parent widget.
+ * Argument `c` is the dialog caption.
+ * Argument `d` is the initial directory shown in the dialog.
+ * Argument `opt` are the [file dialog options](http://doc.trolltech.com/4.4/qfiledialog.html#Option-enum).
The function returns a `qt.QString` containing the selected directory name.
-<a name="qfiledialog.getOpenFileName"/>
+<a name="qfiledialog.getOpenFileName"></a>
### qt.QFileDialog.getOpenFileName([p,[c,[d,[f,[s,[opt]]]]]]) ###
This convenience function shows a file dialog
for selecting an existing file.
+
* Argument `p` is the parent widget.
* Argument `c` is the dialog caption.
* Argument `d` is the initial directory shown in the dialog.
@@ -349,11 +347,12 @@ for selecting an existing file.
The function returns a `qt.QString` containing the selected file name
and a `qt.QString` contaning the selected filter.
-<a name="qfiledialog.getOpenFileNames"/>
+<a name="qfiledialog.getOpenFileNames"></a>
### qt.QFileDialog.getOpenFileNames([p,[c,[d,[f,[s,[opt]]]]]]) ###
This convenience function shows a file dialog
for selecting multiple existing files.
+
* Argument `p` is the parent widget.
* Argument `c` is the dialog caption.
* Argument `d` is the initial directory shown in the dialog.
@@ -364,11 +363,12 @@ for selecting multiple existing files.
The function returns a `qt.QStringList` containing the file names
and a `qt.QString` contaning the selected filter.
-<a name="qfiledialog.getsavefilename"/>
+<a name="qfiledialog.getsavefilename"></a>
### qt.QFileDialog.getSaveFileName([p,[c,[d,[f,[s,[opt]]]]]]) ###
This convenience function shows a file dialog
for selecting a file name for saving data.
+
* Argument `p` is the parent widget.
* Argument `c` is the dialog caption.
* Argument `d` is the initial directory shown in the dialog.
@@ -379,10 +379,11 @@ for selecting a file name for saving data.
The function returns a `qt.QString` containing the selected file name
and a `qt.QString` contaning the selected filter.
-<a name="qfiledialog.new"/>
+<a name="qfiledialog.new"></a>
### qt.QFileDialog.new([parent.[caption,[dir,[filters]]]]) ###
Function `qt.QFileDialog.new` returns a new file dialog object.
+
* Argument `parent` is the parent widget
* Argument `caption` is the dialog caption.
* Argument `dir` is the initial directory shown in the dialog.
@@ -393,37 +394,37 @@ the new widget is owned by the Lua interpreter
and is automatically destroyed when the garbage collector
determines that it is no longer referenced.
-<a name="qfiledialog.directory"/>
+<a name="qfiledialog.directory"></a>
### qfiledialog:directory() ###
Returns a `qt.QString` containing the path of the selected directory.
-<a name="qfiledialog.nameFilters"/>
+<a name="qfiledialog.nameFilters"></a>
### qfiledialog:nameFilters() ###
Returns a `qt.QStringList` containing the name filters.
-<a name="qfiledialog.selectedFiles"/>
+<a name="qfiledialog.selectedFiles"></a>
### qfiledialog:selectedFiles() ###
Returns a `qt.QStringList` containing the selected files.
-<a name="qfiledialog.selectFile"/>
+<a name="qfiledialog.selectFile"></a>
### qfiledialog:selectFile(fname) ###
Select file `fname` in the file dialog.
-<a name="qfiledialog.selectNameFilter"/>
+<a name="qfiledialog.selectNameFilter"></a>
### qfiledialog:selectNameFilter(filter) ###
Select name filter `filter` in the file dialog.
-<a name="qfiledialog.setDirectory"/>
+<a name="qfiledialog.setDirectory"></a>
### qfiledialog:setDirectory(dirname) ###
Set the file dialog directory to `dirname`.
-<a name="qfiledialog.setNameFilters"/>
+<a name="qfiledialog.setNameFilters"></a>
### qfiledialog:setNameFilters(filters) ###
Set the file dialog name filters to `filters`.
@@ -431,7 +432,7 @@ Argument `filters` may be a `qt.QStringList`
or a string containing the filters separated by
two semicolons `";;"`.
-<a name="qfiledialog.setOption"/>
+<a name="qfiledialog.setOption"></a>
### qfiledialog:setOption(option, bool) ###
Sets the specified
@@ -444,7 +445,7 @@ Returns the value of the specified
[file dialog option](http://doc.trolltech.com/4.5/qfiledialog.html#Option-enum).
Not available before Qt-4.5.
-<a name="qfont"/>
+<a name="qfont"></a>
## qt.QFont ##
Qt class
@@ -453,9 +454,9 @@ represents the painter settings that determine the font(s)
used to display text.
-<a name="qfont"/>
+<a name="qfont"></a>
### qt.QFont(arg) ###
-<a name="qfontfromtable"/>
+<a name="qfontfromtable"></a>
Expression `qt.QFont(arg)` returns a new font object.
Argument `arg` may be a string previously returned
@@ -464,47 +465,34 @@ a table whose fields specify the desired font characteristics.
The following fields are recognized, listed in order of priority:
* String field `family` may contain a comma separated list of the desired font families.
-
* Setting boolean field `sans` to `true` indicates a preference for sans serif font families such as "Helvetica". This is more portable than specifying a family.
-
* Setting boolean field `serif` to `true` indicates a preference for serif font families such as "Times". This is more portable than specifying a family.
-
* Setting boolean field `typewriter` to `true` indicates a preference for a fixed width font families such as "Courier". This is more portable than specifying a family.
-
* Numerical field `size` specify the desired size of the font. The default size is 10 points.
-
* Numerical fields `pixelSize` and `pointSize` also indicates the desired size of the font. Field `pixelSize` is an alias for `size`. Field `pointSize` includes a correction factor corresponding to the actual resolution of the target device. When both are precised, `pointSize` takes precedence.
-
* Numerical field `weight` defines the weight of the font. Weight 50 corresponds to a normal font and weight 75 corresponds to a bold font.
-
* Numerical field `stretch` is a percentage applied to the width of all characters. Value 100 corresponds to a normal width. Value 150 increases all width by 50 percent.
-
* Setting boolean field `bold` to `true` requests a bold font if the selected font family defines a bold variant.
-
* Setting boolean field `italic` to `true` requests and italic font if the selected font family defines an italic or oblique variant.
-
* Setting boolean field `fixedPitch` to `true` requests a fixed pitch font if the selected font family defines such a variant (rare).
-
* Setting boolean field `underline` to `true` draws a line below all the character at a font-specified position.
-
* Setting boolean field `overline` to `true` draws a line above all the character at a font-specified position.
-
* Setting boolean field `strikeOut` to `true` draws a line that crosses the character at a font-specified position.
Example:
```lua
- require 'qtwidget'
- w=qtwidget.newwindow(300,300)
- w:moveto(20,20)
- w:setfont(qt.QFont{serif=true,size=12,italic=true})
- w:show("foo")
- w:setfont(qt.QFont{serif=true,size=12,italic=true,underline=true})
- w:setcolor("blue")
- w:show("bar")
+require 'qtwidget'
+w=qtwidget.newwindow(300,300)
+w:moveto(20,20)
+w:setfont(qt.QFont{serif=true,size=12,italic=true})
+w:show("foo")
+w:setfont(qt.QFont{serif=true,size=12,italic=true,underline=true})
+w:setcolor("blue")
+w:show("bar")
```
-<a name="qfont.totable"/>
+<a name="qfont.totable"></a>
### qfont:totable() ###
Expression `qfont:totable()` returns a table
@@ -513,14 +501,14 @@ All the supported fields are populated.
Example:
```lua
- require 'qtwidget'
- f=qt.QFont{serif=true,size=12,bold=true}
- for k,v in pairs(f:totable()) do print(k,v) end
+require 'qtwidget'
+f=qt.QFont{serif=true,size=12,bold=true}
+for k,v in pairs(f:totable()) do print(k,v) end
```
-<a name="qfonttostring"/>
+<a name="qfonttostring"></a>
### qfont:tostring() ###
-<a name="qfont.tostring"/>
+<a name="qfont.tostring"></a>
Expression `qfont:tostring()` returns a string
representation of the font settings that is
@@ -528,9 +516,9 @@ suitable for storing in configuration files for instance.
Use [qt.QFont(string)](#qfontfromtable) to
reconstruct the corresponding font object.
-<a name="qfontinfo"/>
+<a name="qfontinfo"></a>
### qfont:info() ###
-<a name="qfont.info"/>
+<a name="qfont.info"></a>
Expression `qfont:info()` returns a table describing
the actual font selected by the font matching algorithm
@@ -543,7 +531,7 @@ This is achieved using the Qt class
Fields `"underline"`, `"overline"`, `"strikeOut"`, and `"stretch"`
are copied verbatim from the `qfont` object.
-<a name="qfontdialog"/>
+<a name="qfontdialog"></a>
## qt.QFontDialog ##
Qt class
@@ -551,7 +539,7 @@ Qt class
implements a dialog for selecting fonts.
The recommended way to use this class is the static function `getFont`.
-<a name="qfontdialog.getfont"/>
+<a name="qfontdialog.getfont"></a>
### qt.QFontDialog.getFont([font],[parent, [caption]]) ###
Pops up a dialog for selecting a font.
@@ -563,7 +551,7 @@ This function returns `nil` if the no font was selected.
Otherwise it returns a qvariant of type [qt.QFont](#qfont).
-<a name="qgradient"/>
+<a name="qgradient"></a>
## qt.QGradient ##
Qt class
@@ -572,14 +560,14 @@ represents a color gradient for use in [gradient brushes](#qbrush).
No specific Lua methods have been defined for this Qt variant class.
-<a name="qicon"/>
+<a name="qicon"></a>
## qt.QIcon ##
Qt class
[QIcon](http://doc.trolltech.com/4.4/qimage.html)
provides scalable icons in different modes and states.
-<a name="qicon"/>
+<a name="qicon"></a>
### qt.QIcon([arg]) ###
Returns a new icon.
@@ -590,7 +578,7 @@ Alternatively, argument `arg` may be a
file name that will be loaded on demand.
-<a name="qimage"/>
+<a name="qimage"></a>
## qt.QImage ##
Qt class
@@ -599,7 +587,7 @@ represents a device independent off-screen image.
Such images are represented in Lua
as Qt variants of class `qt.QImage`.
-<a name="qimage"/>
+<a name="qimage"></a>
### qt.QImage(...) ###
There are several ways to construct a Qt variant of class `qt.QImage`.
@@ -618,21 +606,21 @@ The [file format](#qimageformats) is determined
by the optional string `format` or by the file name extension.
-<a name="qimage.depth"/>
+<a name="qimage.depth"></a>
### qimage:depth() ###
Expression `qimage:depth()` returns the depth of the image `qimage`.
A depth of 1 indicates a bitonal image.
A depth of 24 or 32 indicates a true color image.
-<a name="qimage.rect"/>
+<a name="qimage.rect"></a>
### qimage:rect() ###
Expression `qimage:rect()` returns a Qt variant of class
-[qt.QRect](..:qtcore:index#qrect) representing the
+[qt.QRect](qtcore.md#qrect) representing the
boundaries of the image `qimage`.
-<a name="qimage.save"/>
+<a name="qimage.save"></a>
### qimage:save(f,[format]) ###
Expression `qimage:save(f,format)` saves the image data into file `f`.
@@ -640,16 +628,16 @@ Argument `f` can be a file name or a Lua file descriptor.
The [file format](#qimageformats) is determined by the
optional string `format` or by the file name extension.
-<a name="qimage.size"/>
+<a name="qimage.size"></a>
### qimage:size() ###
Expression `qimage:size()` returns a Qt variant of class
-[qt.QSize](..:qtcore:index#qsize) representing the
+[qt.QSize](qtcore.md#qsize) representing the
size of the image `qimage`.
-<a name="qimage.formats"/>
+<a name="qimage.formats"></a>
### qt.QImage.formats([string]) ###
-<a name="qimageformats"/>
+<a name="qimageformats"></a>
Function `qt.QImage.formats` describes the
supported formats for reading or saving files.
@@ -663,14 +651,14 @@ returns a `qt.QStringList` with the supported formats.
-<a name="qkeysequence"/>
+<a name="qkeysequence"></a>
## qt.QKeySequence ##
Qt class
[QKeySequence](http://doc.trolltech.com/4.4/qkeysequence.html)
encapsulates a key sequence as used by shortcuts.
-<a name="qkeysequence"/>
+<a name="qkeysequence"></a>
### qt.QKeySequence(string) ###
Returns a Qt value of class `qt.QKeySequence`
@@ -678,13 +666,13 @@ associated with the key combination described in string `string`.
Up to four key codes may be entered by separating
them with commas, e.g. `"Alt+V,Ctrl+Down,A,Shift+Home"`.
-<a name="qkeysequence.tostring"/>
+<a name="qkeysequence.tostring"></a>
### qkeysequence:tostring() ###
Returns a string describing the keys in the key sequence.
-<a name="qmainwindow"/>
+<a name="qmainwindow"></a>
## qt.QMainWindow ##
Qt class
@@ -692,7 +680,7 @@ Qt class
provides a main application window with menu, statusbar, toolbars
and dockable widgets. This is a subclass of [QWidget](#qwidget).
-<a name="qmainwindow"/>
+<a name="qmainwindow"></a>
### qt.QMainWindow([parent]) ###
Expression `qt.QMainWindow(parent)` returns a new `QMainWindow` instance.
@@ -702,41 +690,41 @@ the new widget is owned by the Lua interpreter
and is automatically destroyed when the garbage collector
determines that it is no longer referenced.
-<a name="qmainwindow.centralWidget"/>
+<a name="qmainwindow.centralWidget"></a>
### qmainwindow:centralWidget() ###
Expression `qmainwindow:centralWidget()` returns the
central widget managed by the main window.
-<a name="qmainwindow.menuBar"/>
+<a name="qmainwindow.menuBar"></a>
### qmainwindow:menuBar() ###
Returns the main window's menu bar.
This function creates and returns an empty menu bar
if the menu bar does not exist yet.
-<a name="qmainwindow.setcentralwidget"/>
+<a name="qmainwindow.setcentralwidget"></a>
### qmainwindow:setCentralWidget(qwidget) ###
Sets the widget `qwidget` to be the main window's central widget.
The main window takes ownership of the widget pointer and
deletes it at the appropriate time.
-<a name="qmainwindow.setmenubar"/>
+<a name="qmainwindow.setmenubar"></a>
### qmainwindow:setMenuBar(qmenubar) ###
Sets the menu bar for the main window to `qmenubar`.
The main window takes ownership of the menu bar and
deletes it at the appropriate time.
-<a name="qmainwindow.setstatusbar"/>
+<a name="qmainwindow.setstatusbar"></a>
### qmainwindow:setStatusBar(qstatusbar) ###
Sets the status bar for the main window to `qstatusbar`.
The main window takes ownership of the status bar and
deletes it at the appropriate time.
-<a name="qmainwindow.statusBar"/>
+<a name="qmainwindow.statusBar"></a>
### qmainwindow:statusBar() ###
Returns the main window's status bar.
@@ -744,7 +732,7 @@ This function creates and returns an empty status bar
if the status bar does not exist yet.
-<a name="qmenu"/>
+<a name="qmenu"></a>
## qt.QMenu ##
Qt class
@@ -764,7 +752,7 @@ Function `qmenu:addLuaAction` provides a more convenient way
to create menu items bound to specific lua functions.
See [qt.QMenuBar](#qmenubar) for an example.
-<a name="qmenu.addLuaAction"/>
+<a name="qmenu.addLuaAction"></a>
### qmenu:addLuaAction([icon,]text[,keys[,statustip]][,function]) ###
Creates a new [QtLuaAction](#qaction) owned by the menu
@@ -779,33 +767,33 @@ Finally argument `function` is a Lua function that is
connected to the action signal `triggered(bool)` and
therefore is called when the menu item is selected.
-<a name="qmenu.addMenu"/>
+<a name="qmenu.addMenu"></a>
### qmenu:addMenu(newqmenu) ###
Adds the menu `newqmenu` as a submenu of the menu `qmenu`
and returns the corresponding action object.
-<a name="qmenu.addMenu"/>
+<a name="qmenu.addMenu"></a>
### qmenu:addMenu([icon,] text) ###
Creates a new submenu with the specified `icon` and `text`
and adds it into the menu `qmenu`. This function returns
the new menu as an object of class `qt.QMenu`.
-<a name="qmenu.addSeparator"/>
+<a name="qmenu.addSeparator"></a>
### qmenu:addSeparator() ###
Adds a separator into the menu
and returns the corresponding action object.
-<a name="qmenu.clear"/>
+<a name="qmenu.clear"></a>
### qmenu:clear() ###
Removes all the menu items.
Actions owned by the menu and not shown
in any other widget are deleted.
-<a name="qmenu.exec"/>
+<a name="qmenu.exec"></a>
### qmenu:exec([qpoint[, defaultqaction]]) ###
Pops up the menu `qmenu` at position `qpoint` and returns
@@ -820,7 +808,7 @@ are automatically disabled while Lua is running.
Therefore such actions cannot be used with
`qmenu:exec` because they would all be disabled.
-<a name="qmenu.insertMenu"/>
+<a name="qmenu.insertMenu"></a>
### qmenu:insertMenu(beforeqaction, newqmenu) ###
Inserts the menu `newqmenu` as a submenu into the menu `qmenu`
@@ -828,18 +816,18 @@ and returns the corresponding action object.
The submenu is inserted before action `beforeqaction`
or is appended when `beforeqaction` is null or invalid for this widget.
-<a name="qmenu.insertSeparator"/>
+<a name="qmenu.insertSeparator"></a>
### qmenu:insertSeparator(beforeqaction) ###
Inserts a new separator before action `beforeqaction`
and returns the corresponding action object.
-<a name="qmenu.menuAction"/>
+<a name="qmenu.menuAction"></a>
### qmenu:menuAction() ###
Returns the action associated with the menu `qmenu`.
-<a name="qmenubar"/>
+<a name="qmenubar"></a>
## qt,QMenuBar ##
Qt class
@@ -849,40 +837,40 @@ This is a subclass of [qt.QWidget](#qwidget).
Example:
```lua
- w === qt.QMainWindow()
- w:setCentralWidget(...) -- do something smart here
- menubar === w:menuBar()
- filemenu === menubar:addMenu("&File")
- filemenu:addLuaAction("&Open", "Ctrl+O", function() doOpen(w) end)
- filemenu:addLuaAction("&Close", "Ctrl+W", function() w:close() end)
- editmenu === menubar:addMenu("&Edit")
- editmenu:addLuaAction("&Cu&t", "Ctrl+X", function() doCut(w) end)
- editmenu:addLuaAction("&Copy", "Ctrl+C", function() doCopy(w) end)
- editmenu:addLuaAction("&Paste", "Ctrl+V", function() doPaste(w) end)
- w:show()
+w === qt.QMainWindow()
+w:setCentralWidget(...) -- do something smart here
+menubar === w:menuBar()
+filemenu === menubar:addMenu("&File")
+filemenu:addLuaAction("&Open", "Ctrl+O", function() doOpen(w) end)
+filemenu:addLuaAction("&Close", "Ctrl+W", function() w:close() end)
+editmenu === menubar:addMenu("&Edit")
+editmenu:addLuaAction("&Cu&t", "Ctrl+X", function() doCut(w) end)
+editmenu:addLuaAction("&Copy", "Ctrl+C", function() doCopy(w) end)
+editmenu:addLuaAction("&Paste", "Ctrl+V", function() doPaste(w) end)
+w:show()
```
-<a name="qmenubar.addMenu"/>
+<a name="qmenubar.addMenu"></a>
### qmenubar:addMenu(qmenu) ###
Adds the menu `qmenu` as a menu of the menubar `qmenubar`
and returns the corresponding action object.
-<a name="qmenubar.addMenu"/>
+<a name="qmenubar.addMenu"></a>
### qmenubar:addMenu([icon,] text) ###
Creates a new menu with the specified `icon` and `text`
and adds it into the menubar `qmenubar`. This function returns
the new menu as an object of class `qt.QMenu`.
-<a name="qmenubar.clear"/>
+<a name="qmenubar.clear"></a>
### qmenubar:clear() ###
Removes all the menus and actions from the menu bar.
Actions owned by the menu and not shown
in any other widget are deleted.
-<a name="qmenubar.insertMenu"/>
+<a name="qmenubar.insertMenu"></a>
### qmenubar:insertMenu(beforeqaction, qmenu) ###
Inserts the menu `qmenu` into the menu bar `qmenubar`
@@ -890,24 +878,24 @@ and returns the corresponding action object.
The submenu is inserted before action `beforeqaction`
or is appended when `beforeqaction` is null or invalid for this widget.
-<a name="qmenubar.insertSeparator"/>
+<a name="qmenubar.insertSeparator"></a>
### qmenubar:insertSeparator(beforeqaction) ###
Inserts a new separator before action `beforeqaction`
and returns the corresponding action object.
-<a name="qpainterpath"/>
+<a name="qpainterpath"></a>
## qt.QPainterPath ##
Qt class
[QPainterPath](http://doc.trolltech.com/4.4/qpainterpath.html)
represents mathematical boundaries delimiting
-regions that can be painted using [painter:fill](..:qtwidget:index#painterfill)
-or delimited using [painter:stroke](..:qtwidget:index#painterstroke).
+regions that can be painted using [painter:fill](qtwidget.md#painterfill)
+or delimited using [painter:stroke](qtwidget.md#painterstroke).
No specific Lua methods have been defined for this Qt variant class.
-<a name="qpixmap"/>
+<a name="qpixmap"></a>
## qt.QPixmap ##
Qt class
@@ -916,7 +904,7 @@ represents a server-side image containing device-dependent data.
No specific Lua methods have been defined for this Qt variant class.
-<a name="qpen"/>
+<a name="qpen"></a>
## qt.QPen ##
Qt class
@@ -924,34 +912,26 @@ Qt class
represents the painter settings that determine how
lines are drawn.
-<a name="qpen"/>
+<a name="qpen"></a>
### qt.QPen(table) ###
-<a name="qpenfromtable"/>
+<a name="qpenfromtable"></a>
Expression `qt.QPen(table)` returns a pen whose settings
are determined by the fields of table `table`.
The following fields are recognized:
* Field `style` specifies the name of the [pen style](http://doc.trolltech.com/4.4/qt.html#PenStyle-enum). The default style is `SolidLine`.
-
* Field `brush` contains a `qt.QBrush` value that defines the appearance of the painted areas.
-
* Field `color` contains a `qt.QColor` value for the brush color. Setting this field is equivalent to setting field `brush` with a solid brush of the specified color. Field `brush` has precedence over this field.
-
* Numerical field `width` contains the desired line width. A line width of zero indicates a cosmetic pen. This means that the pen width is always drawn one pixel wide, independent of the transformation on the painter.
-
* Setting boolean field `cosmetic` to `true` indicates that the pen width has a constant width regardless of the transformation on the painter.
-
* Field `style` specifies the name of the [pen style](http://doc.trolltech.com/4.4/qt.html#PenStyle-enum) which determines
-
* Field `joinStyle` specifies the name of the [pen join style](http://doc.trolltech.com/4.4/qt.html#PenJoinStyle-enum) which determines how lines meet with different angles. The default join style is `BevelJoin`.
-
* Field `capStyle` specifies the name of the [pen cap style](http://doc.trolltech.com/4.4/qt.html#PenCapStyle-enum) which determines how lines end are drawn. The default cap style is `SquareCap`.
-
* Numerical field `miterLimit` determines how far a [miter join](http://doc.trolltech.com/4.4/qpen.html#setMiterLimit) can extend from the join point. This is used to reduce artifacts between line joins where the lines are close to parallel.
-<a name="qpen.totable"/>
+<a name="qpen.totable"></a>
### qpen:totable() ###
Expression `qpen:totable()` returns a table describing the pen.
@@ -959,7 +939,7 @@ See the documentation of [qt.QPen(table)](#qpenfromtable)
for a description of the table fields.
-<a name="qtransform"/>
+<a name="qtransform"></a>
## qt.QTransform ##
Qt class
@@ -968,9 +948,9 @@ represents a 2D transformation of a coordinate system.
Transformation matrices are represented as Qt variants
of class `qt.QTransform`.
-<a name="qtransform"/>
+<a name="qtransform"></a>
### qt.QTransform([table[,table]]) ###
-<a name="qtransformfromtable"/>
+<a name="qtransformfromtable"></a>
Expression `qt.QTransform()` constructs an identity transformation matrix.
@@ -981,22 +961,22 @@ whose matrix elements are initialized with the fields `m11`, `m12`, `m13`,
Expression `qt.QTransform(fquad,tquad)` constructs a transformation matrix
that maps the quad `fquad` to the quad `tquad`.
Both arguments `fquad` and `tquad` are table containing exactly four
-[qt.QPointF](..:qtcore:index#qpoint) representing the four corners of the quad.
+[qt.QPointF](qtcore.md#qpoint) representing the four corners of the quad.
-<a name="qtransform.totable"/>
+<a name="qtransform.totable"></a>
### qtransform:totable() ###
Expression `qtransform:totable()` returns a table suitable
for use with expression [qt.QTransform(table)](#qtransformfromtable).
-<a name="qtransform.scaled"/>
+<a name="qtransform.scaled"></a>
### qtransform:scaled(sx,sy) ###
Function `qtransform:scaled` returns a new transformation matrix
representing a coordinate system whose axes have been
scaled by coefficient `sx` and `sy`.
-<a name="qtransform.translated"/>
+<a name="qtransform.translated"></a>
### qtransform:translated(dx,dy) ###
Function `qtransform:translated` returns a new transformation matrix
@@ -1004,7 +984,7 @@ representing a coordinate system whose origin has been
translated by `dx` units along the X axis and `dy` units along the Y axis.
-<a name="qtransform.sheared"/>
+<a name="qtransform.sheared"></a>
### qtransform:sheared(cx,cy) ###
Function `qtransform:sheared` returns a new transformation matrix
@@ -1012,7 +992,7 @@ representing a coordinate system that has been sheared using coefficients
`cx` horizontally and `cy` vertically.
-<a name="qtransform.rotated"/>
+<a name="qtransform.rotated"></a>
### qtransform:rotated(angle,[axis,[unit]]) ###
Function `qtransform:rotated` returns a new transformation matrix
@@ -1022,14 +1002,14 @@ defaults to `ZAxis`. The optional string argument `unit` may
be `Degrees` or `Radians`
and default to `Degrees`.
-<a name="qtransform.inverted"/>
+<a name="qtransform.inverted"></a>
### qtransform:inverted() ###
Function `qtransform:inverted` returns
the inverse transform of its argument
or `nil` when it is not invertible.
-<a name="qtransform.map"/>
+<a name="qtransform.map"></a>
### qtransform:map(...) ###
Function `qtransform:map` applies
@@ -1044,22 +1024,22 @@ This function also take as argument to reals representing
the coordinates of a point and return two reals
representing the transformed coordinates.
-<a name="qwidget"/>
+<a name="qwidget"></a>
## qt.QWidget ##
Qt class
[QWidget](http://doc.trolltech.com/4.4/qwidget.html)
is the base class of all graphical interface components.
All widgets inherit class `qt.QWidget` and
-its superclass [qt.QObject](..:qtcore:index#qobject).
+its superclass [qt.QObject](qtcore.md#qobject).
-<a name="qwidget"/>
+<a name="qwidget"></a>
### qt.QWidget([parent]) ###
Expression `qt.QWidget(parent)` returns a new widget.
The optional argument `parent` specifies the widget parent.
New widgets are always created from the main thread using
-the [thread hopping](..:qt:index#qt.qcall) mechanism.
+the [thread hopping](qt.md#qt.qcall) mechanism.
When argument `parent` is `nil` or not specified,
the new widget is owned by the Lua interpreter
@@ -1067,14 +1047,14 @@ and is automatically destroyed when the garbage collector
determines that it is no longer referenced.
-<a name="qwidget.actions"/>
+<a name="qwidget.actions"></a>
### qwidget:actions() ###
Expression `qwidget:actions()` returns a
-qt value of class [qt.QVariantList](..:qtcore:index#qvariantlist)
+qt value of class [qt.QVariantList](qtcore.md#qvariantlist)
containing list of actions associated with this widget.
-<a name="qwidget.addAction"/>
+<a name="qwidget.addAction"></a>
### qwidget:addAction(qaction) ###
Appends action `qaction` to the
@@ -1082,16 +1062,16 @@ list of actions associated with this widget.
Example: creating a context menu
```lua
- action1 === qt.QtLuaAction{text="Checkme", checkable=true,
- function(b) print("checked:", b) end}
- action2 === qt.QtLuaAction{text="Pickme",
- function() print("picked") end}
- w:addAction(action1)
- w:addAction(action2)
- w.contextMenuPolicy='ActionsContextMenu'
+action1 === qt.QtLuaAction{text="Checkme", checkable=true,
+ function(b) print("checked:", b) end}
+action2 === qt.QtLuaAction{text="Pickme",
+ function() print("picked") end}
+w:addAction(action1)
+w:addAction(action2)
+w.contextMenuPolicy='ActionsContextMenu'
```
-<a name="qwidget.insertAction"/>
+<a name="qwidget.insertAction"></a>
### qwidget:insertAction(beforeqaction, qaction) ###
Insert action ==qaction== into the
@@ -1100,29 +1080,29 @@ Argument ==beforeqaction== indicates at which position
to insert the action. If ==beforeqaction== is omitted
or invalid, the action is simply appended.
-<a name="qwidget.mapToGlobal"/>
+<a name="qwidget.mapToGlobal"></a>
### qwidget:mapToGlobal(qpoint) ###
Translates the widget coordinates `qpoint` to global screen coordinates.
Both argument `qpoint` and the return value are Qt value of class
-[qt.QPoint](..:qtcore:index#qpoint).
+[qt.QPoint](qtcore.md#qpoint).
-<a name="qwidget.mapFromGlobal"/>
+<a name="qwidget.mapFromGlobal"></a>
### qwidget:mapFromGlobal(qpoint) ###
Translates the global screen coordinates `qpoint` to widget coordinates.
Both argument `qpoint` and the return value are Qt value of class
-[qt.QPoint](..:qtcore:index#qpoint).
+[qt.QPoint](qtcore.md#qpoint).
-<a name="qwidget.removeAction"/>
+<a name="qwidget.removeAction"></a>
### qwidget:removeAction(qaction) ###
Removes action `qaction` from the
list actions associated with this widget.
-<a name="qwidget.render"/>
+<a name="qwidget.render"></a>
### qwidget:render([pointer]) ###
When called without argument,
@@ -1133,12 +1113,12 @@ The optional argument `pointer` can be a
pointer to a `QPainter` or a `QPaintDevice`
where the widget should be rendered.
Such pointers can be obtained using functions
-[painter:painter](..:qtwidget:index#painterpainter) or
-[painter:device](..:qtwidget:index#painterdevice).
+[painter:painter](qtwidget.md#painterpainter) or
+[painter:device](qtwidget.md#painterdevice).
When such an argument is specified,
nothing is returned.
-<a name="qwidget.setAttribute"/>
+<a name="qwidget.setAttribute"></a>
### qwidget:setAttribute(widgetattribute,[value]) ###
Sets the specified
@@ -1147,7 +1127,7 @@ to boolean value `value`.
Some of these flags are used internally by Qt.
Care is required.
-<a name="qwidget.setWindowFlag"/>
+<a name="qwidget.setWindowFlag"></a>
### qwidget:setWindowFlag(windowflag,[value]) ###
Sets the specified
@@ -1158,7 +1138,7 @@ are handled as exclusive flags.
Setting these flags usually hides the window.
You need to do call `qwidget:show` again.
-<a name="qwidget.testAttribute"/>
+<a name="qwidget.testAttribute"></a>
### qwidget:testAttribute(widgetattribute) ###
Returns a boolean indicating the value of the specified
@@ -1166,7 +1146,7 @@ Returns a boolean indicating the value of the specified
Flags indicating a window type
are handled as exclusive flags.
-<a name="qwidget.testWindowFlag"/>
+<a name="qwidget.testWindowFlag"></a>
### qwidget:testWindowFlag(windowflag) ###
Returns a boolean indicating the value of the specified
@@ -1174,7 +1154,7 @@ Returns a boolean indicating the value of the specified
Flags indicating a window type
are handled as exclusive flags.
-<a name="qwidget.window"/>
+<a name="qwidget.window"></a>
### qwidget:window() ###
Expression `qwidget:window()` returns the window for widget `qwidget`,
@@ -1183,8 +1163,9 @@ with a window frame.
For instance the following code changes the
title of the window containing widget `qwidget`.
+
```lua
- qwidget:window().windowTitle "New Title"
+qwidget:window().windowTitle "New Title"
```
diff --git a/packages/qtide/doc/README.md b/doc/qtide.md
index cb97755..b19b5b9 100644
--- a/packages/qtide/doc/README.md
+++ b/doc/qtide.md
@@ -1,4 +1,4 @@
-<a name="qtide.dok"/>
+<a name="qtide.dok"></a>
# QtIde Package Reference Manual #
A package implementing
@@ -10,11 +10,11 @@ This package is not complete because
it is under heavy development.
-<a name="qtide.functions."/>
+<a name="qtide.functions."></a>
## Functions ##
-<a name="qtidefunctions"/>
+<a name="qtidefunctions"></a>
-<a name="qtide.editor"/>
+<a name="qtide.editor"></a>
### qtide.editor([filename]) ###
Called without argument, this function returns a
@@ -28,7 +28,7 @@ Open editors have object names of the form `editor`_n_
and are accessible by name in the `qt` package.
-<a name="qtide.doeditor"/>
+<a name="qtide.doeditor"></a>
### qtide.doeditor(qluaeditor) ###
This function executes the chunk of Lua code
@@ -40,7 +40,7 @@ or has been modified (otherwise one can use the standard
Lua function `dofile`.)
-<a name="qtide.browser"/>
+<a name="qtide.browser"></a>
### qtide.browser([url]) ###
This function opens a web browser for URL `url`.
@@ -49,21 +49,21 @@ This is the function called by the IDE when one
requests the help index.
-<a name="qtide.inspector"/>
+<a name="qtide.inspector"></a>
### qtide.inspector(...) ###
Not yet implemented
-<a name="qtide.preferences"/>
+<a name="qtide.preferences"></a>
### qtide.preferences() ###
Not yet implemented
-<a name="qtide.start"/>
+<a name="qtide.start"></a>
### qtide.start([style]) ###
-<a name="qtidestart"/>
+<a name="qtidestart"></a>
Starts the QLua Integrated Development Environment (IDE)
and ensure that the main window is visible.
@@ -82,9 +82,9 @@ The recognized IDE styles are:
* `"tab2"` groups all editors and the console into a single tabbed window.
-<a name="qtide.setup"/>
+<a name="qtide.setup"></a>
### qtide.setup([style]) ###
-<a name="qtidesetup"/>
+<a name="qtidesetup"></a>
This function is called by [qtide.start()](#qtidestart)
to setup the IDE style. You can call it directly if you
@@ -92,20 +92,20 @@ want to organize QLua editors and windows without creating
a graphic console.
-<a name="qtclasses"/>
+<a name="qtclasses"></a>
## Qt Classes ##
-<a name="qluaide"/>
+<a name="qluaide"></a>
### qt.QLuaIde ###
Object `qt.qLuaIde` represetns the global state of the IDE.
This is the unique instance of class `qt.QLuaIde`
-which inherits [qt.QObject](..:qt:index#qobject).
+which inherits [qt.QObject](qt.md#qobject).
Most of its capabilities are conveniently
accessible using the functions defined
by the [package ''qtide](#qtidefunctions).
-<a name="qluaide.editOnError"/>
+<a name="qluaide.editOnError"></a>
#### qt.qLuaIde.editOnError ####
When a Lua error occurs, this boolean property
@@ -114,89 +114,89 @@ on the location of the error.
This property is `false` by default
Function [qtide.start](#qtidestart) sets it to `true`.
-<a name="qluaide.windows"/>
+<a name="qluaide.windows"></a>
#### qt.qLuaIde:windows() ####
Returns a variant of type `qt.QObjectList` containing
all the main windows managed by the IDE.
-<a name="qluaide.windowNames"/>
+<a name="qluaide.windowNames"></a>
#### qt.qLuaIde:windowNames() ####
Returns a variant of type `qt.QStringList` containing
the names of all the main windows managed by the IDE.
-<a name="qluaide.activeWindow"/>
+<a name="qluaide.activeWindow"></a>
#### qt.qLuaIde:activeWindow() ####
-<a name="qluaide.editor"/>
+<a name="qluaide.editor"></a>
#### qt.qLuaIde:editor([fname]) ####
-<a name="qluaide.browser"/>
+<a name="qluaide.browser"></a>
#### qt.qLuaIde:browser([url]) ####
-<a name="qluaide.inspector"/>
+<a name="qluaide.inspector"></a>
#### qt.qLuaIde:inspector() ####
-<a name="qluaide.recentFiles"/>
+<a name="qluaide.recentFiles"></a>
#### qt.qLuaIde:recentFiles() ####
Returns a variant of type `qt.QStringList` containing
the file names appearing in the "Open Recent Files" menu.
-<a name="qluaide.addRecentFile"/>
+<a name="qluaide.addRecentFile"></a>
#### qt.qLuaIde:addRecentFile(fname) ####
-<a name="qluaide.clearRecentFiles"/>
+<a name="qluaide.clearRecentFiles"></a>
#### qt.qLuaIde:clearRecentFiles() ####
-<a name="qluaide.activateWidget"/>
+<a name="qluaide.activateWidget"></a>
#### qt.qLuaIde:activateWidget(qwidget) ####
-<a name="qluaide.activateConsole"/>
+<a name="qluaide.activateConsole"></a>
#### qt.qLuaIde:activateConsole() ####
-<a name="qluaide.messageBox"/>
+<a name="qluaide.messageBox"></a>
#### qt.qLuaIde:messageBox(title,message,buttons,[defbutton,[icon]]) ####
-<a name="qluaide.hasAction"/>
+<a name="qluaide.hasAction"></a>
#### qt.qLuaIde:hasAction(name) ####
-<a name="qluaide.stdAction"/>
+<a name="qluaide.stdAction"></a>
#### qt.qLuaIde:stdAction(name) ####
-<a name="qluaide.prefsRequested"/>
+<a name="qluaide.prefsRequested"></a>
#### [qt.QLuaIde signal] prefsRequested(qwidget) ####
This signal is emitted when the "Preferences" menu is selected.
-<a name="qluaide.helpRequested"/>
+<a name="qluaide.helpRequested"></a>
#### [qt.QLuaIde signal] helpRequested(qwidget) ####
This signal is emitted when the "Help Index" menu is selected.
-<a name="qluamainwindow"/>
+<a name="qluamainwindow"></a>
### qt.QLuaMainWindow ###
This subclass of `QMainWindow` implements common
functionalities shared by all main windows defined
by the `qtide` package.
-<a name="qluamainwindow.clearStatusMessage"/>
+<a name="qluamainwindow.clearStatusMessage"></a>
#### qluamainwindow:clearStatusMessage() ####
-<a name="qluamainwindow.showStatusMessage"/>
+<a name="qluamainwindow.showStatusMessage"></a>
#### qluamainwindow:showStatusMessage(string,[timeout]) ####
-<a name="qluamainwindow.hasAction"/>
+<a name="qluamainwindow.hasAction"></a>
#### qluamainwindow:hasAction(name) ####
-<a name="qluamainwindow.stdAction"/>
+<a name="qluamainwindow.stdAction"></a>
#### qluamainwindow:stdAction(name) ####
-<a name="qluamainwindow.doXXXX"/>
+<a name="qluamainwindow.doXXXX"></a>
#### qluamainwindow:doXXXX() ####
Methods whose name start with `do` implement
@@ -204,7 +204,7 @@ the functions accessible from the menus and toolbar icons
in various subclasses of `qt.QLuaMainWindow`.
-<a name="qluaeditor"/>
+<a name="qluaeditor"></a>
### qt.QLuaEditor ###
This subclass of [qt.QLuaMainWindow](#qluamainwindow)
@@ -212,49 +212,46 @@ implements the QLua editor windows using
an instance of [qt.QLuaTextEdit](#qluatextedit)
as its main widget.
-<a name="qluaeditor.widget"/>
+<a name="qluaeditor.widget"></a>
#### qluaeditor:widget() ####
Expression `qluaeditor:widget()` returns the
[qt.QLuaTextEdit](#qluatextedit)
object that underlies the editor window.
-<a name="qluaeditor.fileName"/>
+<a name="qluaeditor.fileName"></a>
#### qluaeditor.fileName ####
This property contains the name of the file being edited.
-<a name="qluaeditor.readFile"/>
+<a name="qluaeditor.readFile"></a>
#### qluaeditor:readFile(string) ####
-<a name="qluaeditor.writeFile"/>
+<a name="qluaeditor.writeFile"></a>
#### qluaeditor:writeFile(string) ####
-<a name="qluabrowser"/>
+<a name="qluabrowser"></a>
### qt.QLuaBrowser ###
This subclass of [qt.QLuaMainWindow](#qluamainwindow)
implements the QLua web browser windows using the Qt WebKit interface.
-<a name="qluabrowser.url"/>
+<a name="qluabrowser.url"></a>
#### qluabrowser.url ####
This property contains a qt variant
-of type [qt.QUrl](..:qt:index#qurl)
+of type [qt.QUrl](qt.md#qurl)
representing the URL displayed by the browser.
-<a name="qluabrowser.html"/>
+<a name="qluabrowser.html"></a>
#### qluabrowser.html ####
This property contains a qt variant of type `QString`
representing the HTML text displayed by the browser.
-
-
-
-<a name="qluasdimain"/>
+<a name="qluasdimain"></a>
### qt.QLuaSdiMain ###
This subclass of [qt.QLuaMainWindow](#qluamainwindow)
@@ -262,7 +259,7 @@ implements the QLua console window.
Expression `qt.qLuaSdiMain` returns the single console
window when such a window exists.
-<a name="qluasdimain.consoleWidget"/>
+<a name="qluasdimain.consoleWidget"></a>
#### qt.qLuaSdiMain:consoleWidget() ####
Returns the object of class
@@ -270,7 +267,7 @@ Returns the object of class
implementing the part of the main console
where the user can edit and submit lua strings.
-<a name="qluasdimain.editorWidget"/>
+<a name="qluasdimain.editorWidget"></a>
#### qt.qLuaSdiMain:editorWidget() ####
Returns the object of class
@@ -279,7 +276,7 @@ implementing the part of the main console
where the Lua output is shown.
-<a name="qluamdimain"/>
+<a name="qluamdimain"></a>
### qt.QLuaMdiMain ###
This subclass of [qt.QLuaMainWindow](#qluamainwindow)
@@ -287,14 +284,14 @@ aggregates selected windows into a single main window
to implement the IDE styles. Expression `qt.qLuaMdiMain`
returns the single main window when such a window exists.
-<a name="qluamdimain.tabMode"/>
+<a name="qluamdimain.tabMode"></a>
#### qt.qLuaMdiMain.tabMode ####
The boolean property `qt.qLuaMdiMain.tabMode`
indicates whether the aggregated
windows are displayed using tabs or using a multiple document interface.
-<a name="qluamdimain.clientClass"/>
+<a name="qluamdimain.clientClass"></a>
#### qt.qLuaMdiMain.clientClass ####
The string property `qt.qLuaMdiMain.clientClass`
@@ -302,90 +299,88 @@ contains the name of a class.
All new main windows inheriting this class are then
managed by the single main window.
-<a name="qluamdimain.adoptAll"/>
+<a name="qluamdimain.adoptAll"></a>
#### qt.qLuaMdiMain:adoptAll() ####
Collects all main windows that are
subclasses of `qt.qLuaMdiMain.clientClass`
and aggregates them into the mdi main window.
-<a name="qluamdimain.adopt"/>
+<a name="qluamdimain.adopt"></a>
#### qt.qLuaMdiMain:adopt(qwidget) ####
-<a name="qluamdimain.activate"/>
+<a name="qluamdimain.activate"></a>
#### qt.qLuaMdiMain:activate(qwidget) ####
-<a name="qluatextedit"/>
+<a name="qluatextedit"></a>
### qt.QLuaTextEdit ###
Class `QLuaTextEdit` is a text editor widget derived
from `QPlainTextEdit` with support for line numbers,
find dialog, replace dialog, and printing.
-<a name="qluatextedit.showLineNumbers"/>
+<a name="qluatextedit.showLineNumbers"></a>
#### qluatextedit.showLineNumbers ####
-<a name="qluatextedit.autoComplete"/>
+<a name="qluatextedit.autoComplete"></a>
#### qluatextedit.autoComplete ####
-<a name="qluatextedit.autoIndent"/>
+<a name="qluatextedit.autoIndent"></a>
#### qluatextedit.autoIndent ####
-<a name="qluatextedit.autoHighlight"/>
+<a name="qluatextedit.autoHighlight"></a>
#### qluatextedit.autoHighlight ####
-<a name="qluatextedit.autoMatch"/>
+<a name="qluatextedit.autoMatch"></a>
#### qluatextedit.autoMatch ####
-<a name="qluatextedit.tabExpand"/>
+<a name="qluatextedit.tabExpand"></a>
#### qluatextedit.tabExpand ####
-<a name="qluatextedit.tabSize"/>
+<a name="qluatextedit.tabSize"></a>
#### qluatextedit.tabSize ####
-<a name="qluatextedit.setEditorMode"/>
+<a name="qluatextedit.setEditorMode"></a>
#### qluatextedit:setEditorMode(suffix) ####
-<a name="qluatextedit.readFile"/>
+<a name="qluatextedit.readFile"></a>
#### qluatextedit:readFile(fname) ####
-<a name="qluatextedit.writeFile"/>
+<a name="qluatextedit.writeFile"></a>
#### qluatextedit:writeFile(fname) ####
-<a name="qluatextedit.showLine"/>
+<a name="qluatextedit.showLine"></a>
#### qluatextedit:showLine(lineno) ####
-<a name="qluaconsolewidget"/>
+<a name="qluaconsolewidget"></a>
### qt.QLuaConsoleWidget ###
Class `QLuaConsoleWidget` is a subclass of
[qt.QLuaTextEdit](#qluatextedit)
that captures and display the lua output.
-<a name="qluaconsolewidget.printTimings"/>
+<a name="qluaconsolewidget.printTimings"></a>
#### qluaconsolewidget.printTimings ####
Boolean property that indicates whether the console
displays the running time of each command.
-<a name="qluaconsolewidget.addOutput"/>
+<a name="qluaconsolewidget.addOutput"></a>
#### qluaconsolewidget:addOutput(text,[format]) ####
Adds `text` to the console window.
Argument `format` is a string specifying the text format.
Possible values are `"default"`, `"quote"`, and `"comment"`.
-<a name="qluaconsolewidget.moveToEnd"/>
+<a name="qluaconsolewidget.moveToEnd"></a>
#### qluaconsolewidget:moveToEnd() ####
Shows the bottom of the text displayed in the console window.
-
-
-<a name="qtobjects"/>
+<a name="qtobjects"></a>
## Qt Objects ##
-<a name="qtqluaide"/>
+<a name="qtqluaide"></a>
### qt.qLuaIde ###
Expression `qt.qLuaIde` refers to the unique instance
@@ -393,7 +388,7 @@ of class [qt.QLuaIde](#qluaide).
This instance is created when package `qtide` is loaded.
-<a name="qtqluasdimain"/>
+<a name="qtqluasdimain"></a>
### qt.qLuaSdiMain ###
Expression `qt.qLuaSdiMain` refers to the unique instance of
@@ -401,7 +396,7 @@ class [qt.QLuaSdiMain](#qluasdimain),
created by function [qtide.start()](#qtidestart).
-<a name="qtqluamdimain"/>
+<a name="qtqluamdimain"></a>
### qt.qLuaMdiMain ###
Expression `qt.qLuaMdiMain` refers to the unique instance of
diff --git a/packages/qtsvg/doc/README.md b/doc/qtsvg.md
index 2d0cfc7..288ae47 100644
--- a/packages/qtsvg/doc/README.md
+++ b/doc/qtsvg.md
@@ -1,4 +1,4 @@
-<a name="qtsvg.dok"/>
+<a name="qtsvg.dok"></a>
# QtSvg Bindings #
The package `qtsvg`
@@ -7,35 +7,34 @@ contains bindings for classes defined by the Qt module
Besides the capabilites reported below,
all qt variants inherit a set
-of [default methods](..:qt:index#QVariants),
+of [default methods](qt.md#QVariants),
and all qt object classes inherit the capabilities from their
superclasses and automatically expose
-[properties, slots and signals](..:qt:index#QObjects).
+[properties, slots and signals](qt.md#QObjects).
You can also use the function
-[qtwidget.newpdf](..:qtwidget:index#qtwidgetnewpdf),
+[qtwidget.newpdf](qtwidget.md#qtwidgetnewpdf),
defined in module `qtwidget`,
to easily generate SVG files.
-<a name="qtsvg_loadsvg"/>
+<a name="qtsvg_loadsvg"></a>
### qtsvg.loadsvg(filename) ###
-<a name="qtsvg.loadsvg"/>
+<a name="qtsvg.loadsvg"></a>
Returns a Qt object of
class [qt.QSvgRenderer](#qsvgrenderer)
representing the SVG file `filename`.
-
-<a name="qtsvg_paintsvg"/>
+<a name="qtsvg_paintsvg"></a>
### qtsvg.paintsvg(port,svg,...) ###
-<a name="qtsvg.paintsvg"/>
+<a name="qtsvg.paintsvg"></a>
Draws a SVG image.
Argument `port` must be a
-[qt.QtLuaPainter](..:qtwidget:index#qtluapainter) or a
-[qtwidget'' high level port descriptor](..:qtwidget:index#highlevel).
+[qt.QtLuaPainter](qtwidget.md#qtluapainter) or a
+[qtwidget'' high level port descriptor](qtwidget.md#highlevel).
Argument `svg` can be the SVG filename or
an instance of class [qt.QSvgRenderer](#qsvgrenderer)
such as those returned by function [qtsvg.loadsvg](#qtsvg_loadsvg).
@@ -43,7 +42,7 @@ The remaining arguments are the same
as those for the C++ function `QSvgRenderer::render`.
-<a name="qsvgwidget"/>
+<a name="qsvgwidget"></a>
### qt.QSvgWidget ###
Class
@@ -51,7 +50,7 @@ Class
provides a widget that is used to display the contents
of Scalable Vector Graphics (SVG) files.
-<a name="qsvgwidget"/>
+<a name="qsvgwidget"></a>
#### qt.QSvgWidget([filename],[parent]) ####
Expression `qt.QSvgWidget(parent)` returns a
@@ -63,20 +62,20 @@ you must use slot `qsvgwidget:load()` to load SVG data.
The optional argument `parent` specifies the widget parent.
New widgets are always created from the main thread using
-the [thread hopping](..:qt:index#qtqcall) mechanism.
+the [thread hopping](qt.md#qtqcall) mechanism.
When argument `parent` is `nil` or not specified,
the new widget is owned by the Lua interpreter
and is automatically destroyed when the garbage collector
determines that it is no longer referenced.
-<a name="qsvgwidget.renderer"/>
+<a name="qsvgwidget.renderer"></a>
#### qsvgwidget:renderer() ####
Returns the [qt.QSvgRenderer](#qsvgrenderer) object
associated with this widget.
-<a name="qsvgrenderer"/>
+<a name="qsvgrenderer"></a>
### qt.QSvgRenderer ###
Class
@@ -86,7 +85,7 @@ You should use instead function
[qtsvg.paintsvg](#qtsvg_paintsvg)
to easily display SVG data.
-<a name="qsvgrenderer"/>
+<a name="qsvgrenderer"></a>
#### qt.QSvgRenderer([filename],[parent]) ####
Creates a new instance of class `QSvgRenderer`.
@@ -102,17 +101,17 @@ and is automatically destroyed when the garbage collector
determines that it is no longer referenced.
-<a name="qtluasvggenerator"/>
+<a name="qtluasvggenerator"></a>
### qt.QtLuaSvgGenerator ###
This is a thin wrapper around the Qt class
[QSvgGenerator](http://doc.trolltech.com/4.4/qsvggenerator.html).
You should use instead function
-[qtwidget.newpdf](..:qtwidget:index#qtwidgetnewpdf)
+[qtwidget.newpdf](qtwidget.md#qtwidgetnewpdf)
to easily generate SVG files.
-<a name="qtluasvggenerator"/>
+<a name="qtluasvggenerator"></a>
#### qt.QtLuaSvgGenerator([filename],[parent]) ####
Creates a new instance of class `QtLuaSvgGenerator`.
@@ -128,36 +127,36 @@ the new widget is owned by the Lua interpreter
and is automatically destroyed when the garbage collector
determines that it is no longer referenced.
-<a name="qtluasvggeneratordata"/>
+<a name="qtluasvggeneratordata"></a>
#### qtluasvggenerator:data() ####
-<a name="qtluasvggenerator.data"/>
+<a name="qtluasvggenerator.data"></a>
Assuming the `qtluasvggenerator` was created without the `filename` argument,
-this function returns a [qt.QByteArray](..:qtcore:index#qbytearray)
+this function returns a [qt.QByteArray](qtcore.md#qbytearray)
containing the generated SVG data. This data may be incomplete
-until [painter:close()](..:qtwidget:index#painterclose) has
+until [painter:close()](qtwidget.md#painterclose) has
been closed on all painters operating on `qtluasvggenerator`.
-<a name="qtluasvggenerator.description"/>
+<a name="qtluasvggenerator.description"></a>
#### qtluasvggenerator.description ####
Starting with Qt-4.5, this string property defines
the contents of the `<desc>` tag of the SVG file.
-<a name="qtluasvggenerator.title"/>
+<a name="qtluasvggenerator.title"></a>
#### qtluasvggenerator.title ####
Starting with Qt-4.5, this string property defines
the contents of the `<title>` tag of the SVG file.
-<a name="qtluasvggenerator.size"/>
+<a name="qtluasvggenerator.size"></a>
#### qtluasvggenerator.size ####
-This property contains a [qt.QSize](..:qtcore:index#qsize)
+This property contains a [qt.QSize](qtcore.md#qsize)
variant containing the size of the drawable area.
This information is shown in the `viewBox` attribute of the `<svg>` tag.
-<a name="qtluasvggenerator.resolution"/>
+<a name="qtluasvggenerator.resolution"></a>
#### qtluasvggenerator.resolution ####
This integer property defines the resolution, in dots per inch,
@@ -165,5 +164,3 @@ of the coordinate system.
Together with `qtluasvggenerator.size`, this property determines
the contents of the `width` and `height` attributes of the `<svg>` tag.
-
-
diff --git a/packages/qtuiloader/doc/README.md b/doc/qtuiloader.md
index f25432b..9176cad 100644
--- a/packages/qtuiloader/doc/README.md
+++ b/doc/qtuiloader.md
@@ -1,4 +1,4 @@
-<a name="qtuiloader.dok"/>
+<a name="qtuiloader.dok"></a>
# QtUiLoader Package Reference Manual #
Package `qtuiloader` provides
@@ -16,17 +16,17 @@ Use program
[Qt Designer](http://doc.trolltech.com/4.4/designer-manual.html)
to examine file `test.ui`.
Then load file `test.lua` into the
-[qlua](..:qt:index#qlua) program.
+[qlua](qt.md#qlua) program.
```
- $ cd /usr/local/share/lua/5.1/qtuiloader
- $ /usr/local/bin/qlua
- Lua 5.1 Copyright (C) 1994-2008 Lua.org, PUC-Rio
- > dofile('test.lua')
+$ cd /usr/local/share/lua/5.1/qtuiloader
+$ /usr/local/bin/qlua
+Lua 5.1 Copyright (C) 1994-2008 Lua.org, PUC-Rio
+> dofile('test.lua')
```
-<a name="qtuiloader.functions"/>
+<a name="qtuiloader.functions"></a>
## Functions ##
Package `qtuiloader` provides a few convenience functions.
@@ -38,35 +38,33 @@ this preallocated loader to construct a widget using a
user interface description.
-<a name="qtuiloaderavailablewidgets"/>
+<a name="qtuiloaderavailablewidgets"></a>
### qtuiloader.availableWidgets() ###
-<a name="qtuiloader.availablewidgets"/>
+<a name="qtuiloader.availablewidgets"></a>
Expression `qtuiloader.availableWidgets()` returns a
-[qt.QStringList](..:qtcore:index#qstringlist)
+[qt.QStringList](qtcore.md#qstringlist)
containing the names of the supported widget classes.
-<a name="qtuiloader.createWidget"/>
+<a name="qtuiloader.createWidget"></a>
### qtuiloader.createWidget(classname,[parent,[objectname]]) ###
-Creates a [widget](..:qtgui:index#qwidget) of class `classname`.
+Creates a [widget](qtgui.md#qwidget) of class `classname`.
Argument `classname` can be any of the strings returned
by [`qtuiloader.availableWidgets()`](#qtuiloaderavailablewidgets).
The optional argument `parent` specifies the parent widget
and the optional argument `name` specifies the
-[object name](..:qtcore:index#qobjectobjectname).
+[object name](qtcore.md#qobjectobjectname).
When argument `parent` is `nil` or not specified,
the new widget is owned by the Lua interpreter
and is automatically destroyed when the garbage collector
determines that it is no longer referenced.
-
-
-<a name="qtuiloaderload"/>
+<a name="qtuiloaderload"></a>
### qtuiloader.load(filename,[parent]) ###
-<a name="qtuiloader.load"/>
+<a name="qtuiloader.load"></a>
Expression `qtuiloader.load(filename,parent)` dynamically
constructs and returns the widget described by the
@@ -78,20 +76,19 @@ the new widget is owned by the Lua interpreter
and is automatically destroyed when the garbage collector
determines that it is no longer referenced.
-
-<a name="qtuiloaderloader"/>
+<a name="qtuiloaderloader"></a>
### qtuiloader.loader() ###
-<a name="qtuiloader.loader"/>
+<a name="qtuiloader.loader"></a>
Expression `qtuiloader.loader()`
returns a preallocated instance
of class [qt.QUiLoader](#quiloader).
-<a name="qtuiloader.classes"/>
+<a name="qtuiloader.classes"></a>
## Classes ##
-<a name="quiloader"/>
+<a name="quiloader"></a>
### qt.QUiLoader ###
Class `qt.QUiLoader` provides bindings
diff --git a/packages/qtwidget/doc/README.md b/doc/qtwidget.md
index d0231f3..098cc72 100644
--- a/packages/qtwidget/doc/README.md
+++ b/doc/qtwidget.md
@@ -1,10 +1,10 @@
-<a name="qtwidget.dok"/>
+<a name="qtwidget.dok"></a>
# QtWidget Package Reference Manual #
Package `qtwidget` provides convenient way
to make drawings and capture user events.
In particular, class [QtLuaPainter](#qtluapainter) gives
-the ability draw simple graphics using well known
+the ability to draw simple graphics using well known
postscript-like operators. Graphic output can be sent to an
arbitrary widget, to a PS or PDF file, or to a printer.
Class [QtLuaListener](#qtlualistener) gives the
@@ -15,54 +15,54 @@ function [qtwidget.newwindow](#qtwidgetnewwindow)
creates a main window and returns its descriptor.
```lua
- require 'qtwidget'
- w=qtwidget.newwindow(400,300,"Some QWidget")
+require 'qtwidget'
+w=qtwidget.newwindow(400,300,"Some QWidget")
```
Drawing is easily achieved using Postscript-like operators.
```lua
- w:moveto(0,0); w:curveto(0,300,400,0,400,300); w:closepath()
- w:setcolor("red"); w:fill(false)
- w:setcolor("blue"); w:setlinewidth(5); w:stroke()
+w:moveto(0,0); w:curveto(0,300,400,0,400,300); w:closepath()
+w:setcolor("red"); w:fill(false)
+w:setcolor("blue"); w:setlinewidth(5); w:stroke()
```
Text output is of course supported
using [show](#paintershow).
```lua
- w:moveto(90,40)
- w:setcolor("black")
- w:setfont(qt.QFont{serif=true,italic=true,size=20})
- w:show("The Quick Brown Fox...")
+w:moveto(90,40)
+w:setcolor("black")
+w:setfont(qt.QFont{serif=true,italic=true,size=20})
+w:show("The Quick Brown Fox...")
```
Alpha-transparency works as well.
```lua
- w:rectangle(50,50,300,200)
- w:setcolor(1,1,0,.5)
- w:fill()
+w:rectangle(50,50,300,200)
+w:setcolor(1,1,0,.5)
+w:fill()
```
Finally you can capture Qt events using the
-[qt.connect](..:qt:index#qt.connect) function
+[qt.connect](qt.md#qt.connect) function
on the predefined [qt.QtLuaListener](#qtlualistener) object,
```lua
- qt.connect(w.listener,
- 'sigMousePress(int,int,QByteArray,QByteArray,QByteArray)',
- function(...) print("MousePress",...) end );
+qt.connect(w.listener,
+ 'sigMousePress(int,int,QByteArray,QByteArray,QByteArray)',
+ function(...) print("MousePress",...) end );
```
and you can erase everything with
```lua
- w:showpage()
+w:showpage()
```
-<a name="highlevel"/>
+<a name="highlevel"></a>
## High Level Interface ##
The following convenience functions
@@ -80,12 +80,12 @@ on these tables.
-<a name="qtwidgetnewwindow"/>
+<a name="qtwidgetnewwindow"></a>
### qtwidget.newwindow(w,h,[title]) ###
-<a name="qtwidget.newwindow"/>
+<a name="qtwidget.newwindow"></a>
Expression `qtwidget.newwindow(w,h,title)` creates a
-toplevel widget of class [qt.QWidget](..:qtgui:index#qwidget)
+toplevel widget of class [qt.QWidget](qtgui.md#qwidget)
and a [qt.QtLuaPainter](#qtluapainter) object
operating on that widget.
Numerical arguments `w` and `h` specify the size of the widget.
@@ -93,9 +93,9 @@ String argument `title` specifies a window title.
The expression returns a Lua table that
serves as a drawing port descriptor.
-<a name="qtwidgetnewimage"/>
+<a name="qtwidgetnewimage"></a>
### qtwidget.newimage(...) ###
-<a name="qtwidget.newimage"/>
+<a name="qtwidget.newimage"></a>
Function `qtwidget.newimage` creates an image in memory
that can be the target of drawing operations.
@@ -122,14 +122,14 @@ __`qtwidget.newimage(torchtensor)`__
Creates an image by extracting the contents of the specified
[torch.Tensor](..:torch:index#Tensor).
The valid tensor formats are described in the documentation for function
-[qt.QImage.fromTensor](..:qttorch:index#qimagefromtensor).
+[qt.QImage.fromTensor](qt.md#qimagefromtensor).
This only works when both packages [torch](..:torch:index)
-and [qttorch](..:qttorch:index) have been loaded.
+and [qttorch](qt.md) have been loaded.
-<a name="qtwidgetnewps"/>
+<a name="qtwidgetnewps"></a>
### qtwidget.newps(w,h,filename) ###
-<a name="qtwidget.newps"/>
+<a name="qtwidget.newps"></a>
Expression `qtwidget.newps(w,h,filename)` returns a Lua table that
serves as a drawing port descriptor.
@@ -142,9 +142,9 @@ The output file contains incomplete data until
you delete the painter object or call
method [close](#qtwidgetclose).
-<a name="qtwidgetnewpdf"/>
+<a name="qtwidgetnewpdf"></a>
### qtwidget.newpdf(w,h,filename) ###
-<a name="qtwidget.newpdf"/>
+<a name="qtwidget.newpdf"></a>
Expression `qtwidget.newpdf(w,h,filename)` returns a Lua table that
serves as a drawing port descriptor.
@@ -158,9 +158,9 @@ you delete the painter object or call
method [close](#qtwidgetclose).
-<a name="qtwidgetnewsvg"/>
+<a name="qtwidgetnewsvg"></a>
### qtwidget.newsvg(w,h,[filename]) ###
-<a name="qtwidget.newsvg"/>
+<a name="qtwidget.newsvg"></a>
Expression `qtwidget.newsvg(w,h,filename)` returns a Lua table that
serves as a drawing port descriptor.
@@ -175,12 +175,12 @@ method [close](#qtwidgetclose).
When argument `filename` is not specified,
the SVG data is written into an internal memory buffer
accessible using expression
-[desc.svg:data()](..:qtsvg:index#qtluasvggeneratordata).
+[desc.svg:data()](qtsvg.md#qtluasvggeneratordata).
-<a name="qtwidgetnewprint"/>
+<a name="qtwidgetnewprint"></a>
### qtwidget.newprint(w,h,[printername]) ###
-<a name="qtwidget.newprint"/>
+<a name="qtwidget.newprint"></a>
Expression `qtwidget.newprint(w,h,printername)`
returns a Lua table that
@@ -194,7 +194,7 @@ initial size of the coordinate system.
-<a name="qtpaintingfunctions"/>
+<a name="qtpaintingfunctions"></a>
### Painting Functions. ###
All the [painting functions](#qtluapainterfunctions)
@@ -215,7 +215,7 @@ These calls are simply forwarded to the underlying
* [Link to the painting functions](#qtluapainterfunctions).
-<a name="qtwidgetotherfunctions"/>
+<a name="qtwidgetotherfunctions"></a>
### Other Functions and Fields. ###
The following fields and functions are defined
@@ -227,25 +227,25 @@ on the descriptor tables returned by the functions
[qtwidget.newprint](#qtwidgetnewprint).
-<a name="descport"/>
+<a name="descport"></a>
#### desc.port ####
-<a name="qtwidget.desc.port"/>
+<a name="qtwidget.desc.port"></a>
Field `desc.port` contains the
[qt.QtLuaPainter](#qtluapainter) object
that is used to perform the drawings.
-<a name="qtwidget.desc.widget"/>
+<a name="qtwidget.desc.widget"></a>
#### desc.widget ####
Field `desc.widget` contains the
-[qt.QWidget](..:qtgui:index#qwidget) object
+[qt.QWidget](qtgui.md#qwidget) object
that underlies drawing port descriptors created with
[qtwidget.newwindow](#qtwidgetnewwindow).
-<a name="qtwidget.desc.listener"/>
+<a name="qtwidget.desc.listener"></a>
#### desc.listener ####
Field `desc.widget` contains a
@@ -253,7 +253,7 @@ Field `desc.widget` contains a
that can be used to capture events on the widget created by
[qtwidget.newwindow](#qtwidgetnewwindow).
-<a name="qtwidget.desc.printer"/>
+<a name="qtwidget.desc.printer"></a>
#### desc.printer ####
Field `desc.printer` contains the
@@ -263,37 +263,37 @@ that underlies drawing port descriptors created with
[qtwidget.newpdf](#qtwidgetnewpdf), or
[qtwidget.newprint](#qtwidgetnewprint).
-<a name="qtwidget.desc.svg"/>
+<a name="qtwidget.desc.svg"></a>
#### desc.svg ####
Field `desc.svg` contains the
-[qt.QtLuaSvgGenerator](..:qtsvg:index#qtluasvggenerator) object
+[qt.QtLuaSvgGenerator](qtsvg.md#qtluasvggenerator) object
associated with drawing ports created with
[qtwidget.newsvg](#qtwidgetnewsvg).
-<a name="qtwidget.desc.width"/>
+<a name="qtwidget.desc.width"></a>
#### desc.width ####
Field `desc.width` contains the width of the drawing surface.
-<a name="qtwidget.desc.height"/>
+<a name="qtwidget.desc.height"></a>
#### desc.height ####
Field `desc.height` contains the height of the drawing surface.
-<a name="qtwidgetclose"/>
+<a name="qtwidgetclose"></a>
#### desc:close() ####
-<a name="qtwidget.desc.close"/>
+<a name="qtwidget.desc.close"></a>
Function `desc:close()` closes the [qt.QtLuaPainter](#qtluapainter).
In the case of a drawing port descriptor returned by function
[qtwidget.newwindow](#qtwidgetnewwindow),
-this function also closes the [qt.QWidget](..:qtgui:index#qwidget)
+this function also closes the [qt.QWidget](qtgui.md#qwidget)
and the windows disappears from the screen.
-<a name="qtwidget.desc.resize"/>
+<a name="qtwidget.desc.resize"></a>
#### desc:resize(w,h) ####
Function `desc:resize(w,h)` is only available for
@@ -302,7 +302,7 @@ drawing port descriptor returned by function
It resizes the underlying widget.
-<a name="qtwidget.desc.onResize"/>
+<a name="qtwidget.desc.onResize"></a>
#### desc:onResize(f) ####
Function `desc:onResize(f)` is only available for
@@ -315,7 +315,7 @@ Each call of `desc:onResize` replaces the previous callback function by `f`.
Calling it with argument `nil` removes the current callback.
-<a name="qtwidget.desc.valid"/>
+<a name="qtwidget.desc.valid"></a>
#### desc:valid() ####
Expression `desc:valid()` returns `false` if the
@@ -324,30 +324,30 @@ for instance because the window has been closed.
Otherwise it returns `true`.
-<a name="qtwidget.classes"/>
+<a name="qtwidget.classes"></a>
## Classes ##
-<a name="qtlualistener"/>
+<a name="qtlualistener"></a>
### qt.QtLuaListener ###
Class `QtLuaListener` emits signals when its parent receives event messages.
This is convenient because the Lua program can define event handling functions
-using the signal connection function [qt.connect](..:qt:index#qt.connect).
+using the signal connection function [qt.connect](qt.md#qt.connect).
-<a name="qtlualistener"/>
+<a name="qtlualistener"></a>
#### qt.QtLuaListener(qwidget) ####
Expression `qt.QtLuaListener(qwidget)` returns a new `QtLuaListener` object
that relays the event messages received by widget `qwidget`.
This object is a child of `qwidget`.
-<a name="qtlualistener.sigClose"/>
+<a name="qtlualistener.sigClose"></a>
#### [QtLuaListener signal] sigClose() ####
Signal `sigClose` is emitted when the underlying widget receives a
[QCloseEvent](http://doc.trolltech.com/4.4/qcloseevent.html).
-<a name="qtlualistener.sigResize"/>
+<a name="qtlualistener.sigResize"></a>
#### [QtLuaListener signal] sigResize(int,int) ####
Signal `sigResize` is emitted whenever the underlying widget receives a
@@ -355,7 +355,7 @@ Signal `sigResize` is emitted whenever the underlying widget receives a
because it has changed size. The two arguments are the new widget size.
-<a name="qtlualistener.sigKeyPress"/>
+<a name="qtlualistener.sigKeyPress"></a>
#### [QtLuaListener signal] sigKeyPress(QString,QByteArray,QByteArray) ####
Signal `sigKeyPress` is emitted whenever the underlying widget receives a
@@ -369,7 +369,7 @@ The third argument is a string containing the
separated by a vertical bar.
-<a name="qtlualistener.sigKeyRelease"/>
+<a name="qtlualistener.sigKeyRelease"></a>
#### [QtLuaListener signal] sigKeyRelease(QString,QByteArray,QByteArray) ####
Signal `sigKeyRelease` is emitted whenever the underlying widget receives a
@@ -384,7 +384,7 @@ separated by a vertical bar.
-<a name="qtlualistener.sigMousePress"/>
+<a name="qtlualistener.sigMousePress"></a>
#### [QtLuaListener signal] sigMousePress(int,int,QByteArray,QByteArray,QByteArray) ####
Signal `sigMousePress` is emitted whenever the underlying widget receives a
@@ -402,7 +402,7 @@ separated by a vertical bar.
-<a name="qtlualistener.sigMouseRelease"/>
+<a name="qtlualistener.sigMouseRelease"></a>
#### [QtLuaListener signal] sigMouseRelease(int,int,QByteArray,QByteArray,QByteArray) ####
Signal `sigMouseRelease` is emitted whenever the underlying widget receives a
@@ -418,7 +418,7 @@ separated by a vertical bar.
The fifth argument is a string containing the names of all depressed buttons
separated by a vertical bar.
-<a name="qtlualistener.sigMouseDoubleClick"/>
+<a name="qtlualistener.sigMouseDoubleClick"></a>
#### [QtLuaListener signal] sigMouseDoubleClick(int,int,QByteArray,QByteArray,QByteArray) ####
Signal `sigMouseRelease` is emitted whenever the underlying widget receives a
@@ -434,7 +434,7 @@ separated by a vertical bar.
The fifth argument is a string containing the names of all depressed buttons
separated by a vertical bar.
-<a name="qtlualistener.sigMouseMove"/>
+<a name="qtlualistener.sigMouseMove"></a>
#### [QtLuaListener signal] sigMouseMove(int,int,QByteArray,QByteArray) ####
Signal `sigMouseRelease` is emitted whenever the underlying widget receives a
@@ -452,7 +452,7 @@ separated by a vertical bar.
-<a name="qtlualistener.sigEnter"/>
+<a name="qtlualistener.sigEnter"></a>
#### [QtLuaListener signal] sigEnter(bool) ####
Signal `sigEnter` is emitted whenever the underlying widget receives an
@@ -463,7 +463,7 @@ or
The boolean argument indicates whether the mouse pointer has just
entered or left the widget area.
-<a name="qtlualistener.sigFocus"/>
+<a name="qtlualistener.sigFocus"></a>
#### [QtLuaListener signal] sigFocus(bool) ####
Signal `sigEnter` is emitted whenever the underlying widget receives
@@ -471,7 +471,7 @@ a [QFocusEvent](http://doc.trolltech.com/4.4/qfocusevent.html).
The boolean argument indicates whether the widget has just gained
or just lost the keyboard focus.
-<a name="qtlualistener.sigShow"/>
+<a name="qtlualistener.sigShow"></a>
#### [QtLuaListener signal] sigShow(bool) ####
Signal `sigEnter` is emitted whenever the underlying widget receives
@@ -481,13 +481,13 @@ The boolean argument indicates whether the widget has just been
shown or just been hidden.
-<a name="qtlualistener.sigPaint"/>
+<a name="qtlualistener.sigPaint"></a>
#### [QtLuaListener signal] sigPaint() ####
Signal `sigEnter` is emitted whenever the underlying widget receives
a [QPaintEvent](http://doc.trolltech.com/4.4/qpaintevent.html).
-<a name="qtluapainter"/>
+<a name="qtluapainter"></a>
### qt.QtLuaPainter ###
Painting in Qt is usually achieved using class
@@ -499,8 +499,9 @@ the QtLua class `QtLuaPainter` defines a Qt object that
exposes the painting capabilities of Qt in a more flexible way.
Instances of class `QtLuaPainter` can target:
- * Any image stored in memory represented as a [qt.QImage](..:qtgui:index#qimage) or a [qt.QPixmap](..:qtgui:index#qpixmap).
- * Any widget represented as a [qt.QWidget](..:qtgui:index#qwidget).
+
+ * Any image stored in memory represented as a [qt.QImage](qtgui.md#qimage) or a [qt.QPixmap](qtgui.md#qpixmap).
+ * Any widget represented as a [qt.QWidget](qtgui.md#qwidget).
* Any `QPaintDevice` encapsulated in a Qt object class such as class [qt.QtLuaPrinter](#qtluaprinter).
Class `QtLuaPainter` provides an automatic buffering
@@ -516,22 +517,22 @@ class [QPainter](http://doc.trolltech.com/4.4/qpainter.html)
accurately describes how the painter settings affects drawing operations.
-<a name="qtluapainter"/>
+<a name="qtluapainter"></a>
#### qt.QtLuaPainter(...) ####
Function `qt.QtLuaPainter` constructs a new `QtLuaPainter` instance.
-<a name="qtluapainter"/>
+<a name="qtluapainter"></a>
#### qt.QtLuaPainter(qimage) ####
Constructs a painter instance that targets an offscreen image.
The image is initialized with a copy of the
-[qt.QImage](..:qtgui:index#qimage)
+[qt.QImage](qtgui.md#qimage)
passed as argument. Painting operations do not modify the image
passed as argument. Instead a copy of the current image can be
accessed using expression [painter:image()](#paintergrab).
-<a name="qtluapainter"/>
+<a name="qtluapainter"></a>
#### qt.QtLuaPainter(filename, [format]) ####
Constructs a painter instance that targets an offscreen image
@@ -541,7 +542,7 @@ The file format is determined by the optional string
Use expression [painter.image()](#paintergrab) to
obtain a copy of the offscreen image.
-<a name="qtluapainter"/>
+<a name="qtluapainter"></a>
#### qt.QtLuaPainter(w,h,[monoflag]) ####
Constructs a painter instance that targets an offscreen image
@@ -551,25 +552,25 @@ the image is a 32 bits RGBA image.
Use expression [painter.image()](#paintergrab) to
obtain a copy of the offscreen image.
-<a name="qtluapainter"/>
+<a name="qtluapainter"></a>
#### qt.QtLuaPainter(qpixmap) ####
Constructs a painter instance that targets a
device-dependent pixmap in memory.
The pixmap is initialized with a copy of
-the [qt.QPixmap](..:qtgui:index#qpixmap) passed as argument.
+the [qt.QPixmap](qtgui.md#qpixmap) passed as argument.
Use expression [painter:pixmap()](#painterpixmap).
to obtain a copy of the target pixmap.
Since Qt only supports painting a device-dependent `QPixmap` from
-the main thread, one must use [qt.pcall](..:qt:index#qt.qcall)
+the main thread, one must use [qt.pcall](qt.md#qt.qcall)
to ensure that painting operations are performed from the main thread.
Otherwise Qt prints a lot of warnings and behaves erratically.
-<a name="qtluapainter"/>
+<a name="qtluapainter"></a>
#### qt.QtLuaPainter(qwidget,[buffered]) ####
Constructs a painter instance that targets the
-specified [qt.QWidget](..:qtgui:index#qwidget).
+specified [qt.QWidget](qtgui.md#qwidget).
The resulting painter is a child of `qwidget`.
The optional boolean argument `buffered` indicates
whether drawing should be performed in a offscreen buffer
@@ -579,7 +580,7 @@ create a buffered painter.
A buffered painter always draws onto an offscreen image
and ensures that the widget surface is automatically refreshed or
updated when needed. Since the painting functions target
-a [qt.QImage](..:qtgui:index#qimage),
+a [qt.QImage](qtgui.md#qimage),
they can be called from any thread at any time.
This is the recommended mode of operation.
@@ -593,7 +594,7 @@ Unbuffered widget painters are therefore difficult to use for painting;
they are mostly useful for grabbing the on-screen representation
of a widget using function [painter.image()](#paintergrab).
-<a name="qtluapainter"/>
+<a name="qtluapainter"></a>
#### qt.QtLuaPainter(object) ####
Constructs a painter instance that target the output
@@ -606,12 +607,12 @@ that indicates that the object is being destroyed.
Class [qt.QtLuaPrinter](#qtluaprinter) does all this.
-<a name="qtluapainter.properties"/>
+<a name="qtluapainter.properties"></a>
#### QtLuaPainter Properties ####
-<a name="qtluapainterangleunit"/>
+<a name="qtluapainterangleunit"></a>
##### painter.angleUnit #####
-<a name="qtluapainter.angleUnit"/>
+<a name="qtluapainter.angleUnit"></a>
This property contains a string defining how arguments
representing angles are interpreted in painter functions
@@ -620,40 +621,40 @@ The acceptable values are the strings `"Degrees"` and `"Radians"`.
The default unit is the degree.
-<a name="qtluapainterbackground"/>
+<a name="qtluapainterbackground"></a>
##### painter.background #####
-<a name="qtluapainter.background"/>
+<a name="qtluapainter.background"></a>
-This property contains the [qt.QBrush](..:qtgui:index#qbrush)
+This property contains the [qt.QBrush](qtgui.md#qbrush)
used to draw the spaces in stippled lines, the text background,
and the zero color of bitonal images.
The default background brush is an empty brush
meaning that these pixels are not painted at all.
-<a name="qtluapainterbrush"/>
+<a name="qtluapainterbrush"></a>
##### painter.brush #####
-<a name="qtluapainter.painter"/>
+<a name="qtluapainter.painter"></a>
Property `painter.brush` contains a Qt variant of class
-[qt.QBrush](..:qtgui:index#qbrush) representing the painter settings
+[qt.QBrush](qtgui.md#qbrush) representing the painter settings
that determine how function [painter:fill](#painterfill)
fills shapes and how function [painter:show](#painterfill)
draws text.
-<a name="qtluapainterclippath"/>
+<a name="qtluapainterclippath"></a>
##### painter.clippath #####
-<a name="qtluapainter.clippath"/>
+<a name="qtluapainter.clippath"></a>
Property `painter.clippath` contient a Qt variant of class
-[qt.QPainterPath](..:qtgui:index#qpainterpath)
+[qt.QPainterPath](qtgui.md#qpainterpath)
representing the boundary
of the current clipping region. Drawing operations
only modify pixels located within the clip region.
An empty path means that no clipping is performed.
-<a name="qtluapaintercompositionmode"/>
+<a name="qtluapaintercompositionmode"></a>
##### painter.compositionMode #####
-<a name="qtluapainter.compositionMode"/>
+<a name="qtluapainter.compositionMode"></a>
The
[composition mode](http://doc.trolltech.com/4.4/qpainter.html#CompositionMode-enum)
@@ -667,26 +668,26 @@ In particular printers often support only the default composition mode.
When a composition mode is not supported, the Qt library prints a warning.
-<a name="qtluapainterdepth"/>
+<a name="qtluapainterdepth"></a>
##### painter.depth #####
-<a name="qtluapainter.depth"/>
+<a name="qtluapainter.depth"></a>
Expression `painter.depth` returns the color depth
of the target surface for drawings.
A depth of `1` indicates a bitonal surface.
A depth of `24` or `32` indicates a true color surface.
-<a name="qtluapainterfont"/>
+<a name="qtluapainterfont"></a>
##### painter.font #####
-<a name="qtluapainter.font"/>
+<a name="qtluapainter.font"></a>
Property `painter.font` contient a Qt variant of class
-[qt.QFont](..:qtgui:index#qfont) representing the font settings
+[qt.QFont](qtgui.md#qfont) representing the font settings
used for drawing text.
-<a name="qtluapainterheight"/>
+<a name="qtluapainterheight"></a>
##### painter.height #####
-<a name="qtluapainter.height"/>
+<a name="qtluapainter.height"></a>
Expression `painter.height` returns the height of
the drawing surface expressed in pixels.
@@ -695,21 +696,21 @@ is not affected by the current transformation matrix.
It corresponds to the default coordinate system
set by [painter:initmatrix](#painterinitmatrix).
-<a name="qtluapaintermatrix"/>
+<a name="qtluapaintermatrix"></a>
##### painter.matrix #####
-<a name="qtluapainter.matrix"/>
+<a name="qtluapainter.matrix"></a>
Property `painter.font` contient a Qt variant of class
-[qt.QTransform](..:qtgui:index#qtransform) representing
+[qt.QTransform](qtgui.md#qtransform) representing
how coordinates passed to the path construction functions
are transformed into device depending coordinates.
-<a name="qtluapainterpath"/>
+<a name="qtluapainterpath"></a>
##### painter.path #####
-<a name="qtluapainter.path"/>
+<a name="qtluapainter.path"></a>
Property `painter.path` contient a Qt variant of class
-[qt.QPainterPath](..:qtgui:index#qpainterpath)
+[qt.QPainterPath](qtgui.md#qpainterpath)
representing the current path.
A path is a mathematical boundary delimiting regions in the plane.
The current path is used implicitely by functions
@@ -718,29 +719,29 @@ and [painter:stroke](#painterstroke).
The current path is modified by a rich collection
of path defining functions.
-<a name="qtluapainterpen"/>
+<a name="qtluapainterpen"></a>
##### painter.pen #####
-<a name="qtluapainter.pen"/>
+<a name="qtluapainter.pen"></a>
Property `painter.pen` contains a Qt variant of class
-[qt.QPen](..:qtgui:index#qpen) representing the painter settings
+[qt.QPen](qtgui.md#qpen) representing the painter settings
that determine how function [painter:stroke](#painterfill)
draws shapes.
-<a name="qtluapainterpoint"/>
+<a name="qtluapainterpoint"></a>
##### painter.point #####
-<a name="qtluapainter.point"/>
+<a name="qtluapainter.point"></a>
Property `painter.point` contient a Qt variant of class
-[qt.QPointF](..:qtcore:index#qpoint) representing the
+[qt.QPointF](qtcore.md#qpoint) representing the
coordinates of the current point. These coordinates
are used and updated implicitely by the majority
of the path construction functions.
-<a name="qtluapainterrenderhints"/>
+<a name="qtluapainterrenderhints"></a>
##### painter.renderHints #####
-<a name="qtluapainter.renderHints"/>
+<a name="qtluapainter.renderHints"></a>
[Rendering hints](http://doc.trolltech.com/4.4/qpainter.html#RenderHint-enum)
are flags controlling the quality of the drawing operations.
@@ -749,18 +750,18 @@ the names of the active rendering flags (without the prefix `QPainter::`)
separated with a vertical bar "`|`" symbolizing a boolean `or` operator.
-<a name="qtluapainterstylesheet"/>
+<a name="qtluapainterstylesheet"></a>
##### painter.styleSheet #####
-<a name="qtluapainter.styleSheet"/>
+<a name="qtluapainter.styleSheet"></a>
This property contains a string containing a CSS style sheet
that is used when drawing rich text with
function [show](#paintershow).
-<a name="qtluapainterwidth"/>
+<a name="qtluapainterwidth"></a>
##### painter.width #####
-<a name="qtluapainter.width"/>
+<a name="qtluapainter.width"></a>
Expression `painter.width` returns the width of
the drawing surface expressed in pixels.
@@ -770,7 +771,7 @@ It corresponds to the default coordinate system
set by [painter:initmatrix](#painterinitmatrix).
-<a name="qtluapainterfunctions"/>
+<a name="qtluapainterfunctions"></a>
#### QtLuaPainter Functions ####
Class `QtLuaPainter` provides a broad array of
@@ -780,7 +781,7 @@ Additional functions provide capabilities
that are unique to the Qt platform.
-<a name="qtluapainter.arc"/>
+<a name="qtluapainter.arc"></a>
##### painter:arc(x,y,r,angle1,angle2) #####
Expression `painter:arc(x,y,r,angle1,angle2)`
@@ -800,7 +801,7 @@ The default angle unit is the degree.
See also: PostScript operator `arc`.
-<a name="qtluapainter.arcn"/>
+<a name="qtluapainter.arcn"></a>
##### painter:arcn(x,y,r,angle1,angle2) #####
Expression `painter:arcn(x,y,r,angle1,angle2)`
@@ -819,7 +820,7 @@ The default angle unit is the degree.
See also: PostScript operator `arcn`.
-<a name="qtluapainter.arcto"/>
+<a name="qtluapainter.arcto"></a>
##### painter:arcto(x1,y1,x2,y2,r) #####
Expression `painter:arcto(x1,y1,x2,y2,r)`
@@ -835,7 +836,7 @@ The second endpoint becomes the new current point.
See also: PostScript operators `arct` and `arcto`.
-<a name="qtluapainter.charpath"/>
+<a name="qtluapainter.charpath"></a>
##### painter:charpath(string) #####
Expression `painter:charpath(string)`
@@ -851,9 +852,9 @@ After calling this function, the current point is left unset.
See also: PostScript operators `charpath`.
-<a name="painterclip"/>
+<a name="painterclip"></a>
##### painter:clip(optnewpath) #####
-<a name="qtluapainter.clip"/>
+<a name="qtluapainter.clip"></a>
Function `painter:clip` intersects the
[current clip region](#qtluapainterclippath)
@@ -880,9 +881,9 @@ to restore the initial clip region.
See also: PostScript operator `clip`.
-<a name="painterclose"/>
+<a name="painterclose"></a>
##### painter:close() #####
-<a name="qtluapainter.close"/>
+<a name="qtluapainter.close"></a>
Expression `painter:close()` detaches
the `QtLuaPainter` object from the underlying widget.
@@ -892,7 +893,7 @@ be closed before the underlying widget
or printer is destroyed.
-<a name="qtluapainter.closepath"/>
+<a name="qtluapainter.closepath"></a>
##### painter:closepath() #####
Expression `painter:closepath()`
@@ -912,7 +913,7 @@ the current point is left unset.
See also: PostScript operator `closepath`.
-<a name="qtluapainter.concat"/>
+<a name="qtluapainter.concat"></a>
##### painter:concat(qtransform) #####
Expression `painter:concat(qtransform)`
@@ -927,7 +928,7 @@ It is much easier to use functions
See also: PostScript operator `concat`.
-<a name="qtluapainter.currentangleunit"/>
+<a name="qtluapainter.currentangleunit"></a>
##### painter:currentangleunit() #####
Expression `painter:currentangleunit()` returns the
@@ -937,45 +938,45 @@ Possible values are strings `"Degrees"` and `"Radians"`.
The default angle unit are degrees.
-<a name="qtluapainter.currentbackground"/>
+<a name="qtluapainter.currentbackground"></a>
##### painter:currentbackground() #####
Expression `painter:currentbackground()`
-returns a [qt.QBrush](..:qtgui:index#qbrush)
+returns a [qt.QBrush](qtgui.md#qbrush)
representing the [current background brush](#qtluapainterbackground)
used for displaying the backgrounds when painting
dashed line, text, or bitonal images.
The default is an empty brush.
-<a name="qtluapainter.currentbrush"/>
+<a name="qtluapainter.currentbrush"></a>
##### painter:currentbrush() #####
Expression `painter:currentbrush()`
-returns a [qt.QBrush](..:qtgui:index#qbrush)
+returns a [qt.QBrush](qtgui.md#qbrush)
representing the [current brush](#qtluapainterbrush)
used for filling path with [painter:fill()](#painterfill).
The default is an empty brush.
-<a name="qtluapainter.currentclip"/>
+<a name="qtluapainter.currentclip"></a>
##### painter:currentclip() #####
Expression `painter:currentclip()`
-returns a [QPainterPath](..:qtgui:index#qpainterpath)
+returns a [QPainterPath](qtgui.md#qpainterpath)
representing the [current clip region](#qtluapainterclippath).
-<a name="qtluapainter.currentcolor"/>
+<a name="qtluapainter.currentcolor"></a>
##### painter:currentcolor() #####
Expression `painter:currentcolor()`
returns four numbers representing the
red, green, blue, and alpha components
-of the color of the [current brush](..:qtgui:index#qbrush).
+of the color of the [current brush](qtgui.md#qbrush).
This numbers range from zero to one.
-<a name="qtluapainter.currentdash"/>
+<a name="qtluapainter.currentdash"></a>
##### painter:currentdash() #####
Expression `painter:currentdash()`
@@ -983,15 +984,15 @@ returns the dash pattern and the dash offset
of the [current pen](#qtluapainterpen).
-<a name="qtluapainter.currentfont"/>
+<a name="qtluapainter.currentfont"></a>
##### painter:currentfont() #####
Expression `painter:currentfont()`
-returns a [QFont](..:qtgui:index#qfont)
+returns a [QFont](qtgui.md#qfont)
describing the [current font](#qtluapainterfont)
for drawing text.
-<a name="qtluapainter.currentfontsize"/>
+<a name="qtluapainter.currentfontsize"></a>
##### painter:currentfontsize() #####
Expression `painter:currentfontsize()`
@@ -999,7 +1000,7 @@ returns the size in points of the
[current font](#qtluapainterfont).
-<a name="qtluapainter.currenthints"/>
+<a name="qtluapainter.currenthints"></a>
##### painter:currenthints() #####
Expression `painter:currenthints()` returns the
@@ -1007,44 +1008,44 @@ Expression `painter:currenthints()` returns the
controlling the quality of the drawings.
-<a name="qtluapainter.currentlinewidth"/>
+<a name="qtluapainter.currentlinewidth"></a>
##### painter:currentlinewidth() #####
Expression `painter:currentlinewidth()` returns
the line width associated with the
[current pen](#qtluapainterpen).
-<a name="qtluapainter.currentmatrix"/>
+<a name="qtluapainter.currentmatrix"></a>
##### painter:currentmatrix() #####
Expression `painter:currentmatrix()` returns a Qt variant of class
-[qt.QTransform](..:qtgui:index#qtransform) representing the
+[qt.QTransform](qtgui.md#qtransform) representing the
[current transformation matrix](#qtluapaintermatrix).
-<a name="qtluapainter.currentmode"/>
+<a name="qtluapainter.currentmode"></a>
##### painter:currentmode() #####
Expression `painter:currentmode()` returns a string representing the
[current composition mode](#qtluapaintercompositionmode).
-<a name="qtluapainter.currentpath"/>
+<a name="qtluapainter.currentpath"></a>
##### painter:currentpath() #####
Expression `painter:currentpath()` returns a Qt variant of class
-[qt.QPainterPath](..:qtgui:index#qpainterpath) representing the
+[qt.QPainterPath](qtgui.md#qpainterpath) representing the
[current path](#qtluapainterpath).
-<a name="qtluapainter.currentpen"/>
+<a name="qtluapainter.currentpen"></a>
##### painter:currentpen() #####
Expression `painter:currentpath()` returns a Qt variant of class
-[qt.QPen](..:qtgui:index#qpen) representing the
+[qt.QPen](qtgui.md#qpen) representing the
[current pen](#qtluapainterpen).
-<a name="qtluapainter.currentpoint"/>
+<a name="qtluapainter.currentpoint"></a>
##### painter:currentpoint() #####
Expression `painter:currentpoint()` returns two numbers
@@ -1052,9 +1053,9 @@ representing the coordinates of the
[current point](#qtluapainterpoint).
-<a name="paintercurrentsize"/>
+<a name="paintercurrentsize"></a>
##### painter:currentsize() #####
-<a name="qtluapainter.currentsize"/>
+<a name="qtluapainter.currentsize"></a>
Expression `painter:currentsize()` returns two numbers
representing the width and height of the drawing are
@@ -1064,9 +1065,9 @@ They correspond to the default coordinate system
sets by [painter:initmatrix](#painterinitmatrix).
-<a name="paintercurrentstylesheet"/>
+<a name="paintercurrentstylesheet"></a>
##### painter:currentstylesheet() #####
-<a name="qtluapainter.currentstylesheet"/>
+<a name="qtluapainter.currentstylesheet"></a>
Expression `painter:currentstylesheet()` returns the
the [current style sheet](#qtluapainterstylesheet)
@@ -1074,9 +1075,9 @@ used by function [show](#paintershow) for
displaying rich text.
-<a name="paintercurveto"/>
+<a name="paintercurveto"></a>
##### painter:curveto(x1,y1,x2,y2,x3,y3) #####
-<a name="qtluapainter.curveto"/>
+<a name="qtluapainter.curveto"></a>
Expression `painter:curveto(x1,y1,x2,y2,x3,y3)`
appends a section of a cubic Bezier curve to the current path.
@@ -1090,9 +1091,9 @@ when the current point is not set
See also: PostScript operator `curveto`.
-<a name="painterdevice"/>
+<a name="painterdevice"></a>
##### painter:device() #####
-<a name="qtluapainter.device"/>
+<a name="qtluapainter.device"></a>
Expression `painter:device()` returns a pointer to the Qt
paint device underlying the painter.
@@ -1103,9 +1104,9 @@ is represented by a Qt variant of type =QPaintDevice*=.
This is not very useful in Lua.
-<a name="paintereoclip"/>
+<a name="paintereoclip"></a>
##### painter:eoclip(optnewpath) #####
-<a name="qtluapainter.eoclip"/>
+<a name="qtluapainter.eoclip"></a>
Function `painter:eoclip` is similar to function
[painter:clip](#painterclip). However the interior of the
@@ -1115,9 +1116,9 @@ instead of the winding rule.
-<a name="paintereofill"/>
+<a name="paintereofill"></a>
##### painter:eofill(optnewpath) #####
-<a name="qtluapainter.eofill"/>
+<a name="qtluapainter.eofill"></a>
Function `painter:eofill` is similar to function
[painter:fill](#painterfill). However the interior of the
@@ -1127,9 +1128,9 @@ instead of the winding rule.
See also: PostScript operator `eofill`.
-<a name="painterfill"/>
+<a name="painterfill"></a>
##### painter:fill(optnewpath) #####
-<a name="qtluapainter.fill"/>
+<a name="qtluapainter.fill"></a>
Function `painter:fill` fills the interior of the
[current path](#qtluapainterpath) using
@@ -1146,9 +1147,9 @@ See function [painter:eofill](#paintereofill) for an alternative.
See also: PostScript operator `fill`.
-<a name="paintergbegin"/>
+<a name="paintergbegin"></a>
##### painter:gbegin() #####
-<a name="qtluapainter.gbegin"/>
+<a name="qtluapainter.gbegin"></a>
Functions [painter:gbegin](#paintergbegin) and
[painter:gend](#paintergend) can be used
@@ -1158,9 +1159,9 @@ usually postponed until the last call to `painter:gend`.
This is useful for implementing smooth transitions
between successive drawings.
-<a name="paintergend"/>
+<a name="paintergend"></a>
##### painter:gend([invalidate]) #####
-<a name="qtluapainter.gend"/>
+<a name="qtluapainter.gend"></a>
Functions [painter:gbegin](#paintergbegin) and
[painter:gend](#paintergend) can be used
@@ -1178,9 +1179,9 @@ the underlying `QPainter` object without
using the `QtLuaPainter` functions.
-<a name="paintergrestore"/>
+<a name="paintergrestore"></a>
##### painter:grestore() #####
-<a name="qtluapainter.grestore"/>
+<a name="qtluapainter.grestore"></a>
Expression `painter:grestore()` restores the painter settings
previously saved by a matching expression [painter:gsave()](#paintergsave).
@@ -1193,9 +1194,9 @@ remain unchanged.
-<a name="paintergsave"/>
+<a name="paintergsave"></a>
##### painter:gsave() #####
-<a name="qtluapainter.gsave"/>
+<a name="qtluapainter.gsave"></a>
Expression `painter:gsave()` records the painter settings
and pushes this information on top of a stack of painter settings.
@@ -1208,12 +1209,12 @@ to bracket code segments that perform some rendering
in order to ensure that the painter settings
remain unchanged.
-<a name="paintergrab"/>
+<a name="paintergrab"></a>
##### painter:image() #####
-<a name="qtluapainter.image"/>
+<a name="qtluapainter.image"></a>
Expression `painter:image()` returns a Qt variant of class
-[qt.QImage](..:qtgui:index#qimage)
+[qt.QImage](qtgui.md#qimage)
representing the drawing surface.
When the underlying surface is a widget without backing store,
@@ -1221,15 +1222,15 @@ this function grabs the widget image from the display.
When the painter operates on a device that cannot be represented
as an image, for instance a printer,
this function returns an empty image for which method
-[tobool](..:qt:index#qt.tobool) returns `false`.
+[tobool](qt.md#qt.tobool) returns `false`.
Note that this function must be invoked without arguments.
Otherwise see the documentation for [painter:image(...)](#painterblit).
-<a name="painterblit"/>
+<a name="painterblit"></a>
##### painter:image(x,y,[w,h],image,[sx,sy,[sw,sh]]) #####
-<a name="qtluapainter.image"/>
+<a name="qtluapainter.image"></a>
Function `painter:image` paints a segment of image `image`
at position `(x,y)` in the current coordinate systems
@@ -1243,16 +1244,15 @@ The default target width `w` and height `h` are
the source width `sw` and height `sh`.
Argument `image` can be a Qt variant of
-class [qt.QImage](..:qtgui:index#qimage)
-or [qt.QPixmap](..:qtgui:index#qpixmap)
+class [qt.QImage](qtgui.md#qimage)
+or [qt.QPixmap](qtgui.md#qpixmap)
or a Qt object of class [qt.QtLuaPainter](#qtluapainter).
In the latter case, the function
[painter:image()](#paintergrab) without arguments
is used to obtain the source surface.
* To blit an image `img` constructed with [qtwidget.newimage](#qtwidgetnewimage), you must specify the associated painter [img.port](#descport).
-
- * To blit a [torch.Tensor](..:torch:index#Tensor), first create a [qt.QImage](..:qtgui:index#qimage) using the function [qt.QImage.fromTensor](..:qttorch:index#qimagefromtensor) from by package [qttorch](..:qttorch:index).
+ * To blit a [torch.Tensor](..:torch:index#Tensor), first create a [qt.QImage](qtgui.md#qimage) using the function [qt.QImage.fromTensor](qt.md#qimagefromtensor) from by package [qttorch](qt.md).
Blit is of course affected by
the [current composition mode](#qtluapaintercompositionmode).
@@ -1263,9 +1263,9 @@ Otherwise see the documentation for [painter:image()](#paintergrab).
See also: PostScript operator `image`.
-<a name="painterinitclip"/>
+<a name="painterinitclip"></a>
##### painter:initclip() #####
-<a name="qtluapainter.initclip"/>
+<a name="qtluapainter.initclip"></a>
Expression `painter:initclip()` resets the
[current clip region](#qtluapainterclippath)
@@ -1278,9 +1278,9 @@ by a subsequent drawing operation.
See also: PostScript operator `initclip`.
-<a name="painterinitgraphics"/>
+<a name="painterinitgraphics"></a>
##### painter:initgraphics() #####
-<a name="qtluapainter.initgraphics"/>
+<a name="qtluapainter.initgraphics"></a>
Expression `painter:initgraphics()` resets
all painter settings to their default values.
@@ -1300,9 +1300,9 @@ After calling this function:
See also: PostScript operator `initgraphics`.
-<a name="painterinitmatrix"/>
+<a name="painterinitmatrix"></a>
##### painter:initmatrix() #####
-<a name="qtluapainter.initmatrix"/>
+<a name="qtluapainter.initmatrix"></a>
Expression `painter:initmatrix()` resets the
[current transformation matrix](#qtluapaintermatrix)
@@ -1316,7 +1316,7 @@ on most devices.
See also: PostScript operator `initmatrix`.
-<a name="qtluapainter.lineto"/>
+<a name="qtluapainter.lineto"></a>
##### painter:lineto(x,y) #####
Expression `painter:lineto(x,y)` appends
@@ -1332,7 +1332,7 @@ when the current point is not set
See also: PostScript operator `lineto`.
-<a name="qtluapainter.moveto"/>
+<a name="qtluapainter.moveto"></a>
##### painter:moveto(x,y) #####
Expression `painter:moveto(x,y)` terminates the
@@ -1344,27 +1344,27 @@ See also: PostScript operator `moveto`.
##### painter:newpath() #####
![](anchor:painternewpath)
-<a name="qtluapainter.newpath"/>
+<a name="qtluapainter.newpath"></a>
Expression `painter:newpath()` terminates the last subpath.
After calling this function, the current point is left unset.
See also: PostScript operator `newpath`.
-<a name="painterobject"/>
+<a name="painterobject"></a>
##### painter:object() #####
-<a name="qtluapainter.object"/>
+<a name="qtluapainter.object"></a>
Expression `painter:object()` returns the Qt object
that represents the paint device if such an object exists.
Typical return values are instance of class
-[qt.QWidget](..:qtgui:index#qwidget) or class
+[qt.QWidget](qtgui.md#qwidget) or class
[qt.QtLuaPrinter](#qtluaprinter).
-<a name="painterpainter"/>
+<a name="painterpainter"></a>
##### painter:painter() #####
-<a name="qtluapainter.painter"/>
+<a name="qtluapainter.painter"></a>
Expression `painter:painter()` returns a pointer
to the underlying Qt painter.
@@ -1374,21 +1374,21 @@ is neither a Qt variant not a Qt object, this pointer
is represented by a Qt variant of type =QPainter*=.
-<a name="painterpixmap"/>
+<a name="painterpixmap"></a>
##### painter:pixmap() #####
-<a name="qtluapainter.pixmap"/>
+<a name="qtluapainter.pixmap"></a>
Expression `painter:pixmap()` returns a Qt variant of class
-[qt.QPixmap](..:qtgui:index#qpixmap) representing the drawing surface.
+[qt.QPixmap](qtgui.md#qpixmap) representing the drawing surface.
When the underlying surface is a widget without backing store,
this function grabs the widget representation from the display.
When the painter operates on a device that cannot be represented
as a pixmap, for instance a printer,
this function returns an empty pixmap for which method
-[tobool](..:qt:index#qt.tobool) returns `false`.
+[tobool](qt.md#qt.tobool) returns `false`.
-<a name="qtluapainter.printer"/>
+<a name="qtluapainter.printer"></a>
##### painter:printer() #####
Expression `painter:printer()` returns a pointer
@@ -1400,7 +1400,7 @@ is represented by a Qt variant of type =QPrinter*=.
-<a name="qtluapainter.rcurveto"/>
+<a name="qtluapainter.rcurveto"></a>
##### painter:rcurveto(x1,y1,x2,y2,x3,y3) #####
This is similar to calling function
@@ -1408,7 +1408,7 @@ This is similar to calling function
with the following arguments
```lua
- painter:curveto(x0+x1,y0+y1,x0+x2,y0+y2,x0+x3,y0+y3)
+painter:curveto(x0+x1,y0+y1,x0+x2,y0+y2,x0+x3,y0+y3)
```
where `(x0,y0)` are the coordinates of the previous
@@ -1419,11 +1419,11 @@ when the current point is not set.
See also: PostScript operator `rcurveto`.
-<a name="qtluapainter.rect"/>
+<a name="qtluapainter.rect"></a>
##### painter:rect() #####
Expression `painter:rect()` returns a Qt variant
-of class [=qt.QRect](..:qtcore:index#qrect)
+of class [=qt.QRect](qtcore.md#qrect)
representing the pixel coordinates of the drawing surface.
This does not depend on the transformation matrix
but corresponds to the default coordinate system
@@ -1435,7 +1435,7 @@ or properties [painter.width](#qtluapainterwidth)
and [painter.height](#qtluapainterheight).
-<a name="qtluapainter.rectangle"/>
+<a name="qtluapainter.rectangle"></a>
##### painter:rectangle(x,y,w,h) #####
Expression `painter:rectangle(x,y,w,h)`
@@ -1448,7 +1448,7 @@ the current point is left unset.
-<a name="qtluapainter.refresh"/>
+<a name="qtluapainter.refresh"></a>
##### painter:refresh() #####
Expression `painter:refresh()` immediately
@@ -1459,7 +1459,7 @@ regardless of the nesting count of functions
-<a name="qtluapainter.rlineto"/>
+<a name="qtluapainter.rlineto"></a>
##### painter:rlineto(rx,ry) #####
Expression `painter:lineto(x,y)` appends a line segment
@@ -1473,7 +1473,7 @@ when the current point is not set
See also: PostScript operator `rlineto`.
-<a name="qtluapainter.rmoveto"/>
+<a name="qtluapainter.rmoveto"></a>
##### painter:rmoveto(rx,ry) #####
Expression `painter:moveto(x,y)` terminates the
@@ -1487,9 +1487,9 @@ when the current point is not set
See also: PostScript operator `rmoveto`.
-<a name="painterrotate"/>
+<a name="painterrotate"></a>
##### painter:rotate(angle) #####
-<a name="qtluapainter.rotate"/>
+<a name="qtluapainter.rotate"></a>
Expression `painter:rotate(angle)`
rotates the axes of the coordinate system by `angle` angle units
@@ -1503,9 +1503,9 @@ The default angle unit is the degree.
See also: PostScript operator `rotate`.
-<a name="painterscale"/>
+<a name="painterscale"></a>
##### painter:scale(sx,sy) #####
-<a name="qtluapainter.scale"/>
+<a name="qtluapainter.scale"></a>
Expression `scale(sx,sy)` scales the units of the
coordinate space by a factor of `sx` horizontally and
@@ -1515,9 +1515,9 @@ the orientation of the axes are unaffected.
See also: PostScript operator `scale`.
-<a name="paintersetangleunit"/>
+<a name="paintersetangleunit"></a>
##### painter:setangleunit(unit) #####
-<a name="qtluapainter.setangleunit"/>
+<a name="qtluapainter.setangleunit"></a>
Expression `painter:setangleunit(unit)` sets the
[angle unit](#qtluapainterangleunit)
@@ -1530,33 +1530,33 @@ or `"Radians"` for expressing angles in radians.
The default angle unit is the degree.
-<a name="qtluapainter.setbackground"/>
+<a name="qtluapainter.setbackground"></a>
##### painter:setbackground(brush) #####
Expression `painter:setbackground(brush)` sets the
[current background brush](#qtluapainterbackground).
Argument `brush` must be a Qt variant of type
-[qt.QBrush](..:qtgui:index#qbrush).
+[qt.QBrush](qtgui.md#qbrush).
-<a name="qtluapainter.setbrush"/>
+<a name="qtluapainter.setbrush"></a>
##### painter:setbrush(brush) #####
Expression `painter:setbrush(brush)` sets the
[current brush](#qtluapainterbrush).
Argument `brush` must be a Qt variant of type
-[qt.QBrush](..:qtgui:index#qbrush).
+[qt.QBrush](qtgui.md#qbrush).
-<a name="qtluapainter.setclip"/>
+<a name="qtluapainter.setclip"></a>
##### painter:setclip(qpainterpath) #####
Expression `painter:setclip(qpainterpath)` sets the
[current clipping region](#qtluapainterclippath)
to be the interior of the specified path.
Argument `brush` must be a Qt variant of type
-[qt.QPainterPath](..:qtgui:index#qpainterpath).
+[qt.QPainterPath](qtgui.md#qpainterpath).
-<a name="qtluapainter.setcolor"/>
+<a name="qtluapainter.setcolor"></a>
##### painter:setcolor(...) #####
Function `painter:setcolor` sets the color of both the
@@ -1568,7 +1568,7 @@ There are several ways to specify a color:
__`painter:setcolor(qcolor)`__
Argument `qcolor` is a Qt variant of
-class [qt.QColor](..:qtgui:index#qcolor).
+class [qt.QColor](qtgui.md#qcolor).
__`painter:setcolor(string)`__
@@ -1586,7 +1586,7 @@ representing the intensities of the red, green, blue, and alpha channels.
The default value for argument `a` is `1` for a fully opaque color.
-<a name="qtluapainter.setdash"/>
+<a name="qtluapainter.setdash"></a>
##### painter:setdash([sizes,[offset]]) #####
Function `painter:setdash` changes the
@@ -1608,15 +1608,15 @@ The optional argument `offset` is a length
representing the starting position of the dash sequence.
-<a name="qtluapainter.setfont"/>
+<a name="qtluapainter.setfont"></a>
##### painter:setfont(qfont) #####
Expression `painter:setfont(qfont)` sets the
[current font](#qtluapainterfont).
Argument `font` must be a Qt variant of type
-[qt.QFont](..:qtgui:index#qfont).
+[qt.QFont](qtgui.md#qfont).
-<a name="qtluapainter.setfontsize"/>
+<a name="qtluapainter.setfontsize"></a>
##### painter:setfontsize(size) #####
Expression `painter:setfontsize(size)` changes the size
@@ -1624,7 +1624,7 @@ of the [current font](#qtluapainterfont).
Argument `size` must be a positive number.
-<a name="qtluapainter.sethints"/>
+<a name="qtluapainter.sethints"></a>
##### painter:sethints(hints) #####
Expression `painter:sethints(hints)` sets the
@@ -1635,23 +1635,23 @@ a concatenation of the names of the active
separated with a vertical bar "`|`".
-<a name="qtluapainter.setlinewidth"/>
+<a name="qtluapainter.setlinewidth"></a>
##### painter:setlinewidth(lw) #####
Expression `painter:setlinewidth(lw)` changes the line width
of the [current pen](#qtluapainterpen).
Argument `lw` must be a positive number.
-<a name="qtluapainter.setmatrix"/>
+<a name="qtluapainter.setmatrix"></a>
##### painter:setmatrix(qtransform) #####
Expression `painter:setmatrix(qtransform)` sets the
[current transformation matrix](#qtluapaintermatrix).
Argument `qtransform` must be a Qt variant of type
-[qt.QTransform](..:qtgui:index#qtransform).
+[qt.QTransform](qtgui.md#qtransform).
-<a name="qtluapainter.setmode"/>
+<a name="qtluapainter.setmode"></a>
##### painter:setmode(compositionmode) #####
Expression `painter:setmode(compositionmode)` sets the
@@ -1661,16 +1661,16 @@ Argument `compositionmode` must be a string containing the name of a
[composition mode](http://doc.trolltech.com/4.4/qpainter.html#CompositionMode-enum).
-<a name="qtluapainter.setpath"/>
+<a name="qtluapainter.setpath"></a>
##### painter:setpath(qpainterpath) #####
Expression `painter:setpath(qpainterpath)` sets the
[current path](#qtluapainterpath).
Argument `qpainterpath` must be a Qt variant of type
-[qt.QPainterPath](..:qtgui:index#qpainterpath).
+[qt.QPainterPath](qtgui.md#qpainterpath).
-<a name="qtluapainter.setpattern"/>
+<a name="qtluapainter.setpattern"></a>
##### painter:setpattern(pattern,[x,y]) #####
Expression `painter:setpattern(pattern,[x,y])`
@@ -1679,7 +1679,7 @@ This brush is used to set both the [current brush](#qtluapainterbrush)
and the brush of the [current pen](#qtluapainterpen).
Argument `p` can be either a Qt variant
-of type [qt.QImage](..:qtgui:index#qimage) or an object
+of type [qt.QImage](qtgui.md#qimage) or an object
equipped with a method `image` returning a suitable image.
Such objects include instances of [qt.QtLuaPainter](#qtluapainter)
as well as the return values of functions
@@ -1690,16 +1690,16 @@ The optional arguments `x` and `y` specify
the origin of the pattern in the source image.
-<a name="qtluapainter.setpen"/>
+<a name="qtluapainter.setpen"></a>
##### painter:setpen(qpen) #####
Expression `painter:setpen(qpen)` sets the
[current pen](#qtluapainterpen).
Argument `qpen` must be a Qt variant of type
-[qt.QPen](..:qtgui:index#qpen).
+[qt.QPen](qtgui.md#qpen).
-<a name="qtluapainter.setpoint"/>
+<a name="qtluapainter.setpoint"></a>
##### painter:setpoint(x,y) #####
Expression `painter:setpoint(x,y)` sets the
@@ -1707,7 +1707,7 @@ Expression `painter:setpoint(x,y)` sets the
Arguments `x` and `y` must be valid numbers.
-<a name="qtluapainter.setstylesheet"/>
+<a name="qtluapainter.setstylesheet"></a>
##### painter:setstylesheet(s) #####
Expression `painter:setstylesheet(s)` sets the
@@ -1717,9 +1717,9 @@ displaying rich text.
-<a name="paintershow"/>
+<a name="paintershow"></a>
##### painter:show(string,[x,y,w,h,textflags]) #####
-<a name="qtluapainter.show"/>
+<a name="qtluapainter.show"></a>
Function `painter:show` draws string `string` using
the [current font](#qtluapainterfont).
@@ -1766,7 +1766,7 @@ to specify more complicated formats.
See also: PostScript operator `show`.
-<a name="qtluapainter.showpage"/>
+<a name="qtluapainter.showpage"></a>
##### painter:showpage() #####
Expression `painter:showpage()`
@@ -1782,11 +1782,11 @@ unless some drawing operation is performed on each page.
See also: PostScript operator `showpage`.
-<a name="qtluapainter.size"/>
+<a name="qtluapainter.size"></a>
##### painter:size() #####
Expression `painter:size()` returns a Qt variant
-of class [qt.QSize](..:qtcore:index#qsize)
+of class [qt.QSize](qtcore.md#qsize)
representing the size in pixels of the drawing surface.
This does not depend on the transformation matrix
but corresponds to the default coordinate system
@@ -1797,17 +1797,17 @@ using function [painter:currentsize()](#paintercurrentsize)
or properties [painter.width](#qtluapainterwidth)
and [painter.height](#qtluapainterheight).
-<a name="qtluapainter.stringrect"/>
+<a name="qtluapainter.stringrect"></a>
##### painter:stringrect(string,[x,y,w,h,textflags]) #####
Function `painter:stringrect` returns a Qt variant of type
-[qt.QRectF](..:qtcore:index#qrect) representing
+[qt.QRectF](qtcore.md#qrect) representing
the bounding box of the text that would be displayed
by calling function [painter:show](#paintershow)
with the same arguments.
-<a name="qtluapainter.stringwidth"/>
+<a name="qtluapainter.stringwidth"></a>
##### painter:stringwidth(string) #####
Fonction `painter:stringwidth` returns
@@ -1818,9 +1818,9 @@ by expression [show(string)](#paintershow).
See also: PostScript operator `stringwidth`.
-<a name="painterstroke"/>
+<a name="painterstroke"></a>
##### painter:stroke(optnewpath) #####
-<a name="qtluapainter.stroke"/>
+<a name="qtluapainter.stroke"></a>
Function `painter:stroke` draws the boundary of the
[current path](#qtluapainterpath) using
@@ -1833,9 +1833,9 @@ The default is to reset the current path.
See also: PostScript operator `stroke`.
-<a name="paintertranslate"/>
+<a name="paintertranslate"></a>
##### painter:translate(dx,dy) #####
-<a name="qtluapainter.translate"/>
+<a name="qtluapainter.translate"></a>
Expression `translate(dx,dy)` translates the coordinate
origin by `dx` units along the X axis and `dy` units
@@ -1844,16 +1844,16 @@ the orientation of the axes are unaffected.
See also: PostScript operator `translate`.
-<a name="qtluapainter.widget"/>
+<a name="qtluapainter.widget"></a>
##### painter:widget() #####
Expression `painter:widget()` returns the Qt object of class
-[qt.QWidget](..:qtgui:index#qwidget) underlying the painter.
+[qt.QWidget](qtgui.md#qwidget) underlying the painter.
When the painter is not associated with a widget,
this expression returns `nil`.
-<a name="qtluapainter.write"/>
+<a name="qtluapainter.write"></a>
##### painter:write(f,[format]) #####
Expression `painter:write(f)` saves the image
@@ -1868,7 +1868,7 @@ deduced from the file name extension.
-<a name="qtluaprinter"/>
+<a name="qtluaprinter"></a>
### qt.QtLuaPrinter ###
Printing in Qt is usually achieved using class
@@ -1892,9 +1892,9 @@ Alternatively, function `printer:setup()` pops a print dialog
that lets the user adjust these properties interactively.
-<a name="qtluaprinternew"/>
+<a name="qtluaprinternew"></a>
#### qt.QtLuaPrinter([mode]) ####
-<a name="qtluaprinter"/>
+<a name="qtluaprinter"></a>
Expression `qt.QtLuaPrinter(mode)` returns a
new instance of class `qt.QtLuaPrinter`.
@@ -1910,7 +1910,7 @@ creating the [qt.QtLuaPainter](#qtluapainter)
that will peform the drawings.
-<a name="qtluaprinter.abort"/>
+<a name="qtluaprinter.abort"></a>
#### printer:abort() ####
Expression `printer:abort()` aborts the current print run.
@@ -1919,40 +1919,40 @@ Property [printer.printerState](#printerprinterstate)
will then be `"Aborted"`.
It is not always possible to abort a print job.
-<a name="qtluaprinter.collateCopies"/>
+<a name="qtluaprinter.collateCopies"></a>
#### printer.collateCopies ####
Boolean property `printer.collateCopies` specifies
if collation is turned on when multiple copies is selected.
-<a name="qtluaprinter.colorMode"/>
+<a name="qtluaprinter.colorMode"></a>
#### printer.colorMode ####
Boolean property `printer.colorMode` is `true`
when one prints in color (the default) and `false`
when one prints in gray scale.
-<a name="qtluaprinter.creator"/>
+<a name="qtluaprinter.creator"></a>
#### printer.creator ####
Property `printer.creator` is a string containing
the name of the application producing the printout.
This information is passed to the print spooling system.
-<a name="qtluaprinter.docName"/>
+<a name="qtluaprinter.docName"></a>
#### printer.docName ####
Property `printer.creator` is a string containing
the name of the document being printed.
This information is passed to the print spooling system
-<a name="qtluaprinter.doubleSidedPrinting"/>
+<a name="qtluaprinter.doubleSidedPrinting"></a>
#### printer.doubleSidedPrinting ####
Boolean property `printer.doubleSidedPrinting`
indicates whether double sided printing is requested.
-<a name="qtluaprinter.fontEmbeddingEnabled"/>
+<a name="qtluaprinter.fontEmbeddingEnabled"></a>
#### printer.fontEmbeddingEnabled ####
Boolean property `printer.fontEmbeddingEnabled` indicates
@@ -1960,14 +1960,14 @@ whether the output data should embed a font description.
This is `true` by default.
-<a name="qtluaprinter.fromPage"/>
+<a name="qtluaprinter.fromPage"></a>
#### printer.fromPage ####
Readonly numerical property `printer.fromPage`
contains the index of the first page to print.
Use function [printer:setFromTo](#printersetfromto) to change it.
-<a name="qtluaprinter.fullPage"/>
+<a name="qtluaprinter.fullPage"></a>
#### printer.fullPage ####
Setting boolean property `printer.fullPage` to `true`
@@ -1975,7 +1975,7 @@ enables support for painting over the entire page.
Otherwise painting is restricted to the printable area
reported by the device.
-<a name="qtluaprinter.landscape"/>
+<a name="qtluaprinter.landscape"></a>
#### printer.landscape ####
Setting boolean property `printer.landscape` to `true`
@@ -1983,7 +1983,7 @@ sets the printout in landscape mode.
Otherwise printing happens in portrait mode.
-<a name="qtluaprinter.newPage"/>
+<a name="qtluaprinter.newPage"></a>
#### printer:newPage() ####
Expression `printer:newPage()`
@@ -1991,7 +1991,7 @@ tells the printer to eject the current page and
to continue printing on a new page.
Returns `true` if this was successful.
-<a name="qtluaprinter.numCopies"/>
+<a name="qtluaprinter.numCopies"></a>
#### printer.numCopies ####
Property `printer.numCopies` contains the number of copies to be printed.
@@ -2005,18 +2005,18 @@ On Windows, Mac OS X and X11 systems that support CUPS,
reading property `printer.numCopies` always return 1 because these systems
internally handle the number of copies.
-<a name="printeroutputfilename"/>
+<a name="printeroutputfilename"></a>
#### printer.outputFileName ####
-<a name="qtluaprinter.outputFileName"/>
+<a name="qtluaprinter.outputFileName"></a>
Setting property `printer.outputFileName` to a nonempty
string indicates that printing should be redirected
to the specified file.
-<a name="printeroutputformat"/>
+<a name="printeroutputformat"></a>
#### printer.outputFormat ####
-<a name="qtluaprinter.outputFormat"/>
+<a name="qtluaprinter.outputFormat"></a>
Property `printer.outputFormat` contains a string describing
the output format for this file or printer.
@@ -2024,12 +2024,12 @@ Recognized values are `"PdfFormat"`, `"PostScriptFormat"`,
and `"NativeFormat"`.
-<a name="printerpagerect"/>
+<a name="printerpagerect"></a>
#### printer.pageRect ####
-<a name="qtluaprinter.pageRect"/>
+<a name="qtluaprinter.pageRect"></a>
Read-only property `painter.pageRect` contains
-a [qt.QRect](..:qtcore:index#qrect)
+a [qt.QRect](qtcore.md#qrect)
describing the coordinates of the printable
area of a page.
@@ -2041,9 +2041,9 @@ This coordinate system is not related the
the drawing coordinate system.
-<a name="printerpagesize"/>
+<a name="printerpagesize"></a>
#### printer.pageSize ####
-<a name="qtluaprinter.pageSize"/>
+<a name="qtluaprinter.pageSize"></a>
String property `printer.pageSize` contains the name of the paper format.
The recognized names are
@@ -2063,12 +2063,12 @@ When using an earlier version of Qt,
setting this property to `"Custom"` does nothing.
-<a name="printerpaperrect"/>
+<a name="printerpaperrect"></a>
#### printer.paperRect ####
-<a name="qtluaprinter.paperRect"/>
+<a name="qtluaprinter.paperRect"></a>
Read-only property `painter.paperRect` contains
-a [qt.QRect](..:qtcore:index#qrect)
+a [qt.QRect](qtcore.md#qrect)
describing the full size of the paper.
This rectangle is expressed in coordinates
@@ -2078,12 +2078,12 @@ and with units specified according to
This coordinate system is not related the
the drawing coordinate system.
-<a name="printerpapersize"/>
+<a name="printerpapersize"></a>
#### printer.paperSize ####
-<a name="qtluaprinter.paperSize"/>
+<a name="qtluaprinter.paperSize"></a>
Property `printer.paperSize` contains a
-[qt.QSizeF](..:qtcore:index#qsize)
+[qt.QSizeF](qtcore.md#qsize)
describing the desired size of the drawable area.
When this property contains a valid size,
@@ -2098,15 +2098,15 @@ is equal to `"Custom"`, property `printer.paperSize`
also specifies the size of the image described
by the output file.
-<a name="printerprinter"/>
+<a name="printerprinter"></a>
#### printer:printer() ####
-<a name="qtluaprinter.printer"/>
+<a name="qtluaprinter.printer"></a>
Returns a pointer to the real `QPrinter` object
which is a subclass of `QPaintDevice`.
-<a name="qtluaprinter.printProgram"/>
+<a name="qtluaprinter.printProgram"></a>
#### printer.printProgram ####
Setting string property `printer.printProgram` overrides
@@ -2114,9 +2114,9 @@ the name of the program used to submit the printout
to the spooling system.
-<a name="printerprintername"/>
+<a name="printerprintername"></a>
#### printer.printerName ####
-<a name="qtluaprinter.printerName"/>
+<a name="qtluaprinter.printerName"></a>
String property `printer.printerName`
contains the name of the target printer.
@@ -2124,9 +2124,9 @@ This value is initially set to the name of the
default printer for your system.
-<a name="printerprinterstate"/>
+<a name="printerprinterstate"></a>
#### printer.printerState ####
-<a name="qtluaprinter.printerState"/>
+<a name="qtluaprinter.printerState"></a>
Readonly string property `printer.printerState`
returs a string describing the state of the printer.
@@ -2134,9 +2134,9 @@ Possible values are `Idle`, `Active`, `Aborted` and `Error`.
That does not work on all systems.
-<a name="printerresolution"/>
+<a name="printerresolution"></a>
#### printer.resolution ####
-<a name="qtluaprinter.resolution"/>
+<a name="qtluaprinter.resolution"></a>
Numerical property `printer.resolution`
contains the resolution of the printer.
@@ -2150,16 +2150,16 @@ when property [printer.papersize](#printerpapersize)
does not contain a valid size.
-<a name="printersetfromto"/>
+<a name="printersetfromto"></a>
#### printer:setFromTo(frompage,topage) ####
-<a name="qtluaprinter.setFromTo"/>
+<a name="qtluaprinter.setFromTo"></a>
Function `printer:setFromTo`
specifies the indices of the page range to print.
If both `frompage` and `topage` are zero (the default),
the whole document is printed.
-<a name="qtluaprinter.setup"/>
+<a name="qtluaprinter.setup"></a>
#### printer:setup([parentwidget]) ####
Expression `printer:setup()` displays a dialog
@@ -2168,7 +2168,7 @@ and select various print settings.
It returns `true` if the user presses the button "Print"
and `false` if the user cancels.
-<a name="qtluaprinter.toPage"/>
+<a name="qtluaprinter.toPage"></a>
#### printer.toPage ####
Readonly numerical property `printer.toPage`
diff --git a/mkdocs.yml b/mkdocs.yml
new file mode 100644
index 0000000..90d7612
--- /dev/null
+++ b/mkdocs.yml
@@ -0,0 +1,15 @@
+site_name: qtlua
+theme : simplex
+repo_url : https://github.com/torch/qtlua
+use_directory_urls : false
+markdown_extensions: [extra]
+docs_dir : doc
+pages:
+- [index.md, Home]
+- [qt.md, Global Qt System]
+- [qtcore.md, Core Interface]
+- [qtgui.md, Graphical User Interface]
+- [qtuiloader.md, Qt Designer UI Files Loader]
+- [qtide.md, Integrated Development Environment]
+- [qtsvg.md, SVG Support]
+- [qtwidget.md, Widgets and Events]