digiKam
itemthumbnailbar.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2010-02-06
7  * Description : Thumbnail bar for items
8  *
9  * Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
10  * Copyright (C) 2009-2022 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 DIGIKAM_ITEM_THUMBNAIL_BAR_H
26 #define DIGIKAM_ITEM_THUMBNAIL_BAR_H
27 
28 // Local includes
29 
30 #include "itemcategorizedview.h"
31 
32 namespace Digikam
33 {
34 
36 {
37  Q_OBJECT
38 
39 public:
40 
41  explicit ItemThumbnailBar(QWidget* const parent = nullptr);
42  ~ItemThumbnailBar() override;
43 
45  void setScrollBarPolicy(Qt::ScrollBarPolicy policy);
46  void setFlow(QListView::Flow newFlow);
47 
48  void installOverlays();
49 
55 
56  QModelIndex nextIndex(const QModelIndex& index) const;
57  QModelIndex previousIndex(const QModelIndex& index) const;
58  QModelIndex firstIndex() const;
59  QModelIndex lastIndex() const;
60 
61 public Q_SLOTS:
62 
63  void assignRating(const QList<QModelIndex>& index, int rating);
64  void slotDockLocationChanged(Qt::DockWidgetArea area);
65 
66 protected:
67 
68  void slotSetupChanged() override;
69  bool event(QEvent*) override;
70 
71 private:
72 
73  class Private;
74  Private* const d;
75 };
76 
77 } // namespace Digikam
78 
79 #endif // DIGIKAM_ITEM_THUMBNAIL_BAR_H
Definition: itemfiltermodel.h:63
Definition: itemcategorizedview.h:49
QSortFilterProxyModel * filterModel() const override
Definition: itemcategorizedview.cpp:234
Definition: itemmodel.h:53
Definition: itemthumbnailbar.h:36
bool event(QEvent *) override
Definition: itemthumbnailbar.cpp:194
void setModelsFiltered(ItemModel *model, ImageSortFilterModel *filterModel)
Definition: itemthumbnailbar.cpp:92
QModelIndex firstIndex() const
Definition: itemthumbnailbar.cpp:215
void setFlow(QListView::Flow newFlow)
Definition: itemthumbnailbar.cpp:150
~ItemThumbnailBar() override
Definition: itemthumbnailbar.cpp:87
void slotSetupChanged() override
Definition: itemthumbnailbar.cpp:180
QModelIndex lastIndex() const
Definition: itemthumbnailbar.cpp:220
QModelIndex previousIndex(const QModelIndex &index) const
Definition: itemthumbnailbar.cpp:210
void installOverlays()
Definition: itemthumbnailbar.cpp:103
ItemThumbnailBar(QWidget *const parent=nullptr)
Definition: itemthumbnailbar.cpp:60
void slotDockLocationChanged(Qt::DockWidgetArea area)
Definition: itemthumbnailbar.cpp:114
void setScrollBarPolicy(Qt::ScrollBarPolicy policy)
Sets the policy always for the one scroll bar which is relevant, depending on orientation.
Definition: itemthumbnailbar.cpp:128
QModelIndex nextIndex(const QModelIndex &index) const
Definition: itemthumbnailbar.cpp:205
void assignRating(const QList< QModelIndex > &index, int rating)
Definition: itemthumbnailbar.cpp:189
Definition: datefolderview.cpp:43