linkdevicedialog.h 1.86 KB
Newer Older
1
/***************************************************************************
Andreas Traczyk's avatar
Andreas Traczyk committed
2 3
 * Copyright (C) 2019 by Savoir-faire Linux                                *
 * Author: Andreas Traczyk <andreas.traczyk@savoirfairelinux.com>          *
4 5 6 7 8 9 10 11 12 13 14 15
 *                                                                         *
 * This program is free software; you can redistribute it and/or modify    *
 * it under the terms of the GNU General Public License as published by    *
 * the Free Software Foundation; either version 3 of the License, or       *
 * (at your option) any later version.                                     *
 *                                                                         *
 * This program is distributed in the hope that it will be useful,         *
 * but WITHOUT ANY WARRANTY; without even the implied warranty of          *
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the           *
 * GNU General Public License for more details.                            *
 *                                                                         *
 * You should have received a copy of the GNU General Public License       *
Andreas Traczyk's avatar
Andreas Traczyk committed
16
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.  *
17 18 19 20
 **************************************************************************/

#pragma once
#include <QPushButton>
Andreas Traczyk's avatar
Andreas Traczyk committed
21
#include <QDialog>
22 23 24 25

#include "lrcinstance.h"

namespace Ui {
Andreas Traczyk's avatar
Andreas Traczyk committed
26
    class LinkDeviceDialog;
27 28
}

Andreas Traczyk's avatar
Andreas Traczyk committed
29
class LinkDeviceDialog : public QDialog
30 31 32
{
    Q_OBJECT
public:
Andreas Traczyk's avatar
Andreas Traczyk committed
33 34
    explicit LinkDeviceDialog(QWidget* parent = nullptr);
    ~LinkDeviceDialog();
35 36

private:
Andreas Traczyk's avatar
Andreas Traczyk committed
37 38
    Ui::LinkDeviceDialog* ui;
    const int exportTimeout_ = 20000;
39 40

    QTimer* timeout_;
41 42 43

private slots:
    void setGeneratingPage();
44 45 46
    void setExportPage(const std::string& accountId,
                       lrc::api::account::ExportOnRingStatus status,
                       const std::string& pin);
47
};