Re: [patch] float -> string #1 (was: Re: [patch] validators for the rest)

2004-12-20 Thread Juergen Spitzmueller
Juergen Spitzmueller wrote: > > Do we have to use floats for this, or can we just use a string all the > > time? > > I think it will be possible to switch to string in all these cases. > However, I'd like to proceed in small steps. The attached patch uses > strings instead of floats for graphics. W

Re: [patch] float -> string #1 (was: Re: [patch] validators for the rest)

2004-12-05 Thread Juergen Spitzmueller
John Spray wrote: > I think that two decimal places should be enough > for most people, so I'll change it to that. Yes, that's what the other frontends declare "valid" in most cases. Jürgen

Re: [patch] float -> string #1 (was: Re: [patch] validators for the rest)

2004-12-05 Thread John Spray
On Sun, 2004-12-05 at 19:22 +0100, Juergen Spitzmueller wrote: > BTW: John S., in the gtk graphics dialog, you cannot enter double values for > rotation, width/height and scale. This is possible in the other frontends and > might cause compatibility problems. Actually, you can enter double value

[patch] float -> string #1 (was: Re: [patch] validators for the rest)

2004-12-05 Thread Juergen Spitzmueller
Lars Gullik Bjønnes wrote: > Do we have to use floats for this, or can we just use a string all the > time? I think it will be possible to switch to string in all these cases. However, I'd like to proceed in small steps. The attached patch uses strings instead of floats for graphics. We have to

Re: [patch] validators for the rest

2004-12-03 Thread Juergen Spitzmueller
Lars Gullik Bjønnes wrote: > Do we have to use floats for this, or can we just use a string all the > time? Probably we can use strings. I'll have a look. In the meantime, I'll commit the validators, which are independent from this. Jürgen

Re: [patch] validators for the rest

2004-11-29 Thread Lars Gullik Bjønnes
Juergen Spitzmueller <[EMAIL PROTECTED]> writes: | Angus Leeming wrote: >> QString float2qstr(float value, size_t precision) >> { >>         std::ostringstream ss; >>         ss << setprecision(precision) << value; >>         return toqstr(ss.str()); >> } > | Since this problem is frontend-indepen

Re: [patch] validators for the rest

2004-11-29 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes: | Juergen Spitzmueller wrote: > >> Angus Leeming wrote: >>> QString float2qstr(float value, size_t precision) >>> { >>> std::ostringstream ss; >>> ss << setprecision(precision) << value; >>> return toqstr(ss.str()); >>> } >> >> Since this problem is front

Re: [patch] validators for the rest

2004-11-29 Thread Juergen Spitzmueller
Angus Leeming wrote: > Why not >         float tostr(float value, int precision = -1) >         { >                 std::ostringstream ss; >                 if (precision < 0) >                         ss << value; >                 else >                         ss << setprecision(precision) << va

Re: [patch] validators for the rest

2004-11-29 Thread Angus Leeming
Juergen Spitzmueller wrote: > Angus Leeming wrote: >> QString float2qstr(float value, size_t precision) >> { >> std::ostringstream ss; >> ss << setprecision(precision) << value; >> return toqstr(ss.str()); >> } > > Since this problem is frontend-independent, I will add an > appropriate function t

Re: [patch] validators for the rest

2004-11-29 Thread Juergen Spitzmueller
Angus Leeming wrote: > QString float2qstr(float value, size_t precision) > { >         std::ostringstream ss; >         ss << setprecision(precision) << value; >         return toqstr(ss.str()); > } Since this problem is frontend-independent, I will add an appropriate function to lstrings (correc

Re: [patch] validators for the rest

2004-11-29 Thread Angus Leeming
Juergen Spitzmueller wrote: > Angus Leeming wrote: >> What do you mean, "Doesn't work"? The constructor is: >> CheckedLineEdit(QLineEdit * input, QLabel * label = 0); > > Ah, silly me. Yes, that works (without visual clue, that is, but I'm > fine with that). > >> > 10.3019073486 >> > >> > Is

Re: [patch] validators for the rest

2004-11-29 Thread Juergen Spitzmueller
Angus Leeming wrote: > What do you mean, "Doesn't work"? The constructor is: >         CheckedLineEdit(QLineEdit * input, QLabel * label = 0); Ah, silly me. Yes, that works (without visual clue, that is, but I'm fine with that). > > 10.3019073486 > > > > Isn't this a bit too precise? ;-) > >

Re: [patch] validators for the rest

2004-11-29 Thread Angus Leeming
Juergen Spitzmueller wrote: > Attached is a patch that adds validators to all remaining qt > dialogs. > > One problem remains: The vspace input widget in QDocument does not > have a label, so the validator does not work. Angus, what can be > done? Can we have a checkedwidget that uses an other wi

[patch] validators for the rest

2004-11-29 Thread Juergen Spitzmueller
Attached is a patch that adds validators to all remaining qt dialogs. One problem remains: The vspace input widget in QDocument does not have a label, so the validator does not work. Angus, what can be done? Can we have a checkedwidget that uses an other widget than a label? If so, what is the b