aboutsummaryrefslogtreecommitdiff
path: root/src/forms
diff options
context:
space:
mode:
Diffstat (limited to 'src/forms')
-rw-r--r--src/forms/blockerdialog.cpp64
-rw-r--r--src/forms/blockerdialog.h45
-rw-r--r--src/forms/blockerdialog.ui192
3 files changed, 0 insertions, 301 deletions
diff --git a/src/forms/blockerdialog.cpp b/src/forms/blockerdialog.cpp
deleted file mode 100644
index 9c6bd0a..0000000
--- a/src/forms/blockerdialog.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-/** LICENSE ********************************************************************
- **
- ** smolbote: yet another qute browser
- ** Copyright (C) 2017 Xian Nox
- **
- ** 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/>.
- **
- ******************************************************************************/
-
-#include "blockerdialog.h"
-#include "ui_blockerdialog.h"
-
-#include "browser.h"
-#include <QLabel>
-#include <QListWidget>
-
-BlockerDialog::BlockerDialog(QWidget *parent) :
- QDialog(parent),
- ui(new Ui::UrlInterceptorDialog)
-{
- ui->setupUi(this);
-
- m_subscription = new BlockerSubscription(this);
- QString sublocation = sSettings->value("blocker.path").toString();
- if(!sublocation.isEmpty()) {
- m_subscription->loadFromFile(sublocation);
- }
-
- ui->title->setText(m_subscription->title());
- ui->homepage->setText(m_subscription->homepage());
- ui->license->setText(m_subscription->license());
- ui->version->setText(m_subscription->version());
- ui->lastModified->setText(m_subscription->lastModified().toString());
- ui->expires->setText(m_subscription->expires().toString());
-
- // show subscription items
- for(BlockerRule *rule : m_subscription->urlBlacklist()) {
- ui->blacklist_listWidget->addItem(rule->toString());
- }
- for(BlockerRule *rule : m_subscription->urlWhitelist()) {
- ui->whitelist_listWidget->addItem(rule->toString());
- }
-}
-
-BlockerDialog::~BlockerDialog()
-{
- delete ui;
-}
-
-BlockerSubscription* BlockerDialog::subscription()
-{
- return m_subscription;
-}
diff --git a/src/forms/blockerdialog.h b/src/forms/blockerdialog.h
deleted file mode 100644
index 6970795..0000000
--- a/src/forms/blockerdialog.h
+++ /dev/null
@@ -1,45 +0,0 @@
-/** LICENSE ********************************************************************
- **
- ** smolbote: yet another qute browser
- ** Copyright (C) 2017 Xian Nox
- **
- ** 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 URLINTERCEPTORDIALOG_H
-#define URLINTERCEPTORDIALOG_H
-
-#include <QDialog>
-#include "webengine/blockersubscription.h"
-
-namespace Ui {
-class UrlInterceptorDialog;
-}
-
-class BlockerDialog : public QDialog
-{
- Q_OBJECT
-
-public:
- explicit BlockerDialog(QWidget *parent = 0);
- ~BlockerDialog();
- BlockerSubscription *subscription();
-
-private:
- Ui::UrlInterceptorDialog *ui;
- BlockerSubscription *m_subscription;
-};
-
-#endif // URLINTERCEPTORDIALOG_H
diff --git a/src/forms/blockerdialog.ui b/src/forms/blockerdialog.ui
deleted file mode 100644
index a84dac8..0000000
--- a/src/forms/blockerdialog.ui
+++ /dev/null
@@ -1,192 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>UrlInterceptorDialog</class>
- <widget class="QDialog" name="UrlInterceptorDialog">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>640</width>
- <height>480</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Blocker</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QGroupBox" name="groupBox">
- <property name="title">
- <string>Subscription</string>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <layout class="QFormLayout" name="leftFormLayout">
- <item row="0" column="0">
- <widget class="QLabel" name="title_label">
- <property name="text">
- <string>Title</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLabel" name="title">
- <property name="text">
- <string>TextLabel</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="homepage_label">
- <property name="text">
- <string>Homepage</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QLabel" name="homepage">
- <property name="text">
- <string>TextLabel</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="license_label">
- <property name="text">
- <string>License</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QLabel" name="license">
- <property name="text">
- <string>TextLabel</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QFormLayout" name="rightFormLayout">
- <item row="0" column="0">
- <widget class="QLabel" name="version_label">
- <property name="text">
- <string>Version</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="QLabel" name="version">
- <property name="text">
- <string>TextLabel</string>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="lastModified_label">
- <property name="text">
- <string>Last Modified</string>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QLabel" name="lastModified">
- <property name="text">
- <string>TextLabel</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="expires_label">
- <property name="text">
- <string>Expires</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QLabel" name="expires">
- <property name="text">
- <string>TextLabel</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QTabWidget" name="tabWidget">
- <property name="currentIndex">
- <number>0</number>
- </property>
- <widget class="QWidget" name="blacklist_tab">
- <attribute name="title">
- <string>URL Blacklist</string>
- </attribute>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <widget class="QListWidget" name="blacklist_listWidget"/>
- </item>
- </layout>
- </widget>
- <widget class="QWidget" name="whitelist_tab">
- <attribute name="title">
- <string>URL Whitelist</string>
- </attribute>
- <layout class="QVBoxLayout" name="verticalLayout_3">
- <item>
- <widget class="QListWidget" name="whitelist_listWidget"/>
- </item>
- </layout>
- </widget>
- </widget>
- </item>
- <item>
- <widget class="QDialogButtonBox" name="buttonBox">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="standardButtons">
- <set>QDialogButtonBox::Close</set>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections>
- <connection>
- <sender>buttonBox</sender>
- <signal>accepted()</signal>
- <receiver>UrlInterceptorDialog</receiver>
- <slot>accept()</slot>
- <hints>
- <hint type="sourcelabel">
- <x>248</x>
- <y>254</y>
- </hint>
- <hint type="destinationlabel">
- <x>157</x>
- <y>274</y>
- </hint>
- </hints>
- </connection>
- <connection>
- <sender>buttonBox</sender>
- <signal>rejected()</signal>
- <receiver>UrlInterceptorDialog</receiver>
- <slot>reject()</slot>
- <hints>
- <hint type="sourcelabel">
- <x>316</x>
- <y>260</y>
- </hint>
- <hint type="destinationlabel">
- <x>286</x>
- <y>274</y>
- </hint>
- </hints>
- </connection>
- </connections>
-</ui>