Falkon Develop
Cross-platform Qt-based web browser
fcm_dialog.h
Go to the documentation of this file.
1/* ============================================================
2* FlashCookieManager plugin for Falkon
3* Copyright (C) 2014 S. Razi Alavizadeh <s.r.alavizadeh@gmail.com>
4* Copyright (C) 2010-2014 David Rosca <nowrep@gmail.com>
5*
6* some codes and ideas are taken from cookiemanager.cpp and cookiemanager.ui
7*
8* This program is free software: you can redistribute it and/or modify
9* it under the terms of the GNU General Public License as published by
10* the Free Software Foundation, either version 3 of the License, or
11* (at your option) any later version.
12*
13* This program is distributed in the hope that it will be useful,
14* but WITHOUT ANY WARRANTY; without even the implied warranty of
15* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16* GNU General Public License for more details.
17*
18* You should have received a copy of the GNU General Public License
19* along with this program. If not, see <http://www.gnu.org/licenses/>.
20* ============================================================ */
21#ifndef FCM_DIALOG_H
22#define FCM_DIALOG_H
23
24#include <QDialog>
25
26
27namespace Ui
28{
29class FCM_Dialog;
30}
31
32class QTreeWidgetItem;
33
34class BrowserWindow;
35class FCM_Plugin;
36
37class FCM_Dialog : public QDialog
38{
39 Q_OBJECT
40
41public:
42 explicit FCM_Dialog(FCM_Plugin* manager, QWidget* parent = nullptr);
43 ~FCM_Dialog() override;
44
45 void refreshView(bool forceReload = false);
46 void showPage(int index);
47
48private Q_SLOTS:
49 void currentItemChanged(QTreeWidgetItem* current, QTreeWidgetItem* parent);
50 void removeCookie();
51 void removeAll();
52
53 void refreshFlashCookiesTree();
54 void refreshFilters();
55
56 void addWhitelist();
57 void addWhitelist(const QString &origin);
58 void removeWhitelist();
59 void addBlacklist();
60 void addBlacklist(const QString &origin);
61 void removeBlacklist();
62
63 void deletePressed();
64 void autoModeChanged(bool state);
65
66 void filterString(const QString &string);
67
68 void reloadFromDisk();
69 void cookieTreeContextMenuRequested(const QPoint &pos);
70
71private:
72 void closeEvent(QCloseEvent* e) override;
73 void keyPressEvent(QKeyEvent* e) override;
74
75 Ui::FCM_Dialog* ui;
76
77 FCM_Plugin* m_manager;
78};
79
80#endif // FCM_DIALOG_H
FCM_Dialog(FCM_Plugin *manager, QWidget *parent=nullptr)
Definition: fcm_dialog.cpp:34
void showPage(int index)
Definition: fcm_dialog.cpp:197
~FCM_Dialog() override
Definition: fcm_dialog.cpp:433
void refreshView(bool forceReload=false)
Definition: fcm_dialog.cpp:181
State state