2011-12-04 16:54:57 +01:00
|
|
|
/* ============================================================
|
|
|
|
* QupZilla - WebKit based 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
|
|
|
#include <QWebPluginFactory>
|
|
|
|
|
2014-02-26 20:03:20 +01:00
|
|
|
#include "qzcommon.h"
|
2012-02-29 18:33:50 +01:00
|
|
|
|
|
|
|
class QWebPage;
|
2012-04-12 15:24:57 +02:00
|
|
|
class QPixmap;
|
2012-02-29 18:33:50 +01:00
|
|
|
|
2014-02-19 22:12:32 +01:00
|
|
|
class QUPZILLA_EXPORT CleanPluginFactory : public QWebPluginFactory
|
2011-11-28 19:17:48 +01:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit CleanPluginFactory(QObject* parent = 0);
|
|
|
|
|
|
|
|
QList<QWebPluginFactory::Plugin> plugins() const;
|
|
|
|
QObject* create(const QString &mimeType, const QUrl &url, const QStringList &argumentNames, const QStringList &argumentValues) const;
|
|
|
|
};
|
|
|
|
|
2014-02-19 22:12:32 +01:00
|
|
|
class QUPZILLA_EXPORT PageThumbnailer : public QObject
|
2011-11-28 19:17:48 +01:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
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-29 23:12:07 +01:00
|
|
|
void setEnableFlash(bool enable);
|
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:
|
|
|
|
|
|
|
|
private slots:
|
2011-12-11 12:34:51 +01:00
|
|
|
void createThumbnail(bool status);
|
2011-11-28 19:17:48 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
QWebPage* m_page;
|
|
|
|
|
|
|
|
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
|