File: ipblockingprefpage.h

package info (click to toggle)
ktorrent 25.04.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 25,104 kB
  • sloc: cpp: 40,482; xml: 1,163; python: 182; sh: 10; makefile: 5
file content (61 lines) | stat: -rw-r--r-- 1,327 bytes parent folder | download | duplicates (2)
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