File indexing completed on 2025-01-05 04:35:06

0001 /*
0002  * This file is part of the mouse gesture package.
0003  * Copyright (C) 2006 Johan Thelin <e8johan@gmail.com>
0004  * All rights reserved.
0005  *
0006  * Redistribution and use in source and binary forms, with or
0007  * without modification, are permitted provided that the
0008  * following conditions are met:
0009  *
0010  *   - Redistributions of source code must retain the above
0011  *     copyright notice, this list of conditions and the
0012  *     following disclaimer.
0013  *   - Redistributions in binary form must reproduce the
0014  *     above copyright notice, this list of conditions and
0015  *     the following disclaimer in the documentation and/or
0016  *     other materials provided with the distribution.
0017  *   - The names of its contributors may be used to endorse
0018  *     or promote products derived from this software without
0019  *     specific prior written permission.
0020  *
0021  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
0022  * CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
0023  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
0024  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
0025  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
0026  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
0027  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
0028  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
0029  * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
0030  * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
0031  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
0032  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
0033  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
0034  * POSSIBILITY OF SUCH DAMAGE.
0035  *
0036  */
0037 
0038 #include "QjtMouseGesture.h"
0039 
0040 QjtMouseGesture::QjtMouseGesture(const DirectionList &directions, QObject* parent) : QObject(parent)
0041 {
0042     m_directions = directions;
0043 }
0044 
0045 QjtMouseGesture::~QjtMouseGesture()
0046 {
0047 }
0048 
0049 void QjtMouseGesture::emitGestured()
0050 {
0051     Q_EMIT(gestured());
0052 }
0053 
0054 const DirectionList QjtMouseGesture::directions() const
0055 {
0056     return m_directions;
0057 }