diff --git a/oscar/SleepLib/appsettings.cpp b/oscar/SleepLib/appsettings.cpp
index b1792b60..101c06cc 100644
--- a/oscar/SleepLib/appsettings.cpp
+++ b/oscar/SleepLib/appsettings.cpp
@@ -39,6 +39,7 @@ AppWideSetting::AppWideSetting(Preferences *pref) : PrefSettings(pref)
initPref(STR_AS_RightSidebarVisible, false);
initPref(STR_CS_UserEventPieChart, false);
initPref(STR_US_ShowSerialNumbers, false);
+ initPref(STR_US_ShowPersonalData, true);
initPref(STR_US_OpenTabAtStart, 1);
initPref(STR_US_OpenTabAfterImport, 0);
initPref(STR_US_AutoLaunchImport, false);
diff --git a/oscar/SleepLib/appsettings.h b/oscar/SleepLib/appsettings.h
index a90eee75..3d9d3373 100644
--- a/oscar/SleepLib/appsettings.h
+++ b/oscar/SleepLib/appsettings.h
@@ -52,6 +52,7 @@ const QString STR_US_OpenTabAfterImport = "OpenTabAfterImport";
const QString STR_US_AutoLaunchImport = "AutoLaunchImport";
const QString STR_US_RemoveCardReminder = "RemoveCardReminder";
const QString STR_US_DontAskWhenSavingScreenshots = "DontAskWhenSavingScreenshots";
+const QString STR_US_ShowPersonalData = "ShowPersonalData";
const QString STR_IS_CacheSessions = "MemoryHog";
const QString STR_GEN_AutoOpenLastUsed = "AutoOpenLastUsed";
@@ -141,6 +142,7 @@ public:
bool dontAskWhenSavingScreenshots() const { return getPref(STR_US_DontAskWhenSavingScreenshots).toBool(); }
bool autoOpenLastUsed() const { return getPref(STR_GEN_AutoOpenLastUsed).toBool(); }
inline const QString & language() const { return m_language; }
+ bool showPersonalData() const { return getPref(STR_US_ShowPersonalData).toBool(); }
void setProfileName(QString name) { setPref(STR_GEN_Profile, m_profileName=name); }
void setAutoLaunchImport(bool b) { setPref(STR_US_AutoLaunchImport, b); }
@@ -191,6 +193,7 @@ public:
void setOpenTabAfterImport(int idx) { setPref(STR_US_OpenTabAfterImport, idx); }
void setRemoveCardReminder(bool b) { setPref(STR_US_RemoveCardReminder, b); }
void setDontAskWhenSavingScreenshots(bool b) { setPref(STR_US_DontAskWhenSavingScreenshots, b); }
+ void setShowPersonalData(bool b) { setPref(STR_US_ShowPersonalData, b); }
void setVersionString(QString version) { setPref(STR_PREF_VersionString, version); }
#ifndef NO_UPDATER
diff --git a/oscar/mainwindow.cpp b/oscar/mainwindow.cpp
index 0762f547..1a17f59f 100644
--- a/oscar/mainwindow.cpp
+++ b/oscar/mainwindow.cpp
@@ -226,6 +226,8 @@ void MainWindow::SetupGUI()
ui->action_Sidebar_Toggle->setChecked(b);
ui->toolBox->setVisible(b);
+ ui->actionShowPersonalData->setChecked(AppSetting->showPersonalData());
+
ui->actionPie_Chart->setChecked(AppSetting->showPieChart());
ui->actionDaily_Calendar->setChecked(AppSetting->calendarVisible());
@@ -2710,6 +2712,14 @@ void MainWindow::on_actionDaily_Calendar_toggled(bool visible)
if (daily) daily->setCalendarVisible(visible);
}
+void MainWindow::on_actionShowPersonalData_toggled(bool visible)
+{
+ AppSetting->setShowPersonalData(visible);
+ if (ui->tabWidget->currentWidget() == ui->statisticsTab) {
+ GenerateStatistics();
+ }
+}
+
#include "SleepLib/journal.h"
void MainWindow::on_actionExport_Journal_triggered()
diff --git a/oscar/mainwindow.h b/oscar/mainwindow.h
index ee2444ba..8abed614 100644
--- a/oscar/mainwindow.h
+++ b/oscar/mainwindow.h
@@ -362,6 +362,8 @@ class MainWindow : public QMainWindow
void on_statisticsView_anchorClicked(const QUrl &url);
+ void on_actionShowPersonalData_toggled(bool visible);
+
private:
QString getMainWindowTitle();
diff --git a/oscar/mainwindow.ui b/oscar/mainwindow.ui
index e6af849c..fa4933e1 100644
--- a/oscar/mainwindow.ui
+++ b/oscar/mainwindow.ui
@@ -2851,6 +2851,8 @@ p, li { white-space: pre-wrap; }
+
+
diff --git a/oscar/reports.cpp b/oscar/reports.cpp
index 1449b797..d426596e 100644
--- a/oscar/reports.cpp
+++ b/oscar/reports.cpp
@@ -141,7 +141,7 @@ void Report::PrintReport(gGraphView *gv, QString name, QDate date)
int maxy = 0;
- if (!p_profile->user->firstName().isEmpty()) {
+ if (AppSetting->showPersonalData() && !p_profile->user->firstName().isEmpty()) {
QString userinfo = STR_TR_Name + QString(":\t %1, %2\n").
arg(p_profile->user->lastName()).
arg(p_profile->user->firstName());
diff --git a/oscar/statistics.cpp b/oscar/statistics.cpp
index c7ce28a8..0c4fc67e 100644
--- a/oscar/statistics.cpp
+++ b/oscar/statistics.cpp
@@ -620,6 +620,10 @@ Statistics::Statistics(QObject *parent) :
// Get the user information block for displaying at top of page
QString Statistics::getUserInfo () {
+ bool test = AppSetting->showPersonalData();
+ if (!test)
+ return "";
+
QString address = p_profile->user->address();
address.replace("\n", "
");