[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: interactively adding text annotations to Qt plots
From: |
JohnD |
Subject: |
RE: interactively adding text annotations to Qt plots |
Date: |
Thu, 16 Apr 2015 12:41:13 -0400 |
> Message: 5
> Date: Thu, 16 Apr 2015 10:19:58 -0400
> From: "John W. Eaton" <address@hidden>
> To: Octave Maintainers List <address@hidden>
> Cc: address@hidden
> Subject: interactively adding text annotations to Qt plots
> Message-ID: <address@hidden>
> Content-Type: text/plain; charset=utf-8; format=flowed
>
> With the following changeset
>
> http://hg.savannah.gnu.org/hgweb/octave/rev/908b68a98ba6
>
> I sketched out an implementation of handling interactive text annotations
in the
> Qt plotting widget. It seems to work OK but it is limited. There is no
way to
> specify multi-line text, fonts, alignment, colors, etc. Instead of a
simple
> QInputDialog, we need a custom dialog box that allows all the properties
for a
> text annotation object to be set interactively. These are:
>
> position:
>
> 4-element vector [x0, y0, width, height], defaults for x0 and y0 are
the
> position of the mouse click. The width and the height can be anything
since
> "fitboxtotext" is true by default.
>
> units:
>
> Only use if position is specified. If taking the position from the
mouse click
> coordinates, then use the default "normalized" units.
>
> backgroundcolor, edgecolor, linestyle, linewidth:
>
> Customize the box background color and edges appearance.
>
> font... properties, horizontalalignment, verticalalignment:
>
> Properties for the text itself.
>
> fitboxtotext:
>
> Control the size of the box. If "on" (the default) the box limits
are fit to the
> text extent.
>
>
> I could use some help with creating this dialog. Perhaps there is a
> simple way to do this job that I'm not aware of? Any help would be
> greatly appreciated.
>
> jwe
>
>
Easiest way (at least for the design of the dialog) is to use the Qt
designer tool to make a ui file for a QDialog similar to what was done for
the preferences dialog.
I can create a skeleton set of files for doing that if you still need a
volunteer