digiKam
showfotothumbnailbar.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 : 02-08-2013
7  * Description : Thumbnail bar for Showfoto
8  *
9  * Copyright (C) 2013 by Mohamed_Anwer <m_dot_anwer at gmx dot com>
10  * Copyright (C) 2013-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 SHOW_FOTO_THUMB_NAIL_BAR_H
26 #define SHOW_FOTO_THUMB_NAIL_BAR_H
27 
28 // Local Includes
29 
31 
32 namespace ShowFoto
33 {
34 
35 class ShowfotoItemViewToolTip;
36 
38 {
39  Q_OBJECT
40 
41 public:
42 
43  explicit ShowfotoThumbnailBar(QWidget* const parent = nullptr);
44  ~ShowfotoThumbnailBar() override;
45 
51 
52  QModelIndex nextIndex(const QModelIndex& index) const;
53  QModelIndex previousIndex(const QModelIndex& index) const;
54  QModelIndex firstIndex() const;
55  QModelIndex lastIndex() const;
56 
57  int thumbnailIndexForUrl(const QUrl& url) const;
58 
62  void setScrollBarPolicy(Qt::ScrollBarPolicy policy);
63  void setFlow(QListView::Flow newFlow);
64 
65  ShowfotoItemInfo findItemByUrl(const QUrl& url);
66 
67  void installOverlays();
68 
69 public Q_SLOTS:
70 
71  void slotDockLocationChanged(Qt::DockWidgetArea area);
72 
73 protected:
74 
75  void slotSetupChanged() override;
76  bool event(QEvent*) override;
77 
78 private:
79 
80  // Disable
82  ShowfotoThumbnailBar& operator=(const ShowfotoThumbnailBar&) = delete;
83 
84 private:
85 
86  class Private;
87  Private* const d;
88 };
89 
90 } // namespace ShowFoto
91 
92 #endif // SHOW_FOTO_THUMB_NAIL_BAR_H
Definition: showfotocategorizedview.h:42
QSortFilterProxyModel * filterModel() const override
reimplemented from parent class
Definition: showfotocategorizedview.cpp:175
Definition: showfotoiteminfo.h:48
Definition: showfotoitemmodel.h:47
Definition: showfotofiltermodel.h:44
Definition: showfotothumbnailbar.h:38
void setScrollBarPolicy(Qt::ScrollBarPolicy policy)
Definition: showfotothumbnailbar.cpp:131
ShowfotoItemInfo findItemByUrl(const QUrl &url)
Definition: showfotothumbnailbar.cpp:223
QModelIndex previousIndex(const QModelIndex &index) const
Definition: showfotothumbnailbar.cpp:208
ShowfotoThumbnailBar(QWidget *const parent=nullptr)
Definition: showfotothumbnailbar.cpp:63
int thumbnailIndexForUrl(const QUrl &url) const
Definition: showfotothumbnailbar.cpp:91
bool event(QEvent *) override
Definition: showfotothumbnailbar.cpp:191
QModelIndex lastIndex() const
Definition: showfotothumbnailbar.cpp:218
void setFlow(QListView::Flow newFlow)
Definition: showfotothumbnailbar.cpp:154
void slotDockLocationChanged(Qt::DockWidgetArea area)
Definition: showfotothumbnailbar.cpp:115
void setModelsFiltered(ShowfotoItemModel *model, ShowfotoSortFilterModel *filterModel)
QModelIndex nextIndex(const QModelIndex &index) const
Definition: showfotothumbnailbar.cpp:203
void installOverlays()
Definition: showfotothumbnailbar.cpp:110
void slotSetupChanged() override
Definition: showfotothumbnailbar.cpp:186
~ShowfotoThumbnailBar() override
Definition: showfotothumbnailbar.cpp:86
QModelIndex firstIndex() const
Definition: showfotothumbnailbar.cpp:213
Definition: showfotofolderviewbar.cpp:52