lorn
Posted by lorn
 in
 on Saturday, December 30, 2006 @ 07:43

Qtopia (and Opie II !!) do not require you to build in the source tree. You can “shadow build’ using a different directory for compiling, keeping separate your work sources and your build tree. This keeps things nice and clean, and is easier to maintain and work with. It also makes it possible to have builds for multiple devices using only one source tree.

Only thing you need to do is set QTOPIA_DEPOT_PATH to where ever your sources are.

export QTOPIA_DEPOT_PATH=~/projects/qtopia-opensource-4.2.0

and then
$ mkdir ~/builds/opie-greenphone
$ cd ~/builds/opie-greenphone
$ $QTOPIA_DEPOT_PATH/configure -device greenphone
$ make
$ make install

This will build Qtopia sources from the current directory. Easy as a warm summer day in December!

Comments Off
lorn
Qt
Qtopia
Posted by lorn
 in Qt, Qtopia
 on Thursday, December 21, 2006 @ 19:33

well, its that time of year again. Holidaze!

Around here, its either hot or raining this time of year, eggnog isn’t very special because the stores have it year round, if Santa Claus is seen outside he is sweating buckets and has shorts on, Santa Claus uses kangaroos for his sleigh instead, people are a bit more sane about decorating their houses, the lawn needs mowed every week - even though we are in a drought and it still can rain bucket loads, and BBQ’s are the norm ( they don’t have “shrimp on the barbie” and I have yet to see anyone drink a Fosters)!

Since I am taking a few days off around the holidays (yay! I get an extra day off - Boxing Day, hopefully there will be some good boxing matches on tv!!), I will be (trying to) working on OpieII, even if I cannot get svn import working. Nokia 770 and Zaurus c3000/clamshell run ok. Currently working on getting it running on zaurus 5600. Still need to do 6000, 5500/5000d and a few iPaqs I have access to (3630, 4700, 38xx). I would try for the Simpad except the digitizer has gone all wonky.

Andreas
Qt
Labs
Graphics View
Graphics Items
Posted by Andreas
 in Qt, Labs, Graphics View, Graphics Items
 on Wednesday, December 20, 2006 @ 07:33

After Simon and Paul made some advancements to Qt’s font rendering system, it’s possible to render fonts in Qt running in Tty / console mode; that is, you don’t need an X11 connection. That means that the last piece of the puzzle is in place to use Qt for CGI scripting. :-) It sort of always worked, but now also for text. Guess what this is:

It’s a screenshot of output generated from a Qt CGI script based on Graphics View. Here’s how to do it:

#include <QtGui>

int main(int argc, char **argv)
{
    QApplication app(argc, argv, QApplication::Tty);

Create your QApp with QApplication::Tty (former ‘false’) to run in console mode.

    QGraphicsScene scene;
    scene.addEllipse(QRectF(0, 0, 100, 100), QPen(Qt::black, 2), QBrush(QColor(64, 78, 128, 192)));

Create a scene, just anything. Text, shapes, or your existing scene. Try adding text and see it work.

    QImage image(scene.itemsBoundingRect().size().toSize(), QImage::Format_ARGB32_Premultiplied);
    image.setColorTable(QVector() << Qt::transparent);
    image.fill(0);

Prepare a suitably-sized transparent image.

    QPainter painter(&image);
    painter.setRenderHint(QPainter::Antialiasing);
    scene.render(&painter);
    painter.end();

Render the scene onto the image.

    QBuffer buffer;
    buffer.open(QIODevice::WriteOnly);
    QImageWriter writer(&buffer, "png");
    writer.write(image);

Use QImageWriter to stuff the image into a QBuffer so that we can get its size for…

    printf("Content-Type: image/png; name="image.png"rn");
    printf("Content-Length: %drn", int(buffer.size()));
    printf("rn");

…the CGI header. Finally,

    QFile file;
    file.open(stdout, QIODevice::WriteOnly);
    file.write(buffer.data(), buffer.data().size());
    return 0;
}

Dump the image to stdout, compile, and copy your new script to your public_html/cgi-bin directory. ;-)

Disclaimer: This happens to work, tested in 4.3 snapshots only, may work with 4.2, and the snapshots may change at any time. It’s not officially supported.

harald
Qt
KDE
Posted by harald
 in Qt, KDE
 on Tuesday, December 19, 2006 @ 20:19

Last Thursday, IBM announced a new set of accessible interfaces called IAccessible2. Unfortunately, only Windows is currently supported.
Using my previous work for D-Bus based accessibility, I’ve been able to put together a D-Bus backend for IAccessible2 that contains cross-desktop D-Bus interfaces for IAccessible2, including a reference implementation for Qt 4.2. You can find the tarball and build instructions on this page.

Comments Off
lorn
Qt
Qtopia
Posted by lorn
 in Qt, Qtopia
 on Tuesday, December 19, 2006 @ 17:57

After a bit of delay, Trolltech finally released Qtopia under the GPL.

You can get it here!

ftp://ftp.trolltech.com/qtopia/source/qtopia-opensource-src-4.2.0.tar.gz

Have a Merry Christmas and/or Happy Holiday and/or Good Solstice!

Jens
Qt
Posted by Jens
 in Qt
 on Monday, December 18, 2006 @ 16:09

Qt applications have been using the Windows theme API to draw it’s widgets since the Qt 3 series. This is why existing Qt applications already fit very well into the Windows Vista desktop.

Yet, there have been quite a few cosmetic changes to standard controls on Vista and many widgets are now fully animated, including state transitions, pulsating default buttons and progressbars. To address these changes, we will introduce QWindowsVistaStyle in Qt 4.3.

It will be made available in the public snapshots tonight so that our users can start to experiment with it.

Here are a few examples:

WindowsVistaStyle example 1

This is how Designer looks:

WindowsVistaStyle example 2

Andreas
Qt
Qtopia
KDE
Labs
Graphics View
Graphics Items
Posted by Andreas
 in Qt, Qtopia, KDE, Labs, Graphics View, Graphics Items
 on Monday, December 18, 2006 @ 14:24

Some people have asked if they can have more explicit control over how QGraphicsScene’s index works.

If you’ve got concrete suggestions, please post comments to this post, or send us an email, or post a suggestion through our public feedback form.

Some suggestions we’ve got so far are: setting the depth of the tree, forcing all items to be indexed, blocking item indexing, and so on.

Please, let us know so that we can improve this popular framework. :-)

Simon
Qt
Posted by Simon
 in Qt
 on Saturday, December 16, 2006 @ 16:38

It’s time for another lazy Saturday afternoon blog entry. Lazy because that’s how I like Saturdays. No emails that need answering, no tasks that need fixing, just doing what I feel like. Sometimes hacking, sometimes making music, sometimes chatting. And almost traditionally some good Italian food. But let’s digress towards a neat feature in Qt 4.3 that Girish and I implemented on Thursday.

Have you ever used QMimeSourceFactory in Qt 3? Yes yes, that mysterious class that tries to solve so many problems with a name that is totally unrelated to any of them. For example it helps to locate images embedded in HTML markup in labels and tooltips. You could just write …

QMimeSourceFactory::defaultFactory()->addFilePath(QDir::homePath() + "/images");

QToolTip::add(widget, "<h1>Blah...</h1> Foo <img src="example.png"/>...");

… and when the tooltip is shown it would locate example.png in $HOME/images. That is because Qt 3’s richtext module used QMimeSourceFactory to locate resources like that.

Now in Qt 4 we moved all the functionality that QMimeSourceFactory provided into their respective locations. For example through QTextBrowser’s searchPaths() property or QTextDocument’s addResource() / loadResource() functions. Or through the introduction of the Qt Resource System. Unfortunately we kind of overlooked the use-case where one wants to reference images on the filesystem from tooltips or labels with relative paths only. Of course it is possible to still make that working, for example by implementing a pseudo file engine. But that’s not as convenient as one simple method call like in Qt 3. After quite a bit of discussion (with Jasmin and Andreas) we think we’ve found a nice solution. Say ‘hello’ to QDir’s search paths:

QDir::addSearchPath("icons", QDir::homePath() + "/images");

widget->setToolTip("...by pressing the <img src="icons:delete.png"/> button ...");
QFile f("icons:thumbnails/landscape.png");
QStringList allThumbs = QDir("icons:thumbnails/").entryList();

I think this is mostly self-explaining :). Since it is implemented at the file engine level it works with anything that uses them, including QFile and QDir of course.

And as usual a note of warning: APIs in snapshots may change ;-). It’s all subject to change, as much as the wheather here in Oslo. But while it is finally cooling down here (giving hope for snow after Christmas) Qt development is only heating up. I like it that way :)

I also observed that pictures help to grab people’s attention for blogs. But since I can’t really post a screenshot of the header file I decided to post a picture of the self-made pizza I’ve just had instead (with Pesto, Rucola, Buffalo Mozzarella, Avocado, Olives and Mushrooms):


Yummy self-made Pizza with plenty of Italian ingredients

zack
Aggregated
Posted by zack
 in Aggregated
 on Friday, December 15, 2006 @ 17:50

Last week I was in California with Lars. It was a pretty vicious trip. Partially caused by the fact that I abhor flying. I don’t have anything against the action of flying itself, but I do have a lot against the airlines. And the fact that Snapple icetea has been taken away from me 3 times on this trip is just atrocious. First they took my Snapple when I was going from New York to San Francisco, then they took 2 more before the San Francisco, Munich flights and finally I was completely stripped when flying from Munich to Oslo. Heartbreaking.

George, Lars and I spent a little bit of time hacking on WebKit. As a result we have our changes merged in the main WebKit repository. Yesterday I’ve setup a new buildbot and we were able to take down the machine that was heating WildFox’s apartment ;) If you’re planning to checkout WebKit make sure you look at http://build.webkit.org and see whether in post-commit-linux-qt column the “compiled release” box is green, if it is everything compiles. We’re going through some major changes so things break every few hours. If you want to build WebKit just do a svn checkout and follow it with ./WebKitTools/Scripts/build-webkit command, that should be enough to have WebKitQt/QtLauncher compiled and running. There’s a lot of things busted at the moment because of the above mentioned changes. We’ll fix them once some of the architectural changes that we need will land. Currently I’m serving as the reviewer of all the Qt code which I hope, with time, is going to change as more people gets familiar with it.

Most importantly though, I’d like to thank the person who sent me cheese. Lots of cheese. You absolutely and totally rock. If not the fact that I’m already emotionally involved with Free Software, I’d be all yours. I’m very certain you’d love to see my face when our secretary came to my office and said “your cheese is here”. Although it’s a perfectly valid sentence, I felt really confused and being certain I never ordered cheese in my life, was seconds away from suing Trolltech over sexual-harassment (I’m not 100% sure why, but I always wanted to do that). Oh, and Norwegian government being definitely anti-me didn’t want to deliver the cheese and decided that I have to pay taxes on it. Plus in all their glorious intelligence they decided that something that is marked as “cheese” clearly needs to stay in a warm place while being kept away. Despite Norwegian customs doing their “best” it was one of the coolest gifts ever.

lorn
Qt
Qtopia
Posted by lorn
 in Qt, Qtopia
 on Saturday, December 16, 2006 @ 01:38

“A British study of more them 8000 men and women aged 30 whose IQs had been measured when they were 10, showed that the higher the IQ, the greater the odds of being a vegetarian.”

“http://www.news.com.au/story/0,23599,20931861-1702,00.html

What does this have to do with Qtopia? Only that in our Brissie office, there are at least 5 vegetarians, including me, one of the qtmail guys, a PSO guy, as well as the boss guy who never wears shoes, except maybe now that he is playing farmer. So, at least since the boss is vegy, there is usually always something proper to eat.

This weekend we are moving office.. down the street to the north a bit in a new building. We have an entire floor! Complete with balcony off the lunchroom.

Qtopia 4 compiles take a huge amount of time, because it compiles _everything_ needed, which is Qtopia x11 tools, Qtopia core, and Qtopia.

Now, add a cross compile and you nearly double that time. You can use teambuilder, distcc, or icecream for distributed compiling to speed things up, and you can use some hidden arguments to Qtopia’s configure. If you have already compiled it once, you can reconfigure and recompile Qtopia without touching Qtopia Core and Qt! If you want to update Qtopia sources, you can then keep those already built directories somewhere, symlink them back to the build tree (after removing the directories in the tree first), and use a variety of configure switches to speed things up.

These are undocumented, unsupported and likely to break at any time. You can guess what these may do.

save_options
config
skip_qt_configure
skip_qt
skip_dqt
skip_qte
qmake
qmake_debug
confirm_license
quick