• Skip to content
  • Skip to link menu
KDE 4.4 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

digikam

albumfolderview.h

Go to the documentation of this file.
00001 /* ============================================================
00002  *
00003  * This file is a part of digiKam project
00004  * http://www.digikam.org
00005  *
00006  * Date        : 2005-05-06
00007  * Description : Albums folder view.
00008  *
00009  * Copyright (C) 2005-2006 by Joern Ahrens <joern.ahrens@kdemail.net>
00010  * Copyright (C) 2006-2009 by Gilles Caulier <caulier dot gilles at gmail dot com>
00011  *
00012  * This program is free software; you can redistribute it
00013  * and/or modify it under the terms of the GNU General
00014  * Public License as published by the Free Software Foundation;
00015  * either version 2, or (at your option)
00016  * any later version.
00017  *
00018  * This program is distributed in the hope that it will be useful,
00019  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00021  * GNU General Public License for more details.
00022  *
00023  * ============================================================ */
00024 
00025 #ifndef ALBUMFOLDERVIEW_H
00026 #define ALBUMFOLDERVIEW_H
00027 
00028 // KDE includes
00029 
00030 #include <kio/job.h>
00031 
00032 // Local includes
00033 
00034 #include "searchtextbar.h"
00035 #include "folderview.h"
00036 #include "folderitem.h"
00037 
00038 class QDropEvent;
00039 class QPixmap;
00040 class QDrag;
00041 
00042 class KUrl;
00043 
00044 namespace Digikam
00045 {
00046 
00047 class Album;
00048 class PAlbum;
00049 class AlbumFolderViewPriv;
00050 
00051 class AlbumFolderViewItem : public FolderItem
00052 {
00053 public:
00054 
00055     AlbumFolderViewItem(Q3ListView *parent, PAlbum *album);
00056     AlbumFolderViewItem(Q3ListViewItem *parent, PAlbum *album);
00057 
00058     // special group item (collection/dates)
00059     AlbumFolderViewItem(Q3ListViewItem* parent, const QString& name,
00060                         int year, int month);
00061 
00062     PAlbum* album() const;
00063     int     id() const;
00064     bool    isGroupItem() const;
00065     int     compare(Q3ListViewItem *i, int col, bool ascending) const;
00066     void    refresh();
00067     void    setOpen(bool o);
00068     void    setCount(int count);
00069     int     count();
00070     int     countRecursive();
00071 
00072 private:
00073 
00074     bool    m_groupItem;
00075 
00076     int     m_year;
00077     int     m_month;
00078     int     m_count;
00079     int     m_countRecursive;
00080 
00081     PAlbum *m_album;
00082 };
00083 
00084 class AlbumFolderView : public FolderView
00085 {
00086     Q_OBJECT
00087 
00088 public:
00089 
00090     AlbumFolderView(QWidget *parent);
00091     ~AlbumFolderView();
00092 
00093     void resort();
00094     void refresh();
00095 
00096     void albumNew();
00097     void albumDelete();
00098     void albumEdit();
00099     void albumRename();
00100 
00101     void setAlbumThumbnail(PAlbum *album);
00102 
00103     void setCurrentAlbum(Album *album);
00104 
00105 Q_SIGNALS:
00106 
00107     void signalAlbumModified();
00108     void signalTextFolderFilterMatch(bool);
00109     void signalFindDuplicatesInAlbum(Album*);
00110 
00111 public Q_SLOTS:
00112 
00113     void slotTextFolderFilterChanged(const SearchTextSettings&);
00114 
00115 private Q_SLOTS:
00116 
00117     void slotGotThumbnailFromIcon(Album *album, const QPixmap& thumbnail);
00118     void slotThumbnailLost(Album *album);
00119     void slotReloadThumbnails();
00120     void slotSelectionChanged();
00121 
00122     void slotAlbumAdded(Album *);
00123     void slotAlbumDeleted(Album *album);
00124     void slotAlbumsCleared();
00125     void slotAlbumIconChanged(Album* album);
00126     void slotAlbumRenamed(Album *album);
00127 
00128     void slotContextMenu(Q3ListViewItem*, const QPoint&, int);
00129 
00130     void slotDIOResult(KJob* job);
00131     void slotRefresh(const QMap<int, int>&);
00132 
00133 protected:
00134 
00135     void contentsDropEvent(QDropEvent *e);
00136     bool acceptDrop(const QDropEvent *e) const;
00137 
00138     void selectItem(int id);
00139 
00140 private:
00141 
00142     void albumNew(AlbumFolderViewItem *item);
00143     void albumEdit(AlbumFolderViewItem *item);
00144     void albumRename(AlbumFolderViewItem *item);
00145     void albumDelete(AlbumFolderViewItem *item);
00146 
00147     void addAlbumChildrenToList(KUrl::List& list, Album *album);
00148 
00149     AlbumFolderViewItem* findParent(PAlbum* album, bool& failed);
00150     AlbumFolderViewItem* findParentByFolder(PAlbum* album, bool& failed);
00151     AlbumFolderViewItem* findParentByCategory(PAlbum* album, bool& failed);
00152     AlbumFolderViewItem* findParentByDate(PAlbum* album, bool& failed);
00153 
00154     void reparentItem(AlbumFolderViewItem* folderItem);
00155     void clearEmptyGroupItems();
00156     QDrag* makeDragObject();
00157 
00158 private:
00159 
00160     AlbumFolderViewPriv* const d;
00161 };
00162 
00163 }  // namespace Digikam
00164 
00165 #endif // ALBUMFOLDERVIEW_H

digikam

Skip menu "digikam"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

API Reference

Skip menu "API Reference"
  • digikam
Generated for API Reference by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal