digiKam
importthumbnailbar.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 : 2012-20-07
7  * Description : Thumbnail bar for import tool
8  *
9  * Copyright (C) 2012 by Islam Wazery <wazery at ubuntu dot com>
10  * Copyright (C) 2012-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_IMPORT_THUMBNAIL_BAR_H
26 #define DIGIKAM_IMPORT_THUMBNAIL_BAR_H
27 
28 // Local includes
29 
30 #include "importcategorizedview.h"
31 
32 namespace Digikam
33 {
34 
36 {
37  Q_OBJECT
38 
39 public:
40 
41  explicit ImportThumbnailBar(QWidget* const parent = nullptr);
42  ~ImportThumbnailBar() override;
43 
49 
50  QModelIndex nextIndex(const QModelIndex& index) const;
51  QModelIndex previousIndex(const QModelIndex& index) const;
52  QModelIndex firstIndex() const;
53  QModelIndex lastIndex() const;
54 
58  void setScrollBarPolicy(Qt::ScrollBarPolicy policy);
59  void setFlow(QListView::Flow newFlow);
60 
61  void installOverlays();
62 
63 public Q_SLOTS:
64 
65  void assignRating(const QList<QModelIndex>& index, int rating);
66  void slotDockLocationChanged(Qt::DockWidgetArea area);
67 
68 protected:
69 
70  void slotSetupChanged() override;
71  bool event(QEvent*) override;
72 
73 private:
74 
75  // Disable
76  ImportThumbnailBar(const ImportThumbnailBar&) = delete;
77  ImportThumbnailBar& operator=(const ImportThumbnailBar&) = delete;
78 
79 private:
80 
81  class Private;
82  Private* const d;
83 };
84 
85 } // namespace Digikam
86 
87 #endif // DIGIKAM_IMPORT_THUMBNAIL_BAR_H
Definition: importcategorizedview.h:44
QSortFilterProxyModel * filterModel() const override
reimplemented from parent class
Definition: importcategorizedview.cpp:191
Definition: importimagemodel.h:43
Definition: importfiltermodel.h:43
Definition: importthumbnailbar.h:36
void setModelsFiltered(ImportItemModel *model, ImportSortFilterModel *filterModel)
Definition: importthumbnailbar.cpp:87
QModelIndex nextIndex(const QModelIndex &index) const
Definition: importthumbnailbar.cpp:214
ImportThumbnailBar(QWidget *const parent=nullptr)
Definition: importthumbnailbar.cpp:53
void slotDockLocationChanged(Qt::DockWidgetArea area)
Definition: importthumbnailbar.cpp:111
void slotSetupChanged() override
Definition: importthumbnailbar.cpp:180
void setScrollBarPolicy(Qt::ScrollBarPolicy policy)
Definition: importthumbnailbar.cpp:125
bool event(QEvent *) override
Definition: importthumbnailbar.cpp:202
QModelIndex lastIndex() const
Definition: importthumbnailbar.cpp:229
~ImportThumbnailBar() override
Definition: importthumbnailbar.cpp:82
QModelIndex previousIndex(const QModelIndex &index) const
Definition: importthumbnailbar.cpp:219
void setFlow(QListView::Flow newFlow)
Definition: importthumbnailbar.cpp:148
QModelIndex firstIndex() const
Definition: importthumbnailbar.cpp:224
void assignRating(const QList< QModelIndex > &index, int rating)
Definition: importthumbnailbar.cpp:189
void installOverlays()
Definition: importthumbnailbar.cpp:98
Definition: datefolderview.cpp:43