# 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/>.
+
+# Set the minimum CMake version.
cmake_minimum_required(VERSION 3.16)
+# Name the project.
project(privacybrowser)
# Set the minimum framework versions.
set(QT_MIN_VERSION "5.15.0")
set(KDE_FRAMEWORKS_MIN_VERSION "5.83.0")
+# Load the Extra CMake Modules that correspond to the KDE Frameworks version.
find_package(ECM ${KDE_FRAMEWORKS_MIN_VERSION} REQUIRED NO_MODULE)
+
+# Set the CMake module path.
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH})
+# Include the KDE modules.
include(KDEInstallDirs)
include(KDECMakeSettings)
include(KDECompilerSettings NO_POLICY_SCOPE)
+# Include the Extra CMake Modules.
include(ECMInstallIcons)
include(ECMQtDeclareLoggingCategory)
include(FeatureSummary)
+# Load the Qt components.
find_package(Qt5 ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENTS Core Gui Widgets)
+# Load the KDE Frameworks components.
find_package(KF5 ${KDE_FRAMEWORKS_MIN_VERSION} REQUIRED COMPONENTS
ConfigWidgets
CoreAddons
XmlGui
)
+# Add the subdirectories.
add_subdirectory(doc)
add_subdirectory(src)
-# Make it possible to use the po files fetched by the fetch-translations step
+# Make it possible to use the PO files fetched by the fetch-translations step.
ki18n_install(po)
kdoctools_install(po)
+# Generate a summary.
feature_summary(WHAT ALL INCLUDE_QUIET_PACKAGES FATAL_ON_MISSING_REQUIRED_PACKAGES)
-Privacy Browser PC copyright © 2022 Soren Stoutner <soren@stoutner.com>.
+Privacy Browser PC copyright © 2016-2017,2021-2022 Soren Stoutner <soren@stoutner.com>.
This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
--- /dev/null
+# 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/>.
+
+
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2022-01-20 17:18-0700\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"Language: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: src/privacybrowserpcview.cpp:44
+#, kde-format
+msgid "This project is %1 days old"
+msgstr ""
+
+#: src/mainwindow.cpp:38
+#, kde-format
+msgctxt "@action"
+msgid "Switch Colors"
+msgstr ""
+
+#: src/mainwindow.cpp:74
+#, kde-format
+msgctxt "@title:tab"
+msgid "General"
+msgstr ""
+
+#: src/main.cpp:44
+#, kde-format
+msgid "Privacy Browser"
+msgstr ""
+
+#: src/main.cpp:47
+#, kde-format
+msgid "Soren Stoutner"
+msgstr ""
+
+#: src/main.cpp:47
+#, kde-format
+msgid "Principal developer"
+msgstr ""
+
+#: src/main.cpp:51
+#, kde-format
+msgid "Copyright © 2016-2017,2021-2022 Soren Stoutner <soren@stoutner.com>"
+msgstr ""
+
+#: src/main.cpp:56
+#, kde-format
+msgid "A web browser that respects your privacy."
+msgstr ""
+
+#: rc.cpp:3
+#, kde-format
+msgid "Background color:"
+msgstr ""
+
+#: rc.cpp:6
+#, kde-format
+msgid "Choose a new background color"
+msgstr ""
+
+#: rc.cpp:9
+#, kde-format
+msgid ""
+"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css"
+"\">\n"
+"p, li { white-space: pre-wrap; }\n"
+"</style></head><body style=\" font-family:'DejaVu Serif'; font-size:9pt; "
+"font-weight:400; font-style:normal;\">\n"
+"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-"
+"right:0px; -qt-block-indent:0; text-indent:0px;\">Change the <span style=\" "
+"font-weight:600;\">background</span> color by clicking here and choose the "
+"new <span style=\" color:#ff0000;\">color</span> in the <span style=\" font-"
+"style:italic;\">color dialog</span>.</p></body></html>"
+msgstr ""
+
+#: rc.cpp:15
+#, kde-format
+msgid "Foreground color:"
+msgstr ""
+
+#: rc.cpp:18
+#, kde-format
+msgid "Choose a new foreground color"
+msgstr ""
+
+#: rc.cpp:21
+#, kde-format
+msgid ""
+"<html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css"
+"\">\n"
+"p, li { white-space: pre-wrap; }\n"
+"</style></head><body style=\" font-family:'DejaVu Serif'; font-size:9pt; "
+"font-weight:400; font-style:normal;\">\n"
+"<p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-"
+"right:0px; -qt-block-indent:0; text-indent:0px;\">Change the <span style=\" "
+"font-weight:600;\">foreground</span> color by clicking here and choose the "
+"new <span style=\" color:#ff0000;\">color</span> in the <span style=\" font-"
+"style:italic;\">color dialog</span>.</p></body></html>"
+msgstr ""
+
+#: rc.cpp:27
+#, kde-format
+msgid "Project age:"
+msgstr ""
+
+#: rc.cpp:30
+#, kde-format
+msgid "Set the project age (in days)"
+msgstr ""
+
+#: rc.cpp:33
+#, kde-format
+msgid "Change the project age (in days) by choosing a new number of days."
+msgstr ""
+
+#: rc.cpp:36
+#, kde-format
+msgid "color of the background"
+msgstr ""
+
+#: rc.cpp:39
+#, kde-format
+msgid "color of the foreground"
+msgstr ""
+
+#: rc.cpp:42
+#, kde-format
+msgid "age of the project"
+msgstr ""
+
+#: rc.cpp:45
+#, kde-format
+msgid "hello, world"
+msgstr ""
+
+#: rc.cpp:48
+#, kde-format
+msgid "Main Toolbar"
+msgstr ""
+
+#: rc.cpp:49
+#, kde-format
+msgctxt "NAME OF TRANSLATORS"
+msgid "Your names"
+msgstr ""
+
+#: rc.cpp:50
+#, kde-format
+msgctxt "EMAIL OF TRANSLATORS"
+msgid "Your emails"
+msgstr ""
# 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/>.
+
# Create the executable and add the resources.
add_executable(privacybrowser resources.qrc)
+# List the sources to include in the executable.
target_sources(privacybrowser PRIVATE
main.cpp
mainwindow.cpp
privacybrowserpcview.cpp
)
+# Add the Qt logging category.
ecm_qt_declare_logging_category(privacybrowser
- HEADER privacybrowserpcdebug.h
+ HEADER privacybrowserdebug.h
IDENTIFIER PRIVACYBROWSER
CATEGORY_NAME "privacybrowser"
)
-kconfig_add_kcfg_files(privacybrowser PrivacyBrowserPCSettings.kcfgc)
+
+# Include the KConfig controller file.
+kconfig_add_kcfg_files(privacybrowser settings.kcfgc)
+
+# Use KDE Frameworks to handle internationalization of the following UI files.
ki18n_wrap_ui(privacybrowser
privacybrowserpcview.ui
settings.ui
)
+
target_link_libraries(privacybrowser
KF5::CoreAddons
KF5::I18n
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
- http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
- <kcfgfile name="privacybrowserpcrc"/>
- <group name="Preferences">
- <entry name="colorBackground" type="Color">
- <label>color of the background</label>
- <default>black</default>
- </entry>
- <entry name="colorForeground" type="Color">
- <label>color of the foreground</label>
- <default>yellow</default>
- </entry>
- <entry name="ageInDays" type="Int">
- <label>age of the project</label>
- <default>2</default>
- </entry>
- </group>
-</kcfg>
+++ /dev/null
-# Code generation options for kconfig_compiler
-File=PrivacyBrowserPCSettings.kcfg
-ClassName=PrivacyBrowserPCSettings
-Singleton=true
-# will create the necessary code for setting those variables
-Mutators=colorBackground,colorForeground
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+
+<!--
+ Copyright © 2016-2017,2021-2022 Soren Stoutner <soren@stoutner.com>.
+
+ This file is derived from `security` and `language`, which are part of the Android Material icon set. They are released under the Apache License 2.0. <https://fonts.google.com/icons>
+
+ 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/>. -->
+
<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>
+ xmlns="http://www.w3.org/2000/svg"
+ viewBox="0 0 256 256" >
+
+ <!-- Inner Shield. -->
+ <g transform="translate(0,160)" >
+ <path
+ style="fill:#0d47a1"
+ 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" />
+ </g>
+
+ <!-- Outer Shield. -->
+ <g transform="translate(0,160)" >
+ <path
+ style="fill:#1976d2"
+ 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" />
+ </g>
+
+ <!-- Globe. -->
+ <g transform="translate(0,232)" >
+ <path
+ style="fill:#ffffff"
+ 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" />
+ </g>
</svg>
-Privacy Browser PC 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
// Populate additional about data info.
aboutData.setBugAddress("https://redmine.stoutner.com/projects/privacy-browser-pc/issues");
- aboutData.setCopyrightStatement(i18n("Copyright © 2022 Soren Stoutner <soren@stoutner.com>"));
+ aboutData.setCopyrightStatement(i18n("Copyright © 2016-2017,2021-2022 Soren Stoutner <soren@stoutner.com>"));
aboutData.setDesktopFileName(QStringLiteral("com.stoutner.privacybrowser"));
aboutData.setHomepage(QStringLiteral("https://www.stoutner.com/privacy-browser-pc/"));
aboutData.setLicenseTextFile(":/licenses/GPLv3+.txt");
// Application headers.
#include "mainwindow.h"
#include "privacybrowserpcview.h"
-#include "privacybrowserpcdebug.h"
+#include "privacybrowserdebug.h"
+#include "settings.h"
// KDE Frameworks headers.
#include <KActionCollection>
return;
}
- KConfigDialog *dialog = new KConfigDialog(this, QStringLiteral("settings"), PrivacyBrowserPCSettings::self());
+ KConfigDialog *dialog = new KConfigDialog(this, QStringLiteral("settings"), Settings::self());
QWidget *generalSettingsPage = new QWidget;
m_settings.setupUi(generalSettingsPage);
dialog->addPage(generalSettingsPage, i18nc("@title:tab", "General"), QStringLiteral("package_setting"));
// application headers
#include "privacybrowserpcview.h"
-#include "PrivacyBrowserPCSettings.h"
-#include "privacybrowserpcdebug.h"
+#include "settings.h"
+#include "privacybrowserdebug.h"
PrivacyBrowserPCView::PrivacyBrowserPCView(QWidget *parent)
void PrivacyBrowserPCView::switchColors()
{
// switch the foreground/background colors of the label
- QColor color = PrivacyBrowserPCSettings::colorBackground();
- PrivacyBrowserPCSettings::setColorBackground(PrivacyBrowserPCSettings::colorForeground());
- PrivacyBrowserPCSettings::setColorForeground(color);
+ QColor color = Settings::colorBackground();
+ Settings::setColorBackground(Settings::colorForeground());
+ Settings::setColorForeground(color);
handleSettingsChanged();
}
{
qCDebug(PRIVACYBROWSER) << "PrivacyBrowserPCView::handleSettingsChanged()";
QPalette palette = m_ui.templateLabel->palette();
- palette.setColor(QPalette::Window, PrivacyBrowserPCSettings::colorBackground());
- palette.setColor(QPalette::WindowText, PrivacyBrowserPCSettings::colorForeground());
+ palette.setColor(QPalette::Window, Settings::colorBackground());
+ palette.setColor(QPalette::WindowText, Settings::colorForeground());
m_ui.templateLabel->setPalette(palette);
// i18n : internationalization
- m_ui.templateLabel->setText(i18n("This project is %1 days old", PrivacyBrowserPCSettings::ageInDays()));
+ m_ui.templateLabel->setText(i18n("This project is %1 days old", Settings::ageInDays()));
}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<kcfg xmlns="http://www.kde.org/standards/kcfg/1.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.kde.org/standards/kcfg/1.0
+ http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
+ <kcfgfile name="privacybrowserpcrc"/>
+ <group name="Preferences">
+ <entry name="colorBackground" type="Color">
+ <label>color of the background</label>
+ <default>black</default>
+ </entry>
+ <entry name="colorForeground" type="Color">
+ <label>color of the foreground</label>
+ <default>yellow</default>
+ </entry>
+ <entry name="ageInDays" type="Int">
+ <label>age of the project</label>
+ <default>2</default>
+ </entry>
+ </group>
+</kcfg>
--- /dev/null
+# 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/>.
+
+
+# Specify the KConfig file.
+File=settings.kcfg
+
+# Specify the class name, which will be used to autogenerate .cpp and .h files.
+ClassName=Settings
+
+# Make the generated class a singleton. TODO, the default is false. This may not be needed.
+Singleton=true
+
+# Create code for mutating (making changes to) the listed variables. TODO, the default is false. These may not be needed.
+Mutators=colorBackground,colorForeground
--- /dev/null
+#! /usr/bin/env bash
+
+# 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/>.
+
+
+# Extract the strings from the UI and RC files and add them to a temporary .app file.
+extractrc `find -name \*.ui -o -name \*.rc -o -name \*.kcfg` >> rc.cpp
+
+# Add the names of the translators.
+echo 'i18nc("NAME OF TRANSLATORS", "Your names");' >> rc.cpp
+echo 'i18nc("EMAIL OF TRANSLATORS", "Your emails");' >> rc.cpp
+
+# Extract all the string to a PO template file.
+xgettext --c++ --kde --from-code=UTF-8 -ki18n:1 -ki18nc:1c,2 -ki18np:1,2 -ki18ncp:1c,2,3 -kki18n:1 -kki18nc:1c,2 -kki18np:1,2 -kki18ncp:1c,2,3 -kkli18n:1 -kkli18nc:1c,2 -kkli18np:1,2 -kkli18ncp:1c,2,3 -kI18N_NOOP:1 -kI18NC_NOOP:1c,2 `find . -name \*.cpp` -o po/privacybrowser.pot
+
+# Remove the temporary .app file.
+rm -f rc.cpp