4 Commits

Author SHA1 Message Date
Aurélie Delhaie
e2c090b3a0 Fix Splitter between editor and viewer 2022-05-03 20:02:39 +02:00
Aurélie
658f4d860c Merge pull request #1 from mojitaurelie/dev
Fix nav bar, better .pro file
2022-03-01 21:44:26 +01:00
Aurélie Delhaie
926edc5e6d proprocessor cryptopp 2022-03-01 21:43:21 +01:00
Aurélie Delhaie
64d216fcf2 Ecnryptable note 2022-02-08 17:59:05 +01:00
21 changed files with 201 additions and 120 deletions

View File

@@ -4,25 +4,33 @@ greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG += c++17 CONFIG += c++17
win32:VERSION = 1.1.2.0 # major.minor.patch.build
else:VERSION = 1.1.2 # major.minor.patch
DEFINES += APP_VERSION=\"\\\"$${VERSION}\\\"\"
DEFINES += APP_NAME=\"\\\"TaskNote\\\"\"
# remove possible other optimization flags # remove possible other optimization flags
win32 { win32 {
message("Build for Windows") message("Build for Windows")
QMAKE_CXXFLAGS_RELEASE -= -O QMAKE_CXXFLAGS_RELEASE -= -O
QMAKE_CXXFLAGS_RELEASE -= -O1 QMAKE_CXXFLAGS_RELEASE -= -O1
QMAKE_CXXFLAGS_RELEASE *= -O2 QMAKE_CXXFLAGS_RELEASE *= -O2
DEFINES += APP_OS=\"\\\"Windows\\\"\"
DEFINES += APP_OS_VERSION=\"\\\"$$system(wmic os get version /value)\\\"\"
equals(QMAKE_TARGET.arch, arm64) { equals(QMAKE_TARGET.arch, arm64) {
message("CPU Architecture : aarch64") message("CPU Architecture : aarch64")
# Add specific arm stuff here DEFINES += APP_ARCH=\"\\\"arm64\\\"\"
} }
equals(QMAKE_TARGET.arch, x86_64) { equals(QMAKE_TARGET.arch, x86_64) {
message("CPU Architecture : x64") message("CPU Architecture : x64")
QMAKE_CXXFLAGS_RELEASE += -favor:INTEL64 QMAKE_CXXFLAGS_RELEASE += -favor:INTEL64
DEFINES += APP_ARCH=\"\\\"x64\\\"\"
} }
RC_ICONS = icon.ico RC_ICONS = icon.ico
VERSION = 1.1.0.0
QMAKE_TARGET_COMPANY = "Aurelie Delhaie" QMAKE_TARGET_COMPANY = "Aurelie Delhaie"
QMAKE_TARGET_PRODUCT = "TaskNote" QMAKE_TARGET_PRODUCT = "TaskNote"
QMAKE_TARGET_DESCRIPTION = "TaskNote" QMAKE_TARGET_DESCRIPTION = "Simple note-taking workbook"
} }
macx { macx {
@@ -33,18 +41,19 @@ macx {
QMAKE_CXXFLAGS_RELEASE -= -O1 QMAKE_CXXFLAGS_RELEASE -= -O1
QMAKE_CXXFLAGS_RELEASE -= -O2 QMAKE_CXXFLAGS_RELEASE -= -O2
QMAKE_CXXFLAGS_RELEASE *= -O3 QMAKE_CXXFLAGS_RELEASE *= -O3
equals(QMAKE_APPLE_DEVICE_ARCHS, arm64) { QMAKE_APPLE_DEVICE_ARCHS = x86_64 arm64
message("CPU Architecture : aarch64") DEFINES += APP_OS=\"\\\"macOS\\\"\"
QMAKE_CXXFLAGS_RELEASE += -mcpu=apple-a14 DEFINES += APP_OS_VERSION=\"\\\"$$system(uname -r)\\\"\"
} DEFINES += APP_ARCH=\"\\\"universal\\\"\"
VERSION = 1.1.0
} }
linux-g++* { linux-g++* {
message("Build for Linux") message("Build for Linux")
DEFINES += APP_OS=\"\\\"$$system(cat /etc/issue | cut -d\' \' -f1)\\\"\"
DEFINES += APP_OS_VERSION=\"\\\"$$system(uname -r)\\\"\"
DEFINES += APP_ARCH=\"\\\"amd64\\\"\"
QMAKE_CXXFLAGS_RELEASE *= -O3 QMAKE_CXXFLAGS_RELEASE *= -O3
QMAKE_CXXFLAGS_RELEASE += -march=skylake QMAKE_CXXFLAGS_RELEASE += -march=skylake
VERSION = 1.1.0
} }
# You can make your code fail to compile if it uses deprecated APIs. # You can make your code fail to compile if it uses deprecated APIs.

View File

@@ -1,14 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject> <!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 5.0.2, 2022-02-01T19:03:04. --> <!-- Written by QtCreator 6.0.2, 2022-03-01T21:27:21. -->
<qtcreator> <qtcreator>
<data> <data>
<variable>EnvironmentId</variable> <variable>EnvironmentId</variable>
<value type="QByteArray">{f1407b1e-b4d5-4aac-ba0d-b38072a0dfb8}</value> <value type="QByteArray">{dbe9fba1-e5a9-4d98-85bf-f46da0900eba}</value>
</data> </data>
<data> <data>
<variable>ProjectExplorer.Project.ActiveTarget</variable> <variable>ProjectExplorer.Project.ActiveTarget</variable>
<value type="int">0</value> <value type="qlonglong">0</value>
</data> </data>
<data> <data>
<variable>ProjectExplorer.Project.EditorSettings</variable> <variable>ProjectExplorer.Project.EditorSettings</variable>
@@ -28,7 +28,7 @@
<value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value> <value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value>
</valuemap> </valuemap>
</valuemap> </valuemap>
<value type="int" key="EditorConfiguration.CodeStyle.Count">2</value> <value type="qlonglong" key="EditorConfiguration.CodeStyle.Count">2</value>
<value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value> <value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value>
<value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
<value type="int" key="EditorConfiguration.IndentSize">4</value> <value type="int" key="EditorConfiguration.IndentSize">4</value>
@@ -77,7 +77,7 @@
<value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value> <value type="bool" key="ClangTools.AnalyzeOpenFiles">true</value>
<value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value> <value type="bool" key="ClangTools.BuildBeforeAnalysis">true</value>
<value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value> <value type="QString" key="ClangTools.DiagnosticConfig">Builtin.DefaultTidyAndClazy</value>
<value type="int" key="ClangTools.ParallelJobs">4</value> <value type="int" key="ClangTools.ParallelJobs">8</value>
<valuelist type="QVariantList" key="ClangTools.SelectedDirs"/> <valuelist type="QVariantList" key="ClangTools.SelectedDirs"/>
<valuelist type="QVariantList" key="ClangTools.SelectedFiles"/> <valuelist type="QVariantList" key="ClangTools.SelectedFiles"/>
<valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/> <valuelist type="QVariantList" key="ClangTools.SuppressedDiagnostics"/>
@@ -89,30 +89,28 @@
<variable>ProjectExplorer.Project.Target.0</variable> <variable>ProjectExplorer.Project.Target.0</variable>
<valuemap type="QVariantMap"> <valuemap type="QVariantMap">
<value type="QString" key="DeviceType">Desktop</value> <value type="QString" key="DeviceType">Desktop</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 6.2.0 for macOS</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 6.2.3 GCC 64bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Qt 6.2.0 for macOS</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 6.2.3 GCC 64bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt6.620.clang_64_kit</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt6.623.gcc_64_kit</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value> <value type="qlonglong" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> <value type="qlonglong" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> <value type="qlonglong" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
<value type="int" key="EnableQmlDebugging">0</value> <value type="int" key="EnableQmlDebugging">0</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/alexis/build-TaskNote-Qt_6_2_0_for_macOS-Debug</value> <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/aurelie/src/build-TaskNote-Desktop_Qt_6_2_3_GCC_64bit-Debug</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/Users/alexis/build-TaskNote-Qt_6_2_0_for_macOS-Debug</value> <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/aurelie/src/build-TaskNote-Desktop_Qt_6_2_3_GCC_64bit-Debug</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"> <valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
<value type="QString">arm-darwin-generic-mach_o-64bit</value>
</valuelist>
</valuemap> </valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
</valuemap> </valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> <value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
@@ -123,7 +121,7 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
</valuemap> </valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> <value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
@@ -131,28 +129,27 @@
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/> <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Debug</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
<value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value> <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
</valuemap> </valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1"> <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/alexis/build-TaskNote-Qt_6_2_0_for_macOS-Release</value> <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/aurelie/src/build-TaskNote-Desktop_Qt_6_2_3_GCC_64bit-Release</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/Users/alexis/build-TaskNote-Qt_6_2_0_for_macOS-Release</value> <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/aurelie/src/build-TaskNote-Desktop_Qt_6_2_3_GCC_64bit-Release</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"> <valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
<value type="QString">arm-darwin-generic-mach_o-64bit</value>
</valuelist>
</valuemap> </valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
</valuemap> </valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> <value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
@@ -163,7 +160,7 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
</valuemap> </valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> <value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
@@ -171,6 +168,7 @@
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/> <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Release</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
@@ -179,20 +177,20 @@
</valuemap> </valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2"> <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.2">
<value type="int" key="EnableQmlDebugging">0</value> <value type="int" key="EnableQmlDebugging">0</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/Users/alexis/build-TaskNote-Qt_6_2_0_for_macOS-Profile</value> <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">/home/aurelie/src/build-TaskNote-Desktop_Qt_6_2_3_GCC_64bit-Profile</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/Users/alexis/build-TaskNote-Qt_6_2_0_for_macOS-Profile</value> <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory.shadowDir">/home/aurelie/src/build-TaskNote-Desktop_Qt_6_2_3_GCC_64bit-Profile</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">true</value> <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/> <valuelist type="QVariantList" key="QtProjectManager.QMakeBuildStep.SelectedAbis"/>
</valuemap> </valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
</valuemap> </valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> <value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
@@ -203,7 +201,7 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
</valuemap> </valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> <value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Clean</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
@@ -211,6 +209,7 @@
<value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/> <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.CustomParsers"/>
<value type="bool" key="ProjectExplorer.BuildConfiguration.ParseStandardOutput">false</value>
<valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Profile</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
@@ -218,10 +217,10 @@
<value type="int" key="QtQuickCompiler">0</value> <value type="int" key="QtQuickCompiler">0</value>
<value type="int" key="SeparateDebugInfo">0</value> <value type="int" key="SeparateDebugInfo">0</value>
</valuemap> </valuemap>
<value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">3</value> <value type="qlonglong" key="ProjectExplorer.Target.BuildConfigurationCount">3</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> <value type="qlonglong" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Deploy</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
@@ -231,7 +230,7 @@
<value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value> <value type="bool" key="ProjectExplorer.DeployConfiguration.CustomDataEnabled">false</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
</valuemap> </valuemap>
<value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> <value type="qlonglong" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
<value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value> <value type="bool" key="Analyzer.Perf.Settings.UseGlobalSettings">true</value>
<value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value> <value type="bool" key="Analyzer.QmlProfiler.Settings.UseGlobalSettings">true</value>
@@ -239,21 +238,19 @@
<valuelist type="QVariantList" key="CustomOutputParsers"/> <valuelist type="QVariantList" key="CustomOutputParsers"/>
<value type="int" key="PE.EnvironmentAspect.Base">2</value> <value type="int" key="PE.EnvironmentAspect.Base">2</value>
<valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/Users/alexis/TaskNote/TaskNote.pro</value> <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.CustomExecutableRunConfiguration</value>
<value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey">/Users/alexis/TaskNote/TaskNote.pro</value> <value type="QString" key="ProjectExplorer.RunConfiguration.BuildKey"></value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value> <value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value> <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseLibrarySearchPath">true</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="QString" key="RunConfiguration.WorkingDirectory.default">/Users/alexis/build-TaskNote-Qt_6_2_0_for_macOS-Release/TaskNote.app/Contents/MacOS</value>
</valuemap> </valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> <value type="qlonglong" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap> </valuemap>
</data> </data>
<data> <data>
<variable>ProjectExplorer.Project.TargetCount</variable> <variable>ProjectExplorer.Project.TargetCount</variable>
<value type="int">1</value> <value type="qlonglong">1</value>
</data> </data>
<data> <data>
<variable>ProjectExplorer.Project.Updater.FileVersion</variable> <variable>ProjectExplorer.Project.Updater.FileVersion</variable>

View File

@@ -1,9 +1,12 @@
<RCC> <RCC>
<qresource prefix="/icon"> <qresource prefix="/icon">
<file>resources/outline_add_circle_outline_black_18dp.png</file> <file>resources/outline_add_circle_outline_black_48dp.png</file>
<file>resources/outline_delete_forever_black_18dp.png</file> <file>resources/outline_delete_forever_black_48dp.png</file>
<file>resources/outline_save_black_18dp.png</file> <file>resources/outline_help_outline_black_48dp.png</file>
<file>resources/outline_help_outline_black_18dp.png</file> <file>resources/outline_lock_black_48dp.png</file>
<file>resources/outline_save_black_48dp.png</file>
<file>resources/outline_shield_black_48dp.png</file>
<file>resources/outline_lock_open_black_48dp.png</file>
</qresource> </qresource>
<qresource prefix="/logo"> <qresource prefix="/logo">
<file>resources/logo.png</file> <file>resources/logo.png</file>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 885 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 183 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 191 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 468 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 963 B

View File

@@ -6,7 +6,8 @@ AboutDialog::AboutDialog(QWidget *parent) :
ui(new Ui::AboutDialog) ui(new Ui::AboutDialog)
{ {
ui->setupUi(this); ui->setupUi(this);
ui->appNameLabel->setText(QString("TaskNote (%1)").arg(QSysInfo::currentCpuArchitecture())); ui->appNameLabel->setText(QString("%1 (%2)").arg(APP_NAME, APP_ARCH));
ui->versionLabel->setText(QString("Version %1").arg(APP_VERSION));
} }
AboutDialog::~AboutDialog() AboutDialog::~AboutDialog()

View File

@@ -25,6 +25,9 @@
<property name="windowTitle"> <property name="windowTitle">
<string>About TaskNote</string> <string>About TaskNote</string>
</property> </property>
<property name="modal">
<bool>true</bool>
</property>
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<item row="0" column="0"> <item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout"> <layout class="QVBoxLayout" name="verticalLayout">
@@ -69,9 +72,9 @@
</widget> </widget>
</item> </item>
<item> <item>
<widget class="QLabel" name="label_3"> <widget class="QLabel" name="versionLabel">
<property name="text"> <property name="text">
<string>Version 1.1.0.0</string> <string>Version 1.2.0.0</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignCenter</set> <set>Qt::AlignCenter</set>

View File

@@ -51,12 +51,19 @@ void MainWindow::selectionChanged(int i)
clearAndDisableFields(); clearAndDisableFields();
return; return;
} }
ui->actionRemove->setDisabled(false);
ui->contentEdit->blockSignals(true);
ui->titleEdit->blockSignals(true);
ui->titleEdit->setDisabled(false); ui->titleEdit->setDisabled(false);
ui->contentEdit->setDisabled(false); ui->contentEdit->setDisabled(false);
ui->actionRemove->setDisabled(false);
ui->titleEdit->setText(n->getTitle()); ui->titleEdit->setText(n->getTitle());
ui->contentEdit->setPlainText(n->getContent()); ui->contentEdit->setPlainText(n->getContent());
ui->markdownViewer->setMarkdown(n->getContent()); ui->markdownViewer->setMarkdown(ui->contentEdit->toPlainText());
ui->contentEdit->blockSignals(false);
ui->titleEdit->blockSignals(false);
} }
void MainWindow::removeSelected() void MainWindow::removeSelected()
@@ -71,6 +78,7 @@ void MainWindow::removeSelected()
void MainWindow::save() void MainWindow::save()
{ {
ui->actionSave->setDisabled(true);
if (this->currentIndex > -1) if (this->currentIndex > -1)
{ {
Note *n = this->savemng->getNoteByIndex(this->currentIndex); Note *n = this->savemng->getNoteByIndex(this->currentIndex);
@@ -89,6 +97,7 @@ void MainWindow::titleChanged()
n->setTitle(ui->titleEdit->text()); n->setTitle(ui->titleEdit->text());
ui->noteList->item(this->currentIndex)->setText(ui->titleEdit->text()); ui->noteList->item(this->currentIndex)->setText(ui->titleEdit->text());
} }
ui->actionSave->setDisabled(false);
timer->start(1000); timer->start(1000);
} }
@@ -108,6 +117,7 @@ void MainWindow::contentChanged()
n->setContent(ui->contentEdit->toPlainText()); n->setContent(ui->contentEdit->toPlainText());
ui->markdownViewer->setMarkdown(ui->contentEdit->toPlainText()); ui->markdownViewer->setMarkdown(ui->contentEdit->toPlainText());
} }
ui->actionSave->setDisabled(false);
timer->start(1000); timer->start(1000);
} }
@@ -122,6 +132,9 @@ void MainWindow::updateListView()
void MainWindow::clearAndDisableFields() void MainWindow::clearAndDisableFields()
{ {
ui->contentEdit->blockSignals(true);
ui->titleEdit->blockSignals(true);
this->currentIndex = -1; this->currentIndex = -1;
ui->actionRemove->setDisabled(true); ui->actionRemove->setDisabled(true);
ui->titleEdit->setDisabled(true); ui->titleEdit->setDisabled(true);
@@ -129,5 +142,8 @@ void MainWindow::clearAndDisableFields()
ui->titleEdit->clear(); ui->titleEdit->clear();
ui->contentEdit->clear(); ui->contentEdit->clear();
ui->markdownViewer->clear(); ui->markdownViewer->clear();
ui->contentEdit->blockSignals(false);
ui->titleEdit->blockSignals(false);
} }

View File

@@ -20,8 +20,8 @@
<string>TaskNote</string> <string>TaskNote</string>
</property> </property>
<widget class="QWidget" name="centralwidget"> <widget class="QWidget" name="centralwidget">
<layout class="QGridLayout" name="gridLayout"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<item row="0" column="0"> <item>
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
<widget class="QListWidget" name="noteList"> <widget class="QListWidget" name="noteList">
@@ -63,42 +63,53 @@
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_3"> <widget class="QSplitter" name="splitter">
<item> <property name="sizePolicy">
<widget class="QLabel" name="label_3"> <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<property name="text"> <horstretch>0</horstretch>
<string>Markdown editor</string> <verstretch>0</verstretch>
</sizepolicy>
</property> </property>
</widget> <property name="orientation">
</item> <enum>Qt::Horizontal</enum>
<item> </property>
<widget class="QLabel" name="label_2"> <property name="childrenCollapsible">
<property name="text"> <bool>false</bool>
<string>Viewer</string>
</property> </property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QPlainTextEdit" name="contentEdit"> <widget class="QPlainTextEdit" name="contentEdit">
<property name="enabled"> <property name="enabled">
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="font">
<font>
<kerning>false</kerning>
</font>
</property>
<property name="lineWrapMode">
<enum>QPlainTextEdit::NoWrap</enum>
</property>
</widget> </widget>
</item>
<item>
<widget class="QTextEdit" name="markdownViewer"> <widget class="QTextEdit" name="markdownViewer">
<property name="enabled"> <property name="enabled">
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="minimumSize">
<size>
<width>200</width>
<height>0</height>
</size>
</property>
<property name="autoFormatting"> <property name="autoFormatting">
<set>QTextEdit::AutoAll</set> <set>QTextEdit::AutoAll</set>
</property> </property>
<property name="lineWrapMode"> <property name="lineWrapMode">
<enum>QTextEdit::WidgetWidth</enum> <enum>QTextEdit::NoWrap</enum>
</property> </property>
<property name="readOnly"> <property name="readOnly">
<bool>true</bool> <bool>true</bool>
@@ -110,8 +121,7 @@
<set>Qt::TextSelectableByMouse</set> <set>Qt::TextSelectableByMouse</set>
</property> </property>
</widget> </widget>
</item> </widget>
</layout>
</item> </item>
</layout> </layout>
</item> </item>
@@ -120,15 +130,30 @@
</layout> </layout>
</widget> </widget>
<widget class="QToolBar" name="toolBar"> <widget class="QToolBar" name="toolBar">
<property name="enabled">
<bool>true</bool>
</property>
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
<width>16777215</width> <width>16777215</width>
<height>33</height> <height>96</height>
</size> </size>
</property> </property>
<property name="contextMenuPolicy">
<enum>Qt::PreventContextMenu</enum>
</property>
<property name="windowTitle"> <property name="windowTitle">
<string>toolBar</string> <string>toolBar</string>
</property> </property>
<property name="movable">
<bool>false</bool>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextUnderIcon</enum>
</property>
<property name="floatable">
<bool>false</bool>
</property>
<attribute name="toolBarArea"> <attribute name="toolBarArea">
<enum>TopToolBarArea</enum> <enum>TopToolBarArea</enum>
</attribute> </attribute>
@@ -145,7 +170,7 @@
<action name="actionAdd"> <action name="actionAdd">
<property name="icon"> <property name="icon">
<iconset resource="../../icons.qrc"> <iconset resource="../../icons.qrc">
<normaloff>:/icon/resources/outline_add_circle_outline_black_18dp.png</normaloff>:/icon/resources/outline_add_circle_outline_black_18dp.png</iconset> <normaloff>:/icon/resources/outline_add_circle_outline_black_48dp.png</normaloff>:/icon/resources/outline_add_circle_outline_black_48dp.png</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Add</string> <string>Add</string>
@@ -157,16 +182,19 @@
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../../icons.qrc"> <iconset resource="../../icons.qrc">
<normaloff>:/icon/resources/outline_delete_forever_black_18dp.png</normaloff>:/icon/resources/outline_delete_forever_black_18dp.png</iconset> <normaloff>:/icon/resources/outline_delete_forever_black_48dp.png</normaloff>:/icon/resources/outline_delete_forever_black_48dp.png</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Remove</string> <string>Remove</string>
</property> </property>
</action> </action>
<action name="actionSave"> <action name="actionSave">
<property name="enabled">
<bool>false</bool>
</property>
<property name="icon"> <property name="icon">
<iconset resource="../../icons.qrc"> <iconset resource="../../icons.qrc">
<normaloff>:/icon/resources/outline_save_black_18dp.png</normaloff>:/icon/resources/outline_save_black_18dp.png</iconset> <normaloff>:/icon/resources/outline_save_black_48dp.png</normaloff>:/icon/resources/outline_save_black_48dp.png</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>Save</string> <string>Save</string>
@@ -175,7 +203,7 @@
<action name="actionAbout"> <action name="actionAbout">
<property name="icon"> <property name="icon">
<iconset resource="../../icons.qrc"> <iconset resource="../../icons.qrc">
<normaloff>:/icon/resources/outline_help_outline_black_18dp.png</normaloff>:/icon/resources/outline_help_outline_black_18dp.png</iconset> <normaloff>:/icon/resources/outline_help_outline_black_48dp.png</normaloff>:/icon/resources/outline_help_outline_black_48dp.png</iconset>
</property> </property>
<property name="text"> <property name="text">
<string>About</string> <string>About</string>

View File

@@ -2,27 +2,34 @@
Note::Note() Note::Note()
{ {
QUuid uid = QUuid::createUuid();
this->uuid = uid.toString(QUuid::StringFormat::WithoutBraces);
} }
QJsonObject Note::toJson() QJsonObject Note::toJson()
{ {
QJsonObject o; QJsonObject o;
o["uuid"] = this->uuid;
o["title"] = this->title; o["title"] = this->title;
o["content"] = this->content; o["content"] = this->content;
return o; return o;
} }
Note *Note::fromJson(QJsonObject o) Note *Note::fromJson(QJsonObject o)
{ {
Note *n = new Note(); Note *n = new Note();
n->uuid = o["uuid"].toString(n->uuid);
n->title = o["title"].toString(); n->title = o["title"].toString();
n->content = o["content"].toString(); n->content = o["content"].toString();
n->encrypted = o["encrypted"].toBool(false);
return n; return n;
} }
QString Note::getUuid()
{
return uuid;
}
QString Note::getTitle() QString Note::getTitle()
{ {
return title; return title;
@@ -30,9 +37,12 @@ QString Note::getTitle()
QString Note::getContent() QString Note::getContent()
{ {
if (!this->encrypted)
{
return content; return content;
}
return "";
} }
void Note::setTitle(QString value) void Note::setTitle(QString value)
{ {
this->title = value; this->title = value;
@@ -40,6 +50,7 @@ void Note::setTitle(QString value)
void Note::setContent(QString value) void Note::setContent(QString value)
{ {
if (!this->encrypted) {
this->content = value; this->content = value;
}
} }

View File

@@ -1,8 +1,15 @@
#ifndef NOTE_H #ifndef NOTE_H
#define NOTE_H #define NOTE_H
#define TAG_SIZE 12
#include <iostream>
#include <string>
#include <QString> #include <QString>
#include <QJsonObject> #include <QJsonObject>
#include <QUuid>
#include <QMessageBox>
class Note class Note
{ {
@@ -12,15 +19,17 @@ public:
QJsonObject toJson(); QJsonObject toJson();
static Note* fromJson(QJsonObject o); static Note* fromJson(QJsonObject o);
QString getUuid();
QString getTitle(); QString getTitle();
QString getContent(); QString getContent();
void setTitle(QString value); void setTitle(QString value);
void setContent(QString value); void setContent(QString value);
private: private:
QString uuid;
QString title; QString title;
QString content; QString content;
bool encrypted;
}; };
#endif // NOTE_H #endif // NOTE_H

View File

@@ -8,6 +8,10 @@ SaveManager::SaveManager()
SaveManager::~SaveManager() SaveManager::~SaveManager()
{ {
flushSave(); flushSave();
foreach (Note *n, notes)
{
delete n;
}
} }
void SaveManager::flushSave() void SaveManager::flushSave()