|
From: Daniel J S. <dan...@ie...> - 2014-02-27 07:16:50
|
On 02/27/2014 12:02 AM, sfeam wrote:
> The one bit that I would say is still unsatisfactory in the Qt
> terminal is the fact that you can't set a size preference, the
> size you manually set via "set term qt size XX,YY" is ignored,
> and any resizing you do using the mouse is not persistent.
> If you can figure out how to fix that then Mojca and I at least
> would be happier, and probably future Qt users as well.
I'm not seeing that on Linux. The window size seems to work fine, as
far as I can tell. The information is being sent. Is some kind of
strange combination of switching between windows and sizes? The
following does seem some somewhat suspect:
// Set plot size
if (qt_setSize)
{
term->xmax = qt_oversampling*qt_setWidth;
term->ymax = qt_oversampling*qt_setHeight;
qt_setSize = false;
}
If 'size' is set in the options then the term structure is updated and
setSize cleared. But what if one then just switches the term number?
set term qt 4
plot x
set term qt 5 size 300,300
plot x**2
set term qt 4
plot x
I just confirmed that doesn't work properly. Is that what you are
referring to? Intermixing that qt_setSize test with the streams sent to
the outboard program might fix that size-persistence issue, i.e., the
size command doesn't get sent unless the user actually specified the size.
qt->out << GESetCtrl << qt_optionCtrl;
if (qt_setSize)
{
term->xmax = qt_oversampling*qt_setWidth;
term->ymax = qt_oversampling*qt_setHeight;
// Set plot size
qt->out << GESetWidgetSize << QSize(term->xmax,
term->ymax)/qt_oversampling;
// Initialize the scene
qt->out << GESetSceneSize << QSize(term->xmax,
term->ymax)/qt_oversampling;
qt_setSize = false;
}
qt->out << GEClear;
I tried something like that and it doesn't work exactly right either.
I'll have to look at that later.
BTW, I also notice that the maximum size is kind of small. Try
set term qt 6 size 800,800
plot x
and it doesn't look any larger than the default plot size. Going
smaller works though:
set term qt 5 size 300,300
plot x**2
Another BTW, the mouse scroll wheel button (center button) seems a
little odd. Using that in one Qt window causes plot activity, but it
also cause plot activity in another Qt plot window that is open.
Dan
|