[Marble-devel] Suggested Patch for Bug 232098 - JJ: Please add fast adding messurment points by ctrl+click
Thomas Lenarz
tommesml at netcologne.de
Mon Sep 20 19:55:03 CEST 2010
Hello,
I myself haven't tested it on a touchscreen (no possibility).
Using either the touchpad of my laptop or a mouse it works fine.
However, I am not convinced that it works in all situations because the
makes the CTRL-Key kind of overloaded: (press and depress on same
location -> Measure-Point; press and depress on different locations ->
Rubber-Band)
Best wishes,
Thomas
Am 19.09.2010 21:38, Doug Penner wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I'm kind of new to marble, but I just want to know if this has been
> tested on a touchscreen. I'm not sure how QT handles the mouse events
> on different types of mice (touchscreens being an advanced mouse) and
> if a large fingered person might cause the mouse-up to be slightly
> different than a mouse-down when tapping. A simple solution to that
> would probably to make a "dead-zone" value where if the distance
> between up and down was very small, it would consider them the same.
>
>
> ~Doug
>
>
>
> On 09/19/2010 11:51 AM, Thomas Lenarz wrote:
>> Hello,
>>
>> I tried to find a solution for the JJ described in Bug 232098
>> recently:
>>
>> I am new to marble development. I played around with the
>> QT-Version and would like to propose the following change.
>>
>> However, I am not sure if this change could break something around
>> the rubber-band code, which uses the control-key as well. Therefore
>> I compare the coordinates between button-press and button-release.
>> The addMeasurePoint() triggers only if the coordinates are equal.
>>
>> I am not sure how to generate a patch. It would be great if anyone
>> could point me to some guidelines.
>>
>> Please find the patch-file attached to this mail.
>>
>> Thanks, Thomas
>>
>> File: marble/src/lib/MarbleWidgetInputHandler.cpp
>>
>> // Regarding mouse button releases: if ( e->type() ==
>> QEvent::MouseButtonRelease&& event->button() == Qt::LeftButton )
>> {
>>
>> if ( ( event->modifiers()& Qt::ControlModifier )&& (
>> event->globalPos() == d->m_selectionOrigin ) ) {
>> d->m_addMeasurePointAction->setData( QPoint( event->x(), event->y()
>> ) ); addMeasurePoint(); } else {
>>
>> //emit current coordinates to be be interpreted //as requested emit
>> mouseClickScreenPosition( d->m_leftpressedx, d->m_leftpressedy );
>>
>> }
>>
>>
>> MarbleWidgetInputHandler::d->m_widget->setViewContext( Still ); if
>> ( MarbleWidgetInputHandler::d->m_widget->mapQuality( Still ) !=
>> MarbleWidgetInputHandler::d->m_widget->mapQuality( Animation ) ) {
>>
>> MarbleWidgetInputHandler::d->m_widget->updateChangedMap(); }
>>
>> d->m_leftpressed = false; }
>>
>>
>> _______________________________________________ Marble-devel
>> mailing list Marble-devel at kde.org
>> https://mail.kde.org/mailman/listinfo/marble-devel
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkyWZssACgkQznigyIaDZ0XaWwCgqI/srLaqFP/NIAD3ACVIhOSL
> ZXgAoNxK4KGqpG/pWjGYACNe1NGwc/n5
> =gpOl
> -----END PGP SIGNATURE-----
>
More information about the Marble-devel
mailing list