File indexing completed on 2023-05-30 11:30:51
0001 /** 0002 * Copyright (C) 2012 Martin Sandsmark <martin.sandsmark@kde.org> 0003 * Copyright (C) 2014 Arnold Dumas <contact@arnolddumas.fr> 0004 * 0005 * This program is free software; you can redistribute it and/or modify it under 0006 * the terms of the GNU General Public License as published by the Free Software 0007 * Foundation; either version 2 of the License, or (at your option) any later 0008 * version. 0009 * 0010 * This program is distributed in the hope that it will be useful, but WITHOUT ANY 0011 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 0012 * PARTICULAR PURPOSE. See the GNU General Public License for more details. 0013 * 0014 * You should have received a copy of the GNU General Public License along with 0015 * this program. If not, see <http://www.gnu.org/licenses/>. 0016 */ 0017 0018 #ifndef JUK_SCROBBLECONFIGDLG_H 0019 #define JUK_SCROBBLECONFIGDLG_H 0020 0021 #include <QDialog> 0022 #include <KWallet> 0023 0024 #include <memory> 0025 0026 using namespace KWallet; 0027 0028 class KLineEdit; 0029 class KPasswordLineEdit; 0030 class QAbstractButton; 0031 class QPushButton; 0032 class QLabel; 0033 0034 class ScrobbleConfigDlg : public QDialog 0035 { 0036 Q_OBJECT 0037 0038 public: 0039 explicit ScrobbleConfigDlg(QWidget* parent = nullptr); 0040 0041 private slots: 0042 void testLogin(); 0043 void validLogin(); 0044 void invalidLogin(); 0045 void save(); 0046 void valuesChanged(); 0047 0048 private: 0049 KLineEdit *m_usernameEdit; 0050 KPasswordLineEdit *m_passwordEdit; 0051 QPushButton *m_testButton; 0052 QAbstractButton *m_saveButton; 0053 QLabel *m_testFeedbackLabel; 0054 0055 std::unique_ptr<Wallet> m_wallet; 0056 }; 0057 0058 #endif //JUK_SCROBBLECONFIGDLG_H