RecordItNow

RecordItNow is a little plugin based desktop recorder for KDE.
The current version is available at http://gitorious.org/recorditnow

Preview:
YouTube

Kategorien:C++, English, KDE, Qt

New PGame video

A little video about PGame:

Youtube

Kategorien:C++, English, KDE, Qt

PGame in playground

PGame for qt-4.6 is now in kde`s playground:

playground

Kategorien:C++, English, KDE, Qt

how to animate almost each layout in qt-4.6

I use QGraphicsLinearLayout for example.

First create a new QGraphicsLayout and pass a single QGraphicsWidget in the constructor and create a new QPropertyAnimation:

ProxyLayout::ProxyLayout(QGraphicsWidget *widget, QGraphicsLayoutItem *parent)
: QGraphicsLayout(parent), m_widget(widget)
{

m_animation = new QPropertyAnimation(m_widget, “geometry”);
m_animation->setDuration(300);

}

“ProxyLayout::count() const” returns just 1.
“QGraphicsLayoutItem *ProxyLayout::itemAt(int i) const” returns our widget.
“void ProxyLayout::removeAt(int index)” does nothing.

Now lets implement our animation:

void ProxyLayout::setGeometry(const QRectF &rect)
{

if (m_animation->state() == QPropertyAnimation::Running) {
m_animation->stop();
}

m_animation->setStartValue(m_widget->geometry());
m_animation->setEndValue(rect);
m_animation->start();

QGraphicsLayout::setGeometry(rect);

}

and the sizeHint:

QSizeF ProxyLayout::sizeHint(Qt::SizeHint which, const QSizeF &constraint) const
{

return m_widget->effectiveSizeHint(which, constraint);

}

Now you can add your widget to the QGraphicsLinearLayout:

QGraphicsLinearLayout *layout = new QGraphicsLinearLayout(Qt::Vertical, this);
MyWidget *widget = new MyWidget();
ProxyLayout *pLayout = new ProxyLayout(myWidget);
layout->insertItem(index, pLayout);

enjoy your animated layout :)

Kategorien:C++, English, KDE, Qt

PGame mit qt 4.6

In den letzten Tagen habe ich mich mal ein wenig mit Qt 4.6 beschäftigt.

Hier ein kleines Video mit dem bisherigem Ergebnis:

http://www.youtube.com/watch?v=VKn5sUvf43E

Alles lediglich mit QPropertyAnimation gemacht.

Kategorien:C++, German, KDE, Qt, Uncategorized

Hello world!

September 25, 2009 1 Kommentar

Welcome to WordPress.com. This is your first post. Edit or delete it and start blogging!

Kategorien:Uncategorized
Follow

Get every new post delivered to your Inbox.