Falkon Develop
Cross-platform Qt-based web browser
bookmarksimporter.h
Go to the documentation of this file.
1/* ============================================================
2* Falkon - Qt web browser
3* Copyright (C) 2014 David Rosca <nowrep@gmail.com>
4*
5* This program 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* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
17* ============================================================ */
18#ifndef BOOKMARKSIMPORTER_H
19#define BOOKMARKSIMPORTER_H
20
21#include <QObject>
22
23#include "qzcommon.h"
24
25class QIcon;
26
27class BookmarkItem;
28
29class FALKON_EXPORT BookmarksImporter : public QObject
30{
31 Q_OBJECT
32
33public:
34 explicit BookmarksImporter(QObject* parent = nullptr);
36
37 bool error() const;
38 QString errorString() const;
39
40 virtual QString description() const = 0;
41 virtual QString standardPath() const = 0;
42
43 // Get filename from user (or a directory)
44 virtual QString getPath(QWidget* parent) = 0;
45
46 // Prepare import (check if file exists, ...), return false on error
47 virtual bool prepareImport() = 0;
48
49 // Import bookmarks (it must return root folder)
51
52protected:
53 // Empty error = no error
54 void setError(const QString &error);
55
56private:
57 QString m_error;
58};
59
60#endif // BOOKMARKSIMPORTER_H
virtual QString description() const =0
virtual BookmarkItem * importBookmarks()=0
virtual ~BookmarksImporter()
virtual QString standardPath() const =0
virtual QString getPath(QWidget *parent)=0
virtual bool prepareImport()=0
#define FALKON_EXPORT
Definition: qzcommon.h:28