We used to create a new QGraphicsRectItem everytime a Pixmap
changed. Since I'm pretty sure I deleted every bit of the
PictureItem before setting a new one, no leak was due, but this
version is safer.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Select the picture, press delete, profit.
[Dirk Hohndel: removed the stray hunk that snuck into this patch]
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Since the idea is to remove the picture in the future, we need
to not hold the row on the model, as when we delete one, the
other pictures will change the row. but the QUrl is unique.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch hides a picture from the dive, it should actually
remove it, but because I didn't found a quick way to remove
a picture from the dive yet, it just hides it.
To remove a picture from the dive, the DivePictureItem has to
remember the QUrl of the original file, to remove that from the
model, and currently it only has the QPixmap.
this can be for 4.2.1 or we can postpone 4.2 a tiny bit since this
is a important feature.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This code hoocks the pictures with the preferences change.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch makes the click on pic == open picture browser works
also on the profile instead of only on the list view..
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This patch adds a subtle animation when the picture gets hovered
with the mouse, and restored to it's original size when mouse exits
the image area.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
I know everyone will hate it.
Go ahead. Complain. Call me names.
At least now things are consistent and reproducible.
If you want changes, have your complaint come with a patch to
scripts/whitespace.pl so that we can automate it.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
* ensure include guard to every header
* comment endif guard block
Signed-off-by: Boris Barbulovski <bbarbulovski@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
They should have a newline at the end.
Forward declarations of classes should be 'class'.
Function / method definitions don't end on a ';'
Remove obsolete QStateMachine forward reference.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This class is useful for adding / removing icons on the future profile in
a way that they are smoothly added to / removed from the canvas.
It uses the QProperty System to deal with animations.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>