/*
*  qm_clickprogressbar.cpp
*  QUIMUP clickable progressbar class
*  © 2008-2024 Johan Spee
*  SPDX-License-Identifier: GPL-3.0-or-later
*/

#include "qm_clickprogressbar.h"

qm_clickProgressbar::qm_clickProgressbar (QWidget *parent)
{
    setParent(parent);
}


void qm_clickProgressbar::mouseReleaseEvent (QMouseEvent *event)
{
    if(event->button() == Qt::LeftButton)
    {
        emit clicked();
        emit clicked(event);
    }
}


void qm_clickProgressbar::mousePressEvent (QMouseEvent *event)
{
    if(event->button() == Qt::LeftButton)
    {
        emit pressed();
        emit pressed(event);
    }
}


void qm_clickProgressbar::keyPressEvent (QKeyEvent *event)
{
    event->ignore();
}


void qm_clickProgressbar::keyReleaseEvent (QKeyEvent *event)
{
    event->ignore();
}


qm_clickProgressbar::~qm_clickProgressbar()
{}
