1 /***************************************************************************** 2 * LibreMines * 3 * Copyright (C) 2020-2021 Bruno Bollos Correa * 4 * * 5 * This program is free software: you can redistribute it and/or modify * 6 * it under the terms of the GNU General Public License as published by * 7 * the Free Software Foundation, either version 3 of the License, or * 8 * (at your option) any later version. * 9 * * 10 * This program is distributed in the hope that it will be useful, * 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 13 * GNU General Public License for more details. * 14 * * 15 * You should have received a copy of the GNU General Public License * 16 * along with this program. If not, see <http://www.gnu.org/licenses/>. * 17 ***************************************************************************** 18 */ 19 20 21 #ifndef QPUSHBUTTON_ADAPTED_H 22 #define QPUSHBUTTON_ADAPTED_H 23 24 #include <QPushButton> 25 26 /** 27 * @brief 28 * 29 */ 30 class QPushButton_adapted : public QPushButton 31 { 32 Q_OBJECT 33 34 public: 35 /** 36 * @brief 37 * 38 * @param parent 39 */ 40 explicit QPushButton_adapted(QWidget *parent = nullptr); 41 42 protected: 43 void mouseReleaseEvent(QMouseEvent* e); 44 void mousePressEvent(QMouseEvent* e); 45 46 Q_SIGNALS: 47 /** 48 * @brief 49 * 50 * @param 51 */ 52 void SIGNAL_released(const QMouseEvent*const event); 53 void SIGNAL_clicked(const QMouseEvent*const event); 54 55 }; 56 57 #endif // QPUSHBUTTON_ADAPTED_H 58