2011-03-29 20:30:05 +02:00
|
|
|
/* ============================================================
|
2017-08-25 17:11:29 +02:00
|
|
|
* Falkon - Qt web browser
|
2018-01-05 14:03:31 +01:00
|
|
|
* Copyright (C) 2010-2018 David Rosca <nowrep@gmail.com>
|
2011-03-29 20:30:05 +02: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/>.
|
|
|
|
* ============================================================ */
|
|
|
|
#ifndef ADBLOCKICON_H
|
|
|
|
#define ADBLOCKICON_H
|
|
|
|
|
2018-01-05 21:15:28 +01:00
|
|
|
#include <QPointer>
|
|
|
|
|
2014-02-26 20:03:20 +01:00
|
|
|
#include "qzcommon.h"
|
2018-01-05 14:03:31 +01:00
|
|
|
#include "abstractbuttoninterface.h"
|
2011-03-29 20:30:05 +02:00
|
|
|
|
2012-02-29 18:33:50 +01:00
|
|
|
class QUrl;
|
|
|
|
|
2018-01-05 14:03:31 +01:00
|
|
|
class AdBlockRule;
|
2012-02-29 18:33:50 +01:00
|
|
|
|
2018-01-05 14:03:31 +01:00
|
|
|
<<<<<<< HEAD
|
2017-08-25 17:11:29 +02:00
|
|
|
class FALKON_EXPORT AdBlockIcon : public ClickableLabel
|
2018-01-05 14:03:31 +01:00
|
|
|
||||||| parent of d11997ee... AdBlockIcon: Move from statusbar to navigationbar as tool button
|
|
|
|
class QUPZILLA_EXPORT AdBlockIcon : public ClickableLabel
|
|
|
|
=======
|
|
|
|
class QUPZILLA_EXPORT AdBlockIcon : public AbstractButtonInterface
|
|
|
|
>>>>>>> d11997ee... AdBlockIcon: Move from statusbar to navigationbar as tool button
|
2011-03-29 20:30:05 +02:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
2018-01-05 14:03:31 +01:00
|
|
|
|
2011-03-29 20:30:05 +02:00
|
|
|
public:
|
2018-01-05 14:03:31 +01:00
|
|
|
explicit AdBlockIcon(QObject *parent = nullptr);
|
2011-03-29 20:30:05 +02:00
|
|
|
~AdBlockIcon();
|
|
|
|
|
2018-01-05 14:03:31 +01:00
|
|
|
QString id() const override;
|
|
|
|
QString name() const override;
|
|
|
|
|
2011-03-29 20:30:05 +02:00
|
|
|
private slots:
|
2012-08-09 19:02:25 +02:00
|
|
|
void toggleCustomFilter();
|
2012-02-04 18:45:59 +01:00
|
|
|
|
2011-03-29 20:30:05 +02:00
|
|
|
private:
|
2018-01-05 21:15:28 +01:00
|
|
|
void updateState();
|
|
|
|
void webPageChanged(WebPage *page);
|
2018-01-05 14:03:31 +01:00
|
|
|
void clicked(ClickController *controller);
|
|
|
|
|
2018-01-05 21:15:28 +01:00
|
|
|
QPointer<WebPage> m_page;
|
2015-05-28 11:10:41 +02:00
|
|
|
QVector<QPair<AdBlockRule*, QUrl> > m_blockedPopups;
|
2011-03-29 20:30:05 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // ADBLOCKICON_H
|