blob: 082e3e9f6c6e73db7a8b05270c56acd76227864c [file] [log] [blame]
Isa Nanic6e4a39a2018-12-04 14:26:02 -05001/***************************************************************************
2 * Copyright (C) 2018 by Savoir-faire Linux *
3 * Author: Isa Nanic <isa.nanic@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 <https://www.gnu.org/licenses/>. *
17 **************************************************************************/
18
19#pragma once
20#include <QPushButton>
21
22#include "lrcinstance.h"
23#include "ui_linkdevwidget.h"
24
25
26namespace Ui {
27 class LinkDevWidget;
28}
29
30class LinkDevWidget : public QWidget
31{
32 Q_OBJECT
33 LinkDevWidget(const LinkDevWidget& cpy);
34
35public:
36 explicit LinkDevWidget(QWidget* parent = nullptr);
37 ~LinkDevWidget();
38 inline const QPushButton* cancelBtn() const { return ui->cancelBtn; };
39 inline const QPushButton* enterBtn() const { return ui->enterBtn; };
40 inline const QPushButton* endCancelBtn() const { return ui->closePushButton; };
41
42
43private:
44 Ui::LinkDevWidget* ui;
Isa Nanic281d13a2018-12-11 18:55:02 -050045 const int exportTimeout_ = 10000;
46
47 QTimer* timeout_;
Isa Nanic6e4a39a2018-12-04 14:26:02 -050048
49private slots:
50 void setGeneratingPage();
Isa Nanic281d13a2018-12-11 18:55:02 -050051 void setExportPage(const std::string& accountId,
52 lrc::api::account::ExportOnRingStatus status,
53 const std::string& pin);
Isa Nanic6e4a39a2018-12-04 14:26:02 -050054};