2011-12-04 16:54:57 +01:00
|
|
|
/* ============================================================
|
2017-08-25 17:11:29 +02:00
|
|
|
* Falkon - Qt web browser
|
2014-01-11 16:11:42 +01:00
|
|
|
* Copyright (C) 2010-2014 David Rosca <nowrep@gmail.com>
|
2011-12-04 16:54:57 +01:00
|
|
|
*
|
|
|
|
* 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 3 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/>.
|
|
|
|
* ============================================================ */
|
2011-11-28 19:17:48 +01:00
|
|
|
#ifndef PAGETHUMBNAILER_H
|
|
|
|
#define PAGETHUMBNAILER_H
|
|
|
|
|
|
|
|
#include <QObject>
|
2012-02-29 18:33:50 +01:00
|
|
|
#include <QSize>
|
|
|
|
#include <QUrl>
|
2011-11-28 19:17:48 +01:00
|
|
|
|
2014-02-26 20:03:20 +01:00
|
|
|
#include "qzcommon.h"
|
2012-02-29 18:33:50 +01:00
|
|
|
|
2015-10-09 19:31:08 +02:00
|
|
|
class QQuickWidget;
|
2012-04-12 15:24:57 +02:00
|
|
|
class QPixmap;
|
2012-02-29 18:33:50 +01:00
|
|
|
|
2017-08-25 17:11:29 +02:00
|
|
|
class FALKON_EXPORT PageThumbnailer : public QObject
|
2011-11-28 19:17:48 +01:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
2016-12-27 18:02:42 +01:00
|
|
|
|
2011-11-28 19:17:48 +01:00
|
|
|
public:
|
|
|
|
explicit PageThumbnailer(QObject* parent = 0);
|
2011-12-02 23:25:27 +01:00
|
|
|
~PageThumbnailer();
|
2011-11-28 19:17:48 +01:00
|
|
|
|
|
|
|
void setSize(const QSize &size);
|
2011-12-02 23:25:27 +01:00
|
|
|
|
2011-11-28 19:17:48 +01:00
|
|
|
void setUrl(const QUrl &url);
|
2011-12-02 23:25:27 +01:00
|
|
|
QUrl url();
|
|
|
|
|
2011-12-23 13:47:38 +01:00
|
|
|
bool loadTitle();
|
|
|
|
void setLoadTitle(bool load);
|
|
|
|
QString title();
|
|
|
|
|
2011-11-28 19:17:48 +01:00
|
|
|
void start();
|
|
|
|
|
|
|
|
signals:
|
2012-04-15 15:41:48 +02:00
|
|
|
void thumbnailCreated(const QPixmap &);
|
2011-11-28 19:17:48 +01:00
|
|
|
|
|
|
|
public slots:
|
2016-12-27 18:02:42 +01:00
|
|
|
QString afterLoadScript() const;
|
2011-12-11 12:34:51 +01:00
|
|
|
void createThumbnail(bool status);
|
2011-11-28 19:17:48 +01:00
|
|
|
|
|
|
|
private:
|
2015-10-09 19:31:08 +02:00
|
|
|
QQuickWidget *m_view;
|
2011-11-28 19:17:48 +01:00
|
|
|
|
|
|
|
QSize m_size;
|
|
|
|
QUrl m_url;
|
2011-12-23 13:47:38 +01:00
|
|
|
QString m_title;
|
|
|
|
bool m_loadTitle;
|
2011-11-28 19:17:48 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // PAGETHUMBNAILER_H
|