1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
/*
SPDX-FileCopyrightText: 2005 Joris Guisson <joris.guisson@gmail.com>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef IPBLOCKINGPREFPAGE_H
#define IPBLOCKINGPREFPAGE_H
#include "ipfilterplugin.h"
#include "ui_ipblockingprefpage.h"
#include <QThread>
#include <interfaces/coreinterface.h>
#include <interfaces/prefpageinterface.h>
class KJob;
namespace kt
{
class IPFilterPlugin;
class DownloadAndConvertJob;
/**
* @author Ivan Vasic
* @brief IPBlocking plugin interface page
**/
class IPBlockingPrefPage : public PrefPageInterface, public Ui_IPBlockingPrefPage
{
Q_OBJECT
public:
IPBlockingPrefPage(IPFilterPlugin *p);
~IPBlockingPrefPage() override;
void loadSettings() override;
void loadDefaults() override;
void updateSettings() override;
/// Do an auto update, return false if this is not possible
bool doAutoUpdate();
private Q_SLOTS:
void downloadClicked();
void checkUseLevel1Toggled(bool);
void restoreGUI();
void downloadAndConvertFinished(KJob *j);
void autoUpdateToggled(bool on);
void autoUpdateIntervalChanged(int val);
private:
void updateAutoUpdate();
Q_SIGNALS:
void updateFinished();
private:
CoreInterface *m_core;
IPFilterPlugin *m_plugin;
DownloadAndConvertJob *m_job;
bool m_verbose;
};
}
#endif
|