Archived posts from a dozen years ago.

I’m going Multi-Touch

2 December 2009

This is one of the hottest topics of the moment: Multi-Touch (see the trends here). Every review of the just released Qt 4.6 mentions the Touch-and-Gestures framework and KDE is getting ready to use the technology — still it doesn’t work on X11 (yet).

MultiTouch can be Fun !

Wacom_Bamboo-Fun-smallI couldn’t resist, so for 99€ (120$) I bought a Bamboo Fun Pen & Touclh tablet. I find this really affordable, since you get: A. the precision of a graphics tablet (with 1024 pressure levels, back eraser, etc..) and B. a real 2-Pointers input device!

I tried the tablet on vista, with the latest drivers and the bundled applications bot I got disappointed because:
1. the scroll gesture is remapped to the mouse wheel.. so you lose all the ‘analog’ fun and it feels unconfortable.
2. the zoom gesture is remapped to CTRL+wheel, awkward fixed-steps again.
3. the rotate gesture is not supported by any app even the bundled ones i tried.

In the end I thought this was not “multi-touch”, but some silly gesture-detection broken hardware. I was wrong.

Linux to the rescue

gesture-vortex-2S
Step 1. After loading the wacom.ko module (updated with this patch) the Linux kernel prints out stuff like this:

[default   ] data: 02 00  00 00 00 00 00  00 00 00 00  00 00 00 00 00  00 00 00 00
[finger 1  ] data: 02 00  7d 80 fe 00 8a  80 fc 00 87  00 00 00 00 00  81 11 00 00
[finger 1+2] data: 02 00  ae 80 b6 00 72  81 08 00 70  87 81 5b 00 72  81 21 00 00
[finger   2] data: 02 00  00 00 00 00 00  81 59 00 b4  6d 81 59 00 ba  80 11 00 00

Can you see it ? This is a 2-finger device! 🙂

Step 2. The Kernel understands the data and splits it into 2 input devices that Udev maps to /dev/input/wacom and /dev/input/wacom-touch. From here you can read higher level information for each finger such as the decoded position, pressure, click type (tap, doubletab), and more.

I WANT QTouchEvents AND QGestures !!

I do too 😀 And I wanted to hack something about that. But I stopped here:

schema-problem

We get the input from evdev and the Application needs QTouchEvents and QGestures, so the easy way would be to hack up a touchpoint feeder to the Qt framework that directly reads from evdev (evdev -> qt). This would work fine for 1 application, but what about two? And what about moving the X cursor too? I think evdev->Xdriver->XInput2->qt is the solution, but we must be sure that no valuable information is lost in the chain, that the event filtering is done in the right place and obviously, that the X driver does a good job. Unfortunately xf86-input-wacom (X input driver for wacom’s kernel driver) doesn’t support my Bamboo Fun Touch & Pen yet and moreover I don’t see MPX support in the sources, so I’m wondering how far away is the Qt multi-touch backend from seeing the light.

Conclusion

I don’t know which way the multi-touch will happen on linux, but I know for sure that we want to play with gestures and we want it soon 😀

For more information:

  • Peter Hutterer’s blog. Peter is the MPX (Multi Pointer X) author and plays a big role in the X.org community.
  • X Input Extension 2.0 features.
  • The Linux Wacom project. A community-driven effort to develop kernel and X drivers.
Comments
7 Comments »
Categories
Senza categoria
Tags
avanguardia, creativity, multi-touch, planetkde, planetqt, qt, x.org

AddiQted to 4.6

11 October 2009

note for planetkde readers: check the original article to see the video!

I confess, I’m addiQted. You obviously think it’s normal (you’re not reading this blog by accident, aren’t you?) but it wasn’t always like this: I’ve liked some previous versions, but the upcoming Qt 4.6 really rocks!

The Fotowall case

As I shown previosly, Fotowall already uses some features of Qt 4.6. How much?
Qt 4.6 is referenced in 32 places, for example in snippets like this:

    // center the path
    QPointF pathCenter = path.boundingRect().center();
    #if QT_VERSION >= 0x040600
        path.translate(-pathCenter);
    #elif QT_VERSION >= 0x040500
        path = QTransform::fromTranslate(-pathCenter.x(), -pathCenter.y()).map(path);
    #else
        QTransform tx;
        tx.translate(-pathCenter.x(), -pathCenter.y());
        path = tx.map(path);
    #endif

From simple path translations to more complex property manipulations, everything got better. See this code snipped about extending QGraphicsObject in 4.6 versus 4.5 and 4.4.

    #if QT_VERSION >= 0x040600
    class AbstractContent : public QGraphicsObject
    #else
    class AbstractContent : public QObject, public QGraphicsItem
    #endif
    {
        Q_OBJECT
    #if QT_VERSION < 0x040600
        Q_PROPERTY(QPointF pos READ pos WRITE setPos)
        Q_PROPERTY(qreal rotation READ rotation WRITE setRotation NOTIFY rotationChanged)
    #endif
    #if QT_VERSION < 0x040600 && QT_VERSION >= 0x040500
        Q_PROPERTY(qreal opacity READ opacity WRITE setOpacity)
    #endif

Do you feel the pain?

I Need it

I need a world with Qt 4.6 only, because:

  • It’s too much of a pain to support older versions in the same codebase
  • It’s not even fair, because non-4.6 users won’t enjoy the program as it’s meant to be
  • I can’t use A TON of new features because they’ll either simplify too much the code, or just because they don’t have a pre-4.6 equivalent
  • and because I’d like to finally use
    • QGraphicsEffect for Fotowall’s content
    • QVector3D to say goodbye to enricomath.h
    • QGesture for multi-finger interaction
    • QPropertyAnimation to its full potential!

More 4.6 TEASING

  1. As you seem to like videos, here is a preview of something we’re working on for Amarok 😉 Qt 4.6 only!!
    [youtube width=”420″ height=”220″]http://www.youtube.com/watch?v=RSd9v5xHWa4[/youtube]
  2. Also, since I’m soooo much a giver, see the new Fotowall’s Word Cloud feature, coming in 0.9 😉

See you @ Munich

I’m packing for the DevDays 2009 Munich. See you there 😉

Comments
8 Comments »
Categories
Computer Graphics, Software
Tags
amarok, avanguardia, creativity, graphicsview, planetkde, planetqt, qt, qtsoftware

Cuteness 4.6

27 September 2009

Seven days after the release of the Tech Preview 1, we released the latest stable Windows build of Fotowall [1] that was based on Qt 4.6. Somebody could argue that this is a bit imprudent. We did that because the benefits of the 4.6 release are worth the risk of the move!

Indirect Benefits, or ‘what you get for free’

  • Improved quality and better speed in the OpenGL QPainter
  • Better speed in the GraphicsView framework

Direct Benefits

  • Animation Framework: this simply r0cks! I don’t know about the whole Kinetic stuff, I just mean the ability to create simple property animations.
    I don’t have a video to show you but just take a look at the Fotowall’s Top-Bar, the tabs appear and disappear with a nice and smooth grow-shrink animation, that make the program look soo 2009-ish! finally!
  • QNetworkReply::isFinished(): thanks to this method I could implement a smart time-saver: when the user starts to drag a flickr picture, Fotowall starts downloading it. It can happen that, upon drop, the content has already been completely downloaded (so it can be placed in the canvas) or partially downloaded (so the used only needs to wait for the missing percent)

Drawbacks

  • There are some graphics glitches when animating the opacity property of a QGaphicsProxyWidget (in OpenGL)
  • Even by setting the QGraphicsItem::ItemSendsGeometryChanges flag, the previous behavior is not perfectly restored (we used itemChange, and the new behavior doesn’t allow Fotowall’s mirrors to sync properly to the objects)

Movie Time!

I’ve tried hard to record a screencast about the Cuteness & Performance of Qt 4.6, but in the end I had to use my camera.

[youtube width=”500″ height=”305″]http://www.youtube.com/watch?v=tVzzF_ft7uc[/youtube]

Thanks Nokia for this great release! 😉

[1] Fotowall is a creative program to mix local and online graphics content and build original work.

Comments
14 Comments »
Categories
Computer Graphics, Interests
Tags
avanguardia, creativity, figosità, fotowall, graphicsview, open source, planetkde, planetqt, qt

Fotowall 0.8

26 September 2009

Fotowall 0.8.2 has just been released and we’re already getting some great feedback 😉

New features in Fotowall 0.8

Cherry picked cherry features from the delicious 0.8 release:

  • Now you’ll be able to deform text changing the shape of its baseline visually (see the “Fotowall” string in the image above and its Bezier control points)
  • Pictures can be cropped to a certain area, for example to select a single person from a group. Also picture’s transparency can be adjusted, to create nice fading effects
  • A lot of work has been put into enabling OpenGL acceleration, really useful if your canvas has 100+ semi-transparent objects 😉
  • You can now work with a transparent window (or blurred, on Vista)
  • The top-bar is now context-sensitive. We’ll move more and more content properties to that instead of the old content configuration window

Plus a lot of user suggestions and fixes have been implemented to make Fotowall always easier and intuitive to use. The 0.8 release now ships in 6 different languages: english, italian, french, german, brazilian, polish. You can even contribute your own translations.

But our favorite news is that Fotowall now has it’s official website 😉

What about next: we’re working hard on the 0.9 release and we already have lots of new features! You’ll be surprised by what you’ll be able to achieve with the next version 😀

A final special thank to Zack Rusin who created the Text on path example that was the basis of our shaped text.

Comments
7 Comments »
Categories
Software
Tags
avanguardia, creativity, figosità, fotowall, graphicsview, open source, planetqt, qt, wallpaper

Quax 4 – a tale of porting

25 August 2009

Note for planetqt readers: the title should be ‘Quax 4 – a tale of porting’

Once upon a time, a little application called quax was landed on kde-apps. As imagination is better served by a picture, here is what quax looks like:

Quax after being ported to Qt 4.5.

Quax after being ported to Qt 4.5.

It’s nothing but a simple and easy to use screen magnifier. You can move it around and place it near the detail to magnify. Plus it lets you pick the color of a pixel. It’s the perfect tool when you’re tuning the style, pixels and gradients of your beloved app 😉 It had only one drawback: it was build with Qt 3.

Porting Quax to Qt4

It was the first time I had to port an application from Qt3 to Qt4. Here are some stats:

  • The porting took 3 hours (you can see it from the git history, dinner included 😉 )
  • I did the following:
    • create the project files
    • use qt3to4 with that files
    • make it compile disabling some code chunks
    • re-enable the disabled code in a qt4 way
    • disabled qt3 support from the .pro file and fixed all until it compiled
    • update the packaging informations, readme’s
    • published Quax 4 in kde-apps
  • The source code dropped from 670 to 547 lines of code. So Qt4 saved 14% of code compared to Qt3 for this project.
  • The cleanness went drastically up, the API of Qt4 is a big improvement over that of Qt3.
  • I can’t talk about speed or graphics improvements.. but if you look at the old screenshots you’ll see that the font rendering was really improved in Qt4

Conclusion

Finally I have quax back, and you can have it too! 😉 The source code is on gitorious, and here is the kde-apps page. A final thank word to Claudiu Costin (the original author) and Vlad Oancea (the skin designer). I won’t maintain quax4 and I don’t plan to add any features, I’m just glad I can keep my box Qt3 free while designing pixel-perfect graphics thanks to this cute little utility 😉

Comments
Comments Off on Quax 4 – a tale of porting
Categories
Software
Tags
open source, planetqt, qt

Fotowall 0.7

24 July 2009

Fotowall 0.7.1 has been released today! Get it while it’s hot 😉

FotoWall 0.7

New features in Fotowall 0.7. In the top left area you can see the web image selector.

With this release Fotowall integrates with the deep web. You can now search the network with the embedded flickr search pane and add the images to the canvas. This opens up an infinite can of content, all available for your pleasure ;-).

Other relevant features include:

  • support for Qt 4.6 (brings animations and transparencies)
  • usability fixes (rubberband selection, deletion, etc..)
  • cleaner design (new icons, loadable frames, better property dialogs)
  • italian, french and german translation
  • check for updates and web links

Don’t hesitate to ask for missing features and always remember that you can rotate pictures by dragging corners with the right mouse button 😉

Enjoy your Fotowall!! 😀

Comments
9 Comments »
Categories
Senza categoria
Tags
avanguardia, figosità, fotowall, graphicsview, planetqt, qt

AutoGram – The machine Vs The machine

4 June 2009

Hello, it’s me again, back on the cheating bandwagon 😉 Last time we talked about BioCheat, and now we add another piece of the web-automation jigsaw puzzle: AutoGram.

Please enjoy this HQ stream of deceptive video pixels while I explain this fine new piece of trickery 😉

[youtube=http://www.youtube.com/watch?v=Vc0v9UFLGpM&w=480&h=304&rel=0]

As you can see, this other frustration-driven program lets you climb the ladder of a typical facebook game while drinking coffee or feeding your pet!

So, before starting you need: Read the rest of this entry »

Comments
1 Comment »
Categories
Software
Tags
avanguardia, cheating, planetqt, qt

BioCheat – The machine Vs The machine

26 May 2009

update: XP/Vista download here 😉

You are happily wasting time on facebook (that site with all the ignore buttons, with noisy stuff from people who call themselves ‘friends’ of you.. you know..) when you unfortunately get hooked up with Biotronic. This flash game is quite nice, but there is a rank ladder on bottom and you’re last. So you play and play … still last, play even more.. still last.. can you see the frustration?! The layman’s answer is to play (aka waste hours) to get better and climb the ladder..

And then there’s the programmer’s answer: I’ll write a Qt program to get me on top!! 😉 (yes, and still waste hours :D) — Here is the result: BioCheat 😉

[youtube=http://www.youtube.com/watch?v=2I7vu4thd7Y&fmt=18&w=480&h=332&rel=0]

The game is in FLASH, so no HTML or DOM tricks, you have to emulate eyes, brains and hands (only 1). Read the rest of this entry »

Comments
5 Comments »
Categories
Software
Tags
avanguardia, cheating, planetqt, qt

Hello PlanetQt

24 May 2009

Hello PlanetQt readers! 😉 Thanks to Ben I’ve just been aggregated here!

I’m Enrico Ros, from Italy, and I share your passion for good design, great code and awesome APIs 😀

Stay tuned… ^_^

Comments
Comments Off on Hello PlanetQt
Categories
Interests
Tags
planetqt

Blogroll

  • Ariya Hidayat's Blog
  • Davide La Rosa
  • PlanetKDE
  • Pollycoke
  • Qt Labs
  • Yanko Design
  • Zack Rusin's Blog

Recent Posts

  • How to recognize a revolution
  • KDE 3 on “The Social Network” movie
  • Delicious Transblurency [1]
  • Grab one, it’s free!
  • Gift a cool idea!

Tags

amarok Android avanguardia cheating colorpicker creativity curriculum figosità fotowall future graphicsview heroes kde3 kde4 life M31 multi-touch nokia open source planetkde planetqt posterazor qt qtsoftware statistics summer of code wallpaper x.org

Archives

  • April 2011 (1)
  • September 2010 (1)
  • April 2010 (1)
  • January 2010 (1)
  • December 2009 (3)
  • October 2009 (1)
  • September 2009 (4)
  • August 2009 (1)
  • July 2009 (3)
  • June 2009 (3)
  • May 2009 (2)
  • April 2009 (3)
  • March 2009 (1)
  • January 2009 (2)
  • May 2008 (1)
  • April 2008 (1)
  • January 2008 (2)
  • December 2007 (1)
  • November 2007 (1)
  • September 2007 (3)