taqlwidget(cdesc, title, canselect, cansort, cangiving, heigth, giving, widgetset)
Description
This constructor creates the widget from the given description.
The widget runs asynchronously as a subsequence. When the
user presses the
Go or
Cancel button a
returns event is generated which gives a record
containing the fields
select,
where,
orderby,
and
giving. These fields represent the four parts of
a full TaQL command. All fields are empty if the
Cancel
button was pressed.
The constructor fails if no GUI is active in the system.
The argument cdesc determines the columns to be shown.
It is a record in which each field describes a column. The field name
is the column name; the field value is a record from which the
following fields are used (if present):
- valueType defines the type. Possible values are
string, integer, float, double, complex, dcomplex, and boolean.
Its main use is in building the help info.
If the type is string a value is enclosed in quotes if necessary.
- istime defines if the field contains a date/time (defaults
to F). If so, some extra operations will be added automatically
to handle the date/time correctly. If the valueType is string, the
DATETIME function is applied to the field to convert the string to a
date/time. Otherwise the field is a numeric date/time in seconds and
is divided by 24*3600 to convert it to days. The MJD function is
applied to the value to convert it to a double value.
- ndim defines the dimensionality of an array where 0 or -1
indicates any dimensionality. If the field is not present, the column
is a scalar. It is only used in building the help info.
- shape defines the fixed shape of arrays in a column.
It is only used in building the help info.
- comment can be used to give some extra information
about the column. It is only used in building the help info.
- labels defines the possible values for the column
if it is known that the column can only have a limited number
of values. Those values are shown in an optionmenu where the user
can select from. It should be a vector of type valueType.
- labelnames gives symbolic names for the possible
values defined in labels. They are also shown in the
optionmenu. They are only used if labels is given and if
both vectors have the same length.
The table description returned by
table.getdesc() is a record
with the fields shown above. Only the fields istime,
labels, and
labelnames are not part of it. It means that a table
description can directly be used in the taqlwidget
constructor.
The description can contain as many fields as one likes. When more
fields than the widget heigth (argument height) are given,
a vertical scrollbar is added which can be used to scroll through
all fields.
The arguments canSomething determine if the user is allowed to
build a select string, sort string, and giving string. If so, the
widget is extended with the appropriate entry boxes, etc. to make
it possible.
Arguments
cdesc |
in |
The column descriptions |
|
|
Allowed: |
Record |
title |
in |
Title string |
|
|
Allowed: |
String |
|
|
Default: |
Query Dialogue |
canselect |
in |
Possible to build select string? |
|
|
Allowed: |
Bool |
|
|
Default: |
F |
cansort |
in |
Possible to build sort string? |
|
|
Allowed: |
Bool |
|
|
Default: |
F |
cangiving |
in |
Possible to build giving string? |
|
|
Allowed: |
Bool |
|
|
Default: |
F |
heigth |
in |
Height of the field list |
|
|
Allowed: |
integer |
|
|
Default: |
12 |
giving |
in |
default giving string |
|
|
Allowed: |
string |
|
|
Default: |
'' |
widgetset |
in |
widgetset to be used |
|
|
Allowed: |
widgetset tool |
|
|
Default: |
dws |