scrobbleconfigdlg.h 1.47 KB
Newer Older
1 2
/**
 * Copyright (C) 2012 Martin Sandsmark <martin.sandsmark@kde.org>
3
 * Copyright (C) 2014 Arnold Dumas <contact@arnolddumas.fr>
4 5 6 7 8 9 10 11 12 13 14 15 16
 *
 * 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 2 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 along with
 * this program.  If not, see <http://www.gnu.org/licenses/>.
 */
17

Yuri Chornoivan's avatar
Yuri Chornoivan committed
18 19
#ifndef JUK_SCROBBLECONFIGDLG_H
#define JUK_SCROBBLECONFIGDLG_H
20

21
#include <QDialog>
Michael Pyne's avatar
Michael Pyne committed
22
#include <KWallet>
23

24 25 26 27
#include <memory>

using namespace KWallet;

28
class KLineEdit;
29
class QAbstractButton;
30
class QPushButton;
31 32
class QLabel;

33
class ScrobbleConfigDlg : public QDialog
34 35
{
    Q_OBJECT
36

37
public:
38
    explicit ScrobbleConfigDlg(QWidget* parent = nullptr);
Shubham Chaudhary's avatar
Shubham Chaudhary committed
39

40 41 42 43 44 45
private slots:
    void testLogin();
    void validLogin();
    void invalidLogin();
    void save();
    void valuesChanged();
Shubham Chaudhary's avatar
Shubham Chaudhary committed
46

47 48 49
private:
    KLineEdit *m_usernameEdit;
    KLineEdit *m_passwordEdit;
50
    QPushButton *m_testButton;
51
    QAbstractButton *m_saveButton;
52
    QLabel *m_testFeedbackLabel;
53

54
    std::unique_ptr<Wallet> m_wallet;
55 56
};

Yuri Chornoivan's avatar
Yuri Chornoivan committed
57
#endif //JUK_SCROBBLECONFIGDLG_H