File indexing completed on 2024-12-22 04:12:45
0001 /* This file is part of the KDE project 0002 * SPDX-FileCopyrightText: 2012 Arjen Hiemstra <ahiemstra@heimr.nl> 0003 * SPDX-FileCopyrightText: 2021 Emmet O 'Neill <emmetoneill.pdx@gmail.com> 0004 * SPDX-FileCopyrightText: 2021 Eoin O 'Neill <eoinoneill1991@gmail.com> 0005 * 0006 * SPDX-License-Identifier: GPL-2.0-or-later 0007 */ 0008 0009 #ifndef KIS_POPUP_WIDGET_ACTION_H 0010 #define KIS_POPUP_WIDGET_ACTION_H 0011 0012 #include "kis_abstract_input_action.h" 0013 0014 #include <QObject> 0015 #include <QPointer> 0016 #include <QWidget> 0017 #include <QMainWindow> 0018 0019 #include "kis_global.h" 0020 #include "kis_debug.h" 0021 #include "kis_canvas2.h" 0022 #include "KisPopupWidgetInterface.h" 0023 class QMenu; 0024 0025 0026 /** 0027 * \brief Get the current tool's popup widget and display it. 0028 */ 0029 class KisPopupWidgetAction : public QObject, public KisAbstractInputAction 0030 { 0031 Q_OBJECT 0032 0033 public: 0034 explicit KisPopupWidgetAction(); 0035 ~KisPopupWidgetAction() override; 0036 0037 int priority() const override {return 1;} 0038 0039 void end(QEvent *) override; 0040 0041 private: 0042 bool m_requestedWithStylus; 0043 }; 0044 0045 #endif // KIS_POPUP_WIDGET_ACTION_H