]> gitweb.stoutner.com Git - PrivacyBrowserPC.git/blobdiff - src/privacybrowserpcwindow.cpp
Add the icon.
[PrivacyBrowserPC.git] / src / privacybrowserpcwindow.cpp
diff --git a/src/privacybrowserpcwindow.cpp b/src/privacybrowserpcwindow.cpp
deleted file mode 100644 (file)
index d27ea98..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-    SPDX-FileCopyrightText: %{CURRENT_YEAR} %{AUTHOR} <%{EMAIL}>
-
-    SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
-*/
-
-// application headers
-#include "privacybrowserpcwindow.h"
-
-#include "privacybrowserpcview.h"
-#include "privacybrowserpcdebug.h"
-
-// KF headers
-#include <KActionCollection>
-#include <KConfigDialog>
-
-
-PrivacyBrowserPCWindow::PrivacyBrowserPCWindow()
-    : KXmlGuiWindow()
-{
-    m_privacybrowserpcView = new PrivacyBrowserPCView(this);
-    setCentralWidget(m_privacybrowserpcView);
-
-    KActionCollection* actionCollection = this->actionCollection();
-    m_switchAction = actionCollection->addAction(QStringLiteral("switch_action"));
-    m_switchAction->setText(i18nc("@action", "Switch Colors"));
-    m_switchAction->setIcon(QIcon::fromTheme(QStringLiteral("fill-color")));
-    connect(m_switchAction, &QAction::triggered, m_privacybrowserpcView, &PrivacyBrowserPCView::switchColors);
-
-    KStandardAction::openNew(this, SLOT(fileNew()), actionCollection);
-    KStandardAction::quit(qApp, SLOT(closeAllWindows()), actionCollection);
-    KStandardAction::preferences(this, SLOT(settingsConfigure()), actionCollection);
-
-    setupGUI();
-}
-
-PrivacyBrowserPCWindow::~PrivacyBrowserPCWindow()
-{
-}
-
-void PrivacyBrowserPCWindow::fileNew()
-{
-    qCDebug(PRIVACYBROWSERPC) << "PrivacyBrowserPCWindow::fileNew()";
-    (new PrivacyBrowserPCWindow)->show();
-}
-
-void PrivacyBrowserPCWindow::settingsConfigure()
-{
-    qCDebug(PRIVACYBROWSERPC) << "PrivacyBrowserPCWindow::settingsConfigure()";
-    // The preference dialog is derived from prefs_base.ui
-    //
-    // compare the names of the widgets in the .ui file
-    // to the names of the variables in the .kcfg file
-    //avoid to have 2 dialogs shown
-    if (KConfigDialog::showDialog(QStringLiteral("settings"))) {
-        return;
-    }
-
-    KConfigDialog *dialog = new KConfigDialog(this, QStringLiteral("settings"), PrivacyBrowserPCSettings::self());
-    QWidget *generalSettingsPage = new QWidget;
-    m_settings.setupUi(generalSettingsPage);
-    dialog->addPage(generalSettingsPage, i18nc("@title:tab", "General"), QStringLiteral("package_setting"));
-    connect(dialog, &KConfigDialog::settingsChanged, m_privacybrowserpcView, &PrivacyBrowserPCView::handleSettingsChanged);
-    dialog->setAttribute(Qt::WA_DeleteOnClose);
-    dialog->show();
-}