1 /* This file is part of Clementine. 2 Copyright 2014, Chocobozzz <djidane14ff@hotmail.fr> 3 Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com> 4 5 Clementine 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 Clementine 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 Clementine. If not, see <http://www.gnu.org/licenses/>. 17 */ 18 19 #ifndef INTERNET_SEAFILE_SEAFILESETTINGSPAGE_H_ 20 #define INTERNET_SEAFILE_SEAFILESETTINGSPAGE_H_ 21 22 #include "ui/settingspage.h" 23 24 #include <QModelIndex> 25 #include <QWidget> 26 27 class Ui_SeafileSettingsPage; 28 class SeafileService; 29 30 class SeafileSettingsPage : public SettingsPage { 31 Q_OBJECT 32 33 public: 34 explicit SeafileSettingsPage(SettingsDialog* dialog); 35 ~SeafileSettingsPage(); 36 37 void Load(); 38 void Save(); 39 40 private slots: 41 void Login(); 42 void Logout(); 43 // Map -> key : library's id, value : library's name 44 void GetLibrariesFinished(const QMap<QString, QString>& libraries); 45 46 private: 47 std::unique_ptr<Ui_SeafileSettingsPage> ui_; 48 SeafileService* service_; 49 }; 50 51 #endif // INTERNET_SEAFILE_SEAFILESETTINGSPAGE_H_ 52