File indexing completed on 2024-04-14 05:44:23

0001 /*
0002  *  SPDX-FileCopyrightText: 2002-2003 Jesper K. Pedersen <blackie@kde.org>
0003  *
0004  *  SPDX-License-Identifier: LGPL-2.0-only
0005  **/
0006 
0007 #include "dcbutton.h"
0008 
0009 DoubleClickButton::DoubleClickButton(const QPixmap &pixmap, QWidget *parent, const QString &name)
0010     : QToolButton(parent)
0011 {
0012     setObjectName(name);
0013     setIcon(static_cast<QIcon>(pixmap));
0014 }
0015 
0016 void DoubleClickButton::mouseDoubleClickEvent(QMouseEvent *)
0017 {
0018     Q_EMIT doubleClicked();
0019 }
0020 
0021 #include "moc_dcbutton.cpp"