digiKam
Loading...
Searching...
No Matches
showfotokineticscroller.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 : 2014-02-01
7 * Description : Kinetic Scroller for Thumbnail Bar
8 * based on Razvan Petru implementation.
9 *
10 * SPDX-FileCopyrightText: 2014 by Mohamed_Anwer <m_dot_anwer at gmx dot com>
11 *
12 * SPDX-License-Identifier: GPL-2.0-or-later
13 *
14 * ============================================================ */
15
16#pragma once
17
18// Qt includes
19
20#include <QObject>
21#include <QScopedPointer>
22#include <QAbstractScrollArea>
23#include <QListView>
24
25namespace ShowFoto
26{
27
32class ShowfotoKineticScroller: public QObject
33{
34 Q_OBJECT
35
36public:
37
38 explicit ShowfotoKineticScroller(QObject* const parent = nullptr);
39 ~ShowfotoKineticScroller() override;
40
44 void enableKineticScrollFor(QAbstractScrollArea* const scrollArea);
45 void setScrollFlow(QListView::Flow flow);
46
47protected:
48
49 bool eventFilter(QObject* object, QEvent* event) override;
50
51private Q_SLOTS:
52
53 void onKineticTimerElapsed();
54
55private:
56
57 class Private;
58 Private* const d = nullptr;
59};
60
61} // namespace ShowFoto
Definition showfotokineticscroller.h:33
void enableKineticScrollFor(QAbstractScrollArea *const scrollArea)
Definition showfotokineticscroller.cpp:96
bool eventFilter(QObject *object, QEvent *event) override
intercepts mouse events to make the scrolling work
Definition showfotokineticscroller.cpp:122
void setScrollFlow(QListView::Flow flow)
Definition showfotokineticscroller.cpp:307
~ShowfotoKineticScroller() override
Definition showfotokineticscroller.cpp:91
Definition showfotofolderviewbar.cpp:43