File indexing completed on 2024-04-28 04:21:22

0001 // SPDX-FileCopyrightText: 2003-2022 Jesper K. Pedersen <blackie@kde.org>
0002 //
0003 // SPDX-License-Identifier: GPL-2.0-or-later
0004 
0005 #ifndef MOUSEINTERACTION_H
0006 #define MOUSEINTERACTION_H
0007 
0008 #include <QMouseEvent>
0009 #include <qevent.h>
0010 
0011 namespace ThumbnailView
0012 {
0013 
0014 /**
0015  * Mouse Event Handling for the ThumbnailView class is handled by subclasses of this class.
0016  *
0017  * Tree event handlers exists:
0018  * \ref GridResizeInteraction - Resizing the grid
0019  * \ref SelectionInteraction - handling selection
0020  * \ref MouseTrackingInteraction - Mouse tracking Q_EMIT current file under point, when mouse is not pressed down.
0021  */
0022 class MouseInteraction
0023 {
0024 public:
0025     virtual ~MouseInteraction() { }
0026     virtual bool mousePressEvent(QMouseEvent *) { return false; }
0027     virtual bool mouseMoveEvent(QMouseEvent *) { return false; }
0028     virtual bool mouseReleaseEvent(QMouseEvent *) { return false; }
0029     virtual bool isResizingGrid() { return false; }
0030 };
0031 
0032 }
0033 
0034 #endif /* MOUSEINTERACTION_H */
0035 
0036 // vi:expandtab:tabstop=4 shiftwidth=4: