28 #ifndef DIGIKAM_ABSTRACT_ALBUM_TREE_VIEW_P_H
29 #define DIGIKAM_ABSTRACT_ALBUM_TREE_VIEW_P_H
35 #include <QStyledItemDelegate>
36 #include <QMouseEvent>
46 #include <klocalizedstring.h>
47 #include <kconfiggroup.h>
68 static QList<A*> selectedAlbums(QItemSelectionModel*
const selModel,
69 AlbumFilterModel*
const filterModel)
74 foreach (
const QModelIndex& index, indexes)
76 albums << static_cast<A*>(filterModel->albumForIndex(index));
107 : QStyledItemDelegate(treeView),
108 m_treeView (treeView),
115 const QModelIndex& index)
const override
117 QSize size = QStyledItemDelegate::sizeHint(option, index);
118 size.setHeight(qMax(size.height(), m_height));
126 m_treeView->fontMetrics().height());
138 if (m_height == height)
145 emit sizeHintChanged(QModelIndex());
161 : delegate (nullptr),
162 expandOnSingleClick (false),
163 expandNewCurrent (false),
164 selectAlbumOnClick (false),
165 selectOnContextMenu (true),
166 enableContextMenu (false),
167 setInAlbumManager (false),
168 resizeColumnsTimer (nullptr),
169 configSelectionEntry (QLatin1String(
"Selection")),
170 configExpansionEntry (QLatin1String(
"Expansion")),
171 configCurrentIndexEntry (QLatin1String(
"CurrentIndex")),
172 configSortColumnEntry (QLatin1String(
"SortColumn")),
173 configSortOrderEntry (QLatin1String(
"SortOrder"))
Definition: abstractalbumtreeview_p.h:157
bool enableContextMenu
Definition: abstractalbumtreeview_p.h:183
const QString configExpansionEntry
Definition: abstractalbumtreeview_p.h:199
bool selectAlbumOnClick
Definition: abstractalbumtreeview_p.h:181
const QString configSortOrderEntry
Definition: abstractalbumtreeview_p.h:202
const QString configCurrentIndexEntry
Definition: abstractalbumtreeview_p.h:200
bool selectOnContextMenu
Definition: abstractalbumtreeview_p.h:182
const QString configSortColumnEntry
Definition: abstractalbumtreeview_p.h:201
QMap< int, Digikam::State > searchBackup
Definition: abstractalbumtreeview_p.h:187
bool setInAlbumManager
Definition: abstractalbumtreeview_p.h:184
const QString configSelectionEntry
Definition: abstractalbumtreeview_p.h:198
QPixmap contextMenuIcon
Definition: abstractalbumtreeview_p.h:195
AlbumPointer< Album > lastSelectedAlbum
Definition: abstractalbumtreeview_p.h:191
QString contextMenuTitle
Definition: abstractalbumtreeview_p.h:196
Private()
Definition: abstractalbumtreeview_p.h:160
AlbumTreeViewDelegate * delegate
Definition: abstractalbumtreeview_p.h:177
QTimer * resizeColumnsTimer
Definition: abstractalbumtreeview_p.h:189
QMap< int, Digikam::State > statesByAlbumId
Definition: abstractalbumtreeview_p.h:186
QList< ContextMenuElement * > contextMenuElements
Definition: abstractalbumtreeview_p.h:193
bool expandNewCurrent
Definition: abstractalbumtreeview_p.h:180
bool expandOnSingleClick
Definition: abstractalbumtreeview_p.h:179
Definition: abstractalbumtreeview.h:63
Definition: albumpointer.h:48
static AlbumThumbnailLoader * instance()
Definition: albumthumbnailloader.cpp:111
Definition: abstractalbumtreeview_p.h:101
int m_height
Definition: abstractalbumtreeview_p.h:151
void updateHeight()
Definition: abstractalbumtreeview_p.h:123
AbstractAlbumTreeView * m_treeView
Definition: abstractalbumtreeview_p.h:150
QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override
Definition: abstractalbumtreeview_p.h:114
void setHeight(int height)
Definition: abstractalbumtreeview_p.h:136
AlbumTreeViewDelegate(AbstractAlbumTreeView *const treeView=nullptr)
Definition: abstractalbumtreeview_p.h:106
Definition: piwigotalker.h:48
Definition: datefolderview.cpp:43
Definition: abstractalbumtreeview_p.h:85
bool expanded
Definition: abstractalbumtreeview_p.h:94
bool currentIndex
Definition: abstractalbumtreeview_p.h:95
State()
Definition: abstractalbumtreeview_p.h:86
bool selected
Definition: abstractalbumtreeview_p.h:93