digiKam
actioncategorizedview.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 : 2006-01-20
7  * Description : action categorized view
8  *
9  * Copyright (C) 2006-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option)
15  * any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_ACTION_CATEGORIZED_VIEW_H
25 #define DIGIKAM_ACTION_CATEGORIZED_VIEW_H
26 
27 // Local includes
28 
29 #include "digikam_export.h"
30 #include "dcategorizedview.h"
31 
32 class QWidget;
33 class QEvent;
34 class QScrollBar;
35 class QMouseEvent;
36 class QPropertyAnimation;
37 
38 namespace Digikam
39 {
40 
41 class DIGIKAM_EXPORT ActionCategorizedView : public DCategorizedView
42 {
43  Q_OBJECT
44 
45 public:
46 
47  explicit ActionCategorizedView(QWidget* const parent = nullptr, bool autoScroll = false);
48  ~ActionCategorizedView() override;
49 
50  void setupIconMode();
51  void adjustGridSize();
52 
53 protected:
54 
55  int autoScrollDuration(float relativeDifference, QPropertyAnimation* animation);
56  void autoScroll(float relativePos, QScrollBar* scrollBar, QPropertyAnimation* animation);
57  void mouseMoveEvent(QMouseEvent* e) override;
58  void leaveEvent(QEvent* e) override;
59 
60 protected:
61 
62  QPropertyAnimation* m_verticalScrollAnimation;
63  QPropertyAnimation* m_horizontalScrollAnimation;
65 };
66 
67 } // namespace Digikam
68 
69 #endif // DIGIKAM_ACTION_CATEGORIZED_VIEW_H
Definition: actioncategorizedview.h:42
QPropertyAnimation * m_horizontalScrollAnimation
Definition: actioncategorizedview.h:63
bool m_autoScroll
Definition: actioncategorizedview.h:64
QPropertyAnimation * m_verticalScrollAnimation
Definition: actioncategorizedview.h:62
Item view for listing items.
Definition: dcategorizedview.h:49
Definition: datefolderview.cpp:43