kde-workspace/libs/plasmaclock/wheelytoolbutton.cpp

40 lines
1.2 KiB
C++
Raw Normal View History

2014-11-13 19:30:51 +02:00
/*
* Copyright 2010 Aaron Seigo <aseigo@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Library General Public License as
* published by the Free Software Foundation; either version 2, or
* (at your option) any later version.
*
* 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 for more details
*
* You should have received a copy of the GNU Library General Public
* License along with this program; if not, write to the
* Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "wheelytoolbutton.h"
#include <QGraphicsSceneWheelEvent>
WheelyToolButton::WheelyToolButton(QGraphicsWidget *parent)
: Plasma::ToolButton(parent)
{
}
void WheelyToolButton::wheelEvent(QGraphicsSceneWheelEvent *event)
{
if (event->delta() > 0) {
emit wheelUp();
} else {
emit wheelDown();
}
}
2015-02-27 09:28:46 +00:00
#include "moc_wheelytoolbutton.cpp"
2014-11-13 19:30:51 +02:00