1 /************************************************************************** 2 * Otter Browser: Web browser controlled by the user, not vice-versa. 3 * Copyright (C) 2014 Piotr Wójcik <chocimier@tlen.pl> 4 * Copyright (C) 2015 - 2018 Michal Dutkiewicz aka Emdek <michal@emdek.pl> 5 * 6 * This program is free software: you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation, either version 3 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program. If not, see <http://www.gnu.org/licenses/>. 18 * 19 **************************************************************************/ 20 21 #ifndef OTTER_BOOKMARKSIMPORTERWIDGET_H 22 #define OTTER_BOOKMARKSIMPORTERWIDGET_H 23 24 #include "../core/BookmarksManager.h" 25 26 #include <QtWidgets/QWidget> 27 28 namespace Otter 29 { 30 31 namespace Ui 32 { 33 class BookmarksImporterWidget; 34 } 35 36 class BookmarksImporterWidget final : public QWidget 37 { 38 Q_OBJECT 39 40 public: 41 explicit BookmarksImporterWidget(QWidget *parent = nullptr); 42 ~BookmarksImporterWidget(); 43 44 BookmarksModel::Bookmark* getTargetFolder() const; 45 QString getSubfolderName() const; 46 bool areDuplicatesAllowed() const; 47 bool isImportingIntoSubfolder() const; 48 bool hasToRemoveExisting() const; 49 50 protected slots: 51 void handleRemoveExistingChanged(bool isChecked); 52 void handleImportToSubfolderChanged(bool isChecked); 53 54 private: 55 Ui::BookmarksImporterWidget *m_ui; 56 }; 57 58 } 59 60 #endif 61