Nicolas Jager | 584a80e | 2016-03-18 16:10:00 -0400 | [diff] [blame] | 1 | /*************************************************************************** |
Anthony Léonard | 2fde81d | 2017-04-17 10:06:55 -0400 | [diff] [blame] | 2 | * Copyright (C) 2017 by Savoir-faire Linux * |
Nicolas Jager | 584a80e | 2016-03-18 16:10:00 -0400 | [diff] [blame] | 3 | * Author: Jäger Nicolas <nicolas.jager@savoirfairelinux.com> * |
| 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 | #pragma once |
| 20 | |
| 21 | #include <QWidget> |
| 22 | |
| 23 | namespace Ui { |
| 24 | class RingButton; |
| 25 | } |
| 26 | |
| 27 | class RingButton : public QWidget |
| 28 | { |
| 29 | Q_OBJECT |
| 30 | public: |
| 31 | explicit RingButton(QWidget* parent = 0); |
| 32 | ~RingButton(); |
| 33 | void setText(const QString& text); |
Olivier SOLDANO | aee2f88 | 2017-09-28 15:46:09 -0400 | [diff] [blame] | 34 | QString text(); |
Nicolas Jager | 584a80e | 2016-03-18 16:10:00 -0400 | [diff] [blame] | 35 | |
| 36 | private: |
| 37 | Ui::RingButton* ui; |
Olivier SOLDANO | aee2f88 | 2017-09-28 15:46:09 -0400 | [diff] [blame] | 38 | QString path_ {}; |
| 39 | void mousePressEvent(QMouseEvent* event); |
Nicolas Jager | 584a80e | 2016-03-18 16:10:00 -0400 | [diff] [blame] | 40 | |
| 41 | signals: |
| 42 | void clicked() const; |
| 43 | }; |