2018-03-26 12:41:09 -04:00
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
2023-11-19 07:31:45 -05:00
|
|
|
// Copyright (C) 2012 maintech GmbH, Otto-Hahn-Str. 15, 97204 Hoechberg, Germany //
|
|
|
|
// written by Christian Daniel //
|
|
|
|
// Copyright (C) 2015-2019 Edouard Griffiths, F4EXB <f4exb06@gmail.com> //
|
|
|
|
// Copyright (C) 2015 John Greb <hexameron@spam.no> //
|
|
|
|
// Copyright (C) 2022 Jon Beniston, M7RCE <jon@beniston.com> //
|
2018-03-26 12:41:09 -04:00
|
|
|
// //
|
|
|
|
// This program is free software; you can redistribute it and/or modify //
|
|
|
|
// it under the terms of the GNU General Public License as published by //
|
|
|
|
// the Free Software Foundation as version 3 of the License, or //
|
2019-04-11 08:43:33 -04:00
|
|
|
// (at your option) any later version. //
|
2018-03-26 12:41:09 -04:00
|
|
|
// //
|
|
|
|
// This program is distributed in the hope that it will be useful, //
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
|
|
|
|
// GNU General Public License V3 for more details. //
|
|
|
|
// //
|
|
|
|
// You should have received a copy of the GNU General Public License //
|
|
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef SDRGUI_GUI_CRIGHTCLICKENABLER_H_
|
|
|
|
#define SDRGUI_GUI_CRIGHTCLICKENABLER_H_
|
|
|
|
|
2022-12-20 05:01:16 -05:00
|
|
|
#include <QWidget>
|
2018-03-26 12:41:09 -04:00
|
|
|
|
2018-11-13 11:29:34 -05:00
|
|
|
#include "export.h"
|
|
|
|
|
|
|
|
class SDRGUI_API CRightClickEnabler : public QObject {
|
2018-03-26 12:41:09 -04:00
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2022-12-20 05:01:16 -05:00
|
|
|
CRightClickEnabler(QWidget *widget);
|
2018-03-26 12:41:09 -04:00
|
|
|
|
|
|
|
signals:
|
2022-12-20 05:01:16 -05:00
|
|
|
void rightClick(const QPoint&); // Emitted for right mouse click and touch tap and hold
|
2018-03-26 12:41:09 -04:00
|
|
|
|
|
|
|
protected:
|
2022-12-20 05:01:16 -05:00
|
|
|
bool eventFilter(QObject *watched, QEvent *event) override;
|
2018-03-26 12:41:09 -04:00
|
|
|
|
|
|
|
private:
|
2022-12-20 05:01:16 -05:00
|
|
|
QWidget* m_widget;
|
|
|
|
bool m_mousePressed;
|
2018-03-26 12:41:09 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* SDRGUI_GUI_CRIGHTCLICKENABLER_H_ */
|