~ubuntu-branches/ubuntu/intrepid/digikam/intrepid

« back to all changes in this revision

Viewing changes to digikam/digikam/tagfilterview.h

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2008-07-17 20:25:39 UTC
  • mfrom: (1.3.2 upstream) (37 hardy)
  • mto: This revision was merged to the branch mainline in revision 39.
  • Revision ID: james.westby@ubuntu.com-20080717202539-1bw3w3nrsso7yj4z
* New upstream release
  - digiKam 0.9.4 Release Plan (KDE3) ~ 13 July 08 (Closes: #490144)
* DEB_CONFIGURE_EXTRA_FLAGS := --without-included-sqlite3
* Debhelper compatibility level V7
* Install pixmaps in debian/*.install
* Add debian/digikam.lintian-overrides

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* ============================================================
2
 
 * Author: Renchi Raju <renchi@pooh.tam.uiuc.edu>
3
 
 * Date  : 2005-05-05
4
 
 * Copyright 2005 by Renchi Raju
 
2
 *
 
3
 * This file is a part of digiKam project
 
4
 * http://www.digikam.org
 
5
 * 
 
6
 * Date        : 2005-05-05
 
7
 * Description : tags filter view
 
8
 *
 
9
 * Copyright (C) 2005 by Renchi Raju <renchi@pooh.tam.uiuc.edu>
 
10
 * Copyright (C) 2006-2008 by Gilles Caulier <caulier dot gilles at gmail dot com>
5
11
 *
6
12
 * This program is free software; you can redistribute it
7
13
 * and/or modify it under the terms of the GNU General
13
19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
20
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
21
 * GNU General Public License for more details.
 
22
 *
16
23
 * ============================================================ */
17
24
 
18
25
#ifndef TAGFILTERVIEW_H
19
26
#define TAGFILTERVIEW_H
20
27
 
 
28
// Local includes.
 
29
 
21
30
#include "folderview.h"
22
31
 
 
32
namespace Digikam
 
33
{
 
34
 
23
35
class Album;
24
36
class TagFilterViewItem;
25
 
class TagFilterViewPriv;
 
37
class TagFilterViewPrivate;
26
38
 
27
39
class TagFilterView : public FolderView
28
40
{
30
42
 
31
43
public:
32
44
 
 
45
    enum ToggleAutoTags
 
46
    {
 
47
        NoToggleAuto = 0,
 
48
        Children,
 
49
        Parents,
 
50
        ChildrenAndParents
 
51
    };
 
52
 
 
53
public:
 
54
 
33
55
    TagFilterView(QWidget* parent);
34
56
    ~TagFilterView();
35
57
 
36
 
    void triggerChange();
 
58
    void stateChanged(TagFilterViewItem*);
 
59
    void refresh();
 
60
 
 
61
signals:
 
62
 
 
63
    void signalProgressBarMode(int, const QString&);
 
64
    void signalProgressValue(int);
 
65
    void signalTextTagFilterMatch(bool);
 
66
 
 
67
public slots:
 
68
 
 
69
    void slotTextTagFilterChanged(const QString&);
 
70
 
 
71
    /** Reset all active tag filters */
 
72
    void slotResetTagFilters();
37
73
 
38
74
protected:
39
75
 
40
 
    QDragObject* dragObject();
41
76
    bool acceptDrop(const QDropEvent *e) const;
42
77
    void contentsDropEvent(QDropEvent *e);
43
 
 
44
 
signals:
45
 
 
46
 
    void signalTagsAssigned();
47
 
    
 
78
    QDragObject* dragObject();
 
79
 
48
80
private slots:
49
81
 
50
82
    void slotTagAdded(Album* album);
52
84
    void slotTagRenamed(Album* album);
53
85
    void slotTagDeleted(Album* album);
54
86
    void slotClear();
 
87
    void slotAlbumIconChanged(Album* album);
55
88
    void slotTimeOut();
56
89
    void slotContextMenu(QListViewItem*, const QPoint&, int);
 
90
    void slotABCContextMenu();
 
91
    void slotGotThumbnailFromIcon(Album *album, const QPixmap& thumbnail);
 
92
    void slotThumbnailLost(Album *album);
 
93
    void slotReloadThumbnails();
 
94
    void slotRefresh(const QMap<int, int>&);
57
95
 
58
96
private:
59
97
 
60
 
    void tagNew(TagFilterViewItem* item);
61
 
    void tagEdit(TagFilterViewItem* item);    
 
98
    void triggerChange();
 
99
    void tagNew(TagFilterViewItem* item, const QString& _title=QString(),
 
100
                const QString& _icon=QString());
 
101
    void tagEdit(TagFilterViewItem* item);
62
102
    void tagDelete(TagFilterViewItem* item);
63
 
    
64
 
    TagFilterViewPriv *d;
 
103
    void setTagThumbnail(TAlbum *album);
 
104
    void toggleChildTags(TagFilterViewItem* tItem, bool b);
 
105
    void toggleParentTags(TagFilterViewItem* tItem, bool b);
 
106
 
 
107
private:
 
108
 
 
109
    TagFilterViewPrivate *d;
65
110
};
66
111
 
 
112
}  // namespace Digikam
67
113
 
68
114
#endif /* TAGFILTERVIEW_H */