File indexing completed on 2024-04-21 05:51:36
0001 /* 0002 * SPDX-FileCopyrightText: 2002-2003 Jesper K. Pedersen <blackie@kde.org> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.0-only 0005 **/ 0006 0007 #ifndef dcbutton 0008 #define dcbutton 0009 0010 #include <QToolButton> 0011 0012 /** 0013 QToolButton extended to emit a signal on double click. 0014 @internal 0015 */ 0016 class DoubleClickButton : public QToolButton 0017 { 0018 Q_OBJECT 0019 0020 public: 0021 explicit DoubleClickButton(const QPixmap &pix, QWidget *parent, const QString &name = QString()); 0022 0023 protected: 0024 void mouseDoubleClickEvent(QMouseEvent *) override; 0025 0026 Q_SIGNALS: 0027 void doubleClicked(); 0028 }; 0029 0030 #endif // dcbutton