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
|
|
|
|
2018-01-06 15:58:12 +01:00
|
|
|
class FALKON_EXPORT AdBlockIcon : public AbstractButtonInterface
|
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
|
|
|
|
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();
|
2018-01-06 15:58:12 +01:00
|
|
|
void updateBadgeText();
|
2018-01-05 21:15:28 +01:00
|
|
|
void webPageChanged(WebPage *page);
|
2018-01-05 14:03:31 +01:00
|
|
|
void clicked(ClickController *controller);
|
2018-01-06 15:58:12 +01:00
|
|
|
void blockedRequestsChanged(const QUrl &url);
|
2018-01-05 14:03:31 +01:00
|
|
|
|
2018-01-05 21:15:28 +01:00
|
|
|
QPointer<WebPage> m_page;
|
2011-03-29 20:30:05 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // ADBLOCKICON_H
|