Q TCL

QTcl - qt/kde widgets for tcl

QTcl - tcl interpreter integration for Qt/KDE

Description

qtcl ist THE tool to connect state of the art cross platform gui design with the power of tcl as scripting language for prototypes and small projects

Features

Version

this is version 1.2.0

Changes

From Version 1.0

Requirements

for deployment

for building additional

Download

the package can be downloaded from:
http://www.bj-ig.de/qtcl or
http://sf.net/projects/qtcl

Building

extract the archive file run:
./configure:
make
make install (as root)

Documentation

Concepts

the complete embedding of qt commands in the tcl interpreter needs only one command:qt. it hides all the Qt things from the global namespace and permits the coexistence with many other tcl extensions.

pathnames

The basic concept of qtcl is the conversion from pathesnames to objectpointers and vice versa. So if you create an Object on Qt/KDE f.e.: QObject *o=new QObject(0,"otto"); you can find the object with the name .otto. This concept is nearly the same as in tk but works here not only for widgets but also for all objects regardlesss of created by qtcl or other Qt functions.
pathnames are treated as .-separated lists of parents with . as root. .top.xx.yy means an object with the name yy as child of an object with the name xx as child of an object with the name top with no parent.

pathnames while creating objects

if objects are created, the given pathname is separated in two parts:
the parent name (everything left of the last point in the path) - it must refer to an existing object sometimes this object needs to be derived from a specialized class. (like QWidget, QLayout etc.)
and the new name (the part after the last point in path) which must not exist as object in this parent (or root). If the parent name is '.' the objectRoot is implied.

properties/methods/slots/signals
these things are concepts of Qt (see documentation there).

The qt command

QObject

objects can be refered to by there pathname. Valid versions are:
qt .top the rootobject with the name top
qt .top.okbutton the object with the name okbutton in the parent with the name top or
qt .top*okbutton the object with the name okbutton in the object with the path .top
valid methods for all objects are:

QWidget

widgets are created by the command:
qt widget typename path options
typename is an valid Classname derived from QWidget
pathname is pathname as described above.
options are pairs of properties with values
the widget will be created using the widgetFactory methods from qt (see documentation there).

Example:
qt create QDialog .top sizeGripEnabled true % creates a QDialog
qt create QPushButton .top.okbutton text ok % creates a button
qt .top show % invokes slot show

special QWidget methods:

special QDialog methods:
more methods for specialized widgets exist. the qt widgetpath method gives a list of all possible methods for this object.

QLayout

layout are created by the command:
qt create typename path options
typename is an valid Classname derived from QLayout
pathname is pathname as described above.
options are pairs of properties with values
the layout will be created using an layoutfactory.

Example:
qt create QDialog .top % creates a QDialog
qt layout QGridlayout .top.grid% creates a QGridlayout
qt widget QTextEdit .top.e% creates a QTextEdit
qt .top.grid add .top.e -row 0 -column 0% adds edit to grid

special QLayout methods:

special QGridLayout methods:
special QBoxLayout methods:

to get a list of all possible methods use qt layoutpath.

to get a list of all possible action classes use qt layout.

QAction

actions are created by the command:
qt create typename path options
typename is an valid Classname derived from QAction
pathname is pathname as described above.
options are pairs of properties with values
the action will be created using an actionfactory.

Example:
qt widget QMenuBar .top.menubar % creates a menubar
qt action QAction .top.fileopenaction% creates a QAction
qt .top.fileopenaction addTo .top.menubar% adds action to menubar

special QAction methods:

to get a list of all possible methods use qt actionpath.

to get a list of all possible action classes use qt action.

Examples

please refer to the examples in the tests directory of the archive

Todo

Copyright

the qtcl package and all accompanying material is:
copyright (c) 2002-2005, peter brueckner - brueckner & jarosch ingenieurgesellschaft mbh erfurt germany

License

this package is released under the GPL. please refer to to this license for information on usage and distribution of this package, and for a disclaimer of all warranties.

contact

please send questions, comments, bug reports, patches, requests to:
Peter Brueckner<peter@bj-ig.de>


copyright (c) 2002-2005 brueckner & jarosch <http://www.bj-ig.de>