File indexing completed on 2024-12-22 04:12:37
0001 /* 0002 * This file is part of the KDE project 0003 * SPDX-FileCopyrightText: 2013 Arjen Hiemstra <ahiemstra@heimr.nl> 0004 * 0005 * SPDX-License-Identifier: GPL-2.0-or-later 0006 */ 0007 0008 #ifndef KISMOUSEINPUTEDITOR_H 0009 #define KISMOUSEINPUTEDITOR_H 0010 0011 #include <QPushButton> 0012 0013 namespace Ui 0014 { 0015 class KisMouseInputEditor; 0016 } 0017 0018 /** 0019 * \brief An editor widget for mouse buttons with modifiers. 0020 */ 0021 class KisMouseInputEditor : public QPushButton 0022 { 0023 Q_OBJECT 0024 public: 0025 KisMouseInputEditor(QWidget *parent = nullptr); 0026 ~KisMouseInputEditor() override; 0027 0028 QList<Qt::Key> keys() const; 0029 void setKeys(const QList<Qt::Key> &newKeys); 0030 0031 Qt::MouseButtons buttons() const; 0032 void setButtons(Qt::MouseButtons newButtons); 0033 0034 private Q_SLOTS: 0035 void updateLabel(); 0036 0037 private: 0038 class Private; 0039 Private *const d {nullptr}; 0040 }; 0041 0042 #endif // KISMOUSEINPUTEDITOR_H