~ubuntu-branches/ubuntu/natty/digikam/natty

« back to all changes in this revision

Viewing changes to digikam/albumiconitem.h

  • Committer: Bazaar Package Importer
  • Author(s): Felix Geyer
  • Date: 2010-08-26 19:25:16 UTC
  • mfrom: (1.2.30 upstream)
  • Revision ID: james.westby@ubuntu.com-20100826192516-mkbdww0h5v2x4yoy
Tags: 2:1.4.0-0ubuntu1
* New upstream bugfix release (LP: #626751)
* Install the file NEWS as upstream changelog because "ChangeLog" is
  too verbose.
* Don't copy the desktop .pot file to imageplugins, not needed anymore.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* ============================================================
2
 
 *
3
 
 * This file is a part of digiKam project
4
 
 * http://www.digikam.org
5
 
 *
6
 
 * Date        : 2003-04-25
7
 
 * Description : implementation to render album icon item.
8
 
 *
9
 
 * Copyright (C) 2003-2005 by Renchi Raju <renchi@pooh.tam.uiuc.edu>
10
 
 * Copyright (C) 2003-2008 by Gilles Caulier <caulier dot gilles at gmail dot com>
11
 
 *
12
 
 * This program is free software; you can redistribute it
13
 
 * and/or modify it under the terms of the GNU General
14
 
 * Public License as published by the Free Software Foundation;
15
 
 * either version 2, or (at your option)
16
 
 * any later version.
17
 
 *
18
 
 * This program is distributed in the hope that it will be useful,
19
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
 
 * GNU General Public License for more details.
22
 
 *
23
 
 * ============================================================ */
24
 
 
25
 
#ifndef ALBUMICONITEM_H
26
 
#define ALBUMICONITEM_H
27
 
 
28
 
// Qt includes
29
 
 
30
 
#include <QString>
31
 
#include <QDateTime>
32
 
#include <QRect>
33
 
 
34
 
// Local includes
35
 
 
36
 
#include "iconitem.h"
37
 
 
38
 
class QPainter;
39
 
 
40
 
namespace Digikam
41
 
{
42
 
 
43
 
class ImageInfo;
44
 
class AlbumIconItemPriv;
45
 
 
46
 
class AlbumIconItem : public IconItem
47
 
{
48
 
 
49
 
public:
50
 
 
51
 
    AlbumIconItem(IconGroupItem* parent, const ImageInfo& info);
52
 
    ~AlbumIconItem();
53
 
 
54
 
    ImageInfo imageInfo() const;
55
 
    QString   filePath() const;
56
 
 
57
 
    QRect thumbnailRect() const;
58
 
 
59
 
    bool isDirty();
60
 
 
61
 
    static void dateToString(const QDateTime& datetime, QString& str);
62
 
    static QString squeezedText(QPainter* p, int width, const QString& text);
63
 
 
64
 
    virtual int compare(IconItem *item);
65
 
    virtual QRect clickToOpenRect();
66
 
    virtual QRect clickToRateRect();
67
 
 
68
 
    virtual void  setRating(int rating);
69
 
    virtual int   rating() const;
70
 
 
71
 
protected:
72
 
 
73
 
    virtual void paintItem(QPainter *p);
74
 
 
75
 
private:
76
 
 
77
 
    AlbumIconItemPriv* const d;
78
 
};
79
 
 
80
 
}  // namespace Digikam
81
 
 
82
 
#endif  // ALBUMICONITEM_H