Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 4

Qt-interest Archive, December 2006
C++ GUI Programming with Qt 4: pg 129


Message 1 in thread

Is the wording in the first paragraph of _C++ GUI Programming with Qt 4_ 
correct?  I'm talking specifically about the discussion of mouse detals, and 
the number of degrees or fractions thereof, involved.
-- 
 [ signature omitted ] 

Message 2 in thread

Hi Steven,

> Is the wording in the first paragraph of _C++ GUI Programming with Qt 4_ 
> correct?  I'm talking specifically about the discussion of mouse detals, and 
> the number of degrees or fractions thereof, involved.

As far as we know, yes. Why?

Jasmin

--
 [ signature omitted ] 

Message 3 in thread

On Tuesday 19 December 2006 05:27, Jasmin Blanchette wrote:
> Hi Steven,
>
> > Is the wording in the first paragraph of _C++ GUI Programming with Qt 4_
> > correct?  I'm talking specifically about the discussion of mouse detals,
> > and the number of degrees or fractions thereof, involved.
>
> As far as we know, yes. Why?
>
> Jasmin

Hi Jasmin,
It says "The delta() function returns the distance the wheel was rotated in 
eighths of a degree."  The code shows:

int numDegrees = event->delta() / 8;

If it were truly "eighths of a degree" would we not be multiplying by 8 rather 
than dividing?

It also says "Mice typically work in steps of 15 degrees."  I'm not disputing 
that, but I'm not really sure what it means.

Oh, BTW, I believe the first paragraph of 118 has a minor typo.  I 
think "plotter file's header" should be "plotter's header file".

Steven
-- 
 [ signature omitted ] 

Message 4 in thread

Steven T. Hatton wrote:

> int numDegrees = event->delta() / 8;
> 
> If it were truly "eighths of a degree" would we not be multiplying by 8 rather 
> than dividing?

No, we would be dividing. If you have 80 eights of a degree, you have 80 
/ 8 = 10 degrees.

> It also says "Mice typically work in steps of 15 degrees."  I'm not disputing 
> that, but I'm not really sure what it means.

It means that one "tick" on your wheel corresponds to 15 degrees.

Jasmin

--
 [ signature omitted ] 

Message 5 in thread

On Tuesday 19 December 2006 06:27, Jasmin Blanchette wrote:
> Steven T. Hatton wrote:
> > int numDegrees = event->delta() / 8;
> >
> > If it were truly "eighths of a degree" would we not be multiplying by 8
> > rather than dividing?
>
> No, we would be dividing. If you have 80 eights of a degree, you have 80
> / 8 = 10 degrees.

It says "eighths", not "eights".  I would not use the term "eights of a 
degree".  I would say something like "eight degree increments", except...

> > It also says "Mice typically work in steps of 15 degrees."  I'm not
> > disputing that, but I'm not really sure what it means.
>
> It means that one "tick" on your wheel corresponds to 15 degrees.

I see what is going on, but it's hard to put into words.
-- 
 [ signature omitted ] 

Message 6 in thread

Steven T. Hatton wrote:

> It says "eighths", not "eights".  I would not use the term "eights of a 
> degree".

Yes, it says "eights", as in "1/8". Which is correct: 80 * 1/8 = 10.

> I would say something like "eight degree increments", except...

That would be wrong. We really mean "eights".

Jasmin

--
 [ signature omitted ] 

Message 7 in thread

"Jasmin Blanchette" <jasmin@xxxxxxxxxxxxx> wrote in message
news:4587DAE5.4090902@xxxxxxxxxxxxxxxx
> Steven T. Hatton wrote:
>
> > It says "eighths", not "eights".  I would not use the term "eights of a
> > degree".
>
> Yes, it says "eights", as in "1/8". Which is correct: 80 * 1/8 = 10.

In english, 1/8 is written one eighth.

--
 [ signature omitted ] 

Message 8 in thread

Duane Hebert wrote:

>>Yes, it says "eights", as in "1/8". Which is correct: 80 * 1/8 = 10.
> 
> In english, 1/8 is written one eighth.

Sure. And English is written with a capital E. Anyway, although I 
spelled "eighth(s)" wrong in the email, it's spelled correctly in the book.

Jasmin

--
 [ signature omitted ] 

Message 9 in thread

"Jasmin Blanchette" <jasmin@xxxxxxxxxxxxx> wrote in message
news:45882115.8080808@xxxxxxxxxxxxxxxx
> Duane Hebert wrote:
>
> >>Yes, it says "eights", as in "1/8". Which is correct: 80 * 1/8 = 10.
> >
> > In english, 1/8 is written one eighth.
>
> Sure. And English is written with a capital E. Anyway, although I
> spelled "eighth(s)" wrong in the email, it's spelled correctly in the
book.

Seemed like this was the cause of confusion.  Here in Quebec, we
often have this issue, even when it comes to capitalizing English <g>


--
 [ signature omitted ] 

Message 10 in thread

On Tuesday 19 December 2006 07:28, Jasmin Blanchette wrote:
> Steven T. Hatton wrote:
> > It says "eighths", not "eights".  I would not use the term "eights of a
> > degree".
>
> Yes, it says "eights", as in "1/8". Which is correct: 80 * 1/8 = 10.
>
Indeed.  As soon as I looked at it after getting some sleep it was obvious.  
Thanks.
-- 
 [ signature omitted ]