File indexing completed on 2024-04-28 05:52:36

0001 /*
0002     This file is part of the Okteta Gui library, made within the KDE community.
0003 
0004     SPDX-FileCopyrightText: 2008-2009 Friedrich W. H. Kossebau <kossebau@kde.org>
0005 
0006     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0007 */
0008 
0009 #ifndef OKTETA_ABSTRACTMOUSECONTROLLER_HPP
0010 #define OKTETA_ABSTRACTMOUSECONTROLLER_HPP
0011 
0012 class QMouseEvent;
0013 
0014 namespace Okteta {
0015 
0016 class AbstractByteArrayView;
0017 
0018 class AbstractMouseController
0019 {
0020 protected:
0021     AbstractMouseController(AbstractByteArrayView* view, AbstractMouseController* parent);
0022 
0023 public:
0024     AbstractMouseController(const AbstractMouseController&) = delete;
0025 
0026     virtual ~AbstractMouseController();
0027 
0028     AbstractMouseController& operator=(const AbstractMouseController&) = delete;
0029 
0030 public: // API to be implemented
0031     virtual bool handleMousePressEvent(QMouseEvent* mouseEvent);
0032     virtual bool handleMouseMoveEvent(QMouseEvent* mouseEvent);
0033     virtual bool handleMouseReleaseEvent(QMouseEvent* mouseEvent);
0034     virtual bool handleMouseDoubleClickEvent(QMouseEvent* mouseEvent);
0035 
0036 protected:
0037     AbstractMouseController* mParent;
0038     AbstractByteArrayView* mView;
0039 };
0040 
0041 }
0042 
0043 #endif