[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/extragear/kde3/graphics/digikam/utilities/cameragui
From: Gilles Caulier <caulier.gilles () gmail ! com>
Date: 2009-05-25 7:18:08
Message-ID: 1243235888.305154.11054.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 972508 by cgilles:
sync with trunk
M +18 -13 cameraiconitem.cpp
M +10 -9 cameraiconitem.h
--- branches/extragear/kde3/graphics/digikam/utilities/cameragui/cameraiconitem.cpp #972507:972508
@@ -2,24 +2,24 @@
*
* This file is a part of digiKam project
* http://www.digikam.org
- *
+ *
* Date : 2004-09-21
- * Description : camera icon view item
- *
+ * Description : camera icon view item
+ *
* Copyright (C) 2004-2005 by Renchi Raju <renchi@pooh.tam.uiuc.edu>
- * Copyright (C) 2006-2008 by Gilles Caulier <caulier dot gilles at gmail dot com>
+ * Copyright (C) 2006-2009 by Gilles Caulier <caulier dot gilles at gmail dot com>
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
* Public License as published by the Free Software Foundation;
* either version 2, or (at your option)
* any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* ============================================================ */
// Qt includes.
@@ -104,7 +104,7 @@
pix = *(view->itemBaseSelPixmap());
else
pix = *(view->itemBaseRegPixmap());
-
+
ThemeEngine* te = ThemeEngine::instance();
QPainter p(&pix);
@@ -139,7 +139,7 @@
// Draw download status icon.
QPixmap downloaded;
-
+
switch (d->itemInfo->downloaded)
{
case GPItemInfo::NewPicture:
@@ -162,10 +162,10 @@
downloaded = SmallIcon( "button_cancel" );
break;
}
- /* TODO: see B.K.O #107316 : disable temporally the unknow download status until
- a new method to identify the already downloaded pictures from camera is
+ /* TODO: see B.K.O #107316 : disable temporally the unknow download status until
+ a new method to identify the already downloaded pictures from camera is
implemented.
-
+
case GPItemInfo::DownloadUnknow:
{
downloaded = view->unknowPicturePixmap();
@@ -206,6 +206,11 @@
repaint();
}
+int CameraIconViewItem::isDownloaded() const
+{
+ return d->itemInfo->downloaded;
+}
+
void CameraIconViewItem::toggleLock()
{
if (d->itemInfo->writePermissions == 0)
@@ -255,7 +260,7 @@
d->textRect.setWidth(QMAX(d->textRect.width(), d->extraRect.width()));
d->textRect.setHeight(d->textRect.height() + d->extraRect.height());
}
-
+
int w = QMAX(d->textRect.width(), d->pixRect.width() );
int h = d->textRect.height() + d->pixRect.height() ;
@@ -279,7 +284,7 @@
QRect CameraIconViewItem::clickToOpenRect()
{
QRect r(rect());
-
+
if (d->pixmap.isNull())
{
QRect pixRect(d->pixRect);
--- branches/extragear/kde3/graphics/digikam/utilities/cameragui/cameraiconitem.h #972507:972508
@@ -4,22 +4,22 @@
* http://www.digikam.org
*
* Date : 2004-09-21
- * Description : camera icon view item
- *
+ * Description : camera icon view item
+ *
* Copyright (C) 2004-2005 by Renchi Raju <renchi@pooh.tam.uiuc.edu>
- * Copyright (C) 2006-2008 by Gilles Caulier <caulier dot gilles at gmail dot com>
+ * Copyright (C) 2006-2009 by Gilles Caulier <caulier dot gilles at gmail dot com>
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
* Public License as published by the Free Software Foundation;
* either version 2, or (at your option)
* any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* ============================================================ */
#ifndef CAMERAICONITEM_H
@@ -50,10 +50,11 @@
~CameraIconViewItem();
void setThumbnail(const QImage& thumbnail);
-
+
void setDownloadName(const QString& downloadName);
QString getDownloadName() const;
void setDownloaded(int status);
+ int isDownloaded() const;
void toggleLock();
@@ -61,18 +62,18 @@
// reimplemented from IconItem
virtual QRect clickToOpenRect();
-
+
protected:
virtual void paintItem();
-
+
private:
void calcRect(const QString& itemName, const QString& downloadName);
private:
- CameraIconViewItemPriv* d;
+ CameraIconViewItemPriv* d;
};
} // namespace Digikam
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic