[Scribus] Linked content
Tue Apr 3 03:51:34 CEST 2007
Marek Laane wrote:
> Just an idea: could it be done with some variables (as e.g word processors
> can)? You define which kind the variable is (number, date, etc) and where it
> has to be on a page(s) and after that you just have to give to variable a
> value (or, ir may be done automatically if it's e.g. current date or
> something what can be assigned automatically).
That sounds like the most useful way to do form fields in general. For
extra crazyness, a signal could be emitted at the start of each page to
let a listener change variables (useful for PyQt scripts or for plug-ins).
Because of the variety of ways people tend to want things formatted and
arranged (look at MS Excel's frighteningly long list of format options)
I'd be tempted to support expressions in variables, but that almost
certainly lands up being too complex. Handily, though, we can directly
expose some of Qt's formatting options for common data types like dates
and numbers - which are the only ones Scribus will provide automatically
set variables for. The rest can be formatted by hand.
It's times like these I really wish we used Qt Script for Applications.
We could let the user enter any valid QSA expression to do things based
on page number, date, and all sorts of fun. Doing it with Python isn't
really as useful, mostly because not everyone will have it enabled and
we don't link it directly into the core app, so calling out to it is a
bit of a pain at best.
Maybe we could embed QSA just for variable expressions ;-)
More information about the scribus