1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195
|
/* GNUPLOT - qt.trm */
/*[
* Copyright 2009 Jérôme Lodewyck
*
* Permission to use, copy, and distribute this software and its
* documentation for any purpose with or without fee is hereby granted,
* provided that the above copyright notice appear in all copies and
* that both that copyright notice and this permission notice appear
* in supporting documentation.
*
* Permission to modify the software is granted, but not the right to
* distribute the complete modified source code. Modifications are to
* be distributed as patches to the released version. Permission to
* distribute binaries produced by compiling modified sources is granted,
* provided you
* 1. distribute the corresponding source modifications from the
* released version in the form of a patch file along with the binaries,
* 2. add special version identification to distinguish your version
* in addition to the base release version number,
* 3. provide your name and address as the primary contact for the
* support of your modified version, and
* 4. retain our contact information in regard to use of the base
* software.
* Permission to distribute the released version of the source code along
* with corresponding source modifications in the form of a patch file is
* granted with same provisions 2 through 4 for binary distributions.
*
* This software is provided "as is" without express or implied warranty
* to the extent permitted by applicable law.
]*/
#ifdef TERM_REGISTER
register_term (qt)
#endif
#ifndef TERM_PROTO_ONLY
#ifdef TERM_BODY
#include "qtterminal/qt_term.h"
#endif /* TERM_BODY */
#ifdef TERM_TABLE
TERM_TABLE_START (qt_driver)
"qt", "Qt cross-platform interactive terminal",
/* the following values are overridden by qt_graphics */
1 /* xmax */ , 1 /* ymax */ , 1 /* vchar */ , 1 /* hchar */ ,
1 /* vtic */ , 1 /* htic */ ,
qt_options, qt_init, qt_reset, qt_text_wrapper, null_scale, qt_graphics,
qt_move, qt_vector, qt_linetype, qt_put_text,
qt_text_angle, qt_justify_text,
qt_point, do_arrow, qt_set_font,
qt_pointsize,
TERM_CAN_MULTIPLOT|TERM_NO_OUTPUTFILE|TERM_ALPHA_CHANNEL|TERM_CAN_DASH|TERM_ENHANCED_TEXT|TERM_POLYGON_PIXELS|TERM_LINEWIDTH|TERM_COLORBOX_IMAGE,
0 /* suspend */, 0 /* resume */, qt_fillbox, qt_linewidth
#ifdef USE_MOUSE
, qt_waitforinput, qt_put_tmptext, qt_set_ruler, qt_set_cursor, qt_set_clipboard
#endif
, qt_make_palette, 0 /* qt_previous_palette */, qt_set_color, qt_filled_polygon
, qt_image
, qt_enhanced_open, qt_enhanced_flush, qt_enhanced_writec
, qt_layer
, NULL /* qt_path */
, 0.0 /* Scale (unused) */
, qt_hypertext
, qt_boxed_text
, qt_modify_plots
, qt_dashtype
TERM_TABLE_END (qt_driver)
#undef LAST_TERM
#define LAST_TERM qt_driver
#endif /* TERM_TABLE */
#endif /* TERM_PROTO_ONLY */
#ifdef TERM_HELP
START_HELP(qt)
"1 qt",
"?set terminal qt",
"?terminal qt",
"?set term qt",
"?term qt",
"?qt",
" The `qt` terminal device generates output in a separate window with the Qt library."
"",
" Syntax:",
" set term qt {<n>}",
" {size <width>,<height>}",
" {position <x>,<y>}",
" {title \"title\"}",
" {font <font>} {{no}enhanced}",
" {rounded|butt}",
" {{no}replotonresize}",
" {{no}antialias}",
" {linewidth <lw>} {dashlength <dl>}",
" {{no}persist} {{no}raise} {{no}ctrl}",
" {close}",
" {widget <id>}",
"",
" Multiple plot windows are supported: `set terminal qt <n>` directs the",
" output to plot window number n.",
"",
" The default window title is based on the window number. This title can also",
" be specified with the keyword \"title\".",
"",
" Plot windows remain open even when the `gnuplot` driver is changed to a",
" different device. A plot window can be closed by pressing the letter 'q'",
" while that window has input focus, by choosing `close` from a window",
" manager menu, or with `set term qt <n> close`.",
"",
" The size of the plot area is given in pixels, it defaults to 640x480.",
" In addition to that, the actual size of the window also includes the space",
" reserved for the toolbar and the status bar.",
" When you resize a window, the plot is immediately scaled to fit in the",
" new size of the window. The `qt` terminal scales the whole plot, including",
" fonts and linewidths, and keeps its global aspect ratio constant.",
" If you type `replot`, click the `replot` icon in the terminal toolbar or",
" type a new `plot` command, the new plot will completely fit in the window",
" and the font size and the linewidths will be reset to their defaults.",
"",
" The position option can be used to set the position of the plot window.",
" The position option only applies to the first plot after the `set term`",
" command.",
"",
"",
" The active plot window (the one selected by `set term qt <n>`) is",
" interactive. Its behaviour is shared with other terminal types. See `mouse`",
" for details. It also has some extra icons, which are supposed to be",
" self-explanatory.",
"",
" This terminal supports an enhanced text mode, which allows font and other",
" formatting commands (subscripts, superscripts, etc.) to be embedded in labels",
" and other text strings. The enhanced text mode syntax is shared with other",
" gnuplot terminal types. See `enhanced` for more details.",
"",
" <font> is in the format \"FontFace,FontSize\", i.e. the face and the size",
" comma-separated in a single string. FontFace is a usual font face name, such",
" as \'Arial\'. If you do not provide FontFace, the qt terminal will use",
" \'Sans\'. FontSize is the font size, in points. If you do not provide it,",
" the qt terminal will use a size of 9 points.",
" For example :",
" set term qt font \"Arial,12\"",
" set term qt font \"Arial\" # to change the font face only",
" set term qt font \",12\" # to change the font size only",
" set term qt font \"\" # to reset the font name and size",
"",
" The dashlength affects only custom dash patterns, not Qt's built-in set.",
"",
#if (QTVER == 4)
" The Qt rendering speed is affected strongly by the rendering mode used.",
" In Qt version 4 this can be controlled by the environmental",
" variable QT_GRAPHICSSYSTEM. The options are \"native\", \"raster\", or",
" \"opengl\" in order of increasing rendering speed. For earlier versions",
" of Qt the terminal defaults to \"raster\".",
"",
#endif
" To obtain the best output possible, the rendering involves three",
" mechanisms : antialiasing, oversampling and hinting.",
" Oversampling combined with antialiasing provides subpixel accuracy,",
" so that gnuplot can draw a line from non-integer coordinates. This avoids",
" wobbling effects on diagonal lines ('plot x' for example).",
" Hinting avoids the blur on horizontal and vertical lines caused by",
" oversampling. The terminal will snap these lines to integer coordinates so",
" that a one-pixel-wide line will actually be drawn on one and only one pixel.",
"",
" `butt` instructs the driver to use a line drawing method that does",
" not overshoot the desired end point of a line. This setting is only",
" applicable for line widths greater than 1. This setting is most useful when",
" drawing horizontal or vertical lines. Default is `rounded`.",
"",
" The option `replotonresize` replots the data when the plot window is",
" resized. Without this option, the even-aspect-ratio scaling may result in the",
" plot filling only part of the window after resizing. With this option, gnuplot",
" does a full replot on each resize event, resulting in better space",
" utilization. This option is generally desirable, unless the potentially",
" CPU-intensive replotting during resizing is a concern. Replots can be manually",
" initiated with hotkey 'e' or the 'replot' command.",
"",
" By default, the window is raised to the top of your desktop when a plot is",
" drawn. This can be controlled with the keyword \"raise\".",
" The keyword \"persist\" will prevent gnuplot from exiting before you",
" explicitly close all the plot windows.",
"",
" The <space> key raises the gnuplot console window [MS Windows only].",
" The 'q' key closes the plot window. These hot keys can be changed to",
" ctrl-space and ctrl-q using the terminal option keyword \"{no}ctrl\".",
" However the preferred way to select ctrl-q rather than 'q' is to use",
" the toggle in the tools widget of the plot window.",
"",
" The gnuplot outboard driver, gnuplot_qt, is searched in a default place",
" chosen when the program is compiled. You can override that by defining",
" the environment variable GNUPLOT_DRIVER_DIR."
END_HELP(qt)
#endif /* TERM_HELP */
|