]> gitweb.stoutner.com Git - PrivacyBrowserPC.git/commitdiff
Add the icon.
authorSoren Stoutner <soren@stoutner.com>
Tue, 18 Jan 2022 17:41:59 +0000 (10:41 -0700)
committerSoren Stoutner <soren@stoutner.com>
Tue, 18 Jan 2022 17:41:59 +0000 (10:41 -0700)
21 files changed:
.gitignore [new file with mode: 0644]
.kdev4/PrivacyBrowserPC.kdev4
CMakeLists.txt
PrivacyBrowserPC.kdev4 [new file with mode: 0644]
README [deleted file]
doc/CMakeLists.txt
icons/16-apps-privacybrowserpc.png [deleted file]
icons/22-apps-privacybrowserpc.png [deleted file]
icons/32-apps-privacybrowserpc.png [deleted file]
icons/48-apps-privacybrowserpc.png [deleted file]
icons/CMakeLists.txt [deleted file]
icons/sc-apps-privacybrowserpc.svgz [deleted file]
src/CMakeLists.txt
src/icons/privacy_browser.svg [new file with mode: 0644]
src/main.cpp
src/mainwindow.cpp [new file with mode: 0644]
src/mainwindow.h [new file with mode: 0644]
src/privacybrowserpcview.cpp
src/privacybrowserpcwindow.cpp [deleted file]
src/privacybrowserpcwindow.h [deleted file]
src/resources.qrc [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..9c087ba
--- /dev/null
@@ -0,0 +1,2 @@
+/build
+/.kdev4
index 45d4a8d1550224019910ba59d40555031192b742..94264005fb315181990568943df34e51699a4b6e 100644 (file)
@@ -1,5 +1,5 @@
 [Buildset]
-BuildItems=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x01\x00\x00\x00\x0b\x00\x00\x00\x00\x01\x00\x00\x00 \x00P\x00r\x00i\x00v\x00a\x00c\x00y\x00B\x00r\x00o\x00w\x00s\x00e\x00r\x00P\x00C)
+BuildItems=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x01\x00\x00\x00\x0b\x00\x00\x00\x00\x01\x00\x00\x00\x1c\x00P\x00r\x00i\x00v\x00a\x00c\x00y\x00B\x00r\x00o\x00w\x00s\x00e\x00r)
 
 [CMake]
 Build Directory Count=1
@@ -12,5 +12,49 @@ CMake Binary=/usr/bin/cmake
 CMake Executable=/usr/bin/cmake
 Environment Profile=
 Extra Arguments=
-Install Directory=
+Install Directory=/usr
 Runtime=Host System
+
+[CustomDefinesAndIncludes][ProjectPath0]
+Path=.
+parseAmbiguousAsCPP=true
+parserArguments=-ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -std=c++17
+parserArgumentsC=-ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -std=c99
+parserArgumentsCuda=-ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -std=c++11
+parserArgumentsOpenCL=-ferror-limit=100 -fspell-checking -Wdocumentation -Wunused-parameter -Wunreachable-code -Wall -cl-std=CL1.1
+
+[CustomDefinesAndIncludes][ProjectPath0][Compiler]
+Name=GCC
+
+[Launch]
+Launch Configurations=Launch Configuration 0
+
+[Launch][Launch Configuration 0]
+Configured Launch Modes=execute
+Configured Launchers=nativeAppLauncher
+Name=New Compiled Binary Launcher
+Type=Native Application
+
+[Launch][Launch Configuration 0][Data]
+Arguments=
+Debugger Shell=
+Dependencies=@Variant(\x00\x00\x00\t\x00\x00\x00\x00\x00)
+Dependency Action=Nothing
+Display Demangle Names=true
+Display Static Members=false
+EnvironmentGroup=
+Executable=file:///home/soren/projects/PrivacyBrowserPC/build/bin/privacybrowser
+External Terminal=konsole --noclose --workdir %workdir -e %exe
+GDB Path=
+Kill Before Executing Again=4194304
+Project Target=PrivacyBrowserPC,src,privacybrowserpc
+Remote GDB Config Script=
+Remote GDB Run Script=
+Remote GDB Shell Script=
+Start With=ApplicationOutput
+Use External Terminal=false
+Working Directory=
+isExecutable=true
+
+[Project]
+VersionControlSupport=kdevgit
index 2326479a585ae211de87060cf90847593b589078..ca98f3512c7a40611ce3edc0d703c97bdb9fba16 100644 (file)
@@ -1,11 +1,29 @@
+# Copyright © 2022 Soren Stoutner <soren@stoutner.com>.
+#
+# This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
+#
+# Privacy Browser PC 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.
+#
+# Privacy Browser PC 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 Privacy Browser PC.  If not, see <http://www.gnu.org/licenses/>.
+
 cmake_minimum_required(VERSION 3.16)
 
-project(privacybrowserpc)
+project(privacybrowser)
 
+# Set the minimum framework versions.
 set(QT_MIN_VERSION "5.15.0")
-set(KF_MIN_VERSION "5.83.0")
+set(KDE_FRAMEWORKS_MIN_VERSION "5.83.0")
 
-find_package(ECM ${KF_MIN_VERSION} REQUIRED NO_MODULE)
+find_package(ECM ${KDE_FRAMEWORKS_MIN_VERSION} REQUIRED NO_MODULE)
 set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
 
 include(KDEInstallDirs)
@@ -18,7 +36,7 @@ include(FeatureSummary)
 
 find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Gui Widgets)
 
-find_package(KF5 ${KF_MIN_VERSION} REQUIRED COMPONENTS
+find_package(KF5 ${KDE_FRAMEWORKS_MIN_VERSION} REQUIRED COMPONENTS
     ConfigWidgets
     CoreAddons
     Crash
@@ -30,7 +48,6 @@ find_package(KF5 ${KF_MIN_VERSION} REQUIRED COMPONENTS
 
 add_subdirectory(doc)
 add_subdirectory(src)
-add_subdirectory(icons)
 
 # Make it possible to use the po files fetched by the fetch-translations step
 ki18n_install(po)
diff --git a/PrivacyBrowserPC.kdev4 b/PrivacyBrowserPC.kdev4
new file mode 100644 (file)
index 0000000..9125910
--- /dev/null
@@ -0,0 +1,3 @@
+[Project]
+Manager=KDevCMakeManager
+Name=PrivacyBrowser
diff --git a/README b/README
deleted file mode 100644 (file)
index 21a8f91..0000000
--- a/README
+++ /dev/null
@@ -1,17 +0,0 @@
-How To Build This Template
--=-=-=-=-=-=-=-=-=-=-=-=-=
-
---- On Unix:
-
-cd <project_name_path>
-mkdir build
-cd build
-cmake -DCMAKE_INSTALL_PREFIX=$KDEDIRS -DCMAKE_BUILD_TYPE=Debug ..
-make
-make install  or  su -c 'make install'  or  sudo make install
-
-where $KDEDIRS points to your KDE installation prefix.
-
-Note: you can use another build path. Then cd in your build dir and:
-export KDE_SRC=path_to_your_src
-cmake $KDE_SRC -DCMAKE_INSTALL_PREFIX=$KDEDIRS -DCMAKE_BUILD_TYPE=Debug
index 77c1fb149f24bf7c2bf6e1f5600acf0865c2285b..ffd9ed3bb313ea93482feac64e5f3adbfcd3c7ef 100644 (file)
@@ -1 +1 @@
-kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en SUBDIR privacybrowserpc)
+kdoctools_create_handbook(index.docbook INSTALL_DESTINATION ${KDE_INSTALL_DOCBUNDLEDIR}/en SUBDIR privacybrowser)
diff --git a/icons/16-apps-privacybrowserpc.png b/icons/16-apps-privacybrowserpc.png
deleted file mode 100644 (file)
index 1d17e6f..0000000
Binary files a/icons/16-apps-privacybrowserpc.png and /dev/null differ
diff --git a/icons/22-apps-privacybrowserpc.png b/icons/22-apps-privacybrowserpc.png
deleted file mode 100644 (file)
index 68d7189..0000000
Binary files a/icons/22-apps-privacybrowserpc.png and /dev/null differ
diff --git a/icons/32-apps-privacybrowserpc.png b/icons/32-apps-privacybrowserpc.png
deleted file mode 100644 (file)
index 3f32111..0000000
Binary files a/icons/32-apps-privacybrowserpc.png and /dev/null differ
diff --git a/icons/48-apps-privacybrowserpc.png b/icons/48-apps-privacybrowserpc.png
deleted file mode 100644 (file)
index 38e246a..0000000
Binary files a/icons/48-apps-privacybrowserpc.png and /dev/null differ
diff --git a/icons/CMakeLists.txt b/icons/CMakeLists.txt
deleted file mode 100644 (file)
index cbea1cb..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-set(privacybrowserpc_ICONS
-  16-apps-privacybrowserpc.png
-  22-apps-privacybrowserpc.png
-  32-apps-privacybrowserpc.png
-  48-apps-privacybrowserpc.png
-  sc-apps-privacybrowserpc.svgz
-)
-
-ecm_install_icons(ICONS ${privacybrowserpc_ICONS} DESTINATION ${KDE_INSTALL_ICONDIR} THEME hicolor)
diff --git a/icons/sc-apps-privacybrowserpc.svgz b/icons/sc-apps-privacybrowserpc.svgz
deleted file mode 100644 (file)
index b29c626..0000000
Binary files a/icons/sc-apps-privacybrowserpc.svgz and /dev/null differ
index 75bdc675ddc57e730b703bbd641269b068d30e3a..077ff051da2a63c212052ae9c89fd16362bf3fe4 100644 (file)
@@ -1,23 +1,41 @@
-add_executable(privacybrowserpc)
+# Copyright © 2022 Soren Stoutner <soren@stoutner.com>.
+#
+# This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
+#
+# Privacy Browser PC 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.
+#
+# Privacy Browser PC 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 Privacy Browser PC.  If not, see <http://www.gnu.org/licenses/>.
 
-target_sources(privacybrowserpc PRIVATE
+# Create the executable and add the resources.
+add_executable(privacybrowser resources.qrc)
+
+target_sources(privacybrowser PRIVATE
     main.cpp
-    privacybrowserpcwindow.cpp
+    mainwindow.cpp
     privacybrowserpcview.cpp
 )
 
-ecm_qt_declare_logging_category(privacybrowserpc
+ecm_qt_declare_logging_category(privacybrowser
     HEADER privacybrowserpcdebug.h
-    IDENTIFIER PRIVACYBROWSERPC
-    CATEGORY_NAME "privacybrowserpc"
+    IDENTIFIER PRIVACYBROWSER
+    CATEGORY_NAME "privacybrowser"
 )
-kconfig_add_kcfg_files(privacybrowserpc PrivacyBrowserPCSettings.kcfgc)
-ki18n_wrap_ui(privacybrowserpc
+kconfig_add_kcfg_files(privacybrowser PrivacyBrowserPCSettings.kcfgc)
+ki18n_wrap_ui(privacybrowser
     privacybrowserpcview.ui
     settings.ui
 )
 
-target_link_libraries(privacybrowserpc
+target_link_libraries(privacybrowser
     KF5::CoreAddons
     KF5::I18n
     KF5::XmlGui
@@ -27,7 +45,7 @@ target_link_libraries(privacybrowserpc
     Qt5::Widgets
 )
 
-install(TARGETS privacybrowserpc ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
-install(PROGRAMS org.example.privacybrowserpc.desktop  DESTINATION ${KDE_INSTALL_APPDIR})
-install(FILES org.example.privacybrowserpc.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
-install(FILES privacybrowserpcui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/privacybrowserpc)
+install(TARGETS privacybrowser ${KDE_INSTALL_TARGETS_DEFAULT_ARGS})
+install(PROGRAMS com.stoutner.privacybrowser  DESTINATION ${KDE_INSTALL_APPDIR})
+install(FILES com.stounter.privacybrowser.appdata.xml DESTINATION ${KDE_INSTALL_METAINFODIR})
+install(FILES privacybrowserpcui.rc DESTINATION ${KDE_INSTALL_KXMLGUI5DIR}/privacybrowser)  # TODO
diff --git a/src/icons/privacy_browser.svg b/src/icons/privacy_browser.svg
new file mode 100644 (file)
index 0000000..5d39ed4
--- /dev/null
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   height="546.13336"
+   viewBox="0 0 256 256"
+   width="546.13336"
+   id="svg2"
+   version="1.1"
+   inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
+   sodipodi:docname="privacy_browser.svg"
+   style="fill:#000000"
+   inkscape:export-filename="/home/soren/ownCloud/Android/Privacy Browser/Icons/Privacy Browser/Privacy Browser 680x680.png"
+   inkscape:export-xdpi="119.53"
+   inkscape:export-ydpi="119.53"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:dc="http://purl.org/dc/elements/1.1/">
+  <metadata
+     id="metadata12">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs10" />
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="3644"
+     inkscape:window-height="2015"
+     id="namedview8"
+     showgrid="false"
+     inkscape:snap-bbox="true"
+     inkscape:zoom="1.2291667"
+     inkscape:cx="-108.61017"
+     inkscape:cy="218.84745"
+     inkscape:window-x="0"
+     inkscape:window-y="0"
+     inkscape:window-maximized="1"
+     inkscape:current-layer="g4150"
+     inkscape:pagecheckerboard="0">
+    <inkscape:grid
+       type="xygrid"
+       id="grid4223"
+       originx="0"
+       originy="0"
+       spacingx="1"
+       spacingy="1" />
+  </sodipodi:namedview>
+  <g
+     style="display:inline"
+     transform="translate(0,160)"
+     inkscape:label="Inner Shield"
+     id="g4150"
+     inkscape:groupmode="layer"
+     sodipodi:insensitive="true">
+    <path
+       style="display:inline;fill:#0d47a1;fill-opacity:1;stroke:none"
+       inkscape:connector-curvature="0"
+       d="m 128,-147.2 -94.254546,41.89091 v 62.836368 c 0,58.123635 40.215273,112.477091 94.254546,125.672721 54.03928,-13.19563 94.25454,-67.549086 94.25454,-125.672721 v -62.836368 z"
+       id="path4152"
+       sodipodi:nodetypes="ccscscc" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer5"
+     inkscape:label="Shield"
+     transform="translate(0,160)"
+     style="display:inline"
+     sodipodi:insensitive="true">
+    <path
+       id="path4610-5"
+       d="m 128,-160 -104.727273,46.54546 v 69.818182 C 23.272727,20.945459 67.956363,81.338188 128,95.999999 188.04364,81.338188 232.72727,20.945459 232.72727,-43.636358 v -69.818182 z m 0,127.883641 h 81.45454 C 203.28728,15.825464 171.28727,58.530919 128,71.912739 V -31.999996 H 46.545455 V -98.327268 L 128,-134.51636 Z"
+       inkscape:connector-curvature="0"
+       style="display:inline;fill:#1976d2;fill-opacity:1;stroke:none" />
+  </g>
+  <g
+     inkscape:groupmode="layer"
+     id="layer3"
+     inkscape:label="Earth"
+     style="display:inline"
+     transform="translate(0,232)"
+     sodipodi:insensitive="true">
+    <path
+       style="display:inline;fill:#ffffff;fill-opacity:1"
+       id="path4209"
+       d="m 127.92021,-183.78553 c -44.041614,0 -79.705747,35.74391 -79.705747,79.78553 0,44.041617 35.664133,79.785537 79.705747,79.785537 44.1214,0 79.86533,-35.74392 79.86533,-79.785537 0,-44.04162 -35.74393,-79.78553 -79.86533,-79.78553 z m 55.29138,47.87132 h -23.53674 c -2.55313,-9.9732 -6.22326,-19.54746 -11.0104,-28.40365 14.68055,5.02648 26.88773,15.23903 34.54714,28.40365 z M 128,-167.50929 c 6.6222,9.57427 11.80825,20.18574 15.23903,31.59508 h -30.47807 c 3.43078,-11.40934 8.61684,-22.02081 15.23904,-31.59508 z M 66.245993,-88.042889 C 64.969425,-93.149168 64.171571,-98.494798 64.171571,-104 c 0,-5.5052 0.797855,-10.85083 2.074422,-15.95711 h 26.96751 c -0.63829,5.26585 -1.117,10.5317 -1.117,15.95711 0,5.425417 0.47872,10.691263 1.117,15.957111 z m 6.542412,15.957108 H 96.32514 c 2.553137,9.973191 6.22327,19.547449 11.0104,28.403644 C 92.655006,-48.708619 80.44782,-58.841391 72.788405,-72.085781 Z M 96.32514,-135.91421 H 72.788405 c 7.659415,-13.2444 19.866601,-23.37717 34.547135,-28.40365 -4.78713,8.85619 -8.457263,18.43045 -11.0104,28.40365 z M 128,-40.49071 c -6.6222,-9.574268 -11.80826,-20.185747 -15.23904,-31.595071 h 30.47807 C 139.80825,-60.676457 134.6222,-50.064978 128,-40.49071 Z m 18.66982,-47.552179 h -37.33964 c -0.71801,-5.265848 -1.27656,-10.531694 -1.27656,-15.957111 0,-5.42541 0.55854,-10.77105 1.27656,-15.95711 h 37.33964 c 0.71811,5.18606 1.27656,10.5317 1.27656,15.95711 0,5.425417 -0.55844,10.691263 -1.27656,15.957111 z m 1.99463,44.360752 c 4.78714,-8.856195 8.45727,-18.430453 11.0104,-28.403644 h 23.53674 c -7.65941,13.164605 -19.86659,23.377162 -34.54714,28.403644 z m 14.12204,-44.360752 c 0.63828,-5.265848 1.117,-10.531694 1.117,-15.957111 0,-5.42541 -0.47871,-10.69126 -1.117,-15.95711 h 26.96752 c 1.27656,5.10628 2.07441,10.45191 2.07441,15.95711 0,5.505202 -0.79784,10.850832 -2.07441,15.957111 z"
+       inkscape:connector-curvature="0" />
+  </g>
+</svg>
index 41f54d10aaaba49cbdd23ad2d04e8545ea64845e..f0ffdecafd53cd5b89cd23b63fe7c587051eed55 100644 (file)
@@ -1,57 +1,91 @@
 /*
-    SPDX-FileCopyrightText: %{CURRENT_YEAR} %{AUTHOR} <%{EMAIL}>
+ * Copyright © 2022 Soren Stoutner <soren@stoutner.com>.
+ *
+ * This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
+ *
+ * Privacy Browser PC 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.
+ *
+ * Privacy Browser PC 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 Privacy Browser PC.  If not, see <http://www.gnu.org/licenses/>.
+ */
 
-    SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
-*/
+// Application headers.
+#include "mainwindow.h"
+#include "privacybrowserpcdebug.h"  // TODO.  Rename.
 
-// application header
-#include "privacybrowserpcwindow.h"
-#include "privacybrowserpcdebug.h"
-
-// KF headers
+// KDE Frameworks headers.
+#include <KAboutData>
 #include <KCrash>
 #include <KDBusService>
-#include <KAboutData>
-#include <KLocalizedString>
+#include <KLocalizedString>  // TODO.  This may not be needed.
 
-// Qt headers
-#include <QApplication>
+// Qt headers.
+#include <QApplication>  // TODO.  Probably not needed.  Appears to be included in a sub header.
 #include <QCommandLineParser>
-#include <QIcon>
-#include <QLoggingCategory>
+#include <QIcon>  // TODO.  Probably not needed.  Appears to be included in a sub header.
+#include <QLoggingCategory>  // Probably not needed at all.
 
-
-int main(int argc, char **argv)
+int main(int argc, char *argv[])
 {
+    // Create the application.
     QApplication application(argc, argv);
 
-    KLocalizedString::setApplicationDomain("privacybrowserpc");
+    // Set the localization application domain.
+    KLocalizedString::setApplicationDomain("privacybrowser");
+
+    // Initialize KCrash.
     KCrash::initialize();
 
-    KAboutData aboutData( QStringLiteral("privacybrowserpc"),
-                          i18n("PrivacyBrowserPC"),
-                          QStringLiteral("%{VERSION}"),
-                          i18n("A Simple Application written with KDE Frameworks"),
-                          KAboutLicense::GPL,
-                          i18n("Copyright %{CURRENT_YEAR}, %{AUTHOR} <%{EMAIL}>"));
+    // Instantiate about data.
+    KAboutData aboutData(QStringLiteral("privacybrowser"), i18n("Privacy Browser"), QStringLiteral("0.1"));
 
-    aboutData.addAuthor(i18n("%{AUTHOR}"),i18n("Author"), QStringLiteral("%{EMAIL}"));
-    aboutData.setOrganizationDomain("example.org");
-    aboutData.setDesktopFileName(QStringLiteral("org.example.privacybrowserpc"));
+    // Add the author information.
+    aboutData.addAuthor(i18n("Soren Stoutner"),i18n("Principal developer"), QStringLiteral("soren@stoutner.com"), QStringLiteral("https://www.stoutner.com/"));
 
+    // Populate additional about data info.  TODO, OrLaterVersions does not work.  The solution is probably to use a custom license file.
+    aboutData.setBugAddress("https://redmine.stoutner.com/projects/privacy-browser/issues");  // TODO.  Update the URL.
+    aboutData.setCopyrightStatement(i18n("Copyright © 2022 Soren Stoutner <soren@stoutner.com>"));
+    aboutData.setDesktopFileName(QStringLiteral("com.stoutner.privacybrowser"));
+    aboutData.setHomepage(QStringLiteral("https://www.stoutner.com/privacy-browser-pc/"));
+    aboutData.setLicense(KAboutLicense::GPL_V3, KAboutLicense::OrLaterVersions);
+    aboutData.setOrganizationDomain("stoutner.com");
+    aboutData.setShortDescription(i18n("A web browser that respects your privacy."));
+
+    // Set the application data.
     KAboutData::setApplicationData(aboutData);
-    application.setWindowIcon(QIcon::fromTheme(QStringLiteral("privacybrowserpc")));
 
-    QCommandLineParser parser;
-    aboutData.setupCommandLine(&parser);
+    // Set the window icon.
+    application.setWindowIcon(QIcon::fromTheme(QStringLiteral("privacybrowser"), QIcon(":/icons/privacy_browser.svg")));
+
+    // Create a command line parser.
+    QCommandLineParser commandLineParser;
+
+    // Process the command line through about data (this adds --license and --author).
+    aboutData.setupCommandLine(&commandLineParser);
 
-    parser.process(application);
-    aboutData.processCommandLine(&parser);
+    // Process the application command line options (this adds --version, --help, and --help-all).
+    commandLineParser.process(application);
 
+    // Make it so.
+    aboutData.processCommandLine(&commandLineParser);
+
+    // TODO.
     KDBusService appDBusService(KDBusService::Multiple | KDBusService::NoExitOnFailure);
 
-    PrivacyBrowserPCWindow *window = new PrivacyBrowserPCWindow;
-    window->show();
+    // Create the main window.
+    MainWindow *mainWindowPointer = new MainWindow;
+
+    // Show the main window.
+    mainWindowPointer->show();
 
+    // Return the application.
     return application.exec();
 }
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
new file mode 100644 (file)
index 0000000..739fca9
--- /dev/null
@@ -0,0 +1,77 @@
+/*
+ * Copyright © 2022 Soren Stoutner <soren@stoutner.com>.
+ *
+ * This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
+ *
+ * Privacy Browser PC 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.
+ *
+ * Privacy Browser PC 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 Privacy Browser PC.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+// Application headers.
+#include "mainwindow.h"
+#include "privacybrowserpcview.h"
+#include "privacybrowserpcdebug.h"
+
+// KDE Frameworks headers.
+#include <KActionCollection>
+#include <KConfigDialog>
+
+
+MainWindow::MainWindow() : 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();
+}
+
+MainWindow::~MainWindow()
+{
+}
+
+void MainWindow::fileNew()
+{
+    qCDebug(PRIVACYBROWSER) << "PrivacyBrowserPCWindow::fileNew()";
+    (new MainWindow)->show();
+}
+
+void MainWindow::settingsConfigure()
+{
+    qCDebug(PRIVACYBROWSER) << "MainWindow::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();
+}
diff --git a/src/mainwindow.h b/src/mainwindow.h
new file mode 100644 (file)
index 0000000..a70db9f
--- /dev/null
@@ -0,0 +1,72 @@
+/*
+ * Copyright © 2022 Soren Stoutner <soren@stoutner.com>.
+ *
+ * This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
+ *
+ * Privacy Browser PC 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.
+ *
+ * Privacy Browser PC 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 Privacy Browser PC.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+// Application headers.
+#include "ui_settings.h"
+#include "PrivacyBrowserPCSettings.h"
+
+// KDE Frameworks headers.
+#include <KXmlGuiWindow>
+
+// TODO.  What is this doing here?
+class PrivacyBrowserPCView;
+
+/**  TODO.  Remove.
+ * This class serves as the main window for privacybrowserpc.  It handles the
+ * menus, toolbars and status bars.
+ *
+ * @short Main window class
+ * @author %{AUTHOR} <%{EMAIL}>
+ * @version %{VERSION}
+ */
+class MainWindow : public KXmlGuiWindow  // TODO.  Checkout documentation.
+{
+    // Include the Q_OBJECT macro.
+    Q_OBJECT
+
+public:
+    // The default constructor.
+    MainWindow();
+
+
+    // The default destructor.  TODO, this could probably be removed.
+    ~MainWindow() override;
+
+private Q_SLOTS:
+    /**
+     * Create a new window
+     */
+    void fileNew();
+
+    /**
+     * Open the settings dialog
+     */
+    void settingsConfigure();
+
+private:
+    // this is the name of the root widget inside our Ui file
+    // you can rename it in designer and then change it here
+    Ui::Settings m_settings;
+    QAction *m_switchAction;
+    PrivacyBrowserPCView *m_privacybrowserpcView;
+};
+#endif
index 7a903aa2f134d3617760e48f37bd6a06d07696dd..84e5eed2b801cb16708a1280ffe9ba3dfcd339e2 100644 (file)
@@ -34,7 +34,7 @@ void PrivacyBrowserPCView::switchColors()
 
 void PrivacyBrowserPCView::handleSettingsChanged()
 {
-    qCDebug(PRIVACYBROWSERPC) << "PrivacyBrowserPCView::handleSettingsChanged()";
+    qCDebug(PRIVACYBROWSER) << "PrivacyBrowserPCView::handleSettingsChanged()";
     QPalette palette = m_ui.templateLabel->palette();
     palette.setColor(QPalette::Window, PrivacyBrowserPCSettings::colorBackground());
     palette.setColor(QPalette::WindowText, PrivacyBrowserPCSettings::colorForeground());
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();
-}
diff --git a/src/privacybrowserpcwindow.h b/src/privacybrowserpcwindow.h
deleted file mode 100644 (file)
index 77fd554..0000000
+++ /dev/null
@@ -1,58 +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
-*/
-
-#ifndef PRIVACYBROWSERPCWINDOW_H
-#define PRIVACYBROWSERPCWINDOW_H
-
-#include <KXmlGuiWindow>
-
-#include "ui_settings.h"
-#include "PrivacyBrowserPCSettings.h"
-
-class PrivacyBrowserPCView;
-
-/**
- * This class serves as the main window for privacybrowserpc.  It handles the
- * menus, toolbars and status bars.
- *
- * @short Main window class
- * @author %{AUTHOR} <%{EMAIL}>
- * @version %{VERSION}
- */
-class PrivacyBrowserPCWindow : public KXmlGuiWindow
-{
-    Q_OBJECT
-public:
-    /**
-     * Default Constructor
-     */
-    PrivacyBrowserPCWindow();
-
-    /**
-     * Default Destructor
-     */
-    ~PrivacyBrowserPCWindow() override;
-
-private Q_SLOTS:
-    /**
-     * Create a new window
-     */
-    void fileNew();
-
-    /**
-     * Open the settings dialog
-     */
-    void settingsConfigure();
-
-private:
-    // this is the name of the root widget inside our Ui file
-    // you can rename it in designer and then change it here
-    Ui::Settings m_settings;
-    QAction *m_switchAction;
-    PrivacyBrowserPCView *m_privacybrowserpcView;
-};
-
-#endif // PRIVACYBROWSERPCWINDOW_H
diff --git a/src/resources.qrc b/src/resources.qrc
new file mode 100644 (file)
index 0000000..7603240
--- /dev/null
@@ -0,0 +1,24 @@
+<!--
+  Copyright © 2022 Soren Stoutner <soren@stoutner.com>.
+
+  This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-android>.
+
+  Privacy Browser PC 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.
+
+  Privacy Browser PC 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 Privacy Browser PC.  If not, see <http://www.gnu.org/licenses/>. -->
+
+<!DOCTYPE RCC>
+<RCC version="1.0">
+    <qresource>
+        <file>icons/privacy_browser.svg</file>
+    </qresource>
+</RCC>